@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.
Files changed (48) hide show
  1. package/README.md +19 -19
  2. package/dist/actions/blueprints/assets.d.ts +21 -20
  3. package/dist/actions/blueprints/assets.js +17 -87
  4. package/dist/actions/blueprints/logs-polling.d.ts +3 -5
  5. package/dist/actions/blueprints/logs-polling.js +4 -9
  6. package/dist/actions/blueprints/logs.d.ts +1 -2
  7. package/dist/actions/blueprints/logs.js +1 -3
  8. package/dist/actions/blueprints/operations-state.d.ts +10 -0
  9. package/dist/actions/blueprints/operations-state.js +42 -0
  10. package/dist/actions/blueprints/operations.d.ts +2 -9
  11. package/dist/actions/blueprints/operations.js +1 -15
  12. package/dist/actions/blueprints/pre-deploy.d.ts +14 -9
  13. package/dist/actions/blueprints/pre-deploy.js +83 -26
  14. package/dist/actions/blueprints/process-assets.d.ts +12 -11
  15. package/dist/actions/blueprints/process-assets.js +8 -7
  16. package/dist/actions/blueprints/stacks.d.ts +4 -4
  17. package/dist/actions/blueprints/stacks.js +2 -4
  18. package/dist/actions/blueprints/wait-for-operation.d.ts +1 -10
  19. package/dist/actions/blueprints/wait-for-operation.js +56 -101
  20. package/dist/baseCommands.js +6 -1
  21. package/dist/cores/blueprints/deploy.js +28 -6
  22. package/dist/cores/blueprints/destroy.js +4 -2
  23. package/dist/cores/blueprints/doctor.js +1 -1
  24. package/dist/cores/blueprints/init.js +3 -1
  25. package/dist/cores/blueprints/logs.js +11 -5
  26. package/dist/cores/functions/build.js +4 -5
  27. package/dist/cores/functions/test.js +3 -1
  28. package/dist/cores/index.js +3 -1
  29. package/dist/server/handlers/invoke.js +1 -1
  30. package/dist/utils/blueprints/resolve-deployed-resources.d.ts +2 -3
  31. package/dist/utils/blueprints/resolve-deployed-resources.js +2 -2
  32. package/dist/utils/blueprints/wait-for.d.ts +60 -0
  33. package/dist/utils/blueprints/wait-for.js +115 -0
  34. package/dist/utils/functions/child-runtime/durable.js +2 -2
  35. package/dist/utils/functions/invoke/assert-console.d.ts +5 -0
  36. package/dist/utils/functions/invoke/assert-console.js +60 -0
  37. package/dist/utils/functions/invoke/local.js +9 -0
  38. package/dist/utils/functions/is-folder-larger-than.d.ts +5 -0
  39. package/dist/utils/functions/is-folder-larger-than.js +38 -0
  40. package/dist/utils/functions/prepare-asset.d.ts +2 -0
  41. package/dist/utils/functions/prepare-asset.js +43 -6
  42. package/dist/utils/studios/prepare-asset.js +5 -3
  43. package/dist/utils/types.d.ts +18 -4
  44. package/dist/utils/types.js +0 -3
  45. package/oclif.manifest.json +1 -1
  46. package/package.json +2 -2
  47. package/dist/utils/functions/get-folder-size.d.ts +0 -5
  48. package/dist/utils/functions/get-folder-size.js +0 -24
@@ -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
  }
@@ -3148,5 +3148,5 @@
3148
3148
  ]
3149
3149
  }
3150
3150
  },
3151
- "version": "17.12.0"
3151
+ "version": "17.12.1"
3152
3152
  }
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.0",
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.1",
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,5 +0,0 @@
1
- import { type PathLike } from 'node:fs';
2
- /**
3
- * Recursively calculates the total size of a folder, including all nested files and subdirectories.
4
- */
5
- export declare const getFolderSize: (folder: PathLike) => number;
@@ -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
- };