@mod-computer/cli 0.2.1 → 0.2.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/README.md +98 -148
- package/dist/cli.bundle.js +11 -4
- package/dist/cli.bundle.js.map +2 -2
- package/dist/config/features.js +10 -4
- package/package.json +1 -1
package/dist/config/features.js
CHANGED
|
@@ -34,10 +34,16 @@ function loadReleaseProfile() {
|
|
|
34
34
|
try {
|
|
35
35
|
const __filename = fileURLToPath(import.meta.url);
|
|
36
36
|
const __dirname = path.dirname(__filename);
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
// Try multiple paths to support both bundled and unbundled modes
|
|
38
|
+
const candidates = [
|
|
39
|
+
path.join(__dirname, 'release-profiles', `${profileName}.json`), // unbundled: dist/config/
|
|
40
|
+
path.join(__dirname, 'config', 'release-profiles', `${profileName}.json`), // bundled: dist/
|
|
41
|
+
];
|
|
42
|
+
for (const profilePath of candidates) {
|
|
43
|
+
if (fs.existsSync(profilePath)) {
|
|
44
|
+
const profileData = fs.readFileSync(profilePath, 'utf8');
|
|
45
|
+
return JSON.parse(profileData);
|
|
46
|
+
}
|
|
41
47
|
}
|
|
42
48
|
throw new Error(`Profile ${profileName} not found`);
|
|
43
49
|
}
|