@ldgerrits/rogen 1.4.2 → 1.4.4

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/build.js CHANGED
@@ -129,6 +129,10 @@ export async function build(targetConfig, baseProjectTree, config, env, sourcePa
129
129
  if (typeof aliasPath === "string") {
130
130
  const parts = aliasPath.split(".");
131
131
  let current = rojoTree.tree;
132
+ // Ensure the parent container is created if needed
133
+ if (parts.length > 0 && serviceParents[parts[0]]) {
134
+ current = getOrCreateNode(current, serviceParents[parts[0]]);
135
+ }
132
136
  for (const part of parts) {
133
137
  current = getOrCreateNode(current, part);
134
138
  }
package/dist/bundle.cjs CHANGED
@@ -3988,9 +3988,9 @@ var require_is_glob = __commonJS({
3988
3988
  }
3989
3989
  });
3990
3990
 
3991
- // node_modules/chokidar/node_modules/glob-parent/index.js
3991
+ // node_modules/glob-parent/index.js
3992
3992
  var require_glob_parent = __commonJS({
3993
- "node_modules/chokidar/node_modules/glob-parent/index.js"(exports2, module2) {
3993
+ "node_modules/glob-parent/index.js"(exports2, module2) {
3994
3994
  "use strict";
3995
3995
  var isGlob = require_is_glob();
3996
3996
  var pathPosixDirname = require("path").posix.dirname;
@@ -8966,7 +8966,17 @@ var import_fs = __toESM(require("fs"), 1);
8966
8966
  var import_path = __toESM(require("path"), 1);
8967
8967
 
8968
8968
  // src/constants.ts
8969
- var version = "1.4.2";
8969
+ var version = "1.4.4";
8970
+ var dataExtensions = /* @__PURE__ */ new Set([
8971
+ ".csv",
8972
+ ".txt",
8973
+ ".json",
8974
+ ".toml",
8975
+ ".yaml",
8976
+ ".yml",
8977
+ ".msgpack",
8978
+ ".md"
8979
+ ]);
8970
8980
  var defaultProject = {
8971
8981
  name: "roblox-game",
8972
8982
  tree: { $className: "DataModel" }
@@ -9519,7 +9529,8 @@ function isData(filename) {
9519
9529
  if (isScript(filename) || isModel(filename)) return false;
9520
9530
  if (filename.toLowerCase().endsWith(".d.ts")) return false;
9521
9531
  if (filename.startsWith(".")) return false;
9522
- return /\.[a-z0-9]+$/i.test(filename);
9532
+ const ext = import_path2.default.extname(filename).toLowerCase();
9533
+ return dataExtensions.has(ext);
9523
9534
  }
9524
9535
  var isValidSource = (filename) => isScript(filename) || isModel(filename) || isData(filename);
9525
9536
  var isInitFile = (filename) => isScript(filename) && /^(index|init)([.-][a-z0-9_]+)?\./i.test(filename);
@@ -10047,6 +10058,12 @@ async function build(targetConfig, baseProjectTree, config, env, sourcePaths, cl
10047
10058
  if (typeof aliasPath === "string") {
10048
10059
  const parts = aliasPath.split(".");
10049
10060
  let current = rojoTree.tree;
10061
+ if (parts.length > 0 && serviceParents[parts[0]]) {
10062
+ current = getOrCreateNode(
10063
+ current,
10064
+ serviceParents[parts[0]]
10065
+ );
10066
+ }
10050
10067
  for (const part of parts) {
10051
10068
  current = getOrCreateNode(current, part);
10052
10069
  }
package/dist/constants.js CHANGED
@@ -1,4 +1,14 @@
1
- export const version = "1.4.2";
1
+ export const version = "1.4.4";
2
+ export const dataExtensions = new Set([
3
+ ".csv",
4
+ ".txt",
5
+ ".json",
6
+ ".toml",
7
+ ".yaml",
8
+ ".yml",
9
+ ".msgpack",
10
+ ".md",
11
+ ]);
2
12
  export const defaultProject = {
3
13
  name: "roblox-game",
4
14
  tree: { $className: "DataModel" },
package/dist/tree.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import fs from "fs";
2
2
  import path from "path";
3
- import { combinedServices } from "./constants.js";
3
+ import { combinedServices, dataExtensions } from "./constants.js";
4
4
  function hasPathPrefix(p, dir) {
5
5
  return p === dir || p.startsWith(dir + "/");
6
6
  }
@@ -122,7 +122,8 @@ export function isData(filename) {
122
122
  return false;
123
123
  if (filename.startsWith("."))
124
124
  return false;
125
- return /\.[a-z0-9]+$/i.test(filename);
125
+ const ext = path.extname(filename).toLowerCase();
126
+ return dataExtensions.has(ext);
126
127
  }
127
128
  export const isValidSource = (filename) => isScript(filename) || isModel(filename) || isData(filename);
128
129
  export const isInitFile = (filename) => isScript(filename) && /^(index|init)([.-][a-z0-9_]+)?\./i.test(filename);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ldgerrits/rogen",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "A CLI tool that enables feature-based architecture for Roblox",
5
5
  "publishConfig": {
6
6
  "access": "public"