Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup-vp/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ runs:
echo "vite-plus-version=${version}" >> "$GITHUB_OUTPUT"

- name: Set up Vite+
uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1.15.0
uses: voidzero-dev/setup-vp@3754dd7dbdb32bd8f6d28b6043de13ad3a75f21f # v1.21.1
with:
version: ${{ steps.versions.outputs.vite-plus-version }}
node-version-file: ${{ inputs.node-version-file }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/backfill-release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
echo "vite-plus-version=${version}" >> "$GITHUB_OUTPUT"

- name: Set up Vite+
uses: voidzero-dev/setup-vp@1b32467adbe183473499fd9d5d372c3ed9641754 # v1.18.0
uses: voidzero-dev/setup-vp@3754dd7dbdb32bd8f6d28b6043de13ad3a75f21f # v1.21.1
with:
version: ${{ steps.tool-versions.outputs.vite-plus-version }}
node-version-file: ".node-version"
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
echo "vite-plus-version=${version}" >> "$GITHUB_OUTPUT"

- name: Set up Vite+
uses: voidzero-dev/setup-vp@1b32467adbe183473499fd9d5d372c3ed9641754 # v1.18.0
uses: voidzero-dev/setup-vp@3754dd7dbdb32bd8f6d28b6043de13ad3a75f21f # v1.21.1
with:
version: ${{ steps.tool-versions.outputs.vite-plus-version }}
node-version-file: ".node-version"
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ touches, and search `node_modules/effect/src` for anything it does not cover.
## Testing

- Prefer in-process tests unless the process boundary is the behavior under test.
- Add command-path coverage when the `effect/unstable/cli` command boundary changes.
- Add command-path coverage when the `effect/cli` command boundary changes.
- Prove command-surface changes with the built binary.
- Finish in-scope edits, guardrails, and fixes without pausing; ask before publishing, credential-bearing release or SEA builds, and live writes against shared accounts.

Expand Down
2 changes: 1 addition & 1 deletion docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The CLI is agent-first and Effect-native.

## Principles

- Thin Effect CLI command adapters from `effect/unstable/cli`
- Thin Effect CLI command adapters from `effect/cli`
- Explicit services and layers for runtime, output, config, state, SDK access, and workflows
- Schema-backed request and response boundaries
- Tagged errors for recoverable failures
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@
"verify": "node ./scripts/check-architecture.mts && knip && vp check . && vp run skills:lint && vp run smoke:pack && vp test run --coverage"
},
"dependencies": {
"@effect/platform-node": "4.0.0-rc.109",
"@effect/platform-node-shared": "4.0.0-rc.109",
"@effect/platform-node": "4.0.0-rc.118",
"@effect/platform-node-shared": "4.0.0-rc.118",
"@sentry/core": "10.70.0",
"cli-table3": "^0.6.5",
"effect": "4.0.0-rc.109",
"effect": "4.0.0-rc.118",
"i18next": "^26.3.4"
},
"devDependencies": {
"@effect/vitest": "4.0.0-rc.109",
"@effect/vitest": "4.0.0-rc.118",
"@putdotio/sdk": "11.4.2",
"@types/node": "^26.1.0",
"@uinaf/skillcheck": "0.4.0",
Expand Down
1,316 changes: 613 additions & 703 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

28 changes: 19 additions & 9 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
overrides:
effect: 4.0.0-rc.109
effect: 4.0.0-rc.118
vite: "catalog:"
vitest: "catalog:"

Expand All @@ -14,18 +14,28 @@ allowBuilds:
sharp: false

minimumReleaseAgeExclude:
- "@effect/platform-node-shared@4.0.0-rc.109"
- "@effect/platform-node@4.0.0-rc.109"
- "@effect/vitest@4.0.0-rc.109"
- effect@4.0.0-rc.109
- "@effect/platform-node-shared@4.0.0-rc.118"
- "@effect/platform-node@4.0.0-rc.118"
- "@effect/vitest@4.0.0-rc.118"
- effect@4.0.0-rc.118
- knip@6.31.0
- "@uinaf/skillcheck@0.4.0"
- "@putdotio/sdk@11.4.2"
- "@voidzero-dev/vite-plus-core@1.0.0"
- "@voidzero-dev/vite-plus-darwin-arm64@1.0.0"
- "@voidzero-dev/vite-plus-darwin-x64@1.0.0"
- "@voidzero-dev/vite-plus-linux-arm64-gnu@1.0.0"
- "@voidzero-dev/vite-plus-linux-arm64-musl@1.0.0"
- "@voidzero-dev/vite-plus-linux-x64-gnu@1.0.0"
- "@voidzero-dev/vite-plus-linux-x64-musl@1.0.0"
- "@voidzero-dev/vite-plus-win32-arm64-msvc@1.0.0"
- "@voidzero-dev/vite-plus-win32-x64-msvc@1.0.0"
- vite-plus@1.0.0
catalog:
vite: npm:@voidzero-dev/vite-plus-core@0.2.9
vitest: 4.1.10
"@vitest/coverage-v8": 4.1.10
vite-plus: 0.2.9
vite: npm:@voidzero-dev/vite-plus-core@1.0.0
vitest: 5.0.1
"@vitest/coverage-v8": 5.0.1
vite-plus: 1.0.0
peerDependencyRules:
allowAny:
- vite
Expand Down
4 changes: 2 additions & 2 deletions scripts/smoke-packed-install.mts
Original file line number Diff line number Diff line change
Expand Up @@ -702,8 +702,8 @@ try {
entry.version === undefined ? [] : [entry.version],
);
assert(
effectVersions.length === 1 && effectVersions[0] === "4.0.0-rc.109",
`Expected the package to install one Effect 4.0.0-rc.109 runtime, received ${effectVersions.join(", ")}.`,
effectVersions.length === 1 && effectVersions[0] === "4.0.0-rc.118",
`Expected the package to install one Effect 4.0.0-rc.118 runtime, received ${effectVersions.join(", ")}.`,
);

const mockApi = startMockApi();
Expand Down
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CliError, Command } from "effect/unstable/cli";
import { CliError, Command } from "effect/cli";
import { Console, Effect, Result } from "effect";
import packageJson from "../package.json";

Expand Down
6 changes: 3 additions & 3 deletions src/commands/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Argument, Command } from "effect/unstable/cli";
import { Argument, Command } from "effect/cli";
import * as Terminal from "effect/Terminal";
import { Cause, Console, Effect, Fiber, Option, Queue, Schema } from "effect";

Expand Down Expand Up @@ -69,8 +69,8 @@ const openOption = openConfig.option;
const timeoutSecondsOption = timeoutSecondsConfig.option;
const previewCodeOption = previewCodeConfig.option;
const profileOption = profileConfig.option;
const profileArgument = Argument.string("profile");
const approveCodeArgument = Argument.string("code").pipe(Argument.optional);
const profileArgument = Argument.String("profile");
const approveCodeArgument = Argument.String("code").pipe(Argument.optional);
const profileCommandArgument = stringArgument("profile", {
description: AUTH_PROFILE_NAME_DESCRIPTION,
required: true,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/brand.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Command } from "effect/unstable/cli";
import { Command } from "effect/cli";

import packageJson from "../../package.json";

Expand Down
2 changes: 1 addition & 1 deletion src/commands/download-links.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Command } from "effect/unstable/cli";
import { Command } from "effect/cli";
import { DownloadLinksCreateInputSchema } from "@putdotio/sdk";
import { Data, Effect, Option, Schema } from "effect";

Expand Down
2 changes: 1 addition & 1 deletion src/commands/events.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Command } from "effect/unstable/cli";
import { Command } from "effect/cli";
import { Effect, Option } from "effect";

import {
Expand Down
8 changes: 4 additions & 4 deletions src/commands/files.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Argument, Command } from "effect/unstable/cli";
import { Argument, Command } from "effect/cli";
import { Effect, Option, Schema } from "effect";

import {
Expand Down Expand Up @@ -97,10 +97,10 @@ const optionalFileIdOption = optionalFileIdConfig.option;
const optionalFileNameOption = optionalFileNameConfig.option;
const uploadPathOption = uploadPathConfig.option;
const uploadFileNameOption = uploadFileNameConfig.option;
const hlsFileIdArgument = Argument.integer("file-id");
const startFromFileIdArgument = Argument.integer("file-id");
const hlsFileIdArgument = Argument.Int("file-id");
const startFromFileIdArgument = Argument.Int("file-id");
const optionalStartFromFileIdArgument = startFromFileIdArgument.pipe(Argument.optional);
const optionalStartFromTimeArgument = Argument.integer("seconds").pipe(Argument.optional);
const optionalStartFromTimeArgument = Argument.Int("seconds").pipe(Argument.optional);

const NonBlankStringSchema = Schema.String.check(
Schema.makeFilter((value) =>
Expand Down
2 changes: 1 addition & 1 deletion src/commands/sdk.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Command } from "effect/unstable/cli";
import { Command } from "effect/cli";
import { Console, Effect, Schema } from "effect";

import { translate } from "../i18n/index.js";
Expand Down
2 changes: 1 addition & 1 deletion src/commands/telemetry.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Command } from "effect/unstable/cli";
import { Command } from "effect/cli";
import { Effect } from "effect";

import { translate } from "../i18n/index.js";
Expand Down
2 changes: 1 addition & 1 deletion src/commands/transfers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Command, Flag } from "effect/unstable/cli";
import { Command, Flag } from "effect/cli";
import { TransferAddInputSchema } from "@putdotio/sdk";
import { Clock, Duration, Effect, Option, Schema } from "effect";

Expand Down
2 changes: 1 addition & 1 deletion src/commands/whoami.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Command } from "effect/unstable/cli";
import { Command } from "effect/cli";
import { Effect } from "effect";

import { translate } from "../i18n/index.js";
Expand Down
34 changes: 17 additions & 17 deletions src/internal/command.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Flag } from "effect/unstable/cli";
import { Flag } from "effect/cli";
import { Data, Effect, Option, Schema } from "effect";

import type { ResolvedAuthState } from "./state.js";
Expand All @@ -23,13 +23,13 @@ import { CliRuntime } from "./runtime.js";
import { CliSdk, sdk } from "./sdk.js";
import { resolveAuthState } from "./state.js";

export const outputOption = Flag.choice("output", ["json", "text", "ndjson"] as const).pipe(
export const outputOption = Flag.Literals("output", ["json", "text", "ndjson"] as const).pipe(
Flag.optional,
);
export const dryRunOption = Flag.boolean("dry-run").pipe(Flag.withDefault(false));
export const fieldsOption = Flag.string("fields").pipe(Flag.optional);
export const jsonOption = Flag.string("json").pipe(Flag.optional);
export const pageAllOption = Flag.boolean("page-all").pipe(Flag.withDefault(false));
export const dryRunOption = Flag.Boolean("dry-run").pipe(Flag.withDefault(false));
export const fieldsOption = Flag.String("fields").pipe(Flag.optional);
export const jsonOption = Flag.String("json").pipe(Flag.optional);
export const pageAllOption = Flag.Boolean("page-all").pipe(Flag.withDefault(false));

export const defineBooleanOption = (
name: string,
Expand All @@ -40,8 +40,8 @@ export const defineBooleanOption = (
) => {
const option =
options.defaultValue === undefined
? Flag.boolean(name)
: Flag.boolean(name).pipe(Flag.withDefault(options.defaultValue));
? Flag.Boolean(name)
: Flag.Boolean(name).pipe(Flag.withDefault(options.defaultValue));

return {
flag: booleanFlag(name, options),
Expand Down Expand Up @@ -87,11 +87,11 @@ export function defineIntegerOption(
return options.optional === true
? {
flag,
option: Flag.integer(name).pipe(Flag.optional),
option: Flag.Int(name).pipe(Flag.optional),
}
: {
flag,
option: Flag.integer(name),
option: Flag.Int(name),
};
}

Expand Down Expand Up @@ -149,18 +149,18 @@ export function defineTextOption(
if (options.defaultValue !== undefined) {
return {
flag,
option: Flag.string(name).pipe(Flag.withDefault(options.defaultValue)),
option: Flag.String(name).pipe(Flag.withDefault(options.defaultValue)),
};
}

return options.optional === true
? {
flag,
option: Flag.string(name).pipe(Flag.optional),
option: Flag.String(name).pipe(Flag.optional),
}
: {
flag,
option: Flag.string(name),
option: Flag.String(name),
};
}

Expand Down Expand Up @@ -205,11 +205,11 @@ export function defineChoiceOption<const A extends ReadonlyArray<string>>(
return options.optional === true
? {
flag,
option: Flag.choice(name, choices).pipe(Flag.optional),
option: Flag.Literals(name, choices).pipe(Flag.optional),
}
: {
flag,
option: Flag.choice(name, choices),
option: Flag.Literals(name, choices),
};
}

Expand Down Expand Up @@ -403,7 +403,7 @@ export const parseRepeatedIntegers = (
};

const parseRepeatedIntegerOption = (name: string) =>
Flag.string(name).pipe(
Flag.String(name).pipe(
Flag.atLeast(0),
Flag.filterMap(parseRepeatedIntegers, () => `Expected \`--${name}\` values to be integers.`),
);
Expand All @@ -427,7 +427,7 @@ export const defineRepeatedTextOption = (
} = {},
) => ({
flag: repeatedStringFlag(name, options),
option: Flag.string(name).pipe(Flag.atLeast(0)),
option: Flag.String(name).pipe(Flag.atLeast(0)),
});

const mapInputError = (error: unknown, fallbackMessage: string) =>
Expand Down
2 changes: 1 addition & 1 deletion src/internal/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class CliConfig extends Context.Service<CliConfig, CliConfigService>()(
) {}

const optionalTrimmedString = (name: string) =>
Config.option(Config.string(name)).pipe(
Config.option(Config.String(name)).pipe(
Config.map((value) =>
Option.flatMap(value, (raw) => {
const trimmed = raw.trim();
Expand Down