@lovrabet/rabetbase-cli 2.2.4-beta.6 → 2.2.4
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/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.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/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.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/relation-audit.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/commands/workspace/index.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/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.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/update-notice.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
|
-
(function(
|
|
1
|
+
const a0_0x1850d7=a0_0x2ca1;(function(_0x5137c2,_0x164629){const _0x5d924f=a0_0x2ca1,_0x38db0a=_0x5137c2();while(!![]){try{const _0x22d0bf=-parseInt(_0x5d924f(0x8a))/0x1+parseInt(_0x5d924f(0x99))/0x2+-parseInt(_0x5d924f(0xa2))/0x3*(-parseInt(_0x5d924f(0x92))/0x4)+-parseInt(_0x5d924f(0x95))/0x5+-parseInt(_0x5d924f(0x8e))/0x6*(parseInt(_0x5d924f(0x91))/0x7)+parseInt(_0x5d924f(0x9a))/0x8+parseInt(_0x5d924f(0x9c))/0x9*(parseInt(_0x5d924f(0x87))/0xa);if(_0x22d0bf===_0x164629)break;else _0x38db0a['push'](_0x38db0a['shift']());}catch(_0x2ab4b5){_0x38db0a['push'](_0x38db0a['shift']());}}}(a0_0x2424,0x49700));function a0_0x2424(){const _0x27447c=['28OZNdEn','16GvUNyB','error','name','1773555xbmKLJ','string','log',']\x20Generating:\x20','193638WXdAjG','576904ULsqbc','tableName','27SBwaMu','生成文档成功:\x20','datasetCode','markdown','length','message','317688xDoGZn','POST','✗\x20Failed:\x20','./docs','.md\x20-\x20','2015120QNnzHw','push','success','205729xVoEhC','Fetch\x20doc\x20(','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','✓\x20Generated:\x20','503718HBFITi','Waiting\x203\x20seconds...\x0a','api-doc'];a0_0x2424=function(){return _0x27447c;};return a0_0x2424();}import{mkdirSync,writeFileSync}from'node:fs';import a0_0x25f047 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(_0x188282){const _0x5ef3a0=a0_0x2ca1,{appCode:_0x463cc0,cookie:_0x393514,datasetCode:_0x155932,datasetId:_0x172799,extraParams:_0x448c70}=_0x188282,_0x600409=getApiDomain()+'/api/node-toolbox/api-doc-generator',_0x50ee71=await platformFetch(_0x600409,{'method':_0x5ef3a0(0xa3),'body':{'appCode':_0x463cc0,'datasetCode':_0x155932,'datasetId':_0x172799,..._0x448c70||{}},'cookie':_0x393514,'label':_0x5ef3a0(0x8b)+_0x155932+')'});if(!_0x50ee71||typeof _0x50ee71[_0x5ef3a0(0x9f)]!==_0x5ef3a0(0x96))throw new Error('Invalid\x20response\x20format\x20('+_0x155932+'):\x20missing\x20data.markdown\x20field');return _0x50ee71[_0x5ef3a0(0x9f)];}function delay(_0x316b5d){return new Promise(_0x2c3095=>setTimeout(_0x2c3095,_0x316b5d));}function a0_0x2ca1(_0x3e6632,_0x3f78b9){_0x3e6632=_0x3e6632-0x87;const _0x24241e=a0_0x2424();let _0x2ca136=_0x24241e[_0x3e6632];return _0x2ca136;}export async function generateDatasetDocs(_0x5da82d,_0x59317c,_0x5dbce5,_0x1f144c=a0_0x1850d7(0xa5),_0x502141,_0x245554){const _0x12e5ad=a0_0x1850d7;mkdirSync(_0x1f144c,{'recursive':!![]});const _0x2e5689=[],_0x29da64=_0x5da82d['length'];console[_0x12e5ad(0x97)]('\x0a'+_0x29da64+_0x12e5ad(0x8c));for(let _0x1d56c0=0x0;_0x1d56c0<_0x5da82d[_0x12e5ad(0xa0)];_0x1d56c0++){const _0x2d0559=_0x5da82d[_0x1d56c0],_0x1db44b=_0x1d56c0+0x1,_0x57f072=_0x2d0559[_0x12e5ad(0x9b)];try{console[_0x12e5ad(0x97)]('['+_0x1db44b+'/'+_0x29da64+_0x12e5ad(0x98)+_0x57f072+'.md\x20('+_0x2d0559[_0x12e5ad(0x94)]+')');if(_0x502141)_0x502141(_0x1db44b,_0x29da64,_0x57f072);const _0xe8e27f=await fetchDatasetDoc({'appCode':_0x59317c,'cookie':_0x5dbce5,'datasetCode':_0x2d0559[_0x12e5ad(0x9e)],'datasetId':_0x2d0559['id'],'enableAI':![],'extraParams':_0x245554}),_0xd33158=a0_0x25f047['join'](_0x1f144c,_0x57f072+'.md');writeFileSync(_0xd33158,_0xe8e27f,{'encoding':'utf8'}),console[_0x12e5ad(0x97)](_0x12e5ad(0x8d)+_0x57f072+'.md'),logger[_0x12e5ad(0x89)](_0x12e5ad(0x90),_0x12e5ad(0x9d)+_0x57f072,undefined,{'datasetCode':_0x2d0559[_0x12e5ad(0x9e)],'datasetName':_0x2d0559[_0x12e5ad(0x94)],'filePath':_0xd33158,'progress':_0x1db44b+'/'+_0x29da64}),_0x2e5689[_0x12e5ad(0x88)]({'datasetCode':_0x2d0559[_0x12e5ad(0x9e)],'datasetName':_0x2d0559[_0x12e5ad(0x94)],'filePath':_0xd33158,'success':!![]});if(_0x1db44b<_0x29da64)await delay(0x1388);}catch(_0x5f069d){const _0x1c31af=_0x5f069d instanceof Error?_0x5f069d[_0x12e5ad(0xa1)]:String(_0x5f069d);console[_0x12e5ad(0x97)](_0x12e5ad(0xa4)+_0x57f072+_0x12e5ad(0xa6)+_0x1c31af),logger[_0x12e5ad(0x93)](_0x12e5ad(0x90),'生成文档失败:\x20'+_0x2d0559['datasetCode'],{'datasetCode':_0x2d0559[_0x12e5ad(0x9e)],'datasetName':_0x2d0559[_0x12e5ad(0x94)],'error':_0x1c31af,'progress':_0x1db44b+'/'+_0x29da64}),_0x2e5689[_0x12e5ad(0x88)]({'datasetCode':_0x2d0559[_0x12e5ad(0x9e)],'datasetName':_0x2d0559['name'],'filePath':'','success':![],'error':_0x1c31af}),_0x1db44b<_0x29da64&&(console[_0x12e5ad(0x97)](_0x12e5ad(0x8f)),await delay(0xbb8));}}return _0x2e5689;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x309a6f,_0xb8b512){const _0x51feb1=a1_0x2aea,_0x32f17a=_0x309a6f();while(!![]){try{const _0x1b99f0=parseInt(_0x51feb1(0x18a))/0x1+parseInt(_0x51feb1(0x18c))/0x2*(-parseInt(_0x51feb1(0x184))/0x3)+parseInt(_0x51feb1(0x17e))/0x4*(-parseInt(_0x51feb1(0x18e))/0x5)+parseInt(_0x51feb1(0x180))/0x6+parseInt(_0x51feb1(0x182))/0x7*(-parseInt(_0x51feb1(0x185))/0x8)+-parseInt(_0x51feb1(0x181))/0x9*(-parseInt(_0x51feb1(0x17b))/0xa)+parseInt(_0x51feb1(0x17c))/0xb;if(_0x1b99f0===_0xb8b512)break;else _0x32f17a['push'](_0x32f17a['shift']());}catch(_0x5043da){_0x32f17a['push'](_0x32f17a['shift']());}}}(a1_0x5d8b,0xa04b9));import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';function a1_0x5d8b(){const _0x36994d=['replace','12bBkCxz','/api/node-toolbox/dataset/model-list?appcode=','1734708NrHpBZ','2592927TDVrNH','50001nbTkaV','length','9YRhuZf','976NfbjMH','trim','正在从服务器拉取模型列表...\x20(环境:\x20','info','fetch-model-list','707520PzVqAR','name','163894NOaamg','configArray','1356965FTwfpN','10aCapRi','14336234xktizp'];a1_0x5d8b=function(){return _0x36994d;};return a1_0x5d8b();}import{platformFetch}from'../core/api-client.js';function a1_0x2aea(_0x41429e,_0x42a718){_0x41429e=_0x41429e-0x17b;const _0x5d8b1c=a1_0x5d8b();let _0x2aea0a=_0x5d8b1c[_0x41429e];return _0x2aea0a;}function cleanNewlines(_0x23d621){const _0x39787c=a1_0x2aea;return _0x23d621[_0x39787c(0x17d)](/[\r\n]+/g,'\x20')[_0x39787c(0x186)]();}function cleanDatasetName(_0x4cf3dc){const _0x220420=a1_0x2aea;if(!_0x4cf3dc['name'])return _0x4cf3dc;return{..._0x4cf3dc,'name':cleanNewlines(_0x4cf3dc[_0x220420(0x18b)])};}export async function fetchModelList(_0xefc270,_0x14744a){const _0x2df3af=a1_0x2aea,_0x5ca310=getEnv(),_0xb83a3d=getApiDomain()+_0x2df3af(0x17f)+_0xefc270+'&otype=array';logger[_0x2df3af(0x188)](_0x2df3af(0x189),_0x2df3af(0x187)+_0x5ca310+')',{'apiUrl':_0xb83a3d});const _0x25a95a=await platformFetch(_0xb83a3d,{'cookie':_0x14744a,'label':'Fetch\x20datasets'}),_0x3da488=(_0x25a95a[_0x2df3af(0x18d)]??[])['map'](cleanDatasetName);return{'configArray':_0x3da488,'count':_0x3da488[_0x2df3af(0x183)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a2_0x145a(_0x5f1700,_0x192b82){_0x5f1700=_0x5f1700-0xad;const _0x1f4372=a2_0x1f43();let _0x145aa0=_0x1f4372[_0x5f1700];return _0x145aa0;}(function(_0x22ede1,_0x4f2402){const _0x273194=a2_0x145a,_0x1e28b8=_0x22ede1();while(!![]){try{const _0x5c6b77=-parseInt(_0x273194(0xb6))/0x1*(parseInt(_0x273194(0xb0))/0x2)+parseInt(_0x273194(0xd3))/0x3*(-parseInt(_0x273194(0xb7))/0x4)+-parseInt(_0x273194(0xbb))/0x5+-parseInt(_0x273194(0xc0))/0x6*(-parseInt(_0x273194(0xce))/0x7)+-parseInt(_0x273194(0xae))/0x8*(-parseInt(_0x273194(0xbc))/0x9)+-parseInt(_0x273194(0xcd))/0xa*(-parseInt(_0x273194(0xc7))/0xb)+parseInt(_0x273194(0xb8))/0xc;if(_0x5c6b77===_0x4f2402)break;else _0x1e28b8['push'](_0x1e28b8['shift']());}catch(_0x42daaa){_0x1e28b8['push'](_0x1e28b8['shift']());}}}(a2_0x1f43,0x3c5a8));import a2_0x91489f from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a2_0xbed18f from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a2_0x1f43(){const _0x39bcc1=['join','api.ts.tpl','tableName','50100pXmWhb','67004LqmrEf','client.ts.tpl','../..','Please\x20configure\x20app\x20code\x20first\x20via\x20`','length','4812dYuoVl','name','forEach','1455656VIHZPT',',\x20env:\x20\x22','2CCaKWG','replaceApiContent','resolve','\x20config\x20set\x20app\x20<value>`','client','init-api','163247APteuH','620Srulrn','4814484HkcHBE','push','dirname','278875QFUhxS','9SmJViC','key','\x22\x20}','datasetCode','48rLlzRR','toUpperCase','api','API\x20文件生成成功!','alias','utf8','-client','121lHVhye','LOVRABET','format'];a2_0x1f43=function(){return _0x39bcc1;};return a2_0x1f43();}import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';export async function generateApiFile(_0xfe3222,_0x388989,_0x44a0ac,_0x29dfb8,_0x562cbb,_0x520955,_0x2661ef){const _0x28c3e0=a2_0x145a;if(!_0x44a0ac)throw new Error(_0x28c3e0(0xd1)+CLI_BIN_NAME+_0x28c3e0(0xb3));const _0x2f6416=_0x29dfb8&&!_0x2661ef,_0x5e11bb=_0x2661ef||_0x44a0ac,_0x56df70=_0x2f6416?'CONFIG_NAMES.DEFAULT':'\x22'+_0x5e11bb+'\x22',_0x45068b=!isProduction(_0x562cbb);let _0x15cb8d;if(_0x2f6416)_0x45068b?_0x15cb8d='{\x20apiConfigName:\x20'+_0x56df70+_0x28c3e0(0xaf)+_0x562cbb+_0x28c3e0(0xbe):_0x15cb8d='';else{const _0x19915a=_0x45068b?_0x28c3e0(0xaf)+_0x562cbb+'\x22':'';_0x15cb8d='{\x20apiConfigName:\x20\x22'+_0x5e11bb+'\x22'+_0x19915a+'\x20}';}const _0x2954c0=_0x388989?_0x388989+'-api':_0x28c3e0(0xc2),_0xf195c1=_0x388989?_0x388989+_0x28c3e0(0xc6):_0x28c3e0(0xb4),_0xb3c362=_0x388989&&!/^app-[a-f0-9]+$/i['test'](_0x388989)?_0x388989['replace'](/-/g,'_')[_0x28c3e0(0xc1)]():_0x28c3e0(0xc8),_0x530b44=[];_0xfe3222[_0x28c3e0(0xad)](_0x39295b=>{const _0x33da87=_0x28c3e0;_0x530b44[_0x33da87(0xb9)]({'datasetCode':_0x39295b[_0x33da87(0xbf)],'tableName':_0x39295b[_0x33da87(0xcc)],'name':_0x39295b[_0x33da87(0xd4)]||'','alias':_0x39295b[_0x33da87(0xc4)]||_0x39295b[_0x33da87(0xbd)]});});const _0x59ebbc=fileURLToPath(import.meta.url),_0x4f7912=a2_0xbed18f[_0x28c3e0(0xb2)](a2_0xbed18f[_0x28c3e0(0xba)](_0x59ebbc),_0x28c3e0(0xd0)),_0x345690=a2_0xbed18f[_0x28c3e0(0xca)](_0x4f7912,'templates/generate-api'),_0x21ead3=a2_0xbed18f['join'](_0x345690,_0x28c3e0(0xcb)),_0x1c2549=a2_0xbed18f[_0x28c3e0(0xca)](_0x345690,_0x28c3e0(0xcf)),_0x388c39=_0x520955;mkdirSync(_0x388c39,{'recursive':!![]});const _0x90daa8=_0x530b44[0x0]?.[_0x28c3e0(0xc4)],_0x56c5cd=readFileSync(_0x21ead3,'utf8'),_0x210f0b=TemplateReplacer[_0x28c3e0(0xb1)](_0x56c5cd,_0x44a0ac,_0x530b44,_0x90daa8,_0x2954c0,_0x56df70,undefined,_0xb3c362),_0x1e2ec=await a2_0x91489f[_0x28c3e0(0xc9)](_0x210f0b,{'parser':'typescript'}),_0xa9932e=a2_0xbed18f['join'](_0x388c39,_0x2954c0+'.ts');writeFileSync(_0xa9932e,_0x1e2ec,{'encoding':_0x28c3e0(0xc5)});const _0x3f6946=readFileSync(_0x1c2549,_0x28c3e0(0xc5)),_0x31189f=TemplateReplacer[_0x28c3e0(0xb1)](_0x3f6946,_0x44a0ac,_0x530b44,_0x90daa8,_0x2954c0,_0x56df70,_0x15cb8d,_0xb3c362),_0x5cdf8e=await a2_0x91489f[_0x28c3e0(0xc9)](_0x31189f,{'parser':'typescript'}),_0x3bd91d=a2_0xbed18f[_0x28c3e0(0xca)](_0x388c39,_0xf195c1+'.ts');writeFileSync(_0x3bd91d,_0x5cdf8e,{'encoding':_0x28c3e0(0xc5)});const _0x2f54f3=_0x530b44[_0x28c3e0(0xd2)];return logger['success'](_0x28c3e0(0xb5),_0x28c3e0(0xc3),undefined,{'apiFile':_0xa9932e,'clientFile':_0x3bd91d,'modelCount':_0x2f54f3,'configName':_0x56df70}),{'modelCount':_0x2f54f3,'apiFilePath':_0xa9932e,'clientFilePath':_0x3bd91d,'configName':_0x56df70};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2dc872,_0x6d72bc){const _0x37b9f8=a3_0x2515,_0x553dcb=_0x2dc872();while(!![]){try{const _0x520d6e=-parseInt(_0x37b9f8(0x1e6))/0x1*(parseInt(_0x37b9f8(0x1e4))/0x2)+parseInt(_0x37b9f8(0x1f5))/0x3*(parseInt(_0x37b9f8(0x1f7))/0x4)+-parseInt(_0x37b9f8(0x1e2))/0x5+-parseInt(_0x37b9f8(0x1f2))/0x6*(-parseInt(_0x37b9f8(0x1ec))/0x7)+parseInt(_0x37b9f8(0x1f8))/0x8*(-parseInt(_0x37b9f8(0x1ea))/0x9)+parseInt(_0x37b9f8(0x1f9))/0xa*(parseInt(_0x37b9f8(0x1f0))/0xb)+-parseInt(_0x37b9f8(0x1f4))/0xc*(parseInt(_0x37b9f8(0x1e1))/0xd);if(_0x520d6e===_0x6d72bc)break;else _0x553dcb['push'](_0x553dcb['shift']());}catch(_0x164757){_0x553dcb['push'](_0x553dcb['shift']());}}}(a3_0x2791,0xacd9d));function a3_0x2791(){const _0x2b8c10=['11862jdCGzl','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','468txClzZ','3oLQnYI','No\x20valid\x20session.\x20Login\x20now?','4445860DbIIqk','780088NSKNfe','10MsjdhW','128375lzvUvJ','1161740Yicxty','!\x20Login\x20failed.','3214ztfXcE','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','785LoNDEI','autoYes','log','start','36wVCbAH','Run\x20`','3703QXgbax','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','nonInteractive','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','9016821Ayjaxl','stop'];a3_0x2791=function(){return _0x2b8c10;};return a3_0x2791();}function a3_0x2515(_0x517549,_0x4e9a19){_0x517549=_0x517549-0x1e1;const _0x279136=a3_0x2791();let _0x2515e3=_0x279136[_0x517549];return _0x2515e3;}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';import a3_0x10eaad from'ora';export async function runAuthServer(_0x33c70d){const _0x13da46=a3_0x2515,_0x74c2d1=await getIsSessionValid();if(_0x74c2d1){console[_0x13da46(0x1e8)](_0x13da46(0x1ef));return;}if(_0x33c70d?.[_0x13da46(0x1ee)]&&!_0x33c70d[_0x13da46(0x1e7)])throw CliErrors['validation']('Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.',_0x13da46(0x1eb)+CLI_BIN_NAME+_0x13da46(0x1f3));const _0x218a1b=_0x33c70d?.['autoYes']?!![]:await confirm({'message':_0x13da46(0x1f6),'default':!![]});if(!_0x218a1b)return;if(_0x33c70d?.[_0x13da46(0x1ee)]){console[_0x13da46(0x1e8)](_0x13da46(0x1ed));const _0x41c454=await authServer({'silent':![],'openBrowser':![]});_0x41c454?console['log']('*\x20Login\x20successful!'):console[_0x13da46(0x1e8)](_0x13da46(0x1e3));return;}const _0x89eb71=a3_0x10eaad(_0x13da46(0x1e5))[_0x13da46(0x1e9)](),_0x11ad3d=await authServer({'silent':!![],'openBrowser':!![]});_0x89eb71[_0x13da46(0x1f1)](),_0x11ad3d?console[_0x13da46(0x1e8)]('*\x20Login\x20successful!'):console['log']('!\x20Login\x20failed.');}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x460a10=a4_0x2753;(function(_0x493208,_0x18ce4b){const _0x38a81f=a4_0x2753,_0x2b5c99=_0x493208();while(!![]){try{const _0x29fb61=parseInt(_0x38a81f(0x93))/0x1*(parseInt(_0x38a81f(0xa2))/0x2)+-parseInt(_0x38a81f(0xa3))/0x3+parseInt(_0x38a81f(0x80))/0x4+-parseInt(_0x38a81f(0x7d))/0x5*(parseInt(_0x38a81f(0xa0))/0x6)+-parseInt(_0x38a81f(0x7b))/0x7+-parseInt(_0x38a81f(0x8e))/0x8*(parseInt(_0x38a81f(0x99))/0x9)+-parseInt(_0x38a81f(0x9b))/0xa*(-parseInt(_0x38a81f(0x97))/0xb);if(_0x29fb61===_0x18ce4b)break;else _0x2b5c99['push'](_0x2b5c99['shift']());}catch(_0x29656a){_0x2b5c99['push'](_0x2b5c99['shift']());}}}(a4_0x1d89,0xe4f1b));import{writeFileSync}from'node:fs';function a4_0x2753(_0x519827,_0x47972f){_0x519827=_0x519827-0x7a;const _0x1d891f=a4_0x1d89();let _0x27533b=_0x1d891f[_0x519827];return _0x27533b;}import a4_0x3a37d3 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'../auth/is-session-valid.js';function a4_0x1d89(){const _0x3d7615=['then','session','cookie','https://dev.lovrabet.com:','158496lSsepS','🔐\x20Starting\x20login\x20service...','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','port','!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','15931sttKcP','close','object','darwin','44lQEKcu','Auth\x20server\x20error:','729WylJct','error','9628110KIZQVl','createServer','/sign-in?redirect=','catch','timeoutMs','2975358nNjhbi','xdg-open\x20\x22','56GLIVqc','3877278qVFwun','platform','https://g.yuntooai.com/cert/lovrabet-dev.json','98413LvIUYp','127.0.0.1','10ofORPl','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','2173944cewcgd','json','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','text/html;\x20charset=utf-8','log','win32','address','isAuth','utf-8'];a4_0x1d89=function(){return _0x3d7615;};return a4_0x1d89();}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(_0x39c35f){const _0x3e09ce=a4_0x2753,_0x3914c1=_0x39c35f?.['silent']||![],_0xc79391=_0x39c35f?.['openBrowser']??!![],_0x4334da=_0x39c35f?.[_0x3e09ce(0x9f)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0xbeba04=await(await fetch(_0x3e09ce(0x7a)))['json']();return new Promise(async(_0x2f0b7b,_0x4c9bb3)=>{const _0x3eab2b=_0x3e09ce;let _0x13a6a2=0x0,_0x981002=![],_0x3e2069;const _0x21d9d1=a4_0x3a37d3[_0x3eab2b(0x9c)](_0xbeba04,async(_0x566c84,_0xa6ce41)=>{const _0x31ff05=_0x3eab2b,_0x5256b5=getUserDomain(),_0x138e1c=_0x566c84['headers'][_0x31ff05(0x8c)]||'',_0x41efa5=await fetch(_0x5256b5+'/api/auth/get-session',{'headers':{'cookie':_0x138e1c}})[_0x31ff05(0x8a)](_0xffc1b8=>_0xffc1b8[_0x31ff05(0x81)]()),_0x476cf6=_0x41efa5&&_0x41efa5[_0x31ff05(0x8b)]&&_0x41efa5['user'];if(_0x476cf6){writeFileSync(cookieFile,_0x138e1c,_0x31ff05(0x89));const _0x3734ef=buildLoginSuccessHtml();_0xa6ce41['writeHead'](0xc8,{'Content-Type':_0x31ff05(0x84)}),_0xa6ce41['end'](_0x3734ef),_0x3e2131(!![]);}else{const _0x47c936=''+encodeURIComponent(_0x31ff05(0x8d)+_0x13a6a2);_0xa6ce41['writeHead'](0x12e,{'location':_0x5256b5+_0x31ff05(0x9d)+_0x47c936}),_0xa6ce41['end']();return;}});function _0x3e2131(_0x2ffa6d){if(_0x981002)return;_0x981002=!![],_0x3e2069&&clearTimeout(_0x3e2069),_0x21d9d1['close'](),_0x2f0b7b(_0x2ffa6d);}_0x21d9d1['listen'](0x0,_0x3eab2b(0x7c),()=>{const _0x299921=_0x3eab2b,_0x17c3a8=_0x21d9d1[_0x299921(0x87)]();_0x13a6a2=typeof _0x17c3a8===_0x299921(0x95)&&_0x17c3a8?_0x17c3a8[_0x299921(0x91)]:Number(_0x17c3a8);const _0x122c24=_0x299921(0x8d)+_0x13a6a2;_0x3e2069=setTimeout(()=>{const _0x4a6d5a=_0x299921;!_0x3914c1&&console[_0x4a6d5a(0x85)](_0x4a6d5a(0x92)),_0x3e2131(![]);},_0x4334da);!_0x3914c1&&(console[_0x299921(0x85)](_0x299921(0x8f)),console[_0x299921(0x85)]('📍\x20Login\x20URL:',_0x122c24),_0xc79391?(console[_0x299921(0x85)]('🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...'),console[_0x299921(0x85)](''),console['log'](_0x299921(0x82))):console['log'](_0x299921(0x83)),console['log'](''));if(!_0xc79391)return;openInBrowser(_0x122c24)[_0x299921(0x8a)](_0x45f91e=>{const _0x3a13cd=_0x299921;!_0x3914c1&&(_0x45f91e?console['log'](_0x3a13cd(0x7f)):(console[_0x3a13cd(0x85)](_0x3a13cd(0x90)),console[_0x3a13cd(0x85)]('🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0x122c24)),console[_0x3a13cd(0x85)](''));})[_0x299921(0x9e)](()=>{const _0x332e11=_0x299921;!_0x3914c1&&(console[_0x332e11(0x85)](_0x332e11(0x90)),console['log'](_0x332e11(0x7e),_0x122c24),console[_0x332e11(0x85)](''));});}),_0x21d9d1['on']('error',_0x13b146=>{const _0x44bb05=_0x3eab2b;if(_0x981002)return;_0x981002=!![],_0x3e2069&&clearTimeout(_0x3e2069),!_0x3914c1&&console[_0x44bb05(0x9a)](_0x44bb05(0x98),_0x13b146),_0x21d9d1[_0x44bb05(0x94)](),_0x4c9bb3(_0x13b146);});});}function openInBrowser(_0x116938){return new Promise(_0x4a8c31=>{const _0x4cfb8e=a4_0x2753,_0x52c1d0=process[_0x4cfb8e(0xa4)];let _0x38cd6b;if(_0x52c1d0===_0x4cfb8e(0x86))_0x38cd6b='cmd\x20/c\x20start\x20\x22\x22\x20\x22'+_0x116938+'\x22';else _0x52c1d0===_0x4cfb8e(0x96)?_0x38cd6b='open\x20\x22'+_0x116938+'\x22':_0x38cd6b=_0x4cfb8e(0xa1)+_0x116938+'\x22';exec(_0x38cd6b,_0xfc824e=>{_0xfc824e?_0x4a8c31(![]):_0x4a8c31(!![]);});});}if(import.meta.main){const isAuth=await authServer();console['log'](a4_0x460a10(0x88),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x13c3aa=a5_0x3baf;(function(_0xb15bb6,_0x3f8c4d){const _0x26c762=a5_0x3baf,_0x10019d=_0xb15bb6();while(!![]){try{const _0x3c0977=parseInt(_0x26c762(0x12c))/0x1*(-parseInt(_0x26c762(0x129))/0x2)+-parseInt(_0x26c762(0x12b))/0x3*(-parseInt(_0x26c762(0x126))/0x4)+parseInt(_0x26c762(0x12e))/0x5+-parseInt(_0x26c762(0x12a))/0x6+parseInt(_0x26c762(0x12d))/0x7*(parseInt(_0x26c762(0x130))/0x8)+-parseInt(_0x26c762(0x127))/0x9+-parseInt(_0x26c762(0x128))/0xa;if(_0x3c0977===_0x3f8c4d)break;else _0x10019d['push'](_0x10019d['shift']());}catch(_0x11e6a8){_0x10019d['push'](_0x10019d['shift']());}}}(a5_0x295f,0x4614f));import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a5_0x3baf(_0x3b19df,_0x55f5e3){_0x3b19df=_0x3b19df-0x126;const _0x295f54=a5_0x295f();let _0x3baf74=_0x295f54[_0x3b19df];return _0x3baf74;}import{join}from'node:path';export const configDir=join(homedir(),a5_0x13c3aa(0x12f));function a5_0x295f(){const _0x35f6f4=['2165828ZxKtsy','2997468mbXqef','1722320vpoMft','844grXDlD','268356jkDCmp','3ZKHZQe','1254VuZlwe','182273BKptWA','2561640DQOtyg','.lovrabet','96YlmcNG'];a5_0x295f=function(){return _0x35f6f4;};return a5_0x295f();}export const cookieFile=join(configDir,'cookie');mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2251c7,_0x5da060){var _0x4b357f=a6_0x26ea,_0x425a82=_0x2251c7();while(!![]){try{var _0xb292d1=parseInt(_0x4b357f(0x9e))/0x1*(-parseInt(_0x4b357f(0xa8))/0x2)+-parseInt(_0x4b357f(0xa6))/0x3+parseInt(_0x4b357f(0xa0))/0x4*(parseInt(_0x4b357f(0xa2))/0x5)+-parseInt(_0x4b357f(0x9f))/0x6+-parseInt(_0x4b357f(0x9d))/0x7*(-parseInt(_0x4b357f(0xa5))/0x8)+-parseInt(_0x4b357f(0xa3))/0x9*(-parseInt(_0x4b357f(0xa7))/0xa)+-parseInt(_0x4b357f(0xa4))/0xb*(parseInt(_0x4b357f(0xa1))/0xc);if(_0xb292d1===_0x5da060)break;else _0x425a82['push'](_0x425a82['shift']());}catch(_0x2ce4a9){_0x425a82['push'](_0x425a82['shift']());}}}(a6_0x36e7,0x507eb));import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';function a6_0x26ea(_0x10b868,_0x20267d){_0x10b868=_0x10b868-0x9d;var _0x36e7b6=a6_0x36e7();var _0x26ea6e=_0x36e7b6[_0x10b868];return _0x26ea6e;}function a6_0x36e7(){var _0x4c219=['33sPIMPM','3900056uWfRWj','21681euWPZk','6167890hIJDJF','148190huGGks','7YWshYq','7aOoMOE','384960qpSjix','4gPURtH','1815012TMumgg','1346080TtjFFC','9eooUSE'];a6_0x36e7=function(){return _0x4c219;};return a6_0x36e7();}export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2022d8,_0x5d6d2e){const _0x584688=a7_0x10fc,_0x2154ec=_0x2022d8();while(!![]){try{const _0x2c9d76=-parseInt(_0x584688(0x1b3))/0x1+parseInt(_0x584688(0x1b1))/0x2+-parseInt(_0x584688(0x1b4))/0x3*(-parseInt(_0x584688(0x1af))/0x4)+parseInt(_0x584688(0x1ad))/0x5+-parseInt(_0x584688(0x1b2))/0x6*(-parseInt(_0x584688(0x1ae))/0x7)+-parseInt(_0x584688(0x1a9))/0x8*(parseInt(_0x584688(0x1ab))/0x9)+-parseInt(_0x584688(0x1ac))/0xa;if(_0x2c9d76===_0x5d6d2e)break;else _0x2154ec['push'](_0x2154ec['shift']());}catch(_0x330c2c){_0x2154ec['push'](_0x2154ec['shift']());}}}(a7_0x4e05,0x399d8));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a7_0x4e05(){const _0x26e432=['4EboSRO','session','915858QpvExS','90oCejmU','230016bNYupi','555438FhmOgE','utf-8','/api/auth/get-session','13320hyRSxD','json','459XJSenS','3430840WStEdi','810435HEtWjN','41461gMuzUC'];a7_0x4e05=function(){return _0x26e432;};return a7_0x4e05();}function a7_0x10fc(_0x3d000c,_0x1593c5){_0x3d000c=_0x3d000c-0x1a7;const _0x4e05be=a7_0x4e05();let _0x10fc97=_0x4e05be[_0x3d000c];return _0x10fc97;}export async function getSessionUserInfo(){const _0x5b27ac=a7_0x10fc;try{if(!existsSync(cookieFile))return null;const _0x2fc94e=readFileSync(cookieFile,_0x5b27ac(0x1a7)),_0x1f5179=await fetch(getUserDomain()+_0x5b27ac(0x1a8),{'headers':{'cookie':_0x2fc94e}});if(!_0x1f5179['ok'])return null;const _0x33717d=await _0x1f5179[_0x5b27ac(0x1aa)]();if(!_0x33717d[_0x5b27ac(0x1b0)]||!_0x33717d['user'])return null;return _0x33717d;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a8_0x1adc(_0xb77f3b,_0x2e3e5d){_0xb77f3b=_0xb77f3b-0x9d;const _0x4626db=a8_0x4626();let _0x1adc00=_0x4626db[_0xb77f3b];return _0x1adc00;}(function(_0x48f4c2,_0x2d7975){const _0x2d5b39=a8_0x1adc,_0x3db2f7=_0x48f4c2();while(!![]){try{const _0x2a5cab=-parseInt(_0x2d5b39(0x9f))/0x1+parseInt(_0x2d5b39(0x9d))/0x2+-parseInt(_0x2d5b39(0xaa))/0x3+parseInt(_0x2d5b39(0xa9))/0x4*(parseInt(_0x2d5b39(0xa2))/0x5)+-parseInt(_0x2d5b39(0x9e))/0x6*(parseInt(_0x2d5b39(0xa5))/0x7)+parseInt(_0x2d5b39(0xa7))/0x8+parseInt(_0x2d5b39(0xa0))/0x9;if(_0x2a5cab===_0x2d7975)break;else _0x3db2f7['push'](_0x3db2f7['shift']());}catch(_0x48b164){_0x3db2f7['push'](_0x3db2f7['shift']());}}}(a8_0x4626,0xd6b72));function a8_0x4626(){const _0x2f3d12=['654qwJxGm','905360rxezXI','22412457HSoGhm','json','1235uuNUAp','session','utf-8','75866uUAOwU','user','1991760bdBjfz','then','8324IyrVmz','1747041uWYlES','590546mvFOYy'];a8_0x4626=function(){return _0x2f3d12;};return a8_0x4626();}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x58a649=a8_0x1adc;try{if(!existsSync(cookieFile))return![];const _0x29d2e8=readFileSync(cookieFile,_0x58a649(0xa4)),_0x3247dc=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x29d2e8}})[_0x58a649(0xa8)](_0x53e689=>_0x53e689[_0x58a649(0xa1)]());return _0x3247dc&&_0x3247dc[_0x58a649(0xa3)]&&_0x3247dc[_0x58a649(0xa6)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a9_0x5bb0(_0x5c9f84,_0x17ee9d){_0x5c9f84=_0x5c9f84-0x64;const _0x56d277=a9_0x56d2();let _0x5bb070=_0x56d277[_0x5c9f84];return _0x5bb070;}(function(_0x5862df,_0x3d226c){const _0x2f406a=a9_0x5bb0,_0x2d0463=_0x5862df();while(!![]){try{const _0x4e0e57=-parseInt(_0x2f406a(0x68))/0x1*(-parseInt(_0x2f406a(0x69))/0x2)+parseInt(_0x2f406a(0x6a))/0x3+-parseInt(_0x2f406a(0x6e))/0x4*(parseInt(_0x2f406a(0x6d))/0x5)+-parseInt(_0x2f406a(0x6b))/0x6+-parseInt(_0x2f406a(0x67))/0x7+parseInt(_0x2f406a(0x6c))/0x8+-parseInt(_0x2f406a(0x65))/0x9;if(_0x4e0e57===_0x3d226c)break;else _0x2d0463['push'](_0x2d0463['shift']());}catch(_0x365c5e){_0x2d0463['push'](_0x2d0463['shift']());}}}(a9_0x56d2,0x7e990));export function buildLoginSuccessHtml(){const _0x4cde93=a9_0x5bb0,_0x161453=_0x4cde93(0x66);return'<!doctype\x20html>\x0a<html\x20lang=\x22en\x22>\x0a<head>\x0a\x20\x20<meta\x20charset=\x22utf-8\x22>\x0a\x20\x20<meta\x20name=\x22viewport\x22\x20content=\x22width=device-width,\x20initial-scale=1\x22>\x0a\x20\x20<title>Login\x20successful\x20·\x20Rabetbase\x20CLI</title>\x0a\x20\x20<style>\x0a\x20\x20\x20\x20:root\x20{\x0a\x20\x20\x20\x20\x20\x20--bg0:\x20#0f1419;\x0a\x20\x20\x20\x20\x20\x20--bg1:\x20#1a2332;\x0a\x20\x20\x20\x20\x20\x20--card:\x20#ffffff;\x0a\x20\x20\x20\x20\x20\x20--text:\x20#1c2128;\x0a\x20\x20\x20\x20\x20\x20--muted:\x20#5c6570;\x0a\x20\x20\x20\x20\x20\x20--accent:\x20#2563eb;\x0a\x20\x20\x20\x20\x20\x20--accent-soft:\x20#eff6ff;\x0a\x20\x20\x20\x20\x20\x20--success:\x20#059669;\x0a\x20\x20\x20\x20\x20\x20--radius:\x2016px;\x0a\x20\x20\x20\x20\x20\x20--shadow:\x200\x2025px\x2050px\x20-12px\x20rgba(15,\x2020,\x2025,\x200.35);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20*\x20{\x20box-sizing:\x20border-box;\x20}\x0a\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20min-height:\x20100vh;\x0a\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20\x20\x20padding:\x2024px;\x0a\x20\x20\x20\x20\x20\x20font-family:\x20ui-sans-serif,\x20system-ui,\x20-apple-system,\x20\x22Segoe\x20UI\x22,\x20Roboto,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22Helvetica\x20Neue\x22,\x20Arial,\x20\x22Noto\x20Sans\x22,\x20\x22PingFang\x20SC\x22,\x20\x22Microsoft\x20YaHei\x22,\x20sans-serif;\x0a\x20\x20\x20\x20\x20\x20background:\x20linear-gradient(160deg,\x20var(--bg0)\x200%,\x20var(--bg1)\x2045%,\x20#243047\x20100%);\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--text);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.card\x20{\x0a\x20\x20\x20\x20\x20\x20width:\x20100%;\x0a\x20\x20\x20\x20\x20\x20max-width:\x20420px;\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--card);\x0a\x20\x20\x20\x20\x20\x20border-radius:\x20var(--radius);\x0a\x20\x20\x20\x20\x20\x20box-shadow:\x20var(--shadow);\x0a\x20\x20\x20\x20\x20\x20padding:\x2040px\x2036px\x2032px;\x0a\x20\x20\x20\x20\x20\x20text-align:\x20center;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.icon\x20{\x0a\x20\x20\x20\x20\x20\x20width:\x2064px;\x0a\x20\x20\x20\x20\x20\x20height:\x2064px;\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x20auto\x2020px;\x0a\x20\x20\x20\x20\x20\x20border-radius:\x2050%;\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--accent-soft);\x0a\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.icon\x20svg\x20{\x20width:\x2036px;\x20height:\x2036px;\x20}\x0a\x20\x20\x20\x20h1\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x200\x2012px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x201.375rem;\x0a\x20\x20\x20\x20\x20\x20font-weight:\x20600;\x0a\x20\x20\x20\x20\x20\x20letter-spacing:\x20-0.02em;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20p.lead\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x200\x208px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.9375rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--muted);\x0a\x20\x20\x20\x20\x20\x20line-height:\x201.55;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.countdown\x20{\x0a\x20\x20\x20\x20\x20\x20display:\x20inline-flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20gap:\x206px;\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2016px;\x0a\x20\x20\x20\x20\x20\x20padding:\x208px\x2014px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.875rem;\x0a\x20\x20\x20\x20\x20\x20font-variant-numeric:\x20tabular-nums;\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--accent);\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--accent-soft);\x0a\x20\x20\x20\x20\x20\x20border-radius:\x20999px;\x0a\x20\x20\x20\x20\x20\x20font-weight:\x20500;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20#manualMsg\x20{\x0a\x20\x20\x20\x20\x20\x20display:\x20none;\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2020px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.8125rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20#b91c1c;\x0a\x20\x20\x20\x20\x20\x20line-height:\x201.45;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.cli-hint\x20{\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2028px;\x0a\x20\x20\x20\x20\x20\x20padding-top:\x2024px;\x0a\x20\x20\x20\x20\x20\x20border-top:\x201px\x20solid\x20#e8ecf0;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.75rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20#8b949e;\x0a\x20\x20\x20\x20}\x0a\x20\x20</style>\x0a</head>\x0a<body>\x0a\x20\x20<div\x20class=\x22card\x22\x20role=\x22status\x22\x20aria-live=\x22polite\x22>\x0a\x20\x20\x20\x20<div\x20class=\x22icon\x22\x20aria-hidden=\x22true\x22>\x0a\x20\x20\x20\x20\x20\x20<svg\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x2210\x22\x20stroke=\x22#059669\x22\x20stroke-width=\x222\x22\x20fill=\x22none\x22/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M8\x2012.5l2.5\x202.5L16\x209\x22\x20stroke=\x22#059669\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22/>\x0a\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<h1>Login\x20successful</h1>\x0a\x20\x20\x20\x20<p\x20class=\x22lead\x22>You\x20can\x20return\x20to\x20the\x20terminal\x20to\x20continue.\x20This\x20window\x20will\x20try\x20to\x20close\x20automatically.</p>\x0a\x20\x20\x20\x20<div\x20class=\x22countdown\x22>\x0a\x20\x20\x20\x20\x20\x20Closing\x20in\x20<span\x20id=\x22t\x22>5</span>s\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<div\x20id=\x22manualMsg\x22>'+_0x161453+_0x4cde93(0x64);}function a9_0x56d2(){const _0x51cbfe=['4102768XSSRVx','16955oyUUSn','500RZaaAW','</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>','389241FlorYg','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','1564437VIxPQk','6487TVIoBv','222iUpRFd','210003rQvGxZ','562470lLhKBO'];a9_0x56d2=function(){return _0x51cbfe;};return a9_0x56d2();}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4b6c4e,_0x32043c){var _0x535be3=a10_0x5590,_0x5c4a7c=_0x4b6c4e();while(!![]){try{var _0x642f8e=-parseInt(_0x535be3(0x1d4))/0x1+parseInt(_0x535be3(0x1da))/0x2+parseInt(_0x535be3(0x1d6))/0x3*(-parseInt(_0x535be3(0x1d2))/0x4)+parseInt(_0x535be3(0x1db))/0x5+-parseInt(_0x535be3(0x1d9))/0x6*(-parseInt(_0x535be3(0x1d5))/0x7)+parseInt(_0x535be3(0x1d7))/0x8+parseInt(_0x535be3(0x1dd))/0x9;if(_0x642f8e===_0x32043c)break;else _0x5c4a7c['push'](_0x5c4a7c['shift']());}catch(_0x1d9a13){_0x5c4a7c['push'](_0x5c4a7c['shift']());}}}(a10_0x2009,0xd2c96));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';function a10_0x5590(_0x2bf696,_0x4e7e43){_0x2bf696=_0x2bf696-0x1d2;var _0x2009ac=a10_0x2009();var _0x5590e3=_0x2009ac[_0x2bf696];return _0x5590e3;}function a10_0x2009(){var _0x3e836f=['22170cfLchh','!\x20Not\x20logged\x20in','16252569XlmOjk','4RkRHns','log','1301358OPpNHV','2476502hufYIt','3801009MNWDVX','72344rfbgJY','✓\x20Logged\x20out','12ZVFlDJ','1809706SaAExg'];a10_0x2009=function(){return _0x3e836f;};return a10_0x2009();}export function logout(){var _0xbf996d=a10_0x5590;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0xbf996d(0x1d3)](_0xbf996d(0x1d8))):console[_0xbf996d(0x1d3)](_0xbf996d(0x1dc));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a11_0x42978f=a11_0x4e5d;(function(_0x2c33c7,_0x1573e5){const _0x4d3b39=a11_0x4e5d,_0x30f09f=_0x2c33c7();while(!![]){try{const _0x95b380=parseInt(_0x4d3b39(0x10f))/0x1*(parseInt(_0x4d3b39(0x111))/0x2)+parseInt(_0x4d3b39(0x107))/0x3*(parseInt(_0x4d3b39(0x10c))/0x4)+parseInt(_0x4d3b39(0x110))/0x5+-parseInt(_0x4d3b39(0x10e))/0x6+parseInt(_0x4d3b39(0x10b))/0x7+-parseInt(_0x4d3b39(0x10d))/0x8*(parseInt(_0x4d3b39(0x109))/0x9)+-parseInt(_0x4d3b39(0x108))/0xa;if(_0x95b380===_0x1573e5)break;else _0x30f09f['push'](_0x30f09f['shift']());}catch(_0x280f3b){_0x30f09f['push'](_0x30f09f['shift']());}}}(a11_0x410a,0x23b2c));function a11_0x410a(){const _0x54c082=['457303GrPxim','197356lWxFCJ','1064vBypOr','451308MNjxlp','239hTuDTA','1328695MWEWPJ','62feyhrL','3gUbZgy','1401770MUOtEd','1773IlZsXa','boolean'];a11_0x410a=function(){return _0x54c082;};return a11_0x410a();}function a11_0x4e5d(_0x11b0a2,_0x1fa56b){_0x11b0a2=_0x11b0a2-0x107;const _0x410a96=a11_0x410a();let _0x4e5d03=_0x410a96[_0x11b0a2];return _0x4e5d03;}export const dynamicCliFlags={'enableBffSave':{'type':a11_0x42978f(0x10a)}};
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a12_0x52df10=a12_0x4f01;function a12_0x4f01(_0x492e9e,_0x5f4154){_0x492e9e=_0x492e9e-0x17f;const _0x7760a7=a12_0x7760();let _0x4f0119=_0x7760a7[_0x492e9e];return _0x4f0119;}(function(_0x15a64f,_0x38c8a5){const _0x12dd55=a12_0x4f01,_0x4c4108=_0x15a64f();while(!![]){try{const _0x1469ac=-parseInt(_0x12dd55(0x190))/0x1+-parseInt(_0x12dd55(0x180))/0x2*(parseInt(_0x12dd55(0x18d))/0x3)+-parseInt(_0x12dd55(0x19a))/0x4*(-parseInt(_0x12dd55(0x19e))/0x5)+-parseInt(_0x12dd55(0x1a0))/0x6+-parseInt(_0x12dd55(0x19c))/0x7*(parseInt(_0x12dd55(0x1ad))/0x8)+-parseInt(_0x12dd55(0x192))/0x9*(parseInt(_0x12dd55(0x191))/0xa)+-parseInt(_0x12dd55(0x18f))/0xb*(-parseInt(_0x12dd55(0x19b))/0xc);if(_0x1469ac===_0x38c8a5)break;else _0x4c4108['push'](_0x4c4108['shift']());}catch(_0x3e6c50){_0x4c4108['push'](_0x4c4108['shift']());}}}(a12_0x7760,0x839fe));import a12_0x2c63cc from'meow';import{showHelp}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{isKnownService,getServiceEntry,findDefinition,deprecatedAliases,resolveDeprecatedSubcommand}from'./commands/registry.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{CLI_BIN_NAME,buildMeowFlags}from'./constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'./generated/build-info.js';import{reportCliHelpTrace}from'./telemetry/cli-help-trace.js';import{reportCommandTrace}from'./telemetry/cli-command-trace.js';import{registerOtelShutdownOnExit,exitWithOtelShutdown}from'./telemetry/register-otel-exit-shutdown.js';import{printIssueReportNudgeForError}from'./commands/issue/nudge.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import('./cli-flags.js'))[a12_0x52df10(0x1a9)];}catch{}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!==a12_0x52df10(0x1a1)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[a12_0x52df10(0x1a7)](0x0,0xa)+')':VERSION,cli=a12_0x2c63cc(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0x24828f=a12_0x52df10;let _0x1f389b=cli[_0x24828f(0x185)][0x0],_0x5411db=cli[_0x24828f(0x185)][0x1];const _0x1aec52=cli[_0x24828f(0x18b)];if(!_0x1f389b){await reportCliHelpTrace(_0x24828f(0x18c)),showHelp();return;}const _0xaac101=deprecatedAliases[_0x1f389b];if(_0xaac101&&!isKnownService(_0x1f389b)){const _0x37d6e7=_0x5411db?CLI_BIN_NAME+'\x20'+_0x1f389b+'\x20'+_0x5411db:CLI_BIN_NAME+'\x20'+_0x1f389b,_0x5e6391=CLI_BIN_NAME+'\x20'+_0xaac101[_0x24828f(0x186)]+'\x20'+_0xaac101[_0x24828f(0x1a2)];console[_0x24828f(0x187)](_0x24828f(0x19f)+_0x37d6e7+_0x24828f(0x18e)+_0x5e6391+'`\x20in\x20v2.0.\x0a'+_0x24828f(0x1ac)),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x1f389b)){await reportCliHelpTrace('unknown_service',{'service':_0x1f389b}),showHelp();return;}const _0x766b7d=getServiceEntry(_0x1f389b);if(_0x1aec52['env']&&typeof _0x1aec52[_0x24828f(0x198)]===_0x24828f(0x1a6)){const {initEnv:_0x206dd1}=await import('./constant/env.js');_0x206dd1(_0x1aec52['env']);}const {buildConfigFromFlags:_0x1c3140}=await import(_0x24828f(0x19d)),_0x3cd881=_0x1c3140(_0x1aec52);if(!_0x1aec52['env']&&_0x3cd881['env']){const {initEnv:_0x496cec}=await import('./constant/env.js');_0x496cec(_0x3cd881[_0x24828f(0x198)]);}if(_0x3cd881[_0x24828f(0x196)]?.['apiDomain']||_0x3cd881[_0x24828f(0x196)]?.[_0x24828f(0x199)]||_0x3cd881[_0x24828f(0x196)]?.[_0x24828f(0x195)]){const {initDomains:_0x1ec121}=await import(_0x24828f(0x18a));_0x1ec121({'apiDomain':_0x3cd881[_0x24828f(0x196)][_0x24828f(0x1a4)]||undefined,'userDomain':_0x3cd881[_0x24828f(0x196)][_0x24828f(0x199)]||undefined,'runtimeDomain':_0x3cd881[_0x24828f(0x196)][_0x24828f(0x195)]||undefined});}if(!_0x5411db){if(_0x1aec52[_0x24828f(0x17f)]){printServiceHelp(_0x1f389b);return;}if(_0x766b7d[_0x24828f(0x184)])_0x5411db=_0x766b7d[_0x24828f(0x184)];else{if(_0x766b7d[_0x24828f(0x1ae)]){await dispatchDeclarative(_0x766b7d[_0x24828f(0x1ae)],_0x1f389b,'',[],_0x1aec52,_0x3cd881);return;}else{printServiceHelp(_0x1f389b);return;}}}const _0x2b14ba=resolveDeprecatedSubcommand(_0x1f389b,_0x5411db);if(_0x2b14ba){const _0x3128f8=CLI_BIN_NAME+'\x20'+_0x1f389b+'\x20'+_0x5411db,_0x73f825=CLI_BIN_NAME+'\x20'+_0x1f389b+'\x20'+_0x2b14ba;console[_0x24828f(0x187)](_0x24828f(0x19f)+_0x3128f8+'`\x20is\x20an\x20alias\x20of\x20`'+_0x73f825+'`;\x20prefer\x20`'+_0x73f825+_0x24828f(0x1aa)),_0x5411db=_0x2b14ba;}{let _0x4e5995=findDefinition(_0x1f389b,_0x5411db),_0x59386c=cli[_0x24828f(0x185)][_0x24828f(0x1a7)](0x2);if(!_0x4e5995){if(_0x766b7d[_0x24828f(0x1ae)]){if(_0x1aec52[_0x24828f(0x17f)]){console[_0x24828f(0x193)](generateCommandHelp(_0x766b7d[_0x24828f(0x1ae)]));return;}_0x4e5995=_0x766b7d[_0x24828f(0x1ae)],_0x59386c=[_0x5411db,...cli['input'][_0x24828f(0x1a7)](0x2)];}else{printServiceHelp(_0x1f389b),await handleErrorAsync(CliErrors[_0x24828f(0x1a5)](_0x1f389b+'\x20'+_0x5411db));return;}}if(_0x1aec52['help']){console[_0x24828f(0x193)](generateCommandHelp(_0x4e5995));return;}await dispatchDeclarative(_0x4e5995,_0x1f389b,_0x5411db,_0x59386c,_0x1aec52,_0x3cd881);}}async function dispatchDeclarative(_0x18cebf,_0x53eb8c,_0x2fbbd9,_0x320e39,_0x554646,_0x686351){const _0x2ceed1=a12_0x52df10,_0x5d0a82=Date[_0x2ceed1(0x181)]();let _0x189b3d;try{await runCommand(_0x18cebf,createPipelineEnv(_0x686351,_0x554646,_0x320e39));}catch(_0x59c0bd){_0x189b3d=_0x59c0bd;}await reportCommandTrace({'service':_0x53eb8c,'command':_0x2fbbd9,'flags':_0x554646,'durationMs':Date[_0x2ceed1(0x181)]()-_0x5d0a82,'error':_0x189b3d});if(_0x189b3d)await handleErrorAsync(_0x189b3d,{'service':_0x53eb8c,'command':_0x2fbbd9});}function printServiceHelp(_0x668a8f){console['log'](generateServiceHelp(_0x668a8f));}async function handleErrorAsync(_0x1d7270,_0x53c6dc){const _0x4f4777=a12_0x52df10;if(_0x1d7270 instanceof Error&&_0x1d7270['name']===_0x4f4777(0x182))return process[_0x4f4777(0x1a3)][_0x4f4777(0x1a8)](_0x4f4777(0x189)),await exitWithOtelShutdown(0x0);if(_0x1d7270 instanceof CliError){if(_0x1d7270[_0x4f4777(0x188)]===_0x4f4777(0x1ab))return process[_0x4f4777(0x1a3)][_0x4f4777(0x1a8)]('\x0a'+_0x1d7270['message']+'\x0a'),await exitWithOtelShutdown(0x0);console['error']('Error:\x20'+_0x1d7270['message']);if(_0x1d7270['hint'])console[_0x4f4777(0x187)]('Hint:\x20'+_0x1d7270[_0x4f4777(0x183)]);if(_0x53c6dc)printIssueReportNudgeForError(_0x1d7270,_0x53c6dc);return await exitWithOtelShutdown(_0x1d7270[_0x4f4777(0x194)]);}console['error'](_0x4f4777(0x197),_0x1d7270);if(_0x53c6dc)printIssueReportNudgeForError(_0x1d7270,_0x53c6dc);return await exitWithOtelShutdown(0x1);}function a12_0x7760(){const _0x422ef6=['runtimeDomain','raw','Unexpected\x20error:','env','userDomain','4ViFlix','4404fkFudu','260211RpFoLX','./context.js','3925705SmJTTD','⚠\x20`','2422092UAYILu','unknown','command','stderr','apiDomain','unknownCommand','string','slice','write','dynamicCliFlags','`\x20in\x20new\x20scripts.\x0a','cancelled','\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a','128fTpXaB','wildcardDef','help','18LqhnXW','now','ExitPromptError','hint','defaultCommand','input','service','error','code','\x0aCancelled.\x0a','./constant/domain.js','flags','global','33138huEmmF','`\x20has\x20been\x20moved\x20to\x20`','40711XdGbQL','164556jXzydR','20WhMZnb','1538343hlSnbV','log','exitCode'];a12_0x7760=function(){return _0x422ef6;};return a12_0x7760();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13_0x54117d=a13_0x2b35;(function(_0x74dd8c,_0x1cfc30){const _0x1ce6bc=a13_0x2b35,_0x34b147=_0x74dd8c();while(!![]){try{const _0x25a3a9=-parseInt(_0x1ce6bc(0x11d))/0x1+-parseInt(_0x1ce6bc(0x14d))/0x2+-parseInt(_0x1ce6bc(0x123))/0x3+-parseInt(_0x1ce6bc(0x136))/0x4*(-parseInt(_0x1ce6bc(0x140))/0x5)+-parseInt(_0x1ce6bc(0x121))/0x6+-parseInt(_0x1ce6bc(0x144))/0x7+parseInt(_0x1ce6bc(0x12a))/0x8;if(_0x25a3a9===_0x1cfc30)break;else _0x34b147['push'](_0x34b147['shift']());}catch(_0x3af9e3){_0x34b147['push'](_0x34b147['shift']());}}}(a13_0x361a,0x4b855));function a13_0x361a(){const _0x18fed0=['split','some','\x1b[90m*\x20Generating\x20docs\x20for:\x20','195060SUrXyN','✓\x20Generated\x20','generate','trim','str','\x20succeeded,\x20','validation','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','cookie','\x20failed','\x20of\x20','filter','string','\x20doc(s)\x20failed','444204UowAzC','padStart','isArray','write','1954632fuyoAK','succeed','1009488iuZCEh','\x1b[0m','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','must\x20be\x20a\x20JSON\x20object','stdout','!\x20No\x20datasets\x20found.','object','12300464fKTpAm','success','./docs','fail','params','\x0d\x20\x20[','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','join','...','datasetcode','Invalid\x20--params:\x20','\x20file(s)','4xzOhqF','message','.md','map','\x20\x20•\x20','length','datasetCode','api','error','--datasetcode\x20cannot\x20be\x20empty.','865695RDmroD','appCode','datasetName','output','1381534tBlWbL','\x1b[90m*\x20Filtered\x20','Doc\x20generation:\x20','parse','Doc\x20generation\x20complete:\x20','Fetched\x20'];a13_0x361a=function(){return _0x18fed0;};return a13_0x361a();}import a13_0x57e671 from'ora';import{fetchModelList}from'../../api/fetch-model-list.js';import{generateDatasetDocs}from'../../api/api-doc.js';function a13_0x2b35(_0x284db3,_0x40a9a6){_0x284db3=_0x284db3-0x11a;const _0x361af2=a13_0x361a();let _0x2b35ff=_0x361af2[_0x284db3];return _0x2b35ff;}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_0x54117d(0x13d),'command':a13_0x54117d(0x14f),'description':'Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','risk':a13_0x54117d(0x120),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':'output','type':'string','description':'Output\x20directory\x20(default:\x20./docs)'},{'name':a13_0x54117d(0x133),'type':a13_0x54117d(0x11b),'description':a13_0x54117d(0x130)},{'name':a13_0x54117d(0x12e),'type':'string','description':a13_0x54117d(0x154)}],async 'execute'(_0x4b8902){const _0x10d0e0=a13_0x54117d,_0x234df2=_0x4b8902[_0x10d0e0(0x151)](_0x10d0e0(0x143))||_0x10d0e0(0x12c),_0x39f57d=_0x4b8902['str']('datasetcode'),_0x2aeca1=_0x4b8902[_0x10d0e0(0x151)](_0x10d0e0(0x12e));let _0x1e993e;if(_0x2aeca1)try{_0x1e993e=JSON[_0x10d0e0(0x147)](_0x2aeca1);if(typeof _0x1e993e!==_0x10d0e0(0x129)||_0x1e993e===null||Array[_0x10d0e0(0x11f)](_0x1e993e))throw new Error(_0x10d0e0(0x126));}catch(_0x3991b3){throw CliErrors['validation'](_0x10d0e0(0x134)+(_0x3991b3 instanceof Error?_0x3991b3[_0x10d0e0(0x137)]:String(_0x3991b3)),_0x10d0e0(0x125));}let _0x2ad0a5;if(_0x39f57d){const _0x1d4bdb=_0x39f57d[_0x10d0e0(0x14a)](',')[_0x10d0e0(0x139)](_0x5a3648=>_0x5a3648[_0x10d0e0(0x150)]())[_0x10d0e0(0x11a)](_0x5d6993=>_0x5d6993[_0x10d0e0(0x13b)]>0x0);if(_0x1d4bdb[_0x10d0e0(0x13b)]===0x0)throw CliErrors[_0x10d0e0(0x153)](_0x10d0e0(0x13f));_0x2ad0a5=new Set(_0x1d4bdb),writeCliSideChannelLine(_0x10d0e0(0x14c)+_0x1d4bdb[_0x10d0e0(0x131)](',\x20')+'\x1b[0m');}const _0x139e62=a13_0x57e671('Fetching\x20dataset\x20list\x20for\x20'+_0x4b8902[_0x10d0e0(0x141)]+_0x10d0e0(0x132))['start']();let _0x2744ae;try{({configArray:_0x2744ae}=await fetchModelList(_0x4b8902['appCode'],_0x4b8902[_0x10d0e0(0x155)]),_0x139e62[_0x10d0e0(0x122)](_0x10d0e0(0x149)+_0x2744ae[_0x10d0e0(0x13b)]+'\x20dataset(s)'));}catch(_0x48d61b){_0x139e62[_0x10d0e0(0x12d)]('Failed\x20to\x20fetch\x20datasets');throw _0x48d61b;}if(_0x2744ae[_0x10d0e0(0x13b)]===0x0)return writeCliSideChannelLine(_0x10d0e0(0x128)),{'ok':!![]};let _0x39a31f=_0x2744ae;if(_0x2ad0a5){_0x39a31f=_0x2744ae[_0x10d0e0(0x11a)](_0x4fba01=>_0x2ad0a5['has'](_0x4fba01[_0x10d0e0(0x13c)]));const _0x46c34a=[..._0x2ad0a5][_0x10d0e0(0x11a)](_0x2e23d6=>!_0x2744ae[_0x10d0e0(0x14b)](_0xeb99c1=>_0xeb99c1[_0x10d0e0(0x13c)]===_0x2e23d6));_0x46c34a[_0x10d0e0(0x13b)]>0x0&&writeCliSideChannelLine('\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20'+_0x46c34a[_0x10d0e0(0x131)](',\x20')+_0x10d0e0(0x124));if(_0x39a31f[_0x10d0e0(0x13b)]===0x0)throw CliErrors[_0x10d0e0(0x153)]('None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20'+[..._0x2ad0a5][_0x10d0e0(0x131)](',\x20'));writeCliSideChannelLine(_0x10d0e0(0x145)+_0x39a31f[_0x10d0e0(0x13b)]+_0x10d0e0(0x157)+_0x2744ae[_0x10d0e0(0x13b)]+'\x20dataset(s)\x1b[0m');}let _0x68e10d=0x0;const _0xc84cba=await generateDatasetDocs(_0x39a31f,_0x4b8902[_0x10d0e0(0x141)],_0x4b8902['cookie'],_0x234df2,(_0x1b94fe,_0x208660,_0x4eee1e)=>{const _0x5a2fdc=_0x10d0e0;_0x68e10d=_0x1b94fe,process[_0x5a2fdc(0x127)][_0x5a2fdc(0x120)](_0x5a2fdc(0x12f)+String(_0x1b94fe)[_0x5a2fdc(0x11e)](String(_0x208660)['length'])+'/'+_0x208660+']\x20'+_0x4eee1e+_0x5a2fdc(0x138));},_0x1e993e);if(_0x68e10d>0x0)process['stdout'][_0x10d0e0(0x120)]('\x0a');const _0x4c22ca=_0xc84cba['filter'](_0x1aa964=>_0x1aa964['success'])[_0x10d0e0(0x13b)],_0x4b42f5=_0xc84cba[_0x10d0e0(0x11a)](_0x84e8b=>!_0x84e8b[_0x10d0e0(0x12b)])[_0x10d0e0(0x13b)];writeCliSideChannelLine(''),writeCliSideChannelLine(_0x10d0e0(0x14e)+_0x4c22ca+'\x20doc(s)\x20in\x20'+_0x234df2);if(_0x4b42f5>0x0){writeCliSideChannelLine('!\x20'+_0x4b42f5+_0x10d0e0(0x11c));for(const _0x114358 of _0xc84cba['filter'](_0x24207b=>!_0x24207b[_0x10d0e0(0x12b)])){writeCliSideChannelLine(_0x10d0e0(0x13a)+_0x114358[_0x10d0e0(0x142)]+'\x20('+_0x114358[_0x10d0e0(0x13c)]+'):\x20'+_0x114358[_0x10d0e0(0x13e)]);}}return{'ok':_0x4b42f5===0x0,'message':_0x4b42f5>0x0?_0x10d0e0(0x146)+_0x4c22ca+_0x10d0e0(0x152)+_0x4b42f5+_0x10d0e0(0x156):_0x10d0e0(0x148)+_0x4c22ca+_0x10d0e0(0x135)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a14_0x26fe(){const _0x30fccf=['14452uvVqiW','12ZGsATv','9280KdRQSS','397888gySerH','122105DUslGK','268198NBnxkn','890620SAJjSf','9ELmElu','491468qGGkQv','3586QTCkZn','9TlgwtD'];a14_0x26fe=function(){return _0x30fccf;};return a14_0x26fe();}(function(_0x156f07,_0x409751){const _0x92ef20=a14_0x1017,_0x103a19=_0x156f07();while(!![]){try{const _0x4da4f3=-parseInt(_0x92ef20(0xe0))/0x1+parseInt(_0x92ef20(0xdb))/0x2+-parseInt(_0x92ef20(0xdc))/0x3*(parseInt(_0x92ef20(0xdd))/0x4)+-parseInt(_0x92ef20(0xe4))/0x5*(parseInt(_0x92ef20(0xe1))/0x6)+-parseInt(_0x92ef20(0xe5))/0x7+parseInt(_0x92ef20(0xe3))/0x8*(-parseInt(_0x92ef20(0xdf))/0x9)+-parseInt(_0x92ef20(0xe2))/0xa*(-parseInt(_0x92ef20(0xde))/0xb);if(_0x4da4f3===_0x409751)break;else _0x103a19['push'](_0x103a19['shift']());}catch(_0x5a85a2){_0x103a19['push'](_0x103a19['shift']());}}}(a14_0x26fe,0x37a35));import{apiList}from'../../commands/api/list.js';function a14_0x1017(_0x32a84b,_0x5ecb98){_0x32a84b=_0x32a84b-0xdb;const _0x26fe93=a14_0x26fe();let _0x10175c=_0x26fe93[_0x32a84b];return _0x10175c;}import{apiPull}from'../../commands/api/pull.js';import{apiGenerate}from'../../commands/api/generate.js';export const apiDefinitions=[apiList,apiPull,apiGenerate];
|
package/lib/commands/api/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a15_0x215a19=a15_0xedf2;function a15_0x3cb0(){const _0x33af9e=['36ucnkMM','1369900bDuSRi','map','name','push','1QSdbks','env','9930nOJgYm','277906OwqhUs','118404SzZqBN','list','24xXyHQl','isDefault','api','appCode','appcode','global','cookie','83034jhMwnb','240000SKVeJX','rawFlags','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','production','918XUHrni','301765rnoOeG'];a15_0x3cb0=function(){return _0x33af9e;};return a15_0x3cb0();}(function(_0x3921ad,_0x48d923){const _0x3dff88=a15_0xedf2,_0x26bda2=_0x3921ad();while(!![]){try{const _0xeac946=-parseInt(_0x3dff88(0x132))/0x1*(-parseInt(_0x3dff88(0x135))/0x2)+-parseInt(_0x3dff88(0x140))/0x3+parseInt(_0x3dff88(0x147))/0x4+-parseInt(_0x3dff88(0x145))/0x5*(parseInt(_0x3dff88(0x146))/0x6)+-parseInt(_0x3dff88(0x13f))/0x7*(-parseInt(_0x3dff88(0x138))/0x8)+parseInt(_0x3dff88(0x144))/0x9*(parseInt(_0x3dff88(0x134))/0xa)+parseInt(_0x3dff88(0x136))/0xb;if(_0xeac946===_0x48d923)break;else _0x26bda2['push'](_0x26bda2['shift']());}catch(_0x526cc4){_0x26bda2['push'](_0x26bda2['shift']());}}}(a15_0x3cb0,0x2da42));function a15_0xedf2(_0x282a74,_0xa872){_0x282a74=_0x282a74-0x12f;const _0x3cb09d=a15_0x3cb0();let _0xedf261=_0x3cb09d[_0x282a74];return _0xedf261;}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_0x215a19(0x13a),'command':a15_0x215a19(0x137),'description':'List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','risk':'read','requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0x215a19(0x13d),'type':'boolean','description':a15_0x215a19(0x142),'default':![]}],async 'execute'(_0x3512b9){const _0x59cfa8=a15_0x215a19,_0x5d8efb=_0x3512b9['rawFlags']['appcode']?String(_0x3512b9[_0x59cfa8(0x141)][_0x59cfa8(0x13c)]):undefined,_0x5a1042=resolveTargetApps(_0x3512b9,_0x5d8efb);if(_0x5a1042){const _0x581cac=[];for(const _0x572919 of _0x5a1042){const _0x573774=_0x572919['cookie']||_0x3512b9[_0x59cfa8(0x13e)],_0x3199dc=_0x572919[_0x59cfa8(0x133)]||_0x59cfa8(0x143);initEnv(_0x3199dc);const {configArray:_0x33444b}=await fetchModelList(_0x572919[_0x59cfa8(0x13c)],_0x573774);_0x581cac[_0x59cfa8(0x131)](..._0x33444b[_0x59cfa8(0x12f)](_0x34e0f9=>({..._0x34e0f9,'_appName':_0x572919[_0x59cfa8(0x130)],'_appCode':_0x572919[_0x59cfa8(0x13c)],'_env':_0x3199dc,'_isDefault':_0x572919[_0x59cfa8(0x139)]})));}return{'ok':!![],'data':_0x581cac};}const {configArray:_0x5caafa}=await fetchModelList(_0x3512b9[_0x59cfa8(0x13b)],_0x3512b9[_0x59cfa8(0x13e)]);return{'ok':!![],'data':_0x5caafa};}};
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x3624af=a16_0x66b5;(function(_0x2b7b38,_0x154398){const _0x3857da=a16_0x66b5,_0x2276e1=_0x2b7b38();while(!![]){try{const _0x1b8635=parseInt(_0x3857da(0x7b))/0x1+parseInt(_0x3857da(0x83))/0x2*(-parseInt(_0x3857da(0x99))/0x3)+-parseInt(_0x3857da(0x7c))/0x4+parseInt(_0x3857da(0xa0))/0x5*(-parseInt(_0x3857da(0xa9))/0x6)+parseInt(_0x3857da(0x8b))/0x7*(-parseInt(_0x3857da(0xa6))/0x8)+-parseInt(_0x3857da(0xaa))/0x9*(parseInt(_0x3857da(0x8a))/0xa)+parseInt(_0x3857da(0x81))/0xb;if(_0x1b8635===_0x154398)break;else _0x2276e1['push'](_0x2276e1['shift']());}catch(_0x10736d){_0x2276e1['push'](_0x2276e1['shift']());}}}(a16_0x44cf,0xbf8e4));import a16_0x139dc2 from'ora';import a16_0x2dc057 from'node:path';import{initEnv,getEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';function a16_0x66b5(_0x383e89,_0x2d952f){_0x383e89=_0x383e89-0x76;const _0x44cf2a=a16_0x44cf();let _0x66b519=_0x44cf2a[_0x383e89];return _0x66b519;}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';function a16_0x44cf(){const _0x2e8167=['apiFilePath','output','Pulling\x20API\x20config\x20for\x20','-client','Failed:\x20','Pulling\x20','rawFlags','appcode','api','pull','cookie','48vJLDSq','\x20app(s)\x20failed','\x20succeeded,\x20','slice','\x20\x20•\x20','\x20model(s)','production','6322815MtTcZo','write','succeed','...','str','env','227656ehrHiK','message','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','6waAHgM','2016HkTqRx','\x20failed','apiDir',')...','\x20dataset(s),\x20generated\x20','clientFilePath','409107hDeEea','5330028qdJyja','boolean','-api','modelCount','fail','47132140uQwiFr','.ts','20954dsKIMO','isDefault','includes','join','Done:\x20','split','name','34580YSqCFr','91JDkfOb','start','appCode'];a16_0x44cf=function(){return _0x2e8167;};return a16_0x44cf();}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export const apiPull={'service':a16_0x3624af(0x96),'command':a16_0x3624af(0x97),'description':'Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20('+DEFAULT_API_DIR+'/)','risk':a16_0x3624af(0xa1),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a16_0x3624af(0x8f),'type':'string','description':'Output\x20directory\x20(default:\x20'+DEFAULT_API_DIR+'/)'},{'name':'global','type':a16_0x3624af(0x7d),'description':a16_0x3624af(0xa8),'default':![]}],async 'execute'(_0x1aa4ed){const _0x3f8ddc=a16_0x3624af,_0x398c36=_0x1aa4ed[_0x3f8ddc(0x94)]['appcode']?String(_0x1aa4ed[_0x3f8ddc(0x94)][_0x3f8ddc(0x95)]):undefined,_0x5645f9=_0x1aa4ed[_0x3f8ddc(0xa4)](_0x3f8ddc(0x8f))||undefined,_0x4b15df=resolveTargetApps(_0x1aa4ed,_0x398c36);if(_0x4b15df){let _0x43c348=0x0,_0x3be607=0x0;for(const _0x46627a of _0x4b15df){const _0x3383f8=_0x46627a[_0x3f8ddc(0x98)]||_0x1aa4ed[_0x3f8ddc(0x98)],_0x193f42=_0x46627a[_0x3f8ddc(0xa5)]||_0x3f8ddc(0x9f);initEnv(_0x193f42);const _0xb439ab=_0x46627a[_0x3f8ddc(0x77)]||_0x5645f9||_0x1aa4ed[_0x3f8ddc(0x77)]||DEFAULT_API_DIR,_0x4f7a39=_0x46627a[_0x3f8ddc(0x84)]?'':_0x46627a[_0x3f8ddc(0x89)]||_0x46627a[_0x3f8ddc(0x95)],_0x929a1a=a16_0x139dc2(_0x3f8ddc(0x93)+_0x46627a[_0x3f8ddc(0x89)]+'\x20('+_0x46627a[_0x3f8ddc(0x95)]+_0x3f8ddc(0x78))[_0x3f8ddc(0x8c)]();try{const {configArray:_0x2c69bb}=await fetchModelList(_0x46627a[_0x3f8ddc(0x95)],_0x3383f8),_0x3026f4=await generateApiFile(_0x2c69bb,_0x4f7a39,_0x46627a['appcode'],_0x46627a['isDefault'],_0x193f42,_0xb439ab,_0x46627a['name']);_0x929a1a['succeed'](_0x46627a['name']+':\x20'+_0x2c69bb['length']+'\x20dataset(s)\x20→\x20'+_0x3026f4[_0x3f8ddc(0x7f)]+_0x3f8ddc(0x9e)),writeCliSideChannelLine(_0x3f8ddc(0x9d)+_0x3026f4[_0x3f8ddc(0x8e)]),writeCliSideChannelLine(_0x3f8ddc(0x9d)+_0x3026f4[_0x3f8ddc(0x7a)]),_0x43c348++;}catch(_0x2c8c40){_0x929a1a[_0x3f8ddc(0x80)](_0x46627a[_0x3f8ddc(0x89)]+':\x20'+(_0x2c8c40 instanceof Error?_0x2c8c40[_0x3f8ddc(0xa7)]:String(_0x2c8c40))),_0x3be607++;}}writeCliSideChannelLine('');if(_0x3be607>0x0)writeCliSideChannelLine('!\x20'+_0x3be607+_0x3f8ddc(0x9a));return{'ok':_0x3be607===0x0,'message':_0x3f8ddc(0x87)+_0x43c348+_0x3f8ddc(0x9b)+_0x3be607+_0x3f8ddc(0x76)};}const _0x117b2c=_0x398c36&&_0x398c36[_0x3f8ddc(0x85)]('-')?_0x398c36[_0x3f8ddc(0x88)]('-')[_0x3f8ddc(0x9c)](0x1)[_0x3f8ddc(0x86)]('-'):'',_0x346566=_0x5645f9||_0x1aa4ed[_0x3f8ddc(0x77)]||DEFAULT_API_DIR,_0x43f774=!_0x398c36,_0x58dbba=a16_0x139dc2(_0x3f8ddc(0x90)+_0x1aa4ed[_0x3f8ddc(0x8d)]+_0x3f8ddc(0xa3))[_0x3f8ddc(0x8c)]();try{const {configArray:_0x319a45}=await fetchModelList(_0x1aa4ed[_0x3f8ddc(0x8d)],_0x1aa4ed[_0x3f8ddc(0x98)]),_0x4a59b5=await generateApiFile(_0x319a45,_0x117b2c,_0x1aa4ed[_0x3f8ddc(0x8d)],_0x43f774,getEnv(),_0x346566);_0x58dbba[_0x3f8ddc(0xa2)]('Pulled\x20'+_0x319a45['length']+_0x3f8ddc(0x79)+_0x4a59b5['modelCount']+_0x3f8ddc(0x9e));const _0x2aa5fb=_0x117b2c?_0x117b2c+_0x3f8ddc(0x7e):_0x3f8ddc(0x96),_0x1967f1=_0x117b2c?_0x117b2c+_0x3f8ddc(0x91):'client';return writeCliSideChannelLine('\x20\x20•\x20'+a16_0x2dc057[_0x3f8ddc(0x86)](_0x346566,_0x2aa5fb+_0x3f8ddc(0x82))),writeCliSideChannelLine(_0x3f8ddc(0x9d)+a16_0x2dc057['join'](_0x346566,_0x1967f1+_0x3f8ddc(0x82))),{'ok':!![],'data':{'datasetCount':_0x319a45['length'],'modelCount':_0x4a59b5[_0x3f8ddc(0x7f)]}};}catch(_0x1e5a87){_0x58dbba[_0x3f8ddc(0x80)](_0x3f8ddc(0x92)+(_0x1e5a87 instanceof Error?_0x1e5a87[_0x3f8ddc(0xa7)]:String(_0x1e5a87)));throw _0x1e5a87;}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x56ffeb,_0xf11858){const _0x3a89b4=a17_0x5b94,_0x536b9b=_0x56ffeb();while(!![]){try{const _0x37d395=parseInt(_0x3a89b4(0x78))/0x1+-parseInt(_0x3a89b4(0x82))/0x2*(parseInt(_0x3a89b4(0x6e))/0x3)+-parseInt(_0x3a89b4(0x70))/0x4*(parseInt(_0x3a89b4(0x79))/0x5)+parseInt(_0x3a89b4(0x81))/0x6*(-parseInt(_0x3a89b4(0x75))/0x7)+-parseInt(_0x3a89b4(0x72))/0x8*(parseInt(_0x3a89b4(0x6b))/0x9)+parseInt(_0x3a89b4(0x7f))/0xa*(parseInt(_0x3a89b4(0x74))/0xb)+parseInt(_0x3a89b4(0x7b))/0xc*(parseInt(_0x3a89b4(0x77))/0xd);if(_0x37d395===_0xf11858)break;else _0x536b9b['push'](_0x536b9b['shift']());}catch(_0x3ad648){_0x536b9b['push'](_0x536b9b['shift']());}}}(a17_0x4ff4,0x49fdf));function a17_0x5b94(_0x58bc5d,_0x40af0a){_0x58bc5d=_0x58bc5d-0x6b;const _0x4ff423=a17_0x4ff4();let _0x5b94e0=_0x4ff423[_0x58bc5d];return _0x5b94e0;}import{getMultiAppConfigs}from'../../utils/config.js';import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x5d21fb,_0x4a2ded){const _0x47ad90=a17_0x5b94;if(_0x4a2ded)return null;const _0xb23daf=_0x5d21fb[_0x47ad90(0x7a)](_0x47ad90(0x80))?_0x47ad90(0x6f):_0x47ad90(0x76);let _0x5ef741=getMultiAppConfigs(_0xb23daf);if(!_0x5ef741||_0x5ef741[_0x47ad90(0x7e)]===0x0)return null;if(_0x5d21fb[_0x47ad90(0x6c)]){const _0x476cd7=_0x5ef741[_0x47ad90(0x73)](_0x17cfaa=>_0x17cfaa[_0x47ad90(0x71)]===_0x5d21fb[_0x47ad90(0x6c)]);if(_0x476cd7[_0x47ad90(0x7e)]===0x0){const _0x42234a=_0x5ef741['map'](_0xfa85a0=>_0xfa85a0[_0x47ad90(0x71)])[_0x47ad90(0x7d)](',\x20');throw CliErrors['validation'](_0x47ad90(0x6d)+_0x5d21fb[_0x47ad90(0x6c)]+_0x47ad90(0x7c)+_0x42234a);}_0x5ef741=_0x476cd7;}return _0x5ef741;}function a17_0x4ff4(){const _0x1c1bb5=['1133iwOMHa','9051QYnDTe','project','117rigpWL','575122sGJXHn','1705vSLTom','bool','1142196CsUxFy','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','join','length','56830qqRpZe','global','1416ZvmMEB','846zfapBW','952767yCYBZO','selectedAppName','App\x20\x22','4053ZFiOSr','merged','4856xGOwXW','name','32BPtKFa','filter'];a17_0x4ff4=function(){return _0x1c1bb5;};return a17_0x4ff4();}
|
package/lib/commands/app/add.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a18_0x5c54(_0x1bcc0b,_0x4505c7){_0x1bcc0b=_0x1bcc0b-0x169;const _0x1cb674=a18_0x1cb6();let _0x5c5488=_0x1cb674[_0x1bcc0b];return _0x5c5488;}const a18_0x636847=a18_0x5c54;function a18_0x1cb6(){const _0x59d60e=['Use\x20global\x20config\x20scope','app','defaultApp','1476448BZtgzG','Updated','write','bool','str','\x20Set\x20as\x20default\x20app.','\x20app\x20\x22','App\x20code','\x20app\x20add\x20<name>\x20--appcode\x20<code>','2461662sxTnru','Added','1410360EUgwqC','apps','354816QvVuCC','global','App\x20profile\x20name','780801WewDKT','8immMRI','Usage:\x20','flagMissing','appcode','Missing\x20app\x20name.','\x22\x20(appcode:\x20','trim','string','validation','args','870264sxZzoG','1506100dRjexw'];a18_0x1cb6=function(){return _0x59d60e;};return a18_0x1cb6();}(function(_0x588eb1,_0x635ee7){const _0x2f7a2a=a18_0x5c54,_0x1c5812=_0x588eb1();while(!![]){try{const _0x5ad3bb=parseInt(_0x2f7a2a(0x16a))/0x1+parseInt(_0x2f7a2a(0x17a))/0x2+parseInt(_0x2f7a2a(0x17c))/0x3+-parseInt(_0x2f7a2a(0x16f))/0x4+-parseInt(_0x2f7a2a(0x16b))/0x5+-parseInt(_0x2f7a2a(0x178))/0x6+parseInt(_0x2f7a2a(0x17f))/0x7*(-parseInt(_0x2f7a2a(0x180))/0x8);if(_0x5ad3bb===_0x635ee7)break;else _0x1c5812['push'](_0x1c5812['shift']());}catch(_0x1afa59){_0x1c5812['push'](_0x1c5812['shift']());}}}(a18_0x1cb6,0x7a73c));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(_0x3f0027){const _0xcb6652=a18_0x5c54,_0x49eee9=_0x3f0027[_0xcb6652(0x169)][0x0]?.['trim']();if(!_0x49eee9)throw CliErrors[_0xcb6652(0x188)]('Missing\x20app\x20name.',_0xcb6652(0x181)+CLI_BIN_NAME+_0xcb6652(0x177));}async function execute(_0x16c357){const _0x430ee7=a18_0x5c54,_0x3b8980=_0x16c357[_0x430ee7(0x169)][0x0]?.[_0x430ee7(0x186)]();if(!_0x3b8980)throw CliErrors[_0x430ee7(0x188)](_0x430ee7(0x184),_0x430ee7(0x181)+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20<code>');const _0x1344a2=_0x16c357[_0x430ee7(0x173)](_0x430ee7(0x183));if(!_0x1344a2)throw CliErrors[_0x430ee7(0x182)]('appcode',_0x430ee7(0x181)+CLI_BIN_NAME+_0x430ee7(0x177));const _0x5e28e2={'global':_0x16c357[_0x430ee7(0x172)](_0x430ee7(0x17d))},_0x3ff2a8=readConfig(_0x5e28e2);if(!_0x3ff2a8['apps'])_0x3ff2a8[_0x430ee7(0x17b)]={};const _0xc3ed50={'appcode':_0x1344a2,...collectAppProfileOverrides(_0x154824=>_0x16c357[_0x430ee7(0x173)](_0x154824))},_0x89f78c=_0x3ff2a8[_0x430ee7(0x17b)],_0x335e65=!!_0x89f78c[_0x3b8980];_0x89f78c[_0x3b8980]=_0xc3ed50;if(!_0x3ff2a8['defaultApp'])_0x3ff2a8[_0x430ee7(0x16e)]=_0x3b8980;writeConfig(_0x3ff2a8,_0x5e28e2);const _0x28e2f5=!_0x335e65&&_0x3ff2a8[_0x430ee7(0x16e)]===_0x3b8980?_0x430ee7(0x174):'',_0x4c6c8a=(_0x335e65?_0x430ee7(0x170):_0x430ee7(0x179))+_0x430ee7(0x175)+_0x3b8980+_0x430ee7(0x185)+_0x1344a2+')'+scopeLabel(_0x5e28e2)+'.'+_0x28e2f5;return{'ok':!![],'message':_0x4c6c8a};}export const appAddDefinition={'service':a18_0x636847(0x16d),'command':'add','description':'Add\x20or\x20update\x20an\x20app\x20in\x20config','risk':a18_0x636847(0x171),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a18_0x636847(0x17e),'required':!![]}],'flags':[{'name':a18_0x636847(0x183),'type':a18_0x636847(0x187),'description':a18_0x636847(0x176),'required':!![]},{'name':'global','type':'boolean','description':a18_0x636847(0x16c),'default':![]},...getAppProfileFlagDefs()],'validate':validateArgs,'execute':execute};
|