@lovrabet/rabetbase-cli 2.1.6-beta.0 → 2.1.7-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/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 -0
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -0
- package/lib/commands/dataset/link-delete.js +1 -0
- package/lib/commands/dataset/link-shared.js +1 -0
- package/lib/commands/dataset/link-update.js +1 -0
- 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 -0
- package/lib/commands/issue/report.js +1 -0
- 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 -0
- 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 +2 -1
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a0_0x16e263=a0_0x3c46;(function(_0x14d7ad,_0x48b35e){const _0x57f99b=a0_0x3c46,_0x7d5601=_0x14d7ad();while(!![]){try{const _0x4df541=parseInt(_0x57f99b(0xaa))/0x1+parseInt(_0x57f99b(0xb0))/0x2*(-parseInt(_0x57f99b(0xae))/0x3)+-parseInt(_0x57f99b(0xba))/0x4*(parseInt(_0x57f99b(0xb4))/0x5)+parseInt(_0x57f99b(0xa5))/0x6+parseInt(_0x57f99b(0xa1))/0x7*(parseInt(_0x57f99b(0xb2))/0x8)+parseInt(_0x57f99b(0xa3))/0x9+parseInt(_0x57f99b(0xa6))/0xa*(-parseInt(_0x57f99b(0x9f))/0xb);if(_0x4df541===_0x48b35e)break;else _0x7d5601['push'](_0x7d5601['shift']());}catch(_0x4f5716){_0x7d5601['push'](_0x7d5601['shift']());}}}(a0_0x5c3a,0x8bf3e));import{mkdirSync,writeFileSync}from'node:fs';function a0_0x3c46(_0x115594,_0x5d241e){_0x115594=_0x115594-0x9d;const _0x5c3a5c=a0_0x5c3a();let _0x3c46d5=_0x5c3a5c[_0x115594];return _0x3c46d5;}import a0_0x19974e from'node:path';import{getApiDomain}from'../constant/domain.js';function a0_0x5c3a(){const _0x2926e1=['Waiting\x203\x20seconds...\x0a','886968bsHeOd','220kCrcQH','/api/node-toolbox/api-doc-generator','Fetch\x20doc\x20(','.md\x20(','471974vtkxPq','length','error','tableName','3273NPteER','datasetCode','68cSEoQz','.md\x20-\x20','232PxFQcj','生成文档成功:\x20','3195505ilcETI','success','.md','utf8','./docs','生成文档失败:\x20','4itQaPr','):\x20missing\x20data.markdown\x20field','markdown','api-doc','log','✓\x20Generated:\x20','string','200563YboFJH','Invalid\x20response\x20format\x20(','21182RFSRDP','name','8487099MRJxKi'];a0_0x5c3a=function(){return _0x2926e1;};return a0_0x5c3a();}import{logger}from'../utils/logger.js';import{platformFetch}from'../core/api-client.js';export async function fetchDatasetDoc(_0x1b2da1){const _0x55c0e0=a0_0x3c46,{appCode:_0x585d71,cookie:_0x2e407a,datasetCode:_0x155ece,datasetId:_0x323edb,extraParams:_0x9bdad6}=_0x1b2da1,_0xb453ec=getApiDomain()+_0x55c0e0(0xa7),_0x16cdfc=await platformFetch(_0xb453ec,{'method':'POST','body':{'appCode':_0x585d71,'datasetCode':_0x155ece,'datasetId':_0x323edb,..._0x9bdad6||{}},'cookie':_0x2e407a,'label':_0x55c0e0(0xa8)+_0x155ece+')'});if(!_0x16cdfc||typeof _0x16cdfc[_0x55c0e0(0xbc)]!==_0x55c0e0(0x9e))throw new Error(_0x55c0e0(0xa0)+_0x155ece+_0x55c0e0(0xbb));return _0x16cdfc[_0x55c0e0(0xbc)];}function delay(_0x3d0560){return new Promise(_0x3ab899=>setTimeout(_0x3ab899,_0x3d0560));}export async function generateDatasetDocs(_0x5bb5f3,_0x588c84,_0x2de843,_0x58f37c=a0_0x16e263(0xb8),_0x5a4ac2,_0x5cc229){const _0x43f2b9=a0_0x16e263;mkdirSync(_0x58f37c,{'recursive':!![]});const _0x2a5865=[],_0x247b97=_0x5bb5f3[_0x43f2b9(0xab)];console[_0x43f2b9(0xbe)]('\x0a'+_0x247b97+'\x20datasets\x20to\x20generate\x20docs\x20for\x0a');for(let _0x3e7a31=0x0;_0x3e7a31<_0x5bb5f3[_0x43f2b9(0xab)];_0x3e7a31++){const _0x554c89=_0x5bb5f3[_0x3e7a31],_0x36db4d=_0x3e7a31+0x1,_0x5d966b=_0x554c89[_0x43f2b9(0xad)];try{console[_0x43f2b9(0xbe)]('['+_0x36db4d+'/'+_0x247b97+']\x20Generating:\x20'+_0x5d966b+_0x43f2b9(0xa9)+_0x554c89[_0x43f2b9(0xa2)]+')');if(_0x5a4ac2)_0x5a4ac2(_0x36db4d,_0x247b97,_0x5d966b);const _0x1d32be=await fetchDatasetDoc({'appCode':_0x588c84,'cookie':_0x2de843,'datasetCode':_0x554c89[_0x43f2b9(0xaf)],'datasetId':_0x554c89['id'],'enableAI':![],'extraParams':_0x5cc229}),_0x32b690=a0_0x19974e['join'](_0x58f37c,_0x5d966b+_0x43f2b9(0xb6));writeFileSync(_0x32b690,_0x1d32be,{'encoding':_0x43f2b9(0xb7)}),console[_0x43f2b9(0xbe)](_0x43f2b9(0x9d)+_0x5d966b+_0x43f2b9(0xb6)),logger[_0x43f2b9(0xb5)](_0x43f2b9(0xbd),_0x43f2b9(0xb3)+_0x5d966b,undefined,{'datasetCode':_0x554c89[_0x43f2b9(0xaf)],'datasetName':_0x554c89['name'],'filePath':_0x32b690,'progress':_0x36db4d+'/'+_0x247b97}),_0x2a5865['push']({'datasetCode':_0x554c89[_0x43f2b9(0xaf)],'datasetName':_0x554c89[_0x43f2b9(0xa2)],'filePath':_0x32b690,'success':!![]});if(_0x36db4d<_0x247b97)await delay(0x1388);}catch(_0x850216){const _0x4ab9f0=_0x850216 instanceof Error?_0x850216['message']:String(_0x850216);console[_0x43f2b9(0xbe)]('✗\x20Failed:\x20'+_0x5d966b+_0x43f2b9(0xb1)+_0x4ab9f0),logger[_0x43f2b9(0xac)](_0x43f2b9(0xbd),_0x43f2b9(0xb9)+_0x554c89[_0x43f2b9(0xaf)],{'datasetCode':_0x554c89[_0x43f2b9(0xaf)],'datasetName':_0x554c89[_0x43f2b9(0xa2)],'error':_0x4ab9f0,'progress':_0x36db4d+'/'+_0x247b97}),_0x2a5865['push']({'datasetCode':_0x554c89[_0x43f2b9(0xaf)],'datasetName':_0x554c89[_0x43f2b9(0xa2)],'filePath':'','success':![],'error':_0x4ab9f0}),_0x36db4d<_0x247b97&&(console[_0x43f2b9(0xbe)](_0x43f2b9(0xa4)),await delay(0xbb8));}}return _0x2a5865;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x188478,_0x161816){const _0x40ec94=a1_0xcc8a,_0x44d375=_0x188478();while(!![]){try{const _0x40086c=-parseInt(_0x40ec94(0x1b5))/0x1+parseInt(_0x40ec94(0x1b0))/0x2*(parseInt(_0x40ec94(0x1b2))/0x3)+parseInt(_0x40ec94(0x1b6))/0x4+parseInt(_0x40ec94(0x1b7))/0x5*(-parseInt(_0x40ec94(0x1b8))/0x6)+parseInt(_0x40ec94(0x1b9))/0x7+-parseInt(_0x40ec94(0x1b1))/0x8+parseInt(_0x40ec94(0x1bb))/0x9*(-parseInt(_0x40ec94(0x1ae))/0xa);if(_0x40086c===_0x161816)break;else _0x44d375['push'](_0x44d375['shift']());}catch(_0x4a6347){_0x44d375['push'](_0x44d375['shift']());}}}(a1_0x5d2d,0x79eca));function a1_0xcc8a(_0x1db0b3,_0x12f2c4){_0x1db0b3=_0x1db0b3-0x1aa;const _0x5d2d72=a1_0x5d2d();let _0xcc8a11=_0x5d2d72[_0x1db0b3];return _0xcc8a11;}import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';import{platformFetch}from'../core/api-client.js';function cleanNewlines(_0xb22495){const _0x41f604=a1_0xcc8a;return _0xb22495[_0x41f604(0x1b3)](/[\r\n]+/g,'\x20')[_0x41f604(0x1bc)]();}function cleanDatasetName(_0x38e383){const _0x3e1879=a1_0xcc8a;if(!_0x38e383[_0x3e1879(0x1ac)])return _0x38e383;return{..._0x38e383,'name':cleanNewlines(_0x38e383[_0x3e1879(0x1ac)])};}export async function fetchModelList(_0x50d9c9,_0x5888fe){const _0x10999a=a1_0xcc8a,_0x42843c=getEnv(),_0x2087cf=getApiDomain()+_0x10999a(0x1bd)+_0x50d9c9+_0x10999a(0x1b4);logger[_0x10999a(0x1aa)](_0x10999a(0x1af),'正在从服务器拉取模型列表...\x20(环境:\x20'+_0x42843c+')',{'apiUrl':_0x2087cf});const _0x4cfe51=await platformFetch(_0x2087cf,{'cookie':_0x5888fe,'label':_0x10999a(0x1ab)}),_0x1ddf9f=(_0x4cfe51[_0x10999a(0x1ad)]??[])['map'](cleanDatasetName);return{'configArray':_0x1ddf9f,'count':_0x1ddf9f[_0x10999a(0x1ba)]};}function a1_0x5d2d(){const _0x5f932f=['146399utiTvz','2520396jWJxTf','3583985Lgusrg','6IobRXT','4102616xheYqs','length','701181rXKUgo','trim','/api/node-toolbox/dataset/model-list?appcode=','info','Fetch\x20datasets','name','configArray','40jPfDPm','fetch-model-list','932kAZtSf','768216JyWOLN','3567WBMsEj','replace','&otype=array'];a1_0x5d2d=function(){return _0x5f932f;};return a1_0x5d2d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x575223,_0xa4b7fa){const _0x294f47=a2_0x42c2,_0x456d57=_0x575223();while(!![]){try{const _0x3920e4=-parseInt(_0x294f47(0xf7))/0x1*(parseInt(_0x294f47(0x10f))/0x2)+-parseInt(_0x294f47(0x105))/0x3*(parseInt(_0x294f47(0xeb))/0x4)+-parseInt(_0x294f47(0xfe))/0x5+-parseInt(_0x294f47(0x10e))/0x6+parseInt(_0x294f47(0xf4))/0x7+-parseInt(_0x294f47(0x10b))/0x8+parseInt(_0x294f47(0xfd))/0x9;if(_0x3920e4===_0xa4b7fa)break;else _0x456d57['push'](_0x456d57['shift']());}catch(_0xebf537){_0x456d57['push'](_0x456d57['shift']());}}}(a2_0x5c6f,0x8552c));function a2_0x42c2(_0x20c2e5,_0x117915){_0x20c2e5=_0x20c2e5-0xea;const _0x5c6f9a=a2_0x5c6f();let _0x42c2a7=_0x5c6f9a[_0x20c2e5];return _0x42c2a7;}import a2_0x3dd27e from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a2_0x3e950b from'node:path';function a2_0x5c6f(){const _0x27c080=['4147986VhMfga','1044440HgGCxO','name','4TWgPic','key','api','\x20config\x20set\x20app\x20<value>`','-client','api.ts.tpl','{\x20apiConfigName:\x20\x22','.ts','forEach','5824973YaucvE','typescript','\x22\x20}','1IQXKEp','dirname','templates/generate-api','init-api','CONFIG_NAMES.DEFAULT','resolve','22287861aFLSiw','602290YHKOlV','join','toUpperCase','alias','../..','Please\x20configure\x20app\x20code\x20first\x20via\x20`','success','1649805QabxLn','API\x20文件生成成功!','client.ts.tpl',',\x20env:\x20\x22','format','replace','7028256lRkaxf','replaceApiContent','utf8'];a2_0x5c6f=function(){return _0x27c080;};return a2_0x5c6f();}import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';export async function generateApiFile(_0x5ddac3,_0x18b121,_0x5755e4,_0x297ed4,_0x64d86c,_0x3ccfb9,_0xd7593d){const _0x5e16d8=a2_0x42c2;if(!_0x5755e4)throw new Error(_0x5e16d8(0x103)+CLI_BIN_NAME+_0x5e16d8(0xee));const _0x35ab75=_0x297ed4&&!_0xd7593d,_0x54c952=_0xd7593d||_0x5755e4,_0xad2221=_0x35ab75?_0x5e16d8(0xfb):'\x22'+_0x54c952+'\x22',_0x54b895=!isProduction(_0x64d86c);let _0x2f47d8;if(_0x35ab75)_0x54b895?_0x2f47d8='{\x20apiConfigName:\x20'+_0xad2221+_0x5e16d8(0x108)+_0x64d86c+_0x5e16d8(0xf6):_0x2f47d8='';else{const _0x3d7e5f=_0x54b895?_0x5e16d8(0x108)+_0x64d86c+'\x22':'';_0x2f47d8=_0x5e16d8(0xf1)+_0x54c952+'\x22'+_0x3d7e5f+'\x20}';}const _0x5b2ff9=_0x18b121?_0x18b121+'-api':_0x5e16d8(0xed),_0xe7b743=_0x18b121?_0x18b121+_0x5e16d8(0xef):'client',_0x19f4d1=_0x18b121&&!/^app-[a-f0-9]+$/i['test'](_0x18b121)?_0x18b121[_0x5e16d8(0x10a)](/-/g,'_')[_0x5e16d8(0x100)]():'LOVRABET',_0x42f631=[];_0x5ddac3[_0x5e16d8(0xf3)](_0x5d5262=>{const _0x12d453=_0x5e16d8;_0x42f631['push']({'datasetCode':_0x5d5262['datasetCode'],'tableName':_0x5d5262['tableName'],'name':_0x5d5262[_0x12d453(0xea)]||'','alias':_0x5d5262[_0x12d453(0x101)]||_0x5d5262[_0x12d453(0xec)]});});const _0x671fc2=fileURLToPath(import.meta.url),_0x5cca88=a2_0x3e950b[_0x5e16d8(0xfc)](a2_0x3e950b[_0x5e16d8(0xf8)](_0x671fc2),_0x5e16d8(0x102)),_0x53f651=a2_0x3e950b[_0x5e16d8(0xff)](_0x5cca88,_0x5e16d8(0xf9)),_0x1ae645=a2_0x3e950b[_0x5e16d8(0xff)](_0x53f651,_0x5e16d8(0xf0)),_0x23e261=a2_0x3e950b['join'](_0x53f651,_0x5e16d8(0x107)),_0x5dbecf=_0x3ccfb9;mkdirSync(_0x5dbecf,{'recursive':!![]});const _0x598c48=_0x42f631[0x0]?.[_0x5e16d8(0x101)],_0x1fc340=readFileSync(_0x1ae645,_0x5e16d8(0x10d)),_0x294fbe=TemplateReplacer[_0x5e16d8(0x10c)](_0x1fc340,_0x5755e4,_0x42f631,_0x598c48,_0x5b2ff9,_0xad2221,undefined,_0x19f4d1),_0x403705=await a2_0x3dd27e[_0x5e16d8(0x109)](_0x294fbe,{'parser':_0x5e16d8(0xf5)}),_0x56b09a=a2_0x3e950b[_0x5e16d8(0xff)](_0x5dbecf,_0x5b2ff9+_0x5e16d8(0xf2));writeFileSync(_0x56b09a,_0x403705,{'encoding':_0x5e16d8(0x10d)});const _0x20f46d=readFileSync(_0x23e261,_0x5e16d8(0x10d)),_0x3a8577=TemplateReplacer[_0x5e16d8(0x10c)](_0x20f46d,_0x5755e4,_0x42f631,_0x598c48,_0x5b2ff9,_0xad2221,_0x2f47d8,_0x19f4d1),_0x421ca6=await a2_0x3dd27e['format'](_0x3a8577,{'parser':_0x5e16d8(0xf5)}),_0x2c82f4=a2_0x3e950b[_0x5e16d8(0xff)](_0x5dbecf,_0xe7b743+_0x5e16d8(0xf2));writeFileSync(_0x2c82f4,_0x421ca6,{'encoding':_0x5e16d8(0x10d)});const _0x125184=_0x42f631['length'];return logger[_0x5e16d8(0x104)](_0x5e16d8(0xfa),_0x5e16d8(0x106),undefined,{'apiFile':_0x56b09a,'clientFile':_0x2c82f4,'modelCount':_0x125184,'configName':_0xad2221}),{'modelCount':_0x125184,'apiFilePath':_0x56b09a,'clientFilePath':_0x2c82f4,'configName':_0xad2221};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ccde0,_0x24cc3e){const _0x3d16ef=a3_0x4fb6,_0x4ec9a8=_0x1ccde0();while(!![]){try{const _0x3d0519=parseInt(_0x3d16ef(0xd3))/0x1*(parseInt(_0x3d16ef(0xcb))/0x2)+parseInt(_0x3d16ef(0xd1))/0x3+-parseInt(_0x3d16ef(0xdb))/0x4+-parseInt(_0x3d16ef(0xce))/0x5+parseInt(_0x3d16ef(0xd2))/0x6*(parseInt(_0x3d16ef(0xd5))/0x7)+-parseInt(_0x3d16ef(0xd6))/0x8+parseInt(_0x3d16ef(0xde))/0x9*(parseInt(_0x3d16ef(0xdf))/0xa);if(_0x3d0519===_0x24cc3e)break;else _0x4ec9a8['push'](_0x4ec9a8['shift']());}catch(_0x3e7667){_0x4ec9a8['push'](_0x4ec9a8['shift']());}}}(a3_0x5e60,0x201c5));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a3_0x5e60(){const _0x4cb51f=['No\x20valid\x20session.\x20Login\x20now?','*\x20Login\x20successful!','242435NiMYhg','log','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','519228mBMfec','6fTrHON','94881jCkbHp','nonInteractive','742455jcWwIX','1901224sDdauu','stop','Run\x20`','\x20auth\x20login\x20--yes`\x20in\x20an\x20interactive\x20terminal.','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','14160IGTTNb','Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','!\x20Login\x20failed.','14643ZbRcfl','290tpdRmG','validation','2jVuOaW'];a3_0x5e60=function(){return _0x4cb51f;};return a3_0x5e60();}import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';function a3_0x4fb6(_0x351f48,_0x57a188){_0x351f48=_0x351f48-0xcb;const _0x5e60b7=a3_0x5e60();let _0x4fb611=_0x5e60b7[_0x351f48];return _0x4fb611;}import a3_0x48062f from'ora';export async function runAuthServer(_0x490015){const _0x3e6ca4=a3_0x4fb6,_0x319346=await getIsSessionValid();if(_0x319346){console['log'](_0x3e6ca4(0xd0));return;}if(_0x490015?.[_0x3e6ca4(0xd4)])throw CliErrors[_0x3e6ca4(0xe0)](_0x3e6ca4(0xdc),_0x3e6ca4(0xd8)+CLI_BIN_NAME+_0x3e6ca4(0xd9));const _0x1aa8b9=_0x490015?.['autoYes']?!![]:await confirm({'message':_0x3e6ca4(0xcc),'default':!![]});if(!_0x1aa8b9)return;const _0x201ceb=a3_0x48062f(_0x3e6ca4(0xda))['start'](),_0x7a4bdc=await authServer({'silent':!![]});_0x201ceb[_0x3e6ca4(0xd7)](),_0x7a4bdc?console['log'](_0x3e6ca4(0xcd)):console[_0x3e6ca4(0xcf)](_0x3e6ca4(0xdd));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a4_0x238153=a4_0x5f25;(function(_0xdc3a54,_0x1717d5){const _0x2139fe=a4_0x5f25,_0x56d7f7=_0xdc3a54();while(!![]){try{const _0x2ab077=parseInt(_0x2139fe(0x102))/0x1+parseInt(_0x2139fe(0xf9))/0x2+parseInt(_0x2139fe(0xef))/0x3*(parseInt(_0x2139fe(0x10f))/0x4)+-parseInt(_0x2139fe(0xf6))/0x5*(parseInt(_0x2139fe(0x105))/0x6)+parseInt(_0x2139fe(0x110))/0x7*(parseInt(_0x2139fe(0x10b))/0x8)+-parseInt(_0x2139fe(0xf5))/0x9+-parseInt(_0x2139fe(0x107))/0xa*(parseInt(_0x2139fe(0xf0))/0xb);if(_0x2ab077===_0x1717d5)break;else _0x56d7f7['push'](_0x56d7f7['shift']());}catch(_0x121d52){_0x56d7f7['push'](_0x56d7f7['shift']());}}}(a4_0x29ae,0xd682e));import{writeFileSync}from'node:fs';import a4_0x34ba20 from'node:https';function a4_0x29ae(){const _0xeaf4c9=['platform','xdg-open\x20\x22','876504KRWIDE','headers','session','darwin','object','then','🔐\x20Starting\x20login\x20service...','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','win32','1105619ITqZJe','log','user','57678qaDJlU','catch','5070aZfevi','listen','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','https://dev.lovrabet.com:','1328ixDJjZ','createServer','writeHead','close','916cZvIgx','63693avcnKL','error','cookie','json','silent','utf-8','12102oWHZrG','21901zvmRIp','port','text/html;\x20charset=utf-8','end','https://g.yuntooai.com/cert/lovrabet-dev.json','12061818sGcnTq','390RetBXk'];a4_0x29ae=function(){return _0xeaf4c9;};return a4_0x29ae();}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(_0x429ac9){const _0x1945b5=a4_0x5f25,_0x2eb6d6=_0x429ac9?.[_0x1945b5(0xed)]||![];if(await getIsSessionValid())return!![];const _0x21e8ab=await(await fetch(_0x1945b5(0xf4)))['json']();return new Promise(async(_0x11452c,_0xee1620)=>{const _0x4b216f=_0x1945b5;let _0x5101e3=0x0;const _0x4c5f74=a4_0x34ba20[_0x4b216f(0x10c)](_0x21e8ab,async(_0x31382d,_0xf8f33a)=>{const _0x4359e2=_0x4b216f,_0x2c3dd7=getUserDomain(),_0x366d41=_0x31382d[_0x4359e2(0xfa)][_0x4359e2(0xeb)]||'',_0x1fa524=await fetch(_0x2c3dd7+'/api/auth/get-session',{'headers':{'cookie':_0x366d41}})['then'](_0x1607a2=>_0x1607a2[_0x4359e2(0xec)]()),_0x40b4a2=_0x1fa524&&_0x1fa524[_0x4359e2(0xfb)]&&_0x1fa524[_0x4359e2(0x104)];if(_0x40b4a2){writeFileSync(cookieFile,_0x366d41,_0x4359e2(0xee)),_0x11452c(!![]);const _0xe57bcf=buildLoginSuccessHtml();_0xf8f33a[_0x4359e2(0x10d)](0xc8,{'Content-Type':_0x4359e2(0xf2)}),_0xf8f33a[_0x4359e2(0xf3)](_0xe57bcf),_0x4c5f74[_0x4359e2(0x10e)]();}else{const _0x359a50=''+encodeURIComponent(_0x4359e2(0x10a)+_0x5101e3);_0xf8f33a[_0x4359e2(0x10d)](0x12e,{'location':_0x2c3dd7+'/sign-in?redirect='+_0x359a50}),_0xf8f33a[_0x4359e2(0xf3)]();return;}});_0x4c5f74[_0x4b216f(0x108)](0x0,'127.0.0.1',()=>{const _0x430776=_0x4b216f,_0x424f9a=_0x4c5f74['address']();_0x5101e3=typeof _0x424f9a===_0x430776(0xfd)&&_0x424f9a?_0x424f9a[_0x430776(0xf1)]:Number(_0x424f9a);const _0x1c71bc=_0x430776(0x10a)+_0x5101e3;!_0x2eb6d6&&(console[_0x430776(0x103)](_0x430776(0xff)),console['log']('📍\x20Login\x20URL:',_0x1c71bc),console[_0x430776(0x103)](_0x430776(0x109)),console['log'](''),console['log']('💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.'),console[_0x430776(0x103)]('')),openInBrowser(_0x1c71bc)[_0x430776(0xfe)](_0x3bcd68=>{const _0x1ca959=_0x430776;!_0x2eb6d6&&(_0x3bcd68?console['log']('✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.'):(console[_0x1ca959(0x103)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x1ca959(0x103)](_0x1ca959(0x100),_0x1c71bc)),console['log'](''));})[_0x430776(0x106)](()=>{const _0xa15452=_0x430776;!_0x2eb6d6&&(console[_0xa15452(0x103)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console['log'](_0xa15452(0x100),_0x1c71bc),console[_0xa15452(0x103)](''));});}),_0x4c5f74['on']('error',_0x54f2e6=>{const _0x4d7b85=_0x4b216f;!_0x2eb6d6&&console[_0x4d7b85(0x111)]('Auth\x20server\x20error:',_0x54f2e6),_0xee1620(_0x54f2e6);});});}function a4_0x5f25(_0x38a615,_0x64b120){_0x38a615=_0x38a615-0xeb;const _0x29ae67=a4_0x29ae();let _0x5f25bb=_0x29ae67[_0x38a615];return _0x5f25bb;}function openInBrowser(_0x835c33){return new Promise(_0x7a58fd=>{const _0x3cca1d=a4_0x5f25,_0x2a7110=process[_0x3cca1d(0xf7)];let _0x2c8296;if(_0x2a7110===_0x3cca1d(0x101))_0x2c8296='cmd\x20/c\x20start\x20\x22\x22\x20\x22'+_0x835c33+'\x22';else _0x2a7110===_0x3cca1d(0xfc)?_0x2c8296='open\x20\x22'+_0x835c33+'\x22':_0x2c8296=_0x3cca1d(0xf8)+_0x835c33+'\x22';exec(_0x2c8296,_0x5c5743=>{_0x5c5743?_0x7a58fd(![]):_0x7a58fd(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a4_0x238153(0x103)]('isAuth',isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x28aca4=a5_0x4d83;(function(_0x4b5a83,_0x417f77){const _0x5ac196=a5_0x4d83,_0x50d5be=_0x4b5a83();while(!![]){try{const _0x2b2bd0=parseInt(_0x5ac196(0x18a))/0x1*(-parseInt(_0x5ac196(0x188))/0x2)+-parseInt(_0x5ac196(0x18b))/0x3+parseInt(_0x5ac196(0x18e))/0x4*(parseInt(_0x5ac196(0x18f))/0x5)+-parseInt(_0x5ac196(0x190))/0x6+-parseInt(_0x5ac196(0x18d))/0x7+-parseInt(_0x5ac196(0x18c))/0x8+parseInt(_0x5ac196(0x191))/0x9;if(_0x2b2bd0===_0x417f77)break;else _0x50d5be['push'](_0x50d5be['shift']());}catch(_0xe7f26c){_0x50d5be['push'](_0x50d5be['shift']());}}}(a5_0x4be1,0xbbc34));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),'.lovrabet');export const cookieFile=join(configDir,a5_0x28aca4(0x189));mkdirSync(configDir,{'recursive':!![]});function a5_0x4d83(_0x16ae15,_0xdb03af){_0x16ae15=_0x16ae15-0x188;const _0x4be1d1=a5_0x4be1();let _0x4d8318=_0x4be1d1[_0x16ae15];return _0x4d8318;}function a5_0x4be1(){const _0x1e813c=['6275448gFFsbV','42585966epOCVd','2zJHPsI','cookie','1435442ZVnBXx','875088RMfeJG','3957496qAOlKE','8384551sHIYuD','1005656oJXRDH','10riIdNw'];a5_0x4be1=function(){return _0x1e813c;};return a5_0x4be1();}
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a6_0x2741(_0x7c55a6,_0x36cdc2){_0x7c55a6=_0x7c55a6-0x1a6;var _0x266dfb=a6_0x266d();var _0x2741ac=_0x266dfb[_0x7c55a6];return _0x2741ac;}(function(_0xcd9698,_0x106fe5){var _0xea2c2a=a6_0x2741,_0x25f4d5=_0xcd9698();while(!![]){try{var _0x33d520=-parseInt(_0xea2c2a(0x1ad))/0x1*(-parseInt(_0xea2c2a(0x1af))/0x2)+-parseInt(_0xea2c2a(0x1aa))/0x3*(parseInt(_0xea2c2a(0x1a9))/0x4)+-parseInt(_0xea2c2a(0x1ab))/0x5+parseInt(_0xea2c2a(0x1b0))/0x6+-parseInt(_0xea2c2a(0x1a6))/0x7*(-parseInt(_0xea2c2a(0x1ae))/0x8)+parseInt(_0xea2c2a(0x1ac))/0x9+-parseInt(_0xea2c2a(0x1a8))/0xa;if(_0x33d520===_0x106fe5)break;else _0x25f4d5['push'](_0x25f4d5['shift']());}catch(_0x53d139){_0x25f4d5['push'](_0x25f4d5['shift']());}}}(a6_0x266d,0xf09aa));function a6_0x266d(){var _0x1c08e5=['317107CKJYLB','utf-8','4747090VYTRGE','260MUBhBk','74577hjNpQS','3729020ZAOsSZ','13669434VfFwpZ','251PcckLY','136SBFswg','132rHpLNI','9098118iKnnwU'];a6_0x266d=function(){return _0x1c08e5;};return a6_0x266d();}import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0x53ca0a=a6_0x2741;try{return readFileSync(cookieFile,_0x53ca0a(0x1a7));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a7_0x5779(){const _0x3c0f9f=['4fcUFGN','66104PKEJFd','87545qIteAX','66429kMmZvW','60lLEDhs','1085WgTcab','10suwZez','6004662sPcKMV','10864017rOcsxi','41898pdlBan','/api/auth/get-session','756613IrRjjg','user','28IlDVCr','session','utf-8'];a7_0x5779=function(){return _0x3c0f9f;};return a7_0x5779();}(function(_0x1ea709,_0x448fbe){const _0x5644c2=a7_0x61b2,_0x29c792=_0x1ea709();while(!![]){try{const _0x16323b=parseInt(_0x5644c2(0xfb))/0x1*(-parseInt(_0x5644c2(0xef))/0x2)+parseInt(_0x5644c2(0xf5))/0x3+-parseInt(_0x5644c2(0xf2))/0x4*(parseInt(_0x5644c2(0xf4))/0x5)+parseInt(_0x5644c2(0xf9))/0x6+-parseInt(_0x5644c2(0xf7))/0x7*(parseInt(_0x5644c2(0xf3))/0x8)+-parseInt(_0x5644c2(0xfa))/0x9*(-parseInt(_0x5644c2(0xf8))/0xa)+parseInt(_0x5644c2(0xed))/0xb*(parseInt(_0x5644c2(0xf6))/0xc);if(_0x16323b===_0x448fbe)break;else _0x29c792['push'](_0x29c792['shift']());}catch(_0x25d33c){_0x29c792['push'](_0x29c792['shift']());}}}(a7_0x5779,0xa83ce));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a7_0x61b2(_0x233058,_0x5a70e7){_0x233058=_0x233058-0xed;const _0x5779ea=a7_0x5779();let _0x61b221=_0x5779ea[_0x233058];return _0x61b221;}export async function getSessionUserInfo(){const _0x469c5e=a7_0x61b2;try{if(!existsSync(cookieFile))return null;const _0x51117f=readFileSync(cookieFile,_0x469c5e(0xf1)),_0x21fff1=await fetch(getUserDomain()+_0x469c5e(0xfc),{'headers':{'cookie':_0x51117f}});if(!_0x21fff1['ok'])return null;const _0x6c3149=await _0x21fff1['json']();if(!_0x6c3149[_0x469c5e(0xf0)]||!_0x6c3149[_0x469c5e(0xee)])return null;return _0x6c3149;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a8_0x1f5e(_0x18d33b,_0x325a04){_0x18d33b=_0x18d33b-0x1c7;const _0x23fd9f=a8_0x23fd();let _0x1f5e08=_0x23fd9f[_0x18d33b];return _0x1f5e08;}(function(_0x5e8ac1,_0x453776){const _0x296a3d=a8_0x1f5e,_0x50f1ae=_0x5e8ac1();while(!![]){try{const _0x557fa7=-parseInt(_0x296a3d(0x1cd))/0x1+parseInt(_0x296a3d(0x1cc))/0x2*(parseInt(_0x296a3d(0x1d5))/0x3)+-parseInt(_0x296a3d(0x1d3))/0x4*(-parseInt(_0x296a3d(0x1d2))/0x5)+parseInt(_0x296a3d(0x1c7))/0x6*(parseInt(_0x296a3d(0x1c9))/0x7)+parseInt(_0x296a3d(0x1ca))/0x8*(parseInt(_0x296a3d(0x1d6))/0x9)+parseInt(_0x296a3d(0x1d0))/0xa+-parseInt(_0x296a3d(0x1d1))/0xb*(parseInt(_0x296a3d(0x1cf))/0xc);if(_0x557fa7===_0x453776)break;else _0x50f1ae['push'](_0x50f1ae['shift']());}catch(_0x58cd5b){_0x50f1ae['push'](_0x50f1ae['shift']());}}}(a8_0x23fd,0x6a17e));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a8_0x23fd(){const _0x2b1e1d=['4808JTMwJl','/api/auth/get-session','348SgiiVK','9DbnaXG','36HRWdLI','utf-8','816557HPmiPv','1076264ixEPqS','then','7822hzMPxD','185391nRIiiU','user','7877580KixZQb','3214260QIUTkr','22ELgvTW','1345tiCVyi'];a8_0x23fd=function(){return _0x2b1e1d;};return a8_0x23fd();}export async function getIsSessionValid(){const _0x575647=a8_0x1f5e;try{if(!existsSync(cookieFile))return![];const _0x55ba83=readFileSync(cookieFile,_0x575647(0x1c8)),_0x456188=await fetch(getUserDomain()+_0x575647(0x1d4),{'headers':{'cookie':_0x55ba83}})[_0x575647(0x1cb)](_0x5cbb5e=>_0x5cbb5e['json']());return _0x456188&&_0x456188['session']&&_0x456188[_0x575647(0x1ce)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x4d5e01,_0x5420aa){const _0xe36714=a9_0x4582,_0x43a133=_0x4d5e01();while(!![]){try{const _0x2abf9f=-parseInt(_0xe36714(0xc8))/0x1+-parseInt(_0xe36714(0xc3))/0x2+parseInt(_0xe36714(0xcc))/0x3+-parseInt(_0xe36714(0xc9))/0x4+-parseInt(_0xe36714(0xc5))/0x5*(parseInt(_0xe36714(0xc6))/0x6)+-parseInt(_0xe36714(0xce))/0x7*(-parseInt(_0xe36714(0xcb))/0x8)+parseInt(_0xe36714(0xc7))/0x9*(parseInt(_0xe36714(0xc4))/0xa);if(_0x2abf9f===_0x5420aa)break;else _0x43a133['push'](_0x43a133['shift']());}catch(_0x2f3b1a){_0x43a133['push'](_0x43a133['shift']());}}}(a9_0x3d2c,0x66bb9));function a9_0x3d2c(){const _0x47469e=['5CNtbiP','2209002pgLAGb','3159612TvPdLm','152586KyGiTJ','1585768sqIQay','</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>','1038296RMKTHC','2456331QQKxCv','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','7rgCtUG','1327560ddLaQI','30rgpywd'];a9_0x3d2c=function(){return _0x47469e;};return a9_0x3d2c();}function a9_0x4582(_0x389e17,_0x15fb1c){_0x389e17=_0x389e17-0xc3;const _0x3d2cd7=a9_0x3d2c();let _0x45828d=_0x3d2cd7[_0x389e17];return _0x45828d;}export function buildLoginSuccessHtml(){const _0x13859d=a9_0x4582,_0x105edb=_0x13859d(0xcd);return'<!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>'+_0x105edb+_0x13859d(0xca);}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x359d85,_0x1dc749){var _0xbb8831=a10_0x51b0,_0x515c91=_0x359d85();while(!![]){try{var _0x50b2a5=parseInt(_0xbb8831(0x1f3))/0x1+parseInt(_0xbb8831(0x1f4))/0x2+-parseInt(_0xbb8831(0x1f6))/0x3*(parseInt(_0xbb8831(0x1f2))/0x4)+parseInt(_0xbb8831(0x1f7))/0x5*(-parseInt(_0xbb8831(0x1fc))/0x6)+parseInt(_0xbb8831(0x1fb))/0x7+parseInt(_0xbb8831(0x1f5))/0x8*(parseInt(_0xbb8831(0x1f1))/0x9)+-parseInt(_0xbb8831(0x1fa))/0xa;if(_0x50b2a5===_0x1dc749)break;else _0x515c91['push'](_0x515c91['shift']());}catch(_0x3762c1){_0x515c91['push'](_0x515c91['shift']());}}}(a10_0x2b26,0x5a904));import{unlinkSync,existsSync}from'node:fs';function a10_0x51b0(_0x9ad742,_0x4cb860){_0x9ad742=_0x9ad742-0x1f1;var _0x2b2679=a10_0x2b26();var _0x51b0ea=_0x2b2679[_0x9ad742];return _0x51b0ea;}import{cookieFile}from'../auth/constant.js';export function logout(){var _0x3dcead=a10_0x51b0;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log']('✓\x20Logged\x20out')):console[_0x3dcead(0x1f9)](_0x3dcead(0x1f8));}function a10_0x2b26(){var _0x89222f=['!\x20Not\x20logged\x20in','log','7407920IWPazD','4749738DLipLK','501906SkGCOS','152892TSGTsC','660NfZkvI','683518LdxlVS','459548NwJgdi','120eUNLww','11841eCPULr','5PcPpsA'];a10_0x2b26=function(){return _0x89222f;};return a10_0x2b26();}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a11_0x3e07(_0x1836f2,_0xb0fcab){_0x1836f2=_0x1836f2-0xdf;const _0x2c3626=a11_0x2c36();let _0x3e07d1=_0x2c3626[_0x1836f2];return _0x3e07d1;}const a11_0x5558b0=a11_0x3e07;function a11_0x2c36(){const _0x19124d=['61408cJNPNU','5903093oZJzeL','3417044ilDttv','1251jJjYiz','5IzeLep','2tNOUtE','7069090QawXnt','334578qzPsaB','2850231oaNBxJ','boolean','862542TthQVK'];a11_0x2c36=function(){return _0x19124d;};return a11_0x2c36();}(function(_0x23f76f,_0x242dd8){const _0x596f4c=a11_0x3e07,_0x4f0c67=_0x23f76f();while(!![]){try{const _0x457b46=parseInt(_0x596f4c(0xe0))/0x1+parseInt(_0x596f4c(0xe9))/0x2*(-parseInt(_0x596f4c(0xe1))/0x3)+-parseInt(_0x596f4c(0xe6))/0x4*(-parseInt(_0x596f4c(0xe8))/0x5)+-parseInt(_0x596f4c(0xe3))/0x6+parseInt(_0x596f4c(0xe5))/0x7+-parseInt(_0x596f4c(0xe4))/0x8*(parseInt(_0x596f4c(0xe7))/0x9)+parseInt(_0x596f4c(0xdf))/0xa;if(_0x457b46===_0x242dd8)break;else _0x4f0c67['push'](_0x4f0c67['shift']());}catch(_0x56e4e4){_0x4f0c67['push'](_0x4f0c67['shift']());}}}(a11_0x2c36,0x8d2c9));export const dynamicCliFlags={'enableBffSave':{'type':a11_0x5558b0(0xe2)}};
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a12_0x3307d7=a12_0x32c6;(function(_0x5802ee,_0x34dc47){const _0x1b8783=a12_0x32c6,_0x1dd0fb=_0x5802ee();while(!![]){try{const _0x56df52=parseInt(_0x1b8783(0x100))/0x1+parseInt(_0x1b8783(0x10d))/0x2+parseInt(_0x1b8783(0x11f))/0x3+parseInt(_0x1b8783(0x11c))/0x4*(parseInt(_0x1b8783(0x123))/0x5)+parseInt(_0x1b8783(0x120))/0x6+-parseInt(_0x1b8783(0x105))/0x7*(parseInt(_0x1b8783(0xff))/0x8)+-parseInt(_0x1b8783(0x107))/0x9*(parseInt(_0x1b8783(0x10e))/0xa);if(_0x56df52===_0x34dc47)break;else _0x1dd0fb['push'](_0x1dd0fb['shift']());}catch(_0x1fd53e){_0x1dd0fb['push'](_0x1dd0fb['shift']());}}}(a12_0x55e6,0x28047));import a12_0x1aa563 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';let dynamicCliFlags=null;try{dynamicCliFlags=(await import('./cli-flags.js'))[a12_0x3307d7(0x128)];}catch{}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!==a12_0x3307d7(0x127)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[a12_0x3307d7(0x11d)](0x0,0xa)+')':VERSION,cli=a12_0x1aa563(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0x27f1a8=a12_0x3307d7;let _0x4899b3=cli[_0x27f1a8(0x106)][0x0],_0x19821b=cli[_0x27f1a8(0x106)][0x1];const _0x39f40b=cli[_0x27f1a8(0x110)];if(!_0x4899b3){await reportCliHelpTrace(_0x27f1a8(0x129)),showHelp();return;}const _0x33cfe2=deprecatedAliases[_0x4899b3];if(_0x33cfe2&&!isKnownService(_0x4899b3)){const _0x3b3450=_0x19821b?CLI_BIN_NAME+'\x20'+_0x4899b3+'\x20'+_0x19821b:CLI_BIN_NAME+'\x20'+_0x4899b3,_0x293c07=CLI_BIN_NAME+'\x20'+_0x33cfe2['service']+'\x20'+_0x33cfe2[_0x27f1a8(0x108)];console[_0x27f1a8(0x11a)]('⚠\x20`'+_0x3b3450+_0x27f1a8(0x109)+_0x293c07+'`\x20in\x20v2.0.\x0a'+_0x27f1a8(0x116)),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x4899b3)){await reportCliHelpTrace(_0x27f1a8(0x10c),{'service':_0x4899b3}),showHelp();return;}const _0x45c50b=getServiceEntry(_0x4899b3);if(_0x39f40b['env']&&typeof _0x39f40b[_0x27f1a8(0x10a)]==='string'){const {initEnv:_0x2a8aed}=await import(_0x27f1a8(0x104));_0x2a8aed(_0x39f40b['env']);}const {buildConfigFromFlags:_0x312a94}=await import('./context.js'),_0x1670b1=_0x312a94(_0x39f40b);if(!_0x39f40b[_0x27f1a8(0x10a)]&&_0x1670b1[_0x27f1a8(0x10a)]){const {initEnv:_0x200d0e}=await import(_0x27f1a8(0x104));_0x200d0e(_0x1670b1[_0x27f1a8(0x10a)]);}if(_0x1670b1[_0x27f1a8(0x121)]?.[_0x27f1a8(0x115)]||_0x1670b1[_0x27f1a8(0x121)]?.['userDomain']||_0x1670b1[_0x27f1a8(0x121)]?.[_0x27f1a8(0xfd)]){const {initDomains:_0x483cf8}=await import('./constant/domain.js');_0x483cf8({'apiDomain':_0x1670b1[_0x27f1a8(0x121)][_0x27f1a8(0x115)]||undefined,'userDomain':_0x1670b1[_0x27f1a8(0x121)][_0x27f1a8(0xfc)]||undefined,'runtimeDomain':_0x1670b1[_0x27f1a8(0x121)][_0x27f1a8(0xfd)]||undefined});}if(!_0x19821b){if(_0x39f40b[_0x27f1a8(0x125)]){printServiceHelp(_0x4899b3);return;}if(_0x45c50b[_0x27f1a8(0x117)])_0x19821b=_0x45c50b[_0x27f1a8(0x117)];else{if(_0x45c50b[_0x27f1a8(0x111)]){await dispatchDeclarative(_0x45c50b[_0x27f1a8(0x111)],_0x4899b3,'',[],_0x39f40b,_0x1670b1);return;}else{printServiceHelp(_0x4899b3);return;}}}const _0x554287=resolveDeprecatedSubcommand(_0x4899b3,_0x19821b);if(_0x554287){const _0x308896=CLI_BIN_NAME+'\x20'+_0x4899b3+'\x20'+_0x19821b,_0x260ff7=CLI_BIN_NAME+'\x20'+_0x4899b3+'\x20'+_0x554287;console[_0x27f1a8(0x11a)](_0x27f1a8(0x112)+_0x308896+'`\x20is\x20an\x20alias\x20of\x20`'+_0x260ff7+_0x27f1a8(0x10f)+_0x260ff7+_0x27f1a8(0x119)),_0x19821b=_0x554287;}if(_0x39f40b[_0x27f1a8(0x125)]&&!findDefinition(_0x4899b3,_0x19821b)){printServiceHelp(_0x4899b3);return;}{let _0x37c868=findDefinition(_0x4899b3,_0x19821b),_0x358a93=cli[_0x27f1a8(0x106)][_0x27f1a8(0x11d)](0x2);if(!_0x37c868){if(_0x45c50b['wildcardDef']){if(_0x39f40b['help']){console['log'](generateCommandHelp(_0x45c50b[_0x27f1a8(0x111)]));return;}_0x37c868=_0x45c50b[_0x27f1a8(0x111)],_0x358a93=[_0x19821b,...cli[_0x27f1a8(0x106)][_0x27f1a8(0x11d)](0x2)];}else{printServiceHelp(_0x4899b3),await handleErrorAsync(CliErrors[_0x27f1a8(0x11e)](_0x4899b3+'\x20'+_0x19821b));return;}}if(_0x39f40b[_0x27f1a8(0x125)]){console[_0x27f1a8(0x103)](generateCommandHelp(_0x37c868));return;}await dispatchDeclarative(_0x37c868,_0x4899b3,_0x19821b,_0x358a93,_0x39f40b,_0x1670b1);}}function a12_0x32c6(_0x2ff54c,_0x7bb66){_0x2ff54c=_0x2ff54c-0xfc;const _0x55e61a=a12_0x55e6();let _0x32c6d1=_0x55e61a[_0x2ff54c];return _0x32c6d1;}function a12_0x55e6(){const _0x1b80c8=['`\x20has\x20been\x20moved\x20to\x20`','env','Unexpected\x20error:','unknown_service','442682GloyIi','20ICHETr','`;\x20prefer\x20`','flags','wildcardDef','⚠\x20`','Error:\x20','\x0aCancelled.\x0a','apiDomain','\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a','defaultCommand','exitCode','`\x20in\x20new\x20scripts.\x0a','error','message','168stJeLA','slice','unknownCommand','187158gPsMfC','1925334EUPcLR','raw','name','26655TxOvNC','Hint:\x20','help','stderr','unknown','dynamicCliFlags','global','userDomain','runtimeDomain','hint','38344BngyzJ','181376xpVTAJ','cancelled','code','log','./constant/env.js','315amMTby','input','2836341awKryt','command'];a12_0x55e6=function(){return _0x1b80c8;};return a12_0x55e6();}async function dispatchDeclarative(_0x3fa6f7,_0x4af2d4,_0x5394a6,_0x1f6af4,_0x391d61,_0x43d28f){const _0x446fe7=Date['now']();let _0x26eb00;try{await runCommand(_0x3fa6f7,createPipelineEnv(_0x43d28f,_0x391d61,_0x1f6af4));}catch(_0x121e3e){_0x26eb00=_0x121e3e;}await reportCommandTrace({'service':_0x4af2d4,'command':_0x5394a6,'flags':_0x391d61,'durationMs':Date['now']()-_0x446fe7,'error':_0x26eb00});if(_0x26eb00)await handleErrorAsync(_0x26eb00);}function printServiceHelp(_0x3ee98f){console['log'](generateServiceHelp(_0x3ee98f));}async function handleErrorAsync(_0x582755){const _0x29b6ae=a12_0x3307d7;if(_0x582755 instanceof Error&&_0x582755[_0x29b6ae(0x122)]==='ExitPromptError')return process[_0x29b6ae(0x126)]['write'](_0x29b6ae(0x114)),await exitWithOtelShutdown(0x0);if(_0x582755 instanceof CliError){if(_0x582755[_0x29b6ae(0x102)]===_0x29b6ae(0x101))return process['stderr']['write']('\x0a'+_0x582755[_0x29b6ae(0x11b)]+'\x0a'),await exitWithOtelShutdown(0x0);console[_0x29b6ae(0x11a)](_0x29b6ae(0x113)+_0x582755[_0x29b6ae(0x11b)]);if(_0x582755[_0x29b6ae(0xfe)])console[_0x29b6ae(0x11a)](_0x29b6ae(0x124)+_0x582755['hint']);return await exitWithOtelShutdown(_0x582755[_0x29b6ae(0x118)]);}return console[_0x29b6ae(0x11a)](_0x29b6ae(0x10b),_0x582755),await exitWithOtelShutdown(0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a13_0x3c793e=a13_0x34c4;(function(_0xb7093c,_0x222b87){const _0x5440b6=a13_0x34c4,_0x885db0=_0xb7093c();while(!![]){try{const _0x2c3390=-parseInt(_0x5440b6(0x193))/0x1+parseInt(_0x5440b6(0x1a8))/0x2*(parseInt(_0x5440b6(0x1aa))/0x3)+-parseInt(_0x5440b6(0x19d))/0x4*(-parseInt(_0x5440b6(0x1a5))/0x5)+parseInt(_0x5440b6(0x1af))/0x6+parseInt(_0x5440b6(0x199))/0x7+-parseInt(_0x5440b6(0x181))/0x8+-parseInt(_0x5440b6(0x1b5))/0x9;if(_0x2c3390===_0x222b87)break;else _0x885db0['push'](_0x885db0['shift']());}catch(_0x1e6ba8){_0x885db0['push'](_0x885db0['shift']());}}}(a13_0x310b,0xa8e43));import a13_0x53f074 from'ora';import{fetchModelList}from'../../api/fetch-model-list.js';import{generateDatasetDocs}from'../../api/api-doc.js';function a13_0x310b(){const _0x107963=['str','stdout','73969uwWCxz','datasetCode','start','\x20file(s)','1224sBAQkx','\x20dataset(s)','success','filter','message','params','\x20failed','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','4940HvFmhk','--datasetcode\x20cannot\x20be\x20empty.','None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20','1034998FpnWnW','Failed\x20to\x20fetch\x20datasets','6OIMFYx','\x20of\x20','write','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','Output\x20directory\x20(default:\x20./docs)','6377544URAKoT','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','\x1b[0m','output','Fetched\x20','✓\x20Generated\x20','7794117DVeldM','):\x20','.md','3147952TrLJyL','isArray','\x1b[90m*\x20Generating\x20docs\x20for:\x20','join','map','Invalid\x20--params:\x20','split','length','\x20succeeded,\x20','validation','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','string','succeed','\x20dataset(s)\x1b[0m','some','trim','Fetching\x20dataset\x20list\x20for\x20','\x20doc(s)\x20failed','459531CbgyuL','appCode','...','cookie'];a13_0x310b=function(){return _0x107963;};return a13_0x310b();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a13_0x34c4(_0x4e2031,_0x2f668c){_0x4e2031=_0x4e2031-0x180;const _0x310bad=a13_0x310b();let _0x34c421=_0x310bad[_0x4e2031];return _0x34c421;}export const apiGenerate={'service':'api','command':'generate','description':'Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','risk':'write','requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a13_0x3c793e(0x1b2),'type':'string','description':a13_0x3c793e(0x1ae)},{'name':'datasetcode','type':a13_0x3c793e(0x18c),'description':a13_0x3c793e(0x18b)},{'name':a13_0x3c793e(0x1a2),'type':'string','description':a13_0x3c793e(0x1a4)}],async 'execute'(_0x374bff){const _0x41ab7a=a13_0x3c793e,_0x5e224f=_0x374bff[_0x41ab7a(0x197)](_0x41ab7a(0x1b2))||'./docs',_0x20baac=_0x374bff[_0x41ab7a(0x197)]('datasetcode'),_0x159cc6=_0x374bff[_0x41ab7a(0x197)]('params');let _0x20d570;if(_0x159cc6)try{_0x20d570=JSON['parse'](_0x159cc6);if(typeof _0x20d570!=='object'||_0x20d570===null||Array[_0x41ab7a(0x182)](_0x20d570))throw new Error('must\x20be\x20a\x20JSON\x20object');}catch(_0x17abd7){throw CliErrors['validation'](_0x41ab7a(0x186)+(_0x17abd7 instanceof Error?_0x17abd7[_0x41ab7a(0x1a1)]:String(_0x17abd7)),_0x41ab7a(0x1b0));}let _0x2be2cf;if(_0x20baac){const _0x57e8c6=_0x20baac[_0x41ab7a(0x187)](',')[_0x41ab7a(0x185)](_0x29d300=>_0x29d300[_0x41ab7a(0x190)]())['filter'](_0xec763b=>_0xec763b[_0x41ab7a(0x188)]>0x0);if(_0x57e8c6[_0x41ab7a(0x188)]===0x0)throw CliErrors[_0x41ab7a(0x18a)](_0x41ab7a(0x1a6));_0x2be2cf=new Set(_0x57e8c6),writeCliSideChannelLine(_0x41ab7a(0x183)+_0x57e8c6['join'](',\x20')+_0x41ab7a(0x1b1));}const _0x4bd1ce=a13_0x53f074(_0x41ab7a(0x191)+_0x374bff[_0x41ab7a(0x194)]+_0x41ab7a(0x195))[_0x41ab7a(0x19b)]();let _0x580421;try{({configArray:_0x580421}=await fetchModelList(_0x374bff['appCode'],_0x374bff[_0x41ab7a(0x196)]),_0x4bd1ce[_0x41ab7a(0x18d)](_0x41ab7a(0x1b3)+_0x580421[_0x41ab7a(0x188)]+_0x41ab7a(0x19e)));}catch(_0x210483){_0x4bd1ce['fail'](_0x41ab7a(0x1a9));throw _0x210483;}if(_0x580421[_0x41ab7a(0x188)]===0x0)return writeCliSideChannelLine('!\x20No\x20datasets\x20found.'),{'ok':!![]};let _0x398177=_0x580421;if(_0x2be2cf){_0x398177=_0x580421[_0x41ab7a(0x1a0)](_0x1d191f=>_0x2be2cf['has'](_0x1d191f['datasetCode']));const _0x355000=[..._0x2be2cf][_0x41ab7a(0x1a0)](_0x114b12=>!_0x580421[_0x41ab7a(0x18f)](_0x204a5a=>_0x204a5a[_0x41ab7a(0x19a)]===_0x114b12));_0x355000[_0x41ab7a(0x188)]>0x0&&writeCliSideChannelLine(_0x41ab7a(0x1ad)+_0x355000[_0x41ab7a(0x184)](',\x20')+_0x41ab7a(0x1b1));if(_0x398177[_0x41ab7a(0x188)]===0x0)throw CliErrors[_0x41ab7a(0x18a)](_0x41ab7a(0x1a7)+[..._0x2be2cf][_0x41ab7a(0x184)](',\x20'));writeCliSideChannelLine('\x1b[90m*\x20Filtered\x20'+_0x398177[_0x41ab7a(0x188)]+_0x41ab7a(0x1ab)+_0x580421['length']+_0x41ab7a(0x18e));}let _0x2e6219=0x0;const _0x369394=await generateDatasetDocs(_0x398177,_0x374bff['appCode'],_0x374bff[_0x41ab7a(0x196)],_0x5e224f,(_0x3081eb,_0x4864f4,_0x327842)=>{const _0x2310da=_0x41ab7a;_0x2e6219=_0x3081eb,process[_0x2310da(0x198)][_0x2310da(0x1ac)]('\x0d\x20\x20['+String(_0x3081eb)['padStart'](String(_0x4864f4)['length'])+'/'+_0x4864f4+']\x20'+_0x327842+_0x2310da(0x180));},_0x20d570);if(_0x2e6219>0x0)process['stdout'][_0x41ab7a(0x1ac)]('\x0a');const _0x58a7af=_0x369394[_0x41ab7a(0x1a0)](_0x59795=>_0x59795['success'])[_0x41ab7a(0x188)],_0x44693b=_0x369394['filter'](_0x587080=>!_0x587080[_0x41ab7a(0x19f)])['length'];writeCliSideChannelLine(''),writeCliSideChannelLine(_0x41ab7a(0x1b4)+_0x58a7af+'\x20doc(s)\x20in\x20'+_0x5e224f);if(_0x44693b>0x0){writeCliSideChannelLine('!\x20'+_0x44693b+_0x41ab7a(0x192));for(const _0x3b4cc8 of _0x369394[_0x41ab7a(0x1a0)](_0x49b641=>!_0x49b641['success'])){writeCliSideChannelLine('\x20\x20•\x20'+_0x3b4cc8['datasetName']+'\x20('+_0x3b4cc8['datasetCode']+_0x41ab7a(0x1b6)+_0x3b4cc8['error']);}}return{'ok':_0x44693b===0x0,'message':_0x44693b>0x0?'Doc\x20generation:\x20'+_0x58a7af+_0x41ab7a(0x189)+_0x44693b+_0x41ab7a(0x1a3):'Doc\x20generation\x20complete:\x20'+_0x58a7af+_0x41ab7a(0x19c)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a14_0x3387(){const _0x2ade65=['1BrdKZC','2601193JPIpAp','390vCCqso','6310SvhTVE','13WVRllj','24MdchBn','2353378XQJvQm','103980JzrNoI','21613188qyFckd','3457701WPMsip','8ZeHgSp','87775erumNT','21494FHgvvG'];a14_0x3387=function(){return _0x2ade65;};return a14_0x3387();}(function(_0x36f751,_0x4c2876){const _0xa07668=a14_0xd245,_0x4e8029=_0x36f751();while(!![]){try{const _0x24401d=-parseInt(_0xa07668(0x1c8))/0x1*(parseInt(_0xa07668(0x1c1))/0x2)+parseInt(_0xa07668(0x1c0))/0x3*(parseInt(_0xa07668(0x1c2))/0x4)+parseInt(_0xa07668(0x1c6))/0x5*(-parseInt(_0xa07668(0x1ca))/0x6)+-parseInt(_0xa07668(0x1c9))/0x7+-parseInt(_0xa07668(0x1c5))/0x8*(-parseInt(_0xa07668(0x1c4))/0x9)+-parseInt(_0xa07668(0x1cb))/0xa*(-parseInt(_0xa07668(0x1c7))/0xb)+-parseInt(_0xa07668(0x1c3))/0xc*(-parseInt(_0xa07668(0x1cc))/0xd);if(_0x24401d===_0x4c2876)break;else _0x4e8029['push'](_0x4e8029['shift']());}catch(_0x14bac6){_0x4e8029['push'](_0x4e8029['shift']());}}}(a14_0x3387,0xe4b9b));import{apiList}from'../../commands/api/list.js';function a14_0xd245(_0x582daf,_0x394ab5){_0x582daf=_0x582daf-0x1c0;const _0x33878c=a14_0x3387();let _0xd2450b=_0x33878c[_0x582daf];return _0xd2450b;}import{apiPull}from'../../commands/api/pull.js';import{apiGenerate}from'../../commands/api/generate.js';export const apiDefinitions=[apiList,apiPull,apiGenerate];
|
package/lib/commands/api/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x536223=a15_0x536f;(function(_0x307232,_0xe79cdd){const _0x1172f4=a15_0x536f,_0x5c9a00=_0x307232();while(!![]){try{const _0x3cf06f=-parseInt(_0x1172f4(0x115))/0x1+-parseInt(_0x1172f4(0x111))/0x2*(-parseInt(_0x1172f4(0x10d))/0x3)+-parseInt(_0x1172f4(0x10e))/0x4+-parseInt(_0x1172f4(0x120))/0x5+parseInt(_0x1172f4(0x11e))/0x6*(parseInt(_0x1172f4(0x113))/0x7)+parseInt(_0x1172f4(0x110))/0x8+parseInt(_0x1172f4(0x11c))/0x9;if(_0x3cf06f===_0xe79cdd)break;else _0x5c9a00['push'](_0x5c9a00['shift']());}catch(_0xa02d72){_0x5c9a00['push'](_0x5c9a00['shift']());}}}(a15_0x4397,0x4f2a2));function a15_0x536f(_0x5709f2,_0x284374){_0x5709f2=_0x5709f2-0x10c;const _0x439755=a15_0x4397();let _0x536fa3=_0x439755[_0x5709f2];return _0x536fa3;}import{initEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';function a15_0x4397(){const _0x385434=['cookie','push','env','production','9tizVgn','1682776WtJbzf','api','838344MGAtBP','198216sMmjKd','read','7JRZtNq','appcode','184611ROGpys','map','list','name','boolean','global','appCode','5061276mGDyar','rawFlags','32610UfBjCA','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','201765JNrlEW'];a15_0x4397=function(){return _0x385434;};return a15_0x4397();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveTargetApps}from'../../commands/api/shared.js';export const apiList={'service':a15_0x536223(0x10f),'command':a15_0x536223(0x117),'description':'List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','risk':a15_0x536223(0x112),'requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0x536223(0x11a),'type':a15_0x536223(0x119),'description':a15_0x536223(0x11f),'default':![]}],async 'execute'(_0x37df46){const _0x5767eb=a15_0x536223,_0x3d00c9=_0x37df46[_0x5767eb(0x11d)]['appcode']?String(_0x37df46[_0x5767eb(0x11d)][_0x5767eb(0x114)]):undefined,_0x22ccc7=resolveTargetApps(_0x37df46,_0x3d00c9);if(_0x22ccc7){const _0x166c4a=[];for(const _0x23f62b of _0x22ccc7){const _0x54472f=_0x23f62b[_0x5767eb(0x121)]||_0x37df46[_0x5767eb(0x121)],_0x588403=_0x23f62b[_0x5767eb(0x123)]||_0x5767eb(0x10c);initEnv(_0x588403);const {configArray:_0x33d527}=await fetchModelList(_0x23f62b['appcode'],_0x54472f);_0x166c4a[_0x5767eb(0x122)](..._0x33d527[_0x5767eb(0x116)](_0x37d4f6=>({..._0x37d4f6,'_appName':_0x23f62b[_0x5767eb(0x118)],'_appCode':_0x23f62b['appcode'],'_env':_0x588403,'_isDefault':_0x23f62b['isDefault']})));}return{'ok':!![],'data':_0x166c4a};}const {configArray:_0x534354}=await fetchModelList(_0x37df46[_0x5767eb(0x11b)],_0x37df46[_0x5767eb(0x121)]);return{'ok':!![],'data':_0x534354};}};
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x3fb6ea=a16_0x1306;(function(_0x929d2c,_0x8580ae){const _0x368e4c=a16_0x1306,_0x5e3e26=_0x929d2c();while(!![]){try{const _0x4fcf1f=parseInt(_0x368e4c(0xb7))/0x1*(-parseInt(_0x368e4c(0xad))/0x2)+-parseInt(_0x368e4c(0xa1))/0x3+-parseInt(_0x368e4c(0xa5))/0x4*(-parseInt(_0x368e4c(0xb1))/0x5)+parseInt(_0x368e4c(0x99))/0x6+parseInt(_0x368e4c(0x9d))/0x7+parseInt(_0x368e4c(0xb0))/0x8+parseInt(_0x368e4c(0xb8))/0x9;if(_0x4fcf1f===_0x8580ae)break;else _0x5e3e26['push'](_0x5e3e26['shift']());}catch(_0x87a5b1){_0x5e3e26['push'](_0x5e3e26['shift']());}}}(a16_0x43a7,0xedce1));import a16_0x31f367 from'ora';function a16_0x1306(_0x215bc9,_0xe1e4c4){_0x215bc9=_0x215bc9-0x89;const _0x43a79b=a16_0x43a7();let _0x130696=_0x43a79b[_0x215bc9];return _0x130696;}import a16_0x2c76a0 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';import{resolveTargetApps}from'../../commands/api/shared.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export const apiPull={'service':a16_0x3fb6ea(0xac),'command':a16_0x3fb6ea(0xa2),'description':a16_0x3fb6ea(0x93)+DEFAULT_API_DIR+'/)','risk':a16_0x3fb6ea(0xb3),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a16_0x3fb6ea(0x91),'type':a16_0x3fb6ea(0xb9),'description':a16_0x3fb6ea(0xbc)+DEFAULT_API_DIR+'/)'},{'name':a16_0x3fb6ea(0xa0),'type':'boolean','description':a16_0x3fb6ea(0xb6),'default':![]}],async 'execute'(_0x51f2ad){const _0x16012d=a16_0x3fb6ea,_0x15f35b=_0x51f2ad['rawFlags'][_0x16012d(0x8d)]?String(_0x51f2ad[_0x16012d(0x89)][_0x16012d(0x8d)]):undefined,_0x21b985=_0x51f2ad['str'](_0x16012d(0x91))||undefined,_0x36393d=resolveTargetApps(_0x51f2ad,_0x15f35b);if(_0x36393d){let _0x2560d7=0x0,_0x430ff2=0x0;for(const _0x30f105 of _0x36393d){const _0x55cde2=_0x30f105[_0x16012d(0x8a)]||_0x51f2ad[_0x16012d(0x8a)],_0x12342f=_0x30f105[_0x16012d(0xa9)]||_0x16012d(0x96);initEnv(_0x12342f);const _0x5c93b0=_0x30f105[_0x16012d(0xbb)]||_0x21b985||_0x51f2ad[_0x16012d(0xbb)]||DEFAULT_API_DIR,_0x440519=_0x30f105[_0x16012d(0x9f)]?'':_0x30f105[_0x16012d(0x98)]||_0x30f105[_0x16012d(0x8d)],_0x1725af=a16_0x31f367('Pulling\x20'+_0x30f105[_0x16012d(0x98)]+'\x20('+_0x30f105[_0x16012d(0x8d)]+_0x16012d(0x8f))[_0x16012d(0x9e)]();try{const {configArray:_0x1254e2}=await fetchModelList(_0x30f105['appcode'],_0x55cde2),_0x5d0978=await generateApiFile(_0x1254e2,_0x440519,_0x30f105[_0x16012d(0x8d)],_0x30f105[_0x16012d(0x9f)],_0x12342f,_0x5c93b0,_0x30f105[_0x16012d(0x98)]);_0x1725af['succeed'](_0x30f105[_0x16012d(0x98)]+':\x20'+_0x1254e2['length']+_0x16012d(0xa8)+_0x5d0978[_0x16012d(0x9b)]+_0x16012d(0x9c)),writeCliSideChannelLine('\x20\x20•\x20'+_0x5d0978['apiFilePath']),writeCliSideChannelLine(_0x16012d(0xba)+_0x5d0978[_0x16012d(0xaa)]),_0x2560d7++;}catch(_0xa539f7){_0x1725af[_0x16012d(0xb5)](_0x30f105['name']+':\x20'+(_0xa539f7 instanceof Error?_0xa539f7['message']:String(_0xa539f7))),_0x430ff2++;}}writeCliSideChannelLine('');if(_0x430ff2>0x0)writeCliSideChannelLine('!\x20'+_0x430ff2+_0x16012d(0x8c));return{'ok':_0x430ff2===0x0,'message':'Done:\x20'+_0x2560d7+_0x16012d(0xa6)+_0x430ff2+_0x16012d(0xb4)};}const _0x53175a=_0x15f35b&&_0x15f35b['includes']('-')?_0x15f35b[_0x16012d(0xa4)]('-')[_0x16012d(0xaf)](0x1)[_0x16012d(0x95)]('-'):'',_0xe207b4=_0x21b985||_0x51f2ad[_0x16012d(0xbb)]||DEFAULT_API_DIR,_0x52039b=!_0x15f35b,_0x3c1a02=a16_0x31f367('Pulling\x20API\x20config\x20for\x20'+_0x51f2ad[_0x16012d(0x92)]+_0x16012d(0x9a))[_0x16012d(0x9e)]();try{const {configArray:_0x18a148}=await fetchModelList(_0x51f2ad['appCode'],_0x51f2ad[_0x16012d(0x8a)]),_0x56e8fe=await generateApiFile(_0x18a148,_0x53175a,_0x51f2ad[_0x16012d(0x92)],_0x52039b,getEnv(),_0xe207b4);_0x3c1a02[_0x16012d(0xab)](_0x16012d(0xa7)+_0x18a148['length']+_0x16012d(0x8b)+_0x56e8fe[_0x16012d(0x9b)]+_0x16012d(0x9c));const _0x243779=_0x53175a?_0x53175a+_0x16012d(0x8e):_0x16012d(0xac),_0x3924fc=_0x53175a?_0x53175a+_0x16012d(0xa3):_0x16012d(0x90);return writeCliSideChannelLine(_0x16012d(0xba)+a16_0x2c76a0[_0x16012d(0x95)](_0xe207b4,_0x243779+'.ts')),writeCliSideChannelLine(_0x16012d(0xba)+a16_0x2c76a0[_0x16012d(0x95)](_0xe207b4,_0x3924fc+_0x16012d(0xae))),{'ok':!![],'data':{'datasetCount':_0x18a148[_0x16012d(0x94)],'modelCount':_0x56e8fe['modelCount']}};}catch(_0x17bef9){_0x3c1a02[_0x16012d(0xb5)](_0x16012d(0xb2)+(_0x17bef9 instanceof Error?_0x17bef9[_0x16012d(0x97)]:String(_0x17bef9)));throw _0x17bef9;}}};function a16_0x43a7(){const _0x4563c1=['global','5488398MDwevo','pull','-client','split','765660orKTnT','\x20succeeded,\x20','Pulled\x20','\x20dataset(s)\x20→\x20','env','clientFilePath','succeed','api','2zVeTfN','.ts','slice','14128904gowJxb','15waiMXQ','Failed:\x20','write','\x20failed','fail','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','1457254VFobLH','2798091mLFrLo','string','\x20\x20•\x20','apiDir','Output\x20directory\x20(default:\x20','rawFlags','cookie','\x20dataset(s),\x20generated\x20','\x20app(s)\x20failed','appcode','-api',')...','client','output','appCode','Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20(','length','join','production','message','name','8909658DvfOLb','...','modelCount','\x20model(s)','871983dvIcdK','start','isDefault'];a16_0x43a7=function(){return _0x4563c1;};return a16_0x43a7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a17_0xf38a(_0x939149,_0x1500d3){_0x939149=_0x939149-0x102;const _0x3c7959=a17_0x3c79();let _0xf38ae8=_0x3c7959[_0x939149];return _0xf38ae8;}(function(_0x7318d2,_0x25e61e){const _0x153af3=a17_0xf38a,_0xd19ca2=_0x7318d2();while(!![]){try{const _0xdd34e6=parseInt(_0x153af3(0x10c))/0x1*(parseInt(_0x153af3(0x106))/0x2)+-parseInt(_0x153af3(0x104))/0x3+parseInt(_0x153af3(0x10f))/0x4*(parseInt(_0x153af3(0x10b))/0x5)+parseInt(_0x153af3(0x108))/0x6+parseInt(_0x153af3(0x111))/0x7+parseInt(_0x153af3(0x107))/0x8+-parseInt(_0x153af3(0x112))/0x9;if(_0xdd34e6===_0x25e61e)break;else _0xd19ca2['push'](_0xd19ca2['shift']());}catch(_0x2b76fc){_0xd19ca2['push'](_0xd19ca2['shift']());}}}(a17_0x3c79,0x97c89));function a17_0x3c79(){const _0x4f97fd=['join','6TDwcIS','2102888ioDdCn','5128524WVEpwL','App\x20\x22','validation','220NqhXXj','50203uMBqnr','selectedAppName','name','89804gTXLqH','bool','2413383PRXeYy','14735952ULFwNh','project','length','1025412jeuKAp'];a17_0x3c79=function(){return _0x4f97fd;};return a17_0x3c79();}import{getMultiAppConfigs}from'../../utils/config.js';import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x1d9d6c,_0x1b53d8){const _0xa12fa=a17_0xf38a;if(_0x1b53d8)return null;const _0x37aa44=_0x1d9d6c[_0xa12fa(0x110)]('global')?'merged':_0xa12fa(0x102);let _0x141c58=getMultiAppConfigs(_0x37aa44);if(!_0x141c58||_0x141c58[_0xa12fa(0x103)]===0x0)return null;if(_0x1d9d6c[_0xa12fa(0x10d)]){const _0x32e7a0=_0x141c58['filter'](_0x600dcc=>_0x600dcc['name']===_0x1d9d6c[_0xa12fa(0x10d)]);if(_0x32e7a0[_0xa12fa(0x103)]===0x0){const _0x2409d2=_0x141c58['map'](_0x44e28f=>_0x44e28f[_0xa12fa(0x10e)])[_0xa12fa(0x105)](',\x20');throw CliErrors[_0xa12fa(0x10a)](_0xa12fa(0x109)+_0x1d9d6c[_0xa12fa(0x10d)]+'\x22\x20not\x20found\x20in\x20config.\x20Available:\x20'+_0x2409d2);}_0x141c58=_0x32e7a0;}return _0x141c58;}
|
package/lib/commands/app/add.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a18_0xaaf459=a18_0x5d75;function a18_0x5d75(_0x4b3447,_0x59d02d){_0x4b3447=_0x4b3447-0x12b;const _0x20409c=a18_0x2040();let _0x5d7596=_0x20409c[_0x4b3447];return _0x5d7596;}(function(_0x91100a,_0x508c22){const _0x380667=a18_0x5d75,_0xe85849=_0x91100a();while(!![]){try{const _0x223f62=parseInt(_0x380667(0x13b))/0x1*(-parseInt(_0x380667(0x13f))/0x2)+parseInt(_0x380667(0x12e))/0x3*(-parseInt(_0x380667(0x134))/0x4)+-parseInt(_0x380667(0x12c))/0x5*(parseInt(_0x380667(0x13e))/0x6)+parseInt(_0x380667(0x148))/0x7*(-parseInt(_0x380667(0x135))/0x8)+-parseInt(_0x380667(0x12b))/0x9+parseInt(_0x380667(0x12f))/0xa+parseInt(_0x380667(0x130))/0xb*(parseInt(_0x380667(0x14d))/0xc);if(_0x223f62===_0x508c22)break;else _0xe85849['push'](_0xe85849['shift']());}catch(_0x16fec6){_0xe85849['push'](_0xe85849['shift']());}}}(a18_0x2040,0x45634));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a18_0x2040(){const _0x50646e=['string','global','762cTpFVB','326tWPUhl','trim','\x20Set\x20as\x20default\x20app.','App\x20code','\x22\x20(appcode:\x20','add','str','boolean','Added','329TUIKOc','defaultApp','\x20app\x20add\x20<name>\x20--appcode\x20<code>','Use\x20global\x20config\x20scope','flagMissing','60qcpFUc','appcode','bool','1316241bvyaah','18375KTbEVs','Add\x20or\x20update\x20an\x20app\x20in\x20config','27ikFPcJ','829160VSBQhz','4227278MvtKFZ','apps','\x20app\x20\x22','Updated','219084yBjJXJ','93960fsvxCj','name','app','validation','Missing\x20app\x20name.','args','382ZhSJpu'];a18_0x2040=function(){return _0x50646e;};return a18_0x2040();}import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readConfig,writeConfig,scopeLabel}from'../../commands/app/shared.js';async function validateArgs(_0x47fd0e){const _0x19d1ba=a18_0x5d75,_0x4aaf7c=_0x47fd0e[_0x19d1ba(0x13a)][0x0]?.[_0x19d1ba(0x140)]();if(!_0x4aaf7c)throw CliErrors[_0x19d1ba(0x138)](_0x19d1ba(0x139),'Usage:\x20'+CLI_BIN_NAME+_0x19d1ba(0x14a));}async function execute(_0x5b32fe){const _0x516005=a18_0x5d75,_0x47e2ed=_0x5b32fe[_0x516005(0x13a)][0x0]?.[_0x516005(0x140)]();if(!_0x47e2ed)throw CliErrors[_0x516005(0x138)](_0x516005(0x139),'Usage:\x20'+CLI_BIN_NAME+_0x516005(0x14a));const _0x13674f=_0x5b32fe[_0x516005(0x145)](_0x516005(0x14e));if(!_0x13674f)throw CliErrors[_0x516005(0x14c)](_0x516005(0x14e),'Usage:\x20'+CLI_BIN_NAME+_0x516005(0x14a));const _0x43f797={'global':_0x5b32fe[_0x516005(0x14f)](_0x516005(0x13d))},_0x21ff5a=readConfig(_0x43f797);if(!_0x21ff5a[_0x516005(0x131)])_0x21ff5a[_0x516005(0x131)]={};const _0x5c6d08={'appcode':_0x13674f,...collectAppProfileOverrides(_0x4801bd=>_0x5b32fe[_0x516005(0x145)](_0x4801bd))},_0x4dc345=_0x21ff5a[_0x516005(0x131)],_0x54e30a=!!_0x4dc345[_0x47e2ed];_0x4dc345[_0x47e2ed]=_0x5c6d08;if(!_0x21ff5a[_0x516005(0x149)])_0x21ff5a[_0x516005(0x149)]=_0x47e2ed;writeConfig(_0x21ff5a,_0x43f797);const _0xadf9b=!_0x54e30a&&_0x21ff5a[_0x516005(0x149)]===_0x47e2ed?_0x516005(0x141):'',_0x7d02e1=(_0x54e30a?_0x516005(0x133):_0x516005(0x147))+_0x516005(0x132)+_0x47e2ed+_0x516005(0x143)+_0x13674f+')'+scopeLabel(_0x43f797)+'.'+_0xadf9b;return{'ok':!![],'message':_0x7d02e1};}export const appAddDefinition={'service':a18_0xaaf459(0x137),'command':a18_0xaaf459(0x144),'description':a18_0xaaf459(0x12d),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a18_0xaaf459(0x136),'description':'App\x20profile\x20name','required':!![]}],'flags':[{'name':a18_0xaaf459(0x14e),'type':a18_0xaaf459(0x13c),'description':a18_0xaaf459(0x142),'required':!![]},{'name':a18_0xaaf459(0x13d),'type':a18_0xaaf459(0x146),'description':a18_0xaaf459(0x14b),'default':![]},...getAppProfileFlagDefs()],'validate':validateArgs,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a19_0x554e(_0x505c5f,_0x18e1f2){_0x505c5f=_0x505c5f-0x10a;const _0x5ca1eb=a19_0x5ca1();let _0x554e00=_0x5ca1eb[_0x505c5f];return _0x554e00;}const a19_0x1b6b64=a19_0x554e;function a19_0x5ca1(){const _0x3c7c63=['306348EsJcOl','map','2698101YAlGrz','remote','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','702836hzjtJW','6jCauuK','app','754144ziEGRS','412314Yfjdet','read','../../core/api-client.js','cookie','1081195svZtkO','49MCGsZV','263649zQhEut','platform','appName','appCode','appDesc'];a19_0x5ca1=function(){return _0x3c7c63;};return a19_0x5ca1();}(function(_0x5e0652,_0x49b18e){const _0x13a627=a19_0x554e,_0x2ed473=_0x5e0652();while(!![]){try{const _0x4283a6=-parseInt(_0x13a627(0x10c))/0x1+-parseInt(_0x13a627(0x117))/0x2*(-parseInt(_0x13a627(0x11a))/0x3)+parseInt(_0x13a627(0x116))/0x4+-parseInt(_0x13a627(0x10a))/0x5+-parseInt(_0x13a627(0x111))/0x6*(-parseInt(_0x13a627(0x10b))/0x7)+parseInt(_0x13a627(0x119))/0x8+-parseInt(_0x13a627(0x113))/0x9;if(_0x4283a6===_0x49b18e)break;else _0x2ed473['push'](_0x2ed473['shift']());}catch(_0x42a33a){_0x2ed473['push'](_0x2ed473['shift']());}}}(a19_0x5ca1,0x3f7b4));import{listRemoteApps}from'../../core/api-client.js';async function execute(_0x3a3d8a){const _0x30b0b1=a19_0x554e,{setActiveCookie:_0x107617}=await import(_0x30b0b1(0x11c));_0x107617(_0x3a3d8a[_0x30b0b1(0x11d)]);const _0x1957e6=await listRemoteApps();return{'ok':!![],'data':{'items':_0x1957e6[_0x30b0b1(0x112)](_0x225ef1=>({..._0x225ef1['id']!=null?{'id':_0x225ef1['id']}:{},'appCode':_0x225ef1[_0x30b0b1(0x10f)],'appName':_0x225ef1[_0x30b0b1(0x10e)],..._0x225ef1[_0x30b0b1(0x110)]!=null?{'appDesc':_0x225ef1[_0x30b0b1(0x110)]}:{}})),'meta':{'source':_0x30b0b1(0x10d)}}};}export const appRemoteDefinition={'service':a19_0x1b6b64(0x118),'command':a19_0x1b6b64(0x114),'description':a19_0x1b6b64(0x115),'risk':a19_0x1b6b64(0x11b),'requiresAuth':!![],'requiresAppCode':![],'flags':[],'execute':execute};
|