@lovrabet/lovrabet-cli 2.1.16 → 2.1.18-beta.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.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schedule/index.js +1 -0
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x59e7a0,_0x218ea5){const _0x1ceb61=a38_0x32c7,_0x491091=_0x59e7a0();while(!![]){try{const _0x2ab95b=parseInt(_0x1ceb61(0xa8))/0x1+parseInt(_0x1ceb61(0xb4))/0x2*(-parseInt(_0x1ceb61(0xc1))/0x3)+parseInt(_0x1ceb61(0xcd))/0x4*(parseInt(_0x1ceb61(0xc4))/0x5)+-parseInt(_0x1ceb61(0x88))/0x6*(parseInt(_0x1ceb61(0x82))/0x7)+-parseInt(_0x1ceb61(0x9f))/0x8*(-parseInt(_0x1ceb61(0xca))/0x9)+parseInt(_0x1ceb61(0xaa))/0xa+-parseInt(_0x1ceb61(0x8f))/0xb;if(_0x2ab95b===_0x218ea5)break;else _0x491091['push'](_0x491091['shift']());}catch(_0x13e998){_0x491091['push'](_0x491091['shift']());}}}(a38_0x3122,0xc3ede));import{compileServiceTreeCommand,matchServiceTreeCommand}from'@lovrabet/cli-framework';function a38_0x32c7(_0x2509fb,_0x289cbe){_0x2509fb=_0x2509fb-0x7f;const _0x3122c2=a38_0x3122();let _0x32c7e8=_0x3122c2[_0x2509fb];return _0x32c7e8;}import{getLoginUserInfo,listDatasets}from'../../core/api-client.js';import{executeData,executeSdkBff,executeSdkSql}from'../../core/sdk-client.js';import{CliErrors}from'../../errors.js';import{listLocalServices,listLocalServiceTrees}from'../../commands/service/registry.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export function resolveDynamicServiceCommand(_0x50a869,_0x294006){const _0x1cf3a0=a38_0x32c7,_0x1fd568=listLocalServiceTrees();let _0x37dd51;for(const _0x40d42d of _0x1fd568){const _0x2ce205=matchServiceTreeCommand(_0x40d42d,_0x50a869);if(!_0x2ce205)continue;(!_0x37dd51||_0x2ce205[_0x1cf3a0(0x84)][_0x1cf3a0(0xa9)][_0x1cf3a0(0xbd)]>_0x37dd51[_0x1cf3a0(0x84)][_0x1cf3a0(0xa9)][_0x1cf3a0(0xbd)])&&(_0x37dd51={'tree':_0x40d42d,'command':_0x2ce205['command'],'remainingArgs':_0x2ce205['remainingArgs']});}if(!_0x37dd51)return undefined;const _0x47e43f={..._0x294006};return applyAppBinding(_0x37dd51[_0x1cf3a0(0xb3)],_0x37dd51[_0x1cf3a0(0x84)],_0x47e43f),{'definition':buildDynamicCommandDefinition(_0x37dd51[_0x1cf3a0(0xb3)],_0x37dd51[_0x1cf3a0(0x84)]),'args':_0x37dd51[_0x1cf3a0(0x98)],'flags':_0x47e43f,'tree':_0x37dd51[_0x1cf3a0(0xb3)],'command':_0x37dd51[_0x1cf3a0(0x84)]};}export function generateDynamicServiceHelp(_0x1c67e7){const _0x261c98=a38_0x32c7,_0x1ef41d=listLocalServiceTrees()[_0x261c98(0xdf)](_0x6e291=>_0x6e291[_0x261c98(0x9d)][_0x261c98(0xd0)]===_0x1c67e7);if(!_0x1ef41d)return undefined;const _0x440e5f=[CLI_BIN_NAME+'\x20'+_0x1c67e7+'\x20<command>\x20[flags]','',_0x1ef41d[_0x261c98(0x9d)][_0x261c98(0xd9)]||_0x1c67e7,_0x1ef41d[_0x261c98(0x9d)][_0x261c98(0xb0)]?'\x20\x20'+_0x1ef41d[_0x261c98(0x9d)][_0x261c98(0xb0)]:'','',_0x261c98(0x90),..._0x1ef41d[_0x261c98(0x9e)][_0x261c98(0x89)](_0x4d04a3=>{const _0x3e659a=_0x261c98,_0x5b7c88=_0x4d04a3['fullPath'][_0x3e659a(0xbc)](0x1)['join']('\x20'),_0x5303df=_0x4d04a3[_0x3e659a(0x8d)]==='read'?'':'\x20['+_0x4d04a3[_0x3e659a(0x8d)]+']';return'\x20\x20'+_0x5b7c88['padEnd'](0x18)+'\x20'+(_0x4d04a3[_0x3e659a(0xb0)]||'')+_0x5303df;}),'',_0x261c98(0xb6)+CLI_BIN_NAME+_0x261c98(0xa6)+_0x1c67e7+'`\x20to\x20inspect\x20the\x20manifest.'][_0x261c98(0xc3)](Boolean);return _0x440e5f[_0x261c98(0xa5)]('\x0a');}export function listDynamicServiceEntries(){const _0x51af19=a38_0x32c7;return listLocalServices()[_0x51af19(0x89)](_0x1631c6=>{const _0xd4f1b9=_0x51af19,_0x5e67ba=_0x1631c6['normalizedManifest'];return{'service':_0x5e67ba[_0xd4f1b9(0x9d)]['code'],'label':_0x5e67ba[_0xd4f1b9(0x9d)][_0xd4f1b9(0xd9)]||_0x5e67ba[_0xd4f1b9(0x9d)][_0xd4f1b9(0xd0)],'commands':_0x5e67ba[_0xd4f1b9(0x9e)][_0xd4f1b9(0x89)](_0x5b2e38=>({'command':dynamicCommandName(_0x5b2e38),'description':_0x5b2e38[_0xd4f1b9(0xb0)]||_0xd4f1b9(0xd6)+_0x5b2e38['cliPath'],'tag':riskTag(_0x5b2e38[_0xd4f1b9(0x8d)])}))};});}export function getDynamicServiceEntry(_0x7310e5){const _0x12526a=a38_0x32c7;return listDynamicServiceEntries()[_0x12526a(0xdf)](_0x570024=>_0x570024['service']===_0x7310e5);}export function listDynamicServiceDefinitions(_0x1cd915){const _0x34ecfc=a38_0x32c7;return listLocalServiceTrees()[_0x34ecfc(0xc3)](_0x3761a8=>!_0x1cd915||_0x3761a8[_0x34ecfc(0x9d)][_0x34ecfc(0xd0)]===_0x1cd915)['flatMap'](_0xde1ac3=>_0xde1ac3[_0x34ecfc(0x9e)]['map'](_0xdfe751=>buildDynamicCommandDefinition(_0xde1ac3,_0xdfe751)));}export function getDynamicServiceDefinitions(_0x26d9f1){const _0x3ae699=a38_0x32c7,_0x191571=listDynamicServiceDefinitions(_0x26d9f1);return _0x191571[_0x3ae699(0xbd)]>0x0?_0x191571:undefined;}export function findDynamicServiceDefinition(_0x23011d,_0x7ad6f1){const _0x35d073=a38_0x32c7;return listDynamicServiceDefinitions(_0x23011d)[_0x35d073(0xdf)](_0x3d1b07=>_0x3d1b07[_0x35d073(0x84)]===_0x7ad6f1);}function a38_0x3122(){const _0x2a4960=['\x20service\x20detail\x20--service\x20','trim','1367337OiwLoH','fullPath','12436560VpDTSk','\x20\x20\x20\x20','datatable','target','datasetCode','nickname','description','SERVICE_TREE','username','tree','223490MjLYYf','app','Use\x20`','bffId','Unknown\x20appRef\x20\x22','env','appRef','employeeId','slice','length','args','userId','Preview\x20dynamic\x20service\x20command:\x20','21BfbVXl','cliPath','filter','139770lwVKbs','params','rawFlags','sqlCode','envName','context.','2661237QXbrgc','push','Cannot\x20resolve\x20datatable\x20\x22','36vMiaWo','number','source','code','tableName','tenantCode','\x20\x20SERVICE\x20TREE\x20TARGET','userName','default','Run\x20service\x20command\x20','\x20->\x20','entries','name','\x20\x20\x20\x20datasetCode:\x20','\x20\x20\x20\x20functionName:\x20','startsWith','operator','flags','find','appCode','\x20\x20\x20\x20datatable:\x20','required','loginName','some','891485LPXcRT','appcode','command','\x20requires\x20target.sqlCode.','bffCode','json','12MUvnWi','map','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','scriptName','dbtableConfig','risk','sql','14507031STywiR','Commands:','fromEntries','Service\x20command\x20','bff','\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20','mapTo','ctx.','enum','remainingArgs','read','string','type','kind','service','commands','8zmzSIt','validation','\x20\x20MAP\x20TO','cliName','nickName','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','join'];a38_0x3122=function(){return _0x2a4960;};return a38_0x3122();}export function buildDynamicCommandDefinition(_0x141e41,_0x397d51){const _0x1cbb86=a38_0x32c7;return{'service':_0x141e41[_0x1cbb86(0x9d)]['code'],'command':dynamicCommandName(_0x397d51),'description':_0x397d51[_0x1cbb86(0xb0)]||_0x1cbb86(0xd6)+_0x397d51[_0x1cbb86(0xc2)],'risk':_0x397d51[_0x1cbb86(0x8d)],'requiresAuth':!![],'requiresAppCode':!![],'args':_0x397d51[_0x1cbb86(0xbe)][_0x1cbb86(0x89)](_0x586caf=>({'name':_0x586caf[_0x1cbb86(0xd9)],'description':_0x586caf[_0x1cbb86(0xb0)]||_0x586caf[_0x1cbb86(0xd9)],'required':_0x586caf[_0x1cbb86(0x7f)]})),'flags':_0x397d51[_0x1cbb86(0xde)][_0x1cbb86(0x89)](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x397d51),async 'dryRun'(_0x1e12bb){const _0x3d77bb=_0x1cbb86,_0x2dffa7=await compilePlan(_0x397d51,_0x1e12bb);return{'method':_0x3d77bb(0xb1),'url':_0x397d51[_0x3d77bb(0xc2)],'body':{'target':targetPreview(_0x2dffa7),'params':_0x2dffa7[_0x3d77bb(0xc5)]},'description':_0x3d77bb(0xc0)+_0x397d51['cliPath']};},async 'execute'(_0x54c8fb){const _0x5539e3=_0x1cbb86,_0x44da88=await compilePlan(_0x397d51,_0x54c8fb),_0x416f47=Date['now'](),_0x128cd4=await executePlan(_0x44da88,_0x397d51,_0x54c8fb),_0x1baa2b=Date['now']()-_0x416f47;return{'ok':!![],'data':{'service':_0x141e41[_0x5539e3(0x9d)],'command':_0x397d51[_0x5539e3(0xc2)],'target':targetPreview(_0x44da88),'result':_0x128cd4,'elapsed':_0x1baa2b},'message':_0x5539e3(0x92)+_0x397d51[_0x5539e3(0xc2)]+'\x20completed\x20in\x20'+_0x1baa2b+'ms'};}};}function dynamicCommandName(_0x4987d1){const _0x47f862=a38_0x32c7;return _0x4987d1['fullPath'][_0x47f862(0xbc)](0x1)[_0x47f862(0xa5)]('\x20');}function riskTag(_0x529e51){const _0x1f3563=a38_0x32c7;return _0x529e51===_0x1f3563(0x99)?'':'\x20\x20['+_0x529e51+']';}function flagToCommandFlag(_0x5f2ea7){const _0x8b582d=a38_0x32c7;return{'name':_0x5f2ea7[_0x8b582d(0xa2)],'type':_0x5f2ea7[_0x8b582d(0x9b)]===_0x8b582d(0x87)?_0x8b582d(0x9a):_0x5f2ea7['type'],'description':_0x5f2ea7[_0x8b582d(0xb0)]||_0x5f2ea7[_0x8b582d(0xd9)],'required':_0x5f2ea7[_0x8b582d(0x7f)],'default':isPrimitiveFlagDefault(_0x5f2ea7['default'])?_0x5f2ea7[_0x8b582d(0xd5)]:undefined,'enum':_0x5f2ea7[_0x8b582d(0x97)]};}async function compilePlan(_0xcad908,_0x594c5b){const _0x1072d3=a38_0x32c7;return compileServiceTreeCommand(_0xcad908,{'flags':_0x594c5b[_0x1072d3(0xc6)],'args':_0x594c5b[_0x1072d3(0xbe)],'context':await buildServiceContext(_0xcad908,_0x594c5b)});}async function buildServiceContext(_0x3ad203,_0x1bcf28){const _0x4524ea=a38_0x32c7,_0x432489={'appCode':_0x1bcf28['appCode'],'env':_0x1bcf28[_0x4524ea(0xc8)],'envName':_0x1bcf28['envName']};if(!usesRuntimeContext(_0x3ad203))return _0x432489;const _0xb3cbc3=await getLoginUserInfo(),_0x12b3e7=pickFirst(_0xb3cbc3[_0x4524ea(0xbf)],_0xb3cbc3['id']);return{..._0x432489,'user':_0xb3cbc3,'userId':_0x12b3e7,'id':_0xb3cbc3['id'],'username':pickFirst(_0xb3cbc3[_0x4524ea(0xb2)],_0xb3cbc3['userName'],_0xb3cbc3[_0x4524ea(0x80)]),'userName':_0xb3cbc3[_0x4524ea(0xd4)],'nickname':pickFirst(_0xb3cbc3[_0x4524ea(0xaf)],_0xb3cbc3[_0x4524ea(0xa3)]),'nickName':_0xb3cbc3['nickName'],'tenantCode':_0xb3cbc3[_0x4524ea(0xd2)],'employeeId':_0xb3cbc3[_0x4524ea(0xbb)]};}function usesRuntimeContext(_0x5d2379){const _0x4e0e1b=a38_0x32c7;return _0x5d2379[_0x4e0e1b(0x95)][_0x4e0e1b(0x81)](_0x1b4065=>typeof _0x1b4065[_0x4e0e1b(0xcf)]===_0x4e0e1b(0x9a)&&(_0x1b4065[_0x4e0e1b(0xcf)]['startsWith'](_0x4e0e1b(0xc9))||_0x1b4065[_0x4e0e1b(0xcf)][_0x4e0e1b(0xdc)](_0x4e0e1b(0x96))));}function pickFirst(..._0x344008){const _0x4af181=a38_0x32c7;return _0x344008[_0x4af181(0xdf)](_0x53fa89=>_0x53fa89!==undefined&&_0x53fa89!==null);}async function executePlan(_0x140476,_0xc21274,_0x17cde5){const _0x14608a=a38_0x32c7;if(_0x140476[_0x14608a(0x9c)]==='data'){const _0x3db6fb=await resolveDatasetCode(_0x140476,_0xc21274,_0x17cde5);return executeData(_0x3db6fb,_0x140476[_0x14608a(0x84)],_0x140476[_0x14608a(0xc5)]);}if(_0x140476[_0x14608a(0x9c)]===_0x14608a(0x8e)){if(!_0x140476[_0x14608a(0xc7)])throw CliErrors[_0x14608a(0xa0)]('Service\x20command\x20'+_0xc21274[_0x14608a(0xc2)]+_0x14608a(0x85));return executeSdkSql(_0x140476['sqlCode'],normalizeScalarParams(_0x140476[_0x14608a(0xc5)]));}if(_0x140476[_0x14608a(0x9c)]===_0x14608a(0x93)){const _0x1d3e9f=_0x140476[_0x14608a(0x8b)]||_0x140476[_0x14608a(0x86)]||(_0x140476[_0x14608a(0xb7)]==null?'':String(_0x140476[_0x14608a(0xb7)]));if(!_0x1d3e9f)throw CliErrors['validation'](_0x14608a(0x92)+_0xc21274['cliPath']+'\x20requires\x20target.functionName.');return executeSdkBff(_0x1d3e9f,_0x140476[_0x14608a(0xc5)]);}throw CliErrors[_0x14608a(0xa0)]('Unsupported\x20service\x20target\x20kind:\x20'+_0x140476[_0x14608a(0x9c)]);}async function resolveDatasetCode(_0x14e144,_0x5b6024,_0x4c9fbf){const _0x2e87ef=a38_0x32c7;if(_0x14e144[_0x2e87ef(0xae)])return _0x14e144[_0x2e87ef(0xae)];if(!_0x14e144[_0x2e87ef(0xac)])throw CliErrors[_0x2e87ef(0xa0)]('Service\x20command\x20'+_0x5b6024['cliPath']+'\x20requires\x20target.datasetCode\x20or\x20target.datatable.');const _0x3ed981=await listDatasets(_0x4c9fbf['appCode']),_0x350f42=_0x3ed981[_0x2e87ef(0xdf)](_0x531b87=>_0x531b87[_0x2e87ef(0x8c)]?.[_0x2e87ef(0xd1)]===_0x14e144[_0x2e87ef(0xac)]);if(!_0x350f42?.[_0x2e87ef(0xd0)])throw CliErrors[_0x2e87ef(0xa0)](_0x2e87ef(0xcc)+_0x14e144[_0x2e87ef(0xac)]+_0x2e87ef(0x94)+_0x4c9fbf[_0x2e87ef(0xe0)]+'.',_0x2e87ef(0xa4));return _0x350f42[_0x2e87ef(0xd0)];}function applyAppBinding(_0x581160,_0x3f6d90,_0x4d1245){const _0x18e6c4=a38_0x32c7,_0x1f13d7=_0x3f6d90[_0x18e6c4(0xad)][_0x18e6c4(0xba)];if(!_0x1f13d7)return;const _0x4d7720=_0x581160['appBindings'][_0x1f13d7];if(!_0x4d7720)throw CliErrors['validation'](_0x18e6c4(0xb8)+_0x1f13d7+'\x22\x20in\x20service\x20command\x20'+_0x3f6d90['cliPath']+'.',_0x18e6c4(0x8a));const _0x38125c=_0x4d7720[_0x18e6c4(0x83)]||_0x4d7720[_0x18e6c4(0xe0)];_0x38125c&&!hasText(_0x4d1245['appcode'])&&(_0x4d1245[_0x18e6c4(0x83)]=_0x38125c),_0x4d7720[_0x18e6c4(0xb5)]&&!hasText(_0x4d1245[_0x18e6c4(0xb5)])&&!hasText(_0x4d1245[_0x18e6c4(0x83)])&&(_0x4d1245['app']=_0x4d7720[_0x18e6c4(0xb5)]),_0x4d7720['env']&&!hasText(_0x4d1245[_0x18e6c4(0xb9)])&&(_0x4d1245[_0x18e6c4(0xb9)]=_0x4d7720[_0x18e6c4(0xb9)]);}function renderDynamicCommandHelp(_0x166c8d){const _0x577233=a38_0x32c7,_0x7813d0=[_0x577233(0xd3),'\x20\x20\x20\x20kind:\x20\x20\x20\x20'+_0x166c8d['target']['kind'],'\x20\x20\x20\x20command:\x20'+_0x166c8d['target'][_0x577233(0x84)]];if(_0x166c8d[_0x577233(0xad)][_0x577233(0xae)])_0x7813d0['push'](_0x577233(0xda)+_0x166c8d['target']['datasetCode']);if(_0x166c8d[_0x577233(0xad)][_0x577233(0xac)])_0x7813d0[_0x577233(0xcb)](_0x577233(0xe1)+_0x166c8d[_0x577233(0xad)][_0x577233(0xac)]);if(_0x166c8d[_0x577233(0xad)][_0x577233(0xc7)])_0x7813d0[_0x577233(0xcb)]('\x20\x20\x20\x20sqlCode:\x20'+_0x166c8d['target']['sqlCode']);if(_0x166c8d[_0x577233(0xad)][_0x577233(0x8b)])_0x7813d0[_0x577233(0xcb)](_0x577233(0xdb)+_0x166c8d['target'][_0x577233(0x8b)]);if(_0x166c8d[_0x577233(0x95)][_0x577233(0xbd)]>0x0){_0x7813d0[_0x577233(0xcb)]('',_0x577233(0xa1));for(const _0x957c77 of _0x166c8d[_0x577233(0x95)]){_0x7813d0['push'](_0x577233(0xab)+(_0x957c77[_0x577233(0xcf)]||'const')+_0x577233(0xd7)+_0x957c77[_0x577233(0xad)]+(_0x957c77[_0x577233(0xdd)]?'.'+_0x957c77[_0x577233(0xdd)]:''));}}return _0x7813d0[_0x577233(0xa5)]('\x0a');}function targetPreview(_0x5d7a44){const _0xa8843e=a38_0x32c7;return{'kind':_0x5d7a44['kind'],'command':_0x5d7a44[_0xa8843e(0x84)],'appRef':_0x5d7a44[_0xa8843e(0xba)],'datasetCode':_0x5d7a44[_0xa8843e(0xae)],'datatable':_0x5d7a44[_0xa8843e(0xac)],'sqlCode':_0x5d7a44[_0xa8843e(0xc7)],'bffCode':_0x5d7a44[_0xa8843e(0x86)],'bffId':_0x5d7a44[_0xa8843e(0xb7)],'functionName':_0x5d7a44[_0xa8843e(0x8b)]};}function normalizeScalarParams(_0xd53ba5){const _0x5010c5=a38_0x32c7;return Object[_0x5010c5(0x91)](Object[_0x5010c5(0xd8)](_0xd53ba5)[_0x5010c5(0xc3)](([,_0x10ae69])=>typeof _0x10ae69===_0x5010c5(0x9a)||typeof _0x10ae69==='number'));}function hasText(_0x4cdd0b){const _0x7f902c=a38_0x32c7;return typeof _0x4cdd0b==='string'&&_0x4cdd0b[_0x7f902c(0xa7)]()['length']>0x0;}function isPrimitiveFlagDefault(_0x109fa9){const _0x1bfe51=a38_0x32c7;return _0x109fa9===undefined||typeof _0x109fa9===_0x1bfe51(0x9a)||typeof _0x109fa9===_0x1bfe51(0xce)||typeof _0x109fa9==='boolean';}
|
|
1
|
+
(function(_0x323837,_0x21f907){const _0x42c214=a39_0x4d8f,_0x1b0e28=_0x323837();while(!![]){try{const _0x3f075f=parseInt(_0x42c214(0x12f))/0x1*(parseInt(_0x42c214(0x124))/0x2)+parseInt(_0x42c214(0x13f))/0x3*(-parseInt(_0x42c214(0x13e))/0x4)+parseInt(_0x42c214(0x139))/0x5+parseInt(_0x42c214(0x129))/0x6+parseInt(_0x42c214(0x138))/0x7+parseInt(_0x42c214(0x164))/0x8+-parseInt(_0x42c214(0x136))/0x9*(parseInt(_0x42c214(0x162))/0xa);if(_0x3f075f===_0x21f907)break;else _0x1b0e28['push'](_0x1b0e28['shift']());}catch(_0x1e619c){_0x1b0e28['push'](_0x1b0e28['shift']());}}}(a39_0xa846,0xd12f0));import{compileServiceTreeCommand,matchServiceTreeCommand}from'@lovrabet/cli-framework';import{getLoginUserInfo,listDatasets}from'../../core/api-client.js';import{executeData,executeSdkBff,executeSdkSql}from'../../core/sdk-client.js';import{CliErrors}from'../../errors.js';import{listLocalServices,listLocalServiceTrees}from'../../commands/service/registry.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export function resolveDynamicServiceCommand(_0x4706e7,_0x367f5b){const _0x141ecb=a39_0x4d8f,_0x30daf0=listLocalServiceTrees();let _0x54b4c0;for(const _0x57c904 of _0x30daf0){const _0x580012=matchServiceTreeCommand(_0x57c904,_0x4706e7);if(!_0x580012)continue;(!_0x54b4c0||_0x580012[_0x141ecb(0x15c)][_0x141ecb(0x14b)]['length']>_0x54b4c0[_0x141ecb(0x15c)][_0x141ecb(0x14b)][_0x141ecb(0x125)])&&(_0x54b4c0={'tree':_0x57c904,'command':_0x580012['command'],'remainingArgs':_0x580012['remainingArgs']});}if(!_0x54b4c0)return undefined;const _0x4b0156={..._0x367f5b};return applyAppBinding(_0x54b4c0[_0x141ecb(0x130)],_0x54b4c0[_0x141ecb(0x15c)],_0x4b0156),{'definition':buildDynamicCommandDefinition(_0x54b4c0[_0x141ecb(0x130)],_0x54b4c0[_0x141ecb(0x15c)]),'args':_0x54b4c0[_0x141ecb(0x13a)],'flags':_0x4b0156,'tree':_0x54b4c0[_0x141ecb(0x130)],'command':_0x54b4c0['command']};}export function generateDynamicServiceHelp(_0x496f44){const _0x1481dd=a39_0x4d8f,_0x3e7892=listLocalServiceTrees()[_0x1481dd(0x13d)](_0x3a5411=>_0x3a5411[_0x1481dd(0x173)][_0x1481dd(0x168)]===_0x496f44);if(!_0x3e7892)return undefined;const _0x30050c=[CLI_BIN_NAME+'\x20'+_0x496f44+_0x1481dd(0x17c),'',_0x3e7892[_0x1481dd(0x173)][_0x1481dd(0x16b)]||_0x496f44,_0x3e7892[_0x1481dd(0x173)]['description']?'\x20\x20'+_0x3e7892[_0x1481dd(0x173)][_0x1481dd(0x144)]:'','',_0x1481dd(0x11f),..._0x3e7892[_0x1481dd(0x14a)]['map'](_0x3f7f2c=>{const _0x57b846=_0x1481dd,_0x411ec5=_0x3f7f2c[_0x57b846(0x14b)]['slice'](0x1)[_0x57b846(0x16c)]('\x20'),_0x58acb5=_0x3f7f2c[_0x57b846(0x14f)]===_0x57b846(0x172)?'':'\x20['+_0x3f7f2c[_0x57b846(0x14f)]+']';return'\x20\x20'+_0x411ec5['padEnd'](0x18)+'\x20'+(_0x3f7f2c[_0x57b846(0x144)]||'')+_0x58acb5;}),'',_0x1481dd(0x12e)+CLI_BIN_NAME+_0x1481dd(0x12c)+_0x496f44+'`\x20to\x20inspect\x20the\x20manifest.']['filter'](Boolean);return _0x30050c[_0x1481dd(0x16c)]('\x0a');}export function listDynamicServiceEntries(){const _0x522d42=a39_0x4d8f;return listLocalServices()[_0x522d42(0x165)](_0x4af322=>{const _0x29dd20=_0x522d42,_0x266f80=_0x4af322[_0x29dd20(0x15f)];return{'service':_0x266f80[_0x29dd20(0x173)][_0x29dd20(0x168)],'label':_0x266f80[_0x29dd20(0x173)][_0x29dd20(0x16b)]||_0x266f80[_0x29dd20(0x173)][_0x29dd20(0x168)],'commands':_0x266f80['commands'][_0x29dd20(0x165)](_0x2e4b2a=>({'command':dynamicCommandName(_0x2e4b2a),'description':_0x2e4b2a[_0x29dd20(0x144)]||'Run\x20service\x20command\x20'+_0x2e4b2a[_0x29dd20(0x175)],'tag':riskTag(_0x2e4b2a['risk'])}))};});}export function getDynamicServiceEntry(_0x5be0f6){const _0x2ff9ee=a39_0x4d8f;return listDynamicServiceEntries()[_0x2ff9ee(0x13d)](_0x4cd02b=>_0x4cd02b[_0x2ff9ee(0x173)]===_0x5be0f6);}function a39_0xa846(){const _0x5371bf=['Use\x20`','1612747VLnJQu','tree','Cannot\x20resolve\x20datatable\x20\x22','kind','\x20\x20\x20\x20command:\x20','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','\x20\x20SERVICE\x20TREE\x20TARGET','6293844GEaakE','loginName','7210028JAHBdi','265985KPmQcS','remainingArgs','startsWith','cliName','find','4WiKjEv','4421619RuozPC','username','target','dbtableConfig','nickname','description','appCode','employeeId','operator','userId','mapTo','commands','fullPath','params','data','string','risk','now','source','validation','\x20requires\x20target.sqlCode.','sql','bffCode','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','app','Unsupported\x20service\x20target\x20kind:\x20','filter','fromEntries','args','command','bff','userName','normalizedManifest','Service\x20command\x20','datatable','50ecItxC','\x20completed\x20in\x20','13243528JxkOmE','map','\x20\x20\x20\x20datatable:\x20','entries','code','envName','appRef','name','join','bffId','rawFlags','\x20\x20\x20\x20kind:\x20\x20\x20\x20','\x20\x20\x20\x20datasetCode:\x20','SERVICE_TREE','read','service','flags','cliPath','appBindings','datasetCode','\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20','required','trim','tableName','\x20<command>\x20[flags]','\x20\x20\x20\x20','boolean','Commands:','sqlCode','push','\x20\x20\x20\x20sqlCode:\x20','env','2dpNgvD','length','default','appcode','scriptName','8855280SLyNfc','const','Preview\x20dynamic\x20service\x20command:\x20','\x20service\x20detail\x20--service\x20','\x20\x20MAP\x20TO'];a39_0xa846=function(){return _0x5371bf;};return a39_0xa846();}export function listDynamicServiceDefinitions(_0x10a683){const _0x2f6e75=a39_0x4d8f;return listLocalServiceTrees()[_0x2f6e75(0x159)](_0x1b2860=>!_0x10a683||_0x1b2860[_0x2f6e75(0x173)][_0x2f6e75(0x168)]===_0x10a683)['flatMap'](_0x37af9f=>_0x37af9f['commands'][_0x2f6e75(0x165)](_0x52ee11=>buildDynamicCommandDefinition(_0x37af9f,_0x52ee11)));}export function getDynamicServiceDefinitions(_0x2bb128){const _0x2d7109=a39_0x4d8f,_0x49ad5e=listDynamicServiceDefinitions(_0x2bb128);return _0x49ad5e[_0x2d7109(0x125)]>0x0?_0x49ad5e:undefined;}export function findDynamicServiceDefinition(_0x440b3c,_0x5a321c){const _0x29c458=a39_0x4d8f;return listDynamicServiceDefinitions(_0x440b3c)[_0x29c458(0x13d)](_0x408980=>_0x408980[_0x29c458(0x15c)]===_0x5a321c);}export function buildDynamicCommandDefinition(_0x315c1f,_0x42df59){const _0x2c4535=a39_0x4d8f;return{'service':_0x315c1f[_0x2c4535(0x173)]['code'],'command':dynamicCommandName(_0x42df59),'description':_0x42df59[_0x2c4535(0x144)]||'Run\x20service\x20command\x20'+_0x42df59[_0x2c4535(0x175)],'risk':_0x42df59[_0x2c4535(0x14f)],'requiresAuth':!![],'requiresAppCode':!![],'args':_0x42df59[_0x2c4535(0x15b)]['map'](_0xd552c5=>({'name':_0xd552c5['name'],'description':_0xd552c5['description']||_0xd552c5['name'],'required':_0xd552c5['required']})),'flags':_0x42df59[_0x2c4535(0x174)][_0x2c4535(0x165)](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x42df59),async 'dryRun'(_0x1c1d6a){const _0x42936b=_0x2c4535,_0x324ed7=await compilePlan(_0x42df59,_0x1c1d6a);return{'method':_0x42936b(0x171),'url':_0x42df59[_0x42936b(0x175)],'body':{'target':targetPreview(_0x324ed7),'params':_0x324ed7['params']},'description':_0x42936b(0x12b)+_0x42df59[_0x42936b(0x175)]};},async 'execute'(_0x57f490){const _0x5b0731=_0x2c4535,_0xf7fe46=await compilePlan(_0x42df59,_0x57f490),_0x30d17f=Date[_0x5b0731(0x150)](),_0x3d5731=await executePlan(_0xf7fe46,_0x42df59,_0x57f490),_0x378ea7=Date[_0x5b0731(0x150)]()-_0x30d17f;return{'ok':!![],'data':{'service':_0x315c1f['service'],'command':_0x42df59[_0x5b0731(0x175)],'target':targetPreview(_0xf7fe46),'result':_0x3d5731,'elapsed':_0x378ea7},'message':'Service\x20command\x20'+_0x42df59[_0x5b0731(0x175)]+_0x5b0731(0x163)+_0x378ea7+'ms'};}};}function dynamicCommandName(_0x1d433f){const _0x36e1c6=a39_0x4d8f;return _0x1d433f[_0x36e1c6(0x14b)]['slice'](0x1)[_0x36e1c6(0x16c)]('\x20');}function riskTag(_0x21e8fa){const _0x5cb7a6=a39_0x4d8f;return _0x21e8fa===_0x5cb7a6(0x172)?'':'\x20\x20['+_0x21e8fa+']';}function flagToCommandFlag(_0x359559){const _0x372500=a39_0x4d8f;return{'name':_0x359559[_0x372500(0x13c)],'type':_0x359559['type']==='json'?_0x372500(0x14e):_0x359559['type'],'description':_0x359559['description']||_0x359559[_0x372500(0x16b)],'required':_0x359559[_0x372500(0x179)],'default':isPrimitiveFlagDefault(_0x359559[_0x372500(0x126)])?_0x359559['default']:undefined,'enum':_0x359559['enum']};}async function compilePlan(_0x9f1a2,_0xed7593){const _0x30796e=a39_0x4d8f;return compileServiceTreeCommand(_0x9f1a2,{'flags':_0xed7593[_0x30796e(0x16e)],'args':_0xed7593['args'],'context':await buildServiceContext(_0x9f1a2,_0xed7593)});}function a39_0x4d8f(_0x122330,_0x208119){_0x122330=_0x122330-0x11f;const _0xa84632=a39_0xa846();let _0x4d8fbc=_0xa84632[_0x122330];return _0x4d8fbc;}async function buildServiceContext(_0xc8b9e4,_0x5d1f37){const _0x66f008=a39_0x4d8f,_0x49e285={'appCode':_0x5d1f37['appCode'],'env':_0x5d1f37[_0x66f008(0x169)],'envName':_0x5d1f37[_0x66f008(0x169)]};if(!usesRuntimeContext(_0xc8b9e4))return _0x49e285;const _0x159204=await getLoginUserInfo(),_0x27715d=pickFirst(_0x159204[_0x66f008(0x148)],_0x159204['id']);return{..._0x49e285,'user':_0x159204,'userId':_0x27715d,'id':_0x159204['id'],'username':pickFirst(_0x159204[_0x66f008(0x140)],_0x159204['userName'],_0x159204[_0x66f008(0x137)]),'userName':_0x159204[_0x66f008(0x15e)],'nickname':pickFirst(_0x159204[_0x66f008(0x143)],_0x159204['nickName']),'nickName':_0x159204['nickName'],'tenantCode':_0x159204['tenantCode'],'employeeId':_0x159204[_0x66f008(0x146)]};}function usesRuntimeContext(_0x44093d){const _0x39c5a7=a39_0x4d8f;return _0x44093d['mapTo']['some'](_0x3a2b35=>typeof _0x3a2b35[_0x39c5a7(0x151)]===_0x39c5a7(0x14e)&&(_0x3a2b35[_0x39c5a7(0x151)][_0x39c5a7(0x13b)]('context.')||_0x3a2b35[_0x39c5a7(0x151)][_0x39c5a7(0x13b)]('ctx.')));}function pickFirst(..._0x51112e){return _0x51112e['find'](_0x42f333=>_0x42f333!==undefined&&_0x42f333!==null);}async function executePlan(_0x5ad29c,_0x3e121c,_0x235b2b){const _0x1df099=a39_0x4d8f;if(_0x5ad29c['kind']===_0x1df099(0x14d)){const _0x50908b=await resolveDatasetCode(_0x5ad29c,_0x3e121c,_0x235b2b);return executeData(_0x50908b,_0x5ad29c[_0x1df099(0x15c)],_0x5ad29c[_0x1df099(0x14c)]);}if(_0x5ad29c[_0x1df099(0x132)]===_0x1df099(0x154)){if(!_0x5ad29c['sqlCode'])throw CliErrors['validation'](_0x1df099(0x160)+_0x3e121c[_0x1df099(0x175)]+_0x1df099(0x153));return executeSdkSql(_0x5ad29c['sqlCode'],normalizeScalarParams(_0x5ad29c[_0x1df099(0x14c)]));}if(_0x5ad29c[_0x1df099(0x132)]===_0x1df099(0x15d)){const _0x31580c=_0x5ad29c['scriptName']||_0x5ad29c[_0x1df099(0x155)]||(_0x5ad29c[_0x1df099(0x16d)]==null?'':String(_0x5ad29c[_0x1df099(0x16d)]));if(!_0x31580c)throw CliErrors['validation'](_0x1df099(0x160)+_0x3e121c[_0x1df099(0x175)]+'\x20requires\x20target.functionName.');return executeSdkBff(_0x31580c,_0x5ad29c[_0x1df099(0x14c)]);}throw CliErrors['validation'](_0x1df099(0x158)+_0x5ad29c[_0x1df099(0x132)]);}async function resolveDatasetCode(_0x48a271,_0x3c9dde,_0x5acca4){const _0x1bc9ec=a39_0x4d8f;if(_0x48a271['datasetCode'])return _0x48a271[_0x1bc9ec(0x177)];if(!_0x48a271['datatable'])throw CliErrors[_0x1bc9ec(0x152)]('Service\x20command\x20'+_0x3c9dde[_0x1bc9ec(0x175)]+_0x1bc9ec(0x134));const _0x1a6b9d=await listDatasets(_0x5acca4[_0x1bc9ec(0x145)]),_0x577621=_0x1a6b9d['find'](_0x38bc78=>_0x38bc78[_0x1bc9ec(0x142)]?.[_0x1bc9ec(0x17b)]===_0x48a271[_0x1bc9ec(0x161)]);if(!_0x577621?.['code'])throw CliErrors[_0x1bc9ec(0x152)](_0x1bc9ec(0x131)+_0x48a271['datatable']+_0x1bc9ec(0x178)+_0x5acca4[_0x1bc9ec(0x145)]+'.','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.');return _0x577621[_0x1bc9ec(0x168)];}function applyAppBinding(_0x5a11a5,_0x19ef8,_0x559bdf){const _0x3e52f1=a39_0x4d8f,_0x52b052=_0x19ef8['target'][_0x3e52f1(0x16a)];if(!_0x52b052)return;const _0x4c71f0=_0x5a11a5[_0x3e52f1(0x176)][_0x52b052];if(!_0x4c71f0)throw CliErrors[_0x3e52f1(0x152)]('Unknown\x20appRef\x20\x22'+_0x52b052+'\x22\x20in\x20service\x20command\x20'+_0x19ef8[_0x3e52f1(0x175)]+'.',_0x3e52f1(0x156));const _0x9e99a3=_0x4c71f0[_0x3e52f1(0x127)]||_0x4c71f0[_0x3e52f1(0x145)];_0x9e99a3&&!hasText(_0x559bdf[_0x3e52f1(0x127)])&&(_0x559bdf['appcode']=_0x9e99a3),_0x4c71f0[_0x3e52f1(0x157)]&&!hasText(_0x559bdf[_0x3e52f1(0x157)])&&!hasText(_0x559bdf['appcode'])&&(_0x559bdf[_0x3e52f1(0x157)]=_0x4c71f0[_0x3e52f1(0x157)]),_0x4c71f0[_0x3e52f1(0x123)]&&!hasText(_0x559bdf['env'])&&(_0x559bdf[_0x3e52f1(0x123)]=_0x4c71f0[_0x3e52f1(0x123)]);}function renderDynamicCommandHelp(_0x19fdf2){const _0x2a733e=a39_0x4d8f,_0x165238=[_0x2a733e(0x135),_0x2a733e(0x16f)+_0x19fdf2[_0x2a733e(0x141)][_0x2a733e(0x132)],_0x2a733e(0x133)+_0x19fdf2[_0x2a733e(0x141)][_0x2a733e(0x15c)]];if(_0x19fdf2[_0x2a733e(0x141)][_0x2a733e(0x177)])_0x165238[_0x2a733e(0x121)](_0x2a733e(0x170)+_0x19fdf2['target'][_0x2a733e(0x177)]);if(_0x19fdf2['target'][_0x2a733e(0x161)])_0x165238[_0x2a733e(0x121)](_0x2a733e(0x166)+_0x19fdf2[_0x2a733e(0x141)]['datatable']);if(_0x19fdf2[_0x2a733e(0x141)][_0x2a733e(0x120)])_0x165238[_0x2a733e(0x121)](_0x2a733e(0x122)+_0x19fdf2['target'][_0x2a733e(0x120)]);if(_0x19fdf2[_0x2a733e(0x141)][_0x2a733e(0x128)])_0x165238['push']('\x20\x20\x20\x20functionName:\x20'+_0x19fdf2[_0x2a733e(0x141)][_0x2a733e(0x128)]);if(_0x19fdf2[_0x2a733e(0x149)][_0x2a733e(0x125)]>0x0){_0x165238[_0x2a733e(0x121)]('',_0x2a733e(0x12d));for(const _0x5c0707 of _0x19fdf2['mapTo']){_0x165238[_0x2a733e(0x121)](_0x2a733e(0x17d)+(_0x5c0707[_0x2a733e(0x151)]||_0x2a733e(0x12a))+'\x20->\x20'+_0x5c0707[_0x2a733e(0x141)]+(_0x5c0707[_0x2a733e(0x147)]?'.'+_0x5c0707[_0x2a733e(0x147)]:''));}}return _0x165238[_0x2a733e(0x16c)]('\x0a');}function targetPreview(_0x55ab83){const _0x5ed975=a39_0x4d8f;return{'kind':_0x55ab83[_0x5ed975(0x132)],'command':_0x55ab83['command'],'appRef':_0x55ab83[_0x5ed975(0x16a)],'datasetCode':_0x55ab83[_0x5ed975(0x177)],'datatable':_0x55ab83['datatable'],'sqlCode':_0x55ab83[_0x5ed975(0x120)],'bffCode':_0x55ab83[_0x5ed975(0x155)],'bffId':_0x55ab83['bffId'],'functionName':_0x55ab83[_0x5ed975(0x128)]};}function normalizeScalarParams(_0x39906f){const _0x42a408=a39_0x4d8f;return Object[_0x42a408(0x15a)](Object[_0x42a408(0x167)](_0x39906f)[_0x42a408(0x159)](([,_0x329cb0])=>typeof _0x329cb0===_0x42a408(0x14e)||typeof _0x329cb0==='number'));}function hasText(_0x4cc72e){const _0x150c18=a39_0x4d8f;return typeof _0x4cc72e===_0x150c18(0x14e)&&_0x4cc72e[_0x150c18(0x17a)]()[_0x150c18(0x125)]>0x0;}function isPrimitiveFlagDefault(_0x3f8dc4){const _0x4a7594=a39_0x4d8f;return _0x3f8dc4===undefined||typeof _0x3f8dc4===_0x4a7594(0x14e)||typeof _0x3f8dc4==='number'||typeof _0x3f8dc4===_0x4a7594(0x17e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x26ed9b,_0x35f866){const _0x534ee3=a40_0x2709,_0x27554a=_0x26ed9b();while(!![]){try{const _0x380c07=-parseInt(_0x534ee3(0x217))/0x1+parseInt(_0x534ee3(0x210))/0x2*(-parseInt(_0x534ee3(0x1f4))/0x3)+parseInt(_0x534ee3(0x206))/0x4+parseInt(_0x534ee3(0x209))/0x5*(parseInt(_0x534ee3(0x1f5))/0x6)+parseInt(_0x534ee3(0x20e))/0x7*(parseInt(_0x534ee3(0x218))/0x8)+-parseInt(_0x534ee3(0x201))/0x9*(parseInt(_0x534ee3(0x1fb))/0xa)+-parseInt(_0x534ee3(0x208))/0xb;if(_0x380c07===_0x35f866)break;else _0x27554a['push'](_0x27554a['shift']());}catch(_0x8a14b5){_0x27554a['push'](_0x27554a['shift']());}}}(a40_0x5678,0xcab9e));export function adaptServiceTreeManifestForLegacyFramework(_0x239f9f){const _0x58ef1d=a40_0x2709,_0x552cef=cloneJsonValue(_0x239f9f),_0x3b80f2=[];if(!isObjectRecord(_0x552cef))return{'manifest':_0x552cef,'errors':_0x3b80f2};return Array[_0x58ef1d(0x20a)](_0x552cef[_0x58ef1d(0x202)])&&_0x552cef[_0x58ef1d(0x202)][_0x58ef1d(0x1f6)]((_0x109a0c,_0x235528)=>{const _0x34e114=_0x58ef1d;if(!isObjectRecord(_0x109a0c))return;adaptBffTarget(_0x109a0c[_0x34e114(0x204)],_0x34e114(0x219)+_0x235528+_0x34e114(0x20c),_0x3b80f2);}),adaptResources(_0x552cef[_0x58ef1d(0x1f9)],'$.resources',_0x3b80f2),{'manifest':_0x552cef,'errors':_0x3b80f2};}function a40_0x2709(_0x366989,_0xeb575b){_0x366989=_0x366989-0x1f4;const _0x567898=a40_0x5678();let _0x270964=_0x567898[_0x366989];return _0x270964;}export function toPublicServiceTreeTarget(_0x51fae7){const _0xd80f3d=a40_0x2709,{scriptName:_0x446904,..._0x4096ed}=_0x51fae7;return typeof _0x446904===_0xd80f3d(0x1fe)&&_0x446904[_0xd80f3d(0x205)]()&&(_0x4096ed[_0xd80f3d(0x207)]=_0x446904),_0x4096ed;}export function toPublicNormalizedServiceTree(_0x321b29){const _0x1a9003=a40_0x2709;return{..._0x321b29,'commands':_0x321b29['commands'][_0x1a9003(0x20b)](_0x394707=>({..._0x394707,'target':toPublicServiceTreeTarget(_0x394707[_0x1a9003(0x204)])}))};}function adaptResources(_0x402477,_0x340bbd,_0x54079b){const _0x39b274=a40_0x2709;if(!isObjectRecord(_0x402477))return;for(const [_0x5bde8a,_0x884242]of Object['entries'](_0x402477)){if(!isObjectRecord(_0x884242))continue;const _0x407c64=_0x340bbd+'.'+_0x5bde8a;if(isObjectRecord(_0x884242[_0x39b274(0x211)]))for(const [_0x274c7d,_0x34caa5]of Object['entries'](_0x884242['actions'])){if(!isObjectRecord(_0x34caa5))continue;const _0x533196=_0x407c64+_0x39b274(0x216)+_0x274c7d,_0x599efd=isObjectRecord(_0x34caa5[_0x39b274(0x204)])&&_0x34caa5['target'][_0x39b274(0x212)]===_0x39b274(0x20f);adaptBffTarget(_0x34caa5[_0x39b274(0x204)],_0x533196+'.target',_0x54079b),(_0x599efd||isBffAction(_0x34caa5))&&adaptFunctionNameField(_0x34caa5,_0x533196,_0x54079b);}adaptResources(_0x884242[_0x39b274(0x1f9)],_0x407c64+_0x39b274(0x215),_0x54079b);}}function adaptBffTarget(_0x3c57d3,_0x8c3b19,_0x2c3668){const _0xd2e38d=a40_0x2709;if(!isObjectRecord(_0x3c57d3)||_0x3c57d3[_0xd2e38d(0x212)]!=='bff')return;adaptFunctionNameField(_0x3c57d3,_0x8c3b19,_0x2c3668);}function adaptFunctionNameField(_0x2ad4a9,_0x3127e3,_0x17fd60){const _0x464966=a40_0x2709;Object['prototype'][_0x464966(0x203)][_0x464966(0x1fa)](_0x2ad4a9,_0x464966(0x1fc))&&_0x17fd60[_0x464966(0x200)]({'level':'error','path':_0x3127e3+_0x464966(0x213),'message':_0x464966(0x21b)});if(Object[_0x464966(0x1f7)]['hasOwnProperty'][_0x464966(0x1fa)](_0x2ad4a9,_0x464966(0x207))){if(typeof _0x2ad4a9[_0x464966(0x207)]!==_0x464966(0x1fe)||!_0x2ad4a9[_0x464966(0x207)][_0x464966(0x205)]()){_0x17fd60[_0x464966(0x200)]({'level':'error','path':_0x3127e3+_0x464966(0x20d),'message':_0x464966(0x1ff)}),delete _0x2ad4a9[_0x464966(0x207)];return;}_0x2ad4a9[_0x464966(0x1fc)]=_0x2ad4a9[_0x464966(0x207)],delete _0x2ad4a9[_0x464966(0x207)];}}function isBffAction(_0x572823){const _0x3ec9ce=a40_0x2709;return _0x572823[_0x3ec9ce(0x212)]==='bff'||_0x572823[_0x3ec9ce(0x21a)]===_0x3ec9ce(0x1f8)||_0x572823['target']===_0x3ec9ce(0x1f8);}function a40_0x5678(){const _0x170fda=['300nxchys','forEach','prototype','bff.exec','resources','call','20KRiJyT','scriptName','fromEntries','string','functionName\x20must\x20be\x20a\x20non-empty\x20string.','push','26442mAAgts','commands','hasOwnProperty','target','trim','467840kJaKys','functionName','4856412BoFFHD','157490nhYgqU','isArray','map','].target','.functionName','2917971hYdHce','bff','4GjGVpO','actions','kind','.scriptName','entries','.resources','.actions.','435613Olqmga','8lQvCEj','$.commands[','action','Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.','593049YdrGUN'];a40_0x5678=function(){return _0x170fda;};return a40_0x5678();}function cloneJsonValue(_0x276780){const _0x420e2b=a40_0x2709;if(Array[_0x420e2b(0x20a)](_0x276780))return _0x276780[_0x420e2b(0x20b)](_0x2d5da2=>cloneJsonValue(_0x2d5da2));if(isObjectRecord(_0x276780))return Object[_0x420e2b(0x1fd)](Object[_0x420e2b(0x214)](_0x276780)['map'](([_0x130f3d,_0x2aa888])=>[_0x130f3d,cloneJsonValue(_0x2aa888)]));return _0x276780;}function isObjectRecord(_0x427500){return Boolean(_0x427500)&&typeof _0x427500==='object'&&!Array['isArray'](_0x427500);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_0x25c448=a40_0x11c7;(function(_0x36ed57,_0x5617f0){const _0x2db371=a40_0x11c7,_0x462130=_0x36ed57();while(!![]){try{const _0x184b9e=parseInt(_0x2db371(0xe3))/0x1+parseInt(_0x2db371(0xdb))/0x2*(parseInt(_0x2db371(0xd7))/0x3)+-parseInt(_0x2db371(0x11d))/0x4+parseInt(_0x2db371(0xfb))/0x5+-parseInt(_0x2db371(0xde))/0x6*(parseInt(_0x2db371(0x10f))/0x7)+-parseInt(_0x2db371(0x10b))/0x8*(parseInt(_0x2db371(0xe9))/0x9)+parseInt(_0x2db371(0x11a))/0xa;if(_0x184b9e===_0x5617f0)break;else _0x462130['push'](_0x462130['shift']());}catch(_0x26130b){_0x462130['push'](_0x462130['shift']());}}}(a40_0x113e,0xf1b6b));function a40_0x11c7(_0x45d27b,_0x45e608){_0x45d27b=_0x45d27b-0xd6;const _0x113e16=a40_0x113e();let _0x11c76f=_0x113e16[_0x45d27b];return _0x11c76f;}import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':'file','type':a40_0x25c448(0xed),'required':!![],'description':a40_0x25c448(0x10a)},SERVICE_FLAG={'name':a40_0x25c448(0xdc),'type':a40_0x25c448(0xed),'required':!![],'description':a40_0x25c448(0x10e),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':'lower\x20kebab-case\x20service\x20code'}};function summarizeService(_0x5d67ca){const _0x1a92e4=a40_0x25c448;return{'serviceCode':_0x5d67ca['serviceCode'],'name':_0x5d67ca[_0x1a92e4(0x102)][_0x1a92e4(0xdc)]['name'],'version':_0x5d67ca[_0x1a92e4(0xfd)],'importedAt':_0x5d67ca[_0x1a92e4(0xee)],'source':_0x5d67ca[_0x1a92e4(0xf6)],'commandCount':_0x5d67ca['normalizedManifest'][_0x1a92e4(0xe5)][_0x1a92e4(0xec)],'commands':_0x5d67ca[_0x1a92e4(0x102)]['commands'][_0x1a92e4(0xda)](_0x29a207=>({'path':_0x29a207['cliPath'],'description':_0x29a207[_0x1a92e4(0xd8)],'risk':_0x29a207['risk'],'target':toPublicServiceTreeTarget(_0x29a207[_0x1a92e4(0xf1)]),'flags':_0x29a207[_0x1a92e4(0x118)]['map'](_0x4b1eb7=>({'name':_0x4b1eb7[_0x1a92e4(0x109)],'cliName':_0x4b1eb7[_0x1a92e4(0xea)],'type':_0x4b1eb7[_0x1a92e4(0xf5)],'required':_0x4b1eb7[_0x1a92e4(0xe6)]===!![]}))}))};}function a40_0x113e(){const _0x332196=['1991150WVXqhx','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','hash','6642308BIWczK','Imported\x20','1137dqYcqJ','description','risk','map','9762hYBjtj','service','export','7278WRMnjV','reduce','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','read','registryServiceCode','1573746MqGUMl','filePath','commands','required','updated','entry','809082AVpUzr','cliName','manifest','length','string','importedAt','Removed\x20service\x20','file','target','registry','kind','WRITE','type','source','serviceCode','list','warnings','serviceCount','9859245cvWQNP','Export\x20a\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','version','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','imported','report','str','normalizedManifest','cliPath','write','detail','Updated','\x20service(s).','Exported\x20service\x20','name','Service\x20Tree\x20manifest\x20file\x20path','144RGqzZP','registryPath','entries','Local\x20service\x20code,\x20for\x20example\x20crm','7651zVgDzS','replaced','Remove\x20a\x20local\x20Service\x20Tree\x20manifest\x20from\x20the\x20runtime\x20registry','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','Local\x20service\x20not\x20found:\x20','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','errors','import','\x20service\x20','flags','manifests'];a40_0x113e=function(){return _0x332196;};return a40_0x113e();}function summarizeLoadedManifest(_0x40b334){const _0x83c34c=a40_0x25c448;return{'service':_0x40b334['normalizedManifest']?.[_0x83c34c(0xdc)],'version':_0x40b334[_0x83c34c(0x102)]?.[_0x83c34c(0xfd)],'commandCount':_0x40b334[_0x83c34c(0x102)]?.['commands'][_0x83c34c(0xec)]??0x0,'commands':_0x40b334[_0x83c34c(0x102)]?.['commands'][_0x83c34c(0xda)](_0x562629=>({'path':_0x562629[_0x83c34c(0x103)],'risk':_0x562629[_0x83c34c(0xd9)],'target':toPublicServiceTreeTarget(_0x562629[_0x83c34c(0xf1)])}))??[],'registryIndex':_0x40b334['registryIndex'],'registryServiceCode':_0x40b334[_0x83c34c(0xe2)],'errors':_0x40b334[_0x83c34c(0x100)][_0x83c34c(0x115)],'warnings':_0x40b334[_0x83c34c(0x100)][_0x83c34c(0xf9)]};}export const serviceDefinitions=[{'service':a40_0x25c448(0xdc),'command':'validate','description':'Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','risk':a40_0x25c448(0xe1),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x490860){const _0x24e67d=a40_0x25c448,_0x54ba5c=loadServiceManifestFromFile(_0x490860[_0x24e67d(0x101)](_0x24e67d(0xf0)));if(!_0x54ba5c['report']['ok'])return{'ok':![],'data':{'file':_0x54ba5c[_0x24e67d(0xe4)],'hash':_0x54ba5c[_0x24e67d(0x11c)],'kind':_0x54ba5c[_0x24e67d(0xf3)],'serviceCount':_0x54ba5c[_0x24e67d(0x119)][_0x24e67d(0xec)],'services':_0x54ba5c[_0x24e67d(0x119)][_0x24e67d(0xda)](summarizeLoadedManifest),'errors':_0x54ba5c['report'][_0x24e67d(0x115)],'warnings':_0x54ba5c[_0x24e67d(0x100)][_0x24e67d(0xf9)]},'message':formatValidationFailure(_0x54ba5c['report'])};if(_0x54ba5c[_0x24e67d(0xf3)]===_0x24e67d(0xf2)||_0x54ba5c[_0x24e67d(0x119)]['length']!==0x1)return{'ok':!![],'data':{'file':_0x54ba5c[_0x24e67d(0xe4)],'hash':_0x54ba5c[_0x24e67d(0x11c)],'kind':_0x54ba5c[_0x24e67d(0xf3)],'serviceCount':_0x54ba5c['manifests']['length'],'commandCount':_0x54ba5c['manifests'][_0x24e67d(0xdf)]((_0xd48160,_0xee2ce9)=>_0xd48160+(_0xee2ce9[_0x24e67d(0x102)]?.['commands'][_0x24e67d(0xec)]??0x0),0x0),'services':_0x54ba5c[_0x24e67d(0x119)][_0x24e67d(0xda)](summarizeLoadedManifest),'warnings':_0x54ba5c[_0x24e67d(0x100)][_0x24e67d(0xf9)]},'message':'Service\x20registry\x20validation\x20passed.'};return{'ok':!![],'data':{'file':_0x54ba5c[_0x24e67d(0xe4)],'hash':_0x54ba5c[_0x24e67d(0x11c)],'kind':_0x54ba5c[_0x24e67d(0xf3)],'service':_0x54ba5c[_0x24e67d(0x102)]?.[_0x24e67d(0xdc)],'version':_0x54ba5c[_0x24e67d(0x102)]?.[_0x24e67d(0xfd)],'commandCount':_0x54ba5c[_0x24e67d(0x102)]?.['commands'][_0x24e67d(0xec)]??0x0,'commands':_0x54ba5c[_0x24e67d(0x102)]?.[_0x24e67d(0xe5)][_0x24e67d(0xda)](_0x5dcf1f=>({'path':_0x5dcf1f[_0x24e67d(0x103)],'risk':_0x5dcf1f[_0x24e67d(0xd9)],'target':toPublicServiceTreeTarget(_0x5dcf1f[_0x24e67d(0xf1)])})),'warnings':_0x54ba5c[_0x24e67d(0x100)][_0x24e67d(0xf9)]},'message':'Service\x20manifest\x20validation\x20passed.'};}},{'service':a40_0x25c448(0xdc),'command':a40_0x25c448(0x116),'description':a40_0x25c448(0x112),'risk':a40_0x25c448(0x104),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x5de56c){const _0x5a9569=a40_0x25c448,_0xec60e=loadServiceManifestFromFile(_0x5de56c[_0x5a9569(0x101)](_0x5a9569(0xf0)));return{'method':_0x5a9569(0xf4),'url':getServiceRegistryPath(),'body':{'file':_0xec60e['filePath'],'hash':_0xec60e[_0x5a9569(0x11c)],'kind':_0xec60e['kind'],'ok':_0xec60e[_0x5a9569(0x100)]['ok'],'service':_0xec60e[_0x5a9569(0x102)]?.['service'],'version':_0xec60e[_0x5a9569(0x102)]?.['version'],'serviceCount':_0xec60e[_0x5a9569(0x119)][_0x5a9569(0xec)],'services':_0xec60e[_0x5a9569(0x119)][_0x5a9569(0xda)](_0x357e67=>({'service':_0x357e67[_0x5a9569(0x102)]?.[_0x5a9569(0xdc)],'version':_0x357e67['normalizedManifest']?.[_0x5a9569(0xfd)],'commandCount':_0x357e67[_0x5a9569(0x102)]?.[_0x5a9569(0xe5)][_0x5a9569(0xec)]??0x0,'errors':_0x357e67[_0x5a9569(0x100)]['errors']})),'errors':_0xec60e[_0x5a9569(0x100)]['errors'],'commandCount':_0xec60e[_0x5a9569(0x102)]?.[_0x5a9569(0xe5)][_0x5a9569(0xec)]??0x0},'description':'Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json'};},async 'execute'(_0x11e52f){const _0x57cbe9=a40_0x25c448,_0x5f949c=importServiceManifest(_0x11e52f[_0x57cbe9(0x101)]('file'));if(_0x5f949c[_0x57cbe9(0x10d)][_0x57cbe9(0xec)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x5f949c['registryPath'],'imported':_0x5f949c[_0x57cbe9(0xff)],'updated':_0x5f949c[_0x57cbe9(0xe7)],'serviceCount':_0x5f949c[_0x57cbe9(0xfa)],'services':_0x5f949c[_0x57cbe9(0x10d)]['map'](summarizeService)},'message':_0x57cbe9(0xd6)+_0x5f949c[_0x57cbe9(0xff)]+'\x20service(s),\x20updated\x20'+_0x5f949c[_0x57cbe9(0xe7)]+_0x57cbe9(0x107)};return{'ok':!![],'data':{'registryPath':_0x5f949c[_0x57cbe9(0x10c)],'replaced':_0x5f949c[_0x57cbe9(0x110)],'imported':_0x5f949c[_0x57cbe9(0xff)],'updated':_0x5f949c['updated'],'serviceCount':_0x5f949c[_0x57cbe9(0xfa)],'service':summarizeService(_0x5f949c['entry'])},'message':(_0x5f949c[_0x57cbe9(0x110)]?_0x57cbe9(0x106):'Imported')+_0x57cbe9(0x117)+_0x5f949c[_0x57cbe9(0xe8)]['serviceCode']+'.'};}},{'service':'service','command':a40_0x25c448(0xdd),'description':a40_0x25c448(0xfc),'risk':a40_0x25c448(0x104),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x2e4802){const _0x4c88a9=a40_0x25c448,_0x48b5c3=getLocalServiceEntry(_0x2e4802[_0x4c88a9(0x101)](_0x4c88a9(0xdc)));return{'method':_0x4c88a9(0xf4),'url':_0x2e4802['str'](_0x4c88a9(0xf0)),'body':{'service':_0x2e4802[_0x4c88a9(0x101)](_0x4c88a9(0xdc)),'found':Boolean(_0x48b5c3),'version':_0x48b5c3?.[_0x4c88a9(0xfd)],'source':_0x48b5c3?.[_0x4c88a9(0xf6)]},'description':_0x4c88a9(0xe0)};},async 'execute'(_0xdea46){const _0x393949=a40_0x25c448,_0x27cfe4=exportServiceManifest(_0xdea46[_0x393949(0x101)]('service'),_0xdea46['str'](_0x393949(0xf0)));return{'ok':!![],'data':{'registryPath':_0x27cfe4[_0x393949(0x10c)],'file':_0x27cfe4[_0x393949(0xe4)],'service':summarizeService(_0x27cfe4['entry'])},'message':_0x393949(0x108)+_0x27cfe4[_0x393949(0xe8)][_0x393949(0xf7)]+'.'};}},{'service':a40_0x25c448(0xdc),'command':a40_0x25c448(0xf8),'description':a40_0x25c448(0x11b),'risk':a40_0x25c448(0xe1),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x3e3390=a40_0x25c448,_0x48fd08=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x48fd08[_0x3e3390(0xec)],'services':_0x48fd08['map'](summarizeService)}};}},{'service':a40_0x25c448(0xdc),'command':'remove','description':a40_0x25c448(0x111),'risk':a40_0x25c448(0x104),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x5b0a23){const _0x496f17=a40_0x25c448,_0x2c732f=getLocalServiceEntry(_0x5b0a23[_0x496f17(0x101)](_0x496f17(0xdc)));return{'method':_0x496f17(0xf4),'url':getServiceRegistryPath(),'body':{'service':_0x5b0a23[_0x496f17(0x101)](_0x496f17(0xdc)),'found':Boolean(_0x2c732f),'version':_0x2c732f?.[_0x496f17(0xfd)],'source':_0x2c732f?.['source']},'description':_0x496f17(0x114)};},async 'execute'(_0x3201d4){const _0x2fa699=a40_0x25c448,_0x3bdc93=removeServiceManifest(_0x3201d4[_0x2fa699(0x101)](_0x2fa699(0xdc)));return{'ok':!![],'data':{'registryPath':_0x3bdc93[_0x2fa699(0x10c)],'serviceCount':_0x3bdc93[_0x2fa699(0xfa)],'service':summarizeService(_0x3bdc93[_0x2fa699(0xe8)])},'message':_0x2fa699(0xef)+_0x3bdc93['entry']['serviceCode']+'.'};}},{'service':'service','command':a40_0x25c448(0x105),'description':a40_0x25c448(0xfe),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x4f3634){const _0x59fe96=a40_0x25c448,_0x50b799=getLocalServiceEntry(_0x4f3634[_0x59fe96(0x101)](_0x59fe96(0xdc)));if(!_0x50b799)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x4f3634[_0x59fe96(0x101)](_0x59fe96(0xdc))},'message':_0x59fe96(0x113)+_0x4f3634[_0x59fe96(0x101)](_0x59fe96(0xdc))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x50b799),'manifest':_0x50b799[_0x59fe96(0xeb)],'normalizedManifest':toPublicNormalizedServiceTree(_0x50b799[_0x59fe96(0x102)])}};}}];
|
|
1
|
+
function a41_0x2891(_0x10f59c,_0x40689f){_0x10f59c=_0x10f59c-0x157;const _0x331d6c=a41_0x331d();let _0x289180=_0x331d6c[_0x10f59c];return _0x289180;}const a41_0x592599=a41_0x2891;(function(_0x5c170b,_0x52cb7c){const _0x5ad074=a41_0x2891,_0x4541c7=_0x5c170b();while(!![]){try{const _0x4b86ae=-parseInt(_0x5ad074(0x180))/0x1+-parseInt(_0x5ad074(0x16f))/0x2+-parseInt(_0x5ad074(0x15e))/0x3*(parseInt(_0x5ad074(0x165))/0x4)+-parseInt(_0x5ad074(0x198))/0x5*(parseInt(_0x5ad074(0x179))/0x6)+-parseInt(_0x5ad074(0x16b))/0x7+parseInt(_0x5ad074(0x174))/0x8*(-parseInt(_0x5ad074(0x161))/0x9)+parseInt(_0x5ad074(0x178))/0xa*(parseInt(_0x5ad074(0x18e))/0xb);if(_0x4b86ae===_0x52cb7c)break;else _0x4541c7['push'](_0x4541c7['shift']());}catch(_0x17e4dc){_0x4541c7['push'](_0x4541c7['shift']());}}}(a41_0x331d,0xbfacc));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':a41_0x592599(0x18c),'type':'string','required':!![],'description':a41_0x592599(0x187)},SERVICE_FLAG={'name':'service','type':a41_0x592599(0x169),'required':!![],'description':a41_0x592599(0x196),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':'lower\x20kebab-case\x20service\x20code'}};function summarizeService(_0x307246){const _0x430284=a41_0x592599;return{'serviceCode':_0x307246['serviceCode'],'name':_0x307246['normalizedManifest'][_0x430284(0x17e)]['name'],'version':_0x307246[_0x430284(0x19d)],'importedAt':_0x307246['importedAt'],'source':_0x307246[_0x430284(0x188)],'commandCount':_0x307246['normalizedManifest']['commands'][_0x430284(0x15b)],'commands':_0x307246[_0x430284(0x19a)][_0x430284(0x18f)][_0x430284(0x160)](_0x3e1b10=>({'path':_0x3e1b10[_0x430284(0x170)],'description':_0x3e1b10[_0x430284(0x15d)],'risk':_0x3e1b10[_0x430284(0x16d)],'target':toPublicServiceTreeTarget(_0x3e1b10['target']),'flags':_0x3e1b10[_0x430284(0x19e)][_0x430284(0x160)](_0x565bd7=>({'name':_0x565bd7[_0x430284(0x190)],'cliName':_0x565bd7[_0x430284(0x164)],'type':_0x565bd7[_0x430284(0x166)],'required':_0x565bd7[_0x430284(0x159)]===!![]}))}))};}function summarizeLoadedManifest(_0x2c9fea){const _0x390923=a41_0x592599;return{'service':_0x2c9fea[_0x390923(0x19a)]?.['service'],'version':_0x2c9fea[_0x390923(0x19a)]?.[_0x390923(0x19d)],'commandCount':_0x2c9fea[_0x390923(0x19a)]?.[_0x390923(0x18f)][_0x390923(0x15b)]??0x0,'commands':_0x2c9fea['normalizedManifest']?.[_0x390923(0x18f)][_0x390923(0x160)](_0x81d5f6=>({'path':_0x81d5f6[_0x390923(0x170)],'risk':_0x81d5f6['risk'],'target':toPublicServiceTreeTarget(_0x81d5f6['target'])}))??[],'registryIndex':_0x2c9fea[_0x390923(0x163)],'registryServiceCode':_0x2c9fea[_0x390923(0x16a)],'errors':_0x2c9fea[_0x390923(0x19c)][_0x390923(0x17c)],'warnings':_0x2c9fea[_0x390923(0x19c)][_0x390923(0x182)]};}export const serviceDefinitions=[{'service':a41_0x592599(0x17e),'command':'validate','description':a41_0x592599(0x181),'risk':a41_0x592599(0x16e),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x2533bf){const _0x1d1773=a41_0x592599,_0x1d6192=loadServiceManifestFromFile(_0x2533bf[_0x1d1773(0x162)]('file'));if(!_0x1d6192[_0x1d1773(0x19c)]['ok'])return{'ok':![],'data':{'file':_0x1d6192[_0x1d1773(0x175)],'hash':_0x1d6192[_0x1d1773(0x15c)],'kind':_0x1d6192[_0x1d1773(0x183)],'serviceCount':_0x1d6192[_0x1d1773(0x171)][_0x1d1773(0x15b)],'services':_0x1d6192[_0x1d1773(0x171)][_0x1d1773(0x160)](summarizeLoadedManifest),'errors':_0x1d6192['report'][_0x1d1773(0x17c)],'warnings':_0x1d6192[_0x1d1773(0x19c)][_0x1d1773(0x182)]},'message':formatValidationFailure(_0x1d6192[_0x1d1773(0x19c)])};if(_0x1d6192[_0x1d1773(0x183)]===_0x1d1773(0x173)||_0x1d6192[_0x1d1773(0x171)][_0x1d1773(0x15b)]!==0x1)return{'ok':!![],'data':{'file':_0x1d6192[_0x1d1773(0x175)],'hash':_0x1d6192[_0x1d1773(0x15c)],'kind':_0x1d6192[_0x1d1773(0x183)],'serviceCount':_0x1d6192[_0x1d1773(0x171)]['length'],'commandCount':_0x1d6192[_0x1d1773(0x171)][_0x1d1773(0x18a)]((_0x5d4419,_0x5b1c26)=>_0x5d4419+(_0x5b1c26[_0x1d1773(0x19a)]?.[_0x1d1773(0x18f)]['length']??0x0),0x0),'services':_0x1d6192[_0x1d1773(0x171)][_0x1d1773(0x160)](summarizeLoadedManifest),'warnings':_0x1d6192['report'][_0x1d1773(0x182)]},'message':'Service\x20registry\x20validation\x20passed.'};return{'ok':!![],'data':{'file':_0x1d6192['filePath'],'hash':_0x1d6192['hash'],'kind':_0x1d6192[_0x1d1773(0x183)],'service':_0x1d6192[_0x1d1773(0x19a)]?.[_0x1d1773(0x17e)],'version':_0x1d6192[_0x1d1773(0x19a)]?.[_0x1d1773(0x19d)],'commandCount':_0x1d6192[_0x1d1773(0x19a)]?.['commands'][_0x1d1773(0x15b)]??0x0,'commands':_0x1d6192[_0x1d1773(0x19a)]?.[_0x1d1773(0x18f)][_0x1d1773(0x160)](_0xaa9b98=>({'path':_0xaa9b98[_0x1d1773(0x170)],'risk':_0xaa9b98[_0x1d1773(0x16d)],'target':toPublicServiceTreeTarget(_0xaa9b98[_0x1d1773(0x157)])})),'warnings':_0x1d6192[_0x1d1773(0x19c)]['warnings']},'message':'Service\x20manifest\x20validation\x20passed.'};}},{'service':'service','command':a41_0x592599(0x167),'description':a41_0x592599(0x172),'risk':a41_0x592599(0x15a),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x45fc4a){const _0x2a09d0=a41_0x592599,_0x1f1602=loadServiceManifestFromFile(_0x45fc4a[_0x2a09d0(0x162)](_0x2a09d0(0x18c)));return{'method':_0x2a09d0(0x199),'url':getServiceRegistryPath(),'body':{'file':_0x1f1602[_0x2a09d0(0x175)],'hash':_0x1f1602[_0x2a09d0(0x15c)],'kind':_0x1f1602[_0x2a09d0(0x183)],'ok':_0x1f1602[_0x2a09d0(0x19c)]['ok'],'service':_0x1f1602[_0x2a09d0(0x19a)]?.[_0x2a09d0(0x17e)],'version':_0x1f1602[_0x2a09d0(0x19a)]?.[_0x2a09d0(0x19d)],'serviceCount':_0x1f1602[_0x2a09d0(0x171)][_0x2a09d0(0x15b)],'services':_0x1f1602[_0x2a09d0(0x171)][_0x2a09d0(0x160)](_0x584d14=>({'service':_0x584d14[_0x2a09d0(0x19a)]?.[_0x2a09d0(0x17e)],'version':_0x584d14['normalizedManifest']?.['version'],'commandCount':_0x584d14['normalizedManifest']?.[_0x2a09d0(0x18f)][_0x2a09d0(0x15b)]??0x0,'errors':_0x584d14[_0x2a09d0(0x19c)]['errors']})),'errors':_0x1f1602[_0x2a09d0(0x19c)][_0x2a09d0(0x17c)],'commandCount':_0x1f1602[_0x2a09d0(0x19a)]?.[_0x2a09d0(0x18f)]['length']??0x0},'description':_0x2a09d0(0x177)};},async 'execute'(_0x4684fd){const _0x12eb21=a41_0x592599,_0xbf3586=importServiceManifest(_0x4684fd[_0x12eb21(0x162)](_0x12eb21(0x18c)));if(_0xbf3586['entries'][_0x12eb21(0x15b)]!==0x1)return{'ok':!![],'data':{'registryPath':_0xbf3586[_0x12eb21(0x195)],'imported':_0xbf3586[_0x12eb21(0x18b)],'updated':_0xbf3586[_0x12eb21(0x17b)],'serviceCount':_0xbf3586[_0x12eb21(0x194)],'services':_0xbf3586['entries']['map'](summarizeService)},'message':_0x12eb21(0x168)+_0xbf3586[_0x12eb21(0x18b)]+_0x12eb21(0x18d)+_0xbf3586[_0x12eb21(0x17b)]+_0x12eb21(0x185)};return{'ok':!![],'data':{'registryPath':_0xbf3586['registryPath'],'replaced':_0xbf3586[_0x12eb21(0x17d)],'imported':_0xbf3586['imported'],'updated':_0xbf3586[_0x12eb21(0x17b)],'serviceCount':_0xbf3586[_0x12eb21(0x194)],'service':summarizeService(_0xbf3586['entry'])},'message':(_0xbf3586[_0x12eb21(0x17d)]?_0x12eb21(0x17a):'Imported')+_0x12eb21(0x158)+_0xbf3586[_0x12eb21(0x186)][_0x12eb21(0x17f)]+'.'};}},{'service':a41_0x592599(0x17e),'command':'export','description':a41_0x592599(0x192),'risk':a41_0x592599(0x15a),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x1ec60c){const _0x1406b2=a41_0x592599,_0x30039a=getLocalServiceEntry(_0x1ec60c[_0x1406b2(0x162)]('service'));return{'method':_0x1406b2(0x199),'url':_0x1ec60c[_0x1406b2(0x162)](_0x1406b2(0x18c)),'body':{'service':_0x1ec60c[_0x1406b2(0x162)](_0x1406b2(0x17e)),'found':Boolean(_0x30039a),'version':_0x30039a?.[_0x1406b2(0x19d)],'source':_0x30039a?.[_0x1406b2(0x188)]},'description':_0x1406b2(0x184)};},async 'execute'(_0xfdac39){const _0x221724=a41_0x592599,_0x460b49=exportServiceManifest(_0xfdac39[_0x221724(0x162)](_0x221724(0x17e)),_0xfdac39[_0x221724(0x162)]('file'));return{'ok':!![],'data':{'registryPath':_0x460b49[_0x221724(0x195)],'file':_0x460b49[_0x221724(0x175)],'service':summarizeService(_0x460b49[_0x221724(0x186)])},'message':_0x221724(0x197)+_0x460b49['entry']['serviceCode']+'.'};}},{'service':a41_0x592599(0x17e),'command':'list','description':a41_0x592599(0x16c),'risk':a41_0x592599(0x16e),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0xd88490=a41_0x592599,_0x1f0a3f=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x1f0a3f[_0xd88490(0x15b)],'services':_0x1f0a3f[_0xd88490(0x160)](summarizeService)}};}},{'service':a41_0x592599(0x17e),'command':a41_0x592599(0x176),'description':a41_0x592599(0x189),'risk':a41_0x592599(0x15a),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0xe0874b){const _0x1289cc=a41_0x592599,_0xc96f95=getLocalServiceEntry(_0xe0874b['str'](_0x1289cc(0x17e)));return{'method':_0x1289cc(0x199),'url':getServiceRegistryPath(),'body':{'service':_0xe0874b['str'](_0x1289cc(0x17e)),'found':Boolean(_0xc96f95),'version':_0xc96f95?.[_0x1289cc(0x19d)],'source':_0xc96f95?.[_0x1289cc(0x188)]},'description':_0x1289cc(0x191)};},async 'execute'(_0xb408dc){const _0x348e6e=a41_0x592599,_0x249398=removeServiceManifest(_0xb408dc[_0x348e6e(0x162)](_0x348e6e(0x17e)));return{'ok':!![],'data':{'registryPath':_0x249398[_0x348e6e(0x195)],'serviceCount':_0x249398[_0x348e6e(0x194)],'service':summarizeService(_0x249398['entry'])},'message':'Removed\x20service\x20'+_0x249398[_0x348e6e(0x186)]['serviceCode']+'.'};}},{'service':a41_0x592599(0x17e),'command':a41_0x592599(0x193),'description':a41_0x592599(0x15f),'risk':a41_0x592599(0x16e),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x3d2cfa){const _0x22797d=a41_0x592599,_0x4948ed=getLocalServiceEntry(_0x3d2cfa['str']('service'));if(!_0x4948ed)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x3d2cfa['str'](_0x22797d(0x17e))},'message':_0x22797d(0x19b)+_0x3d2cfa[_0x22797d(0x162)](_0x22797d(0x17e))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x4948ed),'manifest':_0x4948ed[_0x22797d(0x19f)],'normalizedManifest':toPublicNormalizedServiceTree(_0x4948ed[_0x22797d(0x19a)])}};}}];function a41_0x331d(){const _0x11884f=['version','flags','manifest','target','\x20service\x20','required','write','length','hash','description','3hrtXjV','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','map','18dlSENg','str','registryIndex','cliName','1069616ohZFhZ','type','import','Imported\x20','string','registryServiceCode','4225550TqXNkV','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','risk','read','2768988QtAreW','cliPath','manifests','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','registry','607728JsoJkj','filePath','remove','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','3880kehxgH','343938spCYJB','Updated','updated','errors','replaced','service','serviceCode','369409jfRLVB','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','warnings','kind','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','\x20service(s).','entry','Service\x20Tree\x20manifest\x20file\x20path','source','Remove\x20a\x20local\x20Service\x20Tree\x20manifest\x20from\x20the\x20runtime\x20registry','reduce','imported','file','\x20service(s),\x20updated\x20','122111QkgVMZ','commands','name','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','Export\x20a\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','detail','serviceCount','registryPath','Local\x20service\x20code,\x20for\x20example\x20crm','Exported\x20service\x20','65kIqzaX','WRITE','normalizedManifest','Local\x20service\x20not\x20found:\x20','report'];a41_0x331d=function(){return _0x11884f;};return a41_0x331d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a41_0x1cbda7=a41_0x1406;(function(_0x251f2f,_0x5f58f8){const _0xd4606c=a41_0x1406,_0x470963=_0x251f2f();while(!![]){try{const _0x2cbf10=parseInt(_0xd4606c(0xba))/0x1*(-parseInt(_0xd4606c(0xc8))/0x2)+parseInt(_0xd4606c(0xed))/0x3*(parseInt(_0xd4606c(0xe2))/0x4)+parseInt(_0xd4606c(0xbc))/0x5+parseInt(_0xd4606c(0xb9))/0x6*(parseInt(_0xd4606c(0xad))/0x7)+-parseInt(_0xd4606c(0xe5))/0x8+parseInt(_0xd4606c(0xe3))/0x9+-parseInt(_0xd4606c(0xd9))/0xa;if(_0x2cbf10===_0x5f58f8)break;else _0x470963['push'](_0x470963['shift']());}catch(_0x2f90f2){_0x470963['push'](_0x470963['shift']());}}}(a41_0x12e3,0x5afaf));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{normalizeServiceTreeManifest,validateServiceTreeManifest}from'@lovrabet/cli-framework';import{PRODUCT_CONFIG}from'../../constant/product.js';import{CliErrors}from'../../errors.js';import{adaptServiceTreeManifestForLegacyFramework}from'../../commands/service/function-name-adapter.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME=a41_0x1cbda7(0xe9);export function getServiceRegistryPath(_0x1cac8d={}){const _0x3fa66f=a41_0x1cbda7;return resolve(_0x1cac8d[_0x3fa66f(0xe7)]??homedir(),PRODUCT_CONFIG[_0x3fa66f(0xc3)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x52d336={}){const _0x183b63=a41_0x1cbda7,_0x2c0961=getServiceRegistryPath(_0x52d336);if(!existsSync(_0x2c0961))return emptyServiceRegistry();try{const _0x10f7b7=readFileSync(_0x2c0961,_0x183b63(0xb1));if(!_0x10f7b7[_0x183b63(0xab)]())return emptyServiceRegistry();const _0x917856=JSON[_0x183b63(0xd3)](_0x10f7b7);if(_0x917856[_0x183b63(0xae)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors['validation']('Unsupported\x20service\x20registry\x20schemaVersion:\x20'+String(_0x917856['schemaVersion']),_0x183b63(0xb3)+_0x2c0961+'.');if(!Array[_0x183b63(0xef)](_0x917856[_0x183b63(0xbe)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x917856[_0x183b63(0xa6)],'services':_0x917856[_0x183b63(0xbe)]};}catch(_0x5af138){if(_0x5af138 instanceof Error&&_0x5af138[_0x183b63(0xaa)]===_0x183b63(0xd2))throw _0x5af138;throw CliErrors[_0x183b63(0xf1)](_0x183b63(0xde)+_0x2c0961,_0x183b63(0xd0));}}export function writeServiceRegistry(_0x507066,_0x13f6be={}){const _0x37b8=a41_0x1cbda7,_0x4d81a8=getServiceRegistryPath(_0x13f6be),_0x64817b=dirname(_0x4d81a8);!existsSync(_0x64817b)&&mkdirSync(_0x64817b,{'recursive':!![]});const _0x3c271d=_0x4d81a8+_0x37b8(0xbf);try{writeFileSync(_0x3c271d,JSON[_0x37b8(0xc4)](_0x507066,null,0x2)+'\x0a',{'encoding':_0x37b8(0xb1),'mode':0x180}),renameSync(_0x3c271d,_0x4d81a8);}catch(_0x19c7de){try{unlinkSync(_0x3c271d);}catch{}if(_0x19c7de?.[_0x37b8(0xf7)]===_0x37b8(0xd5))throw CliErrors['validation'](_0x37b8(0xf4)+_0x4d81a8);throw _0x19c7de;}return _0x4d81a8;}export function loadServiceManifestFromFile(_0x4e716f){const _0x1d7777=a41_0x1cbda7,_0x33b093=resolve(_0x4e716f);if(!existsSync(_0x33b093))throw CliErrors[_0x1d7777(0xf1)]('Service\x20manifest\x20file\x20not\x20found:\x20'+_0x4e716f);let _0x2527bd;const _0x420228=readFileSync(_0x33b093,_0x1d7777(0xb1));try{_0x2527bd=JSON[_0x1d7777(0xd3)](_0x420228);}catch{throw CliErrors[_0x1d7777(0xf1)]('Invalid\x20service\x20manifest\x20JSON:\x20'+_0x4e716f,_0x1d7777(0xd7));}const _0xb49bb3=sha256(_0x420228),_0x55dccd=extractLoadedServiceManifests(_0x2527bd,_0xb49bb3),_0x468b68=aggregateValidationReports(_0x55dccd),_0x47e55b=_0x55dccd[0x0];return{'filePath':_0x33b093,'hash':_0xb49bb3,'kind':isServiceRegistryLike(_0x2527bd)?'registry':_0x1d7777(0xc0),'manifest':_0x47e55b?.[_0x1d7777(0xc0)]??_0x2527bd,'report':_0x468b68,'normalizedManifest':_0x55dccd[_0x1d7777(0xf3)]===0x1?_0x47e55b?.[_0x1d7777(0xea)]:undefined,'manifests':_0x55dccd};}export function importServiceManifest(_0x8ddb8,_0x26232f={}){const _0x62ef66=a41_0x1cbda7,_0x3dab15=loadServiceManifestFromFile(_0x8ddb8);if(!_0x3dab15[_0x62ef66(0xf0)]['ok'])throw CliErrors[_0x62ef66(0xf1)](formatValidationFailure(_0x3dab15['report']),_0x62ef66(0xb4));if(_0x3dab15[_0x62ef66(0xb7)][_0x62ef66(0xf3)]===0x0)throw CliErrors['validation'](_0x62ef66(0xec),'Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.');const _0x5e0a6e=readServiceRegistry(_0x26232f),_0x5adab0=(_0x26232f['now']??(()=>new Date()))()[_0x62ef66(0xa8)](),_0x20ecef=[];let _0x22c5f6=0x0,_0x3053b5=0x0;for(const _0x51645c of _0x3dab15[_0x62ef66(0xb7)]){if(!_0x51645c[_0x62ef66(0xea)])continue;const _0x1d3ace=_0x51645c[_0x62ef66(0xea)][_0x62ef66(0xda)][_0x62ef66(0xf7)],_0x621f38={'serviceCode':_0x1d3ace,'version':_0x51645c['normalizedManifest'][_0x62ef66(0xdb)],'importedAt':_0x5adab0,'source':{'type':_0x62ef66(0xb0),'path':_0x3dab15[_0x62ef66(0xe0)],'hash':_0x51645c[_0x62ef66(0xe8)]},'manifest':_0x51645c[_0x62ef66(0xc0)],'normalizedManifest':_0x51645c[_0x62ef66(0xea)]},_0x334018=_0x5e0a6e[_0x62ef66(0xbe)][_0x62ef66(0xeb)](_0x213068=>_0x213068['serviceCode']===_0x1d3ace);_0x334018>=0x0?(_0x5e0a6e[_0x62ef66(0xbe)][_0x334018]=_0x621f38,_0x3053b5++):(_0x5e0a6e[_0x62ef66(0xbe)][_0x62ef66(0xc7)](_0x621f38),_0x22c5f6++),_0x20ecef[_0x62ef66(0xc7)](_0x621f38);}_0x5e0a6e[_0x62ef66(0xbe)][_0x62ef66(0xb8)]((_0xeb93c,_0x41aae3)=>_0xeb93c[_0x62ef66(0xc5)]['localeCompare'](_0x41aae3[_0x62ef66(0xc5)])),_0x5e0a6e[_0x62ef66(0xa6)]=_0x5adab0;const _0x27422b=writeServiceRegistry(_0x5e0a6e,_0x26232f);return{'registryPath':_0x27422b,'entry':_0x20ecef[0x0],'replaced':_0x20ecef[_0x62ef66(0xf3)]===0x1?_0x3053b5===0x1:_0x3053b5>0x0,'entries':_0x20ecef,'imported':_0x22c5f6,'updated':_0x3053b5,'serviceCount':_0x5e0a6e[_0x62ef66(0xbe)][_0x62ef66(0xf3)]};}export function exportServiceManifest(_0x51d967,_0x22b5bb,_0x11b10f={}){const _0x1c3ed1=a41_0x1cbda7,_0x423066=getServiceRegistryPath(_0x11b10f),_0x5a2894=getLocalServiceEntry(_0x51d967,_0x11b10f);if(!_0x5a2894)throw CliErrors[_0x1c3ed1(0xf1)]('Local\x20service\x20not\x20found:\x20'+_0x51d967,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const _0x20bd07=resolve(_0x22b5bb),_0x18d0b0=dirname(_0x20bd07);return!existsSync(_0x18d0b0)&&mkdirSync(_0x18d0b0,{'recursive':!![]}),writeFileSync(_0x20bd07,JSON[_0x1c3ed1(0xc4)](_0x5a2894[_0x1c3ed1(0xc0)],null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),{'registryPath':_0x423066,'filePath':_0x20bd07,'entry':_0x5a2894};}export function removeServiceManifest(_0x593877,_0x3bfada={}){const _0x2b51e7=a41_0x1cbda7,_0x53dd69=readServiceRegistry(_0x3bfada),_0x4fa3ff=_0x593877[_0x2b51e7(0xab)](),_0x4e8677=_0x53dd69[_0x2b51e7(0xbe)][_0x2b51e7(0xeb)](_0xe4393a=>_0xe4393a['serviceCode']===_0x4fa3ff);if(_0x4e8677<0x0)throw CliErrors[_0x2b51e7(0xf1)](_0x2b51e7(0xaf)+_0x4fa3ff,_0x2b51e7(0xee));const [_0x174e77]=_0x53dd69[_0x2b51e7(0xbe)]['splice'](_0x4e8677,0x1),_0x138a6c=(_0x3bfada['now']??(()=>new Date()))()['toISOString']();_0x53dd69[_0x2b51e7(0xa6)]=_0x138a6c;const _0x456fbc=writeServiceRegistry(_0x53dd69,_0x3bfada);return{'registryPath':_0x456fbc,'entry':_0x174e77,'serviceCount':_0x53dd69[_0x2b51e7(0xbe)][_0x2b51e7(0xf3)]};}export function listLocalServices(_0x55640a={}){return readServiceRegistry(_0x55640a)['services'];}export function getLocalServiceEntry(_0x8726da,_0x166f0b={}){const _0x1b5129=a41_0x1cbda7;return readServiceRegistry(_0x166f0b)[_0x1b5129(0xbe)][_0x1b5129(0xd8)](_0x547cee=>_0x547cee['serviceCode']===_0x8726da[_0x1b5129(0xab)]());}export function listLocalServiceTrees(_0x4a67a6={}){const _0x237c51=a41_0x1cbda7;return readServiceRegistry(_0x4a67a6)[_0x237c51(0xbe)]['map'](_0x5dd56f=>_0x5dd56f[_0x237c51(0xea)]);}export function inspectServiceRegistry(_0x31ec1e={}){const _0x5a88c8=a41_0x1cbda7,_0x25caa5=getServiceRegistryPath(_0x31ec1e);if(!existsSync(_0x25caa5))return emptyServiceRegistryInspection(_0x25caa5,_0x5a88c8(0xcc),![]);try{const _0x3b2435=readFileSync(_0x25caa5,_0x5a88c8(0xb1));if(!_0x3b2435[_0x5a88c8(0xab)]())return emptyServiceRegistryInspection(_0x25caa5,_0x5a88c8(0xa9),!![]);const _0x494266=JSON[_0x5a88c8(0xd3)](_0x3b2435);if(_0x494266[_0x5a88c8(0xae)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x25caa5,_0x5a88c8(0xc9),!![]),'schemaVersion':_0x494266['schemaVersion'],'message':_0x5a88c8(0xe4)+String(_0x494266[_0x5a88c8(0xae)])};if(!Array[_0x5a88c8(0xef)](_0x494266[_0x5a88c8(0xbe)]))return{...emptyServiceRegistryInspection(_0x25caa5,'invalid',!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x494266['updatedAt'],'message':_0x5a88c8(0xa7)};const _0x222bc4=_0x494266[_0x5a88c8(0xbe)][_0x5a88c8(0xce)](summarizeLocalServiceEntry);return{'registryPath':_0x25caa5,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x494266['updatedAt'],'serviceCount':_0x222bc4['length'],'commandCount':_0x222bc4[_0x5a88c8(0xe6)]((_0x480e76,_0x4306dd)=>_0x480e76+_0x4306dd[_0x5a88c8(0xcd)],0x0),'services':_0x222bc4};}catch(_0x151045){return{...emptyServiceRegistryInspection(_0x25caa5,'invalid',!![]),'message':_0x151045 instanceof Error?_0x151045[_0x5a88c8(0xac)]:String(_0x151045)};}}function a41_0x1406(_0x4263f8,_0x1a87ec){_0x4263f8=_0x4263f8-0xa4;const _0x12e38f=a41_0x12e3();let _0x1406ea=_0x12e38f[_0x4263f8];return _0x1406ea;}export function formatValidationFailure(_0x16cece){const _0x1e8da2=a41_0x1cbda7,_0x5a0a57=_0x16cece[_0x1e8da2(0xc2)][_0x1e8da2(0xce)](_0x37fab7=>_0x37fab7[_0x1e8da2(0xb2)]+':\x20'+_0x37fab7[_0x1e8da2(0xac)]);return'Service\x20manifest\x20validation\x20failed:\x0a'+_0x5a0a57['join']('\x0a');}function extractLoadedServiceManifests(_0x5e4131,_0x20f746){const _0x4fe880=a41_0x1cbda7;if(!isServiceRegistryLike(_0x5e4131)){const _0x211675=_0x5e4131,{manifest:_0x138170,errors:_0xfd52a9}=adaptServiceTreeManifestForLegacyFramework(_0x211675),_0x5c72d7=validateServiceTreeManifest(_0x138170),_0x17ebdc=mergeValidationErrors(_0x5c72d7,_0xfd52a9);return[{'manifest':_0x211675,'report':_0x17ebdc,'normalizedManifest':_0x17ebdc['ok']?normalizeServiceTreeManifest(_0x138170):undefined,'sourceHash':_0x20f746}];}return _0x5e4131[_0x4fe880(0xbe)][_0x4fe880(0xce)]((_0x3c1e27,_0x28ab71)=>{const _0x47048e=_0x4fe880,_0x4b11d9=isObjectRecord(_0x3c1e27)?_0x3c1e27[_0x47048e(0xc0)]:undefined,{manifest:_0xb85f37,errors:_0x2ae206}=adaptServiceTreeManifestForLegacyFramework(_0x4b11d9),_0x20c237=validateServiceTreeManifest(_0xb85f37),_0x5573bc=mergeValidationErrors(_0x20c237,_0x2ae206),_0x43adde=isObjectRecord(_0x3c1e27)&&typeof _0x3c1e27[_0x47048e(0xc5)]===_0x47048e(0xc1)?_0x3c1e27[_0x47048e(0xc5)]:undefined;return{'manifest':_0x4b11d9,'report':_0x5573bc,'normalizedManifest':_0x5573bc['ok']?normalizeServiceTreeManifest(_0xb85f37):undefined,'sourceHash':sha256(JSON['stringify'](_0x4b11d9,null,0x2)+'\x0a'),'registryIndex':_0x28ab71,'registryServiceCode':_0x43adde};});}function mergeValidationErrors(_0x11934a,_0xf2b0ec){const _0x13d948=a41_0x1cbda7,_0x2a26e3=_0x11934a[_0x13d948(0xc2)]['map'](_0x118c54=>_0x118c54[_0x13d948(0xac)]===_0x13d948(0xa4)?{..._0x118c54,'message':_0x13d948(0xdd)}:_0x118c54),_0x1a05c3=[..._0xf2b0ec,..._0x2a26e3];return{'ok':_0x1a05c3[_0x13d948(0xf3)]===0x0,'errors':_0x1a05c3,'warnings':_0x11934a[_0x13d948(0xe1)]};}function aggregateValidationReports(_0x267be8){const _0x2eabc3=a41_0x1cbda7,_0x5c6093=_0x267be8['flatMap'](_0x165c99=>_0x165c99[_0x2eabc3(0xf6)]===undefined?_0x165c99[_0x2eabc3(0xf0)][_0x2eabc3(0xc2)]:_0x165c99[_0x2eabc3(0xf0)][_0x2eabc3(0xc2)][_0x2eabc3(0xce)](_0x21ee52=>({..._0x21ee52,'path':prefixRegistryIssuePath(_0x165c99[_0x2eabc3(0xf6)],_0x21ee52[_0x2eabc3(0xb2)])}))),_0x1ed213=_0x267be8['flatMap'](_0x48708a=>_0x48708a[_0x2eabc3(0xf6)]===undefined?_0x48708a[_0x2eabc3(0xf0)][_0x2eabc3(0xe1)]:_0x48708a[_0x2eabc3(0xf0)][_0x2eabc3(0xe1)][_0x2eabc3(0xce)](_0x516bb1=>({..._0x516bb1,'path':prefixRegistryIssuePath(_0x48708a[_0x2eabc3(0xf6)],_0x516bb1[_0x2eabc3(0xb2)])})));return{'ok':_0x5c6093[_0x2eabc3(0xf3)]===0x0,'errors':_0x5c6093,'warnings':_0x1ed213};}function a41_0x12e3(){const _0x560842=['serviceCode','importedAt','push','82172zpkslr','invalid','command','digest','missing','commandCount','map','update','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','cliPath','CliError','parse','source','ENOENT','slice','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','find','6537870UrSOYn','service','version','description','bff\x20target\x20requires\x20functionName.','Invalid\x20service\x20registry\x20JSON:\x20','object','filePath','warnings','4TEOuei','5566482IJWTjW','Unsupported\x20schemaVersion:\x20','2996232JWwsSV','reduce','homeDir','sourceHash','service.json','normalizedManifest','findIndex','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','55326oRVesH','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','isArray','report','validation','].manifest','length','Cannot\x20write\x20service\x20registry:\x20','target','registryIndex','code','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','].manifest.','updatedAt','services\x20must\x20be\x20an\x20array','toISOString','empty','name','trim','message','4395377wAohyJ','schemaVersion','Local\x20service\x20not\x20found:\x20','file','utf8','path','Remove\x20or\x20migrate\x20','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','hex','$.services[','manifests','sort','6FPEvSQ','8qeToGS','sha256','2324040ZzjDEt','startsWith','services','.tmp','manifest','string','errors','homeDirName','stringify'];a41_0x12e3=function(){return _0x560842;};return a41_0x12e3();}function prefixRegistryIssuePath(_0x139fec,_0x105c88){const _0x31406a=a41_0x1cbda7;if(_0x105c88==='$')return _0x31406a(0xb6)+_0x139fec+'].manifest';if(_0x105c88[_0x31406a(0xbd)]('$.'))return _0x31406a(0xb6)+_0x139fec+_0x31406a(0xf2)+_0x105c88[_0x31406a(0xd6)](0x1);if(_0x105c88[_0x31406a(0xbd)]('$['))return _0x31406a(0xb6)+_0x139fec+_0x31406a(0xf2)+_0x105c88[_0x31406a(0xd6)](0x1);return'$.services['+_0x139fec+_0x31406a(0xa5)+_0x105c88;}function isServiceRegistryLike(_0x2b7b66){const _0x167425=a41_0x1cbda7;return isObjectRecord(_0x2b7b66)&&_0x2b7b66[_0x167425(0xae)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x167425(0xef)](_0x2b7b66['services']);}function isObjectRecord(_0x5d13f5){const _0x5d739f=a41_0x1cbda7;return Boolean(_0x5d13f5)&&typeof _0x5d13f5===_0x5d739f(0xdf)&&!Array[_0x5d739f(0xef)](_0x5d13f5);}function emptyServiceRegistryInspection(_0x38a5a7,_0xbe1c9d,_0x4ab979){return{'registryPath':_0x38a5a7,'exists':_0x4ab979,'status':_0xbe1c9d,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x451d0d){const _0x2c982e=a41_0x1cbda7,_0x1a1f7f=_0x451d0d[_0x2c982e(0xea)],_0x54ee2e=_0x1a1f7f['commands'][_0x2c982e(0xce)](_0x4b7cfd=>({'path':_0x4b7cfd[_0x2c982e(0xd1)],'description':_0x4b7cfd[_0x2c982e(0xdc)],'risk':_0x4b7cfd['risk'],'targetKind':_0x4b7cfd[_0x2c982e(0xf5)]['kind'],'targetCommand':_0x4b7cfd[_0x2c982e(0xf5)][_0x2c982e(0xca)]}));return{'serviceCode':_0x451d0d[_0x2c982e(0xc5)],'name':_0x1a1f7f[_0x2c982e(0xda)][_0x2c982e(0xaa)],'description':_0x1a1f7f[_0x2c982e(0xda)][_0x2c982e(0xdc)],'version':_0x451d0d[_0x2c982e(0xdb)],'importedAt':_0x451d0d[_0x2c982e(0xc6)],'source':_0x451d0d[_0x2c982e(0xd4)],'commandCount':_0x54ee2e['length'],'commands':_0x54ee2e};}function sha256(_0x8fe486){const _0x484d3d=a41_0x1cbda7;return createHash(_0x484d3d(0xbb))[_0x484d3d(0xcf)](_0x8fe486)[_0x484d3d(0xcb)](_0x484d3d(0xb5));}
|
|
1
|
+
(function(_0xd842b6,_0xabc5bc){const _0x18a88e=a42_0x1f06,_0x509b74=_0xd842b6();while(!![]){try{const _0x443605=-parseInt(_0x18a88e(0x151))/0x1*(-parseInt(_0x18a88e(0x139))/0x2)+parseInt(_0x18a88e(0x13f))/0x3+parseInt(_0x18a88e(0x14e))/0x4+parseInt(_0x18a88e(0x106))/0x5+-parseInt(_0x18a88e(0x113))/0x6+parseInt(_0x18a88e(0x13c))/0x7+-parseInt(_0x18a88e(0x14c))/0x8*(parseInt(_0x18a88e(0x128))/0x9);if(_0x443605===_0xabc5bc)break;else _0x509b74['push'](_0x509b74['shift']());}catch(_0x30cc38){_0x509b74['push'](_0x509b74['shift']());}}}(a42_0x367f,0xbeb4e));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{normalizeServiceTreeManifest,validateServiceTreeManifest}from'@lovrabet/cli-framework';import{PRODUCT_CONFIG}from'../../constant/product.js';import{CliErrors}from'../../errors.js';import{adaptServiceTreeManifestForLegacyFramework}from'../../commands/service/function-name-adapter.js';function a42_0x367f(){const _0x4c4275=['now','file','bff\x20target\x20requires\x20functionName.','sourceHash','validation','70066FQrNRf','risk','manifest','6158103ZUGQeM','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','reduce','3892077eghFTy','registryIndex','Invalid\x20service\x20manifest\x20JSON:\x20','string','Local\x20service\x20not\x20found:\x20','updatedAt','localeCompare','flatMap','filePath','registry','commands','services\x20must\x20be\x20an\x20array','$.services[','184avqNXe','Remove\x20or\x20migrate\x20','2809792EOYlWW','startsWith','importedAt','7VnQTHN','Service\x20manifest\x20validation\x20failed:\x0a','isArray','toISOString','slice','hex','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','].manifest','object','warnings','invalid','normalizedManifest','missing','push','path','5186820cUBFnV','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','findIndex','kind','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','update','].manifest.','Service\x20manifest\x20file\x20not\x20found:\x20','serviceCode','schemaVersion','target','empty','map','4713372jZQprd','service','Unsupported\x20schemaVersion:\x20','source','splice','length','homeDirName','description','homeDir','CliError','version','name','manifests','Invalid\x20service\x20registry\x20JSON:\x20','join','find','Unsupported\x20service\x20registry\x20schemaVersion:\x20','errors','utf8','message','commandCount','1015605LXYdOw','code','services','digest','report','sha256','parse','cliPath','command','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','stringify','trim'];a42_0x367f=function(){return _0x4c4275;};return a42_0x367f();}export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME='service.json';export function getServiceRegistryPath(_0x4d68a8={}){const _0x297d07=a42_0x1f06;return resolve(_0x4d68a8[_0x297d07(0x11b)]??homedir(),PRODUCT_CONFIG[_0x297d07(0x119)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x68af1={}){const _0x154527=a42_0x1f06,_0x4cb4ef=getServiceRegistryPath(_0x68af1);if(!existsSync(_0x4cb4ef))return emptyServiceRegistry();try{const _0x51a684=readFileSync(_0x4cb4ef,_0x154527(0x125));if(!_0x51a684[_0x154527(0x133)]())return emptyServiceRegistry();const _0x2bcfec=JSON['parse'](_0x51a684);if(_0x2bcfec[_0x154527(0x10f)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors['validation'](_0x154527(0x123)+String(_0x2bcfec[_0x154527(0x10f)]),_0x154527(0x14d)+_0x4cb4ef+'.');if(!Array[_0x154527(0x153)](_0x2bcfec[_0x154527(0x12a)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x2bcfec['updatedAt'],'services':_0x2bcfec[_0x154527(0x12a)]};}catch(_0x35e4f6){if(_0x35e4f6 instanceof Error&&_0x35e4f6[_0x154527(0x11e)]===_0x154527(0x11c))throw _0x35e4f6;throw CliErrors[_0x154527(0x138)](_0x154527(0x120)+_0x4cb4ef,_0x154527(0x13d));}}export function writeServiceRegistry(_0x5ce376,_0x4bec10={}){const _0x1df0cf=a42_0x1f06,_0x400313=getServiceRegistryPath(_0x4bec10),_0x5eee2f=dirname(_0x400313);!existsSync(_0x5eee2f)&&mkdirSync(_0x5eee2f,{'recursive':!![]});const _0x1fb32b=_0x400313+'.tmp';try{writeFileSync(_0x1fb32b,JSON[_0x1df0cf(0x132)](_0x5ce376,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x1fb32b,_0x400313);}catch(_0x30ab2b){try{unlinkSync(_0x1fb32b);}catch{}if(_0x30ab2b?.['code']==='ENOENT')throw CliErrors[_0x1df0cf(0x138)]('Cannot\x20write\x20service\x20registry:\x20'+_0x400313);throw _0x30ab2b;}return _0x400313;}export function loadServiceManifestFromFile(_0x25491e){const _0x40433d=a42_0x1f06,_0x2b1249=resolve(_0x25491e);if(!existsSync(_0x2b1249))throw CliErrors[_0x40433d(0x138)](_0x40433d(0x10d)+_0x25491e);let _0x3e83d2;const _0x345136=readFileSync(_0x2b1249,_0x40433d(0x125));try{_0x3e83d2=JSON[_0x40433d(0x12e)](_0x345136);}catch{throw CliErrors['validation'](_0x40433d(0x141)+_0x25491e,_0x40433d(0xfd));}const _0x531396=sha256(_0x345136),_0x14e4ba=extractLoadedServiceManifests(_0x3e83d2,_0x531396),_0x1e3a7d=aggregateValidationReports(_0x14e4ba),_0x492b9c=_0x14e4ba[0x0];return{'filePath':_0x2b1249,'hash':_0x531396,'kind':isServiceRegistryLike(_0x3e83d2)?_0x40433d(0x148):_0x40433d(0x13b),'manifest':_0x492b9c?.[_0x40433d(0x13b)]??_0x3e83d2,'report':_0x1e3a7d,'normalizedManifest':_0x14e4ba[_0x40433d(0x118)]===0x1?_0x492b9c?.['normalizedManifest']:undefined,'manifests':_0x14e4ba};}export function importServiceManifest(_0x1455f3,_0x4b2591={}){const _0x574182=a42_0x1f06,_0x47c79a=loadServiceManifestFromFile(_0x1455f3);if(!_0x47c79a[_0x574182(0x12c)]['ok'])throw CliErrors[_0x574182(0x138)](formatValidationFailure(_0x47c79a['report']),'Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.');if(_0x47c79a[_0x574182(0x11f)][_0x574182(0x118)]===0x0)throw CliErrors[_0x574182(0x138)](_0x574182(0x131),_0x574182(0x107));const _0x36b01f=readServiceRegistry(_0x4b2591),_0x427462=(_0x4b2591[_0x574182(0x134)]??(()=>new Date()))()[_0x574182(0x154)](),_0x19b586=[];let _0x13ea32=0x0,_0x28e969=0x0;for(const _0x5a7703 of _0x47c79a[_0x574182(0x11f)]){if(!_0x5a7703[_0x574182(0x102)])continue;const _0x1181e6=_0x5a7703[_0x574182(0x102)]['service'][_0x574182(0x129)],_0xdb30c2={'serviceCode':_0x1181e6,'version':_0x5a7703['normalizedManifest'][_0x574182(0x11d)],'importedAt':_0x427462,'source':{'type':_0x574182(0x135),'path':_0x47c79a[_0x574182(0x147)],'hash':_0x5a7703[_0x574182(0x137)]},'manifest':_0x5a7703[_0x574182(0x13b)],'normalizedManifest':_0x5a7703[_0x574182(0x102)]},_0x4cc050=_0x36b01f['services'][_0x574182(0x108)](_0x288986=>_0x288986[_0x574182(0x10e)]===_0x1181e6);_0x4cc050>=0x0?(_0x36b01f['services'][_0x4cc050]=_0xdb30c2,_0x28e969++):(_0x36b01f[_0x574182(0x12a)][_0x574182(0x104)](_0xdb30c2),_0x13ea32++),_0x19b586['push'](_0xdb30c2);}_0x36b01f[_0x574182(0x12a)]['sort']((_0x1d359e,_0x19457f)=>_0x1d359e[_0x574182(0x10e)][_0x574182(0x145)](_0x19457f[_0x574182(0x10e)])),_0x36b01f['updatedAt']=_0x427462;const _0x473912=writeServiceRegistry(_0x36b01f,_0x4b2591);return{'registryPath':_0x473912,'entry':_0x19b586[0x0],'replaced':_0x19b586[_0x574182(0x118)]===0x1?_0x28e969===0x1:_0x28e969>0x0,'entries':_0x19b586,'imported':_0x13ea32,'updated':_0x28e969,'serviceCount':_0x36b01f[_0x574182(0x12a)][_0x574182(0x118)]};}export function exportServiceManifest(_0x4e9dba,_0x53582c,_0x59ab8f={}){const _0x3a81ea=a42_0x1f06,_0x3bcd18=getServiceRegistryPath(_0x59ab8f),_0x28a6d1=getLocalServiceEntry(_0x4e9dba,_0x59ab8f);if(!_0x28a6d1)throw CliErrors[_0x3a81ea(0x138)](_0x3a81ea(0x143)+_0x4e9dba,_0x3a81ea(0x10a));const _0x57217e=resolve(_0x53582c),_0x4e02ab=dirname(_0x57217e);return!existsSync(_0x4e02ab)&&mkdirSync(_0x4e02ab,{'recursive':!![]}),writeFileSync(_0x57217e,JSON['stringify'](_0x28a6d1[_0x3a81ea(0x13b)],null,0x2)+'\x0a',{'encoding':_0x3a81ea(0x125),'mode':0x180}),{'registryPath':_0x3bcd18,'filePath':_0x57217e,'entry':_0x28a6d1};}function a42_0x1f06(_0x340e98,_0x24223b){_0x340e98=_0x340e98-0xfc;const _0x367f4b=a42_0x367f();let _0x1f060b=_0x367f4b[_0x340e98];return _0x1f060b;}export function removeServiceManifest(_0xece3a9,_0x2f5bd3={}){const _0x345f5c=a42_0x1f06,_0x2ee3bd=readServiceRegistry(_0x2f5bd3),_0x594ddb=_0xece3a9[_0x345f5c(0x133)](),_0x141150=_0x2ee3bd[_0x345f5c(0x12a)][_0x345f5c(0x108)](_0x37fe93=>_0x37fe93[_0x345f5c(0x10e)]===_0x594ddb);if(_0x141150<0x0)throw CliErrors[_0x345f5c(0x138)](_0x345f5c(0x143)+_0x594ddb,_0x345f5c(0x10a));const [_0x1e10d4]=_0x2ee3bd['services'][_0x345f5c(0x117)](_0x141150,0x1),_0x292072=(_0x2f5bd3[_0x345f5c(0x134)]??(()=>new Date()))()[_0x345f5c(0x154)]();_0x2ee3bd[_0x345f5c(0x144)]=_0x292072;const _0x1bd16e=writeServiceRegistry(_0x2ee3bd,_0x2f5bd3);return{'registryPath':_0x1bd16e,'entry':_0x1e10d4,'serviceCount':_0x2ee3bd['services']['length']};}export function listLocalServices(_0x390283={}){const _0x31f726=a42_0x1f06;return readServiceRegistry(_0x390283)[_0x31f726(0x12a)];}export function getLocalServiceEntry(_0x30a919,_0x6ad31a={}){const _0xf74025=a42_0x1f06;return readServiceRegistry(_0x6ad31a)[_0xf74025(0x12a)][_0xf74025(0x122)](_0x292a51=>_0x292a51[_0xf74025(0x10e)]===_0x30a919[_0xf74025(0x133)]());}export function listLocalServiceTrees(_0x53f71f={}){const _0x50fc9b=a42_0x1f06;return readServiceRegistry(_0x53f71f)[_0x50fc9b(0x12a)][_0x50fc9b(0x112)](_0x9f8415=>_0x9f8415['normalizedManifest']);}export function inspectServiceRegistry(_0x36bc05={}){const _0x447f4e=a42_0x1f06,_0x29d0b0=getServiceRegistryPath(_0x36bc05);if(!existsSync(_0x29d0b0))return emptyServiceRegistryInspection(_0x29d0b0,_0x447f4e(0x103),![]);try{const _0x14a7f3=readFileSync(_0x29d0b0,_0x447f4e(0x125));if(!_0x14a7f3[_0x447f4e(0x133)]())return emptyServiceRegistryInspection(_0x29d0b0,_0x447f4e(0x111),!![]);const _0x4c8b6=JSON[_0x447f4e(0x12e)](_0x14a7f3);if(_0x4c8b6[_0x447f4e(0x10f)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x29d0b0,_0x447f4e(0x101),!![]),'schemaVersion':_0x4c8b6[_0x447f4e(0x10f)],'message':_0x447f4e(0x115)+String(_0x4c8b6[_0x447f4e(0x10f)])};if(!Array[_0x447f4e(0x153)](_0x4c8b6[_0x447f4e(0x12a)]))return{...emptyServiceRegistryInspection(_0x29d0b0,_0x447f4e(0x101),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x4c8b6['updatedAt'],'message':_0x447f4e(0x14a)};const _0x56ea36=_0x4c8b6[_0x447f4e(0x12a)][_0x447f4e(0x112)](summarizeLocalServiceEntry);return{'registryPath':_0x29d0b0,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x4c8b6['updatedAt'],'serviceCount':_0x56ea36['length'],'commandCount':_0x56ea36[_0x447f4e(0x13e)]((_0x11bc80,_0x3cc060)=>_0x11bc80+_0x3cc060[_0x447f4e(0x127)],0x0),'services':_0x56ea36};}catch(_0x5325ba){return{...emptyServiceRegistryInspection(_0x29d0b0,_0x447f4e(0x101),!![]),'message':_0x5325ba instanceof Error?_0x5325ba[_0x447f4e(0x126)]:String(_0x5325ba)};}}export function formatValidationFailure(_0x1cbb80){const _0x12b22e=a42_0x1f06,_0x4acade=_0x1cbb80[_0x12b22e(0x124)][_0x12b22e(0x112)](_0x4936b0=>_0x4936b0[_0x12b22e(0x105)]+':\x20'+_0x4936b0[_0x12b22e(0x126)]);return _0x12b22e(0x152)+_0x4acade[_0x12b22e(0x121)]('\x0a');}function extractLoadedServiceManifests(_0x478a18,_0x1beeb4){const _0xf39b83=a42_0x1f06;if(!isServiceRegistryLike(_0x478a18)){const _0xbc14b4=_0x478a18,{manifest:_0x392b97,errors:_0xb2c3c5}=adaptServiceTreeManifestForLegacyFramework(_0xbc14b4),_0x380f2b=validateServiceTreeManifest(_0x392b97),_0x324092=mergeValidationErrors(_0x380f2b,_0xb2c3c5);return[{'manifest':_0xbc14b4,'report':_0x324092,'normalizedManifest':_0x324092['ok']?normalizeServiceTreeManifest(_0x392b97):undefined,'sourceHash':_0x1beeb4}];}return _0x478a18[_0xf39b83(0x12a)]['map']((_0x2f675d,_0x3579d9)=>{const _0x1b46cc=_0xf39b83,_0x340f85=isObjectRecord(_0x2f675d)?_0x2f675d['manifest']:undefined,{manifest:_0x4a0965,errors:_0x5186dd}=adaptServiceTreeManifestForLegacyFramework(_0x340f85),_0x309632=validateServiceTreeManifest(_0x4a0965),_0x4fbedf=mergeValidationErrors(_0x309632,_0x5186dd),_0x37545d=isObjectRecord(_0x2f675d)&&typeof _0x2f675d[_0x1b46cc(0x10e)]===_0x1b46cc(0x142)?_0x2f675d[_0x1b46cc(0x10e)]:undefined;return{'manifest':_0x340f85,'report':_0x4fbedf,'normalizedManifest':_0x4fbedf['ok']?normalizeServiceTreeManifest(_0x4a0965):undefined,'sourceHash':sha256(JSON[_0x1b46cc(0x132)](_0x340f85,null,0x2)+'\x0a'),'registryIndex':_0x3579d9,'registryServiceCode':_0x37545d};});}function mergeValidationErrors(_0x352271,_0x58dfc8){const _0xafd106=a42_0x1f06,_0x4cf16c=_0x352271['errors']['map'](_0x3f635f=>_0x3f635f[_0xafd106(0x126)]==='bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.'?{..._0x3f635f,'message':_0xafd106(0x136)}:_0x3f635f),_0x531fe8=[..._0x58dfc8,..._0x4cf16c];return{'ok':_0x531fe8[_0xafd106(0x118)]===0x0,'errors':_0x531fe8,'warnings':_0x352271[_0xafd106(0x100)]};}function aggregateValidationReports(_0x239e6c){const _0x20bfc3=a42_0x1f06,_0x19d047=_0x239e6c[_0x20bfc3(0x146)](_0x4a1507=>_0x4a1507[_0x20bfc3(0x140)]===undefined?_0x4a1507['report'][_0x20bfc3(0x124)]:_0x4a1507[_0x20bfc3(0x12c)][_0x20bfc3(0x124)]['map'](_0x29f9ad=>({..._0x29f9ad,'path':prefixRegistryIssuePath(_0x4a1507[_0x20bfc3(0x140)],_0x29f9ad['path'])}))),_0x25600d=_0x239e6c[_0x20bfc3(0x146)](_0x1d5f5c=>_0x1d5f5c[_0x20bfc3(0x140)]===undefined?_0x1d5f5c[_0x20bfc3(0x12c)][_0x20bfc3(0x100)]:_0x1d5f5c[_0x20bfc3(0x12c)][_0x20bfc3(0x100)][_0x20bfc3(0x112)](_0x41dca4=>({..._0x41dca4,'path':prefixRegistryIssuePath(_0x1d5f5c[_0x20bfc3(0x140)],_0x41dca4['path'])})));return{'ok':_0x19d047[_0x20bfc3(0x118)]===0x0,'errors':_0x19d047,'warnings':_0x25600d};}function prefixRegistryIssuePath(_0x4546cd,_0x1033d8){const _0x1b1817=a42_0x1f06;if(_0x1033d8==='$')return'$.services['+_0x4546cd+'].manifest';if(_0x1033d8[_0x1b1817(0x14f)]('$.'))return _0x1b1817(0x14b)+_0x4546cd+_0x1b1817(0xfe)+_0x1033d8[_0x1b1817(0x155)](0x1);if(_0x1033d8[_0x1b1817(0x14f)]('$['))return _0x1b1817(0x14b)+_0x4546cd+_0x1b1817(0xfe)+_0x1033d8[_0x1b1817(0x155)](0x1);return'$.services['+_0x4546cd+_0x1b1817(0x10c)+_0x1033d8;}function isServiceRegistryLike(_0x4f1e15){return isObjectRecord(_0x4f1e15)&&_0x4f1e15['schemaVersion']===SERVICE_REGISTRY_SCHEMA_VERSION&&Array['isArray'](_0x4f1e15['services']);}function isObjectRecord(_0x36dcbc){const _0x133f9a=a42_0x1f06;return Boolean(_0x36dcbc)&&typeof _0x36dcbc===_0x133f9a(0xff)&&!Array[_0x133f9a(0x153)](_0x36dcbc);}function emptyServiceRegistryInspection(_0x1488d0,_0x239e37,_0x965725){return{'registryPath':_0x1488d0,'exists':_0x965725,'status':_0x239e37,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0xc58c53){const _0x9e425c=a42_0x1f06,_0x44b78f=_0xc58c53[_0x9e425c(0x102)],_0x3ba46c=_0x44b78f[_0x9e425c(0x149)][_0x9e425c(0x112)](_0xdb7cfb=>({'path':_0xdb7cfb[_0x9e425c(0x12f)],'description':_0xdb7cfb[_0x9e425c(0x11a)],'risk':_0xdb7cfb[_0x9e425c(0x13a)],'targetKind':_0xdb7cfb['target'][_0x9e425c(0x109)],'targetCommand':_0xdb7cfb[_0x9e425c(0x110)][_0x9e425c(0x130)]}));return{'serviceCode':_0xc58c53[_0x9e425c(0x10e)],'name':_0x44b78f['service']['name'],'description':_0x44b78f[_0x9e425c(0x114)][_0x9e425c(0x11a)],'version':_0xc58c53[_0x9e425c(0x11d)],'importedAt':_0xc58c53[_0x9e425c(0x150)],'source':_0xc58c53[_0x9e425c(0x116)],'commandCount':_0x3ba46c[_0x9e425c(0x118)],'commands':_0x3ba46c};}function sha256(_0x40e669){const _0xe8dfed=a42_0x1f06;return createHash(_0xe8dfed(0x12d))[_0xe8dfed(0x10b)](_0x40e669)[_0xe8dfed(0x12b)](_0xe8dfed(0xfc));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x5ad475=a43_0x47ef;(function(_0xe3736e,_0x2364b8){const _0x46973f=a43_0x47ef,_0x1c2069=_0xe3736e();while(!![]){try{const _0x50a7ea=-parseInt(_0x46973f(0x160))/0x1*(parseInt(_0x46973f(0x175))/0x2)+parseInt(_0x46973f(0x174))/0x3*(-parseInt(_0x46973f(0x162))/0x4)+parseInt(_0x46973f(0x178))/0x5+-parseInt(_0x46973f(0x15d))/0x6+parseInt(_0x46973f(0x169))/0x7+-parseInt(_0x46973f(0x15f))/0x8*(parseInt(_0x46973f(0x16d))/0x9)+-parseInt(_0x46973f(0x171))/0xa*(-parseInt(_0x46973f(0x177))/0xb);if(_0x50a7ea===_0x2364b8)break;else _0x1c2069['push'](_0x1c2069['shift']());}catch(_0x21c4a8){_0x1c2069['push'](_0x1c2069['shift']());}}}(a43_0x3d59,0x53f09));import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';import{dirname,resolve}from'node:path';import{CliErrors}from'../../../errors.js';function a43_0x3d59(){const _0x246dd9=['map','Refusing\x20to\x20overwrite\x20symlink:\x20','skillName','type','str','3891664hPtaNN','name','rendered','Skill\x20directory\x20already\x20exists:\x20','11385Klaixd','files','WRITE','skillDir','22710IedGLx','isSymbolicLink','path','4158bSnPOr','59196TeDwCD','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','1595yyHzNi','1753525MHLXmi','target','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','Created\x20local\x20Skill\x20draft\x20','isDirectory','utf8','bool','2634996pZaDju','validation','8WLZBwW','11aIUabH','create','364mXuVTe','write'];a43_0x3d59=function(){return _0x246dd9;};return a43_0x3d59();}import{CREATE_NAME_FLAG,FORCE_FLAG,TARGET_FLAG,TYPE_FLAG}from'../flags.js';import{DEFAULT_SKILL_TARGET,renderSkillTemplate}from'../templates.js';export const createCommand={'service':'skill','command':a43_0x5ad475(0x161),'description':'Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','risk':a43_0x5ad475(0x163),'requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x4af004){const _0x33badd=a43_0x5ad475,_0x52a227=buildSkillCreatePlan(_0x4af004['str'](_0x33badd(0x16a)),_0x4af004[_0x33badd(0x168)](_0x33badd(0x167)),_0x4af004['str']('target'));return{'method':_0x33badd(0x16f),'url':_0x52a227[_0x33badd(0x170)],'body':{'skillName':_0x52a227['rendered'][_0x33badd(0x166)],'type':_0x52a227[_0x33badd(0x16b)][_0x33badd(0x167)],'selfContained':!![],'files':_0x52a227[_0x33badd(0x16b)][_0x33badd(0x16e)][_0x33badd(0x164)](_0x295a9b=>_0x295a9b[_0x33badd(0x173)])},'description':_0x33badd(0x158)};},async 'execute'(_0x1d3d32){const _0x2805ff=a43_0x5ad475,_0x247b3b=buildSkillCreatePlan(_0x1d3d32[_0x2805ff(0x168)]('name'),_0x1d3d32[_0x2805ff(0x168)]('type'),_0x1d3d32['str'](_0x2805ff(0x157)));return writeSkillDraft(_0x247b3b,_0x1d3d32[_0x2805ff(0x15c)]('force')),{'ok':!![],'data':{'skillName':_0x247b3b[_0x2805ff(0x16b)][_0x2805ff(0x166)],'type':_0x247b3b[_0x2805ff(0x16b)]['type'],'dir':_0x247b3b[_0x2805ff(0x170)],'files':_0x247b3b[_0x2805ff(0x16b)]['files'][_0x2805ff(0x164)](_0x239c88=>_0x239c88[_0x2805ff(0x173)])},'message':_0x2805ff(0x159)+_0x247b3b[_0x2805ff(0x16b)][_0x2805ff(0x166)]};}};function buildSkillCreatePlan(_0x2d362a,_0x30f6ea,_0x53fd72){const _0x89c152=a43_0x5ad475,_0x4baa41=renderSkillTemplate({'skillName':_0x2d362a,'type':_0x30f6ea}),_0x2a62b5=resolve(normalizeSkillTarget(_0x53fd72));return{'rendered':_0x4baa41,'targetRoot':_0x2a62b5,'skillDir':resolve(_0x2a62b5,_0x4baa41[_0x89c152(0x166)])};}function a43_0x47ef(_0x33fed5,_0x369cf9){_0x33fed5=_0x33fed5-0x157;const _0x3d59c7=a43_0x3d59();let _0x47efef=_0x3d59c7[_0x33fed5];return _0x47efef;}function normalizeSkillTarget(_0x42817f){return(_0x42817f||DEFAULT_SKILL_TARGET)['trim']()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x4d8f78,_0x587731){const _0x3ffe11=a43_0x5ad475;if(existsSync(_0x4d8f78[_0x3ffe11(0x170)])){const _0x1d4056=lstatSync(_0x4d8f78[_0x3ffe11(0x170)]);if(!_0x1d4056[_0x3ffe11(0x15a)]()||_0x1d4056[_0x3ffe11(0x172)]())throw CliErrors[_0x3ffe11(0x15e)](_0x3ffe11(0x176)+_0x4d8f78[_0x3ffe11(0x170)]);if(!_0x587731)throw CliErrors['validation'](_0x3ffe11(0x16c)+_0x4d8f78[_0x3ffe11(0x170)],'Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.');}for(const _0x11f674 of _0x4d8f78[_0x3ffe11(0x16b)]['files']){const _0x219cc6=resolve(_0x4d8f78['skillDir'],_0x11f674['path']),_0x5a7b9b=dirname(_0x219cc6);mkdirSync(_0x5a7b9b,{'recursive':!![]});if(existsSync(_0x219cc6)&&lstatSync(_0x219cc6)[_0x3ffe11(0x172)]())throw CliErrors[_0x3ffe11(0x15e)](_0x3ffe11(0x165)+_0x219cc6);writeFileSync(_0x219cc6,_0x11f674['content'],_0x3ffe11(0x15b));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a44_0x3627fe=a44_0x52f5;function a44_0x23e7(){const _0x23eee5=['company','Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','skill','\x20company\x20Skill(s).','removed','skillCode','accessKey','8fnuFuI','Installed\x20','length','67499UHcMev','action','includes','force','91940UyEgrC','trim','../../../skills/runtime-skill-sync.js','authRequired','\x20personal\x20and\x20','push','unchanged','8TCtNsv','71716GgfZvT','created','8945gQoGUH','642324duRtty','scope','envName','2004BbMyCU','4763549iFExGj','Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','583xHZknv','str','personal','skipped','3451212zWxoEA','../../../core/api-client.js','version','updated','write','bool','map','filter','appCode'];a44_0x23e7=function(){return _0x23eee5;};return a44_0x23e7();}function a44_0x52f5(_0x32b6e5,_0x2a632f){_0x32b6e5=_0x32b6e5-0x129;const _0x23e790=a44_0x23e7();let _0x52f59a=_0x23e790[_0x32b6e5];return _0x52f59a;}(function(_0x3f56a4,_0x2e620e){const _0x5de350=a44_0x52f5,_0x458c57=_0x3f56a4();while(!![]){try{const _0x4ba2e3=-parseInt(_0x5de350(0x149))/0x1*(-parseInt(_0x5de350(0x154))/0x2)+-parseInt(_0x5de350(0x12c))/0x3+parseInt(_0x5de350(0x129))/0x4+parseInt(_0x5de350(0x12b))/0x5*(parseInt(_0x5de350(0x12f))/0x6)+parseInt(_0x5de350(0x130))/0x7*(parseInt(_0x5de350(0x146))/0x8)+-parseInt(_0x5de350(0x136))/0x9+parseInt(_0x5de350(0x14d))/0xa*(-parseInt(_0x5de350(0x132))/0xb);if(_0x4ba2e3===_0x2e620e)break;else _0x458c57['push'](_0x458c57['shift']());}catch(_0x5ee957){_0x458c57['push'](_0x458c57['shift']());}}}(a44_0x23e7,0x7574c));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,FORCE_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';import{summarizeRuntimeSkill}from'../summary.js';export const installCommand={'service':a44_0x3627fe(0x141),'command':'install','description':a44_0x3627fe(0x140),'risk':a44_0x3627fe(0x13a),'requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG],async 'execute'(_0x5d96a0){return syncRuntimeSkills(_0x5d96a0);}};async function syncRuntimeSkills(_0x12c52e){const _0x2b604c=a44_0x3627fe,{downloadRuntimeSkillPackage:_0x573d10,listRuntimeSkills:_0x1e9919}=await import(_0x2b604c(0x137)),{linkEffectiveRuntimeSkills:_0x32fef8,materializeRuntimeSkill:_0x43c3e4,pruneStaleRuntimeSkillCache:_0x372941,pruneStaleRuntimeSkillLinks:_0x542895}=await import(_0x2b604c(0x14f)),_0x485a1a=_0x12c52e['str']('code'),_0x4dce60=normalizeSyncScopes(_0x12c52e[_0x2b604c(0x133)](_0x2b604c(0x12d))),_0x50aec5=_0x12c52e[_0x2b604c(0x12e)]??'production',_0x1e022e=_0x12c52e[_0x2b604c(0x145)],_0x5f5025=_0x12c52e[_0x2b604c(0x13b)](_0x2b604c(0x14c));if(!_0x1e022e)throw CliErrors[_0x2b604c(0x150)](_0x2b604c(0x131));const _0x52f68a=await Promise['all'](_0x4dce60[_0x2b604c(0x13c)](_0x1446e7=>_0x1e9919({'appCode':_0x12c52e['appCode'],'scope':_0x1446e7,'code':_0x485a1a['trim']()||undefined}))),_0x1a41b4=_0x4dce60[_0x2b604c(0x14b)](_0x2b604c(0x134))?_0x52f68a['flatMap']((_0x2a9e03,_0xc621ea)=>_0x4dce60[_0xc621ea]==='personal'?_0x2a9e03['personal']:[]):[],_0x45f2d2=_0x4dce60[_0x2b604c(0x14b)](_0x2b604c(0x13f))?_0x52f68a['flatMap']((_0x3fffe9,_0x52daf5)=>_0x4dce60[_0x52daf5]===_0x2b604c(0x13f)?_0x3fffe9[_0x2b604c(0x13f)]:[]):[],_0x5e7e37=new Set([..._0x1a41b4[_0x2b604c(0x13c)](_0x3939ca=>_0x3939ca[_0x2b604c(0x144)]?.[_0x2b604c(0x14e)]())[_0x2b604c(0x13d)](_0x4b3a0a=>Boolean(_0x4b3a0a)),..._0x45f2d2['map'](_0x4a0e37=>_0x4a0e37['skillCode']?.[_0x2b604c(0x14e)]())['filter'](_0x4897dd=>Boolean(_0x4897dd))]),_0x5ee996=_0x485a1a[_0x2b604c(0x14e)]()?[_0x485a1a[_0x2b604c(0x14e)]()]:undefined,_0x1fc66f=_0x4dce60[_0x2b604c(0x148)]===0x2&&_0x4dce60[_0x2b604c(0x14b)]('personal')&&_0x4dce60['includes'](_0x2b604c(0x13f)),_0x1bc33e=_0x1fc66f?_0x542895(_0x12c52e[_0x2b604c(0x13e)],_0x5e7e37,{},_0x5ee996):[],_0x597457=_0x372941({'env':_0x50aec5,'accessKey':_0x1e022e,'appCode':_0x12c52e[_0x2b604c(0x13e)],'activeSkillCodes':_0x5e7e37,'pruneSkillCodes':_0x5ee996,'scopes':_0x4dce60}),_0x3f9e91=[];for(const _0x317376 of _0x1a41b4){_0x3f9e91[_0x2b604c(0x152)](_0x43c3e4(_0x317376,'personal',{'env':_0x50aec5,'accessKey':_0x1e022e,'appCode':_0x12c52e['appCode'],'force':_0x5f5025,'packageBytes':await downloadSkillPackage(_0x317376,'personal',_0x12c52e[_0x2b604c(0x13e)],_0x573d10)}));}for(const _0x1e6c84 of _0x45f2d2){_0x3f9e91[_0x2b604c(0x152)](_0x43c3e4(_0x1e6c84,_0x2b604c(0x13f),{'env':_0x50aec5,'accessKey':_0x1e022e,'appCode':_0x12c52e[_0x2b604c(0x13e)],'force':_0x5f5025,'packageBytes':await downloadSkillPackage(_0x1e6c84,_0x2b604c(0x13f),_0x12c52e[_0x2b604c(0x13e)],_0x573d10)}));}const _0x311f8b=_0x32fef8(_0x3f9e91,_0x12c52e['appCode']),_0x338f93=countLinkActions(_0x311f8b);return{'ok':!![],'data':{'appCode':_0x12c52e[_0x2b604c(0x13e)],'personal':_0x1a41b4[_0x2b604c(0x148)],'company':_0x45f2d2['length'],'materialized':_0x3f9e91[_0x2b604c(0x148)],'links':{'total':_0x311f8b[_0x2b604c(0x148)],'created':_0x338f93[_0x2b604c(0x12a)]??0x0,'updated':_0x338f93[_0x2b604c(0x139)]??0x0,'unchanged':_0x338f93[_0x2b604c(0x153)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x1bc33e[_0x2b604c(0x13d)](_0x5f0fe9=>_0x5f0fe9[_0x2b604c(0x14a)]===_0x2b604c(0x143))['length'],'cacheDirs':_0x597457[_0x2b604c(0x13d)](_0x34d40a=>_0x34d40a[_0x2b604c(0x14a)]==='removed')[_0x2b604c(0x148)],'skipped':[..._0x1bc33e,..._0x597457][_0x2b604c(0x13d)](_0x24b7a2=>_0x24b7a2[_0x2b604c(0x14a)]===_0x2b604c(0x135))[_0x2b604c(0x148)]},'skills':{'personal':_0x1a41b4[_0x2b604c(0x13c)](summarizeRuntimeSkill),'company':_0x45f2d2[_0x2b604c(0x13c)](summarizeRuntimeSkill)}},'message':_0x2b604c(0x147)+_0x1a41b4[_0x2b604c(0x148)]+_0x2b604c(0x151)+_0x45f2d2[_0x2b604c(0x148)]+_0x2b604c(0x142)};}async function downloadSkillPackage(_0x2ad2b5,_0x44d131,_0x263bdf,_0x3f1533){const _0x239777=a44_0x3627fe,_0x51d169=_0x2ad2b5[_0x239777(0x138)]?.['trim']();return _0x51d169?_0x3f1533(_0x44d131,_0x2ad2b5['skillCode'],_0x263bdf,_0x51d169):_0x3f1533(_0x44d131,_0x2ad2b5[_0x239777(0x144)],_0x263bdf);}function countLinkActions(_0x2f6776){return _0x2f6776['reduce']((_0x3ce3ce,_0x27456e)=>{const _0xde2293=a44_0x52f5;return _0x3ce3ce[_0x27456e[_0xde2293(0x14a)]]=(_0x3ce3ce[_0x27456e[_0xde2293(0x14a)]]??0x0)+0x1,_0x3ce3ce;},{});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x550a89=a45_0x4a6b;(function(_0x2ec67b,_0x10faf2){const _0x19167e=a45_0x4a6b,_0x5d7461=_0x2ec67b();while(!![]){try{const _0x3273c6=parseInt(_0x19167e(0x10e))/0x1*(-parseInt(_0x19167e(0x102))/0x2)+parseInt(_0x19167e(0xfe))/0x3*(parseInt(_0x19167e(0x118))/0x4)+-parseInt(_0x19167e(0x104))/0x5*(-parseInt(_0x19167e(0x112))/0x6)+parseInt(_0x19167e(0x101))/0x7+-parseInt(_0x19167e(0x10d))/0x8*(parseInt(_0x19167e(0x110))/0x9)+parseInt(_0x19167e(0x10b))/0xa+parseInt(_0x19167e(0x113))/0xb*(parseInt(_0x19167e(0x114))/0xc);if(_0x3273c6===_0x10faf2)break;else _0x5d7461['push'](_0x5d7461['shift']());}catch(_0x2c2254){_0x5d7461['push'](_0x5d7461['shift']());}}}(a45_0x2bb7,0x93bf4));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG}from'../flags.js';import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';function a45_0x2bb7(){const _0x3e02a5=['str','company','remote','list','production','7402140IXMfPX','personal','200dplYZD','717687pzYzWX','local','226926WGFXQf','scope','6NUeLXi','16313tnBNOj','6696kYfJZH','Listed\x20','../../../core/api-client.js','filter','8VZsoki','trim','length','read','\x20local\x20Skill(s).','appCode','../../../skills/runtime-skill-sync.js','180069AzJgnO','map','envName','976269UCgKrh','2sAZFQo','bool','629840jgXhrZ','accessKey'];a45_0x2bb7=function(){return _0x3e02a5;};return a45_0x2bb7();}export const listCommand={'service':'skill','command':a45_0x550a89(0x109),'description':'List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','risk':a45_0x550a89(0x11b),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG],async 'execute'(_0x4f59f9){const _0x433bba=a45_0x550a89,_0x15787c=_0x4f59f9[_0x433bba(0x106)]('code'),_0x1e53cb=normalizeListScope(_0x4f59f9[_0x433bba(0x106)]('scope'));if(_0x4f59f9[_0x433bba(0x103)](_0x433bba(0x10f))){const _0x413c2c=_0x4f59f9[_0x433bba(0x105)];if(!_0x413c2c)throw CliErrors['authRequired']();const {listLocalRuntimeSkills:_0x4c164f}=await import(_0x433bba(0x11e)),_0xd2f57d=_0x4c164f({'env':_0x4f59f9[_0x433bba(0x100)]??_0x433bba(0x10a),'accessKey':_0x413c2c,'appCode':_0x4f59f9[_0x433bba(0x11d)],'scopes':listScopeToRuntimeScopes(_0x1e53cb),'code':_0x15787c[_0x433bba(0x119)]()||undefined}),_0x3fa5b1=groupLocalRuntimeSkills(_0xd2f57d);return{'ok':!![],'data':{'appCode':_0x4f59f9[_0x433bba(0x11d)],'source':_0x433bba(0x10f),'scope':_0x1e53cb,'total':_0xd2f57d[_0x433bba(0x11a)],'personal':_0x3fa5b1[_0x433bba(0x10c)]['length'],'company':_0x3fa5b1[_0x433bba(0x107)]['length'],'items':_0xd2f57d[_0x433bba(0xff)](summarizeLocalRuntimeSkill),'skills':{'personal':_0x3fa5b1[_0x433bba(0x10c)][_0x433bba(0xff)](summarizeLocalRuntimeSkill),'company':_0x3fa5b1['company'][_0x433bba(0xff)](summarizeLocalRuntimeSkill)}},'message':_0x433bba(0x115)+_0xd2f57d[_0x433bba(0x11a)]+_0x433bba(0x11c)};}const {listRuntimeSkills:_0x5ea24c}=await import(_0x433bba(0x116)),_0x409ae9=await _0x5ea24c({'appCode':_0x4f59f9[_0x433bba(0x11d)],'scope':listScopeToRemoteScope(_0x1e53cb),'code':_0x15787c[_0x433bba(0x119)]()||undefined}),_0x3b3641=shouldListScope(_0x1e53cb,'personal')?_0x409ae9[_0x433bba(0x10c)]??[]:[],_0x222b9d=shouldListScope(_0x1e53cb,_0x433bba(0x107))?_0x409ae9[_0x433bba(0x107)]??[]:[],_0x4e570f=[..._0x3b3641,..._0x222b9d];return{'ok':!![],'data':{'appCode':_0x4f59f9[_0x433bba(0x11d)],'source':_0x433bba(0x108),'scope':_0x1e53cb,'total':_0x4e570f[_0x433bba(0x11a)],'personal':_0x3b3641[_0x433bba(0x11a)],'company':_0x222b9d['length'],'items':_0x4e570f[_0x433bba(0xff)](summarizeRuntimeSkill),'skills':{'personal':_0x3b3641[_0x433bba(0xff)](summarizeRuntimeSkill),'company':_0x222b9d[_0x433bba(0xff)](summarizeRuntimeSkill)}},'message':_0x433bba(0x115)+_0x4e570f[_0x433bba(0x11a)]+'\x20remote\x20Skill(s).'};}};function a45_0x4a6b(_0x3109db,_0x4fc922){_0x3109db=_0x3109db-0xfe;const _0x2bb79c=a45_0x2bb7();let _0x4a6bd2=_0x2bb79c[_0x3109db];return _0x4a6bd2;}function groupLocalRuntimeSkills(_0x343781){const _0x279f95=a45_0x550a89;return{'personal':_0x343781[_0x279f95(0x117)](_0x1b094f=>_0x1b094f['scope']===_0x279f95(0x10c)),'company':_0x343781['filter'](_0x350729=>_0x350729[_0x279f95(0x111)]==='company'),'builtin':_0x343781[_0x279f95(0x117)](_0x1b4995=>_0x1b4995[_0x279f95(0x111)]==='builtin')};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x4e6bd3=a46_0x9584;function a46_0x9584(_0x25f280,_0x96270c){_0x25f280=_0x25f280-0x13a;const _0x447dba=a46_0x447d();let _0x95848=_0x447dba[_0x25f280];return _0x95848;}(function(_0x590e20,_0x3f52b3){const _0x44c6d4=a46_0x9584,_0x36283e=_0x590e20();while(!![]){try{const _0x539395=parseInt(_0x44c6d4(0x13b))/0x1+parseInt(_0x44c6d4(0x142))/0x2+-parseInt(_0x44c6d4(0x140))/0x3+-parseInt(_0x44c6d4(0x13a))/0x4+-parseInt(_0x44c6d4(0x13f))/0x5+-parseInt(_0x44c6d4(0x143))/0x6+parseInt(_0x44c6d4(0x13e))/0x7;if(_0x539395===_0x3f52b3)break;else _0x36283e['push'](_0x36283e['shift']());}catch(_0x352133){_0x36283e['push'](_0x36283e['shift']());}}}(a46_0x447d,0x8eed1));import{CONFIRM_WARNINGS_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';function a46_0x447d(){const _0x3998f3=['437572EGwrKS','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20scope\x20or\x20submit\x20company\x20scope\x20for\x20review','push','18238143vgkpyA','1160860fLKtyE','3164256jkJZiH','write','261862dvjfle','906126fNuQcn','skill','4602328uHLYke'];a46_0x447d=function(){return _0x3998f3;};return a46_0x447d();}import{skillPushDryRun,skillPushExecute}from'../push-execute.js';export const pushCommand={'service':a46_0x4e6bd3(0x144),'command':a46_0x4e6bd3(0x13d),'description':a46_0x4e6bd3(0x13c),'risk':a46_0x4e6bd3(0x141),'flags':[DIR_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x2a5f17=a47_0x58c4;function a47_0x1864(){const _0x14b698=['errors','106797kUfOwH','Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','27035ICkzGl','410XSwjZK','strict','read','18PWuFrA','730384yFZZdJ','warnings','52gNDPYw','50280RypIfU','validate','type','413083WTeecF','482075jRJDzY','427oFVOpK','dir','5232321VJbJIq','bool'];a47_0x1864=function(){return _0x14b698;};return a47_0x1864();}(function(_0x1ccf87,_0x5c5239){const _0x5495c4=a47_0x58c4,_0x41fdce=_0x1ccf87();while(!![]){try{const _0xb37031=-parseInt(_0x5495c4(0x195))/0x1+-parseInt(_0x5495c4(0x18f))/0x2+-parseInt(_0x5495c4(0x188))/0x3*(parseInt(_0x5495c4(0x191))/0x4)+-parseInt(_0x5495c4(0x18a))/0x5*(-parseInt(_0x5495c4(0x18e))/0x6)+-parseInt(_0x5495c4(0x197))/0x7*(-parseInt(_0x5495c4(0x192))/0x8)+-parseInt(_0x5495c4(0x185))/0x9+parseInt(_0x5495c4(0x18b))/0xa*(parseInt(_0x5495c4(0x196))/0xb);if(_0xb37031===_0x5c5239)break;else _0x41fdce['push'](_0x41fdce['shift']());}catch(_0x2c354d){_0x41fdce['push'](_0x41fdce['shift']());}}}(a47_0x1864,0x5b4f0));import{DIR_FLAG,STRICT_FLAG}from'../flags.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';function a47_0x58c4(_0x4b0da0,_0x12348b){_0x4b0da0=_0x4b0da0-0x184;const _0x186454=a47_0x1864();let _0x58c406=_0x186454[_0x4b0da0];return _0x58c406;}export const validateCommand={'service':'skill','command':a47_0x2a5f17(0x193),'description':a47_0x2a5f17(0x189),'risk':a47_0x2a5f17(0x18d),'requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x475a5f){const _0x22f4d7=a47_0x2a5f17,_0x1fe439=_0x475a5f[_0x22f4d7(0x186)](_0x22f4d7(0x18c)),_0x4f316d=validateSkillDirectory(_0x475a5f['str'](_0x22f4d7(0x184)),{'strict':_0x1fe439});return throwIfSkillValidationFailed(_0x4f316d,_0x1fe439),{'ok':!![],'data':{'dir':_0x4f316d['dir'],'type':_0x4f316d[_0x22f4d7(0x194)],'errors':_0x4f316d[_0x22f4d7(0x187)],'warnings':_0x4f316d[_0x22f4d7(0x190)]},'message':'Skill\x20validation\x20passed.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a48_0xff5ccf=a48_0x2272;(function(_0x15d591,_0x3e92b4){const _0x359866=a48_0x2272,_0x76082f=_0x15d591();while(!![]){try{const _0x1ac549=parseInt(_0x359866(0x145))/0x1*(-parseInt(_0x359866(0x15d))/0x2)+-parseInt(_0x359866(0x156))/0x3*(parseInt(_0x359866(0x146))/0x4)+parseInt(_0x359866(0x153))/0x5*(parseInt(_0x359866(0x15c))/0x6)+parseInt(_0x359866(0x160))/0x7+parseInt(_0x359866(0x142))/0x8*(parseInt(_0x359866(0x14b))/0x9)+parseInt(_0x359866(0x163))/0xa+-parseInt(_0x359866(0x14f))/0xb;if(_0x1ac549===_0x3e92b4)break;else _0x76082f['push'](_0x76082f['shift']());}catch(_0x21dcd9){_0x76082f['push'](_0x76082f['shift']());}}}(a48_0x4347,0x44cf4));import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':a48_0xff5ccf(0x147),'type':'string','description':a48_0xff5ccf(0x14c)};function a48_0x2272(_0x49959d,_0x565a7d){_0x49959d=_0x49959d-0x142;const _0x434728=a48_0x4347();let _0x22729d=_0x434728[_0x49959d];return _0x22729d;}export const SCOPE_FLAG={'name':a48_0xff5ccf(0x154),'type':a48_0xff5ccf(0x149),'description':'Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','enum':[a48_0xff5ccf(0x15a),'personal',a48_0xff5ccf(0x15b)]};export const PUSH_SCOPE_FLAG={'name':a48_0xff5ccf(0x154),'type':a48_0xff5ccf(0x149),'description':a48_0xff5ccf(0x14e),'default':a48_0xff5ccf(0x15e),'enum':['personal',a48_0xff5ccf(0x15b)]};export const LIST_SCOPE_FLAG={'name':a48_0xff5ccf(0x154),'type':'string','description':'Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','enum':[a48_0xff5ccf(0x15a),a48_0xff5ccf(0x15e),a48_0xff5ccf(0x15b)]};export const LOCAL_FLAG={'name':a48_0xff5ccf(0x152),'type':'boolean','description':'Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists'};export const DIR_FLAG={'name':a48_0xff5ccf(0x143),'type':a48_0xff5ccf(0x149),'required':!![],'description':a48_0xff5ccf(0x151)};export const CREATE_NAME_FLAG={'name':a48_0xff5ccf(0x155),'type':a48_0xff5ccf(0x149),'required':!![],'description':a48_0xff5ccf(0x148),'pattern':{'regex':SKILL_NAME_PATTERN,'description':'lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens'}};export const TYPE_FLAG={'name':'type','type':'string','description':a48_0xff5ccf(0x162),'default':a48_0xff5ccf(0x144),'enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':a48_0xff5ccf(0x14a),'type':a48_0xff5ccf(0x149),'description':a48_0xff5ccf(0x164),'default':DEFAULT_SKILL_TARGET};export const FORCE_FLAG={'name':a48_0xff5ccf(0x161),'type':a48_0xff5ccf(0x158),'description':a48_0xff5ccf(0x157)};export const CONFIRM_WARNINGS_FLAG={'name':a48_0xff5ccf(0x15f),'type':'boolean','description':a48_0xff5ccf(0x159)};function a48_0x4347(){const _0x3ab831=['name','33vCClBf','Overwrite\x20generated\x20or\x20CLI-managed\x20Skill\x20files\x20when\x20the\x20target\x20already\x20exists','boolean','Confirm\x20reviewed\x20personal\x20or\x20company\x20Skill\x20publish\x20warnings','all','company','133572DxQJaR','835940TXYFcn','personal','confirm-warnings','2189229Qyzqai','force','Skill\x20template\x20type','4508310AwCphO','Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','32pnoNgn','dir','write','1JHzPJo','3208sMilwK','code','Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','string','target','566469voaPVc','Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code','strict','Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review','7781642WsuGly','Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled','Local\x20Skill\x20directory\x20containing\x20SKILL.md','local','90vkEvfJ','scope'];a48_0x4347=function(){return _0x3ab831;};return a48_0x4347();}export const STRICT_FLAG={'name':a48_0xff5ccf(0x14d),'type':'boolean','description':a48_0xff5ccf(0x150)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1137bd,_0x14381f){const _0x4e0aa7=a49_0x4579,_0x32669c=_0x1137bd();while(!![]){try{const _0x305f1b=-parseInt(_0x4e0aa7(0xb9))/0x1+parseInt(_0x4e0aa7(0xb3))/0x2+parseInt(_0x4e0aa7(0xb7))/0x3+parseInt(_0x4e0aa7(0xb5))/0x4+-parseInt(_0x4e0aa7(0xb2))/0x5+-parseInt(_0x4e0aa7(0xb6))/0x6+parseInt(_0x4e0aa7(0xb4))/0x7*(parseInt(_0x4e0aa7(0xb8))/0x8);if(_0x305f1b===_0x14381f)break;else _0x32669c['push'](_0x32669c['shift']());}catch(_0x1e6222){_0x32669c['push'](_0x32669c['shift']());}}}(a49_0x3a52,0xf3821));import{createCommand}from'./commands/create.js';import{installCommand}from'./commands/install.js';import{listCommand}from'./commands/list.js';function a49_0x4579(_0x4d7467,_0x49c483){_0x4d7467=_0x4d7467-0xb2;const _0x3a529d=a49_0x3a52();let _0x45795b=_0x3a529d[_0x4d7467];return _0x45795b;}function a49_0x3a52(){const _0x1867f2=['3913152NNxqpZ','2927514NqrkXn','16UyPSju','1550048TwGVyG','5347910bBSOAj','1401176mhtOJK','4026463HjDLWi','5769548AYlOSS'];a49_0x3a52=function(){return _0x1867f2;};return a49_0x3a52();}import{pushCommand}from'./commands/push.js';import{validateCommand}from'./commands/validate.js';export const skillDefinitions=[installCommand,createCommand,validateCommand,listCommand,pushCommand];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x518abe,_0x5355f0){var _0x422847=a50_0xefee,_0x913da1=_0x518abe();while(!![]){try{var _0x2f1c85=-parseInt(_0x422847(0x80))/0x1+parseInt(_0x422847(0x8b))/0x2*(-parseInt(_0x422847(0x87))/0x3)+-parseInt(_0x422847(0x85))/0x4*(-parseInt(_0x422847(0x8e))/0x5)+parseInt(_0x422847(0x86))/0x6+parseInt(_0x422847(0x8f))/0x7*(-parseInt(_0x422847(0x7f))/0x8)+-parseInt(_0x422847(0x88))/0x9*(parseInt(_0x422847(0x8a))/0xa)+parseInt(_0x422847(0x7e))/0xb*(parseInt(_0x422847(0x81))/0xc);if(_0x2f1c85===_0x5355f0)break;else _0x913da1['push'](_0x913da1['shift']());}catch(_0x1625c1){_0x913da1['push'](_0x913da1['shift']());}}}(a50_0x30ea,0x67650));function a50_0xefee(_0x490cbf,_0x37e3c4){_0x490cbf=_0x490cbf-0x7e;var _0x30ea8b=a50_0x30ea();var _0xefeef9=_0x30ea8b[_0x490cbf];return _0xefeef9;}export function isPackageBackedManifest(_0x213724){var _0x217f74=a50_0xefee;return!!_0x213724&&typeof _0x213724===_0x217f74(0x8d)&&!Array[_0x217f74(0x89)](_0x213724)&&typeof _0x213724[_0x217f74(0x82)]==='string'&&_0x213724[_0x217f74(0x82)]['length']>0x0&&Array[_0x217f74(0x89)](_0x213724[_0x217f74(0x83)]);}export function isMultiFileManifest(_0x550a10){var _0x2beb6a=a50_0xefee;return!!_0x550a10&&typeof _0x550a10===_0x2beb6a(0x8d)&&!Array[_0x2beb6a(0x89)](_0x550a10)&&Array[_0x2beb6a(0x89)](_0x550a10['files'])&&_0x550a10['files']['some'](_0x1448b4=>_0x1448b4[_0x2beb6a(0x8c)]!==_0x2beb6a(0x84));}function a50_0x30ea(){var _0x1e7244=['2650776XDccRJ','581739gRkdut','1737063dgRmDD','isArray','10CqCqpL','2fUnHYD','path','object','560985IcMdvW','7672bidCgh','269566YnwToy','4112QuhIlC','122973ziIxBa','132qbWkjI','ossPath','files','SKILL.md','28inUxFk'];a50_0x30ea=function(){return _0x1e7244;};return a50_0x30ea();}
|