depflow 3.0.0-dev.1 → 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/dist/resolve/AliasCompiler.d.ts +45 -0
- package/dist/resolve/AliasCompiler.js +84 -0
- package/dist/resolve/AliasCompiler.js.map +1 -0
- package/{build/support/PathResolver → dist/resolve}/PathResolver.d.ts +26 -9
- 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/dist/schema/Config/Builder.d.ts +496 -0
- package/dist/schema/Config/Builder.js +78 -0
- package/dist/schema/Config/Builder.js.map +1 -0
- package/dist/schema/Config/Config.d.ts +673 -0
- package/dist/schema/Config/Config.js +62 -0
- package/dist/schema/Config/Config.js.map +1 -0
- package/dist/schema/Config/Dependency.d.ts +878 -0
- package/dist/schema/Config/Dependency.js +80 -0
- package/dist/schema/Config/Dependency.js.map +1 -0
- package/dist/schema/Config/Extractor.d.ts +157 -0
- package/dist/schema/Config/Extractor.js +43 -0
- package/dist/schema/Config/Extractor.js.map +1 -0
- package/dist/schema/Config/Resolver.d.ts +87 -0
- package/dist/schema/Config/Resolver.js +43 -0
- package/dist/schema/Config/Resolver.js.map +1 -0
- package/dist/schema/Config/Transform.d.ts +90 -0
- 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/dist/schema/TSConfig.d.ts +70 -0
- package/dist/schema/TSConfig.js +39 -0
- package/dist/schema/TSConfig.js.map +1 -0
- package/dist/schema/schema.d.ts +38 -0
- package/dist/schema/schema.js +40 -0
- 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 +16 -14
- package/.gitignore +0 -7
- package/build/cli/DepFLowCLI.d.ts +0 -15
- package/build/cli/DepFLowCLI.js +0 -223
- package/build/cli/DepFLowCLI.js.map +0 -1
- package/build/cli/bin.js +0 -41
- 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 -37
- package/build/config/ImportMap.js +0 -82
- package/build/config/ImportMap.js.map +0 -1
- package/build/config/Tsconfig.d.ts +0 -57
- package/build/config/Tsconfig.js +0 -100
- package/build/config/Tsconfig.js.map +0 -1
- package/build/config/schemas.d.ts +0 -1194
- package/build/config/schemas.js +0 -66
- package/build/config/schemas.js.map +0 -1
- package/build/support/Async.d.ts +0 -22
- package/build/support/Async.js +0 -62
- package/build/support/Async.js.map +0 -1
- package/build/support/Builder/Builder.d.ts +0 -36
- package/build/support/Builder/Builder.js +0 -89
- 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/Dependency/Resolver.d.ts +0 -7
- package/build/support/Dependency/Resolver.js +0 -4
- package/build/support/Dependency/Resolver.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.d.ts +0 -25
- package/build/support/PathResolver/AliasCompiler.js +0 -39
- package/build/support/PathResolver/AliasCompiler.js.map +0 -1
- package/build/support/PathResolver/PathResolver.js +0 -104
- 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
|
@@ -0,0 +1,496 @@
|
|
|
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
|
+
export declare const RunEntry: Schema<{
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly required: true;
|
|
10
|
+
readonly keys: {
|
|
11
|
+
readonly maxTimeMs: {
|
|
12
|
+
readonly type: "number";
|
|
13
|
+
readonly default: 60000;
|
|
14
|
+
readonly minimum: -1;
|
|
15
|
+
readonly description: "Maximum execution time for the run step in milliseconds. A value of -1 disables the limit.";
|
|
16
|
+
};
|
|
17
|
+
readonly allowFails: {
|
|
18
|
+
readonly type: "boolean";
|
|
19
|
+
readonly default: false;
|
|
20
|
+
readonly description: "Whether failed commands within the step are tolerated. Defaults to false.";
|
|
21
|
+
};
|
|
22
|
+
readonly run: {
|
|
23
|
+
readonly type: "union";
|
|
24
|
+
readonly required: true;
|
|
25
|
+
readonly union: readonly [{
|
|
26
|
+
readonly type: "string";
|
|
27
|
+
}, {
|
|
28
|
+
readonly type: "array";
|
|
29
|
+
readonly items: {
|
|
30
|
+
readonly type: "string";
|
|
31
|
+
};
|
|
32
|
+
}];
|
|
33
|
+
readonly description: "Shell command or list of shell commands to execute.";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}>;
|
|
37
|
+
export type RunEntry = typeof RunEntry.infer;
|
|
38
|
+
export declare namespace RunEntry { }
|
|
39
|
+
export declare const ExtractEntry: Schema<{
|
|
40
|
+
readonly type: "object";
|
|
41
|
+
readonly required: true;
|
|
42
|
+
readonly keys: {
|
|
43
|
+
readonly extract: {
|
|
44
|
+
readonly type: "union";
|
|
45
|
+
readonly required: true;
|
|
46
|
+
readonly union: readonly [{
|
|
47
|
+
readonly type: "string";
|
|
48
|
+
}, {
|
|
49
|
+
readonly type: "object";
|
|
50
|
+
readonly required: true;
|
|
51
|
+
readonly additional: {
|
|
52
|
+
readonly type: "union";
|
|
53
|
+
readonly required: true;
|
|
54
|
+
readonly union: readonly [{
|
|
55
|
+
readonly type: "string";
|
|
56
|
+
readonly required: true;
|
|
57
|
+
}, {
|
|
58
|
+
readonly type: "object";
|
|
59
|
+
readonly required: true;
|
|
60
|
+
readonly keys: {
|
|
61
|
+
readonly to: {
|
|
62
|
+
readonly type: "string";
|
|
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.";
|
|
65
|
+
};
|
|
66
|
+
readonly map: {
|
|
67
|
+
readonly type: "union";
|
|
68
|
+
readonly union: readonly [{
|
|
69
|
+
readonly type: "string";
|
|
70
|
+
}, {
|
|
71
|
+
readonly type: "object";
|
|
72
|
+
readonly keys: {
|
|
73
|
+
readonly search: {
|
|
74
|
+
readonly type: "string";
|
|
75
|
+
readonly required: true;
|
|
76
|
+
readonly description: "The regular expression pattern to search for in the file content.";
|
|
77
|
+
};
|
|
78
|
+
readonly flags: {
|
|
79
|
+
readonly type: "string";
|
|
80
|
+
readonly default: "g";
|
|
81
|
+
readonly pattern: RegExp;
|
|
82
|
+
readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
|
|
83
|
+
};
|
|
84
|
+
readonly replace: {
|
|
85
|
+
readonly type: "string";
|
|
86
|
+
readonly required: true;
|
|
87
|
+
readonly description: "The replacement string used to substitute the matches found by the search pattern.";
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
}];
|
|
91
|
+
readonly required: false;
|
|
92
|
+
readonly description: "Transformation applied to the destination path of the extracted files.";
|
|
93
|
+
};
|
|
94
|
+
readonly transform: {
|
|
95
|
+
readonly type: "union";
|
|
96
|
+
readonly union: readonly [{
|
|
97
|
+
readonly type: "string";
|
|
98
|
+
}, {
|
|
99
|
+
readonly type: "object";
|
|
100
|
+
readonly keys: {
|
|
101
|
+
readonly search: {
|
|
102
|
+
readonly type: "string";
|
|
103
|
+
readonly required: true;
|
|
104
|
+
readonly description: "The regular expression pattern to search for in the file content.";
|
|
105
|
+
};
|
|
106
|
+
readonly flags: {
|
|
107
|
+
readonly type: "string";
|
|
108
|
+
readonly default: "g";
|
|
109
|
+
readonly pattern: RegExp;
|
|
110
|
+
readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
|
|
111
|
+
};
|
|
112
|
+
readonly replace: {
|
|
113
|
+
readonly type: "string";
|
|
114
|
+
readonly required: true;
|
|
115
|
+
readonly description: "The replacement string used to substitute the matches found by the search pattern.";
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
}];
|
|
119
|
+
readonly required: false;
|
|
120
|
+
readonly description: "Transformation applied to the content of the extracted files.";
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
}];
|
|
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.";
|
|
126
|
+
}];
|
|
127
|
+
readonly description: "Destination folder for the extracted files or an extraction mapping.";
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
}>;
|
|
131
|
+
export type ExtractEntry = typeof ExtractEntry.infer;
|
|
132
|
+
export declare namespace ExtractEntry { }
|
|
133
|
+
export declare const TransformEntry: Schema<{
|
|
134
|
+
readonly type: "object";
|
|
135
|
+
readonly required: true;
|
|
136
|
+
readonly keys: {
|
|
137
|
+
readonly transform: {
|
|
138
|
+
readonly type: "object";
|
|
139
|
+
readonly required: true;
|
|
140
|
+
readonly keys: {
|
|
141
|
+
readonly search: {
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
readonly required: true;
|
|
144
|
+
readonly description: "The regular expression pattern to search for in the file content.";
|
|
145
|
+
};
|
|
146
|
+
readonly flags: {
|
|
147
|
+
readonly type: "string";
|
|
148
|
+
readonly default: "g";
|
|
149
|
+
readonly pattern: RegExp;
|
|
150
|
+
readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
|
|
151
|
+
};
|
|
152
|
+
readonly replace: {
|
|
153
|
+
readonly type: "string";
|
|
154
|
+
readonly required: true;
|
|
155
|
+
readonly description: "The replacement string used to substitute the matches found by the search pattern.";
|
|
156
|
+
};
|
|
157
|
+
readonly glob: {
|
|
158
|
+
readonly type: "string";
|
|
159
|
+
readonly required: true;
|
|
160
|
+
readonly description: "Glob pattern matching the files to which the global transformation is applied.";
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
readonly description: "Global transformation to apply over the files matched by the glob pattern.";
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
}>;
|
|
167
|
+
export type TransformEntry = typeof TransformEntry.infer;
|
|
168
|
+
export declare namespace TransformEntry { }
|
|
169
|
+
export declare const BuilderEntry: Schema<{
|
|
170
|
+
readonly type: "union";
|
|
171
|
+
readonly required: true;
|
|
172
|
+
readonly union: readonly [{
|
|
173
|
+
readonly type: "object";
|
|
174
|
+
readonly required: true;
|
|
175
|
+
readonly keys: {
|
|
176
|
+
readonly maxTimeMs: {
|
|
177
|
+
readonly type: "number";
|
|
178
|
+
readonly default: 60000;
|
|
179
|
+
readonly minimum: -1;
|
|
180
|
+
readonly description: "Maximum execution time for the run step in milliseconds. A value of -1 disables the limit.";
|
|
181
|
+
};
|
|
182
|
+
readonly allowFails: {
|
|
183
|
+
readonly type: "boolean";
|
|
184
|
+
readonly default: false;
|
|
185
|
+
readonly description: "Whether failed commands within the step are tolerated. Defaults to false.";
|
|
186
|
+
};
|
|
187
|
+
readonly run: {
|
|
188
|
+
readonly type: "union";
|
|
189
|
+
readonly required: true;
|
|
190
|
+
readonly union: readonly [{
|
|
191
|
+
readonly type: "string";
|
|
192
|
+
}, {
|
|
193
|
+
readonly type: "array";
|
|
194
|
+
readonly items: {
|
|
195
|
+
readonly type: "string";
|
|
196
|
+
};
|
|
197
|
+
}];
|
|
198
|
+
readonly description: "Shell command or list of shell commands to execute.";
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
}, {
|
|
202
|
+
readonly type: "object";
|
|
203
|
+
readonly required: true;
|
|
204
|
+
readonly keys: {
|
|
205
|
+
readonly extract: {
|
|
206
|
+
readonly type: "union";
|
|
207
|
+
readonly required: true;
|
|
208
|
+
readonly union: readonly [{
|
|
209
|
+
readonly type: "string";
|
|
210
|
+
}, {
|
|
211
|
+
readonly type: "object";
|
|
212
|
+
readonly required: true;
|
|
213
|
+
readonly additional: {
|
|
214
|
+
readonly type: "union";
|
|
215
|
+
readonly required: true;
|
|
216
|
+
readonly union: readonly [{
|
|
217
|
+
readonly type: "string";
|
|
218
|
+
readonly required: true;
|
|
219
|
+
}, {
|
|
220
|
+
readonly type: "object";
|
|
221
|
+
readonly required: true;
|
|
222
|
+
readonly keys: {
|
|
223
|
+
readonly to: {
|
|
224
|
+
readonly type: "string";
|
|
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.";
|
|
227
|
+
};
|
|
228
|
+
readonly map: {
|
|
229
|
+
readonly type: "union";
|
|
230
|
+
readonly union: readonly [{
|
|
231
|
+
readonly type: "string";
|
|
232
|
+
}, {
|
|
233
|
+
readonly type: "object";
|
|
234
|
+
readonly keys: {
|
|
235
|
+
readonly search: {
|
|
236
|
+
readonly type: "string";
|
|
237
|
+
readonly required: true;
|
|
238
|
+
readonly description: "The regular expression pattern to search for in the file content.";
|
|
239
|
+
};
|
|
240
|
+
readonly flags: {
|
|
241
|
+
readonly type: "string";
|
|
242
|
+
readonly default: "g";
|
|
243
|
+
readonly pattern: RegExp;
|
|
244
|
+
readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
|
|
245
|
+
};
|
|
246
|
+
readonly replace: {
|
|
247
|
+
readonly type: "string";
|
|
248
|
+
readonly required: true;
|
|
249
|
+
readonly description: "The replacement string used to substitute the matches found by the search pattern.";
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
}];
|
|
253
|
+
readonly required: false;
|
|
254
|
+
readonly description: "Transformation applied to the destination path of the extracted files.";
|
|
255
|
+
};
|
|
256
|
+
readonly transform: {
|
|
257
|
+
readonly type: "union";
|
|
258
|
+
readonly union: readonly [{
|
|
259
|
+
readonly type: "string";
|
|
260
|
+
}, {
|
|
261
|
+
readonly type: "object";
|
|
262
|
+
readonly keys: {
|
|
263
|
+
readonly search: {
|
|
264
|
+
readonly type: "string";
|
|
265
|
+
readonly required: true;
|
|
266
|
+
readonly description: "The regular expression pattern to search for in the file content.";
|
|
267
|
+
};
|
|
268
|
+
readonly flags: {
|
|
269
|
+
readonly type: "string";
|
|
270
|
+
readonly default: "g";
|
|
271
|
+
readonly pattern: RegExp;
|
|
272
|
+
readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
|
|
273
|
+
};
|
|
274
|
+
readonly replace: {
|
|
275
|
+
readonly type: "string";
|
|
276
|
+
readonly required: true;
|
|
277
|
+
readonly description: "The replacement string used to substitute the matches found by the search pattern.";
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
}];
|
|
281
|
+
readonly required: false;
|
|
282
|
+
readonly description: "Transformation applied to the content of the extracted files.";
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
}];
|
|
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.";
|
|
288
|
+
}];
|
|
289
|
+
readonly description: "Destination folder for the extracted files or an extraction mapping.";
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
}, {
|
|
293
|
+
readonly type: "object";
|
|
294
|
+
readonly required: true;
|
|
295
|
+
readonly keys: {
|
|
296
|
+
readonly transform: {
|
|
297
|
+
readonly type: "object";
|
|
298
|
+
readonly required: true;
|
|
299
|
+
readonly keys: {
|
|
300
|
+
readonly search: {
|
|
301
|
+
readonly type: "string";
|
|
302
|
+
readonly required: true;
|
|
303
|
+
readonly description: "The regular expression pattern to search for in the file content.";
|
|
304
|
+
};
|
|
305
|
+
readonly flags: {
|
|
306
|
+
readonly type: "string";
|
|
307
|
+
readonly default: "g";
|
|
308
|
+
readonly pattern: RegExp;
|
|
309
|
+
readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
|
|
310
|
+
};
|
|
311
|
+
readonly replace: {
|
|
312
|
+
readonly type: "string";
|
|
313
|
+
readonly required: true;
|
|
314
|
+
readonly description: "The replacement string used to substitute the matches found by the search pattern.";
|
|
315
|
+
};
|
|
316
|
+
readonly glob: {
|
|
317
|
+
readonly type: "string";
|
|
318
|
+
readonly required: true;
|
|
319
|
+
readonly description: "Glob pattern matching the files to which the global transformation is applied.";
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
readonly description: "Global transformation to apply over the files matched by the glob pattern.";
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
}];
|
|
326
|
+
readonly description: "A single build step: run commands, extract files or apply a global transformation.";
|
|
327
|
+
}>;
|
|
328
|
+
export type BuilderEntry = typeof BuilderEntry.infer;
|
|
329
|
+
export declare namespace BuilderEntry { }
|
|
330
|
+
export declare const Builder: Schema<{
|
|
331
|
+
readonly type: "array";
|
|
332
|
+
readonly default: never[];
|
|
333
|
+
readonly items: {
|
|
334
|
+
readonly type: "union";
|
|
335
|
+
readonly required: true;
|
|
336
|
+
readonly union: readonly [{
|
|
337
|
+
readonly type: "object";
|
|
338
|
+
readonly required: true;
|
|
339
|
+
readonly keys: {
|
|
340
|
+
readonly maxTimeMs: {
|
|
341
|
+
readonly type: "number";
|
|
342
|
+
readonly default: 60000;
|
|
343
|
+
readonly minimum: -1;
|
|
344
|
+
readonly description: "Maximum execution time for the run step in milliseconds. A value of -1 disables the limit.";
|
|
345
|
+
};
|
|
346
|
+
readonly allowFails: {
|
|
347
|
+
readonly type: "boolean";
|
|
348
|
+
readonly default: false;
|
|
349
|
+
readonly description: "Whether failed commands within the step are tolerated. Defaults to false.";
|
|
350
|
+
};
|
|
351
|
+
readonly run: {
|
|
352
|
+
readonly type: "union";
|
|
353
|
+
readonly required: true;
|
|
354
|
+
readonly union: readonly [{
|
|
355
|
+
readonly type: "string";
|
|
356
|
+
}, {
|
|
357
|
+
readonly type: "array";
|
|
358
|
+
readonly items: {
|
|
359
|
+
readonly type: "string";
|
|
360
|
+
};
|
|
361
|
+
}];
|
|
362
|
+
readonly description: "Shell command or list of shell commands to execute.";
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
}, {
|
|
366
|
+
readonly type: "object";
|
|
367
|
+
readonly required: true;
|
|
368
|
+
readonly keys: {
|
|
369
|
+
readonly extract: {
|
|
370
|
+
readonly type: "union";
|
|
371
|
+
readonly required: true;
|
|
372
|
+
readonly union: readonly [{
|
|
373
|
+
readonly type: "string";
|
|
374
|
+
}, {
|
|
375
|
+
readonly type: "object";
|
|
376
|
+
readonly required: true;
|
|
377
|
+
readonly additional: {
|
|
378
|
+
readonly type: "union";
|
|
379
|
+
readonly required: true;
|
|
380
|
+
readonly union: readonly [{
|
|
381
|
+
readonly type: "string";
|
|
382
|
+
readonly required: true;
|
|
383
|
+
}, {
|
|
384
|
+
readonly type: "object";
|
|
385
|
+
readonly required: true;
|
|
386
|
+
readonly keys: {
|
|
387
|
+
readonly to: {
|
|
388
|
+
readonly type: "string";
|
|
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.";
|
|
391
|
+
};
|
|
392
|
+
readonly map: {
|
|
393
|
+
readonly type: "union";
|
|
394
|
+
readonly union: readonly [{
|
|
395
|
+
readonly type: "string";
|
|
396
|
+
}, {
|
|
397
|
+
readonly type: "object";
|
|
398
|
+
readonly keys: {
|
|
399
|
+
readonly search: {
|
|
400
|
+
readonly type: "string";
|
|
401
|
+
readonly required: true;
|
|
402
|
+
readonly description: "The regular expression pattern to search for in the file content.";
|
|
403
|
+
};
|
|
404
|
+
readonly flags: {
|
|
405
|
+
readonly type: "string";
|
|
406
|
+
readonly default: "g";
|
|
407
|
+
readonly pattern: RegExp;
|
|
408
|
+
readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
|
|
409
|
+
};
|
|
410
|
+
readonly replace: {
|
|
411
|
+
readonly type: "string";
|
|
412
|
+
readonly required: true;
|
|
413
|
+
readonly description: "The replacement string used to substitute the matches found by the search pattern.";
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
}];
|
|
417
|
+
readonly required: false;
|
|
418
|
+
readonly description: "Transformation applied to the destination path of the extracted files.";
|
|
419
|
+
};
|
|
420
|
+
readonly transform: {
|
|
421
|
+
readonly type: "union";
|
|
422
|
+
readonly union: readonly [{
|
|
423
|
+
readonly type: "string";
|
|
424
|
+
}, {
|
|
425
|
+
readonly type: "object";
|
|
426
|
+
readonly keys: {
|
|
427
|
+
readonly search: {
|
|
428
|
+
readonly type: "string";
|
|
429
|
+
readonly required: true;
|
|
430
|
+
readonly description: "The regular expression pattern to search for in the file content.";
|
|
431
|
+
};
|
|
432
|
+
readonly flags: {
|
|
433
|
+
readonly type: "string";
|
|
434
|
+
readonly default: "g";
|
|
435
|
+
readonly pattern: RegExp;
|
|
436
|
+
readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
|
|
437
|
+
};
|
|
438
|
+
readonly replace: {
|
|
439
|
+
readonly type: "string";
|
|
440
|
+
readonly required: true;
|
|
441
|
+
readonly description: "The replacement string used to substitute the matches found by the search pattern.";
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
}];
|
|
445
|
+
readonly required: false;
|
|
446
|
+
readonly description: "Transformation applied to the content of the extracted files.";
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
}];
|
|
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.";
|
|
452
|
+
}];
|
|
453
|
+
readonly description: "Destination folder for the extracted files or an extraction mapping.";
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
}, {
|
|
457
|
+
readonly type: "object";
|
|
458
|
+
readonly required: true;
|
|
459
|
+
readonly keys: {
|
|
460
|
+
readonly transform: {
|
|
461
|
+
readonly type: "object";
|
|
462
|
+
readonly required: true;
|
|
463
|
+
readonly keys: {
|
|
464
|
+
readonly search: {
|
|
465
|
+
readonly type: "string";
|
|
466
|
+
readonly required: true;
|
|
467
|
+
readonly description: "The regular expression pattern to search for in the file content.";
|
|
468
|
+
};
|
|
469
|
+
readonly flags: {
|
|
470
|
+
readonly type: "string";
|
|
471
|
+
readonly default: "g";
|
|
472
|
+
readonly pattern: RegExp;
|
|
473
|
+
readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
|
|
474
|
+
};
|
|
475
|
+
readonly replace: {
|
|
476
|
+
readonly type: "string";
|
|
477
|
+
readonly required: true;
|
|
478
|
+
readonly description: "The replacement string used to substitute the matches found by the search pattern.";
|
|
479
|
+
};
|
|
480
|
+
readonly glob: {
|
|
481
|
+
readonly type: "string";
|
|
482
|
+
readonly required: true;
|
|
483
|
+
readonly description: "Glob pattern matching the files to which the global transformation is applied.";
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
readonly description: "Global transformation to apply over the files matched by the glob pattern.";
|
|
487
|
+
};
|
|
488
|
+
};
|
|
489
|
+
}];
|
|
490
|
+
readonly description: "A single build step: run commands, extract files or apply a global transformation.";
|
|
491
|
+
};
|
|
492
|
+
readonly description: "Ordered pipeline of build steps applied when a dependency is built.";
|
|
493
|
+
}>;
|
|
494
|
+
export type Builder = typeof Builder.infer;
|
|
495
|
+
export declare namespace Builder { }
|
|
496
|
+
export default 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"}
|