@fulmenhq/tsfulmen 0.2.10 → 0.3.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +1 -1
  3. package/dist/appidentity/index.js +156 -4150
  4. package/dist/appidentity/index.js.map +1 -1
  5. package/dist/bin/prometheus-cli.d.ts +1 -0
  6. package/dist/bin/prometheus-cli.js +9331 -0
  7. package/dist/bin/prometheus-cli.js.map +1 -0
  8. package/dist/bin/schema-cli.d.ts +1 -0
  9. package/dist/bin/schema-cli.js +6104 -0
  10. package/dist/bin/schema-cli.js.map +1 -0
  11. package/dist/bin/signals-cli.d.ts +1 -0
  12. package/dist/bin/signals-cli.js +2104 -0
  13. package/dist/bin/signals-cli.js.map +1 -0
  14. package/dist/config/index.js +29 -4915
  15. package/dist/config/index.js.map +1 -1
  16. package/dist/crucible/index.js +120 -5336
  17. package/dist/crucible/index.js.map +1 -1
  18. package/dist/errors/index.js +52 -4434
  19. package/dist/errors/index.js.map +1 -1
  20. package/dist/foundry/index.js +197 -1874
  21. package/dist/foundry/index.js.map +1 -1
  22. package/dist/fulpack/index.js +43 -31
  23. package/dist/fulpack/index.js.map +1 -1
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.js +204 -4185
  26. package/dist/index.js.map +1 -1
  27. package/dist/pathfinder/index.js +47 -4378
  28. package/dist/pathfinder/index.js.map +1 -1
  29. package/dist/reports/license-inventory.csv +17 -17
  30. package/dist/schema/index.js +0 -4
  31. package/dist/schema/index.js.map +1 -1
  32. package/dist/signals/index.js +231 -3570
  33. package/dist/signals/index.js.map +1 -1
  34. package/dist/telemetry/http/index.js +94 -5280
  35. package/dist/telemetry/http/index.js.map +1 -1
  36. package/dist/telemetry/index.js +70 -4786
  37. package/dist/telemetry/index.js.map +1 -1
  38. package/dist/telemetry/prometheus/index.js +461 -4450
  39. package/dist/telemetry/prometheus/index.js.map +1 -1
  40. package/package.json +13 -8
@@ -2,7 +2,7 @@ import { existsSync, mkdirSync, statSync, createReadStream, createWriteStream, r
2
2
  import { dirname, basename, join } from 'path';
3
3
  import { pipeline } from 'stream';
4
4
  import { createGunzip, createGzip } from 'zlib';
5
- import archiver from 'archiver';
5
+ import { TarArchive, ZipArchive } from 'archiver';
6
6
 
7
7
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
8
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
@@ -522,7 +522,7 @@ async function scanGzipFile(archive, options) {
522
522
  }
523
523
  async function createTarGzArchive(sources, output, options) {
524
524
  const writeStream = createWriteStream(output);
525
- const archive = archiver("tar", {
525
+ const archive = new TarArchive({
526
526
  gzip: true,
527
527
  gzipOptions: {
528
528
  level: options.compression_level
@@ -533,14 +533,17 @@ async function createTarGzArchive(sources, output, options) {
533
533
  const writePromise = new Promise((resolve, reject) => {
534
534
  writeStream.on("close", () => resolve());
535
535
  writeStream.on("error", reject);
536
- });
537
- archive.on("error", (error) => {
538
- throw new FulpackOperationError(
539
- createFulpackError(
540
- ERROR_CODES.EXTRACTION_FAILED,
541
- `TAR.GZ creation failed: ${error.message}`,
542
- "create" /* CREATE */,
543
- { details: { original_error: error } }
536
+ archive.on(
537
+ "error",
538
+ (error) => reject(
539
+ new FulpackOperationError(
540
+ createFulpackError(
541
+ ERROR_CODES.EXTRACTION_FAILED,
542
+ `TAR.GZ creation failed: ${error.message}`,
543
+ "create" /* CREATE */,
544
+ { details: { original_error: error } }
545
+ )
546
+ )
544
547
  )
545
548
  );
546
549
  });
@@ -569,7 +572,8 @@ async function createTarGzArchive(sources, output, options) {
569
572
  totalSize += stats.size;
570
573
  }
571
574
  }
572
- await archive.finalize();
575
+ archive.finalize().catch(() => {
576
+ });
573
577
  await writePromise;
574
578
  const outputStats = statSync(output);
575
579
  return {
@@ -586,7 +590,7 @@ async function createTarGzArchive(sources, output, options) {
586
590
  }
587
591
  async function createZipArchive(sources, output, options) {
588
592
  const writeStream = createWriteStream(output);
589
- const archive = archiver("zip", {
593
+ const archive = new ZipArchive({
590
594
  zlib: { level: options.compression_level }
591
595
  });
592
596
  let entryCount = 0;
@@ -594,14 +598,17 @@ async function createZipArchive(sources, output, options) {
594
598
  const writePromise = new Promise((resolve, reject) => {
595
599
  writeStream.on("close", () => resolve());
596
600
  writeStream.on("error", reject);
597
- });
598
- archive.on("error", (error) => {
599
- throw new FulpackOperationError(
600
- createFulpackError(
601
- ERROR_CODES.EXTRACTION_FAILED,
602
- `ZIP creation failed: ${error.message}`,
603
- "create" /* CREATE */,
604
- { details: { original_error: error } }
601
+ archive.on(
602
+ "error",
603
+ (error) => reject(
604
+ new FulpackOperationError(
605
+ createFulpackError(
606
+ ERROR_CODES.EXTRACTION_FAILED,
607
+ `ZIP creation failed: ${error.message}`,
608
+ "create" /* CREATE */,
609
+ { details: { original_error: error } }
610
+ )
611
+ )
605
612
  )
606
613
  );
607
614
  });
@@ -630,7 +637,8 @@ async function createZipArchive(sources, output, options) {
630
637
  totalSize += stats.size;
631
638
  }
632
639
  }
633
- await archive.finalize();
640
+ archive.finalize().catch(() => {
641
+ });
634
642
  await writePromise;
635
643
  const outputStats = statSync(output);
636
644
  return {
@@ -675,7 +683,7 @@ async function addDirectoryToTarGzArchive(archive, dirPath, archivePrefix, optio
675
683
  }
676
684
  async function createTarArchive(sources, output, options) {
677
685
  const writeStream = createWriteStream(output);
678
- const archive = archiver("tar", {
686
+ const archive = new TarArchive({
679
687
  gzip: false
680
688
  // Uncompressed
681
689
  });
@@ -684,14 +692,17 @@ async function createTarArchive(sources, output, options) {
684
692
  const writePromise = new Promise((resolve, reject) => {
685
693
  writeStream.on("close", () => resolve());
686
694
  writeStream.on("error", reject);
687
- });
688
- archive.on("error", (error) => {
689
- throw new FulpackOperationError(
690
- createFulpackError(
691
- ERROR_CODES.EXTRACTION_FAILED,
692
- `TAR creation failed: ${error.message}`,
693
- "create" /* CREATE */,
694
- { details: { original_error: error } }
695
+ archive.on(
696
+ "error",
697
+ (error) => reject(
698
+ new FulpackOperationError(
699
+ createFulpackError(
700
+ ERROR_CODES.EXTRACTION_FAILED,
701
+ `TAR creation failed: ${error.message}`,
702
+ "create" /* CREATE */,
703
+ { details: { original_error: error } }
704
+ )
705
+ )
695
706
  )
696
707
  );
697
708
  });
@@ -720,7 +731,8 @@ async function createTarArchive(sources, output, options) {
720
731
  totalSize += stats.size;
721
732
  }
722
733
  }
723
- await archive.finalize();
734
+ archive.finalize().catch(() => {
735
+ });
724
736
  await writePromise;
725
737
  const outputStats = statSync(output);
726
738
  return {