@zenstackhq/runtime 3.0.0-alpha.2 → 3.0.0-alpha.21
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/{contract-DguafRNB.d.cts → contract-D8U59Syb.d.cts} +971 -785
- package/dist/{contract-DguafRNB.d.ts → contract-D8U59Syb.d.ts} +971 -785
- package/dist/{utils/pg-utils.cjs → helpers.cjs} +8 -16
- package/dist/helpers.cjs.map +1 -0
- package/dist/helpers.d.cts +1 -0
- package/dist/helpers.d.ts +1 -0
- package/dist/helpers.js +6 -0
- package/dist/helpers.js.map +1 -0
- package/dist/index.cjs +1787 -903
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -6
- package/dist/index.d.ts +28 -6
- package/dist/index.js +1758 -879
- package/dist/index.js.map +1 -1
- package/dist/plugins/{policy.cjs → policy/index.cjs} +472 -271
- package/dist/plugins/policy/index.cjs.map +1 -0
- package/dist/plugins/{policy.d.ts → policy/index.d.cts} +2 -4
- package/dist/plugins/{policy.d.cts → policy/index.d.ts} +2 -4
- package/dist/plugins/{policy.js → policy/index.js} +447 -236
- package/dist/plugins/policy/index.js.map +1 -0
- package/dist/plugins/policy/plugin.zmodel +33 -0
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.js.map +1 -1
- package/package.json +27 -49
- package/dist/client.cjs +0 -6094
- package/dist/client.cjs.map +0 -1
- package/dist/client.d.cts +0 -19
- package/dist/client.d.ts +0 -19
- package/dist/client.js +0 -6060
- package/dist/client.js.map +0 -1
- package/dist/plugins/policy.cjs.map +0 -1
- package/dist/plugins/policy.js.map +0 -1
- package/dist/utils/pg-utils.cjs.map +0 -1
- package/dist/utils/pg-utils.d.cts +0 -8
- package/dist/utils/pg-utils.d.ts +0 -8
- package/dist/utils/pg-utils.js +0 -16
- package/dist/utils/pg-utils.js.map +0 -1
- package/dist/utils/sqlite-utils.cjs +0 -55
- package/dist/utils/sqlite-utils.cjs.map +0 -1
- package/dist/utils/sqlite-utils.d.cts +0 -8
- package/dist/utils/sqlite-utils.d.ts +0 -8
- package/dist/utils/sqlite-utils.js +0 -22
- package/dist/utils/sqlite-utils.js.map +0 -1
package/dist/utils/pg-utils.d.ts
DELETED
package/dist/utils/pg-utils.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/utils/pg-utils.ts
|
|
5
|
-
import { Pool } from "pg";
|
|
6
|
-
import { parseIntoClientConfig } from "pg-connection-string";
|
|
7
|
-
function toDialectConfig(url) {
|
|
8
|
-
return {
|
|
9
|
-
pool: new Pool(parseIntoClientConfig(url))
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
__name(toDialectConfig, "toDialectConfig");
|
|
13
|
-
export {
|
|
14
|
-
toDialectConfig
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=pg-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/pg-utils.ts"],"sourcesContent":["import type { PostgresDialectConfig } from 'kysely';\nimport { Pool } from 'pg';\nimport { parseIntoClientConfig } from 'pg-connection-string';\n\n/**\n * Convert a PostgreSQL connection string to a Kysely dialect config.\n */\nexport function toDialectConfig(url: string): PostgresDialectConfig {\n return {\n pool: new Pool(parseIntoClientConfig(url)),\n };\n}\n"],"mappings":";;;;AACA,SAASA,YAAY;AACrB,SAASC,6BAA6B;AAK/B,SAASC,gBAAgBC,KAAW;AACvC,SAAO;IACHC,MAAM,IAAIC,KAAKC,sBAAsBH,GAAAA,CAAAA;EACzC;AACJ;AAJgBD;","names":["Pool","parseIntoClientConfig","toDialectConfig","url","pool","Pool","parseIntoClientConfig"]}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// src/utils/sqlite-utils.ts
|
|
32
|
-
var sqlite_utils_exports = {};
|
|
33
|
-
__export(sqlite_utils_exports, {
|
|
34
|
-
toDialectConfig: () => toDialectConfig
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(sqlite_utils_exports);
|
|
37
|
-
var import_better_sqlite3 = __toESM(require("better-sqlite3"), 1);
|
|
38
|
-
var import_node_path = __toESM(require("path"), 1);
|
|
39
|
-
function toDialectConfig(url, baseDir) {
|
|
40
|
-
if (url === ":memory:") {
|
|
41
|
-
return {
|
|
42
|
-
database: new import_better_sqlite3.default(":memory:")
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
const filePath = import_node_path.default.resolve(baseDir, url);
|
|
46
|
-
return {
|
|
47
|
-
database: new import_better_sqlite3.default(filePath)
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
__name(toDialectConfig, "toDialectConfig");
|
|
51
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
-
0 && (module.exports = {
|
|
53
|
-
toDialectConfig
|
|
54
|
-
});
|
|
55
|
-
//# sourceMappingURL=sqlite-utils.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/sqlite-utils.ts"],"sourcesContent":["import SQLite from 'better-sqlite3';\nimport type { SqliteDialectConfig } from 'kysely';\nimport path from 'node:path';\n\n/**\n * Convert a SQLite connection string to a Kysely dialect config.\n */\nexport function toDialectConfig(\n url: string,\n baseDir: string\n): SqliteDialectConfig {\n if (url === ':memory:') {\n return {\n database: new SQLite(':memory:'),\n };\n }\n const filePath = path.resolve(baseDir, url);\n return {\n database: new SQLite(filePath),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;4BAAmB;AAEnB,uBAAiB;AAKV,SAASA,gBACZC,KACAC,SAAe;AAEf,MAAID,QAAQ,YAAY;AACpB,WAAO;MACHE,UAAU,IAAIC,sBAAAA,QAAO,UAAA;IACzB;EACJ;AACA,QAAMC,WAAWC,iBAAAA,QAAKC,QAAQL,SAASD,GAAAA;AACvC,SAAO;IACHE,UAAU,IAAIC,sBAAAA,QAAOC,QAAAA;EACzB;AACJ;AAbgBL;","names":["toDialectConfig","url","baseDir","database","SQLite","filePath","path","resolve"]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/utils/sqlite-utils.ts
|
|
5
|
-
import SQLite from "better-sqlite3";
|
|
6
|
-
import path from "node:path";
|
|
7
|
-
function toDialectConfig(url, baseDir) {
|
|
8
|
-
if (url === ":memory:") {
|
|
9
|
-
return {
|
|
10
|
-
database: new SQLite(":memory:")
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
const filePath = path.resolve(baseDir, url);
|
|
14
|
-
return {
|
|
15
|
-
database: new SQLite(filePath)
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
__name(toDialectConfig, "toDialectConfig");
|
|
19
|
-
export {
|
|
20
|
-
toDialectConfig
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=sqlite-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/sqlite-utils.ts"],"sourcesContent":["import SQLite from 'better-sqlite3';\nimport type { SqliteDialectConfig } from 'kysely';\nimport path from 'node:path';\n\n/**\n * Convert a SQLite connection string to a Kysely dialect config.\n */\nexport function toDialectConfig(\n url: string,\n baseDir: string\n): SqliteDialectConfig {\n if (url === ':memory:') {\n return {\n database: new SQLite(':memory:'),\n };\n }\n const filePath = path.resolve(baseDir, url);\n return {\n database: new SQLite(filePath),\n };\n}\n"],"mappings":";;;;AAAA,OAAOA,YAAY;AAEnB,OAAOC,UAAU;AAKV,SAASC,gBACZC,KACAC,SAAe;AAEf,MAAID,QAAQ,YAAY;AACpB,WAAO;MACHE,UAAU,IAAIC,OAAO,UAAA;IACzB;EACJ;AACA,QAAMC,WAAWC,KAAKC,QAAQL,SAASD,GAAAA;AACvC,SAAO;IACHE,UAAU,IAAIC,OAAOC,QAAAA;EACzB;AACJ;AAbgBL;","names":["SQLite","path","toDialectConfig","url","baseDir","database","SQLite","filePath","path","resolve"]}
|