@fuzionx/framework 0.1.47 → 0.1.48
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/cli/index.js
CHANGED
|
@@ -254,18 +254,23 @@ export async function run(args) {
|
|
|
254
254
|
// ── fx dev:spa — FuzionX + Vite HMR 동시 실행 ──
|
|
255
255
|
if (command === 'dev:spa') {
|
|
256
256
|
const { execSync } = await import('node:child_process');
|
|
257
|
-
const
|
|
257
|
+
const appFlag = rest.find(a => a.startsWith('--app='));
|
|
258
|
+
const appName = appFlag?.split('=')[1] || 'spa';
|
|
259
|
+
const spaDir = path.resolve(`app/${appName}/views/default/spa`);
|
|
258
260
|
try {
|
|
259
261
|
await fs.access(spaDir);
|
|
260
262
|
} catch {
|
|
261
|
-
console.error(
|
|
262
|
-
console.error(
|
|
263
|
+
console.error(`❌ app/${appName}/views/default/spa/ 디렉토리가 없습니다.`);
|
|
264
|
+
console.error(` fx make:app --type=spa 로 SPA 앱을 먼저 생성하세요.`);
|
|
265
|
+
if (appName === 'spa') {
|
|
266
|
+
console.error(` 커스텀 앱명을 사용했다면: fx dev:spa --app=<appName>`);
|
|
267
|
+
}
|
|
263
268
|
process.exit(1);
|
|
264
269
|
}
|
|
265
|
-
console.log(`🚀 Starting dev server + Vite HMR
|
|
270
|
+
console.log(`🚀 Starting dev server + Vite HMR... (app: ${appName})`);
|
|
266
271
|
try {
|
|
267
272
|
execSync(
|
|
268
|
-
|
|
273
|
+
`npx concurrently "node --watch app.js" "cd app/${appName}/views/default/spa && npx vite"`,
|
|
269
274
|
{ stdio: 'inherit', cwd: process.cwd() },
|
|
270
275
|
);
|
|
271
276
|
} catch {}
|
|
@@ -275,14 +280,19 @@ export async function run(args) {
|
|
|
275
280
|
// ── fx build:spa — Vite 프로덕션 빌드 ──
|
|
276
281
|
if (command === 'build:spa') {
|
|
277
282
|
const { execSync } = await import('node:child_process');
|
|
278
|
-
const
|
|
283
|
+
const appFlag = rest.find(a => a.startsWith('--app='));
|
|
284
|
+
const appName = appFlag?.split('=')[1] || 'spa';
|
|
285
|
+
const spaDir = path.resolve(`app/${appName}/views/default/spa`);
|
|
279
286
|
try {
|
|
280
287
|
await fs.access(spaDir);
|
|
281
288
|
} catch {
|
|
282
|
-
console.error(
|
|
289
|
+
console.error(`❌ app/${appName}/views/default/spa/ 디렉토리가 없습니다.`);
|
|
290
|
+
if (appName === 'spa') {
|
|
291
|
+
console.error(` 커스텀 앱명을 사용했다면: fx build:spa --app=<appName>`);
|
|
292
|
+
}
|
|
283
293
|
process.exit(1);
|
|
284
294
|
}
|
|
285
|
-
console.log(`📦 Building SPA for production
|
|
295
|
+
console.log(`📦 Building SPA for production... (app: ${appName})`);
|
|
286
296
|
try {
|
|
287
297
|
execSync('npx vite build', { stdio: 'inherit', cwd: spaDir });
|
|
288
298
|
console.log('\n✅ Build complete → public/dist/');
|
|
@@ -511,8 +521,8 @@ export async function run(args) {
|
|
|
511
521
|
fx make:worker <Name> Create worker (shared/workers)
|
|
512
522
|
fx make:test <Name> Create test
|
|
513
523
|
fx dev Start dev server (--watch)
|
|
514
|
-
fx dev:spa
|
|
515
|
-
fx build:spa
|
|
524
|
+
fx dev:spa [--app=<name>] Start dev server + Vite HMR
|
|
525
|
+
fx build:spa [--app=<name>] Build SPA for production
|
|
516
526
|
fx stop Stop server (graceful)
|
|
517
527
|
fx restart Restart server (graceful)
|
|
518
528
|
fx test Run tests
|
|
@@ -201,9 +201,9 @@ async function connectWS() {
|
|
|
201
201
|
// masterSecret는 main.js에서 inject('masterSecret')로 제공됨
|
|
202
202
|
const masterSecret = injectedMasterSecret || '';
|
|
203
203
|
|
|
204
|
-
ws = new window.FuzionXSocket(url, masterSecret, window.
|
|
204
|
+
ws = new window.FuzionXSocket(url, masterSecret, window.__FX__ENC_ENABLED);
|
|
205
205
|
|
|
206
|
-
ws.on('connect', () => { setStatus('connected', window.
|
|
206
|
+
ws.on('connect', () => { setStatus('connected', window.__FX__ENC_ENABLED ? 'connected (ASP 🔐)' : 'connected'); });
|
|
207
207
|
|
|
208
208
|
ws.on('message', (raw) => { console.log('[Chat] raw:', JSON.stringify(raw)); });
|
|
209
209
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fuzionx/framework",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.48",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Full-stack MVC framework built on @fuzionx/core — Controller, Service, Model, Middleware, DI, EventBus",
|
|
6
6
|
"main": "index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"url": "https://github.com/saytohenry/fuzionx"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@fuzionx/core": "^0.1.
|
|
37
|
+
"@fuzionx/core": "^0.1.48",
|
|
38
38
|
"better-sqlite3": "^12.8.0",
|
|
39
39
|
"knex": "^3.2.5",
|
|
40
40
|
"mongoose": "^9.3.2",
|