@lovrabet/rabetbase-cli 2.1.7-beta.7 → 2.1.7-beta.8
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/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-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/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -1
- package/lib/commands/dataset/link-delete.js +1 -1
- package/lib/commands/dataset/link-shared.js +1 -1
- package/lib/commands/dataset/link-update.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.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/report.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.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/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/skill/index.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/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.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/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
|
-
|
|
1
|
+
(function(_0x3426cf,_0x56d503){const _0x3ee9a8=a0_0x292a,_0x31644b=_0x3426cf();while(!![]){try{const _0xce88e3=parseInt(_0x3ee9a8(0xa5))/0x1*(parseInt(_0x3ee9a8(0xbc))/0x2)+-parseInt(_0x3ee9a8(0xaa))/0x3+parseInt(_0x3ee9a8(0xb3))/0x4+parseInt(_0x3ee9a8(0x9f))/0x5*(parseInt(_0x3ee9a8(0xb9))/0x6)+-parseInt(_0x3ee9a8(0xa9))/0x7*(-parseInt(_0x3ee9a8(0xbf))/0x8)+-parseInt(_0x3ee9a8(0xad))/0x9*(parseInt(_0x3ee9a8(0xba))/0xa)+-parseInt(_0x3ee9a8(0xbd))/0xb*(parseInt(_0x3ee9a8(0xab))/0xc);if(_0xce88e3===_0x56d503)break;else _0x31644b['push'](_0x31644b['shift']());}catch(_0x3a9d91){_0x31644b['push'](_0x31644b['shift']());}}}(a0_0x32aa,0x6901a));function a0_0x32aa(){const _0x144faf=['length','log','push','):\x20missing\x20data.markdown\x20field','42283WJAkqk','.md','Invalid\x20response\x20format\x20(','.md\x20(','14ArXWtH','171555euzuPb','33192bYGLda','✗\x20Failed:\x20','1909566JrzkEZ','string','utf8','POST','生成文档成功:\x20','✓\x20Generated:\x20','3209540kfLIPF','api-doc','.md\x20-\x20','/api/node-toolbox/api-doc-generator','markdown','name','498IPOZFj','10TowPeE','datasetCode','20VUTziW','4873WykjgL',']\x20Generating:\x20','1471016ePhWDW','Fetch\x20doc\x20(','error','生成文档失败:\x20','19990BhgbCz','\x20datasets\x20to\x20generate\x20docs\x20for\x0a'];a0_0x32aa=function(){return _0x144faf;};return a0_0x32aa();}import{mkdirSync,writeFileSync}from'node:fs';import a0_0x1a7200 from'node:path';import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{platformFetch}from'../core/api-client.js';function a0_0x292a(_0x41feb1,_0xe6f6e0){_0x41feb1=_0x41feb1-0x9f;const _0x32aaaa=a0_0x32aa();let _0x292a65=_0x32aaaa[_0x41feb1];return _0x292a65;}export async function fetchDatasetDoc(_0x40a8d1){const _0x3b029d=a0_0x292a,{appCode:_0x5f76cb,cookie:_0x2928cc,datasetCode:_0x2aedcf,datasetId:_0x269da8,extraParams:_0x1859a5}=_0x40a8d1,_0x2e8e4a=getApiDomain()+_0x3b029d(0xb6),_0x30ebc8=await platformFetch(_0x2e8e4a,{'method':_0x3b029d(0xb0),'body':{'appCode':_0x5f76cb,'datasetCode':_0x2aedcf,'datasetId':_0x269da8,..._0x1859a5||{}},'cookie':_0x2928cc,'label':_0x3b029d(0xc0)+_0x2aedcf+')'});if(!_0x30ebc8||typeof _0x30ebc8[_0x3b029d(0xb7)]!==_0x3b029d(0xae))throw new Error(_0x3b029d(0xa7)+_0x2aedcf+_0x3b029d(0xa4));return _0x30ebc8['markdown'];}function delay(_0x301886){return new Promise(_0x37f897=>setTimeout(_0x37f897,_0x301886));}export async function generateDatasetDocs(_0x47fa8f,_0x440b50,_0x6f762b,_0x4bf2e3='./docs',_0x362fc7,_0x315694){const _0x5a188c=a0_0x292a;mkdirSync(_0x4bf2e3,{'recursive':!![]});const _0x305ef7=[],_0x38e4fe=_0x47fa8f[_0x5a188c(0xa1)];console[_0x5a188c(0xa2)]('\x0a'+_0x38e4fe+_0x5a188c(0xa0));for(let _0x348f60=0x0;_0x348f60<_0x47fa8f[_0x5a188c(0xa1)];_0x348f60++){const _0x5310fb=_0x47fa8f[_0x348f60],_0x43997f=_0x348f60+0x1,_0x3c5029=_0x5310fb['tableName'];try{console[_0x5a188c(0xa2)]('['+_0x43997f+'/'+_0x38e4fe+_0x5a188c(0xbe)+_0x3c5029+_0x5a188c(0xa8)+_0x5310fb['name']+')');if(_0x362fc7)_0x362fc7(_0x43997f,_0x38e4fe,_0x3c5029);const _0x40c1bd=await fetchDatasetDoc({'appCode':_0x440b50,'cookie':_0x6f762b,'datasetCode':_0x5310fb['datasetCode'],'datasetId':_0x5310fb['id'],'enableAI':![],'extraParams':_0x315694}),_0x32b204=a0_0x1a7200['join'](_0x4bf2e3,_0x3c5029+'.md');writeFileSync(_0x32b204,_0x40c1bd,{'encoding':_0x5a188c(0xaf)}),console[_0x5a188c(0xa2)](_0x5a188c(0xb2)+_0x3c5029+_0x5a188c(0xa6)),logger['success'](_0x5a188c(0xb4),_0x5a188c(0xb1)+_0x3c5029,undefined,{'datasetCode':_0x5310fb['datasetCode'],'datasetName':_0x5310fb[_0x5a188c(0xb8)],'filePath':_0x32b204,'progress':_0x43997f+'/'+_0x38e4fe}),_0x305ef7[_0x5a188c(0xa3)]({'datasetCode':_0x5310fb[_0x5a188c(0xbb)],'datasetName':_0x5310fb[_0x5a188c(0xb8)],'filePath':_0x32b204,'success':!![]});if(_0x43997f<_0x38e4fe)await delay(0x1388);}catch(_0x467241){const _0x50ddc8=_0x467241 instanceof Error?_0x467241['message']:String(_0x467241);console[_0x5a188c(0xa2)](_0x5a188c(0xac)+_0x3c5029+_0x5a188c(0xb5)+_0x50ddc8),logger[_0x5a188c(0xc1)](_0x5a188c(0xb4),_0x5a188c(0xc2)+_0x5310fb[_0x5a188c(0xbb)],{'datasetCode':_0x5310fb[_0x5a188c(0xbb)],'datasetName':_0x5310fb[_0x5a188c(0xb8)],'error':_0x50ddc8,'progress':_0x43997f+'/'+_0x38e4fe}),_0x305ef7[_0x5a188c(0xa3)]({'datasetCode':_0x5310fb['datasetCode'],'datasetName':_0x5310fb[_0x5a188c(0xb8)],'filePath':'','success':![],'error':_0x50ddc8}),_0x43997f<_0x38e4fe&&(console[_0x5a188c(0xa2)]('Waiting\x203\x20seconds...\x0a'),await delay(0xbb8));}}return _0x305ef7;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x182328,_0x5f3e38){const _0x139af7=a1_0x7e93,_0x4d5ba8=_0x182328();while(!![]){try{const _0x490f1f=parseInt(_0x139af7(0x189))/0x1+parseInt(_0x139af7(0x18a))/0x2+-parseInt(_0x139af7(0x191))/0x3*(parseInt(_0x139af7(0x186))/0x4)+-parseInt(_0x139af7(0x184))/0x5+-parseInt(_0x139af7(0x18e))/0x6+-parseInt(_0x139af7(0x185))/0x7+parseInt(_0x139af7(0x18c))/0x8*(parseInt(_0x139af7(0x183))/0x9);if(_0x490f1f===_0x5f3e38)break;else _0x4d5ba8['push'](_0x4d5ba8['shift']());}catch(_0x33de2c){_0x4d5ba8['push'](_0x4d5ba8['shift']());}}}(a1_0x2629,0x24797));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 a1_0x7e93(_0x3cadb7,_0x4ceb9c){_0x3cadb7=_0x3cadb7-0x182;const _0x26292d=a1_0x2629();let _0x7e9315=_0x26292d[_0x3cadb7];return _0x7e9315;}function cleanNewlines(_0x2b3a6f){const _0x1d7685=a1_0x7e93;return _0x2b3a6f[_0x1d7685(0x187)](/[\r\n]+/g,'\x20')[_0x1d7685(0x18b)]();}function cleanDatasetName(_0x17d5c3){const _0x57ef85=a1_0x7e93;if(!_0x17d5c3[_0x57ef85(0x194)])return _0x17d5c3;return{..._0x17d5c3,'name':cleanNewlines(_0x17d5c3[_0x57ef85(0x194)])};}export async function fetchModelList(_0x1f90fe,_0xb6dec1){const _0x1778a3=a1_0x7e93,_0x227b09=getEnv(),_0x31c1ff=getApiDomain()+_0x1778a3(0x182)+_0x1f90fe+_0x1778a3(0x18f);logger[_0x1778a3(0x188)](_0x1778a3(0x190),'正在从服务器拉取模型列表...\x20(环境:\x20'+_0x227b09+')',{'apiUrl':_0x31c1ff});const _0x31cf94=await platformFetch(_0x31c1ff,{'cookie':_0xb6dec1,'label':_0x1778a3(0x193)}),_0x4c4a03=(_0x31cf94[_0x1778a3(0x192)]??[])['map'](cleanDatasetName);return{'configArray':_0x4c4a03,'count':_0x4c4a03[_0x1778a3(0x18d)]};}function a1_0x2629(){const _0x440ba6=['name','/api/node-toolbox/dataset/model-list?appcode=','9hxMkmM','1392990Cxlwjk','94717FNOUTP','36eqlPGn','replace','info','275975FKRqHn','436946WMscRF','trim','1702376iopkRg','length','767076mDzHzG','&otype=array','fetch-model-list','45957tNrMRl','configArray','Fetch\x20datasets'];a1_0x2629=function(){return _0x440ba6;};return a1_0x2629();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5795ed,_0x2de5a9){const _0x4b908c=a2_0x2643,_0x1fee82=_0x5795ed();while(!![]){try{const _0x234479=-parseInt(_0x4b908c(0x1b9))/0x1+-parseInt(_0x4b908c(0x1d6))/0x2+parseInt(_0x4b908c(0x1c6))/0x3+parseInt(_0x4b908c(0x1c5))/0x4+parseInt(_0x4b908c(0x1be))/0x5+-parseInt(_0x4b908c(0x1d3))/0x6+parseInt(_0x4b908c(0x1d8))/0x7;if(_0x234479===_0x2de5a9)break;else _0x1fee82['push'](_0x1fee82['shift']());}catch(_0x3e315b){_0x1fee82['push'](_0x1fee82['shift']());}}}(a2_0x58c8,0x9f60f));import a2_0x4e8f0b from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a2_0x87d0a4 from'node:path';function a2_0x58c8(){const _0x17dea8=['push','typescript','join','5741436JYjoxI',',\x20env:\x20\x22','api','2143168xAYFcR','templates/generate-api','10797493PVQRwm','\x20config\x20set\x20app\x20<value>`','replace','tableName','API\x20文件生成成功!','dirname','length','467216RJUrdg','replaceApiContent','format','api.ts.tpl','alias','1726290GkElXa','Please\x20configure\x20app\x20code\x20first\x20via\x20`','CONFIG_NAMES.DEFAULT','name','success','\x22\x20}','resolve','4685468CvNHfI','268191MZkSdN','client','{\x20apiConfigName:\x20','.ts','key','-client','datasetCode','forEach','toUpperCase','utf8'];a2_0x58c8=function(){return _0x17dea8;};return a2_0x58c8();}import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';function a2_0x2643(_0x5544f1,_0x2a1817){_0x5544f1=_0x5544f1-0x1b4;const _0x58c8c1=a2_0x58c8();let _0x2643b3=_0x58c8c1[_0x5544f1];return _0x2643b3;}import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';export async function generateApiFile(_0x12c264,_0x15e646,_0x26177f,_0x310de6,_0x5a7676,_0x2b95b8,_0x267430){const _0x4345f2=a2_0x2643;if(!_0x26177f)throw new Error(_0x4345f2(0x1bf)+CLI_BIN_NAME+_0x4345f2(0x1d9));const _0x530154=_0x310de6&&!_0x267430,_0x34409c=_0x267430||_0x26177f,_0x188afa=_0x530154?_0x4345f2(0x1c0):'\x22'+_0x34409c+'\x22',_0x1f6e27=!isProduction(_0x5a7676);let _0x317a0d;if(_0x530154)_0x1f6e27?_0x317a0d=_0x4345f2(0x1c8)+_0x188afa+_0x4345f2(0x1d4)+_0x5a7676+_0x4345f2(0x1c3):_0x317a0d='';else{const _0x20abfd=_0x1f6e27?',\x20env:\x20\x22'+_0x5a7676+'\x22':'';_0x317a0d='{\x20apiConfigName:\x20\x22'+_0x34409c+'\x22'+_0x20abfd+'\x20}';}const _0x143868=_0x15e646?_0x15e646+'-api':_0x4345f2(0x1d5),_0x6d6443=_0x15e646?_0x15e646+_0x4345f2(0x1cb):_0x4345f2(0x1c7),_0x46df84=_0x15e646&&!/^app-[a-f0-9]+$/i['test'](_0x15e646)?_0x15e646[_0x4345f2(0x1b4)](/-/g,'_')[_0x4345f2(0x1ce)]():'LOVRABET',_0x558c7d=[];_0x12c264[_0x4345f2(0x1cd)](_0xa516e6=>{const _0x1613a2=_0x4345f2;_0x558c7d[_0x1613a2(0x1d0)]({'datasetCode':_0xa516e6[_0x1613a2(0x1cc)],'tableName':_0xa516e6[_0x1613a2(0x1b5)],'name':_0xa516e6[_0x1613a2(0x1c1)]||'','alias':_0xa516e6[_0x1613a2(0x1bd)]||_0xa516e6[_0x1613a2(0x1ca)]});});const _0xcf162c=fileURLToPath(import.meta.url),_0x9fafb4=a2_0x87d0a4[_0x4345f2(0x1c4)](a2_0x87d0a4[_0x4345f2(0x1b7)](_0xcf162c),'../..'),_0x4c5a60=a2_0x87d0a4[_0x4345f2(0x1d2)](_0x9fafb4,_0x4345f2(0x1d7)),_0x10642b=a2_0x87d0a4[_0x4345f2(0x1d2)](_0x4c5a60,_0x4345f2(0x1bc)),_0x245707=a2_0x87d0a4[_0x4345f2(0x1d2)](_0x4c5a60,'client.ts.tpl'),_0xc85a8=_0x2b95b8;mkdirSync(_0xc85a8,{'recursive':!![]});const _0x410b10=_0x558c7d[0x0]?.['alias'],_0x46412f=readFileSync(_0x10642b,_0x4345f2(0x1cf)),_0xdc0dc8=TemplateReplacer[_0x4345f2(0x1ba)](_0x46412f,_0x26177f,_0x558c7d,_0x410b10,_0x143868,_0x188afa,undefined,_0x46df84),_0x3d2bc7=await a2_0x4e8f0b[_0x4345f2(0x1bb)](_0xdc0dc8,{'parser':_0x4345f2(0x1d1)}),_0x447146=a2_0x87d0a4[_0x4345f2(0x1d2)](_0xc85a8,_0x143868+'.ts');writeFileSync(_0x447146,_0x3d2bc7,{'encoding':_0x4345f2(0x1cf)});const _0x3b0ecd=readFileSync(_0x245707,'utf8'),_0x3de40e=TemplateReplacer[_0x4345f2(0x1ba)](_0x3b0ecd,_0x26177f,_0x558c7d,_0x410b10,_0x143868,_0x188afa,_0x317a0d,_0x46df84),_0x3726a5=await a2_0x4e8f0b[_0x4345f2(0x1bb)](_0x3de40e,{'parser':_0x4345f2(0x1d1)}),_0x57e3b6=a2_0x87d0a4[_0x4345f2(0x1d2)](_0xc85a8,_0x6d6443+_0x4345f2(0x1c9));writeFileSync(_0x57e3b6,_0x3726a5,{'encoding':_0x4345f2(0x1cf)});const _0x1e2081=_0x558c7d[_0x4345f2(0x1b8)];return logger[_0x4345f2(0x1c2)]('init-api',_0x4345f2(0x1b6),undefined,{'apiFile':_0x447146,'clientFile':_0x57e3b6,'modelCount':_0x1e2081,'configName':_0x188afa}),{'modelCount':_0x1e2081,'apiFilePath':_0x447146,'clientFilePath':_0x57e3b6,'configName':_0x188afa};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x37b3d9,_0x4684b6){const _0x447b8f=a3_0x5162,_0x2e8306=_0x37b3d9();while(!![]){try{const _0x109064=parseInt(_0x447b8f(0x14d))/0x1+parseInt(_0x447b8f(0x147))/0x2+parseInt(_0x447b8f(0x14b))/0x3*(parseInt(_0x447b8f(0x14f))/0x4)+-parseInt(_0x447b8f(0x14a))/0x5+-parseInt(_0x447b8f(0x14c))/0x6+parseInt(_0x447b8f(0x152))/0x7+-parseInt(_0x447b8f(0x153))/0x8;if(_0x109064===_0x4684b6)break;else _0x2e8306['push'](_0x2e8306['shift']());}catch(_0x3e2348){_0x2e8306['push'](_0x2e8306['shift']());}}}(a3_0x4ea2,0xeb949));import{getIsSessionValid}from'../auth/is-session-valid.js';function a3_0x5162(_0x2a1701,_0x47ba0a){_0x2a1701=_0x2a1701-0x142;const _0x4ea234=a3_0x4ea2();let _0x516238=_0x4ea234[_0x2a1701];return _0x516238;}import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';function a3_0x4ea2(){const _0x3cd700=['10700984mjSbQz','\x20auth\x20login\x20--yes`\x20in\x20an\x20interactive\x20terminal.','Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','validation','autoYes','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','3792784jFmfiw','!\x20Login\x20failed.','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','5649185gBNgRw','123pNEgxc','8697792qfeZPZ','588773azOfbq','log','115940NQavPB','nonInteractive','No\x20valid\x20session.\x20Login\x20now?','8459353NgHprq'];a3_0x4ea2=function(){return _0x3cd700;};return a3_0x4ea2();}import{confirm}from'@inquirer/prompts';import a3_0xfc0382 from'ora';export async function runAuthServer(_0x4f1933){const _0x3619f7=a3_0x5162,_0x8d3e27=await getIsSessionValid();if(_0x8d3e27){console[_0x3619f7(0x14e)](_0x3619f7(0x146));return;}if(_0x4f1933?.[_0x3619f7(0x150)])throw CliErrors[_0x3619f7(0x144)](_0x3619f7(0x143),'Run\x20`'+CLI_BIN_NAME+_0x3619f7(0x142));const _0x319e1b=_0x4f1933?.[_0x3619f7(0x145)]?!![]:await confirm({'message':_0x3619f7(0x151),'default':!![]});if(!_0x319e1b)return;const _0x412a8d=a3_0xfc0382(_0x3619f7(0x149))['start'](),_0x49c01b=await authServer({'silent':!![]});_0x412a8d['stop'](),_0x49c01b?console[_0x3619f7(0x14e)]('*\x20Login\x20successful!'):console[_0x3619f7(0x14e)](_0x3619f7(0x148));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x268997=a4_0x2585;(function(_0x9adc71,_0x2d6831){const _0x54b1ba=a4_0x2585,_0x1dc9b7=_0x9adc71();while(!![]){try{const _0x52a33c=parseInt(_0x54b1ba(0x115))/0x1*(parseInt(_0x54b1ba(0x11a))/0x2)+parseInt(_0x54b1ba(0x125))/0x3*(-parseInt(_0x54b1ba(0x128))/0x4)+parseInt(_0x54b1ba(0x11b))/0x5+parseInt(_0x54b1ba(0x10a))/0x6*(parseInt(_0x54b1ba(0x121))/0x7)+parseInt(_0x54b1ba(0x12a))/0x8*(-parseInt(_0x54b1ba(0x126))/0x9)+parseInt(_0x54b1ba(0x10d))/0xa*(parseInt(_0x54b1ba(0x10f))/0xb)+-parseInt(_0x54b1ba(0x112))/0xc;if(_0x52a33c===_0x2d6831)break;else _0x1dc9b7['push'](_0x1dc9b7['shift']());}catch(_0x38124e){_0x1dc9b7['push'](_0x1dc9b7['shift']());}}}(a4_0x2bd0,0xda526));import{writeFileSync}from'node:fs';import a4_0x1fc6cb from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';function a4_0x2bd0(){const _0xe4cf7f=['utf-8','📍\x20Login\x20URL:','https://dev.lovrabet.com:','30clauCz','🔐\x20Starting\x20login\x20service...','log','110hnYrtf','then','818587GVHoFQ','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','silent','14903940AaIiYu','catch','error','1657291ERRHsh','listen','end','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','writeHead','2HJuegt','7571375mEspFn','open\x20\x22','text/html;\x20charset=utf-8','/api/auth/get-session','cookie','port','316071GWQtRq','win32','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','headers','6lNtpoU','2331DvUhSd','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','1676580aBFnee','darwin','38344YdgTqy','https://g.yuntooai.com/cert/lovrabet-dev.json','json','platform'];a4_0x2bd0=function(){return _0xe4cf7f;};return a4_0x2bd0();}function a4_0x2585(_0x1f8d25,_0x59bb87){_0x1f8d25=_0x1f8d25-0x107;const _0x2bd01d=a4_0x2bd0();let _0x258520=_0x2bd01d[_0x1f8d25];return _0x258520;}import{getIsSessionValid}from'../auth/is-session-valid.js';import{cookieFile}from'../auth/constant.js';import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export async function authServer(_0x1c5c78){const _0x4b8a2e=a4_0x2585,_0x56d826=_0x1c5c78?.[_0x4b8a2e(0x111)]||![];if(await getIsSessionValid())return!![];const _0x3d8d0a=await(await fetch(_0x4b8a2e(0x12b)))[_0x4b8a2e(0x12c)]();return new Promise(async(_0x42568f,_0x5467b7)=>{const _0x37052b=_0x4b8a2e;let _0x5292b4=0x0;const _0x46b1aa=a4_0x1fc6cb['createServer'](_0x3d8d0a,async(_0x40f7a0,_0x271736)=>{const _0x319f65=a4_0x2585,_0x1265fa=getUserDomain(),_0x586da1=_0x40f7a0[_0x319f65(0x124)][_0x319f65(0x11f)]||'',_0x2f7e43=await fetch(_0x1265fa+_0x319f65(0x11e),{'headers':{'cookie':_0x586da1}})[_0x319f65(0x10e)](_0xc9b668=>_0xc9b668[_0x319f65(0x12c)]()),_0x5b8d27=_0x2f7e43&&_0x2f7e43['session']&&_0x2f7e43['user'];if(_0x5b8d27){writeFileSync(cookieFile,_0x586da1,_0x319f65(0x107)),_0x42568f(!![]);const _0x3a96d2=buildLoginSuccessHtml();_0x271736['writeHead'](0xc8,{'Content-Type':_0x319f65(0x11d)}),_0x271736[_0x319f65(0x117)](_0x3a96d2),_0x46b1aa['close']();}else{const _0x179156=''+encodeURIComponent(_0x319f65(0x109)+_0x5292b4);_0x271736[_0x319f65(0x119)](0x12e,{'location':_0x1265fa+'/sign-in?redirect='+_0x179156}),_0x271736[_0x319f65(0x117)]();return;}});_0x46b1aa[_0x37052b(0x116)](0x0,'127.0.0.1',()=>{const _0x13d5de=_0x37052b,_0x5cf30a=_0x46b1aa['address']();_0x5292b4=typeof _0x5cf30a==='object'&&_0x5cf30a?_0x5cf30a[_0x13d5de(0x120)]:Number(_0x5cf30a);const _0x509923=_0x13d5de(0x109)+_0x5292b4;!_0x56d826&&(console[_0x13d5de(0x10c)](_0x13d5de(0x10b)),console[_0x13d5de(0x10c)](_0x13d5de(0x108),_0x509923),console[_0x13d5de(0x10c)](_0x13d5de(0x123)),console[_0x13d5de(0x10c)](''),console[_0x13d5de(0x10c)](_0x13d5de(0x118)),console[_0x13d5de(0x10c)]('')),openInBrowser(_0x509923)[_0x13d5de(0x10e)](_0x4f992a=>{const _0x2f8b57=_0x13d5de;!_0x56d826&&(_0x4f992a?console['log'](_0x2f8b57(0x127)):(console[_0x2f8b57(0x10c)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console['log']('🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0x509923)),console[_0x2f8b57(0x10c)](''));})[_0x13d5de(0x113)](()=>{const _0x603a6d=_0x13d5de;!_0x56d826&&(console[_0x603a6d(0x10c)](_0x603a6d(0x110)),console['log']('🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0x509923),console[_0x603a6d(0x10c)](''));});}),_0x46b1aa['on'](_0x37052b(0x114),_0x3ec14f=>{const _0x3f2973=_0x37052b;!_0x56d826&&console[_0x3f2973(0x114)]('Auth\x20server\x20error:',_0x3ec14f),_0x5467b7(_0x3ec14f);});});}function openInBrowser(_0x5d74b7){return new Promise(_0x2bc149=>{const _0x2af13d=a4_0x2585,_0x2ccab8=process[_0x2af13d(0x12d)];let _0x533aff;if(_0x2ccab8===_0x2af13d(0x122))_0x533aff='cmd\x20/c\x20start\x20\x22\x22\x20\x22'+_0x5d74b7+'\x22';else _0x2ccab8===_0x2af13d(0x129)?_0x533aff=_0x2af13d(0x11c)+_0x5d74b7+'\x22':_0x533aff='xdg-open\x20\x22'+_0x5d74b7+'\x22';exec(_0x533aff,_0x2bf021=>{_0x2bf021?_0x2bc149(![]):_0x2bc149(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a4_0x268997(0x10c)]('isAuth',isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a5_0x1f6f76=a5_0x17b9;(function(_0x141824,_0x35b2f3){const _0x348bc1=a5_0x17b9,_0x3ec3a8=_0x141824();while(!![]){try{const _0x601cf8=-parseInt(_0x348bc1(0x163))/0x1*(-parseInt(_0x348bc1(0x15b))/0x2)+parseInt(_0x348bc1(0x164))/0x3*(parseInt(_0x348bc1(0x160))/0x4)+parseInt(_0x348bc1(0x165))/0x5+-parseInt(_0x348bc1(0x15d))/0x6*(parseInt(_0x348bc1(0x161))/0x7)+-parseInt(_0x348bc1(0x15f))/0x8+parseInt(_0x348bc1(0x162))/0x9+-parseInt(_0x348bc1(0x15c))/0xa;if(_0x601cf8===_0x35b2f3)break;else _0x3ec3a8['push'](_0x3ec3a8['shift']());}catch(_0x3ba7ae){_0x3ec3a8['push'](_0x3ec3a8['shift']());}}}(a5_0x15af,0x6ef17));import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a5_0x17b9(_0x4b574c,_0x56e135){_0x4b574c=_0x4b574c-0x15b;const _0x15af3a=a5_0x15af();let _0x17b949=_0x15af3a[_0x4b574c];return _0x17b949;}function a5_0x15af(){const _0x46f8e2=['.lovrabet','264872lQPyqS','16HRDBdJ','154455LjfIOy','7582923GAmDfg','1hjazXM','239667kMZBxG','3593120AWzxcQ','61034mFoXko','12030620iaaqrQ','60QqOyas'];a5_0x15af=function(){return _0x46f8e2;};return a5_0x15af();}import{join}from'node:path';export const configDir=join(homedir(),a5_0x1f6f76(0x15e));export const cookieFile=join(configDir,'cookie');mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2db777,_0x50d0d7){var _0x3d4ed0=a6_0x3e32,_0x2dcf15=_0x2db777();while(!![]){try{var _0x5a8d47=parseInt(_0x3d4ed0(0xdf))/0x1*(-parseInt(_0x3d4ed0(0xe3))/0x2)+-parseInt(_0x3d4ed0(0xe1))/0x3*(parseInt(_0x3d4ed0(0xe8))/0x4)+-parseInt(_0x3d4ed0(0xe6))/0x5*(parseInt(_0x3d4ed0(0xe0))/0x6)+parseInt(_0x3d4ed0(0xe7))/0x7+parseInt(_0x3d4ed0(0xde))/0x8+-parseInt(_0x3d4ed0(0xe5))/0x9*(-parseInt(_0x3d4ed0(0xe2))/0xa)+parseInt(_0x3d4ed0(0xe9))/0xb*(parseInt(_0x3d4ed0(0xe4))/0xc);if(_0x5a8d47===_0x50d0d7)break;else _0x2dcf15['push'](_0x2dcf15['shift']());}catch(_0x4ad833){_0x2dcf15['push'](_0x2dcf15['shift']());}}}(a6_0x2e2c,0x67522));import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';function a6_0x3e32(_0x16c20b,_0x5c942d){_0x16c20b=_0x16c20b-0xde;var _0x2e2cd6=a6_0x2e2c();var _0x3e32d4=_0x2e2cd6[_0x16c20b];return _0x3e32d4;}export function getCookie(){var _0x31947c=a6_0x3e32;try{return readFileSync(cookieFile,_0x31947c(0xea));}catch{}return'';}function a6_0x2e2c(){var _0x90619e=['3228XFOZvj','1032Mdjuqn','30hWGvis','8jmHvJl','1152JcugzY','698463UUQtYY','7135LoytXW','2141349wZjegP','8884WEXKWA','142384pkGMDd','utf-8','4041152MWOlDN','82886knuanY'];a6_0x2e2c=function(){return _0x90619e;};return a6_0x2e2c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a7_0x3bf1(){const _0x5154ea=['2128756SiSmwK','/api/auth/get-session','session','2513241ldXRxg','10xNcIgb','4743387JaojjI','utf-8','1497342WQgaUa','7IAylBZ','user','2dEbmeN','json','654182YvKTjy','5401840HqNTFV','3165745XLoJgI'];a7_0x3bf1=function(){return _0x5154ea;};return a7_0x3bf1();}(function(_0x3d141a,_0x3209a9){const _0x3cfea4=a7_0x5e27,_0x1c0eef=_0x3d141a();while(!![]){try{const _0x42248c=-parseInt(_0x3cfea4(0x7a))/0x1*(-parseInt(_0x3cfea4(0x7c))/0x2)+-parseInt(_0x3cfea4(0x82))/0x3+parseInt(_0x3cfea4(0x7f))/0x4+parseInt(_0x3cfea4(0x7e))/0x5+-parseInt(_0x3cfea4(0x77))/0x6+parseInt(_0x3cfea4(0x78))/0x7*(-parseInt(_0x3cfea4(0x7d))/0x8)+parseInt(_0x3cfea4(0x84))/0x9*(parseInt(_0x3cfea4(0x83))/0xa);if(_0x42248c===_0x3209a9)break;else _0x1c0eef['push'](_0x1c0eef['shift']());}catch(_0x50ac2a){_0x1c0eef['push'](_0x1c0eef['shift']());}}}(a7_0x3bf1,0x8e95d));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a7_0x5e27(_0x528e6f,_0x5dba4e){_0x528e6f=_0x528e6f-0x77;const _0x3bf1e6=a7_0x3bf1();let _0x5e2787=_0x3bf1e6[_0x528e6f];return _0x5e2787;}import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0x14b359=a7_0x5e27;try{if(!existsSync(cookieFile))return null;const _0x156bfd=readFileSync(cookieFile,_0x14b359(0x85)),_0xb10fa9=await fetch(getUserDomain()+_0x14b359(0x80),{'headers':{'cookie':_0x156bfd}});if(!_0xb10fa9['ok'])return null;const _0x37282b=await _0xb10fa9[_0x14b359(0x7b)]();if(!_0x37282b[_0x14b359(0x81)]||!_0x37282b[_0x14b359(0x79)])return null;return _0x37282b;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x454bca,_0x30e8d4){const _0x24a2f5=a8_0x3861,_0x4b2dbb=_0x454bca();while(!![]){try{const _0x5790d0=-parseInt(_0x24a2f5(0x8a))/0x1*(parseInt(_0x24a2f5(0x8c))/0x2)+-parseInt(_0x24a2f5(0x95))/0x3+-parseInt(_0x24a2f5(0x93))/0x4*(-parseInt(_0x24a2f5(0x97))/0x5)+-parseInt(_0x24a2f5(0x8f))/0x6+-parseInt(_0x24a2f5(0x90))/0x7+parseInt(_0x24a2f5(0x8d))/0x8+parseInt(_0x24a2f5(0x98))/0x9;if(_0x5790d0===_0x30e8d4)break;else _0x4b2dbb['push'](_0x4b2dbb['shift']());}catch(_0x58ced2){_0x4b2dbb['push'](_0x4b2dbb['shift']());}}}(a8_0x2498,0x6e01a));function a8_0x3861(_0x2dd21c,_0x3b7a9c){_0x2dd21c=_0x2dd21c-0x8a;const _0x24986d=a8_0x2498();let _0x38613d=_0x24986d[_0x2dd21c];return _0x38613d;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x19d582=a8_0x3861;try{if(!existsSync(cookieFile))return![];const _0x3b78fd=readFileSync(cookieFile,_0x19d582(0x8b)),_0x2044d4=await fetch(getUserDomain()+_0x19d582(0x92),{'headers':{'cookie':_0x3b78fd}})[_0x19d582(0x8e)](_0x5ee678=>_0x5ee678[_0x19d582(0x96)]());return _0x2044d4&&_0x2044d4[_0x19d582(0x91)]&&_0x2044d4[_0x19d582(0x94)];}catch{}return![];}function a8_0x2498(){const _0x296736=['json','230XioLzY','9034488LHdVfS','30309AvbmmG','utf-8','44WrAePt','4878856yMnezE','then','2751042ilzefR','600502sgLcot','session','/api/auth/get-session','65032RJKAbV','user','2099640dnkNvV'];a8_0x2498=function(){return _0x296736;};return a8_0x2498();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x1e61d,_0x45240a){const _0x15db43=a9_0x95dc,_0x3aebc6=_0x1e61d();while(!![]){try{const _0x598e23=parseInt(_0x15db43(0xff))/0x1+parseInt(_0x15db43(0xfd))/0x2+-parseInt(_0x15db43(0x100))/0x3+-parseInt(_0x15db43(0xf6))/0x4*(-parseInt(_0x15db43(0xfb))/0x5)+parseInt(_0x15db43(0xfc))/0x6+parseInt(_0x15db43(0xf8))/0x7*(-parseInt(_0x15db43(0xf7))/0x8)+parseInt(_0x15db43(0xfe))/0x9;if(_0x598e23===_0x45240a)break;else _0x3aebc6['push'](_0x3aebc6['shift']());}catch(_0x3812d3){_0x3aebc6['push'](_0x3aebc6['shift']());}}}(a9_0x4e74,0x8634e));function a9_0x4e74(){const _0x3e0b1a=['Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','<!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>','10Jxqvdj','5273742YCsTnX','215988hZBwar','2827206OVAlEb','82598KMCbbP','2588202cnXXyH','64524wXebZw','8yCJpet','24507CXOKnB'];a9_0x4e74=function(){return _0x3e0b1a;};return a9_0x4e74();}function a9_0x95dc(_0x3d5c15,_0x10fa9d){_0x3d5c15=_0x3d5c15-0xf6;const _0x4e74a5=a9_0x4e74();let _0x95dcd7=_0x4e74a5[_0x3d5c15];return _0x95dcd7;}export function buildLoginSuccessHtml(){const _0x55d796=a9_0x95dc,_0x507044=_0x55d796(0xf9);return _0x55d796(0xfa)+_0x507044+'</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
|
-
(function(
|
|
1
|
+
(function(_0x372c42,_0x5553db){var _0x28b16d=a10_0x15de,_0x541f00=_0x372c42();while(!![]){try{var _0x581710=-parseInt(_0x28b16d(0x127))/0x1*(parseInt(_0x28b16d(0x120))/0x2)+-parseInt(_0x28b16d(0x12a))/0x3+parseInt(_0x28b16d(0x12b))/0x4+-parseInt(_0x28b16d(0x124))/0x5*(parseInt(_0x28b16d(0x121))/0x6)+parseInt(_0x28b16d(0x122))/0x7*(parseInt(_0x28b16d(0x123))/0x8)+parseInt(_0x28b16d(0x125))/0x9*(parseInt(_0x28b16d(0x128))/0xa)+parseInt(_0x28b16d(0x129))/0xb;if(_0x581710===_0x5553db)break;else _0x541f00['push'](_0x541f00['shift']());}catch(_0x231b91){_0x541f00['push'](_0x541f00['shift']());}}}(a10_0x14fd,0x1cb9f));function a10_0x15de(_0x507a89,_0x2bfd51){_0x507a89=_0x507a89-0x120;var _0x14fd6b=a10_0x14fd();var _0x15debb=_0x14fd6b[_0x507a89];return _0x15debb;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';function a10_0x14fd(){var _0x225b4a=['190CirrAB','2583KhqZpp','log','1zNtgUH','2500NXosgj','2704141qpcbOY','674493LSACKm','854320hROhXX','✓\x20Logged\x20out','17414KmDBlX','34722RsRuYm','14hlNoAH','159784thmoCL'];a10_0x14fd=function(){return _0x225b4a;};return a10_0x14fd();}export function logout(){var _0x245614=a10_0x15de;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x245614(0x126)](_0x245614(0x12c))):console['log']('!\x20Not\x20logged\x20in');}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a11_0x3dbf(_0x7f78c6,_0x1a42dd){_0x7f78c6=_0x7f78c6-0xf4;const _0xe43db7=a11_0xe43d();let _0x3dbfe8=_0xe43db7[_0x7f78c6];return _0x3dbfe8;}(function(_0x260651,_0x18f1d9){const _0x3d9e8d=a11_0x3dbf,_0x4591a5=_0x260651();while(!![]){try{const _0x1d54b7=-parseInt(_0x3d9e8d(0xfb))/0x1*(-parseInt(_0x3d9e8d(0xf7))/0x2)+-parseInt(_0x3d9e8d(0xf9))/0x3*(-parseInt(_0x3d9e8d(0xf8))/0x4)+parseInt(_0x3d9e8d(0xfc))/0x5+parseInt(_0x3d9e8d(0xf6))/0x6+-parseInt(_0x3d9e8d(0xf5))/0x7*(-parseInt(_0x3d9e8d(0xfd))/0x8)+-parseInt(_0x3d9e8d(0xfa))/0x9+-parseInt(_0x3d9e8d(0xf4))/0xa;if(_0x1d54b7===_0x18f1d9)break;else _0x4591a5['push'](_0x4591a5['shift']());}catch(_0x14b3f5){_0x4591a5['push'](_0x4591a5['shift']());}}}(a11_0xe43d,0xb234e));function a11_0xe43d(){const _0x1d838d=['13988BFXYUm','4XQKyAH','967749HFZZca','1458558EiEhJm','108ZIBVBK','4506405wippug','24HoFtxS','29769610BSNaGY','2572633DLeFzJ','4723104bNOopV'];a11_0xe43d=function(){return _0x1d838d;};return a11_0xe43d();}export const dynamicCliFlags={'enableBffSave':{'type':'boolean'}};
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a12_0x44fccf=a12_0x1ba0;(function(_0x432f34,_0x4fae02){const _0xd0419c=a12_0x1ba0,_0x20a28f=_0x432f34();while(!![]){try{const _0x21a947=-parseInt(_0xd0419c(0x1a5))/0x1+-parseInt(_0xd0419c(0x185))/0x2*(-parseInt(_0xd0419c(0x1a0))/0x3)+parseInt(_0xd0419c(0x1a8))/0x4+parseInt(_0xd0419c(0x199))/0x5+-parseInt(_0xd0419c(0x1a9))/0x6+parseInt(_0xd0419c(0x18d))/0x7*(parseInt(_0xd0419c(0x193))/0x8)+-parseInt(_0xd0419c(0x18a))/0x9*(parseInt(_0xd0419c(0x19e))/0xa);if(_0x21a947===_0x4fae02)break;else _0x20a28f['push'](_0x20a28f['shift']());}catch(_0x3ff728){_0x20a28f['push'](_0x20a28f['shift']());}}}(a12_0x175f,0xa873e));import a12_0x1e18d2 from'meow';import{showHelp}from'./help.js';function a12_0x175f(){const _0x35cee0=['wildcardDef','5518424IuBzuT','2408454GjbODy','./constant/env.js','cancelled','code','name','./context.js','slice','service','help','runtimeDomain','write','string','394720tQyddR','userDomain','unknown','raw','error','801JKSVRE','`\x20in\x20new\x20scripts.\x0a','Error:\x20','7treKwx','command','unknown_service','`\x20has\x20been\x20moved\x20to\x20`','unknownCommand','stderr','229072mHhlBO','exitCode','hint','env','Unexpected\x20error:','ExitPromptError','2059010VHlifZ','global','input','`\x20in\x20v2.0.\x0a','./constant/domain.js','76620tTCXTC','now','9MawlxC','./cli-flags.js','defaultCommand','log','apiDomain','638813yENeDf','\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a'];a12_0x175f=function(){return _0x35cee0;};return a12_0x175f();}import{CliError,CliErrors}from'./errors.js';import{isKnownService,getServiceEntry,findDefinition,deprecatedAliases,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';let dynamicCliFlags=null;try{dynamicCliFlags=(await import(a12_0x44fccf(0x1a1)))['dynamicCliFlags'];}catch{}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!==a12_0x44fccf(0x187)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[a12_0x44fccf(0x1af)](0x0,0xa)+')':VERSION,cli=a12_0x1e18d2(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0x51ff00=a12_0x44fccf;let _0x208fca=cli[_0x51ff00(0x19b)][0x0],_0x475b9b=cli[_0x51ff00(0x19b)][0x1];const _0x5ba600=cli['flags'];if(!_0x208fca){await reportCliHelpTrace(_0x51ff00(0x19a)),showHelp();return;}const _0x35af06=deprecatedAliases[_0x208fca];if(_0x35af06&&!isKnownService(_0x208fca)){const _0x18883f=_0x475b9b?CLI_BIN_NAME+'\x20'+_0x208fca+'\x20'+_0x475b9b:CLI_BIN_NAME+'\x20'+_0x208fca,_0x1fbfc2=CLI_BIN_NAME+'\x20'+_0x35af06[_0x51ff00(0x1b0)]+'\x20'+_0x35af06[_0x51ff00(0x18e)];console['error']('⚠\x20`'+_0x18883f+_0x51ff00(0x190)+_0x1fbfc2+_0x51ff00(0x19c)+_0x51ff00(0x1a6)),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x208fca)){await reportCliHelpTrace(_0x51ff00(0x18f),{'service':_0x208fca}),showHelp();return;}const _0x339062=getServiceEntry(_0x208fca);if(_0x5ba600[_0x51ff00(0x196)]&&typeof _0x5ba600[_0x51ff00(0x196)]===_0x51ff00(0x184)){const {initEnv:_0x29bde6}=await import(_0x51ff00(0x1aa));_0x29bde6(_0x5ba600[_0x51ff00(0x196)]);}const {buildConfigFromFlags:_0x87acdd}=await import(_0x51ff00(0x1ae)),_0x4a2d59=_0x87acdd(_0x5ba600);if(!_0x5ba600[_0x51ff00(0x196)]&&_0x4a2d59[_0x51ff00(0x196)]){const {initEnv:_0x51a03f}=await import(_0x51ff00(0x1aa));_0x51a03f(_0x4a2d59[_0x51ff00(0x196)]);}if(_0x4a2d59['raw']?.[_0x51ff00(0x1a4)]||_0x4a2d59[_0x51ff00(0x188)]?.[_0x51ff00(0x186)]||_0x4a2d59[_0x51ff00(0x188)]?.['runtimeDomain']){const {initDomains:_0x57e7f9}=await import(_0x51ff00(0x19d));_0x57e7f9({'apiDomain':_0x4a2d59['raw'][_0x51ff00(0x1a4)]||undefined,'userDomain':_0x4a2d59[_0x51ff00(0x188)][_0x51ff00(0x186)]||undefined,'runtimeDomain':_0x4a2d59[_0x51ff00(0x188)][_0x51ff00(0x182)]||undefined});}if(!_0x475b9b){if(_0x5ba600[_0x51ff00(0x1b1)]){printServiceHelp(_0x208fca);return;}if(_0x339062['defaultCommand'])_0x475b9b=_0x339062[_0x51ff00(0x1a2)];else{if(_0x339062[_0x51ff00(0x1a7)]){await dispatchDeclarative(_0x339062[_0x51ff00(0x1a7)],_0x208fca,'',[],_0x5ba600,_0x4a2d59);return;}else{printServiceHelp(_0x208fca);return;}}}const _0x5f279b=resolveDeprecatedSubcommand(_0x208fca,_0x475b9b);if(_0x5f279b){const _0x9b01fb=CLI_BIN_NAME+'\x20'+_0x208fca+'\x20'+_0x475b9b,_0x5e847a=CLI_BIN_NAME+'\x20'+_0x208fca+'\x20'+_0x5f279b;console['error']('⚠\x20`'+_0x9b01fb+'`\x20is\x20an\x20alias\x20of\x20`'+_0x5e847a+'`;\x20prefer\x20`'+_0x5e847a+_0x51ff00(0x18b)),_0x475b9b=_0x5f279b;}if(_0x5ba600['help']&&!findDefinition(_0x208fca,_0x475b9b)){printServiceHelp(_0x208fca);return;}{let _0x166d4a=findDefinition(_0x208fca,_0x475b9b),_0x12d056=cli[_0x51ff00(0x19b)][_0x51ff00(0x1af)](0x2);if(!_0x166d4a){if(_0x339062[_0x51ff00(0x1a7)]){if(_0x5ba600[_0x51ff00(0x1b1)]){console[_0x51ff00(0x1a3)](generateCommandHelp(_0x339062[_0x51ff00(0x1a7)]));return;}_0x166d4a=_0x339062[_0x51ff00(0x1a7)],_0x12d056=[_0x475b9b,...cli[_0x51ff00(0x19b)][_0x51ff00(0x1af)](0x2)];}else{printServiceHelp(_0x208fca),await handleErrorAsync(CliErrors[_0x51ff00(0x191)](_0x208fca+'\x20'+_0x475b9b));return;}}if(_0x5ba600[_0x51ff00(0x1b1)]){console['log'](generateCommandHelp(_0x166d4a));return;}await dispatchDeclarative(_0x166d4a,_0x208fca,_0x475b9b,_0x12d056,_0x5ba600,_0x4a2d59);}}function a12_0x1ba0(_0x1b27a4,_0xd75e82){_0x1b27a4=_0x1b27a4-0x182;const _0x175f7e=a12_0x175f();let _0x1ba022=_0x175f7e[_0x1b27a4];return _0x1ba022;}async function dispatchDeclarative(_0x50d8ba,_0x54f0ef,_0x4a16ea,_0x1d42e2,_0x565608,_0x44b798){const _0x2a4571=a12_0x44fccf,_0x41a2ea=Date[_0x2a4571(0x19f)]();let _0x224785;try{await runCommand(_0x50d8ba,createPipelineEnv(_0x44b798,_0x565608,_0x1d42e2));}catch(_0x5c202b){_0x224785=_0x5c202b;}await reportCommandTrace({'service':_0x54f0ef,'command':_0x4a16ea,'flags':_0x565608,'durationMs':Date['now']()-_0x41a2ea,'error':_0x224785});if(_0x224785)await handleErrorAsync(_0x224785);}function printServiceHelp(_0x37ba1f){const _0x75a673=a12_0x44fccf;console[_0x75a673(0x1a3)](generateServiceHelp(_0x37ba1f));}async function handleErrorAsync(_0x1b42a0){const _0x141685=a12_0x44fccf;if(_0x1b42a0 instanceof Error&&_0x1b42a0[_0x141685(0x1ad)]===_0x141685(0x198))return process[_0x141685(0x192)][_0x141685(0x183)]('\x0aCancelled.\x0a'),await exitWithOtelShutdown(0x0);if(_0x1b42a0 instanceof CliError){if(_0x1b42a0[_0x141685(0x1ac)]===_0x141685(0x1ab))return process['stderr'][_0x141685(0x183)]('\x0a'+_0x1b42a0['message']+'\x0a'),await exitWithOtelShutdown(0x0);console[_0x141685(0x189)](_0x141685(0x18c)+_0x1b42a0['message']);if(_0x1b42a0[_0x141685(0x195)])console['error']('Hint:\x20'+_0x1b42a0[_0x141685(0x195)]);return await exitWithOtelShutdown(_0x1b42a0[_0x141685(0x194)]);}return console[_0x141685(0x189)](_0x141685(0x197),_0x1b42a0),await exitWithOtelShutdown(0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a13_0x4f2f(){const _0x4d3b16=['succeed','\x20\x20•\x20','./docs','913698HkEsBZ','output','success','datasetcode','map','filter','\x0d\x20\x20[','stdout','generate','27QucOLb','join','7899NJFazr','cookie','1299295EreEEB','some','.md','4OFfxDP','appCode','!\x20No\x20datasets\x20found.','error','message','Failed\x20to\x20fetch\x20datasets','params','\x20doc(s)\x20failed','Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','Fetching\x20dataset\x20list\x20for\x20','Doc\x20generation\x20complete:\x20','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','datasetCode','padStart','str','106712ltxKZT','\x20succeeded,\x20','\x1b[90m*\x20Generating\x20docs\x20for:\x20','\x1b[0m','string','length','start','parse','183568GBCAyY','trim','object','validation','\x1b[90m*\x20Filtered\x20','fail','\x20doc(s)\x20in\x20','42WFvZdQ','None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20','20tMJVHh','838904vfaHKr','2735826RUVjmU','has'];a13_0x4f2f=function(){return _0x4d3b16;};return a13_0x4f2f();}const a13_0x393ab7=a13_0x556b;(function(_0xee1247,_0x342fe6){const _0x1f2b96=a13_0x556b,_0x4ad6d1=_0xee1247();while(!![]){try{const _0x25b938=parseInt(_0x1f2b96(0xcc))/0x1*(parseInt(_0x1f2b96(0xd1))/0x2)+-parseInt(_0x1f2b96(0xca))/0x3*(-parseInt(_0x1f2b96(0xb1))/0x4)+parseInt(_0x1f2b96(0xce))/0x5+-parseInt(_0x1f2b96(0xbc))/0x6+parseInt(_0x1f2b96(0xb8))/0x7*(parseInt(_0x1f2b96(0xa9))/0x8)+parseInt(_0x1f2b96(0xc1))/0x9+-parseInt(_0x1f2b96(0xba))/0xa*(parseInt(_0x1f2b96(0xbb))/0xb);if(_0x25b938===_0x342fe6)break;else _0x4ad6d1['push'](_0x4ad6d1['shift']());}catch(_0x1a8c0c){_0x4ad6d1['push'](_0x4ad6d1['shift']());}}}(a13_0x4f2f,0x3fe6e));import a13_0x4aeecf from'ora';function a13_0x556b(_0x1620fb,_0x3a53aa){_0x1620fb=_0x1620fb-0xa0;const _0x4f2f6e=a13_0x4f2f();let _0x556bad=_0x4f2f6e[_0x1620fb];return _0x556bad;}import{fetchModelList}from'../../api/fetch-model-list.js';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':'api','command':a13_0x393ab7(0xc9),'description':a13_0x393ab7(0xa1),'risk':'write','requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a13_0x393ab7(0xc2),'type':'string','description':'Output\x20directory\x20(default:\x20./docs)'},{'name':'datasetcode','type':a13_0x393ab7(0xad),'description':a13_0x393ab7(0xa5)},{'name':a13_0x393ab7(0xd7),'type':'string','description':'Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)'}],async 'execute'(_0x499acf){const _0x543987=a13_0x393ab7,_0x2f7c05=_0x499acf[_0x543987(0xa8)](_0x543987(0xc2))||_0x543987(0xc0),_0x4ffbe1=_0x499acf['str'](_0x543987(0xc4)),_0x29a905=_0x499acf[_0x543987(0xa8)](_0x543987(0xd7));let _0x3ee2c6;if(_0x29a905)try{_0x3ee2c6=JSON[_0x543987(0xb0)](_0x29a905);if(typeof _0x3ee2c6!==_0x543987(0xb3)||_0x3ee2c6===null||Array['isArray'](_0x3ee2c6))throw new Error('must\x20be\x20a\x20JSON\x20object');}catch(_0x17c0df){throw CliErrors[_0x543987(0xb4)]('Invalid\x20--params:\x20'+(_0x17c0df instanceof Error?_0x17c0df[_0x543987(0xd5)]:String(_0x17c0df)),'Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27');}let _0x230e9d;if(_0x4ffbe1){const _0x10c7c4=_0x4ffbe1['split'](',')[_0x543987(0xc5)](_0x232f6a=>_0x232f6a[_0x543987(0xb2)]())['filter'](_0x4ebad1=>_0x4ebad1['length']>0x0);if(_0x10c7c4['length']===0x0)throw CliErrors[_0x543987(0xb4)]('--datasetcode\x20cannot\x20be\x20empty.');_0x230e9d=new Set(_0x10c7c4),writeCliSideChannelLine(_0x543987(0xab)+_0x10c7c4[_0x543987(0xcb)](',\x20')+_0x543987(0xac));}const _0x15c62c=a13_0x4aeecf(_0x543987(0xa3)+_0x499acf[_0x543987(0xd2)]+'...')[_0x543987(0xaf)]();let _0x1eb7ed;try{({configArray:_0x1eb7ed}=await fetchModelList(_0x499acf[_0x543987(0xd2)],_0x499acf[_0x543987(0xcd)]),_0x15c62c[_0x543987(0xbe)]('Fetched\x20'+_0x1eb7ed[_0x543987(0xae)]+'\x20dataset(s)'));}catch(_0x4f04a7){_0x15c62c[_0x543987(0xb6)](_0x543987(0xd6));throw _0x4f04a7;}if(_0x1eb7ed['length']===0x0)return writeCliSideChannelLine(_0x543987(0xd3)),{'ok':!![]};let _0x1b8b80=_0x1eb7ed;if(_0x230e9d){_0x1b8b80=_0x1eb7ed[_0x543987(0xc6)](_0x2700cb=>_0x230e9d[_0x543987(0xbd)](_0x2700cb['datasetCode']));const _0x398abb=[..._0x230e9d][_0x543987(0xc6)](_0x38296c=>!_0x1eb7ed[_0x543987(0xcf)](_0x12cca4=>_0x12cca4[_0x543987(0xa6)]===_0x38296c));_0x398abb[_0x543987(0xae)]>0x0&&writeCliSideChannelLine(_0x543987(0xa2)+_0x398abb[_0x543987(0xcb)](',\x20')+_0x543987(0xac));if(_0x1b8b80['length']===0x0)throw CliErrors[_0x543987(0xb4)](_0x543987(0xb9)+[..._0x230e9d][_0x543987(0xcb)](',\x20'));writeCliSideChannelLine(_0x543987(0xb5)+_0x1b8b80[_0x543987(0xae)]+'\x20of\x20'+_0x1eb7ed[_0x543987(0xae)]+'\x20dataset(s)\x1b[0m');}let _0x770e90=0x0;const _0x3ec6c8=await generateDatasetDocs(_0x1b8b80,_0x499acf[_0x543987(0xd2)],_0x499acf[_0x543987(0xcd)],_0x2f7c05,(_0x485ae5,_0x2d93a4,_0x318f3f)=>{const _0x561ec2=_0x543987;_0x770e90=_0x485ae5,process[_0x561ec2(0xc8)]['write'](_0x561ec2(0xc7)+String(_0x485ae5)[_0x561ec2(0xa7)](String(_0x2d93a4)['length'])+'/'+_0x2d93a4+']\x20'+_0x318f3f+_0x561ec2(0xd0));},_0x3ee2c6);if(_0x770e90>0x0)process['stdout']['write']('\x0a');const _0x223422=_0x3ec6c8[_0x543987(0xc6)](_0x109ed0=>_0x109ed0[_0x543987(0xc3)])[_0x543987(0xae)],_0x4da776=_0x3ec6c8[_0x543987(0xc6)](_0x35e980=>!_0x35e980['success'])[_0x543987(0xae)];writeCliSideChannelLine(''),writeCliSideChannelLine('✓\x20Generated\x20'+_0x223422+_0x543987(0xb7)+_0x2f7c05);if(_0x4da776>0x0){writeCliSideChannelLine('!\x20'+_0x4da776+_0x543987(0xa0));for(const _0x3f9b07 of _0x3ec6c8[_0x543987(0xc6)](_0x3b1334=>!_0x3b1334[_0x543987(0xc3)])){writeCliSideChannelLine(_0x543987(0xbf)+_0x3f9b07['datasetName']+'\x20('+_0x3f9b07[_0x543987(0xa6)]+'):\x20'+_0x3f9b07[_0x543987(0xd4)]);}}return{'ok':_0x4da776===0x0,'message':_0x4da776>0x0?'Doc\x20generation:\x20'+_0x223422+_0x543987(0xaa)+_0x4da776+'\x20failed':_0x543987(0xa4)+_0x223422+'\x20file(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a14_0x3e1a(){const _0x1179d1=['7952688ITWpcq','5ZOdLoz','5094516psNFUZ','282186OYatop','162976DlJMkB','4813260cViUTJ','1dHqURC','507992jmznXW','293520hdADqr','70Qpqxdk'];a14_0x3e1a=function(){return _0x1179d1;};return a14_0x3e1a();}(function(_0x42e45a,_0x5325af){const _0x47eff6=a14_0xf4eb,_0x2b63f5=_0x42e45a();while(!![]){try{const _0x195847=-parseInt(_0x47eff6(0x1be))/0x1*(-parseInt(_0x47eff6(0x1bc))/0x2)+-parseInt(_0x47eff6(0x1c0))/0x3+-parseInt(_0x47eff6(0x1bf))/0x4+-parseInt(_0x47eff6(0x1c3))/0x5*(-parseInt(_0x47eff6(0x1bd))/0x6)+-parseInt(_0x47eff6(0x1c4))/0x7+parseInt(_0x47eff6(0x1c2))/0x8+-parseInt(_0x47eff6(0x1bb))/0x9*(parseInt(_0x47eff6(0x1c1))/0xa);if(_0x195847===_0x5325af)break;else _0x2b63f5['push'](_0x2b63f5['shift']());}catch(_0x45e62b){_0x2b63f5['push'](_0x2b63f5['shift']());}}}(a14_0x3e1a,0xac490));import{apiList}from'../../commands/api/list.js';import{apiPull}from'../../commands/api/pull.js';import{apiGenerate}from'../../commands/api/generate.js';function a14_0xf4eb(_0x362348,_0x198c7e){_0x362348=_0x362348-0x1bb;const _0x3e1a1d=a14_0x3e1a();let _0xf4eba6=_0x3e1a1d[_0x362348];return _0xf4eba6;}export const apiDefinitions=[apiList,apiPull,apiGenerate];
|
package/lib/commands/api/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x220f6e=a15_0x22b3;(function(_0x2fa8f1,_0x1c0d40){const _0x3cf209=a15_0x22b3,_0x45ab36=_0x2fa8f1();while(!![]){try{const _0x120bde=parseInt(_0x3cf209(0x200))/0x1+-parseInt(_0x3cf209(0x1f0))/0x2+-parseInt(_0x3cf209(0x1fb))/0x3*(parseInt(_0x3cf209(0x1f7))/0x4)+-parseInt(_0x3cf209(0x1f6))/0x5+parseInt(_0x3cf209(0x1f8))/0x6+-parseInt(_0x3cf209(0x1f3))/0x7*(parseInt(_0x3cf209(0x1ff))/0x8)+parseInt(_0x3cf209(0x1f2))/0x9;if(_0x120bde===_0x1c0d40)break;else _0x45ab36['push'](_0x45ab36['shift']());}catch(_0xf18fac){_0x45ab36['push'](_0x45ab36['shift']());}}}(a15_0x5900,0x2128a));function a15_0x5900(){const _0x49f965=['16NgULEq','124068LRYJVF','isDefault','cookie','env','rawFlags','167068NayLYy','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','5995359NYMsXv','661913SLGhDq','List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','map','1105665doQmat','61852Jsnlza','613530omZwsn','appCode','name','51RNdXRS','boolean','global','appcode'];a15_0x5900=function(){return _0x49f965;};return a15_0x5900();}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';function a15_0x22b3(_0x2fd666,_0x5aa7ea){_0x2fd666=_0x2fd666-0x1ec;const _0x59008e=a15_0x5900();let _0x22b34d=_0x59008e[_0x2fd666];return _0x22b34d;}export const apiList={'service':'api','command':'list','description':a15_0x220f6e(0x1f4),'risk':'read','requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0x220f6e(0x1fd),'type':a15_0x220f6e(0x1fc),'description':a15_0x220f6e(0x1f1),'default':![]}],async 'execute'(_0xbb7086){const _0x21cd3c=a15_0x220f6e,_0x1de39d=_0xbb7086[_0x21cd3c(0x1ef)]['appcode']?String(_0xbb7086[_0x21cd3c(0x1ef)][_0x21cd3c(0x1fe)]):undefined,_0xd0191a=resolveTargetApps(_0xbb7086,_0x1de39d);if(_0xd0191a){const _0x3837a7=[];for(const _0x435635 of _0xd0191a){const _0x188998=_0x435635[_0x21cd3c(0x1ed)]||_0xbb7086[_0x21cd3c(0x1ed)],_0x1e3881=_0x435635[_0x21cd3c(0x1ee)]||'production';initEnv(_0x1e3881);const {configArray:_0xdb5796}=await fetchModelList(_0x435635[_0x21cd3c(0x1fe)],_0x188998);_0x3837a7['push'](..._0xdb5796[_0x21cd3c(0x1f5)](_0x554545=>({..._0x554545,'_appName':_0x435635[_0x21cd3c(0x1fa)],'_appCode':_0x435635[_0x21cd3c(0x1fe)],'_env':_0x1e3881,'_isDefault':_0x435635[_0x21cd3c(0x1ec)]})));}return{'ok':!![],'data':_0x3837a7};}const {configArray:_0x273aec}=await fetchModelList(_0xbb7086[_0x21cd3c(0x1f9)],_0xbb7086['cookie']);return{'ok':!![],'data':_0x273aec};}};
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x5f4810=a16_0x123c;(function(_0xae577d,_0x4e0540){const _0x23cda8=a16_0x123c,_0x513423=_0xae577d();while(!![]){try{const _0x1203f2=parseInt(_0x23cda8(0x1da))/0x1+-parseInt(_0x23cda8(0x1b4))/0x2+parseInt(_0x23cda8(0x1d7))/0x3*(parseInt(_0x23cda8(0x1df))/0x4)+-parseInt(_0x23cda8(0x1e6))/0x5+-parseInt(_0x23cda8(0x1e1))/0x6*(-parseInt(_0x23cda8(0x1cd))/0x7)+parseInt(_0x23cda8(0x1c0))/0x8*(-parseInt(_0x23cda8(0x1d9))/0x9)+parseInt(_0x23cda8(0x1b1))/0xa;if(_0x1203f2===_0x4e0540)break;else _0x513423['push'](_0x513423['shift']());}catch(_0x3d594){_0x513423['push'](_0x513423['shift']());}}}(a16_0x4aef,0x5eb44));import a16_0x2c200a from'ora';import a16_0x2bc310 from'node:path';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';function a16_0x4aef(){const _0x22d84e=['Pulled\x20','api','\x20succeeded,\x20','...','start','21VaXGCQ','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','9kLlrqI','28059ozLbVY','str','modelCount','appCode','Pulling\x20API\x20config\x20for\x20','357920qpfWhH','production','354LEZSzP','env','\x20failed','includes','length','2408265yPNiUE','-client','slice','6792990HoxrDa','split','Output\x20directory\x20(default:\x20','1082406wjOsNN','rawFlags','global','apiDir','\x20dataset(s),\x20generated\x20','.ts','pull','\x20app(s)\x20failed','isDefault',')...','output','join','974744VwpRIp','Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20(','clientFilePath','Done:\x20','client','fail','boolean','\x20\x20•\x20','appcode','cookie','write','string','name','23597tsKOrf','succeed','-api','\x20model(s)','message'];a16_0x4aef=function(){return _0x22d84e;};return a16_0x4aef();}import{resolveTargetApps}from'../../commands/api/shared.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a16_0x123c(_0x48ff97,_0x5e78b1){_0x48ff97=_0x48ff97-0x1b0;const _0x4aef65=a16_0x4aef();let _0x123c2c=_0x4aef65[_0x48ff97];return _0x123c2c;}export const apiPull={'service':a16_0x5f4810(0x1d3),'command':a16_0x5f4810(0x1ba),'description':a16_0x5f4810(0x1c1)+DEFAULT_API_DIR+'/)','risk':a16_0x5f4810(0x1ca),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a16_0x5f4810(0x1be),'type':a16_0x5f4810(0x1cb),'description':a16_0x5f4810(0x1b3)+DEFAULT_API_DIR+'/)'},{'name':a16_0x5f4810(0x1b6),'type':a16_0x5f4810(0x1c6),'description':a16_0x5f4810(0x1d8),'default':![]}],async 'execute'(_0x2b47b5){const _0x171bfb=a16_0x5f4810,_0x10a201=_0x2b47b5[_0x171bfb(0x1b5)][_0x171bfb(0x1c8)]?String(_0x2b47b5[_0x171bfb(0x1b5)][_0x171bfb(0x1c8)]):undefined,_0x452e28=_0x2b47b5[_0x171bfb(0x1db)]('output')||undefined,_0x28c21c=resolveTargetApps(_0x2b47b5,_0x10a201);if(_0x28c21c){let _0x2ab8a2=0x0,_0x56835c=0x0;for(const _0x37aa47 of _0x28c21c){const _0x45085d=_0x37aa47['cookie']||_0x2b47b5[_0x171bfb(0x1c9)],_0x4940b3=_0x37aa47[_0x171bfb(0x1e2)]||_0x171bfb(0x1e0);initEnv(_0x4940b3);const _0x332149=_0x37aa47[_0x171bfb(0x1b7)]||_0x452e28||_0x2b47b5['apiDir']||DEFAULT_API_DIR,_0x49f22d=_0x37aa47[_0x171bfb(0x1bc)]?'':_0x37aa47[_0x171bfb(0x1cc)]||_0x37aa47['appcode'],_0x11c0e7=a16_0x2c200a('Pulling\x20'+_0x37aa47[_0x171bfb(0x1cc)]+'\x20('+_0x37aa47[_0x171bfb(0x1c8)]+_0x171bfb(0x1bd))['start']();try{const {configArray:_0xc0a6a8}=await fetchModelList(_0x37aa47[_0x171bfb(0x1c8)],_0x45085d),_0x4a4a01=await generateApiFile(_0xc0a6a8,_0x49f22d,_0x37aa47[_0x171bfb(0x1c8)],_0x37aa47['isDefault'],_0x4940b3,_0x332149,_0x37aa47[_0x171bfb(0x1cc)]);_0x11c0e7[_0x171bfb(0x1ce)](_0x37aa47[_0x171bfb(0x1cc)]+':\x20'+_0xc0a6a8[_0x171bfb(0x1e5)]+'\x20dataset(s)\x20→\x20'+_0x4a4a01[_0x171bfb(0x1dc)]+_0x171bfb(0x1d0)),writeCliSideChannelLine(_0x171bfb(0x1c7)+_0x4a4a01['apiFilePath']),writeCliSideChannelLine(_0x171bfb(0x1c7)+_0x4a4a01[_0x171bfb(0x1c2)]),_0x2ab8a2++;}catch(_0x5c5314){_0x11c0e7[_0x171bfb(0x1c5)](_0x37aa47['name']+':\x20'+(_0x5c5314 instanceof Error?_0x5c5314[_0x171bfb(0x1d1)]:String(_0x5c5314))),_0x56835c++;}}writeCliSideChannelLine('');if(_0x56835c>0x0)writeCliSideChannelLine('!\x20'+_0x56835c+_0x171bfb(0x1bb));return{'ok':_0x56835c===0x0,'message':_0x171bfb(0x1c3)+_0x2ab8a2+_0x171bfb(0x1d4)+_0x56835c+_0x171bfb(0x1e3)};}const _0x51fb2b=_0x10a201&&_0x10a201[_0x171bfb(0x1e4)]('-')?_0x10a201[_0x171bfb(0x1b2)]('-')[_0x171bfb(0x1b0)](0x1)[_0x171bfb(0x1bf)]('-'):'',_0x4b7642=_0x452e28||_0x2b47b5[_0x171bfb(0x1b7)]||DEFAULT_API_DIR,_0x5c1fa5=!_0x10a201,_0x816b5e=a16_0x2c200a(_0x171bfb(0x1de)+_0x2b47b5[_0x171bfb(0x1dd)]+_0x171bfb(0x1d5))[_0x171bfb(0x1d6)]();try{const {configArray:_0x570d47}=await fetchModelList(_0x2b47b5['appCode'],_0x2b47b5[_0x171bfb(0x1c9)]),_0x45c3f6=await generateApiFile(_0x570d47,_0x51fb2b,_0x2b47b5[_0x171bfb(0x1dd)],_0x5c1fa5,getEnv(),_0x4b7642);_0x816b5e[_0x171bfb(0x1ce)](_0x171bfb(0x1d2)+_0x570d47['length']+_0x171bfb(0x1b8)+_0x45c3f6[_0x171bfb(0x1dc)]+_0x171bfb(0x1d0));const _0x2df780=_0x51fb2b?_0x51fb2b+_0x171bfb(0x1cf):_0x171bfb(0x1d3),_0x1a7819=_0x51fb2b?_0x51fb2b+_0x171bfb(0x1e7):_0x171bfb(0x1c4);return writeCliSideChannelLine(_0x171bfb(0x1c7)+a16_0x2bc310['join'](_0x4b7642,_0x2df780+_0x171bfb(0x1b9))),writeCliSideChannelLine(_0x171bfb(0x1c7)+a16_0x2bc310['join'](_0x4b7642,_0x1a7819+'.ts')),{'ok':!![],'data':{'datasetCount':_0x570d47[_0x171bfb(0x1e5)],'modelCount':_0x45c3f6[_0x171bfb(0x1dc)]}};}catch(_0x3be661){_0x816b5e['fail']('Failed:\x20'+(_0x3be661 instanceof Error?_0x3be661['message']:String(_0x3be661)));throw _0x3be661;}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a17_0x1c1f(){const _0x2e2a37=['\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','3MbECwC','join','length','name','34705irNdkZ','App\x20\x22','89929EEubKc','2WCihag','4432581qIceMK','bool','3154535vFToiY','2850lGiYfN','merged','1326648KCPkgb','validation','3421276tYMoKu','12vKXBEj','selectedAppName','791580vxdnJT'];a17_0x1c1f=function(){return _0x2e2a37;};return a17_0x1c1f();}(function(_0x47a8c4,_0x5d0d29){const _0x52510c=a17_0x402f,_0x4666aa=_0x47a8c4();while(!![]){try{const _0x1ceaf4=-parseInt(_0x52510c(0x101))/0x1*(parseInt(_0x52510c(0xf6))/0x2)+-parseInt(_0x52510c(0x103))/0x3*(-parseInt(_0x52510c(0xfe))/0x4)+parseInt(_0x52510c(0xf9))/0x5+-parseInt(_0x52510c(0xff))/0x6*(parseInt(_0x52510c(0xf5))/0x7)+parseInt(_0x52510c(0xfc))/0x8+parseInt(_0x52510c(0xf7))/0x9+parseInt(_0x52510c(0xfa))/0xa*(-parseInt(_0x52510c(0x107))/0xb);if(_0x1ceaf4===_0x5d0d29)break;else _0x4666aa['push'](_0x4666aa['shift']());}catch(_0x10aa34){_0x4666aa['push'](_0x4666aa['shift']());}}}(a17_0x1c1f,0x68855));import{getMultiAppConfigs}from'../../utils/config.js';import{CliErrors}from'../../errors.js';function a17_0x402f(_0x363f66,_0x4ad3e5){_0x363f66=_0x363f66-0xf5;const _0x1c1f59=a17_0x1c1f();let _0x402f27=_0x1c1f59[_0x363f66];return _0x402f27;}export function resolveTargetApps(_0x16755c,_0x464453){const _0x344923=a17_0x402f;if(_0x464453)return null;const _0x5f0ba0=_0x16755c[_0x344923(0xf8)]('global')?_0x344923(0xfb):'project';let _0x196e3b=getMultiAppConfigs(_0x5f0ba0);if(!_0x196e3b||_0x196e3b[_0x344923(0x105)]===0x0)return null;if(_0x16755c['selectedAppName']){const _0x40d177=_0x196e3b['filter'](_0xf4d6b1=>_0xf4d6b1['name']===_0x16755c[_0x344923(0x100)]);if(_0x40d177[_0x344923(0x105)]===0x0){const _0x2a1107=_0x196e3b['map'](_0x7090b6=>_0x7090b6[_0x344923(0x106)])[_0x344923(0x104)](',\x20');throw CliErrors[_0x344923(0xfd)](_0x344923(0x108)+_0x16755c[_0x344923(0x100)]+_0x344923(0x102)+_0x2a1107);}_0x196e3b=_0x40d177;}return _0x196e3b;}
|
package/lib/commands/app/add.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a18_0x29d92c=a18_0x359d;(function(_0xe1f1ca,_0x131fa8){const _0x160b5c=a18_0x359d,_0xe9fa1=_0xe1f1ca();while(!![]){try{const _0x26b4d9=-parseInt(_0x160b5c(0x1ca))/0x1+-parseInt(_0x160b5c(0x1b4))/0x2+-parseInt(_0x160b5c(0x1bf))/0x3*(parseInt(_0x160b5c(0x1b5))/0x4)+parseInt(_0x160b5c(0x1cd))/0x5+-parseInt(_0x160b5c(0x1c8))/0x6+-parseInt(_0x160b5c(0x1c6))/0x7*(-parseInt(_0x160b5c(0x1b0))/0x8)+-parseInt(_0x160b5c(0x1c5))/0x9*(-parseInt(_0x160b5c(0x1bd))/0xa);if(_0x26b4d9===_0x131fa8)break;else _0xe9fa1['push'](_0xe9fa1['shift']());}catch(_0x39ab9e){_0xe9fa1['push'](_0xe9fa1['shift']());}}}(a18_0xb075,0x3a723));import{CliErrors}from'../../errors.js';function a18_0x359d(_0x4f2804,_0x1fbdcf){_0x4f2804=_0x4f2804-0x1ae;const _0xb07533=a18_0xb075();let _0x359d73=_0xb07533[_0x4f2804];return _0x359d73;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';function a18_0xb075(){const _0x517e62=['16HADrfu','\x20app\x20add\x20<name>\x20--appcode\x20<code>','Add\x20or\x20update\x20an\x20app\x20in\x20config','global','332894OPFgyx','104024PTPTmt','Added','flagMissing','App\x20profile\x20name','trim','App\x20code','boolean','apps','42710polHXt','\x20app\x20\x22','33yiwKdN','\x20Set\x20as\x20default\x20app.','name','Missing\x20app\x20name.','str','\x22\x20(appcode:\x20','1251ckldbx','1454859OHntVg','defaultApp','1030446fAziEv','args','309195OzmmJg','appcode','Use\x20global\x20config\x20scope','817505jADBaA','write','Usage:\x20','validation'];a18_0xb075=function(){return _0x517e62;};return a18_0xb075();}import{readConfig,writeConfig,scopeLabel}from'../../commands/app/shared.js';async function validateArgs(_0x401388){const _0x101ff9=a18_0x359d,_0x5a86a9=_0x401388[_0x101ff9(0x1c9)][0x0]?.[_0x101ff9(0x1b9)]();if(!_0x5a86a9)throw CliErrors[_0x101ff9(0x1af)](_0x101ff9(0x1c2),_0x101ff9(0x1ae)+CLI_BIN_NAME+_0x101ff9(0x1b1));}async function execute(_0x235b84){const _0x127eaa=a18_0x359d,_0x4fccf3=_0x235b84[_0x127eaa(0x1c9)][0x0]?.[_0x127eaa(0x1b9)]();if(!_0x4fccf3)throw CliErrors['validation'](_0x127eaa(0x1c2),'Usage:\x20'+CLI_BIN_NAME+_0x127eaa(0x1b1));const _0x3b11a3=_0x235b84[_0x127eaa(0x1c3)](_0x127eaa(0x1cb));if(!_0x3b11a3)throw CliErrors[_0x127eaa(0x1b7)](_0x127eaa(0x1cb),_0x127eaa(0x1ae)+CLI_BIN_NAME+_0x127eaa(0x1b1));const _0x132b00={'global':_0x235b84['bool']('global')},_0x364f01=readConfig(_0x132b00);if(!_0x364f01[_0x127eaa(0x1bc)])_0x364f01[_0x127eaa(0x1bc)]={};const _0x5085e8={'appcode':_0x3b11a3,...collectAppProfileOverrides(_0x3aa54a=>_0x235b84[_0x127eaa(0x1c3)](_0x3aa54a))},_0x2458da=_0x364f01[_0x127eaa(0x1bc)],_0x253bbf=!!_0x2458da[_0x4fccf3];_0x2458da[_0x4fccf3]=_0x5085e8;if(!_0x364f01[_0x127eaa(0x1c7)])_0x364f01['defaultApp']=_0x4fccf3;writeConfig(_0x364f01,_0x132b00);const _0x597f0e=!_0x253bbf&&_0x364f01[_0x127eaa(0x1c7)]===_0x4fccf3?_0x127eaa(0x1c0):'',_0x2fce20=(_0x253bbf?'Updated':_0x127eaa(0x1b6))+_0x127eaa(0x1be)+_0x4fccf3+_0x127eaa(0x1c4)+_0x3b11a3+')'+scopeLabel(_0x132b00)+'.'+_0x597f0e;return{'ok':!![],'message':_0x2fce20};}export const appAddDefinition={'service':'app','command':'add','description':a18_0x29d92c(0x1b2),'risk':a18_0x29d92c(0x1ce),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a18_0x29d92c(0x1c1),'description':a18_0x29d92c(0x1b8),'required':!![]}],'flags':[{'name':a18_0x29d92c(0x1cb),'type':'string','description':a18_0x29d92c(0x1ba),'required':!![]},{'name':a18_0x29d92c(0x1b3),'type':a18_0x29d92c(0x1bb),'description':a18_0x29d92c(0x1cc),'default':![]},...getAppProfileFlagDefs()],'validate':validateArgs,'execute':execute};
|