@lovrabet/rabetbase-cli 2.3.2-beta.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.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/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.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/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.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/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a0_0x5c38e0=a0_0x442f;function a0_0x442f(_0x5045b7,_0x3ceb08){_0x5045b7=_0x5045b7-0xe0;const _0x10bf38=a0_0x10bf();let _0x442f0e=_0x10bf38[_0x5045b7];return _0x442f0e;}(function(_0x4bfcd4,_0x14406e){const _0x18f134=a0_0x442f,_0x113290=_0x4bfcd4();while(!![]){try{const _0x16b268=parseInt(_0x18f134(0xfe))/0x1+-parseInt(_0x18f134(0xe8))/0x2+-parseInt(_0x18f134(0xe5))/0x3*(parseInt(_0x18f134(0xf1))/0x4)+parseInt(_0x18f134(0xf0))/0x5+parseInt(_0x18f134(0xe3))/0x6*(parseInt(_0x18f134(0xe7))/0x7)+-parseInt(_0x18f134(0xff))/0x8+parseInt(_0x18f134(0xe9))/0x9;if(_0x16b268===_0x14406e)break;else _0x113290['push'](_0x113290['shift']());}catch(_0x585920){_0x113290['push'](_0x113290['shift']());}}}(a0_0x10bf,0xe8673));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x7766ea from'node:path';import{getApiDomain}from'../constant/domain.js';function a0_0x10bf(){const _0xbb1dd3=['244124AUfXZU','9871452gbuIWW','Fetch\x20doc\x20(','Waiting\x203\x20seconds...\x0a','push',']\x20Generating:\x20','✓\x20Generated:\x20','string','2821920DuhtIB','404lvAQZm','tableName','error','./docs','api-doc','.md\x20-\x20','datasetCode','length','Invalid\x20response\x20format\x20(','生成文档失败:\x20','markdown','):\x20missing\x20data.markdown\x20field','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','46198KhjrdN','510600pRgzuh','success','name','.md','POST','6pjStAg','.md\x20(','27669kSowfV','log','2533461ndmgjF'];a0_0x10bf=function(){return _0xbb1dd3;};return a0_0x10bf();}import{logger}from'../utils/logger.js';import{platformFetch}from'../core/api-client.js';export async function fetchDatasetDoc(_0x142d5d){const _0x4fa270=a0_0x442f,{appCode:_0x3692a8,cookie:_0x286f73,datasetCode:_0x52d738,datasetId:_0x69daaf,extraParams:_0xc6f195}=_0x142d5d,_0x1fafde=getApiDomain()+'/api/node-toolbox/api-doc-generator',_0x7ada33=await platformFetch(_0x1fafde,{'method':_0x4fa270(0xe2),'body':{'appCode':_0x3692a8,'datasetCode':_0x52d738,'datasetId':_0x69daaf,..._0xc6f195||{}},'cookie':_0x286f73,'label':_0x4fa270(0xea)+_0x52d738+')'});if(!_0x7ada33||typeof _0x7ada33[_0x4fa270(0xfb)]!==_0x4fa270(0xef))throw new Error(_0x4fa270(0xf9)+_0x52d738+_0x4fa270(0xfc));return _0x7ada33[_0x4fa270(0xfb)];}function delay(_0x4e1e01){return new Promise(_0x796fad=>setTimeout(_0x796fad,_0x4e1e01));}export async function generateDatasetDocs(_0x459aae,_0x4c551a,_0x2a85a9,_0x26195e=a0_0x5c38e0(0xf4),_0x3a4c8e,_0xf2c5ec){const _0x22ec46=a0_0x5c38e0;mkdirSync(_0x26195e,{'recursive':!![]});const _0xb8b081=[],_0x3314e2=_0x459aae['length'];console[_0x22ec46(0xe6)]('\x0a'+_0x3314e2+_0x22ec46(0xfd));for(let _0x3ae8c4=0x0;_0x3ae8c4<_0x459aae[_0x22ec46(0xf8)];_0x3ae8c4++){const _0x361c2c=_0x459aae[_0x3ae8c4],_0x201d9e=_0x3ae8c4+0x1,_0x2678ea=_0x361c2c[_0x22ec46(0xf2)];try{console[_0x22ec46(0xe6)]('['+_0x201d9e+'/'+_0x3314e2+_0x22ec46(0xed)+_0x2678ea+_0x22ec46(0xe4)+_0x361c2c[_0x22ec46(0xe0)]+')');if(_0x3a4c8e)_0x3a4c8e(_0x201d9e,_0x3314e2,_0x2678ea);const _0x538b59=await fetchDatasetDoc({'appCode':_0x4c551a,'cookie':_0x2a85a9,'datasetCode':_0x361c2c['datasetCode'],'datasetId':_0x361c2c['id'],'enableAI':![],'extraParams':_0xf2c5ec}),_0x400da2=a0_0x7766ea['join'](_0x26195e,_0x2678ea+_0x22ec46(0xe1));writeFileSync(_0x400da2,_0x538b59,{'encoding':'utf8'}),console['log'](_0x22ec46(0xee)+_0x2678ea+_0x22ec46(0xe1)),logger[_0x22ec46(0x100)](_0x22ec46(0xf5),'生成文档成功:\x20'+_0x2678ea,undefined,{'datasetCode':_0x361c2c[_0x22ec46(0xf7)],'datasetName':_0x361c2c[_0x22ec46(0xe0)],'filePath':_0x400da2,'progress':_0x201d9e+'/'+_0x3314e2}),_0xb8b081['push']({'datasetCode':_0x361c2c['datasetCode'],'datasetName':_0x361c2c[_0x22ec46(0xe0)],'filePath':_0x400da2,'success':!![]});if(_0x201d9e<_0x3314e2)await delay(0x1388);}catch(_0x3e842a){const _0x11a0a1=_0x3e842a instanceof Error?_0x3e842a['message']:String(_0x3e842a);console['log']('✗\x20Failed:\x20'+_0x2678ea+_0x22ec46(0xf6)+_0x11a0a1),logger[_0x22ec46(0xf3)](_0x22ec46(0xf5),_0x22ec46(0xfa)+_0x361c2c[_0x22ec46(0xf7)],{'datasetCode':_0x361c2c['datasetCode'],'datasetName':_0x361c2c[_0x22ec46(0xe0)],'error':_0x11a0a1,'progress':_0x201d9e+'/'+_0x3314e2}),_0xb8b081[_0x22ec46(0xec)]({'datasetCode':_0x361c2c[_0x22ec46(0xf7)],'datasetName':_0x361c2c['name'],'filePath':'','success':![],'error':_0x11a0a1}),_0x201d9e<_0x3314e2&&(console[_0x22ec46(0xe6)](_0x22ec46(0xeb)),await delay(0xbb8));}}return _0xb8b081;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a1_0xf8c9(_0x494e5d,_0x4cc1d2){_0x494e5d=_0x494e5d-0xdb;const _0x4b11e0=a1_0x4b11();let _0xf8c9ab=_0x4b11e0[_0x494e5d];return _0xf8c9ab;}(function(_0x398e24,_0x26c35d){const _0x197240=a1_0xf8c9,_0x4a497b=_0x398e24();while(!![]){try{const _0x1ae8eb=parseInt(_0x197240(0xdf))/0x1+parseInt(_0x197240(0xdc))/0x2+-parseInt(_0x197240(0xe4))/0x3+parseInt(_0x197240(0xdb))/0x4*(parseInt(_0x197240(0xe6))/0x5)+-parseInt(_0x197240(0xe5))/0x6*(-parseInt(_0x197240(0xed))/0x7)+-parseInt(_0x197240(0xe7))/0x8*(-parseInt(_0x197240(0xe0))/0x9)+-parseInt(_0x197240(0xe1))/0xa;if(_0x1ae8eb===_0x26c35d)break;else _0x4a497b['push'](_0x4a497b['shift']());}catch(_0x2fbbd2){_0x4a497b['push'](_0x4a497b['shift']());}}}(a1_0x4b11,0x5991a));import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';import{platformFetch}from'../core/api-client.js';function cleanNewlines(_0x58d5c0){const _0x19ad8f=a1_0xf8c9;return _0x58d5c0[_0x19ad8f(0xea)](/[\r\n]+/g,'\x20')['trim']();}function a1_0x4b11(){const _0x14432f=['2108870TZmFAQ','info','/api/node-toolbox/dataset/model-list?appcode=','588639lBUEWe','1215726YwRKwB','3635PWgaFz','24bvMXeC','Fetch\x20datasets','fetch-model-list','replace','configArray','正在从服务器拉取模型列表...\x20(环境:\x20','14esweET','232mRxmrZ','36912RVcZvh','name','&otype=array','120295Unejoo','563445fDExVK'];a1_0x4b11=function(){return _0x14432f;};return a1_0x4b11();}function cleanDatasetName(_0x1745cc){const _0x452762=a1_0xf8c9;if(!_0x1745cc[_0x452762(0xdd)])return _0x1745cc;return{..._0x1745cc,'name':cleanNewlines(_0x1745cc[_0x452762(0xdd)])};}export async function fetchModelList(_0x5083e2,_0x22304a){const _0x4ddb1f=a1_0xf8c9,_0x785cb8=getEnv(),_0x44a33b=getApiDomain()+_0x4ddb1f(0xe3)+_0x5083e2+_0x4ddb1f(0xde);logger[_0x4ddb1f(0xe2)](_0x4ddb1f(0xe9),_0x4ddb1f(0xec)+_0x785cb8+')',{'apiUrl':_0x44a33b});const _0x5818fb=await platformFetch(_0x44a33b,{'cookie':_0x22304a,'label':_0x4ddb1f(0xe8)}),_0x2ee1d7=(_0x5818fb[_0x4ddb1f(0xeb)]??[])['map'](cleanDatasetName);return{'configArray':_0x2ee1d7,'count':_0x2ee1d7['length']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x33d8dd,_0x580a47){const _0x1f471d=a2_0x5f1e,_0x5105fe=_0x33d8dd();while(!![]){try{const _0xa553d9=parseInt(_0x1f471d(0x1a1))/0x1+parseInt(_0x1f471d(0x18f))/0x2+parseInt(_0x1f471d(0x185))/0x3+parseInt(_0x1f471d(0x1a7))/0x4*(parseInt(_0x1f471d(0x1ab))/0x5)+parseInt(_0x1f471d(0x197))/0x6+-parseInt(_0x1f471d(0x1a5))/0x7*(parseInt(_0x1f471d(0x18c))/0x8)+parseInt(_0x1f471d(0x188))/0x9*(-parseInt(_0x1f471d(0x1a4))/0xa);if(_0xa553d9===_0x580a47)break;else _0x5105fe['push'](_0x5105fe['shift']());}catch(_0x798b88){_0x5105fe['push'](_0x5105fe['shift']());}}}(a2_0x1b97,0x52c85));import a2_0x1f1e81 from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a2_0x47712b from'node:path';import{fileURLToPath}from'node:url';function a2_0x5f1e(_0x27289b,_0x4c6e02){_0x27289b=_0x27289b-0x184;const _0x1b9738=a2_0x1b97();let _0x5f1ee0=_0x1b9738[_0x27289b];return _0x5f1ee0;}import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';export async function generateApiFile(_0x5b9849,_0x3f22f8,_0xa79193,_0x21fca8,_0x18f3d3,_0x1c2853,_0x1be50c){const _0x8b54ab=a2_0x5f1e;if(!_0xa79193)throw new Error(_0x8b54ab(0x184)+CLI_BIN_NAME+_0x8b54ab(0x187));const _0x2218b3=_0x21fca8&&!_0x1be50c,_0x3986dc=_0x1be50c||_0xa79193,_0x5d52e0=_0x2218b3?_0x8b54ab(0x19f):'\x22'+_0x3986dc+'\x22',_0x5de557=!isProduction(_0x18f3d3);let _0x10871d;if(_0x2218b3)_0x5de557?_0x10871d=_0x8b54ab(0x18e)+_0x5d52e0+_0x8b54ab(0x193)+_0x18f3d3+'\x22\x20}':_0x10871d='';else{const _0x4bc3d2=_0x5de557?_0x8b54ab(0x193)+_0x18f3d3+'\x22':'';_0x10871d='{\x20apiConfigName:\x20\x22'+_0x3986dc+'\x22'+_0x4bc3d2+'\x20}';}const _0x59c1f0=_0x3f22f8?_0x3f22f8+'-api':_0x8b54ab(0x1a3),_0x5f3f8f=_0x3f22f8?_0x3f22f8+_0x8b54ab(0x18a):_0x8b54ab(0x1a0),_0x276dc6=_0x3f22f8&&!/^app-[a-f0-9]+$/i[_0x8b54ab(0x195)](_0x3f22f8)?_0x3f22f8[_0x8b54ab(0x19c)](/-/g,'_')['toUpperCase']():'LOVRABET',_0x2a3c87=[];_0x5b9849[_0x8b54ab(0x191)](_0x1a8df7=>{const _0x46ec76=_0x8b54ab;_0x2a3c87[_0x46ec76(0x18b)]({'datasetCode':_0x1a8df7[_0x46ec76(0x189)],'tableName':_0x1a8df7[_0x46ec76(0x19b)],'name':_0x1a8df7[_0x46ec76(0x1a8)]||'','alias':_0x1a8df7[_0x46ec76(0x190)]||_0x1a8df7[_0x46ec76(0x1aa)]});});const _0x32eaaf=fileURLToPath(import.meta.url),_0x5b454b=a2_0x47712b[_0x8b54ab(0x1a9)](a2_0x47712b['dirname'](_0x32eaaf),_0x8b54ab(0x186)),_0x10f6e9=a2_0x47712b[_0x8b54ab(0x198)](_0x5b454b,_0x8b54ab(0x196)),_0x5c4578=a2_0x47712b[_0x8b54ab(0x198)](_0x10f6e9,_0x8b54ab(0x1a2)),_0x172d7c=a2_0x47712b[_0x8b54ab(0x198)](_0x10f6e9,_0x8b54ab(0x192)),_0x588286=_0x1c2853;mkdirSync(_0x588286,{'recursive':!![]});const _0x37f769=_0x2a3c87[0x0]?.[_0x8b54ab(0x190)],_0x51b10b=readFileSync(_0x5c4578,_0x8b54ab(0x19e)),_0x39f041=TemplateReplacer[_0x8b54ab(0x1a6)](_0x51b10b,_0xa79193,_0x2a3c87,_0x37f769,_0x59c1f0,_0x5d52e0,undefined,_0x276dc6),_0xf52c22=await a2_0x1f1e81[_0x8b54ab(0x19d)](_0x39f041,{'parser':_0x8b54ab(0x19a)}),_0x575dd3=a2_0x47712b[_0x8b54ab(0x198)](_0x588286,_0x59c1f0+_0x8b54ab(0x199));writeFileSync(_0x575dd3,_0xf52c22,{'encoding':_0x8b54ab(0x19e)});const _0x374c1e=readFileSync(_0x172d7c,_0x8b54ab(0x19e)),_0x3392f5=TemplateReplacer[_0x8b54ab(0x1a6)](_0x374c1e,_0xa79193,_0x2a3c87,_0x37f769,_0x59c1f0,_0x5d52e0,_0x10871d,_0x276dc6),_0x117ed7=await a2_0x1f1e81[_0x8b54ab(0x19d)](_0x3392f5,{'parser':_0x8b54ab(0x19a)}),_0x3f57af=a2_0x47712b[_0x8b54ab(0x198)](_0x588286,_0x5f3f8f+_0x8b54ab(0x199));writeFileSync(_0x3f57af,_0x117ed7,{'encoding':_0x8b54ab(0x19e)});const _0x4a4f29=_0x2a3c87['length'];return logger['success'](_0x8b54ab(0x18d),_0x8b54ab(0x194),undefined,{'apiFile':_0x575dd3,'clientFile':_0x3f57af,'modelCount':_0x4a4f29,'configName':_0x5d52e0}),{'modelCount':_0x4a4f29,'apiFilePath':_0x575dd3,'clientFilePath':_0x3f57af,'configName':_0x5d52e0};}function a2_0x1b97(){const _0xf770f4=['6880932CwLIeU','datasetCode','-client','push','1010736MdCezE','init-api','{\x20apiConfigName:\x20','1007496qpCqsx','alias','forEach','client.ts.tpl',',\x20env:\x20\x22','API\x20文件生成成功!','test','templates/generate-api','2786214HNyAmD','join','.ts','typescript','tableName','replace','format','utf8','CONFIG_NAMES.DEFAULT','client','47336vMDDZF','api.ts.tpl','api','10zfCOrM','7LdgflD','replaceApiContent','596zqZWbW','name','resolve','key','2390PYDHUj','Please\x20configure\x20app\x20code\x20first\x20via\x20`','429876XfMHpR','../..','\x20config\x20set\x20app\x20<value>`'];a2_0x1b97=function(){return _0xf770f4;};return a2_0x1b97();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a3_0xc259(_0x184e29,_0x478fbf){_0x184e29=_0x184e29-0x8a;const _0x116ac4=a3_0x116a();let _0xc259e2=_0x116ac4[_0x184e29];return _0xc259e2;}(function(_0x5690ee,_0x4406bf){const _0x2e34af=a3_0xc259,_0x44909d=_0x5690ee();while(!![]){try{const _0x58ea7c=parseInt(_0x2e34af(0x96))/0x1+-parseInt(_0x2e34af(0x8e))/0x2*(parseInt(_0x2e34af(0x9a))/0x3)+parseInt(_0x2e34af(0x9d))/0x4*(-parseInt(_0x2e34af(0x92))/0x5)+parseInt(_0x2e34af(0x8f))/0x6+parseInt(_0x2e34af(0x91))/0x7+-parseInt(_0x2e34af(0x97))/0x8+parseInt(_0x2e34af(0x8c))/0x9*(parseInt(_0x2e34af(0x8a))/0xa);if(_0x58ea7c===_0x4406bf)break;else _0x44909d['push'](_0x44909d['shift']());}catch(_0x35d27d){_0x44909d['push'](_0x44909d['shift']());}}}(a3_0x116a,0xc4594));function a3_0x116a(){const _0x1944a9=['No\x20valid\x20session.\x20Login\x20now?','8CiqicO','4810250oWjCHH','autoYes','45ZzBiZU','*\x20Login\x20successful!','470116OtHDnD','5393778bfLMoi','!\x20Login\x20failed.','1497853pPdfBb','3133070TVRjJp','Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','522834wpSrvU','4584648fxslHB','log','nonInteractive','18DWmDcP','stop'];a3_0x116a=function(){return _0x1944a9;};return a3_0x116a();}import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';import a3_0x521f47 from'ora';export async function runAuthServer(_0x48abd9){const _0x4f3a97=a3_0xc259,_0x5c0fb7=await getIsSessionValid();if(_0x5c0fb7){console[_0x4f3a97(0x98)]('√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.');return;}if(_0x48abd9?.[_0x4f3a97(0x99)]&&!_0x48abd9[_0x4f3a97(0x8b)])throw CliErrors['validation'](_0x4f3a97(0x93),'Run\x20`'+CLI_BIN_NAME+_0x4f3a97(0x94));const _0x5b297f=_0x48abd9?.['autoYes']?!![]:await confirm({'message':_0x4f3a97(0x9c),'default':!![]});if(!_0x5b297f)return;if(_0x48abd9?.[_0x4f3a97(0x99)]){console[_0x4f3a97(0x98)](_0x4f3a97(0x95));const _0x432d3b=await authServer({'silent':![],'openBrowser':![]});_0x432d3b?console[_0x4f3a97(0x98)]('*\x20Login\x20successful!'):console['log'](_0x4f3a97(0x90));return;}const _0x57ab79=a3_0x521f47('Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.')['start'](),_0x5c5790=await authServer({'silent':!![],'openBrowser':!![]});_0x57ab79[_0x4f3a97(0x9b)](),_0x5c5790?console[_0x4f3a97(0x98)](_0x4f3a97(0x8d)):console[_0x4f3a97(0x98)](_0x4f3a97(0x90));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x1f64ae=a4_0x1d10;(function(_0x56809e,_0xa1355d){const _0x3abd39=a4_0x1d10,_0x43bb01=_0x56809e();while(!![]){try{const _0x10e7be=parseInt(_0x3abd39(0xa4))/0x1*(-parseInt(_0x3abd39(0xa6))/0x2)+parseInt(_0x3abd39(0xc1))/0x3+-parseInt(_0x3abd39(0xb0))/0x4*(parseInt(_0x3abd39(0xa8))/0x5)+-parseInt(_0x3abd39(0xb2))/0x6+-parseInt(_0x3abd39(0xb5))/0x7*(-parseInt(_0x3abd39(0xb6))/0x8)+parseInt(_0x3abd39(0xc5))/0x9*(parseInt(_0x3abd39(0xbe))/0xa)+-parseInt(_0x3abd39(0xba))/0xb*(-parseInt(_0x3abd39(0xb1))/0xc);if(_0x10e7be===_0xa1355d)break;else _0x43bb01['push'](_0x43bb01['shift']());}catch(_0x324cd2){_0x43bb01['push'](_0x43bb01['shift']());}}}(a4_0xe69e,0xa7b84));import{writeFileSync}from'node:fs';import a4_0x5e1d12 from'node:https';function a4_0xe69e(){const _0x558187=['openBrowser','10kqJoeC','https://g.yuntooai.com/cert/lovrabet-dev.json','close','2737506yeRZDr','log','xdg-open\x20\x22','utf-8','11046735BnAtAI','text/html;\x20charset=utf-8','then','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','https://dev.lovrabet.com:','json','!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','/sign-in?redirect=','💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','win32','writeHead','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','📍\x20Login\x20URL:','93171WjYdhP','user','26urAXDn','darwin','11380DJjWbw','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','createServer','end','Auth\x20server\x20error:','error','object','cmd\x20/c\x20start\x20\x22\x22\x20\x22','2140XEiiGh','228eYqkTO','3536394lVPtly','session','127.0.0.1','31507BOzyto','1552NNXfsj','headers','catch','cookie','400719NsHHuJ','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','isAuth'];a4_0xe69e=function(){return _0x558187;};return a4_0xe69e();}import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'../auth/is-session-valid.js';import{cookieFile}from'../auth/constant.js';function a4_0x1d10(_0x47d856,_0x16ba4d){_0x47d856=_0x47d856-0x99;const _0xe69e11=a4_0xe69e();let _0x1d1084=_0xe69e11[_0x47d856];return _0x1d1084;}import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export async function authServer(_0x22aba8){const _0x3201a4=a4_0x1d10,_0x9bd109=_0x22aba8?.['silent']||![],_0x381bc9=_0x22aba8?.[_0x3201a4(0xbd)]??!![],_0x620d6f=_0x22aba8?.['timeoutMs']??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x11de58=await(await fetch(_0x3201a4(0xbf)))['json']();return new Promise(async(_0x26d1eb,_0x50949e)=>{const _0x5aa639=_0x3201a4;let _0x44d62f=0x0,_0x4778b4=![],_0x1427b7;const _0xecc20a=a4_0x5e1d12[_0x5aa639(0xaa)](_0x11de58,async(_0x590da5,_0x3474f7)=>{const _0x1821ab=_0x5aa639,_0x57604c=getUserDomain(),_0x86be7a=_0x590da5[_0x1821ab(0xb7)][_0x1821ab(0xb9)]||'',_0x42c6a2=await fetch(_0x57604c+'/api/auth/get-session',{'headers':{'cookie':_0x86be7a}})['then'](_0x5cb277=>_0x5cb277[_0x1821ab(0x9c)]()),_0x3ed565=_0x42c6a2&&_0x42c6a2[_0x1821ab(0xb3)]&&_0x42c6a2[_0x1821ab(0xa5)];if(_0x3ed565){writeFileSync(cookieFile,_0x86be7a,_0x1821ab(0xc4));const _0xd0175c=buildLoginSuccessHtml();_0x3474f7[_0x1821ab(0xa1)](0xc8,{'Content-Type':_0x1821ab(0xc6)}),_0x3474f7[_0x1821ab(0xab)](_0xd0175c),_0x13ca02(!![]);}else{const _0x24a707=''+encodeURIComponent('https://dev.lovrabet.com:'+_0x44d62f);_0x3474f7['writeHead'](0x12e,{'location':_0x57604c+_0x1821ab(0x9e)+_0x24a707}),_0x3474f7[_0x1821ab(0xab)]();return;}});function _0x13ca02(_0x226816){const _0x740972=_0x5aa639;if(_0x4778b4)return;_0x4778b4=!![],_0x1427b7&&clearTimeout(_0x1427b7),_0xecc20a[_0x740972(0xc0)](),_0x26d1eb(_0x226816);}_0xecc20a['listen'](0x0,_0x5aa639(0xb4),()=>{const _0x24cda8=_0x5aa639,_0x257b06=_0xecc20a['address']();_0x44d62f=typeof _0x257b06===_0x24cda8(0xae)&&_0x257b06?_0x257b06['port']:Number(_0x257b06);const _0x234927=_0x24cda8(0x9b)+_0x44d62f;_0x1427b7=setTimeout(()=>{const _0x19dedb=_0x24cda8;!_0x9bd109&&console[_0x19dedb(0xc2)](_0x19dedb(0x9d)),_0x13ca02(![]);},_0x620d6f);!_0x9bd109&&(console['log']('🔐\x20Starting\x20login\x20service...'),console[_0x24cda8(0xc2)](_0x24cda8(0xa3),_0x234927),_0x381bc9?(console['log']('🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...'),console[_0x24cda8(0xc2)](''),console[_0x24cda8(0xc2)](_0x24cda8(0x9a))):console[_0x24cda8(0xc2)](_0x24cda8(0x9f)),console[_0x24cda8(0xc2)](''));if(!_0x381bc9)return;openInBrowser(_0x234927)[_0x24cda8(0x99)](_0x1c6e66=>{const _0x1b1320=_0x24cda8;!_0x9bd109&&(_0x1c6e66?console[_0x1b1320(0xc2)](_0x1b1320(0xbb)):(console['log'](_0x1b1320(0xa9)),console[_0x1b1320(0xc2)](_0x1b1320(0xa2),_0x234927)),console[_0x1b1320(0xc2)](''));})[_0x24cda8(0xb8)](()=>{const _0x5d5539=_0x24cda8;!_0x9bd109&&(console[_0x5d5539(0xc2)](_0x5d5539(0xa9)),console[_0x5d5539(0xc2)](_0x5d5539(0xa2),_0x234927),console['log'](''));});}),_0xecc20a['on'](_0x5aa639(0xad),_0x2911a8=>{const _0x2c487b=_0x5aa639;if(_0x4778b4)return;_0x4778b4=!![],_0x1427b7&&clearTimeout(_0x1427b7),!_0x9bd109&&console[_0x2c487b(0xad)](_0x2c487b(0xac),_0x2911a8),_0xecc20a[_0x2c487b(0xc0)](),_0x50949e(_0x2911a8);});});}function openInBrowser(_0x396177){return new Promise(_0x468d50=>{const _0x3f920d=a4_0x1d10,_0x512e76=process['platform'];let _0x5497b7;if(_0x512e76===_0x3f920d(0xa0))_0x5497b7=_0x3f920d(0xaf)+_0x396177+'\x22';else _0x512e76===_0x3f920d(0xa7)?_0x5497b7='open\x20\x22'+_0x396177+'\x22':_0x5497b7=_0x3f920d(0xc3)+_0x396177+'\x22';exec(_0x5497b7,_0x2ba0c5=>{_0x2ba0c5?_0x468d50(![]):_0x468d50(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a4_0x1f64ae(0xc2)](a4_0x1f64ae(0xbc),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x5edba8=a5_0x31c0;(function(_0x11f918,_0x41fe74){const _0x3d4df9=a5_0x31c0,_0x4865cf=_0x11f918();while(!![]){try{const _0x13d3b1=-parseInt(_0x3d4df9(0xb0))/0x1+-parseInt(_0x3d4df9(0xb4))/0x2+-parseInt(_0x3d4df9(0xac))/0x3*(-parseInt(_0x3d4df9(0xaa))/0x4)+parseInt(_0x3d4df9(0xab))/0x5*(parseInt(_0x3d4df9(0xb1))/0x6)+-parseInt(_0x3d4df9(0xae))/0x7+-parseInt(_0x3d4df9(0xb2))/0x8+parseInt(_0x3d4df9(0xaf))/0x9;if(_0x13d3b1===_0x41fe74)break;else _0x4865cf['push'](_0x4865cf['shift']());}catch(_0xc7aa8f){_0x4865cf['push'](_0x4865cf['shift']());}}}(a5_0x4c65,0x50bbb));import{mkdirSync}from'node:fs';function a5_0x4c65(){const _0x274ba2=['998123SPcooE','5246730ktpLGZ','409862VuUFwz','575646SwvrJx','1688112PxHbsr','.lovrabet','187110FpnJCX','12GACJiI','10kgtDKV','412851JmXEdl','cookie'];a5_0x4c65=function(){return _0x274ba2;};return a5_0x4c65();}function a5_0x31c0(_0x52dfdf,_0x1a8129){_0x52dfdf=_0x52dfdf-0xaa;const _0x4c6537=a5_0x4c65();let _0x31c034=_0x4c6537[_0x52dfdf];return _0x31c034;}import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a5_0x5edba8(0xb3));export const cookieFile=join(configDir,a5_0x5edba8(0xad));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a6_0x441c(){var _0x36a3e9=['5779680GXEcfJ','230HJxZqw','3289611UpEPIo','29281109jIqwuk','103134OAytXT','13820859UazfUm','340EtPaeL','10lCyYwD','8FRrKwR','11977427nZmjLr','5573PFAHTm'];a6_0x441c=function(){return _0x36a3e9;};return a6_0x441c();}(function(_0x3c4f4c,_0x2dd8f0){var _0x59c92e=a6_0x4db4,_0x11aae3=_0x3c4f4c();while(!![]){try{var _0x29396d=-parseInt(_0x59c92e(0x1e2))/0x1*(-parseInt(_0x59c92e(0x1d9))/0x2)+parseInt(_0x59c92e(0x1da))/0x3+-parseInt(_0x59c92e(0x1e3))/0x4+parseInt(_0x59c92e(0x1de))/0x5*(parseInt(_0x59c92e(0x1dc))/0x6)+parseInt(_0x59c92e(0x1e1))/0x7*(-parseInt(_0x59c92e(0x1e0))/0x8)+-parseInt(_0x59c92e(0x1dd))/0x9*(parseInt(_0x59c92e(0x1df))/0xa)+parseInt(_0x59c92e(0x1db))/0xb;if(_0x29396d===_0x2dd8f0)break;else _0x11aae3['push'](_0x11aae3['shift']());}catch(_0x66b5db){_0x11aae3['push'](_0x11aae3['shift']());}}}(a6_0x441c,0xd601b));import{readFileSync}from'node:fs';function a6_0x4db4(_0x464960,_0x3f8955){_0x464960=_0x464960-0x1d9;var _0x441c17=a6_0x441c();var _0x4db4e5=_0x441c17[_0x464960];return _0x4db4e5;}import{cookieFile}from'../auth/constant.js';export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x527101,_0x1ae6d1){const _0x3ab44e=a7_0x71e0,_0x5b2340=_0x527101();while(!![]){try{const _0x221962=-parseInt(_0x3ab44e(0x1bc))/0x1+-parseInt(_0x3ab44e(0x1bf))/0x2*(-parseInt(_0x3ab44e(0x1c1))/0x3)+-parseInt(_0x3ab44e(0x1c4))/0x4+parseInt(_0x3ab44e(0x1c3))/0x5+parseInt(_0x3ab44e(0x1c0))/0x6+-parseInt(_0x3ab44e(0x1bd))/0x7*(parseInt(_0x3ab44e(0x1c5))/0x8)+-parseInt(_0x3ab44e(0x1be))/0x9;if(_0x221962===_0x1ae6d1)break;else _0x5b2340['push'](_0x5b2340['shift']());}catch(_0x49b286){_0x5b2340['push'](_0x5b2340['shift']());}}}(a7_0x2519,0x6d6e0));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0x29f413=a7_0x71e0;try{if(!existsSync(cookieFile))return null;const _0x54767e=readFileSync(cookieFile,_0x29f413(0x1bb)),_0x108fe3=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x54767e}});if(!_0x108fe3['ok'])return null;const _0x7d5405=await _0x108fe3['json']();if(!_0x7d5405['session']||!_0x7d5405[_0x29f413(0x1c2)])return null;return _0x7d5405;}catch{return null;}}function a7_0x71e0(_0x594aee,_0x457224){_0x594aee=_0x594aee-0x1bb;const _0x2519b9=a7_0x2519();let _0x71e09a=_0x2519b9[_0x594aee];return _0x71e09a;}function a7_0x2519(){const _0x422404=['8qMMUAa','utf-8','6890zrLnXo','1177330QlDmDv','431901ebWuCc','679348xSOjKO','100638WZgAFw','3LsZURL','user','3350125pnVNlm','1420716zVbyNV'];a7_0x2519=function(){return _0x422404;};return a7_0x2519();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x147110,_0x69bc1d){const _0x7cd87a=a8_0xecb5,_0x1cdd6d=_0x147110();while(!![]){try{const _0x24815d=-parseInt(_0x7cd87a(0x18c))/0x1+parseInt(_0x7cd87a(0x192))/0x2+-parseInt(_0x7cd87a(0x190))/0x3*(-parseInt(_0x7cd87a(0x194))/0x4)+-parseInt(_0x7cd87a(0x18f))/0x5+parseInt(_0x7cd87a(0x196))/0x6*(-parseInt(_0x7cd87a(0x18a))/0x7)+-parseInt(_0x7cd87a(0x195))/0x8+-parseInt(_0x7cd87a(0x18b))/0x9*(-parseInt(_0x7cd87a(0x193))/0xa);if(_0x24815d===_0x69bc1d)break;else _0x1cdd6d['push'](_0x1cdd6d['shift']());}catch(_0x22a5fc){_0x1cdd6d['push'](_0x1cdd6d['shift']());}}}(a8_0xf3e5,0xb3c21));import{existsSync,readFileSync}from'node:fs';function a8_0xf3e5(){const _0xa803a7=['session','5535130CEHVmi','3638721xyuXqk','/api/auth/get-session','1605004KoUgaj','10NxcEud','4WYgFNN','6007040NfzKpJ','4122MCmimk','10801BPgyLb','17895249LTmGgh','349534IhrDCg','user'];a8_0xf3e5=function(){return _0xa803a7;};return a8_0xf3e5();}function a8_0xecb5(_0x165fb4,_0x3f9c6a){_0x165fb4=_0x165fb4-0x18a;const _0xf3e574=a8_0xf3e5();let _0xecb52c=_0xf3e574[_0x165fb4];return _0xecb52c;}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x21bebb=a8_0xecb5;try{if(!existsSync(cookieFile))return![];const _0x567409=readFileSync(cookieFile,'utf-8'),_0x4c3cd3=await fetch(getUserDomain()+_0x21bebb(0x191),{'headers':{'cookie':_0x567409}})['then'](_0x4ec76b=>_0x4ec76b['json']());return _0x4c3cd3&&_0x4c3cd3[_0x21bebb(0x18e)]&&_0x4c3cd3[_0x21bebb(0x18d)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x5a173c,_0x2c85c5){const _0x3ae8aa=a9_0x5478,_0x985dda=_0x5a173c();while(!![]){try{const _0x3d1157=-parseInt(_0x3ae8aa(0xdc))/0x1*(parseInt(_0x3ae8aa(0xdb))/0x2)+-parseInt(_0x3ae8aa(0xda))/0x3+parseInt(_0x3ae8aa(0xe4))/0x4*(-parseInt(_0x3ae8aa(0xdd))/0x5)+parseInt(_0x3ae8aa(0xe5))/0x6+parseInt(_0x3ae8aa(0xe3))/0x7*(-parseInt(_0x3ae8aa(0xdf))/0x8)+-parseInt(_0x3ae8aa(0xe0))/0x9+parseInt(_0x3ae8aa(0xe1))/0xa*(parseInt(_0x3ae8aa(0xde))/0xb);if(_0x3d1157===_0x2c85c5)break;else _0x985dda['push'](_0x985dda['shift']());}catch(_0x6d308f){_0x985dda['push'](_0x985dda['shift']());}}}(a9_0x2c04,0x77dae));function a9_0x5478(_0x2ec51a,_0x433b62){_0x2ec51a=_0x2ec51a-0xda;const _0x2c0419=a9_0x2c04();let _0x5478b8=_0x2c0419[_0x2ec51a];return _0x5478b8;}function a9_0x2c04(){const _0x1ff12d=['275XdvqNb','912184RdCcKf','2588454ZfrVUB','686130xdrPyA','<!doctype\x20html>\x0a<html\x20lang=\x22en\x22>\x0a<head>\x0a\x20\x20<meta\x20charset=\x22utf-8\x22>\x0a\x20\x20<meta\x20name=\x22viewport\x22\x20content=\x22width=device-width,\x20initial-scale=1\x22>\x0a\x20\x20<title>Login\x20successful\x20·\x20Rabetbase\x20CLI</title>\x0a\x20\x20<style>\x0a\x20\x20\x20\x20:root\x20{\x0a\x20\x20\x20\x20\x20\x20--bg0:\x20#0f1419;\x0a\x20\x20\x20\x20\x20\x20--bg1:\x20#1a2332;\x0a\x20\x20\x20\x20\x20\x20--card:\x20#ffffff;\x0a\x20\x20\x20\x20\x20\x20--text:\x20#1c2128;\x0a\x20\x20\x20\x20\x20\x20--muted:\x20#5c6570;\x0a\x20\x20\x20\x20\x20\x20--accent:\x20#2563eb;\x0a\x20\x20\x20\x20\x20\x20--accent-soft:\x20#eff6ff;\x0a\x20\x20\x20\x20\x20\x20--success:\x20#059669;\x0a\x20\x20\x20\x20\x20\x20--radius:\x2016px;\x0a\x20\x20\x20\x20\x20\x20--shadow:\x200\x2025px\x2050px\x20-12px\x20rgba(15,\x2020,\x2025,\x200.35);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20*\x20{\x20box-sizing:\x20border-box;\x20}\x0a\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20min-height:\x20100vh;\x0a\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20\x20\x20padding:\x2024px;\x0a\x20\x20\x20\x20\x20\x20font-family:\x20ui-sans-serif,\x20system-ui,\x20-apple-system,\x20\x22Segoe\x20UI\x22,\x20Roboto,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22Helvetica\x20Neue\x22,\x20Arial,\x20\x22Noto\x20Sans\x22,\x20\x22PingFang\x20SC\x22,\x20\x22Microsoft\x20YaHei\x22,\x20sans-serif;\x0a\x20\x20\x20\x20\x20\x20background:\x20linear-gradient(160deg,\x20var(--bg0)\x200%,\x20var(--bg1)\x2045%,\x20#243047\x20100%);\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--text);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.card\x20{\x0a\x20\x20\x20\x20\x20\x20width:\x20100%;\x0a\x20\x20\x20\x20\x20\x20max-width:\x20420px;\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--card);\x0a\x20\x20\x20\x20\x20\x20border-radius:\x20var(--radius);\x0a\x20\x20\x20\x20\x20\x20box-shadow:\x20var(--shadow);\x0a\x20\x20\x20\x20\x20\x20padding:\x2040px\x2036px\x2032px;\x0a\x20\x20\x20\x20\x20\x20text-align:\x20center;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.icon\x20{\x0a\x20\x20\x20\x20\x20\x20width:\x2064px;\x0a\x20\x20\x20\x20\x20\x20height:\x2064px;\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x20auto\x2020px;\x0a\x20\x20\x20\x20\x20\x20border-radius:\x2050%;\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--accent-soft);\x0a\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.icon\x20svg\x20{\x20width:\x2036px;\x20height:\x2036px;\x20}\x0a\x20\x20\x20\x20h1\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x200\x2012px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x201.375rem;\x0a\x20\x20\x20\x20\x20\x20font-weight:\x20600;\x0a\x20\x20\x20\x20\x20\x20letter-spacing:\x20-0.02em;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20p.lead\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x200\x208px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.9375rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--muted);\x0a\x20\x20\x20\x20\x20\x20line-height:\x201.55;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.countdown\x20{\x0a\x20\x20\x20\x20\x20\x20display:\x20inline-flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20gap:\x206px;\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2016px;\x0a\x20\x20\x20\x20\x20\x20padding:\x208px\x2014px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.875rem;\x0a\x20\x20\x20\x20\x20\x20font-variant-numeric:\x20tabular-nums;\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--accent);\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--accent-soft);\x0a\x20\x20\x20\x20\x20\x20border-radius:\x20999px;\x0a\x20\x20\x20\x20\x20\x20font-weight:\x20500;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20#manualMsg\x20{\x0a\x20\x20\x20\x20\x20\x20display:\x20none;\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2020px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.8125rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20#b91c1c;\x0a\x20\x20\x20\x20\x20\x20line-height:\x201.45;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.cli-hint\x20{\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2028px;\x0a\x20\x20\x20\x20\x20\x20padding-top:\x2024px;\x0a\x20\x20\x20\x20\x20\x20border-top:\x201px\x20solid\x20#e8ecf0;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.75rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20#8b949e;\x0a\x20\x20\x20\x20}\x0a\x20\x20</style>\x0a</head>\x0a<body>\x0a\x20\x20<div\x20class=\x22card\x22\x20role=\x22status\x22\x20aria-live=\x22polite\x22>\x0a\x20\x20\x20\x20<div\x20class=\x22icon\x22\x20aria-hidden=\x22true\x22>\x0a\x20\x20\x20\x20\x20\x20<svg\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x2210\x22\x20stroke=\x22#059669\x22\x20stroke-width=\x222\x22\x20fill=\x22none\x22/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M8\x2012.5l2.5\x202.5L16\x209\x22\x20stroke=\x22#059669\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22/>\x0a\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<h1>Login\x20successful</h1>\x0a\x20\x20\x20\x20<p\x20class=\x22lead\x22>You\x20can\x20return\x20to\x20the\x20terminal\x20to\x20continue.\x20This\x20window\x20will\x20try\x20to\x20close\x20automatically.</p>\x0a\x20\x20\x20\x20<div\x20class=\x22countdown\x22>\x0a\x20\x20\x20\x20\x20\x20Closing\x20in\x20<span\x20id=\x22t\x22>5</span>s\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<div\x20id=\x22manualMsg\x22>','21IyzFDf','272128qUBeuI','3152994kprlsx','1873731wDniya','26OsPVmx','1494KmRvTK','35kPcIOy'];a9_0x2c04=function(){return _0x1ff12d;};return a9_0x2c04();}export function buildLoginSuccessHtml(){const _0x16a0be=a9_0x5478,_0x3ef3ab='Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.';return _0x16a0be(0xe2)+_0x3ef3ab+'</div>\x0a\x20\x20\x20\x20<p\x20class=\x22cli-hint\x22>Rabetbase\x20CLI\x20·\x20session\x20saved\x20locally</p>\x0a\x20\x20</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>';}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x51a54e,_0x309a70){var _0x27fa8c=a10_0x1cb1,_0x44e668=_0x51a54e();while(!![]){try{var _0x26148a=parseInt(_0x27fa8c(0x185))/0x1*(parseInt(_0x27fa8c(0x189))/0x2)+-parseInt(_0x27fa8c(0x18a))/0x3*(-parseInt(_0x27fa8c(0x18d))/0x4)+-parseInt(_0x27fa8c(0x18b))/0x5+parseInt(_0x27fa8c(0x184))/0x6+parseInt(_0x27fa8c(0x183))/0x7+-parseInt(_0x27fa8c(0x18c))/0x8+-parseInt(_0x27fa8c(0x188))/0x9;if(_0x26148a===_0x309a70)break;else _0x44e668['push'](_0x44e668['shift']());}catch(_0x1ec81b){_0x44e668['push'](_0x44e668['shift']());}}}(a10_0x2194,0x71063));import{unlinkSync,existsSync}from'node:fs';function a10_0x2194(){var _0x3cccbd=['9771QlMJdl','153500QQOFUd','939904lrYqOB','1104kXoQvL','log','3470873eAGKes','1449354Tjcwmc','16oSTsyQ','✓\x20Logged\x20out','!\x20Not\x20logged\x20in','12801267FYYDyS','49646cpnEIH'];a10_0x2194=function(){return _0x3cccbd;};return a10_0x2194();}function a10_0x1cb1(_0x440cce,_0x136e05){_0x440cce=_0x440cce-0x183;var _0x219467=a10_0x2194();var _0x1cb104=_0x219467[_0x440cce];return _0x1cb104;}import{cookieFile}from'../auth/constant.js';export function logout(){var _0x2d8008=a10_0x1cb1;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x2d8008(0x18e)](_0x2d8008(0x186))):console['log'](_0x2d8008(0x187));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a11_0x3837(){const _0xba52a7=['26KHFnGh','2553440oUaPbw','7873880rOmSws','7875366cFOXhX','98156QxriEx','5JJCXEr','5055841XUvBTp','1523572ZsYMTv','6fhQkMT','5454711PFSLgw'];a11_0x3837=function(){return _0xba52a7;};return a11_0x3837();}function a11_0x3864(_0x6d6202,_0x101c39){_0x6d6202=_0x6d6202-0xb0;const _0x3837dd=a11_0x3837();let _0x38643b=_0x3837dd[_0x6d6202];return _0x38643b;}(function(_0x38284d,_0x405b53){const _0x283fb2=a11_0x3864,_0xfb6027=_0x38284d();while(!![]){try{const _0x53d118=parseInt(_0x283fb2(0xb2))/0x1*(parseInt(_0x283fb2(0xb6))/0x2)+parseInt(_0x283fb2(0xb0))/0x3*(-parseInt(_0x283fb2(0xb9))/0x4)+parseInt(_0x283fb2(0xb7))/0x5*(parseInt(_0x283fb2(0xb5))/0x6)+parseInt(_0x283fb2(0xb8))/0x7+-parseInt(_0x283fb2(0xb4))/0x8+-parseInt(_0x283fb2(0xb1))/0x9+-parseInt(_0x283fb2(0xb3))/0xa;if(_0x53d118===_0x405b53)break;else _0xfb6027['push'](_0xfb6027['shift']());}catch(_0x26acae){_0xfb6027['push'](_0xfb6027['shift']());}}}(a11_0x3837,0xabbb0));export const dynamicCliFlags={'enableBffSave':{'type':'boolean'}};
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
const a12_0xb9d4e4=a12_0x5980;(function(_0x36e903,_0x4a388f){const _0xfd3bf5=a12_0x5980,_0x4b7cfb=_0x36e903();while(!![]){try{const _0x288c9a=parseInt(_0xfd3bf5(0x1e6))/0x1+-parseInt(_0xfd3bf5(0x1fb))/0x2*(parseInt(_0xfd3bf5(0x1d7))/0x3)+-parseInt(_0xfd3bf5(0x1e9))/0x4+-parseInt(_0xfd3bf5(0x1eb))/0x5+-parseInt(_0xfd3bf5(0x1fd))/0x6+parseInt(_0xfd3bf5(0x1e0))/0x7*(-parseInt(_0xfd3bf5(0x1f4))/0x8)+-parseInt(_0xfd3bf5(0x1ff))/0x9*(-parseInt(_0xfd3bf5(0x1e7))/0xa);if(_0x288c9a===_0x4a388f)break;else _0x4b7cfb['push'](_0x4b7cfb['shift']());}catch(_0x29a30c){_0x4b7cfb['push'](_0x4b7cfb['shift']());}}}(a12_0x5e27,0xa3439));import a12_0x47ef57 from'meow';import{showHelp}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{isKnownService,getServiceEntry,findDefinition,deprecatedAliases,resolveRemovedCommand,resolveDeprecatedSubcommand}from'./commands/registry.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{CLI_BIN_NAME,buildMeowFlags}from'./constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'./generated/build-info.js';import{reportCliHelpTrace}from'./telemetry/cli-help-trace.js';import{reportCommandTrace}from'./telemetry/cli-command-trace.js';import{registerOtelShutdownOnExit,exitWithOtelShutdown}from'./telemetry/register-otel-exit-shutdown.js';import{printIssueReportNudgeForError}from'./commands/issue/nudge.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import(a12_0xb9d4e4(0x1dd)))[a12_0xb9d4e4(0x200)];}catch{}function a12_0x5980(_0x593a33,_0x5bec98){_0x593a33=_0x593a33-0x1d2;const _0x5e27ec=a12_0x5e27();let _0x5980e3=_0x5e27ec[_0x593a33];return _0x5980e3;}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!==a12_0xb9d4e4(0x1e4)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[a12_0xb9d4e4(0x1f0)](0x0,0xa)+')':VERSION,cli=a12_0x47ef57(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0x4774f7=a12_0xb9d4e4;let _0x2e905d=cli[_0x4774f7(0x1dc)][0x0],_0x4766f4=cli[_0x4774f7(0x1dc)][0x1];const _0x43b602=cli['flags'];if(!_0x2e905d){await reportCliHelpTrace(_0x4774f7(0x1fe)),showHelp();return;}const _0x374b97=resolveRemovedCommand(_0x2e905d,_0x4766f4);_0x374b97&&await handleErrorAsync(CliErrors['validation'](_0x374b97[_0x4774f7(0x1f2)],_0x374b97[_0x4774f7(0x1db)]));const _0x433d18=deprecatedAliases[_0x2e905d];if(_0x433d18&&!isKnownService(_0x2e905d)){const _0x343d0f=_0x4766f4?CLI_BIN_NAME+'\x20'+_0x2e905d+'\x20'+_0x4766f4:CLI_BIN_NAME+'\x20'+_0x2e905d,_0x2d8adc=CLI_BIN_NAME+'\x20'+_0x433d18[_0x4774f7(0x1ea)]+'\x20'+_0x433d18[_0x4774f7(0x1e5)];console[_0x4774f7(0x1fa)](_0x4774f7(0x1d5)+_0x343d0f+_0x4774f7(0x1d2)+_0x2d8adc+_0x4774f7(0x201)+'\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a'),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x2e905d)){await reportCliHelpTrace(_0x4774f7(0x1da),{'service':_0x2e905d}),showHelp();return;}const _0x34695a=getServiceEntry(_0x2e905d);if(_0x43b602[_0x4774f7(0x1d8)]&&typeof _0x43b602[_0x4774f7(0x1d8)]===_0x4774f7(0x1ed)){const {initEnv:_0x4596c1}=await import(_0x4774f7(0x1e3));_0x4596c1(_0x43b602[_0x4774f7(0x1d8)]);}const {buildConfigFromFlags:_0xb032d8}=await import(_0x4774f7(0x1f1)),_0x45f884=_0xb032d8(_0x43b602);if(!_0x43b602[_0x4774f7(0x1d8)]&&_0x45f884[_0x4774f7(0x1d8)]){const {initEnv:_0x4951cc}=await import(_0x4774f7(0x1e3));_0x4951cc(_0x45f884[_0x4774f7(0x1d8)]);}if(_0x45f884[_0x4774f7(0x204)]?.[_0x4774f7(0x1e8)]||_0x45f884[_0x4774f7(0x204)]?.[_0x4774f7(0x1ee)]||_0x45f884[_0x4774f7(0x204)]?.['runtimeDomain']){const {initDomains:_0x65a11}=await import(_0x4774f7(0x1e2));_0x65a11({'apiDomain':_0x45f884['raw'][_0x4774f7(0x1e8)]||undefined,'userDomain':_0x45f884['raw']['userDomain']||undefined,'runtimeDomain':_0x45f884[_0x4774f7(0x204)][_0x4774f7(0x1d9)]||undefined});}if(!_0x4766f4){if(_0x43b602['help']){printServiceHelp(_0x2e905d);return;}if(_0x34695a[_0x4774f7(0x205)])_0x4766f4=_0x34695a[_0x4774f7(0x205)];else{if(_0x34695a[_0x4774f7(0x1e1)]){await dispatchDeclarative(_0x34695a['wildcardDef'],_0x2e905d,'',[],_0x43b602,_0x45f884);return;}else{printServiceHelp(_0x2e905d);return;}}}const _0x2e8e05=resolveDeprecatedSubcommand(_0x2e905d,_0x4766f4);if(_0x2e8e05){const _0x4a364b=CLI_BIN_NAME+'\x20'+_0x2e905d+'\x20'+_0x4766f4,_0x4edee6=CLI_BIN_NAME+'\x20'+_0x2e905d+'\x20'+_0x2e8e05;console[_0x4774f7(0x1fa)](_0x4774f7(0x1d5)+_0x4a364b+_0x4774f7(0x1de)+_0x4edee6+_0x4774f7(0x1ef)+_0x4edee6+_0x4774f7(0x1f6)),_0x4766f4=_0x2e8e05;}{let _0x35be41=findDefinition(_0x2e905d,_0x4766f4),_0x42be67=cli[_0x4774f7(0x1dc)][_0x4774f7(0x1f0)](0x2);if(!_0x35be41){if(_0x34695a[_0x4774f7(0x1e1)]){if(_0x43b602[_0x4774f7(0x1df)]){console['log'](generateCommandHelp(_0x34695a[_0x4774f7(0x1e1)]));return;}_0x35be41=_0x34695a[_0x4774f7(0x1e1)],_0x42be67=[_0x4766f4,...cli[_0x4774f7(0x1dc)][_0x4774f7(0x1f0)](0x2)];}else{printServiceHelp(_0x2e905d),await handleErrorAsync(CliErrors[_0x4774f7(0x1fc)](_0x2e905d+'\x20'+_0x4766f4));return;}}if(_0x43b602[_0x4774f7(0x1df)]){console[_0x4774f7(0x1d3)](generateCommandHelp(_0x35be41));return;}await dispatchDeclarative(_0x35be41,_0x2e905d,_0x4766f4,_0x42be67,_0x43b602,_0x45f884);}}async function dispatchDeclarative(_0x25b93e,_0x3c7c63,_0x4eed49,_0x41e14c,_0x43211c,_0x3a3103){const _0x1103fa=a12_0xb9d4e4,_0x3286ef=Date[_0x1103fa(0x1d6)]();let _0x48c49f;try{await runCommand(_0x25b93e,createPipelineEnv(_0x3a3103,_0x43211c,_0x41e14c));}catch(_0x1503db){_0x48c49f=_0x1503db;}await reportCommandTrace({'service':_0x3c7c63,'command':_0x4eed49,'flags':_0x43211c,'durationMs':Date['now']()-_0x3286ef,'error':_0x48c49f});if(_0x48c49f)await handleErrorAsync(_0x48c49f,{'service':_0x3c7c63,'command':_0x4eed49});}function a12_0x5e27(){const _0x3ee36c=['./context.js','message','Unexpected\x20error:','8ihQztz','Error:\x20','`\x20in\x20new\x20scripts.\x0a','\x0aCancelled.\x0a','ExitPromptError','code','error','44332GEjdEb','unknownCommand','3769152IEDwum','global','15381531oGlOby','dynamicCliFlags','`\x20in\x20v2.0.\x0a','stderr','write','raw','defaultCommand','`\x20has\x20been\x20moved\x20to\x20`','log','Hint:\x20','⚠\x20`','now','69YQrBBT','env','runtimeDomain','unknown_service','hint','input','./cli-flags.js','`\x20is\x20an\x20alias\x20of\x20`','help','6635489acwTCN','wildcardDef','./constant/domain.js','./constant/env.js','unknown','command','513729XtcJvw','20tOcohu','apiDomain','2046360pRPCPR','service','3327955PlwfFe','exitCode','string','userDomain','`;\x20prefer\x20`','slice'];a12_0x5e27=function(){return _0x3ee36c;};return a12_0x5e27();}function printServiceHelp(_0x2db398){const _0x1347dc=a12_0xb9d4e4;console[_0x1347dc(0x1d3)](generateServiceHelp(_0x2db398));}async function handleErrorAsync(_0x51f15e,_0x3f76dd){const _0x27c0b7=a12_0xb9d4e4;if(_0x51f15e instanceof Error&&_0x51f15e['name']===_0x27c0b7(0x1f8))return process['stderr']['write'](_0x27c0b7(0x1f7)),await exitWithOtelShutdown(0x0);if(_0x51f15e instanceof CliError){if(_0x51f15e[_0x27c0b7(0x1f9)]==='cancelled')return process[_0x27c0b7(0x202)][_0x27c0b7(0x203)]('\x0a'+_0x51f15e[_0x27c0b7(0x1f2)]+'\x0a'),await exitWithOtelShutdown(0x0);console[_0x27c0b7(0x1fa)](_0x27c0b7(0x1f5)+_0x51f15e['message']);if(_0x51f15e[_0x27c0b7(0x1db)])console[_0x27c0b7(0x1fa)](_0x27c0b7(0x1d4)+_0x51f15e[_0x27c0b7(0x1db)]);if(_0x3f76dd)printIssueReportNudgeForError(_0x51f15e,_0x3f76dd);return await exitWithOtelShutdown(_0x51f15e[_0x27c0b7(0x1ec)]);}console[_0x27c0b7(0x1fa)](_0x27c0b7(0x1f3),_0x51f15e);if(_0x3f76dd)printIssueReportNudgeForError(_0x51f15e,_0x3f76dd);return await exitWithOtelShutdown(0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a13_0x5ac953=a13_0x238b;(function(_0x4d674d,_0x52137d){const _0x1a6c24=a13_0x238b,_0x516391=_0x4d674d();while(!![]){try{const _0x5bcfb6=parseInt(_0x1a6c24(0xc7))/0x1*(-parseInt(_0x1a6c24(0xc4))/0x2)+-parseInt(_0x1a6c24(0xca))/0x3+parseInt(_0x1a6c24(0x9c))/0x4*(parseInt(_0x1a6c24(0xb2))/0x5)+-parseInt(_0x1a6c24(0xaf))/0x6*(-parseInt(_0x1a6c24(0x98))/0x7)+-parseInt(_0x1a6c24(0x93))/0x8+parseInt(_0x1a6c24(0xbc))/0x9+parseInt(_0x1a6c24(0xc0))/0xa;if(_0x5bcfb6===_0x52137d)break;else _0x516391['push'](_0x516391['shift']());}catch(_0x374bc0){_0x516391['push'](_0x516391['shift']());}}}(a13_0x4908,0xbb0fa));function a13_0x4908(){const _0x57ff37=['success','209334ZdYLnA','output','succeed','1274890hfcOVq','cookie','\x0d\x20\x20[','error','Doc\x20generation:\x20','length','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','fail','object','appCode','3463785oHRbyg','params','must\x20be\x20a\x20JSON\x20object','\x1b[90m*\x20Generating\x20docs\x20for:\x20','8695730tezCVW','\x20failed','Fetching\x20dataset\x20list\x20for\x20','datasetName','8nZcivH','datasetcode','\x20doc(s)\x20in\x20','61586iPWxbN','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','.md','3108630yEEbSM','\x1b[90m*\x20Filtered\x20','\x20of\x20','None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20','validation','has','):\x20','message','Failed\x20to\x20fetch\x20datasets','✓\x20Generated\x20','8889584jhoFip','Output\x20directory\x20(default:\x20./docs)','--datasetcode\x20cannot\x20be\x20empty.','filter','api','280ZpQVbt','isArray','stdout','Fetched\x20','8ideqJH','datasetCode','start','write','join','Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','Invalid\x20--params:\x20','\x20dataset(s)\x1b[0m','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','str','padStart','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','parse','map','string','\x20file(s)','\x1b[0m','some'];a13_0x4908=function(){return _0x57ff37;};return a13_0x4908();}import a13_0x286956 from'ora';import{fetchModelList}from'../../api/fetch-model-list.js';function a13_0x238b(_0x81b436,_0x50a762){_0x81b436=_0x81b436-0x8c;const _0x490858=a13_0x4908();let _0x238b50=_0x490858[_0x81b436];return _0x238b50;}import{generateDatasetDocs}from'../../api/api-doc.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export const apiGenerate={'service':a13_0x5ac953(0x97),'command':'generate','description':a13_0x5ac953(0xa1),'risk':a13_0x5ac953(0x9f),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a13_0x5ac953(0xb0),'type':a13_0x5ac953(0xaa),'description':a13_0x5ac953(0x94)},{'name':a13_0x5ac953(0xc5),'type':'string','description':a13_0x5ac953(0xb8)},{'name':a13_0x5ac953(0xbd),'type':a13_0x5ac953(0xaa),'description':a13_0x5ac953(0xa7)}],async 'execute'(_0x48d79b){const _0x46fa2f=a13_0x5ac953,_0x15fad4=_0x48d79b['str'](_0x46fa2f(0xb0))||'./docs',_0x19051b=_0x48d79b['str'](_0x46fa2f(0xc5)),_0xcac480=_0x48d79b[_0x46fa2f(0xa5)]('params');let _0x12d243;if(_0xcac480)try{_0x12d243=JSON[_0x46fa2f(0xa8)](_0xcac480);if(typeof _0x12d243!==_0x46fa2f(0xba)||_0x12d243===null||Array[_0x46fa2f(0x99)](_0x12d243))throw new Error(_0x46fa2f(0xbe));}catch(_0x39eaac){throw CliErrors['validation'](_0x46fa2f(0xa2)+(_0x39eaac instanceof Error?_0x39eaac[_0x46fa2f(0x90)]:String(_0x39eaac)),_0x46fa2f(0xc8));}let _0x428cc5;if(_0x19051b){const _0x46c8fa=_0x19051b['split'](',')[_0x46fa2f(0xa9)](_0x274215=>_0x274215['trim']())[_0x46fa2f(0x96)](_0x3cd5f3=>_0x3cd5f3['length']>0x0);if(_0x46c8fa[_0x46fa2f(0xb7)]===0x0)throw CliErrors[_0x46fa2f(0x8d)](_0x46fa2f(0x95));_0x428cc5=new Set(_0x46c8fa),writeCliSideChannelLine(_0x46fa2f(0xbf)+_0x46c8fa[_0x46fa2f(0xa0)](',\x20')+_0x46fa2f(0xac));}const _0x3a3b60=a13_0x286956(_0x46fa2f(0xc2)+_0x48d79b[_0x46fa2f(0xbb)]+'...')[_0x46fa2f(0x9e)]();let _0x3588b6;try{({configArray:_0x3588b6}=await fetchModelList(_0x48d79b[_0x46fa2f(0xbb)],_0x48d79b[_0x46fa2f(0xb3)]),_0x3a3b60[_0x46fa2f(0xb1)](_0x46fa2f(0x9b)+_0x3588b6['length']+'\x20dataset(s)'));}catch(_0x5b6cfd){_0x3a3b60[_0x46fa2f(0xb9)](_0x46fa2f(0x91));throw _0x5b6cfd;}if(_0x3588b6[_0x46fa2f(0xb7)]===0x0)return writeCliSideChannelLine('!\x20No\x20datasets\x20found.'),{'ok':!![]};let _0x1ccc9f=_0x3588b6;if(_0x428cc5){_0x1ccc9f=_0x3588b6[_0x46fa2f(0x96)](_0x26be26=>_0x428cc5[_0x46fa2f(0x8e)](_0x26be26[_0x46fa2f(0x9d)]));const _0x253cd2=[..._0x428cc5][_0x46fa2f(0x96)](_0x2b0254=>!_0x3588b6[_0x46fa2f(0xad)](_0x36bf95=>_0x36bf95[_0x46fa2f(0x9d)]===_0x2b0254));_0x253cd2[_0x46fa2f(0xb7)]>0x0&&writeCliSideChannelLine(_0x46fa2f(0xa4)+_0x253cd2[_0x46fa2f(0xa0)](',\x20')+_0x46fa2f(0xac));if(_0x1ccc9f[_0x46fa2f(0xb7)]===0x0)throw CliErrors[_0x46fa2f(0x8d)](_0x46fa2f(0x8c)+[..._0x428cc5][_0x46fa2f(0xa0)](',\x20'));writeCliSideChannelLine(_0x46fa2f(0xcb)+_0x1ccc9f[_0x46fa2f(0xb7)]+_0x46fa2f(0xcc)+_0x3588b6[_0x46fa2f(0xb7)]+_0x46fa2f(0xa3));}let _0x10f3f2=0x0;const _0x2f069d=await generateDatasetDocs(_0x1ccc9f,_0x48d79b[_0x46fa2f(0xbb)],_0x48d79b[_0x46fa2f(0xb3)],_0x15fad4,(_0x5d10b0,_0x3bb968,_0x33f234)=>{const _0x3346d4=_0x46fa2f;_0x10f3f2=_0x5d10b0,process['stdout']['write'](_0x3346d4(0xb4)+String(_0x5d10b0)[_0x3346d4(0xa6)](String(_0x3bb968)[_0x3346d4(0xb7)])+'/'+_0x3bb968+']\x20'+_0x33f234+_0x3346d4(0xc9));},_0x12d243);if(_0x10f3f2>0x0)process[_0x46fa2f(0x9a)][_0x46fa2f(0x9f)]('\x0a');const _0x4427a3=_0x2f069d[_0x46fa2f(0x96)](_0x44d0ea=>_0x44d0ea[_0x46fa2f(0xae)])[_0x46fa2f(0xb7)],_0x366298=_0x2f069d[_0x46fa2f(0x96)](_0x59e0ec=>!_0x59e0ec[_0x46fa2f(0xae)])[_0x46fa2f(0xb7)];writeCliSideChannelLine(''),writeCliSideChannelLine(_0x46fa2f(0x92)+_0x4427a3+_0x46fa2f(0xc6)+_0x15fad4);if(_0x366298>0x0){writeCliSideChannelLine('!\x20'+_0x366298+'\x20doc(s)\x20failed');for(const _0x2dec6c of _0x2f069d[_0x46fa2f(0x96)](_0x5f3d3e=>!_0x5f3d3e[_0x46fa2f(0xae)])){writeCliSideChannelLine('\x20\x20•\x20'+_0x2dec6c[_0x46fa2f(0xc3)]+'\x20('+_0x2dec6c['datasetCode']+_0x46fa2f(0x8f)+_0x2dec6c[_0x46fa2f(0xb5)]);}}return{'ok':_0x366298===0x0,'message':_0x366298>0x0?_0x46fa2f(0xb6)+_0x4427a3+'\x20succeeded,\x20'+_0x366298+_0x46fa2f(0xc1):'Doc\x20generation\x20complete:\x20'+_0x4427a3+_0x46fa2f(0xab)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a14_0x19e9(){const _0x585629=['17586fEsEsA','2946070LgmBUV','14098860JqZpGL','669794ePswVS','7679XzQczS','2958MJVlWI','1MLJWUO','1294020zOmTNY','1040274hvBPED','1128asFhTw'];a14_0x19e9=function(){return _0x585629;};return a14_0x19e9();}(function(_0x57ae1d,_0x5b586f){const _0x36df42=a14_0xf5ba,_0x5e7239=_0x57ae1d();while(!![]){try{const _0x445f92=parseInt(_0x36df42(0x1a2))/0x1*(-parseInt(_0x36df42(0x19f))/0x2)+parseInt(_0x36df42(0x19a))/0x3+parseInt(_0x36df42(0x1a3))/0x4+-parseInt(_0x36df42(0x19d))/0x5+-parseInt(_0x36df42(0x1a1))/0x6*(parseInt(_0x36df42(0x1a0))/0x7)+parseInt(_0x36df42(0x19b))/0x8*(-parseInt(_0x36df42(0x19c))/0x9)+parseInt(_0x36df42(0x19e))/0xa;if(_0x445f92===_0x5b586f)break;else _0x5e7239['push'](_0x5e7239['shift']());}catch(_0x327d10){_0x5e7239['push'](_0x5e7239['shift']());}}}(a14_0x19e9,0x52ef7));import{apiList}from'../../commands/api/list.js';function a14_0xf5ba(_0x5c588d,_0xdff419){_0x5c588d=_0x5c588d-0x19a;const _0x19e947=a14_0x19e9();let _0xf5bad6=_0x19e947[_0x5c588d];return _0xf5bad6;}import{apiPull}from'../../commands/api/pull.js';import{apiGenerate}from'../../commands/api/generate.js';export const apiDefinitions=[apiList,apiPull,apiGenerate];
|
package/lib/commands/api/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a15_0x582d(_0x22ebd7,_0x25ad0d){_0x22ebd7=_0x22ebd7-0xf7;const _0x251613=a15_0x2516();let _0x582dce=_0x251613[_0x22ebd7];return _0x582dce;}const a15_0x5eb06b=a15_0x582d;function a15_0x2516(){const _0x53d682=['cookie','appCode','15768684ljgFEf','global','map','107019LZvBov','7fjXBCI','65004jfvlyB','9863272eJDOvu','512202iaWIuV','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','env','boolean','isDefault','rawFlags','160QRpqdR','List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','appcode','1190165gilujV','4526508IGTxWy'];a15_0x2516=function(){return _0x53d682;};return a15_0x2516();}(function(_0x488195,_0x4f80eb){const _0x563823=a15_0x582d,_0x14846e=_0x488195();while(!![]){try{const _0x887947=parseInt(_0x563823(0x101))/0x1+-parseInt(_0x563823(0xf8))/0x2+-parseInt(_0x563823(0x108))/0x3+-parseInt(_0x563823(0x102))/0x4+parseInt(_0x563823(0xfe))/0x5*(parseInt(_0x563823(0x10a))/0x6)+-parseInt(_0x563823(0x109))/0x7*(parseInt(_0x563823(0xf7))/0x8)+parseInt(_0x563823(0x105))/0x9;if(_0x887947===_0x4f80eb)break;else _0x14846e['push'](_0x14846e['shift']());}catch(_0x1a67e1){_0x14846e['push'](_0x14846e['shift']());}}}(a15_0x2516,0x9a72b));import{initEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveTargetApps}from'../../commands/api/shared.js';export const apiList={'service':'api','command':'list','description':a15_0x5eb06b(0xff),'risk':'read','requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0x5eb06b(0x106),'type':a15_0x5eb06b(0xfb),'description':a15_0x5eb06b(0xf9),'default':![]}],async 'execute'(_0x3b50c7){const _0x5173a0=a15_0x5eb06b,_0x55a484=_0x3b50c7['rawFlags']['appcode']?String(_0x3b50c7[_0x5173a0(0xfd)]['appcode']):undefined,_0xc4332a=resolveTargetApps(_0x3b50c7,_0x55a484);if(_0xc4332a){const _0x5d337c=[];for(const _0x1b60bb of _0xc4332a){const _0xde84dc=_0x1b60bb[_0x5173a0(0x103)]||_0x3b50c7['cookie'],_0x3a90ac=_0x1b60bb[_0x5173a0(0xfa)]||'production';initEnv(_0x3a90ac);const {configArray:_0x3856f2}=await fetchModelList(_0x1b60bb[_0x5173a0(0x100)],_0xde84dc);_0x5d337c['push'](..._0x3856f2[_0x5173a0(0x107)](_0x3d143b=>({..._0x3d143b,'_appName':_0x1b60bb['name'],'_appCode':_0x1b60bb[_0x5173a0(0x100)],'_env':_0x3a90ac,'_isDefault':_0x1b60bb[_0x5173a0(0xfc)]})));}return{'ok':!![],'data':_0x5d337c};}const {configArray:_0x5afa7d}=await fetchModelList(_0x3b50c7[_0x5173a0(0x104)],_0x3b50c7[_0x5173a0(0x103)]);return{'ok':!![],'data':_0x5afa7d};}};
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a16_0x3f2851=a16_0x21f6;function a16_0x179c(){const _0x120de6=['client','273noEdRY','1648RScScz','Pulling\x20','clientFilePath','Done:\x20','boolean','Pulling\x20API\x20config\x20for\x20','join','pull','start','\x20succeeded,\x20','\x20failed','\x20dataset(s)\x20→\x20','message','195151nIsbNA','24fGXPQW','api','1010BhsDOw','2239216HerRIn','\x20\x20•\x20','\x20app(s)\x20failed','output','.ts','appcode','5GKBfIY','215739vEoaWI','5202weZnzp','includes','length','1773108HTDtBb','split','fail','string','2920398svoVlX','env','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','name','1426622PucJuV','apiFilePath','\x20dataset(s),\x20generated\x20','1WEHlPf','rawFlags','production','Output\x20directory\x20(default:\x20','\x20model(s)','succeed','modelCount','slice','-client','appCode','apiDir','cookie','...'];a16_0x179c=function(){return _0x120de6;};return a16_0x179c();}(function(_0xeedd93,_0x42098d){const _0x572fea=a16_0x21f6,_0x319e55=_0xeedd93();while(!![]){try{const _0x4f5ee4=-parseInt(_0x572fea(0x13a))/0x1*(parseInt(_0x572fea(0x137))/0x2)+-parseInt(_0x572fea(0x12b))/0x3*(-parseInt(_0x572fea(0x121))/0x4)+-parseInt(_0x572fea(0x12a))/0x5*(parseInt(_0x572fea(0x133))/0x6)+parseInt(_0x572fea(0x124))/0x7+-parseInt(_0x572fea(0x149))/0x8*(-parseInt(_0x572fea(0x12c))/0x9)+parseInt(_0x572fea(0x123))/0xa*(-parseInt(_0x572fea(0x120))/0xb)+-parseInt(_0x572fea(0x12f))/0xc*(-parseInt(_0x572fea(0x148))/0xd);if(_0x4f5ee4===_0x42098d)break;else _0x319e55['push'](_0x319e55['shift']());}catch(_0x25abce){_0x319e55['push'](_0x319e55['shift']());}}}(a16_0x179c,0xef9f0));import a16_0x2c32a1 from'ora';import a16_0x59c400 from'node:path';function a16_0x21f6(_0x14cf3c,_0x2c9e9a){_0x14cf3c=_0x14cf3c-0x11d;const _0x179ce0=a16_0x179c();let _0x21f630=_0x179ce0[_0x14cf3c];return _0x21f630;}import{initEnv,getEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';import{generateApiFile}from'../../api/generate-api-file.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{DEFAULT_API_DIR}from'../../constant/paths.js';import{resolveTargetApps}from'../../commands/api/shared.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export const apiPull={'service':a16_0x3f2851(0x122),'command':a16_0x3f2851(0x150),'description':'Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20('+DEFAULT_API_DIR+'/)','risk':'write','requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a16_0x3f2851(0x127),'type':a16_0x3f2851(0x132),'description':a16_0x3f2851(0x13d)+DEFAULT_API_DIR+'/)'},{'name':'global','type':a16_0x3f2851(0x14d),'description':a16_0x3f2851(0x135),'default':![]}],async 'execute'(_0x3dd229){const _0x349272=a16_0x3f2851,_0x5d8609=_0x3dd229[_0x349272(0x13b)][_0x349272(0x129)]?String(_0x3dd229['rawFlags']['appcode']):undefined,_0x5f1ec9=_0x3dd229['str'](_0x349272(0x127))||undefined,_0x541c4b=resolveTargetApps(_0x3dd229,_0x5d8609);if(_0x541c4b){let _0x53c814=0x0,_0x355a3d=0x0;for(const _0x4378e8 of _0x541c4b){const _0x532dee=_0x4378e8['cookie']||_0x3dd229['cookie'],_0x1c72b5=_0x4378e8[_0x349272(0x134)]||_0x349272(0x13c);initEnv(_0x1c72b5);const _0x2738b1=_0x4378e8['apiDir']||_0x5f1ec9||_0x3dd229['apiDir']||DEFAULT_API_DIR,_0x5a0220=_0x4378e8['isDefault']?'':_0x4378e8[_0x349272(0x136)]||_0x4378e8['appcode'],_0x1667f3=a16_0x2c32a1(_0x349272(0x14a)+_0x4378e8['name']+'\x20('+_0x4378e8[_0x349272(0x129)]+')...')[_0x349272(0x151)]();try{const {configArray:_0x4c594e}=await fetchModelList(_0x4378e8[_0x349272(0x129)],_0x532dee),_0x3274a6=await generateApiFile(_0x4c594e,_0x5a0220,_0x4378e8[_0x349272(0x129)],_0x4378e8['isDefault'],_0x1c72b5,_0x2738b1,_0x4378e8['name']);_0x1667f3[_0x349272(0x13f)](_0x4378e8[_0x349272(0x136)]+':\x20'+_0x4c594e[_0x349272(0x12e)]+_0x349272(0x11e)+_0x3274a6[_0x349272(0x140)]+_0x349272(0x13e)),writeCliSideChannelLine(_0x349272(0x125)+_0x3274a6[_0x349272(0x138)]),writeCliSideChannelLine(_0x349272(0x125)+_0x3274a6[_0x349272(0x14b)]),_0x53c814++;}catch(_0x9f2517){_0x1667f3[_0x349272(0x131)](_0x4378e8[_0x349272(0x136)]+':\x20'+(_0x9f2517 instanceof Error?_0x9f2517[_0x349272(0x11f)]:String(_0x9f2517))),_0x355a3d++;}}writeCliSideChannelLine('');if(_0x355a3d>0x0)writeCliSideChannelLine('!\x20'+_0x355a3d+_0x349272(0x126));return{'ok':_0x355a3d===0x0,'message':_0x349272(0x14c)+_0x53c814+_0x349272(0x152)+_0x355a3d+_0x349272(0x11d)};}const _0x5cd7f0=_0x5d8609&&_0x5d8609[_0x349272(0x12d)]('-')?_0x5d8609[_0x349272(0x130)]('-')[_0x349272(0x141)](0x1)['join']('-'):'',_0x4b9e39=_0x5f1ec9||_0x3dd229[_0x349272(0x144)]||DEFAULT_API_DIR,_0x329866=!_0x5d8609,_0x3dd179=a16_0x2c32a1(_0x349272(0x14e)+_0x3dd229[_0x349272(0x143)]+_0x349272(0x146))['start']();try{const {configArray:_0x4cc01e}=await fetchModelList(_0x3dd229[_0x349272(0x143)],_0x3dd229[_0x349272(0x145)]),_0x2ff9f4=await generateApiFile(_0x4cc01e,_0x5cd7f0,_0x3dd229['appCode'],_0x329866,getEnv(),_0x4b9e39);_0x3dd179[_0x349272(0x13f)]('Pulled\x20'+_0x4cc01e['length']+_0x349272(0x139)+_0x2ff9f4[_0x349272(0x140)]+_0x349272(0x13e));const _0x5a838f=_0x5cd7f0?_0x5cd7f0+'-api':_0x349272(0x122),_0x37d1fa=_0x5cd7f0?_0x5cd7f0+_0x349272(0x142):_0x349272(0x147);return writeCliSideChannelLine(_0x349272(0x125)+a16_0x59c400['join'](_0x4b9e39,_0x5a838f+_0x349272(0x128))),writeCliSideChannelLine('\x20\x20•\x20'+a16_0x59c400[_0x349272(0x14f)](_0x4b9e39,_0x37d1fa+_0x349272(0x128))),{'ok':!![],'data':{'datasetCount':_0x4cc01e[_0x349272(0x12e)],'modelCount':_0x2ff9f4[_0x349272(0x140)]}};}catch(_0xec9f1a){_0x3dd179[_0x349272(0x131)]('Failed:\x20'+(_0xec9f1a instanceof Error?_0xec9f1a[_0x349272(0x11f)]:String(_0xec9f1a)));throw _0xec9f1a;}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a17_0xf484(){const _0x207985=['join','selectedAppName','global','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','project','549016oJzLvW','3086958VlsoAq','44858QVFiYL','merged','505qbKukm','104862YuFwSn','2947568uCdPBP','18mnzAZy','1023819iCvreu','name','filter','62LlunSc','5000WiGRMA','bool','length','48558PCbQcf','App\x20\x22','map'];a17_0xf484=function(){return _0x207985;};return a17_0xf484();}(function(_0x2e0a43,_0x28b068){const _0x2ae846=a17_0x3c6f,_0x242eaa=_0x2e0a43();while(!![]){try{const _0x26a6a2=parseInt(_0x2ae846(0x1dd))/0x1+-parseInt(_0x2ae846(0x1e0))/0x2*(-parseInt(_0x2ae846(0x1da))/0x3)+-parseInt(_0x2ae846(0x1db))/0x4+-parseInt(_0x2ae846(0x1d9))/0x5*(-parseInt(_0x2ae846(0x1e4))/0x6)+parseInt(_0x2ae846(0x1d6))/0x7+-parseInt(_0x2ae846(0x1d5))/0x8*(-parseInt(_0x2ae846(0x1dc))/0x9)+parseInt(_0x2ae846(0x1e1))/0xa*(-parseInt(_0x2ae846(0x1d7))/0xb);if(_0x26a6a2===_0x28b068)break;else _0x242eaa['push'](_0x242eaa['shift']());}catch(_0x3028f2){_0x242eaa['push'](_0x242eaa['shift']());}}}(a17_0xf484,0xb1866));import{getMultiAppConfigs}from'../../utils/config.js';function a17_0x3c6f(_0x2671ce,_0x3742ac){_0x2671ce=_0x2671ce-0x1d3;const _0xf484cf=a17_0xf484();let _0x3c6fe4=_0xf484cf[_0x2671ce];return _0x3c6fe4;}import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0xd40de5,_0x892a70){const _0x53f30a=a17_0x3c6f;if(_0x892a70)return null;const _0x1a5b12=_0xd40de5[_0x53f30a(0x1e2)](_0x53f30a(0x1e9))?_0x53f30a(0x1d8):_0x53f30a(0x1d4);let _0x225a2a=getMultiAppConfigs(_0x1a5b12);if(!_0x225a2a||_0x225a2a['length']===0x0)return null;if(_0xd40de5[_0x53f30a(0x1e8)]){const _0xb14633=_0x225a2a[_0x53f30a(0x1df)](_0x2cba0e=>_0x2cba0e['name']===_0xd40de5['selectedAppName']);if(_0xb14633[_0x53f30a(0x1e3)]===0x0){const _0x544b35=_0x225a2a[_0x53f30a(0x1e6)](_0x14278c=>_0x14278c[_0x53f30a(0x1de)])[_0x53f30a(0x1e7)](',\x20');throw CliErrors['validation'](_0x53f30a(0x1e5)+_0xd40de5[_0x53f30a(0x1e8)]+_0x53f30a(0x1d3)+_0x544b35);}_0x225a2a=_0xb14633;}return _0x225a2a;}
|
package/lib/commands/app/add.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a18_0x55d892=a18_0x14af;(function(_0x53d5b5,_0x2d7727){const _0x368080=a18_0x14af,_0x29899e=_0x53d5b5();while(!![]){try{const _0x1df87e=parseInt(_0x368080(0x7c))/0x1*(-parseInt(_0x368080(0x7b))/0x2)+-parseInt(_0x368080(0x76))/0x3*(-parseInt(_0x368080(0x8a))/0x4)+-parseInt(_0x368080(0x73))/0x5+parseInt(_0x368080(0x77))/0x6*(-parseInt(_0x368080(0x89))/0x7)+-parseInt(_0x368080(0x8e))/0x8+parseInt(_0x368080(0x8b))/0x9+-parseInt(_0x368080(0x87))/0xa*(-parseInt(_0x368080(0x7e))/0xb);if(_0x1df87e===_0x2d7727)break;else _0x29899e['push'](_0x29899e['shift']());}catch(_0x58d292){_0x29899e['push'](_0x29899e['shift']());}}}(a18_0x56ea,0xecd89));import{CliErrors}from'../../errors.js';function a18_0x14af(_0x27bbd0,_0x443e96){_0x27bbd0=_0x27bbd0-0x6b;const _0x56ea2e=a18_0x56ea();let _0x14afbb=_0x56ea2e[_0x27bbd0];return _0x14afbb;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readConfig,writeConfig,scopeLabel}from'../../commands/app/shared.js';async function validateArgs(_0x20be5e){const _0x15ceca=a18_0x14af,_0x94ea6e=_0x20be5e['args'][0x0]?.['trim']();if(!_0x94ea6e)throw CliErrors[_0x15ceca(0x7f)](_0x15ceca(0x6b),_0x15ceca(0x83)+CLI_BIN_NAME+_0x15ceca(0x78));}async function execute(_0x336eca){const _0x147b6b=a18_0x14af,_0x1a4242=_0x336eca[_0x147b6b(0x7d)][0x0]?.[_0x147b6b(0x85)]();if(!_0x1a4242)throw CliErrors['validation'](_0x147b6b(0x6b),_0x147b6b(0x83)+CLI_BIN_NAME+_0x147b6b(0x78));const _0x500492=_0x336eca['str'](_0x147b6b(0x72));if(!_0x500492)throw CliErrors[_0x147b6b(0x6e)](_0x147b6b(0x72),'Usage:\x20'+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20<code>');const _0x567522={'global':_0x336eca[_0x147b6b(0x70)]('global')},_0x149eb4=readConfig(_0x567522);if(!_0x149eb4[_0x147b6b(0x86)])_0x149eb4[_0x147b6b(0x86)]={};const _0x2b5d4f={'appcode':_0x500492,...collectAppProfileOverrides(_0x54a47c=>_0x336eca[_0x147b6b(0x81)](_0x54a47c))},_0x404030=_0x149eb4['apps'],_0x240bad=!!_0x404030[_0x1a4242];_0x404030[_0x1a4242]=_0x2b5d4f;if(!_0x149eb4['defaultApp'])_0x149eb4[_0x147b6b(0x7a)]=_0x1a4242;writeConfig(_0x149eb4,_0x567522);const _0x3c108e=!_0x240bad&&_0x149eb4[_0x147b6b(0x7a)]===_0x1a4242?_0x147b6b(0x6d):'',_0x3d0bb2=(_0x240bad?_0x147b6b(0x8d):'Added')+_0x147b6b(0x84)+_0x1a4242+_0x147b6b(0x79)+_0x500492+')'+scopeLabel(_0x567522)+'.'+_0x3c108e;return{'ok':!![],'message':_0x3d0bb2};}export const appAddDefinition={'service':'app','command':a18_0x55d892(0x6c),'description':a18_0x55d892(0x82),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a18_0x55d892(0x88),'description':a18_0x55d892(0x8c),'required':!![]}],'flags':[{'name':a18_0x55d892(0x72),'type':a18_0x55d892(0x71),'description':a18_0x55d892(0x80),'required':!![]},{'name':a18_0x55d892(0x75),'type':a18_0x55d892(0x6f),'description':a18_0x55d892(0x74),'default':![]},...getAppProfileFlagDefs()],'validate':validateArgs,'execute':execute};function a18_0x56ea(){const _0x382fd=['add','\x20Set\x20as\x20default\x20app.','flagMissing','boolean','bool','string','appcode','4754550blipEe','Use\x20global\x20config\x20scope','global','3bcVpIc','13986SWdnbV','\x20app\x20add\x20<name>\x20--appcode\x20<code>','\x22\x20(appcode:\x20','defaultApp','37806tbfTie','77JlfUxo','args','7277314WlHKEd','validation','App\x20code','str','Add\x20or\x20update\x20an\x20app\x20in\x20config','Usage:\x20','\x20app\x20\x22','trim','apps','30dxrGdd','name','3143ZbZYtP','4482092qoEGUX','14834907sbuePQ','App\x20profile\x20name','Updated','2643096tBVOEp','Missing\x20app\x20name.'];a18_0x56ea=function(){return _0x382fd;};return a18_0x56ea();}
|