@sanity/runtime-cli 17.7.1 → 17.8.0-next.g5972da4
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 +26 -21
- package/dist/actions/blueprints/stacks.d.ts +2 -0
- package/dist/actions/blueprints/stacks.js +1 -0
- package/dist/actions/sanity/projects.d.ts +11 -0
- package/dist/actions/sanity/projects.js +48 -22
- package/dist/baseCommands.d.ts +6 -0
- package/dist/baseCommands.js +9 -1
- package/dist/commands/blueprints/stacks.d.ts +2 -1
- package/dist/commands/blueprints/stacks.js +14 -6
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +5 -0
- package/dist/cores/blueprints/stacks.d.ts +8 -3
- package/dist/cores/blueprints/stacks.js +282 -85
- package/dist/cores/functions/test.d.ts +2 -19
- package/dist/cores/functions/test.js +55 -111
- package/dist/server/app.js +4 -6
- package/dist/server/static/components/payload-panel.js +1 -1
- package/dist/utils/display/prompt.d.ts +4 -1
- package/dist/utils/display/prompt.js +16 -2
- package/dist/utils/functions/child-process-wrapper.js +18 -6
- package/dist/utils/functions/child-runtime/durable.d.ts +18 -0
- package/dist/utils/functions/child-runtime/durable.js +46 -0
- package/dist/utils/functions/invoke/local.js +26 -9
- package/dist/utils/functions/invoke/resolve-invoke-type.d.ts +51 -0
- package/dist/utils/functions/invoke/resolve-invoke-type.js +131 -0
- package/dist/utils/progress.js +6 -3
- package/dist/utils/types.d.ts +46 -2
- package/oclif.manifest.json +19 -5
- package/package.json +1 -1
- package/skills/blueprints-stacks.md +14 -2
package/oclif.manifest.json
CHANGED
|
@@ -1556,9 +1556,10 @@
|
|
|
1556
1556
|
"blueprints:stacks": {
|
|
1557
1557
|
"aliases": [],
|
|
1558
1558
|
"args": {},
|
|
1559
|
-
"description": "Shows all Stacks associated with a project or organization. By default, lists Stacks scoped to the local Blueprint.\n\nUse this to discover existing Stacks you can scope a local Blueprint to (using 'blueprints config --edit'), or to audit what's deployed across your project.\n\
|
|
1559
|
+
"description": "Shows all Stacks associated with a project or organization. By default, lists Stacks scoped to the local Blueprint.\n\nUse this to discover existing Stacks you can scope a local Blueprint to (using 'blueprints config --edit'), or to audit what's deployed across your project.\n\nWithout a scope, prompts for an organization or project. Use --all to list Stacks across every organization and project you can access, or --include-projects with --organization-id for one organization and its projects.",
|
|
1560
1560
|
"examples": [
|
|
1561
1561
|
"<%= config.bin %> <%= command.id %>",
|
|
1562
|
+
"<%= config.bin %> <%= command.id %> --all",
|
|
1562
1563
|
"<%= config.bin %> <%= command.id %> --project-id <projectId>",
|
|
1563
1564
|
"<%= config.bin %> <%= command.id %> --organization-id <organizationId>",
|
|
1564
1565
|
"<%= config.bin %> <%= command.id %> --organization-id <organizationId> --include-projects"
|
|
@@ -1620,7 +1621,8 @@
|
|
|
1620
1621
|
"description": "Sanity project ID used to scope Blueprint and Stack",
|
|
1621
1622
|
"exclusive": [
|
|
1622
1623
|
"organization-id",
|
|
1623
|
-
"include-projects"
|
|
1624
|
+
"include-projects",
|
|
1625
|
+
"all"
|
|
1624
1626
|
],
|
|
1625
1627
|
"name": "project-id",
|
|
1626
1628
|
"hasDynamicHelp": false,
|
|
@@ -1635,7 +1637,8 @@
|
|
|
1635
1637
|
],
|
|
1636
1638
|
"description": "Sanity organization ID used to scope Blueprint and Stack",
|
|
1637
1639
|
"exclusive": [
|
|
1638
|
-
"project-id"
|
|
1640
|
+
"project-id",
|
|
1641
|
+
"all"
|
|
1639
1642
|
],
|
|
1640
1643
|
"name": "organization-id",
|
|
1641
1644
|
"hasDynamicHelp": false,
|
|
@@ -1650,6 +1653,17 @@
|
|
|
1650
1653
|
"name": "include-projects",
|
|
1651
1654
|
"allowNo": false,
|
|
1652
1655
|
"type": "boolean"
|
|
1656
|
+
},
|
|
1657
|
+
"all": {
|
|
1658
|
+
"description": "List Stacks from every organization and project you have access to",
|
|
1659
|
+
"exclusive": [
|
|
1660
|
+
"project-id",
|
|
1661
|
+
"organization-id",
|
|
1662
|
+
"include-projects"
|
|
1663
|
+
],
|
|
1664
|
+
"name": "all",
|
|
1665
|
+
"allowNo": false,
|
|
1666
|
+
"type": "boolean"
|
|
1653
1667
|
}
|
|
1654
1668
|
},
|
|
1655
1669
|
"hasDynamicHelp": false,
|
|
@@ -1662,7 +1676,7 @@
|
|
|
1662
1676
|
"summary": "List remote Stack deployments for your project or organization",
|
|
1663
1677
|
"enableJsonFlag": true,
|
|
1664
1678
|
"needs": [
|
|
1665
|
-
"
|
|
1679
|
+
"token"
|
|
1666
1680
|
],
|
|
1667
1681
|
"isESM": true,
|
|
1668
1682
|
"relativePath": [
|
|
@@ -3127,5 +3141,5 @@
|
|
|
3127
3141
|
]
|
|
3128
3142
|
}
|
|
3129
3143
|
},
|
|
3130
|
-
"version": "17.
|
|
3144
|
+
"version": "17.8.0-next.g5972da4"
|
|
3131
3145
|
}
|
package/package.json
CHANGED
|
@@ -17,7 +17,9 @@ npx @sanity/cli blueprints stacks --project-id PROJECT_ID --json
|
|
|
17
17
|
npx @sanity/cli blueprints stacks --organization-id ORGANIZATION_ID --json
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Always pass a scope flag or `--all` when automating. With no scope to resolve the command prompts for an organization, then for a project if you pick project scope; without a terminal, or with `--json`, it fails with a missing-scope error instead.
|
|
21
|
+
|
|
22
|
+
The JSON result contains `stacks`, `scopeType`, and `scopeId`; each entry carries `resourceCount` rather than a full `resources` array. Zero results prints `No stacks found`, and under `--json` returns an empty `stacks` array. Match both the Stack and its scope; names alone may be ambiguous.
|
|
21
23
|
|
|
22
24
|
To also include Stacks scoped to the organization's projects:
|
|
23
25
|
|
|
@@ -25,4 +27,14 @@ To also include Stacks scoped to the organization's projects:
|
|
|
25
27
|
npx @sanity/cli blueprints stacks --organization-id ORGANIZATION_ID --include-projects --json
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
`--include-projects` requires `--organization-id`, cannot be combined with `--project-id`, and only queries the organization's first 50 projects.
|
|
30
|
+
`--include-projects` requires `--organization-id`, cannot be combined with `--project-id`, and only queries the organization's first 50 projects.
|
|
31
|
+
|
|
32
|
+
To sweep every organization and project the token can reach:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
npx @sanity/cli blueprints stacks --all --json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`--all` cannot be combined with the scope flags or `--include-projects`. It is best effort: scopes that return an error are skipped and reported as a count, and only the first 200 projects are queried. Its JSON result contains `stacks` and no top-level `scopeType`/`scopeId`; read each entry's own `scopeType` and `scopeId` instead.
|
|
39
|
+
|
|
40
|
+
This command does not change the local Blueprint target; use `blueprints config --edit` for that.
|