@coze-arch/cli 0.1.4-alpha.b94eab → 0.1.4
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__/expo/.coze +3 -0
- package/lib/__templates__/expo/.cozeproj/scripts/dev_build.ps1 +10 -0
- package/lib/__templates__/expo/.cozeproj/scripts/dev_run.ps1 +74 -0
- package/lib/__templates__/expo/.cozeproj/scripts/validate.ps1 +7 -0
- package/lib/__templates__/expo/pnpm-lock.yaml +5 -5
- package/lib/__templates__/expo/server/package.json +1 -1
- package/lib/__templates__/nextjs/package.json +1 -1
- package/lib/__templates__/nextjs/pnpm-lock.yaml +5 -5
- package/lib/__templates__/nextjs/template.config.js +1 -1
- package/lib/__templates__/nuxt-vue/package.json +1 -1
- package/lib/__templates__/nuxt-vue/pnpm-lock.yaml +5 -5
- package/lib/__templates__/pi-agent/package.json +1 -1
- package/lib/__templates__/pi-agent/pnpm-lock.yaml +5 -5
- package/lib/__templates__/taro/.coze +4 -0
- package/lib/__templates__/taro/.cozeproj/scripts/dev_build.ps1 +3 -0
- package/lib/__templates__/taro/.cozeproj/scripts/dev_run.ps1 +62 -0
- package/lib/__templates__/taro/.cozeproj/scripts/pack.ps1 +7 -0
- package/lib/__templates__/taro/.cozeproj/scripts/validate.ps1 +7 -0
- package/lib/__templates__/taro/pnpm-lock.yaml +5 -5
- package/lib/__templates__/taro/server/package.json +1 -1
- package/lib/__templates__/vite/package.json +1 -1
- package/lib/__templates__/vite/pnpm-lock.yaml +5 -5
- package/lib/__templates__/vite/template.config.js +1 -1
- package/lib/cli.js +2 -1
- package/package.json +1 -1
|
@@ -5,8 +5,11 @@ project_type = "app"
|
|
|
5
5
|
|
|
6
6
|
[dev]
|
|
7
7
|
build = ["bash", ".cozeproj/scripts/dev_build.sh"]
|
|
8
|
+
build_win = ["powershell.exe", "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", ".cozeproj/scripts/dev_build.ps1"]
|
|
8
9
|
run = ["bash", ".cozeproj/scripts/dev_run.sh"]
|
|
10
|
+
run_win = ["powershell.exe", "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", ".cozeproj/scripts/dev_run.ps1"]
|
|
9
11
|
validate = ["bash", ".cozeproj/scripts/validate.sh"]
|
|
12
|
+
validate_win = ["powershell.exe", "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", ".cozeproj/scripts/validate.ps1"]
|
|
10
13
|
|
|
11
14
|
[deploy]
|
|
12
15
|
build = ["bash", ".cozeproj/scripts/prod_build.sh"]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
$ErrorActionPreference = "Stop"
|
|
2
|
+
|
|
3
|
+
$workspace = if ($env:COZE_WORKSPACE_PATH) { $env:COZE_WORKSPACE_PATH } else { (Get-Location).Path }
|
|
4
|
+
Set-Location $workspace
|
|
5
|
+
|
|
6
|
+
Write-Host "Installing Expo project dependencies..."
|
|
7
|
+
& pnpm install --registry=https://registry.npmmirror.com
|
|
8
|
+
if ($LASTEXITCODE -ne 0) {
|
|
9
|
+
Write-Warning "Expo 项目依赖安装失败"
|
|
10
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
$ErrorActionPreference = "Stop"
|
|
2
|
+
|
|
3
|
+
function Stop-ProcessTree([int] $processId) {
|
|
4
|
+
if ($processId -gt 0 -and (Get-Process -Id $processId -ErrorAction SilentlyContinue)) {
|
|
5
|
+
& taskkill.exe /PID $processId /T /F *> $null
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function Stop-ListeningProcess([int] $port) {
|
|
10
|
+
Get-NetTCPConnection -LocalPort $port -State Listen -ErrorAction SilentlyContinue |
|
|
11
|
+
Select-Object -ExpandProperty OwningProcess -Unique |
|
|
12
|
+
ForEach-Object { Stop-ProcessTree $_ }
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function Start-LoggedProcess([string] $workingDirectory, [string] $logFile, [string[]] $arguments, [hashtable] $environment) {
|
|
16
|
+
$previousEnvironment = @{}
|
|
17
|
+
foreach ($key in $environment.Keys) {
|
|
18
|
+
$previousEnvironment[$key] = [Environment]::GetEnvironmentVariable($key, 'Process')
|
|
19
|
+
[Environment]::SetEnvironmentVariable($key, $environment[$key], 'Process')
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
return Start-Process -FilePath "pnpm.cmd" -ArgumentList $arguments -WorkingDirectory $workingDirectory -RedirectStandardOutput $logFile -RedirectStandardError "$logFile.error" -PassThru
|
|
24
|
+
} finally {
|
|
25
|
+
foreach ($key in $environment.Keys) {
|
|
26
|
+
[Environment]::SetEnvironmentVariable($key, $previousEnvironment[$key], 'Process')
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
$workspace = if ($env:COZE_WORKSPACE_PATH) { $env:COZE_WORKSPACE_PATH } else { (Get-Location).Path }
|
|
32
|
+
$serverPort = if ($env:SERVER_PORT) { [int] $env:SERVER_PORT } else { <%= serverPort %> }
|
|
33
|
+
$expoPort = if ($env:DEPLOY_RUN_PORT) { [int] $env:DEPLOY_RUN_PORT } elseif ($env:EXPO_PORT) { [int] $env:EXPO_PORT } else { <%= port %> }
|
|
34
|
+
$logDirectory = if ($env:COZE_LOG_DIR) { $env:COZE_LOG_DIR } else { Join-Path $workspace "logs" }
|
|
35
|
+
$serverLog = Join-Path $logDirectory "server.log"
|
|
36
|
+
$clientLog = Join-Path $logDirectory "client.log"
|
|
37
|
+
New-Item -ItemType Directory -Force -Path $logDirectory | Out-Null
|
|
38
|
+
|
|
39
|
+
Stop-ListeningProcess $serverPort
|
|
40
|
+
Stop-ListeningProcess $expoPort
|
|
41
|
+
|
|
42
|
+
$webUrl = if ($env:COZE_PROJECT_DOMAIN_DEFAULT) {
|
|
43
|
+
$env:COZE_PROJECT_DOMAIN_DEFAULT
|
|
44
|
+
} elseif ($env:COZE_HARDWARE_DID) {
|
|
45
|
+
"https://cozedaemon-$($env:COZE_HARDWARE_DID)-$expoPort.dev.coze.site"
|
|
46
|
+
} else {
|
|
47
|
+
"http://127.0.0.1:$serverPort"
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
$sharedEnvironment = @{
|
|
51
|
+
EXPO_PUBLIC_BACKEND_BASE_URL = $webUrl
|
|
52
|
+
EXPO_PACKAGER_PROXY_URL = $webUrl
|
|
53
|
+
EXPO_PUBLIC_COZE_PROJECT_ID = $env:COZE_PROJECT_ID
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
Write-Host "Starting server on port $serverPort..."
|
|
57
|
+
$server = Start-LoggedProcess (Join-Path $workspace "server") $serverLog @("exec", "tsx", "watch", "./src/index.ts") (@{ NODE_ENV = "development"; PORT = "$serverPort" })
|
|
58
|
+
|
|
59
|
+
Write-Host "Starting Expo on port $expoPort..."
|
|
60
|
+
$expoEnvironment = @{}
|
|
61
|
+
$sharedEnvironment.GetEnumerator() | ForEach-Object { $expoEnvironment[$_.Key] = $_.Value }
|
|
62
|
+
$expoEnvironment.EXPO_NO_DEPENDENCY_VALIDATION = "1"
|
|
63
|
+
$expo = Start-LoggedProcess (Join-Path $workspace "client") $clientLog @("exec", "expo", "start", "--web", "--clear", "--port", "$expoPort") $expoEnvironment
|
|
64
|
+
|
|
65
|
+
Start-Sleep -Seconds 8
|
|
66
|
+
if ((Test-Path $clientLog) -and (Select-String -Path $clientLog -Pattern "TypeError: fetch failed" -Quiet)) {
|
|
67
|
+
Write-Host "Expo 启动检测到网络错误,启用离线模式重试"
|
|
68
|
+
Stop-ProcessTree $expo.Id
|
|
69
|
+
$expoEnvironment.EXPO_OFFLINE = "1"
|
|
70
|
+
$expo = Start-LoggedProcess (Join-Path $workspace "client") $clientLog @("exec", "expo", "start", "--web", "--clear", "--port", "$expoPort") $expoEnvironment
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
Write-Host "服务已启动。Server PID: $($server.Id), Expo PID: $($expo.Id)"
|
|
74
|
+
Write-Host "EXPO_PUBLIC_BACKEND_BASE_URL=$webUrl"
|
|
@@ -269,8 +269,8 @@ importers:
|
|
|
269
269
|
specifier: ^2.8.5
|
|
270
270
|
version: 2.8.6
|
|
271
271
|
coze-coding-dev-sdk:
|
|
272
|
-
specifier: ^0.7.
|
|
273
|
-
version: 0.7.
|
|
272
|
+
specifier: ^0.7.28
|
|
273
|
+
version: 0.7.28(openai@6.16.0(ws@8.19.0)(zod@4.3.6))(ws@8.19.0)
|
|
274
274
|
dayjs:
|
|
275
275
|
specifier: ^1.11.20
|
|
276
276
|
version: 1.11.20
|
|
@@ -2643,8 +2643,8 @@ packages:
|
|
|
2643
2643
|
resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==}
|
|
2644
2644
|
engines: {node: '>=10'}
|
|
2645
2645
|
|
|
2646
|
-
coze-coding-dev-sdk@0.7.
|
|
2647
|
-
resolution: {integrity: sha512-
|
|
2646
|
+
coze-coding-dev-sdk@0.7.28:
|
|
2647
|
+
resolution: {integrity: sha512-ku7AiVWUmgCrUuMT1m2iTmHIwG39EfmcAhPASd8M7XyKxIC6A1cjIIe/3YpStRsj8pMF9LU+pxHWxisf+F44oQ==}
|
|
2648
2648
|
engines: {node: '>=18.0.0'}
|
|
2649
2649
|
hasBin: true
|
|
2650
2650
|
|
|
@@ -9088,7 +9088,7 @@ snapshots:
|
|
|
9088
9088
|
path-type: 4.0.0
|
|
9089
9089
|
yaml: 1.10.2
|
|
9090
9090
|
|
|
9091
|
-
coze-coding-dev-sdk@0.7.
|
|
9091
|
+
coze-coding-dev-sdk@0.7.28(openai@6.16.0(ws@8.19.0)(zod@4.3.6))(ws@8.19.0):
|
|
9092
9092
|
dependencies:
|
|
9093
9093
|
'@langchain/core': 1.1.17(openai@6.16.0(ws@8.19.0)(zod@4.3.6))
|
|
9094
9094
|
'@langchain/openai': 1.2.3(@langchain/core@1.1.17(openai@6.16.0(ws@8.19.0)(zod@4.3.6)))(ws@8.19.0)
|
|
@@ -111,8 +111,8 @@ importers:
|
|
|
111
111
|
specifier: ^1.1.1
|
|
112
112
|
version: 1.1.1(@types/react-dom@19.2.3(@types/react@19.2.10))(@types/react@19.2.10)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
|
|
113
113
|
coze-coding-dev-sdk:
|
|
114
|
-
specifier: ^0.7.
|
|
115
|
-
version: 0.7.
|
|
114
|
+
specifier: ^0.7.28
|
|
115
|
+
version: 0.7.28(openai@6.16.0(ws@8.19.0)(zod@4.3.6))(ws@8.19.0)
|
|
116
116
|
date-fns:
|
|
117
117
|
specifier: ^4.1.0
|
|
118
118
|
version: 4.1.0
|
|
@@ -3379,8 +3379,8 @@ packages:
|
|
|
3379
3379
|
typescript:
|
|
3380
3380
|
optional: true
|
|
3381
3381
|
|
|
3382
|
-
coze-coding-dev-sdk@0.7.
|
|
3383
|
-
resolution: {integrity: sha512-
|
|
3382
|
+
coze-coding-dev-sdk@0.7.28:
|
|
3383
|
+
resolution: {integrity: sha512-ku7AiVWUmgCrUuMT1m2iTmHIwG39EfmcAhPASd8M7XyKxIC6A1cjIIe/3YpStRsj8pMF9LU+pxHWxisf+F44oQ==}
|
|
3384
3384
|
engines: {node: '>=18.0.0'}
|
|
3385
3385
|
hasBin: true
|
|
3386
3386
|
|
|
@@ -9672,7 +9672,7 @@ snapshots:
|
|
|
9672
9672
|
optionalDependencies:
|
|
9673
9673
|
typescript: 5.9.3
|
|
9674
9674
|
|
|
9675
|
-
coze-coding-dev-sdk@0.7.
|
|
9675
|
+
coze-coding-dev-sdk@0.7.28(openai@6.16.0(ws@8.19.0)(zod@4.3.6))(ws@8.19.0):
|
|
9676
9676
|
dependencies:
|
|
9677
9677
|
'@langchain/core': 1.1.17(openai@6.16.0(ws@8.19.0)(zod@4.3.6))
|
|
9678
9678
|
'@langchain/openai': 1.2.3(@langchain/core@1.1.17(openai@6.16.0(ws@8.19.0)(zod@4.3.6)))(ws@8.19.0)
|
|
@@ -34,8 +34,8 @@ importers:
|
|
|
34
34
|
specifier: ^10.4.20
|
|
35
35
|
version: 10.4.27(postcss@8.5.8)
|
|
36
36
|
coze-coding-dev-sdk:
|
|
37
|
-
specifier: ^0.7.
|
|
38
|
-
version: 0.7.
|
|
37
|
+
specifier: ^0.7.28
|
|
38
|
+
version: 0.7.28(openai@6.27.0(ws@8.21.3)(zod@4.3.6))(ws@8.21.3)
|
|
39
39
|
eslint:
|
|
40
40
|
specifier: ^9
|
|
41
41
|
version: 9.39.4(jiti@2.7.0)
|
|
@@ -2498,8 +2498,8 @@ packages:
|
|
|
2498
2498
|
typescript:
|
|
2499
2499
|
optional: true
|
|
2500
2500
|
|
|
2501
|
-
coze-coding-dev-sdk@0.7.
|
|
2502
|
-
resolution: {integrity: sha512-
|
|
2501
|
+
coze-coding-dev-sdk@0.7.28:
|
|
2502
|
+
resolution: {integrity: sha512-ku7AiVWUmgCrUuMT1m2iTmHIwG39EfmcAhPASd8M7XyKxIC6A1cjIIe/3YpStRsj8pMF9LU+pxHWxisf+F44oQ==}
|
|
2503
2503
|
engines: {node: '>=18.0.0'}
|
|
2504
2504
|
hasBin: true
|
|
2505
2505
|
|
|
@@ -8526,7 +8526,7 @@ snapshots:
|
|
|
8526
8526
|
optionalDependencies:
|
|
8527
8527
|
typescript: 5.9.3
|
|
8528
8528
|
|
|
8529
|
-
coze-coding-dev-sdk@0.7.
|
|
8529
|
+
coze-coding-dev-sdk@0.7.28(openai@6.27.0(ws@8.21.3)(zod@4.3.6))(ws@8.21.3):
|
|
8530
8530
|
dependencies:
|
|
8531
8531
|
'@langchain/core': 1.1.31(openai@6.27.0(ws@8.21.3)(zod@4.3.6))
|
|
8532
8532
|
'@langchain/openai': 1.2.12(@langchain/core@1.1.31(openai@6.27.0(ws@8.21.3)(zod@4.3.6)))(ws@8.21.3)
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@mariozechner/pi-ai": "^0.63.2",
|
|
23
23
|
"@mariozechner/pi-coding-agent": "^0.63.2",
|
|
24
24
|
"@sinclair/typebox": "^0.34.48",
|
|
25
|
-
"coze-coding-dev-sdk": "^0.7.
|
|
25
|
+
"coze-coding-dev-sdk": "^0.7.28",
|
|
26
26
|
"@radix-ui/react-select": "^2.2.6",
|
|
27
27
|
"@radix-ui/react-slot": "^1.2.4",
|
|
28
28
|
"@streamdown/code": "^1.1.1",
|
|
@@ -36,8 +36,8 @@ importers:
|
|
|
36
36
|
specifier: ^2.1.1
|
|
37
37
|
version: 2.1.1
|
|
38
38
|
coze-coding-dev-sdk:
|
|
39
|
-
specifier: ^0.7.
|
|
40
|
-
version: 0.7.
|
|
39
|
+
specifier: ^0.7.28
|
|
40
|
+
version: 0.7.28(openai@6.34.0(ws@8.20.0)(zod@4.3.6))(ws@8.20.0)
|
|
41
41
|
express:
|
|
42
42
|
specifier: ^4.21.2
|
|
43
43
|
version: 4.22.1
|
|
@@ -2085,8 +2085,8 @@ packages:
|
|
|
2085
2085
|
cose-base@2.2.0:
|
|
2086
2086
|
resolution: {integrity: sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==}
|
|
2087
2087
|
|
|
2088
|
-
coze-coding-dev-sdk@0.7.
|
|
2089
|
-
resolution: {integrity: sha512-
|
|
2088
|
+
coze-coding-dev-sdk@0.7.28:
|
|
2089
|
+
resolution: {integrity: sha512-ku7AiVWUmgCrUuMT1m2iTmHIwG39EfmcAhPASd8M7XyKxIC6A1cjIIe/3YpStRsj8pMF9LU+pxHWxisf+F44oQ==}
|
|
2090
2090
|
engines: {node: '>=18.0.0'}
|
|
2091
2091
|
hasBin: true
|
|
2092
2092
|
|
|
@@ -6120,7 +6120,7 @@ snapshots:
|
|
|
6120
6120
|
dependencies:
|
|
6121
6121
|
layout-base: 2.0.1
|
|
6122
6122
|
|
|
6123
|
-
coze-coding-dev-sdk@0.7.
|
|
6123
|
+
coze-coding-dev-sdk@0.7.28(openai@6.34.0(ws@8.20.0)(zod@4.3.6))(ws@8.20.0):
|
|
6124
6124
|
dependencies:
|
|
6125
6125
|
'@langchain/core': 1.1.40(openai@6.34.0(ws@8.20.0)(zod@4.3.6))(ws@8.20.0)
|
|
6126
6126
|
'@langchain/openai': 1.4.3(@langchain/core@1.1.40(openai@6.34.0(ws@8.20.0)(zod@4.3.6))(ws@8.20.0))(ws@8.20.0)
|
|
@@ -5,10 +5,14 @@ project_type = "miniprogram"
|
|
|
5
5
|
|
|
6
6
|
[dev]
|
|
7
7
|
build = ["bash", ".cozeproj/scripts/dev_build.sh"]
|
|
8
|
+
build_win = ["powershell.exe", "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", ".cozeproj/scripts/dev_build.ps1"]
|
|
8
9
|
run = ["bash", ".cozeproj/scripts/dev_run.sh"]
|
|
10
|
+
run_win = ["powershell.exe", "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", ".cozeproj/scripts/dev_run.ps1"]
|
|
9
11
|
deps = ["git"] # -> apt install git
|
|
10
12
|
pack = ["bash", ".cozeproj/scripts/pack.sh"]
|
|
13
|
+
pack_win = ["powershell.exe", "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", ".cozeproj/scripts/pack.ps1"]
|
|
11
14
|
validate = ["bash", ".cozeproj/scripts/validate.sh"]
|
|
15
|
+
validate_win = ["powershell.exe", "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", ".cozeproj/scripts/validate.ps1"]
|
|
12
16
|
|
|
13
17
|
[deploy]
|
|
14
18
|
build = ["bash", ".cozeproj/scripts/deploy_build.sh"]
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
$ErrorActionPreference = "Stop"
|
|
2
|
+
|
|
3
|
+
function Stop-ProcessTree([int] $processId) {
|
|
4
|
+
if ($processId -gt 0 -and (Get-Process -Id $processId -ErrorAction SilentlyContinue)) {
|
|
5
|
+
& taskkill.exe /PID $processId /T /F *> $null
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function Stop-ListeningProcess([int] $port) {
|
|
10
|
+
Get-NetTCPConnection -LocalPort $port -State Listen -ErrorAction SilentlyContinue |
|
|
11
|
+
Select-Object -ExpandProperty OwningProcess -Unique |
|
|
12
|
+
ForEach-Object { Stop-ProcessTree $_ }
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function Start-DevProcess([string] $workingDirectory, [string] $logFile, [hashtable] $environment) {
|
|
16
|
+
$previousEnvironment = @{}
|
|
17
|
+
foreach ($key in $environment.Keys) {
|
|
18
|
+
$previousEnvironment[$key] = [Environment]::GetEnvironmentVariable($key, 'Process')
|
|
19
|
+
[Environment]::SetEnvironmentVariable($key, $environment[$key], 'Process')
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
return Start-Process -FilePath "pnpm.cmd" -ArgumentList @("dev") -WorkingDirectory $workingDirectory -RedirectStandardOutput $logFile -RedirectStandardError "$logFile.error" -PassThru
|
|
24
|
+
} finally {
|
|
25
|
+
foreach ($key in $environment.Keys) {
|
|
26
|
+
[Environment]::SetEnvironmentVariable($key, $previousEnvironment[$key], 'Process')
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
$workspace = if ($env:COZE_WORKSPACE_PATH) { $env:COZE_WORKSPACE_PATH } else { (Get-Location).Path }
|
|
32
|
+
$port = if ($env:DEPLOY_RUN_PORT) { [int] $env:DEPLOY_RUN_PORT } elseif ($env:PORT) { [int] $env:PORT } else { <%= port %> }
|
|
33
|
+
$serverPort = if ($env:SERVER_PORT) { [int] $env:SERVER_PORT } else { <%= serverPort %> }
|
|
34
|
+
$logDirectory = if ($env:COZE_LOG_DIR) { $env:COZE_LOG_DIR } else { Join-Path $workspace "logs" }
|
|
35
|
+
$logFile = Join-Path $logDirectory "dev.log"
|
|
36
|
+
$pidFile = Join-Path $logDirectory "dev.pid"
|
|
37
|
+
New-Item -ItemType Directory -Force -Path $logDirectory | Out-Null
|
|
38
|
+
|
|
39
|
+
if (Test-Path $pidFile) {
|
|
40
|
+
Stop-ProcessTree ([int] (Get-Content $pidFile -Raw))
|
|
41
|
+
Remove-Item $pidFile -Force
|
|
42
|
+
}
|
|
43
|
+
Stop-ListeningProcess $port
|
|
44
|
+
Stop-ListeningProcess $serverPort
|
|
45
|
+
|
|
46
|
+
$environment = @{ PORT = "$port"; SERVER_PORT = "$serverPort" }
|
|
47
|
+
if ($env:COZE_PROJECT_DOMAIN_DEFAULT) {
|
|
48
|
+
$environment.PROJECT_DOMAIN = $env:COZE_PROJECT_DOMAIN_DEFAULT
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
$process = Start-DevProcess $workspace $logFile $environment
|
|
52
|
+
$process.Id | Set-Content $pidFile
|
|
53
|
+
Start-Sleep -Seconds 1
|
|
54
|
+
if ($process.HasExited) {
|
|
55
|
+
Get-Content "$logFile.error" -Tail 20 -ErrorAction SilentlyContinue
|
|
56
|
+
Remove-Item $pidFile -Force -ErrorAction SilentlyContinue
|
|
57
|
+
exit 1
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
Write-Host "Taro H5 and NestJS services started. PID: $($process.Id)"
|
|
61
|
+
Write-Host "Web port: $port; server port: $serverPort"
|
|
62
|
+
Write-Host "Log file: $logFile"
|
|
@@ -204,8 +204,8 @@ importers:
|
|
|
204
204
|
specifier: 2.95.3
|
|
205
205
|
version: 2.95.3
|
|
206
206
|
coze-coding-dev-sdk:
|
|
207
|
-
specifier: ^0.7.
|
|
208
|
-
version: 0.7.
|
|
207
|
+
specifier: ^0.7.28
|
|
208
|
+
version: 0.7.28(openai@6.16.0(ws@8.19.0)(zod@4.3.5))(ws@8.19.0)
|
|
209
209
|
dotenv:
|
|
210
210
|
specifier: ^17.2.3
|
|
211
211
|
version: 17.2.3
|
|
@@ -5416,8 +5416,8 @@ packages:
|
|
|
5416
5416
|
typescript:
|
|
5417
5417
|
optional: true
|
|
5418
5418
|
|
|
5419
|
-
coze-coding-dev-sdk@0.7.
|
|
5420
|
-
resolution: {integrity: sha512-
|
|
5419
|
+
coze-coding-dev-sdk@0.7.28:
|
|
5420
|
+
resolution: {integrity: sha512-ku7AiVWUmgCrUuMT1m2iTmHIwG39EfmcAhPASd8M7XyKxIC6A1cjIIe/3YpStRsj8pMF9LU+pxHWxisf+F44oQ==}
|
|
5421
5421
|
engines: {node: '>=18.0.0'}
|
|
5422
5422
|
hasBin: true
|
|
5423
5423
|
|
|
@@ -17159,7 +17159,7 @@ snapshots:
|
|
|
17159
17159
|
optionalDependencies:
|
|
17160
17160
|
typescript: 5.9.3
|
|
17161
17161
|
|
|
17162
|
-
coze-coding-dev-sdk@0.7.
|
|
17162
|
+
coze-coding-dev-sdk@0.7.28(openai@6.16.0(ws@8.19.0)(zod@4.3.5))(ws@8.19.0):
|
|
17163
17163
|
dependencies:
|
|
17164
17164
|
'@langchain/core': 1.1.16(openai@6.16.0(ws@8.19.0)(zod@4.3.5))
|
|
17165
17165
|
'@langchain/openai': 1.2.3(@langchain/core@1.1.16(openai@6.16.0(ws@8.19.0)(zod@4.3.5)))(ws@8.19.0)
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@nestjs/core": "^10.4.15",
|
|
18
18
|
"@nestjs/platform-express": "^10.4.15",
|
|
19
19
|
"@supabase/supabase-js": "2.95.3",
|
|
20
|
-
"coze-coding-dev-sdk": "^0.7.
|
|
20
|
+
"coze-coding-dev-sdk": "^0.7.28",
|
|
21
21
|
"dotenv": "^17.2.3",
|
|
22
22
|
"drizzle-kit": "^0.31.8",
|
|
23
23
|
"drizzle-orm": "^0.45.1",
|
|
@@ -32,8 +32,8 @@ importers:
|
|
|
32
32
|
specifier: ^10.4.20
|
|
33
33
|
version: 10.4.23(postcss@8.5.6)
|
|
34
34
|
coze-coding-dev-sdk:
|
|
35
|
-
specifier: ^0.7.
|
|
36
|
-
version: 0.7.
|
|
35
|
+
specifier: ^0.7.28
|
|
36
|
+
version: 0.7.28(openai@6.16.0(ws@8.19.0)(zod@4.3.5))(ws@8.19.0)
|
|
37
37
|
esbuild:
|
|
38
38
|
specifier: ^0.27.2
|
|
39
39
|
version: 0.27.2
|
|
@@ -910,8 +910,8 @@ packages:
|
|
|
910
910
|
typescript:
|
|
911
911
|
optional: true
|
|
912
912
|
|
|
913
|
-
coze-coding-dev-sdk@0.7.
|
|
914
|
-
resolution: {integrity: sha512-
|
|
913
|
+
coze-coding-dev-sdk@0.7.28:
|
|
914
|
+
resolution: {integrity: sha512-ku7AiVWUmgCrUuMT1m2iTmHIwG39EfmcAhPASd8M7XyKxIC6A1cjIIe/3YpStRsj8pMF9LU+pxHWxisf+F44oQ==}
|
|
915
915
|
engines: {node: '>=18.0.0'}
|
|
916
916
|
hasBin: true
|
|
917
917
|
|
|
@@ -3281,7 +3281,7 @@ snapshots:
|
|
|
3281
3281
|
optionalDependencies:
|
|
3282
3282
|
typescript: 5.9.3
|
|
3283
3283
|
|
|
3284
|
-
coze-coding-dev-sdk@0.7.
|
|
3284
|
+
coze-coding-dev-sdk@0.7.28(openai@6.16.0(ws@8.19.0)(zod@4.3.5))(ws@8.19.0):
|
|
3285
3285
|
dependencies:
|
|
3286
3286
|
'@langchain/core': 1.1.16(openai@6.16.0(ws@8.19.0)(zod@4.3.5))
|
|
3287
3287
|
'@langchain/openai': 1.2.3(@langchain/core@1.1.16(openai@6.16.0(ws@8.19.0)(zod@4.3.5)))(ws@8.19.0)
|
package/lib/cli.js
CHANGED
|
@@ -2114,7 +2114,7 @@ const EventBuilder = {
|
|
|
2114
2114
|
};
|
|
2115
2115
|
|
|
2116
2116
|
var name = "@coze-arch/cli";
|
|
2117
|
-
var version = "0.1.4
|
|
2117
|
+
var version = "0.1.4";
|
|
2118
2118
|
var description = "coze coding devtools cli";
|
|
2119
2119
|
var license = "MIT";
|
|
2120
2120
|
var author = "fanwenjie.fe@bytedance.com";
|
|
@@ -9179,6 +9179,7 @@ const shouldRenderFile = (filePath) => {
|
|
|
9179
9179
|
'.prettierrc',
|
|
9180
9180
|
'.babelrc',
|
|
9181
9181
|
'.sh',
|
|
9182
|
+
'.ps1',
|
|
9182
9183
|
]);
|
|
9183
9184
|
|
|
9184
9185
|
const ext = path.extname(filePath).toLowerCase();
|