@lovrabet/lovrabet-cli 2.1.20 → 2.1.21-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 -1
- 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/raw-flags.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.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.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/install-target.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(_0x353f28,_0x3922b9){const _0x114181=a39_0x3957,_0x29c09a=_0x353f28();while(!![]){try{const _0x95b4e5=parseInt(_0x114181(0x188))/0x1*(-parseInt(_0x114181(0x183))/0x2)+parseInt(_0x114181(0x177))/0x3+-parseInt(_0x114181(0x1a0))/0x4+parseInt(_0x114181(0x178))/0x5+parseInt(_0x114181(0x172))/0x6*(-parseInt(_0x114181(0x186))/0x7)+-parseInt(_0x114181(0x179))/0x8+parseInt(_0x114181(0x19e))/0x9;if(_0x95b4e5===_0x3922b9)break;else _0x29c09a['push'](_0x29c09a['shift']());}catch(_0x3a57bd){_0x29c09a['push'](_0x29c09a['shift']());}}}(a39_0x4a1d,0xc425e));import{compileServiceTreeCommand,matchServiceTreeCommand}from'@lovrabet/cli-framework';function a39_0x4a1d(){const _0x2537df=['Unsupported\x20service\x20target\x20kind:\x20','sqlCode','\x20\x20\x20\x20datatable:\x20','username','kind','source','target','boolean','args','appCode','enum','cliPath','appRef','number','datatable','rawFlags','fullPath','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','userName','\x20\x20\x20\x20sqlCode:\x20','tenantCode','context.','name','padEnd','required','filter','length','some','join','\x20requires\x20target.sqlCode.','\x20\x20SERVICE\x20TREE\x20TARGET','env','map','appBindings','data','mapTo','appcode','scriptName','operator','string','\x20\x20\x20\x20kind:\x20\x20\x20\x20','Cannot\x20resolve\x20datatable\x20\x22','\x20completed\x20in\x20','remainingArgs','Unknown\x20appRef\x20\x22','app','51372McgILY','slice','now','datasetCode','\x20\x20\x20\x20command:\x20','318039cjbwKl','3451575RKkaVB','3225968nUvujw','ctx.','description','trim','\x20service\x20detail\x20--service\x20','risk','Run\x20service\x20command\x20','params','bffId','flatMap','8WiPRVJ','startsWith','tree','266qUmlSD','default','88897wZBeNM','\x20\x20\x20\x20datasetCode:\x20','userId','cliName','validation','nickName','\x22\x20in\x20service\x20command\x20','entries','Service\x20command\x20','dbtableConfig','fromEntries','Commands:','code','\x20\x20[','find','\x20\x20\x20\x20','type','flags','json','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','read','push','17555409uwWnPw','employeeId','3437268eADacK','\x20<command>\x20[flags]','\x20\x20MAP\x20TO','command','\x20requires\x20target.functionName.','service','commands'];a39_0x4a1d=function(){return _0x2537df;};return a39_0x4a1d();}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(_0x26ab39,_0x5927b2){const _0x52b7d4=a39_0x3957,_0x543fbd=listLocalServiceTrees();let _0x52dc3a;for(const _0x42b67f of _0x543fbd){const _0x119e30=matchServiceTreeCommand(_0x42b67f,_0x26ab39);if(!_0x119e30)continue;(!_0x52dc3a||_0x119e30[_0x52b7d4(0x1a3)][_0x52b7d4(0x154)][_0x52b7d4(0x15e)]>_0x52dc3a[_0x52b7d4(0x1a3)]['fullPath'][_0x52b7d4(0x15e)])&&(_0x52dc3a={'tree':_0x42b67f,'command':_0x119e30['command'],'remainingArgs':_0x119e30['remainingArgs']});}if(!_0x52dc3a)return undefined;const _0x1e07ce={..._0x5927b2};return applyAppBinding(_0x52dc3a[_0x52b7d4(0x185)],_0x52dc3a['command'],_0x1e07ce),{'definition':buildDynamicCommandDefinition(_0x52dc3a['tree'],_0x52dc3a[_0x52b7d4(0x1a3)]),'args':_0x52dc3a[_0x52b7d4(0x16f)],'flags':_0x1e07ce,'tree':_0x52dc3a[_0x52b7d4(0x185)],'command':_0x52dc3a[_0x52b7d4(0x1a3)]};}export function generateDynamicServiceHelp(_0x25d562){const _0x5d9669=a39_0x3957,_0x15dfde=listLocalServiceTrees()[_0x5d9669(0x196)](_0x364182=>_0x364182['service'][_0x5d9669(0x194)]===_0x25d562);if(!_0x15dfde)return undefined;const _0xca2f42=[CLI_BIN_NAME+'\x20'+_0x25d562+_0x5d9669(0x1a1),'',_0x15dfde[_0x5d9669(0x1a5)]['name']||_0x25d562,_0x15dfde[_0x5d9669(0x1a5)]['description']?'\x20\x20'+_0x15dfde['service']['description']:'','',_0x5d9669(0x193),..._0x15dfde[_0x5d9669(0x1a6)][_0x5d9669(0x164)](_0x4335cb=>{const _0x1a70ec=_0x5d9669,_0x569c38=_0x4335cb['fullPath'][_0x1a70ec(0x173)](0x1)[_0x1a70ec(0x160)]('\x20'),_0x1b6cae=_0x4335cb[_0x1a70ec(0x17e)]===_0x1a70ec(0x19c)?'':'\x20['+_0x4335cb[_0x1a70ec(0x17e)]+']';return'\x20\x20'+_0x569c38[_0x1a70ec(0x15b)](0x18)+'\x20'+(_0x4335cb[_0x1a70ec(0x17b)]||'')+_0x1b6cae;}),'','Use\x20`'+CLI_BIN_NAME+_0x5d9669(0x17d)+_0x25d562+'`\x20to\x20inspect\x20the\x20manifest.'][_0x5d9669(0x15d)](Boolean);return _0xca2f42[_0x5d9669(0x160)]('\x0a');}export function listDynamicServiceEntries(){const _0x5768d7=a39_0x3957;return listLocalServices()[_0x5768d7(0x164)](_0x20097e=>{const _0x70116b=_0x5768d7,_0x30d952=_0x20097e['normalizedManifest'];return{'service':_0x30d952[_0x70116b(0x1a5)]['code'],'label':_0x30d952['service'][_0x70116b(0x15a)]||_0x30d952[_0x70116b(0x1a5)][_0x70116b(0x194)],'commands':_0x30d952[_0x70116b(0x1a6)][_0x70116b(0x164)](_0x590a93=>({'command':dynamicCommandName(_0x590a93),'description':_0x590a93[_0x70116b(0x17b)]||_0x70116b(0x17f)+_0x590a93['cliPath'],'tag':riskTag(_0x590a93[_0x70116b(0x17e)])}))};});}export function getDynamicServiceEntry(_0x2deb9c){const _0x4f2234=a39_0x3957;return listDynamicServiceEntries()[_0x4f2234(0x196)](_0x2a1c43=>_0x2a1c43['service']===_0x2deb9c);}export function listDynamicServiceDefinitions(_0x44c674){const _0x9ab95a=a39_0x3957;return listLocalServiceTrees()[_0x9ab95a(0x15d)](_0x3d1e6d=>!_0x44c674||_0x3d1e6d[_0x9ab95a(0x1a5)]['code']===_0x44c674)[_0x9ab95a(0x182)](_0x300646=>_0x300646[_0x9ab95a(0x1a6)]['map'](_0x31f443=>buildDynamicCommandDefinition(_0x300646,_0x31f443)));}export function getDynamicServiceDefinitions(_0x26fac8){const _0x316fdc=a39_0x3957,_0x3480eb=listDynamicServiceDefinitions(_0x26fac8);return _0x3480eb[_0x316fdc(0x15e)]>0x0?_0x3480eb:undefined;}export function findDynamicServiceDefinition(_0x47b6f5,_0x4b3f36){const _0x3e7929=a39_0x3957;return listDynamicServiceDefinitions(_0x47b6f5)[_0x3e7929(0x196)](_0x5ce984=>_0x5ce984['command']===_0x4b3f36);}export function buildDynamicCommandDefinition(_0x3893f4,_0x2e3612){const _0x540f3b=a39_0x3957;return{'service':_0x3893f4[_0x540f3b(0x1a5)][_0x540f3b(0x194)],'command':dynamicCommandName(_0x2e3612),'description':_0x2e3612['description']||_0x540f3b(0x17f)+_0x2e3612[_0x540f3b(0x14f)],'risk':_0x2e3612['risk'],'requiresAuth':!![],'requiresAppCode':!![],'args':_0x2e3612[_0x540f3b(0x14c)][_0x540f3b(0x164)](_0x1f730d=>({'name':_0x1f730d[_0x540f3b(0x15a)],'description':_0x1f730d[_0x540f3b(0x17b)]||_0x1f730d['name'],'required':_0x1f730d[_0x540f3b(0x15c)]})),'flags':_0x2e3612[_0x540f3b(0x199)][_0x540f3b(0x164)](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x2e3612),async 'dryRun'(_0x1f20f5){const _0x49c3bf=_0x540f3b,_0x514b82=await compilePlan(_0x2e3612,_0x1f20f5);return{'method':'SERVICE_TREE','url':_0x2e3612[_0x49c3bf(0x14f)],'body':{'target':targetPreview(_0x514b82),'params':_0x514b82[_0x49c3bf(0x180)]},'description':'Preview\x20dynamic\x20service\x20command:\x20'+_0x2e3612['cliPath']};},async 'execute'(_0x53eccf){const _0x268382=_0x540f3b,_0x1244f3=await compilePlan(_0x2e3612,_0x53eccf),_0x43ae23=Date['now'](),_0x2e2416=await executePlan(_0x1244f3,_0x2e3612,_0x53eccf),_0x5b2388=Date[_0x268382(0x174)]()-_0x43ae23;return{'ok':!![],'data':{'service':_0x3893f4[_0x268382(0x1a5)],'command':_0x2e3612[_0x268382(0x14f)],'target':targetPreview(_0x1244f3),'result':_0x2e2416,'elapsed':_0x5b2388},'message':'Service\x20command\x20'+_0x2e3612['cliPath']+_0x268382(0x16e)+_0x5b2388+'ms'};}};}function dynamicCommandName(_0x3257ad){const _0x55d804=a39_0x3957;return _0x3257ad['fullPath'][_0x55d804(0x173)](0x1)[_0x55d804(0x160)]('\x20');}function riskTag(_0x1bfced){const _0x337df8=a39_0x3957;return _0x1bfced===_0x337df8(0x19c)?'':_0x337df8(0x195)+_0x1bfced+']';}function flagToCommandFlag(_0x487667){const _0x2d2fb1=a39_0x3957;return{'name':_0x487667[_0x2d2fb1(0x18b)],'type':_0x487667[_0x2d2fb1(0x198)]===_0x2d2fb1(0x19a)?_0x2d2fb1(0x16b):_0x487667[_0x2d2fb1(0x198)],'description':_0x487667[_0x2d2fb1(0x17b)]||_0x487667[_0x2d2fb1(0x15a)],'required':_0x487667[_0x2d2fb1(0x15c)],'default':isPrimitiveFlagDefault(_0x487667[_0x2d2fb1(0x187)])?_0x487667[_0x2d2fb1(0x187)]:undefined,'enum':_0x487667[_0x2d2fb1(0x14e)]};}async function compilePlan(_0x381284,_0x23f3b9){const _0x17fa5b=a39_0x3957;return compileServiceTreeCommand(_0x381284,{'flags':_0x23f3b9[_0x17fa5b(0x153)],'args':_0x23f3b9[_0x17fa5b(0x14c)],'context':await buildServiceContext(_0x381284,_0x23f3b9)});}async function buildServiceContext(_0x239547,_0x32343d){const _0x227508=a39_0x3957,_0x1fd001={'appCode':_0x32343d[_0x227508(0x14d)],'env':_0x32343d['envName'],'envName':_0x32343d['envName']};if(!usesRuntimeContext(_0x239547))return _0x1fd001;const _0x48cafb=await getLoginUserInfo(),_0x20cd68=pickFirst(_0x48cafb[_0x227508(0x18a)],_0x48cafb['id']);return{..._0x1fd001,'user':_0x48cafb,'userId':_0x20cd68,'id':_0x48cafb['id'],'username':pickFirst(_0x48cafb[_0x227508(0x147)],_0x48cafb['userName'],_0x48cafb['loginName']),'userName':_0x48cafb[_0x227508(0x156)],'nickname':pickFirst(_0x48cafb['nickname'],_0x48cafb[_0x227508(0x18d)]),'nickName':_0x48cafb[_0x227508(0x18d)],'tenantCode':_0x48cafb[_0x227508(0x158)],'employeeId':_0x48cafb[_0x227508(0x19f)]};}function usesRuntimeContext(_0x16bf70){const _0xcba3ff=a39_0x3957;return _0x16bf70[_0xcba3ff(0x167)][_0xcba3ff(0x15f)](_0x5b5dc4=>typeof _0x5b5dc4[_0xcba3ff(0x149)]===_0xcba3ff(0x16b)&&(_0x5b5dc4['source']['startsWith'](_0xcba3ff(0x159))||_0x5b5dc4[_0xcba3ff(0x149)][_0xcba3ff(0x184)](_0xcba3ff(0x17a))));}function pickFirst(..._0x4686d4){return _0x4686d4['find'](_0x23c2af=>_0x23c2af!==undefined&&_0x23c2af!==null);}async function executePlan(_0x193402,_0x585a8a,_0x493e5b){const _0x519408=a39_0x3957;if(_0x193402['kind']===_0x519408(0x166)){const _0x3a3885=await resolveDatasetCode(_0x193402,_0x585a8a,_0x493e5b);return executeData(_0x3a3885,_0x193402[_0x519408(0x1a3)],_0x193402[_0x519408(0x180)]);}if(_0x193402[_0x519408(0x148)]==='sql'){if(!_0x193402[_0x519408(0x1a8)])throw CliErrors[_0x519408(0x18c)](_0x519408(0x190)+_0x585a8a[_0x519408(0x14f)]+_0x519408(0x161));return executeSdkSql(_0x193402[_0x519408(0x1a8)],normalizeScalarParams(_0x193402['params']));}if(_0x193402[_0x519408(0x148)]==='bff'){const _0xeeda0a=_0x193402[_0x519408(0x169)]||_0x193402['bffCode']||(_0x193402[_0x519408(0x181)]==null?'':String(_0x193402[_0x519408(0x181)]));if(!_0xeeda0a)throw CliErrors['validation'](_0x519408(0x190)+_0x585a8a[_0x519408(0x14f)]+_0x519408(0x1a4));return executeSdkBff(_0xeeda0a,_0x193402[_0x519408(0x180)]);}throw CliErrors['validation'](_0x519408(0x1a7)+_0x193402['kind']);}function a39_0x3957(_0x4bb6ca,_0x121008){_0x4bb6ca=_0x4bb6ca-0x147;const _0x4a1daf=a39_0x4a1d();let _0x39576a=_0x4a1daf[_0x4bb6ca];return _0x39576a;}async function resolveDatasetCode(_0x5d24c8,_0x169406,_0x369dbb){const _0x3020ac=a39_0x3957;if(_0x5d24c8['datasetCode'])return _0x5d24c8[_0x3020ac(0x175)];if(!_0x5d24c8[_0x3020ac(0x152)])throw CliErrors[_0x3020ac(0x18c)]('Service\x20command\x20'+_0x169406[_0x3020ac(0x14f)]+_0x3020ac(0x19b));const _0x2b02ec=await listDatasets(_0x369dbb[_0x3020ac(0x14d)]),_0x545142=_0x2b02ec[_0x3020ac(0x196)](_0x437693=>_0x437693[_0x3020ac(0x191)]?.['tableName']===_0x5d24c8[_0x3020ac(0x152)]);if(!_0x545142?.[_0x3020ac(0x194)])throw CliErrors[_0x3020ac(0x18c)](_0x3020ac(0x16d)+_0x5d24c8[_0x3020ac(0x152)]+'\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20'+_0x369dbb[_0x3020ac(0x14d)]+'.',_0x3020ac(0x155));return _0x545142['code'];}function applyAppBinding(_0x2d7d92,_0x429e45,_0x5b3f5f){const _0x291bca=a39_0x3957,_0x28ee25=_0x429e45[_0x291bca(0x14a)][_0x291bca(0x150)];if(!_0x28ee25)return;const _0x2313ee=_0x2d7d92[_0x291bca(0x165)][_0x28ee25];if(!_0x2313ee)throw CliErrors['validation'](_0x291bca(0x170)+_0x28ee25+_0x291bca(0x18e)+_0x429e45[_0x291bca(0x14f)]+'.','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.');const _0x2bf4d1=_0x2313ee[_0x291bca(0x168)]||_0x2313ee['appCode'];_0x2bf4d1&&!hasText(_0x5b3f5f[_0x291bca(0x168)])&&(_0x5b3f5f[_0x291bca(0x168)]=_0x2bf4d1),_0x2313ee[_0x291bca(0x171)]&&!hasText(_0x5b3f5f[_0x291bca(0x171)])&&!hasText(_0x5b3f5f[_0x291bca(0x168)])&&(_0x5b3f5f[_0x291bca(0x171)]=_0x2313ee['app']),_0x2313ee[_0x291bca(0x163)]&&!hasText(_0x5b3f5f['env'])&&(_0x5b3f5f[_0x291bca(0x163)]=_0x2313ee[_0x291bca(0x163)]);}function renderDynamicCommandHelp(_0x5ace7d){const _0x2def17=a39_0x3957,_0xe274bf=[_0x2def17(0x162),_0x2def17(0x16c)+_0x5ace7d[_0x2def17(0x14a)][_0x2def17(0x148)],_0x2def17(0x176)+_0x5ace7d[_0x2def17(0x14a)]['command']];if(_0x5ace7d[_0x2def17(0x14a)][_0x2def17(0x175)])_0xe274bf['push'](_0x2def17(0x189)+_0x5ace7d[_0x2def17(0x14a)][_0x2def17(0x175)]);if(_0x5ace7d[_0x2def17(0x14a)][_0x2def17(0x152)])_0xe274bf[_0x2def17(0x19d)](_0x2def17(0x1a9)+_0x5ace7d[_0x2def17(0x14a)][_0x2def17(0x152)]);if(_0x5ace7d[_0x2def17(0x14a)][_0x2def17(0x1a8)])_0xe274bf[_0x2def17(0x19d)](_0x2def17(0x157)+_0x5ace7d[_0x2def17(0x14a)][_0x2def17(0x1a8)]);if(_0x5ace7d['target'][_0x2def17(0x169)])_0xe274bf['push']('\x20\x20\x20\x20functionName:\x20'+_0x5ace7d['target'][_0x2def17(0x169)]);if(_0x5ace7d[_0x2def17(0x167)][_0x2def17(0x15e)]>0x0){_0xe274bf['push']('',_0x2def17(0x1a2));for(const _0x28bab9 of _0x5ace7d[_0x2def17(0x167)]){_0xe274bf['push'](_0x2def17(0x197)+(_0x28bab9[_0x2def17(0x149)]||'const')+'\x20->\x20'+_0x28bab9['target']+(_0x28bab9[_0x2def17(0x16a)]?'.'+_0x28bab9[_0x2def17(0x16a)]:''));}}return _0xe274bf['join']('\x0a');}function targetPreview(_0x56074a){const _0x1a6922=a39_0x3957;return{'kind':_0x56074a[_0x1a6922(0x148)],'command':_0x56074a[_0x1a6922(0x1a3)],'appRef':_0x56074a['appRef'],'datasetCode':_0x56074a[_0x1a6922(0x175)],'datatable':_0x56074a[_0x1a6922(0x152)],'sqlCode':_0x56074a[_0x1a6922(0x1a8)],'bffCode':_0x56074a['bffCode'],'bffId':_0x56074a[_0x1a6922(0x181)],'functionName':_0x56074a[_0x1a6922(0x169)]};}function normalizeScalarParams(_0x124db7){const _0xb5f7f1=a39_0x3957;return Object[_0xb5f7f1(0x192)](Object[_0xb5f7f1(0x18f)](_0x124db7)[_0xb5f7f1(0x15d)](([,_0x2240d0])=>typeof _0x2240d0===_0xb5f7f1(0x16b)||typeof _0x2240d0===_0xb5f7f1(0x151)));}function hasText(_0x2612f5){const _0x4467f5=a39_0x3957;return typeof _0x2612f5==='string'&&_0x2612f5[_0x4467f5(0x17c)]()[_0x4467f5(0x15e)]>0x0;}function isPrimitiveFlagDefault(_0xf146cf){const _0x4bb533=a39_0x3957;return _0xf146cf===undefined||typeof _0xf146cf==='string'||typeof _0xf146cf===_0x4bb533(0x151)||typeof _0xf146cf===_0x4bb533(0x14b);}
|
|
1
|
+
(function(_0x286592,_0xeba760){const _0x54b091=a39_0x3752,_0x5c5fe0=_0x286592();while(!![]){try{const _0x2ee004=-parseInt(_0x54b091(0x11d))/0x1*(parseInt(_0x54b091(0x135))/0x2)+-parseInt(_0x54b091(0x140))/0x3*(parseInt(_0x54b091(0x141))/0x4)+parseInt(_0x54b091(0x127))/0x5*(parseInt(_0x54b091(0x14c))/0x6)+parseInt(_0x54b091(0x12f))/0x7*(-parseInt(_0x54b091(0x116))/0x8)+-parseInt(_0x54b091(0x10c))/0x9+parseInt(_0x54b091(0x133))/0xa+parseInt(_0x54b091(0x11a))/0xb;if(_0x2ee004===_0xeba760)break;else _0x5c5fe0['push'](_0x5c5fe0['shift']());}catch(_0x12dcfa){_0x5c5fe0['push'](_0x5c5fe0['shift']());}}}(a39_0x49d8,0x2637f));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(_0x261fca,_0x13a2d5){const _0x380146=a39_0x3752,_0x3bf393=listLocalServiceTrees();let _0x316313;for(const _0x79662 of _0x3bf393){const _0x24c1ea=matchServiceTreeCommand(_0x79662,_0x261fca);if(!_0x24c1ea)continue;(!_0x316313||_0x24c1ea['command'][_0x380146(0x134)][_0x380146(0x10b)]>_0x316313[_0x380146(0x168)][_0x380146(0x134)]['length'])&&(_0x316313={'tree':_0x79662,'command':_0x24c1ea[_0x380146(0x168)],'remainingArgs':_0x24c1ea[_0x380146(0x16c)]});}if(!_0x316313)return undefined;const _0x4f97ac={..._0x13a2d5};return applyAppBinding(_0x316313[_0x380146(0x121)],_0x316313['command'],_0x4f97ac),{'definition':buildDynamicCommandDefinition(_0x316313[_0x380146(0x121)],_0x316313[_0x380146(0x168)]),'args':_0x316313[_0x380146(0x16c)],'flags':_0x4f97ac,'tree':_0x316313[_0x380146(0x121)],'command':_0x316313['command']};}export function generateDynamicServiceHelp(_0x3d08fd){const _0x333f26=a39_0x3752,_0x2561f7=listLocalServiceTrees()['find'](_0x4cc791=>_0x4cc791[_0x333f26(0x112)][_0x333f26(0x131)]===_0x3d08fd);if(!_0x2561f7)return undefined;const _0x47ad5f=[CLI_BIN_NAME+'\x20'+_0x3d08fd+_0x333f26(0x15b),'',_0x2561f7['service']['name']||_0x3d08fd,_0x2561f7['service'][_0x333f26(0x156)]?'\x20\x20'+_0x2561f7[_0x333f26(0x112)][_0x333f26(0x156)]:'','',_0x333f26(0x124),..._0x2561f7['commands'][_0x333f26(0x158)](_0x10665c=>{const _0x418a1b=_0x333f26,_0x34f3d4=_0x10665c['fullPath'][_0x418a1b(0x11c)](0x1)[_0x418a1b(0x14f)]('\x20'),_0x42c01c=_0x10665c['risk']===_0x418a1b(0x167)?'':'\x20['+_0x10665c[_0x418a1b(0x16a)]+']';return'\x20\x20'+_0x34f3d4[_0x418a1b(0x12e)](0x18)+'\x20'+(_0x10665c[_0x418a1b(0x156)]||'')+_0x42c01c;}),'','Use\x20`'+CLI_BIN_NAME+'\x20service\x20detail\x20--service\x20'+_0x3d08fd+'`\x20to\x20inspect\x20the\x20manifest.']['filter'](Boolean);return _0x47ad5f[_0x333f26(0x14f)]('\x0a');}function a39_0x3752(_0x1b463a,_0x5e4156){_0x1b463a=_0x1b463a-0x10a;const _0x49d8f1=a39_0x49d8();let _0x3752b7=_0x49d8f1[_0x1b463a];return _0x3752b7;}export function listDynamicServiceEntries(){const _0x184ec9=a39_0x3752;return listLocalServices()[_0x184ec9(0x158)](_0x15f9a1=>{const _0x111b95=_0x184ec9,_0x2c4eb1=_0x15f9a1['normalizedManifest'];return{'service':_0x2c4eb1[_0x111b95(0x112)][_0x111b95(0x131)],'label':_0x2c4eb1[_0x111b95(0x112)][_0x111b95(0x169)]||_0x2c4eb1[_0x111b95(0x112)][_0x111b95(0x131)],'commands':_0x2c4eb1[_0x111b95(0x119)][_0x111b95(0x158)](_0x160e4d=>({'command':dynamicCommandName(_0x160e4d),'description':_0x160e4d[_0x111b95(0x156)]||'Run\x20service\x20command\x20'+_0x160e4d[_0x111b95(0x16d)],'tag':riskTag(_0x160e4d[_0x111b95(0x16a)])}))};});}export function getDynamicServiceEntry(_0x4c1da0){const _0x1b3307=a39_0x3752;return listDynamicServiceEntries()[_0x1b3307(0x125)](_0x5edac6=>_0x5edac6[_0x1b3307(0x112)]===_0x4c1da0);}export function listDynamicServiceDefinitions(_0x532d50){const _0x1eec0f=a39_0x3752;return listLocalServiceTrees()[_0x1eec0f(0x153)](_0x128afb=>!_0x532d50||_0x128afb[_0x1eec0f(0x112)][_0x1eec0f(0x131)]===_0x532d50)[_0x1eec0f(0x11f)](_0x911950=>_0x911950[_0x1eec0f(0x119)][_0x1eec0f(0x158)](_0x3d0dd1=>buildDynamicCommandDefinition(_0x911950,_0x3d0dd1)));}export function getDynamicServiceDefinitions(_0x760e72){const _0x32844e=a39_0x3752,_0x37fa92=listDynamicServiceDefinitions(_0x760e72);return _0x37fa92[_0x32844e(0x10b)]>0x0?_0x37fa92:undefined;}export function findDynamicServiceDefinition(_0x2c8c02,_0x5aa072){const _0x5e381d=a39_0x3752;return listDynamicServiceDefinitions(_0x2c8c02)['find'](_0x29677f=>_0x29677f[_0x5e381d(0x168)]===_0x5aa072);}export function buildDynamicCommandDefinition(_0x1329f5,_0x482270){const _0x368e3e=a39_0x3752;return{'service':_0x1329f5[_0x368e3e(0x112)][_0x368e3e(0x131)],'command':dynamicCommandName(_0x482270),'description':_0x482270[_0x368e3e(0x156)]||_0x368e3e(0x13b)+_0x482270[_0x368e3e(0x16d)],'risk':_0x482270[_0x368e3e(0x16a)],'requiresAuth':!![],'requiresAppCode':!![],'args':_0x482270[_0x368e3e(0x130)][_0x368e3e(0x158)](_0x3ce28a=>({'name':_0x3ce28a[_0x368e3e(0x169)],'description':_0x3ce28a[_0x368e3e(0x156)]||_0x3ce28a[_0x368e3e(0x169)],'required':_0x3ce28a[_0x368e3e(0x126)]})),'flags':_0x482270['flags']['map'](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x482270),async 'dryRun'(_0x2d21bc){const _0x1215ed=_0x368e3e,_0x2cc504=await compilePlan(_0x482270,_0x2d21bc);return{'method':_0x1215ed(0x15a),'url':_0x482270['cliPath'],'body':{'target':targetPreview(_0x2cc504),'params':_0x2cc504['params']},'description':_0x1215ed(0x10e)+_0x482270['cliPath']};},async 'execute'(_0x505ccd){const _0x358291=_0x368e3e,_0x47f117=await compilePlan(_0x482270,_0x505ccd),_0x4e8197=Date[_0x358291(0x11e)](),_0x33f9f6=await executePlan(_0x47f117,_0x482270,_0x505ccd),_0x3dafd9=Date[_0x358291(0x11e)]()-_0x4e8197;return{'ok':!![],'data':{'service':_0x1329f5[_0x358291(0x112)],'command':_0x482270[_0x358291(0x16d)],'target':targetPreview(_0x47f117),'result':_0x33f9f6,'elapsed':_0x3dafd9},'message':_0x358291(0x161)+_0x482270[_0x358291(0x16d)]+_0x358291(0x13d)+_0x3dafd9+'ms'};}};}function dynamicCommandName(_0x51efee){const _0x20b815=a39_0x3752;return _0x51efee[_0x20b815(0x134)][_0x20b815(0x11c)](0x1)['join']('\x20');}function riskTag(_0x37a361){const _0x52513c=a39_0x3752;return _0x37a361===_0x52513c(0x167)?'':_0x52513c(0x122)+_0x37a361+']';}function a39_0x49d8(){const _0x15ff29=['entries','employeeId','appcode','bffId','Service\x20command\x20','nickName','operator','appCode','number','userId','read','command','name','risk','tenantCode','remainingArgs','cliPath','target','\x20\x20\x20\x20','tableName','datatable','length','326178OdZBhl','\x20\x20\x20\x20datasetCode:\x20','Preview\x20dynamic\x20service\x20command:\x20','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20','kind','service','validation','sqlCode','boolean','2309656nJfqbn','default','bffCode','commands','8609271JJMMul','rawFlags','slice','7empagw','now','flatMap','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','tree','\x20\x20[','\x20\x20SERVICE\x20TREE\x20TARGET','Commands:','find','required','5XeGddf','fromEntries','nickname','context.','\x20\x20\x20\x20command:\x20','appBindings','env','padEnd','7afPtSI','args','code','appRef','933520BYXIMu','fullPath','69266rdzcKc','\x20\x20\x20\x20kind:\x20\x20\x20\x20','sql','\x22\x20in\x20service\x20command\x20','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','source','Run\x20service\x20command\x20','Unsupported\x20service\x20target\x20kind:\x20','\x20completed\x20in\x20','enum','envName','798081EMXlpc','4crGPXF','\x20\x20\x20\x20datatable:\x20','dbtableConfig','\x20\x20\x20\x20sqlCode:\x20','datasetCode','some','cliName','data','\x20\x20MAP\x20TO','loginName','app','683622gyjVYc','push','mapTo','join','\x20->\x20','scriptName','params','filter','type','string','description','ctx.','map','startsWith','SERVICE_TREE','\x20<command>\x20[flags]','userName'];a39_0x49d8=function(){return _0x15ff29;};return a39_0x49d8();}function flagToCommandFlag(_0x56de9d){const _0x5dca28=a39_0x3752;return{'name':_0x56de9d[_0x5dca28(0x147)],'type':_0x56de9d[_0x5dca28(0x154)]==='json'?_0x5dca28(0x155):_0x56de9d['type'],'description':_0x56de9d[_0x5dca28(0x156)]||_0x56de9d[_0x5dca28(0x169)],'required':_0x56de9d[_0x5dca28(0x126)],'default':isPrimitiveFlagDefault(_0x56de9d[_0x5dca28(0x117)])?_0x56de9d[_0x5dca28(0x117)]:undefined,'enum':_0x56de9d[_0x5dca28(0x13e)]};}async function compilePlan(_0xda057d,_0x5db3a1){const _0x32c33e=a39_0x3752;return compileServiceTreeCommand(_0xda057d,{'flags':_0x5db3a1[_0x32c33e(0x11b)],'args':_0x5db3a1['args'],'context':await buildServiceContext(_0xda057d,_0x5db3a1)});}async function buildServiceContext(_0x463f6f,_0x2c0b2b){const _0x284d39=a39_0x3752,_0x38646a={'appCode':_0x2c0b2b[_0x284d39(0x164)],'env':_0x2c0b2b[_0x284d39(0x13f)],'envName':_0x2c0b2b[_0x284d39(0x13f)]};if(!usesRuntimeContext(_0x463f6f))return _0x38646a;const _0x29962d=await getLoginUserInfo(),_0x1ce637=pickFirst(_0x29962d[_0x284d39(0x166)],_0x29962d['id']);return{..._0x38646a,'user':_0x29962d,'userId':_0x1ce637,'id':_0x29962d['id'],'username':pickFirst(_0x29962d['username'],_0x29962d['userName'],_0x29962d[_0x284d39(0x14a)]),'userName':_0x29962d[_0x284d39(0x15c)],'nickname':pickFirst(_0x29962d[_0x284d39(0x129)],_0x29962d[_0x284d39(0x162)]),'nickName':_0x29962d[_0x284d39(0x162)],'tenantCode':_0x29962d[_0x284d39(0x16b)],'employeeId':_0x29962d[_0x284d39(0x15e)]};}function usesRuntimeContext(_0x21b4cf){const _0x385fb5=a39_0x3752;return _0x21b4cf['mapTo'][_0x385fb5(0x146)](_0xabac84=>typeof _0xabac84[_0x385fb5(0x13a)]===_0x385fb5(0x155)&&(_0xabac84[_0x385fb5(0x13a)][_0x385fb5(0x159)](_0x385fb5(0x12a))||_0xabac84[_0x385fb5(0x13a)]['startsWith'](_0x385fb5(0x157))));}function pickFirst(..._0xd329f5){return _0xd329f5['find'](_0x33b00f=>_0x33b00f!==undefined&&_0x33b00f!==null);}async function executePlan(_0x3509da,_0x31ce4e,_0xc37256){const _0xd0f44d=a39_0x3752;if(_0x3509da[_0xd0f44d(0x111)]===_0xd0f44d(0x148)){const _0xdada42=await resolveDatasetCode(_0x3509da,_0x31ce4e,_0xc37256);return executeData(_0xdada42,_0x3509da['command'],_0x3509da[_0xd0f44d(0x152)]);}if(_0x3509da['kind']===_0xd0f44d(0x137)){if(!_0x3509da[_0xd0f44d(0x114)])throw CliErrors['validation'](_0xd0f44d(0x161)+_0x31ce4e[_0xd0f44d(0x16d)]+'\x20requires\x20target.sqlCode.');return executeSdkSql(_0x3509da[_0xd0f44d(0x114)],normalizeScalarParams(_0x3509da[_0xd0f44d(0x152)]));}if(_0x3509da[_0xd0f44d(0x111)]==='bff'){const _0x469837=_0x3509da['scriptName']||_0x3509da[_0xd0f44d(0x118)]||(_0x3509da['bffId']==null?'':String(_0x3509da[_0xd0f44d(0x160)]));if(!_0x469837)throw CliErrors['validation'](_0xd0f44d(0x161)+_0x31ce4e[_0xd0f44d(0x16d)]+'\x20requires\x20target.functionName.');return executeSdkBff(_0x469837,_0x3509da[_0xd0f44d(0x152)]);}throw CliErrors[_0xd0f44d(0x113)](_0xd0f44d(0x13c)+_0x3509da[_0xd0f44d(0x111)]);}async function resolveDatasetCode(_0x109e7b,_0x34dbb1,_0x71194a){const _0x290390=a39_0x3752;if(_0x109e7b[_0x290390(0x145)])return _0x109e7b['datasetCode'];if(!_0x109e7b[_0x290390(0x10a)])throw CliErrors[_0x290390(0x113)]('Service\x20command\x20'+_0x34dbb1[_0x290390(0x16d)]+_0x290390(0x120));const _0x131dac=await listDatasets(_0x71194a[_0x290390(0x164)]),_0x2cb410=_0x131dac[_0x290390(0x125)](_0x21eb92=>_0x21eb92[_0x290390(0x143)]?.[_0x290390(0x170)]===_0x109e7b[_0x290390(0x10a)]);if(!_0x2cb410?.[_0x290390(0x131)])throw CliErrors[_0x290390(0x113)]('Cannot\x20resolve\x20datatable\x20\x22'+_0x109e7b[_0x290390(0x10a)]+_0x290390(0x110)+_0x71194a[_0x290390(0x164)]+'.',_0x290390(0x139));return _0x2cb410[_0x290390(0x131)];}function applyAppBinding(_0x2b1f28,_0x1e86a9,_0x24bd9d){const _0x27c35d=a39_0x3752,_0x52f23d=_0x1e86a9[_0x27c35d(0x16e)][_0x27c35d(0x132)];if(!_0x52f23d)return;const _0x382e2c=_0x2b1f28[_0x27c35d(0x12c)][_0x52f23d];if(!_0x382e2c)throw CliErrors[_0x27c35d(0x113)]('Unknown\x20appRef\x20\x22'+_0x52f23d+_0x27c35d(0x138)+_0x1e86a9['cliPath']+'.',_0x27c35d(0x10f));const _0xd6d1b5=_0x382e2c['appcode']||_0x382e2c[_0x27c35d(0x164)];_0xd6d1b5&&!hasText(_0x24bd9d['appcode'])&&(_0x24bd9d[_0x27c35d(0x15f)]=_0xd6d1b5),_0x382e2c[_0x27c35d(0x14b)]&&!hasText(_0x24bd9d['app'])&&!hasText(_0x24bd9d[_0x27c35d(0x15f)])&&(_0x24bd9d['app']=_0x382e2c[_0x27c35d(0x14b)]),_0x382e2c[_0x27c35d(0x12d)]&&!hasText(_0x24bd9d[_0x27c35d(0x12d)])&&(_0x24bd9d[_0x27c35d(0x12d)]=_0x382e2c['env']);}function renderDynamicCommandHelp(_0x397568){const _0x57156a=a39_0x3752,_0x16a8e2=[_0x57156a(0x123),_0x57156a(0x136)+_0x397568['target']['kind'],_0x57156a(0x12b)+_0x397568['target'][_0x57156a(0x168)]];if(_0x397568[_0x57156a(0x16e)]['datasetCode'])_0x16a8e2[_0x57156a(0x14d)](_0x57156a(0x10d)+_0x397568[_0x57156a(0x16e)]['datasetCode']);if(_0x397568[_0x57156a(0x16e)][_0x57156a(0x10a)])_0x16a8e2[_0x57156a(0x14d)](_0x57156a(0x142)+_0x397568[_0x57156a(0x16e)][_0x57156a(0x10a)]);if(_0x397568['target']['sqlCode'])_0x16a8e2['push'](_0x57156a(0x144)+_0x397568[_0x57156a(0x16e)]['sqlCode']);if(_0x397568['target']['scriptName'])_0x16a8e2[_0x57156a(0x14d)]('\x20\x20\x20\x20functionName:\x20'+_0x397568[_0x57156a(0x16e)]['scriptName']);if(_0x397568[_0x57156a(0x14e)][_0x57156a(0x10b)]>0x0){_0x16a8e2[_0x57156a(0x14d)]('',_0x57156a(0x149));for(const _0x5bd37a of _0x397568[_0x57156a(0x14e)]){_0x16a8e2[_0x57156a(0x14d)](_0x57156a(0x16f)+(_0x5bd37a[_0x57156a(0x13a)]||'const')+_0x57156a(0x150)+_0x5bd37a[_0x57156a(0x16e)]+(_0x5bd37a[_0x57156a(0x163)]?'.'+_0x5bd37a[_0x57156a(0x163)]:''));}}return _0x16a8e2[_0x57156a(0x14f)]('\x0a');}function targetPreview(_0x5cadf6){const _0x38c8e2=a39_0x3752;return{'kind':_0x5cadf6[_0x38c8e2(0x111)],'command':_0x5cadf6['command'],'appRef':_0x5cadf6[_0x38c8e2(0x132)],'datasetCode':_0x5cadf6[_0x38c8e2(0x145)],'datatable':_0x5cadf6['datatable'],'sqlCode':_0x5cadf6[_0x38c8e2(0x114)],'bffCode':_0x5cadf6['bffCode'],'bffId':_0x5cadf6[_0x38c8e2(0x160)],'functionName':_0x5cadf6[_0x38c8e2(0x151)]};}function normalizeScalarParams(_0x1ea78c){const _0x3509f9=a39_0x3752;return Object[_0x3509f9(0x128)](Object[_0x3509f9(0x15d)](_0x1ea78c)[_0x3509f9(0x153)](([,_0x157fd5])=>typeof _0x157fd5==='string'||typeof _0x157fd5===_0x3509f9(0x165)));}function hasText(_0x46ad65){const _0x218b51=a39_0x3752;return typeof _0x46ad65==='string'&&_0x46ad65['trim']()[_0x218b51(0x10b)]>0x0;}function isPrimitiveFlagDefault(_0x56bb0d){const _0x5081e2=a39_0x3752;return _0x56bb0d===undefined||typeof _0x56bb0d==='string'||typeof _0x56bb0d===_0x5081e2(0x165)||typeof _0x56bb0d===_0x5081e2(0x115);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2f0975,_0x4c94f9){const _0x376ef8=a40_0x30a4,_0x9f412a=_0x2f0975();while(!![]){try{const _0x41f095=-parseInt(_0x376ef8(0x1bc))/0x1+parseInt(_0x376ef8(0x1c7))/0x2+parseInt(_0x376ef8(0x1c1))/0x3+-parseInt(_0x376ef8(0x1b4))/0x4+parseInt(_0x376ef8(0x1c3))/0x5+-parseInt(_0x376ef8(0x1b9))/0x6*(-parseInt(_0x376ef8(0x1ab))/0x7)+-parseInt(_0x376ef8(0x1af))/0x8*(-parseInt(_0x376ef8(0x1c2))/0x9);if(_0x41f095===_0x4c94f9)break;else _0x9f412a['push'](_0x9f412a['shift']());}catch(_0x245068){_0x9f412a['push'](_0x9f412a['shift']());}}}(a40_0x715b,0x73f3a));export function adaptServiceTreeManifestForLegacyFramework(_0x1d74a4){const _0x280a57=a40_0x30a4,_0xc5162f=cloneJsonValue(_0x1d74a4),_0x598500=[];if(!isObjectRecord(_0xc5162f))return{'manifest':_0xc5162f,'errors':_0x598500};return Array[_0x280a57(0x1c9)](_0xc5162f['commands'])&&_0xc5162f['commands'][_0x280a57(0x1ac)]((_0x25a3bc,_0x1a350e)=>{const _0x40d753=_0x280a57;if(!isObjectRecord(_0x25a3bc))return;adaptBffTarget(_0x25a3bc[_0x40d753(0x1b7)],_0x40d753(0x1b0)+_0x1a350e+'].target',_0x598500);}),adaptResources(_0xc5162f['resources'],'$.resources',_0x598500),{'manifest':_0xc5162f,'errors':_0x598500};}export function toPublicServiceTreeTarget(_0x26ea6d){const _0x3f1955=a40_0x30a4,{scriptName:_0x795c0f,..._0x230bf2}=_0x26ea6d;return typeof _0x795c0f===_0x3f1955(0x1b2)&&_0x795c0f[_0x3f1955(0x1c6)]()&&(_0x230bf2['functionName']=_0x795c0f),_0x230bf2;}export function toPublicNormalizedServiceTree(_0x2857ea){const _0x5b09c5=a40_0x30a4;return{..._0x2857ea,'commands':_0x2857ea[_0x5b09c5(0x1b6)][_0x5b09c5(0x1c5)](_0x341b7f=>({..._0x341b7f,'target':toPublicServiceTreeTarget(_0x341b7f['target'])}))};}function adaptResources(_0x56989c,_0x1630aa,_0x1a07b6){const _0x5d1382=a40_0x30a4;if(!isObjectRecord(_0x56989c))return;for(const [_0x41fa37,_0x31b2b1]of Object[_0x5d1382(0x1ca)](_0x56989c)){if(!isObjectRecord(_0x31b2b1))continue;const _0x5ab27f=_0x1630aa+'.'+_0x41fa37;if(isObjectRecord(_0x31b2b1['actions']))for(const [_0x1b04be,_0x4cc220]of Object['entries'](_0x31b2b1['actions'])){if(!isObjectRecord(_0x4cc220))continue;const _0x4dce5c=_0x5ab27f+_0x5d1382(0x1ae)+_0x1b04be,_0x1bc0dd=isObjectRecord(_0x4cc220['target'])&&_0x4cc220['target'][_0x5d1382(0x1b8)]===_0x5d1382(0x1bf);adaptBffTarget(_0x4cc220['target'],_0x4dce5c+_0x5d1382(0x1cf),_0x1a07b6),(_0x1bc0dd||isBffAction(_0x4cc220))&&adaptFunctionNameField(_0x4cc220,_0x4dce5c,_0x1a07b6);}adaptResources(_0x31b2b1[_0x5d1382(0x1c4)],_0x5ab27f+_0x5d1382(0x1ad),_0x1a07b6);}}function a40_0x30a4(_0x21631a,_0x34c876){_0x21631a=_0x21631a-0x1ab;const _0x715bd=a40_0x715b();let _0x30a4fa=_0x715bd[_0x21631a];return _0x30a4fa;}function adaptBffTarget(_0x51877a,_0x13ba66,_0x2f164c){const _0x228f1a=a40_0x30a4;if(!isObjectRecord(_0x51877a)||_0x51877a[_0x228f1a(0x1b8)]!=='bff')return;adaptFunctionNameField(_0x51877a,_0x13ba66,_0x2f164c);}function a40_0x715b(){const _0x404397=['.actions.','470608txEuTb','$.commands[','push','string','error','3505388FOdZWa','bff.exec','commands','target','kind','138PsCkPz','hasOwnProperty','.functionName','615476FaaVKg','scriptName','.scriptName','bff','functionName\x20must\x20be\x20a\x20non-empty\x20string.','2341152ZAjacU','9iPdsvH','1257100CCDcDm','resources','map','trim','624756TQQlqW','action','isArray','entries','functionName','Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.','object','prototype','.target','171577TfagNy','forEach','.resources'];a40_0x715b=function(){return _0x404397;};return a40_0x715b();}function adaptFunctionNameField(_0x3f2d92,_0x101f9a,_0x400b21){const _0x1408bb=a40_0x30a4;Object[_0x1408bb(0x1ce)][_0x1408bb(0x1ba)]['call'](_0x3f2d92,_0x1408bb(0x1bd))&&_0x400b21[_0x1408bb(0x1b1)]({'level':_0x1408bb(0x1b3),'path':_0x101f9a+_0x1408bb(0x1be),'message':_0x1408bb(0x1cc)});if(Object[_0x1408bb(0x1ce)][_0x1408bb(0x1ba)]['call'](_0x3f2d92,_0x1408bb(0x1cb))){if(typeof _0x3f2d92[_0x1408bb(0x1cb)]!==_0x1408bb(0x1b2)||!_0x3f2d92[_0x1408bb(0x1cb)]['trim']()){_0x400b21['push']({'level':_0x1408bb(0x1b3),'path':_0x101f9a+_0x1408bb(0x1bb),'message':_0x1408bb(0x1c0)}),delete _0x3f2d92['functionName'];return;}_0x3f2d92[_0x1408bb(0x1bd)]=_0x3f2d92[_0x1408bb(0x1cb)],delete _0x3f2d92[_0x1408bb(0x1cb)];}}function isBffAction(_0x1d9e95){const _0x1595cf=a40_0x30a4;return _0x1d9e95[_0x1595cf(0x1b8)]==='bff'||_0x1d9e95[_0x1595cf(0x1c8)]===_0x1595cf(0x1b5)||_0x1d9e95[_0x1595cf(0x1b7)]===_0x1595cf(0x1b5);}function cloneJsonValue(_0x3c0b8c){const _0x36b5=a40_0x30a4;if(Array[_0x36b5(0x1c9)](_0x3c0b8c))return _0x3c0b8c[_0x36b5(0x1c5)](_0x12fe09=>cloneJsonValue(_0x12fe09));if(isObjectRecord(_0x3c0b8c))return Object['fromEntries'](Object[_0x36b5(0x1ca)](_0x3c0b8c)[_0x36b5(0x1c5)](([_0x35e8d8,_0x5d54e1])=>[_0x35e8d8,cloneJsonValue(_0x5d54e1)]));return _0x3c0b8c;}function isObjectRecord(_0x41d71a){const _0x424101=a40_0x30a4;return Boolean(_0x41d71a)&&typeof _0x41d71a===_0x424101(0x1cd)&&!Array['isArray'](_0x41d71a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a41_0xe1491b=a41_0x443d;(function(_0x22b5f2,_0x29f32a){const _0xdb88b=a41_0x443d,_0x6abc07=_0x22b5f2();while(!![]){try{const _0x5e3043=parseInt(_0xdb88b(0xe5))/0x1+-parseInt(_0xdb88b(0xf6))/0x2*(-parseInt(_0xdb88b(0xe3))/0x3)+parseInt(_0xdb88b(0xc3))/0x4*(parseInt(_0xdb88b(0xdd))/0x5)+-parseInt(_0xdb88b(0xb9))/0x6+-parseInt(_0xdb88b(0xe0))/0x7*(parseInt(_0xdb88b(0xbb))/0x8)+parseInt(_0xdb88b(0xb3))/0x9*(parseInt(_0xdb88b(0xbd))/0xa)+parseInt(_0xdb88b(0xd7))/0xb*(parseInt(_0xdb88b(0xe6))/0xc);if(_0x5e3043===_0x29f32a)break;else _0x6abc07['push'](_0x6abc07['shift']());}catch(_0x5a7310){_0x6abc07['push'](_0x6abc07['shift']());}}}(a41_0x2ce2,0x7cb0f));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_0xe1491b(0xee),'type':a41_0xe1491b(0xf9),'required':!![],'description':a41_0xe1491b(0xf1)},SERVICE_FLAG={'name':a41_0xe1491b(0xdc),'type':a41_0xe1491b(0xf9),'required':!![],'description':a41_0xe1491b(0xe7),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a41_0xe1491b(0xef)}};function summarizeService(_0x11cdc4){const _0x474261=a41_0xe1491b;return{'serviceCode':_0x11cdc4[_0x474261(0xd5)],'name':_0x11cdc4[_0x474261(0xb5)][_0x474261(0xdc)][_0x474261(0xbf)],'version':_0x11cdc4['version'],'importedAt':_0x11cdc4[_0x474261(0xf8)],'source':_0x11cdc4[_0x474261(0xba)],'commandCount':_0x11cdc4[_0x474261(0xb5)]['commands'][_0x474261(0xdb)],'commands':_0x11cdc4[_0x474261(0xb5)][_0x474261(0xb2)][_0x474261(0xb4)](_0x19a8bb=>({'path':_0x19a8bb[_0x474261(0xbc)],'description':_0x19a8bb[_0x474261(0xd4)],'risk':_0x19a8bb[_0x474261(0xbe)],'target':toPublicServiceTreeTarget(_0x19a8bb[_0x474261(0xc1)]),'flags':_0x19a8bb[_0x474261(0xc8)][_0x474261(0xb4)](_0x2a30d8=>({'name':_0x2a30d8['name'],'cliName':_0x2a30d8[_0x474261(0xc7)],'type':_0x2a30d8[_0x474261(0xcb)],'required':_0x2a30d8[_0x474261(0xe2)]===!![]}))}))};}function summarizeLoadedManifest(_0x576c83){const _0x344f18=a41_0xe1491b;return{'service':_0x576c83[_0x344f18(0xb5)]?.[_0x344f18(0xdc)],'version':_0x576c83[_0x344f18(0xb5)]?.[_0x344f18(0xc0)],'commandCount':_0x576c83[_0x344f18(0xb5)]?.[_0x344f18(0xb2)][_0x344f18(0xdb)]??0x0,'commands':_0x576c83[_0x344f18(0xb5)]?.[_0x344f18(0xb2)]['map'](_0xb105ca=>({'path':_0xb105ca[_0x344f18(0xbc)],'risk':_0xb105ca['risk'],'target':toPublicServiceTreeTarget(_0xb105ca[_0x344f18(0xc1)])}))??[],'registryIndex':_0x576c83[_0x344f18(0xf5)],'registryServiceCode':_0x576c83[_0x344f18(0xd3)],'errors':_0x576c83[_0x344f18(0xca)]['errors'],'warnings':_0x576c83[_0x344f18(0xca)]['warnings']};}function a41_0x2ce2(){const _0x39484d=['hash','WRITE','1199958KoSDqm','source','7927176PtSfas','cliPath','20Lzogcs','risk','name','version','target','read','28OMJXTI','entry','Removed\x20service\x20','str','cliName','flags','import','report','type','serviceCount','reduce','entries','\x20service(s).','list','errors','Updated','registryServiceCode','description','serviceCode','warnings','99OnhfxS','kind','imported','write','length','service','326690pqaGux','manifests','registry','7oKKTUd','replaced','required','491826LKcqXQ','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','226450phANCQ','429924feeHrx','Local\x20service\x20code,\x20for\x20example\x20crm','manifest','validate','detail','filePath','registryPath','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','file','lower\x20kebab-case\x20service\x20code','updated','Service\x20Tree\x20manifest\x20file\x20path','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','Service\x20registry\x20validation\x20passed.','registryIndex','2zKfQlm','export','importedAt','string','\x20service\x20','Service\x20manifest\x20validation\x20passed.','remove','Export\x20a\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','commands','2391408pTbbGk','map','normalizedManifest','\x20service(s),\x20updated\x20'];a41_0x2ce2=function(){return _0x39484d;};return a41_0x2ce2();}function a41_0x443d(_0x35e461,_0x1e3a04){_0x35e461=_0x35e461-0xb2;const _0x2ce22a=a41_0x2ce2();let _0x443d18=_0x2ce22a[_0x35e461];return _0x443d18;}export const serviceDefinitions=[{'service':a41_0xe1491b(0xdc),'command':a41_0xe1491b(0xe9),'description':'Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','risk':a41_0xe1491b(0xc2),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x166a55){const _0x431802=a41_0xe1491b,_0x1164be=loadServiceManifestFromFile(_0x166a55['str'](_0x431802(0xee)));if(!_0x1164be[_0x431802(0xca)]['ok'])return{'ok':![],'data':{'file':_0x1164be[_0x431802(0xeb)],'hash':_0x1164be[_0x431802(0xb7)],'kind':_0x1164be[_0x431802(0xd8)],'serviceCount':_0x1164be[_0x431802(0xde)]['length'],'services':_0x1164be[_0x431802(0xde)][_0x431802(0xb4)](summarizeLoadedManifest),'errors':_0x1164be[_0x431802(0xca)][_0x431802(0xd1)],'warnings':_0x1164be['report'][_0x431802(0xd6)]},'message':formatValidationFailure(_0x1164be[_0x431802(0xca)])};if(_0x1164be['kind']===_0x431802(0xdf)||_0x1164be[_0x431802(0xde)][_0x431802(0xdb)]!==0x1)return{'ok':!![],'data':{'file':_0x1164be['filePath'],'hash':_0x1164be[_0x431802(0xb7)],'kind':_0x1164be['kind'],'serviceCount':_0x1164be[_0x431802(0xde)][_0x431802(0xdb)],'commandCount':_0x1164be[_0x431802(0xde)][_0x431802(0xcd)]((_0x107106,_0x1eefd5)=>_0x107106+(_0x1eefd5['normalizedManifest']?.[_0x431802(0xb2)][_0x431802(0xdb)]??0x0),0x0),'services':_0x1164be[_0x431802(0xde)]['map'](summarizeLoadedManifest),'warnings':_0x1164be[_0x431802(0xca)]['warnings']},'message':_0x431802(0xf4)};return{'ok':!![],'data':{'file':_0x1164be[_0x431802(0xeb)],'hash':_0x1164be[_0x431802(0xb7)],'kind':_0x1164be[_0x431802(0xd8)],'service':_0x1164be['normalizedManifest']?.['service'],'version':_0x1164be[_0x431802(0xb5)]?.['version'],'commandCount':_0x1164be[_0x431802(0xb5)]?.[_0x431802(0xb2)][_0x431802(0xdb)]??0x0,'commands':_0x1164be[_0x431802(0xb5)]?.[_0x431802(0xb2)][_0x431802(0xb4)](_0x58c634=>({'path':_0x58c634['cliPath'],'risk':_0x58c634['risk'],'target':toPublicServiceTreeTarget(_0x58c634['target'])})),'warnings':_0x1164be[_0x431802(0xca)]['warnings']},'message':_0x431802(0xfb)};}},{'service':a41_0xe1491b(0xdc),'command':a41_0xe1491b(0xc9),'description':a41_0xe1491b(0xed),'risk':a41_0xe1491b(0xda),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x4daa3b){const _0x43ac1a=a41_0xe1491b,_0x31ae28=loadServiceManifestFromFile(_0x4daa3b[_0x43ac1a(0xc6)](_0x43ac1a(0xee)));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'file':_0x31ae28[_0x43ac1a(0xeb)],'hash':_0x31ae28['hash'],'kind':_0x31ae28[_0x43ac1a(0xd8)],'ok':_0x31ae28[_0x43ac1a(0xca)]['ok'],'service':_0x31ae28[_0x43ac1a(0xb5)]?.[_0x43ac1a(0xdc)],'version':_0x31ae28[_0x43ac1a(0xb5)]?.[_0x43ac1a(0xc0)],'serviceCount':_0x31ae28[_0x43ac1a(0xde)][_0x43ac1a(0xdb)],'services':_0x31ae28[_0x43ac1a(0xde)]['map'](_0x32432b=>({'service':_0x32432b[_0x43ac1a(0xb5)]?.[_0x43ac1a(0xdc)],'version':_0x32432b[_0x43ac1a(0xb5)]?.[_0x43ac1a(0xc0)],'commandCount':_0x32432b['normalizedManifest']?.[_0x43ac1a(0xb2)]['length']??0x0,'errors':_0x32432b['report'][_0x43ac1a(0xd1)]})),'errors':_0x31ae28['report'][_0x43ac1a(0xd1)],'commandCount':_0x31ae28[_0x43ac1a(0xb5)]?.[_0x43ac1a(0xb2)][_0x43ac1a(0xdb)]??0x0},'description':_0x43ac1a(0xf3)};},async 'execute'(_0x3b7451){const _0x3c5a66=a41_0xe1491b,_0x162843=importServiceManifest(_0x3b7451[_0x3c5a66(0xc6)](_0x3c5a66(0xee)));if(_0x162843['entries'][_0x3c5a66(0xdb)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x162843[_0x3c5a66(0xec)],'imported':_0x162843[_0x3c5a66(0xd9)],'updated':_0x162843[_0x3c5a66(0xf0)],'serviceCount':_0x162843[_0x3c5a66(0xcc)],'services':_0x162843[_0x3c5a66(0xce)][_0x3c5a66(0xb4)](summarizeService)},'message':'Imported\x20'+_0x162843[_0x3c5a66(0xd9)]+_0x3c5a66(0xb6)+_0x162843['updated']+_0x3c5a66(0xcf)};return{'ok':!![],'data':{'registryPath':_0x162843[_0x3c5a66(0xec)],'replaced':_0x162843[_0x3c5a66(0xe1)],'imported':_0x162843['imported'],'updated':_0x162843[_0x3c5a66(0xf0)],'serviceCount':_0x162843[_0x3c5a66(0xcc)],'service':summarizeService(_0x162843[_0x3c5a66(0xc4)])},'message':(_0x162843[_0x3c5a66(0xe1)]?_0x3c5a66(0xd2):'Imported')+_0x3c5a66(0xfa)+_0x162843[_0x3c5a66(0xc4)][_0x3c5a66(0xd5)]+'.'};}},{'service':a41_0xe1491b(0xdc),'command':a41_0xe1491b(0xf7),'description':a41_0xe1491b(0xfd),'risk':a41_0xe1491b(0xda),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x42a52d){const _0x19c481=a41_0xe1491b,_0xcde861=getLocalServiceEntry(_0x42a52d[_0x19c481(0xc6)](_0x19c481(0xdc)));return{'method':_0x19c481(0xb8),'url':_0x42a52d[_0x19c481(0xc6)](_0x19c481(0xee)),'body':{'service':_0x42a52d['str'](_0x19c481(0xdc)),'found':Boolean(_0xcde861),'version':_0xcde861?.[_0x19c481(0xc0)],'source':_0xcde861?.['source']},'description':_0x19c481(0xe4)};},async 'execute'(_0x281131){const _0x5ead42=a41_0xe1491b,_0x203052=exportServiceManifest(_0x281131[_0x5ead42(0xc6)](_0x5ead42(0xdc)),_0x281131['str'](_0x5ead42(0xee)));return{'ok':!![],'data':{'registryPath':_0x203052[_0x5ead42(0xec)],'file':_0x203052[_0x5ead42(0xeb)],'service':summarizeService(_0x203052['entry'])},'message':'Exported\x20service\x20'+_0x203052[_0x5ead42(0xc4)][_0x5ead42(0xd5)]+'.'};}},{'service':a41_0xe1491b(0xdc),'command':a41_0xe1491b(0xd0),'description':a41_0xe1491b(0xf2),'risk':a41_0xe1491b(0xc2),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x12e372=a41_0xe1491b,_0x41bd10=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x41bd10[_0x12e372(0xdb)],'services':_0x41bd10[_0x12e372(0xb4)](summarizeService)}};}},{'service':'service','command':a41_0xe1491b(0xfc),'description':'Remove\x20a\x20local\x20Service\x20Tree\x20manifest\x20from\x20the\x20runtime\x20registry','risk':a41_0xe1491b(0xda),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x2d5a98){const _0x181516=a41_0xe1491b,_0x57e922=getLocalServiceEntry(_0x2d5a98[_0x181516(0xc6)](_0x181516(0xdc)));return{'method':_0x181516(0xb8),'url':getServiceRegistryPath(),'body':{'service':_0x2d5a98[_0x181516(0xc6)](_0x181516(0xdc)),'found':Boolean(_0x57e922),'version':_0x57e922?.[_0x181516(0xc0)],'source':_0x57e922?.[_0x181516(0xba)]},'description':'Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json'};},async 'execute'(_0x2f0ba3){const _0xf2a9ee=a41_0xe1491b,_0x3c0f1b=removeServiceManifest(_0x2f0ba3[_0xf2a9ee(0xc6)](_0xf2a9ee(0xdc)));return{'ok':!![],'data':{'registryPath':_0x3c0f1b[_0xf2a9ee(0xec)],'serviceCount':_0x3c0f1b['serviceCount'],'service':summarizeService(_0x3c0f1b[_0xf2a9ee(0xc4)])},'message':_0xf2a9ee(0xc5)+_0x3c0f1b[_0xf2a9ee(0xc4)]['serviceCode']+'.'};}},{'service':a41_0xe1491b(0xdc),'command':a41_0xe1491b(0xea),'description':'Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','risk':a41_0xe1491b(0xc2),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x1c6eb1){const _0x1d5ed3=a41_0xe1491b,_0x171c74=getLocalServiceEntry(_0x1c6eb1[_0x1d5ed3(0xc6)]('service'));if(!_0x171c74)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x1c6eb1[_0x1d5ed3(0xc6)]('service')},'message':'Local\x20service\x20not\x20found:\x20'+_0x1c6eb1[_0x1d5ed3(0xc6)](_0x1d5ed3(0xdc))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x171c74),'manifest':_0x171c74[_0x1d5ed3(0xe8)],'normalizedManifest':toPublicNormalizedServiceTree(_0x171c74[_0x1d5ed3(0xb5)])}};}}];
|
|
1
|
+
const a41_0x4427d9=a41_0x2fbb;(function(_0xec100d,_0x598ce6){const _0x543406=a41_0x2fbb,_0x4bdcef=_0xec100d();while(!![]){try{const _0x56fa04=-parseInt(_0x543406(0x157))/0x1+parseInt(_0x543406(0x188))/0x2+-parseInt(_0x543406(0x186))/0x3*(parseInt(_0x543406(0x17f))/0x4)+parseInt(_0x543406(0x172))/0x5+parseInt(_0x543406(0x183))/0x6+-parseInt(_0x543406(0x15a))/0x7+parseInt(_0x543406(0x16f))/0x8;if(_0x56fa04===_0x598ce6)break;else _0x4bdcef['push'](_0x4bdcef['shift']());}catch(_0x50a5a8){_0x4bdcef['push'](_0x4bdcef['shift']());}}}(a41_0x4eef,0x2fc5e));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';function a41_0x2fbb(_0x180e4b,_0x5c609c){_0x180e4b=_0x180e4b-0x148;const _0x4eef83=a41_0x4eef();let _0x2fbb1e=_0x4eef83[_0x180e4b];return _0x2fbb1e;}function a41_0x4eef(){const _0x1ac771=['Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','name','cliPath','serviceCode','Updated','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','Removed\x20service\x20','description','manifest','serviceCount','hash','Service\x20manifest\x20validation\x20passed.','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','target','report','commands','flags','\x20service(s),\x20updated\x20','3291072dTSrSY','service','detail','625405gKCICg','map','updated','file','entries','registryPath','replaced','length','Imported\x20','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','errors','manifests','Exported\x20service\x20','4LMSibi','registryServiceCode','list','\x20service(s).','924696SDDyNV','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','Local\x20service\x20code,\x20for\x20example\x20crm','753873cFnmer','write','341736QLyVTK','normalizedManifest','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','Local\x20service\x20not\x20found:\x20','required','Service\x20Tree\x20manifest\x20file\x20path','kind','str','registry','import','imported','registryIndex','Remove\x20a\x20local\x20Service\x20Tree\x20manifest\x20from\x20the\x20runtime\x20registry','\x20service\x20','WRITE','entry','read','risk','source','validate','string','280178pfszYe','reduce','version','940114BfXhhL','warnings','filePath'];a41_0x4eef=function(){return _0x1ac771;};return a41_0x4eef();}import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':a41_0x4427d9(0x175),'type':'string','required':!![],'description':a41_0x4427d9(0x18d)},SERVICE_FLAG={'name':a41_0x4427d9(0x170),'type':a41_0x4427d9(0x156),'required':!![],'description':a41_0x4427d9(0x185),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':'lower\x20kebab-case\x20service\x20code'}};function summarizeService(_0x5433f5){const _0x3d9374=a41_0x4427d9;return{'serviceCode':_0x5433f5[_0x3d9374(0x160)],'name':_0x5433f5[_0x3d9374(0x189)]['service'][_0x3d9374(0x15e)],'version':_0x5433f5[_0x3d9374(0x159)],'importedAt':_0x5433f5['importedAt'],'source':_0x5433f5[_0x3d9374(0x154)],'commandCount':_0x5433f5[_0x3d9374(0x189)][_0x3d9374(0x16c)][_0x3d9374(0x179)],'commands':_0x5433f5[_0x3d9374(0x189)][_0x3d9374(0x16c)][_0x3d9374(0x173)](_0x303816=>({'path':_0x303816['cliPath'],'description':_0x303816[_0x3d9374(0x164)],'risk':_0x303816[_0x3d9374(0x153)],'target':toPublicServiceTreeTarget(_0x303816[_0x3d9374(0x16a)]),'flags':_0x303816[_0x3d9374(0x16d)]['map'](_0x414f7d=>({'name':_0x414f7d[_0x3d9374(0x15e)],'cliName':_0x414f7d['cliName'],'type':_0x414f7d['type'],'required':_0x414f7d[_0x3d9374(0x18c)]===!![]}))}))};}function summarizeLoadedManifest(_0x701409){const _0x4500e1=a41_0x4427d9;return{'service':_0x701409[_0x4500e1(0x189)]?.[_0x4500e1(0x170)],'version':_0x701409[_0x4500e1(0x189)]?.[_0x4500e1(0x159)],'commandCount':_0x701409[_0x4500e1(0x189)]?.[_0x4500e1(0x16c)][_0x4500e1(0x179)]??0x0,'commands':_0x701409[_0x4500e1(0x189)]?.[_0x4500e1(0x16c)]['map'](_0x496c28=>({'path':_0x496c28[_0x4500e1(0x15f)],'risk':_0x496c28['risk'],'target':toPublicServiceTreeTarget(_0x496c28[_0x4500e1(0x16a)])}))??[],'registryIndex':_0x701409[_0x4500e1(0x14d)],'registryServiceCode':_0x701409[_0x4500e1(0x180)],'errors':_0x701409[_0x4500e1(0x16b)]['errors'],'warnings':_0x701409['report'][_0x4500e1(0x15b)]};}export const serviceDefinitions=[{'service':'service','command':a41_0x4427d9(0x155),'description':a41_0x4427d9(0x15d),'risk':a41_0x4427d9(0x152),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x3db0ed){const _0x1f6600=a41_0x4427d9,_0x4851f2=loadServiceManifestFromFile(_0x3db0ed[_0x1f6600(0x149)](_0x1f6600(0x175)));if(!_0x4851f2[_0x1f6600(0x16b)]['ok'])return{'ok':![],'data':{'file':_0x4851f2[_0x1f6600(0x15c)],'hash':_0x4851f2['hash'],'kind':_0x4851f2[_0x1f6600(0x148)],'serviceCount':_0x4851f2[_0x1f6600(0x17d)]['length'],'services':_0x4851f2['manifests'][_0x1f6600(0x173)](summarizeLoadedManifest),'errors':_0x4851f2[_0x1f6600(0x16b)][_0x1f6600(0x17c)],'warnings':_0x4851f2[_0x1f6600(0x16b)]['warnings']},'message':formatValidationFailure(_0x4851f2[_0x1f6600(0x16b)])};if(_0x4851f2[_0x1f6600(0x148)]===_0x1f6600(0x14a)||_0x4851f2[_0x1f6600(0x17d)][_0x1f6600(0x179)]!==0x1)return{'ok':!![],'data':{'file':_0x4851f2[_0x1f6600(0x15c)],'hash':_0x4851f2[_0x1f6600(0x167)],'kind':_0x4851f2[_0x1f6600(0x148)],'serviceCount':_0x4851f2[_0x1f6600(0x17d)][_0x1f6600(0x179)],'commandCount':_0x4851f2['manifests'][_0x1f6600(0x158)]((_0x2796d3,_0x21106a)=>_0x2796d3+(_0x21106a[_0x1f6600(0x189)]?.[_0x1f6600(0x16c)][_0x1f6600(0x179)]??0x0),0x0),'services':_0x4851f2['manifests']['map'](summarizeLoadedManifest),'warnings':_0x4851f2['report'][_0x1f6600(0x15b)]},'message':'Service\x20registry\x20validation\x20passed.'};return{'ok':!![],'data':{'file':_0x4851f2['filePath'],'hash':_0x4851f2[_0x1f6600(0x167)],'kind':_0x4851f2[_0x1f6600(0x148)],'service':_0x4851f2['normalizedManifest']?.[_0x1f6600(0x170)],'version':_0x4851f2[_0x1f6600(0x189)]?.['version'],'commandCount':_0x4851f2[_0x1f6600(0x189)]?.[_0x1f6600(0x16c)][_0x1f6600(0x179)]??0x0,'commands':_0x4851f2[_0x1f6600(0x189)]?.[_0x1f6600(0x16c)]['map'](_0x824328=>({'path':_0x824328[_0x1f6600(0x15f)],'risk':_0x824328[_0x1f6600(0x153)],'target':toPublicServiceTreeTarget(_0x824328[_0x1f6600(0x16a)])})),'warnings':_0x4851f2[_0x1f6600(0x16b)][_0x1f6600(0x15b)]},'message':_0x1f6600(0x168)};}},{'service':a41_0x4427d9(0x170),'command':a41_0x4427d9(0x14b),'description':'Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','risk':a41_0x4427d9(0x187),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x2c7536){const _0x4a276b=a41_0x4427d9,_0x3704d0=loadServiceManifestFromFile(_0x2c7536['str'](_0x4a276b(0x175)));return{'method':_0x4a276b(0x150),'url':getServiceRegistryPath(),'body':{'file':_0x3704d0[_0x4a276b(0x15c)],'hash':_0x3704d0['hash'],'kind':_0x3704d0[_0x4a276b(0x148)],'ok':_0x3704d0['report']['ok'],'service':_0x3704d0[_0x4a276b(0x189)]?.['service'],'version':_0x3704d0[_0x4a276b(0x189)]?.['version'],'serviceCount':_0x3704d0['manifests'][_0x4a276b(0x179)],'services':_0x3704d0['manifests'][_0x4a276b(0x173)](_0x214b10=>({'service':_0x214b10['normalizedManifest']?.[_0x4a276b(0x170)],'version':_0x214b10['normalizedManifest']?.[_0x4a276b(0x159)],'commandCount':_0x214b10[_0x4a276b(0x189)]?.[_0x4a276b(0x16c)][_0x4a276b(0x179)]??0x0,'errors':_0x214b10[_0x4a276b(0x16b)][_0x4a276b(0x17c)]})),'errors':_0x3704d0[_0x4a276b(0x16b)][_0x4a276b(0x17c)],'commandCount':_0x3704d0[_0x4a276b(0x189)]?.['commands'][_0x4a276b(0x179)]??0x0},'description':_0x4a276b(0x18a)};},async 'execute'(_0x47c24b){const _0x5583f3=a41_0x4427d9,_0x9f55c6=importServiceManifest(_0x47c24b[_0x5583f3(0x149)](_0x5583f3(0x175)));if(_0x9f55c6[_0x5583f3(0x176)][_0x5583f3(0x179)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x9f55c6['registryPath'],'imported':_0x9f55c6[_0x5583f3(0x14c)],'updated':_0x9f55c6[_0x5583f3(0x174)],'serviceCount':_0x9f55c6[_0x5583f3(0x166)],'services':_0x9f55c6[_0x5583f3(0x176)][_0x5583f3(0x173)](summarizeService)},'message':_0x5583f3(0x17a)+_0x9f55c6['imported']+_0x5583f3(0x16e)+_0x9f55c6[_0x5583f3(0x174)]+_0x5583f3(0x182)};return{'ok':!![],'data':{'registryPath':_0x9f55c6[_0x5583f3(0x177)],'replaced':_0x9f55c6[_0x5583f3(0x178)],'imported':_0x9f55c6[_0x5583f3(0x14c)],'updated':_0x9f55c6[_0x5583f3(0x174)],'serviceCount':_0x9f55c6[_0x5583f3(0x166)],'service':summarizeService(_0x9f55c6['entry'])},'message':(_0x9f55c6[_0x5583f3(0x178)]?_0x5583f3(0x161):'Imported')+_0x5583f3(0x14f)+_0x9f55c6[_0x5583f3(0x151)][_0x5583f3(0x160)]+'.'};}},{'service':a41_0x4427d9(0x170),'command':'export','description':'Export\x20a\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','risk':a41_0x4427d9(0x187),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x293cc2){const _0x1ebcd=a41_0x4427d9,_0x58dffd=getLocalServiceEntry(_0x293cc2[_0x1ebcd(0x149)](_0x1ebcd(0x170)));return{'method':'WRITE','url':_0x293cc2[_0x1ebcd(0x149)](_0x1ebcd(0x175)),'body':{'service':_0x293cc2['str'](_0x1ebcd(0x170)),'found':Boolean(_0x58dffd),'version':_0x58dffd?.[_0x1ebcd(0x159)],'source':_0x58dffd?.['source']},'description':_0x1ebcd(0x162)};},async 'execute'(_0x576292){const _0x4865db=a41_0x4427d9,_0x5eaa97=exportServiceManifest(_0x576292[_0x4865db(0x149)]('service'),_0x576292[_0x4865db(0x149)]('file'));return{'ok':!![],'data':{'registryPath':_0x5eaa97['registryPath'],'file':_0x5eaa97[_0x4865db(0x15c)],'service':summarizeService(_0x5eaa97[_0x4865db(0x151)])},'message':_0x4865db(0x17e)+_0x5eaa97[_0x4865db(0x151)][_0x4865db(0x160)]+'.'};}},{'service':a41_0x4427d9(0x170),'command':a41_0x4427d9(0x181),'description':a41_0x4427d9(0x184),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x3a2362=a41_0x4427d9,_0x4346ff=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x4346ff[_0x3a2362(0x179)],'services':_0x4346ff[_0x3a2362(0x173)](summarizeService)}};}},{'service':a41_0x4427d9(0x170),'command':'remove','description':a41_0x4427d9(0x14e),'risk':a41_0x4427d9(0x187),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x3df6f8){const _0x31b686=a41_0x4427d9,_0x50d00e=getLocalServiceEntry(_0x3df6f8[_0x31b686(0x149)](_0x31b686(0x170)));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'service':_0x3df6f8[_0x31b686(0x149)]('service'),'found':Boolean(_0x50d00e),'version':_0x50d00e?.[_0x31b686(0x159)],'source':_0x50d00e?.[_0x31b686(0x154)]},'description':_0x31b686(0x169)};},async 'execute'(_0xa7515f){const _0x57f123=a41_0x4427d9,_0x50d7a2=removeServiceManifest(_0xa7515f['str'](_0x57f123(0x170)));return{'ok':!![],'data':{'registryPath':_0x50d7a2[_0x57f123(0x177)],'serviceCount':_0x50d7a2[_0x57f123(0x166)],'service':summarizeService(_0x50d7a2[_0x57f123(0x151)])},'message':_0x57f123(0x163)+_0x50d7a2['entry'][_0x57f123(0x160)]+'.'};}},{'service':'service','command':a41_0x4427d9(0x171),'description':a41_0x4427d9(0x17b),'risk':a41_0x4427d9(0x152),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x1e7237){const _0x1e403b=a41_0x4427d9,_0x11adfa=getLocalServiceEntry(_0x1e7237[_0x1e403b(0x149)](_0x1e403b(0x170)));if(!_0x11adfa)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x1e7237[_0x1e403b(0x149)]('service')},'message':_0x1e403b(0x18b)+_0x1e7237[_0x1e403b(0x149)](_0x1e403b(0x170))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x11adfa),'manifest':_0x11adfa[_0x1e403b(0x165)],'normalizedManifest':toPublicNormalizedServiceTree(_0x11adfa[_0x1e403b(0x189)])}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a42_0x27bdeb=a42_0x1c9a;(function(_0xf7ba6c,_0x50d671){const _0x53b00d=a42_0x1c9a,_0x4bab95=_0xf7ba6c();while(!![]){try{const _0x5a156e=parseInt(_0x53b00d(0x125))/0x1*(parseInt(_0x53b00d(0x121))/0x2)+-parseInt(_0x53b00d(0x13f))/0x3*(parseInt(_0x53b00d(0x10a))/0x4)+parseInt(_0x53b00d(0x10e))/0x5*(-parseInt(_0x53b00d(0x11b))/0x6)+parseInt(_0x53b00d(0x138))/0x7+-parseInt(_0x53b00d(0xec))/0x8*(parseInt(_0x53b00d(0x114))/0x9)+-parseInt(_0x53b00d(0xfa))/0xa*(parseInt(_0x53b00d(0x134))/0xb)+-parseInt(_0x53b00d(0x127))/0xc*(-parseInt(_0x53b00d(0x101))/0xd);if(_0x5a156e===_0x50d671)break;else _0x4bab95['push'](_0x4bab95['shift']());}catch(_0x17b96c){_0x4bab95['push'](_0x4bab95['shift']());}}}(a42_0x276f,0x652d8));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';function a42_0x276f(){const _0x3b4d23=['Local\x20service\x20not\x20found:\x20','Unsupported\x20schemaVersion:\x20','bff\x20target\x20requires\x20functionName.','source','registry','command','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','splice','slice','sort','errors','push','2946361DSQsfP','normalizedManifest','string','trim','2693040risdER','findIndex','invalid','CliError','code','update','description','24732GRercg','updatedAt','join','].manifest','homeDirName','toISOString','Cannot\x20write\x20service\x20registry:\x20','Service\x20manifest\x20file\x20not\x20found:\x20','manifests','8bUCYWS','risk','validation','homeDir','length','target','warnings','filePath','utf8','object','schemaVersion','version','registryIndex','isArray','30PFAlJb','service.json','Service\x20manifest\x20validation\x20failed:\x0a','hex','manifest','services','empty','13jhlPen','].manifest.','.tmp','now','localeCompare','service','sourceHash','startsWith','serviceCode','276OCPEVx','message','stringify','Invalid\x20service\x20registry\x20JSON:\x20','500qrHgND','file','cliPath','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','1929924TpuxMR','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','report','Invalid\x20service\x20manifest\x20JSON:\x20','Unsupported\x20service\x20registry\x20schemaVersion:\x20','name','Remove\x20or\x20migrate\x20','36690IPffjZ','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','sha256','flatMap','map','$.services[','868774FGglDk','find','path','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','1aqJhCb','parse','21523704IgbQIX'];a42_0x276f=function(){return _0x3b4d23;};return a42_0x276f();}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=a42_0x27bdeb(0xfb);export function getServiceRegistryPath(_0x4b726a={}){const _0x612b0c=a42_0x27bdeb;return resolve(_0x4b726a[_0x612b0c(0xef)]??homedir(),PRODUCT_CONFIG[_0x612b0c(0x143)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x3fd033={}){const _0x5f221d=a42_0x27bdeb,_0x58a411=getServiceRegistryPath(_0x3fd033);if(!existsSync(_0x58a411))return emptyServiceRegistry();try{const _0x4ab5b7=readFileSync(_0x58a411,_0x5f221d(0xf4));if(!_0x4ab5b7[_0x5f221d(0x137)]())return emptyServiceRegistry();const _0x5b8473=JSON[_0x5f221d(0x126)](_0x4ab5b7);if(_0x5b8473['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x5f221d(0xee)](_0x5f221d(0x118)+String(_0x5b8473[_0x5f221d(0xf6)]),_0x5f221d(0x11a)+_0x58a411+'.');if(!Array[_0x5f221d(0xf9)](_0x5b8473[_0x5f221d(0xff)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x5b8473[_0x5f221d(0x140)],'services':_0x5b8473['services']};}catch(_0x188fae){if(_0x188fae instanceof Error&&_0x188fae[_0x5f221d(0x119)]===_0x5f221d(0x13b))throw _0x188fae;throw CliErrors[_0x5f221d(0xee)](_0x5f221d(0x10d)+_0x58a411,_0x5f221d(0x112));}}export function writeServiceRegistry(_0x5bf00c,_0x4d6583={}){const _0x4288f2=a42_0x27bdeb,_0x2d6a83=getServiceRegistryPath(_0x4d6583),_0x2198e7=dirname(_0x2d6a83);!existsSync(_0x2198e7)&&mkdirSync(_0x2198e7,{'recursive':!![]});const _0x2fa199=_0x2d6a83+_0x4288f2(0x103);try{writeFileSync(_0x2fa199,JSON[_0x4288f2(0x10c)](_0x5bf00c,null,0x2)+'\x0a',{'encoding':_0x4288f2(0xf4),'mode':0x180}),renameSync(_0x2fa199,_0x2d6a83);}catch(_0x5a16aa){try{unlinkSync(_0x2fa199);}catch{}if(_0x5a16aa?.[_0x4288f2(0x13c)]==='ENOENT')throw CliErrors['validation'](_0x4288f2(0x145)+_0x2d6a83);throw _0x5a16aa;}return _0x2d6a83;}export function loadServiceManifestFromFile(_0x102c0d){const _0x28c167=a42_0x27bdeb,_0xe9d1ab=resolve(_0x102c0d);if(!existsSync(_0xe9d1ab))throw CliErrors[_0x28c167(0xee)](_0x28c167(0xea)+_0x102c0d);let _0x10645b;const _0x4ed404=readFileSync(_0xe9d1ab,_0x28c167(0xf4));try{_0x10645b=JSON['parse'](_0x4ed404);}catch{throw CliErrors[_0x28c167(0xee)](_0x28c167(0x117)+_0x102c0d,_0x28c167(0x115));}const _0x3f2691=sha256(_0x4ed404),_0x152d35=extractLoadedServiceManifests(_0x10645b,_0x3f2691),_0x4cea1c=aggregateValidationReports(_0x152d35),_0x1b7070=_0x152d35[0x0];return{'filePath':_0xe9d1ab,'hash':_0x3f2691,'kind':isServiceRegistryLike(_0x10645b)?_0x28c167(0x12c):_0x28c167(0xfe),'manifest':_0x1b7070?.[_0x28c167(0xfe)]??_0x10645b,'report':_0x4cea1c,'normalizedManifest':_0x152d35['length']===0x1?_0x1b7070?.['normalizedManifest']:undefined,'manifests':_0x152d35};}export function importServiceManifest(_0x4835b0,_0x523a1d={}){const _0x106bec=a42_0x27bdeb,_0x595162=loadServiceManifestFromFile(_0x4835b0);if(!_0x595162[_0x106bec(0x116)]['ok'])throw CliErrors[_0x106bec(0xee)](formatValidationFailure(_0x595162[_0x106bec(0x116)]),_0x106bec(0x11c));if(_0x595162[_0x106bec(0xeb)][_0x106bec(0xf0)]===0x0)throw CliErrors[_0x106bec(0xee)](_0x106bec(0x113),_0x106bec(0x12e));const _0x899cb1=readServiceRegistry(_0x523a1d),_0x165c6c=(_0x523a1d[_0x106bec(0x104)]??(()=>new Date()))()['toISOString'](),_0x518312=[];let _0x4f937a=0x0,_0x4e1ef8=0x0;for(const _0x1c4932 of _0x595162[_0x106bec(0xeb)]){if(!_0x1c4932['normalizedManifest'])continue;const _0x5d863c=_0x1c4932[_0x106bec(0x135)][_0x106bec(0x106)]['code'],_0x15c69f={'serviceCode':_0x5d863c,'version':_0x1c4932[_0x106bec(0x135)][_0x106bec(0xf7)],'importedAt':_0x165c6c,'source':{'type':_0x106bec(0x10f),'path':_0x595162[_0x106bec(0xf3)],'hash':_0x1c4932[_0x106bec(0x107)]},'manifest':_0x1c4932[_0x106bec(0xfe)],'normalizedManifest':_0x1c4932[_0x106bec(0x135)]},_0xdddad0=_0x899cb1[_0x106bec(0xff)][_0x106bec(0x139)](_0x16eac7=>_0x16eac7['serviceCode']===_0x5d863c);_0xdddad0>=0x0?(_0x899cb1['services'][_0xdddad0]=_0x15c69f,_0x4e1ef8++):(_0x899cb1[_0x106bec(0xff)][_0x106bec(0x133)](_0x15c69f),_0x4f937a++),_0x518312[_0x106bec(0x133)](_0x15c69f);}_0x899cb1[_0x106bec(0xff)][_0x106bec(0x131)]((_0x22b88b,_0x15c971)=>_0x22b88b['serviceCode'][_0x106bec(0x105)](_0x15c971[_0x106bec(0x109)])),_0x899cb1[_0x106bec(0x140)]=_0x165c6c;const _0x28884c=writeServiceRegistry(_0x899cb1,_0x523a1d);return{'registryPath':_0x28884c,'entry':_0x518312[0x0],'replaced':_0x518312['length']===0x1?_0x4e1ef8===0x1:_0x4e1ef8>0x0,'entries':_0x518312,'imported':_0x4f937a,'updated':_0x4e1ef8,'serviceCount':_0x899cb1['services']['length']};}export function exportServiceManifest(_0x537631,_0x1cd930,_0x3acaac={}){const _0x4af265=a42_0x27bdeb,_0x165a42=getServiceRegistryPath(_0x3acaac),_0x520782=getLocalServiceEntry(_0x537631,_0x3acaac);if(!_0x520782)throw CliErrors[_0x4af265(0xee)](_0x4af265(0x128)+_0x537631,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const _0x18a9b4=resolve(_0x1cd930),_0x2e6fcf=dirname(_0x18a9b4);return!existsSync(_0x2e6fcf)&&mkdirSync(_0x2e6fcf,{'recursive':!![]}),writeFileSync(_0x18a9b4,JSON[_0x4af265(0x10c)](_0x520782[_0x4af265(0xfe)],null,0x2)+'\x0a',{'encoding':_0x4af265(0xf4),'mode':0x180}),{'registryPath':_0x165a42,'filePath':_0x18a9b4,'entry':_0x520782};}export function removeServiceManifest(_0x499ee0,_0x4c99a8={}){const _0x38b73f=a42_0x27bdeb,_0x52ed16=readServiceRegistry(_0x4c99a8),_0xe520c6=_0x499ee0['trim'](),_0x59f6d0=_0x52ed16[_0x38b73f(0xff)][_0x38b73f(0x139)](_0x15cc98=>_0x15cc98[_0x38b73f(0x109)]===_0xe520c6);if(_0x59f6d0<0x0)throw CliErrors[_0x38b73f(0xee)]('Local\x20service\x20not\x20found:\x20'+_0xe520c6,_0x38b73f(0x111));const [_0x4b76e2]=_0x52ed16[_0x38b73f(0xff)][_0x38b73f(0x12f)](_0x59f6d0,0x1),_0x40f182=(_0x4c99a8['now']??(()=>new Date()))()[_0x38b73f(0x144)]();_0x52ed16[_0x38b73f(0x140)]=_0x40f182;const _0x313fe6=writeServiceRegistry(_0x52ed16,_0x4c99a8);return{'registryPath':_0x313fe6,'entry':_0x4b76e2,'serviceCount':_0x52ed16[_0x38b73f(0xff)]['length']};}export function listLocalServices(_0x2faddf={}){const _0x35badd=a42_0x27bdeb;return readServiceRegistry(_0x2faddf)[_0x35badd(0xff)];}export function getLocalServiceEntry(_0x49d3dc,_0x8a6f3e={}){const _0x3ad0a3=a42_0x27bdeb;return readServiceRegistry(_0x8a6f3e)[_0x3ad0a3(0xff)][_0x3ad0a3(0x122)](_0x116812=>_0x116812[_0x3ad0a3(0x109)]===_0x49d3dc[_0x3ad0a3(0x137)]());}export function listLocalServiceTrees(_0x3ae41b={}){const _0x5961cb=a42_0x27bdeb;return readServiceRegistry(_0x3ae41b)[_0x5961cb(0xff)][_0x5961cb(0x11f)](_0x304b3d=>_0x304b3d[_0x5961cb(0x135)]);}export function inspectServiceRegistry(_0x2b5fc8={}){const _0x29483b=a42_0x27bdeb,_0x2036c0=getServiceRegistryPath(_0x2b5fc8);if(!existsSync(_0x2036c0))return emptyServiceRegistryInspection(_0x2036c0,'missing',![]);try{const _0x235b45=readFileSync(_0x2036c0,_0x29483b(0xf4));if(!_0x235b45['trim']())return emptyServiceRegistryInspection(_0x2036c0,_0x29483b(0x100),!![]);const _0xc149f2=JSON[_0x29483b(0x126)](_0x235b45);if(_0xc149f2[_0x29483b(0xf6)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x2036c0,_0x29483b(0x13a),!![]),'schemaVersion':_0xc149f2[_0x29483b(0xf6)],'message':_0x29483b(0x129)+String(_0xc149f2['schemaVersion'])};if(!Array[_0x29483b(0xf9)](_0xc149f2['services']))return{...emptyServiceRegistryInspection(_0x2036c0,_0x29483b(0x13a),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0xc149f2[_0x29483b(0x140)],'message':'services\x20must\x20be\x20an\x20array'};const _0x28c76e=_0xc149f2[_0x29483b(0xff)][_0x29483b(0x11f)](summarizeLocalServiceEntry);return{'registryPath':_0x2036c0,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0xc149f2[_0x29483b(0x140)],'serviceCount':_0x28c76e[_0x29483b(0xf0)],'commandCount':_0x28c76e['reduce']((_0x4ccbc8,_0x1c6506)=>_0x4ccbc8+_0x1c6506['commandCount'],0x0),'services':_0x28c76e};}catch(_0x25f2fa){return{...emptyServiceRegistryInspection(_0x2036c0,_0x29483b(0x13a),!![]),'message':_0x25f2fa instanceof Error?_0x25f2fa[_0x29483b(0x10b)]:String(_0x25f2fa)};}}export function formatValidationFailure(_0x1d09aa){const _0x1a9bd1=a42_0x27bdeb,_0x2de53e=_0x1d09aa[_0x1a9bd1(0x132)]['map'](_0x143b8f=>_0x143b8f[_0x1a9bd1(0x123)]+':\x20'+_0x143b8f[_0x1a9bd1(0x10b)]);return _0x1a9bd1(0xfc)+_0x2de53e[_0x1a9bd1(0x141)]('\x0a');}function extractLoadedServiceManifests(_0x123bc5,_0x14a1c9){const _0x2cce97=a42_0x27bdeb;if(!isServiceRegistryLike(_0x123bc5)){const _0x494616=_0x123bc5,{manifest:_0x2085e3,errors:_0x16de11}=adaptServiceTreeManifestForLegacyFramework(_0x494616),_0x1e6bcd=validateServiceTreeManifest(_0x2085e3),_0x3fb0aa=mergeValidationErrors(_0x1e6bcd,_0x16de11);return[{'manifest':_0x494616,'report':_0x3fb0aa,'normalizedManifest':_0x3fb0aa['ok']?normalizeServiceTreeManifest(_0x2085e3):undefined,'sourceHash':_0x14a1c9}];}return _0x123bc5[_0x2cce97(0xff)][_0x2cce97(0x11f)]((_0x14e471,_0x4847c9)=>{const _0x4c7131=_0x2cce97,_0xb51eaa=isObjectRecord(_0x14e471)?_0x14e471[_0x4c7131(0xfe)]:undefined,{manifest:_0xc00d7d,errors:_0x447a3d}=adaptServiceTreeManifestForLegacyFramework(_0xb51eaa),_0x11a253=validateServiceTreeManifest(_0xc00d7d),_0x370b05=mergeValidationErrors(_0x11a253,_0x447a3d),_0x1169ab=isObjectRecord(_0x14e471)&&typeof _0x14e471[_0x4c7131(0x109)]===_0x4c7131(0x136)?_0x14e471[_0x4c7131(0x109)]:undefined;return{'manifest':_0xb51eaa,'report':_0x370b05,'normalizedManifest':_0x370b05['ok']?normalizeServiceTreeManifest(_0xc00d7d):undefined,'sourceHash':sha256(JSON['stringify'](_0xb51eaa,null,0x2)+'\x0a'),'registryIndex':_0x4847c9,'registryServiceCode':_0x1169ab};});}function mergeValidationErrors(_0x11d7be,_0x5a9733){const _0x4372ac=a42_0x27bdeb,_0x3a9885=_0x11d7be[_0x4372ac(0x132)]['map'](_0x174290=>_0x174290[_0x4372ac(0x10b)]===_0x4372ac(0x124)?{..._0x174290,'message':_0x4372ac(0x12a)}:_0x174290),_0xd10ba=[..._0x5a9733,..._0x3a9885];return{'ok':_0xd10ba['length']===0x0,'errors':_0xd10ba,'warnings':_0x11d7be[_0x4372ac(0xf2)]};}function aggregateValidationReports(_0x463e6b){const _0x479fe8=a42_0x27bdeb,_0x499de8=_0x463e6b[_0x479fe8(0x11e)](_0x84cb7a=>_0x84cb7a[_0x479fe8(0xf8)]===undefined?_0x84cb7a[_0x479fe8(0x116)][_0x479fe8(0x132)]:_0x84cb7a[_0x479fe8(0x116)][_0x479fe8(0x132)]['map'](_0x4a0163=>({..._0x4a0163,'path':prefixRegistryIssuePath(_0x84cb7a[_0x479fe8(0xf8)],_0x4a0163[_0x479fe8(0x123)])}))),_0x1abe0a=_0x463e6b[_0x479fe8(0x11e)](_0x421a31=>_0x421a31[_0x479fe8(0xf8)]===undefined?_0x421a31[_0x479fe8(0x116)][_0x479fe8(0xf2)]:_0x421a31['report']['warnings'][_0x479fe8(0x11f)](_0x58dfd6=>({..._0x58dfd6,'path':prefixRegistryIssuePath(_0x421a31[_0x479fe8(0xf8)],_0x58dfd6[_0x479fe8(0x123)])})));return{'ok':_0x499de8[_0x479fe8(0xf0)]===0x0,'errors':_0x499de8,'warnings':_0x1abe0a};}function prefixRegistryIssuePath(_0x4ea80f,_0x1bc6bd){const _0x3c9b7d=a42_0x27bdeb;if(_0x1bc6bd==='$')return _0x3c9b7d(0x120)+_0x4ea80f+_0x3c9b7d(0x142);if(_0x1bc6bd[_0x3c9b7d(0x108)]('$.'))return _0x3c9b7d(0x120)+_0x4ea80f+_0x3c9b7d(0x142)+_0x1bc6bd['slice'](0x1);if(_0x1bc6bd[_0x3c9b7d(0x108)]('$['))return _0x3c9b7d(0x120)+_0x4ea80f+_0x3c9b7d(0x142)+_0x1bc6bd[_0x3c9b7d(0x130)](0x1);return _0x3c9b7d(0x120)+_0x4ea80f+_0x3c9b7d(0x102)+_0x1bc6bd;}function isServiceRegistryLike(_0x59dd48){const _0x55a064=a42_0x27bdeb;return isObjectRecord(_0x59dd48)&&_0x59dd48[_0x55a064(0xf6)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x55a064(0xf9)](_0x59dd48[_0x55a064(0xff)]);}function a42_0x1c9a(_0x1e27e8,_0xf828a8){_0x1e27e8=_0x1e27e8-0xea;const _0x276f2d=a42_0x276f();let _0x1c9a40=_0x276f2d[_0x1e27e8];return _0x1c9a40;}function isObjectRecord(_0x247b63){const _0x5eea73=a42_0x27bdeb;return Boolean(_0x247b63)&&typeof _0x247b63===_0x5eea73(0xf5)&&!Array[_0x5eea73(0xf9)](_0x247b63);}function emptyServiceRegistryInspection(_0x48dc5d,_0x426f84,_0x298203){return{'registryPath':_0x48dc5d,'exists':_0x298203,'status':_0x426f84,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x414ac1){const _0x4efbe0=a42_0x27bdeb,_0x440684=_0x414ac1[_0x4efbe0(0x135)],_0x2dc7a7=_0x440684['commands']['map'](_0x2b36f8=>({'path':_0x2b36f8[_0x4efbe0(0x110)],'description':_0x2b36f8[_0x4efbe0(0x13e)],'risk':_0x2b36f8[_0x4efbe0(0xed)],'targetKind':_0x2b36f8[_0x4efbe0(0xf1)]['kind'],'targetCommand':_0x2b36f8[_0x4efbe0(0xf1)][_0x4efbe0(0x12d)]}));return{'serviceCode':_0x414ac1[_0x4efbe0(0x109)],'name':_0x440684[_0x4efbe0(0x106)]['name'],'description':_0x440684[_0x4efbe0(0x106)][_0x4efbe0(0x13e)],'version':_0x414ac1['version'],'importedAt':_0x414ac1['importedAt'],'source':_0x414ac1[_0x4efbe0(0x12b)],'commandCount':_0x2dc7a7['length'],'commands':_0x2dc7a7};}function sha256(_0x3bdaff){const _0x3a6958=a42_0x27bdeb;return createHash(_0x3a6958(0x11d))[_0x3a6958(0x13d)](_0x3bdaff)['digest'](_0x3a6958(0xfd));}
|
|
1
|
+
const a42_0x3e7a92=a42_0x113b;(function(_0x273633,_0x3a3603){const _0x4225df=a42_0x113b,_0x236042=_0x273633();while(!![]){try{const _0x2f00c0=parseInt(_0x4225df(0x104))/0x1+parseInt(_0x4225df(0x13d))/0x2+parseInt(_0x4225df(0x135))/0x3*(parseInt(_0x4225df(0x149))/0x4)+parseInt(_0x4225df(0x13b))/0x5*(-parseInt(_0x4225df(0x12a))/0x6)+-parseInt(_0x4225df(0x101))/0x7+-parseInt(_0x4225df(0x140))/0x8*(-parseInt(_0x4225df(0x14a))/0x9)+parseInt(_0x4225df(0x113))/0xa;if(_0x2f00c0===_0x3a3603)break;else _0x236042['push'](_0x236042['shift']());}catch(_0x5c008a){_0x236042['push'](_0x236042['shift']());}}}(a42_0x28e2,0x5e5d8));import{createHash}from'node:crypto';function a42_0x28e2(){const _0x43e0de=['toISOString','manifests','homeDirName','serviceCode','errors','importedAt','2739YRLXWK','digest','string','normalizedManifest','stringify','sourceHash','10LAWtfK','path','398566KtyumG','].manifest.','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','8pYYlHv','services\x20must\x20be\x20an\x20array','version','reduce','Local\x20service\x20not\x20found:\x20','schemaVersion','source','length','empty','556kBjrYN','1562877emmESb','validation','code','slice','trim','.tmp','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','registryIndex','invalid','sort','report','sha256','description','isArray','cliPath','utf8','5291223zHALIN','target','].manifest','63622owKOQt','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','Service\x20manifest\x20validation\x20failed:\x0a','findIndex','map','Invalid\x20service\x20registry\x20JSON:\x20','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','$.services[','service','Cannot\x20write\x20service\x20registry:\x20','flatMap','command','join','name','localeCompare','12754380JzrCXu','ENOENT','registry','update','message','commands','kind','file','object','manifest','warnings','Invalid\x20service\x20manifest\x20JSON:\x20','risk','hex','startsWith','push','services','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','Remove\x20or\x20migrate\x20','Unsupported\x20schemaVersion:\x20','updatedAt','missing','Service\x20manifest\x20file\x20not\x20found:\x20','2089482pvuhiy','now','parse','splice','service.json'];a42_0x28e2=function(){return _0x43e0de;};return a42_0x28e2();}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=a42_0x3e7a92(0x12e);export function getServiceRegistryPath(_0x1458dc={}){const _0x369e4e=a42_0x3e7a92;return resolve(_0x1458dc['homeDir']??homedir(),PRODUCT_CONFIG[_0x369e4e(0x131)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x2e6dff={}){const _0x2eaa14=a42_0x3e7a92,_0x1fd34=getServiceRegistryPath(_0x2e6dff);if(!existsSync(_0x1fd34))return emptyServiceRegistry();try{const _0x454f4f=readFileSync(_0x1fd34,_0x2eaa14(0x100));if(!_0x454f4f['trim']())return emptyServiceRegistry();const _0x45273c=JSON[_0x2eaa14(0x12c)](_0x454f4f);if(_0x45273c[_0x2eaa14(0x145)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x2eaa14(0x14b)]('Unsupported\x20service\x20registry\x20schemaVersion:\x20'+String(_0x45273c[_0x2eaa14(0x145)]),_0x2eaa14(0x125)+_0x1fd34+'.');if(!Array[_0x2eaa14(0xfe)](_0x45273c['services']))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x45273c['updatedAt'],'services':_0x45273c[_0x2eaa14(0x123)]};}catch(_0x22a80){if(_0x22a80 instanceof Error&&_0x22a80[_0x2eaa14(0x111)]==='CliError')throw _0x22a80;throw CliErrors[_0x2eaa14(0x14b)](_0x2eaa14(0x109)+_0x1fd34,_0x2eaa14(0x13f));}}export function writeServiceRegistry(_0x4ad34c,_0xa980fd={}){const _0x119475=a42_0x3e7a92,_0x12ef5a=getServiceRegistryPath(_0xa980fd),_0x1e1911=dirname(_0x12ef5a);!existsSync(_0x1e1911)&&mkdirSync(_0x1e1911,{'recursive':!![]});const _0x2d3fed=_0x12ef5a+_0x119475(0x14f);try{writeFileSync(_0x2d3fed,JSON['stringify'](_0x4ad34c,null,0x2)+'\x0a',{'encoding':_0x119475(0x100),'mode':0x180}),renameSync(_0x2d3fed,_0x12ef5a);}catch(_0x294442){try{unlinkSync(_0x2d3fed);}catch{}if(_0x294442?.['code']===_0x119475(0x114))throw CliErrors[_0x119475(0x14b)](_0x119475(0x10d)+_0x12ef5a);throw _0x294442;}return _0x12ef5a;}export function loadServiceManifestFromFile(_0x2821c1){const _0x3789d0=a42_0x3e7a92,_0x33aed1=resolve(_0x2821c1);if(!existsSync(_0x33aed1))throw CliErrors[_0x3789d0(0x14b)](_0x3789d0(0x129)+_0x2821c1);let _0x2fa359;const _0x2784fa=readFileSync(_0x33aed1,_0x3789d0(0x100));try{_0x2fa359=JSON['parse'](_0x2784fa);}catch{throw CliErrors[_0x3789d0(0x14b)](_0x3789d0(0x11e)+_0x2821c1,_0x3789d0(0x150));}const _0x56e78f=sha256(_0x2784fa),_0x55d3e3=extractLoadedServiceManifests(_0x2fa359,_0x56e78f),_0x51793a=aggregateValidationReports(_0x55d3e3),_0x209c0=_0x55d3e3[0x0];return{'filePath':_0x33aed1,'hash':_0x56e78f,'kind':isServiceRegistryLike(_0x2fa359)?_0x3789d0(0x115):_0x3789d0(0x11c),'manifest':_0x209c0?.['manifest']??_0x2fa359,'report':_0x51793a,'normalizedManifest':_0x55d3e3[_0x3789d0(0x147)]===0x1?_0x209c0?.['normalizedManifest']:undefined,'manifests':_0x55d3e3};}export function importServiceManifest(_0x4c881a,_0x4cebcc={}){const _0x15331d=a42_0x3e7a92,_0x26ebc5=loadServiceManifestFromFile(_0x4c881a);if(!_0x26ebc5[_0x15331d(0xfb)]['ok'])throw CliErrors['validation'](formatValidationFailure(_0x26ebc5['report']),_0x15331d(0x105));if(_0x26ebc5[_0x15331d(0x130)][_0x15331d(0x147)]===0x0)throw CliErrors[_0x15331d(0x14b)]('Service\x20registry\x20has\x20no\x20services\x20to\x20import.',_0x15331d(0x10a));const _0xe7e70=readServiceRegistry(_0x4cebcc),_0x2bb1c1=(_0x4cebcc[_0x15331d(0x12b)]??(()=>new Date()))()['toISOString'](),_0x448429=[];let _0x2480e9=0x0,_0x14ba2c=0x0;for(const _0x51d8b7 of _0x26ebc5[_0x15331d(0x130)]){if(!_0x51d8b7[_0x15331d(0x138)])continue;const _0x329b99=_0x51d8b7['normalizedManifest']['service'][_0x15331d(0x14c)],_0xa41d66={'serviceCode':_0x329b99,'version':_0x51d8b7[_0x15331d(0x138)][_0x15331d(0x142)],'importedAt':_0x2bb1c1,'source':{'type':_0x15331d(0x11a),'path':_0x26ebc5['filePath'],'hash':_0x51d8b7[_0x15331d(0x13a)]},'manifest':_0x51d8b7[_0x15331d(0x11c)],'normalizedManifest':_0x51d8b7['normalizedManifest']},_0x45bd90=_0xe7e70['services'][_0x15331d(0x107)](_0x2ba832=>_0x2ba832[_0x15331d(0x132)]===_0x329b99);_0x45bd90>=0x0?(_0xe7e70['services'][_0x45bd90]=_0xa41d66,_0x14ba2c++):(_0xe7e70['services'][_0x15331d(0x122)](_0xa41d66),_0x2480e9++),_0x448429[_0x15331d(0x122)](_0xa41d66);}_0xe7e70['services'][_0x15331d(0xfa)]((_0x5cf286,_0x5743e0)=>_0x5cf286['serviceCode'][_0x15331d(0x112)](_0x5743e0[_0x15331d(0x132)])),_0xe7e70[_0x15331d(0x127)]=_0x2bb1c1;const _0x55fac6=writeServiceRegistry(_0xe7e70,_0x4cebcc);return{'registryPath':_0x55fac6,'entry':_0x448429[0x0],'replaced':_0x448429[_0x15331d(0x147)]===0x1?_0x14ba2c===0x1:_0x14ba2c>0x0,'entries':_0x448429,'imported':_0x2480e9,'updated':_0x14ba2c,'serviceCount':_0xe7e70[_0x15331d(0x123)][_0x15331d(0x147)]};}export function exportServiceManifest(_0x3ab875,_0x410d82,_0x3d35aa={}){const _0x3d7541=a42_0x3e7a92,_0xebbb2e=getServiceRegistryPath(_0x3d35aa),_0xa28cb=getLocalServiceEntry(_0x3ab875,_0x3d35aa);if(!_0xa28cb)throw CliErrors[_0x3d7541(0x14b)](_0x3d7541(0x144)+_0x3ab875,_0x3d7541(0x124));const _0x847e09=resolve(_0x410d82),_0x11b3fe=dirname(_0x847e09);return!existsSync(_0x11b3fe)&&mkdirSync(_0x11b3fe,{'recursive':!![]}),writeFileSync(_0x847e09,JSON['stringify'](_0xa28cb[_0x3d7541(0x11c)],null,0x2)+'\x0a',{'encoding':_0x3d7541(0x100),'mode':0x180}),{'registryPath':_0xebbb2e,'filePath':_0x847e09,'entry':_0xa28cb};}export function removeServiceManifest(_0xce583f,_0x5a6993={}){const _0x20a284=a42_0x3e7a92,_0x538de8=readServiceRegistry(_0x5a6993),_0x20e4fe=_0xce583f[_0x20a284(0x14e)](),_0x3b100a=_0x538de8[_0x20a284(0x123)][_0x20a284(0x107)](_0xae3064=>_0xae3064[_0x20a284(0x132)]===_0x20e4fe);if(_0x3b100a<0x0)throw CliErrors[_0x20a284(0x14b)]('Local\x20service\x20not\x20found:\x20'+_0x20e4fe,_0x20a284(0x124));const [_0xd7c3cf]=_0x538de8[_0x20a284(0x123)][_0x20a284(0x12d)](_0x3b100a,0x1),_0x76350d=(_0x5a6993[_0x20a284(0x12b)]??(()=>new Date()))()[_0x20a284(0x12f)]();_0x538de8[_0x20a284(0x127)]=_0x76350d;const _0x51328a=writeServiceRegistry(_0x538de8,_0x5a6993);return{'registryPath':_0x51328a,'entry':_0xd7c3cf,'serviceCount':_0x538de8['services'][_0x20a284(0x147)]};}export function listLocalServices(_0x3460d1={}){const _0x49e0ff=a42_0x3e7a92;return readServiceRegistry(_0x3460d1)[_0x49e0ff(0x123)];}export function getLocalServiceEntry(_0x41428d,_0x50ec95={}){const _0x2ce001=a42_0x3e7a92;return readServiceRegistry(_0x50ec95)[_0x2ce001(0x123)]['find'](_0x10a5e8=>_0x10a5e8[_0x2ce001(0x132)]===_0x41428d[_0x2ce001(0x14e)]());}export function listLocalServiceTrees(_0x5a74e2={}){const _0x315577=a42_0x3e7a92;return readServiceRegistry(_0x5a74e2)[_0x315577(0x123)]['map'](_0x16362b=>_0x16362b[_0x315577(0x138)]);}export function inspectServiceRegistry(_0x1f6399={}){const _0x48ecba=a42_0x3e7a92,_0x490ac7=getServiceRegistryPath(_0x1f6399);if(!existsSync(_0x490ac7))return emptyServiceRegistryInspection(_0x490ac7,_0x48ecba(0x128),![]);try{const _0xce89c7=readFileSync(_0x490ac7,'utf8');if(!_0xce89c7[_0x48ecba(0x14e)]())return emptyServiceRegistryInspection(_0x490ac7,_0x48ecba(0x148),!![]);const _0x265e72=JSON[_0x48ecba(0x12c)](_0xce89c7);if(_0x265e72[_0x48ecba(0x145)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x490ac7,_0x48ecba(0xf9),!![]),'schemaVersion':_0x265e72[_0x48ecba(0x145)],'message':_0x48ecba(0x126)+String(_0x265e72[_0x48ecba(0x145)])};if(!Array[_0x48ecba(0xfe)](_0x265e72[_0x48ecba(0x123)]))return{...emptyServiceRegistryInspection(_0x490ac7,_0x48ecba(0xf9),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x265e72[_0x48ecba(0x127)],'message':_0x48ecba(0x141)};const _0xadc363=_0x265e72[_0x48ecba(0x123)][_0x48ecba(0x108)](summarizeLocalServiceEntry);return{'registryPath':_0x490ac7,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x265e72[_0x48ecba(0x127)],'serviceCount':_0xadc363[_0x48ecba(0x147)],'commandCount':_0xadc363[_0x48ecba(0x143)]((_0x4650f9,_0x5579df)=>_0x4650f9+_0x5579df['commandCount'],0x0),'services':_0xadc363};}catch(_0x53f3c6){return{...emptyServiceRegistryInspection(_0x490ac7,_0x48ecba(0xf9),!![]),'message':_0x53f3c6 instanceof Error?_0x53f3c6[_0x48ecba(0x117)]:String(_0x53f3c6)};}}export function formatValidationFailure(_0x354d81){const _0x2d1c89=a42_0x3e7a92,_0x51a007=_0x354d81[_0x2d1c89(0x133)][_0x2d1c89(0x108)](_0x2c6c61=>_0x2c6c61[_0x2d1c89(0x13c)]+':\x20'+_0x2c6c61[_0x2d1c89(0x117)]);return _0x2d1c89(0x106)+_0x51a007[_0x2d1c89(0x110)]('\x0a');}function extractLoadedServiceManifests(_0x1786c7,_0x519df2){const _0x4ac39e=a42_0x3e7a92;if(!isServiceRegistryLike(_0x1786c7)){const _0x2e7e42=_0x1786c7,{manifest:_0x154557,errors:_0x46816e}=adaptServiceTreeManifestForLegacyFramework(_0x2e7e42),_0x538b1f=validateServiceTreeManifest(_0x154557),_0x4b47ad=mergeValidationErrors(_0x538b1f,_0x46816e);return[{'manifest':_0x2e7e42,'report':_0x4b47ad,'normalizedManifest':_0x4b47ad['ok']?normalizeServiceTreeManifest(_0x154557):undefined,'sourceHash':_0x519df2}];}return _0x1786c7[_0x4ac39e(0x123)]['map']((_0x45b218,_0x12fd01)=>{const _0xc6ccf1=_0x4ac39e,_0x40f0ab=isObjectRecord(_0x45b218)?_0x45b218[_0xc6ccf1(0x11c)]:undefined,{manifest:_0x2d236f,errors:_0xa4f2d6}=adaptServiceTreeManifestForLegacyFramework(_0x40f0ab),_0x3c4a2d=validateServiceTreeManifest(_0x2d236f),_0x4489fd=mergeValidationErrors(_0x3c4a2d,_0xa4f2d6),_0x2090b0=isObjectRecord(_0x45b218)&&typeof _0x45b218[_0xc6ccf1(0x132)]===_0xc6ccf1(0x137)?_0x45b218['serviceCode']:undefined;return{'manifest':_0x40f0ab,'report':_0x4489fd,'normalizedManifest':_0x4489fd['ok']?normalizeServiceTreeManifest(_0x2d236f):undefined,'sourceHash':sha256(JSON[_0xc6ccf1(0x139)](_0x40f0ab,null,0x2)+'\x0a'),'registryIndex':_0x12fd01,'registryServiceCode':_0x2090b0};});}function a42_0x113b(_0x3ea7f5,_0xb05e4e){_0x3ea7f5=_0x3ea7f5-0xf8;const _0x28e24e=a42_0x28e2();let _0x113b13=_0x28e24e[_0x3ea7f5];return _0x113b13;}function mergeValidationErrors(_0x64502,_0x464957){const _0xac5004=a42_0x3e7a92,_0x3e7d54=_0x64502['errors'][_0xac5004(0x108)](_0x4bba26=>_0x4bba26[_0xac5004(0x117)]==='bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.'?{..._0x4bba26,'message':'bff\x20target\x20requires\x20functionName.'}:_0x4bba26),_0x18f96b=[..._0x464957,..._0x3e7d54];return{'ok':_0x18f96b[_0xac5004(0x147)]===0x0,'errors':_0x18f96b,'warnings':_0x64502['warnings']};}function aggregateValidationReports(_0x4c6a44){const _0x21a0d9=a42_0x3e7a92,_0xb705ef=_0x4c6a44['flatMap'](_0x7cea01=>_0x7cea01[_0x21a0d9(0xf8)]===undefined?_0x7cea01['report'][_0x21a0d9(0x133)]:_0x7cea01[_0x21a0d9(0xfb)][_0x21a0d9(0x133)][_0x21a0d9(0x108)](_0xd7bcde=>({..._0xd7bcde,'path':prefixRegistryIssuePath(_0x7cea01[_0x21a0d9(0xf8)],_0xd7bcde[_0x21a0d9(0x13c)])}))),_0xd5649=_0x4c6a44[_0x21a0d9(0x10e)](_0x160be4=>_0x160be4[_0x21a0d9(0xf8)]===undefined?_0x160be4['report'][_0x21a0d9(0x11d)]:_0x160be4[_0x21a0d9(0xfb)][_0x21a0d9(0x11d)][_0x21a0d9(0x108)](_0x4fcb9c=>({..._0x4fcb9c,'path':prefixRegistryIssuePath(_0x160be4[_0x21a0d9(0xf8)],_0x4fcb9c[_0x21a0d9(0x13c)])})));return{'ok':_0xb705ef[_0x21a0d9(0x147)]===0x0,'errors':_0xb705ef,'warnings':_0xd5649};}function prefixRegistryIssuePath(_0x51f1b9,_0x13a8b3){const _0x5ee5ce=a42_0x3e7a92;if(_0x13a8b3==='$')return _0x5ee5ce(0x10b)+_0x51f1b9+_0x5ee5ce(0x103);if(_0x13a8b3[_0x5ee5ce(0x121)]('$.'))return _0x5ee5ce(0x10b)+_0x51f1b9+_0x5ee5ce(0x103)+_0x13a8b3[_0x5ee5ce(0x14d)](0x1);if(_0x13a8b3['startsWith']('$['))return'$.services['+_0x51f1b9+_0x5ee5ce(0x103)+_0x13a8b3[_0x5ee5ce(0x14d)](0x1);return'$.services['+_0x51f1b9+_0x5ee5ce(0x13e)+_0x13a8b3;}function isServiceRegistryLike(_0x153c1e){const _0x33d6d6=a42_0x3e7a92;return isObjectRecord(_0x153c1e)&&_0x153c1e['schemaVersion']===SERVICE_REGISTRY_SCHEMA_VERSION&&Array['isArray'](_0x153c1e[_0x33d6d6(0x123)]);}function isObjectRecord(_0x47a1cd){const _0x479025=a42_0x3e7a92;return Boolean(_0x47a1cd)&&typeof _0x47a1cd===_0x479025(0x11b)&&!Array[_0x479025(0xfe)](_0x47a1cd);}function emptyServiceRegistryInspection(_0xa8adab,_0x406301,_0x48f5ad){return{'registryPath':_0xa8adab,'exists':_0x48f5ad,'status':_0x406301,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x3e48ed){const _0xaa9e9d=a42_0x3e7a92,_0x16831c=_0x3e48ed['normalizedManifest'],_0x22437d=_0x16831c[_0xaa9e9d(0x118)][_0xaa9e9d(0x108)](_0x4f43c7=>({'path':_0x4f43c7[_0xaa9e9d(0xff)],'description':_0x4f43c7[_0xaa9e9d(0xfd)],'risk':_0x4f43c7[_0xaa9e9d(0x11f)],'targetKind':_0x4f43c7[_0xaa9e9d(0x102)][_0xaa9e9d(0x119)],'targetCommand':_0x4f43c7[_0xaa9e9d(0x102)][_0xaa9e9d(0x10f)]}));return{'serviceCode':_0x3e48ed['serviceCode'],'name':_0x16831c[_0xaa9e9d(0x10c)][_0xaa9e9d(0x111)],'description':_0x16831c[_0xaa9e9d(0x10c)][_0xaa9e9d(0xfd)],'version':_0x3e48ed[_0xaa9e9d(0x142)],'importedAt':_0x3e48ed[_0xaa9e9d(0x134)],'source':_0x3e48ed[_0xaa9e9d(0x146)],'commandCount':_0x22437d[_0xaa9e9d(0x147)],'commands':_0x22437d};}function sha256(_0x574173){const _0x31194e=a42_0x3e7a92;return createHash(_0x31194e(0xfc))[_0x31194e(0x116)](_0x574173)[_0x31194e(0x136)](_0x31194e(0x120));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x47aab6=a43_0x5673;(function(_0x35a0c0,_0xb77029){const _0x4ec347=a43_0x5673,_0x4e0b87=_0x35a0c0();while(!![]){try{const _0x122007=-parseInt(_0x4ec347(0x1e1))/0x1*(-parseInt(_0x4ec347(0x1cc))/0x2)+-parseInt(_0x4ec347(0x1cf))/0x3+-parseInt(_0x4ec347(0x1d0))/0x4*(-parseInt(_0x4ec347(0x1c1))/0x5)+-parseInt(_0x4ec347(0x1cd))/0x6+parseInt(_0x4ec347(0x1d8))/0x7*(-parseInt(_0x4ec347(0x1c9))/0x8)+parseInt(_0x4ec347(0x1cb))/0x9*(parseInt(_0x4ec347(0x1df))/0xa)+parseInt(_0x4ec347(0x1d4))/0xb*(-parseInt(_0x4ec347(0x1c4))/0xc);if(_0x122007===_0xb77029)break;else _0x4e0b87['push'](_0x4e0b87['shift']());}catch(_0x16087d){_0x4e0b87['push'](_0x4e0b87['shift']());}}}(a43_0x2c98,0xe592c));function a43_0x5673(_0x33e274,_0x50e2b3){_0x33e274=_0x33e274-0x1c0;const _0x2c9867=a43_0x2c98();let _0x567387=_0x2c9867[_0x33e274];return _0x567387;}import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';import{dirname,resolve}from'node:path';import{CliErrors}from'../../../errors.js';import{writeCliSideChannelLine}from'../../../utils/write-cli-side-channel.js';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':a43_0x47aab6(0x1ce),'command':a43_0x47aab6(0x1e2),'description':'Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','risk':a43_0x47aab6(0x1c7),'requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x259173){const _0x1aacaa=a43_0x47aab6,_0x17400e=buildSkillCreatePlan(_0x259173[_0x1aacaa(0x1dc)](_0x1aacaa(0x1c6)),_0x259173[_0x1aacaa(0x1dc)](_0x1aacaa(0x1db)),_0x259173[_0x1aacaa(0x1dc)](_0x1aacaa(0x1de)));return{'method':_0x1aacaa(0x1d6),'url':_0x17400e['skillDir'],'body':{'skillName':_0x17400e[_0x1aacaa(0x1d1)][_0x1aacaa(0x1ca)],'type':_0x17400e['rendered'][_0x1aacaa(0x1db)],'selfContained':!![],'files':_0x17400e[_0x1aacaa(0x1d1)][_0x1aacaa(0x1c3)]['map'](_0x4a22e2=>_0x4a22e2[_0x1aacaa(0x1c2)])},'description':_0x1aacaa(0x1dd)};},async 'execute'(_0x3dd914){const _0xb7a677=a43_0x47aab6,_0x5d1132=buildSkillCreatePlan(_0x3dd914['str'](_0xb7a677(0x1c6)),_0x3dd914[_0xb7a677(0x1dc)](_0xb7a677(0x1db)),_0x3dd914[_0xb7a677(0x1dc)](_0xb7a677(0x1de)));return writeSkillDraft(_0x5d1132,_0x3dd914[_0xb7a677(0x1d7)](_0xb7a677(0x1d3))),{'ok':!![],'data':{'skillName':_0x5d1132[_0xb7a677(0x1d1)][_0xb7a677(0x1ca)],'type':_0x5d1132[_0xb7a677(0x1d1)]['type'],'dir':_0x5d1132['skillDir'],'files':_0x5d1132[_0xb7a677(0x1d1)][_0xb7a677(0x1c3)][_0xb7a677(0x1c5)](_0xb00383=>_0xb00383[_0xb7a677(0x1c2)])},'message':_0xb7a677(0x1e0)+_0x5d1132[_0xb7a677(0x1d1)][_0xb7a677(0x1ca)]};}};function buildSkillCreatePlan(_0x48cf51,_0x56c056,_0x4931f3){const _0x374f5e=a43_0x47aab6,_0x58fb30=_0x56c056[_0x374f5e(0x1c0)](),_0x3d610c=renderSkillTemplate({'skillName':_0x48cf51,'type':_0x58fb30});!_0x58fb30&&writeCliSideChannelLine(_0x374f5e(0x1d5));const _0x2dfc13=resolve(normalizeSkillTarget(_0x4931f3));return{'rendered':_0x3d610c,'targetRoot':_0x2dfc13,'skillDir':resolve(_0x2dfc13,_0x3d610c[_0x374f5e(0x1ca)])};}function a43_0x2c98(){const _0x2cdca3=['files','189336OWDkQj','map','name','write','isSymbolicLink','1134936yIoIni','skillName','3519tCxXry','2KNDYTB','9553200CmErSa','skill','3544197XtSDIE','4Kazpyv','rendered','skillDir','force','836YooAGW','Omitting\x20--type\x20is\x20deprecated;\x20defaulting\x20to\x20write\x20for\x20compatibility.\x20Pass\x20--type\x20read\x20or\x20--type\x20write\x20explicitly.','WRITE','bool','7SSfvwW','Skill\x20directory\x20already\x20exists:\x20','validation','type','str','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','target','45330zqmsen','Created\x20local\x20Skill\x20draft\x20','1464253ylSEVn','create','trim','9091350nbsIAW','path'];a43_0x2c98=function(){return _0x2cdca3;};return a43_0x2c98();}function normalizeSkillTarget(_0x14ee88){const _0xa98457=a43_0x47aab6;return(_0x14ee88||DEFAULT_SKILL_TARGET)[_0xa98457(0x1c0)]()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x38350b,_0x5a2628){const _0x1bf177=a43_0x47aab6;if(existsSync(_0x38350b[_0x1bf177(0x1d2)])){const _0x555571=lstatSync(_0x38350b[_0x1bf177(0x1d2)]);if(!_0x555571['isDirectory']()||_0x555571[_0x1bf177(0x1c8)]())throw CliErrors[_0x1bf177(0x1da)]('Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20'+_0x38350b['skillDir']);if(!_0x5a2628)throw CliErrors[_0x1bf177(0x1da)](_0x1bf177(0x1d9)+_0x38350b[_0x1bf177(0x1d2)],'Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.');}for(const _0x44f9aa of _0x38350b[_0x1bf177(0x1d1)][_0x1bf177(0x1c3)]){const _0x334098=resolve(_0x38350b[_0x1bf177(0x1d2)],_0x44f9aa[_0x1bf177(0x1c2)]),_0x935c3a=dirname(_0x334098);mkdirSync(_0x935c3a,{'recursive':!![]});if(existsSync(_0x334098)&&lstatSync(_0x334098)[_0x1bf177(0x1c8)]())throw CliErrors[_0x1bf177(0x1da)]('Refusing\x20to\x20overwrite\x20symlink:\x20'+_0x334098);writeFileSync(_0x334098,_0x44f9aa['content'],'utf8');}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a44_0x331e81=a44_0x1401;function a44_0x5cfc(){const _0x1870f6=['25qVBuvi','279768fdDhzw','includes','10073091RQNvLC','length','install','production','14543100ABSWyh','authRequired','153bpDTgE','company','2409pDEGON','accessKey','personal','project','scope','\x20personal\x20and\x20','Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','Installed\x20','2HwaTSi','action','filter','bool','updated','force','../../../core/api-client.js','envName','created','2542563wGRDbc','skipped','6PdKmbC','182324PtBxzI','global','skillCode','removed','\x20company\x20Skill(s).','map','1131060vMAzum','all','str','445272nXoNWQ','skillRoots','../../../skills/runtime-skill-sync.js','skill','trim','appCode'];a44_0x5cfc=function(){return _0x1870f6;};return a44_0x5cfc();}(function(_0x369be5,_0x27db2d){const _0x4ca059=a44_0x1401,_0x12f63f=_0x369be5();while(!![]){try{const _0x382c06=-parseInt(_0x4ca059(0x176))/0x1+parseInt(_0x4ca059(0x164))/0x2*(parseInt(_0x4ca059(0x16d))/0x3)+parseInt(_0x4ca059(0x170))/0x4*(-parseInt(_0x4ca059(0x17f))/0x5)+parseInt(_0x4ca059(0x16f))/0x6*(-parseInt(_0x4ca059(0x182))/0x7)+-parseInt(_0x4ca059(0x179))/0x8*(parseInt(_0x4ca059(0x188))/0x9)+-parseInt(_0x4ca059(0x186))/0xa+parseInt(_0x4ca059(0x18a))/0xb*(parseInt(_0x4ca059(0x180))/0xc);if(_0x382c06===_0x27db2d)break;else _0x12f63f['push'](_0x12f63f['shift']());}catch(_0x3dbffa){_0x12f63f['push'](_0x12f63f['shift']());}}}(a44_0x5cfc,0xb846c));function a44_0x1401(_0x18026d,_0x541756){_0x18026d=_0x18026d-0x163;const _0x5cfcf3=a44_0x5cfc();let _0x140155=_0x5cfcf3[_0x18026d];return _0x140155;}import{CliErrors}from'../../../errors.js';import{CODE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';import{summarizeRuntimeSkill}from'../summary.js';export const installCommand={'service':a44_0x331e81(0x17c),'command':a44_0x331e81(0x184),'description':a44_0x331e81(0x190),'risk':'write','requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x48f163){return syncRuntimeSkills(_0x48f163);}};async function syncRuntimeSkills(_0x352e04){const _0x501d68=a44_0x331e81,{downloadRuntimeSkillPackage:_0x1de7a2,listRuntimeSkills:_0x2b973c}=await import(_0x501d68(0x16a)),{linkEffectiveRuntimeSkills:_0xf7d686,materializeRuntimeSkill:_0x3ce18e,pruneStaleRuntimeSkillCache:_0x5b4f5a,pruneStaleRuntimeSkillLinks:_0x509042,resolveRuntimeSkillInstallTarget:_0x411420}=await import(_0x501d68(0x17b)),_0x3e2cde=_0x352e04[_0x501d68(0x178)]('code'),_0x45f3f4=normalizeSyncScopes(_0x352e04[_0x501d68(0x178)](_0x501d68(0x18e))),_0x319ee6=_0x352e04[_0x501d68(0x16b)]??_0x501d68(0x185),_0xad4f3c=_0x352e04[_0x501d68(0x18b)],_0x2a28bb=_0x352e04[_0x501d68(0x167)](_0x501d68(0x169));if(!_0xad4f3c)throw CliErrors[_0x501d68(0x187)]('Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.');const _0x55ca73=_0x411420(_0x352e04[_0x501d68(0x17e)],_0x352e04['bool'](_0x501d68(0x18d))?_0x501d68(0x18d):_0x501d68(0x171)),_0xe545cd=_0x411420(_0x352e04[_0x501d68(0x17e)],_0x55ca73['scope']===_0x501d68(0x18d)?_0x501d68(0x171):'project'),_0x45512f=await Promise[_0x501d68(0x177)](_0x45f3f4[_0x501d68(0x175)](_0x2c001f=>_0x2b973c({'appCode':_0x352e04[_0x501d68(0x17e)],'scope':_0x2c001f,'code':_0x3e2cde['trim']()||undefined}))),_0x1d7552=_0x45f3f4['includes']('personal')?_0x45512f['flatMap']((_0x39ec7d,_0x1685bb)=>_0x45f3f4[_0x1685bb]==='personal'?_0x39ec7d['personal']:[]):[],_0x2ddf8f=_0x45f3f4[_0x501d68(0x181)](_0x501d68(0x189))?_0x45512f['flatMap']((_0x3e9ca6,_0x5bfdb2)=>_0x45f3f4[_0x5bfdb2]==='company'?_0x3e9ca6[_0x501d68(0x189)]:[]):[],_0x193405=new Set([..._0x1d7552['map'](_0x32116c=>_0x32116c[_0x501d68(0x172)]?.[_0x501d68(0x17d)]())['filter'](_0x69f8ef=>Boolean(_0x69f8ef)),..._0x2ddf8f[_0x501d68(0x175)](_0x595aeb=>_0x595aeb['skillCode']?.[_0x501d68(0x17d)]())['filter'](_0x4562d6=>Boolean(_0x4562d6))]),_0x1387cc=_0x3e2cde['trim']()?[_0x3e2cde[_0x501d68(0x17d)]()]:undefined,_0xc6e937=_0x45f3f4[_0x501d68(0x183)]===0x2&&_0x45f3f4['includes'](_0x501d68(0x18c))&&_0x45f3f4[_0x501d68(0x181)]('company'),_0x30f6fe=_0xc6e937?_0x509042(_0x55ca73,_0x193405,_0x1387cc):[],_0x4ee666=_0x5b4f5a({'env':_0x319ee6,'accessKey':_0xad4f3c,'appCode':_0x352e04[_0x501d68(0x17e)],'activeSkillCodes':_0x193405,'pruneSkillCodes':_0x1387cc,'scopes':_0x45f3f4,'protectedLinkRoots':_0xe545cd[_0x501d68(0x17a)]}),_0x28d2e3=[];for(const _0x54033f of _0x1d7552){_0x28d2e3['push'](_0x3ce18e(_0x54033f,_0x501d68(0x18c),{'env':_0x319ee6,'accessKey':_0xad4f3c,'appCode':_0x352e04[_0x501d68(0x17e)],'force':_0x2a28bb,'packageBytes':await downloadSkillPackage(_0x54033f,_0x501d68(0x18c),_0x352e04['appCode'],_0x1de7a2)}));}for(const _0x10bb50 of _0x2ddf8f){_0x28d2e3['push'](_0x3ce18e(_0x10bb50,_0x501d68(0x189),{'env':_0x319ee6,'accessKey':_0xad4f3c,'appCode':_0x352e04[_0x501d68(0x17e)],'force':_0x2a28bb,'packageBytes':await downloadSkillPackage(_0x10bb50,_0x501d68(0x189),_0x352e04[_0x501d68(0x17e)],_0x1de7a2)}));}const _0x5c022b=_0xf7d686(_0x28d2e3,_0x55ca73),_0x30e1a7=countLinkActions(_0x5c022b);return{'ok':!![],'data':{'appCode':_0x352e04[_0x501d68(0x17e)],..._0x55ca73['scope']==='project'?{'installTarget':{'scope':_0x55ca73['scope'],'skillRoots':[..._0x55ca73[_0x501d68(0x17a)]]}}:{},'personal':_0x1d7552[_0x501d68(0x183)],'company':_0x2ddf8f[_0x501d68(0x183)],'materialized':_0x28d2e3[_0x501d68(0x183)],'links':{'total':_0x5c022b[_0x501d68(0x183)],'created':_0x30e1a7[_0x501d68(0x16c)]??0x0,'updated':_0x30e1a7[_0x501d68(0x168)]??0x0,'unchanged':_0x30e1a7['unchanged']??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x30f6fe['filter'](_0x1e8067=>_0x1e8067[_0x501d68(0x165)]===_0x501d68(0x173))[_0x501d68(0x183)],'cacheDirs':_0x4ee666[_0x501d68(0x166)](_0x10d8d5=>_0x10d8d5[_0x501d68(0x165)]===_0x501d68(0x173))[_0x501d68(0x183)],'skipped':[..._0x30f6fe,..._0x4ee666][_0x501d68(0x166)](_0x5cafcd=>_0x5cafcd[_0x501d68(0x165)]===_0x501d68(0x16e))['length']},'skills':{'personal':_0x1d7552[_0x501d68(0x175)](summarizeRuntimeSkill),'company':_0x2ddf8f[_0x501d68(0x175)](summarizeRuntimeSkill)}},'message':_0x501d68(0x163)+_0x1d7552[_0x501d68(0x183)]+_0x501d68(0x18f)+_0x2ddf8f[_0x501d68(0x183)]+_0x501d68(0x174)};}async function downloadSkillPackage(_0x54ad84,_0x3f8500,_0x28f4ad,_0x109a06){const _0x2cdffa=a44_0x331e81,_0x1dd64e=_0x54ad84['version']?.[_0x2cdffa(0x17d)]();return _0x1dd64e?_0x109a06(_0x3f8500,_0x54ad84[_0x2cdffa(0x172)],_0x28f4ad,_0x1dd64e):_0x109a06(_0x3f8500,_0x54ad84[_0x2cdffa(0x172)],_0x28f4ad);}function countLinkActions(_0x1cae40){return _0x1cae40['reduce']((_0xcc928c,_0xf5a992)=>{return _0xcc928c[_0xf5a992['action']]=(_0xcc928c[_0xf5a992['action']]??0x0)+0x1,_0xcc928c;},{});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x37407e=a45_0x49e3;(function(_0x43be51,_0xd9e72d){const _0x27d09e=a45_0x49e3,_0x3f91b9=_0x43be51();while(!![]){try{const _0x3634d0=-parseInt(_0x27d09e(0x192))/0x1*(parseInt(_0x27d09e(0x191))/0x2)+parseInt(_0x27d09e(0x195))/0x3+parseInt(_0x27d09e(0x1a1))/0x4+parseInt(_0x27d09e(0x197))/0x5+-parseInt(_0x27d09e(0x1a9))/0x6*(parseInt(_0x27d09e(0x19d))/0x7)+parseInt(_0x27d09e(0x19a))/0x8*(-parseInt(_0x27d09e(0x193))/0x9)+-parseInt(_0x27d09e(0x1a4))/0xa;if(_0x3634d0===_0xd9e72d)break;else _0x3f91b9['push'](_0x3f91b9['shift']());}catch(_0x3c8aec){_0x3f91b9['push'](_0x3f91b9['shift']());}}}(a45_0x228a,0x83c4b));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG}from'../flags.js';import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';function a45_0x49e3(_0x405394,_0x2b2e33){_0x405394=_0x405394-0x191;const _0x228a48=a45_0x228a();let _0x49e37a=_0x228a48[_0x405394];return _0x49e37a;}import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';export const listCommand={'service':a45_0x37407e(0x194),'command':a45_0x37407e(0x19b),'description':a45_0x37407e(0x1b2),'risk':a45_0x37407e(0x1b0),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x196822){const _0xd7fd66=a45_0x37407e,_0x28b6af=_0x196822[_0xd7fd66(0x1a7)](_0xd7fd66(0x198)),_0x43f7c1=normalizeListScope(_0x196822['str']('scope'));if(_0x196822[_0xd7fd66(0x1b1)](_0xd7fd66(0x19f))){const _0x3b92a3=_0x196822[_0xd7fd66(0x199)];if(!_0x3b92a3)throw CliErrors[_0xd7fd66(0x1aa)]();const {listLocalRuntimeSkills:_0x23000e,resolveRuntimeSkillInstallTarget:_0x1891b8}=await import(_0xd7fd66(0x1ae)),_0x34bede=_0x1891b8(_0x196822['appCode'],_0x196822[_0xd7fd66(0x1b1)](_0xd7fd66(0x19c))?_0xd7fd66(0x19c):'global'),_0x48eddc=_0x23000e({'env':_0x196822['envName']??_0xd7fd66(0x1ab),'accessKey':_0x3b92a3,'appCode':_0x196822['appCode'],'scopes':listScopeToRuntimeScopes(_0x43f7c1),'code':_0x28b6af[_0xd7fd66(0x1a8)]()||undefined},_0x34bede),_0x54a01c=groupLocalRuntimeSkills(_0x48eddc);return{'ok':!![],'data':{'appCode':_0x196822[_0xd7fd66(0x1b3)],'source':_0xd7fd66(0x19f),..._0x34bede['scope']==='project'?{'installScope':_0x34bede['scope']}:{},'scope':_0x43f7c1,'total':_0x48eddc['length'],'personal':_0x54a01c[_0xd7fd66(0x1a0)][_0xd7fd66(0x19e)],'company':_0x54a01c[_0xd7fd66(0x1a2)][_0xd7fd66(0x19e)],'items':_0x48eddc[_0xd7fd66(0x1a5)](summarizeLocalRuntimeSkill),'skills':{'personal':_0x54a01c[_0xd7fd66(0x1a0)][_0xd7fd66(0x1a5)](summarizeLocalRuntimeSkill),'company':_0x54a01c[_0xd7fd66(0x1a2)][_0xd7fd66(0x1a5)](summarizeLocalRuntimeSkill)}},'message':'Listed\x20'+_0x48eddc[_0xd7fd66(0x19e)]+'\x20local\x20Skill(s).'};}const {listRuntimeSkills:_0x2ed7cb}=await import(_0xd7fd66(0x1ac)),_0x3795ef=await _0x2ed7cb({'appCode':_0x196822[_0xd7fd66(0x1b3)],'scope':listScopeToRemoteScope(_0x43f7c1),'code':_0x28b6af[_0xd7fd66(0x1a8)]()||undefined}),_0x31b546=shouldListScope(_0x43f7c1,_0xd7fd66(0x1a0))?_0x3795ef[_0xd7fd66(0x1a0)]??[]:[],_0x32e0c3=shouldListScope(_0x43f7c1,'company')?_0x3795ef[_0xd7fd66(0x1a2)]??[]:[],_0xa5e9c8=[..._0x31b546,..._0x32e0c3];return{'ok':!![],'data':{'appCode':_0x196822[_0xd7fd66(0x1b3)],'source':_0xd7fd66(0x1b4),'scope':_0x43f7c1,'total':_0xa5e9c8[_0xd7fd66(0x19e)],'personal':_0x31b546[_0xd7fd66(0x19e)],'company':_0x32e0c3[_0xd7fd66(0x19e)],'items':_0xa5e9c8[_0xd7fd66(0x1a5)](summarizeRuntimeSkill),'skills':{'personal':_0x31b546['map'](summarizeRuntimeSkill),'company':_0x32e0c3['map'](summarizeRuntimeSkill)}},'message':_0xd7fd66(0x1af)+_0xa5e9c8[_0xd7fd66(0x19e)]+_0xd7fd66(0x1ad)};}};function a45_0x228a(){const _0x513902=['1274IrOOsw','length','local','personal','2957192FbpcDh','company','scope','8038210xPirhw','map','filter','str','trim','618xuZEpF','authRequired','production','../../../core/api-client.js','\x20remote\x20Skill(s).','../../../skills/runtime-skill-sync.js','Listed\x20','read','bool','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','appCode','remote','410LHiCBs','2qRHfNM','3921093UDEqqV','skill','3068367dDjjFv','builtin','181450esJJey','code','accessKey','8borNgX','list','project'];a45_0x228a=function(){return _0x513902;};return a45_0x228a();}function groupLocalRuntimeSkills(_0x18f80d){const _0x40eb6c=a45_0x37407e;return{'personal':_0x18f80d[_0x40eb6c(0x1a6)](_0x9cd35a=>_0x9cd35a['scope']===_0x40eb6c(0x1a0)),'company':_0x18f80d[_0x40eb6c(0x1a6)](_0x1ea8eb=>_0x1ea8eb['scope']===_0x40eb6c(0x1a2)),'builtin':_0x18f80d[_0x40eb6c(0x1a6)](_0x1d9abc=>_0x1d9abc[_0x40eb6c(0x1a3)]===_0x40eb6c(0x196))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a46_0x269649=a46_0x1c4d;(function(_0x15845d,_0x175730){const _0x4fbfaf=a46_0x1c4d,_0x22947c=_0x15845d();while(!![]){try{const _0x3ffad0=parseInt(_0x4fbfaf(0x1e1))/0x1+-parseInt(_0x4fbfaf(0x1e5))/0x2*(parseInt(_0x4fbfaf(0x1e3))/0x3)+-parseInt(_0x4fbfaf(0x1ea))/0x4*(parseInt(_0x4fbfaf(0x1e6))/0x5)+parseInt(_0x4fbfaf(0x1e7))/0x6+-parseInt(_0x4fbfaf(0x1e8))/0x7+parseInt(_0x4fbfaf(0x1e9))/0x8+-parseInt(_0x4fbfaf(0x1e4))/0x9;if(_0x3ffad0===_0x175730)break;else _0x22947c['push'](_0x22947c['shift']());}catch(_0x15058a){_0x22947c['push'](_0x22947c['shift']());}}}(a46_0x4944,0xc76e9));function a46_0x1c4d(_0x122949,_0x37e771){_0x122949=_0x122949-0x1e0;const _0x4944fb=a46_0x4944();let _0x1c4d1c=_0x4944fb[_0x122949];return _0x1c4d1c;}import{CONFIRM_WARNINGS_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';function a46_0x4944(){const _0x3cf3fd=['skill','write','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20scope\x20or\x20submit\x20company\x20scope\x20for\x20review','1361123XznaoG','push','2346zbMkeX','2323836FeaKlz','3826FIabqI','5ZAToPW','9583236WWTROj','9227043YRbaGD','8265888bLSMuH','409492pBXsIX'];a46_0x4944=function(){return _0x3cf3fd;};return a46_0x4944();}import{skillPushDryRun,skillPushExecute}from'../push-execute.js';export const pushCommand={'service':a46_0x269649(0x1eb),'command':a46_0x269649(0x1e2),'description':a46_0x269649(0x1e0),'risk':a46_0x269649(0x1ec),'flags':[DIR_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x24599c=a47_0x1f52;(function(_0x8d151f,_0x5e978a){const _0x1d2f94=a47_0x1f52,_0x19dc51=_0x8d151f();while(!![]){try{const _0x7713b5=parseInt(_0x1d2f94(0x14f))/0x1+-parseInt(_0x1d2f94(0x160))/0x2+parseInt(_0x1d2f94(0x151))/0x3*(parseInt(_0x1d2f94(0x14e))/0x4)+-parseInt(_0x1d2f94(0x155))/0x5*(parseInt(_0x1d2f94(0x15b))/0x6)+-parseInt(_0x1d2f94(0x159))/0x7+-parseInt(_0x1d2f94(0x158))/0x8+-parseInt(_0x1d2f94(0x150))/0x9*(-parseInt(_0x1d2f94(0x154))/0xa);if(_0x7713b5===_0x5e978a)break;else _0x19dc51['push'](_0x19dc51['shift']());}catch(_0x1a1a41){_0x19dc51['push'](_0x19dc51['shift']());}}}(a47_0x1f4a,0xe96d8));import{DIR_FLAG,STRICT_FLAG}from'../flags.js';function a47_0x1f52(_0x2946d5,_0x447647){_0x2946d5=_0x2946d5-0x14e;const _0x1f4ad1=a47_0x1f4a();let _0x1f523a=_0x1f4ad1[_0x2946d5];return _0x1f523a;}import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';function a47_0x1f4a(){const _0x126fd3=['skill','1081758vONXVM','589884INTiCj','1380900sQVLHz','36rmrtcX','21sYJntV','dir','read','1009230OkwuRu','5570255rTyYLS','strict','str','1589280WzSpry','50253nfRbPG','Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','6moRaYv','validate','errors','type'];a47_0x1f4a=function(){return _0x126fd3;};return a47_0x1f4a();}export const validateCommand={'service':a47_0x24599c(0x15f),'command':a47_0x24599c(0x15c),'description':a47_0x24599c(0x15a),'risk':a47_0x24599c(0x153),'requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x366a4b){const _0x598478=a47_0x24599c,_0x194cc1=_0x366a4b['bool'](_0x598478(0x156)),_0x5561f4=validateSkillDirectory(_0x366a4b[_0x598478(0x157)](_0x598478(0x152)),{'strict':_0x194cc1});return throwIfSkillValidationFailed(_0x5561f4,_0x194cc1),{'ok':!![],'data':{'dir':_0x5561f4[_0x598478(0x152)],'type':_0x5561f4[_0x598478(0x15e)],'errors':_0x5561f4[_0x598478(0x15d)],'warnings':_0x5561f4['warnings']},'message':'Skill\x20validation\x20passed.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a48_0x4b3b(_0x3c88d0,_0x1f7b43){_0x3c88d0=_0x3c88d0-0x1e2;const _0x383417=a48_0x3834();let _0x4b3b0d=_0x383417[_0x3c88d0];return _0x4b3b0d;}const a48_0x3c4d48=a48_0x4b3b;(function(_0x259410,_0x3721ce){const _0x1d4b92=a48_0x4b3b,_0x14fd26=_0x259410();while(!![]){try{const _0x1c8be8=parseInt(_0x1d4b92(0x1f2))/0x1*(parseInt(_0x1d4b92(0x1ef))/0x2)+parseInt(_0x1d4b92(0x1fd))/0x3+-parseInt(_0x1d4b92(0x1f9))/0x4*(parseInt(_0x1d4b92(0x1f7))/0x5)+-parseInt(_0x1d4b92(0x1f8))/0x6+-parseInt(_0x1d4b92(0x1fe))/0x7+parseInt(_0x1d4b92(0x1e2))/0x8*(parseInt(_0x1d4b92(0x1e9))/0x9)+-parseInt(_0x1d4b92(0x1f5))/0xa;if(_0x1c8be8===_0x3721ce)break;else _0x14fd26['push'](_0x14fd26['shift']());}catch(_0x38a2cc){_0x14fd26['push'](_0x14fd26['shift']());}}}(a48_0x3834,0x21088));import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':a48_0x3c4d48(0x1f3),'type':a48_0x3c4d48(0x205),'description':a48_0x3c4d48(0x1f6)};export const SCOPE_FLAG={'name':a48_0x3c4d48(0x1e5),'type':'string','description':a48_0x3c4d48(0x1ee),'enum':[a48_0x3c4d48(0x1ea),a48_0x3c4d48(0x1f0),a48_0x3c4d48(0x202)]};export const PUSH_SCOPE_FLAG={'name':'scope','type':a48_0x3c4d48(0x205),'description':a48_0x3c4d48(0x200),'default':'personal','enum':[a48_0x3c4d48(0x1f0),a48_0x3c4d48(0x202)]};export const LIST_SCOPE_FLAG={'name':a48_0x3c4d48(0x1e5),'type':a48_0x3c4d48(0x205),'description':a48_0x3c4d48(0x204),'enum':[a48_0x3c4d48(0x1ea),'personal','company']};export const LOCAL_FLAG={'name':a48_0x3c4d48(0x1ff),'type':a48_0x3c4d48(0x1ec),'description':a48_0x3c4d48(0x1fb)};export const DIR_FLAG={'name':a48_0x3c4d48(0x1fa),'type':a48_0x3c4d48(0x205),'required':!![],'description':'Local\x20Skill\x20directory\x20containing\x20SKILL.md'};export const CREATE_NAME_FLAG={'name':a48_0x3c4d48(0x1f1),'type':a48_0x3c4d48(0x205),'required':!![],'description':a48_0x3c4d48(0x1eb),'pattern':{'regex':SKILL_NAME_PATTERN,'description':a48_0x3c4d48(0x1f4)}};export const TYPE_FLAG={'name':a48_0x3c4d48(0x1e7),'type':'string','description':a48_0x3c4d48(0x201),'enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':a48_0x3c4d48(0x1e8),'type':a48_0x3c4d48(0x205),'description':a48_0x3c4d48(0x1e6),'default':DEFAULT_SKILL_TARGET};export const FORCE_FLAG={'name':a48_0x3c4d48(0x1e4),'type':'boolean','description':a48_0x3c4d48(0x1fc)};export const PROJECT_TARGET_FLAG={'name':a48_0x3c4d48(0x1ed),'type':a48_0x3c4d48(0x1ec),'description':a48_0x3c4d48(0x203)};function a48_0x3834(){const _0x11224b=['force','scope','Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','type','target','117XIGDRy','all','Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','boolean','project','Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','10laJvTg','personal','name','34263ttxEyv','code','lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens','1798260qucjWE','Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code','5HnuvRT','121266BAOrCZ','13564bnJSPc','dir','Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists','Overwrite\x20generated\x20or\x20CLI-managed\x20Skill\x20files\x20when\x20the\x20target\x20already\x20exists','804891LLUuWY','917826AcCfJr','local','Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review','Skill\x20template\x20type:\x20pass\x20read\x20or\x20write\x20explicitly\x20(omission\x20is\x20deprecated)','company','Use\x20the\x20current\x20project\x27s\x20.agents/skills\x20instead\x20of\x20user-level\x20Agent\x20Skill\x20directories','Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','string','18608xdnsPk','Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled'];a48_0x3834=function(){return _0x11224b;};return a48_0x3834();}export const CONFIRM_WARNINGS_FLAG={'name':'confirm-warnings','type':a48_0x3c4d48(0x1ec),'description':'Confirm\x20reviewed\x20personal\x20or\x20company\x20Skill\x20publish\x20warnings'};export const STRICT_FLAG={'name':'strict','type':'boolean','description':a48_0x3c4d48(0x1e3)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a2787,_0x43af24){const _0x4afe77=a49_0xabbd,_0x2488d2=_0x5a2787();while(!![]){try{const _0x536884=-parseInt(_0x4afe77(0xef))/0x1*(-parseInt(_0x4afe77(0xeb))/0x2)+parseInt(_0x4afe77(0xee))/0x3+parseInt(_0x4afe77(0xec))/0x4*(-parseInt(_0x4afe77(0xed))/0x5)+-parseInt(_0x4afe77(0xf4))/0x6*(-parseInt(_0x4afe77(0xf3))/0x7)+parseInt(_0x4afe77(0xea))/0x8+parseInt(_0x4afe77(0xf1))/0x9+parseInt(_0x4afe77(0xf2))/0xa*(-parseInt(_0x4afe77(0xf0))/0xb);if(_0x536884===_0x43af24)break;else _0x2488d2['push'](_0x2488d2['shift']());}catch(_0x3d85c2){_0x2488d2['push'](_0x2488d2['shift']());}}}(a49_0x4b67,0x8f16f));import{createCommand}from'./commands/create.js';import{installCommand}from'./commands/install.js';import{listCommand}from'./commands/list.js';import{pushCommand}from'./commands/push.js';import{validateCommand}from'./commands/validate.js';function a49_0xabbd(_0x194820,_0x4d8865){_0x194820=_0x194820-0xea;const _0x4b67e7=a49_0x4b67();let _0xabbde1=_0x4b67e7[_0x194820];return _0xabbde1;}function a49_0x4b67(){const _0x104364=['3469062pYCxUz','1mInLwb','11TftoIe','2569338OFPPFW','26048290NHfYaS','3997tJJKgY','7674gfKncl','1918672eUpbyD','1585838seZKdk','136rlSjsJ','2055vzlwzf'];a49_0x4b67=function(){return _0x104364;};return a49_0x4b67();}export const skillDefinitions=[installCommand,createCommand,validateCommand,listCommand,pushCommand];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a50_0x541f(_0x1da11a,_0x233a6c){_0x1da11a=_0x1da11a-0xec;var _0x124821=a50_0x1248();var _0x541f00=_0x124821[_0x1da11a];return _0x541f00;}(function(_0x31e4b5,_0x54a6a5){var _0x32c9ae=a50_0x541f,_0xead7f8=_0x31e4b5();while(!![]){try{var _0x5760c7=-parseInt(_0x32c9ae(0xef))/0x1*(-parseInt(_0x32c9ae(0xf7))/0x2)+-parseInt(_0x32c9ae(0xf1))/0x3*(parseInt(_0x32c9ae(0xf3))/0x4)+-parseInt(_0x32c9ae(0xec))/0x5+-parseInt(_0x32c9ae(0xfb))/0x6*(parseInt(_0x32c9ae(0xf9))/0x7)+-parseInt(_0x32c9ae(0xf4))/0x8+parseInt(_0x32c9ae(0xf8))/0x9+parseInt(_0x32c9ae(0xf5))/0xa;if(_0x5760c7===_0x54a6a5)break;else _0xead7f8['push'](_0xead7f8['shift']());}catch(_0x10404a){_0xead7f8['push'](_0xead7f8['shift']());}}}(a50_0x1248,0x8edee));export function isPackageBackedManifest(_0x2af74a){var _0x45a0fc=a50_0x541f;return!!_0x2af74a&&typeof _0x2af74a===_0x45a0fc(0xf2)&&!Array[_0x45a0fc(0xed)](_0x2af74a)&&typeof _0x2af74a[_0x45a0fc(0xee)]==='string'&&_0x2af74a[_0x45a0fc(0xee)][_0x45a0fc(0xfa)]>0x0&&Array[_0x45a0fc(0xed)](_0x2af74a['files']);}export function isMultiFileManifest(_0x531770){var _0x3f43c7=a50_0x541f;return!!_0x531770&&typeof _0x531770===_0x3f43c7(0xf2)&&!Array[_0x3f43c7(0xed)](_0x531770)&&Array[_0x3f43c7(0xed)](_0x531770[_0x3f43c7(0xf0)])&&_0x531770[_0x3f43c7(0xf0)][_0x3f43c7(0xf6)](_0x2ec308=>_0x2ec308['path']!=='SKILL.md');}function a50_0x1248(){var _0x25e898=['25239510wJbCJs','some','750rUQMmB','7743591zYjHNa','119uWLxDP','length','401358inguey','4576765hfZtZV','isArray','ossPath','613leZWLU','files','3FyqNid','object','3705320LEKTyZ','401304xmYnHz'];a50_0x1248=function(){return _0x25e898;};return a50_0x1248();}
|