@share-crm/sharedev-cli 0.0.4-rc.23 → 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 +1043 -6
  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
 
@@ -10623,6 +10632,12 @@ Examples:
10623
10632
  $ sharedev object-dev option-set list
10624
10633
  $ sharedev object-dev option-set pull --all
10625
10634
  $ sharedev object-dev option-set push --apiNames demo_option_set,test_option_set
10635
+ $ sharedev object-dev global-variable pull
10636
+ $ sharedev object-dev global-variable push
10637
+ $ sharedev object-dev global-variable push --apiNames var_demo__g,var_demo2__g
10638
+ $ sharedev object-dev multi-currency pull
10639
+ $ sharedev object-dev multi-currency push
10640
+ $ sharedev object-dev multi-currency push --currencyCodes USD,EUR
10626
10641
  $ sharedev object-dev scene create --objectApiName AccountObj --data "{}"
10627
10642
  $ sharedev object-dev scene list --objectApiName AccountObj
10628
10643
  $ sharedev object-dev scene pull --objectApiNames AccountObj,LeadsObj
@@ -11029,6 +11044,42 @@ Examples:
11029
11044
  void context;
11030
11045
  await (0, index_ts_1.objectDevOptionSetPushCommand)(options);
11031
11046
  }));
11047
+ const globalVariableCommand = objectDev.command('global-variable').description('Global variable operations');
11048
+ globalVariableCommand
11049
+ .command('pull')
11050
+ .description('Pull global variables via shareCli execute')
11051
+ .option('--force', 'Force overwrite local metadata files regardless of local status')
11052
+ .option('--yes', 'Skip the force confirmation prompt')
11053
+ .action((0, command_ts_1.createCommandAction)('object-dev', 'global-variable.pull', runtimeContext, async ({ options, context }) => {
11054
+ void context;
11055
+ await (0, index_ts_1.objectDevGlobalVariablePullCommand)(options);
11056
+ }));
11057
+ globalVariableCommand
11058
+ .command('push')
11059
+ .description('Push global variables via shareCli execute')
11060
+ .option('--apiNames <apiNames>', 'Target global-variable apiNames, comma separated. Push all local global variables when omitted')
11061
+ .action((0, command_ts_1.createCommandAction)('object-dev', 'global-variable.push', runtimeContext, async ({ options, context }) => {
11062
+ void context;
11063
+ await (0, index_ts_1.objectDevGlobalVariablePushCommand)(options);
11064
+ }));
11065
+ const multiCurrencyCommand = objectDev.command('multi-currency').description('Multi-currency operations');
11066
+ multiCurrencyCommand
11067
+ .command('pull')
11068
+ .description('Pull multi-currency settings via shareCli execute')
11069
+ .option('--force', 'Force overwrite local metadata files regardless of local status')
11070
+ .option('--yes', 'Skip the force confirmation prompt')
11071
+ .action((0, command_ts_1.createCommandAction)('object-dev', 'multi-currency.pull', runtimeContext, async ({ options, context }) => {
11072
+ void context;
11073
+ await (0, index_ts_1.objectDevMultiCurrencyPullCommand)(options);
11074
+ }));
11075
+ multiCurrencyCommand
11076
+ .command('push')
11077
+ .description('Push multi-currency settings via shareCli execute')
11078
+ .option('--currencyCodes <currencyCodes>', 'Target currency codes, comma separated. Push all local currencies when omitted')
11079
+ .action((0, command_ts_1.createCommandAction)('object-dev', 'multi-currency.push', runtimeContext, async ({ options, context }) => {
11080
+ void context;
11081
+ await (0, index_ts_1.objectDevMultiCurrencyPushCommand)(options);
11082
+ }));
11032
11083
  const sceneCommand = objectDev.command('scene').description('Object scene operations');
11033
11084
  sceneCommand
11034
11085
  .command('create')
@@ -11315,6 +11366,36 @@ Examples:
11315
11366
  }
11316
11367
 
11317
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
+
11318
11399
  /***/ },
11319
11400
 
11320
11401
  /***/ 9664
@@ -12026,6 +12107,13 @@ function registerWorkflowNamespace(program, runtimeContext) {
12026
12107
  .action((0, command_ts_1.createCommandAction)('workflow def', 'support', runtimeContext, async ({ context }) => {
12027
12108
  await (0, workflow_def_command_ts_1.workflowDefSupportCommand)(context, {});
12028
12109
  }));
12110
+ // workflow def get-license-info
12111
+ workflowDef
12112
+ .command('get-license-info')
12113
+ .description('工作流查询定义配额')
12114
+ .action((0, command_ts_1.createCommandAction)('workflow def', 'get-license-info', runtimeContext, async ({ context }) => {
12115
+ await (0, workflow_def_command_ts_1.workflowDefGetLicenseInfoCommand)(context, {});
12116
+ }));
12029
12117
  }
12030
12118
 
12031
12119
 
@@ -12835,6 +12923,18 @@ const SHARE_CLI_COMMAND_PATH_MAP = {
12835
12923
  emailTemplate: {
12836
12924
  'template-page': ['object-dev', 'email-template', 'template-page'],
12837
12925
  },
12926
+ globalVariable: {
12927
+ list: ['object-dev', 'global-variable', 'list'],
12928
+ create: ['object-dev', 'global-variable', 'create'],
12929
+ update: ['object-dev', 'global-variable', 'update'],
12930
+ },
12931
+ multiCurrency: {
12932
+ status: ['object-dev', 'multi-currency', 'status'],
12933
+ 'currency-list': ['object-dev', 'multi-currency', 'currency-list'],
12934
+ 'add-currency': ['object-dev', 'multi-currency', 'add-currency'],
12935
+ 'edit-currency': ['object-dev', 'multi-currency', 'edit-currency'],
12936
+ 'batch-modify-rate': ['object-dev', 'multi-currency', 'batch-modify-rate'],
12937
+ },
12838
12938
  dataAuth: {
12839
12939
  getCommonPrivilegeList: ['access', 'data-auth', 'get-common-privilege-list'],
12840
12940
  batchUpdateCommonPrivilege: ['access', 'data-auth', 'batch-update-common-privilege'],
@@ -12915,6 +13015,7 @@ const SHARE_CLI_COMMAND_PATH_MAP = {
12915
13015
  findCustomObjs: ['WorkflowDefFindCustomObjs'],
12916
13016
  getExternalNoticeOuterRoles: ['WorkflowDefGetExternalNoticeAppOuterRoles'],
12917
13017
  support: ['WorkflowDefSupport'],
13018
+ getLicenseInfo: ['WorkflowDefGetLicenseInfo'],
12918
13019
  },
12919
13020
  flowDef: {
12920
13021
  list: ['FlowDefList'],
@@ -12938,6 +13039,7 @@ const SHARE_CLI_COMMAND_PATH_MAP = {
12938
13039
  afterActionConfig: ['FlowDefAfterActionConfig'],
12939
13040
  flowSupportVariable: ['FlowDefGetFlowSupportVariable'],
12940
13041
  getHistory: ['FlowDefGetHistory'],
13042
+ getQuota: ['FlowDefGetQuota'],
12941
13043
  getWebConfigs: ['FlowDefGetWebConfigs'],
12942
13044
  },
12943
13045
  agentScheduleDef: {
@@ -13021,6 +13123,11 @@ const SHARE_CLI_COMMAND_PATH_MAP = {
13021
13123
  regenerateTaskHandler: ['StageTaskRegenerate'],
13022
13124
  updateAndComplete: ['StageTaskUpdateComplete'],
13023
13125
  },
13126
+ // Manual addition — not generated
13127
+ sales: {
13128
+ returnAction: ['ReturnAction'],
13129
+ moveAction: ['MoveAction'],
13130
+ },
13024
13131
  flowRuntime: {
13025
13132
  commonOpinionDelete: ['FlowOpinionDelete'],
13026
13133
  commonOpinionEdit: ['FlowOpinionEdit'],
@@ -13824,6 +13931,18 @@ exports.q = {
13824
13931
  apiNameVariable: 'apiName',
13825
13932
  defaultOpenTag: '<OptionSet xmlns="http://sharecrm.com/metadata">',
13826
13933
  },
13934
+ GlobalVariable: {
13935
+ dirPathTemplate: 'tenant-config/global-variables',
13936
+ fileNameTemplate: '{apiName}.global-variable-meta.xml',
13937
+ apiNameVariable: 'apiName',
13938
+ defaultOpenTag: '<GlobalVariable xmlns="http://sharecrm.com/metadata">',
13939
+ },
13940
+ MultiCurrency: {
13941
+ dirPathTemplate: 'tenant-config/multi-currency',
13942
+ fileNameTemplate: '{currencyCode}.multi-currency-meta.xml',
13943
+ apiNameVariable: 'currencyCode',
13944
+ defaultOpenTag: '<MultiCurrency xmlns="http://sharecrm.com/metadata">',
13945
+ },
13827
13946
  CommonPrivilege: {
13828
13947
  dirPathTemplate: 'tenant-config/data-auth/common-privilege',
13829
13948
  fileNameTemplate: '{apiName}.common-privilege-info.xml',
@@ -13831,7 +13950,7 @@ exports.q = {
13831
13950
  defaultOpenTag: '<CommonPrivilege xmlns="http://sharecrm.com/metadata">',
13832
13951
  },
13833
13952
  ObjectMapping: {
13834
- dirPathTemplate: 'tenant-config/object-mappings',
13953
+ dirPathTemplate: 'tenant-config/mapping-rules',
13835
13954
  fileNameTemplate: '{apiName}.object-mapping-meta.xml',
13836
13955
  apiNameVariable: 'apiName',
13837
13956
  defaultOpenTag: '<ObjectMapping xmlns="http://sharecrm.com/metadata">',
@@ -18536,6 +18655,7 @@ exports.flowDefAfterActionConfigCommand = flowDefAfterActionConfigCommand;
18536
18655
  exports.flowDefFlowSupportVariableCommand = flowDefFlowSupportVariableCommand;
18537
18656
  exports.flowDefGetHistoryCommand = flowDefGetHistoryCommand;
18538
18657
  exports.flowDefGetWebConfigsCommand = flowDefGetWebConfigsCommand;
18658
+ exports.flowDefGetQuotaCommand = flowDefGetQuotaCommand;
18539
18659
  const logger_ts_1 = __webpack_require__(8802);
18540
18660
  const request_execute_command_paths_ts_1 = __webpack_require__(1402);
18541
18661
  const flow_def_service_ts_1 = __webpack_require__(2334);
@@ -18929,6 +19049,20 @@ async function flowDefGetWebConfigsCommand(_context, options) {
18929
19049
  throw error;
18930
19050
  }
18931
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
+ }
18932
19066
 
18933
19067
 
18934
19068
  /***/ },
@@ -20050,6 +20184,48 @@ async function objectDevFieldPushCommand(options) {
20050
20184
  }
20051
20185
 
20052
20186
 
20187
+ /***/ },
20188
+
20189
+ /***/ 6844
20190
+ (__unused_webpack_module, exports, __webpack_require__) {
20191
+
20192
+
20193
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
20194
+ exports.objectDevGlobalVariablePullCommand = objectDevGlobalVariablePullCommand;
20195
+ exports.objectDevGlobalVariablePushCommand = objectDevGlobalVariablePushCommand;
20196
+ const prompts_1 = __webpack_require__(388);
20197
+ const logger_ts_1 = __webpack_require__(8802);
20198
+ const index_ts_1 = __webpack_require__(6076);
20199
+ const printErrorMessages = (errorMessages) => {
20200
+ if (!errorMessages.length) {
20201
+ return false;
20202
+ }
20203
+ errorMessages.forEach((error) => logger_ts_1.loggerService.error(error));
20204
+ return true;
20205
+ };
20206
+ async function objectDevGlobalVariablePullCommand(options) {
20207
+ if (options.force && options.yes !== true) {
20208
+ const confirmed = await (0, prompts_1.confirm)({
20209
+ message: 'This will force overwrite local global-variable metadata files regardless of local status. Continue?',
20210
+ initialValue: false
20211
+ });
20212
+ if (!confirmed) {
20213
+ throw new Error('Command cancelled.');
20214
+ }
20215
+ }
20216
+ const result = await (0, index_ts_1.globalVariablePullService)(options.force === true);
20217
+ if (printErrorMessages(result.errorMessages))
20218
+ return;
20219
+ logger_ts_1.loggerService.success(`Global variable pull completed: found=${result.found}, written=${result.written}, skipped=${result.skipped}`);
20220
+ }
20221
+ async function objectDevGlobalVariablePushCommand(options) {
20222
+ const result = await (0, index_ts_1.globalVariablePushService)(options.apiNames);
20223
+ if (printErrorMessages(result.errorMessages))
20224
+ return;
20225
+ logger_ts_1.loggerService.success(`Global variable push completed: found=${result.found}, written=${result.written}, skipped=${result.skipped}`);
20226
+ }
20227
+
20228
+
20053
20229
  /***/ },
20054
20230
 
20055
20231
  /***/ 8574
@@ -20058,8 +20234,8 @@ async function objectDevFieldPushCommand(options) {
20058
20234
  var __webpack_unused_export__;
20059
20235
 
20060
20236
  __webpack_unused_export__ = ({ value: true });
20061
- exports.objectDevConvertRuleListCommand = exports.objectDevObjectMappingPushCommand = exports.objectDevObjectMappingUpdateCommand = exports.objectDevObjectMappingCreateCommand = exports.objectDevObjectMappingPullCommand = exports.objectDevButtonPushCommand = exports.objectDevButtonUpdateCommand = exports.objectDevButtonCreateCommand = exports.objectDevButtonPullCommand = exports.objectDevButtonListCommand = exports.objectDevValidateRuleUpdateCommand = exports.objectDevValidateRulePushCommand = exports.objectDevValidateRulePullCommand = exports.objectDevValidateRuleListCommand = exports.objectDevValidateRuleCreateCommand = exports.objectDevLayoutRuleUpdateCommand = exports.objectDevLayoutRulePushCommand = exports.objectDevLayoutRulePullCommand = exports.objectDevLayoutRuleListCommand = exports.objectDevLayoutRuleCreateCommand = exports.objectDevLayoutUpdateCommand = exports.objectDevLayoutPushCommand = exports.objectDevLayoutPullCommand = exports.objectDevLayoutListCommand = exports.objectDevLayoutEnableEditCommand = exports.objectDevLayoutEditStatusCommand = exports.objectDevLayoutCreateCommand = exports.objectDevFieldPushCommand = exports.objectDevFieldUpdateCommand = exports.objectDevFieldCreateCommand = exports.objectDevFieldListCommand = exports.objectDevObjectPushCommand = exports.objectDevObjectUpdateCommand = exports.objectDevObjectCreateCommand = exports.objectDevSceneUpdateCommand = exports.objectDevScenePushCommand = exports.objectDevScenePullCommand = exports.objectDevSceneListCommand = exports.objectDevSceneCreateCommand = exports.objectDevOptionSetUpdateCommand = exports.objectDevOptionSetPushCommand = exports.objectDevOptionSetPullCommand = exports.objectDevOptionSetListCommand = exports.objectDevOptionSetDeleteCommand = exports.objectDevOptionSetCreateCommand = exports.objectDevObjectRelatedPullCommand = __webpack_unused_export__ = __webpack_unused_export__ = exports.objectDevObjectPullCommand = exports.objectDevObjectListCommand = void 0;
20062
- exports.objectDevEmailTemplateListCommand = exports.objectDevConvertRulePushCommand = exports.objectDevConvertRuleUpdateCommand = exports.objectDevConvertRuleCreateCommand = exports.objectDevConvertRulePullCommand = void 0;
20237
+ exports.objectDevObjectMappingPullCommand = exports.objectDevButtonPushCommand = exports.objectDevButtonUpdateCommand = exports.objectDevButtonCreateCommand = exports.objectDevButtonPullCommand = exports.objectDevButtonListCommand = exports.objectDevValidateRuleUpdateCommand = exports.objectDevValidateRulePushCommand = exports.objectDevValidateRulePullCommand = exports.objectDevValidateRuleListCommand = exports.objectDevValidateRuleCreateCommand = exports.objectDevLayoutRuleUpdateCommand = exports.objectDevLayoutRulePushCommand = exports.objectDevLayoutRulePullCommand = exports.objectDevLayoutRuleListCommand = exports.objectDevLayoutRuleCreateCommand = exports.objectDevLayoutUpdateCommand = exports.objectDevLayoutPushCommand = exports.objectDevLayoutPullCommand = exports.objectDevLayoutListCommand = exports.objectDevLayoutEnableEditCommand = exports.objectDevLayoutEditStatusCommand = exports.objectDevLayoutCreateCommand = exports.objectDevFieldPushCommand = exports.objectDevFieldUpdateCommand = exports.objectDevFieldCreateCommand = exports.objectDevFieldListCommand = exports.objectDevObjectPushCommand = exports.objectDevObjectUpdateCommand = exports.objectDevObjectCreateCommand = exports.objectDevSceneUpdateCommand = exports.objectDevScenePushCommand = exports.objectDevScenePullCommand = exports.objectDevSceneListCommand = exports.objectDevSceneCreateCommand = exports.objectDevMultiCurrencyPushCommand = exports.objectDevMultiCurrencyPullCommand = exports.objectDevGlobalVariablePushCommand = exports.objectDevGlobalVariablePullCommand = exports.objectDevOptionSetUpdateCommand = exports.objectDevOptionSetPushCommand = exports.objectDevOptionSetPullCommand = exports.objectDevOptionSetListCommand = exports.objectDevOptionSetDeleteCommand = exports.objectDevOptionSetCreateCommand = exports.objectDevObjectRelatedPullCommand = __webpack_unused_export__ = __webpack_unused_export__ = exports.objectDevObjectPullCommand = exports.objectDevObjectListCommand = void 0;
20238
+ exports.objectDevEmailTemplateListCommand = exports.objectDevConvertRulePushCommand = exports.objectDevConvertRuleUpdateCommand = exports.objectDevConvertRuleCreateCommand = exports.objectDevConvertRulePullCommand = exports.objectDevConvertRuleListCommand = exports.objectDevObjectMappingPushCommand = exports.objectDevObjectMappingUpdateCommand = exports.objectDevObjectMappingCreateCommand = void 0;
20063
20239
  var object_ts_1 = __webpack_require__(6983);
20064
20240
  Object.defineProperty(exports, "objectDevObjectListCommand", ({ enumerable: true, get: function () { return object_ts_1.objectDevObjectListCommand; } }));
20065
20241
  Object.defineProperty(exports, "objectDevObjectPullCommand", ({ enumerable: true, get: function () { return object_ts_1.objectDevObjectPullCommand; } }));
@@ -20074,6 +20250,12 @@ Object.defineProperty(exports, "objectDevOptionSetListCommand", ({ enumerable: t
20074
20250
  Object.defineProperty(exports, "objectDevOptionSetPullCommand", ({ enumerable: true, get: function () { return option_set_ts_1.objectDevOptionSetPullCommand; } }));
20075
20251
  Object.defineProperty(exports, "objectDevOptionSetPushCommand", ({ enumerable: true, get: function () { return option_set_ts_1.objectDevOptionSetPushCommand; } }));
20076
20252
  Object.defineProperty(exports, "objectDevOptionSetUpdateCommand", ({ enumerable: true, get: function () { return option_set_ts_1.objectDevOptionSetUpdateCommand; } }));
20253
+ var global_variable_ts_1 = __webpack_require__(6844);
20254
+ Object.defineProperty(exports, "objectDevGlobalVariablePullCommand", ({ enumerable: true, get: function () { return global_variable_ts_1.objectDevGlobalVariablePullCommand; } }));
20255
+ Object.defineProperty(exports, "objectDevGlobalVariablePushCommand", ({ enumerable: true, get: function () { return global_variable_ts_1.objectDevGlobalVariablePushCommand; } }));
20256
+ var multi_currency_ts_1 = __webpack_require__(6099);
20257
+ Object.defineProperty(exports, "objectDevMultiCurrencyPullCommand", ({ enumerable: true, get: function () { return multi_currency_ts_1.objectDevMultiCurrencyPullCommand; } }));
20258
+ Object.defineProperty(exports, "objectDevMultiCurrencyPushCommand", ({ enumerable: true, get: function () { return multi_currency_ts_1.objectDevMultiCurrencyPushCommand; } }));
20077
20259
  var scene_ts_1 = __webpack_require__(9158);
20078
20260
  Object.defineProperty(exports, "objectDevSceneCreateCommand", ({ enumerable: true, get: function () { return scene_ts_1.objectDevSceneCreateCommand; } }));
20079
20261
  Object.defineProperty(exports, "objectDevSceneListCommand", ({ enumerable: true, get: function () { return scene_ts_1.objectDevSceneListCommand; } }));
@@ -20358,6 +20540,48 @@ function resolveLayoutPullObjectApiNames(objectApiNames, objectApiName) {
20358
20540
  }
20359
20541
 
20360
20542
 
20543
+ /***/ },
20544
+
20545
+ /***/ 6099
20546
+ (__unused_webpack_module, exports, __webpack_require__) {
20547
+
20548
+
20549
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
20550
+ exports.objectDevMultiCurrencyPullCommand = objectDevMultiCurrencyPullCommand;
20551
+ exports.objectDevMultiCurrencyPushCommand = objectDevMultiCurrencyPushCommand;
20552
+ const prompts_1 = __webpack_require__(388);
20553
+ const logger_ts_1 = __webpack_require__(8802);
20554
+ const index_ts_1 = __webpack_require__(6076);
20555
+ const printErrorMessages = (errorMessages) => {
20556
+ if (!errorMessages.length) {
20557
+ return false;
20558
+ }
20559
+ errorMessages.forEach((error) => logger_ts_1.loggerService.error(error));
20560
+ return true;
20561
+ };
20562
+ async function objectDevMultiCurrencyPullCommand(options) {
20563
+ if (options.force && options.yes !== true) {
20564
+ const confirmed = await (0, prompts_1.confirm)({
20565
+ message: 'This will force overwrite local multi-currency metadata files regardless of local status. Continue?',
20566
+ initialValue: false
20567
+ });
20568
+ if (!confirmed) {
20569
+ throw new Error('Command cancelled.');
20570
+ }
20571
+ }
20572
+ const result = await (0, index_ts_1.multiCurrencyPullService)(options.force === true);
20573
+ if (printErrorMessages(result.errorMessages))
20574
+ return;
20575
+ logger_ts_1.loggerService.success(`Multi-currency pull completed: found=${result.found}, written=${result.written}, skipped=${result.skipped}`);
20576
+ }
20577
+ async function objectDevMultiCurrencyPushCommand(options) {
20578
+ const result = await (0, index_ts_1.multiCurrencyPushService)(options.currencyCodes);
20579
+ if (printErrorMessages(result.errorMessages))
20580
+ return;
20581
+ logger_ts_1.loggerService.success(`Multi-currency push completed: found=${result.found}, written=${result.written}, skipped=${result.skipped}`);
20582
+ }
20583
+
20584
+
20361
20585
  /***/ },
20362
20586
 
20363
20587
  /***/ 6320
@@ -21791,6 +22015,12 @@ const convertRulePushService = async (ruleApiNames, skipOverwriteConfirm = false
21791
22015
  const updatedContent = { ...(ruleMeta.content && isRecord(ruleMeta.content)
21792
22016
  ? ruleMeta.content
21793
22017
  : content) };
22018
+ if ('ruleList' in updatedContent) {
22019
+ if (!updatedContent.rule_list) {
22020
+ updatedContent.rule_list = updatedContent.ruleList;
22021
+ }
22022
+ delete updatedContent.ruleList;
22023
+ }
21794
22024
  logger_ts_1.loggerService.startLoading('convert-rule push request: ' + ruleApiName + ' (' + (isCreate ? 'create' : 'update') + ')');
21795
22025
  const raw = await (0, request_ts_1.requestObjectDevExecute)(isCreate
21796
22026
  ? (0, request_execute_command_paths_ts_1.getShareCliCommandPath)('convertRule', 'create-rule')
@@ -22269,6 +22499,283 @@ const fieldUpdateService = async (objectApiName, fieldApiName, data) => {
22269
22499
  exports.fieldUpdateService = fieldUpdateService;
22270
22500
 
22271
22501
 
22502
+ /***/ },
22503
+
22504
+ /***/ 6394
22505
+ (__unused_webpack_module, exports, __webpack_require__) {
22506
+
22507
+
22508
+ var __importDefault = (this && this.__importDefault) || function (mod) {
22509
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22510
+ };
22511
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
22512
+ exports.globalVariableListService = globalVariableListService;
22513
+ const logger_ts_1 = __webpack_require__(8802);
22514
+ const request_execute_command_paths_ts_1 = __webpack_require__(1402);
22515
+ const normalize_ts_1 = __importDefault(__webpack_require__(7495));
22516
+ const request_ts_1 = __webpack_require__(1153);
22517
+ const types_ts_1 = __webpack_require__(9213);
22518
+ const requestGlobalVariableListExecute = async () => await (0, request_ts_1.requestObjectDevExecute)((0, request_execute_command_paths_ts_1.getShareCliCommandPath)('globalVariable', 'list'), {
22519
+ label: '',
22520
+ realTimeTrans: true
22521
+ });
22522
+ async function globalVariableListService() {
22523
+ const errorMessages = [];
22524
+ logger_ts_1.loggerService.startLoading('Fetching global variable list...');
22525
+ try {
22526
+ const response = await requestGlobalVariableListExecute();
22527
+ const result = await (0, request_ts_1.extractObjectDevServiceResult)(response, (serviceResponse) => {
22528
+ const data = (0, types_ts_1.narrowObjectDevResponse)(serviceResponse.data);
22529
+ const globalVariableList = (0, types_ts_1.narrowObjectDevResponse)(data?.globalVariableList);
22530
+ if (!globalVariableList) {
22531
+ return [];
22532
+ }
22533
+ return globalVariableList.map((item) => ({
22534
+ label: normalize_ts_1.default.normalizeText(item.label),
22535
+ apiName: normalize_ts_1.default.normalizeText(item.api_name),
22536
+ type: normalize_ts_1.default.normalizeText(item.type),
22537
+ value: normalize_ts_1.default.normalizeText(item.value),
22538
+ defineType: normalize_ts_1.default.normalizeText(item.define_type),
22539
+ createTime: normalize_ts_1.default.normalizeDateTime(item.create_time),
22540
+ lastModifiedTime: normalize_ts_1.default.normalizeDateTime(item.last_modified_time),
22541
+ content: item
22542
+ })).filter((item) => item.apiName);
22543
+ });
22544
+ if (!result.success) {
22545
+ throw new Error(result.errorMessage);
22546
+ }
22547
+ return {
22548
+ globalVariables: result.data || [],
22549
+ found: result.data?.length || 0,
22550
+ errorMessages
22551
+ };
22552
+ }
22553
+ catch (error) {
22554
+ errorMessages.push(`Global variable list failed: ${error}`);
22555
+ return {
22556
+ globalVariables: [],
22557
+ found: 0,
22558
+ errorMessages
22559
+ };
22560
+ }
22561
+ finally {
22562
+ logger_ts_1.loggerService.stopLoading();
22563
+ }
22564
+ }
22565
+
22566
+
22567
+ /***/ },
22568
+
22569
+ /***/ 8850
22570
+ (__unused_webpack_module, exports, __webpack_require__) {
22571
+
22572
+
22573
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
22574
+ exports.globalVariablePullService = globalVariablePullService;
22575
+ const logger_ts_1 = __webpack_require__(8802);
22576
+ const index_ts_1 = __webpack_require__(7774);
22577
+ const global_variable_list_ts_1 = __webpack_require__(6394);
22578
+ const xmlMetadataManager = new index_ts_1.XmlMetadataManager();
22579
+ async function globalVariablePullService(force = false) {
22580
+ const errorMessages = [];
22581
+ const listResult = await (0, global_variable_list_ts_1.globalVariableListService)();
22582
+ errorMessages.push(...listResult.errorMessages);
22583
+ if (errorMessages.length) {
22584
+ return {
22585
+ objectApiNames: [],
22586
+ found: 0,
22587
+ written: 0,
22588
+ skipped: 0,
22589
+ errorMessages
22590
+ };
22591
+ }
22592
+ let written = 0;
22593
+ let skipped = 0;
22594
+ logger_ts_1.loggerService.startLoading(`global-variable pull write xml: ${listResult.globalVariables.length}`);
22595
+ try {
22596
+ for (const globalVariable of listResult.globalVariables) {
22597
+ const localStatus = await xmlMetadataManager.readXml('GlobalVariable', globalVariable.apiName, { fields: ['status'] });
22598
+ if (!force && localStatus.status !== 'unchanged') {
22599
+ skipped += 1;
22600
+ logger_ts_1.loggerService.info(`Global-variable local status ${localStatus.status}, skip overwrite: ${globalVariable.apiName}. Use --force to overwrite local metadata.`);
22601
+ continue;
22602
+ }
22603
+ await xmlMetadataManager.writeXml('GlobalVariable', globalVariable.apiName, globalVariable.content, {
22604
+ status: 'unchanged'
22605
+ });
22606
+ written += 1;
22607
+ }
22608
+ }
22609
+ catch (error) {
22610
+ errorMessages.push(`Global variable pull failed: ${error}`);
22611
+ }
22612
+ finally {
22613
+ logger_ts_1.loggerService.stopLoading();
22614
+ }
22615
+ return {
22616
+ objectApiNames: [],
22617
+ found: listResult.found,
22618
+ written,
22619
+ skipped,
22620
+ errorMessages
22621
+ };
22622
+ }
22623
+
22624
+
22625
+ /***/ },
22626
+
22627
+ /***/ 4326
22628
+ (__unused_webpack_module, exports, __webpack_require__) {
22629
+
22630
+
22631
+ var __importDefault = (this && this.__importDefault) || function (mod) {
22632
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22633
+ };
22634
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
22635
+ exports.globalVariablePushService = void 0;
22636
+ const normalize_ts_1 = __importDefault(__webpack_require__(7495));
22637
+ const logger_ts_1 = __webpack_require__(8802);
22638
+ const request_execute_command_paths_ts_1 = __webpack_require__(1402);
22639
+ const index_ts_1 = __webpack_require__(7774);
22640
+ const global_variable_list_ts_1 = __webpack_require__(6394);
22641
+ const global_variable_pull_ts_1 = __webpack_require__(8850);
22642
+ const request_ts_1 = __webpack_require__(1153);
22643
+ const xmlMetadataManager = new index_ts_1.XmlMetadataManager();
22644
+ const isRecord = normalize_ts_1.default.isRecord;
22645
+ const globalVariablePushService = async (apiNames) => {
22646
+ const errorMessages = [];
22647
+ const globalVariableApiNames = await resolveTargetApiNames(apiNames);
22648
+ if (!globalVariableApiNames.length) {
22649
+ throw new Error('No global-variable metadata found. Use object-dev global-variable pull or pass --apiNames <apiNames>.');
22650
+ }
22651
+ const globalVariableListResult = await (0, global_variable_list_ts_1.globalVariableListService)();
22652
+ errorMessages.push(...globalVariableListResult.errorMessages);
22653
+ if (errorMessages.length) {
22654
+ return {
22655
+ objectApiNames: globalVariableApiNames,
22656
+ found: globalVariableApiNames.length,
22657
+ written: 0,
22658
+ skipped: globalVariableApiNames.length,
22659
+ errorMessages
22660
+ };
22661
+ }
22662
+ let written = 0;
22663
+ let skipped = 0;
22664
+ logger_ts_1.loggerService.startLoading(`global-variable push request: ${globalVariableApiNames.length}`);
22665
+ try {
22666
+ for (const globalVariableApiName of globalVariableApiNames) {
22667
+ try {
22668
+ let globalVariableMeta = await xmlMetadataManager.readXml('GlobalVariable', globalVariableApiName);
22669
+ if (!globalVariableMeta.content || !isRecord(globalVariableMeta.content)) {
22670
+ throw new Error(`Invalid global-variable content: ${globalVariableApiName}`);
22671
+ }
22672
+ const remoteItem = globalVariableListResult.globalVariables.find((item) => item.apiName === globalVariableApiName);
22673
+ const remoteExists = Boolean(remoteItem);
22674
+ if (globalVariableMeta.status === 'new' && remoteExists) {
22675
+ await xmlMetadataManager.writeXml('GlobalVariable', globalVariableApiName, globalVariableMeta.content, {
22676
+ status: 'modified',
22677
+ features: globalVariableMeta.features,
22678
+ extra: globalVariableMeta.extra
22679
+ });
22680
+ logger_ts_1.loggerService.warn(`Global-variable exists remotely, local status changed from new to modified: ${globalVariableApiName}`);
22681
+ globalVariableMeta = await xmlMetadataManager.readXml('GlobalVariable', globalVariableApiName);
22682
+ }
22683
+ if (globalVariableMeta.status !== 'new' && !remoteExists) {
22684
+ await xmlMetadataManager.writeXml('GlobalVariable', globalVariableApiName, globalVariableMeta.content, {
22685
+ status: 'new',
22686
+ features: globalVariableMeta.features,
22687
+ extra: globalVariableMeta.extra
22688
+ });
22689
+ logger_ts_1.loggerService.warn(`Global-variable does not exist remotely, local status changed from ${globalVariableMeta.status} to new: ${globalVariableApiName}`);
22690
+ globalVariableMeta = await xmlMetadataManager.readXml('GlobalVariable', globalVariableApiName);
22691
+ }
22692
+ const isCreate = globalVariableMeta.status === 'new';
22693
+ if (!globalVariableMeta.content || !isRecord(globalVariableMeta.content)) {
22694
+ throw new Error(`Invalid global-variable content: ${globalVariableApiName}`);
22695
+ }
22696
+ const payload = buildGlobalVariablePayload(globalVariableMeta.content, globalVariableApiName, isCreate ? undefined : remoteItem?.content);
22697
+ const response = await (0, request_ts_1.requestObjectDevExecute)((0, request_execute_command_paths_ts_1.getShareCliCommandPath)('globalVariable', isCreate ? 'create' : 'update'), {
22698
+ json_data: JSON.stringify(payload)
22699
+ });
22700
+ if (response.success !== true || normalize_ts_1.default.normalizeString(normalize_ts_1.default.asString(response.code)) !== 'OK') {
22701
+ throw new Error(normalize_ts_1.default.normalizeText(response.message) || 'Unknown error');
22702
+ }
22703
+ await xmlMetadataManager.writeXml('GlobalVariable', globalVariableApiName, payload, {
22704
+ status: 'unchanged',
22705
+ features: globalVariableMeta.features,
22706
+ extra: globalVariableMeta.extra
22707
+ });
22708
+ written += 1;
22709
+ logger_ts_1.loggerService.info(`Global-variable pushed: ${globalVariableApiName}`);
22710
+ }
22711
+ catch (error) {
22712
+ skipped += 1;
22713
+ errorMessages.push(`Global-variable push failed: ${globalVariableApiName}: ${error}`);
22714
+ }
22715
+ }
22716
+ }
22717
+ finally {
22718
+ logger_ts_1.loggerService.stopLoading();
22719
+ }
22720
+ if (written > 0) {
22721
+ logger_ts_1.loggerService.startLoading(`global-variable push post-pull: ${globalVariableApiNames.length}`);
22722
+ try {
22723
+ const postPullResult = await (0, global_variable_pull_ts_1.globalVariablePullService)(true);
22724
+ errorMessages.push(...postPullResult.errorMessages);
22725
+ }
22726
+ finally {
22727
+ logger_ts_1.loggerService.stopLoading();
22728
+ }
22729
+ }
22730
+ return {
22731
+ objectApiNames: globalVariableApiNames,
22732
+ found: globalVariableApiNames.length,
22733
+ written,
22734
+ skipped,
22735
+ errorMessages
22736
+ };
22737
+ };
22738
+ exports.globalVariablePushService = globalVariablePushService;
22739
+ async function resolveTargetApiNames(apiNames) {
22740
+ const requestedApiNames = (apiNames ?? '')
22741
+ .split(',')
22742
+ .map((item) => normalize_ts_1.default.normalizeString(item))
22743
+ .filter((item) => Boolean(item));
22744
+ if (requestedApiNames.length) {
22745
+ return [...new Set(requestedApiNames)];
22746
+ }
22747
+ const index = await xmlMetadataManager.listLocalXmlApiName(undefined, ['GlobalVariable']);
22748
+ return index['']?.GlobalVariable ?? [];
22749
+ }
22750
+ function buildGlobalVariablePayload(localContent, apiName, remoteContent) {
22751
+ const payload = {
22752
+ ...(remoteContent ?? {}),
22753
+ ...localContent,
22754
+ api_name: apiName
22755
+ };
22756
+ const existingId = normalize_ts_1.default.normalizeString(normalize_ts_1.default.asString(remoteContent?._id));
22757
+ if (existingId) {
22758
+ payload._id = existingId;
22759
+ }
22760
+ else {
22761
+ delete payload._id;
22762
+ }
22763
+ if (!normalize_ts_1.default.normalizeString(normalize_ts_1.default.asString(payload.define_type))) {
22764
+ payload.define_type = 'custom';
22765
+ }
22766
+ if (typeof payload.is_deleted !== 'boolean') {
22767
+ payload.is_deleted = false;
22768
+ }
22769
+ if (!normalize_ts_1.default.normalizeString(normalize_ts_1.default.asString(payload.label))) {
22770
+ payload.label = apiName;
22771
+ }
22772
+ if (!normalize_ts_1.default.normalizeString(normalize_ts_1.default.asString(payload.type))) {
22773
+ payload.type = 'text';
22774
+ }
22775
+ return payload;
22776
+ }
22777
+
22778
+
22272
22779
  /***/ },
22273
22780
 
22274
22781
  /***/ 6076
@@ -22277,8 +22784,8 @@ exports.fieldUpdateService = fieldUpdateService;
22277
22784
  var __webpack_unused_export__;
22278
22785
 
22279
22786
  __webpack_unused_export__ = ({ value: true });
22280
- exports.fetchConvertRuleList = exports.objectMappingPushService = exports.objectMappingUpdateService = exports.objectMappingCreateService = __webpack_unused_export__ = __webpack_unused_export__ = exports.objectMappingPullService = exports.buttonPushService = exports.buttonUpdateService = exports.buttonCreateService = exports.buttonListService = exports.buttonPullService = exports.validateRulePushService = exports.validateRuleUpdateService = exports.validateRuleCreateService = exports.validateRulePullService = exports.validateRuleListService = exports.layoutRulePushService = exports.layoutRulePullService = exports.layoutRuleUpdateService = exports.layoutRuleListService = exports.layoutRuleCreateService = exports.layoutPushService = exports.layoutPullService = exports.layoutUpdateService = exports.layoutListService = exports.layoutEnableEditService = exports.layoutEditStatusService = exports.layoutCreateService = exports.sceneUpdateService = exports.scenePushService = exports.scenePullService = exports.sceneListService = exports.sceneCreateService = exports.optionSetUpdateService = exports.optionSetPushService = exports.optionSetPullService = exports.optionSetListService = exports.optionSetDeleteService = exports.optionSetCreateService = exports.fieldPushService = exports.fieldUpdateService = exports.fieldListService = exports.fieldCreateService = exports.objectPushService = exports.objectUpdateService = exports.objectCreateService = exports.objectListService = exports.objectRelatedPullService = exports.objectPullService = void 0;
22281
- __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = exports.fetchEmailTemplateList = exports.convertRulePushService = exports.convertRuleUpdateService = exports.convertRuleCreateService = exports.convertRulePullService = __webpack_unused_export__ = void 0;
22787
+ exports.buttonPushService = exports.buttonUpdateService = exports.buttonCreateService = exports.buttonListService = exports.buttonPullService = exports.validateRulePushService = exports.validateRuleUpdateService = exports.validateRuleCreateService = exports.validateRulePullService = exports.validateRuleListService = exports.layoutRulePushService = exports.layoutRulePullService = exports.layoutRuleUpdateService = exports.layoutRuleListService = exports.layoutRuleCreateService = exports.layoutPushService = exports.layoutPullService = exports.layoutUpdateService = exports.layoutListService = exports.layoutEnableEditService = exports.layoutEditStatusService = exports.layoutCreateService = exports.sceneUpdateService = exports.scenePushService = exports.scenePullService = exports.sceneListService = exports.sceneCreateService = exports.multiCurrencyPushService = exports.multiCurrencyPullService = __webpack_unused_export__ = __webpack_unused_export__ = exports.globalVariablePushService = exports.globalVariablePullService = __webpack_unused_export__ = exports.optionSetUpdateService = exports.optionSetPushService = exports.optionSetPullService = exports.optionSetListService = exports.optionSetDeleteService = exports.optionSetCreateService = exports.fieldPushService = exports.fieldUpdateService = exports.fieldListService = exports.fieldCreateService = exports.objectPushService = exports.objectUpdateService = exports.objectCreateService = exports.objectListService = exports.objectRelatedPullService = exports.objectPullService = void 0;
22788
+ __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = exports.fetchEmailTemplateList = exports.convertRulePushService = exports.convertRuleUpdateService = exports.convertRuleCreateService = exports.convertRulePullService = __webpack_unused_export__ = exports.fetchConvertRuleList = exports.objectMappingPushService = exports.objectMappingUpdateService = exports.objectMappingCreateService = __webpack_unused_export__ = __webpack_unused_export__ = exports.objectMappingPullService = void 0;
22282
22789
  var object_pull_ts_1 = __webpack_require__(1180);
22283
22790
  Object.defineProperty(exports, "objectPullService", ({ enumerable: true, get: function () { return object_pull_ts_1.objectPullService; } }));
22284
22791
  var object_related_pull_ts_1 = __webpack_require__(8550);
@@ -22311,6 +22818,20 @@ var option_set_push_ts_1 = __webpack_require__(2554);
22311
22818
  Object.defineProperty(exports, "optionSetPushService", ({ enumerable: true, get: function () { return option_set_push_ts_1.optionSetPushService; } }));
22312
22819
  var option_set_update_ts_1 = __webpack_require__(7695);
22313
22820
  Object.defineProperty(exports, "optionSetUpdateService", ({ enumerable: true, get: function () { return option_set_update_ts_1.optionSetUpdateService; } }));
22821
+ var global_variable_list_ts_1 = __webpack_require__(6394);
22822
+ __webpack_unused_export__ = ({ enumerable: true, get: function () { return global_variable_list_ts_1.globalVariableListService; } });
22823
+ var global_variable_pull_ts_1 = __webpack_require__(8850);
22824
+ Object.defineProperty(exports, "globalVariablePullService", ({ enumerable: true, get: function () { return global_variable_pull_ts_1.globalVariablePullService; } }));
22825
+ var global_variable_push_ts_1 = __webpack_require__(4326);
22826
+ Object.defineProperty(exports, "globalVariablePushService", ({ enumerable: true, get: function () { return global_variable_push_ts_1.globalVariablePushService; } }));
22827
+ var multi_currency_status_ts_1 = __webpack_require__(7793);
22828
+ __webpack_unused_export__ = ({ enumerable: true, get: function () { return multi_currency_status_ts_1.multiCurrencyStatusService; } });
22829
+ var multi_currency_list_ts_1 = __webpack_require__(531);
22830
+ __webpack_unused_export__ = ({ enumerable: true, get: function () { return multi_currency_list_ts_1.multiCurrencyListService; } });
22831
+ var multi_currency_pull_ts_1 = __webpack_require__(8020);
22832
+ Object.defineProperty(exports, "multiCurrencyPullService", ({ enumerable: true, get: function () { return multi_currency_pull_ts_1.multiCurrencyPullService; } }));
22833
+ var multi_currency_push_ts_1 = __webpack_require__(6911);
22834
+ Object.defineProperty(exports, "multiCurrencyPushService", ({ enumerable: true, get: function () { return multi_currency_push_ts_1.multiCurrencyPushService; } }));
22314
22835
  var scene_create_ts_1 = __webpack_require__(1440);
22315
22836
  Object.defineProperty(exports, "sceneCreateService", ({ enumerable: true, get: function () { return scene_create_ts_1.sceneCreateService; } }));
22316
22837
  var scene_list_ts_1 = __webpack_require__(6140);
@@ -23346,6 +23867,423 @@ const layoutUpdateService = async (objectApiName, layoutApiName, data) => {
23346
23867
  exports.layoutUpdateService = layoutUpdateService;
23347
23868
 
23348
23869
 
23870
+ /***/ },
23871
+
23872
+ /***/ 531
23873
+ (__unused_webpack_module, exports, __webpack_require__) {
23874
+
23875
+
23876
+ var __importDefault = (this && this.__importDefault) || function (mod) {
23877
+ return (mod && mod.__esModule) ? mod : { "default": mod };
23878
+ };
23879
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
23880
+ exports.multiCurrencyListService = multiCurrencyListService;
23881
+ const logger_ts_1 = __webpack_require__(8802);
23882
+ const request_execute_command_paths_ts_1 = __webpack_require__(1402);
23883
+ const normalize_ts_1 = __importDefault(__webpack_require__(7495));
23884
+ const request_ts_1 = __webpack_require__(1153);
23885
+ const types_ts_1 = __webpack_require__(9213);
23886
+ async function multiCurrencyListService() {
23887
+ const errorMessages = [];
23888
+ logger_ts_1.loggerService.startLoading('Fetching multi-currency list...');
23889
+ try {
23890
+ const response = await (0, request_ts_1.requestObjectDevExecute)((0, request_execute_command_paths_ts_1.getShareCliCommandPath)('multiCurrency', 'currency-list'), {});
23891
+ const result = await (0, request_ts_1.extractObjectDevServiceResult)(response, (serviceResponse) => {
23892
+ const data = (0, types_ts_1.narrowObjectDevResponse)(serviceResponse.data);
23893
+ const currencyList = (0, types_ts_1.narrowObjectDevResponse)(data?.currencyList);
23894
+ if (!currencyList) {
23895
+ return [];
23896
+ }
23897
+ return currencyList.map((item) => ({
23898
+ currencyCode: normalize_ts_1.default.normalizeText(item.currencyCode),
23899
+ currencyLabel: normalize_ts_1.default.normalizeText(item.currencyLabel),
23900
+ exchangeRate: normalize_ts_1.default.normalizeText(item.exchangeRate),
23901
+ currencySymbol: normalize_ts_1.default.normalizeText(item.currencySymbol),
23902
+ currencyUnit: normalize_ts_1.default.normalizeText(item.currencyUnit),
23903
+ currencyPrefix: normalize_ts_1.default.normalizeText(item.currencyPrefix),
23904
+ currencySuffix: normalize_ts_1.default.normalizeText(item.currencySuffix),
23905
+ currencyType: normalize_ts_1.default.normalizeText(item.currencyType),
23906
+ isFunctional: normalize_ts_1.default.normalizeText(item.isFunctional),
23907
+ status: normalize_ts_1.default.normalizeText(item.status),
23908
+ createTime: normalize_ts_1.default.normalizeDateTime(item.createTime),
23909
+ lastModifiedTime: normalize_ts_1.default.normalizeDateTime(item.lastModifiedTime),
23910
+ content: item
23911
+ })).filter((item) => item.currencyCode);
23912
+ });
23913
+ if (!result.success) {
23914
+ throw new Error(result.errorMessage);
23915
+ }
23916
+ return {
23917
+ currencies: result.data || [],
23918
+ found: result.data?.length || 0,
23919
+ errorMessages
23920
+ };
23921
+ }
23922
+ catch (error) {
23923
+ errorMessages.push(`Multi-currency list failed: ${error}`);
23924
+ return {
23925
+ currencies: [],
23926
+ found: 0,
23927
+ errorMessages
23928
+ };
23929
+ }
23930
+ finally {
23931
+ logger_ts_1.loggerService.stopLoading();
23932
+ }
23933
+ }
23934
+
23935
+
23936
+ /***/ },
23937
+
23938
+ /***/ 8020
23939
+ (__unused_webpack_module, exports, __webpack_require__) {
23940
+
23941
+
23942
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
23943
+ exports.multiCurrencyPullService = multiCurrencyPullService;
23944
+ const logger_ts_1 = __webpack_require__(8802);
23945
+ const index_ts_1 = __webpack_require__(7774);
23946
+ const multi_currency_list_ts_1 = __webpack_require__(531);
23947
+ const multi_currency_status_ts_1 = __webpack_require__(7793);
23948
+ const xmlMetadataManager = new index_ts_1.XmlMetadataManager();
23949
+ async function multiCurrencyPullService(force = false) {
23950
+ const errorMessages = [];
23951
+ const statusResult = await (0, multi_currency_status_ts_1.multiCurrencyStatusService)();
23952
+ errorMessages.push(...statusResult.errorMessages);
23953
+ if (errorMessages.length) {
23954
+ return {
23955
+ objectApiNames: [],
23956
+ found: 0,
23957
+ written: 0,
23958
+ skipped: 0,
23959
+ errorMessages
23960
+ };
23961
+ }
23962
+ if (!statusResult.enabled) {
23963
+ errorMessages.push('Multi-currency is not enabled for current tenant.');
23964
+ return {
23965
+ objectApiNames: [],
23966
+ found: 0,
23967
+ written: 0,
23968
+ skipped: 0,
23969
+ errorMessages
23970
+ };
23971
+ }
23972
+ const listResult = await (0, multi_currency_list_ts_1.multiCurrencyListService)();
23973
+ errorMessages.push(...listResult.errorMessages);
23974
+ if (errorMessages.length) {
23975
+ return {
23976
+ objectApiNames: [],
23977
+ found: 0,
23978
+ written: 0,
23979
+ skipped: 0,
23980
+ errorMessages
23981
+ };
23982
+ }
23983
+ let written = 0;
23984
+ let skipped = 0;
23985
+ logger_ts_1.loggerService.startLoading(`multi-currency pull write xml: ${listResult.currencies.length}`);
23986
+ try {
23987
+ for (const currency of listResult.currencies) {
23988
+ const localStatus = await xmlMetadataManager.readXml('MultiCurrency', currency.currencyCode, { fields: ['status'] });
23989
+ if (!force && localStatus.status !== 'unchanged') {
23990
+ skipped += 1;
23991
+ logger_ts_1.loggerService.info(`Multi-currency local status ${localStatus.status}, skip overwrite: ${currency.currencyCode}. Use --force to overwrite local metadata.`);
23992
+ continue;
23993
+ }
23994
+ await xmlMetadataManager.writeXml('MultiCurrency', currency.currencyCode, currency.content, {
23995
+ status: 'unchanged',
23996
+ extra: statusResult.content
23997
+ });
23998
+ written += 1;
23999
+ }
24000
+ }
24001
+ catch (error) {
24002
+ errorMessages.push(`Multi-currency pull failed: ${error}`);
24003
+ }
24004
+ finally {
24005
+ logger_ts_1.loggerService.stopLoading();
24006
+ }
24007
+ return {
24008
+ objectApiNames: [],
24009
+ found: listResult.found,
24010
+ written,
24011
+ skipped,
24012
+ errorMessages
24013
+ };
24014
+ }
24015
+
24016
+
24017
+ /***/ },
24018
+
24019
+ /***/ 6911
24020
+ (__unused_webpack_module, exports, __webpack_require__) {
24021
+
24022
+
24023
+ var __importDefault = (this && this.__importDefault) || function (mod) {
24024
+ return (mod && mod.__esModule) ? mod : { "default": mod };
24025
+ };
24026
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
24027
+ exports.multiCurrencyPushService = void 0;
24028
+ const normalize_ts_1 = __importDefault(__webpack_require__(7495));
24029
+ const logger_ts_1 = __webpack_require__(8802);
24030
+ const request_execute_command_paths_ts_1 = __webpack_require__(1402);
24031
+ const index_ts_1 = __webpack_require__(7774);
24032
+ const multi_currency_list_ts_1 = __webpack_require__(531);
24033
+ const multi_currency_pull_ts_1 = __webpack_require__(8020);
24034
+ const multi_currency_status_ts_1 = __webpack_require__(7793);
24035
+ const request_ts_1 = __webpack_require__(1153);
24036
+ const xmlMetadataManager = new index_ts_1.XmlMetadataManager();
24037
+ const isRecord = normalize_ts_1.default.isRecord;
24038
+ const DISPLAY_FIELDS = [
24039
+ 'currencyLabel',
24040
+ 'currencySymbol',
24041
+ 'currencyUnit',
24042
+ 'currencyPrefix',
24043
+ 'currencySuffix',
24044
+ 'currencyType'
24045
+ ];
24046
+ const multiCurrencyPushService = async (currencyCodes) => {
24047
+ const errorMessages = [];
24048
+ const targetCurrencyCodes = await resolveTargetCurrencyCodes(currencyCodes);
24049
+ if (!targetCurrencyCodes.length) {
24050
+ throw new Error('No multi-currency metadata found. Use object-dev multi-currency pull or pass --currencyCodes <currencyCodes>.');
24051
+ }
24052
+ const statusResult = await (0, multi_currency_status_ts_1.multiCurrencyStatusService)();
24053
+ errorMessages.push(...statusResult.errorMessages);
24054
+ if (errorMessages.length) {
24055
+ return buildSkippedResult(targetCurrencyCodes, errorMessages);
24056
+ }
24057
+ if (!statusResult.enabled) {
24058
+ errorMessages.push('Multi-currency is not enabled for current tenant.');
24059
+ return buildSkippedResult(targetCurrencyCodes, errorMessages);
24060
+ }
24061
+ const listResult = await (0, multi_currency_list_ts_1.multiCurrencyListService)();
24062
+ errorMessages.push(...listResult.errorMessages);
24063
+ if (errorMessages.length) {
24064
+ return buildSkippedResult(targetCurrencyCodes, errorMessages);
24065
+ }
24066
+ let written = 0;
24067
+ let skipped = 0;
24068
+ const exchangeRateList = [];
24069
+ logger_ts_1.loggerService.startLoading(`multi-currency push request: ${targetCurrencyCodes.length}`);
24070
+ try {
24071
+ for (const currencyCode of targetCurrencyCodes) {
24072
+ try {
24073
+ let currencyMeta = await xmlMetadataManager.readXml('MultiCurrency', currencyCode);
24074
+ if (!currencyMeta.content || !isRecord(currencyMeta.content)) {
24075
+ throw new Error(`Invalid multi-currency content: ${currencyCode}`);
24076
+ }
24077
+ const remoteItem = listResult.currencies.find((item) => item.currencyCode === currencyCode);
24078
+ const remoteExists = Boolean(remoteItem);
24079
+ if (currencyMeta.status === 'new' && remoteExists) {
24080
+ await xmlMetadataManager.writeXml('MultiCurrency', currencyCode, currencyMeta.content, {
24081
+ status: 'modified',
24082
+ features: currencyMeta.features,
24083
+ extra: currencyMeta.extra
24084
+ });
24085
+ logger_ts_1.loggerService.warn(`Multi-currency exists remotely, local status changed from new to modified: ${currencyCode}`);
24086
+ currencyMeta = await xmlMetadataManager.readXml('MultiCurrency', currencyCode);
24087
+ }
24088
+ if (currencyMeta.status !== 'new' && !remoteExists) {
24089
+ await xmlMetadataManager.writeXml('MultiCurrency', currencyCode, currencyMeta.content, {
24090
+ status: 'new',
24091
+ features: currencyMeta.features,
24092
+ extra: currencyMeta.extra
24093
+ });
24094
+ logger_ts_1.loggerService.warn(`Multi-currency does not exist remotely, local status changed from ${currencyMeta.status} to new: ${currencyCode}`);
24095
+ currencyMeta = await xmlMetadataManager.readXml('MultiCurrency', currencyCode);
24096
+ }
24097
+ if (!currencyMeta.content || !isRecord(currencyMeta.content)) {
24098
+ throw new Error(`Invalid multi-currency content: ${currencyCode}`);
24099
+ }
24100
+ if (currencyMeta.status === 'new') {
24101
+ const addPayload = buildAddCurrencyPayload(currencyMeta.content, currencyCode);
24102
+ await requestMultiCurrencyAction('add-currency', addPayload);
24103
+ written += 1;
24104
+ logger_ts_1.loggerService.info(`Multi-currency added: ${currencyCode}`);
24105
+ await xmlMetadataManager.writeXml('MultiCurrency', currencyCode, addPayload, {
24106
+ status: 'unchanged',
24107
+ features: currencyMeta.features,
24108
+ extra: currencyMeta.extra
24109
+ });
24110
+ continue;
24111
+ }
24112
+ if (!remoteItem) {
24113
+ throw new Error(`Remote currency not found after status correction: ${currencyCode}`);
24114
+ }
24115
+ const displayPayload = buildEditCurrencyPayload(currencyMeta.content, remoteItem.content, currencyCode);
24116
+ if (hasDisplayChanged(displayPayload, remoteItem.content)) {
24117
+ await requestMultiCurrencyAction('edit-currency', displayPayload);
24118
+ written += 1;
24119
+ logger_ts_1.loggerService.info(`Multi-currency display updated: ${currencyCode}`);
24120
+ }
24121
+ if (hasExchangeRateChanged(currencyMeta.content, remoteItem.content)) {
24122
+ exchangeRateList.push({
24123
+ currencyCode,
24124
+ exchangeRate: normalize_ts_1.default.normalizeText(currencyMeta.content.exchangeRate)
24125
+ });
24126
+ }
24127
+ await xmlMetadataManager.writeXml('MultiCurrency', currencyCode, {
24128
+ ...remoteItem.content,
24129
+ ...currencyMeta.content,
24130
+ currencyCode
24131
+ }, {
24132
+ status: 'unchanged',
24133
+ features: currencyMeta.features,
24134
+ extra: currencyMeta.extra
24135
+ });
24136
+ }
24137
+ catch (error) {
24138
+ skipped += 1;
24139
+ errorMessages.push(`Multi-currency push failed: ${currencyCode}: ${error}`);
24140
+ }
24141
+ }
24142
+ if (exchangeRateList.length) {
24143
+ await requestMultiCurrencyAction('batch-modify-rate', { exchangeRateList });
24144
+ written += exchangeRateList.length;
24145
+ exchangeRateList.forEach((item) => logger_ts_1.loggerService.info(`Multi-currency rate updated: ${item.currencyCode}`));
24146
+ }
24147
+ }
24148
+ finally {
24149
+ logger_ts_1.loggerService.stopLoading();
24150
+ }
24151
+ if (written > 0) {
24152
+ logger_ts_1.loggerService.startLoading(`multi-currency push post-pull: ${targetCurrencyCodes.length}`);
24153
+ try {
24154
+ const postPullResult = await (0, multi_currency_pull_ts_1.multiCurrencyPullService)(true);
24155
+ errorMessages.push(...postPullResult.errorMessages);
24156
+ }
24157
+ finally {
24158
+ logger_ts_1.loggerService.stopLoading();
24159
+ }
24160
+ }
24161
+ return {
24162
+ objectApiNames: targetCurrencyCodes,
24163
+ found: targetCurrencyCodes.length,
24164
+ written,
24165
+ skipped,
24166
+ errorMessages
24167
+ };
24168
+ };
24169
+ exports.multiCurrencyPushService = multiCurrencyPushService;
24170
+ async function resolveTargetCurrencyCodes(currencyCodes) {
24171
+ const requestedCurrencyCodes = (currencyCodes ?? '')
24172
+ .split(',')
24173
+ .map((item) => normalize_ts_1.default.normalizeString(item))
24174
+ .filter((item) => Boolean(item));
24175
+ if (requestedCurrencyCodes.length) {
24176
+ return [...new Set(requestedCurrencyCodes)];
24177
+ }
24178
+ const index = await xmlMetadataManager.listLocalXmlApiName(undefined, ['MultiCurrency']);
24179
+ return index['']?.MultiCurrency ?? [];
24180
+ }
24181
+ function buildSkippedResult(currencyCodes, errorMessages) {
24182
+ return {
24183
+ objectApiNames: currencyCodes,
24184
+ found: currencyCodes.length,
24185
+ written: 0,
24186
+ skipped: currencyCodes.length,
24187
+ errorMessages
24188
+ };
24189
+ }
24190
+ async function requestMultiCurrencyAction(action, data) {
24191
+ const response = await (0, request_ts_1.requestObjectDevExecute)((0, request_execute_command_paths_ts_1.getShareCliCommandPath)('multiCurrency', action), data);
24192
+ if (response.success !== true || normalize_ts_1.default.normalizeString(normalize_ts_1.default.asString(response.code)) !== 'OK') {
24193
+ throw new Error(normalize_ts_1.default.normalizeText(response.message) || 'Unknown error');
24194
+ }
24195
+ }
24196
+ function buildAddCurrencyPayload(content, currencyCode) {
24197
+ return {
24198
+ currencyCode,
24199
+ currencyLabel: normalize_ts_1.default.normalizeText(content.currencyLabel),
24200
+ exchangeRate: normalize_ts_1.default.normalizeText(content.exchangeRate),
24201
+ currencySymbol: normalize_ts_1.default.normalizeText(content.currencySymbol),
24202
+ currencyUnit: normalize_ts_1.default.normalizeText(content.currencyUnit),
24203
+ currencyPrefix: normalize_ts_1.default.normalizeText(content.currencyPrefix),
24204
+ currencySuffix: normalize_ts_1.default.normalizeText(content.currencySuffix),
24205
+ currencyType: normalize_ts_1.default.normalizeText(content.currencyType) || 'system'
24206
+ };
24207
+ }
24208
+ function buildEditCurrencyPayload(localContent, remoteContent, currencyCode) {
24209
+ return {
24210
+ id: normalize_ts_1.default.normalizeText(remoteContent.id),
24211
+ currencyCode,
24212
+ currencyLabel: normalize_ts_1.default.normalizeText(localContent.currencyLabel),
24213
+ currencySymbol: normalize_ts_1.default.normalizeText(localContent.currencySymbol),
24214
+ currencyUnit: normalize_ts_1.default.normalizeText(localContent.currencyUnit),
24215
+ currencyPrefix: normalize_ts_1.default.normalizeText(localContent.currencyPrefix),
24216
+ currencySuffix: normalize_ts_1.default.normalizeText(localContent.currencySuffix),
24217
+ currencyType: normalize_ts_1.default.normalizeText(localContent.currencyType) || normalize_ts_1.default.normalizeText(remoteContent.currencyType) || 'system'
24218
+ };
24219
+ }
24220
+ function hasDisplayChanged(payload, remoteContent) {
24221
+ return DISPLAY_FIELDS.some((field) => normalize_ts_1.default.normalizeText(payload[field]) !== normalize_ts_1.default.normalizeText(remoteContent[field]));
24222
+ }
24223
+ function hasExchangeRateChanged(localContent, remoteContent) {
24224
+ return normalize_ts_1.default.normalizeText(localContent.exchangeRate) !== normalize_ts_1.default.normalizeText(remoteContent.exchangeRate);
24225
+ }
24226
+
24227
+
24228
+ /***/ },
24229
+
24230
+ /***/ 7793
24231
+ (__unused_webpack_module, exports, __webpack_require__) {
24232
+
24233
+
24234
+ var __importDefault = (this && this.__importDefault) || function (mod) {
24235
+ return (mod && mod.__esModule) ? mod : { "default": mod };
24236
+ };
24237
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
24238
+ exports.multiCurrencyStatusService = multiCurrencyStatusService;
24239
+ const logger_ts_1 = __webpack_require__(8802);
24240
+ const request_execute_command_paths_ts_1 = __webpack_require__(1402);
24241
+ const normalize_ts_1 = __importDefault(__webpack_require__(7495));
24242
+ const request_ts_1 = __webpack_require__(1153);
24243
+ const types_ts_1 = __webpack_require__(9213);
24244
+ async function multiCurrencyStatusService() {
24245
+ const errorMessages = [];
24246
+ logger_ts_1.loggerService.startLoading('Fetching multi-currency status...');
24247
+ try {
24248
+ const response = await (0, request_ts_1.requestObjectDevExecute)((0, request_execute_command_paths_ts_1.getShareCliCommandPath)('multiCurrency', 'status'), {});
24249
+ const result = await (0, request_ts_1.extractObjectDevServiceResult)(response, (serviceResponse) => {
24250
+ const data = (0, types_ts_1.narrowObjectDevResponse)(serviceResponse.data);
24251
+ return (data ?? {});
24252
+ });
24253
+ if (!result.success) {
24254
+ throw new Error(result.errorMessage);
24255
+ }
24256
+ const content = result.data ?? {};
24257
+ const status = typeof content.status === 'number' ? content.status : undefined;
24258
+ const userCurrencyTransformStatus = typeof content.userCurrencyTransformStatus === 'boolean'
24259
+ ? content.userCurrencyTransformStatus
24260
+ : undefined;
24261
+ const isExchangeRateHighPrecision = typeof content.isExchangeRateHighPrecision === 'boolean'
24262
+ ? content.isExchangeRateHighPrecision
24263
+ : undefined;
24264
+ return {
24265
+ enabled: userCurrencyTransformStatus !== false && status !== 0,
24266
+ status,
24267
+ userCurrencyTransformStatus,
24268
+ isExchangeRateHighPrecision,
24269
+ content,
24270
+ errorMessages
24271
+ };
24272
+ }
24273
+ catch (error) {
24274
+ errorMessages.push(`Multi-currency status failed: ${normalize_ts_1.default.normalizeText(error instanceof Error ? error.message : String(error))}`);
24275
+ return {
24276
+ enabled: false,
24277
+ content: {},
24278
+ errorMessages
24279
+ };
24280
+ }
24281
+ finally {
24282
+ logger_ts_1.loggerService.stopLoading();
24283
+ }
24284
+ }
24285
+
24286
+
23349
24287
  /***/ },
23350
24288
 
23351
24289
  /***/ 2226
@@ -27358,6 +28296,90 @@ async function writePwcComponent(context, component) {
27358
28296
  }
27359
28297
 
27360
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
+
27361
28383
  /***/ },
27362
28384
 
27363
28385
  /***/ 3344
@@ -28349,6 +29371,7 @@ exports.workflowDefGetExternalNoticeCommand = workflowDefGetExternalNoticeComman
28349
29371
  exports.workflowDefFindCustomObjsCommand = workflowDefFindCustomObjsCommand;
28350
29372
  exports.workflowDefGetExternalNoticeOuterRolesCommand = workflowDefGetExternalNoticeOuterRolesCommand;
28351
29373
  exports.workflowDefSupportCommand = workflowDefSupportCommand;
29374
+ exports.workflowDefGetLicenseInfoCommand = workflowDefGetLicenseInfoCommand;
28352
29375
  const logger_ts_1 = __webpack_require__(8802);
28353
29376
  const request_execute_command_paths_ts_1 = __webpack_require__(1402);
28354
29377
  const workflow_def_service_ts_1 = __webpack_require__(5616);
@@ -28608,6 +29631,20 @@ async function workflowDefSupportCommand(_context, options) {
28608
29631
  throw error;
28609
29632
  }
28610
29633
  }
29634
+ async function workflowDefGetLicenseInfoCommand(_context, options) {
29635
+ void _context;
29636
+ const data = buildOptionsData(options, {});
29637
+ logger_ts_1.loggerService.startLoading('Executing workflowDef get-license-info');
29638
+ try {
29639
+ const response = await (0, workflow_def_service_ts_1.executeWorkflowDefShareCli)((0, request_execute_command_paths_ts_1.getShareCliCommandPath)('workflowDef', 'getLicenseInfo'), data);
29640
+ logger_ts_1.loggerService.stopLoading();
29641
+ logger_ts_1.loggerService.printJson(response);
29642
+ }
29643
+ catch (error) {
29644
+ logger_ts_1.loggerService.stopLoading();
29645
+ throw error;
29646
+ }
29647
+ }
28611
29648
 
28612
29649
 
28613
29650
  /***/ },
@@ -45513,7 +46550,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"application/1d-interleaved-parityfec
45513
46550
  /***/ 8330
45514
46551
  (module) {
45515
46552
 
45516
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@share-crm/sharedev-cli","version":"0.0.4-rc.23","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"}');
45517
46554
 
45518
46555
  /***/ }
45519
46556
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@share-crm/sharedev-cli",
3
- "version": "0.0.4-rc.23",
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",