@sanity/runtime-cli 17.12.0 → 17.12.1
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 +21 -20
- package/dist/actions/blueprints/assets.js +17 -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 +14 -9
- package/dist/actions/blueprints/pre-deploy.js +83 -26
- package/dist/actions/blueprints/process-assets.d.ts +12 -11
- package/dist/actions/blueprints/process-assets.js +8 -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/cores/blueprints/deploy.js +28 -6
- package/dist/cores/blueprints/destroy.js +4 -2
- package/dist/cores/blueprints/doctor.js +1 -1
- package/dist/cores/blueprints/init.js +3 -1
- package/dist/cores/blueprints/logs.js +11 -5
- 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/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/functions/child-runtime/durable.js +2 -2
- 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 +43 -6
- package/dist/utils/studios/prepare-asset.js +5 -3
- package/dist/utils/types.d.ts +18 -4
- package/dist/utils/types.js +0 -3
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
- package/dist/utils/functions/get-folder-size.d.ts +0 -5
- package/dist/utils/functions/get-folder-size.js +0 -24
package/dist/utils/types.js
CHANGED
|
@@ -31,9 +31,6 @@ export function isStudioResource(r) {
|
|
|
31
31
|
export function isDurableFunctionResource(r) {
|
|
32
32
|
return validateDurableFunction(r).length === 0;
|
|
33
33
|
}
|
|
34
|
-
export function isAssetResource(r) {
|
|
35
|
-
return isLocalFunctionResource(r) || isStudioResource(r);
|
|
36
|
-
}
|
|
37
34
|
export function isWebhookResource(r) {
|
|
38
35
|
return validateDocumentWebhook(r).length === 0;
|
|
39
36
|
}
|
package/oclif.manifest.json
CHANGED
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.12.
|
|
4
|
+
"version": "17.12.1",
|
|
5
5
|
"author": "Sanity Runtime Team",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"@playwright/test": "^1.62.1",
|
|
102
102
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
103
103
|
"@sanity-labs/design-tokens": "^0.0.2-alpha.2",
|
|
104
|
-
"@sanity/functions": "^1.7.
|
|
104
|
+
"@sanity/functions": "^1.7.2",
|
|
105
105
|
"@types/cardinal": "^2.1.1",
|
|
106
106
|
"@types/mime-types": "^3.0.1",
|
|
107
107
|
"@types/node": "^22",
|
|
@@ -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
|
-
};
|