@xfilecom/xframe 0.1.25 → 0.1.26

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/xframe.js CHANGED
@@ -400,27 +400,27 @@ function patchWebTsconfigFrontCorePath(targetRoot) {
400
400
  }
401
401
  }
402
402
 
403
- /** 템플릿 Vite 의 로컬 front-core alias → 생성 앱은 설치된 npm 패키지 루트 */
404
- const TEMPLATE_VITE_FRONT_CORE_MARKERS = [
405
- "path.resolve(__dirname, '../../../../front-core/src')",
406
- "path.resolve(__dirname, '../../../..', 'front-core', 'src')",
407
- ];
408
- const SCAFFOLD_VITE_FRONT_CORE =
409
- "path.resolve(__dirname, '../../node_modules/@xfilecom/front-core')";
410
-
403
+ /**
404
+ * Vite 에서 @xfilecom/front-core 를 node_modules 패키지 "루트"만 alias 하면
405
+ * `tokens.css` 같은 서브패스가 exports 를 타지 못해 깨짐 → alias 제거 후 npm 기본 해석.
406
+ */
411
407
  function patchWebViteFrontCoreAlias(targetRoot) {
412
408
  for (const sub of ['client', 'admin']) {
413
409
  const p = path.join(targetRoot, 'web', sub, 'vite.config.ts');
414
410
  if (!fs.existsSync(p)) continue;
415
- let raw = fs.readFileSync(p, 'utf8');
416
- let next = raw;
417
- for (const marker of TEMPLATE_VITE_FRONT_CORE_MARKERS) {
418
- if (next.includes(marker)) {
419
- next = next.split(marker).join(SCAFFOLD_VITE_FRONT_CORE);
420
- }
411
+ let s = fs.readFileSync(p, 'utf8');
412
+ const orig = s;
413
+ s = s.replace(/\s*'@xfilecom\/front-core':\s*frontCoreSrc,\s*\r?\n/, '\n');
414
+ s = s.replace(
415
+ /\r?\n\/\*\*[\s\S]*?front-core[\s\S]*?\*\/\s*\r?\nconst frontCoreSrc = path\.resolve\([^;]+\);\s*/m,
416
+ '\n',
417
+ );
418
+ s = s.replace(/\r?\nconst frontCoreSrc = path\.resolve\([^;]+\);\s*/g, '\n');
419
+ if (s.includes('frontCoreSrc')) {
420
+ continue;
421
421
  }
422
- if (next !== raw) {
423
- fs.writeFileSync(p, next, 'utf8');
422
+ if (s !== orig) {
423
+ fs.writeFileSync(p, s, 'utf8');
424
424
  }
425
425
  }
426
426
  }
package/defaults.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "backendCore": "^1.0.6",
3
- "frontCore": "^0.2.11"
2
+ "backendCore": "^1.0.7",
3
+ "frontCore": "^0.2.12"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xfilecom/xframe",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "description": "Scaffold full-stack app: Nest + @xfilecom/backend-core, Vite/React + @xfilecom/front-core",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {
@@ -8,8 +8,8 @@ import react from '@vitejs/plugin-react';
8
8
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
9
9
 
10
10
  /**
11
- * 모노레포에서 템플릿 개발 시: …/packages/xframe/packages/front-core/src
12
- * (`npx @xfilecom/xframe <dir>` 프로젝트를 만들면 CLI 가 node_modules 패키지 경로로 덮어씀)
11
+ * xframe 레포 템플릿: …/packages/xframe/packages/front-core/src
12
+ * (`npx @xfilecom/xframe <dir>` 생성 CLI 가 front-core alias·const 제거 → npm exports 로 해석)
13
13
  */
14
14
  const frontCoreSrc = path.resolve(__dirname, '../../../..', 'front-core', 'src');
15
15
 
@@ -8,8 +8,8 @@ import react from '@vitejs/plugin-react';
8
8
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
9
9
 
10
10
  /**
11
- * 모노레포에서 템플릿 개발 시: …/packages/xframe/packages/front-core/src
12
- * (`npx @xfilecom/xframe <dir>` 프로젝트를 만들면 CLI 가 node_modules 패키지 경로로 덮어씀)
11
+ * xframe 레포 템플릿: …/packages/xframe/packages/front-core/src
12
+ * (`npx @xfilecom/xframe <dir>` 생성 CLI 가 front-core alias·const 제거 → npm exports 로 해석)
13
13
  */
14
14
  const frontCoreSrc = path.resolve(__dirname, '../../../..', 'front-core', 'src');
15
15