neozip-cli 0.70.0-alpha

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 (43) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/DOCUMENTATION.md +194 -0
  3. package/LICENSE +22 -0
  4. package/README.md +504 -0
  5. package/WHY_NEOZIP.md +212 -0
  6. package/bin/neolist +16 -0
  7. package/bin/neounzip +16 -0
  8. package/bin/neozip +15 -0
  9. package/dist/neozipkit-bundles/blockchain.js +13091 -0
  10. package/dist/neozipkit-bundles/browser.js +5733 -0
  11. package/dist/neozipkit-bundles/core.js +3766 -0
  12. package/dist/neozipkit-bundles/server.js +14996 -0
  13. package/dist/neozipkit-wrappers/blockchain/core/contracts.js +16 -0
  14. package/dist/neozipkit-wrappers/blockchain/index.js +2 -0
  15. package/dist/neozipkit-wrappers/core/ZipDecompress.js +2 -0
  16. package/dist/neozipkit-wrappers/core/components/HashCalculator.js +2 -0
  17. package/dist/neozipkit-wrappers/core/components/Logger.js +2 -0
  18. package/dist/neozipkit-wrappers/core/constants/Errors.js +2 -0
  19. package/dist/neozipkit-wrappers/core/constants/Headers.js +2 -0
  20. package/dist/neozipkit-wrappers/core/encryption/ZipCrypto.js +7 -0
  21. package/dist/neozipkit-wrappers/core/index.js +3 -0
  22. package/dist/neozipkit-wrappers/index.js +13 -0
  23. package/dist/neozipkit-wrappers/server/index.js +2 -0
  24. package/dist/src/config/ConfigSetup.js +455 -0
  25. package/dist/src/config/ConfigStore.js +373 -0
  26. package/dist/src/config/ConfigWizard.js +453 -0
  27. package/dist/src/config/WalletConfig.js +372 -0
  28. package/dist/src/exit-codes.js +210 -0
  29. package/dist/src/index.js +141 -0
  30. package/dist/src/neolist.js +1194 -0
  31. package/dist/src/neounzip.js +2177 -0
  32. package/dist/src/neozip/CommentManager.js +240 -0
  33. package/dist/src/neozip/blockchain.js +383 -0
  34. package/dist/src/neozip/createZip.js +2273 -0
  35. package/dist/src/neozip/file-operations.js +920 -0
  36. package/dist/src/neozip/types.js +6 -0
  37. package/dist/src/neozip/user-interaction.js +256 -0
  38. package/dist/src/neozip/utils.js +96 -0
  39. package/dist/src/neozip.js +785 -0
  40. package/dist/src/server/CommentManager.js +240 -0
  41. package/dist/src/version.js +59 -0
  42. package/env.example +101 -0
  43. package/package.json +175 -0
@@ -0,0 +1,240 @@
1
+ "use strict";
2
+ /**
3
+ * CommentManager - Handles archive and file comments for ZIP files
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.CommentManager = void 0;
40
+ const fs = __importStar(require("fs"));
41
+ const readline = __importStar(require("readline"));
42
+ class CommentManager {
43
+ static setArchiveComment(zip, comment) {
44
+ try {
45
+ if (zip && typeof zip.setZipComment === 'function') {
46
+ zip.setZipComment(comment);
47
+ return true;
48
+ }
49
+ return false;
50
+ }
51
+ catch (error) {
52
+ console.error('Error setting archive comment:', error);
53
+ return false;
54
+ }
55
+ }
56
+ static getArchiveComment(zip) {
57
+ try {
58
+ if (zip && typeof zip.getZipComment === 'function') {
59
+ return zip.getZipComment();
60
+ }
61
+ return null;
62
+ }
63
+ catch (error) {
64
+ console.error('Error getting archive comment:', error);
65
+ return null;
66
+ }
67
+ }
68
+ static setFileComment(entry, comment) {
69
+ try {
70
+ if (entry && typeof entry.comment !== 'undefined') {
71
+ entry.comment = comment;
72
+ return true;
73
+ }
74
+ return false;
75
+ }
76
+ catch (error) {
77
+ console.error('Error setting file comment:', error);
78
+ return false;
79
+ }
80
+ }
81
+ static getFileComment(entry) {
82
+ try {
83
+ if (entry && typeof entry.comment !== 'undefined') {
84
+ return entry.comment || null;
85
+ }
86
+ return null;
87
+ }
88
+ catch (error) {
89
+ console.error('Error getting file comment:', error);
90
+ return null;
91
+ }
92
+ }
93
+ static async readCommentsFromFile(filePath) {
94
+ try {
95
+ if (!fs.existsSync(filePath)) {
96
+ return { success: false, error: `Comment file not found: ${filePath}` };
97
+ }
98
+ const content = fs.readFileSync(filePath, 'utf8');
99
+ const lines = content.split('\n');
100
+ let archiveComment = '';
101
+ const fileComments = {};
102
+ let currentFile = '';
103
+ let currentComment = '';
104
+ for (const line of lines) {
105
+ const trimmedLine = line.trim();
106
+ if (!trimmedLine) {
107
+ if (currentFile && currentComment) {
108
+ fileComments[currentFile] = currentComment.trim();
109
+ currentFile = '';
110
+ currentComment = '';
111
+ }
112
+ continue;
113
+ }
114
+ if (trimmedLine.includes(':')) {
115
+ if (currentFile && currentComment) {
116
+ fileComments[currentFile] = currentComment.trim();
117
+ }
118
+ const colonIndex = trimmedLine.indexOf(':');
119
+ currentFile = trimmedLine.substring(0, colonIndex).trim();
120
+ currentComment = trimmedLine.substring(colonIndex + 1).trim();
121
+ }
122
+ else {
123
+ if (currentFile) {
124
+ currentComment += (currentComment ? '\n' : '') + trimmedLine;
125
+ }
126
+ else {
127
+ archiveComment += (archiveComment ? '\n' : '') + trimmedLine;
128
+ }
129
+ }
130
+ }
131
+ if (currentFile && currentComment) {
132
+ fileComments[currentFile] = currentComment.trim();
133
+ }
134
+ return {
135
+ success: true,
136
+ archiveComment: archiveComment || undefined,
137
+ fileComments: Object.keys(fileComments).length > 0 ? fileComments : undefined
138
+ };
139
+ }
140
+ catch (error) {
141
+ return {
142
+ success: false,
143
+ error: `Error reading comment file: ${error instanceof Error ? error.message : String(error)}`
144
+ };
145
+ }
146
+ }
147
+ static async promptForArchiveComment() {
148
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
149
+ return new Promise((resolve) => {
150
+ rl.question('Enter archive comment (press Enter twice to finish):\n', (comment) => {
151
+ const lines = [comment];
152
+ const readLine = () => {
153
+ rl.question('', (line) => {
154
+ if (line.trim() === '') {
155
+ rl.close();
156
+ resolve(lines.join('\n').trim());
157
+ }
158
+ else {
159
+ lines.push(line);
160
+ readLine();
161
+ }
162
+ });
163
+ };
164
+ readLine();
165
+ });
166
+ });
167
+ }
168
+ static async promptForFileComments(filenames) {
169
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
170
+ const fileComments = {};
171
+ for (const filename of filenames) {
172
+ const comment = await new Promise((resolve) => {
173
+ rl.question(`Enter comment for ${filename}: `, (input) => resolve(input.trim()));
174
+ });
175
+ if (comment)
176
+ fileComments[filename] = comment;
177
+ }
178
+ rl.close();
179
+ return fileComments;
180
+ }
181
+ static async promptForFileCommentsOnly(filenames) {
182
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
183
+ const fileComments = {};
184
+ for (const filename of filenames) {
185
+ const comment = await new Promise((resolve) => {
186
+ rl.question(`Enter comment for ${filename}: `, (input) => resolve(input.trim()));
187
+ });
188
+ if (comment)
189
+ fileComments[filename] = comment;
190
+ }
191
+ rl.close();
192
+ return fileComments;
193
+ }
194
+ static applyComments(zip, entries, options) {
195
+ try {
196
+ let success = true;
197
+ const errors = [];
198
+ if (options.archiveComment) {
199
+ if (!this.setArchiveComment(zip, options.archiveComment)) {
200
+ success = false;
201
+ errors.push('Failed to set archive comment');
202
+ }
203
+ }
204
+ if (options.fileComments) {
205
+ for (const [filename, comment] of Object.entries(options.fileComments)) {
206
+ const entry = entries.find((e) => e.filename === filename);
207
+ if (entry) {
208
+ if (!this.setFileComment(entry, comment)) {
209
+ success = false;
210
+ errors.push(`Failed to set comment for ${filename}`);
211
+ }
212
+ }
213
+ else {
214
+ success = false;
215
+ errors.push(`File not found: ${filename}`);
216
+ }
217
+ }
218
+ }
219
+ return { success, archiveComment: options.archiveComment, fileComments: options.fileComments, error: errors.length > 0 ? errors.join('; ') : undefined };
220
+ }
221
+ catch (error) {
222
+ return { success: false, error: `Error applying comments: ${error instanceof Error ? error.message : String(error)}` };
223
+ }
224
+ }
225
+ static applyFileCommentToEntry(entry, filename, fileComments) {
226
+ try {
227
+ if (fileComments[filename]) {
228
+ return this.setFileComment(entry, fileComments[filename]);
229
+ }
230
+ return true;
231
+ }
232
+ catch (error) {
233
+ console.error(`Error applying file comment to ${filename}:`, error);
234
+ return false;
235
+ }
236
+ }
237
+ }
238
+ exports.CommentManager = CommentManager;
239
+ exports.default = CommentManager;
240
+ //# sourceMappingURL=CommentManager.js.map
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ /**
3
+ * Centralized version information for NeoZip CLI
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.APP_RELEASE_DATE = exports.APP_VERSION = void 0;
40
+ const path = __importStar(require("path"));
41
+ const fs = __importStar(require("fs"));
42
+ // Resolve package.json path - works in both development and installed locations
43
+ function getPackageJson() {
44
+ // Try relative path first (development)
45
+ let packageJsonPath = path.join(__dirname, '../package.json');
46
+ if (!fs.existsSync(packageJsonPath)) {
47
+ // If not found, try going up two levels (installed: dist/src -> dist -> root)
48
+ packageJsonPath = path.join(__dirname, '../../package.json');
49
+ }
50
+ if (!fs.existsSync(packageJsonPath)) {
51
+ // Last resort: try from process.cwd() or __dirname
52
+ packageJsonPath = path.join(__dirname, '../../../package.json');
53
+ }
54
+ return JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
55
+ }
56
+ const packageJson = getPackageJson();
57
+ exports.APP_VERSION = packageJson.version;
58
+ exports.APP_RELEASE_DATE = packageJson.release_date || new Date().toISOString().split('T')[0];
59
+ //# sourceMappingURL=version.js.map
package/env.example ADDED
@@ -0,0 +1,101 @@
1
+ # NeoZip CLI Environment Configuration
2
+ # ⚠️ DEPRECATED: This method is still supported but wallet.json is now preferred
3
+ #
4
+ # For new setups, use the interactive configuration wizard:
5
+ # $ neozip init
6
+ #
7
+ # See dev_doc/WALLET_CONFIG.md for complete configuration guide
8
+
9
+ # =============================================================================
10
+ # REQUIRED: Wallet Configuration
11
+ # =============================================================================
12
+
13
+ # Your wallet private key (64-character hex string starting with 0x)
14
+ # This is required for blockchain operations like token minting and verification
15
+ # Get testnet ETH from: https://www.coinbase.com/faucets/base-ethereum-sepolia-faucet
16
+ #
17
+ # ⚠️ DEPRECATED: Use 'neozip init' or 'neozip config set wallet.privateKey 0x...' instead
18
+ NEOZIP_WALLET_PASSKEY=0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
19
+
20
+ # =============================================================================
21
+ # OPTIONAL: Network Configuration
22
+ # =============================================================================
23
+
24
+ # Blockchain network to use (default: base-sepolia)
25
+ #
26
+ # Supported network names:
27
+ # - base-sepolia (Base Sepolia Testnet, Chain ID: 84532) - RECOMMENDED for testing
28
+ # - base-mainnet (Base Mainnet, Chain ID: 8453)
29
+ # - arbitrum-sepolia (Arbitrum Sepolia Testnet, Chain ID: 421614)
30
+ # - arbitrum-one (Arbitrum One Mainnet, Chain ID: 42161)
31
+ # - sepolia-testnet (Ethereum Sepolia Testnet, Chain ID: 11155111) - WARNING: Network instability issues
32
+ #
33
+ # Example:
34
+ # NEOZIP_NETWORK=base-sepolia
35
+
36
+ # =============================================================================
37
+ # OPTIONAL: RPC Configuration (if using custom RPC endpoints)
38
+ # =============================================================================
39
+
40
+ # Custom RPC endpoint for Base Sepolia testnet (optional)
41
+ # Default: https://sepolia.base.org
42
+ # NEOZIP_BASE_SEPOLIA_RPC_URL=https://sepolia.base.org
43
+
44
+ # Custom RPC endpoint for Base Mainnet (optional)
45
+ # Default: https://mainnet.base.org
46
+ # NEOZIP_BASE_MAINNET_RPC_URL=https://mainnet.base.org
47
+
48
+ # Note: RPC configuration for Arbitrum and Ethereum networks should be configured via:
49
+ # - Interactive wizard: neozip init
50
+ # - Config command: neozip config
51
+ # - wallet.json file: ~/.neozip/wallet.json
52
+ #
53
+ # Default RPC endpoints for other networks:
54
+ # - Arbitrum Sepolia: https://sepolia-rollup.arbitrum.io/rpc
55
+ # - Arbitrum One: https://arb1.arbitrum.io/rpc
56
+ # - Ethereum Sepolia: https://rpc.sepolia.ethpandaops.io
57
+
58
+ # =============================================================================
59
+ # OPTIONAL: Debug Configuration
60
+ # =============================================================================
61
+
62
+ # Enable verbose logging (true/false)
63
+ # NEOZIP_VERBOSE=false
64
+
65
+ # Enable debug mode for blockchain operations (true/false)
66
+ # NEOZIP_DEBUG=false
67
+
68
+ # =============================================================================
69
+ # OPTIONAL: Gas Configuration
70
+ # =============================================================================
71
+
72
+ # Gas price multiplier (default: 1.0)
73
+ # NEOZIP_GAS_MULTIPLIER=1.0
74
+
75
+ # Maximum gas price in gwei (default: 100)
76
+ # NEOZIP_MAX_GAS_PRICE=100
77
+
78
+ # =============================================================================
79
+ # USAGE INSTRUCTIONS
80
+ # =============================================================================
81
+ #
82
+ # 1. Copy this file to .env.local:
83
+ # cp .env.example .env.local
84
+ #
85
+ # 2. Set your wallet private key:
86
+ # export NEOZIP_WALLET_PASSKEY="0x..."
87
+ #
88
+ # 3. For testnet, get free ETH from:
89
+ # https://www.coinbase.com/faucets/base-ethereum-sepolia-faucet
90
+ #
91
+ # 4. Install dependencies and build:
92
+ # npm install
93
+ # npm run build
94
+ #
95
+ # 5. Run neozip commands:
96
+ # neozip zip output/test.nzip file1.txt file2.txt
97
+ # neozip list output/test.nzip
98
+ # neozip unzip output/test.nzip
99
+ # neozip config
100
+ #
101
+ # =============================================================================
package/package.json ADDED
@@ -0,0 +1,175 @@
1
+ {
2
+ "name": "neozip-cli",
3
+ "version": "0.70.0-alpha",
4
+ "description": "A full-featured command-line ZIP application with NeoZipKit integration",
5
+ "main": "dist/src/index.js",
6
+ "bin": {
7
+ "neolist": "./bin/neolist",
8
+ "neounzip": "./bin/neounzip",
9
+ "neozip": "./bin/neozip"
10
+ },
11
+ "files": [
12
+ "dist/src/**/*.js",
13
+ "dist/neozipkit-bundles/*.js",
14
+ "dist/neozipkit-wrappers/**/*.js",
15
+ "bin/",
16
+ "env.example",
17
+ "README.md",
18
+ "LICENSE",
19
+ "CHANGELOG.md",
20
+ "DOCUMENTATION.md",
21
+ "WHY_NEOZIP.md"
22
+ ],
23
+ "preferGlobal": true,
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "scripts": {
28
+ "start": "npx ts-node src/neozip.ts output/calgary.nzip test-suite/calgary/*",
29
+ "dev": "npx ts-node --inspect src/neozip.ts output/calgary.nzip test-suite/calgary/*",
30
+ "build": "echo '🔨 Building TypeScript...' && tsc --pretty && echo '🧹 Removing neozipkit from dist (bundled separately)...' && rm -rf dist/neozipkit && echo '📦 Bundling neozipkit (if needed)...' && node scripts/bundle-neozipkit.js && echo '📦 Copying neozipkit bundles...' && node scripts/copy-neozipkit-bundles.js && echo '📦 Creating wrapper modules...' && node scripts/create-neozipkit-wrappers.js && echo '🔄 Rewriting imports...' && node scripts/rewrite-neozipkit-imports.js && echo '✅ Build completed successfully!'",
31
+ "build:clean": "echo '🧹 Cleaning dist directory...' && rm -rf dist && echo '🔨 Building TypeScript...' && tsc --pretty && echo '✅ Clean build completed successfully!'",
32
+ "build:neozipkit": "echo '🔨 Building neozipkit...' && cd neozipkit && npm run build && cd .. && echo '✅ neozipkit build completed successfully!'",
33
+ "bundle:neozipkit": "echo '📦 Bundling neozipkit...' && node scripts/bundle-neozipkit.js",
34
+ "rebuild:neozipkit": "npm run build:neozipkit && npm run bundle:neozipkit && echo '✅ neozipkit rebuild and bundle completed successfully!'",
35
+ "build:all": "npm run rebuild:neozipkit && npm run build",
36
+ "dev:neozipkit": "echo '👀 Watching neozipkit for changes...' && cd ../neozipkit && npm run watch",
37
+ "type-check": "tsc --noEmit",
38
+ "clean": "rm -rf output/* dist/* test-output/*",
39
+ "pack": "npm run build && echo '📦 Creating package tarball...' && npm pack && echo '✅ Package created successfully!'",
40
+ "pack:dry-run": "npm run build && echo '📦 Previewing package contents...' && npm pack --dry-run",
41
+ "pack:clean": "rm -f neozip-cli-*.tgz && echo '🧹 Cleaned up package tarballs'",
42
+ "package": "npm run build && npm run pack",
43
+ "prepublishOnly": "npm run build",
44
+ "neozip": "npx ts-node src/neozip.ts -b -T output/calgary.nzip test-suite/calgary/*",
45
+ "neozip-sepolia": "npx ts-node src/neozip.ts -b -T --network sepolia-testnet output/calgary.nzip test-suite/calgary/*",
46
+ "neozip-base-sepolia": "npx ts-node src/neozip.ts -b -T --network base-sepolia output/calgary.nzip test-suite/calgary/*",
47
+ "neozip-base": "npx ts-node src/neozip.ts -b -T --network base-mainnet output/calgary.nzip test-suite/calgary/*",
48
+ "neozip-arbitrum-sepolia": "npx ts-node src/neozip.ts -b -T --network arbitrum-sepolia output/calgary.nzip test-suite/calgary/*",
49
+ "neozip-arbitrum": "npx ts-node src/neozip.ts -b -T --network arbitrum-one output/calgary.nzip test-suite/calgary/*",
50
+ "neozip-deflate": "npx ts-node src/neozip.ts --deflate -T output/calgary.nzip test-suite/calgary/*",
51
+ "neozip-inmem": "npx ts-node src/neozip.ts -b --in-memory -T output/calgary.nzip test-suite/calgary/*",
52
+ "neozip-store": "npx ts-node src/neozip.ts --level 0 -T output/calgary-stored.nzip test-suite/calgary/*",
53
+ "neozip-ots": "npx ts-node src/neozip.ts -ots -T output/calgary-ots.nzip test-suite/calgary/*",
54
+ "neozip-encrypt": "npx ts-node src/neozip.ts --encrypt -P 'pass123' -T output/calgary-encrypted.nzip test-suite/calgary/*",
55
+ "neozip-encrypt-sm": "npx ts-node src/neozip.ts --encrypt -P 'pass123' -T output/encrypted-sm.nzip test-suite/test-sm/*",
56
+ "neozip-update": "node test-scripts/test-update-option.js",
57
+ "neozip-sm": "npx ts-node src/neozip.ts -T output/test-sm.nzip test-suite/test-sm/*",
58
+ "neozip-init": "npx ts-node src/neozip.ts init",
59
+ "neozip-config": "npx ts-node src/neozip.ts config",
60
+ "neozip-help": "npx ts-node src/neozip.ts --help",
61
+ "neounzip": "npx ts-node src/neounzip.ts output/calgary.nzip -t",
62
+ "neounzip-inmem": "npx ts-node src/neounzip.ts --in-memory -l output/calgary.nzip -t",
63
+ "neounzip-bad": "npx ts-node src/neounzip.ts output/calgary-bad.nzip -t",
64
+ "neounzip-bad-inmem": "npx ts-node src/neounzip.ts --in-memory output/calgary-bad.nzip -t",
65
+ "neounzip-sm": "npx ts-node src/neounzip.ts -o output/test-sm.nzip",
66
+ "neounzip-skip-blockchain": "npx ts-node src/neounzip.ts --skip-blockchain output/calgary.nzip -t",
67
+ "neounzip-lg": "npx ts-node src/neounzip.ts output/large.nzip -t",
68
+ "neounzip-ots": "npx ts-node src/neounzip.ts output/calgary-ots.nzip -t",
69
+ "neounzip-ots-skip-blockchain": "npx ts-node src/neounzip.ts --skip-blockchain output/calgary-ots.nzip -t",
70
+ "neounzip-streaming": "npx ts-node src/neounzip.ts --buffer-size 16384 --verbose output/merged-test.nzip -t",
71
+ "neounzip-decrypt": "npx ts-node src/neounzip.ts --password 'pass123' output/calgary-encrypted.nzip -t",
72
+ "neounzip-decrypt-inmem": "npx ts-node src/neounzip.ts --in-memory --password 'pass123' output/calgary-encrypted.nzip -t",
73
+ "neounzip-decrypt-stored": "npx ts-node src/neounzip.ts --in-memory --password 'pass123' output/calgary-encrypted-stored.nzip -t",
74
+ "neounzip-decrypt-sm": "npx ts-node src/neounzip.ts --password 'pass123' output/encrypted-sm.nzip -t",
75
+ "neounzip-decrypt-sm-inmem": "npx ts-node src/neounzip.ts --in-memory --password 'pass123' output/encrypted-sm.nzip -t",
76
+ "neounzip-decrypt-pkzip": "npx ts-node src/neounzip.ts --pkzip-decrypt --password 'legacy-test-123' output/calgary-pkzip.nzip -t",
77
+ "neounzip-help": "npx ts-node src/neounzip.ts --help",
78
+ "neolist": "npx ts-node src/neolist.ts output/calgary.nzip",
79
+ "neolist-inmem": "npx ts-node src/neolist.ts --in-memory output/calgary.nzip",
80
+ "neolist-basic": "npx ts-node src/neolist.ts -b output/calgary.nzip",
81
+ "neolist-verbose": "npx ts-node src/neolist.ts -v output/calgary.nzip",
82
+ "neolist-demo": "npx ts-node src/neolist.ts output/calgary.nzip",
83
+ "neolist-short": "npx ts-node src/neolist.ts -s output/calgary.nzip",
84
+ "neolist-unix": "npx ts-node src/neolist.ts -u output/calgary.nzip",
85
+ "neolist-json": "npx ts-node src/neolist.ts -j output/calgary.nzip",
86
+ "neolist-zip64": "npx ts-node src/neolist.ts test-suite/calgary-zip64.zip",
87
+ "neolist-help": "npx ts-node src/neolist.ts --help",
88
+ "infozip-encrypt-zip": "zip -e -P 'pass123' -r test-infozip/calgary-encrypted.zip test-suite/calgary/*",
89
+ "infozip-encrypt-sm": "zip -e -P 'pass123' -0 test-infozip/encrypted-sm.zip test-suite/test-sm/*",
90
+ "infozip-encrypt-stored": "zip -e -P 'pass123' -0 test-infozip/calgary-encrypted-stored.zip test-suite/calgary/bib",
91
+ "infozip-decrypt-zip": "unzip -P 'pass123' -t test-infozip/calgary-encrypted.zip",
92
+ "infozip-decrypt-sm": "unzip -P 'pass123' -t test-infozip/encrypted-sm.zip",
93
+ "test": "node test-scripts/test-runner.js",
94
+ "test:verbose": "node test-scripts/test-runner.js --verbose",
95
+ "test:help": "node test-scripts/test-runner.js --help",
96
+ "test:comprehensive": "node test-scripts/comprehensive/run-all-tests.js",
97
+ "test:neozip": "node test-scripts/comprehensive/test-neozip-options.js",
98
+ "test:neounzip": "node test-scripts/comprehensive/test-neounzip-options.js",
99
+ "test:neolist": "node test-scripts/comprehensive/test-neolist-options.js",
100
+ "test:encryption": "npm run neozip-encrypt && npm run neounzip-decrypt && echo '✅ All encryption tests completed successfully!'",
101
+ "test:infozip-decrypt": "npx ts-node test-scripts/test-infozip-decrypt.ts",
102
+ "test:comments": "node test-scripts/comprehensive/test-comments-options.js",
103
+ "test:update": "node test-scripts/test-update-option.js",
104
+ "test:symlinks": "echo '=== Testing Symbolic Links ===' && rm -rf test-symlinks && rm -rf test-output/symlinks* 2>/dev/null; rm -rf output/symlinks*.nzip 2>/dev/null; mkdir -p test-symlinks && echo 'This is the target file content' > test-symlinks/target.txt && ln -sf target.txt test-symlinks/symlink.txt && echo -e '\\n--- Original files ---' && ls -la test-symlinks/ && echo -e '\\n--- Creating ZIP with -y (store symlinks) ---' && npx ts-node src/neozip.ts -y output/symlinks-test.nzip test-symlinks/* && echo -e '\\n--- Extracting with -y (restore symlinks) ---' && mkdir -p test-output/symlinks && npx ts-node src/neounzip.ts -y output/symlinks-test.nzip test-output/symlinks/ && echo -e '\\n--- Extracted files ---' && ls -la test-output/symlinks/test-symlinks/ 2>/dev/null || ls -la test-output/symlinks/ && echo -e '\\n--- Testing symlink functionality ---' && (test -L test-output/symlinks/test-symlinks/symlink.txt 2>/dev/null && cat test-output/symlinks/test-symlinks/symlink.txt > /dev/null 2>&1 && echo '✅ PASS: Symlink test completed successfully') || (test -L test-output/symlinks/symlink.txt 2>/dev/null && cat test-output/symlinks/symlink.txt > /dev/null 2>&1 && echo '✅ PASS: Symlink test completed successfully') || echo '❌ FAIL: Symlink was not created or does not work' && echo -e '\\n--- Creating ZIP without -y (follow symlinks) ---' && npx ts-node src/neozip.ts output/symlinks-follow.nzip test-symlinks/* && echo -e '\\n--- Extracting without -y (regular files) ---' && mkdir -p test-output/symlinks-follow && npx ts-node src/neounzip.ts output/symlinks-follow.nzip test-output/symlinks-follow/ && echo -e '\\n--- Extracted files (no symlinks) ---' && ls -la test-output/symlinks-follow/test-symlinks/ 2>/dev/null || ls -la test-output/symlinks-follow/ && rm -rf test-symlinks && rm -rf test-output/symlinks* 2>/dev/null; rm -rf output/symlinks*.nzip 2>/dev/null",
105
+ "test:hardlinks": "echo '=== Testing Hard Links ===' && rm -rf test-hardlinks && rm -rf test-output/hardlinks* 2>/dev/null; rm -rf output/hardlinks*.nzip 2>/dev/null; mkdir -p test-hardlinks && echo 'This is the original file content for hard link testing' > test-hardlinks/original.txt && ln test-hardlinks/original.txt test-hardlinks/hardlink1.txt && ln test-hardlinks/original.txt test-hardlinks/hardlink2.txt && echo -e '\\n--- Original files (note same inode numbers) ---' && ls -li test-hardlinks/ && echo -e '\\n--- Creating ZIP with -H (detect hard links) ---' && npx ts-node src/neozip.ts -H output/hardlinks-test.nzip test-hardlinks/* && echo -e '\\n--- Extracting with -H (restore hard links) ---' && mkdir -p test-output/hardlinks && npx ts-node src/neounzip.ts -H output/hardlinks-test.nzip test-output/hardlinks/ && echo -e '\\n--- Extracted files (note same inode numbers) ---' && ls -li test-output/hardlinks/test-hardlinks/ 2>/dev/null || ls -li test-output/hardlinks/ && echo -e '\\n--- Testing hard link functionality ---' && HARD_LINK1=\"test-output/hardlinks/test-hardlinks/hardlink1.txt\"; HARD_LINK2=\"test-output/hardlinks/test-hardlinks/hardlink2.txt\"; ORIGINAL=\"test-output/hardlinks/test-hardlinks/original.txt\"; test -f \"$HARD_LINK1\" || HARD_LINK1=\"test-output/hardlinks/hardlink1.txt\"; test -f \"$HARD_LINK2\" || HARD_LINK2=\"test-output/hardlinks/hardlink2.txt\"; test -f \"$ORIGINAL\" || ORIGINAL=\"test-output/hardlinks/original.txt\"; (test -f \"$HARD_LINK1\" && test -f \"$ORIGINAL\" && echo 'Modified content' >> \"$HARD_LINK1\" 2>/dev/null && cat \"$ORIGINAL\" > /dev/null 2>&1 && echo '✅ PASS: Hard links test (with -H) completed') || echo '⚠️ WARN: Hard links extraction may have issues' && echo -e '\\n--- Creating ZIP without -H (store as copies) ---' && npx ts-node src/neozip.ts output/hardlinks-copies.nzip test-hardlinks/* && echo -e '\\n--- Extracting without -H (separate files) ---' && mkdir -p test-output/hardlinks-copies && npx ts-node src/neounzip.ts output/hardlinks-copies.nzip test-output/hardlinks-copies/ && echo -e '\\n--- Extracted files (different inodes) ---' && ls -li test-output/hardlinks-copies/test-hardlinks/ 2>/dev/null || ls -li test-output/hardlinks-copies/ && echo -e '\\n=== TEST SUMMARY ===' && (test -f test-output/hardlinks-copies/test-hardlinks/original.txt 2>/dev/null || test -f test-output/hardlinks-copies/original.txt 2>/dev/null) && echo '✅ PASS: Hard links test completed successfully' || echo '❌ FAIL: Some hard link tests failed' && rm -rf test-hardlinks && rm -rf test-output/hardlinks* 2>/dev/null; rm -rf output/hardlinks*.nzip 2>/dev/null",
106
+ "test:stdin": "echo '=== Testing Stdin Filenames ===' && mkdir -p test-stdin && echo 'Test file 1' > test-stdin/file1.txt && echo 'Test file 2' > test-stdin/file2.txt && echo 'Test file 3' > test-stdin/file3.txt && echo '' && echo '--- Testing stdin filenames with -@ ---' && printf 'test-stdin/file1.txt\\ntest-stdin/file2.txt\\ntest-stdin/file3.txt\\n' | npx ts-node src/neozip.ts -@ test-stdin.zip && echo '' && echo '--- Verifying archive contents ---' && npx ts-node src/neolist.ts test-stdin.zip && echo '' && echo '--- Testing with find command ---' && find test-stdin -name '*.txt' | npx ts-node src/neozip.ts -@ test-stdin-find.zip && npx ts-node src/neolist.ts test-stdin-find.zip && echo '' && echo '--- Cleanup ---' && rm -rf test-stdin test-stdin.zip test-stdin-find.zip && echo '✅ Stdin filenames test completed successfully!'",
107
+ "test:eocd": "npx ts-node test-scripts/test-eocd-loading.ts",
108
+ "test:copy-entry": "npx ts-node test-scripts/test-copy-entry-streaming.ts",
109
+ "test:tampered-zip": "npx ts-node test-scripts/test-tampered-verification.ts",
110
+ "test:upgrade-zip": "echo '=== Testing ZIP Upgrade ===' && mkdir -p output && echo '' && echo '--- Creating initial ZIP with Calgary corpus files (deflate compression) ---' && npx ts-node src/neozip.ts --deflate output/test-upgrade.nzip test-suite/calgary/bib test-suite/calgary/book1 test-suite/calgary/book2 && echo '' && echo '--- Upgrading ZIP for tokenization ---' && npx ts-node src/neozip.ts --upgrade output/test-upgrade.nzip && echo '' && echo '--- Listing upgraded ZIP contents ---' && npx ts-node src/neolist.ts output/test-upgrade-tokenized.nzip && echo '' && echo '--- Verifying upgraded ZIP with neounzip -t ---' && npx ts-node src/neounzip.ts -t output/test-upgrade-tokenized.nzip && echo '' && echo '✅ ZIP upgrade test completed successfully!'",
111
+ "test:pre-verify": "echo '=== Testing Pre-Verify Option (-T) ===' && echo '' && echo '--- Testing pre-verify on tokenized ZIP ---' && npx ts-node src/neounzip.ts -T output/test-upgrade-tokenized.nzip test-output/preverify/ && echo '' && echo '--- Testing pre-verify on non-tokenized ZIP ---' && npx ts-node src/neozip.ts --deflate output/test-preverify-nontoken.nzip test-suite/calgary/bib test-suite/calgary/book1 test-suite/calgary/book2 && npx ts-node src/neounzip.ts -T output/test-preverify-nontoken.nzip test-output/preverify-nontoken/ && rm -rf test-output/preverify* output/test-preverify-nontoken.nzip 2>/dev/null && echo '' && echo '✅ Pre-verify test completed successfully!'",
112
+ "test:package": "node scripts/test-package.js",
113
+ "sync:neozipkit": "echo '📦 Syncing local neozipkit to external ../neozipkit...' && rsync -av --delete neozipkit/src/ ../neozipkit/src/ && rsync -av neozipkit/package.json ../neozipkit/package.json && rsync -av neozipkit/tsconfig.json ../neozipkit/tsconfig.json && echo '✅ Successfully synced neozipkit to ../neozipkit'",
114
+ "update:neozipkit": "echo '📥 Updating local neozipkit from external ../neozipkit...' && rsync -av --delete ../neozipkit/src/ neozipkit/src/ && rsync -av ../neozipkit/package.json neozipkit/package.json && rsync -av ../neozipkit/tsconfig.json neozipkit/tsconfig.json && echo '✅ Successfully updated neozipkit from ../neozipkit'",
115
+ "switch:neozipkit:local": "node scripts/switch-neozipkit.js local",
116
+ "switch:neozipkit:external": "node scripts/switch-neozipkit.js external",
117
+ "switch:neozipkit:status": "node scripts/switch-neozipkit.js status"
118
+ },
119
+ "keywords": [
120
+ "zip",
121
+ "compression",
122
+ "neozip",
123
+ "blockchain",
124
+ "tokenization",
125
+ "archive",
126
+ "file-compression",
127
+ "ethereum",
128
+ "web3",
129
+ "opentimestamps",
130
+ "encryption",
131
+ "pkzip",
132
+ "zip64"
133
+ ],
134
+ "author": "NeoWare",
135
+ "license": "MIT",
136
+ "dependencies": {
137
+ "@oneidentity/zstd-js": "^1.0.3",
138
+ "chalk": "^4.1.2",
139
+ "commander": "^11.1.0",
140
+ "dotenv": "^17.2.1",
141
+ "ethers": "^6.0.0",
142
+ "inquirer": "^8.2.6",
143
+ "neozipkit": "file:./neozipkit",
144
+ "minimatch": "^10.0.3",
145
+ "moment": "^2.29.4",
146
+ "moment-timezone": "^0.5.43",
147
+ "opentimestamps": "^0.4.9",
148
+ "ora": "^5.4.1",
149
+ "pako": "^2.1.0",
150
+ "ts-node": "^10.9.1",
151
+ "typescript": "^5.0.0",
152
+ "uuid": "^9.0.0",
153
+ "web3": "^4.0.0"
154
+ },
155
+ "devDependencies": {
156
+ "@types/chalk": "^2.2.4",
157
+ "@types/inquirer": "^9.0.9",
158
+ "@types/minimatch": "^5.1.2",
159
+ "@types/node": "^24.5.1",
160
+ "@types/ora": "^3.2.0",
161
+ "@types/uuid": "^10.0.0"
162
+ },
163
+ "engines": {
164
+ "node": ">=16.0.0"
165
+ },
166
+ "repository": {
167
+ "type": "git",
168
+ "url": "https://github.com/NeoWareInc/neozip-cli.git"
169
+ },
170
+ "bugs": {
171
+ "url": "https://github.com/NeoWareInc/neozip-support/issues"
172
+ },
173
+ "homepage": "https://github.com/NeoWareInc/neozip-cli#readme",
174
+ "packageManager": "yarn@4.9.2+sha512.1fc009bc09d13cfd0e19efa44cbfc2b9cf6ca61482725eb35bbc5e257e093ebf4130db6dfe15d604ff4b79efd8e1e8e99b25fa7d0a6197c9f9826358d4d65c3c"
175
+ }