Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Commit 37e8e45

Browse files
committed
rm limit for miniapp
1 parent 812d2c7 commit 37e8e45

6 files changed

Lines changed: 0 additions & 36 deletions

File tree

lib/commands/functions/code-update.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
1414
const path_1 = __importDefault(require("path"));
1515
const error_1 = require("../../error");
1616
const function_1 = require("../../function");
17-
const env_1 = require("../../env");
1817
const utils_1 = require("../../utils");
1918
function codeUpdate(ctx, options) {
2019
return __awaiter(this, void 0, void 0, function* () {
2120
const { name, envId, config, functions } = ctx;
22-
const envInfo = yield env_1.getEnvInfo(envId);
23-
if (envInfo.Source === 'miniapp') {
24-
throw new error_1.CloudBaseError('无法更新小程序云函数代码!');
25-
}
2621
const { codeSecret } = options;
2722
if (!name) {
2823
throw new error_1.CloudBaseError('请指定函数名称!');

lib/commands/functions/delete.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,9 @@ const inquirer_1 = __importDefault(require("inquirer"));
1515
const error_1 = require("../../error");
1616
const function_1 = require("../../function");
1717
const logger_1 = require("../../logger");
18-
const env_1 = require("../../env");
1918
function deleteFunc(ctx) {
2019
return __awaiter(this, void 0, void 0, function* () {
2120
const { name, envId, functions } = ctx;
22-
const envInfo = yield env_1.getEnvInfo(envId);
23-
if (envInfo.Source === 'miniapp') {
24-
throw new error_1.CloudBaseError('无法删除小程序云函数!');
25-
}
2621
let isBatchDelete = false;
2722
if (!name) {
2823
const answer = yield inquirer_1.default.prompt({

lib/commands/functions/deploy.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,9 @@ const inquirer_1 = __importDefault(require("inquirer"));
1616
const utils_1 = require("../../utils");
1717
const error_1 = require("../../error");
1818
const function_1 = require("../../function");
19-
const env_1 = require("../../env");
2019
function deploy(ctx, commandOptions) {
2120
return __awaiter(this, void 0, void 0, function* () {
2221
const { name, envId, config, functions } = ctx;
23-
const envInfo = yield env_1.getEnvInfo(envId);
24-
if (envInfo.Source === 'miniapp') {
25-
throw new error_1.CloudBaseError('无法部署小程序云函数!');
26-
}
2722
const { force, codeSecret } = commandOptions;
2823
let isBatchCreating = false;
2924
if (!name) {

src/commands/functions/code-update.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,11 @@ import path from 'path'
22
import { FunctionContext } from '../../types'
33
import { CloudBaseError } from '../../error'
44
import { updateFunctionCode } from '../../function'
5-
import { getEnvInfo } from '../../env'
65
import { loadingFactory } from '../../utils'
76

87
export async function codeUpdate(ctx: FunctionContext, options) {
98
const { name, envId, config, functions } = ctx
109

11-
const envInfo = await getEnvInfo(envId)
12-
13-
if (envInfo.Source === 'miniapp') {
14-
throw new CloudBaseError('无法更新小程序云函数代码!')
15-
}
16-
1710
const { codeSecret } = options
1811

1912
if (!name) {

src/commands/functions/delete.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,10 @@ import { FunctionContext } from '../../types'
44
import { CloudBaseError } from '../../error'
55
import { deleteFunction, batchDeleteFunctions } from '../../function'
66
import { successLog } from '../../logger'
7-
import { getEnvInfo } from '../../env'
87

98
export async function deleteFunc(ctx: FunctionContext) {
109
const { name, envId, functions } = ctx
1110

12-
const envInfo = await getEnvInfo(envId)
13-
14-
if (envInfo.Source === 'miniapp') {
15-
throw new CloudBaseError('无法删除小程序云函数!')
16-
}
17-
1811
let isBatchDelete = false
1912

2013
// 不指定云函数名称,默认删除所有函数

src/commands/functions/deploy.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,10 @@ import { loadingFactory } from '../../utils'
44
import { CloudBaseError } from '../../error'
55
import { batchCreateFunctions, createFunction } from '../../function'
66
import { FunctionContext } from '../../types'
7-
import { getEnvInfo } from '../../env'
87

98
export async function deploy(ctx: FunctionContext, commandOptions) {
109
const { name, envId, config, functions } = ctx
1110

12-
const envInfo = await getEnvInfo(envId)
13-
14-
if (envInfo.Source === 'miniapp') {
15-
throw new CloudBaseError('无法部署小程序云函数!')
16-
}
17-
1811
const { force, codeSecret } = commandOptions
1912

2013
let isBatchCreating = false

0 commit comments

Comments
 (0)