@bf6mods/cli 1.0.1 → 1.1.0

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.
@@ -1,145 +1,144 @@
1
- import type { ConfigType } from "@bf6mods/sdk";
2
-
3
- export enum MapId {
4
- FireStorm = "MP_FireStorm-ModBuilderCustom0",
5
- SiegeOfCairo = "MP_Abbasid-ModBuilderCustom0",
6
- EmpireState = "MP_Aftermath-ModBuilderCustom0",
7
- IberianOffensive = "MP_Battery-ModBuilderCustom0",
8
- LiberationPeak = "MP_Capstone-ModBuilderCustom0",
9
- ManhattanBridge = "MP_Dumbo-ModBuilderCustom0",
10
- SaintsQuarter = "MP_Limestone-ModBuilderCustom0",
11
- NewSobekCity = "MP_Outskirts-ModBuilderCustom0",
12
- MirakValley = "MP_Tungsten-ModBuilderCustom0",
13
- }
14
-
15
- /**
16
- * Represents the root configuration for a Battlefield 6 mod project.
17
- *
18
- * This file combines both build-level settings (like entrypoints and output directories)
19
- * and in-game configuration data (such as mutators and asset restrictions)
20
- * under the `game` key.
21
- *
22
- * Use {@link defineBf6Config} to define and validate this structure
23
- * in your `bf6.config.ts` file.
24
- */
25
- export type Bf6Config = {
26
- /**
27
- * The human-readable name of the mod.
28
- *
29
- * Typically matches the project name used in the BF6 mod editor or
30
- * the display name shown in the in-game mod browser.
31
- */
32
- name: string;
33
-
34
- /**
35
- * A short description of the mod’s purpose or content.
36
- * Used for display and metadata purposes.
37
- */
38
- description: string;
39
-
40
- /**
41
- * The output directory where compiled or bundled files are written.
42
- * Usually something like `"dist"` or `"build"`.
43
- */
44
- outDir: string;
45
-
46
- /**
47
- * Whether or not to output the built files like the entrypoint typescript file
48
- */
49
- outputArtifacts?: boolean;
50
-
51
- /**
52
- * The main entrypoint for your mod’s TypeScript source file.
53
- *
54
- * This is typically something like `"src/index.ts"` or `"src/main.ts"`.
55
- */
56
- entrypoint?: string;
57
-
58
- /**
59
- * One or more scene file paths (.json) that the mod includes.
60
- * Can be a single string or an array of paths.
61
- * Can be a directory if single string provided
62
- */
63
- scenes?: [MapId, string][];
64
-
65
- /**
66
- * Path to a JSON file or other source that defines localized strings
67
- * used by the mod (optional).
68
- */
69
- strings?: string;
70
-
71
- /**
72
- * Generate strings automatically
73
- */
74
- generateStrings?: boolean;
75
-
76
- /**
77
- * Controls whether build output should be minified.
78
- *
79
- * Can be a boolean (to toggle all minification),
80
- * or an object specifying independent settings for JS and JSON files.
81
- *
82
- * @example
83
- * ```ts
84
- * minify: true
85
- * // or
86
- * minify: { js: true, json: false }
87
- * ```
88
- */
89
- minify?:
90
- | {
91
- /** Whether to minify JavaScript output. */
92
- js?: boolean;
93
- /** Whether to minify JSON output. */
94
- json?: boolean;
95
- }
96
- /** Enables or disables all minification. */
97
- | boolean;
98
-
99
- /**
100
- * The underlying in-game configuration derived from `ConfigType`
101
- * in the BF6 SDK. Includes gameplay-level details like mutators,
102
- * asset restrictions, and team compositions.
103
- *
104
- * The following properties are **excluded**:
105
- * - `attachments`
106
- * - `workspace`
107
- * - `mapRotation`
108
- * - `name`
109
- * - `description`
110
- *
111
- * since those are either redundant or handled elsewhere.
112
- */
113
- game: Omit<
114
- ConfigType,
115
- "attachments" | "workspace" | "mapRotation" | "name" | "description"
116
- >;
117
- };
118
-
119
- /**
120
- * Defines and validates a Battlefield 6 mod configuration object.
121
- *
122
- * This helper ensures your config is properly typed and can be
123
- * statically analyzed by TypeScript.
124
- *
125
- * @example
126
- * ```ts
127
- * export default defineBf6Config({
128
- * name: "My Custom Mod",
129
- * description: "Adds custom rules",
130
- * outDir: "dist",
131
- * entrypoint: "src/main.ts",
132
- * game: {
133
- * mutators: [],
134
- * assetRestrictions: {},
135
- * teamComposition: [],
136
- * },
137
- * });
138
- * ```
139
- *
140
- * @param bf6Config The configuration object to validate and return.
141
- * @returns The validated Battlefield 6 configuration object.
142
- */
143
- export function defineBf6Config(bf6Config: Bf6Config): Bf6Config {
144
- return bf6Config;
145
- }
1
+ import type { ConfigType } from "@bf6mods/sdk";
2
+
3
+ export enum MapId {
4
+ FireStorm = "MP_FireStorm-ModBuilderCustom0",
5
+ SiegeOfCairo = "MP_Abbasid-ModBuilderCustom0",
6
+ EmpireState = "MP_Aftermath-ModBuilderCustom0",
7
+ IberianOffensive = "MP_Battery-ModBuilderCustom0",
8
+ LiberationPeak = "MP_Capstone-ModBuilderCustom0",
9
+ ManhattanBridge = "MP_Dumbo-ModBuilderCustom0",
10
+ SaintsQuarter = "MP_Limestone-ModBuilderCustom0",
11
+ NewSobekCity = "MP_Outskirts-ModBuilderCustom0",
12
+ MirakValley = "MP_Tungsten-ModBuilderCustom0",
13
+ }
14
+
15
+ /**
16
+ * Represents the root configuration for a Battlefield 6 mod project.
17
+ *
18
+ * This file combines both build-level settings (like entrypoints and output directories)
19
+ * and in-game configuration data (such as mutators and asset restrictions)
20
+ * under the `game` key.
21
+ *
22
+ * Use {@link defineBf6Config} to define and validate this structure
23
+ * in your `bf6.config.ts` file.
24
+ */
25
+ export type Bf6Config = {
26
+ /**
27
+ * The human-readable name of the mod.
28
+ *
29
+ * Typically matches the project name used in the BF6 mod editor or
30
+ * the display name shown in the in-game mod browser.
31
+ */
32
+ name: string;
33
+
34
+ /**
35
+ * A short description of the mod’s purpose or content.
36
+ * Used for display and metadata purposes.
37
+ */
38
+ description: string;
39
+
40
+ /**
41
+ * The output directory where compiled or bundled files are written.
42
+ * Usually something like `"dist"` or `"build"`.
43
+ */
44
+ outDir: string;
45
+
46
+ /**
47
+ * Whether or not to output the built files like the entrypoint typescript file
48
+ */
49
+ outputArtifacts?: boolean;
50
+
51
+ /**
52
+ * The main entrypoint for your mod’s TypeScript source file.
53
+ *
54
+ * This is typically something like `"src/index.ts"` or `"src/main.ts"`.
55
+ */
56
+ entrypoint?: string;
57
+
58
+ /**
59
+ * One or more scene file paths (.json) that the mod includes.
60
+ * If no file path is provided, it loads in the default spatial data.
61
+ */
62
+ scenes?: ([MapId, string] | MapId)[];
63
+
64
+ /**
65
+ * Path to a JSON file or other source that defines localized strings
66
+ * used by the mod (optional).
67
+ */
68
+ strings?: string;
69
+
70
+ /**
71
+ * Generate strings automatically, by default this is enabled
72
+ */
73
+ generateStrings?: boolean;
74
+
75
+ /**
76
+ * Controls whether build output should be minified.
77
+ *
78
+ * Can be a boolean (to toggle all minification),
79
+ * or an object specifying independent settings for JS and JSON files.
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * minify: true
84
+ * // or
85
+ * minify: { js: true, json: false }
86
+ * ```
87
+ */
88
+ minify?:
89
+ | {
90
+ /** Whether to minify JavaScript output. */
91
+ js?: boolean;
92
+ /** Whether to minify JSON output. */
93
+ json?: boolean;
94
+ }
95
+ /** Enables or disables all minification. */
96
+ | boolean;
97
+
98
+ /**
99
+ * The underlying in-game configuration derived from `ConfigType`
100
+ * in the BF6 SDK. Includes gameplay-level details like mutators,
101
+ * asset restrictions, and team compositions.
102
+ *
103
+ * The following properties are **excluded**:
104
+ * - `attachments`
105
+ * - `workspace`
106
+ * - `mapRotation`
107
+ * - `name`
108
+ * - `description`
109
+ *
110
+ * since those are either redundant or handled elsewhere.
111
+ */
112
+ game: Omit<
113
+ ConfigType,
114
+ "attachments" | "workspace" | "mapRotation" | "name" | "description"
115
+ >;
116
+ };
117
+
118
+ /**
119
+ * Defines and validates a Battlefield 6 mod configuration object.
120
+ *
121
+ * This helper ensures your config is properly typed and can be
122
+ * statically analyzed by TypeScript.
123
+ *
124
+ * @example
125
+ * ```ts
126
+ * export default defineBf6Config({
127
+ * name: "My Custom Mod",
128
+ * description: "Adds custom rules",
129
+ * outDir: "dist",
130
+ * entrypoint: "src/main.ts",
131
+ * game: {
132
+ * mutators: [],
133
+ * assetRestrictions: {},
134
+ * teamComposition: [],
135
+ * },
136
+ * });
137
+ * ```
138
+ *
139
+ * @param bf6Config The configuration object to validate and return.
140
+ * @returns The validated Battlefield 6 configuration object.
141
+ */
142
+ export function defineBf6Config(bf6Config: Bf6Config): Bf6Config {
143
+ return bf6Config;
144
+ }
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "type": "module",
9
9
  "devDependencies": {
10
- "@bf6mods/cli": "^1.0.1",
11
- "@bf6mods/sdk": "^1.0.1"
10
+ "@bf6mods/cli": "^1.0.2",
11
+ "@bf6mods/sdk": "^1.0.2"
12
12
  }
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bf6mods/cli",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "CLI and library for bundling BF6 mods",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -27,7 +27,7 @@
27
27
  "url": "git+https://github.com/bf6mods/bf6mods.git"
28
28
  },
29
29
  "dependencies": {
30
- "@bf6mods/sdk": "1.0.2",
30
+ "@bf6mods/sdk": "1.0.3",
31
31
  "@clack/prompts": "^0.11.0",
32
32
  "chokidar": "^4.0.3",
33
33
  "colors": "^1.4.0",
@@ -41,6 +41,7 @@
41
41
  "access": "public"
42
42
  },
43
43
  "devDependencies": {
44
+ "@oxc-project/types": "^0.95.0",
44
45
  "@types/stringify-object": "^4.0.5",
45
46
  "cross-env": "^10.1.0",
46
47
  "tsx": "^4.20.6"