@lovrabet/lovrabet-cli 2.1.17 → 2.1.18-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schedule/index.js +1 -0
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_0x257e54=a40_0x22ea;(function(_0x5c82d6,_0x1234c9){const _0x5da70d=a40_0x22ea,_0x7540ea=_0x5c82d6();while(!![]){try{const _0x11dc69=parseInt(_0x5da70d(0x187))/0x1*(-parseInt(_0x5da70d(0x1b3))/0x2)+parseInt(_0x5da70d(0x1cb))/0x3*(parseInt(_0x5da70d(0x1a4))/0x4)+parseInt(_0x5da70d(0x1bd))/0x5*(-parseInt(_0x5da70d(0x197))/0x6)+parseInt(_0x5da70d(0x1a5))/0x7+parseInt(_0x5da70d(0x19a))/0x8+-parseInt(_0x5da70d(0x1b1))/0x9*(parseInt(_0x5da70d(0x1bf))/0xa)+parseInt(_0x5da70d(0x1cd))/0xb*(parseInt(_0x5da70d(0x190))/0xc);if(_0x11dc69===_0x1234c9)break;else _0x7540ea['push'](_0x7540ea['shift']());}catch(_0x53b196){_0x7540ea['push'](_0x7540ea['shift']());}}}(a40_0xa7b4,0xc9e2d));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';function a40_0x22ea(_0x2e52d2,_0x26c549){_0x2e52d2=_0x2e52d2-0x187;const _0xa7b481=a40_0xa7b4();let _0x22ea88=_0xa7b481[_0x2e52d2];return _0x22ea88;}function a40_0xa7b4(){const _0x2f1d0f=['required','remove','Service\x20Tree\x20manifest\x20file\x20path','entries','WRITE','report','map','length','2628NNGSDD','2021362KLlUFj','warnings','hash','name','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','errors','str','Imported\x20','commands','target','registryServiceCode','registryPath','27lWmbqM','list','148388OoTCxN','Export\x20a\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','manifests','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','entry','serviceCount','Local\x20service\x20not\x20found:\x20','service','replaced','Imported','5ptQgcF','file','5224250dAGUUo','flags','normalizedManifest','validate','type','reduce','\x20service(s),\x20updated\x20','source','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','kind','serviceCode','lower\x20kebab-case\x20service\x20code','7482NzOodb','read','1474opDrZS','filePath','Service\x20manifest\x20validation\x20passed.','description','20dZvBav','\x20service(s).','write','export','version','detail','registryIndex','Exported\x20service\x20','Updated','92160wvoirL','string','imported','updated','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','manifest','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','627528HKGcMA','risk','cliName','8209792UeJwgs','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest'];a40_0xa7b4=function(){return _0x2f1d0f;};return a40_0xa7b4();}const FILE_FLAG={'name':'file','type':a40_0x257e54(0x191),'required':!![],'description':a40_0x257e54(0x19e)},SERVICE_FLAG={'name':a40_0x257e54(0x1ba),'type':'string','required':!![],'description':'Local\x20service\x20code,\x20for\x20example\x20crm','pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a40_0x257e54(0x1ca)}};function summarizeService(_0x477dfd){const _0x18e128=a40_0x257e54;return{'serviceCode':_0x477dfd['serviceCode'],'name':_0x477dfd[_0x18e128(0x1c1)]['service'][_0x18e128(0x1a8)],'version':_0x477dfd[_0x18e128(0x18b)],'importedAt':_0x477dfd['importedAt'],'source':_0x477dfd[_0x18e128(0x1c6)],'commandCount':_0x477dfd[_0x18e128(0x1c1)]['commands'][_0x18e128(0x1a3)],'commands':_0x477dfd[_0x18e128(0x1c1)][_0x18e128(0x1ad)][_0x18e128(0x1a2)](_0x2b1f96=>({'path':_0x2b1f96['cliPath'],'description':_0x2b1f96[_0x18e128(0x1d0)],'risk':_0x2b1f96[_0x18e128(0x198)],'target':toPublicServiceTreeTarget(_0x2b1f96[_0x18e128(0x1ae)]),'flags':_0x2b1f96[_0x18e128(0x1c0)][_0x18e128(0x1a2)](_0x4d6f96=>({'name':_0x4d6f96[_0x18e128(0x1a8)],'cliName':_0x4d6f96[_0x18e128(0x199)],'type':_0x4d6f96[_0x18e128(0x1c3)],'required':_0x4d6f96[_0x18e128(0x19c)]===!![]}))}))};}function summarizeLoadedManifest(_0x18cde4){const _0x71249d=a40_0x257e54;return{'service':_0x18cde4['normalizedManifest']?.[_0x71249d(0x1ba)],'version':_0x18cde4[_0x71249d(0x1c1)]?.['version'],'commandCount':_0x18cde4[_0x71249d(0x1c1)]?.[_0x71249d(0x1ad)]['length']??0x0,'commands':_0x18cde4['normalizedManifest']?.['commands'][_0x71249d(0x1a2)](_0x5b1f5e=>({'path':_0x5b1f5e['cliPath'],'risk':_0x5b1f5e[_0x71249d(0x198)],'target':toPublicServiceTreeTarget(_0x5b1f5e[_0x71249d(0x1ae)])}))??[],'registryIndex':_0x18cde4[_0x71249d(0x18d)],'registryServiceCode':_0x18cde4[_0x71249d(0x1af)],'errors':_0x18cde4[_0x71249d(0x1a1)]['errors'],'warnings':_0x18cde4['report'][_0x71249d(0x1a6)]};}export const serviceDefinitions=[{'service':'service','command':a40_0x257e54(0x1c2),'description':a40_0x257e54(0x19b),'risk':a40_0x257e54(0x1cc),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x2fe474){const _0xc282bc=a40_0x257e54,_0x4d3fcc=loadServiceManifestFromFile(_0x2fe474[_0xc282bc(0x1ab)](_0xc282bc(0x1be)));if(!_0x4d3fcc['report']['ok'])return{'ok':![],'data':{'file':_0x4d3fcc[_0xc282bc(0x1ce)],'hash':_0x4d3fcc[_0xc282bc(0x1a7)],'kind':_0x4d3fcc[_0xc282bc(0x1c8)],'serviceCount':_0x4d3fcc[_0xc282bc(0x1b5)][_0xc282bc(0x1a3)],'services':_0x4d3fcc[_0xc282bc(0x1b5)][_0xc282bc(0x1a2)](summarizeLoadedManifest),'errors':_0x4d3fcc[_0xc282bc(0x1a1)]['errors'],'warnings':_0x4d3fcc[_0xc282bc(0x1a1)][_0xc282bc(0x1a6)]},'message':formatValidationFailure(_0x4d3fcc[_0xc282bc(0x1a1)])};if(_0x4d3fcc[_0xc282bc(0x1c8)]==='registry'||_0x4d3fcc['manifests'][_0xc282bc(0x1a3)]!==0x1)return{'ok':!![],'data':{'file':_0x4d3fcc[_0xc282bc(0x1ce)],'hash':_0x4d3fcc[_0xc282bc(0x1a7)],'kind':_0x4d3fcc[_0xc282bc(0x1c8)],'serviceCount':_0x4d3fcc['manifests'][_0xc282bc(0x1a3)],'commandCount':_0x4d3fcc['manifests'][_0xc282bc(0x1c4)]((_0x1be7e0,_0x5bb72a)=>_0x1be7e0+(_0x5bb72a['normalizedManifest']?.['commands'][_0xc282bc(0x1a3)]??0x0),0x0),'services':_0x4d3fcc['manifests'][_0xc282bc(0x1a2)](summarizeLoadedManifest),'warnings':_0x4d3fcc[_0xc282bc(0x1a1)][_0xc282bc(0x1a6)]},'message':'Service\x20registry\x20validation\x20passed.'};return{'ok':!![],'data':{'file':_0x4d3fcc[_0xc282bc(0x1ce)],'hash':_0x4d3fcc[_0xc282bc(0x1a7)],'kind':_0x4d3fcc[_0xc282bc(0x1c8)],'service':_0x4d3fcc['normalizedManifest']?.[_0xc282bc(0x1ba)],'version':_0x4d3fcc[_0xc282bc(0x1c1)]?.['version'],'commandCount':_0x4d3fcc[_0xc282bc(0x1c1)]?.[_0xc282bc(0x1ad)][_0xc282bc(0x1a3)]??0x0,'commands':_0x4d3fcc['normalizedManifest']?.[_0xc282bc(0x1ad)]['map'](_0x32f2f7=>({'path':_0x32f2f7['cliPath'],'risk':_0x32f2f7[_0xc282bc(0x198)],'target':toPublicServiceTreeTarget(_0x32f2f7['target'])})),'warnings':_0x4d3fcc[_0xc282bc(0x1a1)][_0xc282bc(0x1a6)]},'message':_0xc282bc(0x1cf)};}},{'service':a40_0x257e54(0x1ba),'command':'import','description':a40_0x257e54(0x1a9),'risk':a40_0x257e54(0x189),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x2dd9e7){const _0x1e51b1=a40_0x257e54,_0x4ef148=loadServiceManifestFromFile(_0x2dd9e7['str'](_0x1e51b1(0x1be)));return{'method':_0x1e51b1(0x1a0),'url':getServiceRegistryPath(),'body':{'file':_0x4ef148[_0x1e51b1(0x1ce)],'hash':_0x4ef148[_0x1e51b1(0x1a7)],'kind':_0x4ef148[_0x1e51b1(0x1c8)],'ok':_0x4ef148['report']['ok'],'service':_0x4ef148[_0x1e51b1(0x1c1)]?.[_0x1e51b1(0x1ba)],'version':_0x4ef148['normalizedManifest']?.['version'],'serviceCount':_0x4ef148[_0x1e51b1(0x1b5)]['length'],'services':_0x4ef148['manifests'][_0x1e51b1(0x1a2)](_0x5e9699=>({'service':_0x5e9699[_0x1e51b1(0x1c1)]?.['service'],'version':_0x5e9699[_0x1e51b1(0x1c1)]?.[_0x1e51b1(0x18b)],'commandCount':_0x5e9699[_0x1e51b1(0x1c1)]?.['commands']['length']??0x0,'errors':_0x5e9699[_0x1e51b1(0x1a1)][_0x1e51b1(0x1aa)]})),'errors':_0x4ef148[_0x1e51b1(0x1a1)][_0x1e51b1(0x1aa)],'commandCount':_0x4ef148[_0x1e51b1(0x1c1)]?.[_0x1e51b1(0x1ad)]['length']??0x0},'description':_0x1e51b1(0x196)};},async 'execute'(_0x6a459){const _0x547695=a40_0x257e54,_0x511557=importServiceManifest(_0x6a459[_0x547695(0x1ab)]('file'));if(_0x511557[_0x547695(0x19f)][_0x547695(0x1a3)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x511557[_0x547695(0x1b0)],'imported':_0x511557[_0x547695(0x192)],'updated':_0x511557[_0x547695(0x193)],'serviceCount':_0x511557[_0x547695(0x1b8)],'services':_0x511557[_0x547695(0x19f)][_0x547695(0x1a2)](summarizeService)},'message':_0x547695(0x1ac)+_0x511557[_0x547695(0x192)]+_0x547695(0x1c5)+_0x511557[_0x547695(0x193)]+_0x547695(0x188)};return{'ok':!![],'data':{'registryPath':_0x511557[_0x547695(0x1b0)],'replaced':_0x511557[_0x547695(0x1bb)],'imported':_0x511557[_0x547695(0x192)],'updated':_0x511557[_0x547695(0x193)],'serviceCount':_0x511557[_0x547695(0x1b8)],'service':summarizeService(_0x511557[_0x547695(0x1b7)])},'message':(_0x511557['replaced']?_0x547695(0x18f):_0x547695(0x1bc))+'\x20service\x20'+_0x511557[_0x547695(0x1b7)][_0x547695(0x1c9)]+'.'};}},{'service':'service','command':a40_0x257e54(0x18a),'description':a40_0x257e54(0x1b4),'risk':a40_0x257e54(0x189),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x387731){const _0x3be064=a40_0x257e54,_0x1a3e0d=getLocalServiceEntry(_0x387731[_0x3be064(0x1ab)](_0x3be064(0x1ba)));return{'method':_0x3be064(0x1a0),'url':_0x387731[_0x3be064(0x1ab)](_0x3be064(0x1be)),'body':{'service':_0x387731[_0x3be064(0x1ab)](_0x3be064(0x1ba)),'found':Boolean(_0x1a3e0d),'version':_0x1a3e0d?.[_0x3be064(0x18b)],'source':_0x1a3e0d?.[_0x3be064(0x1c6)]},'description':'Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json'};},async 'execute'(_0x166050){const _0x8d0967=a40_0x257e54,_0x55e951=exportServiceManifest(_0x166050['str'](_0x8d0967(0x1ba)),_0x166050[_0x8d0967(0x1ab)]('file'));return{'ok':!![],'data':{'registryPath':_0x55e951[_0x8d0967(0x1b0)],'file':_0x55e951[_0x8d0967(0x1ce)],'service':summarizeService(_0x55e951[_0x8d0967(0x1b7)])},'message':_0x8d0967(0x18e)+_0x55e951['entry'][_0x8d0967(0x1c9)]+'.'};}},{'service':a40_0x257e54(0x1ba),'command':a40_0x257e54(0x1b2),'description':a40_0x257e54(0x194),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x594ac1=a40_0x257e54,_0xe33d04=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0xe33d04[_0x594ac1(0x1a3)],'services':_0xe33d04[_0x594ac1(0x1a2)](summarizeService)}};}},{'service':'service','command':a40_0x257e54(0x19d),'description':'Remove\x20a\x20local\x20Service\x20Tree\x20manifest\x20from\x20the\x20runtime\x20registry','risk':a40_0x257e54(0x189),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0xd37a4){const _0x5e61e7=a40_0x257e54,_0x2e1e25=getLocalServiceEntry(_0xd37a4[_0x5e61e7(0x1ab)]('service'));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'service':_0xd37a4[_0x5e61e7(0x1ab)](_0x5e61e7(0x1ba)),'found':Boolean(_0x2e1e25),'version':_0x2e1e25?.[_0x5e61e7(0x18b)],'source':_0x2e1e25?.['source']},'description':_0x5e61e7(0x1c7)};},async 'execute'(_0x246347){const _0x18c6e0=a40_0x257e54,_0x3d4645=removeServiceManifest(_0x246347['str']('service'));return{'ok':!![],'data':{'registryPath':_0x3d4645[_0x18c6e0(0x1b0)],'serviceCount':_0x3d4645[_0x18c6e0(0x1b8)],'service':summarizeService(_0x3d4645['entry'])},'message':'Removed\x20service\x20'+_0x3d4645[_0x18c6e0(0x1b7)][_0x18c6e0(0x1c9)]+'.'};}},{'service':'service','command':a40_0x257e54(0x18c),'description':a40_0x257e54(0x1b6),'risk':a40_0x257e54(0x1cc),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x2983b8){const _0x13f38c=a40_0x257e54,_0x28ceda=getLocalServiceEntry(_0x2983b8[_0x13f38c(0x1ab)](_0x13f38c(0x1ba)));if(!_0x28ceda)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x2983b8[_0x13f38c(0x1ab)]('service')},'message':_0x13f38c(0x1b9)+_0x2983b8[_0x13f38c(0x1ab)](_0x13f38c(0x1ba))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x28ceda),'manifest':_0x28ceda[_0x13f38c(0x195)],'normalizedManifest':toPublicNormalizedServiceTree(_0x28ceda[_0x13f38c(0x1c1)])}};}}];
|
|
1
|
+
function a41_0x2891(_0x10f59c,_0x40689f){_0x10f59c=_0x10f59c-0x157;const _0x331d6c=a41_0x331d();let _0x289180=_0x331d6c[_0x10f59c];return _0x289180;}const a41_0x592599=a41_0x2891;(function(_0x5c170b,_0x52cb7c){const _0x5ad074=a41_0x2891,_0x4541c7=_0x5c170b();while(!![]){try{const _0x4b86ae=-parseInt(_0x5ad074(0x180))/0x1+-parseInt(_0x5ad074(0x16f))/0x2+-parseInt(_0x5ad074(0x15e))/0x3*(parseInt(_0x5ad074(0x165))/0x4)+-parseInt(_0x5ad074(0x198))/0x5*(parseInt(_0x5ad074(0x179))/0x6)+-parseInt(_0x5ad074(0x16b))/0x7+parseInt(_0x5ad074(0x174))/0x8*(-parseInt(_0x5ad074(0x161))/0x9)+parseInt(_0x5ad074(0x178))/0xa*(parseInt(_0x5ad074(0x18e))/0xb);if(_0x4b86ae===_0x52cb7c)break;else _0x4541c7['push'](_0x4541c7['shift']());}catch(_0x17e4dc){_0x4541c7['push'](_0x4541c7['shift']());}}}(a41_0x331d,0xbfacc));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':a41_0x592599(0x18c),'type':'string','required':!![],'description':a41_0x592599(0x187)},SERVICE_FLAG={'name':'service','type':a41_0x592599(0x169),'required':!![],'description':a41_0x592599(0x196),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':'lower\x20kebab-case\x20service\x20code'}};function summarizeService(_0x307246){const _0x430284=a41_0x592599;return{'serviceCode':_0x307246['serviceCode'],'name':_0x307246['normalizedManifest'][_0x430284(0x17e)]['name'],'version':_0x307246[_0x430284(0x19d)],'importedAt':_0x307246['importedAt'],'source':_0x307246[_0x430284(0x188)],'commandCount':_0x307246['normalizedManifest']['commands'][_0x430284(0x15b)],'commands':_0x307246[_0x430284(0x19a)][_0x430284(0x18f)][_0x430284(0x160)](_0x3e1b10=>({'path':_0x3e1b10[_0x430284(0x170)],'description':_0x3e1b10[_0x430284(0x15d)],'risk':_0x3e1b10[_0x430284(0x16d)],'target':toPublicServiceTreeTarget(_0x3e1b10['target']),'flags':_0x3e1b10[_0x430284(0x19e)][_0x430284(0x160)](_0x565bd7=>({'name':_0x565bd7[_0x430284(0x190)],'cliName':_0x565bd7[_0x430284(0x164)],'type':_0x565bd7[_0x430284(0x166)],'required':_0x565bd7[_0x430284(0x159)]===!![]}))}))};}function summarizeLoadedManifest(_0x2c9fea){const _0x390923=a41_0x592599;return{'service':_0x2c9fea[_0x390923(0x19a)]?.['service'],'version':_0x2c9fea[_0x390923(0x19a)]?.[_0x390923(0x19d)],'commandCount':_0x2c9fea[_0x390923(0x19a)]?.[_0x390923(0x18f)][_0x390923(0x15b)]??0x0,'commands':_0x2c9fea['normalizedManifest']?.[_0x390923(0x18f)][_0x390923(0x160)](_0x81d5f6=>({'path':_0x81d5f6[_0x390923(0x170)],'risk':_0x81d5f6['risk'],'target':toPublicServiceTreeTarget(_0x81d5f6['target'])}))??[],'registryIndex':_0x2c9fea[_0x390923(0x163)],'registryServiceCode':_0x2c9fea[_0x390923(0x16a)],'errors':_0x2c9fea[_0x390923(0x19c)][_0x390923(0x17c)],'warnings':_0x2c9fea[_0x390923(0x19c)][_0x390923(0x182)]};}export const serviceDefinitions=[{'service':a41_0x592599(0x17e),'command':'validate','description':a41_0x592599(0x181),'risk':a41_0x592599(0x16e),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x2533bf){const _0x1d1773=a41_0x592599,_0x1d6192=loadServiceManifestFromFile(_0x2533bf[_0x1d1773(0x162)]('file'));if(!_0x1d6192[_0x1d1773(0x19c)]['ok'])return{'ok':![],'data':{'file':_0x1d6192[_0x1d1773(0x175)],'hash':_0x1d6192[_0x1d1773(0x15c)],'kind':_0x1d6192[_0x1d1773(0x183)],'serviceCount':_0x1d6192[_0x1d1773(0x171)][_0x1d1773(0x15b)],'services':_0x1d6192[_0x1d1773(0x171)][_0x1d1773(0x160)](summarizeLoadedManifest),'errors':_0x1d6192['report'][_0x1d1773(0x17c)],'warnings':_0x1d6192[_0x1d1773(0x19c)][_0x1d1773(0x182)]},'message':formatValidationFailure(_0x1d6192[_0x1d1773(0x19c)])};if(_0x1d6192[_0x1d1773(0x183)]===_0x1d1773(0x173)||_0x1d6192[_0x1d1773(0x171)][_0x1d1773(0x15b)]!==0x1)return{'ok':!![],'data':{'file':_0x1d6192[_0x1d1773(0x175)],'hash':_0x1d6192[_0x1d1773(0x15c)],'kind':_0x1d6192[_0x1d1773(0x183)],'serviceCount':_0x1d6192[_0x1d1773(0x171)]['length'],'commandCount':_0x1d6192[_0x1d1773(0x171)][_0x1d1773(0x18a)]((_0x5d4419,_0x5b1c26)=>_0x5d4419+(_0x5b1c26[_0x1d1773(0x19a)]?.[_0x1d1773(0x18f)]['length']??0x0),0x0),'services':_0x1d6192[_0x1d1773(0x171)][_0x1d1773(0x160)](summarizeLoadedManifest),'warnings':_0x1d6192['report'][_0x1d1773(0x182)]},'message':'Service\x20registry\x20validation\x20passed.'};return{'ok':!![],'data':{'file':_0x1d6192['filePath'],'hash':_0x1d6192['hash'],'kind':_0x1d6192[_0x1d1773(0x183)],'service':_0x1d6192[_0x1d1773(0x19a)]?.[_0x1d1773(0x17e)],'version':_0x1d6192[_0x1d1773(0x19a)]?.[_0x1d1773(0x19d)],'commandCount':_0x1d6192[_0x1d1773(0x19a)]?.['commands'][_0x1d1773(0x15b)]??0x0,'commands':_0x1d6192[_0x1d1773(0x19a)]?.[_0x1d1773(0x18f)][_0x1d1773(0x160)](_0xaa9b98=>({'path':_0xaa9b98[_0x1d1773(0x170)],'risk':_0xaa9b98[_0x1d1773(0x16d)],'target':toPublicServiceTreeTarget(_0xaa9b98[_0x1d1773(0x157)])})),'warnings':_0x1d6192[_0x1d1773(0x19c)]['warnings']},'message':'Service\x20manifest\x20validation\x20passed.'};}},{'service':'service','command':a41_0x592599(0x167),'description':a41_0x592599(0x172),'risk':a41_0x592599(0x15a),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x45fc4a){const _0x2a09d0=a41_0x592599,_0x1f1602=loadServiceManifestFromFile(_0x45fc4a[_0x2a09d0(0x162)](_0x2a09d0(0x18c)));return{'method':_0x2a09d0(0x199),'url':getServiceRegistryPath(),'body':{'file':_0x1f1602[_0x2a09d0(0x175)],'hash':_0x1f1602[_0x2a09d0(0x15c)],'kind':_0x1f1602[_0x2a09d0(0x183)],'ok':_0x1f1602[_0x2a09d0(0x19c)]['ok'],'service':_0x1f1602[_0x2a09d0(0x19a)]?.[_0x2a09d0(0x17e)],'version':_0x1f1602[_0x2a09d0(0x19a)]?.[_0x2a09d0(0x19d)],'serviceCount':_0x1f1602[_0x2a09d0(0x171)][_0x2a09d0(0x15b)],'services':_0x1f1602[_0x2a09d0(0x171)][_0x2a09d0(0x160)](_0x584d14=>({'service':_0x584d14[_0x2a09d0(0x19a)]?.[_0x2a09d0(0x17e)],'version':_0x584d14['normalizedManifest']?.['version'],'commandCount':_0x584d14['normalizedManifest']?.[_0x2a09d0(0x18f)][_0x2a09d0(0x15b)]??0x0,'errors':_0x584d14[_0x2a09d0(0x19c)]['errors']})),'errors':_0x1f1602[_0x2a09d0(0x19c)][_0x2a09d0(0x17c)],'commandCount':_0x1f1602[_0x2a09d0(0x19a)]?.[_0x2a09d0(0x18f)]['length']??0x0},'description':_0x2a09d0(0x177)};},async 'execute'(_0x4684fd){const _0x12eb21=a41_0x592599,_0xbf3586=importServiceManifest(_0x4684fd[_0x12eb21(0x162)](_0x12eb21(0x18c)));if(_0xbf3586['entries'][_0x12eb21(0x15b)]!==0x1)return{'ok':!![],'data':{'registryPath':_0xbf3586[_0x12eb21(0x195)],'imported':_0xbf3586[_0x12eb21(0x18b)],'updated':_0xbf3586[_0x12eb21(0x17b)],'serviceCount':_0xbf3586[_0x12eb21(0x194)],'services':_0xbf3586['entries']['map'](summarizeService)},'message':_0x12eb21(0x168)+_0xbf3586[_0x12eb21(0x18b)]+_0x12eb21(0x18d)+_0xbf3586[_0x12eb21(0x17b)]+_0x12eb21(0x185)};return{'ok':!![],'data':{'registryPath':_0xbf3586['registryPath'],'replaced':_0xbf3586[_0x12eb21(0x17d)],'imported':_0xbf3586['imported'],'updated':_0xbf3586[_0x12eb21(0x17b)],'serviceCount':_0xbf3586[_0x12eb21(0x194)],'service':summarizeService(_0xbf3586['entry'])},'message':(_0xbf3586[_0x12eb21(0x17d)]?_0x12eb21(0x17a):'Imported')+_0x12eb21(0x158)+_0xbf3586[_0x12eb21(0x186)][_0x12eb21(0x17f)]+'.'};}},{'service':a41_0x592599(0x17e),'command':'export','description':a41_0x592599(0x192),'risk':a41_0x592599(0x15a),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x1ec60c){const _0x1406b2=a41_0x592599,_0x30039a=getLocalServiceEntry(_0x1ec60c[_0x1406b2(0x162)]('service'));return{'method':_0x1406b2(0x199),'url':_0x1ec60c[_0x1406b2(0x162)](_0x1406b2(0x18c)),'body':{'service':_0x1ec60c[_0x1406b2(0x162)](_0x1406b2(0x17e)),'found':Boolean(_0x30039a),'version':_0x30039a?.[_0x1406b2(0x19d)],'source':_0x30039a?.[_0x1406b2(0x188)]},'description':_0x1406b2(0x184)};},async 'execute'(_0xfdac39){const _0x221724=a41_0x592599,_0x460b49=exportServiceManifest(_0xfdac39[_0x221724(0x162)](_0x221724(0x17e)),_0xfdac39[_0x221724(0x162)]('file'));return{'ok':!![],'data':{'registryPath':_0x460b49[_0x221724(0x195)],'file':_0x460b49[_0x221724(0x175)],'service':summarizeService(_0x460b49[_0x221724(0x186)])},'message':_0x221724(0x197)+_0x460b49['entry']['serviceCode']+'.'};}},{'service':a41_0x592599(0x17e),'command':'list','description':a41_0x592599(0x16c),'risk':a41_0x592599(0x16e),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0xd88490=a41_0x592599,_0x1f0a3f=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x1f0a3f[_0xd88490(0x15b)],'services':_0x1f0a3f[_0xd88490(0x160)](summarizeService)}};}},{'service':a41_0x592599(0x17e),'command':a41_0x592599(0x176),'description':a41_0x592599(0x189),'risk':a41_0x592599(0x15a),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0xe0874b){const _0x1289cc=a41_0x592599,_0xc96f95=getLocalServiceEntry(_0xe0874b['str'](_0x1289cc(0x17e)));return{'method':_0x1289cc(0x199),'url':getServiceRegistryPath(),'body':{'service':_0xe0874b['str'](_0x1289cc(0x17e)),'found':Boolean(_0xc96f95),'version':_0xc96f95?.[_0x1289cc(0x19d)],'source':_0xc96f95?.[_0x1289cc(0x188)]},'description':_0x1289cc(0x191)};},async 'execute'(_0xb408dc){const _0x348e6e=a41_0x592599,_0x249398=removeServiceManifest(_0xb408dc[_0x348e6e(0x162)](_0x348e6e(0x17e)));return{'ok':!![],'data':{'registryPath':_0x249398[_0x348e6e(0x195)],'serviceCount':_0x249398[_0x348e6e(0x194)],'service':summarizeService(_0x249398['entry'])},'message':'Removed\x20service\x20'+_0x249398[_0x348e6e(0x186)]['serviceCode']+'.'};}},{'service':a41_0x592599(0x17e),'command':a41_0x592599(0x193),'description':a41_0x592599(0x15f),'risk':a41_0x592599(0x16e),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x3d2cfa){const _0x22797d=a41_0x592599,_0x4948ed=getLocalServiceEntry(_0x3d2cfa['str']('service'));if(!_0x4948ed)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x3d2cfa['str'](_0x22797d(0x17e))},'message':_0x22797d(0x19b)+_0x3d2cfa[_0x22797d(0x162)](_0x22797d(0x17e))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x4948ed),'manifest':_0x4948ed[_0x22797d(0x19f)],'normalizedManifest':toPublicNormalizedServiceTree(_0x4948ed[_0x22797d(0x19a)])}};}}];function a41_0x331d(){const _0x11884f=['version','flags','manifest','target','\x20service\x20','required','write','length','hash','description','3hrtXjV','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','map','18dlSENg','str','registryIndex','cliName','1069616ohZFhZ','type','import','Imported\x20','string','registryServiceCode','4225550TqXNkV','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','risk','read','2768988QtAreW','cliPath','manifests','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','registry','607728JsoJkj','filePath','remove','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','3880kehxgH','343938spCYJB','Updated','updated','errors','replaced','service','serviceCode','369409jfRLVB','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','warnings','kind','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','\x20service(s).','entry','Service\x20Tree\x20manifest\x20file\x20path','source','Remove\x20a\x20local\x20Service\x20Tree\x20manifest\x20from\x20the\x20runtime\x20registry','reduce','imported','file','\x20service(s),\x20updated\x20','122111QkgVMZ','commands','name','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','Export\x20a\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','detail','serviceCount','registryPath','Local\x20service\x20code,\x20for\x20example\x20crm','Exported\x20service\x20','65kIqzaX','WRITE','normalizedManifest','Local\x20service\x20not\x20found:\x20','report'];a41_0x331d=function(){return _0x11884f;};return a41_0x331d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2f6a97,_0x2f0396){const _0x2a591c=a41_0x3f56,_0x713f83=_0x2f6a97();while(!![]){try{const _0x55d9e7=parseInt(_0x2a591c(0xf3))/0x1*(parseInt(_0x2a591c(0x127))/0x2)+-parseInt(_0x2a591c(0x135))/0x3+-parseInt(_0x2a591c(0x131))/0x4*(-parseInt(_0x2a591c(0x138))/0x5)+-parseInt(_0x2a591c(0x12b))/0x6+-parseInt(_0x2a591c(0x10a))/0x7*(parseInt(_0x2a591c(0x11d))/0x8)+-parseInt(_0x2a591c(0xf5))/0x9+-parseInt(_0x2a591c(0xfc))/0xa*(-parseInt(_0x2a591c(0x119))/0xb);if(_0x55d9e7===_0x2f0396)break;else _0x713f83['push'](_0x713f83['shift']());}catch(_0x1e88cc){_0x713f83['push'](_0x713f83['shift']());}}}(a41_0x17f8,0x9c0d7));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{normalizeServiceTreeManifest,validateServiceTreeManifest}from'@lovrabet/cli-framework';import{PRODUCT_CONFIG}from'../../constant/product.js';import{CliErrors}from'../../errors.js';import{adaptServiceTreeManifestForLegacyFramework}from'../../commands/service/function-name-adapter.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME='service.json';export function getServiceRegistryPath(_0x39092c={}){const _0x259484=a41_0x3f56;return resolve(_0x39092c[_0x259484(0xfe)]??homedir(),PRODUCT_CONFIG[_0x259484(0x11e)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x3af88d={}){const _0x222656=a41_0x3f56,_0x274ebe=getServiceRegistryPath(_0x3af88d);if(!existsSync(_0x274ebe))return emptyServiceRegistry();try{const _0x1ef9da=readFileSync(_0x274ebe,_0x222656(0x10c));if(!_0x1ef9da[_0x222656(0xfd)]())return emptyServiceRegistry();const _0xa4a612=JSON[_0x222656(0x104)](_0x1ef9da);if(_0xa4a612[_0x222656(0x11a)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x222656(0x112)]('Unsupported\x20service\x20registry\x20schemaVersion:\x20'+String(_0xa4a612[_0x222656(0x11a)]),_0x222656(0x144)+_0x274ebe+'.');if(!Array[_0x222656(0x128)](_0xa4a612[_0x222656(0x13d)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0xa4a612[_0x222656(0x113)],'services':_0xa4a612[_0x222656(0x13d)]};}catch(_0x2a00b1){if(_0x2a00b1 instanceof Error&&_0x2a00b1[_0x222656(0x134)]===_0x222656(0x132))throw _0x2a00b1;throw CliErrors['validation'](_0x222656(0x100)+_0x274ebe,_0x222656(0x10f));}}export function writeServiceRegistry(_0x43a10b,_0x222812={}){const _0x5bbd25=a41_0x3f56,_0x5a7423=getServiceRegistryPath(_0x222812),_0x57fdaa=dirname(_0x5a7423);!existsSync(_0x57fdaa)&&mkdirSync(_0x57fdaa,{'recursive':!![]});const _0x5c799d=_0x5a7423+'.tmp';try{writeFileSync(_0x5c799d,JSON[_0x5bbd25(0x109)](_0x43a10b,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x5c799d,_0x5a7423);}catch(_0x15a5d5){try{unlinkSync(_0x5c799d);}catch{}if(_0x15a5d5?.[_0x5bbd25(0x125)]===_0x5bbd25(0x10b))throw CliErrors[_0x5bbd25(0x112)](_0x5bbd25(0x130)+_0x5a7423);throw _0x15a5d5;}return _0x5a7423;}export function loadServiceManifestFromFile(_0x2be9dc){const _0x3aa0a8=a41_0x3f56,_0x41646d=resolve(_0x2be9dc);if(!existsSync(_0x41646d))throw CliErrors['validation']('Service\x20manifest\x20file\x20not\x20found:\x20'+_0x2be9dc);let _0x5051e1;const _0x575b3d=readFileSync(_0x41646d,_0x3aa0a8(0x10c));try{_0x5051e1=JSON['parse'](_0x575b3d);}catch{throw CliErrors[_0x3aa0a8(0x112)](_0x3aa0a8(0x13e)+_0x2be9dc,_0x3aa0a8(0xf0));}const _0xe1b3e0=sha256(_0x575b3d),_0x42b33c=extractLoadedServiceManifests(_0x5051e1,_0xe1b3e0),_0x2fd8c2=aggregateValidationReports(_0x42b33c),_0x7c2853=_0x42b33c[0x0];return{'filePath':_0x41646d,'hash':_0xe1b3e0,'kind':isServiceRegistryLike(_0x5051e1)?_0x3aa0a8(0x116):'manifest','manifest':_0x7c2853?.['manifest']??_0x5051e1,'report':_0x2fd8c2,'normalizedManifest':_0x42b33c[_0x3aa0a8(0x118)]===0x1?_0x7c2853?.[_0x3aa0a8(0xf4)]:undefined,'manifests':_0x42b33c};}export function importServiceManifest(_0x32e479,_0x53a9f6={}){const _0x281e44=a41_0x3f56,_0xc9bab5=loadServiceManifestFromFile(_0x32e479);if(!_0xc9bab5[_0x281e44(0x137)]['ok'])throw CliErrors[_0x281e44(0x112)](formatValidationFailure(_0xc9bab5[_0x281e44(0x137)]),_0x281e44(0x121));if(_0xc9bab5[_0x281e44(0xee)][_0x281e44(0x118)]===0x0)throw CliErrors['validation'](_0x281e44(0x103),_0x281e44(0xf9));const _0x2bc6e2=readServiceRegistry(_0x53a9f6),_0x54a92d=(_0x53a9f6['now']??(()=>new Date()))()[_0x281e44(0xef)](),_0x4874af=[];let _0x527602=0x0,_0x4eefc2=0x0;for(const _0x3c9b1a of _0xc9bab5[_0x281e44(0xee)]){if(!_0x3c9b1a[_0x281e44(0xf4)])continue;const _0x3832f4=_0x3c9b1a[_0x281e44(0xf4)][_0x281e44(0xff)][_0x281e44(0x125)],_0x36c91d={'serviceCode':_0x3832f4,'version':_0x3c9b1a['normalizedManifest']['version'],'importedAt':_0x54a92d,'source':{'type':_0x281e44(0x13a),'path':_0xc9bab5[_0x281e44(0xfb)],'hash':_0x3c9b1a[_0x281e44(0x143)]},'manifest':_0x3c9b1a[_0x281e44(0x120)],'normalizedManifest':_0x3c9b1a[_0x281e44(0xf4)]},_0x34ccae=_0x2bc6e2['services'][_0x281e44(0x13b)](_0x22c419=>_0x22c419['serviceCode']===_0x3832f4);_0x34ccae>=0x0?(_0x2bc6e2[_0x281e44(0x13d)][_0x34ccae]=_0x36c91d,_0x4eefc2++):(_0x2bc6e2[_0x281e44(0x13d)]['push'](_0x36c91d),_0x527602++),_0x4874af[_0x281e44(0x11b)](_0x36c91d);}_0x2bc6e2[_0x281e44(0x13d)][_0x281e44(0x139)]((_0x2f94ab,_0xc8ea67)=>_0x2f94ab['serviceCode'][_0x281e44(0x110)](_0xc8ea67[_0x281e44(0x122)])),_0x2bc6e2[_0x281e44(0x113)]=_0x54a92d;const _0x543ae5=writeServiceRegistry(_0x2bc6e2,_0x53a9f6);return{'registryPath':_0x543ae5,'entry':_0x4874af[0x0],'replaced':_0x4874af[_0x281e44(0x118)]===0x1?_0x4eefc2===0x1:_0x4eefc2>0x0,'entries':_0x4874af,'imported':_0x527602,'updated':_0x4eefc2,'serviceCount':_0x2bc6e2[_0x281e44(0x13d)][_0x281e44(0x118)]};}export function exportServiceManifest(_0x2afc5b,_0x177349,_0x5eb2e3={}){const _0x53a700=a41_0x3f56,_0x49c273=getServiceRegistryPath(_0x5eb2e3),_0x33732d=getLocalServiceEntry(_0x2afc5b,_0x5eb2e3);if(!_0x33732d)throw CliErrors[_0x53a700(0x112)]('Local\x20service\x20not\x20found:\x20'+_0x2afc5b,_0x53a700(0x136));const _0x3508af=resolve(_0x177349),_0x453adc=dirname(_0x3508af);return!existsSync(_0x453adc)&&mkdirSync(_0x453adc,{'recursive':!![]}),writeFileSync(_0x3508af,JSON['stringify'](_0x33732d[_0x53a700(0x120)],null,0x2)+'\x0a',{'encoding':_0x53a700(0x10c),'mode':0x180}),{'registryPath':_0x49c273,'filePath':_0x3508af,'entry':_0x33732d};}export function removeServiceManifest(_0x577176,_0x18c50a={}){const _0x2a5540=a41_0x3f56,_0x35de59=readServiceRegistry(_0x18c50a),_0x3853c4=_0x577176[_0x2a5540(0xfd)](),_0x3d270a=_0x35de59['services'][_0x2a5540(0x13b)](_0x5907b7=>_0x5907b7[_0x2a5540(0x122)]===_0x3853c4);if(_0x3d270a<0x0)throw CliErrors[_0x2a5540(0x112)]('Local\x20service\x20not\x20found:\x20'+_0x3853c4,_0x2a5540(0x136));const [_0xec3968]=_0x35de59[_0x2a5540(0x13d)][_0x2a5540(0x11c)](_0x3d270a,0x1),_0x5d5b40=(_0x18c50a[_0x2a5540(0x12d)]??(()=>new Date()))()[_0x2a5540(0xef)]();_0x35de59[_0x2a5540(0x113)]=_0x5d5b40;const _0x1bb00f=writeServiceRegistry(_0x35de59,_0x18c50a);return{'registryPath':_0x1bb00f,'entry':_0xec3968,'serviceCount':_0x35de59['services'][_0x2a5540(0x118)]};}export function listLocalServices(_0x11a918={}){return readServiceRegistry(_0x11a918)['services'];}export function getLocalServiceEntry(_0x277958,_0x57f33f={}){const _0xef0f16=a41_0x3f56;return readServiceRegistry(_0x57f33f)[_0xef0f16(0x13d)][_0xef0f16(0x102)](_0x1ad526=>_0x1ad526['serviceCode']===_0x277958[_0xef0f16(0xfd)]());}export function listLocalServiceTrees(_0x153e2c={}){const _0x54c9ed=a41_0x3f56;return readServiceRegistry(_0x153e2c)['services'][_0x54c9ed(0xf1)](_0x33ec14=>_0x33ec14['normalizedManifest']);}function a41_0x3f56(_0x10cbc5,_0x5a83d6){_0x10cbc5=_0x10cbc5-0xee;const _0x17f891=a41_0x17f8();let _0x3f5675=_0x17f891[_0x10cbc5];return _0x3f5675;}function a41_0x17f8(){const _0x63309b=['].manifest','reduce','Cannot\x20write\x20service\x20registry:\x20','148aSEhKv','CliError','message','name','3082230duHvKl','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','report','73265GxmVue','sort','file','findIndex','$.services[','services','Invalid\x20service\x20manifest\x20JSON:\x20','importedAt','string','path','bff\x20target\x20requires\x20functionName.','sourceHash','Remove\x20or\x20migrate\x20','manifests','toISOString','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','map','missing','64496PSUEKL','normalizedManifest','8777862WACfKn','sha256','warnings','source','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','services\x20must\x20be\x20an\x20array','filePath','110010xxgBLG','trim','homeDir','service','Invalid\x20service\x20registry\x20JSON:\x20','kind','find','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','parse','commands','startsWith','command','digest','stringify','10213gBkPhs','ENOENT','utf8','registryIndex','Unsupported\x20schemaVersion:\x20','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','localeCompare','risk','validation','updatedAt','Service\x20manifest\x20validation\x20failed:\x0a','target','registry','errors','length','2519URythq','schemaVersion','push','splice','5232SbvSAT','homeDirName','join','manifest','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','serviceCode','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','].manifest.','code','description','28pdMtLH','isArray','invalid','hex','2209374poIGzl','slice','now'];a41_0x17f8=function(){return _0x63309b;};return a41_0x17f8();}export function inspectServiceRegistry(_0x1bab46={}){const _0x4a2152=a41_0x3f56,_0x44e817=getServiceRegistryPath(_0x1bab46);if(!existsSync(_0x44e817))return emptyServiceRegistryInspection(_0x44e817,_0x4a2152(0xf2),![]);try{const _0x161261=readFileSync(_0x44e817,_0x4a2152(0x10c));if(!_0x161261[_0x4a2152(0xfd)]())return emptyServiceRegistryInspection(_0x44e817,'empty',!![]);const _0x5e5fe9=JSON[_0x4a2152(0x104)](_0x161261);if(_0x5e5fe9[_0x4a2152(0x11a)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x44e817,'invalid',!![]),'schemaVersion':_0x5e5fe9[_0x4a2152(0x11a)],'message':_0x4a2152(0x10e)+String(_0x5e5fe9[_0x4a2152(0x11a)])};if(!Array[_0x4a2152(0x128)](_0x5e5fe9[_0x4a2152(0x13d)]))return{...emptyServiceRegistryInspection(_0x44e817,_0x4a2152(0x129),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x5e5fe9[_0x4a2152(0x113)],'message':_0x4a2152(0xfa)};const _0x50df05=_0x5e5fe9[_0x4a2152(0x13d)]['map'](summarizeLocalServiceEntry);return{'registryPath':_0x44e817,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x5e5fe9[_0x4a2152(0x113)],'serviceCount':_0x50df05[_0x4a2152(0x118)],'commandCount':_0x50df05[_0x4a2152(0x12f)]((_0x20e052,_0xbb2a8f)=>_0x20e052+_0xbb2a8f['commandCount'],0x0),'services':_0x50df05};}catch(_0xf8ac00){return{...emptyServiceRegistryInspection(_0x44e817,'invalid',!![]),'message':_0xf8ac00 instanceof Error?_0xf8ac00[_0x4a2152(0x133)]:String(_0xf8ac00)};}}export function formatValidationFailure(_0x471b5e){const _0x2921f3=a41_0x3f56,_0x3cde15=_0x471b5e[_0x2921f3(0x117)][_0x2921f3(0xf1)](_0x4802a3=>_0x4802a3[_0x2921f3(0x141)]+':\x20'+_0x4802a3[_0x2921f3(0x133)]);return _0x2921f3(0x114)+_0x3cde15[_0x2921f3(0x11f)]('\x0a');}function extractLoadedServiceManifests(_0x35a91f,_0x5582e1){const _0x41cf62=a41_0x3f56;if(!isServiceRegistryLike(_0x35a91f)){const _0x5165e8=_0x35a91f,{manifest:_0x2f114b,errors:_0x5a9127}=adaptServiceTreeManifestForLegacyFramework(_0x5165e8),_0x94ed0c=validateServiceTreeManifest(_0x2f114b),_0x403e1f=mergeValidationErrors(_0x94ed0c,_0x5a9127);return[{'manifest':_0x5165e8,'report':_0x403e1f,'normalizedManifest':_0x403e1f['ok']?normalizeServiceTreeManifest(_0x2f114b):undefined,'sourceHash':_0x5582e1}];}return _0x35a91f[_0x41cf62(0x13d)][_0x41cf62(0xf1)]((_0x1bf835,_0x4d2d82)=>{const _0x481d5c=_0x41cf62,_0x8e2a8=isObjectRecord(_0x1bf835)?_0x1bf835[_0x481d5c(0x120)]:undefined,{manifest:_0x151012,errors:_0xd1a1d0}=adaptServiceTreeManifestForLegacyFramework(_0x8e2a8),_0x3dc192=validateServiceTreeManifest(_0x151012),_0x538d52=mergeValidationErrors(_0x3dc192,_0xd1a1d0),_0xba6bc3=isObjectRecord(_0x1bf835)&&typeof _0x1bf835[_0x481d5c(0x122)]===_0x481d5c(0x140)?_0x1bf835['serviceCode']:undefined;return{'manifest':_0x8e2a8,'report':_0x538d52,'normalizedManifest':_0x538d52['ok']?normalizeServiceTreeManifest(_0x151012):undefined,'sourceHash':sha256(JSON[_0x481d5c(0x109)](_0x8e2a8,null,0x2)+'\x0a'),'registryIndex':_0x4d2d82,'registryServiceCode':_0xba6bc3};});}function mergeValidationErrors(_0x3661c4,_0x2ff411){const _0x537089=a41_0x3f56,_0x4dd0d5=_0x3661c4[_0x537089(0x117)][_0x537089(0xf1)](_0x4a49f4=>_0x4a49f4['message']===_0x537089(0x123)?{..._0x4a49f4,'message':_0x537089(0x142)}:_0x4a49f4),_0x1e46e3=[..._0x2ff411,..._0x4dd0d5];return{'ok':_0x1e46e3[_0x537089(0x118)]===0x0,'errors':_0x1e46e3,'warnings':_0x3661c4[_0x537089(0xf7)]};}function aggregateValidationReports(_0x169def){const _0x1ab082=a41_0x3f56,_0x5afa23=_0x169def['flatMap'](_0x556214=>_0x556214[_0x1ab082(0x10d)]===undefined?_0x556214[_0x1ab082(0x137)]['errors']:_0x556214[_0x1ab082(0x137)][_0x1ab082(0x117)]['map'](_0x1e4d14=>({..._0x1e4d14,'path':prefixRegistryIssuePath(_0x556214[_0x1ab082(0x10d)],_0x1e4d14[_0x1ab082(0x141)])}))),_0xeaa2e2=_0x169def['flatMap'](_0x5084b3=>_0x5084b3['registryIndex']===undefined?_0x5084b3['report']['warnings']:_0x5084b3[_0x1ab082(0x137)][_0x1ab082(0xf7)][_0x1ab082(0xf1)](_0x149b5e=>({..._0x149b5e,'path':prefixRegistryIssuePath(_0x5084b3['registryIndex'],_0x149b5e[_0x1ab082(0x141)])})));return{'ok':_0x5afa23[_0x1ab082(0x118)]===0x0,'errors':_0x5afa23,'warnings':_0xeaa2e2};}function prefixRegistryIssuePath(_0x506634,_0x2b9f90){const _0x38b439=a41_0x3f56;if(_0x2b9f90==='$')return _0x38b439(0x13c)+_0x506634+_0x38b439(0x12e);if(_0x2b9f90[_0x38b439(0x106)]('$.'))return _0x38b439(0x13c)+_0x506634+_0x38b439(0x12e)+_0x2b9f90[_0x38b439(0x12c)](0x1);if(_0x2b9f90[_0x38b439(0x106)]('$['))return _0x38b439(0x13c)+_0x506634+_0x38b439(0x12e)+_0x2b9f90[_0x38b439(0x12c)](0x1);return _0x38b439(0x13c)+_0x506634+_0x38b439(0x124)+_0x2b9f90;}function isServiceRegistryLike(_0x43eac2){const _0x590d30=a41_0x3f56;return isObjectRecord(_0x43eac2)&&_0x43eac2[_0x590d30(0x11a)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x590d30(0x128)](_0x43eac2[_0x590d30(0x13d)]);}function isObjectRecord(_0x2dc63b){const _0xfd5a6d=a41_0x3f56;return Boolean(_0x2dc63b)&&typeof _0x2dc63b==='object'&&!Array[_0xfd5a6d(0x128)](_0x2dc63b);}function emptyServiceRegistryInspection(_0x13b73f,_0x2f4016,_0x476af1){return{'registryPath':_0x13b73f,'exists':_0x476af1,'status':_0x2f4016,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x24db5d){const _0x270f0a=a41_0x3f56,_0x2077aa=_0x24db5d[_0x270f0a(0xf4)],_0x8a64f3=_0x2077aa[_0x270f0a(0x105)][_0x270f0a(0xf1)](_0x1bbe99=>({'path':_0x1bbe99['cliPath'],'description':_0x1bbe99['description'],'risk':_0x1bbe99[_0x270f0a(0x111)],'targetKind':_0x1bbe99[_0x270f0a(0x115)][_0x270f0a(0x101)],'targetCommand':_0x1bbe99[_0x270f0a(0x115)][_0x270f0a(0x107)]}));return{'serviceCode':_0x24db5d[_0x270f0a(0x122)],'name':_0x2077aa[_0x270f0a(0xff)]['name'],'description':_0x2077aa[_0x270f0a(0xff)][_0x270f0a(0x126)],'version':_0x24db5d['version'],'importedAt':_0x24db5d[_0x270f0a(0x13f)],'source':_0x24db5d[_0x270f0a(0xf8)],'commandCount':_0x8a64f3[_0x270f0a(0x118)],'commands':_0x8a64f3};}function sha256(_0x5830e3){const _0x3ee3a5=a41_0x3f56;return createHash(_0x3ee3a5(0xf6))['update'](_0x5830e3)[_0x3ee3a5(0x108)](_0x3ee3a5(0x12a));}
|
|
1
|
+
(function(_0xd842b6,_0xabc5bc){const _0x18a88e=a42_0x1f06,_0x509b74=_0xd842b6();while(!![]){try{const _0x443605=-parseInt(_0x18a88e(0x151))/0x1*(-parseInt(_0x18a88e(0x139))/0x2)+parseInt(_0x18a88e(0x13f))/0x3+parseInt(_0x18a88e(0x14e))/0x4+parseInt(_0x18a88e(0x106))/0x5+-parseInt(_0x18a88e(0x113))/0x6+parseInt(_0x18a88e(0x13c))/0x7+-parseInt(_0x18a88e(0x14c))/0x8*(parseInt(_0x18a88e(0x128))/0x9);if(_0x443605===_0xabc5bc)break;else _0x509b74['push'](_0x509b74['shift']());}catch(_0x30cc38){_0x509b74['push'](_0x509b74['shift']());}}}(a42_0x367f,0xbeb4e));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{normalizeServiceTreeManifest,validateServiceTreeManifest}from'@lovrabet/cli-framework';import{PRODUCT_CONFIG}from'../../constant/product.js';import{CliErrors}from'../../errors.js';import{adaptServiceTreeManifestForLegacyFramework}from'../../commands/service/function-name-adapter.js';function a42_0x367f(){const _0x4c4275=['now','file','bff\x20target\x20requires\x20functionName.','sourceHash','validation','70066FQrNRf','risk','manifest','6158103ZUGQeM','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','reduce','3892077eghFTy','registryIndex','Invalid\x20service\x20manifest\x20JSON:\x20','string','Local\x20service\x20not\x20found:\x20','updatedAt','localeCompare','flatMap','filePath','registry','commands','services\x20must\x20be\x20an\x20array','$.services[','184avqNXe','Remove\x20or\x20migrate\x20','2809792EOYlWW','startsWith','importedAt','7VnQTHN','Service\x20manifest\x20validation\x20failed:\x0a','isArray','toISOString','slice','hex','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','].manifest','object','warnings','invalid','normalizedManifest','missing','push','path','5186820cUBFnV','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','findIndex','kind','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','update','].manifest.','Service\x20manifest\x20file\x20not\x20found:\x20','serviceCode','schemaVersion','target','empty','map','4713372jZQprd','service','Unsupported\x20schemaVersion:\x20','source','splice','length','homeDirName','description','homeDir','CliError','version','name','manifests','Invalid\x20service\x20registry\x20JSON:\x20','join','find','Unsupported\x20service\x20registry\x20schemaVersion:\x20','errors','utf8','message','commandCount','1015605LXYdOw','code','services','digest','report','sha256','parse','cliPath','command','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','stringify','trim'];a42_0x367f=function(){return _0x4c4275;};return a42_0x367f();}export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME='service.json';export function getServiceRegistryPath(_0x4d68a8={}){const _0x297d07=a42_0x1f06;return resolve(_0x4d68a8[_0x297d07(0x11b)]??homedir(),PRODUCT_CONFIG[_0x297d07(0x119)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x68af1={}){const _0x154527=a42_0x1f06,_0x4cb4ef=getServiceRegistryPath(_0x68af1);if(!existsSync(_0x4cb4ef))return emptyServiceRegistry();try{const _0x51a684=readFileSync(_0x4cb4ef,_0x154527(0x125));if(!_0x51a684[_0x154527(0x133)]())return emptyServiceRegistry();const _0x2bcfec=JSON['parse'](_0x51a684);if(_0x2bcfec[_0x154527(0x10f)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors['validation'](_0x154527(0x123)+String(_0x2bcfec[_0x154527(0x10f)]),_0x154527(0x14d)+_0x4cb4ef+'.');if(!Array[_0x154527(0x153)](_0x2bcfec[_0x154527(0x12a)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x2bcfec['updatedAt'],'services':_0x2bcfec[_0x154527(0x12a)]};}catch(_0x35e4f6){if(_0x35e4f6 instanceof Error&&_0x35e4f6[_0x154527(0x11e)]===_0x154527(0x11c))throw _0x35e4f6;throw CliErrors[_0x154527(0x138)](_0x154527(0x120)+_0x4cb4ef,_0x154527(0x13d));}}export function writeServiceRegistry(_0x5ce376,_0x4bec10={}){const _0x1df0cf=a42_0x1f06,_0x400313=getServiceRegistryPath(_0x4bec10),_0x5eee2f=dirname(_0x400313);!existsSync(_0x5eee2f)&&mkdirSync(_0x5eee2f,{'recursive':!![]});const _0x1fb32b=_0x400313+'.tmp';try{writeFileSync(_0x1fb32b,JSON[_0x1df0cf(0x132)](_0x5ce376,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x1fb32b,_0x400313);}catch(_0x30ab2b){try{unlinkSync(_0x1fb32b);}catch{}if(_0x30ab2b?.['code']==='ENOENT')throw CliErrors[_0x1df0cf(0x138)]('Cannot\x20write\x20service\x20registry:\x20'+_0x400313);throw _0x30ab2b;}return _0x400313;}export function loadServiceManifestFromFile(_0x25491e){const _0x40433d=a42_0x1f06,_0x2b1249=resolve(_0x25491e);if(!existsSync(_0x2b1249))throw CliErrors[_0x40433d(0x138)](_0x40433d(0x10d)+_0x25491e);let _0x3e83d2;const _0x345136=readFileSync(_0x2b1249,_0x40433d(0x125));try{_0x3e83d2=JSON[_0x40433d(0x12e)](_0x345136);}catch{throw CliErrors['validation'](_0x40433d(0x141)+_0x25491e,_0x40433d(0xfd));}const _0x531396=sha256(_0x345136),_0x14e4ba=extractLoadedServiceManifests(_0x3e83d2,_0x531396),_0x1e3a7d=aggregateValidationReports(_0x14e4ba),_0x492b9c=_0x14e4ba[0x0];return{'filePath':_0x2b1249,'hash':_0x531396,'kind':isServiceRegistryLike(_0x3e83d2)?_0x40433d(0x148):_0x40433d(0x13b),'manifest':_0x492b9c?.[_0x40433d(0x13b)]??_0x3e83d2,'report':_0x1e3a7d,'normalizedManifest':_0x14e4ba[_0x40433d(0x118)]===0x1?_0x492b9c?.['normalizedManifest']:undefined,'manifests':_0x14e4ba};}export function importServiceManifest(_0x1455f3,_0x4b2591={}){const _0x574182=a42_0x1f06,_0x47c79a=loadServiceManifestFromFile(_0x1455f3);if(!_0x47c79a[_0x574182(0x12c)]['ok'])throw CliErrors[_0x574182(0x138)](formatValidationFailure(_0x47c79a['report']),'Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.');if(_0x47c79a[_0x574182(0x11f)][_0x574182(0x118)]===0x0)throw CliErrors[_0x574182(0x138)](_0x574182(0x131),_0x574182(0x107));const _0x36b01f=readServiceRegistry(_0x4b2591),_0x427462=(_0x4b2591[_0x574182(0x134)]??(()=>new Date()))()[_0x574182(0x154)](),_0x19b586=[];let _0x13ea32=0x0,_0x28e969=0x0;for(const _0x5a7703 of _0x47c79a[_0x574182(0x11f)]){if(!_0x5a7703[_0x574182(0x102)])continue;const _0x1181e6=_0x5a7703[_0x574182(0x102)]['service'][_0x574182(0x129)],_0xdb30c2={'serviceCode':_0x1181e6,'version':_0x5a7703['normalizedManifest'][_0x574182(0x11d)],'importedAt':_0x427462,'source':{'type':_0x574182(0x135),'path':_0x47c79a[_0x574182(0x147)],'hash':_0x5a7703[_0x574182(0x137)]},'manifest':_0x5a7703[_0x574182(0x13b)],'normalizedManifest':_0x5a7703[_0x574182(0x102)]},_0x4cc050=_0x36b01f['services'][_0x574182(0x108)](_0x288986=>_0x288986[_0x574182(0x10e)]===_0x1181e6);_0x4cc050>=0x0?(_0x36b01f['services'][_0x4cc050]=_0xdb30c2,_0x28e969++):(_0x36b01f[_0x574182(0x12a)][_0x574182(0x104)](_0xdb30c2),_0x13ea32++),_0x19b586['push'](_0xdb30c2);}_0x36b01f[_0x574182(0x12a)]['sort']((_0x1d359e,_0x19457f)=>_0x1d359e[_0x574182(0x10e)][_0x574182(0x145)](_0x19457f[_0x574182(0x10e)])),_0x36b01f['updatedAt']=_0x427462;const _0x473912=writeServiceRegistry(_0x36b01f,_0x4b2591);return{'registryPath':_0x473912,'entry':_0x19b586[0x0],'replaced':_0x19b586[_0x574182(0x118)]===0x1?_0x28e969===0x1:_0x28e969>0x0,'entries':_0x19b586,'imported':_0x13ea32,'updated':_0x28e969,'serviceCount':_0x36b01f[_0x574182(0x12a)][_0x574182(0x118)]};}export function exportServiceManifest(_0x4e9dba,_0x53582c,_0x59ab8f={}){const _0x3a81ea=a42_0x1f06,_0x3bcd18=getServiceRegistryPath(_0x59ab8f),_0x28a6d1=getLocalServiceEntry(_0x4e9dba,_0x59ab8f);if(!_0x28a6d1)throw CliErrors[_0x3a81ea(0x138)](_0x3a81ea(0x143)+_0x4e9dba,_0x3a81ea(0x10a));const _0x57217e=resolve(_0x53582c),_0x4e02ab=dirname(_0x57217e);return!existsSync(_0x4e02ab)&&mkdirSync(_0x4e02ab,{'recursive':!![]}),writeFileSync(_0x57217e,JSON['stringify'](_0x28a6d1[_0x3a81ea(0x13b)],null,0x2)+'\x0a',{'encoding':_0x3a81ea(0x125),'mode':0x180}),{'registryPath':_0x3bcd18,'filePath':_0x57217e,'entry':_0x28a6d1};}function a42_0x1f06(_0x340e98,_0x24223b){_0x340e98=_0x340e98-0xfc;const _0x367f4b=a42_0x367f();let _0x1f060b=_0x367f4b[_0x340e98];return _0x1f060b;}export function removeServiceManifest(_0xece3a9,_0x2f5bd3={}){const _0x345f5c=a42_0x1f06,_0x2ee3bd=readServiceRegistry(_0x2f5bd3),_0x594ddb=_0xece3a9[_0x345f5c(0x133)](),_0x141150=_0x2ee3bd[_0x345f5c(0x12a)][_0x345f5c(0x108)](_0x37fe93=>_0x37fe93[_0x345f5c(0x10e)]===_0x594ddb);if(_0x141150<0x0)throw CliErrors[_0x345f5c(0x138)](_0x345f5c(0x143)+_0x594ddb,_0x345f5c(0x10a));const [_0x1e10d4]=_0x2ee3bd['services'][_0x345f5c(0x117)](_0x141150,0x1),_0x292072=(_0x2f5bd3[_0x345f5c(0x134)]??(()=>new Date()))()[_0x345f5c(0x154)]();_0x2ee3bd[_0x345f5c(0x144)]=_0x292072;const _0x1bd16e=writeServiceRegistry(_0x2ee3bd,_0x2f5bd3);return{'registryPath':_0x1bd16e,'entry':_0x1e10d4,'serviceCount':_0x2ee3bd['services']['length']};}export function listLocalServices(_0x390283={}){const _0x31f726=a42_0x1f06;return readServiceRegistry(_0x390283)[_0x31f726(0x12a)];}export function getLocalServiceEntry(_0x30a919,_0x6ad31a={}){const _0xf74025=a42_0x1f06;return readServiceRegistry(_0x6ad31a)[_0xf74025(0x12a)][_0xf74025(0x122)](_0x292a51=>_0x292a51[_0xf74025(0x10e)]===_0x30a919[_0xf74025(0x133)]());}export function listLocalServiceTrees(_0x53f71f={}){const _0x50fc9b=a42_0x1f06;return readServiceRegistry(_0x53f71f)[_0x50fc9b(0x12a)][_0x50fc9b(0x112)](_0x9f8415=>_0x9f8415['normalizedManifest']);}export function inspectServiceRegistry(_0x36bc05={}){const _0x447f4e=a42_0x1f06,_0x29d0b0=getServiceRegistryPath(_0x36bc05);if(!existsSync(_0x29d0b0))return emptyServiceRegistryInspection(_0x29d0b0,_0x447f4e(0x103),![]);try{const _0x14a7f3=readFileSync(_0x29d0b0,_0x447f4e(0x125));if(!_0x14a7f3[_0x447f4e(0x133)]())return emptyServiceRegistryInspection(_0x29d0b0,_0x447f4e(0x111),!![]);const _0x4c8b6=JSON[_0x447f4e(0x12e)](_0x14a7f3);if(_0x4c8b6[_0x447f4e(0x10f)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x29d0b0,_0x447f4e(0x101),!![]),'schemaVersion':_0x4c8b6[_0x447f4e(0x10f)],'message':_0x447f4e(0x115)+String(_0x4c8b6[_0x447f4e(0x10f)])};if(!Array[_0x447f4e(0x153)](_0x4c8b6[_0x447f4e(0x12a)]))return{...emptyServiceRegistryInspection(_0x29d0b0,_0x447f4e(0x101),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x4c8b6['updatedAt'],'message':_0x447f4e(0x14a)};const _0x56ea36=_0x4c8b6[_0x447f4e(0x12a)][_0x447f4e(0x112)](summarizeLocalServiceEntry);return{'registryPath':_0x29d0b0,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x4c8b6['updatedAt'],'serviceCount':_0x56ea36['length'],'commandCount':_0x56ea36[_0x447f4e(0x13e)]((_0x11bc80,_0x3cc060)=>_0x11bc80+_0x3cc060[_0x447f4e(0x127)],0x0),'services':_0x56ea36};}catch(_0x5325ba){return{...emptyServiceRegistryInspection(_0x29d0b0,_0x447f4e(0x101),!![]),'message':_0x5325ba instanceof Error?_0x5325ba[_0x447f4e(0x126)]:String(_0x5325ba)};}}export function formatValidationFailure(_0x1cbb80){const _0x12b22e=a42_0x1f06,_0x4acade=_0x1cbb80[_0x12b22e(0x124)][_0x12b22e(0x112)](_0x4936b0=>_0x4936b0[_0x12b22e(0x105)]+':\x20'+_0x4936b0[_0x12b22e(0x126)]);return _0x12b22e(0x152)+_0x4acade[_0x12b22e(0x121)]('\x0a');}function extractLoadedServiceManifests(_0x478a18,_0x1beeb4){const _0xf39b83=a42_0x1f06;if(!isServiceRegistryLike(_0x478a18)){const _0xbc14b4=_0x478a18,{manifest:_0x392b97,errors:_0xb2c3c5}=adaptServiceTreeManifestForLegacyFramework(_0xbc14b4),_0x380f2b=validateServiceTreeManifest(_0x392b97),_0x324092=mergeValidationErrors(_0x380f2b,_0xb2c3c5);return[{'manifest':_0xbc14b4,'report':_0x324092,'normalizedManifest':_0x324092['ok']?normalizeServiceTreeManifest(_0x392b97):undefined,'sourceHash':_0x1beeb4}];}return _0x478a18[_0xf39b83(0x12a)]['map']((_0x2f675d,_0x3579d9)=>{const _0x1b46cc=_0xf39b83,_0x340f85=isObjectRecord(_0x2f675d)?_0x2f675d['manifest']:undefined,{manifest:_0x4a0965,errors:_0x5186dd}=adaptServiceTreeManifestForLegacyFramework(_0x340f85),_0x309632=validateServiceTreeManifest(_0x4a0965),_0x4fbedf=mergeValidationErrors(_0x309632,_0x5186dd),_0x37545d=isObjectRecord(_0x2f675d)&&typeof _0x2f675d[_0x1b46cc(0x10e)]===_0x1b46cc(0x142)?_0x2f675d[_0x1b46cc(0x10e)]:undefined;return{'manifest':_0x340f85,'report':_0x4fbedf,'normalizedManifest':_0x4fbedf['ok']?normalizeServiceTreeManifest(_0x4a0965):undefined,'sourceHash':sha256(JSON[_0x1b46cc(0x132)](_0x340f85,null,0x2)+'\x0a'),'registryIndex':_0x3579d9,'registryServiceCode':_0x37545d};});}function mergeValidationErrors(_0x352271,_0x58dfc8){const _0xafd106=a42_0x1f06,_0x4cf16c=_0x352271['errors']['map'](_0x3f635f=>_0x3f635f[_0xafd106(0x126)]==='bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.'?{..._0x3f635f,'message':_0xafd106(0x136)}:_0x3f635f),_0x531fe8=[..._0x58dfc8,..._0x4cf16c];return{'ok':_0x531fe8[_0xafd106(0x118)]===0x0,'errors':_0x531fe8,'warnings':_0x352271[_0xafd106(0x100)]};}function aggregateValidationReports(_0x239e6c){const _0x20bfc3=a42_0x1f06,_0x19d047=_0x239e6c[_0x20bfc3(0x146)](_0x4a1507=>_0x4a1507[_0x20bfc3(0x140)]===undefined?_0x4a1507['report'][_0x20bfc3(0x124)]:_0x4a1507[_0x20bfc3(0x12c)][_0x20bfc3(0x124)]['map'](_0x29f9ad=>({..._0x29f9ad,'path':prefixRegistryIssuePath(_0x4a1507[_0x20bfc3(0x140)],_0x29f9ad['path'])}))),_0x25600d=_0x239e6c[_0x20bfc3(0x146)](_0x1d5f5c=>_0x1d5f5c[_0x20bfc3(0x140)]===undefined?_0x1d5f5c[_0x20bfc3(0x12c)][_0x20bfc3(0x100)]:_0x1d5f5c[_0x20bfc3(0x12c)][_0x20bfc3(0x100)][_0x20bfc3(0x112)](_0x41dca4=>({..._0x41dca4,'path':prefixRegistryIssuePath(_0x1d5f5c[_0x20bfc3(0x140)],_0x41dca4['path'])})));return{'ok':_0x19d047[_0x20bfc3(0x118)]===0x0,'errors':_0x19d047,'warnings':_0x25600d};}function prefixRegistryIssuePath(_0x4546cd,_0x1033d8){const _0x1b1817=a42_0x1f06;if(_0x1033d8==='$')return'$.services['+_0x4546cd+'].manifest';if(_0x1033d8[_0x1b1817(0x14f)]('$.'))return _0x1b1817(0x14b)+_0x4546cd+_0x1b1817(0xfe)+_0x1033d8[_0x1b1817(0x155)](0x1);if(_0x1033d8[_0x1b1817(0x14f)]('$['))return _0x1b1817(0x14b)+_0x4546cd+_0x1b1817(0xfe)+_0x1033d8[_0x1b1817(0x155)](0x1);return'$.services['+_0x4546cd+_0x1b1817(0x10c)+_0x1033d8;}function isServiceRegistryLike(_0x4f1e15){return isObjectRecord(_0x4f1e15)&&_0x4f1e15['schemaVersion']===SERVICE_REGISTRY_SCHEMA_VERSION&&Array['isArray'](_0x4f1e15['services']);}function isObjectRecord(_0x36dcbc){const _0x133f9a=a42_0x1f06;return Boolean(_0x36dcbc)&&typeof _0x36dcbc===_0x133f9a(0xff)&&!Array[_0x133f9a(0x153)](_0x36dcbc);}function emptyServiceRegistryInspection(_0x1488d0,_0x239e37,_0x965725){return{'registryPath':_0x1488d0,'exists':_0x965725,'status':_0x239e37,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0xc58c53){const _0x9e425c=a42_0x1f06,_0x44b78f=_0xc58c53[_0x9e425c(0x102)],_0x3ba46c=_0x44b78f[_0x9e425c(0x149)][_0x9e425c(0x112)](_0xdb7cfb=>({'path':_0xdb7cfb[_0x9e425c(0x12f)],'description':_0xdb7cfb[_0x9e425c(0x11a)],'risk':_0xdb7cfb[_0x9e425c(0x13a)],'targetKind':_0xdb7cfb['target'][_0x9e425c(0x109)],'targetCommand':_0xdb7cfb[_0x9e425c(0x110)][_0x9e425c(0x130)]}));return{'serviceCode':_0xc58c53[_0x9e425c(0x10e)],'name':_0x44b78f['service']['name'],'description':_0x44b78f[_0x9e425c(0x114)][_0x9e425c(0x11a)],'version':_0xc58c53[_0x9e425c(0x11d)],'importedAt':_0xc58c53[_0x9e425c(0x150)],'source':_0xc58c53[_0x9e425c(0x116)],'commandCount':_0x3ba46c[_0x9e425c(0x118)],'commands':_0x3ba46c};}function sha256(_0x40e669){const _0xe8dfed=a42_0x1f06;return createHash(_0xe8dfed(0x12d))[_0xe8dfed(0x10b)](_0x40e669)[_0xe8dfed(0x12b)](_0xe8dfed(0xfc));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a43_0x5ad475=a43_0x47ef;(function(_0xe3736e,_0x2364b8){const _0x46973f=a43_0x47ef,_0x1c2069=_0xe3736e();while(!![]){try{const _0x50a7ea=-parseInt(_0x46973f(0x160))/0x1*(parseInt(_0x46973f(0x175))/0x2)+parseInt(_0x46973f(0x174))/0x3*(-parseInt(_0x46973f(0x162))/0x4)+parseInt(_0x46973f(0x178))/0x5+-parseInt(_0x46973f(0x15d))/0x6+parseInt(_0x46973f(0x169))/0x7+-parseInt(_0x46973f(0x15f))/0x8*(parseInt(_0x46973f(0x16d))/0x9)+-parseInt(_0x46973f(0x171))/0xa*(-parseInt(_0x46973f(0x177))/0xb);if(_0x50a7ea===_0x2364b8)break;else _0x1c2069['push'](_0x1c2069['shift']());}catch(_0x21c4a8){_0x1c2069['push'](_0x1c2069['shift']());}}}(a43_0x3d59,0x53f09));import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';import{dirname,resolve}from'node:path';import{CliErrors}from'../../../errors.js';function a43_0x3d59(){const _0x246dd9=['map','Refusing\x20to\x20overwrite\x20symlink:\x20','skillName','type','str','3891664hPtaNN','name','rendered','Skill\x20directory\x20already\x20exists:\x20','11385Klaixd','files','WRITE','skillDir','22710IedGLx','isSymbolicLink','path','4158bSnPOr','59196TeDwCD','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','1595yyHzNi','1753525MHLXmi','target','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','Created\x20local\x20Skill\x20draft\x20','isDirectory','utf8','bool','2634996pZaDju','validation','8WLZBwW','11aIUabH','create','364mXuVTe','write'];a43_0x3d59=function(){return _0x246dd9;};return a43_0x3d59();}import{CREATE_NAME_FLAG,FORCE_FLAG,TARGET_FLAG,TYPE_FLAG}from'../flags.js';import{DEFAULT_SKILL_TARGET,renderSkillTemplate}from'../templates.js';export const createCommand={'service':'skill','command':a43_0x5ad475(0x161),'description':'Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','risk':a43_0x5ad475(0x163),'requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x4af004){const _0x33badd=a43_0x5ad475,_0x52a227=buildSkillCreatePlan(_0x4af004['str'](_0x33badd(0x16a)),_0x4af004[_0x33badd(0x168)](_0x33badd(0x167)),_0x4af004['str']('target'));return{'method':_0x33badd(0x16f),'url':_0x52a227[_0x33badd(0x170)],'body':{'skillName':_0x52a227['rendered'][_0x33badd(0x166)],'type':_0x52a227[_0x33badd(0x16b)][_0x33badd(0x167)],'selfContained':!![],'files':_0x52a227[_0x33badd(0x16b)][_0x33badd(0x16e)][_0x33badd(0x164)](_0x295a9b=>_0x295a9b[_0x33badd(0x173)])},'description':_0x33badd(0x158)};},async 'execute'(_0x1d3d32){const _0x2805ff=a43_0x5ad475,_0x247b3b=buildSkillCreatePlan(_0x1d3d32[_0x2805ff(0x168)]('name'),_0x1d3d32[_0x2805ff(0x168)]('type'),_0x1d3d32['str'](_0x2805ff(0x157)));return writeSkillDraft(_0x247b3b,_0x1d3d32[_0x2805ff(0x15c)]('force')),{'ok':!![],'data':{'skillName':_0x247b3b[_0x2805ff(0x16b)][_0x2805ff(0x166)],'type':_0x247b3b[_0x2805ff(0x16b)]['type'],'dir':_0x247b3b[_0x2805ff(0x170)],'files':_0x247b3b[_0x2805ff(0x16b)]['files'][_0x2805ff(0x164)](_0x239c88=>_0x239c88[_0x2805ff(0x173)])},'message':_0x2805ff(0x159)+_0x247b3b[_0x2805ff(0x16b)][_0x2805ff(0x166)]};}};function buildSkillCreatePlan(_0x2d362a,_0x30f6ea,_0x53fd72){const _0x89c152=a43_0x5ad475,_0x4baa41=renderSkillTemplate({'skillName':_0x2d362a,'type':_0x30f6ea}),_0x2a62b5=resolve(normalizeSkillTarget(_0x53fd72));return{'rendered':_0x4baa41,'targetRoot':_0x2a62b5,'skillDir':resolve(_0x2a62b5,_0x4baa41[_0x89c152(0x166)])};}function a43_0x47ef(_0x33fed5,_0x369cf9){_0x33fed5=_0x33fed5-0x157;const _0x3d59c7=a43_0x3d59();let _0x47efef=_0x3d59c7[_0x33fed5];return _0x47efef;}function normalizeSkillTarget(_0x42817f){return(_0x42817f||DEFAULT_SKILL_TARGET)['trim']()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x4d8f78,_0x587731){const _0x3ffe11=a43_0x5ad475;if(existsSync(_0x4d8f78[_0x3ffe11(0x170)])){const _0x1d4056=lstatSync(_0x4d8f78[_0x3ffe11(0x170)]);if(!_0x1d4056[_0x3ffe11(0x15a)]()||_0x1d4056[_0x3ffe11(0x172)]())throw CliErrors[_0x3ffe11(0x15e)](_0x3ffe11(0x176)+_0x4d8f78[_0x3ffe11(0x170)]);if(!_0x587731)throw CliErrors['validation'](_0x3ffe11(0x16c)+_0x4d8f78[_0x3ffe11(0x170)],'Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.');}for(const _0x11f674 of _0x4d8f78[_0x3ffe11(0x16b)]['files']){const _0x219cc6=resolve(_0x4d8f78['skillDir'],_0x11f674['path']),_0x5a7b9b=dirname(_0x219cc6);mkdirSync(_0x5a7b9b,{'recursive':!![]});if(existsSync(_0x219cc6)&&lstatSync(_0x219cc6)[_0x3ffe11(0x172)]())throw CliErrors[_0x3ffe11(0x15e)](_0x3ffe11(0x165)+_0x219cc6);writeFileSync(_0x219cc6,_0x11f674['content'],_0x3ffe11(0x15b));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a44_0x3627fe=a44_0x52f5;function a44_0x23e7(){const _0x23eee5=['company','Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','skill','\x20company\x20Skill(s).','removed','skillCode','accessKey','8fnuFuI','Installed\x20','length','67499UHcMev','action','includes','force','91940UyEgrC','trim','../../../skills/runtime-skill-sync.js','authRequired','\x20personal\x20and\x20','push','unchanged','8TCtNsv','71716GgfZvT','created','8945gQoGUH','642324duRtty','scope','envName','2004BbMyCU','4763549iFExGj','Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','583xHZknv','str','personal','skipped','3451212zWxoEA','../../../core/api-client.js','version','updated','write','bool','map','filter','appCode'];a44_0x23e7=function(){return _0x23eee5;};return a44_0x23e7();}function a44_0x52f5(_0x32b6e5,_0x2a632f){_0x32b6e5=_0x32b6e5-0x129;const _0x23e790=a44_0x23e7();let _0x52f59a=_0x23e790[_0x32b6e5];return _0x52f59a;}(function(_0x3f56a4,_0x2e620e){const _0x5de350=a44_0x52f5,_0x458c57=_0x3f56a4();while(!![]){try{const _0x4ba2e3=-parseInt(_0x5de350(0x149))/0x1*(-parseInt(_0x5de350(0x154))/0x2)+-parseInt(_0x5de350(0x12c))/0x3+parseInt(_0x5de350(0x129))/0x4+parseInt(_0x5de350(0x12b))/0x5*(parseInt(_0x5de350(0x12f))/0x6)+parseInt(_0x5de350(0x130))/0x7*(parseInt(_0x5de350(0x146))/0x8)+-parseInt(_0x5de350(0x136))/0x9+parseInt(_0x5de350(0x14d))/0xa*(-parseInt(_0x5de350(0x132))/0xb);if(_0x4ba2e3===_0x2e620e)break;else _0x458c57['push'](_0x458c57['shift']());}catch(_0x5ee957){_0x458c57['push'](_0x458c57['shift']());}}}(a44_0x23e7,0x7574c));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,FORCE_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';import{summarizeRuntimeSkill}from'../summary.js';export const installCommand={'service':a44_0x3627fe(0x141),'command':'install','description':a44_0x3627fe(0x140),'risk':a44_0x3627fe(0x13a),'requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG],async 'execute'(_0x5d96a0){return syncRuntimeSkills(_0x5d96a0);}};async function syncRuntimeSkills(_0x12c52e){const _0x2b604c=a44_0x3627fe,{downloadRuntimeSkillPackage:_0x573d10,listRuntimeSkills:_0x1e9919}=await import(_0x2b604c(0x137)),{linkEffectiveRuntimeSkills:_0x32fef8,materializeRuntimeSkill:_0x43c3e4,pruneStaleRuntimeSkillCache:_0x372941,pruneStaleRuntimeSkillLinks:_0x542895}=await import(_0x2b604c(0x14f)),_0x485a1a=_0x12c52e['str']('code'),_0x4dce60=normalizeSyncScopes(_0x12c52e[_0x2b604c(0x133)](_0x2b604c(0x12d))),_0x50aec5=_0x12c52e[_0x2b604c(0x12e)]??'production',_0x1e022e=_0x12c52e[_0x2b604c(0x145)],_0x5f5025=_0x12c52e[_0x2b604c(0x13b)](_0x2b604c(0x14c));if(!_0x1e022e)throw CliErrors[_0x2b604c(0x150)](_0x2b604c(0x131));const _0x52f68a=await Promise['all'](_0x4dce60[_0x2b604c(0x13c)](_0x1446e7=>_0x1e9919({'appCode':_0x12c52e['appCode'],'scope':_0x1446e7,'code':_0x485a1a['trim']()||undefined}))),_0x1a41b4=_0x4dce60[_0x2b604c(0x14b)](_0x2b604c(0x134))?_0x52f68a['flatMap']((_0x2a9e03,_0xc621ea)=>_0x4dce60[_0xc621ea]==='personal'?_0x2a9e03['personal']:[]):[],_0x45f2d2=_0x4dce60[_0x2b604c(0x14b)](_0x2b604c(0x13f))?_0x52f68a['flatMap']((_0x3fffe9,_0x52daf5)=>_0x4dce60[_0x52daf5]===_0x2b604c(0x13f)?_0x3fffe9[_0x2b604c(0x13f)]:[]):[],_0x5e7e37=new Set([..._0x1a41b4[_0x2b604c(0x13c)](_0x3939ca=>_0x3939ca[_0x2b604c(0x144)]?.[_0x2b604c(0x14e)]())[_0x2b604c(0x13d)](_0x4b3a0a=>Boolean(_0x4b3a0a)),..._0x45f2d2['map'](_0x4a0e37=>_0x4a0e37['skillCode']?.[_0x2b604c(0x14e)]())['filter'](_0x4897dd=>Boolean(_0x4897dd))]),_0x5ee996=_0x485a1a[_0x2b604c(0x14e)]()?[_0x485a1a[_0x2b604c(0x14e)]()]:undefined,_0x1fc66f=_0x4dce60[_0x2b604c(0x148)]===0x2&&_0x4dce60[_0x2b604c(0x14b)]('personal')&&_0x4dce60['includes'](_0x2b604c(0x13f)),_0x1bc33e=_0x1fc66f?_0x542895(_0x12c52e[_0x2b604c(0x13e)],_0x5e7e37,{},_0x5ee996):[],_0x597457=_0x372941({'env':_0x50aec5,'accessKey':_0x1e022e,'appCode':_0x12c52e[_0x2b604c(0x13e)],'activeSkillCodes':_0x5e7e37,'pruneSkillCodes':_0x5ee996,'scopes':_0x4dce60}),_0x3f9e91=[];for(const _0x317376 of _0x1a41b4){_0x3f9e91[_0x2b604c(0x152)](_0x43c3e4(_0x317376,'personal',{'env':_0x50aec5,'accessKey':_0x1e022e,'appCode':_0x12c52e['appCode'],'force':_0x5f5025,'packageBytes':await downloadSkillPackage(_0x317376,'personal',_0x12c52e[_0x2b604c(0x13e)],_0x573d10)}));}for(const _0x1e6c84 of _0x45f2d2){_0x3f9e91[_0x2b604c(0x152)](_0x43c3e4(_0x1e6c84,_0x2b604c(0x13f),{'env':_0x50aec5,'accessKey':_0x1e022e,'appCode':_0x12c52e[_0x2b604c(0x13e)],'force':_0x5f5025,'packageBytes':await downloadSkillPackage(_0x1e6c84,_0x2b604c(0x13f),_0x12c52e[_0x2b604c(0x13e)],_0x573d10)}));}const _0x311f8b=_0x32fef8(_0x3f9e91,_0x12c52e['appCode']),_0x338f93=countLinkActions(_0x311f8b);return{'ok':!![],'data':{'appCode':_0x12c52e[_0x2b604c(0x13e)],'personal':_0x1a41b4[_0x2b604c(0x148)],'company':_0x45f2d2['length'],'materialized':_0x3f9e91[_0x2b604c(0x148)],'links':{'total':_0x311f8b[_0x2b604c(0x148)],'created':_0x338f93[_0x2b604c(0x12a)]??0x0,'updated':_0x338f93[_0x2b604c(0x139)]??0x0,'unchanged':_0x338f93[_0x2b604c(0x153)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x1bc33e[_0x2b604c(0x13d)](_0x5f0fe9=>_0x5f0fe9[_0x2b604c(0x14a)]===_0x2b604c(0x143))['length'],'cacheDirs':_0x597457[_0x2b604c(0x13d)](_0x34d40a=>_0x34d40a[_0x2b604c(0x14a)]==='removed')[_0x2b604c(0x148)],'skipped':[..._0x1bc33e,..._0x597457][_0x2b604c(0x13d)](_0x24b7a2=>_0x24b7a2[_0x2b604c(0x14a)]===_0x2b604c(0x135))[_0x2b604c(0x148)]},'skills':{'personal':_0x1a41b4[_0x2b604c(0x13c)](summarizeRuntimeSkill),'company':_0x45f2d2[_0x2b604c(0x13c)](summarizeRuntimeSkill)}},'message':_0x2b604c(0x147)+_0x1a41b4[_0x2b604c(0x148)]+_0x2b604c(0x151)+_0x45f2d2[_0x2b604c(0x148)]+_0x2b604c(0x142)};}async function downloadSkillPackage(_0x2ad2b5,_0x44d131,_0x263bdf,_0x3f1533){const _0x239777=a44_0x3627fe,_0x51d169=_0x2ad2b5[_0x239777(0x138)]?.['trim']();return _0x51d169?_0x3f1533(_0x44d131,_0x2ad2b5['skillCode'],_0x263bdf,_0x51d169):_0x3f1533(_0x44d131,_0x2ad2b5[_0x239777(0x144)],_0x263bdf);}function countLinkActions(_0x2f6776){return _0x2f6776['reduce']((_0x3ce3ce,_0x27456e)=>{const _0xde2293=a44_0x52f5;return _0x3ce3ce[_0x27456e[_0xde2293(0x14a)]]=(_0x3ce3ce[_0x27456e[_0xde2293(0x14a)]]??0x0)+0x1,_0x3ce3ce;},{});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x550a89=a45_0x4a6b;(function(_0x2ec67b,_0x10faf2){const _0x19167e=a45_0x4a6b,_0x5d7461=_0x2ec67b();while(!![]){try{const _0x3273c6=parseInt(_0x19167e(0x10e))/0x1*(-parseInt(_0x19167e(0x102))/0x2)+parseInt(_0x19167e(0xfe))/0x3*(parseInt(_0x19167e(0x118))/0x4)+-parseInt(_0x19167e(0x104))/0x5*(-parseInt(_0x19167e(0x112))/0x6)+parseInt(_0x19167e(0x101))/0x7+-parseInt(_0x19167e(0x10d))/0x8*(parseInt(_0x19167e(0x110))/0x9)+parseInt(_0x19167e(0x10b))/0xa+parseInt(_0x19167e(0x113))/0xb*(parseInt(_0x19167e(0x114))/0xc);if(_0x3273c6===_0x10faf2)break;else _0x5d7461['push'](_0x5d7461['shift']());}catch(_0x2c2254){_0x5d7461['push'](_0x5d7461['shift']());}}}(a45_0x2bb7,0x93bf4));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG}from'../flags.js';import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';function a45_0x2bb7(){const _0x3e02a5=['str','company','remote','list','production','7402140IXMfPX','personal','200dplYZD','717687pzYzWX','local','226926WGFXQf','scope','6NUeLXi','16313tnBNOj','6696kYfJZH','Listed\x20','../../../core/api-client.js','filter','8VZsoki','trim','length','read','\x20local\x20Skill(s).','appCode','../../../skills/runtime-skill-sync.js','180069AzJgnO','map','envName','976269UCgKrh','2sAZFQo','bool','629840jgXhrZ','accessKey'];a45_0x2bb7=function(){return _0x3e02a5;};return a45_0x2bb7();}export const listCommand={'service':'skill','command':a45_0x550a89(0x109),'description':'List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','risk':a45_0x550a89(0x11b),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG],async 'execute'(_0x4f59f9){const _0x433bba=a45_0x550a89,_0x15787c=_0x4f59f9[_0x433bba(0x106)]('code'),_0x1e53cb=normalizeListScope(_0x4f59f9[_0x433bba(0x106)]('scope'));if(_0x4f59f9[_0x433bba(0x103)](_0x433bba(0x10f))){const _0x413c2c=_0x4f59f9[_0x433bba(0x105)];if(!_0x413c2c)throw CliErrors['authRequired']();const {listLocalRuntimeSkills:_0x4c164f}=await import(_0x433bba(0x11e)),_0xd2f57d=_0x4c164f({'env':_0x4f59f9[_0x433bba(0x100)]??_0x433bba(0x10a),'accessKey':_0x413c2c,'appCode':_0x4f59f9[_0x433bba(0x11d)],'scopes':listScopeToRuntimeScopes(_0x1e53cb),'code':_0x15787c[_0x433bba(0x119)]()||undefined}),_0x3fa5b1=groupLocalRuntimeSkills(_0xd2f57d);return{'ok':!![],'data':{'appCode':_0x4f59f9[_0x433bba(0x11d)],'source':_0x433bba(0x10f),'scope':_0x1e53cb,'total':_0xd2f57d[_0x433bba(0x11a)],'personal':_0x3fa5b1[_0x433bba(0x10c)]['length'],'company':_0x3fa5b1[_0x433bba(0x107)]['length'],'items':_0xd2f57d[_0x433bba(0xff)](summarizeLocalRuntimeSkill),'skills':{'personal':_0x3fa5b1[_0x433bba(0x10c)][_0x433bba(0xff)](summarizeLocalRuntimeSkill),'company':_0x3fa5b1['company'][_0x433bba(0xff)](summarizeLocalRuntimeSkill)}},'message':_0x433bba(0x115)+_0xd2f57d[_0x433bba(0x11a)]+_0x433bba(0x11c)};}const {listRuntimeSkills:_0x5ea24c}=await import(_0x433bba(0x116)),_0x409ae9=await _0x5ea24c({'appCode':_0x4f59f9[_0x433bba(0x11d)],'scope':listScopeToRemoteScope(_0x1e53cb),'code':_0x15787c[_0x433bba(0x119)]()||undefined}),_0x3b3641=shouldListScope(_0x1e53cb,'personal')?_0x409ae9[_0x433bba(0x10c)]??[]:[],_0x222b9d=shouldListScope(_0x1e53cb,_0x433bba(0x107))?_0x409ae9[_0x433bba(0x107)]??[]:[],_0x4e570f=[..._0x3b3641,..._0x222b9d];return{'ok':!![],'data':{'appCode':_0x4f59f9[_0x433bba(0x11d)],'source':_0x433bba(0x108),'scope':_0x1e53cb,'total':_0x4e570f[_0x433bba(0x11a)],'personal':_0x3b3641[_0x433bba(0x11a)],'company':_0x222b9d['length'],'items':_0x4e570f[_0x433bba(0xff)](summarizeRuntimeSkill),'skills':{'personal':_0x3b3641[_0x433bba(0xff)](summarizeRuntimeSkill),'company':_0x222b9d[_0x433bba(0xff)](summarizeRuntimeSkill)}},'message':_0x433bba(0x115)+_0x4e570f[_0x433bba(0x11a)]+'\x20remote\x20Skill(s).'};}};function a45_0x4a6b(_0x3109db,_0x4fc922){_0x3109db=_0x3109db-0xfe;const _0x2bb79c=a45_0x2bb7();let _0x4a6bd2=_0x2bb79c[_0x3109db];return _0x4a6bd2;}function groupLocalRuntimeSkills(_0x343781){const _0x279f95=a45_0x550a89;return{'personal':_0x343781[_0x279f95(0x117)](_0x1b094f=>_0x1b094f['scope']===_0x279f95(0x10c)),'company':_0x343781['filter'](_0x350729=>_0x350729[_0x279f95(0x111)]==='company'),'builtin':_0x343781[_0x279f95(0x117)](_0x1b4995=>_0x1b4995[_0x279f95(0x111)]==='builtin')};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a46_0x4e6bd3=a46_0x9584;function a46_0x9584(_0x25f280,_0x96270c){_0x25f280=_0x25f280-0x13a;const _0x447dba=a46_0x447d();let _0x95848=_0x447dba[_0x25f280];return _0x95848;}(function(_0x590e20,_0x3f52b3){const _0x44c6d4=a46_0x9584,_0x36283e=_0x590e20();while(!![]){try{const _0x539395=parseInt(_0x44c6d4(0x13b))/0x1+parseInt(_0x44c6d4(0x142))/0x2+-parseInt(_0x44c6d4(0x140))/0x3+-parseInt(_0x44c6d4(0x13a))/0x4+-parseInt(_0x44c6d4(0x13f))/0x5+-parseInt(_0x44c6d4(0x143))/0x6+parseInt(_0x44c6d4(0x13e))/0x7;if(_0x539395===_0x3f52b3)break;else _0x36283e['push'](_0x36283e['shift']());}catch(_0x352133){_0x36283e['push'](_0x36283e['shift']());}}}(a46_0x447d,0x8eed1));import{CONFIRM_WARNINGS_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';function a46_0x447d(){const _0x3998f3=['437572EGwrKS','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20scope\x20or\x20submit\x20company\x20scope\x20for\x20review','push','18238143vgkpyA','1160860fLKtyE','3164256jkJZiH','write','261862dvjfle','906126fNuQcn','skill','4602328uHLYke'];a46_0x447d=function(){return _0x3998f3;};return a46_0x447d();}import{skillPushDryRun,skillPushExecute}from'../push-execute.js';export const pushCommand={'service':a46_0x4e6bd3(0x144),'command':a46_0x4e6bd3(0x13d),'description':a46_0x4e6bd3(0x13c),'risk':a46_0x4e6bd3(0x141),'flags':[DIR_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a47_0x2a5f17=a47_0x58c4;function a47_0x1864(){const _0x14b698=['errors','106797kUfOwH','Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','27035ICkzGl','410XSwjZK','strict','read','18PWuFrA','730384yFZZdJ','warnings','52gNDPYw','50280RypIfU','validate','type','413083WTeecF','482075jRJDzY','427oFVOpK','dir','5232321VJbJIq','bool'];a47_0x1864=function(){return _0x14b698;};return a47_0x1864();}(function(_0x1ccf87,_0x5c5239){const _0x5495c4=a47_0x58c4,_0x41fdce=_0x1ccf87();while(!![]){try{const _0xb37031=-parseInt(_0x5495c4(0x195))/0x1+-parseInt(_0x5495c4(0x18f))/0x2+-parseInt(_0x5495c4(0x188))/0x3*(parseInt(_0x5495c4(0x191))/0x4)+-parseInt(_0x5495c4(0x18a))/0x5*(-parseInt(_0x5495c4(0x18e))/0x6)+-parseInt(_0x5495c4(0x197))/0x7*(-parseInt(_0x5495c4(0x192))/0x8)+-parseInt(_0x5495c4(0x185))/0x9+parseInt(_0x5495c4(0x18b))/0xa*(parseInt(_0x5495c4(0x196))/0xb);if(_0xb37031===_0x5c5239)break;else _0x41fdce['push'](_0x41fdce['shift']());}catch(_0x2c354d){_0x41fdce['push'](_0x41fdce['shift']());}}}(a47_0x1864,0x5b4f0));import{DIR_FLAG,STRICT_FLAG}from'../flags.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';function a47_0x58c4(_0x4b0da0,_0x12348b){_0x4b0da0=_0x4b0da0-0x184;const _0x186454=a47_0x1864();let _0x58c406=_0x186454[_0x4b0da0];return _0x58c406;}export const validateCommand={'service':'skill','command':a47_0x2a5f17(0x193),'description':a47_0x2a5f17(0x189),'risk':a47_0x2a5f17(0x18d),'requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x475a5f){const _0x22f4d7=a47_0x2a5f17,_0x1fe439=_0x475a5f[_0x22f4d7(0x186)](_0x22f4d7(0x18c)),_0x4f316d=validateSkillDirectory(_0x475a5f['str'](_0x22f4d7(0x184)),{'strict':_0x1fe439});return throwIfSkillValidationFailed(_0x4f316d,_0x1fe439),{'ok':!![],'data':{'dir':_0x4f316d['dir'],'type':_0x4f316d[_0x22f4d7(0x194)],'errors':_0x4f316d[_0x22f4d7(0x187)],'warnings':_0x4f316d[_0x22f4d7(0x190)]},'message':'Skill\x20validation\x20passed.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a48_0xff5ccf=a48_0x2272;(function(_0x15d591,_0x3e92b4){const _0x359866=a48_0x2272,_0x76082f=_0x15d591();while(!![]){try{const _0x1ac549=parseInt(_0x359866(0x145))/0x1*(-parseInt(_0x359866(0x15d))/0x2)+-parseInt(_0x359866(0x156))/0x3*(parseInt(_0x359866(0x146))/0x4)+parseInt(_0x359866(0x153))/0x5*(parseInt(_0x359866(0x15c))/0x6)+parseInt(_0x359866(0x160))/0x7+parseInt(_0x359866(0x142))/0x8*(parseInt(_0x359866(0x14b))/0x9)+parseInt(_0x359866(0x163))/0xa+-parseInt(_0x359866(0x14f))/0xb;if(_0x1ac549===_0x3e92b4)break;else _0x76082f['push'](_0x76082f['shift']());}catch(_0x21dcd9){_0x76082f['push'](_0x76082f['shift']());}}}(a48_0x4347,0x44cf4));import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':a48_0xff5ccf(0x147),'type':'string','description':a48_0xff5ccf(0x14c)};function a48_0x2272(_0x49959d,_0x565a7d){_0x49959d=_0x49959d-0x142;const _0x434728=a48_0x4347();let _0x22729d=_0x434728[_0x49959d];return _0x22729d;}export const SCOPE_FLAG={'name':a48_0xff5ccf(0x154),'type':a48_0xff5ccf(0x149),'description':'Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','enum':[a48_0xff5ccf(0x15a),'personal',a48_0xff5ccf(0x15b)]};export const PUSH_SCOPE_FLAG={'name':a48_0xff5ccf(0x154),'type':a48_0xff5ccf(0x149),'description':a48_0xff5ccf(0x14e),'default':a48_0xff5ccf(0x15e),'enum':['personal',a48_0xff5ccf(0x15b)]};export const LIST_SCOPE_FLAG={'name':a48_0xff5ccf(0x154),'type':'string','description':'Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','enum':[a48_0xff5ccf(0x15a),a48_0xff5ccf(0x15e),a48_0xff5ccf(0x15b)]};export const LOCAL_FLAG={'name':a48_0xff5ccf(0x152),'type':'boolean','description':'Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists'};export const DIR_FLAG={'name':a48_0xff5ccf(0x143),'type':a48_0xff5ccf(0x149),'required':!![],'description':a48_0xff5ccf(0x151)};export const CREATE_NAME_FLAG={'name':a48_0xff5ccf(0x155),'type':a48_0xff5ccf(0x149),'required':!![],'description':a48_0xff5ccf(0x148),'pattern':{'regex':SKILL_NAME_PATTERN,'description':'lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens'}};export const TYPE_FLAG={'name':'type','type':'string','description':a48_0xff5ccf(0x162),'default':a48_0xff5ccf(0x144),'enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':a48_0xff5ccf(0x14a),'type':a48_0xff5ccf(0x149),'description':a48_0xff5ccf(0x164),'default':DEFAULT_SKILL_TARGET};export const FORCE_FLAG={'name':a48_0xff5ccf(0x161),'type':a48_0xff5ccf(0x158),'description':a48_0xff5ccf(0x157)};export const CONFIRM_WARNINGS_FLAG={'name':a48_0xff5ccf(0x15f),'type':'boolean','description':a48_0xff5ccf(0x159)};function a48_0x4347(){const _0x3ab831=['name','33vCClBf','Overwrite\x20generated\x20or\x20CLI-managed\x20Skill\x20files\x20when\x20the\x20target\x20already\x20exists','boolean','Confirm\x20reviewed\x20personal\x20or\x20company\x20Skill\x20publish\x20warnings','all','company','133572DxQJaR','835940TXYFcn','personal','confirm-warnings','2189229Qyzqai','force','Skill\x20template\x20type','4508310AwCphO','Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','32pnoNgn','dir','write','1JHzPJo','3208sMilwK','code','Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','string','target','566469voaPVc','Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code','strict','Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review','7781642WsuGly','Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled','Local\x20Skill\x20directory\x20containing\x20SKILL.md','local','90vkEvfJ','scope'];a48_0x4347=function(){return _0x3ab831;};return a48_0x4347();}export const STRICT_FLAG={'name':a48_0xff5ccf(0x14d),'type':'boolean','description':a48_0xff5ccf(0x150)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1137bd,_0x14381f){const _0x4e0aa7=a49_0x4579,_0x32669c=_0x1137bd();while(!![]){try{const _0x305f1b=-parseInt(_0x4e0aa7(0xb9))/0x1+parseInt(_0x4e0aa7(0xb3))/0x2+parseInt(_0x4e0aa7(0xb7))/0x3+parseInt(_0x4e0aa7(0xb5))/0x4+-parseInt(_0x4e0aa7(0xb2))/0x5+-parseInt(_0x4e0aa7(0xb6))/0x6+parseInt(_0x4e0aa7(0xb4))/0x7*(parseInt(_0x4e0aa7(0xb8))/0x8);if(_0x305f1b===_0x14381f)break;else _0x32669c['push'](_0x32669c['shift']());}catch(_0x1e6222){_0x32669c['push'](_0x32669c['shift']());}}}(a49_0x3a52,0xf3821));import{createCommand}from'./commands/create.js';import{installCommand}from'./commands/install.js';import{listCommand}from'./commands/list.js';function a49_0x4579(_0x4d7467,_0x49c483){_0x4d7467=_0x4d7467-0xb2;const _0x3a529d=a49_0x3a52();let _0x45795b=_0x3a529d[_0x4d7467];return _0x45795b;}function a49_0x3a52(){const _0x1867f2=['3913152NNxqpZ','2927514NqrkXn','16UyPSju','1550048TwGVyG','5347910bBSOAj','1401176mhtOJK','4026463HjDLWi','5769548AYlOSS'];a49_0x3a52=function(){return _0x1867f2;};return a49_0x3a52();}import{pushCommand}from'./commands/push.js';import{validateCommand}from'./commands/validate.js';export const skillDefinitions=[installCommand,createCommand,validateCommand,listCommand,pushCommand];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x518abe,_0x5355f0){var _0x422847=a50_0xefee,_0x913da1=_0x518abe();while(!![]){try{var _0x2f1c85=-parseInt(_0x422847(0x80))/0x1+parseInt(_0x422847(0x8b))/0x2*(-parseInt(_0x422847(0x87))/0x3)+-parseInt(_0x422847(0x85))/0x4*(-parseInt(_0x422847(0x8e))/0x5)+parseInt(_0x422847(0x86))/0x6+parseInt(_0x422847(0x8f))/0x7*(-parseInt(_0x422847(0x7f))/0x8)+-parseInt(_0x422847(0x88))/0x9*(parseInt(_0x422847(0x8a))/0xa)+parseInt(_0x422847(0x7e))/0xb*(parseInt(_0x422847(0x81))/0xc);if(_0x2f1c85===_0x5355f0)break;else _0x913da1['push'](_0x913da1['shift']());}catch(_0x1625c1){_0x913da1['push'](_0x913da1['shift']());}}}(a50_0x30ea,0x67650));function a50_0xefee(_0x490cbf,_0x37e3c4){_0x490cbf=_0x490cbf-0x7e;var _0x30ea8b=a50_0x30ea();var _0xefeef9=_0x30ea8b[_0x490cbf];return _0xefeef9;}export function isPackageBackedManifest(_0x213724){var _0x217f74=a50_0xefee;return!!_0x213724&&typeof _0x213724===_0x217f74(0x8d)&&!Array[_0x217f74(0x89)](_0x213724)&&typeof _0x213724[_0x217f74(0x82)]==='string'&&_0x213724[_0x217f74(0x82)]['length']>0x0&&Array[_0x217f74(0x89)](_0x213724[_0x217f74(0x83)]);}export function isMultiFileManifest(_0x550a10){var _0x2beb6a=a50_0xefee;return!!_0x550a10&&typeof _0x550a10===_0x2beb6a(0x8d)&&!Array[_0x2beb6a(0x89)](_0x550a10)&&Array[_0x2beb6a(0x89)](_0x550a10['files'])&&_0x550a10['files']['some'](_0x1448b4=>_0x1448b4[_0x2beb6a(0x8c)]!==_0x2beb6a(0x84));}function a50_0x30ea(){var _0x1e7244=['2650776XDccRJ','581739gRkdut','1737063dgRmDD','isArray','10CqCqpL','2fUnHYD','path','object','560985IcMdvW','7672bidCgh','269566YnwToy','4112QuhIlC','122973ziIxBa','132qbWkjI','ossPath','files','SKILL.md','28inUxFk'];a50_0x30ea=function(){return _0x1e7244;};return a50_0x30ea();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x18739f,_0xf80199){const _0x4ee05c=a50_0x3fc8,_0x29921d=_0x18739f();while(!![]){try{const _0x6b9eeb=parseInt(_0x4ee05c(0x1b6))/0x1*(-parseInt(_0x4ee05c(0x1a3))/0x2)+-parseInt(_0x4ee05c(0x18e))/0x3*(parseInt(_0x4ee05c(0x19e))/0x4)+-parseInt(_0x4ee05c(0x183))/0x5+-parseInt(_0x4ee05c(0x190))/0x6*(-parseInt(_0x4ee05c(0x186))/0x7)+-parseInt(_0x4ee05c(0x180))/0x8+parseInt(_0x4ee05c(0x19a))/0x9*(parseInt(_0x4ee05c(0x191))/0xa)+parseInt(_0x4ee05c(0x1a0))/0xb*(parseInt(_0x4ee05c(0x1a6))/0xc);if(_0x6b9eeb===_0xf80199)break;else _0x29921d['push'](_0x29921d['shift']());}catch(_0x36acce){_0x29921d['push'](_0x29921d['shift']());}}}(a50_0x4606,0x71258));import{CliErrors}from'../../errors.js';import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,runRemoteContentPreflight,throwIfBuiltinPushTarget,throwIfUnconfirmedPublishWarnings,throwIfPublishValidationFailed}from'./push-flow-helpers.js';import{withRetargetExistingMetadata}from'./push-retarget.js';import{summarizeRuntimeSkill}from'./summary.js';function a50_0x3fc8(_0x28dc6b,_0x1a980c){_0x28dc6b=_0x28dc6b-0x180;const _0x46068b=a50_0x4606();let _0x3fc880=_0x46068b[_0x28dc6b];return _0x3fc880;}import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x38ce1e){const _0x3ee0e0=a50_0x3fc8,{getRuntimeSkillByCode:_0x142a5d,validateRuntimeSkillPublish:_0x9a4a0f}=await import(_0x3ee0e0(0x19c)),{readPushDirectory:_0x2548f6,resolvePushDirectoryIdentity:_0x1d4516}=await import(_0x3ee0e0(0x1a9));if(!_0x38ce1e['accessKey'])throw CliErrors[_0x3ee0e0(0x18f)]();const _0x217c53=resolvePushScope(_0x38ce1e),_0x1c65e=validateSkillDirectory(_0x38ce1e['str']('dir'));throwIfSkillValidationFailed(_0x1c65e);const _0x303581=_0x1d4516(_0x1c65e[_0x3ee0e0(0x1ad)],_0x38ce1e[_0x3ee0e0(0x192)],remoteFirstMetadataOptions()),_0x55ee3e=await _0x142a5d(_0x38ce1e[_0x3ee0e0(0x192)],_0x303581[_0x3ee0e0(0x184)]);throwIfBuiltinPushTarget(_0x55ee3e);if(_0x217c53===_0x3ee0e0(0x1a2)){const _0x4e1af0=_0x2548f6(_0x1c65e[_0x3ee0e0(0x1ad)],_0x38ce1e[_0x3ee0e0(0x192)],remoteMissingCompanyReadOptions()),_0x39f03b=await _0x9a4a0f(_0x38ce1e['appCode'],_0x4e1af0[_0x3ee0e0(0x1ab)],{'visibility':_0x3ee0e0(0x1bd)});return{'method':'POST','url':_0x3ee0e0(0x1b4)+_0x38ce1e['appCode']+_0x3ee0e0(0x185),'body':{'skillCode':_0x4e1af0[_0x3ee0e0(0x184)],'visibility':'NAMESPACE_ONLY','valid':_0x39f03b['valid'],'errors':_0x39f03b[_0x3ee0e0(0x19d)],'warnings':_0x39f03b[_0x3ee0e0(0x198)],'resolvedSlug':_0x39f03b['resolvedSlug'],'resolvedVersion':_0x39f03b[_0x3ee0e0(0x1aa)]},'description':_0x3ee0e0(0x1ae)};}if(_0x55ee3e&&_0x55ee3e[_0x3ee0e0(0x1b8)]!==_0x3ee0e0(0x18d))throw CliErrors[_0x3ee0e0(0x181)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20'+_0x303581['skillCode']+_0x3ee0e0(0x1b7)+(_0x55ee3e[_0x3ee0e0(0x1b8)]??_0x3ee0e0(0x18a))+'\x22.');const _0x22c2f1=_0x2548f6(_0x1c65e['dir'],_0x38ce1e[_0x3ee0e0(0x192)],_0x55ee3e?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions()),_0x4676b4=await _0x9a4a0f(_0x38ce1e[_0x3ee0e0(0x192)],_0x22c2f1[_0x3ee0e0(0x1ab)],{'visibility':_0x3ee0e0(0x1a8)});return{'method':_0x3ee0e0(0x1af),'url':_0x3ee0e0(0x1b4)+_0x38ce1e['appCode']+'/publish/validate','body':{'skillCode':_0x22c2f1[_0x3ee0e0(0x184)],'visibility':_0x3ee0e0(0x1a8),'valid':_0x4676b4[_0x3ee0e0(0x1ba)],'errors':_0x4676b4[_0x3ee0e0(0x19d)],'warnings':_0x4676b4['warnings'],'resolvedSlug':_0x4676b4[_0x3ee0e0(0x18c)],'resolvedVersion':_0x4676b4[_0x3ee0e0(0x1aa)]},'description':'Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.'};}function a50_0x4606(){const _0x5b0f88=['input','confirmWarnings','dir','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','POST','Personal','existing','bool','savedSkill','/api/cli/v1/skills/','Updated\x20personal\x20Skill\x20','968MAJLze','\x20has\x20scope=\x22','scope','confirm-warnings','valid','appcode','remoteForPreflight','NAMESPACE_ONLY','str','1141192rfigsj','validation','publishInput','2354335qKgpAN','skillCode','/publish/validate','280mxIpYy','\x20for\x20review','files','version','unknown','\x20Skill\x20','resolvedSlug','personal','27129BiizVd','authRequired','54066OREXBa','708060QhfLTr','appCode','Submitted\x20company\x20Skill\x20','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','identical','accessKey','\x20is\x20already\x20published\x20and\x20content\x20is\x20identical','warnings','frontmatterDisplayName','45IYGetQ','(unknown)','../../core/api-client.js','errors','236zIemeM','Created\x20personal\x20Skill\x20','4345bSqbWi','payload','company','686KTogge','metadata','\x20version\x20','37308vfWwoX','trim','PRIVATE','../../skills/runtime-skill-sync.js','resolvedVersion'];a50_0x4606=function(){return _0x5b0f88;};return a50_0x4606();}export async function skillPushExecute(_0xec8101){const _0x2fd13c=a50_0x3fc8,{createPersonalRuntimeSkill:_0x3f632d,downloadRuntimeSkillPackage:_0x5be923,getRuntimeSkillByCode:_0x3c7b63,publishCompanyRuntimeSkill:_0x368ba6,updatePersonalRuntimeSkill:_0x456bed,validateRuntimeSkillPublish:_0x2fc328}=await import(_0x2fd13c(0x19c)),{verifyRuntimeSkillPackage:_0x27162c,verifyRuntimeSkillBundle:_0x51bb8b,readPushDirectory:_0x3b560a,refreshPushDirectoryMetadataFromRemote:_0x3ec925,recordPushedRuntimeSkill:_0x25e6d0,resolvePushDirectoryIdentity:_0x32882a}=await import(_0x2fd13c(0x1a9));if(!_0xec8101[_0x2fd13c(0x196)])throw CliErrors[_0x2fd13c(0x18f)]();const _0x24513f=resolvePushScope(_0xec8101),_0x5589d9=_0xec8101[_0x2fd13c(0x1b2)](_0x2fd13c(0x1b9))||_0xec8101[_0x2fd13c(0x1b2)](_0x2fd13c(0x1ac)),_0x2fc098=validateSkillDirectory(_0xec8101['str'](_0x2fd13c(0x1ad)));throwIfSkillValidationFailed(_0x2fc098);const _0x4ec139=_0x2fc098[_0x2fd13c(0x1ad)];let _0x32647a;if(_0x24513f==='company'){const _0x59ed1a=_0x32882a(_0x4ec139,_0xec8101[_0x2fd13c(0x192)],remoteFirstMetadataOptions()),_0x1c97b7=await _0x3c7b63(_0xec8101[_0x2fd13c(0x192)],_0x59ed1a['skillCode']);throwIfBuiltinPushTarget(_0x1c97b7);if(_0x1c97b7)_0x3ec925(_0x4ec139,_0x1c97b7,_0xec8101[_0x2fd13c(0x192)]);const _0x3306fe=_0x3b560a(_0x4ec139,_0xec8101[_0x2fd13c(0x192)],_0x1c97b7?{'targetScope':_0x2fd13c(0x1a2),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions());_0x32647a={'scope':_0x2fd13c(0x1a2),'payload':_0x3306fe,'publishInput':_0x3306fe[_0x2fd13c(0x1ab)],'remoteForPreflight':_0x1c97b7,'warnings':[]};}else{const _0x5872af=_0xec8101[_0x2fd13c(0x1be)](_0x2fd13c(0x1bb))[_0x2fd13c(0x1a7)](),_0x92f5c2=Boolean(_0x5872af),_0xf77371=allowRetargetArgs(_0x92f5c2),_0xd04fbc=_0x32882a(_0x4ec139,_0xec8101[_0x2fd13c(0x192)],{...remoteFirstMetadataOptions(),..._0xf77371[0x0]}),_0x945a76=await _0x3c7b63(_0xec8101['appCode'],_0xd04fbc[_0x2fd13c(0x184)]);throwIfBuiltinPushTarget(_0x945a76);if(_0x945a76){if(_0x945a76[_0x2fd13c(0x1b8)]!==_0x2fd13c(0x18d)){if(_0x92f5c2)throw CliErrors[_0x2fd13c(0x181)](_0x2fd13c(0x194)+_0xd04fbc[_0x2fd13c(0x184)]+_0x2fd13c(0x1b7)+(_0x945a76[_0x2fd13c(0x1b8)]??_0x2fd13c(0x18a))+'\x22.');_0x3ec925(_0x4ec139,_0x945a76,_0xec8101[_0x2fd13c(0x192)]);}else!_0x92f5c2&&_0x3ec925(_0x4ec139,_0x945a76,_0xec8101['appCode']);}const _0xab64ab=_0x3b560a(_0x4ec139,_0xec8101['appCode'],_0x945a76?remotePersonalReadOptions(_0x92f5c2,_0xf77371[0x0]):remoteMissingPersonalReadOptions(_0xf77371[0x0])),_0x49a23e=_0x945a76?.[_0x2fd13c(0x1b8)]==='personal'&&_0x945a76[_0x2fd13c(0x184)]===_0xab64ab[_0x2fd13c(0x184)]?_0x945a76:undefined,_0x548843=_0x92f5c2&&_0x49a23e?withRetargetExistingMetadata(_0xab64ab[_0x2fd13c(0x1ab)],_0x49a23e,{'preferInputSkillName':Boolean(_0xab64ab[_0x2fd13c(0x199)])}):_0xab64ab[_0x2fd13c(0x1ab)],_0x109352=_0x92f5c2?buildRetargetWarning(_0xd04fbc[_0x2fd13c(0x1a4)],_0xec8101[_0x2fd13c(0x192)]):[];_0x32647a={'scope':_0x2fd13c(0x18d),'payload':_0xab64ab,'publishInput':_0x548843,'remoteForPreflight':_0x49a23e,'existing':_0x49a23e,'warnings':[..._0x2fc098['warnings'],..._0x109352]};}const _0x25753d=await runRemoteContentPreflight({'scope':_0x32647a[_0x2fd13c(0x1b8)],'remote':_0x32647a[_0x2fd13c(0x1bc)],'publishInput':_0x32647a['publishInput'],'skillCode':_0x32647a[_0x2fd13c(0x1a1)][_0x2fd13c(0x184)],'appCode':_0xec8101[_0x2fd13c(0x192)],'downloadRuntimeSkillPackage':_0x5be923,'verifyRuntimeSkillBundle':_0x51bb8b});if(_0x25753d['status']===_0x2fd13c(0x195))return _0x32647a[_0x2fd13c(0x1b8)]===_0x2fd13c(0x1a2)?_0x25e6d0(_0x4ec139,_0x25753d[_0x2fd13c(0x1b3)],_0xec8101[_0x2fd13c(0x192)],{'scope':_0x2fd13c(0x1a2)}):_0x25e6d0(_0x4ec139,_0x25753d['savedSkill'],_0xec8101[_0x2fd13c(0x192)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x25753d[_0x2fd13c(0x1b3)]),'scope':_0x32647a[_0x2fd13c(0x1b8)],..._0x32647a[_0x2fd13c(0x1b8)]===_0x2fd13c(0x18d)?{'warnings':_0x32647a[_0x2fd13c(0x198)]}:{},'alreadyPublished':!![],'contentIdentical':!![]},'message':scopeLabel(_0x32647a[_0x2fd13c(0x1b8)])+_0x2fd13c(0x18b)+_0x32647a[_0x2fd13c(0x1a1)][_0x2fd13c(0x184)]+_0x2fd13c(0x197)};if(_0x32647a[_0x2fd13c(0x1b8)]===_0x2fd13c(0x1a2)){const _0x4facbd=await _0x2fc328(_0xec8101[_0x2fd13c(0x192)],_0x32647a[_0x2fd13c(0x182)],{'visibility':_0x2fd13c(0x1bd)});throwIfPublishValidationFailed(_0x2fd13c(0x1a2),_0x32647a[_0x2fd13c(0x1a1)][_0x2fd13c(0x184)],_0x4facbd),throwIfUnconfirmedPublishWarnings(_0x2fd13c(0x1a2),_0x32647a['payload'][_0x2fd13c(0x184)],_0x4facbd[_0x2fd13c(0x198)],_0x5589d9);const _0x521c96=await _0x368ba6(_0xec8101['appCode'],_0x32647a[_0x2fd13c(0x182)],{'confirmWarnings':_0x5589d9});return _0x25e6d0(_0x4ec139,{..._0x521c96,'files':_0x32647a[_0x2fd13c(0x182)][_0x2fd13c(0x188)]},_0xec8101[_0x2fd13c(0x192)],{'scope':'company'}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x521c96),'scope':_0x2fd13c(0x1a2),'reviewState':'submitted','submittedForReview':!![],'validation':{'warnings':_0x4facbd[_0x2fd13c(0x198)]}},'message':_0x2fd13c(0x193)+_0x32647a[_0x2fd13c(0x1a1)][_0x2fd13c(0x184)]+_0x2fd13c(0x1a5)+(_0x521c96[_0x2fd13c(0x189)]??_0x2fd13c(0x19b))+_0x2fd13c(0x187)};}const _0x3d6482=await _0x2fc328(_0xec8101[_0x2fd13c(0x192)],_0x32647a['publishInput'],{'visibility':_0x2fd13c(0x1a8)});throwIfPublishValidationFailed(_0x2fd13c(0x18d),_0x32647a[_0x2fd13c(0x1a1)][_0x2fd13c(0x184)],_0x3d6482),throwIfUnconfirmedPublishWarnings(_0x2fd13c(0x18d),_0x32647a[_0x2fd13c(0x1a1)][_0x2fd13c(0x184)],_0x3d6482[_0x2fd13c(0x198)],_0x5589d9);const _0x222ba4={'confirmWarnings':_0x5589d9},_0x5db171=_0x32647a[_0x2fd13c(0x1b1)]?await _0x456bed(_0x32647a['payload']['skillCode'],_0xec8101['appCode'],_0x32647a['publishInput'],_0x222ba4):await _0x3f632d(_0xec8101[_0x2fd13c(0x192)],_0x32647a['publishInput'],_0x222ba4);let _0x477e76=_0x5db171;if(isMultiFileManifest(_0x32647a['publishInput'][_0x2fd13c(0x188)])){const _0x12049a=await _0x5be923(_0x2fd13c(0x18d),_0x5db171[_0x2fd13c(0x184)]||_0x32647a[_0x2fd13c(0x1a1)][_0x2fd13c(0x184)],_0xec8101['appCode']);_0x51bb8b(_0x32647a[_0x2fd13c(0x182)][_0x2fd13c(0x188)],_0x12049a),_0x477e76={..._0x5db171,'files':_0x32647a[_0x2fd13c(0x182)][_0x2fd13c(0x188)]};}else{if(isPackageBackedManifest(_0x5db171[_0x2fd13c(0x188)])){const _0x4a26b9=await _0x5be923('personal',_0x5db171[_0x2fd13c(0x184)]||_0x32647a['payload'][_0x2fd13c(0x184)],_0xec8101['appCode']);_0x27162c(_0x5db171[_0x2fd13c(0x188)],_0x4a26b9);}}return _0x25e6d0(_0x4ec139,_0x477e76,_0xec8101[_0x2fd13c(0x192)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x5db171),'warnings':_0x32647a[_0x2fd13c(0x198)],'validation':{'warnings':_0x3d6482[_0x2fd13c(0x198)]}},'message':_0x32647a[_0x2fd13c(0x1b1)]?_0x2fd13c(0x1b5)+_0x32647a[_0x2fd13c(0x1a1)][_0x2fd13c(0x184)]:_0x2fd13c(0x19f)+_0x32647a[_0x2fd13c(0x1a1)][_0x2fd13c(0x184)]};}function scopeLabel(_0x53afb2){const _0x41adb5=a50_0x3fc8;return _0x53afb2===_0x41adb5(0x1a2)?'Company':_0x41adb5(0x1b0);}
|
|
1
|
+
function a51_0x27bd(_0x4121e0,_0x2f9a01){_0x4121e0=_0x4121e0-0x1d2;const _0x2e378a=a51_0x2e37();let _0x27bd79=_0x2e378a[_0x4121e0];return _0x27bd79;}(function(_0x388ca2,_0x22ccea){const _0x35b4e6=a51_0x27bd,_0x66a648=_0x388ca2();while(!![]){try{const _0x317f05=-parseInt(_0x35b4e6(0x1f0))/0x1+-parseInt(_0x35b4e6(0x1ee))/0x2*(parseInt(_0x35b4e6(0x1e2))/0x3)+-parseInt(_0x35b4e6(0x1fa))/0x4*(-parseInt(_0x35b4e6(0x1fe))/0x5)+parseInt(_0x35b4e6(0x1d2))/0x6*(-parseInt(_0x35b4e6(0x1de))/0x7)+parseInt(_0x35b4e6(0x206))/0x8*(-parseInt(_0x35b4e6(0x1d8))/0x9)+parseInt(_0x35b4e6(0x1d6))/0xa*(parseInt(_0x35b4e6(0x20a))/0xb)+parseInt(_0x35b4e6(0x1e1))/0xc;if(_0x317f05===_0x22ccea)break;else _0x66a648['push'](_0x66a648['shift']());}catch(_0x28f18a){_0x66a648['push'](_0x66a648['shift']());}}}(a51_0x2e37,0xc9ed2));import{CliErrors}from'../../errors.js';function a51_0x2e37(){const _0xa69d02=['confirmWarnings','publishInput','Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','version','scope','76904HjIqqj','resolvedSlug','/api/cli/v1/skills/','\x20has\x20scope=\x22','5203PLZibT','status','frontmatterDisplayName','6yzGPPb','validation','remoteForPreflight','POST','29350LCRBpr','Created\x20personal\x20Skill\x20','747NfJxUa','/publish/validate','accessKey','bool','dir','\x20version\x20','7430738AYQdMz','NAMESPACE_ONLY','company','22360788AoqmIV','537nxjUkg','PRIVATE','appCode','Updated\x20personal\x20Skill\x20','skillCode','submitted','input','files','identical','metadata','authRequired','payload','3998bxbclE','resolvedVersion','529697ENrMxs','str','personal','appcode','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','../../core/api-client.js','warnings','Submitted\x20company\x20Skill\x20','existing','savedSkill','4QRighb','\x20is\x20already\x20published\x20and\x20content\x20is\x20identical','errors','../../skills/runtime-skill-sync.js','1611835klktzs','valid','(unknown)'];a51_0x2e37=function(){return _0xa69d02;};return a51_0x2e37();}import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,runRemoteContentPreflight,throwIfBuiltinPushTarget,throwIfUnconfirmedPublishWarnings,throwIfPublishValidationFailed}from'./push-flow-helpers.js';import{withRetargetExistingMetadata}from'./push-retarget.js';import{summarizeRuntimeSkill}from'./summary.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x277848){const _0x4e3506=a51_0x27bd,{getRuntimeSkillByCode:_0x385ca6,validateRuntimeSkillPublish:_0x543fc1}=await import('../../core/api-client.js'),{readPushDirectory:_0x59e418,resolvePushDirectoryIdentity:_0x1c4321}=await import(_0x4e3506(0x1fd));if(!_0x277848[_0x4e3506(0x1da)])throw CliErrors[_0x4e3506(0x1ec)]();const _0x16a901=resolvePushScope(_0x277848),_0x581f4a=validateSkillDirectory(_0x277848[_0x4e3506(0x1f1)](_0x4e3506(0x1dc)));throwIfSkillValidationFailed(_0x581f4a);const _0x31094e=_0x1c4321(_0x581f4a[_0x4e3506(0x1dc)],_0x277848[_0x4e3506(0x1e4)],remoteFirstMetadataOptions()),_0x5067a2=await _0x385ca6(_0x277848[_0x4e3506(0x1e4)],_0x31094e[_0x4e3506(0x1e6)]);throwIfBuiltinPushTarget(_0x5067a2);if(_0x16a901==='company'){const _0x2ea21e=_0x59e418(_0x581f4a[_0x4e3506(0x1dc)],_0x277848[_0x4e3506(0x1e4)],remoteMissingCompanyReadOptions()),_0x59eee5=await _0x543fc1(_0x277848[_0x4e3506(0x1e4)],_0x2ea21e[_0x4e3506(0x1e8)],{'visibility':_0x4e3506(0x1df)});return{'method':'POST','url':_0x4e3506(0x208)+_0x277848[_0x4e3506(0x1e4)]+_0x4e3506(0x1d9),'body':{'skillCode':_0x2ea21e[_0x4e3506(0x1e6)],'visibility':_0x4e3506(0x1df),'valid':_0x59eee5['valid'],'errors':_0x59eee5['errors'],'warnings':_0x59eee5[_0x4e3506(0x1f6)],'resolvedSlug':_0x59eee5[_0x4e3506(0x207)],'resolvedVersion':_0x59eee5['resolvedVersion']},'description':_0x4e3506(0x1f4)};}if(_0x5067a2&&_0x5067a2[_0x4e3506(0x205)]!==_0x4e3506(0x1f2))throw CliErrors[_0x4e3506(0x1d3)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20'+_0x31094e[_0x4e3506(0x1e6)]+_0x4e3506(0x209)+(_0x5067a2[_0x4e3506(0x205)]??'unknown')+'\x22.');const _0x4cba13=_0x59e418(_0x581f4a[_0x4e3506(0x1dc)],_0x277848['appCode'],_0x5067a2?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions()),_0x4d1872=await _0x543fc1(_0x277848[_0x4e3506(0x1e4)],_0x4cba13['input'],{'visibility':'PRIVATE'});return{'method':_0x4e3506(0x1d5),'url':_0x4e3506(0x208)+_0x277848['appCode']+_0x4e3506(0x1d9),'body':{'skillCode':_0x4cba13[_0x4e3506(0x1e6)],'visibility':_0x4e3506(0x1e3),'valid':_0x4d1872[_0x4e3506(0x1ff)],'errors':_0x4d1872[_0x4e3506(0x1fc)],'warnings':_0x4d1872[_0x4e3506(0x1f6)],'resolvedSlug':_0x4d1872[_0x4e3506(0x207)],'resolvedVersion':_0x4d1872[_0x4e3506(0x1ef)]},'description':_0x4e3506(0x203)};}export async function skillPushExecute(_0x55aa98){const _0xd329f8=a51_0x27bd,{createPersonalRuntimeSkill:_0x1b9e68,downloadRuntimeSkillPackage:_0x4bb51f,getRuntimeSkillByCode:_0x8f9b26,publishCompanyRuntimeSkill:_0x30a949,updatePersonalRuntimeSkill:_0x35375c,validateRuntimeSkillPublish:_0x434009}=await import(_0xd329f8(0x1f5)),{verifyRuntimeSkillPackage:_0x48b91b,verifyRuntimeSkillBundle:_0x118216,readPushDirectory:_0x1ff4f4,refreshPushDirectoryMetadataFromRemote:_0x52ab5f,recordPushedRuntimeSkill:_0x1abf69,resolvePushDirectoryIdentity:_0x321127}=await import('../../skills/runtime-skill-sync.js');if(!_0x55aa98[_0xd329f8(0x1da)])throw CliErrors['authRequired']();const _0x588821=resolvePushScope(_0x55aa98),_0xb5e24c=_0x55aa98[_0xd329f8(0x1db)]('confirm-warnings')||_0x55aa98[_0xd329f8(0x1db)](_0xd329f8(0x201)),_0x8ff5a3=validateSkillDirectory(_0x55aa98[_0xd329f8(0x1f1)](_0xd329f8(0x1dc)));throwIfSkillValidationFailed(_0x8ff5a3);const _0x73afb0=_0x8ff5a3[_0xd329f8(0x1dc)];let _0x503426;if(_0x588821==='company'){const _0x5dc40c=_0x321127(_0x73afb0,_0x55aa98[_0xd329f8(0x1e4)],remoteFirstMetadataOptions()),_0x2e9d87=await _0x8f9b26(_0x55aa98[_0xd329f8(0x1e4)],_0x5dc40c[_0xd329f8(0x1e6)]);throwIfBuiltinPushTarget(_0x2e9d87);if(_0x2e9d87)_0x52ab5f(_0x73afb0,_0x2e9d87,_0x55aa98[_0xd329f8(0x1e4)]);const _0x513245=_0x1ff4f4(_0x73afb0,_0x55aa98[_0xd329f8(0x1e4)],_0x2e9d87?{'targetScope':'company','ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions());_0x503426={'scope':_0xd329f8(0x1e0),'payload':_0x513245,'publishInput':_0x513245[_0xd329f8(0x1e8)],'remoteForPreflight':_0x2e9d87,'warnings':[]};}else{const _0x5e9b7d=_0x55aa98['str'](_0xd329f8(0x1f3))['trim'](),_0xee3135=Boolean(_0x5e9b7d),_0x539ebc=allowRetargetArgs(_0xee3135),_0x34e170=_0x321127(_0x73afb0,_0x55aa98[_0xd329f8(0x1e4)],{...remoteFirstMetadataOptions(),..._0x539ebc[0x0]}),_0x4155eb=await _0x8f9b26(_0x55aa98['appCode'],_0x34e170[_0xd329f8(0x1e6)]);throwIfBuiltinPushTarget(_0x4155eb);if(_0x4155eb){if(_0x4155eb['scope']!==_0xd329f8(0x1f2)){if(_0xee3135)throw CliErrors[_0xd329f8(0x1d3)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20'+_0x34e170[_0xd329f8(0x1e6)]+_0xd329f8(0x209)+(_0x4155eb[_0xd329f8(0x205)]??'unknown')+'\x22.');_0x52ab5f(_0x73afb0,_0x4155eb,_0x55aa98['appCode']);}else!_0xee3135&&_0x52ab5f(_0x73afb0,_0x4155eb,_0x55aa98[_0xd329f8(0x1e4)]);}const _0x1a4a3c=_0x1ff4f4(_0x73afb0,_0x55aa98['appCode'],_0x4155eb?remotePersonalReadOptions(_0xee3135,_0x539ebc[0x0]):remoteMissingPersonalReadOptions(_0x539ebc[0x0])),_0x51d47a=_0x4155eb?.['scope']===_0xd329f8(0x1f2)&&_0x4155eb[_0xd329f8(0x1e6)]===_0x1a4a3c['skillCode']?_0x4155eb:undefined,_0x38c7e1=_0xee3135&&_0x51d47a?withRetargetExistingMetadata(_0x1a4a3c[_0xd329f8(0x1e8)],_0x51d47a,{'preferInputSkillName':Boolean(_0x1a4a3c[_0xd329f8(0x20c)])}):_0x1a4a3c[_0xd329f8(0x1e8)],_0x36b989=_0xee3135?buildRetargetWarning(_0x34e170[_0xd329f8(0x1eb)],_0x55aa98[_0xd329f8(0x1e4)]):[];_0x503426={'scope':_0xd329f8(0x1f2),'payload':_0x1a4a3c,'publishInput':_0x38c7e1,'remoteForPreflight':_0x51d47a,'existing':_0x51d47a,'warnings':[..._0x8ff5a3[_0xd329f8(0x1f6)],..._0x36b989]};}const _0x3ff43d=await runRemoteContentPreflight({'scope':_0x503426['scope'],'remote':_0x503426[_0xd329f8(0x1d4)],'publishInput':_0x503426[_0xd329f8(0x202)],'skillCode':_0x503426[_0xd329f8(0x1ed)][_0xd329f8(0x1e6)],'appCode':_0x55aa98[_0xd329f8(0x1e4)],'downloadRuntimeSkillPackage':_0x4bb51f,'verifyRuntimeSkillBundle':_0x118216});if(_0x3ff43d[_0xd329f8(0x20b)]===_0xd329f8(0x1ea))return _0x503426[_0xd329f8(0x205)]===_0xd329f8(0x1e0)?_0x1abf69(_0x73afb0,_0x3ff43d[_0xd329f8(0x1f9)],_0x55aa98['appCode'],{'scope':_0xd329f8(0x1e0)}):_0x1abf69(_0x73afb0,_0x3ff43d[_0xd329f8(0x1f9)],_0x55aa98[_0xd329f8(0x1e4)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x3ff43d[_0xd329f8(0x1f9)]),'scope':_0x503426['scope'],..._0x503426[_0xd329f8(0x205)]===_0xd329f8(0x1f2)?{'warnings':_0x503426['warnings']}:{},'alreadyPublished':!![],'contentIdentical':!![]},'message':scopeLabel(_0x503426[_0xd329f8(0x205)])+'\x20Skill\x20'+_0x503426[_0xd329f8(0x1ed)]['skillCode']+_0xd329f8(0x1fb)};if(_0x503426[_0xd329f8(0x205)]===_0xd329f8(0x1e0)){const _0x5323bb=await _0x434009(_0x55aa98[_0xd329f8(0x1e4)],_0x503426[_0xd329f8(0x202)],{'visibility':_0xd329f8(0x1df)});throwIfPublishValidationFailed(_0xd329f8(0x1e0),_0x503426[_0xd329f8(0x1ed)]['skillCode'],_0x5323bb),throwIfUnconfirmedPublishWarnings(_0xd329f8(0x1e0),_0x503426['payload'][_0xd329f8(0x1e6)],_0x5323bb[_0xd329f8(0x1f6)],_0xb5e24c);const _0x69693=await _0x30a949(_0x55aa98['appCode'],_0x503426[_0xd329f8(0x202)],{'confirmWarnings':_0xb5e24c});return _0x1abf69(_0x73afb0,{..._0x69693,'files':_0x503426['publishInput'][_0xd329f8(0x1e9)]},_0x55aa98[_0xd329f8(0x1e4)],{'scope':_0xd329f8(0x1e0)}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x69693),'scope':_0xd329f8(0x1e0),'reviewState':_0xd329f8(0x1e7),'submittedForReview':!![],'validation':{'warnings':_0x5323bb[_0xd329f8(0x1f6)]}},'message':_0xd329f8(0x1f7)+_0x503426[_0xd329f8(0x1ed)][_0xd329f8(0x1e6)]+_0xd329f8(0x1dd)+(_0x69693[_0xd329f8(0x204)]??_0xd329f8(0x200))+'\x20for\x20review'};}const _0x4129c5=await _0x434009(_0x55aa98[_0xd329f8(0x1e4)],_0x503426['publishInput'],{'visibility':_0xd329f8(0x1e3)});throwIfPublishValidationFailed(_0xd329f8(0x1f2),_0x503426['payload'][_0xd329f8(0x1e6)],_0x4129c5),throwIfUnconfirmedPublishWarnings(_0xd329f8(0x1f2),_0x503426['payload'][_0xd329f8(0x1e6)],_0x4129c5['warnings'],_0xb5e24c);const _0x53fa92={'confirmWarnings':_0xb5e24c},_0x2a0bdd=_0x503426[_0xd329f8(0x1f8)]?await _0x35375c(_0x503426['payload'][_0xd329f8(0x1e6)],_0x55aa98[_0xd329f8(0x1e4)],_0x503426[_0xd329f8(0x202)],_0x53fa92):await _0x1b9e68(_0x55aa98[_0xd329f8(0x1e4)],_0x503426[_0xd329f8(0x202)],_0x53fa92);let _0x3c447b=_0x2a0bdd;if(isMultiFileManifest(_0x503426[_0xd329f8(0x202)][_0xd329f8(0x1e9)])){const _0x55e1f7=await _0x4bb51f(_0xd329f8(0x1f2),_0x2a0bdd[_0xd329f8(0x1e6)]||_0x503426[_0xd329f8(0x1ed)][_0xd329f8(0x1e6)],_0x55aa98['appCode']);_0x118216(_0x503426[_0xd329f8(0x202)]['files'],_0x55e1f7),_0x3c447b={..._0x2a0bdd,'files':_0x503426[_0xd329f8(0x202)][_0xd329f8(0x1e9)]};}else{if(isPackageBackedManifest(_0x2a0bdd[_0xd329f8(0x1e9)])){const _0x5444df=await _0x4bb51f('personal',_0x2a0bdd[_0xd329f8(0x1e6)]||_0x503426[_0xd329f8(0x1ed)][_0xd329f8(0x1e6)],_0x55aa98[_0xd329f8(0x1e4)]);_0x48b91b(_0x2a0bdd[_0xd329f8(0x1e9)],_0x5444df);}}return _0x1abf69(_0x73afb0,_0x3c447b,_0x55aa98['appCode']),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x2a0bdd),'warnings':_0x503426[_0xd329f8(0x1f6)],'validation':{'warnings':_0x4129c5[_0xd329f8(0x1f6)]}},'message':_0x503426[_0xd329f8(0x1f8)]?_0xd329f8(0x1e5)+_0x503426[_0xd329f8(0x1ed)][_0xd329f8(0x1e6)]:_0xd329f8(0x1d7)+_0x503426[_0xd329f8(0x1ed)][_0xd329f8(0x1e6)]};}function scopeLabel(_0x57d3e4){return _0x57d3e4==='company'?'Company':'Personal';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5dfa7a,_0x5e519c){const _0xe7d8f2=a52_0x22e2,_0x34a288=_0x5dfa7a();while(!![]){try{const _0x5d5050=-parseInt(_0xe7d8f2(0xb9))/0x1+parseInt(_0xe7d8f2(0xae))/0x2*(parseInt(_0xe7d8f2(0xb0))/0x3)+-parseInt(_0xe7d8f2(0x8b))/0x4*(parseInt(_0xe7d8f2(0x9d))/0x5)+-parseInt(_0xe7d8f2(0x90))/0x6*(-parseInt(_0xe7d8f2(0x98))/0x7)+-parseInt(_0xe7d8f2(0xa0))/0x8+parseInt(_0xe7d8f2(0xa6))/0x9*(-parseInt(_0xe7d8f2(0x92))/0xa)+parseInt(_0xe7d8f2(0x97))/0xb;if(_0x5d5050===_0x5e519c)break;else _0x34a288['push'](_0x34a288['shift']());}catch(_0x3dfbc7){_0x34a288['push'](_0x34a288['shift']());}}}(a52_0x18af,0x8d912));import{CliErrors}from'../../errors.js';export function resolvePushScope(_0x2a912b){const _0x1459bd=a52_0x22e2,_0x5c9e33=_0x2a912b[_0x1459bd(0x94)](_0x1459bd(0xad))||_0x1459bd(0x8c);if(_0x5c9e33===_0x1459bd(0x8c)||_0x5c9e33==='company')return _0x5c9e33;throw CliErrors['validation'](_0x1459bd(0xb7)+_0x5c9e33+'\x22.');}export function allowRetargetArgs(_0x234957){return _0x234957?[{'allowAppCodeRetarget':!![]}]:[];}export function remoteFirstMetadataOptions(){return{'ignoreInvalidMetadata':!![],'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingPayloadOptions(){return{'ignoreMetadataForPayload':!![],'ignoreMetadataScope':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingCompanyReadOptions(){const _0x2c1420=a52_0x22e2;return{'targetScope':_0x2c1420(0x8d),...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions()};}function a52_0x18af(){const _0x35d26a=['Personal','str','Review\x20each\x20warning\x20before\x20continuing.','publishInput','30486456AfNDTX','135541UlgYzt','Do\x20not\x20modify\x20the\x20source\x20Skill\x20merely\x20to\x20satisfy\x20publishing.','appCode','remote','errors','677315FnXORD','(unknown)','SkillHub\x20validation\x20returned\x20invalid.','6699040LzMXsj','\x20after\x20successful\x20push.','Warnings:\x20','Local\x20Skill\x20metadata\x20appCode\x20','join','\x20Skill\x20push\x20validation\x20failed\x20for\x20','7966449elwbNF','different','Use\x20a\x20different\x20skillCode\x20when\x20submitting\x20a\x20personal\x20or\x20company\x20Skill.','content','validation','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','skillCode','scope','262jYqnhq','verifyRuntimeSkillBundle','6453iZRBIb','valid','warning','Company','length','Builtin\x20Skill\x20','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','skill\x20push\x20supports\x20--scope\x20personal\x20or\x20--scope\x20company;\x20received\x20\x22','Fix\x20real\x20issues.\x20If\x20the\x20remaining\x20warnings\x20are\x20reviewed\x20false\x20positives,\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit\x20the\x20unchanged\x20package.','944586zLuAhy','skill-metadata-appcode-retargeted','files','4POXiZm','personal','company','not-applicable','version','102UncdwD','identical','10hmZxWI'];a52_0x18af=function(){return _0x35d26a;};return a52_0x18af();}export function remoteMissingPersonalReadOptions(_0x28fe46={}){return{...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions(),..._0x28fe46};}export function remotePersonalReadOptions(_0x4dff22,_0x3af401={}){return{'ignoreInvalidMetadata':!![],..._0x4dff22?{'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataScope':!![]}:{},..._0x3af401};}function a52_0x22e2(_0x320536,_0x3491f4){_0x320536=_0x320536-0x8a;const _0x18aff1=a52_0x18af();let _0x22e21c=_0x18aff1[_0x320536];return _0x22e21c;}export function throwIfBuiltinPushTarget(_0x21907d){const _0x2c23af=a52_0x22e2;if(_0x21907d?.['scope']!=='builtin')return;throw CliErrors[_0x2c23af(0xaa)](_0x2c23af(0xb5)+(_0x21907d['skillCode']??_0x2c23af(0x9e))+'\x20cannot\x20be\x20pushed.',_0x2c23af(0xa8));}export function throwIfPublishValidationFailed(_0x1b9e9a,_0x46a8cf,_0x3d8665){const _0x1fea5d=a52_0x22e2;if(_0x3d8665[_0x1fea5d(0x9c)][_0x1fea5d(0xb4)]===0x0&&(_0x3d8665[_0x1fea5d(0xb1)]||_0x3d8665['warnings'][_0x1fea5d(0xb4)]>0x0))return;const _0x24e511=_0x3d8665['errors'][_0x1fea5d(0xb4)]>0x0?_0x3d8665[_0x1fea5d(0x9c)]['join'](';\x20'):_0x1fea5d(0x9f),_0x104199=_0x1b9e9a==='company'?_0x1fea5d(0xb3):'Personal';throw CliErrors[_0x1fea5d(0xaa)](_0x104199+_0x1fea5d(0xa5)+_0x46a8cf+'.',_0x24e511);}export function throwIfUnconfirmedPublishWarnings(_0x418af5,_0x12e377,_0x3f5f9a,_0x539da8){const _0x16f6da=a52_0x22e2;if(_0x3f5f9a['length']===0x0||_0x539da8)return;const _0x8370bf=_0x418af5===_0x16f6da(0x8d)?_0x16f6da(0xb3):_0x16f6da(0x93);throw CliErrors['validation'](_0x8370bf+'\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20'+_0x12e377+'.',[_0x16f6da(0x95),_0x16f6da(0x99),_0x16f6da(0xb8),_0x16f6da(0xa2)+_0x3f5f9a[_0x16f6da(0xa4)](';\x20')][_0x16f6da(0xa4)]('\x20'));}export function buildRetargetWarning(_0x179b19,_0x4eec29){const _0x5be244=a52_0x22e2;if(!_0x179b19?.[_0x5be244(0x9a)]||_0x179b19[_0x5be244(0x9a)]===_0x4eec29)return[];return[{'level':_0x5be244(0xb2),'ruleId':_0x5be244(0xba),'file':'lovrabet.skill.json','message':_0x5be244(0xa3)+_0x179b19[_0x5be244(0x9a)]+_0x5be244(0xb6)+_0x4eec29+_0x5be244(0xa1),'suggestion':_0x5be244(0xab)}];}export async function runRemoteContentPreflight(_0x2b7b7f){const _0x5820c0=a52_0x22e2;if(!_0x2b7b7f[_0x5820c0(0x9b)]||_0x2b7b7f[_0x5820c0(0x9b)][_0x5820c0(0xad)]!==_0x2b7b7f[_0x5820c0(0xad)]||!_0x2b7b7f[_0x5820c0(0x96)][_0x5820c0(0x8a)])return{'status':_0x5820c0(0x8e)};const _0x5e27a8=_0x2b7b7f[_0x5820c0(0x9b)][_0x5820c0(0xac)]||_0x2b7b7f[_0x5820c0(0xac)];if(!_0x5e27a8)return{'status':_0x5820c0(0x8e)};const _0x5af216=await _0x2b7b7f['downloadRuntimeSkillPackage'](_0x2b7b7f[_0x5820c0(0xad)],_0x5e27a8,_0x2b7b7f[_0x5820c0(0x9a)],_0x2b7b7f['remote'][_0x5820c0(0x8f)]);try{_0x2b7b7f[_0x5820c0(0xaf)](_0x2b7b7f['publishInput'][_0x5820c0(0x8a)],_0x5af216);}catch{return{'status':_0x5820c0(0xa7)};}return{'status':_0x5820c0(0x91),'savedSkill':{..._0x2b7b7f[_0x5820c0(0x9b)],'content':_0x2b7b7f[_0x5820c0(0x96)][_0x5820c0(0xa9)],'files':_0x2b7b7f['publishInput'][_0x5820c0(0x8a)]}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a53_0x1eb0(){const _0x514eef=['\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','5722530VdMcDq','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','3114924diDXYO','7508072zZcpHz','\x20after\x20successful\x20push.','sourceSessionId','description','skill-metadata-appcode-retargeted','tags','lovrabet.skill.json','warning','5eKNhIV','version','1029806IikeYy','appCode','957081XgNjZg','2835990RqScNU','7227955sCGVWK','skillName','3vrlLnD'];a53_0x1eb0=function(){return _0x514eef;};return a53_0x1eb0();}(function(_0x27849d,_0x490fe6){const _0x21c264=a53_0x2410,_0x2a58ab=_0x27849d();while(!![]){try{const _0x13b8f4=parseInt(_0x21c264(0x67))/0x1+-parseInt(_0x21c264(0x7a))/0x2*(parseInt(_0x21c264(0x6b))/0x3)+parseInt(_0x21c264(0x6f))/0x4*(parseInt(_0x21c264(0x78))/0x5)+parseInt(_0x21c264(0x6d))/0x6+-parseInt(_0x21c264(0x69))/0x7+-parseInt(_0x21c264(0x70))/0x8+parseInt(_0x21c264(0x68))/0x9;if(_0x13b8f4===_0x490fe6)break;else _0x2a58ab['push'](_0x2a58ab['shift']());}catch(_0x261eb4){_0x2a58ab['push'](_0x2a58ab['shift']());}}}(a53_0x1eb0,0x7ea2c));function a53_0x2410(_0x5e9da6,_0xbab533){_0x5e9da6=_0x5e9da6-0x66;const _0x1eb0cd=a53_0x1eb0();let _0x24105d=_0x1eb0cd[_0x5e9da6];return _0x24105d;}export function withRetargetExistingMetadata(_0x200fd2,_0x125471,_0xc6f381={}){const _0x2a72a4=a53_0x2410,_0xa3c63d=_0xc6f381['preferInputSkillName']?_0x200fd2[_0x2a72a4(0x6a)]??_0x125471[_0x2a72a4(0x6a)]:_0x125471['skillName']??_0x200fd2[_0x2a72a4(0x6a)];return{..._0x200fd2,'skillName':_0xa3c63d,'description':_0x125471[_0x2a72a4(0x73)]??_0x200fd2[_0x2a72a4(0x73)],'tags':Array['isArray'](_0x125471[_0x2a72a4(0x75)])?_0x125471[_0x2a72a4(0x75)]:_0x200fd2[_0x2a72a4(0x75)],'version':_0x125471[_0x2a72a4(0x79)]??_0x200fd2[_0x2a72a4(0x79)],'sourceSessionId':_0x125471[_0x2a72a4(0x72)]??_0x200fd2[_0x2a72a4(0x72)]};}export function buildRetargetWarning(_0x26cdd8,_0x579618){const _0x4d7d45=a53_0x2410;if(!_0x26cdd8?.[_0x4d7d45(0x66)]||_0x26cdd8['appCode']===_0x579618)return[];return[{'level':_0x4d7d45(0x77),'ruleId':_0x4d7d45(0x74),'file':_0x4d7d45(0x76),'message':'Local\x20Skill\x20metadata\x20appCode\x20'+_0x26cdd8[_0x4d7d45(0x66)]+_0x4d7d45(0x6c)+_0x579618+_0x4d7d45(0x71),'suggestion':_0x4d7d45(0x6e)}];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x493374,_0x4ae49b){const _0x184a74=a54_0x51a1,_0xc91add=_0x493374();while(!![]){try{const _0x4e20b4=parseInt(_0x184a74(0x1c2))/0x1+parseInt(_0x184a74(0x1c3))/0x2*(-parseInt(_0x184a74(0x1bf))/0x3)+-parseInt(_0x184a74(0x1c9))/0x4+-parseInt(_0x184a74(0x1bc))/0x5+-parseInt(_0x184a74(0x1bb))/0x6+parseInt(_0x184a74(0x1c6))/0x7*(-parseInt(_0x184a74(0x1b9))/0x8)+-parseInt(_0x184a74(0x1c0))/0x9*(-parseInt(_0x184a74(0x1be))/0xa);if(_0x4e20b4===_0x4ae49b)break;else _0xc91add['push'](_0xc91add['shift']());}catch(_0x340ab7){_0xc91add['push'](_0xc91add['shift']());}}}(a54_0x4458,0x52a89));import{CliErrors}from'../../errors.js';export function normalizeSyncScopes(_0x29817c){const _0x53fedd=a54_0x51a1,_0x28e73a=_0x29817c[_0x53fedd(0x1c4)]();if(!_0x28e73a||_0x28e73a==='all')return['personal','company'];if(_0x28e73a===_0x53fedd(0x1c8)||_0x28e73a===_0x53fedd(0x1bd))return[_0x28e73a];throw CliErrors['validation'](_0x53fedd(0x1c5)+_0x29817c);}export function normalizeListScope(_0x362d5c){const _0x1cb737=a54_0x51a1,_0x575402=_0x362d5c['trim']();if(!_0x575402)return _0x1cb737(0x1c1);if(_0x575402===_0x1cb737(0x1c8)||_0x575402==='company'||_0x575402===_0x1cb737(0x1c1))return _0x575402;throw CliErrors[_0x1cb737(0x1ba)](_0x1cb737(0x1c7)+_0x362d5c);}function a54_0x4458(){const _0x369828=['personal','1254856daCqdF','727808lDhNuV','validation','3024888OTjZhq','89980refbKN','company','14597470bbKmIA','3BgsTzx','9ZkwhkC','all','387213fwcUTG','617258ffVPbf','trim','Unsupported\x20Skill\x20sync\x20scope:\x20','28cKWJRh','Unsupported\x20Skill\x20list\x20scope:\x20'];a54_0x4458=function(){return _0x369828;};return a54_0x4458();}function a54_0x51a1(_0x2c3385,_0x178483){_0x2c3385=_0x2c3385-0x1b9;const _0x445899=a54_0x4458();let _0x51a127=_0x445899[_0x2c3385];return _0x51a127;}export function shouldListScope(_0x2802a1,_0x38d9b5){if(_0x2802a1==='all')return!![];return _0x2802a1===_0x38d9b5;}export function listScopeToRuntimeScopes(_0x158bd5){const _0x933f04=a54_0x51a1;if(_0x158bd5===_0x933f04(0x1c1))return[_0x933f04(0x1c8),'company'];return[_0x158bd5===_0x933f04(0x1bd)?_0x933f04(0x1bd):_0x158bd5];}export function listScopeToRemoteScope(_0x1849dd){return _0x1849dd;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x24c405,_0x4eb72c){var _0x5ceb10=a55_0x4061,_0x596123=_0x24c405();while(!![]){try{var _0x3189a6=parseInt(_0x5ceb10(0x1ba))/0x1+-parseInt(_0x5ceb10(0x1c5))/0x2+parseInt(_0x5ceb10(0x1c6))/0x3*(-parseInt(_0x5ceb10(0x1b9))/0x4)+-parseInt(_0x5ceb10(0x1c3))/0x5+parseInt(_0x5ceb10(0x1c2))/0x6+parseInt(_0x5ceb10(0x1bf))/0x7*(parseInt(_0x5ceb10(0x1bb))/0x8)+parseInt(_0x5ceb10(0x1b3))/0x9*(parseInt(_0x5ceb10(0x1b5))/0xa);if(_0x3189a6===_0x4eb72c)break;else _0x596123['push'](_0x596123['shift']());}catch(_0x2d3572){_0x596123['push'](_0x596123['shift']());}}}(a55_0x582b,0x25980));function a55_0x4061(_0x358a31,_0x51ab74){_0x358a31=_0x358a31-0x1b2;var _0x582bab=a55_0x582b();var _0x4061bf=_0x582bab[_0x358a31];return _0x4061bf;}export function summarizeRuntimeSkill(_0x39e71f){var _0x31f18d=a55_0x4061;return{'id':_0x39e71f['id'],'skillCode':_0x39e71f['skillCode'],'skillName':_0x39e71f[_0x31f18d(0x1b8)],'scope':_0x39e71f[_0x31f18d(0x1bd)],'version':_0x39e71f[_0x31f18d(0x1be)],'readonly':_0x39e71f[_0x31f18d(0x1c0)]};}export function summarizeLocalRuntimeSkill(_0xcaf301){var _0x2b7d5e=a55_0x4061;return{'id':_0xcaf301['id'],'skillCode':_0xcaf301['skillCode'],'skillName':_0xcaf301['skillName'],'scope':_0xcaf301[_0x2b7d5e(0x1bd)],'appCode':_0xcaf301[_0x2b7d5e(0x1b4)],'version':_0xcaf301[_0x2b7d5e(0x1be)],'status':_0xcaf301['status'],'readonly':_0xcaf301['readonly'],'tags':_0xcaf301['tags'],'dir':_0xcaf301[_0x2b7d5e(0x1c4)],'cacheDir':_0xcaf301[_0x2b7d5e(0x1c7)],'skillMdPath':_0xcaf301['skillMdPath'],'metadataPath':_0xcaf301[_0x2b7d5e(0x1b2)],'linkedPaths':_0xcaf301[_0x2b7d5e(0x1b6)],'contentHash':_0xcaf301[_0x2b7d5e(0x1b7)],'treeHash':_0xcaf301[_0x2b7d5e(0x1c1)],'pulledAt':_0xcaf301[_0x2b7d5e(0x1bc)]};}function a55_0x582b(){var _0x460ad7=['7ihvZdy','readonly','treeHash','550080uysJwl','680295FSNgeL','dir','533858GXqosj','3TDLeXq','cacheDir','metadataPath','9xkUZnh','appCode','1773140MdpCmd','linkedPaths','contentHash','skillName','199244rEFehG','267092ZnSeMZ','565576vnvgcV','pulledAt','scope','version'];a55_0x582b=function(){return _0x460ad7;};return a55_0x582b();}
|