pacc 3.10.0 → 3.11.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 +40 -0
- package/package.json +1 -1
- package/src/common-attributes.mjs +35 -0
- package/src/multiple.mjs +2 -2
- package/types/common-attributes.d.mts +16 -0
- package/types/multiple.d.mts +2 -9
package/README.md
CHANGED
|
@@ -48,14 +48,22 @@ const result = getAttribute({ a: [0,{ b: 4 }]}, "a[1].b");
|
|
|
48
48
|
* [uuid\_attribute](#uuid_attribute)
|
|
49
49
|
* [empty\_attribute](#empty_attribute)
|
|
50
50
|
* [secret\_attribute](#secret_attribute)
|
|
51
|
+
* [username\_attribute](#username_attribute)
|
|
52
|
+
* [password\_attribute](#password_attribute)
|
|
51
53
|
* [token\_attribute](#token_attribute)
|
|
54
|
+
* [certificate\_attribute](#certificate_attribute)
|
|
55
|
+
* [private\_key\_attribute](#private_key_attribute)
|
|
56
|
+
* [public\_key\_attribute](#public_key_attribute)
|
|
52
57
|
* [count\_attribute](#count_attribute)
|
|
53
58
|
* [size\_attribute](#size_attribute)
|
|
54
59
|
* [url\_attribute](#url_attribute)
|
|
60
|
+
* [hostname\_attribute](#hostname_attribute)
|
|
61
|
+
* [port\_attribute](#port_attribute)
|
|
55
62
|
* [id\_attribute](#id_attribute)
|
|
56
63
|
* [body\_attribute](#body_attribute)
|
|
57
64
|
* [title\_attribute](#title_attribute)
|
|
58
65
|
* [priority\_attribute](#priority_attribute)
|
|
66
|
+
* [timeout\_attribute](#timeout_attribute)
|
|
59
67
|
* [active\_attribute](#active_attribute)
|
|
60
68
|
* [language\_attribute](#language_attribute)
|
|
61
69
|
* [filter](#filter)
|
|
@@ -208,10 +216,30 @@ Type: [AttributeDefinition](#attributedefinition)
|
|
|
208
216
|
|
|
209
217
|
Type: [AttributeDefinition](#attributedefinition)
|
|
210
218
|
|
|
219
|
+
## username\_attribute
|
|
220
|
+
|
|
221
|
+
Type: [AttributeDefinition](#attributedefinition)
|
|
222
|
+
|
|
223
|
+
## password\_attribute
|
|
224
|
+
|
|
225
|
+
Type: [AttributeDefinition](#attributedefinition)
|
|
226
|
+
|
|
211
227
|
## token\_attribute
|
|
212
228
|
|
|
213
229
|
Type: [AttributeDefinition](#attributedefinition)
|
|
214
230
|
|
|
231
|
+
## certificate\_attribute
|
|
232
|
+
|
|
233
|
+
Type: [AttributeDefinition](#attributedefinition)
|
|
234
|
+
|
|
235
|
+
## private\_key\_attribute
|
|
236
|
+
|
|
237
|
+
Type: [AttributeDefinition](#attributedefinition)
|
|
238
|
+
|
|
239
|
+
## public\_key\_attribute
|
|
240
|
+
|
|
241
|
+
Type: [AttributeDefinition](#attributedefinition)
|
|
242
|
+
|
|
215
243
|
## count\_attribute
|
|
216
244
|
|
|
217
245
|
Type: [AttributeDefinition](#attributedefinition)
|
|
@@ -224,6 +252,14 @@ Type: [AttributeDefinition](#attributedefinition)
|
|
|
224
252
|
|
|
225
253
|
Type: [AttributeDefinition](#attributedefinition)
|
|
226
254
|
|
|
255
|
+
## hostname\_attribute
|
|
256
|
+
|
|
257
|
+
Type: [AttributeDefinition](#attributedefinition)
|
|
258
|
+
|
|
259
|
+
## port\_attribute
|
|
260
|
+
|
|
261
|
+
Type: [AttributeDefinition](#attributedefinition)
|
|
262
|
+
|
|
227
263
|
## id\_attribute
|
|
228
264
|
|
|
229
265
|
Unique id within the provider.
|
|
@@ -249,6 +285,10 @@ this defines the order.
|
|
|
249
285
|
|
|
250
286
|
Type: [AttributeDefinition](#attributedefinition)
|
|
251
287
|
|
|
288
|
+
## timeout\_attribute
|
|
289
|
+
|
|
290
|
+
Type: [AttributeDefinition](#attributedefinition)
|
|
291
|
+
|
|
252
292
|
## active\_attribute
|
|
253
293
|
|
|
254
294
|
Type: [AttributeDefinition](#attributedefinition)
|
package/package.json
CHANGED
|
@@ -100,6 +100,24 @@ export const secret_attribute = {
|
|
|
100
100
|
writable: true
|
|
101
101
|
};
|
|
102
102
|
|
|
103
|
+
/**
|
|
104
|
+
* @type {AttributeDefinition}
|
|
105
|
+
*/
|
|
106
|
+
export const username_attribute = {
|
|
107
|
+
...default_attribute,
|
|
108
|
+
private: true,
|
|
109
|
+
writable: true
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @type {AttributeDefinition}
|
|
114
|
+
*/
|
|
115
|
+
export const password_attribute = {
|
|
116
|
+
...default_attribute,
|
|
117
|
+
private: true,
|
|
118
|
+
writable: true
|
|
119
|
+
};
|
|
120
|
+
|
|
103
121
|
/**
|
|
104
122
|
* @type {AttributeDefinition}
|
|
105
123
|
*/
|
|
@@ -157,6 +175,23 @@ export const url_attribute = {
|
|
|
157
175
|
description: "home of the object"
|
|
158
176
|
};
|
|
159
177
|
|
|
178
|
+
/**
|
|
179
|
+
* @type {AttributeDefinition}
|
|
180
|
+
*/
|
|
181
|
+
export const hostname_attribute = {
|
|
182
|
+
...default_attribute,
|
|
183
|
+
description: "hostname"
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* @type {AttributeDefinition}
|
|
188
|
+
*/
|
|
189
|
+
export const port_attribute = {
|
|
190
|
+
...default_attribute,
|
|
191
|
+
type: "integer",
|
|
192
|
+
description: "port"
|
|
193
|
+
};
|
|
194
|
+
|
|
160
195
|
/**
|
|
161
196
|
* Unique id within the provider.
|
|
162
197
|
* @type {AttributeDefinition}
|
package/src/multiple.mjs
CHANGED
|
@@ -13,7 +13,7 @@ const types = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Create attributes from its definition.
|
|
15
15
|
* @param {Object} newDefinitions
|
|
16
|
-
* @param {Object
|
|
16
|
+
* @param {Object|undefined} presentDefinitions optional merg in attributes
|
|
17
17
|
* @return {Object} attributes
|
|
18
18
|
*/
|
|
19
19
|
export function prepareAttributesDefinitions(newDefinitions, presentDefinitions) {
|
|
@@ -35,7 +35,7 @@ export function prepareAttributesDefinitions(newDefinitions, presentDefinitions)
|
|
|
35
35
|
* @param {Object?} atts attribute definitions to be used
|
|
36
36
|
* @return {Object} merged definitions (dest)
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
function mergeAttributeDefinitions(dest, atts) {
|
|
39
39
|
if (atts) {
|
|
40
40
|
for (const [name, ca] of Object.entries(atts)) {
|
|
41
41
|
if (ca.attributes !== undefined) {
|
|
@@ -56,6 +56,14 @@ export const empty_attribute: AttributeDefinition;
|
|
|
56
56
|
* @type {AttributeDefinition}
|
|
57
57
|
*/
|
|
58
58
|
export const secret_attribute: AttributeDefinition;
|
|
59
|
+
/**
|
|
60
|
+
* @type {AttributeDefinition}
|
|
61
|
+
*/
|
|
62
|
+
export const username_attribute: AttributeDefinition;
|
|
63
|
+
/**
|
|
64
|
+
* @type {AttributeDefinition}
|
|
65
|
+
*/
|
|
66
|
+
export const password_attribute: AttributeDefinition;
|
|
59
67
|
/**
|
|
60
68
|
* @type {AttributeDefinition}
|
|
61
69
|
*/
|
|
@@ -84,6 +92,14 @@ export const size_attribute: AttributeDefinition;
|
|
|
84
92
|
* @type {AttributeDefinition}
|
|
85
93
|
*/
|
|
86
94
|
export const url_attribute: AttributeDefinition;
|
|
95
|
+
/**
|
|
96
|
+
* @type {AttributeDefinition}
|
|
97
|
+
*/
|
|
98
|
+
export const hostname_attribute: AttributeDefinition;
|
|
99
|
+
/**
|
|
100
|
+
* @type {AttributeDefinition}
|
|
101
|
+
*/
|
|
102
|
+
export const port_attribute: AttributeDefinition;
|
|
87
103
|
/**
|
|
88
104
|
* Unique id within the provider.
|
|
89
105
|
* @type {AttributeDefinition}
|
package/types/multiple.d.mts
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Create attributes from its definition.
|
|
3
3
|
* @param {Object} newDefinitions
|
|
4
|
-
* @param {Object
|
|
4
|
+
* @param {Object|undefined} presentDefinitions optional merg in attributes
|
|
5
5
|
* @return {Object} attributes
|
|
6
6
|
*/
|
|
7
|
-
export function prepareAttributesDefinitions(newDefinitions: any, presentDefinitions: any): any;
|
|
8
|
-
/**
|
|
9
|
-
* Merge attribute definitions.
|
|
10
|
-
* @param {Object} dest attribute definitions to be used also the merge target
|
|
11
|
-
* @param {Object?} atts attribute definitions to be used
|
|
12
|
-
* @return {Object} merged definitions (dest)
|
|
13
|
-
*/
|
|
14
|
-
export function mergeAttributeDefinitions(dest: any, atts: any | null): any;
|
|
7
|
+
export function prepareAttributesDefinitions(newDefinitions: any, presentDefinitions: any | undefined): any;
|
|
15
8
|
/**
|
|
16
9
|
* Copies attribute values from a source object into a destination object.
|
|
17
10
|
* @param {Object} object target object to be modified
|