@lovrabet/rabetbase-cli 2.1.7-beta.7 → 2.1.7-beta.9
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_0x4b92cc=a0_0x1624;(function(_0x197f5f,_0x3250ea){const _0x5c22fc=a0_0x1624,_0x3c06e7=_0x197f5f();while(!![]){try{const _0x13e865=parseInt(_0x5c22fc(0x1fb))/0x1*(-parseInt(_0x5c22fc(0x205))/0x2)+parseInt(_0x5c22fc(0x209))/0x3+-parseInt(_0x5c22fc(0x20c))/0x4*(parseInt(_0x5c22fc(0x1f6))/0x5)+parseInt(_0x5c22fc(0x1fc))/0x6*(parseInt(_0x5c22fc(0x1fe))/0x7)+parseInt(_0x5c22fc(0x20d))/0x8*(parseInt(_0x5c22fc(0x1ff))/0x9)+-parseInt(_0x5c22fc(0x1f4))/0xa+parseInt(_0x5c22fc(0x200))/0xb;if(_0x13e865===_0x3250ea)break;else _0x3c06e7['push'](_0x3c06e7['shift']());}catch(_0x279702){_0x3c06e7['push'](_0x3c06e7['shift']());}}}(a0_0xf4bb,0xeac55));import{mkdirSync,writeFileSync}from'node:fs';function a0_0x1624(_0x27cc2f,_0x41f5aa){_0x27cc2f=_0x27cc2f-0x1f4;const _0xf4bb99=a0_0xf4bb();let _0x1624c0=_0xf4bb99[_0x27cc2f];return _0x1624c0;}import a0_0x5923cf from'node:path';function a0_0xf4bb(){const _0x375780=['message','success','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','markdown','19056490DrIySl','push','5100yHOKsa','Waiting\x203\x20seconds...\x0a','api-doc','✓\x20Generated:\x20',']\x20Generating:\x20','1886BJhtOZ','1221348UILtvc','string','49uypXRi','873ExFMGU','14720068wYfLJf','error','join','datasetCode','Fetch\x20doc\x20(','522FwKhJa','/api/node-toolbox/api-doc-generator','name','✗\x20Failed:\x20','3235689DramER','./docs','utf8','4404cQDCzg','52856nXmEAh','Invalid\x20response\x20format\x20(','length','.md\x20-\x20','.md\x20(','生成文档失败:\x20','log','):\x20missing\x20data.markdown\x20field','tableName'];a0_0xf4bb=function(){return _0x375780;};return a0_0xf4bb();}import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{platformFetch}from'../core/api-client.js';export async function fetchDatasetDoc(_0x3096a0){const _0x3fb5d2=a0_0x1624,{appCode:_0x3d6195,cookie:_0x535ed1,datasetCode:_0x35046a,datasetId:_0xea3dd6,extraParams:_0x279cc9}=_0x3096a0,_0x3043a5=getApiDomain()+_0x3fb5d2(0x206),_0x2d56d6=await platformFetch(_0x3043a5,{'method':'POST','body':{'appCode':_0x3d6195,'datasetCode':_0x35046a,'datasetId':_0xea3dd6,..._0x279cc9||{}},'cookie':_0x535ed1,'label':_0x3fb5d2(0x204)+_0x35046a+')'});if(!_0x2d56d6||typeof _0x2d56d6[_0x3fb5d2(0x219)]!==_0x3fb5d2(0x1fd))throw new Error(_0x3fb5d2(0x20e)+_0x35046a+_0x3fb5d2(0x214));return _0x2d56d6[_0x3fb5d2(0x219)];}function delay(_0x3960b8){return new Promise(_0x5582a5=>setTimeout(_0x5582a5,_0x3960b8));}export async function generateDatasetDocs(_0x4b8fc1,_0xff47c9,_0x2dfec4,_0x4d5f46=a0_0x4b92cc(0x20a),_0x3180e8,_0x4d4253){const _0x206186=a0_0x4b92cc;mkdirSync(_0x4d5f46,{'recursive':!![]});const _0x15d06=[],_0xbd9043=_0x4b8fc1[_0x206186(0x20f)];console[_0x206186(0x213)]('\x0a'+_0xbd9043+_0x206186(0x218));for(let _0x2d50d5=0x0;_0x2d50d5<_0x4b8fc1[_0x206186(0x20f)];_0x2d50d5++){const _0x48850c=_0x4b8fc1[_0x2d50d5],_0x20a332=_0x2d50d5+0x1,_0x3fe738=_0x48850c[_0x206186(0x215)];try{console[_0x206186(0x213)]('['+_0x20a332+'/'+_0xbd9043+_0x206186(0x1fa)+_0x3fe738+_0x206186(0x211)+_0x48850c[_0x206186(0x207)]+')');if(_0x3180e8)_0x3180e8(_0x20a332,_0xbd9043,_0x3fe738);const _0x49f8cb=await fetchDatasetDoc({'appCode':_0xff47c9,'cookie':_0x2dfec4,'datasetCode':_0x48850c[_0x206186(0x203)],'datasetId':_0x48850c['id'],'enableAI':![],'extraParams':_0x4d4253}),_0x6baaab=a0_0x5923cf[_0x206186(0x202)](_0x4d5f46,_0x3fe738+'.md');writeFileSync(_0x6baaab,_0x49f8cb,{'encoding':_0x206186(0x20b)}),console[_0x206186(0x213)](_0x206186(0x1f9)+_0x3fe738+'.md'),logger[_0x206186(0x217)](_0x206186(0x1f8),'生成文档成功:\x20'+_0x3fe738,undefined,{'datasetCode':_0x48850c[_0x206186(0x203)],'datasetName':_0x48850c[_0x206186(0x207)],'filePath':_0x6baaab,'progress':_0x20a332+'/'+_0xbd9043}),_0x15d06[_0x206186(0x1f5)]({'datasetCode':_0x48850c[_0x206186(0x203)],'datasetName':_0x48850c[_0x206186(0x207)],'filePath':_0x6baaab,'success':!![]});if(_0x20a332<_0xbd9043)await delay(0x1388);}catch(_0x3df75f){const _0x14f776=_0x3df75f instanceof Error?_0x3df75f[_0x206186(0x216)]:String(_0x3df75f);console[_0x206186(0x213)](_0x206186(0x208)+_0x3fe738+_0x206186(0x210)+_0x14f776),logger[_0x206186(0x201)](_0x206186(0x1f8),_0x206186(0x212)+_0x48850c[_0x206186(0x203)],{'datasetCode':_0x48850c['datasetCode'],'datasetName':_0x48850c[_0x206186(0x207)],'error':_0x14f776,'progress':_0x20a332+'/'+_0xbd9043}),_0x15d06[_0x206186(0x1f5)]({'datasetCode':_0x48850c['datasetCode'],'datasetName':_0x48850c[_0x206186(0x207)],'filePath':'','success':![],'error':_0x14f776}),_0x20a332<_0xbd9043&&(console[_0x206186(0x213)](_0x206186(0x1f7)),await delay(0xbb8));}}return _0x15d06;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a1_0x4cbf(_0x1fe8a4,_0x4a075e){_0x1fe8a4=_0x1fe8a4-0x1e1;const _0x2fe08d=a1_0x2fe0();let _0x4cbfef=_0x2fe08d[_0x1fe8a4];return _0x4cbfef;}(function(_0x1091b3,_0x5164c5){const _0xb28f76=a1_0x4cbf,_0x5ca351=_0x1091b3();while(!![]){try{const _0x435610=-parseInt(_0xb28f76(0x1e4))/0x1*(-parseInt(_0xb28f76(0x1f2))/0x2)+-parseInt(_0xb28f76(0x1ef))/0x3+parseInt(_0xb28f76(0x1e9))/0x4+parseInt(_0xb28f76(0x1e1))/0x5+parseInt(_0xb28f76(0x1e5))/0x6*(-parseInt(_0xb28f76(0x1e8))/0x7)+-parseInt(_0xb28f76(0x1e6))/0x8+parseInt(_0xb28f76(0x1ec))/0x9*(parseInt(_0xb28f76(0x1f3))/0xa);if(_0x435610===_0x5164c5)break;else _0x5ca351['push'](_0x5ca351['shift']());}catch(_0x1ef182){_0x5ca351['push'](_0x5ca351['shift']());}}}(a1_0x2fe0,0x25e0a));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_0x2fe0(){const _0x2c596a=['965600EVNRcv','正在从服务器拉取模型列表...\x20(环境:\x20','/api/node-toolbox/dataset/model-list?appcode=','2lmTklP','576pEoucf','395576kDnjNt','fetch-model-list','15743rIJEvs','827156NWEluu','trim','info','18MzsqCk','replace','name','147480WYuSmf','map','configArray','5048dSKvlQ','323500uQJnKn'];a1_0x2fe0=function(){return _0x2c596a;};return a1_0x2fe0();}function cleanNewlines(_0x5d781b){const _0x3da0bf=a1_0x4cbf;return _0x5d781b[_0x3da0bf(0x1ed)](/[\r\n]+/g,'\x20')[_0x3da0bf(0x1ea)]();}function cleanDatasetName(_0xd9b034){const _0x49726d=a1_0x4cbf;if(!_0xd9b034[_0x49726d(0x1ee)])return _0xd9b034;return{..._0xd9b034,'name':cleanNewlines(_0xd9b034[_0x49726d(0x1ee)])};}export async function fetchModelList(_0x1d94fd,_0x284ed2){const _0x52b511=a1_0x4cbf,_0x19b704=getEnv(),_0x3712dd=getApiDomain()+_0x52b511(0x1e3)+_0x1d94fd+'&otype=array';logger[_0x52b511(0x1eb)](_0x52b511(0x1e7),_0x52b511(0x1e2)+_0x19b704+')',{'apiUrl':_0x3712dd});const _0x117473=await platformFetch(_0x3712dd,{'cookie':_0x284ed2,'label':'Fetch\x20datasets'}),_0x39e431=(_0x117473[_0x52b511(0x1f1)]??[])[_0x52b511(0x1f0)](cleanDatasetName);return{'configArray':_0x39e431,'count':_0x39e431['length']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53d176,_0x33cfc2){const _0x9571a0=a2_0x1f05,_0x8a2173=_0x53d176();while(!![]){try{const _0xdc7d1c=parseInt(_0x9571a0(0x9b))/0x1+-parseInt(_0x9571a0(0xb0))/0x2+parseInt(_0x9571a0(0xae))/0x3+parseInt(_0x9571a0(0xa9))/0x4*(parseInt(_0x9571a0(0xb3))/0x5)+-parseInt(_0x9571a0(0xa2))/0x6+parseInt(_0x9571a0(0xb4))/0x7*(parseInt(_0x9571a0(0xad))/0x8)+-parseInt(_0x9571a0(0xb1))/0x9*(parseInt(_0x9571a0(0xbb))/0xa);if(_0xdc7d1c===_0x33cfc2)break;else _0x8a2173['push'](_0x8a2173['shift']());}catch(_0x1df38c){_0x8a2173['push'](_0x8a2173['shift']());}}}(a2_0x26e6,0x5d2e1));import a2_0xaa7c5e from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a2_0x2d2076 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';function a2_0x1f05(_0x300bec,_0x7c5c33){_0x300bec=_0x300bec-0x9b;const _0x26e649=a2_0x26e6();let _0x1f0594=_0x26e649[_0x300bec];return _0x1f0594;}import{isProduction}from'../constant/env.js';function a2_0x26e6(){const _0x4b1958=['format','13152UCpIOo','867723yTVLOG','alias','202584BocooF','9XtdnpX','API\x20文件生成成功!','22820rCGPLO','847PyvkXK','tableName','dirname','-api','replaceApiContent','push','toUpperCase','1163380ZqrlfA','client.ts.tpl','../..','CONFIG_NAMES.DEFAULT','90002QCPFLw',',\x20env:\x20\x22','key','datasetCode','LOVRABET','join','client','3624840hwrSSX','api.ts.tpl','\x22\x20}','templates/generate-api','utf8','resolve','-client','548QwkJqi','{\x20apiConfigName:\x20\x22','api'];a2_0x26e6=function(){return _0x4b1958;};return a2_0x26e6();}export async function generateApiFile(_0x335561,_0x340535,_0x124378,_0xa1cc0,_0x46b688,_0x412d2e,_0x8cd9f){const _0xe1d96f=a2_0x1f05;if(!_0x124378)throw new Error('Please\x20configure\x20app\x20code\x20first\x20via\x20`'+CLI_BIN_NAME+'\x20config\x20set\x20app\x20<value>`');const _0xbb448c=_0xa1cc0&&!_0x8cd9f,_0xf3728d=_0x8cd9f||_0x124378,_0x494837=_0xbb448c?_0xe1d96f(0xbe):'\x22'+_0xf3728d+'\x22',_0x10aeba=!isProduction(_0x46b688);let _0x1807cb;if(_0xbb448c)_0x10aeba?_0x1807cb='{\x20apiConfigName:\x20'+_0x494837+_0xe1d96f(0x9c)+_0x46b688+_0xe1d96f(0xa4):_0x1807cb='';else{const _0x38191d=_0x10aeba?_0xe1d96f(0x9c)+_0x46b688+'\x22':'';_0x1807cb=_0xe1d96f(0xaa)+_0xf3728d+'\x22'+_0x38191d+'\x20}';}const _0x4fd40f=_0x340535?_0x340535+_0xe1d96f(0xb7):_0xe1d96f(0xab),_0x19ca78=_0x340535?_0x340535+_0xe1d96f(0xa8):_0xe1d96f(0xa1),_0x38786f=_0x340535&&!/^app-[a-f0-9]+$/i['test'](_0x340535)?_0x340535['replace'](/-/g,'_')[_0xe1d96f(0xba)]():_0xe1d96f(0x9f),_0x6447a6=[];_0x335561['forEach'](_0x3160ef=>{const _0x52bd9f=_0xe1d96f;_0x6447a6[_0x52bd9f(0xb9)]({'datasetCode':_0x3160ef[_0x52bd9f(0x9e)],'tableName':_0x3160ef[_0x52bd9f(0xb5)],'name':_0x3160ef['name']||'','alias':_0x3160ef[_0x52bd9f(0xaf)]||_0x3160ef[_0x52bd9f(0x9d)]});});const _0x39bea4=fileURLToPath(import.meta.url),_0x1aefb0=a2_0x2d2076[_0xe1d96f(0xa7)](a2_0x2d2076[_0xe1d96f(0xb6)](_0x39bea4),_0xe1d96f(0xbd)),_0x1cd9da=a2_0x2d2076[_0xe1d96f(0xa0)](_0x1aefb0,_0xe1d96f(0xa5)),_0x5566c8=a2_0x2d2076[_0xe1d96f(0xa0)](_0x1cd9da,_0xe1d96f(0xa3)),_0x4e4fa7=a2_0x2d2076[_0xe1d96f(0xa0)](_0x1cd9da,_0xe1d96f(0xbc)),_0x5e0f7f=_0x412d2e;mkdirSync(_0x5e0f7f,{'recursive':!![]});const _0x4dbfbd=_0x6447a6[0x0]?.['alias'],_0x2750fb=readFileSync(_0x5566c8,_0xe1d96f(0xa6)),_0x73dc2b=TemplateReplacer[_0xe1d96f(0xb8)](_0x2750fb,_0x124378,_0x6447a6,_0x4dbfbd,_0x4fd40f,_0x494837,undefined,_0x38786f),_0x2a3fa2=await a2_0xaa7c5e[_0xe1d96f(0xac)](_0x73dc2b,{'parser':'typescript'}),_0x2905ed=a2_0x2d2076[_0xe1d96f(0xa0)](_0x5e0f7f,_0x4fd40f+'.ts');writeFileSync(_0x2905ed,_0x2a3fa2,{'encoding':_0xe1d96f(0xa6)});const _0x1f3fe1=readFileSync(_0x4e4fa7,_0xe1d96f(0xa6)),_0x16cfb2=TemplateReplacer[_0xe1d96f(0xb8)](_0x1f3fe1,_0x124378,_0x6447a6,_0x4dbfbd,_0x4fd40f,_0x494837,_0x1807cb,_0x38786f),_0x3a3643=await a2_0xaa7c5e[_0xe1d96f(0xac)](_0x16cfb2,{'parser':'typescript'}),_0x165c86=a2_0x2d2076[_0xe1d96f(0xa0)](_0x5e0f7f,_0x19ca78+'.ts');writeFileSync(_0x165c86,_0x3a3643,{'encoding':_0xe1d96f(0xa6)});const _0x21306e=_0x6447a6['length'];return logger['success']('init-api',_0xe1d96f(0xb2),undefined,{'apiFile':_0x2905ed,'clientFile':_0x165c86,'modelCount':_0x21306e,'configName':_0x494837}),{'modelCount':_0x21306e,'apiFilePath':_0x2905ed,'clientFilePath':_0x165c86,'configName':_0x494837};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x295970,_0x412489){const _0x546dde=a3_0x21f7,_0x1dacfa=_0x295970();while(!![]){try{const _0x4a2eaf=parseInt(_0x546dde(0xef))/0x1*(-parseInt(_0x546dde(0xe8))/0x2)+parseInt(_0x546dde(0xe7))/0x3+-parseInt(_0x546dde(0xeb))/0x4*(parseInt(_0x546dde(0xe0))/0x5)+parseInt(_0x546dde(0xe5))/0x6*(-parseInt(_0x546dde(0xea))/0x7)+parseInt(_0x546dde(0xf0))/0x8+-parseInt(_0x546dde(0xf2))/0x9+parseInt(_0x546dde(0xe1))/0xa;if(_0x4a2eaf===_0x412489)break;else _0x1dacfa['push'](_0x1dacfa['shift']());}catch(_0x3194ab){_0x1dacfa['push'](_0x1dacfa['shift']());}}}(a3_0x459a,0xab084));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';function a3_0x459a(){const _0x339914=['autoYes','Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','No\x20valid\x20session.\x20Login\x20now?','284745qqMLFU','20299440zIYLNF','*\x20Login\x20successful!','!\x20Login\x20failed.','\x20auth\x20login\x20--yes`\x20in\x20an\x20interactive\x20terminal.','6aimyVN','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','922143kuYNZu','3868WGkFpD','validation','3563371AoUqnC','40Hcqaqy','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','log','nonInteractive','148IlpQsC','68312qgbjPB','stop','2524869EzhPOb','start'];a3_0x459a=function(){return _0x339914;};return a3_0x459a();}function a3_0x21f7(_0x481f72,_0x159227){_0x481f72=_0x481f72-0xdd;const _0x459a62=a3_0x459a();let _0x21f7c0=_0x459a62[_0x481f72];return _0x21f7c0;}import a3_0x3a166a from'ora';export async function runAuthServer(_0x45e68e){const _0x55cf57=a3_0x21f7,_0x32a1fb=await getIsSessionValid();if(_0x32a1fb){console['log'](_0x55cf57(0xe6));return;}if(_0x45e68e?.[_0x55cf57(0xee)])throw CliErrors[_0x55cf57(0xe9)](_0x55cf57(0xde),'Run\x20`'+CLI_BIN_NAME+_0x55cf57(0xe4));const _0x3cc352=_0x45e68e?.[_0x55cf57(0xdd)]?!![]:await confirm({'message':_0x55cf57(0xdf),'default':!![]});if(!_0x3cc352)return;const _0x34514f=a3_0x3a166a(_0x55cf57(0xec))[_0x55cf57(0xf3)](),_0x465654=await authServer({'silent':!![]});_0x34514f[_0x55cf57(0xf1)](),_0x465654?console[_0x55cf57(0xed)](_0x55cf57(0xe2)):console[_0x55cf57(0xed)](_0x55cf57(0xe3));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x240153=a4_0x3498;(function(_0x48cc10,_0x4a36bd){const _0x131edf=a4_0x3498,_0x5b138e=_0x48cc10();while(!![]){try{const _0x74f71a=-parseInt(_0x131edf(0x12d))/0x1+-parseInt(_0x131edf(0x116))/0x2+parseInt(_0x131edf(0x130))/0x3+-parseInt(_0x131edf(0x129))/0x4*(parseInt(_0x131edf(0x11b))/0x5)+-parseInt(_0x131edf(0x12e))/0x6*(-parseInt(_0x131edf(0x10b))/0x7)+parseInt(_0x131edf(0x126))/0x8*(-parseInt(_0x131edf(0x10f))/0x9)+parseInt(_0x131edf(0x12b))/0xa;if(_0x74f71a===_0x4a36bd)break;else _0x5b138e['push'](_0x5b138e['shift']());}catch(_0x3b5f96){_0x5b138e['push'](_0x5b138e['shift']());}}}(a4_0x3a14,0xef9c6));import{writeFileSync}from'node:fs';import a4_0x241115 from'node:https';function a4_0x3498(_0x4ebc17,_0x3d153a){_0x4ebc17=_0x4ebc17-0x10a;const _0x3a14e3=a4_0x3a14();let _0x349822=_0x3a14e3[_0x4ebc17];return _0x349822;}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(_0x1bce5c){const _0x2406a5=a4_0x3498,_0x5843aa=_0x1bce5c?.[_0x2406a5(0x112)]||![];if(await getIsSessionValid())return!![];const _0x5a5a17=await(await fetch(_0x2406a5(0x124)))[_0x2406a5(0x110)]();return new Promise(async(_0xf19ddb,_0x29ed03)=>{const _0x2fe2cd=_0x2406a5;let _0x1247a0=0x0;const _0xc6359d=a4_0x241115[_0x2fe2cd(0x127)](_0x5a5a17,async(_0x1110ad,_0x22ea42)=>{const _0x299ccb=_0x2fe2cd,_0xfac049=getUserDomain(),_0x4dfc17=_0x1110ad[_0x299ccb(0x125)][_0x299ccb(0x11c)]||'',_0x1ad553=await fetch(_0xfac049+'/api/auth/get-session',{'headers':{'cookie':_0x4dfc17}})[_0x299ccb(0x132)](_0x419e60=>_0x419e60['json']()),_0x5dca2f=_0x1ad553&&_0x1ad553[_0x299ccb(0x128)]&&_0x1ad553[_0x299ccb(0x11a)];if(_0x5dca2f){writeFileSync(cookieFile,_0x4dfc17,_0x299ccb(0x118)),_0xf19ddb(!![]);const _0x366425=buildLoginSuccessHtml();_0x22ea42[_0x299ccb(0x131)](0xc8,{'Content-Type':_0x299ccb(0x113)}),_0x22ea42[_0x299ccb(0x12a)](_0x366425),_0xc6359d[_0x299ccb(0x114)]();}else{const _0x2b4b87=''+encodeURIComponent('https://dev.lovrabet.com:'+_0x1247a0);_0x22ea42[_0x299ccb(0x131)](0x12e,{'location':_0xfac049+_0x299ccb(0x11f)+_0x2b4b87}),_0x22ea42[_0x299ccb(0x12a)]();return;}});_0xc6359d[_0x2fe2cd(0x119)](0x0,_0x2fe2cd(0x11d),()=>{const _0x1b1678=_0x2fe2cd,_0x43778f=_0xc6359d['address']();_0x1247a0=typeof _0x43778f==='object'&&_0x43778f?_0x43778f[_0x1b1678(0x10c)]:Number(_0x43778f);const _0x50c95e=_0x1b1678(0x12f)+_0x1247a0;!_0x5843aa&&(console[_0x1b1678(0x12c)](_0x1b1678(0x10e)),console[_0x1b1678(0x12c)](_0x1b1678(0x115),_0x50c95e),console['log'](_0x1b1678(0x10a)),console[_0x1b1678(0x12c)](''),console[_0x1b1678(0x12c)]('💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.'),console['log']('')),openInBrowser(_0x50c95e)['then'](_0x5890cd=>{const _0x34e02b=_0x1b1678;!_0x5843aa&&(_0x5890cd?console['log'](_0x34e02b(0x10d)):(console['log'](_0x34e02b(0x121)),console[_0x34e02b(0x12c)](_0x34e02b(0x120),_0x50c95e)),console[_0x34e02b(0x12c)](''));})['catch'](()=>{const _0x108412=_0x1b1678;!_0x5843aa&&(console[_0x108412(0x12c)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x108412(0x12c)](_0x108412(0x120),_0x50c95e),console[_0x108412(0x12c)](''));});}),_0xc6359d['on'](_0x2fe2cd(0x122),_0x29ee6e=>{const _0x4b0c13=_0x2fe2cd;!_0x5843aa&&console['error'](_0x4b0c13(0x123),_0x29ee6e),_0x29ed03(_0x29ee6e);});});}function a4_0x3a14(){const _0x5dd8a7=['50viKGrT','cookie','127.0.0.1','darwin','/sign-in?redirect=','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','error','Auth\x20server\x20error:','https://g.yuntooai.com/cert/lovrabet-dev.json','headers','6779512JqloyB','createServer','session','531508AUJxxJ','end','21175590cgoEwX','log','421577cwzRqu','12VOCwTE','https://dev.lovrabet.com:','4885932pUgWWg','writeHead','then','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','4994192vTlssg','port','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','🔐\x20Starting\x20login\x20service...','9MzctAf','json','cmd\x20/c\x20start\x20\x22\x22\x20\x22','silent','text/html;\x20charset=utf-8','close','📍\x20Login\x20URL:','3187766NCIzcS','isAuth','utf-8','listen','user'];a4_0x3a14=function(){return _0x5dd8a7;};return a4_0x3a14();}function openInBrowser(_0x5cece8){return new Promise(_0x50c517=>{const _0x2ff6c6=a4_0x3498,_0x393f95=process['platform'];let _0x3b4b29;if(_0x393f95==='win32')_0x3b4b29=_0x2ff6c6(0x111)+_0x5cece8+'\x22';else _0x393f95===_0x2ff6c6(0x11e)?_0x3b4b29='open\x20\x22'+_0x5cece8+'\x22':_0x3b4b29='xdg-open\x20\x22'+_0x5cece8+'\x22';exec(_0x3b4b29,_0x132f83=>{_0x132f83?_0x50c517(![]):_0x50c517(!![]);});});}if(import.meta.main){const isAuth=await authServer();console['log'](a4_0x240153(0x117),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a5_0x291682=a5_0x3c47;(function(_0x57ae38,_0x1e892a){const _0x5e7039=a5_0x3c47,_0x4e36b6=_0x57ae38();while(!![]){try{const _0x2cd9f6=parseInt(_0x5e7039(0xe7))/0x1*(-parseInt(_0x5e7039(0xdb))/0x2)+parseInt(_0x5e7039(0xde))/0x3*(parseInt(_0x5e7039(0xe6))/0x4)+parseInt(_0x5e7039(0xe0))/0x5*(-parseInt(_0x5e7039(0xdd))/0x6)+-parseInt(_0x5e7039(0xdc))/0x7+parseInt(_0x5e7039(0xe4))/0x8*(-parseInt(_0x5e7039(0xe2))/0x9)+parseInt(_0x5e7039(0xe3))/0xa*(parseInt(_0x5e7039(0xe8))/0xb)+parseInt(_0x5e7039(0xe5))/0xc*(parseInt(_0x5e7039(0xe1))/0xd);if(_0x2cd9f6===_0x1e892a)break;else _0x4e36b6['push'](_0x4e36b6['shift']());}catch(_0xf8b007){_0x4e36b6['push'](_0x4e36b6['shift']());}}}(a5_0x54ce,0xd2118));import{mkdirSync}from'node:fs';function a5_0x54ce(){const _0x4fd95b=['4phXDnf','2rjnZUH','368247GeedzJ','.lovrabet','84012MiWLjF','113918FmglRq','635034KTMqep','1971852WyrpKV','cookie','65SKYbTH','20567482KHxYRC','163341FUBxJx','170iIImqz','208IHjpTT','12JSxPGJ'];a5_0x54ce=function(){return _0x4fd95b;};return a5_0x54ce();}import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a5_0x291682(0xda));export const cookieFile=join(configDir,a5_0x291682(0xdf));function a5_0x3c47(_0x51727b,_0x2843b4){_0x51727b=_0x51727b-0xda;const _0x54cef6=a5_0x54ce();let _0x3c471c=_0x54cef6[_0x51727b];return _0x3c471c;}mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xed4f4b,_0x523411){var _0x124443=a6_0x5dae,_0x2e1291=_0xed4f4b();while(!![]){try{var _0x21b5a1=-parseInt(_0x124443(0x129))/0x1*(parseInt(_0x124443(0x125))/0x2)+-parseInt(_0x124443(0x12c))/0x3+-parseInt(_0x124443(0x12a))/0x4*(parseInt(_0x124443(0x12d))/0x5)+-parseInt(_0x124443(0x128))/0x6+parseInt(_0x124443(0x127))/0x7+-parseInt(_0x124443(0x12e))/0x8+parseInt(_0x124443(0x126))/0x9;if(_0x21b5a1===_0x523411)break;else _0x2e1291['push'](_0x2e1291['shift']());}catch(_0x2027fd){_0x2e1291['push'](_0x2e1291['shift']());}}}(a6_0x2f2e,0x27784));function a6_0x2f2e(){var _0x325ba6=['2360328cVdUXA','370pMcCal','8856819vRotxF','661444DjQcJx','231852WZZDQV','934fFUZlF','12sDaJTC','utf-8','381672yGUkto','472030jvFnaz'];a6_0x2f2e=function(){return _0x325ba6;};return a6_0x2f2e();}import{readFileSync}from'node:fs';function a6_0x5dae(_0x4bcb1a,_0x1fa2a1){_0x4bcb1a=_0x4bcb1a-0x125;var _0x2f2e4a=a6_0x2f2e();var _0x5daec6=_0x2f2e4a[_0x4bcb1a];return _0x5daec6;}import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0x29e29a=a6_0x5dae;try{return readFileSync(cookieFile,_0x29e29a(0x12b));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x259b03,_0x392471){const _0x3d437d=a7_0x22ff,_0x859c25=_0x259b03();while(!![]){try{const _0x2166cd=-parseInt(_0x3d437d(0x1f3))/0x1+parseInt(_0x3d437d(0x1fb))/0x2+-parseInt(_0x3d437d(0x1f5))/0x3+-parseInt(_0x3d437d(0x1f7))/0x4*(parseInt(_0x3d437d(0x1f0))/0x5)+-parseInt(_0x3d437d(0x1f8))/0x6*(-parseInt(_0x3d437d(0x1fa))/0x7)+parseInt(_0x3d437d(0x1ef))/0x8*(parseInt(_0x3d437d(0x1ed))/0x9)+parseInt(_0x3d437d(0x1f2))/0xa;if(_0x2166cd===_0x392471)break;else _0x859c25['push'](_0x859c25['shift']());}catch(_0x2ad0d9){_0x859c25['push'](_0x859c25['shift']());}}}(a7_0x3746,0xc91ed));function a7_0x22ff(_0x5e3427,_0x7f0b2e){_0x5e3427=_0x5e3427-0x1ed;const _0x37461a=a7_0x3746();let _0x22fff7=_0x37461a[_0x5e3427];return _0x22fff7;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a7_0x3746(){const _0x44d310=['48tKBmyH','utf-8','749693WgulwK','2249804bLIyXs','747yqjZNe','user','48232tzknYz','634195FIEHeh','session','2872340lRtXaI','871015AlEwnl','/api/auth/get-session','1321008KGSUSV','json','20FfSQuq'];a7_0x3746=function(){return _0x44d310;};return a7_0x3746();}export async function getSessionUserInfo(){const _0x3ee679=a7_0x22ff;try{if(!existsSync(cookieFile))return null;const _0x55a325=readFileSync(cookieFile,_0x3ee679(0x1f9)),_0xf089f4=await fetch(getUserDomain()+_0x3ee679(0x1f4),{'headers':{'cookie':_0x55a325}});if(!_0xf089f4['ok'])return null;const _0x2d76a2=await _0xf089f4[_0x3ee679(0x1f6)]();if(!_0x2d76a2[_0x3ee679(0x1f1)]||!_0x2d76a2[_0x3ee679(0x1ee)])return null;return _0x2d76a2;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x92ea38,_0x500fae){const _0x563ea1=a8_0x16f0,_0x3d4e69=_0x92ea38();while(!![]){try{const _0x285afe=-parseInt(_0x563ea1(0x17a))/0x1+-parseInt(_0x563ea1(0x174))/0x2+parseInt(_0x563ea1(0x17b))/0x3+parseInt(_0x563ea1(0x176))/0x4+parseInt(_0x563ea1(0x178))/0x5+parseInt(_0x563ea1(0x179))/0x6+-parseInt(_0x563ea1(0x170))/0x7;if(_0x285afe===_0x500fae)break;else _0x3d4e69['push'](_0x3d4e69['shift']());}catch(_0x1c353f){_0x3d4e69['push'](_0x3d4e69['shift']());}}}(a8_0x3396,0x25110));function a8_0x16f0(_0x31d069,_0x488d6d){_0x31d069=_0x31d069-0x170;const _0x33962d=a8_0x3396();let _0x16f023=_0x33962d[_0x31d069];return _0x16f023;}import{existsSync,readFileSync}from'node:fs';function a8_0x3396(){const _0x2f7590=['user','utf-8','then','34760bfptSo','/api/auth/get-session','659176AFHOHB','json','1308250zYaaYm','555402ByUekY','154417BoiCqw','549711Skayvn','session','2650389WNDzlw'];a8_0x3396=function(){return _0x2f7590;};return a8_0x3396();}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x55ff2b=a8_0x16f0;try{if(!existsSync(cookieFile))return![];const _0x6fdc29=readFileSync(cookieFile,_0x55ff2b(0x172)),_0x36001f=await fetch(getUserDomain()+_0x55ff2b(0x175),{'headers':{'cookie':_0x6fdc29}})[_0x55ff2b(0x173)](_0x283e86=>_0x283e86[_0x55ff2b(0x177)]());return _0x36001f&&_0x36001f[_0x55ff2b(0x17c)]&&_0x36001f[_0x55ff2b(0x171)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a9_0x5c74(){const _0x374cf7=['258PJleOJ','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','1390600tvmeEi','<!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>','33883030HErqOD','142bHijLT','10863agaaZf','548486QQsxwH','</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>','441akKtyq','116385JPHdIp','8270913AbYpkb','102840PkCttC'];a9_0x5c74=function(){return _0x374cf7;};return a9_0x5c74();}(function(_0x18a1df,_0x9f310d){const _0x49874b=a9_0x43d4,_0x542868=_0x18a1df();while(!![]){try{const _0x409372=-parseInt(_0x49874b(0x76))/0x1+parseInt(_0x49874b(0x74))/0x2*(-parseInt(_0x49874b(0x75))/0x3)+-parseInt(_0x49874b(0x71))/0x4+parseInt(_0x49874b(0x79))/0x5*(-parseInt(_0x49874b(0x6f))/0x6)+-parseInt(_0x49874b(0x6d))/0x7+-parseInt(_0x49874b(0x6e))/0x8*(-parseInt(_0x49874b(0x78))/0x9)+parseInt(_0x49874b(0x73))/0xa;if(_0x409372===_0x9f310d)break;else _0x542868['push'](_0x542868['shift']());}catch(_0x21bc04){_0x542868['push'](_0x542868['shift']());}}}(a9_0x5c74,0xa6a05));function a9_0x43d4(_0x5b1ff9,_0x22a54a){_0x5b1ff9=_0x5b1ff9-0x6d;const _0x5c746d=a9_0x5c74();let _0x43d48f=_0x5c746d[_0x5b1ff9];return _0x43d48f;}export function buildLoginSuccessHtml(){const _0x1771c6=a9_0x43d4,_0x5a45f2=_0x1771c6(0x70);return _0x1771c6(0x72)+_0x5a45f2+_0x1771c6(0x77);}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d6874,_0x4762ce){var _0x216720=a10_0xe2fb,_0x51c837=_0x3d6874();while(!![]){try{var _0x36e8f8=-parseInt(_0x216720(0xa6))/0x1+-parseInt(_0x216720(0xa8))/0x2+-parseInt(_0x216720(0xa7))/0x3+-parseInt(_0x216720(0xa9))/0x4*(parseInt(_0x216720(0xa5))/0x5)+-parseInt(_0x216720(0xa3))/0x6*(-parseInt(_0x216720(0xad))/0x7)+parseInt(_0x216720(0xa1))/0x8*(parseInt(_0x216720(0xac))/0x9)+-parseInt(_0x216720(0xa2))/0xa*(-parseInt(_0x216720(0xa4))/0xb);if(_0x36e8f8===_0x4762ce)break;else _0x51c837['push'](_0x51c837['shift']());}catch(_0x4c5a05){_0x51c837['push'](_0x51c837['shift']());}}}(a10_0x3835,0xe8016));import{unlinkSync,existsSync}from'node:fs';function a10_0xe2fb(_0x454cd1,_0x393f11){_0x454cd1=_0x454cd1-0xa1;var _0x3835fb=a10_0x3835();var _0xe2fbb7=_0x3835fb[_0x454cd1];return _0xe2fbb7;}import{cookieFile}from'../auth/constant.js';export function logout(){var _0x33d015=a10_0xe2fb;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x33d015(0xaa)]('✓\x20Logged\x20out')):console[_0x33d015(0xaa)](_0x33d015(0xab));}function a10_0x3835(){var _0x49b3d6=['869108TrEIwR','log','!\x20Not\x20logged\x20in','73350IXsdSX','658pnwYQZ','1776NYSvCT','620170dyrVuN','12900FukPYZ','693FQLuGA','35kXqTvs','864310unexoR','3301440kHZnLH','2964896RWiRKs'];a10_0x3835=function(){return _0x49b3d6;};return a10_0x3835();}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a11_0x9ffd(_0x48b242,_0x215e71){_0x48b242=_0x48b242-0x1f0;const _0x2cc7e4=a11_0x2cc7();let _0x9ffd55=_0x2cc7e4[_0x48b242];return _0x9ffd55;}(function(_0x40a8d8,_0x3010c8){const _0x12a292=a11_0x9ffd,_0x2311cf=_0x40a8d8();while(!![]){try{const _0x5ee2c8=parseInt(_0x12a292(0x1f2))/0x1+parseInt(_0x12a292(0x1f1))/0x2*(-parseInt(_0x12a292(0x1f8))/0x3)+-parseInt(_0x12a292(0x1f7))/0x4*(parseInt(_0x12a292(0x1f6))/0x5)+parseInt(_0x12a292(0x1f4))/0x6+-parseInt(_0x12a292(0x1f3))/0x7*(-parseInt(_0x12a292(0x1f9))/0x8)+parseInt(_0x12a292(0x1f0))/0x9+-parseInt(_0x12a292(0x1f5))/0xa;if(_0x5ee2c8===_0x3010c8)break;else _0x2311cf['push'](_0x2311cf['shift']());}catch(_0xc5e50c){_0x2311cf['push'](_0x2311cf['shift']());}}}(a11_0x2cc7,0x27e6b));export const dynamicCliFlags={'enableBffSave':{'type':'boolean'}};function a11_0x2cc7(){const _0x35a640=['3806170qycOZe','20270Fkmktu','276SxJeVA','167001zWhQlx','84128HaCoSI','943209kjFjON','2ObsCoi','257629ttsPvH','168RuXztE','1587786tBGyLK'];a11_0x2cc7=function(){return _0x35a640;};return a11_0x2cc7();}
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a12_0x2f0cfb=a12_0x38cc;(function(_0x10007b,_0x74d95a){const _0x5012be=a12_0x38cc,_0x13d78a=_0x10007b();while(!![]){try{const _0x37a1c6=parseInt(_0x5012be(0xc6))/0x1*(parseInt(_0x5012be(0xe9))/0x2)+parseInt(_0x5012be(0xc7))/0x3*(-parseInt(_0x5012be(0xf6))/0x4)+parseInt(_0x5012be(0xd9))/0x5+parseInt(_0x5012be(0xd4))/0x6*(parseInt(_0x5012be(0xcc))/0x7)+parseInt(_0x5012be(0xf7))/0x8*(parseInt(_0x5012be(0xda))/0x9)+-parseInt(_0x5012be(0xd0))/0xa+parseInt(_0x5012be(0xea))/0xb*(-parseInt(_0x5012be(0xc5))/0xc);if(_0x37a1c6===_0x74d95a)break;else _0x13d78a['push'](_0x13d78a['shift']());}catch(_0x5d6b79){_0x13d78a['push'](_0x13d78a['shift']());}}}(a12_0x5112,0xde9e7));function a12_0x5112(){const _0x401517=['name','cancelled','env','2452780dtdkNK','14020443VFDZAi','code','wildcardDef','exitCode','`\x20is\x20an\x20alias\x20of\x20`','Error:\x20','./context.js','service','./cli-flags.js','./constant/domain.js','⚠\x20`','string','Hint:\x20','help','message','19802bcviWZ','253627baAvDy','stderr','raw','defaultCommand','now','error','slice','\x0aCancelled.\x0a','hint','`\x20in\x20new\x20scripts.\x0a','unknownCommand','./constant/env.js','4SbLtZj','8fCUlju','flags','unknown','\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a','log','252usHKYW','141rdzUIu','3196911ztMGdi','`\x20in\x20v2.0.\x0a','Unexpected\x20error:','userDomain','global','7pBtlNv','runtimeDomain','`\x20has\x20been\x20moved\x20to\x20`','input','15260040ScVaVl','unknown_service','apiDomain','write','3259566Qlgvtp','ExitPromptError'];a12_0x5112=function(){return _0x401517;};return a12_0x5112();}import a12_0x1bccf0 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';function a12_0x38cc(_0x393832,_0x3a5845){_0x393832=_0x393832-0xc3;const _0x51122e=a12_0x5112();let _0x38ccf1=_0x51122e[_0x393832];return _0x38ccf1;}import{CLI_BIN_NAME,buildMeowFlags}from'./constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'./generated/build-info.js';import{reportCliHelpTrace}from'./telemetry/cli-help-trace.js';import{reportCommandTrace}from'./telemetry/cli-command-trace.js';import{registerOtelShutdownOnExit,exitWithOtelShutdown}from'./telemetry/register-otel-exit-shutdown.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import(a12_0x2f0cfb(0xe2)))['dynamicCliFlags'];}catch{}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!==a12_0x2f0cfb(0xf9)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[a12_0x2f0cfb(0xf0)](0x0,0xa)+')':VERSION,cli=a12_0x1bccf0(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0x289491=a12_0x2f0cfb;let _0x2743de=cli[_0x289491(0xcf)][0x0],_0x4252aa=cli[_0x289491(0xcf)][0x1];const _0x344833=cli[_0x289491(0xf8)];if(!_0x2743de){await reportCliHelpTrace(_0x289491(0xcb)),showHelp();return;}const _0x172a6a=deprecatedAliases[_0x2743de];if(_0x172a6a&&!isKnownService(_0x2743de)){const _0x433b63=_0x4252aa?CLI_BIN_NAME+'\x20'+_0x2743de+'\x20'+_0x4252aa:CLI_BIN_NAME+'\x20'+_0x2743de,_0x548ddd=CLI_BIN_NAME+'\x20'+_0x172a6a[_0x289491(0xe1)]+'\x20'+_0x172a6a['command'];console[_0x289491(0xef)]('⚠\x20`'+_0x433b63+_0x289491(0xce)+_0x548ddd+_0x289491(0xc8)+_0x289491(0xc3)),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x2743de)){await reportCliHelpTrace(_0x289491(0xd1),{'service':_0x2743de}),showHelp();return;}const _0x1749e8=getServiceEntry(_0x2743de);if(_0x344833['env']&&typeof _0x344833[_0x289491(0xd8)]===_0x289491(0xe5)){const {initEnv:_0x33ddd3}=await import('./constant/env.js');_0x33ddd3(_0x344833[_0x289491(0xd8)]);}const {buildConfigFromFlags:_0x1e78fb}=await import(_0x289491(0xe0)),_0xf6440d=_0x1e78fb(_0x344833);if(!_0x344833[_0x289491(0xd8)]&&_0xf6440d['env']){const {initEnv:_0x1ff4fa}=await import(_0x289491(0xf5));_0x1ff4fa(_0xf6440d[_0x289491(0xd8)]);}if(_0xf6440d[_0x289491(0xec)]?.[_0x289491(0xd2)]||_0xf6440d[_0x289491(0xec)]?.[_0x289491(0xca)]||_0xf6440d[_0x289491(0xec)]?.['runtimeDomain']){const {initDomains:_0x56b60b}=await import(_0x289491(0xe3));_0x56b60b({'apiDomain':_0xf6440d[_0x289491(0xec)][_0x289491(0xd2)]||undefined,'userDomain':_0xf6440d[_0x289491(0xec)]['userDomain']||undefined,'runtimeDomain':_0xf6440d[_0x289491(0xec)][_0x289491(0xcd)]||undefined});}if(!_0x4252aa){if(_0x344833[_0x289491(0xe7)]){printServiceHelp(_0x2743de);return;}if(_0x1749e8[_0x289491(0xed)])_0x4252aa=_0x1749e8['defaultCommand'];else{if(_0x1749e8[_0x289491(0xdc)]){await dispatchDeclarative(_0x1749e8[_0x289491(0xdc)],_0x2743de,'',[],_0x344833,_0xf6440d);return;}else{printServiceHelp(_0x2743de);return;}}}const _0x5b227f=resolveDeprecatedSubcommand(_0x2743de,_0x4252aa);if(_0x5b227f){const _0x3ff6e4=CLI_BIN_NAME+'\x20'+_0x2743de+'\x20'+_0x4252aa,_0x2207be=CLI_BIN_NAME+'\x20'+_0x2743de+'\x20'+_0x5b227f;console[_0x289491(0xef)](_0x289491(0xe4)+_0x3ff6e4+_0x289491(0xde)+_0x2207be+'`;\x20prefer\x20`'+_0x2207be+_0x289491(0xf3)),_0x4252aa=_0x5b227f;}if(_0x344833[_0x289491(0xe7)]&&!findDefinition(_0x2743de,_0x4252aa)){printServiceHelp(_0x2743de);return;}{let _0x1d72c5=findDefinition(_0x2743de,_0x4252aa),_0x4be48a=cli[_0x289491(0xcf)][_0x289491(0xf0)](0x2);if(!_0x1d72c5){if(_0x1749e8[_0x289491(0xdc)]){if(_0x344833['help']){console[_0x289491(0xc4)](generateCommandHelp(_0x1749e8[_0x289491(0xdc)]));return;}_0x1d72c5=_0x1749e8[_0x289491(0xdc)],_0x4be48a=[_0x4252aa,...cli['input']['slice'](0x2)];}else{printServiceHelp(_0x2743de),await handleErrorAsync(CliErrors[_0x289491(0xf4)](_0x2743de+'\x20'+_0x4252aa));return;}}if(_0x344833[_0x289491(0xe7)]){console[_0x289491(0xc4)](generateCommandHelp(_0x1d72c5));return;}await dispatchDeclarative(_0x1d72c5,_0x2743de,_0x4252aa,_0x4be48a,_0x344833,_0xf6440d);}}async function dispatchDeclarative(_0x2ae8c3,_0xa4eff3,_0x4d54fb,_0x3d82f1,_0x24ebec,_0x1318f8){const _0xdb5ce3=a12_0x2f0cfb,_0x58f34d=Date[_0xdb5ce3(0xee)]();let _0x5ed004;try{await runCommand(_0x2ae8c3,createPipelineEnv(_0x1318f8,_0x24ebec,_0x3d82f1));}catch(_0x5efbe0){_0x5ed004=_0x5efbe0;}await reportCommandTrace({'service':_0xa4eff3,'command':_0x4d54fb,'flags':_0x24ebec,'durationMs':Date[_0xdb5ce3(0xee)]()-_0x58f34d,'error':_0x5ed004});if(_0x5ed004)await handleErrorAsync(_0x5ed004);}function printServiceHelp(_0x3417d8){console['log'](generateServiceHelp(_0x3417d8));}async function handleErrorAsync(_0x1061fe){const _0x13990e=a12_0x2f0cfb;if(_0x1061fe instanceof Error&&_0x1061fe[_0x13990e(0xd6)]===_0x13990e(0xd5))return process['stderr'][_0x13990e(0xd3)](_0x13990e(0xf1)),await exitWithOtelShutdown(0x0);if(_0x1061fe instanceof CliError){if(_0x1061fe[_0x13990e(0xdb)]===_0x13990e(0xd7))return process[_0x13990e(0xeb)][_0x13990e(0xd3)]('\x0a'+_0x1061fe['message']+'\x0a'),await exitWithOtelShutdown(0x0);console['error'](_0x13990e(0xdf)+_0x1061fe[_0x13990e(0xe8)]);if(_0x1061fe['hint'])console['error'](_0x13990e(0xe6)+_0x1061fe[_0x13990e(0xf2)]);return await exitWithOtelShutdown(_0x1061fe[_0x13990e(0xdd)]);}return console['error'](_0x13990e(0xc9),_0x1061fe),await exitWithOtelShutdown(0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13_0x18b7cc=a13_0x3daa;function a13_0x48b1(){const _0x2d232b=['\x20dataset(s)','...','datasetcode','success','some','\x1b[90m*\x20Filtered\x20','✓\x20Generated\x20','split','10343762lJXrNx','validation','api','./docs','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','\x20dataset(s)\x1b[0m','fail','200340tvHbzE','output','write','appCode','length','--datasetcode\x20cannot\x20be\x20empty.','join','filter','error','Doc\x20generation:\x20','937787HCGMEI','3827208dgEqro','.md','10ZqDLWJ','\x20failed','Invalid\x20--params:\x20','\x20file(s)','succeed','str','\x20succeeded,\x20','string','start','15OgwOyU','9ZsPiiT','object','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','\x20\x20•\x20','\x1b[0m','Fetched\x20','1017154LTIBHf','datasetName','\x20of\x20','None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20','461276GOiLaa','Failed\x20to\x20fetch\x20datasets','must\x20be\x20a\x20JSON\x20object','parse','264hihTHW','7978040GUxlRe','Fetching\x20dataset\x20list\x20for\x20','cookie','stdout','trim','\x0d\x20\x20[','has','isArray','padStart','params','\x1b[90m*\x20Generating\x20docs\x20for:\x20','map'];a13_0x48b1=function(){return _0x2d232b;};return a13_0x48b1();}(function(_0x1591e1,_0xd6f839){const _0x88e80=a13_0x3daa,_0x49f463=_0x1591e1();while(!![]){try{const _0x1671e1=-parseInt(_0x88e80(0xf3))/0x1+-parseInt(_0x88e80(0x106))/0x2*(-parseInt(_0x88e80(0x100))/0x3)+parseInt(_0x88e80(0xc9))/0x4*(parseInt(_0x88e80(0xff))/0x5)+-parseInt(_0x88e80(0xf4))/0x6+-parseInt(_0x88e80(0xce))/0x7+-parseInt(_0x88e80(0xcd))/0x8*(-parseInt(_0x88e80(0xe9))/0x9)+-parseInt(_0x88e80(0xf6))/0xa*(-parseInt(_0x88e80(0xe2))/0xb);if(_0x1671e1===_0xd6f839)break;else _0x49f463['push'](_0x49f463['shift']());}catch(_0x41aca1){_0x49f463['push'](_0x49f463['shift']());}}}(a13_0x48b1,0xcaf03));import a13_0x218f51 from'ora';function a13_0x3daa(_0x49851f,_0x2e34fd){_0x49851f=_0x49851f-0xc7;const _0x48b149=a13_0x48b1();let _0x3daaa7=_0x48b149[_0x49851f];return _0x3daaa7;}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':a13_0x18b7cc(0xe4),'command':'generate','description':'Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','risk':'write','requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a13_0x18b7cc(0xea),'type':a13_0x18b7cc(0xfd),'description':'Output\x20directory\x20(default:\x20./docs)'},{'name':'datasetcode','type':a13_0x18b7cc(0xfd),'description':'Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for'},{'name':a13_0x18b7cc(0xd7),'type':'string','description':a13_0x18b7cc(0x102)}],async 'execute'(_0x4f7bd3){const _0x676108=a13_0x18b7cc,_0x3bc6b4=_0x4f7bd3[_0x676108(0xfb)](_0x676108(0xea))||_0x676108(0xe5),_0x519252=_0x4f7bd3[_0x676108(0xfb)](_0x676108(0xdc)),_0x5dc826=_0x4f7bd3[_0x676108(0xfb)](_0x676108(0xd7));let _0x45e315;if(_0x5dc826)try{_0x45e315=JSON[_0x676108(0xcc)](_0x5dc826);if(typeof _0x45e315!==_0x676108(0x101)||_0x45e315===null||Array[_0x676108(0xd5)](_0x45e315))throw new Error(_0x676108(0xcb));}catch(_0x4a5fc7){throw CliErrors[_0x676108(0xe3)](_0x676108(0xf8)+(_0x4a5fc7 instanceof Error?_0x4a5fc7['message']:String(_0x4a5fc7)),_0x676108(0xe6));}let _0x52df3c;if(_0x519252){const _0x246658=_0x519252[_0x676108(0xe1)](',')[_0x676108(0xd9)](_0x550ec5=>_0x550ec5[_0x676108(0xd2)]())[_0x676108(0xf0)](_0x2d62c9=>_0x2d62c9[_0x676108(0xed)]>0x0);if(_0x246658[_0x676108(0xed)]===0x0)throw CliErrors[_0x676108(0xe3)](_0x676108(0xee));_0x52df3c=new Set(_0x246658),writeCliSideChannelLine(_0x676108(0xd8)+_0x246658[_0x676108(0xef)](',\x20')+'\x1b[0m');}const _0x1f6961=a13_0x218f51(_0x676108(0xcf)+_0x4f7bd3[_0x676108(0xec)]+_0x676108(0xdb))[_0x676108(0xfe)]();let _0x11c8c9;try{({configArray:_0x11c8c9}=await fetchModelList(_0x4f7bd3['appCode'],_0x4f7bd3[_0x676108(0xd0)]),_0x1f6961[_0x676108(0xfa)](_0x676108(0x105)+_0x11c8c9[_0x676108(0xed)]+_0x676108(0xda)));}catch(_0x159953){_0x1f6961[_0x676108(0xe8)](_0x676108(0xca));throw _0x159953;}if(_0x11c8c9['length']===0x0)return writeCliSideChannelLine('!\x20No\x20datasets\x20found.'),{'ok':!![]};let _0x5233a0=_0x11c8c9;if(_0x52df3c){_0x5233a0=_0x11c8c9['filter'](_0x1c0810=>_0x52df3c[_0x676108(0xd4)](_0x1c0810['datasetCode']));const _0x4d9c3e=[..._0x52df3c][_0x676108(0xf0)](_0x1d371c=>!_0x11c8c9[_0x676108(0xde)](_0x2fc01a=>_0x2fc01a['datasetCode']===_0x1d371c));_0x4d9c3e['length']>0x0&&writeCliSideChannelLine('\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20'+_0x4d9c3e[_0x676108(0xef)](',\x20')+_0x676108(0x104));if(_0x5233a0[_0x676108(0xed)]===0x0)throw CliErrors[_0x676108(0xe3)](_0x676108(0xc8)+[..._0x52df3c][_0x676108(0xef)](',\x20'));writeCliSideChannelLine(_0x676108(0xdf)+_0x5233a0[_0x676108(0xed)]+_0x676108(0xc7)+_0x11c8c9[_0x676108(0xed)]+_0x676108(0xe7));}let _0x5080d2=0x0;const _0x53781f=await generateDatasetDocs(_0x5233a0,_0x4f7bd3['appCode'],_0x4f7bd3[_0x676108(0xd0)],_0x3bc6b4,(_0x1ab1e6,_0x8b5610,_0x25669a)=>{const _0xd3876=_0x676108;_0x5080d2=_0x1ab1e6,process[_0xd3876(0xd1)][_0xd3876(0xeb)](_0xd3876(0xd3)+String(_0x1ab1e6)[_0xd3876(0xd6)](String(_0x8b5610)[_0xd3876(0xed)])+'/'+_0x8b5610+']\x20'+_0x25669a+_0xd3876(0xf5));},_0x45e315);if(_0x5080d2>0x0)process[_0x676108(0xd1)][_0x676108(0xeb)]('\x0a');const _0x1c57f7=_0x53781f['filter'](_0x2dd748=>_0x2dd748[_0x676108(0xdd)])[_0x676108(0xed)],_0x4a996d=_0x53781f[_0x676108(0xf0)](_0x5833ba=>!_0x5833ba[_0x676108(0xdd)])[_0x676108(0xed)];writeCliSideChannelLine(''),writeCliSideChannelLine(_0x676108(0xe0)+_0x1c57f7+'\x20doc(s)\x20in\x20'+_0x3bc6b4);if(_0x4a996d>0x0){writeCliSideChannelLine('!\x20'+_0x4a996d+'\x20doc(s)\x20failed');for(const _0x204a8e of _0x53781f[_0x676108(0xf0)](_0xdd612d=>!_0xdd612d[_0x676108(0xdd)])){writeCliSideChannelLine(_0x676108(0x103)+_0x204a8e[_0x676108(0x107)]+'\x20('+_0x204a8e['datasetCode']+'):\x20'+_0x204a8e[_0x676108(0xf1)]);}}return{'ok':_0x4a996d===0x0,'message':_0x4a996d>0x0?_0x676108(0xf2)+_0x1c57f7+_0x676108(0xfc)+_0x4a996d+_0x676108(0xf7):'Doc\x20generation\x20complete:\x20'+_0x1c57f7+_0x676108(0xf9)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x587acc,_0xd1bbca){const _0x10c64b=a14_0x1c67,_0x2e919a=_0x587acc();while(!![]){try{const _0x4e52e5=-parseInt(_0x10c64b(0xd1))/0x1*(-parseInt(_0x10c64b(0xd5))/0x2)+-parseInt(_0x10c64b(0xd9))/0x3+-parseInt(_0x10c64b(0xdb))/0x4*(parseInt(_0x10c64b(0xd7))/0x5)+parseInt(_0x10c64b(0xd6))/0x6+-parseInt(_0x10c64b(0xdc))/0x7*(parseInt(_0x10c64b(0xd4))/0x8)+-parseInt(_0x10c64b(0xd8))/0x9*(-parseInt(_0x10c64b(0xda))/0xa)+-parseInt(_0x10c64b(0xd3))/0xb*(-parseInt(_0x10c64b(0xd2))/0xc);if(_0x4e52e5===_0xd1bbca)break;else _0x2e919a['push'](_0x2e919a['shift']());}catch(_0x643c0){_0x2e919a['push'](_0x2e919a['shift']());}}}(a14_0xf25e,0xd6407));function a14_0x1c67(_0x3e2be2,_0x336317){_0x3e2be2=_0x3e2be2-0xd1;const _0xf25ee9=a14_0xf25e();let _0x1c67c7=_0xf25ee9[_0x3e2be2];return _0x1c67c7;}import{apiList}from'../../commands/api/list.js';import{apiPull}from'../../commands/api/pull.js';import{apiGenerate}from'../../commands/api/generate.js';function a14_0xf25e(){const _0x3ace9b=['37334URmkHE','5103608YAnoKH','98peQKEz','867222TOYKBB','1313590dqmdse','225VjnkFH','5032395IKPObq','565310fhoedw','20JtIxrL','7OVVIzr','20767bWaXJG','6828mrwQjr'];a14_0xf25e=function(){return _0x3ace9b;};return a14_0xf25e();}export const apiDefinitions=[apiList,apiPull,apiGenerate];
|
package/lib/commands/api/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x437577=a15_0x491a;(function(_0x52deac,_0x4d02b0){const _0x1a54c4=a15_0x491a,_0x4b9bbd=_0x52deac();while(!![]){try{const _0x1da6c6=-parseInt(_0x1a54c4(0x116))/0x1*(parseInt(_0x1a54c4(0x12e))/0x2)+parseInt(_0x1a54c4(0x115))/0x3*(parseInt(_0x1a54c4(0x125))/0x4)+parseInt(_0x1a54c4(0x123))/0x5*(-parseInt(_0x1a54c4(0x11c))/0x6)+parseInt(_0x1a54c4(0x12b))/0x7*(parseInt(_0x1a54c4(0x11f))/0x8)+-parseInt(_0x1a54c4(0x127))/0x9*(-parseInt(_0x1a54c4(0x11b))/0xa)+-parseInt(_0x1a54c4(0x11e))/0xb*(-parseInt(_0x1a54c4(0x12d))/0xc)+-parseInt(_0x1a54c4(0x11a))/0xd*(parseInt(_0x1a54c4(0x12c))/0xe);if(_0x1da6c6===_0x4d02b0)break;else _0x4b9bbd['push'](_0x4b9bbd['shift']());}catch(_0xd894df){_0x4b9bbd['push'](_0x4b9bbd['shift']());}}}(a15_0x3a90,0x27478));import{initEnv}from'../../constant/env.js';function a15_0x491a(_0x38ff7a,_0x576fdc){_0x38ff7a=_0x38ff7a-0x113;const _0x3a90b8=a15_0x3a90();let _0x491ace=_0x3a90b8[_0x38ff7a];return _0x491ace;}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_0x437577(0x120),'command':a15_0x437577(0x119),'description':'List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','risk':a15_0x437577(0x114),'requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0x437577(0x126),'type':a15_0x437577(0x128),'description':a15_0x437577(0x124),'default':![]}],async 'execute'(_0x576533){const _0x2ca460=a15_0x437577,_0x4e6aee=_0x576533[_0x2ca460(0x11d)][_0x2ca460(0x117)]?String(_0x576533[_0x2ca460(0x11d)][_0x2ca460(0x117)]):undefined,_0x18367a=resolveTargetApps(_0x576533,_0x4e6aee);if(_0x18367a){const _0x207dd9=[];for(const _0x4a023d of _0x18367a){const _0x212926=_0x4a023d['cookie']||_0x576533['cookie'],_0x14e952=_0x4a023d['env']||_0x2ca460(0x113);initEnv(_0x14e952);const {configArray:_0x303ba8}=await fetchModelList(_0x4a023d[_0x2ca460(0x117)],_0x212926);_0x207dd9[_0x2ca460(0x12a)](..._0x303ba8['map'](_0x517fac=>({..._0x517fac,'_appName':_0x4a023d[_0x2ca460(0x122)],'_appCode':_0x4a023d[_0x2ca460(0x117)],'_env':_0x14e952,'_isDefault':_0x4a023d[_0x2ca460(0x129)]})));}return{'ok':!![],'data':_0x207dd9};}const {configArray:_0x45dfcd}=await fetchModelList(_0x576533[_0x2ca460(0x118)],_0x576533[_0x2ca460(0x121)]);return{'ok':!![],'data':_0x45dfcd};}};function a15_0x3a90(){const _0x2e91d2=['15754cpopFv','appcode','appCode','list','228917HEftsU','598380MxfJfQ','1644CguAup','rawFlags','44iaslVR','8EFMmRT','api','cookie','name','4105DuzhCG','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','4wlbOTE','global','45tdQpXT','boolean','isDefault','push','1539118fFlcHM','462szkZCg','631608NBTcSK','4NDltwt','production','read','806541CqeldC'];a15_0x3a90=function(){return _0x2e91d2;};return a15_0x3a90();}
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x306a49=a16_0x3a45;(function(_0x5e41be,_0x2198fa){const _0x5cf68f=a16_0x3a45,_0xbac93c=_0x5e41be();while(!![]){try{const _0x5a137c=parseInt(_0x5cf68f(0x1f2))/0x1+-parseInt(_0x5cf68f(0x1e8))/0x2*(-parseInt(_0x5cf68f(0x200))/0x3)+parseInt(_0x5cf68f(0x1f3))/0x4+parseInt(_0x5cf68f(0x1ec))/0x5+parseInt(_0x5cf68f(0x205))/0x6+parseInt(_0x5cf68f(0x1ed))/0x7+-parseInt(_0x5cf68f(0x1ee))/0x8;if(_0x5a137c===_0x2198fa)break;else _0xbac93c['push'](_0xbac93c['shift']());}catch(_0x211fa8){_0xbac93c['push'](_0xbac93c['shift']());}}}(a16_0x1a74,0x83dfc));import a16_0x2399b3 from'ora';function a16_0x1a74(){const _0x3156ac=['cookie','fail','modelCount','pull',')...','\x20dataset(s)\x20→\x20','apiFilePath','start','appcode','length','api','158451zPSNfD','\x20dataset(s),\x20generated\x20','\x20\x20•\x20','.ts','name','1027998LnWUnf','Done:\x20','global','\x20app(s)\x20failed','rawFlags','-client','boolean','\x20model(s)','isDefault','join','...','Pulling\x20','Pulling\x20API\x20config\x20for\x20','appCode','slice','string','\x20succeeded,\x20','message','succeed','8JRcJro','apiDir','Failed:\x20','clientFilePath','961710QVlapb','2579458wnLMiN','18534720jpvDIQ','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','production','env','1060884SIanJh','3410700TqpemA','str'];a16_0x1a74=function(){return _0x3156ac;};return a16_0x1a74();}function a16_0x3a45(_0x4ab2db,_0x306e1d){_0x4ab2db=_0x4ab2db-0x1d8;const _0x1a74bb=a16_0x1a74();let _0x3a454a=_0x1a74bb[_0x4ab2db];return _0x3a454a;}import a16_0x25b171 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_0x306a49(0x1ff),'command':a16_0x306a49(0x1f8),'description':'Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20('+DEFAULT_API_DIR+'/)','risk':'write','requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':'output','type':a16_0x306a49(0x1e4),'description':'Output\x20directory\x20(default:\x20'+DEFAULT_API_DIR+'/)'},{'name':a16_0x306a49(0x207),'type':a16_0x306a49(0x1db),'description':a16_0x306a49(0x1ef),'default':![]}],async 'execute'(_0x5cca6a){const _0x3646cd=a16_0x306a49,_0xb6c754=_0x5cca6a[_0x3646cd(0x1d9)]['appcode']?String(_0x5cca6a[_0x3646cd(0x1d9)][_0x3646cd(0x1fd)]):undefined,_0x138335=_0x5cca6a[_0x3646cd(0x1f4)]('output')||undefined,_0x2fa278=resolveTargetApps(_0x5cca6a,_0xb6c754);if(_0x2fa278){let _0xdfa2d7=0x0,_0x2fdb26=0x0;for(const _0x3853f4 of _0x2fa278){const _0x26278b=_0x3853f4[_0x3646cd(0x1f5)]||_0x5cca6a[_0x3646cd(0x1f5)],_0xba2954=_0x3853f4[_0x3646cd(0x1f1)]||_0x3646cd(0x1f0);initEnv(_0xba2954);const _0xdd3975=_0x3853f4[_0x3646cd(0x1e9)]||_0x138335||_0x5cca6a[_0x3646cd(0x1e9)]||DEFAULT_API_DIR,_0x3390e6=_0x3853f4[_0x3646cd(0x1dd)]?'':_0x3853f4[_0x3646cd(0x204)]||_0x3853f4[_0x3646cd(0x1fd)],_0x23cd60=a16_0x2399b3(_0x3646cd(0x1e0)+_0x3853f4[_0x3646cd(0x204)]+'\x20('+_0x3853f4[_0x3646cd(0x1fd)]+_0x3646cd(0x1f9))[_0x3646cd(0x1fc)]();try{const {configArray:_0x2ec0fd}=await fetchModelList(_0x3853f4['appcode'],_0x26278b),_0x10ba57=await generateApiFile(_0x2ec0fd,_0x3390e6,_0x3853f4[_0x3646cd(0x1fd)],_0x3853f4[_0x3646cd(0x1dd)],_0xba2954,_0xdd3975,_0x3853f4[_0x3646cd(0x204)]);_0x23cd60[_0x3646cd(0x1e7)](_0x3853f4['name']+':\x20'+_0x2ec0fd['length']+_0x3646cd(0x1fa)+_0x10ba57[_0x3646cd(0x1f7)]+_0x3646cd(0x1dc)),writeCliSideChannelLine('\x20\x20•\x20'+_0x10ba57[_0x3646cd(0x1fb)]),writeCliSideChannelLine(_0x3646cd(0x202)+_0x10ba57[_0x3646cd(0x1eb)]),_0xdfa2d7++;}catch(_0x512708){_0x23cd60[_0x3646cd(0x1f6)](_0x3853f4['name']+':\x20'+(_0x512708 instanceof Error?_0x512708[_0x3646cd(0x1e6)]:String(_0x512708))),_0x2fdb26++;}}writeCliSideChannelLine('');if(_0x2fdb26>0x0)writeCliSideChannelLine('!\x20'+_0x2fdb26+_0x3646cd(0x1d8));return{'ok':_0x2fdb26===0x0,'message':_0x3646cd(0x206)+_0xdfa2d7+_0x3646cd(0x1e5)+_0x2fdb26+'\x20failed'};}const _0x5bfcc9=_0xb6c754&&_0xb6c754['includes']('-')?_0xb6c754['split']('-')[_0x3646cd(0x1e3)](0x1)[_0x3646cd(0x1de)]('-'):'',_0x1d6ead=_0x138335||_0x5cca6a['apiDir']||DEFAULT_API_DIR,_0x46d97f=!_0xb6c754,_0x177aba=a16_0x2399b3(_0x3646cd(0x1e1)+_0x5cca6a[_0x3646cd(0x1e2)]+_0x3646cd(0x1df))[_0x3646cd(0x1fc)]();try{const {configArray:_0x1bf465}=await fetchModelList(_0x5cca6a['appCode'],_0x5cca6a[_0x3646cd(0x1f5)]),_0x2043b0=await generateApiFile(_0x1bf465,_0x5bfcc9,_0x5cca6a[_0x3646cd(0x1e2)],_0x46d97f,getEnv(),_0x1d6ead);_0x177aba[_0x3646cd(0x1e7)]('Pulled\x20'+_0x1bf465[_0x3646cd(0x1fe)]+_0x3646cd(0x201)+_0x2043b0['modelCount']+_0x3646cd(0x1dc));const _0x5532d9=_0x5bfcc9?_0x5bfcc9+'-api':_0x3646cd(0x1ff),_0x49d991=_0x5bfcc9?_0x5bfcc9+_0x3646cd(0x1da):'client';return writeCliSideChannelLine(_0x3646cd(0x202)+a16_0x25b171[_0x3646cd(0x1de)](_0x1d6ead,_0x5532d9+_0x3646cd(0x203))),writeCliSideChannelLine(_0x3646cd(0x202)+a16_0x25b171[_0x3646cd(0x1de)](_0x1d6ead,_0x49d991+_0x3646cd(0x203))),{'ok':!![],'data':{'datasetCount':_0x1bf465[_0x3646cd(0x1fe)],'modelCount':_0x2043b0[_0x3646cd(0x1f7)]}};}catch(_0x17f581){_0x177aba['fail'](_0x3646cd(0x1ea)+(_0x17f581 instanceof Error?_0x17f581[_0x3646cd(0x1e6)]:String(_0x17f581)));throw _0x17f581;}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2f51b1,_0x38fe72){const _0x36c471=a17_0x2de8,_0x1ef9c3=_0x2f51b1();while(!![]){try{const _0x5ede5e=-parseInt(_0x36c471(0x84))/0x1*(-parseInt(_0x36c471(0x86))/0x2)+-parseInt(_0x36c471(0x7c))/0x3+-parseInt(_0x36c471(0x77))/0x4+-parseInt(_0x36c471(0x82))/0x5+parseInt(_0x36c471(0x79))/0x6*(parseInt(_0x36c471(0x76))/0x7)+-parseInt(_0x36c471(0x89))/0x8+parseInt(_0x36c471(0x80))/0x9*(parseInt(_0x36c471(0x83))/0xa);if(_0x5ede5e===_0x38fe72)break;else _0x1ef9c3['push'](_0x1ef9c3['shift']());}catch(_0x5dc2f1){_0x1ef9c3['push'](_0x1ef9c3['shift']());}}}(a17_0x50a0,0xb0007));function a17_0x2de8(_0x3f74b0,_0x1fc840){_0x3f74b0=_0x3f74b0-0x76;const _0x50a0fa=a17_0x50a0();let _0x2de82d=_0x50a0fa[_0x3f74b0];return _0x2de82d;}import{getMultiAppConfigs}from'../../utils/config.js';function a17_0x50a0(){const _0x41722f=['length','2sKldcg','selectedAppName','App\x20\x22','3343760jdvNeU','14ppyieh','2343624BjaGmd','join','2321076cOIJsV','global','project','1331793tSPpgs','name','bool','map','54702ABAVTN','validation','1754915KNPfrG','2290ssCKpX','354139WFLkUs'];a17_0x50a0=function(){return _0x41722f;};return a17_0x50a0();}import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x4b4c8b,_0x5b8050){const _0x4506f1=a17_0x2de8;if(_0x5b8050)return null;const _0x2e959d=_0x4b4c8b[_0x4506f1(0x7e)](_0x4506f1(0x7a))?'merged':_0x4506f1(0x7b);let _0x78444=getMultiAppConfigs(_0x2e959d);if(!_0x78444||_0x78444[_0x4506f1(0x85)]===0x0)return null;if(_0x4b4c8b[_0x4506f1(0x87)]){const _0x342c25=_0x78444['filter'](_0x5110b7=>_0x5110b7[_0x4506f1(0x7d)]===_0x4b4c8b[_0x4506f1(0x87)]);if(_0x342c25[_0x4506f1(0x85)]===0x0){const _0x211119=_0x78444[_0x4506f1(0x7f)](_0x19c4b0=>_0x19c4b0[_0x4506f1(0x7d)])[_0x4506f1(0x78)](',\x20');throw CliErrors[_0x4506f1(0x81)](_0x4506f1(0x88)+_0x4b4c8b['selectedAppName']+'\x22\x20not\x20found\x20in\x20config.\x20Available:\x20'+_0x211119);}_0x78444=_0x342c25;}return _0x78444;}
|
package/lib/commands/app/add.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a18_0x16d3a4=a18_0x1b33;(function(_0x3cff9c,_0x476bd1){const _0x25ea51=a18_0x1b33,_0x2a953c=_0x3cff9c();while(!![]){try{const _0x3a9a35=parseInt(_0x25ea51(0x172))/0x1+-parseInt(_0x25ea51(0x16f))/0x2+parseInt(_0x25ea51(0x155))/0x3*(parseInt(_0x25ea51(0x152))/0x4)+parseInt(_0x25ea51(0x165))/0x5*(-parseInt(_0x25ea51(0x157))/0x6)+-parseInt(_0x25ea51(0x15c))/0x7+parseInt(_0x25ea51(0x15b))/0x8+parseInt(_0x25ea51(0x15d))/0x9;if(_0x3a9a35===_0x476bd1)break;else _0x2a953c['push'](_0x2a953c['shift']());}catch(_0x2f1c81){_0x2a953c['push'](_0x2a953c['shift']());}}}(a18_0x997f,0xf2c3d));function a18_0x997f(){const _0x4f822f=['trim','global','App\x20profile\x20name','appcode','validation','Missing\x20app\x20name.','Use\x20global\x20config\x20scope','add','3649412BFNfoU','Updated','str','1187193EjBNOD','app','29232tXdUxQ','apps','Add\x20or\x20update\x20an\x20app\x20in\x20config','498ntlmpe','bool','12AIUTDR','args','\x20Set\x20as\x20default\x20app.','Added','4980608HVukhp','6558286PTNtZn','18840402EewJaf','defaultApp','flagMissing','write','App\x20code','\x22\x20(appcode:\x20','Usage:\x20','\x20app\x20add\x20<name>\x20--appcode\x20<code>','3400765OVjUDT','boolean'];a18_0x997f=function(){return _0x4f822f;};return a18_0x997f();}import{CliErrors}from'../../errors.js';function a18_0x1b33(_0x262006,_0x236548){_0x262006=_0x262006-0x151;const _0x997f1e=a18_0x997f();let _0x1b337d=_0x997f1e[_0x262006];return _0x1b337d;}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(_0x4995e6){const _0x3b30eb=a18_0x1b33,_0x570eaf=_0x4995e6['args'][0x0]?.[_0x3b30eb(0x167)]();if(!_0x570eaf)throw CliErrors[_0x3b30eb(0x16b)]('Missing\x20app\x20name.',_0x3b30eb(0x163)+CLI_BIN_NAME+_0x3b30eb(0x164));}async function execute(_0x5e4bd0){const _0x2db2a4=a18_0x1b33,_0x1e2897=_0x5e4bd0[_0x2db2a4(0x158)][0x0]?.[_0x2db2a4(0x167)]();if(!_0x1e2897)throw CliErrors['validation'](_0x2db2a4(0x16c),_0x2db2a4(0x163)+CLI_BIN_NAME+_0x2db2a4(0x164));const _0x5eea82=_0x5e4bd0[_0x2db2a4(0x171)]('appcode');if(!_0x5eea82)throw CliErrors[_0x2db2a4(0x15f)](_0x2db2a4(0x16a),_0x2db2a4(0x163)+CLI_BIN_NAME+_0x2db2a4(0x164));const _0x2791f9={'global':_0x5e4bd0[_0x2db2a4(0x156)](_0x2db2a4(0x168))},_0x287009=readConfig(_0x2791f9);if(!_0x287009[_0x2db2a4(0x153)])_0x287009[_0x2db2a4(0x153)]={};const _0x45abd0={'appcode':_0x5eea82,...collectAppProfileOverrides(_0x494a4b=>_0x5e4bd0[_0x2db2a4(0x171)](_0x494a4b))},_0x2e71f2=_0x287009[_0x2db2a4(0x153)],_0x3b8158=!!_0x2e71f2[_0x1e2897];_0x2e71f2[_0x1e2897]=_0x45abd0;if(!_0x287009['defaultApp'])_0x287009['defaultApp']=_0x1e2897;writeConfig(_0x287009,_0x2791f9);const _0x4ec1b1=!_0x3b8158&&_0x287009[_0x2db2a4(0x15e)]===_0x1e2897?_0x2db2a4(0x159):'',_0x26a200=(_0x3b8158?_0x2db2a4(0x170):_0x2db2a4(0x15a))+'\x20app\x20\x22'+_0x1e2897+_0x2db2a4(0x162)+_0x5eea82+')'+scopeLabel(_0x2791f9)+'.'+_0x4ec1b1;return{'ok':!![],'message':_0x26a200};}export const appAddDefinition={'service':a18_0x16d3a4(0x151),'command':a18_0x16d3a4(0x16e),'description':a18_0x16d3a4(0x154),'risk':a18_0x16d3a4(0x160),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a18_0x16d3a4(0x169),'required':!![]}],'flags':[{'name':a18_0x16d3a4(0x16a),'type':'string','description':a18_0x16d3a4(0x161),'required':!![]},{'name':a18_0x16d3a4(0x168),'type':a18_0x16d3a4(0x166),'description':a18_0x16d3a4(0x16d),'default':![]},...getAppProfileFlagDefs()],'validate':validateArgs,'execute':execute};
|