@lovrabet/rabetbase-cli 2.1.7-beta.9 → 2.1.8
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
|
+
function a0_0x194d(){const _0x9d6e0f=['.md','6896286wKItaf','tableName','push','5248480uSfkmD','生成文档失败:\x20','POST','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','datasetCode','Fetch\x20doc\x20(','1118550kwqGdH','name','27VoDeYX','2NgtCeA','.md\x20(','string','9hxhZWX','15629601PMlhLm','message','7Vzgxip','.md\x20-\x20','71036cEUurW','success','382962nKPgLC','334895YFphMr','5kwkdas','length','/api/node-toolbox/api-doc-generator','markdown','utf8','log','生成文档成功:\x20','204cDciKp','error','Waiting\x203\x20seconds...\x0a','api-doc','✓\x20Generated:\x20',']\x20Generating:\x20'];a0_0x194d=function(){return _0x9d6e0f;};return a0_0x194d();}(function(_0x2f2f29,_0x252dcf){const _0x5efc87=a0_0x54b9,_0x345773=_0x2f2f29();while(!![]){try{const _0x3a3e70=-parseInt(_0x5efc87(0xb7))/0x1*(-parseInt(_0x5efc87(0x9b))/0x2)+-parseInt(_0x5efc87(0xba))/0x3*(-parseInt(_0x5efc87(0x99))/0x4)+-parseInt(_0x5efc87(0x9d))/0x5*(parseInt(_0x5efc87(0xab))/0x6)+parseInt(_0x5efc87(0xbd))/0x7*(-parseInt(_0x5efc87(0xae))/0x8)+-parseInt(_0x5efc87(0xb6))/0x9*(-parseInt(_0x5efc87(0xb4))/0xa)+-parseInt(_0x5efc87(0x9c))/0xb*(-parseInt(_0x5efc87(0xa4))/0xc)+parseInt(_0x5efc87(0xbb))/0xd;if(_0x3a3e70===_0x252dcf)break;else _0x345773['push'](_0x345773['shift']());}catch(_0x3a68e9){_0x345773['push'](_0x345773['shift']());}}}(a0_0x194d,0xa787d));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x757159 from'node:path';import{getApiDomain}from'../constant/domain.js';function a0_0x54b9(_0x49dbf1,_0x487beb){_0x49dbf1=_0x49dbf1-0x99;const _0x194d75=a0_0x194d();let _0x54b9ec=_0x194d75[_0x49dbf1];return _0x54b9ec;}import{logger}from'../utils/logger.js';import{platformFetch}from'../core/api-client.js';export async function fetchDatasetDoc(_0x526b4b){const _0xcfdba0=a0_0x54b9,{appCode:_0x146f41,cookie:_0x2680f9,datasetCode:_0x4dd929,datasetId:_0x45fe31,extraParams:_0x533c34}=_0x526b4b,_0x4c19ac=getApiDomain()+_0xcfdba0(0x9f),_0x1a3f20=await platformFetch(_0x4c19ac,{'method':_0xcfdba0(0xb0),'body':{'appCode':_0x146f41,'datasetCode':_0x4dd929,'datasetId':_0x45fe31,..._0x533c34||{}},'cookie':_0x2680f9,'label':_0xcfdba0(0xb3)+_0x4dd929+')'});if(!_0x1a3f20||typeof _0x1a3f20[_0xcfdba0(0xa0)]!==_0xcfdba0(0xb9))throw new Error('Invalid\x20response\x20format\x20('+_0x4dd929+'):\x20missing\x20data.markdown\x20field');return _0x1a3f20[_0xcfdba0(0xa0)];}function delay(_0xa31601){return new Promise(_0x4903af=>setTimeout(_0x4903af,_0xa31601));}export async function generateDatasetDocs(_0x3709cf,_0x728576,_0x4f30e2,_0xb1931f='./docs',_0x253d7d,_0x19e409){const _0x553067=a0_0x54b9;mkdirSync(_0xb1931f,{'recursive':!![]});const _0x27c6de=[],_0x2fadce=_0x3709cf[_0x553067(0x9e)];console[_0x553067(0xa2)]('\x0a'+_0x2fadce+_0x553067(0xb1));for(let _0x499e84=0x0;_0x499e84<_0x3709cf[_0x553067(0x9e)];_0x499e84++){const _0x47be14=_0x3709cf[_0x499e84],_0x12cbb8=_0x499e84+0x1,_0x11f4c5=_0x47be14[_0x553067(0xac)];try{console[_0x553067(0xa2)]('['+_0x12cbb8+'/'+_0x2fadce+_0x553067(0xa9)+_0x11f4c5+_0x553067(0xb8)+_0x47be14[_0x553067(0xb5)]+')');if(_0x253d7d)_0x253d7d(_0x12cbb8,_0x2fadce,_0x11f4c5);const _0x3ece8d=await fetchDatasetDoc({'appCode':_0x728576,'cookie':_0x4f30e2,'datasetCode':_0x47be14[_0x553067(0xb2)],'datasetId':_0x47be14['id'],'enableAI':![],'extraParams':_0x19e409}),_0xcb241c=a0_0x757159['join'](_0xb1931f,_0x11f4c5+_0x553067(0xaa));writeFileSync(_0xcb241c,_0x3ece8d,{'encoding':_0x553067(0xa1)}),console['log'](_0x553067(0xa8)+_0x11f4c5+_0x553067(0xaa)),logger[_0x553067(0x9a)](_0x553067(0xa7),_0x553067(0xa3)+_0x11f4c5,undefined,{'datasetCode':_0x47be14[_0x553067(0xb2)],'datasetName':_0x47be14[_0x553067(0xb5)],'filePath':_0xcb241c,'progress':_0x12cbb8+'/'+_0x2fadce}),_0x27c6de[_0x553067(0xad)]({'datasetCode':_0x47be14[_0x553067(0xb2)],'datasetName':_0x47be14[_0x553067(0xb5)],'filePath':_0xcb241c,'success':!![]});if(_0x12cbb8<_0x2fadce)await delay(0x1388);}catch(_0x538151){const _0xf3bd6b=_0x538151 instanceof Error?_0x538151[_0x553067(0xbc)]:String(_0x538151);console[_0x553067(0xa2)]('✗\x20Failed:\x20'+_0x11f4c5+_0x553067(0xbe)+_0xf3bd6b),logger[_0x553067(0xa5)](_0x553067(0xa7),_0x553067(0xaf)+_0x47be14[_0x553067(0xb2)],{'datasetCode':_0x47be14['datasetCode'],'datasetName':_0x47be14['name'],'error':_0xf3bd6b,'progress':_0x12cbb8+'/'+_0x2fadce}),_0x27c6de[_0x553067(0xad)]({'datasetCode':_0x47be14[_0x553067(0xb2)],'datasetName':_0x47be14['name'],'filePath':'','success':![],'error':_0xf3bd6b}),_0x12cbb8<_0x2fadce&&(console[_0x553067(0xa2)](_0x553067(0xa6)),await delay(0xbb8));}}return _0x27c6de;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x35f334,_0x29524c){const _0x64a18=a1_0x2fe4,_0x5807e9=_0x35f334();while(!![]){try{const _0x221c02=-parseInt(_0x64a18(0x97))/0x1*(parseInt(_0x64a18(0x91))/0x2)+parseInt(_0x64a18(0x84))/0x3*(-parseInt(_0x64a18(0x82))/0x4)+parseInt(_0x64a18(0x8b))/0x5*(parseInt(_0x64a18(0x89))/0x6)+parseInt(_0x64a18(0x8d))/0x7*(parseInt(_0x64a18(0x83))/0x8)+-parseInt(_0x64a18(0x92))/0x9*(parseInt(_0x64a18(0x88))/0xa)+-parseInt(_0x64a18(0x81))/0xb*(-parseInt(_0x64a18(0x8a))/0xc)+-parseInt(_0x64a18(0x96))/0xd;if(_0x221c02===_0x29524c)break;else _0x5807e9['push'](_0x5807e9['shift']());}catch(_0x87e592){_0x5807e9['push'](_0x5807e9['shift']());}}}(a1_0x3b30,0x9f172));function a1_0x3b30(){const _0x3a01bb=['configArray','5040WLjvwZ','map','fetch-model-list','&otype=array','40HFpYcT','63DkkhRY','length','name','/api/node-toolbox/dataset/model-list?appcode=','1360554gsqMxh','7140uRpXXo','Fetch\x20datasets','11baCZhM','1003232xcYwXb','10296tIYZiE','9duJPpO','info','replace','trim','1053370XcIeXA','61458iRUPGw','6361464oyuBWM','455UPrkLo'];a1_0x3b30=function(){return _0x3a01bb;};return a1_0x3b30();}import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';function a1_0x2fe4(_0x3df18e,_0x588fb0){_0x3df18e=_0x3df18e-0x81;const _0x3b3027=a1_0x3b30();let _0x2fe4fd=_0x3b3027[_0x3df18e];return _0x2fe4fd;}import{getEnv}from'../constant/env.js';import{platformFetch}from'../core/api-client.js';function cleanNewlines(_0x52a3a8){const _0x462399=a1_0x2fe4;return _0x52a3a8[_0x462399(0x86)](/[\r\n]+/g,'\x20')[_0x462399(0x87)]();}function cleanDatasetName(_0x3e8282){const _0x10b6e3=a1_0x2fe4;if(!_0x3e8282['name'])return _0x3e8282;return{..._0x3e8282,'name':cleanNewlines(_0x3e8282[_0x10b6e3(0x94)])};}export async function fetchModelList(_0x3735bd,_0x2f2091){const _0x517122=a1_0x2fe4,_0x5d264b=getEnv(),_0x262d06=getApiDomain()+_0x517122(0x95)+_0x3735bd+_0x517122(0x90);logger[_0x517122(0x85)](_0x517122(0x8f),'正在从服务器拉取模型列表...\x20(环境:\x20'+_0x5d264b+')',{'apiUrl':_0x262d06});const _0x54e69f=await platformFetch(_0x262d06,{'cookie':_0x2f2091,'label':_0x517122(0x98)}),_0x248fe4=(_0x54e69f[_0x517122(0x8c)]??[])[_0x517122(0x8e)](cleanDatasetName);return{'configArray':_0x248fe4,'count':_0x248fe4[_0x517122(0x93)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c15b8,_0x850c49){const _0x1590cc=a2_0xf906,_0x4b53bc=_0x4c15b8();while(!![]){try{const _0x600dda=parseInt(_0x1590cc(0xd1))/0x1+parseInt(_0x1590cc(0xe9))/0x2*(-parseInt(_0x1590cc(0xec))/0x3)+parseInt(_0x1590cc(0xc8))/0x4+-parseInt(_0x1590cc(0xdd))/0x5*(-parseInt(_0x1590cc(0xe5))/0x6)+parseInt(_0x1590cc(0xf0))/0x7*(-parseInt(_0x1590cc(0xcf))/0x8)+-parseInt(_0x1590cc(0xea))/0x9*(parseInt(_0x1590cc(0xeb))/0xa)+parseInt(_0x1590cc(0xdb))/0xb;if(_0x600dda===_0x850c49)break;else _0x4b53bc['push'](_0x4b53bc['shift']());}catch(_0x566267){_0x4b53bc['push'](_0x4b53bc['shift']());}}}(a2_0x1d87,0xe1a3e));import a2_0x394df4 from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';function a2_0xf906(_0x17cdfd,_0x27266c){_0x17cdfd=_0x17cdfd-0xc8;const _0x1d87d7=a2_0x1d87();let _0xf90615=_0x1d87d7[_0x17cdfd];return _0xf90615;}import a2_0x31634e from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';export async function generateApiFile(_0xeadc86,_0x26e9c5,_0x2554b3,_0x561f42,_0x19d81b,_0x412433,_0x465442){const _0x44b1ff=a2_0xf906;if(!_0x2554b3)throw new Error(_0x44b1ff(0xda)+CLI_BIN_NAME+_0x44b1ff(0xd2));const _0x484c4d=_0x561f42&&!_0x465442,_0x1f2480=_0x465442||_0x2554b3,_0xb115a3=_0x484c4d?'CONFIG_NAMES.DEFAULT':'\x22'+_0x1f2480+'\x22',_0x3bfada=!isProduction(_0x19d81b);let _0xae8a6;if(_0x484c4d)_0x3bfada?_0xae8a6=_0x44b1ff(0xcd)+_0xb115a3+',\x20env:\x20\x22'+_0x19d81b+_0x44b1ff(0xe2):_0xae8a6='';else{const _0x1ef174=_0x3bfada?',\x20env:\x20\x22'+_0x19d81b+'\x22':'';_0xae8a6=_0x44b1ff(0xe7)+_0x1f2480+'\x22'+_0x1ef174+'\x20}';}const _0x4f1813=_0x26e9c5?_0x26e9c5+_0x44b1ff(0xe8):_0x44b1ff(0xd9),_0x5003d9=_0x26e9c5?_0x26e9c5+_0x44b1ff(0xe4):_0x44b1ff(0xe1),_0x573a43=_0x26e9c5&&!/^app-[a-f0-9]+$/i['test'](_0x26e9c5)?_0x26e9c5[_0x44b1ff(0xe3)](/-/g,'_')[_0x44b1ff(0xdf)]():_0x44b1ff(0xef),_0x393205=[];_0xeadc86[_0x44b1ff(0xe0)](_0x4dab20=>{const _0x6e1e10=_0x44b1ff;_0x393205[_0x6e1e10(0xd8)]({'datasetCode':_0x4dab20['datasetCode'],'tableName':_0x4dab20['tableName'],'name':_0x4dab20[_0x6e1e10(0xed)]||'','alias':_0x4dab20['alias']||_0x4dab20[_0x6e1e10(0xcb)]});});const _0x5b3e94=fileURLToPath(import.meta.url),_0x1ecba1=a2_0x31634e[_0x44b1ff(0xd5)](a2_0x31634e[_0x44b1ff(0xce)](_0x5b3e94),_0x44b1ff(0xf1)),_0x5652b2=a2_0x31634e[_0x44b1ff(0xf2)](_0x1ecba1,_0x44b1ff(0xdc)),_0x391b33=a2_0x31634e[_0x44b1ff(0xf2)](_0x5652b2,_0x44b1ff(0xe6)),_0x598722=a2_0x31634e[_0x44b1ff(0xf2)](_0x5652b2,_0x44b1ff(0xd7)),_0x4ba87d=_0x412433;mkdirSync(_0x4ba87d,{'recursive':!![]});const _0xfa3ed8=_0x393205[0x0]?.[_0x44b1ff(0xcc)],_0xf52a08=readFileSync(_0x391b33,_0x44b1ff(0xd0)),_0x273006=TemplateReplacer[_0x44b1ff(0xc9)](_0xf52a08,_0x2554b3,_0x393205,_0xfa3ed8,_0x4f1813,_0xb115a3,undefined,_0x573a43),_0x312a96=await a2_0x394df4[_0x44b1ff(0xd4)](_0x273006,{'parser':_0x44b1ff(0xee)}),_0x36b1ef=a2_0x31634e['join'](_0x4ba87d,_0x4f1813+_0x44b1ff(0xd3));writeFileSync(_0x36b1ef,_0x312a96,{'encoding':'utf8'});const _0xf8fd42=readFileSync(_0x598722,_0x44b1ff(0xd0)),_0x69e586=TemplateReplacer['replaceApiContent'](_0xf8fd42,_0x2554b3,_0x393205,_0xfa3ed8,_0x4f1813,_0xb115a3,_0xae8a6,_0x573a43),_0x3786ca=await a2_0x394df4[_0x44b1ff(0xd4)](_0x69e586,{'parser':_0x44b1ff(0xee)}),_0x9b3946=a2_0x31634e['join'](_0x4ba87d,_0x5003d9+'.ts');writeFileSync(_0x9b3946,_0x3786ca,{'encoding':_0x44b1ff(0xd0)});const _0x46a8ab=_0x393205[_0x44b1ff(0xd6)];return logger[_0x44b1ff(0xca)]('init-api',_0x44b1ff(0xde),undefined,{'apiFile':_0x36b1ef,'clientFile':_0x9b3946,'modelCount':_0x46a8ab,'configName':_0xb115a3}),{'modelCount':_0x46a8ab,'apiFilePath':_0x36b1ef,'clientFilePath':_0x9b3946,'configName':_0xb115a3};}function a2_0x1d87(){const _0x21fb2f=['length','client.ts.tpl','push','api','Please\x20configure\x20app\x20code\x20first\x20via\x20`','23266056AAakab','templates/generate-api','9475DdGLFh','API\x20文件生成成功!','toUpperCase','forEach','client','\x22\x20}','replace','-client','174exAdWF','api.ts.tpl','{\x20apiConfigName:\x20\x22','-api','52156VOlnbn','63ADESTX','2467310rmrary','6dHjFyu','name','typescript','LOVRABET','7vhBljc','../..','join','5518772EQTDzD','replaceApiContent','success','key','alias','{\x20apiConfigName:\x20','dirname','13462008mEdjFD','utf8','836502RJSiWg','\x20config\x20set\x20app\x20<value>`','.ts','format','resolve'];a2_0x1d87=function(){return _0x21fb2f;};return a2_0x1d87();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d5457,_0x1f8e01){const _0x31f575=a3_0x3a7b,_0x2aa9b7=_0x2d5457();while(!![]){try{const _0x5c9823=-parseInt(_0x31f575(0x102))/0x1*(parseInt(_0x31f575(0xf9))/0x2)+-parseInt(_0x31f575(0xfc))/0x3+-parseInt(_0x31f575(0xf6))/0x4*(-parseInt(_0x31f575(0x101))/0x5)+-parseInt(_0x31f575(0xfe))/0x6+-parseInt(_0x31f575(0xf7))/0x7+parseInt(_0x31f575(0xff))/0x8*(-parseInt(_0x31f575(0x100))/0x9)+parseInt(_0x31f575(0xf3))/0xa;if(_0x5c9823===_0x1f8e01)break;else _0x2aa9b7['push'](_0x2aa9b7['shift']());}catch(_0x106f04){_0x2aa9b7['push'](_0x2aa9b7['shift']());}}}(a3_0x2b8a,0x57a0d));function a3_0x2b8a(){const _0x3f508f=['19168400ZcMhNf','\x20auth\x20login\x20--yes`\x20in\x20an\x20interactive\x20terminal.','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','434048DqPFAv','4048072AnfoMw','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','546764mYXMiN','log','*\x20Login\x20successful!','7413QTWQBN','Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','2295246uxqTzY','1250840Ccumat','9GPwaRA','5YqCSfG','2AQQpKY','autoYes','Run\x20`'];a3_0x2b8a=function(){return _0x3f508f;};return a3_0x2b8a();}import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a3_0x3a7b(_0x202a3e,_0x45494a){_0x202a3e=_0x202a3e-0xf1;const _0x2b8a46=a3_0x2b8a();let _0x3a7b78=_0x2b8a46[_0x202a3e];return _0x3a7b78;}import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';import a3_0x5553b6 from'ora';export async function runAuthServer(_0x1497dc){const _0x1c6211=a3_0x3a7b,_0x1bd03c=await getIsSessionValid();if(_0x1bd03c){console[_0x1c6211(0xfa)](_0x1c6211(0xf5));return;}if(_0x1497dc?.['nonInteractive'])throw CliErrors['validation'](_0x1c6211(0xfd),_0x1c6211(0xf2)+CLI_BIN_NAME+_0x1c6211(0xf4));const _0x2e39da=_0x1497dc?.[_0x1c6211(0xf1)]?!![]:await confirm({'message':'No\x20valid\x20session.\x20Login\x20now?','default':!![]});if(!_0x2e39da)return;const _0x346230=a3_0x5553b6(_0x1c6211(0xf8))['start'](),_0x153271=await authServer({'silent':!![]});_0x346230['stop'](),_0x153271?console[_0x1c6211(0xfa)](_0x1c6211(0xfb)):console[_0x1c6211(0xfa)]('!\x20Login\x20failed.');}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x48ef69=a4_0x14f2;function a4_0x14f2(_0x2666c5,_0x529ffc){_0x2666c5=_0x2666c5-0xc0;const _0x4f27be=a4_0x4f27();let _0x14f22b=_0x4f27be[_0x2666c5];return _0x14f22b;}(function(_0x2a7ad0,_0x3f248){const _0x50b088=a4_0x14f2,_0x5c2eb4=_0x2a7ad0();while(!![]){try{const _0x538b2a=parseInt(_0x50b088(0xc4))/0x1+parseInt(_0x50b088(0xcb))/0x2+parseInt(_0x50b088(0xe3))/0x3*(-parseInt(_0x50b088(0xe6))/0x4)+-parseInt(_0x50b088(0xc1))/0x5*(parseInt(_0x50b088(0xd8))/0x6)+-parseInt(_0x50b088(0xc9))/0x7*(parseInt(_0x50b088(0xd1))/0x8)+parseInt(_0x50b088(0xe2))/0x9+parseInt(_0x50b088(0xca))/0xa;if(_0x538b2a===_0x3f248)break;else _0x5c2eb4['push'](_0x5c2eb4['shift']());}catch(_0x47f3ed){_0x5c2eb4['push'](_0x5c2eb4['shift']());}}}(a4_0x4f27,0x48f3e));import{writeFileSync}from'node:fs';import a4_0x3bbb76 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'../auth/is-session-valid.js';import{cookieFile}from'../auth/constant.js';import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export async function authServer(_0xfaf5f3){const _0x2d0e5b=a4_0x14f2,_0x181d33=_0xfaf5f3?.[_0x2d0e5b(0xd7)]||![];if(await getIsSessionValid())return!![];const _0x26b173=await(await fetch(_0x2d0e5b(0xdb)))['json']();return new Promise(async(_0x10602c,_0x5eadaf)=>{const _0xb85fc=_0x2d0e5b;let _0x250e53=0x0;const _0x4d07ee=a4_0x3bbb76['createServer'](_0x26b173,async(_0x5ae58c,_0x12e0c0)=>{const _0x45257b=a4_0x14f2,_0x1ae57a=getUserDomain(),_0x29ec81=_0x5ae58c['headers']['cookie']||'',_0x230e5c=await fetch(_0x1ae57a+_0x45257b(0xc5),{'headers':{'cookie':_0x29ec81}})[_0x45257b(0xe5)](_0x2fc1af=>_0x2fc1af[_0x45257b(0xce)]()),_0x3b3ecc=_0x230e5c&&_0x230e5c[_0x45257b(0xc2)]&&_0x230e5c[_0x45257b(0xdd)];if(_0x3b3ecc){writeFileSync(cookieFile,_0x29ec81,_0x45257b(0xcd)),_0x10602c(!![]);const _0x269a0b=buildLoginSuccessHtml();_0x12e0c0[_0x45257b(0xdf)](0xc8,{'Content-Type':_0x45257b(0xe8)}),_0x12e0c0[_0x45257b(0xe4)](_0x269a0b),_0x4d07ee[_0x45257b(0xc3)]();}else{const _0x37b3c9=''+encodeURIComponent(_0x45257b(0xd0)+_0x250e53);_0x12e0c0['writeHead'](0x12e,{'location':_0x1ae57a+_0x45257b(0xd6)+_0x37b3c9}),_0x12e0c0[_0x45257b(0xe4)]();return;}});_0x4d07ee['listen'](0x0,'127.0.0.1',()=>{const _0x48deff=a4_0x14f2,_0x2e3635=_0x4d07ee[_0x48deff(0xe0)]();_0x250e53=typeof _0x2e3635===_0x48deff(0xcf)&&_0x2e3635?_0x2e3635[_0x48deff(0xe1)]:Number(_0x2e3635);const _0x42fca4=_0x48deff(0xd0)+_0x250e53;!_0x181d33&&(console[_0x48deff(0xd4)](_0x48deff(0xe7)),console[_0x48deff(0xd4)](_0x48deff(0xc7),_0x42fca4),console[_0x48deff(0xd4)](_0x48deff(0xd3)),console[_0x48deff(0xd4)](''),console['log'](_0x48deff(0xc0)),console[_0x48deff(0xd4)]('')),openInBrowser(_0x42fca4)['then'](_0xf0f594=>{const _0x4ae706=_0x48deff;!_0x181d33&&(_0xf0f594?console['log'](_0x4ae706(0xd9)):(console[_0x4ae706(0xd4)](_0x4ae706(0xc8)),console['log'](_0x4ae706(0xdc),_0x42fca4)),console[_0x4ae706(0xd4)](''));})[_0x48deff(0xcc)](()=>{const _0x7dfb35=_0x48deff;!_0x181d33&&(console[_0x7dfb35(0xd4)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console['log'](_0x7dfb35(0xdc),_0x42fca4),console[_0x7dfb35(0xd4)](''));});}),_0x4d07ee['on'](_0xb85fc(0xda),_0x10ed72=>{const _0x3330f6=_0xb85fc;!_0x181d33&&console[_0x3330f6(0xda)](_0x3330f6(0xc6),_0x10ed72),_0x5eadaf(_0x10ed72);});});}function openInBrowser(_0x38f2df){return new Promise(_0x2b4542=>{const _0x4e23dd=a4_0x14f2,_0x3065c3=process['platform'];let _0x5f5385;if(_0x3065c3==='win32')_0x5f5385=_0x4e23dd(0xde)+_0x38f2df+'\x22';else _0x3065c3===_0x4e23dd(0xd5)?_0x5f5385='open\x20\x22'+_0x38f2df+'\x22':_0x5f5385=_0x4e23dd(0xd2)+_0x38f2df+'\x22';exec(_0x5f5385,_0x406640=>{_0x406640?_0x2b4542(![]):_0x2b4542(!![]);});});}function a4_0x4f27(){const _0x1c5fb2=['/api/auth/get-session','Auth\x20server\x20error:','📍\x20Login\x20URL:','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','2877kowGyC','9736140rMsKvx','515864lZkTes','catch','utf-8','json','object','https://dev.lovrabet.com:','3208xvZzlA','xdg-open\x20\x22','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','log','darwin','/sign-in?redirect=','silent','183462gmrSbv','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','error','https://g.yuntooai.com/cert/lovrabet-dev.json','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','user','cmd\x20/c\x20start\x20\x22\x22\x20\x22','writeHead','address','port','679707EYyqlg','1345740ZbaBZH','end','then','4vilfMd','🔐\x20Starting\x20login\x20service...','text/html;\x20charset=utf-8','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','65aoSWCh','session','close','2637zTBFwP'];a4_0x4f27=function(){return _0x1c5fb2;};return a4_0x4f27();}if(import.meta.main){const isAuth=await authServer();console[a4_0x48ef69(0xd4)]('isAuth',isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x586126=a5_0x17e5;(function(_0x444fe3,_0x2f45f4){const _0x5815a7=a5_0x17e5,_0x1a5105=_0x444fe3();while(!![]){try{const _0x25f608=parseInt(_0x5815a7(0x103))/0x1+-parseInt(_0x5815a7(0x108))/0x2*(parseInt(_0x5815a7(0x102))/0x3)+parseInt(_0x5815a7(0x10a))/0x4+parseInt(_0x5815a7(0x101))/0x5+parseInt(_0x5815a7(0x105))/0x6+parseInt(_0x5815a7(0x100))/0x7+-parseInt(_0x5815a7(0x106))/0x8*(parseInt(_0x5815a7(0x104))/0x9);if(_0x25f608===_0x2f45f4)break;else _0x1a5105['push'](_0x1a5105['shift']());}catch(_0xf71da7){_0x1a5105['push'](_0x1a5105['shift']());}}}(a5_0x5d6c,0xa6941));function a5_0x5d6c(){const _0x3d18ee=['cookie','45338rgguzp','.lovrabet','2588720dONeap','1871646eCqped','1370750jbAPLi','9iJvxvn','392717mHJJXM','5672376VdWLwW','6358074KmHlsq','24CohHQi'];a5_0x5d6c=function(){return _0x3d18ee;};return a5_0x5d6c();}import{mkdirSync}from'node:fs';function a5_0x17e5(_0x1c8db3,_0x3c0a26){_0x1c8db3=_0x1c8db3-0x100;const _0x5d6cc0=a5_0x5d6c();let _0x17e52f=_0x5d6cc0[_0x1c8db3];return _0x17e52f;}import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a5_0x586126(0x109));export const cookieFile=join(configDir,a5_0x586126(0x107));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a6_0x2da6(_0x478af0,_0x394aeb){_0x478af0=_0x478af0-0x109;var _0x4243d7=a6_0x4243();var _0x2da6f0=_0x4243d7[_0x478af0];return _0x2da6f0;}function a6_0x4243(){var _0x14c562=['1449DiuHNj','4942016NrZsZX','246JFPLvZ','utf-8','310527zAzzmW','4341MqAuHG','998DvbfvD','94501hHzqYA','5hSOLkF','17856VtsNuX','20819293IjYVwi','60qwBhex'];a6_0x4243=function(){return _0x14c562;};return a6_0x4243();}(function(_0x5d883a,_0x29d598){var _0x314249=a6_0x2da6,_0x5dba54=_0x5d883a();while(!![]){try{var _0x133685=parseInt(_0x314249(0x111))/0x1+parseInt(_0x314249(0x110))/0x2*(-parseInt(_0x314249(0x10f))/0x3)+parseInt(_0x314249(0x113))/0x4*(parseInt(_0x314249(0x112))/0x5)+-parseInt(_0x314249(0x10c))/0x6*(-parseInt(_0x314249(0x10a))/0x7)+-parseInt(_0x314249(0x10b))/0x8+-parseInt(_0x314249(0x10e))/0x9*(parseInt(_0x314249(0x109))/0xa)+parseInt(_0x314249(0x114))/0xb;if(_0x133685===_0x29d598)break;else _0x5dba54['push'](_0x5dba54['shift']());}catch(_0x244a9c){_0x5dba54['push'](_0x5dba54['shift']());}}}(a6_0x4243,0x6eaac));import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0x3245ee=a6_0x2da6;try{return readFileSync(cookieFile,_0x3245ee(0x10d));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x31267a,_0x14864e){const _0x286105=a7_0x44f7,_0x28924f=_0x31267a();while(!![]){try{const _0x46918b=-parseInt(_0x286105(0x1cb))/0x1*(parseInt(_0x286105(0x1cc))/0x2)+parseInt(_0x286105(0x1c1))/0x3+parseInt(_0x286105(0x1cd))/0x4+-parseInt(_0x286105(0x1ca))/0x5+parseInt(_0x286105(0x1c3))/0x6*(-parseInt(_0x286105(0x1c2))/0x7)+-parseInt(_0x286105(0x1c9))/0x8+parseInt(_0x286105(0x1c7))/0x9;if(_0x46918b===_0x14864e)break;else _0x28924f['push'](_0x28924f['shift']());}catch(_0x107c4c){_0x28924f['push'](_0x28924f['shift']());}}}(a7_0x3dd1,0x81837));import{existsSync,readFileSync}from'node:fs';function a7_0x44f7(_0x2f31a9,_0x219421){_0x2f31a9=_0x2f31a9-0x1c1;const _0x3dd11d=a7_0x3dd1();let _0x44f793=_0x3dd11d[_0x2f31a9];return _0x44f793;}function a7_0x3dd1(){const _0x234515=['1922715FBnkfF','utf-8','8320480GYcyTa','2020670NiGCxD','1iwEhQr','515466BSTBrf','4172852wAKHww','3100122uflvcu','202328qQnKyN','12kGScto','json','user','session'];a7_0x3dd1=function(){return _0x234515;};return a7_0x3dd1();}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0x20f6da=a7_0x44f7;try{if(!existsSync(cookieFile))return null;const _0x48a007=readFileSync(cookieFile,_0x20f6da(0x1c8)),_0x255bdd=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x48a007}});if(!_0x255bdd['ok'])return null;const _0xcd8628=await _0x255bdd[_0x20f6da(0x1c4)]();if(!_0xcd8628[_0x20f6da(0x1c6)]||!_0xcd8628[_0x20f6da(0x1c5)])return null;return _0xcd8628;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14769d,_0x518dba){const _0x111600=a8_0x7885,_0x150d9f=_0x14769d();while(!![]){try{const _0xe81f78=parseInt(_0x111600(0x1e0))/0x1+parseInt(_0x111600(0x1df))/0x2*(parseInt(_0x111600(0x1e3))/0x3)+parseInt(_0x111600(0x1e5))/0x4+parseInt(_0x111600(0x1e6))/0x5+parseInt(_0x111600(0x1e8))/0x6*(parseInt(_0x111600(0x1eb))/0x7)+-parseInt(_0x111600(0x1e2))/0x8+-parseInt(_0x111600(0x1e4))/0x9;if(_0xe81f78===_0x518dba)break;else _0x150d9f['push'](_0x150d9f['shift']());}catch(_0x3e470d){_0x150d9f['push'](_0x150d9f['shift']());}}}(a8_0x4b2f,0xa3d94));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a8_0x7885(_0x4809c9,_0x3d41b9){_0x4809c9=_0x4809c9-0x1df;const _0x4b2f30=a8_0x4b2f();let _0x78854a=_0x4b2f30[_0x4809c9];return _0x78854a;}export async function getIsSessionValid(){const _0x290e16=a8_0x7885;try{if(!existsSync(cookieFile))return![];const _0x553f0d=readFileSync(cookieFile,_0x290e16(0x1e7)),_0x45902e=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x553f0d}})['then'](_0x6964db=>_0x6964db[_0x290e16(0x1ea)]());return _0x45902e&&_0x45902e[_0x290e16(0x1e1)]&&_0x45902e[_0x290e16(0x1e9)];}catch{}return![];}function a8_0x4b2f(){const _0x55bc04=['141926AhxMIK','session','8471216VAPKsx','732Hkjbca','6965937VzDspS','1654760mwQYin','2080285bAbubn','utf-8','228DnHWON','user','json','150983JbPctK','5842tEoXkl'];a8_0x4b2f=function(){return _0x55bc04;};return a8_0x4b2f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x5ccb2a,_0xa31f0d){const _0xa8a07e=a9_0x5d18,_0x1059a5=_0x5ccb2a();while(!![]){try{const _0x116387=-parseInt(_0xa8a07e(0xf5))/0x1+-parseInt(_0xa8a07e(0xec))/0x2+-parseInt(_0xa8a07e(0xef))/0x3+parseInt(_0xa8a07e(0xf3))/0x4*(parseInt(_0xa8a07e(0xf0))/0x5)+parseInt(_0xa8a07e(0xf4))/0x6*(-parseInt(_0xa8a07e(0xf1))/0x7)+parseInt(_0xa8a07e(0xf7))/0x8*(-parseInt(_0xa8a07e(0xf8))/0x9)+parseInt(_0xa8a07e(0xee))/0xa;if(_0x116387===_0xa31f0d)break;else _0x1059a5['push'](_0x1059a5['shift']());}catch(_0x2cdf14){_0x1059a5['push'](_0x1059a5['shift']());}}}(a9_0x3bd2,0x7871c));function a9_0x3bd2(){const _0x3150f1=['725579FZKejq','<!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>','11816WXiIse','4383pMyKNB','1380606gPTmOu','</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>','31920110pJzaGj','762489AxFYpU','15lSDtXm','63xwLkbL','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','492628tcLSCy','452532NqQJLq'];a9_0x3bd2=function(){return _0x3150f1;};return a9_0x3bd2();}function a9_0x5d18(_0x448449,_0x1b304d){_0x448449=_0x448449-0xec;const _0x3bd2ad=a9_0x3bd2();let _0x5d1857=_0x3bd2ad[_0x448449];return _0x5d1857;}export function buildLoginSuccessHtml(){const _0x440606=a9_0x5d18,_0x433118=_0x440606(0xf2);return _0x440606(0xf6)+_0x433118+_0x440606(0xed);}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d250c,_0x2f1b63){var _0x5781c9=a10_0x1fdd,_0x21dd36=_0x1d250c();while(!![]){try{var _0x4ee681=parseInt(_0x5781c9(0x11f))/0x1+-parseInt(_0x5781c9(0x127))/0x2*(parseInt(_0x5781c9(0x123))/0x3)+parseInt(_0x5781c9(0x129))/0x4+-parseInt(_0x5781c9(0x120))/0x5*(-parseInt(_0x5781c9(0x124))/0x6)+-parseInt(_0x5781c9(0x122))/0x7*(parseInt(_0x5781c9(0x11e))/0x8)+parseInt(_0x5781c9(0x128))/0x9+-parseInt(_0x5781c9(0x126))/0xa;if(_0x4ee681===_0x2f1b63)break;else _0x21dd36['push'](_0x21dd36['shift']());}catch(_0x539c78){_0x21dd36['push'](_0x21dd36['shift']());}}}(a10_0xd874,0x66eb3));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';function a10_0x1fdd(_0x5c5ad7,_0x4bcf80){_0x5c5ad7=_0x5c5ad7-0x11d;var _0xd87418=a10_0xd874();var _0x1fddcd=_0xd87418[_0x5c5ad7];return _0x1fddcd;}export function logout(){var _0x1dffd8=a10_0x1fdd;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x1dffd8(0x121)](_0x1dffd8(0x125))):console[_0x1dffd8(0x121)](_0x1dffd8(0x11d));}function a10_0xd874(){var _0x2615a3=['320084VFyfAe','!\x20Not\x20logged\x20in','303448SPrdDU','614516KtBvOb','5qlbiBb','log','70oPojzo','3TSogMk','3767352oAFZZJ','✓\x20Logged\x20out','8376740rQddNI','503320fKbCXZ','5109930ASeokN'];a10_0xd874=function(){return _0x2615a3;};return a10_0xd874();}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a11_0x55a194=a11_0x45fe;(function(_0x3ed582,_0x38b3a0){const _0x5aa686=a11_0x45fe,_0x5d9d83=_0x3ed582();while(!![]){try{const _0x17b856=parseInt(_0x5aa686(0xa9))/0x1+parseInt(_0x5aa686(0xa2))/0x2+parseInt(_0x5aa686(0xac))/0x3*(parseInt(_0x5aa686(0xaa))/0x4)+parseInt(_0x5aa686(0xae))/0x5*(-parseInt(_0x5aa686(0xa3))/0x6)+parseInt(_0x5aa686(0xa7))/0x7*(parseInt(_0x5aa686(0xa4))/0x8)+parseInt(_0x5aa686(0xa6))/0x9*(parseInt(_0x5aa686(0xab))/0xa)+-parseInt(_0x5aa686(0xa8))/0xb*(parseInt(_0x5aa686(0xa5))/0xc);if(_0x17b856===_0x38b3a0)break;else _0x5d9d83['push'](_0x5d9d83['shift']());}catch(_0x6098f3){_0x5d9d83['push'](_0x5d9d83['shift']());}}}(a11_0x57be,0x78de3));function a11_0x45fe(_0x3d261f,_0xce5b8b){_0x3d261f=_0x3d261f-0xa2;const _0x57beb7=a11_0x57be();let _0x45fefd=_0x57beb7[_0x3d261f];return _0x45fefd;}function a11_0x57be(){const _0x4ac5db=['255813zHVQRx','123108tsZxif','10NMmGEl','36wXkFrz','boolean','135715XbUMEa','1825564tnlWpB','90AfFSQr','104WeiYHl','2596584bjzyjN','5891706KHLGdy','120799qBbffm','77GPuYoj'];a11_0x57be=function(){return _0x4ac5db;};return a11_0x57be();}export const dynamicCliFlags={'enableBffSave':{'type':a11_0x55a194(0xad)}};
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a12_0xfd8b7=a12_0x38c8;(function(_0x511acf,_0x5aa902){const _0xc8d889=a12_0x38c8,_0x153599=_0x511acf();while(!![]){try{const _0x44b56d=parseInt(_0xc8d889(0x1aa))/0x1+-parseInt(_0xc8d889(0x1c3))/0x2*(parseInt(_0xc8d889(0x1af))/0x3)+-parseInt(_0xc8d889(0x1c9))/0x4*(-parseInt(_0xc8d889(0x1a6))/0x5)+parseInt(_0xc8d889(0x19e))/0x6+-parseInt(_0xc8d889(0x1c6))/0x7+-parseInt(_0xc8d889(0x1b9))/0x8*(parseInt(_0xc8d889(0x1ad))/0x9)+parseInt(_0xc8d889(0x1b5))/0xa;if(_0x44b56d===_0x5aa902)break;else _0x153599['push'](_0x153599['shift']());}catch(_0x5bd2de){_0x153599['push'](_0x153599['shift']());}}}(a12_0x4acb,0x9b828));import a12_0x33719c from'meow';import{showHelp}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{isKnownService,getServiceEntry,findDefinition,deprecatedAliases,resolveDeprecatedSubcommand}from'./commands/registry.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{CLI_BIN_NAME,buildMeowFlags}from'./constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'./generated/build-info.js';import{reportCliHelpTrace}from'./telemetry/cli-help-trace.js';import{reportCommandTrace}from'./telemetry/cli-command-trace.js';function a12_0x4acb(){const _0x53622b=['unknown_service','unknown','flags','\x0aCancelled.\x0a','17270990kmXcFo','input','`\x20in\x20v2.0.\x0a','userDomain','1344760VWxHSI','⚠\x20`','slice','\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a','dynamicCliFlags','log','defaultCommand','./constant/env.js','`\x20in\x20new\x20scripts.\x0a','name','1112lpjZeG','error','`;\x20prefer\x20`','4830546pYcBOl','help','runtimeDomain','4TMowTx','2094846lkTtOR','cancelled','env','code','message','wildcardDef','Unexpected\x20error:','Hint:\x20','401735WqumJa','apiDomain','write','exitCode','806570cDrInE','now','global','45gicihf','stderr','4293jsXCmE','raw'];a12_0x4acb=function(){return _0x53622b;};return a12_0x4acb();}import{registerOtelShutdownOnExit,exitWithOtelShutdown}from'./telemetry/register-otel-exit-shutdown.js';let dynamicCliFlags=null;function a12_0x38c8(_0xad81b9,_0x44b68c){_0xad81b9=_0xad81b9-0x19e;const _0x4acb0c=a12_0x4acb();let _0x38c8c7=_0x4acb0c[_0xad81b9];return _0x38c8c7;}try{dynamicCliFlags=(await import('./cli-flags.js'))[a12_0xfd8b7(0x1bd)];}catch{}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!==a12_0xfd8b7(0x1b2)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[a12_0xfd8b7(0x1bb)](0x0,0xa)+')':VERSION,cli=a12_0x33719c(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0x3c33bf=a12_0xfd8b7;let _0x4e7116=cli[_0x3c33bf(0x1b6)][0x0],_0x15b8ae=cli[_0x3c33bf(0x1b6)][0x1];const _0x5d4c86=cli[_0x3c33bf(0x1b3)];if(!_0x4e7116){await reportCliHelpTrace(_0x3c33bf(0x1ac)),showHelp();return;}const _0x206a6d=deprecatedAliases[_0x4e7116];if(_0x206a6d&&!isKnownService(_0x4e7116)){const _0x4daf18=_0x15b8ae?CLI_BIN_NAME+'\x20'+_0x4e7116+'\x20'+_0x15b8ae:CLI_BIN_NAME+'\x20'+_0x4e7116,_0x22b578=CLI_BIN_NAME+'\x20'+_0x206a6d['service']+'\x20'+_0x206a6d['command'];console[_0x3c33bf(0x1c4)]('⚠\x20`'+_0x4daf18+'`\x20has\x20been\x20moved\x20to\x20`'+_0x22b578+_0x3c33bf(0x1b7)+_0x3c33bf(0x1bc)),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x4e7116)){await reportCliHelpTrace(_0x3c33bf(0x1b1),{'service':_0x4e7116}),showHelp();return;}const _0x5dc676=getServiceEntry(_0x4e7116);if(_0x5d4c86[_0x3c33bf(0x1a0)]&&typeof _0x5d4c86['env']==='string'){const {initEnv:_0x294950}=await import(_0x3c33bf(0x1c0));_0x294950(_0x5d4c86[_0x3c33bf(0x1a0)]);}const {buildConfigFromFlags:_0x29ab08}=await import('./context.js'),_0x2adfd2=_0x29ab08(_0x5d4c86);if(!_0x5d4c86[_0x3c33bf(0x1a0)]&&_0x2adfd2[_0x3c33bf(0x1a0)]){const {initEnv:_0x570f6b}=await import(_0x3c33bf(0x1c0));_0x570f6b(_0x2adfd2['env']);}if(_0x2adfd2['raw']?.[_0x3c33bf(0x1a7)]||_0x2adfd2[_0x3c33bf(0x1b0)]?.[_0x3c33bf(0x1b8)]||_0x2adfd2[_0x3c33bf(0x1b0)]?.[_0x3c33bf(0x1c8)]){const {initDomains:_0x3c29f3}=await import('./constant/domain.js');_0x3c29f3({'apiDomain':_0x2adfd2[_0x3c33bf(0x1b0)][_0x3c33bf(0x1a7)]||undefined,'userDomain':_0x2adfd2['raw']['userDomain']||undefined,'runtimeDomain':_0x2adfd2[_0x3c33bf(0x1b0)][_0x3c33bf(0x1c8)]||undefined});}if(!_0x15b8ae){if(_0x5d4c86['help']){printServiceHelp(_0x4e7116);return;}if(_0x5dc676[_0x3c33bf(0x1bf)])_0x15b8ae=_0x5dc676[_0x3c33bf(0x1bf)];else{if(_0x5dc676[_0x3c33bf(0x1a3)]){await dispatchDeclarative(_0x5dc676[_0x3c33bf(0x1a3)],_0x4e7116,'',[],_0x5d4c86,_0x2adfd2);return;}else{printServiceHelp(_0x4e7116);return;}}}const _0x88ae04=resolveDeprecatedSubcommand(_0x4e7116,_0x15b8ae);if(_0x88ae04){const _0x53a721=CLI_BIN_NAME+'\x20'+_0x4e7116+'\x20'+_0x15b8ae,_0x462ec9=CLI_BIN_NAME+'\x20'+_0x4e7116+'\x20'+_0x88ae04;console[_0x3c33bf(0x1c4)](_0x3c33bf(0x1ba)+_0x53a721+'`\x20is\x20an\x20alias\x20of\x20`'+_0x462ec9+_0x3c33bf(0x1c5)+_0x462ec9+_0x3c33bf(0x1c1)),_0x15b8ae=_0x88ae04;}if(_0x5d4c86['help']&&!findDefinition(_0x4e7116,_0x15b8ae)){printServiceHelp(_0x4e7116);return;}{let _0x517050=findDefinition(_0x4e7116,_0x15b8ae),_0x1d7460=cli['input'][_0x3c33bf(0x1bb)](0x2);if(!_0x517050){if(_0x5dc676[_0x3c33bf(0x1a3)]){if(_0x5d4c86['help']){console[_0x3c33bf(0x1be)](generateCommandHelp(_0x5dc676['wildcardDef']));return;}_0x517050=_0x5dc676['wildcardDef'],_0x1d7460=[_0x15b8ae,...cli[_0x3c33bf(0x1b6)][_0x3c33bf(0x1bb)](0x2)];}else{printServiceHelp(_0x4e7116),await handleErrorAsync(CliErrors['unknownCommand'](_0x4e7116+'\x20'+_0x15b8ae));return;}}if(_0x5d4c86[_0x3c33bf(0x1c7)]){console[_0x3c33bf(0x1be)](generateCommandHelp(_0x517050));return;}await dispatchDeclarative(_0x517050,_0x4e7116,_0x15b8ae,_0x1d7460,_0x5d4c86,_0x2adfd2);}}async function dispatchDeclarative(_0x5f199c,_0x31e20c,_0x520551,_0x233ff4,_0x11f457,_0x2e062c){const _0x4d34f0=a12_0xfd8b7,_0x34d109=Date[_0x4d34f0(0x1ab)]();let _0x4973bb;try{await runCommand(_0x5f199c,createPipelineEnv(_0x2e062c,_0x11f457,_0x233ff4));}catch(_0x3ec178){_0x4973bb=_0x3ec178;}await reportCommandTrace({'service':_0x31e20c,'command':_0x520551,'flags':_0x11f457,'durationMs':Date[_0x4d34f0(0x1ab)]()-_0x34d109,'error':_0x4973bb});if(_0x4973bb)await handleErrorAsync(_0x4973bb);}function printServiceHelp(_0x473020){console['log'](generateServiceHelp(_0x473020));}async function handleErrorAsync(_0x45af37){const _0x26e1f7=a12_0xfd8b7;if(_0x45af37 instanceof Error&&_0x45af37[_0x26e1f7(0x1c2)]==='ExitPromptError')return process[_0x26e1f7(0x1ae)]['write'](_0x26e1f7(0x1b4)),await exitWithOtelShutdown(0x0);if(_0x45af37 instanceof CliError){if(_0x45af37[_0x26e1f7(0x1a1)]===_0x26e1f7(0x19f))return process[_0x26e1f7(0x1ae)][_0x26e1f7(0x1a8)]('\x0a'+_0x45af37[_0x26e1f7(0x1a2)]+'\x0a'),await exitWithOtelShutdown(0x0);console[_0x26e1f7(0x1c4)]('Error:\x20'+_0x45af37[_0x26e1f7(0x1a2)]);if(_0x45af37['hint'])console[_0x26e1f7(0x1c4)](_0x26e1f7(0x1a5)+_0x45af37['hint']);return await exitWithOtelShutdown(_0x45af37[_0x26e1f7(0x1a9)]);}return console['error'](_0x26e1f7(0x1a4),_0x45af37),await exitWithOtelShutdown(0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a13_0x5697(_0x3422bd,_0x2ac7b5){_0x3422bd=_0x3422bd-0xab;const _0x51ccb8=a13_0x51cc();let _0x56973f=_0x51ccb8[_0x3422bd];return _0x56973f;}const a13_0x2ffde5=a13_0x5697;(function(_0x5c9fb4,_0x2b6e92){const _0x2200b8=a13_0x5697,_0x1a4bab=_0x5c9fb4();while(!![]){try{const _0x3ca62d=parseInt(_0x2200b8(0xcb))/0x1+parseInt(_0x2200b8(0xb6))/0x2+parseInt(_0x2200b8(0xb2))/0x3*(-parseInt(_0x2200b8(0xbb))/0x4)+-parseInt(_0x2200b8(0xe0))/0x5+-parseInt(_0x2200b8(0xe9))/0x6*(-parseInt(_0x2200b8(0xaf))/0x7)+-parseInt(_0x2200b8(0xbe))/0x8*(-parseInt(_0x2200b8(0xce))/0x9)+-parseInt(_0x2200b8(0xb4))/0xa*(parseInt(_0x2200b8(0xc0))/0xb);if(_0x3ca62d===_0x2b6e92)break;else _0x1a4bab['push'](_0x1a4bab['shift']());}catch(_0x325e5d){_0x1a4bab['push'](_0x1a4bab['shift']());}}}(a13_0x51cc,0xc381c));function a13_0x51cc(){const _0x5509b7=['--datasetcode\x20cannot\x20be\x20empty.','\x20doc(s)\x20in\x20','Doc\x20generation\x20complete:\x20','error','.md','!\x20No\x20datasets\x20found.','validation','Failed\x20to\x20fetch\x20datasets','3029505WQKCGb','success','parse','split','string','Output\x20directory\x20(default:\x20./docs)','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','\x20doc(s)\x20failed','\x1b[0m','12MKYNBJ','some','filter','\x20dataset(s)\x1b[0m','length','1489355lmkEvt','generate','datasetcode','18HjihWN','appCode','1338630GCkdRa','has','2992500ehyTGn','✓\x20Generated\x20','join','Fetching\x20dataset\x20list\x20for\x20','succeed','199712YKCmQp','message','\x1b[90m*\x20Generating\x20docs\x20for:\x20','40yPVSFa','isArray','99RWVINE','padStart','Doc\x20generation:\x20','cookie','trim','write','None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20','\x20file(s)','\x20dataset(s)','\x20\x20•\x20','\x20succeeded,\x20','677517cQnrSR','\x20failed','start','561123oRdQCP','object','Fetched\x20','):\x20','must\x20be\x20a\x20JSON\x20object','datasetCode','str','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','params','./docs'];a13_0x51cc=function(){return _0x5509b7;};return a13_0x51cc();}import a13_0x50f285 from'ora';import{fetchModelList}from'../../api/fetch-model-list.js';import{generateDatasetDocs}from'../../api/api-doc.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export const apiGenerate={'service':'api','command':a13_0x2ffde5(0xb0),'description':'Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','risk':a13_0x2ffde5(0xc5),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':'output','type':a13_0x2ffde5(0xe4),'description':a13_0x2ffde5(0xe5)},{'name':a13_0x2ffde5(0xb1),'type':a13_0x2ffde5(0xe4),'description':a13_0x2ffde5(0xe6)},{'name':a13_0x2ffde5(0xd6),'type':a13_0x2ffde5(0xe4),'description':'Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)'}],async 'execute'(_0x2a41a1){const _0x5a3f2d=a13_0x2ffde5,_0x500e65=_0x2a41a1[_0x5a3f2d(0xd4)]('output')||_0x5a3f2d(0xd7),_0x176114=_0x2a41a1['str'](_0x5a3f2d(0xb1)),_0x296448=_0x2a41a1[_0x5a3f2d(0xd4)](_0x5a3f2d(0xd6));let _0x11c2aa;if(_0x296448)try{_0x11c2aa=JSON[_0x5a3f2d(0xe2)](_0x296448);if(typeof _0x11c2aa!==_0x5a3f2d(0xcf)||_0x11c2aa===null||Array[_0x5a3f2d(0xbf)](_0x11c2aa))throw new Error(_0x5a3f2d(0xd2));}catch(_0x48631c){throw CliErrors[_0x5a3f2d(0xde)]('Invalid\x20--params:\x20'+(_0x48631c instanceof Error?_0x48631c[_0x5a3f2d(0xbc)]:String(_0x48631c)),'Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27');}let _0x4f6c8a;if(_0x176114){const _0x56d955=_0x176114[_0x5a3f2d(0xe3)](',')['map'](_0x1fb260=>_0x1fb260[_0x5a3f2d(0xc4)]())[_0x5a3f2d(0xac)](_0x2a1a48=>_0x2a1a48['length']>0x0);if(_0x56d955[_0x5a3f2d(0xae)]===0x0)throw CliErrors[_0x5a3f2d(0xde)](_0x5a3f2d(0xd8));_0x4f6c8a=new Set(_0x56d955),writeCliSideChannelLine(_0x5a3f2d(0xbd)+_0x56d955['join'](',\x20')+'\x1b[0m');}const _0x2c5903=a13_0x50f285(_0x5a3f2d(0xb9)+_0x2a41a1[_0x5a3f2d(0xb3)]+'...')[_0x5a3f2d(0xcd)]();let _0x18391d;try{({configArray:_0x18391d}=await fetchModelList(_0x2a41a1[_0x5a3f2d(0xb3)],_0x2a41a1[_0x5a3f2d(0xc3)]),_0x2c5903[_0x5a3f2d(0xba)](_0x5a3f2d(0xd0)+_0x18391d[_0x5a3f2d(0xae)]+_0x5a3f2d(0xc8)));}catch(_0x2f7af1){_0x2c5903['fail'](_0x5a3f2d(0xdf));throw _0x2f7af1;}if(_0x18391d[_0x5a3f2d(0xae)]===0x0)return writeCliSideChannelLine(_0x5a3f2d(0xdd)),{'ok':!![]};let _0x2a9087=_0x18391d;if(_0x4f6c8a){_0x2a9087=_0x18391d['filter'](_0x3e017a=>_0x4f6c8a[_0x5a3f2d(0xb5)](_0x3e017a[_0x5a3f2d(0xd3)]));const _0x117f88=[..._0x4f6c8a][_0x5a3f2d(0xac)](_0x55cbe9=>!_0x18391d[_0x5a3f2d(0xab)](_0xca6d41=>_0xca6d41['datasetCode']===_0x55cbe9));_0x117f88['length']>0x0&&writeCliSideChannelLine(_0x5a3f2d(0xd5)+_0x117f88[_0x5a3f2d(0xb8)](',\x20')+_0x5a3f2d(0xe8));if(_0x2a9087[_0x5a3f2d(0xae)]===0x0)throw CliErrors[_0x5a3f2d(0xde)](_0x5a3f2d(0xc6)+[..._0x4f6c8a][_0x5a3f2d(0xb8)](',\x20'));writeCliSideChannelLine('\x1b[90m*\x20Filtered\x20'+_0x2a9087['length']+'\x20of\x20'+_0x18391d['length']+_0x5a3f2d(0xad));}let _0x4963bb=0x0;const _0x526f75=await generateDatasetDocs(_0x2a9087,_0x2a41a1[_0x5a3f2d(0xb3)],_0x2a41a1[_0x5a3f2d(0xc3)],_0x500e65,(_0x118f7e,_0x50be56,_0x3338fb)=>{const _0x9843ab=_0x5a3f2d;_0x4963bb=_0x118f7e,process['stdout'][_0x9843ab(0xc5)]('\x0d\x20\x20['+String(_0x118f7e)[_0x9843ab(0xc1)](String(_0x50be56)[_0x9843ab(0xae)])+'/'+_0x50be56+']\x20'+_0x3338fb+_0x9843ab(0xdc));},_0x11c2aa);if(_0x4963bb>0x0)process['stdout'][_0x5a3f2d(0xc5)]('\x0a');const _0x1dd760=_0x526f75[_0x5a3f2d(0xac)](_0x5c025d=>_0x5c025d[_0x5a3f2d(0xe1)])[_0x5a3f2d(0xae)],_0x207bf7=_0x526f75[_0x5a3f2d(0xac)](_0x461c21=>!_0x461c21[_0x5a3f2d(0xe1)])[_0x5a3f2d(0xae)];writeCliSideChannelLine(''),writeCliSideChannelLine(_0x5a3f2d(0xb7)+_0x1dd760+_0x5a3f2d(0xd9)+_0x500e65);if(_0x207bf7>0x0){writeCliSideChannelLine('!\x20'+_0x207bf7+_0x5a3f2d(0xe7));for(const _0x42e7eb of _0x526f75[_0x5a3f2d(0xac)](_0x281b86=>!_0x281b86['success'])){writeCliSideChannelLine(_0x5a3f2d(0xc9)+_0x42e7eb['datasetName']+'\x20('+_0x42e7eb[_0x5a3f2d(0xd3)]+_0x5a3f2d(0xd1)+_0x42e7eb[_0x5a3f2d(0xdb)]);}}return{'ok':_0x207bf7===0x0,'message':_0x207bf7>0x0?_0x5a3f2d(0xc2)+_0x1dd760+_0x5a3f2d(0xca)+_0x207bf7+_0x5a3f2d(0xcc):_0x5a3f2d(0xda)+_0x1dd760+_0x5a3f2d(0xc7)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a14_0x316a(_0x389003,_0x32a040){_0x389003=_0x389003-0x15a;const _0x59022a=a14_0x5902();let _0x316aae=_0x59022a[_0x389003];return _0x316aae;}(function(_0x17e0d0,_0x17acf9){const _0x41528a=a14_0x316a,_0x5a65c2=_0x17e0d0();while(!![]){try{const _0x5d27a7=-parseInt(_0x41528a(0x15d))/0x1*(-parseInt(_0x41528a(0x162))/0x2)+parseInt(_0x41528a(0x15b))/0x3+-parseInt(_0x41528a(0x160))/0x4+-parseInt(_0x41528a(0x15c))/0x5*(-parseInt(_0x41528a(0x15a))/0x6)+-parseInt(_0x41528a(0x161))/0x7*(parseInt(_0x41528a(0x163))/0x8)+parseInt(_0x41528a(0x15f))/0x9+parseInt(_0x41528a(0x15e))/0xa;if(_0x5d27a7===_0x17acf9)break;else _0x5a65c2['push'](_0x5a65c2['shift']());}catch(_0x5b987f){_0x5a65c2['push'](_0x5a65c2['shift']());}}}(a14_0x5902,0x6c465));function a14_0x5902(){const _0x40125e=['3497096DJcRdK','396312gCqSau','824054VIxxuk','48EGZlam','32580sCePJN','788415SHsplu','90ExmsSU','2jNuisq','2172450znWubn','2300571WaNJnW'];a14_0x5902=function(){return _0x40125e;};return a14_0x5902();}import{apiList}from'../../commands/api/list.js';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
|
-
const
|
|
1
|
+
const a15_0x3a1b59=a15_0x27aa;function a15_0x3bac(){const _0x41e530=['List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','boolean','10212ExnyrB','map','api','production','2569315fsrZyU','rawFlags','list','name','859104YZUdCP','global','push','cookie','appCode','803252iiSDhR','isDefault','read','15RcXFTX','appcode','10lxNjEK','952278HfhBhE','212tlmVJE','2182896CITJUd','7573968SlNOBA'];a15_0x3bac=function(){return _0x41e530;};return a15_0x3bac();}(function(_0x638c17,_0x5284df){const _0xe19a05=a15_0x27aa,_0x30bd2f=_0x638c17();while(!![]){try{const _0x4d8fa3=parseInt(_0xe19a05(0x161))/0x1+parseInt(_0xe19a05(0x168))/0x2*(-parseInt(_0xe19a05(0x16d))/0x3)+parseInt(_0xe19a05(0x15c))/0x4*(parseInt(_0xe19a05(0x164))/0x5)+parseInt(_0xe19a05(0x167))/0x6+parseInt(_0xe19a05(0x171))/0x7+-parseInt(_0xe19a05(0x169))/0x8+parseInt(_0xe19a05(0x16a))/0x9*(-parseInt(_0xe19a05(0x166))/0xa);if(_0x4d8fa3===_0x5284df)break;else _0x30bd2f['push'](_0x30bd2f['shift']());}catch(_0x4f46bd){_0x30bd2f['push'](_0x30bd2f['shift']());}}}(a15_0x3bac,0x799b4));import{initEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a15_0x27aa(_0x101900,_0x409090){_0x101900=_0x101900-0x15b;const _0x3bac66=a15_0x3bac();let _0x27aa37=_0x3bac66[_0x101900];return _0x27aa37;}import{resolveTargetApps}from'../../commands/api/shared.js';export const apiList={'service':a15_0x3a1b59(0x16f),'command':a15_0x3a1b59(0x173),'description':a15_0x3a1b59(0x16b),'risk':a15_0x3a1b59(0x163),'requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0x3a1b59(0x15d),'type':a15_0x3a1b59(0x16c),'description':'Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','default':![]}],async 'execute'(_0x5d2c32){const _0x3e2f3a=a15_0x3a1b59,_0x4bce42=_0x5d2c32[_0x3e2f3a(0x172)][_0x3e2f3a(0x165)]?String(_0x5d2c32[_0x3e2f3a(0x172)][_0x3e2f3a(0x165)]):undefined,_0x377914=resolveTargetApps(_0x5d2c32,_0x4bce42);if(_0x377914){const _0x488b41=[];for(const _0x5804f8 of _0x377914){const _0x5db699=_0x5804f8[_0x3e2f3a(0x15f)]||_0x5d2c32[_0x3e2f3a(0x15f)],_0x4dcddc=_0x5804f8['env']||_0x3e2f3a(0x170);initEnv(_0x4dcddc);const {configArray:_0x4ae215}=await fetchModelList(_0x5804f8['appcode'],_0x5db699);_0x488b41[_0x3e2f3a(0x15e)](..._0x4ae215[_0x3e2f3a(0x16e)](_0x4a0c70=>({..._0x4a0c70,'_appName':_0x5804f8[_0x3e2f3a(0x15b)],'_appCode':_0x5804f8[_0x3e2f3a(0x165)],'_env':_0x4dcddc,'_isDefault':_0x5804f8[_0x3e2f3a(0x162)]})));}return{'ok':!![],'data':_0x488b41};}const {configArray:_0x112040}=await fetchModelList(_0x5d2c32[_0x3e2f3a(0x160)],_0x5d2c32[_0x3e2f3a(0x15f)]);return{'ok':!![],'data':_0x112040};}};
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x422926=a16_0x19b9;(function(_0x526fb9,_0x2d20f8){const _0x1f3249=a16_0x19b9,_0x339815=_0x526fb9();while(!![]){try{const _0x562fd6=parseInt(_0x1f3249(0x161))/0x1*(-parseInt(_0x1f3249(0x17f))/0x2)+parseInt(_0x1f3249(0x179))/0x3+parseInt(_0x1f3249(0x176))/0x4+-parseInt(_0x1f3249(0x17d))/0x5+parseInt(_0x1f3249(0x159))/0x6+parseInt(_0x1f3249(0x175))/0x7+parseInt(_0x1f3249(0x16b))/0x8*(-parseInt(_0x1f3249(0x15e))/0x9);if(_0x562fd6===_0x2d20f8)break;else _0x339815['push'](_0x339815['shift']());}catch(_0x4cd16a){_0x339815['push'](_0x339815['shift']());}}}(a16_0x361d,0x92ac7));function a16_0x19b9(_0x4a3387,_0x1045df){_0x4a3387=_0x4a3387-0x151;const _0x361dc0=a16_0x361d();let _0x19b931=_0x361dc0[_0x4a3387];return _0x19b931;}import a16_0x3c4018 from'ora';import a16_0x2a569f from'node:path';function a16_0x361d(){const _0x1e00a6=['Pulling\x20','boolean','apiFilePath','appcode','clientFilePath','write','\x20failed','556962JcsfbI','4097504zRYFHw','fail','name','1856493ZKFkei','cookie','\x20dataset(s)\x20→\x20','Failed:\x20','5152430DsjwnG','Output\x20directory\x20(default:\x20','2VhiYaW','Pulled\x20','modelCount','message','api','apiDir',')...','length','env','Pulling\x20API\x20config\x20for\x20','succeed','\x20dataset(s),\x20generated\x20','6613614tRHEsp','pull','start','split','appCode','10593NgpszK','Done:\x20','\x20\x20•\x20','342810awTqrp','global','includes','...','client','isDefault','join','\x20succeeded,\x20','\x20model(s)','slice','5784dJeuxu','production','rawFlags'];a16_0x361d=function(){return _0x1e00a6;};return a16_0x361d();}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_0x422926(0x151),'command':a16_0x422926(0x15a),'description':'Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20('+DEFAULT_API_DIR+'/)','risk':a16_0x422926(0x173),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':'output','type':'string','description':a16_0x422926(0x17e)+DEFAULT_API_DIR+'/)'},{'name':a16_0x422926(0x162),'type':a16_0x422926(0x16f),'description':'Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','default':![]}],async 'execute'(_0x219eb7){const _0x3324e1=a16_0x422926,_0x593ffc=_0x219eb7['rawFlags']['appcode']?String(_0x219eb7[_0x3324e1(0x16d)][_0x3324e1(0x171)]):undefined,_0xfa0e34=_0x219eb7['str']('output')||undefined,_0x2ec5c3=resolveTargetApps(_0x219eb7,_0x593ffc);if(_0x2ec5c3){let _0x14ce44=0x0,_0x53211f=0x0;for(const _0x5949c5 of _0x2ec5c3){const _0x297981=_0x5949c5[_0x3324e1(0x17a)]||_0x219eb7['cookie'],_0x4c32f2=_0x5949c5[_0x3324e1(0x155)]||_0x3324e1(0x16c);initEnv(_0x4c32f2);const _0x1bc18e=_0x5949c5['apiDir']||_0xfa0e34||_0x219eb7[_0x3324e1(0x152)]||DEFAULT_API_DIR,_0x2a323a=_0x5949c5['isDefault']?'':_0x5949c5[_0x3324e1(0x178)]||_0x5949c5[_0x3324e1(0x171)],_0x514c2b=a16_0x3c4018(_0x3324e1(0x16e)+_0x5949c5['name']+'\x20('+_0x5949c5['appcode']+_0x3324e1(0x153))[_0x3324e1(0x15b)]();try{const {configArray:_0x337caa}=await fetchModelList(_0x5949c5[_0x3324e1(0x171)],_0x297981),_0x5b7456=await generateApiFile(_0x337caa,_0x2a323a,_0x5949c5[_0x3324e1(0x171)],_0x5949c5[_0x3324e1(0x166)],_0x4c32f2,_0x1bc18e,_0x5949c5[_0x3324e1(0x178)]);_0x514c2b['succeed'](_0x5949c5[_0x3324e1(0x178)]+':\x20'+_0x337caa[_0x3324e1(0x154)]+_0x3324e1(0x17b)+_0x5b7456[_0x3324e1(0x181)]+_0x3324e1(0x169)),writeCliSideChannelLine(_0x3324e1(0x160)+_0x5b7456[_0x3324e1(0x170)]),writeCliSideChannelLine(_0x3324e1(0x160)+_0x5b7456[_0x3324e1(0x172)]),_0x14ce44++;}catch(_0x5f39dc){_0x514c2b[_0x3324e1(0x177)](_0x5949c5['name']+':\x20'+(_0x5f39dc instanceof Error?_0x5f39dc['message']:String(_0x5f39dc))),_0x53211f++;}}writeCliSideChannelLine('');if(_0x53211f>0x0)writeCliSideChannelLine('!\x20'+_0x53211f+'\x20app(s)\x20failed');return{'ok':_0x53211f===0x0,'message':_0x3324e1(0x15f)+_0x14ce44+_0x3324e1(0x168)+_0x53211f+_0x3324e1(0x174)};}const _0x1b78cc=_0x593ffc&&_0x593ffc[_0x3324e1(0x163)]('-')?_0x593ffc[_0x3324e1(0x15c)]('-')[_0x3324e1(0x16a)](0x1)[_0x3324e1(0x167)]('-'):'',_0x3f5fbb=_0xfa0e34||_0x219eb7[_0x3324e1(0x152)]||DEFAULT_API_DIR,_0x288611=!_0x593ffc,_0x5518ff=a16_0x3c4018(_0x3324e1(0x156)+_0x219eb7['appCode']+_0x3324e1(0x164))[_0x3324e1(0x15b)]();try{const {configArray:_0x1ccb19}=await fetchModelList(_0x219eb7['appCode'],_0x219eb7[_0x3324e1(0x17a)]),_0x1b5b75=await generateApiFile(_0x1ccb19,_0x1b78cc,_0x219eb7[_0x3324e1(0x15d)],_0x288611,getEnv(),_0x3f5fbb);_0x5518ff[_0x3324e1(0x157)](_0x3324e1(0x180)+_0x1ccb19[_0x3324e1(0x154)]+_0x3324e1(0x158)+_0x1b5b75[_0x3324e1(0x181)]+_0x3324e1(0x169));const _0x5aeae1=_0x1b78cc?_0x1b78cc+'-api':_0x3324e1(0x151),_0xb707fe=_0x1b78cc?_0x1b78cc+'-client':_0x3324e1(0x165);return writeCliSideChannelLine('\x20\x20•\x20'+a16_0x2a569f[_0x3324e1(0x167)](_0x3f5fbb,_0x5aeae1+'.ts')),writeCliSideChannelLine(_0x3324e1(0x160)+a16_0x2a569f[_0x3324e1(0x167)](_0x3f5fbb,_0xb707fe+'.ts')),{'ok':!![],'data':{'datasetCount':_0x1ccb19[_0x3324e1(0x154)],'modelCount':_0x1b5b75[_0x3324e1(0x181)]}};}catch(_0x493954){_0x5518ff[_0x3324e1(0x177)](_0x3324e1(0x17c)+(_0x493954 instanceof Error?_0x493954[_0x3324e1(0x182)]:String(_0x493954)));throw _0x493954;}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a17_0x1812(_0x1f7873,_0x4184e5){_0x1f7873=_0x1f7873-0x6a;const _0x51f37f=a17_0x51f3();let _0x18128e=_0x51f37f[_0x1f7873];return _0x18128e;}(function(_0x4d170b,_0x47b639){const _0x2c8ce7=a17_0x1812,_0x26ae60=_0x4d170b();while(!![]){try{const _0x3f15a3=-parseInt(_0x2c8ce7(0x73))/0x1*(-parseInt(_0x2c8ce7(0x7b))/0x2)+-parseInt(_0x2c8ce7(0x75))/0x3+-parseInt(_0x2c8ce7(0x79))/0x4*(-parseInt(_0x2c8ce7(0x74))/0x5)+-parseInt(_0x2c8ce7(0x6a))/0x6+parseInt(_0x2c8ce7(0x7d))/0x7+parseInt(_0x2c8ce7(0x6e))/0x8*(parseInt(_0x2c8ce7(0x72))/0x9)+parseInt(_0x2c8ce7(0x7a))/0xa*(-parseInt(_0x2c8ce7(0x78))/0xb);if(_0x3f15a3===_0x47b639)break;else _0x26ae60['push'](_0x26ae60['shift']());}catch(_0x3b3fad){_0x26ae60['push'](_0x26ae60['shift']());}}}(a17_0x51f3,0x4e369));import{getMultiAppConfigs}from'../../utils/config.js';import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x23837e,_0x5af165){const _0x3730c0=a17_0x1812;if(_0x5af165)return null;const _0x561b61=_0x23837e[_0x3730c0(0x7c)]('global')?_0x3730c0(0x71):_0x3730c0(0x6c);let _0x575066=getMultiAppConfigs(_0x561b61);if(!_0x575066||_0x575066[_0x3730c0(0x70)]===0x0)return null;if(_0x23837e['selectedAppName']){const _0x380ac0=_0x575066['filter'](_0xd29e9=>_0xd29e9['name']===_0x23837e[_0x3730c0(0x6b)]);if(_0x380ac0[_0x3730c0(0x70)]===0x0){const _0x1019cc=_0x575066[_0x3730c0(0x6d)](_0x1ce329=>_0x1ce329['name'])[_0x3730c0(0x76)](',\x20');throw CliErrors[_0x3730c0(0x77)](_0x3730c0(0x6f)+_0x23837e[_0x3730c0(0x6b)]+'\x22\x20not\x20found\x20in\x20config.\x20Available:\x20'+_0x1019cc);}_0x575066=_0x380ac0;}return _0x575066;}function a17_0x51f3(){const _0x4b3439=['413850HszJLf','selectedAppName','project','map','43048EGZbsg','App\x20\x22','length','merged','549RMlAsk','157858dWPSIz','10LvmZiT','736023HvsuQe','join','validation','11AyObYV','533708PklRkV','3738530jOtKUl','4JhXQTc','bool','684033BUnpHo'];a17_0x51f3=function(){return _0x4b3439;};return a17_0x51f3();}
|
package/lib/commands/app/add.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a18_0x78c4b3=a18_0x4be2;(function(_0x1ddc8e,_0x4af14c){const _0x5af9ac=a18_0x4be2,_0x4db20e=_0x1ddc8e();while(!![]){try{const _0x151aa8=parseInt(_0x5af9ac(0x91))/0x1*(-parseInt(_0x5af9ac(0x76))/0x2)+parseInt(_0x5af9ac(0x75))/0x3+parseInt(_0x5af9ac(0x8a))/0x4+parseInt(_0x5af9ac(0x78))/0x5+parseInt(_0x5af9ac(0x7b))/0x6*(-parseInt(_0x5af9ac(0x8d))/0x7)+-parseInt(_0x5af9ac(0x92))/0x8*(parseInt(_0x5af9ac(0x80))/0x9)+-parseInt(_0x5af9ac(0x88))/0xa;if(_0x151aa8===_0x4af14c)break;else _0x4db20e['push'](_0x4db20e['shift']());}catch(_0x1c726a){_0x4db20e['push'](_0x4db20e['shift']());}}}(a18_0x381c,0x202a8));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(_0x5c4209){const _0x5de6c3=a18_0x4be2,_0x478ed8=_0x5c4209[_0x5de6c3(0x7c)][0x0]?.[_0x5de6c3(0x8c)]();if(!_0x478ed8)throw CliErrors['validation'](_0x5de6c3(0x7a),_0x5de6c3(0x86)+CLI_BIN_NAME+_0x5de6c3(0x85));}function a18_0x4be2(_0x4a8ffd,_0x582e36){_0x4a8ffd=_0x4a8ffd-0x75;const _0x381c68=a18_0x381c();let _0x4be2a7=_0x381c68[_0x4a8ffd];return _0x4be2a7;}async function execute(_0x41121e){const _0x376184=a18_0x4be2,_0x448b96=_0x41121e[_0x376184(0x7c)][0x0]?.['trim']();if(!_0x448b96)throw CliErrors[_0x376184(0x82)](_0x376184(0x7a),_0x376184(0x86)+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20<code>');const _0xc839cf=_0x41121e[_0x376184(0x96)](_0x376184(0x97));if(!_0xc839cf)throw CliErrors[_0x376184(0x79)](_0x376184(0x97),_0x376184(0x86)+CLI_BIN_NAME+_0x376184(0x85));const _0x32b8a8={'global':_0x41121e[_0x376184(0x81)](_0x376184(0x87))},_0x402dbd=readConfig(_0x32b8a8);if(!_0x402dbd[_0x376184(0x89)])_0x402dbd[_0x376184(0x89)]={};const _0x521f7c={'appcode':_0xc839cf,...collectAppProfileOverrides(_0x49700e=>_0x41121e[_0x376184(0x96)](_0x49700e))},_0x205baa=_0x402dbd[_0x376184(0x89)],_0x10c0a1=!!_0x205baa[_0x448b96];_0x205baa[_0x448b96]=_0x521f7c;if(!_0x402dbd[_0x376184(0x94)])_0x402dbd['defaultApp']=_0x448b96;writeConfig(_0x402dbd,_0x32b8a8);const _0x1ef25d=!_0x10c0a1&&_0x402dbd[_0x376184(0x94)]===_0x448b96?_0x376184(0x95):'',_0x25e0f5=(_0x10c0a1?_0x376184(0x8f):_0x376184(0x90))+_0x376184(0x84)+_0x448b96+_0x376184(0x7e)+_0xc839cf+')'+scopeLabel(_0x32b8a8)+'.'+_0x1ef25d;return{'ok':!![],'message':_0x25e0f5};}export const appAddDefinition={'service':a18_0x78c4b3(0x7d),'command':a18_0x78c4b3(0x7f),'description':'Add\x20or\x20update\x20an\x20app\x20in\x20config','risk':a18_0x78c4b3(0x93),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a18_0x78c4b3(0x8b),'description':'App\x20profile\x20name','required':!![]}],'flags':[{'name':'appcode','type':'string','description':a18_0x78c4b3(0x77),'required':!![]},{'name':'global','type':a18_0x78c4b3(0x8e),'description':a18_0x78c4b3(0x83),'default':![]},...getAppProfileFlagDefs()],'validate':validateArgs,'execute':execute};function a18_0x381c(){const _0x21a346=['global','153690FAjBPT','apps','869704Zegzse','name','trim','7kZhSIg','boolean','Updated','Added','5546JQvuHf','54608Qtvjzy','write','defaultApp','\x20Set\x20as\x20default\x20app.','str','appcode','76851WXryqT','50XzUSmf','App\x20code','782120SNaZtt','flagMissing','Missing\x20app\x20name.','641220AIfsjj','args','app','\x22\x20(appcode:\x20','add','9ofURXh','bool','validation','Use\x20global\x20config\x20scope','\x20app\x20\x22','\x20app\x20add\x20<name>\x20--appcode\x20<code>','Usage:\x20'];a18_0x381c=function(){return _0x21a346;};return a18_0x381c();}
|