Skip to content

Commit 0974dfd

Browse files
committed
amend
1 parent e97ed00 commit 0974dfd

10 files changed

Lines changed: 114 additions & 19134 deletions

File tree

package.json

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -304,19 +304,6 @@
304304
]
305305
}
306306
},
307-
"packages/store": {
308-
"entry": [
309-
"**/{commands,hooks}/**/*.ts!",
310-
"**/index.ts!"
311-
],
312-
"project": "**/*.ts!",
313-
"ignore": [
314-
"**/graphql/**/generated/*.ts"
315-
],
316-
"ignoreDependencies": [
317-
"@graphql-typed-document-node/core"
318-
]
319-
},
320307
"packages/theme": {
321308
"project": "**/*.ts!",
322309
"entry": [

packages/cli/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
* [`shopify store auth`](#shopify-store-auth)
8080
* [`shopify store execute`](#shopify-store-execute)
8181
* [`shopify store info`](#shopify-store-info)
82+
* [`shopify store list`](#shopify-store-list)
8283
* [`shopify theme check`](#shopify-theme-check)
8384
* [`shopify theme console`](#shopify-theme-console)
8485
* [`shopify theme delete`](#shopify-theme-delete)
@@ -2206,6 +2207,36 @@ EXAMPLES
22062207
$ shopify store info --store shop.myshopify.com --json
22072208
```
22082209

2210+
## `shopify store list`
2211+
2212+
List stores in your Shopify organization.
2213+
2214+
```
2215+
USAGE
2216+
$ shopify store list [-j] [--no-color] [--organization-id <value>] [--verbose]
2217+
2218+
FLAGS
2219+
-j, --json [env: SHOPIFY_FLAG_JSON] Output the result as JSON. Automatically disables color
2220+
output.
2221+
--no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output.
2222+
--organization-id=<value> [env: SHOPIFY_FLAG_ORGANIZATION_ID] List stores for a single organization, by ID.
2223+
--verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output.
2224+
2225+
DESCRIPTION
2226+
List stores in your Shopify organization.
2227+
2228+
Lists the stores in the Shopify organizations available to the current CLI account.
2229+
2230+
Use `--organization-id` to list a single organization. Run `shopify organization list` to find organization IDs.
2231+
2232+
EXAMPLES
2233+
$ shopify store list
2234+
2235+
$ shopify store list --organization-id 1234567
2236+
2237+
$ shopify store list --json
2238+
```
2239+
22092240
## `shopify theme check`
22102241

22112242
Validate the theme.

packages/cli/oclif.manifest.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5921,6 +5921,65 @@
59215921
"strict": true,
59225922
"summary": "Surface metadata about a Shopify store."
59235923
},
5924+
"store:list": {
5925+
"aliases": [
5926+
],
5927+
"args": {
5928+
},
5929+
"customPluginName": "@shopify/store",
5930+
"description": "Lists the stores in the Shopify organizations available to the current CLI account.\n\nUse `--organization-id` to list a single organization. Run `shopify organization list` to find organization IDs.",
5931+
"descriptionWithMarkdown": "Lists the stores in the Shopify organizations available to the current CLI account.\n\nUse `--organization-id` to list a single organization. Run `shopify organization list` to find organization IDs.",
5932+
"examples": [
5933+
"<%= config.bin %> <%= command.id %>",
5934+
"<%= config.bin %> <%= command.id %> --organization-id 1234567",
5935+
"<%= config.bin %> <%= command.id %> --json"
5936+
],
5937+
"flags": {
5938+
"json": {
5939+
"allowNo": false,
5940+
"char": "j",
5941+
"description": "Output the result as JSON. Automatically disables color output.",
5942+
"env": "SHOPIFY_FLAG_JSON",
5943+
"hidden": false,
5944+
"name": "json",
5945+
"type": "boolean"
5946+
},
5947+
"no-color": {
5948+
"allowNo": false,
5949+
"description": "Disable color output.",
5950+
"env": "SHOPIFY_FLAG_NO_COLOR",
5951+
"hidden": false,
5952+
"name": "no-color",
5953+
"type": "boolean"
5954+
},
5955+
"organization-id": {
5956+
"description": "List stores for a single organization, by ID.",
5957+
"env": "SHOPIFY_FLAG_ORGANIZATION_ID",
5958+
"hasDynamicHelp": false,
5959+
"multiple": false,
5960+
"name": "organization-id",
5961+
"required": false,
5962+
"type": "option"
5963+
},
5964+
"verbose": {
5965+
"allowNo": false,
5966+
"description": "Increase the verbosity of the output.",
5967+
"env": "SHOPIFY_FLAG_VERBOSE",
5968+
"hidden": false,
5969+
"name": "verbose",
5970+
"type": "boolean"
5971+
}
5972+
},
5973+
"hasDynamicHelp": false,
5974+
"hiddenAliases": [
5975+
],
5976+
"id": "store:list",
5977+
"pluginAlias": "@shopify/cli",
5978+
"pluginName": "@shopify/cli",
5979+
"pluginType": "core",
5980+
"strict": true,
5981+
"summary": "List stores in your Shopify organization."
5982+
},
59245983
"theme:check": {
59255984
"aliases": [
59265985
],

packages/organizations/src/cli/services/fetch.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,17 @@ export async function fetchOrganizationsWithAccessInfo(
3838
return {organizations: [], currentUserResolved: false}
3939
}
4040

41-
const orgs = result.currentUserAccount.organizationsWithAccessToDestination.nodes
42-
return orgs.map((org) => {
41+
const organizations = result.currentUserAccount.organizationsWithAccessToDestination.nodes.map((org) => {
4342
const id = numericIdFromEncodedGid(org.id)
4443
if (id === undefined) {
4544
throw new AbortError(`Failed to decode organization ID from: ${org.id}`)
4645
}
4746
return {id, businessName: org.name}
4847
})
48+
49+
return {
50+
organizations,
51+
currentUserResolved: true,
52+
currentUserEmail: result.currentUserAccount.email,
53+
}
4954
}

0 commit comments

Comments
 (0)