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;
@@ -0,0 +1,3 @@
1
+ export function isObject(obj) {
2
+ return typeof obj === "object" && obj !== null;
3
+ }
@@ -1,6 +1,6 @@
1
1
  import { DataAccessor } from "../lib/v4/DataAccessor";
2
2
  import { Adminizer } from "../lib/Adminizer";
3
- import { isObject } from "lodash-es";
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);
@@ -1,6 +1,6 @@
1
1
  import { ControllerHelper } from "../../helpers/controllerHelper";
2
2
  import { Adminizer } from "../Adminizer";
3
- import { isObject } from "lodash-es";
3
+ import { isObject } from "helpers/JsUtils";
4
4
  export class DataAccessor {
5
5
  adminizer;
6
6
  user;
@@ -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 {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adminizer",
3
3
  "type": "module",
4
- "version": "4.1.0-build.22",
4
+ "version": "4.1.0-build.23",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "vitest --reporter verbose",