@prenta/cli 0.16.1 → 0.16.2
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/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-test.log +21 -189
- package/CHANGELOG.md +6 -0
- package/dist/commands/migrate-media-optimize.d.ts.map +1 -1
- package/dist/commands/migrate-media-optimize.js +2 -4
- package/dist/commands/migrate-media-optimize.js.map +1 -1
- package/dist/commands/migrate-meta.d.ts.map +1 -1
- package/dist/commands/migrate-meta.js +2 -4
- package/dist/commands/migrate-meta.js.map +1 -1
- package/dist/commands/migrate-schema.d.ts.map +1 -1
- package/dist/commands/migrate-schema.js +2 -4
- package/dist/commands/migrate-schema.js.map +1 -1
- package/dist/commands/seed.d.ts.map +1 -1
- package/dist/commands/seed.js +3 -4
- package/dist/commands/seed.js.map +1 -1
- package/dist/utils/database.d.ts.map +1 -1
- package/dist/utils/database.js +8 -18
- package/dist/utils/database.js.map +1 -1
- package/dist/utils/import-typescript.d.ts +17 -0
- package/dist/utils/import-typescript.d.ts.map +1 -0
- package/dist/utils/import-typescript.js +31 -0
- package/dist/utils/import-typescript.js.map +1 -0
- package/package.json +3 -3
- package/src/__tests__/fixtures/tsx-loader/client.ts +3 -0
- package/src/__tests__/fixtures/tsx-loader/enums.ts +1 -0
- package/src/__tests__/import-typescript.test.ts +30 -0
- package/src/commands/migrate-media-optimize.ts +2 -4
- package/src/commands/migrate-meta.ts +2 -4
- package/src/commands/migrate-schema.ts +2 -4
- package/src/commands/seed.ts +3 -4
- package/src/utils/database.ts +10 -22
- package/src/utils/import-typescript.ts +32 -0
- package/tsconfig.json +2 -1
- package/vitest.config.ts +8 -0
- package/dist/__tests__/db-init.test.d.ts +0 -2
- package/dist/__tests__/db-init.test.d.ts.map +0 -1
- package/dist/__tests__/db-init.test.js +0 -127
- package/dist/__tests__/db-init.test.js.map +0 -1
- package/dist/__tests__/db-sync-resolver.test.d.ts +0 -2
- package/dist/__tests__/db-sync-resolver.test.d.ts.map +0 -1
- package/dist/__tests__/db-sync-resolver.test.js +0 -25
- package/dist/__tests__/db-sync-resolver.test.js.map +0 -1
- package/dist/__tests__/db-sync.test.d.ts +0 -2
- package/dist/__tests__/db-sync.test.d.ts.map +0 -1
- package/dist/__tests__/db-sync.test.js +0 -214
- package/dist/__tests__/db-sync.test.js.map +0 -1
- package/dist/__tests__/deployment-diagnostics.test.d.ts +0 -2
- package/dist/__tests__/deployment-diagnostics.test.d.ts.map +0 -1
- package/dist/__tests__/deployment-diagnostics.test.js +0 -401
- package/dist/__tests__/deployment-diagnostics.test.js.map +0 -1
- package/dist/__tests__/form-seed.test.d.ts +0 -2
- package/dist/__tests__/form-seed.test.d.ts.map +0 -1
- package/dist/__tests__/form-seed.test.js +0 -79
- package/dist/__tests__/form-seed.test.js.map +0 -1
- package/dist/__tests__/init.test.d.ts +0 -2
- package/dist/__tests__/init.test.d.ts.map +0 -1
- package/dist/__tests__/init.test.js +0 -25
- package/dist/__tests__/init.test.js.map +0 -1
- package/dist/__tests__/load-dotenv.test.d.ts +0 -2
- package/dist/__tests__/load-dotenv.test.d.ts.map +0 -1
- package/dist/__tests__/load-dotenv.test.js +0 -40
- package/dist/__tests__/load-dotenv.test.js.map +0 -1
- package/dist/__tests__/mcp-init.test.d.ts +0 -2
- package/dist/__tests__/mcp-init.test.d.ts.map +0 -1
- package/dist/__tests__/mcp-init.test.js +0 -100
- package/dist/__tests__/mcp-init.test.js.map +0 -1
- package/dist/__tests__/prisma-client-path.test.d.ts +0 -2
- package/dist/__tests__/prisma-client-path.test.d.ts.map +0 -1
- package/dist/__tests__/prisma-client-path.test.js +0 -66
- package/dist/__tests__/prisma-client-path.test.js.map +0 -1
- package/dist/__tests__/schema-fragment.test.d.ts +0 -2
- package/dist/__tests__/schema-fragment.test.d.ts.map +0 -1
- package/dist/__tests__/schema-fragment.test.js +0 -40
- package/dist/__tests__/schema-fragment.test.js.map +0 -1
- package/dist/__tests__/seed.test.d.ts +0 -2
- package/dist/__tests__/seed.test.d.ts.map +0 -1
- package/dist/__tests__/seed.test.js +0 -207
- package/dist/__tests__/seed.test.js.map +0 -1
- package/dist/__tests__/upgrade.test.d.ts +0 -2
- package/dist/__tests__/upgrade.test.d.ts.map +0 -1
- package/dist/__tests__/upgrade.test.js +0 -41
- package/dist/__tests__/upgrade.test.js.map +0 -1
- package/dist/__tests__/vercel-env-matrix.test.d.ts +0 -2
- package/dist/__tests__/vercel-env-matrix.test.d.ts.map +0 -1
- package/dist/__tests__/vercel-env-matrix.test.js +0 -56
- package/dist/__tests__/vercel-env-matrix.test.js.map +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turn a filesystem path into a `file://` URL with no query string.
|
|
3
|
+
*
|
|
4
|
+
* `tsx`'s `tsImport()` appends `?namespace=` to child specifiers. On Windows
|
|
5
|
+
* those leak through as raw paths (`C:\Git Local\...\enums.ts?namespace=1`),
|
|
6
|
+
* which `fs.open` rejects. Every project TS load must stay on a file URL.
|
|
7
|
+
*/
|
|
8
|
+
export declare function toProjectFileUrl(filePath: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Load a consumer TypeScript file (prenta.config.ts, lib/prisma.ts,
|
|
11
|
+
* generated/prisma/client.ts) via tsx's process-wide ESM hook.
|
|
12
|
+
*
|
|
13
|
+
* Do not use `tsImport()` — its namespaced loader is what produced the
|
|
14
|
+
* Windows `?namespace=` crashes on adapter-pg and then enums.ts.
|
|
15
|
+
*/
|
|
16
|
+
export declare function importProjectTypescript(filePath: string): Promise<unknown>;
|
|
17
|
+
//# sourceMappingURL=import-typescript.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-typescript.d.ts","sourceRoot":"","sources":["../../src/utils/import-typescript.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGzD;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOhF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { pathToFileURL } from 'node:url';
|
|
3
|
+
let registered = false;
|
|
4
|
+
/**
|
|
5
|
+
* Turn a filesystem path into a `file://` URL with no query string.
|
|
6
|
+
*
|
|
7
|
+
* `tsx`'s `tsImport()` appends `?namespace=` to child specifiers. On Windows
|
|
8
|
+
* those leak through as raw paths (`C:\Git Local\...\enums.ts?namespace=1`),
|
|
9
|
+
* which `fs.open` rejects. Every project TS load must stay on a file URL.
|
|
10
|
+
*/
|
|
11
|
+
export function toProjectFileUrl(filePath) {
|
|
12
|
+
if (filePath.startsWith('file:'))
|
|
13
|
+
return filePath;
|
|
14
|
+
return pathToFileURL(path.resolve(filePath)).href;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Load a consumer TypeScript file (prenta.config.ts, lib/prisma.ts,
|
|
18
|
+
* generated/prisma/client.ts) via tsx's process-wide ESM hook.
|
|
19
|
+
*
|
|
20
|
+
* Do not use `tsImport()` — its namespaced loader is what produced the
|
|
21
|
+
* Windows `?namespace=` crashes on adapter-pg and then enums.ts.
|
|
22
|
+
*/
|
|
23
|
+
export async function importProjectTypescript(filePath) {
|
|
24
|
+
if (!registered) {
|
|
25
|
+
const { register } = await import('tsx/esm/api');
|
|
26
|
+
register();
|
|
27
|
+
registered = true;
|
|
28
|
+
}
|
|
29
|
+
return import(toProjectFileUrl(filePath));
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=import-typescript.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-typescript.js","sourceRoot":"","sources":["../../src/utils/import-typescript.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,IAAI,UAAU,GAAG,KAAK,CAAA;AAEtB;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAgB;IAC/C,IAAI,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,QAAQ,CAAA;IACjD,OAAO,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAA;AACnD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,QAAgB;IAC5D,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAA;QAChD,QAAQ,EAAE,CAAA;QACV,UAAU,GAAG,IAAI,CAAA;IACnB,CAAC;IACD,OAAO,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAA;AAC3C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prenta/cli",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "CLI for Prenta CMS — migrations, codegen, imports, exports, and upgrades",
|
|
6
6
|
"repository": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"chalk": "^5.4.1",
|
|
22
22
|
"commander": "^13.1.0",
|
|
23
23
|
"ora": "^8.2.0",
|
|
24
|
-
"tsx": "^4.
|
|
24
|
+
"tsx": "^4.23.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@prenta/core": ">=0.1.0"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"typescript": "^5.7.0",
|
|
31
31
|
"vitest": "^4.1.0",
|
|
32
|
-
"@prenta/core": "2.3.
|
|
32
|
+
"@prenta/core": "2.3.1"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "tsc",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const MediaKind = 'image'
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import path from 'node:path'
|
|
2
|
+
import { fileURLToPath } from 'node:url'
|
|
3
|
+
import { describe, expect, it } from 'vitest'
|
|
4
|
+
|
|
5
|
+
import { importProjectTypescript, toProjectFileUrl } from '../utils/import-typescript.js'
|
|
6
|
+
|
|
7
|
+
describe('toProjectFileUrl', () => {
|
|
8
|
+
it('converts a path with spaces into a file URL without a query', () => {
|
|
9
|
+
const href = toProjectFileUrl(
|
|
10
|
+
path.join('Git Local', 'upchat', 'generated', 'prisma', 'enums.ts'),
|
|
11
|
+
)
|
|
12
|
+
expect(href.startsWith('file:')).toBe(true)
|
|
13
|
+
expect(href.includes('?')).toBe(false)
|
|
14
|
+
expect(href).toContain('Git%20Local')
|
|
15
|
+
expect(href.endsWith('enums.ts')).toBe(true)
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
it('leaves an existing file URL unchanged', () => {
|
|
19
|
+
const href = 'file:///C:/Git%20Local/upchat/lib/prisma.ts'
|
|
20
|
+
expect(toProjectFileUrl(href)).toBe(href)
|
|
21
|
+
})
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
describe('importProjectTypescript', () => {
|
|
25
|
+
it('loads a TypeScript file that imports a sibling without appending ?namespace=', async () => {
|
|
26
|
+
const parent = fileURLToPath(new URL('./fixtures/tsx-loader/client.ts', import.meta.url))
|
|
27
|
+
const mod = (await importProjectTypescript(parent)) as { marker: string }
|
|
28
|
+
expect(mod.marker).toBe('image')
|
|
29
|
+
})
|
|
30
|
+
})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Command } from 'commander'
|
|
2
2
|
import { resolve } from 'node:path'
|
|
3
|
-
import { pathToFileURL } from 'node:url'
|
|
4
3
|
import ora from 'ora'
|
|
5
4
|
import { connectProjectDatabase } from '../utils/database.js'
|
|
5
|
+
import { importProjectTypescript } from '../utils/import-typescript.js'
|
|
6
6
|
import { loadProjectEnv } from '../utils/load-dotenv.js'
|
|
7
7
|
import { logger } from '../utils/logger.js'
|
|
8
8
|
|
|
@@ -18,9 +18,7 @@ async function loadProjectConfig(configPath: string): Promise<void> {
|
|
|
18
18
|
try {
|
|
19
19
|
const { setPrentaConfig, setStorageAdapter, autoWireStorageAdapter } =
|
|
20
20
|
await import('@prenta/core')
|
|
21
|
-
const
|
|
22
|
-
const abs = pathToFileURL(resolve(configPath)).href
|
|
23
|
-
const mod = (await tsImport(abs, import.meta.url)) as {
|
|
21
|
+
const mod = (await importProjectTypescript(resolve(configPath))) as {
|
|
24
22
|
default?: unknown
|
|
25
23
|
config?: unknown
|
|
26
24
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Command } from 'commander'
|
|
2
2
|
import { resolve } from 'node:path'
|
|
3
|
-
import { pathToFileURL } from 'node:url'
|
|
4
3
|
import ora from 'ora'
|
|
5
4
|
import { connectProjectDatabase } from '../utils/database.js'
|
|
5
|
+
import { importProjectTypescript } from '../utils/import-typescript.js'
|
|
6
6
|
import { loadProjectEnv } from '../utils/load-dotenv.js'
|
|
7
7
|
import { logger } from '../utils/logger.js'
|
|
8
8
|
|
|
@@ -15,9 +15,7 @@ interface MigrateMetaOptions {
|
|
|
15
15
|
async function loadProjectConfig(configPath: string): Promise<void> {
|
|
16
16
|
try {
|
|
17
17
|
const { setPrentaConfig } = await import('@prenta/core')
|
|
18
|
-
const
|
|
19
|
-
const abs = pathToFileURL(resolve(configPath)).href
|
|
20
|
-
const mod = (await tsImport(abs, import.meta.url)) as {
|
|
18
|
+
const mod = (await importProjectTypescript(resolve(configPath))) as {
|
|
21
19
|
default?: unknown
|
|
22
20
|
config?: unknown
|
|
23
21
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Command } from 'commander'
|
|
2
2
|
import { resolve } from 'node:path'
|
|
3
|
-
import { pathToFileURL } from 'node:url'
|
|
4
3
|
import ora from 'ora'
|
|
5
4
|
import { connectProjectDatabase } from '../utils/database.js'
|
|
5
|
+
import { importProjectTypescript } from '../utils/import-typescript.js'
|
|
6
6
|
import { loadProjectEnv } from '../utils/load-dotenv.js'
|
|
7
7
|
import { logger } from '../utils/logger.js'
|
|
8
8
|
|
|
@@ -15,9 +15,7 @@ interface MigrateSchemaOptions {
|
|
|
15
15
|
async function loadProjectConfig(configPath: string): Promise<void> {
|
|
16
16
|
try {
|
|
17
17
|
const { setPrentaConfig } = await import('@prenta/core')
|
|
18
|
-
const
|
|
19
|
-
const abs = pathToFileURL(resolve(configPath)).href
|
|
20
|
-
const mod = (await tsImport(abs, import.meta.url)) as {
|
|
18
|
+
const mod = (await importProjectTypescript(resolve(configPath))) as {
|
|
21
19
|
default?: unknown
|
|
22
20
|
config?: unknown
|
|
23
21
|
}
|
package/src/commands/seed.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { readFile } from 'node:fs/promises'
|
|
|
3
3
|
import { existsSync } from 'node:fs'
|
|
4
4
|
import path from 'node:path'
|
|
5
5
|
import { createInterface } from 'node:readline/promises'
|
|
6
|
-
import { pathToFileURL } from 'node:url'
|
|
7
6
|
import ora from 'ora'
|
|
8
7
|
import { logger } from '../utils/logger.js'
|
|
9
8
|
import { connectProjectDatabase } from '../utils/database.js'
|
|
10
9
|
import { validateFormSeeds } from '../utils/form-seed.js'
|
|
10
|
+
import { importProjectTypescript, toProjectFileUrl } from '../utils/import-typescript.js'
|
|
11
11
|
|
|
12
12
|
async function confirm(question: string): Promise<boolean> {
|
|
13
13
|
const rl = createInterface({ input: process.stdin, output: process.stdout })
|
|
@@ -345,11 +345,10 @@ async function loadSeedFile(filePath: string): Promise<unknown> {
|
|
|
345
345
|
return JSON.parse(raw)
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
-
const fileUrl = pathToFileURL(path.resolve(filePath)).href
|
|
349
348
|
const mod =
|
|
350
349
|
extension === '.ts'
|
|
351
|
-
? await
|
|
352
|
-
: await import(
|
|
350
|
+
? await importProjectTypescript(filePath)
|
|
351
|
+
: await import(toProjectFileUrl(filePath))
|
|
353
352
|
|
|
354
353
|
return (mod as { default?: unknown; seed?: unknown }).default ?? (mod as { seed?: unknown }).seed
|
|
355
354
|
}
|
package/src/utils/database.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { createRequire } from 'node:module'
|
|
|
2
2
|
import path from 'node:path'
|
|
3
3
|
import { pathToFileURL } from 'node:url'
|
|
4
4
|
|
|
5
|
+
import { importProjectTypescript } from './import-typescript.js'
|
|
5
6
|
import { findLibPrismaHelper, resolveProjectPrismaClientModule } from './prisma-client-path.js'
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -60,23 +61,13 @@ async function tryLibPrismaClient(): Promise<any | null> {
|
|
|
60
61
|
const helperPath = findLibPrismaHelper()
|
|
61
62
|
if (!helperPath) return null
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
// absolute paths; on Windows (especially with spaces) Node's ESM loader
|
|
67
|
-
// then rejects `@prisma/adapter-pg` and every `migrate:*` command dies.
|
|
68
|
-
const parent = pathToFileURL(path.join(process.cwd(), 'package.json')).href
|
|
69
|
-
const mod = (await tsImport(pathToFileURL(helperPath).href, parent)) as {
|
|
70
|
-
getPrisma?: () => unknown
|
|
71
|
-
default?: { getPrisma?: () => unknown }
|
|
72
|
-
}
|
|
73
|
-
const getPrisma = mod.getPrisma ?? mod.default?.getPrisma
|
|
74
|
-
if (typeof getPrisma !== 'function') return null
|
|
75
|
-
return getPrisma()
|
|
76
|
-
} catch {
|
|
77
|
-
// Fall through to the generated Prisma client + pathToFileURL imports.
|
|
78
|
-
return null
|
|
64
|
+
const mod = (await importProjectTypescript(helperPath)) as {
|
|
65
|
+
getPrisma?: () => unknown
|
|
66
|
+
default?: { getPrisma?: () => unknown }
|
|
79
67
|
}
|
|
68
|
+
const getPrisma = mod.getPrisma ?? mod.default?.getPrisma
|
|
69
|
+
if (typeof getPrisma !== 'function') return null
|
|
70
|
+
return getPrisma()
|
|
80
71
|
}
|
|
81
72
|
|
|
82
73
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- see above.
|
|
@@ -93,15 +84,12 @@ async function createProjectPrismaClient(): Promise<any> {
|
|
|
93
84
|
|
|
94
85
|
if (generatedClient) {
|
|
95
86
|
const url = process.env.DATABASE_URL
|
|
96
|
-
const [
|
|
97
|
-
|
|
87
|
+
const [clientModule, adapterModule, pgModule] = await Promise.all([
|
|
88
|
+
importProjectTypescript(generatedClient),
|
|
98
89
|
importModule('@prisma/adapter-pg', requireFromProject),
|
|
99
90
|
importModule('pg', requireFromProject),
|
|
100
91
|
])
|
|
101
|
-
const { PrismaClient } =
|
|
102
|
-
pathToFileURL(generatedClient).href,
|
|
103
|
-
import.meta.url,
|
|
104
|
-
)) as {
|
|
92
|
+
const { PrismaClient } = clientModule as {
|
|
105
93
|
PrismaClient: new (options?: unknown) => any
|
|
106
94
|
}
|
|
107
95
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import path from 'node:path'
|
|
2
|
+
import { pathToFileURL } from 'node:url'
|
|
3
|
+
|
|
4
|
+
let registered = false
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Turn a filesystem path into a `file://` URL with no query string.
|
|
8
|
+
*
|
|
9
|
+
* `tsx`'s `tsImport()` appends `?namespace=` to child specifiers. On Windows
|
|
10
|
+
* those leak through as raw paths (`C:\Git Local\...\enums.ts?namespace=1`),
|
|
11
|
+
* which `fs.open` rejects. Every project TS load must stay on a file URL.
|
|
12
|
+
*/
|
|
13
|
+
export function toProjectFileUrl(filePath: string): string {
|
|
14
|
+
if (filePath.startsWith('file:')) return filePath
|
|
15
|
+
return pathToFileURL(path.resolve(filePath)).href
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Load a consumer TypeScript file (prenta.config.ts, lib/prisma.ts,
|
|
20
|
+
* generated/prisma/client.ts) via tsx's process-wide ESM hook.
|
|
21
|
+
*
|
|
22
|
+
* Do not use `tsImport()` — its namespaced loader is what produced the
|
|
23
|
+
* Windows `?namespace=` crashes on adapter-pg and then enums.ts.
|
|
24
|
+
*/
|
|
25
|
+
export async function importProjectTypescript(filePath: string): Promise<unknown> {
|
|
26
|
+
if (!registered) {
|
|
27
|
+
const { register } = await import('tsx/esm/api')
|
|
28
|
+
register()
|
|
29
|
+
registered = true
|
|
30
|
+
}
|
|
31
|
+
return import(toProjectFileUrl(filePath))
|
|
32
|
+
}
|
package/tsconfig.json
CHANGED
package/vitest.config.ts
ADDED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"db-init.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/db-init.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
2
|
-
import { mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
|
|
3
|
-
import { tmpdir } from 'node:os';
|
|
4
|
-
import path from 'node:path';
|
|
5
|
-
import { afterEach, describe, expect, it, vi } from 'vitest';
|
|
6
|
-
import { extractModelsFragment, registerDbInitCommand, resetCanonicalSchemaReader, resetDbInitCommandRunner, setCanonicalSchemaReader, setDbInitCommandRunner, } from '../commands/db-init.js';
|
|
7
|
-
const FULL_SCHEMA = `generator client {
|
|
8
|
-
provider = "prisma-client"
|
|
9
|
-
output = "../generated"
|
|
10
|
-
previewFeatures = ["relationJoins"]
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
datasource db {
|
|
14
|
-
provider = "postgresql"
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
enum DocumentStatus {
|
|
18
|
-
DRAFT
|
|
19
|
-
PUBLISHED
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
model Document {
|
|
23
|
-
id String @id @default(cuid())
|
|
24
|
-
collection String
|
|
25
|
-
status DocumentStatus @default(DRAFT)
|
|
26
|
-
|
|
27
|
-
@@index([collection])
|
|
28
|
-
@@map("prenta_documents")
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
model User {
|
|
32
|
-
id String @id @default(cuid())
|
|
33
|
-
email String @unique
|
|
34
|
-
|
|
35
|
-
@@map("prenta_users")
|
|
36
|
-
}
|
|
37
|
-
`;
|
|
38
|
-
function consumerSchema() {
|
|
39
|
-
return `generator client {
|
|
40
|
-
provider = "prisma-client-js"
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
datasource db {
|
|
44
|
-
provider = "postgresql"
|
|
45
|
-
url = env("DATABASE_URL")
|
|
46
|
-
}
|
|
47
|
-
`;
|
|
48
|
-
}
|
|
49
|
-
describe('db:init (WS-D D5 — canonical schema, no stale fragment)', () => {
|
|
50
|
-
afterEach(() => {
|
|
51
|
-
resetDbInitCommandRunner();
|
|
52
|
-
resetCanonicalSchemaReader();
|
|
53
|
-
vi.restoreAllMocks();
|
|
54
|
-
});
|
|
55
|
-
describe('extractModelsFragment', () => {
|
|
56
|
-
it('strips generator and datasource blocks but keeps enums + models', () => {
|
|
57
|
-
const fragment = extractModelsFragment(FULL_SCHEMA);
|
|
58
|
-
expect(fragment).not.toMatch(/generator\s+\w+\s*\{/);
|
|
59
|
-
expect(fragment).not.toMatch(/datasource\s+\w+\s*\{/);
|
|
60
|
-
expect(fragment).toContain('enum DocumentStatus');
|
|
61
|
-
expect(fragment).toContain('model Document');
|
|
62
|
-
expect(fragment).toContain('model User');
|
|
63
|
-
// The whole point of D5: real @@map names survive.
|
|
64
|
-
expect(fragment).toContain('@@map("prenta_documents")');
|
|
65
|
-
expect(fragment).toContain('@@map("prenta_users")');
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
describe('command', () => {
|
|
69
|
-
it('injects canonical models with @@map and no duplicate datasource/generator', async () => {
|
|
70
|
-
const tempRoot = await mkdtemp(path.join(tmpdir(), 'prenta-db-init-d5-'));
|
|
71
|
-
const schemaPath = path.join(tempRoot, 'schema.prisma');
|
|
72
|
-
await writeFile(schemaPath, consumerSchema());
|
|
73
|
-
vi.spyOn(process, 'cwd').mockReturnValue(tempRoot);
|
|
74
|
-
setDbInitCommandRunner(() => undefined);
|
|
75
|
-
setCanonicalSchemaReader(async () => FULL_SCHEMA);
|
|
76
|
-
const command = new Command();
|
|
77
|
-
registerDbInitCommand(command);
|
|
78
|
-
await command.parseAsync(['node', 'prenta', 'db:init', '--schema', 'schema.prisma']);
|
|
79
|
-
const result = await readFile(schemaPath, 'utf-8');
|
|
80
|
-
const injected = result.slice(result.indexOf('// ── Prenta CMS models'));
|
|
81
|
-
// The consumer keeps exactly one datasource/generator (their own).
|
|
82
|
-
expect(result.match(/datasource\s+\w+\s*\{/g)).toHaveLength(1);
|
|
83
|
-
expect(result.match(/generator\s+\w+\s*\{/g)).toHaveLength(1);
|
|
84
|
-
// Injected portion carries the canonical mapped models.
|
|
85
|
-
expect(injected).toContain('@@map("prenta_documents")');
|
|
86
|
-
expect(injected).toContain('model Document');
|
|
87
|
-
expect(injected).not.toMatch(/datasource\s+\w+\s*\{/);
|
|
88
|
-
await rm(tempRoot, { recursive: true, force: true });
|
|
89
|
-
});
|
|
90
|
-
it('fails clearly when cms-core cannot be located', async () => {
|
|
91
|
-
const tempRoot = await mkdtemp(path.join(tmpdir(), 'prenta-db-init-missing-'));
|
|
92
|
-
const schemaPath = path.join(tempRoot, 'schema.prisma');
|
|
93
|
-
await writeFile(schemaPath, consumerSchema());
|
|
94
|
-
vi.spyOn(process, 'cwd').mockReturnValue(tempRoot);
|
|
95
|
-
setDbInitCommandRunner(() => undefined);
|
|
96
|
-
setCanonicalSchemaReader(async () => null);
|
|
97
|
-
const command = new Command();
|
|
98
|
-
registerDbInitCommand(command);
|
|
99
|
-
await command.parseAsync(['node', 'prenta', 'db:init', '--schema', 'schema.prisma']);
|
|
100
|
-
// Schema must be left untouched (no stale fragment written).
|
|
101
|
-
const result = await readFile(schemaPath, 'utf-8');
|
|
102
|
-
expect(result).toBe(consumerSchema());
|
|
103
|
-
expect(process.exitCode).toBe(1);
|
|
104
|
-
process.exitCode = 0;
|
|
105
|
-
await rm(tempRoot, { recursive: true, force: true });
|
|
106
|
-
});
|
|
107
|
-
it('is idempotent without --force', async () => {
|
|
108
|
-
const tempRoot = await mkdtemp(path.join(tmpdir(), 'prenta-db-init-idem-'));
|
|
109
|
-
const schemaPath = path.join(tempRoot, 'schema.prisma');
|
|
110
|
-
await writeFile(schemaPath, consumerSchema());
|
|
111
|
-
vi.spyOn(process, 'cwd').mockReturnValue(tempRoot);
|
|
112
|
-
setDbInitCommandRunner(() => undefined);
|
|
113
|
-
setCanonicalSchemaReader(async () => FULL_SCHEMA);
|
|
114
|
-
const command1 = new Command();
|
|
115
|
-
registerDbInitCommand(command1);
|
|
116
|
-
await command1.parseAsync(['node', 'prenta', 'db:init', '--schema', 'schema.prisma']);
|
|
117
|
-
const first = await readFile(schemaPath, 'utf-8');
|
|
118
|
-
const command2 = new Command();
|
|
119
|
-
registerDbInitCommand(command2);
|
|
120
|
-
await command2.parseAsync(['node', 'prenta', 'db:init', '--schema', 'schema.prisma']);
|
|
121
|
-
const second = await readFile(schemaPath, 'utf-8');
|
|
122
|
-
expect(second).toBe(first);
|
|
123
|
-
await rm(tempRoot, { recursive: true, force: true });
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
//# sourceMappingURL=db-init.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"db-init.test.js","sourceRoot":"","sources":["../../src/__tests__/db-init.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,SAAS,EAAE,QAAQ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AQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;YAElD,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;YAE1B,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;QACtD,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"db-sync-resolver.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/db-sync-resolver.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { pickPrismaDir } from '../commands/db-sync.js';
|
|
3
|
-
// Regression for the db:sync schema-resolution bug: the `./prisma/schema` export
|
|
4
|
-
// points at `schema-fragments/cms-schema.prisma` (an IDE-validation fragment),
|
|
5
|
-
// whose directory has NO `schema.prisma`. resolveCmsCorePrismaDir must skip that
|
|
6
|
-
// resolvable-but-wrong directory and return the one that actually contains
|
|
7
|
-
// `schema.prisma` (the package's `prisma/`).
|
|
8
|
-
describe('pickPrismaDir', () => {
|
|
9
|
-
it('returns the first candidate that actually contains schema.prisma', () => {
|
|
10
|
-
const dir = pickPrismaDir(['/pkg/schema-fragments', '/pkg/prisma'], (d) => d === '/pkg/prisma');
|
|
11
|
-
expect(dir).toBe('/pkg/prisma');
|
|
12
|
-
});
|
|
13
|
-
it('skips a resolvable dir that lacks schema.prisma (the fragment-dir bug)', () => {
|
|
14
|
-
// schema-fragments/ resolves first (the export target) but has no schema.prisma.
|
|
15
|
-
const has = (d) => d.endsWith('/prisma');
|
|
16
|
-
expect(pickPrismaDir(['/pkg/schema-fragments', '/pkg/prisma'], has)).toBe('/pkg/prisma');
|
|
17
|
-
});
|
|
18
|
-
it('returns null when no candidate contains schema.prisma', () => {
|
|
19
|
-
expect(pickPrismaDir(['/a', '/b'], () => false)).toBeNull();
|
|
20
|
-
});
|
|
21
|
-
it('ignores empty/falsy candidates', () => {
|
|
22
|
-
expect(pickPrismaDir(['', '/pkg/prisma'], (d) => d === '/pkg/prisma')).toBe('/pkg/prisma');
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=db-sync-resolver.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"db-sync-resolver.test.js","sourceRoot":"","sources":["../../src/__tests__/db-sync-resolver.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAEtD,iFAAiF;AACjF,+EAA+E;AAC/E,iFAAiF;AACjF,2EAA2E;AAC3E,6CAA6C;AAC7C,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,kEAAkE,EAAE,GAAG,EAAE;QAC1E,MAAM,GAAG,GAAG,aAAa,CAAC,CAAC,uBAAuB,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,aAAa,CAAC,CAAA;QAC/F,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;IACjC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,wEAAwE,EAAE,GAAG,EAAE;QAChF,iFAAiF;QACjF,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;QAChD,MAAM,CAAC,aAAa,CAAC,CAAC,uBAAuB,EAAE,aAAa,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;IAC1F,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE;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