@share-crm/sharedev-cli 0.0.4-rc.24 → 0.0.4-rc.25

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.
Files changed (2) hide show
  1. package/dist/sharedev.js +152 -2
  2. package/package.json +3 -2
package/dist/sharedev.js CHANGED
@@ -10203,6 +10203,13 @@ function registerFlowNamespace(program, runtimeContext) {
10203
10203
  .action((0, command_ts_1.createCommandAction)('flow def', 'get-web-configs', runtimeContext, async ({ options, context }) => {
10204
10204
  await (0, flow_def_command_ts_1.flowDefGetWebConfigsCommand)(context, options);
10205
10205
  }));
10206
+ // flow def get-quota
10207
+ flowDef
10208
+ .command('get-quota')
10209
+ .description('查询Flow定义配额')
10210
+ .action((0, command_ts_1.createCommandAction)('flow def', 'get-quota', runtimeContext, async ({ options, context }) => {
10211
+ await (0, flow_def_command_ts_1.flowDefGetQuotaCommand)(context, options);
10212
+ }));
10206
10213
  // ──────────────────────────────────────────────
10207
10214
  // flow runtime
10208
10215
  // ──────────────────────────────────────────────
@@ -10504,6 +10511,7 @@ const flow_ts_1 = __webpack_require__(1005);
10504
10511
  const workflow_ts_1 = __webpack_require__(1304);
10505
10512
  const agent_schedule_ts_1 = __webpack_require__(1428);
10506
10513
  const data_auth_ts_1 = __webpack_require__(8548);
10514
+ const sales_ts_1 = __webpack_require__(3957);
10507
10515
  function registerNamespaces(program, context) {
10508
10516
  (0, init_ts_1.registerInitCommand)(program, context);
10509
10517
  (0, config_ts_1.registerConfigCommand)(program, context);
@@ -10524,6 +10532,7 @@ function registerNamespaces(program, context) {
10524
10532
  (0, workflow_ts_1.registerWorkflowNamespace)(program, context);
10525
10533
  (0, agent_schedule_ts_1.registerAgentScheduleNamespace)(program, context);
10526
10534
  (0, data_auth_ts_1.registerDataAuthNamespace)(program, context);
10535
+ (0, sales_ts_1.registerSalesNamespace)(program, context);
10527
10536
  }
10528
10537
 
10529
10538
 
@@ -11357,6 +11366,36 @@ Examples:
11357
11366
  }
11358
11367
 
11359
11368
 
11369
+ /***/ },
11370
+
11371
+ /***/ 3957
11372
+ (__unused_webpack_module, exports, __webpack_require__) {
11373
+
11374
+ var __webpack_unused_export__;
11375
+
11376
+ __webpack_unused_export__ = ({ value: true });
11377
+ exports.registerSalesNamespace = registerSalesNamespace;
11378
+ const command_ts_1 = __webpack_require__(4977);
11379
+ const sales_command_ts_1 = __webpack_require__(9340);
11380
+ function registerSalesNamespace(program, runtimeContext) {
11381
+ const sales = program.command('sales').description('Sales data commands');
11382
+ sales
11383
+ .command('ReturnAction')
11384
+ .description('Execute return action on a data record')
11385
+ .option('--data <json>', 'Request data as JSON string')
11386
+ .action((0, command_ts_1.createCommandAction)('sales', 'ReturnAction', runtimeContext, async ({ options, context }) => {
11387
+ await (0, sales_command_ts_1.salesReturnActionCommand)(context, options);
11388
+ }));
11389
+ sales
11390
+ .command('MoveAction')
11391
+ .description('Execute move action on a data record')
11392
+ .option('--data <json>', 'Request data as JSON string')
11393
+ .action((0, command_ts_1.createCommandAction)('sales', 'MoveAction', runtimeContext, async ({ options, context }) => {
11394
+ await (0, sales_command_ts_1.salesMoveActionCommand)(context, options);
11395
+ }));
11396
+ }
11397
+
11398
+
11360
11399
  /***/ },
11361
11400
 
11362
11401
  /***/ 9664
@@ -13000,6 +13039,7 @@ const SHARE_CLI_COMMAND_PATH_MAP = {
13000
13039
  afterActionConfig: ['FlowDefAfterActionConfig'],
13001
13040
  flowSupportVariable: ['FlowDefGetFlowSupportVariable'],
13002
13041
  getHistory: ['FlowDefGetHistory'],
13042
+ getQuota: ['FlowDefGetQuota'],
13003
13043
  getWebConfigs: ['FlowDefGetWebConfigs'],
13004
13044
  },
13005
13045
  agentScheduleDef: {
@@ -13083,6 +13123,11 @@ const SHARE_CLI_COMMAND_PATH_MAP = {
13083
13123
  regenerateTaskHandler: ['StageTaskRegenerate'],
13084
13124
  updateAndComplete: ['StageTaskUpdateComplete'],
13085
13125
  },
13126
+ // Manual addition — not generated
13127
+ sales: {
13128
+ returnAction: ['ReturnAction'],
13129
+ moveAction: ['MoveAction'],
13130
+ },
13086
13131
  flowRuntime: {
13087
13132
  commonOpinionDelete: ['FlowOpinionDelete'],
13088
13133
  commonOpinionEdit: ['FlowOpinionEdit'],
@@ -13905,7 +13950,7 @@ exports.q = {
13905
13950
  defaultOpenTag: '<CommonPrivilege xmlns="http://sharecrm.com/metadata">',
13906
13951
  },
13907
13952
  ObjectMapping: {
13908
- dirPathTemplate: 'tenant-config/object-mappings',
13953
+ dirPathTemplate: 'tenant-config/mapping-rules',
13909
13954
  fileNameTemplate: '{apiName}.object-mapping-meta.xml',
13910
13955
  apiNameVariable: 'apiName',
13911
13956
  defaultOpenTag: '<ObjectMapping xmlns="http://sharecrm.com/metadata">',
@@ -18610,6 +18655,7 @@ exports.flowDefAfterActionConfigCommand = flowDefAfterActionConfigCommand;
18610
18655
  exports.flowDefFlowSupportVariableCommand = flowDefFlowSupportVariableCommand;
18611
18656
  exports.flowDefGetHistoryCommand = flowDefGetHistoryCommand;
18612
18657
  exports.flowDefGetWebConfigsCommand = flowDefGetWebConfigsCommand;
18658
+ exports.flowDefGetQuotaCommand = flowDefGetQuotaCommand;
18613
18659
  const logger_ts_1 = __webpack_require__(8802);
18614
18660
  const request_execute_command_paths_ts_1 = __webpack_require__(1402);
18615
18661
  const flow_def_service_ts_1 = __webpack_require__(2334);
@@ -19003,6 +19049,20 @@ async function flowDefGetWebConfigsCommand(_context, options) {
19003
19049
  throw error;
19004
19050
  }
19005
19051
  }
19052
+ async function flowDefGetQuotaCommand(_context, options) {
19053
+ void _context;
19054
+ const data = buildOptionsData(options, {});
19055
+ logger_ts_1.loggerService.startLoading('Executing flowDef get-quota');
19056
+ try {
19057
+ const response = await (0, flow_def_service_ts_1.executeFlowDefShareCli)((0, request_execute_command_paths_ts_1.getShareCliCommandPath)('flowDef', 'getQuota'), data);
19058
+ logger_ts_1.loggerService.stopLoading();
19059
+ logger_ts_1.loggerService.printJson(response);
19060
+ }
19061
+ catch (error) {
19062
+ logger_ts_1.loggerService.stopLoading();
19063
+ throw error;
19064
+ }
19065
+ }
19006
19066
 
19007
19067
 
19008
19068
  /***/ },
@@ -21955,6 +22015,12 @@ const convertRulePushService = async (ruleApiNames, skipOverwriteConfirm = false
21955
22015
  const updatedContent = { ...(ruleMeta.content && isRecord(ruleMeta.content)
21956
22016
  ? ruleMeta.content
21957
22017
  : content) };
22018
+ if ('ruleList' in updatedContent) {
22019
+ if (!updatedContent.rule_list) {
22020
+ updatedContent.rule_list = updatedContent.ruleList;
22021
+ }
22022
+ delete updatedContent.ruleList;
22023
+ }
21958
22024
  logger_ts_1.loggerService.startLoading('convert-rule push request: ' + ruleApiName + ' (' + (isCreate ? 'create' : 'update') + ')');
21959
22025
  const raw = await (0, request_ts_1.requestObjectDevExecute)(isCreate
21960
22026
  ? (0, request_execute_command_paths_ts_1.getShareCliCommandPath)('convertRule', 'create-rule')
@@ -28230,6 +28296,90 @@ async function writePwcComponent(context, component) {
28230
28296
  }
28231
28297
 
28232
28298
 
28299
+ /***/ },
28300
+
28301
+ /***/ 9340
28302
+ (__unused_webpack_module, exports, __webpack_require__) {
28303
+
28304
+ var __webpack_unused_export__;
28305
+
28306
+ __webpack_unused_export__ = ({ value: true });
28307
+ exports.salesReturnActionCommand = salesReturnActionCommand;
28308
+ exports.salesMoveActionCommand = salesMoveActionCommand;
28309
+ const logger_ts_1 = __webpack_require__(8802);
28310
+ const request_execute_command_paths_ts_1 = __webpack_require__(1402);
28311
+ const sales_service_ts_1 = __webpack_require__(6390);
28312
+ function buildOptionsData(options, typeMap) {
28313
+ const data = {};
28314
+ for (const [key, value] of Object.entries(options)) {
28315
+ if (value !== undefined && value !== null && value !== '') {
28316
+ const fieldType = typeMap[key];
28317
+ if (typeof value === 'string' && (fieldType === 'object' || fieldType === 'array')) {
28318
+ try {
28319
+ data[key] = JSON.parse(value);
28320
+ }
28321
+ catch {
28322
+ data[key] = value;
28323
+ }
28324
+ }
28325
+ else {
28326
+ data[key] = value;
28327
+ }
28328
+ }
28329
+ }
28330
+ return data;
28331
+ }
28332
+ async function salesReturnActionCommand(_context, options) {
28333
+ void _context;
28334
+ const typeMap = {
28335
+ data: 'object',
28336
+ };
28337
+ const payload = buildOptionsData(options, typeMap);
28338
+ logger_ts_1.loggerService.startLoading('Executing sales ReturnAction');
28339
+ try {
28340
+ const response = await (0, sales_service_ts_1.executeSalesShareCli)((0, request_execute_command_paths_ts_1.getShareCliCommandPath)('sales', 'returnAction'), payload);
28341
+ logger_ts_1.loggerService.stopLoading();
28342
+ logger_ts_1.loggerService.printJson(response);
28343
+ }
28344
+ catch (error) {
28345
+ logger_ts_1.loggerService.stopLoading();
28346
+ throw error;
28347
+ }
28348
+ }
28349
+ async function salesMoveActionCommand(_context, options) {
28350
+ void _context;
28351
+ const typeMap = {
28352
+ data: 'object',
28353
+ };
28354
+ const payload = buildOptionsData(options, typeMap);
28355
+ logger_ts_1.loggerService.startLoading('Executing sales MoveAction');
28356
+ try {
28357
+ const response = await (0, sales_service_ts_1.executeSalesShareCli)((0, request_execute_command_paths_ts_1.getShareCliCommandPath)('sales', 'moveAction'), payload);
28358
+ logger_ts_1.loggerService.stopLoading();
28359
+ logger_ts_1.loggerService.printJson(response);
28360
+ }
28361
+ catch (error) {
28362
+ logger_ts_1.loggerService.stopLoading();
28363
+ throw error;
28364
+ }
28365
+ }
28366
+
28367
+
28368
+ /***/ },
28369
+
28370
+ /***/ 6390
28371
+ (__unused_webpack_module, exports, __webpack_require__) {
28372
+
28373
+ var __webpack_unused_export__;
28374
+
28375
+ __webpack_unused_export__ = ({ value: true });
28376
+ exports.executeSalesShareCli = executeSalesShareCli;
28377
+ const request_execute_ts_1 = __webpack_require__(2623);
28378
+ async function executeSalesShareCli(commandPath, data, others) {
28379
+ return (0, request_execute_ts_1.executeShareCliCommand)(commandPath, data, others);
28380
+ }
28381
+
28382
+
28233
28383
  /***/ },
28234
28384
 
28235
28385
  /***/ 3344
@@ -46400,7 +46550,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"application/1d-interleaved-parityfec
46400
46550
  /***/ 8330
46401
46551
  (module) {
46402
46552
 
46403
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@share-crm/sharedev-cli","version":"0.0.4-rc.24","private":false,"description":"sharedev command line tool","type":"module","main":"dist/sharedev.js","bin":{"sharedev":"./bin/cli.mjs"},"author":{"name":"sharecrm-npm"},"files":["dist","bin","README.md"],"scripts":{"build":"tsc --noEmit && webpack --config build/webpack/webpack.prod.cjs","build:debug":"tsc --noEmit && webpack --config build/webpack/webpack.debug.cjs","build:bin":"bun build --compile --target=bun-darwin-x64 src/cli.ts --outfile scripts/sharedev-darwin-x64 && bun build --compile --target=bun-darwin-arm64 src/cli.ts --outfile scripts/sharedev-darwin-arm64 && bun build --compile --target=bun-windows-x64 src/cli.ts --outfile scripts/sharedev-windows-x64.exe","build:all":"npm run build && npm run build:bin","dev":"tsc --noEmit --watch & webpack --config build/webpack/webpack.dev.cjs --watch","dev2":"node src/cli.ts","typecheck":"tsc --noEmit","prettier":"prettier --write ./src/**/*.ts","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage"},"dependencies":{"@clack/prompts":"^1.1.0","@mariozechner/pi-coding-agent":"^0.62.0","axios":"~1.13.0","chalk":"^5.6.2","commander":"^14.0.1","extract-zip":"^2.0.1","fast-xml-parser":"^5.2.5","fs-extra":"^11.3.2","lodash-es":"^4.18.1","ora":"^9.3.0"},"devDependencies":{"@types/extract-zip":"^2.0.3","@types/fs-extra":"^11.0.4","@types/lodash-es":"^4.17.12","@types/node":"^24.3.0","@vitest/coverage-v8":"^4.1.8","ts-loader":"^9.5.4","typescript":"^5.9.2","vitest":"^3.2.6","webpack":"^5.101.3","webpack-cli":"^6.0.1","webpack-merge":"^6.0.1"},"packageManager":"pnpm@10.17.0"}');
46553
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@share-crm/sharedev-cli","version":"0.0.4-rc.25","private":false,"description":"sharedev command line tool","type":"module","main":"dist/sharedev.js","bin":{"sharedev":"./bin/cli.mjs"},"author":{"name":"sharecrm-npm"},"files":["dist","bin","README.md"],"scripts":{"build":"tsc --noEmit && webpack --config build/webpack/webpack.prod.cjs","build:debug":"tsc --noEmit && webpack --config build/webpack/webpack.debug.cjs","build:bin":"bun build --compile --target=bun-darwin-x64 src/cli.ts --outfile scripts/sharedev-darwin-x64 && bun build --compile --target=bun-darwin-arm64 src/cli.ts --outfile scripts/sharedev-darwin-arm64 && bun build --compile --target=bun-windows-x64 src/cli.ts --outfile scripts/sharedev-windows-x64.exe","build:all":"npm run build && npm run build:bin","dev":"tsc --noEmit --watch & webpack --config build/webpack/webpack.dev.cjs --watch","dev2":"node src/cli.ts","typecheck":"tsc --noEmit","prettier":"prettier --write ./src/**/*.ts","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage"},"dependencies":{"@clack/prompts":"^1.1.0","@mariozechner/pi-coding-agent":"^0.62.0","axios":"~1.13.0","chalk":"^5.6.2","commander":"^14.0.1","extract-zip":"^2.0.1","fast-xml-parser":"^5.2.5","fs-extra":"^11.3.2","lodash-es":"^4.18.1","ora":"^9.3.0","terser-webpack-plugin":"^5.6.1"},"devDependencies":{"@types/extract-zip":"^2.0.3","@types/fs-extra":"^11.0.4","@types/lodash-es":"^4.17.12","@types/node":"^24.3.0","@vitest/coverage-v8":"^4.1.8","ts-loader":"^9.5.4","typescript":"^5.9.2","vitest":"^3.2.6","webpack":"^5.101.3","webpack-cli":"^6.0.1","webpack-merge":"^6.0.1"},"packageManager":"pnpm@10.17.0"}');
46404
46554
 
46405
46555
  /***/ }
46406
46556
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@share-crm/sharedev-cli",
3
- "version": "0.0.4-rc.24",
3
+ "version": "0.0.4-rc.25",
4
4
  "private": false,
5
5
  "description": "sharedev command line tool",
6
6
  "type": "module",
@@ -39,7 +39,8 @@
39
39
  "fast-xml-parser": "^5.2.5",
40
40
  "fs-extra": "^11.3.2",
41
41
  "lodash-es": "^4.18.1",
42
- "ora": "^9.3.0"
42
+ "ora": "^9.3.0",
43
+ "terser-webpack-plugin": "^5.6.1"
43
44
  },
44
45
  "devDependencies": {
45
46
  "@types/extract-zip": "^2.0.3",