@fulmenhq/tsfulmen 0.2.10 → 0.3.0
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/CHANGELOG.md +26 -0
- package/README.md +1 -1
- package/dist/fulpack/index.js +43 -31
- package/dist/fulpack/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +44 -32
- package/dist/index.js.map +1 -1
- package/dist/reports/license-inventory.csv +16 -16
- package/package.json +6 -7
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import 'crypto';
|
|
|
16
16
|
import { Command } from 'commander';
|
|
17
17
|
import { existsSync, mkdirSync, statSync, createReadStream, createWriteStream, readdirSync, lstatSync } from 'fs';
|
|
18
18
|
import { createGunzip, createGzip } from 'zlib';
|
|
19
|
-
import
|
|
19
|
+
import { TarArchive, ZipArchive } from 'archiver';
|
|
20
20
|
|
|
21
21
|
var __defProp = Object.defineProperty;
|
|
22
22
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -7390,7 +7390,7 @@ async function scanGzipFile(archive, options) {
|
|
|
7390
7390
|
}
|
|
7391
7391
|
async function createTarGzArchive(sources, output, options) {
|
|
7392
7392
|
const writeStream = createWriteStream(output);
|
|
7393
|
-
const archive =
|
|
7393
|
+
const archive = new TarArchive({
|
|
7394
7394
|
gzip: true,
|
|
7395
7395
|
gzipOptions: {
|
|
7396
7396
|
level: options.compression_level
|
|
@@ -7401,14 +7401,17 @@ async function createTarGzArchive(sources, output, options) {
|
|
|
7401
7401
|
const writePromise = new Promise((resolve, reject) => {
|
|
7402
7402
|
writeStream.on("close", () => resolve());
|
|
7403
7403
|
writeStream.on("error", reject);
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7404
|
+
archive.on(
|
|
7405
|
+
"error",
|
|
7406
|
+
(error) => reject(
|
|
7407
|
+
new FulpackOperationError(
|
|
7408
|
+
createFulpackError(
|
|
7409
|
+
ERROR_CODES.EXTRACTION_FAILED,
|
|
7410
|
+
`TAR.GZ creation failed: ${error.message}`,
|
|
7411
|
+
"create" /* CREATE */,
|
|
7412
|
+
{ details: { original_error: error } }
|
|
7413
|
+
)
|
|
7414
|
+
)
|
|
7412
7415
|
)
|
|
7413
7416
|
);
|
|
7414
7417
|
});
|
|
@@ -7437,7 +7440,8 @@ async function createTarGzArchive(sources, output, options) {
|
|
|
7437
7440
|
totalSize += stats.size;
|
|
7438
7441
|
}
|
|
7439
7442
|
}
|
|
7440
|
-
|
|
7443
|
+
archive.finalize().catch(() => {
|
|
7444
|
+
});
|
|
7441
7445
|
await writePromise;
|
|
7442
7446
|
const outputStats = statSync(output);
|
|
7443
7447
|
return {
|
|
@@ -7454,7 +7458,7 @@ async function createTarGzArchive(sources, output, options) {
|
|
|
7454
7458
|
}
|
|
7455
7459
|
async function createZipArchive(sources, output, options) {
|
|
7456
7460
|
const writeStream = createWriteStream(output);
|
|
7457
|
-
const archive =
|
|
7461
|
+
const archive = new ZipArchive({
|
|
7458
7462
|
zlib: { level: options.compression_level }
|
|
7459
7463
|
});
|
|
7460
7464
|
let entryCount = 0;
|
|
@@ -7462,14 +7466,17 @@ async function createZipArchive(sources, output, options) {
|
|
|
7462
7466
|
const writePromise = new Promise((resolve, reject) => {
|
|
7463
7467
|
writeStream.on("close", () => resolve());
|
|
7464
7468
|
writeStream.on("error", reject);
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
7472
|
-
|
|
7469
|
+
archive.on(
|
|
7470
|
+
"error",
|
|
7471
|
+
(error) => reject(
|
|
7472
|
+
new FulpackOperationError(
|
|
7473
|
+
createFulpackError(
|
|
7474
|
+
ERROR_CODES.EXTRACTION_FAILED,
|
|
7475
|
+
`ZIP creation failed: ${error.message}`,
|
|
7476
|
+
"create" /* CREATE */,
|
|
7477
|
+
{ details: { original_error: error } }
|
|
7478
|
+
)
|
|
7479
|
+
)
|
|
7473
7480
|
)
|
|
7474
7481
|
);
|
|
7475
7482
|
});
|
|
@@ -7498,7 +7505,8 @@ async function createZipArchive(sources, output, options) {
|
|
|
7498
7505
|
totalSize += stats.size;
|
|
7499
7506
|
}
|
|
7500
7507
|
}
|
|
7501
|
-
|
|
7508
|
+
archive.finalize().catch(() => {
|
|
7509
|
+
});
|
|
7502
7510
|
await writePromise;
|
|
7503
7511
|
const outputStats = statSync(output);
|
|
7504
7512
|
return {
|
|
@@ -7543,7 +7551,7 @@ async function addDirectoryToTarGzArchive(archive, dirPath, archivePrefix, optio
|
|
|
7543
7551
|
}
|
|
7544
7552
|
async function createTarArchive(sources, output, options) {
|
|
7545
7553
|
const writeStream = createWriteStream(output);
|
|
7546
|
-
const archive =
|
|
7554
|
+
const archive = new TarArchive({
|
|
7547
7555
|
gzip: false
|
|
7548
7556
|
// Uncompressed
|
|
7549
7557
|
});
|
|
@@ -7552,14 +7560,17 @@ async function createTarArchive(sources, output, options) {
|
|
|
7552
7560
|
const writePromise = new Promise((resolve, reject) => {
|
|
7553
7561
|
writeStream.on("close", () => resolve());
|
|
7554
7562
|
writeStream.on("error", reject);
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
+
archive.on(
|
|
7564
|
+
"error",
|
|
7565
|
+
(error) => reject(
|
|
7566
|
+
new FulpackOperationError(
|
|
7567
|
+
createFulpackError(
|
|
7568
|
+
ERROR_CODES.EXTRACTION_FAILED,
|
|
7569
|
+
`TAR creation failed: ${error.message}`,
|
|
7570
|
+
"create" /* CREATE */,
|
|
7571
|
+
{ details: { original_error: error } }
|
|
7572
|
+
)
|
|
7573
|
+
)
|
|
7563
7574
|
)
|
|
7564
7575
|
);
|
|
7565
7576
|
});
|
|
@@ -7588,7 +7599,8 @@ async function createTarArchive(sources, output, options) {
|
|
|
7588
7599
|
totalSize += stats.size;
|
|
7589
7600
|
}
|
|
7590
7601
|
}
|
|
7591
|
-
|
|
7602
|
+
archive.finalize().catch(() => {
|
|
7603
|
+
});
|
|
7592
7604
|
await writePromise;
|
|
7593
7605
|
const outputStats = statSync(output);
|
|
7594
7606
|
return {
|
|
@@ -8369,7 +8381,7 @@ async function scanZip(archive, options) {
|
|
|
8369
8381
|
var FULPACK_VERSION = "1.0.0";
|
|
8370
8382
|
|
|
8371
8383
|
// src/index.ts
|
|
8372
|
-
var VERSION2 = "0.
|
|
8384
|
+
var VERSION2 = "0.3.0";
|
|
8373
8385
|
|
|
8374
8386
|
export { APP_IDENTITY_DIR, APP_IDENTITY_ENV_VAR, APP_IDENTITY_FILENAME, APP_IDENTITY_SCHEMA_ID, AppIdentityError, ArchiveFormat, DocScribeError, DocScribeParseError, DocScribeUnsupportedFormatError, ERROR_CODES, EntryType, FULPACK_VERSION, FulpackOperationError, MAX_ANCESTOR_SEARCH_DEPTH, Operation, VERSION2 as VERSION, __internal, buildEnvVar, buildRuntimeInfo, checkDecompressionBomb, clearEmbeddedIdentity, clearIdentityCache, create, createFulpackError, detectFormat2 as detectFormat, extract, extractHeaders, extractMetadata, getBinaryName, getCachedIdentity, getConfigIdentifiers, getConfigName, getEmbeddedIdentity, getEnvPrefix, getEnvVar, getTelemetryNamespace, getVendor, hasEmbeddedIdentity, hasPathTraversal, info, inspectDocument, isAbsolutePath, loadIdentity, normalizeInput, parseFrontmatter, registerEmbeddedIdentity, scan, splitDocuments, stripFrontmatter, validatePath, verify };
|
|
8375
8387
|
//# sourceMappingURL=index.js.map
|