pacc 3.11.1 → 3.13.0

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 CHANGED
@@ -54,6 +54,7 @@ const result = getAttribute({ a: [0,{ b: 4 }]}, "a[1].b");
54
54
  * [certificate\_attribute](#certificate_attribute)
55
55
  * [private\_key\_attribute](#private_key_attribute)
56
56
  * [public\_key\_attribute](#public_key_attribute)
57
+ * [integer\_attribute](#integer_attribute)
57
58
  * [count\_attribute](#count_attribute)
58
59
  * [size\_attribute](#size_attribute)
59
60
  * [url\_attribute](#url_attribute)
@@ -163,6 +164,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
163
164
  * `isKey` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
164
165
  * `writable` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
165
166
  * `mandatory` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
167
+ * `collection` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
166
168
  * `private` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** should the value be shown
167
169
  * `depends` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** name of an attribute we depend on
168
170
  * `additionalAttributes` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** extra attributes that are present in case our attribute is set
@@ -240,6 +242,10 @@ Type: [AttributeDefinition](#attributedefinition)
240
242
 
241
243
  Type: [AttributeDefinition](#attributedefinition)
242
244
 
245
+ ## integer\_attribute
246
+
247
+ Type: [AttributeDefinition](#attributedefinition)
248
+
243
249
  ## count\_attribute
244
250
 
245
251
  Type: [AttributeDefinition](#attributedefinition)
@@ -314,8 +320,7 @@ Create attributes from its definition.
314
320
  ### Parameters
315
321
 
316
322
  * `newDefinitions` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**&#x20;
317
- * `presentDefinitions` &#x20;
318
- * `baseDefinitions` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** optional merg in attributes
323
+ * `presentDefinitions` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** optional merg in attributes
319
324
 
320
325
  Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** attributes
321
326
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pacc",
3
- "version": "3.11.1",
3
+ "version": "3.13.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -5,6 +5,7 @@
5
5
  * @property {boolean} isKey
6
6
  * @property {boolean} writable
7
7
  * @property {boolean} mandatory
8
+ * @property {boolean} collection
8
9
  * @property {boolean} [private] should the value be shown
9
10
  * @property {string} [depends] name of an attribute we depend on
10
11
  * @property {string[]} additionalAttributes extra attributes that are present in case our attribute is set
@@ -23,6 +24,7 @@ export const default_attribute = {
23
24
  type: "string",
24
25
  writable: false,
25
26
  mandatory: false,
27
+ collection: false,
26
28
  private: false,
27
29
  isKey: false,
28
30
  additionalAttributes: []
@@ -36,6 +38,11 @@ export const name_attribute = {
36
38
  isKey: true
37
39
  };
38
40
 
41
+ /**
42
+ * @type {AttributeDefinition}
43
+ */
44
+ export const email_attribute = default_attribute;
45
+
39
46
  /**
40
47
  * The description of the object content.
41
48
  * @type {AttributeDefinition}
@@ -159,12 +166,17 @@ export const public_key_attribute = {
159
166
  /**
160
167
  * @type {AttributeDefinition}
161
168
  */
162
- export const count_attribute = { ...default_attribute, type: "integer" };
169
+ export const integer_attribute = { ...default_attribute, type: "integer" };
163
170
 
164
171
  /**
165
172
  * @type {AttributeDefinition}
166
173
  */
167
- export const size_attribute = { ...default_attribute, type: "integer" };
174
+ export const count_attribute = integer_attribute;
175
+
176
+ /**
177
+ * @type {AttributeDefinition}
178
+ */
179
+ export const size_attribute = integer_attribute;
168
180
 
169
181
  /**
170
182
  * @type {AttributeDefinition}
@@ -187,8 +199,7 @@ export const hostname_attribute = {
187
199
  * @type {AttributeDefinition}
188
200
  */
189
201
  export const port_attribute = {
190
- ...default_attribute,
191
- type: "integer",
202
+ ...integer_attribute,
192
203
  description: "port"
193
204
  };
194
205
 
@@ -248,8 +259,7 @@ export const timeout_attribute = {
248
259
  * @type {AttributeDefinition}
249
260
  */
250
261
  export const active_attribute = {
251
- ...default_attribute,
252
- type: "boolean",
262
+ ...boolean_attribute,
253
263
  default: true,
254
264
  writable: true
255
265
  };
@@ -5,6 +5,7 @@
5
5
  * @property {boolean} isKey
6
6
  * @property {boolean} writable
7
7
  * @property {boolean} mandatory
8
+ * @property {boolean} collection
8
9
  * @property {boolean} [private] should the value be shown
9
10
  * @property {string} [depends] name of an attribute we depend on
10
11
  * @property {string[]} additionalAttributes extra attributes that are present in case our attribute is set
@@ -23,6 +24,10 @@ export const default_attribute: AttributeDefinition;
23
24
  * @type {AttributeDefinition}
24
25
  */
25
26
  export const name_attribute: AttributeDefinition;
27
+ /**
28
+ * @type {AttributeDefinition}
29
+ */
30
+ export const email_attribute: AttributeDefinition;
26
31
  /**
27
32
  * The description of the object content.
28
33
  * @type {AttributeDefinition}
@@ -80,6 +85,10 @@ export const private_key_attribute: AttributeDefinition;
80
85
  * @type {AttributeDefinition}
81
86
  */
82
87
  export const public_key_attribute: AttributeDefinition;
88
+ /**
89
+ * @type {AttributeDefinition}
90
+ */
91
+ export const integer_attribute: AttributeDefinition;
83
92
  /**
84
93
  * @type {AttributeDefinition}
85
94
  */
@@ -138,6 +147,7 @@ export type AttributeDefinition = {
138
147
  isKey: boolean;
139
148
  writable: boolean;
140
149
  mandatory: boolean;
150
+ collection: boolean;
141
151
  /**
142
152
  * should the value be shown
143
153
  */