@lovrabet/lovrabet-cli 2.2.3-beta.2 → 2.2.4-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/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/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 +19 -6
- 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.manifest.json +5 -3
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a90_0x341928=a90_0x2d68;(function(_0x515471,_0x3197fb){const _0x1fd73a=a90_0x2d68,_0x1ed574=_0x515471();while(!![]){try{const _0x1aa247=-parseInt(_0x1fd73a(0xc5))/0x1*(-parseInt(_0x1fd73a(0xdf))/0x2)+-parseInt(_0x1fd73a(0xd0))/0x3*(parseInt(_0x1fd73a(0xde))/0x4)+-parseInt(_0x1fd73a(0xc6))/0x5*(-parseInt(_0x1fd73a(0xcc))/0x6)+-parseInt(_0x1fd73a(0xb5))/0x7*(parseInt(_0x1fd73a(0xaf))/0x8)+parseInt(_0x1fd73a(0xc7))/0x9*(parseInt(_0x1fd73a(0xd7))/0xa)+-parseInt(_0x1fd73a(0xcd))/0xb+parseInt(_0x1fd73a(0xbd))/0xc;if(_0x1aa247===_0x3197fb)break;else _0x1ed574['push'](_0x1ed574['shift']());}catch(_0x4e284f){_0x1ed574['push'](_0x1ed574['shift']());}}}(a90_0x2e8e,0x4cfc4));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a90_0x341928(0xb2)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a90_0x341928(0xb8)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a90_0x341928(0xc2),'meowKey':'appcode','type':a90_0x341928(0xda),'description':a90_0x341928(0xd6),'hint':a90_0x341928(0xcb)},{'name':a90_0x341928(0xba),'meowKey':a90_0x341928(0xba),'type':'string','description':'Select\x20app\x20profile\x20by\x20name','hint':a90_0x341928(0xb3)},{'name':'env','meowKey':a90_0x341928(0xcf),'type':a90_0x341928(0xda),'description':a90_0x341928(0xca),'hint':a90_0x341928(0xbb)},{'name':'format','meowKey':'format','type':a90_0x341928(0xda),'description':a90_0x341928(0xd8),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a90_0x341928(0xda),'description':a90_0x341928(0xce),'hint':a90_0x341928(0xc1)},{'name':a90_0x341928(0xc3),'meowKey':a90_0x341928(0xd1),'type':a90_0x341928(0xb7),'description':'Preview\x20operation\x20without\x20executing'},{'name':a90_0x341928(0xbc),'meowKey':a90_0x341928(0xbc),'type':a90_0x341928(0xb7),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a90_0x341928(0xd9),'meowKey':a90_0x341928(0xd5),'type':'boolean','description':a90_0x341928(0xb1)},{'name':a90_0x341928(0xbe),'meowKey':a90_0x341928(0xbe),'type':'boolean','description':a90_0x341928(0xc8)},{'name':'ci','meowKey':'ci','type':a90_0x341928(0xb7),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':'help','meowKey':'help','type':'boolean','description':a90_0x341928(0xd3)},{'name':'id','meowKey':'id','type':a90_0x341928(0xda),'description':a90_0x341928(0xc0),'hidden':!![]},{'name':'name','meowKey':a90_0x341928(0xd2),'type':'string','description':a90_0x341928(0xc9),'hidden':!![]},{'name':'sqlcode','meowKey':'sqlcode','type':a90_0x341928(0xda),'description':a90_0x341928(0xdb),'hidden':!![]},{'name':'params','meowKey':a90_0x341928(0xad),'type':'string','description':a90_0x341928(0xdc),'hidden':!![]},{'name':'verbose','meowKey':a90_0x341928(0xae),'type':a90_0x341928(0xb7),'description':a90_0x341928(0xbf),'hidden':!![]},{'name':a90_0x341928(0xb0),'meowKey':'clear','type':'boolean','description':a90_0x341928(0xd4),'hidden':!![]}];function a90_0x2d68(_0x13b3a6,_0x4901b4){_0x13b3a6=_0x13b3a6-0xad;const _0x2e8e51=a90_0x2e8e();let _0x2d68e1=_0x2e8e51[_0x13b3a6];return _0x2d68e1;}export const PIPELINE_FLAG_NAMES=new Set([a90_0x341928(0xc2),a90_0x341928(0xba),a90_0x341928(0xcf),a90_0x341928(0xc4),'jq','dry-run',a90_0x341928(0xbc),a90_0x341928(0xd9),'ci']);function a90_0x2e8e(){const _0x229400=['7ORFvGP','meowKey','boolean','cliDisplayName','map','app','production\x20|\x20development\x20|\x20daily','yes','3459072OdSdXo','global','Verbose\x20output','Record\x20ID','<expr>','appcode','dry-run','format','3GKiWEG','510AgbMZs','64314MnHUjS','Use\x20global\x20config\x20scope','Name\x20filter','Environment','<code>','22488Pbkvhf','4551811vRlADZ','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','env','1074729KDUPDJ','dryRun','name','Show\x20help','Clear\x20output','nonInteractive','Override\x20appcode','300AfosCM','Output\x20format','non-interactive','string','SQL\x20query\x20code','JSON\x20params\x20for\x20execute\x20commands','type','4cDKxcB','146892JOgZDd','params','verbose','143152fhuSBf','clear','Force\x20non-interactive\x20mode\x20(CI)','cliBinName','<name>','fromEntries'];a90_0x2e8e=function(){return _0x229400;};return a90_0x2e8e();}export function buildMeowFlags(){const _0x2499c4=a90_0x341928;return Object[_0x2499c4(0xb4)](GLOBAL_FLAGS[_0x2499c4(0xb9)](_0xfaf619=>[_0xfaf619[_0x2499c4(0xb6)],{'type':_0xfaf619[_0x2499c4(0xdd)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a91_0x38c13a=a91_0x3289;function a91_0x3289(_0x55e1f6,_0x258511){_0x55e1f6=_0x55e1f6-0xa7;const _0x33f066=a91_0x33f0();let _0x328957=_0x33f066[_0x55e1f6];return _0x328957;}function a91_0x33f0(){const _0x5cb893=['1688oTuolS','11064339ZRvRfM','3GCMnla','5655750YgamDs','4567764ExuWTG','11802160TeZZXw','write','en-US','compress','59951hoffUz','main','8421hNivvV','30SFlJDt','1751808caZUXN'];a91_0x33f0=function(){return _0x5cb893;};return a91_0x33f0();}(function(_0x1e7e9b,_0x98d43e){const _0x345e78=a91_0x3289,_0x1fdbdb=_0x1e7e9b();while(!![]){try{const _0x3a0c28=parseInt(_0x345e78(0xb4))/0x1*(parseInt(_0x345e78(0xa9))/0x2)+-parseInt(_0x345e78(0xad))/0x3*(-parseInt(_0x345e78(0xaf))/0x4)+parseInt(_0x345e78(0xae))/0x5+-parseInt(_0x345e78(0xaa))/0x6+-parseInt(_0x345e78(0xa8))/0x7*(-parseInt(_0x345e78(0xab))/0x8)+-parseInt(_0x345e78(0xac))/0x9+-parseInt(_0x345e78(0xb0))/0xa;if(_0x3a0c28===_0x98d43e)break;else _0x1fdbdb['push'](_0x1fdbdb['shift']());}catch(_0x355398){_0x1fdbdb['push'](_0x1fdbdb['shift']());}}}(a91_0x33f0,0xb0e9a));export const DEFAULT_APP_PROFILE_NAME=a91_0x38c13a(0xa7);export const DEFAULT_CONFIG_VALUES={'env':'production','format':'compress','locale':a91_0x38c13a(0xb2),'riskLevel':a91_0x38c13a(0xb1)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a91_0x38c13a(0xb3);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a92_0x49a272=a92_0x3e57;function a92_0x3e57(_0x2906b3,_0xe8ce74){_0x2906b3=_0x2906b3-0xe3;const _0x5568c3=a92_0x5568();let _0x3e573e=_0x5568c3[_0x2906b3];return _0x3e573e;}(function(_0x31e389,_0x502715){const _0x2d6838=a92_0x3e57,_0x5d70c4=_0x31e389();while(!![]){try{const _0x494996=parseInt(_0x2d6838(0xe6))/0x1*(-parseInt(_0x2d6838(0xec))/0x2)+parseInt(_0x2d6838(0xed))/0x3*(-parseInt(_0x2d6838(0xe5))/0x4)+parseInt(_0x2d6838(0xe4))/0x5+parseInt(_0x2d6838(0xe3))/0x6+-parseInt(_0x2d6838(0xe9))/0x7*(parseInt(_0x2d6838(0xeb))/0x8)+-parseInt(_0x2d6838(0xee))/0x9+parseInt(_0x2d6838(0xe7))/0xa;if(_0x494996===_0x502715)break;else _0x5d70c4['push'](_0x5d70c4['shift']());}catch(_0x35f76c){_0x5d70c4['push'](_0x5d70c4['shift']());}}}(a92_0x5568,0x1aade));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a92_0x49a272(0xea)];function a92_0x5568(){const _0x49944c=['237018hCjlqK','458307wSKqbA','1161432KTfPcw','73266StfCUf','751620vDfFNU','4RQguxK','1NCJnhT','5253880ltISlW','skillSource','1248233PDakfj','npmPackageName','8AfsciM'];a92_0x5568=function(){return _0x49944c;};return a92_0x5568();}export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a92_0x49a272(0xe8)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG['npmRegistryBaseUrl'];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x32e95d=a93_0x6b9e;(function(_0x2a82cc,_0x52f667){const _0x176441=a93_0x6b9e,_0x24afd0=_0x2a82cc();while(!![]){try{const _0x19db1d=parseInt(_0x176441(0x1b6))/0x1*(-parseInt(_0x176441(0x1b7))/0x2)+parseInt(_0x176441(0x1bb))/0x3*(parseInt(_0x176441(0x1af))/0x4)+parseInt(_0x176441(0x1b9))/0x5+-parseInt(_0x176441(0x1b3))/0x6*(parseInt(_0x176441(0x1a8))/0x7)+parseInt(_0x176441(0x1b5))/0x8*(-parseInt(_0x176441(0x1ae))/0x9)+parseInt(_0x176441(0x1aa))/0xa+parseInt(_0x176441(0x1ac))/0xb;if(_0x19db1d===_0x52f667)break;else _0x24afd0['push'](_0x24afd0['shift']());}catch(_0xa2d91a){_0x24afd0['push'](_0x24afd0['shift']());}}}(a93_0x2e08,0x76232));import{getEnv,isProduction}from'../constant/env.js';function a93_0x2e08(){const _0x53440f=['2lZYLoK','271454NuTVAK','api','39740gKapPZ','nonProduction','1041438QsAjCI','userDomain','runtimeDomain','4151gwkpbC','skillHubDomain','906470TdXXkv','user','12198483CMLPis','skillhub','261kflMBZ','8weyGDa','runtime','apiDomain','production','8892vJNvFB','domains','73840AHaJzL'];a93_0x2e08=function(){return _0x53440f;};return a93_0x2e08();}import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x3d0c43){const _0x2b376c=a93_0x6b9e;customApiDomain=_0x3d0c43?.[_0x2b376c(0x1b1)],customUserDomain=_0x3d0c43?.[_0x2b376c(0x1bc)],customRuntimeDomain=_0x3d0c43?.[_0x2b376c(0x1a7)],customSkillHubDomain=_0x3d0c43?.[_0x2b376c(0x1a9)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a93_0x32e95d(0x1b4)][a93_0x32e95d(0x1b2)][a93_0x32e95d(0x1ab)]:PRODUCT_CONFIG[a93_0x32e95d(0x1b4)][a93_0x32e95d(0x1ba)]['user']);function a93_0x6b9e(_0x12d851,_0x46ab54){_0x12d851=_0x12d851-0x1a7;const _0x2e0876=a93_0x2e08();let _0x6b9e42=_0x2e0876[_0x12d851];return _0x6b9e42;}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a93_0x32e95d(0x1b2)][a93_0x32e95d(0x1b8)]:PRODUCT_CONFIG['domains']['nonProduction']['api']);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains']['production'][a93_0x32e95d(0x1b0)]:PRODUCT_CONFIG[a93_0x32e95d(0x1b4)][a93_0x32e95d(0x1ba)]['runtime']);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a93_0x32e95d(0x1b2)]['skillhub']:PRODUCT_CONFIG[a93_0x32e95d(0x1b4)][a93_0x32e95d(0x1ba)][a93_0x32e95d(0x1ad)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a94_0x431d(){const _0x5e2a07=['588EjBsTz','12970xFtvyZ','375914ayYaDS','online','48SVrtzE','30228huccKg','daily','dev','3233007KtKrjx','production','4489397QfjvOX','182kGvveH','2227112OcXaef','15115CPSgrW','10UnJozo','development'];a94_0x431d=function(){return _0x5e2a07;};return a94_0x431d();}function a94_0x14f4(_0x98decf,_0x227d8f){_0x98decf=_0x98decf-0x180;const _0x431d68=a94_0x431d();let _0x14f4b0=_0x431d68[_0x98decf];return _0x14f4b0;}const a94_0x44f51c=a94_0x14f4;(function(_0x3b34f6,_0x3caa2a){const _0x4f67ea=a94_0x14f4,_0x230e12=_0x3b34f6();while(!![]){try{const _0x5c9a44=parseInt(_0x4f67ea(0x185))/0x1+parseInt(_0x4f67ea(0x184))/0x2*(-parseInt(_0x4f67ea(0x187))/0x3)+parseInt(_0x4f67ea(0x183))/0x4*(parseInt(_0x4f67ea(0x180))/0x5)+-parseInt(_0x4f67ea(0x188))/0x6*(parseInt(_0x4f67ea(0x18e))/0x7)+-parseInt(_0x4f67ea(0x18f))/0x8+parseInt(_0x4f67ea(0x18b))/0x9+parseInt(_0x4f67ea(0x181))/0xa*(-parseInt(_0x4f67ea(0x18d))/0xb);if(_0x5c9a44===_0x3caa2a)break;else _0x230e12['push'](_0x230e12['shift']());}catch(_0x403806){_0x230e12['push'](_0x230e12['shift']());}}}(a94_0x431d,0x3f0ce));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a94_0x44f51c(0x18c),a94_0x44f51c(0x182),a94_0x44f51c(0x189)];export function normalizeEnv(_0x1d33ba){const _0x424232=a94_0x44f51c;return _0x1d33ba===_0x424232(0x186)?'production':_0x1d33ba;}export function isProduction(_0x3604a1){const _0x2f4e54=a94_0x44f51c;return normalizeEnv(_0x3604a1)===_0x2f4e54(0x18c);}export function isDaily(_0x240345){return normalizeEnv(_0x240345)==='daily';}export function isDev(_0x5b32dd){const _0xbae70f=a94_0x44f51c,_0x1a9231=normalizeEnv(_0x5b32dd);return _0x1a9231==='development'||_0x1a9231===_0xbae70f(0x18a);}let env=normalizeEnv(productEnv('ENV')||a94_0x44f51c(0x18c));export function getEnv(){return env;}export function initEnv(_0x238b9e){env=normalizeEnv(_0x238b9e);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a95_0x54ccd8=a95_0x555c;(function(_0x54fb4a,_0x23c10f){const _0x448465=a95_0x555c,_0x36ea4f=_0x54fb4a();while(!![]){try{const _0x210391=-parseInt(_0x448465(0xf6))/0x1+parseInt(_0x448465(0xfb))/0x2+parseInt(_0x448465(0xf4))/0x3*(parseInt(_0x448465(0xf3))/0x4)+parseInt(_0x448465(0xf7))/0x5+parseInt(_0x448465(0xf9))/0x6+parseInt(_0x448465(0xfa))/0x7+parseInt(_0x448465(0xf5))/0x8;if(_0x210391===_0x23c10f)break;else _0x36ea4f['push'](_0x36ea4f['shift']());}catch(_0x2a16be){_0x36ea4f['push'](_0x36ea4f['shift']());}}}(a95_0x2799,0x8832d));function a95_0x555c(_0x223753,_0x5d2278){_0x223753=_0x223753-0xf3;const _0x27993f=a95_0x2799();let _0x555c67=_0x27993f[_0x223753];return _0x555c67;}function a95_0x2799(){const _0x49e5d3=['894198reQzxz','3480827aTwFEz','427722MRsjPi','4KaHMov','214005TTBxvR','244384oSQftL','567511iobpeI','816710zWyAuk','compress'];a95_0x2799=function(){return _0x49e5d3;};return a95_0x2799();}export const OUTPUT_FORMAT_VALUES=['json','pretty',a95_0x54ccd8(0xf8)];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a96_0x569b(_0x29694f,_0x4ca559){_0x29694f=_0x29694f-0x12e;const _0x5541a0=a96_0x5541();let _0x569bc6=_0x5541a0[_0x29694f];return _0x569bc6;}const a96_0x4b16d6=a96_0x569b;(function(_0x46571c,_0x13723c){const _0x45fe5c=a96_0x569b,_0x1dc495=_0x46571c();while(!![]){try{const _0x48f62d=parseInt(_0x45fe5c(0x130))/0x1*(-parseInt(_0x45fe5c(0x13b))/0x2)+parseInt(_0x45fe5c(0x13d))/0x3+parseInt(_0x45fe5c(0x13e))/0x4*(-parseInt(_0x45fe5c(0x146))/0x5)+parseInt(_0x45fe5c(0x131))/0x6+-parseInt(_0x45fe5c(0x12f))/0x7+-parseInt(_0x45fe5c(0x134))/0x8*(parseInt(_0x45fe5c(0x149))/0x9)+-parseInt(_0x45fe5c(0x137))/0xa*(-parseInt(_0x45fe5c(0x145))/0xb);if(_0x48f62d===_0x13723c)break;else _0x1dc495['push'](_0x1dc495['shift']());}catch(_0x7ed58b){_0x1dc495['push'](_0x1dc495['shift']());}}}(a96_0x5541,0x63193));export const PRODUCT_CONFIG={'cliBinName':a96_0x4b16d6(0x14d),'cliDisplayName':a96_0x4b16d6(0x148),'npmPackageName':a96_0x4b16d6(0x13a),'skillSource':a96_0x4b16d6(0x138),'internalSkillSource':'git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','globalSkillName':a96_0x4b16d6(0x14d),'npmRegistryBaseUrl':a96_0x4b16d6(0x143),'envPrefix':a96_0x4b16d6(0x144),'legacyEnvPrefixes':[a96_0x4b16d6(0x141)],'configFileNames':['.lovrabet.json',a96_0x4b16d6(0x132)],'newConfigFileName':a96_0x4b16d6(0x14a),'homeDirName':a96_0x4b16d6(0x136),'logFileName':a96_0x4b16d6(0x14c),'invokeSource':a96_0x4b16d6(0x14b),'userCenterDisplayName':a96_0x4b16d6(0x13c),'skipNpxSkillsEnvSuffix':a96_0x4b16d6(0x140),'domains':{'production':{'user':a96_0x4b16d6(0x142),'api':'https://api.lovrabet.com','runtime':'https://runtime.lovrabet.com','skillhub':a96_0x4b16d6(0x12e)},'nonProduction':{'user':a96_0x4b16d6(0x147),'api':a96_0x4b16d6(0x13f),'runtime':'https://daily-runtime.lovrabet.com','skillhub':a96_0x4b16d6(0x135)}},'accessKeyCreatePath':'/user/ak'};export function productEnvName(_0x470332){return PRODUCT_CONFIG['envPrefix']+'_'+_0x470332;}function a96_0x5541(){const _0x111924=['https://registry.npmjs.org','LOVRABET','3893802MllNOV','115lDvtJh','https://user-daily.lovrabet.com','Lovrabet\x20Runtime\x20CLI','348165PNGccu','.lovrabet.json','cli:lovrabet-runtime','.lovrabet-runtime.log','lovrabet','https://skills.lovrabet.com','931448vDlvIT','123699ZSypMo','2093502JIbUCz','.lovrabetrc','legacyEnvPrefixes','88vsywtL','https://skills-daily.lovrabet.com','.lovrabet','20Gjuywg','lovrabet/lovrabet-cli','map','@lovrabet/lovrabet-cli','6qXUhXy','Lovrabet\x20User\x20Center','1928574Xrbnit','63328EiMCwN','https://daily-api.lovrabet.com','SKIP_NPX_SKILLS','RABETBASE','https://user.lovrabet.com'];a96_0x5541=function(){return _0x111924;};return a96_0x5541();}export function productEnvNames(_0x4d2af4){const _0x53e031=a96_0x4b16d6;return[productEnvName(_0x4d2af4),...PRODUCT_CONFIG[_0x53e031(0x133)][_0x53e031(0x139)](_0x1bfea4=>_0x1bfea4+'_'+_0x4d2af4)];}export function productEnv(_0x263390){for(const _0x518971 of productEnvNames(_0x263390)){const _0x4a1d0c=process.env[_0x518971];if(_0x4a1d0c!==undefined)return _0x4a1d0c;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a97_0x1241(){const _0xeca1fa=['write','148337mIwTYr','92730XTxtiD','2614515gNzhRI','13836861ZKrtNB','2379764tFOfgW','849aaZZCV','read','1868376hNOWef','42BDbukW','974GELgJA'];a97_0x1241=function(){return _0xeca1fa;};return a97_0x1241();}function a97_0x3ec6(_0x5cc058,_0x394002){_0x5cc058=_0x5cc058-0x199;const _0x1241ac=a97_0x1241();let _0x3ec682=_0x1241ac[_0x5cc058];return _0x3ec682;}const a97_0x1e659c=a97_0x3ec6;(function(_0x4a70bd,_0xd030e0){const _0x4844ce=a97_0x3ec6,_0x5e4c5b=_0x4a70bd();while(!![]){try{const _0x5df0e2=-parseInt(_0x4844ce(0x1a1))/0x1+-parseInt(_0x4844ce(0x19e))/0x2*(-parseInt(_0x4844ce(0x19a))/0x3)+-parseInt(_0x4844ce(0x199))/0x4+-parseInt(_0x4844ce(0x1a2))/0x5+-parseInt(_0x4844ce(0x19d))/0x6*(-parseInt(_0x4844ce(0x1a0))/0x7)+-parseInt(_0x4844ce(0x19c))/0x8+parseInt(_0x4844ce(0x1a3))/0x9;if(_0x5df0e2===_0xd030e0)break;else _0x5e4c5b['push'](_0x5e4c5b['shift']());}catch(_0x2f986f){_0x5e4c5b['push'](_0x5e4c5b['shift']());}}}(a97_0x1241,0x5ca4a));export const RISK_LEVEL_VALUES=[a97_0x1e659c(0x19b),a97_0x1e659c(0x19f),'high-risk-write'];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a98_0x444c(){const _0x1557b2=['3256150aYqTFu','345IIznZE','126186YivBhT','2DajhcZ','3106740wINsmj','18820626gJKpeG','242773lVLfMc','3491432NwiEfi','9OMzVNc','domains','38524TBbjvi','371aYidjU'];a98_0x444c=function(){return _0x1557b2;};return a98_0x444c();}const a98_0x20aec4=a98_0xdfb3;function a98_0xdfb3(_0x5787b6,_0x43898e){_0x5787b6=_0x5787b6-0x180;const _0x444c9c=a98_0x444c();let _0xdfb3a7=_0x444c9c[_0x5787b6];return _0xdfb3a7;}(function(_0x456802,_0x41d58a){const _0x43202a=a98_0xdfb3,_0x4e1d2b=_0x456802();while(!![]){try{const _0x50c246=parseInt(_0x43202a(0x182))/0x1*(parseInt(_0x43202a(0x18b))/0x2)+parseInt(_0x43202a(0x189))/0x3*(parseInt(_0x43202a(0x186))/0x4)+parseInt(_0x43202a(0x180))/0x5+-parseInt(_0x43202a(0x18a))/0x6*(-parseInt(_0x43202a(0x187))/0x7)+-parseInt(_0x43202a(0x183))/0x8+-parseInt(_0x43202a(0x184))/0x9*(parseInt(_0x43202a(0x188))/0xa)+-parseInt(_0x43202a(0x181))/0xb;if(_0x50c246===_0x41d58a)break;else _0x4e1d2b['push'](_0x4e1d2b['shift']());}catch(_0xde0382){_0x4e1d2b['push'](_0x4e1d2b['shift']());}}}(a98_0x444c,0x95bc7));import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a98_0x20aec4(0x185)]['production']['user']+PRODUCT_CONFIG['accessKeyCreatePath'];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a79_0x11f887=a79_0x4aa0;(function(_0x5670ba,_0x1c97d7){const _0x260578=a79_0x4aa0,_0x465a3f=_0x5670ba();while(!![]){try{const _0x15f679=parseInt(_0x260578(0x12e))/0x1+parseInt(_0x260578(0x12d))/0x2*(parseInt(_0x260578(0x120))/0x3)+parseInt(_0x260578(0x12f))/0x4+-parseInt(_0x260578(0x107))/0x5*(parseInt(_0x260578(0x113))/0x6)+parseInt(_0x260578(0x10e))/0x7+-parseInt(_0x260578(0x138))/0x8+-parseInt(_0x260578(0x115))/0x9*(-parseInt(_0x260578(0x13d))/0xa);if(_0x15f679===_0x1c97d7)break;else _0x465a3f['push'](_0x465a3f['shift']());}catch(_0x5541f1){_0x465a3f['push'](_0x465a3f['shift']());}}}(a79_0x3f54,0x5be72));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_0x11f887(0xf9)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a79_0x11f887(0x12b)];function resolveConfigPath(_0x17e6a9){for(const _0x1afca5 of CONFIG_NAMES){const _0x37f8aa=resolve(_0x17e6a9,_0x1afca5);if(existsSync(_0x37f8aa))return _0x37f8aa;}return undefined;}export function resolveWriteConfigPath(_0x5952d2){const _0x432396=a79_0x11f887,_0xeb51a1=_0x5952d2===_0x432396(0x121)?process['cwd']():homedir(),_0x5dd11d=resolveConfigPath(_0xeb51a1);return _0x5dd11d??resolve(_0xeb51a1,NEW_CONFIG_NAME);}export function readConfigFile(_0x40b718){const _0x242507=a79_0x11f887;try{if(existsSync(_0x40b718)){const _0x11ce5b=readFileSync(_0x40b718,{'encoding':_0x242507(0xf4)});if(_0x11ce5b){const _0x3311bd=JSON['parse'](_0x11ce5b);return migrateOnlineEnv(_0x40b718,_0x3311bd),_0x3311bd;}}}catch{}return{};}function migrateOnlineEnv(_0x317d75,_0x3362f7){const _0x1cdb44=a79_0x11f887;let _0x5824b8=![];_0x3362f7['env']===_0x1cdb44(0x11d)&&(_0x3362f7[_0x1cdb44(0xec)]=_0x1cdb44(0x11b),_0x5824b8=!![]);if(_0x3362f7[_0x1cdb44(0x13f)]&&typeof _0x3362f7[_0x1cdb44(0x13f)]===_0x1cdb44(0xee))for(const _0x3ef813 of Object[_0x1cdb44(0x108)](_0x3362f7[_0x1cdb44(0x13f)])){_0x3ef813&&_0x3ef813[_0x1cdb44(0xec)]===_0x1cdb44(0x11d)&&(_0x3ef813[_0x1cdb44(0xec)]=_0x1cdb44(0x11b),_0x5824b8=!![]);}if(_0x5824b8)try{writeConfigFile(_0x317d75,_0x3362f7);}catch{}}export function writeConfigFile(_0x496c8e,_0x23389b){const _0x2cb762=a79_0x11f887,_0x5c7926=dirname(_0x496c8e);!existsSync(_0x5c7926)&&mkdirSync(_0x5c7926,{'recursive':!![]});const _0x238378=_0x496c8e+_0x2cb762(0x130);try{writeFileSync(_0x238378,JSON[_0x2cb762(0x10b)](_0x23389b,null,0x2)+'\x0a',{'encoding':_0x2cb762(0xf4),'mode':0x180});try{renameSync(_0x238378,_0x496c8e);}catch(_0x4bf306){if(_0x4bf306[_0x2cb762(0xf2)]===_0x2cb762(0x114)||_0x4bf306['code']===_0x2cb762(0x100)||_0x4bf306[_0x2cb762(0xf2)]===_0x2cb762(0x117)){writeFileSync(_0x496c8e,JSON['stringify'](_0x23389b,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x238378);}catch{}}else throw _0x4bf306;}}catch(_0x32194){try{unlinkSync(_0x238378);}catch{}throw _0x32194;}}export function isNonInteractiveMode(_0x566745){const _0x143838=a79_0x11f887;return!!(_0x566745[_0x143838(0x104)]||_0x566745['ci']||productEnvNames('CI')[_0x143838(0x123)](_0x1c62d7=>process.env[_0x1c62d7]===_0x143838(0xf7))||process.env.CI==='true'||!process[_0x143838(0x129)][_0x143838(0x11c)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x21930a=a79_0x11f887;if(!process['stdin']['isTTY'])return![];try{const _0x3e1966=process['stdin'][_0x21930a(0xfa)];return process['stdin'][_0x21930a(0x122)](!![]),process[_0x21930a(0x128)]['setRawMode'](_0x3e1966??![]),!![];}catch{return![];}}export async function createContext(_0x539f21){const _0x234d73=a79_0x11f887,_0x1a0804=readRawConfig(),_0x2ac2a7=buildConfig(_0x1a0804,_0x539f21);await initGlobalEnvironment(_0x2ac2a7);const {getUserDomain:_0x1c7dc2,getApiDomain:_0x5e23e7}=await import(_0x234d73(0x132)),_0xa4e69e={'apiDomain':_0x5e23e7(),'userDomain':_0x1c7dc2()},_0x43379c=await buildAuth(_0x2ac2a7);logger[_0x234d73(0xf5)](process[_0x234d73(0x116)]());const _0x3413af=(CLI_BIN_NAME+'\x20'+process[_0x234d73(0x112)][_0x234d73(0xef)](0x2)[_0x234d73(0x13a)]('\x20'))['trim']();logger[_0x234d73(0xfb)](_0x3413af);const _0x3ba585=isNonInteractiveMode(_0x539f21);return{'config':_0x2ac2a7,'auth':_0x43379c,'logger':logger,'env':_0xa4e69e,'nonInteractive':_0x3ba585};}export function buildConfigFromFlags(_0x2b0626){return buildConfig(readRawConfig(),_0x2b0626);}export function getLocalAppAliases(_0x236961){const _0x51a676=a79_0x11f887;return _0x236961[_0x51a676(0x13f)]&&typeof _0x236961['apps']===_0x51a676(0xee)?_0x236961[_0x51a676(0x13f)]:{};}export function resolveLocalAppAliasCode(_0x149d39,_0x22c41e){const _0x56da61=a79_0x11f887;if(!_0x22c41e)return undefined;const _0x598413=getLocalAppAliases(_0x149d39)[_0x22c41e],_0x443227=_0x598413?.[_0x56da61(0x13e)];return typeof _0x443227===_0x56da61(0x102)&&_0x443227[_0x56da61(0xf1)]()?_0x443227[_0x56da61(0xf1)]():undefined;}export function readAppCodeFromConfig(){const _0x57cb66=a79_0x11f887,_0x3a6be3=readRawConfig(),_0x33c8bc=_0x3a6be3['appcode']??_0x3a6be3[_0x57cb66(0x11e)];if(typeof _0x33c8bc===_0x57cb66(0x102)&&_0x33c8bc[_0x57cb66(0xf1)]())return _0x33c8bc[_0x57cb66(0xf1)]();const _0x1fa701=resolveLocalAppAliasCode(_0x3a6be3,typeof _0x3a6be3[_0x57cb66(0x137)]===_0x57cb66(0x102)?_0x3a6be3[_0x57cb66(0x137)]:undefined);if(_0x1fa701)return _0x1fa701;const _0x414fbb=normalizeEnv(String(_0x3a6be3[_0x57cb66(0xec)]||_0x57cb66(0x11b))),_0x37a2cf=isDaily(_0x414fbb)?_0x57cb66(0xfc):isDev(_0x414fbb)?_0x57cb66(0x133):_0x57cb66(0x11b),_0x35cb8f=resolveCachedAppCode(typeof _0x3a6be3[_0x57cb66(0x137)]==='string'?_0x3a6be3[_0x57cb66(0x137)]:undefined,_0x37a2cf,typeof _0x3a6be3['accessKey']===_0x57cb66(0x102)?_0x3a6be3['accessKey']:undefined);if(_0x35cb8f)return _0x35cb8f;const _0x527774=Object[_0x57cb66(0x108)](getLocalAppAliases(_0x3a6be3))[_0x57cb66(0x11f)](_0x3e431d=>_0x3e431d?.[_0x57cb66(0x13e)]);return typeof _0x527774?.['appcode']===_0x57cb66(0x102)&&_0x527774['appcode']['trim']()?_0x527774[_0x57cb66(0x13e)][_0x57cb66(0xf1)]():undefined;}export function readScopedConfig(_0x474715){const _0x446295=a79_0x11f887,_0x3543c3=_0x474715['global']?'global':_0x446295(0x121);return readConfigFile(resolveWriteConfigPath(_0x3543c3));}export function writeScopedConfig(_0x30623f,_0x484b34){const _0x4b7d50=a79_0x11f887,_0xa47a5a=_0x484b34[_0x4b7d50(0x131)]?'global':_0x4b7d50(0x121);writeConfigFile(resolveWriteConfigPath(_0xa47a5a),_0x30623f);}export async function initGlobalEnvironment(_0x8d0894){const _0x9490b2=a79_0x11f887,{initEnv:_0x108e97}=await import(_0x9490b2(0x110));_0x108e97(_0x8d0894['env']);const {initDomains:_0x174826}=await import(_0x9490b2(0x132));_0x174826({'apiDomain':_0x8d0894[_0x9490b2(0xf0)][_0x9490b2(0x12c)]||_0x8d0894[_0x9490b2(0xf0)][_0x9490b2(0x101)]||undefined,'userDomain':_0x8d0894[_0x9490b2(0xf0)][_0x9490b2(0x10d)]||undefined,'runtimeDomain':_0x8d0894[_0x9490b2(0xf0)][_0x9490b2(0x13c)]||undefined,'skillHubDomain':_0x8d0894[_0x9490b2(0xf0)][_0x9490b2(0x119)]||undefined});}export function getProjectConfigPath(){const _0x47138f=a79_0x11f887;return resolveConfigPath(process[_0x47138f(0x116)]());}function a79_0x3f54(){const _0x35a596=['host','string','cache','nonInteractive','high-risk-write','projectConfig','5ZDuSPc','values','APPCODE','local-alias','stringify','write','userDomain','475419TQBDrd','inherit','./constant/env.js','missing','argv','3920034hvoyNC','EPERM','2029257aKixDi','cwd','EACCES','explicit','skillHubDomain','riskLevel','production','isTTY','online','app','find','273IIabju','project','setRawMode','some','empty','pageSize','FORMAT','error','stdin','stdout','format','newConfigFileName','apiDomain','5872fmfJWg','716686mbeINq','131528yGrFBc','.tmp','global','./constant/domain.js','development','ACCESS_KEY','VERBOSE','globalConfig','defaultApp','5850456Stcovo','read','join','authRequired','runtimeDomain','30IxJOtf','appcode','apps','env','top-level','object','slice','raw','trim','code','locale','utf8','setLogPath','APP','true','ENV','configFileNames','isRaw','setRawCommand','daily','parse','maxRisk','accessKey','EXDEV'];a79_0x3f54=function(){return _0x35a596;};return a79_0x3f54();}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x555909){const _0x20c521=a79_0x11f887;if(!existsSync(_0x555909))return{'status':_0x20c521(0x111)};try{const _0x434be1=readFileSync(_0x555909,{'encoding':_0x20c521(0xf4)});if(!_0x434be1?.[_0x20c521(0xf1)]())return{'status':_0x20c521(0x124)};const _0x3473c0=JSON['parse'](_0x434be1);return{'status':'ok','data':_0x3473c0};}catch(_0x6fa035){return{'status':_0x20c521(0x127),'message':_0x6fa035 instanceof Error?_0x6fa035['message']:String(_0x6fa035)};}}export function loadRawConfigLayers(_0x3e15a8){const _0x3ccf09=a79_0x11f887;let _0x5a3fb8={},_0x62f01d={},_0x41ecfe,_0x133532;try{_0x41ecfe=resolveConfigPath(homedir());if(_0x41ecfe){const _0x5b1a7e=readFileSync(_0x41ecfe,{'encoding':_0x3ccf09(0xf4)});if(_0x5b1a7e)_0x5a3fb8=JSON[_0x3ccf09(0xfd)](_0x5b1a7e);}}catch{}try{const _0x55a82a=_0x3e15a8||process[_0x3ccf09(0x116)]();_0x133532=resolveConfigPath(_0x55a82a);if(_0x133532){const _0x107478=readFileSync(_0x133532,{'encoding':_0x3ccf09(0xf4)});if(_0x107478)_0x62f01d=JSON[_0x3ccf09(0xfd)](_0x107478);}}catch{}return{'globalPath':_0x41ecfe,'projectPath':_0x133532,'globalConfig':_0x5a3fb8,'projectConfig':_0x62f01d};}function mergeRawConfigLayers(_0x558c63){const _0x1957bf=a79_0x11f887,{globalConfig:_0x4f8d82,projectConfig:_0x594db4}=_0x558c63;if(_0x594db4['inherit']===![]){const _0x45aa80={..._0x594db4};return delete _0x45aa80[_0x1957bf(0x10f)],_0x45aa80;}const _0x2ae900={..._0x4f8d82,..._0x594db4};if('defaultApp'in _0x594db4)_0x2ae900[_0x1957bf(0x137)]=_0x594db4[_0x1957bf(0x137)];else _0x4f8d82['defaultApp']&&(_0x2ae900[_0x1957bf(0x137)]=_0x4f8d82[_0x1957bf(0x137)]);return _0x2ae900;}function a79_0x4aa0(_0x1c86ad,_0x4bf233){_0x1c86ad=_0x1c86ad-0xec;const _0x3f5498=a79_0x3f54();let _0x4aa08e=_0x3f5498[_0x1c86ad];return _0x4aa08e;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x5d587d){return mergeRawConfigLayers(loadRawConfigLayers(_0x5d587d));}export function readRawConfigWithLayers(_0x24ec4c){const _0xc6cb9f=loadRawConfigLayers(_0x24ec4c);return{'config':mergeRawConfigLayers(_0xc6cb9f),'layers':_0xc6cb9f};}export function resolveDefaultAppSource(_0x3dc86d){const _0x9a8013=a79_0x11f887;if('defaultApp'in _0x3dc86d[_0x9a8013(0x106)])return _0x9a8013(0x121);if(_0x3dc86d[_0x9a8013(0x106)]['inherit']===![])return null;if(_0x3dc86d[_0x9a8013(0x136)][_0x9a8013(0x137)])return _0x9a8013(0x131);return null;}function buildConfig(_0x1b989c,_0xff6252){const _0x390f65=a79_0x11f887,_0xd17d05=_0x1b989c[_0x390f65(0x137)]||undefined,_0x109df8=_0xff6252[_0x390f65(0x11e)]||env(_0x390f65(0xf6))||undefined,_0x59b73e=_0x109df8||_0xd17d05||undefined,_0xe51747=env(_0x390f65(0x134))||_0x1b989c[_0x390f65(0xff)]||undefined,_0x3becb3=_0xff6252[_0x390f65(0xec)]||env(_0x390f65(0xf8))||_0x1b989c['env']||DEFAULT_CONFIG_VALUES[_0x390f65(0xec)],_0x13bf01=normalizeEnv(String(_0x3becb3)),_0x28c6b2=isDaily(_0x13bf01)?'daily':isDev(_0x13bf01)?_0x390f65(0x133):_0x390f65(0x11b),_0x4113db=typeof _0xff6252[_0x390f65(0x13e)]===_0x390f65(0x102)?_0xff6252['appcode']:undefined,_0x2e1509=env(_0x390f65(0x109)),_0x4fcfa1=_0x109df8?undefined:_0x1b989c[_0x390f65(0x13e)]||_0x1b989c[_0x390f65(0x11e)]||undefined,_0x48cf6b=_0x109df8||(_0x4fcfa1?undefined:_0xd17d05),_0x4d656b=resolveLocalAppAliasCode(_0x1b989c,_0x48cf6b),_0x17ad15=resolveCachedAppCode(_0x48cf6b,_0x28c6b2,_0xe51747),_0x16f603=_0x4113db||_0x2e1509||_0x4fcfa1||_0x4d656b||_0x17ad15||undefined,_0x3a16f9=_0x4113db?_0x390f65(0x118):_0x2e1509?_0x390f65(0xec):_0x4fcfa1?_0x390f65(0xed):_0x4d656b?_0x390f65(0x10a):_0x17ad15?_0x390f65(0x103):undefined,_0x5dad56=_0x1b989c[_0x390f65(0xf3)]||DEFAULT_CONFIG_VALUES['locale'],_0x2198e9=undefined,_0x19f307=_0xff6252['format']||env(_0x390f65(0x126))||_0x1b989c[_0x390f65(0x12a)],_0x434d23=normalizeLegacyOutputFormat(_0x19f307),_0x327185=env('PAGE_SIZE')||_0x1b989c[_0x390f65(0x125)],_0x194b60=_0x327185?Number(_0x327185)||undefined:undefined,_0x13bb68=_0x1b989c['riskLevel']||_0x1b989c[_0x390f65(0xfe)],_0x2a2097=_0x13bb68===_0x390f65(0x139)||_0x13bb68===_0x390f65(0x10c)||_0x13bb68===_0x390f65(0x105)?_0x13bb68:DEFAULT_CONFIG_VALUES[_0x390f65(0x11a)],_0x1b61f0=env(_0x390f65(0x135)),_0xda7c42=_0x1b61f0==='1'||_0x1b61f0===_0x390f65(0xf7);return{'appCode':typeof _0x16f603===_0x390f65(0x102)&&_0x16f603[_0x390f65(0xf1)]()?_0x16f603[_0x390f65(0xf1)]():undefined,'appCodeSource':_0x3a16f9,'env':_0x28c6b2,'locale':_0x5dad56,'cookie':_0x2198e9,'accessKey':_0xe51747,'format':_0x434d23,'pageSize':_0x194b60,'riskLevel':_0x2a2097,'verbose':_0xda7c42,'defaultApp':_0xd17d05,'currentApp':typeof _0x59b73e===_0x390f65(0x102)?_0x59b73e:undefined,'raw':_0x1b989c};}function env(_0x47e180){return productEnv(_0x47e180);}async function buildAuth(_0x27faae){const _0x4a2523=a79_0x11f887,_0x1e7e7e='',_0xeae0fc=!!_0x27faae[_0x4a2523(0xff)];return{'cookie':_0x1e7e7e,'isLoggedIn':_0xeae0fc,async 'getOrLogin'(){const _0x4f9f49=_0x4a2523;if(_0xeae0fc)return _0x1e7e7e;throw CliErrors[_0x4f9f49(0x13b)]();}};}
|
|
1
|
+
const a99_0x39be67=a99_0x4ac8;(function(_0x350b25,_0x472f1d){const _0x37f51b=a99_0x4ac8,_0xa1245c=_0x350b25();while(!![]){try{const _0x2e9fc1=parseInt(_0x37f51b(0x117))/0x1+-parseInt(_0x37f51b(0x14b))/0x2+parseInt(_0x37f51b(0x133))/0x3*(parseInt(_0x37f51b(0x122))/0x4)+parseInt(_0x37f51b(0x152))/0x5*(-parseInt(_0x37f51b(0x14a))/0x6)+-parseInt(_0x37f51b(0x120))/0x7+parseInt(_0x37f51b(0x128))/0x8+-parseInt(_0x37f51b(0x13f))/0x9*(-parseInt(_0x37f51b(0x132))/0xa);if(_0x2e9fc1===_0x472f1d)break;else _0xa1245c['push'](_0xa1245c['shift']());}catch(_0x11fc89){_0xa1245c['push'](_0xa1245c['shift']());}}}(a99_0x1e52,0xa10f3));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[a99_0x39be67(0x10e)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a99_0x39be67(0x119)];function resolveConfigPath(_0x3716f1){for(const _0x3d24d8 of CONFIG_NAMES){const _0x30f1cf=resolve(_0x3716f1,_0x3d24d8);if(existsSync(_0x30f1cf))return _0x30f1cf;}return undefined;}export function resolveWriteConfigPath(_0x4cd3be){const _0x39a317=a99_0x39be67,_0x4715bb=_0x4cd3be===_0x39a317(0x149)?process[_0x39a317(0x146)]():homedir(),_0x1227f6=resolveConfigPath(_0x4715bb);return _0x1227f6??resolve(_0x4715bb,NEW_CONFIG_NAME);}export function readConfigFile(_0x10533a){const _0xc8fad0=a99_0x39be67;try{if(existsSync(_0x10533a)){const _0x26bb46=readFileSync(_0x10533a,{'encoding':_0xc8fad0(0x125)});if(_0x26bb46){const _0x3767e4=JSON[_0xc8fad0(0x111)](_0x26bb46);return migrateOnlineEnv(_0x10533a,_0x3767e4),_0x3767e4;}}}catch{}return{};}function migrateOnlineEnv(_0x21982f,_0xc2bc44){const _0x4743ad=a99_0x39be67;let _0x5e75e6=![];_0xc2bc44[_0x4743ad(0x124)]==='online'&&(_0xc2bc44[_0x4743ad(0x124)]=_0x4743ad(0x10d),_0x5e75e6=!![]);if(_0xc2bc44[_0x4743ad(0x13a)]&&typeof _0xc2bc44['apps']===_0x4743ad(0x13c))for(const _0x5e8a00 of Object[_0x4743ad(0x141)](_0xc2bc44['apps'])){_0x5e8a00&&_0x5e8a00[_0x4743ad(0x124)]===_0x4743ad(0x143)&&(_0x5e8a00[_0x4743ad(0x124)]=_0x4743ad(0x10d),_0x5e75e6=!![]);}if(_0x5e75e6)try{writeConfigFile(_0x21982f,_0xc2bc44);}catch{}}export function writeConfigFile(_0x48af1e,_0x2e0058){const _0x12fa98=a99_0x39be67,_0x88d2bb=dirname(_0x48af1e);!existsSync(_0x88d2bb)&&mkdirSync(_0x88d2bb,{'recursive':!![]});const _0x269a7e=_0x48af1e+_0x12fa98(0x130);try{writeFileSync(_0x269a7e,JSON[_0x12fa98(0x10b)](_0x2e0058,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x269a7e,_0x48af1e);}catch(_0x5c0bf7){if(_0x5c0bf7['code']==='EPERM'||_0x5c0bf7[_0x12fa98(0x11b)]===_0x12fa98(0x142)||_0x5c0bf7[_0x12fa98(0x11b)]===_0x12fa98(0x10f)){writeFileSync(_0x48af1e,JSON[_0x12fa98(0x10b)](_0x2e0058,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x269a7e);}catch{}}else throw _0x5c0bf7;}}catch(_0x494f98){try{unlinkSync(_0x269a7e);}catch{}throw _0x494f98;}}export function isNonInteractiveMode(_0x4d7ccb){const _0x3398aa=a99_0x39be67;return!!(_0x4d7ccb['nonInteractive']||_0x4d7ccb['ci']||productEnvNames('CI')['some'](_0xf21ffb=>process.env[_0xf21ffb]===_0x3398aa(0x129))||process.env.CI===_0x3398aa(0x129)||!process[_0x3398aa(0x11f)][_0x3398aa(0x131)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x2ae935=a99_0x39be67;if(!process[_0x2ae935(0x114)]['isTTY'])return![];try{const _0x38593d=process['stdin'][_0x2ae935(0x118)];return process[_0x2ae935(0x114)][_0x2ae935(0x115)](!![]),process[_0x2ae935(0x114)][_0x2ae935(0x115)](_0x38593d??![]),!![];}catch{return![];}}export async function createContext(_0xbeac96){const _0x254e1a=a99_0x39be67,_0x4b0dbb=readRawConfig(),_0x46f419=buildConfig(_0x4b0dbb,_0xbeac96);await initGlobalEnvironment(_0x46f419);const {getUserDomain:_0x11b26b,getApiDomain:_0x345e2c}=await import('./constant/domain.js'),_0x15dfa1={'apiDomain':_0x345e2c(),'userDomain':_0x11b26b()},_0x169d40=await buildAuth(_0x46f419);logger[_0x254e1a(0x13b)](process[_0x254e1a(0x146)]());const _0x585917=(CLI_BIN_NAME+'\x20'+process[_0x254e1a(0x134)][_0x254e1a(0x10c)](0x2)['join']('\x20'))[_0x254e1a(0x151)]();logger[_0x254e1a(0x14f)](_0x585917);const _0x5b596b=isNonInteractiveMode(_0xbeac96);return{'config':_0x46f419,'auth':_0x169d40,'logger':logger,'env':_0x15dfa1,'nonInteractive':_0x5b596b};}export function buildConfigFromFlags(_0x4cabd2){return buildConfig(readRawConfig(),_0x4cabd2);}export function getLocalAppAliases(_0x56208c){const _0x471b4a=a99_0x39be67;return _0x56208c[_0x471b4a(0x13a)]&&typeof _0x56208c[_0x471b4a(0x13a)]===_0x471b4a(0x13c)?_0x56208c['apps']:{};}export function resolveLocalAppAliasCode(_0x4ad5da,_0x26646f){const _0xb00b4a=a99_0x39be67;if(!_0x26646f)return undefined;const _0x3d40f1=getLocalAppAliases(_0x4ad5da)[_0x26646f],_0x69dd99=_0x3d40f1?.[_0xb00b4a(0x116)];return typeof _0x69dd99===_0xb00b4a(0x150)&&_0x69dd99[_0xb00b4a(0x151)]()?_0x69dd99['trim']():undefined;}export function readAppCodeFromConfig(){const _0x3021d0=a99_0x39be67,_0x31fd63=readRawConfig(),_0x2e237b=_0x31fd63[_0x3021d0(0x116)]??_0x31fd63['app'];if(typeof _0x2e237b===_0x3021d0(0x150)&&_0x2e237b[_0x3021d0(0x151)]())return _0x2e237b['trim']();const _0x39879c=resolveLocalAppAliasCode(_0x31fd63,typeof _0x31fd63['defaultApp']===_0x3021d0(0x150)?_0x31fd63[_0x3021d0(0x11a)]:undefined);if(_0x39879c)return _0x39879c;const _0x46e506=normalizeEnv(String(_0x31fd63[_0x3021d0(0x124)]||'production')),_0x2a5610=isDaily(_0x46e506)?_0x3021d0(0x140):isDev(_0x46e506)?_0x3021d0(0x12b):_0x3021d0(0x10d),_0x4ab86f=resolveCachedAppCode(typeof _0x31fd63[_0x3021d0(0x11a)]==='string'?_0x31fd63['defaultApp']:undefined,_0x2a5610,typeof _0x31fd63[_0x3021d0(0x138)]==='string'?_0x31fd63['accessKey']:undefined);if(_0x4ab86f)return _0x4ab86f;const _0x3fb5c9=Object[_0x3021d0(0x141)](getLocalAppAliases(_0x31fd63))[_0x3021d0(0x153)](_0x3e9106=>_0x3e9106?.[_0x3021d0(0x116)]);return typeof _0x3fb5c9?.['appcode']===_0x3021d0(0x150)&&_0x3fb5c9[_0x3021d0(0x116)][_0x3021d0(0x151)]()?_0x3fb5c9[_0x3021d0(0x116)][_0x3021d0(0x151)]():undefined;}export function readScopedConfig(_0x367d34){const _0x5635aa=a99_0x39be67,_0x23aeed=_0x367d34[_0x5635aa(0x12f)]?_0x5635aa(0x12f):_0x5635aa(0x149);return readConfigFile(resolveWriteConfigPath(_0x23aeed));}export function writeScopedConfig(_0x4192ca,_0x2967ff){const _0x581a39=a99_0x39be67,_0x30b4d7=_0x2967ff[_0x581a39(0x12f)]?_0x581a39(0x12f):_0x581a39(0x149);writeConfigFile(resolveWriteConfigPath(_0x30b4d7),_0x4192ca);}export async function initGlobalEnvironment(_0x104262){const _0x1f04dd=a99_0x39be67,{initEnv:_0x58d5f5}=await import('./constant/env.js');_0x58d5f5(_0x104262[_0x1f04dd(0x124)]);const {initDomains:_0x31e93d}=await import('./constant/domain.js');_0x31e93d({'apiDomain':_0x104262[_0x1f04dd(0x145)][_0x1f04dd(0x112)]||_0x104262[_0x1f04dd(0x145)][_0x1f04dd(0x13e)]||undefined,'userDomain':_0x104262[_0x1f04dd(0x145)][_0x1f04dd(0x147)]||undefined,'runtimeDomain':_0x104262[_0x1f04dd(0x145)][_0x1f04dd(0x136)]||undefined,'skillHubDomain':_0x104262['raw']['skillHubDomain']||undefined});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x195326){const _0x1a9d08=a99_0x39be67;if(!existsSync(_0x195326))return{'status':'missing'};try{const _0x115a06=readFileSync(_0x195326,{'encoding':_0x1a9d08(0x125)});if(!_0x115a06?.[_0x1a9d08(0x151)]())return{'status':_0x1a9d08(0x11e)};const _0x4407ad=JSON['parse'](_0x115a06);return{'status':'ok','data':_0x4407ad};}catch(_0x5d6d92){return{'status':_0x1a9d08(0x14d),'message':_0x5d6d92 instanceof Error?_0x5d6d92[_0x1a9d08(0x11d)]:String(_0x5d6d92)};}}export function loadRawConfigLayers(_0x44eea0){const _0x338a2e=a99_0x39be67;let _0x567641={},_0xd5d547={},_0x578327,_0x5ae9a6;try{_0x578327=resolveConfigPath(homedir());if(_0x578327){const _0x5003f1=readFileSync(_0x578327,{'encoding':_0x338a2e(0x125)});if(_0x5003f1)_0x567641=JSON[_0x338a2e(0x111)](_0x5003f1);}}catch{}try{const _0x191d66=_0x44eea0||process[_0x338a2e(0x146)]();_0x5ae9a6=resolveConfigPath(_0x191d66);if(_0x5ae9a6){const _0x141489=readFileSync(_0x5ae9a6,{'encoding':'utf8'});if(_0x141489)_0xd5d547=JSON[_0x338a2e(0x111)](_0x141489);}}catch{}return{'globalPath':_0x578327,'projectPath':_0x5ae9a6,'globalConfig':_0x567641,'projectConfig':_0xd5d547};}function a99_0x4ac8(_0x28b5c7,_0x185f0b){_0x28b5c7=_0x28b5c7-0x10b;const _0x1e522a=a99_0x1e52();let _0x4ac845=_0x1e522a[_0x28b5c7];return _0x4ac845;}function mergeRawConfigLayers(_0x26b82d){const _0x5b515c=a99_0x39be67,{globalConfig:_0x1c2c6c,projectConfig:_0x566bf1}=_0x26b82d;if(_0x566bf1[_0x5b515c(0x113)]===![]){const _0xe4618b={..._0x566bf1};return delete _0xe4618b[_0x5b515c(0x113)],_0xe4618b;}const _0x175011={..._0x1c2c6c,..._0x566bf1};if(_0x5b515c(0x11a)in _0x566bf1)_0x175011[_0x5b515c(0x11a)]=_0x566bf1['defaultApp'];else _0x1c2c6c[_0x5b515c(0x11a)]&&(_0x175011[_0x5b515c(0x11a)]=_0x1c2c6c[_0x5b515c(0x11a)]);return _0x175011;}function a99_0x1e52(){const _0xa45f45=['6350IKMlkO','6lGzsFP','argv','ACCESS_KEY','runtimeDomain','locale','accessKey','APPCODE','apps','setLogPath','object','pageSize','host','18477tfBsDD','daily','values','EXDEV','online','explicit','raw','cwd','userDomain','riskLevel','project','162NnTOQk','2071804abyMJu','format','error','ENV','setRawCommand','string','trim','15550HhLeEE','find','local-alias','top-level','stringify','slice','production','configFileNames','EACCES','projectConfig','parse','apiDomain','inherit','stdin','setRawMode','appcode','64182OZgRvy','isRaw','newConfigFileName','defaultApp','code','VERBOSE','message','empty','stdout','5286043DNMmQU','high-risk-write','432248pKejdV','globalConfig','env','utf8','maxRisk','app','7606072YelgGl','true','PAGE_SIZE','development','FORMAT','read','authRequired','global','.tmp','isTTY'];a99_0x1e52=function(){return _0xa45f45;};return a99_0x1e52();}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0xe613db){return mergeRawConfigLayers(loadRawConfigLayers(_0xe613db));}export function readRawConfigWithLayers(_0x34d1ba){const _0x1e9c78=loadRawConfigLayers(_0x34d1ba);return{'config':mergeRawConfigLayers(_0x1e9c78),'layers':_0x1e9c78};}export function resolveDefaultAppSource(_0x277fe9){const _0xa25cbb=a99_0x39be67;if(_0xa25cbb(0x11a)in _0x277fe9[_0xa25cbb(0x110)])return'project';if(_0x277fe9['projectConfig']['inherit']===![])return null;if(_0x277fe9[_0xa25cbb(0x123)]['defaultApp'])return _0xa25cbb(0x12f);return null;}function buildConfig(_0x9e7c11,_0x141b8c){const _0x1b1567=a99_0x39be67,_0xbb61d7=_0x9e7c11[_0x1b1567(0x11a)]||undefined,_0x440af0=_0x141b8c[_0x1b1567(0x127)]||env('APP')||undefined,_0x48546d=_0x440af0||_0xbb61d7||undefined,_0x26dbf1=env(_0x1b1567(0x135))||_0x9e7c11['accessKey']||undefined,_0x34ed0f=_0x141b8c[_0x1b1567(0x124)]||env(_0x1b1567(0x14e))||_0x9e7c11['env']||DEFAULT_CONFIG_VALUES[_0x1b1567(0x124)],_0x3d3ee9=normalizeEnv(String(_0x34ed0f)),_0x17dd69=isDaily(_0x3d3ee9)?_0x1b1567(0x140):isDev(_0x3d3ee9)?_0x1b1567(0x12b):'production',_0x1dbe6b=typeof _0x141b8c[_0x1b1567(0x116)]===_0x1b1567(0x150)?_0x141b8c[_0x1b1567(0x116)]:undefined,_0x1defd3=env(_0x1b1567(0x139)),_0x11e258=_0x440af0?undefined:_0x9e7c11[_0x1b1567(0x116)]||_0x9e7c11[_0x1b1567(0x127)]||undefined,_0x5e24a6=_0x440af0||(_0x11e258?undefined:_0xbb61d7),_0x32c524=resolveLocalAppAliasCode(_0x9e7c11,_0x5e24a6),_0x320759=resolveCachedAppCode(_0x5e24a6,_0x17dd69,_0x26dbf1),_0x44756c=_0x1dbe6b||_0x1defd3||_0x11e258||_0x32c524||_0x320759||undefined,_0x38e3ff=_0x1dbe6b?_0x1b1567(0x144):_0x1defd3?_0x1b1567(0x124):_0x11e258?_0x1b1567(0x155):_0x32c524?_0x1b1567(0x154):_0x320759?'cache':undefined,_0x30351b=_0x9e7c11['locale']||DEFAULT_CONFIG_VALUES[_0x1b1567(0x137)],_0xd345cf=undefined,_0x2d0bdf=_0x141b8c['format']||env(_0x1b1567(0x12c))||_0x9e7c11[_0x1b1567(0x14c)],_0x1130f6=normalizeLegacyOutputFormat(_0x2d0bdf),_0x460907=env(_0x1b1567(0x12a))||_0x9e7c11[_0x1b1567(0x13d)],_0x251f11=_0x460907?Number(_0x460907)||undefined:undefined,_0x43342e=_0x9e7c11[_0x1b1567(0x148)]||_0x9e7c11[_0x1b1567(0x126)],_0x48c25b=_0x43342e===_0x1b1567(0x12d)||_0x43342e==='write'||_0x43342e===_0x1b1567(0x121)?_0x43342e:DEFAULT_CONFIG_VALUES['riskLevel'],_0x3f2d35=env(_0x1b1567(0x11c)),_0x5dd572=_0x3f2d35==='1'||_0x3f2d35===_0x1b1567(0x129);return{'appCode':typeof _0x44756c===_0x1b1567(0x150)&&_0x44756c[_0x1b1567(0x151)]()?_0x44756c['trim']():undefined,'appCodeSource':_0x38e3ff,'env':_0x17dd69,'locale':_0x30351b,'cookie':_0xd345cf,'accessKey':_0x26dbf1,'format':_0x1130f6,'pageSize':_0x251f11,'riskLevel':_0x48c25b,'verbose':_0x5dd572,'defaultApp':_0xbb61d7,'currentApp':typeof _0x48546d===_0x1b1567(0x150)?_0x48546d:undefined,'raw':_0x9e7c11};}function env(_0x435970){return productEnv(_0x435970);}async function buildAuth(_0x442c03){const _0x419b3e='',_0x2d7c6d=!!_0x442c03['accessKey'];return{'cookie':_0x419b3e,'isLoggedIn':_0x2d7c6d,async 'getOrLogin'(){const _0x85ed6d=a99_0x4ac8;if(_0x2d7c6d)return _0x419b3e;throw CliErrors[_0x85ed6d(0x12e)]();}};}
|
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>;
|