@lovrabet/rabetbase-cli 2.1.10-beta.3 → 2.1.11
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 +1 -2
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x3a4f34=a0_0x16c2;(function(_0x2a162e,_0x3e4834){const _0x8ca8ec=a0_0x16c2,_0x5bea9a=_0x2a162e();while(!![]){try{const _0xb8ef8a=parseInt(_0x8ca8ec(0x1f5))/0x1+parseInt(_0x8ca8ec(0x1fe))/0x2+parseInt(_0x8ca8ec(0x20b))/0x3*(parseInt(_0x8ca8ec(0x201))/0x4)+-parseInt(_0x8ca8ec(0x1f7))/0x5*(-parseInt(_0x8ca8ec(0x208))/0x6)+-parseInt(_0x8ca8ec(0x1f4))/0x7*(parseInt(_0x8ca8ec(0x20c))/0x8)+-parseInt(_0x8ca8ec(0x206))/0x9+-parseInt(_0x8ca8ec(0x200))/0xa*(-parseInt(_0x8ca8ec(0x1fb))/0xb);if(_0xb8ef8a===_0x3e4834)break;else _0x5bea9a['push'](_0x5bea9a['shift']());}catch(_0x4ef54f){_0x5bea9a['push'](_0x5bea9a['shift']());}}}(a0_0x264d,0x939cc));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x104012 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(_0x25ff81){const _0x5d75c0=a0_0x16c2,{appCode:_0x1de976,cookie:_0xaaa2cf,datasetCode:_0x7a0fbd,datasetId:_0x51e9f4,extraParams:_0x2f6ba3}=_0x25ff81,_0x938612=getApiDomain()+_0x5d75c0(0x204),_0xdfdcaf=await platformFetch(_0x938612,{'method':'POST','body':{'appCode':_0x1de976,'datasetCode':_0x7a0fbd,'datasetId':_0x51e9f4,..._0x2f6ba3||{}},'cookie':_0xaaa2cf,'label':_0x5d75c0(0x1f8)+_0x7a0fbd+')'});if(!_0xdfdcaf||typeof _0xdfdcaf['markdown']!=='string')throw new Error(_0x5d75c0(0x1fc)+_0x7a0fbd+_0x5d75c0(0x209));return _0xdfdcaf['markdown'];}function delay(_0x1204ab){return new Promise(_0x186b37=>setTimeout(_0x186b37,_0x1204ab));}function a0_0x16c2(_0x28a169,_0xecb1a7){_0x28a169=_0x28a169-0x1f4;const _0x264d79=a0_0x264d();let _0x16c29f=_0x264d79[_0x28a169];return _0x16c29f;}export async function generateDatasetDocs(_0xcfa050,_0x319ffc,_0x269f75,_0x3d86ce=a0_0x3a4f34(0x212),_0x588508,_0x1cc421){const _0x3cb893=a0_0x3a4f34;mkdirSync(_0x3d86ce,{'recursive':!![]});const _0x3267bd=[],_0x5d454b=_0xcfa050[_0x3cb893(0x207)];console[_0x3cb893(0x1f9)]('\x0a'+_0x5d454b+_0x3cb893(0x213));for(let _0x4c0264=0x0;_0x4c0264<_0xcfa050['length'];_0x4c0264++){const _0x3771cb=_0xcfa050[_0x4c0264],_0x3e6547=_0x4c0264+0x1,_0x3503b8=_0x3771cb['tableName'];try{console['log']('['+_0x3e6547+'/'+_0x5d454b+']\x20Generating:\x20'+_0x3503b8+'.md\x20('+_0x3771cb[_0x3cb893(0x1f6)]+')');if(_0x588508)_0x588508(_0x3e6547,_0x5d454b,_0x3503b8);const _0x5f1444=await fetchDatasetDoc({'appCode':_0x319ffc,'cookie':_0x269f75,'datasetCode':_0x3771cb['datasetCode'],'datasetId':_0x3771cb['id'],'enableAI':![],'extraParams':_0x1cc421}),_0x2f984b=a0_0x104012[_0x3cb893(0x20f)](_0x3d86ce,_0x3503b8+_0x3cb893(0x1ff));writeFileSync(_0x2f984b,_0x5f1444,{'encoding':'utf8'}),console[_0x3cb893(0x1f9)]('✓\x20Generated:\x20'+_0x3503b8+_0x3cb893(0x1ff)),logger[_0x3cb893(0x20d)](_0x3cb893(0x205),'生成文档成功:\x20'+_0x3503b8,undefined,{'datasetCode':_0x3771cb['datasetCode'],'datasetName':_0x3771cb[_0x3cb893(0x1f6)],'filePath':_0x2f984b,'progress':_0x3e6547+'/'+_0x5d454b}),_0x3267bd[_0x3cb893(0x20a)]({'datasetCode':_0x3771cb[_0x3cb893(0x210)],'datasetName':_0x3771cb[_0x3cb893(0x1f6)],'filePath':_0x2f984b,'success':!![]});if(_0x3e6547<_0x5d454b)await delay(0x1388);}catch(_0x5cd9a6){const _0x2afa25=_0x5cd9a6 instanceof Error?_0x5cd9a6[_0x3cb893(0x202)]:String(_0x5cd9a6);console[_0x3cb893(0x1f9)](_0x3cb893(0x1fd)+_0x3503b8+_0x3cb893(0x203)+_0x2afa25),logger[_0x3cb893(0x1fa)](_0x3cb893(0x205),_0x3cb893(0x211)+_0x3771cb[_0x3cb893(0x210)],{'datasetCode':_0x3771cb[_0x3cb893(0x210)],'datasetName':_0x3771cb[_0x3cb893(0x1f6)],'error':_0x2afa25,'progress':_0x3e6547+'/'+_0x5d454b}),_0x3267bd[_0x3cb893(0x20a)]({'datasetCode':_0x3771cb[_0x3cb893(0x210)],'datasetName':_0x3771cb['name'],'filePath':'','success':![],'error':_0x2afa25}),_0x3e6547<_0x5d454b&&(console[_0x3cb893(0x1f9)](_0x3cb893(0x20e)),await delay(0xbb8));}}return _0x3267bd;}function a0_0x264d(){const _0x1e3c0a=['message','.md\x20-\x20','/api/node-toolbox/api-doc-generator','api-doc','5185287JojgUz','length','78lBZOAx','):\x20missing\x20data.markdown\x20field','push','474SnElde','2792CiXukR','success','Waiting\x203\x20seconds...\x0a','join','datasetCode','生成文档失败:\x20','./docs','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','19180rsHJuA','618876FmtZGU','name','317565hgfTBL','Fetch\x20doc\x20(','log','error','11Ihlvff','Invalid\x20response\x20format\x20(','✗\x20Failed:\x20','126574NLumqm','.md','5626730mHzuDn','1684UYvHUe'];a0_0x264d=function(){return _0x1e3c0a;};return a0_0x264d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a1_0x45fa(){const _0x22a6b6=['130jFrWbU','&otype=array','3523160ZEecJc','49542PxsbXY','957847gZVbHZ','196XhCGix','/api/node-toolbox/dataset/model-list?appcode=','7zRpaHG','2509278wqYpYS','trim','正在从服务器拉取模型列表...\x20(环境:\x20','9709209NFdayc','8LqDWGN','1213920TIOnhI','Fetch\x20datasets','map','info','fetch-model-list','length','replace','configArray','4735yCvumE','name'];a1_0x45fa=function(){return _0x22a6b6;};return a1_0x45fa();}(function(_0x3c5d8e,_0x40aec4){const _0x1600bd=a1_0x5cae,_0xe1aa66=_0x3c5d8e();while(!![]){try{const _0x3e569f=parseInt(_0x1600bd(0x1f9))/0x1*(-parseInt(_0x1600bd(0x1e4))/0x2)+parseInt(_0x1600bd(0x1e7))/0x3*(parseInt(_0x1600bd(0x1e9))/0x4)+parseInt(_0x1600bd(0x1e6))/0x5+-parseInt(_0x1600bd(0x1ec))/0x6*(-parseInt(_0x1600bd(0x1eb))/0x7)+parseInt(_0x1600bd(0x1f0))/0x8*(-parseInt(_0x1600bd(0x1ef))/0x9)+parseInt(_0x1600bd(0x1f1))/0xa+-parseInt(_0x1600bd(0x1e8))/0xb;if(_0x3e569f===_0x40aec4)break;else _0xe1aa66['push'](_0xe1aa66['shift']());}catch(_0x480d00){_0xe1aa66['push'](_0xe1aa66['shift']());}}}(a1_0x45fa,0x8d8ba));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(_0x255ce5){const _0x152cd2=a1_0x5cae;return _0x255ce5[_0x152cd2(0x1f7)](/[\r\n]+/g,'\x20')[_0x152cd2(0x1ed)]();}function cleanDatasetName(_0x59e0ca){const _0x5ba9e9=a1_0x5cae;if(!_0x59e0ca[_0x5ba9e9(0x1fa)])return _0x59e0ca;return{..._0x59e0ca,'name':cleanNewlines(_0x59e0ca[_0x5ba9e9(0x1fa)])};}function a1_0x5cae(_0x3f924f,_0x2ad83a){_0x3f924f=_0x3f924f-0x1e4;const _0x45fa52=a1_0x45fa();let _0x5cae73=_0x45fa52[_0x3f924f];return _0x5cae73;}export async function fetchModelList(_0x24a5ba,_0x22117d){const _0x195a9a=a1_0x5cae,_0x1dcfd4=getEnv(),_0x59d88f=getApiDomain()+_0x195a9a(0x1ea)+_0x24a5ba+_0x195a9a(0x1e5);logger[_0x195a9a(0x1f4)](_0x195a9a(0x1f5),_0x195a9a(0x1ee)+_0x1dcfd4+')',{'apiUrl':_0x59d88f});const _0x1198ec=await platformFetch(_0x59d88f,{'cookie':_0x22117d,'label':_0x195a9a(0x1f2)}),_0x72419=(_0x1198ec[_0x195a9a(0x1f8)]??[])[_0x195a9a(0x1f3)](cleanDatasetName);return{'configArray':_0x72419,'count':_0x72419[_0x195a9a(0x1f6)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x36c198,_0x49cc45){const _0x48530b=a2_0x2a29,_0x453c26=_0x36c198();while(!![]){try{const _0x2c0cf2=parseInt(_0x48530b(0x1c3))/0x1+parseInt(_0x48530b(0x1e7))/0x2+parseInt(_0x48530b(0x1c2))/0x3*(-parseInt(_0x48530b(0x1d3))/0x4)+parseInt(_0x48530b(0x1c5))/0x5*(parseInt(_0x48530b(0x1e1))/0x6)+-parseInt(_0x48530b(0x1ca))/0x7*(parseInt(_0x48530b(0x1d0))/0x8)+-parseInt(_0x48530b(0x1c6))/0x9*(-parseInt(_0x48530b(0x1e4))/0xa)+parseInt(_0x48530b(0x1c9))/0xb;if(_0x2c0cf2===_0x49cc45)break;else _0x453c26['push'](_0x453c26['shift']());}catch(_0xb4a20a){_0x453c26['push'](_0x453c26['shift']());}}}(a2_0x5a71,0x8566b));function a2_0x5a71(){const _0x9a08b7=['replaceApiContent','{\x20apiConfigName:\x20','4CNMIdD','init-api',',\x20env:\x20\x22','templates/generate-api','client','replace','-api','client.ts.tpl','format','api','\x20config\x20set\x20app\x20<value>`','key','forEach','.ts','108aEkrjf','-client','dirname','50yJuhnx','push','alias','584266yuWaGv','Please\x20configure\x20app\x20code\x20first\x20via\x20`','3156315JbDiGe','149740bTcuTr','LOVRABET','230455gnbAeu','899523zSmUtA','utf8','join','1681405fatxvB','91aUwIwt','\x22\x20}','test','typescript','CONFIG_NAMES.DEFAULT','name','200360ICGEBR'];a2_0x5a71=function(){return _0x9a08b7;};return a2_0x5a71();}import a2_0x4ceb7a from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a2_0x172859 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_0x2a29(_0x46c5d3,_0x5cf8fb){_0x46c5d3=_0x46c5d3-0x1c1;const _0x5a71fd=a2_0x5a71();let _0x2a29a4=_0x5a71fd[_0x46c5d3];return _0x2a29a4;}export async function generateApiFile(_0x172095,_0x1e9b7f,_0x1a80b6,_0x3d6bd8,_0x495fc1,_0x33d2b5,_0x3e472a){const _0x38ee49=a2_0x2a29;if(!_0x1a80b6)throw new Error(_0x38ee49(0x1c1)+CLI_BIN_NAME+_0x38ee49(0x1dd));const _0x38bc0b=_0x3d6bd8&&!_0x3e472a,_0xc41cc8=_0x3e472a||_0x1a80b6,_0xfe1395=_0x38bc0b?_0x38ee49(0x1ce):'\x22'+_0xc41cc8+'\x22',_0x1b89bf=!isProduction(_0x495fc1);let _0x1240d4;if(_0x38bc0b)_0x1b89bf?_0x1240d4=_0x38ee49(0x1d2)+_0xfe1395+_0x38ee49(0x1d5)+_0x495fc1+_0x38ee49(0x1cb):_0x1240d4='';else{const _0x6e70b3=_0x1b89bf?_0x38ee49(0x1d5)+_0x495fc1+'\x22':'';_0x1240d4='{\x20apiConfigName:\x20\x22'+_0xc41cc8+'\x22'+_0x6e70b3+'\x20}';}const _0xf3db38=_0x1e9b7f?_0x1e9b7f+_0x38ee49(0x1d9):_0x38ee49(0x1dc),_0x8299c9=_0x1e9b7f?_0x1e9b7f+_0x38ee49(0x1e2):_0x38ee49(0x1d7),_0x53215c=_0x1e9b7f&&!/^app-[a-f0-9]+$/i[_0x38ee49(0x1cc)](_0x1e9b7f)?_0x1e9b7f[_0x38ee49(0x1d8)](/-/g,'_')['toUpperCase']():_0x38ee49(0x1c4),_0x4934ed=[];_0x172095[_0x38ee49(0x1df)](_0x2d610f=>{const _0xf0abc7=_0x38ee49;_0x4934ed[_0xf0abc7(0x1e5)]({'datasetCode':_0x2d610f['datasetCode'],'tableName':_0x2d610f['tableName'],'name':_0x2d610f[_0xf0abc7(0x1cf)]||'','alias':_0x2d610f[_0xf0abc7(0x1e6)]||_0x2d610f[_0xf0abc7(0x1de)]});});const _0x1d0954=fileURLToPath(import.meta.url),_0x23b05e=a2_0x172859['resolve'](a2_0x172859[_0x38ee49(0x1e3)](_0x1d0954),'../..'),_0x1100d2=a2_0x172859['join'](_0x23b05e,_0x38ee49(0x1d6)),_0x28c2dd=a2_0x172859[_0x38ee49(0x1c8)](_0x1100d2,'api.ts.tpl'),_0x486412=a2_0x172859['join'](_0x1100d2,_0x38ee49(0x1da)),_0x42787b=_0x33d2b5;mkdirSync(_0x42787b,{'recursive':!![]});const _0x5e2df8=_0x4934ed[0x0]?.[_0x38ee49(0x1e6)],_0x514de4=readFileSync(_0x28c2dd,_0x38ee49(0x1c7)),_0x196dc7=TemplateReplacer[_0x38ee49(0x1d1)](_0x514de4,_0x1a80b6,_0x4934ed,_0x5e2df8,_0xf3db38,_0xfe1395,undefined,_0x53215c),_0x59e170=await a2_0x4ceb7a[_0x38ee49(0x1db)](_0x196dc7,{'parser':_0x38ee49(0x1cd)}),_0x4e5f44=a2_0x172859[_0x38ee49(0x1c8)](_0x42787b,_0xf3db38+_0x38ee49(0x1e0));writeFileSync(_0x4e5f44,_0x59e170,{'encoding':_0x38ee49(0x1c7)});const _0x16782b=readFileSync(_0x486412,_0x38ee49(0x1c7)),_0x1e4f0e=TemplateReplacer[_0x38ee49(0x1d1)](_0x16782b,_0x1a80b6,_0x4934ed,_0x5e2df8,_0xf3db38,_0xfe1395,_0x1240d4,_0x53215c),_0x1ac636=await a2_0x4ceb7a[_0x38ee49(0x1db)](_0x1e4f0e,{'parser':_0x38ee49(0x1cd)}),_0x30524d=a2_0x172859[_0x38ee49(0x1c8)](_0x42787b,_0x8299c9+_0x38ee49(0x1e0));writeFileSync(_0x30524d,_0x1ac636,{'encoding':_0x38ee49(0x1c7)});const _0x194705=_0x4934ed['length'];return logger['success'](_0x38ee49(0x1d4),'API\x20文件生成成功!',undefined,{'apiFile':_0x4e5f44,'clientFile':_0x30524d,'modelCount':_0x194705,'configName':_0xfe1395}),{'modelCount':_0x194705,'apiFilePath':_0x4e5f44,'clientFilePath':_0x30524d,'configName':_0xfe1395};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3f9bd9,_0xd36bb1){const _0x509edf=a3_0x1d1e,_0x1f1de5=_0x3f9bd9();while(!![]){try{const _0x10b8c1=-parseInt(_0x509edf(0x7a))/0x1+parseInt(_0x509edf(0x85))/0x2*(-parseInt(_0x509edf(0x82))/0x3)+parseInt(_0x509edf(0x84))/0x4+parseInt(_0x509edf(0x7b))/0x5+-parseInt(_0x509edf(0x7d))/0x6*(parseInt(_0x509edf(0x89))/0x7)+-parseInt(_0x509edf(0x76))/0x8+parseInt(_0x509edf(0x8a))/0x9;if(_0x10b8c1===_0xd36bb1)break;else _0x1f1de5['push'](_0x1f1de5['shift']());}catch(_0x3581dd){_0x1f1de5['push'](_0x1f1de5['shift']());}}}(a3_0x44bd,0xb3d47));import{getIsSessionValid}from'../auth/is-session-valid.js';function a3_0x44bd(){const _0x52698a=['Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','4415336LDLOUt','1467828UjFaSI','validation','start','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','7SiattS','8488359Piafzj','autoYes','1435512eecwir','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','*\x20Login\x20successful!','No\x20valid\x20session.\x20Login\x20now?','148507LfDgDb','1911660RFTADz','nonInteractive','3785244yRWBDd','!\x20Login\x20failed.','log','stop','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','3lzLOta'];a3_0x44bd=function(){return _0x52698a;};return a3_0x44bd();}import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';function a3_0x1d1e(_0x197551,_0x556d73){_0x197551=_0x197551-0x75;const _0x44bdc6=a3_0x44bd();let _0x1d1ee9=_0x44bdc6[_0x197551];return _0x1d1ee9;}import a3_0x1239ec from'ora';export async function runAuthServer(_0x4187a2){const _0x48ce2d=a3_0x1d1e,_0x1325af=await getIsSessionValid();if(_0x1325af){console['log'](_0x48ce2d(0x81));return;}if(_0x4187a2?.['nonInteractive']&&!_0x4187a2[_0x48ce2d(0x75)])throw CliErrors[_0x48ce2d(0x86)]('Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','Run\x20`'+CLI_BIN_NAME+_0x48ce2d(0x77));const _0x551dba=_0x4187a2?.[_0x48ce2d(0x75)]?!![]:await confirm({'message':_0x48ce2d(0x79),'default':!![]});if(!_0x551dba)return;if(_0x4187a2?.[_0x48ce2d(0x7c)]){console[_0x48ce2d(0x7f)](_0x48ce2d(0x83));const _0x1ace41=await authServer({'silent':![],'openBrowser':![]});_0x1ace41?console[_0x48ce2d(0x7f)]('*\x20Login\x20successful!'):console['log']('!\x20Login\x20failed.');return;}const _0x5f1085=a3_0x1239ec(_0x48ce2d(0x88))[_0x48ce2d(0x87)](),_0x4ae508=await authServer({'silent':!![],'openBrowser':!![]});_0x5f1085[_0x48ce2d(0x80)](),_0x4ae508?console['log'](_0x48ce2d(0x78)):console[_0x48ce2d(0x7f)](_0x48ce2d(0x7e));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x2ba9e8=a4_0x3e0b;function a4_0x3e0b(_0x5ca2a2,_0x4c3703){_0x5ca2a2=_0x5ca2a2-0x1a9;const _0x5c059a=a4_0x5c05();let _0x3e0bdd=_0x5c059a[_0x5ca2a2];return _0x3e0bdd;}(function(_0x33ba75,_0x34bd7d){const _0x1993fb=a4_0x3e0b,_0x364d0a=_0x33ba75();while(!![]){try{const _0xd4a516=parseInt(_0x1993fb(0x1c9))/0x1*(parseInt(_0x1993fb(0x1ba))/0x2)+parseInt(_0x1993fb(0x1d2))/0x3+parseInt(_0x1993fb(0x1cf))/0x4*(-parseInt(_0x1993fb(0x1cb))/0x5)+parseInt(_0x1993fb(0x1af))/0x6*(parseInt(_0x1993fb(0x1cd))/0x7)+parseInt(_0x1993fb(0x1d0))/0x8+-parseInt(_0x1993fb(0x1c7))/0x9+parseInt(_0x1993fb(0x1d4))/0xa;if(_0xd4a516===_0x34bd7d)break;else _0x364d0a['push'](_0x364d0a['shift']());}catch(_0x51a133){_0x364d0a['push'](_0x364d0a['shift']());}}}(a4_0x5c05,0x9c3d0));import{writeFileSync}from'node:fs';import a4_0xc18c3e 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 const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export async function authServer(_0x221e1d){const _0xfe285e=a4_0x3e0b,_0x23e285=_0x221e1d?.[_0xfe285e(0x1c2)]||![],_0x41b243=_0x221e1d?.[_0xfe285e(0x1cc)]??!![],_0x432059=_0x221e1d?.[_0xfe285e(0x1d3)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x47e52c=await(await fetch(_0xfe285e(0x1b1)))[_0xfe285e(0x1b2)]();return new Promise(async(_0x234380,_0x1f3e79)=>{const _0x25cde0=_0xfe285e;let _0x16f0aa=0x0,_0x1c99aa=![],_0x335607;const _0x5c6c07=a4_0xc18c3e[_0x25cde0(0x1bf)](_0x47e52c,async(_0x2157c6,_0x5f5549)=>{const _0xc6b7d4=_0x25cde0,_0x279347=getUserDomain(),_0x5c38e2=_0x2157c6['headers'][_0xc6b7d4(0x1c5)]||'',_0x19a0dc=await fetch(_0x279347+'/api/auth/get-session',{'headers':{'cookie':_0x5c38e2}})['then'](_0x1e2799=>_0x1e2799[_0xc6b7d4(0x1b2)]()),_0x47fdb3=_0x19a0dc&&_0x19a0dc[_0xc6b7d4(0x1ce)]&&_0x19a0dc[_0xc6b7d4(0x1b0)];if(_0x47fdb3){writeFileSync(cookieFile,_0x5c38e2,_0xc6b7d4(0x1ac));const _0x6333d0=buildLoginSuccessHtml();_0x5f5549['writeHead'](0xc8,{'Content-Type':_0xc6b7d4(0x1b6)}),_0x5f5549['end'](_0x6333d0),_0x6d6f16(!![]);}else{const _0x4a7d5c=''+encodeURIComponent(_0xc6b7d4(0x1c4)+_0x16f0aa);_0x5f5549[_0xc6b7d4(0x1d1)](0x12e,{'location':_0x279347+_0xc6b7d4(0x1b9)+_0x4a7d5c}),_0x5f5549[_0xc6b7d4(0x1bb)]();return;}});function _0x6d6f16(_0x5e79c2){if(_0x1c99aa)return;_0x1c99aa=!![],_0x335607&&clearTimeout(_0x335607),_0x5c6c07['close'](),_0x234380(_0x5e79c2);}_0x5c6c07[_0x25cde0(0x1c6)](0x0,_0x25cde0(0x1bd),()=>{const _0x160727=_0x25cde0,_0x3dfe22=_0x5c6c07[_0x160727(0x1d6)]();_0x16f0aa=typeof _0x3dfe22===_0x160727(0x1c3)&&_0x3dfe22?_0x3dfe22['port']:Number(_0x3dfe22);const _0xe8d97=_0x160727(0x1c4)+_0x16f0aa;_0x335607=setTimeout(()=>{const _0x19ffd4=_0x160727;!_0x23e285&&console[_0x19ffd4(0x1b8)]('!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.'),_0x6d6f16(![]);},_0x432059);!_0x23e285&&(console['log']('🔐\x20Starting\x20login\x20service...'),console['log']('📍\x20Login\x20URL:',_0xe8d97),_0x41b243?(console[_0x160727(0x1b8)](_0x160727(0x1b5)),console[_0x160727(0x1b8)](''),console['log'](_0x160727(0x1be))):console[_0x160727(0x1b8)](_0x160727(0x1c8)),console[_0x160727(0x1b8)](''));if(!_0x41b243)return;openInBrowser(_0xe8d97)[_0x160727(0x1ab)](_0x151077=>{const _0x56615e=_0x160727;!_0x23e285&&(_0x151077?console['log'](_0x56615e(0x1b7)):(console['log'](_0x56615e(0x1ca)),console[_0x56615e(0x1b8)](_0x56615e(0x1ad),_0xe8d97)),console[_0x56615e(0x1b8)](''));})[_0x160727(0x1c0)](()=>{const _0x1f8dcf=_0x160727;!_0x23e285&&(console[_0x1f8dcf(0x1b8)](_0x1f8dcf(0x1ca)),console[_0x1f8dcf(0x1b8)](_0x1f8dcf(0x1ad),_0xe8d97),console[_0x1f8dcf(0x1b8)](''));});}),_0x5c6c07['on']('error',_0x1df8e3=>{const _0x53d164=_0x25cde0;if(_0x1c99aa)return;_0x1c99aa=!![],_0x335607&&clearTimeout(_0x335607),!_0x23e285&&console[_0x53d164(0x1ae)](_0x53d164(0x1aa),_0x1df8e3),_0x5c6c07[_0x53d164(0x1b3)](),_0x1f3e79(_0x1df8e3);});});}function openInBrowser(_0x1d6155){return new Promise(_0x472b4c=>{const _0x50352c=a4_0x3e0b,_0x231261=process[_0x50352c(0x1c1)];let _0x1d0aa7;if(_0x231261==='win32')_0x1d0aa7=_0x50352c(0x1bc)+_0x1d6155+'\x22';else _0x231261===_0x50352c(0x1d5)?_0x1d0aa7=_0x50352c(0x1a9)+_0x1d6155+'\x22':_0x1d0aa7=_0x50352c(0x1b4)+_0x1d6155+'\x22';exec(_0x1d0aa7,_0x2d08b4=>{_0x2d08b4?_0x472b4c(![]):_0x472b4c(!![]);});});}function a4_0x5c05(){const _0x14ec93=['178940ZneYDA','openBrowser','21VWtdmC','session','92yxqbwO','710160xujOIn','writeHead','848394FskAzz','timeoutMs','6364170oMRswF','darwin','address','open\x20\x22','Auth\x20server\x20error:','then','utf-8','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','error','543330aHYlcP','user','https://g.yuntooai.com/cert/lovrabet-dev.json','json','close','xdg-open\x20\x22','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','text/html;\x20charset=utf-8','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','log','/sign-in?redirect=','4VigXRf','end','cmd\x20/c\x20start\x20\x22\x22\x20\x22','127.0.0.1','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','createServer','catch','platform','silent','object','https://dev.lovrabet.com:','cookie','listen','7658964udGoFm','💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','517211PtdLue','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'];a4_0x5c05=function(){return _0x14ec93;};return a4_0x5c05();}if(import.meta.main){const isAuth=await authServer();console[a4_0x2ba9e8(0x1b8)]('isAuth',isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a5_0x1012(_0x565f92,_0x2fb268){_0x565f92=_0x565f92-0x124;const _0x39b83e=a5_0x39b8();let _0x101245=_0x39b83e[_0x565f92];return _0x101245;}const a5_0x44f2f3=a5_0x1012;(function(_0x368504,_0x354980){const _0x29a42d=a5_0x1012,_0x4643cf=_0x368504();while(!![]){try{const _0x40d6c1=parseInt(_0x29a42d(0x124))/0x1+parseInt(_0x29a42d(0x128))/0x2*(parseInt(_0x29a42d(0x12b))/0x3)+-parseInt(_0x29a42d(0x126))/0x4+-parseInt(_0x29a42d(0x12e))/0x5*(parseInt(_0x29a42d(0x130))/0x6)+parseInt(_0x29a42d(0x127))/0x7*(-parseInt(_0x29a42d(0x12f))/0x8)+parseInt(_0x29a42d(0x12d))/0x9*(parseInt(_0x29a42d(0x129))/0xa)+parseInt(_0x29a42d(0x12c))/0xb;if(_0x40d6c1===_0x354980)break;else _0x4643cf['push'](_0x4643cf['shift']());}catch(_0x5507b4){_0x4643cf['push'](_0x4643cf['shift']());}}}(a5_0x39b8,0xc52fb));import{mkdirSync}from'node:fs';function a5_0x39b8(){const _0x439c2b=['.lovrabet','876EtfPZl','18466239ShxBUH','9GXFyPj','2560TMBAyq','1111288EfeZDk','12732CWCGaP','520332WDIuio','cookie','663528eMxUfy','63uZvmxl','1544FoWiaa','8857150cvNqRj'];a5_0x39b8=function(){return _0x439c2b;};return a5_0x39b8();}import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a5_0x44f2f3(0x12a));export const cookieFile=join(configDir,a5_0x44f2f3(0x125));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ee9ed,_0x2a6a5a){var _0x2e7968=a6_0x3b98,_0x3bae0d=_0x1ee9ed();while(!![]){try{var _0xef82da=parseInt(_0x2e7968(0xc4))/0x1+-parseInt(_0x2e7968(0xc7))/0x2*(-parseInt(_0x2e7968(0xc5))/0x3)+parseInt(_0x2e7968(0xcb))/0x4+parseInt(_0x2e7968(0xc9))/0x5*(-parseInt(_0x2e7968(0xc8))/0x6)+-parseInt(_0x2e7968(0xc3))/0x7+parseInt(_0x2e7968(0xc6))/0x8+parseInt(_0x2e7968(0xca))/0x9;if(_0xef82da===_0x2a6a5a)break;else _0x3bae0d['push'](_0x3bae0d['shift']());}catch(_0x147cc7){_0x3bae0d['push'](_0x3bae0d['shift']());}}}(a6_0x975b,0xdfce8));import{readFileSync}from'node:fs';function a6_0x975b(){var _0x5c9607=['742851qawrhG','3knijZa','1053576vWthJl','242666ULzFDG','263766bgcrgu','100IwlmmE','12245148GTXlqX','4505456ACtfIw','utf-8','11808195pJbVZU'];a6_0x975b=function(){return _0x5c9607;};return a6_0x975b();}import{cookieFile}from'../auth/constant.js';function a6_0x3b98(_0xbcca08,_0x50e96c){_0xbcca08=_0xbcca08-0xc3;var _0x975bc8=a6_0x975b();var _0x3b98e8=_0x975bc8[_0xbcca08];return _0x3b98e8;}export function getCookie(){var _0x3a5466=a6_0x3b98;try{return readFileSync(cookieFile,_0x3a5466(0xcc));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a7_0x5b26(){const _0x2609b4=['9cwwxnP','/api/auth/get-session','user','2624733mTvhxK','128645GnuNbB','6711390xqKsXG','358854XklCvp','json','session','69386qStuDl','21IGMqvZ','2230014ogjpZP','12SBviaM','76216QcOPqW'];a7_0x5b26=function(){return _0x2609b4;};return a7_0x5b26();}(function(_0x51bfd8,_0x1d570a){const _0x52666e=a7_0x5dc3,_0x13b647=_0x51bfd8();while(!![]){try{const _0x12bb10=parseInt(_0x52666e(0x1f0))/0x1+-parseInt(_0x52666e(0x1f3))/0x2*(parseInt(_0x52666e(0x1f8))/0x3)+-parseInt(_0x52666e(0x1f6))/0x4*(parseInt(_0x52666e(0x1ee))/0x5)+parseInt(_0x52666e(0x1f5))/0x6+parseInt(_0x52666e(0x1f4))/0x7*(parseInt(_0x52666e(0x1f7))/0x8)+parseInt(_0x52666e(0x1ed))/0x9+-parseInt(_0x52666e(0x1ef))/0xa;if(_0x12bb10===_0x1d570a)break;else _0x13b647['push'](_0x13b647['shift']());}catch(_0x44f537){_0x13b647['push'](_0x13b647['shift']());}}}(a7_0x5b26,0x306c0));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a7_0x5dc3(_0x1f1391,_0x501db3){_0x1f1391=_0x1f1391-0x1eb;const _0x5b263b=a7_0x5b26();let _0x5dc3ad=_0x5b263b[_0x1f1391];return _0x5dc3ad;}export async function getSessionUserInfo(){const _0x5e83d9=a7_0x5dc3;try{if(!existsSync(cookieFile))return null;const _0x3e8bc7=readFileSync(cookieFile,'utf-8'),_0x583057=await fetch(getUserDomain()+_0x5e83d9(0x1eb),{'headers':{'cookie':_0x3e8bc7}});if(!_0x583057['ok'])return null;const _0x4a3952=await _0x583057[_0x5e83d9(0x1f1)]();if(!_0x4a3952[_0x5e83d9(0x1f2)]||!_0x4a3952[_0x5e83d9(0x1ec)])return null;return _0x4a3952;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xf9ca0d,_0x4f2062){const _0x42ca19=a8_0x46ed,_0x452294=_0xf9ca0d();while(!![]){try{const _0x14b864=parseInt(_0x42ca19(0x175))/0x1+-parseInt(_0x42ca19(0x176))/0x2*(-parseInt(_0x42ca19(0x179))/0x3)+parseInt(_0x42ca19(0x17a))/0x4*(parseInt(_0x42ca19(0x173))/0x5)+-parseInt(_0x42ca19(0x178))/0x6*(parseInt(_0x42ca19(0x170))/0x7)+-parseInt(_0x42ca19(0x171))/0x8+parseInt(_0x42ca19(0x177))/0x9+-parseInt(_0x42ca19(0x17c))/0xa;if(_0x14b864===_0x4f2062)break;else _0x452294['push'](_0x452294['shift']());}catch(_0x12201d){_0x452294['push'](_0x452294['shift']());}}}(a8_0x4099,0x526e3));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a8_0x46ed(_0x8d01c,_0xd01548){_0x8d01c=_0x8d01c-0x16f;const _0x4099ef=a8_0x4099();let _0x46ed38=_0x4099ef[_0x8d01c];return _0x46ed38;}import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x3bf7b6=a8_0x46ed;try{if(!existsSync(cookieFile))return![];const _0x3c852c=readFileSync(cookieFile,_0x3bf7b6(0x172)),_0x3cf1c6=await fetch(getUserDomain()+_0x3bf7b6(0x174),{'headers':{'cookie':_0x3c852c}})['then'](_0x4e09f9=>_0x4e09f9[_0x3bf7b6(0x16f)]());return _0x3cf1c6&&_0x3cf1c6['session']&&_0x3cf1c6[_0x3bf7b6(0x17b)];}catch{}return![];}function a8_0x4099(){const _0x3fbc40=['1671906OWFfeS','3MoZnRq','28484KamnJN','user','3168360jlxTPR','json','7MBRuCD','3042032lmMNND','utf-8','245VROvRZ','/api/auth/get-session','211643GaCjOz','1042174DjiqoO','2085453msdDTa'];a8_0x4099=function(){return _0x3fbc40;};return a8_0x4099();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x44f2ed,_0x431662){const _0x25b1ec=a9_0x22b9,_0x19300c=_0x44f2ed();while(!![]){try{const _0xffed10=-parseInt(_0x25b1ec(0x1f1))/0x1*(parseInt(_0x25b1ec(0x1e5))/0x2)+-parseInt(_0x25b1ec(0x1f0))/0x3+parseInt(_0x25b1ec(0x1e7))/0x4*(-parseInt(_0x25b1ec(0x1ec))/0x5)+parseInt(_0x25b1ec(0x1eb))/0x6*(parseInt(_0x25b1ec(0x1ed))/0x7)+-parseInt(_0x25b1ec(0x1e4))/0x8+-parseInt(_0x25b1ec(0x1e8))/0x9+parseInt(_0x25b1ec(0x1ee))/0xa*(parseInt(_0x25b1ec(0x1e6))/0xb);if(_0xffed10===_0x431662)break;else _0x19300c['push'](_0x19300c['shift']());}catch(_0x3955a7){_0x19300c['push'](_0x19300c['shift']());}}}(a9_0x3cf1,0xcac31));function a9_0x22b9(_0x1f1dfc,_0x1f2ea0){_0x1f1dfc=_0x1f1dfc-0x1e4;const _0x3cf148=a9_0x3cf1();let _0x22b9c0=_0x3cf148[_0x1f1dfc];return _0x22b9c0;}function a9_0x3cf1(){const _0x49b00b=['1152642DMmZxp','1996XBcCkb','882416oitkUL','650ZdMupX','935ntjsjr','5300836fAPmfi','7654707ypXoQN','</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>','<!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>','12WUnWcK','5Ymkmcc','903861BZDAiA','457790bnpQvB','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.'];a9_0x3cf1=function(){return _0x49b00b;};return a9_0x3cf1();}export function buildLoginSuccessHtml(){const _0x127783=a9_0x22b9,_0x4e1c43=_0x127783(0x1ef);return _0x127783(0x1ea)+_0x4e1c43+_0x127783(0x1e9);}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x233dd2,_0x735116){var _0x239d31=a10_0x1a2d,_0x285a1f=_0x233dd2();while(!![]){try{var _0x4664a1=-parseInt(_0x239d31(0x189))/0x1+-parseInt(_0x239d31(0x182))/0x2*(-parseInt(_0x239d31(0x186))/0x3)+parseInt(_0x239d31(0x18d))/0x4+parseInt(_0x239d31(0x185))/0x5+parseInt(_0x239d31(0x187))/0x6*(-parseInt(_0x239d31(0x18c))/0x7)+parseInt(_0x239d31(0x184))/0x8+-parseInt(_0x239d31(0x183))/0x9*(parseInt(_0x239d31(0x188))/0xa);if(_0x4664a1===_0x735116)break;else _0x285a1f['push'](_0x285a1f['shift']());}catch(_0x4c29b4){_0x285a1f['push'](_0x285a1f['shift']());}}}(a10_0x3145,0x98f59));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';function a10_0x3145(){var _0x213c20=['60vVgpTf','10kCHWrB','296939wAMoYp','log','!\x20Not\x20logged\x20in','524874aXjZmZ','4230832SCUNAv','✓\x20Logged\x20out','1524fNcPax','18793314gVpNty','6208848IdOkGe','5340380lMYBFH','3384ycfQFM'];a10_0x3145=function(){return _0x213c20;};return a10_0x3145();}function a10_0x1a2d(_0x457226,_0x2ad670){_0x457226=_0x457226-0x182;var _0x31453d=a10_0x3145();var _0x1a2dfe=_0x31453d[_0x457226];return _0x1a2dfe;}export function logout(){var _0x2aad84=a10_0x1a2d;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x2aad84(0x18a)](_0x2aad84(0x18e))):console['log'](_0x2aad84(0x18b));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a11_0x1b8a(_0x26bd56,_0x5bb832){_0x26bd56=_0x26bd56-0x121;const _0x2f3279=a11_0x2f32();let _0x1b8a32=_0x2f3279[_0x26bd56];return _0x1b8a32;}function a11_0x2f32(){const _0x296881=['2579640XGdlwe','2105656VWVKGY','210rwwhyB','22tcPlAv','42241IjGsdy','20046834FeJgom','boolean','16625LKgwGH','4462984ZDbxeX','1925367cPsByx'];a11_0x2f32=function(){return _0x296881;};return a11_0x2f32();}const a11_0x209775=a11_0x1b8a;(function(_0x1eb735,_0x4b150a){const _0x146734=a11_0x1b8a,_0x3add93=_0x1eb735();while(!![]){try{const _0x2aad19=parseInt(_0x146734(0x128))/0x1*(-parseInt(_0x146734(0x127))/0x2)+-parseInt(_0x146734(0x123))/0x3+-parseInt(_0x146734(0x124))/0x4+parseInt(_0x146734(0x121))/0x5*(parseInt(_0x146734(0x126))/0x6)+parseInt(_0x146734(0x125))/0x7+-parseInt(_0x146734(0x122))/0x8+parseInt(_0x146734(0x129))/0x9;if(_0x2aad19===_0x4b150a)break;else _0x3add93['push'](_0x3add93['shift']());}catch(_0x58a350){_0x3add93['push'](_0x3add93['shift']());}}}(a11_0x2f32,0x51e1a));export const dynamicCliFlags={'enableBffSave':{'type':a11_0x209775(0x12a)}};
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a12_0xf249eb=a12_0x56c9;(function(_0x2f2797,_0x2aadd2){const _0x207fce=a12_0x56c9,_0x4c4430=_0x2f2797();while(!![]){try{const _0x5dd374=parseInt(_0x207fce(0xaa))/0x1*(-parseInt(_0x207fce(0xb0))/0x2)+parseInt(_0x207fce(0xa5))/0x3*(parseInt(_0x207fce(0xbb))/0x4)+-parseInt(_0x207fce(0x97))/0x5+parseInt(_0x207fce(0xbe))/0x6+parseInt(_0x207fce(0xb2))/0x7+parseInt(_0x207fce(0xa2))/0x8+-parseInt(_0x207fce(0xa0))/0x9;if(_0x5dd374===_0x2aadd2)break;else _0x4c4430['push'](_0x4c4430['shift']());}catch(_0x668047){_0x4c4430['push'](_0x4c4430['shift']());}}}(a12_0x12a4,0x52d4b));import a12_0x6ae2b6 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';function a12_0x56c9(_0x32682e,_0x182c51){_0x32682e=_0x32682e-0x92;const _0x12a47d=a12_0x12a4();let _0x56c993=_0x12a47d[_0x32682e];return _0x56c993;}import{reportCliHelpTrace}from'./telemetry/cli-help-trace.js';import{reportCommandTrace}from'./telemetry/cli-command-trace.js';import{registerOtelShutdownOnExit,exitWithOtelShutdown}from'./telemetry/register-otel-exit-shutdown.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import(a12_0xf249eb(0xb6)))[a12_0xf249eb(0xa6)];}catch{}function a12_0x12a4(){const _0x42f707=['1hnAiWx','log','error','Error:\x20','global','hint','10694pxkfOX','code','1935206UWHfoy','string','`;\x20prefer\x20`','env','./cli-flags.js','unknownCommand','help','now','flags','216lgJJzl','userDomain','raw','2658030UAtOnH','runtimeDomain','wildcardDef','defaultCommand','message','apiDomain','name','690025EquEIQ','exitCode','Hint:\x20','`\x20in\x20v2.0.\x0a','ExitPromptError','`\x20has\x20been\x20moved\x20to\x20`','input','command','unknown_service','9988875DYSabJ','./context.js','2998248UUIaWp','write','./constant/domain.js','27681fQsgBJ','dynamicCliFlags','stderr','slice','⚠\x20`'];a12_0x12a4=function(){return _0x42f707;};return a12_0x12a4();}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION,cli=a12_0x6ae2b6(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0x28cbda=a12_0xf249eb;let _0x1b6129=cli[_0x28cbda(0x9d)][0x0],_0x551071=cli[_0x28cbda(0x9d)][0x1];const _0x30ed79=cli[_0x28cbda(0xba)];if(!_0x1b6129){await reportCliHelpTrace(_0x28cbda(0xae)),showHelp();return;}const _0x24dc04=deprecatedAliases[_0x1b6129];if(_0x24dc04&&!isKnownService(_0x1b6129)){const _0x3fb9e5=_0x551071?CLI_BIN_NAME+'\x20'+_0x1b6129+'\x20'+_0x551071:CLI_BIN_NAME+'\x20'+_0x1b6129,_0x30bcf8=CLI_BIN_NAME+'\x20'+_0x24dc04['service']+'\x20'+_0x24dc04[_0x28cbda(0x9e)];console['error'](_0x28cbda(0xa9)+_0x3fb9e5+_0x28cbda(0x9c)+_0x30bcf8+_0x28cbda(0x9a)+'\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a'),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x1b6129)){await reportCliHelpTrace(_0x28cbda(0x9f),{'service':_0x1b6129}),showHelp();return;}const _0x47a1bb=getServiceEntry(_0x1b6129);if(_0x30ed79[_0x28cbda(0xb5)]&&typeof _0x30ed79[_0x28cbda(0xb5)]===_0x28cbda(0xb3)){const {initEnv:_0x5cb13e}=await import('./constant/env.js');_0x5cb13e(_0x30ed79[_0x28cbda(0xb5)]);}const {buildConfigFromFlags:_0x5cd928}=await import(_0x28cbda(0xa1)),_0x171ae3=_0x5cd928(_0x30ed79);if(!_0x30ed79[_0x28cbda(0xb5)]&&_0x171ae3[_0x28cbda(0xb5)]){const {initEnv:_0x4d4213}=await import('./constant/env.js');_0x4d4213(_0x171ae3[_0x28cbda(0xb5)]);}if(_0x171ae3[_0x28cbda(0xbd)]?.['apiDomain']||_0x171ae3[_0x28cbda(0xbd)]?.[_0x28cbda(0xbc)]||_0x171ae3[_0x28cbda(0xbd)]?.[_0x28cbda(0xbf)]){const {initDomains:_0xe8898f}=await import(_0x28cbda(0xa4));_0xe8898f({'apiDomain':_0x171ae3[_0x28cbda(0xbd)][_0x28cbda(0x95)]||undefined,'userDomain':_0x171ae3[_0x28cbda(0xbd)]['userDomain']||undefined,'runtimeDomain':_0x171ae3[_0x28cbda(0xbd)][_0x28cbda(0xbf)]||undefined});}if(!_0x551071){if(_0x30ed79[_0x28cbda(0xb8)]){printServiceHelp(_0x1b6129);return;}if(_0x47a1bb[_0x28cbda(0x93)])_0x551071=_0x47a1bb[_0x28cbda(0x93)];else{if(_0x47a1bb['wildcardDef']){await dispatchDeclarative(_0x47a1bb[_0x28cbda(0x92)],_0x1b6129,'',[],_0x30ed79,_0x171ae3);return;}else{printServiceHelp(_0x1b6129);return;}}}const _0x5c6438=resolveDeprecatedSubcommand(_0x1b6129,_0x551071);if(_0x5c6438){const _0x1754ed=CLI_BIN_NAME+'\x20'+_0x1b6129+'\x20'+_0x551071,_0x32ff86=CLI_BIN_NAME+'\x20'+_0x1b6129+'\x20'+_0x5c6438;console[_0x28cbda(0xac)](_0x28cbda(0xa9)+_0x1754ed+'`\x20is\x20an\x20alias\x20of\x20`'+_0x32ff86+_0x28cbda(0xb4)+_0x32ff86+'`\x20in\x20new\x20scripts.\x0a'),_0x551071=_0x5c6438;}if(_0x30ed79[_0x28cbda(0xb8)]&&!findDefinition(_0x1b6129,_0x551071)){printServiceHelp(_0x1b6129);return;}{let _0x1ee239=findDefinition(_0x1b6129,_0x551071),_0x33c2ee=cli[_0x28cbda(0x9d)][_0x28cbda(0xa8)](0x2);if(!_0x1ee239){if(_0x47a1bb[_0x28cbda(0x92)]){if(_0x30ed79['help']){console[_0x28cbda(0xab)](generateCommandHelp(_0x47a1bb[_0x28cbda(0x92)]));return;}_0x1ee239=_0x47a1bb[_0x28cbda(0x92)],_0x33c2ee=[_0x551071,...cli['input']['slice'](0x2)];}else{printServiceHelp(_0x1b6129),await handleErrorAsync(CliErrors[_0x28cbda(0xb7)](_0x1b6129+'\x20'+_0x551071));return;}}if(_0x30ed79[_0x28cbda(0xb8)]){console['log'](generateCommandHelp(_0x1ee239));return;}await dispatchDeclarative(_0x1ee239,_0x1b6129,_0x551071,_0x33c2ee,_0x30ed79,_0x171ae3);}}async function dispatchDeclarative(_0x2717c5,_0x434d19,_0x21ee21,_0x2a66a8,_0x1f4f6e,_0x2ff033){const _0x271243=a12_0xf249eb,_0x30cf1b=Date[_0x271243(0xb9)]();let _0x1d3a0b;try{await runCommand(_0x2717c5,createPipelineEnv(_0x2ff033,_0x1f4f6e,_0x2a66a8));}catch(_0x110d8a){_0x1d3a0b=_0x110d8a;}await reportCommandTrace({'service':_0x434d19,'command':_0x21ee21,'flags':_0x1f4f6e,'durationMs':Date[_0x271243(0xb9)]()-_0x30cf1b,'error':_0x1d3a0b});if(_0x1d3a0b)await handleErrorAsync(_0x1d3a0b);}function printServiceHelp(_0x2cb2eb){const _0x10e089=a12_0xf249eb;console[_0x10e089(0xab)](generateServiceHelp(_0x2cb2eb));}async function handleErrorAsync(_0x35566f){const _0x39f6ba=a12_0xf249eb;if(_0x35566f instanceof Error&&_0x35566f[_0x39f6ba(0x96)]===_0x39f6ba(0x9b))return process[_0x39f6ba(0xa7)][_0x39f6ba(0xa3)]('\x0aCancelled.\x0a'),await exitWithOtelShutdown(0x0);if(_0x35566f instanceof CliError){if(_0x35566f[_0x39f6ba(0xb1)]==='cancelled')return process['stderr'][_0x39f6ba(0xa3)]('\x0a'+_0x35566f['message']+'\x0a'),await exitWithOtelShutdown(0x0);console[_0x39f6ba(0xac)](_0x39f6ba(0xad)+_0x35566f[_0x39f6ba(0x94)]);if(_0x35566f['hint'])console[_0x39f6ba(0xac)](_0x39f6ba(0x99)+_0x35566f[_0x39f6ba(0xaf)]);return await exitWithOtelShutdown(_0x35566f[_0x39f6ba(0x98)]);}return console[_0x39f6ba(0xac)]('Unexpected\x20error:',_0x35566f),await exitWithOtelShutdown(0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a13_0x188a(){const _0x259d00=['some','.md','success','4191117SqWjfW','./docs','14208dNyjyG','38104zgAPZY','4osVWfu','\x20doc(s)\x20failed','\x20dataset(s)\x1b[0m','\x20succeeded,\x20','38578pkYtXh','--datasetcode\x20cannot\x20be\x20empty.','validation','\x1b[90m*\x20Generating\x20docs\x20for:\x20','Fetched\x20','length','api','padStart','appCode','11boJDcS','str','Failed\x20to\x20fetch\x20datasets','\x1b[90m*\x20Filtered\x20','error','map','\x20doc(s)\x20in\x20','\x1b[0m','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','207GsbZyE','split','1712823ziMXHr','write','fail','isArray','189744wTawlP','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','Fetching\x20dataset\x20list\x20for\x20','219592nqekTN','datasetName','generate','\x20of\x20','output','Invalid\x20--params:\x20','string','start','datasetCode','\x20failed','Doc\x20generation:\x20','40ZZhBwB','object','stdout','has','\x20dataset(s)','join','cookie','filter','\x20\x20•\x20','datasetcode','params','✓\x20Generated\x20','15169030ZFTsUL','parse','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','succeed','Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','message'];a13_0x188a=function(){return _0x259d00;};return a13_0x188a();}const a13_0x504396=a13_0x5e63;(function(_0x51c31f,_0x4f41ee){const _0x21fcc0=a13_0x5e63,_0x447126=_0x51c31f();while(!![]){try{const _0xe50f4f=parseInt(_0x21fcc0(0x1e7))/0x1*(-parseInt(_0x21fcc0(0x222))/0x2)+parseInt(_0x21fcc0(0x21a))/0x3*(-parseInt(_0x21fcc0(0x21e))/0x4)+-parseInt(_0x21fcc0(0x205))/0x5*(-parseInt(_0x21fcc0(0x1f6))/0x6)+parseInt(_0x21fcc0(0x1f2))/0x7+-parseInt(_0x21fcc0(0x1fa))/0x8*(parseInt(_0x21fcc0(0x1f0))/0x9)+-parseInt(_0x21fcc0(0x211))/0xa+-parseInt(_0x21fcc0(0x21d))/0xb*(-parseInt(_0x21fcc0(0x21c))/0xc);if(_0xe50f4f===_0x4f41ee)break;else _0x447126['push'](_0x447126['shift']());}catch(_0x87fc09){_0x447126['push'](_0x447126['shift']());}}}(a13_0x188a,0xcd789));import a13_0x4f981d from'ora';import{fetchModelList}from'../../api/fetch-model-list.js';function a13_0x5e63(_0x4638c7,_0x554960){_0x4638c7=_0x4638c7-0x1e2;const _0x188ac9=a13_0x188a();let _0x5e6381=_0x188ac9[_0x4638c7];return _0x5e6381;}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':a13_0x504396(0x1e4),'command':a13_0x504396(0x1fc),'description':a13_0x504396(0x215),'risk':a13_0x504396(0x1f3),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a13_0x504396(0x1fe),'type':a13_0x504396(0x200),'description':'Output\x20directory\x20(default:\x20./docs)'},{'name':a13_0x504396(0x20e),'type':a13_0x504396(0x200),'description':a13_0x504396(0x1f7)},{'name':'params','type':a13_0x504396(0x200),'description':a13_0x504396(0x1ef)}],async 'execute'(_0x32a4d4){const _0x4a9762=a13_0x504396,_0x170adb=_0x32a4d4['str'](_0x4a9762(0x1fe))||_0x4a9762(0x21b),_0xcfc85b=_0x32a4d4[_0x4a9762(0x1e8)]('datasetcode'),_0x2a8f05=_0x32a4d4[_0x4a9762(0x1e8)](_0x4a9762(0x20f));let _0xb52156;if(_0x2a8f05)try{_0xb52156=JSON[_0x4a9762(0x212)](_0x2a8f05);if(typeof _0xb52156!==_0x4a9762(0x206)||_0xb52156===null||Array[_0x4a9762(0x1f5)](_0xb52156))throw new Error('must\x20be\x20a\x20JSON\x20object');}catch(_0x29e193){throw CliErrors[_0x4a9762(0x224)](_0x4a9762(0x1ff)+(_0x29e193 instanceof Error?_0x29e193[_0x4a9762(0x216)]:String(_0x29e193)),_0x4a9762(0x1f8));}let _0x4e09c9;if(_0xcfc85b){const _0xcb474e=_0xcfc85b[_0x4a9762(0x1f1)](',')[_0x4a9762(0x1ec)](_0x56edcd=>_0x56edcd['trim']())[_0x4a9762(0x20c)](_0x45e1fe=>_0x45e1fe[_0x4a9762(0x1e3)]>0x0);if(_0xcb474e[_0x4a9762(0x1e3)]===0x0)throw CliErrors[_0x4a9762(0x224)](_0x4a9762(0x223));_0x4e09c9=new Set(_0xcb474e),writeCliSideChannelLine(_0x4a9762(0x225)+_0xcb474e[_0x4a9762(0x20a)](',\x20')+_0x4a9762(0x1ee));}const _0x537629=a13_0x4f981d(_0x4a9762(0x1f9)+_0x32a4d4[_0x4a9762(0x1e6)]+'...')[_0x4a9762(0x201)]();let _0x28acf6;try{({configArray:_0x28acf6}=await fetchModelList(_0x32a4d4[_0x4a9762(0x1e6)],_0x32a4d4[_0x4a9762(0x20b)]),_0x537629[_0x4a9762(0x214)](_0x4a9762(0x1e2)+_0x28acf6[_0x4a9762(0x1e3)]+_0x4a9762(0x209)));}catch(_0x2388fb){_0x537629[_0x4a9762(0x1f4)](_0x4a9762(0x1e9));throw _0x2388fb;}if(_0x28acf6[_0x4a9762(0x1e3)]===0x0)return writeCliSideChannelLine('!\x20No\x20datasets\x20found.'),{'ok':!![]};let _0x1f1513=_0x28acf6;if(_0x4e09c9){_0x1f1513=_0x28acf6[_0x4a9762(0x20c)](_0x5ebf50=>_0x4e09c9[_0x4a9762(0x208)](_0x5ebf50['datasetCode']));const _0x7afd56=[..._0x4e09c9][_0x4a9762(0x20c)](_0x5d44ab=>!_0x28acf6[_0x4a9762(0x217)](_0x2de727=>_0x2de727[_0x4a9762(0x202)]===_0x5d44ab));_0x7afd56[_0x4a9762(0x1e3)]>0x0&&writeCliSideChannelLine(_0x4a9762(0x213)+_0x7afd56[_0x4a9762(0x20a)](',\x20')+_0x4a9762(0x1ee));if(_0x1f1513[_0x4a9762(0x1e3)]===0x0)throw CliErrors[_0x4a9762(0x224)]('None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20'+[..._0x4e09c9]['join'](',\x20'));writeCliSideChannelLine(_0x4a9762(0x1ea)+_0x1f1513['length']+_0x4a9762(0x1fd)+_0x28acf6[_0x4a9762(0x1e3)]+_0x4a9762(0x220));}let _0xd678a0=0x0;const _0x352a88=await generateDatasetDocs(_0x1f1513,_0x32a4d4[_0x4a9762(0x1e6)],_0x32a4d4[_0x4a9762(0x20b)],_0x170adb,(_0x3d9f05,_0x438a92,_0x41637b)=>{const _0x517d98=_0x4a9762;_0xd678a0=_0x3d9f05,process[_0x517d98(0x207)][_0x517d98(0x1f3)]('\x0d\x20\x20['+String(_0x3d9f05)[_0x517d98(0x1e5)](String(_0x438a92)[_0x517d98(0x1e3)])+'/'+_0x438a92+']\x20'+_0x41637b+_0x517d98(0x218));},_0xb52156);if(_0xd678a0>0x0)process['stdout'][_0x4a9762(0x1f3)]('\x0a');const _0x215d27=_0x352a88[_0x4a9762(0x20c)](_0x10184b=>_0x10184b['success'])[_0x4a9762(0x1e3)],_0x565fe1=_0x352a88[_0x4a9762(0x20c)](_0x33951e=>!_0x33951e['success'])[_0x4a9762(0x1e3)];writeCliSideChannelLine(''),writeCliSideChannelLine(_0x4a9762(0x210)+_0x215d27+_0x4a9762(0x1ed)+_0x170adb);if(_0x565fe1>0x0){writeCliSideChannelLine('!\x20'+_0x565fe1+_0x4a9762(0x21f));for(const _0xcc0a5e of _0x352a88[_0x4a9762(0x20c)](_0x3c8f7d=>!_0x3c8f7d[_0x4a9762(0x219)])){writeCliSideChannelLine(_0x4a9762(0x20d)+_0xcc0a5e[_0x4a9762(0x1fb)]+'\x20('+_0xcc0a5e['datasetCode']+'):\x20'+_0xcc0a5e[_0x4a9762(0x1eb)]);}}return{'ok':_0x565fe1===0x0,'message':_0x565fe1>0x0?_0x4a9762(0x204)+_0x215d27+_0x4a9762(0x221)+_0x565fe1+_0x4a9762(0x203):'Doc\x20generation\x20complete:\x20'+_0x215d27+'\x20file(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14668a,_0x4d6e86){const _0x35e858=a14_0x5109,_0x98f768=_0x14668a();while(!![]){try{const _0x30afda=-parseInt(_0x35e858(0x1ea))/0x1*(-parseInt(_0x35e858(0x1e1))/0x2)+parseInt(_0x35e858(0x1e7))/0x3*(parseInt(_0x35e858(0x1e5))/0x4)+-parseInt(_0x35e858(0x1e3))/0x5+-parseInt(_0x35e858(0x1e2))/0x6+-parseInt(_0x35e858(0x1e9))/0x7+-parseInt(_0x35e858(0x1e6))/0x8*(-parseInt(_0x35e858(0x1e8))/0x9)+parseInt(_0x35e858(0x1e4))/0xa;if(_0x30afda===_0x4d6e86)break;else _0x98f768['push'](_0x98f768['shift']());}catch(_0x441d97){_0x98f768['push'](_0x98f768['shift']());}}}(a14_0x51b4,0x3a9d8));import{apiList}from'../../commands/api/list.js';import{apiPull}from'../../commands/api/pull.js';function a14_0x51b4(){const _0x3e9077=['722398QZFOwt','1887768sEFTci','126355BelrOU','572420ntbuup','4dKbNzQ','32hMgUZZ','1039923sjAVnJ','525582THfVIl','2930809rTaVVH','1TdurNZ'];a14_0x51b4=function(){return _0x3e9077;};return a14_0x51b4();}function a14_0x5109(_0x42faa8,_0x4e1f8e){_0x42faa8=_0x42faa8-0x1e1;const _0x51b46a=a14_0x51b4();let _0x510924=_0x51b46a[_0x42faa8];return _0x510924;}import{apiGenerate}from'../../commands/api/generate.js';export const apiDefinitions=[apiList,apiPull,apiGenerate];
|
package/lib/commands/api/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x4d566b=a15_0x4640;function a15_0x4640(_0x392ef1,_0x56c120){_0x392ef1=_0x392ef1-0x8f;const _0x443291=a15_0x4432();let _0x4640cb=_0x443291[_0x392ef1];return _0x4640cb;}(function(_0x117011,_0x1009ba){const _0x36b310=a15_0x4640,_0xf0e71c=_0x117011();while(!![]){try{const _0xfa2760=-parseInt(_0x36b310(0x94))/0x1+-parseInt(_0x36b310(0xa0))/0x2+-parseInt(_0x36b310(0x98))/0x3*(parseInt(_0x36b310(0x99))/0x4)+-parseInt(_0x36b310(0x90))/0x5*(-parseInt(_0x36b310(0x9a))/0x6)+-parseInt(_0x36b310(0x92))/0x7*(parseInt(_0x36b310(0x9f))/0x8)+-parseInt(_0x36b310(0xa2))/0x9+parseInt(_0x36b310(0x91))/0xa*(parseInt(_0x36b310(0x9b))/0xb);if(_0xfa2760===_0x1009ba)break;else _0xf0e71c['push'](_0xf0e71c['shift']());}catch(_0x377777){_0xf0e71c['push'](_0xf0e71c['shift']());}}}(a15_0x4432,0x55576));function a15_0x4432(){const _0x2ddfa3=['101301mvZUSR','56poJAXI','334038YCAaYY','11sqUJPp','production','name','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','8nbrmSH','676914LTYPhu','map','4620420RpRKaG','api','env','rawFlags','45RXpZcm','16635220lrWCRR','2892477pvAsLK','appcode','77235NCfLcQ','cookie','global','list'];a15_0x4432=function(){return _0x2ddfa3;};return a15_0x4432();}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_0x4d566b(0xa3),'command':a15_0x4d566b(0x97),'description':'List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','risk':'read','requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0x4d566b(0x96),'type':'boolean','description':a15_0x4d566b(0x9e),'default':![]}],async 'execute'(_0x4ca8c0){const _0x52d71d=a15_0x4d566b,_0xc06a44=_0x4ca8c0['rawFlags']['appcode']?String(_0x4ca8c0[_0x52d71d(0x8f)][_0x52d71d(0x93)]):undefined,_0x3559ef=resolveTargetApps(_0x4ca8c0,_0xc06a44);if(_0x3559ef){const _0x34f16b=[];for(const _0x3e3196 of _0x3559ef){const _0x1431f7=_0x3e3196[_0x52d71d(0x95)]||_0x4ca8c0[_0x52d71d(0x95)],_0x1637f0=_0x3e3196[_0x52d71d(0xa4)]||_0x52d71d(0x9c);initEnv(_0x1637f0);const {configArray:_0x4b2396}=await fetchModelList(_0x3e3196['appcode'],_0x1431f7);_0x34f16b['push'](..._0x4b2396[_0x52d71d(0xa1)](_0x546313=>({..._0x546313,'_appName':_0x3e3196[_0x52d71d(0x9d)],'_appCode':_0x3e3196[_0x52d71d(0x93)],'_env':_0x1637f0,'_isDefault':_0x3e3196['isDefault']})));}return{'ok':!![],'data':_0x34f16b};}const {configArray:_0x589f52}=await fetchModelList(_0x4ca8c0['appCode'],_0x4ca8c0[_0x52d71d(0x95)]);return{'ok':!![],'data':_0x589f52};}};
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x343075=a16_0x430c;(function(_0x159296,_0x4bab2c){const _0x88508d=a16_0x430c,_0x9d3f2b=_0x159296();while(!![]){try{const _0x306f29=-parseInt(_0x88508d(0xe9))/0x1*(-parseInt(_0x88508d(0xf2))/0x2)+-parseInt(_0x88508d(0xf1))/0x3+-parseInt(_0x88508d(0xff))/0x4+parseInt(_0x88508d(0x10e))/0x5+-parseInt(_0x88508d(0xfb))/0x6+-parseInt(_0x88508d(0xfe))/0x7*(parseInt(_0x88508d(0xf8))/0x8)+parseInt(_0x88508d(0x10a))/0x9;if(_0x306f29===_0x4bab2c)break;else _0x9d3f2b['push'](_0x9d3f2b['shift']());}catch(_0x50a122){_0x9d3f2b['push'](_0x9d3f2b['shift']());}}}(a16_0x2d64,0xa3717));function a16_0x2d64(){const _0x133038=['3631136xAPLkC','includes','length','join','\x20\x20•\x20','api','cookie','\x20succeeded,\x20','start','clientFilePath','Done:\x20','9412218cMCgfF','Pulling\x20API\x20config\x20for\x20','rawFlags','fail','2978595lahzzr','\x20dataset(s)\x20→\x20','Pulling\x20','succeed','production','-client','client','env','isDefault','4201sEyGDS','boolean','split','Output\x20directory\x20(default:\x20','pull','output','string','Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20(','545913RyCLmc','538nuoHFb','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','appCode','appcode','.ts','str','8BEOzYa','apiDir','modelCount','4465116XfLjxg','name','\x20model(s)','1877302MsVzXN'];a16_0x2d64=function(){return _0x133038;};return a16_0x2d64();}import a16_0x3f3fd1 from'ora';function a16_0x430c(_0x4d3ff5,_0x18d129){_0x4d3ff5=_0x4d3ff5-0xe7;const _0x2d647f=a16_0x2d64();let _0x430c7f=_0x2d647f[_0x4d3ff5];return _0x430c7f;}import a16_0x3e59cc from'node:path';import{initEnv,getEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';import{generateApiFile}from'../../api/generate-api-file.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{DEFAULT_API_DIR}from'../../constant/paths.js';import{resolveTargetApps}from'../../commands/api/shared.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export const apiPull={'service':a16_0x343075(0x104),'command':a16_0x343075(0xed),'description':a16_0x343075(0xf0)+DEFAULT_API_DIR+'/)','risk':'write','requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':'output','type':a16_0x343075(0xef),'description':a16_0x343075(0xec)+DEFAULT_API_DIR+'/)'},{'name':'global','type':a16_0x343075(0xea),'description':a16_0x343075(0xf3),'default':![]}],async 'execute'(_0x312589){const _0x4bd047=a16_0x343075,_0x5b9e33=_0x312589[_0x4bd047(0x10c)][_0x4bd047(0xf5)]?String(_0x312589[_0x4bd047(0x10c)][_0x4bd047(0xf5)]):undefined,_0x2cc26c=_0x312589[_0x4bd047(0xf7)](_0x4bd047(0xee))||undefined,_0xae90b4=resolveTargetApps(_0x312589,_0x5b9e33);if(_0xae90b4){let _0x464e11=0x0,_0x111097=0x0;for(const _0x1d8508 of _0xae90b4){const _0x369d40=_0x1d8508['cookie']||_0x312589[_0x4bd047(0x105)],_0x4b80cc=_0x1d8508[_0x4bd047(0xe7)]||_0x4bd047(0x112);initEnv(_0x4b80cc);const _0x73c559=_0x1d8508[_0x4bd047(0xf9)]||_0x2cc26c||_0x312589[_0x4bd047(0xf9)]||DEFAULT_API_DIR,_0xe311c6=_0x1d8508[_0x4bd047(0xe8)]?'':_0x1d8508[_0x4bd047(0xfc)]||_0x1d8508[_0x4bd047(0xf5)],_0x879bc8=a16_0x3f3fd1(_0x4bd047(0x110)+_0x1d8508['name']+'\x20('+_0x1d8508[_0x4bd047(0xf5)]+')...')[_0x4bd047(0x107)]();try{const {configArray:_0x392ee8}=await fetchModelList(_0x1d8508[_0x4bd047(0xf5)],_0x369d40),_0x4e55f2=await generateApiFile(_0x392ee8,_0xe311c6,_0x1d8508['appcode'],_0x1d8508[_0x4bd047(0xe8)],_0x4b80cc,_0x73c559,_0x1d8508[_0x4bd047(0xfc)]);_0x879bc8[_0x4bd047(0x111)](_0x1d8508['name']+':\x20'+_0x392ee8[_0x4bd047(0x101)]+_0x4bd047(0x10f)+_0x4e55f2[_0x4bd047(0xfa)]+_0x4bd047(0xfd)),writeCliSideChannelLine('\x20\x20•\x20'+_0x4e55f2['apiFilePath']),writeCliSideChannelLine(_0x4bd047(0x103)+_0x4e55f2[_0x4bd047(0x108)]),_0x464e11++;}catch(_0xbe0689){_0x879bc8[_0x4bd047(0x10d)](_0x1d8508[_0x4bd047(0xfc)]+':\x20'+(_0xbe0689 instanceof Error?_0xbe0689['message']:String(_0xbe0689))),_0x111097++;}}writeCliSideChannelLine('');if(_0x111097>0x0)writeCliSideChannelLine('!\x20'+_0x111097+'\x20app(s)\x20failed');return{'ok':_0x111097===0x0,'message':_0x4bd047(0x109)+_0x464e11+_0x4bd047(0x106)+_0x111097+'\x20failed'};}const _0x5999be=_0x5b9e33&&_0x5b9e33[_0x4bd047(0x100)]('-')?_0x5b9e33[_0x4bd047(0xeb)]('-')['slice'](0x1)[_0x4bd047(0x102)]('-'):'',_0x4b73ac=_0x2cc26c||_0x312589[_0x4bd047(0xf9)]||DEFAULT_API_DIR,_0x4bdcd2=!_0x5b9e33,_0x718152=a16_0x3f3fd1(_0x4bd047(0x10b)+_0x312589['appCode']+'...')[_0x4bd047(0x107)]();try{const {configArray:_0x14ace6}=await fetchModelList(_0x312589[_0x4bd047(0xf4)],_0x312589[_0x4bd047(0x105)]),_0x3056d6=await generateApiFile(_0x14ace6,_0x5999be,_0x312589[_0x4bd047(0xf4)],_0x4bdcd2,getEnv(),_0x4b73ac);_0x718152[_0x4bd047(0x111)]('Pulled\x20'+_0x14ace6[_0x4bd047(0x101)]+'\x20dataset(s),\x20generated\x20'+_0x3056d6[_0x4bd047(0xfa)]+_0x4bd047(0xfd));const _0x2df7f9=_0x5999be?_0x5999be+'-api':_0x4bd047(0x104),_0xfab104=_0x5999be?_0x5999be+_0x4bd047(0x113):_0x4bd047(0x114);return writeCliSideChannelLine(_0x4bd047(0x103)+a16_0x3e59cc[_0x4bd047(0x102)](_0x4b73ac,_0x2df7f9+_0x4bd047(0xf6))),writeCliSideChannelLine(_0x4bd047(0x103)+a16_0x3e59cc[_0x4bd047(0x102)](_0x4b73ac,_0xfab104+_0x4bd047(0xf6))),{'ok':!![],'data':{'datasetCount':_0x14ace6[_0x4bd047(0x101)],'modelCount':_0x3056d6[_0x4bd047(0xfa)]}};}catch(_0x3e616e){_0x718152[_0x4bd047(0x10d)]('Failed:\x20'+(_0x3e616e instanceof Error?_0x3e616e['message']:String(_0x3e616e)));throw _0x3e616e;}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a17_0x12f2(_0x59ec22,_0xe578c6){_0x59ec22=_0x59ec22-0x110;const _0x39f30b=a17_0x39f3();let _0x12f265=_0x39f30b[_0x59ec22];return _0x12f265;}(function(_0x382ca5,_0x511009){const _0x1c600f=a17_0x12f2,_0x4c1773=_0x382ca5();while(!![]){try{const _0x38ad64=parseInt(_0x1c600f(0x11f))/0x1*(parseInt(_0x1c600f(0x115))/0x2)+parseInt(_0x1c600f(0x123))/0x3*(parseInt(_0x1c600f(0x119))/0x4)+parseInt(_0x1c600f(0x118))/0x5+parseInt(_0x1c600f(0x121))/0x6*(-parseInt(_0x1c600f(0x112))/0x7)+parseInt(_0x1c600f(0x114))/0x8+parseInt(_0x1c600f(0x116))/0x9+-parseInt(_0x1c600f(0x11d))/0xa*(parseInt(_0x1c600f(0x113))/0xb);if(_0x38ad64===_0x511009)break;else _0x4c1773['push'](_0x4c1773['shift']());}catch(_0xb6daf0){_0x4c1773['push'](_0x4c1773['shift']());}}}(a17_0x39f3,0x5b83e));import{getMultiAppConfigs}from'../../utils/config.js';function a17_0x39f3(){const _0x5a76f4=['selectedAppName','map','global','198184dIwWdR','11mrCNYx','813936skNyUv','371962WLHzaD','420048DuRgVL','name','49155sZRDVl','8FWXkpQ','bool','validation','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','3798070MUwKxq','length','2qISleg','join','108SAaBnf','filter','1101093pSvEJD'];a17_0x39f3=function(){return _0x5a76f4;};return a17_0x39f3();}import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x469f0e,_0x5e5f0f){const _0xc3b332=a17_0x12f2;if(_0x5e5f0f)return null;const _0x327d59=_0x469f0e[_0xc3b332(0x11a)](_0xc3b332(0x111))?'merged':'project';let _0x31c490=getMultiAppConfigs(_0x327d59);if(!_0x31c490||_0x31c490[_0xc3b332(0x11e)]===0x0)return null;if(_0x469f0e[_0xc3b332(0x124)]){const _0x3b4e68=_0x31c490[_0xc3b332(0x122)](_0x1d80ed=>_0x1d80ed['name']===_0x469f0e['selectedAppName']);if(_0x3b4e68[_0xc3b332(0x11e)]===0x0){const _0xd2a4da=_0x31c490[_0xc3b332(0x110)](_0x48f38a=>_0x48f38a[_0xc3b332(0x117)])[_0xc3b332(0x120)](',\x20');throw CliErrors[_0xc3b332(0x11b)]('App\x20\x22'+_0x469f0e['selectedAppName']+_0xc3b332(0x11c)+_0xd2a4da);}_0x31c490=_0x3b4e68;}return _0x31c490;}
|
package/lib/commands/app/add.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a18_0x5e17(_0x40ed9a,_0x5d9f7a){_0x40ed9a=_0x40ed9a-0x168;const _0x436aec=a18_0x436a();let _0x5e1718=_0x436aec[_0x40ed9a];return _0x5e1718;}function a18_0x436a(){const _0x12aecd=['name','\x20app\x20\x22','Add\x20or\x20update\x20an\x20app\x20in\x20config','\x20app\x20add\x20<name>\x20--appcode\x20<code>','defaultApp','string','Usage:\x20','appcode','App\x20profile\x20name','add','App\x20code','str','1494340OZBEHM','args','10125840VZZltI','1727788VPgmVB','bool','45vUUwfX','336bgywik','79615czHNOo','4235106uNBdFw','10212223NyCtUl','\x22\x20(appcode:\x20','12065qelWnb','app','global','Missing\x20app\x20name.','Use\x20global\x20config\x20scope','validation','flagMissing','apps','188ligPoH'];a18_0x436a=function(){return _0x12aecd;};return a18_0x436a();}const a18_0x43dd2d=a18_0x5e17;(function(_0x3031a1,_0x2a3d57){const _0x6e40a6=a18_0x5e17,_0x26be10=_0x3031a1();while(!![]){try{const _0x42e2fb=parseInt(_0x6e40a6(0x17f))/0x1*(parseInt(_0x6e40a6(0x187))/0x2)+-parseInt(_0x6e40a6(0x17c))/0x3+-parseInt(_0x6e40a6(0x177))/0x4+-parseInt(_0x6e40a6(0x17b))/0x5*(-parseInt(_0x6e40a6(0x17a))/0x6)+-parseInt(_0x6e40a6(0x17d))/0x7+parseInt(_0x6e40a6(0x176))/0x8+parseInt(_0x6e40a6(0x179))/0x9*(parseInt(_0x6e40a6(0x174))/0xa);if(_0x42e2fb===_0x2a3d57)break;else _0x26be10['push'](_0x26be10['shift']());}catch(_0x385273){_0x26be10['push'](_0x26be10['shift']());}}}(a18_0x436a,0xb3ba0));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(_0x9608d1){const _0x12594b=a18_0x5e17,_0xc2cb52=_0x9608d1['args'][0x0]?.['trim']();if(!_0xc2cb52)throw CliErrors[_0x12594b(0x184)](_0x12594b(0x182),_0x12594b(0x16e)+CLI_BIN_NAME+_0x12594b(0x16b));}async function execute(_0x16afa6){const _0x49182d=a18_0x5e17,_0x3efc34=_0x16afa6[_0x49182d(0x175)][0x0]?.['trim']();if(!_0x3efc34)throw CliErrors[_0x49182d(0x184)](_0x49182d(0x182),_0x49182d(0x16e)+CLI_BIN_NAME+_0x49182d(0x16b));const _0x3e1474=_0x16afa6[_0x49182d(0x173)](_0x49182d(0x16f));if(!_0x3e1474)throw CliErrors[_0x49182d(0x185)](_0x49182d(0x16f),_0x49182d(0x16e)+CLI_BIN_NAME+_0x49182d(0x16b));const _0x37b64d={'global':_0x16afa6[_0x49182d(0x178)](_0x49182d(0x181))},_0x20ccb6=readConfig(_0x37b64d);if(!_0x20ccb6[_0x49182d(0x186)])_0x20ccb6[_0x49182d(0x186)]={};const _0x4d5947={'appcode':_0x3e1474,...collectAppProfileOverrides(_0x2a438a=>_0x16afa6[_0x49182d(0x173)](_0x2a438a))},_0x5b16ab=_0x20ccb6[_0x49182d(0x186)],_0x54122b=!!_0x5b16ab[_0x3efc34];_0x5b16ab[_0x3efc34]=_0x4d5947;if(!_0x20ccb6[_0x49182d(0x16c)])_0x20ccb6[_0x49182d(0x16c)]=_0x3efc34;writeConfig(_0x20ccb6,_0x37b64d);const _0x3568a8=!_0x54122b&&_0x20ccb6[_0x49182d(0x16c)]===_0x3efc34?'\x20Set\x20as\x20default\x20app.':'',_0x2b39bc=(_0x54122b?'Updated':'Added')+_0x49182d(0x169)+_0x3efc34+_0x49182d(0x17e)+_0x3e1474+')'+scopeLabel(_0x37b64d)+'.'+_0x3568a8;return{'ok':!![],'message':_0x2b39bc};}export const appAddDefinition={'service':a18_0x43dd2d(0x180),'command':a18_0x43dd2d(0x171),'description':a18_0x43dd2d(0x16a),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a18_0x43dd2d(0x168),'description':a18_0x43dd2d(0x170),'required':!![]}],'flags':[{'name':a18_0x43dd2d(0x16f),'type':a18_0x43dd2d(0x16d),'description':a18_0x43dd2d(0x172),'required':!![]},{'name':a18_0x43dd2d(0x181),'type':'boolean','description':a18_0x43dd2d(0x183),'default':![]},...getAppProfileFlagDefs()],'validate':validateArgs,'execute':execute};
|