@poe-platform/safe-bash 0.1.656 → 0.1.658
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/safe-bash/chunks/{chunk-43HWIHXB.js → chunk-Z4UKD5FF.js} +192 -61
- package/dist/safe-bash/chunks/chunk-Z4UKD5FF.js.map +7 -0
- package/dist/safe-bash/chunks/{xz-U4QDTPZL.js → xz-4V5FXSPG.js} +555 -514
- package/dist/safe-bash/chunks/xz-4V5FXSPG.js.map +7 -0
- package/dist/safe-bash/commands/archive/index.d.ts +1 -1
- package/dist/safe-bash/commands/archive/index.d.ts.map +1 -1
- package/dist/safe-bash/commands/archive/internal.d.ts +32 -0
- package/dist/safe-bash/commands/archive/internal.d.ts.map +1 -1
- package/dist/safe-bash/commands/archive/internal.js.map +1 -1
- package/dist/safe-bash/commands/archive/unzip/arguments.d.ts +3 -0
- package/dist/safe-bash/commands/archive/unzip/arguments.d.ts.map +1 -1
- package/dist/safe-bash/commands/archive/unzip/arguments.js +31 -5
- package/dist/safe-bash/commands/archive/unzip/arguments.js.map +1 -1
- package/dist/safe-bash/commands/archive/unzip/safety.d.ts +4 -0
- package/dist/safe-bash/commands/archive/unzip/safety.d.ts.map +1 -1
- package/dist/safe-bash/commands/archive/unzip/safety.js +3 -0
- package/dist/safe-bash/commands/archive/unzip/safety.js.map +1 -1
- package/dist/safe-bash/commands/archive/unzip.d.ts.map +1 -1
- package/dist/safe-bash/commands/archive/unzip.js +159 -112
- package/dist/safe-bash/commands/archive/unzip.js.map +1 -1
- package/dist/safe-bash/commands/archive/zip/aes-primitives-unavailable.d.ts +2 -0
- package/dist/safe-bash/commands/archive/zip/aes-primitives-unavailable.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/zip/aes-primitives-unavailable.js +3 -0
- package/dist/safe-bash/commands/archive/zip/aes-primitives-unavailable.js.map +1 -0
- package/dist/safe-bash/commands/archive/zip/aes-primitives.d.ts +2 -0
- package/dist/safe-bash/commands/archive/zip/aes-primitives.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/zip/aes-primitives.js +3 -0
- package/dist/safe-bash/commands/archive/zip/aes-primitives.js.map +1 -0
- package/dist/safe-bash/commands/archive/zip/aes.d.ts +18 -0
- package/dist/safe-bash/commands/archive/zip/aes.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/zip/aes.js +157 -0
- package/dist/safe-bash/commands/archive/zip/aes.js.map +1 -0
- package/dist/safe-bash/commands/archive/zip/crypto.d.ts +16 -0
- package/dist/safe-bash/commands/archive/zip/crypto.d.ts.map +1 -1
- package/dist/safe-bash/commands/archive/zip/crypto.js +85 -0
- package/dist/safe-bash/commands/archive/zip/crypto.js.map +1 -1
- package/dist/safe-bash/commands/archive/zip/grow.d.ts +4 -0
- package/dist/safe-bash/commands/archive/zip/grow.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/zip/grow.js +3 -0
- package/dist/safe-bash/commands/archive/zip/grow.js.map +1 -0
- package/dist/safe-bash/commands/archive/zip/help.d.ts +4 -2
- package/dist/safe-bash/commands/archive/zip/help.d.ts.map +1 -1
- package/dist/safe-bash/commands/archive/zip/help.js +98 -3
- package/dist/safe-bash/commands/archive/zip/help.js.map +1 -1
- package/dist/safe-bash/commands/archive/zip/line-endings.d.ts +1 -0
- package/dist/safe-bash/commands/archive/zip/line-endings.d.ts.map +1 -1
- package/dist/safe-bash/commands/archive/zip/line-endings.js +158 -0
- package/dist/safe-bash/commands/archive/zip/line-endings.js.map +1 -1
- package/dist/safe-bash/commands/archive/zip/log.d.ts +23 -0
- package/dist/safe-bash/commands/archive/zip/log.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/zip/log.js +159 -0
- package/dist/safe-bash/commands/archive/zip/log.js.map +1 -0
- package/dist/safe-bash/commands/archive/zip/lzma.d.ts +10 -0
- package/dist/safe-bash/commands/archive/zip/lzma.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/zip/lzma.js +41 -0
- package/dist/safe-bash/commands/archive/zip/lzma.js.map +1 -0
- package/dist/safe-bash/commands/archive/zip/names.d.ts +3 -0
- package/dist/safe-bash/commands/archive/zip/names.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/zip/names.js +34 -0
- package/dist/safe-bash/commands/archive/zip/names.js.map +1 -0
- package/dist/safe-bash/commands/archive/zip/options.d.ts +7 -0
- package/dist/safe-bash/commands/archive/zip/options.d.ts.map +1 -1
- package/dist/safe-bash/commands/archive/zip/options.js +88 -17
- package/dist/safe-bash/commands/archive/zip/options.js.map +1 -1
- package/dist/safe-bash/commands/archive/zip/repair.d.ts +11 -0
- package/dist/safe-bash/commands/archive/zip/repair.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/zip/repair.js +392 -0
- package/dist/safe-bash/commands/archive/zip/repair.js.map +1 -0
- package/dist/safe-bash/commands/archive/zip/safety.d.ts +23 -4
- package/dist/safe-bash/commands/archive/zip/safety.d.ts.map +1 -1
- package/dist/safe-bash/commands/archive/zip/safety.js +73 -23
- package/dist/safe-bash/commands/archive/zip/safety.js.map +1 -1
- package/dist/safe-bash/commands/archive/zip/sfx.d.ts +5 -0
- package/dist/safe-bash/commands/archive/zip/sfx.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/zip/sfx.js +56 -0
- package/dist/safe-bash/commands/archive/zip/sfx.js.map +1 -0
- package/dist/safe-bash/commands/archive/zip/test-command.d.ts +6 -0
- package/dist/safe-bash/commands/archive/zip/test-command.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/zip/test-command.js +101 -0
- package/dist/safe-bash/commands/archive/zip/test-command.js.map +1 -0
- package/dist/safe-bash/commands/archive/zip/volumes.d.ts +22 -0
- package/dist/safe-bash/commands/archive/zip/volumes.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/zip/volumes.js +265 -0
- package/dist/safe-bash/commands/archive/zip/volumes.js.map +1 -0
- package/dist/safe-bash/commands/archive/zip/zip64.d.ts +20 -1
- package/dist/safe-bash/commands/archive/zip/zip64.d.ts.map +1 -1
- package/dist/safe-bash/commands/archive/zip/zip64.js +127 -17
- package/dist/safe-bash/commands/archive/zip/zip64.js.map +1 -1
- package/dist/safe-bash/commands/archive/zip-format.d.ts +30 -5
- package/dist/safe-bash/commands/archive/zip-format.d.ts.map +1 -1
- package/dist/safe-bash/commands/archive/zip-format.js +489 -91
- package/dist/safe-bash/commands/archive/zip-format.js.map +1 -1
- package/dist/safe-bash/commands/archive/zip.d.ts.map +1 -1
- package/dist/safe-bash/commands/archive/zip.js +729 -128
- package/dist/safe-bash/commands/archive/zip.js.map +1 -1
- package/dist/safe-bash/commands/bytes/compression/bounded-codec.d.ts +7 -0
- package/dist/safe-bash/commands/bytes/compression/bounded-codec.d.ts.map +1 -1
- package/dist/safe-bash/commands/bytes/compression/bounded-codec.js.map +1 -1
- package/dist/safe-bash/commands/bytes/compression/codec-loader.d.ts.map +1 -1
- package/dist/safe-bash/commands/bytes/compression/codec-loader.js +8 -1
- package/dist/safe-bash/commands/bytes/compression/codec-loader.js.map +1 -1
- package/dist/safe-bash/commands/bytes/compression/native/generated/xz.mjs +1 -1
- package/dist/safe-bash/commands/bytes/compression/native/sources.json +2 -2
- package/dist/safe-bash/commands/bytes/compression/native/types.d.ts +1 -0
- package/dist/safe-bash/commands/bytes/compression/native/types.d.ts.map +1 -1
- package/dist/safe-bash/commands/python/cache.d.ts +11 -0
- package/dist/safe-bash/commands/python/cache.d.ts.map +1 -0
- package/dist/safe-bash/commands/python/cache.js +41 -0
- package/dist/safe-bash/commands/python/cache.js.map +1 -0
- package/dist/safe-bash/commands/python/index.browser.js +7 -1
- package/dist/safe-bash/commands/python/index.d.ts +6 -2
- package/dist/safe-bash/commands/python/index.d.ts.map +1 -1
- package/dist/safe-bash/commands/python/index.js +16 -10
- package/dist/safe-bash/commands/python/index.js.map +1 -1
- package/dist/safe-bash/commands/python/manifest.d.ts +23 -0
- package/dist/safe-bash/commands/python/manifest.d.ts.map +1 -0
- package/dist/safe-bash/commands/python/manifest.js +48 -0
- package/dist/safe-bash/commands/python/manifest.js.map +1 -0
- package/dist/safe-bash/commands/python/provisioning.d.ts +17 -13
- package/dist/safe-bash/commands/python/provisioning.d.ts.map +1 -1
- package/dist/safe-bash/commands/python/provisioning.js +88 -46
- package/dist/safe-bash/commands/python/provisioning.js.map +1 -1
- package/dist/safe-bash/commands/text.js +1 -1
- package/dist/safe-bash/commands/text.js.map +1 -1
- package/dist/safe-bash/core.browser.js +3113 -718
- package/dist/safe-bash/core.browser.js.map +4 -4
- package/package.json +11 -3
- package/dist/safe-bash/chunks/chunk-43HWIHXB.js.map +0 -7
- package/dist/safe-bash/chunks/xz-U4QDTPZL.js.map +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aes.js","sourceRoot":"","sources":["../../../../src/commands/archive/zip/aes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,YAAY,EAAmB,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAMtC,SAAS,aAAa;IACpB,2EAA2E;IAC3E,6EAA6E;IAC7E,MAAM,KAAK,GAAG,CAAC,gBAAgB,EAAE,YAAY,EAAE,YAAY,EAAE,iBAAiB,CAAU,CAAC;IACzF,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAU,CAAC,CAAC;IAC9E,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,UAAU,CAAC;QAAE,IAAI,CAAC,kDAAkD,CAAC,CAAC;IACvH,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAqC,CAAC;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C,CAAC;IAChF,CAAC;YAAS,CAAC;QAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAAC,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,GAAW,EAAE,MAAc;IAClD,aAAa,CAAC,GAAG,CAAC,CAAC;IACnB,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IACjC,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACxC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAChC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;IAC3B,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACrC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,QAAQ,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9C,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAChC,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
import { type ByteSource } from "../../../contracts/index.js";
|
|
2
|
+
import { type ZipHost } from "../internal.js";
|
|
3
|
+
import { PublicDiagnostic } from "../../../diagnostics.js";
|
|
4
|
+
import type { ZipAes } from "./aes.js";
|
|
5
|
+
/** Fixed capability diagnostics may be shown without credential-text filtering. */
|
|
6
|
+
export declare class ZipHostFailure extends PublicDiagnostic {
|
|
7
|
+
readonly code: "no-echo" | "entropy" | "entropy-failed" | "entropy-bytes" | "prompt-failed" | "prompt-eof" | "password-bytes" | "password-empty" | "password-confirm";
|
|
8
|
+
constructor(code: "no-echo" | "entropy" | "entropy-failed" | "entropy-bytes" | "prompt-failed" | "prompt-eof" | "password-bytes" | "password-empty" | "password-confirm");
|
|
9
|
+
}
|
|
10
|
+
export interface ZipEncryption {
|
|
11
|
+
readonly aes?: ZipAes;
|
|
12
|
+
readonly password: Uint8Array;
|
|
13
|
+
readonly entropy: NonNullable<ZipHost["entropy"]>;
|
|
14
|
+
}
|
|
15
|
+
export declare function encryptZipPayload(source: ByteSource, encryption: ZipEncryption, verifier: number, signal: AbortSignal): ByteSource;
|
|
16
|
+
export declare function decryptZipPayload(source: ByteSource, password: Uint8Array, verifier: number, signal: AbortSignal): ByteSource;
|
|
17
|
+
export declare function readZipPassword(host: ZipHost | undefined, maxBytes: number, signal: AbortSignal, confirm: boolean): Promise<Uint8Array>;
|
|
2
18
|
/** Traditional PKZIP byte transformation; callers own header/password checks. */
|
|
3
19
|
export declare function zipCrypto(source: ByteSource, password: Uint8Array, decode: boolean, signal: AbortSignal): AsyncGenerator<Uint8Array>;
|
|
4
20
|
//# sourceMappingURL=crypto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../../../src/commands/archive/zip/crypto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../../../src/commands/archive/zip/crypto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAGzE,OAAO,EAAQ,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,mFAAmF;AACnF,qBAAa,cAAe,SA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import { crcTable } from "./crc.js";
|
|
4
|
+
import { fail } from "../internal.js";
|
|
5
|
+
import { PublicDiagnostic } from "../../../diagnostics.js";
|
|
6
|
+
/** Fixed capability diagnostics may be shown without credential-text filtering. */
|
|
7
|
+
export class ZipHostFailure extends PublicDiagnostic {
|
|
8
|
+
code;
|
|
9
|
+
constructor(code) {
|
|
10
|
+
super({
|
|
11
|
+
"no-echo": "ZIP no-echo password capability is unavailable",
|
|
12
|
+
entropy: "ZIP entropy capability is unavailable",
|
|
13
|
+
"entropy-failed": "ZIP entropy capability failed",
|
|
14
|
+
"entropy-bytes": "ZIP entropy capability must return 11 bytes",
|
|
15
|
+
"prompt-failed": "ZIP password capability failed",
|
|
16
|
+
"prompt-eof": "ZIP EOF while reading password",
|
|
17
|
+
"password-bytes": "ZIP invalid password bytes",
|
|
18
|
+
"password-empty": "zero length password not allowed",
|
|
19
|
+
"password-confirm": "password verification failed",
|
|
20
|
+
}[code]);
|
|
21
|
+
this.code = code;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export async function* encryptZipPayload(source, encryption, verifier, signal) {
|
|
25
|
+
signal.throwIfAborted();
|
|
26
|
+
const password = new Uint8Array(encryption.password);
|
|
27
|
+
let random;
|
|
28
|
+
try {
|
|
29
|
+
random = await encryption.entropy(11, signal);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
signal.throwIfAborted();
|
|
33
|
+
throw new ZipHostFailure(error instanceof ZipHostFailure && error.code === "entropy" ? "entropy" : "entropy-failed");
|
|
34
|
+
}
|
|
35
|
+
signal.throwIfAborted();
|
|
36
|
+
if (!(random instanceof Uint8Array) || random.length !== 11)
|
|
37
|
+
throw new ZipHostFailure("entropy-bytes");
|
|
38
|
+
const header = new Uint8Array(12);
|
|
39
|
+
header.set(random);
|
|
40
|
+
header[11] = verifier;
|
|
41
|
+
yield* zipCrypto((async function* () { yield header; yield* readBytes(source, signal); })(), password, false, signal);
|
|
42
|
+
}
|
|
43
|
+
export async function* decryptZipPayload(source, password, verifier, signal) {
|
|
44
|
+
let header = 0;
|
|
45
|
+
for await (const chunk of zipCrypto(source, new Uint8Array(password), true, signal)) {
|
|
46
|
+
let offset = 0;
|
|
47
|
+
while (header < 12 && offset < chunk.length) {
|
|
48
|
+
if (header === 11 && chunk[offset] !== verifier)
|
|
49
|
+
fail("ZIP incorrect password");
|
|
50
|
+
header++;
|
|
51
|
+
offset++;
|
|
52
|
+
}
|
|
53
|
+
if (offset < chunk.length)
|
|
54
|
+
yield chunk.subarray(offset);
|
|
55
|
+
}
|
|
56
|
+
if (header !== 12)
|
|
57
|
+
fail("ZIP truncated encryption header");
|
|
58
|
+
}
|
|
59
|
+
export async function readZipPassword(host, maxBytes, signal, confirm) {
|
|
60
|
+
if (!host?.password)
|
|
61
|
+
throw new ZipHostFailure("no-echo");
|
|
62
|
+
const read = async (prompt) => {
|
|
63
|
+
signal.throwIfAborted();
|
|
64
|
+
let bytes;
|
|
65
|
+
try {
|
|
66
|
+
bytes = await host.password({ prompt, maxBytes, signal });
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
signal.throwIfAborted();
|
|
70
|
+
throw new ZipHostFailure("prompt-failed");
|
|
71
|
+
}
|
|
72
|
+
signal.throwIfAborted();
|
|
73
|
+
if (!bytes)
|
|
74
|
+
throw new ZipHostFailure("prompt-eof");
|
|
75
|
+
if (!(bytes instanceof Uint8Array) || bytes.length > maxBytes || bytes.includes(0))
|
|
76
|
+
throw new ZipHostFailure("password-bytes");
|
|
77
|
+
return new Uint8Array(bytes);
|
|
78
|
+
};
|
|
79
|
+
const password = await read("Enter password: ");
|
|
80
|
+
if (confirm) {
|
|
81
|
+
if (!password.length)
|
|
82
|
+
throw new ZipHostFailure("password-empty");
|
|
83
|
+
const repeated = await read("Verify password: ");
|
|
84
|
+
if (password.length !== repeated.length || password.some((byte, index) => byte !== repeated[index]))
|
|
85
|
+
throw new ZipHostFailure("password-confirm");
|
|
86
|
+
}
|
|
87
|
+
return password;
|
|
88
|
+
}
|
|
4
89
|
/** Traditional PKZIP byte transformation; callers own header/password checks. */
|
|
5
90
|
export async function* zipCrypto(source, password, decode, signal) {
|
|
6
91
|
signal.throwIfAborted();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crypto.js","sourceRoot":"","sources":["../../../../src/commands/archive/zip/crypto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"crypto.js","sourceRoot":"","sources":["../../../../src/commands/archive/zip/crypto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,IAAI,EAAgB,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAG3D,mFAAmF;AACnF,MAAM,OAAO,cAAe,SAAQ,gBAAgB;IAC7B;IAArB,YAAqB,IAA4J;QAC/K,KAAK,CAAC;YACJ,SAAS,EAAE,gDAAgD;YAC3D,OAAO,EAAE,uCAAuC;YAChD,gBAAgB,EAAE,+BAA+B;YACjD,eAAe,EAAE,6CAA6C;YAC9D,eAAe,EAAE,gCAAgC;YACjD,YAAY,EAAE,gCAAgC;YAC9C,gBAAgB,EAAE,4BAA4B;YAC9C,gBAAgB,EAAE,kCAAkC;YACpD,kBAAkB,EAAE,8BAA8B;SACnD,CAAC,IAAI,CAAC,CAAC,CAAC;QAXU,SAAI,GAAJ,IAAI,CAAwJ;IAYjL,CAAC;CACF;AAQD,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,iBAAiB,CAA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S,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;gBAC9E,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;gBACrC,MAAM,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC;YAC9B,CAAC;YACD,MAAM,MAAM,CAAC;YACb,MAAM,SAAS,CAAC,MAAM,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grow.d.ts","sourceRoot":"","sources":["../../../../src/commands/archive/zip/grow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,6EAA6E;AAC7E,eAAO,MAAM,cAAc,gDAAsC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grow.js","sourceRoot":"","sources":["../../../../src/commands/archive/zip/grow.ts"],"names":[],"mappings":"AAEA,6EAA6E;AAC7E,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,OAAO,EAAwB,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export declare const zipHelp = "safe-bash zip\nUsage: zip [options] archive [file ...]\n zip [options] - [file ...] write an archive to stdout\n zip [options] archive - read a member from stdin\n\n -r recurse into directories\n -j store basenames, discarding directory paths\n -q suppress progress messages\n -0 store without compression\n -1 .. -9 select compression effort\n -Z METHOD select store, deflate, or
|
|
2
|
-
export declare const zipExtendedHelp = "safe-bash zip\nUsage: zip [options] archive [file ...]\n zip [options] - [file ...] write an archive to stdout\n zip [options] archive - read a member from stdin\n\n -r recurse into directories\n -j store basenames, discarding directory paths\n -q suppress progress messages\n -0 store without compression\n -1 .. -9 select compression effort\n -Z METHOD select store, deflate, or
|
|
1
|
+
export declare const zipHelp = "safe-bash zip\nUsage: zip [options] archive [file ...]\n zip [options] - [file ...] write an archive to stdout\n zip [options] archive - read a member from stdin\n\n -r recurse into directories\n -j store basenames, discarding directory paths\n -q suppress progress messages\n -0 store without compression\n -1 .. -9 select compression effort\n -Z METHOD select store, deflate, bzip2, or lzma compression\n --encryption PROFILE select zipcrypto or aes-{128,192,256}-ae{1,2}\n -n SUFFIXES store matching suffixes (colon-separated)\n -u / -f update / freshen existing members\n -d / -U delete / copy selected archive members\n -FS synchronize selected members with filesystem sources\n -O FILE write to a separate output archive\n -A adjust validated SFX offsets, retaining the inert prefix\n -F / -FF repair from central / local records (requires -O FILE)\n -s SIZE split into .z01/.z02/.../.zip volumes (minimum 64k; 0 recombines)\n -sp approve volume transitions using an explicit host prompt\n -sv / -sb report split volumes / ring before a split-pause prompt\n -m remove archived sources after successful publication\n -D / -y omit directory entries / store symlinks\n -i / -x include / exclude matching names\n -RE enable bracket-list glob matching (already enabled on Unix)\n -k convert new source names to portable ASCII DOS 8.3 names\n -FI / -FI- enable / disable explicit VFS FIFO byte sources\n -@ read filenames from stdin\n -t / -tt select files from / before a date\n -T test archive integrity before replacement\n -P PASSWORD encrypt new members with a supplied password\n -e request and confirm a password through a no-echo host capability\n -z / -c read archive / entry comments from stdin\n -o set archive time to the latest member time\n -l convert text LF line endings to CRLF\n -ll convert text CRLF line endings to LF (--from-crlf)\n -X strip optional metadata\n -fz / -fz- force / disable ZIP64 output\n -fd force data descriptors\n -v verbose operation (a lone -v shows implementation information)\n --version show implementation information and exit\n -L show this implementation's license\n -sf / -sf- list selected files / totals only, without creating an archive\n -sc show processed arguments and exit with status 9\n -so show implemented options and exit\n -sd show virtual archive processing steps\n -db / -dc display byte / entry counters\n -du / -dv display entry size / single-volume numbers\n -dd / -dg display dots per entry / globally for output bytes\n -ds SIZE dot interval (kmgt units; default MB; 0 disables dots)\n -h show this help\n\nUse -- after the archive name to pass filenames beginning with '-'.\nLong option equivalents are accepted, for example --junk-paths and\n--compression-method=bzip2. All filesystem operations use the virtual filesystem.\n";
|
|
2
|
+
export declare const zipExtendedHelp = "safe-bash zip\nUsage: zip [options] archive [file ...]\n zip [options] - [file ...] write an archive to stdout\n zip [options] archive - read a member from stdin\n\n -r recurse into directories\n -j store basenames, discarding directory paths\n -q suppress progress messages\n -0 store without compression\n -1 .. -9 select compression effort\n -Z METHOD select store, deflate, bzip2, or lzma compression\n --encryption PROFILE select zipcrypto or aes-{128,192,256}-ae{1,2}\n -n SUFFIXES store matching suffixes (colon-separated)\n -u / -f update / freshen existing members\n -d / -U delete / copy selected archive members\n -FS synchronize selected members with filesystem sources\n -O FILE write to a separate output archive\n -A adjust validated SFX offsets, retaining the inert prefix\n -F / -FF repair from central / local records (requires -O FILE)\n -s SIZE split into .z01/.z02/.../.zip volumes (minimum 64k; 0 recombines)\n -sp approve volume transitions using an explicit host prompt\n -sv / -sb report split volumes / ring before a split-pause prompt\n -m remove archived sources after successful publication\n -D / -y omit directory entries / store symlinks\n -i / -x include / exclude matching names\n -RE enable bracket-list glob matching (already enabled on Unix)\n -k convert new source names to portable ASCII DOS 8.3 names\n -FI / -FI- enable / disable explicit VFS FIFO byte sources\n -@ read filenames from stdin\n -t / -tt select files from / before a date\n -T test archive integrity before replacement\n -P PASSWORD encrypt new members with a supplied password\n -e request and confirm a password through a no-echo host capability\n -z / -c read archive / entry comments from stdin\n -o set archive time to the latest member time\n -l convert text LF line endings to CRLF\n -ll convert text CRLF line endings to LF (--from-crlf)\n -X strip optional metadata\n -fz / -fz- force / disable ZIP64 output\n -fd force data descriptors\n -v verbose operation (a lone -v shows implementation information)\n --version show implementation information and exit\n -L show this implementation's license\n -sf / -sf- list selected files / totals only, without creating an archive\n -sc show processed arguments and exit with status 9\n -so show implemented options and exit\n -sd show virtual archive processing steps\n -db / -dc display byte / entry counters\n -du / -dv display entry size / single-volume numbers\n -dd / -dg display dots per entry / globally for output bytes\n -ds SIZE dot interval (kmgt units; default MB; 0 disables dots)\n -h show this help\n\nUse -- after the archive name to pass filenames beginning with '-'.\nLong option equivalents are accepted, for example --junk-paths and\n--compression-method=bzip2. All filesystem operations use the virtual filesystem.\n\nSelection\n -RE / --regex means bracket lists, not general regular expressions.\n -k / --DOS-names converts components after selection and -j; collisions fail.\n DOS conversion is restricted to printable ASCII. Filters parsed after -k\n are DOS-converted before matching original case-sensitive source names.\n -FI / --fifo requires a VFS-reported FIFO and explicit streamingRead capability.\n FIFO payloads are bounded and cancellation-aware; producer failure aborts output.\n -r traverses listed directories; -R recursively searches matching names.\n Do not combine -r and -R. -D omits directory records without stopping traversal.\n -i patterns and -x patterns accept lists ending at another option or at @.\n Quote patterns to prevent the shell expanding them before zip receives them.\n Exclusions take precedence over inclusions. -j flattens selected source names;\n duplicate basenames fail before the archive is replaced.\n -nw disables wildcard interpretation; -ws prevents wildcards crossing '/'.\n -MM makes missing input matches fatal. -t includes files from a date; -tt\n selects files before a date. Dates accept mmddyyyy or yyyy-mm-dd.\n -y stores the symbolic link itself; otherwise its target is read.\n -p accepts the native paths compatibility flag and does not undo -j.\n\nArchive operations\n The default action adds new members and replaces selected existing members.\n -u updates changed/new sources; -f freshens existing members only.\n -d deletes matching archive members; -U copies matching archive members.\n -FS synchronizes selected existing members, including missing sources.\n -O output.zip preserves the input archive and publishes a separate output.\n -m removes sources only after successful publication or stdout completion.\n Removal needs atomic filesystem support; excluded/nonempty directories remain.\n -DF writes size/time differences and new members to required separate -O output.\n -g grows by retaining validated local records when only adding members;\n replacements/deletions rebuild. Publication always uses owned atomic staging.\n -b directory selects the VFS staging directory, also spooling stdout archives.\n Cross-provider publication must be supported by the filesystem; no host copy.\n -J removes a prefix only after validating the complete embedded ZIP and CRCs.\n -T checks integrity with registered virtual unzip before replacement.\n -TT \"command args {}\" selects a registered virtual test command; {} is the\n staged path, or the path is appended. Quotes/escapes form literal arguments;\n shell operators and substitutions are refused. No host process is spawned.\n With stdout output -T is ignored.\n -z reads an archive comment; -c reads selected member comments in archive order.\n -X strips optional metadata; -X- preserves available metadata.\n -o sets the archive timestamp to the newest resulting member timestamp.\n\nLogging\n -lf path writes a VFS log (a missing extension becomes .log).\n -la appends; -li includes progress in addition to warnings/errors.\n Logs require atomic conditional byte writes and cannot alias selected inputs.\n Logs are bounded by maxTextBytes; supplied password bytes are redacted.\n Completed log/publication effects remain if a later write fails.\n\nCompression and format\n -Z selects store, deflate, bzip2, or lzma; method names accept unique prefixes.\n -1 through -9 select effort. Store selection remains through later levels.\n -n .jpg:.png stores matching suffixes; -9 overrides suffix-based storage.\n Compression may fall back to STORE for regular files when it expands data.\n -l converts text LF to CRLF, leaving detected binary input unchanged.\n -fz forces ZIP64; -fz- disables it. -fd forces signed data descriptors.\n BZIP2 members use extraction version 4.6, including with ZIP64 records.\n LZMA is a ZIP format extension (not native Info-ZIP Zip 3.0).\n LZMA uses version 6.3, a bounded 1 MiB encoder dictionary, and EOS.\n Readers admit dictionaries up to 8 MiB and SDK 9.4 properties only.\n\nStreaming\n A '-' input filename reads one member from stdin, named '-'.\n A '-' archive name writes binary archive bytes to stdout and progress to stderr.\n With no archive or file operands, zip acts as a stdin-to-stdout filter.\n Streamed members retain compression even if it expands their data.\n -@ instead reads newline-separated input filenames; it cannot also read a '-'\n payload from the same stdin. Empty filename lines are ignored.\n Complete the output stream before using the resulting archive.\n\nArguments and ZIPOPT\n Long options accept unique abbreviations and --option=value where appropriate.\n Use -- after the archive name for literal filenames beginning with '-'.\n ZIPOPT supplies default arguments before the command arguments. Double quotes\n group words inside ZIPOPT; shell expansion is not performed on these defaults.\n -h and -h2 print basic and extended help as soon as they are encountered.\n --version and -L also exit immediately. Only a lone short -v shows information;\n --verbose and grouped -v perform an archive operation. Later -q or -v wins.\n -sc and -so validate all arguments before exiting; -sc returns status 9.\n\nDisplays\n -sf lists selected names and totals without reading source payloads or writing\n archives. -sf- and -q suppress names; totals remain visible. With no file\n operands, -sf lists the input archive. -sd reports only virtual processing steps.\n Command and diagnostic displays redact credential-shaped arguments and URLs.\n Display counters accept a trailing '-' to negate them. -ds accepts up to eight\n characters: digits with an optional k, m, g or t suffix (case-insensitive).\n Values below 1024 imply MB; nonzero intervals from 1 KB to below 32 KB fail.\n Empty -ds values restore 10 MB; 0 disables dots. Sizes must be safe integers.\n Dots use byte intervals, so counts can differ from native codec buffer dots.\n Per-entry progress appears after bounded preparation; global output dots stay\n visible with -q. Timed scanning dots and split-volume displays are unavailable.\n";
|
|
3
|
+
export declare const zipVersion = "safe-bash zip (virtual-bash)\nBounded virtual ZIP implementation; not an Info-ZIP native build.\nCompression: store, deflate, bzip2, lzma (format extension). Single-volume ZIP and ZIP64 output.\nFilesystem, signals and byte limits are supplied by the host.\nNative compiler identity and ambient environment are not reported.\n";
|
|
4
|
+
export declare const zipLicense = "safe-bash zip (virtual-bash)\nMIT License\nCopyright (c) 2026 Poe Platform\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nThis is the virtual implementation license, not the native Info-ZIP license.\n";
|
|
3
5
|
//# sourceMappingURL=help.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../../src/commands/archive/zip/help.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../../src/commands/archive/zip/help.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,mkGAwDnB,CAAC;AAEF,eAAO,MAAM,eAAe,ukSA6F3B,CAAC;AAEF,eAAO,MAAM,UAAU,2UAKtB,CAAC;AAEF,eAAO,MAAM,UAAU,urCAuBtB,CAAC"}
|
|
@@ -8,24 +8,47 @@ Usage: zip [options] archive [file ...]
|
|
|
8
8
|
-q suppress progress messages
|
|
9
9
|
-0 store without compression
|
|
10
10
|
-1 .. -9 select compression effort
|
|
11
|
-
-Z METHOD select store, deflate, or
|
|
11
|
+
-Z METHOD select store, deflate, bzip2, or lzma compression
|
|
12
|
+
--encryption PROFILE select zipcrypto or aes-{128,192,256}-ae{1,2}
|
|
12
13
|
-n SUFFIXES store matching suffixes (colon-separated)
|
|
13
14
|
-u / -f update / freshen existing members
|
|
14
15
|
-d / -U delete / copy selected archive members
|
|
15
16
|
-FS synchronize selected members with filesystem sources
|
|
16
17
|
-O FILE write to a separate output archive
|
|
18
|
+
-A adjust validated SFX offsets, retaining the inert prefix
|
|
19
|
+
-F / -FF repair from central / local records (requires -O FILE)
|
|
20
|
+
-s SIZE split into .z01/.z02/.../.zip volumes (minimum 64k; 0 recombines)
|
|
21
|
+
-sp approve volume transitions using an explicit host prompt
|
|
22
|
+
-sv / -sb report split volumes / ring before a split-pause prompt
|
|
17
23
|
-m remove archived sources after successful publication
|
|
18
24
|
-D / -y omit directory entries / store symlinks
|
|
19
25
|
-i / -x include / exclude matching names
|
|
26
|
+
-RE enable bracket-list glob matching (already enabled on Unix)
|
|
27
|
+
-k convert new source names to portable ASCII DOS 8.3 names
|
|
28
|
+
-FI / -FI- enable / disable explicit VFS FIFO byte sources
|
|
20
29
|
-@ read filenames from stdin
|
|
21
30
|
-t / -tt select files from / before a date
|
|
22
31
|
-T test archive integrity before replacement
|
|
32
|
+
-P PASSWORD encrypt new members with a supplied password
|
|
33
|
+
-e request and confirm a password through a no-echo host capability
|
|
23
34
|
-z / -c read archive / entry comments from stdin
|
|
24
35
|
-o set archive time to the latest member time
|
|
25
36
|
-l convert text LF line endings to CRLF
|
|
37
|
+
-ll convert text CRLF line endings to LF (--from-crlf)
|
|
26
38
|
-X strip optional metadata
|
|
27
39
|
-fz / -fz- force / disable ZIP64 output
|
|
28
40
|
-fd force data descriptors
|
|
41
|
+
-v verbose operation (a lone -v shows implementation information)
|
|
42
|
+
--version show implementation information and exit
|
|
43
|
+
-L show this implementation's license
|
|
44
|
+
-sf / -sf- list selected files / totals only, without creating an archive
|
|
45
|
+
-sc show processed arguments and exit with status 9
|
|
46
|
+
-so show implemented options and exit
|
|
47
|
+
-sd show virtual archive processing steps
|
|
48
|
+
-db / -dc display byte / entry counters
|
|
49
|
+
-du / -dv display entry size / single-volume numbers
|
|
50
|
+
-dd / -dg display dots per entry / globally for output bytes
|
|
51
|
+
-ds SIZE dot interval (kmgt units; default MB; 0 disables dots)
|
|
29
52
|
-h show this help
|
|
30
53
|
|
|
31
54
|
Use -- after the archive name to pass filenames beginning with '-'.
|
|
@@ -34,6 +57,12 @@ Long option equivalents are accepted, for example --junk-paths and
|
|
|
34
57
|
`;
|
|
35
58
|
export const zipExtendedHelp = `${zipHelp}
|
|
36
59
|
Selection
|
|
60
|
+
-RE / --regex means bracket lists, not general regular expressions.
|
|
61
|
+
-k / --DOS-names converts components after selection and -j; collisions fail.
|
|
62
|
+
DOS conversion is restricted to printable ASCII. Filters parsed after -k
|
|
63
|
+
are DOS-converted before matching original case-sensitive source names.
|
|
64
|
+
-FI / --fifo requires a VFS-reported FIFO and explicit streamingRead capability.
|
|
65
|
+
FIFO payloads are bounded and cancellation-aware; producer failure aborts output.
|
|
37
66
|
-r traverses listed directories; -R recursively searches matching names.
|
|
38
67
|
Do not combine -r and -R. -D omits directory records without stopping traversal.
|
|
39
68
|
-i patterns and -x patterns accept lists ending at another option or at @.
|
|
@@ -54,19 +83,39 @@ Archive operations
|
|
|
54
83
|
-O output.zip preserves the input archive and publishes a separate output.
|
|
55
84
|
-m removes sources only after successful publication or stdout completion.
|
|
56
85
|
Removal needs atomic filesystem support; excluded/nonempty directories remain.
|
|
57
|
-
-
|
|
86
|
+
-DF writes size/time differences and new members to required separate -O output.
|
|
87
|
+
-g grows by retaining validated local records when only adding members;
|
|
88
|
+
replacements/deletions rebuild. Publication always uses owned atomic staging.
|
|
89
|
+
-b directory selects the VFS staging directory, also spooling stdout archives.
|
|
90
|
+
Cross-provider publication must be supported by the filesystem; no host copy.
|
|
91
|
+
-J removes a prefix only after validating the complete embedded ZIP and CRCs.
|
|
92
|
+
-T checks integrity with registered virtual unzip before replacement.
|
|
93
|
+
-TT "command args {}" selects a registered virtual test command; {} is the
|
|
94
|
+
staged path, or the path is appended. Quotes/escapes form literal arguments;
|
|
95
|
+
shell operators and substitutions are refused. No host process is spawned.
|
|
96
|
+
With stdout output -T is ignored.
|
|
58
97
|
-z reads an archive comment; -c reads selected member comments in archive order.
|
|
59
98
|
-X strips optional metadata; -X- preserves available metadata.
|
|
60
99
|
-o sets the archive timestamp to the newest resulting member timestamp.
|
|
61
100
|
|
|
101
|
+
Logging
|
|
102
|
+
-lf path writes a VFS log (a missing extension becomes .log).
|
|
103
|
+
-la appends; -li includes progress in addition to warnings/errors.
|
|
104
|
+
Logs require atomic conditional byte writes and cannot alias selected inputs.
|
|
105
|
+
Logs are bounded by maxTextBytes; supplied password bytes are redacted.
|
|
106
|
+
Completed log/publication effects remain if a later write fails.
|
|
107
|
+
|
|
62
108
|
Compression and format
|
|
63
|
-
-Z selects store, deflate, or
|
|
109
|
+
-Z selects store, deflate, bzip2, or lzma; method names accept unique prefixes.
|
|
64
110
|
-1 through -9 select effort. Store selection remains through later levels.
|
|
65
111
|
-n .jpg:.png stores matching suffixes; -9 overrides suffix-based storage.
|
|
66
112
|
Compression may fall back to STORE for regular files when it expands data.
|
|
67
113
|
-l converts text LF to CRLF, leaving detected binary input unchanged.
|
|
68
114
|
-fz forces ZIP64; -fz- disables it. -fd forces signed data descriptors.
|
|
69
115
|
BZIP2 members use extraction version 4.6, including with ZIP64 records.
|
|
116
|
+
LZMA is a ZIP format extension (not native Info-ZIP Zip 3.0).
|
|
117
|
+
LZMA uses version 6.3, a bounded 1 MiB encoder dictionary, and EOS.
|
|
118
|
+
Readers admit dictionaries up to 8 MiB and SDK 9.4 properties only.
|
|
70
119
|
|
|
71
120
|
Streaming
|
|
72
121
|
A '-' input filename reads one member from stdin, named '-'.
|
|
@@ -83,5 +132,51 @@ Arguments and ZIPOPT
|
|
|
83
132
|
ZIPOPT supplies default arguments before the command arguments. Double quotes
|
|
84
133
|
group words inside ZIPOPT; shell expansion is not performed on these defaults.
|
|
85
134
|
-h and -h2 print basic and extended help as soon as they are encountered.
|
|
135
|
+
--version and -L also exit immediately. Only a lone short -v shows information;
|
|
136
|
+
--verbose and grouped -v perform an archive operation. Later -q or -v wins.
|
|
137
|
+
-sc and -so validate all arguments before exiting; -sc returns status 9.
|
|
138
|
+
|
|
139
|
+
Displays
|
|
140
|
+
-sf lists selected names and totals without reading source payloads or writing
|
|
141
|
+
archives. -sf- and -q suppress names; totals remain visible. With no file
|
|
142
|
+
operands, -sf lists the input archive. -sd reports only virtual processing steps.
|
|
143
|
+
Command and diagnostic displays redact credential-shaped arguments and URLs.
|
|
144
|
+
Display counters accept a trailing '-' to negate them. -ds accepts up to eight
|
|
145
|
+
characters: digits with an optional k, m, g or t suffix (case-insensitive).
|
|
146
|
+
Values below 1024 imply MB; nonzero intervals from 1 KB to below 32 KB fail.
|
|
147
|
+
Empty -ds values restore 10 MB; 0 disables dots. Sizes must be safe integers.
|
|
148
|
+
Dots use byte intervals, so counts can differ from native codec buffer dots.
|
|
149
|
+
Per-entry progress appears after bounded preparation; global output dots stay
|
|
150
|
+
visible with -q. Timed scanning dots and split-volume displays are unavailable.
|
|
151
|
+
`;
|
|
152
|
+
export const zipVersion = `safe-bash zip (virtual-bash)
|
|
153
|
+
Bounded virtual ZIP implementation; not an Info-ZIP native build.
|
|
154
|
+
Compression: store, deflate, bzip2, lzma (format extension). Single-volume ZIP and ZIP64 output.
|
|
155
|
+
Filesystem, signals and byte limits are supplied by the host.
|
|
156
|
+
Native compiler identity and ambient environment are not reported.
|
|
157
|
+
`;
|
|
158
|
+
export const zipLicense = `safe-bash zip (virtual-bash)
|
|
159
|
+
MIT License
|
|
160
|
+
Copyright (c) 2026 Poe Platform
|
|
161
|
+
|
|
162
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
163
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
164
|
+
in the Software without restriction, including without limitation the rights
|
|
165
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
166
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
167
|
+
furnished to do so, subject to the following conditions:
|
|
168
|
+
|
|
169
|
+
The above copyright notice and this permission notice shall be included in all
|
|
170
|
+
copies or substantial portions of the Software.
|
|
171
|
+
|
|
172
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
173
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
174
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
175
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
176
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
177
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
178
|
+
SOFTWARE.
|
|
179
|
+
|
|
180
|
+
This is the virtual implementation license, not the native Info-ZIP license.
|
|
86
181
|
`;
|
|
87
182
|
//# sourceMappingURL=help.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../../../src/commands/archive/zip/help.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../../../src/commands/archive/zip/help.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDtB,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6FxC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;CAKzB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuBzB,CAAC"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
export declare function zipFromCrlf(bytes: Uint8Array, store: boolean, signal: AbortSignal, level?: number): Promise<Uint8Array>;
|
|
1
2
|
export declare function zipToCrlf(bytes: Uint8Array, store: boolean, maxBytes: number, signal: AbortSignal): Promise<Uint8Array>;
|
|
2
3
|
//# sourceMappingURL=line-endings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line-endings.d.ts","sourceRoot":"","sources":["../../../../src/commands/archive/zip/line-endings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"line-endings.d.ts","sourceRoot":"","sources":["../../../../src/commands/archive/zip/line-endings.ts"],"names":[],"mappings":"AAKA,wBAAsB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,SAAI,GAAG,OAAO,CAAC,UAAU,CAAC,CAuCxH;AA8FD,wBAAsB,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAwB7H"}
|
|
@@ -1,5 +1,163 @@
|
|
|
1
1
|
import { fail } from "../internal.js";
|
|
2
2
|
import { yieldTurn } from "../../../contracts/yield.js";
|
|
3
|
+
// Info-ZIP's file_read reserves a sentinel byte in each -ll read. STORE
|
|
4
|
+
// uses SBSZ; the Unix internal DEFLATE compressor initially requests 2*WSIZE.
|
|
5
|
+
export async function zipFromCrlf(bytes, store, signal, level = 6) {
|
|
6
|
+
signal.throwIfAborted();
|
|
7
|
+
const window = store ? 16383 : 65535;
|
|
8
|
+
let text = false;
|
|
9
|
+
for (let index = 0; index < Math.min(bytes.length, window); index++) {
|
|
10
|
+
if (index % 32768 === 0)
|
|
11
|
+
await yieldTurn(signal);
|
|
12
|
+
const byte = bytes[index];
|
|
13
|
+
if (byte <= 6 || byte >= 14 && byte <= 25 || byte >= 28 && byte <= 31)
|
|
14
|
+
return bytes;
|
|
15
|
+
if (byte >= 32)
|
|
16
|
+
text = true;
|
|
17
|
+
}
|
|
18
|
+
if (!text)
|
|
19
|
+
return bytes;
|
|
20
|
+
const output = new Uint8Array(bytes.length);
|
|
21
|
+
let length = 0;
|
|
22
|
+
let cursor = 0;
|
|
23
|
+
// A native read reserves one byte for an LF sentinel. If conversion empties
|
|
24
|
+
// the read, file_read consumes one more source byte (or retains CR at EOF).
|
|
25
|
+
const read = (size) => {
|
|
26
|
+
const start = cursor;
|
|
27
|
+
const end = Math.min(bytes.length, start + size - 1);
|
|
28
|
+
if (start === end)
|
|
29
|
+
return 0;
|
|
30
|
+
cursor = end;
|
|
31
|
+
const previous = length;
|
|
32
|
+
for (let index = start; index < end; index++) {
|
|
33
|
+
const byte = bytes[index];
|
|
34
|
+
if (byte !== 13 || index + 1 < end && bytes[index + 1] !== 10)
|
|
35
|
+
output[length++] = byte;
|
|
36
|
+
}
|
|
37
|
+
if (length === previous)
|
|
38
|
+
output[length++] = cursor < bytes.length ? bytes[cursor++] : bytes[end - 1];
|
|
39
|
+
else if (output[length - 1] === 26)
|
|
40
|
+
length--;
|
|
41
|
+
return length - previous;
|
|
42
|
+
};
|
|
43
|
+
if (store || bytes.length <= window) {
|
|
44
|
+
while (cursor < bytes.length) {
|
|
45
|
+
await yieldTurn(signal);
|
|
46
|
+
if (read(window + 1) === 0)
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
await zipDeflateReads(output, read, () => length, level, signal);
|
|
52
|
+
}
|
|
53
|
+
return output.slice(0, length);
|
|
54
|
+
}
|
|
55
|
+
// Only the Unix Info-ZIP internal compressor's input schedule is modeled here;
|
|
56
|
+
// the existing codec still encodes the resulting bytes. Refill capacity depends
|
|
57
|
+
// on converted bytes, sliding, and fast/lazy match advancement, not I/O chunks.
|
|
58
|
+
async function zipDeflateReads(output, read, length, level, signal) {
|
|
59
|
+
const profiles = [
|
|
60
|
+
[0, 0, 0, 0], [4, 4, 8, 4], [4, 5, 16, 8], [4, 6, 32, 32],
|
|
61
|
+
[4, 4, 16, 16], [8, 16, 32, 32], [8, 16, 128, 128],
|
|
62
|
+
[8, 32, 128, 256], [32, 128, 258, 1024], [32, 258, 258, 4096],
|
|
63
|
+
];
|
|
64
|
+
const profile = profiles[level];
|
|
65
|
+
if (!profile || level === 0)
|
|
66
|
+
fail("invalid from-crlf compression level");
|
|
67
|
+
const [good, lazy, nice, chain] = profile;
|
|
68
|
+
// Absolute positions avoid copying/remapping the window on each slide.
|
|
69
|
+
// Zero remains NIL; positions at/before the current window base are ignored.
|
|
70
|
+
const head = new Float64Array(32768);
|
|
71
|
+
const previous = new Float64Array(32768);
|
|
72
|
+
let position = 0;
|
|
73
|
+
let base = 0;
|
|
74
|
+
let eof = read(65536) === 0;
|
|
75
|
+
let matchLength = 2;
|
|
76
|
+
let matchStart = 0;
|
|
77
|
+
let work = 0;
|
|
78
|
+
const insert = (at) => {
|
|
79
|
+
const hash = ((output[at] << 10) ^ (output[at + 1] << 5) ^ output[at + 2]) & 32767;
|
|
80
|
+
const candidate = head[hash];
|
|
81
|
+
previous[at & 32767] = candidate;
|
|
82
|
+
head[hash] = at;
|
|
83
|
+
return candidate;
|
|
84
|
+
};
|
|
85
|
+
const longest = (candidate, best, available) => {
|
|
86
|
+
let remaining = best >= good ? chain >>> 2 : chain;
|
|
87
|
+
const limit = Math.max(base, position - 32506);
|
|
88
|
+
const maximum = Math.min(258, available);
|
|
89
|
+
do {
|
|
90
|
+
work++;
|
|
91
|
+
if (output[candidate + best] === output[position + best] &&
|
|
92
|
+
output[candidate + best - 1] === output[position + best - 1] &&
|
|
93
|
+
output[candidate] === output[position] && output[candidate + 1] === output[position + 1]) {
|
|
94
|
+
let count = 2;
|
|
95
|
+
while (count < maximum && output[candidate + count] === output[position + count])
|
|
96
|
+
count++;
|
|
97
|
+
if (count > best) {
|
|
98
|
+
best = count;
|
|
99
|
+
matchStart = candidate;
|
|
100
|
+
if (count >= Math.min(nice, available))
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
candidate = previous[candidate & 32767];
|
|
105
|
+
} while (candidate > limit && --remaining > 0);
|
|
106
|
+
return Math.min(best, available);
|
|
107
|
+
};
|
|
108
|
+
while (true) {
|
|
109
|
+
if (++work >= 32768) {
|
|
110
|
+
await yieldTurn(signal);
|
|
111
|
+
work = 0;
|
|
112
|
+
}
|
|
113
|
+
let available = length() - position;
|
|
114
|
+
while (available < 262) {
|
|
115
|
+
if (position - base >= 65274)
|
|
116
|
+
base += 32768;
|
|
117
|
+
if (eof)
|
|
118
|
+
break;
|
|
119
|
+
await yieldTurn(signal);
|
|
120
|
+
eof = read(65536 - (length() - base)) === 0;
|
|
121
|
+
available = length() - position;
|
|
122
|
+
}
|
|
123
|
+
if (available === 0)
|
|
124
|
+
return;
|
|
125
|
+
const candidate = available >= 3 ? insert(position) : 0;
|
|
126
|
+
if (level <= 3) {
|
|
127
|
+
matchLength = candidate > base && position - candidate <= 32506 ? longest(candidate, 2, available) : 0;
|
|
128
|
+
if (matchLength >= 3) {
|
|
129
|
+
const end = position + matchLength;
|
|
130
|
+
if (matchLength <= lazy && available - matchLength >= 3) {
|
|
131
|
+
while (++position < end)
|
|
132
|
+
insert(position);
|
|
133
|
+
}
|
|
134
|
+
else
|
|
135
|
+
position = end;
|
|
136
|
+
}
|
|
137
|
+
else
|
|
138
|
+
position++;
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
const priorLength = matchLength;
|
|
142
|
+
matchLength = 2;
|
|
143
|
+
if (candidate > base && priorLength < lazy && position - candidate <= 32506) {
|
|
144
|
+
matchLength = longest(candidate, priorLength, available);
|
|
145
|
+
if (matchLength === 3 && position - matchStart > 4096)
|
|
146
|
+
matchLength = 2;
|
|
147
|
+
}
|
|
148
|
+
if (priorLength >= 3 && matchLength <= priorLength) {
|
|
149
|
+
const end = position + priorLength - 1;
|
|
150
|
+
while (++position < end) {
|
|
151
|
+
if (position <= length() - 3)
|
|
152
|
+
insert(position);
|
|
153
|
+
}
|
|
154
|
+
matchLength = 2;
|
|
155
|
+
}
|
|
156
|
+
else
|
|
157
|
+
position++;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
3
161
|
// Info-ZIP Unix STORE and DEFLATE first-read sizes after -l halves the buffer.
|
|
4
162
|
export async function zipToCrlf(bytes, store, maxBytes, signal) {
|
|
5
163
|
signal.throwIfAborted();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line-endings.js","sourceRoot":"","sources":["../../../../src/commands/archive/zip/line-endings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,+EAA+E;AAC/E,MAAM,CAAC,K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CAAC,GAAG,EAAE,CAAC;QACvC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC;IAC1B,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ByteSink } from "../../../contracts/index.js";
|
|
2
|
+
import type { ZipScope } from "./safety.js";
|
|
3
|
+
/** Persistent log bytes are intentional effects, never invocation scratch files. */
|
|
4
|
+
export declare class ZipLog {
|
|
5
|
+
private readonly scope;
|
|
6
|
+
private readonly info;
|
|
7
|
+
failed: boolean;
|
|
8
|
+
password: Uint8Array | undefined;
|
|
9
|
+
private path;
|
|
10
|
+
private parent;
|
|
11
|
+
private expected;
|
|
12
|
+
private bytes;
|
|
13
|
+
private append;
|
|
14
|
+
started: boolean;
|
|
15
|
+
private readonly pending;
|
|
16
|
+
constructor(scope: ZipScope, info: boolean);
|
|
17
|
+
open(name: string, append: boolean, protectedNames: readonly string[]): Promise<void>;
|
|
18
|
+
protect(names: readonly string[]): Promise<void>;
|
|
19
|
+
start(): Promise<void>;
|
|
20
|
+
private write;
|
|
21
|
+
sink(destination: ByteSink, quiet?: boolean): ByteSink;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../src/commands/archive/zip/log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,QAAQ,EAAiB,MAAM,6BAA6B,CAAC;AAIhG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,oFAAoF;AACpF,qBAAa,MAAM;IAUL,OAAO,CAAC,QAAQ,CAAC,KAAK;IAAY,OAAO,CAAC,QAAQ,CAAC,IAAI;IATnE,MAAM,UAAS;IACf,QAAQ,EAAE,UAAU,GAAG,SAAS,CAAC;IACjC,OAAO,CAAC,IAAI,CAAM;IAClB,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,UAAS;IAChB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;gBACf,KAAK,EAAE,QAAQ,EAAmB,IAAI,EAAE,OAAO;IACtE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA4BrF,OAAO,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBhD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAsBd,KAAK;IAQnB,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,KAAK,UAAQ,GAAG,QAAQ;CAsCrD"}
|