@kimesh/kit 0.2.33 → 0.2.34-nightly.20260129045417

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.
Files changed (2) hide show
  1. package/dist/index.mjs +72 -29
  2. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -1840,6 +1840,32 @@ function generateTsConfig(options) {
1840
1840
  }
1841
1841
  }
1842
1842
  const kimeshDir = resolvePackageDir("kimesh", rootDir);
1843
+ if (kimeshDir) {
1844
+ const relativeKimeshPath = relative(buildDir, kimeshDir);
1845
+ const normalizedKimeshPath = relativeKimeshPath.startsWith("..") ? relativeKimeshPath : "./" + relativeKimeshPath;
1846
+ for (const { subpath } of [
1847
+ {
1848
+ subpath: "router-runtime",
1849
+ distFile: "dist/router-runtime.d.ts"
1850
+ },
1851
+ {
1852
+ subpath: "kit",
1853
+ distFile: "dist/kit.d.ts"
1854
+ },
1855
+ {
1856
+ subpath: "query",
1857
+ distFile: "dist/query.d.ts"
1858
+ },
1859
+ {
1860
+ subpath: "head",
1861
+ distFile: "dist/head.d.ts"
1862
+ },
1863
+ {
1864
+ subpath: "config",
1865
+ distFile: "dist/config.d.ts"
1866
+ }
1867
+ ]) paths[`kimesh/${subpath}`] = [`${normalizedKimeshPath}/dist/${subpath}.d.ts`];
1868
+ }
1843
1869
  let viteClientDtsPath;
1844
1870
  if (kimeshDir) {
1845
1871
  const viteDir = resolvePackageDir("vite", kimeshDir);
@@ -2714,7 +2740,24 @@ function resolveLayerAlias(id, layer) {
2714
2740
  basePath = join$1(getLayerSourcePath(layer.path), relativePath);
2715
2741
  }
2716
2742
  if (!basePath) return null;
2717
- if (existsSync(basePath)) return basePath;
2743
+ if (existsSync(basePath)) try {
2744
+ if (statSync(basePath).isDirectory()) {
2745
+ for (const indexFile of [
2746
+ "index.ts",
2747
+ "index.js",
2748
+ "index.vue",
2749
+ "index.mjs",
2750
+ "index.mts"
2751
+ ]) {
2752
+ const indexPath = join$1(basePath, indexFile);
2753
+ if (existsSync(indexPath)) return indexPath;
2754
+ }
2755
+ return basePath;
2756
+ }
2757
+ return basePath;
2758
+ } catch {
2759
+ return basePath;
2760
+ }
2718
2761
  for (const ext of [
2719
2762
  ".ts",
2720
2763
  ".js",
@@ -3525,31 +3568,33 @@ function kimeshPlugin(options = {}) {
3525
3568
  consola.debug(`[Kimesh] Generated layer context types: ${layerContextTypesPath}`);
3526
3569
  }
3527
3570
  const layerTsConfigPath = join$1(layerKimeshDir, "tsconfig.json");
3528
- writeFileSync(layerTsConfigPath, JSON.stringify({
3529
- compilerOptions: {
3530
- target: "ESNext",
3531
- module: "ESNext",
3532
- moduleResolution: "bundler",
3533
- strict: true,
3534
- jsx: "preserve",
3535
- sourceMap: true,
3536
- resolveJsonModule: true,
3537
- esModuleInterop: true,
3538
- lib: ["ESNext", "DOM"],
3539
- skipLibCheck: true,
3540
- noEmit: true,
3541
- baseUrl: "..",
3542
- paths: {
3543
- "~": ["."],
3544
- "~/*": ["./*"],
3545
- "@": ["./src"],
3546
- "@/*": ["./src/*"]
3547
- }
3548
- },
3549
- include: ["../src/**/*", "./**/*"],
3550
- exclude: ["../node_modules"]
3551
- }, null, 2), "utf-8");
3552
- consola.debug(`[Kimesh] Generated layer tsconfig: ${layerTsConfigPath}`);
3571
+ if (!existsSync(layerTsConfigPath)) {
3572
+ writeFileSync(layerTsConfigPath, JSON.stringify({
3573
+ compilerOptions: {
3574
+ target: "ESNext",
3575
+ module: "ESNext",
3576
+ moduleResolution: "bundler",
3577
+ strict: true,
3578
+ jsx: "preserve",
3579
+ sourceMap: true,
3580
+ resolveJsonModule: true,
3581
+ esModuleInterop: true,
3582
+ lib: ["ESNext", "DOM"],
3583
+ skipLibCheck: true,
3584
+ noEmit: true,
3585
+ baseUrl: "..",
3586
+ paths: {
3587
+ "~": ["."],
3588
+ "~/*": ["./*"],
3589
+ "@": ["./src"],
3590
+ "@/*": ["./src/*"]
3591
+ }
3592
+ },
3593
+ include: ["../src/**/*", "./**/*"],
3594
+ exclude: ["../node_modules"]
3595
+ }, null, 2), "utf-8");
3596
+ consola.debug(`[Kimesh] Generated layer tsconfig: ${layerTsConfigPath}`);
3597
+ } else consola.debug(`[Kimesh] Layer tsconfig already exists, skipping: ${layerTsConfigPath}`);
3553
3598
  }
3554
3599
  const htmlPath = join$1(state.generatedDir, "index.html");
3555
3600
  writeFileSync(htmlPath, generateHtml(config.name || "Kimesh App"), "utf-8");
@@ -3946,9 +3991,7 @@ declare global {
3946
3991
  const watchEffect: typeof import('vue')['watchEffect']
3947
3992
  const onMounted: typeof import('vue')['onMounted']
3948
3993
  const onUnmounted: typeof import('vue')['onUnmounted']
3949
- const defineProps: typeof import('vue')['defineProps']
3950
- const defineEmits: typeof import('vue')['defineEmits']
3951
- const withDefaults: typeof import('vue')['withDefaults']
3994
+ // Note: defineProps, defineEmits, withDefaults are compiler macros and should not be auto-imported
3952
3995
 
3953
3996
  // Vue Router imports
3954
3997
  const useRoute: typeof import('vue-router')['useRoute']
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kimesh/kit",
3
- "version": "0.2.33",
3
+ "version": "0.2.34-nightly.20260129045417",
4
4
  "description": "Build-time engine for Kimesh framework",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,9 +27,9 @@
27
27
  "test:watch": "vitest"
28
28
  },
29
29
  "dependencies": {
30
- "@kimesh/auto-import": "0.2.33",
31
- "@kimesh/layers": "0.2.33",
32
- "@kimesh/router-generator": "0.2.33",
30
+ "@kimesh/auto-import": "workspace:*",
31
+ "@kimesh/layers": "workspace:*",
32
+ "@kimesh/router-generator": "workspace:*",
33
33
  "@vitejs/plugin-vue": "^6.0.3",
34
34
  "c12": "^3.3.3",
35
35
  "consola": "^3.4.2",