@fmode/studio 0.0.8 → 0.0.9

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.
Files changed (3) hide show
  1. package/bin/fmode.js +12 -6
  2. package/cli.js +12 -6
  3. package/package.json +1 -1
package/bin/fmode.js CHANGED
@@ -1064,12 +1064,18 @@ async function runCli() {
1064
1064
  break;
1065
1065
  }
1066
1066
  }
1067
- var isMainModule = process.argv[1] && import.meta.url === `file:///${process.argv[1].replace(/\\/g, "/")}`;
1068
- if (isMainModule) {
1069
- runCli().catch((error) => {
1070
- console.error("Fatal error:", error);
1071
- process.exit(1);
1072
- });
1067
+ var scriptPath = process.argv[1];
1068
+ if (scriptPath) {
1069
+ const normalizedScriptPath = scriptPath.replace(/\\/g, "/");
1070
+ const absolutePath = normalizedScriptPath.startsWith("/") ? normalizedScriptPath : `/${normalizedScriptPath}`;
1071
+ const scriptUrl = `file://${absolutePath}`;
1072
+ const isMainModule = import.meta.url === scriptUrl;
1073
+ if (isMainModule) {
1074
+ runCli().catch((error) => {
1075
+ console.error("Fatal error:", error);
1076
+ process.exit(1);
1077
+ });
1078
+ }
1073
1079
  }
1074
1080
  export {
1075
1081
  showVersion,
package/cli.js CHANGED
@@ -1052,12 +1052,18 @@ async function runCli() {
1052
1052
  break;
1053
1053
  }
1054
1054
  }
1055
- var isMainModule = process.argv[1] && import.meta.url === `file:///${process.argv[1].replace(/\\/g, "/")}`;
1056
- if (isMainModule) {
1057
- runCli().catch((error) => {
1058
- console.error("Fatal error:", error);
1059
- process.exit(1);
1060
- });
1055
+ var scriptPath = process.argv[1];
1056
+ if (scriptPath) {
1057
+ const normalizedScriptPath = scriptPath.replace(/\\/g, "/");
1058
+ const absolutePath = normalizedScriptPath.startsWith("/") ? normalizedScriptPath : `/${normalizedScriptPath}`;
1059
+ const scriptUrl = `file://${absolutePath}`;
1060
+ const isMainModule = import.meta.url === scriptUrl;
1061
+ if (isMainModule) {
1062
+ runCli().catch((error) => {
1063
+ console.error("Fatal error:", error);
1064
+ process.exit(1);
1065
+ });
1066
+ }
1061
1067
  }
1062
1068
  export {
1063
1069
  showVersion,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fmode/studio",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "AI PaaS IDE for Vibe Coding - Cross-platform CLI tool",
5
5
  "license": "ISC",
6
6
  "author": "Fmode Studio Team",