@atscript/db 0.1.39 → 0.1.40
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/README.md +18 -18
- package/dist/agg.cjs +8 -3
- package/dist/agg.d.cts +7 -0
- package/dist/agg.d.mts +7 -0
- package/dist/agg.mjs +7 -3
- package/dist/control-DRgryKeg.cjs +14 -0
- package/dist/{control_as-bjmwe24C.mjs → control-IANbnfjG.mjs} +6 -18
- package/dist/db-readable-BQQzfguJ.d.cts +1249 -0
- package/dist/db-readable-Bbr4CjMb.d.mts +1249 -0
- package/dist/db-space-BUrQ5BFm.d.mts +309 -0
- package/dist/db-space-Vxpcnyt5.d.cts +309 -0
- package/dist/db-validator-plugin-07kDiis2.d.cts +22 -0
- package/dist/db-validator-plugin-CiqsHTI_.d.mts +22 -0
- package/dist/db-view-BntnAmXO.cjs +3071 -0
- package/dist/db-view-ZsoN91-q.mjs +2970 -0
- package/dist/index.cjs +95 -2801
- package/dist/index.d.cts +137 -0
- package/dist/index.d.mts +137 -0
- package/dist/index.mjs +55 -2761
- package/dist/{nested-writer-BkqL7cp3.cjs → nested-writer-BDXsDMPP.cjs} +196 -150
- package/dist/{nested-writer-NEN51mnR.mjs → nested-writer-Dmm1gbZV.mjs} +118 -70
- package/dist/ops-BdRAFLKY.d.mts +67 -0
- package/dist/ops-DXJ4Zw0P.d.cts +67 -0
- package/dist/ops.cjs +123 -0
- package/dist/ops.d.cts +2 -0
- package/dist/ops.d.mts +2 -0
- package/dist/ops.mjs +112 -0
- package/dist/plugin.cjs +90 -109
- package/dist/plugin.d.cts +6 -0
- package/dist/plugin.d.mts +6 -0
- package/dist/plugin.mjs +29 -49
- package/dist/rel.cjs +20 -20
- package/dist/rel.d.cts +119 -0
- package/dist/rel.d.mts +119 -0
- package/dist/rel.mjs +4 -5
- package/dist/{relation-helpers-guFL_oRf.cjs → relation-helpers-BYvsE1tR.cjs} +26 -22
- package/dist/{relation-helpers-DyBIlQnB.mjs → relation-helpers-CLasawQq.mjs} +11 -6
- package/dist/{relation-loader-Dv7qXYq7.mjs → relation-loader-BEOTXNcq.mjs} +63 -43
- package/dist/{relation-loader-CpnDRf9k.cjs → relation-loader-CRC5LcqM.cjs} +74 -49
- package/dist/shared.cjs +13 -13
- package/dist/{shared.d.ts → shared.d.cts} +14 -13
- package/dist/shared.d.mts +71 -0
- package/dist/shared.mjs +2 -3
- package/dist/sync.cjs +300 -252
- package/dist/sync.d.cts +369 -0
- package/dist/sync.d.mts +369 -0
- package/dist/sync.mjs +284 -233
- package/dist/{validation-utils-DEoCMmEb.cjs → validation-utils-DVJDijnB.cjs} +141 -109
- package/dist/{validation-utils-DhR_mtKa.mjs → validation-utils-DhjIjP1-.mjs} +71 -37
- package/package.json +30 -29
- package/LICENSE +0 -21
- package/dist/agg-BJFJ3dFQ.mjs +0 -8
- package/dist/agg-DnUWAOK8.cjs +0 -14
- package/dist/agg.d.ts +0 -13
- package/dist/chunk-CrpGerW8.cjs +0 -31
- package/dist/control_as-BFPERAF_.cjs +0 -28
- package/dist/index.d.ts +0 -1706
- package/dist/logger-B7oxCfLQ.mjs +0 -12
- package/dist/logger-Dt2v_-wb.cjs +0 -18
- package/dist/plugin.d.ts +0 -5
- package/dist/rel.d.ts +0 -1305
- package/dist/relation-loader-D4mTw6yH.cjs +0 -4
- package/dist/relation-loader-Ggy1ujwR.mjs +0 -4
- package/dist/sync.d.ts +0 -1878
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/db",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.40",
|
|
4
4
|
"description": "Database adapter utilities for atscript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
7
7
|
"database",
|
|
8
8
|
"utils"
|
|
9
9
|
],
|
|
10
|
-
"homepage": "https://github.com/moostjs/atscript/tree/main/packages/db#readme",
|
|
10
|
+
"homepage": "https://github.com/moostjs/atscript-db/tree/main/packages/db#readme",
|
|
11
11
|
"bugs": {
|
|
12
|
-
"url": "https://github.com/moostjs/atscript/issues"
|
|
12
|
+
"url": "https://github.com/moostjs/atscript-db/issues"
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"author": "Artem Maltsev",
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
|
-
"url": "git+https://github.com/moostjs/atscript.git",
|
|
18
|
+
"url": "git+https://github.com/moostjs/atscript-db.git",
|
|
19
19
|
"directory": "packages/db"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
@@ -23,59 +23,60 @@
|
|
|
23
23
|
],
|
|
24
24
|
"type": "module",
|
|
25
25
|
"main": "dist/index.mjs",
|
|
26
|
-
"types": "dist/index.d.
|
|
26
|
+
"types": "dist/index.d.mts",
|
|
27
27
|
"exports": {
|
|
28
28
|
".": {
|
|
29
|
-
"types": "./dist/index.d.
|
|
29
|
+
"types": "./dist/index.d.mts",
|
|
30
30
|
"import": "./dist/index.mjs",
|
|
31
31
|
"require": "./dist/index.cjs"
|
|
32
32
|
},
|
|
33
33
|
"./sync": {
|
|
34
|
-
"types": "./dist/sync.d.
|
|
34
|
+
"types": "./dist/sync.d.mts",
|
|
35
35
|
"import": "./dist/sync.mjs",
|
|
36
36
|
"require": "./dist/sync.cjs"
|
|
37
37
|
},
|
|
38
38
|
"./plugin": {
|
|
39
|
-
"types": "./dist/plugin.d.
|
|
39
|
+
"types": "./dist/plugin.d.mts",
|
|
40
40
|
"import": "./dist/plugin.mjs"
|
|
41
41
|
},
|
|
42
42
|
"./rel": {
|
|
43
|
-
"types": "./dist/rel.d.
|
|
43
|
+
"types": "./dist/rel.d.mts",
|
|
44
44
|
"import": "./dist/rel.mjs"
|
|
45
45
|
},
|
|
46
46
|
"./agg": {
|
|
47
|
-
"types": "./dist/agg.d.
|
|
47
|
+
"types": "./dist/agg.d.mts",
|
|
48
48
|
"import": "./dist/agg.mjs"
|
|
49
49
|
},
|
|
50
50
|
"./shared": {
|
|
51
|
-
"types": "./dist/shared.d.
|
|
51
|
+
"types": "./dist/shared.d.mts",
|
|
52
52
|
"import": "./dist/shared.mjs"
|
|
53
53
|
},
|
|
54
|
+
"./ops": {
|
|
55
|
+
"types": "./dist/ops.d.mts",
|
|
56
|
+
"import": "./dist/ops.mjs",
|
|
57
|
+
"require": "./dist/ops.cjs"
|
|
58
|
+
},
|
|
54
59
|
"./package.json": "./package.json"
|
|
55
60
|
},
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"src/index.ts",
|
|
60
|
-
"src/sync.ts",
|
|
61
|
-
"src/plugin.ts",
|
|
62
|
-
"src/rel.ts",
|
|
63
|
-
"src/agg.ts",
|
|
64
|
-
"src/shared.ts"
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
],
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public"
|
|
63
|
+
},
|
|
68
64
|
"devDependencies": {
|
|
69
|
-
"
|
|
65
|
+
"@atscript/core": "^0.1.39",
|
|
66
|
+
"@atscript/typescript": "^0.1.39",
|
|
67
|
+
"@uniqu/core": "^0.1.2",
|
|
68
|
+
"unplugin-atscript": "^0.1.39"
|
|
70
69
|
},
|
|
71
70
|
"peerDependencies": {
|
|
72
|
-
"@uniqu/core": "^0.1.2",
|
|
73
71
|
"@atscript/core": "^0.1.39",
|
|
74
|
-
"@atscript/typescript": "^0.1.39"
|
|
72
|
+
"@atscript/typescript": "^0.1.39",
|
|
73
|
+
"@uniqu/core": "^0.1.2"
|
|
75
74
|
},
|
|
76
75
|
"scripts": {
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
76
|
+
"postinstall": "asc -f dts",
|
|
77
|
+
"build": "vp pack",
|
|
78
|
+
"dev": "vp pack --watch",
|
|
79
|
+
"test": "vp test",
|
|
80
|
+
"check": "vp check"
|
|
80
81
|
}
|
|
81
82
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025-present Artem Maltsev
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/dist/agg-BJFJ3dFQ.mjs
DELETED
package/dist/agg-DnUWAOK8.cjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
//#region packages/db/src/agg.ts
|
|
4
|
-
function resolveAlias(expr) {
|
|
5
|
-
return expr.$as ?? `${expr.$fn}_${expr.$field}`;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
//#endregion
|
|
9
|
-
Object.defineProperty(exports, 'resolveAlias', {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () {
|
|
12
|
-
return resolveAlias;
|
|
13
|
-
}
|
|
14
|
-
});
|
package/dist/agg.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AggregateExpr } from '@uniqu/core';
|
|
2
|
-
export { AggregateControls, AggregateExpr, AggregateFn, AggregateQuery, AggregateResult } from '@uniqu/core';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Aggregation runtime utilities.
|
|
6
|
-
* Re-exports types and helpers that adapter implementations need
|
|
7
|
-
* when implementing BaseDbAdapter.aggregate().
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/** Resolves output alias: $as if provided, otherwise `{fn}_{field}`. */
|
|
11
|
-
declare function resolveAlias(expr: AggregateExpr): string;
|
|
12
|
-
|
|
13
|
-
export { resolveAlias };
|
package/dist/chunk-CrpGerW8.cjs
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
//#region rolldown:runtime
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
-
key = keys[i];
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
-
get: ((k) => from[k]).bind(null, key),
|
|
14
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
-
value: mod,
|
|
21
|
-
enumerable: true
|
|
22
|
-
}) : target, mod));
|
|
23
|
-
|
|
24
|
-
//#endregion
|
|
25
|
-
|
|
26
|
-
Object.defineProperty(exports, '__toESM', {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
get: function () {
|
|
29
|
-
return __toESM;
|
|
30
|
-
}
|
|
31
|
-
});
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const require_chunk = require('./chunk-CrpGerW8.cjs');
|
|
3
|
-
const __atscript_typescript_utils = require_chunk.__toESM(require("@atscript/typescript/utils"));
|
|
4
|
-
|
|
5
|
-
//#region packages/db/src/schema/control.as.js
|
|
6
|
-
function _define_property(obj, key, value) {
|
|
7
|
-
if (key in obj) Object.defineProperty(obj, key, {
|
|
8
|
-
value,
|
|
9
|
-
enumerable: true,
|
|
10
|
-
configurable: true,
|
|
11
|
-
writable: true
|
|
12
|
-
});
|
|
13
|
-
else obj[key] = value;
|
|
14
|
-
return obj;
|
|
15
|
-
}
|
|
16
|
-
var AtscriptControl = class {
|
|
17
|
-
static toJsonSchema() {
|
|
18
|
-
(0, __atscript_typescript_utils.throwFeatureDisabled)("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
_define_property(AtscriptControl, "__is_atscript_annotated_type", true);
|
|
22
|
-
_define_property(AtscriptControl, "type", {});
|
|
23
|
-
_define_property(AtscriptControl, "metadata", new Map());
|
|
24
|
-
_define_property(AtscriptControl, "id", "AtscriptControl");
|
|
25
|
-
(0, __atscript_typescript_utils.defineAnnotatedType)("object", AtscriptControl).prop("_id", (0, __atscript_typescript_utils.defineAnnotatedType)().designType("string").tags("string").annotate("meta.id", true).$type).prop("value", (0, __atscript_typescript_utils.defineAnnotatedType)().designType("string").tags("string").optional().$type).prop("lockedBy", (0, __atscript_typescript_utils.defineAnnotatedType)().designType("string").tags("string").optional().$type).prop("lockedAt", (0, __atscript_typescript_utils.defineAnnotatedType)().designType("number").tags("number").optional().$type).prop("expiresAt", (0, __atscript_typescript_utils.defineAnnotatedType)().designType("number").tags("number").optional().$type).annotate("db.table", "__atscript_control");
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
exports.AtscriptControl = AtscriptControl
|