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
4 changes: 2 additions & 2 deletions packages/app/src/cli/services/dev/select-store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ describe('selectStore', async () => {
})
// The developer picked the create choice, so no explanatory notice is needed.
expect(renderInfo).not.toHaveBeenCalled()
expect(renderSuccess).toHaveBeenCalledWith({headline: 'Development store "store1" created successfully.'})
expect(renderSuccess).toHaveBeenCalledWith({headline: 'Dev store "store1" created successfully.'})
})

test('passes an affirmative demo data answer through to store creation', async () => {
Expand Down Expand Up @@ -482,7 +482,7 @@ describe('selectStore', async () => {
expect(renderInfo).toHaveBeenCalledWith({
body: "You don't have any dev stores associated with org1's Dev Dashboard. Let's create one.",
})
expect(renderSuccess).toHaveBeenCalledWith({headline: 'Development store "store1" created successfully.'})
expect(renderSuccess).toHaveBeenCalledWith({headline: 'Dev store "store1" created successfully.'})
})

test('reports how to select a created store after provisioning retries are exhausted', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/cli/services/dev/select-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export async function selectStore(
const withDemoData = await devStoreDemoDataPrompt()
const domain = await createDevStore({name, plan, withDemoData, organization: org, json: false, summary: false})
const createdStore = await waitForCreatedStoreByDomain(org, domain, developerPlatformClient)
renderSuccess({headline: `Development store "${createdStore.shopName}" created successfully.`})
renderSuccess({headline: `Dev store "${createdStore.shopName}" created successfully.`})
return createdStore
}

Expand Down
20 changes: 10 additions & 10 deletions packages/cli/oclif.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7185,8 +7185,8 @@
"args": {
},
"customPluginName": "@shopify/store",
"description": "Creates a new development store in your organization.",
"descriptionWithMarkdown": "Creates a new development store in your organization.",
"description": "Creates a new dev store in your organization.",
"descriptionWithMarkdown": "Creates a new dev store in your organization.",
"enableJsonFlag": false,
"examples": [
"<%= config.bin %> <%= command.id %>",
Expand All @@ -7206,13 +7206,13 @@
},
"demo-data": {
"allowNo": true,
"description": "Populate the new development store with demo data.",
"description": "Populate the new dev store with demo data.",
"env": "SHOPIFY_FLAG_STORE_DEMO_DATA",
"name": "demo-data",
"type": "boolean"
},
"feature-preview": {
"description": "The handle of a feature preview to enable on the new development store.",
"description": "The handle of a feature preview to enable on the new dev store.",
"env": "SHOPIFY_FLAG_STORE_FEATURE_PREVIEW",
"hasDynamicHelp": false,
"multiple": false,
Expand All @@ -7229,7 +7229,7 @@
"type": "boolean"
},
"name": {
"description": "Name for the new development store. Required if non interactive.",
"description": "Name for the new dev store. Required if non interactive.",
"env": "SHOPIFY_FLAG_STORE_NAME",
"hasDynamicHelp": false,
"multiple": false,
Expand All @@ -7253,7 +7253,7 @@
"type": "option"
},
"plan": {
"description": "The Shopify plan to use for the new development store. Required if non interactive.",
"description": "The Shopify plan to use for the new dev store. Required if non interactive.",
"env": "SHOPIFY_FLAG_STORE_PLAN",
"hasDynamicHelp": false,
"multiple": false,
Expand Down Expand Up @@ -7284,7 +7284,7 @@
"pluginName": "@shopify/cli",
"pluginType": "core",
"strict": true,
"summary": "Create a new development store."
"summary": "Create a new dev store."
},
"store:create:preview": {
"aliases": [
Expand Down Expand Up @@ -7360,8 +7360,8 @@
"args": {
},
"customPluginName": "@shopify/store",
"description": "Deletes a development store from your organization.",
"descriptionWithMarkdown": "Deletes a development store from your organization.",
"description": "Deletes a dev store from your organization.",
"descriptionWithMarkdown": "Deletes a dev store from your organization.",
"enableJsonFlag": false,
"examples": [
"<%= config.bin %> <%= command.id %> --store shop.myshopify.com --organization-id 1234567",
Expand Down Expand Up @@ -7430,7 +7430,7 @@
"pluginName": "@shopify/cli",
"pluginType": "core",
"strict": true,
"summary": "Delete a development store."
"summary": "Delete a dev store."
},
"store:execute": {
"aliases": [
Expand Down
2 changes: 1 addition & 1 deletion packages/organizations/src/cli/prompts/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const PLAN_LABELS: {[plan in DevStorePlan]: string} = {
}

export function devStoreNamePrompt(): Promise<string> {
return ui.renderTextPrompt({message: 'Name for the new development store'})
return ui.renderTextPrompt({message: 'Name for the new dev store'})
}

export function devStorePlanPrompt(): Promise<DevStorePlan> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export async function createDevStore(options: CreateDevStoreOptions): Promise<st
const userErrors = createAppDevelopmentStore.userErrors
if (userErrors && userErrors.length > 0) {
const messages = userErrors.map((error) => error.message).join(', ')
throw new AbortError(`Failed to create development store: ${messages}`)
throw new AbortError(`Failed to create dev store: ${messages}`)
}

const {shopDomain, shopAdminUrl} = createAppDevelopmentStore
Expand Down Expand Up @@ -167,7 +167,7 @@ export async function createDevStore(options: CreateDevStoreOptions): Promise<st
pushRow(rows, 'Demo data', options.withDemoData ? 'enabled' : 'disabled')

renderSuccess({
headline: `Development store "${name}" created successfully.`,
headline: `Dev store "${name}" created successfully.`,
customSections: [{body: {tabularData: rows, firstColumnSubdued: true}}],
})
}
Expand Down
12 changes: 6 additions & 6 deletions packages/store/src/cli/commands/store/create/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import {Flags} from '@oclif/core'
export default class StoreCreateDev extends Command {
static hidden = true

static summary = 'Create a new development store.'
static summary = 'Create a new dev store.'

static descriptionWithMarkdown = 'Creates a new development store in your organization.'
static descriptionWithMarkdown = 'Creates a new dev store in your organization.'

static description = this.descriptionWithoutMarkdown()

Expand All @@ -31,24 +31,24 @@ export default class StoreCreateDev extends Command {
...jsonFlag,
name: requiredIfNonInteractive(
Flags.string({
description: 'Name for the new development store.',
description: 'Name for the new dev store.',
env: 'SHOPIFY_FLAG_STORE_NAME',
}),
),
'organization-id': requiredIfNonInteractive(storeFlags['organization-id']),
plan: requiredIfNonInteractive(
Flags.string({
description: 'The Shopify plan to use for the new development store.',
description: 'The Shopify plan to use for the new dev store.',
options: devStorePlanHandles,
env: 'SHOPIFY_FLAG_STORE_PLAN',
}),
),
'feature-preview': Flags.string({
description: 'The handle of a feature preview to enable on the new development store.',
description: 'The handle of a feature preview to enable on the new dev store.',
env: 'SHOPIFY_FLAG_STORE_FEATURE_PREVIEW',
}),
'demo-data': Flags.boolean({
description: 'Populate the new development store with demo data.',
description: 'Populate the new dev store with demo data.',
allowNo: true,
env: 'SHOPIFY_FLAG_STORE_DEMO_DATA',
}),
Expand Down
4 changes: 2 additions & 2 deletions packages/store/src/cli/commands/store/delete.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe('store delete command', () => {
await StoreDelete.run(['--store', 'my-store.myshopify.com', '--organization-id', '12345'])

expect(renderDangerousConfirmationPrompt).toHaveBeenCalledWith({
message: `Delete development store my-store.myshopify.com? This can't be undone.`,
message: `Delete dev store my-store.myshopify.com? This can't be undone.`,
confirmation: 'my-store.myshopify.com',
})
expect(deleteDevStore).toHaveBeenCalled()
Expand Down Expand Up @@ -132,7 +132,7 @@ describe('store delete command', () => {
const parsed = JSON.parse(call)
expect(parsed).toEqual({
error: true,
message: 'Deleting the development store my-store.myshopify.com requires confirmation.',
message: 'Deleting the dev store my-store.myshopify.com requires confirmation.',
nextSteps: ['Use the `--force` flag to skip confirmation when running non-interactively.'],
exitCode: 1,
})
Expand Down
8 changes: 4 additions & 4 deletions packages/store/src/cli/commands/store/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import {Flags} from '@oclif/core'
export default class StoreDelete extends Command {
static hidden = true

static summary = 'Delete a development store.'
static summary = 'Delete a dev store.'

static descriptionWithMarkdown = 'Deletes a development store from your organization.'
static descriptionWithMarkdown = 'Deletes a dev store from your organization.'

static description = this.descriptionWithoutMarkdown()

Expand Down Expand Up @@ -43,7 +43,7 @@ export default class StoreDelete extends Command {
// Deleting a store is irreversible: in non-interactive runs (CI, agents, piped
// input) confirmation is impossible, so an explicit --force is required instead.
if (!flags.force && !isTTY()) {
throw new AbortError(`Deleting the development store ${flags.store} requires confirmation.`, null, [
throw new AbortError(`Deleting the dev store ${flags.store} requires confirmation.`, null, [
'Use the `--force` flag to skip confirmation when running non-interactively.',
])
}
Expand All @@ -52,7 +52,7 @@ export default class StoreDelete extends Command {

if (!flags.force) {
const confirmed = await renderDangerousConfirmationPrompt({
message: `Delete development store ${flags.store}? This can't be undone.`,
message: `Delete dev store ${flags.store}? This can't be undone.`,
confirmation: flags.store,
})
if (!confirmed) throw new AbortSilentError()
Expand Down
4 changes: 1 addition & 3 deletions packages/store/src/cli/prompts/store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ describe('storeNamePrompt', () => {
const result = await storeNamePrompt()

expect(result).toBe('my-store')
expect(renderTextPrompt).toHaveBeenCalledWith(
expect.objectContaining({message: 'Name for the new development store'}),
)
expect(renderTextPrompt).toHaveBeenCalledWith(expect.objectContaining({message: 'Name for the new dev store'}))
})
})

Expand Down
4 changes: 2 additions & 2 deletions packages/store/src/cli/services/store/delete/dev.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ describe('deleteDevStore', () => {
},
})

await expect(deleteDevStore(defaultOptions)).rejects.toThrow('Failed to delete development store: Store not found')
await expect(deleteDevStore(defaultOptions)).rejects.toThrow('Failed to delete dev store: Store not found')

expect(renderSingleTask).not.toHaveBeenCalled()
expect(mutationRequests()).toHaveLength(1)
Expand All @@ -169,7 +169,7 @@ describe('deleteDevStore', () => {
})

await expect(deleteDevStore(defaultOptions)).rejects.toThrow(
'Failed to delete development store: Store management from the Shopify CLI is not yet enabled for your organization.',
'Failed to delete dev store: Store management from the Shopify CLI is not yet enabled for your organization.',
)

expect(renderSingleTask).not.toHaveBeenCalled()
Expand Down
8 changes: 4 additions & 4 deletions packages/store/src/cli/services/store/delete/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export async function deleteDevStore(options: DeleteDevStoreOptions): Promise<vo
const userErrors = deleteAppDevelopmentStore.userErrors
if (userErrors && userErrors.length > 0) {
const messages = userErrors.map((error) => error.message).join(', ')
throw new AbortError(`Failed to delete development store: ${messages}`)
throw new AbortError(`Failed to delete dev store: ${messages}`)
}
if (deleteAppDevelopmentStore.success === false) {
throw new AbortError('Store deletion failed.')
Expand All @@ -75,12 +75,12 @@ export async function deleteDevStore(options: DeleteDevStoreOptions): Promise<vo
outputResult(deletionResultJson({store, organization: org, deletionConfirmed}))
} else if (deletionConfirmed) {
renderSuccess({
headline: `Development store "${store}" deleted successfully.`,
headline: `Dev store "${store}" deleted successfully.`,
body: ['The store was deleted.'],
})
} else {
renderWarning({
headline: `Development store "${store}" deletion was requested, but not confirmed.`,
headline: `Dev store "${store}" deletion was requested, but not confirmed.`,
body: [
'Shopify accepted the deletion request, but deletion was not confirmed before the CLI stopped waiting.',
'The store may still finish deleting asynchronously.',
Expand Down Expand Up @@ -113,7 +113,7 @@ async function waitForStoreDeletionConfirmation(options: StoreDeletionConfirmati
const organizationsShopifyShopId = toOrganizationsShopifyShopId(options.shopifyShopId)

return renderSingleTask({
title: outputContent`Development store deletion requested. Waiting for deletion confirmation`,
title: outputContent`Dev store deletion requested. Waiting for deletion confirmation`,
task: async (updateStatus) => {
const startTime = Date.now()
while (true) {
Expand Down
Loading