@typed-sql/cli 1.0.0-beta.0 → 1.0.0-beta.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @typed-sql/cli
2
2
 
3
+ ## 1.0.0-beta.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 16e2475: Prove npm trusted publishing and provenance after the initial registry bootstrap.
8
+ - Updated dependencies [16e2475]
9
+ - @typed-sql/core@1.0.0-beta.1
10
+ - @typed-sql/schema@1.0.0-beta.1
11
+ - @typed-sql/config@1.0.0-beta.1
12
+ - @typed-sql/compiler@1.0.0-beta.1
13
+
3
14
  ## 1.0.0-beta.0
4
15
 
5
16
  ### Major Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typed-sql/cli",
3
- "version": "1.0.0-beta.0",
3
+ "version": "1.0.0-beta.1",
4
4
  "description": "Config-driven typed-sql generation, checking, and schema drift CLI.",
5
5
  "license": "MIT",
6
6
  "author": "Lojhan",
@@ -32,9 +32,9 @@
32
32
  "typed-sql": "./dist/packages/cli/src/cli.js"
33
33
  },
34
34
  "dependencies": {
35
- "@typed-sql/core": "1.0.0-beta.0",
36
- "@typed-sql/compiler": "1.0.0-beta.0",
37
- "@typed-sql/config": "1.0.0-beta.0",
38
- "@typed-sql/schema": "1.0.0-beta.0"
35
+ "@typed-sql/compiler": "1.0.0-beta.1",
36
+ "@typed-sql/config": "1.0.0-beta.1",
37
+ "@typed-sql/core": "1.0.0-beta.1",
38
+ "@typed-sql/schema": "1.0.0-beta.1"
39
39
  }
40
40
  }
@@ -1,9 +0,0 @@
1
- import type { SchemaSnapshot, TypedSqlConfig } from "@typed-sql/core";
2
- export interface LoadedConfig {
3
- readonly file: string;
4
- readonly directory: string;
5
- readonly config: TypedSqlConfig<SchemaSnapshot, unknown>;
6
- }
7
- export declare function loadConfig(input?: string): Promise<LoadedConfig>;
8
- export declare function fromConfig(directory: string, path: string): string;
9
- //# sourceMappingURL=config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;CAC1D;AA8BD,wBAAsB,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAKtE;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAElE"}
@@ -1,50 +0,0 @@
1
- import { constants } from "node:fs";
2
- import { access } from "node:fs/promises";
3
- import { dirname, join, resolve } from "node:path";
4
- import { pathToFileURL } from "node:url";
5
- import { tsImport } from "tsx/esm/api";
6
- async function exists(path) {
7
- try {
8
- await access(path, constants.F_OK);
9
- return true;
10
- }
11
- catch {
12
- return false;
13
- }
14
- }
15
- async function discover(start) {
16
- let directory = resolve(start);
17
- while (true) {
18
- for (const name of ["typed-sql.config.ts", "typed-sql.config.mts", "typed-sql.config.mjs", "typed-sql.config.js"]) {
19
- const candidate = join(directory, name);
20
- if (await exists(candidate))
21
- return candidate;
22
- }
23
- const parent = dirname(directory);
24
- if (parent === directory)
25
- throw new Error(`Could not find typed-sql.config.ts from ${start}`);
26
- directory = parent;
27
- }
28
- }
29
- function isConfig(value) {
30
- if (typeof value !== "object" || value === null)
31
- return false;
32
- const candidate = value;
33
- return typeof candidate.dialect === "object"
34
- && candidate.dialect !== null
35
- && typeof candidate.dialect.id === "string"
36
- && typeof candidate.dialect.analyze === "function"
37
- && typeof candidate.schema?.file === "string"
38
- && typeof candidate.outDir === "string";
39
- }
40
- export async function loadConfig(input) {
41
- const file = input === undefined ? await discover(process.cwd()) : resolve(input);
42
- const module = await tsImport(pathToFileURL(file).href, import.meta.url);
43
- if (!isConfig(module.default))
44
- throw new TypeError(`${file} must default-export defineConfig({...})`);
45
- return { file, directory: dirname(file), config: module.default };
46
- }
47
- export function fromConfig(directory, path) {
48
- return resolve(directory, path);
49
- }
50
- //# sourceMappingURL=config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAQvC,KAAK,UAAU,MAAM,CAAC,IAAY;IAChC,IAAI,CAAC;QAAC,MAAM,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;QAAC,OAAO,IAAI,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,KAAK,CAAC;IAAC,CAAC;AAClF,CAAC;AAED,KAAK,UAAU,QAAQ,CAAC,KAAa;IACnC,IAAI,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/B,OAAO,IAAI,EAAE,CAAC;QACZ,KAAK,MAAM,IAAI,IAAI,CAAC,qBAAqB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,qBAAqB,CAAC,EAAE,CAAC;YAClH,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;YACxC,IAAI,MAAM,MAAM,CAAC,SAAS,CAAC;gBAAE,OAAO,SAAS,CAAC;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