@prisma-next/migration-tools 0.0.2 → 0.3.0-dev.101
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/LICENSE +201 -0
- package/dist/{errors-DdSjGRqx.mjs → errors-CqLiJwqA.mjs} +47 -9
- package/dist/errors-CqLiJwqA.mjs.map +1 -0
- package/dist/exports/attestation.d.mts +1 -1
- package/dist/exports/attestation.d.mts.map +1 -1
- package/dist/exports/attestation.mjs +1 -1
- package/dist/exports/dag.d.mts +36 -17
- package/dist/exports/dag.d.mts.map +1 -1
- package/dist/exports/dag.mjs +206 -76
- package/dist/exports/dag.mjs.map +1 -1
- package/dist/exports/io.d.mts +3 -3
- package/dist/exports/io.d.mts.map +1 -1
- package/dist/exports/io.mjs +1 -1
- package/dist/exports/refs.d.mts +10 -0
- package/dist/exports/refs.d.mts.map +1 -0
- package/dist/exports/refs.mjs +73 -0
- package/dist/exports/refs.mjs.map +1 -0
- package/dist/exports/types.d.mts +2 -2
- package/dist/exports/types.mjs +13 -2
- package/dist/exports/types.mjs.map +1 -0
- package/dist/{io-Dx98-h0p.mjs → io-afog-e8J.mjs} +2 -3
- package/dist/io-afog-e8J.mjs.map +1 -0
- package/dist/types-9YQfIg6N.d.mts +96 -0
- package/dist/types-9YQfIg6N.d.mts.map +1 -0
- package/package.json +26 -22
- package/src/dag.ts +267 -107
- package/src/errors.ts +58 -7
- package/src/exports/dag.ts +3 -0
- package/src/exports/refs.ts +2 -0
- package/src/exports/types.ts +6 -1
- package/src/io.ts +4 -5
- package/src/refs.ts +102 -0
- package/src/types.ts +54 -7
- package/dist/errors-DdSjGRqx.mjs.map +0 -1
- package/dist/io-Dx98-h0p.mjs.map +0 -1
- package/dist/types-CUnzoaLY.d.mts +0 -56
- package/dist/types-CUnzoaLY.d.mts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"io-afog-e8J.mjs","names":["manifestRaw: string","opsRaw: string","manifest: MigrationManifest","ops: MigrationOps","entries: string[]","packages: MigrationBundle[]"],"sources":["../src/io.ts"],"sourcesContent":["import { mkdir, readdir, readFile, stat, writeFile } from 'node:fs/promises';\nimport { type } from 'arktype';\nimport { basename, dirname, join } from 'pathe';\nimport {\n errorDirectoryExists,\n errorInvalidJson,\n errorInvalidManifest,\n errorInvalidSlug,\n errorMissingFile,\n} from './errors';\nimport type { MigrationBundle, MigrationManifest, MigrationOps } from './types';\n\nconst MANIFEST_FILE = 'migration.json';\nconst OPS_FILE = 'ops.json';\nconst MAX_SLUG_LENGTH = 64;\n\nfunction hasErrnoCode(error: unknown, code: string): boolean {\n return error instanceof Error && (error as { code?: string }).code === code;\n}\n\nconst MigrationHintsSchema = type({\n used: 'string[]',\n applied: 'string[]',\n plannerVersion: 'string',\n planningStrategy: 'string',\n});\n\nconst MigrationManifestSchema = type({\n from: 'string',\n to: 'string',\n migrationId: 'string | null',\n kind: \"'regular' | 'baseline'\",\n fromContract: 'object | null',\n toContract: 'object',\n hints: MigrationHintsSchema,\n labels: 'string[]',\n 'authorship?': type({\n 'author?': 'string',\n 'email?': 'string',\n }),\n 'signature?': type({\n keyId: 'string',\n value: 'string',\n }).or('null'),\n createdAt: 'string',\n});\n\nconst MigrationOpSchema = type({\n id: 'string',\n label: 'string',\n operationClass: \"'additive' | 'widening' | 'destructive'\",\n});\n\n// Intentionally shallow: operation-specific payload validation is owned by planner/runner layers.\nconst MigrationOpsSchema = MigrationOpSchema.array();\n\nexport async function writeMigrationPackage(\n dir: string,\n manifest: MigrationManifest,\n ops: MigrationOps,\n): Promise<void> {\n await mkdir(dirname(dir), { recursive: true });\n\n try {\n await mkdir(dir);\n } catch (error) {\n if (hasErrnoCode(error, 'EEXIST')) {\n throw errorDirectoryExists(dir);\n }\n throw error;\n }\n\n await writeFile(join(dir, MANIFEST_FILE), JSON.stringify(manifest, null, 2), { flag: 'wx' });\n await writeFile(join(dir, OPS_FILE), JSON.stringify(ops, null, 2), { flag: 'wx' });\n}\n\nexport async function readMigrationPackage(dir: string): Promise<MigrationBundle> {\n const manifestPath = join(dir, MANIFEST_FILE);\n const opsPath = join(dir, OPS_FILE);\n\n let manifestRaw: string;\n try {\n manifestRaw = await readFile(manifestPath, 'utf-8');\n } catch (error) {\n if (hasErrnoCode(error, 'ENOENT')) {\n throw errorMissingFile(MANIFEST_FILE, dir);\n }\n throw error;\n }\n\n let opsRaw: string;\n try {\n opsRaw = await readFile(opsPath, 'utf-8');\n } catch (error) {\n if (hasErrnoCode(error, 'ENOENT')) {\n throw errorMissingFile(OPS_FILE, dir);\n }\n throw error;\n }\n\n let manifest: MigrationManifest;\n try {\n manifest = JSON.parse(manifestRaw);\n } catch (e) {\n throw errorInvalidJson(manifestPath, e instanceof Error ? e.message : String(e));\n }\n\n let ops: MigrationOps;\n try {\n ops = JSON.parse(opsRaw);\n } catch (e) {\n throw errorInvalidJson(opsPath, e instanceof Error ? e.message : String(e));\n }\n\n validateManifest(manifest, manifestPath);\n validateOps(ops, opsPath);\n\n return {\n dirName: basename(dir),\n dirPath: dir,\n manifest,\n ops,\n };\n}\n\nfunction validateManifest(\n manifest: unknown,\n filePath: string,\n): asserts manifest is MigrationManifest {\n const result = MigrationManifestSchema(manifest);\n if (result instanceof type.errors) {\n throw errorInvalidManifest(filePath, result.summary);\n }\n}\n\nfunction validateOps(ops: unknown, filePath: string): asserts ops is MigrationOps {\n const result = MigrationOpsSchema(ops);\n if (result instanceof type.errors) {\n throw errorInvalidManifest(filePath, result.summary);\n }\n}\n\nexport async function readMigrationsDir(\n migrationsRoot: string,\n): Promise<readonly MigrationBundle[]> {\n let entries: string[];\n try {\n entries = await readdir(migrationsRoot);\n } catch (error) {\n if (hasErrnoCode(error, 'ENOENT')) {\n return [];\n }\n throw error;\n }\n\n const packages: MigrationBundle[] = [];\n\n for (const entry of entries.sort()) {\n const entryPath = join(migrationsRoot, entry);\n const entryStat = await stat(entryPath);\n if (!entryStat.isDirectory()) continue;\n\n const manifestPath = join(entryPath, MANIFEST_FILE);\n try {\n await stat(manifestPath);\n } catch {\n continue; // skip non-migration directories\n }\n\n packages.push(await readMigrationPackage(entryPath));\n }\n\n return packages;\n}\n\nexport function formatMigrationDirName(timestamp: Date, slug: string): string {\n const sanitized = slug\n .toLowerCase()\n .replace(/[^a-z0-9]/g, '_')\n .replace(/_+/g, '_')\n .replace(/^_|_$/g, '');\n\n if (sanitized.length === 0) {\n throw errorInvalidSlug(slug);\n }\n\n const truncated = sanitized.slice(0, MAX_SLUG_LENGTH);\n\n const y = timestamp.getUTCFullYear();\n const mo = String(timestamp.getUTCMonth() + 1).padStart(2, '0');\n const d = String(timestamp.getUTCDate()).padStart(2, '0');\n const h = String(timestamp.getUTCHours()).padStart(2, '0');\n const mi = String(timestamp.getUTCMinutes()).padStart(2, '0');\n\n return `${y}${mo}${d}T${h}${mi}_${truncated}`;\n}\n"],"mappings":";;;;;;AAYA,MAAM,gBAAgB;AACtB,MAAM,WAAW;AACjB,MAAM,kBAAkB;AAExB,SAAS,aAAa,OAAgB,MAAuB;AAC3D,QAAO,iBAAiB,SAAU,MAA4B,SAAS;;AAUzE,MAAM,0BAA0B,KAAK;CACnC,MAAM;CACN,IAAI;CACJ,aAAa;CACb,MAAM;CACN,cAAc;CACd,YAAY;CACZ,OAd2B,KAAK;EAChC,MAAM;EACN,SAAS;EACT,gBAAgB;EAChB,kBAAkB;EACnB,CAAC;CAUA,QAAQ;CACR,eAAe,KAAK;EAClB,WAAW;EACX,UAAU;EACX,CAAC;CACF,cAAc,KAAK;EACjB,OAAO;EACP,OAAO;EACR,CAAC,CAAC,GAAG,OAAO;CACb,WAAW;CACZ,CAAC;AASF,MAAM,qBAPoB,KAAK;CAC7B,IAAI;CACJ,OAAO;CACP,gBAAgB;CACjB,CAAC,CAG2C,OAAO;AAEpD,eAAsB,sBACpB,KACA,UACA,KACe;AACf,OAAM,MAAM,QAAQ,IAAI,EAAE,EAAE,WAAW,MAAM,CAAC;AAE9C,KAAI;AACF,QAAM,MAAM,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
+
|
|
4
|
+
//#region src/types.d.ts
|
|
5
|
+
interface MigrationHints {
|
|
6
|
+
readonly used: readonly string[];
|
|
7
|
+
readonly applied: readonly string[];
|
|
8
|
+
readonly plannerVersion: string;
|
|
9
|
+
readonly planningStrategy: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Shared fields for all migration manifests (draft and attested).
|
|
13
|
+
*/
|
|
14
|
+
interface MigrationManifestBase {
|
|
15
|
+
readonly from: string;
|
|
16
|
+
readonly to: string;
|
|
17
|
+
readonly kind: 'regular' | 'baseline';
|
|
18
|
+
readonly fromContract: ContractIR | null;
|
|
19
|
+
readonly toContract: ContractIR;
|
|
20
|
+
readonly hints: MigrationHints;
|
|
21
|
+
readonly labels: readonly string[];
|
|
22
|
+
readonly authorship?: {
|
|
23
|
+
readonly author?: string;
|
|
24
|
+
readonly email?: string;
|
|
25
|
+
};
|
|
26
|
+
readonly signature?: {
|
|
27
|
+
readonly keyId: string;
|
|
28
|
+
readonly value: string;
|
|
29
|
+
} | null;
|
|
30
|
+
readonly createdAt: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A draft migration that has been planned but not yet attested.
|
|
34
|
+
* Draft migrations have `migrationId: null` and are excluded from
|
|
35
|
+
* graph reconstruction and apply.
|
|
36
|
+
*/
|
|
37
|
+
interface DraftMigrationManifest extends MigrationManifestBase {
|
|
38
|
+
readonly migrationId: null;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* An attested migration with a content-addressed migrationId.
|
|
42
|
+
* Only attested migrations participate in the migration graph.
|
|
43
|
+
*/
|
|
44
|
+
interface AttestedMigrationManifest extends MigrationManifestBase {
|
|
45
|
+
readonly migrationId: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Union of draft and attested manifests. This is what the on-disk
|
|
49
|
+
* format represents — `migrationId` is `null` for drafts, a string
|
|
50
|
+
* for attested migrations.
|
|
51
|
+
*/
|
|
52
|
+
type MigrationManifest = DraftMigrationManifest | AttestedMigrationManifest;
|
|
53
|
+
type MigrationOps = readonly MigrationPlanOperation[];
|
|
54
|
+
/**
|
|
55
|
+
* An on-disk migration directory containing a manifest and operations.
|
|
56
|
+
* The manifest may be draft or attested.
|
|
57
|
+
*/
|
|
58
|
+
interface MigrationBundle {
|
|
59
|
+
readonly dirName: string;
|
|
60
|
+
readonly dirPath: string;
|
|
61
|
+
readonly manifest: MigrationManifest;
|
|
62
|
+
readonly ops: MigrationOps;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* A bundle known to be attested (migrationId is a string).
|
|
66
|
+
* Use this after filtering bundles to attested-only.
|
|
67
|
+
*/
|
|
68
|
+
interface AttestedMigrationBundle extends MigrationBundle {
|
|
69
|
+
readonly manifest: AttestedMigrationManifest;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* An entry in the migration graph. Only attested migrations appear in the
|
|
73
|
+
* graph, so `migrationId` is always a string.
|
|
74
|
+
*/
|
|
75
|
+
interface MigrationChainEntry {
|
|
76
|
+
readonly from: string;
|
|
77
|
+
readonly to: string;
|
|
78
|
+
readonly migrationId: string;
|
|
79
|
+
readonly dirName: string;
|
|
80
|
+
readonly createdAt: string;
|
|
81
|
+
readonly labels: readonly string[];
|
|
82
|
+
}
|
|
83
|
+
interface MigrationGraph {
|
|
84
|
+
readonly nodes: ReadonlySet<string>;
|
|
85
|
+
readonly forwardChain: ReadonlyMap<string, readonly MigrationChainEntry[]>;
|
|
86
|
+
readonly reverseChain: ReadonlyMap<string, readonly MigrationChainEntry[]>;
|
|
87
|
+
readonly migrationById: ReadonlyMap<string, MigrationChainEntry>;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Type guard that narrows a MigrationBundle to an AttestedMigrationBundle.
|
|
91
|
+
* Use with `.filter(isAttested)` to get a typed array of attested bundles.
|
|
92
|
+
*/
|
|
93
|
+
declare function isAttested(bundle: MigrationBundle): bundle is AttestedMigrationBundle;
|
|
94
|
+
//#endregion
|
|
95
|
+
export { MigrationChainEntry as a, MigrationManifest as c, MigrationBundle as i, MigrationOps as l, AttestedMigrationManifest as n, MigrationGraph as o, DraftMigrationManifest as r, MigrationHints as s, AttestedMigrationBundle as t, isAttested as u };
|
|
96
|
+
//# sourceMappingURL=types-9YQfIg6N.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-9YQfIg6N.d.mts","names":[],"sources":["../src/types.ts"],"sourcesContent":[],"mappings":";;;;UAGiB,cAAA;;EAAA,SAAA,OAAA,EAAc,SAAA,MAAA,EAAA;EAUrB,SAAA,cAAA,EAAqB,MAAA;EAIN,SAAA,gBAAA,EAAA,MAAA;;;;AAczB;AAQA,UA1BU,qBAAA,CA0BiC;EAS/B,SAAA,IAAA,EAAA,MAAiB;EAEjB,SAAA,EAAA,EAAA,MAAY;EAMP,SAAA,IAAA,EAAA,SAAe,GAAA,UAGX;EAQJ,SAAA,YAAA,EAlDQ,UAkDgB,GAAA,IACpB;EAOJ,SAAA,UAAA,EAzDM,UAyDa;EASnB,SAAA,KAAA,EAjEC,cAiEa;EACb,SAAA,MAAA,EAAA,SAAA,MAAA,EAAA;EACoC,SAAA,UAAA,CAAA,EAAA;IAA7B,SAAA,MAAA,CAAA,EAAA,MAAA;IAC6B,SAAA,KAAA,CAAA,EAAA,MAAA;EAA7B,CAAA;EACqB,SAAA,SAAA,CAAA,EAAA;IAApB,SAAA,KAAA,EAAA,MAAA;IAAW,SAAA,KAAA,EAAA,MAAA;EAOrB,CAAA,GAAA,IAAA;;;;;;;;UAhEC,sBAAA,SAA+B;;;;;;;UAQ/B,yBAAA,SAAkC;;;;;;;;KASvC,iBAAA,GAAoB,yBAAyB;KAE7C,YAAA,YAAwB;;;;;UAMnB,eAAA;;;qBAGI;gBACL;;;;;;UAOC,uBAAA,SAAgC;qBAC5B;;;;;;UAOJ,mBAAA;;;;;;;;UASA,cAAA;kBACC;yBACO,6BAA6B;yBAC7B,6BAA6B;0BAC5B,oBAAoB;;;;;;iBAO9B,UAAA,SAAmB,4BAA4B"}
|
package/package.json
CHANGED
|
@@ -1,32 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/migration-tools",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.3.0-dev.101",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "On-disk migration persistence, attestation, and chain reconstruction for Prisma Next",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"build": "tsdown",
|
|
9
|
-
"test": "vitest run",
|
|
10
|
-
"test:coverage": "vitest run --coverage",
|
|
11
|
-
"typecheck": "tsc --project tsconfig.json --noEmit",
|
|
12
|
-
"lint": "biome check . --error-on-warnings",
|
|
13
|
-
"lint:fix": "biome check --write .",
|
|
14
|
-
"lint:fix:unsafe": "biome check --write --unsafe .",
|
|
15
|
-
"clean": "rm -rf dist dist-tsc dist-tsc-prod coverage .tmp-output"
|
|
16
|
-
},
|
|
17
7
|
"dependencies": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"@prisma-next/
|
|
21
|
-
"
|
|
22
|
-
"
|
|
8
|
+
"arktype": "^2.1.29",
|
|
9
|
+
"pathe": "^2.0.3",
|
|
10
|
+
"@prisma-next/core-control-plane": "0.3.0-dev.101",
|
|
11
|
+
"@prisma-next/utils": "0.3.0-dev.101",
|
|
12
|
+
"@prisma-next/contract": "0.3.0-dev.101"
|
|
23
13
|
},
|
|
24
14
|
"devDependencies": {
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
15
|
+
"tsdown": "0.18.4",
|
|
16
|
+
"typescript": "5.9.3",
|
|
17
|
+
"vitest": "4.0.17",
|
|
18
|
+
"@prisma-next/tsconfig": "0.0.0",
|
|
19
|
+
"@prisma-next/tsdown": "0.0.0"
|
|
30
20
|
},
|
|
31
21
|
"files": [
|
|
32
22
|
"dist",
|
|
@@ -52,11 +42,25 @@
|
|
|
52
42
|
"types": "./dist/exports/dag.d.mts",
|
|
53
43
|
"import": "./dist/exports/dag.mjs"
|
|
54
44
|
},
|
|
45
|
+
"./refs": {
|
|
46
|
+
"types": "./dist/exports/refs.d.mts",
|
|
47
|
+
"import": "./dist/exports/refs.mjs"
|
|
48
|
+
},
|
|
55
49
|
"./package.json": "./package.json"
|
|
56
50
|
},
|
|
57
51
|
"repository": {
|
|
58
52
|
"type": "git",
|
|
59
53
|
"url": "https://github.com/prisma/prisma-next.git",
|
|
60
54
|
"directory": "packages/1-framework/3-tooling/migration"
|
|
55
|
+
},
|
|
56
|
+
"scripts": {
|
|
57
|
+
"build": "tsdown",
|
|
58
|
+
"test": "vitest run",
|
|
59
|
+
"test:coverage": "vitest run --coverage",
|
|
60
|
+
"typecheck": "tsc --project tsconfig.json --noEmit",
|
|
61
|
+
"lint": "biome check . --error-on-warnings",
|
|
62
|
+
"lint:fix": "biome check --write .",
|
|
63
|
+
"lint:fix:unsafe": "biome check --write --unsafe .",
|
|
64
|
+
"clean": "rm -rf dist dist-tsc dist-tsc-prod coverage .tmp-output"
|
|
61
65
|
}
|
|
62
|
-
}
|
|
66
|
+
}
|