@coze-arch/cli 0.1.4-alpha.e6e18e → 0.1.4-alpha.f69bb1
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/.cozeproj/scripts/dev_build.ps1 +1 -1
- package/lib/__templates__/expo/.cozeproj/scripts/dev_build.sh +3 -3
- package/lib/__templates__/expo/.cozeproj/scripts/dev_run.ps1 +2 -2
- package/lib/__templates__/expo/.cozeproj/scripts/dev_run.sh +2 -0
- package/lib/__templates__/expo/.cozeproj/scripts/prepare-node-modules.sh +114 -0
- package/lib/__templates__/expo/.cozeproj/scripts/prod_build.sh +3 -3
- package/lib/__templates__/expo/client/components/Screen.tsx +65 -25
- package/lib/__templates__/expo/client/heroui/components/toast/toast.tsx +6 -2
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-controllable-state.ts +1 -1
- package/lib/__templates__/expo/pnpm-lock.yaml +5 -5
- package/lib/__templates__/expo/server/package.json +1 -1
- package/lib/__templates__/nextjs/eslint.config.mjs +11 -5
- package/lib/__templates__/nextjs/next.config.ts +10 -0
- package/lib/__templates__/nextjs/package.json +3 -6
- package/lib/__templates__/nextjs/pnpm-lock.yaml +19 -950
- package/lib/__templates__/nextjs/scripts/build.ps1 +1 -1
- package/lib/__templates__/nextjs/scripts/build.sh +3 -2
- package/lib/__templates__/nextjs/scripts/dev.ps1 +2 -2
- package/lib/__templates__/nextjs/scripts/dev.sh +10 -5
- package/lib/__templates__/nextjs/scripts/prepare-next-output.sh +62 -0
- package/lib/__templates__/nextjs/scripts/prepare-node-modules.sh +114 -0
- package/lib/__templates__/nextjs/scripts/prepare.sh +1 -4
- package/lib/__templates__/nextjs/src/app/layout.tsx +0 -4
- package/lib/__templates__/nextjs/src/server.ts +1 -1
- package/lib/__templates__/nextjs/template.config.js +0 -59
- package/lib/__templates__/nuxt-vue/package.json +1 -1
- package/lib/__templates__/nuxt-vue/pnpm-lock.yaml +5 -5
- package/lib/__templates__/nuxt-vue/scripts/build.sh +1 -1
- package/lib/__templates__/nuxt-vue/scripts/dev.sh +2 -0
- package/lib/__templates__/nuxt-vue/scripts/prepare-node-modules.sh +114 -0
- package/lib/__templates__/nuxt-vue/scripts/prepare.sh +1 -4
- package/lib/__templates__/pi-agent/package.json +1 -1
- package/lib/__templates__/pi-agent/pnpm-lock.yaml +5 -5
- package/lib/__templates__/taro/.cozeproj/scripts/deploy_build.sh +3 -2
- package/lib/__templates__/taro/.cozeproj/scripts/dev_build.sh +3 -0
- package/lib/__templates__/taro/.cozeproj/scripts/dev_run.sh +3 -1
- package/lib/__templates__/taro/.cozeproj/scripts/prepare-node-modules.sh +114 -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/scripts/build.ps1 +4 -1
- package/lib/__templates__/vite/scripts/build.sh +1 -1
- package/lib/__templates__/vite/scripts/dev.ps1 +7 -23
- package/lib/__templates__/vite/scripts/dev.sh +2 -0
- package/lib/__templates__/vite/scripts/prepare-node-modules.sh +114 -0
- package/lib/__templates__/vite/scripts/prepare.ps1 +6 -1
- package/lib/__templates__/vite/scripts/prepare.sh +1 -4
- package/lib/__templates__/vite/template.config.js +0 -59
- package/lib/cli.js +34 -12
- package/package.json +1 -1
- package/lib/__templates__/nextjs/.babelrc +0 -15
- package/lib/__templates__/vite/scripts/ensure-deps.ps1 +0 -33
|
@@ -1,33 +0,0 @@
|
|
|
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
|
-
$lockfile = Join-Path $workspace "pnpm-lock.yaml"
|
|
7
|
-
$modulesDirectory = Join-Path $workspace "node_modules"
|
|
8
|
-
$modulesManifest = Join-Path $modulesDirectory ".modules.yaml"
|
|
9
|
-
$lockHashFile = Join-Path $modulesDirectory ".coze-lockfile-sha256"
|
|
10
|
-
|
|
11
|
-
if (-not (Test-Path $lockfile)) {
|
|
12
|
-
throw "pnpm-lock.yaml is required to install dependencies."
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
$lockHash = (Get-FileHash -LiteralPath $lockfile -Algorithm SHA256).Hash
|
|
16
|
-
$cachedLockHash = if (Test-Path $lockHashFile) {
|
|
17
|
-
(Get-Content -LiteralPath $lockHashFile -Raw).Trim()
|
|
18
|
-
} else {
|
|
19
|
-
""
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if ((Test-Path $modulesManifest) -and $cachedLockHash -eq $lockHash) {
|
|
23
|
-
Write-Host "Dependencies already match pnpm-lock.yaml; skipping install."
|
|
24
|
-
return
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
Write-Host "Installing dependencies..."
|
|
28
|
-
& pnpm install --frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
|
|
29
|
-
if ($LASTEXITCODE -ne 0) {
|
|
30
|
-
throw "pnpm install failed with exit code $LASTEXITCODE."
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
Set-Content -LiteralPath $lockHashFile -Value $lockHash -NoNewline
|