adminforth 1.2.71 → 1.2.73

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/basePlugin.ts CHANGED
@@ -27,15 +27,13 @@ export default class AdminForthPlugin implements IAdminForthPlugin {
27
27
 
28
28
  }
29
29
 
30
- // instanceUniqueRepresentation(pluginOptions: any) : string {
31
- // return 'non-uniquely-identified';
32
- // }
30
+ instanceUniqueRepresentation(pluginOptions: any) : string {
31
+ return 'non-uniquely-identified';
32
+ }
33
33
 
34
34
  modifyResourceConfig(adminforth: IAdminForth, resourceConfig: AdminForthResource) {
35
35
 
36
- // check if instanceUniqueRepresentation is implmented (by child class)
37
- //@ts-ignore
38
- const uniqueness = this['instanceUniqueRepresentation'] ? this.instanceUniqueRepresentation(this.pluginOptions) : 'non-uniquely-identified';
36
+ const uniqueness = this.instanceUniqueRepresentation(this.pluginOptions);
39
37
 
40
38
  const seed = `af_pl_${this.constructor.name}_${resourceConfig.resourceId}_${uniqueness}`;
41
39
  this.pluginInstanceId = crypto.createHash('sha256').update(
@@ -13,13 +13,11 @@ export default class AdminForthPlugin {
13
13
  }
14
14
  setupEndpoints(server) {
15
15
  }
16
- // instanceUniqueRepresentation(pluginOptions: any) : string {
17
- // return 'non-uniquely-identified';
18
- // }
16
+ instanceUniqueRepresentation(pluginOptions) {
17
+ return 'non-uniquely-identified';
18
+ }
19
19
  modifyResourceConfig(adminforth, resourceConfig) {
20
- // check if instanceUniqueRepresentation is implmented (by child class)
21
- //@ts-ignore
22
- const uniqueness = this['instanceUniqueRepresentation'] ? this.instanceUniqueRepresentation(this.pluginOptions) : 'non-uniquely-identified';
20
+ const uniqueness = this.instanceUniqueRepresentation(this.pluginOptions);
23
21
  const seed = `af_pl_${this.constructor.name}_${resourceConfig.resourceId}_${uniqueness}`;
24
22
  this.pluginInstanceId = crypto.createHash('sha256').update(seed).digest('hex');
25
23
  process.env.HEAVY_DEBUG && console.log(`🪲 AdminForthPlugin.modifyResourceConfig`, seed, 'id', this.pluginInstanceId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "1.2.71",
3
+ "version": "1.2.73",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -298,7 +298,7 @@ export interface IAdminForthPlugin {
298
298
  * If plugin should support only one installation per resource, option can return 'single'
299
299
  * @param pluginOptions - options of plugin
300
300
  */
301
- instanceUniqueRepresentation?(pluginOptions: any) : string;
301
+ instanceUniqueRepresentation(pluginOptions: any) : string;
302
302
 
303
303
 
304
304
  /**