@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.
- package/lib/__templates__/agent/pyproject.toml +2 -2
- package/lib/__templates__/agent/requirements.txt +1 -1
- package/lib/__templates__/expo/.licosproj/scripts/prod_build.sh +7 -5
- package/lib/__templates__/expo/client/app.config.ts +12 -1
- package/lib/__templates__/expo/pnpm-lock.yaml +12942 -12942
- package/lib/__templates__/expo/server/package.json +2 -2
- package/lib/__templates__/nextjs/next.config.ts +1 -1
- package/lib/__templates__/nextjs/package.json +2 -2
- package/lib/__templates__/nextjs/pnpm-lock.yaml +6 -6
- package/lib/__templates__/nextjs/src/server.ts +1 -1
- package/lib/__templates__/nuxt-vue/nuxt.config.ts +29 -1
- package/lib/__templates__/nuxt-vue/package.json +2 -2
- package/lib/__templates__/nuxt-vue/pnpm-lock.yaml +6 -6
- package/lib/__templates__/taro/config/index.ts +54 -1
- package/lib/__templates__/taro/pnpm-lock.yaml +21212 -21212
- package/lib/__templates__/taro/server/package.json +8 -8
- package/lib/__templates__/vite/package.json +2 -2
- package/lib/__templates__/vite/pnpm-lock.yaml +6 -6
- package/lib/__templates__/vite/vite.config.ts +30 -1
- package/lib/__templates__/workflow/pyproject.toml +2 -2
- package/lib/__templates__/workflow/requirements.txt +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"lint": "tsc --noEmit"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@kmlckj/licos-dev-sdk": "0.2.5",
|
|
13
|
+
"@kmlckj/licos-dev-sdk": "0.2.5",
|
|
14
14
|
"@kmlckj/licos-platform-sdk": "0.6.7",
|
|
15
15
|
"cors": "^2.8.5",
|
|
16
16
|
"dayjs": "^1.11.19",
|
|
@@ -32,4 +32,4 @@
|
|
|
32
32
|
"tsx": "^4.21.0",
|
|
33
33
|
"typescript": "^5.8.3"
|
|
34
34
|
}
|
|
35
|
-
}
|
|
35
|
+
}
|
|
@@ -12,7 +12,7 @@ function isProdProjectEnv(value?: string): boolean {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
const deployBasePath = process.env.BASE_PATH;
|
|
15
|
-
const shouldUseBasePath =
|
|
15
|
+
const shouldUseBasePath = isProdProjectEnv(process.env.LICOS_PROJECT_ENV) && Boolean(deployBasePath);
|
|
16
16
|
|
|
17
17
|
const basePath = shouldUseBasePath ? normalizeBasePath(deployBasePath) : undefined;
|
|
18
18
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"ts-check": "tsc -p tsconfig.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@kmlckj/licos-dev-sdk": "0.2.5",
|
|
17
|
+
"@kmlckj/licos-dev-sdk": "0.2.5",
|
|
18
18
|
"@kmlckj/licos-platform-sdk": "0.6.7",
|
|
19
19
|
"@aws-sdk/client-s3": "^3.958.0",
|
|
20
20
|
"@aws-sdk/lib-storage": "^3.958.0",
|
|
@@ -92,4 +92,4 @@
|
|
|
92
92
|
"engines": {
|
|
93
93
|
"pnpm": ">=9.0.0"
|
|
94
94
|
}
|
|
95
|
-
}
|
|
95
|
+
}
|
|
@@ -18,8 +18,8 @@ importers:
|
|
|
18
18
|
specifier: ^5.2.2
|
|
19
19
|
version: 5.2.2(react-hook-form@7.71.1(react@19.2.3))
|
|
20
20
|
'@kmlckj/licos-dev-sdk':
|
|
21
|
-
specifier: 0.2.
|
|
22
|
-
version: 0.2.
|
|
21
|
+
specifier: 0.2.5
|
|
22
|
+
version: 0.2.5
|
|
23
23
|
'@kmlckj/licos-platform-sdk':
|
|
24
24
|
specifier: 0.6.7
|
|
25
25
|
version: 0.6.7
|
|
@@ -1334,8 +1334,8 @@ packages:
|
|
|
1334
1334
|
'@jridgewell/trace-mapping@0.3.31':
|
|
1335
1335
|
resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
|
|
1336
1336
|
|
|
1337
|
-
'@kmlckj/licos-dev-sdk@0.2.
|
|
1338
|
-
resolution: {integrity: sha512-
|
|
1337
|
+
'@kmlckj/licos-dev-sdk@0.2.5':
|
|
1338
|
+
resolution: {integrity: sha512-bkju53I3rAgCT4BlF3RjbzQreihoQR6M/9XIoC+/GSluqQOpwwXAkUO2nBCKkwIGd2I61rLizjsaEXi/QviXrg==}
|
|
1339
1339
|
|
|
1340
1340
|
'@kmlckj/licos-platform-sdk@0.6.7':
|
|
1341
1341
|
resolution: {integrity: sha512-7fOUquWSGWWVcu2u+3fZv5GmisZ1yd4zeWdmGodNWHfAgAqJt/03QR1SOWIWMDVWoZYANShRyIVj93vZwzSzAA==}
|
|
@@ -7132,7 +7132,7 @@ snapshots:
|
|
|
7132
7132
|
'@jridgewell/resolve-uri': 3.1.2
|
|
7133
7133
|
'@jridgewell/sourcemap-codec': 1.5.5
|
|
7134
7134
|
|
|
7135
|
-
'@kmlckj/licos-dev-sdk@0.2.
|
|
7135
|
+
'@kmlckj/licos-dev-sdk@0.2.5': {}
|
|
7136
7136
|
|
|
7137
7137
|
'@kmlckj/licos-platform-sdk@0.6.7': {}
|
|
7138
7138
|
|
|
@@ -12069,4 +12069,4 @@ snapshots:
|
|
|
12069
12069
|
|
|
12070
12070
|
zod@3.25.76: {}
|
|
12071
12071
|
|
|
12072
|
-
zod@4.3.6: {}
|
|
12072
|
+
zod@4.3.6: {}
|
|
@@ -20,7 +20,7 @@ function normalizeBasePath(value?: string): string | undefined {
|
|
|
20
20
|
return `/${trimmed.replace(/^\/+|\/+$/g, '')}`;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const basePath = normalizeBasePath(process.env.BASE_PATH);
|
|
23
|
+
const basePath = dev ? undefined : normalizeBasePath(process.env.BASE_PATH);
|
|
24
24
|
|
|
25
25
|
function getContentType(filePath: string): string {
|
|
26
26
|
const ext = extname(filePath).toLowerCase();
|
|
@@ -11,6 +11,33 @@ function normalizeBaseURL(value?: string): string {
|
|
|
11
11
|
return `/${trimmed.replace(/^\/+|\/+$/g, '')}/`;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
function parsePort(value?: string): number | undefined {
|
|
15
|
+
const port = Number.parseInt(value || '', 10);
|
|
16
|
+
return Number.isInteger(port) && port > 0 ? port : undefined;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function createPreviewHmrConfig() {
|
|
20
|
+
if (!process.env.LICOS_PREVIEW_BASE_PATH) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
const hmr: Record<string, unknown> = {
|
|
24
|
+
overlay: true,
|
|
25
|
+
path: process.env.LICOS_PREVIEW_HMR_PATH || '/hot/vite-hmr',
|
|
26
|
+
timeout: 30000,
|
|
27
|
+
};
|
|
28
|
+
if (process.env.LICOS_PREVIEW_HMR_HOST) {
|
|
29
|
+
hmr.host = process.env.LICOS_PREVIEW_HMR_HOST;
|
|
30
|
+
}
|
|
31
|
+
if (process.env.LICOS_PREVIEW_HMR_PROTOCOL) {
|
|
32
|
+
hmr.protocol = process.env.LICOS_PREVIEW_HMR_PROTOCOL;
|
|
33
|
+
}
|
|
34
|
+
const clientPort = parsePort(process.env.LICOS_PREVIEW_HMR_CLIENT_PORT);
|
|
35
|
+
if (clientPort) {
|
|
36
|
+
hmr.clientPort = clientPort;
|
|
37
|
+
}
|
|
38
|
+
return hmr;
|
|
39
|
+
}
|
|
40
|
+
|
|
14
41
|
function isProdProjectEnv(value?: string): boolean {
|
|
15
42
|
const normalized = value?.trim().toLowerCase();
|
|
16
43
|
return normalized === 'prod' || normalized === 'production' || normalized === 'release';
|
|
@@ -22,6 +49,7 @@ const shouldUseBaseURL = Boolean(deployBaseURL) || isProd;
|
|
|
22
49
|
|
|
23
50
|
const publicBaseURL = shouldUseBaseURL ? normalizeBaseURL(deployBaseURL) : '/';
|
|
24
51
|
const publicAssetCdnURL = publicBaseURL === '/' ? '' : publicBaseURL.replace(/\/$/, '');
|
|
52
|
+
const previewHmrConfig = createPreviewHmrConfig();
|
|
25
53
|
|
|
26
54
|
export default defineNuxtConfig({
|
|
27
55
|
compatibilityDate: '2025-07-15',
|
|
@@ -109,7 +137,7 @@ export default defineNuxtConfig({
|
|
|
109
137
|
origin: ['*.dev.licos.local'],
|
|
110
138
|
credentials: true,
|
|
111
139
|
},
|
|
112
|
-
hmr: {
|
|
140
|
+
hmr: previewHmrConfig || {
|
|
113
141
|
overlay: true,
|
|
114
142
|
path: '/hot/vite-hmr',
|
|
115
143
|
port: parseInt(process.env.HMR_PORT || '<%= hmrPort %>', 10),
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"start": "bash ./scripts/start.sh"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@kmlckj/licos-dev-sdk": "0.2.5",
|
|
20
|
+
"@kmlckj/licos-dev-sdk": "0.2.5",
|
|
21
21
|
"@kmlckj/licos-platform-sdk": "0.6.7",
|
|
22
22
|
"@nuxt/image": "2.0.0",
|
|
23
23
|
"nuxt": "4.3.1",
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
"engines": {
|
|
44
44
|
"pnpm": ">=9.0.0"
|
|
45
45
|
}
|
|
46
|
-
}
|
|
46
|
+
}
|
|
@@ -13,8 +13,8 @@ importers:
|
|
|
13
13
|
.:
|
|
14
14
|
dependencies:
|
|
15
15
|
'@kmlckj/licos-dev-sdk':
|
|
16
|
-
specifier: 0.2.
|
|
17
|
-
version: 0.2.
|
|
16
|
+
specifier: 0.2.5
|
|
17
|
+
version: 0.2.5
|
|
18
18
|
'@kmlckj/licos-platform-sdk':
|
|
19
19
|
specifier: 0.6.7
|
|
20
20
|
version: 0.6.7
|
|
@@ -570,8 +570,8 @@ packages:
|
|
|
570
570
|
'@jridgewell/trace-mapping@0.3.31':
|
|
571
571
|
resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
|
|
572
572
|
|
|
573
|
-
'@kmlckj/licos-dev-sdk@0.2.
|
|
574
|
-
resolution: {integrity: sha512-
|
|
573
|
+
'@kmlckj/licos-dev-sdk@0.2.5':
|
|
574
|
+
resolution: {integrity: sha512-bkju53I3rAgCT4BlF3RjbzQreihoQR6M/9XIoC+/GSluqQOpwwXAkUO2nBCKkwIGd2I61rLizjsaEXi/QviXrg==}
|
|
575
575
|
|
|
576
576
|
'@kmlckj/licos-platform-sdk@0.6.7':
|
|
577
577
|
resolution: {integrity: sha512-7fOUquWSGWWVcu2u+3fZv5GmisZ1yd4zeWdmGodNWHfAgAqJt/03QR1SOWIWMDVWoZYANShRyIVj93vZwzSzAA==}
|
|
@@ -4475,7 +4475,7 @@ snapshots:
|
|
|
4475
4475
|
'@jridgewell/resolve-uri': 3.1.2
|
|
4476
4476
|
'@jridgewell/sourcemap-codec': 1.5.5
|
|
4477
4477
|
|
|
4478
|
-
'@kmlckj/licos-dev-sdk@0.2.
|
|
4478
|
+
'@kmlckj/licos-dev-sdk@0.2.5': {}
|
|
4479
4479
|
|
|
4480
4480
|
'@kmlckj/licos-platform-sdk@0.6.7': {}
|
|
4481
4481
|
|
|
@@ -8280,4 +8280,4 @@ snapshots:
|
|
|
8280
8280
|
dependencies:
|
|
8281
8281
|
archiver-utils: 5.0.2
|
|
8282
8282
|
compress-commons: 6.0.2
|
|
8283
|
-
readable-stream: 4.7.0
|
|
8283
|
+
readable-stream: 4.7.0
|
|
@@ -72,6 +72,51 @@ const createProjectAssetsStaticPlugin = () => ({
|
|
|
72
72
|
},
|
|
73
73
|
});
|
|
74
74
|
|
|
75
|
+
const normalizePreviewBasePath = (value?: string) => {
|
|
76
|
+
const trimmed = value?.trim();
|
|
77
|
+
if (!trimmed) {
|
|
78
|
+
return '';
|
|
79
|
+
}
|
|
80
|
+
if (trimmed === '/') {
|
|
81
|
+
return '/';
|
|
82
|
+
}
|
|
83
|
+
return `/${trimmed.replace(/^\/+|\/+$/g, '')}/`;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const parsePort = (value?: string) => {
|
|
87
|
+
const port = Number.parseInt(value || '', 10);
|
|
88
|
+
return Number.isInteger(port) && port > 0 ? port : undefined;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const previewBasePath = normalizePreviewBasePath(
|
|
92
|
+
process.env.LICOS_PREVIEW_BASE_PATH ||
|
|
93
|
+
process.env.VITE_BASE_PATH ||
|
|
94
|
+
process.env.BASE_PATH,
|
|
95
|
+
);
|
|
96
|
+
const h5PublicPath = previewBasePath || './';
|
|
97
|
+
|
|
98
|
+
const createPreviewHmrConfig = () => {
|
|
99
|
+
if (!process.env.LICOS_PREVIEW_BASE_PATH) {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
const hmr: Record<string, unknown> = {
|
|
103
|
+
overlay: true,
|
|
104
|
+
path: process.env.LICOS_PREVIEW_HMR_PATH || '/hot/vite-hmr',
|
|
105
|
+
timeout: 30000,
|
|
106
|
+
};
|
|
107
|
+
if (process.env.LICOS_PREVIEW_HMR_HOST) {
|
|
108
|
+
hmr.host = process.env.LICOS_PREVIEW_HMR_HOST;
|
|
109
|
+
}
|
|
110
|
+
if (process.env.LICOS_PREVIEW_HMR_PROTOCOL) {
|
|
111
|
+
hmr.protocol = process.env.LICOS_PREVIEW_HMR_PROTOCOL;
|
|
112
|
+
}
|
|
113
|
+
const clientPort = parsePort(process.env.LICOS_PREVIEW_HMR_CLIENT_PORT);
|
|
114
|
+
if (clientPort) {
|
|
115
|
+
hmr.clientPort = clientPort;
|
|
116
|
+
}
|
|
117
|
+
return hmr;
|
|
118
|
+
};
|
|
119
|
+
|
|
75
120
|
const generateTTProjectConfig = (outputRoot: string) => {
|
|
76
121
|
const config = {
|
|
77
122
|
miniprogramRoot: './',
|
|
@@ -185,6 +230,14 @@ export default defineConfig<'vite'>(async (merge, _env) => {
|
|
|
185
230
|
{
|
|
186
231
|
name: 'hmr-config-plugin',
|
|
187
232
|
config() {
|
|
233
|
+
const previewHmrConfig = createPreviewHmrConfig();
|
|
234
|
+
if (previewHmrConfig) {
|
|
235
|
+
return {
|
|
236
|
+
server: {
|
|
237
|
+
hmr: previewHmrConfig,
|
|
238
|
+
},
|
|
239
|
+
};
|
|
240
|
+
}
|
|
188
241
|
if (!process.env.PROJECT_DOMAIN) {
|
|
189
242
|
return;
|
|
190
243
|
}
|
|
@@ -237,7 +290,7 @@ export default defineConfig<'vite'>(async (merge, _env) => {
|
|
|
237
290
|
},
|
|
238
291
|
},
|
|
239
292
|
h5: {
|
|
240
|
-
publicPath:
|
|
293
|
+
publicPath: h5PublicPath,
|
|
241
294
|
staticDirectory: 'static',
|
|
242
295
|
router: {
|
|
243
296
|
mode: 'hash',
|