chore(deps): upgrade Effect to rc.112 and Alchemy to beta.76 (#10652)
This commit is contained in:
1 parent
50a76cee7c
commit
bd56e920b7
250 files changed
+2169
-1584
No files matched your search
@@ -182,7 +182,7 @@ const getDefaultArch = Effect.fn("getDefaultArch")(function* (platform: typeof B
|
||||
return yield* getDefaultBuildArch(platform, config);
|
||||
});
|
||||
|
||||
export class MacPasskeySigningConfigurationResolutionError extends Schema.TaggedErrorClass<MacPasskeySigningConfigurationResolutionError>()(
|
||||
export class MacPasskeySigningConfigurationResolutionError extends Schema.TaggedError<MacPasskeySigningConfigurationResolutionError>()(
|
||||
"MacPasskeySigningConfigurationResolutionError",
|
||||
{
|
||||
cause: Schema.Defect(),
|
||||
@@ -201,7 +201,7 @@ export class MacPasskeySigningConfigurationResolutionError extends Schema.Tagged
|
||||
}
|
||||
}
|
||||
|
||||
export class KeyringNativePackageMissingError extends Schema.TaggedErrorClass<KeyringNativePackageMissingError>()(
|
||||
export class KeyringNativePackageMissingError extends Schema.TaggedError<KeyringNativePackageMissingError>()(
|
||||
"KeyringNativePackageMissingError",
|
||||
{
|
||||
packageName: Schema.String,
|
||||
@@ -217,7 +217,7 @@ export class KeyringNativePackageMissingError extends Schema.TaggedErrorClass<Ke
|
||||
}
|
||||
}
|
||||
|
||||
export class ClerkPasskeyNativePackageMissingError extends Schema.TaggedErrorClass<ClerkPasskeyNativePackageMissingError>()(
|
||||
export class ClerkPasskeyNativePackageMissingError extends Schema.TaggedError<ClerkPasskeyNativePackageMissingError>()(
|
||||
"ClerkPasskeyNativePackageMissingError",
|
||||
{
|
||||
packageName: Schema.String,
|
||||
@@ -233,7 +233,7 @@ export class ClerkPasskeyNativePackageMissingError extends Schema.TaggedErrorCla
|
||||
}
|
||||
}
|
||||
|
||||
export class UnsupportedHostBuildPlatformError extends Schema.TaggedErrorClass<UnsupportedHostBuildPlatformError>()(
|
||||
export class UnsupportedHostBuildPlatformError extends Schema.TaggedError<UnsupportedHostBuildPlatformError>()(
|
||||
"UnsupportedHostBuildPlatformError",
|
||||
{
|
||||
hostPlatform: Schema.String,
|
||||
@@ -244,7 +244,7 @@ export class UnsupportedHostBuildPlatformError extends Schema.TaggedErrorClass<U
|
||||
}
|
||||
}
|
||||
|
||||
export class UnsupportedDesktopBuildArchitectureError extends Schema.TaggedErrorClass<UnsupportedDesktopBuildArchitectureError>()(
|
||||
export class UnsupportedDesktopBuildArchitectureError extends Schema.TaggedError<UnsupportedDesktopBuildArchitectureError>()(
|
||||
"UnsupportedDesktopBuildArchitectureError",
|
||||
{
|
||||
platform: BuildPlatform,
|
||||
@@ -263,7 +263,7 @@ const InvalidMockUpdateServerPortReason = Schema.Literals([
|
||||
"out-of-range",
|
||||
]);
|
||||
|
||||
export class InvalidMockUpdateServerPortError extends Schema.TaggedErrorClass<InvalidMockUpdateServerPortError>()(
|
||||
export class InvalidMockUpdateServerPortError extends Schema.TaggedError<InvalidMockUpdateServerPortError>()(
|
||||
"InvalidMockUpdateServerPortError",
|
||||
{
|
||||
reason: InvalidMockUpdateServerPortReason,
|
||||
@@ -284,7 +284,7 @@ export class InvalidMockUpdateServerPortError extends Schema.TaggedErrorClass<In
|
||||
}
|
||||
}
|
||||
|
||||
export class BuildCommandFailedError extends Schema.TaggedErrorClass<BuildCommandFailedError>()(
|
||||
export class BuildCommandFailedError extends Schema.TaggedError<BuildCommandFailedError>()(
|
||||
"BuildCommandFailedError",
|
||||
{
|
||||
command: Schema.String,
|
||||
@@ -317,7 +317,7 @@ export const LINUX_DESKTOP_BUILD_PREREQUISITES = [
|
||||
{ id: "imagemagick", description: "ImageMagick", packages: ["imagemagick"] },
|
||||
] as const;
|
||||
|
||||
export class LinuxDesktopBuildPrerequisitesMissingError extends Schema.TaggedErrorClass<LinuxDesktopBuildPrerequisitesMissingError>()(
|
||||
export class LinuxDesktopBuildPrerequisitesMissingError extends Schema.TaggedError<LinuxDesktopBuildPrerequisitesMissingError>()(
|
||||
"LinuxDesktopBuildPrerequisitesMissingError",
|
||||
{
|
||||
missing: Schema.Array(Schema.String),
|
||||
@@ -364,7 +364,7 @@ const MAC_DESKTOP_BUILD_PREREQUISITES = [
|
||||
{ id: "lipo", description: "Xcode universal-binary tool (lipo)" },
|
||||
] as const;
|
||||
|
||||
export class MacDesktopBuildPrerequisitesMissingError extends Schema.TaggedErrorClass<MacDesktopBuildPrerequisitesMissingError>()(
|
||||
export class MacDesktopBuildPrerequisitesMissingError extends Schema.TaggedError<MacDesktopBuildPrerequisitesMissingError>()(
|
||||
"MacDesktopBuildPrerequisitesMissingError",
|
||||
{
|
||||
missing: Schema.Array(Schema.String),
|
||||
@@ -401,7 +401,7 @@ const WINDOWS_DESKTOP_BUILD_PREREQUISITES = [
|
||||
{ id: "tar", description: "tar for the bundled WSL runtime" },
|
||||
] as const;
|
||||
|
||||
export class WindowsDesktopBuildPrerequisitesMissingError extends Schema.TaggedErrorClass<WindowsDesktopBuildPrerequisitesMissingError>()(
|
||||
export class WindowsDesktopBuildPrerequisitesMissingError extends Schema.TaggedError<WindowsDesktopBuildPrerequisitesMissingError>()(
|
||||
"WindowsDesktopBuildPrerequisitesMissingError",
|
||||
{
|
||||
missing: Schema.Array(Schema.String),
|
||||
@@ -428,7 +428,7 @@ export class WindowsDesktopBuildPrerequisitesMissingError extends Schema.TaggedE
|
||||
}
|
||||
}
|
||||
|
||||
export class ResourceMonitorBuildOutputMissingError extends Schema.TaggedErrorClass<ResourceMonitorBuildOutputMissingError>()(
|
||||
export class ResourceMonitorBuildOutputMissingError extends Schema.TaggedError<ResourceMonitorBuildOutputMissingError>()(
|
||||
"ResourceMonitorBuildOutputMissingError",
|
||||
{
|
||||
binaryPath: Schema.String,
|
||||
@@ -448,7 +448,7 @@ const desktopIconPlatformNames = {
|
||||
win: "Windows",
|
||||
} satisfies Record<typeof BuildPlatform.Type, string>;
|
||||
|
||||
export class LinuxBrowserSecretHostError extends Schema.TaggedErrorClass<LinuxBrowserSecretHostError>()(
|
||||
export class LinuxBrowserSecretHostError extends Schema.TaggedError<LinuxBrowserSecretHostError>()(
|
||||
"LinuxBrowserSecretHostError",
|
||||
{ hostPlatform: Schema.String },
|
||||
) {
|
||||
@@ -457,7 +457,7 @@ export class LinuxBrowserSecretHostError extends Schema.TaggedErrorClass<LinuxBr
|
||||
}
|
||||
}
|
||||
|
||||
export class DesktopIconSourceMissingError extends Schema.TaggedErrorClass<DesktopIconSourceMissingError>()(
|
||||
export class DesktopIconSourceMissingError extends Schema.TaggedError<DesktopIconSourceMissingError>()(
|
||||
"DesktopIconSourceMissingError",
|
||||
{
|
||||
platform: BuildPlatform,
|
||||
@@ -469,7 +469,7 @@ export class DesktopIconSourceMissingError extends Schema.TaggedErrorClass<Deskt
|
||||
}
|
||||
}
|
||||
|
||||
export class DesktopDmgBackgroundSourceMissingError extends Schema.TaggedErrorClass<DesktopDmgBackgroundSourceMissingError>()(
|
||||
export class DesktopDmgBackgroundSourceMissingError extends Schema.TaggedError<DesktopDmgBackgroundSourceMissingError>()(
|
||||
"DesktopDmgBackgroundSourceMissingError",
|
||||
{
|
||||
channel: Schema.Literals(["latest", "nightly"]),
|
||||
@@ -481,7 +481,7 @@ export class DesktopDmgBackgroundSourceMissingError extends Schema.TaggedErrorCl
|
||||
}
|
||||
}
|
||||
|
||||
export class BundledClientAssetsMissingError extends Schema.TaggedErrorClass<BundledClientAssetsMissingError>()(
|
||||
export class BundledClientAssetsMissingError extends Schema.TaggedError<BundledClientAssetsMissingError>()(
|
||||
"BundledClientAssetsMissingError",
|
||||
{
|
||||
indexPath: Schema.String,
|
||||
@@ -495,7 +495,7 @@ export class BundledClientAssetsMissingError extends Schema.TaggedErrorClass<Bun
|
||||
}
|
||||
}
|
||||
|
||||
export class UnsupportedDesktopBuildPlatformError extends Schema.TaggedErrorClass<UnsupportedDesktopBuildPlatformError>()(
|
||||
export class UnsupportedDesktopBuildPlatformError extends Schema.TaggedError<UnsupportedDesktopBuildPlatformError>()(
|
||||
"UnsupportedDesktopBuildPlatformError",
|
||||
{
|
||||
platform: Schema.String,
|
||||
@@ -517,7 +517,7 @@ const DependencyResolutionKind = Schema.Literals([
|
||||
"desktop-runtime",
|
||||
]);
|
||||
|
||||
export class DesktopBuildDependencyResolutionError extends Schema.TaggedErrorClass<DesktopBuildDependencyResolutionError>()(
|
||||
export class DesktopBuildDependencyResolutionError extends Schema.TaggedError<DesktopBuildDependencyResolutionError>()(
|
||||
"DesktopBuildDependencyResolutionError",
|
||||
{
|
||||
kind: DependencyResolutionKind,
|
||||
@@ -530,7 +530,7 @@ export class DesktopBuildDependencyResolutionError extends Schema.TaggedErrorCla
|
||||
}
|
||||
}
|
||||
|
||||
export class MissingServerProductionDependenciesError extends Schema.TaggedErrorClass<MissingServerProductionDependenciesError>()(
|
||||
export class MissingServerProductionDependenciesError extends Schema.TaggedError<MissingServerProductionDependenciesError>()(
|
||||
"MissingServerProductionDependenciesError",
|
||||
{
|
||||
manifestPath: Schema.String,
|
||||
@@ -582,7 +582,7 @@ if (!result.ok) throw new Error(result.error);
|
||||
result.value.destroy();
|
||||
`;
|
||||
|
||||
export class ExternalizedBundleError extends Schema.TaggedErrorClass<ExternalizedBundleError>()(
|
||||
export class ExternalizedBundleError extends Schema.TaggedError<ExternalizedBundleError>()(
|
||||
"ExternalizedBundleError",
|
||||
{ sentinel: Schema.String, inlinedPackageCount: Schema.Number },
|
||||
) {
|
||||
@@ -591,7 +591,7 @@ export class ExternalizedBundleError extends Schema.TaggedErrorClass<Externalize
|
||||
}
|
||||
}
|
||||
|
||||
export class BundleNotSelfContainedError extends Schema.TaggedErrorClass<BundleNotSelfContainedError>()(
|
||||
export class BundleNotSelfContainedError extends Schema.TaggedError<BundleNotSelfContainedError>()(
|
||||
"BundleNotSelfContainedError",
|
||||
{ exitCode: Schema.Number, output: Schema.String },
|
||||
) {
|
||||
@@ -601,7 +601,7 @@ ${this.output}`;
|
||||
}
|
||||
}
|
||||
|
||||
export class InlinedNativePackageError extends Schema.TaggedErrorClass<InlinedNativePackageError>()(
|
||||
export class InlinedNativePackageError extends Schema.TaggedError<InlinedNativePackageError>()(
|
||||
"InlinedNativePackageError",
|
||||
{ packages: Schema.Array(Schema.String) },
|
||||
) {
|
||||
@@ -610,7 +610,7 @@ export class InlinedNativePackageError extends Schema.TaggedErrorClass<InlinedNa
|
||||
}
|
||||
}
|
||||
|
||||
export class InlinedExternalPackageError extends Schema.TaggedErrorClass<InlinedExternalPackageError>()(
|
||||
export class InlinedExternalPackageError extends Schema.TaggedError<InlinedExternalPackageError>()(
|
||||
"InlinedExternalPackageError",
|
||||
{ packages: Schema.Array(Schema.String) },
|
||||
) {
|
||||
@@ -619,7 +619,7 @@ export class InlinedExternalPackageError extends Schema.TaggedErrorClass<Inlined
|
||||
}
|
||||
}
|
||||
|
||||
export class MissingDesktopBuildInputError extends Schema.TaggedErrorClass<MissingDesktopBuildInputError>()(
|
||||
export class MissingDesktopBuildInputError extends Schema.TaggedError<MissingDesktopBuildInputError>()(
|
||||
"MissingDesktopBuildInputError",
|
||||
{
|
||||
artifact: DesktopBuildInputArtifact,
|
||||
@@ -632,7 +632,7 @@ export class MissingDesktopBuildInputError extends Schema.TaggedErrorClass<Missi
|
||||
}
|
||||
}
|
||||
|
||||
export class MacProvisioningProfileNotFoundError extends Schema.TaggedErrorClass<MacProvisioningProfileNotFoundError>()(
|
||||
export class MacProvisioningProfileNotFoundError extends Schema.TaggedError<MacProvisioningProfileNotFoundError>()(
|
||||
"MacProvisioningProfileNotFoundError",
|
||||
{
|
||||
provisioningProfilePath: Schema.String,
|
||||
@@ -643,7 +643,7 @@ export class MacProvisioningProfileNotFoundError extends Schema.TaggedErrorClass
|
||||
}
|
||||
}
|
||||
|
||||
export class DesktopBuildDistDirectoryMissingError extends Schema.TaggedErrorClass<DesktopBuildDistDirectoryMissingError>()(
|
||||
export class DesktopBuildDistDirectoryMissingError extends Schema.TaggedError<DesktopBuildDistDirectoryMissingError>()(
|
||||
"DesktopBuildDistDirectoryMissingError",
|
||||
{
|
||||
distPath: Schema.String,
|
||||
@@ -656,7 +656,7 @@ export class DesktopBuildDistDirectoryMissingError extends Schema.TaggedErrorCla
|
||||
}
|
||||
}
|
||||
|
||||
export class DesktopBuildNoArtifactsProducedError extends Schema.TaggedErrorClass<DesktopBuildNoArtifactsProducedError>()(
|
||||
export class DesktopBuildNoArtifactsProducedError extends Schema.TaggedError<DesktopBuildNoArtifactsProducedError>()(
|
||||
"DesktopBuildNoArtifactsProducedError",
|
||||
{
|
||||
distPath: Schema.String,
|
||||
@@ -669,7 +669,7 @@ export class DesktopBuildNoArtifactsProducedError extends Schema.TaggedErrorClas
|
||||
}
|
||||
}
|
||||
|
||||
export class WslNodePtyPrebuildMissingError extends Schema.TaggedErrorClass<WslNodePtyPrebuildMissingError>()(
|
||||
export class WslNodePtyPrebuildMissingError extends Schema.TaggedError<WslNodePtyPrebuildMissingError>()(
|
||||
"WslNodePtyPrebuildMissingError",
|
||||
{
|
||||
prebuildPath: Schema.String,
|
||||
@@ -680,7 +680,7 @@ export class WslNodePtyPrebuildMissingError extends Schema.TaggedErrorClass<WslN
|
||||
}
|
||||
}
|
||||
|
||||
export class WindowsServerSidecarPackError extends Schema.TaggedErrorClass<WindowsServerSidecarPackError>()(
|
||||
export class WindowsServerSidecarPackError extends Schema.TaggedError<WindowsServerSidecarPackError>()(
|
||||
"WindowsServerSidecarPackError",
|
||||
{
|
||||
asarPath: Schema.String,
|
||||
@@ -692,7 +692,7 @@ export class WindowsServerSidecarPackError extends Schema.TaggedErrorClass<Windo
|
||||
}
|
||||
}
|
||||
|
||||
export class WindowsPrimaryNativeProbeError extends Schema.TaggedErrorClass<WindowsPrimaryNativeProbeError>()(
|
||||
export class WindowsPrimaryNativeProbeError extends Schema.TaggedError<WindowsPrimaryNativeProbeError>()(
|
||||
"WindowsPrimaryNativeProbeError",
|
||||
{
|
||||
executablePath: Schema.String,
|
||||
@@ -716,7 +716,7 @@ const WindowsPackagedPayloadValidationReason = Schema.Literals([
|
||||
"file-limit-exceeded",
|
||||
]);
|
||||
|
||||
export class WindowsPackagedPayloadValidationError extends Schema.TaggedErrorClass<WindowsPackagedPayloadValidationError>()(
|
||||
export class WindowsPackagedPayloadValidationError extends Schema.TaggedError<WindowsPackagedPayloadValidationError>()(
|
||||
"WindowsPackagedPayloadValidationError",
|
||||
{
|
||||
reason: WindowsPackagedPayloadValidationReason,
|
||||
@@ -753,7 +753,7 @@ export class WindowsPackagedPayloadValidationError extends Schema.TaggedErrorCla
|
||||
}
|
||||
}
|
||||
|
||||
export class WslNodePtyManifestReadError extends Schema.TaggedErrorClass<WslNodePtyManifestReadError>()(
|
||||
export class WslNodePtyManifestReadError extends Schema.TaggedError<WslNodePtyManifestReadError>()(
|
||||
"WslNodePtyManifestReadError",
|
||||
{
|
||||
manifestPath: Schema.String,
|
||||
@@ -765,7 +765,7 @@ export class WslNodePtyManifestReadError extends Schema.TaggedErrorClass<WslNode
|
||||
}
|
||||
}
|
||||
|
||||
export class LinuxIconResizeError extends Schema.TaggedErrorClass<LinuxIconResizeError>()(
|
||||
export class LinuxIconResizeError extends Schema.TaggedError<LinuxIconResizeError>()(
|
||||
"LinuxIconResizeError",
|
||||
{
|
||||
operation: Schema.Literal("resize"),
|
||||
@@ -1134,7 +1134,7 @@ export const InvalidMacPasskeyRpDomainReason = Schema.Literals([
|
||||
]);
|
||||
export type InvalidMacPasskeyRpDomainReason = typeof InvalidMacPasskeyRpDomainReason.Type;
|
||||
|
||||
export class InvalidMacPasskeyRpDomainError extends Schema.TaggedErrorClass<InvalidMacPasskeyRpDomainError>()(
|
||||
export class InvalidMacPasskeyRpDomainError extends Schema.TaggedError<InvalidMacPasskeyRpDomainError>()(
|
||||
"InvalidMacPasskeyRpDomainError",
|
||||
{
|
||||
reason: InvalidMacPasskeyRpDomainReason,
|
||||
@@ -1147,7 +1147,7 @@ export class InvalidMacPasskeyRpDomainError extends Schema.TaggedErrorClass<Inva
|
||||
}
|
||||
}
|
||||
|
||||
export class InvalidAppleTeamIdError extends Schema.TaggedErrorClass<InvalidAppleTeamIdError>()(
|
||||
export class InvalidAppleTeamIdError extends Schema.TaggedError<InvalidAppleTeamIdError>()(
|
||||
"InvalidAppleTeamIdError",
|
||||
{
|
||||
teamId: Schema.String,
|
||||
@@ -1158,7 +1158,7 @@ export class InvalidAppleTeamIdError extends Schema.TaggedErrorClass<InvalidAppl
|
||||
}
|
||||
}
|
||||
|
||||
export class MissingMacPasskeyProvisioningProfileError extends Schema.TaggedErrorClass<MissingMacPasskeyProvisioningProfileError>()(
|
||||
export class MissingMacPasskeyProvisioningProfileError extends Schema.TaggedError<MissingMacPasskeyProvisioningProfileError>()(
|
||||
"MissingMacPasskeyProvisioningProfileError",
|
||||
{},
|
||||
) {
|
||||
@@ -1167,7 +1167,7 @@ export class MissingMacPasskeyProvisioningProfileError extends Schema.TaggedErro
|
||||
}
|
||||
}
|
||||
|
||||
export class MissingMacPasskeyDomainConfigurationError extends Schema.TaggedErrorClass<MissingMacPasskeyDomainConfigurationError>()(
|
||||
export class MissingMacPasskeyDomainConfigurationError extends Schema.TaggedError<MissingMacPasskeyDomainConfigurationError>()(
|
||||
"MissingMacPasskeyDomainConfigurationError",
|
||||
{},
|
||||
) {
|
||||
@@ -1176,7 +1176,7 @@ export class MissingMacPasskeyDomainConfigurationError extends Schema.TaggedErro
|
||||
}
|
||||
}
|
||||
|
||||
export class InvalidMacPasskeyPublishableKeyError extends Schema.TaggedErrorClass<InvalidMacPasskeyPublishableKeyError>()(
|
||||
export class InvalidMacPasskeyPublishableKeyError extends Schema.TaggedError<InvalidMacPasskeyPublishableKeyError>()(
|
||||
"InvalidMacPasskeyPublishableKeyError",
|
||||
{
|
||||
cause: Schema.Defect(),
|
||||
@@ -1187,7 +1187,7 @@ export class InvalidMacPasskeyPublishableKeyError extends Schema.TaggedErrorClas
|
||||
}
|
||||
}
|
||||
|
||||
export class MissingMacPasskeyRpDomainError extends Schema.TaggedErrorClass<MissingMacPasskeyRpDomainError>()(
|
||||
export class MissingMacPasskeyRpDomainError extends Schema.TaggedError<MissingMacPasskeyRpDomainError>()(
|
||||
"MissingMacPasskeyRpDomainError",
|
||||
{},
|
||||
) {
|
||||
|
||||
@@ -17,7 +17,7 @@ import * as Path from "effect/Path";
|
||||
import * as PlatformError from "effect/PlatformError";
|
||||
import * as Sink from "effect/Sink";
|
||||
import * as Stream from "effect/Stream";
|
||||
import { ChildProcessSpawner } from "effect/unstable/process";
|
||||
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
|
||||
|
||||
import {
|
||||
checkPortAvailabilityOnHosts,
|
||||
@@ -74,6 +74,20 @@ const devServerInput = {
|
||||
} as const;
|
||||
|
||||
it.layer(NodeServices.layer)("dev-runner", (it) => {
|
||||
it.effect("accepts a dry run without the optional browser flag", () =>
|
||||
Effect.gen(function* () {
|
||||
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
|
||||
const path = yield* Path.Path;
|
||||
const output = yield* spawner.string(
|
||||
ChildProcess.make(process.execPath, ["scripts/dev-runner.ts", "dev", "--dry-run"], {
|
||||
cwd: path.resolve(import.meta.dirname, ".."),
|
||||
}),
|
||||
);
|
||||
|
||||
assert.include(output, "[dev-runner] mode=dev");
|
||||
}),
|
||||
);
|
||||
|
||||
describe("getDevRunnerModeArgs", () => {
|
||||
it.effect("lets Vite+ honor the desktop dev task graph", () =>
|
||||
Effect.sync(() => {
|
||||
|
||||
@@ -106,7 +106,7 @@ export function isBrowserAllowedPort(port: number): boolean {
|
||||
return !FETCH_BAD_PORTS.has(port);
|
||||
}
|
||||
|
||||
export class DevRunnerConfigurationError extends Schema.TaggedErrorClass<DevRunnerConfigurationError>()(
|
||||
export class DevRunnerConfigurationError extends Schema.TaggedError<DevRunnerConfigurationError>()(
|
||||
"DevRunnerConfigurationError",
|
||||
{
|
||||
configKeys: Schema.Array(Schema.String),
|
||||
@@ -118,7 +118,7 @@ export class DevRunnerConfigurationError extends Schema.TaggedErrorClass<DevRunn
|
||||
}
|
||||
}
|
||||
|
||||
export class DevRunnerInvalidPortOffsetError extends Schema.TaggedErrorClass<DevRunnerInvalidPortOffsetError>()(
|
||||
export class DevRunnerInvalidPortOffsetError extends Schema.TaggedError<DevRunnerInvalidPortOffsetError>()(
|
||||
"DevRunnerInvalidPortOffsetError",
|
||||
{
|
||||
configKey: Schema.Literal("T3CODE_PORT_OFFSET"),
|
||||
@@ -131,7 +131,7 @@ export class DevRunnerInvalidPortOffsetError extends Schema.TaggedErrorClass<Dev
|
||||
}
|
||||
}
|
||||
|
||||
export class DevRunnerPortExhaustedError extends Schema.TaggedErrorClass<DevRunnerPortExhaustedError>()(
|
||||
export class DevRunnerPortExhaustedError extends Schema.TaggedError<DevRunnerPortExhaustedError>()(
|
||||
"DevRunnerPortExhaustedError",
|
||||
{
|
||||
startOffset: Schema.Number,
|
||||
@@ -147,7 +147,7 @@ export class DevRunnerPortExhaustedError extends Schema.TaggedErrorClass<DevRunn
|
||||
}
|
||||
}
|
||||
|
||||
export class DevRunnerProcessError extends Schema.TaggedErrorClass<DevRunnerProcessError>()(
|
||||
export class DevRunnerProcessError extends Schema.TaggedError<DevRunnerProcessError>()(
|
||||
"DevRunnerProcessError",
|
||||
{
|
||||
operation: Schema.Literals(["spawn", "wait-for-exit"]),
|
||||
@@ -163,7 +163,7 @@ export class DevRunnerProcessError extends Schema.TaggedErrorClass<DevRunnerProc
|
||||
}
|
||||
}
|
||||
|
||||
export class DevRunnerProcessExitError extends Schema.TaggedErrorClass<DevRunnerProcessExitError>()(
|
||||
export class DevRunnerProcessExitError extends Schema.TaggedError<DevRunnerProcessExitError>()(
|
||||
"DevRunnerProcessExitError",
|
||||
{
|
||||
mode: Schema.Literals(["dev", "dev:server", "dev:web", "dev:desktop"]),
|
||||
@@ -178,7 +178,7 @@ export class DevRunnerProcessExitError extends Schema.TaggedErrorClass<DevRunner
|
||||
}
|
||||
}
|
||||
|
||||
export class DevRunnerHostNotProxiableError extends Schema.TaggedErrorClass<DevRunnerHostNotProxiableError>()(
|
||||
export class DevRunnerHostNotProxiableError extends Schema.TaggedError<DevRunnerHostNotProxiableError>()(
|
||||
"DevRunnerHostNotProxiableError",
|
||||
{
|
||||
mode: Schema.Literals(["dev", "dev:web"]),
|
||||
@@ -867,6 +867,7 @@ const devRunnerCli = Command.make("dev-runner", {
|
||||
),
|
||||
browser: Flag.boolean("browser").pipe(
|
||||
Flag.withDescription("Open a browser automatically (disabled by default for web dev)."),
|
||||
Flag.withDefault(false),
|
||||
),
|
||||
autoBootstrapProjectFromCwd: Flag.boolean("auto-bootstrap-project-from-cwd").pipe(
|
||||
Flag.withDescription(
|
||||
|
||||
@@ -41,7 +41,7 @@ const OUTPUT_DIRECTORY = "apps/mobile/assets";
|
||||
// Production has no background artwork, so its splash composes onto the adaptive color.
|
||||
const PRODUCTION_BACKGROUND_COLOR = "#000000";
|
||||
|
||||
export class AndroidIconRenderError extends Schema.TaggedErrorClass<AndroidIconRenderError>()(
|
||||
export class AndroidIconRenderError extends Schema.TaggedError<AndroidIconRenderError>()(
|
||||
"AndroidIconRenderError",
|
||||
{ layer: Schema.String, cause: Schema.Defect() },
|
||||
) {}
|
||||
|
||||
@@ -73,7 +73,7 @@ interface CommandResult {
|
||||
readonly exitCode: number;
|
||||
}
|
||||
|
||||
export class IconExportFileSystemError extends Schema.TaggedErrorClass<IconExportFileSystemError>()(
|
||||
export class IconExportFileSystemError extends Schema.TaggedError<IconExportFileSystemError>()(
|
||||
"IconExportFileSystemError",
|
||||
{
|
||||
operation: Schema.Literals([
|
||||
@@ -96,7 +96,7 @@ export class IconExportFileSystemError extends Schema.TaggedErrorClass<IconExpor
|
||||
}
|
||||
}
|
||||
|
||||
export class IconExportProcessError extends Schema.TaggedErrorClass<IconExportProcessError>()(
|
||||
export class IconExportProcessError extends Schema.TaggedError<IconExportProcessError>()(
|
||||
"IconExportProcessError",
|
||||
{
|
||||
operation: Schema.Literals(["spawn", "collect-stdout", "collect-stderr", "wait-for-exit"]),
|
||||
@@ -110,7 +110,7 @@ export class IconExportProcessError extends Schema.TaggedErrorClass<IconExportPr
|
||||
}
|
||||
}
|
||||
|
||||
export class IconExportCommandFailedError extends Schema.TaggedErrorClass<IconExportCommandFailedError>()(
|
||||
export class IconExportCommandFailedError extends Schema.TaggedError<IconExportCommandFailedError>()(
|
||||
"IconExportCommandFailedError",
|
||||
{
|
||||
command: Schema.String,
|
||||
@@ -127,7 +127,7 @@ export class IconExportCommandFailedError extends Schema.TaggedErrorClass<IconEx
|
||||
}
|
||||
}
|
||||
|
||||
export class IconExportToolResolutionError extends Schema.TaggedErrorClass<IconExportToolResolutionError>()(
|
||||
export class IconExportToolResolutionError extends Schema.TaggedError<IconExportToolResolutionError>()(
|
||||
"IconExportToolResolutionError",
|
||||
{
|
||||
reason: Schema.Literals(["configured-invalid", "configured-outdated", "not-found"]),
|
||||
@@ -148,7 +148,7 @@ export class IconExportToolResolutionError extends Schema.TaggedErrorClass<IconE
|
||||
}
|
||||
}
|
||||
|
||||
export class IconExportSourceMissingError extends Schema.TaggedErrorClass<IconExportSourceMissingError>()(
|
||||
export class IconExportSourceMissingError extends Schema.TaggedError<IconExportSourceMissingError>()(
|
||||
"IconExportSourceMissingError",
|
||||
{
|
||||
sourcePath: Schema.String,
|
||||
@@ -159,7 +159,7 @@ export class IconExportSourceMissingError extends Schema.TaggedErrorClass<IconEx
|
||||
}
|
||||
}
|
||||
|
||||
export class IconExportRenditionError extends Schema.TaggedErrorClass<IconExportRenditionError>()(
|
||||
export class IconExportRenditionError extends Schema.TaggedError<IconExportRenditionError>()(
|
||||
"IconExportRenditionError",
|
||||
{
|
||||
sourcePath: Schema.String,
|
||||
@@ -179,7 +179,7 @@ export class IconExportRenditionError extends Schema.TaggedErrorClass<IconExport
|
||||
}
|
||||
}
|
||||
|
||||
export class IconExportEncodingError extends Schema.TaggedErrorClass<IconExportEncodingError>()(
|
||||
export class IconExportEncodingError extends Schema.TaggedError<IconExportEncodingError>()(
|
||||
"IconExportEncodingError",
|
||||
{
|
||||
variant: Schema.String,
|
||||
@@ -191,7 +191,7 @@ export class IconExportEncodingError extends Schema.TaggedErrorClass<IconExportE
|
||||
}
|
||||
}
|
||||
|
||||
export class IconExportAssetsStaleError extends Schema.TaggedErrorClass<IconExportAssetsStaleError>()(
|
||||
export class IconExportAssetsStaleError extends Schema.TaggedError<IconExportAssetsStaleError>()(
|
||||
"IconExportAssetsStaleError",
|
||||
{
|
||||
paths: Schema.Array(Schema.String),
|
||||
|
||||
@@ -75,7 +75,7 @@ it("allows types and schemas through the real Knip CLI without hiding runtime or
|
||||
export default Text;
|
||||
export const Record = S.Struct({ name: Text }).annotate({ title: "record" });
|
||||
export const Branded = S.String.pipe(S.brand("Name"));
|
||||
export class Failure extends S.TaggedErrorClass<Failure>()("Failure", { reason: Text }) {}
|
||||
export class Failure extends S.TaggedError<Failure>()("Failure", { reason: Text }) {}
|
||||
export class Person extends S.Class<Person>("Person")({ name: Text }) {}
|
||||
export type UnusedType = { name: string };
|
||||
export interface UnusedInterface { name: string }
|
||||
|
||||
@@ -55,7 +55,7 @@ const explainCommandFailure = (error: TailscaleCommandError): string | undefined
|
||||
* Each wraps a real underlying failure and so keeps it as `cause`; the message
|
||||
* is derived only from the structural fields, never from `cause.message`.
|
||||
*/
|
||||
export class TailscaleUnavailableError extends Schema.TaggedErrorClass<TailscaleUnavailableError>()(
|
||||
export class TailscaleUnavailableError extends Schema.TaggedError<TailscaleUnavailableError>()(
|
||||
"TailscaleUnavailableError",
|
||||
{ cause: Schema.Defect() },
|
||||
) {
|
||||
@@ -69,7 +69,7 @@ export class TailscaleUnavailableError extends Schema.TaggedErrorClass<Tailscale
|
||||
}
|
||||
|
||||
/** No underlying failure: the status read succeeded and simply had no name. */
|
||||
export class TailnetNameMissingError extends Schema.TaggedErrorClass<TailnetNameMissingError>()(
|
||||
export class TailnetNameMissingError extends Schema.TaggedError<TailnetNameMissingError>()(
|
||||
"TailnetNameMissingError",
|
||||
{},
|
||||
) {
|
||||
@@ -87,7 +87,7 @@ export class TailnetNameMissingError extends Schema.TaggedErrorClass<TailnetName
|
||||
* semantics (a `tailscale serve` invocation failed for this port) and differ
|
||||
* only in which one, which the message states plainly.
|
||||
*/
|
||||
export class DevServeFailedError extends Schema.TaggedErrorClass<DevServeFailedError>()(
|
||||
export class DevServeFailedError extends Schema.TaggedError<DevServeFailedError>()(
|
||||
"DevServeFailedError",
|
||||
{
|
||||
stage: Schema.Literals(["clear-existing", "serve"]),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as Schema from "effect/Schema";
|
||||
|
||||
class CatalogDependencyResolutionError extends Schema.TaggedErrorClass<CatalogDependencyResolutionError>()(
|
||||
class CatalogDependencyResolutionError extends Schema.TaggedError<CatalogDependencyResolutionError>()(
|
||||
"CatalogDependencyResolutionError",
|
||||
{
|
||||
workspacePackage: Schema.String,
|
||||
|
||||
@@ -19,7 +19,7 @@ interface NativeStaticTool {
|
||||
|
||||
const NonNegativeInt = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0));
|
||||
|
||||
export class NativeStaticCheckSourceDiscoveryError extends Schema.TaggedErrorClass<NativeStaticCheckSourceDiscoveryError>()(
|
||||
export class NativeStaticCheckSourceDiscoveryError extends Schema.TaggedError<NativeStaticCheckSourceDiscoveryError>()(
|
||||
"NativeStaticCheckSourceDiscoveryError",
|
||||
{
|
||||
operation: Schema.Literals(["resolve-root", "read-directory", "stat-entry"]),
|
||||
@@ -32,7 +32,7 @@ export class NativeStaticCheckSourceDiscoveryError extends Schema.TaggedErrorCla
|
||||
}
|
||||
}
|
||||
|
||||
export class NativeStaticCheckProcessError extends Schema.TaggedErrorClass<NativeStaticCheckProcessError>()(
|
||||
export class NativeStaticCheckProcessError extends Schema.TaggedError<NativeStaticCheckProcessError>()(
|
||||
"NativeStaticCheckProcessError",
|
||||
{
|
||||
operation: Schema.Literals(["spawn", "wait-for-exit"]),
|
||||
@@ -48,7 +48,7 @@ export class NativeStaticCheckProcessError extends Schema.TaggedErrorClass<Nativ
|
||||
}
|
||||
}
|
||||
|
||||
export class NativeStaticCheckCommandError extends Schema.TaggedErrorClass<NativeStaticCheckCommandError>()(
|
||||
export class NativeStaticCheckCommandError extends Schema.TaggedError<NativeStaticCheckCommandError>()(
|
||||
"NativeStaticCheckCommandError",
|
||||
{
|
||||
command: Schema.String,
|
||||
|
||||
@@ -65,7 +65,7 @@ const discordReleaseErrorContext = {
|
||||
hasRoleMentionSyntax: Schema.Boolean,
|
||||
};
|
||||
|
||||
export class DiscordReleaseWebhookRequestError extends Schema.TaggedErrorClass<DiscordReleaseWebhookRequestError>()(
|
||||
export class DiscordReleaseWebhookRequestError extends Schema.TaggedError<DiscordReleaseWebhookRequestError>()(
|
||||
"DiscordReleaseWebhookRequestError",
|
||||
{
|
||||
...discordReleaseErrorContext,
|
||||
@@ -77,7 +77,7 @@ export class DiscordReleaseWebhookRequestError extends Schema.TaggedErrorClass<D
|
||||
}
|
||||
}
|
||||
|
||||
export class DiscordReleaseWebhookResponseError extends Schema.TaggedErrorClass<DiscordReleaseWebhookResponseError>()(
|
||||
export class DiscordReleaseWebhookResponseError extends Schema.TaggedError<DiscordReleaseWebhookResponseError>()(
|
||||
"DiscordReleaseWebhookResponseError",
|
||||
{
|
||||
...discordReleaseErrorContext,
|
||||
|
||||
@@ -29,7 +29,7 @@ const DesktopPackageJsonSchema = Schema.Struct({
|
||||
version: Schema.NonEmptyString,
|
||||
});
|
||||
|
||||
export class InvalidDesktopPackageVersionError extends Schema.TaggedErrorClass<InvalidDesktopPackageVersionError>()(
|
||||
export class InvalidDesktopPackageVersionError extends Schema.TaggedError<InvalidDesktopPackageVersionError>()(
|
||||
"InvalidDesktopPackageVersionError",
|
||||
{
|
||||
version: Schema.String,
|
||||
@@ -40,7 +40,7 @@ export class InvalidDesktopPackageVersionError extends Schema.TaggedErrorClass<I
|
||||
}
|
||||
}
|
||||
|
||||
export class NightlyReleaseDesktopPackageError extends Schema.TaggedErrorClass<NightlyReleaseDesktopPackageError>()(
|
||||
export class NightlyReleaseDesktopPackageError extends Schema.TaggedError<NightlyReleaseDesktopPackageError>()(
|
||||
"NightlyReleaseDesktopPackageError",
|
||||
{
|
||||
operation: Schema.Literals(["read", "decode"]),
|
||||
@@ -53,7 +53,7 @@ export class NightlyReleaseDesktopPackageError extends Schema.TaggedErrorClass<N
|
||||
}
|
||||
}
|
||||
|
||||
export class NightlyReleaseGitHubOutputConfigError extends Schema.TaggedErrorClass<NightlyReleaseGitHubOutputConfigError>()(
|
||||
export class NightlyReleaseGitHubOutputConfigError extends Schema.TaggedError<NightlyReleaseGitHubOutputConfigError>()(
|
||||
"NightlyReleaseGitHubOutputConfigError",
|
||||
{
|
||||
cause: Schema.Defect(),
|
||||
@@ -64,7 +64,7 @@ export class NightlyReleaseGitHubOutputConfigError extends Schema.TaggedErrorCla
|
||||
}
|
||||
}
|
||||
|
||||
export class NightlyReleaseGitHubOutputAppendError extends Schema.TaggedErrorClass<NightlyReleaseGitHubOutputAppendError>()(
|
||||
export class NightlyReleaseGitHubOutputAppendError extends Schema.TaggedError<NightlyReleaseGitHubOutputAppendError>()(
|
||||
"NightlyReleaseGitHubOutputAppendError",
|
||||
{
|
||||
outputPath: Schema.String,
|
||||
|
||||
@@ -14,7 +14,7 @@ import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
|
||||
const ReleaseChannel = Schema.Literals(["stable", "nightly"]);
|
||||
type ReleaseChannel = typeof ReleaseChannel.Type;
|
||||
|
||||
export class InvalidReleaseTagError extends Schema.TaggedErrorClass<InvalidReleaseTagError>()(
|
||||
export class InvalidReleaseTagError extends Schema.TaggedError<InvalidReleaseTagError>()(
|
||||
"InvalidReleaseTagError",
|
||||
{
|
||||
channel: ReleaseChannel,
|
||||
@@ -34,7 +34,7 @@ const releaseTagListProcessContext = {
|
||||
cwd: Schema.String,
|
||||
};
|
||||
|
||||
export class ReleaseTagListProcessError extends Schema.TaggedErrorClass<ReleaseTagListProcessError>()(
|
||||
export class ReleaseTagListProcessError extends Schema.TaggedError<ReleaseTagListProcessError>()(
|
||||
"ReleaseTagListProcessError",
|
||||
{
|
||||
...releaseTagListProcessContext,
|
||||
@@ -47,7 +47,7 @@ export class ReleaseTagListProcessError extends Schema.TaggedErrorClass<ReleaseT
|
||||
}
|
||||
}
|
||||
|
||||
export class ReleaseTagListProcessExitError extends Schema.TaggedErrorClass<ReleaseTagListProcessExitError>()(
|
||||
export class ReleaseTagListProcessExitError extends Schema.TaggedError<ReleaseTagListProcessExitError>()(
|
||||
"ReleaseTagListProcessExitError",
|
||||
{
|
||||
...releaseTagListProcessContext,
|
||||
@@ -61,7 +61,7 @@ export class ReleaseTagListProcessExitError extends Schema.TaggedErrorClass<Rele
|
||||
}
|
||||
}
|
||||
|
||||
export class PreviousReleaseTagGitHubOutputConfigError extends Schema.TaggedErrorClass<PreviousReleaseTagGitHubOutputConfigError>()(
|
||||
export class PreviousReleaseTagGitHubOutputConfigError extends Schema.TaggedError<PreviousReleaseTagGitHubOutputConfigError>()(
|
||||
"PreviousReleaseTagGitHubOutputConfigError",
|
||||
{
|
||||
cause: Schema.Defect(),
|
||||
@@ -72,7 +72,7 @@ export class PreviousReleaseTagGitHubOutputConfigError extends Schema.TaggedErro
|
||||
}
|
||||
}
|
||||
|
||||
export class PreviousReleaseTagGitHubOutputAppendError extends Schema.TaggedErrorClass<PreviousReleaseTagGitHubOutputAppendError>()(
|
||||
export class PreviousReleaseTagGitHubOutputAppendError extends Schema.TaggedError<PreviousReleaseTagGitHubOutputAppendError>()(
|
||||
"PreviousReleaseTagGitHubOutputAppendError",
|
||||
{
|
||||
outputPath: Schema.String,
|
||||
|
||||
@@ -31,7 +31,7 @@ export interface ReferenceRepoSyncPlan {
|
||||
readonly args: ReadonlyArray<string>;
|
||||
}
|
||||
|
||||
export class ReferenceRepoSelectionError extends Schema.TaggedErrorClass<ReferenceRepoSelectionError>()(
|
||||
export class ReferenceRepoSelectionError extends Schema.TaggedError<ReferenceRepoSelectionError>()(
|
||||
"ReferenceRepoSelectionError",
|
||||
{
|
||||
repoId: Schema.String,
|
||||
@@ -43,7 +43,7 @@ export class ReferenceRepoSelectionError extends Schema.TaggedErrorClass<Referen
|
||||
}
|
||||
}
|
||||
|
||||
export class ReferenceRepoVersionSourceError extends Schema.TaggedErrorClass<ReferenceRepoVersionSourceError>()(
|
||||
export class ReferenceRepoVersionSourceError extends Schema.TaggedError<ReferenceRepoVersionSourceError>()(
|
||||
"ReferenceRepoVersionSourceError",
|
||||
{
|
||||
operation: Schema.Literals(["read", "parse"]),
|
||||
@@ -57,7 +57,7 @@ export class ReferenceRepoVersionSourceError extends Schema.TaggedErrorClass<Ref
|
||||
}
|
||||
}
|
||||
|
||||
export class ReferenceRepoVersionResolutionError extends Schema.TaggedErrorClass<ReferenceRepoVersionResolutionError>()(
|
||||
export class ReferenceRepoVersionResolutionError extends Schema.TaggedError<ReferenceRepoVersionResolutionError>()(
|
||||
"ReferenceRepoVersionResolutionError",
|
||||
{
|
||||
repoId: Schema.String,
|
||||
@@ -70,7 +70,7 @@ export class ReferenceRepoVersionResolutionError extends Schema.TaggedErrorClass
|
||||
}
|
||||
}
|
||||
|
||||
export class ReferenceRepoGitSubtreeError extends Schema.TaggedErrorClass<ReferenceRepoGitSubtreeError>()(
|
||||
export class ReferenceRepoGitSubtreeError extends Schema.TaggedError<ReferenceRepoGitSubtreeError>()(
|
||||
"ReferenceRepoGitSubtreeError",
|
||||
{
|
||||
operation: Schema.Literals(["spawn", "communicate", "exit"]),
|
||||
|
||||
@@ -12,7 +12,7 @@ import * as Schema from "effect/Schema";
|
||||
import { Argument, Command, Flag } from "effect/unstable/cli";
|
||||
import { fromJsonStringPretty } from "@t3tools/shared/schemaJson";
|
||||
|
||||
export class ReleasePackageManifestError extends Schema.TaggedErrorClass<ReleasePackageManifestError>()(
|
||||
export class ReleasePackageManifestError extends Schema.TaggedError<ReleasePackageManifestError>()(
|
||||
"ReleasePackageManifestError",
|
||||
{
|
||||
operation: Schema.Literals(["read", "decode", "encode", "write"]),
|
||||
@@ -25,7 +25,7 @@ export class ReleasePackageManifestError extends Schema.TaggedErrorClass<Release
|
||||
}
|
||||
}
|
||||
|
||||
export class ReleaseGitHubOutputConfigurationError extends Schema.TaggedErrorClass<ReleaseGitHubOutputConfigurationError>()(
|
||||
export class ReleaseGitHubOutputConfigurationError extends Schema.TaggedError<ReleaseGitHubOutputConfigurationError>()(
|
||||
"ReleaseGitHubOutputConfigurationError",
|
||||
{ cause: Schema.Defect() },
|
||||
) {
|
||||
@@ -34,7 +34,7 @@ export class ReleaseGitHubOutputConfigurationError extends Schema.TaggedErrorCla
|
||||
}
|
||||
}
|
||||
|
||||
export class ReleaseGitHubOutputWriteError extends Schema.TaggedErrorClass<ReleaseGitHubOutputWriteError>()(
|
||||
export class ReleaseGitHubOutputWriteError extends Schema.TaggedError<ReleaseGitHubOutputWriteError>()(
|
||||
"ReleaseGitHubOutputWriteError",
|
||||
{
|
||||
filePath: Schema.String,
|
||||
|
||||
Reference in new issue
Block a user