@sanity/runtime-cli 17.1.0 → 17.2.0-blueprinit.g62f8017
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 +86 -55
- package/SKILL.md +21 -0
- package/dist/actions/blueprinit/manifest.d.ts +13 -0
- package/dist/actions/blueprinit/manifest.js +57 -0
- package/dist/actions/blueprinit/studio.d.ts +6 -0
- package/dist/actions/blueprinit/studio.js +43 -0
- package/dist/actions/blueprinit/templates.d.ts +34 -0
- package/dist/actions/blueprinit/templates.js +83 -0
- package/dist/actions/blueprinit/workspace.d.ts +15 -0
- package/dist/actions/blueprinit/workspace.js +142 -0
- package/dist/actions/blueprints/assets.d.ts +2 -1
- package/dist/actions/blueprints/assets.js +17 -26
- package/dist/actions/blueprints/blueprint.d.ts +1 -1
- package/dist/actions/blueprints/pre-deploy.d.ts +29 -0
- package/dist/actions/blueprints/pre-deploy.js +164 -0
- package/dist/actions/blueprints/wait-for-operation.js +4 -0
- package/dist/actions/sanity/datasets.d.ts +15 -0
- package/dist/actions/sanity/datasets.js +26 -0
- package/dist/actions/sanity/examples.d.ts +4 -4
- package/dist/baseCommands.d.ts +7 -4
- package/dist/baseCommands.js +17 -0
- package/dist/commands/blueprinit.d.ts +13 -0
- package/dist/commands/blueprinit.js +44 -0
- 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 +4 -1
- package/dist/commands/functions/env/add.js +6 -2
- package/dist/commands/functions/env/list.d.ts +4 -1
- package/dist/commands/functions/env/list.js +9 -3
- package/dist/commands/functions/env/remove.d.ts +4 -1
- package/dist/commands/functions/env/remove.js +9 -3
- package/dist/commands/functions/logs.d.ts +1 -1
- package/dist/commands/functions/test.d.ts +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/cores/blueprinit/adopt.d.ts +6 -0
- package/dist/cores/blueprinit/adopt.js +90 -0
- package/dist/cores/blueprinit/finish.d.ts +14 -0
- package/dist/cores/blueprinit/finish.js +36 -0
- package/dist/cores/blueprinit/fresh.d.ts +3 -0
- package/dist/cores/blueprinit/fresh.js +88 -0
- package/dist/cores/blueprinit/prompts.d.ts +4 -0
- package/dist/cores/blueprinit/prompts.js +14 -0
- package/dist/cores/blueprinit/selection.d.ts +15 -0
- package/dist/cores/blueprinit/selection.js +63 -0
- package/dist/cores/blueprinit/types.d.ts +13 -0
- package/dist/cores/blueprinit/types.js +1 -0
- package/dist/cores/blueprinit.d.ts +7 -0
- package/dist/cores/blueprinit.js +39 -0
- package/dist/cores/blueprints/deploy.js +18 -65
- 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/command-skills.d.ts +2 -0
- package/dist/utils/command-skills.js +17 -0
- package/dist/utils/functions/child-process-wrapper.js +13 -171
- package/dist/utils/functions/child-runtime/console.d.ts +1 -0
- package/dist/utils/functions/child-runtime/console.js +50 -0
- package/dist/utils/functions/child-runtime/invoke.d.ts +4 -0
- package/dist/utils/functions/child-runtime/invoke.js +47 -0
- package/dist/utils/functions/child-runtime/resources.d.ts +4 -0
- package/dist/utils/functions/child-runtime/resources.js +59 -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/studios/prepare-asset.d.ts +6 -0
- package/dist/utils/studios/prepare-asset.js +139 -0
- package/dist/utils/types.d.ts +9 -8
- package/dist/utils/types.js +2 -3
- package/oclif.manifest.json +1218 -931
- package/package.json +33 -24
- package/skills/blueprinit.md +40 -0
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.
|
|
4
|
+
"version": "17.2.0-blueprinit.g62f8017",
|
|
5
5
|
"author": "Sanity Runtime Team",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
@@ -26,7 +26,9 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"./bin",
|
|
28
28
|
"./dist",
|
|
29
|
-
"./oclif.manifest.json"
|
|
29
|
+
"./oclif.manifest.json",
|
|
30
|
+
"./SKILL.md",
|
|
31
|
+
"./skills"
|
|
30
32
|
],
|
|
31
33
|
"bin": {
|
|
32
34
|
"sanity-run": "bin/run.js"
|
|
@@ -40,7 +42,9 @@
|
|
|
40
42
|
"clean": "shx rm -rf dist oclif.manifest.json",
|
|
41
43
|
"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
44
|
"copy:server": "shx cp -r ./src/server/static ./dist/server",
|
|
43
|
-
"copy:wrapper": "
|
|
45
|
+
"copy:wrapper": "npm run copy:wrapper:entry && npm run copy:wrapper:modules",
|
|
46
|
+
"copy:wrapper:entry": "shx cp ./src/utils/functions/child-process-wrapper.js ./dist/utils/functions/child-process-wrapper.js",
|
|
47
|
+
"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
48
|
"lint": "biome ci",
|
|
45
49
|
"lint:write": "biome check --write",
|
|
46
50
|
"lint:fix": "npm run lint:write",
|
|
@@ -59,55 +63,60 @@
|
|
|
59
63
|
},
|
|
60
64
|
"dependencies": {
|
|
61
65
|
"@architect/hydrate": "~6.0.2",
|
|
62
|
-
"@architect/inventory": "~6.
|
|
66
|
+
"@architect/inventory": "~6.1.0",
|
|
63
67
|
"@inquirer/prompts": "^8.5.2",
|
|
64
|
-
"@oclif/core": "^4.11.
|
|
65
|
-
"@oclif/plugin-help": "^6.2.
|
|
68
|
+
"@oclif/core": "^4.11.14",
|
|
69
|
+
"@oclif/plugin-help": "^6.2.53",
|
|
66
70
|
"@sanity-labs/design-tokens": "^0.0.2-alpha.2",
|
|
67
|
-
"@sanity/blueprints": "^0.
|
|
71
|
+
"@sanity/blueprints": "^0.23.0",
|
|
68
72
|
"@sanity/blueprints-parser": "^0.4.0",
|
|
69
|
-
"@sanity/
|
|
70
|
-
"
|
|
73
|
+
"@sanity/cli-build": "^5.0.0",
|
|
74
|
+
"@sanity/cli-core": "^2.5.1",
|
|
75
|
+
"@sanity/client": "^7.23.1",
|
|
76
|
+
"adm-zip": "^0.6.0",
|
|
71
77
|
"array-treeify": "^0.1.5",
|
|
72
78
|
"cardinal": "^2.1.1",
|
|
73
79
|
"empathic": "^2.0.1",
|
|
74
80
|
"eventsource": "^4.1.0",
|
|
75
|
-
"groq-js": "^1.30.
|
|
81
|
+
"groq-js": "^1.30.3",
|
|
76
82
|
"jiti": "^2.7.0",
|
|
77
83
|
"mime-types": "^3.0.2",
|
|
78
|
-
"ora": "^9.4.
|
|
84
|
+
"ora": "^9.4.1",
|
|
85
|
+
"signal-exit": "^4.1.0",
|
|
86
|
+
"strip-ansi": "^7.2.0",
|
|
87
|
+
"tar-fs": "^3.1.3",
|
|
79
88
|
"tar-stream": "^3.2.0",
|
|
80
|
-
"vite": "^8.
|
|
81
|
-
"ws": "^8.21.
|
|
89
|
+
"vite": "^8.1.4",
|
|
90
|
+
"ws": "^8.21.1",
|
|
82
91
|
"xdg-basedir": "^5.1.0"
|
|
83
92
|
},
|
|
84
93
|
"devDependencies": {
|
|
85
|
-
"@biomejs/biome": "2.
|
|
94
|
+
"@biomejs/biome": "2.5.3",
|
|
86
95
|
"@codemirror/lang-json": "^6.0.2",
|
|
87
|
-
"@codemirror/state": "^6.
|
|
96
|
+
"@codemirror/state": "^6.7.1",
|
|
88
97
|
"@enhance/store": "^1.0.2",
|
|
89
98
|
"@lezer/highlight": "^1.2.3",
|
|
90
|
-
"@oclif/test": "^4.1.
|
|
91
|
-
"@playwright/test": "^1.
|
|
99
|
+
"@oclif/test": "^4.1.20",
|
|
100
|
+
"@playwright/test": "^1.61.1",
|
|
92
101
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
93
|
-
"@sanity/functions": "^1.
|
|
102
|
+
"@sanity/functions": "^1.4.0",
|
|
94
103
|
"@types/adm-zip": "^0.5.8",
|
|
95
104
|
"@types/cardinal": "^2.1.1",
|
|
96
105
|
"@types/mime-types": "^3.0.1",
|
|
97
106
|
"@types/node": "^22",
|
|
107
|
+
"@types/tar-fs": "^2.0.4",
|
|
98
108
|
"@types/tar-stream": "^3.1.4",
|
|
99
109
|
"@types/ws": "^8.18.1",
|
|
100
|
-
"@vitest/coverage-v8": "4.1.
|
|
110
|
+
"@vitest/coverage-v8": "4.1.10",
|
|
101
111
|
"codemirror": "^6.0.2",
|
|
102
112
|
"mentoss": "^0.13.0",
|
|
103
|
-
"oclif": "^4.23.
|
|
113
|
+
"oclif": "^4.23.27",
|
|
104
114
|
"pretty-bytes": "^7.1.0",
|
|
105
115
|
"pretty-ms": "^9.3.0",
|
|
106
|
-
"rollup": "^4.
|
|
116
|
+
"rollup": "^4.62.2",
|
|
107
117
|
"shx": "^0.4.0",
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"vitest": "4.1.9"
|
|
118
|
+
"typescript": "^7.0.2",
|
|
119
|
+
"vitest": "4.1.10"
|
|
111
120
|
},
|
|
112
121
|
"oclif": {
|
|
113
122
|
"bin": "sanity-run",
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Blueprinit
|
|
2
|
+
|
|
3
|
+
Use `blueprinit` to scaffold a Blueprint around an existing Sanity project. The command is
|
|
4
|
+
experimental, hidden from root help, and available from the `blueprinit` npm dist-tag.
|
|
5
|
+
|
|
6
|
+
## Before running
|
|
7
|
+
|
|
8
|
+
- Work in the directory that should contain the Blueprint.
|
|
9
|
+
- Confirm the user is signed in with `npx sanity login`.
|
|
10
|
+
- Confirm the account has an organization, project, and dataset.
|
|
11
|
+
- Treat the run as state-changing: it writes local files and creates an empty,
|
|
12
|
+
organization-scoped Stack.
|
|
13
|
+
|
|
14
|
+
If the directory already contains a Blueprint, the command exits without changing it. A root
|
|
15
|
+
`sanity.config.*` switches the command to Studio adoption instead of creating a new Studio.
|
|
16
|
+
|
|
17
|
+
## Unattended run
|
|
18
|
+
|
|
19
|
+
When the organization and project are known, run:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npx @sanity/runtime-cli@blueprinit blueprinit --yes \
|
|
23
|
+
--organization-id <organization-id> \
|
|
24
|
+
--project-id <project-id>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Use both IDs when possible. Without them, accounts with several organizations or projects require
|
|
28
|
+
interactive selection. `--yes` skips confirmation and uses `studio` as the generated Studio name.
|
|
29
|
+
|
|
30
|
+
## After running
|
|
31
|
+
|
|
32
|
+
Inspect the generated files before installing dependencies or deploying. A fresh workspace includes
|
|
33
|
+
`sanity.blueprint.ts`, an npm-workspace Studio, a `set-slug` function, `.gitignore`, and
|
|
34
|
+
`.sanity/blueprint.config.json`.
|
|
35
|
+
|
|
36
|
+
The command only creates the empty Stack remotely. Project and dataset attachment, Studio creation,
|
|
37
|
+
and Function creation happen later with `blueprints deploy`.
|
|
38
|
+
|
|
39
|
+
If Stack creation fails because of quota or a duplicate name, the scaffold can remain without
|
|
40
|
+
`.sanity/blueprint.config.json`. Inspect the workspace before retrying.
|