@shopify/shop-minis-cli 0.0.37 → 0.0.82

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 (362) hide show
  1. package/.eslintrc.cjs +78 -0
  2. package/.vscode/extensions.json +3 -0
  3. package/.vscode/launch.json +29 -0
  4. package/.vscode/settings.json +8 -0
  5. package/.vscode/shop-minis-cli.code-workspace +8 -0
  6. package/build/commands/cancel-submission/cancel-submission.d.ts +1 -0
  7. package/build/commands/cancel-submission/cancel-submission.js +57 -0
  8. package/build/commands/cancel-submission/cancel-submission.js.map +1 -0
  9. package/build/commands/cancel-submission/index.d.ts +2 -0
  10. package/build/commands/cancel-submission/index.js +18 -0
  11. package/build/commands/cancel-submission/index.js.map +1 -0
  12. package/build/commands/cancel-submission/types.d.ts +3 -0
  13. package/build/commands/cancel-submission/types.js +2 -0
  14. package/build/commands/cancel-submission/types.js.map +1 -0
  15. package/build/commands/check-submission/index.d.ts +2 -0
  16. package/build/commands/check-submission/index.js +55 -0
  17. package/build/commands/check-submission/index.js.map +1 -0
  18. package/build/commands/check-submission/types.d.ts +3 -0
  19. package/build/commands/check-submission/types.js +2 -0
  20. package/build/commands/check-submission/types.js.map +1 -0
  21. package/build/commands/codemod/index.d.ts +3 -0
  22. package/build/commands/codemod/index.js +47 -0
  23. package/build/commands/codemod/index.js.map +1 -0
  24. package/build/commands/codemod/releases/index.d.ts +7 -0
  25. package/build/commands/codemod/releases/index.js +58 -0
  26. package/build/commands/codemod/releases/index.js.map +1 -0
  27. package/build/commands/codemod/releases/types.d.ts +9 -0
  28. package/build/commands/codemod/releases/types.js +2 -0
  29. package/build/commands/codemod/releases/types.js.map +1 -0
  30. package/build/commands/codemod/releases/v0-0-42/index.d.ts +3 -0
  31. package/build/commands/codemod/releases/v0-0-42/index.js +46 -0
  32. package/build/commands/codemod/releases/v0-0-42/index.js.map +1 -0
  33. package/build/commands/codemod/releases/v0-0-42/reset-files.d.ts +7 -0
  34. package/build/commands/codemod/releases/v0-0-42/reset-files.js +83 -0
  35. package/build/commands/codemod/releases/v0-0-42/reset-files.js.map +1 -0
  36. package/build/commands/codemod/releases/v0-0-43.d.ts +3 -0
  37. package/build/commands/codemod/releases/v0-0-43.js +32 -0
  38. package/build/commands/codemod/releases/v0-0-43.js.map +1 -0
  39. package/build/commands/codemod/releases/v0-0-44.d.ts +3 -0
  40. package/build/commands/codemod/releases/v0-0-44.js +214 -0
  41. package/build/commands/codemod/releases/v0-0-44.js.map +1 -0
  42. package/build/commands/codemod/releases/v0-0-45.d.ts +3 -0
  43. package/build/commands/codemod/releases/v0-0-45.js +23 -0
  44. package/build/commands/codemod/releases/v0-0-45.js.map +1 -0
  45. package/build/commands/codemod/releases/v0-0-50.d.ts +3 -0
  46. package/build/commands/codemod/releases/v0-0-50.js +34 -0
  47. package/build/commands/codemod/releases/v0-0-50.js.map +1 -0
  48. package/build/commands/codemod/releases/v0-0-54.d.ts +3 -0
  49. package/build/commands/codemod/releases/v0-0-54.js +70 -0
  50. package/build/commands/codemod/releases/v0-0-54.js.map +1 -0
  51. package/build/commands/codemod/releases/v0-0-56.d.ts +3 -0
  52. package/build/commands/codemod/releases/v0-0-56.js +48 -0
  53. package/build/commands/codemod/releases/v0-0-56.js.map +1 -0
  54. package/build/commands/codemod/releases/v0-0-57.d.ts +3 -0
  55. package/build/commands/codemod/releases/v0-0-57.js +41 -0
  56. package/build/commands/codemod/releases/v0-0-57.js.map +1 -0
  57. package/build/commands/codemod/releases/v0-0-58.d.ts +3 -0
  58. package/build/commands/codemod/releases/v0-0-58.js +68 -0
  59. package/build/commands/codemod/releases/v0-0-58.js.map +1 -0
  60. package/build/commands/codemod/releases/v0-0-61.d.ts +3 -0
  61. package/build/commands/codemod/releases/v0-0-61.js +30 -0
  62. package/build/commands/codemod/releases/v0-0-61.js.map +1 -0
  63. package/build/commands/codemod/releases/v0-0-63.d.ts +3 -0
  64. package/build/commands/codemod/releases/v0-0-63.js +42 -0
  65. package/build/commands/codemod/releases/v0-0-63.js.map +1 -0
  66. package/build/commands/codemod/releases/v0-0-64.d.ts +3 -0
  67. package/build/commands/codemod/releases/v0-0-64.js +47 -0
  68. package/build/commands/codemod/releases/v0-0-64.js.map +1 -0
  69. package/build/commands/codemod/releases/v0-0-75.d.ts +3 -0
  70. package/build/commands/codemod/releases/v0-0-75.js +30 -0
  71. package/build/commands/codemod/releases/v0-0-75.js.map +1 -0
  72. package/build/commands/codemod/releases/v0-0-76.d.ts +3 -0
  73. package/build/commands/codemod/releases/v0-0-76.js +32 -0
  74. package/build/commands/codemod/releases/v0-0-76.js.map +1 -0
  75. package/build/commands/codemod/releases/v0-0-77.d.ts +3 -0
  76. package/build/commands/codemod/releases/v0-0-77.js +39 -0
  77. package/build/commands/codemod/releases/v0-0-77.js.map +1 -0
  78. package/build/commands/codemod/releases/v0-0-79.d.ts +3 -0
  79. package/build/commands/codemod/releases/v0-0-79.js +35 -0
  80. package/build/commands/codemod/releases/v0-0-79.js.map +1 -0
  81. package/build/commands/config.d.ts +14 -0
  82. package/build/commands/config.js +42 -0
  83. package/build/commands/config.js.map +1 -0
  84. package/build/commands/create-mini/index.js +84 -68
  85. package/build/commands/create-mini/index.js.map +1 -1
  86. package/build/commands/create-mini/utils/template-app.d.ts +1 -1
  87. package/build/commands/create-mini/utils/template-app.js +38 -38
  88. package/build/commands/create-mini/utils/template-app.js.map +1 -1
  89. package/build/commands/dev/index.d.ts +3 -0
  90. package/build/commands/dev/index.js +51 -22
  91. package/build/commands/dev/index.js.map +1 -1
  92. package/build/commands/dev/utils/android.d.ts +6 -4
  93. package/build/commands/dev/utils/android.js +55 -67
  94. package/build/commands/dev/utils/android.js.map +1 -1
  95. package/build/commands/dev/utils/binaries.d.ts +2 -80
  96. package/build/commands/dev/utils/binaries.js +10 -166
  97. package/build/commands/dev/utils/binaries.js.map +1 -1
  98. package/build/commands/dev/utils/build-type.d.ts +2 -0
  99. package/build/commands/dev/utils/build-type.js +14 -0
  100. package/build/commands/dev/utils/build-type.js.map +1 -0
  101. package/build/commands/dev/utils/deeplink.d.ts +3 -3
  102. package/build/commands/dev/utils/deeplink.js +13 -18
  103. package/build/commands/dev/utils/deeplink.js.map +1 -1
  104. package/build/commands/dev/utils/interactive-terminal.d.ts +4 -2
  105. package/build/commands/dev/utils/interactive-terminal.js +66 -107
  106. package/build/commands/dev/utils/interactive-terminal.js.map +1 -1
  107. package/build/commands/dev/utils/metro/metro-config.js +17 -20
  108. package/build/commands/dev/utils/metro/metro-config.js.map +1 -1
  109. package/build/commands/dev/utils/metro/metro-reporter.d.ts +3 -4
  110. package/build/commands/dev/utils/metro/metro-reporter.js +6 -13
  111. package/build/commands/dev/utils/metro/metro-reporter.js.map +1 -1
  112. package/build/commands/dev/utils/metro/metro-server-middleware.d.ts +1 -0
  113. package/build/commands/dev/utils/metro/metro-server-middleware.js +11 -12
  114. package/build/commands/dev/utils/metro/metro-server-middleware.js.map +1 -1
  115. package/build/commands/dev/utils/metro/metro-server.d.ts +2 -2
  116. package/build/commands/dev/utils/metro/metro-server.js +7 -14
  117. package/build/commands/dev/utils/metro/metro-server.js.map +1 -1
  118. package/build/commands/dev/utils/network.d.ts +20 -0
  119. package/build/commands/dev/utils/network.js +122 -0
  120. package/build/commands/dev/utils/network.js.map +1 -0
  121. package/build/commands/dev/utils/platform.d.ts +18 -0
  122. package/build/commands/dev/utils/platform.js +41 -0
  123. package/build/commands/dev/utils/platform.js.map +1 -0
  124. package/build/commands/dev/utils/prompt-binary-upgrade.d.ts +1 -0
  125. package/build/commands/dev/utils/prompt-binary-upgrade.js +12 -0
  126. package/build/commands/dev/utils/prompt-binary-upgrade.js.map +1 -0
  127. package/build/commands/dev/utils/qr-code.js +3 -10
  128. package/build/commands/dev/utils/qr-code.js.map +1 -1
  129. package/build/commands/dev/utils/simulator.d.ts +5 -2
  130. package/build/commands/dev/utils/simulator.js +43 -37
  131. package/build/commands/dev/utils/simulator.js.map +1 -1
  132. package/build/commands/dev/utils/start-app/config.d.ts +5 -0
  133. package/build/commands/dev/utils/start-app/config.js +25 -0
  134. package/build/commands/dev/utils/start-app/config.js.map +1 -0
  135. package/build/commands/dev/utils/start-app/start-app-with-options.d.ts +2 -0
  136. package/build/commands/dev/utils/start-app/start-app-with-options.js +94 -0
  137. package/build/commands/dev/utils/start-app/start-app-with-options.js.map +1 -0
  138. package/build/commands/dev/utils/start-app/start-app.d.ts +2 -0
  139. package/build/commands/dev/utils/start-app/start-app.js +10 -0
  140. package/build/commands/dev/utils/start-app/start-app.js.map +1 -0
  141. package/build/commands/dev/utils/start-app/types.d.ts +20 -0
  142. package/build/commands/dev/utils/start-app/types.js +2 -0
  143. package/build/commands/dev/utils/start-app/types.js.map +1 -0
  144. package/build/commands/dev/utils/types.d.ts +24 -0
  145. package/build/commands/dev/utils/types.js +7 -0
  146. package/build/commands/dev/utils/types.js.map +1 -0
  147. package/build/commands/dev/utils/version.d.ts +64 -0
  148. package/build/commands/dev/utils/version.js +101 -0
  149. package/build/commands/dev/utils/version.js.map +1 -0
  150. package/build/commands/dev/utils/with-retries.js +1 -5
  151. package/build/commands/dev/utils/with-retries.js.map +1 -1
  152. package/build/commands/doctor/index.d.ts +6 -0
  153. package/build/commands/doctor/index.js +21 -0
  154. package/build/commands/doctor/index.js.map +1 -0
  155. package/build/commands/doctor/utils/diagnose-dependencies.d.ts +7 -0
  156. package/build/commands/doctor/utils/diagnose-dependencies.js +108 -0
  157. package/build/commands/doctor/utils/diagnose-dependencies.js.map +1 -0
  158. package/build/commands/generate-graphql-types/index.d.ts +1 -0
  159. package/build/commands/generate-graphql-types/index.js +43 -27
  160. package/build/commands/generate-graphql-types/index.js.map +1 -1
  161. package/build/commands/info/index.d.ts +3 -0
  162. package/build/commands/info/index.js +42 -0
  163. package/build/commands/info/index.js.map +1 -0
  164. package/build/commands/setup/index.d.ts +2 -0
  165. package/build/commands/setup/index.js +81 -0
  166. package/build/commands/setup/index.js.map +1 -0
  167. package/build/commands/submit/config.d.ts +9 -0
  168. package/build/commands/submit/config.js +18 -0
  169. package/build/commands/submit/config.js.map +1 -0
  170. package/build/commands/submit/errors.d.ts +19 -0
  171. package/build/commands/submit/errors.js +87 -0
  172. package/build/commands/submit/errors.js.map +1 -0
  173. package/build/commands/submit/gcs.d.ts +6 -0
  174. package/build/commands/submit/gcs.js +10 -0
  175. package/build/commands/submit/gcs.js.map +1 -0
  176. package/build/commands/submit/index.d.ts +2 -0
  177. package/build/commands/submit/index.js +25 -0
  178. package/build/commands/submit/index.js.map +1 -0
  179. package/build/commands/submit/submit.d.ts +5 -0
  180. package/build/commands/submit/submit.js +222 -0
  181. package/build/commands/submit/submit.js.map +1 -0
  182. package/build/commands/submit/tasks.d.ts +37 -0
  183. package/build/commands/submit/tasks.js +91 -0
  184. package/build/commands/submit/tasks.js.map +1 -0
  185. package/build/commands/submit/types.d.ts +14 -0
  186. package/build/commands/submit/types.js +2 -0
  187. package/build/commands/submit/types.js.map +1 -0
  188. package/build/commands/submit/utils/assert-core-dependencies-version.d.ts +1 -0
  189. package/build/commands/submit/utils/assert-core-dependencies-version.js +58 -0
  190. package/build/commands/submit/utils/assert-core-dependencies-version.js.map +1 -0
  191. package/build/commands/submit/utils/request-entry-point-params.d.ts +1 -0
  192. package/build/commands/submit/utils/request-entry-point-params.js +41 -0
  193. package/build/commands/submit/utils/request-entry-point-params.js.map +1 -0
  194. package/build/commands/submit/validation.d.ts +1 -0
  195. package/build/commands/submit/validation.js +11 -0
  196. package/build/commands/submit/validation.js.map +1 -0
  197. package/build/commands/upgrade/index.d.ts +13 -0
  198. package/build/commands/upgrade/index.js +53 -0
  199. package/build/commands/upgrade/index.js.map +1 -0
  200. package/build/commands/upgrade/utils/cli.d.ts +1 -0
  201. package/build/commands/upgrade/utils/cli.js +15 -0
  202. package/build/commands/upgrade/utils/cli.js.map +1 -0
  203. package/build/commands/validate-manifest/index.d.ts +3 -0
  204. package/build/commands/validate-manifest/index.js +29 -0
  205. package/build/commands/validate-manifest/index.js.map +1 -0
  206. package/build/data/accept-invitation.d.ts +4 -0
  207. package/build/data/accept-invitation.js +16 -0
  208. package/build/data/accept-invitation.js.map +1 -0
  209. package/build/data/cancel-submission.d.ts +22 -0
  210. package/build/data/cancel-submission.js +26 -0
  211. package/build/data/cancel-submission.js.map +1 -0
  212. package/build/data/create-submission.d.ts +20 -0
  213. package/build/data/create-submission.js +27 -0
  214. package/build/data/create-submission.js.map +1 -0
  215. package/build/data/create-upload.d.ts +21 -0
  216. package/build/data/create-upload.js +40 -0
  217. package/build/data/create-upload.js.map +1 -0
  218. package/build/data/get-submissions.d.ts +27 -0
  219. package/build/data/get-submissions.js +33 -0
  220. package/build/data/get-submissions.js.map +1 -0
  221. package/build/data/gql-client.d.ts +8 -0
  222. package/build/data/gql-client.js +9 -0
  223. package/build/data/gql-client.js.map +1 -0
  224. package/build/data/mini.d.ts +5 -0
  225. package/build/data/mini.js +14 -0
  226. package/build/data/mini.js.map +1 -0
  227. package/build/data/types/autogenerated/shop-minis-admin-api/fragment-masking.d.ts +13 -0
  228. package/build/data/types/autogenerated/shop-minis-admin-api/fragment-masking.js +7 -0
  229. package/build/data/types/autogenerated/shop-minis-admin-api/fragment-masking.js.map +1 -0
  230. package/build/data/types/autogenerated/shop-minis-admin-api/gql.d.ts +75 -0
  231. package/build/data/types/autogenerated/shop-minis-admin-api/gql.js +24 -0
  232. package/build/data/types/autogenerated/shop-minis-admin-api/gql.js.map +1 -0
  233. package/build/data/types/autogenerated/shop-minis-admin-api/graphql.d.ts +1570 -0
  234. package/build/data/types/autogenerated/shop-minis-admin-api/graphql.js +1062 -0
  235. package/build/data/types/autogenerated/shop-minis-admin-api/graphql.js.map +1 -0
  236. package/build/data/types/autogenerated/shop-minis-admin-api/index.d.ts +2 -0
  237. package/build/data/types/autogenerated/shop-minis-admin-api/index.js +3 -0
  238. package/build/data/types/autogenerated/shop-minis-admin-api/index.js.map +1 -0
  239. package/build/dev-panel/asset-manifest.json +6 -9
  240. package/build/dev-panel/index.html +1 -1
  241. package/build/dev-panel/static/css/{main.31436fe3.css → main.7f1ee407.css} +2 -2
  242. package/build/dev-panel/static/css/main.7f1ee407.css.map +1 -0
  243. package/build/dev-panel/static/js/{main.27f47095.js → main.6625699c.js} +3 -3
  244. package/build/dev-panel/static/js/main.6625699c.js.map +1 -0
  245. package/build/index.d.ts +1 -1
  246. package/build/index.js +30 -15
  247. package/build/index.js.map +1 -1
  248. package/build/schemas/manifest.schema.json +198 -0
  249. package/build/utils/archive.d.ts +30 -0
  250. package/build/utils/archive.js +38 -0
  251. package/build/utils/archive.js.map +1 -0
  252. package/build/utils/common-tasks.d.ts +1 -0
  253. package/build/utils/common-tasks.js +49 -0
  254. package/build/utils/common-tasks.js.map +1 -0
  255. package/build/utils/development-params.d.ts +13 -0
  256. package/build/utils/development-params.js +42 -0
  257. package/build/utils/development-params.js.map +1 -0
  258. package/build/{commands/utils → utils}/exec-async-child-process.d.ts +1 -1
  259. package/build/{commands/utils → utils}/exec-async-child-process.js +6 -13
  260. package/build/utils/exec-async-child-process.js.map +1 -0
  261. package/build/utils/file.d.ts +1 -0
  262. package/build/utils/file.js +7 -0
  263. package/build/utils/file.js.map +1 -0
  264. package/build/utils/minis-manifest.d.ts +6 -0
  265. package/build/utils/minis-manifest.js +56 -0
  266. package/build/utils/minis-manifest.js.map +1 -0
  267. package/build/utils/package-manager.d.ts +38 -0
  268. package/build/utils/package-manager.js +98 -0
  269. package/build/utils/package-manager.js.map +1 -0
  270. package/build/utils/patch-package.d.ts +5 -0
  271. package/build/utils/patch-package.js +76 -0
  272. package/build/utils/patch-package.js.map +1 -0
  273. package/build/utils/replace-strings-in-template.d.ts +1 -0
  274. package/build/utils/replace-strings-in-template.js +15 -0
  275. package/build/utils/replace-strings-in-template.js.map +1 -0
  276. package/build/utils/semver.d.ts +1 -0
  277. package/build/utils/semver.js +19 -0
  278. package/build/utils/semver.js.map +1 -0
  279. package/build/{commands/utils → utils}/wrap-with-loading-indicator.d.ts +1 -1
  280. package/build/utils/wrap-with-loading-indicator.js +16 -0
  281. package/build/utils/wrap-with-loading-indicator.js.map +1 -0
  282. package/package.json +35 -28
  283. package/scripts/graphql-codegen.ts +23 -0
  284. package/scripts/test-template.ts +63 -0
  285. package/shipit.alpha.yml +3 -0
  286. package/templates/__template_blank/src/index.tsx +5 -4
  287. package/templates/__template_blank/src/types.ts +1 -1
  288. package/templates/__template_common/.eslintrc.js +16 -0
  289. package/templates/__template_common/assets.d.ts +14 -0
  290. package/templates/__template_common/babel.config.js +3 -17
  291. package/templates/__template_common/gitignore +2 -0
  292. package/templates/__template_common/index.tsx +3 -6
  293. package/templates/__template_common/metro.config.js +4 -30
  294. package/templates/__template_common/package.json +17 -47
  295. package/templates/__template_common/src/manifest.json +1 -27
  296. package/templates/__template_hello_world/src/components/ComponentLink.ts +31 -19
  297. package/templates/__template_hello_world/src/components/ComponentListItem.tsx +1 -0
  298. package/templates/__template_hello_world/src/components/FeaturedComponents.tsx +4 -2
  299. package/templates/__template_hello_world/src/components/quiz/ImageCarouselSlide.tsx +54 -0
  300. package/templates/__template_hello_world/src/components/quiz/MultipleChoiceSlide.tsx +77 -0
  301. package/templates/__template_hello_world/src/components/quiz/QuizProvider.tsx +64 -0
  302. package/templates/__template_hello_world/src/components/quiz/QuizSlide.tsx +79 -0
  303. package/templates/__template_hello_world/src/components/quiz/QuizSlideCommander.tsx +35 -0
  304. package/templates/__template_hello_world/src/components/quiz/TextFieldSlide.tsx +84 -0
  305. package/templates/__template_hello_world/src/components/quiz/TextSlide.tsx +6 -0
  306. package/templates/__template_hello_world/src/components/quiz/types.ts +72 -0
  307. package/templates/__template_hello_world/src/data/Test.graphql.d.ts +69 -76
  308. package/templates/__template_hello_world/src/data/TestProducts.graphql +30 -0
  309. package/templates/__template_hello_world/src/data/TestProducts.graphql.d.ts +159 -81
  310. package/templates/__template_hello_world/src/fixtures/mocked-products-with-variants.ts +274 -0
  311. package/templates/__template_hello_world/src/hooks/useQuizData.ts +26 -0
  312. package/templates/__template_hello_world/src/hooks/useQuizState.ts +27 -0
  313. package/templates/__template_hello_world/src/index.tsx +6 -5
  314. package/templates/__template_hello_world/src/routes.tsx +46 -22
  315. package/templates/__template_hello_world/src/screens/AccordionScreen.tsx +73 -0
  316. package/templates/__template_hello_world/src/screens/BottomSheetScreen.tsx +6 -5
  317. package/templates/__template_hello_world/src/screens/HomeScreen.tsx +14 -3
  318. package/templates/__template_hello_world/src/screens/{ImageCarouselScreen.tsx → ImageMultipleChoiceScreen.tsx} +4 -6
  319. package/templates/__template_hello_world/src/screens/InputScreen.tsx +13 -70
  320. package/templates/__template_hello_world/src/screens/QuizResultScreen.tsx +82 -0
  321. package/templates/__template_hello_world/src/screens/QuizScreen.tsx +40 -0
  322. package/templates/__template_hello_world/src/screens/QuizSlideScreen.tsx +150 -0
  323. package/templates/__template_hello_world/src/screens/ShopActionsScreen.tsx +48 -0
  324. package/templates/__template_hello_world/src/screens/VariantPickerScreen.tsx +120 -0
  325. package/templates/__template_hello_world/src/types.ts +27 -24
  326. package/templates/__template_hello_world/src/utils/mockQuizData.ts +330 -0
  327. package/templates/__template_hello_world/src/utils/quizUtils.ts +75 -0
  328. package/templates/__template_snowboardz/src/components/SkillLevelIcon.tsx +1 -4
  329. package/templates/__template_snowboardz/src/components/SkillLevelPicker.tsx +7 -1
  330. package/templates/__template_snowboardz/src/data/TestProducts.graphql +1 -1
  331. package/templates/__template_snowboardz/src/data/TestProducts.graphql.d.ts +84 -74
  332. package/templates/__template_snowboardz/src/index.tsx +6 -5
  333. package/templates/__template_snowboardz/src/routes.tsx +2 -2
  334. package/templates/__template_snowboardz/src/types.ts +3 -3
  335. package/build/commands/check/index.d.ts +0 -5
  336. package/build/commands/check/index.js +0 -77
  337. package/build/commands/check/index.js.map +0 -1
  338. package/build/commands/check/utils/versions.d.ts +0 -1
  339. package/build/commands/check/utils/versions.js +0 -14
  340. package/build/commands/check/utils/versions.js.map +0 -1
  341. package/build/commands/dev/utils/binaries.test.d.ts +0 -1
  342. package/build/commands/dev/utils/binaries.test.js +0 -275
  343. package/build/commands/dev/utils/binaries.test.js.map +0 -1
  344. package/build/commands/dev/utils/minis-manifest.d.ts +0 -1
  345. package/build/commands/dev/utils/minis-manifest.js +0 -24
  346. package/build/commands/dev/utils/minis-manifest.js.map +0 -1
  347. package/build/commands/utils/exec-async-child-process.js.map +0 -1
  348. package/build/commands/utils/wrap-with-loading-indicator.js +0 -23
  349. package/build/commands/utils/wrap-with-loading-indicator.js.map +0 -1
  350. package/build/dev-panel/middleware.d.ts +0 -4
  351. package/build/dev-panel/middleware.js +0 -11
  352. package/build/dev-panel/middleware.js.map +0 -1
  353. package/build/dev-panel/static/css/main.31436fe3.css.map +0 -1
  354. package/build/dev-panel/static/js/main.27f47095.js.map +0 -1
  355. package/build/dev-panel/static/media/bottomsheet.fe525b8722f6d504a185.png +0 -0
  356. package/build/dev-panel/static/media/navigation.597434370a97c328a970.png +0 -0
  357. package/build/dev-panel/static/media/stories.a425b6972a5338fabdad.png +0 -0
  358. package/templates/__template_blank/src/custom.d.ts +0 -4
  359. package/templates/__template_common/.eslintrc.json +0 -132
  360. package/templates/__template_common/patches/react-native+0.68.5.patch +0 -173
  361. package/templates/__template_hello_world/src/utils/getFlagEmoji.spec.tsx +0 -19
  362. /package/build/dev-panel/static/js/{main.27f47095.js.LICENSE.txt → main.6625699c.js.LICENSE.txt} +0 -0
@@ -0,0 +1,330 @@
1
+ import {ImageCarouselSlideProps} from '../components/quiz/ImageCarouselSlide'
2
+ import {MultipleChoiceSlideProps} from '../components/quiz/MultipleChoiceSlide'
3
+ import {TextFieldSlideProps} from '../components/quiz/TextFieldSlide'
4
+ import {
5
+ QuizAnswerType,
6
+ QuizData,
7
+ SlideInformation,
8
+ TextSlideProps,
9
+ } from '../components/quiz/types'
10
+
11
+ const createChoices = (numberOfChoices: number) => {
12
+ return Array(numberOfChoices)
13
+ .fill(undefined)
14
+ .map((_, index) => ({
15
+ label: `Option ${index + 1}`,
16
+ value: `Value ${index + 1}`,
17
+ }))
18
+ }
19
+
20
+ const textWelcomeSlideProps: TextSlideProps = {
21
+ quizSlideProps: {
22
+ mainText: 'Welcome!',
23
+ subText:
24
+ 'This is a Text Slide which demonstrates some text. Often used as a welcome of thankyou page',
25
+ ctaText: "Let's get started!",
26
+ },
27
+ }
28
+
29
+ const textThankYouSlideProps: TextSlideProps = {
30
+ quizSlideProps: {
31
+ mainText: 'Ready for your results?',
32
+ subText: 'Click below for product recommendations',
33
+ ctaText: 'Show Me Results',
34
+ },
35
+ }
36
+
37
+ const multipleChoiceHairTypeSlideProps: MultipleChoiceSlideProps = {
38
+ quizSlideProps: {
39
+ mainText:
40
+ 'So nice to meet you, {{userName}}. What is your current hair color?',
41
+ ctaText: 'Next Question',
42
+ ctaDisabled: true,
43
+ },
44
+ multipleChoiceProps: {
45
+ choices: [
46
+ {
47
+ label: 'Grey',
48
+ value: 'Grey',
49
+ },
50
+ {
51
+ label: 'Blonde',
52
+ value: 'Blonde',
53
+ },
54
+ {
55
+ label: 'Light/Med Brown',
56
+ value: 'Light/Med Brown',
57
+ },
58
+ {
59
+ label: 'Brunette/Dark Brown',
60
+ value: 'Brunette/Dark Brown',
61
+ },
62
+ {
63
+ label: 'Nearly Black/Jet Black',
64
+ value: 'Nearly Black/Jet Black',
65
+ },
66
+ {
67
+ label: 'Red',
68
+ value: 'Red',
69
+ },
70
+ ],
71
+ onChoiceSelected: () => null,
72
+ selectedIndexes: [],
73
+ },
74
+ determineCtaDisabled: (answer: QuizAnswerType) =>
75
+ (answer as [number]).length < 1,
76
+ }
77
+
78
+ const multipleChoiceYesNoSlideProps: MultipleChoiceSlideProps = {
79
+ quizSlideProps: {
80
+ mainText: 'Are you Canadian?',
81
+ ctaText: 'Next Question',
82
+ ctaDisabled: true,
83
+ },
84
+ multipleChoiceProps: {
85
+ choices: [
86
+ {
87
+ label: 'Yes',
88
+ value: 'Yes',
89
+ },
90
+ {
91
+ label: 'No',
92
+ value: 'No',
93
+ },
94
+ ],
95
+ onChoiceSelected: () => null,
96
+ selectedIndexes: [],
97
+ },
98
+ determineNextSlide: answer => {
99
+ return answer[0] === 0 ? 'canada' : 'choose-age'
100
+ },
101
+ determineCtaDisabled: (answer: QuizAnswerType) =>
102
+ (answer as [number]).length < 1,
103
+ }
104
+
105
+ const textCanadianSlideProps: TextSlideProps = {
106
+ quizSlideProps: {
107
+ mainText: 'You are Canadian!',
108
+ ctaText: 'Ja, eh',
109
+ },
110
+ }
111
+
112
+ const ageChoices = [
113
+ {
114
+ label: '<18',
115
+ value: '<18',
116
+ },
117
+ {
118
+ label: '19-25',
119
+ value: '19-25',
120
+ },
121
+ {
122
+ label: '26-35',
123
+ value: '26-35',
124
+ },
125
+ {
126
+ label: '36+',
127
+ value: '36+',
128
+ },
129
+ ]
130
+
131
+ const textFieldPhoneSlideProps: TextFieldSlideProps = {
132
+ quizSlideProps: {
133
+ mainText: 'Can we get your phone number, please?',
134
+ ctaDisabled: true,
135
+ },
136
+ textFieldProps: {
137
+ placeholder: 'gemme dem digits',
138
+ },
139
+ determineCtaDisabled: (answer: QuizAnswerType) =>
140
+ (answer as string).length < 1,
141
+ }
142
+
143
+ const textFieldSlideProps: TextFieldSlideProps = {
144
+ quizSlideProps: {
145
+ mainText: 'Well that was rude of us...we never got your name.',
146
+ ctaDisabled: true,
147
+ },
148
+ textFieldProps: {
149
+ placeholder: 'Enter your name',
150
+ },
151
+ determineCtaDisabled: (answer: QuizAnswerType) =>
152
+ (answer as string).length < 1,
153
+ }
154
+
155
+ const textFieldMutliLineSlideProps: TextFieldSlideProps = {
156
+ quizSlideProps: {
157
+ mainText: 'Leave your comments!',
158
+ subText: 'Are there some other products you would like to see?',
159
+ ctaText: 'Submit',
160
+ ctaDisabled: true,
161
+ },
162
+ textFieldProps: {
163
+ multiline: true,
164
+ numberOfLines: 4,
165
+ helper: 'Must be at least 10 characters',
166
+ placeholder: 'It would be great if you Would....',
167
+ },
168
+ determineCtaDisabled: (answer: QuizAnswerType) =>
169
+ (answer as string).length < 10,
170
+ }
171
+
172
+ const multipleChoiceSingleSelctionShortSlideProps: MultipleChoiceSlideProps = {
173
+ quizSlideProps: {
174
+ mainText: 'How old are you?',
175
+ ctaText: 'Next Question',
176
+ ctaDisabled: true,
177
+ },
178
+ multipleChoiceProps: {
179
+ choices: ageChoices,
180
+ onChoiceSelected: () => null,
181
+ selectedIndexes: [],
182
+ },
183
+ determineNextSlide: answer => `age-${ageChoices[answer[0]].value}`,
184
+ determineCtaDisabled: (answer: QuizAnswerType) =>
185
+ (answer as [number]).length < 1,
186
+ }
187
+
188
+ const multipleChoiceMustAcceptSlideProps: MultipleChoiceSlideProps = {
189
+ quizSlideProps: {
190
+ mainText: 'Do You Agree To Share Your Information?',
191
+ subText: 'We will only use it to generate recommendations',
192
+ ctaText: 'On to the questions!',
193
+ ctaDisabled: true,
194
+ },
195
+ multipleChoiceProps: {
196
+ choices: [
197
+ {label: 'No I do not', value: 'no'},
198
+ {label: 'Yes I consent', value: 'yes'},
199
+ ],
200
+ onChoiceSelected: () => null,
201
+ selectedIndexes: [],
202
+ },
203
+ determineCtaDisabled: (answer: QuizAnswerType) =>
204
+ (answer as [number])[0] !== 1,
205
+ }
206
+
207
+ const generateAgeTextSlide = (age: string): SlideInformation => ({
208
+ id: `age-${age}`,
209
+ type: 'TextSlide',
210
+ props: {
211
+ quizSlideProps: {
212
+ mainText: `Screen just for being ${age}`,
213
+ subText: `The quiz jumped to this screen because you chose ${age} on the last slide`,
214
+ },
215
+ nextSlideId: 'lots-of-options',
216
+ },
217
+ })
218
+
219
+ const multipleChoiceSingleSelctionLongSlideProps: MultipleChoiceSlideProps = {
220
+ quizSlideProps: {
221
+ isTallSlide: true,
222
+ mainText: 'What are your favorite numbers under 30',
223
+ subText: 'Choose at least 3 numbers',
224
+ },
225
+ multipleChoiceProps: {
226
+ choices: createChoices(30),
227
+ onChoiceSelected: () => null,
228
+ selectedIndexes: [],
229
+ },
230
+ isMultiSelect: true,
231
+ determineCtaDisabled: (answer: QuizAnswerType) =>
232
+ (answer as [number]).length < 3,
233
+ }
234
+
235
+ // This ensures that random images are selected each time the app is generated
236
+ const LOREM_PIXUM_OFFSET = Math.ceil(Math.random() * 100)
237
+ const multipleChoiceImageSingleSelctionProps: ImageCarouselSlideProps = {
238
+ quizSlideProps: {
239
+ mainText: 'Select an Image that you like',
240
+ },
241
+ imageCarouselProps: {
242
+ choices: createChoices(30).map((choice, i) => ({
243
+ ...choice,
244
+ imageUrl: `https://picsum.photos/id/${LOREM_PIXUM_OFFSET + i}/160`,
245
+ })),
246
+ onChoiceSelected: () => null,
247
+ selectedIndexes: [],
248
+ imageSize: 160,
249
+ },
250
+ determineCtaDisabled: (answer: QuizAnswerType) =>
251
+ (answer as [number]).length < 1,
252
+ }
253
+
254
+ export const mockQuizData: QuizData = {
255
+ slides: [
256
+ {
257
+ id: 'welcome',
258
+ type: 'TextSlide',
259
+ props: textWelcomeSlideProps,
260
+ },
261
+ {
262
+ id: 'consent',
263
+ type: 'MultipleChoiceSlide',
264
+ props: multipleChoiceMustAcceptSlideProps,
265
+ },
266
+ {
267
+ id: 'enter-phone',
268
+ type: 'TextFieldSlide',
269
+ props: textFieldPhoneSlideProps,
270
+ },
271
+ {
272
+ id: 'enter-name',
273
+ type: 'TextFieldSlide',
274
+ props: textFieldSlideProps,
275
+ },
276
+ {
277
+ id: 'hair-type-personalized',
278
+ type: 'MultipleChoiceSlide',
279
+ props: multipleChoiceHairTypeSlideProps,
280
+ },
281
+ {
282
+ id: 'choose-canada',
283
+ type: 'MultipleChoiceSlide',
284
+ props: multipleChoiceYesNoSlideProps,
285
+ },
286
+
287
+ {
288
+ id: 'missing-products',
289
+ type: 'TextFieldSlide',
290
+ props: textFieldMutliLineSlideProps,
291
+ },
292
+ {
293
+ id: 'choose-canada',
294
+ type: 'MultipleChoiceSlide',
295
+ props: multipleChoiceYesNoSlideProps,
296
+ },
297
+ {
298
+ id: 'canada',
299
+ type: 'TextSlide',
300
+ props: textCanadianSlideProps,
301
+ },
302
+ {
303
+ id: 'choose-age',
304
+ type: 'MultipleChoiceSlide',
305
+ props: multipleChoiceSingleSelctionShortSlideProps,
306
+ },
307
+ generateAgeTextSlide('<18'),
308
+ generateAgeTextSlide('19-25'),
309
+ generateAgeTextSlide('26-35'),
310
+ generateAgeTextSlide('36+'),
311
+ {
312
+ id: 'lots-of-options',
313
+ type: 'MultipleChoiceSlide',
314
+ props: multipleChoiceSingleSelctionLongSlideProps,
315
+ },
316
+ {
317
+ id: 'pick an image',
318
+ type: 'ImageCarouselSlide',
319
+ props: multipleChoiceImageSingleSelctionProps,
320
+ },
321
+ {
322
+ id: 'thank-you',
323
+ type: 'TextSlide',
324
+ props: {
325
+ ...textThankYouSlideProps,
326
+ nextSlideId: 'results',
327
+ },
328
+ },
329
+ ],
330
+ }
@@ -0,0 +1,75 @@
1
+ import {ImageCarouselSlideProps} from '../components/quiz/ImageCarouselSlide'
2
+ import {MultipleChoiceSlideProps} from '../components/quiz/MultipleChoiceSlide'
3
+ import {QuizData} from '../components/quiz/types'
4
+
5
+ export const getQuizSlideDataByIndex = (
6
+ quizData: QuizData,
7
+ slideIndex: number
8
+ ) => quizData.slides[slideIndex] ?? undefined
9
+
10
+ export const getQuizSlideDataById = (quizData: QuizData, id: string) =>
11
+ quizData.slides.find(slide => slide.id === id)
12
+
13
+ export const getQuizSlideIndexById = (quizData: QuizData, id: string) =>
14
+ quizData.slides.findIndex(slide => slide.id === id)
15
+
16
+ export const getQuestionById = (quizData: QuizData, questionId: string) => {
17
+ const slideWithQuestion = quizData.slides.find(
18
+ slide => slide.id === questionId
19
+ )
20
+ if (!slideWithQuestion) {
21
+ console.error('slide not founod')
22
+ return `text question not found for slide with id ${questionId}`
23
+ }
24
+
25
+ return slideWithQuestion.props.quizSlideProps.mainText
26
+ }
27
+
28
+ export const getMultilpleChoiceAnswerLabels = (
29
+ quizData: QuizData,
30
+ questionId: string,
31
+ selectedIndexes: number[]
32
+ ) => {
33
+ const multipleChoiceSlide = quizData.slides.find(
34
+ slide => slide.id === questionId
35
+ )
36
+ if (
37
+ !multipleChoiceSlide ||
38
+ multipleChoiceSlide.type !== 'MultipleChoiceSlide'
39
+ ) {
40
+ console.error('only works for multiple choice slides')
41
+ return []
42
+ }
43
+
44
+ const answers = (
45
+ multipleChoiceSlide.props as MultipleChoiceSlideProps
46
+ ).multipleChoiceProps.choices.map(({label}) => label)
47
+
48
+ return answers.filter((_, index) => selectedIndexes.includes(index))
49
+ }
50
+
51
+ export const getImageCarouselAnswerUrls = (
52
+ quizData: QuizData,
53
+ questionId: string,
54
+ selectedIndexes: number[]
55
+ ) => {
56
+ const imageCarouselSlide = quizData.slides.find(
57
+ slide => slide.id === questionId
58
+ )
59
+ if (!imageCarouselSlide || imageCarouselSlide.type !== 'ImageCarouselSlide') {
60
+ console.error('only works for ImageCarouselSlide')
61
+ return []
62
+ }
63
+
64
+ const imageAnswers = (
65
+ imageCarouselSlide.props as ImageCarouselSlideProps
66
+ ).imageCarouselProps.choices.map(({imageUrl}) => imageUrl)
67
+
68
+ return imageAnswers.filter((_, index) => selectedIndexes.includes(index))
69
+ }
70
+
71
+ export const addNameToText = (text: string, name?: string) => {
72
+ const regex = new RegExp('{{userName}}', 'g')
73
+
74
+ return text.replace(regex, name ? name : 'Anonymous')
75
+ }
@@ -10,7 +10,7 @@ interface LevelIconProps {
10
10
  level: SkillLevel
11
11
  }
12
12
  export const SkillLevelIcon = ({level}: LevelIconProps) => {
13
- let Icon
13
+ let Icon: typeof BeginnerIcon
14
14
 
15
15
  switch (level) {
16
16
  case 'Beginner':
@@ -22,9 +22,6 @@ export const SkillLevelIcon = ({level}: LevelIconProps) => {
22
22
  case 'Advanced':
23
23
  Icon = AdvancedIcon
24
24
  break
25
- default:
26
- Icon = null
27
- break
28
25
  }
29
26
 
30
27
  return (
@@ -63,10 +63,16 @@ export const SkillLevelPicker = ({
63
63
  handleSelectedSkillLevel,
64
64
  selectedSkillLevel,
65
65
  }: SkillLevelPickerProps) => {
66
+ const theme = useTheme()
67
+
66
68
  return (
67
69
  <>
68
70
  <Text marginBottom="xs">Select skill level</Text>
69
- <ScrollView horizontal showsHorizontalScrollIndicator={false}>
71
+ <ScrollView
72
+ horizontal
73
+ showsHorizontalScrollIndicator={false}
74
+ style={{paddingHorizontal: -theme.spacing.s, overflow: 'visible'}}
75
+ >
70
76
  <SkillLevelButton
71
77
  selected={!selectedSkillLevel}
72
78
  text="All"
@@ -1,4 +1,4 @@
1
- query __MINI_APP_HANDLE_PASCAL_CASE__TestProducts($shopId: ID!, $productIds: [ID!]!) {
1
+ query __MINI_APP_NAME_PASCAL_CASE__TestProducts($shopId: ID!, $productIds: [ID!]!) {
2
2
  shop(id: $shopId) {
3
3
  id
4
4
  name
@@ -1,108 +1,118 @@
1
- import { DocumentNode } from "graphql-typed";
2
- import { URL, Decimal, CurrencyCode } from "../node_modules/@shopify/shop-minis-platform-sdk/src/api/types";
3
- export namespace __MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryPartialData {
1
+ import {DocumentNode} from 'graphql-typed'
2
+ import {
3
+ URL,
4
+ Decimal,
5
+ CurrencyCode,
6
+ } from '../node_modules/@shopify/shop-minis-platform-sdk/src/api/types'
7
+ export namespace __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryPartialData {
4
8
  export interface ShopProductsByIdsFeaturedImage {
5
- __typename?: "Image" | null;
6
- id?: string | null;
7
- altText?: string | null;
8
- url?: URL | null;
9
+ __typename?: 'Image' | null
10
+ id?: string | null
11
+ altText?: string | null
12
+ url?: URL | null
9
13
  }
10
14
  export interface ShopProductsByIdsDefaultVariantCompareAtPrice {
11
- __typename?: "Money" | null;
12
- amount?: Decimal | null;
13
- currencyCode?: CurrencyCode | null;
15
+ __typename?: 'Money' | null
16
+ amount?: Decimal | null
17
+ currencyCode?: CurrencyCode | null
14
18
  }
15
19
  export interface ShopProductsByIdsDefaultVariantPrice {
16
- __typename?: "Money" | null;
17
- amount?: Decimal | null;
18
- currencyCode?: CurrencyCode | null;
20
+ __typename?: 'Money' | null
21
+ amount?: Decimal | null
22
+ currencyCode?: CurrencyCode | null
19
23
  }
20
24
  export interface ShopProductsByIdsDefaultVariantImage {
21
- __typename?: "Image" | null;
22
- id?: string | null;
23
- altText?: string | null;
24
- url?: URL | null;
25
+ __typename?: 'Image' | null
26
+ id?: string | null
27
+ altText?: string | null
28
+ url?: URL | null
25
29
  }
26
30
  export interface ShopProductsByIdsDefaultVariant {
27
- __typename?: "ProductVariant" | null;
28
- id?: string | null;
29
- title?: string | null;
30
- isFavorited?: boolean | null;
31
- compareAtPrice?: __MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryPartialData.ShopProductsByIdsDefaultVariantCompareAtPrice | null;
32
- price?: __MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryPartialData.ShopProductsByIdsDefaultVariantPrice | null;
33
- image?: __MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryPartialData.ShopProductsByIdsDefaultVariantImage | null;
31
+ __typename?: 'ProductVariant' | null
32
+ id?: string | null
33
+ title?: string | null
34
+ isFavorited?: boolean | null
35
+ compareAtPrice?: __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryPartialData.ShopProductsByIdsDefaultVariantCompareAtPrice | null
36
+ price?: __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryPartialData.ShopProductsByIdsDefaultVariantPrice | null
37
+ image?: __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryPartialData.ShopProductsByIdsDefaultVariantImage | null
34
38
  }
35
39
  export interface ShopProductsByIds {
36
- __typename?: "Product" | null;
37
- id?: string | null;
38
- title?: string | null;
39
- tags?: (string | null)[] | null;
40
- featuredImage?: __MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryPartialData.ShopProductsByIdsFeaturedImage | null;
41
- defaultVariant?: __MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryPartialData.ShopProductsByIdsDefaultVariant | null;
40
+ __typename?: 'Product' | null
41
+ id?: string | null
42
+ title?: string | null
43
+ tags?: (string | null)[] | null
44
+ featuredImage?: __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryPartialData.ShopProductsByIdsFeaturedImage | null
45
+ defaultVariant?: __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryPartialData.ShopProductsByIdsDefaultVariant | null
42
46
  }
43
47
  export interface Shop {
44
- __typename?: "Shop" | null;
45
- id?: string | null;
46
- name?: string | null;
47
- productsByIds?: (__MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryPartialData.ShopProductsByIds | null)[] | null;
48
+ __typename?: 'Shop' | null
49
+ id?: string | null
50
+ name?: string | null
51
+ productsByIds?:
52
+ | (__MINI_APP_NAME_PASCAL_CASE__TestProductsQueryPartialData.ShopProductsByIds | null)[]
53
+ | null
48
54
  }
49
55
  }
50
- export interface __MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryPartialData {
51
- shop?: __MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryPartialData.Shop | null;
56
+ export interface __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryPartialData {
57
+ shop?: __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryPartialData.Shop | null
52
58
  }
53
- export namespace __MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryData {
59
+ export namespace __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryData {
54
60
  export interface Variables {
55
- shopId: string;
56
- productIds: string[];
61
+ shopId: string
62
+ productIds: string[]
57
63
  }
58
64
  export interface ShopProductsByIdsFeaturedImage {
59
- __typename: "Image";
60
- id?: string | null;
61
- altText?: string | null;
62
- url: URL;
65
+ __typename: 'Image'
66
+ id?: string | null
67
+ altText?: string | null
68
+ url: URL
63
69
  }
64
70
  export interface ShopProductsByIdsDefaultVariantCompareAtPrice {
65
- __typename: "Money";
66
- amount: Decimal;
67
- currencyCode: CurrencyCode;
71
+ __typename: 'Money'
72
+ amount: Decimal
73
+ currencyCode: CurrencyCode
68
74
  }
69
75
  export interface ShopProductsByIdsDefaultVariantPrice {
70
- __typename: "Money";
71
- amount: Decimal;
72
- currencyCode: CurrencyCode;
76
+ __typename: 'Money'
77
+ amount: Decimal
78
+ currencyCode: CurrencyCode
73
79
  }
74
80
  export interface ShopProductsByIdsDefaultVariantImage {
75
- __typename: "Image";
76
- id?: string | null;
77
- altText?: string | null;
78
- url: URL;
81
+ __typename: 'Image'
82
+ id?: string | null
83
+ altText?: string | null
84
+ url: URL
79
85
  }
80
86
  export interface ShopProductsByIdsDefaultVariant {
81
- __typename: "ProductVariant";
82
- id: string;
83
- title: string;
84
- isFavorited: boolean;
85
- compareAtPrice?: __MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryData.ShopProductsByIdsDefaultVariantCompareAtPrice | null;
86
- price: __MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryData.ShopProductsByIdsDefaultVariantPrice;
87
- image?: __MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryData.ShopProductsByIdsDefaultVariantImage | null;
87
+ __typename: 'ProductVariant'
88
+ id: string
89
+ title: string
90
+ isFavorited: boolean
91
+ compareAtPrice?: __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryData.ShopProductsByIdsDefaultVariantCompareAtPrice | null
92
+ price: __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryData.ShopProductsByIdsDefaultVariantPrice
93
+ image?: __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryData.ShopProductsByIdsDefaultVariantImage | null
88
94
  }
89
95
  export interface ShopProductsByIds {
90
- __typename: "Product";
91
- id: string;
92
- title: string;
93
- tags: string[];
94
- featuredImage?: __MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryData.ShopProductsByIdsFeaturedImage | null;
95
- defaultVariant: __MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryData.ShopProductsByIdsDefaultVariant;
96
+ __typename: 'Product'
97
+ id: string
98
+ title: string
99
+ tags: string[]
100
+ featuredImage?: __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryData.ShopProductsByIdsFeaturedImage | null
101
+ defaultVariant: __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryData.ShopProductsByIdsDefaultVariant
96
102
  }
97
103
  export interface Shop {
98
- __typename: "Shop";
99
- id: string;
100
- name: string;
101
- productsByIds: (__MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryData.ShopProductsByIds | null)[];
104
+ __typename: 'Shop'
105
+ id: string
106
+ name: string
107
+ productsByIds: (__MINI_APP_NAME_PASCAL_CASE__TestProductsQueryData.ShopProductsByIds | null)[]
102
108
  }
103
109
  }
104
- export interface __MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryData {
105
- shop?: __MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryData.Shop | null;
110
+ export interface __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryData {
111
+ shop?: __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryData.Shop | null
106
112
  }
107
- declare const document: DocumentNode<__MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryData, __MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryData.Variables, __MINI_APP_HANDLE_PASCAL_CASE__TestProductsQueryPartialData>;
108
- export default document;
113
+ declare const document: DocumentNode<
114
+ __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryData,
115
+ __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryData.Variables,
116
+ __MINI_APP_NAME_PASCAL_CASE__TestProductsQueryPartialData
117
+ >
118
+ export default document
@@ -1,9 +1,10 @@
1
- import {theme as defaultTheme, Theme} from '@shopify/shop-minis-platform-sdk'
1
+ import {MiniAppConfig} from '@shopify/shop-minis-platform-sdk'
2
2
 
3
- import {__MINI_APP_HANDLE_PASCAL_CASE__Navigator} from './routes'
3
+ import {__MINI_APP_NAME_PASCAL_CASE__Navigator} from './routes'
4
4
 
5
- export const theme: Theme = {
6
- ...defaultTheme,
5
+ const config: MiniAppConfig = {
6
+ name: '__MINI_APP_NAME__',
7
+ Root: __MINI_APP_NAME_PASCAL_CASE__Navigator,
7
8
  }
8
9
 
9
- export default __MINI_APP_HANDLE_PASCAL_CASE__Navigator
10
+ export default config
@@ -4,11 +4,11 @@ import {HomeScreen} from './screens/HomeScreen'
4
4
 
5
5
  const Stack = createNativeStackNavigator()
6
6
 
7
- export const __MINI_APP_HANDLE_PASCAL_CASE__Navigator = () => {
7
+ export const __MINI_APP_NAME_PASCAL_CASE__Navigator = () => {
8
8
  return (
9
9
  <Stack.Navigator>
10
10
  <Stack.Screen
11
- name="__MINI_APP_HANDLE_PASCAL_CASE__.Home"
11
+ name="__MINI_APP_NAME_PASCAL_CASE__.Home"
12
12
  component={HomeScreen}
13
13
  options={{title: 'Home', headerShown: false}}
14
14
  />