@cloudbase/cli 2.10.1-alpha.0 → 2.10.1-alpha.2
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/dist/standalone/cli.js +381 -77
- package/package.json +1 -1
package/dist/standalone/cli.js
CHANGED
|
@@ -28141,6 +28141,99 @@ class MissingRefError extends Error {
|
|
|
28141
28141
|
exports["default"] = MissingRefError;
|
|
28142
28142
|
//# sourceMappingURL=ref_error.js.map
|
|
28143
28143
|
|
|
28144
|
+
/***/ }),
|
|
28145
|
+
|
|
28146
|
+
/***/ 5440:
|
|
28147
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
28148
|
+
|
|
28149
|
+
"use strict";
|
|
28150
|
+
|
|
28151
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
28152
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
28153
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
28154
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
28155
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
28156
|
+
};
|
|
28157
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
28158
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
28159
|
+
};
|
|
28160
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
28161
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
28162
|
+
};
|
|
28163
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
28164
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
28165
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28166
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
28167
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
28168
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
28169
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28170
|
+
});
|
|
28171
|
+
};
|
|
28172
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
28173
|
+
exports.LowCodeDepsInstall = void 0;
|
|
28174
|
+
const common_1 = __webpack_require__(48431);
|
|
28175
|
+
const decorators_1 = __webpack_require__(93480);
|
|
28176
|
+
const error_1 = __webpack_require__(66759);
|
|
28177
|
+
const utils_1 = __webpack_require__(27821);
|
|
28178
|
+
let LowCodeDepsInstall = class LowCodeDepsInstall extends common_1.Command {
|
|
28179
|
+
get options() {
|
|
28180
|
+
return {
|
|
28181
|
+
cmd: 'lowcode',
|
|
28182
|
+
childCmd: 'deps install',
|
|
28183
|
+
options: [
|
|
28184
|
+
{
|
|
28185
|
+
flags: '--force',
|
|
28186
|
+
desc: '重新安装并覆盖已有低码依赖'
|
|
28187
|
+
},
|
|
28188
|
+
{
|
|
28189
|
+
flags: '--registry <registry>',
|
|
28190
|
+
desc: '指定 npm registry 地址'
|
|
28191
|
+
}
|
|
28192
|
+
],
|
|
28193
|
+
desc: '安装低码依赖',
|
|
28194
|
+
requiredEnvId: false
|
|
28195
|
+
};
|
|
28196
|
+
}
|
|
28197
|
+
execute(options, log) {
|
|
28198
|
+
var _a, _b, _c, _d;
|
|
28199
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28200
|
+
const meta = yield (0, utils_1.getInstalledLowcodeMeta)();
|
|
28201
|
+
if (meta.satisfied && !options.force) {
|
|
28202
|
+
(_a = log === null || log === void 0 ? void 0 : log.info) === null || _a === void 0 ? void 0 : _a.call(log, `已检测到 ${utils_1.LOWCODE_PACKAGE_NAME}@${meta.version || 'unknown'},若需重装请使用 --force`);
|
|
28203
|
+
return;
|
|
28204
|
+
}
|
|
28205
|
+
const registry = options.registry;
|
|
28206
|
+
if (registry) {
|
|
28207
|
+
(_b = log === null || log === void 0 ? void 0 : log.info) === null || _b === void 0 ? void 0 : _b.call(log, `使用 registry: ${registry}`);
|
|
28208
|
+
}
|
|
28209
|
+
(_c = log === null || log === void 0 ? void 0 : log.info) === null || _c === void 0 ? void 0 : _c.call(log, `开始安装 ${utils_1.LOWCODE_PACKAGE_NAME}@${utils_1.LOWCODE_PACKAGE_RANGE} 到 ${(0, utils_1.getLowcodeHome)()}`);
|
|
28210
|
+
try {
|
|
28211
|
+
yield (0, utils_1.installLowcodeDeps)({ force: options.force, registry });
|
|
28212
|
+
}
|
|
28213
|
+
catch (e) {
|
|
28214
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
28215
|
+
throw new error_1.CloudBaseError(`低码依赖安装失败:${message}`);
|
|
28216
|
+
}
|
|
28217
|
+
(_d = log === null || log === void 0 ? void 0 : log.success) === null || _d === void 0 ? void 0 : _d.call(log, '低码依赖安装完成');
|
|
28218
|
+
});
|
|
28219
|
+
}
|
|
28220
|
+
};
|
|
28221
|
+
__decorate([
|
|
28222
|
+
(0, decorators_1.InjectParams)(),
|
|
28223
|
+
__param(0, (0, decorators_1.ArgsOptions)()),
|
|
28224
|
+
__param(1, (0, decorators_1.Log)()),
|
|
28225
|
+
__metadata("design:type", Function),
|
|
28226
|
+
__metadata("design:paramtypes", [Object, decorators_1.Logger]),
|
|
28227
|
+
__metadata("design:returntype", Promise)
|
|
28228
|
+
], LowCodeDepsInstall.prototype, "execute", null);
|
|
28229
|
+
LowCodeDepsInstall = __decorate([
|
|
28230
|
+
(0, common_1.ICommand)({
|
|
28231
|
+
supportPrivate: true
|
|
28232
|
+
})
|
|
28233
|
+
], LowCodeDepsInstall);
|
|
28234
|
+
exports.LowCodeDepsInstall = LowCodeDepsInstall;
|
|
28235
|
+
|
|
28236
|
+
|
|
28144
28237
|
/***/ }),
|
|
28145
28238
|
|
|
28146
28239
|
/***/ 5444:
|
|
@@ -47315,7 +47408,7 @@ module.exports = function generate_pattern(it, $keyword, $ruleType) {
|
|
|
47315
47408
|
/***/ ((module) => {
|
|
47316
47409
|
|
|
47317
47410
|
"use strict";
|
|
47318
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@cloudbase/cli","version":"2.10.1-alpha.
|
|
47411
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@cloudbase/cli","version":"2.10.1-alpha.2","description":"cli tool for cloudbase","main":"lib/index.js","scripts":{"build":"rimraf lib types && tsc --resolveJsonModule && cpx \\"src/**/*.html\\" lib","watch":"rimraf lib types && tsc -w","dev":"rimraf lib types && cpx \\"src/**/*.html\\" lib && tsc -w","eslint":"eslint \\"./**/*.ts\\"","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js --runInBand --forceExit --detectOpenHandles --coverage --verbose --testTimeout=10000","tsc":"tsc","pkg":"pkg ./bin/cloudbase.js --out-path ./pkg","postinstall":"node ./post-install.js || exit 0 && patch-package","prepublishOnly":"npm run build","debug":"bin/tcb.js lowcode watch","build:bundle":"webpack --config build/webpack/cli.cjs && webpack --config build/webpack/ccr.cjs","package:darwin-arm64":"OS=darwin ARCH=arm64 VERSION= node -e \\"require(\'child_process\').execSync(\'bash build/scripts/package.sh\',{stdio:\'inherit\'})\\"","package:darwin-x64":"OS=darwin ARCH=x64 VERSION= node -e \\"require(\'child_process\').execSync(\'bash build/scripts/package.sh\',{stdio:\'inherit\'})\\"","package:linux-arm64":"OS=linux ARCH=arm64 VERSION= node -e \\"require(\'child_process\').execSync(\'bash build/scripts/package.sh\',{stdio:\'inherit\'})\\"","package:linux-x64":"OS=linux ARCH=x64 VERSION= node -e \\"require(\'child_process\').execSync(\'bash build/scripts/package.sh\',{stdio:\'inherit\'})\\"","package:all":"bash build/scripts/build-all.sh","node:fetch:one":"node -e \\"require(\'child_process\').execSync(\'bash build/scripts/fetch-node.sh\',{stdio:\'inherit\'})\\"","node:fetch:all":"NODE_VERSION=22.18.0 bash build/scripts/fetch-node.sh --all","node:fetch:win-x64":"OS=windows ARCH=x64 NODE_VERSION=22.18.0 bash build/scripts/fetch-node.sh","node:fetch:win-arm64":"OS=windows ARCH=arm64 NODE_VERSION=22.18.0 bash build/scripts/fetch-node.sh","package:windows-x64":"OS=windows ARCH=x64 VERSION= node -e \\"require(\'child_process\').execSync(\'bash build/scripts/package.sh\',{stdio:\'inherit\'})\\"","package:windows-arm64":"OS=windows ARCH=arm64 VERSION= node -e \\"require(\'child_process\').execSync(\'bash build/scripts/package.sh\',{stdio:\'inherit\'})\\"","package:windows-all":"npm run -s node:fetch:win-x64 && npm run -s node:fetch:win-arm64 && npm run -s package:windows-x64 && npm run -s package:windows-arm64","package:npm":"npm run build && npm run build:bundle && bash build/scripts/prepare-publish.sh","out:prune":"bash build/scripts/prune-out.sh","i18n:scan":"i18next-scanner --config locales/i18next-scanner.config.js && node locales/scripts/generate.js","i18n:sync":"node locales/scripts/sync.js sync"},"repository":{"type":"git","url":"https://github.com/TencentCloudBase/cloud-base-cli.git"},"bin":{"ccr":"bin/ccr.js","cloudbase":"bin/cloudbase.js","cloudbase-mcp":"bin/cloudbase-mcp.cjs","tcb":"bin/tcb.js"},"husky":{"hooks":{"pre-commit":"npm run build"}},"author":"cwuyiqing@gmail.com","license":"ISC","dependencies":{"@cloudbase/cloud-api":"^0.5.5","@cloudbase/cloudbase-mcp":"^1.8.44","@cloudbase/framework-core":"^1.9.7","@cloudbase/functions-framework":"1.16.0","@cloudbase/iac-core":"0.0.3-alpha.11","@cloudbase/lowcode-cli":"^0.23.0","@cloudbase/manager-node":"4.6.5","@cloudbase/toolbox":"^0.7.9","@dotenvx/dotenvx":"^1.48.3","@musistudio/claude-code-router":"1.0.36","address":"^1.1.2","camelcase-keys":"^7.0.2","chalk":"^2.4.2","cli-table3":"^0.5.1","commander":"7","del":"^5.1.0","didyoumean":"^1.2.2","enquirer":"^2.3.6","execa":"^4.0.3","figlet":"^1.7.0","fs-extra":"^8.1.0","gradient-string":"^2.0.2","https-proxy-agent":"^5.0.1","i":"^0.3.7","inquirer":"^6.5.0","json-schema-to-typescript":"^14.0.5","lodash":"^4.17.21","log-symbols":"^3.0.0","lowdb":"^1.0.0","make-dir":"^3.0.0","node-fetch":"^2.6.0","nodemon":"^3.1.4","npm":"^11.5.2","open":"^7.0.0","ora":"^4.0.2","os-locale":"5.0.0","patch-package":"^8.0.0","portfinder":"^1.0.28","progress":"^2.0.3","query-string":"^6.8.1","reflect-metadata":"^0.1.13","semver":"^7.3.7","simple-git":"^3.28.0","tar-fs":"^2.0.1","terminal-link":"^2.1.1","toml":"^3.0.0","unzipper":"^0.10.10","update-notifier":"^4.0.0","xdg-basedir":"^4.0.0","yargs":"^16.2.0","yargs-parser":"^21.0.1","zod":"^4.0.13"},"devDependencies":{"@babel/parser":"^7.28.4","@babel/traverse":"^7.28.4","@babel/types":"^7.28.4","@types/fs-extra":"^11.0.4","@types/jest":"^27","@types/koa__router":"^8.0.11","@types/lodash":"^4.14.182","@types/node":"^12.12.38","@types/node-fetch":"^2.5.4","@types/react":"^17.0.37","@types/semver":"^7.3.9","@types/unzipper":"^0.10.11","@types/webpack-dev-server":"^3.11.1","@typescript-eslint/eslint-plugin":"^4.8.1","@typescript-eslint/parser":"^4.8.1","cpx":"^1.5.0","eslint":"^7.14.0","eslint-config-alloy":"^3.8.2","husky":"^3.0.9","i18next-scanner":"^4.6.0","jest":"^27","rimraf":"^3.0.2","ts-jest":"^27","typescript":"^4.7.2","webpack":"^5.92.0","webpack-cli":"^5.1.4"},"packageManager":"yarn@3.6.2+sha512.2c2f8b9615e6659773f65cdec7cf92ef773a98a99e611579601f61c7a91ec94c89c929aac86f1cee819421a9b0db7acfd53ec3ebb95af44f77f77634b08b9557"}');
|
|
47319
47412
|
|
|
47320
47413
|
/***/ }),
|
|
47321
47414
|
|
|
@@ -185762,29 +185855,6 @@ module.exports = SelectStream;
|
|
|
185762
185855
|
|
|
185763
185856
|
"use strict";
|
|
185764
185857
|
|
|
185765
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
185766
|
-
if (k2 === undefined) k2 = k;
|
|
185767
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
185768
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
185769
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
185770
|
-
}
|
|
185771
|
-
Object.defineProperty(o, k2, desc);
|
|
185772
|
-
}) : (function(o, m, k, k2) {
|
|
185773
|
-
if (k2 === undefined) k2 = k;
|
|
185774
|
-
o[k2] = m[k];
|
|
185775
|
-
}));
|
|
185776
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
185777
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
185778
|
-
}) : function(o, v) {
|
|
185779
|
-
o["default"] = v;
|
|
185780
|
-
});
|
|
185781
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
185782
|
-
if (mod && mod.__esModule) return mod;
|
|
185783
|
-
var result = {};
|
|
185784
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
185785
|
-
__setModuleDefault(result, mod);
|
|
185786
|
-
return result;
|
|
185787
|
-
};
|
|
185788
185858
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
185789
185859
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
185790
185860
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -185794,20 +185864,61 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
185794
185864
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
185795
185865
|
});
|
|
185796
185866
|
};
|
|
185867
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
185868
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
185869
|
+
};
|
|
185870
|
+
var _a;
|
|
185797
185871
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
185798
|
-
exports.getMergedOptions = exports.getCmdConfig = exports.getLowcodeCli = exports.promisifyProcess = void 0;
|
|
185872
|
+
exports.getMergedOptions = exports.getCmdConfig = exports.getInstalledLowcodeMeta = exports.getLowcodeCli = exports.installLowcodeDeps = exports.getLowcodeManifestPath = exports.getLowcodeNodeModules = exports.getLowcodeHome = exports.promisifyProcess = exports.LOWCODE_PACKAGE_RANGE = exports.LOWCODE_PACKAGE_NAME = void 0;
|
|
185799
185873
|
const lodash_1 = __webpack_require__(24924);
|
|
185800
185874
|
const toolbox_1 = __webpack_require__(25901);
|
|
185875
|
+
const child_process_1 = __webpack_require__(35317);
|
|
185876
|
+
const os_1 = __importDefault(__webpack_require__(70857));
|
|
185877
|
+
const path_1 = __importDefault(__webpack_require__(16928));
|
|
185878
|
+
const fs_extra_1 = __importDefault(__webpack_require__(21605));
|
|
185879
|
+
const semver_1 = __importDefault(__webpack_require__(21970));
|
|
185880
|
+
const enquirer_1 = __webpack_require__(21124);
|
|
185881
|
+
const { createRequire } = __webpack_require__(73339);
|
|
185882
|
+
const LOWCODE_PKG_NAME = '@cloudbase/lowcode-cli';
|
|
185883
|
+
const LOWCODE_PKG_RANGE = ((_a = (__webpack_require__(8330).dependencies)) === null || _a === void 0 ? void 0 : _a[LOWCODE_PKG_NAME]) || 'latest';
|
|
185884
|
+
exports.LOWCODE_PACKAGE_NAME = LOWCODE_PKG_NAME;
|
|
185885
|
+
exports.LOWCODE_PACKAGE_RANGE = LOWCODE_PKG_RANGE;
|
|
185886
|
+
function resolveLowcodeHome() {
|
|
185887
|
+
const envHome = process.env.CLOUDBASE_LOWCODE_HOME;
|
|
185888
|
+
const normalize = (val) => {
|
|
185889
|
+
if (val === null || val === undefined)
|
|
185890
|
+
return '';
|
|
185891
|
+
return String(val).trim();
|
|
185892
|
+
};
|
|
185893
|
+
const envPath = normalize(envHome);
|
|
185894
|
+
if (envPath) {
|
|
185895
|
+
try {
|
|
185896
|
+
return path_1.default.resolve(envPath);
|
|
185897
|
+
}
|
|
185898
|
+
catch (e) {
|
|
185899
|
+
}
|
|
185900
|
+
}
|
|
185901
|
+
return path_1.default.join(String(os_1.default.homedir()), '.cloudbase', 'lowcode');
|
|
185902
|
+
}
|
|
185903
|
+
const LOWCODE_HOME = String(resolveLowcodeHome());
|
|
185904
|
+
const LOWCODE_NODE_MODULES = path_1.default.join(LOWCODE_HOME, 'node_modules');
|
|
185905
|
+
const LOWCODE_MANIFEST = path_1.default.join(LOWCODE_HOME, 'manifest.json');
|
|
185906
|
+
let lowcodeCliCache = null;
|
|
185801
185907
|
function promisifyProcess(p, pipe = false) {
|
|
185802
185908
|
return new Promise((resolve, reject) => {
|
|
185909
|
+
var _a, _b;
|
|
185803
185910
|
let stdout = '';
|
|
185804
185911
|
let stderr = '';
|
|
185805
|
-
p.stdout
|
|
185806
|
-
stdout
|
|
185807
|
-
|
|
185808
|
-
|
|
185809
|
-
|
|
185810
|
-
|
|
185912
|
+
if (p.stdout) {
|
|
185913
|
+
p.stdout.on('data', (data) => {
|
|
185914
|
+
stdout += String(data);
|
|
185915
|
+
});
|
|
185916
|
+
}
|
|
185917
|
+
if (p.stderr) {
|
|
185918
|
+
p.stderr.on('data', (data) => {
|
|
185919
|
+
stderr += String(data);
|
|
185920
|
+
});
|
|
185921
|
+
}
|
|
185811
185922
|
p.on('error', reject);
|
|
185812
185923
|
p.on('exit', (exitCode) => {
|
|
185813
185924
|
exitCode === 0
|
|
@@ -185815,27 +185926,223 @@ function promisifyProcess(p, pipe = false) {
|
|
|
185815
185926
|
: reject(new toolbox_1.CloudBaseError(stderr || String(exitCode)));
|
|
185816
185927
|
});
|
|
185817
185928
|
if (pipe) {
|
|
185818
|
-
p.stdout.pipe(process.stdout);
|
|
185819
|
-
p.stderr.pipe(process.stderr);
|
|
185929
|
+
(_a = p.stdout) === null || _a === void 0 ? void 0 : _a.pipe(process.stdout);
|
|
185930
|
+
(_b = p.stderr) === null || _b === void 0 ? void 0 : _b.pipe(process.stderr);
|
|
185820
185931
|
}
|
|
185821
185932
|
});
|
|
185822
185933
|
}
|
|
185823
185934
|
exports.promisifyProcess = promisifyProcess;
|
|
185935
|
+
function getLowcodeHome() {
|
|
185936
|
+
return LOWCODE_HOME;
|
|
185937
|
+
}
|
|
185938
|
+
exports.getLowcodeHome = getLowcodeHome;
|
|
185939
|
+
function getLowcodeNodeModules() {
|
|
185940
|
+
return LOWCODE_NODE_MODULES;
|
|
185941
|
+
}
|
|
185942
|
+
exports.getLowcodeNodeModules = getLowcodeNodeModules;
|
|
185943
|
+
function getLowcodeManifestPath() {
|
|
185944
|
+
return LOWCODE_MANIFEST;
|
|
185945
|
+
}
|
|
185946
|
+
exports.getLowcodeManifestPath = getLowcodeManifestPath;
|
|
185947
|
+
function resolveNpmInvocation() {
|
|
185948
|
+
const execPathEnv = process.env.npm_execpath;
|
|
185949
|
+
if (typeof execPathEnv === 'string' && execPathEnv.trim()) {
|
|
185950
|
+
const cliPath = execPathEnv.trim();
|
|
185951
|
+
if (fs_extra_1.default.existsSync(cliPath)) {
|
|
185952
|
+
return { command: String(process.execPath), baseArgs: [cliPath] };
|
|
185953
|
+
}
|
|
185954
|
+
}
|
|
185955
|
+
const whichNpm = (0, child_process_1.spawnSync)('npm', ['--version'], { stdio: 'ignore' });
|
|
185956
|
+
if (whichNpm.status === 0) {
|
|
185957
|
+
return { command: 'npm', baseArgs: [] };
|
|
185958
|
+
}
|
|
185959
|
+
return { command: 'npm', baseArgs: [] };
|
|
185960
|
+
}
|
|
185961
|
+
function formatInstallHint() {
|
|
185962
|
+
const cacheDir = getLowcodeHome();
|
|
185963
|
+
return [
|
|
185964
|
+
'缺少 lowcode 相关依赖,请先执行:',
|
|
185965
|
+
' tcb lowcode deps install',
|
|
185966
|
+
`进行安装,默认安装路径:${cacheDir}`,
|
|
185967
|
+
'可通过环境变量 CLOUDBASE_LOWCODE_HOME 指定其他缓存目录'
|
|
185968
|
+
].join('\n');
|
|
185969
|
+
}
|
|
185970
|
+
function exitWithInstallHint() {
|
|
185971
|
+
console.log(`\n${formatInstallHint()}\n`);
|
|
185972
|
+
process.emit('tcbExit');
|
|
185973
|
+
process.exit(1);
|
|
185974
|
+
}
|
|
185975
|
+
function canPromptInstallDeps() {
|
|
185976
|
+
return Boolean(process.stdin.isTTY && process.stdout.isTTY);
|
|
185977
|
+
}
|
|
185978
|
+
let hasTriedAutoInstall = false;
|
|
185979
|
+
function promptAndInstallLowcodeDeps() {
|
|
185980
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
185981
|
+
if (hasTriedAutoInstall || !canPromptInstallDeps()) {
|
|
185982
|
+
return false;
|
|
185983
|
+
}
|
|
185984
|
+
hasTriedAutoInstall = true;
|
|
185985
|
+
let shouldInstall = false;
|
|
185986
|
+
try {
|
|
185987
|
+
const promptResult = yield (0, enquirer_1.prompt)({
|
|
185988
|
+
type: 'confirm',
|
|
185989
|
+
name: 'installNow',
|
|
185990
|
+
initial: true,
|
|
185991
|
+
message: '首次使用 lowcode 命令需要安装相关依赖,是否立即安装?'
|
|
185992
|
+
});
|
|
185993
|
+
shouldInstall = Boolean(promptResult.installNow);
|
|
185994
|
+
}
|
|
185995
|
+
catch (e) {
|
|
185996
|
+
shouldInstall = false;
|
|
185997
|
+
}
|
|
185998
|
+
if (!shouldInstall) {
|
|
185999
|
+
return false;
|
|
186000
|
+
}
|
|
186001
|
+
console.log('\n依赖安装中...(首次安装可能较慢,请耐心等待)\n');
|
|
186002
|
+
yield installLowcodeDeps();
|
|
186003
|
+
console.log('\nlowcode 依赖安装完成...\n');
|
|
186004
|
+
return true;
|
|
186005
|
+
});
|
|
186006
|
+
}
|
|
186007
|
+
function resolveProjectLowcode() {
|
|
186008
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
186009
|
+
const cwd = process.cwd();
|
|
186010
|
+
if (!cwd) {
|
|
186011
|
+
return null;
|
|
186012
|
+
}
|
|
186013
|
+
let pkgJsonPath;
|
|
186014
|
+
try {
|
|
186015
|
+
pkgJsonPath = __webpack_require__(43845).resolve(`${LOWCODE_PKG_NAME}/package.json`, { paths: [cwd] });
|
|
186016
|
+
}
|
|
186017
|
+
catch (e) {
|
|
186018
|
+
return null;
|
|
186019
|
+
}
|
|
186020
|
+
try {
|
|
186021
|
+
const pkgJson = yield fs_extra_1.default.readJson(pkgJsonPath);
|
|
186022
|
+
const req = createRequire(pkgJsonPath);
|
|
186023
|
+
const mod = req(LOWCODE_PKG_NAME);
|
|
186024
|
+
const satisfies = (pkgJson === null || pkgJson === void 0 ? void 0 : pkgJson.version)
|
|
186025
|
+
? semver_1.default.satisfies(pkgJson.version, LOWCODE_PKG_RANGE, { includePrerelease: true })
|
|
186026
|
+
: true;
|
|
186027
|
+
return satisfies ? { module: mod, version: pkgJson.version } : null;
|
|
186028
|
+
}
|
|
186029
|
+
catch (e) {
|
|
186030
|
+
return null;
|
|
186031
|
+
}
|
|
186032
|
+
});
|
|
186033
|
+
}
|
|
186034
|
+
function resolveInstalledLowcode() {
|
|
186035
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
186036
|
+
const pkgJsonPath = path_1.default.join(getLowcodeNodeModules(), LOWCODE_PKG_NAME, 'package.json');
|
|
186037
|
+
if (!(yield fs_extra_1.default.pathExists(pkgJsonPath))) {
|
|
186038
|
+
return null;
|
|
186039
|
+
}
|
|
186040
|
+
try {
|
|
186041
|
+
const pkgJson = yield fs_extra_1.default.readJson(pkgJsonPath);
|
|
186042
|
+
const req = createRequire(pkgJsonPath);
|
|
186043
|
+
const mod = req(LOWCODE_PKG_NAME);
|
|
186044
|
+
const satisfies = (pkgJson === null || pkgJson === void 0 ? void 0 : pkgJson.version)
|
|
186045
|
+
? semver_1.default.satisfies(pkgJson.version, LOWCODE_PKG_RANGE, { includePrerelease: true })
|
|
186046
|
+
: true;
|
|
186047
|
+
return satisfies ? { module: mod, version: pkgJson.version } : null;
|
|
186048
|
+
}
|
|
186049
|
+
catch (e) {
|
|
186050
|
+
return null;
|
|
186051
|
+
}
|
|
186052
|
+
});
|
|
186053
|
+
}
|
|
186054
|
+
function installLowcodeDeps(options = {}) {
|
|
186055
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
186056
|
+
const prefixDir = String(LOWCODE_HOME || '');
|
|
186057
|
+
yield fs_extra_1.default.ensureDir(prefixDir);
|
|
186058
|
+
const npmCacheDir = path_1.default.join(prefixDir, '_npm_cache');
|
|
186059
|
+
yield fs_extra_1.default.ensureDir(npmCacheDir);
|
|
186060
|
+
const npmUserConfig = path_1.default.join(prefixDir, 'npmrc');
|
|
186061
|
+
if (!(yield fs_extra_1.default.pathExists(npmUserConfig))) {
|
|
186062
|
+
yield fs_extra_1.default.writeFile(npmUserConfig, '', 'utf8');
|
|
186063
|
+
}
|
|
186064
|
+
const existing = yield resolveInstalledLowcode();
|
|
186065
|
+
if (existing && !options.force) {
|
|
186066
|
+
return;
|
|
186067
|
+
}
|
|
186068
|
+
if (options.force) {
|
|
186069
|
+
yield fs_extra_1.default.remove(path_1.default.join(getLowcodeNodeModules(), LOWCODE_PKG_NAME));
|
|
186070
|
+
}
|
|
186071
|
+
const npmBin = resolveNpmInvocation();
|
|
186072
|
+
const args = [
|
|
186073
|
+
...npmBin.baseArgs,
|
|
186074
|
+
'install',
|
|
186075
|
+
`${LOWCODE_PKG_NAME}@${LOWCODE_PKG_RANGE}`,
|
|
186076
|
+
'--prefix',
|
|
186077
|
+
prefixDir,
|
|
186078
|
+
'--cache',
|
|
186079
|
+
npmCacheDir,
|
|
186080
|
+
'--no-package-lock',
|
|
186081
|
+
'--fund=false',
|
|
186082
|
+
'--audit=false',
|
|
186083
|
+
'--progress=false'
|
|
186084
|
+
];
|
|
186085
|
+
if (options.registry) {
|
|
186086
|
+
args.push('--registry', options.registry);
|
|
186087
|
+
}
|
|
186088
|
+
const child = (0, child_process_1.spawn)(npmBin.command, args, {
|
|
186089
|
+
cwd: LOWCODE_HOME,
|
|
186090
|
+
env: Object.assign(Object.assign({}, process.env), { npm_config_update_notifier: 'false', npm_config_cache: npmCacheDir, npm_config_prefix: prefixDir, npm_config_userconfig: npmUserConfig })
|
|
186091
|
+
});
|
|
186092
|
+
yield promisifyProcess(child, true);
|
|
186093
|
+
let installedVersion = '';
|
|
186094
|
+
const pkgJsonPath = path_1.default.join(getLowcodeNodeModules(), LOWCODE_PKG_NAME, 'package.json');
|
|
186095
|
+
if (yield fs_extra_1.default.pathExists(pkgJsonPath)) {
|
|
186096
|
+
try {
|
|
186097
|
+
const pkgJson = yield fs_extra_1.default.readJson(pkgJsonPath);
|
|
186098
|
+
installedVersion = (pkgJson === null || pkgJson === void 0 ? void 0 : pkgJson.version) || '';
|
|
186099
|
+
}
|
|
186100
|
+
catch (e) {
|
|
186101
|
+
}
|
|
186102
|
+
}
|
|
186103
|
+
const manifest = {
|
|
186104
|
+
name: LOWCODE_PKG_NAME,
|
|
186105
|
+
range: LOWCODE_PKG_RANGE,
|
|
186106
|
+
version: installedVersion,
|
|
186107
|
+
installedAt: new Date().toISOString()
|
|
186108
|
+
};
|
|
186109
|
+
yield fs_extra_1.default.writeJSON(LOWCODE_MANIFEST, manifest, { spaces: 2 });
|
|
186110
|
+
});
|
|
186111
|
+
}
|
|
186112
|
+
exports.installLowcodeDeps = installLowcodeDeps;
|
|
185824
186113
|
function getLowcodeCli() {
|
|
185825
186114
|
return __awaiter(this, void 0, void 0, function* () {
|
|
185826
|
-
|
|
185827
|
-
|
|
185828
|
-
const cache = new Map();
|
|
185829
|
-
let result;
|
|
185830
|
-
if (!cache.get(key)) {
|
|
185831
|
-
const module = yield (_a = key, Promise.resolve().then(() => __importStar(__webpack_require__(43845)(_a))));
|
|
185832
|
-
cache.set(key, module);
|
|
186115
|
+
if (lowcodeCliCache) {
|
|
186116
|
+
return lowcodeCliCache;
|
|
185833
186117
|
}
|
|
185834
|
-
|
|
185835
|
-
|
|
186118
|
+
const projectResolved = yield resolveProjectLowcode();
|
|
186119
|
+
if (projectResolved === null || projectResolved === void 0 ? void 0 : projectResolved.module) {
|
|
186120
|
+
lowcodeCliCache = projectResolved.module;
|
|
186121
|
+
return lowcodeCliCache;
|
|
186122
|
+
}
|
|
186123
|
+
const cachedResolved = yield resolveInstalledLowcode();
|
|
186124
|
+
if (cachedResolved === null || cachedResolved === void 0 ? void 0 : cachedResolved.module) {
|
|
186125
|
+
lowcodeCliCache = cachedResolved.module;
|
|
186126
|
+
return lowcodeCliCache;
|
|
186127
|
+
}
|
|
186128
|
+
if (yield promptAndInstallLowcodeDeps()) {
|
|
186129
|
+
return getLowcodeCli();
|
|
186130
|
+
}
|
|
186131
|
+
exitWithInstallHint();
|
|
185836
186132
|
});
|
|
185837
186133
|
}
|
|
185838
186134
|
exports.getLowcodeCli = getLowcodeCli;
|
|
186135
|
+
function getInstalledLowcodeMeta() {
|
|
186136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
186137
|
+
const resolved = yield resolveInstalledLowcode();
|
|
186138
|
+
return {
|
|
186139
|
+
version: resolved === null || resolved === void 0 ? void 0 : resolved.version,
|
|
186140
|
+
home: getLowcodeHome(),
|
|
186141
|
+
satisfied: Boolean(resolved)
|
|
186142
|
+
};
|
|
186143
|
+
});
|
|
186144
|
+
}
|
|
186145
|
+
exports.getInstalledLowcodeMeta = getInstalledLowcodeMeta;
|
|
185839
186146
|
function getCmdConfig(config, options) {
|
|
185840
186147
|
return (0, lodash_1.get)(config, `${options.cmd}["${options.childCmd}"]`);
|
|
185841
186148
|
}
|
|
@@ -467058,35 +467365,12 @@ module.exports = function (data) {
|
|
|
467058
467365
|
|
|
467059
467366
|
"use strict";
|
|
467060
467367
|
|
|
467061
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
467062
|
-
if (k2 === undefined) k2 = k;
|
|
467063
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
467064
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
467065
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
467066
|
-
}
|
|
467067
|
-
Object.defineProperty(o, k2, desc);
|
|
467068
|
-
}) : (function(o, m, k, k2) {
|
|
467069
|
-
if (k2 === undefined) k2 = k;
|
|
467070
|
-
o[k2] = m[k];
|
|
467071
|
-
}));
|
|
467072
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
467073
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
467074
|
-
}) : function(o, v) {
|
|
467075
|
-
o["default"] = v;
|
|
467076
|
-
});
|
|
467077
467368
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
467078
467369
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
467079
467370
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
467080
467371
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
467081
467372
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
467082
467373
|
};
|
|
467083
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
467084
|
-
if (mod && mod.__esModule) return mod;
|
|
467085
|
-
var result = {};
|
|
467086
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
467087
|
-
__setModuleDefault(result, mod);
|
|
467088
|
-
return result;
|
|
467089
|
-
};
|
|
467090
467374
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
467091
467375
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
467092
467376
|
};
|
|
@@ -467128,8 +467412,13 @@ const toolbox_1 = __webpack_require__(25901);
|
|
|
467128
467412
|
const fs_extra_1 = __importDefault(__webpack_require__(21605));
|
|
467129
467413
|
const dts_1 = __webpack_require__(61142);
|
|
467130
467414
|
let lowcodeCli;
|
|
467131
|
-
|
|
467132
|
-
(0,
|
|
467415
|
+
function ensureLowcodeCli() {
|
|
467416
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
467417
|
+
if (!lowcodeCli) {
|
|
467418
|
+
lowcodeCli = yield (0, utils_1.getLowcodeCli)();
|
|
467419
|
+
}
|
|
467420
|
+
return lowcodeCli;
|
|
467421
|
+
});
|
|
467133
467422
|
}
|
|
467134
467423
|
let LowCodeWatch = class LowCodeWatch extends common_1.Command {
|
|
467135
467424
|
get options() {
|
|
@@ -467162,14 +467451,13 @@ let LowCodeWatch = class LowCodeWatch extends common_1.Command {
|
|
|
467162
467451
|
return __awaiter(this, void 0, void 0, function* () {
|
|
467163
467452
|
const config = (0, utils_1.getCmdConfig)(ctx.config, this.options);
|
|
467164
467453
|
const mergesOptions = (0, utils_1.getMergedOptions)(config, options);
|
|
467165
|
-
|
|
467166
|
-
|
|
467167
|
-
|
|
467168
|
-
|
|
467169
|
-
|
|
467170
|
-
|
|
467171
|
-
|
|
467172
|
-
}));
|
|
467454
|
+
const lowcodeCli = yield ensureLowcodeCli();
|
|
467455
|
+
yield lowcodeCli.watchApp({
|
|
467456
|
+
watchPort: 8288,
|
|
467457
|
+
wxDevtoolPath: options === null || options === void 0 ? void 0 : options.wxDevtoolPath,
|
|
467458
|
+
forceInstall: options === null || options === void 0 ? void 0 : options.forceInstall,
|
|
467459
|
+
projectPath: options === null || options === void 0 ? void 0 : options.path
|
|
467460
|
+
});
|
|
467173
467461
|
});
|
|
467174
467462
|
}
|
|
467175
467463
|
};
|
|
@@ -467210,6 +467498,7 @@ let LowCodeBuildApp = class LowCodeBuildApp extends common_1.Command {
|
|
|
467210
467498
|
return __awaiter(this, void 0, void 0, function* () {
|
|
467211
467499
|
const config = (0, utils_1.getCmdConfig)(ctx.config, this.options);
|
|
467212
467500
|
const mergesOptions = (0, utils_1.getMergedOptions)(config, options);
|
|
467501
|
+
const lowcodeCli = yield ensureLowcodeCli();
|
|
467213
467502
|
yield lowcodeCli.buildApp({
|
|
467214
467503
|
envId: ctx.envId || ctx.config.envId,
|
|
467215
467504
|
projectPath: process.cwd(),
|
|
@@ -467255,6 +467544,7 @@ let LowCodePreviewApp = class LowCodePreviewApp extends common_1.Command {
|
|
|
467255
467544
|
return __awaiter(this, void 0, void 0, function* () {
|
|
467256
467545
|
const config = (0, utils_1.getCmdConfig)(ctx.config, this.options);
|
|
467257
467546
|
const mergesOptions = (0, utils_1.getMergedOptions)(config, options);
|
|
467547
|
+
const lowcodeCli = yield ensureLowcodeCli();
|
|
467258
467548
|
yield lowcodeCli.previewApp({
|
|
467259
467549
|
envId: ctx.envId || ctx.config.envId,
|
|
467260
467550
|
projectPath: process.cwd(),
|
|
@@ -467304,6 +467594,7 @@ let LowCodeBuildAppConfig = class LowCodeBuildAppConfig extends common_1.Command
|
|
|
467304
467594
|
return __awaiter(this, void 0, void 0, function* () {
|
|
467305
467595
|
const config = (0, utils_1.getCmdConfig)(ctx.config, this.options);
|
|
467306
467596
|
const mergesOptions = (0, utils_1.getMergedOptions)(config, options);
|
|
467597
|
+
const lowcodeCli = yield ensureLowcodeCli();
|
|
467307
467598
|
yield lowcodeCli.buildAppConfig({
|
|
467308
467599
|
envId: ctx.envId || ctx.config.envId,
|
|
467309
467600
|
projectPath: process.cwd(),
|
|
@@ -467358,6 +467649,7 @@ let LowCodeDeployApp = class LowCodeDeployApp extends common_1.Command {
|
|
|
467358
467649
|
else {
|
|
467359
467650
|
credential = yield utils_2.authSupevisor.getLoginState();
|
|
467360
467651
|
}
|
|
467652
|
+
const lowcodeCli = yield ensureLowcodeCli();
|
|
467361
467653
|
yield lowcodeCli.deployApp({
|
|
467362
467654
|
envId: ctx.envId || ctx.config.envId,
|
|
467363
467655
|
projectPath: process.cwd(),
|
|
@@ -468910,8 +469202,13 @@ const cloud_api_1 = __webpack_require__(2090);
|
|
|
468910
469202
|
const error_1 = __webpack_require__(66759);
|
|
468911
469203
|
const utils_2 = __webpack_require__(27821);
|
|
468912
469204
|
let lowcodeCli;
|
|
468913
|
-
|
|
468914
|
-
(0,
|
|
469205
|
+
function ensureLowcodeCli() {
|
|
469206
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
469207
|
+
if (!lowcodeCli) {
|
|
469208
|
+
lowcodeCli = yield (0, utils_2.getLowcodeCli)();
|
|
469209
|
+
}
|
|
469210
|
+
return lowcodeCli;
|
|
469211
|
+
});
|
|
468915
469212
|
}
|
|
468916
469213
|
let LowCodeCreateComps = class LowCodeCreateComps extends common_1.Command {
|
|
468917
469214
|
get options() {
|
|
@@ -468939,9 +469236,11 @@ let LowCodeCreateComps = class LowCodeCreateComps extends common_1.Command {
|
|
|
468939
469236
|
if (!(params === null || params === void 0 ? void 0 : params[0])) {
|
|
468940
469237
|
throw new error_1.CloudBaseError('skip validate 需要指定组件库名 eg: `tcb lowcode create mydemo`');
|
|
468941
469238
|
}
|
|
469239
|
+
const lowcodeCli = yield ensureLowcodeCli();
|
|
468942
469240
|
yield lowcodeCli.bootstrap(params === null || params === void 0 ? void 0 : params[0], log);
|
|
468943
469241
|
return;
|
|
468944
469242
|
}
|
|
469243
|
+
const lowcodeCli = yield ensureLowcodeCli();
|
|
468945
469244
|
const privateSettings = (0, utils_1.getPrivateSettings)(config, this.options.cmd);
|
|
468946
469245
|
if (process.env.CLOUDBASE_LOWCODE_CLOUDAPI_URL === undefined) {
|
|
468947
469246
|
process.env.CLOUDBASE_LOWCODE_CLOUDAPI_URL =
|
|
@@ -469022,6 +469321,7 @@ let LowCodeBuildComps = class LowCodeBuildComps extends common_1.Command {
|
|
|
469022
469321
|
return __awaiter(this, void 0, void 0, function* () {
|
|
469023
469322
|
const config = ctx.config.lowcodeCustomComponents;
|
|
469024
469323
|
if (config) {
|
|
469324
|
+
const lowcodeCli = yield ensureLowcodeCli();
|
|
469025
469325
|
yield lowcodeCli.graceBuildComps(Object.assign(Object.assign({}, config), { context: config.context || process.cwd(), logger: log, privateSettings: (0, utils_1.getPrivateSettings)(ctx.config, this.options.cmd), envId: ctx.envId || ctx.config.envId }));
|
|
469026
469326
|
return;
|
|
469027
469327
|
}
|
|
@@ -469074,6 +469374,7 @@ let LowCodeDebugComps = class LowCodeDebugComps extends common_1.Command {
|
|
|
469074
469374
|
if (config) {
|
|
469075
469375
|
const cmdConfig = (0, utils_2.getCmdConfig)(ctx.config, this.options);
|
|
469076
469376
|
const mergesOptions = (0, utils_2.getMergedOptions)(cmdConfig, options);
|
|
469377
|
+
const lowcodeCli = yield ensureLowcodeCli();
|
|
469077
469378
|
yield lowcodeCli.graceDebugComps(Object.assign(Object.assign({}, config), { context: config.context || process.cwd(), debugPort: (mergesOptions === null || mergesOptions === void 0 ? void 0 : mergesOptions.debugPort) || 8388, logger: log, wxDevtoolPath: mergesOptions === null || mergesOptions === void 0 ? void 0 : mergesOptions.wxDevtoolPath, debugBaseUrl: (_a = privateSettings === null || privateSettings === void 0 ? void 0 : privateSettings.endpoints) === null || _a === void 0 ? void 0 : _a.editor, envId: ctx.envId || ctx.config.envId }));
|
|
469078
469379
|
return;
|
|
469079
469380
|
}
|
|
@@ -469121,6 +469422,7 @@ let LowCodePublishComps = class LowCodePublishComps extends common_1.Command {
|
|
|
469121
469422
|
const config = ctx.config.lowcodeCustomComponents;
|
|
469122
469423
|
if (config) {
|
|
469123
469424
|
const mergesOptions = (0, utils_2.getMergedOptions)((0, utils_2.getCmdConfig)(ctx.config, this.options), options);
|
|
469425
|
+
const lowcodeCli = yield ensureLowcodeCli();
|
|
469124
469426
|
yield lowcodeCli.gracePublishComps(Object.assign(Object.assign({}, config), { context: config.context || process.cwd(), logger: log, privateSettings: (0, utils_1.getPrivateSettings)(ctx.config, this.options.cmd), isAdmin: Boolean(mergesOptions.admin), envId: ctx.envId || ctx.config.envId }));
|
|
469125
469427
|
log.success('组件库 - 已同步到云端,请到低码控制台发布该组件库!');
|
|
469126
469428
|
return;
|
|
@@ -469187,6 +469489,7 @@ let LowCodePublishVersionComps = class LowCodePublishVersionComps extends common
|
|
|
469187
469489
|
if (!config) {
|
|
469188
469490
|
throw new error_1.CloudBaseError('组件库 - 请添加组件库配置到cloudbaserc.json 以使用该命令');
|
|
469189
469491
|
}
|
|
469492
|
+
const lowcodeCli = yield ensureLowcodeCli();
|
|
469190
469493
|
const res = yield lowcodeCli.publishVersion(Object.assign(Object.assign({}, config), { context: config.context || process.cwd(), logger: log, isAdmin: options.admin, privateSettings: (0, utils_1.getPrivateSettings)(ctx.config, this.options.cmd), envId: ctx.envId || ctx.config.envId }), comment, tag);
|
|
469191
469494
|
if (res.data.code === 200) {
|
|
469192
469495
|
log.success('组件库 - 已发布新版本!');
|
|
@@ -491240,6 +491543,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
491240
491543
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
491241
491544
|
__exportStar(__webpack_require__(69511), exports);
|
|
491242
491545
|
__exportStar(__webpack_require__(69892), exports);
|
|
491546
|
+
__exportStar(__webpack_require__(5440), exports);
|
|
491243
491547
|
|
|
491244
491548
|
|
|
491245
491549
|
/***/ }),
|