@lovrabet/lovrabet-cli 2.2.3 → 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
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a89_0x4f9c4d=a89_0x4ca8;function a89_0x4ca8(_0x4a43e0,_0x1d278e){_0x4a43e0=_0x4a43e0-0x84;const _0x2a95a9=a89_0x2a95();let _0x4ca84e=_0x2a95a9[_0x4a43e0];return _0x4ca84e;}(function(_0x33ed4a,_0x40edbe){const _0x26ce01=a89_0x4ca8,_0x35264f=_0x33ed4a();while(!![]){try{const _0x7e511f=-parseInt(_0x26ce01(0x8d))/0x1*(parseInt(_0x26ce01(0x84))/0x2)+-parseInt(_0x26ce01(0x89))/0x3+parseInt(_0x26ce01(0x88))/0x4*(-parseInt(_0x26ce01(0x8b))/0x5)+parseInt(_0x26ce01(0x86))/0x6*(parseInt(_0x26ce01(0x8e))/0x7)+-parseInt(_0x26ce01(0x87))/0x8+parseInt(_0x26ce01(0x85))/0x9+parseInt(_0x26ce01(0x8c))/0xa;if(_0x7e511f===_0x40edbe)break;else _0x35264f['push'](_0x35264f['shift']());}catch(_0x3c2b4a){_0x35264f['push'](_0x35264f['shift']());}}}(a89_0x2a95,0x5e098));function a89_0x2a95(){const _0x4bf143=['3366925JhPRcQ','19971700RwWfCb','329UpvEEE','1735251LwInIN','3172HDmWFK','1833147cnaTDE','12YxoRIG','4100968luITkJ','4oJZEEX','1810989VWxwZK','client-ak'];a89_0x2a95=function(){return _0x4bf143;};return a89_0x2a95();}export const AUTH_MODE={'ClientAk':a89_0x4f9c4d(0x8a)};export function isAuthMode(_0x179e08){return _0x179e08===AUTH_MODE['ClientAk'];}
|
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
|
-
const
|
|
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
|
-
function
|
|
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
|
-
|
|
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_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_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>;
|