@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.
@@ -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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coze-arch/cli",
3
- "version": "0.0.36-alpha.8cf839",
3
+ "version": "0.0.36-alpha.9ee522",
4
4
  "private": false,
5
5
  "description": "coze coding devtools cli",
6
6
  "license": "MIT",