@robert-brightline/plugin 0.0.10 → 0.0.17

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.
@@ -11,7 +11,7 @@
11
11
 
12
12
  ## <%- fullProjectName %>
13
13
 
14
- - [ ] add description for <%- fullProjectName %>
14
+ <%- shortProjectName %> Service
15
15
 
16
16
 
17
17
  ## Installation
@@ -23,8 +23,7 @@ pnpm add <%- fullProjectName %>
23
23
  ## 💖 Support My Work
24
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
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
-
26
+ [![CashApp](https://img.shields.io/badge/Sponsor%20me-%23EA4AAA.svg?style=for-the-badge&logo=github-sponsors&logoColor=white)](<%- funding[0].url %>)
28
27
 
29
28
  ---
30
29
 
@@ -35,6 +35,7 @@
35
35
  ],
36
36
  "nx": {
37
37
  "sourceRoot": "<%- directory %>/src",
38
+ "projectType": "library",
38
39
  "targets": {
39
40
  "build": {
40
41
  "executor": "@nx/js:swc",
@@ -11,7 +11,7 @@
11
11
 
12
12
  ## <%- fullProjectName %>
13
13
 
14
- - [ ] add description for <%- fullProjectName %>
14
+ <%- fullProjectName %> library
15
15
 
16
16
 
17
17
  ## Installation
@@ -23,7 +23,7 @@ pnpm add <%- fullProjectName %>
23
23
  ## 💖 Support My Work
24
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
25
 
26
- ![CashApp](https://img.shields.io/badge/Sponsor%20me-%23EA4AAA.svg?style=for-the-badge&logo=github-sponsors&logoColor=white)(<%- funding[0].url %>)
26
+ [![CashApp](https://img.shields.io/badge/Sponsor%20me-%23EA4AAA.svg?style=for-the-badge&logo=github-sponsors&logoColor=white)](<%- funding[0].url %>)
27
27
 
28
28
 
29
29
  ---
@@ -35,6 +35,7 @@
35
35
  ],
36
36
  "nx": {
37
37
  "sourceRoot": "<%- directory %>/src",
38
+ "projectType": "library",
38
39
  "targets": {
39
40
  "build": {
40
41
  "executor": "@nx/js:swc",
@@ -11,7 +11,7 @@
11
11
 
12
12
  ## <%- fullProjectName %>
13
13
 
14
- - [ ] add description for <%- fullProjectName %>
14
+ <%- fullProjectName %> database
15
15
 
16
16
 
17
17
  ## Installation
@@ -23,7 +23,7 @@ pnpm add <%- fullProjectName %>
23
23
  ## 💖 Support My Work
24
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
25
 
26
- ![CashApp](https://img.shields.io/badge/Sponsor%20me-%23EA4AAA.svg?style=for-the-badge&logo=github-sponsors&logoColor=white)(<%- funding[0].url %>)
26
+ [![CashApp](https://img.shields.io/badge/Sponsor%20me-%23EA4AAA.svg?style=for-the-badge&logo=github-sponsors&logoColor=white)](<%- funding[0].url %>)
27
27
 
28
28
 
29
29
  ---
@@ -27,15 +27,30 @@
27
27
  "import": "./dist/index.js",
28
28
  "default": "./dist/index.js"
29
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"
30
+ "./client": {
31
+ "types": "./dist/prisma/client.d.ts",
32
+ "import": "./dist/prisma/client.js",
33
+ "default": "./dist/prisma/client.js"
34
+ },
35
+ "./browser": {
36
+ "types": "./dist/prisma/browser.d.ts",
37
+ "import": "./dist/prisma/browser.js",
38
+ "default": "./dist/prisma/browser.js"
39
+ },
40
+ "./models": {
41
+ "types": "./dist/prisma/models.d.ts",
42
+ "import": "./dist/prisma/models.js",
43
+ "default": "./dist/prisma/models.js"
44
+ },
45
+ "./enums": {
46
+ "types": "./dist/prisma/enums.d.ts",
47
+ "import": "./dist/prisma/enums.js",
48
+ "default": "./dist/prisma/enums.js"
34
49
  },
35
50
  "./zod": {
36
- "types": "./dist/generated/zod/index.d.ts",
37
- "import": "./dist/generated/zod/index.js",
38
- "default": "./dist/generated/zod/index.js"
51
+ "types": "./dist/zod/index.d.ts",
52
+ "import": "./dist/zod/index.js",
53
+ "default": "./dist/zod/index.js"
39
54
  }
40
55
  },
41
56
  "files": [
@@ -46,6 +61,7 @@
46
61
  ],
47
62
  "nx": {
48
63
  "sourceRoot": "<%- directory %>/src",
64
+ "projectType": "library",
49
65
  "targets": {
50
66
  "build": {
51
67
  "executor": "@nx/js:swc",
@@ -69,19 +85,19 @@
69
85
  }
70
86
  }
71
87
  },
88
+
72
89
  "peerDependencies": {
73
90
  "@prisma/client": "7.2.0",
74
- "zod": "4.3.4"
91
+ "zod": "4.3.4",
92
+ "@robert-brightline/zod": "workspace:*"
75
93
  },
76
94
  "dependencies": {
77
- "@prisma/adapter-pg": "^7.2.0",
78
95
  "@swc/helpers": "~0.5.11"
79
96
  },
80
97
  "devDependencies": {
98
+ "@robert-brightline/zod": "workspace:*",
81
99
  "dotenv": "^17.2.3",
82
100
  "prisma": "^7.2.0",
83
- "prisma-zod-generator": "^2.1.2",
84
- "vitest": "^4.0.8",
85
- "zod-prisma-types": "^3.3.10"
101
+ "vitest": "^4.0.8"
86
102
  }
87
103
  }
@@ -1,24 +1,49 @@
1
+ datasource db {
2
+ provider = "postgresql"
3
+ }
4
+
1
5
  generator client {
2
6
  provider = "prisma-client"
3
- output = "../src/generated/prisma"
7
+ output = "../src/prisma"
4
8
  }
5
9
 
6
- datasource db {
7
- provider = "postgresql"
10
+ generator zod {
11
+ provider = "zod"
12
+ output = "../src/zod"
8
13
  }
9
14
 
10
- generator zod {
11
- provider = "zod-prisma-types"
12
- output = "../src/generated/zod"
13
- prismaClientPath = "../prisma/client.js"
15
+ enum Operation {
16
+ READ
17
+ WRITE
18
+ UPDATE
19
+ DELETE
20
+ MANAGE
21
+ TRIGGER
22
+ NOTIFY
23
+ APPROVE
24
+ START
25
+ STOP
26
+ RESTART
27
+ REJECT
28
+ SUBMIT
29
+ ARCHIVE
30
+ RESTORE
31
+ EXPORT
32
+ IMPORT
33
+ GRANT
34
+ REVOKE
35
+ LOCK
36
+ UNLOCK
37
+ SYNC
38
+ DEPLOY
39
+ ROLLBACK
14
40
  }
15
41
 
16
- model Sample {
42
+ model AuditLog {
17
43
  id Int @id @default(autoincrement())
18
- uuid String @unique @default(uuid(7))
19
44
  createdAt DateTime @default(now())
20
- updatedAt DateTime @updatedAt
21
- deletedAt DateTime?
22
-
23
- name String @unique
45
+ subject String
46
+ message String?
47
+ operation Operation
48
+ operator String @db.Uuid
24
49
  }
@@ -1,8 +1 @@
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
-
1
+ export const NO_EXPORT = 'NO EXPORT';
@@ -1,4 +1,4 @@
1
- describe("index", ()=>{
1
+ describe("skip-test", ()=>{
2
2
  it('should work', ()=>{
3
3
  expect(1).toBe(1);
4
4
  })
@@ -20,6 +20,7 @@
20
20
  "vite.config.ts",
21
21
  "vitest.config.mts",
22
22
  "src/**/*.test.ts",
23
- "src/**/*.spec.ts"
23
+ "src/**/*.spec.ts",
24
+ "tests/**/*.*"
24
25
  ]
25
26
  }
@@ -16,6 +16,8 @@
16
16
  "vitest.config.mts",
17
17
  "src/**/*.test.ts",
18
18
  "src/**/*.spec.ts",
19
+ "tests/**/*.test.ts",
20
+ "tests/**/*.spec.ts",
19
21
  "src/**/*.d.ts"
20
22
  ],
21
23
  "references": [
@@ -6,7 +6,7 @@ export default defineConfig(() => ({
6
6
  cacheDir: '../../node_modules/.vite/<%- directory %>',
7
7
  plugins: [],
8
8
  test: {
9
- name: '@robert-brightline/ims-db',
9
+ name: '@<%- repositoryName %>/<%- shortProjectName %>',
10
10
  watch: false,
11
11
  globals: true,
12
12
  environment: 'node',
@@ -4,7 +4,7 @@ export default defineConfig(() => ({
4
4
  root: __dirname,
5
5
  cacheDir: '../../node_modules/.vite/<%- directory %>',
6
6
  test: {
7
- name: '@robert-brightline/ims-db',
7
+ name: '@<%- repositoryName %>/<%- shortProjectName %>',
8
8
  watch: false,
9
9
  globals: true,
10
10
  environment: 'node',
@@ -1 +1 @@
1
- {"version":3,"file":"project-options.d.ts","sourceRoot":"","sources":["../../../src/generators/project/project-options.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEvD,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACnC,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAsB,cAAc,CAClC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,wBAAwB,CAAC,CAiDnC"}
1
+ {"version":3,"file":"project-options.d.ts","sourceRoot":"","sources":["../../../src/generators/project/project-options.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEvD,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACnC,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAsB,cAAc,CAClC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,wBAAwB,CAAC,CAkDnC"}
@@ -20,11 +20,12 @@ async function projectOptions(options) {
20
20
  const email = (0, git_1.suffixEmail)((0, git_1.gitEmail)(), shortProjectName.replace(/[^a-zA-Z0-9]/g, '-').toLowerCase());
21
21
  const repoUrl = (0, git_1.gitRepoUrl)();
22
22
  const repositoryName = (0, git_1.gitRepoName)(repoUrl);
23
+ const githubPageUrl = (0, git_1.githubPage)(repositoryName);
23
24
  const fullProjectName = `@${repositoryName}/${shortProjectName}`;
24
25
  const currentUsername = (0, git_1.gitCurrentUsername)();
25
26
  const ownerUsername = (0, git_1.gitRepoOwnerUsername)(repoUrl);
26
27
  const version = main.version ?? '0.0.1';
27
- const homepage = (0, git_1.githubPageForDoc)(repoUrl, options.directory);
28
+ const homepage = (0, git_1.githubPageForDoc)(githubPageUrl, options.directory);
28
29
  return {
29
30
  version,
30
31
  funding,
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.10",
4
+ "version": "0.0.17",
5
5
  "author": {
6
6
  "name": "robert-brightline",
7
7
  "email": "robert.brightline+names@gmail.com"