@sanity/runtime-cli 17.1.0 → 17.2.0
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 +896 -895
- 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;
|