@shopify/shop-minis-cli 0.0.43 → 0.0.45

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 (58) hide show
  1. package/build/commands/config.d.ts +4 -0
  2. package/build/commands/config.js +19 -0
  3. package/build/commands/config.js.map +1 -1
  4. package/build/commands/dev/index.d.ts +2 -0
  5. package/build/commands/dev/index.js +8 -2
  6. package/build/commands/dev/index.js.map +1 -1
  7. package/build/commands/dev/utils/android.d.ts +6 -4
  8. package/build/commands/dev/utils/android.js +29 -29
  9. package/build/commands/dev/utils/android.js.map +1 -1
  10. package/build/commands/dev/utils/binaries.d.ts +2 -59
  11. package/build/commands/dev/utils/binaries.js +7 -84
  12. package/build/commands/dev/utils/binaries.js.map +1 -1
  13. package/build/commands/dev/utils/build-type.d.ts +2 -0
  14. package/build/commands/dev/utils/build-type.js +14 -0
  15. package/build/commands/dev/utils/build-type.js.map +1 -0
  16. package/build/commands/dev/utils/deeplink.d.ts +2 -2
  17. package/build/commands/dev/utils/deeplink.js +5 -5
  18. package/build/commands/dev/utils/deeplink.js.map +1 -1
  19. package/build/commands/dev/utils/interactive-terminal.d.ts +3 -1
  20. package/build/commands/dev/utils/interactive-terminal.js +37 -78
  21. package/build/commands/dev/utils/interactive-terminal.js.map +1 -1
  22. package/build/commands/dev/utils/metro/metro-server.d.ts +1 -1
  23. package/build/commands/dev/utils/metro/metro-server.js +1 -1
  24. package/build/commands/dev/utils/metro/metro-server.js.map +1 -1
  25. package/build/commands/dev/utils/network.d.ts +8 -8
  26. package/build/commands/dev/utils/network.js +69 -23
  27. package/build/commands/dev/utils/network.js.map +1 -1
  28. package/build/commands/dev/utils/patch-package.d.ts +4 -0
  29. package/build/commands/dev/utils/patch-package.js +72 -0
  30. package/build/commands/dev/utils/patch-package.js.map +1 -0
  31. package/build/commands/dev/utils/platform.d.ts +18 -0
  32. package/build/commands/dev/utils/platform.js +41 -0
  33. package/build/commands/dev/utils/platform.js.map +1 -0
  34. package/build/commands/dev/utils/simulator.d.ts +5 -2
  35. package/build/commands/dev/utils/simulator.js +27 -13
  36. package/build/commands/dev/utils/simulator.js.map +1 -1
  37. package/build/commands/dev/utils/start-app.d.ts +23 -0
  38. package/build/commands/dev/utils/start-app.js +85 -0
  39. package/build/commands/dev/utils/start-app.js.map +1 -0
  40. package/build/commands/dev/utils/types.d.ts +24 -1
  41. package/build/commands/dev/utils/types.js +6 -1
  42. package/build/commands/dev/utils/types.js.map +1 -1
  43. package/build/commands/dev/utils/version.d.ts +64 -0
  44. package/build/commands/dev/utils/version.js +101 -0
  45. package/build/commands/dev/utils/version.js.map +1 -0
  46. package/build/commands/types/autogenerated/shop-minis-admin-api/graphql.d.ts +266 -30
  47. package/build/commands/types/autogenerated/shop-minis-admin-api/graphql.js +68 -10
  48. package/build/commands/types/autogenerated/shop-minis-admin-api/graphql.js.map +1 -1
  49. package/build/index.js +2 -1
  50. package/build/index.js.map +1 -1
  51. package/jest.config.ts +2 -2
  52. package/package.json +3 -1
  53. package/templates/__template_common/.eslintrc.js +29 -0
  54. package/templates/__template_common/index.tsx +0 -2
  55. package/templates/__template_common/package.json +5 -36
  56. package/templates/__template_common/src/manifest.json +1 -27
  57. package/templates/__template_common/.eslintrc.json +0 -15
  58. package/templates/__template_common/patches/react-native+0.68.5.patch +0 -173
@@ -1,7 +1,5 @@
1
1
  // Note: This file is only used for the development mode. Changes made here will not be
2
2
  // reflected in published/production mode mini apps
3
- import 'intl'
4
- import 'intl/locale-data/jsonp/en'
5
3
  import {AppRegistry} from 'react-native'
6
4
  import 'react-native-gesture-handler'
7
5
  import {useNativeEventEmitterShopActions} from '@shopify/shop-minis-platform-sdk'
@@ -10,63 +10,32 @@
10
10
  "check-submission": "shop-minis check-submission",
11
11
  "test": "jest",
12
12
  "lint": "eslint .",
13
- "postinstall": "patch-package",
14
13
  "generate-graphql-types": "shop-minis generate-graphql-types"
15
14
  },
15
+ "dependencies": {
16
+ "@shopify/shop-minis-runtime": "0.0.5"
17
+ },
16
18
  "devDependencies": {
17
19
  "@babel/core": "^7.12.9",
18
20
  "@babel/plugin-transform-named-capturing-groups-regex": "^7.20.5",
19
21
  "@babel/plugin-transform-react-jsx": "^7.20.7",
20
22
  "@babel/runtime": "^7.12.5",
21
- "@react-native-community/blur": "4.3.0",
22
- "@react-native-community/datetimepicker": "^6.7.5",
23
- "@react-native-community/picker": "1.6.1",
24
- "@react-navigation/native": "6.1.2",
25
- "@react-navigation/native-stack": "6.9.8",
26
23
  "@shopify/eslint-plugin-shop-minis": "^0.0.2",
27
- "@shopify/react-graphql": "0.0.0-snapshot-20230110221326",
28
- "@shopify/restyle": "^2.1.0",
29
24
  "@shopify/shop-minis-cli": "__SHOP_MINIS_CLI_VERSION__",
30
25
  "@shopify/shop-minis-platform-sdk": "^0.1.23",
31
- "@types/color": "^3.0.3",
32
26
  "@types/jest": "^29.2.6",
33
- "@types/react": "^17.0.39",
34
- "@types/react-native": "^0.68.1",
35
- "@types/url-parse": "^1.4.8",
36
- "apollo-link-timeout": "^4.0.0",
37
27
  "babel-jest": "^26.6.3",
38
28
  "babel-plugin-import-graphql": "^2.8.1",
39
- "color": "^4.2.3",
40
29
  "eslint": "^8.32.0",
41
30
  "graphql": "^15.0.0",
42
- "intl": "^1.2.5",
43
31
  "jest": "^29.3.1",
44
- "jsonschema": "^1.4.1",
45
32
  "metro-react-native-babel-preset": "^0.67.0",
46
- "patch-package": "^6.4.7",
47
- "postinstall-postinstall": "^2.1.0",
48
33
  "prettier": "^2.8.2",
49
- "react": "17.0.2",
50
- "react-native": "0.68.5",
51
- "react-native-fast-image": "8.6.3",
52
- "react-native-gesture-handler": "2.6.1",
53
- "react-native-linear-gradient": "2.6.2",
54
- "react-native-localize": "2.2.4",
55
- "react-native-progress": "5.0.0",
56
- "react-native-reanimated": "2.13.0",
57
- "react-native-safe-area-context": "4.4.1",
58
- "react-native-screens": "3.18.2",
59
- "react-native-svg": "13.6.0",
60
34
  "react-native-svg-transformer": "^1.0.0",
61
- "react-native-webview": "11.23.1",
62
- "react-test-renderer": "17.0.2",
63
- "typescript": "~4.7.4",
64
- "url-parse": "^1.5.10"
35
+ "react-test-renderer": "18.2.0",
36
+ "typescript": "~4.7.4"
65
37
  },
66
38
  "jest": {
67
39
  "preset": "react-native"
68
- },
69
- "resolutions": {
70
- "@types/react": "^17"
71
40
  }
72
41
  }
@@ -1,30 +1,4 @@
1
1
  {
2
2
  "name": "__MINI_APP_NAME__",
3
- "handle": "__MINI_APP_HANDLE_KEBAB_CASE__",
4
- "icon_url": "https://cdn.shopify.com/shop-assets/static_uploads/mini_apps/mini-placeholder-icon.png",
5
- "shopify_app_ids": [],
6
- "description": "Mini App Description",
7
- "partner_name": "Shopify Partner Name",
8
- "entry_points": [
9
- {
10
- "type": "ACTION_BUTTON",
11
- "location": "PRODUCT_PAGE",
12
- "images": {
13
- "default_value": []
14
- },
15
- "call_to_action_text": {
16
- "default_value": "Open __MINI_APP_NAME__"
17
- },
18
- "visibility": {
19
- "owner_type": "PRODUCT",
20
- "namespace": "__MINI_APP_HANDLE_KEBAB_CASE__",
21
- "key": "available"
22
- },
23
- "visibility_rule": {
24
- "owner_type": "SHOP",
25
- "namespace": "__MINI_APP_HANDLE_KEBAB_CASE__",
26
- "key": "product_entry_point_rule"
27
- }
28
- }
29
- ]
3
+ "handle": "__MINI_APP_HANDLE_KEBAB_CASE__"
30
4
  }
@@ -1,15 +0,0 @@
1
- {
2
- "root": true,
3
- "extends": ["plugin:@shopify/shop-minis/all"],
4
- "settings": {
5
- "react": {
6
- "version": "detect"
7
- }
8
- },
9
- "parserOptions": {
10
- "ecmaVersion": 6,
11
- "project": "./tsconfig.json",
12
- "schema": "node_modules/@shopify/shop-minis-platform-sdk/src/api/minis.graphql",
13
- "operations": "**/*.graphql"
14
- }
15
- }
@@ -1,173 +0,0 @@
1
- Apply the changes from https://github.com/facebook/react-native/pull/33726
2
- so that we can run on a different port. This can be removed once that PR lands
3
- in react-native stable
4
-
5
- diff --git a/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.fb.js
6
- index f37be3e..8ff1683 100644
7
- --- a/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.fb.js
8
- +++ b/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.fb.js
9
- @@ -5302,7 +5302,7 @@ var getViewConfigForType =
10
- // % 2 === 0 means it is a Fabric tag.
11
- // This means that they never overlap.
12
-
13
- -var nextReactTag = 2;
14
- +var nextReactTag = 999992;
15
-
16
- // TODO: Remove this conditional once all changes have propagated.
17
- if (registerEventHandler) {
18
- diff --git a/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js b/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js
19
- index 39be910..68e9a22 100644
20
- --- a/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js
21
- +++ b/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js
22
- @@ -4810,7 +4810,7 @@ var getViewConfigForType =
23
- // % 2 === 0 means it is a Fabric tag.
24
- // This means that they never overlap.
25
-
26
- -var nextReactTag = 2;
27
- +var nextReactTag = 999992;
28
-
29
- // TODO: Remove this conditional once all changes have propagated.
30
- if (registerEventHandler) {
31
- diff --git a/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-prod.fb.js
32
- index bd8208a..75c9d37 100644
33
- --- a/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-prod.fb.js
34
- +++ b/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-prod.fb.js
35
- @@ -1851,7 +1851,7 @@ var _nativeFabricUIManage = nativeFabricUIManager,
36
- _nativeFabricUIManage.unstable_getCurrentEventPriority,
37
- getViewConfigForType =
38
- ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get,
39
- - nextReactTag = 2;
40
- + nextReactTag = 999992;
41
- registerEventHandler && registerEventHandler(dispatchEvent);
42
- var ReactFabricHostComponent = (function() {
43
- function ReactFabricHostComponent(
44
- diff --git a/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js b/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js
45
- index 058a5e1..87e8af5 100644
46
- --- a/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js
47
- +++ b/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js
48
- @@ -1847,7 +1847,7 @@ var _nativeFabricUIManage = nativeFabricUIManager,
49
- _nativeFabricUIManage.unstable_getCurrentEventPriority,
50
- getViewConfigForType =
51
- ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get,
52
- - nextReactTag = 2;
53
- + nextReactTag = 999992;
54
- registerEventHandler && registerEventHandler(dispatchEvent);
55
- var ReactFabricHostComponent = (function() {
56
- function ReactFabricHostComponent(
57
- diff --git a/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js
58
- index 88a4d7e..88b9720 100644
59
- --- a/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js
60
- +++ b/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js
61
- @@ -1972,7 +1972,7 @@ var _nativeFabricUIManage = nativeFabricUIManager,
62
- _nativeFabricUIManage.unstable_getCurrentEventPriority,
63
- getViewConfigForType =
64
- ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get,
65
- - nextReactTag = 2;
66
- + nextReactTag = 999992;
67
- registerEventHandler && registerEventHandler(dispatchEvent);
68
- var ReactFabricHostComponent = (function() {
69
- function ReactFabricHostComponent(
70
- diff --git a/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.js b/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.js
71
- index 791e998..740a8b3 100644
72
- --- a/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.js
73
- +++ b/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.js
74
- @@ -1895,7 +1895,7 @@ var _nativeFabricUIManage = nativeFabricUIManager,
75
- _nativeFabricUIManage.unstable_getCurrentEventPriority,
76
- getViewConfigForType =
77
- ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get,
78
- - nextReactTag = 2;
79
- + nextReactTag = 999992;
80
- registerEventHandler && registerEventHandler(dispatchEvent);
81
- var ReactFabricHostComponent = (function() {
82
- function ReactFabricHostComponent(
83
- diff --git a/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js
84
- index fa3df1e..7822e98 100644
85
- --- a/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js
86
- +++ b/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js
87
- @@ -5531,7 +5531,7 @@ var UPDATE_SIGNAL = {};
88
- // % 10 === 1 means it is a rootTag.
89
- // % 2 === 0 means it is a Fabric tag.
90
-
91
- -var nextReactTag = 3;
92
- +var nextReactTag = 999993;
93
-
94
- function allocateTag() {
95
- var tag = nextReactTag;
96
- diff --git a/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js b/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js
97
- index 3772e42..041524c 100644
98
- --- a/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js
99
- +++ b/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js
100
- @@ -5024,7 +5024,7 @@ var UPDATE_SIGNAL = {};
101
- // % 10 === 1 means it is a rootTag.
102
- // % 2 === 0 means it is a Fabric tag.
103
-
104
- -var nextReactTag = 3;
105
- +var nextReactTag = 999993;
106
-
107
- function allocateTag() {
108
- var tag = nextReactTag;
109
- diff --git a/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js
110
- index 34c20b4..c764e34 100644
111
- --- a/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js
112
- +++ b/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js
113
- @@ -1912,7 +1912,7 @@ function shim$1() {
114
- var getViewConfigForType =
115
- ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get,
116
- UPDATE_SIGNAL = {},
117
- - nextReactTag = 3;
118
- + nextReactTag = 999993;
119
- function allocateTag() {
120
- var tag = nextReactTag;
121
- 1 === tag % 10 && (tag += 2);
122
- diff --git a/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js b/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js
123
- index 3fb794d..f3a6a5b 100644
124
- --- a/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js
125
- +++ b/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js
126
- @@ -1906,7 +1906,7 @@ function shim() {
127
- var getViewConfigForType =
128
- ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get,
129
- UPDATE_SIGNAL = {},
130
- - nextReactTag = 3;
131
- + nextReactTag = 999993;
132
- function allocateTag() {
133
- var tag = nextReactTag;
134
- 1 === tag % 10 && (tag += 2);
135
- diff --git a/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js
136
- index f9734c0..847f3a3 100644
137
- --- a/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js
138
- +++ b/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js
139
- @@ -2033,7 +2033,7 @@ function shim$1() {
140
- var getViewConfigForType =
141
- ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get,
142
- UPDATE_SIGNAL = {},
143
- - nextReactTag = 3;
144
- + nextReactTag = 999993;
145
- function allocateTag() {
146
- var tag = nextReactTag;
147
- 1 === tag % 10 && (tag += 2);
148
- diff --git a/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js b/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js
149
- index b875b0e..7441160 100644
150
- --- a/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js
151
- +++ b/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js
152
- @@ -1954,7 +1954,7 @@ function shim() {
153
- var getViewConfigForType =
154
- ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get,
155
- UPDATE_SIGNAL = {},
156
- - nextReactTag = 3;
157
- + nextReactTag = 999993;
158
- function allocateTag() {
159
- var tag = nextReactTag;
160
- 1 === tag % 10 && (tag += 2);
161
- diff --git a/node_modules/react-native/React-Core.podspec b/node_modules/react-native/React-Core.podspec
162
- index 375bd9e..1721fef 100644
163
- --- a/node_modules/react-native/React-Core.podspec
164
- +++ b/node_modules/react-native/React-Core.podspec
165
- @@ -47,7 +47,7 @@ Pod::Spec.new do |s|
166
- s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
167
- s.header_dir = "React"
168
- s.framework = "JavaScriptCore"
169
- - s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-hermes\" \"${PODS_ROOT}/Headers/Public/hermes-engine\" \"${PODS_ROOT}/Headers/Public/FlipperKit\" \"$(PODS_ROOT)/Headers/Public/ReactCommon\" \"$(PODS_ROOT)/Headers/Public/React-RCTFabric\"", "DEFINES_MODULE" => "YES" }
170
- + s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-hermes\" \"${PODS_ROOT}/Headers/Public/hermes-engine\" \"${PODS_ROOT}/Headers/Public/FlipperKit\" \"$(PODS_ROOT)/Headers/Public/ReactCommon\" \"$(PODS_ROOT)/Headers/Public/React-RCTFabric\"", "DEFINES_MODULE" => "YES", "GCC_PREPROCESSOR_DEFINITIONS" => "RCT_METRO_PORT=${RCT_METRO_PORT}" }
171
- s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\""}
172
- s.default_subspec = "Default"
173
-