@cloudbase/cli 2.9.0 → 2.9.1

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.
@@ -11,7 +11,7 @@ const chalk = __webpack_require__(15896)
11
11
  const { program } = __webpack_require__(62116)
12
12
  const logSymbols = __webpack_require__(68329)
13
13
  const didYouMean = __webpack_require__(71492)
14
- const updateNotifier = __webpack_require__(66281)
14
+ const updateNotifier = __webpack_require__(72523)
15
15
  const frameworkPkg = __webpack_require__(92822)
16
16
  let wedaPkg = {}
17
17
  try {
@@ -65,6 +65,7 @@ async function main() {
65
65
 
66
66
  // 输出版本信息
67
67
  console.log(chalk.gray(`CloudBase CLI ${pkg.version}`))
68
+ console.log(chalk.gray('试试 tcb ai 命令,开启 AI 全栈开发体验'))
68
69
 
69
70
  const yargsParsedResult = yargsParser(process.argv.slice(2))
70
71
  const config = await getCloudBaseConfig(yargsParsedResult.configFile)
@@ -95,7 +96,7 @@ async function main() {
95
96
  // -v 时输出的版本信息,设置时避免影响其他命令使用 -v
96
97
  if (isCommandEmpty) {
97
98
  program.version(
98
- `\nCLI: ${pkg.version}\nFramework: ${frameworkPkg.version}\nWeda: ${wedaPkg.version}`,
99
+ `\nCLI: ${pkg.version}`,
99
100
  '-v, --version',
100
101
  '输出当前 CloudBase CLI 版本'
101
102
  )
@@ -618,13 +619,9 @@ const utils_1 = __webpack_require__(82079);
618
619
  function printSuggestion() {
619
620
  const tips = `可使用下面命令继续操作:
620
621
 
621
- ${chalk_1.default.gray('–')} 初始化云开发项目
622
+ ${chalk_1.default.gray('–')} 一键开启 AI 开发体验
622
623
 
623
- ${chalk_1.default.cyan('$ tcb new')}
624
-
625
- ${chalk_1.default.gray('–')} 部署云函数
626
-
627
- ${chalk_1.default.cyan('$ tcb fn deploy')}
624
+ ${chalk_1.default.cyan('$ tcb ai')}
628
625
 
629
626
  ${chalk_1.default.gray('–')} 查看命令使用介绍
630
627
 
@@ -17225,20 +17222,15 @@ const chalk_1 = __importDefault(__webpack_require__(15896));
17225
17222
  const outputHelpInfo = () => {
17226
17223
  const commands = `
17227
17224
  命令
17228
-
17225
+ ai -- [cmd] 开启 AI 全栈开发体验
17229
17226
  login [options] 登录腾讯云账号
17230
17227
  logout 登出腾讯云账号
17231
17228
  env [cmd] 环境管理操作
17232
17229
  fn [cmd] 操作函数
17233
- framework [cmd] 云开发 Serverless 应用框架操作
17234
17230
  hosting [cmd] 静态托管资源管理操作
17235
- new [appName] [template] 创建新的云开发应用
17236
- open [link] 在浏览器中打开云开发相关连接
17237
17231
  storage [cmd] 云存储资源管理操作
17238
17232
  service [cmd] HTTP 访问服务管理操作
17239
- run:deprecated [cmd] 云托管环境管理操作 (BAAS 或 RUN 类型环境)
17240
- run [cmd] 云托管环境管理操作 (TCBR 类型环境)
17241
- cloudrun [cmd] 云托管服务管理操作(新版云开发平台)`;
17233
+ cloudrun [cmd] 云托管服务管理操作`;
17242
17234
  const options = `
17243
17235
  选项
17244
17236
 
@@ -17255,17 +17247,10 @@ const outputHelpInfo = () => {
17255
17247
 
17256
17248
  ${chalk_1.default.cyan('$ tcb login')}
17257
17249
 
17258
- ${chalk_1.default.gray('–')} 创建新的云开发应用
17259
-
17260
- ${chalk_1.default.cyan('$ tcb new appName')}
17261
-
17262
- ${chalk_1.default.gray('–')} 部署云函数
17250
+ ${chalk_1.default.gray('–')} 使用 AI 全栈开发部署
17263
17251
 
17264
- ${chalk_1.default.cyan('$ tcb fn deploy')}
17265
-
17266
- ${chalk_1.default.gray('–')} 查看命令使用介绍
17267
-
17268
- ${chalk_1.default.cyan('$ tcb fn -h')}`;
17252
+ ${chalk_1.default.cyan('$ tcb ai')}
17253
+ `;
17269
17254
  console.log(commands, '\n', options, '\n', tips);
17270
17255
  };
17271
17256
  exports.outputHelpInfo = outputHelpInfo;
@@ -19350,6 +19335,7 @@ AI ToolKit`, {
19350
19335
  log.log(' ⚡ 生成、部署和托管全栈 Web 应用与小程序、数据库和后端服务');
19351
19336
  log.log(' 🎯 无需运维,极速上线你的创意 💫');
19352
19337
  }
19338
+ log.log('');
19353
19339
  log.log('Github:');
19354
19340
  log.log((0, output_1.genClickableLink)('https://github.com/TencentCloudBase/CloudBase-AI-ToolKit'));
19355
19341
  log.log('');
@@ -358711,67 +358697,6 @@ webpackEmptyContext.resolve = webpackEmptyContext;
358711
358697
  webpackEmptyContext.id = 92288;
358712
358698
  module.exports = webpackEmptyContext;
358713
358699
 
358714
- /***/ }),
358715
-
358716
- /***/ 28401:
358717
- /***/ ((module) => {
358718
-
358719
- "use strict";
358720
-
358721
- const lazy = (mod, fn, id) => mod === undefined ? fn(id) : mod;
358722
-
358723
- module.exports = fn => {
358724
- return id => {
358725
- let mod;
358726
-
358727
- return function () {
358728
- if (arguments.length === 0) {
358729
- mod = lazy(mod, fn, id);
358730
- return mod;
358731
- }
358732
-
358733
- const ret = {};
358734
-
358735
- [].forEach.call(arguments, prop => {
358736
- Object.defineProperty(ret, prop, {
358737
- get: () => {
358738
- mod = lazy(mod, fn, id);
358739
- if (typeof mod[prop] === 'function') {
358740
- return function () {
358741
- return mod[prop].apply(mod, arguments);
358742
- };
358743
- }
358744
-
358745
- return mod[prop];
358746
- }
358747
- });
358748
- });
358749
-
358750
- return ret;
358751
- };
358752
- };
358753
- };
358754
-
358755
- module.exports.proxy = fn => {
358756
- return id => {
358757
- let mod;
358758
-
358759
- const handler = {
358760
- get: (target, property) => {
358761
- mod = lazy(mod, fn, id);
358762
- return Reflect.get(mod, property);
358763
- },
358764
- apply: (target, thisArg, argumentsList) => {
358765
- mod = lazy(mod, fn, id);
358766
- return Reflect.apply(mod, thisArg, argumentsList);
358767
- }
358768
- };
358769
-
358770
- return new Proxy(() => {}, handler);
358771
- };
358772
- };
358773
-
358774
-
358775
358700
  /***/ }),
358776
358701
 
358777
358702
  /***/ 82063:
@@ -557451,216 +557376,6 @@ exports.Open = __webpack_require__(74773);
557451
557376
 
557452
557377
  /***/ }),
557453
557378
 
557454
- /***/ 66281:
557455
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
557456
-
557457
- "use strict";
557458
-
557459
- const {spawn} = __webpack_require__(35317);
557460
- const path = __webpack_require__(16928);
557461
- const {format} = __webpack_require__(39023);
557462
- const importLazy = __webpack_require__(28401)(__webpack_require__(88156));
557463
-
557464
- const configstore = importLazy('configstore');
557465
- const chalk = importLazy('chalk');
557466
- const semverDiff = importLazy('semver-diff');
557467
- const latestVersion = importLazy('latest-version');
557468
- const isNpm = importLazy('is-npm');
557469
- const isInstalledGlobally = importLazy('is-installed-globally');
557470
- const isYarnGlobal = importLazy('is-yarn-global');
557471
- const hasYarn = importLazy('has-yarn');
557472
- const boxen = importLazy('boxen');
557473
- const xdgBasedir = importLazy('xdg-basedir');
557474
- const isCi = importLazy('is-ci');
557475
- const pupa = importLazy('pupa');
557476
-
557477
- const ONE_DAY = 1000 * 60 * 60 * 24;
557478
-
557479
- class UpdateNotifier {
557480
- constructor(options = {}) {
557481
- this.options = options;
557482
- options.pkg = options.pkg || {};
557483
- options.distTag = options.distTag || 'latest';
557484
-
557485
- // Reduce pkg to the essential keys. with fallback to deprecated options
557486
- // TODO: Remove deprecated options at some point far into the future
557487
- options.pkg = {
557488
- name: options.pkg.name || options.packageName,
557489
- version: options.pkg.version || options.packageVersion
557490
- };
557491
-
557492
- if (!options.pkg.name || !options.pkg.version) {
557493
- throw new Error('pkg.name and pkg.version required');
557494
- }
557495
-
557496
- this.packageName = options.pkg.name;
557497
- this.packageVersion = options.pkg.version;
557498
- this.updateCheckInterval = typeof options.updateCheckInterval === 'number' ? options.updateCheckInterval : ONE_DAY;
557499
- this.disabled = 'NO_UPDATE_NOTIFIER' in process.env ||
557500
- "production" === 'test' ||
557501
- process.argv.includes('--no-update-notifier') ||
557502
- isCi();
557503
- this.shouldNotifyInNpmScript = options.shouldNotifyInNpmScript;
557504
-
557505
- if (!this.disabled) {
557506
- try {
557507
- const ConfigStore = configstore();
557508
- this.config = new ConfigStore(`update-notifier-${this.packageName}`, {
557509
- optOut: false,
557510
- // Init with the current time so the first check is only
557511
- // after the set interval, so not to bother users right away
557512
- lastUpdateCheck: Date.now()
557513
- });
557514
- } catch (_) {
557515
- // Expecting error code EACCES or EPERM
557516
- const message =
557517
- chalk().yellow(format(' %s update check failed ', options.pkg.name)) +
557518
- format('\n Try running with %s or get access ', chalk().cyan('sudo')) +
557519
- '\n to the local update config store via \n' +
557520
- chalk().cyan(format(' sudo chown -R $USER:$(id -gn $USER) %s ', xdgBasedir().config));
557521
-
557522
- process.on('exit', () => {
557523
- console.error(boxen()(message, {align: 'center'}));
557524
- });
557525
- }
557526
- }
557527
- }
557528
-
557529
- check() {
557530
- if (
557531
- !this.config ||
557532
- this.config.get('optOut') ||
557533
- this.disabled
557534
- ) {
557535
- return;
557536
- }
557537
-
557538
- this.update = this.config.get('update');
557539
-
557540
- if (this.update) {
557541
- // Use the real latest version instead of the cached one
557542
- this.update.current = this.packageVersion;
557543
-
557544
- // Clear cached information
557545
- this.config.delete('update');
557546
- }
557547
-
557548
- // Only check for updates on a set interval
557549
- if (Date.now() - this.config.get('lastUpdateCheck') < this.updateCheckInterval) {
557550
- return;
557551
- }
557552
-
557553
- // Spawn a detached process, passing the options as an environment property
557554
- spawn(process.execPath, [path.join(__dirname, 'check.js'), JSON.stringify(this.options)], {
557555
- detached: true,
557556
- stdio: 'ignore'
557557
- }).unref();
557558
- }
557559
-
557560
- async fetchInfo() {
557561
- const {distTag} = this.options;
557562
- const latest = await latestVersion()(this.packageName, {version: distTag});
557563
-
557564
- return {
557565
- latest,
557566
- current: this.packageVersion,
557567
- type: semverDiff()(this.packageVersion, latest) || distTag,
557568
- name: this.packageName
557569
- };
557570
- }
557571
-
557572
- notify(options) {
557573
- const suppressForNpm = !this.shouldNotifyInNpmScript && isNpm().isNpmOrYarn;
557574
- if (!process.stdout.isTTY || suppressForNpm || !this.update || this.update.current === this.update.latest) {
557575
- return this;
557576
- }
557577
-
557578
- options = Object.assign({
557579
- isGlobal: isInstalledGlobally(),
557580
- isYarnGlobal: isYarnGlobal()()
557581
- }, options);
557582
-
557583
- let installCommand;
557584
-
557585
- if (options.isYarnGlobal) {
557586
- installCommand = `yarn global add ${this.packageName}`;
557587
- } else if (options.isGlobal) {
557588
- installCommand = `npm i -g ${this.packageName}`;
557589
- } else if (hasYarn()()) {
557590
- installCommand = `yarn add ${this.packageName}`;
557591
- } else {
557592
- installCommand = `npm i ${this.packageName}`;
557593
- }
557594
-
557595
- const defaultTemplate = 'Update available ' +
557596
- chalk().dim('{currentVersion}') +
557597
- chalk().reset(' → ') +
557598
- chalk().green('{latestVersion}') +
557599
- ' \nRun ' + chalk().cyan('{updateCommand}') + ' to update';
557600
-
557601
- const template = options.message || defaultTemplate;
557602
-
557603
- options.boxenOptions = options.boxenOptions || {
557604
- padding: 1,
557605
- margin: 1,
557606
- align: 'center',
557607
- borderColor: 'yellow',
557608
- borderStyle: 'round'
557609
- };
557610
-
557611
- const message = boxen()(
557612
- pupa()(template, {
557613
- packageName: this.packageName,
557614
- currentVersion: this.update.current,
557615
- latestVersion: this.update.latest,
557616
- updateCommand: installCommand
557617
- }),
557618
- options.boxenOptions
557619
- );
557620
-
557621
- if (options.defer === false) {
557622
- console.error(message);
557623
- } else {
557624
- process.on('exit', () => {
557625
- console.error(message);
557626
- });
557627
-
557628
- process.on('SIGINT', () => {
557629
- console.error('');
557630
- process.exit();
557631
- });
557632
- }
557633
-
557634
- return this;
557635
- }
557636
- }
557637
-
557638
- module.exports = options => {
557639
- const updateNotifier = new UpdateNotifier(options);
557640
- updateNotifier.check();
557641
- return updateNotifier;
557642
- };
557643
-
557644
- module.exports.UpdateNotifier = UpdateNotifier;
557645
-
557646
-
557647
- /***/ }),
557648
-
557649
- /***/ 88156:
557650
- /***/ ((module) => {
557651
-
557652
- function webpackEmptyContext(req) {
557653
- var e = new Error("Cannot find module '" + req + "'");
557654
- e.code = 'MODULE_NOT_FOUND';
557655
- throw e;
557656
- }
557657
- webpackEmptyContext.keys = () => ([]);
557658
- webpackEmptyContext.resolve = webpackEmptyContext;
557659
- webpackEmptyContext.id = 88156;
557660
- module.exports = webpackEmptyContext;
557661
-
557662
- /***/ }),
557663
-
557664
557379
  /***/ 46579:
557665
557380
  /***/ (function(__unused_webpack_module, exports) {
557666
557381
 
@@ -568494,6 +568209,22 @@ module.exports = {
568494
568209
  }
568495
568210
 
568496
568211
 
568212
+ /***/ }),
568213
+
568214
+ /***/ 72523:
568215
+ /***/ ((module) => {
568216
+
568217
+ // No-op shim for update-notifier in standalone bundle
568218
+ // Usage: const notifier = updateNotifier(opts); notifier.notify({ isGlobal: true })
568219
+ module.exports = function updateNotifier() {
568220
+ return {
568221
+ notify: function notify() {
568222
+ // intentionally no-op in standalone distribution
568223
+ }
568224
+ }
568225
+ }
568226
+
568227
+
568497
568228
  /***/ }),
568498
568229
 
568499
568230
  /***/ 62882:
@@ -624053,7 +623784,7 @@ module.exports = {"version":"3.13.1"};
624053
623784
  /***/ ((module) => {
624054
623785
 
624055
623786
  "use strict";
624056
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@cloudbase/cli","version":"2.8.28","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","out:prune":"bash build/scripts/prune-out.sh"},"repository":{"type":"git","url":"https://github.com/TencentCloudBase/cloud-base-cli.git"},"bin":{"cloudbase":"bin/cloudbase.js","cloudbase-mcp":"bin/cloudbase-mcp.cjs","tcb":"bin/tcb.js","ccr":"bin/ccr.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.40","@cloudbase/framework-core":"^1.9.7","@cloudbase/functions-framework":"1.16.0","@cloudbase/iac-core":"0.0.3-alpha.11","@cloudbase/lowcode-cli":"^0.22.2","@cloudbase/manager-node":"4.5.0","@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","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":{"@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","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"}');
623787
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@cloudbase/cli","version":"2.9.0","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","out:prune":"bash build/scripts/prune-out.sh"},"repository":{"type":"git","url":"https://github.com/TencentCloudBase/cloud-base-cli.git"},"bin":{"cloudbase":"bin/cloudbase.js","cloudbase-mcp":"bin/cloudbase-mcp.cjs","tcb":"bin/tcb.js","ccr":"bin/ccr.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.40","@cloudbase/framework-core":"^1.9.7","@cloudbase/functions-framework":"1.16.0","@cloudbase/iac-core":"0.0.3-alpha.11","@cloudbase/lowcode-cli":"^0.22.2","@cloudbase/manager-node":"4.5.0","@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","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":{"@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","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"}');
624057
623788
 
624058
623789
  /***/ })
624059
623790
 
@@ -31,8 +31,11 @@ let PullCommand = class PullCommand extends common_1.Command {
31
31
  get options() {
32
32
  return {
33
33
  cmd: 'pull',
34
- childCmd: '<source>',
35
34
  options: [
35
+ {
36
+ flags: '-s, --source <source>',
37
+ desc: '模板来源'
38
+ },
36
39
  {
37
40
  flags: '-o, --output <output>',
38
41
  desc: '指定输出目录'
@@ -49,8 +52,7 @@ let PullCommand = class PullCommand extends common_1.Command {
49
52
  }
50
53
  execute(options, params, log) {
51
54
  return __awaiter(this, void 0, void 0, function* () {
52
- const { output, force } = options;
53
- const [source] = params || [];
55
+ const { output, force, source } = options;
54
56
  if (!source || typeof source !== 'string') {
55
57
  throw new error_1.CloudBaseError('请指定要拉取的模板来源');
56
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/cli",
3
- "version": "2.9.0",
3
+ "version": "2.9.1",
4
4
  "description": "cli tool for cloudbase",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -3,7 +3,6 @@ import { Logger } from '../../utils/log';
3
3
  export declare class PullCommand extends Command {
4
4
  get options(): {
5
5
  cmd: string;
6
- childCmd: string;
7
6
  options: {
8
7
  flags: string;
9
8
  desc: string;