gencow 0.1.299 → 0.2.0

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 (149) hide show
  1. package/bin/gencow.mjs +0 -6
  2. package/core/package.json +1 -1
  3. package/docs/packaging.md +14 -4
  4. package/lib/cli-artifact-guard.mjs +53 -3
  5. package/lib/cli-dev-runtime.mjs +1 -0
  6. package/lib/cli-project-runtime.mjs +26 -14
  7. package/lib/codegen-command.mjs +16 -0
  8. package/lib/coding-guardrails.mjs +2 -0
  9. package/lib/dashboard-artifact.mjs +65 -0
  10. package/lib/dashboard-assets.mjs +20 -0
  11. package/lib/db-command.mjs +121 -80
  12. package/lib/db-migration-command-steps.mjs +19 -16
  13. package/lib/db-push-command.mjs +1 -1
  14. package/lib/deploy-codegen-preflight.mjs +1 -0
  15. package/lib/dev-cloud-command.mjs +1 -1
  16. package/lib/dev-local-command.mjs +19 -56
  17. package/lib/document-local-converter.mjs +11 -0
  18. package/lib/local-dashboard-plan.mjs +60 -0
  19. package/lib/local-database-commands.mjs +127 -0
  20. package/lib/local-development-migrations.mjs +157 -0
  21. package/lib/local-drizzle-database.config.mjs +10 -0
  22. package/lib/local-runtime-features.mjs +12 -0
  23. package/lib/rag-selection.mjs +7 -0
  24. package/lib/runtime-local-worker.mjs +116 -0
  25. package/lib/runtime-mode.mjs +3 -0
  26. package/lib/standalone-codegen-adapter.mjs +91 -0
  27. package/lib/ts-codegen-import-extension.mjs +228 -19
  28. package/package.json +16 -9
  29. package/runtime/config.mjs +218 -2
  30. package/runtime/engine/chunk-2HA4CUMS.mjs +90 -0
  31. package/runtime/engine/chunk-2JLO3KMM.mjs +305 -0
  32. package/runtime/engine/chunk-2SR2M7SR.mjs +1045 -0
  33. package/runtime/engine/chunk-3D7MHEUC.mjs +253 -0
  34. package/runtime/engine/chunk-3R7COBWG.mjs +309 -0
  35. package/runtime/engine/chunk-3ZKA54UW.mjs +1560 -0
  36. package/runtime/engine/chunk-45I4YR2J.mjs +9 -0
  37. package/runtime/engine/chunk-4MLRXO7F.mjs +74 -0
  38. package/runtime/engine/chunk-5575APCJ.mjs +215 -0
  39. package/runtime/engine/chunk-5GUJZQF3.mjs +114 -0
  40. package/runtime/engine/chunk-5MXY3T75.mjs +428 -0
  41. package/runtime/engine/chunk-5TACQ2US.mjs +44 -0
  42. package/runtime/engine/chunk-66G4YEDT.mjs +3104 -0
  43. package/runtime/engine/chunk-67YO53WW.mjs +1426 -0
  44. package/runtime/engine/chunk-6GQRM7XY.mjs +87 -0
  45. package/runtime/engine/chunk-6JO72SPP.mjs +68 -0
  46. package/runtime/engine/chunk-6W653LXI.mjs +13 -0
  47. package/runtime/engine/chunk-7ITSMI3S.mjs +69 -0
  48. package/runtime/engine/chunk-7KUJ2H2S.mjs +128 -0
  49. package/runtime/engine/chunk-A5BMQ5IC.mjs +45 -0
  50. package/runtime/engine/chunk-ADF3UR6L.mjs +428 -0
  51. package/runtime/engine/chunk-AEBW7XZJ.mjs +4510 -0
  52. package/runtime/engine/chunk-AGPQ5XIV.mjs +156 -0
  53. package/runtime/engine/chunk-CPU4OZSX.mjs +753 -0
  54. package/runtime/engine/chunk-CSWPPWBL.mjs +50 -0
  55. package/runtime/engine/chunk-DPWXSMWO.mjs +53 -0
  56. package/runtime/engine/chunk-EAIELFKU.mjs +151 -0
  57. package/runtime/engine/chunk-EDU5CBKT.mjs +10 -0
  58. package/runtime/engine/chunk-EQCTAET7.mjs +173 -0
  59. package/runtime/engine/chunk-EQCXDF2Z.mjs +70 -0
  60. package/runtime/engine/chunk-F3G4UGV4.mjs +330 -0
  61. package/runtime/engine/chunk-F62NUNOO.mjs +26 -0
  62. package/runtime/engine/chunk-FKPNIFRP.mjs +2492 -0
  63. package/runtime/engine/chunk-FM23RGVI.mjs +81 -0
  64. package/runtime/engine/chunk-FW5AK4YP.mjs +1041 -0
  65. package/runtime/engine/chunk-GDWYAGWV.mjs +23 -0
  66. package/runtime/engine/chunk-GO5PZUYW.mjs +53 -0
  67. package/runtime/engine/chunk-GOLP7OSG.mjs +340 -0
  68. package/runtime/engine/chunk-GSLM44EF.mjs +242 -0
  69. package/runtime/engine/chunk-GYAJ7OX2.mjs +125 -0
  70. package/runtime/engine/chunk-I3GWR43K.mjs +14 -0
  71. package/runtime/engine/chunk-IFMOTJNU.mjs +106 -0
  72. package/runtime/engine/chunk-IKQKBE2G.mjs +128 -0
  73. package/runtime/engine/chunk-ITH2NEKM.mjs +282 -0
  74. package/runtime/engine/chunk-J6SDRCG4.mjs +96 -0
  75. package/runtime/engine/chunk-JODRNM3S.mjs +29596 -0
  76. package/runtime/engine/chunk-JUDKX53X.mjs +137 -0
  77. package/runtime/engine/chunk-K2YZVPJ4.mjs +827 -0
  78. package/runtime/engine/chunk-KEZJUXEE.mjs +151 -0
  79. package/runtime/engine/chunk-KVLTJFCH.mjs +234 -0
  80. package/runtime/engine/chunk-KX2PRQPS.mjs +126 -0
  81. package/runtime/engine/chunk-LEW5ZMLR.mjs +76 -0
  82. package/runtime/engine/chunk-LINVSJEM.mjs +175 -0
  83. package/runtime/engine/chunk-M7K2ICSM.mjs +11 -0
  84. package/runtime/engine/chunk-MZXDXSDC.mjs +292 -0
  85. package/runtime/engine/chunk-N2TA2IK2.mjs +678 -0
  86. package/runtime/engine/chunk-N4LTCKJP.mjs +695 -0
  87. package/runtime/engine/chunk-N6GCLOUX.mjs +13 -0
  88. package/runtime/engine/chunk-NAG2OXS5.mjs +37 -0
  89. package/runtime/engine/chunk-NNZ2QJUG.mjs +381 -0
  90. package/runtime/engine/chunk-NZPPLDNW.mjs +15 -0
  91. package/runtime/engine/chunk-ODWM57W6.mjs +138 -0
  92. package/runtime/engine/chunk-P5IIXAIE.mjs +23 -0
  93. package/runtime/engine/chunk-PBOXB2BV.mjs +6 -0
  94. package/runtime/engine/chunk-PMOJLN2P.mjs +8 -0
  95. package/runtime/engine/chunk-PZFMKFHO.mjs +180 -0
  96. package/runtime/engine/chunk-QL2TQX2N.mjs +114 -0
  97. package/runtime/engine/chunk-RITT2RSJ.mjs +258 -0
  98. package/runtime/engine/chunk-RODBVJ5M.mjs +135 -0
  99. package/runtime/engine/chunk-RW65MPVY.mjs +261 -0
  100. package/runtime/engine/chunk-S67UYPB6.mjs +25 -0
  101. package/runtime/engine/chunk-SVJCOUI3.mjs +47 -0
  102. package/runtime/engine/chunk-TCN3ZASV.mjs +957 -0
  103. package/runtime/engine/chunk-U2NRG6KC.mjs +32 -0
  104. package/runtime/engine/chunk-UM3F7HUV.mjs +432 -0
  105. package/runtime/engine/chunk-VWU7JJ3P.mjs +146 -0
  106. package/runtime/engine/chunk-WDTKPPMU.mjs +310 -0
  107. package/runtime/engine/chunk-WJOO4XTB.mjs +31 -0
  108. package/runtime/engine/chunk-XNFVL2OY.mjs +63 -0
  109. package/runtime/engine/chunk-XPWJXP2J.mjs +58 -0
  110. package/runtime/engine/chunk-Y3HSBJ3I.mjs +1132 -0
  111. package/runtime/engine/chunk-YMH4RYSX.mjs +317 -0
  112. package/runtime/engine/chunk-YNOMPSGS.mjs +8 -0
  113. package/runtime/engine/chunk-YRBAYTEZ.mjs +251 -0
  114. package/runtime/engine/chunk-YRHM272W.mjs +528 -0
  115. package/runtime/engine/chunk-ZQUZAGIQ.mjs +149 -0
  116. package/runtime/engine/chunk-ZXMM7QFP.mjs +176 -0
  117. package/runtime/engine/chunk-ZZJSIPV2.mjs +262 -0
  118. package/runtime/engine/composition.mjs +325 -0
  119. package/runtime/engine/document-local.mjs +504 -0
  120. package/runtime/engine/graph.json +4134 -0
  121. package/runtime/engine/index.mjs +265 -0
  122. package/runtime/engine/local-postgres-support.mjs +69 -0
  123. package/runtime/engine/local.mjs +3275 -0
  124. package/runtime/engine/pglite-directory-lock.mjs +8 -0
  125. package/runtime/engine/rag.mjs +11 -0
  126. package/runtime/engine/search.mjs +18 -0
  127. package/runtime/framework-migrations/foundation-bootstrap/rag.sql +115 -0
  128. package/runtime/framework-migrations/foundation-bootstrap/workflow.sql +194 -0
  129. package/runtime/framework-migrations/journal-bootstrap/migration.sql +26 -0
  130. package/runtime/framework-migrations/manifest.json +56 -0
  131. package/runtime/framework-migrations/rag/20261006111509_mushy_warhawk/migration.sql +121 -0
  132. package/runtime/framework-migrations/rag/20261013234621_rag_v2_lifecycle_markers/migration.sql +6 -0
  133. package/runtime/framework-migrations/workflow/20261006111508_perpetual_star_brand/migration.sql +31 -0
  134. package/runtime/runtime-metadata.json +27 -0
  135. package/runtime/tooling.mjs +10399 -8951
  136. package/scripts/bundle-runtime-config.mjs +23 -0
  137. package/scripts/bundle-runtime.mjs +100 -0
  138. package/scripts/bundle-runtime.test.mjs +33 -0
  139. package/scripts/bundle-shared.mjs +3 -0
  140. package/scripts/copy-dashboard.mjs +16 -0
  141. package/scripts/pre-publish-check.mjs +23 -11
  142. package/templateFeature/sso/sso-auth-callback.tsx +37 -5
  143. package/templateFeature/tools/manifest.json +2 -1
  144. package/templateFeature/tools/tools.ts +3 -3
  145. package/runtime/server.mjs +0 -14389
  146. package/scripts/bundle-server.mjs +0 -223
  147. package/server/config.js +0 -1
  148. package/server/index.js +0 -1
  149. package/server/package.json +0 -6
@@ -0,0 +1,330 @@
1
+ import {
2
+ copyOwnedPostgresQueryRejection,
3
+ markOwnedPostgresQueryFailure,
4
+ markOwnedPostgresQueryRejection,
5
+ ownedPostgresQueryFailure,
6
+ ownedPostgresQueryRejection,
7
+ ownedPostgresQuerySqlStateInCause
8
+ } from "./chunk-KX2PRQPS.mjs";
9
+
10
+ // ../runtime/dist/adapters/database/postgres-parameters.js
11
+ import { AsyncLocalStorage } from "node:async_hooks";
12
+ function runtimePostgresCodecs(bunSqlPgCodecs) {
13
+ return {
14
+ ...bunSqlPgCodecs,
15
+ json: { ...bunSqlPgCodecs.json, normalizeParam: JSON.stringify },
16
+ jsonb: { ...bunSqlPgCodecs.jsonb, normalizeParam: JSON.stringify }
17
+ };
18
+ }
19
+ function postgresArray(values) {
20
+ return `{${values.map((value) => {
21
+ if (Array.isArray(value))
22
+ return postgresArray(value);
23
+ if (value === null)
24
+ return "NULL";
25
+ if (value === void 0)
26
+ throw new Error("RUNTIME_DATABASE_PARAMETER_INVALID");
27
+ const encoded = parameter(value);
28
+ const text = encoded instanceof Uint8Array ? `\\x${Buffer.from(encoded).toString("hex")}` : String(encoded);
29
+ return `"${text.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
30
+ }).join(",")}}`;
31
+ }
32
+ function parameter(value) {
33
+ if (value instanceof Date) {
34
+ if (!Number.isFinite(value.getTime()))
35
+ throw new Error("RUNTIME_DATABASE_PARAMETER_INVALID");
36
+ return value.toISOString();
37
+ }
38
+ if (Array.isArray(value))
39
+ return postgresArray(value);
40
+ if (value !== null && typeof value === "object" && Object.getPrototypeOf(value) === Object.prototype)
41
+ return JSON.stringify(value);
42
+ return value;
43
+ }
44
+ function rejection(error) {
45
+ if (!(error instanceof Error))
46
+ return error;
47
+ const category = ownDataValue(error, "code");
48
+ const driverCode = typeof category === "string" && [
49
+ "ERR_POSTGRES_CONNECTION_CLOSED",
50
+ "ERR_POSTGRES_CONNECTION_TIMEOUT",
51
+ "ERR_POSTGRES_CONNECTION_LOST"
52
+ ].includes(category);
53
+ const state = ownDataValue(error, "errno") ?? (driverCode ? "08006" : void 0);
54
+ if (typeof state !== "string" || !/^[0-9A-Z]{5}$/.test(state))
55
+ return error;
56
+ const copy = Object.create(Object.getPrototypeOf(error));
57
+ Object.defineProperties(copy, Object.getOwnPropertyDescriptors(error));
58
+ Object.defineProperty(copy, "code", { value: state, configurable: true, enumerable: true });
59
+ Object.defineProperty(copy, "driverCode", { value: category, configurable: true, enumerable: false });
60
+ if (ownedPostgresQueryRejection(error)) {
61
+ copyOwnedPostgresQueryRejection(error, copy);
62
+ markOwnedPostgresQueryRejection(copy);
63
+ markOwnedPostgresQueryFailure(copy);
64
+ } else if (ownedPostgresQueryFailure(error))
65
+ markOwnedPostgresQueryFailure(copy);
66
+ return copy;
67
+ }
68
+ function structuredSqlState(error) {
69
+ const visited = /* @__PURE__ */ new Set();
70
+ let current = error;
71
+ for (let depth = 0; current && typeof current === "object" && depth < 8 && !visited.has(current); depth++) {
72
+ visited.add(current);
73
+ for (const key of ["code", "errno"]) {
74
+ const value = ownDataValue(current, key);
75
+ if (typeof value === "string" && /^[0-9A-Z]{5}$/.test(value))
76
+ return value;
77
+ }
78
+ current = ownDataValue(current, "cause");
79
+ }
80
+ return void 0;
81
+ }
82
+ function ownDataValue(value, key) {
83
+ try {
84
+ const descriptor = Object.getOwnPropertyDescriptor(value, key);
85
+ return descriptor && "value" in descriptor ? descriptor.value : void 0;
86
+ } catch {
87
+ return void 0;
88
+ }
89
+ }
90
+ function rawResult(value) {
91
+ if (typeof value === "bigint")
92
+ return value.toString();
93
+ if (!value || typeof value !== "object")
94
+ return value;
95
+ const array = Array.isArray(value);
96
+ if (!array && Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null)
97
+ return value;
98
+ const descriptors = Object.getOwnPropertyDescriptors(value);
99
+ for (const [key, descriptor] of Object.entries(descriptors)) {
100
+ if ("value" in descriptor && (!array || /^(0|[1-9][0-9]*)$/.test(key)))
101
+ descriptor.value = rawResult(descriptor.value);
102
+ }
103
+ return Object.defineProperties(array ? Object.setPrototypeOf([], Object.getPrototypeOf(value)) : Object.create(Object.getPrototypeOf(value)), descriptors);
104
+ }
105
+ function runtimePostgresClient(client, options = {}) {
106
+ const nativeQueries = /* @__PURE__ */ new WeakSet();
107
+ const queryCallbackFailures = /* @__PURE__ */ new WeakMap();
108
+ const querySettlements = /* @__PURE__ */ new WeakMap();
109
+ const markNativeQueryRejection = (query2, error) => {
110
+ if (!options.owner || !nativeQueries.has(query2))
111
+ return;
112
+ const evidence = queryCallbackFailures.get(query2);
113
+ markOwnedPostgresQueryRejection(error, evidence, structuredSqlState(error));
114
+ markOwnedPostgresQueryFailure(error);
115
+ if (evidence)
116
+ evidence.observed = true;
117
+ };
118
+ const nativeSettlement = (query2) => {
119
+ const settlement = new Promise((resolve, reject) => {
120
+ const then = Reflect.get(query2, "then", query2);
121
+ Reflect.apply(then, query2, [
122
+ resolve,
123
+ (error) => {
124
+ markNativeQueryRejection(query2, error);
125
+ reject(error);
126
+ }
127
+ ]);
128
+ });
129
+ void settlement.catch(() => void 0);
130
+ return settlement;
131
+ };
132
+ const proxyVariants = /* @__PURE__ */ new WeakMap();
133
+ function wrap(source, root = false, callbackFailures) {
134
+ const sourceVariants = proxyVariants.get(source);
135
+ const contextVariants = sourceVariants?.get(callbackFailures ?? null);
136
+ const existing = contextVariants?.get(root);
137
+ if (existing)
138
+ return existing;
139
+ const proxy = new Proxy(source, {
140
+ apply(target, thisArgument, args) {
141
+ const values = args[0] && Array.isArray(args[0]) && "raw" in args[0] ? [args[0], ...args.slice(1).map(parameter)] : args;
142
+ return query(Reflect.apply(target, thisArgument, values), false, true, callbackFailures);
143
+ },
144
+ get(target, key) {
145
+ const value = Reflect.get(target, key, target);
146
+ if (typeof value !== "function")
147
+ return value;
148
+ if (key === "unsafe")
149
+ return (text, values) => query(Reflect.apply(value, target, [text, values?.map(parameter)]), false, true, callbackFailures);
150
+ if (key === "begin" && options.owner) {
151
+ const owner = options.owner;
152
+ return (...args) => {
153
+ const callerContext = AsyncLocalStorage.snapshot();
154
+ const callbackIndex = args.length === 1 && typeof args[0] === "function" ? 0 : args.length === 2 && typeof args[0] === "string" && typeof args[1] === "function" ? 1 : -1;
155
+ const callbackEntered = { value: false };
156
+ const callbackRejectedWithOwnedOrigin = { value: false };
157
+ const sourceAdmission = root && callbackIndex >= 0 ? owner.captureCallbackAdmission() : void 0;
158
+ const operation = (callbackAdmission = sourceAdmission) => {
159
+ const forwarded = args.map((item, index) => typeof item === "function" ? (transaction) => {
160
+ if (index === callbackIndex && root && callbackAdmission) {
161
+ return callerContext(() => callbackAdmission.run(() => {
162
+ callbackEntered.value = true;
163
+ callbackAdmission.assertActive();
164
+ const evidence = { observed: false };
165
+ return (() => {
166
+ let result;
167
+ try {
168
+ result = item(wrap(transaction, false, evidence));
169
+ } catch (error) {
170
+ const classified = rejection(error);
171
+ if (evidence.observed && ownedPostgresQueryRejection(classified, evidence)) {
172
+ callbackRejectedWithOwnedOrigin.value = true;
173
+ callbackRejectedWithOwnedOrigin.sqlState = ownedPostgresQuerySqlStateInCause(classified, evidence);
174
+ markOwnedPostgresQueryRejection(classified, void 0, callbackRejectedWithOwnedOrigin.sqlState);
175
+ }
176
+ throw classified;
177
+ }
178
+ return Promise.resolve(result).catch((error) => {
179
+ const classified = rejection(error);
180
+ if (evidence.observed && ownedPostgresQueryRejection(classified, evidence)) {
181
+ callbackRejectedWithOwnedOrigin.value = true;
182
+ callbackRejectedWithOwnedOrigin.sqlState = ownedPostgresQuerySqlStateInCause(classified, evidence);
183
+ markOwnedPostgresQueryRejection(classified, void 0, callbackRejectedWithOwnedOrigin.sqlState);
184
+ }
185
+ throw classified;
186
+ });
187
+ })();
188
+ }));
189
+ }
190
+ return callerContext(() => item(wrap(transaction, false, callbackFailures)));
191
+ } : item);
192
+ return Promise.resolve(Reflect.apply(value, target, forwarded)).catch((error) => {
193
+ const classified = rejection(error);
194
+ if (callbackEntered.value && callbackRejectedWithOwnedOrigin.value) {
195
+ markOwnedPostgresQueryRejection(classified, void 0, callbackRejectedWithOwnedOrigin.sqlState);
196
+ markOwnedPostgresQueryFailure(classified);
197
+ }
198
+ throw classified;
199
+ });
200
+ };
201
+ return root && callbackIndex >= 0 ? owner.begin((admission) => operation(admission), () => callbackEntered.value, sourceAdmission) : owner.track(() => operation());
202
+ };
203
+ }
204
+ if (key === "begin" || key === "savepoint" || key === "transaction")
205
+ return (...args) => {
206
+ const callerContext = AsyncLocalStorage.snapshot();
207
+ const forwarded = args.map((item) => typeof item === "function" ? (transaction) => callerContext(() => item(wrap(transaction, false, callbackFailures))) : item);
208
+ const invoke = () => Promise.resolve(Reflect.apply(value, target, forwarded)).catch((error) => {
209
+ throw rejection(error);
210
+ });
211
+ return options.owner ? options.owner.track(invoke) : invoke();
212
+ };
213
+ return value.bind(target);
214
+ }
215
+ });
216
+ const finalVariants = proxyVariants.get(source) ?? /* @__PURE__ */ new Map();
217
+ const finalContextVariants = finalVariants.get(callbackFailures ?? null) ?? /* @__PURE__ */ new Map();
218
+ finalContextVariants.set(root, proxy);
219
+ finalVariants.set(callbackFailures ?? null, finalContextVariants);
220
+ proxyVariants.set(source, finalVariants);
221
+ return proxy;
222
+ }
223
+ function query(value, positional = false, nativeQuery = false, callbackFailures) {
224
+ if (!value || typeof value !== "object")
225
+ return value;
226
+ if (nativeQuery) {
227
+ nativeQueries.add(value);
228
+ if (callbackFailures)
229
+ queryCallbackFailures.set(value, callbackFailures);
230
+ }
231
+ return new Proxy(value, {
232
+ get(target, key) {
233
+ const member = Reflect.get(target, key, target);
234
+ if (typeof member !== "function")
235
+ return member;
236
+ if (key === "then")
237
+ return (ok, fail) => {
238
+ let actual = querySettlements.get(target);
239
+ if (!actual) {
240
+ const start = () => new Promise((resolve, reject) => {
241
+ Reflect.apply(member, target, [
242
+ resolve,
243
+ (error) => {
244
+ markNativeQueryRejection(target, error);
245
+ reject(error);
246
+ }
247
+ ]);
248
+ });
249
+ actual = options.owner ? options.owner.track(start) : start();
250
+ querySettlements.set(target, actual);
251
+ }
252
+ return actual.then((result) => {
253
+ const decoded = positional ? result : rawResult(result);
254
+ return ok ? ok(decoded) : decoded;
255
+ }, (error) => {
256
+ const classified = rejection(error);
257
+ if (fail)
258
+ return fail(classified);
259
+ throw classified;
260
+ });
261
+ };
262
+ if (key === "catch")
263
+ return (fail) => {
264
+ const prior = querySettlements.get(target);
265
+ if (prior) {
266
+ const result2 = Reflect.apply(member, target, [
267
+ (error) => {
268
+ markNativeQueryRejection(target, error);
269
+ return fail(rejection(error));
270
+ }
271
+ ]);
272
+ if (result2 && typeof result2 === "object")
273
+ querySettlements.set(result2, Promise.resolve(result2));
274
+ return query(result2, positional);
275
+ }
276
+ const start = () => {
277
+ const result2 = Reflect.apply(member, target, [
278
+ (error) => {
279
+ markNativeQueryRejection(target, error);
280
+ return fail(rejection(error));
281
+ }
282
+ ]);
283
+ const settlement = nativeSettlement(target);
284
+ querySettlements.set(target, settlement);
285
+ if (result2 && typeof result2 === "object" && result2 !== target)
286
+ querySettlements.set(result2, Promise.resolve(result2));
287
+ return { result: result2, settlement };
288
+ };
289
+ const result = options.owner ? options.owner.trackEager(start) : start().result;
290
+ return query(result, positional);
291
+ };
292
+ if (key === "execute" || key === "finally")
293
+ return (...args) => {
294
+ const prior = querySettlements.get(target);
295
+ if (prior) {
296
+ const result = Reflect.apply(member, target, args);
297
+ if (result && typeof result === "object")
298
+ querySettlements.set(result, result === target ? prior : Promise.resolve(result));
299
+ return query(result, positional);
300
+ }
301
+ const start = () => {
302
+ const result = Reflect.apply(member, target, args);
303
+ const settlement = nativeSettlement(target);
304
+ querySettlements.set(target, settlement);
305
+ if (result && typeof result === "object" && result !== target)
306
+ querySettlements.set(result, Promise.resolve(result));
307
+ return { result, settlement };
308
+ };
309
+ const tracked = options.owner ? options.owner.trackEager(start) : start().result;
310
+ return query(tracked, positional);
311
+ };
312
+ return (...args) => {
313
+ const derived = Reflect.apply(member, target, args);
314
+ const started = querySettlements.get(target);
315
+ const nativeAlias = key === "raw" || key === "values" || key === "simple";
316
+ if (nativeAlias && started && derived && typeof derived === "object")
317
+ querySettlements.set(derived, started);
318
+ const isNativeAlias = nativeQueries.has(target) && nativeAlias && !!derived && typeof derived === "object";
319
+ return query(derived, positional || key === "values", isNativeAlias, queryCallbackFailures.get(target));
320
+ };
321
+ }
322
+ });
323
+ }
324
+ return wrap(client, true);
325
+ }
326
+
327
+ export {
328
+ runtimePostgresCodecs,
329
+ runtimePostgresClient
330
+ };
@@ -0,0 +1,26 @@
1
+ import {
2
+ createFrameworkSchemaResourceOwner,
3
+ frameworkAccessRequirements,
4
+ hasFrameworkSchemaTransition,
5
+ transitionForObservation,
6
+ verifyFrameworkFoundationPostimage,
7
+ verifyFrameworkSchemaPostimage
8
+ } from "./chunk-K2YZVPJ4.mjs";
9
+ import "./chunk-GSLM44EF.mjs";
10
+ import "./chunk-ZXMM7QFP.mjs";
11
+ import "./chunk-PZFMKFHO.mjs";
12
+ import "./chunk-5MXY3T75.mjs";
13
+ import "./chunk-U2NRG6KC.mjs";
14
+ import "./chunk-ITH2NEKM.mjs";
15
+ import "./chunk-3D7MHEUC.mjs";
16
+ import "./chunk-SVJCOUI3.mjs";
17
+ import "./chunk-I3GWR43K.mjs";
18
+ import "./chunk-AEBW7XZJ.mjs";
19
+ export {
20
+ createFrameworkSchemaResourceOwner,
21
+ frameworkAccessRequirements,
22
+ hasFrameworkSchemaTransition,
23
+ transitionForObservation,
24
+ verifyFrameworkFoundationPostimage,
25
+ verifyFrameworkSchemaPostimage
26
+ };