@lovrabet/rabetbase-cli 2.1.7-beta.4 → 2.1.7-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -1
- package/lib/commands/dataset/link-delete.js +1 -1
- package/lib/commands/dataset/link-shared.js +1 -1
- package/lib/commands/dataset/link-update.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x4db2e9=a0_0x5490;(function(_0xbb73ca,_0x2d03d3){const _0x1c0676=a0_0x5490,_0x480780=_0xbb73ca();while(!![]){try{const _0x56ea91=parseInt(_0x1c0676(0x1b9))/0x1+parseInt(_0x1c0676(0x1b8))/0x2+-parseInt(_0x1c0676(0x1a9))/0x3*(-parseInt(_0x1c0676(0x1a7))/0x4)+parseInt(_0x1c0676(0x1b1))/0x5*(parseInt(_0x1c0676(0x199))/0x6)+parseInt(_0x1c0676(0x19c))/0x7*(parseInt(_0x1c0676(0x19e))/0x8)+-parseInt(_0x1c0676(0x1a4))/0x9*(-parseInt(_0x1c0676(0x1b3))/0xa)+-parseInt(_0x1c0676(0x198))/0xb;if(_0x56ea91===_0x2d03d3)break;else _0x480780['push'](_0x480780['shift']());}catch(_0x39a0c7){_0x480780['push'](_0x480780['shift']());}}}(a0_0x3d6a,0xef25d));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x488dbd from'node:path';import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';function a0_0x3d6a(){const _0x9236c5=['6625089fSeJfi','datasetCode','.md','4gkCYqx','message','5700483nPBaYy','✗\x20Failed:\x20','生成文档失败:\x20','name','✓\x20Generated:\x20','Waiting\x203\x20seconds...\x0a','):\x20missing\x20data.markdown\x20field','success','17360UluKtT','length','10AujxpS','.md\x20(','error','tableName','log','53354wfyeBc','1628285yzvWrc','push','markdown','/api/node-toolbox/api-doc-generator','59478375AhCtGV','3252VWvWmK','生成文档成功:\x20','utf8','63QFwgDo','POST','189872MQMVmY','api-doc','.md\x20-\x20','./docs','Invalid\x20response\x20format\x20(','\x20datasets\x20to\x20generate\x20docs\x20for\x0a'];a0_0x3d6a=function(){return _0x9236c5;};return a0_0x3d6a();}import{platformFetch}from'../core/api-client.js';export async function fetchDatasetDoc(_0x41deca){const _0x111b7a=a0_0x5490,{appCode:_0x489928,cookie:_0xa20385,datasetCode:_0x2d6e10,datasetId:_0x8577a0,extraParams:_0x32dd5a}=_0x41deca,_0x15c904=getApiDomain()+_0x111b7a(0x197),_0xc4c7ad=await platformFetch(_0x15c904,{'method':_0x111b7a(0x19d),'body':{'appCode':_0x489928,'datasetCode':_0x2d6e10,'datasetId':_0x8577a0,..._0x32dd5a||{}},'cookie':_0xa20385,'label':'Fetch\x20doc\x20('+_0x2d6e10+')'});if(!_0xc4c7ad||typeof _0xc4c7ad[_0x111b7a(0x196)]!=='string')throw new Error(_0x111b7a(0x1a2)+_0x2d6e10+_0x111b7a(0x1af));return _0xc4c7ad[_0x111b7a(0x196)];}function delay(_0x2b5b95){return new Promise(_0x9ad611=>setTimeout(_0x9ad611,_0x2b5b95));}function a0_0x5490(_0x1ef34e,_0x16b649){_0x1ef34e=_0x1ef34e-0x196;const _0x3d6a9c=a0_0x3d6a();let _0x549034=_0x3d6a9c[_0x1ef34e];return _0x549034;}export async function generateDatasetDocs(_0x4dee0f,_0x9f83f0,_0x4b61d5,_0x27e81d=a0_0x4db2e9(0x1a1),_0x25ddbe,_0x581cd4){const _0x1360e3=a0_0x4db2e9;mkdirSync(_0x27e81d,{'recursive':!![]});const _0x502871=[],_0x858f57=_0x4dee0f[_0x1360e3(0x1b2)];console['log']('\x0a'+_0x858f57+_0x1360e3(0x1a3));for(let _0x33c85c=0x0;_0x33c85c<_0x4dee0f[_0x1360e3(0x1b2)];_0x33c85c++){const _0x58c7ab=_0x4dee0f[_0x33c85c],_0x2f9d65=_0x33c85c+0x1,_0x4c93b0=_0x58c7ab[_0x1360e3(0x1b6)];try{console[_0x1360e3(0x1b7)]('['+_0x2f9d65+'/'+_0x858f57+']\x20Generating:\x20'+_0x4c93b0+_0x1360e3(0x1b4)+_0x58c7ab[_0x1360e3(0x1ac)]+')');if(_0x25ddbe)_0x25ddbe(_0x2f9d65,_0x858f57,_0x4c93b0);const _0x17e535=await fetchDatasetDoc({'appCode':_0x9f83f0,'cookie':_0x4b61d5,'datasetCode':_0x58c7ab['datasetCode'],'datasetId':_0x58c7ab['id'],'enableAI':![],'extraParams':_0x581cd4}),_0xce6419=a0_0x488dbd['join'](_0x27e81d,_0x4c93b0+_0x1360e3(0x1a6));writeFileSync(_0xce6419,_0x17e535,{'encoding':_0x1360e3(0x19b)}),console[_0x1360e3(0x1b7)](_0x1360e3(0x1ad)+_0x4c93b0+_0x1360e3(0x1a6)),logger[_0x1360e3(0x1b0)](_0x1360e3(0x19f),_0x1360e3(0x19a)+_0x4c93b0,undefined,{'datasetCode':_0x58c7ab[_0x1360e3(0x1a5)],'datasetName':_0x58c7ab[_0x1360e3(0x1ac)],'filePath':_0xce6419,'progress':_0x2f9d65+'/'+_0x858f57}),_0x502871[_0x1360e3(0x1ba)]({'datasetCode':_0x58c7ab[_0x1360e3(0x1a5)],'datasetName':_0x58c7ab[_0x1360e3(0x1ac)],'filePath':_0xce6419,'success':!![]});if(_0x2f9d65<_0x858f57)await delay(0x1388);}catch(_0x192fc9){const _0x3afdd9=_0x192fc9 instanceof Error?_0x192fc9[_0x1360e3(0x1a8)]:String(_0x192fc9);console[_0x1360e3(0x1b7)](_0x1360e3(0x1aa)+_0x4c93b0+_0x1360e3(0x1a0)+_0x3afdd9),logger[_0x1360e3(0x1b5)](_0x1360e3(0x19f),_0x1360e3(0x1ab)+_0x58c7ab['datasetCode'],{'datasetCode':_0x58c7ab[_0x1360e3(0x1a5)],'datasetName':_0x58c7ab[_0x1360e3(0x1ac)],'error':_0x3afdd9,'progress':_0x2f9d65+'/'+_0x858f57}),_0x502871[_0x1360e3(0x1ba)]({'datasetCode':_0x58c7ab[_0x1360e3(0x1a5)],'datasetName':_0x58c7ab[_0x1360e3(0x1ac)],'filePath':'','success':![],'error':_0x3afdd9}),_0x2f9d65<_0x858f57&&(console[_0x1360e3(0x1b7)](_0x1360e3(0x1ae)),await delay(0xbb8));}}return _0x502871;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x572d50,_0x15c1d0){const _0x23ab35=a1_0x47f1,_0x436930=_0x572d50();while(!![]){try{const _0x4c4dfd=parseInt(_0x23ab35(0x135))/0x1+parseInt(_0x23ab35(0x13e))/0x2*(-parseInt(_0x23ab35(0x138))/0x3)+parseInt(_0x23ab35(0x134))/0x4*(parseInt(_0x23ab35(0x136))/0x5)+parseInt(_0x23ab35(0x139))/0x6*(-parseInt(_0x23ab35(0x13a))/0x7)+-parseInt(_0x23ab35(0x12d))/0x8*(-parseInt(_0x23ab35(0x130))/0x9)+-parseInt(_0x23ab35(0x12a))/0xa+parseInt(_0x23ab35(0x132))/0xb*(parseInt(_0x23ab35(0x13f))/0xc);if(_0x4c4dfd===_0x15c1d0)break;else _0x436930['push'](_0x436930['shift']());}catch(_0x1be9bb){_0x436930['push'](_0x436930['shift']());}}}(a1_0x568d,0xc354f));import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';import{platformFetch}from'../core/api-client.js';function a1_0x568d(){const _0x2dd6fc=['52DaaxZg','869307GaROPc','545685UCusKq','正在从服务器拉取模型列表...\x20(环境:\x20','6oKhImi','1509606UQMgYB','42urWnSk','Fetch\x20datasets','trim','length','1021832KVsHHf','4020mDlsJN','12471680VipCSe','fetch-model-list','name','8lkQHTr','map','configArray','5501178LuuWCl','/api/node-toolbox/dataset/model-list?appcode=','55143dbmhTY','info'];a1_0x568d=function(){return _0x2dd6fc;};return a1_0x568d();}function a1_0x47f1(_0x424227,_0x4e9137){_0x424227=_0x424227-0x12a;const _0x568db1=a1_0x568d();let _0x47f188=_0x568db1[_0x424227];return _0x47f188;}function cleanNewlines(_0x5eb77a){const _0x46d97b=a1_0x47f1;return _0x5eb77a['replace'](/[\r\n]+/g,'\x20')[_0x46d97b(0x13c)]();}function cleanDatasetName(_0x3c2926){const _0x2ea9db=a1_0x47f1;if(!_0x3c2926['name'])return _0x3c2926;return{..._0x3c2926,'name':cleanNewlines(_0x3c2926[_0x2ea9db(0x12c)])};}export async function fetchModelList(_0x498eb6,_0x102034){const _0x5b887a=a1_0x47f1,_0xc0ed32=getEnv(),_0x53ad6e=getApiDomain()+_0x5b887a(0x131)+_0x498eb6+'&otype=array';logger[_0x5b887a(0x133)](_0x5b887a(0x12b),_0x5b887a(0x137)+_0xc0ed32+')',{'apiUrl':_0x53ad6e});const _0x390e61=await platformFetch(_0x53ad6e,{'cookie':_0x102034,'label':_0x5b887a(0x13b)}),_0x58fbf9=(_0x390e61[_0x5b887a(0x12f)]??[])[_0x5b887a(0x12e)](cleanDatasetName);return{'configArray':_0x58fbf9,'count':_0x58fbf9[_0x5b887a(0x13d)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1a9d06,_0x304237){const _0x173c9=a2_0x501f,_0xf467f3=_0x1a9d06();while(!![]){try{const _0x495c80=parseInt(_0x173c9(0x104))/0x1*(-parseInt(_0x173c9(0x107))/0x2)+-parseInt(_0x173c9(0x111))/0x3+-parseInt(_0x173c9(0x112))/0x4+-parseInt(_0x173c9(0x116))/0x5+-parseInt(_0x173c9(0x10c))/0x6*(parseInt(_0x173c9(0x118))/0x7)+-parseInt(_0x173c9(0x10a))/0x8+parseInt(_0x173c9(0x106))/0x9;if(_0x495c80===_0x304237)break;else _0xf467f3['push'](_0xf467f3['shift']());}catch(_0x5d5a18){_0xf467f3['push'](_0xf467f3['shift']());}}}(a2_0x41ce,0xbc824));import a2_0x1f2f64 from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a2_0x17005a from'node:path';import{fileURLToPath}from'node:url';function a2_0x501f(_0x334e7e,_0x44465f){_0x334e7e=_0x334e7e-0xff;const _0x41cea1=a2_0x41ce();let _0x501fea=_0x41cea1[_0x334e7e];return _0x501fea;}function a2_0x41ce(){const _0x306631=['Please\x20configure\x20app\x20code\x20first\x20via\x20`','{\x20apiConfigName:\x20','609270kpViHb','alias','497qTISNv','-client','CONFIG_NAMES.DEFAULT','utf8','-api','client','toUpperCase','join','\x20config\x20set\x20app\x20<value>`','key',',\x20env:\x20\x22','api.ts.tpl','replaceApiContent','.ts','length','success','773051pqIejb','\x22\x20}','30938841QEIAYV','2IFwcWF','resolve','datasetCode','12073384UwplDz','format','6564SFcBEq','test','name','typescript','client.ts.tpl','320247zuXjdT','308064WYpssm','LOVRABET'];a2_0x41ce=function(){return _0x306631;};return a2_0x41ce();}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(_0x47f503,_0x25b8e1,_0x408ec4,_0x136227,_0x55c7f5,_0xe2526b,_0x27d594){const _0x17a2be=a2_0x501f;if(!_0x408ec4)throw new Error(_0x17a2be(0x114)+CLI_BIN_NAME+_0x17a2be(0x120));const _0x5b17f3=_0x136227&&!_0x27d594,_0x30ba66=_0x27d594||_0x408ec4,_0x2bdbeb=_0x5b17f3?_0x17a2be(0x11a):'\x22'+_0x30ba66+'\x22',_0x43c58f=!isProduction(_0x55c7f5);let _0x23dd68;if(_0x5b17f3)_0x43c58f?_0x23dd68=_0x17a2be(0x115)+_0x2bdbeb+_0x17a2be(0x122)+_0x55c7f5+_0x17a2be(0x105):_0x23dd68='';else{const _0xe06961=_0x43c58f?_0x17a2be(0x122)+_0x55c7f5+'\x22':'';_0x23dd68='{\x20apiConfigName:\x20\x22'+_0x30ba66+'\x22'+_0xe06961+'\x20}';}const _0x4de7d3=_0x25b8e1?_0x25b8e1+_0x17a2be(0x11c):'api',_0x196e25=_0x25b8e1?_0x25b8e1+_0x17a2be(0x119):_0x17a2be(0x11d),_0x56bb00=_0x25b8e1&&!/^app-[a-f0-9]+$/i[_0x17a2be(0x10d)](_0x25b8e1)?_0x25b8e1['replace'](/-/g,'_')[_0x17a2be(0x11e)]():_0x17a2be(0x113),_0x1a574e=[];_0x47f503['forEach'](_0x42462f=>{const _0x30d83d=_0x17a2be;_0x1a574e['push']({'datasetCode':_0x42462f[_0x30d83d(0x109)],'tableName':_0x42462f['tableName'],'name':_0x42462f[_0x30d83d(0x10e)]||'','alias':_0x42462f[_0x30d83d(0x117)]||_0x42462f[_0x30d83d(0x121)]});});const _0x192a63=fileURLToPath(import.meta.url),_0x31b26f=a2_0x17005a[_0x17a2be(0x108)](a2_0x17005a['dirname'](_0x192a63),'../..'),_0x98b362=a2_0x17005a[_0x17a2be(0x11f)](_0x31b26f,'templates/generate-api'),_0x3ca0db=a2_0x17005a[_0x17a2be(0x11f)](_0x98b362,_0x17a2be(0xff)),_0x5753d4=a2_0x17005a[_0x17a2be(0x11f)](_0x98b362,_0x17a2be(0x110)),_0x2bcf1f=_0xe2526b;mkdirSync(_0x2bcf1f,{'recursive':!![]});const _0x17ca5f=_0x1a574e[0x0]?.[_0x17a2be(0x117)],_0x5b693c=readFileSync(_0x3ca0db,'utf8'),_0x1a57d8=TemplateReplacer[_0x17a2be(0x100)](_0x5b693c,_0x408ec4,_0x1a574e,_0x17ca5f,_0x4de7d3,_0x2bdbeb,undefined,_0x56bb00),_0x76b376=await a2_0x1f2f64[_0x17a2be(0x10b)](_0x1a57d8,{'parser':_0x17a2be(0x10f)}),_0x3f7e19=a2_0x17005a[_0x17a2be(0x11f)](_0x2bcf1f,_0x4de7d3+_0x17a2be(0x101));writeFileSync(_0x3f7e19,_0x76b376,{'encoding':_0x17a2be(0x11b)});const _0x56a45f=readFileSync(_0x5753d4,_0x17a2be(0x11b)),_0x67bae9=TemplateReplacer[_0x17a2be(0x100)](_0x56a45f,_0x408ec4,_0x1a574e,_0x17ca5f,_0x4de7d3,_0x2bdbeb,_0x23dd68,_0x56bb00),_0x290b17=await a2_0x1f2f64[_0x17a2be(0x10b)](_0x67bae9,{'parser':_0x17a2be(0x10f)}),_0x3b5fe7=a2_0x17005a['join'](_0x2bcf1f,_0x196e25+_0x17a2be(0x101));writeFileSync(_0x3b5fe7,_0x290b17,{'encoding':_0x17a2be(0x11b)});const _0x1332d9=_0x1a574e[_0x17a2be(0x102)];return logger[_0x17a2be(0x103)]('init-api','API\x20文件生成成功!',undefined,{'apiFile':_0x3f7e19,'clientFile':_0x3b5fe7,'modelCount':_0x1332d9,'configName':_0x2bdbeb}),{'modelCount':_0x1332d9,'apiFilePath':_0x3f7e19,'clientFilePath':_0x3b5fe7,'configName':_0x2bdbeb};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a3_0x4e0d(_0x356dfb,_0x4f1929){_0x356dfb=_0x356dfb-0x165;const _0x50e27d=a3_0x50e2();let _0x4e0d13=_0x50e27d[_0x356dfb];return _0x4e0d13;}(function(_0x14f405,_0x275885){const _0x177712=a3_0x4e0d,_0x5a5855=_0x14f405();while(!![]){try{const _0x21fff6=parseInt(_0x177712(0x169))/0x1*(-parseInt(_0x177712(0x170))/0x2)+parseInt(_0x177712(0x165))/0x3*(parseInt(_0x177712(0x166))/0x4)+parseInt(_0x177712(0x172))/0x5*(-parseInt(_0x177712(0x167))/0x6)+parseInt(_0x177712(0x173))/0x7+-parseInt(_0x177712(0x16b))/0x8+parseInt(_0x177712(0x176))/0x9+parseInt(_0x177712(0x16f))/0xa;if(_0x21fff6===_0x275885)break;else _0x5a5855['push'](_0x5a5855['shift']());}catch(_0x249826){_0x5a5855['push'](_0x5a5855['shift']());}}}(a3_0x50e2,0x9018c));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a3_0x50e2(){const _0x5e948f=['185gNMJRo','4333273PTVbjt','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','!\x20Login\x20failed.','908784ymcssH','1500VyRFWL','1184RtakIV','53958ZhXzPb','start','10bWzSko','autoYes','16176vFVeJE','log','validation','Run\x20`','1992780hkEGoB','28462BafsxV','\x20auth\x20login\x20--yes`\x20in\x20an\x20interactive\x20terminal.'];a3_0x50e2=function(){return _0x5e948f;};return a3_0x50e2();}import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';import a3_0x5b1810 from'ora';export async function runAuthServer(_0x2f8a26){const _0x3401ba=a3_0x4e0d,_0x5410f0=await getIsSessionValid();if(_0x5410f0){console['log']('√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.');return;}if(_0x2f8a26?.['nonInteractive'])throw CliErrors[_0x3401ba(0x16d)]('Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.',_0x3401ba(0x16e)+CLI_BIN_NAME+_0x3401ba(0x171));const _0x391f3b=_0x2f8a26?.[_0x3401ba(0x16a)]?!![]:await confirm({'message':'No\x20valid\x20session.\x20Login\x20now?','default':!![]});if(!_0x391f3b)return;const _0x2468e2=a3_0x5b1810(_0x3401ba(0x174))[_0x3401ba(0x168)](),_0x3156d4=await authServer({'silent':!![]});_0x2468e2['stop'](),_0x3156d4?console['log']('*\x20Login\x20successful!'):console[_0x3401ba(0x16c)](_0x3401ba(0x175));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x1e0ef0=a4_0x5390;(function(_0x5b07a6,_0x262c11){const _0x3156ac=a4_0x5390,_0x3738e1=_0x5b07a6();while(!![]){try{const _0x33bf36=-parseInt(_0x3156ac(0x18f))/0x1*(-parseInt(_0x3156ac(0x188))/0x2)+-parseInt(_0x3156ac(0x18e))/0x3+-parseInt(_0x3156ac(0x196))/0x4*(parseInt(_0x3156ac(0x184))/0x5)+-parseInt(_0x3156ac(0x1a3))/0x6*(parseInt(_0x3156ac(0x1a2))/0x7)+-parseInt(_0x3156ac(0x190))/0x8*(parseInt(_0x3156ac(0x1b0))/0x9)+-parseInt(_0x3156ac(0x1af))/0xa*(-parseInt(_0x3156ac(0x18b))/0xb)+parseInt(_0x3156ac(0x1a1))/0xc;if(_0x33bf36===_0x262c11)break;else _0x3738e1['push'](_0x3738e1['shift']());}catch(_0x6c3aa6){_0x3738e1['push'](_0x3738e1['shift']());}}}(a4_0x4d99,0xcdd73));import{writeFileSync}from'node:fs';function a4_0x4d99(){const _0x1f3adc=['⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','createServer','139124meoOih','headers','end','9889KcHnsj','silent','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','552066pWEwKY','20jDMvBf','24jdpEuD','darwin','port','https://dev.lovrabet.com:','/sign-in?redirect=','📍\x20Login\x20URL:','28QOOlQS','error','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','catch','then','writeHead','Auth\x20server\x20error:','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','user','cookie','127.0.0.1','5068872gjWwXi','7ekkWLp','5691822ZSnyfD','object','win32','platform','session','listen','cmd\x20/c\x20start\x20\x22\x22\x20\x22','close','text/html;\x20charset=utf-8','log','json','🔐\x20Starting\x20login\x20service...','16180bedFGG','1049877kyQULx','isAuth','https://g.yuntooai.com/cert/lovrabet-dev.json','673205iVrVHX','address'];a4_0x4d99=function(){return _0x1f3adc;};return a4_0x4d99();}import a4_0x1f193f from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'../auth/is-session-valid.js';import{cookieFile}from'../auth/constant.js';import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export async function authServer(_0xe374df){const _0x122cbb=a4_0x5390,_0x375add=_0xe374df?.[_0x122cbb(0x18c)]||![];if(await getIsSessionValid())return!![];const _0x1cd7eb=await(await fetch(_0x122cbb(0x183)))[_0x122cbb(0x1ad)]();return new Promise(async(_0x132f91,_0x9725d1)=>{const _0x51f5ac=_0x122cbb;let _0x19809d=0x0;const _0x211f25=a4_0x1f193f[_0x51f5ac(0x187)](_0x1cd7eb,async(_0x367ebc,_0x43ab01)=>{const _0x586f1a=_0x51f5ac,_0x3c7e90=getUserDomain(),_0x1b5a1e=_0x367ebc[_0x586f1a(0x189)][_0x586f1a(0x19f)]||'',_0x5cc650=await fetch(_0x3c7e90+'/api/auth/get-session',{'headers':{'cookie':_0x1b5a1e}})[_0x586f1a(0x19a)](_0x59884a=>_0x59884a[_0x586f1a(0x1ad)]()),_0x4697c5=_0x5cc650&&_0x5cc650[_0x586f1a(0x1a7)]&&_0x5cc650[_0x586f1a(0x19e)];if(_0x4697c5){writeFileSync(cookieFile,_0x1b5a1e,'utf-8'),_0x132f91(!![]);const _0x3f717f=buildLoginSuccessHtml();_0x43ab01[_0x586f1a(0x19b)](0xc8,{'Content-Type':_0x586f1a(0x1ab)}),_0x43ab01[_0x586f1a(0x18a)](_0x3f717f),_0x211f25[_0x586f1a(0x1aa)]();}else{const _0x1d39c8=''+encodeURIComponent(_0x586f1a(0x193)+_0x19809d);_0x43ab01[_0x586f1a(0x19b)](0x12e,{'location':_0x3c7e90+_0x586f1a(0x194)+_0x1d39c8}),_0x43ab01[_0x586f1a(0x18a)]();return;}});_0x211f25[_0x51f5ac(0x1a8)](0x0,_0x51f5ac(0x1a0),()=>{const _0x343424=_0x51f5ac,_0x2f68b7=_0x211f25[_0x343424(0x185)]();_0x19809d=typeof _0x2f68b7===_0x343424(0x1a4)&&_0x2f68b7?_0x2f68b7[_0x343424(0x192)]:Number(_0x2f68b7);const _0x4ef1bc=_0x343424(0x193)+_0x19809d;!_0x375add&&(console[_0x343424(0x1ac)](_0x343424(0x1ae)),console['log'](_0x343424(0x195),_0x4ef1bc),console[_0x343424(0x1ac)](_0x343424(0x198)),console[_0x343424(0x1ac)](''),console[_0x343424(0x1ac)](_0x343424(0x19d)),console[_0x343424(0x1ac)]('')),openInBrowser(_0x4ef1bc)[_0x343424(0x19a)](_0x1b0639=>{const _0x584bf0=_0x343424;!_0x375add&&(_0x1b0639?console[_0x584bf0(0x1ac)]('✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.'):(console[_0x584bf0(0x1ac)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console['log'](_0x584bf0(0x18d),_0x4ef1bc)),console['log'](''));})[_0x343424(0x199)](()=>{const _0x4dcc38=_0x343424;!_0x375add&&(console['log'](_0x4dcc38(0x186)),console['log'](_0x4dcc38(0x18d),_0x4ef1bc),console[_0x4dcc38(0x1ac)](''));});}),_0x211f25['on'](_0x51f5ac(0x197),_0x23c97a=>{const _0x402d25=_0x51f5ac;!_0x375add&&console['error'](_0x402d25(0x19c),_0x23c97a),_0x9725d1(_0x23c97a);});});}function openInBrowser(_0x3572d1){return new Promise(_0x20ec13=>{const _0x33d048=a4_0x5390,_0x2d54a3=process[_0x33d048(0x1a6)];let _0x110b49;if(_0x2d54a3===_0x33d048(0x1a5))_0x110b49=_0x33d048(0x1a9)+_0x3572d1+'\x22';else _0x2d54a3===_0x33d048(0x191)?_0x110b49='open\x20\x22'+_0x3572d1+'\x22':_0x110b49='xdg-open\x20\x22'+_0x3572d1+'\x22';exec(_0x110b49,_0x460941=>{_0x460941?_0x20ec13(![]):_0x20ec13(!![]);});});}function a4_0x5390(_0x3e68fe,_0x19f0a1){_0x3e68fe=_0x3e68fe-0x182;const _0x4d99f2=a4_0x4d99();let _0x5390da=_0x4d99f2[_0x3e68fe];return _0x5390da;}if(import.meta.main){const isAuth=await authServer();console[a4_0x1e0ef0(0x1ac)](a4_0x1e0ef0(0x182),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a5_0x2ddda7=a5_0x38f0;(function(_0x52bb14,_0x22d2e7){const _0xac0b80=a5_0x38f0,_0x3b231d=_0x52bb14();while(!![]){try{const _0xb7b5cd=-parseInt(_0xac0b80(0x1db))/0x1*(parseInt(_0xac0b80(0x1e1))/0x2)+-parseInt(_0xac0b80(0x1de))/0x3*(-parseInt(_0xac0b80(0x1dc))/0x4)+-parseInt(_0xac0b80(0x1e2))/0x5+-parseInt(_0xac0b80(0x1e6))/0x6+-parseInt(_0xac0b80(0x1dd))/0x7+-parseInt(_0xac0b80(0x1e3))/0x8*(-parseInt(_0xac0b80(0x1e0))/0x9)+-parseInt(_0xac0b80(0x1e5))/0xa*(-parseInt(_0xac0b80(0x1e4))/0xb);if(_0xb7b5cd===_0x22d2e7)break;else _0x3b231d['push'](_0x3b231d['shift']());}catch(_0x44241f){_0x3b231d['push'](_0x3b231d['shift']());}}}(a5_0x4f59,0xa62af));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';function a5_0x4f59(){const _0x2167cf=['50WphNes','5497105DTyidB','120LObcKd','10100266MQGxYW','40lFSxCW','4837308SXgQzK','41215eiiGtT','2489588AQxjtT','6092513nVxYJL','3iVotpN','cookie','115065eIBVpQ'];a5_0x4f59=function(){return _0x2167cf;};return a5_0x4f59();}function a5_0x38f0(_0x3cae12,_0x5c9be1){_0x3cae12=_0x3cae12-0x1db;const _0x4f598d=a5_0x4f59();let _0x38f0e2=_0x4f598d[_0x3cae12];return _0x38f0e2;}export const configDir=join(homedir(),'.lovrabet');export const cookieFile=join(configDir,a5_0x2ddda7(0x1df));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a6_0x1341(_0x5eb97e,_0x34f037){_0x5eb97e=_0x5eb97e-0x153;var _0x1ecc06=a6_0x1ecc();var _0x13418e=_0x1ecc06[_0x5eb97e];return _0x13418e;}function a6_0x1ecc(){var _0x3575da=['3EmhkRN','54wwAAAI','910456qCJZHk','5xaCWQg','1510650LEvdCw','853912xmYtTb','2257028iLahhU','11009537FsSoUn','53678290QwaCXU','767172VzufBO'];a6_0x1ecc=function(){return _0x3575da;};return a6_0x1ecc();}(function(_0x2d5cb0,_0xe83b9b){var _0x2d6ff4=a6_0x1341,_0x4437bf=_0x2d5cb0();while(!![]){try{var _0x2619dc=-parseInt(_0x2d6ff4(0x159))/0x1+-parseInt(_0x2d6ff4(0x15b))/0x2+-parseInt(_0x2d6ff4(0x157))/0x3*(parseInt(_0x2d6ff4(0x153))/0x4)+parseInt(_0x2d6ff4(0x15a))/0x5*(-parseInt(_0x2d6ff4(0x156))/0x6)+-parseInt(_0x2d6ff4(0x154))/0x7+-parseInt(_0x2d6ff4(0x15c))/0x8*(parseInt(_0x2d6ff4(0x158))/0x9)+parseInt(_0x2d6ff4(0x155))/0xa;if(_0x2619dc===_0xe83b9b)break;else _0x4437bf['push'](_0x4437bf['shift']());}catch(_0x4f0f75){_0x4437bf['push'](_0x4437bf['shift']());}}}(a6_0x1ecc,0xc2820));import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2ef337,_0x22c08e){const _0x2568eb=a7_0x53af,_0xf973bb=_0x2ef337();while(!![]){try{const _0x88c598=-parseInt(_0x2568eb(0x18b))/0x1+-parseInt(_0x2568eb(0x180))/0x2*(-parseInt(_0x2568eb(0x184))/0x3)+parseInt(_0x2568eb(0x188))/0x4+parseInt(_0x2568eb(0x186))/0x5*(parseInt(_0x2568eb(0x183))/0x6)+-parseInt(_0x2568eb(0x17e))/0x7+-parseInt(_0x2568eb(0x189))/0x8*(-parseInt(_0x2568eb(0x17f))/0x9)+parseInt(_0x2568eb(0x185))/0xa*(-parseInt(_0x2568eb(0x18d))/0xb);if(_0x88c598===_0x22c08e)break;else _0xf973bb['push'](_0xf973bb['shift']());}catch(_0x131e5c){_0xf973bb['push'](_0xf973bb['shift']());}}}(a7_0x92f7,0x8a682));function a7_0x92f7(){const _0x5aa45e=['2908AuJuvN','/api/auth/get-session','user','276hsEYxo','417aRWiGw','10NSetfX','54755uBdMcy','utf-8','2906988TJRSZu','32PHZFRR','json','880500NllbIm','session','5047229PVHBor','1397074eqMCnF','1514781olOXWL'];a7_0x92f7=function(){return _0x5aa45e;};return a7_0x92f7();}function a7_0x53af(_0x1e2abf,_0x2b4e92){_0x1e2abf=_0x1e2abf-0x17e;const _0x92f7df=a7_0x92f7();let _0x53af12=_0x92f7df[_0x1e2abf];return _0x53af12;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0xe238a=a7_0x53af;try{if(!existsSync(cookieFile))return null;const _0x160bf0=readFileSync(cookieFile,_0xe238a(0x187)),_0x1aec22=await fetch(getUserDomain()+_0xe238a(0x181),{'headers':{'cookie':_0x160bf0}});if(!_0x1aec22['ok'])return null;const _0x1058f9=await _0x1aec22[_0xe238a(0x18a)]();if(!_0x1058f9[_0xe238a(0x18c)]||!_0x1058f9[_0xe238a(0x182)])return null;return _0x1058f9;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a8_0x233c(_0x1243c2,_0x518618){_0x1243c2=_0x1243c2-0x102;const _0x3bd943=a8_0x3bd9();let _0x233c69=_0x3bd943[_0x1243c2];return _0x233c69;}(function(_0x2b93c2,_0x1f934d){const _0x421f4d=a8_0x233c,_0x88d6c2=_0x2b93c2();while(!![]){try{const _0x5a4e6e=parseInt(_0x421f4d(0x110))/0x1*(-parseInt(_0x421f4d(0x106))/0x2)+parseInt(_0x421f4d(0x105))/0x3+-parseInt(_0x421f4d(0x103))/0x4+-parseInt(_0x421f4d(0x109))/0x5+-parseInt(_0x421f4d(0x108))/0x6+-parseInt(_0x421f4d(0x10a))/0x7+-parseInt(_0x421f4d(0x10e))/0x8*(-parseInt(_0x421f4d(0x10b))/0x9);if(_0x5a4e6e===_0x1f934d)break;else _0x88d6c2['push'](_0x88d6c2['shift']());}catch(_0x2e0722){_0x88d6c2['push'](_0x88d6c2['shift']());}}}(a8_0x3bd9,0xa4454));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a8_0x3bd9(){const _0x5cd252=['utf-8','6270774WFAiYP','269500zHMQmK','5284293yrnKze','27XvNfXg','then','session','9386920hdCHtD','user','25nmxiie','json','4535132hwRwKn','/api/auth/get-session','2087679lhowWt','44434wcYWoR'];a8_0x3bd9=function(){return _0x5cd252;};return a8_0x3bd9();}import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x5807df=a8_0x233c;try{if(!existsSync(cookieFile))return![];const _0x4e3efd=readFileSync(cookieFile,_0x5807df(0x107)),_0x2d897e=await fetch(getUserDomain()+_0x5807df(0x104),{'headers':{'cookie':_0x4e3efd}})[_0x5807df(0x10c)](_0x41788a=>_0x41788a[_0x5807df(0x102)]());return _0x2d897e&&_0x2d897e[_0x5807df(0x10d)]&&_0x2d897e[_0x5807df(0x10f)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a9_0x3f0f(_0x4de90f,_0x4a69a7){_0x4de90f=_0x4de90f-0x1df;const _0x870c05=a9_0x870c();let _0x3f0f74=_0x870c05[_0x4de90f];return _0x3f0f74;}(function(_0x24b432,_0x830358){const _0x11e870=a9_0x3f0f,_0x300572=_0x24b432();while(!![]){try{const _0x198e70=parseInt(_0x11e870(0x1e1))/0x1+parseInt(_0x11e870(0x1ea))/0x2*(parseInt(_0x11e870(0x1e8))/0x3)+-parseInt(_0x11e870(0x1e2))/0x4+-parseInt(_0x11e870(0x1e5))/0x5*(-parseInt(_0x11e870(0x1e7))/0x6)+-parseInt(_0x11e870(0x1e3))/0x7+-parseInt(_0x11e870(0x1e9))/0x8*(-parseInt(_0x11e870(0x1e6))/0x9)+-parseInt(_0x11e870(0x1df))/0xa;if(_0x198e70===_0x830358)break;else _0x300572['push'](_0x300572['shift']());}catch(_0x2dd785){_0x300572['push'](_0x300572['shift']());}}}(a9_0x870c,0x5c5d3));function a9_0x870c(){const _0x230be0=['6mFFuLT','390cwUfbF','312EvECVd','638DpHBYY','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','4823080Gdowqp','</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>','109113tRZnpj','1431968wFtKWY','2521694CsAhzT','<!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>','3766935CSOtUw','155745ocayBq'];a9_0x870c=function(){return _0x230be0;};return a9_0x870c();}export function buildLoginSuccessHtml(){const _0x28e293=a9_0x3f0f,_0x331905=_0x28e293(0x1eb);return _0x28e293(0x1e4)+_0x331905+_0x28e293(0x1e0);}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x55efac,_0x533c8e){var _0x3d45fa=a10_0x125c,_0x372b03=_0x55efac();while(!![]){try{var _0x40d0f1=-parseInt(_0x3d45fa(0xfc))/0x1*(-parseInt(_0x3d45fa(0xff))/0x2)+parseInt(_0x3d45fa(0x100))/0x3*(-parseInt(_0x3d45fa(0x103))/0x4)+parseInt(_0x3d45fa(0x102))/0x5*(-parseInt(_0x3d45fa(0xf9))/0x6)+-parseInt(_0x3d45fa(0x101))/0x7*(-parseInt(_0x3d45fa(0xf5))/0x8)+parseInt(_0x3d45fa(0xf7))/0x9+-parseInt(_0x3d45fa(0xfa))/0xa+parseInt(_0x3d45fa(0xfd))/0xb*(-parseInt(_0x3d45fa(0xf6))/0xc);if(_0x40d0f1===_0x533c8e)break;else _0x372b03['push'](_0x372b03['shift']());}catch(_0x1b821b){_0x372b03['push'](_0x372b03['shift']());}}}(a10_0x4c45,0x2b3a5));function a10_0x125c(_0x10bca9,_0x85510b){_0x10bca9=_0x10bca9-0xf5;var _0x4c455a=a10_0x4c45();var _0x125c7d=_0x4c455a[_0x10bca9];return _0x125c7d;}import{unlinkSync,existsSync}from'node:fs';function a10_0x4c45(){var _0x1a5c47=['✓\x20Logged\x20out','236RvRGuk','30ByjPEu','161gkAguC','301460LPGxUb','121048jWtyiQ','81072BXRWSM','108DcrXBa','1977489DxGnpy','!\x20Not\x20logged\x20in','12xgkBPk','1725450ClntGT','log','2838bSrTsh','18183wEGxyi'];a10_0x4c45=function(){return _0x1a5c47;};return a10_0x4c45();}import{cookieFile}from'../auth/constant.js';export function logout(){var _0x52573f=a10_0x125c;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x52573f(0xfb)](_0x52573f(0xfe))):console['log'](_0x52573f(0xf8));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a11_0xaa18(){const _0x369de7=['48SzJSBA','146948VHuWen','1777025TkltHr','7KnbPNE','7018GFzDHG','168309FmJzmw','3459336HrvvWn','2858370ZhiRCT','62532OIlTqD','40MHKSUI'];a11_0xaa18=function(){return _0x369de7;};return a11_0xaa18();}function a11_0x8620(_0xda3fa0,_0x538427){_0xda3fa0=_0xda3fa0-0x1bd;const _0xaa189b=a11_0xaa18();let _0x8620c8=_0xaa189b[_0xda3fa0];return _0x8620c8;}(function(_0xc1129e,_0x106909){const _0x13802e=a11_0x8620,_0x1264b1=_0xc1129e();while(!![]){try{const _0x15ec53=parseInt(_0x13802e(0x1bf))/0x1+parseInt(_0x13802e(0x1c6))/0x2+parseInt(_0x13802e(0x1c3))/0x3*(-parseInt(_0x13802e(0x1c5))/0x4)+-parseInt(_0x13802e(0x1bd))/0x5+parseInt(_0x13802e(0x1c2))/0x6*(parseInt(_0x13802e(0x1be))/0x7)+parseInt(_0x13802e(0x1c1))/0x8+-parseInt(_0x13802e(0x1c0))/0x9*(parseInt(_0x13802e(0x1c4))/0xa);if(_0x15ec53===_0x106909)break;else _0x1264b1['push'](_0x1264b1['shift']());}catch(_0x5e82d9){_0x1264b1['push'](_0x1264b1['shift']());}}}(a11_0xaa18,0x4b6e7));export const dynamicCliFlags={'enableBffSave':{'type':'boolean'}};
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a12_0x537326=a12_0x1c6b;(function(_0x5e51d2,_0x45806e){const _0x525994=a12_0x1c6b,_0x1af97e=_0x5e51d2();while(!![]){try{const _0x1b8f63=parseInt(_0x525994(0x1ff))/0x1*(-parseInt(_0x525994(0x1ec))/0x2)+-parseInt(_0x525994(0x1dd))/0x3*(parseInt(_0x525994(0x1f2))/0x4)+-parseInt(_0x525994(0x1df))/0x5*(parseInt(_0x525994(0x1d6))/0x6)+-parseInt(_0x525994(0x1d8))/0x7+-parseInt(_0x525994(0x1dc))/0x8*(parseInt(_0x525994(0x1e8))/0x9)+parseInt(_0x525994(0x1da))/0xa+parseInt(_0x525994(0x1f4))/0xb;if(_0x1b8f63===_0x45806e)break;else _0x1af97e['push'](_0x1af97e['shift']());}catch(_0x284148){_0x1af97e['push'](_0x1af97e['shift']());}}}(a12_0xa2c8,0x6bb4e));import a12_0x47bd66 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;function a12_0x1c6b(_0x15a879,_0x872c82){_0x15a879=_0x15a879-0x1d5;const _0xa2c8fa=a12_0xa2c8();let _0x1c6bab=_0xa2c8fa[_0x15a879];return _0x1c6bab;}try{dynamicCliFlags=(await import(a12_0x537326(0x1e5)))['dynamicCliFlags'];}catch{}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!==a12_0x537326(0x1ea)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[a12_0x537326(0x1f5)](0x0,0xa)+')':VERSION,cli=a12_0x47bd66(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0xcda1c2=a12_0x537326;let _0x3d6d59=cli['input'][0x0],_0x5533b6=cli[_0xcda1c2(0x200)][0x1];const _0x5bc71c=cli[_0xcda1c2(0x205)];if(!_0x3d6d59){await reportCliHelpTrace('global'),showHelp();return;}const _0x65c918=deprecatedAliases[_0x3d6d59];if(_0x65c918&&!isKnownService(_0x3d6d59)){const _0x10ee50=_0x5533b6?CLI_BIN_NAME+'\x20'+_0x3d6d59+'\x20'+_0x5533b6:CLI_BIN_NAME+'\x20'+_0x3d6d59,_0x4437a2=CLI_BIN_NAME+'\x20'+_0x65c918[_0xcda1c2(0x1d7)]+'\x20'+_0x65c918[_0xcda1c2(0x1e9)];console[_0xcda1c2(0x1f1)](_0xcda1c2(0x1de)+_0x10ee50+_0xcda1c2(0x1ef)+_0x4437a2+_0xcda1c2(0x1e1)+'\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a'),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x3d6d59)){await reportCliHelpTrace(_0xcda1c2(0x1e0),{'service':_0x3d6d59}),showHelp();return;}const _0x5e5e37=getServiceEntry(_0x3d6d59);if(_0x5bc71c[_0xcda1c2(0x1eb)]&&typeof _0x5bc71c[_0xcda1c2(0x1eb)]===_0xcda1c2(0x1f0)){const {initEnv:_0x33abbb}=await import(_0xcda1c2(0x1fe));_0x33abbb(_0x5bc71c[_0xcda1c2(0x1eb)]);}const {buildConfigFromFlags:_0x14c8be}=await import(_0xcda1c2(0x1f3)),_0x4b82a4=_0x14c8be(_0x5bc71c);if(!_0x5bc71c[_0xcda1c2(0x1eb)]&&_0x4b82a4[_0xcda1c2(0x1eb)]){const {initEnv:_0x54a717}=await import('./constant/env.js');_0x54a717(_0x4b82a4[_0xcda1c2(0x1eb)]);}if(_0x4b82a4[_0xcda1c2(0x206)]?.[_0xcda1c2(0x1d5)]||_0x4b82a4[_0xcda1c2(0x206)]?.[_0xcda1c2(0x208)]||_0x4b82a4[_0xcda1c2(0x206)]?.[_0xcda1c2(0x1fc)]){const {initDomains:_0x247239}=await import('./constant/domain.js');_0x247239({'apiDomain':_0x4b82a4['raw'][_0xcda1c2(0x1d5)]||undefined,'userDomain':_0x4b82a4['raw'][_0xcda1c2(0x208)]||undefined,'runtimeDomain':_0x4b82a4['raw']['runtimeDomain']||undefined});}if(!_0x5533b6){if(_0x5bc71c[_0xcda1c2(0x1e7)]){printServiceHelp(_0x3d6d59);return;}if(_0x5e5e37[_0xcda1c2(0x1f8)])_0x5533b6=_0x5e5e37[_0xcda1c2(0x1f8)];else{if(_0x5e5e37[_0xcda1c2(0x1f6)]){await dispatchDeclarative(_0x5e5e37[_0xcda1c2(0x1f6)],_0x3d6d59,'',[],_0x5bc71c,_0x4b82a4);return;}else{printServiceHelp(_0x3d6d59);return;}}}const _0x4d7106=resolveDeprecatedSubcommand(_0x3d6d59,_0x5533b6);if(_0x4d7106){const _0x160153=CLI_BIN_NAME+'\x20'+_0x3d6d59+'\x20'+_0x5533b6,_0xa3b410=CLI_BIN_NAME+'\x20'+_0x3d6d59+'\x20'+_0x4d7106;console[_0xcda1c2(0x1f1)]('⚠\x20`'+_0x160153+_0xcda1c2(0x1e2)+_0xa3b410+_0xcda1c2(0x1f9)+_0xa3b410+_0xcda1c2(0x1e6)),_0x5533b6=_0x4d7106;}if(_0x5bc71c[_0xcda1c2(0x1e7)]&&!findDefinition(_0x3d6d59,_0x5533b6)){printServiceHelp(_0x3d6d59);return;}{let _0x4fafd2=findDefinition(_0x3d6d59,_0x5533b6),_0x420ae2=cli[_0xcda1c2(0x200)][_0xcda1c2(0x1f5)](0x2);if(!_0x4fafd2){if(_0x5e5e37[_0xcda1c2(0x1f6)]){if(_0x5bc71c[_0xcda1c2(0x1e7)]){console[_0xcda1c2(0x202)](generateCommandHelp(_0x5e5e37[_0xcda1c2(0x1f6)]));return;}_0x4fafd2=_0x5e5e37['wildcardDef'],_0x420ae2=[_0x5533b6,...cli['input'][_0xcda1c2(0x1f5)](0x2)];}else{printServiceHelp(_0x3d6d59),await handleErrorAsync(CliErrors[_0xcda1c2(0x1d9)](_0x3d6d59+'\x20'+_0x5533b6));return;}}if(_0x5bc71c[_0xcda1c2(0x1e7)]){console[_0xcda1c2(0x202)](generateCommandHelp(_0x4fafd2));return;}await dispatchDeclarative(_0x4fafd2,_0x3d6d59,_0x5533b6,_0x420ae2,_0x5bc71c,_0x4b82a4);}}async function dispatchDeclarative(_0x2d4986,_0xa043b6,_0x926b55,_0x41f5b3,_0x459b2e,_0x30939e){const _0x532d35=a12_0x537326,_0x4b85c8=Date[_0x532d35(0x207)]();let _0x16714c;try{await runCommand(_0x2d4986,createPipelineEnv(_0x30939e,_0x459b2e,_0x41f5b3));}catch(_0x4990b2){_0x16714c=_0x4990b2;}await reportCommandTrace({'service':_0xa043b6,'command':_0x926b55,'flags':_0x459b2e,'durationMs':Date[_0x532d35(0x207)]()-_0x4b85c8,'error':_0x16714c});if(_0x16714c)await handleErrorAsync(_0x16714c);}function printServiceHelp(_0x35cc17){const _0xd59a73=a12_0x537326;console[_0xd59a73(0x202)](generateServiceHelp(_0x35cc17));}function a12_0xa2c8(){const _0x227627=['log','name','Unexpected\x20error:','flags','raw','now','userDomain','apiDomain','1146jDmcix','service','1243662skAzXQ','unknownCommand','5567840AxCbbp','\x0aCancelled.\x0a','144416glVwwk','231033PkNAJX','⚠\x20`','9125NTovZa','unknown_service','`\x20in\x20v2.0.\x0a','`\x20is\x20an\x20alias\x20of\x20`','message','Error:\x20','./cli-flags.js','`\x20in\x20new\x20scripts.\x0a','help','243pvsbQd','command','unknown','env','1587156aBOega','stderr','Hint:\x20','`\x20has\x20been\x20moved\x20to\x20`','string','error','28Fqcqgn','./context.js','24537502oDUkVa','slice','wildcardDef','hint','defaultCommand','`;\x20prefer\x20`','cancelled','write','runtimeDomain','ExitPromptError','./constant/env.js','1gfkFMh','input','exitCode'];a12_0xa2c8=function(){return _0x227627;};return a12_0xa2c8();}async function handleErrorAsync(_0x2deadc){const _0x450b35=a12_0x537326;if(_0x2deadc instanceof Error&&_0x2deadc[_0x450b35(0x203)]===_0x450b35(0x1fd))return process[_0x450b35(0x1ed)][_0x450b35(0x1fb)](_0x450b35(0x1db)),await exitWithOtelShutdown(0x0);if(_0x2deadc instanceof CliError){if(_0x2deadc['code']===_0x450b35(0x1fa))return process[_0x450b35(0x1ed)][_0x450b35(0x1fb)]('\x0a'+_0x2deadc[_0x450b35(0x1e3)]+'\x0a'),await exitWithOtelShutdown(0x0);console[_0x450b35(0x1f1)](_0x450b35(0x1e4)+_0x2deadc[_0x450b35(0x1e3)]);if(_0x2deadc[_0x450b35(0x1f7)])console[_0x450b35(0x1f1)](_0x450b35(0x1ee)+_0x2deadc[_0x450b35(0x1f7)]);return await exitWithOtelShutdown(_0x2deadc[_0x450b35(0x201)]);}return console[_0x450b35(0x1f1)](_0x450b35(0x204),_0x2deadc),await exitWithOtelShutdown(0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a13_0x5c74(_0x5ecf21,_0x33b597){_0x5ecf21=_0x5ecf21-0xbb;const _0x2809f9=a13_0x2809();let _0x5c7414=_0x2809f9[_0x5ecf21];return _0x5c7414;}const a13_0x2f0579=a13_0x5c74;function a13_0x2809(){const _0x541bb6=['Fetched\x20','stdout','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','split','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','datasetCode','success','\x20succeeded,\x20','params','appCode','.md','\x20dataset(s)\x1b[0m','some','write','output','str','length','string','7159728qDmtaX','Doc\x20generation:\x20','2120000jYxYim','generate','error','--datasetcode\x20cannot\x20be\x20empty.','validation','message','cookie','filter','padStart','4XndLwA','358674jCHqIq','has','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','Failed\x20to\x20fetch\x20datasets','!\x20No\x20datasets\x20found.','./docs','4155570mrUFKS','datasetName','2528772NVjMKi','\x20\x20•\x20','datasetcode','Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','1899779XRPOOb','813671PcHdQJ','None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20','\x1b[90m*\x20Filtered\x20','\x20failed','start','Output\x20directory\x20(default:\x20./docs)','isArray','✓\x20Generated\x20','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','join','Invalid\x20--params:\x20','\x20of\x20','Fetching\x20dataset\x20list\x20for\x20','):\x20','\x1b[0m'];a13_0x2809=function(){return _0x541bb6;};return a13_0x2809();}(function(_0x114cdc,_0x15c38d){const _0x54ae97=a13_0x5c74,_0x1ceaef=_0x114cdc();while(!![]){try{const _0x37e2f9=-parseInt(_0x54ae97(0xcf))/0x1+-parseInt(_0x54ae97(0xc2))/0x2+parseInt(_0x54ae97(0xca))/0x3*(-parseInt(_0x54ae97(0xc1))/0x4)+parseInt(_0x54ae97(0xf2))/0x5+parseInt(_0x54ae97(0xc8))/0x6+parseInt(_0x54ae97(0xce))/0x7+parseInt(_0x54ae97(0xf0))/0x8;if(_0x37e2f9===_0x15c38d)break;else _0x1ceaef['push'](_0x1ceaef['shift']());}catch(_0x49cf25){_0x1ceaef['push'](_0x1ceaef['shift']());}}}(a13_0x2809,0x6d232));import a13_0x5bdad1 from'ora';import{fetchModelList}from'../../api/fetch-model-list.js';import{generateDatasetDocs}from'../../api/api-doc.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export const apiGenerate={'service':'api','command':a13_0x2f0579(0xf3),'description':a13_0x2f0579(0xcd),'risk':a13_0x2f0579(0xeb),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a13_0x2f0579(0xec),'type':'string','description':a13_0x2f0579(0xd4)},{'name':a13_0x2f0579(0xcc),'type':a13_0x2f0579(0xef),'description':a13_0x2f0579(0xd7)},{'name':a13_0x2f0579(0xe6),'type':a13_0x2f0579(0xef),'description':a13_0x2f0579(0xc4)}],async 'execute'(_0x294d2a){const _0x7d2f6b=a13_0x2f0579,_0x20df36=_0x294d2a[_0x7d2f6b(0xed)](_0x7d2f6b(0xec))||_0x7d2f6b(0xc7),_0x49922a=_0x294d2a[_0x7d2f6b(0xed)](_0x7d2f6b(0xcc)),_0x52c10f=_0x294d2a['str'](_0x7d2f6b(0xe6));let _0x442fe3;if(_0x52c10f)try{_0x442fe3=JSON['parse'](_0x52c10f);if(typeof _0x442fe3!=='object'||_0x442fe3===null||Array[_0x7d2f6b(0xd5)](_0x442fe3))throw new Error('must\x20be\x20a\x20JSON\x20object');}catch(_0x1a3e70){throw CliErrors[_0x7d2f6b(0xbc)](_0x7d2f6b(0xd9)+(_0x1a3e70 instanceof Error?_0x1a3e70[_0x7d2f6b(0xbd)]:String(_0x1a3e70)),_0x7d2f6b(0xe0));}let _0x56dfb4;if(_0x49922a){const _0x1bb5e0=_0x49922a[_0x7d2f6b(0xe1)](',')['map'](_0x2b4704=>_0x2b4704['trim']())[_0x7d2f6b(0xbf)](_0x29bcd8=>_0x29bcd8[_0x7d2f6b(0xee)]>0x0);if(_0x1bb5e0[_0x7d2f6b(0xee)]===0x0)throw CliErrors['validation'](_0x7d2f6b(0xbb));_0x56dfb4=new Set(_0x1bb5e0),writeCliSideChannelLine('\x1b[90m*\x20Generating\x20docs\x20for:\x20'+_0x1bb5e0[_0x7d2f6b(0xd8)](',\x20')+_0x7d2f6b(0xdd));}const _0x9f4047=a13_0x5bdad1(_0x7d2f6b(0xdb)+_0x294d2a[_0x7d2f6b(0xe7)]+'...')[_0x7d2f6b(0xd3)]();let _0x1c50fe;try{({configArray:_0x1c50fe}=await fetchModelList(_0x294d2a['appCode'],_0x294d2a['cookie']),_0x9f4047['succeed'](_0x7d2f6b(0xde)+_0x1c50fe[_0x7d2f6b(0xee)]+'\x20dataset(s)'));}catch(_0x36ef7b){_0x9f4047['fail'](_0x7d2f6b(0xc5));throw _0x36ef7b;}if(_0x1c50fe[_0x7d2f6b(0xee)]===0x0)return writeCliSideChannelLine(_0x7d2f6b(0xc6)),{'ok':!![]};let _0x2a33ec=_0x1c50fe;if(_0x56dfb4){_0x2a33ec=_0x1c50fe['filter'](_0x54ca5c=>_0x56dfb4[_0x7d2f6b(0xc3)](_0x54ca5c[_0x7d2f6b(0xe3)]));const _0x2e1712=[..._0x56dfb4][_0x7d2f6b(0xbf)](_0x571b39=>!_0x1c50fe[_0x7d2f6b(0xea)](_0x4281f2=>_0x4281f2[_0x7d2f6b(0xe3)]===_0x571b39));_0x2e1712['length']>0x0&&writeCliSideChannelLine(_0x7d2f6b(0xe2)+_0x2e1712[_0x7d2f6b(0xd8)](',\x20')+_0x7d2f6b(0xdd));if(_0x2a33ec[_0x7d2f6b(0xee)]===0x0)throw CliErrors[_0x7d2f6b(0xbc)](_0x7d2f6b(0xd0)+[..._0x56dfb4]['join'](',\x20'));writeCliSideChannelLine(_0x7d2f6b(0xd1)+_0x2a33ec[_0x7d2f6b(0xee)]+_0x7d2f6b(0xda)+_0x1c50fe[_0x7d2f6b(0xee)]+_0x7d2f6b(0xe9));}let _0x353163=0x0;const _0x28c129=await generateDatasetDocs(_0x2a33ec,_0x294d2a[_0x7d2f6b(0xe7)],_0x294d2a[_0x7d2f6b(0xbe)],_0x20df36,(_0x316b95,_0x5d3603,_0x15d83b)=>{const _0x53df69=_0x7d2f6b;_0x353163=_0x316b95,process[_0x53df69(0xdf)]['write']('\x0d\x20\x20['+String(_0x316b95)[_0x53df69(0xc0)](String(_0x5d3603)['length'])+'/'+_0x5d3603+']\x20'+_0x15d83b+_0x53df69(0xe8));},_0x442fe3);if(_0x353163>0x0)process[_0x7d2f6b(0xdf)][_0x7d2f6b(0xeb)]('\x0a');const _0x224199=_0x28c129[_0x7d2f6b(0xbf)](_0x19a20f=>_0x19a20f[_0x7d2f6b(0xe4)])['length'],_0x335f9b=_0x28c129[_0x7d2f6b(0xbf)](_0x46a7f7=>!_0x46a7f7[_0x7d2f6b(0xe4)])[_0x7d2f6b(0xee)];writeCliSideChannelLine(''),writeCliSideChannelLine(_0x7d2f6b(0xd6)+_0x224199+'\x20doc(s)\x20in\x20'+_0x20df36);if(_0x335f9b>0x0){writeCliSideChannelLine('!\x20'+_0x335f9b+'\x20doc(s)\x20failed');for(const _0xae9482 of _0x28c129[_0x7d2f6b(0xbf)](_0x21c566=>!_0x21c566[_0x7d2f6b(0xe4)])){writeCliSideChannelLine(_0x7d2f6b(0xcb)+_0xae9482[_0x7d2f6b(0xc9)]+'\x20('+_0xae9482['datasetCode']+_0x7d2f6b(0xdc)+_0xae9482[_0x7d2f6b(0xf4)]);}}return{'ok':_0x335f9b===0x0,'message':_0x335f9b>0x0?_0x7d2f6b(0xf1)+_0x224199+_0x7d2f6b(0xe5)+_0x335f9b+_0x7d2f6b(0xd2):'Doc\x20generation\x20complete:\x20'+_0x224199+'\x20file(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3b8f5e,_0x253f43){const _0x4f992e=a14_0x44ab,_0x32f211=_0x3b8f5e();while(!![]){try{const _0x2ac2b2=-parseInt(_0x4f992e(0x19c))/0x1+parseInt(_0x4f992e(0x19b))/0x2+parseInt(_0x4f992e(0x19a))/0x3*(parseInt(_0x4f992e(0x195))/0x4)+-parseInt(_0x4f992e(0x199))/0x5*(parseInt(_0x4f992e(0x19e))/0x6)+parseInt(_0x4f992e(0x196))/0x7*(parseInt(_0x4f992e(0x19f))/0x8)+parseInt(_0x4f992e(0x198))/0x9*(-parseInt(_0x4f992e(0x197))/0xa)+parseInt(_0x4f992e(0x19d))/0xb;if(_0x2ac2b2===_0x253f43)break;else _0x32f211['push'](_0x32f211['shift']());}catch(_0x1bc975){_0x32f211['push'](_0x32f211['shift']());}}}(a14_0x184b,0xb7210));import{apiList}from'../../commands/api/list.js';function a14_0x44ab(_0x4349a4,_0x26d036){_0x4349a4=_0x4349a4-0x195;const _0x184ba5=a14_0x184b();let _0x44abc8=_0x184ba5[_0x4349a4];return _0x44abc8;}import{apiPull}from'../../commands/api/pull.js';import{apiGenerate}from'../../commands/api/generate.js';export const apiDefinitions=[apiList,apiPull,apiGenerate];function a14_0x184b(){const _0x21ce21=['2949706uEsUAN','109998XwkEHg','5839801NcCxhA','6819702eXoPAB','8lIyZSd','4frqILq','5883073jgxIyU','17970RMCIlY','6525UlWshs','5tvsyZn','1360059GVakUc'];a14_0x184b=function(){return _0x21ce21;};return a14_0x184b();}
|
package/lib/commands/api/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x18ccea=a15_0x1899;(function(_0x3f247b,_0x58b7d){const _0x58705a=a15_0x1899,_0x130d84=_0x3f247b();while(!![]){try{const _0x3d7a4e=parseInt(_0x58705a(0x15e))/0x1+parseInt(_0x58705a(0x174))/0x2*(-parseInt(_0x58705a(0x16a))/0x3)+parseInt(_0x58705a(0x168))/0x4*(parseInt(_0x58705a(0x171))/0x5)+-parseInt(_0x58705a(0x15d))/0x6+parseInt(_0x58705a(0x16e))/0x7*(parseInt(_0x58705a(0x161))/0x8)+parseInt(_0x58705a(0x16c))/0x9*(parseInt(_0x58705a(0x16d))/0xa)+-parseInt(_0x58705a(0x163))/0xb*(parseInt(_0x58705a(0x15f))/0xc);if(_0x3d7a4e===_0x58b7d)break;else _0x130d84['push'](_0x130d84['shift']());}catch(_0x3c32ab){_0x130d84['push'](_0x130d84['shift']());}}}(a15_0x3dfc,0x4ffbc));import{initEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a15_0x1899(_0x59ab51,_0x4b7319){_0x59ab51=_0x59ab51-0x15b;const _0x3dfc6c=a15_0x3dfc();let _0x189981=_0x3dfc6c[_0x59ab51];return _0x189981;}import{resolveTargetApps}from'../../commands/api/shared.js';export const apiList={'service':a15_0x18ccea(0x160),'command':'list','description':a15_0x18ccea(0x173),'risk':a15_0x18ccea(0x164),'requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0x18ccea(0x170),'type':a15_0x18ccea(0x166),'description':'Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','default':![]}],async 'execute'(_0x4afeda){const _0x103cb3=a15_0x18ccea,_0x42982a=_0x4afeda['rawFlags'][_0x103cb3(0x15b)]?String(_0x4afeda[_0x103cb3(0x16f)][_0x103cb3(0x15b)]):undefined,_0x5765c1=resolveTargetApps(_0x4afeda,_0x42982a);if(_0x5765c1){const _0x26cbbc=[];for(const _0x5dc0e5 of _0x5765c1){const _0x26e928=_0x5dc0e5[_0x103cb3(0x15c)]||_0x4afeda[_0x103cb3(0x15c)],_0x1dd955=_0x5dc0e5[_0x103cb3(0x169)]||_0x103cb3(0x165);initEnv(_0x1dd955);const {configArray:_0x12212f}=await fetchModelList(_0x5dc0e5[_0x103cb3(0x15b)],_0x26e928);_0x26cbbc['push'](..._0x12212f[_0x103cb3(0x172)](_0x47c4f5=>({..._0x47c4f5,'_appName':_0x5dc0e5[_0x103cb3(0x16b)],'_appCode':_0x5dc0e5[_0x103cb3(0x15b)],'_env':_0x1dd955,'_isDefault':_0x5dc0e5[_0x103cb3(0x167)]})));}return{'ok':!![],'data':_0x26cbbc};}const {configArray:_0x11c299}=await fetchModelList(_0x4afeda[_0x103cb3(0x162)],_0x4afeda['cookie']);return{'ok':!![],'data':_0x11c299};}};function a15_0x3dfc(){const _0x392e00=['rawFlags','global','1612565eXiSZH','map','List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','2TSCSPE','appcode','cookie','2183370ZXOtvQ','389232unlPAy','1948884taGQxQ','api','72eXpejd','appCode','11ZRTWUT','read','production','boolean','isDefault','4jQYuGL','env','598413MYqyLV','name','920943tDfKoB','30Tnqiwk','26957AuVEil'];a15_0x3dfc=function(){return _0x392e00;};return a15_0x3dfc();}
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x497b38=a16_0x387f;(function(_0x4dd946,_0x45888a){const _0x39fd5d=a16_0x387f,_0x29cca5=_0x4dd946();while(!![]){try{const _0x3a5820=parseInt(_0x39fd5d(0x1dc))/0x1*(-parseInt(_0x39fd5d(0x1eb))/0x2)+parseInt(_0x39fd5d(0x1c7))/0x3+parseInt(_0x39fd5d(0x1fc))/0x4+parseInt(_0x39fd5d(0x1f0))/0x5+-parseInt(_0x39fd5d(0x1d2))/0x6*(parseInt(_0x39fd5d(0x1cf))/0x7)+-parseInt(_0x39fd5d(0x1f3))/0x8*(-parseInt(_0x39fd5d(0x1ee))/0x9)+parseInt(_0x39fd5d(0x1d4))/0xa*(-parseInt(_0x39fd5d(0x1cd))/0xb);if(_0x3a5820===_0x45888a)break;else _0x29cca5['push'](_0x29cca5['shift']());}catch(_0x4c8444){_0x29cca5['push'](_0x29cca5['shift']());}}}(a16_0x250f,0xddf9e));import a16_0x28a699 from'ora';import a16_0x5b532d from'node:path';import{initEnv,getEnv}from'../../constant/env.js';function a16_0x387f(_0x44cfe4,_0x386c1c){_0x44cfe4=_0x44cfe4-0x1c6;const _0x250f3f=a16_0x250f();let _0x387fb8=_0x250f3f[_0x44cfe4];return _0x387fb8;}function a16_0x250f(){const _0x52b76f=['start','\x20dataset(s),\x20generated\x20','join','Pulled\x20','146091COCptI','rawFlags','378231EdIbSq','name','Failed:\x20','66xoeLkD','.ts','260kNxDLQ','clientFilePath','api','Done:\x20','pull','succeed','write','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','449wvrBXk','string','modelCount','\x20model(s)','Pulling\x20','fail','-api','isDefault','\x20app(s)\x20failed','cookie','\x20succeeded,\x20','output','env','production','Output\x20directory\x20(default:\x20','3356AMrJfo','\x20failed','message','126kCdGZx','includes','373945MVKJYA','length','global','352000XKYntm','\x20\x20•\x20','\x20dataset(s)\x20→\x20',')...','appcode','-client','client','apiDir','split','5205180nHzsLw','apiFilePath','Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20(','appCode','1830663sIxcuH','slice'];a16_0x250f=function(){return _0x52b76f;};return a16_0x250f();}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':'api','command':a16_0x497b38(0x1d8),'description':a16_0x497b38(0x1fe)+DEFAULT_API_DIR+'/)','risk':a16_0x497b38(0x1da),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a16_0x497b38(0x1e7),'type':a16_0x497b38(0x1dd),'description':a16_0x497b38(0x1ea)+DEFAULT_API_DIR+'/)'},{'name':a16_0x497b38(0x1f2),'type':'boolean','description':a16_0x497b38(0x1db),'default':![]}],async 'execute'(_0xdf3e3b){const _0x4572ea=a16_0x497b38,_0x509eff=_0xdf3e3b['rawFlags'][_0x4572ea(0x1f7)]?String(_0xdf3e3b[_0x4572ea(0x1ce)]['appcode']):undefined,_0x578e24=_0xdf3e3b['str'](_0x4572ea(0x1e7))||undefined,_0x2d8021=resolveTargetApps(_0xdf3e3b,_0x509eff);if(_0x2d8021){let _0x468f4d=0x0,_0x2a0879=0x0;for(const _0x1be12c of _0x2d8021){const _0xf1a6c9=_0x1be12c[_0x4572ea(0x1e5)]||_0xdf3e3b[_0x4572ea(0x1e5)],_0x27e484=_0x1be12c[_0x4572ea(0x1e8)]||_0x4572ea(0x1e9);initEnv(_0x27e484);const _0x37dada=_0x1be12c[_0x4572ea(0x1fa)]||_0x578e24||_0xdf3e3b['apiDir']||DEFAULT_API_DIR,_0x56a5d9=_0x1be12c[_0x4572ea(0x1e3)]?'':_0x1be12c[_0x4572ea(0x1d0)]||_0x1be12c['appcode'],_0x227fc6=a16_0x28a699(_0x4572ea(0x1e0)+_0x1be12c[_0x4572ea(0x1d0)]+'\x20('+_0x1be12c[_0x4572ea(0x1f7)]+_0x4572ea(0x1f6))['start']();try{const {configArray:_0x562b89}=await fetchModelList(_0x1be12c[_0x4572ea(0x1f7)],_0xf1a6c9),_0x1eb3ac=await generateApiFile(_0x562b89,_0x56a5d9,_0x1be12c['appcode'],_0x1be12c[_0x4572ea(0x1e3)],_0x27e484,_0x37dada,_0x1be12c[_0x4572ea(0x1d0)]);_0x227fc6[_0x4572ea(0x1d9)](_0x1be12c[_0x4572ea(0x1d0)]+':\x20'+_0x562b89[_0x4572ea(0x1f1)]+_0x4572ea(0x1f5)+_0x1eb3ac[_0x4572ea(0x1de)]+_0x4572ea(0x1df)),writeCliSideChannelLine(_0x4572ea(0x1f4)+_0x1eb3ac[_0x4572ea(0x1fd)]),writeCliSideChannelLine(_0x4572ea(0x1f4)+_0x1eb3ac[_0x4572ea(0x1d5)]),_0x468f4d++;}catch(_0x488f60){_0x227fc6[_0x4572ea(0x1e1)](_0x1be12c[_0x4572ea(0x1d0)]+':\x20'+(_0x488f60 instanceof Error?_0x488f60['message']:String(_0x488f60))),_0x2a0879++;}}writeCliSideChannelLine('');if(_0x2a0879>0x0)writeCliSideChannelLine('!\x20'+_0x2a0879+_0x4572ea(0x1e4));return{'ok':_0x2a0879===0x0,'message':_0x4572ea(0x1d7)+_0x468f4d+_0x4572ea(0x1e6)+_0x2a0879+_0x4572ea(0x1ec)};}const _0x118a93=_0x509eff&&_0x509eff[_0x4572ea(0x1ef)]('-')?_0x509eff[_0x4572ea(0x1fb)]('-')[_0x4572ea(0x1c8)](0x1)['join']('-'):'',_0x5854ec=_0x578e24||_0xdf3e3b[_0x4572ea(0x1fa)]||DEFAULT_API_DIR,_0x71c6c9=!_0x509eff,_0x569fee=a16_0x28a699('Pulling\x20API\x20config\x20for\x20'+_0xdf3e3b[_0x4572ea(0x1c6)]+'...')[_0x4572ea(0x1c9)]();try{const {configArray:_0x2322ee}=await fetchModelList(_0xdf3e3b[_0x4572ea(0x1c6)],_0xdf3e3b['cookie']),_0x194d06=await generateApiFile(_0x2322ee,_0x118a93,_0xdf3e3b['appCode'],_0x71c6c9,getEnv(),_0x5854ec);_0x569fee[_0x4572ea(0x1d9)](_0x4572ea(0x1cc)+_0x2322ee[_0x4572ea(0x1f1)]+_0x4572ea(0x1ca)+_0x194d06[_0x4572ea(0x1de)]+'\x20model(s)');const _0xc329e2=_0x118a93?_0x118a93+_0x4572ea(0x1e2):_0x4572ea(0x1d6),_0x49ff37=_0x118a93?_0x118a93+_0x4572ea(0x1f8):_0x4572ea(0x1f9);return writeCliSideChannelLine(_0x4572ea(0x1f4)+a16_0x5b532d[_0x4572ea(0x1cb)](_0x5854ec,_0xc329e2+_0x4572ea(0x1d3))),writeCliSideChannelLine(_0x4572ea(0x1f4)+a16_0x5b532d[_0x4572ea(0x1cb)](_0x5854ec,_0x49ff37+_0x4572ea(0x1d3))),{'ok':!![],'data':{'datasetCount':_0x2322ee[_0x4572ea(0x1f1)],'modelCount':_0x194d06[_0x4572ea(0x1de)]}};}catch(_0x4363af){_0x569fee[_0x4572ea(0x1e1)](_0x4572ea(0x1d1)+(_0x4363af instanceof Error?_0x4363af[_0x4572ea(0x1ed)]:String(_0x4363af)));throw _0x4363af;}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a17_0x26a2(){const _0x111489=['44vpJHux','global','5010894ClmgGr','163544hcxeIj','3cBpMCd','map','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','15UMrgHF','1156458DcBIoD','459nxWwJM','5639OgszsY','bool','230SbQCGC','project','merged','5105136iDdGZX','2532588JVbPbL','length','validation','selectedAppName','App\x20\x22','name','17410hnOvJE'];a17_0x26a2=function(){return _0x111489;};return a17_0x26a2();}(function(_0x161323,_0x3d9097){const _0x49f29e=a17_0x45c0,_0x29260b=_0x161323();while(!![]){try{const _0x55e763=parseInt(_0x49f29e(0xe7))/0x1*(-parseInt(_0x49f29e(0xe9))/0x2)+-parseInt(_0x49f29e(0xf8))/0x3*(-parseInt(_0x49f29e(0xf7))/0x4)+-parseInt(_0x49f29e(0xe4))/0x5*(-parseInt(_0x49f29e(0xe5))/0x6)+parseInt(_0x49f29e(0xf6))/0x7+parseInt(_0x49f29e(0xec))/0x8+-parseInt(_0x49f29e(0xe6))/0x9*(parseInt(_0x49f29e(0xf3))/0xa)+-parseInt(_0x49f29e(0xf4))/0xb*(parseInt(_0x49f29e(0xed))/0xc);if(_0x55e763===_0x3d9097)break;else _0x29260b['push'](_0x29260b['shift']());}catch(_0x1c4f4b){_0x29260b['push'](_0x29260b['shift']());}}}(a17_0x26a2,0x5f9cb));import{getMultiAppConfigs}from'../../utils/config.js';function a17_0x45c0(_0x4c4321,_0x13133a){_0x4c4321=_0x4c4321-0xe4;const _0x26a293=a17_0x26a2();let _0x45c005=_0x26a293[_0x4c4321];return _0x45c005;}import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x46bdf0,_0x37a43e){const _0x30d5a6=a17_0x45c0;if(_0x37a43e)return null;const _0x134840=_0x46bdf0[_0x30d5a6(0xe8)](_0x30d5a6(0xf5))?_0x30d5a6(0xeb):_0x30d5a6(0xea);let _0x102b70=getMultiAppConfigs(_0x134840);if(!_0x102b70||_0x102b70[_0x30d5a6(0xee)]===0x0)return null;if(_0x46bdf0['selectedAppName']){const _0x210af6=_0x102b70['filter'](_0x231271=>_0x231271[_0x30d5a6(0xf2)]===_0x46bdf0[_0x30d5a6(0xf0)]);if(_0x210af6[_0x30d5a6(0xee)]===0x0){const _0x4222d4=_0x102b70[_0x30d5a6(0xf9)](_0x3ef702=>_0x3ef702[_0x30d5a6(0xf2)])['join'](',\x20');throw CliErrors[_0x30d5a6(0xef)](_0x30d5a6(0xf1)+_0x46bdf0[_0x30d5a6(0xf0)]+_0x30d5a6(0xfa)+_0x4222d4);}_0x102b70=_0x210af6;}return _0x102b70;}
|
package/lib/commands/app/add.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a18_0x202b38=a18_0xcbfd;(function(_0x36557c,_0x29c828){const _0x49b427=a18_0xcbfd,_0x10453f=_0x36557c();while(!![]){try{const _0x29494f=parseInt(_0x49b427(0xd5))/0x1+parseInt(_0x49b427(0xde))/0x2*(-parseInt(_0x49b427(0xd6))/0x3)+-parseInt(_0x49b427(0xd3))/0x4*(-parseInt(_0x49b427(0xe1))/0x5)+parseInt(_0x49b427(0xef))/0x6*(parseInt(_0x49b427(0xdf))/0x7)+-parseInt(_0x49b427(0xda))/0x8+-parseInt(_0x49b427(0xe7))/0x9+parseInt(_0x49b427(0xe5))/0xa;if(_0x29494f===_0x29c828)break;else _0x10453f['push'](_0x10453f['shift']());}catch(_0x25b484){_0x10453f['push'](_0x10453f['shift']());}}}(a18_0x838c,0x8425d));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(_0x43c904){const _0x5d5ce9=a18_0xcbfd,_0x4991b8=_0x43c904[_0x5d5ce9(0xf1)][0x0]?.[_0x5d5ce9(0xe4)]();if(!_0x4991b8)throw CliErrors['validation'](_0x5d5ce9(0xe9),_0x5d5ce9(0xdd)+CLI_BIN_NAME+_0x5d5ce9(0xea));}async function execute(_0x5806da){const _0x306fdc=a18_0xcbfd,_0x5588fc=_0x5806da[_0x306fdc(0xf1)][0x0]?.[_0x306fdc(0xe4)]();if(!_0x5588fc)throw CliErrors[_0x306fdc(0xeb)](_0x306fdc(0xe9),_0x306fdc(0xdd)+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20<code>');const _0x45b2fb=_0x5806da[_0x306fdc(0xe0)]('appcode');if(!_0x45b2fb)throw CliErrors[_0x306fdc(0xf0)](_0x306fdc(0xe6),_0x306fdc(0xdd)+CLI_BIN_NAME+_0x306fdc(0xea));const _0x41331b={'global':_0x5806da[_0x306fdc(0xe2)](_0x306fdc(0xd9))},_0x1481c2=readConfig(_0x41331b);if(!_0x1481c2[_0x306fdc(0xf2)])_0x1481c2[_0x306fdc(0xf2)]={};const _0x3cb7fd={'appcode':_0x45b2fb,...collectAppProfileOverrides(_0x217949=>_0x5806da[_0x306fdc(0xe0)](_0x217949))},_0x2a04d0=_0x1481c2[_0x306fdc(0xf2)],_0x5f1f6b=!!_0x2a04d0[_0x5588fc];_0x2a04d0[_0x5588fc]=_0x3cb7fd;if(!_0x1481c2[_0x306fdc(0xdc)])_0x1481c2[_0x306fdc(0xdc)]=_0x5588fc;writeConfig(_0x1481c2,_0x41331b);const _0x1eb7c7=!_0x5f1f6b&&_0x1481c2[_0x306fdc(0xdc)]===_0x5588fc?'\x20Set\x20as\x20default\x20app.':'',_0x3107c7=(_0x5f1f6b?_0x306fdc(0xec):_0x306fdc(0xee))+_0x306fdc(0xed)+_0x5588fc+_0x306fdc(0xd7)+_0x45b2fb+')'+scopeLabel(_0x41331b)+'.'+_0x1eb7c7;return{'ok':!![],'message':_0x3107c7};}function a18_0xcbfd(_0x58ee95,_0x1c3504){_0x58ee95=_0x58ee95-0xd3;const _0x838cee=a18_0x838c();let _0xcbfd54=_0x838cee[_0x58ee95];return _0xcbfd54;}export const appAddDefinition={'service':a18_0x202b38(0xd4),'command':'add','description':a18_0x202b38(0xe8),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a18_0x202b38(0xd8),'required':!![]}],'flags':[{'name':a18_0x202b38(0xe6),'type':'string','description':a18_0x202b38(0xe3),'required':!![]},{'name':'global','type':'boolean','description':a18_0x202b38(0xdb),'default':![]},...getAppProfileFlagDefs()],'validate':validateArgs,'execute':execute};function a18_0x838c(){const _0x4aee18=['app','1042510RYswGf','3vWOBuo','\x22\x20(appcode:\x20','App\x20profile\x20name','global','8342104LNurBX','Use\x20global\x20config\x20scope','defaultApp','Usage:\x20','976802GElCNk','4479104WEgeLn','str','5324815VaUkTK','bool','App\x20code','trim','3270300QCLxcr','appcode','9017406HLXNyS','Add\x20or\x20update\x20an\x20app\x20in\x20config','Missing\x20app\x20name.','\x20app\x20add\x20<name>\x20--appcode\x20<code>','validation','Updated','\x20app\x20\x22','Added','6pNdrBQ','flagMissing','args','apps','4TORkOP'];a18_0x838c=function(){return _0x4aee18;};return a18_0x838c();}
|