@ronas-it/nx-generators 0.12.1 → 0.13.0
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 +6 -6
- package/generators.json +16 -16
- package/package.json +2 -2
- package/src/generators/code-checks/files/.eslint.ronasit.cjs.template +18 -1
- package/src/generators/code-checks/files/eslint.config.cjs.template +3 -161
- package/src/generators/code-checks/generator.js +5 -1
- package/src/generators/code-checks/generator.js.map +1 -1
- package/src/generators/entity-api/schema.json +10 -1
- package/src/generators/expo-app/app-files/app/_layout.tsx.template +2 -2
- package/src/generators/expo-app/app-files/app/index.tsx.template +1 -1
- package/src/generators/expo-app/generator.js +4 -2
- package/src/generators/expo-app/generator.js.map +1 -1
- package/src/generators/expo-app/schema.json +3 -2
- package/src/generators/lib-tags/schema.json +2 -2
- package/src/generators/next-app/files/app/[locale]/layout.tsx.template +18 -10
- package/src/generators/next-app/files/app/[locale]/page.tsx.template +2 -12
- package/src/generators/next-app/files/app/[locale]/providers.tsx.template +7 -10
- package/src/generators/next-app/files/constants.ts.template +1 -1
- package/src/generators/next-app/files/i18n/request.ts.template +18 -0
- package/src/generators/next-app/generator.js +16 -4
- package/src/generators/next-app/generator.js.map +1 -1
- package/src/generators/next-app/schema.json +3 -2
- package/src/generators/react-lib/schema.json +1 -0
- package/src/generators/sentry/schema.json +2 -2
- package/src/generators/sentry/utils/generate-sentry-expo.js +1 -1
- package/src/generators/sentry/utils/generate-sentry-expo.js.map +1 -1
- package/src/shared/dependencies.d.ts +4 -2
- package/src/shared/dependencies.js +6 -4
- package/src/shared/dependencies.js.map +1 -1
- package/src/shared/generators/api-client/generator.js +2 -1
- package/src/shared/generators/api-client/generator.js.map +1 -1
- package/src/shared/generators/api-client/lib-files/shared/data-access/api-client/src/configuration.ts.template +1 -1
- package/src/shared/generators/app-env/generator.js +3 -1
- package/src/shared/generators/app-env/generator.js.map +1 -1
- package/src/shared/generators/auth/generator.js +2 -1
- package/src/shared/generators/auth/generator.js.map +1 -1
- package/src/shared/generators/auth/lib-files/shared/data-access/api/src/lib/auth/api.ts.template +1 -1
- package/src/shared/generators/auth/lib-files/shared/data-access/api/src/lib/profile/api.ts.template +1 -1
- package/src/shared/generators/auth/lib-files/shared/data-access/auth/src/lib/store/listener.ts.template +19 -41
- package/src/shared/generators/auth/lib-files/shared/data-access/auth/src/lib/store/slice.ts.template +2 -19
- package/src/shared/generators/auth/schema.d.ts +0 -1
- package/src/shared/generators/auth/schema.json +3 -12
- package/src/shared/generators/i18n-next/generator.d.ts +6 -0
- package/src/shared/generators/i18n-next/generator.js +28 -0
- package/src/shared/generators/i18n-next/generator.js.map +1 -0
- package/src/shared/generators/i18n-next/index.d.ts +1 -0
- package/src/shared/generators/i18n-next/index.js +5 -0
- package/src/shared/generators/i18n-next/index.js.map +1 -0
- package/src/shared/generators/i18n-next/lib-files/shared/utils/i18n/src/index.ts.template +1 -0
- package/src/shared/generators/i18n-next/lib-files/shared/utils/i18n/src/lib/index.ts.template +2 -0
- package/src/shared/generators/i18n-next/lib-files/shared/utils/i18n/src/lib/interfaces/index.ts.template +1 -0
- package/src/shared/generators/i18n-next/lib-files/shared/utils/i18n/src/lib/interfaces/next-intl-params.ts.template +5 -0
- package/src/shared/generators/i18n-next/lib-files/shared/utils/i18n/src/lib/types/index.ts.template +1 -0
- package/src/shared/generators/i18n-next/lib-files/shared/utils/i18n/src/lib/types/locale.ts.template +1 -0
- package/src/shared/generators/index.d.ts +1 -0
- package/src/shared/generators/index.js +1 -0
- package/src/shared/generators/index.js.map +1 -1
- package/src/shared/generators/rn-styles/generator.js +2 -1
- package/src/shared/generators/rn-styles/generator.js.map +1 -1
- package/src/shared/generators/storage/generator.js +2 -1
- package/src/shared/generators/storage/generator.js.map +1 -1
- package/src/shared/generators/storage/lib-files/shared/data-access/storage/src/enums/app-storage-value.ts.template +3 -0
- package/src/shared/generators/storage/lib-files/shared/data-access/storage/src/enums/index.ts.template +1 -0
- package/src/shared/generators/storage/lib-files/shared/data-access/storage/src/index.ts.template +1 -0
- package/src/shared/generators/storage/lib-files/shared/data-access/storage/src/service.ts.template +7 -8
- package/src/shared/generators/store/generator.js +2 -1
- package/src/shared/generators/store/generator.js.map +1 -1
- package/src/shared/generators/store/schema.d.ts +0 -1
- package/src/shared/generators/store/schema.json +2 -11
- package/src/shared/generators/ui-kitten/generator.d.ts +0 -1
- package/src/shared/generators/ui-kitten/generator.js +2 -1
- package/src/shared/generators/ui-kitten/generator.js.map +1 -1
- package/src/shared/generators/ui-kitten/lib-files/shared/features/user-theme-provider/src/lib/component.tsx.template +1 -1
- package/src/shared/generators/ui-kitten/lib-files/shared/features/user-theme-provider/src/lib/config.ts.template +1 -1
- package/src/shared/generators/ui-kitten/schema.d.ts +0 -1
- package/src/shared/generators/ui-kitten/schema.json +2 -11
- package/src/shared/utils/config-utils.js +3 -3
- package/src/shared/utils/config-utils.js.map +1 -1
- package/src/generators/next-app/files/i18n.ts.template +0 -13
- /package/src/generators/next-app/{files/i18n → i18n/shared}/en.json.template +0 -0
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Nx Generators
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Nx generators for Ronas IT projects.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
|
-
1. Create monorepo with Expo app using [
|
|
7
|
+
1. Create monorepo with Expo app using [Nx Expo preset](https://nx.dev/nx-api/expo) or with Next.js app using [Nx Next preset](https://nx.dev/nx-api/next):
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
# For Expo app:
|
|
@@ -64,7 +64,7 @@ Note: each generator accepts the `--help` argument to see generator instructions
|
|
|
64
64
|
|
|
65
65
|
### 1. `repo-config`
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
Sets up the monorepo structure for development.
|
|
68
68
|
|
|
69
69
|
### 2. `code-checks`
|
|
70
70
|
|
|
@@ -120,7 +120,7 @@ npx nx g next-app my-app web
|
|
|
120
120
|
|
|
121
121
|
### 5. `react-lib`
|
|
122
122
|
|
|
123
|
-
Generates a library according to [
|
|
123
|
+
Generates a library according to [Nx notation](https://nx.dev/concepts/more-concepts/applications-and-libraries).
|
|
124
124
|
|
|
125
125
|
#### Options
|
|
126
126
|
|
|
@@ -210,7 +210,7 @@ npx nx g lib-remove --libName="mobile-account-features-profile-settings"
|
|
|
210
210
|
|
|
211
211
|
### 9. `lib-tags`
|
|
212
212
|
|
|
213
|
-
Checks and configures [
|
|
213
|
+
Checks and configures [Nx library tags](https://nx.dev/features/enforce-module-boundaries). If your project does not already use library tags, you can add them using this generator.
|
|
214
214
|
|
|
215
215
|
#### Options
|
|
216
216
|
|
package/generators.json
CHANGED
|
@@ -3,82 +3,82 @@
|
|
|
3
3
|
"code-checks": {
|
|
4
4
|
"factory": "./src/generators/code-checks/generator",
|
|
5
5
|
"schema": "./src/generators/code-checks/schema.json",
|
|
6
|
-
"description": "code
|
|
6
|
+
"description": "Configures code checks and formatting with pre-commit hook"
|
|
7
7
|
},
|
|
8
8
|
"expo-app": {
|
|
9
9
|
"factory": "./src/generators/expo-app/generator",
|
|
10
10
|
"schema": "./src/generators/expo-app/schema.json",
|
|
11
|
-
"description": "
|
|
11
|
+
"description": "Generates and configures an Expo React Native app"
|
|
12
12
|
},
|
|
13
13
|
"next-app": {
|
|
14
14
|
"factory": "./src/generators/next-app/generator",
|
|
15
15
|
"schema": "./src/generators/next-app/schema.json",
|
|
16
|
-
"description": "
|
|
16
|
+
"description": "Generates and configures a Next.js app"
|
|
17
17
|
},
|
|
18
18
|
"repo-config": {
|
|
19
19
|
"factory": "./src/generators/repo-config/generator",
|
|
20
20
|
"schema": "./src/generators/repo-config/schema.json",
|
|
21
|
-
"description": "
|
|
21
|
+
"description": "Sets up the monorepo structure for development"
|
|
22
22
|
},
|
|
23
23
|
"react-lib": {
|
|
24
24
|
"factory": "./src/generators/react-lib/generator",
|
|
25
25
|
"schema": "./src/generators/react-lib/schema.json",
|
|
26
|
-
"description": "
|
|
26
|
+
"description": "Generates a library according to Nx notation"
|
|
27
27
|
},
|
|
28
28
|
"react-component": {
|
|
29
29
|
"factory": "./src/generators/react-component/generator",
|
|
30
30
|
"schema": "./src/generators/react-component/schema.json",
|
|
31
|
-
"description": "
|
|
31
|
+
"description": "Creates a React component in particular library"
|
|
32
32
|
},
|
|
33
33
|
"sentry": {
|
|
34
34
|
"factory": "./src/generators/sentry/generator",
|
|
35
35
|
"schema": "./src/generators/sentry/schema.json",
|
|
36
|
-
"description": "
|
|
36
|
+
"description": "Creates Sentry integration for Expo/Next application"
|
|
37
37
|
},
|
|
38
38
|
"ui-kitten": {
|
|
39
39
|
"factory": "./src/shared/generators/ui-kitten/generator",
|
|
40
40
|
"schema": "./src/shared/generators/ui-kitten/schema.json",
|
|
41
|
-
"description": "UI-Kitten
|
|
41
|
+
"description": "Installs and configures UI-Kitten for Expo application"
|
|
42
42
|
},
|
|
43
43
|
"entity-api": {
|
|
44
44
|
"factory": "./src/generators/entity-api/generator",
|
|
45
45
|
"schema": "./src/generators/entity-api/schema.json",
|
|
46
|
-
"description": "
|
|
46
|
+
"description": "Creates an API with related entities in API library. It also updates redux store middlewares, reducers"
|
|
47
47
|
},
|
|
48
48
|
"store": {
|
|
49
49
|
"factory": "./src/shared/generators/store/generator",
|
|
50
50
|
"schema": "./src/shared/generators/store/schema.json",
|
|
51
|
-
"description": "redux store
|
|
51
|
+
"description": "Installs and configures redux store for Expo/Next application"
|
|
52
52
|
},
|
|
53
53
|
"form": {
|
|
54
54
|
"factory": "./src/generators/form/generator",
|
|
55
55
|
"schema": "./src/generators/form/schema.json",
|
|
56
|
-
"description": "form
|
|
56
|
+
"description": "Generates a form schema class and adds its usage to a component or a hook"
|
|
57
57
|
},
|
|
58
58
|
"lib-tags": {
|
|
59
59
|
"factory": "./src/generators/lib-tags/generator",
|
|
60
60
|
"schema": "./src/generators/lib-tags/schema.json",
|
|
61
|
-
"description": "
|
|
61
|
+
"description": "Checks and configures Nx library tags"
|
|
62
62
|
},
|
|
63
63
|
"lib-rename": {
|
|
64
64
|
"factory": "./src/generators/lib-rename/generator",
|
|
65
65
|
"schema": "./src/generators/lib-rename/schema.json",
|
|
66
|
-
"description": "library
|
|
66
|
+
"description": "Renames an existing library and updates imports"
|
|
67
67
|
},
|
|
68
68
|
"lib-move": {
|
|
69
69
|
"factory": "./src/generators/lib-move/generator",
|
|
70
70
|
"schema": "./src/generators/lib-move/schema.json",
|
|
71
|
-
"description": "library
|
|
71
|
+
"description": "Moves the library to a new destination."
|
|
72
72
|
},
|
|
73
73
|
"lib-remove": {
|
|
74
74
|
"factory": "./src/generators/lib-remove/generator",
|
|
75
75
|
"schema": "./src/generators/lib-remove/schema.json",
|
|
76
|
-
"description": "library remove
|
|
76
|
+
"description": "Removes the library. Before deleting a library you must remove all references to it"
|
|
77
77
|
},
|
|
78
78
|
"auth": {
|
|
79
79
|
"factory": "./src/shared/generators/auth/generator",
|
|
80
80
|
"schema": "./src/shared/generators/auth/schema.json",
|
|
81
|
-
"description": "
|
|
81
|
+
"description": "Creates auth related api libs and configures redux store "
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
}
|
package/package.json
CHANGED
|
@@ -86,7 +86,24 @@ module.exports = [
|
|
|
86
86
|
|
|
87
87
|
'react/react-in-jsx-scope': 'off',
|
|
88
88
|
'@stylistic/arrow-parens': ['warn', 'always'],
|
|
89
|
-
'@stylistic/
|
|
89
|
+
'@stylistic/arrow-spacing': ['warn', { before: true, after: true }],
|
|
90
|
+
'@stylistic/block-spacing': ['warn', 'always'],
|
|
91
|
+
'@stylistic/brace-style': ['warn', '1tbs'],
|
|
92
|
+
'@stylistic/comma-spacing': ['warn', { before: false, after: true }],
|
|
93
|
+
'@stylistic/eol-last': ['warn', 'always'],
|
|
94
|
+
'@stylistic/func-call-spacing': ['warn', 'never'],
|
|
95
|
+
'@stylistic/key-spacing': ['warn', { beforeColon: false, afterColon: true }],
|
|
96
|
+
'@stylistic/keyword-spacing': ['warn', { before: true, after: true }],
|
|
97
|
+
'@stylistic/no-whitespace-before-property': 'warn',
|
|
98
|
+
'@stylistic/space-before-blocks': ['warn', 'always'],
|
|
99
|
+
'@stylistic/space-infix-ops': 'warn',
|
|
100
|
+
'@stylistic/switch-colon-spacing': ['warn', { after: true, before: false }],
|
|
101
|
+
'@stylistic/member-delimiter-style': 'warn',
|
|
102
|
+
'@stylistic/type-annotation-spacing': 'warn',
|
|
103
|
+
'@stylistic/jsx-equals-spacing': ['warn', 'never'],
|
|
104
|
+
'@stylistic/jsx-indent-props': ['warn', 2],
|
|
105
|
+
'@stylistic/jsx-props-no-multi-spaces': 'warn',
|
|
106
|
+
'@stylistic/type-named-tuple-spacing': 'warn',
|
|
90
107
|
'no-var': 'warn',
|
|
91
108
|
'no-dupe-class-members': 'off',
|
|
92
109
|
'import/prefer-default-export': 'off',
|
|
@@ -33,171 +33,13 @@ module.exports = [
|
|
|
33
33
|
|
|
34
34
|
rules: {
|
|
35
35
|
'@stylistic/array-bracket-newline': 'off',
|
|
36
|
-
'@stylistic/array-bracket-spacing': 'off',
|
|
37
|
-
'@stylistic/array-element-newline': 'off',
|
|
38
|
-
'@stylistic/arrow-parens': 'off',
|
|
39
|
-
'@stylistic/arrow-spacing': 'off',
|
|
40
|
-
'@stylistic/block-spacing': 'off',
|
|
41
|
-
'@stylistic/brace-style': 'off',
|
|
42
|
-
'@stylistic/comma-dangle': 'off',
|
|
43
|
-
'@stylistic/comma-spacing': 'off',
|
|
44
|
-
'@stylistic/comma-style': 'off',
|
|
45
|
-
'@stylistic/computed-property-spacing': 'off',
|
|
46
|
-
'@stylistic/dot-location': 'off',
|
|
47
|
-
'@stylistic/eol-last': 'off',
|
|
48
|
-
'@stylistic/func-call-spacing': 'off',
|
|
49
|
-
'@stylistic/function-call-argument-newline': 'off',
|
|
50
|
-
'@stylistic/function-call-spacing': 'off',
|
|
51
|
-
'@stylistic/function-paren-newline': 'off',
|
|
52
|
-
'@stylistic/generator-star-spacing': 'off',
|
|
53
36
|
'@stylistic/implicit-arrow-linebreak': 'off',
|
|
54
37
|
'@stylistic/indent': 'off',
|
|
55
|
-
'@stylistic/jsx-quotes': 'off',
|
|
56
|
-
'@stylistic/key-spacing': 'off',
|
|
57
|
-
'@stylistic/keyword-spacing': 'off',
|
|
58
|
-
'@stylistic/linebreak-style': 'off',
|
|
59
|
-
'@stylistic/max-statements-per-line': 'off',
|
|
60
|
-
'@stylistic/multiline-ternary': 'off',
|
|
61
|
-
'@stylistic/new-parens': 'off',
|
|
62
|
-
'@stylistic/newline-per-chained-call': 'off',
|
|
63
|
-
'@stylistic/no-extra-parens': 'off',
|
|
64
|
-
'@stylistic/no-extra-semi': 'off',
|
|
65
|
-
'@stylistic/no-floating-decimal': 'off',
|
|
66
|
-
'@stylistic/no-mixed-spaces-and-tabs': 'off',
|
|
67
|
-
'@stylistic/no-multi-spaces': 'off',
|
|
68
|
-
'@stylistic/no-multiple-empty-lines': 'off',
|
|
69
|
-
'@stylistic/no-trailing-spaces': 'off',
|
|
70
|
-
'@stylistic/no-whitespace-before-property': 'off',
|
|
71
|
-
'@stylistic/nonblock-statement-body-position': 'off',
|
|
72
|
-
'@stylistic/object-curly-newline': 'off',
|
|
73
|
-
'@stylistic/object-curly-spacing': 'off',
|
|
74
|
-
'@stylistic/object-property-newline': 'off',
|
|
75
|
-
'@stylistic/one-var-declaration-per-line': 'off',
|
|
76
|
-
'@stylistic/operator-linebreak': 'off',
|
|
77
|
-
'@stylistic/padded-blocks': 'off',
|
|
78
|
-
'@stylistic/quote-props': 'off',
|
|
79
|
-
'@stylistic/rest-spread-spacing': 'off',
|
|
80
|
-
'@stylistic/semi': 'off',
|
|
81
|
-
'@stylistic/semi-spacing': 'off',
|
|
82
|
-
'@stylistic/semi-style': 'off',
|
|
83
|
-
'@stylistic/space-before-blocks': 'off',
|
|
84
|
-
'@stylistic/space-before-function-paren': 'off',
|
|
85
|
-
'@stylistic/space-in-parens': 'off',
|
|
86
|
-
'@stylistic/space-infix-ops': 'off',
|
|
87
|
-
'@stylistic/space-unary-ops': 'off',
|
|
88
|
-
'@stylistic/switch-colon-spacing': 'off',
|
|
89
|
-
'@stylistic/template-curly-spacing': 'off',
|
|
90
|
-
'@stylistic/template-tag-spacing': 'off',
|
|
91
|
-
'@stylistic/wrap-iife': 'off',
|
|
92
|
-
'@stylistic/wrap-regex': 'off',
|
|
93
|
-
'@stylistic/yield-star-spacing': 'off',
|
|
94
|
-
'@stylistic/member-delimiter-style': 'off',
|
|
95
|
-
'@stylistic/type-annotation-spacing': 'off',
|
|
96
|
-
'@stylistic/jsx-child-element-spacing': 'off',
|
|
97
|
-
'@stylistic/jsx-closing-bracket-location': 'off',
|
|
98
|
-
'@stylistic/jsx-closing-tag-location': 'off',
|
|
99
|
-
'@stylistic/jsx-curly-newline': 'off',
|
|
100
|
-
'@stylistic/jsx-curly-spacing': 'off',
|
|
101
|
-
'@stylistic/jsx-equals-spacing': 'off',
|
|
102
|
-
'@stylistic/jsx-first-prop-new-line': 'off',
|
|
103
38
|
'@stylistic/jsx-indent': 'off',
|
|
104
|
-
'@stylistic/jsx-indent-props': 'off',
|
|
105
|
-
'@stylistic/jsx-max-props-per-line': 'off',
|
|
106
|
-
'@stylistic/jsx-newline': 'off',
|
|
107
|
-
'@stylistic/jsx-one-expression-per-line': 'off',
|
|
108
|
-
'@stylistic/jsx-props-no-multi-spaces': 'off',
|
|
109
|
-
'@stylistic/jsx-tag-spacing': 'off',
|
|
110
|
-
'@stylistic/jsx-wrap-multilines': 'off',
|
|
111
39
|
'@stylistic/indent-binary-ops': 'off',
|
|
112
|
-
'@stylistic/
|
|
113
|
-
'@stylistic/
|
|
114
|
-
'@stylistic/
|
|
115
|
-
'@stylistic/js/array-bracket-spacing': 'off',
|
|
116
|
-
'@stylistic/js/array-element-newline': 'off',
|
|
117
|
-
'@stylistic/js/arrow-parens': 'off',
|
|
118
|
-
'@stylistic/js/arrow-spacing': 'off',
|
|
119
|
-
'@stylistic/js/block-spacing': 'off',
|
|
120
|
-
'@stylistic/js/brace-style': 'off',
|
|
121
|
-
'@stylistic/js/comma-dangle': 'off',
|
|
122
|
-
'@stylistic/js/comma-spacing': 'off',
|
|
123
|
-
'@stylistic/js/comma-style': 'off',
|
|
124
|
-
'@stylistic/js/computed-property-spacing': 'off',
|
|
125
|
-
'@stylistic/js/dot-location': 'off',
|
|
126
|
-
'@stylistic/js/eol-last': 'off',
|
|
127
|
-
'@stylistic/js/func-call-spacing': 'off',
|
|
128
|
-
'@stylistic/js/function-call-argument-newline': 'off',
|
|
129
|
-
'@stylistic/js/function-call-spacing': 'off',
|
|
130
|
-
'@stylistic/js/function-paren-newline': 'off',
|
|
131
|
-
'@stylistic/js/generator-star-spacing': 'off',
|
|
132
|
-
'@stylistic/js/implicit-arrow-linebreak': 'off',
|
|
133
|
-
'@stylistic/js/indent': 'off',
|
|
134
|
-
'@stylistic/js/jsx-quotes': 'off',
|
|
135
|
-
'@stylistic/js/key-spacing': 'off',
|
|
136
|
-
'@stylistic/js/keyword-spacing': 'off',
|
|
137
|
-
'@stylistic/js/linebreak-style': 'off',
|
|
138
|
-
'@stylistic/js/max-statements-per-line': 'off',
|
|
139
|
-
'@stylistic/js/multiline-ternary': 'off',
|
|
140
|
-
'@stylistic/js/new-parens': 'off',
|
|
141
|
-
'@stylistic/js/newline-per-chained-call': 'off',
|
|
142
|
-
'@stylistic/js/no-extra-parens': 'off',
|
|
143
|
-
'@stylistic/js/no-extra-semi': 'off',
|
|
144
|
-
'@stylistic/js/no-floating-decimal': 'off',
|
|
145
|
-
'@stylistic/js/no-mixed-spaces-and-tabs': 'off',
|
|
146
|
-
'@stylistic/js/no-multi-spaces': 'off',
|
|
147
|
-
'@stylistic/js/no-multiple-empty-lines': 'off',
|
|
148
|
-
'@stylistic/js/no-trailing-spaces': 'off',
|
|
149
|
-
'@stylistic/js/no-whitespace-before-property': 'off',
|
|
150
|
-
'@stylistic/js/nonblock-statement-body-position': 'off',
|
|
151
|
-
'@stylistic/js/object-curly-newline': 'off',
|
|
152
|
-
'@stylistic/js/object-curly-spacing': 'off',
|
|
153
|
-
'@stylistic/js/object-property-newline': 'off',
|
|
154
|
-
'@stylistic/js/one-var-declaration-per-line': 'off',
|
|
155
|
-
'@stylistic/js/operator-linebreak': 'off',
|
|
156
|
-
'@stylistic/js/padded-blocks': 'off',
|
|
157
|
-
'@stylistic/js/quote-props': 'off',
|
|
158
|
-
'@stylistic/js/rest-spread-spacing': 'off',
|
|
159
|
-
'@stylistic/js/semi': 'off',
|
|
160
|
-
'@stylistic/js/semi-spacing': 'off',
|
|
161
|
-
'@stylistic/js/semi-style': 'off',
|
|
162
|
-
'@stylistic/js/space-before-blocks': 'off',
|
|
163
|
-
'@stylistic/js/space-before-function-paren': 'off',
|
|
164
|
-
'@stylistic/js/space-in-parens': 'off',
|
|
165
|
-
'@stylistic/js/space-infix-ops': 'off',
|
|
166
|
-
'@stylistic/js/space-unary-ops': 'off',
|
|
167
|
-
'@stylistic/js/switch-colon-spacing': 'off',
|
|
168
|
-
'@stylistic/js/template-curly-spacing': 'off',
|
|
169
|
-
'@stylistic/js/template-tag-spacing': 'off',
|
|
170
|
-
'@stylistic/js/wrap-iife': 'off',
|
|
171
|
-
'@stylistic/js/wrap-regex': 'off',
|
|
172
|
-
'@stylistic/js/yield-star-spacing': 'off',
|
|
173
|
-
'@stylistic/ts/block-spacing': 'off',
|
|
174
|
-
'@stylistic/ts/brace-style': 'off',
|
|
175
|
-
'@stylistic/ts/comma-dangle': 'off',
|
|
176
|
-
'@stylistic/ts/comma-spacing': 'off',
|
|
177
|
-
'@stylistic/ts/func-call-spacing': 'off',
|
|
178
|
-
'@stylistic/ts/function-call-spacing': 'off',
|
|
179
|
-
'@stylistic/ts/indent': 'off',
|
|
180
|
-
'@stylistic/ts/key-spacing': 'off',
|
|
181
|
-
'@stylistic/ts/keyword-spacing': 'off',
|
|
182
|
-
'@stylistic/ts/member-delimiter-style': 'off',
|
|
183
|
-
'@stylistic/ts/no-extra-parens': 'off',
|
|
184
|
-
'@stylistic/ts/no-extra-semi': 'off',
|
|
185
|
-
'@stylistic/ts/object-curly-spacing': 'off',
|
|
186
|
-
'@stylistic/ts/semi': 'off',
|
|
187
|
-
'@stylistic/ts/space-before-blocks': 'off',
|
|
188
|
-
'@stylistic/ts/space-before-function-paren': 'off',
|
|
189
|
-
'@stylistic/ts/space-infix-ops': 'off',
|
|
190
|
-
'@stylistic/ts/type-annotation-spacing': 'off',
|
|
191
|
-
'@stylistic/jsx/jsx-child-element-spacing': 'off',
|
|
192
|
-
'@stylistic/jsx/jsx-closing-bracket-location': 'off',
|
|
193
|
-
'@stylistic/jsx/jsx-closing-tag-location': 'off',
|
|
194
|
-
'@stylistic/jsx/jsx-curly-newline': 'off',
|
|
195
|
-
'@stylistic/jsx/jsx-curly-spacing': 'off',
|
|
196
|
-
'@stylistic/jsx/jsx-equals-spacing': 'off',
|
|
197
|
-
'@stylistic/jsx/jsx-first-prop-new-line': 'off',
|
|
198
|
-
'@stylistic/jsx/jsx-indent': 'off',
|
|
199
|
-
'@stylistic/jsx/jsx-indent-props': 'off',
|
|
200
|
-
'@stylistic/jsx/jsx-max-props-per-line': 'off',
|
|
40
|
+
'@stylistic/newline-per-chained-call': 'off',
|
|
41
|
+
'@stylistic/function-paren-newline': 'off',
|
|
42
|
+
'@stylistic/function-call-argument-newline': 'off',
|
|
201
43
|
},
|
|
202
44
|
},
|
|
203
45
|
eslintConfigPrettier,
|
|
@@ -9,12 +9,13 @@ const dependencies_1 = require("../../shared/dependencies");
|
|
|
9
9
|
const config_1 = require("./config");
|
|
10
10
|
const scripts_1 = require("./scripts");
|
|
11
11
|
function codeChecksGenerator(tree, options) {
|
|
12
|
-
var _a;
|
|
12
|
+
var _a, _b;
|
|
13
13
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
14
14
|
const projectRoot = '.';
|
|
15
15
|
// Delete files
|
|
16
16
|
tree.delete('.eslintrc.json');
|
|
17
17
|
tree.delete('eslint.config.cjs');
|
|
18
|
+
tree.delete('eslint.config.mjs');
|
|
18
19
|
tree.delete('.prettierrc');
|
|
19
20
|
// Configure pre-commit hook
|
|
20
21
|
(0, child_process_1.execSync)('npx mrm@2 lint-staged', { stdio: 'inherit' });
|
|
@@ -29,6 +30,9 @@ function codeChecksGenerator(tree, options) {
|
|
|
29
30
|
// Update .gitignore
|
|
30
31
|
const gitignoreContent = ((_a = tree.read('.gitignore')) === null || _a === void 0 ? void 0 : _a.toString()) + '\n.eslintcache\n';
|
|
31
32
|
tree.write('.gitignore', gitignoreContent);
|
|
33
|
+
// Update .prettierignore
|
|
34
|
+
const prettierignoreContent = ((_b = tree.read('.prettierignore')) === null || _b === void 0 ? void 0 : _b.toString()) + '# Files with custom rules\n**/actions.ts\n**/epics.ts\n**/selectors.ts\n';
|
|
35
|
+
tree.write('.prettierignore', prettierignoreContent);
|
|
32
36
|
// Add files
|
|
33
37
|
(0, devkit_1.generateFiles)(tree, path.join(__dirname, 'files'), projectRoot, options);
|
|
34
38
|
// Install necessary dependencies
|
|
@@ -1 +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,GA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AA,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,0CAAE,QAAQ,EAAE,IAAG,0EAA0E,CAAC;QACpJ,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,qBAAqB,CAAC,CAAC;QAErD,YAAY;QACZ,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;QAEzE,iCAAiC;QACjC,IAAA,qCAA4B,EAAC,IAAI,EAAE,EAAE,EAAE,8BAAe,CAAC,aAAa,CAAC,CAAC,CAAC;QAEvE,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAExB,OAAO,GAAS,EAAE;YAChB,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC;;CACH;AAzCD,kDAyCC;AAED,kBAAe,mBAAmB,CAAC"}
|
|
@@ -6,12 +6,21 @@
|
|
|
6
6
|
"properties": {
|
|
7
7
|
"name": {
|
|
8
8
|
"type": "string",
|
|
9
|
-
"description": "Name of the entity",
|
|
9
|
+
"description": "Name of the entity (e.g. User)",
|
|
10
10
|
"default": "",
|
|
11
11
|
"$default": {
|
|
12
12
|
"$source": "argv",
|
|
13
13
|
"index": 0
|
|
14
14
|
}
|
|
15
|
+
},
|
|
16
|
+
"baseEndpoint": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Base API endpoint (e.g. /users)",
|
|
19
|
+
"default": "",
|
|
20
|
+
"$default": {
|
|
21
|
+
"$source": "argv",
|
|
22
|
+
"index": 1
|
|
23
|
+
}
|
|
15
24
|
}
|
|
16
25
|
},
|
|
17
26
|
"required": []
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<% if(isStoreEnabled) { %> import { store } from '<%=
|
|
1
|
+
<% if(isStoreEnabled) { %> import { store } from '<%= libPath %>/shared/data-access/store';<% } %>
|
|
2
2
|
import { setLanguage } from '@ronas-it/react-native-common-modules';
|
|
3
3
|
<% if(isUIKittenEnabled) { %>
|
|
4
|
-
import { UserThemeProvider } from '<%=
|
|
4
|
+
import { UserThemeProvider } from '<%= libPath %>/shared/features/user-theme-provider';
|
|
5
5
|
<% } %>
|
|
6
6
|
<% if(isStoreEnabled) { %>import { storeActions } from '@ronas-it/rtkq-entity-api';<% } %>
|
|
7
7
|
import { Stack } from 'expo-router';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { View, Text } from 'react-native';
|
|
3
|
-
import { createStyles } from '<%=
|
|
3
|
+
import { createStyles } from '<%= libPath %>/shared/ui/styles';
|
|
4
4
|
|
|
5
5
|
export default function RootScreen(): ReactElement {
|
|
6
6
|
return (
|
|
@@ -72,7 +72,8 @@ function expoAppGenerator(tree, options) {
|
|
|
72
72
|
(0, devkit_1.writeJson)(tree, appPackagePath, appPackageJson);
|
|
73
73
|
// Add app files
|
|
74
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,
|
|
75
|
+
formatAppIdentifier: utils_1.formatAppIdentifier,
|
|
76
|
+
libPath, isUIKittenEnabled: shouldGenerateUIKittenLib, isStoreEnabled: shouldGenerateStoreLib, appDirectory: options.directory }));
|
|
76
77
|
(0, utils_1.addNxAppTag)(tree, options.directory);
|
|
77
78
|
(0, devkit_1.generateFiles)(tree, path.join(__dirname, 'i18n'), i18nRoot, {});
|
|
78
79
|
// Add dependencies
|
|
@@ -83,7 +84,7 @@ function expoAppGenerator(tree, options) {
|
|
|
83
84
|
(0, devkit_1.installPackagesTask)(tree);
|
|
84
85
|
(0, child_process_1.execSync)('npx expo install --fix', { stdio: 'inherit' });
|
|
85
86
|
if (shouldGenerateAuthLibs) {
|
|
86
|
-
(0, child_process_1.execSync)(`npx nx g auth ${options.
|
|
87
|
+
(0, child_process_1.execSync)(`npx nx g auth ${options.directory}`, {
|
|
87
88
|
stdio: 'inherit',
|
|
88
89
|
});
|
|
89
90
|
}
|
|
@@ -92,6 +93,7 @@ function expoAppGenerator(tree, options) {
|
|
|
92
93
|
stdio: 'inherit',
|
|
93
94
|
});
|
|
94
95
|
}
|
|
96
|
+
(0, child_process_1.execSync)('npx nx g lib-tags --skipRepoCheck', { stdio: 'inherit' });
|
|
95
97
|
};
|
|
96
98
|
});
|
|
97
99
|
}
|
|
@@ -1 +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,CAAC,SAAS,EAAE,CAAC;QAC5C,MAAM,QAAQ,GAAG,QAAQ,OAAO,CAAC,SAAS,EAAE,CAA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A,oBAAW,EAAC,IAAI,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,SAAS,EAAE,EAAE;oBAC7C,KAAK,EAAE,SAAS;iBACjB,CAAC,CAAC;YACL,CAAC;YAED,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;gBACvB,IAAA,wBAAQ,EAAC,+BAA+B,OAAO,EAAE,EAAE;oBACjD,KAAK,EAAE,SAAS;iBACjB,CAAC,CAAC;YACL,CAAC;YAED,IAAA,wBAAQ,EAAC,mCAAmC,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QACtE,CAAC,CAAC;IACJ,CAAC;CAAA;AArID,4CAqIC;AAED,kBAAe,gBAAgB,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"properties": {
|
|
7
7
|
"name": {
|
|
8
8
|
"type": "string",
|
|
9
|
-
"description": "",
|
|
9
|
+
"description": "Name of the app (e.g: my-app)",
|
|
10
10
|
"$default": {
|
|
11
11
|
"$source": "argv",
|
|
12
12
|
"index": 0
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"directory": {
|
|
17
17
|
"type": "string",
|
|
18
|
-
"description": "",
|
|
18
|
+
"description": "A directory name for the app in the 'apps/' folder (e.g: mobile)",
|
|
19
19
|
"$default": {
|
|
20
20
|
"$source": "argv",
|
|
21
21
|
"index": 1
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"withSentry": {
|
|
26
26
|
"type": "boolean",
|
|
27
|
+
"description": "Add Sentry to the app",
|
|
27
28
|
"default": false,
|
|
28
29
|
"x-prompt": "Do you want to use Sentry in your app?"
|
|
29
30
|
}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"properties": {
|
|
7
7
|
"silent": {
|
|
8
8
|
"type": "boolean",
|
|
9
|
-
"description": "",
|
|
9
|
+
"description": "Disable log",
|
|
10
10
|
"$default": false
|
|
11
11
|
},
|
|
12
12
|
"skipRepoCheck": {
|
|
13
13
|
"type": "boolean",
|
|
14
|
-
"description": "",
|
|
14
|
+
"description": "Disable unstaged changes check",
|
|
15
15
|
"$default": false
|
|
16
16
|
}
|
|
17
17
|
},
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { pick } from 'lodash';
|
|
1
2
|
import { notFound } from 'next/navigation';
|
|
2
|
-
import {
|
|
3
|
+
import { NextIntlClientProvider } from 'next-intl';
|
|
4
|
+
import { getMessages, setRequestLocale } from 'next-intl/server';
|
|
3
5
|
import { ReactElement, ReactNode } from 'react';
|
|
4
|
-
import { constants
|
|
5
|
-
import { Providers } from './providers'
|
|
6
|
+
import { constants } from '../../constants';
|
|
7
|
+
<% if(hasProviders) { %> import { Providers } from './providers';<% } %>
|
|
8
|
+
import type { Locale } from '<%= libPath %>/shared/utils/i18n';
|
|
6
9
|
|
|
7
10
|
export const metadata = {
|
|
8
11
|
title: '<%= formatName(name) %>',
|
|
@@ -10,7 +13,7 @@ export const metadata = {
|
|
|
10
13
|
|
|
11
14
|
export interface RootLayoutProps {
|
|
12
15
|
children: ReactNode;
|
|
13
|
-
params: { locale: Locale }
|
|
16
|
+
params: Promise<{ locale: Locale }>;
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
const locales = constants.locales;
|
|
@@ -18,15 +21,16 @@ const locales = constants.locales;
|
|
|
18
21
|
export const generateStaticParams = (): Array<{ locale: Locale }> =>
|
|
19
22
|
locales.map((locale) => ({ locale }));
|
|
20
23
|
|
|
21
|
-
export default function RootLayout({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}: RootLayoutProps): ReactElement {
|
|
24
|
+
export default async function RootLayout({ children, params }: RootLayoutProps): Promise<ReactElement> {
|
|
25
|
+
const { locale } = await params;
|
|
26
|
+
|
|
25
27
|
if (!locales.includes(locale)) {
|
|
26
28
|
notFound();
|
|
27
29
|
}
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
setRequestLocale(locale);
|
|
32
|
+
|
|
33
|
+
const messages = await getMessages();
|
|
30
34
|
|
|
31
35
|
return (
|
|
32
36
|
<html lang={locale}>
|
|
@@ -41,7 +45,11 @@ export default function RootLayout({
|
|
|
41
45
|
/>
|
|
42
46
|
</head>
|
|
43
47
|
<body>
|
|
44
|
-
|
|
48
|
+
<% if(hasProviders) { %><Providers><% } %>
|
|
49
|
+
<NextIntlClientProvider messages={pick(messages, 'web-shared')} locale={locale}>
|
|
50
|
+
{children}
|
|
51
|
+
</NextIntlClientProvider>
|
|
52
|
+
<% if(hasProviders) { %></Providers><% } %>
|
|
45
53
|
</body>
|
|
46
54
|
</html>
|
|
47
55
|
);
|
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
import { useTranslations } from 'next-intl';
|
|
2
|
-
import { unstable_setRequestLocale } from 'next-intl/server';
|
|
3
2
|
import { ReactElement } from 'react';
|
|
4
|
-
import { Locale } from '../../constants';
|
|
5
3
|
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export default function Index({
|
|
11
|
-
params: { locale },
|
|
12
|
-
}: IndexPageProps): ReactElement {
|
|
13
|
-
unstable_setRequestLocale(locale);
|
|
14
|
-
|
|
15
|
-
const t = useTranslations('HOME_PAGE');
|
|
4
|
+
export default function Index(): ReactElement {
|
|
5
|
+
const t = useTranslations('web-shared.HOME_PAGE');
|
|
16
6
|
|
|
17
7
|
return <div>{t('HOME_PAGE_TEXT')}</div>;
|
|
18
8
|
}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
import { ReactElement } from 'react';
|
|
1
|
+
'use client';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
}): ReactElement {
|
|
9
|
-
const messages = useMessages();
|
|
3
|
+
import { ReactElement } from 'react';
|
|
4
|
+
import { Provider } from 'react-redux';
|
|
5
|
+
<% if(isStoreEnabled) { %> import { store } from '<%= libPath %>/shared/data-access/store';<% } %>
|
|
10
6
|
|
|
7
|
+
export function Providers({ children }: { children: React.ReactNode }): ReactElement {
|
|
11
8
|
return (
|
|
12
|
-
|
|
9
|
+
<% if(isStoreEnabled) { %><Provider store={store}><% } %>
|
|
13
10
|
{children}
|
|
14
|
-
|
|
11
|
+
<% if(isStoreEnabled) { %></Provider><% } %>
|
|
15
12
|
);
|
|
16
13
|
}
|