@sanity/runtime-cli 17.1.0-next.gcfbd613 → 17.2.0-blueprinit.gd1553d6

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 (52) hide show
  1. package/README.md +35 -26
  2. package/dist/actions/blueprinit/manifest.d.ts +13 -0
  3. package/dist/actions/blueprinit/manifest.js +57 -0
  4. package/dist/actions/blueprinit/studio.d.ts +6 -0
  5. package/dist/actions/blueprinit/studio.js +43 -0
  6. package/dist/actions/blueprinit/templates.d.ts +34 -0
  7. package/dist/actions/blueprinit/templates.js +83 -0
  8. package/dist/actions/blueprinit/workspace.d.ts +15 -0
  9. package/dist/actions/blueprinit/workspace.js +142 -0
  10. package/dist/actions/blueprints/assets.js +15 -24
  11. package/dist/actions/blueprints/pre-deploy.d.ts +29 -0
  12. package/dist/actions/blueprints/pre-deploy.js +164 -0
  13. package/dist/actions/sanity/datasets.d.ts +15 -0
  14. package/dist/actions/sanity/datasets.js +26 -0
  15. package/dist/commands/blueprinit.d.ts +13 -0
  16. package/dist/commands/blueprinit.js +44 -0
  17. package/dist/commands/functions/env/add.d.ts +3 -0
  18. package/dist/commands/functions/env/add.js +6 -2
  19. package/dist/commands/functions/env/list.d.ts +3 -0
  20. package/dist/commands/functions/env/list.js +9 -3
  21. package/dist/commands/functions/env/remove.d.ts +3 -0
  22. package/dist/commands/functions/env/remove.js +9 -3
  23. package/dist/constants.d.ts +1 -0
  24. package/dist/constants.js +1 -0
  25. package/dist/cores/blueprinit/adopt.d.ts +6 -0
  26. package/dist/cores/blueprinit/adopt.js +90 -0
  27. package/dist/cores/blueprinit/finish.d.ts +14 -0
  28. package/dist/cores/blueprinit/finish.js +36 -0
  29. package/dist/cores/blueprinit/fresh.d.ts +3 -0
  30. package/dist/cores/blueprinit/fresh.js +88 -0
  31. package/dist/cores/blueprinit/prompts.d.ts +4 -0
  32. package/dist/cores/blueprinit/prompts.js +14 -0
  33. package/dist/cores/blueprinit/selection.d.ts +15 -0
  34. package/dist/cores/blueprinit/selection.js +63 -0
  35. package/dist/cores/blueprinit/types.d.ts +13 -0
  36. package/dist/cores/blueprinit/types.js +1 -0
  37. package/dist/cores/blueprinit.d.ts +7 -0
  38. package/dist/cores/blueprinit.js +39 -0
  39. package/dist/cores/blueprints/deploy.js +16 -64
  40. package/dist/utils/functions/child-process-wrapper.js +13 -171
  41. package/dist/utils/functions/child-runtime/console.d.ts +1 -0
  42. package/dist/utils/functions/child-runtime/console.js +50 -0
  43. package/dist/utils/functions/child-runtime/invoke.d.ts +4 -0
  44. package/dist/utils/functions/child-runtime/invoke.js +47 -0
  45. package/dist/utils/functions/child-runtime/resources.d.ts +4 -0
  46. package/dist/utils/functions/child-runtime/resources.js +59 -0
  47. package/dist/utils/studios/prepare-asset.d.ts +6 -0
  48. package/dist/utils/studios/prepare-asset.js +139 -0
  49. package/dist/utils/types.d.ts +4 -7
  50. package/dist/utils/types.js +2 -3
  51. package/oclif.manifest.json +104 -7
  52. package/package.json +9 -3
@@ -0,0 +1,47 @@
1
+ import process from 'node:process'
2
+
3
+ export function createInvoker() {
4
+ /**
5
+ * Pending nested `context.invoke` calls, keyed by correlation id. Each entry
6
+ * holds the resolve/reject of the Promise returned to the user's handler; it is
7
+ * settled when the matching `invoke-response` arrives from the parent.
8
+ * @type {Map<string, {resolve: (value: unknown) => void, reject: (reason: Error) => void}>}
9
+ */
10
+ const pending = new Map()
11
+ let invokeSeq = 0
12
+
13
+ /**
14
+ * `context.invoke(name, payload)` — ask the parent to execute another blueprint
15
+ * function and resolve with its return value. Sent over IPC and correlated by id.
16
+ * @param {string} name
17
+ * @param {Record<string, unknown>} [payload]
18
+ * @returns {Promise<unknown>}
19
+ */
20
+ function invoke(name, payload = {}) {
21
+ if (typeof name !== 'string' || name.length === 0) {
22
+ return Promise.reject(new Error('context.invoke requires a function name'))
23
+ }
24
+ const id = String(++invokeSeq)
25
+ return new Promise((resolve, reject) => {
26
+ pending.set(id, {resolve, reject})
27
+ process.send(JSON.stringify({type: 'invoke-request', id, name, payload}))
28
+ })
29
+ }
30
+
31
+ function handleResponse(msg) {
32
+ const pendingEntry = pending.get(msg.id)
33
+ if (!pendingEntry) return
34
+ pending.delete(msg.id)
35
+ if (msg.ok) {
36
+ pendingEntry.resolve(msg.result?.json)
37
+ } else {
38
+ const {message, stack, name} = msg.error ?? {}
39
+ const err = new Error(message ?? 'Nested invoke failed')
40
+ if (stack) err.stack = stack
41
+ if (name) err.name = name
42
+ pendingEntry.reject(err)
43
+ }
44
+ }
45
+
46
+ return {invoke, handleResponse}
47
+ }
@@ -0,0 +1,4 @@
1
+ import type {ResourcesApi} from '@sanity/functions'
2
+ import type {GroupedBlueprintResources} from '../../blueprints/group-resources.js'
3
+
4
+ export function createResourcesApi(resources: GroupedBlueprintResources): ResourcesApi
@@ -0,0 +1,59 @@
1
+ /**
2
+ * The returned proxy wraps a function so the API itself is callable.
3
+ * @param {Record<string, ResourceEntry[]>} resources
4
+ * @returns {ResourcesApi}
5
+ */
6
+ export function createResourcesApi(resources) {
7
+ const findByName = (name) => {
8
+ for (const group of Object.values(resources)) {
9
+ const found = group.find((r) => r.name === name)
10
+ if (found) return found
11
+ }
12
+ return undefined
13
+ }
14
+ let allCache
15
+ const all = () => (allCache ??= Object.values(resources).flat())
16
+
17
+ return /** @type {ResourcesApi} */ (
18
+ /** @type {unknown} */ (
19
+ /*
20
+ * The Proxy target is `findByName`, so invoking the API as a function —
21
+ * `context.resources('my-proj')` — bypasses the `get` trap entirely and
22
+ * calls `findByName` directly for a cross-type lookup by name.
23
+ */
24
+ new Proxy(findByName, {
25
+ get: (_target, prop) => {
26
+ // context.resources.all() — flat array of every resource across types
27
+ if (prop === 'all') return all
28
+ // [...context.resources] / for (const r of context.resources) — iterate all
29
+ if (prop === Symbol.iterator) {
30
+ return function* () {
31
+ yield* all()
32
+ }
33
+ }
34
+
35
+ /**
36
+ * Symbol property access (other than iterator above) and `then`
37
+ * lookups return undefined. The `then` guard prevents the API from
38
+ * looking like a thenable, so `await context.resources` resolves to
39
+ * the proxy itself rather than hanging or unwrapping unexpectedly.
40
+ */
41
+ if (typeof prop !== 'string' || prop === 'then') {
42
+ return undefined
43
+ }
44
+
45
+ /**
46
+ * context.resources.<type>(name) — per-type lookup,
47
+ * e.g. context.resources.project('my-proj').
48
+ * Returns a function so the caller supplies the name;
49
+ * unknown types yield a function that always returns undefined.
50
+ */
51
+ return (/** @type {string} */ name) =>
52
+ Object.hasOwn(resources, prop)
53
+ ? resources[prop].find((r) => r.name === name)
54
+ : undefined
55
+ },
56
+ })
57
+ )
58
+ )
59
+ }
@@ -0,0 +1,6 @@
1
+ import type { BlueprintStudioResource } from '@sanity/blueprints';
2
+ import type { AssetPrepResult } from '../types.js';
3
+ export declare function prepareStudioAsset({ blueprintFileDir, resource, }: {
4
+ blueprintFileDir: string;
5
+ resource: BlueprintStudioResource;
6
+ }): Promise<AssetPrepResult>;
@@ -0,0 +1,139 @@
1
+ import { createWriteStream } from 'node:fs';
2
+ import { mkdtemp, rm, stat } from 'node:fs/promises';
3
+ import { tmpdir } from 'node:os';
4
+ import path, { basename, dirname, join } from 'node:path';
5
+ import { pipeline } from 'node:stream/promises';
6
+ import { createGzip } from 'node:zlib';
7
+ import { buildStudio, compareDependencyVersions } from '@sanity/cli-build/_internal/build';
8
+ import { pack } from 'tar-fs';
9
+ export async function prepareStudioAsset({ blueprintFileDir, resource, }) {
10
+ // validate resource has an externalId
11
+ if (!('externalId' in resource) ||
12
+ typeof resource.externalId !== 'string' ||
13
+ !resource.externalId) {
14
+ return {
15
+ success: false,
16
+ async cleanup() {
17
+ // no op
18
+ },
19
+ error: `Unable to determine appId for sanity.studio resource '${resource.name}'`,
20
+ };
21
+ }
22
+ let cleanup = async () => {
23
+ // no op
24
+ };
25
+ const studioPath = path.resolve(blueprintFileDir, resource.src);
26
+ try {
27
+ const studioPathStat = await stat(studioPath);
28
+ if (!studioPathStat.isDirectory()) {
29
+ return {
30
+ success: false,
31
+ cleanup,
32
+ error: `Property 'src' on resource with type '${resource.type}' must be a directory`,
33
+ };
34
+ }
35
+ }
36
+ catch (error) {
37
+ const msg = error instanceof Error ? error.message : String(error);
38
+ return {
39
+ success: false,
40
+ cleanup,
41
+ error: `Unable to read given 'src' on resource with type '${resource.type}': ${msg}`,
42
+ };
43
+ }
44
+ try {
45
+ const outDir = await mkdtemp(join(tmpdir(), `studio-build-`));
46
+ const outFile = `${outDir}.tar.gz`;
47
+ cleanup = async () => {
48
+ await rm(outDir, { force: true, recursive: true });
49
+ await rm(outFile, { force: true });
50
+ };
51
+ const appId = resource.externalId;
52
+ try {
53
+ await buildStudio({
54
+ appId,
55
+ autoUpdatesEnabled: resource.autoUpdates.enabled,
56
+ checkAppId() { },
57
+ async compareDependencyVersions(packages) {
58
+ return compareDependencyVersions(packages, studioPath, { appId });
59
+ },
60
+ determineBasePath() {
61
+ return resource.basePath ?? '/';
62
+ },
63
+ isApp: false,
64
+ isWorkbenchApp: false,
65
+ minify: resource.minify ?? true,
66
+ outDir,
67
+ output: createSilentOutput(),
68
+ reactCompiler: resource.reactCompiler || false,
69
+ schemaExtraction: undefined,
70
+ sourceMap: resource.sourceMap ?? false,
71
+ stats: false,
72
+ unattendedMode: true,
73
+ // TODO pass in vite config from the studio resource
74
+ vite: undefined,
75
+ workDir: studioPath,
76
+ eventListener: {
77
+ onBuildFail({ message }) {
78
+ throw new Error(message);
79
+ },
80
+ onInvalidStyledComponentsVersionRange({ message }) {
81
+ throw new Error(message);
82
+ },
83
+ onNoDeclaredStyledComponentsVersion({ message }) {
84
+ throw new Error(message);
85
+ },
86
+ onNoInstalledSanityVersion({ message }) {
87
+ throw new Error(message);
88
+ },
89
+ onNoInstalledStyledComponentsVersion({ message }) {
90
+ throw new Error(message);
91
+ },
92
+ onPreReleaseInNonInteractiveAutoUpdate({ message }) {
93
+ throw new Error(message);
94
+ },
95
+ },
96
+ });
97
+ }
98
+ catch (error) {
99
+ const message = error instanceof Error ? error.message : String(error);
100
+ return {
101
+ success: false,
102
+ cleanup,
103
+ error: message,
104
+ };
105
+ }
106
+ // tar/gzip/write the built output
107
+ await pipeline(pack(dirname(outDir), { entries: [basename(outDir)] }), createGzip(), createWriteStream(outFile));
108
+ return {
109
+ success: true,
110
+ cleanup,
111
+ // studio must be pre built (e.g. with `npm run build`) and tarred/gzipped
112
+ outputPath: outFile,
113
+ };
114
+ }
115
+ catch (error) {
116
+ return {
117
+ success: false,
118
+ cleanup,
119
+ error: error instanceof Error ? error.message : String(error),
120
+ };
121
+ }
122
+ }
123
+ function createSilentOutput() {
124
+ return {
125
+ error(input, options) {
126
+ if (typeof options?.exit === 'number') {
127
+ if (input instanceof Error) {
128
+ throw input;
129
+ }
130
+ throw new Error(input);
131
+ }
132
+ return undefined;
133
+ },
134
+ log() { },
135
+ warn(input) {
136
+ return input;
137
+ },
138
+ };
139
+ }
@@ -1,4 +1,4 @@
1
- import { type BlueprintCorsOriginResource, type BlueprintDatasetResource, type BlueprintDocumentFunctionResource, type BlueprintDocumentWebhookResource, type BlueprintMediaLibraryAssetFunctionResource, type BlueprintProjectResource, type BlueprintResource, type BlueprintRobotResource, type BlueprintRoleResource, type BlueprintScheduledFunctionResource, type BlueprintSyncTagInvalidateFunctionResource } from '@sanity/blueprints';
1
+ import { type BlueprintCorsOriginResource, type BlueprintDatasetResource, type BlueprintDocumentFunctionResource, type BlueprintDocumentWebhookResource, type BlueprintMediaLibraryAssetFunctionResource, type BlueprintProjectResource, type BlueprintResource, type BlueprintRobotResource, type BlueprintRoleResource, type BlueprintScheduledFunctionResource, type BlueprintStudioResource, type BlueprintSyncTagInvalidateFunctionResource } from '@sanity/blueprints';
2
2
  export type ScopeType = 'organization' | 'project';
3
3
  /** Result utility type */
4
4
  export type Result<T, E = string> = {
@@ -16,12 +16,8 @@ export interface ActionResponse {
16
16
  /** @internal */
17
17
  export type FunctionGroqResource = BlueprintDocumentFunctionResource | BlueprintMediaLibraryAssetFunctionResource;
18
18
  export type FunctionResource = FunctionGroqResource | BlueprintScheduledFunctionResource | BlueprintSyncTagInvalidateFunctionResource;
19
- export interface StudioResource extends BlueprintResource {
20
- type: 'sanity.studio';
21
- src: string;
22
- }
23
19
  /** Resource types that carry a deployable asset (have src: string) */
24
- export type AssetResource = FunctionResource | StudioResource;
20
+ export type AssetResource = FunctionResource | BlueprintStudioResource;
25
21
  /** @internal */
26
22
  export interface AuthParams {
27
23
  token: string;
@@ -46,7 +42,7 @@ export declare function isProjectResource(r: unknown): r is BlueprintProjectReso
46
42
  export declare function isRobotResource(r: unknown): r is BlueprintRobotResource;
47
43
  export declare function isRoleResource(r: unknown): r is BlueprintRoleResource;
48
44
  export declare function isDatasetResource(r: unknown): r is BlueprintDatasetResource;
49
- export declare function isStudioResource(r: BlueprintResource): r is StudioResource;
45
+ export declare function isStudioResource(r: BlueprintResource): r is BlueprintStudioResource;
50
46
  export declare function isAssetResource(r: BlueprintResource): r is AssetResource;
51
47
  export declare function isWebhookResource(r: unknown): r is BlueprintDocumentWebhookResource;
52
48
  interface StackBase {
@@ -84,6 +80,7 @@ export interface StackMutation {
84
80
  resources?: BlueprintResource[];
85
81
  };
86
82
  userMessage?: string;
83
+ preDeploy?: boolean;
87
84
  }
88
85
  /** @internal */
89
86
  export interface BuildPayloadOptions {
@@ -1,5 +1,5 @@
1
1
  import { validateCorsOrigin, validateDataset, validateDocumentWebhook, validateProject, validateRobot, validateRole, } from '@sanity/blueprints';
2
- import { SANITY_FUNCTION_PREFIX } from '../constants.js';
2
+ import { SANITY_FUNCTION_PREFIX, SANITY_STUDIO } from '../constants.js';
3
3
  export function isLocalFunctionResource(r) {
4
4
  return r.type.startsWith(SANITY_FUNCTION_PREFIX);
5
5
  }
@@ -22,9 +22,8 @@ export function isRoleResource(r) {
22
22
  export function isDatasetResource(r) {
23
23
  return validateDataset(r).length === 0;
24
24
  }
25
- // TODO: update to use blueprints helpers once available
26
25
  export function isStudioResource(r) {
27
- return r.type === 'sanity.studio';
26
+ return r.type === SANITY_STUDIO;
28
27
  }
29
28
  export function isAssetResource(r) {
30
29
  return isLocalFunctionResource(r) || isStudioResource(r);
@@ -1,5 +1,102 @@
1
1
  {
2
2
  "commands": {
3
+ "blueprinit": {
4
+ "aliases": [],
5
+ "args": {},
6
+ "description": "Scaffolds a Blueprint, Studio, and starter function around an existing Sanity project.\n\nThis hidden command is an experiment; its interface and generated files are not stable.",
7
+ "examples": [
8
+ "<%= config.bin %> <%= command.id %>",
9
+ "<%= config.bin %> <%= command.id %> --yes"
10
+ ],
11
+ "flags": {
12
+ "json": {
13
+ "description": "Format output as json",
14
+ "name": "json",
15
+ "allowNo": false,
16
+ "type": "boolean"
17
+ },
18
+ "path": {
19
+ "aliases": [
20
+ "blueprint-path"
21
+ ],
22
+ "char": "p",
23
+ "description": "Path to a Blueprint file or directory containing one",
24
+ "env": "SANITY_BLUEPRINT_PATH",
25
+ "hidden": true,
26
+ "name": "path",
27
+ "hasDynamicHelp": false,
28
+ "multiple": false,
29
+ "type": "option"
30
+ },
31
+ "trace": {
32
+ "description": "Trace output",
33
+ "hidden": true,
34
+ "name": "trace",
35
+ "allowNo": false,
36
+ "type": "boolean"
37
+ },
38
+ "validate-resources": {
39
+ "description": "Validate resources",
40
+ "hidden": true,
41
+ "name": "validate-resources",
42
+ "allowNo": true,
43
+ "type": "boolean"
44
+ },
45
+ "verbose": {
46
+ "description": "Verbose output",
47
+ "hidden": true,
48
+ "name": "verbose",
49
+ "allowNo": false,
50
+ "type": "boolean"
51
+ },
52
+ "yes": {
53
+ "char": "y",
54
+ "description": "Skip confirmation prompts",
55
+ "name": "yes",
56
+ "allowNo": false,
57
+ "type": "boolean"
58
+ },
59
+ "organization-id": {
60
+ "aliases": [
61
+ "organization",
62
+ "organizationId",
63
+ "org"
64
+ ],
65
+ "description": "Organization to use when the account has several",
66
+ "name": "organization-id",
67
+ "hasDynamicHelp": false,
68
+ "multiple": false,
69
+ "type": "option"
70
+ },
71
+ "project-id": {
72
+ "aliases": [
73
+ "project",
74
+ "projectId"
75
+ ],
76
+ "description": "Project to use when the organization has several",
77
+ "name": "project-id",
78
+ "hasDynamicHelp": false,
79
+ "multiple": false,
80
+ "type": "option"
81
+ }
82
+ },
83
+ "hasDynamicHelp": false,
84
+ "hidden": true,
85
+ "hiddenAliases": [],
86
+ "id": "blueprinit",
87
+ "pluginAlias": "@sanity/runtime-cli",
88
+ "pluginName": "@sanity/runtime-cli",
89
+ "pluginType": "core",
90
+ "strict": true,
91
+ "summary": "Experimental blueprints-first project init",
92
+ "enableJsonFlag": true,
93
+ "isESM": true,
94
+ "relativePath": [
95
+ "dist",
96
+ "commands",
97
+ "blueprinit.js"
98
+ ]
99
+ },
3
100
  "blueprints:add": {
4
101
  "aliases": [],
5
102
  "args": {
@@ -2655,7 +2752,8 @@
2655
2752
  },
2656
2753
  "description": "Sets an environment variable in a deployed Sanity Function. If the variable already exists, its value is updated.\n\nEnvironment variables are useful for API keys, configuration values, and other secrets that shouldn't be hardcoded. Changes take effect on the next function invocation.",
2657
2754
  "examples": [
2658
- "<%= config.bin %> <%= command.id %> MyFunction API_URL https://api.example.com/"
2755
+ "<%= config.bin %> <%= command.id %> MyFunction API_URL https://api.example.com/",
2756
+ "<%= config.bin %> <%= command.id %> --stack <name-or-id> MyFunction API_URL https://api.example.com/"
2659
2757
  ],
2660
2758
  "flags": {
2661
2759
  "json": {
@@ -2700,7 +2798,6 @@
2700
2798
  },
2701
2799
  "stack": {
2702
2800
  "description": "Stack name or ID to use instead of the locally configured Stack",
2703
- "hidden": true,
2704
2801
  "name": "stack",
2705
2802
  "hasDynamicHelp": false,
2706
2803
  "multiple": false,
@@ -2771,7 +2868,8 @@
2771
2868
  },
2772
2869
  "description": "Displays all environment variables (keys only) configured in a deployed Sanity Function.\n\nUse 'functions env add' to set variables or 'functions env remove' to delete them.",
2773
2870
  "examples": [
2774
- "<%= config.bin %> <%= command.id %> MyFunction"
2871
+ "<%= config.bin %> <%= command.id %> MyFunction",
2872
+ "<%= config.bin %> <%= command.id %> --stack <name-or-id> MyFunction"
2775
2873
  ],
2776
2874
  "flags": {
2777
2875
  "json": {
@@ -2816,7 +2914,6 @@
2816
2914
  },
2817
2915
  "stack": {
2818
2916
  "description": "Stack name or ID to use instead of the locally configured Stack",
2819
- "hidden": true,
2820
2917
  "name": "stack",
2821
2918
  "hasDynamicHelp": false,
2822
2919
  "multiple": false,
@@ -2892,7 +2989,8 @@
2892
2989
  },
2893
2990
  "description": "Deletes an environment variable from a deployed Sanity Function. The change takes effect on the next function invocation.\n\nUse 'functions env list' to see current variables before removing.",
2894
2991
  "examples": [
2895
- "<%= config.bin %> <%= command.id %> MyFunction API_URL"
2992
+ "<%= config.bin %> <%= command.id %> MyFunction API_URL",
2993
+ "<%= config.bin %> <%= command.id %> --stack <name-or-id> MyFunction API_URL"
2896
2994
  ],
2897
2995
  "flags": {
2898
2996
  "json": {
@@ -2937,7 +3035,6 @@
2937
3035
  },
2938
3036
  "stack": {
2939
3037
  "description": "Stack name or ID to use instead of the locally configured Stack",
2940
- "hidden": true,
2941
3038
  "name": "stack",
2942
3039
  "hasDynamicHelp": false,
2943
3040
  "multiple": false,
@@ -2998,5 +3095,5 @@
2998
3095
  ]
2999
3096
  }
3000
3097
  },
3001
- "version": "17.1.0-next.gcfbd613"
3098
+ "version": "17.2.0-blueprinit.gd1553d6"
3002
3099
  }
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.gcfbd613",
4
+ "version": "17.2.0-blueprinit.gd1553d6",
5
5
  "author": "Sanity Runtime Team",
6
6
  "type": "module",
7
7
  "license": "MIT",
@@ -40,7 +40,9 @@
40
40
  "clean": "shx rm -rf dist oclif.manifest.json",
41
41
  "copy:design-tokens": "shx rm -rf ./src/server/static/vendor/design-tokens && shx cp -r ./node_modules/@sanity-labs/design-tokens/dist/css ./src/server/static/vendor/design-tokens",
42
42
  "copy:server": "shx cp -r ./src/server/static ./dist/server",
43
- "copy:wrapper": "shx cp ./src/utils/functions/child-process-wrapper.js ./dist/utils/functions/child-process-wrapper.js",
43
+ "copy:wrapper": "npm run copy:wrapper:entry && npm run copy:wrapper:modules",
44
+ "copy:wrapper:entry": "shx cp ./src/utils/functions/child-process-wrapper.js ./dist/utils/functions/child-process-wrapper.js",
45
+ "copy:wrapper:modules": "shx rm -rf ./dist/utils/functions/child-runtime && shx cp -r ./src/utils/functions/child-runtime ./dist/utils/functions/child-runtime",
44
46
  "lint": "biome ci",
45
47
  "lint:write": "biome check --write",
46
48
  "lint:fix": "npm run lint:write",
@@ -64,8 +66,10 @@
64
66
  "@oclif/core": "^4.11.14",
65
67
  "@oclif/plugin-help": "^6.2.53",
66
68
  "@sanity-labs/design-tokens": "^0.0.2-alpha.2",
67
- "@sanity/blueprints": "^0.22.0",
69
+ "@sanity/blueprints": "^0.23.0",
68
70
  "@sanity/blueprints-parser": "^0.4.0",
71
+ "@sanity/cli-build": "^5.0.0",
72
+ "@sanity/cli-core": "^2.5.1",
69
73
  "@sanity/client": "^7.23.1",
70
74
  "adm-zip": "^0.6.0",
71
75
  "array-treeify": "^0.1.5",
@@ -78,6 +82,7 @@
78
82
  "ora": "^9.4.1",
79
83
  "signal-exit": "^4.1.0",
80
84
  "strip-ansi": "^7.2.0",
85
+ "tar-fs": "^3.1.3",
81
86
  "tar-stream": "^3.2.0",
82
87
  "vite": "^8.1.4",
83
88
  "ws": "^8.21.1",
@@ -97,6 +102,7 @@
97
102
  "@types/cardinal": "^2.1.1",
98
103
  "@types/mime-types": "^3.0.1",
99
104
  "@types/node": "^22",
105
+ "@types/tar-fs": "^2.0.4",
100
106
  "@types/tar-stream": "^3.1.4",
101
107
  "@types/ws": "^8.18.1",
102
108
  "@vitest/coverage-v8": "4.1.10",