pacc 9.3.0 → 9.3.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/README.md CHANGED
@@ -75,8 +75,10 @@ tokens "abc" "
75
75
  * [Parameters](#parameters-1)
76
76
  * [attributeIterator](#attributeiterator)
77
77
  * [Parameters](#parameters-2)
78
- * [parseBytes](#parsebytes)
78
+ * [extendingAttributeIterator](#extendingattributeiterator)
79
79
  * [Parameters](#parameters-3)
80
+ * [parseBytes](#parsebytes)
81
+ * [Parameters](#parameters-4)
80
82
  * [AttributeDefinition](#attributedefinition)
81
83
  * [Properties](#properties-1)
82
84
  * [default\_attribute](#default_attribute)
@@ -134,40 +136,40 @@ tokens "abc" "
134
136
  * [timeout\_attribute](#timeout_attribute)
135
137
  * [language\_attribute](#language_attribute)
136
138
  * [environmentValues](#environmentvalues)
137
- * [Parameters](#parameters-4)
139
+ * [Parameters](#parameters-5)
138
140
  * [expandContextDefault](#expandcontextdefault)
139
141
  * [expandContextDoubbleCurly](#expandcontextdoubblecurly)
140
142
  * [expand](#expand)
141
- * [Parameters](#parameters-5)
143
+ * [Parameters](#parameters-6)
142
144
  * [promises](#promises)
143
145
  * [filter](#filter)
144
- * [Parameters](#parameters-6)
145
- * [setAttributes](#setattributes)
146
146
  * [Parameters](#parameters-7)
147
- * [getAttributes](#getattributes)
147
+ * [setAttributes](#setattributes)
148
148
  * [Parameters](#parameters-8)
149
- * [getAttributesJSON](#getattributesjson)
149
+ * [getAttributes](#getattributes)
150
150
  * [Parameters](#parameters-9)
151
+ * [getAttributesJSON](#getattributesjson)
152
+ * [Parameters](#parameters-10)
151
153
  * [tokens](#tokens)
152
154
  * [tokens](#tokens-1)
153
- * [Parameters](#parameters-10)
154
- * [setAttribute](#setattribute)
155
155
  * [Parameters](#parameters-11)
156
- * [getAttribute](#getattribute)
156
+ * [setAttribute](#setattribute)
157
157
  * [Parameters](#parameters-12)
158
- * [getAttributeAndOperator](#getattributeandoperator)
158
+ * [getAttribute](#getattribute)
159
159
  * [Parameters](#parameters-13)
160
- * [parseDuration](#parseduration)
160
+ * [getAttributeAndOperator](#getattributeandoperator)
161
161
  * [Parameters](#parameters-14)
162
- * [formatDuration](#formatduration)
162
+ * [parseDuration](#parseduration)
163
163
  * [Parameters](#parameters-15)
164
- * [formatDurationISO](#formatdurationiso)
164
+ * [formatDuration](#formatduration)
165
165
  * [Parameters](#parameters-16)
166
+ * [formatDurationISO](#formatdurationiso)
167
+ * [Parameters](#parameters-17)
166
168
  * [lookup](#lookup)
167
169
  * [Token](#token)
168
170
  * [Properties](#properties-2)
169
171
  * [createToken](#createtoken)
170
- * [Parameters](#parameters-17)
172
+ * [Parameters](#parameters-18)
171
173
  * [PLUS](#plus)
172
174
  * [MINUS](#minus)
173
175
  * [STAR](#star)
@@ -202,7 +204,7 @@ tokens "abc" "
202
204
  * [Type](#type)
203
205
  * [Properties](#properties-3)
204
206
  * [raiseOnUnknownType](#raiseonunknowntype)
205
- * [Parameters](#parameters-18)
207
+ * [Parameters](#parameters-19)
206
208
 
207
209
  ## AST
208
210
 
@@ -236,13 +238,26 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
236
238
 
237
239
  ## attributeIterator
238
240
 
239
- Iterate over all attributes.
241
+ Iterate over attributes.
240
242
 
241
243
  ### Parameters
242
244
 
243
- * `definition` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
245
+ * `definition`  
244
246
  * `filter` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** 
245
- * `path` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** (optional, default `[]`)
247
+ * `path` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>?** (optional, default `[]`)
248
+ * `attribute` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** definition
249
+
250
+ Returns **Iterable<\[[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>, [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)]>**&#x20;
251
+
252
+ ## extendingAttributeIterator
253
+
254
+ Iterate over all attributes of a type.
255
+
256
+ ### Parameters
257
+
258
+ * `type` **[Type](#type)** definition
259
+ * `filter` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?**&#x20;
260
+ * `path` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>?**&#x20;
246
261
 
247
262
  Returns **Iterable<\[[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>, [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)]>**&#x20;
248
263
 
@@ -264,6 +279,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
264
279
 
265
280
  * `type` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**&#x20;
266
281
  * `isKey` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**&#x20;
282
+ * `isOwner` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** are we the owner of the value
267
283
  * `writable` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**&#x20;
268
284
  * `mandatory` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**&#x20;
269
285
  * `collection` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**&#x20;
@@ -278,8 +294,8 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
278
294
  * `get` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** get the value can be used to calculate default values
279
295
  * `toInternal` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?**&#x20;
280
296
  * `toExternal` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?**&#x20;
281
- * `values` **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)\<any>?** allowed values
282
297
  * `externalName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** attribute name used by external system
298
+ * `values` **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)\<any>?** allowed values
283
299
  * `env` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** environment variable(s) used to provide the value
284
300
  * `additionalValues` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** other values to be set in case our attribute is set
285
301
  * `separator` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** separator for collections
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pacc",
3
- "version": "9.3.0",
3
+ "version": "9.3.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -5,10 +5,10 @@ import { types } from "./types.mjs";
5
5
  *
6
6
  * @property {object} type
7
7
  * @property {boolean} isKey
8
- * @property {boolean} isOwner are we the owner of the value
9
8
  * @property {boolean} writable
10
9
  * @property {boolean} mandatory
11
- * @property {boolean} collection
10
+ * @property {boolean} collection are we a collection (set, map, array)
11
+ * @property {boolean} owner are we the owner of the value
12
12
  * @property {Function} [constructor] (collection) constructor
13
13
  * @property {boolean} [private] should the value be shown
14
14
  * @property {boolean} [credential] any type of credential
@@ -36,11 +36,11 @@ export const default_attribute = {
36
36
  writable: false,
37
37
  mandatory: false,
38
38
  collection: false,
39
+ owner: true,
39
40
  persistent: false,
40
41
  private: false,
41
42
  credential: false,
42
- isKey: false,
43
- isOwner: true
43
+ isKey: false
44
44
  };
45
45
 
46
46
  /**
@@ -3,10 +3,10 @@
3
3
  *
4
4
  * @property {object} type
5
5
  * @property {boolean} isKey
6
- * @property {boolean} isOwner are we the owner of the value
7
6
  * @property {boolean} writable
8
7
  * @property {boolean} mandatory
9
- * @property {boolean} collection
8
+ * @property {boolean} collection are we a collection (set, map, array)
9
+ * @property {boolean} owner are we the owner of the value
10
10
  * @property {Function} [constructor] (collection) constructor
11
11
  * @property {boolean} [private] should the value be shown
12
12
  * @property {boolean} [credential] any type of credential
@@ -102,9 +102,9 @@ export namespace yesno_attribute_writable {
102
102
  export let writable: boolean;
103
103
  export let type: object;
104
104
  export let isKey: boolean;
105
- export let isOwner: boolean;
106
105
  export let mandatory: boolean;
107
106
  export let collection: boolean;
107
+ export let owner: boolean;
108
108
  export let constructor: Function | undefined;
109
109
  let _private: boolean | undefined;
110
110
  export { _private as private };
@@ -230,13 +230,16 @@ export const language_attribute: AttributeDefinition;
230
230
  export type AttributeDefinition = {
231
231
  type: object;
232
232
  isKey: boolean;
233
- /**
234
- * are we the owner of the value
235
- */
236
- isOwner: boolean;
237
233
  writable: boolean;
238
234
  mandatory: boolean;
235
+ /**
236
+ * are we a collection (set, map, array)
237
+ */
239
238
  collection: boolean;
239
+ /**
240
+ * are we the owner of the value
241
+ */
242
+ owner: boolean;
240
243
  /**
241
244
  * (collection) constructor
242
245
  */