@driveflux/fab 2.3.1 → 2.3.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,KAAK,EACX,WAAW,EACX,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,MAAM,YAAY,CAAA;AAGnB,eAAO,MAAM,KAAK,gBACJ,UAAU,GAAG,YAAY,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,kBAiBxD,CAAA;AAED,eAAO,MAAM,YAAY,gBAAuB,mBAAmB,kBAmClE,CAAA;AAED,eAAO,MAAM,UAAU,gBAAuB,WAAW,kBAaxD,CAAA;AAED,eAAO,MAAM,QAAQ,gBAAuB,eAAe,kBA4B1D,CAAA"}
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,KAAK,EACX,WAAW,EACX,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,MAAM,YAAY,CAAA;AAEnB,eAAO,MAAM,KAAK,gBACJ,UAAU,GAAG,YAAY,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,kBAiBxD,CAAA;AAED,eAAO,MAAM,YAAY,gBAAuB,mBAAmB,kBAmClE,CAAA;AAED,eAAO,MAAM,UAAU,gBAAuB,WAAW,kBAWxD,CAAA;AAED,eAAO,MAAM,QAAQ,gBAAuB,eAAe,kBA6B1D,CAAA"}
package/dist/build.js CHANGED
@@ -185,7 +185,7 @@ import path from 'node:path';
185
185
  import { performance } from 'node:perf_hooks';
186
186
  import merge from 'lodash.merge';
187
187
  import { clean } from './clean.js';
188
- import { ensureDir, getDefaultOptions, runBin, runCommand } from './utils.js';
188
+ import { ensureDir, getDefaultOptions, runBin } from './utils.js';
189
189
  export var build = /*#__PURE__*/ function() {
190
190
  var _ref = _async_to_generator(function(rawOptions) {
191
191
  var options, promises;
@@ -295,22 +295,21 @@ export var copyVerbatim = /*#__PURE__*/ function() {
295
295
  }();
296
296
  export var buildTypes = /*#__PURE__*/ function() {
297
297
  var _ref = _async_to_generator(function(rawOptions) {
298
- var options, tsProject, now;
298
+ var options, now;
299
299
  return _ts_generator(this, function(_state) {
300
300
  switch(_state.label){
301
301
  case 0:
302
302
  options = merge({}, getDefaultOptions(), rawOptions);
303
- tsProject = path.resolve(options.cwd, 'tsconfig.json');
303
+ console.log('Building types...');
304
304
  now = performance.now();
305
305
  return [
306
306
  4,
307
- runCommand('pnpm', [
308
- 'tsc',
309
- '--project',
310
- tsProject,
307
+ runBin('tsc', [
311
308
  '--emitDeclarationOnly',
312
309
  '--declarationMap'
313
- ])
310
+ ], {
311
+ cwd: options.cwd
312
+ })
314
313
  ];
315
314
  case 1:
316
315
  _state.sent();
@@ -381,6 +380,7 @@ export var buildEsm = /*#__PURE__*/ function() {
381
380
  }).flat().filter(function(v) {
382
381
  return v !== '';
383
382
  });
383
+ console.log('Building js files...');
384
384
  return [
385
385
  4,
386
386
  runBin('swc', [
package/dist/clean.js CHANGED
@@ -162,6 +162,7 @@ export var clean = /*#__PURE__*/ function() {
162
162
  path.resolve(destination, '**/*.js')
163
163
  ];
164
164
  if (cleanTs || all) {
165
+ globs.push(path.resolve(cwd || '.', 'tsconfig.tsbuildinfo'));
165
166
  if (cleanTsGlobs) {
166
167
  ;
167
168
  (_globs = globs).push.apply(_globs, _to_consumable_array(cleanTsGlobs));
@@ -169,7 +170,6 @@ export var clean = /*#__PURE__*/ function() {
169
170
  globs.push(path.resolve(destination, '**/*.d.ts'));
170
171
  }
171
172
  }
172
- globs.push(path.resolve(cwd || '.', 'tsconfig.tsbuildinfo'));
173
173
  return [
174
174
  4,
175
175
  deleteAsync(globs, {
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAS,MAAM,oBAAoB,CAAA;AAI7D,eAAO,MAAM,SAAS,QAAe,MAAM,kBAS1C,CAAA;AAED,eAAO,MAAM,MAAM,QACb,MAAM,QACL,MAAM,EAAE,YACJ,YAAY,qBAmBtB,CAAA;AAED,eAAO,MAAM,UAAU,QACjB,MAAM,QACL,MAAM,EAAE,YACJ,YAAY,qBAiBtB,CAAA;AAED,eAAO,MAAM,UAAU,cAMtB,CAAA;AAED,eAAO,MAAM,iBAAiB;;;;;CAK5B,CAAA"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAS,MAAM,oBAAoB,CAAA;AAI7D,eAAO,MAAM,SAAS,QAAe,MAAM,kBAS1C,CAAA;AAED,eAAO,MAAM,MAAM,QACb,MAAM,QACL,MAAM,EAAE,YACJ,YAAY,qBAKtB,CAAA;AAED,eAAO,MAAM,UAAU,QACjB,MAAM,QACL,MAAM,EAAE,YACJ,YAAY,qBAsBtB,CAAA;AAED,eAAO,MAAM,UAAU,cAKtB,CAAA;AAED,eAAO,MAAM,iBAAiB;;;;;CAK5B,CAAA"}
package/dist/utils.js CHANGED
@@ -205,28 +205,13 @@ export var ensureDir = /*#__PURE__*/ function() {
205
205
  }();
206
206
  export var runBin = /*#__PURE__*/ function() {
207
207
  var _ref = _async_to_generator(function(bin, args, options) {
208
- var basePath, binPath, c;
208
+ var basePath, binPath;
209
209
  return _ts_generator(this, function(_state) {
210
210
  basePath = getBaseDir();
211
211
  binPath = path.resolve(basePath, 'node_modules/.bin', bin);
212
- c = spawn(binPath, args, _object_spread({
213
- stdio: 'inherit'
214
- }, options));
215
212
  return [
216
213
  2,
217
- new Promise(function(resolve, reject) {
218
- c.on('error', function(error) {
219
- console.error(error);
220
- reject(error);
221
- });
222
- c.on('close', function(code) {
223
- if (code !== 0) {
224
- reject(new Error("Command exited with code ".concat(code)));
225
- } else {
226
- resolve(true);
227
- }
228
- });
229
- })
214
+ runCommand(binPath, args, options)
230
215
  ];
231
216
  });
232
217
  });
@@ -239,7 +224,8 @@ export var runCommand = /*#__PURE__*/ function() {
239
224
  var c;
240
225
  return _ts_generator(this, function(_state) {
241
226
  c = spawn(cmd, args, _object_spread({
242
- stdio: 'inherit'
227
+ stdio: 'inherit',
228
+ shell: process.platform === 'win32'
243
229
  }, options));
244
230
  return [
245
231
  2,
@@ -264,7 +250,6 @@ export var runCommand = /*#__PURE__*/ function() {
264
250
  };
265
251
  }();
266
252
  export var getBaseDir = function() {
267
- // This file will end up in ./dist, so we need to remove the dist from the path
268
253
  return path.resolve(path.dirname(decodeURIComponent(new URL(import.meta.url).pathname)), '..');
269
254
  };
270
255
  export var getDefaultOptions = function() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@driveflux/fab",
3
- "version": "2.3.1",
3
+ "version": "2.3.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {