@coze-arch/cli 0.1.4-alpha.0e7259 → 0.1.4-alpha.2217bc
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/prepare-node-modules.sh +1 -1
- package/lib/__templates__/nextjs/scripts/build.sh +0 -1
- package/lib/__templates__/nextjs/scripts/dev.sh +0 -2
- package/lib/__templates__/nextjs/scripts/prepare-node-modules.sh +1 -1
- package/lib/__templates__/nuxt-vue/scripts/prepare-node-modules.sh +1 -1
- package/lib/__templates__/taro/.cozeproj/scripts/prepare-node-modules.sh +1 -1
- package/lib/__templates__/vite/scripts/prepare-node-modules.sh +1 -1
- package/lib/cli.js +1 -1
- package/package.json +1 -1
- package/lib/__templates__/nextjs/scripts/prepare-next-output.sh +0 -62
|
@@ -72,7 +72,7 @@ cleanup_legacy_shadow_project() {
|
|
|
72
72
|
while IFS= read -r -d '' entry; do
|
|
73
73
|
name="$(basename "$entry")"
|
|
74
74
|
case "$name" in
|
|
75
|
-
node_modules
|
|
75
|
+
node_modules|client|server) continue ;;
|
|
76
76
|
esac
|
|
77
77
|
rm -rf "$entry"
|
|
78
78
|
done < <(find "$WORK_DIR" -mindepth 1 -maxdepth 1 -print0)
|
|
@@ -7,7 +7,6 @@ cd "${COZE_WORKSPACE_PATH}"
|
|
|
7
7
|
|
|
8
8
|
echo "Installing dependencies..."
|
|
9
9
|
bash "$COZE_WORKSPACE_PATH/scripts/prepare-node-modules.sh" --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
|
|
10
|
-
bash "$COZE_WORKSPACE_PATH/scripts/prepare-next-output.sh"
|
|
11
10
|
|
|
12
11
|
echo "Building the Next.js project..."
|
|
13
12
|
pnpm next build --webpack
|
|
@@ -56,7 +56,6 @@ kill_port_if_listening() {
|
|
|
56
56
|
echo "Clearing port ${DEPLOY_RUN_PORT} before start."
|
|
57
57
|
kill_port_if_listening
|
|
58
58
|
bash "${COZE_WORKSPACE_PATH}/scripts/prepare-node-modules.sh" --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
|
|
59
|
-
bash "${COZE_WORKSPACE_PATH}/scripts/prepare-next-output.sh"
|
|
60
59
|
echo "Starting HTTP service on port ${DEPLOY_RUN_PORT} for dev..."
|
|
61
60
|
|
|
62
61
|
# 测试环境保持服务为前台进程,便于 e2e 收集输出并停止进程。
|
|
@@ -229,7 +228,6 @@ fi
|
|
|
229
228
|
echo "Clearing port ${DEPLOY_RUN_PORT} before start."
|
|
230
229
|
kill_port_if_listening
|
|
231
230
|
bash "${COZE_WORKSPACE_PATH}/scripts/prepare-node-modules.sh" --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
|
|
232
|
-
bash "${COZE_WORKSPACE_PATH}/scripts/prepare-next-output.sh"
|
|
233
231
|
echo "Starting HTTP service on port ${DEPLOY_RUN_PORT} for dev..."
|
|
234
232
|
|
|
235
233
|
mkdir -p "${LOG_DIR}"
|
|
@@ -72,7 +72,7 @@ cleanup_legacy_shadow_project() {
|
|
|
72
72
|
while IFS= read -r -d '' entry; do
|
|
73
73
|
name="$(basename "$entry")"
|
|
74
74
|
case "$name" in
|
|
75
|
-
node_modules
|
|
75
|
+
node_modules|client|server) continue ;;
|
|
76
76
|
esac
|
|
77
77
|
rm -rf "$entry"
|
|
78
78
|
done < <(find "$WORK_DIR" -mindepth 1 -maxdepth 1 -print0)
|
|
@@ -72,7 +72,7 @@ cleanup_legacy_shadow_project() {
|
|
|
72
72
|
while IFS= read -r -d '' entry; do
|
|
73
73
|
name="$(basename "$entry")"
|
|
74
74
|
case "$name" in
|
|
75
|
-
node_modules
|
|
75
|
+
node_modules|client|server) continue ;;
|
|
76
76
|
esac
|
|
77
77
|
rm -rf "$entry"
|
|
78
78
|
done < <(find "$WORK_DIR" -mindepth 1 -maxdepth 1 -print0)
|
|
@@ -72,7 +72,7 @@ cleanup_legacy_shadow_project() {
|
|
|
72
72
|
while IFS= read -r -d '' entry; do
|
|
73
73
|
name="$(basename "$entry")"
|
|
74
74
|
case "$name" in
|
|
75
|
-
node_modules
|
|
75
|
+
node_modules|client|server) continue ;;
|
|
76
76
|
esac
|
|
77
77
|
rm -rf "$entry"
|
|
78
78
|
done < <(find "$WORK_DIR" -mindepth 1 -maxdepth 1 -print0)
|
|
@@ -72,7 +72,7 @@ cleanup_legacy_shadow_project() {
|
|
|
72
72
|
while IFS= read -r -d '' entry; do
|
|
73
73
|
name="$(basename "$entry")"
|
|
74
74
|
case "$name" in
|
|
75
|
-
node_modules
|
|
75
|
+
node_modules|client|server) continue ;;
|
|
76
76
|
esac
|
|
77
77
|
rm -rf "$entry"
|
|
78
78
|
done < <(find "$WORK_DIR" -mindepth 1 -maxdepth 1 -print0)
|
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-alpha.
|
|
2117
|
+
var version = "0.1.4-alpha.2217bc";
|
|
2118
2118
|
var description = "coze coding devtools cli";
|
|
2119
2119
|
var license = "MIT";
|
|
2120
2120
|
var author = "fanwenjie.fe@bytedance.com";
|
package/package.json
CHANGED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Keep Next.js compiler output off Coze Drive while leaving source files in place.
|
|
3
|
-
set -euo pipefail
|
|
4
|
-
|
|
5
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
|
|
6
|
-
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)"
|
|
7
|
-
|
|
8
|
-
DRIVE_ROOT="${COZE_DRIVE_ROOT:-/Coze/Drive}"
|
|
9
|
-
if [ -d "$DRIVE_ROOT" ]; then
|
|
10
|
-
DRIVE_ROOT="$(cd "$DRIVE_ROOT" && pwd -P)"
|
|
11
|
-
else
|
|
12
|
-
DRIVE_ROOT="${DRIVE_ROOT%/}"
|
|
13
|
-
fi
|
|
14
|
-
case "$PROJECT_ROOT" in
|
|
15
|
-
"$DRIVE_ROOT"|"$DRIVE_ROOT"/*) ;;
|
|
16
|
-
*) exit 0 ;;
|
|
17
|
-
esac
|
|
18
|
-
|
|
19
|
-
NM_ROOT="/tmp/nm"
|
|
20
|
-
PROJECT_ID="$(basename "$PROJECT_ROOT")-$(printf '%s' "$PROJECT_ROOT" | cksum | awk '{print $1}')"
|
|
21
|
-
NEXT_DIR="$NM_ROOT/$PROJECT_ID/.next"
|
|
22
|
-
LEGACY_NEXT_DIR="$NM_ROOT/next/$PROJECT_ID"
|
|
23
|
-
|
|
24
|
-
if [ -L "$NEXT_DIR" ]; then
|
|
25
|
-
current="$(readlink "$NEXT_DIR")"
|
|
26
|
-
if [ "$current" = "$PROJECT_ROOT/.next" ]; then
|
|
27
|
-
rm "$NEXT_DIR"
|
|
28
|
-
else
|
|
29
|
-
echo "[next] refusing to replace unmanaged local output symlink: $NEXT_DIR" >&2
|
|
30
|
-
exit 1
|
|
31
|
-
fi
|
|
32
|
-
elif [ -e "$NEXT_DIR" ] && [ ! -d "$NEXT_DIR" ]; then
|
|
33
|
-
echo "[next] local output path is not a directory: $NEXT_DIR" >&2
|
|
34
|
-
exit 1
|
|
35
|
-
fi
|
|
36
|
-
mkdir -p "$NEXT_DIR"
|
|
37
|
-
|
|
38
|
-
if [ -L "$PROJECT_ROOT/.next" ]; then
|
|
39
|
-
current="$(readlink "$PROJECT_ROOT/.next")"
|
|
40
|
-
if [ "$current" = "$NEXT_DIR" ]; then
|
|
41
|
-
exit 0
|
|
42
|
-
fi
|
|
43
|
-
if [ "$current" = "$LEGACY_NEXT_DIR" ]; then
|
|
44
|
-
rm "$PROJECT_ROOT/.next"
|
|
45
|
-
else
|
|
46
|
-
echo "[next] refusing to replace unmanaged symlink: $PROJECT_ROOT/.next" >&2
|
|
47
|
-
exit 1
|
|
48
|
-
fi
|
|
49
|
-
fi
|
|
50
|
-
|
|
51
|
-
if [ -e "$PROJECT_ROOT/.next" ]; then
|
|
52
|
-
rm -rf "$PROJECT_ROOT/.next"
|
|
53
|
-
fi
|
|
54
|
-
|
|
55
|
-
if ! ln -s "$NEXT_DIR" "$PROJECT_ROOT/.next"; then
|
|
56
|
-
if [ ! -L "$PROJECT_ROOT/.next" ] || [ "$(readlink "$PROJECT_ROOT/.next")" != "$NEXT_DIR" ]; then
|
|
57
|
-
echo "[next] failed to link $PROJECT_ROOT/.next to $NEXT_DIR" >&2
|
|
58
|
-
exit 1
|
|
59
|
-
fi
|
|
60
|
-
fi
|
|
61
|
-
|
|
62
|
-
echo "[next] Compiler output ready at $NEXT_DIR"
|