@pixzle/cli 0.0.24 → 0.0.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixzle/cli",
3
- "version": "0.0.21",
3
+ "version": "0.0.20",
4
4
  "description": "CLI implementation of image fragmentation and restoration",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",
@@ -18,7 +18,16 @@
18
18
  "test:watch": "vitest",
19
19
  "dev": "tsx src/cli.ts"
20
20
  },
21
- "keywords": [],
21
+ "keywords": [
22
+ "pixzle",
23
+ "image",
24
+ "fragmentation",
25
+ "restoration",
26
+ "shuffle",
27
+ "obfuscation",
28
+ "cli",
29
+ "tool"
30
+ ],
22
31
  "author": "tuki0918",
23
32
  "repository": {
24
33
  "type": "git",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixzle/cli",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "description": "CLI implementation of image fragmentation and restoration",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",
@@ -33,8 +33,8 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "commander": "^12.1.0",
36
- "@pixzle/core": "0.0.24",
37
- "@pixzle/node": "0.0.24"
36
+ "@pixzle/core": "0.0.25",
37
+ "@pixzle/node": "0.0.25"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/node": "^22.10.1",
package/dist/cli.d.ts DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
package/dist/cli.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js DELETED
@@ -1,27 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- const commander_1 = require("commander");
5
- const restore_1 = require("./commands/restore");
6
- const shuffle_1 = require("./commands/shuffle");
7
- const constants_1 = require("./constants");
8
- const program = new commander_1.Command();
9
- program
10
- .name("pixzle")
11
- .description("CLI tool for image fragmentation and restoration")
12
- .version(constants_1.VERSION);
13
- // Register commands
14
- (0, shuffle_1.registerShuffleCommand)(program);
15
- (0, restore_1.registerRestoreCommand)(program);
16
- // Error handling
17
- program.on("command:*", () => {
18
- console.error("Invalid command. See --help for available commands.");
19
- process.exit(1);
20
- });
21
- // Parse arguments
22
- program.parse(process.argv);
23
- // Show help if no command provided
24
- if (process.argv.length <= 2) {
25
- program.help();
26
- }
27
- //# sourceMappingURL=cli.js.map
package/dist/cli.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,gDAA4D;AAC5D,gDAA4D;AAC5D,2CAAsC;AAEtC,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CAAC,kDAAkD,CAAC;KAC/D,OAAO,CAAC,mBAAO,CAAC,CAAC;AAEpB,oBAAoB;AACpB,IAAA,gCAAsB,EAAC,OAAO,CAAC,CAAC;AAChC,IAAA,gCAAsB,EAAC,OAAO,CAAC,CAAC;AAEhC,iBAAiB;AACjB,OAAO,CAAC,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE;IAC3B,OAAO,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACrE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,kBAAkB;AAClB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,mCAAmC;AACnC,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;IAC7B,OAAO,CAAC,IAAI,EAAE,CAAC;AACjB,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { Command } from "commander";
2
- /**
3
- * Configures and registers the restore command
4
- * @param program Commander program instance
5
- */
6
- export declare function registerRestoreCommand(program: Command): void;
@@ -1 +0,0 @@
1
- {"version":3,"file":"restore.d.ts","sourceRoot":"","sources":["../../src/commands/restore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQzC;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAQ7D"}
@@ -1,56 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.registerRestoreCommand = registerRestoreCommand;
16
- const node_1 = __importDefault(require("@pixzle/node"));
17
- const validators_1 = require("../validators");
18
- /**
19
- * Configures and registers the restore command
20
- * @param program Commander program instance
21
- */
22
- function registerRestoreCommand(program) {
23
- program
24
- .command("restore")
25
- .description("Restore fragmented images")
26
- .argument("<fragments...>", "Fragment file paths")
27
- .requiredOption("-m, --manifest <path>", "Manifest file path")
28
- .requiredOption("-o, --output <dir>", "Output directory")
29
- .action(handleRestoreCommand);
30
- }
31
- /**
32
- * Handles the restore command execution
33
- * @param fragments Array of fragment file paths
34
- * @param options Command options
35
- */
36
- function handleRestoreCommand(fragments, options) {
37
- return __awaiter(this, void 0, void 0, function* () {
38
- try {
39
- console.log("🔀 Starting image restoration...");
40
- const imagePaths = (0, validators_1.validateImagePaths)(fragments);
41
- const manifestPath = (0, validators_1.validateManifestPath)(options.manifest);
42
- const outputDir = (0, validators_1.validateOutputDirectory)(options.output);
43
- yield node_1.default.restore({
44
- imagePaths,
45
- manifestPath,
46
- outputDir,
47
- });
48
- console.log(`✅ Images restored successfully to: ${outputDir}`);
49
- }
50
- catch (error) {
51
- console.error(`❌ Restoration failed: ${error instanceof Error ? error.message : String(error)}`);
52
- process.exit(1);
53
- }
54
- });
55
- }
56
- //# sourceMappingURL=restore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"restore.js","sourceRoot":"","sources":["../../src/commands/restore.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAaA,wDAQC;AArBD,wDAAkC;AAGlC,8CAIuB;AAEvB;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,OAAgB;IACrD,OAAO;SACJ,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,2BAA2B,CAAC;SACxC,QAAQ,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;SACjD,cAAc,CAAC,uBAAuB,EAAE,oBAAoB,CAAC;SAC7D,cAAc,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;SACxD,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAClC,CAAC;AAED;;;;GAIG;AACH,SAAe,oBAAoB,CACjC,SAAmB,EACnB,OAAuB;;QAEvB,IAAI,CAAC;YACH,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;YAEhD,MAAM,UAAU,GAAG,IAAA,+BAAkB,EAAC,SAAS,CAAC,CAAC;YACjD,MAAM,YAAY,GAAG,IAAA,iCAAoB,EAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAC5D,MAAM,SAAS,GAAG,IAAA,oCAAuB,EAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAE1D,MAAM,cAAM,CAAC,OAAO,CAAC;gBACnB,UAAU;gBACV,YAAY;gBACZ,SAAS;aACV,CAAC,CAAC;YAEH,OAAO,CAAC,GAAG,CAAC,sCAAsC,SAAS,EAAE,CAAC,CAAC;QACjE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CACX,yBAAyB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAClF,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;CAAA"}
@@ -1,6 +0,0 @@
1
- import type { Command } from "commander";
2
- /**
3
- * Configures and registers the shuffle command
4
- * @param program Commander program instance
5
- */
6
- export declare function registerShuffleCommand(program: Command): void;
@@ -1 +0,0 @@
1
- {"version":3,"file":"shuffle.d.ts","sourceRoot":"","sources":["../../src/commands/shuffle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA2B7D"}
@@ -1,82 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.registerShuffleCommand = registerShuffleCommand;
16
- const node_1 = __importDefault(require("@pixzle/node"));
17
- const validators_1 = require("../validators");
18
- /**
19
- * Configures and registers the shuffle command
20
- * @param program Commander program instance
21
- */
22
- function registerShuffleCommand(program) {
23
- program
24
- .command("shuffle")
25
- .description("Fragment images")
26
- .argument("<images...>", "Input image file paths")
27
- .requiredOption("-o, --output <dir>", "Output directory")
28
- .option("-b, --block-size <size>", "Pixel block size", (value) => {
29
- const num = Number.parseInt(value, 10);
30
- if (Number.isNaN(num) || num <= 0) {
31
- throw new Error("Block size must be a positive integer");
32
- }
33
- return num;
34
- })
35
- .option("-p, --prefix <prefix>", "Prefix for fragment files")
36
- .option("-s, --seed <seed>", "Random seed", (value) => {
37
- const num = Number.parseInt(value, 10);
38
- if (Number.isNaN(num)) {
39
- throw new Error("Seed must be an integer");
40
- }
41
- return num;
42
- })
43
- .option("--preserve-name", "Preserve original file names")
44
- .option("--cross-image-shuffle", "Shuffle blocks across all images instead of within each image independently")
45
- .action(handleShuffleCommand);
46
- }
47
- /**
48
- * Handles the shuffle command execution
49
- * @param images Array of image file paths
50
- * @param options Command options
51
- */
52
- function handleShuffleCommand(images, options) {
53
- return __awaiter(this, void 0, void 0, function* () {
54
- try {
55
- console.log("🔀 Starting image fragmentation...");
56
- const imagePaths = (0, validators_1.validateImagePaths)(images);
57
- const outputDir = (0, validators_1.validateOutputDirectory)(options.output);
58
- const config = {};
59
- if (options.blockSize !== undefined)
60
- config.blockSize = options.blockSize;
61
- if (options.prefix !== undefined)
62
- config.prefix = options.prefix;
63
- if (options.seed !== undefined)
64
- config.seed = options.seed;
65
- if (options.preserveName)
66
- config.preserveName = true;
67
- if (options.crossImageShuffle)
68
- config.crossImageShuffle = true;
69
- yield node_1.default.shuffle({
70
- imagePaths,
71
- outputDir,
72
- config: Object.keys(config).length > 0 ? config : undefined,
73
- });
74
- console.log(`✅ Images fragmented successfully to: ${outputDir}`);
75
- }
76
- catch (error) {
77
- console.error(`❌ Fragmentation failed: ${error instanceof Error ? error.message : String(error)}`);
78
- process.exit(1);
79
- }
80
- });
81
- }
82
- //# sourceMappingURL=shuffle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shuffle.js","sourceRoot":"","sources":["../../src/commands/shuffle.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAUA,wDA2BC;AApCD,wDAAkC;AAGlC,8CAA4E;AAE5E;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,OAAgB;IACrD,OAAO;SACJ,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,iBAAiB,CAAC;SAC9B,QAAQ,CAAC,aAAa,EAAE,wBAAwB,CAAC;SACjD,cAAc,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;SACxD,MAAM,CAAC,yBAAyB,EAAE,kBAAkB,EAAE,CAAC,KAAa,EAAE,EAAE;QACvE,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACvC,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,CAAC;SACD,MAAM,CAAC,uBAAuB,EAAE,2BAA2B,CAAC;SAC5D,MAAM,CAAC,mBAAmB,EAAE,aAAa,EAAE,CAAC,KAAa,EAAE,EAAE;QAC5D,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACvC,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,CAAC;SACD,MAAM,CAAC,iBAAiB,EAAE,8BAA8B,CAAC;SACzD,MAAM,CACL,uBAAuB,EACvB,6EAA6E,CAC9E;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AC,KAAK,CAAC,EAAE,CACpF,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;CAAA"}
@@ -1 +0,0 @@
1
- export declare const VERSION: any;
package/dist/constants.js DELETED
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VERSION = void 0;
4
- const package_json_1 = require("../package.json");
5
- exports.VERSION = package_json_1.version;
6
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA,kDAA0C;AAE7B,QAAA,OAAO,GAAG,sBAAO,CAAC"}
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export { default as Pixzle } from "@pixzle/node";
2
- export type { FragmentationConfig } from "@pixzle/core";
3
- export type { RestoreOptions, ShuffleOptions } from "./types";
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AACjD,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
package/dist/index.js DELETED
@@ -1,10 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Pixzle = void 0;
7
- // Export CLI functionality for programmatic usage if needed
8
- var node_1 = require("@pixzle/node");
9
- Object.defineProperty(exports, "Pixzle", { enumerable: true, get: function () { return __importDefault(node_1).default; } });
10
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4D;AAC5D,qCAAiD;AAAxC,+GAAA,OAAO,OAAU"}
@@ -1,3 +0,0 @@
1
- export { default as Pixzle } from "@pixzle/node";
2
- export type { FragmentationConfig } from "@pixzle/core";
3
- export type { RestoreOptions, ShuffleOptions } from "./types";
package/dist/src/index.js DELETED
@@ -1,10 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Pixzle = void 0;
7
- // Export CLI functionality for programmatic usage if needed
8
- var node_1 = require("@pixzle/node");
9
- Object.defineProperty(exports, "Pixzle", { enumerable: true, get: function () { return __importDefault(node_1).default; } });
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4D;AAC5D,qCAAiD;AAAxC,+GAAA,OAAO,OAAU"}
package/dist/types.d.ts DELETED
@@ -1,12 +0,0 @@
1
- export interface ShuffleOptions {
2
- output: string;
3
- blockSize?: number;
4
- prefix?: string;
5
- seed?: number;
6
- preserveName?: boolean;
7
- crossImageShuffle?: boolean;
8
- }
9
- export interface RestoreOptions {
10
- manifest: string;
11
- output: string;
12
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB"}
package/dist/types.js DELETED
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
package/dist/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -1,18 +0,0 @@
1
- /**
2
- * Validates an array of image file paths
3
- * @param paths Array of file paths to validate
4
- * @returns Array of resolved absolute paths
5
- */
6
- export declare function validateImagePaths(paths: string[]): string[];
7
- /**
8
- * Validates output directory path
9
- * @param outputPath Output directory path
10
- * @returns Resolved absolute path
11
- */
12
- export declare function validateOutputDirectory(outputPath: string): string;
13
- /**
14
- * Validates manifest file path
15
- * @param manifestPath Path to manifest file
16
- * @returns Resolved absolute path
17
- */
18
- export declare function validateManifestPath(manifestPath: string): string;
@@ -1 +0,0 @@
1
- {"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../src/validators.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAoB5D;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAWlE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAcjE"}
@@ -1,61 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateImagePaths = validateImagePaths;
4
- exports.validateOutputDirectory = validateOutputDirectory;
5
- exports.validateManifestPath = validateManifestPath;
6
- const node_fs_1 = require("node:fs");
7
- const node_path_1 = require("node:path");
8
- /**
9
- * Validates an array of image file paths
10
- * @param paths Array of file paths to validate
11
- * @returns Array of resolved absolute paths
12
- */
13
- function validateImagePaths(paths) {
14
- const resolvedPaths = [];
15
- for (const path of paths) {
16
- const resolvedPath = (0, node_path_1.resolve)(path);
17
- if (!(0, node_fs_1.existsSync)(resolvedPath)) {
18
- console.error(`Error: File not found: ${path}`);
19
- process.exit(1);
20
- }
21
- if (!(0, node_fs_1.lstatSync)(resolvedPath).isFile()) {
22
- console.error(`Error: Not a file: ${path}`);
23
- process.exit(1);
24
- }
25
- resolvedPaths.push(resolvedPath);
26
- }
27
- return resolvedPaths;
28
- }
29
- /**
30
- * Validates output directory path
31
- * @param outputPath Output directory path
32
- * @returns Resolved absolute path
33
- */
34
- function validateOutputDirectory(outputPath) {
35
- const resolvedPath = (0, node_path_1.resolve)(outputPath);
36
- // Create parent directory if it doesn't exist
37
- const parentDir = (0, node_path_1.dirname)(resolvedPath);
38
- if (!(0, node_fs_1.existsSync)(parentDir)) {
39
- console.error(`Error: Parent directory does not exist: ${parentDir}`);
40
- process.exit(1);
41
- }
42
- return resolvedPath;
43
- }
44
- /**
45
- * Validates manifest file path
46
- * @param manifestPath Path to manifest file
47
- * @returns Resolved absolute path
48
- */
49
- function validateManifestPath(manifestPath) {
50
- const resolvedPath = (0, node_path_1.resolve)(manifestPath);
51
- if (!(0, node_fs_1.existsSync)(resolvedPath)) {
52
- console.error(`Error: Manifest file not found: ${manifestPath}`);
53
- process.exit(1);
54
- }
55
- if (!(0, node_fs_1.lstatSync)(resolvedPath).isFile()) {
56
- console.error(`Error: Manifest path is not a file: ${manifestPath}`);
57
- process.exit(1);
58
- }
59
- return resolvedPath;
60
- }
61
- //# sourceMappingURL=validators.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validators.js","sourceRoot":"","sources":["../src/validators.ts"],"names":[],"mappings":";;AAQA,gDAoBC;AAOD,0DAWC;AAOD,oDAcC;AAnED,qCAAgD;AAChD,yCAA6C;AAE7C;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,KAAe;IAChD,MAAM,aAAa,GAAa,EAAE,CAAC;IAEnC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,Y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