pacc 10.0.1 → 10.0.3
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/README.md +9 -9
- package/package.json +4 -4
- package/src/attributes.mjs +3 -1
- package/src/common-attributes.mjs +25 -19
- package/types/common-attributes.d.mts +13 -1
package/README.md
CHANGED
|
@@ -82,9 +82,9 @@ tokens "abc" "
|
|
|
82
82
|
* [AttributeDefinition](#attributedefinition)
|
|
83
83
|
* [Properties](#properties-1)
|
|
84
84
|
* [default\_attribute](#default_attribute)
|
|
85
|
-
* [default\_attribute](#default_attribute-1)
|
|
86
85
|
* [default\_attribute\_writable](#default_attribute_writable)
|
|
87
|
-
* [
|
|
86
|
+
* [string\_attribute](#string_attribute)
|
|
87
|
+
* [string\_attribute\_writable](#string_attribute_writable)
|
|
88
88
|
* [string\_collection\_attribute](#string_collection_attribute)
|
|
89
89
|
* [string\_collection\_attribute\_writable](#string_collection_attribute_writable)
|
|
90
90
|
* [string\_set\_attribute](#string_set_attribute)
|
|
@@ -119,9 +119,9 @@ tokens "abc" "
|
|
|
119
119
|
* [number\_attribute\_writable](#number_attribute_writable)
|
|
120
120
|
* [integer\_attribute](#integer_attribute)
|
|
121
121
|
* [integer\_attribute](#integer_attribute-1)
|
|
122
|
-
* [integer\_attribute](#integer_attribute-2)
|
|
123
122
|
* [integer\_attribute\_writable](#integer_attribute_writable)
|
|
124
123
|
* [integer\_attribute\_writable](#integer_attribute_writable-1)
|
|
124
|
+
* [size\_attribute](#size_attribute)
|
|
125
125
|
* [object\_attribute](#object_attribute)
|
|
126
126
|
* [url\_attribute](#url_attribute)
|
|
127
127
|
* [url\_attribute\_writable](#url_attribute_writable)
|
|
@@ -282,7 +282,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
|
|
|
282
282
|
|
|
283
283
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
284
284
|
* `type` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
285
|
-
* `
|
|
285
|
+
* `key` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
|
|
286
286
|
* `writable` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
|
|
287
287
|
* `mandatory` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
|
|
288
288
|
* `collection` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** are we a collection (set, map, array, object)
|
|
@@ -310,15 +310,15 @@ Common attribute properties.
|
|
|
310
310
|
|
|
311
311
|
Type: [AttributeDefinition](#attributedefinition)
|
|
312
312
|
|
|
313
|
-
## default\_attribute
|
|
313
|
+
## default\_attribute\_writable
|
|
314
314
|
|
|
315
315
|
Type: [AttributeDefinition](#attributedefinition)
|
|
316
316
|
|
|
317
|
-
##
|
|
317
|
+
## string\_attribute
|
|
318
318
|
|
|
319
319
|
Type: [AttributeDefinition](#attributedefinition)
|
|
320
320
|
|
|
321
|
-
##
|
|
321
|
+
## string\_attribute\_writable
|
|
322
322
|
|
|
323
323
|
Type: [AttributeDefinition](#attributedefinition)
|
|
324
324
|
|
|
@@ -460,7 +460,7 @@ Type: [AttributeDefinition](#attributedefinition)
|
|
|
460
460
|
|
|
461
461
|
Type: [AttributeDefinition](#attributedefinition)
|
|
462
462
|
|
|
463
|
-
## integer\_attribute
|
|
463
|
+
## integer\_attribute\_writable
|
|
464
464
|
|
|
465
465
|
Type: [AttributeDefinition](#attributedefinition)
|
|
466
466
|
|
|
@@ -468,7 +468,7 @@ Type: [AttributeDefinition](#attributedefinition)
|
|
|
468
468
|
|
|
469
469
|
Type: [AttributeDefinition](#attributedefinition)
|
|
470
470
|
|
|
471
|
-
##
|
|
471
|
+
## size\_attribute
|
|
472
472
|
|
|
473
473
|
Type: [AttributeDefinition](#attributedefinition)
|
|
474
474
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pacc",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@mitata/counters": "^0.0.8",
|
|
46
|
-
"aggregated-map": "^1.0.
|
|
46
|
+
"aggregated-map": "^1.0.6",
|
|
47
47
|
"ava": "^8.0.1",
|
|
48
|
-
"browser-ava": "^2.3.
|
|
48
|
+
"browser-ava": "^2.3.63",
|
|
49
49
|
"c8": "^11.0.0",
|
|
50
50
|
"documentation": "^14.0.3",
|
|
51
51
|
"mitata": "^1.0.34",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
|
-
"node": ">=26.
|
|
61
|
+
"node": ">=26.3.1"
|
|
62
62
|
},
|
|
63
63
|
"repository": {
|
|
64
64
|
"type": "git",
|
package/src/attributes.mjs
CHANGED
|
@@ -75,7 +75,9 @@ export function* extendingAttributeIterator(type, filter, path) {
|
|
|
75
75
|
if (type.extends) {
|
|
76
76
|
yield* extendingAttributeIterator(type.extends, filter, path);
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
if (type.hasOwnProperty("attributes")) {
|
|
79
|
+
yield* attributeIterator(type.attributes, filter, path);
|
|
80
|
+
}
|
|
79
81
|
}
|
|
80
82
|
|
|
81
83
|
export const filterWritable = attribute => attribute.writable;
|
|
@@ -55,18 +55,21 @@ export const default_attribute_writable = {
|
|
|
55
55
|
/**
|
|
56
56
|
* @type {AttributeDefinition}
|
|
57
57
|
*/
|
|
58
|
-
export { default_attribute
|
|
58
|
+
export const string_attribute = { ...default_attribute, name: "string" };
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* @type {AttributeDefinition}
|
|
62
62
|
*/
|
|
63
|
-
export
|
|
63
|
+
export const string_attribute_writable = {
|
|
64
|
+
...string_attribute,
|
|
65
|
+
writable: true
|
|
66
|
+
};
|
|
64
67
|
|
|
65
68
|
/**
|
|
66
69
|
* @type {AttributeDefinition}
|
|
67
70
|
*/
|
|
68
71
|
export const string_collection_attribute = {
|
|
69
|
-
...
|
|
72
|
+
...string_attribute,
|
|
70
73
|
separator: " ",
|
|
71
74
|
collection: true
|
|
72
75
|
};
|
|
@@ -99,7 +102,7 @@ export const string_set_attribute_writable = {
|
|
|
99
102
|
* @type {AttributeDefinition}
|
|
100
103
|
*/
|
|
101
104
|
export const name_attribute = {
|
|
102
|
-
...
|
|
105
|
+
...string_attribute,
|
|
103
106
|
name: "name",
|
|
104
107
|
key: true
|
|
105
108
|
};
|
|
@@ -116,7 +119,7 @@ export const name_attribute_writable = {
|
|
|
116
119
|
* @type {AttributeDefinition}
|
|
117
120
|
*/
|
|
118
121
|
export const email_attribute = {
|
|
119
|
-
...
|
|
122
|
+
...string_attribute,
|
|
120
123
|
name: "email",
|
|
121
124
|
description: "email address"
|
|
122
125
|
};
|
|
@@ -125,7 +128,7 @@ export const email_attribute = {
|
|
|
125
128
|
* @type {AttributeDefinition}
|
|
126
129
|
*/
|
|
127
130
|
export const version_attribute = {
|
|
128
|
-
...
|
|
131
|
+
...string_attribute,
|
|
129
132
|
name: "version",
|
|
130
133
|
description: "version"
|
|
131
134
|
};
|
|
@@ -143,7 +146,7 @@ export const version_attribute_writable = {
|
|
|
143
146
|
* @type {AttributeDefinition}
|
|
144
147
|
*/
|
|
145
148
|
export const description_attribute = {
|
|
146
|
-
...
|
|
149
|
+
...string_attribute_writable,
|
|
147
150
|
name: "description",
|
|
148
151
|
description: "human readable description"
|
|
149
152
|
};
|
|
@@ -153,7 +156,7 @@ export { description_attribute as description_attribute_writable };
|
|
|
153
156
|
/**
|
|
154
157
|
* @type {AttributeDefinition}
|
|
155
158
|
*/
|
|
156
|
-
export const type_attribute = { ...
|
|
159
|
+
export const type_attribute = { ...string_attribute, name: "type" };
|
|
157
160
|
|
|
158
161
|
/**
|
|
159
162
|
* @type {AttributeDefinition}
|
|
@@ -238,7 +241,7 @@ export const empty_attribute = { ...boolean_attribute, name: "empty" };
|
|
|
238
241
|
* @type {AttributeDefinition}
|
|
239
242
|
*/
|
|
240
243
|
export const uuid_attribute = {
|
|
241
|
-
...
|
|
244
|
+
...string_attribute,
|
|
242
245
|
name: "uuid",
|
|
243
246
|
key: true
|
|
244
247
|
};
|
|
@@ -247,7 +250,7 @@ export const uuid_attribute = {
|
|
|
247
250
|
* @type {AttributeDefinition}
|
|
248
251
|
*/
|
|
249
252
|
export const secret_attribute = {
|
|
250
|
-
...
|
|
253
|
+
...string_attribute_writable,
|
|
251
254
|
private: true,
|
|
252
255
|
credential: true
|
|
253
256
|
};
|
|
@@ -337,7 +340,7 @@ export { integer_attribute_writable as count_attribute_writable };
|
|
|
337
340
|
/**
|
|
338
341
|
* @type {AttributeDefinition}
|
|
339
342
|
*/
|
|
340
|
-
export { integer_attribute
|
|
343
|
+
export const size_attribute = { ...integer_attribute, name: "size" };
|
|
341
344
|
|
|
342
345
|
export const bytes_size_attribute = {
|
|
343
346
|
...default_attribute,
|
|
@@ -348,7 +351,11 @@ export const bytes_size_attribute = {
|
|
|
348
351
|
/**
|
|
349
352
|
* @type {AttributeDefinition}
|
|
350
353
|
*/
|
|
351
|
-
export const object_attribute = {
|
|
354
|
+
export const object_attribute = {
|
|
355
|
+
...default_attribute,
|
|
356
|
+
name: "object",
|
|
357
|
+
type: types.object
|
|
358
|
+
};
|
|
352
359
|
|
|
353
360
|
/**
|
|
354
361
|
* @type {AttributeDefinition}
|
|
@@ -372,7 +379,7 @@ export const url_attribute_writable = {
|
|
|
372
379
|
* @type {AttributeDefinition}
|
|
373
380
|
*/
|
|
374
381
|
export const hostname_attribute = {
|
|
375
|
-
...
|
|
382
|
+
...string_attribute,
|
|
376
383
|
name: "hostname",
|
|
377
384
|
description: "hostname"
|
|
378
385
|
};
|
|
@@ -399,7 +406,7 @@ export const port_attribute_writable = {
|
|
|
399
406
|
* @type {AttributeDefinition}
|
|
400
407
|
*/
|
|
401
408
|
export const id_attribute = {
|
|
402
|
-
...
|
|
409
|
+
...string_attribute,
|
|
403
410
|
key: true,
|
|
404
411
|
name: "id",
|
|
405
412
|
description: "identifier"
|
|
@@ -410,7 +417,7 @@ export const id_attribute = {
|
|
|
410
417
|
* @type {AttributeDefinition}
|
|
411
418
|
*/
|
|
412
419
|
export const body_attribute_writable = {
|
|
413
|
-
...
|
|
420
|
+
...string_attribute_writable,
|
|
414
421
|
name: "body"
|
|
415
422
|
};
|
|
416
423
|
|
|
@@ -419,10 +426,9 @@ export const body_attribute_writable = {
|
|
|
419
426
|
* @type {AttributeDefinition}
|
|
420
427
|
*/
|
|
421
428
|
export const title_attribute_writable = {
|
|
422
|
-
...
|
|
429
|
+
...string_attribute_writable,
|
|
423
430
|
name: "title",
|
|
424
|
-
description: "human readable title"
|
|
425
|
-
writable: true
|
|
431
|
+
description: "human readable title"
|
|
426
432
|
};
|
|
427
433
|
|
|
428
434
|
/**
|
|
@@ -480,7 +486,7 @@ export const timeout_attribute = {
|
|
|
480
486
|
* @type {AttributeDefinition}
|
|
481
487
|
*/
|
|
482
488
|
export const language_attribute = {
|
|
483
|
-
...
|
|
489
|
+
...string_attribute,
|
|
484
490
|
name: "language",
|
|
485
491
|
description: "human spoken language"
|
|
486
492
|
};
|
|
@@ -34,6 +34,14 @@ export const default_attribute: AttributeDefinition;
|
|
|
34
34
|
* @type {AttributeDefinition}
|
|
35
35
|
*/
|
|
36
36
|
export const default_attribute_writable: AttributeDefinition;
|
|
37
|
+
/**
|
|
38
|
+
* @type {AttributeDefinition}
|
|
39
|
+
*/
|
|
40
|
+
export const string_attribute: AttributeDefinition;
|
|
41
|
+
/**
|
|
42
|
+
* @type {AttributeDefinition}
|
|
43
|
+
*/
|
|
44
|
+
export const string_attribute_writable: AttributeDefinition;
|
|
37
45
|
/**
|
|
38
46
|
* @type {AttributeDefinition}
|
|
39
47
|
*/
|
|
@@ -190,6 +198,10 @@ export const integer_attribute: AttributeDefinition;
|
|
|
190
198
|
* @type {AttributeDefinition}
|
|
191
199
|
*/
|
|
192
200
|
export const integer_attribute_writable: AttributeDefinition;
|
|
201
|
+
/**
|
|
202
|
+
* @type {AttributeDefinition}
|
|
203
|
+
*/
|
|
204
|
+
export const size_attribute: AttributeDefinition;
|
|
193
205
|
export namespace bytes_size_attribute {
|
|
194
206
|
let type_1: {
|
|
195
207
|
name: string;
|
|
@@ -341,4 +353,4 @@ export type AttributeDefinition = {
|
|
|
341
353
|
*/
|
|
342
354
|
separator?: string | undefined;
|
|
343
355
|
};
|
|
344
|
-
export {
|
|
356
|
+
export { description_attribute as description_attribute_writable, boolean_attribute_writable_true as active_attribute, secret_attribute as certificate_attribute, integer_attribute as count_attribute, integer_attribute_writable as count_attribute_writable, priority_attribute as priority_attribute_writable };
|