@sanity/cli 6.0.0-alpha.6 → 6.0.0-alpha.7

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.
Files changed (68) hide show
  1. package/README.md +2907 -109
  2. package/dist/actions/telemetry/resolveConsent.d.ts +1 -9
  3. package/dist/actions/telemetry/resolveConsent.js +2 -2
  4. package/dist/actions/telemetry/resolveConsent.js.map +1 -1
  5. package/dist/actions/telemetry/setConsent.d.ts +1 -4
  6. package/dist/actions/telemetry/setConsent.js +4 -8
  7. package/dist/actions/telemetry/setConsent.js.map +1 -1
  8. package/dist/commands/telemetry/disable.js +0 -1
  9. package/dist/commands/telemetry/disable.js.map +1 -1
  10. package/dist/commands/telemetry/enable.js +0 -1
  11. package/dist/commands/telemetry/enable.js.map +1 -1
  12. package/dist/commands/telemetry/status.js +1 -3
  13. package/dist/commands/telemetry/status.js.map +1 -1
  14. package/dist/hooks/prerun/flushTelemetry.worker.d.ts +2 -0
  15. package/dist/hooks/prerun/flushTelemetry.worker.js +22 -0
  16. package/dist/hooks/prerun/flushTelemetry.worker.js.map +1 -0
  17. package/dist/hooks/prerun/setupTelemetry.js +65 -1
  18. package/dist/hooks/prerun/setupTelemetry.js.map +1 -1
  19. package/dist/services/telemetry.d.ts +2 -0
  20. package/dist/services/telemetry.js +20 -0
  21. package/dist/services/telemetry.js.map +1 -0
  22. package/dist/telemetry/cli.telemetry.d.ts +20 -0
  23. package/dist/telemetry/cli.telemetry.js +8 -0
  24. package/dist/telemetry/cli.telemetry.js.map +1 -0
  25. package/dist/telemetry/store/cleanupOldTelemetryFiles.d.ts +5 -0
  26. package/dist/telemetry/store/cleanupOldTelemetryFiles.js +30 -0
  27. package/dist/telemetry/store/cleanupOldTelemetryFiles.js.map +1 -0
  28. package/dist/telemetry/store/createTelemetryStore.d.ts +39 -0
  29. package/dist/telemetry/store/createTelemetryStore.js +95 -0
  30. package/dist/telemetry/store/createTelemetryStore.js.map +1 -0
  31. package/dist/telemetry/store/createTraceId.d.ts +10 -0
  32. package/dist/telemetry/store/createTraceId.js +10 -0
  33. package/dist/telemetry/store/createTraceId.js.map +1 -0
  34. package/dist/telemetry/store/debug.d.ts +5 -0
  35. package/dist/telemetry/store/debug.js +7 -0
  36. package/dist/telemetry/store/debug.js.map +1 -0
  37. package/dist/telemetry/store/findTelemetryFiles.d.ts +13 -0
  38. package/dist/telemetry/store/findTelemetryFiles.js +34 -0
  39. package/dist/telemetry/store/findTelemetryFiles.js.map +1 -0
  40. package/dist/telemetry/store/flushTelemetryFiles.d.ts +20 -0
  41. package/dist/telemetry/store/flushTelemetryFiles.js +107 -0
  42. package/dist/telemetry/store/flushTelemetryFiles.js.map +1 -0
  43. package/dist/telemetry/store/generateTelemetryFilePath.d.ts +17 -0
  44. package/dist/telemetry/store/generateTelemetryFilePath.js +30 -0
  45. package/dist/telemetry/store/generateTelemetryFilePath.js.map +1 -0
  46. package/dist/telemetry/store/getTelemetryBaseInfo.d.ts +27 -0
  47. package/dist/telemetry/store/getTelemetryBaseInfo.js +34 -0
  48. package/dist/telemetry/store/getTelemetryBaseInfo.js.map +1 -0
  49. package/dist/telemetry/store/logger.d.ts +6 -0
  50. package/dist/telemetry/store/logger.js +54 -0
  51. package/dist/telemetry/store/logger.js.map +1 -0
  52. package/dist/telemetry/store/trace.d.ts +6 -0
  53. package/dist/telemetry/store/trace.js +150 -0
  54. package/dist/telemetry/store/trace.js.map +1 -0
  55. package/dist/telemetry/utils/readNDJSON.d.ts +10 -0
  56. package/dist/telemetry/utils/readNDJSON.js +18 -0
  57. package/dist/telemetry/utils/readNDJSON.js.map +1 -0
  58. package/dist/util/detectRuntime.d.ts +8 -0
  59. package/dist/util/detectRuntime.js +20 -0
  60. package/dist/util/detectRuntime.js.map +1 -0
  61. package/dist/util/isStaging.d.ts +7 -0
  62. package/dist/util/isStaging.js +10 -0
  63. package/dist/util/isStaging.js.map +1 -0
  64. package/dist/util/parseArguments.d.ts +35 -0
  65. package/dist/util/parseArguments.js +42 -0
  66. package/dist/util/parseArguments.js.map +1 -0
  67. package/oclif.manifest.json +119 -113
  68. package/package.json +15 -12
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Reads and parses an NDJSON (newline-delimited JSON) file containing telemetry events.
3
+ *
4
+ * @param filePath - Path to the NDJSON file
5
+ * @returns Promise resolving to array of parsed telemetry events
6
+ * @throws Error if file cannot be read or contains invalid JSON
7
+ *
8
+ * @internal
9
+ */
10
+ export declare function readNDJSON<T>(filePath: string): Promise<T[]>;
@@ -0,0 +1,18 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ /**
3
+ * Reads and parses an NDJSON (newline-delimited JSON) file containing telemetry events.
4
+ *
5
+ * @param filePath - Path to the NDJSON file
6
+ * @returns Promise resolving to array of parsed telemetry events
7
+ * @throws Error if file cannot be read or contains invalid JSON
8
+ *
9
+ * @internal
10
+ */ export async function readNDJSON(filePath) {
11
+ const content = await readFile(filePath, 'utf8');
12
+ if (!content.trim()) {
13
+ return [];
14
+ }
15
+ return content.trim().split('\n').filter(Boolean).map((line)=>JSON.parse(line));
16
+ }
17
+
18
+ //# sourceMappingURL=readNDJSON.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/telemetry/utils/readNDJSON.ts"],"sourcesContent":["import {readFile} from 'node:fs/promises'\n\n/**\n * Reads and parses an NDJSON (newline-delimited JSON) file containing telemetry events.\n *\n * @param filePath - Path to the NDJSON file\n * @returns Promise resolving to array of parsed telemetry events\n * @throws Error if file cannot be read or contains invalid JSON\n *\n * @internal\n */\nexport async function readNDJSON<T>(filePath: string): Promise<T[]> {\n const content = await readFile(filePath, 'utf8')\n\n if (!content.trim()) {\n return []\n }\n\n return content\n .trim()\n .split('\\n')\n .filter(Boolean)\n .map((line) => JSON.parse(line) as T)\n}\n"],"names":["readFile","readNDJSON","filePath","content","trim","split","filter","Boolean","map","line","JSON","parse"],"mappings":"AAAA,SAAQA,QAAQ,QAAO,mBAAkB;AAEzC;;;;;;;;CAQC,GACD,OAAO,eAAeC,WAAcC,QAAgB;IAClD,MAAMC,UAAU,MAAMH,SAASE,UAAU;IAEzC,IAAI,CAACC,QAAQC,IAAI,IAAI;QACnB,OAAO,EAAE;IACX;IAEA,OAAOD,QACJC,IAAI,GACJC,KAAK,CAAC,MACNC,MAAM,CAACC,SACPC,GAAG,CAAC,CAACC,OAASC,KAAKC,KAAK,CAACF;AAC9B"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Detect the runtime environment.
3
+ *
4
+ * @returns The runtime environment.
5
+ *
6
+ * @internal
7
+ */
8
+ export declare function detectRuntime(): 'bun' | 'deno' | 'node';
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Detect the runtime environment.
3
+ *
4
+ * @returns The runtime environment.
5
+ *
6
+ * @internal
7
+ */ export function detectRuntime() {
8
+ if ('Deno' in globalThis) {
9
+ return 'deno';
10
+ }
11
+ if ('Bun' in globalThis) {
12
+ return 'bun';
13
+ }
14
+ // Consider using a more reliable way of detecting that we're actually in Node.js
15
+ // I first attempted using https://www.npmjs.com/package/is-really-node, but it fails
16
+ // due to using top level await.
17
+ return 'node';
18
+ }
19
+
20
+ //# sourceMappingURL=detectRuntime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/util/detectRuntime.ts"],"sourcesContent":["/**\n * Detect the runtime environment.\n *\n * @returns The runtime environment.\n *\n * @internal\n */\nexport function detectRuntime(): 'bun' | 'deno' | 'node' {\n if ('Deno' in globalThis) {\n return 'deno'\n }\n if ('Bun' in globalThis) {\n return 'bun'\n }\n // Consider using a more reliable way of detecting that we're actually in Node.js\n // I first attempted using https://www.npmjs.com/package/is-really-node, but it fails\n // due to using top level await.\n return 'node'\n}\n"],"names":["detectRuntime","globalThis"],"mappings":"AAAA;;;;;;CAMC,GACD,OAAO,SAASA;IACd,IAAI,UAAUC,YAAY;QACxB,OAAO;IACT;IACA,IAAI,SAASA,YAAY;QACvB,OAAO;IACT;IACA,iFAAiF;IACjF,qFAAqF;IACrF,gCAAgC;IAChC,OAAO;AACT"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Checks if the environment is staging.
3
+ *
4
+ * @returns True if the environment is staging, false otherwise
5
+ * @internal
6
+ */
7
+ export declare function isStaging(): boolean;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Checks if the environment is staging.
3
+ *
4
+ * @returns True if the environment is staging, false otherwise
5
+ * @internal
6
+ */ export function isStaging() {
7
+ return process.env.SANITY_INTERNAL_ENV === 'staging';
8
+ }
9
+
10
+ //# sourceMappingURL=isStaging.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/util/isStaging.ts"],"sourcesContent":["/**\n * Checks if the environment is staging.\n *\n * @returns True if the environment is staging, false otherwise\n * @internal\n */\nexport function isStaging(): boolean {\n return process.env.SANITY_INTERNAL_ENV === 'staging'\n}\n"],"names":["isStaging","process","env","SANITY_INTERNAL_ENV"],"mappings":"AAAA;;;;;CAKC,GACD,OAAO,SAASA;IACd,OAAOC,QAAQC,GAAG,CAACC,mBAAmB,KAAK;AAC7C"}
@@ -0,0 +1,35 @@
1
+ interface ParsedArguments<F = Record<string, string>> {
2
+ /**
3
+ * Command arguments, eg any arguments after `sanity <command>` (no flags)
4
+ */
5
+ argsWithoutOptions: string[];
6
+ argv: string[];
7
+ /**
8
+ * Options mostly relevant for the core CLI runner
9
+ */
10
+ coreOptions: {
11
+ debug: boolean;
12
+ help: boolean;
13
+ version: boolean;
14
+ };
15
+ /**
16
+ * Command flags, without the core options (help, debug, version etc)
17
+ */
18
+ extOptions: F;
19
+ /**
20
+ * Arguments after the ended argument list (--)
21
+ */
22
+ extraArguments: string[];
23
+ /**
24
+ * Group or command name, eg `dataset` (`sanity dataset`) or `import` (`sanity dataset import`)
25
+ */
26
+ groupOrCommand: string;
27
+ }
28
+ /**
29
+ * Parse the arguments from the command line
30
+ *
31
+ * @param argv - The arguments from the command line
32
+ * @returns The parsed arguments
33
+ */
34
+ export declare function parseArguments(argv?: string[]): ParsedArguments;
35
+ export {};
@@ -0,0 +1,42 @@
1
+ import minimist from 'minimist';
2
+ /**
3
+ * Parse the arguments from the command line
4
+ *
5
+ * @param argv - The arguments from the command line
6
+ * @returns The parsed arguments
7
+ */ export function parseArguments(argv = process.argv) {
8
+ const args = argv.slice(2);
9
+ const { '--': extraArguments, _, version, ...extOptions } = minimist(args, {
10
+ '--': true,
11
+ boolean: [
12
+ 'version'
13
+ ],
14
+ string: [
15
+ '_'
16
+ ]
17
+ });
18
+ const [groupOrCommand, ...argsWithoutOptions] = _;
19
+ const finalExtraArguments = [
20
+ ...extraArguments || [],
21
+ ...argv.filter((arg)=>arg.startsWith('-'))
22
+ ];
23
+ // oclif allows to run `sanity help` or `sanity help <command>`
24
+ // It does not fire the hooks on `--help` so this is okay to track
25
+ const hasHelp = args.includes('help');
26
+ // We only have global debug via env var
27
+ const hasDebug = !!process.env.DEBUG;
28
+ return {
29
+ groupOrCommand,
30
+ argsWithoutOptions,
31
+ argv,
32
+ extOptions,
33
+ extraArguments: finalExtraArguments,
34
+ coreOptions: {
35
+ debug: hasDebug,
36
+ help: hasHelp,
37
+ version
38
+ }
39
+ };
40
+ }
41
+
42
+ //# sourceMappingURL=parseArguments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/util/parseArguments.ts"],"sourcesContent":["import minimist from 'minimist'\n\ninterface ParsedArguments<F = Record<string, string>> {\n /**\n * Command arguments, eg any arguments after `sanity <command>` (no flags)\n */\n argsWithoutOptions: string[]\n\n // Raw, forwarded arguments, for commands that want to be more explicit about parsing\n argv: string[]\n\n /**\n * Options mostly relevant for the core CLI runner\n */\n coreOptions: {\n debug: boolean\n\n help: boolean\n\n version: boolean\n }\n\n /**\n * Command flags, without the core options (help, debug, version etc)\n */\n extOptions: F\n\n /**\n * Arguments after the ended argument list (--)\n */\n extraArguments: string[]\n\n /**\n * Group or command name, eg `dataset` (`sanity dataset`) or `import` (`sanity dataset import`)\n */\n groupOrCommand: string\n}\n\n/**\n * Parse the arguments from the command line\n *\n * @param argv - The arguments from the command line\n * @returns The parsed arguments\n */\nexport function parseArguments(argv = process.argv): ParsedArguments {\n const args = argv.slice(2)\n\n const {\n '--': extraArguments,\n _,\n version,\n ...extOptions\n } = minimist(args, {\n '--': true,\n boolean: ['version'],\n string: ['_'],\n })\n\n const [groupOrCommand, ...argsWithoutOptions] = _\n\n const finalExtraArguments = [\n ...(extraArguments || []),\n ...argv.filter((arg) => arg.startsWith('-')),\n ]\n\n // oclif allows to run `sanity help` or `sanity help <command>`\n // It does not fire the hooks on `--help` so this is okay to track\n const hasHelp = args.includes('help')\n\n // We only have global debug via env var\n const hasDebug = !!process.env.DEBUG\n\n return {\n groupOrCommand,\n\n argsWithoutOptions,\n argv,\n extOptions,\n extraArguments: finalExtraArguments,\n\n coreOptions: {\n debug: hasDebug,\n help: hasHelp,\n version,\n },\n }\n}\n"],"names":["minimist","parseArguments","argv","process","args","slice","extraArguments","_","version","extOptions","boolean","string","groupOrCommand","argsWithoutOptions","finalExtraArguments","filter","arg","startsWith","hasHelp","includes","hasDebug","env","DEBUG","coreOptions","debug","help"],"mappings":"AAAA,OAAOA,cAAc,WAAU;AAsC/B;;;;;CAKC,GACD,OAAO,SAASC,eAAeC,OAAOC,QAAQD,IAAI;IAChD,MAAME,OAAOF,KAAKG,KAAK,CAAC;IAExB,MAAM,EACJ,MAAMC,cAAc,EACpBC,CAAC,EACDC,OAAO,EACP,GAAGC,YACJ,GAAGT,SAASI,MAAM;QACjB,MAAM;QACNM,SAAS;YAAC;SAAU;QACpBC,QAAQ;YAAC;SAAI;IACf;IAEA,MAAM,CAACC,gBAAgB,GAAGC,mBAAmB,GAAGN;IAEhD,MAAMO,sBAAsB;WACtBR,kBAAkB,EAAE;WACrBJ,KAAKa,MAAM,CAAC,CAACC,MAAQA,IAAIC,UAAU,CAAC;KACxC;IAED,+DAA+D;IAC/D,kEAAkE;IAClE,MAAMC,UAAUd,KAAKe,QAAQ,CAAC;IAE9B,wCAAwC;IACxC,MAAMC,WAAW,CAAC,CAACjB,QAAQkB,GAAG,CAACC,KAAK;IAEpC,OAAO;QACLV;QAEAC;QACAX;QACAO;QACAH,gBAAgBQ;QAEhBS,aAAa;YACXC,OAAOJ;YACPK,MAAMP;YACNV;QACF;IACF;AACF"}
@@ -1637,6 +1637,12 @@
1637
1637
  "allowNo": false,
1638
1638
  "type": "boolean"
1639
1639
  },
1640
+ "allow-replacement-characters": {
1641
+ "description": "Allow unicode replacement characters in imported documents",
1642
+ "name": "allow-replacement-characters",
1643
+ "allowNo": false,
1644
+ "type": "boolean"
1645
+ },
1640
1646
  "allow-system-documents": {
1641
1647
  "description": "Imports system documents",
1642
1648
  "name": "allow-system-documents",
@@ -2781,6 +2787,118 @@
2781
2787
  "import.js"
2782
2788
  ]
2783
2789
  },
2790
+ "openapi:get": {
2791
+ "aliases": [],
2792
+ "args": {
2793
+ "slug": {
2794
+ "description": "Slug of the OpenAPI specification to retrieve",
2795
+ "name": "slug",
2796
+ "required": true
2797
+ }
2798
+ },
2799
+ "description": "Get an OpenAPI specification by slug",
2800
+ "examples": [
2801
+ {
2802
+ "command": "<%= config.bin %> <%= command.id %> query",
2803
+ "description": "Get a specification (YAML format, default)"
2804
+ },
2805
+ {
2806
+ "command": "<%= config.bin %> <%= command.id %> query --format=json",
2807
+ "description": "Get specification in JSON format"
2808
+ },
2809
+ {
2810
+ "command": "<%= config.bin %> <%= command.id %> query --web",
2811
+ "description": "Open specification in browser"
2812
+ },
2813
+ {
2814
+ "command": "<%= config.bin %> <%= command.id %> query > query-api.yaml",
2815
+ "description": "Pipe to file"
2816
+ }
2817
+ ],
2818
+ "flags": {
2819
+ "format": {
2820
+ "description": "Output format: yaml (default), json",
2821
+ "name": "format",
2822
+ "default": "yaml",
2823
+ "hasDynamicHelp": false,
2824
+ "multiple": false,
2825
+ "options": [
2826
+ "yaml",
2827
+ "json"
2828
+ ],
2829
+ "type": "option"
2830
+ },
2831
+ "web": {
2832
+ "char": "w",
2833
+ "description": "Open in web browser",
2834
+ "name": "web",
2835
+ "allowNo": false,
2836
+ "type": "boolean"
2837
+ }
2838
+ },
2839
+ "hasDynamicHelp": false,
2840
+ "hiddenAliases": [],
2841
+ "id": "openapi:get",
2842
+ "pluginAlias": "@sanity/cli",
2843
+ "pluginName": "@sanity/cli",
2844
+ "pluginType": "core",
2845
+ "strict": true,
2846
+ "isESM": true,
2847
+ "relativePath": [
2848
+ "dist",
2849
+ "commands",
2850
+ "openapi",
2851
+ "get.js"
2852
+ ]
2853
+ },
2854
+ "openapi:list": {
2855
+ "aliases": [],
2856
+ "args": {},
2857
+ "description": "List all available OpenAPI specifications",
2858
+ "examples": [
2859
+ {
2860
+ "command": "<%= config.bin %> <%= command.id %>",
2861
+ "description": "List all available OpenAPI specs"
2862
+ },
2863
+ {
2864
+ "command": "<%= config.bin %> <%= command.id %> --json",
2865
+ "description": "List with JSON output"
2866
+ },
2867
+ {
2868
+ "command": "<%= config.bin %> <%= command.id %> --web",
2869
+ "description": "Open HTTP Reference in browser"
2870
+ }
2871
+ ],
2872
+ "flags": {
2873
+ "json": {
2874
+ "description": "Output JSON",
2875
+ "name": "json",
2876
+ "allowNo": false,
2877
+ "type": "boolean"
2878
+ },
2879
+ "web": {
2880
+ "char": "w",
2881
+ "description": "Open HTTP Reference in web browser",
2882
+ "name": "web",
2883
+ "allowNo": false,
2884
+ "type": "boolean"
2885
+ }
2886
+ },
2887
+ "hasDynamicHelp": false,
2888
+ "hiddenAliases": [],
2889
+ "id": "openapi:list",
2890
+ "pluginAlias": "@sanity/cli",
2891
+ "pluginName": "@sanity/cli",
2892
+ "pluginType": "core",
2893
+ "strict": true,
2894
+ "isESM": true,
2895
+ "relativePath": [
2896
+ "dist",
2897
+ "commands",
2898
+ "openapi",
2899
+ "list.js"
2900
+ ]
2901
+ },
2784
2902
  "projects:list": {
2785
2903
  "aliases": [],
2786
2904
  "args": {},
@@ -3541,118 +3659,6 @@
3541
3659
  "list.js"
3542
3660
  ]
3543
3661
  },
3544
- "openapi:get": {
3545
- "aliases": [],
3546
- "args": {
3547
- "slug": {
3548
- "description": "Slug of the OpenAPI specification to retrieve",
3549
- "name": "slug",
3550
- "required": true
3551
- }
3552
- },
3553
- "description": "Get an OpenAPI specification by slug",
3554
- "examples": [
3555
- {
3556
- "command": "<%= config.bin %> <%= command.id %> query",
3557
- "description": "Get a specification (YAML format, default)"
3558
- },
3559
- {
3560
- "command": "<%= config.bin %> <%= command.id %> query --format=json",
3561
- "description": "Get specification in JSON format"
3562
- },
3563
- {
3564
- "command": "<%= config.bin %> <%= command.id %> query --web",
3565
- "description": "Open specification in browser"
3566
- },
3567
- {
3568
- "command": "<%= config.bin %> <%= command.id %> query > query-api.yaml",
3569
- "description": "Pipe to file"
3570
- }
3571
- ],
3572
- "flags": {
3573
- "format": {
3574
- "description": "Output format: yaml (default), json",
3575
- "name": "format",
3576
- "default": "yaml",
3577
- "hasDynamicHelp": false,
3578
- "multiple": false,
3579
- "options": [
3580
- "yaml",
3581
- "json"
3582
- ],
3583
- "type": "option"
3584
- },
3585
- "web": {
3586
- "char": "w",
3587
- "description": "Open in web browser",
3588
- "name": "web",
3589
- "allowNo": false,
3590
- "type": "boolean"
3591
- }
3592
- },
3593
- "hasDynamicHelp": false,
3594
- "hiddenAliases": [],
3595
- "id": "openapi:get",
3596
- "pluginAlias": "@sanity/cli",
3597
- "pluginName": "@sanity/cli",
3598
- "pluginType": "core",
3599
- "strict": true,
3600
- "isESM": true,
3601
- "relativePath": [
3602
- "dist",
3603
- "commands",
3604
- "openapi",
3605
- "get.js"
3606
- ]
3607
- },
3608
- "openapi:list": {
3609
- "aliases": [],
3610
- "args": {},
3611
- "description": "List all available OpenAPI specifications",
3612
- "examples": [
3613
- {
3614
- "command": "<%= config.bin %> <%= command.id %>",
3615
- "description": "List all available OpenAPI specs"
3616
- },
3617
- {
3618
- "command": "<%= config.bin %> <%= command.id %> --json",
3619
- "description": "List with JSON output"
3620
- },
3621
- {
3622
- "command": "<%= config.bin %> <%= command.id %> --web",
3623
- "description": "Open HTTP Reference in browser"
3624
- }
3625
- ],
3626
- "flags": {
3627
- "json": {
3628
- "description": "Output JSON",
3629
- "name": "json",
3630
- "allowNo": false,
3631
- "type": "boolean"
3632
- },
3633
- "web": {
3634
- "char": "w",
3635
- "description": "Open HTTP Reference in web browser",
3636
- "name": "web",
3637
- "allowNo": false,
3638
- "type": "boolean"
3639
- }
3640
- },
3641
- "hasDynamicHelp": false,
3642
- "hiddenAliases": [],
3643
- "id": "openapi:list",
3644
- "pluginAlias": "@sanity/cli",
3645
- "pluginName": "@sanity/cli",
3646
- "pluginType": "core",
3647
- "strict": true,
3648
- "isESM": true,
3649
- "relativePath": [
3650
- "dist",
3651
- "commands",
3652
- "openapi",
3653
- "list.js"
3654
- ]
3655
- },
3656
3662
  "dataset:alias:create": {
3657
3663
  "aliases": [],
3658
3664
  "args": {
@@ -3947,5 +3953,5 @@
3947
3953
  ]
3948
3954
  }
3949
3955
  },
3950
- "version": "6.0.0-alpha.6"
3956
+ "version": "6.0.0-alpha.7"
3951
3957
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/cli",
3
- "version": "6.0.0-alpha.6",
3
+ "version": "6.0.0-alpha.7",
4
4
  "description": "Sanity CLI tool for managing Sanity projects and organizations",
5
5
  "keywords": [
6
6
  "sanity",
@@ -49,15 +49,15 @@
49
49
  "@oclif/plugin-not-found": "^3.2.73",
50
50
  "@sanity/client": "^7.14.0",
51
51
  "@sanity/descriptors": "^1.3.0",
52
- "@sanity/export": "^6.0.2",
52
+ "@sanity/export": "^6.0.5",
53
53
  "@sanity/id-utils": "^1.0.0",
54
- "@sanity/import": "^4.0.3",
55
- "@sanity/migrate": "^5.2.1",
56
- "@sanity/runtime-cli": "^12.4.0",
57
- "@sanity/schema": "^5.3.1",
54
+ "@sanity/import": "^4.1.0",
55
+ "@sanity/migrate": "^5.2.2",
56
+ "@sanity/runtime-cli": "^13.0.3",
57
+ "@sanity/schema": "^5.5.0",
58
58
  "@sanity/telemetry": "^0.8.1",
59
59
  "@sanity/template-validator": "^2.4.3",
60
- "@sanity/types": "^5.3.1",
60
+ "@sanity/types": "^5.5.0",
61
61
  "@sanity/ui": "^3.1.11",
62
62
  "@vercel/frameworks": "3.8.4",
63
63
  "@vercel/fs-detectors": "5.5.2",
@@ -78,6 +78,7 @@
78
78
  "isomorphic-dompurify": "^2.32.0",
79
79
  "json5": "^2.2.3",
80
80
  "lodash-es": "^4.17.21",
81
+ "minimist": "^1.2.8",
81
82
  "nanoid": "^5.1.5",
82
83
  "node-html-parser": "^7.0.1",
83
84
  "oneline": "^2.0.0",
@@ -94,7 +95,7 @@
94
95
  "read-package-up": "^11.0.0",
95
96
  "resolve-from": "^5.0.0",
96
97
  "rxjs": "^7.8.1",
97
- "sanity": "^5.3.1",
98
+ "sanity": "^5.5.0",
98
99
  "semver": "^7.7.2",
99
100
  "semver-compare": "^1.0.0",
100
101
  "styled-components": "^6.1.19",
@@ -103,10 +104,11 @@
103
104
  "tar-stream": "^3.1.7",
104
105
  "tinyglobby": "^0.2.15",
105
106
  "tsx": "^4.21.0",
107
+ "typeid-js": "^1.2.0",
106
108
  "vite": "^7.3.1",
107
109
  "which": "^5.0.0",
108
110
  "zod": "^4.3.5",
109
- "@sanity/cli-core": "0.1.0-alpha.6"
111
+ "@sanity/cli-core": "0.1.0-alpha.7"
110
112
  },
111
113
  "devDependencies": {
112
114
  "@eslint/compat": "^2.0.1",
@@ -116,7 +118,8 @@
116
118
  "@types/debug": "^4.1.12",
117
119
  "@types/gunzip-maybe": "^1.4.3",
118
120
  "@types/lodash-es": "^4.17.12",
119
- "@types/node": "^20.19.27",
121
+ "@types/minimist": "^1.2.5",
122
+ "@types/node": "^20.19.30",
120
123
  "@types/react": "^19.2.7",
121
124
  "@types/react-dom": "^19.2.3",
122
125
  "@types/react-is": "^19.2.0",
@@ -136,7 +139,7 @@
136
139
  "vite-tsconfig-paths": "^6.0.3",
137
140
  "vitest": "^4.0.17",
138
141
  "@repo/tsconfig": "3.70.0",
139
- "@sanity/cli-test": "0.0.2-alpha.5",
142
+ "@sanity/cli-test": "0.0.2-alpha.6",
140
143
  "@sanity/eslint-config-cli": "0.0.0-alpha.1"
141
144
  },
142
145
  "engines": {
@@ -154,11 +157,11 @@
154
157
  "manifest:generate": "oclif manifest",
155
158
  "manifest:remove": "rimraf oclif.manifest.json",
156
159
  "publint": "publint",
160
+ "readme": "oclif readme --tsconfig-path tsconfig.lib.json",
157
161
  "test": "vitest run",
158
162
  "posttest": "pnpm run lint",
159
163
  "test:coverage": "vitest run --coverage",
160
164
  "test:watch": "vitest",
161
- "version": "oclif readme && git add README.md",
162
165
  "prewatch": "pnpm run manifest:remove",
163
166
  "watch": "swc --delete-dir-on-start --strip-leading-paths --out-dir dist/ --watch src"
164
167
  }