@shopify/cli 3.24.1 → 3.26.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.
package/LICENSE ADDED
@@ -0,0 +1,8 @@
1
+ Copyright 2019-present, Shopify Inc.
2
+
3
+ ​​
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
+
6
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -79,12 +79,13 @@ export default class Editions extends Command {
79
79
  }
80
80
  Editions.description = 'Shopify editions';
81
81
  Editions.hidden = true;
82
+ /* istanbul ignore next -- @preserve */
82
83
  function unindent(value) {
83
84
  const lines = value.split('\n');
84
85
  // Remove empty lines at start and end
85
86
  if (lines[0]?.trim() === '')
86
87
  lines.shift();
87
- if (lines.at(-1)?.trim() === '')
88
+ if (lines[lines.length - 1]?.trim() === '')
88
89
  lines.pop();
89
90
  const nonEmptyLines = lines.filter((line) => line.trim().length > 0);
90
91
  const numSpacesToCut = Math.min(...nonEmptyLines.map((line) => (/^[\s]*[^\s]/.exec(line)?.[0]?.length || 1) - 1));
@@ -1 +1 @@
1
- {"version":3,"file":"editions.js","sourceRo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AG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IACjH,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACnE,CAAC","sourcesContent":["import Command from '@shopify/cli-kit/node/base-command'\nimport {output, ui} from '@shopify/cli-kit'\n\ntype Choice = 'bfs' | 'hydrogen' | 'devtools'\n\nconst subcommands: {[key in Choice]: () => void | Promise<void>} = {\n bfs: () => {\n output.info(\n unindent(`\n - Built for Shopify: Build great commerce apps that look and perform like they’re part of Shopify\n - Shopify Functions: New ways to extend Shopify: Build custom discounts, shipping, and payments\n - Checkout Extensibility: Apps for checkout are here: Powerful customizations that work with Shop Pay\n `),\n )\n output.info(`\\n\\n`)\n output.info(output.content`${output.token.yellow('Read more here: https://shopify.com/editions/dev#chapter-1')}`)\n },\n devtools: () => {\n output.info(\n unindent(`\n - Developer Experience: Simplified updates to write and distribute an app\n - Embedded App Improvements: Offer a truly seamless app experience\n - Data Protection: Future-proof the apps you build\n `),\n )\n output.info(`\\n\\n`)\n output.info(output.content`${output.token.yellow('Read more here: https://shopify.com/editions/dev#chapter-2')}`)\n },\n hydrogen: () => {\n output.info(\n unindent(`\n - Hydrogen + Oxygen: The Shopify stack for headless commerce\n - Pixels: Intelligent interactions—powered by secure data\n - Marketplace Kit: Add commerce to any platform\n `),\n )\n output.info(`\\n\\n`)\n output.info(output.content`${output.token.yellow('Read more here: https://shopify.com/editions/dev#chapter-3')}`)\n },\n}\nexport default class Editions extends Command {\n static description = 'Shopify editions'\n static hidden = true\n\n async run(): Promise<void> {\n output.info(\n output.content`${output.token.green(\n unindent(`\n _____ __ _ ____ ______ ___ __ _\n / ___// /_ ____ ____ (_) __/_ __ / ____/___/ (_) /_(_)___ ____ _____\n \\\\__ \\\\/ __ \\\\/ __ \\\\/ __ \\\\/ / /_/ / / / / __/ / __ / / __/ / __ \\\\/ __ \\\\/ ___/\n ___/ / / / / /_/ / /_/ / / __/ /_/ / / /___/ /_/ / / /_/ / /_/ / / / (__ )\n /____/_/ /_/\\\\____/ .___/_/_/ \\\\__, / /_____/\\\\__,_/_/\\\\__/_/\\\\____/_/ /_/____/\n /_/ /____/\n ____ __ ___ __\n / __ \\\\___ _ __ / |/ /___ ____/ /__\n / / / / _ \\\\ | / / / /|_/ / __ \\\\/ __ / _ \\\\\n / /_/ / __/ |/ / / / / / /_/ / /_/ / __/\n /_____/\\\\___/|___/ /_/ /_/\\\\____/\\\\__,_/\\\\___/\n `),\n )}`,\n )\n\n output.info(\n unindent(`\n\n\n Welcome to Dev Mode for the Summer 2022 Edition\n https://shopify.com/editions/dev\n\n\n `),\n )\n\n const answer: {editionschoice: Choice} = await ui.prompt([\n {\n name: 'editionschoice',\n type: 'select',\n message: 'What are you looking to solve?',\n choices: [\n {\n value: 'bfs',\n name: 'NEW WAYS TO BUILD GREAT APPS',\n },\n {\n value: 'devtools',\n name: 'IMPROVED DEV TOOLS',\n },\n {\n value: 'hydrogen',\n name: 'NEXT LEVEL STOREFRONT BUILDING',\n },\n ],\n },\n ])\n\n await subcommands[answer.editionschoice]?.()\n output.info(`\\n\\n\\n`)\n }\n}\n\nfunction unindent(value: string): string {\n const lines = value.split('\\n')\n // Remove empty lines at start and end\n if (lines[0]?.trim() === '') lines.shift()\n if (lines.at(-1)?.trim() === '') lines.pop()\n const nonEmptyLines = lines.filter((line) => line.trim().length > 0)\n const numSpacesToCut = Math.min(...nonEmptyLines.map((line) => (/^[\\s]*[^\\s]/.exec(line)?.[0]?.length || 1) - 1))\n return lines.map((line) => line.slice(numSpacesToCut)).join('\\n')\n}\n"]}
1
+ {"version":3,"file":"editions.js","sourceRoot":"","sources":["../../../src/cli/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AG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IACjH,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACnE,CAAC","sourcesContent":["import Command from '@shopify/cli-kit/node/base-command'\nimport {output, ui} from '@shopify/cli-kit'\n\ntype Choice = 'bfs' | 'hydrogen' | 'devtools'\n\nconst subcommands: {[key in Choice]: () => void | Promise<void>} = {\n bfs: () => {\n output.info(\n unindent(`\n - Built for Shopify: Build great commerce apps that look and perform like they’re part of Shopify\n - Shopify Functions: New ways to extend Shopify: Build custom discounts, shipping, and payments\n - Checkout Extensibility: Apps for checkout are here: Powerful customizations that work with Shop Pay\n `),\n )\n output.info(`\\n\\n`)\n output.info(output.content`${output.token.yellow('Read more here: https://shopify.com/editions/dev#chapter-1')}`)\n },\n devtools: () => {\n output.info(\n unindent(`\n - Developer Experience: Simplified updates to write and distribute an app\n - Embedded App Improvements: Offer a truly seamless app experience\n - Data Protection: Future-proof the apps you build\n `),\n )\n output.info(`\\n\\n`)\n output.info(output.content`${output.token.yellow('Read more here: https://shopify.com/editions/dev#chapter-2')}`)\n },\n hydrogen: () => {\n output.info(\n unindent(`\n - Hydrogen + Oxygen: The Shopify stack for headless commerce\n - Pixels: Intelligent interactions—powered by secure data\n - Marketplace Kit: Add commerce to any platform\n `),\n )\n output.info(`\\n\\n`)\n output.info(output.content`${output.token.yellow('Read more here: https://shopify.com/editions/dev#chapter-3')}`)\n },\n}\nexport default class Editions extends Command {\n static description = 'Shopify editions'\n static hidden = true\n\n async run(): Promise<void> {\n output.info(\n output.content`${output.token.green(\n unindent(`\n _____ __ _ ____ ______ ___ __ _\n / ___// /_ ____ ____ (_) __/_ __ / ____/___/ (_) /_(_)___ ____ _____\n \\\\__ \\\\/ __ \\\\/ __ \\\\/ __ \\\\/ / /_/ / / / / __/ / __ / / __/ / __ \\\\/ __ \\\\/ ___/\n ___/ / / / / /_/ / /_/ / / __/ /_/ / / /___/ /_/ / / /_/ / /_/ / / / (__ )\n /____/_/ /_/\\\\____/ .___/_/_/ \\\\__, / /_____/\\\\__,_/_/\\\\__/_/\\\\____/_/ /_/____/\n /_/ /____/\n ____ __ ___ __\n / __ \\\\___ _ __ / |/ /___ ____/ /__\n / / / / _ \\\\ | / / / /|_/ / __ \\\\/ __ / _ \\\\\n / /_/ / __/ |/ / / / / / /_/ / /_/ / __/\n /_____/\\\\___/|___/ /_/ /_/\\\\____/\\\\__,_/\\\\___/\n `),\n )}`,\n )\n\n output.info(\n unindent(`\n\n\n Welcome to Dev Mode for the Summer 2022 Edition\n https://shopify.com/editions/dev\n\n\n `),\n )\n\n const answer: {editionschoice: Choice} = await ui.prompt([\n {\n name: 'editionschoice',\n type: 'select',\n message: 'What are you looking to solve?',\n choices: [\n {\n value: 'bfs',\n name: 'NEW WAYS TO BUILD GREAT APPS',\n },\n {\n value: 'devtools',\n name: 'IMPROVED DEV TOOLS',\n },\n {\n value: 'hydrogen',\n name: 'NEXT LEVEL STOREFRONT BUILDING',\n },\n ],\n },\n ])\n\n await subcommands[answer.editionschoice]?.()\n output.info(`\\n\\n\\n`)\n }\n}\n\n/* istanbul ignore next -- @preserve */\nfunction unindent(value: string): string {\n const lines = value.split('\\n')\n // Remove empty lines at start and end\n if (lines[0]?.trim() === '') lines.shift()\n if (lines[lines.length - 1]?.trim() === '') lines.pop()\n const nonEmptyLines = lines.filter((line) => line.trim().length > 0)\n const numSpacesToCut = Math.min(...nonEmptyLines.map((line) => (/^[\\s]*[^\\s]/.exec(line)?.[0]?.length || 1) - 1))\n return lines.map((line) => line.slice(numSpacesToCut)).join('\\n')\n}\n"]}
@@ -6,7 +6,25 @@ export async function kitchenSink() {
6
6
  body: ['Run', { command: 'npm run shopify upgrade' }, { char: '.' }],
7
7
  });
8
8
  renderInfo({
9
- headline: 'App initialized and ready to build.',
9
+ headline: [
10
+ "To connect this project to your shopify store's inventory:",
11
+ { filePath: '/my-store/hydrogen.config.js' },
12
+ 'with your store ID and Storefront API key.',
13
+ ],
14
+ body: [
15
+ 'You can also try the following steps:',
16
+ {
17
+ list: {
18
+ items: [
19
+ ['Run', { command: 'shopify project connect' }],
20
+ ['Run', { command: 'hydrogen start' }],
21
+ ],
22
+ },
23
+ },
24
+ ],
25
+ });
26
+ renderInfo({
27
+ headline: [{ userInput: 'my-app' }, 'initialized and ready to build.'],
10
28
  nextSteps: [
11
29
  [
12
30
  'Run',
@@ -1 +1 @@
1
- {"version":3,"file":"kitchen-sink.js","sourceRoot":"","sources":["../../../src/cli/services/kitchen-sink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAC,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAA;AAIrH,MAAM,CAAC,KAAK,UAAU,WAAW;IAC/B,UAAU,CAAC;QACT,QAAQ,EAAE,sBAAsB;QAChC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAC,OAAO,EAAE,yBAAyB,EAAC,EAAE,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC;KACjE,CAAC,CAAA;IAEF,UAAU,CAAC;QACT,QAAQ,EAAE,qCAAqC;QAC/C,SAAS,EAAE;YACT;gBACE,KAAK;gBACL;oBACE,OAAO,EAAE,qBAAqB;iBAC/B;aACF;YACD;gBACE,8BAA8B;gBAC9B;oBACE,OAAO,EAAE,aAAa;iBACvB;aACF;YACD;gBACE,wBAAwB;gBACxB;oBACE,OAAO,EAAE,wBAAwB;iBAClC;aACF;SACF;QACD,SAAS,EAAE;YACT;gBACE,KAAK;gBACL;oBACE,OAAO,E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O,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAA;YACzD,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAA;QACxC,CAAC;KACF,CAAA;IAED,MAAM,gBAAgB,CAAC,EAAC,SAAS,EAAE,CAAC,cAAc,EAAE,eAAe,CAAC,EAAC,CAAC,CAAA;AACxE,CAAC","sourcesContent":["import {error} from '@shopify/cli-kit'\nimport {renderConcurrent, renderFatalError, renderInfo, renderSuccess, renderWarning} from '@shopify/cli-kit/node/ui'\nimport {Signal} from '@shopify/cli-kit/src/abort'\nimport {Writable} from 'node:stream'\n\nexport async function kitchenSink() {\n renderInfo({\n headline: 'CLI update available',\n body: ['Run', {command: 'npm run shopify upgrade'}, {char: '.'}],\n })\n\n renderInfo({\n headline: 'App initialized and ready to build.',\n nextSteps: [\n [\n 'Run',\n {\n command: 'cd verification-app',\n },\n ],\n [\n 'To preview your project, run',\n {\n command: 'npm app dev',\n },\n ],\n [\n 'To add extensions, run',\n {\n command: 'npm generate extension',\n },\n ],\n ],\n reference: [\n [\n 'Run',\n {\n command: 'npm shopify help',\n },\n ],\n {\n link: {\n label: 'Dev docs',\n url: 'https://shopify.dev',\n },\n },\n ],\n })\n\n renderSuccess({\n headline: 'CLI updated.',\n body: 'You are now running version 3.47.',\n })\n\n renderSuccess({\n headline: 'Deployment successful.',\n body: 'Your extensions have been uploaded to your Shopify Partners Dashboard.',\n nextSteps: [\n {\n link: {\n label: 'See your deployment and set it live',\n url: 'https://partners.shopify.com/1797046/apps/4523695/deployments',\n },\n },\n ],\n })\n\n renderWarning({\n headline: 'You have reached your limit of checkout extensions for this app.',\n body: 'You can free up space for a new one by deleting an existing one.',\n })\n\n renderWarning({\n headline: 'Required access scope update.',\n body: 'The deadline for re-selecting your app scopes is May 1, 2022.',\n reference: [\n {\n link: {\n label: 'Dev docs',\n url: 'https://shopify.dev/app/scopes',\n },\n },\n ],\n })\n\n // Stack trace\n const somethingWentWrong = new error.Bug('Something went wrong.')\n\n somethingWentWrong.stack = `\n Error: Unexpected error\n at Module._compile (internal/modules/cjs/loader.js:1137:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)\n at Module.load (internal/modules/cjs/loader.js:985:32)\n at Function.Module._load (internal/modules/cjs/loader.js:878:14)\n`\n\n renderFatalError(somethingWentWrong)\n\n // Next Steps\n const nextSteps = [\n [\n 'Have you',\n {\n link: {\n label: 'created a Shopify Partners organization',\n url: 'https://partners.shopify.com/signup',\n },\n },\n {\n char: '?',\n },\n ],\n 'Have you confirmed your accounts from the emails you received?',\n [\n 'Need to connect to a different App or organization? Run the command again with',\n {\n command: '--reset',\n },\n ],\n ]\n\n renderFatalError(new error.Abort('No Organization found', undefined, nextSteps))\n\n // renderConcurrent at the end\n let backendPromiseResolve: () => void\n\n const backendPromise = new Promise<void>(function (resolve, _reject) {\n backendPromiseResolve = resolve\n })\n\n const backendProcess = {\n prefix: 'backend',\n action: async (stdout: Writable, _stderr: Writable, _signal: Signal) => {\n stdout.write('first backend message')\n await new Promise((resolve) => setTimeout(resolve, 1000))\n stdout.write('second backend message')\n await new Promise((resolve) => setTimeout(resolve, 1000))\n stdout.write('third backend message')\n await new Promise((resolve) => setTimeout(resolve, 1000))\n\n backendPromiseResolve()\n },\n }\n\n const frontendProcess = {\n prefix: 'frontend',\n action: async (stdout: Writable, _stderr: Writable, _signal: Signal) => {\n await backendPromise\n\n stdout.write('first frontend message')\n await new Promise((resolve) => setTimeout(resolve, 1000))\n stdout.write('second frontend message')\n await new Promise((resolve) => setTimeout(resolve, 1000))\n stdout.write('third frontend message')\n },\n }\n\n await renderConcurrent({processes: [backendProcess, frontendProcess]})\n}\n"]}
1
+ {"version":3,"file":"kitchen-sink.js","sourceRoot":"","sources":["../../../src/cli/services/kitchen-sink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAC,gB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eAAe,CAAC,EAAC,CAAC,CAAA;AACxE,CAAC","sourcesContent":["import {error} from '@shopify/cli-kit'\nimport {renderConcurrent, renderFatalError, renderInfo, renderSuccess, renderWarning} from '@shopify/cli-kit/node/ui'\nimport {Signal} from '@shopify/cli-kit/src/abort'\nimport {Writable} from 'node:stream'\n\nexport async function kitchenSink() {\n renderInfo({\n headline: 'CLI update available',\n body: ['Run', {command: 'npm run shopify upgrade'}, {char: '.'}],\n })\n\n renderInfo({\n headline: [\n \"To connect this project to your shopify store's inventory:\",\n {filePath: '/my-store/hydrogen.config.js'},\n 'with your store ID and Storefront API key.',\n ],\n body: [\n 'You can also try the following steps:',\n {\n list: {\n items: [\n ['Run', {command: 'shopify project connect'}],\n ['Run', {command: 'hydrogen start'}],\n ],\n },\n },\n ],\n })\n\n renderInfo({\n headline: [{userInput: 'my-app'}, 'initialized and ready to build.'],\n nextSteps: [\n [\n 'Run',\n {\n command: 'cd verification-app',\n },\n ],\n [\n 'To preview your project, run',\n {\n command: 'npm app dev',\n },\n ],\n [\n 'To add extensions, run',\n {\n command: 'npm generate extension',\n },\n ],\n ],\n reference: [\n [\n 'Run',\n {\n command: 'npm shopify help',\n },\n ],\n {\n link: {\n label: 'Dev docs',\n url: 'https://shopify.dev',\n },\n },\n ],\n })\n\n renderSuccess({\n headline: 'CLI updated.',\n body: 'You are now running version 3.47.',\n })\n\n renderSuccess({\n headline: 'Deployment successful.',\n body: 'Your extensions have been uploaded to your Shopify Partners Dashboard.',\n nextSteps: [\n {\n link: {\n label: 'See your deployment and set it live',\n url: 'https://partners.shopify.com/1797046/apps/4523695/deployments',\n },\n },\n ],\n })\n\n renderWarning({\n headline: 'You have reached your limit of checkout extensions for this app.',\n body: 'You can free up space for a new one by deleting an existing one.',\n })\n\n renderWarning({\n headline: 'Required access scope update.',\n body: 'The deadline for re-selecting your app scopes is May 1, 2022.',\n reference: [\n {\n link: {\n label: 'Dev docs',\n url: 'https://shopify.dev/app/scopes',\n },\n },\n ],\n })\n\n // Stack trace\n const somethingWentWrong = new error.Bug('Something went wrong.')\n\n somethingWentWrong.stack = `\n Error: Unexpected error\n at Module._compile (internal/modules/cjs/loader.js:1137:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)\n at Module.load (internal/modules/cjs/loader.js:985:32)\n at Function.Module._load (internal/modules/cjs/loader.js:878:14)\n`\n\n renderFatalError(somethingWentWrong)\n\n // Next Steps\n const nextSteps = [\n [\n 'Have you',\n {\n link: {\n label: 'created a Shopify Partners organization',\n url: 'https://partners.shopify.com/signup',\n },\n },\n {\n char: '?',\n },\n ],\n 'Have you confirmed your accounts from the emails you received?',\n [\n 'Need to connect to a different App or organization? Run the command again with',\n {\n command: '--reset',\n },\n ],\n ]\n\n renderFatalError(new error.Abort('No Organization found', undefined, nextSteps))\n\n // renderConcurrent at the end\n let backendPromiseResolve: () => void\n\n const backendPromise = new Promise<void>(function (resolve, _reject) {\n backendPromiseResolve = resolve\n })\n\n const backendProcess = {\n prefix: 'backend',\n action: async (stdout: Writable, _stderr: Writable, _signal: Signal) => {\n stdout.write('first backend message')\n await new Promise((resolve) => setTimeout(resolve, 1000))\n stdout.write('second backend message')\n await new Promise((resolve) => setTimeout(resolve, 1000))\n stdout.write('third backend message')\n await new Promise((resolve) => setTimeout(resolve, 1000))\n\n backendPromiseResolve()\n },\n }\n\n const frontendProcess = {\n prefix: 'frontend',\n action: async (stdout: Writable, _stderr: Writable, _signal: Signal) => {\n await backendPromise\n\n stdout.write('first frontend message')\n await new Promise((resolve) => setTimeout(resolve, 1000))\n stdout.write('second frontend message')\n await new Promise((resolve) => setTimeout(resolve, 1000))\n stdout.write('third frontend message')\n },\n }\n\n await renderConcurrent({processes: [backendProcess, frontendProcess]})\n}\n"]}