@lovrabet/rabetbase-cli 2.1.11 → 2.1.12-beta.0
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/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/field-update.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 +2 -2
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x3f4cce=a0_0x1759;(function(_0x2ff695,_0x32623d){const _0x92fc42=a0_0x1759,_0x3c77fd=_0x2ff695();while(!![]){try{const _0x185171=-parseInt(_0x92fc42(0x113))/0x1*(-parseInt(_0x92fc42(0x115))/0x2)+parseInt(_0x92fc42(0xfe))/0x3*(-parseInt(_0x92fc42(0x11e))/0x4)+parseInt(_0x92fc42(0x10d))/0x5+-parseInt(_0x92fc42(0x114))/0x6*(parseInt(_0x92fc42(0x116))/0x7)+-parseInt(_0x92fc42(0x10e))/0x8*(parseInt(_0x92fc42(0x119))/0x9)+parseInt(_0x92fc42(0x11d))/0xa+-parseInt(_0x92fc42(0x11c))/0xb*(parseInt(_0x92fc42(0x104))/0xc);if(_0x185171===_0x32623d)break;else _0x3c77fd['push'](_0x3c77fd['shift']());}catch(_0x48b469){_0x3c77fd['push'](_0x3c77fd['shift']());}}}(a0_0x48fa,0x907e1));function a0_0x48fa(){const _0x8ecdee=['✗\x20Failed:\x20','.md','4CThaBK','1817526nhgoVl','216646oqGvUM','7LbkZjq','/api/node-toolbox/api-doc-generator','api-doc','90225FWxgak','.md\x20-\x20','push','2375549uXjztZ','7270880VbJdEn','11208mLDtpt','✓\x20Generated:\x20','error','423GaJrcA','./docs','POST','markdown','Invalid\x20response\x20format\x20(','join','24ENBPAn','utf8','datasetCode','name','string','log','Fetch\x20doc\x20(','length','message','3759285lnxMQS','152pDKEXv','tableName','\x20datasets\x20to\x20generate\x20docs\x20for\x0a'];a0_0x48fa=function(){return _0x8ecdee;};return a0_0x48fa();}import{mkdirSync,writeFileSync}from'node:fs';import a0_0x4f5510 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(_0x15a869){const _0x6fad61=a0_0x1759,{appCode:_0x302693,cookie:_0x3de073,datasetCode:_0xe5621f,datasetId:_0x8e01e4,extraParams:_0x4aaa22}=_0x15a869,_0x3be28a=getApiDomain()+_0x6fad61(0x117),_0x39b7c8=await platformFetch(_0x3be28a,{'method':_0x6fad61(0x100),'body':{'appCode':_0x302693,'datasetCode':_0xe5621f,'datasetId':_0x8e01e4,..._0x4aaa22||{}},'cookie':_0x3de073,'label':_0x6fad61(0x10a)+_0xe5621f+')'});if(!_0x39b7c8||typeof _0x39b7c8[_0x6fad61(0x101)]!==_0x6fad61(0x108))throw new Error(_0x6fad61(0x102)+_0xe5621f+'):\x20missing\x20data.markdown\x20field');return _0x39b7c8[_0x6fad61(0x101)];}function delay(_0x69bb58){return new Promise(_0xbe0968=>setTimeout(_0xbe0968,_0x69bb58));}function a0_0x1759(_0x57705b,_0x5a1a73){_0x57705b=_0x57705b-0xfe;const _0x48fa7d=a0_0x48fa();let _0x175958=_0x48fa7d[_0x57705b];return _0x175958;}export async function generateDatasetDocs(_0x2afa5d,_0x396a52,_0x494e3b,_0x52ec23=a0_0x3f4cce(0xff),_0x41aba3,_0x3b0fa3){const _0x1a1f3f=a0_0x3f4cce;mkdirSync(_0x52ec23,{'recursive':!![]});const _0x4d6fe6=[],_0x45fbd0=_0x2afa5d[_0x1a1f3f(0x10b)];console[_0x1a1f3f(0x109)]('\x0a'+_0x45fbd0+_0x1a1f3f(0x110));for(let _0x2cea09=0x0;_0x2cea09<_0x2afa5d[_0x1a1f3f(0x10b)];_0x2cea09++){const _0x5bf91c=_0x2afa5d[_0x2cea09],_0x1c2fe2=_0x2cea09+0x1,_0x30c96a=_0x5bf91c[_0x1a1f3f(0x10f)];try{console[_0x1a1f3f(0x109)]('['+_0x1c2fe2+'/'+_0x45fbd0+']\x20Generating:\x20'+_0x30c96a+'.md\x20('+_0x5bf91c['name']+')');if(_0x41aba3)_0x41aba3(_0x1c2fe2,_0x45fbd0,_0x30c96a);const _0x1f1ed3=await fetchDatasetDoc({'appCode':_0x396a52,'cookie':_0x494e3b,'datasetCode':_0x5bf91c[_0x1a1f3f(0x106)],'datasetId':_0x5bf91c['id'],'enableAI':![],'extraParams':_0x3b0fa3}),_0x3bc03c=a0_0x4f5510[_0x1a1f3f(0x103)](_0x52ec23,_0x30c96a+_0x1a1f3f(0x112));writeFileSync(_0x3bc03c,_0x1f1ed3,{'encoding':_0x1a1f3f(0x105)}),console['log'](_0x1a1f3f(0x11f)+_0x30c96a+_0x1a1f3f(0x112)),logger['success'](_0x1a1f3f(0x118),'生成文档成功:\x20'+_0x30c96a,undefined,{'datasetCode':_0x5bf91c['datasetCode'],'datasetName':_0x5bf91c[_0x1a1f3f(0x107)],'filePath':_0x3bc03c,'progress':_0x1c2fe2+'/'+_0x45fbd0}),_0x4d6fe6[_0x1a1f3f(0x11b)]({'datasetCode':_0x5bf91c[_0x1a1f3f(0x106)],'datasetName':_0x5bf91c[_0x1a1f3f(0x107)],'filePath':_0x3bc03c,'success':!![]});if(_0x1c2fe2<_0x45fbd0)await delay(0x1388);}catch(_0x4de34c){const _0x1e6a8e=_0x4de34c instanceof Error?_0x4de34c[_0x1a1f3f(0x10c)]:String(_0x4de34c);console[_0x1a1f3f(0x109)](_0x1a1f3f(0x111)+_0x30c96a+_0x1a1f3f(0x11a)+_0x1e6a8e),logger[_0x1a1f3f(0x120)](_0x1a1f3f(0x118),'生成文档失败:\x20'+_0x5bf91c['datasetCode'],{'datasetCode':_0x5bf91c[_0x1a1f3f(0x106)],'datasetName':_0x5bf91c['name'],'error':_0x1e6a8e,'progress':_0x1c2fe2+'/'+_0x45fbd0}),_0x4d6fe6['push']({'datasetCode':_0x5bf91c[_0x1a1f3f(0x106)],'datasetName':_0x5bf91c[_0x1a1f3f(0x107)],'filePath':'','success':![],'error':_0x1e6a8e}),_0x1c2fe2<_0x45fbd0&&(console[_0x1a1f3f(0x109)]('Waiting\x203\x20seconds...\x0a'),await delay(0xbb8));}}return _0x4d6fe6;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a1_0x3ec0(){const _0x40e379=['22kWRcIM','2792454aunDEr','configArray','8NMHRuE','Fetch\x20datasets','6LRiKao','name','21483636GPUMAF','1312742LWgyzb','4647812kWvGli','50mBKxjp','7113635nohwGh','replace','length','正在从服务器拉取模型列表...\x20(环境:\x20','3BFOqAl','/api/node-toolbox/dataset/model-list?appcode=','11993401aoiMkb','1498644vsajct','map'];a1_0x3ec0=function(){return _0x40e379;};return a1_0x3ec0();}function a1_0x47fc(_0x23e4a6,_0xb885d){_0x23e4a6=_0x23e4a6-0x1c7;const _0x3ec0bb=a1_0x3ec0();let _0x47fc74=_0x3ec0bb[_0x23e4a6];return _0x47fc74;}(function(_0x385b62,_0x3fb487){const _0x66d82c=a1_0x47fc,_0x520d58=_0x385b62();while(!![]){try{const _0x3a3de7=-parseInt(_0x66d82c(0x1cd))/0x1+-parseInt(_0x66d82c(0x1da))/0x2+parseInt(_0x66d82c(0x1d4))/0x3*(parseInt(_0x66d82c(0x1ce))/0x4)+parseInt(_0x66d82c(0x1d0))/0x5*(parseInt(_0x66d82c(0x1ca))/0x6)+parseInt(_0x66d82c(0x1d6))/0x7*(-parseInt(_0x66d82c(0x1c8))/0x8)+parseInt(_0x66d82c(0x1d7))/0x9*(-parseInt(_0x66d82c(0x1cf))/0xa)+parseInt(_0x66d82c(0x1d9))/0xb*(parseInt(_0x66d82c(0x1cc))/0xc);if(_0x3a3de7===_0x3fb487)break;else _0x520d58['push'](_0x520d58['shift']());}catch(_0x335701){_0x520d58['push'](_0x520d58['shift']());}}}(a1_0x3ec0,0xde43a));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(_0x521fad){const _0x80165d=a1_0x47fc;return _0x521fad[_0x80165d(0x1d1)](/[\r\n]+/g,'\x20')['trim']();}function cleanDatasetName(_0x1d28e7){const _0x286626=a1_0x47fc;if(!_0x1d28e7[_0x286626(0x1cb)])return _0x1d28e7;return{..._0x1d28e7,'name':cleanNewlines(_0x1d28e7[_0x286626(0x1cb)])};}export async function fetchModelList(_0x12299b,_0x356891){const _0x2360ff=a1_0x47fc,_0x405a14=getEnv(),_0x2e71db=getApiDomain()+_0x2360ff(0x1d5)+_0x12299b+'&otype=array';logger['info']('fetch-model-list',_0x2360ff(0x1d3)+_0x405a14+')',{'apiUrl':_0x2e71db});const _0x15fcc4=await platformFetch(_0x2e71db,{'cookie':_0x356891,'label':_0x2360ff(0x1c9)}),_0x593ec7=(_0x15fcc4[_0x2360ff(0x1c7)]??[])[_0x2360ff(0x1d8)](cleanDatasetName);return{'configArray':_0x593ec7,'count':_0x593ec7[_0x2360ff(0x1d2)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x337292,_0x1089f9){const _0x11678d=a2_0x38cf,_0x3cd0c2=_0x337292();while(!![]){try{const _0x5857ac=-parseInt(_0x11678d(0xe5))/0x1*(-parseInt(_0x11678d(0xf4))/0x2)+-parseInt(_0x11678d(0xcc))/0x3*(-parseInt(_0x11678d(0xe7))/0x4)+-parseInt(_0x11678d(0xcf))/0x5*(parseInt(_0x11678d(0xe9))/0x6)+-parseInt(_0x11678d(0xcb))/0x7+parseInt(_0x11678d(0xf1))/0x8+-parseInt(_0x11678d(0xf3))/0x9*(-parseInt(_0x11678d(0xd2))/0xa)+parseInt(_0x11678d(0xe2))/0xb*(-parseInt(_0x11678d(0xdd))/0xc);if(_0x5857ac===_0x1089f9)break;else _0x3cd0c2['push'](_0x3cd0c2['shift']());}catch(_0x5b3ffd){_0x3cd0c2['push'](_0x3cd0c2['shift']());}}}(a2_0x2204,0x1e428));function a2_0x2204(){const _0x1382e8=['280990EbXIhT','datasetCode','typescript','1151899vgugBD','15LzSTij','join','alias','187360GPTmmX','Please\x20configure\x20app\x20code\x20first\x20via\x20`','-api','4620SjlItp','API\x20文件生成成功!','{\x20apiConfigName:\x20\x22','{\x20apiConfigName:\x20','client.ts.tpl','tableName','LOVRABET','push','init-api','replace','api.ts.tpl','268896QJaaxQ','\x20config\x20set\x20app\x20<value>`','\x22\x20}','toUpperCase',',\x20env:\x20\x22','33WUXvTU','test','client','1kJxSDz','replaceApiContent','39300uZMyoM','format','12RyyEjS','CONFIG_NAMES.DEFAULT','length','api','.ts','resolve','utf8','name','838072XsTdsg','forEach','2655taUGIk'];a2_0x2204=function(){return _0x1382e8;};return a2_0x2204();}import a2_0x5d34c9 from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a2_0x432492 from'node:path';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';function a2_0x38cf(_0x908b78,_0x1eb6c0){_0x908b78=_0x908b78-0xca;const _0x220433=a2_0x2204();let _0x38cf35=_0x220433[_0x908b78];return _0x38cf35;}export async function generateApiFile(_0x552675,_0x30c33f,_0x5eaccf,_0x2fac31,_0x33c567,_0x243162,_0x1256d5){const _0x3de7c4=a2_0x38cf;if(!_0x5eaccf)throw new Error(_0x3de7c4(0xd0)+CLI_BIN_NAME+_0x3de7c4(0xde));const _0x5f5269=_0x2fac31&&!_0x1256d5,_0x4f521d=_0x1256d5||_0x5eaccf,_0x42cccc=_0x5f5269?_0x3de7c4(0xea):'\x22'+_0x4f521d+'\x22',_0x418bd4=!isProduction(_0x33c567);let _0x6195d6;if(_0x5f5269)_0x418bd4?_0x6195d6=_0x3de7c4(0xd5)+_0x42cccc+_0x3de7c4(0xe1)+_0x33c567+_0x3de7c4(0xdf):_0x6195d6='';else{const _0x30b3c8=_0x418bd4?_0x3de7c4(0xe1)+_0x33c567+'\x22':'';_0x6195d6=_0x3de7c4(0xd4)+_0x4f521d+'\x22'+_0x30b3c8+'\x20}';}const _0x53b5e6=_0x30c33f?_0x30c33f+_0x3de7c4(0xd1):_0x3de7c4(0xec),_0x92b89e=_0x30c33f?_0x30c33f+'-client':_0x3de7c4(0xe4),_0x1d0f1a=_0x30c33f&&!/^app-[a-f0-9]+$/i[_0x3de7c4(0xe3)](_0x30c33f)?_0x30c33f[_0x3de7c4(0xdb)](/-/g,'_')[_0x3de7c4(0xe0)]():_0x3de7c4(0xd8),_0x3440a8=[];_0x552675[_0x3de7c4(0xf2)](_0x4b1d0e=>{const _0x3c5747=_0x3de7c4;_0x3440a8[_0x3c5747(0xd9)]({'datasetCode':_0x4b1d0e[_0x3c5747(0xf5)],'tableName':_0x4b1d0e[_0x3c5747(0xd7)],'name':_0x4b1d0e[_0x3c5747(0xf0)]||'','alias':_0x4b1d0e[_0x3c5747(0xce)]||_0x4b1d0e['key']});});const _0x28b983=fileURLToPath(import.meta.url),_0x27ead4=a2_0x432492[_0x3de7c4(0xee)](a2_0x432492['dirname'](_0x28b983),'../..'),_0x1d8522=a2_0x432492[_0x3de7c4(0xcd)](_0x27ead4,'templates/generate-api'),_0x606f2f=a2_0x432492['join'](_0x1d8522,_0x3de7c4(0xdc)),_0x2ba6ea=a2_0x432492['join'](_0x1d8522,_0x3de7c4(0xd6)),_0x2c9c53=_0x243162;mkdirSync(_0x2c9c53,{'recursive':!![]});const _0x3ad118=_0x3440a8[0x0]?.[_0x3de7c4(0xce)],_0xa7c8f2=readFileSync(_0x606f2f,_0x3de7c4(0xef)),_0x29df99=TemplateReplacer[_0x3de7c4(0xe6)](_0xa7c8f2,_0x5eaccf,_0x3440a8,_0x3ad118,_0x53b5e6,_0x42cccc,undefined,_0x1d0f1a),_0x2f121d=await a2_0x5d34c9[_0x3de7c4(0xe8)](_0x29df99,{'parser':'typescript'}),_0x505ac5=a2_0x432492['join'](_0x2c9c53,_0x53b5e6+_0x3de7c4(0xed));writeFileSync(_0x505ac5,_0x2f121d,{'encoding':_0x3de7c4(0xef)});const _0x60dcf9=readFileSync(_0x2ba6ea,'utf8'),_0x4015a6=TemplateReplacer['replaceApiContent'](_0x60dcf9,_0x5eaccf,_0x3440a8,_0x3ad118,_0x53b5e6,_0x42cccc,_0x6195d6,_0x1d0f1a),_0x396b0a=await a2_0x5d34c9[_0x3de7c4(0xe8)](_0x4015a6,{'parser':_0x3de7c4(0xca)}),_0x90434f=a2_0x432492[_0x3de7c4(0xcd)](_0x2c9c53,_0x92b89e+_0x3de7c4(0xed));writeFileSync(_0x90434f,_0x396b0a,{'encoding':_0x3de7c4(0xef)});const _0x2a5951=_0x3440a8[_0x3de7c4(0xeb)];return logger['success'](_0x3de7c4(0xda),_0x3de7c4(0xd3),undefined,{'apiFile':_0x505ac5,'clientFile':_0x90434f,'modelCount':_0x2a5951,'configName':_0x42cccc}),{'modelCount':_0x2a5951,'apiFilePath':_0x505ac5,'clientFilePath':_0x90434f,'configName':_0x42cccc};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2c18c5,_0x5cba2b){const _0x1bcc47=a3_0x2fea,_0x2a1eaf=_0x2c18c5();while(!![]){try{const _0x743ab=parseInt(_0x1bcc47(0xb9))/0x1+parseInt(_0x1bcc47(0xb5))/0x2*(parseInt(_0x1bcc47(0xb2))/0x3)+-parseInt(_0x1bcc47(0xb4))/0x4*(-parseInt(_0x1bcc47(0xab))/0x5)+parseInt(_0x1bcc47(0xa9))/0x6*(parseInt(_0x1bcc47(0xa8))/0x7)+-parseInt(_0x1bcc47(0xaa))/0x8*(parseInt(_0x1bcc47(0xae))/0x9)+parseInt(_0x1bcc47(0xbd))/0xa+parseInt(_0x1bcc47(0xb1))/0xb*(-parseInt(_0x1bcc47(0xaf))/0xc);if(_0x743ab===_0x5cba2b)break;else _0x2a1eaf['push'](_0x2a1eaf['shift']());}catch(_0x396205){_0x2a1eaf['push'](_0x2a1eaf['shift']());}}}(a3_0x47ed,0xcb44a));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a3_0x47ed(){const _0x16f0fb=['autoYes','804615OswJZD','30UPkddn','11010128qHeAOg','35xJKIvu','stop','nonInteractive','9XGshbO','37221936YLVExF','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','11nhRfsu','1110165GwgQcE','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','915524rgqDCT','4rIQgJD','validation','Run\x20`','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','790680wcdTmm','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','No\x20valid\x20session.\x20Login\x20now?','!\x20Login\x20failed.','16029980wjcLUC','start','*\x20Login\x20successful!','log'];a3_0x47ed=function(){return _0x16f0fb;};return a3_0x47ed();}function a3_0x2fea(_0x110d95,_0x4beaab){_0x110d95=_0x110d95-0xa4;const _0x47edf8=a3_0x47ed();let _0x2feaea=_0x47edf8[_0x110d95];return _0x2feaea;}import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';import a3_0x16eebb from'ora';export async function runAuthServer(_0x469091){const _0x68faa=a3_0x2fea,_0x468b93=await getIsSessionValid();if(_0x468b93){console[_0x68faa(0xa6)](_0x68faa(0xba));return;}if(_0x469091?.[_0x68faa(0xad)]&&!_0x469091[_0x68faa(0xa7)])throw CliErrors[_0x68faa(0xb6)]('Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.',_0x68faa(0xb7)+CLI_BIN_NAME+_0x68faa(0xb0));const _0x250689=_0x469091?.[_0x68faa(0xa7)]?!![]:await confirm({'message':_0x68faa(0xbb),'default':!![]});if(!_0x250689)return;if(_0x469091?.['nonInteractive']){console[_0x68faa(0xa6)](_0x68faa(0xb8));const _0xe5e0b0=await authServer({'silent':![],'openBrowser':![]});_0xe5e0b0?console[_0x68faa(0xa6)](_0x68faa(0xa5)):console['log']('!\x20Login\x20failed.');return;}const _0x35ed08=a3_0x16eebb(_0x68faa(0xb3))[_0x68faa(0xa4)](),_0x51f12d=await authServer({'silent':!![],'openBrowser':!![]});_0x35ed08[_0x68faa(0xac)](),_0x51f12d?console[_0x68faa(0xa6)](_0x68faa(0xa5)):console[_0x68faa(0xa6)](_0x68faa(0xbc));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x457ab7=a4_0x4230;function a4_0x4ebf(){const _0x261183=['end','then','timeoutMs','https://dev.lovrabet.com:','port','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','log','4211793PMnijM','session','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','/api/auth/get-session','2592640pfsort','4762IFYkqG','6768BmiukN','createServer','/sign-in?redirect=','writeHead','utf-8','16117760OwDpoq','4193nbGNuC','📍\x20Login\x20URL:','56574YnHiHp','!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','cmd\x20/c\x20start\x20\x22\x22\x20\x22','6210SbTiZK','error','22iRLASu','💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','json','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','cookie','127.0.0.1','silent','darwin','4605IvCtII','win32','object','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','174AWVCCI','open\x20\x22'];a4_0x4ebf=function(){return _0x261183;};return a4_0x4ebf();}(function(_0x42c565,_0x374c5f){const _0x309a97=a4_0x4230,_0x307f62=_0x42c565();while(!![]){try{const _0x39bb38=parseInt(_0x309a97(0x1f1))/0x1+parseInt(_0x309a97(0x210))/0x2*(-parseInt(_0x309a97(0x202))/0x3)+-parseInt(_0x309a97(0x20f))/0x4+parseInt(_0x309a97(0x1fe))/0x5*(-parseInt(_0x309a97(0x1f4))/0x6)+parseInt(_0x309a97(0x1ef))/0x7*(-parseInt(_0x309a97(0x1e9))/0x8)+-parseInt(_0x309a97(0x20b))/0x9+parseInt(_0x309a97(0x1ee))/0xa*(parseInt(_0x309a97(0x1f6))/0xb);if(_0x39bb38===_0x374c5f)break;else _0x307f62['push'](_0x307f62['shift']());}catch(_0x5e5851){_0x307f62['push'](_0x307f62['shift']());}}}(a4_0x4ebf,0x8a28e));import{writeFileSync}from'node:fs';import a4_0xe7770 from'node:https';function a4_0x4230(_0x50d333,_0x42fb2d){_0x50d333=_0x50d333-0x1e9;const _0x4ebf18=a4_0x4ebf();let _0x4230de=_0x4ebf18[_0x50d333];return _0x4230de;}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 const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export async function authServer(_0x4da24f){const _0x2302ae=a4_0x4230,_0x280b4d=_0x4da24f?.[_0x2302ae(0x1fc)]||![],_0x29d5b0=_0x4da24f?.['openBrowser']??!![],_0x28ad11=_0x4da24f?.[_0x2302ae(0x206)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x19f320=await(await fetch('https://g.yuntooai.com/cert/lovrabet-dev.json'))[_0x2302ae(0x1f8)]();return new Promise(async(_0x2eaa47,_0x5c8567)=>{const _0x5c0758=_0x2302ae;let _0x900fa6=0x0,_0x4af8a5=![],_0x402b19;const _0x561d5f=a4_0xe7770[_0x5c0758(0x1ea)](_0x19f320,async(_0x56d83e,_0x5711d2)=>{const _0x1cba7c=_0x5c0758,_0x3a1f7d=getUserDomain(),_0x37cbaf=_0x56d83e['headers'][_0x1cba7c(0x1fa)]||'',_0x388b6b=await fetch(_0x3a1f7d+_0x1cba7c(0x20e),{'headers':{'cookie':_0x37cbaf}})[_0x1cba7c(0x205)](_0x421930=>_0x421930[_0x1cba7c(0x1f8)]()),_0x3f589d=_0x388b6b&&_0x388b6b[_0x1cba7c(0x20c)]&&_0x388b6b['user'];if(_0x3f589d){writeFileSync(cookieFile,_0x37cbaf,_0x1cba7c(0x1ed));const _0x400488=buildLoginSuccessHtml();_0x5711d2[_0x1cba7c(0x1ec)](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x5711d2[_0x1cba7c(0x204)](_0x400488),_0x39fc4f(!![]);}else{const _0x2f28ae=''+encodeURIComponent(_0x1cba7c(0x207)+_0x900fa6);_0x5711d2[_0x1cba7c(0x1ec)](0x12e,{'location':_0x3a1f7d+_0x1cba7c(0x1eb)+_0x2f28ae}),_0x5711d2['end']();return;}});function _0x39fc4f(_0x5dd265){if(_0x4af8a5)return;_0x4af8a5=!![],_0x402b19&&clearTimeout(_0x402b19),_0x561d5f['close'](),_0x2eaa47(_0x5dd265);}_0x561d5f['listen'](0x0,_0x5c0758(0x1fb),()=>{const _0x3f8657=_0x5c0758,_0x59eff7=_0x561d5f['address']();_0x900fa6=typeof _0x59eff7===_0x3f8657(0x200)&&_0x59eff7?_0x59eff7[_0x3f8657(0x208)]:Number(_0x59eff7);const _0x27a31d=_0x3f8657(0x207)+_0x900fa6;_0x402b19=setTimeout(()=>{const _0x5cf801=_0x3f8657;!_0x280b4d&&console[_0x5cf801(0x20a)](_0x5cf801(0x1f2)),_0x39fc4f(![]);},_0x28ad11);!_0x280b4d&&(console[_0x3f8657(0x20a)]('🔐\x20Starting\x20login\x20service...'),console[_0x3f8657(0x20a)](_0x3f8657(0x1f0),_0x27a31d),_0x29d5b0?(console[_0x3f8657(0x20a)]('🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...'),console[_0x3f8657(0x20a)](''),console[_0x3f8657(0x20a)](_0x3f8657(0x1f9))):console[_0x3f8657(0x20a)](_0x3f8657(0x1f7)),console[_0x3f8657(0x20a)](''));if(!_0x29d5b0)return;openInBrowser(_0x27a31d)[_0x3f8657(0x205)](_0x40b7fc=>{const _0x4e3a00=_0x3f8657;!_0x280b4d&&(_0x40b7fc?console[_0x4e3a00(0x20a)](_0x4e3a00(0x201)):(console['log'](_0x4e3a00(0x20d)),console['log'](_0x4e3a00(0x209),_0x27a31d)),console[_0x4e3a00(0x20a)](''));})['catch'](()=>{const _0x1c01fd=_0x3f8657;!_0x280b4d&&(console[_0x1c01fd(0x20a)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x1c01fd(0x20a)](_0x1c01fd(0x209),_0x27a31d),console[_0x1c01fd(0x20a)](''));});}),_0x561d5f['on'](_0x5c0758(0x1f5),_0x5ec194=>{const _0xf8eddd=_0x5c0758;if(_0x4af8a5)return;_0x4af8a5=!![],_0x402b19&&clearTimeout(_0x402b19),!_0x280b4d&&console[_0xf8eddd(0x1f5)]('Auth\x20server\x20error:',_0x5ec194),_0x561d5f['close'](),_0x5c8567(_0x5ec194);});});}function openInBrowser(_0x581924){return new Promise(_0x16eedc=>{const _0xeb8e63=a4_0x4230,_0x4879fb=process['platform'];let _0x22b929;if(_0x4879fb===_0xeb8e63(0x1ff))_0x22b929=_0xeb8e63(0x1f3)+_0x581924+'\x22';else _0x4879fb===_0xeb8e63(0x1fd)?_0x22b929=_0xeb8e63(0x203)+_0x581924+'\x22':_0x22b929='xdg-open\x20\x22'+_0x581924+'\x22';exec(_0x22b929,_0x380373=>{_0x380373?_0x16eedc(![]):_0x16eedc(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a4_0x457ab7(0x20a)]('isAuth',isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a5_0x52368d=a5_0x3f2c;(function(_0x2ec80a,_0x3d5a9c){const _0x47e9b2=a5_0x3f2c,_0x26ef41=_0x2ec80a();while(!![]){try{const _0x208ca2=-parseInt(_0x47e9b2(0x8f))/0x1*(-parseInt(_0x47e9b2(0x90))/0x2)+parseInt(_0x47e9b2(0x99))/0x3*(-parseInt(_0x47e9b2(0x94))/0x4)+-parseInt(_0x47e9b2(0x96))/0x5+parseInt(_0x47e9b2(0x8e))/0x6+-parseInt(_0x47e9b2(0x97))/0x7+parseInt(_0x47e9b2(0x95))/0x8+parseInt(_0x47e9b2(0x98))/0x9*(parseInt(_0x47e9b2(0x93))/0xa);if(_0x208ca2===_0x3d5a9c)break;else _0x26ef41['push'](_0x26ef41['shift']());}catch(_0x51266d){_0x26ef41['push'](_0x26ef41['shift']());}}}(a5_0x3eda,0x72a5d));import{mkdirSync}from'node:fs';function a5_0x3f2c(_0x443e31,_0x1e84d8){_0x443e31=_0x443e31-0x8e;const _0x3eda66=a5_0x3eda();let _0x3f2cb5=_0x3eda66[_0x443e31];return _0x3f2cb5;}import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a5_0x52368d(0x92));function a5_0x3eda(){const _0x39ea9d=['.lovrabet','1233790uyZOsj','2812PpQtgC','181208dUXEUD','3859090daoBab','2505720bBncJT','153uClsdf','3945fDoUBX','2400144WCDAQu','3702iXkHIY','2utazCV','cookie'];a5_0x3eda=function(){return _0x39ea9d;};return a5_0x3eda();}export const cookieFile=join(configDir,a5_0x52368d(0x91));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c0e49,_0x11cccf){var _0x48ebef=a6_0x12c4,_0x164dce=_0x4c0e49();while(!![]){try{var _0x3de01c=parseInt(_0x48ebef(0x14c))/0x1+parseInt(_0x48ebef(0x14e))/0x2*(-parseInt(_0x48ebef(0x151))/0x3)+parseInt(_0x48ebef(0x150))/0x4+-parseInt(_0x48ebef(0x14f))/0x5*(parseInt(_0x48ebef(0x14d))/0x6)+parseInt(_0x48ebef(0x14b))/0x7+parseInt(_0x48ebef(0x14a))/0x8*(-parseInt(_0x48ebef(0x149))/0x9)+parseInt(_0x48ebef(0x148))/0xa;if(_0x3de01c===_0x11cccf)break;else _0x164dce['push'](_0x164dce['shift']());}catch(_0x41ea5d){_0x164dce['push'](_0x164dce['shift']());}}}(a6_0x1e5e,0x30922));function a6_0x12c4(_0x137838,_0x317cbf){_0x137838=_0x137838-0x148;var _0x1e5ed5=a6_0x1e5e();var _0x12c441=_0x1e5ed5[_0x137838];return _0x12c441;}import{readFileSync}from'node:fs';function a6_0x1e5e(){var _0x35dbca=['48VuLbgA','555415FWgSPi','230498QImHQK','186996xAJHxA','2cJcfdt','55EsmBNf','569808kPLtBJ','701601jrGram','utf-8','4702840VFbKlD','220410gkpZWd'];a6_0x1e5e=function(){return _0x35dbca;};return a6_0x1e5e();}import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0x1098f4=a6_0x12c4;try{return readFileSync(cookieFile,_0x1098f4(0x152));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x473b21,_0x5982c8){const _0x1285ec=a7_0x5b2a,_0x2e22e0=_0x473b21();while(!![]){try{const _0x34a111=parseInt(_0x1285ec(0xcd))/0x1*(-parseInt(_0x1285ec(0xd6))/0x2)+parseInt(_0x1285ec(0xd1))/0x3*(parseInt(_0x1285ec(0xd3))/0x4)+-parseInt(_0x1285ec(0xd7))/0x5*(-parseInt(_0x1285ec(0xce))/0x6)+parseInt(_0x1285ec(0xd9))/0x7+parseInt(_0x1285ec(0xd8))/0x8+-parseInt(_0x1285ec(0xd0))/0x9*(-parseInt(_0x1285ec(0xda))/0xa)+-parseInt(_0x1285ec(0xcf))/0xb*(parseInt(_0x1285ec(0xd2))/0xc);if(_0x34a111===_0x5982c8)break;else _0x2e22e0['push'](_0x2e22e0['shift']());}catch(_0x5423ff){_0x2e22e0['push'](_0x2e22e0['shift']());}}}(a7_0x3903,0xb89a7));import{existsSync,readFileSync}from'node:fs';function a7_0x3903(){const _0x1c46e7=['232371oMkkCt','3306KlkYJk','19479024EbZRGj','1988UvjVDB','session','/api/auth/get-session','982gJJSkz','35730vBwzde','7807248CvfgFx','3368918jdnwVT','500JCwbXF','user','json','729fEXxnC','894PsQuWI','22LiIwqh'];a7_0x3903=function(){return _0x1c46e7;};return a7_0x3903();}function a7_0x5b2a(_0x2bbbe6,_0x3fca65){_0x2bbbe6=_0x2bbbe6-0xcd;const _0x39037b=a7_0x3903();let _0x5b2a99=_0x39037b[_0x2bbbe6];return _0x5b2a99;}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0x9801a3=a7_0x5b2a;try{if(!existsSync(cookieFile))return null;const _0x5273d0=readFileSync(cookieFile,'utf-8'),_0x225087=await fetch(getUserDomain()+_0x9801a3(0xd5),{'headers':{'cookie':_0x5273d0}});if(!_0x225087['ok'])return null;const _0xb5a975=await _0x225087[_0x9801a3(0xdc)]();if(!_0xb5a975[_0x9801a3(0xd4)]||!_0xb5a975[_0x9801a3(0xdb)])return null;return _0xb5a975;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a8_0x1ac7(){const _0x2012ea=['4831632sJuuaV','5814256hLvBbC','session','8UIHDPM','4206440jZvVkx','2620422FwyBjs','95878bDuhGO','utf-8','57ONLjxS','1115158UVyzuM','576076gGGUKD','5rlLdAx','user'];a8_0x1ac7=function(){return _0x2012ea;};return a8_0x1ac7();}(function(_0x4ec46e,_0x228758){const _0xac020a=a8_0x1c8d,_0xe05ab7=_0x4ec46e();while(!![]){try{const _0x3f8de3=parseInt(_0xac020a(0x111))/0x1+parseInt(_0xac020a(0x10e))/0x2*(-parseInt(_0xac020a(0x110))/0x3)+-parseInt(_0xac020a(0x112))/0x4*(parseInt(_0xac020a(0x113))/0x5)+-parseInt(_0xac020a(0x10d))/0x6+parseInt(_0xac020a(0x116))/0x7*(parseInt(_0xac020a(0x10b))/0x8)+parseInt(_0xac020a(0x115))/0x9+-parseInt(_0xac020a(0x10c))/0xa;if(_0x3f8de3===_0x228758)break;else _0xe05ab7['push'](_0xe05ab7['shift']());}catch(_0x2cd57e){_0xe05ab7['push'](_0xe05ab7['shift']());}}}(a8_0x1ac7,0x8b405));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a8_0x1c8d(_0x2988a6,_0x17cfb0){_0x2988a6=_0x2988a6-0x10b;const _0x1ac7c1=a8_0x1ac7();let _0x1c8da2=_0x1ac7c1[_0x2988a6];return _0x1c8da2;}import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0xc06ea6=a8_0x1c8d;try{if(!existsSync(cookieFile))return![];const _0x356e73=readFileSync(cookieFile,_0xc06ea6(0x10f)),_0x5b7711=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x356e73}})['then'](_0x327f55=>_0x327f55['json']());return _0x5b7711&&_0x5b7711[_0xc06ea6(0x117)]&&_0x5b7711[_0xc06ea6(0x114)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x8c46b4,_0x2a8338){const _0x2f429c=a9_0x4c72,_0x5a57f5=_0x8c46b4();while(!![]){try{const _0x29e5f5=parseInt(_0x2f429c(0x198))/0x1+parseInt(_0x2f429c(0x18f))/0x2+parseInt(_0x2f429c(0x18d))/0x3*(parseInt(_0x2f429c(0x191))/0x4)+parseInt(_0x2f429c(0x19a))/0x5*(parseInt(_0x2f429c(0x199))/0x6)+parseInt(_0x2f429c(0x195))/0x7*(parseInt(_0x2f429c(0x196))/0x8)+parseInt(_0x2f429c(0x190))/0x9*(parseInt(_0x2f429c(0x194))/0xa)+-parseInt(_0x2f429c(0x193))/0xb*(parseInt(_0x2f429c(0x18e))/0xc);if(_0x29e5f5===_0x2a8338)break;else _0x5a57f5['push'](_0x5a57f5['shift']());}catch(_0x56e8f8){_0x5a57f5['push'](_0x5a57f5['shift']());}}}(a9_0x7c07,0x7f64e));function a9_0x7c07(){const _0x5ab58a=['2581304FQiigr','<!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>','416719aLXNkq','3518322papblf','5RCvwSB','47373TCgxSJ','575916nguNXR','713070UDcGJt','9vfhSrn','220SRRxlW','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','704xXyRmH','3972230WEQjzl','21yKnvEc'];a9_0x7c07=function(){return _0x5ab58a;};return a9_0x7c07();}function a9_0x4c72(_0x3143a4,_0x51e3c8){_0x3143a4=_0x3143a4-0x18d;const _0x7c0754=a9_0x7c07();let _0x4c72ff=_0x7c0754[_0x3143a4];return _0x4c72ff;}export function buildLoginSuccessHtml(){const _0x5d86df=a9_0x4c72,_0x2bb946=_0x5d86df(0x192);return _0x5d86df(0x197)+_0x2bb946+'</div>\x0a\x20\x20\x20\x20<p\x20class=\x22cli-hint\x22>Rabetbase\x20CLI\x20·\x20session\x20saved\x20locally</p>\x0a\x20\x20</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>';}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2396a0,_0x49995b){var _0x2f42e0=a10_0x3ab2,_0x373e94=_0x2396a0();while(!![]){try{var _0x1f49ce=parseInt(_0x2f42e0(0x112))/0x1*(parseInt(_0x2f42e0(0x111))/0x2)+parseInt(_0x2f42e0(0x10d))/0x3+-parseInt(_0x2f42e0(0x10c))/0x4+parseInt(_0x2f42e0(0x115))/0x5*(-parseInt(_0x2f42e0(0x10f))/0x6)+-parseInt(_0x2f42e0(0x10b))/0x7+parseInt(_0x2f42e0(0x113))/0x8*(-parseInt(_0x2f42e0(0x10e))/0x9)+parseInt(_0x2f42e0(0x110))/0xa;if(_0x1f49ce===_0x49995b)break;else _0x373e94['push'](_0x373e94['shift']());}catch(_0x3c0c82){_0x373e94['push'](_0x373e94['shift']());}}}(a10_0x108b,0x71774));import{unlinkSync,existsSync}from'node:fs';function a10_0x3ab2(_0x1443f1,_0x3c3ea5){_0x1443f1=_0x1443f1-0x10b;var _0x108b9c=a10_0x108b();var _0x3ab22a=_0x108b9c[_0x1443f1];return _0x3ab22a;}import{cookieFile}from'../auth/constant.js';export function logout(){var _0x20954b=a10_0x3ab2;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x20954b(0x114)]('✓\x20Logged\x20out')):console[_0x20954b(0x114)]('!\x20Not\x20logged\x20in');}function a10_0x108b(){var _0x177a95=['457008RREsFB','3phiGmc','4112THEgGo','log','6565XLDuRT','5715283dZBJRE','1826208DVierm','1495704hZFDbH','1314lmxRaR','3078zliRGA','13023100nDcDMp'];a10_0x108b=function(){return _0x177a95;};return a10_0x108b();}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a11_0x486b(_0x3a5248,_0x5cbe0c){_0x3a5248=_0x3a5248-0xea;const _0x339e0d=a11_0x339e();let _0x486b96=_0x339e0d[_0x3a5248];return _0x486b96;}const a11_0x2ef8c3=a11_0x486b;(function(_0x647378,_0x3a984a){const _0x1a37c1=a11_0x486b,_0x478cf2=_0x647378();while(!![]){try{const _0x33faa5=-parseInt(_0x1a37c1(0xea))/0x1*(parseInt(_0x1a37c1(0xf2))/0x2)+-parseInt(_0x1a37c1(0xf5))/0x3+-parseInt(_0x1a37c1(0xef))/0x4*(-parseInt(_0x1a37c1(0xeb))/0x5)+parseInt(_0x1a37c1(0xee))/0x6+parseInt(_0x1a37c1(0xf1))/0x7*(parseInt(_0x1a37c1(0xf6))/0x8)+-parseInt(_0x1a37c1(0xf3))/0x9*(parseInt(_0x1a37c1(0xf4))/0xa)+-parseInt(_0x1a37c1(0xf0))/0xb*(-parseInt(_0x1a37c1(0xed))/0xc);if(_0x33faa5===_0x3a984a)break;else _0x478cf2['push'](_0x478cf2['shift']());}catch(_0x561f25){_0x478cf2['push'](_0x478cf2['shift']());}}}(a11_0x339e,0x1dde3));export const dynamicCliFlags={'enableBffSave':{'type':a11_0x2ef8c3(0xec)}};function a11_0x339e(){const _0xe953f2=['31016YBjMYc','129xwgQne','5jMZbIu','boolean','144pdwvJd','787956qKwmRW','718552QKBDoP','4994thixsx','7FtkqTR','730YlMRTq','9vwAOjX','1467210rXiJbq','12432DPjLcK'];a11_0x339e=function(){return _0xe953f2;};return a11_0x339e();}
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a12_0x1a1d05=a12_0x296b;(function(_0x6defcf,_0x5dce5f){const _0x2ff2fb=a12_0x296b,_0x2fee39=_0x6defcf();while(!![]){try{const _0x15492c=-parseInt(_0x2ff2fb(0x210))/0x1+parseInt(_0x2ff2fb(0x207))/0x2+-parseInt(_0x2ff2fb(0x1fa))/0x3*(-parseInt(_0x2ff2fb(0x1fb))/0x4)+parseInt(_0x2ff2fb(0x1f8))/0x5+parseInt(_0x2ff2fb(0x1f2))/0x6*(-parseInt(_0x2ff2fb(0x20c))/0x7)+parseInt(_0x2ff2fb(0x1fc))/0x8+-parseInt(_0x2ff2fb(0x221))/0x9;if(_0x15492c===_0x5dce5f)break;else _0x2fee39['push'](_0x2fee39['shift']());}catch(_0xa88d3f){_0x2fee39['push'](_0x2fee39['shift']());}}}(a12_0x1567,0x809ed));import a12_0x2d5486 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';function a12_0x296b(_0x33fe10,_0x14765c){_0x33fe10=_0x33fe10-0x1f2;const _0x1567ff=a12_0x1567();let _0x296b7a=_0x1567ff[_0x33fe10];return _0x296b7a;}import{registerOtelShutdownOnExit,exitWithOtelShutdown}from'./telemetry/register-otel-exit-shutdown.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import(a12_0x1a1d05(0x1f3)))[a12_0x1a1d05(0x20f)];}catch{}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!==a12_0x1a1d05(0x1fe)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION,cli=a12_0x2d5486(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0x43f5e4=a12_0x1a1d05;let _0x42249a=cli['input'][0x0],_0x19a1e2=cli[_0x43f5e4(0x20b)][0x1];const _0x18b54d=cli['flags'];if(!_0x42249a){await reportCliHelpTrace(_0x43f5e4(0x21c)),showHelp();return;}const _0xd61321=deprecatedAliases[_0x42249a];if(_0xd61321&&!isKnownService(_0x42249a)){const _0x2548dd=_0x19a1e2?CLI_BIN_NAME+'\x20'+_0x42249a+'\x20'+_0x19a1e2:CLI_BIN_NAME+'\x20'+_0x42249a,_0x85c571=CLI_BIN_NAME+'\x20'+_0xd61321[_0x43f5e4(0x212)]+'\x20'+_0xd61321[_0x43f5e4(0x206)];console[_0x43f5e4(0x214)](_0x43f5e4(0x1ff)+_0x2548dd+_0x43f5e4(0x20a)+_0x85c571+_0x43f5e4(0x21e)+_0x43f5e4(0x215)),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x42249a)){await reportCliHelpTrace(_0x43f5e4(0x218),{'service':_0x42249a}),showHelp();return;}const _0x2d3685=getServiceEntry(_0x42249a);if(_0x18b54d['env']&&typeof _0x18b54d[_0x43f5e4(0x220)]===_0x43f5e4(0x21f)){const {initEnv:_0x5d3032}=await import(_0x43f5e4(0x200));_0x5d3032(_0x18b54d[_0x43f5e4(0x220)]);}const {buildConfigFromFlags:_0x515fed}=await import(_0x43f5e4(0x201)),_0x53676d=_0x515fed(_0x18b54d);if(!_0x18b54d[_0x43f5e4(0x220)]&&_0x53676d['env']){const {initEnv:_0x35306a}=await import(_0x43f5e4(0x200));_0x35306a(_0x53676d[_0x43f5e4(0x220)]);}if(_0x53676d[_0x43f5e4(0x208)]?.[_0x43f5e4(0x20e)]||_0x53676d[_0x43f5e4(0x208)]?.[_0x43f5e4(0x21d)]||_0x53676d[_0x43f5e4(0x208)]?.[_0x43f5e4(0x219)]){const {initDomains:_0x480249}=await import('./constant/domain.js');_0x480249({'apiDomain':_0x53676d[_0x43f5e4(0x208)][_0x43f5e4(0x20e)]||undefined,'userDomain':_0x53676d[_0x43f5e4(0x208)][_0x43f5e4(0x21d)]||undefined,'runtimeDomain':_0x53676d[_0x43f5e4(0x208)]['runtimeDomain']||undefined});}if(!_0x19a1e2){if(_0x18b54d['help']){printServiceHelp(_0x42249a);return;}if(_0x2d3685[_0x43f5e4(0x217)])_0x19a1e2=_0x2d3685[_0x43f5e4(0x217)];else{if(_0x2d3685[_0x43f5e4(0x202)]){await dispatchDeclarative(_0x2d3685[_0x43f5e4(0x202)],_0x42249a,'',[],_0x18b54d,_0x53676d);return;}else{printServiceHelp(_0x42249a);return;}}}const _0x1b4af7=resolveDeprecatedSubcommand(_0x42249a,_0x19a1e2);if(_0x1b4af7){const _0x161c93=CLI_BIN_NAME+'\x20'+_0x42249a+'\x20'+_0x19a1e2,_0x4a23e8=CLI_BIN_NAME+'\x20'+_0x42249a+'\x20'+_0x1b4af7;console['error']('⚠\x20`'+_0x161c93+_0x43f5e4(0x20d)+_0x4a23e8+'`;\x20prefer\x20`'+_0x4a23e8+_0x43f5e4(0x216)),_0x19a1e2=_0x1b4af7;}if(_0x18b54d[_0x43f5e4(0x209)]&&!findDefinition(_0x42249a,_0x19a1e2)){printServiceHelp(_0x42249a);return;}{let _0x4ff38e=findDefinition(_0x42249a,_0x19a1e2),_0x405084=cli['input']['slice'](0x2);if(!_0x4ff38e){if(_0x2d3685[_0x43f5e4(0x202)]){if(_0x18b54d[_0x43f5e4(0x209)]){console[_0x43f5e4(0x1f6)](generateCommandHelp(_0x2d3685[_0x43f5e4(0x202)]));return;}_0x4ff38e=_0x2d3685['wildcardDef'],_0x405084=[_0x19a1e2,...cli[_0x43f5e4(0x20b)][_0x43f5e4(0x1f7)](0x2)];}else{printServiceHelp(_0x42249a),await handleErrorAsync(CliErrors[_0x43f5e4(0x1fd)](_0x42249a+'\x20'+_0x19a1e2));return;}}if(_0x18b54d['help']){console[_0x43f5e4(0x1f6)](generateCommandHelp(_0x4ff38e));return;}await dispatchDeclarative(_0x4ff38e,_0x42249a,_0x19a1e2,_0x405084,_0x18b54d,_0x53676d);}}async function dispatchDeclarative(_0x100254,_0x48c947,_0x46d129,_0x3a2efd,_0x1730bf,_0xfa3276){const _0x2182ce=a12_0x1a1d05,_0x4bb9cb=Date[_0x2182ce(0x1f5)]();let _0x3187b1;try{await runCommand(_0x100254,createPipelineEnv(_0xfa3276,_0x1730bf,_0x3a2efd));}catch(_0x493482){_0x3187b1=_0x493482;}await reportCommandTrace({'service':_0x48c947,'command':_0x46d129,'flags':_0x1730bf,'durationMs':Date['now']()-_0x4bb9cb,'error':_0x3187b1});if(_0x3187b1)await handleErrorAsync(_0x3187b1);}function printServiceHelp(_0x4c0e68){const _0x13d7ec=a12_0x1a1d05;console[_0x13d7ec(0x1f6)](generateServiceHelp(_0x4c0e68));}async function handleErrorAsync(_0x14199e){const _0x343693=a12_0x1a1d05;if(_0x14199e instanceof Error&&_0x14199e['name']===_0x343693(0x21a))return process[_0x343693(0x204)]['write']('\x0aCancelled.\x0a'),await exitWithOtelShutdown(0x0);if(_0x14199e instanceof CliError){if(_0x14199e[_0x343693(0x205)]===_0x343693(0x213))return process[_0x343693(0x204)][_0x343693(0x21b)]('\x0a'+_0x14199e[_0x343693(0x1f9)]+'\x0a'),await exitWithOtelShutdown(0x0);console[_0x343693(0x214)]('Error:\x20'+_0x14199e[_0x343693(0x1f9)]);if(_0x14199e[_0x343693(0x1f4)])console[_0x343693(0x214)](_0x343693(0x211)+_0x14199e[_0x343693(0x1f4)]);return await exitWithOtelShutdown(_0x14199e[_0x343693(0x222)]);}return console[_0x343693(0x214)](_0x343693(0x203),_0x14199e),await exitWithOtelShutdown(0x1);}function a12_0x1567(){const _0x51715b=['message','3VVLGGU','2266028ZBQnSA','6335032ntrben','unknownCommand','unknown','⚠\x20`','./constant/env.js','./context.js','wildcardDef','Unexpected\x20error:','stderr','code','command','836586ZXNKBX','raw','help','`\x20has\x20been\x20moved\x20to\x20`','input','6452915FzDEtV','`\x20is\x20an\x20alias\x20of\x20`','apiDomain','dynamicCliFlags','403438oFisFq','Hint:\x20','service','cancelled','error','\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a','`\x20in\x20new\x20scripts.\x0a','defaultCommand','unknown_service','runtimeDomain','ExitPromptError','write','global','userDomain','`\x20in\x20v2.0.\x0a','string','env','3906963WKGPeY','exitCode','6JvKnvu','./cli-flags.js','hint','now','log','slice','2547700JlwNZu'];a12_0x1567=function(){return _0x51715b;};return a12_0x1567();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a13_0x57b4c5=a13_0x1110;(function(_0x3752c1,_0x4dae0a){const _0x1136b5=a13_0x1110,_0xe7872d=_0x3752c1();while(!![]){try{const _0x51f840=parseInt(_0x1136b5(0x1c1))/0x1+parseInt(_0x1136b5(0x1f2))/0x2+parseInt(_0x1136b5(0x1c6))/0x3+parseInt(_0x1136b5(0x1d1))/0x4*(parseInt(_0x1136b5(0x1d8))/0x5)+parseInt(_0x1136b5(0x1cb))/0x6+parseInt(_0x1136b5(0x1cd))/0x7+parseInt(_0x1136b5(0x1e6))/0x8*(-parseInt(_0x1136b5(0x1ca))/0x9);if(_0x51f840===_0x4dae0a)break;else _0xe7872d['push'](_0xe7872d['shift']());}catch(_0x2c8f3b){_0xe7872d['push'](_0xe7872d['shift']());}}}(a13_0x5182,0x2576b));import a13_0x2fbb51 from'ora';import{fetchModelList}from'../../api/fetch-model-list.js';function a13_0x1110(_0x10168a,_0x4b5ec7){_0x10168a=_0x10168a-0x1b7;const _0x5182a4=a13_0x5182();let _0x1110a5=_0x5182a4[_0x10168a];return _0x1110a5;}import{generateDatasetDocs}from'../../api/api-doc.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a13_0x5182(){const _0x59d11e=['\x20failed','\x20dataset(s)','...','444441NTkRlP','padStart','.md','some','1611SUUfGx','1756980qYypsR','stdout','1033970EKAeWH','\x20file(s)','fail','\x20doc(s)\x20in\x20','805084ZShSfE','start','\x20\x20•\x20','has','\x1b[90m*\x20Filtered\x20','datasetcode','write','5Ltciue','success','appCode','map','datasetCode','succeed','cookie','parse','--datasetcode\x20cannot\x20be\x20empty.','Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','Fetching\x20dataset\x20list\x20for\x20','\x0d\x20\x20[','output','params','50272YMEkgV','message','string','./docs','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','object','filter','length','\x1b[0m','\x20dataset(s)\x1b[0m','Invalid\x20--params:\x20','trim','547028XAaNuP','):\x20','\x20of\x20','Output\x20directory\x20(default:\x20./docs)','validation','str','must\x20be\x20a\x20JSON\x20object','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','\x1b[90m*\x20Generating\x20docs\x20for:\x20','join','Doc\x20generation\x20complete:\x20','214815SpVteV','!\x20No\x20datasets\x20found.'];a13_0x5182=function(){return _0x59d11e;};return a13_0x5182();}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export const apiGenerate={'service':'api','command':'generate','description':a13_0x57b4c5(0x1e1),'risk':'write','requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a13_0x57b4c5(0x1e4),'type':a13_0x57b4c5(0x1e8),'description':a13_0x57b4c5(0x1b9)},{'name':a13_0x57b4c5(0x1d6),'type':'string','description':'Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for'},{'name':a13_0x57b4c5(0x1e5),'type':a13_0x57b4c5(0x1e8),'description':a13_0x57b4c5(0x1bd)}],async 'execute'(_0x46fcbb){const _0x22b892=a13_0x57b4c5,_0x2f2d00=_0x46fcbb[_0x22b892(0x1bb)](_0x22b892(0x1e4))||_0x22b892(0x1e9),_0x27d363=_0x46fcbb['str'](_0x22b892(0x1d6)),_0x14a581=_0x46fcbb[_0x22b892(0x1bb)]('params');let _0x1ea1b0;if(_0x14a581)try{_0x1ea1b0=JSON[_0x22b892(0x1df)](_0x14a581);if(typeof _0x1ea1b0!==_0x22b892(0x1eb)||_0x1ea1b0===null||Array['isArray'](_0x1ea1b0))throw new Error(_0x22b892(0x1bc));}catch(_0x51ee44){throw CliErrors['validation'](_0x22b892(0x1f0)+(_0x51ee44 instanceof Error?_0x51ee44[_0x22b892(0x1e7)]:String(_0x51ee44)),'Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27');}let _0x539b8e;if(_0x27d363){const _0x230bc6=_0x27d363['split'](',')[_0x22b892(0x1db)](_0x5352d2=>_0x5352d2[_0x22b892(0x1f1)]())[_0x22b892(0x1ec)](_0x4b8df5=>_0x4b8df5[_0x22b892(0x1ed)]>0x0);if(_0x230bc6[_0x22b892(0x1ed)]===0x0)throw CliErrors[_0x22b892(0x1ba)](_0x22b892(0x1e0));_0x539b8e=new Set(_0x230bc6),writeCliSideChannelLine(_0x22b892(0x1be)+_0x230bc6['join'](',\x20')+'\x1b[0m');}const _0x5de9a1=a13_0x2fbb51(_0x22b892(0x1e2)+_0x46fcbb[_0x22b892(0x1da)]+_0x22b892(0x1c5))[_0x22b892(0x1d2)]();let _0x3694fa;try{({configArray:_0x3694fa}=await fetchModelList(_0x46fcbb['appCode'],_0x46fcbb['cookie']),_0x5de9a1[_0x22b892(0x1dd)]('Fetched\x20'+_0x3694fa[_0x22b892(0x1ed)]+_0x22b892(0x1c4)));}catch(_0x387489){_0x5de9a1[_0x22b892(0x1cf)]('Failed\x20to\x20fetch\x20datasets');throw _0x387489;}if(_0x3694fa[_0x22b892(0x1ed)]===0x0)return writeCliSideChannelLine(_0x22b892(0x1c2)),{'ok':!![]};let _0x42b37b=_0x3694fa;if(_0x539b8e){_0x42b37b=_0x3694fa['filter'](_0x3d818d=>_0x539b8e[_0x22b892(0x1d4)](_0x3d818d[_0x22b892(0x1dc)]));const _0x34268e=[..._0x539b8e]['filter'](_0x401a86=>!_0x3694fa[_0x22b892(0x1c9)](_0x4d4e03=>_0x4d4e03[_0x22b892(0x1dc)]===_0x401a86));_0x34268e[_0x22b892(0x1ed)]>0x0&&writeCliSideChannelLine(_0x22b892(0x1ea)+_0x34268e[_0x22b892(0x1bf)](',\x20')+_0x22b892(0x1ee));if(_0x42b37b['length']===0x0)throw CliErrors['validation']('None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20'+[..._0x539b8e][_0x22b892(0x1bf)](',\x20'));writeCliSideChannelLine(_0x22b892(0x1d5)+_0x42b37b[_0x22b892(0x1ed)]+_0x22b892(0x1b8)+_0x3694fa[_0x22b892(0x1ed)]+_0x22b892(0x1ef));}let _0x134833=0x0;const _0x38dc0f=await generateDatasetDocs(_0x42b37b,_0x46fcbb[_0x22b892(0x1da)],_0x46fcbb[_0x22b892(0x1de)],_0x2f2d00,(_0xd05435,_0x3ad843,_0x273c66)=>{const _0x255cb7=_0x22b892;_0x134833=_0xd05435,process['stdout'][_0x255cb7(0x1d7)](_0x255cb7(0x1e3)+String(_0xd05435)[_0x255cb7(0x1c7)](String(_0x3ad843)[_0x255cb7(0x1ed)])+'/'+_0x3ad843+']\x20'+_0x273c66+_0x255cb7(0x1c8));},_0x1ea1b0);if(_0x134833>0x0)process[_0x22b892(0x1cc)][_0x22b892(0x1d7)]('\x0a');const _0x34c304=_0x38dc0f[_0x22b892(0x1ec)](_0x1ce030=>_0x1ce030['success'])[_0x22b892(0x1ed)],_0x3c72af=_0x38dc0f[_0x22b892(0x1ec)](_0x3ba1cc=>!_0x3ba1cc[_0x22b892(0x1d9)])[_0x22b892(0x1ed)];writeCliSideChannelLine(''),writeCliSideChannelLine('✓\x20Generated\x20'+_0x34c304+_0x22b892(0x1d0)+_0x2f2d00);if(_0x3c72af>0x0){writeCliSideChannelLine('!\x20'+_0x3c72af+'\x20doc(s)\x20failed');for(const _0x4277a7 of _0x38dc0f[_0x22b892(0x1ec)](_0x45a982=>!_0x45a982[_0x22b892(0x1d9)])){writeCliSideChannelLine(_0x22b892(0x1d3)+_0x4277a7['datasetName']+'\x20('+_0x4277a7[_0x22b892(0x1dc)]+_0x22b892(0x1b7)+_0x4277a7['error']);}}return{'ok':_0x3c72af===0x0,'message':_0x3c72af>0x0?'Doc\x20generation:\x20'+_0x34c304+'\x20succeeded,\x20'+_0x3c72af+_0x22b892(0x1c3):_0x22b892(0x1c0)+_0x34c304+_0x22b892(0x1ce)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d27c5,_0x36d622){const _0x34dd9f=a14_0x572a,_0x44af08=_0x3d27c5();while(!![]){try{const _0x556f22=-parseInt(_0x34dd9f(0x159))/0x1+-parseInt(_0x34dd9f(0x161))/0x2*(parseInt(_0x34dd9f(0x158))/0x3)+-parseInt(_0x34dd9f(0x15e))/0x4*(parseInt(_0x34dd9f(0x15b))/0x5)+parseInt(_0x34dd9f(0x15c))/0x6+-parseInt(_0x34dd9f(0x160))/0x7*(-parseInt(_0x34dd9f(0x15f))/0x8)+-parseInt(_0x34dd9f(0x15a))/0x9+parseInt(_0x34dd9f(0x15d))/0xa;if(_0x556f22===_0x36d622)break;else _0x44af08['push'](_0x44af08['shift']());}catch(_0x2a68c4){_0x44af08['push'](_0x44af08['shift']());}}}(a14_0x54dc,0xe1dbd));import{apiList}from'../../commands/api/list.js';import{apiPull}from'../../commands/api/pull.js';import{apiGenerate}from'../../commands/api/generate.js';function a14_0x572a(_0x3ce6ae,_0x5bc77b){_0x3ce6ae=_0x3ce6ae-0x158;const _0x54dc57=a14_0x54dc();let _0x572a74=_0x54dc57[_0x3ce6ae];return _0x572a74;}export const apiDefinitions=[apiList,apiPull,apiGenerate];function a14_0x54dc(){const _0x2f9696=['4IqcuwT','4029736frfuob','21PRupoE','3722COxgQw','1959jNkfnl','947214QQfsnC','6098445cidzyv','4242115JHcNqG','9065922QucUNE','15914540IPhKsF'];a14_0x54dc=function(){return _0x2f9696;};return a14_0x54dc();}
|
package/lib/commands/api/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x316a97=a15_0x54ea;function a15_0x54ea(_0x5538f3,_0x387d2b){_0x5538f3=_0x5538f3-0x169;const _0x18c76c=a15_0x18c7();let _0x54ea6d=_0x18c76c[_0x5538f3];return _0x54ea6d;}function a15_0x18c7(){const _0x394166=['cookie','11770050uQpqPb','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','26736McbGsk','rawFlags','boolean','production','list','6CRoxdX','1885768dHDLZy','appcode','map','api','name','appCode','618923xMGVUQ','112006ExfJlB','global','6ESvZCz','List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','3177GFIqFl','7124229gMkSMg','env','read','2331475TcdamR'];a15_0x18c7=function(){return _0x394166;};return a15_0x18c7();}(function(_0xbd14f3,_0x40dc02){const _0x3ee0fc=a15_0x54ea,_0x412101=_0xbd14f3();while(!![]){try{const _0x4d080a=parseInt(_0x3ee0fc(0x17f))/0x1+-parseInt(_0x3ee0fc(0x180))/0x2*(-parseInt(_0x3ee0fc(0x178))/0x3)+parseInt(_0x3ee0fc(0x179))/0x4+parseInt(_0x3ee0fc(0x16f))/0x5+-parseInt(_0x3ee0fc(0x169))/0x6*(parseInt(_0x3ee0fc(0x16c))/0x7)+-parseInt(_0x3ee0fc(0x173))/0x8*(parseInt(_0x3ee0fc(0x16b))/0x9)+parseInt(_0x3ee0fc(0x171))/0xa;if(_0x4d080a===_0x40dc02)break;else _0x412101['push'](_0x412101['shift']());}catch(_0x751ad3){_0x412101['push'](_0x412101['shift']());}}}(a15_0x18c7,0x9e406));import{initEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveTargetApps}from'../../commands/api/shared.js';export const apiList={'service':a15_0x316a97(0x17c),'command':a15_0x316a97(0x177),'description':a15_0x316a97(0x16a),'risk':a15_0x316a97(0x16e),'requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0x316a97(0x181),'type':a15_0x316a97(0x175),'description':a15_0x316a97(0x172),'default':![]}],async 'execute'(_0x1cd44b){const _0x2ed325=a15_0x316a97,_0x12c41b=_0x1cd44b[_0x2ed325(0x174)][_0x2ed325(0x17a)]?String(_0x1cd44b[_0x2ed325(0x174)][_0x2ed325(0x17a)]):undefined,_0x5a4fc5=resolveTargetApps(_0x1cd44b,_0x12c41b);if(_0x5a4fc5){const _0x39edf1=[];for(const _0x2a6e1e of _0x5a4fc5){const _0x4bee9c=_0x2a6e1e[_0x2ed325(0x170)]||_0x1cd44b[_0x2ed325(0x170)],_0x20bbea=_0x2a6e1e[_0x2ed325(0x16d)]||_0x2ed325(0x176);initEnv(_0x20bbea);const {configArray:_0x425765}=await fetchModelList(_0x2a6e1e[_0x2ed325(0x17a)],_0x4bee9c);_0x39edf1['push'](..._0x425765[_0x2ed325(0x17b)](_0x2daba9=>({..._0x2daba9,'_appName':_0x2a6e1e[_0x2ed325(0x17d)],'_appCode':_0x2a6e1e[_0x2ed325(0x17a)],'_env':_0x20bbea,'_isDefault':_0x2a6e1e['isDefault']})));}return{'ok':!![],'data':_0x39edf1};}const {configArray:_0x671666}=await fetchModelList(_0x1cd44b[_0x2ed325(0x17e)],_0x1cd44b[_0x2ed325(0x170)]);return{'ok':!![],'data':_0x671666};}};
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a16_0x5e00(_0x4a965f,_0x2f8467){_0x4a965f=_0x4a965f-0x14f;const _0x559f01=a16_0x559f();let _0x5e00c0=_0x559f01[_0x4a965f];return _0x5e00c0;}const a16_0x8fab14=a16_0x5e00;(function(_0x281f47,_0x617a6f){const _0x1795c0=a16_0x5e00,_0xa278a2=_0x281f47();while(!![]){try{const _0x314a38=parseInt(_0x1795c0(0x16a))/0x1+-parseInt(_0x1795c0(0x157))/0x2*(-parseInt(_0x1795c0(0x171))/0x3)+parseInt(_0x1795c0(0x17d))/0x4*(-parseInt(_0x1795c0(0x167))/0x5)+-parseInt(_0x1795c0(0x154))/0x6+parseInt(_0x1795c0(0x152))/0x7+-parseInt(_0x1795c0(0x164))/0x8+parseInt(_0x1795c0(0x15e))/0x9;if(_0x314a38===_0x617a6f)break;else _0xa278a2['push'](_0xa278a2['shift']());}catch(_0xc24c3a){_0xa278a2['push'](_0xa278a2['shift']());}}}(a16_0x559f,0xbb386));import a16_0x489af4 from'ora';import a16_0x4bb829 from'node:path';function a16_0x559f(){const _0x4ca94f=['Pulling\x20API\x20config\x20for\x20','\x20dataset(s)\x20→\x20','boolean','Output\x20directory\x20(default:\x20','7982037MZFpzA','\x20failed','8203056dRCsYi','appCode','...','2657386cvFbLY','modelCount','slice','join','cookie','global','Failed:\x20','9148464lqqzEC','\x20model(s)','output','isDefault','client','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','9851008kwWgud','-api','api','1006840zFgeRe','\x20\x20•\x20','Done:\x20','1289502XrOLyn','-client','appcode','production','Pulled\x20','name','.ts','3oJMcIA','message','split','\x20succeeded,\x20','apiFilePath','\x20app(s)\x20failed','env','fail','start','apiDir','str','write','28OoZELE','\x20dataset(s),\x20generated\x20','length'];a16_0x559f=function(){return _0x4ca94f;};return a16_0x559f();}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_0x8fab14(0x166),'command':'pull','description':'Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20('+DEFAULT_API_DIR+'/)','risk':a16_0x8fab14(0x17c),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a16_0x8fab14(0x160),'type':'string','description':a16_0x8fab14(0x151)+DEFAULT_API_DIR+'/)'},{'name':a16_0x8fab14(0x15c),'type':a16_0x8fab14(0x150),'description':a16_0x8fab14(0x163),'default':![]}],async 'execute'(_0x1762fe){const _0x5c0081=a16_0x8fab14,_0x543f85=_0x1762fe['rawFlags'][_0x5c0081(0x16c)]?String(_0x1762fe['rawFlags'][_0x5c0081(0x16c)]):undefined,_0x3d8251=_0x1762fe[_0x5c0081(0x17b)](_0x5c0081(0x160))||undefined,_0x2d6c57=resolveTargetApps(_0x1762fe,_0x543f85);if(_0x2d6c57){let _0x2c195a=0x0,_0x480caa=0x0;for(const _0x486925 of _0x2d6c57){const _0x4cb9e4=_0x486925[_0x5c0081(0x15b)]||_0x1762fe[_0x5c0081(0x15b)],_0x328595=_0x486925[_0x5c0081(0x177)]||_0x5c0081(0x16d);initEnv(_0x328595);const _0x399791=_0x486925[_0x5c0081(0x17a)]||_0x3d8251||_0x1762fe[_0x5c0081(0x17a)]||DEFAULT_API_DIR,_0x480c36=_0x486925[_0x5c0081(0x161)]?'':_0x486925['name']||_0x486925[_0x5c0081(0x16c)],_0x45a159=a16_0x489af4('Pulling\x20'+_0x486925[_0x5c0081(0x16f)]+'\x20('+_0x486925['appcode']+')...')[_0x5c0081(0x179)]();try{const {configArray:_0xbb883e}=await fetchModelList(_0x486925[_0x5c0081(0x16c)],_0x4cb9e4),_0x380b49=await generateApiFile(_0xbb883e,_0x480c36,_0x486925[_0x5c0081(0x16c)],_0x486925['isDefault'],_0x328595,_0x399791,_0x486925['name']);_0x45a159['succeed'](_0x486925[_0x5c0081(0x16f)]+':\x20'+_0xbb883e[_0x5c0081(0x17f)]+_0x5c0081(0x14f)+_0x380b49[_0x5c0081(0x158)]+_0x5c0081(0x15f)),writeCliSideChannelLine('\x20\x20•\x20'+_0x380b49[_0x5c0081(0x175)]),writeCliSideChannelLine('\x20\x20•\x20'+_0x380b49['clientFilePath']),_0x2c195a++;}catch(_0x3a745e){_0x45a159[_0x5c0081(0x178)](_0x486925[_0x5c0081(0x16f)]+':\x20'+(_0x3a745e instanceof Error?_0x3a745e[_0x5c0081(0x172)]:String(_0x3a745e))),_0x480caa++;}}writeCliSideChannelLine('');if(_0x480caa>0x0)writeCliSideChannelLine('!\x20'+_0x480caa+_0x5c0081(0x176));return{'ok':_0x480caa===0x0,'message':_0x5c0081(0x169)+_0x2c195a+_0x5c0081(0x174)+_0x480caa+_0x5c0081(0x153)};}const _0xbda969=_0x543f85&&_0x543f85['includes']('-')?_0x543f85[_0x5c0081(0x173)]('-')[_0x5c0081(0x159)](0x1)[_0x5c0081(0x15a)]('-'):'',_0x22dd1a=_0x3d8251||_0x1762fe[_0x5c0081(0x17a)]||DEFAULT_API_DIR,_0x247974=!_0x543f85,_0x388b74=a16_0x489af4(_0x5c0081(0x180)+_0x1762fe[_0x5c0081(0x155)]+_0x5c0081(0x156))[_0x5c0081(0x179)]();try{const {configArray:_0x4d74f8}=await fetchModelList(_0x1762fe['appCode'],_0x1762fe[_0x5c0081(0x15b)]),_0x5465bb=await generateApiFile(_0x4d74f8,_0xbda969,_0x1762fe[_0x5c0081(0x155)],_0x247974,getEnv(),_0x22dd1a);_0x388b74['succeed'](_0x5c0081(0x16e)+_0x4d74f8[_0x5c0081(0x17f)]+_0x5c0081(0x17e)+_0x5465bb['modelCount']+_0x5c0081(0x15f));const _0x41febc=_0xbda969?_0xbda969+_0x5c0081(0x165):_0x5c0081(0x166),_0x1388ec=_0xbda969?_0xbda969+_0x5c0081(0x16b):_0x5c0081(0x162);return writeCliSideChannelLine(_0x5c0081(0x168)+a16_0x4bb829[_0x5c0081(0x15a)](_0x22dd1a,_0x41febc+_0x5c0081(0x170))),writeCliSideChannelLine(_0x5c0081(0x168)+a16_0x4bb829[_0x5c0081(0x15a)](_0x22dd1a,_0x1388ec+_0x5c0081(0x170))),{'ok':!![],'data':{'datasetCount':_0x4d74f8[_0x5c0081(0x17f)],'modelCount':_0x5465bb[_0x5c0081(0x158)]}};}catch(_0x506f58){_0x388b74[_0x5c0081(0x178)](_0x5c0081(0x15d)+(_0x506f58 instanceof Error?_0x506f58[_0x5c0081(0x172)]:String(_0x506f58)));throw _0x506f58;}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x497c65,_0x12aab2){const _0x7753e4=a17_0x1a2f,_0x214cb9=_0x497c65();while(!![]){try{const _0x7e787e=-parseInt(_0x7753e4(0x16e))/0x1*(parseInt(_0x7753e4(0x16b))/0x2)+-parseInt(_0x7753e4(0x16c))/0x3+-parseInt(_0x7753e4(0x16a))/0x4*(parseInt(_0x7753e4(0x16f))/0x5)+parseInt(_0x7753e4(0x175))/0x6*(-parseInt(_0x7753e4(0x163))/0x7)+parseInt(_0x7753e4(0x166))/0x8*(parseInt(_0x7753e4(0x162))/0x9)+parseInt(_0x7753e4(0x170))/0xa+parseInt(_0x7753e4(0x176))/0xb*(parseInt(_0x7753e4(0x171))/0xc);if(_0x7e787e===_0x12aab2)break;else _0x214cb9['push'](_0x214cb9['shift']());}catch(_0x13e66a){_0x214cb9['push'](_0x214cb9['shift']());}}}(a17_0x2e05,0xde6e7));function a17_0x1a2f(_0x339811,_0x433da4){_0x339811=_0x339811-0x162;const _0x2e056d=a17_0x2e05();let _0x1a2f28=_0x2e056d[_0x339811];return _0x1a2f28;}import{getMultiAppConfigs}from'../../utils/config.js';function a17_0x2e05(){const _0x4a08c5=['9486pFtbUO','22106YDqKmd','merged','name','8416SEvuCe','selectedAppName','validation','global','7676hXxcsX','4mfiWvY','3628023xOHWFf','join','871881fRqwIY','3135IdsOoZ','7199240IoWwqZ','13836MeSilN','length','filter','map','2388bySaxd','42889TasEqK'];a17_0x2e05=function(){return _0x4a08c5;};return a17_0x2e05();}import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x774baf,_0x4dead0){const _0xe96c20=a17_0x1a2f;if(_0x4dead0)return null;const _0x5d05bd=_0x774baf['bool'](_0xe96c20(0x169))?_0xe96c20(0x164):'project';let _0x37d96a=getMultiAppConfigs(_0x5d05bd);if(!_0x37d96a||_0x37d96a[_0xe96c20(0x172)]===0x0)return null;if(_0x774baf[_0xe96c20(0x167)]){const _0x5edd2a=_0x37d96a[_0xe96c20(0x173)](_0x43ade5=>_0x43ade5[_0xe96c20(0x165)]===_0x774baf[_0xe96c20(0x167)]);if(_0x5edd2a[_0xe96c20(0x172)]===0x0){const _0xe5e216=_0x37d96a[_0xe96c20(0x174)](_0x4e628d=>_0x4e628d[_0xe96c20(0x165)])[_0xe96c20(0x16d)](',\x20');throw CliErrors[_0xe96c20(0x168)]('App\x20\x22'+_0x774baf['selectedAppName']+'\x22\x20not\x20found\x20in\x20config.\x20Available:\x20'+_0xe5e216);}_0x37d96a=_0x5edd2a;}return _0x37d96a;}
|
package/lib/commands/app/add.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a18_0x39187d=a18_0x4174;function a18_0x4174(_0x35a672,_0x4a5a52){_0x35a672=_0x35a672-0x116;const _0xd36bf9=a18_0xd36b();let _0x417496=_0xd36bf9[_0x35a672];return _0x417496;}(function(_0x386fc7,_0xb5a3c3){const _0x55923d=a18_0x4174,_0x5e06fe=_0x386fc7();while(!![]){try{const _0x39ec80=parseInt(_0x55923d(0x119))/0x1+parseInt(_0x55923d(0x13b))/0x2*(-parseInt(_0x55923d(0x129))/0x3)+-parseInt(_0x55923d(0x139))/0x4*(parseInt(_0x55923d(0x124))/0x5)+-parseInt(_0x55923d(0x121))/0x6*(parseInt(_0x55923d(0x13a))/0x7)+parseInt(_0x55923d(0x132))/0x8*(parseInt(_0x55923d(0x116))/0x9)+parseInt(_0x55923d(0x120))/0xa*(-parseInt(_0x55923d(0x127))/0xb)+parseInt(_0x55923d(0x11c))/0xc;if(_0x39ec80===_0xb5a3c3)break;else _0x5e06fe['push'](_0x5e06fe['shift']());}catch(_0x4296e5){_0x5e06fe['push'](_0x5e06fe['shift']());}}}(a18_0xd36b,0x9ef57));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(_0x532231){const _0x344a28=a18_0x4174,_0x1e5349=_0x532231[_0x344a28(0x131)][0x0]?.[_0x344a28(0x11b)]();if(!_0x1e5349)throw CliErrors['validation']('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+_0x344a28(0x11e));}function a18_0xd36b(){const _0x502df4=['\x20app\x20\x22','trim','14960508jDrCdq','global','\x20app\x20add\x20<name>\x20--appcode\x20<code>','add','90sOzSND','937050BblyZp','Added','flagMissing','7365oaNVBS','appcode','Missing\x20app\x20name.','1361426aFwKXm','apps','12783iPqZnN','bool','Updated','\x20Set\x20as\x20default\x20app.','\x22\x20(appcode:\x20','str','App\x20code','boolean','args','48zeAZaM','write','defaultApp','string','name','App\x20profile\x20name','Add\x20or\x20update\x20an\x20app\x20in\x20config','1264MUinwx','35EJwQXH','6zHGJbX','1485189mhmpki','Usage:\x20','validation','787280EfEIoj'];a18_0xd36b=function(){return _0x502df4;};return a18_0xd36b();}async function execute(_0x255a7f){const _0x3f0879=a18_0x4174,_0x41f7d4=_0x255a7f[_0x3f0879(0x131)][0x0]?.[_0x3f0879(0x11b)]();if(!_0x41f7d4)throw CliErrors[_0x3f0879(0x118)](_0x3f0879(0x126),_0x3f0879(0x117)+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20<code>');const _0x35a0ec=_0x255a7f[_0x3f0879(0x12e)](_0x3f0879(0x125));if(!_0x35a0ec)throw CliErrors[_0x3f0879(0x123)]('appcode',_0x3f0879(0x117)+CLI_BIN_NAME+_0x3f0879(0x11e));const _0x32e118={'global':_0x255a7f[_0x3f0879(0x12a)]('global')},_0x596234=readConfig(_0x32e118);if(!_0x596234[_0x3f0879(0x128)])_0x596234['apps']={};const _0xbb8919={'appcode':_0x35a0ec,...collectAppProfileOverrides(_0x3f9dc7=>_0x255a7f['str'](_0x3f9dc7))},_0x4b0d7d=_0x596234[_0x3f0879(0x128)],_0x4e3a48=!!_0x4b0d7d[_0x41f7d4];_0x4b0d7d[_0x41f7d4]=_0xbb8919;if(!_0x596234[_0x3f0879(0x134)])_0x596234[_0x3f0879(0x134)]=_0x41f7d4;writeConfig(_0x596234,_0x32e118);const _0x148c36=!_0x4e3a48&&_0x596234['defaultApp']===_0x41f7d4?_0x3f0879(0x12c):'',_0x49f99c=(_0x4e3a48?_0x3f0879(0x12b):_0x3f0879(0x122))+_0x3f0879(0x11a)+_0x41f7d4+_0x3f0879(0x12d)+_0x35a0ec+')'+scopeLabel(_0x32e118)+'.'+_0x148c36;return{'ok':!![],'message':_0x49f99c};}export const appAddDefinition={'service':'app','command':a18_0x39187d(0x11f),'description':a18_0x39187d(0x138),'risk':a18_0x39187d(0x133),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a18_0x39187d(0x136),'description':a18_0x39187d(0x137),'required':!![]}],'flags':[{'name':'appcode','type':a18_0x39187d(0x135),'description':a18_0x39187d(0x12f),'required':!![]},{'name':a18_0x39187d(0x11d),'type':a18_0x39187d(0x130),'description':'Use\x20global\x20config\x20scope','default':![]},...getAppProfileFlagDefs()],'validate':validateArgs,'execute':execute};
|