@sanity/runtime-cli 10.9.2 → 10.11.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.
Files changed (42) hide show
  1. package/README.md +39 -18
  2. package/dist/actions/blueprints/config.d.ts +1 -1
  3. package/dist/actions/blueprints/config.js +2 -11
  4. package/dist/actions/blueprints/stacks.d.ts +1 -0
  5. package/dist/actions/blueprints/stacks.js +1 -0
  6. package/dist/actions/functions/dev.d.ts +2 -1
  7. package/dist/actions/functions/dev.js +2 -2
  8. package/dist/commands/blueprints/doctor.d.ts +10 -0
  9. package/dist/commands/blueprints/doctor.js +28 -0
  10. package/dist/commands/functions/dev.d.ts +1 -0
  11. package/dist/commands/functions/dev.js +5 -0
  12. package/dist/cores/blueprints/doctor.d.ts +9 -0
  13. package/dist/cores/blueprints/doctor.js +188 -0
  14. package/dist/cores/functions/dev.d.ts +1 -0
  15. package/dist/cores/functions/dev.js +6 -2
  16. package/dist/cores/index.d.ts +4 -1
  17. package/dist/server/app.d.ts +2 -1
  18. package/dist/server/app.js +3 -3
  19. package/dist/server/handlers/invoke.d.ts +2 -2
  20. package/dist/server/handlers/invoke.js +3 -3
  21. package/dist/utils/get-headers.js +1 -0
  22. package/oclif.manifest.json +46 -1
  23. package/package.json +2 -1
  24. package/dist/server/static/api.d.ts +0 -24
  25. package/dist/server/static/components/api-base.d.ts +0 -20
  26. package/dist/server/static/components/clear-button.d.ts +0 -6
  27. package/dist/server/static/components/codemirror-theme.d.ts +0 -6
  28. package/dist/server/static/components/console-panel.d.ts +0 -1
  29. package/dist/server/static/components/fetch-button.d.ts +0 -7
  30. package/dist/server/static/components/filters.d.ts +0 -1
  31. package/dist/server/static/components/function-list.d.ts +0 -1
  32. package/dist/server/static/components/help-button.d.ts +0 -3
  33. package/dist/server/static/components/network-spinner.d.ts +0 -1
  34. package/dist/server/static/components/payload-panel.d.ts +0 -1
  35. package/dist/server/static/components/response-panel.d.ts +0 -1
  36. package/dist/server/static/components/rule-panel.d.ts +0 -1
  37. package/dist/server/static/components/run-panel.d.ts +0 -1
  38. package/dist/server/static/components/select-dropdown.d.ts +0 -1
  39. package/dist/server/static/components/toggle-switch.d.ts +0 -11
  40. package/dist/server/static/hot-reload.d.ts +0 -1
  41. package/dist/server/static/vendor/vendor.bundle.d.ts +0 -2008
  42. package/dist/utils/child-process-wrapper.d.ts +0 -1
@@ -351,6 +351,42 @@
351
351
  "destroy.js"
352
352
  ]
353
353
  },
354
+ "blueprints:doctor": {
355
+ "aliases": [],
356
+ "args": {},
357
+ "description": "Diagnose potential issues with Blueprint configuration",
358
+ "examples": [],
359
+ "flags": {
360
+ "verbose": {
361
+ "description": "Provide detailed information about issues",
362
+ "name": "verbose",
363
+ "allowNo": false,
364
+ "type": "boolean"
365
+ },
366
+ "path": {
367
+ "description": "Path to the Blueprint configuration file",
368
+ "name": "path",
369
+ "hasDynamicHelp": false,
370
+ "multiple": false,
371
+ "type": "option"
372
+ }
373
+ },
374
+ "hasDynamicHelp": false,
375
+ "hiddenAliases": [],
376
+ "id": "blueprints:doctor",
377
+ "pluginAlias": "@sanity/runtime-cli",
378
+ "pluginName": "@sanity/runtime-cli",
379
+ "pluginType": "core",
380
+ "strict": true,
381
+ "enableJsonFlag": false,
382
+ "isESM": true,
383
+ "relativePath": [
384
+ "dist",
385
+ "commands",
386
+ "blueprints",
387
+ "doctor.js"
388
+ ]
389
+ },
354
390
  "blueprints:info": {
355
391
  "aliases": [],
356
392
  "args": {},
@@ -638,6 +674,15 @@
638
674
  "hasDynamicHelp": false,
639
675
  "multiple": false,
640
676
  "type": "option"
677
+ },
678
+ "timeout": {
679
+ "char": "t",
680
+ "description": "Maximum execution time for all functions, in seconds. Takes precedence over function-specific `timeout`",
681
+ "name": "timeout",
682
+ "required": false,
683
+ "hasDynamicHelp": false,
684
+ "multiple": false,
685
+ "type": "option"
641
686
  }
642
687
  },
643
688
  "hasDynamicHelp": false,
@@ -1132,5 +1177,5 @@
1132
1177
  ]
1133
1178
  }
1134
1179
  },
1135
- "version": "10.9.2"
1180
+ "version": "10.11.0"
1136
1181
  }
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.9.2",
4
+ "version": "10.11.0",
5
5
  "author": "Sanity Runtime Team",
6
6
  "type": "module",
7
7
  "license": "MIT",
@@ -71,6 +71,7 @@
71
71
  "test": "vitest run",
72
72
  "test:depmgmt": "vitest run --config ./test-depmgmt/vitest.config.ts",
73
73
  "test:integration": "cd test/integration && npm run typecheck",
74
+ "typecheck": "tsc --project tsconfig.typecheck.json",
74
75
  "posttest": "npm run lint",
75
76
  "test:watch": "vitest",
76
77
  "watch": "tsc --watch"
@@ -1,24 +0,0 @@
1
- export default function API(): {
2
- blueprint: typeof blueprint;
3
- document: typeof document;
4
- invoke: typeof invoke;
5
- projects: typeof projects;
6
- datasets: typeof datasets;
7
- store: any;
8
- subscribe: any;
9
- unsubscribe: any;
10
- };
11
- declare function blueprint(): void;
12
- declare function document({ projectId, dataset, docId }: {
13
- projectId: any;
14
- dataset: any;
15
- docId: any;
16
- }): Promise<void>;
17
- declare function invoke({ context, event, metadata }: {
18
- context: any;
19
- event: any;
20
- metadata: any;
21
- }): void;
22
- declare function projects(): void;
23
- declare function datasets(selectedProject: any): void;
24
- export {};
@@ -1,20 +0,0 @@
1
- export class ApiBaseElement extends HTMLElement {
2
- api: {
3
- blueprint: () => void;
4
- document: ({ projectId, dataset, docId }: {
5
- projectId: any;
6
- dataset: any;
7
- docId: any;
8
- }) => Promise<void>;
9
- invoke: ({ context, event, metadata }: {
10
- context: any;
11
- event: any;
12
- metadata: any;
13
- }) => void;
14
- projects: () => void;
15
- datasets: (selectedProject: any) => void;
16
- store: any;
17
- subscribe: any;
18
- unsubscribe: any;
19
- };
20
- }
@@ -1,6 +0,0 @@
1
- export class ClearButton extends ApiBaseElement {
2
- connectedCallback(): void;
3
- disconnectedCallback(): void;
4
- clear: () => void;
5
- }
6
- import { ApiBaseElement } from './api-base.js';
@@ -1,6 +0,0 @@
1
- export const sanityHighlightStyle: HighlightStyle;
2
- export const sanityCodeMirrorTheme: {
3
- inner: any;
4
- prec: any;
5
- }[][];
6
- import { HighlightStyle } from '../vendor/vendor.bundle.js';
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- export class FetchButton extends ApiBaseElement {
2
- connectedCallback(): void;
3
- button: HTMLButtonElement | null | undefined;
4
- disconnectedCallback(): void;
5
- fetchDoc: () => Promise<void>;
6
- }
7
- import { ApiBaseElement } from './api-base.js';
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- export class HelpButton extends ApiBaseElement {
2
- }
3
- import { ApiBaseElement } from './api-base.js';
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- export class ToggleSwitch extends ApiBaseElement {
2
- static get observedAttributes(): string[];
3
- connectedCallback(): void;
4
- toggleKey: string | null | undefined;
5
- disconnectedCallback(): void;
6
- attributeChangedCallback(name: any): void;
7
- set checked(value: boolean);
8
- get checked(): boolean;
9
- toggle: () => void;
10
- }
11
- import { ApiBaseElement } from './api-base.js';
@@ -1 +0,0 @@
1
- export {};