@lakeql/file-generator 0.1.4 → 0.1.6
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/dist/config-registry.d.mts +1 -1
- package/dist/config.d.mts +27 -3
- package/dist/config.mjs +1 -1
- package/package.json +5 -5
|
@@ -13,6 +13,6 @@ interface GenerateConfigReqistryProps {
|
|
|
13
13
|
*/
|
|
14
14
|
declare function generateConfigReqistry({
|
|
15
15
|
configPaths
|
|
16
|
-
}: GenerateConfigReqistryProps): (ts.
|
|
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,27 @@
|
|
|
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
|
+
/** Partitioning mode (true, false, or field name string). */
|
|
21
|
+
partitioning?: boolean | string;
|
|
22
|
+
/** Partition format granularity. */
|
|
23
|
+
partitioningFormat?: string;
|
|
24
|
+
}
|
|
4
25
|
/**
|
|
5
26
|
* Parameters for generateConfig.
|
|
6
27
|
*/
|
|
@@ -15,6 +36,8 @@ interface GenerateConfigProps {
|
|
|
15
36
|
queryName: string;
|
|
16
37
|
/** Optional mutation names for this table endpoint. */
|
|
17
38
|
mutationName?: string[];
|
|
39
|
+
/** Optional storage configuration for mutation pipeline. */
|
|
40
|
+
storageConfig?: StorageConfigProps;
|
|
18
41
|
}
|
|
19
42
|
/**
|
|
20
43
|
* Generates config.ts AST nodes for a table endpoint.
|
|
@@ -24,7 +47,8 @@ declare function generateConfig({
|
|
|
24
47
|
schema,
|
|
25
48
|
tableName,
|
|
26
49
|
queryName,
|
|
27
|
-
mutationName
|
|
28
|
-
|
|
50
|
+
mutationName,
|
|
51
|
+
storageConfig
|
|
52
|
+
}: GenerateConfigProps): ts.Node[];
|
|
29
53
|
//#endregion
|
|
30
|
-
export { GenerateConfigProps, generateConfig };
|
|
54
|
+
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}){
|
|
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 o=[r(`loadStrategy`,i(d.loadStrategy)),r(`bucket`,i(d.bucket)),r(`basePath`,i(d.basePath))];d.type&&o.push(r(`type`,i(d.type))),d.region&&o.push(r(`region`,i(d.region))),d.endpoint&&o.push(r(`endpoint`,i(d.endpoint))),d.partitioning!==void 0&&(typeof d.partitioning==`boolean`?o.push(r(`partitioning`,d.partitioning?a.factory.createTrue():a.factory.createFalse())):o.push(r(`partitioning`,i(d.partitioning)))),d.partitioningFormat&&o.push(r(`partitioningFormat`,i(d.partitioningFormat)));let s=t(`storageConfig`,e(n(o)));f.push(s)}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.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Generates TypeScript source files from Trino table metadata",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ast",
|
|
@@ -60,15 +60,15 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"typescript": "6.0.3",
|
|
63
|
-
"@lakeql/helpers": "0.1.
|
|
64
|
-
"@lakeql/schema-generator": "0.
|
|
63
|
+
"@lakeql/helpers": "0.1.3",
|
|
64
|
+
"@lakeql/schema-generator": "0.4.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@types/node": "24.13.2",
|
|
68
68
|
"lodash-es": "4.18.1",
|
|
69
69
|
"tsdown": "0.22.2",
|
|
70
|
-
"vitest": "4.1.
|
|
71
|
-
"@lakeql/column-parser": "0.1.
|
|
70
|
+
"vitest": "4.1.9",
|
|
71
|
+
"@lakeql/column-parser": "0.1.3",
|
|
72
72
|
"@lakeql/tsconfig": "0.1.0"
|
|
73
73
|
},
|
|
74
74
|
"scripts": {
|