@shopify/shop-minis-cli 0.0.198 → 0.0.205

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.
Files changed (60) hide show
  1. package/build/commands/api-keys/generate.d.ts +2 -0
  2. package/build/commands/api-keys/generate.js +56 -0
  3. package/build/commands/api-keys/generate.js.map +1 -0
  4. package/build/commands/api-keys/index.d.ts +2 -0
  5. package/build/commands/api-keys/index.js +14 -0
  6. package/build/commands/api-keys/index.js.map +1 -0
  7. package/build/commands/api-keys/list.d.ts +2 -0
  8. package/build/commands/api-keys/list.js +32 -0
  9. package/build/commands/api-keys/list.js.map +1 -0
  10. package/build/commands/api-keys/revoke.d.ts +2 -0
  11. package/build/commands/api-keys/revoke.js +59 -0
  12. package/build/commands/api-keys/revoke.js.map +1 -0
  13. package/build/commands/create/examples/default/AGENTS.md +28 -0
  14. package/build/commands/create/examples/default/src/manifest.json +1 -1
  15. package/build/commands/dev/utils/android.js.map +1 -1
  16. package/build/commands/dev/utils/network.js.map +1 -1
  17. package/build/commands/dev/utils/start-app/start-app-with-options.js.map +1 -1
  18. package/build/data/api-keys/api-keys-generate.d.ts +13 -0
  19. package/build/data/api-keys/api-keys-generate.js +22 -0
  20. package/build/data/api-keys/api-keys-generate.js.map +1 -0
  21. package/build/data/api-keys/api-keys-list.d.ts +6 -0
  22. package/build/data/api-keys/api-keys-list.js +16 -0
  23. package/build/data/api-keys/api-keys-list.js.map +1 -0
  24. package/build/data/api-keys/api-keys-revoke.d.ts +10 -0
  25. package/build/data/api-keys/api-keys-revoke.js +17 -0
  26. package/build/data/api-keys/api-keys-revoke.js.map +1 -0
  27. package/build/data/types/autogenerated/shop-minis-admin-api/gql.d.ts +22 -0
  28. package/build/data/types/autogenerated/shop-minis-admin-api/gql.js +3 -0
  29. package/build/data/types/autogenerated/shop-minis-admin-api/gql.js.map +1 -1
  30. package/build/data/types/autogenerated/shop-minis-admin-api/graphql.d.ts +52 -45
  31. package/build/data/types/autogenerated/shop-minis-admin-api/graphql.js +158 -14
  32. package/build/data/types/autogenerated/shop-minis-admin-api/graphql.js.map +1 -1
  33. package/build/dev-panel/asset-manifest.json +6 -6
  34. package/build/dev-panel/checkmark.svg +1 -3
  35. package/build/dev-panel/chevron.svg +1 -3
  36. package/build/dev-panel/copy.svg +1 -4
  37. package/build/dev-panel/get-started.svg +1 -3
  38. package/build/dev-panel/how-to.svg +1 -3
  39. package/build/dev-panel/index.html +1 -1
  40. package/build/dev-panel/references.svg +1 -3
  41. package/build/dev-panel/static/css/main.5592bb60.css +2 -0
  42. package/build/dev-panel/static/css/{main.d66fe13a.css.map → main.5592bb60.css.map} +1 -1
  43. package/build/dev-panel/static/js/main.ba2ae9be.js +3 -0
  44. package/build/dev-panel/static/js/{main.baf3846f.js.LICENSE.txt → main.ba2ae9be.js.LICENSE.txt} +0 -2
  45. package/build/dev-panel/static/js/main.ba2ae9be.js.map +1 -0
  46. package/build/dev-panel/topics.svg +1 -3
  47. package/build/program.js +2 -0
  48. package/build/program.js.map +1 -1
  49. package/build/utils/codemod.d.ts +6 -6
  50. package/build/utils/codemod.js +1 -1
  51. package/build/utils/codemod.js.map +1 -1
  52. package/build/utils/exec-async-child-process.d.ts +2 -5
  53. package/build/utils/exec-async-child-process.js +4 -2
  54. package/build/utils/exec-async-child-process.js.map +1 -1
  55. package/build/utils/vite-config.d.ts +1 -1
  56. package/package.json +25 -18
  57. package/README_INTERNAL.md +0 -153
  58. package/build/dev-panel/static/css/main.d66fe13a.css +0 -2
  59. package/build/dev-panel/static/js/main.baf3846f.js +0 -3
  60. package/build/dev-panel/static/js/main.baf3846f.js.map +0 -1
@@ -1,3 +1 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M2.8498 3.56614C3.05315 2.65106 3.86477 2 4.80217 2H18.7399C19.6383 2 20.4265 2.59907 20.667 3.46471L23 11.8637V20C23 21.1046 22.1046 22 21 22H3C1.89543 22 1 21.1046 1 20V11.8902L2.8498 3.56614ZM18.7399 4L4.80217 4L3.02439 12H20.9621L18.7399 4ZM3 20V14H21V20H3ZM14 16H10V18H14V16ZM6 8.70001L18 8.70001V10.5L6 10.5V8.70001ZM17 5.20001L7 5.20001V7.00001L17 7.00001V5.20001Z" fill="black"/>
3
- </svg>
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.8498 3.56614C3.05315 2.65106 3.86477 2 4.80217 2H18.7399C19.6383 2 20.4265 2.59907 20.667 3.46471L23 11.8637V20C23 21.1046 22.1046 22 21 22H3C1.89543 22 1 21.1046 1 20V11.8902L2.8498 3.56614ZM18.7399 4L4.80217 4L3.02439 12H20.9621L18.7399 4ZM3 20V14H21V20H3ZM14 16H10V18H14V16ZM6 8.70001L18 8.70001V10.5L6 10.5V8.70001ZM17 5.20001L7 5.20001V7.00001L17 7.00001V5.20001Z" fill="black"/></svg>
package/build/program.js CHANGED
@@ -14,6 +14,7 @@ import { loadCommand as loadSubmitCommand } from './commands/submit/index.js';
14
14
  import { loadCommand as loadUpgradeCommand } from './commands/upgrade/index.js';
15
15
  import { loadCommand as loadValidateManifestCommand } from './commands/validate-manifest/index.js';
16
16
  import { loadCommand as loadSyncUserMetafiledDefinitionsCommand } from './commands/sync-user-metafield-definitions/index.js';
17
+ import { loadCommand as loadApiKeysCommand } from './commands/api-keys/index.js';
17
18
  import { loadCommand as loadSecretsCommand } from './commands/secrets/index.js';
18
19
  import { loadCommand as loadProxiesCommand } from './commands/proxies/index.js';
19
20
  import { loadCommand as loadReportsCommand } from './commands/reports/index.js';
@@ -34,6 +35,7 @@ export async function loadProgram() {
34
35
  loadCodemodCommand(program);
35
36
  loadInfoCommand(program);
36
37
  loadSetupCommand(program);
38
+ loadApiKeysCommand(program);
37
39
  loadSyncUserMetafiledDefinitionsCommand(program);
38
40
  loadSecret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cAAc,EAAC,MAAM,6BAA6B,CAAA;AAErE,MAAM,CAAC,KAAK,UAAU,WAAW;IAC/B,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAA;IAE7B,OAAO;SACJ,IAAI,CAAC,YAAY,CAAC;SAClB,WAAW,CAAC,gCAAgC,CAAC;SAC7C,OAAO,CAAC,mBAAmB,CAAC,CAAA;IAE/B,qBAAqB,CAAC,OAAO,CAAC,CAAA;IAC9B,MAAM,cAAc,CAAC,OAAO,CAAC,CAAA;IAC7B,iBAAiB,CAAC,OAAO,CAAC,CAAA;IAC1B,2BAA2B,CAAC,OAAO,CAAC,CAAA;IACpC,0BAA0B,CAAC,OAAO,CAAC,CAAA;IACnC,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAC3B,2BAA2B,CAAC,OAAO,CAAC,CAAA;IACpC,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAC3B,eAAe,CAAC,OAAO,CAAC,CAAA;IACxB,gBAAgB,CAAC,OAAO,CAAC,CAAA;IACzB,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAC3B,uCAAuC,CAAC,OAAO,CAAC,CAAA;IAChD,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAC3B,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAC3B,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAE3B,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAA;IAChC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAA;IACjC,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,CAAA;IACnC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,CAAA;IAElC,OAAO,OAAO,CAAA;AAChB,CAAC"}
@@ -19,8 +19,8 @@ export declare const j: jscodeshift.JSCodeshift;
19
19
  * ```
20
20
  */
21
21
  export declare const findImportOf: (root: import("jscodeshift/src/Collection.js").Collection<any>, importPath: string, importedName: string, importedAsName?: string) => {
22
- specifier: import("ast-types").namedTypes.ImportSpecifier | import("ast-types").namedTypes.ImportDefaultSpecifier | import("ast-types").namedTypes.ImportNamespaceSpecifier | null;
23
- importDeclaration: import("ast-types").namedTypes.ImportDeclaration;
22
+ specifier: jscodeshift.ImportSpecifier | null;
23
+ importDeclaration: jscodeshift.ImportDeclaration | null;
24
24
  };
25
25
  /**
26
26
  * Ensure that an import of a module is present in the file
@@ -31,8 +31,8 @@ export declare const findImportOf: (root: import("jscodeshift/src/Collection.js"
31
31
  * Returns the specifier and import declaration nodes that were found, edited or created
32
32
  */
33
33
  export declare const ensureImportOf: (root: import("jscodeshift/src/Collection.js").Collection<any>, importPath: string, importedName: string, importedAsName?: string) => {
34
- specifier: import("ast-types").namedTypes.ImportSpecifier | import("ast-types").namedTypes.ImportDefaultSpecifier | import("ast-types").namedTypes.ImportNamespaceSpecifier;
35
- importDeclaration: import("ast-types").namedTypes.ImportDeclaration;
34
+ specifier: jscodeshift.ImportSpecifier;
35
+ importDeclaration: jscodeshift.ImportDeclaration | null;
36
36
  };
37
37
  /**
38
38
  * Find an object expression by its name like
@@ -47,7 +47,7 @@ export declare const ensureImportOf: (root: import("jscodeshift/src/Collection.j
47
47
  *
48
48
  * If multiple are found, the first one is returned
49
49
  */
50
- export declare const findObjectExpression: (root: import("jscodeshift/src/Collection.js").Collection<any>, objName: string) => import("ast-types").namedTypes.ObjectExpression | null;
50
+ export declare const findObjectExpression: (root: import("jscodeshift/src/Collection.js").Collection<any>, objName: string) => jscodeshift.ObjectExpression | null;
51
51
  /**
52
52
  * Find an object's property by it's key
53
53
  *
@@ -83,4 +83,4 @@ export declare const ensureObjectProperty: ({ obj, key, defaultValue, overwrite,
83
83
  key: string;
84
84
  defaultValue: jscodeshift.Property['value'];
85
85
  overwrite?: boolean | undefined;
86
- }) => import("ast-types").namedTypes.Property;
86
+ }) => jscodeshift.Property;
@@ -23,7 +23,7 @@ export const findImportOf = (root, importPath, importedName, importedAsName) =>
23
23
  source: { value: importPath },
24
24
  })
25
25
  .nodes()[0] ?? null;
26
- const matchedSpecifier = matchedImportDeclaration?.specifiers?.filter(specifier => {
26
+ const matchedSpecifier = matchedImportDeclaration?.specifiers?.filter((specifier) => {
27
27
  if (specifier.type !== 'ImportSpecifier')
28
28
  return false;
29
29
  return importedAsName
@@ -1 +1 @@
1
- {"version":3,"file":"codemod.js","sourceRoot":"","sources":["../../src/utils/codemod.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,aAAa,CAAA;AAGrC,MAAM,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;AAE9C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,IAAU,EACV,UAAkB,EAClB,YAAoB,EACpB,cAAuB,EACvB,EAAE;IACF,MAAM,wBAAwB,GAC5B,IAAI;SACD,IAAI,CAAC,CAAC,CAAC,iBAAiB,EAAE;QACzB,MAAM,EAAE,EAAC,KAAK,EAAE,UAAU,EAAC;KAC5B,CAAC;SACD,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAA;IAEvB,MAAM,gBAAgB,GACpB,wBAAwB,EAAE,UAAU,EAAE,MAAM,CAAC,SAAS,CAAC,EAAE;QACvD,IAAI,SAAS,CAAC,IAAI,KAAK,iBAAiB;YAAE,OAAO,KAAK,CAAA;QAEtD,OAAO,cAAc;YACnB,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,KAAK,YAAY;gBACtC,SAAS,EAAE,KAAK,EAAE,IAAI,KAAK,cAAc;YAC7C,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,KAAK,YAAY,CAAA;IAC9C,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAA;IAEf,OAAO;QACL,SAAS,EAAE,gBAAgB;QAC3B,iBAAiB,EAAE,wBAAwB;KAC5C,CAAA;AACH,CAAC,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG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AAC,CAAC;SACD,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAa,CAAA;AAC3D,CAAC,CAAA;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EACnC,GAAG,EACH,GAAG,EACH,YAAY,EACZ,SAAS,GAAG,KAAK,GAMlB,EAAwB,EAAE;IACzB,MAAM,UAAU,GAAG,GAAG,CAAC,UAAU,CAAA;IAEjC,IAAI,cAAc,GAAG,kBAAkB,CAAC,EAAC,GAAG,EAAE,GAAG,EAAC,CAAC,CAAA;IAEnD,IAAI,cAAc,EAAE;QAClB,IAAI,SAAS,EAAE;YACb,cAAc,CAAC,KAAK,GAAG,YAAY,CAAA;SACpC;KACF;SAAM;QACL,MAAM,WAAW,GAAG,4BAA4B,CAAA;QAChD,MAAM,UAAU,GAAG,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC;YACtC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC;YACnB,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,CAAA;QAExB,cAAc,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,YAAY,CAAC,CAAA;QAE7D,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;KAChC;IAED,OAAO,cAAc,CAAA;AACvB,CAAC,CAAA"}
@@ -1,9 +1,6 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
- import { exec } from 'child_process';
2
+ import { ExecOptions as NodeExecOptions } from 'child_process';
3
3
  import { Options as OraOptions } from 'ora';
4
- declare const _execAsync: typeof exec.__promisify__;
5
- type Tail<T extends any[]> = T extends [infer _I, ...infer L] ? L : never;
6
- type ExecOptions = Tail<Parameters<typeof _execAsync>>;
7
4
  interface CmdOptions {
8
5
  cmd: string;
9
6
  loadingMessage?: string;
@@ -11,7 +8,7 @@ interface CmdOptions {
11
8
  errorMessage?: string;
12
9
  spinnerOptions?: Omit<OraOptions, 'text' | 'prefixText'>;
13
10
  }
14
- export declare function execAsync(cmdConfig: CmdOptions | string, ...args: ExecOptions): Promise<{
11
+ export declare function execAsync(cmdConfig: CmdOptions | string, options?: NodeExecOptions): Promise<{
15
12
  stdout: string[];
16
13
  stderr: string[];
17
14
  }>;
@@ -2,7 +2,7 @@ import { promisify } from 'util';
2
2
  import { exec } from 'child_process';
3
3
  import ora from 'ora';
4
4
  const _execAsync = promisify(exec);
5
- export async function execAsync(cmdConfig, ...args) {
5
+ export async function execAsync(cmdConfig, options) {
6
6
  if (typeof cmdConfig === 'string') {
7
7
  cmdConfig = { cmd: cmdConfig }; // eslint-disable-line no-param-reassign
8
8
  }
@@ -13,7 +13,9 @@ export async function execAsync(cmdConfig, ...args) {
13
13
  let stderr = '';
14
14
  let stdout = '';
15
15
  try {
16
- const result = await _execAsync(cmdConfig.cmd, ...args);
16
+ const result = options
17
+ ? await _execAsync(cmdConfig.cmd, options)
18
+ : await _execAsync(cmdConfig.cmd);
17
19
  stderr = result.stderr;
18
20
  stdout = result.stdout;
19
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"exec-async-child-process.js","sourceRoot":"","sources":["../../src/utils/exec-async-child-process.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,MAAM,CAAA;AAC9B,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAA;AAElC,OAAO,GAA4B,MAAM,KAAK,CAAA;AAE9C,MAAM,UAAU,GAAG,SAAS,CAAC,IAAI,CAAC,CAAA;AAalC,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,SAA8B,EAC9B,GAAG,IAAiB;IAEpB,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;QACjC,SAAS,GAAG,EAAC,GAAG,EAAE,SAAS,EAAC,CAAA,CAAC,wCAAwC;KACtE;IAED,MAAM,gBAAgB,GAAG,GAAG,CAAC,SAAS,CAAC,cAAc,CAAC,CAAA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AG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;KACjC;IACD,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QAC9B,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;KACjC;IACD,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;QACjD,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;KAClD,CAAA;AACH,CAAC"}
@@ -2,7 +2,7 @@ import { type Plugin } from 'vite';
2
2
  export declare const createViteConfig: () => {
3
3
  root: string;
4
4
  publicDir: false;
5
- plugins: (Plugin<any> | import("vite").PluginOption[])[];
5
+ plugins: (Plugin<any> | Plugin<any>[])[];
6
6
  optimizeDeps: {
7
7
  include: string[];
8
8
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public",
5
5
  "@shopify:registry": "https://registry.npmjs.org/"
6
6
  },
7
- "version": "0.0.198",
7
+ "version": "0.0.205",
8
8
  "description": "Shop Minis CLI",
9
9
  "main": "build/index.js",
10
10
  "bin": {
@@ -13,27 +13,12 @@
13
13
  "author": "shopify",
14
14
  "license": "MIT",
15
15
  "type": "module",
16
- "scripts": {
17
- "build": "yarn clean && yarn build:cli:graphql && yarn build:cli && yarn dev-panel:build-and-copy",
18
- "clean": "rm -rf build",
19
- "build:cli": "tsc -p tsconfig.build.json && chmod 755 build/index.js && cp src/commands/dev/utils/safari-inspector.applescript build/commands/dev/utils && cpx \"src/schemas/*.json\" build/schemas && yarn build:cli:examples",
20
- "build:cli:watch": "chokidar \"./src/**/*.ts\" -c \"yarn run build:cli\" --silent --initial --ignore '(build|node_modules)'",
21
- "build:cli:examples": "cpx \"src/commands/create/examples/**/{*,.*}\" build/commands/create/examples",
22
- "build:cli:graphql": "node --loader ts-node/esm scripts/graphql-codegen.ts",
23
- "lint": "eslint . --ext .js,.mjs,.ts,.tsx --format codeframe --cache",
24
- "shop-minis": "./build/index.js",
25
- "test": "vitest",
26
- "dev-panel:install": "cd ./dev-panel && yarn",
27
- "dev-panel:start": "cd ./dev-panel && yarn start",
28
- "dev-panel:clean": "cd ./dev-panel && rm -rf build",
29
- "dev-panel:build": "cd ./dev-panel && PUBLIC_URL=/dev-panel yarn build",
30
- "dev-panel:build-and-copy": "mkdir -p build/dev-panel/ && yarn dev-panel:clean && yarn dev-panel:install && yarn dev-panel:build && cp -r dev-panel/build/* build/dev-panel"
31
- },
32
16
  "devDependencies": {
33
17
  "@graphql-codegen/cli": "^3.2.2",
34
18
  "@graphql-codegen/client-preset": "^2.1.1",
35
19
  "@react-native-community/eslint-config": "^3.1.0",
36
20
  "@shopify/eslint-plugin": "^42.0.1",
21
+ "@types/archiver": "^5.3.1",
37
22
  "@types/connect": "^3.4.35",
38
23
  "@types/envinfo": "^7.8.1",
39
24
  "@types/finalhandler": "^1.2.3",
@@ -43,8 +28,10 @@
43
28
  "@types/node": "^18.11.17",
44
29
  "@types/prompts": "^2.4.2",
45
30
  "@types/qrcode": "^1.5.0",
31
+ "@types/semver": "^7.5.0",
46
32
  "@types/serve-static": "^1.15.0",
47
33
  "@types/supertest": "^6.0.2",
34
+ "@types/ws": "^8.5.4",
48
35
  "@typescript-eslint/eslint-plugin": "^5.17.0",
49
36
  "@typescript-eslint/parser": "^5.17.0",
50
37
  "chokidar-cli": "^3.0.0",
@@ -53,8 +40,10 @@
53
40
  "eslint-formatter-codeframe": "^7.32.1",
54
41
  "eslint-plugin-reanimated": "^2.0.0",
55
42
  "prettier": "^2.7.1",
43
+ "rollup": "^4.0.0",
56
44
  "supertest": "^7.0.0",
57
45
  "ts-node": "^10.9.1",
46
+ "tsx": "^4.7.0",
58
47
  "typescript": "^4.9.4",
59
48
  "vitest": "^0.29.8"
60
49
  },
@@ -99,5 +88,23 @@
99
88
  "vite": "^5.0.8",
100
89
  "ws": "^8.18.3",
101
90
  "sirv": "^2.0.4"
91
+ },
92
+ "scripts": {
93
+ "build": "pnpm clean && pnpm build:cli:graphql && pnpm build:cli && pnpm dev-panel:build-and-copy",
94
+ "clean": "rm -rf build",
95
+ "build:cli": "tsc -p tsconfig.build.json && chmod 755 build/index.js && cp src/commands/dev/utils/safari-inspector.applescript build/commands/dev/utils && cpx \"src/schemas/*.json\" build/schemas && pnpm build:cli:examples",
96
+ "build:cli:watch": "chokidar \"./src/**/*.ts\" -c \"pnpm run build:cli\" --silent --initial --ignore '(build|node_modules)'",
97
+ "build:cli:examples": "cpx \"src/commands/create/examples/**/{*,.*}\" build/commands/create/examples",
98
+ "build:cli:graphql": "node --import tsx scripts/graphql-codegen.ts",
99
+ "type-check": "tsc --noEmit --incremental false",
100
+ "lint": "eslint . --ext .js,.mjs,.ts,.tsx --format codeframe --cache",
101
+ "lint:fix": "eslint . --ext .js,.mjs,.ts,.tsx --format codeframe --cache --fix",
102
+ "shop-minis": "./build/index.js",
103
+ "test": "vitest",
104
+ "dev-panel:install": "cd ./dev-panel && pnpm install --ignore-workspace",
105
+ "dev-panel:start": "cd ./dev-panel && pnpm start",
106
+ "dev-panel:clean": "cd ./dev-panel && rm -rf build",
107
+ "dev-panel:build": "cd ./dev-panel && PUBLIC_URL=/dev-panel pnpm build",
108
+ "dev-panel:build-and-copy": "mkdir -p build/dev-panel/ && pnpm dev-panel:clean && pnpm dev-panel:install && pnpm dev-panel:build && cp -r dev-panel/build/* build/dev-panel"
102
109
  }
103
- }
110
+ }
@@ -1,153 +0,0 @@
1
- # Shop minis CLI
2
-
3
- The CLI tool to create, run and publish minis.
4
-
5
- ## Getting started
6
-
7
- _If you want to read on how to use the CLI, jump to [using the cli](#using-the-cli) section_
8
-
9
- ### Set up
10
-
11
- 1. Clone the repository with `dev clone shop-minis-cli`
12
- 2. Install dependencies: `yarn`
13
-
14
- ### Development
15
-
16
- When working with the `create` command, you can easily test your local changes by creating a new mini running `yarn build:cli && yarn shop-minis create`.
17
-
18
- However, testing changes on the dev command gets more complicated because newly created minis get the CLI as a dependency from npm instead of using our local version with the changes we want to test. Follow instructions below to link a mini to your local CLI:
19
-
20
- 1. In the CLI folder, run `yarn link`.
21
- 2. In your mini (create a new mini if you don't have a mini already), run `yarn link @shopify/shop-minis-cli`
22
- 3. Whenever you change something in the CLI, run `yarn build`.
23
- 4. Rerun `yarn start` in the mini, the command should reflect the latest changes you did in the CLI project.
24
-
25
- #### Installing dependencies
26
-
27
- Use `yarn`, don't create or commit an npm `package-lock.json`. `yarn.lock` is the source of truth.
28
-
29
- ### Testing changes with snapshot releases
30
-
31
- `yarn link` helps us a lot when testing changes to CLI locally, but there are edge cases where symbolic links interfere with the functionality we are actually trying to test.
32
-
33
- In those cases, you can create an snapshot release:
34
-
35
- 1. Run the [`Publish snapshot`](https://github.com/Shopify/shop-minis-cli/actions/workflows/publish_snapshot.yml) action against your branch. It will publish a snapshot version to npm. You can find the version in the action run output - it will be something like `0.0.0-snapshot.20240910122838`.
36
- 2. Install the snapshot version in the mini you want to test the changes in.
37
-
38
- snapshot versions are released to npm with the tag `snapshot`, so they won't be installed by partners unless they explicitly use the tag (`npm install @shopify/shop-minis-cli@snapshot`)
39
-
40
- ## Using the CLI
41
-
42
- To use the CLI create a new mini: `yarn create @shopify/shop-mini@latest`.
43
-
44
- Then use `yarn shop-minis --help` to get instructions on how to use the CLI.
45
-
46
- ## Creating a new release
47
-
48
- ### Legacy
49
-
50
- To push the react native cli to the `latest-react-native` tag, you need to merge your changes to the `legacy` branch.
51
-
52
- 1. The [`Publish react native`](https://github.com/Shopify/shop-minis-cli/actions/workflows/publish_react_native.yml) action will run and publish the new version to npm.
53
-
54
- ### Web
55
-
56
- To push the web cli to the `latest` tag, you need to merge your changes to the `main` branch.
57
-
58
- 1. Bump the version number on the `main` branch.
59
- 2. Run the [`Publish web`](https://github.com/Shopify/shop-minis-cli/actions/workflows/publish_web.yml) action against `main`.
60
-
61
- ## Sharing snapshot builds with partners
62
-
63
- If you need to share a snapshot build with a partner, follow these steps.
64
-
65
- 1. Follow [these docs](https://shop.docs.shopify.io/docs/shop-client/tophatting#manually-triggering-snapshot-builds) to manually create the snapshot build from the branch you want to share with the partner (use `main` as the branch if the change you want to share is already merged)
66
- 2. When the snapshot build is ready, take note of the version and build number. (In shipit, snapshot builds are usually named `<version>-snapshot.<build number>`, example: `2.45.0-snapshot.1645678813`)
67
- 3. Instruct the partner to run the mini, adding `--snapshot-version <version>+<build number>` to the start command. Example: `yarn start --snapshot-version 2.108.1+1685260045` or `npm start -- --snapshot-version 2.108.1+1685260045`
68
-
69
- Using this argument should download a new Shop binary in the partner's device. Note that android and iOS snapshots will have different build numbers, so check with the partner which platform they want to use.
70
-
71
- ## Codemods
72
-
73
- If some changes in the SDK or CLI require changes to the way we run minis you might need a codemod for the next version.
74
-
75
- Imagine `shop-minis-cli` is currently on `v0.0.74`. You will be creating the codemod for `v0.0.75`
76
-
77
- - Before making any changes checkout `v0.0.74`, run a cli build and create a mini.
78
- - Optional: Set up git for the mini and make an initial commit. This will allow you to reset the state later.
79
- - Create `src/commands/codemod/releases/v0-0-75.ts`. Copying the previous codemod will ensure you get the right format
80
- - Add your codemod to `src/commands/codemod/releases/index.ts`
81
- - [Run the cli and link your mini](#development)
82
- - Make your changes
83
- - Run `yarn shop-minis codemod --from-version 0.0.74 --to-version 0.0.75 --no-hard-reset-dependencies --verbose` to test your changes
84
- - Use the git diff to decide if your codemod worked as expected. Also verify your test mini still runs as expected.
85
- - Use git reset, make changes and re-run the codemod until it works as expected
86
- - When everything works as expected send a PR with the changes.
87
- - Ensure this PR gets merged before `v0.0.75` is tagged/released. If someone tags/releases `v0.0.75` before your change lands you will need to rename your codemod to be the next version. This is because once cli users have upgraded to `v0.0.75` this codemod will never be run if it is merged and included in a later release
88
-
89
- ### Codemod testing
90
-
91
- You can add unit tests for each codemod if required. Each codemod will also be validated by CI. The CI tests work as follows:
92
-
93
- - Mini A is created with the latest CLI
94
- - Mini B is created with CLI v0.0.42 (The first version supported by codemods)
95
- - Mini B is upgraded by running all the codemods
96
- - The expectation is that Mini B equals Mini A (old mini + codemods === new mini)
97
-
98
- See [upgrade_command_integration.yml](.github/workflows/upgrade_command_integration.yml) and [an example run](https://github.com/Shopify/shop-minis-cli/actions/runs/5544190658/jobs/10121293912?pr=306) for details.
99
-
100
- ### Troubleshooting
101
-
102
- #### Making sure the partner is using the right version
103
-
104
- To make sure the partner is using the right version, you can ask them to provide a screenshot of the About screen of the app (Profile tab -> Support -> About)
105
-
106
- The version shown in the screen should match the snapshot version you handled them.
107
-
108
- #### Making sure the partner build exists
109
-
110
- All partner builds are uploaded to a bucket in google cloud. If you created a snapshot, there should be a partner build in [this bucket](https://console.cloud.google.com/storage/browser/minis_cli_app_builds;tab=objects?project=arrive-167720&prefix=&forceOnObjectsSortingFiltering=false) matching the version of the snapshot.
111
-
112
- If you can't find your build, try looking for errors in the pipelines that create these builds:
113
-
114
- - Pipeline for iOS: https://buildkite.com/shopify/shipit-mobile-shop-ios-minis-partner-build
115
- - Pipeline for Android: https://buildkite.com/shopify/shipit-mobile-shop-android-minis-partner-build
116
-
117
- ## Updating allowed dependencies
118
-
119
- This section outlines the criteria for determining whether a dependency is safe to be allowed in Shop Minis projects, as well as instructions for adding new optional dependencies.
120
-
121
- ### Criteria for dependency safety
122
-
123
- When evaluating whether a dependency should be allowed, consider the following criteria:
124
-
125
- #### 1. Popularity and adoption
126
-
127
- Popular dependencies with large user bases are generally safer than obscure packages. Check npm download statistics and GitHub stars as indicators of adoption.
128
-
129
- #### 2. Maintenance and stability
130
-
131
- Ensure the dependency is actively maintained with regular updates and bug fixes. Avoid experimental or abandoned packages.
132
-
133
- #### 3. React version compatibility
134
-
135
- Verify the dependency is compatible with the React versions specified in `REQUIRED_DEPENDENCIES` by checking its peer dependencies and testing.
136
-
137
- #### 4. Security and safety scores
138
-
139
- Check security scores using [Snyk Advisor](https://snyk.io/advisor/), [Socket.dev](https://socket.dev/), or [NPM Audit](https://docs.npmjs.com/cli/v8/commands/npm-audit) to identify any vulnerabilities or supply chain risks.
140
-
141
- #### 5. Avoid duplicated functionality
142
-
143
- Prefer not to add dependencies that duplicate functionality already provided by existing allowed dependencies. Check if there's already a suitable package before adding something similar.
144
-
145
- ### Adding optional dependencies
146
-
147
- To add a new optional dependency:
148
-
149
- 1. Evaluate the dependency using the criteria above
150
- 2. Add it to `OPTIONAL_DEPENDENCIES` in `src/utils/allowed-dependencies.ts` with an exact version (e.g., `1.2.3`)
151
- 3. Publish a new CLI version
152
-
153
- Note: Required dependencies should rarely change and require broader team approval.
@@ -1,2 +0,0 @@
1
- :root{--light-backgrounds-regular:#fff;--light-backgrounds-secondary:#f4f4ed;--light-backgrounds-inverse:#0f1721;--light-foregrounds-regular:#0f1721;--light-foregrounds-regular-inverse:#fff;--light-foregrounds-primary:#5433eb;--dark-background-regular:#0f1721;--dark-background-secondary:#3f454d;--dark-backgrounds-inverse:#fff;--dark-foregrounds-regular:#fff;--dark-foregrounds-regular-inverse:#0f1721;--dark-foregrounds-primary:#9c83f8}@font-face{font-display:swap;font-family:GoodSans;font-style:normal;font-weight:700;src:local("GoodSans"),url(https://cdn.shopify.com/static/fonts/GoodSans-Bold.woff2) format("woff2")}@font-face{font-display:swap;font-family:GoodSans;font-style:normal;font-weight:500;src:local("GoodSans"),url(https://cdn.shopify.com/static/fonts/GoodSans-Medium.woff2) format("woff2")}@font-face{font-display:swap;font-family:GoodSans;font-style:normal;font-weight:400;src:local("GoodSans"),url(https://cdn.shopify.com/static/fonts/GoodSansText-Regular.woff) format("woff2")}*,:after,:before{box-sizing:border-box}body,html{margin:0;padding:0}html{font-family:GoodSans;font-size:1em}body{background:#f4f4ed;background:var(--light-backgrounds-secondary)}a,body{color:#0f1721;color:var(--light-foregrounds-regular)}a{text-decoration:none}body::-webkit-scrollbar{width:10px}body::-webkit-scrollbar-track{background:rgba(0,0,0,.1)}body::-webkit-scrollbar-track:hover{background:rgba(0,0,0,.3)}body::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:rgba(0,0,0,.3);border:2px solid transparent;border-radius:6px;margin:2px}body::-webkit-scrollbar-thumb:hover{background-color:rgba(0,0,0,.8)}h1{font-size:1em;font-weight:500}.page{display:flex;flex-direction:column;margin:auto;max-width:min(30em,100%);padding-left:1em;padding-right:1em}.logo{align-self:center;margin-bottom:1em;margin-top:2em}.link-label{margin-bottom:.4em}.link{color:var(--light-foregrounds-regular);display:block;font-size:13px;font-style:normal;line-height:118%;margin-top:0;overflow:hidden;padding:1rem 0 1rem 1rem;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.link a,.link a:active,.link a:visited{color:var(--light-foregrounds-primary)}.qr-and-params-container{word-wrap:break-word;align-items:stretch;display:flex;flex-direction:column;gap:1em;margin-bottom:2em;margin-top:1em}.qrcode-container{position:relative}.params-container,.qrcode-container{flex:1 1;width:100%}.param-row{display:flex;flex-direction:row}.param-appendix{font-size:13px}b.param-appendix{font-family:Courier New,Courier,monospace}.cursor-pointer{cursor:pointer}.button{background-color:var(--light-backgrounds-inverse);border:none;border-radius:100px;color:var(--light-foregrounds-regular-inverse);font-size:1rem;margin-top:20px;min-width:200px;padding:16px;text-decoration:none}.button:hover{cursor:pointer}.Main{display:flex;flex:3 1;flex-direction:column;gap:2rem}.rail{gap:1rem}.button-link,.rail{display:flex;flex-direction:row}.button-link{align-items:flex-start;background:var(--light-backgrounds-inverse);border-radius:40px;box-sizing:border-box;color:var(--light-foregrounds-regular-inverse);font-family:GoodSans,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;font-size:.8125rem;gap:10px;padding:8px 16px;text-decoration:none}.card{background:var(--light-backgrounds-regular);border-radius:1rem;display:flex;flex-direction:column;overflow:hidden}.card h3{margin:0}.p-2{padding:2rem}.icon-container{align-items:center;background-color:#eeeaff;border-radius:.5rem;display:flex;height:4rem;justify-content:center;margin-bottom:1rem;width:4rem}.deeplink-content{align-items:center;background:var(--light-backgrounds-regular);border:1px solid #cbcbca;border-radius:60px;display:flex;flex-direction:row;justify-content:space-between;margin-top:1rem;position:relative}.copy-deeplink{background:var(--light-backgrounds-inverse);border-radius:0 31px 31px 0;float:left;padding:1rem 1.5rem}.copy-deeplink:hover{cursor:pointer}.w-50{width:50%}.wsl-warning a{text-decoration:underline}@media (prefers-color-scheme:dark){body{background:var(--dark-background-regular);color:var(--dark-foregrounds-regular)}body::-webkit-scrollbar{width:10px}body::-webkit-scrollbar-track{background:hsla(0,0%,100%,.1)}body::-webkit-scrollbar-track:hover{background:hsla(0,0%,100%,.3)}body::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:hsla(0,0%,100%,.3);border:2px solid transparent;border-radius:6px;margin:2px}body::-webkit-scrollbar-thumb:hover{background-color:hsla(0,0%,100%,.8)}a{text-decoration:none}.link,a{color:var(--dark-foregrounds-regular)}.link a,.link a:active,.link a:visited{color:var(--dark-foregrounds-primary)}.button,.button-link{background-color:var(--dark-backgrounds-inverse)!important;color:var(--dark-foregrounds-regular-inverse)!important}.card,.deeplink-content{background-color:var(--dark-background-secondary)}.deeplink-content{border-color:var(--dark-background-secondary);color:var(--dark-foregrounds-regular)}}.icon{color:var(--light-foregrounds-regular-inverse);display:flex;gap:.5rem}.icon-checkmark,.icon-copy span{font-size:13px}.qr-code-container{margin:auto}.qr-code{background-color:#fff;border-radius:1em;display:none;height:auto;margin:0 auto;max-width:1000px;padding:15px;width:100%}.qr-code.dark{background-color:#3f454d}@media only screen and (min-width:800px){.open-mini{display:none}.qr-code{display:flex}.container{flex:1 1}}
2
- /*# sourceMappingURL=main.d66fe13a.css.map*/