@robert-brightline/plugin 0.0.8 → 0.0.10

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 (35) hide show
  1. package/README.md +2 -1
  2. package/dist/generators/project/api/.swcrc.template +28 -0
  3. package/dist/generators/project/api/LICENSE.template +21 -0
  4. package/dist/generators/project/api/README.md.template +37 -0
  5. package/dist/generators/project/api/eslint.config.mjs.template +3 -0
  6. package/dist/generators/project/api/package.json.template +82 -0
  7. package/dist/generators/project/api/src/index.ts.template +4 -0
  8. package/dist/generators/project/api/src/lib/__fileName__.controller.ts.template +9 -0
  9. package/dist/generators/project/api/src/lib/__fileName__.module.ts.template +9 -0
  10. package/dist/generators/project/api/src/lib/__fileName__.spec.ts.template +5 -0
  11. package/dist/generators/project/api/src/src/main.ts.template +28 -0
  12. package/dist/generators/project/api/tsconfig.json.template +13 -0
  13. package/dist/generators/project/api/tsconfig.lib.json.template +24 -0
  14. package/dist/generators/project/api/tsconfig.spec.json.template +26 -0
  15. package/dist/generators/project/api/vite.config.ts.template +20 -0
  16. package/dist/generators/project/api/vitest.config.mts.template +18 -0
  17. package/dist/generators/project/library/package.json.template +1 -1
  18. package/dist/generators/project/prisma/.env.template +1 -0
  19. package/dist/generators/project/prisma/.gitignore.template +3 -0
  20. package/dist/generators/project/prisma/.swcrc.template +29 -0
  21. package/dist/generators/project/prisma/LICENSE.template +21 -0
  22. package/dist/generators/project/prisma/README.md.template +37 -0
  23. package/dist/generators/project/prisma/eslint.config.mjs.template +3 -0
  24. package/dist/generators/project/prisma/package.json.template +87 -0
  25. package/dist/generators/project/prisma/prisma/schema.prisma.template +24 -0
  26. package/dist/generators/project/prisma/prisma.config.ts.template +12 -0
  27. package/dist/generators/project/prisma/src/index.spec.ts.template +5 -0
  28. package/dist/generators/project/prisma/src/index.ts.template +8 -0
  29. package/dist/generators/project/prisma/tsconfig.json.template +13 -0
  30. package/dist/generators/project/prisma/tsconfig.lib.json.template +25 -0
  31. package/dist/generators/project/prisma/tsconfig.spec.json.template +26 -0
  32. package/dist/generators/project/prisma/vite.config.ts.template +20 -0
  33. package/dist/generators/project/prisma/vitest.config.mts.template +18 -0
  34. package/dist/generators/project/project.d.ts.map +1 -1
  35. package/package.json +1 -1
package/README.md CHANGED
@@ -21,7 +21,8 @@ pnpm add @robert-brightline/plugin
21
21
 
22
22
  If you find my open-source contributions or the **@robert-brightline/plugin** project helpful, consider supporting my work. Your sponsorship helps me maintain these projects and explore new enterprise patterns.
23
23
 
24
- ![CashApp](https://img.shields.io/badge/Sponsor%20me-%23EA4AAA.svg?style=for-the-badge&logo=github-sponsors&logoColor=white)(https://cash.app/$puqlib)
24
+ [![CashApp](https://img.shields.io/badge/Sponsor%20me-%23EA4AAA.svg?style=for-the-badge&logo=github-sponsors&logoColor=white)](https://cash.app/$puqlib)
25
+
25
26
 
26
27
  ---
27
28
 
@@ -0,0 +1,28 @@
1
+ {
2
+ "jsc": {
3
+ "target": "es2017",
4
+ "parser": {
5
+ "syntax": "typescript",
6
+ "decorators": true,
7
+ "dynamicImport": true
8
+ },
9
+ "transform": {
10
+ "decoratorMetadata": true,
11
+ "legacyDecorator": true
12
+ },
13
+ "keepClassNames": true,
14
+ "externalHelpers": true,
15
+ "loose": true
16
+ },
17
+ "module": {
18
+ "type": "es6"
19
+ },
20
+ "sourceMaps": true,
21
+ "exclude": [
22
+ "vite.config.ts",
23
+ "vitest.config.mts",
24
+ ".*\\.spec.ts$",
25
+ ".*\\.test.ts$",
26
+ ".*.js$"
27
+ ]
28
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,37 @@
1
+ ![npm version](https://img.shields.io/npm/v/<%- fullProjectName %>)
2
+ ![npm downloads](https://img.shields.io/npm/dm/<%- fullProjectName %>)
3
+ ![Build Status](https://img.shields.io/github/actions/workflow/status/<%- ownerUsername %>/<%- repositoryName %>/ci.yml)
4
+ ![bundle size](https://img.shields.io/bundlephobia/min/<%- fullProjectName %>)
5
+
6
+
7
+ <p align="center">
8
+ <img src="./assets/favicon.png" alt="Logo" width="200" height="200" style="border-radius: 100%"/>
9
+ </p>
10
+
11
+
12
+ ## <%- fullProjectName %>
13
+
14
+ - [ ] add description for <%- fullProjectName %>
15
+
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ pnpm add <%- fullProjectName %>
21
+ ```
22
+
23
+ ## 💖 Support My Work
24
+ If you find my open-source contributions or the **<%- fullProjectName %>** project helpful, consider supporting my work. Your sponsorship helps me maintain these projects and explore new enterprise patterns.
25
+
26
+ ![CashApp](https://img.shields.io/badge/Sponsor%20me-%23EA4AAA.svg?style=for-the-badge&logo=github-sponsors&logoColor=white)(<%- funding[0].url %>)
27
+
28
+
29
+ ---
30
+
31
+ ## 🤝 Connect with Me
32
+
33
+ <p align="left">
34
+ <a href="mailto:<%- email %>?subject=<%- fullProjectName %>">
35
+ <img src="https://img.shields.io/badge/Email-D14836?style=for-the-badge&logo=gmail&logoColor=white" />
36
+ </a>
37
+ </p>
@@ -0,0 +1,3 @@
1
+ import baseConfig from '../../eslint.config.mjs';
2
+
3
+ export default [...baseConfig];
@@ -0,0 +1,82 @@
1
+ {
2
+ "name": "<%- fullProjectName %>",
3
+ "description": "- [ ] add project description",
4
+ "version": "<%- version %>",
5
+ "author": {
6
+ "name": "<%- currentUsername %>",
7
+ "email": "<%- email %>"
8
+ },
9
+ "homepage": "<%- homepage %>",
10
+ "publishConfig": {
11
+ "access": "public",
12
+ "tag": "latest"
13
+ },
14
+ "keywords": [
15
+ "<% shortProjectName %>"
16
+ ],
17
+ "funding": <%- JSON.stringify(funding) %>,
18
+ "type": "module",
19
+ "main": "./dist/index.js",
20
+ "module": "./dist/index.js",
21
+ "types": "./dist/index.d.ts",
22
+ "exports": {
23
+ "./package.json": "./package.json",
24
+ ".": {
25
+ "@<%- repositoryName %>/source": "./src/index.ts",
26
+ "types": "./dist/index.d.ts",
27
+ "import": "./dist/index.js",
28
+ "default": "./dist/index.js"
29
+ }
30
+ },
31
+ "files": [
32
+ "dist",
33
+ "assets",
34
+ "!**/*.tsbuildinfo"
35
+ ],
36
+ "nx": {
37
+ "sourceRoot": "<%- directory %>/src",
38
+ "targets": {
39
+ "build": {
40
+ "executor": "@nx/js:swc",
41
+ "outputs": [
42
+ "{options.outputPath}"
43
+ ],
44
+ "options": {
45
+ "outputPath": "<%- directory %>/dist",
46
+ "main": "<%- directory %>/src/index.ts",
47
+ "tsConfig": "<%- directory %>/tsconfig.lib.json",
48
+ "skipTypeCheck": false,
49
+ "stripLeadingPaths": true
50
+ }
51
+ },
52
+ "serve": {
53
+ "executor": "@nx/js:node",
54
+ "options": {
55
+ "buildTarget": "<%- fullProjectName %>:build",
56
+ "watch": true
57
+ },
58
+ "configurations": {
59
+ "production": {
60
+ "buildTarget": "<%- fullProjectName %>:build:production",
61
+ "watch": false
62
+ }
63
+ }
64
+ }
65
+ }
66
+ },
67
+ "peerDependencies": {
68
+ "@nestjs/common": "^11.1.11",
69
+ "@nestjs/config": "^4.0.2",
70
+ "@nestjs/core": "^11.1.11",
71
+ "@nestjs/platform-express": "^11.1.11",
72
+ "@nestjs/swagger": "^11.2.3",
73
+ "helmet": "^8.1.0",
74
+ "<%- fullProjectName %>-db": "workspace:*",
75
+ },
76
+ "dependencies": {
77
+ "@swc/helpers": "~0.5.11"
78
+ },
79
+ "devDependencies": {
80
+ "vitest": "^4.0.8"
81
+ }
82
+ }
@@ -0,0 +1,4 @@
1
+ // @index(['./**/*.ts', '!./**/*.{test,spec}.ts', '!./**/main.ts'], f => `export * from '${f.path}.js'`)
2
+ export * from './lib/<%- fileName %>.controller.js';
3
+ export * from './lib/<%- fileName %>.module.js';
4
+
@@ -0,0 +1,9 @@
1
+ import { Controller, Get } from '@nestjs/common';
2
+
3
+ @Controller('<%- fileName %>')
4
+ export class <%- className %>Controller {
5
+ @Get('hello')
6
+ get() {
7
+ return { message: 'Hello <%- fileName %>' };
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ import { Module } from '@nestjs/common';
2
+ import { ConfigModule } from '@nestjs/config';
3
+ import { <%- className %>Controller } from './<%- fileName %>.controller.js';
4
+
5
+ @Module({
6
+ imports: [ConfigModule],
7
+ controllers: [ <%- className %>Controller ],
8
+ })
9
+ export class <%- className %>Module {}
@@ -0,0 +1,5 @@
1
+ describe('<%- fileName %>', () => {
2
+ it('should work', () => {
3
+ expect(1).toEqual(1);
4
+ });
5
+ });
@@ -0,0 +1,28 @@
1
+ import { Logger } from '@nestjs/common';
2
+ import { NestFactory } from '@nestjs/core';
3
+ import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
4
+ import helmet from 'helmet';
5
+ import { <%- className %>Module } from '../lib/<%- fileName %>.module.js';
6
+
7
+ export async function main() {
8
+ const app = await NestFactory.create(<%- className %>Module);
9
+ const PORT = process.env.PORT ?? 3000;
10
+
11
+ app.enableCors();
12
+ app.use(helmet());
13
+
14
+ const config = new DocumentBuilder()
15
+ .setTitle('IMS API')
16
+ .setDescription('API documentation')
17
+ .setVersion('1.0')
18
+ .build();
19
+
20
+ const document = SwaggerModule.createDocument(app, config);
21
+ SwaggerModule.setup('api', app, document);
22
+
23
+ await app.listen(PORT);
24
+
25
+ Logger.log(`Up and running at ${await app.getUrl()}`, 'Ims Bootstra');
26
+ }
27
+
28
+ main();
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "files": [],
4
+ "include": [],
5
+ "references": [
6
+ {
7
+ "path": "./tsconfig.lib.json"
8
+ },
9
+ {
10
+ "path": "./tsconfig.spec.json"
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "baseUrl": ".",
5
+ "rootDir": "src",
6
+ "outDir": "dist",
7
+ "tsBuildInfoFile": "dist/tsconfig.lib.tsbuildinfo",
8
+ "emitDeclarationOnly": true,
9
+ "forceConsistentCasingInFileNames": true,
10
+ "types": [
11
+ "node"
12
+ ]
13
+ },
14
+ "include": [
15
+ "src/**/*.ts"
16
+ ],
17
+ "references": [],
18
+ "exclude": [
19
+ "vite.config.ts",
20
+ "vitest.config.mts",
21
+ "src/**/*.test.ts",
22
+ "src/**/*.spec.ts"
23
+ ]
24
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "outDir": "./out-tsc/vitest",
5
+ "types": [
6
+ "vitest/globals",
7
+ "vitest/importMeta",
8
+ "vite/client",
9
+ "node",
10
+ "vitest"
11
+ ],
12
+ "forceConsistentCasingInFileNames": true
13
+ },
14
+ "include": [
15
+ "vite.config.ts",
16
+ "vitest.config.mts",
17
+ "src/**/*.test.ts",
18
+ "src/**/*.spec.ts",
19
+ "src/**/*.d.ts"
20
+ ],
21
+ "references": [
22
+ {
23
+ "path": "./tsconfig.lib.json"
24
+ }
25
+ ]
26
+ }
@@ -0,0 +1,20 @@
1
+ /// <reference types='vitest' />
2
+ import { defineConfig } from 'vite';
3
+
4
+ export default defineConfig(() => ({
5
+ root: import.meta.dirname,
6
+ cacheDir: '../../node_modules/.vite/<%- directory %>',
7
+ plugins: [],
8
+ test: {
9
+ name: '<%- fullProjectName %>',
10
+ watch: false,
11
+ globals: true,
12
+ environment: 'node',
13
+ include: ['{src,tests}/**/*.{test,spec}.ts'],
14
+ reporters: ['default'],
15
+ coverage: {
16
+ reportsDirectory: './test-output/vitest/coverage',
17
+ provider: 'v8' as const,
18
+ },
19
+ },
20
+ }));
@@ -0,0 +1,18 @@
1
+ import { defineConfig } from 'vitest/config';
2
+
3
+ export default defineConfig(() => ({
4
+ root: __dirname,
5
+ cacheDir: '../../node_modules/.vite/<%- directory %>',
6
+ test: {
7
+ name: '<%- fullProjectName %>',
8
+ watch: false,
9
+ globals: true,
10
+ environment: 'node',
11
+ include: ['{src,tests}/**/*.{test,spec}.ts'],
12
+ reporters: ['default'],
13
+ coverage: {
14
+ reportsDirectory: './test-output/vitest/coverage',
15
+ provider: 'v8' as const,
16
+ },
17
+ },
18
+ }));
@@ -45,7 +45,7 @@
45
45
  "outputPath": "<%- directory %>/dist",
46
46
  "main": "<%- directory %>/src/index.ts",
47
47
  "tsConfig": "<%- directory %>/tsconfig.lib.json",
48
- "skipTypeCheck": true,
48
+ "skipTypeCheck": false,
49
49
  "stripLeadingPaths": true
50
50
  }
51
51
  }
@@ -0,0 +1 @@
1
+ DATABASE_URL="prisma+postgres://localhost:51213"
@@ -0,0 +1,3 @@
1
+ .env
2
+
3
+ prisma/migrations
@@ -0,0 +1,29 @@
1
+ {
2
+ "jsc": {
3
+ "target": "es2017",
4
+ "parser": {
5
+ "syntax": "typescript",
6
+ "decorators": true,
7
+ "dynamicImport": true
8
+ },
9
+ "transform": {
10
+ "decoratorMetadata": true,
11
+ "legacyDecorator": true
12
+ },
13
+ "keepClassNames": true,
14
+ "externalHelpers": true,
15
+ "loose": true
16
+ },
17
+ "module": {
18
+ "type": "es6"
19
+ },
20
+ "sourceMaps": true,
21
+ "exclude": [
22
+ "prisma.config.ts",
23
+ "vite.config.ts",
24
+ "vitest.config.mts",
25
+ ".*\\.spec.ts$",
26
+ ".*\\.test.ts$",
27
+ ".*.js$"
28
+ ]
29
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,37 @@
1
+ ![npm version](https://img.shields.io/npm/v/<%- fullProjectName %>)
2
+ ![npm downloads](https://img.shields.io/npm/dm/<%- fullProjectName %>)
3
+ ![Build Status](https://img.shields.io/github/actions/workflow/status/<%- ownerUsername %>/<%- repositoryName %>/ci.yml)
4
+ ![bundle size](https://img.shields.io/bundlephobia/min/<%- fullProjectName %>)
5
+
6
+
7
+ <p align="center">
8
+ <img src="./assets/favicon.png" alt="Logo" width="200" height="200" style="border-radius: 100%"/>
9
+ </p>
10
+
11
+
12
+ ## <%- fullProjectName %>
13
+
14
+ - [ ] add description for <%- fullProjectName %>
15
+
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ pnpm add <%- fullProjectName %>
21
+ ```
22
+
23
+ ## 💖 Support My Work
24
+ If you find my open-source contributions or the **<%- fullProjectName %>** project helpful, consider supporting my work. Your sponsorship helps me maintain these projects and explore new enterprise patterns.
25
+
26
+ ![CashApp](https://img.shields.io/badge/Sponsor%20me-%23EA4AAA.svg?style=for-the-badge&logo=github-sponsors&logoColor=white)(<%- funding[0].url %>)
27
+
28
+
29
+ ---
30
+
31
+ ## 🤝 Connect with Me
32
+
33
+ <p align="left">
34
+ <a href="mailto:<%- email %>?subject=<%- fullProjectName %>">
35
+ <img src="https://img.shields.io/badge/Email-D14836?style=for-the-badge&logo=gmail&logoColor=white" />
36
+ </a>
37
+ </p>
@@ -0,0 +1,3 @@
1
+ import baseConfig from '../../eslint.config.mjs';
2
+
3
+ export default [...baseConfig];
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "<%- fullProjectName %>",
3
+ "description": "- [ ] add project description",
4
+ "version": "<%- version %>",
5
+ "author": {
6
+ "name": "<%- currentUsername %>",
7
+ "email": "<%- email %>"
8
+ },
9
+ "homepage": "<%- homepage %>",
10
+ "publishConfig": {
11
+ "access": "public",
12
+ "tag": "latest"
13
+ },
14
+ "keywords": [
15
+ "<% shortProjectName %>"
16
+ ],
17
+ "funding": <%- JSON.stringify(funding) %>,
18
+ "type": "module",
19
+ "main": "./dist/index.js",
20
+ "module": "./dist/index.js",
21
+ "types": "./dist/index.d.ts",
22
+ "exports": {
23
+ "./package.json": "./package.json",
24
+ ".": {
25
+ "@<%- repositoryName %>/source": "./src/index.ts",
26
+ "types": "./dist/index.d.ts",
27
+ "import": "./dist/index.js",
28
+ "default": "./dist/index.js"
29
+ },
30
+ "./prisma": {
31
+ "types": "./dist/generated/prisma/client.d.ts",
32
+ "import": "./dist/generated/prisma/client.js",
33
+ "default": "./dist/generated/prisma/client.js"
34
+ },
35
+ "./zod": {
36
+ "types": "./dist/generated/zod/index.d.ts",
37
+ "import": "./dist/generated/zod/index.js",
38
+ "default": "./dist/generated/zod/index.js"
39
+ }
40
+ },
41
+ "files": [
42
+ "dist",
43
+ "assets",
44
+ "prisma",
45
+ "!**/*.tsbuildinfo"
46
+ ],
47
+ "nx": {
48
+ "sourceRoot": "<%- directory %>/src",
49
+ "targets": {
50
+ "build": {
51
+ "executor": "@nx/js:swc",
52
+ "outputs": [
53
+ "{options.outputPath}"
54
+ ],
55
+ "options": {
56
+ "outputPath": "<%- directory %>/dist",
57
+ "main": "<%- directory %>/src/index.ts",
58
+ "tsConfig": "<%- directory %>/tsconfig.lib.json",
59
+ "skipTypeCheck": false,
60
+ "stripLeadingPaths": true
61
+ }
62
+ },
63
+ "prisma-generate": {
64
+ "executor": "nx:run-commands",
65
+ "options": {
66
+ "command": "npx prisma generate",
67
+ "cwd": "{projectRoot}"
68
+ }
69
+ }
70
+ }
71
+ },
72
+ "peerDependencies": {
73
+ "@prisma/client": "7.2.0",
74
+ "zod": "4.3.4"
75
+ },
76
+ "dependencies": {
77
+ "@prisma/adapter-pg": "^7.2.0",
78
+ "@swc/helpers": "~0.5.11"
79
+ },
80
+ "devDependencies": {
81
+ "dotenv": "^17.2.3",
82
+ "prisma": "^7.2.0",
83
+ "prisma-zod-generator": "^2.1.2",
84
+ "vitest": "^4.0.8",
85
+ "zod-prisma-types": "^3.3.10"
86
+ }
87
+ }
@@ -0,0 +1,24 @@
1
+ generator client {
2
+ provider = "prisma-client"
3
+ output = "../src/generated/prisma"
4
+ }
5
+
6
+ datasource db {
7
+ provider = "postgresql"
8
+ }
9
+
10
+ generator zod {
11
+ provider = "zod-prisma-types"
12
+ output = "../src/generated/zod"
13
+ prismaClientPath = "../prisma/client.js"
14
+ }
15
+
16
+ model Sample {
17
+ id Int @id @default(autoincrement())
18
+ uuid String @unique @default(uuid(7))
19
+ createdAt DateTime @default(now())
20
+ updatedAt DateTime @updatedAt
21
+ deletedAt DateTime?
22
+
23
+ name String @unique
24
+ }
@@ -0,0 +1,12 @@
1
+ import 'dotenv/config';
2
+ import { defineConfig } from 'prisma/config';
3
+
4
+ export default defineConfig({
5
+ schema: 'prisma/schema.prisma',
6
+ migrations: {
7
+ path: 'prisma/migrations',
8
+ },
9
+ datasource: {
10
+ url: process.env['DATABASE_URL'],
11
+ },
12
+ });
@@ -0,0 +1,5 @@
1
+ describe("index", ()=>{
2
+ it('should work', ()=>{
3
+ expect(1).toBe(1);
4
+ })
5
+ })
@@ -0,0 +1,8 @@
1
+ // @index(['./**/*.ts', '!./**/*.{test,spec}.ts', '!./**/prisma/models/*', '!./**/internal/*'], f => `export * as ${f.name.toUpperCase().trim().replace(/-/g, '_')} from '${f.path}.js'`)
2
+ export * as BROWSER from './generated/prisma/browser.js'
3
+ export * as CLIENT from './generated/prisma/client.js'
4
+ export * as COMMONINPUTTYPES from './generated/prisma/commonInputTypes.js'
5
+ export * as ENUMS from './generated/prisma/enums.js'
6
+ export * as MODELS from './generated/prisma/models.js'
7
+ export * as INDEX from './generated/zod/index.js'
8
+
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "files": [],
4
+ "include": [],
5
+ "references": [
6
+ {
7
+ "path": "./tsconfig.lib.json"
8
+ },
9
+ {
10
+ "path": "./tsconfig.spec.json"
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "baseUrl": ".",
5
+ "rootDir": "src",
6
+ "outDir": "dist",
7
+ "tsBuildInfoFile": "dist/tsconfig.lib.tsbuildinfo",
8
+ "emitDeclarationOnly": true,
9
+ "forceConsistentCasingInFileNames": true,
10
+ "types": [
11
+ "node"
12
+ ]
13
+ },
14
+ "include": [
15
+ "src/**/*.ts"
16
+ ],
17
+ "references": [],
18
+ "exclude": [
19
+ "prisma.config.ts",
20
+ "vite.config.ts",
21
+ "vitest.config.mts",
22
+ "src/**/*.test.ts",
23
+ "src/**/*.spec.ts"
24
+ ]
25
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "outDir": "./out-tsc/vitest",
5
+ "types": [
6
+ "vitest/globals",
7
+ "vitest/importMeta",
8
+ "vite/client",
9
+ "node",
10
+ "vitest"
11
+ ],
12
+ "forceConsistentCasingInFileNames": true
13
+ },
14
+ "include": [
15
+ "vite.config.ts",
16
+ "vitest.config.mts",
17
+ "src/**/*.test.ts",
18
+ "src/**/*.spec.ts",
19
+ "src/**/*.d.ts"
20
+ ],
21
+ "references": [
22
+ {
23
+ "path": "./tsconfig.lib.json"
24
+ }
25
+ ]
26
+ }
@@ -0,0 +1,20 @@
1
+ /// <reference types='vitest' />
2
+ import { defineConfig } from 'vite';
3
+
4
+ export default defineConfig(() => ({
5
+ root: import.meta.dirname,
6
+ cacheDir: '../../node_modules/.vite/<%- directory %>',
7
+ plugins: [],
8
+ test: {
9
+ name: '@robert-brightline/ims-db',
10
+ watch: false,
11
+ globals: true,
12
+ environment: 'node',
13
+ include: ['{src,tests}/**/*.{test,spec}.ts'],
14
+ reporters: ['default'],
15
+ coverage: {
16
+ reportsDirectory: './test-output/vitest/coverage',
17
+ provider: 'v8' as const,
18
+ },
19
+ },
20
+ }));
@@ -0,0 +1,18 @@
1
+ import { defineConfig } from 'vitest/config';
2
+
3
+ export default defineConfig(() => ({
4
+ root: __dirname,
5
+ cacheDir: '../../node_modules/.vite/<%- directory %>',
6
+ test: {
7
+ name: '@robert-brightline/ims-db',
8
+ watch: false,
9
+ globals: true,
10
+ environment: 'node',
11
+ include: ['{src,tests}/**/*.{test,spec}.ts'],
12
+ reporters: ['default'],
13
+ coverage: {
14
+ reportsDirectory: './test-output/vitest/coverage',
15
+ provider: 'v8' as const,
16
+ },
17
+ },
18
+ }));
@@ -1 +1 @@
1
- {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/generators/project/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAEnE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAGvD,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,sBAAsB,iBAahC;AAED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/generators/project/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAGvD,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,sBAAsB,iBAchC;AAED,eAAe,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@robert-brightline/plugin",
3
3
  "description": "Utility function to create name variants.",
4
- "version": "0.0.8",
4
+ "version": "0.0.10",
5
5
  "author": {
6
6
  "name": "robert-brightline",
7
7
  "email": "robert.brightline+names@gmail.com"