@applicaster/zapplicaster-cli 13.0.0-alpha.3322736490 → 13.0.0-alpha.3332871333

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapplicaster-cli",
3
- "version": "13.0.0-alpha.3322736490",
3
+ "version": "13.0.0-alpha.3332871333",
4
4
  "description": "CLI Tool for the zapp app and Quick Brick project",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
@@ -28,10 +28,10 @@
28
28
  },
29
29
  "homepage": "https://github.com/applicaster/quickbrick#readme",
30
30
  "dependencies": {
31
- "@applicaster/zapp-react-dom-cli-template": "13.0.0-alpha.3322736490",
32
- "@applicaster/zapp-react-native-android-tv-cli-template": "13.0.0-alpha.3322736490",
33
- "@applicaster/zapp-react-native-cli-template": "13.0.0-alpha.3322736490",
34
- "@applicaster/zapp-react-native-tvos-cli-template": "13.0.0-alpha.3322736490",
31
+ "@applicaster/zapp-react-dom-cli-template": "13.0.0-alpha.3332871333",
32
+ "@applicaster/zapp-react-native-android-tv-cli-template": "13.0.0-alpha.3332871333",
33
+ "@applicaster/zapp-react-native-cli-template": "13.0.0-alpha.3332871333",
34
+ "@applicaster/zapp-react-native-tvos-cli-template": "13.0.0-alpha.3332871333",
35
35
  "axios": "^0.28.0",
36
36
  "camelize": "^1.0.0",
37
37
  "chalk": "^2.3.2",
@@ -103,7 +103,12 @@ const destinationPath = "path/to/workspace";
103
103
  const platform = "ios";
104
104
  const yarn = false;
105
105
  const zappReactNative = false;
106
- const buildParams = { appVersionId: "A1234", quick_brick_version: "6.1.6" };
106
+
107
+ const buildParams = {
108
+ languages: ["en", "en-US", "es", "es-LA"],
109
+ appVersionId: "A1234",
110
+ quick_brick_version: "6.1.6",
111
+ };
107
112
 
108
113
  const template = {
109
114
  files: {
@@ -43,6 +43,30 @@ async function patchPackages() {
43
43
  }
44
44
  }
45
45
 
46
+ // JS equivalent of the `toDayJSLocaleMap` function from @applicaster/zapp-react-native-utils/appUtils/localizationsHelper
47
+ const toDayJSLocaleMap = (code) => {
48
+ const map = {
49
+ hy: "hy-am",
50
+ fj: null,
51
+ la: null,
52
+ no: null,
53
+ pa: "pa-in",
54
+ qu: null,
55
+ "es-LA": "es",
56
+ sm: null,
57
+ to: null,
58
+ xh: null,
59
+ };
60
+
61
+ if (map[code] === null) {
62
+ return "en";
63
+ } else if (map[code]) {
64
+ return map[code];
65
+ } else {
66
+ return code.toLowerCase();
67
+ }
68
+ };
69
+
46
70
  /**
47
71
  * {@typedef configuration
48
72
  * @type {Object}
@@ -135,6 +159,10 @@ async function appBootstrapper(configuration) {
135
159
 
136
160
  configuration.sdkAssets = sdkAssets;
137
161
 
162
+ configuration.buildParams.dayJsLocales = configuration.buildParams.languages
163
+ .map(toDayJSLocaleMap)
164
+ .filter((v) => v !== "en");
165
+
138
166
  configuration.excludedNodeModules = getExcludedNodeModules(plugins);
139
167
  const { filesToRender } = template.files;
140
168