@sanity/runtime-cli 10.8.0 → 10.9.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 +17 -17
- package/dist/actions/blueprints/assets.d.ts +2 -0
- package/dist/actions/blueprints/assets.js +2 -2
- package/dist/baseCommands.d.ts +6 -0
- package/dist/baseCommands.js +10 -1
- package/dist/cores/blueprints/deploy.d.ts +1 -0
- package/dist/cores/blueprints/deploy.js +14 -1
- package/dist/server/static/vendor/vendor.bundle.d.ts +1 -1
- package/dist/server/static/vendor/vendor.bundle.js +53 -26
- package/oclif.manifest.json +113 -5
- package/package.json +19 -19
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ $ npm install -g @sanity/runtime-cli
|
|
|
20
20
|
$ sanity-run COMMAND
|
|
21
21
|
running command...
|
|
22
22
|
$ sanity-run (--version)
|
|
23
|
-
@sanity/runtime-cli/10.
|
|
23
|
+
@sanity/runtime-cli/10.9.0 linux-x64 node-v22.19.0
|
|
24
24
|
$ sanity-run --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ sanity-run COMMAND
|
|
@@ -88,7 +88,7 @@ EXAMPLES
|
|
|
88
88
|
$ sanity-run blueprints add function --name my-function --fn-type document-create --fn-type document-update --lang js
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
_See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v10.
|
|
91
|
+
_See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v10.9.0/src/commands/blueprints/add.ts)_
|
|
92
92
|
|
|
93
93
|
## `sanity-run blueprints config`
|
|
94
94
|
|
|
@@ -119,7 +119,7 @@ EXAMPLES
|
|
|
119
119
|
$ sanity-run blueprints config --edit --project-id <projectId> --stack-id <stackId>
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
-
_See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v10.
|
|
122
|
+
_See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v10.9.0/src/commands/blueprints/config.ts)_
|
|
123
123
|
|
|
124
124
|
## `sanity-run blueprints deploy`
|
|
125
125
|
|
|
@@ -141,7 +141,7 @@ EXAMPLES
|
|
|
141
141
|
$ sanity-run blueprints deploy --no-wait
|
|
142
142
|
```
|
|
143
143
|
|
|
144
|
-
_See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v10.
|
|
144
|
+
_See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v10.9.0/src/commands/blueprints/deploy.ts)_
|
|
145
145
|
|
|
146
146
|
## `sanity-run blueprints destroy`
|
|
147
147
|
|
|
@@ -166,7 +166,7 @@ EXAMPLES
|
|
|
166
166
|
$ sanity-run blueprints destroy --stack-id <stackId> --project-id <projectId> --force --no-wait
|
|
167
167
|
```
|
|
168
168
|
|
|
169
|
-
_See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v10.
|
|
169
|
+
_See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v10.9.0/src/commands/blueprints/destroy.ts)_
|
|
170
170
|
|
|
171
171
|
## `sanity-run blueprints info`
|
|
172
172
|
|
|
@@ -188,7 +188,7 @@ EXAMPLES
|
|
|
188
188
|
$ sanity-run blueprints info --stack-id <stackId>
|
|
189
189
|
```
|
|
190
190
|
|
|
191
|
-
_See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v10.
|
|
191
|
+
_See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v10.9.0/src/commands/blueprints/info.ts)_
|
|
192
192
|
|
|
193
193
|
## `sanity-run blueprints init [DIR]`
|
|
194
194
|
|
|
@@ -226,7 +226,7 @@ EXAMPLES
|
|
|
226
226
|
$ sanity-run blueprints init --blueprint-type <json|js|ts> --stack-name <stackName>
|
|
227
227
|
```
|
|
228
228
|
|
|
229
|
-
_See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v10.
|
|
229
|
+
_See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v10.9.0/src/commands/blueprints/init.ts)_
|
|
230
230
|
|
|
231
231
|
## `sanity-run blueprints logs`
|
|
232
232
|
|
|
@@ -248,7 +248,7 @@ EXAMPLES
|
|
|
248
248
|
$ sanity-run blueprints logs --watch
|
|
249
249
|
```
|
|
250
250
|
|
|
251
|
-
_See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v10.
|
|
251
|
+
_See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v10.9.0/src/commands/blueprints/logs.ts)_
|
|
252
252
|
|
|
253
253
|
## `sanity-run blueprints plan`
|
|
254
254
|
|
|
@@ -265,7 +265,7 @@ EXAMPLES
|
|
|
265
265
|
$ sanity-run blueprints plan
|
|
266
266
|
```
|
|
267
267
|
|
|
268
|
-
_See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v10.
|
|
268
|
+
_See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v10.9.0/src/commands/blueprints/plan.ts)_
|
|
269
269
|
|
|
270
270
|
## `sanity-run blueprints stacks`
|
|
271
271
|
|
|
@@ -287,7 +287,7 @@ EXAMPLES
|
|
|
287
287
|
$ sanity-run blueprints stacks --project-id <projectId>
|
|
288
288
|
```
|
|
289
289
|
|
|
290
|
-
_See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v10.
|
|
290
|
+
_See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v10.9.0/src/commands/blueprints/stacks.ts)_
|
|
291
291
|
|
|
292
292
|
## `sanity-run functions dev`
|
|
293
293
|
|
|
@@ -307,7 +307,7 @@ EXAMPLES
|
|
|
307
307
|
$ sanity-run functions dev --port 8974
|
|
308
308
|
```
|
|
309
309
|
|
|
310
|
-
_See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v10.
|
|
310
|
+
_See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v10.9.0/src/commands/functions/dev.ts)_
|
|
311
311
|
|
|
312
312
|
## `sanity-run functions env add NAME KEY VALUE`
|
|
313
313
|
|
|
@@ -329,7 +329,7 @@ EXAMPLES
|
|
|
329
329
|
$ sanity-run functions env add MyFunction API_URL https://api.example.com/
|
|
330
330
|
```
|
|
331
331
|
|
|
332
|
-
_See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v10.
|
|
332
|
+
_See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v10.9.0/src/commands/functions/env/add.ts)_
|
|
333
333
|
|
|
334
334
|
## `sanity-run functions env list NAME`
|
|
335
335
|
|
|
@@ -349,7 +349,7 @@ EXAMPLES
|
|
|
349
349
|
$ sanity-run functions env list MyFunction
|
|
350
350
|
```
|
|
351
351
|
|
|
352
|
-
_See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v10.
|
|
352
|
+
_See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v10.9.0/src/commands/functions/env/list.ts)_
|
|
353
353
|
|
|
354
354
|
## `sanity-run functions env remove NAME KEY`
|
|
355
355
|
|
|
@@ -370,7 +370,7 @@ EXAMPLES
|
|
|
370
370
|
$ sanity-run functions env remove MyFunction API_URL
|
|
371
371
|
```
|
|
372
372
|
|
|
373
|
-
_See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v10.
|
|
373
|
+
_See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v10.9.0/src/commands/functions/env/remove.ts)_
|
|
374
374
|
|
|
375
375
|
## `sanity-run functions logs NAME`
|
|
376
376
|
|
|
@@ -404,7 +404,7 @@ EXAMPLES
|
|
|
404
404
|
$ sanity-run functions logs <name> --delete
|
|
405
405
|
```
|
|
406
406
|
|
|
407
|
-
_See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v10.
|
|
407
|
+
_See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v10.9.0/src/commands/functions/logs.ts)_
|
|
408
408
|
|
|
409
409
|
## `sanity-run functions test NAME`
|
|
410
410
|
|
|
@@ -451,7 +451,7 @@ EXAMPLES
|
|
|
451
451
|
$ sanity-run functions test <name> --event update --data-before '{ "title": "before" }' --data-after '{ "title": "after" }'
|
|
452
452
|
```
|
|
453
453
|
|
|
454
|
-
_See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v10.
|
|
454
|
+
_See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v10.9.0/src/commands/functions/test.ts)_
|
|
455
455
|
|
|
456
456
|
## `sanity-run help [COMMAND]`
|
|
457
457
|
|
|
@@ -471,5 +471,5 @@ DESCRIPTION
|
|
|
471
471
|
Display help for sanity-run.
|
|
472
472
|
```
|
|
473
473
|
|
|
474
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.
|
|
474
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.33/src/commands/help.ts)_
|
|
475
475
|
<!-- commandsstop -->
|
|
@@ -49,7 +49,7 @@ export async function stashAsset({ resource, auth, }) {
|
|
|
49
49
|
});
|
|
50
50
|
const checkJson = await checkResponse.json();
|
|
51
51
|
if (checkResponse.ok && checkJson.exists && checkJson.id) {
|
|
52
|
-
return { success: true, assetId: checkJson.id };
|
|
52
|
+
return { success: true, assetId: checkJson.id, exists: true, hash };
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
catch { } // Continue to stash the Asset
|
|
@@ -64,7 +64,7 @@ export async function stashAsset({ resource, auth, }) {
|
|
|
64
64
|
});
|
|
65
65
|
const assetJson = await assetResponse.json();
|
|
66
66
|
if (assetResponse.ok) {
|
|
67
|
-
return { success: true, assetId: assetJson.id };
|
|
67
|
+
return { success: true, assetId: assetJson.id, exists: false, hash };
|
|
68
68
|
}
|
|
69
69
|
return { success: false, error: assetJson.message || 'Unknown error' };
|
|
70
70
|
}
|
package/dist/baseCommands.d.ts
CHANGED
|
@@ -14,6 +14,9 @@ export declare abstract class BlueprintCommand<T extends typeof Command> extends
|
|
|
14
14
|
protected blueprint: ReadBlueprintResult;
|
|
15
15
|
protected flags: Flags<T>;
|
|
16
16
|
protected args: Args<T>;
|
|
17
|
+
static baseFlags: {
|
|
18
|
+
verbose: Interfaces.BooleanFlag<boolean>;
|
|
19
|
+
};
|
|
17
20
|
init(): Promise<void>;
|
|
18
21
|
protected catch(err: Error & {
|
|
19
22
|
exitCode?: number;
|
|
@@ -30,5 +33,8 @@ export declare abstract class DeployedBlueprintCommand<T extends typeof Command>
|
|
|
30
33
|
protected deployedStack: Stack;
|
|
31
34
|
protected projectId: string;
|
|
32
35
|
protected stackId: string;
|
|
36
|
+
static baseFlags: {
|
|
37
|
+
verbose: Interfaces.BooleanFlag<boolean>;
|
|
38
|
+
};
|
|
33
39
|
init(): Promise<void>;
|
|
34
40
|
}
|
package/dist/baseCommands.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
// * https://oclif.io/docs/base_class
|
|
2
|
-
import { Command } from '@oclif/core';
|
|
2
|
+
import { Command, Flags as OclifFlags } from '@oclif/core';
|
|
3
3
|
import { initBlueprintConfig, initDeployedBlueprintConfig } from './cores/index.js';
|
|
4
|
+
const baseFlags = {
|
|
5
|
+
verbose: OclifFlags.boolean({
|
|
6
|
+
description: 'Verbose output',
|
|
7
|
+
default: false,
|
|
8
|
+
hidden: true, // prevent help output on all commands
|
|
9
|
+
}),
|
|
10
|
+
};
|
|
4
11
|
/**
|
|
5
12
|
* @description Guarantees flags, args, sanityToken, and blueprint.
|
|
6
13
|
* Blueprint parser errors are logged and the command exits with an error
|
|
@@ -11,6 +18,7 @@ export class BlueprintCommand extends Command {
|
|
|
11
18
|
blueprint;
|
|
12
19
|
flags;
|
|
13
20
|
args;
|
|
21
|
+
static baseFlags = baseFlags;
|
|
14
22
|
async init() {
|
|
15
23
|
const { args, flags } = await this.parse({
|
|
16
24
|
flags: this.ctor.flags,
|
|
@@ -52,6 +60,7 @@ export class DeployedBlueprintCommand extends BlueprintCommand {
|
|
|
52
60
|
deployedStack;
|
|
53
61
|
projectId;
|
|
54
62
|
stackId;
|
|
63
|
+
static baseFlags = baseFlags;
|
|
55
64
|
async init() {
|
|
56
65
|
await super.init();
|
|
57
66
|
const result = await initDeployedBlueprintConfig({
|
|
@@ -9,6 +9,7 @@ export interface BlueprintDeployOptions extends CoreConfig {
|
|
|
9
9
|
blueprint: ReadBlueprintResult;
|
|
10
10
|
flags: {
|
|
11
11
|
'no-wait'?: boolean;
|
|
12
|
+
verbose?: boolean;
|
|
12
13
|
};
|
|
13
14
|
}
|
|
14
15
|
export declare function blueprintDeployCore(options: BlueprintDeployOptions): Promise<CoreResult>;
|
|
@@ -8,6 +8,7 @@ import { niceId } from '../../utils/display/presenters.js';
|
|
|
8
8
|
import { isLocalFunctionResource } from '../../utils/types.js';
|
|
9
9
|
export async function blueprintDeployCore(options) {
|
|
10
10
|
const { bin = 'sanity', log, auth, stackId, projectId, deployedStack, blueprint, flags } = options;
|
|
11
|
+
const { verbose } = flags;
|
|
11
12
|
const noWait = flags['no-wait'] || false;
|
|
12
13
|
log(`Deploying "${deployedStack.name}" ${niceId(deployedStack.id)}...`);
|
|
13
14
|
try {
|
|
@@ -22,9 +23,21 @@ export async function blueprintDeployCore(options) {
|
|
|
22
23
|
const result = await stashAsset({ resource, auth });
|
|
23
24
|
if (result.success && result.assetId) {
|
|
24
25
|
const src = resource.src;
|
|
25
|
-
resource.src = result.assetId;
|
|
26
|
+
resource.src = result.assetId;
|
|
26
27
|
fnSpinner.succeed(`${resource.name} ${niceId(result.assetId)}`);
|
|
27
28
|
log(` Source: ${src}`);
|
|
29
|
+
if (verbose) {
|
|
30
|
+
if (result.hash) {
|
|
31
|
+
if (result.hash.length > 24) {
|
|
32
|
+
log(` Hash: ${result.hash.slice(0, 8)}...${result.hash.slice(-12)}`);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
log(` Hash: ${result.hash}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (result.exists)
|
|
39
|
+
log(' Asset unchanged');
|
|
40
|
+
}
|
|
28
41
|
}
|
|
29
42
|
else {
|
|
30
43
|
fnSpinner.fail(`Failed uploading ${resource.name} asset, deploy has stopped`);
|
|
@@ -703,7 +703,7 @@ export const basicSetup: (any[] | FacetProvider | ViewPlugin)[];
|
|
|
703
703
|
JSON language support.
|
|
704
704
|
*/
|
|
705
705
|
export function json(): LanguageSupport;
|
|
706
|
-
export function prettyBytes(number: any, options: any):
|
|
706
|
+
export function prettyBytes(number: any, options: any): any;
|
|
707
707
|
export function prettyMilliseconds(milliseconds: any, options: any): string;
|
|
708
708
|
/**
|
|
709
709
|
Wrap a highlighter in an editor extension that uses it to apply
|
|
@@ -26641,7 +26641,7 @@ const log10 = numberOrBigInt => {
|
|
|
26641
26641
|
|
|
26642
26642
|
const string = numberOrBigInt.toString(10);
|
|
26643
26643
|
|
|
26644
|
-
return string.length + Math.log10(
|
|
26644
|
+
return string.length + Math.log10(`0.${string.slice(0, 15)}`);
|
|
26645
26645
|
};
|
|
26646
26646
|
|
|
26647
26647
|
const log = numberOrBigInt => {
|
|
@@ -26662,6 +26662,36 @@ const divide = (numberOrBigInt, divisor) => {
|
|
|
26662
26662
|
return Number(integerPart) + (Number(remainder) / divisor);
|
|
26663
26663
|
};
|
|
26664
26664
|
|
|
26665
|
+
const applyFixedWidth = (result, fixedWidth) => {
|
|
26666
|
+
if (fixedWidth === undefined) {
|
|
26667
|
+
return result;
|
|
26668
|
+
}
|
|
26669
|
+
|
|
26670
|
+
if (typeof fixedWidth !== 'number' || !Number.isSafeInteger(fixedWidth) || fixedWidth < 0) {
|
|
26671
|
+
throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof fixedWidth}: ${fixedWidth}`);
|
|
26672
|
+
}
|
|
26673
|
+
|
|
26674
|
+
if (fixedWidth === 0) {
|
|
26675
|
+
return result;
|
|
26676
|
+
}
|
|
26677
|
+
|
|
26678
|
+
return result.length < fixedWidth ? result.padStart(fixedWidth, ' ') : result;
|
|
26679
|
+
};
|
|
26680
|
+
|
|
26681
|
+
const buildLocaleOptions = options => {
|
|
26682
|
+
const {minimumFractionDigits, maximumFractionDigits} = options;
|
|
26683
|
+
|
|
26684
|
+
if (minimumFractionDigits === undefined && maximumFractionDigits === undefined) {
|
|
26685
|
+
return undefined;
|
|
26686
|
+
}
|
|
26687
|
+
|
|
26688
|
+
return {
|
|
26689
|
+
...(minimumFractionDigits !== undefined && {minimumFractionDigits}),
|
|
26690
|
+
...(maximumFractionDigits !== undefined && {maximumFractionDigits}),
|
|
26691
|
+
roundingMode: 'trunc',
|
|
26692
|
+
};
|
|
26693
|
+
};
|
|
26694
|
+
|
|
26665
26695
|
function prettyBytes(number, options) {
|
|
26666
26696
|
if (typeof number !== 'bigint' && !Number.isFinite(number)) {
|
|
26667
26697
|
throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);
|
|
@@ -26671,6 +26701,7 @@ function prettyBytes(number, options) {
|
|
|
26671
26701
|
bits: false,
|
|
26672
26702
|
binary: false,
|
|
26673
26703
|
space: true,
|
|
26704
|
+
nonBreakingSpace: false,
|
|
26674
26705
|
...options,
|
|
26675
26706
|
};
|
|
26676
26707
|
|
|
@@ -26678,10 +26709,13 @@ function prettyBytes(number, options) {
|
|
|
26678
26709
|
? (options.binary ? BIBIT_UNITS : BIT_UNITS)
|
|
26679
26710
|
: (options.binary ? BIBYTE_UNITS : BYTE_UNITS);
|
|
26680
26711
|
|
|
26681
|
-
const separator = options.space ? ' ' : '';
|
|
26712
|
+
const separator = options.space ? (options.nonBreakingSpace ? '\u00A0' : ' ') : '';
|
|
26682
26713
|
|
|
26683
|
-
|
|
26684
|
-
|
|
26714
|
+
// Handle signed zero case
|
|
26715
|
+
const isZero = typeof number === 'number' ? number === 0 : number === 0n;
|
|
26716
|
+
if (options.signed && isZero) {
|
|
26717
|
+
const result = ` 0${separator}${UNITS[0]}`;
|
|
26718
|
+
return applyFixedWidth(result, options.fixedWidth);
|
|
26685
26719
|
}
|
|
26686
26720
|
|
|
26687
26721
|
const isNegative = number < 0;
|
|
@@ -26691,34 +26725,27 @@ function prettyBytes(number, options) {
|
|
|
26691
26725
|
number = -number;
|
|
26692
26726
|
}
|
|
26693
26727
|
|
|
26694
|
-
|
|
26695
|
-
|
|
26696
|
-
if (options.minimumFractionDigits !== undefined) {
|
|
26697
|
-
localeOptions = {minimumFractionDigits: options.minimumFractionDigits};
|
|
26698
|
-
}
|
|
26699
|
-
|
|
26700
|
-
if (options.maximumFractionDigits !== undefined) {
|
|
26701
|
-
localeOptions = {maximumFractionDigits: options.maximumFractionDigits, ...localeOptions};
|
|
26702
|
-
}
|
|
26728
|
+
const localeOptions = buildLocaleOptions(options);
|
|
26729
|
+
let result;
|
|
26703
26730
|
|
|
26704
26731
|
if (number < 1) {
|
|
26705
26732
|
const numberString = toLocaleString(number, options.locale, localeOptions);
|
|
26706
|
-
|
|
26707
|
-
}
|
|
26733
|
+
result = prefix + numberString + separator + UNITS[0];
|
|
26734
|
+
} else {
|
|
26735
|
+
const exponent = Math.min(Math.floor(options.binary ? log(number) / Math.log(1024) : log10(number) / 3), UNITS.length - 1);
|
|
26736
|
+
number = divide(number, (options.binary ? 1024 : 1000) ** exponent);
|
|
26708
26737
|
|
|
26709
|
-
|
|
26710
|
-
|
|
26738
|
+
if (!localeOptions) {
|
|
26739
|
+
const minPrecision = Math.max(3, Math.floor(number).toString().length);
|
|
26740
|
+
number = number.toPrecision(minPrecision);
|
|
26741
|
+
}
|
|
26711
26742
|
|
|
26712
|
-
|
|
26713
|
-
const
|
|
26714
|
-
|
|
26743
|
+
const numberString = toLocaleString(Number(number), options.locale, localeOptions);
|
|
26744
|
+
const unit = UNITS[exponent];
|
|
26745
|
+
result = prefix + numberString + separator + unit;
|
|
26715
26746
|
}
|
|
26716
26747
|
|
|
26717
|
-
|
|
26718
|
-
|
|
26719
|
-
const unit = UNITS[exponent];
|
|
26720
|
-
|
|
26721
|
-
return prefix + numberString + separator + unit;
|
|
26748
|
+
return applyFixedWidth(result, options.fixedWidth);
|
|
26722
26749
|
}
|
|
26723
26750
|
|
|
26724
26751
|
const toZeroIfInfinity = value => Number.isFinite(value) ? value : 0;
|
|
@@ -26847,7 +26874,7 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
26847
26874
|
if (
|
|
26848
26875
|
options.separateMilliseconds
|
|
26849
26876
|
|| options.formatSubMilliseconds
|
|
26850
|
-
|| (!options.colonNotation && milliseconds < 1000)
|
|
26877
|
+
|| (!options.colonNotation && milliseconds < 1000 && !options.subSecondsAsDecimals)
|
|
26851
26878
|
) {
|
|
26852
26879
|
const seconds = Number(parsed.seconds);
|
|
26853
26880
|
const milliseconds = Number(parsed.milliseconds);
|
package/oclif.manifest.json
CHANGED
|
@@ -21,6 +21,13 @@
|
|
|
21
21
|
"<%= config.bin %> <%= command.id %> function --name my-function --fn-type document-create --fn-type document-update --lang js"
|
|
22
22
|
],
|
|
23
23
|
"flags": {
|
|
24
|
+
"verbose": {
|
|
25
|
+
"description": "Verbose output",
|
|
26
|
+
"hidden": true,
|
|
27
|
+
"name": "verbose",
|
|
28
|
+
"allowNo": false,
|
|
29
|
+
"type": "boolean"
|
|
30
|
+
},
|
|
24
31
|
"example": {
|
|
25
32
|
"aliases": [
|
|
26
33
|
"recipe"
|
|
@@ -140,6 +147,7 @@
|
|
|
140
147
|
"pluginName": "@sanity/runtime-cli",
|
|
141
148
|
"pluginType": "core",
|
|
142
149
|
"strict": true,
|
|
150
|
+
"enableJsonFlag": false,
|
|
143
151
|
"isESM": true,
|
|
144
152
|
"relativePath": [
|
|
145
153
|
"dist",
|
|
@@ -160,6 +168,13 @@
|
|
|
160
168
|
"<%= config.bin %> <%= command.id %> --edit --project-id <projectId> --stack-id <stackId>"
|
|
161
169
|
],
|
|
162
170
|
"flags": {
|
|
171
|
+
"verbose": {
|
|
172
|
+
"description": "Verbose output",
|
|
173
|
+
"hidden": true,
|
|
174
|
+
"name": "verbose",
|
|
175
|
+
"allowNo": false,
|
|
176
|
+
"type": "boolean"
|
|
177
|
+
},
|
|
163
178
|
"test-config": {
|
|
164
179
|
"aliases": [
|
|
165
180
|
"test",
|
|
@@ -214,6 +229,7 @@
|
|
|
214
229
|
"pluginName": "@sanity/runtime-cli",
|
|
215
230
|
"pluginType": "core",
|
|
216
231
|
"strict": true,
|
|
232
|
+
"enableJsonFlag": false,
|
|
217
233
|
"isESM": true,
|
|
218
234
|
"relativePath": [
|
|
219
235
|
"dist",
|
|
@@ -231,6 +247,13 @@
|
|
|
231
247
|
"<%= config.bin %> <%= command.id %> --no-wait"
|
|
232
248
|
],
|
|
233
249
|
"flags": {
|
|
250
|
+
"verbose": {
|
|
251
|
+
"description": "Verbose output",
|
|
252
|
+
"hidden": true,
|
|
253
|
+
"name": "verbose",
|
|
254
|
+
"allowNo": false,
|
|
255
|
+
"type": "boolean"
|
|
256
|
+
},
|
|
234
257
|
"no-wait": {
|
|
235
258
|
"description": "Do not wait for deployment to complete",
|
|
236
259
|
"name": "no-wait",
|
|
@@ -245,6 +268,7 @@
|
|
|
245
268
|
"pluginName": "@sanity/runtime-cli",
|
|
246
269
|
"pluginType": "core",
|
|
247
270
|
"strict": true,
|
|
271
|
+
"enableJsonFlag": false,
|
|
248
272
|
"isESM": true,
|
|
249
273
|
"relativePath": [
|
|
250
274
|
"dist",
|
|
@@ -262,6 +286,13 @@
|
|
|
262
286
|
"<%= config.bin %> <%= command.id %> --stack-id <stackId> --project-id <projectId> --force --no-wait"
|
|
263
287
|
],
|
|
264
288
|
"flags": {
|
|
289
|
+
"verbose": {
|
|
290
|
+
"description": "Verbose output",
|
|
291
|
+
"hidden": true,
|
|
292
|
+
"name": "verbose",
|
|
293
|
+
"allowNo": false,
|
|
294
|
+
"type": "boolean"
|
|
295
|
+
},
|
|
265
296
|
"force": {
|
|
266
297
|
"aliases": [
|
|
267
298
|
"f"
|
|
@@ -311,6 +342,7 @@
|
|
|
311
342
|
"pluginName": "@sanity/runtime-cli",
|
|
312
343
|
"pluginType": "core",
|
|
313
344
|
"strict": true,
|
|
345
|
+
"enableJsonFlag": false,
|
|
314
346
|
"isESM": true,
|
|
315
347
|
"relativePath": [
|
|
316
348
|
"dist",
|
|
@@ -328,6 +360,13 @@
|
|
|
328
360
|
"<%= config.bin %> <%= command.id %> --stack-id <stackId>"
|
|
329
361
|
],
|
|
330
362
|
"flags": {
|
|
363
|
+
"verbose": {
|
|
364
|
+
"description": "Verbose output",
|
|
365
|
+
"hidden": true,
|
|
366
|
+
"name": "verbose",
|
|
367
|
+
"allowNo": false,
|
|
368
|
+
"type": "boolean"
|
|
369
|
+
},
|
|
331
370
|
"id": {
|
|
332
371
|
"description": "Stack ID to show info for (defaults to current stack)",
|
|
333
372
|
"name": "id",
|
|
@@ -343,6 +382,7 @@
|
|
|
343
382
|
"pluginName": "@sanity/runtime-cli",
|
|
344
383
|
"pluginType": "core",
|
|
345
384
|
"strict": true,
|
|
385
|
+
"enableJsonFlag": false,
|
|
346
386
|
"isESM": true,
|
|
347
387
|
"relativePath": [
|
|
348
388
|
"dist",
|
|
@@ -472,6 +512,13 @@
|
|
|
472
512
|
"<%= config.bin %> <%= command.id %> --watch"
|
|
473
513
|
],
|
|
474
514
|
"flags": {
|
|
515
|
+
"verbose": {
|
|
516
|
+
"description": "Verbose output",
|
|
517
|
+
"hidden": true,
|
|
518
|
+
"name": "verbose",
|
|
519
|
+
"allowNo": false,
|
|
520
|
+
"type": "boolean"
|
|
521
|
+
},
|
|
475
522
|
"watch": {
|
|
476
523
|
"aliases": [
|
|
477
524
|
"follow"
|
|
@@ -490,6 +537,7 @@
|
|
|
490
537
|
"pluginName": "@sanity/runtime-cli",
|
|
491
538
|
"pluginType": "core",
|
|
492
539
|
"strict": true,
|
|
540
|
+
"enableJsonFlag": false,
|
|
493
541
|
"isESM": true,
|
|
494
542
|
"relativePath": [
|
|
495
543
|
"dist",
|
|
@@ -505,7 +553,15 @@
|
|
|
505
553
|
"examples": [
|
|
506
554
|
"<%= config.bin %> <%= command.id %>"
|
|
507
555
|
],
|
|
508
|
-
"flags": {
|
|
556
|
+
"flags": {
|
|
557
|
+
"verbose": {
|
|
558
|
+
"description": "Verbose output",
|
|
559
|
+
"hidden": true,
|
|
560
|
+
"name": "verbose",
|
|
561
|
+
"allowNo": false,
|
|
562
|
+
"type": "boolean"
|
|
563
|
+
}
|
|
564
|
+
},
|
|
509
565
|
"hasDynamicHelp": false,
|
|
510
566
|
"hiddenAliases": [],
|
|
511
567
|
"id": "blueprints:plan",
|
|
@@ -513,6 +569,7 @@
|
|
|
513
569
|
"pluginName": "@sanity/runtime-cli",
|
|
514
570
|
"pluginType": "core",
|
|
515
571
|
"strict": true,
|
|
572
|
+
"enableJsonFlag": false,
|
|
516
573
|
"isESM": true,
|
|
517
574
|
"relativePath": [
|
|
518
575
|
"dist",
|
|
@@ -530,6 +587,13 @@
|
|
|
530
587
|
"<%= config.bin %> <%= command.id %> --project-id <projectId>"
|
|
531
588
|
],
|
|
532
589
|
"flags": {
|
|
590
|
+
"verbose": {
|
|
591
|
+
"description": "Verbose output",
|
|
592
|
+
"hidden": true,
|
|
593
|
+
"name": "verbose",
|
|
594
|
+
"allowNo": false,
|
|
595
|
+
"type": "boolean"
|
|
596
|
+
},
|
|
533
597
|
"project-id": {
|
|
534
598
|
"aliases": [
|
|
535
599
|
"projectId",
|
|
@@ -549,6 +613,7 @@
|
|
|
549
613
|
"pluginName": "@sanity/runtime-cli",
|
|
550
614
|
"pluginType": "core",
|
|
551
615
|
"strict": true,
|
|
616
|
+
"enableJsonFlag": false,
|
|
552
617
|
"isESM": true,
|
|
553
618
|
"relativePath": [
|
|
554
619
|
"dist",
|
|
@@ -608,6 +673,13 @@
|
|
|
608
673
|
"<%= config.bin %> <%= command.id %> <name> --delete"
|
|
609
674
|
],
|
|
610
675
|
"flags": {
|
|
676
|
+
"verbose": {
|
|
677
|
+
"description": "Verbose output",
|
|
678
|
+
"hidden": true,
|
|
679
|
+
"name": "verbose",
|
|
680
|
+
"allowNo": false,
|
|
681
|
+
"type": "boolean"
|
|
682
|
+
},
|
|
611
683
|
"limit": {
|
|
612
684
|
"char": "l",
|
|
613
685
|
"description": "Total number of log entries to retrieve",
|
|
@@ -675,6 +747,7 @@
|
|
|
675
747
|
"pluginName": "@sanity/runtime-cli",
|
|
676
748
|
"pluginType": "core",
|
|
677
749
|
"strict": true,
|
|
750
|
+
"enableJsonFlag": false,
|
|
678
751
|
"isESM": true,
|
|
679
752
|
"relativePath": [
|
|
680
753
|
"dist",
|
|
@@ -700,6 +773,13 @@
|
|
|
700
773
|
"<%= config.bin %> <%= command.id %> <name> --event update --data-before '{ \"title\": \"before\" }' --data-after '{ \"title\": \"after\" }'"
|
|
701
774
|
],
|
|
702
775
|
"flags": {
|
|
776
|
+
"verbose": {
|
|
777
|
+
"description": "Verbose output",
|
|
778
|
+
"hidden": true,
|
|
779
|
+
"name": "verbose",
|
|
780
|
+
"allowNo": false,
|
|
781
|
+
"type": "boolean"
|
|
782
|
+
},
|
|
703
783
|
"data": {
|
|
704
784
|
"char": "d",
|
|
705
785
|
"description": "Data to send to the function",
|
|
@@ -910,6 +990,7 @@
|
|
|
910
990
|
"pluginName": "@sanity/runtime-cli",
|
|
911
991
|
"pluginType": "core",
|
|
912
992
|
"strict": true,
|
|
993
|
+
"enableJsonFlag": false,
|
|
913
994
|
"isESM": true,
|
|
914
995
|
"relativePath": [
|
|
915
996
|
"dist",
|
|
@@ -941,7 +1022,15 @@
|
|
|
941
1022
|
"examples": [
|
|
942
1023
|
"<%= config.bin %> <%= command.id %> MyFunction API_URL https://api.example.com/"
|
|
943
1024
|
],
|
|
944
|
-
"flags": {
|
|
1025
|
+
"flags": {
|
|
1026
|
+
"verbose": {
|
|
1027
|
+
"description": "Verbose output",
|
|
1028
|
+
"hidden": true,
|
|
1029
|
+
"name": "verbose",
|
|
1030
|
+
"allowNo": false,
|
|
1031
|
+
"type": "boolean"
|
|
1032
|
+
}
|
|
1033
|
+
},
|
|
945
1034
|
"hasDynamicHelp": false,
|
|
946
1035
|
"hiddenAliases": [],
|
|
947
1036
|
"id": "functions:env:add",
|
|
@@ -949,6 +1038,7 @@
|
|
|
949
1038
|
"pluginName": "@sanity/runtime-cli",
|
|
950
1039
|
"pluginType": "core",
|
|
951
1040
|
"strict": true,
|
|
1041
|
+
"enableJsonFlag": false,
|
|
952
1042
|
"isESM": true,
|
|
953
1043
|
"relativePath": [
|
|
954
1044
|
"dist",
|
|
@@ -971,7 +1061,15 @@
|
|
|
971
1061
|
"examples": [
|
|
972
1062
|
"<%= config.bin %> <%= command.id %> MyFunction"
|
|
973
1063
|
],
|
|
974
|
-
"flags": {
|
|
1064
|
+
"flags": {
|
|
1065
|
+
"verbose": {
|
|
1066
|
+
"description": "Verbose output",
|
|
1067
|
+
"hidden": true,
|
|
1068
|
+
"name": "verbose",
|
|
1069
|
+
"allowNo": false,
|
|
1070
|
+
"type": "boolean"
|
|
1071
|
+
}
|
|
1072
|
+
},
|
|
975
1073
|
"hasDynamicHelp": false,
|
|
976
1074
|
"hiddenAliases": [],
|
|
977
1075
|
"id": "functions:env:list",
|
|
@@ -979,6 +1077,7 @@
|
|
|
979
1077
|
"pluginName": "@sanity/runtime-cli",
|
|
980
1078
|
"pluginType": "core",
|
|
981
1079
|
"strict": true,
|
|
1080
|
+
"enableJsonFlag": false,
|
|
982
1081
|
"isESM": true,
|
|
983
1082
|
"relativePath": [
|
|
984
1083
|
"dist",
|
|
@@ -1006,7 +1105,15 @@
|
|
|
1006
1105
|
"examples": [
|
|
1007
1106
|
"<%= config.bin %> <%= command.id %> MyFunction API_URL"
|
|
1008
1107
|
],
|
|
1009
|
-
"flags": {
|
|
1108
|
+
"flags": {
|
|
1109
|
+
"verbose": {
|
|
1110
|
+
"description": "Verbose output",
|
|
1111
|
+
"hidden": true,
|
|
1112
|
+
"name": "verbose",
|
|
1113
|
+
"allowNo": false,
|
|
1114
|
+
"type": "boolean"
|
|
1115
|
+
}
|
|
1116
|
+
},
|
|
1010
1117
|
"hasDynamicHelp": false,
|
|
1011
1118
|
"hiddenAliases": [],
|
|
1012
1119
|
"id": "functions:env:remove",
|
|
@@ -1014,6 +1121,7 @@
|
|
|
1014
1121
|
"pluginName": "@sanity/runtime-cli",
|
|
1015
1122
|
"pluginType": "core",
|
|
1016
1123
|
"strict": true,
|
|
1124
|
+
"enableJsonFlag": false,
|
|
1017
1125
|
"isESM": true,
|
|
1018
1126
|
"relativePath": [
|
|
1019
1127
|
"dist",
|
|
@@ -1024,5 +1132,5 @@
|
|
|
1024
1132
|
]
|
|
1025
1133
|
}
|
|
1026
1134
|
},
|
|
1027
|
-
"version": "10.
|
|
1135
|
+
"version": "10.9.0"
|
|
1028
1136
|
}
|
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": "10.
|
|
4
|
+
"version": "10.9.0",
|
|
5
5
|
"author": "Sanity Runtime Team",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
@@ -76,40 +76,40 @@
|
|
|
76
76
|
"watch": "tsc --watch"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@architect/hydrate": "^4.0.
|
|
79
|
+
"@architect/hydrate": "^4.0.10",
|
|
80
80
|
"@architect/inventory": "^4.0.9",
|
|
81
|
-
"@oclif/core": "^4.5.
|
|
82
|
-
"@oclif/plugin-help": "^6.2.
|
|
81
|
+
"@oclif/core": "^4.5.4",
|
|
82
|
+
"@oclif/plugin-help": "^6.2.33",
|
|
83
83
|
"@sanity/blueprints-parser": "^0.2.1",
|
|
84
|
-
"@sanity/client": "^7.
|
|
84
|
+
"@sanity/client": "^7.11.2",
|
|
85
85
|
"adm-zip": "^0.5.16",
|
|
86
86
|
"array-treeify": "^0.1.5",
|
|
87
87
|
"cardinal": "^2.1.1",
|
|
88
|
-
"chalk": "^5.
|
|
88
|
+
"chalk": "^5.6.2",
|
|
89
89
|
"eventsource": "^4.0.0",
|
|
90
|
-
"find-up": "^
|
|
90
|
+
"find-up": "^8.0.0",
|
|
91
91
|
"get-folder-size": "^5.0.0",
|
|
92
92
|
"groq-js": "^1.18.0",
|
|
93
|
-
"inquirer": "^12.9.
|
|
94
|
-
"jiti": "^2.
|
|
93
|
+
"inquirer": "^12.9.6",
|
|
94
|
+
"jiti": "^2.6.0",
|
|
95
95
|
"mime-types": "^3.0.1",
|
|
96
|
-
"ora": "^
|
|
96
|
+
"ora": "^9.0.0",
|
|
97
97
|
"tar-stream": "^3.1.7",
|
|
98
|
-
"vite": "^7.1.
|
|
98
|
+
"vite": "^7.1.7",
|
|
99
99
|
"vite-tsconfig-paths": "^5.1.4",
|
|
100
100
|
"ws": "^8.18.3",
|
|
101
101
|
"xdg-basedir": "^5.1.0"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
|
-
"@biomejs/biome": "2.2.
|
|
104
|
+
"@biomejs/biome": "2.2.4",
|
|
105
105
|
"@codemirror/lang-json": "^6.0.2",
|
|
106
106
|
"@codemirror/state": "^6.5.2",
|
|
107
107
|
"@enhance/store": "^1.0.2",
|
|
108
108
|
"@lezer/highlight": "^1.2.1",
|
|
109
|
-
"@oclif/test": "^4.1.
|
|
110
|
-
"@playwright/test": "^1.
|
|
109
|
+
"@oclif/test": "^4.1.14",
|
|
110
|
+
"@playwright/test": "^1.55.0",
|
|
111
111
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
112
|
-
"@sanity/blueprints": "^0.
|
|
112
|
+
"@sanity/blueprints": "^0.3.0",
|
|
113
113
|
"@sanity/functions": "^1.0.3",
|
|
114
114
|
"@types/adm-zip": "^0.5.7",
|
|
115
115
|
"@types/cardinal": "^2.1.1",
|
|
@@ -119,10 +119,10 @@
|
|
|
119
119
|
"@types/ws": "^8.18.1",
|
|
120
120
|
"codemirror": "^6.0.2",
|
|
121
121
|
"mentoss": "^0.11.0",
|
|
122
|
-
"oclif": "^4.22.
|
|
123
|
-
"pretty-bytes": "^7.0
|
|
124
|
-
"pretty-ms": "^9.
|
|
125
|
-
"rollup": "^4.
|
|
122
|
+
"oclif": "^4.22.24",
|
|
123
|
+
"pretty-bytes": "^7.1.0",
|
|
124
|
+
"pretty-ms": "^9.3.0",
|
|
125
|
+
"rollup": "^4.52.0",
|
|
126
126
|
"shx": "^0.4.0",
|
|
127
127
|
"ts-node": "^10.9.2",
|
|
128
128
|
"typescript": "^5.9.2",
|