@ronas-it/nx-generators 0.10.3 → 0.10.5
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/README.md +10 -1
- package/package.json +4 -3
- package/src/generators/code-checks/config.d.ts +18 -0
- package/src/generators/code-checks/config.js +20 -0
- package/src/generators/code-checks/config.js.map +1 -0
- package/src/generators/code-checks/files/.eslintrc.json.template +173 -1
- package/src/generators/code-checks/generator.d.ts +4 -0
- package/src/generators/code-checks/generator.js +53 -0
- package/src/generators/code-checks/generator.js.map +1 -0
- package/src/generators/code-checks/scripts.d.ts +6 -0
- package/src/generators/code-checks/scripts.js +8 -0
- package/src/generators/code-checks/scripts.js.map +1 -0
- package/src/generators/entity-api/generator.d.ts +4 -0
- package/src/generators/entity-api/generator.js +87 -0
- package/src/generators/entity-api/generator.js.map +1 -0
- package/src/generators/expo-app/generator.d.ts +4 -0
- package/src/generators/expo-app/generator.js +93 -0
- package/src/generators/expo-app/generator.js.map +1 -0
- package/src/generators/expo-app/scripts.d.ts +13 -0
- package/src/generators/expo-app/scripts.js +15 -0
- package/src/generators/expo-app/scripts.js.map +1 -0
- package/src/generators/form/generator.d.ts +4 -0
- package/src/generators/form/generator.js +55 -0
- package/src/generators/form/generator.js.map +1 -0
- package/src/generators/form/utils/add-form-usage.d.ts +1 -0
- package/src/generators/form/utils/add-form-usage.js +71 -0
- package/src/generators/form/utils/add-form-usage.js.map +1 -0
- package/src/generators/form/utils/get-app-name.d.ts +1 -0
- package/src/generators/form/utils/get-app-name.js +8 -0
- package/src/generators/form/utils/get-app-name.js.map +1 -0
- package/src/generators/form/utils/get-form-utils-directory.d.ts +2 -0
- package/src/generators/form/utils/get-form-utils-directory.js +35 -0
- package/src/generators/form/utils/get-form-utils-directory.js.map +1 -0
- package/src/generators/form/utils/index.js +8 -0
- package/src/generators/form/utils/index.js.map +1 -0
- package/src/generators/form/utils/update-index.d.ts +2 -0
- package/src/generators/form/utils/update-index.js +18 -0
- package/src/generators/form/utils/update-index.js.map +1 -0
- package/src/generators/lib-move/generator.d.ts +4 -0
- package/src/generators/lib-move/generator.js +37 -0
- package/src/generators/lib-move/generator.js.map +1 -0
- package/src/generators/lib-remove/generator.d.ts +4 -0
- package/src/generators/lib-remove/generator.js +22 -0
- package/src/generators/lib-remove/generator.js.map +1 -0
- package/src/generators/lib-rename/generator.d.ts +4 -0
- package/src/generators/lib-rename/generator.js +22 -0
- package/src/generators/lib-rename/generator.js.map +1 -0
- package/src/generators/lib-tags/generator.d.ts +4 -0
- package/src/generators/lib-tags/generator.js +56 -0
- package/src/generators/lib-tags/generator.js.map +1 -0
- package/src/generators/lib-tags/interfaces/context.d.ts +8 -0
- package/src/generators/lib-tags/interfaces/context.js +3 -0
- package/src/generators/lib-tags/interfaces/context.js.map +1 -0
- package/src/generators/lib-tags/interfaces/index.js +6 -0
- package/src/generators/lib-tags/interfaces/index.js.map +1 -0
- package/src/generators/lib-tags/interfaces/{verify-tag-config.ts → verify-tag-config.d.ts} +6 -7
- package/src/generators/lib-tags/interfaces/verify-tag-config.js +3 -0
- package/src/generators/lib-tags/interfaces/verify-tag-config.js.map +1 -0
- package/src/generators/lib-tags/types/index.js +5 -0
- package/src/generators/lib-tags/types/index.js.map +1 -0
- package/src/generators/lib-tags/types/tag.js +3 -0
- package/src/generators/lib-tags/types/tag.js.map +1 -0
- package/src/generators/lib-tags/utils/check-lib-tags.d.ts +4 -0
- package/src/generators/lib-tags/utils/check-lib-tags.js +113 -0
- package/src/generators/lib-tags/utils/check-lib-tags.js.map +1 -0
- package/src/generators/lib-tags/utils/index.js +5 -0
- package/src/generators/lib-tags/utils/index.js.map +1 -0
- package/src/generators/next-app/generator.d.ts +4 -0
- package/src/generators/next-app/generator.js +71 -0
- package/src/generators/next-app/generator.js.map +1 -0
- package/src/generators/react-component/generator.d.ts +4 -0
- package/src/generators/react-component/generator.js +60 -0
- package/src/generators/react-component/generator.js.map +1 -0
- package/src/generators/react-lib/generator.d.ts +4 -0
- package/src/generators/react-lib/generator.js +61 -0
- package/src/generators/react-lib/generator.js.map +1 -0
- package/src/generators/repo-config/generator.d.ts +3 -0
- package/src/generators/repo-config/generator.js +36 -0
- package/src/generators/repo-config/generator.js.map +1 -0
- package/src/generators/repo-config/scripts.d.ts +4 -0
- package/src/generators/repo-config/scripts.js +6 -0
- package/src/generators/repo-config/scripts.js.map +1 -0
- package/src/index.js +2 -0
- package/src/index.js.map +1 -0
- package/src/shared/dependencies.d.ts +73 -0
- package/src/shared/dependencies.js +79 -0
- package/src/shared/dependencies.js.map +1 -0
- package/src/shared/enums/base-generator-type.d.ts +4 -0
- package/src/shared/enums/base-generator-type.js +9 -0
- package/src/shared/enums/base-generator-type.js.map +1 -0
- package/src/shared/enums/index.js +5 -0
- package/src/shared/enums/index.js.map +1 -0
- package/src/shared/generators/api-client/generator.d.ts +6 -0
- package/src/shared/generators/api-client/generator.js +37 -0
- package/src/shared/generators/api-client/generator.js.map +1 -0
- package/src/shared/generators/api-client/index.js +5 -0
- package/src/shared/generators/api-client/index.js.map +1 -0
- package/src/shared/generators/app-env/generator.d.ts +8 -0
- package/src/shared/generators/app-env/generator.js +28 -0
- package/src/shared/generators/app-env/generator.js.map +1 -0
- package/src/shared/generators/app-env/index.js +5 -0
- package/src/shared/generators/app-env/index.js.map +1 -0
- package/src/shared/generators/auth/generator.d.ts +4 -0
- package/src/shared/generators/auth/generator.js +82 -0
- package/src/shared/generators/auth/generator.js.map +1 -0
- package/src/shared/generators/auth/index.js +5 -0
- package/src/shared/generators/auth/index.js.map +1 -0
- package/src/shared/generators/form-utils/generator.d.ts +5 -0
- package/src/shared/generators/form-utils/generator.js +24 -0
- package/src/shared/generators/form-utils/generator.js.map +1 -0
- package/src/shared/generators/form-utils/index.js +5 -0
- package/src/shared/generators/form-utils/index.js.map +1 -0
- package/src/shared/generators/index.js +12 -0
- package/src/shared/generators/index.js.map +1 -0
- package/src/shared/generators/rn-styles/generator.d.ts +6 -0
- package/src/shared/generators/rn-styles/generator.js +36 -0
- package/src/shared/generators/rn-styles/generator.js.map +1 -0
- package/src/shared/generators/rn-styles/index.js +5 -0
- package/src/shared/generators/rn-styles/index.js.map +1 -0
- package/src/shared/generators/storage/generator.d.ts +6 -0
- package/src/shared/generators/storage/generator.js +27 -0
- package/src/shared/generators/storage/generator.js.map +1 -0
- package/src/shared/generators/storage/index.js +5 -0
- package/src/shared/generators/storage/index.js.map +1 -0
- package/src/shared/generators/store/generator.d.ts +4 -0
- package/src/shared/generators/store/generator.js +36 -0
- package/src/shared/generators/store/generator.js.map +1 -0
- package/src/shared/generators/store/index.js +5 -0
- package/src/shared/generators/store/index.js.map +1 -0
- package/src/shared/generators/ui-kitten/generator.d.ts +6 -0
- package/src/shared/generators/ui-kitten/generator.js +40 -0
- package/src/shared/generators/ui-kitten/generator.js.map +1 -0
- package/src/shared/generators/ui-kitten/index.js +5 -0
- package/src/shared/generators/ui-kitten/index.js.map +1 -0
- package/src/shared/templates/config-template.json +2 -12
- package/src/shared/utils/cli-utils.d.ts +31 -0
- package/src/shared/utils/cli-utils.js +129 -0
- package/src/shared/utils/cli-utils.js.map +1 -0
- package/src/shared/utils/config-utils.d.ts +19 -0
- package/src/shared/utils/config-utils.js +124 -0
- package/src/shared/utils/config-utils.js.map +1 -0
- package/src/shared/utils/constants.d.ts +3 -0
- package/src/shared/utils/constants.js +7 -0
- package/src/shared/utils/constants.js.map +1 -0
- package/src/shared/utils/dynamic-import.d.ts +1 -0
- package/src/shared/utils/dynamic-import.js +5 -0
- package/src/shared/utils/dynamic-import.js.map +1 -0
- package/src/shared/utils/format-utils.d.ts +4 -0
- package/src/shared/utils/format-utils.js +18 -0
- package/src/shared/utils/format-utils.js.map +1 -0
- package/src/shared/utils/get-lib-directory-name.d.ts +1 -0
- package/src/shared/utils/get-lib-directory-name.js +15 -0
- package/src/shared/utils/get-lib-directory-name.js.map +1 -0
- package/src/shared/utils/index.js +11 -0
- package/src/shared/utils/index.js.map +1 -0
- package/src/shared/utils/ts-utils.d.ts +2 -0
- package/src/shared/utils/ts-utils.js +22 -0
- package/src/shared/utils/ts-utils.js.map +1 -0
- package/.eslintrc.json +0 -37
- package/jest.config.ts +0 -10
- package/project.json +0 -61
- package/src/generators/code-checks/config.ts +0 -17
- package/src/generators/code-checks/generator.ts +0 -72
- package/src/generators/code-checks/scripts.ts +0 -5
- package/src/generators/entity-api/generator.ts +0 -127
- package/src/generators/expo-app/generator.ts +0 -152
- package/src/generators/expo-app/scripts.ts +0 -12
- package/src/generators/form/generator.ts +0 -53
- package/src/generators/form/utils/add-form-usage.ts +0 -86
- package/src/generators/form/utils/get-app-name.ts +0 -3
- package/src/generators/form/utils/get-form-utils-directory.ts +0 -46
- package/src/generators/form/utils/update-index.ts +0 -14
- package/src/generators/lib-move/generator.ts +0 -57
- package/src/generators/lib-remove/generator.ts +0 -25
- package/src/generators/lib-rename/generator.ts +0 -25
- package/src/generators/lib-tags/generator.ts +0 -68
- package/src/generators/lib-tags/interfaces/context.ts +0 -9
- package/src/generators/lib-tags/utils/check-lib-tags.ts +0 -143
- package/src/generators/next-app/generator.ts +0 -99
- package/src/generators/react-component/generator.ts +0 -80
- package/src/generators/react-lib/generator.ts +0 -86
- package/src/generators/repo-config/generator.ts +0 -44
- package/src/generators/repo-config/scripts.ts +0 -3
- package/src/shared/dependencies.ts +0 -76
- package/src/shared/enums/base-generator-type.ts +0 -4
- package/src/shared/generators/api-client/generator.ts +0 -49
- package/src/shared/generators/app-env/generator.ts +0 -37
- package/src/shared/generators/auth/generator.ts +0 -107
- package/src/shared/generators/form-utils/generator.ts +0 -23
- package/src/shared/generators/rn-styles/generator.ts +0 -49
- package/src/shared/generators/storage/generator.ts +0 -34
- package/src/shared/generators/store/generator.ts +0 -48
- package/src/shared/generators/ui-kitten/generator.ts +0 -55
- package/src/shared/utils/cli-utils.ts +0 -149
- package/src/shared/utils/config-utils.ts +0 -146
- package/src/shared/utils/constants.ts +0 -3
- package/src/shared/utils/dynamic-import.ts +0 -4
- package/src/shared/utils/format-utils.ts +0 -16
- package/src/shared/utils/get-lib-directory-name.ts +0 -12
- package/src/shared/utils/ts-utils.ts +0 -17
- package/tsconfig.json +0 -16
- package/tsconfig.lib.json +0 -10
- package/tsconfig.spec.json +0 -14
- /package/src/generators/form/utils/{index.ts → index.d.ts} +0 -0
- /package/src/generators/lib-tags/interfaces/{index.ts → index.d.ts} +0 -0
- /package/src/generators/lib-tags/types/{index.ts → index.d.ts} +0 -0
- /package/src/generators/lib-tags/types/{tag.ts → tag.d.ts} +0 -0
- /package/src/generators/lib-tags/utils/{index.ts → index.d.ts} +0 -0
- /package/src/{index.ts → index.d.ts} +0 -0
- /package/src/shared/enums/{index.ts → index.d.ts} +0 -0
- /package/src/shared/generators/api-client/{index.ts → index.d.ts} +0 -0
- /package/src/shared/generators/app-env/{index.ts → index.d.ts} +0 -0
- /package/src/shared/generators/auth/{index.ts → index.d.ts} +0 -0
- /package/src/shared/generators/form-utils/{index.ts → index.d.ts} +0 -0
- /package/src/shared/generators/{index.ts → index.d.ts} +0 -0
- /package/src/shared/generators/rn-styles/{index.ts → index.d.ts} +0 -0
- /package/src/shared/generators/storage/{index.ts → index.d.ts} +0 -0
- /package/src/shared/generators/store/{index.ts → index.d.ts} +0 -0
- /package/src/shared/generators/ui-kitten/{index.ts → index.d.ts} +0 -0
- /package/src/shared/utils/{index.ts → index.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -85,7 +85,9 @@ Generates and configures an Expo React Native app.
|
|
|
85
85
|
```sh
|
|
86
86
|
npx nx g expo-app --name=my-app --directory=mobile
|
|
87
87
|
```
|
|
88
|
+
|
|
88
89
|
or
|
|
90
|
+
|
|
89
91
|
```sh
|
|
90
92
|
npx nx g expo-app my-app mobile
|
|
91
93
|
```
|
|
@@ -105,7 +107,9 @@ Generates and configures a Next.js app.
|
|
|
105
107
|
```sh
|
|
106
108
|
npx nx g next-app --name=my-app --directory=web
|
|
107
109
|
```
|
|
110
|
+
|
|
108
111
|
or
|
|
112
|
+
|
|
109
113
|
```sh
|
|
110
114
|
npx nx g next-app my-app web
|
|
111
115
|
```
|
|
@@ -141,7 +145,9 @@ Generates a library according to [NX notation](https://nx.dev/concepts/more-conc
|
|
|
141
145
|
```sh
|
|
142
146
|
npx nx g react-lib --app=mobile --scope=account --type=features --name=profile-settings --withComponent --withComponentForwardRef --dryRun
|
|
143
147
|
```
|
|
148
|
+
|
|
144
149
|
or
|
|
150
|
+
|
|
145
151
|
```sh
|
|
146
152
|
npx nx g react-lib --dryRun
|
|
147
153
|
```
|
|
@@ -235,7 +241,9 @@ Creates a React component in particular library.
|
|
|
235
241
|
```sh
|
|
236
242
|
npx nx g react-component --name=AppButton --subcomponent --withForwardRef
|
|
237
243
|
```
|
|
244
|
+
|
|
238
245
|
or
|
|
246
|
+
|
|
239
247
|
```sh
|
|
240
248
|
npx nx g react-component AppButton --subcomponent --withForwardRef
|
|
241
249
|
```
|
|
@@ -256,7 +264,9 @@ Generates a form schema class and adds its usage to a component or a hook.
|
|
|
256
264
|
```sh
|
|
257
265
|
npx nx g form --name=profile-settings --placeOfUse=ProfileSettings
|
|
258
266
|
```
|
|
267
|
+
|
|
259
268
|
or
|
|
269
|
+
|
|
260
270
|
```sh
|
|
261
271
|
npx nx g form profile-settings ProfileSettings
|
|
262
272
|
```
|
|
@@ -286,4 +296,3 @@ Each generator accepts the `--help` argument to see generator instructions.
|
|
|
286
296
|
```sh
|
|
287
297
|
npx nx g react-lib --help
|
|
288
298
|
```
|
|
289
|
-
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ronas-it/nx-generators",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.5",
|
|
4
4
|
"description": "NX generators for Ronas IT projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ronas IT",
|
|
@@ -34,5 +34,6 @@
|
|
|
34
34
|
"type": "commonjs",
|
|
35
35
|
"main": "./src/index.js",
|
|
36
36
|
"typings": "./src/index.d.ts",
|
|
37
|
-
"generators": "./generators.json"
|
|
38
|
-
|
|
37
|
+
"generators": "./generators.json",
|
|
38
|
+
"types": "./src/index.d.ts"
|
|
39
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'lint-staged': {
|
|
3
|
+
'*.{ts,tsx}': string;
|
|
4
|
+
'*.{ts,tsx,js,html,json,md}': string;
|
|
5
|
+
'*.{ts,tsx,js}': string;
|
|
6
|
+
};
|
|
7
|
+
tsconfig: {
|
|
8
|
+
jsx: string;
|
|
9
|
+
allowJs: boolean;
|
|
10
|
+
noEmit: boolean;
|
|
11
|
+
strict: boolean;
|
|
12
|
+
allowSyntheticDefaultImports: boolean;
|
|
13
|
+
noImplicitAny: boolean;
|
|
14
|
+
strictPropertyInitialization: boolean;
|
|
15
|
+
strictNullChecks: boolean;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
'lint-staged': {
|
|
5
|
+
'*.{ts,tsx}': 'tsc-files --noEmit types.d.ts',
|
|
6
|
+
'*.{ts,tsx,js,html,json,md}': 'prettier --write',
|
|
7
|
+
'*.{ts,tsx,js}': 'eslint --cache --fix',
|
|
8
|
+
},
|
|
9
|
+
tsconfig: {
|
|
10
|
+
jsx: 'react-native',
|
|
11
|
+
allowJs: true,
|
|
12
|
+
noEmit: true,
|
|
13
|
+
strict: true,
|
|
14
|
+
allowSyntheticDefaultImports: true,
|
|
15
|
+
noImplicitAny: true,
|
|
16
|
+
strictPropertyInitialization: false,
|
|
17
|
+
strictNullChecks: true,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/code-checks/config.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,aAAa,EAAE;QACb,YAAY,EAAE,+BAA+B;QAC7C,4BAA4B,EAAE,kBAAkB;QAChD,eAAe,EAAE,sBAAsB;KACxC;IACD,QAAQ,EAAE;QACR,GAAG,EAAE,cAAc;QACnB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;QACZ,4BAA4B,EAAE,IAAI;QAClC,aAAa,EAAE,IAAI;QACnB,4BAA4B,EAAE,KAAK;QACnC,gBAAgB,EAAE,IAAI;KACvB;CACF,CAAC"}
|
|
@@ -2,5 +2,177 @@
|
|
|
2
2
|
"root": true,
|
|
3
3
|
"plugins": ["@nx"],
|
|
4
4
|
"extends": ["./.eslint.ronasit.json"],
|
|
5
|
-
"overrides": [
|
|
5
|
+
"overrides": [
|
|
6
|
+
{
|
|
7
|
+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
8
|
+
"rules": {
|
|
9
|
+
"@stylistic/array-bracket-newline": "off",
|
|
10
|
+
"@stylistic/array-bracket-spacing": "off",
|
|
11
|
+
"@stylistic/array-element-newline": "off",
|
|
12
|
+
"@stylistic/arrow-parens": "off",
|
|
13
|
+
"@stylistic/arrow-spacing": "off",
|
|
14
|
+
"@stylistic/block-spacing": "off",
|
|
15
|
+
"@stylistic/brace-style": "off",
|
|
16
|
+
"@stylistic/comma-dangle": "off",
|
|
17
|
+
"@stylistic/comma-spacing": "off",
|
|
18
|
+
"@stylistic/comma-style": "off",
|
|
19
|
+
"@stylistic/computed-property-spacing": "off",
|
|
20
|
+
"@stylistic/dot-location": "off",
|
|
21
|
+
"@stylistic/eol-last": "off",
|
|
22
|
+
"@stylistic/func-call-spacing": "off",
|
|
23
|
+
"@stylistic/function-call-argument-newline": "off",
|
|
24
|
+
"@stylistic/function-call-spacing": "off",
|
|
25
|
+
"@stylistic/function-paren-newline": "off",
|
|
26
|
+
"@stylistic/generator-star-spacing": "off",
|
|
27
|
+
"@stylistic/implicit-arrow-linebreak": "off",
|
|
28
|
+
"@stylistic/indent": "off",
|
|
29
|
+
"@stylistic/jsx-quotes": "off",
|
|
30
|
+
"@stylistic/key-spacing": "off",
|
|
31
|
+
"@stylistic/keyword-spacing": "off",
|
|
32
|
+
"@stylistic/linebreak-style": "off",
|
|
33
|
+
"@stylistic/max-statements-per-line": "off",
|
|
34
|
+
"@stylistic/multiline-ternary": "off",
|
|
35
|
+
"@stylistic/new-parens": "off",
|
|
36
|
+
"@stylistic/newline-per-chained-call": "off",
|
|
37
|
+
"@stylistic/no-extra-parens": "off",
|
|
38
|
+
"@stylistic/no-extra-semi": "off",
|
|
39
|
+
"@stylistic/no-floating-decimal": "off",
|
|
40
|
+
"@stylistic/no-mixed-spaces-and-tabs": "off",
|
|
41
|
+
"@stylistic/no-multi-spaces": "off",
|
|
42
|
+
"@stylistic/no-multiple-empty-lines": "off",
|
|
43
|
+
"@stylistic/no-trailing-spaces": "off",
|
|
44
|
+
"@stylistic/no-whitespace-before-property": "off",
|
|
45
|
+
"@stylistic/nonblock-statement-body-position": "off",
|
|
46
|
+
"@stylistic/object-curly-newline": "off",
|
|
47
|
+
"@stylistic/object-curly-spacing": "off",
|
|
48
|
+
"@stylistic/object-property-newline": "off",
|
|
49
|
+
"@stylistic/one-var-declaration-per-line": "off",
|
|
50
|
+
"@stylistic/operator-linebreak": "off",
|
|
51
|
+
"@stylistic/padded-blocks": "off",
|
|
52
|
+
"@stylistic/quote-props": "off",
|
|
53
|
+
"@stylistic/rest-spread-spacing": "off",
|
|
54
|
+
"@stylistic/semi": "off",
|
|
55
|
+
"@stylistic/semi-spacing": "off",
|
|
56
|
+
"@stylistic/semi-style": "off",
|
|
57
|
+
"@stylistic/space-before-blocks": "off",
|
|
58
|
+
"@stylistic/space-before-function-paren": "off",
|
|
59
|
+
"@stylistic/space-in-parens": "off",
|
|
60
|
+
"@stylistic/space-infix-ops": "off",
|
|
61
|
+
"@stylistic/space-unary-ops": "off",
|
|
62
|
+
"@stylistic/switch-colon-spacing": "off",
|
|
63
|
+
"@stylistic/template-curly-spacing": "off",
|
|
64
|
+
"@stylistic/template-tag-spacing": "off",
|
|
65
|
+
"@stylistic/wrap-iife": "off",
|
|
66
|
+
"@stylistic/wrap-regex": "off",
|
|
67
|
+
"@stylistic/yield-star-spacing": "off",
|
|
68
|
+
"@stylistic/member-delimiter-style": "off",
|
|
69
|
+
"@stylistic/type-annotation-spacing": "off",
|
|
70
|
+
"@stylistic/jsx-child-element-spacing": "off",
|
|
71
|
+
"@stylistic/jsx-closing-bracket-location": "off",
|
|
72
|
+
"@stylistic/jsx-closing-tag-location": "off",
|
|
73
|
+
"@stylistic/jsx-curly-newline": "off",
|
|
74
|
+
"@stylistic/jsx-curly-spacing": "off",
|
|
75
|
+
"@stylistic/jsx-equals-spacing": "off",
|
|
76
|
+
"@stylistic/jsx-first-prop-new-line": "off",
|
|
77
|
+
"@stylistic/jsx-indent": "off",
|
|
78
|
+
"@stylistic/jsx-indent-props": "off",
|
|
79
|
+
"@stylistic/jsx-max-props-per-line": "off",
|
|
80
|
+
"@stylistic/jsx-newline": "off",
|
|
81
|
+
"@stylistic/jsx-one-expression-per-line": "off",
|
|
82
|
+
"@stylistic/jsx-props-no-multi-spaces": "off",
|
|
83
|
+
"@stylistic/jsx-tag-spacing": "off",
|
|
84
|
+
"@stylistic/jsx-wrap-multilines": "off",
|
|
85
|
+
"@stylistic/indent-binary-ops": "off",
|
|
86
|
+
"@stylistic/type-generic-spacing": "off",
|
|
87
|
+
"@stylistic/type-named-tuple-spacing": "off",
|
|
88
|
+
"@stylistic/js/array-bracket-newline": "off",
|
|
89
|
+
"@stylistic/js/array-bracket-spacing": "off",
|
|
90
|
+
"@stylistic/js/array-element-newline": "off",
|
|
91
|
+
"@stylistic/js/arrow-parens": "off",
|
|
92
|
+
"@stylistic/js/arrow-spacing": "off",
|
|
93
|
+
"@stylistic/js/block-spacing": "off",
|
|
94
|
+
"@stylistic/js/brace-style": "off",
|
|
95
|
+
"@stylistic/js/comma-dangle": "off",
|
|
96
|
+
"@stylistic/js/comma-spacing": "off",
|
|
97
|
+
"@stylistic/js/comma-style": "off",
|
|
98
|
+
"@stylistic/js/computed-property-spacing": "off",
|
|
99
|
+
"@stylistic/js/dot-location": "off",
|
|
100
|
+
"@stylistic/js/eol-last": "off",
|
|
101
|
+
"@stylistic/js/func-call-spacing": "off",
|
|
102
|
+
"@stylistic/js/function-call-argument-newline": "off",
|
|
103
|
+
"@stylistic/js/function-call-spacing": "off",
|
|
104
|
+
"@stylistic/js/function-paren-newline": "off",
|
|
105
|
+
"@stylistic/js/generator-star-spacing": "off",
|
|
106
|
+
"@stylistic/js/implicit-arrow-linebreak": "off",
|
|
107
|
+
"@stylistic/js/indent": "off",
|
|
108
|
+
"@stylistic/js/jsx-quotes": "off",
|
|
109
|
+
"@stylistic/js/key-spacing": "off",
|
|
110
|
+
"@stylistic/js/keyword-spacing": "off",
|
|
111
|
+
"@stylistic/js/linebreak-style": "off",
|
|
112
|
+
"@stylistic/js/max-statements-per-line": "off",
|
|
113
|
+
"@stylistic/js/multiline-ternary": "off",
|
|
114
|
+
"@stylistic/js/new-parens": "off",
|
|
115
|
+
"@stylistic/js/newline-per-chained-call": "off",
|
|
116
|
+
"@stylistic/js/no-extra-parens": "off",
|
|
117
|
+
"@stylistic/js/no-extra-semi": "off",
|
|
118
|
+
"@stylistic/js/no-floating-decimal": "off",
|
|
119
|
+
"@stylistic/js/no-mixed-spaces-and-tabs": "off",
|
|
120
|
+
"@stylistic/js/no-multi-spaces": "off",
|
|
121
|
+
"@stylistic/js/no-multiple-empty-lines": "off",
|
|
122
|
+
"@stylistic/js/no-trailing-spaces": "off",
|
|
123
|
+
"@stylistic/js/no-whitespace-before-property": "off",
|
|
124
|
+
"@stylistic/js/nonblock-statement-body-position": "off",
|
|
125
|
+
"@stylistic/js/object-curly-newline": "off",
|
|
126
|
+
"@stylistic/js/object-curly-spacing": "off",
|
|
127
|
+
"@stylistic/js/object-property-newline": "off",
|
|
128
|
+
"@stylistic/js/one-var-declaration-per-line": "off",
|
|
129
|
+
"@stylistic/js/operator-linebreak": "off",
|
|
130
|
+
"@stylistic/js/padded-blocks": "off",
|
|
131
|
+
"@stylistic/js/quote-props": "off",
|
|
132
|
+
"@stylistic/js/rest-spread-spacing": "off",
|
|
133
|
+
"@stylistic/js/semi": "off",
|
|
134
|
+
"@stylistic/js/semi-spacing": "off",
|
|
135
|
+
"@stylistic/js/semi-style": "off",
|
|
136
|
+
"@stylistic/js/space-before-blocks": "off",
|
|
137
|
+
"@stylistic/js/space-before-function-paren": "off",
|
|
138
|
+
"@stylistic/js/space-in-parens": "off",
|
|
139
|
+
"@stylistic/js/space-infix-ops": "off",
|
|
140
|
+
"@stylistic/js/space-unary-ops": "off",
|
|
141
|
+
"@stylistic/js/switch-colon-spacing": "off",
|
|
142
|
+
"@stylistic/js/template-curly-spacing": "off",
|
|
143
|
+
"@stylistic/js/template-tag-spacing": "off",
|
|
144
|
+
"@stylistic/js/wrap-iife": "off",
|
|
145
|
+
"@stylistic/js/wrap-regex": "off",
|
|
146
|
+
"@stylistic/js/yield-star-spacing": "off",
|
|
147
|
+
"@stylistic/ts/block-spacing": "off",
|
|
148
|
+
"@stylistic/ts/brace-style": "off",
|
|
149
|
+
"@stylistic/ts/comma-dangle": "off",
|
|
150
|
+
"@stylistic/ts/comma-spacing": "off",
|
|
151
|
+
"@stylistic/ts/func-call-spacing": "off",
|
|
152
|
+
"@stylistic/ts/function-call-spacing": "off",
|
|
153
|
+
"@stylistic/ts/indent": "off",
|
|
154
|
+
"@stylistic/ts/key-spacing": "off",
|
|
155
|
+
"@stylistic/ts/keyword-spacing": "off",
|
|
156
|
+
"@stylistic/ts/member-delimiter-style": "off",
|
|
157
|
+
"@stylistic/ts/no-extra-parens": "off",
|
|
158
|
+
"@stylistic/ts/no-extra-semi": "off",
|
|
159
|
+
"@stylistic/ts/object-curly-spacing": "off",
|
|
160
|
+
"@stylistic/ts/semi": "off",
|
|
161
|
+
"@stylistic/ts/space-before-blocks": "off",
|
|
162
|
+
"@stylistic/ts/space-before-function-paren": "off",
|
|
163
|
+
"@stylistic/ts/space-infix-ops": "off",
|
|
164
|
+
"@stylistic/ts/type-annotation-spacing": "off",
|
|
165
|
+
"@stylistic/jsx/jsx-child-element-spacing": "off",
|
|
166
|
+
"@stylistic/jsx/jsx-closing-bracket-location": "off",
|
|
167
|
+
"@stylistic/jsx/jsx-closing-tag-location": "off",
|
|
168
|
+
"@stylistic/jsx/jsx-curly-newline": "off",
|
|
169
|
+
"@stylistic/jsx/jsx-curly-spacing": "off",
|
|
170
|
+
"@stylistic/jsx/jsx-equals-spacing": "off",
|
|
171
|
+
"@stylistic/jsx/jsx-first-prop-new-line": "off",
|
|
172
|
+
"@stylistic/jsx/jsx-indent": "off",
|
|
173
|
+
"@stylistic/jsx/jsx-indent-props": "off",
|
|
174
|
+
"@stylistic/jsx/jsx-max-props-per-line": "off"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
]
|
|
6
178
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.codeChecksGenerator = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const child_process_1 = require("child_process");
|
|
6
|
+
const path = require("path");
|
|
7
|
+
const devkit_1 = require("@nx/devkit");
|
|
8
|
+
const dependencies_1 = require("../../shared/dependencies");
|
|
9
|
+
const config_1 = require("./config");
|
|
10
|
+
const scripts_1 = require("./scripts");
|
|
11
|
+
function codeChecksGenerator(tree, options) {
|
|
12
|
+
var _a, _b;
|
|
13
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
14
|
+
const projectRoot = '.';
|
|
15
|
+
// Delete files
|
|
16
|
+
tree.delete('.eslintrc.json');
|
|
17
|
+
tree.delete('eslint.config.cjs');
|
|
18
|
+
tree.delete('.prettierrc');
|
|
19
|
+
// Configure pre-commit hook
|
|
20
|
+
(0, child_process_1.execSync)('npx mrm@2 lint-staged', { stdio: 'inherit' });
|
|
21
|
+
const packageJson = (0, devkit_1.readJson)(tree, 'package.json');
|
|
22
|
+
packageJson['lint-staged'] = config_1.default['lint-staged'];
|
|
23
|
+
packageJson.scripts = Object.assign(Object.assign({}, scripts_1.default), packageJson.scripts);
|
|
24
|
+
(0, devkit_1.writeJson)(tree, 'package.json', packageJson);
|
|
25
|
+
// Update tsconfig.base.json
|
|
26
|
+
const tsconfigJson = (0, devkit_1.readJson)(tree, 'tsconfig.base.json');
|
|
27
|
+
tsconfigJson.compilerOptions = Object.assign(Object.assign({}, config_1.default.tsconfig), tsconfigJson.compilerOptions);
|
|
28
|
+
(0, devkit_1.writeJson)(tree, 'tsconfig.base.json', tsconfigJson);
|
|
29
|
+
// Update .gitignore
|
|
30
|
+
const gitignoreContent = ((_a = tree.read('.gitignore')) === null || _a === void 0 ? void 0 : _a.toString()) + '\n.eslintcache\n';
|
|
31
|
+
tree.write('.gitignore', gitignoreContent);
|
|
32
|
+
// Update .eslintignore
|
|
33
|
+
const eslintignoreContent = ((_b = tree.read('.eslintignore')) === null || _b === void 0 ? void 0 : _b.toString()) + '\n**/*.js\napps/*/app.config.ts\n';
|
|
34
|
+
tree.write('.eslintignore', eslintignoreContent);
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
36
|
+
const configTemplate = require('../../shared/templates/config-template.json');
|
|
37
|
+
// Add files
|
|
38
|
+
(0, devkit_1.generateFiles)(tree, path.join(__dirname, 'files'), projectRoot, options);
|
|
39
|
+
// Add rules to .eslintrc.json
|
|
40
|
+
const esLintConfig = (0, devkit_1.readJson)(tree, '.eslintrc.json');
|
|
41
|
+
esLintConfig.overrides.push(configTemplate);
|
|
42
|
+
(0, devkit_1.writeJson)(tree, '.eslintrc.json', esLintConfig);
|
|
43
|
+
// Install necessary dependencies
|
|
44
|
+
(0, devkit_1.addDependenciesToPackageJson)(tree, {}, dependencies_1.devDependencies['code-checks']);
|
|
45
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
46
|
+
return () => {
|
|
47
|
+
(0, devkit_1.installPackagesTask)(tree);
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
exports.codeChecksGenerator = codeChecksGenerator;
|
|
52
|
+
exports.default = codeChecksGenerator;
|
|
53
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/code-checks/generator.ts"],"names":[],"mappings":";;;;AAAA,iDAAyC;AACzC,6BAA6B;AAC7B,uCAQoB;AACpB,4DAA4D;AAC5D,qCAA8B;AAE9B,uCAAgC;AAEhC,SAAsB,mBAAmB,CAAC,IAAU,EAAE,OAAkC;;;QACtF,MAAM,WAAW,GAAG,GAAG,CAAC;QAExB,eAAe;QACf,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAC9B,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;QACjC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAE3B,4BAA4B;QAC5B,IAAA,wBAAQ,EAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAExD,MAAM,WAAW,GAAG,IAAA,iBAAQ,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;QACnD,WAAW,CAAC,aAAa,CAAC,GAAG,gBAAM,CAAC,aAAa,CAAC,CAAC;QACnD,WAAW,CAAC,OAAO,mCAAQ,iBAAO,GAAK,WAAW,CAAC,OAAO,CAAE,CAAC;QAC7D,IAAA,kBAAS,EAAC,IAAI,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;QAE7C,4BAA4B;QAC5B,MAAM,YAAY,GAAG,IAAA,iBAAQ,EAAC,IAAI,EAAE,oBAAoB,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AC;;CACH;AAjDD,kDAiDC;AAED,kBAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
lint: 'npx tsc && cross-env ESLINT_USE_FLAT_CONFIG=false npx eslint ./',
|
|
5
|
+
format: 'npx prettier --write . && npm run lint -- --fix',
|
|
6
|
+
prepare: 'husky',
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=scripts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scripts.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/code-checks/scripts.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,IAAI,EAAE,iEAAiE;IACvE,MAAM,EAAE,iDAAiD;IACzD,OAAO,EAAE,OAAO;CACjB,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.entityApiGenerator = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
const devkit_1 = require("@nx/devkit");
|
|
7
|
+
const lodash_1 = require("lodash");
|
|
8
|
+
const ts_morph_1 = require("ts-morph");
|
|
9
|
+
const utils_1 = require("../../shared/utils");
|
|
10
|
+
function entityApiGenerator(tree, options) {
|
|
11
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
|
+
const { default: autocomplete } = yield (0, utils_1.dynamicImport)('inquirer-autocomplete-standalone');
|
|
13
|
+
const nxLibsPaths = (0, utils_1.getNxLibsPaths)([utils_1.LibraryType.DATA_ACCESS]);
|
|
14
|
+
const apiLibsPaths = (0, utils_1.searchNxLibsPaths)(nxLibsPaths, 'data-access/api/src', 'endsWith');
|
|
15
|
+
const apiClientLibsPaths = (0, utils_1.searchNxLibsPaths)(nxLibsPaths, 'data-access/api-client/src', 'endsWith');
|
|
16
|
+
if (!apiClientLibsPaths.length) {
|
|
17
|
+
throw new Error('Could not find API Client path.');
|
|
18
|
+
}
|
|
19
|
+
if (!apiLibsPaths.length) {
|
|
20
|
+
throw new Error('Could not find API path.');
|
|
21
|
+
}
|
|
22
|
+
if (apiClientLibsPaths.length > 1) {
|
|
23
|
+
apiClientLibsPaths[0] = yield autocomplete({
|
|
24
|
+
message: 'Select the api client library path:',
|
|
25
|
+
source: (input) => (0, utils_1.filterSource)(input, apiClientLibsPaths),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
if (apiLibsPaths.length > 1) {
|
|
29
|
+
apiLibsPaths[0] = yield autocomplete({
|
|
30
|
+
message: 'Select the api library path:',
|
|
31
|
+
source: (input) => (0, utils_1.filterSource)(input, apiLibsPaths),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
const apiDirectory = (0, utils_1.searchAliasPath)(apiLibsPaths[0]);
|
|
35
|
+
const apiClientDirectory = (0, utils_1.searchAliasPath)(apiClientLibsPaths[0]);
|
|
36
|
+
const libPath = apiLibsPaths[0];
|
|
37
|
+
const libRootPath = `${libPath}/lib`;
|
|
38
|
+
const cliReadline = (0, utils_1.createCliReadline)();
|
|
39
|
+
options.name =
|
|
40
|
+
options.name || (yield (0, utils_1.askQuestion)('Enter the name of the entity (e.g: User): ', undefined, cliReadline));
|
|
41
|
+
const apiName = (0, lodash_1.kebabCase)(options.name);
|
|
42
|
+
options.baseEndpoint =
|
|
43
|
+
options.baseEndpoint || (yield (0, utils_1.askQuestion)('Enter the base endpoint (e.g: /users): ', `/${apiName}`, cliReadline));
|
|
44
|
+
cliReadline.close();
|
|
45
|
+
const apiPath = `${libRootPath}/${apiName}`;
|
|
46
|
+
const entityName = (0, lodash_1.startCase)((0, lodash_1.camelCase)(apiName)).replace(/\s+/g, '');
|
|
47
|
+
(0, devkit_1.generateFiles)(tree, path.join(__dirname, `files`), apiPath, Object.assign(Object.assign({}, options), { apiName: (0, lodash_1.camelCase)(options.name), entityName, entityFileName: apiName, apiClientDirectory, baseEndpoint: options.baseEndpoint.startsWith('/') ? options.baseEndpoint : `/${options.baseEndpoint}` }));
|
|
48
|
+
tree.rename(`${apiPath}/models/entity.ts`, `${apiPath}/models/${apiName}.ts`);
|
|
49
|
+
(0, utils_1.appendFileContent)(`${libRootPath}/index.ts`, `export * from './${apiName}';\n`, tree);
|
|
50
|
+
const storeLibsPaths = (0, utils_1.searchNxLibsPaths)(nxLibsPaths, 'data-access/store/src', 'endsWith');
|
|
51
|
+
if (!storeLibsPaths.length) {
|
|
52
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
53
|
+
throw new Error('Could not find redux store path.');
|
|
54
|
+
}
|
|
55
|
+
if (storeLibsPaths.length > 1) {
|
|
56
|
+
storeLibsPaths[0] = yield autocomplete({
|
|
57
|
+
message: 'Select the store library path:',
|
|
58
|
+
source: (input) => (0, utils_1.filterSource)(input, storeLibsPaths),
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
// Update redux store
|
|
62
|
+
const apiNameDeclaration = (0, lodash_1.camelCase)(options.name + 'Api');
|
|
63
|
+
const project = new ts_morph_1.Project({
|
|
64
|
+
manipulationSettings: {
|
|
65
|
+
indentationText: ts_morph_1.IndentationText.TwoSpaces,
|
|
66
|
+
quoteKind: ts_morph_1.QuoteKind.Single,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
const store = project.addSourceFileAtPath(`${storeLibsPaths[0]}/store.ts`);
|
|
70
|
+
(0, utils_1.addNamedImport)(apiNameDeclaration, apiDirectory, store);
|
|
71
|
+
const rootReducer = store.getVariableDeclarationOrThrow('rootReducer');
|
|
72
|
+
rootReducer.getInitializerIfKindOrThrow(ts_morph_1.SyntaxKind.ObjectLiteralExpression).addProperty({
|
|
73
|
+
name: `[${apiNameDeclaration}.reducerPath]`,
|
|
74
|
+
initializer: `${apiNameDeclaration}.reducer`,
|
|
75
|
+
kind: ts_morph_1.StructureKind.PropertyAssignment,
|
|
76
|
+
});
|
|
77
|
+
const middlewares = store.getVariableDeclarationOrThrow('middlewares');
|
|
78
|
+
middlewares
|
|
79
|
+
.getInitializerIfKindOrThrow(ts_morph_1.SyntaxKind.ArrayLiteralExpression)
|
|
80
|
+
.addElement(`${apiNameDeclaration}.middleware`);
|
|
81
|
+
project.saveSync();
|
|
82
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
exports.entityApiGenerator = entityApiGenerator;
|
|
86
|
+
exports.default = entityApiGenerator;
|
|
87
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/entity-api/generator.ts"],"names":[],"mappings":";;;;AAAA,6BAA6B;AAC7B,uCAA8D;AAC9D,mCAAyD;AACzD,uCAA0F;AAC1F,8CAW4B;AAG5B,SAAsB,kBAAkB,CAAC,IAAU,EAAE,OAAiC;;QACpF,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,MAAM,IAAA,qBAAa,EACnD,kCAAkC,CACnC,CAAC;QACF,MAAM,WAAW,GAAG,IAAA,sBAAc,EAAC,CAAC,mBAAW,CAAC,WAAW,CAAC,CAAC,CAAC;QAC9D,MAAM,YAAY,GAAG,IAAA,yBAAiB,EAAC,WAAW,EAAE,qBAAqB,EAAE,UAAU,CAAC,CAAC;QACvF,MAAM,kBAAkB,GAAG,IAAA,yBAAiB,EAAC,WAAW,EAAE,4BAA4B,EAAE,UAAU,CAAC,CAAC;QAEpG,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC9C,CAAC;QAED,IAA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 = require("tslib");
|
|
5
|
+
const child_process_1 = require("child_process");
|
|
6
|
+
const fs_1 = require("fs");
|
|
7
|
+
const path = require("path");
|
|
8
|
+
const devkit_1 = require("@nx/devkit");
|
|
9
|
+
const dependencies_1 = require("../../shared/dependencies");
|
|
10
|
+
const enums_1 = require("../../shared/enums");
|
|
11
|
+
const generators_1 = require("../../shared/generators");
|
|
12
|
+
const utils_1 = require("../../shared/utils");
|
|
13
|
+
const scripts_1 = require("./scripts");
|
|
14
|
+
function expoAppGenerator(tree, options) {
|
|
15
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
const shouldGenerateStoreLib = (yield (0, utils_1.askQuestion)('Do you want to create store lib? (y/n): ')) === 'y';
|
|
17
|
+
const shouldGenerateApiClientLib = shouldGenerateStoreLib && (yield (0, utils_1.askQuestion)('Do you want to create api client lib? (y/n): ')) === 'y';
|
|
18
|
+
const shouldGenerateAuthLibs = shouldGenerateApiClientLib && (yield (0, utils_1.askQuestion)('Do you want to create auth lib? (y/n): ')) === 'y';
|
|
19
|
+
const shouldGenerateFormUtilsLib = (yield (0, utils_1.askQuestion)('Do you want to create a lib with the form utils? (y/n): ')) === 'y';
|
|
20
|
+
const shouldGenerateUIKittenLib = (yield (0, utils_1.askQuestion)('Do you want to install @ui-kitten? (y/n): ')) === 'y';
|
|
21
|
+
const appRoot = `apps/${options.directory}`;
|
|
22
|
+
const i18nRoot = `i18n/${options.directory}`;
|
|
23
|
+
const appTestFolder = `apps/${options.directory}-e2e`;
|
|
24
|
+
const libPath = `${(0, utils_1.getImportPathPrefix)(tree)}/${options.directory}`;
|
|
25
|
+
const tags = [`app:${options.directory}`, 'type:app'];
|
|
26
|
+
// Install @nx/expo plugin
|
|
27
|
+
(0, child_process_1.execSync)('npx nx add @nx/expo', { stdio: 'inherit' });
|
|
28
|
+
if ((0, fs_1.existsSync)(appRoot)) {
|
|
29
|
+
const project = (0, devkit_1.readProjectConfiguration)(tree, options.directory);
|
|
30
|
+
project.tags = [`app:${options.directory}`, 'type:app'];
|
|
31
|
+
(0, devkit_1.updateProjectConfiguration)(tree, project.name, project);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
(0, child_process_1.execSync)(`npx nx g @nx/expo:app ${options.name} --directory=apps/${options.directory} --tags="${tags.join(', ')}" --linter=eslint --unitTestRunner=none --e2eTestRunner=none`, { stdio: 'inherit' });
|
|
35
|
+
}
|
|
36
|
+
// Generate shared libs
|
|
37
|
+
yield (0, generators_1.runAppEnvGenerator)(tree, Object.assign(Object.assign({}, options), { baseGeneratorType: enums_1.BaseGeneratorType.EXPO_APP }));
|
|
38
|
+
yield (0, generators_1.runStorageGenerator)(tree, options);
|
|
39
|
+
yield (0, generators_1.runRNStylesGenerator)(tree, options);
|
|
40
|
+
if (shouldGenerateStoreLib) {
|
|
41
|
+
yield (0, generators_1.runStoreGenerator)(tree, Object.assign(Object.assign({}, options), { baseGeneratorType: enums_1.BaseGeneratorType.EXPO_APP }));
|
|
42
|
+
}
|
|
43
|
+
if (shouldGenerateApiClientLib) {
|
|
44
|
+
yield (0, generators_1.runApiClientGenerator)(tree, options);
|
|
45
|
+
}
|
|
46
|
+
if (shouldGenerateFormUtilsLib) {
|
|
47
|
+
yield (0, generators_1.runFormUtilsGenerator)(tree, options);
|
|
48
|
+
}
|
|
49
|
+
if (shouldGenerateUIKittenLib) {
|
|
50
|
+
yield (0, generators_1.runUIKittenGenerator)(tree, options);
|
|
51
|
+
}
|
|
52
|
+
// Workaround: Even with the '--e2eTestRunner=none' parameter, the test folder is created. We delete it manually.
|
|
53
|
+
if ((0, fs_1.existsSync)(appTestFolder)) {
|
|
54
|
+
(0, fs_1.rmSync)(appTestFolder, { recursive: true, force: true });
|
|
55
|
+
}
|
|
56
|
+
const appPackagePath = `${appRoot}/package.json`;
|
|
57
|
+
// Remove unnecessary files and files that will be replaced
|
|
58
|
+
tree.delete(`${appRoot}/src`);
|
|
59
|
+
tree.delete(`${appRoot}/index.js`);
|
|
60
|
+
tree.delete(`${appRoot}/webpack.config.js`);
|
|
61
|
+
tree.delete(`${appRoot}/.eslintrc.json`);
|
|
62
|
+
tree.delete(`${appRoot}/eslint.config.cjs`);
|
|
63
|
+
tree.delete(`${appRoot}/app.json`);
|
|
64
|
+
tree.delete(`${appRoot}/eas.json`);
|
|
65
|
+
tree.delete(`${appRoot}/metro.config.js`);
|
|
66
|
+
tree.delete(`${appRoot}/jest.config.ts`);
|
|
67
|
+
tree.delete(`${appRoot}/tsconfig.app.json`);
|
|
68
|
+
// Update app package.json
|
|
69
|
+
const appPackageJson = (0, devkit_1.readJson)(tree, appPackagePath);
|
|
70
|
+
appPackageJson.main = 'expo-router/entry';
|
|
71
|
+
appPackageJson.scripts = Object.assign(Object.assign({}, scripts_1.default), appPackageJson.scripts);
|
|
72
|
+
(0, devkit_1.writeJson)(tree, appPackagePath, appPackageJson);
|
|
73
|
+
// Add app files
|
|
74
|
+
(0, devkit_1.generateFiles)(tree, path.join(__dirname, 'app-files'), appRoot, Object.assign(Object.assign({}, options), { formatName: utils_1.formatName,
|
|
75
|
+
formatAppIdentifier: utils_1.formatAppIdentifier, formatDirectory: () => libPath, isUIKittenEnabled: shouldGenerateUIKittenLib, isStoreEnabled: shouldGenerateStoreLib, appDirectory: options.directory }));
|
|
76
|
+
(0, utils_1.addNxAppTag)(tree, options.directory);
|
|
77
|
+
(0, devkit_1.generateFiles)(tree, path.join(__dirname, 'i18n'), i18nRoot, {});
|
|
78
|
+
// Add dependencies
|
|
79
|
+
(0, devkit_1.addDependenciesToPackageJson)(tree, Object.assign(Object.assign({}, dependencies_1.dependencies['expo-app']), dependencies_1.dependencies['expo-app-root']), Object.assign(Object.assign({}, dependencies_1.devDependencies['expo-app']), dependencies_1.devDependencies['expo-app-root']));
|
|
80
|
+
(0, devkit_1.addDependenciesToPackageJson)(tree, dependencies_1.dependencies['expo-app'], dependencies_1.devDependencies['expo-app'], appPackagePath);
|
|
81
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
82
|
+
return () => {
|
|
83
|
+
(0, devkit_1.installPackagesTask)(tree);
|
|
84
|
+
(0, child_process_1.execSync)('npx expo install --fix', { stdio: 'inherit' });
|
|
85
|
+
if (shouldGenerateAuthLibs) {
|
|
86
|
+
(0, child_process_1.execSync)(`npx nx g auth ${options.name} ${options.directory}`, { stdio: 'inherit' });
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
exports.expoAppGenerator = expoAppGenerator;
|
|
92
|
+
exports.default = expoAppGenerator;
|
|
93
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/expo-app/generator.ts"],"names":[],"mappings":";;;;AAAA,iDAAyC;AACzC,2BAAwC;AACxC,6BAA6B;AAC7B,uCAUoB;AACpB,4DAA0E;AAC1E,8CAAuD;AACvD,wDAQiC;AACjC,8CAAoH;AAEpH,uCAAgC;AAEhC,SAAsB,gBAAgB,CAAC,IAAU,EAAE,OAA+B;;QAChF,MAAM,sBAAsB,GAAG,CAAC,MAAM,IAAA,mBAAW,EAAC,0CAA0C,CAAC,CAAC,KAAK,GAAG,CAAC;QACvG,MAAM,0BAA0B,GAC9B,sBAAsB,IAAI,CAAC,MAAM,IAAA,mBAAW,EAAC,+CAA+C,CAAC,CAAC,KAAK,GAAG,CAAC;QACzG,MAAM,sBAAsB,GAC1B,0BAA0B,IAAI,CAAC,MAAM,IAAA,mBAAW,EAAC,yCAAyC,CAAC,CAAC,KAAK,GAAG,CAAC;QACvG,MAAM,0BAA0B,GAC9B,CAAC,MAAM,IAAA,mBAAW,EAAC,0DAA0D,CAAC,CAAC,KAAK,GAAG,CAAC;QAC1F,MAAM,yBAAyB,GAAG,CAAC,MAAM,IAAA,mBAAW,EAAC,4CAA4C,CAAC,CAAC,KAAK,GAAG,CAAC;QAE5G,MAAM,OAAO,GAAG,QAAQ,OAAO,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,CAAC,CAAC;QAExB,OAAO,GAAS,EAAE;YAChB,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;YAC1B,IAAA,wBAAQ,EAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;YAEzD,IAAI,sBAAsB,EAAE,CAAC;gBAC3B,IAAA,wBAAQ,EAAC,iBAAiB,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;YACvF,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;CAAA;AAxHD,4CAwHC;AAED,kBAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
start: string;
|
|
3
|
+
'start:prod': string;
|
|
4
|
+
'build:dev': string;
|
|
5
|
+
'build:internal': string;
|
|
6
|
+
'build:debug': string;
|
|
7
|
+
'build:prod': string;
|
|
8
|
+
'update:dev': string;
|
|
9
|
+
'update:prod': string;
|
|
10
|
+
'submit:dev': string;
|
|
11
|
+
'submit:prod': string;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
start: 'cross-env EXPO_PUBLIC_APP_ENV=development npx expo start',
|
|
5
|
+
'start:prod': 'cross-env EXPO_PUBLIC_APP_ENV=production npx expo start',
|
|
6
|
+
'build:dev': 'eas build --no-wait -p all --profile=development',
|
|
7
|
+
'build:internal': 'npm run build:dev -- --profile=internal',
|
|
8
|
+
'build:debug': 'npm run build:dev -- --profile=debug',
|
|
9
|
+
'build:prod': 'npm run build:dev -- --profile=production',
|
|
10
|
+
'update:dev': 'cross-env EXPO_PUBLIC_APP_ENV=development eas update --branch development',
|
|
11
|
+
'update:prod': 'cross-env EXPO_PUBLIC_APP_ENV=production eas update --branch production',
|
|
12
|
+
'submit:dev': 'cross-env EXPO_PUBLIC_APP_ENV=development eas submit --no-wait --profile=development',
|
|
13
|
+
'submit:prod': 'cross-env EXPO_PUBLIC_APP_ENV=production eas submit --no-wait --profile=production',
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=scripts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scripts.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/expo-app/scripts.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,KAAK,EAAE,0DAA0D;IACjE,YAAY,EAAE,yDAAyD;IACvE,WAAW,EAAE,kDAAkD;IAC/D,gBAAgB,EAAE,yCAAyC;IAC3D,aAAa,EAAE,sCAAsC;IACrD,YAAY,EAAE,2CAA2C;IACzD,YAAY,EAAE,2EAA2E;IACzF,aAAa,EAAE,yEAAyE;IACxF,YAAY,EAAE,sFAAsF;IACpG,aAAa,EAAE,oFAAoF;CACpG,CAAC"}
|