@ldgerrits/rogen 1.4.0 → 1.4.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/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <div>&nbsp;</div>
2
2
 
3
3
  <div align="center">
4
- <img src="docs/public/icon.png" alt="Rogen" width="100" />
4
+ <img src="https://raw.githubusercontent.com/LDGerrits/rogen/main/docs/public/icon.png" alt="Rogen" width="100" />
5
5
  </div>
6
6
 
7
7
  <div align="center">
@@ -10,9 +10,7 @@
10
10
 
11
11
  ---
12
12
 
13
- Bring feature-based architecture to Roblox.
14
- Build self-contained systems with client, server, and shared code in one place.
15
- Rogen routes every file to the correct Roblox service automatically.
13
+ A CLI tool enabling feature-based architecture through automated routing of client, server, and shared code to Roblox services.
16
14
 
17
15
  ## Features
18
16
 
package/dist/bundle.cjs CHANGED
@@ -8964,7 +8964,7 @@ var import_fs = __toESM(require("fs"), 1);
8964
8964
  var import_path = __toESM(require("path"), 1);
8965
8965
 
8966
8966
  // src/constants.ts
8967
- var version = "1.4.0";
8967
+ var version = "1.4.1";
8968
8968
  var defaultProject = {
8969
8969
  name: "roblox-game",
8970
8970
  tree: { $className: "DataModel" }
@@ -9507,7 +9507,7 @@ function getRojoBaseName(filename) {
9507
9507
  }
9508
9508
  function collapseFolders(node, buildDir, outputDir) {
9509
9509
  let childCount = 0;
9510
- let canCollapse = true;
9510
+ let canCollapse = node.$path === void 0;
9511
9511
  let commonDir = null;
9512
9512
  for (const key in node) {
9513
9513
  if (key.startsWith("$")) continue;
@@ -9566,7 +9566,7 @@ function findExposedDataFiles(node, exposed = []) {
9566
9566
  if (typeof val !== "object" || val === null) continue;
9567
9567
  const childNode = val;
9568
9568
  if (childNode.$path && isData(childNode.$path)) {
9569
- exposed.push(childNode.$path);
9569
+ exposed.push({ parent: node, key, path: childNode.$path });
9570
9570
  }
9571
9571
  findExposedDataFiles(childNode, exposed);
9572
9572
  }
@@ -10259,9 +10259,10 @@ async function execute(sourcePaths, env, activeModes, baseProjectTree, config, c
10259
10259
  const dropped = [];
10260
10260
  if (buildResult.exposedDataFiles.length > 0) {
10261
10261
  logger.warn(
10262
- `${getTimeStamp()} [${modeName}] Skipping project file generation. Rogen cannot map data files directly.`
10262
+ `${getTimeStamp()} [${modeName}] Ignored ${buildResult.exposedDataFiles.length} exposed data file(s). Rogen cannot map data files directly.`
10263
10263
  );
10264
- for (const exposedPath of buildResult.exposedDataFiles) {
10264
+ for (const exposed of buildResult.exposedDataFiles) {
10265
+ const exposedPath = exposed.path;
10265
10266
  const ext = import_path5.default.extname(exposedPath);
10266
10267
  const fileName = import_path5.default.basename(exposedPath);
10267
10268
  const baseName = fileName.substring(
@@ -10273,10 +10274,11 @@ async function execute(sourcePaths, env, activeModes, baseProjectTree, config, c
10273
10274
  ` - Cannot resolve data type "${ext}" for: "${exposedPath}"`
10274
10275
  );
10275
10276
  logger.info(
10276
- ` Fix: Wrap it in a folder (e.g., move it to "${dirName}/${baseName}/data${ext}")`
10277
+ ` Fix: Wrap it in a folder (e.g., move it to "${dirName}/${baseName}/data${ext}") or add it to 'globIgnorePaths' to suppress this warning.`
10277
10278
  );
10279
+ delete exposed.parent[exposed.key];
10280
+ dropped.push(`${exposed.key} ($path "${exposedPath}")`);
10278
10281
  }
10279
- continue;
10280
10282
  }
10281
10283
  if (buildResult.missingPaths.length > 0) {
10282
10284
  for (const item of buildResult.missingPaths) {
package/dist/constants.js CHANGED
@@ -1,4 +1,4 @@
1
- export const version = "1.4.0";
1
+ export const version = "1.4.1";
2
2
  export const defaultProject = {
3
3
  name: "roblox-game",
4
4
  tree: { $className: "DataModel" },
package/dist/execute.js CHANGED
@@ -10,16 +10,18 @@ export async function execute(sourcePaths, env, activeModes, baseProjectTree, co
10
10
  const buildResult = await build(targetConfig, baseProjectTree, config, env, sourcePaths, cliArgs, anchor);
11
11
  const dropped = [];
12
12
  if (buildResult.exposedDataFiles.length > 0) {
13
- logger.warn(`${getTimeStamp()} [${modeName}] Skipping project file generation. Rogen cannot map data files directly.`);
14
- for (const exposedPath of buildResult.exposedDataFiles) {
13
+ logger.warn(`${getTimeStamp()} [${modeName}] Ignored ${buildResult.exposedDataFiles.length} exposed data file(s). Rogen cannot map data files directly.`);
14
+ for (const exposed of buildResult.exposedDataFiles) {
15
+ const exposedPath = exposed.path;
15
16
  const ext = path.extname(exposedPath);
16
17
  const fileName = path.basename(exposedPath);
17
18
  const baseName = fileName.substring(0, fileName.length - ext.length);
18
19
  const dirName = path.dirname(exposedPath);
19
20
  logger.info(` - Cannot resolve data type "${ext}" for: "${exposedPath}"`);
20
- logger.info(` Fix: Wrap it in a folder (e.g., move it to "${dirName}/${baseName}/data${ext}")`);
21
+ logger.info(` Fix: Wrap it in a folder (e.g., move it to "${dirName}/${baseName}/data${ext}") or add it to 'globIgnorePaths' to suppress this warning.`);
22
+ delete exposed.parent[exposed.key];
23
+ dropped.push(`${exposed.key} ($path "${exposedPath}")`);
21
24
  }
22
- continue;
23
25
  }
24
26
  if (buildResult.missingPaths.length > 0) {
25
27
  for (const item of buildResult.missingPaths) {
package/dist/tree.js CHANGED
@@ -105,7 +105,7 @@ function getRojoBaseName(filename) {
105
105
  }
106
106
  export function collapseFolders(node, buildDir, outputDir) {
107
107
  let childCount = 0;
108
- let canCollapse = true;
108
+ let canCollapse = node.$path === undefined; // Prevent overwriting a folder with an explicit $path
109
109
  let commonDir = null;
110
110
  for (const key in node) {
111
111
  if (key.startsWith("$"))
@@ -174,7 +174,7 @@ export function findExposedDataFiles(node, exposed = []) {
174
174
  const childNode = val;
175
175
  // Check if the current node exposes a raw data file path
176
176
  if (childNode.$path && isData(childNode.$path)) {
177
- exposed.push(childNode.$path);
177
+ exposed.push({ parent: node, key, path: childNode.$path });
178
178
  }
179
179
  findExposedDataFiles(childNode, exposed);
180
180
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@ldgerrits/rogen",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "description": "Feature-based folder routing for Roblox",
7
+ "description": "A CLI tool enabling feature-based architecture through automated routing of client, server, and shared code to Roblox services",
8
8
  "author": "ldgerrits",
9
9
  "license": "MIT",
10
10
  "type": "module",