@kmlckj/licos-ai-cli 1.0.15 → 1.0.18

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.
@@ -4,8 +4,8 @@ version = "0.1.0"
4
4
  description = "LICOS LangGraph agent project"
5
5
  requires-python = ">=3.12"
6
6
  dependencies = [
7
- "licos-agent-runtime>=0.2.25",
8
- "licos-dev-sdk>=0.2.5",
7
+ "licos-agent-runtime>=0.2.25",
8
+ "licos-dev-sdk>=0.2.5",
9
9
  ]
10
10
 
11
11
  [tool.uv]
@@ -1 +1 @@
1
- licos-agent-runtime>=0.2.25
1
+ licos-agent-runtime>=0.2.25
@@ -42,15 +42,17 @@ info "==================== 依赖安装完成!====================\n"
42
42
  info "==================== dist打包 ===================="
43
43
  info "开始执行:expo export --platform web (client)"
44
44
  rm -rf "$ROOT_DIR/server/public"
45
- (pushd "$ROOT_DIR/client" > /dev/null && pnpm expo export --platform web --output-dir ../server/public; popd > /dev/null) || error "client web 打包失败"
46
-
47
45
  BASE_URL="${BASE_PATH:-/}"
48
46
  if [ "${BASE_URL}" != "/" ]; then
49
- BASE_URL="/$(printf '%s' "${BASE_URL}" | sed 's#^/*##; s#/*$##')/"
47
+ BASE_URL="/$(printf '%s' "${BASE_URL}" | sed 's#^/*##; s#/*$##')"
48
+ fi
49
+ if [ "${BASE_URL}" != "/" ]; then
50
+ info "使用 Expo Web baseUrl:${BASE_URL}"
50
51
  fi
52
+ (pushd "$ROOT_DIR/client" > /dev/null && BASE_PATH="${BASE_PATH:-}" pnpm expo export --platform web --output-dir ../server/public; popd > /dev/null) || error "client web 打包失败"
51
53
  if [ "${BASE_URL}" != "/" ]; then
52
- info "重写 Expo Web 静态资源前缀:${BASE_URL}"
53
- BASE_URL="${BASE_URL}" python3 - <<'PY'
54
+ info "校正 Expo Web 静态资源前缀:${BASE_URL}/"
55
+ BASE_URL="${BASE_URL}/" python3 - <<'PY'
54
56
  import os
55
57
  from pathlib import Path
56
58
 
@@ -4,6 +4,16 @@ const appName = process.env.LICOS_PROJECT_NAME || process.env.EXPO_PUBLIC_LICOS_
4
4
  const projectId = process.env.LICOS_PROJECT_ID || process.env.EXPO_PUBLIC_LICOS_PROJECT_ID;
5
5
  const slugAppName = projectId ? `app${projectId}` : 'myapp';
6
6
 
7
+ const normalizeBaseUrl = (value?: string) => {
8
+ const trimmed = value?.trim();
9
+ if (!trimmed || trimmed === '/') {
10
+ return undefined;
11
+ }
12
+ return `/${trimmed.replace(/^\/+|\/+$/g, '')}`;
13
+ };
14
+
15
+ const baseUrl = normalizeBaseUrl(process.env.BASE_PATH || process.env.EXPO_PUBLIC_BASE_PATH);
16
+
7
17
  export default ({ config }: ConfigContext): ExpoConfig => {
8
18
  return {
9
19
  ...config,
@@ -70,7 +80,8 @@ export default ({ config }: ConfigContext): ExpoConfig => {
70
80
  ]
71
81
  ],
72
82
  "experiments": {
73
- "typedRoutes": true
83
+ "typedRoutes": true,
84
+ ...(baseUrl ? { "baseUrl": baseUrl } : {})
74
85
  }
75
86
  }
76
87
  }