pacc 7.1.0 → 7.2.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 +5 -0
- package/package.json +1 -1
- package/src/common-attributes.mjs +12 -7
- package/src/types.mjs +3 -2
- package/types/common-attributes.d.mts +4 -0
- package/types/types.d.mts +1 -0
package/README.md
CHANGED
|
@@ -64,6 +64,7 @@ const result = getAttribute({ a: [0,{ b: 4 }]}, "a[1].b");
|
|
|
64
64
|
* [secret\_attribute](#secret_attribute-2)
|
|
65
65
|
* [secret\_attribute](#secret_attribute-3)
|
|
66
66
|
* [secret\_attribute](#secret_attribute-4)
|
|
67
|
+
* [secret\_attribute\_writable](#secret_attribute_writable)
|
|
67
68
|
* [private\_key\_attribute](#private_key_attribute)
|
|
68
69
|
* [public\_key\_attribute](#public_key_attribute)
|
|
69
70
|
* [number\_attribute](#number_attribute)
|
|
@@ -344,6 +345,10 @@ Type: [AttributeDefinition](#attributedefinition)
|
|
|
344
345
|
|
|
345
346
|
Type: [AttributeDefinition](#attributedefinition)
|
|
346
347
|
|
|
348
|
+
## secret\_attribute\_writable
|
|
349
|
+
|
|
350
|
+
Type: [AttributeDefinition](#attributedefinition)
|
|
351
|
+
|
|
347
352
|
## private\_key\_attribute
|
|
348
353
|
|
|
349
354
|
Type: [AttributeDefinition](#attributedefinition)
|
package/package.json
CHANGED
|
@@ -211,6 +211,14 @@ export const secret_attribute = {
|
|
|
211
211
|
credential: true
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
+
/**
|
|
215
|
+
* @type {AttributeDefinition}
|
|
216
|
+
*/
|
|
217
|
+
export const secret_attribute_writable = {
|
|
218
|
+
...secret_attribute,
|
|
219
|
+
writable: true
|
|
220
|
+
};
|
|
221
|
+
|
|
214
222
|
/**
|
|
215
223
|
* @type {AttributeDefinition}
|
|
216
224
|
*/
|
|
@@ -235,19 +243,16 @@ export { secret_attribute as certificate_attribute };
|
|
|
235
243
|
* @type {AttributeDefinition}
|
|
236
244
|
*/
|
|
237
245
|
export const private_key_attribute = {
|
|
238
|
-
...
|
|
239
|
-
description: "private key"
|
|
240
|
-
private: true,
|
|
241
|
-
credential: true
|
|
246
|
+
...secret_attribute_writable,
|
|
247
|
+
description: "private key"
|
|
242
248
|
};
|
|
243
249
|
|
|
244
250
|
/**
|
|
245
251
|
* @type {AttributeDefinition}
|
|
246
252
|
*/
|
|
247
253
|
export const public_key_attribute = {
|
|
248
|
-
...
|
|
249
|
-
description: "public key"
|
|
250
|
-
credential: true
|
|
254
|
+
...secret_attribute_writable,
|
|
255
|
+
description: "public key"
|
|
251
256
|
};
|
|
252
257
|
|
|
253
258
|
/**
|
package/src/types.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { attributeIterator } from "./attributes.mjs";
|
|
2
|
-
import { parseDuration } from "./time.mjs";
|
|
2
|
+
import { parseDuration, formatDuration } from "./time.mjs";
|
|
3
3
|
import { parseBytes } from "./bytes.mjs";
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -54,7 +54,8 @@ export const types = {
|
|
|
54
54
|
duration: {
|
|
55
55
|
name: "duration",
|
|
56
56
|
primitive: true,
|
|
57
|
-
toInternal: value => parseDuration(value)
|
|
57
|
+
toInternal: value => parseDuration(value),
|
|
58
|
+
toExternal: value => value === undefined ? undefined : formatDuration(value)
|
|
58
59
|
},
|
|
59
60
|
duration_ms: {
|
|
60
61
|
name: "duration_ms",
|
|
@@ -120,6 +120,10 @@ export const uuid_attribute: AttributeDefinition;
|
|
|
120
120
|
* @type {AttributeDefinition}
|
|
121
121
|
*/
|
|
122
122
|
export const secret_attribute: AttributeDefinition;
|
|
123
|
+
/**
|
|
124
|
+
* @type {AttributeDefinition}
|
|
125
|
+
*/
|
|
126
|
+
export const secret_attribute_writable: AttributeDefinition;
|
|
123
127
|
/**
|
|
124
128
|
* @type {AttributeDefinition}
|
|
125
129
|
*/
|