@lakeql/schema-generator 0.1.1 → 0.2.0
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/endpoint-schema.d.mts +134 -0
- package/dist/endpoint-schema.mjs +1 -0
- package/dist/graphql-schema.d.mts +36 -13
- package/dist/hive-table.d.mts +42 -14
- package/dist/json-schema.d.mts +18 -1
- package/dist/json-schema.mjs +1 -1
- package/package.json +18 -2
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/endpoint-schema.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Regex pattern for field names: alphanumeric + underscore, no leading digit, max 64 chars.
|
|
6
|
+
*/
|
|
7
|
+
declare const fieldNamePattern: RegExp;
|
|
8
|
+
/**
|
|
9
|
+
* Regex pattern for metadata fields (tableName, catalog, schema): alphanumeric + underscore,
|
|
10
|
+
* no leading digit, max 128 chars.
|
|
11
|
+
*/
|
|
12
|
+
declare const metadataFieldPattern: RegExp;
|
|
13
|
+
/**
|
|
14
|
+
* Supported load strategies for the mutation write pipeline.
|
|
15
|
+
*/
|
|
16
|
+
declare const loadStrategies: readonly ["full_load", "full_load_append", "append"];
|
|
17
|
+
type LoadStrategy = (typeof loadStrategies)[number];
|
|
18
|
+
/**
|
|
19
|
+
* Mutation pipeline configuration for an endpoint.
|
|
20
|
+
*/
|
|
21
|
+
interface MutationConfig {
|
|
22
|
+
/** Load strategy for the write pipeline. */
|
|
23
|
+
loadStrategy: LoadStrategy;
|
|
24
|
+
/** S3 base path for endpoint data. */
|
|
25
|
+
basePath: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Zod schema for the mutation configuration object.
|
|
29
|
+
*/
|
|
30
|
+
declare const mutationConfigSchema: z.ZodObject<{
|
|
31
|
+
loadStrategy: z.ZodEnum<{
|
|
32
|
+
full_load: "full_load";
|
|
33
|
+
full_load_append: "full_load_append";
|
|
34
|
+
append: "append";
|
|
35
|
+
}>;
|
|
36
|
+
basePath: z.ZodString;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
/**
|
|
39
|
+
* Zod schema for the mutation field: either `false` (disabled) or a config object (enabled).
|
|
40
|
+
*/
|
|
41
|
+
declare const mutationSchema: z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodObject<{
|
|
42
|
+
loadStrategy: z.ZodEnum<{
|
|
43
|
+
full_load: "full_load";
|
|
44
|
+
full_load_append: "full_load_append";
|
|
45
|
+
append: "append";
|
|
46
|
+
}>;
|
|
47
|
+
basePath: z.ZodString;
|
|
48
|
+
}, z.core.$strip>]>;
|
|
49
|
+
/**
|
|
50
|
+
* Supported primitive types for field definitions.
|
|
51
|
+
*/
|
|
52
|
+
declare const primitiveTypes: readonly ["String", "Integer", "Float", "Boolean", "Date", "DateTime"];
|
|
53
|
+
type PrimitiveType = (typeof primitiveTypes)[number];
|
|
54
|
+
/**
|
|
55
|
+
* Field-level validation refinement types.
|
|
56
|
+
*/
|
|
57
|
+
type FieldValidation = {
|
|
58
|
+
type: "email";
|
|
59
|
+
} | {
|
|
60
|
+
type: "url";
|
|
61
|
+
} | {
|
|
62
|
+
type: "uuid";
|
|
63
|
+
} | {
|
|
64
|
+
type: "min";
|
|
65
|
+
value: number;
|
|
66
|
+
} | {
|
|
67
|
+
type: "max";
|
|
68
|
+
value: number;
|
|
69
|
+
} | {
|
|
70
|
+
type: "regex";
|
|
71
|
+
pattern: string;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Field-level options for mutation input validation.
|
|
75
|
+
*/
|
|
76
|
+
interface FieldOptions {
|
|
77
|
+
/** Whether the field is required in mutation input. Default: false. */
|
|
78
|
+
required?: boolean;
|
|
79
|
+
/** Validation refinements to apply via Zod. */
|
|
80
|
+
validations?: FieldValidation[];
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Zod schema for field validation refinements.
|
|
84
|
+
*/
|
|
85
|
+
declare const fieldValidationSchema: z.ZodType<FieldValidation>;
|
|
86
|
+
/**
|
|
87
|
+
* Zod schema for field-level options.
|
|
88
|
+
*/
|
|
89
|
+
declare const fieldOptionsSchema: z.ZodType<FieldOptions>;
|
|
90
|
+
interface ArrayItemDefinition {
|
|
91
|
+
type: PrimitiveType | "Object";
|
|
92
|
+
fields?: FieldDefinition[];
|
|
93
|
+
}
|
|
94
|
+
interface FieldDefinition {
|
|
95
|
+
name: string;
|
|
96
|
+
type: PrimitiveType | "Object" | "Array";
|
|
97
|
+
fields?: FieldDefinition[];
|
|
98
|
+
items?: ArrayItemDefinition;
|
|
99
|
+
options?: FieldOptions;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Zod schema for field definitions using a discriminated union on "type".
|
|
103
|
+
* Supports recursive nesting via z.lazy for Object fields and Array items.
|
|
104
|
+
*/
|
|
105
|
+
declare const fieldDefinitionSchema: z.ZodType<FieldDefinition>;
|
|
106
|
+
/**
|
|
107
|
+
* Zod schema for the complete endpoint definition format.
|
|
108
|
+
*/
|
|
109
|
+
declare const endpointDefinitionSchema: z.ZodObject<{
|
|
110
|
+
version: z.ZodLiteral<"1.0">;
|
|
111
|
+
tableName: z.ZodString;
|
|
112
|
+
catalog: z.ZodString;
|
|
113
|
+
schema: z.ZodString;
|
|
114
|
+
fields: z.ZodArray<z.ZodType<FieldDefinition, unknown, z.core.$ZodTypeInternals<FieldDefinition, unknown>>>;
|
|
115
|
+
mutation: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodObject<{
|
|
116
|
+
loadStrategy: z.ZodEnum<{
|
|
117
|
+
full_load: "full_load";
|
|
118
|
+
full_load_append: "full_load_append";
|
|
119
|
+
append: "append";
|
|
120
|
+
}>;
|
|
121
|
+
basePath: z.ZodString;
|
|
122
|
+
}, z.core.$strip>]>>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
type EndpointDefinitionFormat = z.infer<typeof endpointDefinitionSchema>;
|
|
125
|
+
/**
|
|
126
|
+
* Checks for duplicate field names at the same nesting level within a list of field definitions.
|
|
127
|
+
* Returns an array of objects describing each duplicate found, including the field name and path.
|
|
128
|
+
*/
|
|
129
|
+
declare function findDuplicateFieldNames(fields: FieldDefinition[], path?: string[]): {
|
|
130
|
+
name: string;
|
|
131
|
+
path: string[];
|
|
132
|
+
}[];
|
|
133
|
+
//#endregion
|
|
134
|
+
export { ArrayItemDefinition, EndpointDefinitionFormat, FieldDefinition, FieldOptions, FieldValidation, LoadStrategy, MutationConfig, PrimitiveType, endpointDefinitionSchema, fieldDefinitionSchema, fieldNamePattern, fieldOptionsSchema, fieldValidationSchema, findDuplicateFieldNames, loadStrategies, metadataFieldPattern, mutationConfigSchema, mutationSchema, primitiveTypes };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as e}from"zod";const t=/^[a-zA-Z_][a-zA-Z0-9_]{0,63}$/u,n=/^[a-zA-Z_][a-zA-Z0-9_]{0,127}$/u,r=[`full_load`,`full_load_append`,`append`],i=e.object({loadStrategy:e.enum(r),basePath:e.string().min(1)}),a=e.union([e.literal(!1),i]),o=[`String`,`Integer`,`Float`,`Boolean`,`Date`,`DateTime`],s=e.union([e.object({type:e.literal(`email`)}),e.object({type:e.literal(`url`)}),e.object({type:e.literal(`uuid`)}),e.object({type:e.literal(`min`),value:e.number()}),e.object({type:e.literal(`max`),value:e.number()}),e.object({type:e.literal(`regex`),pattern:e.string()})]),c=e.object({required:e.boolean().optional(),validations:e.array(s).optional()}),l=e.lazy(()=>e.discriminatedUnion(`type`,[e.object({name:e.string().regex(t),type:e.literal(`String`),options:c.optional()}),e.object({name:e.string().regex(t),type:e.literal(`Integer`),options:c.optional()}),e.object({name:e.string().regex(t),type:e.literal(`Float`),options:c.optional()}),e.object({name:e.string().regex(t),type:e.literal(`Boolean`),options:c.optional()}),e.object({name:e.string().regex(t),type:e.literal(`Date`),options:c.optional()}),e.object({name:e.string().regex(t),type:e.literal(`DateTime`),options:c.optional()}),e.object({name:e.string().regex(t),type:e.literal(`Object`),fields:e.array(l).min(1),options:c.optional()}),e.object({name:e.string().regex(t),type:e.literal(`Array`),items:e.union([e.object({type:e.enum(o)}),e.object({type:e.literal(`Object`),fields:e.array(l).min(1)})]),options:c.optional()})])),u=e.object({version:e.literal(`1.0`),tableName:e.string().regex(n),catalog:e.string().regex(n),schema:e.string().regex(n),fields:e.array(l),mutation:a.optional()});function d(e,t=[]){let n=[],r=new Set;for(let i of e)r.has(i.name)?n.push({name:i.name,path:t}):r.add(i.name),i.type===`Object`&&i.fields&&n.push(...d(i.fields,[...t,i.name])),i.type===`Array`&&i.items?.type===`Object`&&i.items.fields&&n.push(...d(i.items.fields,[...t,i.name,`items`]));return n}export{u as endpointDefinitionSchema,l as fieldDefinitionSchema,t as fieldNamePattern,c as fieldOptionsSchema,s as fieldValidationSchema,d as findDuplicateFieldNames,r as loadStrategies,n as metadataFieldPattern,i as mutationConfigSchema,a as mutationSchema,o as primitiveTypes};
|
|
@@ -42,29 +42,52 @@ type FieldDefinitionResponse = {
|
|
|
42
42
|
subModel: JSONSchema7;
|
|
43
43
|
filter: boolean;
|
|
44
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* Parameters for generateModel.
|
|
47
|
+
*/
|
|
48
|
+
interface GenerateModelProps {
|
|
49
|
+
/** The JSON Schema source definition to generate a model from. */
|
|
50
|
+
source: JSONSchema7;
|
|
51
|
+
/** The name of the model being generated. */
|
|
52
|
+
name: string;
|
|
53
|
+
/** The parent model name for nested models. */
|
|
54
|
+
parent?: string;
|
|
55
|
+
/** Accumulated model definitions. */
|
|
56
|
+
models: Record<string, ModelResponse>;
|
|
57
|
+
/** Whether this is the root model definition. */
|
|
58
|
+
isRoot: boolean;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Generates a GraphQL model definition from JSON Schema.
|
|
62
|
+
*/
|
|
45
63
|
declare const generateModel: ({
|
|
46
64
|
source,
|
|
47
65
|
name,
|
|
48
66
|
parent,
|
|
49
67
|
models,
|
|
50
68
|
isRoot
|
|
51
|
-
}:
|
|
52
|
-
|
|
53
|
-
|
|
69
|
+
}: GenerateModelProps) => Record<string, ModelResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* Parameters for generateFieldDefinition.
|
|
72
|
+
*/
|
|
73
|
+
interface GenerateFieldDefinitionProps {
|
|
74
|
+
/** The sanitized field name. */
|
|
75
|
+
fieldName: string;
|
|
76
|
+
/** The original raw field name from the schema. */
|
|
77
|
+
rawFieldName: string;
|
|
78
|
+
/** The JSON Schema definition for this field. */
|
|
79
|
+
fieldDefinition: JSONSchema7;
|
|
80
|
+
/** The parent model name for generating nested type references. */
|
|
54
81
|
parent?: string;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Generates field definitions for a single model property.
|
|
85
|
+
*/
|
|
58
86
|
declare const generateFieldDefinition: ({
|
|
59
87
|
fieldName,
|
|
60
88
|
rawFieldName,
|
|
61
89
|
fieldDefinition,
|
|
62
90
|
parent
|
|
63
|
-
}:
|
|
64
|
-
fieldName: string;
|
|
65
|
-
rawFieldName: string;
|
|
66
|
-
fieldDefinition: JSONSchema7;
|
|
67
|
-
parent?: string;
|
|
68
|
-
}) => FieldDefinitionResponse;
|
|
91
|
+
}: GenerateFieldDefinitionProps) => FieldDefinitionResponse;
|
|
69
92
|
//#endregion
|
|
70
|
-
export { CurrentModelResponse, FieldDefinitionResponse, FilterFieldInput, ModelResponse, generateFieldDefinition, generateModel };
|
|
93
|
+
export { CurrentModelResponse, FieldDefinitionResponse, FilterFieldInput, GenerateFieldDefinitionProps, GenerateModelProps, ModelResponse, generateFieldDefinition, generateModel };
|
package/dist/hive-table.d.mts
CHANGED
|
@@ -13,28 +13,56 @@ type ParquetField = Record<string, string | [string, ParquetField] | [string, {
|
|
|
13
13
|
element: ParquetField;
|
|
14
14
|
};
|
|
15
15
|
}]>;
|
|
16
|
+
/**
|
|
17
|
+
* Parameters for generateSqlSchema.
|
|
18
|
+
*/
|
|
19
|
+
interface GenerateSqlSchemaProps {
|
|
20
|
+
/** The JSON Schema property definitions to generate SQL columns from. */
|
|
21
|
+
definition: Record<string, SchemaDefinition>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Generates SQL column definitions from parsed columns.
|
|
25
|
+
*/
|
|
16
26
|
declare function generateSqlSchema({
|
|
17
27
|
definition
|
|
18
|
-
}:
|
|
19
|
-
|
|
20
|
-
|
|
28
|
+
}: GenerateSqlSchemaProps): SqlFieldDefinition[];
|
|
29
|
+
/**
|
|
30
|
+
* Parameters for parquetTransformer.
|
|
31
|
+
*/
|
|
32
|
+
interface ParquetTransformerProps {
|
|
33
|
+
/** The JSON Schema property definitions to transform for Parquet format. */
|
|
34
|
+
definition: Record<string, JSONSchema7>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Transforms column definitions for Parquet format.
|
|
38
|
+
*/
|
|
21
39
|
declare function parquetTransformer({
|
|
22
40
|
definition
|
|
23
|
-
}:
|
|
24
|
-
|
|
25
|
-
|
|
41
|
+
}: ParquetTransformerProps): ParquetField;
|
|
42
|
+
/**
|
|
43
|
+
* Parameters for generateCreateTableStatement.
|
|
44
|
+
*/
|
|
45
|
+
interface GenerateCreateTableStatementProps {
|
|
46
|
+
/** The Hive schema name. */
|
|
47
|
+
schema: string;
|
|
48
|
+
/** The table name. */
|
|
49
|
+
tableName: string;
|
|
50
|
+
/** The S3 bucket name for external storage. */
|
|
51
|
+
bucketName: string;
|
|
52
|
+
/** The path within the S3 bucket. */
|
|
53
|
+
bucketPath: string;
|
|
54
|
+
/** The JSON Schema property definitions for table columns. */
|
|
55
|
+
definition: Record<string, SchemaDefinition>;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Generates a full CREATE TABLE DDL statement.
|
|
59
|
+
*/
|
|
26
60
|
declare function generateCreateTableStatement({
|
|
27
61
|
schema,
|
|
28
62
|
tableName,
|
|
29
63
|
bucketName,
|
|
30
64
|
bucketPath,
|
|
31
65
|
definition
|
|
32
|
-
}:
|
|
33
|
-
schema: string;
|
|
34
|
-
tableName: string;
|
|
35
|
-
bucketName: string;
|
|
36
|
-
bucketPath: string;
|
|
37
|
-
definition: Record<string, SchemaDefinition>;
|
|
38
|
-
}): string;
|
|
66
|
+
}: GenerateCreateTableStatementProps): string;
|
|
39
67
|
//#endregion
|
|
40
|
-
export { generateCreateTableStatement, generateSqlSchema, parquetTransformer };
|
|
68
|
+
export { GenerateCreateTableStatementProps, GenerateSqlSchemaProps, ParquetTransformerProps, generateCreateTableStatement, generateSqlSchema, parquetTransformer };
|
package/dist/json-schema.d.mts
CHANGED
|
@@ -1,7 +1,24 @@
|
|
|
1
|
+
import { FieldDefinition } from "./endpoint-schema.mjs";
|
|
1
2
|
import { t as JSONSchema7 } from "./index-CGZiTFRE.mjs";
|
|
2
3
|
import { JSONType } from "json-column-parser/lib/common/types/type.common";
|
|
3
4
|
|
|
4
5
|
//#region src/json-schema.d.ts
|
|
5
6
|
declare function generateJsonSchema(parsedColumns: Record<string, JSONType>): JSONSchema7;
|
|
7
|
+
/**
|
|
8
|
+
* Converts an array of FieldDefinitions to a complete JSON Schema Draft-07 document.
|
|
9
|
+
*
|
|
10
|
+
* The root schema has `$schema`, `type: "object"`, `properties`, and `additionalProperties: false`.
|
|
11
|
+
* Each field is recursively mapped according to the type mapping rules:
|
|
12
|
+
* - String → {type: "string"}
|
|
13
|
+
* - Integer → {type: "integer"}
|
|
14
|
+
* - Float → {type: "number"}
|
|
15
|
+
* - Boolean → {type: "boolean"}
|
|
16
|
+
* - Date → {type: "string", format: "date"}
|
|
17
|
+
* - DateTime → {type: "string", format: "date-time"}
|
|
18
|
+
* - Object → {type: "object", properties: {...}, additionalProperties: false}
|
|
19
|
+
* - Array (primitive) → {type: "array", items: {primitive schema}}
|
|
20
|
+
* - Array (object) → {type: "array", items: {type: "object", properties: {...}, additionalProperties: false}}
|
|
21
|
+
*/
|
|
22
|
+
declare function generateJsonSchemaFromFields(fields: FieldDefinition[]): JSONSchema7;
|
|
6
23
|
//#endregion
|
|
7
|
-
export { generateJsonSchema };
|
|
24
|
+
export { generateJsonSchema, generateJsonSchemaFromFields };
|
package/dist/json-schema.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isObject as e}from"@lakeql/helpers/object-helper";import{createRegExp as t,global as n,not as r}from"magic-regexp";function i(e){return{$schema:`https://json-schema.org/draft-07/schema#`,...s(e),additionalProperties:!1}}function a(e){let i=t(r.letter,[n]),a=e.toString().replace(i,``);switch(a){case`varchar`:return{type:`string`};case`decimal`:case`double`:case`float`:return{type:`number`};case`integer`:case`bigint`:return{type:`integer`};case`boolean`:return{type:`boolean`};case`timestamp`:return{format:`date-time`,type:`string`};case`date`:return{format:`date`,type:`string`};default:throw Error(`Type ${a.toString()} is unknown.`)}}function o(t){if(t.length>1)throw Error("We expect that an array has only one element ( e.g. a primitive like `varchar` or an object like `row()`.");if(Array.isArray(t[0]))throw TypeError(`We currently do not support 'array of array'. Feel free to raise an issue.`);if(typeof t[0]==`string`)return{items:a(t[0]),type:`array`};if(e(t[0]))return{items:s(t[0]),type:`array`};throw Error("Unexpected case in `json-generator.handleArray`")}function s(t){let n={additionalProperties:!1,properties:{},type:`object`};for(let[r,i]of Object.entries(t)){if(typeof i==`string`)try{n.properties[r]=a(i)}catch(e){console.log(e)}if(Array.isArray(i))try{n.properties[r]=o(i)}catch(e){console.log(e)}if(e(i))try{n.properties[r]=s(i)}catch(e){console.log(e)}}return n}export{i as generateJsonSchema};
|
|
1
|
+
import{isObject as e}from"@lakeql/helpers/object-helper";import{createRegExp as t,global as n,not as r}from"magic-regexp";function i(e){return{$schema:`https://json-schema.org/draft-07/schema#`,...s(e),additionalProperties:!1}}function a(e){let i=t(r.letter,[n]),a=e.toString().replace(i,``);switch(a){case`varchar`:return{type:`string`};case`decimal`:case`double`:case`float`:return{type:`number`};case`integer`:case`bigint`:return{type:`integer`};case`boolean`:return{type:`boolean`};case`timestamp`:return{format:`date-time`,type:`string`};case`date`:return{format:`date`,type:`string`};default:throw Error(`Type ${a.toString()} is unknown.`)}}function o(t){if(t.length>1)throw Error("We expect that an array has only one element ( e.g. a primitive like `varchar` or an object like `row()`.");if(Array.isArray(t[0]))throw TypeError(`We currently do not support 'array of array'. Feel free to raise an issue.`);if(typeof t[0]==`string`)return{items:a(t[0]),type:`array`};if(e(t[0]))return{items:s(t[0]),type:`array`};throw Error("Unexpected case in `json-generator.handleArray`")}function s(t){let n={additionalProperties:!1,properties:{},type:`object`};for(let[r,i]of Object.entries(t)){if(typeof i==`string`)try{n.properties[r]=a(i)}catch(e){console.log(e)}if(Array.isArray(i))try{n.properties[r]=o(i)}catch(e){console.log(e)}if(e(i))try{n.properties[r]=s(i)}catch(e){console.log(e)}}return n}function c(e){switch(e){case`String`:return{type:`string`};case`Integer`:return{type:`integer`};case`Float`:return{type:`number`};case`Boolean`:return{type:`boolean`};case`Date`:return{type:`string`,format:`date`};case`DateTime`:return{type:`string`,format:`date-time`};default:return{type:`string`}}}function l(e){return e.type===`Object`&&e.fields?{type:`object`,properties:d(e.fields),additionalProperties:!1}:c(e.type)}function u(e){switch(e.type){case`Object`:return{type:`object`,properties:d(e.fields??[]),additionalProperties:!1};case`Array`:return{type:`array`,items:e.items?l(e.items):{type:`string`}};default:return c(e.type)}}function d(e){let t={};for(let n of e)t[n.name]=u(n);return t}function f(e){return{$schema:`https://json-schema.org/draft-07/schema#`,type:`object`,properties:d(e),additionalProperties:!1}}export{i as generateJsonSchema,f as generateJsonSchemaFromFields};
|
package/package.json
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lakeql/schema-generator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Generates GraphQL schemas, Hive table definitions, and JSON schemas from Trino metadata",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"codegen",
|
|
7
|
+
"graphql",
|
|
8
|
+
"hive",
|
|
9
|
+
"json-schema",
|
|
10
|
+
"lakeql",
|
|
11
|
+
"schema"
|
|
12
|
+
],
|
|
4
13
|
"homepage": "https://lakeql.dev",
|
|
5
14
|
"license": "Apache-2.0",
|
|
6
15
|
"author": {
|
|
@@ -24,6 +33,10 @@
|
|
|
24
33
|
"type": "module",
|
|
25
34
|
"sideEffects": false,
|
|
26
35
|
"exports": {
|
|
36
|
+
"./endpoint-schema": {
|
|
37
|
+
"types": "./dist/endpoint-schema.d.mts",
|
|
38
|
+
"import": "./dist/endpoint-schema.mjs"
|
|
39
|
+
},
|
|
27
40
|
"./graphql-schema": {
|
|
28
41
|
"types": "./dist/graphql-schema.d.mts",
|
|
29
42
|
"import": "./dist/graphql-schema.mjs"
|
|
@@ -41,12 +54,14 @@
|
|
|
41
54
|
"kysely": "0.29.2",
|
|
42
55
|
"lodash-es": "4.18.1",
|
|
43
56
|
"magic-regexp": "0.11.0",
|
|
44
|
-
"
|
|
57
|
+
"zod": "4.4.3",
|
|
58
|
+
"@lakeql/helpers": "0.1.2"
|
|
45
59
|
},
|
|
46
60
|
"devDependencies": {
|
|
47
61
|
"@types/json-schema": "7.0.15",
|
|
48
62
|
"@types/lodash-es": "4.17.12",
|
|
49
63
|
"@types/node": "24.13.2",
|
|
64
|
+
"fast-check": "^4.8.0",
|
|
50
65
|
"json-column-parser": "2.0.0",
|
|
51
66
|
"tsdown": "0.22.2",
|
|
52
67
|
"typescript": "6.0.3",
|
|
@@ -59,6 +74,7 @@
|
|
|
59
74
|
"clean:cache": "git clean -xdf .cache .turbo",
|
|
60
75
|
"clean:dist": "git clean -xdf dist",
|
|
61
76
|
"dev": "tsdown --watch",
|
|
77
|
+
"test": "vitest run",
|
|
62
78
|
"typecheck": "tsc --noEmit"
|
|
63
79
|
}
|
|
64
80
|
}
|