@sanity/runtime-cli 17.1.0-next.g3cb2d2e → 17.1.0-next.gcfbd613
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 +23 -22
- package/dist/actions/blueprints/assets.d.ts +2 -1
- package/dist/actions/blueprints/assets.js +2 -2
- package/dist/actions/blueprints/blueprint.d.ts +1 -1
- package/dist/actions/blueprints/wait-for-operation.js +4 -0
- package/dist/actions/sanity/examples.d.ts +4 -4
- package/dist/baseCommands.d.ts +4 -4
- package/dist/commands/blueprints/add.d.ts +1 -1
- package/dist/commands/blueprints/config.d.ts +1 -1
- package/dist/commands/blueprints/deploy.d.ts +1 -1
- package/dist/commands/blueprints/destroy.d.ts +1 -1
- package/dist/commands/blueprints/doctor.d.ts +0 -1
- package/dist/commands/blueprints/doctor.js +3 -7
- package/dist/commands/blueprints/info.d.ts +1 -1
- package/dist/commands/blueprints/logs.d.ts +1 -1
- package/dist/commands/blueprints/mint-deploy-token.d.ts +1 -1
- package/dist/commands/blueprints/plan.d.ts +1 -1
- package/dist/commands/blueprints/promote.d.ts +1 -1
- package/dist/commands/blueprints/stacks.d.ts +1 -1
- package/dist/commands/functions/add.d.ts +1 -1
- package/dist/commands/functions/build.d.ts +1 -1
- package/dist/commands/functions/dev.d.ts +1 -1
- package/dist/commands/functions/env/add.d.ts +1 -1
- package/dist/commands/functions/env/list.d.ts +1 -1
- package/dist/commands/functions/env/remove.d.ts +1 -1
- package/dist/commands/functions/logs.d.ts +1 -1
- package/dist/commands/functions/test.d.ts +1 -1
- package/dist/cores/blueprints/deploy.js +5 -4
- package/dist/cores/blueprints/doctor.js +15 -12
- package/dist/cores/functions/build.js +3 -2
- package/dist/cores/functions/test.js +4 -2
- package/dist/server/app.js +8 -2
- package/dist/server/static/favicon-dark.svg +1 -0
- package/dist/server/static/favicon.svg +1 -0
- package/dist/server/static/index.html +1 -1
- package/dist/server/static/vendor/vendor.bundle.js +5 -0
- package/dist/utils/functions/find-entry-point.d.ts +1 -1
- package/dist/utils/functions/find-entry-point.js +10 -12
- package/dist/utils/functions/invoke/local.js +1 -1
- package/dist/utils/functions/invoke/prepare.d.ts +1 -1
- package/dist/utils/functions/invoke/prepare.js +19 -8
- package/dist/utils/functions/package-json.d.ts +1 -2
- package/dist/utils/functions/package-json.js +4 -6
- package/dist/utils/functions/prepare-asset.d.ts +2 -2
- package/dist/utils/functions/prepare-asset.js +18 -7
- package/dist/utils/functions/resolve-dependencies.d.ts +4 -1
- package/dist/utils/functions/resolve-dependencies.js +5 -6
- package/dist/utils/functions/resource-to-arc.d.ts +1 -1
- package/dist/utils/functions/resource-to-arc.js +4 -5
- package/dist/utils/functions/should-transpile.d.ts +7 -1
- package/dist/utils/functions/should-transpile.js +10 -10
- package/dist/utils/functions/transpile/function.d.ts +4 -1
- package/dist/utils/functions/transpile/function.js +9 -14
- package/dist/utils/functions/transpile/verify-handler.js +1 -1
- package/dist/utils/logger.d.ts +7 -5
- package/dist/utils/logger.js +33 -1
- package/dist/utils/progress.d.ts +5 -0
- package/dist/utils/progress.js +40 -0
- package/dist/utils/types.d.ts +5 -1
- package/oclif.manifest.json +5 -4
- package/package.json +23 -22
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { stderr } from 'node:process';
|
|
2
|
+
import { onExit } from 'signal-exit';
|
|
3
|
+
const ST = '\x1b\\';
|
|
4
|
+
const STATES = {
|
|
5
|
+
clear: 0,
|
|
6
|
+
normal: 1,
|
|
7
|
+
error: 2,
|
|
8
|
+
paused: 4,
|
|
9
|
+
busy: 3,
|
|
10
|
+
};
|
|
11
|
+
let exitHookRegistered = false;
|
|
12
|
+
function write(state, value = 0) {
|
|
13
|
+
if (!stderr.isTTY)
|
|
14
|
+
return;
|
|
15
|
+
if (!exitHookRegistered) {
|
|
16
|
+
exitHookRegistered = true;
|
|
17
|
+
function clear() {
|
|
18
|
+
stderr.write(`\x1b]9;4;0;0${ST}`);
|
|
19
|
+
}
|
|
20
|
+
// arc/utils SIGINT handler clobbers our signal-exit; luckily it then calls process.exit()
|
|
21
|
+
process.once('exit', clear); // triggered by arc/utils SIGINT handler
|
|
22
|
+
onExit(clear); // triggered by all other exit paths
|
|
23
|
+
}
|
|
24
|
+
stderr.write(`\x1b]9;4;${STATES[state]};${Math.round(value)}${ST}`);
|
|
25
|
+
}
|
|
26
|
+
export function showProgress(percent) {
|
|
27
|
+
write('normal', Math.max(0, Math.min(100, percent)));
|
|
28
|
+
}
|
|
29
|
+
export function showBusy() {
|
|
30
|
+
write('busy');
|
|
31
|
+
}
|
|
32
|
+
export function showError() {
|
|
33
|
+
write('error', 100);
|
|
34
|
+
}
|
|
35
|
+
export function showPaused(percent) {
|
|
36
|
+
write('paused', Math.max(0, Math.min(100, percent)));
|
|
37
|
+
}
|
|
38
|
+
export function clearProgress() {
|
|
39
|
+
write('clear');
|
|
40
|
+
}
|
package/dist/utils/types.d.ts
CHANGED
|
@@ -126,6 +126,8 @@ export interface InvokeGroqContextOptions {
|
|
|
126
126
|
functionResourceId: string;
|
|
127
127
|
/** All resources declared by the blueprint, used to populate `context.resources` at invoke time. */
|
|
128
128
|
resources?: BlueprintResource[];
|
|
129
|
+
/** The directory where the blueprint manifest is located. */
|
|
130
|
+
blueprintFileDir: string;
|
|
129
131
|
}
|
|
130
132
|
/** @internal */
|
|
131
133
|
export interface InvokeScheduleContextOptions {
|
|
@@ -134,6 +136,8 @@ export interface InvokeScheduleContextOptions {
|
|
|
134
136
|
};
|
|
135
137
|
/** All resources declared by the blueprint, used to populate `context.resources` at invoke time. */
|
|
136
138
|
resources?: BlueprintResource[];
|
|
139
|
+
/** The directory where the blueprint manifest is located. */
|
|
140
|
+
blueprintFileDir: string;
|
|
137
141
|
}
|
|
138
142
|
export type InvokeContextOptions = InvokeGroqContextOptions | InvokeScheduleContextOptions;
|
|
139
143
|
export declare function isGroqContextOptions(context: InvokeContextOptions): context is InvokeGroqContextOptions;
|
|
@@ -265,7 +269,7 @@ export declare interface FetchConfig {
|
|
|
265
269
|
apiHost?: string;
|
|
266
270
|
apiVersion?: string;
|
|
267
271
|
}
|
|
268
|
-
export declare const INSTALLER_OPTIONS: readonly [
|
|
272
|
+
export declare const INSTALLER_OPTIONS: readonly ['npm', 'pnpm', 'yarn'];
|
|
269
273
|
export type InstallerType = 'npm' | 'pnpm' | 'yarn';
|
|
270
274
|
export type AssetPrepResult = {
|
|
271
275
|
success: true;
|
package/oclif.manifest.json
CHANGED
|
@@ -656,7 +656,7 @@
|
|
|
656
656
|
"blueprints:doctor": {
|
|
657
657
|
"aliases": [],
|
|
658
658
|
"args": {},
|
|
659
|
-
"description": "Analyzes your local Blueprint and remote Stack configuration for common issues, such as missing authentication, invalid project references, or misconfigured resources.\n\nRun this command when encountering errors with other Blueprint commands. Use --fix to interactively resolve detected issues.",
|
|
659
|
+
"description": "Analyzes your local Blueprint and remote Stack configuration for common issues, such as missing authentication, invalid project references, or misconfigured resources.\n\nRun this command when encountering errors with other Blueprint commands. Use --fix to interactively resolve detected issues.\n\nSupports --json for programmatic consumption of diagnostic results.",
|
|
660
660
|
"examples": [
|
|
661
661
|
"<%= config.bin %> <%= command.id %>",
|
|
662
662
|
"<%= config.bin %> <%= command.id %> --fix"
|
|
@@ -695,9 +695,10 @@
|
|
|
695
695
|
"type": "boolean"
|
|
696
696
|
},
|
|
697
697
|
"verbose": {
|
|
698
|
-
"description": "Verbose output
|
|
698
|
+
"description": "Verbose output",
|
|
699
|
+
"hidden": true,
|
|
699
700
|
"name": "verbose",
|
|
700
|
-
"allowNo":
|
|
701
|
+
"allowNo": false,
|
|
701
702
|
"type": "boolean"
|
|
702
703
|
},
|
|
703
704
|
"fix": {
|
|
@@ -2997,5 +2998,5 @@
|
|
|
2997
2998
|
]
|
|
2998
2999
|
}
|
|
2999
3000
|
},
|
|
3000
|
-
"version": "17.1.0-next.
|
|
3001
|
+
"version": "17.1.0-next.gcfbd613"
|
|
3001
3002
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/runtime-cli",
|
|
3
3
|
"description": "Sanity's Runtime CLI for Blueprints and Functions",
|
|
4
|
-
"version": "17.1.0-next.
|
|
4
|
+
"version": "17.1.0-next.gcfbd613",
|
|
5
5
|
"author": "Sanity Runtime Team",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
@@ -59,55 +59,56 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@architect/hydrate": "~6.0.2",
|
|
62
|
-
"@architect/inventory": "~6.
|
|
62
|
+
"@architect/inventory": "~6.1.0",
|
|
63
63
|
"@inquirer/prompts": "^8.5.2",
|
|
64
|
-
"@oclif/core": "^4.11.
|
|
65
|
-
"@oclif/plugin-help": "^6.2.
|
|
64
|
+
"@oclif/core": "^4.11.14",
|
|
65
|
+
"@oclif/plugin-help": "^6.2.53",
|
|
66
66
|
"@sanity-labs/design-tokens": "^0.0.2-alpha.2",
|
|
67
|
-
"@sanity/blueprints": "^0.
|
|
67
|
+
"@sanity/blueprints": "^0.22.0",
|
|
68
68
|
"@sanity/blueprints-parser": "^0.4.0",
|
|
69
|
-
"@sanity/client": "^7.
|
|
70
|
-
"adm-zip": "^0.
|
|
69
|
+
"@sanity/client": "^7.23.1",
|
|
70
|
+
"adm-zip": "^0.6.0",
|
|
71
71
|
"array-treeify": "^0.1.5",
|
|
72
72
|
"cardinal": "^2.1.1",
|
|
73
73
|
"empathic": "^2.0.1",
|
|
74
74
|
"eventsource": "^4.1.0",
|
|
75
|
-
"groq-js": "^1.30.
|
|
75
|
+
"groq-js": "^1.30.3",
|
|
76
76
|
"jiti": "^2.7.0",
|
|
77
77
|
"mime-types": "^3.0.2",
|
|
78
|
-
"ora": "^9.4.
|
|
78
|
+
"ora": "^9.4.1",
|
|
79
|
+
"signal-exit": "^4.1.0",
|
|
80
|
+
"strip-ansi": "^7.2.0",
|
|
79
81
|
"tar-stream": "^3.2.0",
|
|
80
|
-
"vite": "^8.
|
|
81
|
-
"ws": "^8.21.
|
|
82
|
+
"vite": "^8.1.4",
|
|
83
|
+
"ws": "^8.21.1",
|
|
82
84
|
"xdg-basedir": "^5.1.0"
|
|
83
85
|
},
|
|
84
86
|
"devDependencies": {
|
|
85
|
-
"@biomejs/biome": "2.
|
|
87
|
+
"@biomejs/biome": "2.5.3",
|
|
86
88
|
"@codemirror/lang-json": "^6.0.2",
|
|
87
|
-
"@codemirror/state": "^6.
|
|
89
|
+
"@codemirror/state": "^6.7.1",
|
|
88
90
|
"@enhance/store": "^1.0.2",
|
|
89
91
|
"@lezer/highlight": "^1.2.3",
|
|
90
|
-
"@oclif/test": "^4.1.
|
|
91
|
-
"@playwright/test": "^1.
|
|
92
|
+
"@oclif/test": "^4.1.20",
|
|
93
|
+
"@playwright/test": "^1.61.1",
|
|
92
94
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
93
|
-
"@sanity/functions": "^1.
|
|
95
|
+
"@sanity/functions": "^1.4.0",
|
|
94
96
|
"@types/adm-zip": "^0.5.8",
|
|
95
97
|
"@types/cardinal": "^2.1.1",
|
|
96
98
|
"@types/mime-types": "^3.0.1",
|
|
97
99
|
"@types/node": "^22",
|
|
98
100
|
"@types/tar-stream": "^3.1.4",
|
|
99
101
|
"@types/ws": "^8.18.1",
|
|
100
|
-
"@vitest/coverage-v8": "4.1.
|
|
102
|
+
"@vitest/coverage-v8": "4.1.10",
|
|
101
103
|
"codemirror": "^6.0.2",
|
|
102
104
|
"mentoss": "^0.13.0",
|
|
103
|
-
"oclif": "^4.23.
|
|
105
|
+
"oclif": "^4.23.27",
|
|
104
106
|
"pretty-bytes": "^7.1.0",
|
|
105
107
|
"pretty-ms": "^9.3.0",
|
|
106
|
-
"rollup": "^4.
|
|
108
|
+
"rollup": "^4.62.2",
|
|
107
109
|
"shx": "^0.4.0",
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"vitest": "4.1.9"
|
|
110
|
+
"typescript": "^7.0.2",
|
|
111
|
+
"vitest": "4.1.10"
|
|
111
112
|
},
|
|
112
113
|
"oclif": {
|
|
113
114
|
"bin": "sanity-run",
|