Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"fixed": [[
"@shopify/cli",
"@shopify/app",
"@shopify/store",
"@shopify/create-app",
"@shopify/cli-kit",
"@shopify/theme",
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/oclif.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5799,6 +5799,7 @@
],
"args": {
},
"customPluginName": "@shopify/store",
"description": "Authenticates the app against the specified store for store commands and stores an online access token for later reuse.\n\nRe-run this command if the stored token is missing, expires, or no longer has the scopes you need.",
"descriptionWithMarkdown": "Authenticates the app against the specified store for store commands and stores an online access token for later reuse.\n\nRe-run this command if the stored token is missing, expires, or no longer has the scopes you need.",
"examples": [
Expand Down Expand Up @@ -5866,6 +5867,7 @@
],
"args": {
},
"customPluginName": "@shopify/store",
"description": "Executes an Admin API GraphQL query or mutation on the specified store using previously stored app authentication.\n\nRun `shopify store auth` first to create stored auth for the store.\n\nMutations are disabled by default. Re-run with `--allow-mutations` if you intend to modify store data.",
"descriptionWithMarkdown": "Executes an Admin API GraphQL query or mutation on the specified store using previously stored app authentication.\n\nRun `shopify store auth` first to create stored auth for the store.\n\nMutations are disabled by default. Re-run with `--allow-mutations` if you intend to modify store data.",
"examples": [
Expand Down
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"@oclif/plugin-commands": "4.1.33",
"@oclif/plugin-plugins": "5.4.47",
"@shopify/app": "3.93.0",
"@shopify/store": "3.93.0",
"@shopify/cli-kit": "3.93.0",
"@shopify/plugin-cloudflare": "3.93.0",
"@shopify/plugin-did-you-mean": "3.93.0",
Expand Down
12 changes: 8 additions & 4 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ import HelpCommand from './cli/commands/help.js'
import List from './cli/commands/notifications/list.js'
import Generate from './cli/commands/notifications/generate.js'
import ClearCache from './cli/commands/cache/clear.js'
import StoreAuth from './cli/commands/store/auth.js'
import StoreExecute from './cli/commands/store/execute.js'
import AutoupgradeOff from './cli/commands/config/autoupgrade/off.js'
import AutoupgradeOn from './cli/commands/config/autoupgrade/on.js'
import AutoupgradeStatus from './cli/commands/config/autoupgrade/status.js'
import {createGlobalProxyAgent} from 'global-agent'
import StoreCommands from '@shopify/store'
import ThemeCommands from '@shopify/theme'
import {COMMANDS as HydrogenCommands, HOOKS as HydrogenHooks} from '@shopify/cli-hydrogen'
import {commands as AppCommands} from '@shopify/app'
Expand Down Expand Up @@ -112,6 +111,12 @@ hydrogenCommands.forEach((command) => {
;(HydrogenCommands[command] as any).customPluginName = '@shopify/cli-hydrogen'
})

const storeCommands = Object.keys(StoreCommands) as (keyof typeof StoreCommands)[]
storeCommands.forEach((command) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(StoreCommands[command] as any).customPluginName = '@shopify/store'
})

const pluginCommandsCommands = Object.keys(PluginCommandsCommands) as (keyof typeof PluginCommandsCommands)[]
pluginCommandsCommands.forEach((command) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand All @@ -138,6 +143,7 @@ export const COMMANDS: any = {
...DidYouMeanCommands,
...PluginCommandsCommands,
...HydrogenCommands,
...StoreCommands,
search: Search,
upgrade: Upgrade,
version: VersionCommand,
Expand All @@ -155,8 +161,6 @@ export const COMMANDS: any = {
'notifications:list': List,
'notifications:generate': Generate,
'cache:clear': ClearCache,
'store:auth': StoreAuth,
'store:execute': StoreExecute,
'config:autoupgrade:off': AutoupgradeOff,
'config:autoupgrade:on': AutoupgradeOn,
'config:autoupgrade:status': AutoupgradeStatus,
Expand Down
6 changes: 5 additions & 1 deletion packages/e2e/data/snapshots/commands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
│ └─ logout
├─ commands
├─ config
│ └─ autocorrect
│ ├─ autocorrect
│ │ ├─ off
│ │ ├─ on
│ │ └─ status
│ └─ autoupgrade
│ ├─ off
│ ├─ on
│ └─ status
Expand Down
62 changes: 62 additions & 0 deletions packages/store/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "@shopify/store",
"version": "3.93.0",
"packageManager": "pnpm@10.11.1",
"private": true,
"description": "Utilities for working with Shopify stores",
"homepage": "https://github.com/shopify/cli#readme",
"bugs": {
"url": "https://community.shopify.dev/c/shopify-cli-libraries/14"
},
"repository": {
"type": "git",
"url": "https://github.com/Shopify/cli.git",
"directory": "packages/store"
},
"license": "MIT",
"type": "module",
"exports": {
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"files": [
"/dist",
"/oclif.manifest.json"
],
"scripts": {
"build": "nx build",
"clean": "nx clean",
"lint": "nx lint",
"lint:fix": "nx lint:fix",
"prepack": "NODE_ENV=production pnpm nx build && cp ../../README.md README.md",
"vitest": "vitest",
"type-check": "nx type-check"
},
"eslintConfig": {
"extends": [
"../../.eslintrc.cjs"
]
},
"dependencies": {
"@oclif/core": "4.5.3",
"@shopify/cli-kit": "3.93.0"
},
"devDependencies": {
"@vitest/coverage-istanbul": "^3.1.4"
},
"engines": {
"node": ">=20.10.0"
},
"os": [
"darwin",
"linux",
"win32"
],
"publishConfig": {
"@shopify:registry": "https://registry.npmjs.org",
"access": "public"
},
"engine-strict": true
}
46 changes: 46 additions & 0 deletions packages/store/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "store",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/store/src",
"projectType": "library",
"tags": ["scope:feature"],
"targets": {
"clean": {
"executor": "nx:run-commands",
"options": {
"command": "pnpm rimraf dist/",
"cwd": "packages/store"
}
},
"build": {
"executor": "nx:run-commands",
"outputs": ["{workspaceRoot}/dist"],
"inputs": ["{projectRoot}/src/**/*", "{projectRoot}/package.json"],
"options": {
"command": "pnpm tsc -b ./tsconfig.build.json",
"cwd": "packages/store"
}
},
"lint": {
"executor": "nx:run-commands",
"options": {
"command": "pnpm eslint \"src/**/*.ts\"",
"cwd": "packages/store"
}
},
"lint:fix": {
"executor": "nx:run-commands",
"options": {
"command": "pnpm eslint 'src/**/*.ts' --fix",
"cwd": "packages/store"
}
},
"type-check": {
"executor": "nx:run-commands",
"options": {
"command": "pnpm tsc --noEmit",
"cwd": "packages/store"
}
}
}
}
9 changes: 9 additions & 0 deletions packages/store/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import StoreAuth from './cli/commands/store/auth.js'
import StoreExecute from './cli/commands/store/execute.js'

const COMMANDS = {
'store:auth': StoreAuth,
'store:execute': StoreExecute,
}

export default COMMANDS
7 changes: 7 additions & 0 deletions packages/store/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"exclude": ["**/*.test.ts"],
"references": [
{"path": "../cli-kit"}
]
}
13 changes: 13 additions & 0 deletions packages/store/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "../../configurations/tsconfig.json",
"include": ["./src/**/*.ts"],
"exclude": ["./dist"],
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"tsBuildInfoFile": "dist/tsconfig.tsbuildinfo"
},
"references": [
{"path": "../cli-kit"}
]
}
3 changes: 3 additions & 0 deletions packages/store/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from '../../configurations/vite.config'

export default config(__dirname)
Loading
Loading