@prisma-next/target-postgres 0.3.0-pr.94.3 → 0.3.0-pr.95.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.
Files changed (37) hide show
  1. package/dist/chunk-RKEXRSSI.js +14 -0
  2. package/dist/chunk-RKEXRSSI.js.map +1 -0
  3. package/dist/core/descriptor-meta.d.ts +9 -0
  4. package/dist/core/descriptor-meta.d.ts.map +1 -0
  5. package/dist/core/migrations/planner.d.ts +14 -0
  6. package/dist/core/migrations/planner.d.ts.map +1 -0
  7. package/dist/core/migrations/runner.d.ts +8 -0
  8. package/dist/core/migrations/runner.d.ts.map +1 -0
  9. package/dist/core/migrations/statement-builders.d.ts +30 -0
  10. package/dist/core/migrations/statement-builders.d.ts.map +1 -0
  11. package/dist/exports/control.d.ts +8 -0
  12. package/dist/exports/control.d.ts.map +1 -0
  13. package/dist/exports/control.js +1260 -0
  14. package/dist/exports/control.js.map +1 -0
  15. package/dist/exports/pack.d.ts +4 -0
  16. package/dist/exports/pack.d.ts.map +1 -0
  17. package/dist/exports/pack.js +11 -0
  18. package/dist/exports/pack.js.map +1 -0
  19. package/dist/exports/runtime.d.ts +12 -0
  20. package/dist/exports/runtime.d.ts.map +1 -0
  21. package/dist/exports/runtime.js +19 -0
  22. package/dist/exports/runtime.js.map +1 -0
  23. package/package.json +28 -24
  24. package/dist/control.d.mts +0 -19
  25. package/dist/control.d.mts.map +0 -1
  26. package/dist/control.mjs +0 -965
  27. package/dist/control.mjs.map +0 -1
  28. package/dist/descriptor-meta-DxB8oZzB.mjs +0 -13
  29. package/dist/descriptor-meta-DxB8oZzB.mjs.map +0 -1
  30. package/dist/pack.d.mts +0 -7
  31. package/dist/pack.d.mts.map +0 -1
  32. package/dist/pack.mjs +0 -9
  33. package/dist/pack.mjs.map +0 -1
  34. package/dist/runtime.d.mts +0 -15
  35. package/dist/runtime.d.mts.map +0 -1
  36. package/dist/runtime.mjs +0 -20
  37. package/dist/runtime.mjs.map +0 -1
@@ -0,0 +1,14 @@
1
+ // src/core/descriptor-meta.ts
2
+ var postgresTargetDescriptorMeta = {
3
+ kind: "target",
4
+ familyId: "sql",
5
+ targetId: "postgres",
6
+ id: "postgres",
7
+ version: "0.0.1",
8
+ capabilities: {}
9
+ };
10
+
11
+ export {
12
+ postgresTargetDescriptorMeta
13
+ };
14
+ //# sourceMappingURL=chunk-RKEXRSSI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/descriptor-meta.ts"],"sourcesContent":["export const postgresTargetDescriptorMeta = {\n kind: 'target',\n familyId: 'sql',\n targetId: 'postgres',\n id: 'postgres',\n version: '0.0.1',\n capabilities: {},\n} as const;\n"],"mappings":";AAAO,IAAM,+BAA+B;AAAA,EAC1C,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AAAA,EACV,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,cAAc,CAAC;AACjB;","names":[]}
@@ -0,0 +1,9 @@
1
+ export declare const postgresTargetDescriptorMeta: {
2
+ readonly kind: "target";
3
+ readonly familyId: "sql";
4
+ readonly targetId: "postgres";
5
+ readonly id: "postgres";
6
+ readonly version: "0.0.1";
7
+ readonly capabilities: {};
8
+ };
9
+ //# sourceMappingURL=descriptor-meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"descriptor-meta.d.ts","sourceRoot":"","sources":["../../src/core/descriptor-meta.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B;;;;;;;CAO/B,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { SqlMigrationPlanner } from '@prisma-next/family-sql/control';
2
+ type OperationClass = 'extension' | 'table' | 'unique' | 'index' | 'foreignKey';
3
+ export interface PostgresPlanTargetDetails {
4
+ readonly schema: string;
5
+ readonly objectType: OperationClass;
6
+ readonly name: string;
7
+ readonly table?: string;
8
+ }
9
+ interface PlannerConfig {
10
+ readonly defaultSchema: string;
11
+ }
12
+ export declare function createPostgresMigrationPlanner(config?: Partial<PlannerConfig>): SqlMigrationPlanner<PostgresPlanTargetDetails>;
13
+ export {};
14
+ //# sourceMappingURL=planner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planner.d.ts","sourceRoot":"","sources":["../../../src/core/migrations/planner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,mBAAmB,EAIpB,MAAM,iCAAiC,CAAC;AAqBzC,KAAK,cAAc,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,CAAC;AAuBhF,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,aAAa;IACrB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAMD,wBAAgB,8BAA8B,CAC5C,MAAM,GAAE,OAAO,CAAC,aAAa,CAAM,GAClC,mBAAmB,CAAC,yBAAyB,CAAC,CAKhD"}
@@ -0,0 +1,8 @@
1
+ import type { SqlControlFamilyInstance, SqlMigrationRunner } from '@prisma-next/family-sql/control';
2
+ import type { PostgresPlanTargetDetails } from './planner';
3
+ interface RunnerConfig {
4
+ readonly defaultSchema: string;
5
+ }
6
+ export declare function createPostgresMigrationRunner(family: SqlControlFamilyInstance, config?: Partial<RunnerConfig>): SqlMigrationRunner<PostgresPlanTargetDetails>;
7
+ export {};
8
+ //# sourceMappingURL=runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../src/core/migrations/runner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,wBAAwB,EAIxB,kBAAkB,EAInB,MAAM,iCAAiC,CAAC;AAOzC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAU3D,UAAU,YAAY;IACpB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAoCD,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,wBAAwB,EAChC,MAAM,GAAE,OAAO,CAAC,YAAY,CAAM,GACjC,kBAAkB,CAAC,yBAAyB,CAAC,CAE/C"}
@@ -0,0 +1,30 @@
1
+ export interface SqlStatement {
2
+ readonly sql: string;
3
+ readonly params: readonly unknown[];
4
+ }
5
+ export declare const ensurePrismaContractSchemaStatement: SqlStatement;
6
+ export declare const ensureMarkerTableStatement: SqlStatement;
7
+ export declare const ensureLedgerTableStatement: SqlStatement;
8
+ export interface WriteMarkerInput {
9
+ readonly coreHash: string;
10
+ readonly profileHash: string;
11
+ readonly contractJson?: unknown;
12
+ readonly canonicalVersion?: number | null;
13
+ readonly appTag?: string | null;
14
+ readonly meta?: Record<string, unknown>;
15
+ }
16
+ export declare function buildWriteMarkerStatements(input: WriteMarkerInput): {
17
+ readonly insert: SqlStatement;
18
+ readonly update: SqlStatement;
19
+ };
20
+ export interface LedgerInsertInput {
21
+ readonly originCoreHash?: string | null;
22
+ readonly originProfileHash?: string | null;
23
+ readonly destinationCoreHash: string;
24
+ readonly destinationProfileHash?: string | null;
25
+ readonly contractJsonBefore?: unknown;
26
+ readonly contractJsonAfter?: unknown;
27
+ readonly operations: unknown;
28
+ }
29
+ export declare function buildLedgerInsertStatement(input: LedgerInsertInput): SqlStatement;
30
+ //# sourceMappingURL=statement-builders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statement-builders.d.ts","sourceRoot":"","sources":["../../../src/core/migrations/statement-builders.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC;CACrC;AAED,eAAO,MAAM,mCAAmC,EAAE,YAGjD,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,YAYxC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,YAaxC,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,gBAAgB,GAAG;IACnE,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;CAC/B,CA+CA;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChD,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IACtC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,CA6BjF"}
@@ -0,0 +1,8 @@
1
+ import type { SqlControlTargetDescriptor } from '@prisma-next/family-sql/control';
2
+ import type { PostgresPlanTargetDetails } from '../core/migrations/planner';
3
+ /**
4
+ * Postgres target descriptor for CLI config.
5
+ */
6
+ declare const postgresTargetDescriptor: SqlControlTargetDescriptor<'postgres', PostgresPlanTargetDetails>;
7
+ export default postgresTargetDescriptor;
8
+ //# sourceMappingURL=control.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control.d.ts","sourceRoot":"","sources":["../../src/exports/control.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,0BAA0B,EAC3B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAI5E;;GAEG;AACH,QAAA,MAAM,wBAAwB,EAAE,0BAA0B,CAAC,UAAU,EAAE,yBAAyB,CAoC7F,CAAC;AAEJ,eAAe,wBAAwB,CAAC"}