@driveflux/fab 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build.js +17 -9
- package/dist/clean.js +12 -4
- package/dist/config.js +14 -6
- package/dist/create.js +13 -5
- package/dist/utils.js +16 -8
- package/package.json +9 -9
- package/templates/frontend/package.json +1 -1
- package/templates/frontend/tsconfig.json +1 -1
package/dist/build.js
CHANGED
|
@@ -94,9 +94,17 @@ function _ts_generator(thisArg, body) {
|
|
|
94
94
|
},
|
|
95
95
|
trys: [],
|
|
96
96
|
ops: []
|
|
97
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
98
|
-
return
|
|
99
|
-
|
|
97
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
98
|
+
return d(g, "next", {
|
|
99
|
+
value: verb(0)
|
|
100
|
+
}), d(g, "throw", {
|
|
101
|
+
value: verb(1)
|
|
102
|
+
}), d(g, "return", {
|
|
103
|
+
value: verb(2)
|
|
104
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
105
|
+
value: function() {
|
|
106
|
+
return this;
|
|
107
|
+
}
|
|
100
108
|
}), g;
|
|
101
109
|
function verb(n) {
|
|
102
110
|
return function(v) {
|
|
@@ -187,7 +195,7 @@ export var TARGETS = [
|
|
|
187
195
|
'types',
|
|
188
196
|
'copy'
|
|
189
197
|
];
|
|
190
|
-
export var build = function(rawOptions) {
|
|
198
|
+
export var build = function build(rawOptions) {
|
|
191
199
|
return _async_to_generator(function() {
|
|
192
200
|
var options, promises, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, target;
|
|
193
201
|
return _ts_generator(this, function(_state) {
|
|
@@ -248,7 +256,7 @@ export var build = function(rawOptions) {
|
|
|
248
256
|
});
|
|
249
257
|
})();
|
|
250
258
|
};
|
|
251
|
-
export var copyVerbatim = function(rawOptions) {
|
|
259
|
+
export var copyVerbatim = function copyVerbatim(rawOptions) {
|
|
252
260
|
return _async_to_generator(function() {
|
|
253
261
|
var _options_copyVerbatim, options, destination, guessTarget;
|
|
254
262
|
return _ts_generator(this, function(_state) {
|
|
@@ -260,7 +268,7 @@ export var copyVerbatim = function(rawOptions) {
|
|
|
260
268
|
2
|
|
261
269
|
];
|
|
262
270
|
destination = options.destination;
|
|
263
|
-
guessTarget = function(copySource) {
|
|
271
|
+
guessTarget = function guessTarget(copySource) {
|
|
264
272
|
var relative = path.relative(options.source, copySource);
|
|
265
273
|
var targetPath = path.resolve(destination, relative);
|
|
266
274
|
if (!copySource.startsWith(options.source)) {
|
|
@@ -312,7 +320,7 @@ export var copyVerbatim = function(rawOptions) {
|
|
|
312
320
|
});
|
|
313
321
|
})();
|
|
314
322
|
};
|
|
315
|
-
export var buildTypes = function(rawOptions) {
|
|
323
|
+
export var buildTypes = function buildTypes(rawOptions) {
|
|
316
324
|
return _async_to_generator(function() {
|
|
317
325
|
var options, now;
|
|
318
326
|
return _ts_generator(this, function(_state) {
|
|
@@ -340,7 +348,7 @@ export var buildTypes = function(rawOptions) {
|
|
|
340
348
|
});
|
|
341
349
|
})();
|
|
342
350
|
};
|
|
343
|
-
export var buildEsm = function(rawOptions) {
|
|
351
|
+
export var buildEsm = function buildEsm(rawOptions) {
|
|
344
352
|
return _async_to_generator(function() {
|
|
345
353
|
var options, finalOptions, swcrc, _e, isValid, compilerOptions;
|
|
346
354
|
return _ts_generator(this, function(_state) {
|
|
@@ -378,7 +386,7 @@ export var buildEsm = function(rawOptions) {
|
|
|
378
386
|
4
|
|
379
387
|
];
|
|
380
388
|
case 4:
|
|
381
|
-
isValid = function(v) {
|
|
389
|
+
isValid = function isValid(v) {
|
|
382
390
|
return typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean' && v;
|
|
383
391
|
};
|
|
384
392
|
compilerOptions = Object.entries(finalOptions).map(function(param) {
|
package/dist/clean.js
CHANGED
|
@@ -61,9 +61,17 @@ function _ts_generator(thisArg, body) {
|
|
|
61
61
|
},
|
|
62
62
|
trys: [],
|
|
63
63
|
ops: []
|
|
64
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
65
|
-
return
|
|
66
|
-
|
|
64
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
65
|
+
return d(g, "next", {
|
|
66
|
+
value: verb(0)
|
|
67
|
+
}), d(g, "throw", {
|
|
68
|
+
value: verb(1)
|
|
69
|
+
}), d(g, "return", {
|
|
70
|
+
value: verb(2)
|
|
71
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
72
|
+
value: function() {
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
67
75
|
}), g;
|
|
68
76
|
function verb(n) {
|
|
69
77
|
return function(v) {
|
|
@@ -147,7 +155,7 @@ import path from 'node:path';
|
|
|
147
155
|
import { deleteAsync } from 'del';
|
|
148
156
|
import merge from 'lodash.merge';
|
|
149
157
|
import { getDefaultOptions } from './utils.js';
|
|
150
|
-
export var clean = function(rawOptions) {
|
|
158
|
+
export var clean = function clean(rawOptions) {
|
|
151
159
|
return _async_to_generator(function() {
|
|
152
160
|
var _merge, destination, cleanTs, all, cleanJsGlobs, cleanTsGlobs, cwd, dry, globs, _globs, result;
|
|
153
161
|
return _ts_generator(this, function(_state) {
|
package/dist/config.js
CHANGED
|
@@ -36,9 +36,17 @@ function _ts_generator(thisArg, body) {
|
|
|
36
36
|
},
|
|
37
37
|
trys: [],
|
|
38
38
|
ops: []
|
|
39
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
40
|
-
return
|
|
41
|
-
|
|
39
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
40
|
+
return d(g, "next", {
|
|
41
|
+
value: verb(0)
|
|
42
|
+
}), d(g, "throw", {
|
|
43
|
+
value: verb(1)
|
|
44
|
+
}), d(g, "return", {
|
|
45
|
+
value: verb(2)
|
|
46
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
47
|
+
value: function() {
|
|
48
|
+
return this;
|
|
49
|
+
}
|
|
42
50
|
}), g;
|
|
43
51
|
function verb(n) {
|
|
44
52
|
return function(v) {
|
|
@@ -133,7 +141,7 @@ var ConfigValidation = z.object({
|
|
|
133
141
|
cleanJsGlobs: z.array(z.string()).optional(),
|
|
134
142
|
cleanTsGlobs: z.array(z.string()).optional()
|
|
135
143
|
});
|
|
136
|
-
export var parseConfig = function(options) {
|
|
144
|
+
export var parseConfig = function parseConfig(options) {
|
|
137
145
|
return _async_to_generator(function() {
|
|
138
146
|
var cwd, config, parsed;
|
|
139
147
|
return _ts_generator(this, function(_state) {
|
|
@@ -188,7 +196,7 @@ export var parseConfig = function(options) {
|
|
|
188
196
|
});
|
|
189
197
|
})();
|
|
190
198
|
};
|
|
191
|
-
var findConfigFile = function() {
|
|
199
|
+
var findConfigFile = function findConfigFile() {
|
|
192
200
|
var cwd = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : process.cwd();
|
|
193
201
|
return _async_to_generator(function() {
|
|
194
202
|
var files, configFile, _tmp;
|
|
@@ -231,7 +239,7 @@ var findConfigFile = function() {
|
|
|
231
239
|
});
|
|
232
240
|
})();
|
|
233
241
|
};
|
|
234
|
-
var readConfigFile = function(configPath) {
|
|
242
|
+
var readConfigFile = function readConfigFile(configPath) {
|
|
235
243
|
return _async_to_generator(function() {
|
|
236
244
|
var _;
|
|
237
245
|
return _ts_generator(this, function(_state) {
|
package/dist/create.js
CHANGED
|
@@ -61,9 +61,17 @@ function _ts_generator(thisArg, body) {
|
|
|
61
61
|
},
|
|
62
62
|
trys: [],
|
|
63
63
|
ops: []
|
|
64
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
65
|
-
return
|
|
66
|
-
|
|
64
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
65
|
+
return d(g, "next", {
|
|
66
|
+
value: verb(0)
|
|
67
|
+
}), d(g, "throw", {
|
|
68
|
+
value: verb(1)
|
|
69
|
+
}), d(g, "return", {
|
|
70
|
+
value: verb(2)
|
|
71
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
72
|
+
value: function() {
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
67
75
|
}), g;
|
|
68
76
|
function verb(n) {
|
|
69
77
|
return function(v) {
|
|
@@ -148,7 +156,7 @@ import path from 'node:path';
|
|
|
148
156
|
import { deleteAsync } from 'del';
|
|
149
157
|
import { DEV_DEPS_TO_INSTALL } from './create-package-config.js';
|
|
150
158
|
import { ensureDir, getBaseDir, runCommand } from './utils.js';
|
|
151
|
-
export var create = function(param) {
|
|
159
|
+
export var create = function create(param) {
|
|
152
160
|
var template = param.template, name = param.name, providedDestination = param.destination, providedCwd = param.cwd, dangerouslyRewrite = param.dangerouslyRewrite;
|
|
153
161
|
return _async_to_generator(function() {
|
|
154
162
|
var cwd, destination, finalDestination, _e, templatePath;
|
|
@@ -258,7 +266,7 @@ export var create = function(param) {
|
|
|
258
266
|
});
|
|
259
267
|
})();
|
|
260
268
|
};
|
|
261
|
-
var replaceInFile = function(filePath, replacements) {
|
|
269
|
+
var replaceInFile = function replaceInFile(filePath, replacements) {
|
|
262
270
|
return _async_to_generator(function() {
|
|
263
271
|
var content, newContent;
|
|
264
272
|
return _ts_generator(this, function(_state) {
|
package/dist/utils.js
CHANGED
|
@@ -64,9 +64,17 @@ function _ts_generator(thisArg, body) {
|
|
|
64
64
|
},
|
|
65
65
|
trys: [],
|
|
66
66
|
ops: []
|
|
67
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
68
|
-
return
|
|
69
|
-
|
|
67
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
68
|
+
return d(g, "next", {
|
|
69
|
+
value: verb(0)
|
|
70
|
+
}), d(g, "throw", {
|
|
71
|
+
value: verb(1)
|
|
72
|
+
}), d(g, "return", {
|
|
73
|
+
value: verb(2)
|
|
74
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
75
|
+
value: function() {
|
|
76
|
+
return this;
|
|
77
|
+
}
|
|
70
78
|
}), g;
|
|
71
79
|
function verb(n) {
|
|
72
80
|
return function(v) {
|
|
@@ -149,7 +157,7 @@ function _ts_generator(thisArg, body) {
|
|
|
149
157
|
import { spawn } from 'node:child_process';
|
|
150
158
|
import fs from 'node:fs/promises';
|
|
151
159
|
import path from 'node:path';
|
|
152
|
-
export var ensureDir = function(dir) {
|
|
160
|
+
export var ensureDir = function ensureDir(dir) {
|
|
153
161
|
return _async_to_generator(function() {
|
|
154
162
|
var stat, _e;
|
|
155
163
|
return _ts_generator(this, function(_state) {
|
|
@@ -196,7 +204,7 @@ export var ensureDir = function(dir) {
|
|
|
196
204
|
});
|
|
197
205
|
})();
|
|
198
206
|
};
|
|
199
|
-
export var runBin = function(bin, args, options) {
|
|
207
|
+
export var runBin = function runBin(bin, args, options) {
|
|
200
208
|
return _async_to_generator(function() {
|
|
201
209
|
var basePath, binPath;
|
|
202
210
|
return _ts_generator(this, function(_state) {
|
|
@@ -209,7 +217,7 @@ export var runBin = function(bin, args, options) {
|
|
|
209
217
|
});
|
|
210
218
|
})();
|
|
211
219
|
};
|
|
212
|
-
export var runCommand = function(cmd, args, options) {
|
|
220
|
+
export var runCommand = function runCommand(cmd, args, options) {
|
|
213
221
|
return _async_to_generator(function() {
|
|
214
222
|
var c;
|
|
215
223
|
return _ts_generator(this, function(_state) {
|
|
@@ -236,10 +244,10 @@ export var runCommand = function(cmd, args, options) {
|
|
|
236
244
|
});
|
|
237
245
|
})();
|
|
238
246
|
};
|
|
239
|
-
export var getBaseDir = function() {
|
|
247
|
+
export var getBaseDir = function getBaseDir() {
|
|
240
248
|
return path.resolve(path.dirname(decodeURIComponent(new URL(import.meta.url).pathname)), '..');
|
|
241
249
|
};
|
|
242
|
-
export var getDefaultOptions = function() {
|
|
250
|
+
export var getDefaultOptions = function getDefaultOptions() {
|
|
243
251
|
return {
|
|
244
252
|
source: 'src',
|
|
245
253
|
destination: 'dist',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@driveflux/fab",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -15,20 +15,20 @@
|
|
|
15
15
|
"tsconfig.json"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@swc/cli": "^0.
|
|
19
|
-
"@swc/core": "^1.
|
|
20
|
-
"commander": "^14.0.
|
|
18
|
+
"@swc/cli": "^0.8.1",
|
|
19
|
+
"@swc/core": "^1.15.33",
|
|
20
|
+
"commander": "^14.0.3",
|
|
21
21
|
"del": "^8.0.1",
|
|
22
22
|
"lodash.merge": "^4.6.2",
|
|
23
|
-
"zod": "^4.
|
|
23
|
+
"zod": "^4.4.3"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@driveflux/tsconfig": "3.0.
|
|
26
|
+
"@driveflux/tsconfig": "3.0.1",
|
|
27
27
|
"@types/lodash.merge": "^4.6.9",
|
|
28
|
-
"@types/node": "^
|
|
28
|
+
"@types/node": "^25.7.0",
|
|
29
29
|
"del-cli": "^7.0.0",
|
|
30
|
-
"type-fest": "^5.
|
|
31
|
-
"typescript": "^
|
|
30
|
+
"type-fest": "^5.6.0",
|
|
31
|
+
"typescript": "^6.0.3"
|
|
32
32
|
},
|
|
33
33
|
"bin": {
|
|
34
34
|
"fab": "./bin/fab.js"
|