@ronas-it/nx-generators 0.3.2 → 0.3.4
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 +4 -4
- package/src/generators/code-checks/files/types.d.ts.template +2 -1
- package/src/generators/code-checks/generator.js +10 -10
- package/src/generators/expo-app/files/eas.json.template +3 -3
- package/src/generators/expo-app/generator.js +11 -8
- package/src/generators/expo-app/generator.js.map +1 -1
- package/src/generators/expo-app/scripts.js +5 -5
- package/src/generators/expo-app/scripts.js.map +1 -1
- package/src/generators/repo-config/generator.js +1 -3
- package/src/generators/repo-config/generator.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ronas-it/nx-generators",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "NX generators for Ronas IT projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ronas IT",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@nx/devkit": "
|
|
28
|
-
"inquirer": "^
|
|
27
|
+
"@nx/devkit": "19.3.0",
|
|
28
|
+
"inquirer": "^9.2.23",
|
|
29
29
|
"lodash": "^4.17.21",
|
|
30
|
-
"tslib": "^2.3
|
|
30
|
+
"tslib": "^2.6.3"
|
|
31
31
|
},
|
|
32
32
|
"type": "commonjs",
|
|
33
33
|
"main": "./src/index.js",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
// This file is added for correct work of TS-checks in pre-commit hook using tsc-files
|
|
2
2
|
// Issue: https://github.com/gustavopch/tsc-files/issues/20
|
|
3
|
-
|
|
3
|
+
// TODO: Uncomment the line below if you have an Expo app
|
|
4
|
+
// import 'node_modules/@nx/expo/typings/svg.d.ts';
|
|
@@ -31,18 +31,18 @@ function codeChecksGenerator(tree, options) {
|
|
|
31
31
|
(0, devkit_1.generateFiles)(tree, path.join(__dirname, 'files'), projectRoot, options);
|
|
32
32
|
// Install necessary dependencies
|
|
33
33
|
(0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
|
|
34
|
-
'eslint': '^8.
|
|
35
|
-
'prettier': '^
|
|
36
|
-
'eslint-config-prettier': '^9.
|
|
34
|
+
'eslint': '^8.56.0',
|
|
35
|
+
'prettier': '^3.3.2',
|
|
36
|
+
'eslint-config-prettier': '^9.1.0',
|
|
37
37
|
'eslint-import-resolver-typescript': '^3.6.1',
|
|
38
|
-
'eslint-plugin-import': '^2.
|
|
39
|
-
'eslint-plugin-jsx-a11y': '^6.
|
|
40
|
-
'eslint-plugin-react': '^7.
|
|
41
|
-
'eslint-plugin-react-hooks': '^4.6.
|
|
38
|
+
'eslint-plugin-import': '^2.29.1',
|
|
39
|
+
'eslint-plugin-jsx-a11y': '^6.9.0',
|
|
40
|
+
'eslint-plugin-react': '^7.34.3',
|
|
41
|
+
'eslint-plugin-react-hooks': '^4.6.2',
|
|
42
42
|
'eslint-plugin-react-native': '^4.1.0',
|
|
43
|
-
'eslint-plugin-unused-imports': '^
|
|
44
|
-
'@typescript-eslint/eslint-plugin': '^
|
|
45
|
-
'@typescript-eslint/parser': '^
|
|
43
|
+
'eslint-plugin-unused-imports': '^4.0.0',
|
|
44
|
+
'@typescript-eslint/eslint-plugin': '^7.13.1',
|
|
45
|
+
'@typescript-eslint/parser': '^7.13.1',
|
|
46
46
|
'tsc-files': '^1.1.4',
|
|
47
47
|
});
|
|
48
48
|
yield (0, devkit_1.formatFiles)(tree);
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"distribution": "store"
|
|
8
8
|
},
|
|
9
9
|
"env": {
|
|
10
|
-
"
|
|
10
|
+
"EXPO_PUBLIC_APP_ENV": "development"
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"debug": {
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"channel": "staging",
|
|
22
22
|
"distribution": "store",
|
|
23
23
|
"env": {
|
|
24
|
-
"
|
|
24
|
+
"EXPO_PUBLIC_APP_ENV": "staging"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"production": {
|
|
28
28
|
"channel": "production",
|
|
29
29
|
"distribution": "store",
|
|
30
30
|
"env": {
|
|
31
|
-
"
|
|
31
|
+
"EXPO_PUBLIC_APP_ENV": "production"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
},
|
|
@@ -9,17 +9,20 @@ const scripts_1 = require("./scripts");
|
|
|
9
9
|
const fs_1 = require("fs");
|
|
10
10
|
const utils_1 = require("../../shared/utils");
|
|
11
11
|
const dependencies = {
|
|
12
|
-
'expo-constants': '
|
|
13
|
-
'expo-router': '
|
|
14
|
-
'react-native-safe-area-context': '^4.
|
|
15
|
-
'react-native-screens': '^3.
|
|
16
|
-
'expo-linking': '^6.
|
|
17
|
-
'expo-status-bar': '^1.
|
|
18
|
-
'expo-updates': '^0.
|
|
12
|
+
'expo-constants': '~16.0.2',
|
|
13
|
+
'expo-router': '~3.5.16',
|
|
14
|
+
'react-native-safe-area-context': '^4.10.5',
|
|
15
|
+
'react-native-screens': '^3.32.0',
|
|
16
|
+
'expo-linking': '^6.3.1',
|
|
17
|
+
'expo-status-bar': '^1.12.1',
|
|
18
|
+
'expo-updates': '^0.25.17',
|
|
19
|
+
'expo-insights': '~0.7.0',
|
|
19
20
|
};
|
|
20
21
|
function expoAppGenerator(tree, options) {
|
|
21
22
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
22
23
|
const appRoot = `apps/${options.directory}`;
|
|
24
|
+
// Install @nx/expo plugin
|
|
25
|
+
(0, child_process_1.execSync)('npx nx add @nx/expo', { stdio: 'inherit' });
|
|
23
26
|
if (!(0, fs_1.existsSync)(appRoot)) {
|
|
24
27
|
(0, child_process_1.execSync)(`npx nx g app ${options.name} --directory=apps/${options.directory} --projectNameAndRootFormat=as-provided --unitTestRunner=none --e2eTestRunner=none`);
|
|
25
28
|
}
|
|
@@ -43,7 +46,7 @@ function expoAppGenerator(tree, options) {
|
|
|
43
46
|
(0, devkit_1.addDependenciesToPackageJson)(tree, Object.assign(Object.assign({}, dependencies), {
|
|
44
47
|
// Need new version to fix this error:
|
|
45
48
|
// https://github.com/kristerkari/react-native-svg-transformer/issues/329
|
|
46
|
-
'react-native-svg-transformer': '^1.
|
|
49
|
+
'react-native-svg-transformer': '^1.4.0' }), { 'cross-env': '^7.0.3' });
|
|
47
50
|
(0, devkit_1.addDependenciesToPackageJson)(tree, dependencies, {}, appPackagePath);
|
|
48
51
|
yield (0, devkit_1.formatFiles)(tree);
|
|
49
52
|
return () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/expo-app/generator.ts"],"names":[],"mappings":";;;;AAAA,iDAAyC;AACzC,6BAA6B;AAC7B,uCAQoB;AAEpB,uCAAgC;AAChC,2BAAgC;AAChC,8CAAgD;AAEhD,MAAM,YAAY,GAAG;IACnB,gBAAgB,EAAE,SAAS;IAC3B,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/expo-app/generator.ts"],"names":[],"mappings":";;;;AAAA,iDAAyC;AACzC,6BAA6B;AAC7B,uCAQoB;AAEpB,uCAAgC;AAChC,2BAAgC;AAChC,8CAAgD;AAEhD,MAAM,YAAY,GAAG;IACnB,gBAAgB,EAAE,SAAS;IAC3B,aAAa,EAAE,SAAS;IACxB,gCAAgC,EAAE,SAAS;IAC3C,sBAAsB,EAAE,SAAS;IACjC,cAAc,EAAE,QAAQ;IACxB,iBAAiB,EAAE,SAAS;IAC5B,cAAc,EAAE,UAAU;IAC1B,eAAe,EAAE,QAAQ;CAC1B,CAAC;AAEF,SAAsB,gBAAgB,CACpC,IAAU,EACV,OAA+B;;QAE/B,MAAM,OAAO,GAAG,QAAQ,OAAO,CAAC,SAAS,EAAE,CA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AA,qCAA4B,EAC1B,IAAI,kCAEC,YAAY;YACf,sCAAsC;YACtC,yEAAyE;YACzE,8BAA8B,EAAE,QAAQ,KAE1C,EAAE,WAAW,EAAE,QAAQ,EAAE,CAC1B,CAAC;QAEF,IAAA,qCAA4B,EAAC,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,cAAc,CAAC,CAAC;QAErE,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAExB,OAAO,GAAG,EAAE;YACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;YAC1B,IAAA,wBAAQ,EAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC3D,CAAC,CAAC;IACJ,CAAC;CAAA;AA7DD,4CA6DC;AAED,kBAAe,gBAAgB,CAAC"}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
'start': 'npx expo start',
|
|
5
|
-
'start:prod': 'cross-env
|
|
5
|
+
'start:prod': 'cross-env EXPO_PUBLIC_APP_ENV=production npx expo start',
|
|
6
6
|
'build:dev': 'eas build --no-wait -p all --profile=development',
|
|
7
7
|
'build:debug': 'npm run build:dev -- --profile=debug',
|
|
8
8
|
'build:prod': 'npm run build:dev -- --profile=production',
|
|
9
|
-
'update:dev': 'cross-env
|
|
10
|
-
'update:prod': 'cross-env
|
|
11
|
-
'submit:ios:dev': 'cross-env
|
|
12
|
-
'submit:ios:prod': 'cross-env
|
|
9
|
+
'update:dev': 'cross-env EXPO_PUBLIC_APP_ENV=development eas update --branch development',
|
|
10
|
+
'update:prod': 'cross-env EXPO_PUBLIC_APP_ENV=production eas update --branch production',
|
|
11
|
+
'submit:ios:dev': 'cross-env EXPO_PUBLIC_APP_ENV=development eas submit --no-wait -p ios --profile=development',
|
|
12
|
+
'submit:ios:prod': 'cross-env EXPO_PUBLIC_APP_ENV=production eas submit --no-wait -p ios --profile=production',
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=scripts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scripts.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/expo-app/scripts.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,OAAO,EAAE,gBAAgB;IACzB,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"scripts.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/expo-app/scripts.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,OAAO,EAAE,gBAAgB;IACzB,YAAY,EAAE,yDAAyD;IACvE,WAAW,EAAE,kDAAkD;IAC/D,aAAa,EAAE,sCAAsC;IACrD,YAAY,EAAE,2CAA2C;IACzD,YAAY,EAAE,2EAA2E;IACzF,aAAa,EAAE,yEAAyE;IACxF,gBAAgB,EAAE,6FAA6F;IAC/G,iBAAiB,EAAE,2FAA2F;CAC/G,CAAC"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.repoConfigGenerator = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const child_process_1 = require("child_process");
|
|
6
5
|
const path = require("path");
|
|
7
6
|
const devkit_1 = require("@nx/devkit");
|
|
8
7
|
const scripts_1 = require("./scripts");
|
|
@@ -24,11 +23,10 @@ function repoConfigGenerator(tree) {
|
|
|
24
23
|
formatName: utils_1.formatName,
|
|
25
24
|
});
|
|
26
25
|
// Add dependencies
|
|
27
|
-
(0, devkit_1.addDependenciesToPackageJson)(tree, {}, { syncpack: '^12.3.
|
|
26
|
+
(0, devkit_1.addDependenciesToPackageJson)(tree, {}, { syncpack: '^12.3.2' });
|
|
28
27
|
yield (0, devkit_1.formatFiles)(tree);
|
|
29
28
|
return () => {
|
|
30
29
|
(0, devkit_1.installPackagesTask)(tree);
|
|
31
|
-
(0, child_process_1.execSync)('npx expo install --fix', { stdio: 'inherit' });
|
|
32
30
|
};
|
|
33
31
|
});
|
|
34
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/repo-config/generator.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/repo-config/generator.ts"],"names":[],"mappings":";;;;AAAA,6BAA6B;AAC7B,uCAQoB;AACpB,uCAAgC;AAChC,8CAAgE;AAEhE,SAAsB,mBAAmB,CAAC,IAAU;;QAClD,MAAM,WAAW,GAAG,GAAG,CAAC;QACxB,MAAM,kBAAkB,GAAG,cAAc,CAAC;QAE1C,2DAA2D;QAC3D,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAEzB,8BAA8B;QAC9B,MAAM,kBAAkB,GAAG,IAAA,iBAAQ,EAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;QAC9D,kBAAkB,CAAC,UAAU,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC3C,kBAAkB,CAAC,OAAO,mCAAQ,iBAAO,GAAK,kBAAkB,CAAC,OAAO,CAAE,CAAC;QAC3E,IAAA,kBAAS,EAAC,IAAI,EAAE,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;QAExD,oBAAoB;QACpB,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,WAAW,EAAE;YAC9D,IAAI,EAAE,IAAA,sBAAc,EAAC,kBAAkB,CAAC,IAAI,CAAC;YAC7C,UAAU,EAAV,kBAAU;SACX,CAAC,CAAC;QAEH,mBAAmB;QACnB,IAAA,qCAA4B,EAAC,IAAI,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC;QAEhE,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAExB,OAAO,GAAG,EAAE;YACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC;IACJ,CAAC;CAAA;AA3BD,kDA2BC;AAED,kBAAe,mBAAmB,CAAC"}
|