pacc 7.0.3 → 7.2.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/package.json
CHANGED
package/src/attributes.mjs
CHANGED
|
@@ -65,6 +65,7 @@ export function* attributeIterator(definition, filter, path = []) {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
export const filterWritable = (name, attribute) => attribute.writable;
|
|
68
|
+
export const filterPublic = (name, attribute) => !attribute.private;
|
|
68
69
|
|
|
69
70
|
export function* writableAttributeIterator(definition) {
|
|
70
71
|
yield* attributeIterator(definition, filterWritable);
|
|
@@ -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/types/attributes.d.mts
CHANGED
|
@@ -18,4 +18,5 @@ export function toInternal(value: any, attribute: any): any;
|
|
|
18
18
|
export function toExternal(value: any, attribute: any): any;
|
|
19
19
|
export function mandatoryAttributesPresent(object: any, attributes: any): boolean;
|
|
20
20
|
export function filterWritable(name: any, attribute: any): any;
|
|
21
|
+
export function filterPublic(name: any, attribute: any): boolean;
|
|
21
22
|
export { toInternal as prepareValue };
|
|
@@ -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
|
*/
|