@sanity/runtime-cli 14.3.0 → 14.5.0

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 (47) hide show
  1. package/README.md +31 -27
  2. package/dist/actions/blueprints/assets.d.ts +3 -2
  3. package/dist/actions/blueprints/assets.js +14 -3
  4. package/dist/actions/blueprints/blueprint.js +2 -2
  5. package/dist/actions/blueprints/resources.js +2 -1
  6. package/dist/actions/functions/logs.d.ts +0 -1
  7. package/dist/actions/functions/logs.js +0 -1
  8. package/dist/commands/blueprints/add.js +2 -1
  9. package/dist/commands/blueprints/deploy.d.ts +1 -0
  10. package/dist/commands/blueprints/deploy.js +10 -0
  11. package/dist/commands/functions/add.js +2 -1
  12. package/dist/commands/functions/build.d.ts +1 -0
  13. package/dist/commands/functions/build.js +7 -0
  14. package/dist/constants.d.ts +18 -1
  15. package/dist/constants.js +26 -9
  16. package/dist/cores/blueprints/deploy.d.ts +1 -0
  17. package/dist/cores/blueprints/deploy.js +2 -1
  18. package/dist/cores/functions/add.js +13 -13
  19. package/dist/cores/functions/build.d.ts +1 -0
  20. package/dist/cores/functions/build.js +2 -1
  21. package/dist/cores/functions/logs.js +3 -5
  22. package/dist/cores/functions/test.js +1 -1
  23. package/dist/server/app.js +6 -4
  24. package/dist/server/static/components/api-base.js +1 -1
  25. package/dist/server/static/components/filters.js +1 -1
  26. package/dist/server/static/components/function-list.js +2 -2
  27. package/dist/server/static/components/payload-panel.js +1 -1
  28. package/dist/server/static/components/run-panel.js +2 -2
  29. package/dist/utils/display/blueprints-formatting.js +12 -5
  30. package/dist/utils/find-function.js +4 -3
  31. package/dist/utils/functions/detect-native-modules.d.ts +7 -1
  32. package/dist/utils/functions/detect-native-modules.js +69 -1
  33. package/dist/utils/functions/prepare-asset.d.ts +3 -1
  34. package/dist/utils/functions/prepare-asset.js +28 -3
  35. package/dist/utils/functions/resolve-dependencies.d.ts +5 -2
  36. package/dist/utils/functions/resolve-dependencies.js +19 -12
  37. package/dist/utils/invoke-local.js +1 -1
  38. package/dist/utils/pnpm.d.ts +1 -0
  39. package/dist/utils/pnpm.js +9 -0
  40. package/dist/utils/transpile/transpile-function.d.ts +4 -2
  41. package/dist/utils/transpile/transpile-function.js +5 -8
  42. package/dist/utils/types.d.ts +8 -5
  43. package/dist/utils/types.js +8 -4
  44. package/dist/utils/validate/index.js +7 -4
  45. package/dist/utils/validate/resource.js +3 -2
  46. package/oclif.manifest.json +42 -7
  47. package/package.json +5 -4
@@ -102,12 +102,12 @@
102
102
  "options": [
103
103
  "document-publish",
104
104
  "document-create",
105
- "document-delete",
106
105
  "document-update",
106
+ "document-delete",
107
107
  "media-library-asset-create",
108
108
  "media-library-asset-update",
109
109
  "media-library-asset-delete",
110
- "schedule-function"
110
+ "scheduled-function"
111
111
  ],
112
112
  "type": "option"
113
113
  },
@@ -319,10 +319,11 @@
319
319
  "blueprints:deploy": {
320
320
  "aliases": [],
321
321
  "args": {},
322
- "description": "Pushes your local Blueprint configuration to the remote Stack; provisioning, updating, or destroying resources as needed. This is the primary command for applying infrastructure changes.\n\nBefore deploying, run 'blueprints plan' to preview changes. After deployment, use 'blueprints info' to verify Stack status or 'blueprints logs' to monitor activity.\n\nUse --no-wait to queue the deployment and return immediately without waiting for completion.\n\nSet SANITY_ASSET_TIMEOUT (seconds) to override the 60-second timeout for processing resource assets.",
322
+ "description": "Pushes your local Blueprint configuration to the remote Stack; provisioning, updating, or destroying resources as needed. This is the primary command for applying infrastructure changes.\n\nBefore deploying, run 'blueprints plan' to preview changes. After deployment, use 'blueprints info' to verify Stack status or 'blueprints logs' to monitor activity.\n\nUse --no-wait to queue the deployment and return immediately without waiting for completion.\n\nUse --fn-installer to force which package manager to use when deploying functions.\n\nSet SANITY_ASSET_TIMEOUT (seconds) to override the 60-second timeout for processing resource assets.",
323
323
  "examples": [
324
324
  "<%= config.bin %> <%= command.id %>",
325
- "<%= config.bin %> <%= command.id %> --no-wait"
325
+ "<%= config.bin %> <%= command.id %> --no-wait",
326
+ "<%= config.bin %> <%= command.id %> --fn-installer npm"
326
327
  ],
327
328
  "flags": {
328
329
  "json": {
@@ -374,6 +375,23 @@
374
375
  "multiple": false,
375
376
  "type": "option"
376
377
  },
378
+ "fn-installer": {
379
+ "aliases": [
380
+ "function-installer",
381
+ "installer"
382
+ ],
383
+ "description": "Which package manager to use when installing Function dependencies",
384
+ "hidden": true,
385
+ "name": "fn-installer",
386
+ "hasDynamicHelp": false,
387
+ "multiple": false,
388
+ "options": [
389
+ "npm",
390
+ "pnpm",
391
+ "yarn"
392
+ ],
393
+ "type": "option"
394
+ },
377
395
  "no-wait": {
378
396
  "description": "Do not wait for Stack deployment to complete",
379
397
  "name": "no-wait",
@@ -1202,12 +1220,12 @@
1202
1220
  "options": [
1203
1221
  "document-publish",
1204
1222
  "document-create",
1205
- "document-delete",
1206
1223
  "document-update",
1224
+ "document-delete",
1207
1225
  "media-library-asset-create",
1208
1226
  "media-library-asset-update",
1209
1227
  "media-library-asset-delete",
1210
- "schedule-function"
1228
+ "scheduled-function"
1211
1229
  ],
1212
1230
  "type": "option"
1213
1231
  },
@@ -1336,6 +1354,23 @@
1336
1354
  "allowNo": false,
1337
1355
  "type": "boolean"
1338
1356
  },
1357
+ "fn-installer": {
1358
+ "aliases": [
1359
+ "function-installer",
1360
+ "installer"
1361
+ ],
1362
+ "description": "Which package manager to use when building Functions",
1363
+ "hidden": true,
1364
+ "name": "fn-installer",
1365
+ "hasDynamicHelp": false,
1366
+ "multiple": false,
1367
+ "options": [
1368
+ "npm",
1369
+ "pnpm",
1370
+ "yarn"
1371
+ ],
1372
+ "type": "option"
1373
+ },
1339
1374
  "out-dir": {
1340
1375
  "char": "o",
1341
1376
  "description": "Output directory for zip files",
@@ -2163,5 +2198,5 @@
2163
2198
  ]
2164
2199
  }
2165
2200
  },
2166
- "version": "14.3.0"
2201
+ "version": "14.5.0"
2167
2202
  }
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": "14.3.0",
4
+ "version": "14.5.0",
5
5
  "author": "Sanity Runtime Team",
6
6
  "type": "module",
7
7
  "license": "MIT",
@@ -90,9 +90,10 @@
90
90
  "lint:fix": "npm run lint:write",
91
91
  "prepare": "npm run build",
92
92
  "postpack": "shx rm -f oclif.manifest.json",
93
- "test": "vitest run && npm run lint",
94
- "test:depmgmt": "vitest run --config ./test-depmgmt/vitest.config.ts",
93
+ "test": "npm run test:vitest && npm run lint",
95
94
  "test:api": "cd test/api-types && npm it",
95
+ "test:depmgmt": "vitest run --config ./test-depmgmt/vitest.config.ts",
96
+ "test:vitest": "vitest run",
96
97
  "typecheck": "tsc --project tsconfig.typecheck.json",
97
98
  "watch": "tsc --watch"
98
99
  },
@@ -102,7 +103,7 @@
102
103
  "@inquirer/prompts": "^8.2.1",
103
104
  "@oclif/core": "^4.8.0",
104
105
  "@oclif/plugin-help": "^6.2.37",
105
- "@sanity/blueprints": "^0.12.2",
106
+ "@sanity/blueprints": "^0.13.1",
106
107
  "@sanity/blueprints-parser": "^0.4.0",
107
108
  "@sanity/client": "^7.15.0",
108
109
  "adm-zip": "^0.5.16",