@lovrabet/rabetbase-cli 2.1.7-beta.2 → 2.1.7-beta.4
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
|
-
const
|
|
1
|
+
const a0_0x3d6538=a0_0x2e1a;function a0_0x2e1a(_0x264126,_0x4e52a8){_0x264126=_0x264126-0xa6;const _0x433be4=a0_0x433b();let _0x2e1aab=_0x433be4[_0x264126];return _0x2e1aab;}(function(_0x58305f,_0x344ae8){const _0x566cbe=a0_0x2e1a,_0x43eda6=_0x58305f();while(!![]){try{const _0x124809=-parseInt(_0x566cbe(0xbf))/0x1+-parseInt(_0x566cbe(0xa8))/0x2*(parseInt(_0x566cbe(0xbb))/0x3)+-parseInt(_0x566cbe(0xc7))/0x4+-parseInt(_0x566cbe(0xb5))/0x5*(-parseInt(_0x566cbe(0xa6))/0x6)+parseInt(_0x566cbe(0xa7))/0x7+parseInt(_0x566cbe(0xb2))/0x8+parseInt(_0x566cbe(0xb1))/0x9;if(_0x124809===_0x344ae8)break;else _0x43eda6['push'](_0x43eda6['shift']());}catch(_0x160979){_0x43eda6['push'](_0x43eda6['shift']());}}}(a0_0x433b,0x31ab1));import{mkdirSync,writeFileSync}from'node:fs';function a0_0x433b(){const _0x1d213b=['.md\x20(','push','datasetCode','utf8','error','193452LSUnfS','length','生成文档失败:\x20','Waiting\x203\x20seconds...\x0a','207185OFDugP','.md\x20-\x20','log','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','./docs','/api/node-toolbox/api-doc-generator','markdown','string','1356392pDlFNG','Invalid\x20response\x20format\x20(','6JUYuFl','1464022uSkNGO','10ItCEFR','Fetch\x20doc\x20(','):\x20missing\x20data.markdown\x20field','tableName','name',']\x20Generating:\x20','success','.md','POST','984312nYMebI','2896216xhXZKt','api-doc','✓\x20Generated:\x20','1958015SsWBRu'];a0_0x433b=function(){return _0x1d213b;};return a0_0x433b();}import a0_0xf420bb from'node:path';import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{platformFetch}from'../core/api-client.js';export async function fetchDatasetDoc(_0xafca97){const _0x5f4efa=a0_0x2e1a,{appCode:_0x17f4f1,cookie:_0x2fce8e,datasetCode:_0x12c8e3,datasetId:_0x5c9fd0,extraParams:_0x25f5f4}=_0xafca97,_0xd4deaa=getApiDomain()+_0x5f4efa(0xc4),_0x43171d=await platformFetch(_0xd4deaa,{'method':_0x5f4efa(0xb0),'body':{'appCode':_0x17f4f1,'datasetCode':_0x12c8e3,'datasetId':_0x5c9fd0,..._0x25f5f4||{}},'cookie':_0x2fce8e,'label':_0x5f4efa(0xa9)+_0x12c8e3+')'});if(!_0x43171d||typeof _0x43171d[_0x5f4efa(0xc5)]!==_0x5f4efa(0xc6))throw new Error(_0x5f4efa(0xc8)+_0x12c8e3+_0x5f4efa(0xaa));return _0x43171d['markdown'];}function delay(_0xc4a99d){return new Promise(_0x2fa8d4=>setTimeout(_0x2fa8d4,_0xc4a99d));}export async function generateDatasetDocs(_0x2bb89b,_0x3ede1e,_0x8644f6,_0x10d275=a0_0x3d6538(0xc3),_0x10a9ea,_0x29c003){const _0x26c608=a0_0x3d6538;mkdirSync(_0x10d275,{'recursive':!![]});const _0x1c2c0e=[],_0x9f7ddd=_0x2bb89b[_0x26c608(0xbc)];console[_0x26c608(0xc1)]('\x0a'+_0x9f7ddd+_0x26c608(0xc2));for(let _0x9e359a=0x0;_0x9e359a<_0x2bb89b[_0x26c608(0xbc)];_0x9e359a++){const _0x569333=_0x2bb89b[_0x9e359a],_0x4c57a5=_0x9e359a+0x1,_0x8306dd=_0x569333[_0x26c608(0xab)];try{console['log']('['+_0x4c57a5+'/'+_0x9f7ddd+_0x26c608(0xad)+_0x8306dd+_0x26c608(0xb6)+_0x569333[_0x26c608(0xac)]+')');if(_0x10a9ea)_0x10a9ea(_0x4c57a5,_0x9f7ddd,_0x8306dd);const _0x389f52=await fetchDatasetDoc({'appCode':_0x3ede1e,'cookie':_0x8644f6,'datasetCode':_0x569333['datasetCode'],'datasetId':_0x569333['id'],'enableAI':![],'extraParams':_0x29c003}),_0x285d3d=a0_0xf420bb['join'](_0x10d275,_0x8306dd+_0x26c608(0xaf));writeFileSync(_0x285d3d,_0x389f52,{'encoding':_0x26c608(0xb9)}),console['log'](_0x26c608(0xb4)+_0x8306dd+_0x26c608(0xaf)),logger[_0x26c608(0xae)](_0x26c608(0xb3),'生成文档成功:\x20'+_0x8306dd,undefined,{'datasetCode':_0x569333['datasetCode'],'datasetName':_0x569333[_0x26c608(0xac)],'filePath':_0x285d3d,'progress':_0x4c57a5+'/'+_0x9f7ddd}),_0x1c2c0e[_0x26c608(0xb7)]({'datasetCode':_0x569333[_0x26c608(0xb8)],'datasetName':_0x569333[_0x26c608(0xac)],'filePath':_0x285d3d,'success':!![]});if(_0x4c57a5<_0x9f7ddd)await delay(0x1388);}catch(_0x4b30af){const _0x31c389=_0x4b30af instanceof Error?_0x4b30af['message']:String(_0x4b30af);console[_0x26c608(0xc1)]('✗\x20Failed:\x20'+_0x8306dd+_0x26c608(0xc0)+_0x31c389),logger[_0x26c608(0xba)]('api-doc',_0x26c608(0xbd)+_0x569333[_0x26c608(0xb8)],{'datasetCode':_0x569333[_0x26c608(0xb8)],'datasetName':_0x569333[_0x26c608(0xac)],'error':_0x31c389,'progress':_0x4c57a5+'/'+_0x9f7ddd}),_0x1c2c0e[_0x26c608(0xb7)]({'datasetCode':_0x569333[_0x26c608(0xb8)],'datasetName':_0x569333[_0x26c608(0xac)],'filePath':'','success':![],'error':_0x31c389}),_0x4c57a5<_0x9f7ddd&&(console[_0x26c608(0xc1)](_0x26c608(0xbe)),await delay(0xbb8));}}return _0x1c2c0e;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x455549,_0x27eb71){const _0x108dba=a1_0x2377,_0x3aa224=_0x455549();while(!![]){try{const _0x4201df=parseInt(_0x108dba(0x195))/0x1*(parseInt(_0x108dba(0x19f))/0x2)+parseInt(_0x108dba(0x196))/0x3+-parseInt(_0x108dba(0x1a2))/0x4+-parseInt(_0x108dba(0x1a1))/0x5*(parseInt(_0x108dba(0x1a3))/0x6)+parseInt(_0x108dba(0x19b))/0x7*(parseInt(_0x108dba(0x1a0))/0x8)+parseInt(_0x108dba(0x194))/0x9*(-parseInt(_0x108dba(0x19d))/0xa)+-parseInt(_0x108dba(0x199))/0xb*(parseInt(_0x108dba(0x19c))/0xc);if(_0x4201df===_0x27eb71)break;else _0x3aa224['push'](_0x3aa224['shift']());}catch(_0x24854f){_0x3aa224['push'](_0x3aa224['shift']());}}}(a1_0x2ec6,0x97c7c));import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';function a1_0x2377(_0x6ad13a,_0x4fae3d){_0x6ad13a=_0x6ad13a-0x193;const _0x2ec6e3=a1_0x2ec6();let _0x237769=_0x2ec6e3[_0x6ad13a];return _0x237769;}import{getEnv}from'../constant/env.js';import{platformFetch}from'../core/api-client.js';function cleanNewlines(_0x1f5c2c){return _0x1f5c2c['replace'](/[\r\n]+/g,'\x20')['trim']();}function cleanDatasetName(_0x2de10d){const _0xc4153c=a1_0x2377;if(!_0x2de10d[_0xc4153c(0x19e)])return _0x2de10d;return{..._0x2de10d,'name':cleanNewlines(_0x2de10d[_0xc4153c(0x19e)])};}export async function fetchModelList(_0x5172bc,_0x301ddc){const _0x13346a=a1_0x2377,_0x242f41=getEnv(),_0x4c2033=getApiDomain()+'/api/node-toolbox/dataset/model-list?appcode='+_0x5172bc+'&otype=array';logger[_0x13346a(0x197)]('fetch-model-list',_0x13346a(0x19a)+_0x242f41+')',{'apiUrl':_0x4c2033});const _0x553a7b=await platformFetch(_0x4c2033,{'cookie':_0x301ddc,'label':'Fetch\x20datasets'}),_0x22f1a0=(_0x553a7b[_0x13346a(0x1a4)]??[])[_0x13346a(0x198)](cleanDatasetName);return{'configArray':_0x22f1a0,'count':_0x22f1a0[_0x13346a(0x193)]};}function a1_0x2ec6(){const _0x33ae4a=['name','4yQdocn','8ynnFXj','5SaQgau','455556VtVzyw','1575114vmnGEu','configArray','length','8008047DsdHeg','347642DtlSxZ','3587520mQORFF','info','map','11BWWWGC','正在从服务器拉取模型列表...\x20(环境:\x20','3871399dECAjb','6675576jMLaWr','10NtaJYg'];a1_0x2ec6=function(){return _0x33ae4a;};return a1_0x2ec6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a2_0x4549(_0x76a5a4,_0x1cb720){_0x76a5a4=_0x76a5a4-0x15b;const _0x3db5d9=a2_0x3db5();let _0x45494f=_0x3db5d9[_0x76a5a4];return _0x45494f;}(function(_0xe8eefd,_0x4f4f51){const _0x263f8f=a2_0x4549,_0x220f1f=_0xe8eefd();while(!![]){try{const _0x34cf0d=-parseInt(_0x263f8f(0x168))/0x1+-parseInt(_0x263f8f(0x15e))/0x2+-parseInt(_0x263f8f(0x172))/0x3*(parseInt(_0x263f8f(0x15d))/0x4)+-parseInt(_0x263f8f(0x16d))/0x5*(-parseInt(_0x263f8f(0x16a))/0x6)+-parseInt(_0x263f8f(0x171))/0x7*(parseInt(_0x263f8f(0x163))/0x8)+parseInt(_0x263f8f(0x162))/0x9+parseInt(_0x263f8f(0x180))/0xa;if(_0x34cf0d===_0x4f4f51)break;else _0x220f1f['push'](_0x220f1f['shift']());}catch(_0x215a3d){_0x220f1f['push'](_0x220f1f['shift']());}}}(a2_0x3db5,0x5d557));import a2_0x389946 from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a2_0x3cd43d from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';function a2_0x3db5(){const _0x10aeaa=['forEach','format','success','resolve','utf8','toUpperCase','test','replace','8013420rvHTRI','../..','{\x20apiConfigName:\x20\x22','alias','push','name','\x20config\x20set\x20app\x20<value>`','4XoQqOL','466822gZBCxy','tableName','API\x20文件生成成功!','init-api','5768406rqtamB','24ztvWQS','datasetCode','dirname','api.ts.tpl','LOVRABET','662150DQsiPn','Please\x20configure\x20app\x20code\x20first\x20via\x20`','406698kxrinZ','client.ts.tpl','-api','25wvQLCj','length','templates/generate-api','api','199990mllbfD','1252875EhOhLe','.ts','typescript','{\x20apiConfigName:\x20','\x22\x20}','join'];a2_0x3db5=function(){return _0x10aeaa;};return a2_0x3db5();}import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';export async function generateApiFile(_0x462627,_0xdca989,_0x3d7dd2,_0x2882f2,_0x12131f,_0x35d7ca,_0x170534){const _0x3e63c2=a2_0x4549;if(!_0x3d7dd2)throw new Error(_0x3e63c2(0x169)+CLI_BIN_NAME+_0x3e63c2(0x15c));const _0x41e7aa=_0x2882f2&&!_0x170534,_0xd91335=_0x170534||_0x3d7dd2,_0x5a51aa=_0x41e7aa?'CONFIG_NAMES.DEFAULT':'\x22'+_0xd91335+'\x22',_0x1077b7=!isProduction(_0x12131f);let _0x55eab9;if(_0x41e7aa)_0x1077b7?_0x55eab9=_0x3e63c2(0x175)+_0x5a51aa+',\x20env:\x20\x22'+_0x12131f+_0x3e63c2(0x176):_0x55eab9='';else{const _0xbe1de1=_0x1077b7?',\x20env:\x20\x22'+_0x12131f+'\x22':'';_0x55eab9=_0x3e63c2(0x182)+_0xd91335+'\x22'+_0xbe1de1+'\x20}';}const _0x1f039f=_0xdca989?_0xdca989+_0x3e63c2(0x16c):_0x3e63c2(0x170),_0x4e76df=_0xdca989?_0xdca989+'-client':'client',_0xfb222b=_0xdca989&&!/^app-[a-f0-9]+$/i[_0x3e63c2(0x17e)](_0xdca989)?_0xdca989[_0x3e63c2(0x17f)](/-/g,'_')[_0x3e63c2(0x17d)]():_0x3e63c2(0x167),_0x12612e=[];_0x462627[_0x3e63c2(0x178)](_0xa79c30=>{const _0x16fb5e=_0x3e63c2;_0x12612e[_0x16fb5e(0x184)]({'datasetCode':_0xa79c30[_0x16fb5e(0x164)],'tableName':_0xa79c30[_0x16fb5e(0x15f)],'name':_0xa79c30[_0x16fb5e(0x15b)]||'','alias':_0xa79c30[_0x16fb5e(0x183)]||_0xa79c30['key']});});const _0x391859=fileURLToPath(import.meta.url),_0x2a27e2=a2_0x3cd43d[_0x3e63c2(0x17b)](a2_0x3cd43d[_0x3e63c2(0x165)](_0x391859),_0x3e63c2(0x181)),_0x5b50e5=a2_0x3cd43d[_0x3e63c2(0x177)](_0x2a27e2,_0x3e63c2(0x16f)),_0x233fc5=a2_0x3cd43d['join'](_0x5b50e5,_0x3e63c2(0x166)),_0x3f68c6=a2_0x3cd43d[_0x3e63c2(0x177)](_0x5b50e5,_0x3e63c2(0x16b)),_0x547a6d=_0x35d7ca;mkdirSync(_0x547a6d,{'recursive':!![]});const _0x18ebcc=_0x12612e[0x0]?.[_0x3e63c2(0x183)],_0x3168ae=readFileSync(_0x233fc5,_0x3e63c2(0x17c)),_0x556db1=TemplateReplacer['replaceApiContent'](_0x3168ae,_0x3d7dd2,_0x12612e,_0x18ebcc,_0x1f039f,_0x5a51aa,undefined,_0xfb222b),_0x548423=await a2_0x389946[_0x3e63c2(0x179)](_0x556db1,{'parser':_0x3e63c2(0x174)}),_0x1f7f1c=a2_0x3cd43d[_0x3e63c2(0x177)](_0x547a6d,_0x1f039f+'.ts');writeFileSync(_0x1f7f1c,_0x548423,{'encoding':'utf8'});const _0x2d04bf=readFileSync(_0x3f68c6,_0x3e63c2(0x17c)),_0x49b781=TemplateReplacer['replaceApiContent'](_0x2d04bf,_0x3d7dd2,_0x12612e,_0x18ebcc,_0x1f039f,_0x5a51aa,_0x55eab9,_0xfb222b),_0x2bdae1=await a2_0x389946[_0x3e63c2(0x179)](_0x49b781,{'parser':_0x3e63c2(0x174)}),_0xec340c=a2_0x3cd43d['join'](_0x547a6d,_0x4e76df+_0x3e63c2(0x173));writeFileSync(_0xec340c,_0x2bdae1,{'encoding':_0x3e63c2(0x17c)});const _0x5c6d45=_0x12612e[_0x3e63c2(0x16e)];return logger[_0x3e63c2(0x17a)](_0x3e63c2(0x161),_0x3e63c2(0x160),undefined,{'apiFile':_0x1f7f1c,'clientFile':_0xec340c,'modelCount':_0x5c6d45,'configName':_0x5a51aa}),{'modelCount':_0x5c6d45,'apiFilePath':_0x1f7f1c,'clientFilePath':_0xec340c,'configName':_0x5a51aa};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a3_0x44e0(){const _0x1251e7=['984296DkIwjg','7WfbPFX','log','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','autoYes','7118EBDCtD','2670244dthYCa','*\x20Login\x20successful!','16118880kqNojD','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','nonInteractive','start','101eCMFHj','!\x20Login\x20failed.','validation','5828139TRqVuF','Run\x20`','761790ElexXP','3959574igQzIr','stop','5yvPASw'];a3_0x44e0=function(){return _0x1251e7;};return a3_0x44e0();}(function(_0x11a5ad,_0x2a57f5){const _0x2ad9be=a3_0x4850,_0x3887fa=_0x11a5ad();while(!![]){try{const _0x36939a=parseInt(_0x2ad9be(0x170))/0x1*(parseInt(_0x2ad9be(0x169))/0x2)+-parseInt(_0x2ad9be(0x160))/0x3+parseInt(_0x2ad9be(0x16a))/0x4+-parseInt(_0x2ad9be(0x163))/0x5*(-parseInt(_0x2ad9be(0x161))/0x6)+-parseInt(_0x2ad9be(0x165))/0x7*(parseInt(_0x2ad9be(0x164))/0x8)+parseInt(_0x2ad9be(0x173))/0x9+-parseInt(_0x2ad9be(0x16c))/0xa;if(_0x36939a===_0x2a57f5)break;else _0x3887fa['push'](_0x3887fa['shift']());}catch(_0x1ea0fc){_0x3887fa['push'](_0x3887fa['shift']());}}}(a3_0x44e0,0x54641));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';function a3_0x4850(_0x18bd7a,_0x2d5e04){_0x18bd7a=_0x18bd7a-0x160;const _0x44e07d=a3_0x44e0();let _0x485073=_0x44e07d[_0x18bd7a];return _0x485073;}import a3_0x3e1f2e from'ora';export async function runAuthServer(_0x497ca8){const _0xb8bfc4=a3_0x4850,_0x35b4a9=await getIsSessionValid();if(_0x35b4a9){console[_0xb8bfc4(0x166)](_0xb8bfc4(0x167));return;}if(_0x497ca8?.[_0xb8bfc4(0x16e)])throw CliErrors[_0xb8bfc4(0x172)]('Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.',_0xb8bfc4(0x174)+CLI_BIN_NAME+'\x20auth\x20login\x20--yes`\x20in\x20an\x20interactive\x20terminal.');const _0x4a57ba=_0x497ca8?.[_0xb8bfc4(0x168)]?!![]:await confirm({'message':'No\x20valid\x20session.\x20Login\x20now?','default':!![]});if(!_0x4a57ba)return;const _0x1fd63b=a3_0x3e1f2e(_0xb8bfc4(0x16d))[_0xb8bfc4(0x16f)](),_0x40d81f=await authServer({'silent':!![]});_0x1fd63b[_0xb8bfc4(0x162)](),_0x40d81f?console[_0xb8bfc4(0x166)](_0xb8bfc4(0x16b)):console['log'](_0xb8bfc4(0x171));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x54ecab=a4_0x4af1;(function(_0x33e49d,_0x33a699){const _0x4b4aaf=a4_0x4af1,_0x370276=_0x33e49d();while(!![]){try{const _0x3483db=-parseInt(_0x4b4aaf(0xfb))/0x1+parseInt(_0x4b4aaf(0xf4))/0x2+-parseInt(_0x4b4aaf(0xeb))/0x3*(-parseInt(_0x4b4aaf(0xdd))/0x4)+parseInt(_0x4b4aaf(0xe1))/0x5+parseInt(_0x4b4aaf(0xe4))/0x6+parseInt(_0x4b4aaf(0xd8))/0x7*(-parseInt(_0x4b4aaf(0xd4))/0x8)+parseInt(_0x4b4aaf(0xe9))/0x9*(parseInt(_0x4b4aaf(0xda))/0xa);if(_0x3483db===_0x33a699)break;else _0x370276['push'](_0x370276['shift']());}catch(_0x358d51){_0x370276['push'](_0x370276['shift']());}}}(a4_0x5472,0x77e7e));import{writeFileSync}from'node:fs';function a4_0x5472(){const _0x41ca83=['json','session','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','8hhCSEZ','utf-8','listen','cmd\x20/c\x20start\x20\x22\x22\x20\x22','5891228fKJhkB','createServer','20BdhDhO','headers','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','4nyeKXO','127.0.0.1','error','port','2738130ObKGkK','xdg-open\x20\x22','close','2536464xeFGxe','text/html;\x20charset=utf-8','/sign-in?redirect=','win32','/api/auth/get-session','3084723SqKlHf','📍\x20Login\x20URL:','1050774lZaVNO','object','address','silent','darwin','cookie','log','https://dev.lovrabet.com:','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','180996ZjcXAQ','writeHead','Auth\x20server\x20error:','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','open\x20\x22','then','763882hUNJFU','end','https://g.yuntooai.com/cert/lovrabet-dev.json','platform'];a4_0x5472=function(){return _0x41ca83;};return a4_0x5472();}import a4_0x17ff93 from'node:https';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';import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export async function authServer(_0x1c3d5c){const _0x4bb582=a4_0x4af1,_0x5a5d81=_0x1c3d5c?.[_0x4bb582(0xee)]||![];if(await getIsSessionValid())return!![];const _0x7095f2=await(await fetch(_0x4bb582(0xfd)))[_0x4bb582(0xff)]();return new Promise(async(_0x28b5be,_0x1b1189)=>{const _0x359dec=_0x4bb582;let _0x49e769=0x0;const _0x562ad9=a4_0x17ff93[_0x359dec(0xd9)](_0x7095f2,async(_0x17f2a7,_0x43d58f)=>{const _0x2e5bfe=_0x359dec,_0x188184=getUserDomain(),_0x1b3529=_0x17f2a7[_0x2e5bfe(0xdb)][_0x2e5bfe(0xf0)]||'',_0x353dfa=await fetch(_0x188184+_0x2e5bfe(0xe8),{'headers':{'cookie':_0x1b3529}})[_0x2e5bfe(0xfa)](_0x347c99=>_0x347c99['json']()),_0xeccd99=_0x353dfa&&_0x353dfa[_0x2e5bfe(0x100)]&&_0x353dfa['user'];if(_0xeccd99){writeFileSync(cookieFile,_0x1b3529,_0x2e5bfe(0xd5)),_0x28b5be(!![]);const _0x373359=buildLoginSuccessHtml();_0x43d58f[_0x2e5bfe(0xf5)](0xc8,{'Content-Type':_0x2e5bfe(0xe5)}),_0x43d58f[_0x2e5bfe(0xfc)](_0x373359),_0x562ad9[_0x2e5bfe(0xe3)]();}else{const _0x10b790=''+encodeURIComponent(_0x2e5bfe(0xf2)+_0x49e769);_0x43d58f['writeHead'](0x12e,{'location':_0x188184+_0x2e5bfe(0xe6)+_0x10b790}),_0x43d58f[_0x2e5bfe(0xfc)]();return;}});_0x562ad9[_0x359dec(0xd6)](0x0,_0x359dec(0xde),()=>{const _0x1caa59=_0x359dec,_0x2db0e5=_0x562ad9[_0x1caa59(0xed)]();_0x49e769=typeof _0x2db0e5===_0x1caa59(0xec)&&_0x2db0e5?_0x2db0e5[_0x1caa59(0xe0)]:Number(_0x2db0e5);const _0x38fb83=_0x1caa59(0xf2)+_0x49e769;!_0x5a5d81&&(console[_0x1caa59(0xf1)]('🔐\x20Starting\x20login\x20service...'),console[_0x1caa59(0xf1)](_0x1caa59(0xea),_0x38fb83),console[_0x1caa59(0xf1)](_0x1caa59(0xf3)),console['log'](''),console[_0x1caa59(0xf1)](_0x1caa59(0xf7)),console['log']('')),openInBrowser(_0x38fb83)[_0x1caa59(0xfa)](_0xb5e9b3=>{const _0x2e4bc4=_0x1caa59;!_0x5a5d81&&(_0xb5e9b3?console[_0x2e4bc4(0xf1)](_0x2e4bc4(0x101)):(console[_0x2e4bc4(0xf1)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x2e4bc4(0xf1)](_0x2e4bc4(0xdc),_0x38fb83)),console[_0x2e4bc4(0xf1)](''));})['catch'](()=>{const _0x1159db=_0x1caa59;!_0x5a5d81&&(console[_0x1159db(0xf1)](_0x1159db(0xf8)),console['log'](_0x1159db(0xdc),_0x38fb83),console['log'](''));});}),_0x562ad9['on'](_0x359dec(0xdf),_0x4e7c73=>{const _0x1fd1ac=_0x359dec;!_0x5a5d81&&console[_0x1fd1ac(0xdf)](_0x1fd1ac(0xf6),_0x4e7c73),_0x1b1189(_0x4e7c73);});});}function openInBrowser(_0x1225fd){return new Promise(_0x3e1db9=>{const _0x7cfe28=a4_0x4af1,_0x5cea65=process[_0x7cfe28(0xfe)];let _0x1a1f60;if(_0x5cea65===_0x7cfe28(0xe7))_0x1a1f60=_0x7cfe28(0xd7)+_0x1225fd+'\x22';else _0x5cea65===_0x7cfe28(0xef)?_0x1a1f60=_0x7cfe28(0xf9)+_0x1225fd+'\x22':_0x1a1f60=_0x7cfe28(0xe2)+_0x1225fd+'\x22';exec(_0x1a1f60,_0x4c229d=>{_0x4c229d?_0x3e1db9(![]):_0x3e1db9(!![]);});});}function a4_0x4af1(_0x4cee2f,_0x1b5b2f){_0x4cee2f=_0x4cee2f-0xd4;const _0x5472ea=a4_0x5472();let _0x4af1e5=_0x5472ea[_0x4cee2f];return _0x4af1e5;}if(import.meta.main){const isAuth=await authServer();console[a4_0x54ecab(0xf1)]('isAuth',isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a5_0x49d8(){const _0x40c18b=['800954FsKuUH','531rxSIAm','3408740IxcEZd','2484474XqfSje','870HePXOx','17645mjPjnP','72cXPDCd','584fCstGd','8024247vjslFl','745752omcFBS'];a5_0x49d8=function(){return _0x40c18b;};return a5_0x49d8();}(function(_0x2e7b4,_0x2a15b7){const _0x1e9e56=a5_0x4eff,_0x2aff0a=_0x2e7b4();while(!![]){try{const _0x1f8d7c=parseInt(_0x1e9e56(0x70))/0x1+-parseInt(_0x1e9e56(0x73))/0x2+parseInt(_0x1e9e56(0x71))/0x3*(parseInt(_0x1e9e56(0x6d))/0x4)+parseInt(_0x1e9e56(0x75))/0x5*(-parseInt(_0x1e9e56(0x74))/0x6)+parseInt(_0x1e9e56(0x6e))/0x7+parseInt(_0x1e9e56(0x6f))/0x8*(parseInt(_0x1e9e56(0x6c))/0x9)+-parseInt(_0x1e9e56(0x72))/0xa;if(_0x1f8d7c===_0x2a15b7)break;else _0x2aff0a['push'](_0x2aff0a['shift']());}catch(_0x1a25e0){_0x2aff0a['push'](_0x2aff0a['shift']());}}}(a5_0x49d8,0x985b5));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),'.lovrabet');function a5_0x4eff(_0x4db1f1,_0x3eba93){_0x4db1f1=_0x4db1f1-0x6c;const _0x49d875=a5_0x49d8();let _0x4effe8=_0x49d875[_0x4db1f1];return _0x4effe8;}export const cookieFile=join(configDir,'cookie');mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3f74d4,_0x2ce0de){var _0x9dc1fe=a6_0x1291,_0xa05578=_0x3f74d4();while(!![]){try{var _0x5ed17a=-parseInt(_0x9dc1fe(0x19f))/0x1+parseInt(_0x9dc1fe(0x1a2))/0x2*(-parseInt(_0x9dc1fe(0x1a4))/0x3)+parseInt(_0x9dc1fe(0x1a3))/0x4+parseInt(_0x9dc1fe(0x1a0))/0x5*(-parseInt(_0x9dc1fe(0x19d))/0x6)+parseInt(_0x9dc1fe(0x1a5))/0x7+parseInt(_0x9dc1fe(0x1a1))/0x8+parseInt(_0x9dc1fe(0x19e))/0x9;if(_0x5ed17a===_0x2ce0de)break;else _0xa05578['push'](_0xa05578['shift']());}catch(_0x4914cf){_0xa05578['push'](_0xa05578['shift']());}}}(a6_0xb9fd,0x9a81a));function a6_0xb9fd(){var _0x26328a=['4991630JjZbbJ','1600144YzaMZN','2cVjXQm','1051108uOZGum','906390MgjZyf','102466pjZsiv','utf-8','6HyDLMc','15214356GwZDch','234603EpQNwv'];a6_0xb9fd=function(){return _0x26328a;};return a6_0xb9fd();}import{readFileSync}from'node:fs';function a6_0x1291(_0x3a98b4,_0x43f688){_0x3a98b4=_0x3a98b4-0x19c;var _0xb9fd43=a6_0xb9fd();var _0x129147=_0xb9fd43[_0x3a98b4];return _0x129147;}import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0x48b0d6=a6_0x1291;try{return readFileSync(cookieFile,_0x48b0d6(0x19c));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a7_0x163f(_0x1c72c4,_0x183896){_0x1c72c4=_0x1c72c4-0xf2;const _0x3335b5=a7_0x3335();let _0x163f3c=_0x3335b5[_0x1c72c4];return _0x163f3c;}(function(_0x1332ca,_0xde8099){const _0x5f5428=a7_0x163f,_0x177767=_0x1332ca();while(!![]){try{const _0x127630=-parseInt(_0x5f5428(0xf8))/0x1+parseInt(_0x5f5428(0xfa))/0x2*(parseInt(_0x5f5428(0x100))/0x3)+-parseInt(_0x5f5428(0xf3))/0x4+-parseInt(_0x5f5428(0xff))/0x5*(parseInt(_0x5f5428(0xf5))/0x6)+parseInt(_0x5f5428(0xf2))/0x7*(-parseInt(_0x5f5428(0xf7))/0x8)+-parseInt(_0x5f5428(0xfc))/0x9*(-parseInt(_0x5f5428(0xf6))/0xa)+parseInt(_0x5f5428(0xfe))/0xb;if(_0x127630===_0xde8099)break;else _0x177767['push'](_0x177767['shift']());}catch(_0x15a334){_0x177767['push'](_0x177767['shift']());}}}(a7_0x3335,0xeefd1));function a7_0x3335(){const _0x299c51=['1293014mFZjAv','utf-8','446HDwKyx','user','501210zWKQDo','session','38087434XngDPA','5IBiZcW','18309GNCdxy','7DDoMTn','2123944zvjqCn','json','10813668lovCiq','140YxTwjL','7983584nJRawH'];a7_0x3335=function(){return _0x299c51;};return a7_0x3335();}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0x50b24f=a7_0x163f;try{if(!existsSync(cookieFile))return null;const _0x42226e=readFileSync(cookieFile,_0x50b24f(0xf9)),_0xda9dce=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x42226e}});if(!_0xda9dce['ok'])return null;const _0x2e3ca9=await _0xda9dce[_0x50b24f(0xf4)]();if(!_0x2e3ca9[_0x50b24f(0xfd)]||!_0x2e3ca9[_0x50b24f(0xfb)])return null;return _0x2e3ca9;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x9acb47,_0x31ff70){const _0x322815=a8_0x4ea6,_0x4ab79d=_0x9acb47();while(!![]){try{const _0x52ca35=-parseInt(_0x322815(0x8d))/0x1*(parseInt(_0x322815(0x8b))/0x2)+parseInt(_0x322815(0x8e))/0x3*(parseInt(_0x322815(0x82))/0x4)+-parseInt(_0x322815(0x94))/0x5*(parseInt(_0x322815(0x90))/0x6)+-parseInt(_0x322815(0x92))/0x7*(-parseInt(_0x322815(0x91))/0x8)+-parseInt(_0x322815(0x89))/0x9*(parseInt(_0x322815(0x93))/0xa)+parseInt(_0x322815(0x8c))/0xb*(-parseInt(_0x322815(0x8a))/0xc)+parseInt(_0x322815(0x87))/0xd;if(_0x52ca35===_0x31ff70)break;else _0x4ab79d['push'](_0x4ab79d['shift']());}catch(_0x30da66){_0x4ab79d['push'](_0x4ab79d['shift']());}}}(a8_0x5971,0xe3513));import{existsSync,readFileSync}from'node:fs';function a8_0x4ea6(_0x3f08d0,_0x488cf9){_0x3f08d0=_0x3f08d0-0x82;const _0x597122=a8_0x5971();let _0x4ea6bd=_0x597122[_0x3f08d0];return _0x4ea6bd;}import{getUserDomain}from'../constant/domain.js';function a8_0x5971(){const _0x51b567=['9808421DRiksA','5230EzOZZB','5sfIYsZ','10964BoXqWs','json','/api/auth/get-session','user','session','16626519zzfjNv','then','16362eEASoN','24VwtWUN','1706XEiwEa','430727alWDlS','1144UzznjV','573ftMrmy','utf-8','1605876ZTddtc','8pHhSJz'];a8_0x5971=function(){return _0x51b567;};return a8_0x5971();}import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x21a4a6=a8_0x4ea6;try{if(!existsSync(cookieFile))return![];const _0x288cf7=readFileSync(cookieFile,_0x21a4a6(0x8f)),_0x30f561=await fetch(getUserDomain()+_0x21a4a6(0x84),{'headers':{'cookie':_0x288cf7}})[_0x21a4a6(0x88)](_0x114365=>_0x114365[_0x21a4a6(0x83)]());return _0x30f561&&_0x30f561[_0x21a4a6(0x86)]&&_0x30f561[_0x21a4a6(0x85)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a9_0x397a(){const _0x143e77=['<!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>','458311XlfPIz','2shxfcH','7307120kuDmXi','4254250xlvFup','5kfndOF','18579RRRAuu','5805yAjPYJ','</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>','42292lluMWD','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','1869114rgMgiA','2240qSdGIz'];a9_0x397a=function(){return _0x143e77;};return a9_0x397a();}function a9_0x4f56(_0x816b0c,_0x5910fb){_0x816b0c=_0x816b0c-0x1f1;const _0x397a59=a9_0x397a();let _0x4f565a=_0x397a59[_0x816b0c];return _0x4f565a;}(function(_0x5be066,_0x31a2f8){const _0x478fe8=a9_0x4f56,_0x209847=_0x5be066();while(!![]){try{const _0x35bf38=parseInt(_0x478fe8(0x1f9))/0x1*(parseInt(_0x478fe8(0x1fa))/0x2)+parseInt(_0x478fe8(0x1f1))/0x3+-parseInt(_0x478fe8(0x1f4))/0x4+-parseInt(_0x478fe8(0x1fd))/0x5*(-parseInt(_0x478fe8(0x1f6))/0x6)+parseInt(_0x478fe8(0x1fc))/0x7+-parseInt(_0x478fe8(0x1fb))/0x8+parseInt(_0x478fe8(0x1f2))/0x9*(parseInt(_0x478fe8(0x1f7))/0xa);if(_0x35bf38===_0x31a2f8)break;else _0x209847['push'](_0x209847['shift']());}catch(_0x3e78d8){_0x209847['push'](_0x209847['shift']());}}}(a9_0x397a,0x93882));export function buildLoginSuccessHtml(){const _0x458b19=a9_0x4f56,_0x1d10cb=_0x458b19(0x1f5);return _0x458b19(0x1f8)+_0x1d10cb+_0x458b19(0x1f3);}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a10_0xdc0b(){var _0x49d99a=['!\x20Not\x20logged\x20in','5992MiNiSI','2051oDfktL','4147380MiCcxc','480286rPJJgn','6144070owHjfw','log','212QzPNrG','11204FBpOXD','340vAUdBz','✓\x20Logged\x20out','2291334RjeUZw','13254ewdjBD'];a10_0xdc0b=function(){return _0x49d99a;};return a10_0xdc0b();}(function(_0x4ca8ad,_0x2d95b3){var _0x4c1cfb=a10_0x3da3,_0x2eef2b=_0x4ca8ad();while(!![]){try{var _0xf86519=-parseInt(_0x4c1cfb(0xce))/0x1+parseInt(_0x4c1cfb(0xd1))/0x2*(parseInt(_0x4c1cfb(0xd6))/0x3)+-parseInt(_0x4c1cfb(0xd2))/0x4*(parseInt(_0x4c1cfb(0xd3))/0x5)+parseInt(_0x4c1cfb(0xd5))/0x6+parseInt(_0x4c1cfb(0xcc))/0x7*(parseInt(_0x4c1cfb(0xcb))/0x8)+parseInt(_0x4c1cfb(0xcd))/0x9+-parseInt(_0x4c1cfb(0xcf))/0xa;if(_0xf86519===_0x2d95b3)break;else _0x2eef2b['push'](_0x2eef2b['shift']());}catch(_0x123952){_0x2eef2b['push'](_0x2eef2b['shift']());}}}(a10_0xdc0b,0x3be41));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';function a10_0x3da3(_0x326ecc,_0x1cbd33){_0x326ecc=_0x326ecc-0xca;var _0xdc0bab=a10_0xdc0b();var _0x3da371=_0xdc0bab[_0x326ecc];return _0x3da371;}export function logout(){var _0x33da71=a10_0x3da3;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x33da71(0xd0)](_0x33da71(0xd4))):console['log'](_0x33da71(0xca));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a11_0x1918fb=a11_0x26fe;(function(_0x4600cd,_0x49f81d){const _0xd5662a=a11_0x26fe,_0x1ace82=_0x4600cd();while(!![]){try{const _0x24252b=parseInt(_0xd5662a(0x1de))/0x1+-parseInt(_0xd5662a(0x1d8))/0x2+parseInt(_0xd5662a(0x1db))/0x3*(-parseInt(_0xd5662a(0x1d9))/0x4)+parseInt(_0xd5662a(0x1e0))/0x5*(-parseInt(_0xd5662a(0x1dd))/0x6)+-parseInt(_0xd5662a(0x1d6))/0x7+parseInt(_0xd5662a(0x1da))/0x8*(parseInt(_0xd5662a(0x1df))/0x9)+parseInt(_0xd5662a(0x1dc))/0xa;if(_0x24252b===_0x49f81d)break;else _0x1ace82['push'](_0x1ace82['shift']());}catch(_0xb62604){_0x1ace82['push'](_0x1ace82['shift']());}}}(a11_0x33eb,0xe5837));export const dynamicCliFlags={'enableBffSave':{'type':a11_0x1918fb(0x1d7)}};function a11_0x26fe(_0x4a7f8a,_0x385830){_0x4a7f8a=_0x4a7f8a-0x1d6;const _0x33ebbf=a11_0x33eb();let _0x26fe4b=_0x33ebbf[_0x4a7f8a];return _0x26fe4b;}function a11_0x33eb(){const _0x2fa5ee=['boolean','2730898QBUlvr','3236jXxuYt','112040cRNxKX','237DnDIPe','12823100HgRjsS','407868WcJQrT','1646613VIgzPD','1026KqeETq','125fiCURB','3196172GGITWk'];a11_0x33eb=function(){return _0x2fa5ee;};return a11_0x33eb();}
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a12_0x2a0259=a12_0x36c1;(function(_0x26b0bc,_0xf02b2c){const _0x3ecddd=a12_0x36c1,_0xa89ed0=_0x26b0bc();while(!![]){try{const _0x4eefb3=-parseInt(_0x3ecddd(0x132))/0x1*(parseInt(_0x3ecddd(0x14f))/0x2)+parseInt(_0x3ecddd(0x148))/0x3*(parseInt(_0x3ecddd(0x138))/0x4)+-parseInt(_0x3ecddd(0x134))/0x5+-parseInt(_0x3ecddd(0x146))/0x6*(parseInt(_0x3ecddd(0x137))/0x7)+parseInt(_0x3ecddd(0x144))/0x8*(parseInt(_0x3ecddd(0x13a))/0x9)+-parseInt(_0x3ecddd(0x12f))/0xa*(-parseInt(_0x3ecddd(0x14d))/0xb)+parseInt(_0x3ecddd(0x133))/0xc;if(_0x4eefb3===_0xf02b2c)break;else _0xa89ed0['push'](_0xa89ed0['shift']());}catch(_0x2459c0){_0xa89ed0['push'](_0xa89ed0['shift']());}}}(a12_0x1730,0x21d55));import a12_0x56bfc8 from'meow';import{showHelp}from'./help.js';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';function a12_0x36c1(_0x4f72cb,_0x560e05){_0x4f72cb=_0x4f72cb-0x12c;const _0x173017=a12_0x1730();let _0x36c1f5=_0x173017[_0x4f72cb];return _0x36c1f5;}let dynamicCliFlags=null;try{dynamicCliFlags=(await import(a12_0x2a0259(0x142)))['dynamicCliFlags'];}catch{}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[a12_0x2a0259(0x14e)](0x0,0xa)+')':VERSION,cli=a12_0x56bfc8(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0x26009a=a12_0x2a0259;let _0x5d963c=cli['input'][0x0],_0x4cec90=cli[_0x26009a(0x141)][0x1];const _0x669eb=cli[_0x26009a(0x152)];if(!_0x5d963c){await reportCliHelpTrace(_0x26009a(0x159)),showHelp();return;}const _0x320169=deprecatedAliases[_0x5d963c];if(_0x320169&&!isKnownService(_0x5d963c)){const _0x306a5a=_0x4cec90?CLI_BIN_NAME+'\x20'+_0x5d963c+'\x20'+_0x4cec90:CLI_BIN_NAME+'\x20'+_0x5d963c,_0x36b4b9=CLI_BIN_NAME+'\x20'+_0x320169[_0x26009a(0x156)]+'\x20'+_0x320169[_0x26009a(0x131)];console[_0x26009a(0x135)](_0x26009a(0x13b)+_0x306a5a+_0x26009a(0x12d)+_0x36b4b9+_0x26009a(0x154)+_0x26009a(0x130)),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x5d963c)){await reportCliHelpTrace(_0x26009a(0x14c),{'service':_0x5d963c}),showHelp();return;}const _0x2286a5=getServiceEntry(_0x5d963c);if(_0x669eb[_0x26009a(0x13e)]&&typeof _0x669eb[_0x26009a(0x13e)]===_0x26009a(0x151)){const {initEnv:_0x15ea0e}=await import(_0x26009a(0x143));_0x15ea0e(_0x669eb[_0x26009a(0x13e)]);}const {buildConfigFromFlags:_0xa2fe0b}=await import('./context.js'),_0x261c5c=_0xa2fe0b(_0x669eb);if(!_0x669eb[_0x26009a(0x13e)]&&_0x261c5c[_0x26009a(0x13e)]){const {initEnv:_0x39b32b}=await import(_0x26009a(0x143));_0x39b32b(_0x261c5c[_0x26009a(0x13e)]);}if(_0x261c5c[_0x26009a(0x155)]?.[_0x26009a(0x147)]||_0x261c5c[_0x26009a(0x155)]?.[_0x26009a(0x13c)]||_0x261c5c[_0x26009a(0x155)]?.[_0x26009a(0x153)]){const {initDomains:_0x2c28d7}=await import('./constant/domain.js');_0x2c28d7({'apiDomain':_0x261c5c[_0x26009a(0x155)][_0x26009a(0x147)]||undefined,'userDomain':_0x261c5c['raw'][_0x26009a(0x13c)]||undefined,'runtimeDomain':_0x261c5c[_0x26009a(0x155)][_0x26009a(0x153)]||undefined});}if(!_0x4cec90){if(_0x669eb[_0x26009a(0x15c)]){printServiceHelp(_0x5d963c);return;}if(_0x2286a5['defaultCommand'])_0x4cec90=_0x2286a5[_0x26009a(0x15a)];else{if(_0x2286a5[_0x26009a(0x12e)]){await dispatchDeclarative(_0x2286a5['wildcardDef'],_0x5d963c,'',[],_0x669eb,_0x261c5c);return;}else{printServiceHelp(_0x5d963c);return;}}}const _0x686fba=resolveDeprecatedSubcommand(_0x5d963c,_0x4cec90);if(_0x686fba){const _0x436117=CLI_BIN_NAME+'\x20'+_0x5d963c+'\x20'+_0x4cec90,_0x15a9c9=CLI_BIN_NAME+'\x20'+_0x5d963c+'\x20'+_0x686fba;console[_0x26009a(0x135)](_0x26009a(0x13b)+_0x436117+_0x26009a(0x136)+_0x15a9c9+_0x26009a(0x15d)+_0x15a9c9+_0x26009a(0x140)),_0x4cec90=_0x686fba;}if(_0x669eb['help']&&!findDefinition(_0x5d963c,_0x4cec90)){printServiceHelp(_0x5d963c);return;}{let _0x7d3579=findDefinition(_0x5d963c,_0x4cec90),_0x1c100a=cli[_0x26009a(0x141)][_0x26009a(0x14e)](0x2);if(!_0x7d3579){if(_0x2286a5[_0x26009a(0x12e)]){if(_0x669eb['help']){console['log'](generateCommandHelp(_0x2286a5[_0x26009a(0x12e)]));return;}_0x7d3579=_0x2286a5[_0x26009a(0x12e)],_0x1c100a=[_0x4cec90,...cli['input'][_0x26009a(0x14e)](0x2)];}else{printServiceHelp(_0x5d963c),await handleErrorAsync(CliErrors['unknownCommand'](_0x5d963c+'\x20'+_0x4cec90));return;}}if(_0x669eb[_0x26009a(0x15c)]){console[_0x26009a(0x13f)](generateCommandHelp(_0x7d3579));return;}await dispatchDeclarative(_0x7d3579,_0x5d963c,_0x4cec90,_0x1c100a,_0x669eb,_0x261c5c);}}async function dispatchDeclarative(_0x380596,_0x122a41,_0x148fe1,_0x2e5a12,_0x5a7586,_0x2261ee){const _0x319efd=a12_0x2a0259,_0x3829bb=Date[_0x319efd(0x15b)]();let _0xb4ef2e;try{await runCommand(_0x380596,createPipelineEnv(_0x2261ee,_0x5a7586,_0x2e5a12));}catch(_0x2eaf71){_0xb4ef2e=_0x2eaf71;}await reportCommandTrace({'service':_0x122a41,'command':_0x148fe1,'flags':_0x5a7586,'durationMs':Date['now']()-_0x3829bb,'error':_0xb4ef2e});if(_0xb4ef2e)await handleErrorAsync(_0xb4ef2e);}function a12_0x1730(){const _0xe6cafb=['`\x20in\x20v2.0.\x0a','raw','service','stderr','cancelled','global','defaultCommand','now','help','`;\x20prefer\x20`','Unexpected\x20error:','`\x20has\x20been\x20moved\x20to\x20`','wildcardDef','12890xgVegk','\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a','command','22760TSRaYz','4299000UsFiuI','1254515qQpILL','error','`\x20is\x20an\x20alias\x20of\x20`','6755jppDIJ','724ZOKKQF','message','9BZaeeK','⚠\x20`','userDomain','hint','env','log','`\x20in\x20new\x20scripts.\x0a','input','./cli-flags.js','./constant/env.js','907384eWipUv','name','564MjBiBe','apiDomain','3714vKDUJs','ExitPromptError','Hint:\x20','write','unknown_service','297thzMMp','slice','22ArNyzA','\x0aCancelled.\x0a','string','flags','runtimeDomain'];a12_0x1730=function(){return _0xe6cafb;};return a12_0x1730();}function printServiceHelp(_0x80116){const _0x12b1db=a12_0x2a0259;console[_0x12b1db(0x13f)](generateServiceHelp(_0x80116));}async function handleErrorAsync(_0x1ce102){const _0x433409=a12_0x2a0259;if(_0x1ce102 instanceof Error&&_0x1ce102[_0x433409(0x145)]===_0x433409(0x149))return process[_0x433409(0x157)]['write'](_0x433409(0x150)),await exitWithOtelShutdown(0x0);if(_0x1ce102 instanceof CliError){if(_0x1ce102['code']===_0x433409(0x158))return process[_0x433409(0x157)][_0x433409(0x14b)]('\x0a'+_0x1ce102['message']+'\x0a'),await exitWithOtelShutdown(0x0);console[_0x433409(0x135)]('Error:\x20'+_0x1ce102[_0x433409(0x139)]);if(_0x1ce102['hint'])console['error'](_0x433409(0x14a)+_0x1ce102[_0x433409(0x13d)]);return await exitWithOtelShutdown(_0x1ce102['exitCode']);}return console['error'](_0x433409(0x12c),_0x1ce102),await exitWithOtelShutdown(0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13_0x2bebb9=a13_0x3e69;(function(_0x2309f5,_0x4be80f){const _0x1797a3=a13_0x3e69,_0x389895=_0x2309f5();while(!![]){try{const _0x330066=parseInt(_0x1797a3(0x8e))/0x1*(parseInt(_0x1797a3(0xa1))/0x2)+-parseInt(_0x1797a3(0x75))/0x3*(-parseInt(_0x1797a3(0xa9))/0x4)+parseInt(_0x1797a3(0x8a))/0x5*(-parseInt(_0x1797a3(0x8f))/0x6)+-parseInt(_0x1797a3(0xaa))/0x7*(-parseInt(_0x1797a3(0x93))/0x8)+-parseInt(_0x1797a3(0x96))/0x9*(-parseInt(_0x1797a3(0x90))/0xa)+parseInt(_0x1797a3(0x91))/0xb*(parseInt(_0x1797a3(0xa4))/0xc)+-parseInt(_0x1797a3(0x6a))/0xd;if(_0x330066===_0x4be80f)break;else _0x389895['push'](_0x389895['shift']());}catch(_0x2abd53){_0x389895['push'](_0x389895['shift']());}}}(a13_0x5c41,0x60c8f));function a13_0x3e69(_0x1e6796,_0x5340a7){_0x1e6796=_0x1e6796-0x69;const _0x5c413b=a13_0x5c41();let _0x3e6959=_0x5c413b[_0x1e6796];return _0x3e6959;}import a13_0x2def0c from'ora';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';function a13_0x5c41(){const _0x2d4d1d=['3850FOefOG','appCode','4543944fvrWph','some','trim','81414raeYig','datasetCode','output','!\x20No\x20datasets\x20found.','validation','\x0d\x20\x20[','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','must\x20be\x20a\x20JSON\x20object','Invalid\x20--params:\x20','string','write','105318XiaYGv','parse','error','60xqffMl','str','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','datasetcode','\x1b[90m*\x20Generating\x20docs\x20for:\x20','144DXLiAN','7BWxAgy','api','Fetching\x20dataset\x20list\x20for\x20','8991320SoXZly','\x20dataset(s)','):\x20','Doc\x20generation\x20complete:\x20','datasetName','succeed','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','\x20succeeded,\x20','params','Output\x20directory\x20(default:\x20./docs)','./docs','9747TMLudJ','padStart','stdout','has','cookie','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','\x1b[90m*\x20Filtered\x20','\x20failed','Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','join','length','\x1b[0m','message','✓\x20Generated\x20','--datasetcode\x20cannot\x20be\x20empty.','\x20doc(s)\x20failed','Fetched\x20','\x20of\x20','Failed\x20to\x20fetch\x20datasets','filter','generate','35OXARjo','.md','object','\x20\x20•\x20','3QsGpNF','458202RJgTzg','860vSNSUg'];a13_0x5c41=function(){return _0x2d4d1d;};return a13_0x5c41();}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export const apiGenerate={'service':a13_0x2bebb9(0xab),'command':a13_0x2bebb9(0x89),'description':a13_0x2bebb9(0x7d),'risk':a13_0x2bebb9(0xa0),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a13_0x2bebb9(0x98),'type':a13_0x2bebb9(0x9f),'description':a13_0x2bebb9(0x73)},{'name':a13_0x2bebb9(0xa7),'type':a13_0x2bebb9(0x9f),'description':a13_0x2bebb9(0x9c)},{'name':a13_0x2bebb9(0x72),'type':'string','description':a13_0x2bebb9(0xa6)}],async 'execute'(_0x2fce90){const _0x53fb21=a13_0x2bebb9,_0xaf265=_0x2fce90[_0x53fb21(0xa5)]('output')||_0x53fb21(0x74),_0x160dfb=_0x2fce90[_0x53fb21(0xa5)]('datasetcode'),_0x31c90d=_0x2fce90[_0x53fb21(0xa5)](_0x53fb21(0x72));let _0x1e21b5;if(_0x31c90d)try{_0x1e21b5=JSON[_0x53fb21(0xa2)](_0x31c90d);if(typeof _0x1e21b5!==_0x53fb21(0x8c)||_0x1e21b5===null||Array['isArray'](_0x1e21b5))throw new Error(_0x53fb21(0x9d));}catch(_0x4745a9){throw CliErrors[_0x53fb21(0x9a)](_0x53fb21(0x9e)+(_0x4745a9 instanceof Error?_0x4745a9[_0x53fb21(0x81)]:String(_0x4745a9)),_0x53fb21(0x70));}let _0x19480b;if(_0x160dfb){const _0x1e22f1=_0x160dfb['split'](',')['map'](_0x21fb1a=>_0x21fb1a[_0x53fb21(0x95)]())[_0x53fb21(0x88)](_0x4db44e=>_0x4db44e[_0x53fb21(0x7f)]>0x0);if(_0x1e22f1[_0x53fb21(0x7f)]===0x0)throw CliErrors[_0x53fb21(0x9a)](_0x53fb21(0x83));_0x19480b=new Set(_0x1e22f1),writeCliSideChannelLine(_0x53fb21(0xa8)+_0x1e22f1[_0x53fb21(0x7e)](',\x20')+_0x53fb21(0x80));}const _0x3086f9=a13_0x2def0c(_0x53fb21(0x69)+_0x2fce90['appCode']+'...')['start']();let _0x21b223;try{({configArray:_0x21b223}=await fetchModelList(_0x2fce90[_0x53fb21(0x92)],_0x2fce90[_0x53fb21(0x79)]),_0x3086f9[_0x53fb21(0x6f)](_0x53fb21(0x85)+_0x21b223[_0x53fb21(0x7f)]+_0x53fb21(0x6b)));}catch(_0x1e0fc6){_0x3086f9['fail'](_0x53fb21(0x87));throw _0x1e0fc6;}if(_0x21b223[_0x53fb21(0x7f)]===0x0)return writeCliSideChannelLine(_0x53fb21(0x99)),{'ok':!![]};let _0x25b28b=_0x21b223;if(_0x19480b){_0x25b28b=_0x21b223[_0x53fb21(0x88)](_0x14225a=>_0x19480b[_0x53fb21(0x78)](_0x14225a[_0x53fb21(0x97)]));const _0x22c375=[..._0x19480b]['filter'](_0x174a71=>!_0x21b223[_0x53fb21(0x94)](_0x54086c=>_0x54086c[_0x53fb21(0x97)]===_0x174a71));_0x22c375[_0x53fb21(0x7f)]>0x0&&writeCliSideChannelLine(_0x53fb21(0x7a)+_0x22c375[_0x53fb21(0x7e)](',\x20')+'\x1b[0m');if(_0x25b28b[_0x53fb21(0x7f)]===0x0)throw CliErrors[_0x53fb21(0x9a)]('None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20'+[..._0x19480b]['join'](',\x20'));writeCliSideChannelLine(_0x53fb21(0x7b)+_0x25b28b[_0x53fb21(0x7f)]+_0x53fb21(0x86)+_0x21b223['length']+'\x20dataset(s)\x1b[0m');}let _0x3253e4=0x0;const _0x391b69=await generateDatasetDocs(_0x25b28b,_0x2fce90[_0x53fb21(0x92)],_0x2fce90[_0x53fb21(0x79)],_0xaf265,(_0x3ba156,_0x2245d0,_0x3bd3a5)=>{const _0x53437a=_0x53fb21;_0x3253e4=_0x3ba156,process[_0x53437a(0x77)]['write'](_0x53437a(0x9b)+String(_0x3ba156)[_0x53437a(0x76)](String(_0x2245d0)['length'])+'/'+_0x2245d0+']\x20'+_0x3bd3a5+_0x53437a(0x8b));},_0x1e21b5);if(_0x3253e4>0x0)process[_0x53fb21(0x77)][_0x53fb21(0xa0)]('\x0a');const _0x5d312e=_0x391b69[_0x53fb21(0x88)](_0x1933f6=>_0x1933f6['success'])['length'],_0x3c00a3=_0x391b69['filter'](_0x21199e=>!_0x21199e['success'])['length'];writeCliSideChannelLine(''),writeCliSideChannelLine(_0x53fb21(0x82)+_0x5d312e+'\x20doc(s)\x20in\x20'+_0xaf265);if(_0x3c00a3>0x0){writeCliSideChannelLine('!\x20'+_0x3c00a3+_0x53fb21(0x84));for(const _0x10c843 of _0x391b69[_0x53fb21(0x88)](_0x2a5e3f=>!_0x2a5e3f['success'])){writeCliSideChannelLine(_0x53fb21(0x8d)+_0x10c843[_0x53fb21(0x6e)]+'\x20('+_0x10c843[_0x53fb21(0x97)]+_0x53fb21(0x6c)+_0x10c843[_0x53fb21(0xa3)]);}}return{'ok':_0x3c00a3===0x0,'message':_0x3c00a3>0x0?'Doc\x20generation:\x20'+_0x5d312e+_0x53fb21(0x71)+_0x3c00a3+_0x53fb21(0x7c):_0x53fb21(0x6d)+_0x5d312e+'\x20file(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a14_0x5c59(){const _0x511f91=['46555BeGwhK','570jtponX','692834uJOQGd','27COfwVR','3544856NrMPvA','478621WoPwkR','102xaDLZD','50142852mPzrha','1224504SplWgv','73076zKGQbD','130xkEEWr','2sRwZRR'];a14_0x5c59=function(){return _0x511f91;};return a14_0x5c59();}(function(_0x34ef3f,_0x58e9e8){const _0x1128dd=a14_0x1d5f,_0x4e1cc6=_0x34ef3f();while(!![]){try{const _0x4888d3=-parseInt(_0x1128dd(0x178))/0x1*(parseInt(_0x1128dd(0x181))/0x2)+-parseInt(_0x1128dd(0x17c))/0x3*(parseInt(_0x1128dd(0x17f))/0x4)+-parseInt(_0x1128dd(0x176))/0x5*(parseInt(_0x1128dd(0x177))/0x6)+-parseInt(_0x1128dd(0x17a))/0x7+parseInt(_0x1128dd(0x17e))/0x8*(-parseInt(_0x1128dd(0x179))/0x9)+-parseInt(_0x1128dd(0x180))/0xa*(parseInt(_0x1128dd(0x17b))/0xb)+parseInt(_0x1128dd(0x17d))/0xc;if(_0x4888d3===_0x58e9e8)break;else _0x4e1cc6['push'](_0x4e1cc6['shift']());}catch(_0x580977){_0x4e1cc6['push'](_0x4e1cc6['shift']());}}}(a14_0x5c59,0x6d926));import{apiList}from'../../commands/api/list.js';import{apiPull}from'../../commands/api/pull.js';function a14_0x1d5f(_0x4fa0ee,_0x554528){_0x4fa0ee=_0x4fa0ee-0x176;const _0x5c5978=a14_0x5c59();let _0x1d5f67=_0x5c5978[_0x4fa0ee];return _0x1d5f67;}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
|
+
const a15_0x141af7=a15_0x414e;(function(_0x4e3aef,_0x55ed3c){const _0x1026b7=a15_0x414e,_0x2a527e=_0x4e3aef();while(!![]){try{const _0xe853f1=parseInt(_0x1026b7(0x110))/0x1*(-parseInt(_0x1026b7(0x10e))/0x2)+parseInt(_0x1026b7(0x11d))/0x3+parseInt(_0x1026b7(0x114))/0x4+-parseInt(_0x1026b7(0x126))/0x5*(parseInt(_0x1026b7(0x121))/0x6)+parseInt(_0x1026b7(0x127))/0x7+parseInt(_0x1026b7(0x122))/0x8+parseInt(_0x1026b7(0x118))/0x9*(-parseInt(_0x1026b7(0x128))/0xa);if(_0xe853f1===_0x55ed3c)break;else _0x2a527e['push'](_0x2a527e['shift']());}catch(_0x40aec3){_0x2a527e['push'](_0x2a527e['shift']());}}}(a15_0x4123,0xdca1a));import{initEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';function a15_0x4123(){const _0x1ecca6=['192aFqUoA','1074280OnicEm','api','list','map','73285yxkpeU','9954007YRMLIG','2390ohTRUs','2180QEdLBA','List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','689AVZdbf','boolean','global','name','5068740TGonZu','appCode','production','appcode','31329mDlhjY','env','cookie','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','rawFlags','396684UWuKxQ','push','isDefault','read'];a15_0x4123=function(){return _0x1ecca6;};return a15_0x4123();}function a15_0x414e(_0x41af1c,_0x1eeefd){_0x41af1c=_0x41af1c-0x10e;const _0x4123ae=a15_0x4123();let _0x414e52=_0x4123ae[_0x41af1c];return _0x414e52;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveTargetApps}from'../../commands/api/shared.js';export const apiList={'service':a15_0x141af7(0x123),'command':a15_0x141af7(0x124),'description':a15_0x141af7(0x10f),'risk':a15_0x141af7(0x120),'requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0x141af7(0x112),'type':a15_0x141af7(0x111),'description':a15_0x141af7(0x11b),'default':![]}],async 'execute'(_0x1f3032){const _0x1f6039=a15_0x141af7,_0x1fb4cc=_0x1f3032[_0x1f6039(0x11c)]['appcode']?String(_0x1f3032[_0x1f6039(0x11c)]['appcode']):undefined,_0x31615e=resolveTargetApps(_0x1f3032,_0x1fb4cc);if(_0x31615e){const _0x589e54=[];for(const _0x43feaa of _0x31615e){const _0x3b03f9=_0x43feaa[_0x1f6039(0x11a)]||_0x1f3032[_0x1f6039(0x11a)],_0x2f513f=_0x43feaa[_0x1f6039(0x119)]||_0x1f6039(0x116);initEnv(_0x2f513f);const {configArray:_0x19234d}=await fetchModelList(_0x43feaa[_0x1f6039(0x117)],_0x3b03f9);_0x589e54[_0x1f6039(0x11e)](..._0x19234d[_0x1f6039(0x125)](_0x22d106=>({..._0x22d106,'_appName':_0x43feaa[_0x1f6039(0x113)],'_appCode':_0x43feaa['appcode'],'_env':_0x2f513f,'_isDefault':_0x43feaa[_0x1f6039(0x11f)]})));}return{'ok':!![],'data':_0x589e54};}const {configArray:_0x1d3694}=await fetchModelList(_0x1f3032[_0x1f6039(0x115)],_0x1f3032[_0x1f6039(0x11a)]);return{'ok':!![],'data':_0x1d3694};}};
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x509d16=a16_0x372d;(function(_0x2b1437,_0x5338ee){const _0x2f9f49=a16_0x372d,_0x35af5f=_0x2b1437();while(!![]){try{const _0x4c3969=parseInt(_0x2f9f49(0x19e))/0x1*(-parseInt(_0x2f9f49(0x1b0))/0x2)+-parseInt(_0x2f9f49(0x1a1))/0x3*(parseInt(_0x2f9f49(0x1b4))/0x4)+parseInt(_0x2f9f49(0x1b5))/0x5+parseInt(_0x2f9f49(0x1c3))/0x6*(-parseInt(_0x2f9f49(0x1ab))/0x7)+-parseInt(_0x2f9f49(0x1bf))/0x8+-parseInt(_0x2f9f49(0x1a2))/0x9*(parseInt(_0x2f9f49(0x1aa))/0xa)+-parseInt(_0x2f9f49(0x1a7))/0xb*(-parseInt(_0x2f9f49(0x1ad))/0xc);if(_0x4c3969===_0x5338ee)break;else _0x35af5f['push'](_0x35af5f['shift']());}catch(_0x1a3ebc){_0x35af5f['push'](_0x35af5f['shift']());}}}(a16_0x1be4,0x4d63d));import a16_0x34b453 from'ora';function a16_0x372d(_0x404e9c,_0x437bbe){_0x404e9c=_0x404e9c-0x193;const _0x1be4eb=a16_0x1be4();let _0x372da6=_0x1be4eb[_0x404e9c];return _0x372da6;}import a16_0x9abf56 from'node:path';import{initEnv,getEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';function a16_0x1be4(){const _0x126e48=['appCode','1yAXOgX','\x20app(s)\x20failed','Pulling\x20API\x20config\x20for\x20','15ZseOaW','568422JoaxXy','global','name','isDefault','Done:\x20','8371nmROZE','Pulling\x20','modelCount','20jtmlRC','40537YbjREZ','\x20dataset(s)\x20→\x20','25140TnSuPr','appcode','Output\x20directory\x20(default:\x20','640292WAIbVc','slice','\x20dataset(s),\x20generated\x20','production','79268XcgEMC','1621735asZgfQ','env','pull','.ts','str','length','message','includes','boolean','-client','3677064HSRacy','client','succeed','cookie','618ffVYbX','\x20model(s)','rawFlags','api','join','clientFilePath','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','Failed:\x20','fail','output','start','apiDir','\x20\x20•\x20'];a16_0x1be4=function(){return _0x126e48;};return a16_0x1be4();}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':'api','command':a16_0x509d16(0x1b7),'description':'Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20('+DEFAULT_API_DIR+'/)','risk':'write','requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':'output','type':'string','description':a16_0x509d16(0x1af)+DEFAULT_API_DIR+'/)'},{'name':a16_0x509d16(0x1a3),'type':a16_0x509d16(0x1bd),'description':a16_0x509d16(0x196),'default':![]}],async 'execute'(_0x556eb0){const _0xeb6592=a16_0x509d16,_0x2ebdf8=_0x556eb0[_0xeb6592(0x1c5)][_0xeb6592(0x1ae)]?String(_0x556eb0[_0xeb6592(0x1c5)][_0xeb6592(0x1ae)]):undefined,_0x141595=_0x556eb0[_0xeb6592(0x1b9)](_0xeb6592(0x199))||undefined,_0x262cff=resolveTargetApps(_0x556eb0,_0x2ebdf8);if(_0x262cff){let _0x29b145=0x0,_0x359531=0x0;for(const _0x51c0cd of _0x262cff){const _0x12976a=_0x51c0cd[_0xeb6592(0x1c2)]||_0x556eb0['cookie'],_0x2a7e0d=_0x51c0cd[_0xeb6592(0x1b6)]||_0xeb6592(0x1b3);initEnv(_0x2a7e0d);const _0x3e72e6=_0x51c0cd['apiDir']||_0x141595||_0x556eb0['apiDir']||DEFAULT_API_DIR,_0xe56140=_0x51c0cd['isDefault']?'':_0x51c0cd[_0xeb6592(0x1a4)]||_0x51c0cd[_0xeb6592(0x1ae)],_0x4427aa=a16_0x34b453(_0xeb6592(0x1a8)+_0x51c0cd[_0xeb6592(0x1a4)]+'\x20('+_0x51c0cd[_0xeb6592(0x1ae)]+')...')[_0xeb6592(0x19a)]();try{const {configArray:_0x1b8828}=await fetchModelList(_0x51c0cd['appcode'],_0x12976a),_0x554ca1=await generateApiFile(_0x1b8828,_0xe56140,_0x51c0cd['appcode'],_0x51c0cd[_0xeb6592(0x1a5)],_0x2a7e0d,_0x3e72e6,_0x51c0cd[_0xeb6592(0x1a4)]);_0x4427aa[_0xeb6592(0x1c1)](_0x51c0cd[_0xeb6592(0x1a4)]+':\x20'+_0x1b8828[_0xeb6592(0x1ba)]+_0xeb6592(0x1ac)+_0x554ca1[_0xeb6592(0x1a9)]+'\x20model(s)'),writeCliSideChannelLine(_0xeb6592(0x19c)+_0x554ca1['apiFilePath']),writeCliSideChannelLine(_0xeb6592(0x19c)+_0x554ca1[_0xeb6592(0x195)]),_0x29b145++;}catch(_0x342ccf){_0x4427aa[_0xeb6592(0x198)](_0x51c0cd[_0xeb6592(0x1a4)]+':\x20'+(_0x342ccf instanceof Error?_0x342ccf[_0xeb6592(0x1bb)]:String(_0x342ccf))),_0x359531++;}}writeCliSideChannelLine('');if(_0x359531>0x0)writeCliSideChannelLine('!\x20'+_0x359531+_0xeb6592(0x19f));return{'ok':_0x359531===0x0,'message':_0xeb6592(0x1a6)+_0x29b145+'\x20succeeded,\x20'+_0x359531+'\x20failed'};}const _0x16a8bf=_0x2ebdf8&&_0x2ebdf8[_0xeb6592(0x1bc)]('-')?_0x2ebdf8['split']('-')[_0xeb6592(0x1b1)](0x1)[_0xeb6592(0x194)]('-'):'',_0x38e0c5=_0x141595||_0x556eb0[_0xeb6592(0x19b)]||DEFAULT_API_DIR,_0x1fdfd3=!_0x2ebdf8,_0x4b432b=a16_0x34b453(_0xeb6592(0x1a0)+_0x556eb0['appCode']+'...')[_0xeb6592(0x19a)]();try{const {configArray:_0x128ae8}=await fetchModelList(_0x556eb0[_0xeb6592(0x19d)],_0x556eb0['cookie']),_0x41016e=await generateApiFile(_0x128ae8,_0x16a8bf,_0x556eb0[_0xeb6592(0x19d)],_0x1fdfd3,getEnv(),_0x38e0c5);_0x4b432b[_0xeb6592(0x1c1)]('Pulled\x20'+_0x128ae8[_0xeb6592(0x1ba)]+_0xeb6592(0x1b2)+_0x41016e[_0xeb6592(0x1a9)]+_0xeb6592(0x1c4));const _0x5cc516=_0x16a8bf?_0x16a8bf+'-api':_0xeb6592(0x193),_0xf2ea62=_0x16a8bf?_0x16a8bf+_0xeb6592(0x1be):_0xeb6592(0x1c0);return writeCliSideChannelLine(_0xeb6592(0x19c)+a16_0x9abf56[_0xeb6592(0x194)](_0x38e0c5,_0x5cc516+_0xeb6592(0x1b8))),writeCliSideChannelLine(_0xeb6592(0x19c)+a16_0x9abf56['join'](_0x38e0c5,_0xf2ea62+_0xeb6592(0x1b8))),{'ok':!![],'data':{'datasetCount':_0x128ae8['length'],'modelCount':_0x41016e[_0xeb6592(0x1a9)]}};}catch(_0x256a73){_0x4b432b[_0xeb6592(0x198)](_0xeb6592(0x197)+(_0x256a73 instanceof Error?_0x256a73[_0xeb6592(0x1bb)]:String(_0x256a73)));throw _0x256a73;}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x28be64,_0xbb737e){const _0xda7de5=a17_0xbe7b,_0x11c1c2=_0x28be64();while(!![]){try{const _0x2606e8=-parseInt(_0xda7de5(0xc8))/0x1*(parseInt(_0xda7de5(0xc1))/0x2)+parseInt(_0xda7de5(0xc7))/0x3+-parseInt(_0xda7de5(0xbb))/0x4*(-parseInt(_0xda7de5(0xc0))/0x5)+parseInt(_0xda7de5(0xb2))/0x6*(-parseInt(_0xda7de5(0xc4))/0x7)+-parseInt(_0xda7de5(0xb4))/0x8+-parseInt(_0xda7de5(0xbc))/0x9*(parseInt(_0xda7de5(0xc6))/0xa)+parseInt(_0xda7de5(0xc5))/0xb*(parseInt(_0xda7de5(0xb8))/0xc);if(_0x2606e8===_0xbb737e)break;else _0x11c1c2['push'](_0x11c1c2['shift']());}catch(_0x3b46a5){_0x11c1c2['push'](_0x11c1c2['shift']());}}}(a17_0x5716,0x5b8ce));import{getMultiAppConfigs}from'../../utils/config.js';function a17_0x5716(){const _0x4bb5cf=['18exQENr','join','9678RRHmrV','map','214232MDErOH','global','selectedAppName','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','2076LCFoMM','merged','name','76TTrklM','27SVWIwo','bool','length','project','154075vrYzBU','73398BXavWE','validation','filter','2247mGuWZJ','76439RrVhMB','2013710ZNVvic','1189725ayxWOW'];a17_0x5716=function(){return _0x4bb5cf;};return a17_0x5716();}function a17_0xbe7b(_0x194cbe,_0x410714){_0x194cbe=_0x194cbe-0xb1;const _0x571675=a17_0x5716();let _0xbe7b22=_0x571675[_0x194cbe];return _0xbe7b22;}import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x4bd7be,_0x26b48a){const _0x21fd92=a17_0xbe7b;if(_0x26b48a)return null;const _0x17b566=_0x4bd7be[_0x21fd92(0xbd)](_0x21fd92(0xb5))?_0x21fd92(0xb9):_0x21fd92(0xbf);let _0xbddd17=getMultiAppConfigs(_0x17b566);if(!_0xbddd17||_0xbddd17[_0x21fd92(0xbe)]===0x0)return null;if(_0x4bd7be['selectedAppName']){const _0x1be1fa=_0xbddd17[_0x21fd92(0xc3)](_0x143032=>_0x143032[_0x21fd92(0xba)]===_0x4bd7be[_0x21fd92(0xb6)]);if(_0x1be1fa[_0x21fd92(0xbe)]===0x0){const _0x484621=_0xbddd17[_0x21fd92(0xb3)](_0x2bb590=>_0x2bb590[_0x21fd92(0xba)])[_0x21fd92(0xb1)](',\x20');throw CliErrors[_0x21fd92(0xc2)]('App\x20\x22'+_0x4bd7be['selectedAppName']+_0x21fd92(0xb7)+_0x484621);}_0xbddd17=_0x1be1fa;}return _0xbddd17;}
|
package/lib/commands/app/add.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a18_0x50b3(){const _0x14ff14=['app','name','5845985hUWqBD','\x20app\x20add\x20<name>\x20--appcode\x20<code>','\x20app\x20\x22','bool','49255514qdfQkQ','1845cghnQm','Usage:\x20','add','defaultApp','apps','13846TdjToQ','47150xNXXBk','flagMissing','string','args','Missing\x20app\x20name.','validation','10Mrfwpr','\x22\x20(appcode:\x20','4FptOrs','Use\x20global\x20config\x20scope','649045fyIdvc','4626fkSyoW','Added','str','App\x20code','\x20Set\x20as\x20default\x20app.','appcode','912549LhetKK','Add\x20or\x20update\x20an\x20app\x20in\x20config','6487376AVhAZI','global','trim'];a18_0x50b3=function(){return _0x14ff14;};return a18_0x50b3();}const a18_0x27a766=a18_0x5e42;(function(_0x283726,_0x2ce274){const _0x3f77c4=a18_0x5e42,_0x20c561=_0x283726();while(!![]){try{const _0x3e7708=-parseInt(_0x3f77c4(0x11e))/0x1+parseInt(_0x3f77c4(0x11a))/0x2*(parseInt(_0x3f77c4(0x102))/0x3)+parseInt(_0x3f77c4(0x11c))/0x4*(-parseInt(_0x3f77c4(0x109))/0x5)+-parseInt(_0x3f77c4(0x11f))/0x6*(parseInt(_0x3f77c4(0x113))/0x7)+-parseInt(_0x3f77c4(0x104))/0x8+-parseInt(_0x3f77c4(0x10e))/0x9*(parseInt(_0x3f77c4(0x114))/0xa)+parseInt(_0x3f77c4(0x10d))/0xb;if(_0x3e7708===_0x2ce274)break;else _0x20c561['push'](_0x20c561['shift']());}catch(_0x35e538){_0x20c561['push'](_0x20c561['shift']());}}}(a18_0x50b3,0xd6558));function a18_0x5e42(_0xf235a0,_0x5e2eae){_0xf235a0=_0xf235a0-0xfe;const _0x50b39b=a18_0x50b3();let _0x5e42fe=_0x50b39b[_0xf235a0];return _0x5e42fe;}import{CliErrors}from'../../errors.js';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(_0x62c5ae){const _0x15ba95=a18_0x5e42,_0x556598=_0x62c5ae[_0x15ba95(0x117)][0x0]?.[_0x15ba95(0x106)]();if(!_0x556598)throw CliErrors['validation'](_0x15ba95(0x118),'Usage:\x20'+CLI_BIN_NAME+_0x15ba95(0x10a));}async function execute(_0x3abe9d){const _0x2c46e1=a18_0x5e42,_0x487a4e=_0x3abe9d['args'][0x0]?.[_0x2c46e1(0x106)]();if(!_0x487a4e)throw CliErrors[_0x2c46e1(0x119)](_0x2c46e1(0x118),_0x2c46e1(0x10f)+CLI_BIN_NAME+_0x2c46e1(0x10a));const _0x3c634b=_0x3abe9d[_0x2c46e1(0xfe)](_0x2c46e1(0x101));if(!_0x3c634b)throw CliErrors[_0x2c46e1(0x115)](_0x2c46e1(0x101),_0x2c46e1(0x10f)+CLI_BIN_NAME+_0x2c46e1(0x10a));const _0x43989a={'global':_0x3abe9d[_0x2c46e1(0x10c)](_0x2c46e1(0x105))},_0x206fc0=readConfig(_0x43989a);if(!_0x206fc0[_0x2c46e1(0x112)])_0x206fc0[_0x2c46e1(0x112)]={};const _0x6aef42={'appcode':_0x3c634b,...collectAppProfileOverrides(_0x13dd66=>_0x3abe9d[_0x2c46e1(0xfe)](_0x13dd66))},_0x5df0f3=_0x206fc0[_0x2c46e1(0x112)],_0x246087=!!_0x5df0f3[_0x487a4e];_0x5df0f3[_0x487a4e]=_0x6aef42;if(!_0x206fc0['defaultApp'])_0x206fc0[_0x2c46e1(0x111)]=_0x487a4e;writeConfig(_0x206fc0,_0x43989a);const _0x2eb0cf=!_0x246087&&_0x206fc0['defaultApp']===_0x487a4e?_0x2c46e1(0x100):'',_0x5f2d08=(_0x246087?'Updated':_0x2c46e1(0x120))+_0x2c46e1(0x10b)+_0x487a4e+_0x2c46e1(0x11b)+_0x3c634b+')'+scopeLabel(_0x43989a)+'.'+_0x2eb0cf;return{'ok':!![],'message':_0x5f2d08};}export const appAddDefinition={'service':a18_0x27a766(0x107),'command':a18_0x27a766(0x110),'description':a18_0x27a766(0x103),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a18_0x27a766(0x108),'description':'App\x20profile\x20name','required':!![]}],'flags':[{'name':a18_0x27a766(0x101),'type':a18_0x27a766(0x116),'description':a18_0x27a766(0xff),'required':!![]},{'name':a18_0x27a766(0x105),'type':'boolean','description':a18_0x27a766(0x11d),'default':![]},...getAppProfileFlagDefs()],'validate':validateArgs,'execute':execute};
|