@fjell/registry 4.4.4 → 4.4.5

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/Instance.cjs CHANGED
@@ -5,18 +5,18 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
5
  const logger$1 = require('./logger.cjs');
6
6
 
7
7
  const logger = logger$1.default.get("Instance");
8
- const createInstance = (definition, registry)=>{
8
+ const createInstance = (coordinate, registry)=>{
9
9
  logger.debug("createInstance", {
10
- definition,
10
+ coordinate,
11
11
  registry
12
12
  });
13
13
  return {
14
- definition,
14
+ coordinate,
15
15
  registry
16
16
  };
17
17
  };
18
18
  const isInstance = (instance)=>{
19
- return instance !== null && instance !== undefined && instance.definition !== undefined && instance.registry !== undefined;
19
+ return instance !== null && instance !== undefined && instance.coordinate !== undefined && instance.registry !== undefined;
20
20
  };
21
21
 
22
22
  exports.createInstance = createInstance;
@@ -1,5 +1,5 @@
1
- import { Definition } from './Definition';
2
1
  import { Registry } from './Registry';
2
+ import { Coordinate } from './Coordinate';
3
3
  /**
4
4
  * The Instance interface represents a data model instance that provides access to both its structure
5
5
  * and operations. It serves as the main interface for interacting with data models in the system.
@@ -17,10 +17,9 @@ import { Registry } from './Registry';
17
17
  * @template L1-L5 - Optional string literal types for location hierarchy levels
18
18
  */
19
19
  export interface Instance<S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never> {
20
- /** The definition object that describes the structure and relationships of the data model */
21
- definition: Definition<S, L1, L2, L3, L4, L5>;
20
+ coordinate: Coordinate<S, L1, L2, L3, L4, L5>;
22
21
  /** The registry object that manages the registration and lookup of model instances */
23
22
  registry: Registry;
24
23
  }
25
- export declare const createInstance: <S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(definition: Definition<S, L1, L2, L3, L4, L5>, registry: Registry) => Instance<S, L1, L2, L3, L4, L5>;
24
+ export declare const createInstance: <S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(coordinate: Coordinate<S, L1, L2, L3, L4, L5>, registry: Registry) => Instance<S, L1, L2, L3, L4, L5>;
26
25
  export declare const isInstance: (instance: any) => instance is Instance<any, any, any, any, any, any>;
package/dist/Instance.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import LibLogger from './logger.js';
2
2
 
3
3
  const logger = LibLogger.get("Instance");
4
- const createInstance = (definition, registry)=>{
4
+ const createInstance = (coordinate, registry)=>{
5
5
  logger.debug("createInstance", {
6
- definition,
6
+ coordinate,
7
7
  registry
8
8
  });
9
9
  return {
10
- definition,
10
+ coordinate,
11
11
  registry
12
12
  };
13
13
  };
14
14
  const isInstance = (instance)=>{
15
- return instance !== null && instance !== undefined && instance.definition !== undefined && instance.registry !== undefined;
15
+ return instance !== null && instance !== undefined && instance.coordinate !== undefined && instance.registry !== undefined;
16
16
  };
17
17
 
18
18
  export { createInstance, isInstance };
package/dist/index.cjs CHANGED
@@ -6,16 +6,16 @@ const Logging = require('@fjell/logging');
6
6
 
7
7
  const LibLogger = Logging.getLogger('@fjell/registry');
8
8
 
9
- const logger$3 = LibLogger.get("Coordinate");
9
+ const logger$2 = LibLogger.get("Coordinate");
10
10
  const createCoordinate = (kta, scopes)=>{
11
11
  const toString = ()=>{
12
- logger$3.debug("toString", {
12
+ logger$2.debug("toString", {
13
13
  kta,
14
14
  scopes
15
15
  });
16
16
  return `${kta.join(', ')} - ${scopes.join(', ')}`;
17
17
  };
18
- logger$3.debug("createCoordinate", {
18
+ logger$2.debug("createCoordinate", {
19
19
  kta,
20
20
  scopes,
21
21
  toString
@@ -27,29 +27,19 @@ const createCoordinate = (kta, scopes)=>{
27
27
  };
28
28
  };
29
29
 
30
- const logger$2 = LibLogger.get("Definition");
31
- const createDefinition = (coordinate)=>{
32
- logger$2.debug("createDefinition", {
33
- coordinate
34
- });
35
- return {
36
- coordinate
37
- };
38
- };
39
-
40
30
  const logger$1 = LibLogger.get("Instance");
41
- const createInstance = (definition, registry)=>{
31
+ const createInstance = (coordinate, registry)=>{
42
32
  logger$1.debug("createInstance", {
43
- definition,
33
+ coordinate,
44
34
  registry
45
35
  });
46
36
  return {
47
- definition,
37
+ coordinate,
48
38
  registry
49
39
  };
50
40
  };
51
41
  const isInstance = (instance)=>{
52
- return instance !== null && instance !== undefined && instance.definition !== undefined && instance.registry !== undefined;
42
+ return instance !== null && instance !== undefined && instance.coordinate !== undefined && instance.registry !== undefined;
53
43
  };
54
44
 
55
45
  const logger = LibLogger.get("Registry");
@@ -165,7 +155,6 @@ const createRegistry = ()=>{
165
155
  };
166
156
 
167
157
  exports.createCoordinate = createCoordinate;
168
- exports.createDefinition = createDefinition;
169
158
  exports.createInstance = createInstance;
170
159
  exports.createRegistry = createRegistry;
171
160
  exports.isInstance = isInstance;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  export * from './Coordinate';
2
- export * from './Definition';
3
2
  export * from './Instance';
4
3
  export * from './Registry';
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  export { createCoordinate } from './Coordinate.js';
2
- export { createDefinition } from './Definition.js';
3
2
  export { createInstance, isInstance } from './Instance.js';
4
3
  export { createRegistry } from './Registry.js';
5
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7In0=
4
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzsifQ==
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fjell/registry",
3
- "version": "4.4.4",
3
+ "version": "4.4.5",
4
4
  "keywords": [
5
5
  "registry",
6
6
  "fjell"
@@ -1,18 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const logger$1 = require('./logger.cjs');
6
-
7
- const logger = logger$1.default.get("Definition");
8
- const createDefinition = (coordinate)=>{
9
- logger.debug("createDefinition", {
10
- coordinate
11
- });
12
- return {
13
- coordinate
14
- };
15
- };
16
-
17
- exports.createDefinition = createDefinition;
18
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGVmaW5pdGlvbi5janMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7In0=
@@ -1,5 +0,0 @@
1
- import { Coordinate } from './Coordinate';
2
- export interface Definition<S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never> {
3
- coordinate: Coordinate<S, L1, L2, L3, L4, L5>;
4
- }
5
- export declare const createDefinition: <S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(coordinate: Coordinate<S, L1, L2, L3, L4, L5>) => Definition<S, L1, L2, L3, L4, L5>;
@@ -1,14 +0,0 @@
1
- import LibLogger from './logger.js';
2
-
3
- const logger = LibLogger.get("Definition");
4
- const createDefinition = (coordinate)=>{
5
- logger.debug("createDefinition", {
6
- coordinate
7
- });
8
- return {
9
- coordinate
10
- };
11
- };
12
-
13
- export { createDefinition };
14
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGVmaW5pdGlvbi5qcyIsInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W10sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7OyJ9