@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.
- package/README.md +73 -62
- package/appnest-command-line/appnest-command.js +41 -28
- package/appnest-command-line/frameworkDocsUtils.js +73 -0
- package/appnest-command-line/precheckUtils.js +7 -20
- package/appnest-command-line/setupAppUtils.js +15 -0
- package/appnest-command-line/validateUtils/index.js +2 -8
- package/appnest-command-line/validateUtils/lint/lint-backend.js +4 -3
- package/appnest-command-line/validateUtils/lint/lint-frontend.js +4 -4
- package/appnest-command-line/validateUtils/lint/lint-utils.js +67 -56
- package/appnest-command-line/validateUtils/lint/lint.js +5 -5
- package/appnest-command-line/validateUtils/manifestUtils.js +359 -120
- package/appnest-command-line/zipUtils.js +1 -1
- package/appnest-engine-commands.md +46 -0
- package/appnest-install-frontend/package.json +1 -1
- package/appnest-install-frontend/vite.config.js +4 -4
- package/appnest-proxy/server.js +12 -12
- package/cli.js +6 -4
- package/package.json +3 -1
package/appnest-proxy/server.js
CHANGED
|
@@ -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-
|
|
67
|
-
'ispresent': fs.existsSync(path.join(process.env.ORIGINAL_CWD, './app-
|
|
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-
|
|
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-
|
|
138
|
+
console.log(`🚀 Starting app-install-frontend... on port ${appInstallationFrontendPort}`);
|
|
139
139
|
} catch (error) {
|
|
140
|
-
console.error('❌ Error starting app-
|
|
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-
|
|
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-
|
|
269
|
+
// 3. Proxy app-install-frontend
|
|
270
270
|
if (appProjectOverview['appInstallationFrontend']['ispresent'] === true) {
|
|
271
271
|
app.use(
|
|
272
|
-
'/app-
|
|
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-
|
|
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-
|
|
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("
|
|
25
|
-
.description("
|
|
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.
|
|
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
|
}
|