@shopify/shop-minis-cli 0.0.0-snapshot.20240712123821
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +78 -0
- package/LICENSE +21 -0
- package/README.md +8 -0
- package/README_INTERNAL.md +115 -0
- package/build/commands/cancel-submission/cancel-submission.d.ts +1 -0
- package/build/commands/cancel-submission/cancel-submission.js +57 -0
- package/build/commands/cancel-submission/cancel-submission.js.map +1 -0
- package/build/commands/cancel-submission/index.d.ts +2 -0
- package/build/commands/cancel-submission/index.js +18 -0
- package/build/commands/cancel-submission/index.js.map +1 -0
- package/build/commands/cancel-submission/types.d.ts +3 -0
- package/build/commands/cancel-submission/types.js +2 -0
- package/build/commands/cancel-submission/types.js.map +1 -0
- package/build/commands/check-submission/index.d.ts +2 -0
- package/build/commands/check-submission/index.js +55 -0
- package/build/commands/check-submission/index.js.map +1 -0
- package/build/commands/check-submission/types.d.ts +3 -0
- package/build/commands/check-submission/types.js +2 -0
- package/build/commands/check-submission/types.js.map +1 -0
- package/build/commands/codemod/index.d.ts +3 -0
- package/build/commands/codemod/index.js +47 -0
- package/build/commands/codemod/index.js.map +1 -0
- package/build/commands/codemod/releases/index.d.ts +7 -0
- package/build/commands/codemod/releases/index.js +89 -0
- package/build/commands/codemod/releases/index.js.map +1 -0
- package/build/commands/codemod/releases/types.d.ts +9 -0
- package/build/commands/codemod/releases/types.js +2 -0
- package/build/commands/codemod/releases/types.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-100.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-100.js +50 -0
- package/build/commands/codemod/releases/v0-0-100.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-103.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-103.js +43 -0
- package/build/commands/codemod/releases/v0-0-103.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-105.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-105.js +59 -0
- package/build/commands/codemod/releases/v0-0-105.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-106.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-106.js +32 -0
- package/build/commands/codemod/releases/v0-0-106.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-114.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-114.js +48 -0
- package/build/commands/codemod/releases/v0-0-114.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-115.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-115.js +50 -0
- package/build/commands/codemod/releases/v0-0-115.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-121.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-121.js +74 -0
- package/build/commands/codemod/releases/v0-0-121.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-42/index.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-42/index.js +46 -0
- package/build/commands/codemod/releases/v0-0-42/index.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-42/reset-files.d.ts +7 -0
- package/build/commands/codemod/releases/v0-0-42/reset-files.js +83 -0
- package/build/commands/codemod/releases/v0-0-42/reset-files.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-43.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-43.js +32 -0
- package/build/commands/codemod/releases/v0-0-43.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-44.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-44.js +214 -0
- package/build/commands/codemod/releases/v0-0-44.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-45.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-45.js +23 -0
- package/build/commands/codemod/releases/v0-0-45.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-50.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-50.js +34 -0
- package/build/commands/codemod/releases/v0-0-50.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-54.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-54.js +70 -0
- package/build/commands/codemod/releases/v0-0-54.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-56.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-56.js +48 -0
- package/build/commands/codemod/releases/v0-0-56.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-57.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-57.js +41 -0
- package/build/commands/codemod/releases/v0-0-57.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-58.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-58.js +68 -0
- package/build/commands/codemod/releases/v0-0-58.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-61.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-61.js +30 -0
- package/build/commands/codemod/releases/v0-0-61.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-63.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-63.js +42 -0
- package/build/commands/codemod/releases/v0-0-63.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-64.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-64.js +47 -0
- package/build/commands/codemod/releases/v0-0-64.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-75.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-75.js +30 -0
- package/build/commands/codemod/releases/v0-0-75.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-76.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-76.js +32 -0
- package/build/commands/codemod/releases/v0-0-76.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-77.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-77.js +39 -0
- package/build/commands/codemod/releases/v0-0-77.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-79.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-79.js +35 -0
- package/build/commands/codemod/releases/v0-0-79.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-84.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-84.js +41 -0
- package/build/commands/codemod/releases/v0-0-84.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-85.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-85.js +60 -0
- package/build/commands/codemod/releases/v0-0-85.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-89.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-89.js +60 -0
- package/build/commands/codemod/releases/v0-0-89.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-91/index.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-91/index.js +38 -0
- package/build/commands/codemod/releases/v0-0-91/index.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-91/replace-dev-wrapper.d.ts +5 -0
- package/build/commands/codemod/releases/v0-0-91/replace-dev-wrapper.js +45 -0
- package/build/commands/codemod/releases/v0-0-91/replace-dev-wrapper.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-91/replace-safe-area-imports.d.ts +1 -0
- package/build/commands/codemod/releases/v0-0-91/replace-safe-area-imports.js +97 -0
- package/build/commands/codemod/releases/v0-0-91/replace-safe-area-imports.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-92.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-92.js +38 -0
- package/build/commands/codemod/releases/v0-0-92.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-93/blank/App-after.d.ts +1 -0
- package/build/commands/codemod/releases/v0-0-93/blank/App-after.js +15 -0
- package/build/commands/codemod/releases/v0-0-93/blank/App-after.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-93/blank/App-before.d.ts +1 -0
- package/build/commands/codemod/releases/v0-0-93/blank/App-before.js +13 -0
- package/build/commands/codemod/releases/v0-0-93/blank/App-before.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-93/index.d.ts +6 -0
- package/build/commands/codemod/releases/v0-0-93/index.js +7 -0
- package/build/commands/codemod/releases/v0-0-93/index.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-93/shoppable-posts/App-after.d.ts +1 -0
- package/build/commands/codemod/releases/v0-0-93/shoppable-posts/App-after.js +53 -0
- package/build/commands/codemod/releases/v0-0-93/shoppable-posts/App-after.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-93/shoppable-posts/App-before.d.ts +1 -0
- package/build/commands/codemod/releases/v0-0-93/shoppable-posts/App-before.js +43 -0
- package/build/commands/codemod/releases/v0-0-93/shoppable-posts/App-before.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-93/shoppable-videos/App-after.d.ts +1 -0
- package/build/commands/codemod/releases/v0-0-93/shoppable-videos/App-after.js +49 -0
- package/build/commands/codemod/releases/v0-0-93/shoppable-videos/App-after.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-93/shoppable-videos/App-before.d.ts +1 -0
- package/build/commands/codemod/releases/v0-0-93/shoppable-videos/App-before.js +42 -0
- package/build/commands/codemod/releases/v0-0-93/shoppable-videos/App-before.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-93.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-93.js +48 -0
- package/build/commands/codemod/releases/v0-0-93.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-97/index.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-97/index.js +20 -0
- package/build/commands/codemod/releases/v0-0-97/index.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-97/migrate-to-new-theme.d.ts +1 -0
- package/build/commands/codemod/releases/v0-0-97/migrate-to-new-theme.js +47 -0
- package/build/commands/codemod/releases/v0-0-97/migrate-to-new-theme.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-97/remove-theme-from-config.d.ts +1 -0
- package/build/commands/codemod/releases/v0-0-97/remove-theme-from-config.js +105 -0
- package/build/commands/codemod/releases/v0-0-97/remove-theme-from-config.js.map +1 -0
- package/build/commands/config.d.ts +14 -0
- package/build/commands/config.js +42 -0
- package/build/commands/config.js.map +1 -0
- package/build/commands/create-extension/constants.d.ts +24 -0
- package/build/commands/create-extension/constants.js +68 -0
- package/build/commands/create-extension/constants.js.map +1 -0
- package/build/commands/create-extension/index.d.ts +2 -0
- package/build/commands/create-extension/index.js +122 -0
- package/build/commands/create-extension/index.js.map +1 -0
- package/build/commands/create-extension/types.d.ts +11 -0
- package/build/commands/create-extension/types.js +7 -0
- package/build/commands/create-extension/types.js.map +1 -0
- package/build/commands/create-extension/utils/add-target-to-config.d.ts +2 -0
- package/build/commands/create-extension/utils/add-target-to-config.js +56 -0
- package/build/commands/create-extension/utils/add-target-to-config.js.map +1 -0
- package/build/commands/create-extension/utils/create-from-template.d.ts +3 -0
- package/build/commands/create-extension/utils/create-from-template.js +46 -0
- package/build/commands/create-extension/utils/create-from-template.js.map +1 -0
- package/build/commands/create-mini/index.d.ts +2 -0
- package/build/commands/create-mini/index.js +137 -0
- package/build/commands/create-mini/index.js.map +1 -0
- package/build/commands/create-mini/utils/template-app.d.ts +1 -0
- package/build/commands/create-mini/utils/template-app.js +47 -0
- package/build/commands/create-mini/utils/template-app.js.map +1 -0
- package/build/commands/dev/index.d.ts +12 -0
- package/build/commands/dev/index.js +75 -0
- package/build/commands/dev/index.js.map +1 -0
- package/build/commands/dev/utils/android.d.ts +18 -0
- package/build/commands/dev/utils/android.js +153 -0
- package/build/commands/dev/utils/android.js.map +1 -0
- package/build/commands/dev/utils/binaries.d.ts +5 -0
- package/build/commands/dev/utils/binaries.js +17 -0
- package/build/commands/dev/utils/binaries.js.map +1 -0
- package/build/commands/dev/utils/build-type.d.ts +2 -0
- package/build/commands/dev/utils/build-type.js +14 -0
- package/build/commands/dev/utils/build-type.js.map +1 -0
- package/build/commands/dev/utils/deeplink.d.ts +14 -0
- package/build/commands/dev/utils/deeplink.js +58 -0
- package/build/commands/dev/utils/deeplink.js.map +1 -0
- package/build/commands/dev/utils/interactive-terminal.d.ts +25 -0
- package/build/commands/dev/utils/interactive-terminal.js +210 -0
- package/build/commands/dev/utils/interactive-terminal.js.map +1 -0
- package/build/commands/dev/utils/metro/metro-config.d.ts +2 -0
- package/build/commands/dev/utils/metro/metro-config.js +27 -0
- package/build/commands/dev/utils/metro/metro-config.js.map +1 -0
- package/build/commands/dev/utils/metro/metro-minis-module-resolver.d.ts +6 -0
- package/build/commands/dev/utils/metro/metro-minis-module-resolver.js +11 -0
- package/build/commands/dev/utils/metro/metro-minis-module-resolver.js.map +1 -0
- package/build/commands/dev/utils/metro/metro-reporter.d.ts +13 -0
- package/build/commands/dev/utils/metro/metro-reporter.js +27 -0
- package/build/commands/dev/utils/metro/metro-reporter.js.map +1 -0
- package/build/commands/dev/utils/metro/metro-server-middleware.d.ts +10 -0
- package/build/commands/dev/utils/metro/metro-server-middleware.js +74 -0
- package/build/commands/dev/utils/metro/metro-server-middleware.js.map +1 -0
- package/build/commands/dev/utils/metro/metro-server.d.ts +6 -0
- package/build/commands/dev/utils/metro/metro-server.js +26 -0
- package/build/commands/dev/utils/metro/metro-server.js.map +1 -0
- package/build/commands/dev/utils/network.d.ts +20 -0
- package/build/commands/dev/utils/network.js +129 -0
- package/build/commands/dev/utils/network.js.map +1 -0
- package/build/commands/dev/utils/platform.d.ts +18 -0
- package/build/commands/dev/utils/platform.js +41 -0
- package/build/commands/dev/utils/platform.js.map +1 -0
- package/build/commands/dev/utils/prompt-binary-upgrade.d.ts +1 -0
- package/build/commands/dev/utils/prompt-binary-upgrade.js +12 -0
- package/build/commands/dev/utils/prompt-binary-upgrade.js.map +1 -0
- package/build/commands/dev/utils/qr-code.d.ts +1 -0
- package/build/commands/dev/utils/qr-code.js +5 -0
- package/build/commands/dev/utils/qr-code.js.map +1 -0
- package/build/commands/dev/utils/react-native-version.d.ts +4 -0
- package/build/commands/dev/utils/react-native-version.js +23 -0
- package/build/commands/dev/utils/react-native-version.js.map +1 -0
- package/build/commands/dev/utils/simulator.d.ts +22 -0
- package/build/commands/dev/utils/simulator.js +95 -0
- package/build/commands/dev/utils/simulator.js.map +1 -0
- package/build/commands/dev/utils/start-app/config.d.ts +5 -0
- package/build/commands/dev/utils/start-app/config.js +25 -0
- package/build/commands/dev/utils/start-app/config.js.map +1 -0
- package/build/commands/dev/utils/start-app/start-app-with-options.d.ts +2 -0
- package/build/commands/dev/utils/start-app/start-app-with-options.js +94 -0
- package/build/commands/dev/utils/start-app/start-app-with-options.js.map +1 -0
- package/build/commands/dev/utils/start-app/start-app.d.ts +2 -0
- package/build/commands/dev/utils/start-app/start-app.js +10 -0
- package/build/commands/dev/utils/start-app/start-app.js.map +1 -0
- package/build/commands/dev/utils/start-app/types.d.ts +20 -0
- package/build/commands/dev/utils/start-app/types.js +2 -0
- package/build/commands/dev/utils/start-app/types.js.map +1 -0
- package/build/commands/dev/utils/types.d.ts +24 -0
- package/build/commands/dev/utils/types.js +7 -0
- package/build/commands/dev/utils/types.js.map +1 -0
- package/build/commands/dev/utils/version.d.ts +64 -0
- package/build/commands/dev/utils/version.js +101 -0
- package/build/commands/dev/utils/version.js.map +1 -0
- package/build/commands/dev/utils/with-retries.d.ts +4 -0
- package/build/commands/dev/utils/with-retries.js +24 -0
- package/build/commands/dev/utils/with-retries.js.map +1 -0
- package/build/commands/doctor/index.d.ts +6 -0
- package/build/commands/doctor/index.js +21 -0
- package/build/commands/doctor/index.js.map +1 -0
- package/build/commands/doctor/utils/diagnose-dependencies.d.ts +7 -0
- package/build/commands/doctor/utils/diagnose-dependencies.js +113 -0
- package/build/commands/doctor/utils/diagnose-dependencies.js.map +1 -0
- package/build/commands/features/index.d.ts +6 -0
- package/build/commands/features/index.js +135 -0
- package/build/commands/features/index.js.map +1 -0
- package/build/commands/generate-graphql-types/index.d.ts +6 -0
- package/build/commands/generate-graphql-types/index.js +33 -0
- package/build/commands/generate-graphql-types/index.js.map +1 -0
- package/build/commands/generate-graphql-types/utils/generate-graphql-types.d.ts +2 -0
- package/build/commands/generate-graphql-types/utils/generate-graphql-types.js +101 -0
- package/build/commands/generate-graphql-types/utils/generate-graphql-types.js.map +1 -0
- package/build/commands/info/index.d.ts +3 -0
- package/build/commands/info/index.js +42 -0
- package/build/commands/info/index.js.map +1 -0
- package/build/commands/setup/index.d.ts +2 -0
- package/build/commands/setup/index.js +82 -0
- package/build/commands/setup/index.js.map +1 -0
- package/build/commands/submit/config.d.ts +9 -0
- package/build/commands/submit/config.js +18 -0
- package/build/commands/submit/config.js.map +1 -0
- package/build/commands/submit/errors.d.ts +19 -0
- package/build/commands/submit/errors.js +87 -0
- package/build/commands/submit/errors.js.map +1 -0
- package/build/commands/submit/gcs.d.ts +6 -0
- package/build/commands/submit/gcs.js +21 -0
- package/build/commands/submit/gcs.js.map +1 -0
- package/build/commands/submit/index.d.ts +2 -0
- package/build/commands/submit/index.js +25 -0
- package/build/commands/submit/index.js.map +1 -0
- package/build/commands/submit/submit.d.ts +5 -0
- package/build/commands/submit/submit.js +225 -0
- package/build/commands/submit/submit.js.map +1 -0
- package/build/commands/submit/tasks.d.ts +37 -0
- package/build/commands/submit/tasks.js +91 -0
- package/build/commands/submit/tasks.js.map +1 -0
- package/build/commands/submit/types.d.ts +14 -0
- package/build/commands/submit/types.js +2 -0
- package/build/commands/submit/types.js.map +1 -0
- package/build/commands/submit/utils/assert-core-dependencies-version.d.ts +1 -0
- package/build/commands/submit/utils/assert-core-dependencies-version.js +58 -0
- package/build/commands/submit/utils/assert-core-dependencies-version.js.map +1 -0
- package/build/commands/submit/utils/request-entry-point-params.d.ts +1 -0
- package/build/commands/submit/utils/request-entry-point-params.js +41 -0
- package/build/commands/submit/utils/request-entry-point-params.js.map +1 -0
- package/build/commands/submit/validation.d.ts +1 -0
- package/build/commands/submit/validation.js +11 -0
- package/build/commands/submit/validation.js.map +1 -0
- package/build/commands/upgrade/index.d.ts +13 -0
- package/build/commands/upgrade/index.js +65 -0
- package/build/commands/upgrade/index.js.map +1 -0
- package/build/commands/upgrade/utils/clear-metro-cache.d.ts +1 -0
- package/build/commands/upgrade/utils/clear-metro-cache.js +12 -0
- package/build/commands/upgrade/utils/clear-metro-cache.js.map +1 -0
- package/build/commands/upgrade/utils/cli.d.ts +1 -0
- package/build/commands/upgrade/utils/cli.js +15 -0
- package/build/commands/upgrade/utils/cli.js.map +1 -0
- package/build/commands/validate-manifest/index.d.ts +3 -0
- package/build/commands/validate-manifest/index.js +29 -0
- package/build/commands/validate-manifest/index.js.map +1 -0
- package/build/constants/extensions.d.ts +26 -0
- package/build/constants/extensions.js +31 -0
- package/build/constants/extensions.js.map +1 -0
- package/build/data/accept-invitation.d.ts +4 -0
- package/build/data/accept-invitation.js +16 -0
- package/build/data/accept-invitation.js.map +1 -0
- package/build/data/cancel-submission.d.ts +22 -0
- package/build/data/cancel-submission.js +26 -0
- package/build/data/cancel-submission.js.map +1 -0
- package/build/data/create-submission.d.ts +20 -0
- package/build/data/create-submission.js +27 -0
- package/build/data/create-submission.js.map +1 -0
- package/build/data/create-upload.d.ts +21 -0
- package/build/data/create-upload.js +40 -0
- package/build/data/create-upload.js.map +1 -0
- package/build/data/get-submissions.d.ts +27 -0
- package/build/data/get-submissions.js +33 -0
- package/build/data/get-submissions.js.map +1 -0
- package/build/data/gql-client.d.ts +8 -0
- package/build/data/gql-client.js +9 -0
- package/build/data/gql-client.js.map +1 -0
- package/build/data/mini.d.ts +5 -0
- package/build/data/mini.js +14 -0
- package/build/data/mini.js.map +1 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/fragment-masking.d.ts +13 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/fragment-masking.js +7 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/fragment-masking.js.map +1 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/gql.d.ts +75 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/gql.js +24 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/gql.js.map +1 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/graphql.d.ts +1745 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/graphql.js +1072 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/graphql.js.map +1 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/index.d.ts +2 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/index.js +3 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/index.js.map +1 -0
- package/build/dev-panel/asset-manifest.json +13 -0
- package/build/dev-panel/checkmark.svg +3 -0
- package/build/dev-panel/chevron.svg +3 -0
- package/build/dev-panel/copy.svg +4 -0
- package/build/dev-panel/get-started.svg +3 -0
- package/build/dev-panel/how-to.svg +3 -0
- package/build/dev-panel/index.html +1 -0
- package/build/dev-panel/references.svg +3 -0
- package/build/dev-panel/robots.txt +3 -0
- package/build/dev-panel/static/css/main.7f1ee407.css +2 -0
- package/build/dev-panel/static/css/main.7f1ee407.css.map +1 -0
- package/build/dev-panel/static/js/main.6625699c.js +3 -0
- package/build/dev-panel/static/js/main.6625699c.js.LICENSE.txt +41 -0
- package/build/dev-panel/static/js/main.6625699c.js.map +1 -0
- package/build/dev-panel/topics.svg +3 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +47 -0
- package/build/index.js.map +1 -0
- package/build/schemas/manifest.schema.json +214 -0
- package/build/templates-index.d.ts +6 -0
- package/build/templates-index.js +19 -0
- package/build/templates-index.js.map +1 -0
- package/build/utils/archive.d.ts +30 -0
- package/build/utils/archive.js +38 -0
- package/build/utils/archive.js.map +1 -0
- package/build/utils/codemod.d.ts +86 -0
- package/build/utils/codemod.js +161 -0
- package/build/utils/codemod.js.map +1 -0
- package/build/utils/common-tasks.d.ts +1 -0
- package/build/utils/common-tasks.js +49 -0
- package/build/utils/common-tasks.js.map +1 -0
- package/build/utils/development-params.d.ts +13 -0
- package/build/utils/development-params.js +44 -0
- package/build/utils/development-params.js.map +1 -0
- package/build/utils/exec-async-child-process.d.ts +18 -0
- package/build/utils/exec-async-child-process.js +41 -0
- package/build/utils/exec-async-child-process.js.map +1 -0
- package/build/utils/extensions.d.ts +13 -0
- package/build/utils/extensions.js +87 -0
- package/build/utils/extensions.js.map +1 -0
- package/build/utils/file.d.ts +1 -0
- package/build/utils/file.js +7 -0
- package/build/utils/file.js.map +1 -0
- package/build/utils/minis-manifest.d.ts +8 -0
- package/build/utils/minis-manifest.js +67 -0
- package/build/utils/minis-manifest.js.map +1 -0
- package/build/utils/package-manager.d.ts +42 -0
- package/build/utils/package-manager.js +107 -0
- package/build/utils/package-manager.js.map +1 -0
- package/build/utils/patch-package.d.ts +5 -0
- package/build/utils/patch-package.js +76 -0
- package/build/utils/patch-package.js.map +1 -0
- package/build/utils/path.d.ts +1 -0
- package/build/utils/path.js +8 -0
- package/build/utils/path.js.map +1 -0
- package/build/utils/replace-strings-in-template.d.ts +1 -0
- package/build/utils/replace-strings-in-template.js +15 -0
- package/build/utils/replace-strings-in-template.js.map +1 -0
- package/build/utils/semver.d.ts +1 -0
- package/build/utils/semver.js +19 -0
- package/build/utils/semver.js.map +1 -0
- package/build/utils/wrap-with-loading-indicator.d.ts +9 -0
- package/build/utils/wrap-with-loading-indicator.js +16 -0
- package/build/utils/wrap-with-loading-indicator.js.map +1 -0
- package/package.json +102 -0
- package/scripts/graphql-codegen.ts +23 -0
- package/scripts/test-template.ts +66 -0
- package/shipit.snapshot.yml +9 -0
- package/templates/__template_blank/src/App.tsx +24 -0
- package/templates/__template_blank/src/index.tsx +9 -0
- package/templates/__template_common/.eslintignore +1 -0
- package/templates/__template_common/.eslintrc.js +3 -0
- package/templates/__template_common/.graphqlrc.js +1 -0
- package/templates/__template_common/.prettierrc.json +8 -0
- package/templates/__template_common/assets.d.ts +14 -0
- package/templates/__template_common/babel.config.js +5 -0
- package/templates/__template_common/gitignore +5 -0
- package/templates/__template_common/index.tsx +7 -0
- package/templates/__template_common/metro.config.js +5 -0
- package/templates/__template_common/package.json +38 -0
- package/templates/__template_common/src/manifest.json +6 -0
- package/templates/__template_common/tsconfig.json +41 -0
- package/templates/__template_shoppable_posts/src/App.tsx +37 -0
- package/templates/__template_shoppable_posts/src/index.tsx +9 -0
- package/templates/__template_shoppable_videos/src/App.tsx +34 -0
- package/templates/__template_shoppable_videos/src/index.tsx +9 -0
- package/templates/extensions/components/__template_blank/render.tsx +11 -0
- package/templates/extensions/components/__template_bundle-collection/render.tsx +31 -0
- package/templates/extensions/components/__template_bundle-collection/seed.ts +26 -0
- package/templates/extensions/components/__template_bundle-selector/render.tsx +51 -0
- package/templates/extensions/components/__template_bundle-selector/seed.ts +72 -0
- package/templates/extensions/components/__template_default-card/render.tsx +24 -0
- package/templates/extensions/components/__template_default-card/seed.ts +10 -0
- package/templates/extensions/components/__template_image-collection/render.tsx +17 -0
- package/templates/extensions/components/__template_image-collection/seed.ts +70 -0
- package/templates/extensions/components/__template_link/render.tsx +17 -0
- package/templates/extensions/components/__template_link/seed.ts +5 -0
- package/templates/extensions/components/__template_product-offer-card/render.tsx +17 -0
- package/templates/extensions/components/__template_product-offer-card/seed.ts +44 -0
- package/templates/extensions/components/__template_video-collection/render.tsx +17 -0
- package/templates/extensions/components/__template_video-collection/seed.ts +37 -0
- package/templates/extensions/queries/__template_product-page/input.graphql +6 -0
- package/templates/extensions/queries/__template_product-page/input.graphql.d.ts +26 -0
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
extends: [
|
|
4
|
+
'@react-native-community',
|
|
5
|
+
'plugin:@shopify/typescript',
|
|
6
|
+
'plugin:@shopify/prettier',
|
|
7
|
+
],
|
|
8
|
+
parserOptions: {
|
|
9
|
+
ecmaVersion: 6,
|
|
10
|
+
project: './tsconfig.json',
|
|
11
|
+
},
|
|
12
|
+
rules: {
|
|
13
|
+
'@babel/no-unused-expressions': 0,
|
|
14
|
+
'@typescript-eslint/no-unused-expressions': [
|
|
15
|
+
'error',
|
|
16
|
+
{
|
|
17
|
+
allowShortCircuit: true,
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
'line-comment-position': 0,
|
|
21
|
+
'no-implicit-coercion': 2,
|
|
22
|
+
'consistent-return': 0,
|
|
23
|
+
'no-console': 0,
|
|
24
|
+
'spaced-comment': 0,
|
|
25
|
+
'no-warning-comments': 'off',
|
|
26
|
+
'no-process-env': 'off',
|
|
27
|
+
'lines-around-comment': 'off',
|
|
28
|
+
'@shopify/typescript/prefer-pascal-case-enums': 'off',
|
|
29
|
+
'@typescript-eslint/naming-convention': 'off',
|
|
30
|
+
'@typescript-eslint/ban-ts-comment': 'off',
|
|
31
|
+
'@typescript-eslint/consistent-indexed-object-style': 'off',
|
|
32
|
+
'@typescript-eslint/member-ordering': 'off',
|
|
33
|
+
'import/no-named-as-default': 'off',
|
|
34
|
+
'import/named': 'off',
|
|
35
|
+
'id-blacklist': [2, 'blacklist', 'whitelist'],
|
|
36
|
+
'@typescript-eslint/camelcase': 'off',
|
|
37
|
+
'@typescript-eslint/ban-ts-ignore': 'off',
|
|
38
|
+
'@typescript-eslint/ban-types': 'off',
|
|
39
|
+
'@typescript-eslint/class-name-casing': 'off',
|
|
40
|
+
'@typescript-eslint/array-type': 'off',
|
|
41
|
+
'@typescript-eslint/no-namespace': 'off',
|
|
42
|
+
'@typescript-eslint/no-unused-vars': [
|
|
43
|
+
'error',
|
|
44
|
+
{
|
|
45
|
+
argsIgnorePattern: '^_',
|
|
46
|
+
varsIgnorePattern: '^_.{1,}',
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
'@typescript-eslint/no-shadow': 'error',
|
|
50
|
+
'no-shadow': 'off',
|
|
51
|
+
'max-len': [
|
|
52
|
+
'error',
|
|
53
|
+
{
|
|
54
|
+
code: 200,
|
|
55
|
+
ignoreUrls: true,
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
|
|
59
|
+
// Type files generated by codegen have eslint disabled with a comment
|
|
60
|
+
'eslint-comments/no-unlimited-disable': 'off',
|
|
61
|
+
},
|
|
62
|
+
overrides: [
|
|
63
|
+
{
|
|
64
|
+
files: ['*.ts'],
|
|
65
|
+
rules: {
|
|
66
|
+
'@typescript-eslint/no-non-null-assertion': 0,
|
|
67
|
+
'shopify/typescript/prefer-pascal-case-enums': 0,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
files: ['*.spec.*', '*.test.*'],
|
|
72
|
+
rules: {
|
|
73
|
+
'require-await': 2,
|
|
74
|
+
'@typescript-eslint/no-floating-promises': 2,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Shopify Inc
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Shop Minis CLI
|
|
2
|
+
|
|
3
|
+
A CLI tool to create, run and publish Shop Minis.
|
|
4
|
+
|
|
5
|
+
## Getting started
|
|
6
|
+
|
|
7
|
+
Use this CLI tool to create a new Shop Mini by running `npm init @shopify/shop-mini` or `yarn create @shopify/shop-mini`.
|
|
8
|
+
Follow the instructions in the console to run your mini.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Shop minis CLI
|
|
2
|
+
|
|
3
|
+
The CLI tool to create, run and publish minis.
|
|
4
|
+
|
|
5
|
+
## Getting started
|
|
6
|
+
|
|
7
|
+
_If you want to read on how to use the CLI, jump to [using the cli](#using-the-cli) section_
|
|
8
|
+
|
|
9
|
+
### Set up
|
|
10
|
+
|
|
11
|
+
1. Clone the repository with `dev clone shop-minis-cli`
|
|
12
|
+
2. Install dependencies: `yarn`
|
|
13
|
+
|
|
14
|
+
### Development
|
|
15
|
+
|
|
16
|
+
When working with templates or the create mini command, you can easily test your local changes by creating a new mini running `yarn build:cli && yarn shop-minis create`.
|
|
17
|
+
|
|
18
|
+
However, testing changes on the dev command gets more complicated because newly created minis get the CLI as a dependency from npm instead of using our local version with the changes we want to test. Follow instructions below to link a mini to your local CLI:
|
|
19
|
+
|
|
20
|
+
1. In the CLI folder, run `yarn link`.
|
|
21
|
+
2. In your mini (create a new mini if you don't have a mini already), run `yarn link @shopify/shop-minis-cli`
|
|
22
|
+
3. Whenever you change something in the CLI, run `yarn build`.
|
|
23
|
+
4. Rerun `yarn start` in the mini, the command should reflect the latest changes you did in the CLI project.
|
|
24
|
+
|
|
25
|
+
#### Installing dependencies
|
|
26
|
+
|
|
27
|
+
Use `yarn`, don't create or commit an npm `package-lock.json`. `yarn.lock` is the source of truth.
|
|
28
|
+
|
|
29
|
+
### Testing changes with alpha releases
|
|
30
|
+
|
|
31
|
+
`yarn link` helps us a lot when testing changes to CLI locally, but there are edge cases where symbolic links interfere with the functionality we are actually trying to test.
|
|
32
|
+
|
|
33
|
+
In those cases, you can create an alpha release:
|
|
34
|
+
|
|
35
|
+
1. checkout the alpha branch: `git checkout -b alpha origin/alpha`
|
|
36
|
+
2. the branch might be old and stale, so reset it to the latest main: `git reset --hard origin/main`
|
|
37
|
+
3. bring your changes to this branch via `git merge`, `git rebase`, `git cherry-pick` or whatever method you prefer
|
|
38
|
+
4. create a commit and a tag with `yarn version --prerelease --preid alpha`
|
|
39
|
+
5. push the branch and the tag: `git push origin alpha --tags`
|
|
40
|
+
6. run the shipit deployment in [https://shipit.shopify.io/shopify/shop-minis-cli/alpha](https://shipit.shopify.io/shopify/shop-minis-cli/alpha)
|
|
41
|
+
7. install the alpha version in the mini you want to use to test the new changes of the CLI
|
|
42
|
+
8. test it!
|
|
43
|
+
9. if more changes are needed, include them in the alpha branch, increase the alpha version (i.e. `0.0.77-alpha.1`) and keep deploying.
|
|
44
|
+
|
|
45
|
+
Alpha versions are released to npm with the tag `next`, so they won't be installed by partners unless they explicitly use the tag (`npm install @shopify/shop-minis-cli@next`)
|
|
46
|
+
|
|
47
|
+
## Using the CLI
|
|
48
|
+
|
|
49
|
+
To use the CLI create a new mini: `yarn create @shopify/shop-mini`
|
|
50
|
+
|
|
51
|
+
Then use `yarn shop-minis --help` to get instructions on how to use the CLI.
|
|
52
|
+
|
|
53
|
+
## Creating a new release
|
|
54
|
+
|
|
55
|
+
1. Check out and pull the latest `main` branch.
|
|
56
|
+
2. Run `yarn version --patch`.
|
|
57
|
+
3. Push both the version bump commit and the tag `git push origin main --follow-tags`
|
|
58
|
+
4. In [shipit](https://shipit.shopify.io/shopify/shop-minis-cli/production), find the commit corresponding to the new release and deploy it.
|
|
59
|
+
5. After the deploy succeeds, the new version should be published in the [npm public registry](https://www.npmjs.com/package/@shopify/shop-minis-cli) and ready to be used.
|
|
60
|
+
|
|
61
|
+
## Sharing snapshot builds with partners
|
|
62
|
+
|
|
63
|
+
If you need to share a snapshot build with a partner, follow these steps.
|
|
64
|
+
|
|
65
|
+
1. Follow [these docs](https://shop.docs.shopify.io/docs/shop-client/tophatting#manually-triggering-snapshot-builds) to manually create the snapshot build from the branch you want to share with the partner (use `main` as the branch if the change you want to share is already merged)
|
|
66
|
+
2. When the snapshot build is ready, take note of the version and build number. (In shipit, snapshot builds are usually named `<version>-snapshot.<build number>`, example: `2.45.0-snapshot.1645678813`)
|
|
67
|
+
3. Instruct the partner to run the mini, adding `--snapshot-version <version>+<build number>` to the start command. Example: `yarn start --snapshot-version 2.108.1+1685260045` or `npm start -- --snapshot-version 2.108.1+1685260045`
|
|
68
|
+
|
|
69
|
+
Using this argument should download a new Shop binary in the partner's device. Note that android and iOS snapshots will have different build numbers, so check with the partner which platform they want to use.
|
|
70
|
+
|
|
71
|
+
## Codemods
|
|
72
|
+
|
|
73
|
+
If some changes in the SDK or CLI require changes to the way we run minis you might need a codemod for the next version.
|
|
74
|
+
|
|
75
|
+
Imagine `shop-minis-cli` is currently on `v0.0.74`. You will be creating the codemod for `v0.0.75`
|
|
76
|
+
|
|
77
|
+
- Before making any changes checkout `v0.0.74`, run a cli build and create a mini.
|
|
78
|
+
- Optional: Set up git for the mini and make an initial commit. This will allow you to reset the state later.
|
|
79
|
+
- Create `src/commands/codemod/releases/v0-0-75.ts`. Copying the previous codemod will ensure you get the right format
|
|
80
|
+
- Add your codemod to `src/commands/codemod/releases/index.ts`
|
|
81
|
+
- [Run the cli and link your mini](#development)
|
|
82
|
+
- Make your changes
|
|
83
|
+
- Run `yarn shop-minis codemod --from-version 0.0.74 --to-version 0.0.75 --no-hard-reset-dependencies --verbose` to test your changes
|
|
84
|
+
- Use the git diff to decide if your codemod worked as expected. Also verify your test mini still runs as expected.
|
|
85
|
+
- Use git reset, make changes and re-run the codemod until it works as expected
|
|
86
|
+
- When everything works as expected send a PR with the changes.
|
|
87
|
+
- Ensure this PR gets merged before `v0.0.75` is tagged/released. If someone tags/releases `v0.0.75` before your change lands you will need to rename your codemod to be the next version. This is because once cli users have upgraded to `v0.0.75` this codemod will never be run if it is merged and included in a later release
|
|
88
|
+
|
|
89
|
+
### Codemod testing
|
|
90
|
+
|
|
91
|
+
You can add unit tests for each codemod if required. Each codemod will also be validated by CI. The CI tests work as follows:
|
|
92
|
+
|
|
93
|
+
- Mini A is created with the latest CLI
|
|
94
|
+
- Mini B is created with CLI v0.0.42 (The first version supported by codemods)
|
|
95
|
+
- Mini B is upgraded by running all the codemods
|
|
96
|
+
- The expectation is that Mini B equals Mini A (old mini + codemods === new mini)
|
|
97
|
+
|
|
98
|
+
See [upgrade_command_integration.yml](.github/workflows/upgrade_command_integration.yml) and [an example run](https://github.com/Shopify/shop-minis-cli/actions/runs/5544190658/jobs/10121293912?pr=306) for details.
|
|
99
|
+
|
|
100
|
+
### Troubleshooting
|
|
101
|
+
|
|
102
|
+
#### Making sure the partner is using the right version
|
|
103
|
+
|
|
104
|
+
To make sure the partner is using the right version, you can ask them to provide a screenshot of the About screen of the app (Profile tab -> Support -> About)
|
|
105
|
+
|
|
106
|
+
The version shown in the screen should match the snapshot version you handled them.
|
|
107
|
+
|
|
108
|
+
#### Making sure the partner build exists
|
|
109
|
+
|
|
110
|
+
All partner builds are uploaded to a bucket in google cloud. If you created a snapshot, there should be a partner build in [this bucket](https://console.cloud.google.com/storage/browser/minis_cli_app_builds;tab=objects?project=arrive-167720&prefix=&forceOnObjectsSortingFiltering=false) matching the version of the snapshot.
|
|
111
|
+
|
|
112
|
+
If you can't find your build, try looking for errors in the pipelines that create these builds:
|
|
113
|
+
|
|
114
|
+
- Pipeline for iOS: https://buildkite.com/shopify/shipit-mobile-shop-ios-minis-partner-build
|
|
115
|
+
- Pipeline for Android: https://buildkite.com/shopify/shipit-mobile-shop-android-minis-partner-build
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cancelSubmission: () => Promise<void>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { renderSuccess, renderInfo, renderConfirmationPrompt, } from '@shopify/cli-kit/node/ui';
|
|
2
|
+
import { AbortError, handler as handleError } from '@shopify/cli-kit/node/error';
|
|
3
|
+
import { getPendingSubmission as graphqlGetPendingSubmission } from '../../data/get-submissions.js';
|
|
4
|
+
import { cancelSubmission as graphqlCancelSubmission } from '../../data/cancel-submission.js';
|
|
5
|
+
import { assertNetworkAndAuth } from '../../utils/common-tasks.js';
|
|
6
|
+
export const cancelSubmission = async () => {
|
|
7
|
+
try {
|
|
8
|
+
await assertNetworkAndAuth();
|
|
9
|
+
const pendingSubmission = await graphqlGetPendingSubmission();
|
|
10
|
+
if (pendingSubmission) {
|
|
11
|
+
const shouldContinue = await renderConfirmationPrompt({
|
|
12
|
+
message: [
|
|
13
|
+
'Are you sure you want to cancel submission',
|
|
14
|
+
{ bold: pendingSubmission.reference },
|
|
15
|
+
`created ${pendingSubmission.submittedAt}?`,
|
|
16
|
+
],
|
|
17
|
+
});
|
|
18
|
+
if (!shouldContinue)
|
|
19
|
+
return;
|
|
20
|
+
const { submission: cancelledSubmission } = await graphqlCancelSubmission({
|
|
21
|
+
reference: pendingSubmission.reference,
|
|
22
|
+
});
|
|
23
|
+
if (cancelledSubmission) {
|
|
24
|
+
renderSuccess({
|
|
25
|
+
headline: 'Submission cancelled',
|
|
26
|
+
body: [
|
|
27
|
+
'Your submission with reference',
|
|
28
|
+
{
|
|
29
|
+
bold: cancelledSubmission.reference,
|
|
30
|
+
},
|
|
31
|
+
'was cancelled.',
|
|
32
|
+
],
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
throw new AbortError('Failed to cancel submission.', 'Try again and if the issue continues, contact us.', [
|
|
37
|
+
'Try to run `cancel-submission` again',
|
|
38
|
+
"Contact Shop if you're having issues",
|
|
39
|
+
]);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
renderInfo({
|
|
44
|
+
headline: 'No pending submission',
|
|
45
|
+
body: [
|
|
46
|
+
'If you previously had a pending submission, it may have been reviewed or already cancelled.',
|
|
47
|
+
],
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
// Always output the error first
|
|
53
|
+
handleError(error);
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=cancel-submission.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancel-submission.js","sourceRoot":"","sources":["../../../src/commands/cancel-submission/cancel-submission.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,UAAU,EACV,wBAAwB,GACzB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAC,UAAU,EAAE,OAAO,IAAI,WAAW,EAAC,MAAM,6BAA6B,CAAA;AAE9E,OAAO,EAAC,oBAAoB,IAAI,2BAA2B,EAAC,MAAM,+BAA+B,CAAA;AACjG,OAAO,EAAC,gBAAgB,IAAI,uBAAuB,EAAC,MAAM,iCAAiC,CAAA;AAC3F,OAAO,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAA;AAEhE,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,IAAI,EAAE;IACzC,IAAI;QACF,MAAM,oBAAoB,EAAE,CAAA;QAE5B,MAAM,iBAAiB,GAAG,MAAM,2BAA2B,EAAE,CAAA;QAE7D,IAAI,iBAAiB,EAAE;YACrB,MAAM,cAAc,GAAG,MAAM,wBAAwB,CAAC;gBACpD,OAAO,EAAE;oBACP,4CAA4C;oBAC5C,EAAC,IAAI,EAAE,iBAAiB,CAAC,SAAS,EAAC;oBACnC,WAAW,iBAAiB,CAAC,WAAW,GAAG;iBAC5C;aACF,CAAC,CAAA;YACF,IAAI,CAAC,cAAc;gBAAE,OAAM;YAE3B,MAAM,EAAC,UAAU,EAAE,mBAAmB,EAAC,GAAG,MAAM,uBAAuB,CAAC;gBACtE,SAAS,EAAE,iBAAiB,CAAC,SAAS;aACvC,CAAC,CAAA;YAEF,IAAI,mBAAmB,EAAE;gBACvB,aAAa,CAAC;oBACZ,QAAQ,EAAE,sBAAsB;oBAChC,IAAI,EAAE;wBACJ,gCAAgC;wBAChC;4BACE,IAAI,EAAE,mBAAmB,CAAC,SAAS;yBACpC;wBACD,gBAAgB;qBACjB;iBACF,CAAC,CAAA;aACH;iBAAM;gBACL,MAAM,IAAI,UAAU,CAClB,8BAA8B,EAC9B,mDAAmD,EACnD;oBACE,sCAAsC;oBACtC,sCAAsC;iBACvC,CACF,CAAA;aACF;SACF;aAAM;YACL,UAAU,CAAC;gBACT,QAAQ,EAAE,uBAAuB;gBACjC,IAAI,EAAE;oBACJ,6FAA6F;iBAC9F;aACF,CAAC,CAAA;SACH;KACF;IAAC,OAAO,KAAU,EAAE;QACnB,gCAAgC;QAChC,WAAW,CAAC,KAAK,CAAC,CAAA;QAElB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KAChB;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { outputDebug } from '@shopify/cli-kit/node/output';
|
|
3
|
+
import { getMiniManifest } from '../../utils/minis-manifest.js';
|
|
4
|
+
import { cancelSubmission } from './cancel-submission.js';
|
|
5
|
+
export function loadCommand(parentProgram) {
|
|
6
|
+
const command = new Command()
|
|
7
|
+
.name('cancel-submission')
|
|
8
|
+
.description('cancel a pending submission')
|
|
9
|
+
.option('--verbose', 'print debugging messages') // compatible with cli-kit
|
|
10
|
+
.action(async (args) => {
|
|
11
|
+
const miniHandle = getMiniManifest().handle;
|
|
12
|
+
outputDebug(`Cancel submission args ${JSON.stringify(args)}`);
|
|
13
|
+
outputDebug(`Cancelling submission for mini "${miniHandle}" at ${process.cwd()}`);
|
|
14
|
+
await cancelSubmission();
|
|
15
|
+
});
|
|
16
|
+
parentProgram.addCommand(command);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/cancel-submission/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AACjC,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAA;AAExD,OAAO,EAAC,eAAe,EAAC,MAAM,+BAA+B,CAAA;AAG7D,OAAO,EAAC,gBAAgB,EAAC,MAAM,wBAAwB,CAAA;AAEvD,MAAM,UAAU,WAAW,CAAC,aAAsB;IAChD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE;SAC1B,IAAI,CAAC,mBAAmB,CAAC;SACzB,WAAW,CAAC,6BAA6B,CAAC;SAC1C,MAAM,CAAC,WAAW,EAAE,0BAA0B,CAAC,CAAC,0BAA0B;SAC1E,MAAM,CAAC,KAAK,EAAE,IAAiC,EAAE,EAAE;QAClD,MAAM,UAAU,GAAG,eAAe,EAAE,CAAC,MAAM,CAAA;QAE3C,WAAW,CAAC,0BAA0B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAC7D,WAAW,CACT,mCAAmC,UAAU,QAAQ,OAAO,CAAC,GAAG,EAAE,EAAE,CACrE,CAAA;QAED,MAAM,gBAAgB,EAAE,CAAA;IAC1B,CAAC,CAAC,CAAA;IAEJ,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;AACnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/commands/cancel-submission/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { outputDebug } from '@shopify/cli-kit/node/output';
|
|
3
|
+
import { handler as handleError } from '@shopify/cli-kit/node/error';
|
|
4
|
+
import { renderInfo } from '@shopify/cli-kit/node/ui';
|
|
5
|
+
import { getMiniManifest } from '../../utils/minis-manifest.js';
|
|
6
|
+
import { getSubmissions } from '../../data/get-submissions.js';
|
|
7
|
+
import { assertNetworkAndAuth } from '../../utils/common-tasks.js';
|
|
8
|
+
export function loadCommand(parentProgram) {
|
|
9
|
+
const command = new Command()
|
|
10
|
+
.name('check-submission')
|
|
11
|
+
.description('check submissions')
|
|
12
|
+
.option('--verbose', 'print debugging messages') // compatible with cli-kit
|
|
13
|
+
.action(async (args) => {
|
|
14
|
+
const miniHandle = getMiniManifest().handle;
|
|
15
|
+
outputDebug(`Check submission args ${JSON.stringify(args)}`);
|
|
16
|
+
outputDebug(`Checking submissions for mini "${miniHandle}" at ${process.cwd()}`);
|
|
17
|
+
try {
|
|
18
|
+
await assertNetworkAndAuth();
|
|
19
|
+
const { nodes } = await getSubmissions();
|
|
20
|
+
if (nodes.length === 0) {
|
|
21
|
+
renderInfo({
|
|
22
|
+
headline: 'No submissions found',
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
const latestSubmission = nodes[0];
|
|
27
|
+
const nextSteps = latestSubmission.status === 'REJECTED'
|
|
28
|
+
? [
|
|
29
|
+
'Check the email for more information and feedback on your submission.',
|
|
30
|
+
]
|
|
31
|
+
: [];
|
|
32
|
+
const formattedDate = new Intl.DateTimeFormat(undefined, {
|
|
33
|
+
dateStyle: 'full',
|
|
34
|
+
timeStyle: 'full',
|
|
35
|
+
}).format(new Date(latestSubmission.submittedAt));
|
|
36
|
+
const formattedStatus = latestSubmission.status[0].toLocaleUpperCase() +
|
|
37
|
+
latestSubmission.status.slice(1).toLocaleLowerCase();
|
|
38
|
+
renderInfo({
|
|
39
|
+
headline: `Status: ${formattedStatus}`,
|
|
40
|
+
body: `Description:\n${latestSubmission.description}\n\n` +
|
|
41
|
+
`Reference: ${latestSubmission.reference}\n\n` +
|
|
42
|
+
`Submitted ${formattedDate}`,
|
|
43
|
+
nextSteps,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
// Always output the error first
|
|
49
|
+
handleError(error);
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
parentProgram.addCommand(command);
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/check-submission/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AACjC,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,6BAA6B,CAAA;AAClE,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAA;AAEnD,OAAO,EAAC,eAAe,EAAC,MAAM,+BAA+B,CAAA;AAC7D,OAAO,EAAC,cAAc,EAAC,MAAM,+BAA+B,CAAA;AAC5D,OAAO,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAA;AAIhE,MAAM,UAAU,WAAW,CAAC,aAAsB;IAChD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE;SAC1B,IAAI,CAAC,kBAAkB,CAAC;SACxB,WAAW,CAAC,mBAAmB,CAAC;SAChC,MAAM,CAAC,WAAW,EAAE,0BAA0B,CAAC,CAAC,0BAA0B;SAC1E,MAAM,CAAC,KAAK,EAAE,IAAgC,EAAE,EAAE;QACjD,MAAM,UAAU,GAAG,eAAe,EAAE,CAAC,MAAM,CAAA;QAE3C,WAAW,CAAC,yBAAyB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAC5D,WAAW,CACT,kCAAkC,UAAU,QAAQ,OAAO,CAAC,GAAG,EAAE,EAAE,CACpE,CAAA;QAED,IAAI;YACF,MAAM,oBAAoB,EAAE,CAAA;YAE5B,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,cAAc,EAAE,CAAA;YAEtC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;gBACtB,UAAU,CAAC;oBACT,QAAQ,EAAE,sBAAsB;iBACjC,CAAC,CAAA;aACH;iBAAM;gBACL,MAAM,gBAAgB,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;gBACjC,MAAM,SAAS,GACb,gBAAgB,CAAC,MAAM,KAAK,UAAU;oBACpC,CAAC,CAAC;wBACE,uEAAuE;qBACxE;oBACH,CAAC,CAAC,EAAE,CAAA;gBACR,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE;oBACvD,SAAS,EAAE,MAAM;oBACjB,SAAS,EAAE,MAAM;iBAClB,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAA;gBACjD,MAAM,eAAe,GACnB,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,iBAAiB,EAAE;oBAC9C,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAA;gBAEtD,UAAU,CAAC;oBACT,QAAQ,EAAE,WAAW,eAAe,EAAE;oBACtC,IAAI,EACF,iBAAiB,gBAAgB,CAAC,WAAW,MAAM;wBACnD,cAAc,gBAAgB,CAAC,SAAS,MAAM;wBAC9C,aAAa,aAAa,EAAE;oBAC9B,SAAS;iBACV,CAAC,CAAA;aACH;SACF;QAAC,OAAO,KAAU,EAAE;YACnB,gCAAgC;YAChC,WAAW,CAAC,KAAK,CAAC,CAAA;YAElB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;SAChB;IACH,CAAC,CAAC,CAAA;IAEJ,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;AACnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/commands/check-submission/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { handler as handleError } from '@shopify/cli-kit/node/error';
|
|
3
|
+
import { outputDebug } from '@shopify/cli-kit/node/output';
|
|
4
|
+
import { getMiniManifest } from '../../utils/minis-manifest.js';
|
|
5
|
+
import { hardResetDependencies } from '../../utils/package-manager.js';
|
|
6
|
+
import { wrapWithLoadingIndicator } from '../../utils/wrap-with-loading-indicator.js';
|
|
7
|
+
import { validateUpgradeBetweenVersions } from '../../utils/semver.js';
|
|
8
|
+
import { applyUpgrades as applyReleaseUpgrades } from './releases/index.js';
|
|
9
|
+
export const command = new Command()
|
|
10
|
+
.name('codemod')
|
|
11
|
+
.description('automatically apply required code changes after upgrading the CLI')
|
|
12
|
+
.requiredOption('--from-version <version>', 'codemod will apply code changes starting with this CLI version')
|
|
13
|
+
.requiredOption('--to-version <version>', 'codemod will apply code changes until this CLI version')
|
|
14
|
+
.option('--verbose', 'print debugging messages')
|
|
15
|
+
.option('-y --yes', 'automatically answer prompts with default options')
|
|
16
|
+
.option('--no-hard-reset-dependencies', 'by default this command will recreate dependency lockfiles. use this flag to avoid that')
|
|
17
|
+
.action(async (args) => {
|
|
18
|
+
const miniHandle = getMiniManifest().handle;
|
|
19
|
+
const { toVersion, yes: skipPrompts, fromVersion, hardResetDependencies: shouldHardResetDependencies, } = args;
|
|
20
|
+
if (toVersion === fromVersion) {
|
|
21
|
+
outputDebug(`--from-version and --to-version are the same, no changes will be applied by codemod (versions are ${fromVersion})`);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
try {
|
|
25
|
+
validateUpgradeBetweenVersions(fromVersion, toVersion);
|
|
26
|
+
}
|
|
27
|
+
catch (err) {
|
|
28
|
+
handleError(err);
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
await applyReleaseUpgrades({
|
|
32
|
+
fromVersion,
|
|
33
|
+
toVersion,
|
|
34
|
+
miniHandle,
|
|
35
|
+
options: { skipPrompts },
|
|
36
|
+
});
|
|
37
|
+
if (shouldHardResetDependencies) {
|
|
38
|
+
await wrapWithLoadingIndicator(hardResetDependencies(), {
|
|
39
|
+
loadingMessage: 'Reinstalling dependencies...',
|
|
40
|
+
successMessage: 'Dependencies installed',
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
export async function loadCommand(parentProgram) {
|
|
45
|
+
parentProgram.addCommand(command);
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/codemod/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AACjC,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,6BAA6B,CAAA;AAClE,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAA;AAExD,OAAO,EAAC,eAAe,EAAC,MAAM,+BAA+B,CAAA;AAC7D,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;AACpE,OAAO,EAAC,wBAAwB,EAAC,MAAM,4CAA4C,CAAA;AACnF,OAAO,EAAC,8BAA8B,EAAC,MAAM,uBAAuB,CAAA;AAEpE,OAAO,EAAC,aAAa,IAAI,oBAAoB,EAAC,MAAM,qBAAqB,CAAA;AAUzE,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE;KACjC,IAAI,CAAC,SAAS,CAAC;KACf,WAAW,CACV,mEAAmE,CACpE;KACA,cAAc,CACb,0BAA0B,EAC1B,gEAAgE,CACjE;KACA,cAAc,CACb,wBAAwB,EACxB,wDAAwD,CACzD;KACA,MAAM,CAAC,WAAW,EAAE,0BAA0B,CAAC;KAC/C,MAAM,CAAC,UAAU,EAAE,mDAAmD,CAAC;KACvE,MAAM,CACL,8BAA8B,EAC9B,yFAAyF,CAC1F;KACA,MAAM,CAAC,KAAK,EAAE,IAAwB,EAAE,EAAE;IACzC,MAAM,UAAU,GAAG,eAAe,EAAE,CAAC,MAAM,CAAA;IAE3C,MAAM,EACJ,SAAS,EACT,GAAG,EAAE,WAAW,EAChB,WAAW,EACX,qBAAqB,EAAE,2BAA2B,GACnD,GAAG,IAAI,CAAA;IAER,IAAI,SAAS,KAAK,WAAW,EAAE;QAC7B,WAAW,CACT,qGAAqG,WAAW,GAAG,CACpH,CAAA;QACD,OAAM;KACP;IAED,IAAI;QACF,8BAA8B,CAAC,WAAW,EAAE,SAAS,CAAC,CAAA;KACvD;IAAC,OAAO,GAAG,EAAE;QACZ,WAAW,CAAC,GAAG,CAAC,CAAA;QAChB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KAChB;IAED,MAAM,oBAAoB,CAAC;QACzB,WAAW;QACX,SAAS;QACT,UAAU;QACV,OAAO,EAAE,EAAC,WAAW,EAAC;KACvB,CAAC,CAAA;IAEF,IAAI,2BAA2B,EAAE;QAC/B,MAAM,wBAAwB,CAAC,qBAAqB,EAAE,EAAE;YACtD,cAAc,EAAE,8BAA8B;YAC9C,cAAc,EAAE,wBAAwB;SACzC,CAAC,CAAA;KACH;AACH,CAAC,CAAC,CAAA;AAEJ,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,aAAsB;IACtD,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;AACnC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ApplyReleaseUpgradeOptions } from './types.js';
|
|
2
|
+
export declare function applyUpgrades({ fromVersion, toVersion, miniHandle, options, }: {
|
|
3
|
+
fromVersion: string;
|
|
4
|
+
toVersion: string;
|
|
5
|
+
miniHandle: string;
|
|
6
|
+
options: ApplyReleaseUpgradeOptions;
|
|
7
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { outputDebug } from '@shopify/cli-kit/node/output';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import { gt as semverGreaterThan, lte as semverLowerOrEqual, } from 'semver';
|
|
4
|
+
import v0x0x42Upgrade from './v0-0-42/index.js';
|
|
5
|
+
import v0x0x43Upgrade from './v0-0-43.js';
|
|
6
|
+
import v0x0x44Upgrade from './v0-0-44.js';
|
|
7
|
+
import v0x0x45Upgrade from './v0-0-45.js';
|
|
8
|
+
import v0x0x50Upgrade from './v0-0-50.js';
|
|
9
|
+
import v0x0x54Upgrade from './v0-0-54.js';
|
|
10
|
+
import v0x0x56Upgrade from './v0-0-56.js';
|
|
11
|
+
import v0x0x57Upgrade from './v0-0-57.js';
|
|
12
|
+
import v0x0x58Upgrade from './v0-0-58.js';
|
|
13
|
+
import v0x0x61Upgrade from './v0-0-61.js';
|
|
14
|
+
import v0x0x63Upgrade from './v0-0-63.js';
|
|
15
|
+
import v0x0x64Upgrade from './v0-0-64.js';
|
|
16
|
+
import v0x0x75Upgrade from './v0-0-75.js';
|
|
17
|
+
import v0x0x76Upgrade from './v0-0-76.js';
|
|
18
|
+
import v0x0x77Upgrade from './v0-0-77.js';
|
|
19
|
+
import v0x0x79Upgrade from './v0-0-79.js';
|
|
20
|
+
import v0x0x84Upgrade from './v0-0-84.js';
|
|
21
|
+
import v0x0x85Upgrade from './v0-0-85.js';
|
|
22
|
+
import v0x0x89Upgrade from './v0-0-89.js';
|
|
23
|
+
import v0x0x91Upgrade from './v0-0-91/index.js';
|
|
24
|
+
import v0x0x92Upgrade from './v0-0-92.js';
|
|
25
|
+
import v0x0x93Upgrade from './v0-0-93.js';
|
|
26
|
+
import v0x0x97Upgrade from './v0-0-97/index.js';
|
|
27
|
+
import v0x0x100Upgrade from './v0-0-100.js';
|
|
28
|
+
import v0x0x103Upgrade from './v0-0-103.js';
|
|
29
|
+
import v0x0x105Upgrade from './v0-0-105.js';
|
|
30
|
+
import v0x0x106Upgrade from './v0-0-106.js';
|
|
31
|
+
import v0x0x114Upgrade from './v0-0-114.js';
|
|
32
|
+
import v0x0x115Upgrade from './v0-0-115.js';
|
|
33
|
+
import v0x0x121Upgrade from './v0-0-121.js';
|
|
34
|
+
const upgrades = [
|
|
35
|
+
v0x0x42Upgrade,
|
|
36
|
+
v0x0x43Upgrade,
|
|
37
|
+
v0x0x44Upgrade,
|
|
38
|
+
v0x0x45Upgrade,
|
|
39
|
+
v0x0x50Upgrade,
|
|
40
|
+
v0x0x54Upgrade,
|
|
41
|
+
v0x0x56Upgrade,
|
|
42
|
+
v0x0x57Upgrade,
|
|
43
|
+
v0x0x58Upgrade,
|
|
44
|
+
v0x0x61Upgrade,
|
|
45
|
+
v0x0x63Upgrade,
|
|
46
|
+
v0x0x64Upgrade,
|
|
47
|
+
v0x0x75Upgrade,
|
|
48
|
+
v0x0x76Upgrade,
|
|
49
|
+
v0x0x77Upgrade,
|
|
50
|
+
v0x0x79Upgrade,
|
|
51
|
+
v0x0x84Upgrade,
|
|
52
|
+
v0x0x85Upgrade,
|
|
53
|
+
v0x0x89Upgrade,
|
|
54
|
+
v0x0x91Upgrade,
|
|
55
|
+
v0x0x92Upgrade,
|
|
56
|
+
v0x0x93Upgrade,
|
|
57
|
+
v0x0x97Upgrade,
|
|
58
|
+
v0x0x100Upgrade,
|
|
59
|
+
v0x0x103Upgrade,
|
|
60
|
+
v0x0x105Upgrade,
|
|
61
|
+
v0x0x106Upgrade,
|
|
62
|
+
v0x0x114Upgrade,
|
|
63
|
+
v0x0x115Upgrade,
|
|
64
|
+
v0x0x121Upgrade,
|
|
65
|
+
];
|
|
66
|
+
// the list of upgrades must be sorted by version. just making sure of it
|
|
67
|
+
upgrades.sort(({ version: upgradeVersion1 }, { version: upgradeVersion2 }) => semverGreaterThan(upgradeVersion1, upgradeVersion2) ? 1 : -1);
|
|
68
|
+
export async function applyUpgrades({ fromVersion, toVersion, miniHandle, options, }) {
|
|
69
|
+
outputDebug(`Applying upgrades from version ${fromVersion} to version ${toVersion}`);
|
|
70
|
+
for (const { applyUpgrade, version, releaseNotes } of upgrades) {
|
|
71
|
+
if (semverGreaterThan(version, fromVersion) &&
|
|
72
|
+
semverLowerOrEqual(version, toVersion)) {
|
|
73
|
+
outputDebug(`Applying upgrade for version ${version}`);
|
|
74
|
+
await applyUpgrade(miniHandle, options);
|
|
75
|
+
printUpgradeReleaseNotes(version, releaseNotes);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
console.log(''); // add an empty line at the end of release notes
|
|
79
|
+
}
|
|
80
|
+
function printUpgradeReleaseNotes(version, releaseNotes) {
|
|
81
|
+
if (!releaseNotes.length) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
console.log(chalk.bold(`\n@shopify/shop-minis-cli@${version} release notes:`));
|
|
85
|
+
releaseNotes.forEach(releaseNotesItem => {
|
|
86
|
+
console.log(`- ${releaseNotesItem}`);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/codemod/releases/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAA;AACxD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAEL,EAAE,IAAI,iBAAiB,EACvB,GAAG,IAAI,kBAAkB,GAC1B,MAAM,QAAQ,CAAA;AAGf,OAAO,cAAc,MAAM,oBAAoB,CAAA;AAC/C,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,oBAAoB,CAAA;AAC/C,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,cAAc,MAAM,oBAAoB,CAAA;AAC/C,OAAO,eAAe,MAAM,eAAe,CAAA;AAC3C,OAAO,eAAe,MAAM,eAAe,CAAA;AAC3C,OAAO,eAAe,MAAM,eAAe,CAAA;AAC3C,OAAO,eAAe,MAAM,eAAe,CAAA;AAC3C,OAAO,eAAe,MAAM,eAAe,CAAA;AAC3C,OAAO,eAAe,MAAM,eAAe,CAAA;AAC3C,OAAO,eAAe,MAAM,eAAe,CAAA;AAE3C,MAAM,QAAQ,GAAgC;IAC5C,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,eAAe;IACf,eAAe;IACf,eAAe;IACf,eAAe;IACf,eAAe;IACf,eAAe;IACf,eAAe;CAChB,CAAA;AAED,yEAAyE;AACzE,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAC,OAAO,EAAE,eAAe,EAAC,EAAE,EAAC,OAAO,EAAE,eAAe,EAAC,EAAE,EAAE,CACvE,iBAAiB,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAC7D,CAAA;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,EAClC,WAAW,EACX,SAAS,EACT,UAAU,EACV,OAAO,GAMR;IACC,WAAW,CACT,kCAAkC,WAAW,eAAe,SAAS,EAAE,CACxE,CAAA;IACD,KAAK,MAAM,EAAC,YAAY,EAAE,OAAO,EAAE,YAAY,EAAC,IAAI,QAAQ,EAAE;QAC5D,IACE,iBAAiB,CAAC,OAAO,EAAE,WAAW,CAAC;YACvC,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,EACtC;YACA,WAAW,CAAC,gCAAgC,OAAO,EAAE,CAAC,CAAA;YACtD,MAAM,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;YACvC,wBAAwB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAA;SAChD;KACF;IACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA,CAAC,gDAAgD;AAClE,CAAC;AAED,SAAS,wBAAwB,CAAC,OAAe,EAAE,YAAsB;IACvE,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;QACxB,OAAM;KACP;IACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,6BAA6B,OAAO,iBAAiB,CAAC,CAAC,CAAA;IAC9E,YAAY,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE;QACtC,OAAO,CAAC,GAAG,CAAC,KAAK,gBAAgB,EAAE,CAAC,CAAA;IACtC,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SemVer } from 'semver';
|
|
2
|
+
export interface ApplyReleaseUpgradeOptions {
|
|
3
|
+
skipPrompts?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface ReleaseUpgradeFileExports {
|
|
6
|
+
applyUpgrade: (miniHandle: string, options: ApplyReleaseUpgradeOptions) => Promise<void>;
|
|
7
|
+
releaseNotes: string[];
|
|
8
|
+
version: SemVer;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/commands/codemod/releases/types.ts"],"names":[],"mappings":""}
|