@lovrabet/lovrabet-cli 2.2.3 → 2.2.4-beta.2
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/notification/config-list.d.ts +2 -0
- package/lib/commands/notification/config-list.js +1 -0
- package/lib/commands/notification/index.d.ts +2 -0
- package/lib/commands/notification/index.js +1 -0
- package/lib/commands/notification/shared.d.ts +13 -0
- package/lib/commands/notification/shared.js +1 -0
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.d.ts +2 -0
- package/lib/commands/permit/dataset-get.js +1 -0
- package/lib/commands/permit/dataset-set.d.ts +2 -0
- package/lib/commands/permit/dataset-set.js +1 -0
- package/lib/commands/permit/index.d.ts +2 -0
- package/lib/commands/permit/index.js +1 -0
- package/lib/commands/permit/page-get.d.ts +2 -0
- package/lib/commands/permit/page-get.js +1 -0
- package/lib/commands/permit/page-set.d.ts +2 -0
- package/lib/commands/permit/page-set.js +1 -0
- package/lib/commands/permit/role-menus-set.d.ts +2 -0
- package/lib/commands/permit/role-menus-set.js +1 -0
- package/lib/commands/permit/role-menus.d.ts +2 -0
- package/lib/commands/permit/role-menus.js +1 -0
- package/lib/commands/permit/shared.d.ts +52 -0
- package/lib/commands/permit/shared.js +1 -0
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.d.ts +2 -0
- package/lib/commands/role/create.js +1 -0
- package/lib/commands/role/delete.d.ts +2 -0
- package/lib/commands/role/delete.js +1 -0
- package/lib/commands/role/detail.d.ts +2 -0
- package/lib/commands/role/detail.js +1 -0
- package/lib/commands/role/index.d.ts +2 -0
- package/lib/commands/role/index.js +1 -0
- package/lib/commands/role/list.d.ts +2 -0
- package/lib/commands/role/list.js +1 -0
- package/lib/commands/role/shared.d.ts +33 -0
- package/lib/commands/role/shared.js +1 -0
- package/lib/commands/role/update.d.ts +2 -0
- package/lib/commands/role/update.js +1 -0
- package/lib/commands/role/user-add.d.ts +2 -0
- package/lib/commands/role/user-add.js +1 -0
- package/lib/commands/role/user-remove.d.ts +2 -0
- package/lib/commands/role/user-remove.js +1 -0
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.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/diagram.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/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.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.d.ts +161 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/types.d.ts +1 -0
- 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/skills/skill-presence.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
- package/skills/lovrabet/SKILL.md +20 -7
- package/skills/lovrabet/guides/role-and-permission-workflow.md +139 -0
- package/skills/lovrabet/references/lovrabet-auth.md +1 -5
- package/skills/lovrabet/references/lovrabet-notification-config-list.md +81 -0
- package/skills/lovrabet/references/lovrabet-skill-authoring.md +5 -4
- package/skills/lovrabet.manifest.json +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a89_0x3c57(_0x2f2a04,_0x37d6a9){_0x2f2a04=_0x2f2a04-0x113;const _0x36f392=a89_0x36f3();let _0x3c5742=_0x36f392[_0x2f2a04];return _0x3c5742;}function a89_0x36f3(){const _0x34c49d=['4483736WtaWMF','1734042evzuTb','468594BKlzDD','813218rEWfrv','1597790zNYcmz','48Rjfwln','818IhpEDn','170301wdYdqm','ClientAk','42MbAqbv','client-ak'];a89_0x36f3=function(){return _0x34c49d;};return a89_0x36f3();}const a89_0x27bf22=a89_0x3c57;(function(_0x6d57f7,_0x5c8ef3){const _0x4df8fb=a89_0x3c57,_0x55874a=_0x6d57f7();while(!![]){try{const _0x3b4617=-parseInt(_0x4df8fb(0x11d))/0x1*(-parseInt(_0x4df8fb(0x11a))/0x2)+parseInt(_0x4df8fb(0x11b))/0x3*(-parseInt(_0x4df8fb(0x119))/0x4)+parseInt(_0x4df8fb(0x118))/0x5+parseInt(_0x4df8fb(0x115))/0x6+-parseInt(_0x4df8fb(0x117))/0x7+parseInt(_0x4df8fb(0x114))/0x8+parseInt(_0x4df8fb(0x116))/0x9;if(_0x3b4617===_0x5c8ef3)break;else _0x55874a['push'](_0x55874a['shift']());}catch(_0x2374dd){_0x55874a['push'](_0x55874a['shift']());}}}(a89_0x36f3,0x6ba42));export const AUTH_MODE={'ClientAk':a89_0x27bf22(0x113)};export function isAuthMode(_0x58b4ef){const _0xb21a0e=a89_0x27bf22;return _0x58b4ef===AUTH_MODE[_0xb21a0e(0x11c)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a90_0x127162=a90_0x2462;(function(_0x25a8d0,_0x446dcf){const _0xc24519=a90_0x2462,_0x49c021=_0x25a8d0();while(!![]){try{const _0x43d092=parseInt(_0xc24519(0x110))/0x1+-parseInt(_0xc24519(0x104))/0x2+parseInt(_0xc24519(0x119))/0x3*(parseInt(_0xc24519(0xfc))/0x4)+-parseInt(_0xc24519(0x108))/0x5+-parseInt(_0xc24519(0xf0))/0x6*(parseInt(_0xc24519(0x10a))/0x7)+-parseInt(_0xc24519(0x109))/0x8*(parseInt(_0xc24519(0x114))/0x9)+parseInt(_0xc24519(0xfd))/0xa;if(_0x43d092===_0x446dcf)break;else _0x49c021['push'](_0x49c021['shift']());}catch(_0x2f1182){_0x49c021['push'](_0x49c021['shift']());}}}(a90_0x232e,0x66f80));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';function a90_0x232e(){const _0x1cac7b=['142935cTXALF','meowKey','name','params','6JqmvXq','global','string','env','dryRun','Alias\x20for\x20--non-interactive','non-interactive','yes','<code>','nonInteractive','dry-run','<name>','36GencYR','8470710DEkJJG','help','Environment','Record\x20ID','Select\x20app\x20profile\x20by\x20name','Name\x20filter','Verbose\x20output','724326jSrGHT','format','app','cliBinName','33815QtDAhk','8AMybMw','3468899SyVfxl','clear','verbose','boolean','Clear\x20output','appcode','605148UACQna','<expr>','JSON\x20params\x20for\x20execute\x20commands','type','5353029aJBAlb','Output\x20format','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','SQL\x20query\x20code','map'];a90_0x232e=function(){return _0x1cac7b;};return a90_0x232e();}function a90_0x2462(_0x552547,_0x232f2a){_0x552547=_0x552547-0xf0;const _0x232e16=a90_0x232e();let _0x246225=_0x232e16[_0x552547];return _0x246225;}export const CLI_BIN_NAME=PRODUCT_CONFIG[a90_0x127162(0x107)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG['cliDisplayName'];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a90_0x127162(0x10f),'meowKey':'appcode','type':'string','description':'Override\x20appcode','hint':a90_0x127162(0xf8)},{'name':'app','meowKey':a90_0x127162(0x106),'type':'string','description':a90_0x127162(0x101),'hint':a90_0x127162(0xfb)},{'name':a90_0x127162(0xf3),'meowKey':a90_0x127162(0xf3),'type':a90_0x127162(0xf2),'description':a90_0x127162(0xff),'hint':'production\x20|\x20development\x20|\x20daily'},{'name':a90_0x127162(0x105),'meowKey':a90_0x127162(0x105),'type':'string','description':a90_0x127162(0x115),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':'string','description':a90_0x127162(0x116),'hint':a90_0x127162(0x111)},{'name':a90_0x127162(0xfa),'meowKey':a90_0x127162(0xf4),'type':'boolean','description':'Preview\x20operation\x20without\x20executing'},{'name':a90_0x127162(0xf7),'meowKey':a90_0x127162(0xf7),'type':'boolean','description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a90_0x127162(0xf6),'meowKey':a90_0x127162(0xf9),'type':a90_0x127162(0x10d),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':'global','meowKey':a90_0x127162(0xf1),'type':a90_0x127162(0x10d),'description':'Use\x20global\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a90_0x127162(0x10d),'description':a90_0x127162(0xf5),'hidden':!![]},{'name':a90_0x127162(0xfe),'meowKey':a90_0x127162(0xfe),'type':a90_0x127162(0x10d),'description':'Show\x20help'},{'name':'id','meowKey':'id','type':'string','description':a90_0x127162(0x100),'hidden':!![]},{'name':a90_0x127162(0x11b),'meowKey':a90_0x127162(0x11b),'type':'string','description':a90_0x127162(0x102),'hidden':!![]},{'name':'sqlcode','meowKey':'sqlcode','type':a90_0x127162(0xf2),'description':a90_0x127162(0x117),'hidden':!![]},{'name':a90_0x127162(0x11c),'meowKey':a90_0x127162(0x11c),'type':a90_0x127162(0xf2),'description':a90_0x127162(0x112),'hidden':!![]},{'name':a90_0x127162(0x10c),'meowKey':a90_0x127162(0x10c),'type':'boolean','description':a90_0x127162(0x103),'hidden':!![]},{'name':a90_0x127162(0x10b),'meowKey':'clear','type':a90_0x127162(0x10d),'description':a90_0x127162(0x10e),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set(['appcode',a90_0x127162(0x106),a90_0x127162(0xf3),'format','jq',a90_0x127162(0xfa),a90_0x127162(0xf7),a90_0x127162(0xf6),'ci']);export function buildMeowFlags(){const _0x268aa1=a90_0x127162;return Object['fromEntries'](GLOBAL_FLAGS[_0x268aa1(0x118)](_0x2027a8=>[_0x2027a8[_0x268aa1(0x11a)],{'type':_0x2027a8[_0x268aa1(0x113)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a91_0x4ef0d3=a91_0x5d42;function a91_0x5d42(_0x552838,_0x42f3b2){_0x552838=_0x552838-0x85;const _0x30cf40=a91_0x30cf();let _0x5d426a=_0x30cf40[_0x552838];return _0x5d426a;}(function(_0x46feb7,_0x2447ae){const _0x483308=a91_0x5d42,_0x32edf4=_0x46feb7();while(!![]){try{const _0x326b6f=parseInt(_0x483308(0x8d))/0x1+-parseInt(_0x483308(0x8e))/0x2*(parseInt(_0x483308(0x8f))/0x3)+-parseInt(_0x483308(0x87))/0x4*(parseInt(_0x483308(0x88))/0x5)+parseInt(_0x483308(0x86))/0x6+parseInt(_0x483308(0x8a))/0x7*(parseInt(_0x483308(0x89))/0x8)+-parseInt(_0x483308(0x8b))/0x9+parseInt(_0x483308(0x8c))/0xa;if(_0x326b6f===_0x2447ae)break;else _0x32edf4['push'](_0x32edf4['shift']());}catch(_0x52601e){_0x32edf4['push'](_0x32edf4['shift']());}}}(a91_0x30cf,0xbd37f));export const DEFAULT_APP_PROFILE_NAME='main';export const DEFAULT_CONFIG_VALUES={'env':'production','format':a91_0x4ef0d3(0x85),'locale':'en-US','riskLevel':'write'};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a91_0x4ef0d3(0x85);function a91_0x30cf(){const _0xab30ff=['3464xrUWaq','6468qvDmTc','6857127kNozeY','20480630SlEwfw','821819ORrDBv','24538fOyFaC','360mPfJks','compress','1387434vJdkGv','655988cNkrqa','15GfmFec'];a91_0x30cf=function(){return _0xab30ff;};return a91_0x30cf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a92_0x39eb85=a92_0x3f57;function a92_0x1136(){const _0x171241=['177910TeqlKF','1973388ayeTsr','39KxhiFP','4sSXSOk','npmPackageName','22zxVZWj','1480107sEXzAM','npmRegistryBaseUrl','2328avmbDx','6822IlnbMz','18qZAlva','356776uZuHXC','57731TAYGKy','7038jlJvum','335NsNpxd'];a92_0x1136=function(){return _0x171241;};return a92_0x1136();}function a92_0x3f57(_0x25e669,_0x3119be){_0x25e669=_0x25e669-0x123;const _0x11362a=a92_0x1136();let _0x3f57bc=_0x11362a[_0x25e669];return _0x3f57bc;}(function(_0x41805c,_0x16a54e){const _0x46e66d=a92_0x3f57,_0x276251=_0x41805c();while(!![]){try{const _0x40605b=parseInt(_0x46e66d(0x123))/0x1*(parseInt(_0x46e66d(0x130))/0x2)+parseInt(_0x46e66d(0x12c))/0x3*(-parseInt(_0x46e66d(0x129))/0x4)+parseInt(_0x46e66d(0x125))/0x5*(parseInt(_0x46e66d(0x124))/0x6)+-parseInt(_0x46e66d(0x131))/0x7+-parseInt(_0x46e66d(0x12e))/0x8*(parseInt(_0x46e66d(0x12f))/0x9)+parseInt(_0x46e66d(0x126))/0xa*(parseInt(_0x46e66d(0x12b))/0xb)+-parseInt(_0x46e66d(0x127))/0xc*(-parseInt(_0x46e66d(0x128))/0xd);if(_0x40605b===_0x16a54e)break;else _0x276251['push'](_0x276251['shift']());}catch(_0x1e1eec){_0x276251['push'](_0x276251['shift']());}}}(a92_0x1136,0x586c8));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a92_0x39eb85(0x12a)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG['skillSource'];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a92_0x39eb85(0x12d)];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x56e80a=a93_0xe258;(function(_0x5d16fa,_0x159773){const _0x56607e=a93_0xe258,_0x5f3eb4=_0x5d16fa();while(!![]){try{const _0x1c71bb=-parseInt(_0x56607e(0x116))/0x1+-parseInt(_0x56607e(0x11e))/0x2*(-parseInt(_0x56607e(0x123))/0x3)+-parseInt(_0x56607e(0x117))/0x4*(-parseInt(_0x56607e(0x11c))/0x5)+-parseInt(_0x56607e(0x125))/0x6*(-parseInt(_0x56607e(0x11a))/0x7)+parseInt(_0x56607e(0x114))/0x8+parseInt(_0x56607e(0x126))/0x9*(-parseInt(_0x56607e(0x124))/0xa)+parseInt(_0x56607e(0x118))/0xb;if(_0x1c71bb===_0x159773)break;else _0x5f3eb4['push'](_0x5f3eb4['shift']());}catch(_0x4ae505){_0x5f3eb4['push'](_0x5f3eb4['shift']());}}}(a93_0x2ca0,0x4eee5));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';function a93_0xe258(_0x3d8d1f,_0x3ba9e2){_0x3d8d1f=_0x3d8d1f-0x114;const _0x2ca060=a93_0x2ca0();let _0xe258ba=_0x2ca060[_0x3d8d1f];return _0xe258ba;}let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x41d0dc){const _0x41bc81=a93_0xe258;customApiDomain=_0x41d0dc?.[_0x41bc81(0x11d)],customUserDomain=_0x41d0dc?.['userDomain'],customRuntimeDomain=_0x41d0dc?.[_0x41bc81(0x11f)],customSkillHubDomain=_0x41d0dc?.[_0x41bc81(0x127)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a93_0x56e80a(0x11b)][a93_0x56e80a(0x122)][a93_0x56e80a(0x119)]:PRODUCT_CONFIG['domains'][a93_0x56e80a(0x121)]['user']);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a93_0x56e80a(0x11b)][a93_0x56e80a(0x122)][a93_0x56e80a(0x128)]:PRODUCT_CONFIG[a93_0x56e80a(0x11b)][a93_0x56e80a(0x121)][a93_0x56e80a(0x128)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a93_0x56e80a(0x11b)]['production'][a93_0x56e80a(0x115)]:PRODUCT_CONFIG[a93_0x56e80a(0x11b)]['nonProduction']['runtime']);function a93_0x2ca0(){const _0x1570d1=['runtimeDomain','skillhub','nonProduction','production','1040853teHBpw','10mYpcqm','581694zcPWLU','1940670GrfqpL','skillHubDomain','api','1007744fTnRrk','runtime','569506fQQdud','80348jIuCNu','1063205jIifaP','user','7QpXOFU','domains','110GXsZOw','apiDomain','2hqBbUv'];a93_0x2ca0=function(){return _0x1570d1;};return a93_0x2ca0();}export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains']['production'][a93_0x56e80a(0x120)]:PRODUCT_CONFIG[a93_0x56e80a(0x11b)][a93_0x56e80a(0x121)][a93_0x56e80a(0x120)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a94_0x68ec(){const _0x1ea368=['57208SHvheg','126cqUGGi','318056RqpaFI','85qWDhog','291039HjwhbS','dev','production','120426XFSxDL','development','79089AMDlxN','18vUTvVp','1397210tZWNzr','135812TAEzCK','online','ENV','daily'];a94_0x68ec=function(){return _0x1ea368;};return a94_0x68ec();}function a94_0x2662(_0x58562b,_0x4de80b){_0x58562b=_0x58562b-0x64;const _0x68ec20=a94_0x68ec();let _0x266254=_0x68ec20[_0x58562b];return _0x266254;}const a94_0x486064=a94_0x2662;(function(_0x39c30c,_0x1e5c3d){const _0x29a11f=a94_0x2662,_0x3aa6ef=_0x39c30c();while(!![]){try{const _0xb432a7=parseInt(_0x29a11f(0x69))/0x1+parseInt(_0x29a11f(0x72))/0x2+-parseInt(_0x29a11f(0x64))/0x3+-parseInt(_0x29a11f(0x6c))/0x4+parseInt(_0x29a11f(0x73))/0x5*(-parseInt(_0x29a11f(0x67))/0x6)+-parseInt(_0x29a11f(0x71))/0x7*(-parseInt(_0x29a11f(0x70))/0x8)+parseInt(_0x29a11f(0x6a))/0x9*(parseInt(_0x29a11f(0x6b))/0xa);if(_0xb432a7===_0x1e5c3d)break;else _0x3aa6ef['push'](_0x3aa6ef['shift']());}catch(_0x4f980a){_0x3aa6ef['push'](_0x3aa6ef['shift']());}}}(a94_0x68ec,0x2a818));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a94_0x486064(0x66),a94_0x486064(0x68),a94_0x486064(0x6f)];export function normalizeEnv(_0xbf4f51){const _0x576e43=a94_0x486064;return _0xbf4f51===_0x576e43(0x6d)?'production':_0xbf4f51;}export function isProduction(_0x37c9e3){const _0x589920=a94_0x486064;return normalizeEnv(_0x37c9e3)===_0x589920(0x66);}export function isDaily(_0x3754c8){return normalizeEnv(_0x3754c8)==='daily';}export function isDev(_0x33e6b4){const _0x14a687=a94_0x486064,_0x5b84c2=normalizeEnv(_0x33e6b4);return _0x5b84c2===_0x14a687(0x68)||_0x5b84c2===_0x14a687(0x65);}let env=normalizeEnv(productEnv(a94_0x486064(0x6e))||a94_0x486064(0x66));export function getEnv(){return env;}export function initEnv(_0x4f0707){env=normalizeEnv(_0x4f0707);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a95_0x3f05(_0x1822e9,_0x42ca64){_0x1822e9=_0x1822e9-0x1d1;const _0x189128=a95_0x1891();let _0x3f05b2=_0x189128[_0x1822e9];return _0x3f05b2;}const a95_0x5670b2=a95_0x3f05;(function(_0x5dc15c,_0x3ee21b){const _0x53fc3b=a95_0x3f05,_0x3fb9bc=_0x5dc15c();while(!![]){try{const _0x3eb58f=-parseInt(_0x53fc3b(0x1de))/0x1*(parseInt(_0x53fc3b(0x1d3))/0x2)+-parseInt(_0x53fc3b(0x1dd))/0x3*(parseInt(_0x53fc3b(0x1d2))/0x4)+parseInt(_0x53fc3b(0x1da))/0x5*(parseInt(_0x53fc3b(0x1d4))/0x6)+parseInt(_0x53fc3b(0x1d9))/0x7*(-parseInt(_0x53fc3b(0x1e0))/0x8)+-parseInt(_0x53fc3b(0x1d7))/0x9*(-parseInt(_0x53fc3b(0x1d8))/0xa)+-parseInt(_0x53fc3b(0x1df))/0xb*(parseInt(_0x53fc3b(0x1d6))/0xc)+parseInt(_0x53fc3b(0x1e1))/0xd*(parseInt(_0x53fc3b(0x1d5))/0xe);if(_0x3eb58f===_0x3ee21b)break;else _0x3fb9bc['push'](_0x3fb9bc['shift']());}catch(_0x652c3c){_0x3fb9bc['push'](_0x3fb9bc['shift']());}}}(a95_0x1891,0x51d16));export const OUTPUT_FORMAT_VALUES=[a95_0x5670b2(0x1db),a95_0x5670b2(0x1d1),a95_0x5670b2(0x1dc)];function a95_0x1891(){const _0x318c37=['8090UJhDtf','102WDxpjo','728ZAZjri','24GfJJZn','5352219qijnqx','10xJOFDO','275639GTCSCR','128485WbPRqJ','json','compress','6VFDpdx','10hLsfEl','78089IFSvJR','128gGuPAG','100893ohQLNz','pretty','830612imobkY'];a95_0x1891=function(){return _0x318c37;};return a95_0x1891();}
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a96_0x3189ca=a96_0x4f71;function a96_0x4f71(_0x31ed71,_0x2cff9c){_0x31ed71=_0x31ed71-0xbf;const _0x504ea3=a96_0x504e();let _0x4f7157=_0x504ea3[_0x31ed71];return _0x4f7157;}function a96_0x504e(){const _0x22850b=['https://user.lovrabet.com','1354245DSkFTy','https://user-daily.lovrabet.com','https://api.lovrabet.com','map','lovrabet/lovrabet-cli','https://daily-runtime.lovrabet.com','46yOMTuq','.lovrabet','639tNsVJi','1005816fatHvn','https://daily-api.lovrabet.com','envPrefix','SKIP_NPX_SKILLS','Lovrabet\x20Runtime\x20CLI','25352ORMxXK','2825417jhdaaQ','.lovrabet-runtime.log','2117676rWwrVl','@lovrabet/lovrabet-cli','.lovrabetrc','git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','https://registry.npmjs.org','https://skills.lovrabet.com','.lovrabet.json','/user/ak','24270hOUTyT','LOVRABET','Lovrabet\x20User\x20Center','5OuURPS','RABETBASE','legacyEnvPrefixes','https://skills-daily.lovrabet.com','2878560ZOSnLV'];a96_0x504e=function(){return _0x22850b;};return a96_0x504e();}(function(_0x4549ac,_0x5c244d){const _0x58444b=a96_0x4f71,_0xf2d665=_0x4549ac();while(!![]){try{const _0xdc43a7=-parseInt(_0x58444b(0xd4))/0x1*(parseInt(_0x58444b(0xdc))/0x2)+parseInt(_0x58444b(0xce))/0x3+-parseInt(_0x58444b(0xdf))/0x4*(-parseInt(_0x58444b(0xc8))/0x5)+-parseInt(_0x58444b(0xcc))/0x6+parseInt(_0x58444b(0xdd))/0x7+-parseInt(_0x58444b(0xd7))/0x8+parseInt(_0x58444b(0xd6))/0x9*(parseInt(_0x58444b(0xc5))/0xa);if(_0xdc43a7===_0x5c244d)break;else _0xf2d665['push'](_0xf2d665['shift']());}catch(_0x2d5576){_0xf2d665['push'](_0xf2d665['shift']());}}}(a96_0x504e,0x59e47));export const PRODUCT_CONFIG={'cliBinName':'lovrabet','cliDisplayName':a96_0x3189ca(0xdb),'npmPackageName':a96_0x3189ca(0xe0),'skillSource':a96_0x3189ca(0xd2),'internalSkillSource':a96_0x3189ca(0xc0),'globalSkillName':'lovrabet','npmRegistryBaseUrl':a96_0x3189ca(0xc1),'envPrefix':a96_0x3189ca(0xc6),'legacyEnvPrefixes':[a96_0x3189ca(0xc9)],'configFileNames':[a96_0x3189ca(0xc3),a96_0x3189ca(0xbf)],'newConfigFileName':'.lovrabet.json','homeDirName':a96_0x3189ca(0xd5),'logFileName':a96_0x3189ca(0xde),'invokeSource':'cli:lovrabet-runtime','userCenterDisplayName':a96_0x3189ca(0xc7),'skipNpxSkillsEnvSuffix':a96_0x3189ca(0xda),'domains':{'production':{'user':a96_0x3189ca(0xcd),'api':a96_0x3189ca(0xd0),'runtime':'https://runtime.lovrabet.com','skillhub':a96_0x3189ca(0xc2)},'nonProduction':{'user':a96_0x3189ca(0xcf),'api':a96_0x3189ca(0xd8),'runtime':a96_0x3189ca(0xd3),'skillhub':a96_0x3189ca(0xcb)}},'accessKeyCreatePath':a96_0x3189ca(0xc4)};export function productEnvName(_0x5d0033){const _0x3c3dfd=a96_0x3189ca;return PRODUCT_CONFIG[_0x3c3dfd(0xd9)]+'_'+_0x5d0033;}export function productEnvNames(_0x34f002){const _0x157c0a=a96_0x3189ca;return[productEnvName(_0x34f002),...PRODUCT_CONFIG[_0x157c0a(0xca)][_0x157c0a(0xd1)](_0x30eee5=>_0x30eee5+'_'+_0x34f002)];}export function productEnv(_0x459a75){for(const _0x5211e8 of productEnvNames(_0x459a75)){const _0x45f2bb=process.env[_0x5211e8];if(_0x45f2bb!==undefined)return _0x45f2bb;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a97_0x55d0cf=a97_0x28c3;(function(_0x197885,_0x54a64f){const _0x2944b1=a97_0x28c3,_0x31f19f=_0x197885();while(!![]){try{const _0x18a5fc=-parseInt(_0x2944b1(0x150))/0x1+parseInt(_0x2944b1(0x154))/0x2+-parseInt(_0x2944b1(0x15a))/0x3+parseInt(_0x2944b1(0x156))/0x4*(-parseInt(_0x2944b1(0x15b))/0x5)+parseInt(_0x2944b1(0x153))/0x6*(parseInt(_0x2944b1(0x158))/0x7)+parseInt(_0x2944b1(0x151))/0x8*(-parseInt(_0x2944b1(0x157))/0x9)+parseInt(_0x2944b1(0x155))/0xa*(parseInt(_0x2944b1(0x152))/0xb);if(_0x18a5fc===_0x54a64f)break;else _0x31f19f['push'](_0x31f19f['shift']());}catch(_0x5ef27a){_0x31f19f['push'](_0x31f19f['shift']());}}}(a97_0x35f8,0xdc1a3));function a97_0x28c3(_0x45ddf9,_0x5c0b69){_0x45ddf9=_0x45ddf9-0x150;const _0x35f8d8=a97_0x35f8();let _0x28c397=_0x35f8d8[_0x45ddf9];return _0x28c397;}function a97_0x35f8(){const _0x41bbb7=['37408090uLcyOs','4gkMHCz','66492LazMWB','147JNqCkE','high-risk-write','1668426IQuDop','8178005JGrTTI','1018696WOCegs','1096yscbty','11pNmpiE','232698GlGsLy','1137764gBJwZi'];a97_0x35f8=function(){return _0x41bbb7;};return a97_0x35f8();}export const RISK_LEVEL_VALUES=['read','write',a97_0x55d0cf(0x159)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a98_0x2b3f(_0x369075,_0x37dcec){_0x369075=_0x369075-0xfd;const _0xb5c56d=a98_0xb5c5();let _0x2b3f2a=_0xb5c56d[_0x369075];return _0x2b3f2a;}const a98_0x178c78=a98_0x2b3f;(function(_0x224e9c,_0x38da71){const _0x3c21c0=a98_0x2b3f,_0x55daec=_0x224e9c();while(!![]){try{const _0x37fde8=parseInt(_0x3c21c0(0x104))/0x1*(parseInt(_0x3c21c0(0x101))/0x2)+parseInt(_0x3c21c0(0x10a))/0x3*(-parseInt(_0x3c21c0(0xfd))/0x4)+-parseInt(_0x3c21c0(0x108))/0x5+parseInt(_0x3c21c0(0x106))/0x6*(-parseInt(_0x3c21c0(0x102))/0x7)+parseInt(_0x3c21c0(0x103))/0x8*(parseInt(_0x3c21c0(0x107))/0x9)+parseInt(_0x3c21c0(0x105))/0xa*(parseInt(_0x3c21c0(0xfe))/0xb)+parseInt(_0x3c21c0(0x10b))/0xc;if(_0x37fde8===_0x38da71)break;else _0x55daec['push'](_0x55daec['shift']());}catch(_0x3aceb6){_0x55daec['push'](_0x55daec['shift']());}}}(a98_0xb5c5,0xc950e));import{PRODUCT_CONFIG}from'../constant/product.js';function a98_0xb5c5(){const _0x3a4d5f=['2752532VADUnM','2096259BMKXhg','accessKeyCreatePath','user','272PHwEWg','28ttjYvw','652056ShazWc','1994cFjCAr','50OCJrwy','1149474Yvvenh','108FSFtie','5250135dCruXD','domains','3YZRsRp','13523436FNawdz'];a98_0xb5c5=function(){return _0x3a4d5f;};return a98_0xb5c5();}export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a98_0x178c78(0x109)]['production'][a98_0x178c78(0x100)]+PRODUCT_CONFIG[a98_0x178c78(0xff)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a79_0xdaef3f=a79_0x4421;(function(_0x4207ff,_0x3edb2f){const _0x5ae813=a79_0x4421,_0x5d1148=_0x4207ff();while(!![]){try{const _0x12b9a3=-parseInt(_0x5ae813(0x159))/0x1+-parseInt(_0x5ae813(0x122))/0x2+-parseInt(_0x5ae813(0x11a))/0x3+-parseInt(_0x5ae813(0x144))/0x4+-parseInt(_0x5ae813(0x15b))/0x5+-parseInt(_0x5ae813(0x143))/0x6*(parseInt(_0x5ae813(0x157))/0x7)+parseInt(_0x5ae813(0x140))/0x8;if(_0x12b9a3===_0x3edb2f)break;else _0x5d1148['push'](_0x5d1148['shift']());}catch(_0x23538b){_0x5d1148['push'](_0x5d1148['shift']());}}}(a79_0x3d39,0x56464));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a79_0xdaef3f(0x138)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a79_0xdaef3f(0x148)];function resolveConfigPath(_0xb6cb4c){for(const _0x26c96e of CONFIG_NAMES){const _0x555142=resolve(_0xb6cb4c,_0x26c96e);if(existsSync(_0x555142))return _0x555142;}return undefined;}export function resolveWriteConfigPath(_0x4a0c1a){const _0x705bcb=a79_0xdaef3f,_0x548662=_0x4a0c1a===_0x705bcb(0x12a)?process['cwd']():homedir(),_0x44f1d3=resolveConfigPath(_0x548662);return _0x44f1d3??resolve(_0x548662,NEW_CONFIG_NAME);}export function readConfigFile(_0x18907f){const _0x552681=a79_0xdaef3f;try{if(existsSync(_0x18907f)){const _0x1eb26c=readFileSync(_0x18907f,{'encoding':_0x552681(0x121)});if(_0x1eb26c){const _0x38d4d5=JSON[_0x552681(0x12d)](_0x1eb26c);return migrateOnlineEnv(_0x18907f,_0x38d4d5),_0x38d4d5;}}}catch{}return{};}function migrateOnlineEnv(_0x27b721,_0x134317){const _0x193c45=a79_0xdaef3f;let _0x35dd1c=![];_0x134317[_0x193c45(0x126)]===_0x193c45(0x12e)&&(_0x134317[_0x193c45(0x126)]=_0x193c45(0x15e),_0x35dd1c=!![]);if(_0x134317[_0x193c45(0x14b)]&&typeof _0x134317[_0x193c45(0x14b)]===_0x193c45(0x150))for(const _0x4468e5 of Object[_0x193c45(0x124)](_0x134317['apps'])){_0x4468e5&&_0x4468e5[_0x193c45(0x126)]===_0x193c45(0x12e)&&(_0x4468e5[_0x193c45(0x126)]='production',_0x35dd1c=!![]);}if(_0x35dd1c)try{writeConfigFile(_0x27b721,_0x134317);}catch{}}function a79_0x3d39(){const _0x421e40=['object','EACCES','top-level','argv','EPERM','APP','./constant/domain.js','851060HPqlzW','high-risk-write','639115owNowj','nonInteractive','1119310bayxpg','runtimeDomain','cache','production','inherit','daily','riskLevel','apiDomain','43419EkSDUq','raw','true','trim','isTTY','development','setRawCommand','utf8','855990YSeHhw','authRequired','values','isRaw','env','explicit','userDomain','local-alias','project','VERBOSE','./constant/env.js','parse','online','slice','string','empty','.tmp','EXDEV','global','missing','message','format','configFileNames','app','locale','host','accessKey','ACCESS_KEY','globalConfig','appcode','17432288SNBaNB','projectConfig','skillHubDomain','12JsGjPg','1108204UOHDqm','defaultApp','write','some','newConfigFileName','cwd','stdin','apps','setLogPath','setRawMode','join','code'];a79_0x3d39=function(){return _0x421e40;};return a79_0x3d39();}export function writeConfigFile(_0x43f4ae,_0x12c1ea){const _0x434a7d=a79_0xdaef3f,_0x1499ce=dirname(_0x43f4ae);!existsSync(_0x1499ce)&&mkdirSync(_0x1499ce,{'recursive':!![]});const _0x2525d2=_0x43f4ae+_0x434a7d(0x132);try{writeFileSync(_0x2525d2,JSON['stringify'](_0x12c1ea,null,0x2)+'\x0a',{'encoding':_0x434a7d(0x121),'mode':0x180});try{renameSync(_0x2525d2,_0x43f4ae);}catch(_0x2ee7b5){if(_0x2ee7b5[_0x434a7d(0x14f)]===_0x434a7d(0x154)||_0x2ee7b5[_0x434a7d(0x14f)]===_0x434a7d(0x133)||_0x2ee7b5['code']===_0x434a7d(0x151)){writeFileSync(_0x43f4ae,JSON['stringify'](_0x12c1ea,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x2525d2);}catch{}}else throw _0x2ee7b5;}}catch(_0x26cc7b){try{unlinkSync(_0x2525d2);}catch{}throw _0x26cc7b;}}export function isNonInteractiveMode(_0x207648){const _0x3eb338=a79_0xdaef3f;return!!(_0x207648[_0x3eb338(0x15a)]||_0x207648['ci']||productEnvNames('CI')[_0x3eb338(0x147)](_0x147bf1=>process.env[_0x147bf1]==='true')||process.env.CI===_0x3eb338(0x11c)||!process['stdout'][_0x3eb338(0x11e)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x310aaf=a79_0xdaef3f;if(!process[_0x310aaf(0x14a)][_0x310aaf(0x11e)])return![];try{const _0x394979=process[_0x310aaf(0x14a)][_0x310aaf(0x125)];return process['stdin'][_0x310aaf(0x14d)](!![]),process[_0x310aaf(0x14a)][_0x310aaf(0x14d)](_0x394979??![]),!![];}catch{return![];}}export async function createContext(_0x2cda79){const _0x19b892=a79_0xdaef3f,_0x392aff=readRawConfig(),_0x3db2fb=buildConfig(_0x392aff,_0x2cda79);await initGlobalEnvironment(_0x3db2fb);const {getUserDomain:_0x223085,getApiDomain:_0x3c420d}=await import('./constant/domain.js'),_0x40cab8={'apiDomain':_0x3c420d(),'userDomain':_0x223085()},_0x3787f7=await buildAuth(_0x3db2fb);logger[_0x19b892(0x14c)](process[_0x19b892(0x149)]());const _0x52a7eb=(CLI_BIN_NAME+'\x20'+process[_0x19b892(0x153)][_0x19b892(0x12f)](0x2)[_0x19b892(0x14e)]('\x20'))[_0x19b892(0x11d)]();logger[_0x19b892(0x120)](_0x52a7eb);const _0x1cd2b1=isNonInteractiveMode(_0x2cda79);return{'config':_0x3db2fb,'auth':_0x3787f7,'logger':logger,'env':_0x40cab8,'nonInteractive':_0x1cd2b1};}export function buildConfigFromFlags(_0x185626){return buildConfig(readRawConfig(),_0x185626);}export function getLocalAppAliases(_0x783d5b){const _0x5a88ab=a79_0xdaef3f;return _0x783d5b['apps']&&typeof _0x783d5b[_0x5a88ab(0x14b)]===_0x5a88ab(0x150)?_0x783d5b[_0x5a88ab(0x14b)]:{};}export function resolveLocalAppAliasCode(_0x1a1e8c,_0x583a40){const _0x551825=a79_0xdaef3f;if(!_0x583a40)return undefined;const _0x3a212e=getLocalAppAliases(_0x1a1e8c)[_0x583a40],_0xa8853f=_0x3a212e?.[_0x551825(0x13f)];return typeof _0xa8853f===_0x551825(0x130)&&_0xa8853f[_0x551825(0x11d)]()?_0xa8853f[_0x551825(0x11d)]():undefined;}export function readAppCodeFromConfig(){const _0x314294=a79_0xdaef3f,_0x11e79b=readRawConfig(),_0x324358=_0x11e79b[_0x314294(0x13f)]??_0x11e79b[_0x314294(0x139)];if(typeof _0x324358==='string'&&_0x324358[_0x314294(0x11d)]())return _0x324358[_0x314294(0x11d)]();const _0x58cfea=resolveLocalAppAliasCode(_0x11e79b,typeof _0x11e79b[_0x314294(0x145)]==='string'?_0x11e79b[_0x314294(0x145)]:undefined);if(_0x58cfea)return _0x58cfea;const _0x31a32f=normalizeEnv(String(_0x11e79b[_0x314294(0x126)]||_0x314294(0x15e))),_0x2caebe=isDaily(_0x31a32f)?_0x314294(0x117):isDev(_0x31a32f)?'development':_0x314294(0x15e),_0x46e142=resolveCachedAppCode(typeof _0x11e79b[_0x314294(0x145)]===_0x314294(0x130)?_0x11e79b['defaultApp']:undefined,_0x2caebe,typeof _0x11e79b[_0x314294(0x13c)]===_0x314294(0x130)?_0x11e79b[_0x314294(0x13c)]:undefined);if(_0x46e142)return _0x46e142;const _0x40e363=Object[_0x314294(0x124)](getLocalAppAliases(_0x11e79b))['find'](_0x51633c=>_0x51633c?.['appcode']);return typeof _0x40e363?.[_0x314294(0x13f)]===_0x314294(0x130)&&_0x40e363[_0x314294(0x13f)][_0x314294(0x11d)]()?_0x40e363[_0x314294(0x13f)][_0x314294(0x11d)]():undefined;}export function readScopedConfig(_0x193f8f){const _0x28e603=a79_0xdaef3f,_0x51de75=_0x193f8f[_0x28e603(0x134)]?_0x28e603(0x134):_0x28e603(0x12a);return readConfigFile(resolveWriteConfigPath(_0x51de75));}export function writeScopedConfig(_0x39132d,_0x5a261a){const _0x51a5b7=a79_0xdaef3f,_0x24295b=_0x5a261a[_0x51a5b7(0x134)]?_0x51a5b7(0x134):_0x51a5b7(0x12a);writeConfigFile(resolveWriteConfigPath(_0x24295b),_0x39132d);}export async function initGlobalEnvironment(_0x302410){const _0xccd397=a79_0xdaef3f,{initEnv:_0x33a7d9}=await import(_0xccd397(0x12c));_0x33a7d9(_0x302410['env']);const {initDomains:_0x20c239}=await import(_0xccd397(0x156));_0x20c239({'apiDomain':_0x302410['raw'][_0xccd397(0x119)]||_0x302410['raw'][_0xccd397(0x13b)]||undefined,'userDomain':_0x302410[_0xccd397(0x11b)][_0xccd397(0x128)]||undefined,'runtimeDomain':_0x302410['raw'][_0xccd397(0x15c)]||undefined,'skillHubDomain':_0x302410['raw'][_0xccd397(0x142)]||undefined});}export function getProjectConfigPath(){const _0x501b7b=a79_0xdaef3f;return resolveConfigPath(process[_0x501b7b(0x149)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x5149a0){const _0x4e5f28=a79_0xdaef3f;if(!existsSync(_0x5149a0))return{'status':_0x4e5f28(0x135)};try{const _0x4f8517=readFileSync(_0x5149a0,{'encoding':'utf8'});if(!_0x4f8517?.[_0x4e5f28(0x11d)]())return{'status':_0x4e5f28(0x131)};const _0x12d477=JSON[_0x4e5f28(0x12d)](_0x4f8517);return{'status':'ok','data':_0x12d477};}catch(_0x541c5e){return{'status':'error','message':_0x541c5e instanceof Error?_0x541c5e[_0x4e5f28(0x136)]:String(_0x541c5e)};}}export function loadRawConfigLayers(_0x272658){const _0x5260ea=a79_0xdaef3f;let _0x3e625d={},_0x1f86ab={},_0x2b8433,_0x163ecd;try{_0x2b8433=resolveConfigPath(homedir());if(_0x2b8433){const _0x4b5695=readFileSync(_0x2b8433,{'encoding':_0x5260ea(0x121)});if(_0x4b5695)_0x3e625d=JSON['parse'](_0x4b5695);}}catch{}try{const _0x2e2866=_0x272658||process[_0x5260ea(0x149)]();_0x163ecd=resolveConfigPath(_0x2e2866);if(_0x163ecd){const _0x5db94b=readFileSync(_0x163ecd,{'encoding':'utf8'});if(_0x5db94b)_0x1f86ab=JSON['parse'](_0x5db94b);}}catch{}return{'globalPath':_0x2b8433,'projectPath':_0x163ecd,'globalConfig':_0x3e625d,'projectConfig':_0x1f86ab};}function mergeRawConfigLayers(_0x4a7973){const _0x406289=a79_0xdaef3f,{globalConfig:_0xde3d64,projectConfig:_0x53b53c}=_0x4a7973;if(_0x53b53c['inherit']===![]){const _0x3467fe={..._0x53b53c};return delete _0x3467fe['inherit'],_0x3467fe;}const _0x2e73f9={..._0xde3d64,..._0x53b53c};if('defaultApp'in _0x53b53c)_0x2e73f9[_0x406289(0x145)]=_0x53b53c[_0x406289(0x145)];else _0xde3d64[_0x406289(0x145)]&&(_0x2e73f9['defaultApp']=_0xde3d64[_0x406289(0x145)]);return _0x2e73f9;}export function isInProject(){return!!getProjectConfigPath();}function a79_0x4421(_0x511351,_0x189764){_0x511351=_0x511351-0x116;const _0x3d3967=a79_0x3d39();let _0x442179=_0x3d3967[_0x511351];return _0x442179;}export function readRawConfig(_0x5e700e){return mergeRawConfigLayers(loadRawConfigLayers(_0x5e700e));}export function readRawConfigWithLayers(_0x24f09c){const _0x2ced61=loadRawConfigLayers(_0x24f09c);return{'config':mergeRawConfigLayers(_0x2ced61),'layers':_0x2ced61};}export function resolveDefaultAppSource(_0x594b81){const _0x2b4d6a=a79_0xdaef3f;if(_0x2b4d6a(0x145)in _0x594b81[_0x2b4d6a(0x141)])return _0x2b4d6a(0x12a);if(_0x594b81[_0x2b4d6a(0x141)][_0x2b4d6a(0x116)]===![])return null;if(_0x594b81[_0x2b4d6a(0x13e)][_0x2b4d6a(0x145)])return _0x2b4d6a(0x134);return null;}function buildConfig(_0x5c1b04,_0x401166){const _0x2d25ea=a79_0xdaef3f,_0x43ca80=_0x5c1b04[_0x2d25ea(0x145)]||undefined,_0x5c7bef=_0x401166[_0x2d25ea(0x139)]||env(_0x2d25ea(0x155))||undefined,_0x57f32c=_0x5c7bef||_0x43ca80||undefined,_0x285baf=env(_0x2d25ea(0x13d))||_0x5c1b04[_0x2d25ea(0x13c)]||undefined,_0x1de776=_0x401166[_0x2d25ea(0x126)]||env('ENV')||_0x5c1b04[_0x2d25ea(0x126)]||DEFAULT_CONFIG_VALUES[_0x2d25ea(0x126)],_0x39bcf1=normalizeEnv(String(_0x1de776)),_0x5cbb09=isDaily(_0x39bcf1)?_0x2d25ea(0x117):isDev(_0x39bcf1)?_0x2d25ea(0x11f):_0x2d25ea(0x15e),_0x22d0cd=typeof _0x401166[_0x2d25ea(0x13f)]===_0x2d25ea(0x130)?_0x401166[_0x2d25ea(0x13f)]:undefined,_0x43ba05=env('APPCODE'),_0x2eec18=_0x5c7bef?undefined:_0x5c1b04[_0x2d25ea(0x13f)]||_0x5c1b04[_0x2d25ea(0x139)]||undefined,_0x20a343=_0x5c7bef||(_0x2eec18?undefined:_0x43ca80),_0x2f655c=resolveLocalAppAliasCode(_0x5c1b04,_0x20a343),_0x3795a6=resolveCachedAppCode(_0x20a343,_0x5cbb09,_0x285baf),_0x5d32fd=_0x22d0cd||_0x43ba05||_0x2eec18||_0x2f655c||_0x3795a6||undefined,_0x3edaa6=_0x22d0cd?_0x2d25ea(0x127):_0x43ba05?'env':_0x2eec18?_0x2d25ea(0x152):_0x2f655c?_0x2d25ea(0x129):_0x3795a6?_0x2d25ea(0x15d):undefined,_0x5ab70e=_0x5c1b04[_0x2d25ea(0x13a)]||DEFAULT_CONFIG_VALUES[_0x2d25ea(0x13a)],_0x339771=undefined,_0xd15b63=_0x401166[_0x2d25ea(0x137)]||env('FORMAT')||_0x5c1b04[_0x2d25ea(0x137)],_0x5427bc=normalizeLegacyOutputFormat(_0xd15b63),_0x19c74e=env('PAGE_SIZE')||_0x5c1b04['pageSize'],_0x354b5c=_0x19c74e?Number(_0x19c74e)||undefined:undefined,_0x3ca696=_0x5c1b04[_0x2d25ea(0x118)]||_0x5c1b04['maxRisk'],_0x375e0a=_0x3ca696==='read'||_0x3ca696===_0x2d25ea(0x146)||_0x3ca696===_0x2d25ea(0x158)?_0x3ca696:DEFAULT_CONFIG_VALUES[_0x2d25ea(0x118)],_0x158bee=env(_0x2d25ea(0x12b)),_0x370558=_0x158bee==='1'||_0x158bee===_0x2d25ea(0x11c);return{'appCode':typeof _0x5d32fd==='string'&&_0x5d32fd['trim']()?_0x5d32fd[_0x2d25ea(0x11d)]():undefined,'appCodeSource':_0x3edaa6,'env':_0x5cbb09,'locale':_0x5ab70e,'cookie':_0x339771,'accessKey':_0x285baf,'format':_0x5427bc,'pageSize':_0x354b5c,'riskLevel':_0x375e0a,'verbose':_0x370558,'defaultApp':_0x43ca80,'currentApp':typeof _0x57f32c==='string'?_0x57f32c:undefined,'raw':_0x5c1b04};}function env(_0x3738fd){return productEnv(_0x3738fd);}async function buildAuth(_0x39afa0){const _0xfd4996='',_0x2c7a1a=!!_0x39afa0['accessKey'];return{'cookie':_0xfd4996,'isLoggedIn':_0x2c7a1a,async 'getOrLogin'(){const _0x42be0a=a79_0x4421;if(_0x2c7a1a)return _0xfd4996;throw CliErrors[_0x42be0a(0x123)]();}};}
|
|
1
|
+
const a99_0x4229ec=a99_0x3de0;(function(_0x148b64,_0x57c094){const _0x1fc884=a99_0x3de0,_0x549c85=_0x148b64();while(!![]){try{const _0x8f9b02=-parseInt(_0x1fc884(0xf8))/0x1*(-parseInt(_0x1fc884(0xf7))/0x2)+-parseInt(_0x1fc884(0x10d))/0x3*(parseInt(_0x1fc884(0xc5))/0x4)+-parseInt(_0x1fc884(0xca))/0x5*(parseInt(_0x1fc884(0xe8))/0x6)+-parseInt(_0x1fc884(0xe1))/0x7+-parseInt(_0x1fc884(0x108))/0x8*(parseInt(_0x1fc884(0x10c))/0x9)+-parseInt(_0x1fc884(0xf6))/0xa*(-parseInt(_0x1fc884(0xd9))/0xb)+-parseInt(_0x1fc884(0xcd))/0xc*(-parseInt(_0x1fc884(0xda))/0xd);if(_0x8f9b02===_0x57c094)break;else _0x549c85['push'](_0x549c85['shift']());}catch(_0x4c2863){_0x549c85['push'](_0x549c85['shift']());}}}(a99_0x5774,0xb1271));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';function a99_0x5774(){const _0x24a665=['runtimeDomain','3197601qotkyr','3351345orpruk','riskLevel','maxRisk','newConfigFileName','4TUUHWd','env','high-risk-write','missing','object','1614590WpAZvN','values','stdin','12TkFhuo','nonInteractive','explicit','code','ENV','stdout','some','parse','.tmp','apiDomain','skillHubDomain','./constant/domain.js','5599ZoGlSR','47718658nguCIO','cwd','read','string','isTTY','PAGE_SIZE','local-alias','7065744OaSkkn','appcode','global','top-level','locale','APPCODE','projectConfig','6hJcbKX','configFileNames','slice','trim','cache','true','EXDEV','find','APP','setLogPath','authRequired','FORMAT','inherit','globalConfig','1090VsLvOw','2HrsRgJ','514762Nbwclu','setRawMode','project','EACCES','./constant/env.js','format','online','app','daily','raw','join','VERBOSE','accessKey','production','utf8','empty','24umWHPh','defaultApp','apps'];a99_0x5774=function(){return _0x24a665;};return a99_0x5774();}import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';function a99_0x3de0(_0x28eec3,_0x4aac61){_0x28eec3=_0x28eec3-0xc3;const _0x57745f=a99_0x5774();let _0x3de084=_0x57745f[_0x28eec3];return _0x3de084;}import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a99_0x4229ec(0xe9)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a99_0x4229ec(0xc4)];function resolveConfigPath(_0x568a5e){for(const _0x1b2ede of CONFIG_NAMES){const _0x1c35f8=resolve(_0x568a5e,_0x1b2ede);if(existsSync(_0x1c35f8))return _0x1c35f8;}return undefined;}export function resolveWriteConfigPath(_0x18665b){const _0x5f4931=a99_0x4229ec,_0x59e33d=_0x18665b===_0x5f4931(0xfa)?process[_0x5f4931(0xdb)]():homedir(),_0x9f3395=resolveConfigPath(_0x59e33d);return _0x9f3395??resolve(_0x59e33d,NEW_CONFIG_NAME);}export function readConfigFile(_0x3715a7){const _0x56c583=a99_0x4229ec;try{if(existsSync(_0x3715a7)){const _0x48952f=readFileSync(_0x3715a7,{'encoding':_0x56c583(0x106)});if(_0x48952f){const _0x1ed836=JSON['parse'](_0x48952f);return migrateOnlineEnv(_0x3715a7,_0x1ed836),_0x1ed836;}}}catch{}return{};}function migrateOnlineEnv(_0x328850,_0x5c07b5){const _0x578df4=a99_0x4229ec;let _0x931b7a=![];_0x5c07b5[_0x578df4(0xc6)]===_0x578df4(0xfe)&&(_0x5c07b5[_0x578df4(0xc6)]='production',_0x931b7a=!![]);if(_0x5c07b5[_0x578df4(0x10a)]&&typeof _0x5c07b5[_0x578df4(0x10a)]===_0x578df4(0xc9))for(const _0x45ea4e of Object[_0x578df4(0xcb)](_0x5c07b5[_0x578df4(0x10a)])){_0x45ea4e&&_0x45ea4e['env']===_0x578df4(0xfe)&&(_0x45ea4e[_0x578df4(0xc6)]=_0x578df4(0x105),_0x931b7a=!![]);}if(_0x931b7a)try{writeConfigFile(_0x328850,_0x5c07b5);}catch{}}export function writeConfigFile(_0x2e1cbd,_0x1e2814){const _0x1dd3e4=a99_0x4229ec,_0x494761=dirname(_0x2e1cbd);!existsSync(_0x494761)&&mkdirSync(_0x494761,{'recursive':!![]});const _0x2e2f70=_0x2e1cbd+_0x1dd3e4(0xd5);try{writeFileSync(_0x2e2f70,JSON['stringify'](_0x1e2814,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x2e2f70,_0x2e1cbd);}catch(_0x5229db){if(_0x5229db['code']==='EPERM'||_0x5229db[_0x1dd3e4(0xd0)]===_0x1dd3e4(0xee)||_0x5229db[_0x1dd3e4(0xd0)]===_0x1dd3e4(0xfb)){writeFileSync(_0x2e1cbd,JSON['stringify'](_0x1e2814,null,0x2)+'\x0a',{'encoding':_0x1dd3e4(0x106)});try{unlinkSync(_0x2e2f70);}catch{}}else throw _0x5229db;}}catch(_0x1c504f){try{unlinkSync(_0x2e2f70);}catch{}throw _0x1c504f;}}export function isNonInteractiveMode(_0x2d43f1){const _0x23519f=a99_0x4229ec;return!!(_0x2d43f1[_0x23519f(0xce)]||_0x2d43f1['ci']||productEnvNames('CI')[_0x23519f(0xd3)](_0x3b4642=>process.env[_0x3b4642]==='true')||process.env.CI===_0x23519f(0xed)||!process[_0x23519f(0xd2)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x20b61c=a99_0x4229ec;if(!process[_0x20b61c(0xcc)][_0x20b61c(0xde)])return![];try{const _0xc4371d=process[_0x20b61c(0xcc)]['isRaw'];return process[_0x20b61c(0xcc)]['setRawMode'](!![]),process[_0x20b61c(0xcc)][_0x20b61c(0xf9)](_0xc4371d??![]),!![];}catch{return![];}}export async function createContext(_0x4476ce){const _0x4713cb=a99_0x4229ec,_0x5b07d4=readRawConfig(),_0x301178=buildConfig(_0x5b07d4,_0x4476ce);await initGlobalEnvironment(_0x301178);const {getUserDomain:_0x1af7e5,getApiDomain:_0x40a44f}=await import('./constant/domain.js'),_0x5af938={'apiDomain':_0x40a44f(),'userDomain':_0x1af7e5()},_0x56701e=await buildAuth(_0x301178);logger[_0x4713cb(0xf1)](process['cwd']());const _0x37c4dd=(CLI_BIN_NAME+'\x20'+process['argv'][_0x4713cb(0xea)](0x2)[_0x4713cb(0x102)]('\x20'))[_0x4713cb(0xeb)]();logger['setRawCommand'](_0x37c4dd);const _0x179daf=isNonInteractiveMode(_0x4476ce);return{'config':_0x301178,'auth':_0x56701e,'logger':logger,'env':_0x5af938,'nonInteractive':_0x179daf};}export function buildConfigFromFlags(_0x51b2df){return buildConfig(readRawConfig(),_0x51b2df);}export function getLocalAppAliases(_0x2ed323){const _0x4fb416=a99_0x4229ec;return _0x2ed323[_0x4fb416(0x10a)]&&typeof _0x2ed323[_0x4fb416(0x10a)]===_0x4fb416(0xc9)?_0x2ed323[_0x4fb416(0x10a)]:{};}export function resolveLocalAppAliasCode(_0xe345db,_0x52d320){const _0x4ac119=a99_0x4229ec;if(!_0x52d320)return undefined;const _0x3ba21c=getLocalAppAliases(_0xe345db)[_0x52d320],_0x2eba41=_0x3ba21c?.[_0x4ac119(0xe2)];return typeof _0x2eba41===_0x4ac119(0xdd)&&_0x2eba41['trim']()?_0x2eba41[_0x4ac119(0xeb)]():undefined;}export function readAppCodeFromConfig(){const _0x4c4d3f=a99_0x4229ec,_0x147b0c=readRawConfig(),_0x6b5147=_0x147b0c[_0x4c4d3f(0xe2)]??_0x147b0c['app'];if(typeof _0x6b5147==='string'&&_0x6b5147[_0x4c4d3f(0xeb)]())return _0x6b5147[_0x4c4d3f(0xeb)]();const _0x21e2d5=resolveLocalAppAliasCode(_0x147b0c,typeof _0x147b0c[_0x4c4d3f(0x109)]==='string'?_0x147b0c[_0x4c4d3f(0x109)]:undefined);if(_0x21e2d5)return _0x21e2d5;const _0x620789=normalizeEnv(String(_0x147b0c[_0x4c4d3f(0xc6)]||_0x4c4d3f(0x105))),_0x27d68d=isDaily(_0x620789)?_0x4c4d3f(0x100):isDev(_0x620789)?'development':'production',_0x3c55c1=resolveCachedAppCode(typeof _0x147b0c[_0x4c4d3f(0x109)]===_0x4c4d3f(0xdd)?_0x147b0c[_0x4c4d3f(0x109)]:undefined,_0x27d68d,typeof _0x147b0c[_0x4c4d3f(0x104)]===_0x4c4d3f(0xdd)?_0x147b0c['accessKey']:undefined);if(_0x3c55c1)return _0x3c55c1;const _0x23652e=Object['values'](getLocalAppAliases(_0x147b0c))[_0x4c4d3f(0xef)](_0x5172ca=>_0x5172ca?.[_0x4c4d3f(0xe2)]);return typeof _0x23652e?.['appcode']==='string'&&_0x23652e[_0x4c4d3f(0xe2)][_0x4c4d3f(0xeb)]()?_0x23652e[_0x4c4d3f(0xe2)][_0x4c4d3f(0xeb)]():undefined;}export function readScopedConfig(_0x1cd367){const _0x56e736=a99_0x4229ec,_0x2d6eab=_0x1cd367[_0x56e736(0xe3)]?_0x56e736(0xe3):_0x56e736(0xfa);return readConfigFile(resolveWriteConfigPath(_0x2d6eab));}export function writeScopedConfig(_0x1b8286,_0x4843c8){const _0x2bfed2=a99_0x4229ec,_0x3c414a=_0x4843c8['global']?'global':_0x2bfed2(0xfa);writeConfigFile(resolveWriteConfigPath(_0x3c414a),_0x1b8286);}export async function initGlobalEnvironment(_0x4fc83c){const _0x5417b3=a99_0x4229ec,{initEnv:_0x1effc0}=await import(_0x5417b3(0xfc));_0x1effc0(_0x4fc83c[_0x5417b3(0xc6)]);const {initDomains:_0xd2944d}=await import(_0x5417b3(0xd8));_0xd2944d({'apiDomain':_0x4fc83c['raw'][_0x5417b3(0xd6)]||_0x4fc83c[_0x5417b3(0x101)]['host']||undefined,'userDomain':_0x4fc83c[_0x5417b3(0x101)]['userDomain']||undefined,'runtimeDomain':_0x4fc83c[_0x5417b3(0x101)][_0x5417b3(0x10b)]||undefined,'skillHubDomain':_0x4fc83c[_0x5417b3(0x101)][_0x5417b3(0xd7)]||undefined});}export function getProjectConfigPath(){const _0x3c970b=a99_0x4229ec;return resolveConfigPath(process[_0x3c970b(0xdb)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x476226){const _0x456ff9=a99_0x4229ec;if(!existsSync(_0x476226))return{'status':_0x456ff9(0xc8)};try{const _0x365b38=readFileSync(_0x476226,{'encoding':_0x456ff9(0x106)});if(!_0x365b38?.[_0x456ff9(0xeb)]())return{'status':_0x456ff9(0x107)};const _0x457615=JSON[_0x456ff9(0xd4)](_0x365b38);return{'status':'ok','data':_0x457615};}catch(_0x142f72){return{'status':'error','message':_0x142f72 instanceof Error?_0x142f72['message']:String(_0x142f72)};}}export function loadRawConfigLayers(_0x3f6b57){const _0x581002=a99_0x4229ec;let _0x329046={},_0x4bfcf8={},_0x13eac4,_0x5a9cff;try{_0x13eac4=resolveConfigPath(homedir());if(_0x13eac4){const _0x202221=readFileSync(_0x13eac4,{'encoding':_0x581002(0x106)});if(_0x202221)_0x329046=JSON[_0x581002(0xd4)](_0x202221);}}catch{}try{const _0x4ebe18=_0x3f6b57||process[_0x581002(0xdb)]();_0x5a9cff=resolveConfigPath(_0x4ebe18);if(_0x5a9cff){const _0x16486e=readFileSync(_0x5a9cff,{'encoding':_0x581002(0x106)});if(_0x16486e)_0x4bfcf8=JSON['parse'](_0x16486e);}}catch{}return{'globalPath':_0x13eac4,'projectPath':_0x5a9cff,'globalConfig':_0x329046,'projectConfig':_0x4bfcf8};}function mergeRawConfigLayers(_0x1977c1){const _0x20c409=a99_0x4229ec,{globalConfig:_0x24fa4e,projectConfig:_0x353763}=_0x1977c1;if(_0x353763[_0x20c409(0xf4)]===![]){const _0x12bf60={..._0x353763};return delete _0x12bf60[_0x20c409(0xf4)],_0x12bf60;}const _0x45db2e={..._0x24fa4e,..._0x353763};if(_0x20c409(0x109)in _0x353763)_0x45db2e['defaultApp']=_0x353763[_0x20c409(0x109)];else _0x24fa4e[_0x20c409(0x109)]&&(_0x45db2e[_0x20c409(0x109)]=_0x24fa4e['defaultApp']);return _0x45db2e;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x27b258){return mergeRawConfigLayers(loadRawConfigLayers(_0x27b258));}export function readRawConfigWithLayers(_0x45638e){const _0x5c588e=loadRawConfigLayers(_0x45638e);return{'config':mergeRawConfigLayers(_0x5c588e),'layers':_0x5c588e};}export function resolveDefaultAppSource(_0x1c43ed){const _0x31b0af=a99_0x4229ec;if(_0x31b0af(0x109)in _0x1c43ed[_0x31b0af(0xe7)])return _0x31b0af(0xfa);if(_0x1c43ed[_0x31b0af(0xe7)][_0x31b0af(0xf4)]===![])return null;if(_0x1c43ed[_0x31b0af(0xf5)]['defaultApp'])return _0x31b0af(0xe3);return null;}function buildConfig(_0xcc1c5a,_0x1be46a){const _0x39cd4b=a99_0x4229ec,_0x2d4b80=_0xcc1c5a[_0x39cd4b(0x109)]||undefined,_0x325e0d=_0x1be46a[_0x39cd4b(0xff)]||env(_0x39cd4b(0xf0))||undefined,_0x4fbc0f=_0x325e0d||_0x2d4b80||undefined,_0x3f81ef=env('ACCESS_KEY')||_0xcc1c5a[_0x39cd4b(0x104)]||undefined,_0x148429=_0x1be46a[_0x39cd4b(0xc6)]||env(_0x39cd4b(0xd1))||_0xcc1c5a[_0x39cd4b(0xc6)]||DEFAULT_CONFIG_VALUES[_0x39cd4b(0xc6)],_0x1367f5=normalizeEnv(String(_0x148429)),_0x481d8d=isDaily(_0x1367f5)?'daily':isDev(_0x1367f5)?'development':_0x39cd4b(0x105),_0x420938=typeof _0x1be46a[_0x39cd4b(0xe2)]===_0x39cd4b(0xdd)?_0x1be46a[_0x39cd4b(0xe2)]:undefined,_0xc0e2b6=env(_0x39cd4b(0xe6)),_0x3bf245=_0x325e0d?undefined:_0xcc1c5a[_0x39cd4b(0xe2)]||_0xcc1c5a[_0x39cd4b(0xff)]||undefined,_0xad8d33=_0x325e0d||(_0x3bf245?undefined:_0x2d4b80),_0x46ae46=resolveLocalAppAliasCode(_0xcc1c5a,_0xad8d33),_0x4e5e97=resolveCachedAppCode(_0xad8d33,_0x481d8d,_0x3f81ef),_0x797070=_0x420938||_0xc0e2b6||_0x3bf245||_0x46ae46||_0x4e5e97||undefined,_0x48df84=_0x420938?_0x39cd4b(0xcf):_0xc0e2b6?_0x39cd4b(0xc6):_0x3bf245?_0x39cd4b(0xe4):_0x46ae46?_0x39cd4b(0xe0):_0x4e5e97?_0x39cd4b(0xec):undefined,_0x52c075=_0xcc1c5a[_0x39cd4b(0xe5)]||DEFAULT_CONFIG_VALUES[_0x39cd4b(0xe5)],_0x13dcad=undefined,_0x375948=_0x1be46a['format']||env(_0x39cd4b(0xf3))||_0xcc1c5a[_0x39cd4b(0xfd)],_0x42606c=normalizeLegacyOutputFormat(_0x375948),_0x54c2ad=env(_0x39cd4b(0xdf))||_0xcc1c5a['pageSize'],_0x5d9c0f=_0x54c2ad?Number(_0x54c2ad)||undefined:undefined,_0x206d30=_0xcc1c5a[_0x39cd4b(0x10e)]||_0xcc1c5a[_0x39cd4b(0xc3)],_0x3f0b30=_0x206d30===_0x39cd4b(0xdc)||_0x206d30==='write'||_0x206d30===_0x39cd4b(0xc7)?_0x206d30:DEFAULT_CONFIG_VALUES[_0x39cd4b(0x10e)],_0x5b365c=env(_0x39cd4b(0x103)),_0x12ae39=_0x5b365c==='1'||_0x5b365c===_0x39cd4b(0xed);return{'appCode':typeof _0x797070===_0x39cd4b(0xdd)&&_0x797070['trim']()?_0x797070[_0x39cd4b(0xeb)]():undefined,'appCodeSource':_0x48df84,'env':_0x481d8d,'locale':_0x52c075,'cookie':_0x13dcad,'accessKey':_0x3f81ef,'format':_0x42606c,'pageSize':_0x5d9c0f,'riskLevel':_0x3f0b30,'verbose':_0x12ae39,'defaultApp':_0x2d4b80,'currentApp':typeof _0x4fbc0f===_0x39cd4b(0xdd)?_0x4fbc0f:undefined,'raw':_0xcc1c5a};}function env(_0x31c363){return productEnv(_0x31c363);}async function buildAuth(_0x184a5d){const _0x6ec7f2=a99_0x4229ec,_0x7b9125='',_0x44288c=!!_0x184a5d[_0x6ec7f2(0x104)];return{'cookie':_0x7b9125,'isLoggedIn':_0x44288c,async 'getOrLogin'(){const _0x4b4ed9=_0x6ec7f2;if(_0x44288c)return _0x7b9125;throw CliErrors[_0x4b4ed9(0xf2)]();}};}
|
package/lib/core/api-client.d.ts
CHANGED
|
@@ -441,6 +441,24 @@ export declare function recognizeRuntimeOcr(appCode: string, input: {
|
|
|
441
441
|
type: string;
|
|
442
442
|
}): Promise<RuntimeOcrResponse>;
|
|
443
443
|
export declare function getRuntimeAppConfigByKey(appCode: string, key: string): Promise<string>;
|
|
444
|
+
export type NotificationChannelType = "EMAIL" | "FEISHU" | "DINGTALK" | "WECOM" | "WEBHOOK";
|
|
445
|
+
export interface NotificationChannelConfigItem {
|
|
446
|
+
id?: number | string | null;
|
|
447
|
+
appCode?: string | null;
|
|
448
|
+
configName?: string | null;
|
|
449
|
+
configCode?: string | null;
|
|
450
|
+
channelType?: string | null;
|
|
451
|
+
endpointUrl?: string | null;
|
|
452
|
+
channelConfig?: string | null;
|
|
453
|
+
description?: string | null;
|
|
454
|
+
connectTimeout?: number | null;
|
|
455
|
+
readTimeout?: number | null;
|
|
456
|
+
createTime?: string | null;
|
|
457
|
+
updateTime?: string | null;
|
|
458
|
+
[key: string]: unknown;
|
|
459
|
+
}
|
|
460
|
+
/** Lists app-level notification configs without using the development Cookie flow. */
|
|
461
|
+
export declare function listNotificationChannelConfigs(appCode: string, channelType: NotificationChannelType): Promise<NotificationChannelConfigItem[]>;
|
|
444
462
|
export declare function listRuntimeArtifacts(appCode: string, options?: {
|
|
445
463
|
artifactType?: string;
|
|
446
464
|
source?: string;
|
|
@@ -504,3 +522,146 @@ export declare function putRuntimeSkillVersionDiagram(appCode: string, skillCode
|
|
|
504
522
|
export declare function getRuntimeSkillVersionDiagram(appCode: string, skillCode: string, version: string, scope: RuntimeSkillDiagramScope): Promise<RuntimeSkillVersionDiagramResult>;
|
|
505
523
|
/** Downloads a runtime Skill package through SkillHub. */
|
|
506
524
|
export declare function downloadRuntimeSkillPackage(scope: "personal" | "company" | "builtin", skillCode: string, appCode: string, version?: string): Promise<Buffer>;
|
|
525
|
+
export type RuntimeAppRoleType = "ADMIN" | "USER" | "OWNER" | "CUSTOM";
|
|
526
|
+
export interface RuntimeAppRole {
|
|
527
|
+
id: number;
|
|
528
|
+
appCode: string;
|
|
529
|
+
roleName: string;
|
|
530
|
+
roleType: RuntimeAppRoleType;
|
|
531
|
+
permits?: Record<string, string[]>;
|
|
532
|
+
remark?: string;
|
|
533
|
+
extend?: string;
|
|
534
|
+
userCount: number;
|
|
535
|
+
permitCount: number;
|
|
536
|
+
gmtCreate?: string;
|
|
537
|
+
gmtModified?: string;
|
|
538
|
+
}
|
|
539
|
+
export interface RuntimeRoleUserRef {
|
|
540
|
+
userId: number;
|
|
541
|
+
username?: string;
|
|
542
|
+
nickname?: string;
|
|
543
|
+
status?: string;
|
|
544
|
+
}
|
|
545
|
+
export interface RuntimeRoleUsers {
|
|
546
|
+
id: number;
|
|
547
|
+
roleName: string;
|
|
548
|
+
roleType: RuntimeAppRoleType;
|
|
549
|
+
userList: RuntimeRoleUserRef[];
|
|
550
|
+
applyUserList?: RuntimeRoleUserRef[];
|
|
551
|
+
}
|
|
552
|
+
export interface RuntimeAppRoleListOptions {
|
|
553
|
+
roleName?: string;
|
|
554
|
+
currentPage?: number;
|
|
555
|
+
pageSize?: number;
|
|
556
|
+
}
|
|
557
|
+
export declare function listRuntimeAppRoles(appCode: string, options?: RuntimeAppRoleListOptions): Promise<{
|
|
558
|
+
items: RuntimeAppRole[];
|
|
559
|
+
paging?: Paging;
|
|
560
|
+
}>;
|
|
561
|
+
export declare function createRuntimeAppRole(input: {
|
|
562
|
+
appCode: string;
|
|
563
|
+
roleName: string;
|
|
564
|
+
remark?: string;
|
|
565
|
+
}): Promise<RuntimeAppRole>;
|
|
566
|
+
export declare function updateRuntimeAppRole(input: {
|
|
567
|
+
id: number;
|
|
568
|
+
appCode: string;
|
|
569
|
+
roleName?: string;
|
|
570
|
+
remark?: string;
|
|
571
|
+
}): Promise<RuntimeAppRole>;
|
|
572
|
+
export declare function deleteRuntimeAppRole(id: number): Promise<boolean>;
|
|
573
|
+
export declare function listRuntimeRoleUsers(appCode: string): Promise<RuntimeRoleUsers[]>;
|
|
574
|
+
export declare function updateRuntimeRoleUsers(appCode: string, roleList: RuntimeRoleUsers[]): Promise<boolean>;
|
|
575
|
+
export interface RuntimeAppUser {
|
|
576
|
+
code: string | number;
|
|
577
|
+
userName: string;
|
|
578
|
+
nickName?: string;
|
|
579
|
+
displayName?: string;
|
|
580
|
+
status?: string;
|
|
581
|
+
}
|
|
582
|
+
export declare function listRuntimeAppUsers(appCode: string): Promise<RuntimeAppUser[]>;
|
|
583
|
+
export interface RuntimePermitRole {
|
|
584
|
+
id: number;
|
|
585
|
+
roleType: RuntimeAppRoleType | "ALL" | "SELF" | "PUBLIC";
|
|
586
|
+
roleName: string;
|
|
587
|
+
allowed?: boolean;
|
|
588
|
+
}
|
|
589
|
+
export interface RuntimeResourcePermit {
|
|
590
|
+
id?: number;
|
|
591
|
+
appCode?: string;
|
|
592
|
+
menuId?: number | null;
|
|
593
|
+
pageId?: number | null;
|
|
594
|
+
resourceCode: string;
|
|
595
|
+
resourceType: string;
|
|
596
|
+
resourceName?: string;
|
|
597
|
+
rolePermit: RuntimePermitRole[] | null;
|
|
598
|
+
dataPermit?: RuntimePermitRole[] | null;
|
|
599
|
+
fieldPermit?: string;
|
|
600
|
+
extend?: string;
|
|
601
|
+
}
|
|
602
|
+
export interface RuntimePagePermit {
|
|
603
|
+
menuId: number;
|
|
604
|
+
pageId?: number;
|
|
605
|
+
appCode: string;
|
|
606
|
+
datasetCode?: string;
|
|
607
|
+
menuPermit: RuntimeResourcePermit;
|
|
608
|
+
dataCreate?: RuntimeResourcePermit;
|
|
609
|
+
dataUpdate?: RuntimeResourcePermit;
|
|
610
|
+
dataDelete?: RuntimeResourcePermit;
|
|
611
|
+
dataDetail?: RuntimeResourcePermit;
|
|
612
|
+
dataExport?: RuntimeResourcePermit;
|
|
613
|
+
dataPermit?: RuntimeResourcePermit;
|
|
614
|
+
}
|
|
615
|
+
export interface RuntimeEvaluatedResource {
|
|
616
|
+
resourceType: string;
|
|
617
|
+
resourceCode: string;
|
|
618
|
+
resourceName?: string;
|
|
619
|
+
allowed?: boolean;
|
|
620
|
+
allowedActions?: string[];
|
|
621
|
+
appCode?: string;
|
|
622
|
+
menuType?: string;
|
|
623
|
+
pageId?: number | null;
|
|
624
|
+
pageNodeList?: RuntimeEvaluatedResource[] | null;
|
|
625
|
+
}
|
|
626
|
+
export interface RuntimeMenuRolePermitNode {
|
|
627
|
+
id: number;
|
|
628
|
+
parentId?: number;
|
|
629
|
+
label: string;
|
|
630
|
+
type?: string;
|
|
631
|
+
path?: string;
|
|
632
|
+
pageId?: number | null;
|
|
633
|
+
permitId?: number | null;
|
|
634
|
+
rolePermit: RuntimePermitRole[] | null;
|
|
635
|
+
children?: RuntimeMenuRolePermitNode[];
|
|
636
|
+
}
|
|
637
|
+
export interface RuntimeDatasetPermit {
|
|
638
|
+
appCode?: string;
|
|
639
|
+
datasetCode: string;
|
|
640
|
+
datasetName?: string;
|
|
641
|
+
dataPermitList: RuntimeEvaluatedResource[];
|
|
642
|
+
}
|
|
643
|
+
export interface RuntimeDatasetActionRolePermit {
|
|
644
|
+
permitId?: number | null;
|
|
645
|
+
resourceType: string;
|
|
646
|
+
resourceCode: string;
|
|
647
|
+
resourceName?: string;
|
|
648
|
+
rolePermit: RuntimePermitRole[] | null;
|
|
649
|
+
}
|
|
650
|
+
export interface RuntimeDatasetRolePermit {
|
|
651
|
+
appCode?: string;
|
|
652
|
+
datasetCode: string;
|
|
653
|
+
datasetName?: string;
|
|
654
|
+
dataPermitList: RuntimeDatasetActionRolePermit[];
|
|
655
|
+
}
|
|
656
|
+
export declare function listRuntimePermitRoles(appCode: string, options?: {
|
|
657
|
+
needSelf?: boolean;
|
|
658
|
+
needPublic?: boolean;
|
|
659
|
+
}): Promise<RuntimePermitRole[]>;
|
|
660
|
+
export declare function getRuntimePagePermit(menuId: number): Promise<RuntimePagePermit>;
|
|
661
|
+
export declare function saveRuntimePagePermit(input: RuntimePagePermit): Promise<RuntimePagePermit>;
|
|
662
|
+
export declare function getRuntimeRoleMenuResources(appCode: string, roleId: number): Promise<RuntimeEvaluatedResource[]>;
|
|
663
|
+
export declare function listRuntimeMenuRolePermits(appCode: string): Promise<RuntimeMenuRolePermitNode[]>;
|
|
664
|
+
export declare function saveRuntimeMenuRolePermits(appCode: string, permitList: RuntimeResourcePermit[]): Promise<boolean>;
|
|
665
|
+
export declare function listRuntimeDatasetPermits(appCode: string, roleId: number): Promise<RuntimeDatasetPermit[]>;
|
|
666
|
+
export declare function listRuntimeDatasetRolePermits(appCode: string): Promise<RuntimeDatasetRolePermit[]>;
|
|
667
|
+
export declare function saveRuntimeDatasetRolePermits(appCode: string, permitList: RuntimeResourcePermit[]): Promise<boolean>;
|