@cloudbase/manager-node 4.6.3-beta.0 → 4.6.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.
@@ -198,6 +198,12 @@ class CloudRunService {
198
198
  const serverDetail = await this.detail({ serverName });
199
199
  const _serverConfig = Object.assign(Object.assign({}, serverConfig), ((serverDetail === null || serverDetail === void 0 ? void 0 : serverDetail.ServerConfig.Tag) === 'function:' ? { Port: 3000 } : {}) // 函数型不能指定端口,需要固定为3000
200
200
  );
201
+ if ((serverDetail === null || serverDetail === void 0 ? void 0 : serverDetail.ServerConfig.Tag) === 'function:') {
202
+ deployInfo.BuildPacks = {
203
+ LanguageVersion: '20.18',
204
+ RepoLanguage: 'Node.js'
205
+ };
206
+ }
201
207
  deployInfo.ReleaseType = 'FULL';
202
208
  return this._upsertFunction(false, {
203
209
  name: serverName,
@@ -354,7 +360,7 @@ const SUBMIT_DIFF_MAP = {
354
360
  CustomLogs: 'LogPath'
355
361
  };
356
362
  /**
357
- * 将 object 参数转为 [{key:"Port", IntValue:80}] 的格式,并且剔除空字符串和空数组
363
+ * 将 object 参数转为 [{key:"Port", IntValue:80}] 的格式,并且剔除空字符串
358
364
  */
359
365
  function parseObjectToDiffConfigItem(data) {
360
366
  const kvs = Object.entries(data);
@@ -389,7 +395,7 @@ function parseObjectToDiffConfigItem(data) {
389
395
  Items.push({ Key, FloatValue: v });
390
396
  }
391
397
  else if (['OpenAccessTypes', 'EntryPoint', 'Cmd'].includes(k)) {
392
- v.length && Items.push({ Key, ArrayValue: v });
398
+ Items.push({ Key, ArrayValue: v });
393
399
  }
394
400
  else if (['PolicyDetails'].includes(k)) {
395
401
  Items.push({ Key, PolicyDetails: v });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/manager-node",
3
- "version": "4.6.3-beta.0",
3
+ "version": "4.6.4",
4
4
  "description": "The node manage service api for cloudbase.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -113,6 +113,6 @@ export declare function codeToZip(cwd: string, options?: {
113
113
  installDependency?: boolean;
114
114
  }): Promise<Buffer>;
115
115
  /**
116
- * 将 object 参数转为 [{key:"Port", IntValue:80}] 的格式,并且剔除空字符串和空数组
116
+ * 将 object 参数转为 [{key:"Port", IntValue:80}] 的格式,并且剔除空字符串
117
117
  */
118
118
  export declare function parseObjectToDiffConfigItem(data: Partial<ICloudrunServerBaseInfo>): IDiffConfigItem[];