@zenstackhq/sdk 3.0.0-alpha.1 → 3.0.0-alpha.11

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/schema.d.cts CHANGED
@@ -47,7 +47,6 @@ type BinaryOperator = '&&' | '||' | '==' | '!=' | '<' | '<=' | '>' | '>=' | '?'
47
47
  type DataSourceProviderType = 'sqlite' | 'postgresql';
48
48
  type DataSourceProvider = {
49
49
  type: DataSourceProviderType;
50
- dialectConfigProvider: () => object;
51
50
  };
52
51
  type SchemaDef = {
53
52
  provider: DataSourceProvider;
@@ -89,7 +88,7 @@ type FieldDef = {
89
88
  unique?: boolean;
90
89
  updatedAt?: boolean;
91
90
  attributes?: AttributeApplication[];
92
- default?: MappedBuiltinType | Expression;
91
+ default?: MappedBuiltinType | Expression | unknown[];
93
92
  relation?: RelationInfo;
94
93
  foreignKeyFor?: string[];
95
94
  computed?: boolean;
@@ -104,7 +103,7 @@ type ProcedureDef = {
104
103
  returnType: string;
105
104
  mutation?: boolean;
106
105
  };
107
- type BuiltinType = 'String' | 'Boolean' | 'Int' | 'Float' | 'BigInt' | 'Decimal' | 'DateTime' | 'Bytes';
106
+ type BuiltinType = 'String' | 'Boolean' | 'Int' | 'Float' | 'BigInt' | 'Decimal' | 'DateTime' | 'Bytes' | 'Json' | 'Unsupported';
108
107
  type MappedBuiltinType = string | boolean | number | bigint | Decimal | Date;
109
108
  type EnumDef = Record<string, string>;
110
109
  type GetModels<Schema extends SchemaDef> = Extract<keyof Schema['models'], string>;
package/dist/schema.d.ts CHANGED
@@ -47,7 +47,6 @@ type BinaryOperator = '&&' | '||' | '==' | '!=' | '<' | '<=' | '>' | '>=' | '?'
47
47
  type DataSourceProviderType = 'sqlite' | 'postgresql';
48
48
  type DataSourceProvider = {
49
49
  type: DataSourceProviderType;
50
- dialectConfigProvider: () => object;
51
50
  };
52
51
  type SchemaDef = {
53
52
  provider: DataSourceProvider;
@@ -89,7 +88,7 @@ type FieldDef = {
89
88
  unique?: boolean;
90
89
  updatedAt?: boolean;
91
90
  attributes?: AttributeApplication[];
92
- default?: MappedBuiltinType | Expression;
91
+ default?: MappedBuiltinType | Expression | unknown[];
93
92
  relation?: RelationInfo;
94
93
  foreignKeyFor?: string[];
95
94
  computed?: boolean;
@@ -104,7 +103,7 @@ type ProcedureDef = {
104
103
  returnType: string;
105
104
  mutation?: boolean;
106
105
  };
107
- type BuiltinType = 'String' | 'Boolean' | 'Int' | 'Float' | 'BigInt' | 'Decimal' | 'DateTime' | 'Bytes';
106
+ type BuiltinType = 'String' | 'Boolean' | 'Int' | 'Float' | 'BigInt' | 'Decimal' | 'DateTime' | 'Bytes' | 'Json' | 'Unsupported';
108
107
  type MappedBuiltinType = string | boolean | number | bigint | Decimal | Date;
109
108
  type EnumDef = Record<string, string>;
110
109
  type GetModels<Schema extends SchemaDef> = Extract<keyof Schema['models'], string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenstackhq/sdk",
3
- "version": "3.0.0-alpha.1",
3
+ "version": "3.0.0-alpha.11",
4
4
  "description": "ZenStack SDK",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -32,24 +32,22 @@
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
- "langium": "~3.3.0",
36
- "tiny-invariant": "^1.3.3",
37
- "tmp": "^0.2.3",
38
- "ts-pattern": "^5.7.0",
39
- "typescript": "^5.8.3",
40
- "@zenstackhq/language": "3.0.0-alpha.1"
35
+ "langium": "3.5.0",
36
+ "ts-pattern": "^5.7.1",
37
+ "typescript": "^5.0.0",
38
+ "@zenstackhq/language": "3.0.0-alpha.11",
39
+ "@zenstackhq/common-helpers": "3.0.0-alpha.11"
41
40
  },
42
41
  "devDependencies": {
43
- "@types/node": "^20.0.0",
44
- "@types/tmp": "^0.2.6",
45
42
  "decimal.js": "^10.4.3",
46
- "kysely": "^0.27.6"
43
+ "kysely": "^0.27.6",
44
+ "@zenstackhq/eslint-config": "3.0.0-alpha.11",
45
+ "@zenstackhq/typescript-config": "3.0.0-alpha.11"
47
46
  },
48
47
  "scripts": {
49
48
  "build": "tsup-node",
50
49
  "watch": "tsup-node --watch",
51
50
  "lint": "eslint src --ext ts",
52
- "test": "vitest",
53
51
  "pack": "pnpm pack"
54
52
  }
55
53
  }