@sanity/runtime-cli 17.12.0 → 17.13.0-next.g2501ffa
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 +19 -19
- package/dist/actions/blueprints/assets.d.ts +23 -20
- package/dist/actions/blueprints/assets.js +18 -87
- package/dist/actions/blueprints/logs-polling.d.ts +3 -5
- package/dist/actions/blueprints/logs-polling.js +4 -9
- package/dist/actions/blueprints/logs.d.ts +1 -2
- package/dist/actions/blueprints/logs.js +1 -3
- package/dist/actions/blueprints/operations-state.d.ts +10 -0
- package/dist/actions/blueprints/operations-state.js +42 -0
- package/dist/actions/blueprints/operations.d.ts +2 -9
- package/dist/actions/blueprints/operations.js +1 -15
- package/dist/actions/blueprints/pre-deploy.d.ts +19 -11
- package/dist/actions/blueprints/pre-deploy.js +95 -27
- package/dist/actions/blueprints/process-assets.d.ts +13 -11
- package/dist/actions/blueprints/process-assets.js +9 -7
- package/dist/actions/blueprints/stacks.d.ts +4 -4
- package/dist/actions/blueprints/stacks.js +2 -4
- package/dist/actions/blueprints/wait-for-operation.d.ts +1 -10
- package/dist/actions/blueprints/wait-for-operation.js +56 -101
- package/dist/baseCommands.js +6 -1
- package/dist/commands/blueprints/deploy.js +2 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.js +6 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/cores/blueprints/config.js +1 -1
- package/dist/cores/blueprints/deploy.d.ts +2 -0
- package/dist/cores/blueprints/deploy.js +38 -7
- package/dist/cores/blueprints/destroy.js +4 -2
- package/dist/cores/blueprints/doctor.js +2 -2
- package/dist/cores/blueprints/init.js +3 -1
- package/dist/cores/blueprints/logs.js +11 -5
- package/dist/cores/blueprints/mint-deploy-token.js +2 -1
- package/dist/cores/functions/build.js +4 -5
- package/dist/cores/functions/test.js +3 -1
- package/dist/cores/index.js +3 -1
- package/dist/server/handlers/invoke.js +1 -1
- package/dist/server/static/vendor/vendor.bundle.js +21791 -25197
- package/dist/utils/blueprints/deploy-metadata.d.ts +10 -0
- package/dist/utils/blueprints/deploy-metadata.js +17 -0
- package/dist/utils/blueprints/resolve-deployed-resources.d.ts +2 -3
- package/dist/utils/blueprints/resolve-deployed-resources.js +2 -2
- package/dist/utils/blueprints/wait-for.d.ts +60 -0
- package/dist/utils/blueprints/wait-for.js +115 -0
- package/dist/utils/display/blueprints-formatting.d.ts +1 -0
- package/dist/utils/display/blueprints-formatting.js +17 -3
- package/dist/utils/display/dates.d.ts +0 -2
- package/dist/utils/display/dates.js +0 -25
- package/dist/utils/display/functions-formatting.js +1 -1
- package/dist/utils/display/prompt.js +5 -2
- package/dist/utils/display/resources-formatting.d.ts +6 -0
- package/dist/utils/display/resources-formatting.js +17 -0
- package/dist/utils/functions/child-runtime/durable.js +2 -2
- package/dist/utils/functions/dependency-info.d.ts +30 -0
- package/dist/utils/functions/dependency-info.js +57 -0
- package/dist/utils/functions/invoke/assert-console.d.ts +5 -0
- package/dist/utils/functions/invoke/assert-console.js +60 -0
- package/dist/utils/functions/invoke/local.js +9 -0
- package/dist/utils/functions/is-folder-larger-than.d.ts +5 -0
- package/dist/utils/functions/is-folder-larger-than.js +38 -0
- package/dist/utils/functions/prepare-asset.d.ts +2 -0
- package/dist/utils/functions/prepare-asset.js +59 -23
- package/dist/utils/studios/prepare-asset.js +36 -9
- package/dist/utils/types.d.ts +35 -4
- package/dist/utils/types.js +0 -3
- package/oclif.manifest.json +1002 -1002
- package/package.json +17 -19
- package/dist/utils/functions/get-folder-size.d.ts +0 -5
- package/dist/utils/functions/get-folder-size.js +0 -24
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.13.0-next.g2501ffa",
|
|
5
5
|
"author": "Sanity Runtime Team",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"sanity-run": "bin/run.js"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
|
-
"build": "npm run build:
|
|
38
|
-
"build:
|
|
37
|
+
"build": "npm run build:vendor && npm run build:ts && npm run build:static && npm run build:oclif",
|
|
38
|
+
"build:vendor": "vite build --config vite.vendor.config.mjs",
|
|
39
39
|
"build:oclif": "oclif manifest && oclif readme",
|
|
40
40
|
"build:ts": "shx rm -rf dist *.tsbuildinfo && tsc -b",
|
|
41
41
|
"build:static": "npm run copy:wrapper && npm run copy:design-tokens && npm run copy:server",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"postpack": "shx rm -f oclif.manifest.json",
|
|
53
53
|
"test": "npm run typecheck && vitest run && npm run test:depmgmt && npm run lint",
|
|
54
54
|
"test:depmgmt": "vitest run --config ./test-depmgmt/vitest.config.ts",
|
|
55
|
-
"test:coverage": "vitest run --coverage --coverage.include \"
|
|
55
|
+
"test:coverage": "vitest run --coverage --coverage.include \"src/**/*\" --coverage.exclude \"src/server/static/**\"",
|
|
56
56
|
"test:scenarios": "vitest run test/scenarios",
|
|
57
57
|
"test:playwright": "playwright install chromium && playwright install-deps chromium && playwright test",
|
|
58
58
|
"test:bp-version-smoke": "node ./test/blueprints-version-smoke.js",
|
|
@@ -64,16 +64,16 @@
|
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@architect/hydrate": "~6.0.2",
|
|
66
66
|
"@architect/inventory": "~6.1.0",
|
|
67
|
-
"@inquirer/prompts": "^8.7.
|
|
67
|
+
"@inquirer/prompts": "^8.7.2",
|
|
68
68
|
"@oclif/core": "^4.14.0",
|
|
69
69
|
"@oclif/plugin-help": "^6.3.0",
|
|
70
70
|
"@sanity-labs/oclif-plugin-skills-flag": "^0.2.1",
|
|
71
71
|
"@sanity/blueprints": "^0.24.0",
|
|
72
72
|
"@sanity/blueprints-parser": "^0.5.0",
|
|
73
|
-
"@sanity/cli-build": "^
|
|
74
|
-
"@sanity/cli-core": "^3.
|
|
75
|
-
"@sanity/client": "^8.
|
|
76
|
-
"adm-zip": "^0.6.
|
|
73
|
+
"@sanity/cli-build": "^6.3.0",
|
|
74
|
+
"@sanity/cli-core": "^3.7.0",
|
|
75
|
+
"@sanity/client": "^8.6.1",
|
|
76
|
+
"adm-zip": "^0.6.1",
|
|
77
77
|
"array-treeify": "^0.2.0",
|
|
78
78
|
"cardinal": "^2.1.1",
|
|
79
79
|
"empathic": "^2.0.1",
|
|
@@ -86,37 +86,35 @@
|
|
|
86
86
|
"strip-ansi": "^7.2.0",
|
|
87
87
|
"tar-fs": "^3.1.3",
|
|
88
88
|
"tar-stream": "^3.2.1",
|
|
89
|
-
"vite": "^8.
|
|
89
|
+
"vite": "^8.3.0",
|
|
90
90
|
"ws": "^8.21.3",
|
|
91
91
|
"xdg-basedir": "^5.1.0"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
|
-
"@biomejs/biome": "2.5.
|
|
94
|
+
"@biomejs/biome": "2.5.13",
|
|
95
95
|
"@codemirror/lang-json": "^6.0.2",
|
|
96
96
|
"@codemirror/language": "^6.12.4",
|
|
97
|
-
"@codemirror/state": "^6.7.
|
|
97
|
+
"@codemirror/state": "^6.7.4",
|
|
98
98
|
"@enhance/store": "^1.0.2",
|
|
99
99
|
"@lezer/highlight": "^1.2.3",
|
|
100
100
|
"@oclif/test": "^4.2.0",
|
|
101
|
-
"@playwright/test": "^1.
|
|
102
|
-
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
101
|
+
"@playwright/test": "^1.63.0",
|
|
103
102
|
"@sanity-labs/design-tokens": "^0.0.2-alpha.2",
|
|
104
|
-
"@sanity/functions": "^1.7.
|
|
103
|
+
"@sanity/functions": "^1.7.2",
|
|
105
104
|
"@types/cardinal": "^2.1.1",
|
|
106
105
|
"@types/mime-types": "^3.0.1",
|
|
107
106
|
"@types/node": "^22",
|
|
108
107
|
"@types/tar-fs": "^2.0.4",
|
|
109
108
|
"@types/ws": "^8.18.1",
|
|
110
|
-
"@vitest/coverage-v8": "
|
|
109
|
+
"@vitest/coverage-v8": "5.0.0",
|
|
111
110
|
"codemirror": "^6.0.2",
|
|
112
111
|
"mentoss": "^0.13.0",
|
|
113
112
|
"oclif": "^4.24.0",
|
|
114
|
-
"pretty-bytes": "^7.1.
|
|
113
|
+
"pretty-bytes": "^7.1.3",
|
|
115
114
|
"pretty-ms": "^9.3.1",
|
|
116
|
-
"rollup": "^4.63.1",
|
|
117
115
|
"shx": "^0.4.0",
|
|
118
116
|
"typescript": "^7.0.2",
|
|
119
|
-
"vitest": "
|
|
117
|
+
"vitest": "5.0.0"
|
|
120
118
|
},
|
|
121
119
|
"oclif": {
|
|
122
120
|
"bin": "sanity-run",
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { readdirSync, statSync } from 'node:fs';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
/**
|
|
4
|
-
* Recursively calculates the total size of a folder, including all nested files and subdirectories.
|
|
5
|
-
*/
|
|
6
|
-
export const getFolderSize = (folder) => {
|
|
7
|
-
if (!statSync(folder).isDirectory()) {
|
|
8
|
-
throw new Error('Provided path is not a directory');
|
|
9
|
-
}
|
|
10
|
-
let totalSize = 0;
|
|
11
|
-
const fileEntries = readdirSync(folder);
|
|
12
|
-
for (const file of fileEntries) {
|
|
13
|
-
const filePath = path.join(folder.toString(), file);
|
|
14
|
-
const stats = statSync(filePath);
|
|
15
|
-
if (stats.isFile()) {
|
|
16
|
-
totalSize += stats.size;
|
|
17
|
-
}
|
|
18
|
-
else if (stats.isDirectory()) {
|
|
19
|
-
const recursiveSize = getFolderSize(filePath);
|
|
20
|
-
totalSize += recursiveSize;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return totalSize;
|
|
24
|
-
};
|