@openge/forge-archive-zip 0.1.1-rc.0 → 0.1.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 (2) hide show
  1. package/README.md +3 -30
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,36 +1,9 @@
1
1
  # `@openge/forge-archive-zip`
2
2
 
3
- Runtime-neutral ZIP32 archive Provider with bounded safety validation.
3
+ Runtime-neutral deterministic ZIP32 encoding, inspection, and bounded decoding.
4
4
 
5
- ## Installation
5
+ Complete usage, examples, supported ZIP features, limits, and safety boundaries are maintained in the [中文使用文档](https://github.com/zopenge/foundation-forge/blob/main/docs/packages/artifacts/archive-zip.md).
6
6
 
7
- ```sh
8
- pnpm add @openge/forge-archive-zip
9
- ```
10
-
11
- ## Usage
12
-
13
- ```ts
14
- import { decodeZipArchive, encodeZipArchive } from '@openge/forge-archive-zip';
15
-
16
- const archive = encodeZipArchive([
17
- { bytes: new TextEncoder().encode('hello'), kind: 'file', path: 'hello.txt' },
18
- ], { compression: 'deflate' });
19
-
20
- const decoded = decodeZipArchive(archive, {
21
- limits: { maxArchiveBytes: 8 * 1024 * 1024, maxExpandedBytes: 32 * 1024 * 1024 },
22
- });
23
- ```
24
-
25
- The provider creates deterministic ZIP32 archives and validates the central
26
- directory before decompression. It rejects encryption, ZIP64, unsupported
27
- methods, unsafe paths and entry kinds, duplicate names, inconsistent headers,
28
- CRC mismatches, and configured resource-limit violations. UTF-8 filenames retain
29
- all characters, including a leading BOM; they are not normalized during decoding.
30
-
31
- Only in-memory bytes are handled. Downloading, filesystem extraction, cache
32
- policy, credentials, and product artifact semantics belong to the consumer.
33
-
34
- ## License
7
+ For repository-wide capability discovery, see the [Foundation Forge documentation](https://github.com/zopenge/foundation-forge/blob/main/docs/README.md).
35
8
 
36
9
  Licensed under the Apache License 2.0.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openge/forge-archive-zip",
3
- "version": "0.1.1-rc.0",
3
+ "version": "0.1.1",
4
4
  "description": "Runtime-neutral ZIP32 archive Provider with bounded safety validation",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -35,7 +35,7 @@
35
35
  "url": "https://github.com/zopenge/foundation-forge/issues"
36
36
  },
37
37
  "dependencies": {
38
- "@openge/forge-archive-safety": "0.1.1-rc.0",
38
+ "@openge/forge-archive-safety": "0.1.1",
39
39
  "fflate": "0.8.3"
40
40
  },
41
41
  "scripts": {