free-framework 4.4.0 → 4.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/bin/free.js CHANGED
@@ -11,8 +11,10 @@ const path = require("path");
11
11
  // Load Environment variables globally
12
12
  require('dotenv').config();
13
13
 
14
+ const pkg = require("../package.json");
15
+
14
16
  program
15
- .version("1.0.0")
17
+ .version(pkg.version)
16
18
  .description("Free Framework CLI");
17
19
 
18
20
  program
@@ -39,6 +39,20 @@ module.exports = function (options) {
39
39
  });
40
40
  };
41
41
 
42
+ const fs = require("fs");
43
+ const appFile = path.join(process.cwd(), ".free/app.js");
44
+
45
+ if (!fs.existsSync(appFile)) {
46
+ console.log("📦 Target build missing. Compiling project...");
47
+ try {
48
+ build();
49
+ console.log("✅ Compilation successful.");
50
+ } catch (err) {
51
+ console.error("❌ Initial build failed:", err.message);
52
+ return;
53
+ }
54
+ }
55
+
42
56
  startServer();
43
57
 
44
58
  const appDir = path.join(process.cwd(), "app");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "free-framework",
3
- "version": "4.4.0",
3
+ "version": "4.4.1",
4
4
  "description": "Professional Node.js engine for the .free language. Blazing-fast SSR, Islands Architecture, and built-in ORM.",
5
5
  "main": "index.js",
6
6
  "bin": {