@atscript/moost-db 0.1.119 → 0.1.120
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/index.cjs +11 -11
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +11 -11
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -922,7 +922,7 @@ function normalizeOptions(prefixOrOptions) {
|
|
|
922
922
|
* Builds the shared binding metadata for a decorator invocation: classifies
|
|
923
923
|
* the binding form, computes the static route prefix, and packages a uniform
|
|
924
924
|
* `resolve()` used by both the DI provide factory and the base controller's
|
|
925
|
-
* `super(
|
|
925
|
+
* `super(app)` fallback.
|
|
926
926
|
*/
|
|
927
927
|
function buildBinding(binding, options, decoratorName) {
|
|
928
928
|
if ((0, _atscript_typescript_utils.isAnnotatedType)(binding)) {
|
|
@@ -1041,7 +1041,7 @@ function findReadableBinding(ctor) {
|
|
|
1041
1041
|
*
|
|
1042
1042
|
* Used by {@link AsDbReadableController}'s constructor when `readable` is
|
|
1043
1043
|
* `undefined` — i.e. a subclass with its own constructor called
|
|
1044
|
-
* `super(
|
|
1044
|
+
* `super(app)` instead of forwarding an injected instance.
|
|
1045
1045
|
*/
|
|
1046
1046
|
function resolveBoundReadable(ctor) {
|
|
1047
1047
|
const binding = findReadableBinding(ctor);
|
|
@@ -1096,7 +1096,7 @@ let AsDbReadableController = class AsDbReadableController extends AsReadableCont
|
|
|
1096
1096
|
_quantityRefByPath;
|
|
1097
1097
|
/** Paths the adapter vetoes for filtering (e.g. JSON storage on SQL). Symmetric with `/meta` `filterable: false`. */
|
|
1098
1098
|
_adapterNonFilterable;
|
|
1099
|
-
constructor(
|
|
1099
|
+
constructor(app, readable) {
|
|
1100
1100
|
const resolved = readable ?? resolveBoundReadable(new.target);
|
|
1101
1101
|
super(resolved.type, resolved.tableName, app, resolved.isView ? "view" : "table");
|
|
1102
1102
|
this.readable = resolved;
|
|
@@ -1758,9 +1758,9 @@ __decorate([
|
|
|
1758
1758
|
], AsDbReadableController.prototype, "getOneComposite", null);
|
|
1759
1759
|
AsDbReadableController = __decorate([
|
|
1760
1760
|
(0, moost.Inherit)(),
|
|
1761
|
-
__decorateParam(
|
|
1762
|
-
__decorateParam(
|
|
1763
|
-
__decorateMetadata("design:paramtypes", [
|
|
1761
|
+
__decorateParam(1, (0, moost.Inject)(READABLE_DEF)),
|
|
1762
|
+
__decorateParam(1, (0, moost.Optional)()),
|
|
1763
|
+
__decorateMetadata("design:paramtypes", [typeof moost.Moost === "undefined" ? Object : moost.Moost, Object])
|
|
1764
1764
|
], AsDbReadableController);
|
|
1765
1765
|
registerAsDbReadableController(AsDbReadableController);
|
|
1766
1766
|
//#endregion
|
|
@@ -1793,8 +1793,8 @@ let AsDbController = class AsDbController extends AsDbReadableController {
|
|
|
1793
1793
|
get table() {
|
|
1794
1794
|
return this.readable;
|
|
1795
1795
|
}
|
|
1796
|
-
constructor(
|
|
1797
|
-
super(
|
|
1796
|
+
constructor(app, table) {
|
|
1797
|
+
super(app, table);
|
|
1798
1798
|
}
|
|
1799
1799
|
buildCrud() {
|
|
1800
1800
|
return {
|
|
@@ -1956,9 +1956,9 @@ __decorate([
|
|
|
1956
1956
|
], AsDbController.prototype, "removeComposite", null);
|
|
1957
1957
|
AsDbController = __decorate([
|
|
1958
1958
|
(0, moost.Inherit)(),
|
|
1959
|
-
__decorateParam(
|
|
1960
|
-
__decorateParam(
|
|
1961
|
-
__decorateMetadata("design:paramtypes", [
|
|
1959
|
+
__decorateParam(1, (0, moost.Inject)(TABLE_DEF)),
|
|
1960
|
+
__decorateParam(1, (0, moost.Optional)()),
|
|
1961
|
+
__decorateMetadata("design:paramtypes", [typeof moost.Moost === "undefined" ? Object : moost.Moost, Object])
|
|
1962
1962
|
], AsDbController);
|
|
1963
1963
|
//#endregion
|
|
1964
1964
|
//#region src/as-value-help.controller.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -181,7 +181,7 @@ declare class AsDbReadableController<T extends TAtscriptAnnotatedType = TAtscrip
|
|
|
181
181
|
private readonly _quantityRefByPath;
|
|
182
182
|
/** Paths the adapter vetoes for filtering (e.g. JSON storage on SQL). Symmetric with `/meta` `filterable: false`. */
|
|
183
183
|
private readonly _adapterNonFilterable;
|
|
184
|
-
constructor(
|
|
184
|
+
constructor(app: Moost, readable?: AtscriptDbReadable<T>);
|
|
185
185
|
private _collectAdapterNonFilterable;
|
|
186
186
|
private _collectQuantityRefs;
|
|
187
187
|
private _buildGates;
|
|
@@ -323,7 +323,7 @@ declare class AsDbReadableController<T extends TAtscriptAnnotatedType = TAtscrip
|
|
|
323
323
|
declare class AsDbController<T extends TAtscriptAnnotatedType = TAtscriptAnnotatedType, DataType = TAtscriptDataType<T>> extends AsDbReadableController<T, DataType> {
|
|
324
324
|
/** Reference to the underlying table (typed for write access). */
|
|
325
325
|
protected get table(): AtscriptDbTable<T>;
|
|
326
|
-
constructor(
|
|
326
|
+
constructor(app: Moost, table?: AtscriptDbTable<T>);
|
|
327
327
|
protected buildCrud(): TCrudPermissions$1;
|
|
328
328
|
/**
|
|
329
329
|
* Intercepts write operations. Return `undefined` to abort.
|
|
@@ -699,7 +699,7 @@ declare module "moost" {
|
|
|
699
699
|
* Class-level readable-binding descriptor written by `@TableController` /
|
|
700
700
|
* `@ReadableController` / `@ViewController`. One uniform `resolve()` backs
|
|
701
701
|
* both the DI provide factory and the base controller's
|
|
702
|
-
* `super(
|
|
702
|
+
* `super(app)` fallback; `model` additionally feeds
|
|
703
703
|
* `assertExposed()`.
|
|
704
704
|
*/
|
|
705
705
|
interface TReadableBindingMeta {
|
|
@@ -903,7 +903,7 @@ declare function findReadableBinding(ctor: Function | undefined): TReadableBindi
|
|
|
903
903
|
*
|
|
904
904
|
* Used by {@link AsDbReadableController}'s constructor when `readable` is
|
|
905
905
|
* `undefined` — i.e. a subclass with its own constructor called
|
|
906
|
-
* `super(
|
|
906
|
+
* `super(app)` instead of forwarding an injected instance.
|
|
907
907
|
*/
|
|
908
908
|
declare function resolveBoundReadable(ctor: Function | undefined): AtscriptDbReadable<any>;
|
|
909
909
|
//#endregion
|
package/dist/index.d.mts
CHANGED
|
@@ -181,7 +181,7 @@ declare class AsDbReadableController<T extends TAtscriptAnnotatedType = TAtscrip
|
|
|
181
181
|
private readonly _quantityRefByPath;
|
|
182
182
|
/** Paths the adapter vetoes for filtering (e.g. JSON storage on SQL). Symmetric with `/meta` `filterable: false`. */
|
|
183
183
|
private readonly _adapterNonFilterable;
|
|
184
|
-
constructor(
|
|
184
|
+
constructor(app: Moost, readable?: AtscriptDbReadable<T>);
|
|
185
185
|
private _collectAdapterNonFilterable;
|
|
186
186
|
private _collectQuantityRefs;
|
|
187
187
|
private _buildGates;
|
|
@@ -323,7 +323,7 @@ declare class AsDbReadableController<T extends TAtscriptAnnotatedType = TAtscrip
|
|
|
323
323
|
declare class AsDbController<T extends TAtscriptAnnotatedType = TAtscriptAnnotatedType, DataType = TAtscriptDataType<T>> extends AsDbReadableController<T, DataType> {
|
|
324
324
|
/** Reference to the underlying table (typed for write access). */
|
|
325
325
|
protected get table(): AtscriptDbTable<T>;
|
|
326
|
-
constructor(
|
|
326
|
+
constructor(app: Moost, table?: AtscriptDbTable<T>);
|
|
327
327
|
protected buildCrud(): TCrudPermissions$1;
|
|
328
328
|
/**
|
|
329
329
|
* Intercepts write operations. Return `undefined` to abort.
|
|
@@ -699,7 +699,7 @@ declare module "moost" {
|
|
|
699
699
|
* Class-level readable-binding descriptor written by `@TableController` /
|
|
700
700
|
* `@ReadableController` / `@ViewController`. One uniform `resolve()` backs
|
|
701
701
|
* both the DI provide factory and the base controller's
|
|
702
|
-
* `super(
|
|
702
|
+
* `super(app)` fallback; `model` additionally feeds
|
|
703
703
|
* `assertExposed()`.
|
|
704
704
|
*/
|
|
705
705
|
interface TReadableBindingMeta {
|
|
@@ -903,7 +903,7 @@ declare function findReadableBinding(ctor: Function | undefined): TReadableBindi
|
|
|
903
903
|
*
|
|
904
904
|
* Used by {@link AsDbReadableController}'s constructor when `readable` is
|
|
905
905
|
* `undefined` — i.e. a subclass with its own constructor called
|
|
906
|
-
* `super(
|
|
906
|
+
* `super(app)` instead of forwarding an injected instance.
|
|
907
907
|
*/
|
|
908
908
|
declare function resolveBoundReadable(ctor: Function | undefined): AtscriptDbReadable<any>;
|
|
909
909
|
//#endregion
|
package/dist/index.mjs
CHANGED
|
@@ -921,7 +921,7 @@ function normalizeOptions(prefixOrOptions) {
|
|
|
921
921
|
* Builds the shared binding metadata for a decorator invocation: classifies
|
|
922
922
|
* the binding form, computes the static route prefix, and packages a uniform
|
|
923
923
|
* `resolve()` used by both the DI provide factory and the base controller's
|
|
924
|
-
* `super(
|
|
924
|
+
* `super(app)` fallback.
|
|
925
925
|
*/
|
|
926
926
|
function buildBinding(binding, options, decoratorName) {
|
|
927
927
|
if (isAnnotatedType(binding)) {
|
|
@@ -1040,7 +1040,7 @@ function findReadableBinding(ctor) {
|
|
|
1040
1040
|
*
|
|
1041
1041
|
* Used by {@link AsDbReadableController}'s constructor when `readable` is
|
|
1042
1042
|
* `undefined` — i.e. a subclass with its own constructor called
|
|
1043
|
-
* `super(
|
|
1043
|
+
* `super(app)` instead of forwarding an injected instance.
|
|
1044
1044
|
*/
|
|
1045
1045
|
function resolveBoundReadable(ctor) {
|
|
1046
1046
|
const binding = findReadableBinding(ctor);
|
|
@@ -1095,7 +1095,7 @@ let AsDbReadableController = class AsDbReadableController extends AsReadableCont
|
|
|
1095
1095
|
_quantityRefByPath;
|
|
1096
1096
|
/** Paths the adapter vetoes for filtering (e.g. JSON storage on SQL). Symmetric with `/meta` `filterable: false`. */
|
|
1097
1097
|
_adapterNonFilterable;
|
|
1098
|
-
constructor(
|
|
1098
|
+
constructor(app, readable) {
|
|
1099
1099
|
const resolved = readable ?? resolveBoundReadable(new.target);
|
|
1100
1100
|
super(resolved.type, resolved.tableName, app, resolved.isView ? "view" : "table");
|
|
1101
1101
|
this.readable = resolved;
|
|
@@ -1757,9 +1757,9 @@ __decorate([
|
|
|
1757
1757
|
], AsDbReadableController.prototype, "getOneComposite", null);
|
|
1758
1758
|
AsDbReadableController = __decorate([
|
|
1759
1759
|
Inherit(),
|
|
1760
|
-
__decorateParam(
|
|
1761
|
-
__decorateParam(
|
|
1762
|
-
__decorateMetadata("design:paramtypes", [
|
|
1760
|
+
__decorateParam(1, Inject(READABLE_DEF)),
|
|
1761
|
+
__decorateParam(1, Optional()),
|
|
1762
|
+
__decorateMetadata("design:paramtypes", [typeof Moost === "undefined" ? Object : Moost, Object])
|
|
1763
1763
|
], AsDbReadableController);
|
|
1764
1764
|
registerAsDbReadableController(AsDbReadableController);
|
|
1765
1765
|
//#endregion
|
|
@@ -1792,8 +1792,8 @@ let AsDbController = class AsDbController extends AsDbReadableController {
|
|
|
1792
1792
|
get table() {
|
|
1793
1793
|
return this.readable;
|
|
1794
1794
|
}
|
|
1795
|
-
constructor(
|
|
1796
|
-
super(
|
|
1795
|
+
constructor(app, table) {
|
|
1796
|
+
super(app, table);
|
|
1797
1797
|
}
|
|
1798
1798
|
buildCrud() {
|
|
1799
1799
|
return {
|
|
@@ -1955,9 +1955,9 @@ __decorate([
|
|
|
1955
1955
|
], AsDbController.prototype, "removeComposite", null);
|
|
1956
1956
|
AsDbController = __decorate([
|
|
1957
1957
|
Inherit(),
|
|
1958
|
-
__decorateParam(
|
|
1959
|
-
__decorateParam(
|
|
1960
|
-
__decorateMetadata("design:paramtypes", [
|
|
1958
|
+
__decorateParam(1, Inject(TABLE_DEF)),
|
|
1959
|
+
__decorateParam(1, Optional()),
|
|
1960
|
+
__decorateMetadata("design:paramtypes", [typeof Moost === "undefined" ? Object : Moost, Object])
|
|
1961
1961
|
], AsDbController);
|
|
1962
1962
|
//#endregion
|
|
1963
1963
|
//#region src/as-value-help.controller.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/moost-db",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.120",
|
|
4
4
|
"description": "Generic database controller for Moost with Atscript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"annotations",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@uniqu/url": "^0.1.7",
|
|
47
|
-
"@atscript/db-memory": "^0.1.
|
|
47
|
+
"@atscript/db-memory": "^0.1.120"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@atscript/core": "^0.1.84",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@wooksjs/event-core": "^0.7.20",
|
|
65
65
|
"@wooksjs/http-body": "^0.7.20",
|
|
66
66
|
"moost": "^0.6.32",
|
|
67
|
-
"@atscript/db": "^0.1.
|
|
67
|
+
"@atscript/db": "^0.1.120"
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|
|
70
70
|
"postinstall": "asc -f dts",
|