wilcocrypt 2.1.1 → 2.2.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.
- package/.github/ISSUE_TEMPLATE/bug.md +72 -0
- package/.github/ISSUE_TEMPLATE/config.yml +6 -0
- package/.github/ISSUE_TEMPLATE/feature.yml +38 -0
- package/.github/dependabot.yml +11 -0
- package/CHANGELOG.md +100 -0
- package/DOCS.md +527 -0
- package/README.md +61 -65
- package/SECURITY.md +48 -0
- package/package.json +14 -8
- package/src/cli.js +57 -37
- package/src/wilcocrypt.js +429 -102
- package/types/wilcocrypt.d.ts +309 -24
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
about: Report a bug or unexpected behavior in WilcoCrypt
|
|
3
|
+
title: "[BUG] "
|
|
4
|
+
labels: ["bug"]
|
|
5
|
+
|
|
6
|
+
body:
|
|
7
|
+
|
|
8
|
+
- type: markdown
|
|
9
|
+
attributes:
|
|
10
|
+
value: "## Bug report"
|
|
11
|
+
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: description
|
|
14
|
+
attributes:
|
|
15
|
+
label: Description
|
|
16
|
+
description: Describe what went wrong
|
|
17
|
+
placeholder: Clearly explain the issue
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
|
|
21
|
+
- type: textarea
|
|
22
|
+
id: steps
|
|
23
|
+
attributes:
|
|
24
|
+
label: Steps to reproduce
|
|
25
|
+
description: How can this issue be reproduced?
|
|
26
|
+
value: | 1. 2. 3.
|
|
27
|
+
validations:
|
|
28
|
+
required: true
|
|
29
|
+
|
|
30
|
+
- type: textarea
|
|
31
|
+
id: expected
|
|
32
|
+
attributes:
|
|
33
|
+
label: Expected behavior
|
|
34
|
+
description: What did you expect to happen?
|
|
35
|
+
validations:
|
|
36
|
+
required: true
|
|
37
|
+
|
|
38
|
+
- type: textarea
|
|
39
|
+
id: actual
|
|
40
|
+
attributes:
|
|
41
|
+
label: Actual behavior
|
|
42
|
+
description: What actually happened?
|
|
43
|
+
validations:
|
|
44
|
+
required: true
|
|
45
|
+
|
|
46
|
+
- type: input
|
|
47
|
+
id: version
|
|
48
|
+
attributes:
|
|
49
|
+
label: WilcoCrypt version
|
|
50
|
+
placeholder: e.g. 2.1.1
|
|
51
|
+
validations:
|
|
52
|
+
required: true
|
|
53
|
+
|
|
54
|
+
- type: input
|
|
55
|
+
id: node
|
|
56
|
+
attributes:
|
|
57
|
+
label: Node.js version
|
|
58
|
+
placeholder: e.g. 22.x
|
|
59
|
+
|
|
60
|
+
- type: dropdown
|
|
61
|
+
id: environment
|
|
62
|
+
attributes:
|
|
63
|
+
label: Environment
|
|
64
|
+
options: - Linux - Windows - macOS - Other
|
|
65
|
+
validations:
|
|
66
|
+
required: true
|
|
67
|
+
|
|
68
|
+
- type: textarea
|
|
69
|
+
id: additional
|
|
70
|
+
attributes:
|
|
71
|
+
label: Additional context
|
|
72
|
+
description: Logs, errors, or anything else
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
about: Suggest an idea or improvement for WilcoCrypt
|
|
3
|
+
title: "[FEATURE] "
|
|
4
|
+
labels: ["enhancement"]
|
|
5
|
+
|
|
6
|
+
body:
|
|
7
|
+
- type: markdown
|
|
8
|
+
attributes:
|
|
9
|
+
value: "## Feature request"
|
|
10
|
+
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: problem
|
|
13
|
+
attributes:
|
|
14
|
+
label: Problem
|
|
15
|
+
description: What problem does this solve?
|
|
16
|
+
placeholder: Describe the issue you're facing
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: solution
|
|
22
|
+
attributes:
|
|
23
|
+
label: Proposed solution
|
|
24
|
+
description: What would you like to see?
|
|
25
|
+
validations:
|
|
26
|
+
required: true
|
|
27
|
+
|
|
28
|
+
- type: textarea
|
|
29
|
+
id: alternatives
|
|
30
|
+
attributes:
|
|
31
|
+
label: Alternatives considered
|
|
32
|
+
description: Any alternative solutions you've thought about?
|
|
33
|
+
|
|
34
|
+
- type: textarea
|
|
35
|
+
id: context
|
|
36
|
+
attributes:
|
|
37
|
+
label: Additional context
|
|
38
|
+
description: Extra details, use cases, or examples
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "npm" # See documentation for possible values
|
|
9
|
+
directory: "/" # Location of package manifests
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "weekly"
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to WilcoCrypt are documented here.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## [2.2.1] - 2026-06-06
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
* **Asynchronous API**:
|
|
12
|
+
|
|
13
|
+
* `encryptDataAsync()`
|
|
14
|
+
* `decryptDataAsync()`
|
|
15
|
+
* `encryptFileAsync()`
|
|
16
|
+
* `decryptFileAsync()`
|
|
17
|
+
|
|
18
|
+
These methods provide Promise-based alternatives to the existing synchronous API and integrate naturally with `async` / `await`.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
* **TypeScript definitions** significantly expanded and improved:
|
|
23
|
+
|
|
24
|
+
* Added detailed JSDoc documentation throughout the public API.
|
|
25
|
+
* Added parameter descriptions for internal helper functions.
|
|
26
|
+
* Added return value documentation.
|
|
27
|
+
* Added exception documentation (`@throws`) where applicable.
|
|
28
|
+
* Improved overload documentation for `decryptFile()` and `decryptFileAsync()`.
|
|
29
|
+
* Added payload format documentation to stream APIs.
|
|
30
|
+
|
|
31
|
+
* **Dependencies updated** to the latest compatible versions.
|
|
32
|
+
|
|
33
|
+
* **Code style** migrated from semistandard-only documentation to explicit **Prettier** formatting support.
|
|
34
|
+
|
|
35
|
+
### Documentation
|
|
36
|
+
|
|
37
|
+
* Updated `README.md` examples and feature descriptions.
|
|
38
|
+
* Updated `DOCS.md` API documentation.
|
|
39
|
+
* Improved TypeScript API reference consistency.
|
|
40
|
+
* Improved JSDoc coverage across the entire codebase.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## [2.2.0] - 2026-05-01
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
|
|
48
|
+
- **Streaming API** — `encryptFileStream(inputPath, outputPath, password, gzip?)` and `decryptFileStream(inputPath, outputPath, password, gzip?)` for memory-efficient encryption and decryption of large files using Node.js streams.
|
|
49
|
+
- **`decryptFile` output path** — `decryptFile` now accepts an optional `outputPath` argument. When provided, decrypted data is written directly to that file instead of being returned as a Buffer. Fully backward compatible.
|
|
50
|
+
- Internal `HEADER` constant (`[23, 9, 12, 3, 15, 3, 18, 25, 16, 20]`) for payload identification.
|
|
51
|
+
- **CLI `-o` / `--output` flag** — Decrypted output can now be written to a file via `-o <file>` instead of always piping to stdout.
|
|
52
|
+
- **CLI `--stdout` flag** — Explicit flag to write decrypted output to stdout (this remains the default when `-o` is omitted).
|
|
53
|
+
- **Version check on decryption** — The version string is now embedded in the encrypted payload and validated during decryption. Payloads from a different version are rejected with a `VERSION_MISMATCH` error.
|
|
54
|
+
- **GitHub issue templates** (bug report, feature request) and `issue_config.yml`.
|
|
55
|
+
- **`dependabot.yml`** for automated dependency updates.
|
|
56
|
+
- **`SECURITY.md`** with responsible disclosure policy.
|
|
57
|
+
- **`DOCS.md`** — full API reference, CLI docs, payload format, TypeScript usage, and security notes.
|
|
58
|
+
|
|
59
|
+
### Changed
|
|
60
|
+
|
|
61
|
+
- **Binary payload format** — The encrypted payload format has been updated. The version string is now included between the header and salt, and the auth tag has moved to the **end** of the payload (after the ciphertext) to support streaming. The new layout is:
|
|
62
|
+
`[HEADER (10)] + [VERSION (dynamic)] + [salt (16)] + [iv (12)] + [ciphertext] + [authTag (16)]`
|
|
63
|
+
> Payloads encrypted with v2.1.1 are not compatible with v2.2.0 and vice versa.
|
|
64
|
+
- **Removed `notepack.io`** — The MessagePack dependency has been dropped entirely. The custom binary format replaces the previous envelope-based approach.
|
|
65
|
+
- **VERSION** bumped from `2.1.1` to `2.2.0`.
|
|
66
|
+
- **Linting** — Codebase now enforces [semistandard](https://github.com/standard/semistandard) style (Standard JS + semicolons).
|
|
67
|
+
- **TypeScript types** updated with overloads for the new `decryptFile` signature and the two new stream methods.
|
|
68
|
+
- **README** updated with stability warning, new features, and links to `DOCS.md` and `CHANGELOG.md`.
|
|
69
|
+
|
|
70
|
+
### Internal
|
|
71
|
+
|
|
72
|
+
- Stream decryption performs early header and version validation before opening the output stream, and automatically cleans up the output file on failure.
|
|
73
|
+
- `_.decryptData` internal helper now accepts raw `Buffer` arguments (previously hex strings).
|
|
74
|
+
|
|
75
|
+
### Fixed Bugs
|
|
76
|
+
|
|
77
|
+
- Fixed the bug where the CLI tool would not work when running with npx or global
|
|
78
|
+
- Fixed package.json issue with bin not being an object
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## [2.1.1] - 2026-04-26
|
|
83
|
+
|
|
84
|
+
First official GitHub release of WilcoCrypt.
|
|
85
|
+
|
|
86
|
+
### Added
|
|
87
|
+
|
|
88
|
+
- Full TypeScript support (`wilcocrypt.d.ts`).
|
|
89
|
+
- Pre-built binaries for Linux x64/arm64, macOS x64/arm64, and Windows x64.
|
|
90
|
+
- `WilcoCryptError` custom error class with machine-readable `code` property.
|
|
91
|
+
- Internal helpers: `assertKeyAndIv`, `assertPassword`, `constantTimeEqual`.
|
|
92
|
+
|
|
93
|
+
### Changed
|
|
94
|
+
|
|
95
|
+
- Removed Rollup bundle from the npm package (Rollup is still used for building binaries).
|
|
96
|
+
- README improvements and consistency fixes.
|
|
97
|
+
|
|
98
|
+
### Notes
|
|
99
|
+
|
|
100
|
+
- The CLI `wilcocrypt` command does not work when installed globally via npm in this release. Use the provided binaries as a workaround. This is fixed in v2.2.0.
|