@neondatabase/neon-js 0.1.0-alpha.1 → 0.1.0-alpha.3

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.
@@ -0,0 +1,25 @@
1
+ //#region rolldown:runtime
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+
24
+ //#endregion
25
+ export { };
@@ -0,0 +1 @@
1
+ export { };
@@ -3,14 +3,14 @@ import meow from "meow";
3
3
  import { PostgresMeta } from "@supabase/postgres-meta";
4
4
  import { getGeneratorMetadata } from "@supabase/postgres-meta/dist/lib/generators.js";
5
5
  import { apply } from "@supabase/postgres-meta/dist/server/templates/typescript.js";
6
- import { mkdirSync, writeFileSync } from "fs";
7
- import { dirname } from "path";
6
+ import { mkdirSync, writeFileSync } from "node:fs";
7
+ import path from "node:path";
8
8
 
9
9
  //#region src/cli/utils/parse-duration.ts
10
10
  function parseDuration(duration) {
11
- const match = duration.match(/^(\d+)(s|m|h)?$/);
11
+ const match = duration.match(/^(\d+)([hms])?$/);
12
12
  if (!match) throw new Error(`Invalid duration format: ${duration}. Use format like "30s", "1m", "90s"`);
13
- const value = parseInt(match[1], 10);
13
+ const value = Number.parseInt(match[1], 10);
14
14
  const unit = match[2] || "s";
15
15
  switch (unit) {
16
16
  case "s": return value * 1e3;
@@ -63,7 +63,7 @@ async function genTypes(flags) {
63
63
  console.log(`Schemas: ${options.schemas?.join(", ") || "public"}`);
64
64
  console.log(`Output: ${outputPath}`);
65
65
  const types = await generateTypes(options);
66
- const outputDir = dirname(outputPath);
66
+ const outputDir = path.dirname(outputPath);
67
67
  if (outputDir !== ".") mkdirSync(outputDir, { recursive: true });
68
68
  writeFileSync(outputPath, types);
69
69
  console.log(`✅ Types generated successfully at ${outputPath}`);
@@ -139,7 +139,7 @@ async function main() {
139
139
  process.exit(1);
140
140
  }
141
141
  }
142
- main();
142
+ await main();
143
143
 
144
144
  //#endregion
145
145
  export { };