@lakeql/file-generator 0.1.4 → 0.1.5

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.
@@ -13,6 +13,6 @@ interface GenerateConfigReqistryProps {
13
13
  */
14
14
  declare function generateConfigReqistry({
15
15
  configPaths
16
- }: GenerateConfigReqistryProps): (ts.VariableStatement | ts.ImportDeclaration | ts.TypeAliasDeclaration)[];
16
+ }: GenerateConfigReqistryProps): (ts.ImportDeclaration | ts.VariableStatement | ts.TypeAliasDeclaration)[];
17
17
  //#endregion
18
18
  export { GenerateConfigReqistryProps, generateConfigReqistry };
package/dist/config.d.mts CHANGED
@@ -1,6 +1,23 @@
1
1
  import ts from "typescript";
2
2
 
3
3
  //#region src/config.d.ts
4
+ /**
5
+ * Storage configuration for the mutation write pipeline.
6
+ */
7
+ interface StorageConfigProps {
8
+ /** The load strategy for the write pipeline. */
9
+ loadStrategy: string;
10
+ /** Storage adapter type (s3 or minio). */
11
+ type?: string;
12
+ /** Bucket name. */
13
+ bucket: string;
14
+ /** Base path for endpoint data. */
15
+ basePath: string;
16
+ /** Optional region override. */
17
+ region?: string;
18
+ /** Optional custom endpoint. */
19
+ endpoint?: string;
20
+ }
4
21
  /**
5
22
  * Parameters for generateConfig.
6
23
  */
@@ -15,6 +32,8 @@ interface GenerateConfigProps {
15
32
  queryName: string;
16
33
  /** Optional mutation names for this table endpoint. */
17
34
  mutationName?: string[];
35
+ /** Optional storage configuration for mutation pipeline. */
36
+ storageConfig?: StorageConfigProps;
18
37
  }
19
38
  /**
20
39
  * Generates config.ts AST nodes for a table endpoint.
@@ -24,7 +43,8 @@ declare function generateConfig({
24
43
  schema,
25
44
  tableName,
26
45
  queryName,
27
- mutationName
28
- }: GenerateConfigProps): ts.VariableStatement[];
46
+ mutationName,
47
+ storageConfig
48
+ }: GenerateConfigProps): ts.Node[];
29
49
  //#endregion
30
- export { GenerateConfigProps, generateConfig };
50
+ export { GenerateConfigProps, StorageConfigProps, generateConfig };
package/dist/config.mjs CHANGED
@@ -1 +1 @@
1
- import{asConst as e,exportedConstStatement as t,objectLiteral as n,property as r,stringLiteral as i}from"./ast-builders.mjs";import a from"typescript";function o({catalog:o,schema:s,tableName:c,queryName:l,mutationName:u}){return[t(`hiveConfig`,e(n([r(`catalog`,i(o)),r(`schema`,i(s)),r(`tableName`,i(c))]))),t(`docsConfig`,n([r(`query`,a.factory.createTrue()),r(`mutation`,u?.length?a.factory.createTrue():a.factory.createFalse()),r(`queryName`,i(l)),r(`mutationName`,u?.length?a.factory.createArrayLiteralExpression(u.map(e=>i(e)),!1):a.factory.createNull())]))]}export{o as generateConfig};
1
+ import{asConst as e,exportedConstStatement as t,objectLiteral as n,property as r,stringLiteral as i}from"./ast-builders.mjs";import a from"typescript";function o({catalog:o,schema:s,tableName:c,queryName:l,mutationName:u,storageConfig:d}){let f=[t(`hiveConfig`,e(n([r(`catalog`,i(o)),r(`schema`,i(s)),r(`tableName`,i(c))]))),t(`docsConfig`,n([r(`query`,a.factory.createTrue()),r(`mutation`,u?.length?a.factory.createTrue():a.factory.createFalse()),r(`queryName`,i(l)),r(`mutationName`,u?.length?a.factory.createArrayLiteralExpression(u.map(e=>i(e)),!1):a.factory.createNull())]))];if(d){let a=[r(`loadStrategy`,i(d.loadStrategy)),r(`bucket`,i(d.bucket)),r(`basePath`,i(d.basePath))];d.type&&a.push(r(`type`,i(d.type))),d.region&&a.push(r(`region`,i(d.region))),d.endpoint&&a.push(r(`endpoint`,i(d.endpoint)));let o=t(`storageConfig`,e(n(a)));f.push(o)}return f}export{o as generateConfig};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lakeql/file-generator",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Generates TypeScript source files from Trino table metadata",
5
5
  "keywords": [
6
6
  "ast",
@@ -61,7 +61,7 @@
61
61
  "dependencies": {
62
62
  "typescript": "6.0.3",
63
63
  "@lakeql/helpers": "0.1.2",
64
- "@lakeql/schema-generator": "0.2.1"
64
+ "@lakeql/schema-generator": "0.3.0"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@types/node": "24.13.2",