@coffre/cli 0.1.13 → 0.1.15

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.
@@ -4,8 +4,8 @@ import { D as customType, O as boolean, V as SQL, W as sql, b as text, ct as is,
4
4
  import { r as drizzle } from "./node-postgres-BHgGDfvg.js";
5
5
  import { a as trackCommits, i as relationsOf, n as asPostgresDatabase, r as ACTIVE_SUBJECT } from "./portable-9wWdi5e1.js";
6
6
  import { resolve } from "node:path";
7
- import { AsyncLocalStorage } from "node:async_hooks";
8
7
  import { checkServerIdentity } from "node:tls";
8
+ import { AsyncLocalStorage } from "node:async_hooks";
9
9
  //#region ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260920.1_@libsql+client@0.18.0_@types+pg@8.20.0_pg@8.16.3/node_modules/drizzle-orm/pg-core/checks.js
10
10
  var CheckBuilder = class {
11
11
  constructor(name, value) {
@@ -126,6 +126,39 @@ function uniqueIndex(name) {
126
126
  return new IndexBuilderOn(true, name);
127
127
  }
128
128
  //#endregion
129
+ //#region ../../node_modules/.pnpm/pg-connection-string@2.14.0/node_modules/pg-connection-string/esm/index.mjs
130
+ var import_pg_connection_string = /* @__PURE__ */ __toESM(require_pg_connection_string(), 1);
131
+ import_pg_connection_string.default.parse;
132
+ import_pg_connection_string.default.parse;
133
+ import_pg_connection_string.default.toClientConfig;
134
+ const parseIntoClientConfig = import_pg_connection_string.default.parseIntoClientConfig;
135
+ //#endregion
136
+ //#region ../db/dist/postgres-Bmar8y0q.js
137
+ /** Keep libpq's system-root shortcut from being read as a certificate filename by pg. */
138
+ function postgresConnection(url) {
139
+ let parsed;
140
+ try {
141
+ parsed = new URL(url);
142
+ } catch {
143
+ throw new Error("invalid Postgres URL");
144
+ }
145
+ const parameters = parsed.searchParams;
146
+ if (parameters.getAll("sslrootcert").at(-1) !== "system") return { connectionString: url };
147
+ const mode = parameters.getAll("sslmode").at(-1);
148
+ if (mode !== void 0 && mode !== "verify-full") throw new Error("sslrootcert=system requires sslmode=verify-full");
149
+ parameters.delete("sslrootcert");
150
+ parameters.set("sslmode", "verify-full");
151
+ const config = parseIntoClientConfig(parsed.toString());
152
+ const host = config.host;
153
+ if (!host) throw new Error("sslrootcert=system requires a Postgres hostname");
154
+ config.ssl = {
155
+ ...config.ssl,
156
+ rejectUnauthorized: true,
157
+ checkServerIdentity: (_hostname, certificate) => checkServerIdentity(host, certificate)
158
+ };
159
+ return config;
160
+ }
161
+ //#endregion
129
162
  //#region ../db/dist/rolldown-runtime-D7D4PA-g.js
130
163
  var __defProp = Object.defineProperty;
131
164
  var __exportAll = (all, no_symbols) => {
@@ -562,39 +595,6 @@ function createDatabase(pool) {
562
595
  return trackCommits(db);
563
596
  }
564
597
  //#endregion
565
- //#region ../../node_modules/.pnpm/pg-connection-string@2.14.0/node_modules/pg-connection-string/esm/index.mjs
566
- var import_pg_connection_string = /* @__PURE__ */ __toESM(require_pg_connection_string(), 1);
567
- import_pg_connection_string.default.parse;
568
- import_pg_connection_string.default.parse;
569
- import_pg_connection_string.default.toClientConfig;
570
- const parseIntoClientConfig = import_pg_connection_string.default.parseIntoClientConfig;
571
- //#endregion
572
- //#region ../db/dist/postgres-Bmar8y0q.js
573
- /** Keep libpq's system-root shortcut from being read as a certificate filename by pg. */
574
- function postgresConnection(url) {
575
- let parsed;
576
- try {
577
- parsed = new URL(url);
578
- } catch {
579
- throw new Error("invalid Postgres URL");
580
- }
581
- const parameters = parsed.searchParams;
582
- if (parameters.getAll("sslrootcert").at(-1) !== "system") return { connectionString: url };
583
- const mode = parameters.getAll("sslmode").at(-1);
584
- if (mode !== void 0 && mode !== "verify-full") throw new Error("sslrootcert=system requires sslmode=verify-full");
585
- parameters.delete("sslrootcert");
586
- parameters.set("sslmode", "verify-full");
587
- const config = parseIntoClientConfig(parsed.toString());
588
- const host = config.host;
589
- if (!host) throw new Error("sslrootcert=system requires a Postgres hostname");
590
- config.ssl = {
591
- ...config.ssl,
592
- rejectUnauthorized: true,
593
- checkServerIdentity: (_hostname, certificate) => checkServerIdentity(host, certificate)
594
- };
595
- return config;
596
- }
597
- //#endregion
598
598
  //#region ../db/dist/connect.js
599
599
  /**
600
600
  * Open a database from its URL, on a Node server: