pacc 10.4.1 → 10.5.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 +1 -1
- package/package.json +6 -11
- package/src/tokens.mjs +15 -2
- package/types/ast.d.mts +10 -10
- package/types/attributes.d.mts +9 -9
- package/types/bytes.d.mts +2 -2
- package/types/common-attributes.d.mts +207 -171
- package/types/environment.d.mts +1 -1
- package/types/expand.d.mts +25 -18
- package/types/extract.d.mts +1 -1
- package/types/filter.d.mts +1 -1
- package/types/multiple.d.mts +3 -3
- package/types/parser.d.mts +2 -2
- package/types/properties.d.mts +1 -1
- package/types/settergetter.d.mts +7 -4
- package/types/time.d.mts +3 -3
- package/types/tokens.d.mts +75 -66
- package/types/types.d.mts +28 -16
package/README.md
CHANGED
|
@@ -589,7 +589,7 @@ Expand expressions inside of object graphs.
|
|
|
589
589
|
* `context` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
590
590
|
|
|
591
591
|
* `context.root` **any?** actual replacement values
|
|
592
|
-
* `context.stopClass` **[function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)
|
|
592
|
+
* `context.stopClass` **[function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** do not expand instancif
|
|
593
593
|
* `context.leadIn` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** starting separator
|
|
594
594
|
* `context.leadOut` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** ending separator
|
|
595
595
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pacc",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.5.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -43,19 +43,14 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@mitata/counters": "^0.0.8",
|
|
46
|
-
"aggregated-map": "^1.0.
|
|
46
|
+
"aggregated-map": "^1.0.8",
|
|
47
47
|
"ava": "^8.0.1",
|
|
48
|
-
"browser-ava": "^2.3.
|
|
49
|
-
"c8": "^
|
|
48
|
+
"browser-ava": "^2.3.69",
|
|
49
|
+
"c8": "^12.0.0",
|
|
50
50
|
"documentation": "^14.0.3",
|
|
51
51
|
"mitata": "^1.0.34",
|
|
52
|
-
"semantic-release": "^25.0.
|
|
53
|
-
"typescript": "^
|
|
54
|
-
},
|
|
55
|
-
"overrides": {
|
|
56
|
-
"c8": {
|
|
57
|
-
"yargs": "^18.0.0"
|
|
58
|
-
}
|
|
52
|
+
"semantic-release": "^25.0.8",
|
|
53
|
+
"typescript": "^7.0.2"
|
|
59
54
|
},
|
|
60
55
|
"engines": {
|
|
61
56
|
"node": ">=26.4.0"
|
package/src/tokens.mjs
CHANGED
|
@@ -15,8 +15,21 @@ const lookup = {};
|
|
|
15
15
|
/**
|
|
16
16
|
* @typedef {Object} Token
|
|
17
17
|
* @property {string} str
|
|
18
|
+
* @property {number} precedence
|
|
19
|
+
* @property {Function} led
|
|
20
|
+
* @property {Function} nud
|
|
21
|
+
*
|
|
18
22
|
*/
|
|
19
23
|
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @param {Token} token
|
|
27
|
+
*/
|
|
28
|
+
export function registerToken(token) {
|
|
29
|
+
lookup[token.str] = [token];
|
|
30
|
+
return token;
|
|
31
|
+
}
|
|
32
|
+
|
|
20
33
|
/**
|
|
21
34
|
*
|
|
22
35
|
* @param {string} str
|
|
@@ -48,8 +61,8 @@ function createToken(
|
|
|
48
61
|
}
|
|
49
62
|
|
|
50
63
|
token.nud = nud;
|
|
51
|
-
|
|
52
|
-
return token;
|
|
64
|
+
|
|
65
|
+
return registerToken(token);
|
|
53
66
|
}
|
|
54
67
|
|
|
55
68
|
function createBinopToken(str, precedence, type, binop) {
|
package/types/ast.d.mts
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
* @typedef {Object} AST
|
|
3
3
|
* @property {Function} [eval]
|
|
4
4
|
*/
|
|
5
|
-
export function pathEval(node: any, current: any, context: any): any;
|
|
6
|
-
export function functionEval(node: any, current: any, context: any): any;
|
|
7
|
-
export function keyedAccessOrGlobalEval(node: any, current: any, context: any): any;
|
|
8
|
-
export function keyedAccessEval(node: any, current: any, context: any): any;
|
|
9
|
-
export function filterEval(node: any, current: any, context: any): any;
|
|
10
|
-
export function nullFilterEval(node: any, current: any, context: any): any;
|
|
11
|
-
export namespace ASTNullFilter {
|
|
12
|
-
export { nullFilterEval as eval };
|
|
13
|
-
}
|
|
14
5
|
export type AST = {
|
|
15
|
-
eval?: Function
|
|
6
|
+
eval?: Function;
|
|
7
|
+
};
|
|
8
|
+
export declare function pathEval(node: any, current: any, context: any): any;
|
|
9
|
+
export declare function functionEval(node: any, current: any, context: any): any;
|
|
10
|
+
export declare function keyedAccessOrGlobalEval(node: any, current: any, context: any): any;
|
|
11
|
+
export declare function keyedAccessEval(node: any, current: any, context: any): any;
|
|
12
|
+
export declare function filterEval(node: any, current: any, context: any): any;
|
|
13
|
+
export declare function nullFilterEval(node: any, current: any, context: any): any;
|
|
14
|
+
export declare const ASTNullFilter: {
|
|
15
|
+
eval: typeof nullFilterEval;
|
|
16
16
|
};
|
package/types/attributes.d.mts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @param {Object} [presentDefinitions] optional merge in attributes
|
|
5
5
|
* @return {Object} attributes
|
|
6
6
|
*/
|
|
7
|
-
export function prepareAttributesDefinitions(newDefinitions: Object, presentDefinitions?: Object): Object;
|
|
7
|
+
export declare function prepareAttributesDefinitions(newDefinitions: Object, presentDefinitions?: Object): Object;
|
|
8
8
|
/**
|
|
9
9
|
* Iterate over attributes.
|
|
10
10
|
* @param {Object} attribute definition
|
|
@@ -12,7 +12,7 @@ export function prepareAttributesDefinitions(newDefinitions: Object, presentDefi
|
|
|
12
12
|
* @param {string[]} [path]
|
|
13
13
|
* @return {Iterable<[string[],object]>}
|
|
14
14
|
*/
|
|
15
|
-
export function attributeIterator(definition: any, filter?: Function, path?: string[]): Iterable<[string[], object]>;
|
|
15
|
+
export declare function attributeIterator(definition: any, filter?: Function, path?: string[]): Iterable<[string[], object]>;
|
|
16
16
|
/**
|
|
17
17
|
* Iterate over all attributes of a type.
|
|
18
18
|
* @param {Type} type definition
|
|
@@ -20,10 +20,10 @@ export function attributeIterator(definition: any, filter?: Function, path?: str
|
|
|
20
20
|
* @param {string[]} [path]
|
|
21
21
|
* @return {Iterable<[string[],object]>}
|
|
22
22
|
*/
|
|
23
|
-
export function extendingAttributeIterator(type: Type, filter?: Function, path?: string[]): Iterable<[string[], object]>;
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export function
|
|
27
|
-
export function
|
|
28
|
-
export function
|
|
29
|
-
export function
|
|
23
|
+
export declare function extendingAttributeIterator(type: Type, filter?: Function, path?: string[]): Iterable<[string[], object]>;
|
|
24
|
+
export declare const filterWritable: (attribute: any) => any;
|
|
25
|
+
export declare const filterPublic: (attribute: any) => boolean;
|
|
26
|
+
export declare function writableAttributeIterator(definition: any): Generator<[string[], object], void, any>;
|
|
27
|
+
export declare function toInternal(value: any, attribute: any): any;
|
|
28
|
+
export declare function toExternal(value: any, attribute: any): any;
|
|
29
|
+
export declare function mandatoryAttributesPresent(object: any, attributes: any): boolean;
|
package/types/bytes.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export function formatBytes(bytes: any, decimals?: number): string;
|
|
1
|
+
export declare function formatBytes(bytes: any, decimals?: number): string;
|
|
2
2
|
/**
|
|
3
3
|
* Convert byte size formatted string into number of bytes.
|
|
4
4
|
* @param {number|string} value
|
|
5
5
|
* @returns {number} number of total bytes
|
|
6
6
|
*/
|
|
7
|
-
export function parseBytes(value: number | string): number;
|
|
7
|
+
export declare function parseBytes(value: number | string): number;
|
|
@@ -1,3 +1,83 @@
|
|
|
1
|
+
export type AttributeDefinition = {
|
|
2
|
+
name: string;
|
|
3
|
+
type: Type;
|
|
4
|
+
/**
|
|
5
|
+
* are we an identifying attribute
|
|
6
|
+
*/
|
|
7
|
+
key: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* can this attribute be modified
|
|
10
|
+
*/
|
|
11
|
+
writable: boolean;
|
|
12
|
+
mandatory: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* are we a collection (set, map, array, object)
|
|
15
|
+
*/
|
|
16
|
+
collection: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* should the value be shown
|
|
19
|
+
*/
|
|
20
|
+
private?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* any type of credential
|
|
23
|
+
*/
|
|
24
|
+
credential?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* should we be stored (especially critical for credentials)
|
|
27
|
+
*/
|
|
28
|
+
persistent?: boolean;
|
|
29
|
+
backpointer?: AttributeDefinition;
|
|
30
|
+
/**
|
|
31
|
+
* (collection) constructor
|
|
32
|
+
*/
|
|
33
|
+
constructor?: Function;
|
|
34
|
+
/**
|
|
35
|
+
* name of an attribute we depend on
|
|
36
|
+
*/
|
|
37
|
+
depends?: string;
|
|
38
|
+
/**
|
|
39
|
+
* human readable
|
|
40
|
+
*/
|
|
41
|
+
description?: string;
|
|
42
|
+
/**
|
|
43
|
+
* the default value
|
|
44
|
+
*/
|
|
45
|
+
default?: any;
|
|
46
|
+
/**
|
|
47
|
+
* set the value
|
|
48
|
+
*/
|
|
49
|
+
set?: Function;
|
|
50
|
+
/**
|
|
51
|
+
* get the value can be used to calculate default values
|
|
52
|
+
*/
|
|
53
|
+
get?: Function;
|
|
54
|
+
toInternal?: Function;
|
|
55
|
+
toExternal?: Function;
|
|
56
|
+
/**
|
|
57
|
+
* deliver key and value for Map insertion
|
|
58
|
+
*/
|
|
59
|
+
asMapEntry?: Function;
|
|
60
|
+
/**
|
|
61
|
+
* attribute name used by external system
|
|
62
|
+
*/
|
|
63
|
+
externalName?: string;
|
|
64
|
+
/**
|
|
65
|
+
* allowed values
|
|
66
|
+
*/
|
|
67
|
+
values?: Set<any>;
|
|
68
|
+
/**
|
|
69
|
+
* environment variable(s) used to provide the value
|
|
70
|
+
*/
|
|
71
|
+
env?: string[] | string;
|
|
72
|
+
/**
|
|
73
|
+
* other values to be set in case our attribute is set
|
|
74
|
+
*/
|
|
75
|
+
additionalValues?: object;
|
|
76
|
+
/**
|
|
77
|
+
* separator for collections
|
|
78
|
+
*/
|
|
79
|
+
separator?: string;
|
|
80
|
+
};
|
|
1
81
|
/**
|
|
2
82
|
* @typedef {Object} AttributeDefinition
|
|
3
83
|
*
|
|
@@ -30,344 +110,300 @@
|
|
|
30
110
|
* Common attribute properties.
|
|
31
111
|
* @type {AttributeDefinition}
|
|
32
112
|
*/
|
|
33
|
-
export const default_attribute: AttributeDefinition;
|
|
113
|
+
export declare const default_attribute: AttributeDefinition;
|
|
34
114
|
/**
|
|
35
115
|
* @type {AttributeDefinition}
|
|
36
116
|
*/
|
|
37
|
-
export const default_attribute_writable: AttributeDefinition;
|
|
117
|
+
export declare const default_attribute_writable: AttributeDefinition;
|
|
38
118
|
/**
|
|
39
119
|
* @type {AttributeDefinition}
|
|
40
120
|
*/
|
|
41
|
-
export const default_collection_attribute: AttributeDefinition;
|
|
121
|
+
export declare const default_collection_attribute: AttributeDefinition;
|
|
42
122
|
/**
|
|
43
123
|
* @type {AttributeDefinition}
|
|
44
124
|
*/
|
|
45
|
-
export const default_collection_attribute_writable: AttributeDefinition;
|
|
125
|
+
export declare const default_collection_attribute_writable: AttributeDefinition;
|
|
46
126
|
/**
|
|
47
127
|
* @type {AttributeDefinition}
|
|
48
128
|
*/
|
|
49
|
-
export const string_attribute: AttributeDefinition;
|
|
129
|
+
export declare const string_attribute: AttributeDefinition;
|
|
50
130
|
/**
|
|
51
131
|
* @type {AttributeDefinition}
|
|
52
132
|
*/
|
|
53
|
-
export const string_attribute_writable: AttributeDefinition;
|
|
133
|
+
export declare const string_attribute_writable: AttributeDefinition;
|
|
54
134
|
/**
|
|
55
135
|
* @type {AttributeDefinition}
|
|
56
136
|
*/
|
|
57
|
-
export const string_collection_attribute: AttributeDefinition;
|
|
137
|
+
export declare const string_collection_attribute: AttributeDefinition;
|
|
58
138
|
/**
|
|
59
139
|
* @type {AttributeDefinition}
|
|
60
140
|
*/
|
|
61
|
-
export const string_collection_attribute_writable: AttributeDefinition;
|
|
141
|
+
export declare const string_collection_attribute_writable: AttributeDefinition;
|
|
62
142
|
/**
|
|
63
143
|
* @type {AttributeDefinition}
|
|
64
144
|
*/
|
|
65
|
-
export const string_set_attribute: AttributeDefinition;
|
|
145
|
+
export declare const string_set_attribute: AttributeDefinition;
|
|
66
146
|
/**
|
|
67
147
|
* @type {AttributeDefinition}
|
|
68
148
|
*/
|
|
69
|
-
export const string_set_attribute_writable: AttributeDefinition;
|
|
149
|
+
export declare const string_set_attribute_writable: AttributeDefinition;
|
|
70
150
|
/**
|
|
71
151
|
* @type {AttributeDefinition}
|
|
72
152
|
*/
|
|
73
|
-
export const name_attribute: AttributeDefinition;
|
|
153
|
+
export declare const name_attribute: AttributeDefinition;
|
|
74
154
|
/**
|
|
75
155
|
* @type {AttributeDefinition}
|
|
76
156
|
*/
|
|
77
|
-
export const name_attribute_writable: AttributeDefinition;
|
|
157
|
+
export declare const name_attribute_writable: AttributeDefinition;
|
|
78
158
|
/**
|
|
79
159
|
* @type {AttributeDefinition}
|
|
80
160
|
*/
|
|
81
|
-
export const email_attribute: AttributeDefinition;
|
|
161
|
+
export declare const email_attribute: AttributeDefinition;
|
|
82
162
|
/**
|
|
83
163
|
* @type {AttributeDefinition}
|
|
84
164
|
*/
|
|
85
|
-
export const version_attribute: AttributeDefinition;
|
|
165
|
+
export declare const version_attribute: AttributeDefinition;
|
|
86
166
|
/**
|
|
87
167
|
* @type {AttributeDefinition}
|
|
88
168
|
*/
|
|
89
|
-
export const version_attribute_writable: AttributeDefinition;
|
|
169
|
+
export declare const version_attribute_writable: AttributeDefinition;
|
|
90
170
|
/**
|
|
91
171
|
* The description of the object content.
|
|
92
172
|
* @type {AttributeDefinition}
|
|
93
173
|
*/
|
|
94
|
-
export const description_attribute: AttributeDefinition;
|
|
174
|
+
export declare const description_attribute: AttributeDefinition;
|
|
175
|
+
export { description_attribute as description_attribute_writable };
|
|
176
|
+
/**
|
|
177
|
+
* @type {AttributeDefinition}
|
|
178
|
+
*/
|
|
179
|
+
export declare const type_attribute: AttributeDefinition;
|
|
95
180
|
/**
|
|
96
181
|
* @type {AttributeDefinition}
|
|
97
182
|
*/
|
|
98
|
-
export const
|
|
183
|
+
export declare const type_attribute_writable: AttributeDefinition;
|
|
99
184
|
/**
|
|
100
185
|
* @type {AttributeDefinition}
|
|
101
186
|
*/
|
|
102
|
-
export const
|
|
187
|
+
export declare const state_attribute_writable: AttributeDefinition;
|
|
103
188
|
/**
|
|
104
189
|
* @type {AttributeDefinition}
|
|
105
190
|
*/
|
|
106
|
-
export const
|
|
191
|
+
export declare const boolean_attribute: AttributeDefinition;
|
|
107
192
|
/**
|
|
108
193
|
* @type {AttributeDefinition}
|
|
109
194
|
*/
|
|
110
|
-
export const
|
|
195
|
+
export declare const boolean_attribute_writable: AttributeDefinition;
|
|
111
196
|
/**
|
|
112
197
|
* @type {AttributeDefinition}
|
|
113
198
|
*/
|
|
114
|
-
export const
|
|
199
|
+
export declare const boolean_attribute_writable_true: AttributeDefinition;
|
|
115
200
|
/**
|
|
116
201
|
* @type {AttributeDefinition}
|
|
117
202
|
*/
|
|
118
|
-
export const
|
|
203
|
+
export declare const boolean_attribute_writable_false: AttributeDefinition;
|
|
204
|
+
/**
|
|
205
|
+
* @type {AttributeDefinition}
|
|
206
|
+
*/
|
|
207
|
+
export declare const boolean_attribute_false: AttributeDefinition;
|
|
208
|
+
/**
|
|
209
|
+
* @type {AttributeDefinition}
|
|
210
|
+
*/
|
|
211
|
+
export { boolean_attribute_writable_true as active_attribute };
|
|
212
|
+
/**
|
|
213
|
+
* @type {AttributeDefinition}
|
|
214
|
+
*/
|
|
215
|
+
export declare const yesno_attribute: AttributeDefinition;
|
|
216
|
+
export declare const yesno_attribute_writable: {
|
|
217
|
+
name: string;
|
|
218
|
+
type: Type;
|
|
219
|
+
key: boolean;
|
|
220
|
+
mandatory: boolean;
|
|
221
|
+
collection: boolean;
|
|
222
|
+
private?: boolean;
|
|
223
|
+
credential?: boolean;
|
|
224
|
+
persistent?: boolean;
|
|
225
|
+
backpointer?: AttributeDefinition;
|
|
226
|
+
constructor?: Function | undefined;
|
|
227
|
+
depends?: string;
|
|
228
|
+
description?: string;
|
|
229
|
+
default?: any;
|
|
230
|
+
set?: Function | undefined;
|
|
231
|
+
get?: Function | undefined;
|
|
232
|
+
toInternal?: Function | undefined;
|
|
233
|
+
toExternal?: Function | undefined;
|
|
234
|
+
asMapEntry?: Function | undefined;
|
|
235
|
+
externalName?: string;
|
|
236
|
+
values?: Set<any>;
|
|
237
|
+
env?: string[] | string;
|
|
238
|
+
additionalValues?: object;
|
|
239
|
+
separator?: string;
|
|
240
|
+
writable: boolean;
|
|
241
|
+
};
|
|
119
242
|
/**
|
|
120
243
|
* @type {AttributeDefinition}
|
|
121
244
|
*/
|
|
122
|
-
export const
|
|
245
|
+
export declare const empty_attribute: AttributeDefinition;
|
|
123
246
|
/**
|
|
124
247
|
* @type {AttributeDefinition}
|
|
125
248
|
*/
|
|
126
|
-
export const
|
|
249
|
+
export declare const uuid_attribute: AttributeDefinition;
|
|
127
250
|
/**
|
|
128
251
|
* @type {AttributeDefinition}
|
|
129
252
|
*/
|
|
130
|
-
export const
|
|
131
|
-
export namespace yesno_attribute_writable {
|
|
132
|
-
export let writable: boolean;
|
|
133
|
-
export let name: string;
|
|
134
|
-
export let type: Type;
|
|
135
|
-
export let key: boolean;
|
|
136
|
-
export let mandatory: boolean;
|
|
137
|
-
export let collection: boolean;
|
|
138
|
-
let _private: boolean | undefined;
|
|
139
|
-
export { _private as private };
|
|
140
|
-
export let credential: boolean | undefined;
|
|
141
|
-
export let persistent: boolean | undefined;
|
|
142
|
-
export let backpointer: AttributeDefinition | undefined;
|
|
143
|
-
export let constructor: Function | undefined;
|
|
144
|
-
export let depends: string | undefined;
|
|
145
|
-
export let description: string | undefined;
|
|
146
|
-
let _default: any;
|
|
147
|
-
export { _default as default };
|
|
148
|
-
export let set: Function | undefined;
|
|
149
|
-
export let get: Function | undefined;
|
|
150
|
-
export let toInternal: Function | undefined;
|
|
151
|
-
export let toExternal: Function | undefined;
|
|
152
|
-
export let asMapEntry: Function | undefined;
|
|
153
|
-
export let externalName: string | undefined;
|
|
154
|
-
export let values: Set<any> | undefined;
|
|
155
|
-
export let env: string | string[] | undefined;
|
|
156
|
-
export let additionalValues: object | undefined;
|
|
157
|
-
export let separator: string | undefined;
|
|
158
|
-
}
|
|
253
|
+
export declare const secret_attribute: AttributeDefinition;
|
|
159
254
|
/**
|
|
160
255
|
* @type {AttributeDefinition}
|
|
161
256
|
*/
|
|
162
|
-
export const
|
|
257
|
+
export declare const secret_attribute_writable: AttributeDefinition;
|
|
163
258
|
/**
|
|
164
259
|
* @type {AttributeDefinition}
|
|
165
260
|
*/
|
|
166
|
-
export const
|
|
261
|
+
export declare const username_attribute: AttributeDefinition;
|
|
167
262
|
/**
|
|
168
263
|
* @type {AttributeDefinition}
|
|
169
264
|
*/
|
|
170
|
-
export const
|
|
265
|
+
export declare const password_attribute: AttributeDefinition;
|
|
171
266
|
/**
|
|
172
267
|
* @type {AttributeDefinition}
|
|
173
268
|
*/
|
|
174
|
-
export const
|
|
269
|
+
export declare const token_attribute: AttributeDefinition;
|
|
175
270
|
/**
|
|
176
271
|
* @type {AttributeDefinition}
|
|
177
272
|
*/
|
|
178
|
-
export
|
|
273
|
+
export { secret_attribute as certificate_attribute };
|
|
179
274
|
/**
|
|
180
275
|
* @type {AttributeDefinition}
|
|
181
276
|
*/
|
|
182
|
-
export const
|
|
277
|
+
export declare const private_key_attribute: AttributeDefinition;
|
|
183
278
|
/**
|
|
184
279
|
* @type {AttributeDefinition}
|
|
185
280
|
*/
|
|
186
|
-
export const
|
|
281
|
+
export declare const public_key_attribute: AttributeDefinition;
|
|
187
282
|
/**
|
|
188
283
|
* @type {AttributeDefinition}
|
|
189
284
|
*/
|
|
190
|
-
export const
|
|
285
|
+
export declare const number_attribute: AttributeDefinition;
|
|
191
286
|
/**
|
|
192
287
|
* @type {AttributeDefinition}
|
|
193
288
|
*/
|
|
194
|
-
export const
|
|
289
|
+
export declare const number_attribute_writable: AttributeDefinition;
|
|
195
290
|
/**
|
|
196
291
|
* @type {AttributeDefinition}
|
|
197
292
|
*/
|
|
198
|
-
export const
|
|
293
|
+
export declare const integer_attribute: AttributeDefinition;
|
|
199
294
|
/**
|
|
200
295
|
* @type {AttributeDefinition}
|
|
201
296
|
*/
|
|
202
|
-
export const
|
|
297
|
+
export declare const integer_attribute_writable: AttributeDefinition;
|
|
203
298
|
/**
|
|
204
299
|
* @type {AttributeDefinition}
|
|
205
300
|
*/
|
|
206
|
-
export
|
|
301
|
+
export { integer_attribute as count_attribute };
|
|
207
302
|
/**
|
|
208
303
|
* @type {AttributeDefinition}
|
|
209
304
|
*/
|
|
210
|
-
export
|
|
305
|
+
export { integer_attribute_writable as count_attribute_writable };
|
|
211
306
|
/**
|
|
212
307
|
* @type {AttributeDefinition}
|
|
213
308
|
*/
|
|
214
|
-
export const size_attribute: AttributeDefinition;
|
|
215
|
-
export
|
|
216
|
-
|
|
309
|
+
export declare const size_attribute: AttributeDefinition;
|
|
310
|
+
export declare const bytes_size_attribute: {
|
|
311
|
+
key: boolean;
|
|
312
|
+
writable: boolean;
|
|
313
|
+
mandatory: boolean;
|
|
314
|
+
collection: boolean;
|
|
315
|
+
private?: boolean;
|
|
316
|
+
credential?: boolean;
|
|
317
|
+
persistent?: boolean;
|
|
318
|
+
backpointer?: AttributeDefinition;
|
|
319
|
+
constructor?: Function | undefined;
|
|
320
|
+
depends?: string;
|
|
321
|
+
description?: string;
|
|
322
|
+
default?: any;
|
|
323
|
+
set?: Function | undefined;
|
|
324
|
+
get?: Function | undefined;
|
|
325
|
+
toInternal?: Function | undefined;
|
|
326
|
+
toExternal?: Function | undefined;
|
|
327
|
+
asMapEntry?: Function | undefined;
|
|
328
|
+
externalName?: string;
|
|
329
|
+
values?: Set<any>;
|
|
330
|
+
env?: string[] | string;
|
|
331
|
+
additionalValues?: object;
|
|
332
|
+
separator?: string;
|
|
333
|
+
type: {
|
|
217
334
|
name: string;
|
|
218
335
|
primitive: boolean;
|
|
219
336
|
toInternal: typeof import("./bytes.mjs").parseBytes;
|
|
220
337
|
};
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
export { name_1 as name };
|
|
224
|
-
let writable_1: boolean;
|
|
225
|
-
export { writable_1 as writable };
|
|
226
|
-
}
|
|
338
|
+
name: string;
|
|
339
|
+
};
|
|
227
340
|
/**
|
|
228
341
|
* @type {AttributeDefinition}
|
|
229
342
|
*/
|
|
230
|
-
export const object_attribute: AttributeDefinition;
|
|
343
|
+
export declare const object_attribute: AttributeDefinition;
|
|
231
344
|
/**
|
|
232
345
|
* @type {AttributeDefinition}
|
|
233
346
|
*/
|
|
234
|
-
export const url_attribute: AttributeDefinition;
|
|
347
|
+
export declare const url_attribute: AttributeDefinition;
|
|
235
348
|
/**
|
|
236
349
|
* @type {AttributeDefinition}
|
|
237
350
|
*/
|
|
238
|
-
export const url_attribute_writable: AttributeDefinition;
|
|
351
|
+
export declare const url_attribute_writable: AttributeDefinition;
|
|
239
352
|
/**
|
|
240
353
|
* @type {AttributeDefinition}
|
|
241
354
|
*/
|
|
242
|
-
export const hostname_attribute: AttributeDefinition;
|
|
355
|
+
export declare const hostname_attribute: AttributeDefinition;
|
|
243
356
|
/**
|
|
244
357
|
* @type {AttributeDefinition}
|
|
245
358
|
*/
|
|
246
|
-
export const port_attribute: AttributeDefinition;
|
|
359
|
+
export declare const port_attribute: AttributeDefinition;
|
|
247
360
|
/**
|
|
248
361
|
* @type {AttributeDefinition}
|
|
249
362
|
*/
|
|
250
|
-
export const port_attribute_writable: AttributeDefinition;
|
|
363
|
+
export declare const port_attribute_writable: AttributeDefinition;
|
|
251
364
|
/**
|
|
252
365
|
* Unique id within.
|
|
253
366
|
* @type {AttributeDefinition}
|
|
254
367
|
*/
|
|
255
|
-
export const id_attribute: AttributeDefinition;
|
|
368
|
+
export declare const id_attribute: AttributeDefinition;
|
|
256
369
|
/**
|
|
257
370
|
* The body text.
|
|
258
371
|
* @type {AttributeDefinition}
|
|
259
372
|
*/
|
|
260
|
-
export const body_attribute_writable: AttributeDefinition;
|
|
373
|
+
export declare const body_attribute_writable: AttributeDefinition;
|
|
261
374
|
/**
|
|
262
375
|
* The one line description.
|
|
263
376
|
* @type {AttributeDefinition}
|
|
264
377
|
*/
|
|
265
|
-
export const title_attribute_writable: AttributeDefinition;
|
|
378
|
+
export declare const title_attribute_writable: AttributeDefinition;
|
|
266
379
|
/**
|
|
267
380
|
* In case there are several providers able to support a given source which one sould be used ?
|
|
268
381
|
* this defines the order.
|
|
269
382
|
* @type {AttributeDefinition}
|
|
270
383
|
*/
|
|
271
|
-
export const priority_attribute: AttributeDefinition;
|
|
384
|
+
export declare const priority_attribute: AttributeDefinition;
|
|
385
|
+
/**
|
|
386
|
+
* @type {AttributeDefinition}
|
|
387
|
+
*/
|
|
388
|
+
export { priority_attribute as priority_attribute_writable };
|
|
272
389
|
/**
|
|
273
390
|
* Duration in seconds.
|
|
274
391
|
* @type {AttributeDefinition}
|
|
275
392
|
*/
|
|
276
|
-
export const duration_attribute: AttributeDefinition;
|
|
393
|
+
export declare const duration_attribute: AttributeDefinition;
|
|
277
394
|
/**
|
|
278
395
|
* @type {AttributeDefinition}
|
|
279
396
|
*/
|
|
280
|
-
export const duration_attribute_writable: AttributeDefinition;
|
|
397
|
+
export declare const duration_attribute_writable: AttributeDefinition;
|
|
281
398
|
/**
|
|
282
399
|
* @type {AttributeDefinition}
|
|
283
400
|
*/
|
|
284
|
-
export const duration_ms_attribute: AttributeDefinition;
|
|
401
|
+
export declare const duration_ms_attribute: AttributeDefinition;
|
|
285
402
|
/**
|
|
286
403
|
* @type {AttributeDefinition}
|
|
287
404
|
*/
|
|
288
|
-
export const timeout_attribute: AttributeDefinition;
|
|
405
|
+
export declare const timeout_attribute: AttributeDefinition;
|
|
289
406
|
/**
|
|
290
407
|
* @type {AttributeDefinition}
|
|
291
408
|
*/
|
|
292
|
-
export const language_attribute: AttributeDefinition;
|
|
293
|
-
export type AttributeDefinition = {
|
|
294
|
-
name: string;
|
|
295
|
-
type: Type;
|
|
296
|
-
/**
|
|
297
|
-
* are we an identifying attribute
|
|
298
|
-
*/
|
|
299
|
-
key: boolean;
|
|
300
|
-
/**
|
|
301
|
-
* can this attribute be modified
|
|
302
|
-
*/
|
|
303
|
-
writable: boolean;
|
|
304
|
-
mandatory: boolean;
|
|
305
|
-
/**
|
|
306
|
-
* are we a collection (set, map, array, object)
|
|
307
|
-
*/
|
|
308
|
-
collection: boolean;
|
|
309
|
-
/**
|
|
310
|
-
* should the value be shown
|
|
311
|
-
*/
|
|
312
|
-
private?: boolean | undefined;
|
|
313
|
-
/**
|
|
314
|
-
* any type of credential
|
|
315
|
-
*/
|
|
316
|
-
credential?: boolean | undefined;
|
|
317
|
-
/**
|
|
318
|
-
* should we be stored (especially critical for credentials)
|
|
319
|
-
*/
|
|
320
|
-
persistent?: boolean | undefined;
|
|
321
|
-
backpointer?: AttributeDefinition | undefined;
|
|
322
|
-
/**
|
|
323
|
-
* (collection) constructor
|
|
324
|
-
*/
|
|
325
|
-
constructor?: Function | undefined;
|
|
326
|
-
/**
|
|
327
|
-
* name of an attribute we depend on
|
|
328
|
-
*/
|
|
329
|
-
depends?: string | undefined;
|
|
330
|
-
/**
|
|
331
|
-
* human readable
|
|
332
|
-
*/
|
|
333
|
-
description?: string | undefined;
|
|
334
|
-
/**
|
|
335
|
-
* the default value
|
|
336
|
-
*/
|
|
337
|
-
default?: any;
|
|
338
|
-
/**
|
|
339
|
-
* set the value
|
|
340
|
-
*/
|
|
341
|
-
set?: Function | undefined;
|
|
342
|
-
/**
|
|
343
|
-
* get the value can be used to calculate default values
|
|
344
|
-
*/
|
|
345
|
-
get?: Function | undefined;
|
|
346
|
-
toInternal?: Function | undefined;
|
|
347
|
-
toExternal?: Function | undefined;
|
|
348
|
-
/**
|
|
349
|
-
* deliver key and value for Map insertion
|
|
350
|
-
*/
|
|
351
|
-
asMapEntry?: Function | undefined;
|
|
352
|
-
/**
|
|
353
|
-
* attribute name used by external system
|
|
354
|
-
*/
|
|
355
|
-
externalName?: string | undefined;
|
|
356
|
-
/**
|
|
357
|
-
* allowed values
|
|
358
|
-
*/
|
|
359
|
-
values?: Set<any> | undefined;
|
|
360
|
-
/**
|
|
361
|
-
* environment variable(s) used to provide the value
|
|
362
|
-
*/
|
|
363
|
-
env?: string | string[] | undefined;
|
|
364
|
-
/**
|
|
365
|
-
* other values to be set in case our attribute is set
|
|
366
|
-
*/
|
|
367
|
-
additionalValues?: object | undefined;
|
|
368
|
-
/**
|
|
369
|
-
* separator for collections
|
|
370
|
-
*/
|
|
371
|
-
separator?: string | undefined;
|
|
372
|
-
};
|
|
373
|
-
export { description_attribute as description_attribute_writable, boolean_attribute_writable_true as active_attribute, secret_attribute as certificate_attribute, integer_attribute as count_attribute, integer_attribute_writable as count_attribute_writable, priority_attribute as priority_attribute_writable };
|
|
409
|
+
export declare const language_attribute: AttributeDefinition;
|
package/types/environment.d.mts
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* @param {string} instanceIdentifier part of variable name.
|
|
6
6
|
* @return {Object|undefined} undefined if no suitable environment variables have been found
|
|
7
7
|
*/
|
|
8
|
-
export function environmentValues(env: Object, attributes: Object, instanceIdentifier: string): Object | undefined;
|
|
8
|
+
export declare function environmentValues(env: Object, attributes: Object, instanceIdentifier: string): Object | undefined;
|
package/types/expand.d.mts
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
declare class _Dummy {
|
|
2
|
+
}
|
|
3
|
+
/**
|
|
4
|
+
* Default expand context
|
|
5
|
+
* using '§{' and '}' as lead in/out
|
|
6
|
+
*/
|
|
7
|
+
export declare const expandContextDefault: {
|
|
8
|
+
root: {};
|
|
9
|
+
leadIn: string;
|
|
10
|
+
leadOut: string;
|
|
11
|
+
stopClass: typeof _Dummy;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Expand context with doubble curly separaion '{{' '}}'
|
|
15
|
+
*/
|
|
16
|
+
export declare const expandContextDoubbleCurly: {
|
|
17
|
+
root: {};
|
|
18
|
+
stopClass: typeof _Dummy;
|
|
19
|
+
leadIn: string;
|
|
20
|
+
leadOut: string;
|
|
21
|
+
};
|
|
1
22
|
/**
|
|
2
23
|
* Expand expressions inside of object graphs.
|
|
3
24
|
* @param {any} object
|
|
@@ -8,24 +29,10 @@
|
|
|
8
29
|
* @param {string} [context.leadOut] ending separator
|
|
9
30
|
* @returns {any|Promise<any>}
|
|
10
31
|
*/
|
|
11
|
-
export function expand(object: any, context: {
|
|
32
|
+
export declare function expand(object: any, context: {
|
|
12
33
|
root?: any;
|
|
13
|
-
stopClass?: Function
|
|
14
|
-
leadIn?: string
|
|
15
|
-
leadOut?: string
|
|
34
|
+
stopClass?: Function;
|
|
35
|
+
leadIn?: string;
|
|
36
|
+
leadOut?: string;
|
|
16
37
|
}): any | Promise<any>;
|
|
17
|
-
export namespace expandContextDefault {
|
|
18
|
-
export let root: {};
|
|
19
|
-
export let leadIn: string;
|
|
20
|
-
export let leadOut: string;
|
|
21
|
-
export { _Dummy as stopClass };
|
|
22
|
-
}
|
|
23
|
-
export namespace expandContextDoubbleCurly {
|
|
24
|
-
let leadIn_1: string;
|
|
25
|
-
export { leadIn_1 as leadIn };
|
|
26
|
-
let leadOut_1: string;
|
|
27
|
-
export { leadOut_1 as leadOut };
|
|
28
|
-
}
|
|
29
|
-
declare class _Dummy {
|
|
30
|
-
}
|
|
31
38
|
export {};
|
package/types/extract.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function extract(object: any, type?: any): {};
|
|
1
|
+
export declare function extract(object: any, type?: any): {};
|
package/types/filter.d.mts
CHANGED
package/types/multiple.d.mts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @param {Object} definitions attribute definitions to be used
|
|
6
6
|
* @param {function?} cb callback to be executed for each copied value
|
|
7
7
|
*/
|
|
8
|
-
export function setAttributes(object: Object, source: Object, definitions: Object, cb: Function | null): void;
|
|
8
|
+
export declare function setAttributes(object: Object, source: Object, definitions: Object, cb: Function | null): void;
|
|
9
9
|
/**
|
|
10
10
|
* Retrive attribute values from an object.
|
|
11
11
|
* @param {Object} object attribute value source
|
|
@@ -13,7 +13,7 @@ export function setAttributes(object: Object, source: Object, definitions: Objec
|
|
|
13
13
|
* @param {Function} [filter]
|
|
14
14
|
* @return {Object} values
|
|
15
15
|
*/
|
|
16
|
-
export function getAttributes(object: Object, definitions: Object, filter?: Function): Object;
|
|
16
|
+
export declare function getAttributes(object: Object, definitions: Object, filter?: Function): Object;
|
|
17
17
|
/**
|
|
18
18
|
* Retrive attribute values from an object.
|
|
19
19
|
* @param {Object} object attribute value source
|
|
@@ -21,4 +21,4 @@ export function getAttributes(object: Object, definitions: Object, filter?: Func
|
|
|
21
21
|
* @param {Function} [filter]
|
|
22
22
|
* @return {Object} values
|
|
23
23
|
*/
|
|
24
|
-
export function getAttributesJSON(object: Object, definitions: Object, filter?: Function): Object;
|
|
24
|
+
export declare function getAttributesJSON(object: Object, definitions: Object, filter?: Function): Object;
|
package/types/parser.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function parseOnly(input: any, context: any): any;
|
|
2
|
-
export function parse(input: any, context?: {}): any;
|
|
1
|
+
export declare function parseOnly(input: any, context: any): any;
|
|
2
|
+
export declare function parse(input: any, context?: {}): any;
|
package/types/properties.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function definePropertiesFromAttributes(object: any, attributes: any, initialValues: any, properties?: {}): void;
|
|
1
|
+
export declare function definePropertiesFromAttributes(object: any, attributes: any, initialValues: any, properties?: {}): void;
|
package/types/settergetter.d.mts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import('./tokens.mjs').Token} Token
|
|
3
|
+
*/
|
|
4
|
+
export type Token = import('./tokens.mjs').Token;
|
|
1
5
|
/**
|
|
2
6
|
* Set object attribute.
|
|
3
7
|
* The name may be a property path like 'a.b.c'.
|
|
@@ -6,7 +10,7 @@
|
|
|
6
10
|
* @param {any} value
|
|
7
11
|
* @param {Object} [definition] type def
|
|
8
12
|
*/
|
|
9
|
-
export function setAttribute(object: Object, expression: string, value: any, definition?: Object): void;
|
|
13
|
+
export declare function setAttribute(object: Object, expression: string, value: any, definition?: Object): void;
|
|
10
14
|
/**
|
|
11
15
|
* Deliver attribute value.
|
|
12
16
|
* The name may be a property path like 'a.b.c' or a[2]
|
|
@@ -15,7 +19,7 @@ export function setAttribute(object: Object, expression: string, value: any, def
|
|
|
15
19
|
* @param {Object} [definition]
|
|
16
20
|
* @returns {any} value associated with the given property name
|
|
17
21
|
*/
|
|
18
|
-
export function getAttribute(object: Object, expression: string, definition?: Object): any;
|
|
22
|
+
export declare function getAttribute(object: Object, expression: string, definition?: Object): any;
|
|
19
23
|
/**
|
|
20
24
|
* Deliver attribute value and operator.
|
|
21
25
|
* The name may be a property path like 'a.b.c <='.
|
|
@@ -23,5 +27,4 @@ export function getAttribute(object: Object, expression: string, definition?: Ob
|
|
|
23
27
|
* @param {string} expression
|
|
24
28
|
* @returns {[any,Token]} value associated with the given property name
|
|
25
29
|
*/
|
|
26
|
-
export function getAttributeAndOperator(object: Object, expression: string): [any, Token];
|
|
27
|
-
export type Token = import("./tokens.mjs").Token;
|
|
30
|
+
export declare function getAttributeAndOperator(object: Object, expression: string): [any, Token];
|
package/types/time.d.mts
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
* @param {number|string} value
|
|
4
4
|
* @returns {number} seconds
|
|
5
5
|
*/
|
|
6
|
-
export function parseDuration(value: number | string): number;
|
|
6
|
+
export declare function parseDuration(value: number | string): number;
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
9
9
|
* @param {number} seconds
|
|
10
10
|
* @returns {string} formatted duration
|
|
11
11
|
*/
|
|
12
|
-
export function formatDuration(seconds: number): string;
|
|
12
|
+
export declare function formatDuration(seconds: number): string;
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @param {number} seconds
|
|
16
16
|
* @returns {string} formatted duration
|
|
17
17
|
*/
|
|
18
|
-
export function formatDurationISO(seconds: number): string;
|
|
18
|
+
export declare function formatDurationISO(seconds: number): string;
|
package/types/tokens.d.mts
CHANGED
|
@@ -1,3 +1,77 @@
|
|
|
1
|
+
export type Token = {
|
|
2
|
+
str: string;
|
|
3
|
+
precedence: number;
|
|
4
|
+
led: Function;
|
|
5
|
+
nud: Function;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* @typedef {Object} Token
|
|
9
|
+
* @property {string} str
|
|
10
|
+
* @property {number} precedence
|
|
11
|
+
* @property {Function} led
|
|
12
|
+
* @property {Function} nud
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @param {Token} token
|
|
18
|
+
*/
|
|
19
|
+
export declare function registerToken(token: Token): Token;
|
|
20
|
+
export declare const PLUS: Token;
|
|
21
|
+
export declare const MINUS: Token;
|
|
22
|
+
export declare const STAR: Token;
|
|
23
|
+
export declare const DIVIDE: Token;
|
|
24
|
+
export declare const NOT: Token;
|
|
25
|
+
export declare const NOT_EQUAL: Token;
|
|
26
|
+
export declare const EQUAL: Token;
|
|
27
|
+
export declare const GREATER: Token;
|
|
28
|
+
export declare const GREATER_EQUAL: Token;
|
|
29
|
+
export declare const LESS: Token;
|
|
30
|
+
export declare const LESS_EQUAL: Token;
|
|
31
|
+
export declare const OPEN_ROUND: Token;
|
|
32
|
+
export declare const CLOSE_ROUND: Token;
|
|
33
|
+
export declare const OPEN_BRACKET: Token;
|
|
34
|
+
export declare const CLOSE_BRACKET: Token;
|
|
35
|
+
export declare const OPEN_CURLY: Token;
|
|
36
|
+
export declare const CLOSE_CURLY: Token;
|
|
37
|
+
export declare const QUESTION: Token;
|
|
38
|
+
export declare const COLON: Token;
|
|
39
|
+
export declare const SEMICOLON: Token;
|
|
40
|
+
export declare const COMMA: Token;
|
|
41
|
+
export declare const DOT: Token;
|
|
42
|
+
export declare const AMPERSAND: Token;
|
|
43
|
+
export declare const DOUBLE_AMPERSAND: Token;
|
|
44
|
+
export declare const BAR: Token;
|
|
45
|
+
export declare const DOUBLE_BAR: Token;
|
|
46
|
+
export declare const IDENTIFIER: Token;
|
|
47
|
+
export declare const STRING: Token;
|
|
48
|
+
export declare const NUMBER: Token;
|
|
49
|
+
export declare const BOOLEAN: Token;
|
|
50
|
+
export declare const EOF: Token;
|
|
51
|
+
export declare const keywords: {
|
|
52
|
+
true: (boolean | Token)[];
|
|
53
|
+
false: (boolean | Token)[];
|
|
54
|
+
};
|
|
55
|
+
export declare const globals: {
|
|
56
|
+
in: (args: any, current: any, context: any) => boolean;
|
|
57
|
+
ceil: (args: any, current: any, context: any) => number;
|
|
58
|
+
floor: (args: any, current: any, context: any) => number;
|
|
59
|
+
abs: (args: any, current: any, context: any) => number;
|
|
60
|
+
min: (args: any, current: any, context: any) => number;
|
|
61
|
+
max: (args: any, current: any, context: any) => number;
|
|
62
|
+
encodeURI: (args: any, current: any, context: any) => string;
|
|
63
|
+
decodeURI: (args: any, current: any, context: any) => string;
|
|
64
|
+
encodeURIComponent: (args: any, current: any, context: any) => string;
|
|
65
|
+
decodeURIComponent: (args: any, current: any, context: any) => string;
|
|
66
|
+
trim: (args: any, current: any, context: any) => any;
|
|
67
|
+
length: (args: any, current: any, context: any) => any;
|
|
68
|
+
uppercase: (args: any, current: any, context: any) => any;
|
|
69
|
+
lowercase: (args: any, current: any, context: any) => any;
|
|
70
|
+
substring: (args: any, current: any, context: any) => any;
|
|
71
|
+
join: (args: any, current: any, context: any) => any;
|
|
72
|
+
sort: (args: any, current: any, context: any) => any;
|
|
73
|
+
truncate: (args: any, current: any, context: any) => any;
|
|
74
|
+
};
|
|
1
75
|
/**
|
|
2
76
|
* Split expression path into tokens.
|
|
3
77
|
* @generator
|
|
@@ -5,69 +79,4 @@
|
|
|
5
79
|
* @param {Object} context
|
|
6
80
|
* @yields {Token}
|
|
7
81
|
*/
|
|
8
|
-
export function tokens(string: string, context: Object): Generator<any, void, unknown>;
|
|
9
|
-
export namespace PLUS {
|
|
10
|
-
let str: string;
|
|
11
|
-
}
|
|
12
|
-
export namespace MINUS {
|
|
13
|
-
function nud(parser: any): number;
|
|
14
|
-
}
|
|
15
|
-
export namespace STAR { }
|
|
16
|
-
export namespace DIVIDE { }
|
|
17
|
-
export namespace NOT { }
|
|
18
|
-
export namespace NOT_EQUAL { }
|
|
19
|
-
export namespace EQUAL { }
|
|
20
|
-
export namespace GREATER { }
|
|
21
|
-
export namespace GREATER_EQUAL { }
|
|
22
|
-
export namespace LESS { }
|
|
23
|
-
export namespace LESS_EQUAL { }
|
|
24
|
-
export namespace OPEN_ROUND { }
|
|
25
|
-
export namespace CLOSE_ROUND { }
|
|
26
|
-
export namespace OPEN_BRACKET { }
|
|
27
|
-
export namespace CLOSE_BRACKET { }
|
|
28
|
-
export namespace OPEN_CURLY { }
|
|
29
|
-
export namespace CLOSE_CURLY { }
|
|
30
|
-
export namespace QUESTION { }
|
|
31
|
-
export namespace COLON { }
|
|
32
|
-
export namespace SEMICOLON { }
|
|
33
|
-
export namespace COMMA { }
|
|
34
|
-
export namespace DOT { }
|
|
35
|
-
export namespace AMPERSAND { }
|
|
36
|
-
export namespace DOUBLE_AMPERSAND { }
|
|
37
|
-
export namespace BAR { }
|
|
38
|
-
export namespace DOUBLE_BAR { }
|
|
39
|
-
export namespace IDENTIFIER { }
|
|
40
|
-
export namespace STRING { }
|
|
41
|
-
export namespace NUMBER { }
|
|
42
|
-
export namespace BOOLEAN { }
|
|
43
|
-
export namespace EOF { }
|
|
44
|
-
export namespace keywords {
|
|
45
|
-
let _true: (boolean | Token)[];
|
|
46
|
-
export { _true as true };
|
|
47
|
-
let _false: (boolean | Token)[];
|
|
48
|
-
export { _false as false };
|
|
49
|
-
}
|
|
50
|
-
export namespace globals {
|
|
51
|
-
export function _in(args: any, current: any, context: any): boolean;
|
|
52
|
-
export { _in as in };
|
|
53
|
-
export function ceil(args: any, current: any, context: any): number;
|
|
54
|
-
export function floor(args: any, current: any, context: any): number;
|
|
55
|
-
export function abs(args: any, current: any, context: any): number;
|
|
56
|
-
export function min(args: any, current: any, context: any): number;
|
|
57
|
-
export function max(args: any, current: any, context: any): number;
|
|
58
|
-
export function encodeURI(args: any, current: any, context: any): string;
|
|
59
|
-
export function decodeURI(args: any, current: any, context: any): string;
|
|
60
|
-
export function encodeURIComponent(args: any, current: any, context: any): string;
|
|
61
|
-
export function decodeURIComponent(args: any, current: any, context: any): string;
|
|
62
|
-
export function trim(args: any, current: any, context: any): any;
|
|
63
|
-
export function length(args: any, current: any, context: any): any;
|
|
64
|
-
export function uppercase(args: any, current: any, context: any): any;
|
|
65
|
-
export function lowercase(args: any, current: any, context: any): any;
|
|
66
|
-
export function substring(args: any, current: any, context: any): any;
|
|
67
|
-
export function join(args: any, current: any, context: any): any;
|
|
68
|
-
export function sort(args: any, current: any, context: any): any;
|
|
69
|
-
export function truncate(args: any, current: any, context: any): any;
|
|
70
|
-
}
|
|
71
|
-
export type Token = {
|
|
72
|
-
str: string;
|
|
73
|
-
};
|
|
82
|
+
export declare function tokens(string: string, context: Object): Generator<any, void, unknown>;
|
package/types/types.d.mts
CHANGED
|
@@ -1,8 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { parseBytes } from "./bytes.mjs";
|
|
2
|
+
export type Type = {
|
|
3
|
+
name: string;
|
|
4
|
+
primitive?: boolean;
|
|
5
|
+
extends?: Type;
|
|
6
|
+
members?: Set<Type>;
|
|
7
|
+
clazz?: Function;
|
|
8
|
+
toInternal?: Function;
|
|
9
|
+
toExternal?: Function;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @typedef {Object} Type
|
|
13
|
+
* @property {string} name
|
|
14
|
+
* @property {boolean} [primitive]
|
|
15
|
+
* @property {Type} [extends]
|
|
16
|
+
* @property {Set<Type>} [members]
|
|
17
|
+
* @property {Function} [clazz]
|
|
18
|
+
* @property {Function} [toInternal]
|
|
19
|
+
* @property {Function} [toExternal]
|
|
20
|
+
*/
|
|
21
|
+
declare const emptyStringIsUndefined: (value: any) => any;
|
|
22
|
+
export declare const types: {
|
|
6
23
|
string: {
|
|
7
24
|
name: string;
|
|
8
25
|
primitive: boolean;
|
|
@@ -54,20 +71,15 @@ export const types: {
|
|
|
54
71
|
url: {
|
|
55
72
|
name: string;
|
|
56
73
|
primitive: boolean;
|
|
57
|
-
toInternal:
|
|
74
|
+
toInternal: typeof emptyStringIsUndefined;
|
|
58
75
|
};
|
|
59
76
|
object: {
|
|
60
77
|
name: string;
|
|
61
78
|
primitive: boolean;
|
|
62
79
|
};
|
|
63
80
|
};
|
|
64
|
-
export type
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
clazz?: Function | undefined;
|
|
70
|
-
toInternal?: Function | undefined;
|
|
71
|
-
toExternal?: Function | undefined;
|
|
72
|
-
};
|
|
73
|
-
import { parseBytes } from "./bytes.mjs";
|
|
81
|
+
export declare function addType(type: any): any;
|
|
82
|
+
export declare function oneOfType(definition: any): any;
|
|
83
|
+
export declare function resolveTypeLinks(): void;
|
|
84
|
+
export declare function create(type: any, owner: any, data: any): any;
|
|
85
|
+
export {};
|