@shopify/cli-kit 3.32.0 → 3.33.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.
Files changed (211) hide show
  1. package/dist/constants.d.ts +0 -1
  2. package/dist/constants.js +0 -1
  3. package/dist/constants.js.map +1 -1
  4. package/dist/environment/local.d.ts +0 -1
  5. package/dist/environment/local.js +0 -3
  6. package/dist/environment/local.js.map +1 -1
  7. package/dist/http/fetch.js +1 -1
  8. package/dist/http/fetch.js.map +1 -1
  9. package/dist/http.d.ts +0 -1
  10. package/dist/http.js +0 -1
  11. package/dist/http.js.map +1 -1
  12. package/dist/index.d.ts +0 -6
  13. package/dist/index.js +0 -6
  14. package/dist/index.js.map +1 -1
  15. package/dist/npm.js +1 -1
  16. package/dist/npm.js.map +1 -1
  17. package/dist/private/common/array.d.ts +1 -0
  18. package/dist/private/common/array.js +4 -0
  19. package/dist/private/common/array.js.map +1 -0
  20. package/dist/private/node/analytics.js +2 -2
  21. package/dist/private/node/analytics.js.map +1 -1
  22. package/dist/private/node/api/graphql.d.ts +5 -0
  23. package/dist/private/node/api/graphql.js +63 -0
  24. package/dist/private/node/api/graphql.js.map +1 -0
  25. package/dist/{api/common.d.ts → private/node/api/headers.d.ts} +3 -8
  26. package/dist/{api/common.js → private/node/api/headers.js} +20 -60
  27. package/dist/private/node/api/headers.js.map +1 -0
  28. package/dist/private/node/api/rest.d.ts +6 -0
  29. package/dist/private/node/api/rest.js +27 -0
  30. package/dist/private/node/api/rest.js.map +1 -0
  31. package/dist/private/node/ui/components/FullScreen.js +11 -9
  32. package/dist/private/node/ui/components/FullScreen.js.map +1 -1
  33. package/dist/private/node/ui/components/SelectPrompt.js +15 -3
  34. package/dist/private/node/ui/components/SelectPrompt.js.map +1 -1
  35. package/dist/private/node/ui/components/Subdued.d.ts +9 -0
  36. package/dist/private/node/ui/components/Subdued.js +10 -0
  37. package/dist/private/node/ui/components/Subdued.js.map +1 -0
  38. package/dist/private/node/ui/components/Subdued.test.d.ts +1 -0
  39. package/dist/private/node/ui/components/Subdued.test.js +11 -0
  40. package/dist/private/node/ui/components/Subdued.test.js.map +1 -0
  41. package/dist/private/node/ui/components/Table.js +1 -1
  42. package/dist/private/node/ui/components/Table.js.map +1 -1
  43. package/dist/private/node/ui/components/TokenizedText.d.ts +4 -1
  44. package/dist/private/node/ui/components/TokenizedText.js +4 -0
  45. package/dist/private/node/ui/components/TokenizedText.js.map +1 -1
  46. package/dist/private/node/ui/components/TokenizedText.test.js +4 -1
  47. package/dist/private/node/ui/components/TokenizedText.test.js.map +1 -1
  48. package/dist/public/common/array.d.ts +4 -0
  49. package/dist/public/common/array.js +4 -0
  50. package/dist/public/common/array.js.map +1 -1
  51. package/dist/public/common/collection.js.map +1 -1
  52. package/dist/public/common/object.d.ts +3 -3
  53. package/dist/public/common/object.js +5 -7
  54. package/dist/public/common/object.js.map +1 -1
  55. package/dist/public/common/string.d.ts +55 -1
  56. package/dist/public/common/string.js +93 -1
  57. package/dist/public/common/string.js.map +1 -1
  58. package/dist/public/common/url.d.ts +2 -1
  59. package/dist/public/common/url.js +3 -2
  60. package/dist/public/common/url.js.map +1 -1
  61. package/dist/public/node/api/admin.d.ts +41 -0
  62. package/dist/public/node/api/admin.js +98 -0
  63. package/dist/public/node/api/admin.js.map +1 -0
  64. package/dist/public/node/api/oxygen.d.ts +22 -0
  65. package/dist/public/node/api/oxygen.js +40 -0
  66. package/dist/public/node/api/oxygen.js.map +1 -0
  67. package/dist/{api → public/node/api}/partners.d.ts +11 -3
  68. package/dist/public/node/api/partners.js +45 -0
  69. package/dist/public/node/api/partners.js.map +1 -0
  70. package/dist/public/node/base-command.js +1 -1
  71. package/dist/public/node/base-command.js.map +1 -1
  72. package/dist/public/node/crypto.d.ts +42 -0
  73. package/dist/public/node/crypto.js +55 -0
  74. package/dist/public/node/crypto.js.map +1 -0
  75. package/dist/{template.d.ts → public/node/liquid.d.ts} +10 -2
  76. package/dist/{template.js → public/node/liquid.js} +18 -13
  77. package/dist/public/node/liquid.js.map +1 -0
  78. package/dist/public/node/os.d.ts +16 -0
  79. package/dist/{os.js → public/node/os.js} +33 -28
  80. package/dist/public/node/os.js.map +1 -0
  81. package/dist/public/node/presets.js +2 -2
  82. package/dist/public/node/presets.js.map +1 -1
  83. package/dist/public/node/ruby.d.ts +11 -7
  84. package/dist/public/node/ruby.js +90 -22
  85. package/dist/public/node/ruby.js.map +1 -1
  86. package/dist/public/node/tcp.d.ts +2 -0
  87. package/dist/public/node/tcp.js +9 -0
  88. package/dist/public/node/tcp.js.map +1 -1
  89. package/dist/public/node/toml.d.ts +15 -0
  90. package/dist/public/node/toml.js +20 -0
  91. package/dist/public/node/toml.js.map +1 -0
  92. package/dist/public/node/ui.d.ts +1 -1
  93. package/dist/public/node/ui.js.map +1 -1
  94. package/dist/public/node/vscode.d.ts +14 -0
  95. package/dist/{vscode.js → public/node/vscode.js} +13 -7
  96. package/dist/public/node/vscode.js.map +1 -0
  97. package/dist/session/authorize.d.ts +4 -0
  98. package/dist/session/authorize.js +7 -2
  99. package/dist/session/authorize.js.map +1 -1
  100. package/dist/{api/identity.d.ts → session/identity-token-validation.d.ts} +0 -0
  101. package/dist/{api/identity.js → session/identity-token-validation.js} +1 -1
  102. package/dist/session/identity-token-validation.js.map +1 -0
  103. package/dist/session/schema.d.ts +18 -18
  104. package/dist/session/store.js +1 -1
  105. package/dist/session/store.js.map +1 -1
  106. package/dist/session/validate.js +2 -2
  107. package/dist/session/validate.js.map +1 -1
  108. package/dist/session.js +3 -3
  109. package/dist/session.js.map +1 -1
  110. package/dist/system.js +1 -1
  111. package/dist/system.js.map +1 -1
  112. package/dist/tsconfig.tsbuildinfo +1 -1
  113. package/dist/ui/inquirer/autocomplete.js +1 -1
  114. package/dist/ui/inquirer/autocomplete.js.map +1 -1
  115. package/package.json +2 -2
  116. package/dist/api/admin.d.ts +0 -3
  117. package/dist/api/admin.js +0 -56
  118. package/dist/api/admin.js.map +0 -1
  119. package/dist/api/common.js.map +0 -1
  120. package/dist/api/graphql/all_app_extension_registrations.d.ts +0 -20
  121. package/dist/api/graphql/all_app_extension_registrations.js +0 -20
  122. package/dist/api/graphql/all_app_extension_registrations.js.map +0 -1
  123. package/dist/api/graphql/all_dev_stores_by_org.d.ts +0 -18
  124. package/dist/api/graphql/all_dev_stores_by_org.js +0 -21
  125. package/dist/api/graphql/all_dev_stores_by_org.js.map +0 -1
  126. package/dist/api/graphql/all_orgs.d.ts +0 -12
  127. package/dist/api/graphql/all_orgs.js +0 -14
  128. package/dist/api/graphql/all_orgs.js.map +0 -1
  129. package/dist/api/graphql/convert_dev_to_test_store.d.ts +0 -16
  130. package/dist/api/graphql/convert_dev_to_test_store.js +0 -13
  131. package/dist/api/graphql/convert_dev_to_test_store.js.map +0 -1
  132. package/dist/api/graphql/create_app.d.ts +0 -29
  133. package/dist/api/graphql/create_app.js +0 -33
  134. package/dist/api/graphql/create_app.js.map +0 -1
  135. package/dist/api/graphql/create_deployment.d.ts +0 -33
  136. package/dist/api/graphql/create_deployment.js +0 -25
  137. package/dist/api/graphql/create_deployment.js.map +0 -1
  138. package/dist/api/graphql/extension_create.d.ts +0 -30
  139. package/dist/api/graphql/extension_create.js +0 -26
  140. package/dist/api/graphql/extension_create.js.map +0 -1
  141. package/dist/api/graphql/extension_specifications.d.ts +0 -27
  142. package/dist/api/graphql/extension_specifications.js +0 -22
  143. package/dist/api/graphql/extension_specifications.js.map +0 -1
  144. package/dist/api/graphql/find_app.d.ts +0 -14
  145. package/dist/api/graphql/find_app.js +0 -17
  146. package/dist/api/graphql/find_app.js.map +0 -1
  147. package/dist/api/graphql/find_org.d.ts +0 -18
  148. package/dist/api/graphql/find_org.js +0 -21
  149. package/dist/api/graphql/find_org.js.map +0 -1
  150. package/dist/api/graphql/find_org_basic.d.ts +0 -11
  151. package/dist/api/graphql/find_org_basic.js +0 -14
  152. package/dist/api/graphql/find_org_basic.js.map +0 -1
  153. package/dist/api/graphql/find_store_by_domain.d.ts +0 -21
  154. package/dist/api/graphql/find_store_by_domain.js +0 -24
  155. package/dist/api/graphql/find_store_by_domain.js.map +0 -1
  156. package/dist/api/graphql/functions/api_schema_definition.d.ts +0 -9
  157. package/dist/api/graphql/functions/api_schema_definition.js +0 -7
  158. package/dist/api/graphql/functions/api_schema_definition.js.map +0 -1
  159. package/dist/api/graphql/functions/app_function_set.d.ts +0 -30
  160. package/dist/api/graphql/functions/app_function_set.js +0 -38
  161. package/dist/api/graphql/functions/app_function_set.js.map +0 -1
  162. package/dist/api/graphql/functions/function_service_proxy.d.ts +0 -4
  163. package/dist/api/graphql/functions/function_service_proxy.js +0 -7
  164. package/dist/api/graphql/functions/function_service_proxy.js.map +0 -1
  165. package/dist/api/graphql/functions/upload_url_generate.d.ts +0 -12
  166. package/dist/api/graphql/functions/upload_url_generate.js +0 -11
  167. package/dist/api/graphql/functions/upload_url_generate.js.map +0 -1
  168. package/dist/api/graphql/generate_signed_upload_url.d.ts +0 -15
  169. package/dist/api/graphql/generate_signed_upload_url.js +0 -15
  170. package/dist/api/graphql/generate_signed_upload_url.js.map +0 -1
  171. package/dist/api/graphql/get_urls.d.ts +0 -10
  172. package/dist/api/graphql/get_urls.js +0 -10
  173. package/dist/api/graphql/get_urls.js.map +0 -1
  174. package/dist/api/graphql/get_variant_id.d.ts +0 -17
  175. package/dist/api/graphql/get_variant_id.js +0 -20
  176. package/dist/api/graphql/get_variant_id.js.map +0 -1
  177. package/dist/api/graphql/index.d.ts +0 -21
  178. package/dist/api/graphql/index.js +0 -22
  179. package/dist/api/graphql/index.js.map +0 -1
  180. package/dist/api/graphql/update_draft.d.ts +0 -33
  181. package/dist/api/graphql/update_draft.js +0 -24
  182. package/dist/api/graphql/update_draft.js.map +0 -1
  183. package/dist/api/graphql/update_urls.d.ts +0 -14
  184. package/dist/api/graphql/update_urls.js +0 -12
  185. package/dist/api/graphql/update_urls.js.map +0 -1
  186. package/dist/api/identity.js.map +0 -1
  187. package/dist/api/oxygen.d.ts +0 -5
  188. package/dist/api/oxygen.js +0 -30
  189. package/dist/api/oxygen.js.map +0 -1
  190. package/dist/api/partners.js +0 -44
  191. package/dist/api/partners.js.map +0 -1
  192. package/dist/api.d.ts +0 -6
  193. package/dist/api.js +0 -7
  194. package/dist/api.js.map +0 -1
  195. package/dist/http/graphql.d.ts +0 -13
  196. package/dist/http/graphql.js +0 -12
  197. package/dist/http/graphql.js.map +0 -1
  198. package/dist/os.d.ts +0 -11
  199. package/dist/os.js.map +0 -1
  200. package/dist/public/node/checksum.d.ts +0 -20
  201. package/dist/public/node/checksum.js +0 -32
  202. package/dist/public/node/checksum.js.map +0 -1
  203. package/dist/string.d.ts +0 -28
  204. package/dist/string.js +0 -77
  205. package/dist/string.js.map +0 -1
  206. package/dist/template.js.map +0 -1
  207. package/dist/toml.d.ts +0 -3
  208. package/dist/toml.js +0 -8
  209. package/dist/toml.js.map +0 -1
  210. package/dist/vscode.d.ts +0 -8
  211. package/dist/vscode.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import colors from '../../public/node/colors.js';
2
- import { escapeRegExp } from '../../string.js';
2
+ import { escapeRegExp } from '../../public/common/string.js';
3
3
  import AutocompletePrompt from 'inquirer-autocomplete-prompt';
4
4
  import Paginator from 'inquirer/lib/utils/paginator.js';
5
5
  export class CustomAutocomplete extends AutocompletePrompt {
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete.js","sourceRoot":"","sources":["../../../src/ui/inquirer/autocomplete.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,6BAA6B,CAAA;AAChD,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAA;AAC5C,OAAO,kBAAkB,MAAM,8BAA8B,CAAA;AAI7D,OAAO,SAAS,MAAM,iCAAiC,CAAA;AAGvD,MAAM,OAAO,kBAAmB,SAAQ,kBAAkB;IAGxD,YAAY,SAA4B,EAAE,EAAa,EAAE,OAAgB;QACvE,KAAK,CAAC,SAAS,EAAE,EAAE,EAAE,OAAO,CAAC,C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AAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAA;QAEnD,IAAI,UAAU,EAAE;YACd,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;SAC5B;QAED,IAAI,WAAW,EAAE;YACf,MAAM,UAAU,GAAG,YAAY,CAAC,WAAW,CAAC,CAAA;YAC5C,IAAI,GAAG,IAAI;iBACR,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,UAAU,GAAG,EAAE,IAAI,CAAC,CAAC;iBAC1C,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;gBACb,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,EAAE;oBAC7C,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;iBACjC;qBAAM;oBACL,OAAO,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;iBAClD;YACH,CAAC,CAAC;iBACD,IAAI,CAAC,EAAE,CAAC,CAAA;SACZ;aAAM,IAAI,UAAU,EAAE;YACrB,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;SAC5B;QAED,MAAM,IAAI,GAAG,IAAI,KAAK,CAAA;IACxB,CAAC,CAAC,CAAA;IAEF,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;AAClC,CAAC","sourcesContent":["import colors from '../../public/node/colors.js'\nimport {escapeRegExp} from '../../string.js'\nimport AutocompletePrompt from 'inquirer-autocomplete-prompt'\nimport DistinctChoice from 'inquirer/lib/objects/choices'\nimport {Question, Answers} from 'inquirer'\n\nimport Paginator from 'inquirer/lib/utils/paginator.js'\nimport {Interface} from 'readline'\n\nexport class CustomAutocomplete extends AutocompletePrompt {\n protected isAutocomplete: boolean\n\n constructor(questions: Question<Answers>, rl: Interface, answers: Answers) {\n super(questions, rl, answers)\n this.isAutocomplete = true\n this.paginator = new Paginator(this.screen, {\n isInfinite: false,\n })\n }\n\n protected render(error?: string) {\n let content = this.getQuestion()\n let bottomContent = ''\n\n if (this.status !== 'answered') {\n content += colors.gray(this.isAutocomplete && this.firstRender ? 'Type to search… ' : '… ')\n }\n\n if (this.status === 'answered') {\n content += `${colors.dim('·')} ${colors.magenta(this.shortAnswer || this.answerName || this.answer)}`\n process.stdout.write('\\u001b[?25h')\n } else if (this.searching) {\n content += this.rl.line\n bottomContent += ` ${colors.magenta.dim('Searching...')}`\n } else if (this.nbChoices) {\n const choicesStr = listRender(this.currentChoices, this.selected, this.isAutocomplete ? this.rl.line : undefined)\n content += this.isAutocomplete ? this.rl.line : ''\n const indexPosition = this.selected\n let realIndexPosition = 0\n this.currentChoices.choices.every((choice, index: number) => {\n if (index > indexPosition) {\n return false\n }\n if (choice.type === 'separator') {\n return true\n }\n const name = choice.name\n realIndexPosition += name ? name.split('\\n').length : 0\n return true\n })\n bottomContent += this.paginator.paginate(choicesStr, realIndexPosition, this.isAutocomplete ? 10 : 500)\n } else {\n content += this.rl.line\n bottomContent += ` ${colors.magenta('No matching choices')}`\n }\n\n if (error) {\n bottomContent += `\\n${colors.magenta('>> ')}${error}`\n }\n\n this.firstRender = false\n\n this.screen.render(content, bottomContent)\n }\n\n protected getQuestion(): string {\n return `${this.prefix()} ${colors.bold(this.opt.message)}${this.opt.suffix}${colors.reset(' ')}`\n }\n\n protected prefix(): string {\n const color = colors.magenta.bold\n return this.status === 'answered' ? color('✔') : color('?')\n }\n}\n\nfunction listRender(choices: DistinctChoice, pointer: number, searchToken?: string): string {\n let output = ''\n let separatorOffset = 0\n\n choices.forEach((choice, i: number) => {\n if (choice.type === 'separator') {\n separatorOffset++\n if (choice.line.includes('──────────────')) {\n output += `\\n`\n } else {\n output += ` ${colors.dim.underline(choice)}\\n`\n }\n return\n }\n\n if (choice.disabled) {\n separatorOffset++\n output += ` - ${choice.name}`\n output += ` (${typeof choice.disabled === 'string' ? choice.disabled : 'Disabled'})`\n output += '\\n'\n return\n }\n\n const isSelected = i - separatorOffset === pointer\n let line = (isSelected ? '> ' : ' ') + choice.name\n\n if (isSelected) {\n line = colors.magenta(line)\n }\n\n if (searchToken) {\n const regexified = escapeRegExp(searchToken)\n line = line\n .split(new RegExp(`(${regexified})`, 'ig'))\n .map((token) => {\n if (token.match(new RegExp(regexified, 'ig'))) {\n return colors.magenta.dim(token)\n } else {\n return isSelected ? colors.magenta(token) : token\n }\n })\n .join('')\n } else if (isSelected) {\n line = colors.magenta(line)\n }\n\n output += `${line} \\n`\n })\n\n return output.replace(/\\n$/, '')\n}\n"]}
1
+ {"version":3,"file":"autocomplete.js","sourceRoot":"","sources":["../../../src/ui/inquirer/autocomplete.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,6BAA6B,CAAA;AAChD,OAAO,EAAC,YAAY,EAAC,MAAM,+BAA+B,CAAA;AAC1D,OAAO,kBAAkB,MAAM,8BAA8B,CAAA;AAI7D,OAAO,SAAS,MAAM,iCAAiC,CAAA;AAGvD,MAAM,OAAO,kBAAmB,SAAQ,kBAAkB;IAGxD,YAAY,SAA4B,EAAE,EAAa,EAAE,OAAgB;QACvE,KAAK,CAAC,SAAS,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;QAC7B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAA;QAC1B,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE;YAC1C,UAAU,EAAE,KAAK;SAClB,CAAC,CAAA;IACJ,CAAC;IAES,MAAM,CAAC,KAAc;QAC7B,IAAI,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;QAChC,IAAI,aAAa,GAAG,EAAE,CAAA;QAEtB,IAAI,IAAI,CAAC,MAAM,KAAK,UAAU,EAAE;YAC9B,OAAO,I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AAE,IAAI,CAAC,CAAC;iBAC1C,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;gBACb,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,EAAE;oBAC7C,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;iBACjC;qBAAM;oBACL,OAAO,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;iBAClD;YACH,CAAC,CAAC;iBACD,IAAI,CAAC,EAAE,CAAC,CAAA;SACZ;aAAM,IAAI,UAAU,EAAE;YACrB,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;SAC5B;QAED,MAAM,IAAI,GAAG,IAAI,KAAK,CAAA;IACxB,CAAC,CAAC,CAAA;IAEF,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;AAClC,CAAC","sourcesContent":["import colors from '../../public/node/colors.js'\nimport {escapeRegExp} from '../../public/common/string.js'\nimport AutocompletePrompt from 'inquirer-autocomplete-prompt'\nimport DistinctChoice from 'inquirer/lib/objects/choices'\nimport {Question, Answers} from 'inquirer'\n\nimport Paginator from 'inquirer/lib/utils/paginator.js'\nimport {Interface} from 'readline'\n\nexport class CustomAutocomplete extends AutocompletePrompt {\n protected isAutocomplete: boolean\n\n constructor(questions: Question<Answers>, rl: Interface, answers: Answers) {\n super(questions, rl, answers)\n this.isAutocomplete = true\n this.paginator = new Paginator(this.screen, {\n isInfinite: false,\n })\n }\n\n protected render(error?: string) {\n let content = this.getQuestion()\n let bottomContent = ''\n\n if (this.status !== 'answered') {\n content += colors.gray(this.isAutocomplete && this.firstRender ? 'Type to search… ' : '… ')\n }\n\n if (this.status === 'answered') {\n content += `${colors.dim('·')} ${colors.magenta(this.shortAnswer || this.answerName || this.answer)}`\n process.stdout.write('\\u001b[?25h')\n } else if (this.searching) {\n content += this.rl.line\n bottomContent += ` ${colors.magenta.dim('Searching...')}`\n } else if (this.nbChoices) {\n const choicesStr = listRender(this.currentChoices, this.selected, this.isAutocomplete ? this.rl.line : undefined)\n content += this.isAutocomplete ? this.rl.line : ''\n const indexPosition = this.selected\n let realIndexPosition = 0\n this.currentChoices.choices.every((choice, index: number) => {\n if (index > indexPosition) {\n return false\n }\n if (choice.type === 'separator') {\n return true\n }\n const name = choice.name\n realIndexPosition += name ? name.split('\\n').length : 0\n return true\n })\n bottomContent += this.paginator.paginate(choicesStr, realIndexPosition, this.isAutocomplete ? 10 : 500)\n } else {\n content += this.rl.line\n bottomContent += ` ${colors.magenta('No matching choices')}`\n }\n\n if (error) {\n bottomContent += `\\n${colors.magenta('>> ')}${error}`\n }\n\n this.firstRender = false\n\n this.screen.render(content, bottomContent)\n }\n\n protected getQuestion(): string {\n return `${this.prefix()} ${colors.bold(this.opt.message)}${this.opt.suffix}${colors.reset(' ')}`\n }\n\n protected prefix(): string {\n const color = colors.magenta.bold\n return this.status === 'answered' ? color('✔') : color('?')\n }\n}\n\nfunction listRender(choices: DistinctChoice, pointer: number, searchToken?: string): string {\n let output = ''\n let separatorOffset = 0\n\n choices.forEach((choice, i: number) => {\n if (choice.type === 'separator') {\n separatorOffset++\n if (choice.line.includes('──────────────')) {\n output += `\\n`\n } else {\n output += ` ${colors.dim.underline(choice)}\\n`\n }\n return\n }\n\n if (choice.disabled) {\n separatorOffset++\n output += ` - ${choice.name}`\n output += ` (${typeof choice.disabled === 'string' ? choice.disabled : 'Disabled'})`\n output += '\\n'\n return\n }\n\n const isSelected = i - separatorOffset === pointer\n let line = (isSelected ? '> ' : ' ') + choice.name\n\n if (isSelected) {\n line = colors.magenta(line)\n }\n\n if (searchToken) {\n const regexified = escapeRegExp(searchToken)\n line = line\n .split(new RegExp(`(${regexified})`, 'ig'))\n .map((token) => {\n if (token.match(new RegExp(regexified, 'ig'))) {\n return colors.magenta.dim(token)\n } else {\n return isSelected ? colors.magenta(token) : token\n }\n })\n .join('')\n } else if (isSelected) {\n line = colors.magenta(line)\n }\n\n output += `${line} \\n`\n })\n\n return output.replace(/\\n$/, '')\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopify/cli-kit",
3
- "version": "3.32.0",
3
+ "version": "3.33.0",
4
4
  "private": false,
5
5
  "description": "A set of utilities, interfaces, and models that are common across all the platform features",
6
6
  "keywords": [
@@ -77,6 +77,7 @@
77
77
  "@oclif/core": "1.21.0",
78
78
  "@types/archiver": "5.3.1",
79
79
  "abort-controller": "3.0.0",
80
+ "ansi-escapes": "6.0.0",
80
81
  "archiver": "5.3.1",
81
82
  "chalk": "5.1.0",
82
83
  "change-case": "4.1.2",
@@ -114,7 +115,6 @@
114
115
  "lodash": "4.17.21",
115
116
  "log-update": "4.0.0",
116
117
  "macaddress": "0.5.3",
117
- "md5-file": "5.0.0",
118
118
  "node-abort-controller": "3.0.1",
119
119
  "node-fetch": "3.2.4",
120
120
  "open": "8.4.0",
@@ -1,3 +0,0 @@
1
- import { AdminSession } from '../session.js';
2
- import { RequestDocument, Variables } from 'graphql-request';
3
- export declare function request<T>(query: RequestDocument, session: AdminSession, variables?: Variables): Promise<T>;
package/dist/api/admin.js DELETED
@@ -1,56 +0,0 @@
1
- import { buildHeaders, debugLogRequest, handlingErrors } from './common.js';
2
- import { debug, content, token as outputToken } from '../output.js';
3
- import { Bug, Abort } from '../error.js';
4
- import { graphqlClient } from '../http/graphql.js';
5
- import { gql } from 'graphql-request';
6
- export async function request(query, session, variables) {
7
- const api = 'Admin';
8
- return handlingErrors(api, async () => {
9
- const version = await fetchApiVersion(session);
10
- const url = adminUrl(session.storeFqdn, version);
11
- const headers = await buildHeaders(session.token);
12
- const client = await graphqlClient({ headers, url });
13
- debugLogRequest(api, query, variables, headers);
14
- const response = await client.request(query, variables);
15
- return response;
16
- });
17
- }
18
- async function fetchApiVersion(session) {
19
- const url = adminUrl(session.storeFqdn, 'unstable');
20
- const query = apiVersionQuery();
21
- const headers = await buildHeaders(session.token);
22
- const client = await graphqlClient({ url, headers });
23
- debug(`
24
- Sending Admin GraphQL request to URL ${url} with query:
25
- ${query}
26
- `);
27
- const data = await client
28
- .request(query, {})
29
- .catch((err) => {
30
- if (err.response.status === 403) {
31
- const storeName = session.storeFqdn.replace('.myshopify.com', '');
32
- throw new Abort(content `Looks like you don't have access this dev store: (${outputToken.link(storeName, `https://${session.storeFqdn}`)})`, content `If you're not the owner, create a dev store staff account for yourself`);
33
- }
34
- throw new Bug(`Unknown error connecting to your store`);
35
- });
36
- return data.publicApiVersions
37
- .filter((item) => item.supported)
38
- .map((item) => item.handle)
39
- .sort()
40
- .reverse()[0];
41
- }
42
- function adminUrl(store, version) {
43
- const realVersion = version || 'unstable';
44
- return `https://${store}/admin/api/${realVersion}/graphql.json`;
45
- }
46
- function apiVersionQuery() {
47
- return gql `
48
- query {
49
- publicApiVersions {
50
- handle
51
- supported
52
- }
53
- }
54
- `;
55
- }
56
- //# sourceMappingURL=admin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/api/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,eAAe,EAAE,cAAc,EAAC,MAAM,aAAa,CAAA;AAEzE,OAAO,EAAC,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,WAAW,EAAC,MAAM,cAAc,CAAA;AACjE,OAAO,EAAC,GAAG,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AACtC,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAC,GAAG,EAA6B,MAAM,iBAAiB,CAAA;AAE/D,MAAM,CAAC,KAAK,UAAU,OAAO,CAAI,KAAsB,EAAE,OAAqB,EAAE,SAAqB;IACnG,MAAM,GAAG,GAAG,OAAO,CAAA;IACnB,OAAO,cAAc,CAAC,GAAG,EAAE,KAAK,IAAI,EA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C,IAAI,CAC1E,SAAS,EACT,WAAW,OAAO,CAAC,SAAS,EAAE,CAC/B,GAAG,EACJ,OAAO,CAAA,wEAAwE,CAChF,CAAA;SACF;QACD,MAAM,IAAI,GAAG,CAAC,wCAAwC,CAAC,CAAA;IACzD,CAAC,CAAC,CAAA;IAEJ,OAAO,IAAI,CAAC,iBAAiB;SAC1B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;SAChC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC;SAC1B,IAAI,EAAE;SACN,OAAO,EAAE,CAAC,CAAC,CAAE,CAAA;AAClB,CAAC;AAED,SAAS,QAAQ,CAAC,KAAa,EAAE,OAA2B;IAC1D,MAAM,WAAW,GAAG,OAAO,IAAI,UAAU,CAAA;IACzC,OAAO,WAAW,KAAK,cAAc,WAAW,eAAe,CAAA;AACjE,CAAC;AAED,SAAS,eAAe;IACtB,OAAO,GAAG,CAAA;;;;;;;GAOT,CAAA;AACH,CAAC","sourcesContent":["import {buildHeaders, debugLogRequest, handlingErrors} from './common.js'\nimport {AdminSession} from '../session.js'\nimport {debug, content, token as outputToken} from '../output.js'\nimport {Bug, Abort} from '../error.js'\nimport {graphqlClient} from '../http/graphql.js'\nimport {gql, RequestDocument, Variables} from 'graphql-request'\n\nexport async function request<T>(query: RequestDocument, session: AdminSession, variables?: Variables): Promise<T> {\n const api = 'Admin'\n return handlingErrors(api, async () => {\n const version = await fetchApiVersion(session)\n const url = adminUrl(session.storeFqdn, version)\n const headers = await buildHeaders(session.token)\n const client = await graphqlClient({headers, url})\n debugLogRequest(api, query, variables, headers)\n const response = await client.request<T>(query, variables)\n return response\n })\n}\n\nasync function fetchApiVersion(session: AdminSession): Promise<string> {\n const url = adminUrl(session.storeFqdn, 'unstable')\n const query = apiVersionQuery()\n const headers = await buildHeaders(session.token)\n const client = await graphqlClient({url, headers})\n debug(`\nSending Admin GraphQL request to URL ${url} with query:\n${query}\n `)\n const data = await client\n .request<{\n publicApiVersions: {handle: string; supported: boolean}[]\n }>(query, {})\n .catch((err) => {\n if (err.response.status === 403) {\n const storeName = session.storeFqdn.replace('.myshopify.com', '')\n throw new Abort(\n content`Looks like you don't have access this dev store: (${outputToken.link(\n storeName,\n `https://${session.storeFqdn}`,\n )})`,\n content`If you're not the owner, create a dev store staff account for yourself`,\n )\n }\n throw new Bug(`Unknown error connecting to your store`)\n })\n\n return data.publicApiVersions\n .filter((item) => item.supported)\n .map((item) => item.handle)\n .sort()\n .reverse()[0]!\n}\n\nfunction adminUrl(store: string, version: string | undefined): string {\n const realVersion = version || 'unstable'\n return `https://${store}/admin/api/${realVersion}/graphql.json`\n}\n\nfunction apiVersionQuery(): string {\n return gql`\n query {\n publicApiVersions {\n handle\n supported\n }\n }\n `\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/api/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAA;AACrD,OAAO,SAAS,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAC,gBAAgB,EAAE,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,cAAc,CAAA;AAC1F,OAAO,EAAC,KAAK,EAAE,eAAe,EAAC,MAAM,aAAa,CAAA;AAClD,OAAO,EAAC,WAAW,EAA6B,MAAM,iBAAiB,CAAA;AACvE,OAAO,EAAC,UAAU,EAAC,MAAM,QAAQ,CAAA;AAEjC,MAAM,OAAO,kBAAmB,SAAQ,eAAe;IAErD,YAAmB,OAAe,EAAE,UAAkB;QACpD,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAC9B,CAAC;CACF;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,KAAc;IAC/C,MAAM,SAAS,GAAG,kBAAkB,MAAM,SAAS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AAW,EACX,KAAsB,EACtB,SAAqB,EACrB,UAAmC,EAAE;IAErC,KAAK,CAAC,OAAO,CAAA;UACL,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;EACvB,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;;;EAG3B,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;;;EAGnD,sBAAsB,CAAC,OAAO,CAAC;CAChC,CAAC,CAAA;AACF,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAAI,GAAW,EAAE,MAAwB;IAC3E,IAAI;QACF,OAAO,MAAM,MAAM,EAAE,CAAA;KACtB;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,KAAK,YAAY,WAAW,EAAE;YAChC,MAAM,YAAY,GAAG,gBAAgB,CAAC,OAAO,CAAA;QAC3C,KAAK,CAAC,GAAG,CACb,GAAG,CACJ,8DAA8D,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE;;IAEvF,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;OACpC,CAAC,CAAA;YACF,IAAI,WAAkB,CAAA;YACtB,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,GAAG,EAAE;gBAC/B,WAAW,GAAG,IAAI,kBAAkB,CAAC,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;aAC1E;iBAAM;gBACL,WAAW,GAAG,IAAI,KAAK,CAAC,YAAY,CAAC,CAAA;aACtC;YACD,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAA;YAC/B,MAAM,WAAW,CAAA;SAClB;aAAM;YACL,MAAM,KAAK,CAAA;SACZ;KACF;AACH,CAAC","sourcesContent":["import {firstPartyDev} from '../environment/local.js'\nimport constants from '../constants.js'\nimport {stringifyMessage, content, token as outputToken, token, debug} from '../output.js'\nimport {Abort, ExtendableError} from '../error.js'\nimport {ClientError, RequestDocument, Variables} from 'graphql-request'\nimport {randomUUID} from 'crypto'\n\nexport class RequestClientError extends ExtendableError {\n statusCode: number\n public constructor(message: string, statusCode: number) {\n super(message)\n this.statusCode = statusCode\n }\n}\n\nexport async function buildHeaders(token?: string): Promise<{[key: string]: string}> {\n const userAgent = `Shopify CLI; v=${await constants.versions.cliKit()}`\n\n const headers: {[header: string]: string} = {\n 'User-Agent': userAgent,\n // 'Sec-CH-UA': secCHUA, This header requires the Git sha.\n 'Sec-CH-UA-PLATFORM': process.platform,\n 'X-Request-Id': randomUUID(),\n 'Content-Type': 'application/json',\n ...(firstPartyDev() && {'X-Shopify-Cli-Employee': '1'}),\n }\n if (token) {\n // eslint-disable-next-line dot-notation\n headers['authorization'] = `Bearer ${token}`\n headers['X-Shopify-Access-Token'] = `Bearer ${token}`\n }\n\n return headers\n}\n\n/**\n * Removes the sensitive data from the headers and outputs them as a string.\n * @param headers - HTTP headers.\n * @returns A sanitized version of the headers as a string.\n */\nexport function sanitizedHeadersOutput(headers: {[key: string]: string}): string {\n const sanitized: {[key: string]: string} = {}\n const keywords = ['token', 'authorization']\n Object.keys(headers).forEach((header) => {\n if (keywords.find((keyword) => header.toLocaleLowerCase().includes(keyword)) === undefined) {\n sanitized[header] = headers[header]!\n }\n })\n return Object.keys(sanitized)\n .map((header) => {\n return ` - ${header}: ${sanitized[header]}`\n })\n .join('\\n')\n}\n\nexport function debugLogRequest<T>(\n api: string,\n query: RequestDocument,\n variables?: Variables,\n headers: {[key: string]: string} = {},\n) {\n debug(content`\nSending ${token.json(api)} GraphQL request:\n${token.raw(query.toString())}\n\nWith variables:\n${variables ? JSON.stringify(variables, null, 2) : ''}\n\nAnd headers:\n${sanitizedHeadersOutput(headers)}\n`)\n}\n\nexport async function handlingErrors<T>(api: string, action: () => Promise<T>): Promise<T> {\n try {\n return await action()\n } catch (error) {\n if (error instanceof ClientError) {\n const errorMessage = stringifyMessage(content`\n The ${token.raw(\n api,\n )} GraphQL API responded unsuccessfully with the HTTP status ${`${error.response.status}`} and errors:\n\n ${outputToken.json(error.response.errors)}\n `)\n let mappedError: Error\n if (error.response.status < 500) {\n mappedError = new RequestClientError(errorMessage, error.response.status)\n } else {\n mappedError = new Abort(errorMessage)\n }\n mappedError.stack = error.stack\n throw mappedError\n } else {\n throw error\n }\n }\n}\n"]}
@@ -1,20 +0,0 @@
1
- export declare const AllAppExtensionRegistrationsQuery: string;
2
- export interface AllAppExtensionRegistrationsQueryVariables {
3
- apiKey: string;
4
- }
5
- export interface AllAppExtensionRegistrationsQuerySchema {
6
- app: {
7
- extensionRegistrations: {
8
- id: string;
9
- uuid: string;
10
- title: string;
11
- type: string;
12
- }[];
13
- functions: {
14
- id: string;
15
- uuid: string;
16
- title: string;
17
- type: string;
18
- }[];
19
- };
20
- }
@@ -1,20 +0,0 @@
1
- import { gql } from 'graphql-request';
2
- export const AllAppExtensionRegistrationsQuery = gql `
3
- query allAppExtensionRegistrations($apiKey: String!) {
4
- app(apiKey: $apiKey) {
5
- extensionRegistrations {
6
- id
7
- uuid
8
- title
9
- type
10
- }
11
- functions {
12
- id
13
- uuid
14
- title
15
- type: apiType
16
- }
17
- }
18
- }
19
- `;
20
- //# sourceMappingURL=all_app_extension_registrations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"all_app_extension_registrations.js","sourceRoot":"","sources":["../../../src/api/graphql/all_app_extension_registrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;CAiBnD,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const AllAppExtensionRegistrationsQuery = gql`\n query allAppExtensionRegistrations($apiKey: String!) {\n app(apiKey: $apiKey) {\n extensionRegistrations {\n id\n uuid\n title\n type\n }\n functions {\n id\n uuid\n title\n type: apiType\n }\n }\n }\n`\n\nexport interface AllAppExtensionRegistrationsQueryVariables {\n apiKey: string\n}\n\nexport interface AllAppExtensionRegistrationsQuerySchema {\n app: {\n extensionRegistrations: {\n id: string\n uuid: string\n title: string\n type: string\n }[]\n functions: {\n id: string\n uuid: string\n title: string\n type: string\n }[]\n }\n}\n"]}
@@ -1,18 +0,0 @@
1
- export declare const AllDevStoresByOrganizationQuery: string;
2
- export interface AllDevStoresByOrganizationSchema {
3
- organizations: {
4
- nodes: {
5
- id: string;
6
- stores: {
7
- nodes: {
8
- shopId: string;
9
- link: string;
10
- shopDomain: string;
11
- shopName: string;
12
- transferDisabled: boolean;
13
- convertableToPartnerTest: boolean;
14
- }[];
15
- };
16
- }[];
17
- };
18
- }
@@ -1,21 +0,0 @@
1
- import { gql } from 'graphql-request';
2
- export const AllDevStoresByOrganizationQuery = gql `
3
- query FindOrganization($id: ID!) {
4
- organizations(id: $id, first: 1) {
5
- nodes {
6
- id
7
- stores(first: 500, archived: false, type: [DEVELOPMENT]) {
8
- nodes {
9
- shopId
10
- link
11
- shopDomain
12
- shopName
13
- transferDisabled
14
- convertableToPartnerTest
15
- }
16
- }
17
- }
18
- }
19
- }
20
- `;
21
- //# sourceMappingURL=all_dev_stores_by_org.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"all_dev_stores_by_org.js","sourceRoot":"","sources":["../../../src/api/graphql/all_dev_stores_by_org.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;CAkBjD,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const AllDevStoresByOrganizationQuery = gql`\n query FindOrganization($id: ID!) {\n organizations(id: $id, first: 1) {\n nodes {\n id\n stores(first: 500, archived: false, type: [DEVELOPMENT]) {\n nodes {\n shopId\n link\n shopDomain\n shopName\n transferDisabled\n convertableToPartnerTest\n }\n }\n }\n }\n }\n`\n\nexport interface AllDevStoresByOrganizationSchema {\n organizations: {\n nodes: {\n id: string\n stores: {\n nodes: {\n shopId: string\n link: string\n shopDomain: string\n shopName: string\n transferDisabled: boolean\n convertableToPartnerTest: boolean\n }[]\n }\n }[]\n }\n}\n"]}
@@ -1,12 +0,0 @@
1
- export interface AllOrganizationsQuerySchemaOrganization {
2
- id: string;
3
- businessName: string;
4
- website: string;
5
- appsNext: boolean;
6
- }
7
- export interface AllOrganizationsQuerySchema {
8
- organizations: {
9
- nodes: AllOrganizationsQuerySchemaOrganization[];
10
- };
11
- }
12
- export declare const AllOrganizationsQuery: string;
@@ -1,14 +0,0 @@
1
- import { gql } from 'graphql-request';
2
- export const AllOrganizationsQuery = gql `
3
- {
4
- organizations(first: 200) {
5
- nodes {
6
- id
7
- businessName
8
- website
9
- appsNext
10
- }
11
- }
12
- }
13
- `;
14
- //# sourceMappingURL=all_orgs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"all_orgs.js","sourceRoot":"","sources":["../../../src/api/graphql/all_orgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAenC,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;;;;;;;;;;CAWvC,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport interface AllOrganizationsQuerySchemaOrganization {\n id: string\n businessName: string\n website: string\n appsNext: boolean\n}\n\nexport interface AllOrganizationsQuerySchema {\n organizations: {\n nodes: AllOrganizationsQuerySchemaOrganization[]\n }\n}\n\nexport const AllOrganizationsQuery = gql`\n {\n organizations(first: 200) {\n nodes {\n id\n businessName\n website\n appsNext\n }\n }\n }\n`\n"]}
@@ -1,16 +0,0 @@
1
- export declare const ConvertDevToTestStoreQuery: string;
2
- export interface ConvertDevToTestStoreVariables {
3
- input: {
4
- organizationID: number;
5
- shopId: string;
6
- };
7
- }
8
- export interface ConvertDevToTestStoreSchema {
9
- convertDevToTestStore: {
10
- convertedToTestStore: boolean;
11
- userErrors: {
12
- field: string[];
13
- message: string;
14
- }[];
15
- };
16
- }
@@ -1,13 +0,0 @@
1
- import { gql } from 'graphql-request';
2
- export const ConvertDevToTestStoreQuery = gql `
3
- mutation convertDevToTestStore($input: ConvertDevToTestStoreInput!) {
4
- convertDevToTestStore(input: $input) {
5
- convertedToTestStore
6
- userErrors {
7
- message
8
- field
9
- }
10
- }
11
- }
12
- `;
13
- //# sourceMappingURL=convert_dev_to_test_store.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"convert_dev_to_test_store.js","sourceRoot":"","sources":["../../../src/api/graphql/convert_dev_to_test_store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAA;;;;;;;;;;CAU5C,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const ConvertDevToTestStoreQuery = gql`\n mutation convertDevToTestStore($input: ConvertDevToTestStoreInput!) {\n convertDevToTestStore(input: $input) {\n convertedToTestStore\n userErrors {\n message\n field\n }\n }\n }\n`\n\nexport interface ConvertDevToTestStoreVariables {\n input: {\n organizationID: number\n shopId: string\n }\n}\n\nexport interface ConvertDevToTestStoreSchema {\n convertDevToTestStore: {\n convertedToTestStore: boolean\n userErrors: {\n field: string[]\n message: string\n }[]\n }\n}\n"]}
@@ -1,29 +0,0 @@
1
- export declare const CreateAppQuery: string;
2
- export interface CreateAppQueryVariables {
3
- org: number;
4
- title: string;
5
- appUrl: string;
6
- redir: string[];
7
- type: string;
8
- }
9
- export interface CreateAppQuerySchema {
10
- appCreate: {
11
- app: {
12
- id: string;
13
- apiKey: string;
14
- title: string;
15
- applicationUrl: string;
16
- redirectUrlWhitelist: string[];
17
- organizationId: string;
18
- apiSecretKeys: {
19
- secret: string;
20
- }[];
21
- appType: string;
22
- grantedScopes: string[];
23
- };
24
- userErrors: {
25
- field: string[];
26
- message: string;
27
- }[];
28
- };
29
- }
@@ -1,33 +0,0 @@
1
- import { gql } from 'graphql-request';
2
- export const CreateAppQuery = gql `
3
- mutation AppCreate($org: Int!, $title: String!, $appUrl: Url!, $redir: [Url]!, $type: AppType) {
4
- appCreate(
5
- input: {
6
- organizationID: $org
7
- title: $title
8
- applicationUrl: $appUrl
9
- redirectUrlWhitelist: $redir
10
- appType: $type
11
- }
12
- ) {
13
- app {
14
- id
15
- apiKey
16
- title
17
- appType
18
- applicationUrl
19
- redirectUrlWhitelist
20
- apiSecretKeys {
21
- secret
22
- }
23
- appType
24
- grantedScopes
25
- }
26
- userErrors {
27
- field
28
- message
29
- }
30
- }
31
- }
32
- `;
33
- //# sourceMappingURL=create_app.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create_app.js","sourceRoot":"","sources":["../../../src/api/graphql/create_app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BhC,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const CreateAppQuery = gql`\n mutation AppCreate($org: Int!, $title: String!, $appUrl: Url!, $redir: [Url]!, $type: AppType) {\n appCreate(\n input: {\n organizationID: $org\n title: $title\n applicationUrl: $appUrl\n redirectUrlWhitelist: $redir\n appType: $type\n }\n ) {\n app {\n id\n apiKey\n title\n appType\n applicationUrl\n redirectUrlWhitelist\n apiSecretKeys {\n secret\n }\n appType\n grantedScopes\n }\n userErrors {\n field\n message\n }\n }\n }\n`\n\nexport interface CreateAppQueryVariables {\n org: number\n title: string\n appUrl: string\n redir: string[]\n type: string\n}\n\nexport interface CreateAppQuerySchema {\n appCreate: {\n app: {\n id: string\n apiKey: string\n title: string\n applicationUrl: string\n redirectUrlWhitelist: string[]\n organizationId: string\n apiSecretKeys: {\n secret: string\n }[]\n appType: string\n grantedScopes: string[]\n }\n userErrors: {\n field: string[]\n message: string\n }[]\n }\n}\n"]}
@@ -1,33 +0,0 @@
1
- export declare const CreateDeployment: string;
2
- export interface ExtensionSettings {
3
- uuid: string;
4
- config: string;
5
- context: string;
6
- }
7
- export interface CreateDeploymentVariables {
8
- apiKey: string;
9
- uuid: string;
10
- bundleUrl: string;
11
- extensions: ExtensionSettings[];
12
- }
13
- export interface CreateDeploymentSchema {
14
- deploymentCreate: {
15
- deployment: {
16
- uuid: string;
17
- deployedVersions: {
18
- extensionVersion: {
19
- uuid: string;
20
- registrationUuid: string;
21
- validationErrors: {
22
- field: string[];
23
- message: string;
24
- }[];
25
- };
26
- }[];
27
- };
28
- userErrors: {
29
- field: string[];
30
- message: string;
31
- }[];
32
- };
33
- }
@@ -1,25 +0,0 @@
1
- import { gql } from 'graphql-request';
2
- export const CreateDeployment = gql `
3
- mutation CreateDeployment($apiKey: String!, $uuid: String!, $bundleUrl: String!, $extensions: [ExtensionSettings!]!) {
4
- deploymentCreate(input: {apiKey: $apiKey, uuid: $uuid, bundleUrl: $bundleUrl, extensions: $extensions}) {
5
- deployment {
6
- uuid
7
- deployedVersions {
8
- extensionVersion {
9
- uuid
10
- registrationUuid
11
- validationErrors {
12
- message
13
- field
14
- }
15
- }
16
- }
17
- }
18
- userErrors {
19
- message
20
- field
21
- }
22
- }
23
- }
24
- `;
25
- //# sourceMappingURL=create_deployment.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create_deployment.js","sourceRoot":"","sources":["../../../src/api/graphql/create_deployment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;CAsBlC,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const CreateDeployment = gql`\n mutation CreateDeployment($apiKey: String!, $uuid: String!, $bundleUrl: String!, $extensions: [ExtensionSettings!]!) {\n deploymentCreate(input: {apiKey: $apiKey, uuid: $uuid, bundleUrl: $bundleUrl, extensions: $extensions}) {\n deployment {\n uuid\n deployedVersions {\n extensionVersion {\n uuid\n registrationUuid\n validationErrors {\n message\n field\n }\n }\n }\n }\n userErrors {\n message\n field\n }\n }\n }\n`\n\nexport interface ExtensionSettings {\n uuid: string\n config: string\n context: string\n}\n\nexport interface CreateDeploymentVariables {\n apiKey: string\n uuid: string\n bundleUrl: string\n extensions: ExtensionSettings[]\n}\n\nexport interface CreateDeploymentSchema {\n deploymentCreate: {\n deployment: {\n uuid: string\n deployedVersions: {\n extensionVersion: {\n uuid: string\n registrationUuid: string\n validationErrors: {\n field: string[]\n message: string\n }[]\n }\n }[]\n }\n userErrors: {\n field: string[]\n message: string\n }[]\n }\n}\n"]}
@@ -1,30 +0,0 @@
1
- export declare const ExtensionCreateQuery: string;
2
- export interface ExtensionCreateVariables {
3
- apiKey: string;
4
- type: string;
5
- title: string;
6
- config: string;
7
- context?: string | null;
8
- }
9
- export interface ExtensionCreateSchema {
10
- extensionCreate: {
11
- extensionRegistration: {
12
- id: string;
13
- uuid: string;
14
- type: string;
15
- title: string;
16
- draftVersion: {
17
- registrationId: string;
18
- lastUserInteractionAt: string;
19
- validationErrors: {
20
- field: string[];
21
- message: string;
22
- }[];
23
- };
24
- };
25
- userErrors: {
26
- field: string[];
27
- message: string;
28
- }[];
29
- };
30
- }
@@ -1,26 +0,0 @@
1
- import { gql } from 'graphql-request';
2
- export const ExtensionCreateQuery = gql `
3
- mutation ExtensionCreate($apiKey: String!, $type: ExtensionType!, $title: String!, $config: JSON!, $context: String) {
4
- extensionCreate(input: {apiKey: $apiKey, type: $type, title: $title, config: $config, context: $context}) {
5
- extensionRegistration {
6
- id
7
- uuid
8
- type
9
- title
10
- draftVersion {
11
- registrationId
12
- lastUserInteractionAt
13
- validationErrors {
14
- field
15
- message
16
- }
17
- }
18
- }
19
- userErrors {
20
- field
21
- message
22
- }
23
- }
24
- }
25
- `;
26
- //# sourceMappingURL=extension_create.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extension_create.js","sourceRoot":"","sources":["../../../src/api/graphql/extension_create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;CAuBtC,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const ExtensionCreateQuery = gql`\n mutation ExtensionCreate($apiKey: String!, $type: ExtensionType!, $title: String!, $config: JSON!, $context: String) {\n extensionCreate(input: {apiKey: $apiKey, type: $type, title: $title, config: $config, context: $context}) {\n extensionRegistration {\n id\n uuid\n type\n title\n draftVersion {\n registrationId\n lastUserInteractionAt\n validationErrors {\n field\n message\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\n`\n\nexport interface ExtensionCreateVariables {\n apiKey: string\n type: string\n title: string\n config: string\n context?: string | null\n}\n\nexport interface ExtensionCreateSchema {\n extensionCreate: {\n extensionRegistration: {\n id: string\n uuid: string\n type: string\n title: string\n draftVersion: {\n registrationId: string\n lastUserInteractionAt: string\n validationErrors: {\n field: string[]\n message: string\n }[]\n }\n }\n userErrors: {\n field: string[]\n message: string\n }[]\n }\n}\n"]}
@@ -1,27 +0,0 @@
1
- export declare const ExtensionSpecificationsQuery: string;
2
- export interface ExtensionSpecificationsQueryVariables {
3
- api_key: string;
4
- }
5
- export interface RemoteSpecification {
6
- name: string;
7
- externalName: string;
8
- identifier: string;
9
- gated: boolean;
10
- externalIdentifier: string;
11
- options: {
12
- managementExperience: 'cli' | 'custom' | 'dashboard';
13
- registrationLimit: number;
14
- };
15
- features?: {
16
- argo?: {
17
- surface: string;
18
- };
19
- };
20
- }
21
- export interface FlattenedRemoteSpecification extends RemoteSpecification {
22
- surface?: string;
23
- registrationLimit: number;
24
- }
25
- export interface ExtensionSpecificationsQuerySchema {
26
- extensionSpecifications: RemoteSpecification[];
27
- }
@@ -1,22 +0,0 @@
1
- import { gql } from 'graphql-request';
2
- export const ExtensionSpecificationsQuery = gql `
3
- query fetchSpecifications($api_key: String!) {
4
- extensionSpecifications(apiKey: $api_key) {
5
- name
6
- externalName
7
- externalIdentifier
8
- identifier
9
- gated
10
- options {
11
- managementExperience
12
- registrationLimit
13
- }
14
- features {
15
- argo {
16
- surface
17
- }
18
- }
19
- }
20
- }
21
- `;
22
- //# sourceMappingURL=extension_specifications.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extension_specifications.js","sourceRoot":"","sources":["../../../src/api/graphql/extension_specifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;CAmB9C,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const ExtensionSpecificationsQuery = gql`\n query fetchSpecifications($api_key: String!) {\n extensionSpecifications(apiKey: $api_key) {\n name\n externalName\n externalIdentifier\n identifier\n gated\n options {\n managementExperience\n registrationLimit\n }\n features {\n argo {\n surface\n }\n }\n }\n }\n`\n\nexport interface ExtensionSpecificationsQueryVariables {\n api_key: string\n}\n\nexport interface RemoteSpecification {\n name: string\n externalName: string\n identifier: string\n gated: boolean\n externalIdentifier: string\n options: {\n managementExperience: 'cli' | 'custom' | 'dashboard'\n registrationLimit: number\n }\n features?: {\n argo?: {\n surface: string\n }\n }\n}\n\nexport interface FlattenedRemoteSpecification extends RemoteSpecification {\n surface?: string\n registrationLimit: number\n}\n\nexport interface ExtensionSpecificationsQuerySchema {\n extensionSpecifications: RemoteSpecification[]\n}\n"]}
@@ -1,14 +0,0 @@
1
- export declare const FindAppQuery: string;
2
- export interface FindAppQuerySchema {
3
- app: {
4
- id: string;
5
- title: string;
6
- apiKey: string;
7
- organizationId: string;
8
- apiSecretKeys: {
9
- secret: string;
10
- }[];
11
- appType: string;
12
- grantedScopes: string[];
13
- };
14
- }
@@ -1,17 +0,0 @@
1
- import { gql } from 'graphql-request';
2
- export const FindAppQuery = gql `
3
- query FindApp($apiKey: String!) {
4
- app(apiKey: $apiKey) {
5
- id
6
- title
7
- apiKey
8
- organizationId
9
- apiSecretKeys {
10
- secret
11
- }
12
- appType
13
- grantedScopes
14
- }
15
- }
16
- `;
17
- //# sourceMappingURL=find_app.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"find_app.js","sourceRoot":"","sources":["../../../src/api/graphql/find_app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAA;;;;;;;;;;;;;;CAc9B,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const FindAppQuery = gql`\n query FindApp($apiKey: String!) {\n app(apiKey: $apiKey) {\n id\n title\n apiKey\n organizationId\n apiSecretKeys {\n secret\n }\n appType\n grantedScopes\n }\n }\n`\n\nexport interface FindAppQuerySchema {\n app: {\n id: string\n title: string\n apiKey: string\n organizationId: string\n apiSecretKeys: {\n secret: string\n }[]\n appType: string\n grantedScopes: string[]\n }\n}\n"]}