@kmlckj/licos-ai-cli 0.0.35 → 0.0.36

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.
@@ -21,6 +21,7 @@ const deployBaseURL = process.env.NUXT_PUBLIC_BASE_URL || process.env.BASE_PATH;
21
21
  const shouldUseBaseURL = Boolean(deployBaseURL) || isProd;
22
22
 
23
23
  const publicBaseURL = shouldUseBaseURL ? normalizeBaseURL(deployBaseURL) : '/';
24
+ const publicAssetCdnURL = publicBaseURL === '/' ? '' : publicBaseURL.replace(/\/$/, '');
24
25
 
25
26
  export default defineNuxtConfig({
26
27
  compatibilityDate: '2025-07-15',
@@ -33,9 +34,10 @@ export default defineNuxtConfig({
33
34
  // App head configuration
34
35
  app: {
35
36
  // The cluster ingress rewrites /p/{projectId}/... to backend /...
36
- // Keep Nuxt's server base at / and prefix only generated asset URLs.
37
+ // Keep Nuxt's server asset route at /_nuxt and prefix browser URLs via cdnURL.
37
38
  baseURL: '/',
38
- buildAssetsDir: publicBaseURL === '/' ? '/_nuxt/' : `${publicBaseURL}_nuxt/`,
39
+ buildAssetsDir: '/_nuxt/',
40
+ cdnURL: publicAssetCdnURL,
39
41
  head: {
40
42
  title: '新应用 | LICOS AI',
41
43
  titleTemplate: '%s | LICOS AI',
@@ -15,10 +15,11 @@ if [ "${BASE_URL}" != "/" ]; then
15
15
  fi
16
16
  export NUXT_PUBLIC_BASE_URL="${BASE_URL}"
17
17
  if [ "${BASE_URL}" = "/" ]; then
18
- export NUXT_APP_BUILD_ASSETS_DIR="/_nuxt/"
18
+ export NUXT_APP_CDN_URL=""
19
19
  else
20
- export NUXT_APP_BUILD_ASSETS_DIR="${BASE_URL}_nuxt/"
20
+ export NUXT_APP_CDN_URL="${BASE_URL%/}"
21
21
  fi
22
+ export NUXT_APP_BUILD_ASSETS_DIR="/_nuxt/"
22
23
  pnpm nuxt build
23
24
 
24
25
  echo "Build completed successfully!"
@@ -20,10 +20,11 @@ start_service() {
20
20
  fi
21
21
  export NUXT_PUBLIC_BASE_URL="${BASE_URL}"
22
22
  if [ "${BASE_URL}" = "/" ]; then
23
- export NUXT_APP_BUILD_ASSETS_DIR="/_nuxt/"
23
+ export NUXT_APP_CDN_URL=""
24
24
  else
25
- export NUXT_APP_BUILD_ASSETS_DIR="${BASE_URL}_nuxt/"
25
+ export NUXT_APP_CDN_URL="${BASE_URL%/}"
26
26
  fi
27
+ export NUXT_APP_BUILD_ASSETS_DIR="/_nuxt/"
27
28
  HOST=0.0.0.0 PORT=${DEPLOY_RUN_PORT} node .output/server/index.mjs
28
29
  }
29
30
 
@@ -42,7 +42,7 @@ async function startServer(): Promise<Server> {
42
42
  await setupVite(app);
43
43
 
44
44
  // 全局错误处理
45
- app.use((err: Error, req: express.Request, res: express.Response) => {
45
+ app.use((err: Error, _req: express.Request, res: express.Response, _next: express.NextFunction) => {
46
46
  console.error('Server error:', err);
47
47
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
48
48
  const status = 'status' in err ? (err as any).status || 500 : 500;
@@ -11,7 +11,7 @@
11
11
  "resolveJsonModule": true,
12
12
  "isolatedModules": true,
13
13
  "noEmit": true,
14
- "types": ["node"]
14
+ "types": ["node", "vite/client"]
15
15
  },
16
16
  "include": ["src", "server"]
17
17
  }
package/lib/cli.js CHANGED
@@ -2109,7 +2109,7 @@ const EventBuilder = {
2109
2109
  };
2110
2110
 
2111
2111
  var name = "@kmlckj/licos-ai-cli";
2112
- var version = "0.0.35";
2112
+ var version = "0.0.36";
2113
2113
  var description = "LICOS AI coding workspace CLI - project template engine and dev tools";
2114
2114
  var license = "MIT";
2115
2115
  var author = "kmlckj";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmlckj/licos-ai-cli",
3
- "version": "0.0.35",
3
+ "version": "0.0.36",
4
4
  "description": "LICOS AI coding workspace CLI - project template engine and dev tools",
5
5
  "license": "MIT",
6
6
  "author": "kmlckj",