@mpfrontend/nx-plugin 0.0.0-stage → 0.1.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.
Files changed (116) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +87 -2
  3. package/dist/feature-generator.d.ts +7 -0
  4. package/dist/feature-generator.js +9 -0
  5. package/dist/feature-generator.js.map +1 -0
  6. package/dist/generator.d.ts +6 -0
  7. package/dist/generator.js +14 -0
  8. package/dist/generator.js.map +1 -0
  9. package/dist/index.d.ts +22 -0
  10. package/dist/index.js +46 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/nx-tree.d.ts +5 -0
  13. package/dist/nx-tree.js +12 -0
  14. package/dist/nx-tree.js.map +1 -0
  15. package/dist/package-generator.d.ts +8 -0
  16. package/dist/package-generator.js +9 -0
  17. package/dist/package-generator.js.map +1 -0
  18. package/dist/route-generator.d.ts +8 -0
  19. package/dist/route-generator.js +9 -0
  20. package/dist/route-generator.js.map +1 -0
  21. package/dist/scaffold.d.ts +96 -0
  22. package/dist/scaffold.js +227 -0
  23. package/dist/scaffold.js.map +1 -0
  24. package/dist/templates.d.ts +21 -0
  25. package/dist/templates.js +83 -0
  26. package/dist/templates.js.map +1 -0
  27. package/dist/workspace.d.ts +41 -0
  28. package/dist/workspace.js +213 -0
  29. package/dist/workspace.js.map +1 -0
  30. package/generators.json +24 -0
  31. package/package.json +37 -3
  32. package/schema.json +18 -0
  33. package/schemas/feature-schema.json +25 -0
  34. package/schemas/package-schema.json +28 -0
  35. package/schemas/route-schema.json +31 -0
  36. package/templates/feature/list/api/server/__resource__.ts.template +24 -0
  37. package/templates/feature/list/app/api/__resource__/route.ts.template +24 -0
  38. package/templates/feature/list/entities/__resource__/index.ts.template +12 -0
  39. package/templates/feature/list/entities/__resource__/model/__resource__-list.test.ts.template +23 -0
  40. package/templates/feature/list/entities/__resource__/model/__resource__-list.ts.template +24 -0
  41. package/templates/feature/list/entities/__resource__/model/__resource__.test.ts.template +17 -0
  42. package/templates/feature/list/entities/__resource__/model/__resource__.ts.template +19 -0
  43. package/templates/feature/list/features/__feature__/api/__feature__-read.ts.template +12 -0
  44. package/templates/feature/list/features/__feature__/api/__feature__.ts.template +28 -0
  45. package/templates/feature/list/features/__feature__/hooks/use-__feature__-list.ts.template +22 -0
  46. package/templates/feature/list/features/__feature__/index.ts.template +3 -0
  47. package/templates/feature/list/features/__feature__/model/__feature__-fields.ts.template +4 -0
  48. package/templates/feature/list/features/__feature__/model/overrides/index.ts.template +3 -0
  49. package/templates/feature/list/features/__feature__/ui/__feature__-detail-screen.tsx.template +16 -0
  50. package/templates/feature/list/features/__feature__/ui/__feature__-detail.test.tsx.template +28 -0
  51. package/templates/feature/list/features/__feature__/ui/__feature__-detail.tsx.template +44 -0
  52. package/templates/feature/list/features/__feature__/ui/__feature__-list.tsx.template +75 -0
  53. package/templates/feature/list/features/__feature__/ui/__feature__-screen.tsx.template +31 -0
  54. package/templates/feature/list/features/__feature__/utils/__feature__-href.test.ts.template +7 -0
  55. package/templates/feature/list/features/__feature__/utils/__feature__-href.ts.template +4 -0
  56. package/templates/feature/screen/features/__feature__/api/__feature__.ts.template +13 -0
  57. package/templates/feature/screen/features/__feature__/hooks/use-__feature__.ts.template +27 -0
  58. package/templates/feature/screen/features/__feature__/index.ts.template +3 -0
  59. package/templates/feature/screen/features/__feature__/model/__feature__.test.ts.template +12 -0
  60. package/templates/feature/screen/features/__feature__/model/__feature__.ts.template +12 -0
  61. package/templates/feature/screen/features/__feature__/ui/__feature__-panel.tsx.template +22 -0
  62. package/templates/feature/screen/features/__feature__/ui/__feature__-screen.tsx.template +15 -0
  63. package/templates/feature/screen/features/__feature__/ui/__feature__-view.test.tsx.template +25 -0
  64. package/templates/feature/screen/features/__feature__/ui/__feature__-view.tsx.template +38 -0
  65. package/templates/feature/screen/features/__feature__/utils/__feature__.test.ts.template +9 -0
  66. package/templates/feature/screen/features/__feature__/utils/__feature__.ts.template +6 -0
  67. package/templates/next/README.md.template +10 -0
  68. package/templates/next/docs/api-contracts.md.template +22 -0
  69. package/templates/next/docs/overview.md.template +67 -0
  70. package/templates/next/eslint.config.mjs.template +4 -0
  71. package/templates/next/ftg.config.json.template +11 -0
  72. package/templates/next/next-env.d.ts.template +2 -0
  73. package/templates/next/next.config.mjs.template +9 -0
  74. package/templates/next/package.json.template +27 -0
  75. package/templates/next/postcss.config.mjs.template +2 -0
  76. package/templates/next/prepare-runtime.mjs.template +11 -0
  77. package/templates/next/project.json.template +113 -0
  78. package/templates/next/src/api/server/transfer.test.ts.template +153 -0
  79. package/templates/next/src/api/server/transfer.ts.template +25 -0
  80. package/templates/next/src/app/api/access/route.ts.template +6 -0
  81. package/templates/next/src/app/api/docs/assets/[file]/route.ts.template +23 -0
  82. package/templates/next/src/app/api/docs/route.ts.template +8 -0
  83. package/templates/next/src/app/api/openapi/route.ts.template +12 -0
  84. package/templates/next/src/app/api/transfer/[...path]/route.ts.template +22 -0
  85. package/templates/next/src/app/components/page.tsx.template +32 -0
  86. package/templates/next/src/app/globals.css.template +32 -0
  87. package/templates/next/src/app/layout.tsx.template +53 -0
  88. package/templates/next/src/app/page.tsx.template +6 -0
  89. package/templates/next/src/app/providers.tsx.template +31 -0
  90. package/templates/next/src/config/access.ts.template +21 -0
  91. package/templates/next/src/config/app.ts.template +33 -0
  92. package/templates/next/src/config/server.ts.template +13 -0
  93. package/templates/next/src/features/preferences/api/preference-cookie.ts.template +14 -0
  94. package/templates/next/src/features/preferences/hooks/use-preferences.ts.template +30 -0
  95. package/templates/next/src/features/preferences/index.ts.template +3 -0
  96. package/templates/next/src/features/preferences/model/messages/en.ts.template +10 -0
  97. package/templates/next/src/features/preferences/model/messages.ts.template +13 -0
  98. package/templates/next/src/features/preferences/model/preferences.test.ts.template +32 -0
  99. package/templates/next/src/features/preferences/model/preferences.ts.template +22 -0
  100. package/templates/next/src/features/preferences/ui/preference-controls.tsx.template +50 -0
  101. package/templates/next/src/i18n/index.ts.template +13 -0
  102. package/templates/next/src/i18n/messages/en.ts.template +18 -0
  103. package/templates/next/src/i18n/server.ts.template +8 -0
  104. package/templates/next/src/theme/config.test.ts.template +9 -0
  105. package/templates/next/src/theme/config.ts.template +7 -0
  106. package/templates/next/src/theme/theme.css.template +8 -0
  107. package/templates/next/tsconfig.json.template +11 -0
  108. package/templates/package/README.md.template +10 -0
  109. package/templates/package/eslint.config.mjs.template +4 -0
  110. package/templates/package/package.json.template +15 -0
  111. package/templates/package/project.json.template +51 -0
  112. package/templates/package/src/index.ts.template +2 -0
  113. package/templates/package/src/package-name.test.ts.template +7 -0
  114. package/templates/package/src/package-name.ts.template +2 -0
  115. package/templates/package/tsconfig.json.template +7 -0
  116. package/templates/package/tsconfig.lib.json.template +9 -0
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "__name__",
3
+ "projectType": "library",
4
+ "sourceRoot": "__DIRECTORY__/src",
5
+ "tags": ["type:package", "scope:shared", "runtime:__runtime__"],
6
+ "targets": {
7
+ "build": {
8
+ "executor": "nx:run-commands",
9
+ "dependsOn": ["^build"],
10
+ "outputs": ["{projectRoot}/dist"],
11
+ "options": {
12
+ "command": "pnpm exec tsc -p __DIRECTORY__/tsconfig.lib.json"
13
+ }
14
+ },
15
+ "typecheck": {
16
+ "executor": "nx:run-commands",
17
+ "dependsOn": ["^build"],
18
+ "options": {
19
+ "command": "pnpm exec tsc -p __DIRECTORY__/tsconfig.json --noEmit"
20
+ }
21
+ },
22
+ "format": {
23
+ "executor": "nx:run-commands",
24
+ "cache": false,
25
+ "options": {
26
+ "command": "pnpm exec prettier --write __DIRECTORY__"
27
+ }
28
+ },
29
+ "format:check": {
30
+ "executor": "nx:run-commands",
31
+ "options": {
32
+ "command": "pnpm exec prettier --check __DIRECTORY__"
33
+ }
34
+ },
35
+ "lint": {
36
+ "executor": "nx:run-commands",
37
+ "options": {
38
+ "command": "pnpm exec eslint __DIRECTORY__"
39
+ }
40
+ },
41
+ "test": {
42
+ "executor": "nx:run-commands",
43
+ "options": {
44
+ "command": "node --import tsx --test \"__DIRECTORY__/src/**/*.test.ts\"",
45
+ "env": {
46
+ "TSX_TSCONFIG_PATH": "__DIRECTORY__/tsconfig.json"
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,2 @@
1
+ // The public entry of the package. Apps and other packages import only from here.
2
+ export { packageName } from './package-name.js';
@@ -0,0 +1,7 @@
1
+ import { test } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { packageName } from './index.js';
4
+
5
+ test('the public entry exposes the package identity', () => {
6
+ assert.equal(packageName, '@__SCOPE__/__name__');
7
+ });
@@ -0,0 +1,2 @@
1
+ /** The name under which apps of this workspace import the package. */
2
+ export const packageName = '@__SCOPE__/__name__';
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "@mpfrontend/workspace-config/tsconfig/library.json",
3
+ "compilerOptions": {
4
+ "noEmit": true
5
+ },
6
+ "include": ["src/**/*.ts", "src/**/*.tsx"]
7
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "noEmit": false,
5
+ "rootDir": "src",
6
+ "outDir": "dist"
7
+ },
8
+ "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"]
9
+ }