@cloudbase/manager-node 4.6.4 → 4.6.6-beta.0
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/cloudrun/index.js
CHANGED
|
@@ -180,7 +180,7 @@ class CloudRunService {
|
|
|
180
180
|
/**
|
|
181
181
|
* 上传部署包
|
|
182
182
|
*/
|
|
183
|
-
const zipFile = await codeToZip(targetPath, { installDependency: true });
|
|
183
|
+
const zipFile = await codeToZip(targetPath, { installDependency: (serverConfig === null || serverConfig === void 0 ? void 0 : serverConfig.InstallDependency) !== undefined ? serverConfig.InstallDependency : true });
|
|
184
184
|
await (0, utils_1.upload)({
|
|
185
185
|
url: uploadUrl,
|
|
186
186
|
file: zipFile,
|
|
@@ -196,7 +196,7 @@ class CloudRunService {
|
|
|
196
196
|
if (await this._checkFunctionExist(serverName)) {
|
|
197
197
|
// 更新
|
|
198
198
|
const serverDetail = await this.detail({ serverName });
|
|
199
|
-
const _serverConfig = Object.assign(Object.assign({}, serverConfig), ((serverDetail === null || serverDetail === void 0 ? void 0 : serverDetail.ServerConfig.Tag) === 'function:' ? { Port: 3000 } : {}) // 函数型不能指定端口,需要固定为3000
|
|
199
|
+
const _serverConfig = Object.assign(Object.assign(Object.assign({}, serverConfig), { OpenAccessTypes: ['OA', 'PUBLIC', 'MINIAPP'] }), ((serverDetail === null || serverDetail === void 0 ? void 0 : serverDetail.ServerConfig.Tag) === 'function:' ? { Port: 3000 } : {}) // 函数型不能指定端口,需要固定为3000
|
|
200
200
|
);
|
|
201
201
|
if ((serverDetail === null || serverDetail === void 0 ? void 0 : serverDetail.ServerConfig.Tag) === 'function:') {
|
|
202
202
|
deployInfo.BuildPacks = {
|
|
@@ -231,7 +231,7 @@ class CloudRunService {
|
|
|
231
231
|
RepoLanguage: 'Node.js'
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
|
-
const _serverConfig = Object.assign(Object.assign(Object.assign({ OpenAccessTypes: ['OA', 'PUBLIC'],
|
|
234
|
+
const _serverConfig = Object.assign(Object.assign(Object.assign({ OpenAccessTypes: ['OA', 'PUBLIC', 'MINIAPP'],
|
|
235
235
|
// Cpu: 0,
|
|
236
236
|
// Mem: 0,
|
|
237
237
|
MinNum: 0,
|
package/package.json
CHANGED
|
@@ -99,7 +99,7 @@ export declare class CloudRunService {
|
|
|
99
99
|
deploy(params: {
|
|
100
100
|
serverName: string;
|
|
101
101
|
targetPath: string;
|
|
102
|
-
serverConfig?: Partial<Pick<ICloudrunServerBaseConfig, 'OpenAccessTypes' | 'Cpu' | 'Mem' | 'MinNum' | 'MaxNum' | 'PolicyDetails' | 'CustomLogs' | 'EnvParams' | 'Port' | 'Dockerfile' | 'BuildDir' | 'InternalAccess' | 'InternalDomain' | 'EntryPoint' | 'Cmd'>>;
|
|
102
|
+
serverConfig?: Partial<Pick<ICloudrunServerBaseConfig, 'OpenAccessTypes' | 'Cpu' | 'Mem' | 'MinNum' | 'MaxNum' | 'PolicyDetails' | 'CustomLogs' | 'EnvParams' | 'Port' | 'Dockerfile' | 'BuildDir' | 'InternalAccess' | 'InternalDomain' | 'EntryPoint' | 'Cmd' | 'InstallDependency'>>;
|
|
103
103
|
}): Promise<IResponseInfo>;
|
|
104
104
|
/**
|
|
105
105
|
* 获取云托管服务模板列表
|
package/types/cloudrun/type.d.ts
CHANGED
|
@@ -245,6 +245,10 @@ export interface ICloudrunServerBaseConfig {
|
|
|
245
245
|
* @example ["echo", "test"]
|
|
246
246
|
*/
|
|
247
247
|
Cmd?: string[];
|
|
248
|
+
/**
|
|
249
|
+
* 是否在线安装依赖,true 则本地不打包 node_modules,依赖在线装(如Docker)
|
|
250
|
+
*/
|
|
251
|
+
InstallDependency?: boolean;
|
|
248
252
|
}
|
|
249
253
|
export interface IDiffConfigItem {
|
|
250
254
|
Key: string;
|