@aravinthan_p/appnest-engine 1.0.21 → 1.0.22

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.
@@ -63,8 +63,8 @@ const appProjectOverview = {
63
63
  'ispresent': fs.existsSync(path.join(process.env.ORIGINAL_CWD, './app-backend')),
64
64
  },
65
65
  'appInstallationFrontend': {
66
- 'path': path.join(process.env.ORIGINAL_CWD, './app-installation-frontend'),
67
- 'ispresent': fs.existsSync(path.join(process.env.ORIGINAL_CWD, './app-installation-frontend')),
66
+ 'path': path.join(process.env.ORIGINAL_CWD, './app-install-frontend'),
67
+ 'ispresent': fs.existsSync(path.join(process.env.ORIGINAL_CWD, './app-install-frontend')),
68
68
  },
69
69
  };
70
70
 
@@ -82,7 +82,7 @@ const startAppBackend = () => {
82
82
  // Start app-backend (Express)
83
83
  const appBackendPrefix = appnestProjects['appnest-backend'];
84
84
  const appBackendEnv = { ...process.env, ...appInjectedEnv, PORT: appBackendPort };
85
- console.log('📦 Command: npm run dev --prefix', appBackendPrefix, '| env:', appBackendEnv);
85
+ // console.log('📦 Command: npm run dev --prefix', appBackendPrefix, '| env:', appBackendEnv);
86
86
  appBackendProcess = spawn(
87
87
  'npm',
88
88
  ['run', 'dev', '--prefix', appBackendPrefix],
@@ -105,7 +105,7 @@ const startAppFrontend = () => {
105
105
  console.log('📂 App Injected Environment Variables - CLIENT_SCRIPT_URL :', appInjectedEnv.CLIENT_SCRIPT_URL);
106
106
  const appFrontendPrefix = appnestProjects['appnest-frontend'];
107
107
  const appFrontendEnv = { ...process.env, PORT: appFrontendPort, CLIENT_SCRIPT_URL: appInjectedEnv.CLIENT_SCRIPT_URL };
108
- console.log('📦 Command: npm run dev --prefix', appFrontendPrefix, '| env:', appFrontendEnv);
108
+ // console.log('📦 Command: npm run dev --prefix', appFrontendPrefix, '| env:', appFrontendEnv);
109
109
  // Start app-frontend (React)
110
110
  appFrontendProcess = spawn(
111
111
  'npm',
@@ -126,7 +126,7 @@ const startAppInstallationFrontend = () => {
126
126
  try {
127
127
  console.log('📂 App Injected Environment Variables :', appInjectedEnv);
128
128
  console.log('📂 App Injected Environment Variables - CLIENT_SCRIPT_URL :', appInjectedEnv.CLIENT_SCRIPT_URL);
129
- // Start app-installation-frontend (React)
129
+ // Start app-install-frontend (React)
130
130
  appInstallationFrontendProcess = spawn(
131
131
  'npm',
132
132
  ['run', 'dev', '--prefix', appnestProjects['appnest-install-frontend']],
@@ -135,9 +135,9 @@ const startAppInstallationFrontend = () => {
135
135
  env: { ...process.env, PORT: appInstallationFrontendPort, CLIENT_SCRIPT_URL: appInjectedEnv.CLIENT_SCRIPT_URL },
136
136
  }
137
137
  );
138
- console.log(`🚀 Starting app-installation-frontend... on port ${appInstallationFrontendPort}`);
138
+ console.log(`🚀 Starting app-install-frontend... on port ${appInstallationFrontendPort}`);
139
139
  } catch (error) {
140
- console.error('❌ Error starting app-installation-frontend:', error);
140
+ console.error('❌ Error starting app-install-frontend:', error);
141
141
  throw error;
142
142
  }
143
143
  }
@@ -201,7 +201,7 @@ async function startServers() {
201
201
  res.json({
202
202
  'app-backend': appBackendProcess ? 'running' : 'stopped',
203
203
  'app-frontend': appFrontendProcess ? 'running' : 'stopped',
204
- 'app-installation-frontend': appProjectOverview['appInstallationFrontend']['ispresent'] === true ? (appInstallationFrontendProcess ? 'running' : 'stopped') : 'not present',
204
+ 'app-install-frontend': appProjectOverview['appInstallationFrontend']['ispresent'] === true ? (appInstallationFrontendProcess ? 'running' : 'stopped') : 'not present',
205
205
  });
206
206
  });
207
207
 
@@ -266,10 +266,10 @@ async function startServers() {
266
266
  })
267
267
  );
268
268
 
269
- // 3. Proxy app-installation-frontend
269
+ // 3. Proxy app-install-frontend
270
270
  if (appProjectOverview['appInstallationFrontend']['ispresent'] === true) {
271
271
  app.use(
272
- '/app-installation-frontend',
272
+ '/app-install-frontend',
273
273
  createProxyMiddleware({
274
274
  target: `http://localhost:${appInstallationFrontendPort}`,
275
275
  changeOrigin: true,
@@ -328,10 +328,10 @@ async function startServers() {
328
328
  });
329
329
 
330
330
  if(appProjectOverview['appInstallationFrontend']['ispresent'] === true) {
331
- chokidar.watch(process.env.ORIGINAL_CWD + '/app-installation-frontend', { ignored: /node_modules|\.git/ })
331
+ chokidar.watch(process.env.ORIGINAL_CWD + '/app-install-frontend', { ignored: /node_modules|\.git/ })
332
332
  .on('all', (event, filePath) => {
333
333
  if(appInjectedEnv.DEBUG_FILE_CHANGES === 'true') {
334
- console.log(`📂 app-installation-frontend change detected: ${filePath}`);
334
+ console.log(`📂 app-install-frontend change detected: ${filePath}`);
335
335
  }
336
336
  // Optional: restart dev server only for config changes
337
337
  if (filePath.endsWith('vite.config.js') || filePath.endsWith('.env')) {
package/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  console.log("🚀 Appnest Engine CLI Dev running!");
3
3
 
4
4
  const path = require("path");
5
- const { appnestAction, helpAction } = require("./appnest-command-line/appnest-command.js");
5
+ const { appnestAction, helpAction, HELP_TEXT } = require("./appnest-command-line/appnest-command.js");
6
6
  const { Command } = require("commander");
7
7
  const { version } = require("./package.json");
8
8
 
@@ -18,11 +18,13 @@ const program = new Command();
18
18
  program
19
19
  .name("appnest")
20
20
  .description("Appnest Engine Development CLI")
21
- .version(version);
21
+ .version(version)
22
+ .showHelpAfterError();
22
23
 
23
24
  program
24
- .command("run [param]")
25
- .description("Execute the appnest action with an optional parameter")
25
+ .command("app [param]")
26
+ .description("Run an app action. Use 'app', 'app help', or 'app -h' to list all actions.")
27
+ .addHelpText("after", HELP_TEXT)
26
28
  .action(async (param) => {
27
29
  await appnestAction(param || "");
28
30
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aravinthan_p/appnest-engine",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "main": "index.js",
5
5
  "keywords": [],
6
6
  "bin": {
@@ -10,8 +10,10 @@
10
10
  "license": "ISC",
11
11
  "description": "",
12
12
  "dependencies": {
13
+ "@eslint/js": "^9.39.2",
13
14
  "commander": "^14.0.2",
14
15
  "eslint": "^9.39.2",
16
+ "globals": "^14.0.0",
15
17
  "stylelint": "^17.3.0"
16
18
  }
17
19
  }