pacc 10.0.0 → 10.0.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pacc",
3
- "version": "10.0.0",
3
+ "version": "10.0.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "devDependencies": {
45
45
  "@mitata/counters": "^0.0.8",
46
- "aggregated-map": "^1.0.4",
46
+ "aggregated-map": "^1.0.5",
47
47
  "ava": "^8.0.1",
48
48
  "browser-ava": "^2.3.62",
49
49
  "c8": "^11.0.0",
@@ -5,7 +5,7 @@ import { types } from "./types.mjs";
5
5
  *
6
6
  * @property {string} name
7
7
  * @property {object} type
8
- * @property {boolean} isKey
8
+ * @property {boolean} key
9
9
  * @property {boolean} writable
10
10
  * @property {boolean} mandatory
11
11
  * @property {boolean} collection are we a collection (set, map, array, object)
@@ -41,7 +41,7 @@ export const default_attribute = {
41
41
  persistent: false,
42
42
  private: false,
43
43
  credential: false,
44
- isKey: false
44
+ key: false
45
45
  };
46
46
 
47
47
  /**
@@ -101,7 +101,7 @@ export const string_set_attribute_writable = {
101
101
  export const name_attribute = {
102
102
  ...default_attribute,
103
103
  name: "name",
104
- isKey: true
104
+ key: true
105
105
  };
106
106
 
107
107
  /**
@@ -240,7 +240,7 @@ export const empty_attribute = { ...boolean_attribute, name: "empty" };
240
240
  export const uuid_attribute = {
241
241
  ...default_attribute,
242
242
  name: "uuid",
243
- isKey: true
243
+ key: true
244
244
  };
245
245
 
246
246
  /**
@@ -400,7 +400,7 @@ export const port_attribute_writable = {
400
400
  */
401
401
  export const id_attribute = {
402
402
  ...default_attribute,
403
- isKey: true,
403
+ key: true,
404
404
  name: "id",
405
405
  description: "identifier"
406
406
  };
package/src/types.mjs CHANGED
@@ -201,11 +201,3 @@ export function resolveTypeLinks() {
201
201
  }
202
202
  }
203
203
 
204
- export function typeFactory(type, owner, data) {
205
- const factory = type.factoryFor?.(owner, data) || type.clazz || type;
206
- const object = new factory(owner);
207
-
208
- object.read(data);
209
- owner.addObject(object);
210
- return object;
211
- }
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @property {string} name
5
5
  * @property {object} type
6
- * @property {boolean} isKey
6
+ * @property {boolean} key
7
7
  * @property {boolean} writable
8
8
  * @property {boolean} mandatory
9
9
  * @property {boolean} collection are we a collection (set, map, array, object)
@@ -115,7 +115,7 @@ export namespace yesno_attribute_writable {
115
115
  export let writable: boolean;
116
116
  export let name: string;
117
117
  export let type: object;
118
- export let isKey: boolean;
118
+ export let key: boolean;
119
119
  export let mandatory: boolean;
120
120
  export let collection: boolean;
121
121
  export let owner: boolean;
@@ -271,7 +271,7 @@ export const language_attribute: AttributeDefinition;
271
271
  export type AttributeDefinition = {
272
272
  name: string;
273
273
  type: object;
274
- isKey: boolean;
274
+ key: boolean;
275
275
  writable: boolean;
276
276
  mandatory: boolean;
277
277
  /**
package/types/types.d.mts CHANGED
@@ -1,7 +1,6 @@
1
1
  export function addType(type: any): any;
2
2
  export function oneOfType(definition: any): any;
3
3
  export function resolveTypeLinks(): void;
4
- export function typeFactory(type: any, owner: any, data: any): any;
5
4
  export const types: {
6
5
  string: {
7
6
  name: string;