adminizer 4.1.0-build.22 → 4.1.0-build.23
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isObject(obj: unknown): obj is object;
|
package/helpers/fieldsHelper.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataAccessor } from "../lib/v4/DataAccessor";
|
|
2
2
|
import { Adminizer } from "../lib/Adminizer";
|
|
3
|
-
import { isObject } from "
|
|
3
|
+
import { isObject } from "./JsUtils";
|
|
4
4
|
export class FieldsHelper {
|
|
5
5
|
/**
|
|
6
6
|
* Load list of records for all associations into `fields`
|
package/lib/Adminizer.js
CHANGED
|
@@ -126,11 +126,13 @@ export class Adminizer {
|
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
128
|
this.modelHandler = new ModelHandler();
|
|
129
|
+
// TODO: 'hot reload' unbind models & unbind forms
|
|
129
130
|
await bindModels(this);
|
|
130
131
|
await bindForms(this);
|
|
131
132
|
this.config.rootPath = path.resolve(import.meta.dirname + "/..");
|
|
132
133
|
this.policyManager = new PolicyManager(this);
|
|
133
134
|
await this.policyManager.loadPolicies();
|
|
135
|
+
// TODO: 'hot reload' problem with deleting access right tokens
|
|
134
136
|
this.accessRightsHelper = new AccessRightsHelper(this);
|
|
135
137
|
// Helpers go to construtor
|
|
136
138
|
this.configHelper = new ConfigHelper(this);
|
package/lib/v4/DataAccessor.js
CHANGED
|
@@ -9,6 +9,7 @@ export class ModelHandler {
|
|
|
9
9
|
this.models.set(modelname, modelInstance);
|
|
10
10
|
Adminizer.log.debug(`Model with name [${modelname}] was registered`);
|
|
11
11
|
}
|
|
12
|
+
// TODO: 'hot reload' need add method for delete model
|
|
12
13
|
/** Improved model getter, so you can write both model.get("UserAP") and model.get("userap") */
|
|
13
14
|
get model() {
|
|
14
15
|
return {
|