depflow 3.0.0-dev.10 → 3.0.0-dev.11
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 +108 -43
- package/dist/builder/Builder.d.ts +279 -0
- package/dist/builder/Builder.js +391 -0
- package/dist/builder/Builder.js.map +1 -0
- package/dist/cli/CLI.d.ts +157 -0
- package/dist/cli/CLI.js +214 -0
- package/dist/cli/CLI.js.map +1 -0
- package/dist/cli/DepFLowCLI.d.ts +93 -0
- package/dist/cli/DepFLowCLI.js +413 -0
- package/dist/cli/DepFLowCLI.js.map +1 -0
- package/dist/cli/Flags.d.ts +106 -0
- package/dist/cli/Flags.js +125 -0
- package/dist/cli/Flags.js.map +1 -0
- package/dist/cli/bin.js +68 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/config/Config.d.ts +690 -0
- package/dist/config/Config.js +45 -0
- package/dist/config/Config.js.map +1 -0
- package/dist/config/ImportMap.d.ts +60 -0
- package/dist/config/ImportMap.js +66 -0
- package/dist/config/ImportMap.js.map +1 -0
- package/dist/config/JsonSchema.d.ts +12 -0
- package/dist/config/JsonSchema.js +26 -0
- package/dist/config/JsonSchema.js.map +1 -0
- package/dist/config/Settings.d.ts +201 -0
- package/dist/config/Settings.js +191 -0
- package/dist/config/Settings.js.map +1 -0
- package/dist/config/TSConfig.d.ts +73 -0
- package/dist/config/TSConfig.js +73 -0
- package/dist/config/TSConfig.js.map +1 -0
- package/dist/config/codecs/JsonCodec.d.ts +30 -0
- package/dist/config/codecs/JsonCodec.js +31 -0
- package/dist/config/codecs/JsonCodec.js.map +1 -0
- package/dist/config/codecs/YamlCodec.d.ts +62 -0
- package/dist/config/codecs/YamlCodec.js +89 -0
- package/dist/config/codecs/YamlCodec.js.map +1 -0
- package/dist/dependency/DepUtils.d.ts +50 -0
- package/dist/dependency/DepUtils.js +71 -0
- package/dist/dependency/DepUtils.js.map +1 -0
- package/dist/dependency/Dependency.d.ts +81 -0
- package/dist/dependency/Dependency.js +71 -0
- package/dist/dependency/Dependency.js.map +1 -0
- package/dist/dependency/Git.d.ts +75 -0
- package/dist/dependency/Git.js +97 -0
- package/dist/dependency/Git.js.map +1 -0
- package/dist/dependency/GitDependency.d.ts +30 -0
- package/dist/dependency/GitDependency.js +79 -0
- package/dist/dependency/GitDependency.js.map +1 -0
- package/dist/dependency/NpmDependency.d.ts +27 -0
- package/dist/dependency/NpmDependency.js +91 -0
- package/dist/dependency/NpmDependency.js.map +1 -0
- package/{build/support/PathResolver → dist/resolve}/AliasCompiler.d.ts +18 -5
- package/{build/support/PathResolver → dist/resolve}/AliasCompiler.js +31 -9
- package/dist/resolve/AliasCompiler.js.map +1 -0
- package/{build/support/PathResolver → dist/resolve}/PathResolver.d.ts +25 -8
- package/dist/resolve/PathResolver.js +133 -0
- package/dist/resolve/PathResolver.js.map +1 -0
- package/dist/resolve/PathRewriter.d.ts +24 -0
- package/{build/support/PathResolver → dist/resolve}/PathRewriter.js +21 -11
- package/dist/resolve/PathRewriter.js.map +1 -0
- package/{build → dist}/schema/Config/Builder.d.ts +114 -49
- package/dist/schema/Config/Builder.js +78 -0
- package/dist/schema/Config/Builder.js.map +1 -0
- package/{build → dist}/schema/Config/Config.d.ts +169 -78
- package/dist/schema/Config/Config.js +62 -0
- package/dist/schema/Config/Config.js.map +1 -0
- package/{build → dist}/schema/Config/Dependency.d.ts +219 -89
- package/dist/schema/Config/Dependency.js +80 -0
- package/dist/schema/Config/Dependency.js.map +1 -0
- package/{build → dist}/schema/Config/Extractor.d.ts +41 -17
- package/dist/schema/Config/Extractor.js +43 -0
- package/dist/schema/Config/Extractor.js.map +1 -0
- package/{build → dist}/schema/Config/Resolver.d.ts +25 -8
- package/dist/schema/Config/Resolver.js +43 -0
- package/dist/schema/Config/Resolver.js.map +1 -0
- package/{build → dist}/schema/Config/Transform.d.ts +22 -5
- package/dist/schema/Config/Transform.js +51 -0
- package/dist/schema/Config/Transform.js.map +1 -0
- package/dist/schema/Defaults.d.ts +20 -0
- package/dist/schema/Defaults.js +24 -0
- package/dist/schema/Defaults.js.map +1 -0
- package/dist/schema/ImportMap.d.ts +30 -0
- package/dist/schema/ImportMap.js +28 -0
- package/dist/schema/ImportMap.js.map +1 -0
- package/{build → dist}/schema/TSConfig.d.ts +23 -9
- package/dist/schema/TSConfig.js +39 -0
- package/dist/schema/TSConfig.js.map +1 -0
- package/{build → dist}/schema/schema.d.ts +11 -2
- package/{build → dist}/schema/schema.js +11 -2
- package/dist/schema/schema.js.map +1 -0
- package/dist/task/Command.d.ts +287 -0
- package/dist/task/Command.js +404 -0
- package/dist/task/Command.js.map +1 -0
- package/dist/task/Group.d.ts +15 -0
- package/dist/task/Group.js +29 -0
- package/dist/task/Group.js.map +1 -0
- package/dist/task/OutputPolicy.d.ts +262 -0
- package/dist/task/OutputPolicy.js +364 -0
- package/dist/task/OutputPolicy.js.map +1 -0
- package/dist/task/Task.d.ts +210 -0
- package/dist/task/Task.js +312 -0
- package/dist/task/Task.js.map +1 -0
- package/package.json +13 -10
- package/.gitignore +0 -7
- package/build/cli/DepFLowCLI.d.ts +0 -16
- package/build/cli/DepFLowCLI.js +0 -254
- package/build/cli/DepFLowCLI.js.map +0 -1
- package/build/cli/bin.js +0 -38
- package/build/cli/bin.js.map +0 -1
- package/build/config/Config.d.ts +0 -28
- package/build/config/Config.js +0 -46
- package/build/config/Config.js.map +0 -1
- package/build/config/ImportMap.d.ts +0 -51
- package/build/config/ImportMap.js +0 -97
- package/build/config/ImportMap.js.map +0 -1
- package/build/config/TSConfig.d.ts +0 -54
- package/build/config/TSConfig.js +0 -104
- package/build/config/TSConfig.js.map +0 -1
- package/build/schema/Config/Builder.js +0 -48
- package/build/schema/Config/Builder.js.map +0 -1
- package/build/schema/Config/Config.js +0 -20
- package/build/schema/Config/Config.js.map +0 -1
- package/build/schema/Config/Dependency.js +0 -25
- package/build/schema/Config/Dependency.js.map +0 -1
- package/build/schema/Config/Extractor.js +0 -25
- package/build/schema/Config/Extractor.js.map +0 -1
- package/build/schema/Config/Resolver.js +0 -25
- package/build/schema/Config/Resolver.js.map +0 -1
- package/build/schema/Config/Transform.js +0 -27
- package/build/schema/Config/Transform.js.map +0 -1
- package/build/schema/ImportMap.d.ts +0 -22
- package/build/schema/ImportMap.js +0 -12
- package/build/schema/ImportMap.js.map +0 -1
- package/build/schema/TSConfig.js +0 -19
- package/build/schema/TSConfig.js.map +0 -1
- package/build/schema/schema.js.map +0 -1
- package/build/support/Builder/Builder.d.ts +0 -46
- package/build/support/Builder/Builder.js +0 -116
- package/build/support/Builder/Builder.js.map +0 -1
- package/build/support/Dependency/Dependency.d.ts +0 -38
- package/build/support/Dependency/Dependency.js +0 -14
- package/build/support/Dependency/Dependency.js.map +0 -1
- package/build/support/Dependency/GitDependency.d.ts +0 -20
- package/build/support/Dependency/GitDependency.js +0 -67
- package/build/support/Dependency/GitDependency.js.map +0 -1
- package/build/support/Dependency/NpmDependency.d.ts +0 -18
- package/build/support/Dependency/NpmDependency.js +0 -65
- package/build/support/Dependency/NpmDependency.js.map +0 -1
- package/build/support/Git.d.ts +0 -53
- package/build/support/Git.js +0 -86
- package/build/support/Git.js.map +0 -1
- package/build/support/PathResolver/AliasCompiler.js.map +0 -1
- package/build/support/PathResolver/PathResolver.js +0 -105
- package/build/support/PathResolver/PathResolver.js.map +0 -1
- package/build/support/PathResolver/PathRewriter.d.ts +0 -18
- package/build/support/PathResolver/PathRewriter.js.map +0 -1
- package/build/support/PathResolver/Utils.d.ts +0 -36
- package/build/support/PathResolver/Utils.js +0 -45
- package/build/support/PathResolver/Utils.js.map +0 -1
- package/build/support/Task/Command.d.ts +0 -49
- package/build/support/Task/Command.js +0 -100
- package/build/support/Task/Command.js.map +0 -1
- package/build/support/Task/Task.d.ts +0 -84
- package/build/support/Task/Task.js +0 -145
- package/build/support/Task/Task.js.map +0 -1
- package/build/support/Utils.d.ts +0 -40
- package/build/support/Utils.js +0 -138
- package/build/support/Utils.js.map +0 -1
- package/build/support/Validator.d.ts +0 -22
- package/build/support/Validator.js +0 -28
- package/build/support/Validator.js.map +0 -1
- /package/{build → dist}/cli/bin.d.ts +0 -0
|
@@ -1,21 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @author NetFeez <netfeez.dev@gmail.com>.
|
|
3
|
+
* @description Schema definitions for build steps: run, extract and transform entries.
|
|
4
|
+
* @license Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import Schema from '@netfeez/schema';
|
|
2
7
|
export declare const RunEntry: Schema<{
|
|
3
8
|
readonly type: "object";
|
|
4
9
|
readonly required: true;
|
|
5
|
-
readonly
|
|
10
|
+
readonly keys: {
|
|
6
11
|
readonly maxTimeMs: {
|
|
7
12
|
readonly type: "number";
|
|
8
13
|
readonly default: 60000;
|
|
9
14
|
readonly minimum: -1;
|
|
15
|
+
readonly description: "Maximum execution time for the run step in milliseconds. A value of -1 disables the limit.";
|
|
10
16
|
};
|
|
11
17
|
readonly allowFails: {
|
|
12
18
|
readonly type: "boolean";
|
|
13
19
|
readonly default: false;
|
|
20
|
+
readonly description: "Whether failed commands within the step are tolerated. Defaults to false.";
|
|
14
21
|
};
|
|
15
22
|
readonly run: {
|
|
16
23
|
readonly type: "union";
|
|
17
24
|
readonly required: true;
|
|
18
|
-
readonly union: [{
|
|
25
|
+
readonly union: readonly [{
|
|
19
26
|
readonly type: "string";
|
|
20
27
|
}, {
|
|
21
28
|
readonly type: "array";
|
|
@@ -23,6 +30,7 @@ export declare const RunEntry: Schema<{
|
|
|
23
30
|
readonly type: "string";
|
|
24
31
|
};
|
|
25
32
|
}];
|
|
33
|
+
readonly description: "Shell command or list of shell commands to execute.";
|
|
26
34
|
};
|
|
27
35
|
};
|
|
28
36
|
}>;
|
|
@@ -31,81 +39,92 @@ export declare namespace RunEntry { }
|
|
|
31
39
|
export declare const ExtractEntry: Schema<{
|
|
32
40
|
readonly type: "object";
|
|
33
41
|
readonly required: true;
|
|
34
|
-
readonly
|
|
42
|
+
readonly keys: {
|
|
35
43
|
readonly extract: {
|
|
36
44
|
readonly type: "union";
|
|
37
45
|
readonly required: true;
|
|
38
|
-
readonly union: [{
|
|
46
|
+
readonly union: readonly [{
|
|
39
47
|
readonly type: "string";
|
|
40
48
|
}, {
|
|
41
49
|
readonly type: "object";
|
|
42
50
|
readonly required: true;
|
|
43
|
-
readonly
|
|
51
|
+
readonly additional: {
|
|
44
52
|
readonly type: "union";
|
|
45
53
|
readonly required: true;
|
|
46
|
-
readonly union: [{
|
|
54
|
+
readonly union: readonly [{
|
|
47
55
|
readonly type: "string";
|
|
48
56
|
readonly required: true;
|
|
49
57
|
}, {
|
|
50
58
|
readonly type: "object";
|
|
51
59
|
readonly required: true;
|
|
52
|
-
readonly
|
|
60
|
+
readonly keys: {
|
|
53
61
|
readonly to: {
|
|
54
62
|
readonly type: "string";
|
|
55
63
|
readonly required: true;
|
|
64
|
+
readonly description: "Destination folder to which the matched files are copied. A relative path is resolved against the project root, an absolute one is used as it stands.";
|
|
56
65
|
};
|
|
57
66
|
readonly map: {
|
|
58
|
-
readonly required: false;
|
|
59
67
|
readonly type: "union";
|
|
60
|
-
readonly union: [{
|
|
68
|
+
readonly union: readonly [{
|
|
61
69
|
readonly type: "string";
|
|
62
70
|
}, {
|
|
63
71
|
readonly type: "object";
|
|
64
|
-
readonly
|
|
72
|
+
readonly keys: {
|
|
65
73
|
readonly search: {
|
|
66
74
|
readonly type: "string";
|
|
67
75
|
readonly required: true;
|
|
76
|
+
readonly description: "The regular expression pattern to search for in the file content.";
|
|
68
77
|
};
|
|
69
78
|
readonly flags: {
|
|
70
79
|
readonly type: "string";
|
|
71
80
|
readonly default: "g";
|
|
72
81
|
readonly pattern: RegExp;
|
|
82
|
+
readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
|
|
73
83
|
};
|
|
74
84
|
readonly replace: {
|
|
75
85
|
readonly type: "string";
|
|
76
86
|
readonly required: true;
|
|
87
|
+
readonly description: "The replacement string used to substitute the matches found by the search pattern.";
|
|
77
88
|
};
|
|
78
89
|
};
|
|
79
90
|
}];
|
|
91
|
+
readonly required: false;
|
|
92
|
+
readonly description: "Transformation applied to the destination path of the extracted files.";
|
|
80
93
|
};
|
|
81
94
|
readonly transform: {
|
|
82
|
-
readonly required: false;
|
|
83
95
|
readonly type: "union";
|
|
84
|
-
readonly union: [{
|
|
96
|
+
readonly union: readonly [{
|
|
85
97
|
readonly type: "string";
|
|
86
98
|
}, {
|
|
87
99
|
readonly type: "object";
|
|
88
|
-
readonly
|
|
100
|
+
readonly keys: {
|
|
89
101
|
readonly search: {
|
|
90
102
|
readonly type: "string";
|
|
91
103
|
readonly required: true;
|
|
104
|
+
readonly description: "The regular expression pattern to search for in the file content.";
|
|
92
105
|
};
|
|
93
106
|
readonly flags: {
|
|
94
107
|
readonly type: "string";
|
|
95
108
|
readonly default: "g";
|
|
96
109
|
readonly pattern: RegExp;
|
|
110
|
+
readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
|
|
97
111
|
};
|
|
98
112
|
readonly replace: {
|
|
99
113
|
readonly type: "string";
|
|
100
114
|
readonly required: true;
|
|
115
|
+
readonly description: "The replacement string used to substitute the matches found by the search pattern.";
|
|
101
116
|
};
|
|
102
117
|
};
|
|
103
118
|
}];
|
|
119
|
+
readonly required: false;
|
|
120
|
+
readonly description: "Transformation applied to the content of the extracted files.";
|
|
104
121
|
};
|
|
105
122
|
};
|
|
106
123
|
}];
|
|
107
124
|
};
|
|
125
|
+
readonly description: "Mapping of source glob patterns, relative to the folder the pipeline works in, to extraction entries, each describing where and how files are extracted.";
|
|
108
126
|
}];
|
|
127
|
+
readonly description: "Destination folder for the extracted files or an extraction mapping.";
|
|
109
128
|
};
|
|
110
129
|
};
|
|
111
130
|
}>;
|
|
@@ -114,29 +133,34 @@ export declare namespace ExtractEntry { }
|
|
|
114
133
|
export declare const TransformEntry: Schema<{
|
|
115
134
|
readonly type: "object";
|
|
116
135
|
readonly required: true;
|
|
117
|
-
readonly
|
|
136
|
+
readonly keys: {
|
|
118
137
|
readonly transform: {
|
|
119
138
|
readonly type: "object";
|
|
120
139
|
readonly required: true;
|
|
121
|
-
readonly
|
|
140
|
+
readonly keys: {
|
|
122
141
|
readonly search: {
|
|
123
142
|
readonly type: "string";
|
|
124
143
|
readonly required: true;
|
|
144
|
+
readonly description: "The regular expression pattern to search for in the file content.";
|
|
125
145
|
};
|
|
126
146
|
readonly flags: {
|
|
127
147
|
readonly type: "string";
|
|
128
148
|
readonly default: "g";
|
|
129
149
|
readonly pattern: RegExp;
|
|
150
|
+
readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
|
|
130
151
|
};
|
|
131
152
|
readonly replace: {
|
|
132
153
|
readonly type: "string";
|
|
133
154
|
readonly required: true;
|
|
155
|
+
readonly description: "The replacement string used to substitute the matches found by the search pattern.";
|
|
134
156
|
};
|
|
135
157
|
readonly glob: {
|
|
136
158
|
readonly type: "string";
|
|
137
159
|
readonly required: true;
|
|
160
|
+
readonly description: "Glob pattern matching the files to which the global transformation is applied.";
|
|
138
161
|
};
|
|
139
162
|
};
|
|
163
|
+
readonly description: "Global transformation to apply over the files matched by the glob pattern.";
|
|
140
164
|
};
|
|
141
165
|
};
|
|
142
166
|
}>;
|
|
@@ -145,23 +169,25 @@ export declare namespace TransformEntry { }
|
|
|
145
169
|
export declare const BuilderEntry: Schema<{
|
|
146
170
|
readonly type: "union";
|
|
147
171
|
readonly required: true;
|
|
148
|
-
readonly union: [{
|
|
172
|
+
readonly union: readonly [{
|
|
149
173
|
readonly type: "object";
|
|
150
174
|
readonly required: true;
|
|
151
|
-
readonly
|
|
175
|
+
readonly keys: {
|
|
152
176
|
readonly maxTimeMs: {
|
|
153
177
|
readonly type: "number";
|
|
154
178
|
readonly default: 60000;
|
|
155
179
|
readonly minimum: -1;
|
|
180
|
+
readonly description: "Maximum execution time for the run step in milliseconds. A value of -1 disables the limit.";
|
|
156
181
|
};
|
|
157
182
|
readonly allowFails: {
|
|
158
183
|
readonly type: "boolean";
|
|
159
184
|
readonly default: false;
|
|
185
|
+
readonly description: "Whether failed commands within the step are tolerated. Defaults to false.";
|
|
160
186
|
};
|
|
161
187
|
readonly run: {
|
|
162
188
|
readonly type: "union";
|
|
163
189
|
readonly required: true;
|
|
164
|
-
readonly union: [{
|
|
190
|
+
readonly union: readonly [{
|
|
165
191
|
readonly type: "string";
|
|
166
192
|
}, {
|
|
167
193
|
readonly type: "array";
|
|
@@ -169,143 +195,163 @@ export declare const BuilderEntry: Schema<{
|
|
|
169
195
|
readonly type: "string";
|
|
170
196
|
};
|
|
171
197
|
}];
|
|
198
|
+
readonly description: "Shell command or list of shell commands to execute.";
|
|
172
199
|
};
|
|
173
200
|
};
|
|
174
201
|
}, {
|
|
175
202
|
readonly type: "object";
|
|
176
203
|
readonly required: true;
|
|
177
|
-
readonly
|
|
204
|
+
readonly keys: {
|
|
178
205
|
readonly extract: {
|
|
179
206
|
readonly type: "union";
|
|
180
207
|
readonly required: true;
|
|
181
|
-
readonly union: [{
|
|
208
|
+
readonly union: readonly [{
|
|
182
209
|
readonly type: "string";
|
|
183
210
|
}, {
|
|
184
211
|
readonly type: "object";
|
|
185
212
|
readonly required: true;
|
|
186
|
-
readonly
|
|
213
|
+
readonly additional: {
|
|
187
214
|
readonly type: "union";
|
|
188
215
|
readonly required: true;
|
|
189
|
-
readonly union: [{
|
|
216
|
+
readonly union: readonly [{
|
|
190
217
|
readonly type: "string";
|
|
191
218
|
readonly required: true;
|
|
192
219
|
}, {
|
|
193
220
|
readonly type: "object";
|
|
194
221
|
readonly required: true;
|
|
195
|
-
readonly
|
|
222
|
+
readonly keys: {
|
|
196
223
|
readonly to: {
|
|
197
224
|
readonly type: "string";
|
|
198
225
|
readonly required: true;
|
|
226
|
+
readonly description: "Destination folder to which the matched files are copied. A relative path is resolved against the project root, an absolute one is used as it stands.";
|
|
199
227
|
};
|
|
200
228
|
readonly map: {
|
|
201
|
-
readonly required: false;
|
|
202
229
|
readonly type: "union";
|
|
203
|
-
readonly union: [{
|
|
230
|
+
readonly union: readonly [{
|
|
204
231
|
readonly type: "string";
|
|
205
232
|
}, {
|
|
206
233
|
readonly type: "object";
|
|
207
|
-
readonly
|
|
234
|
+
readonly keys: {
|
|
208
235
|
readonly search: {
|
|
209
236
|
readonly type: "string";
|
|
210
237
|
readonly required: true;
|
|
238
|
+
readonly description: "The regular expression pattern to search for in the file content.";
|
|
211
239
|
};
|
|
212
240
|
readonly flags: {
|
|
213
241
|
readonly type: "string";
|
|
214
242
|
readonly default: "g";
|
|
215
243
|
readonly pattern: RegExp;
|
|
244
|
+
readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
|
|
216
245
|
};
|
|
217
246
|
readonly replace: {
|
|
218
247
|
readonly type: "string";
|
|
219
248
|
readonly required: true;
|
|
249
|
+
readonly description: "The replacement string used to substitute the matches found by the search pattern.";
|
|
220
250
|
};
|
|
221
251
|
};
|
|
222
252
|
}];
|
|
253
|
+
readonly required: false;
|
|
254
|
+
readonly description: "Transformation applied to the destination path of the extracted files.";
|
|
223
255
|
};
|
|
224
256
|
readonly transform: {
|
|
225
|
-
readonly required: false;
|
|
226
257
|
readonly type: "union";
|
|
227
|
-
readonly union: [{
|
|
258
|
+
readonly union: readonly [{
|
|
228
259
|
readonly type: "string";
|
|
229
260
|
}, {
|
|
230
261
|
readonly type: "object";
|
|
231
|
-
readonly
|
|
262
|
+
readonly keys: {
|
|
232
263
|
readonly search: {
|
|
233
264
|
readonly type: "string";
|
|
234
265
|
readonly required: true;
|
|
266
|
+
readonly description: "The regular expression pattern to search for in the file content.";
|
|
235
267
|
};
|
|
236
268
|
readonly flags: {
|
|
237
269
|
readonly type: "string";
|
|
238
270
|
readonly default: "g";
|
|
239
271
|
readonly pattern: RegExp;
|
|
272
|
+
readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
|
|
240
273
|
};
|
|
241
274
|
readonly replace: {
|
|
242
275
|
readonly type: "string";
|
|
243
276
|
readonly required: true;
|
|
277
|
+
readonly description: "The replacement string used to substitute the matches found by the search pattern.";
|
|
244
278
|
};
|
|
245
279
|
};
|
|
246
280
|
}];
|
|
281
|
+
readonly required: false;
|
|
282
|
+
readonly description: "Transformation applied to the content of the extracted files.";
|
|
247
283
|
};
|
|
248
284
|
};
|
|
249
285
|
}];
|
|
250
286
|
};
|
|
287
|
+
readonly description: "Mapping of source glob patterns, relative to the folder the pipeline works in, to extraction entries, each describing where and how files are extracted.";
|
|
251
288
|
}];
|
|
289
|
+
readonly description: "Destination folder for the extracted files or an extraction mapping.";
|
|
252
290
|
};
|
|
253
291
|
};
|
|
254
292
|
}, {
|
|
255
293
|
readonly type: "object";
|
|
256
294
|
readonly required: true;
|
|
257
|
-
readonly
|
|
295
|
+
readonly keys: {
|
|
258
296
|
readonly transform: {
|
|
259
297
|
readonly type: "object";
|
|
260
298
|
readonly required: true;
|
|
261
|
-
readonly
|
|
299
|
+
readonly keys: {
|
|
262
300
|
readonly search: {
|
|
263
301
|
readonly type: "string";
|
|
264
302
|
readonly required: true;
|
|
303
|
+
readonly description: "The regular expression pattern to search for in the file content.";
|
|
265
304
|
};
|
|
266
305
|
readonly flags: {
|
|
267
306
|
readonly type: "string";
|
|
268
307
|
readonly default: "g";
|
|
269
308
|
readonly pattern: RegExp;
|
|
309
|
+
readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
|
|
270
310
|
};
|
|
271
311
|
readonly replace: {
|
|
272
312
|
readonly type: "string";
|
|
273
313
|
readonly required: true;
|
|
314
|
+
readonly description: "The replacement string used to substitute the matches found by the search pattern.";
|
|
274
315
|
};
|
|
275
316
|
readonly glob: {
|
|
276
317
|
readonly type: "string";
|
|
277
318
|
readonly required: true;
|
|
319
|
+
readonly description: "Glob pattern matching the files to which the global transformation is applied.";
|
|
278
320
|
};
|
|
279
321
|
};
|
|
322
|
+
readonly description: "Global transformation to apply over the files matched by the glob pattern.";
|
|
280
323
|
};
|
|
281
324
|
};
|
|
282
325
|
}];
|
|
326
|
+
readonly description: "A single build step: run commands, extract files or apply a global transformation.";
|
|
283
327
|
}>;
|
|
284
328
|
export type BuilderEntry = typeof BuilderEntry.infer;
|
|
285
329
|
export declare namespace BuilderEntry { }
|
|
286
330
|
export declare const Builder: Schema<{
|
|
287
331
|
readonly type: "array";
|
|
288
|
-
readonly default: [];
|
|
332
|
+
readonly default: never[];
|
|
289
333
|
readonly items: {
|
|
290
334
|
readonly type: "union";
|
|
291
335
|
readonly required: true;
|
|
292
|
-
readonly union: [{
|
|
336
|
+
readonly union: readonly [{
|
|
293
337
|
readonly type: "object";
|
|
294
338
|
readonly required: true;
|
|
295
|
-
readonly
|
|
339
|
+
readonly keys: {
|
|
296
340
|
readonly maxTimeMs: {
|
|
297
341
|
readonly type: "number";
|
|
298
342
|
readonly default: 60000;
|
|
299
343
|
readonly minimum: -1;
|
|
344
|
+
readonly description: "Maximum execution time for the run step in milliseconds. A value of -1 disables the limit.";
|
|
300
345
|
};
|
|
301
346
|
readonly allowFails: {
|
|
302
347
|
readonly type: "boolean";
|
|
303
348
|
readonly default: false;
|
|
349
|
+
readonly description: "Whether failed commands within the step are tolerated. Defaults to false.";
|
|
304
350
|
};
|
|
305
351
|
readonly run: {
|
|
306
352
|
readonly type: "union";
|
|
307
353
|
readonly required: true;
|
|
308
|
-
readonly union: [{
|
|
354
|
+
readonly union: readonly [{
|
|
309
355
|
readonly type: "string";
|
|
310
356
|
}, {
|
|
311
357
|
readonly type: "array";
|
|
@@ -313,118 +359,137 @@ export declare const Builder: Schema<{
|
|
|
313
359
|
readonly type: "string";
|
|
314
360
|
};
|
|
315
361
|
}];
|
|
362
|
+
readonly description: "Shell command or list of shell commands to execute.";
|
|
316
363
|
};
|
|
317
364
|
};
|
|
318
365
|
}, {
|
|
319
366
|
readonly type: "object";
|
|
320
367
|
readonly required: true;
|
|
321
|
-
readonly
|
|
368
|
+
readonly keys: {
|
|
322
369
|
readonly extract: {
|
|
323
370
|
readonly type: "union";
|
|
324
371
|
readonly required: true;
|
|
325
|
-
readonly union: [{
|
|
372
|
+
readonly union: readonly [{
|
|
326
373
|
readonly type: "string";
|
|
327
374
|
}, {
|
|
328
375
|
readonly type: "object";
|
|
329
376
|
readonly required: true;
|
|
330
|
-
readonly
|
|
377
|
+
readonly additional: {
|
|
331
378
|
readonly type: "union";
|
|
332
379
|
readonly required: true;
|
|
333
|
-
readonly union: [{
|
|
380
|
+
readonly union: readonly [{
|
|
334
381
|
readonly type: "string";
|
|
335
382
|
readonly required: true;
|
|
336
383
|
}, {
|
|
337
384
|
readonly type: "object";
|
|
338
385
|
readonly required: true;
|
|
339
|
-
readonly
|
|
386
|
+
readonly keys: {
|
|
340
387
|
readonly to: {
|
|
341
388
|
readonly type: "string";
|
|
342
389
|
readonly required: true;
|
|
390
|
+
readonly description: "Destination folder to which the matched files are copied. A relative path is resolved against the project root, an absolute one is used as it stands.";
|
|
343
391
|
};
|
|
344
392
|
readonly map: {
|
|
345
|
-
readonly required: false;
|
|
346
393
|
readonly type: "union";
|
|
347
|
-
readonly union: [{
|
|
394
|
+
readonly union: readonly [{
|
|
348
395
|
readonly type: "string";
|
|
349
396
|
}, {
|
|
350
397
|
readonly type: "object";
|
|
351
|
-
readonly
|
|
398
|
+
readonly keys: {
|
|
352
399
|
readonly search: {
|
|
353
400
|
readonly type: "string";
|
|
354
401
|
readonly required: true;
|
|
402
|
+
readonly description: "The regular expression pattern to search for in the file content.";
|
|
355
403
|
};
|
|
356
404
|
readonly flags: {
|
|
357
405
|
readonly type: "string";
|
|
358
406
|
readonly default: "g";
|
|
359
407
|
readonly pattern: RegExp;
|
|
408
|
+
readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
|
|
360
409
|
};
|
|
361
410
|
readonly replace: {
|
|
362
411
|
readonly type: "string";
|
|
363
412
|
readonly required: true;
|
|
413
|
+
readonly description: "The replacement string used to substitute the matches found by the search pattern.";
|
|
364
414
|
};
|
|
365
415
|
};
|
|
366
416
|
}];
|
|
417
|
+
readonly required: false;
|
|
418
|
+
readonly description: "Transformation applied to the destination path of the extracted files.";
|
|
367
419
|
};
|
|
368
420
|
readonly transform: {
|
|
369
|
-
readonly required: false;
|
|
370
421
|
readonly type: "union";
|
|
371
|
-
readonly union: [{
|
|
422
|
+
readonly union: readonly [{
|
|
372
423
|
readonly type: "string";
|
|
373
424
|
}, {
|
|
374
425
|
readonly type: "object";
|
|
375
|
-
readonly
|
|
426
|
+
readonly keys: {
|
|
376
427
|
readonly search: {
|
|
377
428
|
readonly type: "string";
|
|
378
429
|
readonly required: true;
|
|
430
|
+
readonly description: "The regular expression pattern to search for in the file content.";
|
|
379
431
|
};
|
|
380
432
|
readonly flags: {
|
|
381
433
|
readonly type: "string";
|
|
382
434
|
readonly default: "g";
|
|
383
435
|
readonly pattern: RegExp;
|
|
436
|
+
readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
|
|
384
437
|
};
|
|
385
438
|
readonly replace: {
|
|
386
439
|
readonly type: "string";
|
|
387
440
|
readonly required: true;
|
|
441
|
+
readonly description: "The replacement string used to substitute the matches found by the search pattern.";
|
|
388
442
|
};
|
|
389
443
|
};
|
|
390
444
|
}];
|
|
445
|
+
readonly required: false;
|
|
446
|
+
readonly description: "Transformation applied to the content of the extracted files.";
|
|
391
447
|
};
|
|
392
448
|
};
|
|
393
449
|
}];
|
|
394
450
|
};
|
|
451
|
+
readonly description: "Mapping of source glob patterns, relative to the folder the pipeline works in, to extraction entries, each describing where and how files are extracted.";
|
|
395
452
|
}];
|
|
453
|
+
readonly description: "Destination folder for the extracted files or an extraction mapping.";
|
|
396
454
|
};
|
|
397
455
|
};
|
|
398
456
|
}, {
|
|
399
457
|
readonly type: "object";
|
|
400
458
|
readonly required: true;
|
|
401
|
-
readonly
|
|
459
|
+
readonly keys: {
|
|
402
460
|
readonly transform: {
|
|
403
461
|
readonly type: "object";
|
|
404
462
|
readonly required: true;
|
|
405
|
-
readonly
|
|
463
|
+
readonly keys: {
|
|
406
464
|
readonly search: {
|
|
407
465
|
readonly type: "string";
|
|
408
466
|
readonly required: true;
|
|
467
|
+
readonly description: "The regular expression pattern to search for in the file content.";
|
|
409
468
|
};
|
|
410
469
|
readonly flags: {
|
|
411
470
|
readonly type: "string";
|
|
412
471
|
readonly default: "g";
|
|
413
472
|
readonly pattern: RegExp;
|
|
473
|
+
readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
|
|
414
474
|
};
|
|
415
475
|
readonly replace: {
|
|
416
476
|
readonly type: "string";
|
|
417
477
|
readonly required: true;
|
|
478
|
+
readonly description: "The replacement string used to substitute the matches found by the search pattern.";
|
|
418
479
|
};
|
|
419
480
|
readonly glob: {
|
|
420
481
|
readonly type: "string";
|
|
421
482
|
readonly required: true;
|
|
483
|
+
readonly description: "Glob pattern matching the files to which the global transformation is applied.";
|
|
422
484
|
};
|
|
423
485
|
};
|
|
486
|
+
readonly description: "Global transformation to apply over the files matched by the glob pattern.";
|
|
424
487
|
};
|
|
425
488
|
};
|
|
426
489
|
}];
|
|
490
|
+
readonly description: "A single build step: run commands, extract files or apply a global transformation.";
|
|
427
491
|
};
|
|
492
|
+
readonly description: "Ordered pipeline of build steps applied when a dependency is built.";
|
|
428
493
|
}>;
|
|
429
494
|
export type Builder = typeof Builder.infer;
|
|
430
495
|
export declare namespace Builder { }
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author NetFeez <netfeez.dev@gmail.com>.
|
|
3
|
+
* @description Schema definitions for build steps: run, extract and transform entries.
|
|
4
|
+
* @license Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import Schema from '@netfeez/schema';
|
|
7
|
+
import { GlobalTransform } from './Transform.js';
|
|
8
|
+
import Extractor from './Extractor.js';
|
|
9
|
+
import Defaults from '../Defaults.js';
|
|
10
|
+
export const RunEntry = new Schema({
|
|
11
|
+
type: 'object',
|
|
12
|
+
required: true,
|
|
13
|
+
keys: {
|
|
14
|
+
maxTimeMs: {
|
|
15
|
+
type: 'number',
|
|
16
|
+
default: 60000,
|
|
17
|
+
minimum: -1,
|
|
18
|
+
description: 'Maximum execution time for the run step in milliseconds. A value of -1 disables the limit.'
|
|
19
|
+
},
|
|
20
|
+
allowFails: {
|
|
21
|
+
type: 'boolean',
|
|
22
|
+
default: false,
|
|
23
|
+
description: 'Whether failed commands within the step are tolerated. Defaults to false.'
|
|
24
|
+
},
|
|
25
|
+
run: {
|
|
26
|
+
type: 'union',
|
|
27
|
+
required: true,
|
|
28
|
+
union: [
|
|
29
|
+
{ type: 'string' },
|
|
30
|
+
{ type: 'array', items: { type: 'string' } }
|
|
31
|
+
],
|
|
32
|
+
description: 'Shell command or list of shell commands to execute.'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export const ExtractEntry = new Schema({
|
|
37
|
+
type: 'object',
|
|
38
|
+
required: true,
|
|
39
|
+
keys: {
|
|
40
|
+
extract: {
|
|
41
|
+
type: 'union',
|
|
42
|
+
required: true,
|
|
43
|
+
union: [
|
|
44
|
+
{ type: 'string' },
|
|
45
|
+
Extractor.definition
|
|
46
|
+
],
|
|
47
|
+
description: 'Destination folder for the extracted files or an extraction mapping.'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
export const TransformEntry = new Schema({
|
|
52
|
+
type: 'object',
|
|
53
|
+
required: true,
|
|
54
|
+
keys: {
|
|
55
|
+
transform: {
|
|
56
|
+
...GlobalTransform.definition,
|
|
57
|
+
description: 'Global transformation to apply over the files matched by the glob pattern.'
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
export const BuilderEntry = new Schema({
|
|
62
|
+
type: 'union',
|
|
63
|
+
required: true,
|
|
64
|
+
union: [
|
|
65
|
+
RunEntry.definition,
|
|
66
|
+
ExtractEntry.definition,
|
|
67
|
+
TransformEntry.definition
|
|
68
|
+
],
|
|
69
|
+
description: 'A single build step: run commands, extract files or apply a global transformation.'
|
|
70
|
+
});
|
|
71
|
+
export const Builder = new Schema({
|
|
72
|
+
type: 'array',
|
|
73
|
+
get default() { return Defaults.array(); },
|
|
74
|
+
items: BuilderEntry.definition,
|
|
75
|
+
description: 'Ordered pipeline of build steps applied when a dependency is built.'
|
|
76
|
+
});
|
|
77
|
+
export default Builder;
|
|
78
|
+
//# sourceMappingURL=Builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Builder.js","sourceRoot":"","sources":["../../../src/schema/Config/Builder.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC;IAC/B,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE;QACF,SAAS,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,CAAC,CAAC;YACX,WAAW,EAAE,4FAA4F;SAC5G;QACD,UAAU,EAAE;YACR,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,KAAK;YACd,WAAW,EAAE,2EAA2E;SAC3F;QACD,GAAG,EAAE;YACD,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE;gBACH,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAClB,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;aAC/C;YACD,WAAW,EAAE,qDAAqD;SACrE;KACJ;CACJ,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC;IACnC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE;QACF,OAAO,EAAE;YACL,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE;gBACH,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAClB,SAAS,CAAC,UAAU;aACvB;YACD,WAAW,EAAE,sEAAsE;SACtF;KACJ;CACJ,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,MAAM,CAAC;IACrC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE;QACF,SAAS,EAAE;YACP,GAAG,eAAe,CAAC,UAAU;YAC7B,WAAW,EAAE,4EAA4E;SAC5F;KACJ;CACJ,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC;IACnC,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE;QACH,QAAQ,CAAC,UAAU;QACnB,YAAY,CAAC,UAAU;QACvB,cAAc,CAAC,UAAU;KAC5B;IACD,WAAW,EAAE,oFAAoF;CACpG,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC;IAC9B,IAAI,EAAE,OAAO;IACb,IAAI,OAAO,KAAK,OAAO,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC1C,KAAK,EAAE,YAAY,CAAC,UAAU;IAC9B,WAAW,EAAE,qEAAqE;CACrF,CAAC,CAAC;AAIH,eAAe,OAAO,CAAC"}
|