sim-setup 1.0.14 → 1.0.15-preview.122.1

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 (2) hide show
  1. package/dist/index.js +4 -2
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -32550,12 +32550,12 @@ function Postgres(a, b) {
32550
32550
  async function begin(options, fn) {
32551
32551
  !fn && (fn = options, options = "");
32552
32552
  const queries = queue_default();
32553
- let savepoints = 0, connection, prepare = null;
32553
+ let savepoints = 0, connection, prepare = null, closed = false;
32554
32554
  try {
32555
32555
  await sql.unsafe("begin " + options.replace(/[^a-z ]/ig, ""), [], { onexecute }).execute();
32556
32556
  return await Promise.race([
32557
32557
  scope(connection, fn),
32558
- new Promise((_, reject) => connection.onclose = reject)
32558
+ new Promise((_, reject) => connection.onclose = (e) => (closed = true, reject(e)))
32559
32559
  ]);
32560
32560
  } catch (error) {
32561
32561
  throw error;
@@ -32588,6 +32588,8 @@ function Postgres(a, b) {
32588
32588
  return scope(c, fn, "s" + savepoints++ + (name ? "_" + name : ""));
32589
32589
  }
32590
32590
  function handler(q) {
32591
+ if (closed)
32592
+ return q.reject(Errors.connection("CONNECTION_CLOSED", options));
32591
32593
  q.catch((e) => uncaughtError || (uncaughtError = e));
32592
32594
  c.queue === full ? queries.push(q) : c.execute(q) || move(c, full);
32593
32595
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sim-setup",
3
- "version": "1.0.14",
3
+ "version": "1.0.15-preview.122.1",
4
4
  "description": "Set up and manage a self-hosted Sim installation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "devDependencies": {
51
51
  "@clack/prompts": "1.7.0",
52
- "@next/env": "16.3.1",
52
+ "@next/env": "16.3.4",
53
53
  "@sim/deployment-config": "0.1.0",
54
54
  "@sim/security": "0.1.0",
55
55
  "@sim/tsconfig": "0.0.0",