@shopify/cli-kit 3.16.2 → 3.17.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/CHANGELOG.md +18 -0
- package/README.md +1 -1
- package/dist/analytics.d.ts +5 -5
- package/dist/analytics.js +5 -5
- package/dist/analytics.js.map +1 -1
- package/dist/api/common.d.ts +2 -2
- package/dist/api/common.js +2 -2
- package/dist/api/common.js.map +1 -1
- package/dist/api/graphql/functions/app_function_set.js +0 -7
- package/dist/api/graphql/functions/app_function_set.js.map +1 -1
- package/dist/api/graphql/index.d.ts +0 -2
- package/dist/api/graphql/index.js +0 -2
- package/dist/api/graphql/index.js.map +1 -1
- package/dist/api/oxygen.d.ts +5 -0
- package/dist/api/oxygen.js +30 -0
- package/dist/api/oxygen.js.map +1 -0
- package/dist/api/partners.d.ts +7 -7
- package/dist/api/partners.js +7 -7
- package/dist/api/partners.js.map +1 -1
- package/dist/api.d.ts +2 -2
- package/dist/api.js +2 -2
- package/dist/api.js.map +1 -1
- package/dist/common/object.d.ts +3 -3
- package/dist/common/object.js +3 -3
- package/dist/common/object.js.map +1 -1
- package/dist/environment/fqdn.d.ts +3 -3
- package/dist/environment/fqdn.js +3 -3
- package/dist/environment/fqdn.js.map +1 -1
- package/dist/environment/local.d.ts +13 -13
- package/dist/environment/local.js +16 -16
- package/dist/environment/local.js.map +1 -1
- package/dist/environment/spin.d.ts +12 -12
- package/dist/environment/spin.js +12 -12
- package/dist/environment/spin.js.map +1 -1
- package/dist/environment/utilities.d.ts +0 -2
- package/dist/environment/utilities.js +0 -2
- package/dist/environment/utilities.js.map +1 -1
- package/dist/error.d.ts +1 -1
- package/dist/error.js +1 -1
- package/dist/error.js.map +1 -1
- package/dist/file.d.ts +17 -18
- package/dist/file.js +17 -18
- package/dist/file.js.map +1 -1
- package/dist/git.d.ts +1 -1
- package/dist/git.js +2 -2
- package/dist/git.js.map +1 -1
- package/dist/http/fetch.d.ts +2 -2
- package/dist/http/fetch.js +2 -2
- package/dist/http/fetch.js.map +1 -1
- package/dist/http.d.ts +1 -1
- package/dist/http.js +1 -1
- package/dist/http.js.map +1 -1
- package/dist/id.d.ts +1 -1
- package/dist/id.js +1 -1
- package/dist/id.js.map +1 -1
- package/dist/network/service.d.ts +0 -2
- package/dist/network/service.js +0 -1
- package/dist/network/service.js.map +1 -1
- package/dist/node/archiver.d.ts +2 -2
- package/dist/node/archiver.js +2 -2
- package/dist/node/archiver.js.map +1 -1
- package/dist/node/checksum.d.ts +2 -2
- package/dist/node/checksum.js +2 -2
- package/dist/node/checksum.js.map +1 -1
- package/dist/node/cli.d.ts +1 -2
- package/dist/node/cli.js +1 -7
- package/dist/node/cli.js.map +1 -1
- package/dist/node/dot-env.d.ts +7 -7
- package/dist/node/dot-env.js +7 -7
- package/dist/node/dot-env.js.map +1 -1
- package/dist/node/framework.d.ts +2 -2
- package/dist/node/framework.js +2 -2
- package/dist/node/framework.js.map +1 -1
- package/dist/node/hooks/prerun.js +6 -6
- package/dist/node/hooks/prerun.js.map +1 -1
- package/dist/node/node-package-manager.d.ts +32 -28
- package/dist/node/node-package-manager.js +29 -29
- package/dist/node/node-package-manager.js.map +1 -1
- package/dist/node/ruby.d.ts +4 -4
- package/dist/node/ruby.js +5 -5
- package/dist/node/ruby.js.map +1 -1
- package/dist/os.d.ts +1 -1
- package/dist/os.js +1 -1
- package/dist/os.js.map +1 -1
- package/dist/output.d.ts +18 -20
- package/dist/output.js +23 -25
- package/dist/output.js.map +1 -1
- package/dist/path.d.ts +4 -4
- package/dist/path.js +4 -4
- package/dist/path.js.map +1 -1
- package/dist/plugins.d.ts +4 -4
- package/dist/plugins.js +4 -4
- package/dist/plugins.js.map +1 -1
- package/dist/port.d.ts +1 -1
- package/dist/port.js +1 -1
- package/dist/port.js.map +1 -1
- package/dist/public/common/array.d.ts +4 -4
- package/dist/public/common/array.js +4 -4
- package/dist/public/common/array.js.map +1 -1
- package/dist/secure-store.d.ts +4 -4
- package/dist/secure-store.js +4 -4
- package/dist/secure-store.js.map +1 -1
- package/dist/session/device-authorization.d.ts +5 -5
- package/dist/session/device-authorization.js +5 -5
- package/dist/session/device-authorization.js.map +1 -1
- package/dist/session/exchange.d.ts +10 -16
- package/dist/session/exchange.js +10 -16
- package/dist/session/exchange.js.map +1 -1
- package/dist/session/post-auth.js +2 -2
- package/dist/session/post-auth.js.map +1 -1
- package/dist/session/redirect-listener.js +1 -1
- package/dist/session/redirect-listener.js.map +1 -1
- package/dist/session/schema.d.ts +3 -2
- package/dist/session/schema.js +3 -2
- package/dist/session/schema.js.map +1 -1
- package/dist/session/scopes.d.ts +3 -3
- package/dist/session/scopes.js +3 -3
- package/dist/session/scopes.js.map +1 -1
- package/dist/session/store.d.ts +2 -2
- package/dist/session/store.js +2 -2
- package/dist/session/store.js.map +1 -1
- package/dist/session/token.d.ts +1 -1
- package/dist/session/token.js +1 -1
- package/dist/session/token.js.map +1 -1
- package/dist/session/validate.d.ts +4 -4
- package/dist/session/validate.js +4 -7
- package/dist/session/validate.js.map +1 -1
- package/dist/session.d.ts +10 -10
- package/dist/session.js +10 -10
- package/dist/session.js.map +1 -1
- package/dist/string.d.ts +2 -2
- package/dist/string.js +2 -2
- package/dist/string.js.map +1 -1
- package/dist/system.d.ts +4 -4
- package/dist/system.js +4 -4
- package/dist/system.js.map +1 -1
- package/dist/template.d.ts +3 -3
- package/dist/template.js +3 -3
- package/dist/template.js.map +1 -1
- package/dist/testing/store.d.ts +2 -2
- package/dist/testing/store.js +2 -2
- package/dist/testing/store.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +17 -8
- package/dist/ui.js.map +1 -1
- package/dist/version.d.ts +3 -3
- package/dist/version.js +3 -3
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
- package/dist/api/graphql/functions/compile_module.d.ts +0 -15
- package/dist/api/graphql/functions/compile_module.js +0 -13
- package/dist/api/graphql/functions/compile_module.js.map +0 -1
- package/dist/api/graphql/functions/module_compilation_status.d.ts +0 -15
- package/dist/api/graphql/functions/module_compilation_status.js +0 -13
- package/dist/api/graphql/functions/module_compilation_status.js.map +0 -1
package/dist/system.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.js","sourceRoot":"","sources":["../src/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,IAAI,gBAAgB,EAAE,mBAAmB,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AACtF,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAA;AACvC,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAA;AAChC,OAAO,EAAC,KAAK,EAAoB,MAAM,OAAO,CAAA;AAgB9C,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,EAAE,GAAW,EAAE,EAAE;IACxC,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAA;IACzC,MAAM,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;AACjC,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAAE,OAAe,EAAE,IAAc,EAAE,OAAqB,EAAmB,EAAE;IAC7G,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;IACtD,OAAO,MAAM,CAAC,MAAM,CAAA;AACtB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,EAAE,OAAe,EAAE,IAAc,EAAE,OAAqB,EAAE,EAAE;IACnF,MAAM,cAAc,GAAG,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;IACxD,IAAI,OAAO,EAAE,MAAM,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE;QACnD,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;KAC5C;IACD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E,EAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAC,CAAC,CAAA;AAClE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,OAAe;IACzC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,UAAU,CAAC,OAAO,EAAE,IAAI,GAAG,OAAO,CAAC,CAAA;IACrC,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import {concurrent as concurrentOutput, shouldDisplayColors, debug} from './output.js'\nimport {platformAndArch} from './os.js'\nimport {Abort} from './error.js'\nimport {execa, ExecaChildProcess} from 'execa'\nimport {AbortSignal} from 'abort-controller'\nimport type {Writable, Readable} from 'node:stream'\n\nexport interface ExecOptions {\n cwd?: string\n env?: {[key: string]: string | undefined}\n stdin?: Readable | 'inherit'\n stdout?: Writable | 'inherit'\n stderr?: Writable | 'inherit'\n stdio?: 'inherit'\n input?: string\n signal?: AbortSignal\n}\nexport type WritableExecOptions = Omit<ExecOptions, 'stdout'> & {stdout?: Writable}\n\nexport const open = async (url: string) => {\n const externalOpen = await import('open')\n await externalOpen.default(url)\n}\n\n/**\n * Runs a command asynchronously, aggregates the stdout data, and returns it.\n * @param command
|
|
1
|
+
{"version":3,"file":"system.js","sourceRoot":"","sources":["../src/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,IAAI,gBAAgB,EAAE,mBAAmB,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AACtF,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAA;AACvC,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAA;AAChC,OAAO,EAAC,KAAK,EAAoB,MAAM,OAAO,CAAA;AAgB9C,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,EAAE,GAAW,EAAE,EAAE;IACxC,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAA;IACzC,MAAM,YAAY,CAAC,OAAO,CAAC,GAA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CAAC,CAAA;YACJ,CAAC;SACF,CAAA;IACH,CAAC,CAAC,CACH,CAAA;AACH,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,QAAgB;IACzC,IAAI,UAAkB,CAAA;IACtB,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE;QACrB,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAA;KAC/B;SAAM,IAAI,CAAC,MAAM,eAAe,EAAE,CAAC,CAAC,QAAQ,KAAK,SAAS,EAAE;QAC3D,UAAU,GAAG,MAAM,CAAA;KACpB;SAAM;QACL,UAAU,GAAG,UAAU,CAAA;KACxB;IACD,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,CAAA;IAC/D,MAAM,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,EAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAC,CAAC,CAAA;AAClE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,OAAe;IACzC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,UAAU,CAAC,OAAO,EAAE,IAAI,GAAG,OAAO,CAAC,CAAA;IACrC,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import {concurrent as concurrentOutput, shouldDisplayColors, debug} from './output.js'\nimport {platformAndArch} from './os.js'\nimport {Abort} from './error.js'\nimport {execa, ExecaChildProcess} from 'execa'\nimport {AbortSignal} from 'abort-controller'\nimport type {Writable, Readable} from 'node:stream'\n\nexport interface ExecOptions {\n cwd?: string\n env?: {[key: string]: string | undefined}\n stdin?: Readable | 'inherit'\n stdout?: Writable | 'inherit'\n stderr?: Writable | 'inherit'\n stdio?: 'inherit'\n input?: string\n signal?: AbortSignal\n}\nexport type WritableExecOptions = Omit<ExecOptions, 'stdout'> & {stdout?: Writable}\n\nexport const open = async (url: string) => {\n const externalOpen = await import('open')\n await externalOpen.default(url)\n}\n\n/**\n * Runs a command asynchronously, aggregates the stdout data, and returns it.\n * @param command - Command to be executed.\n * @param args - Arguments to pass to the command.\n * @returns A promise that resolves with the aggregatted stdout of the command.\n */\nexport const captureOutput = async (command: string, args: string[], options?: ExecOptions): Promise<string> => {\n const result = await buildExec(command, args, options)\n return result.stdout\n}\n\nexport const exec = async (command: string, args: string[], options?: ExecOptions) => {\n const commandProcess = buildExec(command, args, options)\n if (options?.stderr && options.stderr !== 'inherit') {\n commandProcess.stderr?.pipe(options.stderr)\n }\n if (options?.stdout && options.stdout !== 'inherit') {\n commandProcess.stdout?.pipe(options.stdout)\n }\n options?.signal?.addEventListener('abort', () => {\n commandProcess.kill('SIGTERM', {forceKillAfterTimeout: 1000})\n })\n try {\n await commandProcess\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (processError: any) {\n const abortError = new Abort(processError.message)\n abortError.stack = processError.stack\n throw abortError\n }\n}\n\nconst buildExec = (command: string, args: string[], options?: ExecOptions): ExecaChildProcess<string> => {\n const env = options?.env ?? process.env\n if (shouldDisplayColors()) {\n env.FORCE_COLOR = '1'\n }\n const commandProcess = execa(command, args, {\n env,\n cwd: options?.cwd,\n input: options?.input,\n stdio: options?.stdio,\n stdin: options?.stdin,\n stdout: options?.stdout === 'inherit' ? 'inherit' : undefined,\n stderr: options?.stderr === 'inherit' ? 'inherit' : undefined,\n })\n debug(`\nRunning system process:\n · Command: ${command} ${args.join(' ')}\n · Working directory: ${options?.cwd ?? process.cwd()}\n`)\n return commandProcess\n}\n\ninterface ConcurrentExecCommand {\n prefix: string\n executable: string\n args: string[]\n cwd: string\n}\n\n/**\n * Runs commands concurrently and combines the standard output and error data\n * into a single stream that differenciates the sources using a colored prefix:\n *\n * Example:\n * [my-extension] Log coming from my-extension\n * [my-script] Log coming from my script\n *\n * If one of the processes fails, it aborts the running ones and exits with that error.\n * @param commands - Commands to execute.\n */\nexport const concurrentExec = async (commands: ConcurrentExecCommand[]): Promise<void> => {\n await concurrentOutput(\n commands.map((command) => {\n return {\n prefix: command.prefix,\n action: async (stdout, stderr, signal) => {\n await exec(command.executable, command.args, {\n stdout,\n stderr,\n cwd: command.cwd,\n signal,\n })\n },\n }\n }),\n )\n}\n\n/**\n * Displays a large file using the terminal pager set by the user, or a\n * reasonable default for the user's OS:\n *\n * @param filename - The path to the file to be displayed.\n */\nexport async function page(filename: string) {\n let executable: string\n if (process.env.PAGER) {\n executable = process.env.PAGER\n } else if ((await platformAndArch()).platform === 'windows') {\n executable = 'more'\n } else {\n executable = 'less -NR'\n }\n const [command, ...args] = [...executable.split(' '), filename]\n await exec(command, args, {stdout: 'inherit', stdin: 'inherit'})\n}\n\nexport async function sleep(seconds: number) {\n return new Promise((resolve) => {\n setTimeout(resolve, 1000 * seconds)\n })\n}\n"]}
|
package/dist/template.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export declare function create(templateContent: string): (data: object) => Promi
|
|
|
4
4
|
* and replaces variables in directory and file names, and files' content
|
|
5
5
|
* using the Liquid template engine.
|
|
6
6
|
* Files indicate that they are liquid template by using the .liquid extension.
|
|
7
|
-
* @param from
|
|
8
|
-
* @param to
|
|
9
|
-
* @param data
|
|
7
|
+
* @param from - Directory that contains the template.
|
|
8
|
+
* @param to - Output directory.
|
|
9
|
+
* @param data - Data to feed the template engine.
|
|
10
10
|
*/
|
|
11
11
|
export declare function recursiveDirectoryCopy(from: string, to: string, data: object): Promise<void>;
|
package/dist/template.js
CHANGED
|
@@ -14,9 +14,9 @@ export function create(templateContent) {
|
|
|
14
14
|
* and replaces variables in directory and file names, and files' content
|
|
15
15
|
* using the Liquid template engine.
|
|
16
16
|
* Files indicate that they are liquid template by using the .liquid extension.
|
|
17
|
-
* @param from
|
|
18
|
-
* @param to
|
|
19
|
-
* @param data
|
|
17
|
+
* @param from - Directory that contains the template.
|
|
18
|
+
* @param to - Output directory.
|
|
19
|
+
* @param data - Data to feed the template engine.
|
|
20
20
|
*/
|
|
21
21
|
export async function recursiveDirectoryCopy(from, to, data) {
|
|
22
22
|
debug(content `Copying template from directory ${token.path(from)} to ${token.path(to)}`);
|
package/dist/template.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,WAAW,CAAA;AACvD,OAAO,EAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,wBAAwB,EAAC,MAAM,WAAW,CAAA;AAChG,OAAO,EAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AACjD,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAE/B,yDAAyD;AACzD,MAAM,UAAU,MAAM,CAAC,eAAuB;IAC5C,OAAO,CAAC,IAAY,EAAmB,EAAE;QACvC,MAAM,MAAM,GAAG,IAAI,MAAM,EAAE,CAAA;QAC3B,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,IAAI,CAAC,CAAA;IAC3D,CAAC,CAAA;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,IAAY,EAAE,EAAU,EAAE,IAAY;IACjF,KAAK,CAAC,OAAO,CAAA,mCAAmC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;IACxF,MAAM,aAAa,GAAa,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAC,GAAG,EAAE,IAAI,EAAC,CAAC,CAAA;IAE3E,MAAM,mBAAmB,GAAG,aAAa;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YAAY,EAAE;gBAChB,MAAM,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAA;aAC5C;SACF;aAAM;YACL,MAAM,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAA;SACzC;IACH,CAAC,CAAC,CACH,CAAA;AACH,CAAC","sourcesContent":["import {glob, join, dirname, relative} from './path.js'\nimport {mkdir, read, copy, chmod, isDirectory, write, hasExecutablePermissions} from './file.js'\nimport {content, token, debug} from './output.js'\nimport {Liquid} from 'liquidjs'\n\n// This line is necessary to register additional helpers.\nexport function create(templateContent: string) {\n return (data: object): Promise<string> => {\n const engine = new Liquid()\n return engine.render(engine.parse(templateContent), data)\n }\n}\n\n/**\n * Given a directory, it traverses the files and directories recursively\n * and replaces variables in directory and file names, and files' content\n * using the Liquid template engine.\n * Files indicate that they are liquid template by using the .liquid extension.\n * @param from
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,WAAW,CAAA;AACvD,OAAO,EAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,wBAAwB,EAAC,MAAM,WAAW,CAAA;AAChG,OAAO,EAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AACjD,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAE/B,yDAAyD;AACzD,MAAM,UAAU,MAAM,CAAC,eAAuB;IAC5C,OAAO,CAAC,IAAY,EAAmB,EAAE;QACvC,MAAM,MAAM,GAAG,IAAI,MAAM,EAAE,CAAA;QAC3B,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,IAAI,CAAC,CAAA;IAC3D,CAAC,CAAA;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,C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AA;YAC5C,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAA;YACjD,MAAM,YAAY,GAAG,MAAM,wBAAwB,CAAC,gBAAgB,CAAC,CAAA;YACrE,MAAM,uBAAuB,GAAG,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAA;YACjE,MAAM,IAAI,CAAC,gBAAgB,EAAE,uBAAuB,CAAC,CAAA;YACrD,MAAM,KAAK,CAAC,uBAAuB,EAAE,aAAa,CAAC,CAAA;YACnD,IAAI,YAAY,EAAE;gBAChB,MAAM,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAA;aAC5C;SACF;aAAM;YACL,MAAM,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAA;SACzC;IACH,CAAC,CAAC,CACH,CAAA;AACH,CAAC","sourcesContent":["import {glob, join, dirname, relative} from './path.js'\nimport {mkdir, read, copy, chmod, isDirectory, write, hasExecutablePermissions} from './file.js'\nimport {content, token, debug} from './output.js'\nimport {Liquid} from 'liquidjs'\n\n// This line is necessary to register additional helpers.\nexport function create(templateContent: string) {\n return (data: object): Promise<string> => {\n const engine = new Liquid()\n return engine.render(engine.parse(templateContent), data)\n }\n}\n\n/**\n * Given a directory, it traverses the files and directories recursively\n * and replaces variables in directory and file names, and files' content\n * using the Liquid template engine.\n * Files indicate that they are liquid template by using the .liquid extension.\n * @param from - Directory that contains the template.\n * @param to - Output directory.\n * @param data - Data to feed the template engine.\n */\nexport async function recursiveDirectoryCopy(from: string, to: string, data: object) {\n debug(content`Copying template from directory ${token.path(from)} to ${token.path(to)}`)\n const templateFiles: string[] = await glob(join(from, '**/*'), {dot: true})\n\n const sortedTemplateFiles = templateFiles\n .map((path) => path.split('/'))\n .sort((lhs, rhs) => (lhs.length < rhs.length ? 1 : -1))\n .map((components) => components.join('/'))\n await Promise.all(\n sortedTemplateFiles.map(async (templateItemPath) => {\n const outputPath = await create(join(to, relative(from, templateItemPath)))(data)\n if (await isDirectory(templateItemPath)) {\n await mkdir(outputPath)\n } else if (templateItemPath.endsWith('.liquid')) {\n await mkdir(dirname(outputPath))\n const content = await read(templateItemPath)\n const contentOutput = await create(content)(data)\n const isExecutable = await hasExecutablePermissions(templateItemPath)\n const outputPathWithoutLiquid = outputPath.replace('.liquid', '')\n await copy(templateItemPath, outputPathWithoutLiquid)\n await write(outputPathWithoutLiquid, contentOutput)\n if (isExecutable) {\n await chmod(outputPathWithoutLiquid, 0o755)\n }\n } else {\n await copy(templateItemPath, outputPath)\n }\n }),\n )\n}\n"]}
|
package/dist/testing/store.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CLIKitStore } from '../store.js';
|
|
2
2
|
/**
|
|
3
3
|
* Creates a temporary configuration store and ties its lifecycle to the callback.
|
|
4
|
-
* @param callback
|
|
5
|
-
* @returns
|
|
4
|
+
* @param callback - Callback to execute. When the callback exits, the local config is destroyed.
|
|
5
|
+
* @returns Promise that resolves with the value returned by the callback.
|
|
6
6
|
*/
|
|
7
7
|
export declare function temporaryTestStore<T>(callback: (store: CLIKitStore) => Promise<T>): Promise<T>;
|
package/dist/testing/store.js
CHANGED
|
@@ -3,8 +3,8 @@ import { remove } from '../file.js';
|
|
|
3
3
|
import uniqueString from 'unique-string';
|
|
4
4
|
/**
|
|
5
5
|
* Creates a temporary configuration store and ties its lifecycle to the callback.
|
|
6
|
-
* @param callback
|
|
7
|
-
* @returns
|
|
6
|
+
* @param callback - Callback to execute. When the callback exits, the local config is destroyed.
|
|
7
|
+
* @returns Promise that resolves with the value returned by the callback.
|
|
8
8
|
*/
|
|
9
9
|
export async function temporaryTestStore(callback) {
|
|
10
10
|
let localConf;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/testing/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAA;AACvC,OAAO,EAAC,MAAM,EAAC,MAAM,YAAY,CAAA;AACjC,OAAO,YAAY,MAAM,eAAe,CAAA;AAExC;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAI,QAA4C;IACtF,IAAI,SAAkC,CAAA;IACtC,IAAI;QACF,MAAM,IAAI,GAAG,oBAAoB,YAAY,EAAE,EAAE,CAAA;QACjD,SAAS,GAAG,IAAI,WAAW,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC,CAAA;QAChD,gDAAgD;QAChD,MAAM,MAAM,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAA;QAClC,OAAO,MAAM,CAAA;KACd;YAAS;QACR,IAAI,SAAS,EAAE;YACb,MAAM,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;YAC5B,MAAM,YAAY,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAA;YACjE,MAAM,MAAM,CAAC,YAAY,CAAC,CAAA;SAC3B;KACF;AACH,CAAC","sourcesContent":["import {CLIKitStore} from '../store.js'\nimport {remove} from '../file.js'\nimport uniqueString from 'unique-string'\n\n/**\n * Creates a temporary configuration store and ties its lifecycle to the callback.\n * @param callback
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/testing/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAA;AACvC,OAAO,EAAC,MAAM,EAAC,MAAM,YAAY,CAAA;AACjC,OAAO,YAAY,MAAM,eAAe,CAAA;AAExC;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAI,QAA4C;IACtF,IAAI,SAAkC,CAAA;IACtC,IAAI;QACF,MAAM,IAAI,GAAG,oBAAoB,YAAY,EAAE,EAAE,CAAA;QACjD,SAAS,GAAG,IAAI,WAAW,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC,CAAA;QAChD,gDAAgD;QAChD,MAAM,MAAM,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAA;QAClC,OAAO,MAAM,CAAA;KACd;YAAS;QACR,IAAI,SAAS,EAAE;YACb,MAAM,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;YAC5B,MAAM,YAAY,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAA;YACjE,MAAM,MAAM,CAAC,YAAY,CAAC,CAAA;SAC3B;KACF;AACH,CAAC","sourcesContent":["import {CLIKitStore} from '../store.js'\nimport {remove} from '../file.js'\nimport uniqueString from 'unique-string'\n\n/**\n * Creates a temporary configuration store and ties its lifecycle to the callback.\n * @param callback - Callback to execute. When the callback exits, the local config is destroyed.\n * @returns Promise that resolves with the value returned by the callback.\n */\nexport async function temporaryTestStore<T>(callback: (store: CLIKitStore) => Promise<T>): Promise<T> {\n let localConf: CLIKitStore | undefined\n try {\n const name = `shopify-cli-test-${uniqueString()}`\n localConf = new CLIKitStore({projectName: name})\n // eslint-disable-next-line node/callback-return\n const result = callback(localConf)\n return result\n } finally {\n if (localConf) {\n await remove(localConf.path)\n const configFolder = localConf.path.replace(/\\/config.json$/, '')\n await remove(configFolder)\n }\n }\n}\n"]}
|