remult 0.16.0-exp.6 → 0.16.0-exp.7
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/esm/server/expressBridge.js +1 -1
- package/esm/src/context.js +1 -1
- package/esm/src/remult3/RepositoryImplementation.d.ts +1 -1
- package/esm/src/remult3/RepositoryImplementation.js +4 -2
- package/package.json +1 -1
- package/server/expressBridge.js +1 -1
- package/src/context.js +1 -1
- package/src/remult3/RepositoryImplementation.d.ts +1 -1
- package/src/remult3/RepositoryImplementation.js +4 -2
|
@@ -78,7 +78,7 @@ class RemultServerImplementation {
|
|
|
78
78
|
if (r)
|
|
79
79
|
return r;
|
|
80
80
|
else
|
|
81
|
-
throw "remult object was requested outside of a valid context, try running it within initApi or a remult request cycle";
|
|
81
|
+
throw new Error("remult object was requested outside of a valid context, try running it within initApi or a remult request cycle");
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
}
|
package/esm/src/context.js
CHANGED
|
@@ -217,7 +217,7 @@ export class Remult {
|
|
|
217
217
|
static setDefaultHttpProvider(provider) {
|
|
218
218
|
const r = buildRestDataProvider(provider);
|
|
219
219
|
if (!r)
|
|
220
|
-
throw provider + " doesn't
|
|
220
|
+
throw provider + " doesn't match http provider or fetch interface";
|
|
221
221
|
Remult.defaultHttpProvider = r;
|
|
222
222
|
}
|
|
223
223
|
/** sets the current data provider */
|
|
@@ -124,7 +124,7 @@ export declare class rowHelperImplementation<T> extends rowHelperBase<T> impleme
|
|
|
124
124
|
__performColumnAndEntityValidations(): Promise<void>;
|
|
125
125
|
}
|
|
126
126
|
export declare function getFields<fieldsContainerType>(container: fieldsContainerType, remult?: Remult): FieldsRef<fieldsContainerType>;
|
|
127
|
-
export declare function getControllerRef<fieldsContainerType>(container: fieldsContainerType,
|
|
127
|
+
export declare function getControllerRef<fieldsContainerType>(container: fieldsContainerType, remultArg?: Remult): ControllerRef<fieldsContainerType>;
|
|
128
128
|
export declare class controllerRefImpl<T = any> extends rowHelperBase<T> implements ControllerRef<T> {
|
|
129
129
|
constructor(columnsInfo: FieldOptions[], instance: any, remult: Remult);
|
|
130
130
|
__performColumnAndEntityValidations(): Promise<void>;
|
|
@@ -6,6 +6,7 @@ import { v4 as uuid } from 'uuid';
|
|
|
6
6
|
import { ValueConverters } from "../valueConverters";
|
|
7
7
|
import { filterHelper } from "../filter/filter-interfaces";
|
|
8
8
|
import { assign } from "../../assign";
|
|
9
|
+
import { remult } from "../remult-proxy";
|
|
9
10
|
let classValidatorValidate = undefined;
|
|
10
11
|
// import("class-validator".toString())
|
|
11
12
|
// .then((v) => {
|
|
@@ -911,7 +912,8 @@ function prepareColumnInfo(r, remult) {
|
|
|
911
912
|
export function getFields(container, remult) {
|
|
912
913
|
return getControllerRef(container, remult).fields;
|
|
913
914
|
}
|
|
914
|
-
export function getControllerRef(container,
|
|
915
|
+
export function getControllerRef(container, remultArg) {
|
|
916
|
+
const remultVar = remultArg || remult;
|
|
915
917
|
let result = container[controllerColumns];
|
|
916
918
|
if (!result)
|
|
917
919
|
result = container[entityMember];
|
|
@@ -927,7 +929,7 @@ export function getControllerRef(container, remult) {
|
|
|
927
929
|
}
|
|
928
930
|
base = Object.getPrototypeOf(base);
|
|
929
931
|
}
|
|
930
|
-
container[controllerColumns] = result = new controllerRefImpl(prepareColumnInfo(columnSettings,
|
|
932
|
+
container[controllerColumns] = result = new controllerRefImpl(prepareColumnInfo(columnSettings, remultVar), container, remultVar);
|
|
931
933
|
}
|
|
932
934
|
return result;
|
|
933
935
|
}
|
package/package.json
CHANGED
package/server/expressBridge.js
CHANGED
|
@@ -105,7 +105,7 @@ var RemultServerImplementation = /** @class */ (function () {
|
|
|
105
105
|
if (r)
|
|
106
106
|
return r;
|
|
107
107
|
else
|
|
108
|
-
throw "remult object was requested outside of a valid context, try running it within initApi or a remult request cycle";
|
|
108
|
+
throw new Error("remult object was requested outside of a valid context, try running it within initApi or a remult request cycle");
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
}
|
package/src/context.js
CHANGED
|
@@ -309,7 +309,7 @@ var Remult = /** @class */ (function () {
|
|
|
309
309
|
Remult.setDefaultHttpProvider = function (provider) {
|
|
310
310
|
var r = buildRestDataProvider(provider);
|
|
311
311
|
if (!r)
|
|
312
|
-
throw provider + " doesn't
|
|
312
|
+
throw provider + " doesn't match http provider or fetch interface";
|
|
313
313
|
Remult.defaultHttpProvider = r;
|
|
314
314
|
};
|
|
315
315
|
/** sets the current data provider */
|
|
@@ -124,7 +124,7 @@ export declare class rowHelperImplementation<T> extends rowHelperBase<T> impleme
|
|
|
124
124
|
__performColumnAndEntityValidations(): Promise<void>;
|
|
125
125
|
}
|
|
126
126
|
export declare function getFields<fieldsContainerType>(container: fieldsContainerType, remult?: Remult): FieldsRef<fieldsContainerType>;
|
|
127
|
-
export declare function getControllerRef<fieldsContainerType>(container: fieldsContainerType,
|
|
127
|
+
export declare function getControllerRef<fieldsContainerType>(container: fieldsContainerType, remultArg?: Remult): ControllerRef<fieldsContainerType>;
|
|
128
128
|
export declare class controllerRefImpl<T = any> extends rowHelperBase<T> implements ControllerRef<T> {
|
|
129
129
|
constructor(columnsInfo: FieldOptions[], instance: any, remult: Remult);
|
|
130
130
|
__performColumnAndEntityValidations(): Promise<void>;
|
|
@@ -10,6 +10,7 @@ var uuid_1 = require("uuid");
|
|
|
10
10
|
var valueConverters_1 = require("../valueConverters");
|
|
11
11
|
var filter_interfaces_2 = require("../filter/filter-interfaces");
|
|
12
12
|
var assign_1 = require("../../assign");
|
|
13
|
+
var remult_proxy_1 = require("../remult-proxy");
|
|
13
14
|
var classValidatorValidate = undefined;
|
|
14
15
|
// import("class-validator".toString())
|
|
15
16
|
// .then((v) => {
|
|
@@ -1690,7 +1691,8 @@ function getFields(container, remult) {
|
|
|
1690
1691
|
return getControllerRef(container, remult).fields;
|
|
1691
1692
|
}
|
|
1692
1693
|
exports.getFields = getFields;
|
|
1693
|
-
function getControllerRef(container,
|
|
1694
|
+
function getControllerRef(container, remultArg) {
|
|
1695
|
+
var remultVar = remultArg || remult_proxy_1.remult;
|
|
1694
1696
|
var result = container[controllerColumns];
|
|
1695
1697
|
if (!result)
|
|
1696
1698
|
result = container[entityMember];
|
|
@@ -1706,7 +1708,7 @@ function getControllerRef(container, remult) {
|
|
|
1706
1708
|
}
|
|
1707
1709
|
base = Object.getPrototypeOf(base);
|
|
1708
1710
|
}
|
|
1709
|
-
container[controllerColumns] = result = new controllerRefImpl(prepareColumnInfo(columnSettings_1,
|
|
1711
|
+
container[controllerColumns] = result = new controllerRefImpl(prepareColumnInfo(columnSettings_1, remultVar), container, remultVar);
|
|
1710
1712
|
}
|
|
1711
1713
|
return result;
|
|
1712
1714
|
}
|