msfs-layout-generator 0.1.0 → 0.1.2

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/cli.js CHANGED
@@ -80,28 +80,28 @@ program
80
80
  .action(async (directories, options) => {
81
81
  await handleAction(directories, options);
82
82
  })
83
- .addHelpText('after', `
84
- ${chalk_1.default.bold('Examples:')}
85
- ${chalk_1.default.dim('# Process a single package')}
86
- msfs-layout "F:\\fs20\\Community\\fnx-aircraft_CFM_DAEWPUG_B2"
87
-
88
- ${chalk_1.default.dim('# Process multiple packages')}
89
- msfs-layout "package1" "package2" "package3"
90
-
91
- ${chalk_1.default.dim('# Process current directory')}
92
- msfs-layout .
93
-
94
- ${chalk_1.default.dim('# Force overwrite existing layout.json')}
95
- msfs-layout ./my-package --force
96
-
97
- ${chalk_1.default.dim('# Quiet mode - minimal output')}
98
- msfs-layout ./my-package --quiet
99
-
100
- ${chalk_1.default.bold('Notes:')}
101
- • Each directory should contain a ${chalk_1.default.cyan('manifest.json')} file
102
- • Creates/updates ${chalk_1.default.cyan('layout.json')} in the same directory
103
- • Automatically excludes ${chalk_1.default.yellow('_CVT_')} directories
104
- • Updates ${chalk_1.default.cyan('total_package_size')} in manifest.json
83
+ .addHelpText('after', `
84
+ ${chalk_1.default.bold('Examples:')}
85
+ ${chalk_1.default.dim('# Process a single package')}
86
+ msfs-layout "C:\\Route To your\\Community\\Folder"
87
+
88
+ ${chalk_1.default.dim('# Process multiple packages')}
89
+ msfs-layout "First root" "Second root" "Third one"
90
+
91
+ ${chalk_1.default.dim('# Process current directory')}
92
+ msfs-layout .
93
+
94
+ ${chalk_1.default.dim('# Force overwrite existing layout.json')}
95
+ msfs-layout ./my-package --force
96
+
97
+ ${chalk_1.default.dim('# Quiet mode - minimal output')}
98
+ msfs-layout ./my-package --quiet
99
+
100
+ ${chalk_1.default.bold('Notes:')}
101
+ • Each directory should contain a ${chalk_1.default.cyan('manifest.json')} file
102
+ • Creates/updates ${chalk_1.default.cyan('layout.json')} in the same directory
103
+ • Automatically excludes ${chalk_1.default.yellow('_CVT_')} directories
104
+ • Updates ${chalk_1.default.cyan('total_package_size')} in manifest.json
105
105
  `);
106
106
  // Handle the main action
107
107
  async function handleAction(directories, options) {
package/package.json CHANGED
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "name": "msfs-layout-generator",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Generate layout.json for MSFS community packages",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/p-sergienko/msfs-layout-generator.git"
8
+ },
5
9
  "main": "./dist/index.cjs",
6
10
  "module": "./dist/index.js",
7
11
  "types": "./dist/index.d.ts",
@@ -27,17 +31,17 @@
27
31
  },
28
32
  "devDependencies": {
29
33
  "@types/bun": "latest",
30
- "tsc-alias": "^1.8.16"
34
+ "tsc-alias": "^1.8.16",
35
+ "@types/node": "^25.0.3",
36
+ "ts-node": "^10.9.2",
37
+ "tsconfig-paths": "^4.2.0"
31
38
  },
32
39
  "peerDependencies": {
33
40
  "typescript": "^5.9.3"
34
41
  },
35
42
  "dependencies": {
36
- "@types/node": "^25.0.3",
37
43
  "chalk": "^5.6.2",
38
44
  "commander": "^14.0.2",
39
- "glob": "^13.0.0",
40
- "ts-node": "^10.9.2",
41
- "tsconfig-paths": "^4.2.0"
45
+ "glob": "^13.0.0"
42
46
  }
43
47
  }
package/dist/cli.d.ts DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1 +0,0 @@
1
- export declare const excludedFiles: Set<string>;
@@ -1,3 +0,0 @@
1
- export declare class ManifestWritingError extends Error {
2
- constructor(message: string);
3
- }
@@ -1,3 +0,0 @@
1
- export declare class ReadingDirError extends Error {
2
- constructor(message: string);
3
- }
@@ -1,3 +0,0 @@
1
- export declare class ReadingJsonError extends Error {
2
- constructor(message: string);
3
- }
@@ -1,4 +0,0 @@
1
- import { ReadingJsonError } from "./ReadingJsonError";
2
- import { ReadingDirError } from "./ReadingDirError";
3
- import { ManifestWritingError } from "./ManifestWritingError";
4
- export { ReadingJsonError, ReadingDirError, ManifestWritingError };
package/dist/index.d.ts DELETED
@@ -1,26 +0,0 @@
1
- /**
2
- * Process an MSFS package directory to generate/update layout.json
3
- *
4
- * This function scans all files in the package directory, creates a layout.json
5
- * with file metadata, and updates the total_package_size in manifest.json.
6
- *
7
- * @param packageDir - Path to the MSFS package directory (must contain manifest.json)
8
- * @returns Promise that resolves when layout.json has been generated
9
- *
10
- * @throws {Error} If package directory doesn't exist or doesn't contain manifest.json
11
- * @throws {Error} If no valid files are found in the package
12
- *
13
- * @example
14
- * // Basic usage
15
- * await doProcessLayoutFile("F:\\fs20\\Community\\my-package");
16
- *
17
- * @example
18
- * // With error handling
19
- * try {
20
- * await generateLayout("./my-package");
21
- * console.log("Layout generated successfully");
22
- * } catch (error) {
23
- * console.error("Failed:", error.message);
24
- * }
25
- */
26
- export declare const generateLayout: (layoutPath: string) => Promise<void>;
@@ -1 +0,0 @@
1
- export declare const doExcludeFile: (relativePath: string) => boolean;
@@ -1 +0,0 @@
1
- export declare const doProcessLayoutFile: (layoutPath: string) => Promise<void>;
@@ -1 +0,0 @@
1
- export declare const doUpdateManifest: (manifestPath: string, totalPackageSize: number) => Promise<void>;
@@ -1 +0,0 @@
1
- export declare const getAllFiles: (dirPath: string) => Promise<string[]>;
@@ -1 +0,0 @@
1
- export declare const getWindowsFileTime: (date: Date) => number;
@@ -1 +0,0 @@
1
- export declare function readJson<T = unknown>(path: string): Promise<T | null>;