@coze-arch/cli 0.0.36-alpha.8cf839 → 0.0.36-alpha.9ee522
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/docs/deploy.md +8 -1
- package/lib/__templates__/expo/.cozeproj/scripts/dev_run.sh +73 -18
- package/lib/__templates__/expo/pnpm-lock.yaml +5 -5
- package/lib/__templates__/expo/server/package.json +1 -1
- package/lib/__templates__/nextjs/scripts/dev.sh +10 -1
- package/lib/__templates__/phaser/scripts/dev.sh +3 -5
- package/lib/__templates__/phaser/scripts/spawn-detached.cjs +29 -0
- package/lib/__templates__/phaser/scripts/start.sh +3 -5
- package/lib/__templates__/taro/.cozeproj/scripts/dev_run.sh +20 -14
- package/lib/__templates__/taro/pnpm-lock.yaml +5 -5
- package/lib/__templates__/taro/server/package.json +1 -1
- package/lib/cli.js +573 -290
- package/lib/deploy/package-project.js +6 -0
- package/lib/deploy/package-project.py +3 -0
- package/package.json +1 -1
|
@@ -36,6 +36,7 @@ const LOCAL_METADATA_FILES = new Set([
|
|
|
36
36
|
]);
|
|
37
37
|
const UPLOAD_SESSION_TEMP_PREFIX = '.coze-deploy-upload-';
|
|
38
38
|
const REPRODUCIBLE_ARCHIVE_MTIME = new Date(0);
|
|
39
|
+
const PROJECT_METADATA_FILE_MODE = 0o644;
|
|
39
40
|
|
|
40
41
|
const parseArguments = argv => {
|
|
41
42
|
const positional = [];
|
|
@@ -193,6 +194,11 @@ const createTarGzWithoutRoot = async (sourceDir, outputPath, excludeCozeFile = f
|
|
|
193
194
|
filter: archivePath => shouldInclude(archivePath, excludeCozeFile),
|
|
194
195
|
gzip: true,
|
|
195
196
|
mtime: REPRODUCIBLE_ARCHIVE_MTIME,
|
|
197
|
+
onWriteEntry: entry => {
|
|
198
|
+
if (entry.path === '.coze' && entry.stat?.isFile()) {
|
|
199
|
+
entry.stat.mode = PROJECT_METADATA_FILE_MODE;
|
|
200
|
+
}
|
|
201
|
+
},
|
|
196
202
|
portable: true,
|
|
197
203
|
},
|
|
198
204
|
entries,
|
|
@@ -30,6 +30,7 @@ EXCLUDED_PARTS = {
|
|
|
30
30
|
UPLOAD_SESSION_FILENAME = ".coze-deploy-upload.json"
|
|
31
31
|
UPLOAD_SESSION_TEMP_PREFIX = ".coze-deploy-upload-"
|
|
32
32
|
HOST_LINK_FILENAME = ".host.json"
|
|
33
|
+
PROJECT_METADATA_FILE_MODE = 0o644
|
|
33
34
|
|
|
34
35
|
|
|
35
36
|
def build_command_env():
|
|
@@ -116,6 +117,8 @@ def should_exclude(tar_info: tarfile.TarInfo, exclude_coze_file=False):
|
|
|
116
117
|
return None
|
|
117
118
|
if any(part in EXCLUDED_PARTS for part in parts):
|
|
118
119
|
return None
|
|
120
|
+
if parts == (".coze",) and tar_info.isfile():
|
|
121
|
+
tar_info.mode = PROJECT_METADATA_FILE_MODE
|
|
119
122
|
return tar_info
|
|
120
123
|
|
|
121
124
|
|