@prisma-next/cli 0.5.0-dev.3 → 0.5.0-dev.5
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/dist/agent-skill-mongo.md +63 -31
- package/dist/agent-skill-postgres.md +1 -1
- package/dist/cli.mjs +119 -13
- package/dist/cli.mjs.map +1 -1
- package/dist/{client-TG7rbCWT.mjs → client-CrsnY58k.mjs} +4 -4
- package/dist/{client-TG7rbCWT.mjs.map → client-CrsnY58k.mjs.map} +1 -1
- package/dist/commands/contract-emit.mjs +2 -2
- package/dist/commands/contract-infer.mjs +2 -2
- package/dist/commands/db-init.mjs +7 -7
- package/dist/commands/db-schema.mjs +5 -5
- package/dist/commands/db-sign.mjs +7 -7
- package/dist/commands/db-update.mjs +7 -7
- package/dist/commands/db-verify.mjs +7 -7
- package/dist/commands/migration-apply.mjs +8 -8
- package/dist/commands/migration-apply.mjs.map +1 -1
- package/dist/commands/migration-new.mjs +5 -5
- package/dist/commands/migration-plan.mjs +6 -6
- package/dist/commands/migration-ref.d.mts +6 -4
- package/dist/commands/migration-ref.d.mts.map +1 -1
- package/dist/commands/migration-ref.mjs +29 -34
- package/dist/commands/migration-ref.mjs.map +1 -1
- package/dist/commands/migration-show.d.mts +1 -1
- package/dist/commands/migration-show.mjs +6 -6
- package/dist/commands/migration-status.d.mts.map +1 -1
- package/dist/commands/migration-status.mjs +2 -2
- package/dist/{config-loader-_W4T21X1.mjs → config-loader-C25b63rJ.mjs} +1 -1
- package/dist/{config-loader-_W4T21X1.mjs.map → config-loader-C25b63rJ.mjs.map} +1 -1
- package/dist/config-loader.mjs +1 -1
- package/dist/contract-emit--feXyNd7.mjs +4 -0
- package/dist/{contract-emit-CNYyzJwF.mjs → contract-emit-NJ01hiiv.mjs} +8 -8
- package/dist/{contract-emit-CNYyzJwF.mjs.map → contract-emit-NJ01hiiv.mjs.map} +1 -1
- package/dist/{contract-emit-CQfj7xJn.mjs → contract-emit-V5SSitUT.mjs} +6 -6
- package/dist/{contract-emit-CQfj7xJn.mjs.map → contract-emit-V5SSitUT.mjs.map} +1 -1
- package/dist/{contract-enrichment-CGW6mm-E.mjs → contract-enrichment-CAOELa-H.mjs} +1 -1
- package/dist/{contract-enrichment-CGW6mm-E.mjs.map → contract-enrichment-CAOELa-H.mjs.map} +1 -1
- package/dist/{contract-infer-BP3DrGgz.mjs → contract-infer-D9cC3rJm.mjs} +4 -4
- package/dist/{contract-infer-BP3DrGgz.mjs.map → contract-infer-D9cC3rJm.mjs.map} +1 -1
- package/dist/exports/control-api.mjs +4 -4
- package/dist/exports/index.mjs +2 -2
- package/dist/exports/init-output.d.mts +39 -0
- package/dist/exports/init-output.d.mts.map +1 -0
- package/dist/exports/init-output.mjs +3 -0
- package/dist/{extract-operation-statements-DZUJNmL3.mjs → extract-operation-statements-DsFfxXVZ.mjs} +2 -2
- package/dist/{extract-operation-statements-DZUJNmL3.mjs.map → extract-operation-statements-DsFfxXVZ.mjs.map} +1 -1
- package/dist/{extract-sql-ddl-DDMX-9mz.mjs → extract-sql-ddl-D9UbZDyz.mjs} +1 -1
- package/dist/{extract-sql-ddl-DDMX-9mz.mjs.map → extract-sql-ddl-D9UbZDyz.mjs.map} +1 -1
- package/dist/{framework-components-DfZKQBQ2.mjs → framework-components-Cr--XBKy.mjs} +2 -2
- package/dist/{framework-components-DfZKQBQ2.mjs.map → framework-components-Cr--XBKy.mjs.map} +1 -1
- package/dist/init-C5220SY9.mjs +2062 -0
- package/dist/init-C5220SY9.mjs.map +1 -0
- package/dist/{inspect-live-schema-DWzf4Q_m.mjs → inspect-live-schema-yrHAvG71.mjs} +6 -6
- package/dist/{inspect-live-schema-DWzf4Q_m.mjs.map → inspect-live-schema-yrHAvG71.mjs.map} +1 -1
- package/dist/migration-cli.mjs +1 -1
- package/dist/{migration-command-scaffold-CLMD302g.mjs → migration-command-scaffold-B3B09et6.mjs} +6 -6
- package/dist/{migration-command-scaffold-CLMD302g.mjs.map → migration-command-scaffold-B3B09et6.mjs.map} +1 -1
- package/dist/{migration-status-B0HLF7So.mjs → migration-status-DUMiH8_G.mjs} +12 -14
- package/dist/{migration-status-B0HLF7So.mjs.map → migration-status-DUMiH8_G.mjs.map} +1 -1
- package/dist/{migrations-B0dOQlk0.mjs → migrations-Bo5WtTla.mjs} +2 -2
- package/dist/{migrations-B0dOQlk0.mjs.map → migrations-Bo5WtTla.mjs.map} +1 -1
- package/dist/output-BpcQrnnq.mjs +103 -0
- package/dist/output-BpcQrnnq.mjs.map +1 -0
- package/dist/{progress-adapter-B-YvmcDu.mjs → progress-adapter-DvQWB1nK.mjs} +1 -1
- package/dist/{progress-adapter-B-YvmcDu.mjs.map → progress-adapter-DvQWB1nK.mjs.map} +1 -1
- package/dist/quick-reference-mongo.md +34 -13
- package/dist/quick-reference-postgres.md +11 -9
- package/dist/{result-handler-CIyu0Pdt.mjs → result-handler-Ba3zWQsI.mjs} +5 -78
- package/dist/result-handler-Ba3zWQsI.mjs.map +1 -0
- package/dist/{terminal-ui-C5k88MmW.mjs → terminal-ui-C3ZLwQxK.mjs} +76 -2
- package/dist/terminal-ui-C3ZLwQxK.mjs.map +1 -0
- package/dist/{validate-contract-deps-esa-VQ0h.mjs → validate-contract-deps-B_Cs29TL.mjs} +1 -1
- package/dist/{validate-contract-deps-esa-VQ0h.mjs.map → validate-contract-deps-B_Cs29TL.mjs.map} +1 -1
- package/dist/{verify-BxiVp50b.mjs → verify-Bkycc-Tf.mjs} +2 -2
- package/dist/{verify-BxiVp50b.mjs.map → verify-Bkycc-Tf.mjs.map} +1 -1
- package/package.json +21 -16
- package/src/commands/init/detect-pnpm-catalog.ts +141 -0
- package/src/commands/init/errors.ts +254 -0
- package/src/commands/init/exit-codes.ts +62 -0
- package/src/commands/init/hygiene-gitattributes.ts +97 -0
- package/src/commands/init/hygiene-gitignore.ts +48 -0
- package/src/commands/init/hygiene-package-scripts.ts +91 -0
- package/src/commands/init/index.ts +112 -7
- package/src/commands/init/init.ts +766 -144
- package/src/commands/init/inputs.ts +421 -0
- package/src/commands/init/output.ts +147 -0
- package/src/commands/init/probe-db.ts +308 -0
- package/src/commands/init/reinit-cleanup.ts +83 -0
- package/src/commands/init/templates/agent-skill-mongo.md +63 -31
- package/src/commands/init/templates/agent-skill-postgres.md +1 -1
- package/src/commands/init/templates/agent-skill.ts +25 -3
- package/src/commands/init/templates/code-templates.ts +125 -32
- package/src/commands/init/templates/env.ts +80 -0
- package/src/commands/init/templates/quick-reference-mongo.md +34 -13
- package/src/commands/init/templates/quick-reference-postgres.md +11 -9
- package/src/commands/init/templates/quick-reference.ts +42 -3
- package/src/commands/init/templates/tsconfig.ts +167 -5
- package/src/commands/migration-apply.ts +3 -3
- package/src/commands/migration-ref.ts +32 -47
- package/src/commands/migration-status.ts +16 -21
- package/src/exports/init-output.ts +10 -0
- package/src/utils/command-helpers.ts +3 -3
- package/dist/contract-emit-fhNwwhkQ.mjs +0 -4
- package/dist/init-CQfo_4Ro.mjs +0 -430
- package/dist/init-CQfo_4Ro.mjs.map +0 -1
- package/dist/result-handler-CIyu0Pdt.mjs.map +0 -1
- package/dist/terminal-ui-C5k88MmW.mjs.map +0 -1
- /package/dist/{cli-errors-C0JhVj0c.d.mts → cli-errors-BFYgBH3L.d.mts} +0 -0
- /package/dist/{cli-errors-DHq6GQGu.mjs → cli-errors-Cd79vmTH.mjs} +0 -0
|
@@ -1,17 +1,22 @@
|
|
|
1
|
+
import type { RefEntry } from '@prisma-next/migration-tools/refs';
|
|
1
2
|
import {
|
|
3
|
+
deleteRef,
|
|
4
|
+
readRef,
|
|
2
5
|
readRefs,
|
|
3
|
-
resolveRef,
|
|
4
6
|
validateRefName,
|
|
5
7
|
validateRefValue,
|
|
6
|
-
|
|
8
|
+
writeRef,
|
|
7
9
|
} from '@prisma-next/migration-tools/refs';
|
|
8
10
|
import { MigrationToolsError } from '@prisma-next/migration-tools/types';
|
|
9
11
|
import { notOk, ok, type Result } from '@prisma-next/utils/result';
|
|
10
12
|
import { Command } from 'commander';
|
|
11
|
-
import { resolve } from 'pathe';
|
|
12
13
|
import { loadConfig } from '../config-loader';
|
|
13
14
|
import { CliStructuredError, errorRuntime, errorUnexpected } from '../utils/cli-errors';
|
|
14
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
addGlobalOptions,
|
|
17
|
+
resolveMigrationPaths,
|
|
18
|
+
setCommandDescriptions,
|
|
19
|
+
} from '../utils/command-helpers';
|
|
15
20
|
import { formatCommandHelp } from '../utils/formatters/help';
|
|
16
21
|
import { parseGlobalFlags } from '../utils/global-flags';
|
|
17
22
|
import { handleResult } from '../utils/result-handler';
|
|
@@ -21,12 +26,14 @@ interface RefSetResult {
|
|
|
21
26
|
readonly ok: true;
|
|
22
27
|
readonly ref: string;
|
|
23
28
|
readonly hash: string;
|
|
29
|
+
readonly invariants: readonly string[];
|
|
24
30
|
}
|
|
25
31
|
|
|
26
32
|
interface RefGetResult {
|
|
27
33
|
readonly ok: true;
|
|
28
34
|
readonly ref: string;
|
|
29
35
|
readonly hash: string;
|
|
36
|
+
readonly invariants: readonly string[];
|
|
30
37
|
}
|
|
31
38
|
|
|
32
39
|
interface RefDeleteResult {
|
|
@@ -37,12 +44,7 @@ interface RefDeleteResult {
|
|
|
37
44
|
|
|
38
45
|
interface RefListResult {
|
|
39
46
|
readonly ok: true;
|
|
40
|
-
readonly refs: Record<string,
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function resolveRefsPath(configPath?: string, config?: { migrations?: { dir?: string } }): string {
|
|
44
|
-
const base = configPath ? resolve(configPath, '..') : process.cwd();
|
|
45
|
-
return resolve(base, config?.migrations?.dir ?? 'migrations', 'refs.json');
|
|
47
|
+
readonly refs: Record<string, RefEntry>;
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
function mapError(error: unknown): CliStructuredError {
|
|
@@ -70,13 +72,6 @@ function cliErrorInvalidRefValue(hash: string): CliStructuredError {
|
|
|
70
72
|
});
|
|
71
73
|
}
|
|
72
74
|
|
|
73
|
-
function errorRefNotFound(name: string): CliStructuredError {
|
|
74
|
-
return errorRuntime(`Ref "${name}" does not exist`, {
|
|
75
|
-
why: `No ref named "${name}" found in refs.json`,
|
|
76
|
-
fix: `Run \`prisma-next migration ref list\` to see available refs, or \`prisma-next migration ref set ${name} <hash>\` to create it`,
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
|
|
80
75
|
async function executeRefSetCommand(
|
|
81
76
|
name: string,
|
|
82
77
|
hash: string,
|
|
@@ -91,11 +86,10 @@ async function executeRefSetCommand(
|
|
|
91
86
|
|
|
92
87
|
try {
|
|
93
88
|
const config = await loadConfig(options.config);
|
|
94
|
-
const
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return ok({ ok: true as const, ref: name, hash });
|
|
89
|
+
const { refsDir } = resolveMigrationPaths(options.config, config);
|
|
90
|
+
const entry: RefEntry = { hash, invariants: [] };
|
|
91
|
+
await writeRef(refsDir, name, entry);
|
|
92
|
+
return ok({ ok: true as const, ref: name, hash, invariants: [] });
|
|
99
93
|
} catch (error) {
|
|
100
94
|
if (error instanceof CliStructuredError) return notOk(error);
|
|
101
95
|
return notOk(mapError(error));
|
|
@@ -108,10 +102,9 @@ async function executeRefGetCommand(
|
|
|
108
102
|
): Promise<Result<RefGetResult, CliStructuredError>> {
|
|
109
103
|
try {
|
|
110
104
|
const config = await loadConfig(options.config);
|
|
111
|
-
const
|
|
112
|
-
const
|
|
113
|
-
const hash
|
|
114
|
-
return ok({ ok: true as const, ref: name, hash });
|
|
105
|
+
const { refsDir } = resolveMigrationPaths(options.config, config);
|
|
106
|
+
const entry = await readRef(refsDir, name);
|
|
107
|
+
return ok({ ok: true as const, ref: name, hash: entry.hash, invariants: entry.invariants });
|
|
115
108
|
} catch (error) {
|
|
116
109
|
if (error instanceof CliStructuredError) return notOk(error);
|
|
117
110
|
return notOk(mapError(error));
|
|
@@ -124,13 +117,8 @@ async function executeRefDeleteCommand(
|
|
|
124
117
|
): Promise<Result<RefDeleteResult, CliStructuredError>> {
|
|
125
118
|
try {
|
|
126
119
|
const config = await loadConfig(options.config);
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
if (!Object.hasOwn(refs, name)) {
|
|
130
|
-
return notOk(errorRefNotFound(name));
|
|
131
|
-
}
|
|
132
|
-
const { [name]: _, ...remaining } = refs;
|
|
133
|
-
await writeRefs(refsPath, remaining);
|
|
120
|
+
const { refsDir } = resolveMigrationPaths(options.config, config);
|
|
121
|
+
await deleteRef(refsDir, name);
|
|
134
122
|
return ok({ ok: true as const, ref: name, deleted: true as const });
|
|
135
123
|
} catch (error) {
|
|
136
124
|
if (error instanceof CliStructuredError) return notOk(error);
|
|
@@ -143,8 +131,8 @@ async function executeRefListCommand(options: {
|
|
|
143
131
|
}): Promise<Result<RefListResult, CliStructuredError>> {
|
|
144
132
|
try {
|
|
145
133
|
const config = await loadConfig(options.config);
|
|
146
|
-
const
|
|
147
|
-
const refs = await readRefs(
|
|
134
|
+
const { refsDir } = resolveMigrationPaths(options.config, config);
|
|
135
|
+
const refs = await readRefs(refsDir);
|
|
148
136
|
return ok({ ok: true as const, refs });
|
|
149
137
|
} catch (error) {
|
|
150
138
|
if (error instanceof CliStructuredError) return notOk(error);
|
|
@@ -157,7 +145,7 @@ function createRefSetCommand(): Command {
|
|
|
157
145
|
setCommandDescriptions(
|
|
158
146
|
command,
|
|
159
147
|
'Set a ref to a contract hash',
|
|
160
|
-
'Sets a named ref to point to a contract hash in migrations/refs
|
|
148
|
+
'Sets a named ref to point to a contract hash in migrations/refs/.',
|
|
161
149
|
);
|
|
162
150
|
addGlobalOptions(command)
|
|
163
151
|
.argument('<name>', 'Ref name (e.g., staging, production)')
|
|
@@ -190,7 +178,7 @@ function createRefGetCommand(): Command {
|
|
|
190
178
|
setCommandDescriptions(
|
|
191
179
|
command,
|
|
192
180
|
'Get the hash for a ref',
|
|
193
|
-
'Reads a named ref from migrations/refs
|
|
181
|
+
'Reads a named ref from migrations/refs/ and prints its contract hash.',
|
|
194
182
|
);
|
|
195
183
|
addGlobalOptions(command)
|
|
196
184
|
.argument('<name>', 'Ref name to look up')
|
|
@@ -218,7 +206,7 @@ function createRefGetCommand(): Command {
|
|
|
218
206
|
|
|
219
207
|
function createRefDeleteCommand(): Command {
|
|
220
208
|
const command = new Command('delete');
|
|
221
|
-
setCommandDescriptions(command, 'Delete a ref', 'Removes a named ref from migrations/refs
|
|
209
|
+
setCommandDescriptions(command, 'Delete a ref', 'Removes a named ref from migrations/refs/.');
|
|
222
210
|
addGlobalOptions(command)
|
|
223
211
|
.argument('<name>', 'Ref name to delete')
|
|
224
212
|
.option('--config <path>', 'Path to prisma-next.config.ts')
|
|
@@ -245,11 +233,7 @@ function createRefDeleteCommand(): Command {
|
|
|
245
233
|
|
|
246
234
|
function createRefListCommand(): Command {
|
|
247
235
|
const command = new Command('list');
|
|
248
|
-
setCommandDescriptions(
|
|
249
|
-
command,
|
|
250
|
-
'List all refs',
|
|
251
|
-
'Lists all named refs from migrations/refs.json.',
|
|
252
|
-
);
|
|
236
|
+
setCommandDescriptions(command, 'List all refs', 'Lists all named refs from migrations/refs/.');
|
|
253
237
|
addGlobalOptions(command)
|
|
254
238
|
.option('--config <path>', 'Path to prisma-next.config.ts')
|
|
255
239
|
.action(async (options: { config?: string; json?: string | boolean; quiet?: boolean }) => {
|
|
@@ -264,8 +248,10 @@ function createRefListCommand(): Command {
|
|
|
264
248
|
if (entries.length === 0) {
|
|
265
249
|
ui.output('No refs defined');
|
|
266
250
|
} else {
|
|
267
|
-
for (const [refName,
|
|
268
|
-
|
|
251
|
+
for (const [refName, entry] of entries) {
|
|
252
|
+
const invariantsSuffix =
|
|
253
|
+
entry.invariants.length > 0 ? ` [invariants: ${entry.invariants.join(', ')}]` : '';
|
|
254
|
+
ui.output(`${refName} → ${entry.hash}${invariantsSuffix}`);
|
|
269
255
|
}
|
|
270
256
|
}
|
|
271
257
|
}
|
|
@@ -282,7 +268,6 @@ export {
|
|
|
282
268
|
executeRefListCommand,
|
|
283
269
|
cliErrorInvalidRefName,
|
|
284
270
|
cliErrorInvalidRefValue,
|
|
285
|
-
errorRefNotFound,
|
|
286
271
|
};
|
|
287
272
|
|
|
288
273
|
export function createMigrationRefCommand(): Command {
|
|
@@ -290,7 +275,7 @@ export function createMigrationRefCommand(): Command {
|
|
|
290
275
|
setCommandDescriptions(
|
|
291
276
|
command,
|
|
292
277
|
'Manage migration refs',
|
|
293
|
-
'Manage named refs in migrations/refs
|
|
278
|
+
'Manage named refs in migrations/refs/. Refs map logical environment\n' +
|
|
294
279
|
'names (e.g., staging, production) to contract hashes.',
|
|
295
280
|
);
|
|
296
281
|
addGlobalOptions(command).configureHelp({
|
|
@@ -345,7 +345,7 @@ async function executeMigrationStatusCommand(
|
|
|
345
345
|
ui: TerminalUI,
|
|
346
346
|
): Promise<Result<MigrationStatusResult, CliStructuredError>> {
|
|
347
347
|
const config = await loadConfig(options.config);
|
|
348
|
-
const { configPath, migrationsDir, migrationsRelative,
|
|
348
|
+
const { configPath, migrationsDir, migrationsRelative, refsDir } = resolveMigrationPaths(
|
|
349
349
|
options.config,
|
|
350
350
|
config,
|
|
351
351
|
);
|
|
@@ -357,7 +357,7 @@ async function executeMigrationStatusCommand(
|
|
|
357
357
|
let activeRefHash: string | undefined;
|
|
358
358
|
let allRefs: Refs = {};
|
|
359
359
|
try {
|
|
360
|
-
allRefs = await readRefs(
|
|
360
|
+
allRefs = await readRefs(refsDir);
|
|
361
361
|
} catch (error) {
|
|
362
362
|
if (MigrationToolsError.is(error)) {
|
|
363
363
|
return notOk(
|
|
@@ -373,30 +373,25 @@ async function executeMigrationStatusCommand(
|
|
|
373
373
|
|
|
374
374
|
if (options.ref) {
|
|
375
375
|
activeRefName = options.ref;
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
fix: error.fix,
|
|
388
|
-
meta: { code: error.code },
|
|
389
|
-
}),
|
|
390
|
-
);
|
|
391
|
-
}
|
|
392
|
-
throw error;
|
|
376
|
+
try {
|
|
377
|
+
activeRefHash = resolveRef(allRefs, activeRefName).hash;
|
|
378
|
+
} catch (error) {
|
|
379
|
+
if (MigrationToolsError.is(error)) {
|
|
380
|
+
return notOk(
|
|
381
|
+
errorRuntime(error.message, {
|
|
382
|
+
why: error.why,
|
|
383
|
+
fix: error.fix,
|
|
384
|
+
meta: { code: error.code },
|
|
385
|
+
}),
|
|
386
|
+
);
|
|
393
387
|
}
|
|
388
|
+
throw error;
|
|
394
389
|
}
|
|
395
390
|
}
|
|
396
391
|
|
|
397
|
-
const statusRefs: StatusRef[] = Object.entries(allRefs).map(([name,
|
|
392
|
+
const statusRefs: StatusRef[] = Object.entries(allRefs).map(([name, entry]) => ({
|
|
398
393
|
name,
|
|
399
|
-
hash,
|
|
394
|
+
hash: entry.hash,
|
|
400
395
|
active: name === activeRefName,
|
|
401
396
|
}));
|
|
402
397
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public re-export of the `init --json` success-document schema (FR1.5).
|
|
3
|
+
*
|
|
4
|
+
* Imported as `@prisma-next/cli/init-output`. The shared error envelope is
|
|
5
|
+
* exported separately from `@prisma-next/errors`; consumers should branch
|
|
6
|
+
* on the `ok` discriminator (success documents carry `ok: true`, error
|
|
7
|
+
* envelopes carry `ok: false`) per the
|
|
8
|
+
* [Style Guide § JSON Semantics](../../../../../../../docs/CLI%20Style%20Guide.md#json-semantics).
|
|
9
|
+
*/
|
|
10
|
+
export { type InitOutput, InitOutputSchema } from '../commands/init/output';
|
|
@@ -85,7 +85,7 @@ export function resolveMigrationPaths(
|
|
|
85
85
|
configPath: string;
|
|
86
86
|
migrationsDir: string;
|
|
87
87
|
migrationsRelative: string;
|
|
88
|
-
|
|
88
|
+
refsDir: string;
|
|
89
89
|
} {
|
|
90
90
|
const configPath = configOption
|
|
91
91
|
? relative(process.cwd(), resolve(configOption))
|
|
@@ -95,8 +95,8 @@ export function resolveMigrationPaths(
|
|
|
95
95
|
config.migrations?.dir ?? 'migrations',
|
|
96
96
|
);
|
|
97
97
|
const migrationsRelative = relative(process.cwd(), migrationsDir);
|
|
98
|
-
const
|
|
99
|
-
return { configPath, migrationsDir, migrationsRelative,
|
|
98
|
+
const refsDir = resolve(migrationsDir, 'refs');
|
|
99
|
+
return { configPath, migrationsDir, migrationsRelative, refsDir };
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/**
|