@sequenceholdings/studio-cli 0.9.23 → 0.9.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +166 -146
- package/dist/access/commands.js +3 -5
- package/dist/access/principal.js +2 -2
- package/dist/access/tier-hosts.js +2 -2
- package/dist/agents/commands.d.ts +1 -1
- package/dist/agents/commands.js +9 -9
- package/dist/agents/scaffold.js +3 -3
- package/dist/agents/voice.d.ts +1 -1
- package/dist/agents/voice.js +1 -1
- package/dist/app/commands.d.ts +2 -2
- package/dist/app/commands.js +31 -21
- package/dist/app/deploy.d.ts +1 -1
- package/dist/app/deploy.js +1 -1
- package/dist/app/manifest.d.ts +9 -9
- package/dist/app/manifest.js +1 -1
- package/dist/app/prepare.js +1 -1
- package/dist/app/primitive-scaffold.js +1 -1
- package/dist/app/readme.js +6 -6
- package/dist/app/scaffold.js +1 -1
- package/dist/app/validate.d.ts +1 -1
- package/dist/app/workspace-scaffold.js +1 -1
- package/dist/app-preview/commands.d.ts +7 -0
- package/dist/app-preview/commands.js +264 -0
- package/dist/app-preview/fingerprint.d.ts +20 -0
- package/dist/app-preview/fingerprint.js +32 -0
- package/dist/app-preview/install.d.ts +31 -0
- package/dist/app-preview/install.js +53 -0
- package/dist/app-preview/namespace-probe.d.ts +13 -0
- package/dist/app-preview/namespace-probe.js +50 -0
- package/dist/app-preview/plan.d.ts +28 -0
- package/dist/app-preview/plan.js +41 -0
- package/dist/app-preview/run.d.ts +32 -0
- package/dist/app-preview/run.js +48 -0
- package/dist/app-preview/runners.d.ts +73 -0
- package/dist/app-preview/runners.js +226 -0
- package/dist/app-preview/secrets.d.ts +48 -0
- package/dist/app-preview/secrets.js +104 -0
- package/dist/app-preview/target.d.ts +28 -0
- package/dist/app-preview/target.js +62 -0
- package/dist/artifact/delegate.d.ts +1 -12
- package/dist/artifact/delegate.js +43 -124
- package/dist/artifact/sandbox.js +1 -1
- package/dist/auth-cmds/commands.js +1 -2
- package/dist/auth.js +1 -3
- package/dist/bin.js +12 -2
- package/dist/cli-attribution.d.ts +4 -0
- package/dist/cli-attribution.js +25 -3
- package/dist/cli-errors.d.ts +9 -1
- package/dist/cli-errors.js +20 -9
- package/dist/command-contract.d.ts +7 -182
- package/dist/command-contract.js +9 -33
- package/dist/command-help.d.ts +6 -6
- package/dist/command-help.js +31 -27
- package/dist/command-telemetry.js +2 -2
- package/dist/config-dir.d.ts +8 -0
- package/dist/config-dir.js +35 -0
- package/dist/config.d.ts +6 -7
- package/dist/config.js +15 -15
- package/dist/docs/commands.js +9 -4
- package/dist/edge-auth-headers.js +1 -18
- package/dist/env-registry.d.ts +4 -0
- package/dist/env-registry.js +15 -6
- package/dist/envs/commands.d.ts +3 -0
- package/dist/envs/commands.js +11 -0
- package/dist/exit-codes.d.ts +16 -0
- package/dist/exit-codes.js +27 -0
- package/dist/functions/bundle.d.ts +1 -1
- package/dist/functions/commands.d.ts +15 -0
- package/dist/functions/commands.js +86 -29
- package/dist/functions/manifest.js +1 -1
- package/dist/functions/service-account-guidance.d.ts +1 -1
- package/dist/functions/service-account-guidance.js +2 -2
- package/dist/lifecycle/check.d.ts +13 -0
- package/dist/lifecycle/check.js +116 -0
- package/dist/lifecycle/commands.d.ts +14 -0
- package/dist/lifecycle/commands.js +121 -0
- package/dist/lifecycle/plan.d.ts +28 -0
- package/dist/lifecycle/plan.js +113 -0
- package/dist/lifecycle/rollback.d.ts +7 -0
- package/dist/lifecycle/rollback.js +89 -0
- package/dist/lifecycle/seq-ci-tools.d.ts +107 -0
- package/dist/lifecycle/seq-ci-tools.js +177 -0
- package/dist/lifecycle/upgrade.d.ts +3 -0
- package/dist/lifecycle/upgrade.js +38 -0
- package/dist/machine-output.d.ts +11 -2
- package/dist/machine-output.js +32 -10
- package/dist/main.d.ts +16 -6
- package/dist/main.js +187 -361
- package/dist/orgs.d.ts +45 -0
- package/dist/orgs.js +106 -0
- package/dist/orm/delegate.d.ts +1 -1
- package/dist/orm/delegate.js +32 -18
- package/dist/orm/deployment-policy.js +1 -2
- package/dist/orm/discover.js +6 -8
- package/dist/orm/execute.d.ts +1 -1
- package/dist/orm/execute.js +5 -6
- package/dist/orm/failures.js +2 -2
- package/dist/orm/help.d.ts +1 -1
- package/dist/orm/help.js +5 -5
- package/dist/orm/history.js +1 -2
- package/dist/orm/operation-show.js +1 -2
- package/dist/orm/version-guard.d.ts +7 -2
- package/dist/orm/version-guard.js +12 -7
- package/dist/pipeline/codegen.js +2 -2
- package/dist/pipeline/commands.js +9 -7
- package/dist/pipeline/discovery.d.ts +1 -1
- package/dist/pipeline/discovery.js +2 -3
- package/dist/pipeline/help.d.ts +1 -1
- package/dist/pipeline/help.js +1 -1
- package/dist/pipeline/lifecycle.js +1 -1
- package/dist/pipeline/stage-secrets.js +4 -4
- package/dist/pipeline/templates.js +2 -2
- package/dist/pnpm-auto-update.js +3 -3
- package/dist/principals/commands.d.ts +1 -1
- package/dist/principals/commands.js +13 -14
- package/dist/process/commands.js +4 -1
- package/dist/process/run-steps.d.ts +2 -2
- package/dist/process/runs.js +1 -2
- package/dist/registry/commands.d.ts +4 -0
- package/dist/registry/commands.js +281 -0
- package/dist/registry/help.d.ts +8 -0
- package/dist/registry/help.js +64 -0
- package/dist/registry/lifecycle-commands.d.ts +3 -0
- package/dist/registry/lifecycle-commands.js +67 -0
- package/dist/registry/lookup.d.ts +6 -0
- package/dist/registry/lookup.js +18 -0
- package/dist/registry/runners.d.ts +14 -0
- package/dist/registry/runners.js +206 -0
- package/dist/registry/spec.d.ts +45 -0
- package/dist/registry/spec.js +8 -0
- package/dist/repos/commands.d.ts +1 -4
- package/dist/repos/commands.js +3 -21
- package/dist/repos/github-connect-command.d.ts +10 -1
- package/dist/repos/github-connect-command.js +52 -11
- package/dist/repos/github-init.d.ts +9 -2
- package/dist/repos/github-init.js +18 -2
- package/dist/repos/init-repo.js +1 -2
- package/dist/run-pinned.d.ts +48 -0
- package/dist/run-pinned.js +127 -0
- package/dist/sdk-source.d.ts +64 -0
- package/dist/sdk-source.js +199 -0
- package/dist/secrets/commands.d.ts +1 -1
- package/dist/secrets/commands.js +29 -24
- package/dist/service-accounts/commands.d.ts +1 -1
- package/dist/service-accounts/commands.js +4 -5
- package/dist/staged-env.d.ts +14 -0
- package/dist/staged-env.js +73 -0
- package/dist/storage/commands.js +21 -22
- package/dist/templates/catalog.d.ts +5 -5
- package/dist/templates/catalog.js +1 -1
- package/dist/update-check.js +3 -3
- package/dist/version-support.d.ts +39 -0
- package/dist/version-support.js +71 -0
- package/package.json +11 -10
- package/release-summary.json +4 -1
- package/dist/preview.d.ts +0 -90
- package/dist/preview.js +0 -292
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ExitCode, UsageError } from '../exit-codes.js';
|
|
2
|
+
const UPGRADE_USAGE = `usage:
|
|
3
|
+
seq-studio upgrade [--to <major.minor>] [--dir <checkout>] [--check]
|
|
4
|
+
|
|
5
|
+
Pin this repository to the running seq-studio's <major.minor> (or --to), in .seq/github.yml,
|
|
6
|
+
and refresh every file repo init manages to match. --check reports without writing (exit 3
|
|
7
|
+
when anything would change). Renovate opens the same change as a pull request.`;
|
|
8
|
+
export async function runUpgradeCommand(args) {
|
|
9
|
+
if (args.flags.help === true || args.flags.h === true) {
|
|
10
|
+
console.log(UPGRADE_USAGE);
|
|
11
|
+
return ExitCode.Ok;
|
|
12
|
+
}
|
|
13
|
+
const to = args.flags.to;
|
|
14
|
+
if (to !== undefined && (typeof to !== 'string' || !/^\d+\.\d+$/.test(to))) {
|
|
15
|
+
throw new UsageError('--to takes <major.minor>, for example --to 1.4');
|
|
16
|
+
}
|
|
17
|
+
const directory = typeof args.flags.dir === 'string' ? args.flags.dir : '.';
|
|
18
|
+
const { GITHUB_SETTINGS_PATH, initializeGitHubRepository, installedMajorMinor, resolveSettings } = await import('../repos/github-init.js');
|
|
19
|
+
const { repositorySettings } = await import('../orgs.js');
|
|
20
|
+
if (!await repositorySettings(directory)) {
|
|
21
|
+
throw new UsageError('No .seq/github.yml here; set the repository up first with: seq-studio repo init');
|
|
22
|
+
}
|
|
23
|
+
const cli = typeof to === 'string' ? to : installedMajorMinor();
|
|
24
|
+
const settings = await resolveSettings({ directory, cli });
|
|
25
|
+
const check = args.flags.check === true;
|
|
26
|
+
const preview = await initializeGitHubRepository({ directory, settings, write: false });
|
|
27
|
+
if (preview.some(({ path, status }) => path === GITHUB_SETTINGS_PATH && status === 'unmanaged')) {
|
|
28
|
+
throw new UsageError(`${GITHUB_SETTINGS_PATH} is not managed by seq-studio; edit its cli: pin by hand, or rerun seq-studio repo init`);
|
|
29
|
+
}
|
|
30
|
+
const reports = check ? preview : await initializeGitHubRepository({ directory, settings, write: true });
|
|
31
|
+
const changed = reports.filter(({ status }) => status === 'missing' || status === 'stale');
|
|
32
|
+
for (const report of reports)
|
|
33
|
+
console.log(`${report.status.padEnd(9)} ${report.path}`);
|
|
34
|
+
console.log(check
|
|
35
|
+
? `${changed.length === 0 ? 'Pinned to' : 'Would pin to'} seq-studio ${cli}.`
|
|
36
|
+
: `Pinned to seq-studio ${cli}. Commit the changed files.`);
|
|
37
|
+
return check && changed.length > 0 ? ExitCode.Blocked : ExitCode.Ok;
|
|
38
|
+
}
|
package/dist/machine-output.d.ts
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
/** True when the arguments ask for JSON (or JSON Lines) on stdout. */
|
|
2
2
|
export declare function requestsMachineOutput(argv: readonly string[]): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Put `"schema": "<command>@1"` first in a JSON object document. Arrays and
|
|
5
|
+
* objects that already carry a `schema` key are printed unchanged.
|
|
6
|
+
*/
|
|
7
|
+
export declare function withSchema(text: string, value: unknown, schema: string): string;
|
|
3
8
|
/**
|
|
4
9
|
* Route non-JSON console.log / console.info output to stderr until the
|
|
5
|
-
* returned restore function runs.
|
|
10
|
+
* returned restore function runs. With `schema`, single-document JSON objects
|
|
11
|
+
* also gain their schema name.
|
|
6
12
|
*/
|
|
7
|
-
export declare function guardMachineOutput(
|
|
13
|
+
export declare function guardMachineOutput({ schema, argv }?: {
|
|
14
|
+
schema?: string;
|
|
15
|
+
argv?: readonly string[];
|
|
16
|
+
}): () => void;
|
package/dist/machine-output.js
CHANGED
|
@@ -24,28 +24,50 @@ export function requestsMachineOutput(argv) {
|
|
|
24
24
|
}
|
|
25
25
|
return false;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function parseJson(text) {
|
|
28
28
|
if (text.trim() === '')
|
|
29
|
-
return false;
|
|
29
|
+
return { ok: false };
|
|
30
30
|
try {
|
|
31
|
-
JSON.parse(text);
|
|
32
|
-
return true;
|
|
31
|
+
return { ok: true, value: JSON.parse(text) };
|
|
33
32
|
}
|
|
34
33
|
catch {
|
|
35
|
-
return false;
|
|
34
|
+
return { ok: false };
|
|
36
35
|
}
|
|
37
36
|
}
|
|
37
|
+
/** True for `--jsonl`, whose lines are stream items rather than one document. */
|
|
38
|
+
function requestsJsonLines(argv) {
|
|
39
|
+
return argv.some((arg) => arg === '--jsonl' || (arg.startsWith('--jsonl=') && arg !== '--jsonl=false'));
|
|
40
|
+
}
|
|
41
|
+
function indentOf(text) {
|
|
42
|
+
const match = /\n( +)\S/.exec(text);
|
|
43
|
+
return match?.[1]?.length ?? 0;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Put `"schema": "<command>@1"` first in a JSON object document. Arrays and
|
|
47
|
+
* objects that already carry a `schema` key are printed unchanged.
|
|
48
|
+
*/
|
|
49
|
+
export function withSchema(text, value, schema) {
|
|
50
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value) || 'schema' in value)
|
|
51
|
+
return text;
|
|
52
|
+
return JSON.stringify({ schema: `${schema}@1`, ...value }, null, indentOf(text) || undefined);
|
|
53
|
+
}
|
|
38
54
|
/**
|
|
39
55
|
* Route non-JSON console.log / console.info output to stderr until the
|
|
40
|
-
* returned restore function runs.
|
|
56
|
+
* returned restore function runs. With `schema`, single-document JSON objects
|
|
57
|
+
* also gain their schema name.
|
|
41
58
|
*/
|
|
42
|
-
export function guardMachineOutput() {
|
|
59
|
+
export function guardMachineOutput({ schema, argv = process.argv.slice(2) } = {}) {
|
|
43
60
|
const { log, info } = console;
|
|
61
|
+
const tagSchema = schema !== undefined && !requestsJsonLines(argv);
|
|
44
62
|
const route = (write) => (...args) => {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
63
|
+
const text = format(...args);
|
|
64
|
+
const parsed = parseJson(text);
|
|
65
|
+
if (!parsed.ok)
|
|
48
66
|
console.error(...args);
|
|
67
|
+
else if (tagSchema && args.length === 1 && typeof args[0] === 'string')
|
|
68
|
+
write(withSchema(text, parsed.value, schema));
|
|
69
|
+
else
|
|
70
|
+
write(...args);
|
|
49
71
|
};
|
|
50
72
|
console.log = route(log);
|
|
51
73
|
console.info = route(info);
|
package/dist/main.d.ts
CHANGED
|
@@ -7,24 +7,34 @@
|
|
|
7
7
|
* seq-studio deploy deploy all primitives from sequence.app.yml
|
|
8
8
|
* seq-studio process <sub> manage Lattice processes
|
|
9
9
|
* seq-studio artifact <sub> manage Artifact Studio apps
|
|
10
|
-
* seq-studio
|
|
11
|
-
* seq-studio
|
|
12
|
-
* seq-studio
|
|
10
|
+
* seq-studio function <sub> manage Managed Functions
|
|
11
|
+
* seq-studio agent <sub> manage typed agent definitions
|
|
12
|
+
* seq-studio secret <sub> manage org-owned Managed Secrets
|
|
13
13
|
* seq-studio repos <sub> manage platform git-service repos
|
|
14
14
|
* seq-studio templates <sub> publish and synchronize Git-backed templates
|
|
15
15
|
* seq-studio pipeline <sub> discover, query, author and operate Data Pipelines
|
|
16
16
|
* seq-studio auth <sub> manage Git authentication
|
|
17
17
|
* seq-studio docs <sub> search and read the environment's developer docs
|
|
18
18
|
* seq-studio feedback submit submit agent feedback
|
|
19
|
-
* seq-studio service-
|
|
19
|
+
* seq-studio service-account <sub> provision runtime identities
|
|
20
20
|
* seq-studio access <sub> manage resource access on every primitive
|
|
21
|
-
* seq-studio
|
|
21
|
+
* seq-studio principal <sub> find users, groups and service accounts to grant
|
|
22
22
|
* seq-studio envs <sub> add/list environments
|
|
23
23
|
* seq-studio login authenticate interactively with Auth0
|
|
24
24
|
* seq-studio logout remove cached user tokens
|
|
25
25
|
* seq-studio doctor check token + env + writer gate
|
|
26
26
|
* seq-studio help show usage
|
|
27
27
|
*/
|
|
28
|
-
/** Only command words from the router; never operands, flags, paths, or arguments. */
|
|
28
|
+
/** Only command words from the router; never operands, flags, paths, or arguments. Always the current spelling. */
|
|
29
29
|
export declare function commandTelemetryName(argv: string[]): string | null;
|
|
30
30
|
export declare function run(argv?: string[]): Promise<number>;
|
|
31
|
+
/** The command words that name a JSON document's schema, e.g. `repo status`. Always the current spelling. */
|
|
32
|
+
export declare function schemaName(argv: string[]): string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* `--break-glass "<reason>"` on any command: removed from argv so no command's own parser sees it. An empty or
|
|
35
|
+
* missing reason is a usage error.
|
|
36
|
+
*/
|
|
37
|
+
export declare function takeBreakGlass(argv: string[]): {
|
|
38
|
+
argv: string[];
|
|
39
|
+
breakGlass?: string | Error;
|
|
40
|
+
};
|