@lovrabet/rabetbase-cli 2.2.4-beta.1 → 2.2.4-beta.2
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/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/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
|
-
const
|
|
1
|
+
const a0_0x368566=a0_0x4463;function a0_0x14da(){const _0x54c435=['103610YhZXXn','name','length','push','Invalid\x20response\x20format\x20(','.md','/api/node-toolbox/api-doc-generator','string','datasetCode','./docs','tableName','45qFbmeH','2714264HEsdzb','✗\x20Failed:\x20','api-doc','Fetch\x20doc\x20(','.md\x20(','1878654hbjlaq','POST','):\x20missing\x20data.markdown\x20field','log','Waiting\x203\x20seconds...\x0a','475613LAWtZJ','utf8','909402JgYvfo','✓\x20Generated:\x20','success','message','生成文档成功:\x20',']\x20Generating:\x20','20AVzBon','1459208hTNHZd','markdown','793482gKhdDk','error','生成文档失败:\x20'];a0_0x14da=function(){return _0x54c435;};return a0_0x14da();}(function(_0x2775be,_0x46a3ff){const _0x42bf15=a0_0x4463,_0x268da9=_0x2775be();while(!![]){try{const _0x598f5a=-parseInt(_0x42bf15(0xd8))/0x1+parseInt(_0x42bf15(0xda))/0x2+parseInt(_0x42bf15(0xe3))/0x3+parseInt(_0x42bf15(0xe0))/0x4*(-parseInt(_0x42bf15(0xe6))/0x5)+-parseInt(_0x42bf15(0xf7))/0x6+-parseInt(_0x42bf15(0xf2))/0x7+parseInt(_0x42bf15(0xe1))/0x8*(parseInt(_0x42bf15(0xf1))/0x9);if(_0x598f5a===_0x46a3ff)break;else _0x268da9['push'](_0x268da9['shift']());}catch(_0x612e4c){_0x268da9['push'](_0x268da9['shift']());}}}(a0_0x14da,0x55b8c));import{mkdirSync,writeFileSync}from'node:fs';function a0_0x4463(_0x551879,_0x2893d3){_0x551879=_0x551879-0xd6;const _0x14da0e=a0_0x14da();let _0x446323=_0x14da0e[_0x551879];return _0x446323;}import a0_0x32536e 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(_0xdd70f8){const _0x3987eb=a0_0x4463,{appCode:_0x30df7f,cookie:_0x4a3cf6,datasetCode:_0x15c2b9,datasetId:_0x5ef8d2,extraParams:_0x36003c}=_0xdd70f8,_0x2fd42e=getApiDomain()+_0x3987eb(0xec),_0x1517b6=await platformFetch(_0x2fd42e,{'method':_0x3987eb(0xf8),'body':{'appCode':_0x30df7f,'datasetCode':_0x15c2b9,'datasetId':_0x5ef8d2,..._0x36003c||{}},'cookie':_0x4a3cf6,'label':_0x3987eb(0xf5)+_0x15c2b9+')'});if(!_0x1517b6||typeof _0x1517b6[_0x3987eb(0xe2)]!==_0x3987eb(0xed))throw new Error(_0x3987eb(0xea)+_0x15c2b9+_0x3987eb(0xf9));return _0x1517b6[_0x3987eb(0xe2)];}function delay(_0x593cb6){return new Promise(_0x5e2f30=>setTimeout(_0x5e2f30,_0x593cb6));}export async function generateDatasetDocs(_0x2ef76c,_0x322bff,_0x158da8,_0x319eb0=a0_0x368566(0xef),_0x273473,_0x2e7a83){const _0x427483=a0_0x368566;mkdirSync(_0x319eb0,{'recursive':!![]});const _0x5b1127=[],_0x1be3d6=_0x2ef76c[_0x427483(0xe8)];console['log']('\x0a'+_0x1be3d6+'\x20datasets\x20to\x20generate\x20docs\x20for\x0a');for(let _0x9f7bf3=0x0;_0x9f7bf3<_0x2ef76c['length'];_0x9f7bf3++){const _0x4e20fe=_0x2ef76c[_0x9f7bf3],_0x49d93b=_0x9f7bf3+0x1,_0x589d6d=_0x4e20fe[_0x427483(0xf0)];try{console[_0x427483(0xd6)]('['+_0x49d93b+'/'+_0x1be3d6+_0x427483(0xdf)+_0x589d6d+_0x427483(0xf6)+_0x4e20fe['name']+')');if(_0x273473)_0x273473(_0x49d93b,_0x1be3d6,_0x589d6d);const _0x40b5e9=await fetchDatasetDoc({'appCode':_0x322bff,'cookie':_0x158da8,'datasetCode':_0x4e20fe[_0x427483(0xee)],'datasetId':_0x4e20fe['id'],'enableAI':![],'extraParams':_0x2e7a83}),_0x12fad8=a0_0x32536e['join'](_0x319eb0,_0x589d6d+_0x427483(0xeb));writeFileSync(_0x12fad8,_0x40b5e9,{'encoding':_0x427483(0xd9)}),console[_0x427483(0xd6)](_0x427483(0xdb)+_0x589d6d+_0x427483(0xeb)),logger[_0x427483(0xdc)](_0x427483(0xf4),_0x427483(0xde)+_0x589d6d,undefined,{'datasetCode':_0x4e20fe[_0x427483(0xee)],'datasetName':_0x4e20fe['name'],'filePath':_0x12fad8,'progress':_0x49d93b+'/'+_0x1be3d6}),_0x5b1127[_0x427483(0xe9)]({'datasetCode':_0x4e20fe[_0x427483(0xee)],'datasetName':_0x4e20fe['name'],'filePath':_0x12fad8,'success':!![]});if(_0x49d93b<_0x1be3d6)await delay(0x1388);}catch(_0x232415){const _0x496102=_0x232415 instanceof Error?_0x232415[_0x427483(0xdd)]:String(_0x232415);console['log'](_0x427483(0xf3)+_0x589d6d+'.md\x20-\x20'+_0x496102),logger[_0x427483(0xe4)](_0x427483(0xf4),_0x427483(0xe5)+_0x4e20fe['datasetCode'],{'datasetCode':_0x4e20fe['datasetCode'],'datasetName':_0x4e20fe[_0x427483(0xe7)],'error':_0x496102,'progress':_0x49d93b+'/'+_0x1be3d6}),_0x5b1127[_0x427483(0xe9)]({'datasetCode':_0x4e20fe[_0x427483(0xee)],'datasetName':_0x4e20fe[_0x427483(0xe7)],'filePath':'','success':![],'error':_0x496102}),_0x49d93b<_0x1be3d6&&(console[_0x427483(0xd6)](_0x427483(0xd7)),await delay(0xbb8));}}return _0x5b1127;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x235862,_0x27026b){const _0x21695f=a1_0x1ec0,_0x59d179=_0x235862();while(!![]){try{const _0x2ffaee=parseInt(_0x21695f(0x1d1))/0x1*(-parseInt(_0x21695f(0x1d0))/0x2)+parseInt(_0x21695f(0x1d7))/0x3*(-parseInt(_0x21695f(0x1d3))/0x4)+parseInt(_0x21695f(0x1db))/0x5*(parseInt(_0x21695f(0x1d6))/0x6)+parseInt(_0x21695f(0x1d9))/0x7*(-parseInt(_0x21695f(0x1cd))/0x8)+-parseInt(_0x21695f(0x1dc))/0x9+parseInt(_0x21695f(0x1d5))/0xa*(parseInt(_0x21695f(0x1cf))/0xb)+parseInt(_0x21695f(0x1d8))/0xc;if(_0x2ffaee===_0x27026b)break;else _0x59d179['push'](_0x59d179['shift']());}catch(_0x2aeebc){_0x59d179['push'](_0x59d179['shift']());}}}(a1_0x18d1,0x9cd66));import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';function a1_0x1ec0(_0x169f72,_0x2d7212){_0x169f72=_0x169f72-0x1ca;const _0x18d178=a1_0x18d1();let _0x1ec05e=_0x18d178[_0x169f72];return _0x1ec05e;}function a1_0x18d1(){const _0xce002e=['7970XPAiSq','6EkLlXi','141YyvUVY','37344516QOjYmM','1003359rXwRoQ','configArray','2564585JLXDzZ','11070549dGfkbo','Fetch\x20datasets','&otype=array','replace','24tyWpvn','info','14344lHlscE','422098QCwxUY','6NuxlSq','name','93232Pyjzte','length'];a1_0x18d1=function(){return _0xce002e;};return a1_0x18d1();}import{platformFetch}from'../core/api-client.js';function cleanNewlines(_0x248e58){const _0x4d3d48=a1_0x1ec0;return _0x248e58[_0x4d3d48(0x1cc)](/[\r\n]+/g,'\x20')['trim']();}function cleanDatasetName(_0x8b4928){const _0x5d2ee6=a1_0x1ec0;if(!_0x8b4928[_0x5d2ee6(0x1d2)])return _0x8b4928;return{..._0x8b4928,'name':cleanNewlines(_0x8b4928[_0x5d2ee6(0x1d2)])};}export async function fetchModelList(_0x4d79d0,_0x200047){const _0x2d9695=a1_0x1ec0,_0x2aade2=getEnv(),_0x50afe1=getApiDomain()+'/api/node-toolbox/dataset/model-list?appcode='+_0x4d79d0+_0x2d9695(0x1cb);logger[_0x2d9695(0x1ce)]('fetch-model-list','正在从服务器拉取模型列表...\x20(环境:\x20'+_0x2aade2+')',{'apiUrl':_0x50afe1});const _0x580f65=await platformFetch(_0x50afe1,{'cookie':_0x200047,'label':_0x2d9695(0x1ca)}),_0x5abae7=(_0x580f65[_0x2d9695(0x1da)]??[])['map'](cleanDatasetName);return{'configArray':_0x5abae7,'count':_0x5abae7[_0x2d9695(0x1d4)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a2_0x6339(){const _0x23a8b0=['alias','{\x20apiConfigName:\x20\x22','859094BAqFuz','1953360eaYzCy','resolve','datasetCode','utf8',',\x20env:\x20\x22','forEach','join','length','648609zwdbJj','3543836uNsLEM','2792HGdPLK','3wLYeym','typescript','2804767OHYfqu','tableName','CONFIG_NAMES.DEFAULT','templates/generate-api','toUpperCase','replace','format','\x22\x20}','dirname','-api','\x20config\x20set\x20app\x20<value>`','success','replaceApiContent','-client','client.ts.tpl','name','Please\x20configure\x20app\x20code\x20first\x20via\x20`','api.ts.tpl','15784940AhvSdx','13149zlcytg','init-api','6TaVauV','test'];a2_0x6339=function(){return _0x23a8b0;};return a2_0x6339();}(function(_0x3d0de5,_0x3b92cd){const _0x435329=a2_0x57c6,_0x2ce24d=_0x3d0de5();while(!![]){try{const _0x430ff5=-parseInt(_0x435329(0x17f))/0x1+-parseInt(_0x435329(0x176))/0x2*(parseInt(_0x435329(0x182))/0x3)+parseInt(_0x435329(0x180))/0x4+-parseInt(_0x435329(0x177))/0x5+-parseInt(_0x435329(0x199))/0x6*(-parseInt(_0x435329(0x184))/0x7)+parseInt(_0x435329(0x181))/0x8*(-parseInt(_0x435329(0x197))/0x9)+parseInt(_0x435329(0x196))/0xa;if(_0x430ff5===_0x3b92cd)break;else _0x2ce24d['push'](_0x2ce24d['shift']());}catch(_0x128190){_0x2ce24d['push'](_0x2ce24d['shift']());}}}(a2_0x6339,0xd8691));function a2_0x57c6(_0x2dc676,_0x3cb619){_0x2dc676=_0x2dc676-0x174;const _0x63390=a2_0x6339();let _0x57c633=_0x63390[_0x2dc676];return _0x57c633;}import a2_0x101d01 from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a2_0x2ac291 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(_0x45825d,_0x3df3f5,_0x28ce21,_0x45117f,_0x5a1085,_0x4791cb,_0x1cded8){const _0x7de96=a2_0x57c6;if(!_0x28ce21)throw new Error(_0x7de96(0x194)+CLI_BIN_NAME+_0x7de96(0x18e));const _0x3f0881=_0x45117f&&!_0x1cded8,_0x1931af=_0x1cded8||_0x28ce21,_0x5e6764=_0x3f0881?_0x7de96(0x186):'\x22'+_0x1931af+'\x22',_0x5a74e4=!isProduction(_0x5a1085);let _0x36f178;if(_0x3f0881)_0x5a74e4?_0x36f178='{\x20apiConfigName:\x20'+_0x5e6764+_0x7de96(0x17b)+_0x5a1085+_0x7de96(0x18b):_0x36f178='';else{const _0x380749=_0x5a74e4?_0x7de96(0x17b)+_0x5a1085+'\x22':'';_0x36f178=_0x7de96(0x175)+_0x1931af+'\x22'+_0x380749+'\x20}';}const _0x3479c7=_0x3df3f5?_0x3df3f5+_0x7de96(0x18d):'api',_0x428cc8=_0x3df3f5?_0x3df3f5+_0x7de96(0x191):'client',_0x2b154b=_0x3df3f5&&!/^app-[a-f0-9]+$/i[_0x7de96(0x19a)](_0x3df3f5)?_0x3df3f5[_0x7de96(0x189)](/-/g,'_')[_0x7de96(0x188)]():'LOVRABET',_0x4eec30=[];_0x45825d[_0x7de96(0x17c)](_0x1954ec=>{const _0x5276d9=_0x7de96;_0x4eec30['push']({'datasetCode':_0x1954ec[_0x5276d9(0x179)],'tableName':_0x1954ec[_0x5276d9(0x185)],'name':_0x1954ec[_0x5276d9(0x193)]||'','alias':_0x1954ec[_0x5276d9(0x174)]||_0x1954ec['key']});});const _0x160f1b=fileURLToPath(import.meta.url),_0x684fe3=a2_0x2ac291[_0x7de96(0x178)](a2_0x2ac291[_0x7de96(0x18c)](_0x160f1b),'../..'),_0x314bfb=a2_0x2ac291['join'](_0x684fe3,_0x7de96(0x187)),_0x3cdde9=a2_0x2ac291[_0x7de96(0x17d)](_0x314bfb,_0x7de96(0x195)),_0x596390=a2_0x2ac291[_0x7de96(0x17d)](_0x314bfb,_0x7de96(0x192)),_0x3c07bc=_0x4791cb;mkdirSync(_0x3c07bc,{'recursive':!![]});const _0x4d77f4=_0x4eec30[0x0]?.[_0x7de96(0x174)],_0xb035cb=readFileSync(_0x3cdde9,'utf8'),_0x115a54=TemplateReplacer[_0x7de96(0x190)](_0xb035cb,_0x28ce21,_0x4eec30,_0x4d77f4,_0x3479c7,_0x5e6764,undefined,_0x2b154b),_0x3cafa1=await a2_0x101d01[_0x7de96(0x18a)](_0x115a54,{'parser':'typescript'}),_0x460f48=a2_0x2ac291[_0x7de96(0x17d)](_0x3c07bc,_0x3479c7+'.ts');writeFileSync(_0x460f48,_0x3cafa1,{'encoding':'utf8'});const _0x2c0562=readFileSync(_0x596390,_0x7de96(0x17a)),_0x5394e8=TemplateReplacer[_0x7de96(0x190)](_0x2c0562,_0x28ce21,_0x4eec30,_0x4d77f4,_0x3479c7,_0x5e6764,_0x36f178,_0x2b154b),_0x2e7e07=await a2_0x101d01['format'](_0x5394e8,{'parser':_0x7de96(0x183)}),_0x64e946=a2_0x2ac291[_0x7de96(0x17d)](_0x3c07bc,_0x428cc8+'.ts');writeFileSync(_0x64e946,_0x2e7e07,{'encoding':_0x7de96(0x17a)});const _0x310fb4=_0x4eec30[_0x7de96(0x17e)];return logger[_0x7de96(0x18f)](_0x7de96(0x198),'API\x20文件生成成功!',undefined,{'apiFile':_0x460f48,'clientFile':_0x64e946,'modelCount':_0x310fb4,'configName':_0x5e6764}),{'modelCount':_0x310fb4,'apiFilePath':_0x460f48,'clientFilePath':_0x64e946,'configName':_0x5e6764};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14a7eb,_0x3c41df){const _0x2a47e1=a3_0x4973,_0x1ea9f6=_0x14a7eb();while(!![]){try{const _0x479778=-parseInt(_0x2a47e1(0x167))/0x1*(-parseInt(_0x2a47e1(0x178))/0x2)+-parseInt(_0x2a47e1(0x168))/0x3+-parseInt(_0x2a47e1(0x172))/0x4+parseInt(_0x2a47e1(0x16e))/0x5+-parseInt(_0x2a47e1(0x176))/0x6+parseInt(_0x2a47e1(0x16c))/0x7+parseInt(_0x2a47e1(0x171))/0x8;if(_0x479778===_0x3c41df)break;else _0x1ea9f6['push'](_0x1ea9f6['shift']());}catch(_0x54c209){_0x1ea9f6['push'](_0x1ea9f6['shift']());}}}(a3_0x35d4,0x8deb1));function a3_0x4973(_0x3df336,_0x572529){_0x3df336=_0x3df336-0x167;const _0x35d450=a3_0x35d4();let _0x4973ae=_0x35d450[_0x3df336];return _0x4973ae;}import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a3_0x35d4(){const _0x7a85ca=['log','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','3958344qVRLyt','nonInteractive','2054238dNRGxC','!\x20Login\x20failed.','1ALzAbm','3177630IZkagi','stop','*\x20Login\x20successful!','Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','1740543AzbAhv','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','592820eVQIrQ','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','start','11058264lJAzdV','1905536hoLHYq','autoYes'];a3_0x35d4=function(){return _0x7a85ca;};return a3_0x35d4();}import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';import a3_0x312849 from'ora';export async function runAuthServer(_0x19308d){const _0x36dc1d=a3_0x4973,_0x5dc6b0=await getIsSessionValid();if(_0x5dc6b0){console[_0x36dc1d(0x174)]('√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.');return;}if(_0x19308d?.[_0x36dc1d(0x177)]&&!_0x19308d[_0x36dc1d(0x173)])throw CliErrors['validation'](_0x36dc1d(0x16b),'Run\x20`'+CLI_BIN_NAME+_0x36dc1d(0x175));const _0x5a2ad0=_0x19308d?.[_0x36dc1d(0x173)]?!![]:await confirm({'message':'No\x20valid\x20session.\x20Login\x20now?','default':!![]});if(!_0x5a2ad0)return;if(_0x19308d?.[_0x36dc1d(0x177)]){console['log'](_0x36dc1d(0x16d));const _0x53f441=await authServer({'silent':![],'openBrowser':![]});_0x53f441?console[_0x36dc1d(0x174)](_0x36dc1d(0x16a)):console['log'](_0x36dc1d(0x179));return;}const _0x5c48fc=a3_0x312849(_0x36dc1d(0x16f))[_0x36dc1d(0x170)](),_0x485f2a=await authServer({'silent':!![],'openBrowser':!![]});_0x5c48fc[_0x36dc1d(0x169)](),_0x485f2a?console[_0x36dc1d(0x174)](_0x36dc1d(0x16a)):console[_0x36dc1d(0x174)](_0x36dc1d(0x179));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x2761bc=a4_0x4772;(function(_0x1ec8e6,_0x21d390){const _0x4dfd59=a4_0x4772,_0x5838a8=_0x1ec8e6();while(!![]){try{const _0x4c2a21=parseInt(_0x4dfd59(0x76))/0x1+parseInt(_0x4dfd59(0x73))/0x2*(-parseInt(_0x4dfd59(0x8b))/0x3)+-parseInt(_0x4dfd59(0x6a))/0x4+-parseInt(_0x4dfd59(0x7b))/0x5*(-parseInt(_0x4dfd59(0x6f))/0x6)+-parseInt(_0x4dfd59(0x79))/0x7+parseInt(_0x4dfd59(0x90))/0x8+-parseInt(_0x4dfd59(0x8e))/0x9;if(_0x4c2a21===_0x21d390)break;else _0x5838a8['push'](_0x5838a8['shift']());}catch(_0x2cd25b){_0x5838a8['push'](_0x5838a8['shift']());}}}(a4_0xf1d0,0x36fb1));import{writeFileSync}from'node:fs';import a4_0x445bea from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';function a4_0x4772(_0x3b002f,_0x5926d6){_0x3b002f=_0x3b002f-0x6a;const _0xf1d0ab=a4_0xf1d0();let _0x47729c=_0xf1d0ab[_0x3b002f];return _0x47729c;}import{getIsSessionValid}from'../auth/is-session-valid.js';function a4_0xf1d0(){const _0x2dd56e=['⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','30JUZQbN','📍\x20Login\x20URL:','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','address','18558xUpEIU','cookie','error','361049TjoFGK','cmd\x20/c\x20start\x20\x22\x22\x20\x22','log','1567720AOArNr','user','263345gOQBPV','then','utf-8','session','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','https://dev.lovrabet.com:','isAuth','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','silent','💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','🔐\x20Starting\x20login\x20service...','open\x20\x22','catch','!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','darwin','writeHead','33HDFpZc','xdg-open\x20\x22','port','148158nVuivk','end','2530176CldOFf','1491896QBGFjv','127.0.0.1','object','close'];a4_0xf1d0=function(){return _0x2dd56e;};return a4_0xf1d0();}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(_0x5be014){const _0x182a73=a4_0x4772,_0x340a99=_0x5be014?.[_0x182a73(0x83)]||![],_0x3d2997=_0x5be014?.['openBrowser']??!![],_0x2b6b5b=_0x5be014?.['timeoutMs']??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x4efee4=await(await fetch('https://g.yuntooai.com/cert/lovrabet-dev.json'))['json']();return new Promise(async(_0x43af72,_0x5a5d48)=>{const _0x219084=_0x182a73;let _0x2dd487=0x0,_0x34d2da=![],_0x41ced0;const _0x54091c=a4_0x445bea['createServer'](_0x4efee4,async(_0x5f36ba,_0x470898)=>{const _0x3fb502=a4_0x4772,_0x398510=getUserDomain(),_0x32c6bc=_0x5f36ba['headers'][_0x3fb502(0x74)]||'',_0x12c6cb=await fetch(_0x398510+'/api/auth/get-session',{'headers':{'cookie':_0x32c6bc}})[_0x3fb502(0x7c)](_0xa30826=>_0xa30826['json']()),_0x867872=_0x12c6cb&&_0x12c6cb[_0x3fb502(0x7e)]&&_0x12c6cb[_0x3fb502(0x7a)];if(_0x867872){writeFileSync(cookieFile,_0x32c6bc,_0x3fb502(0x7d));const _0xc54a3f=buildLoginSuccessHtml();_0x470898[_0x3fb502(0x8a)](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x470898[_0x3fb502(0x8f)](_0xc54a3f),_0x5119b0(!![]);}else{const _0x2eb9ae=''+encodeURIComponent(_0x3fb502(0x80)+_0x2dd487);_0x470898['writeHead'](0x12e,{'location':_0x398510+'/sign-in?redirect='+_0x2eb9ae}),_0x470898[_0x3fb502(0x8f)]();return;}});function _0x5119b0(_0x35cead){const _0x24c7bc=a4_0x4772;if(_0x34d2da)return;_0x34d2da=!![],_0x41ced0&&clearTimeout(_0x41ced0),_0x54091c[_0x24c7bc(0x6d)](),_0x43af72(_0x35cead);}_0x54091c['listen'](0x0,_0x219084(0x6b),()=>{const _0x341223=_0x219084,_0x48edfd=_0x54091c[_0x341223(0x72)]();_0x2dd487=typeof _0x48edfd===_0x341223(0x6c)&&_0x48edfd?_0x48edfd[_0x341223(0x8d)]:Number(_0x48edfd);const _0x2be4cc='https://dev.lovrabet.com:'+_0x2dd487;_0x41ced0=setTimeout(()=>{const _0x49b80f=_0x341223;!_0x340a99&&console['log'](_0x49b80f(0x88)),_0x5119b0(![]);},_0x2b6b5b);!_0x340a99&&(console[_0x341223(0x78)](_0x341223(0x85)),console[_0x341223(0x78)](_0x341223(0x70),_0x2be4cc),_0x3d2997?(console['log']('🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...'),console[_0x341223(0x78)](''),console['log'](_0x341223(0x82))):console[_0x341223(0x78)](_0x341223(0x84)),console[_0x341223(0x78)](''));if(!_0x3d2997)return;openInBrowser(_0x2be4cc)[_0x341223(0x7c)](_0x18139d=>{const _0x2fb3fd=_0x341223;!_0x340a99&&(_0x18139d?console[_0x2fb3fd(0x78)](_0x2fb3fd(0x7f)):(console[_0x2fb3fd(0x78)](_0x2fb3fd(0x6e)),console[_0x2fb3fd(0x78)](_0x2fb3fd(0x71),_0x2be4cc)),console[_0x2fb3fd(0x78)](''));})[_0x341223(0x87)](()=>{const _0x43450b=_0x341223;!_0x340a99&&(console['log'](_0x43450b(0x6e)),console[_0x43450b(0x78)](_0x43450b(0x71),_0x2be4cc),console['log'](''));});}),_0x54091c['on'](_0x219084(0x75),_0x17180c=>{const _0x1376ed=_0x219084;if(_0x34d2da)return;_0x34d2da=!![],_0x41ced0&&clearTimeout(_0x41ced0),!_0x340a99&&console[_0x1376ed(0x75)]('Auth\x20server\x20error:',_0x17180c),_0x54091c['close'](),_0x5a5d48(_0x17180c);});});}function openInBrowser(_0x14a47d){return new Promise(_0x3b9682=>{const _0x4459fa=a4_0x4772,_0x3105e6=process['platform'];let _0x12608f;if(_0x3105e6==='win32')_0x12608f=_0x4459fa(0x77)+_0x14a47d+'\x22';else _0x3105e6===_0x4459fa(0x89)?_0x12608f=_0x4459fa(0x86)+_0x14a47d+'\x22':_0x12608f=_0x4459fa(0x8c)+_0x14a47d+'\x22';exec(_0x12608f,_0x5c6c22=>{_0x5c6c22?_0x3b9682(![]):_0x3b9682(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a4_0x2761bc(0x78)](a4_0x2761bc(0x81),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x233f52=a5_0x2dd2;(function(_0x5b034d,_0xccd3a8){const _0x32678b=a5_0x2dd2,_0x36bf83=_0x5b034d();while(!![]){try{const _0x1509d3=-parseInt(_0x32678b(0xfa))/0x1*(-parseInt(_0x32678b(0xf9))/0x2)+-parseInt(_0x32678b(0xf1))/0x3*(-parseInt(_0x32678b(0xfb))/0x4)+parseInt(_0x32678b(0xf7))/0x5+-parseInt(_0x32678b(0xf2))/0x6*(-parseInt(_0x32678b(0xf4))/0x7)+parseInt(_0x32678b(0xf8))/0x8+parseInt(_0x32678b(0xfc))/0x9*(parseInt(_0x32678b(0xfd))/0xa)+-parseInt(_0x32678b(0xf5))/0xb;if(_0x1509d3===_0xccd3a8)break;else _0x36bf83['push'](_0x36bf83['shift']());}catch(_0x46c5e9){_0x36bf83['push'](_0x36bf83['shift']());}}}(a5_0x2389,0x43967));function a5_0x2dd2(_0x21c547,_0x1cce9a){_0x21c547=_0x21c547-0xf1;const _0x23897e=a5_0x2389();let _0x2dd2dd=_0x23897e[_0x21c547];return _0x2dd2dd;}import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a5_0x233f52(0xf6));export const cookieFile=join(configDir,a5_0x233f52(0xf3));mkdirSync(configDir,{'recursive':!![]});function a5_0x2389(){const _0x2f8811=['449232djeOSL','603494qTYBjb','1AQRKdW','4BxvKLu','369slBZUK','103100NEyonX','1177476YciWbm','2694558WKELfg','cookie','7NkQafs','18329509PHBHve','.lovrabet','1604810zKWiFP'];a5_0x2389=function(){return _0x2f8811;};return a5_0x2389();}
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a6_0x1175(){var _0x57b1ef=['1463619YOEHqy','6040010LHNVDj','7XnEeEv','27YNzjJl','2156668WkKRoK','3079385oYzthM','3078102yAXgtZ','112424kxEkxO','utf-8','4zUMJZK','328202doapBN'];a6_0x1175=function(){return _0x57b1ef;};return a6_0x1175();}(function(_0x361c32,_0x19ef43){var _0x3156b6=a6_0x51b2,_0x82a864=_0x361c32();while(!![]){try{var _0x537125=parseInt(_0x3156b6(0xa2))/0x1+-parseInt(_0x3156b6(0x9c))/0x2+-parseInt(_0x3156b6(0xa3))/0x3+parseInt(_0x3156b6(0xa1))/0x4*(parseInt(_0x3156b6(0x9d))/0x5)+parseInt(_0x3156b6(0x9e))/0x6*(-parseInt(_0x3156b6(0xa5))/0x7)+-parseInt(_0x3156b6(0x9f))/0x8+-parseInt(_0x3156b6(0x9b))/0x9*(-parseInt(_0x3156b6(0xa4))/0xa);if(_0x537125===_0x19ef43)break;else _0x82a864['push'](_0x82a864['shift']());}catch(_0x3c5d01){_0x82a864['push'](_0x82a864['shift']());}}}(a6_0x1175,0xa1d15));import{readFileSync}from'node:fs';function a6_0x51b2(_0x50e2d4,_0x2f4837){_0x50e2d4=_0x50e2d4-0x9b;var _0x117517=a6_0x1175();var _0x51b2d1=_0x117517[_0x50e2d4];return _0x51b2d1;}import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0x34910a=a6_0x51b2;try{return readFileSync(cookieFile,_0x34910a(0xa0));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x48b2d4,_0x4453d0){const _0x213cd9=a7_0x59ca,_0x115382=_0x48b2d4();while(!![]){try{const _0x306703=parseInt(_0x213cd9(0x14b))/0x1*(-parseInt(_0x213cd9(0x154))/0x2)+-parseInt(_0x213cd9(0x150))/0x3+parseInt(_0x213cd9(0x14e))/0x4+parseInt(_0x213cd9(0x14f))/0x5*(-parseInt(_0x213cd9(0x14c))/0x6)+-parseInt(_0x213cd9(0x155))/0x7*(-parseInt(_0x213cd9(0x152))/0x8)+parseInt(_0x213cd9(0x148))/0x9+parseInt(_0x213cd9(0x151))/0xa;if(_0x306703===_0x4453d0)break;else _0x115382['push'](_0x115382['shift']());}catch(_0x7a0962){_0x115382['push'](_0x115382['shift']());}}}(a7_0x3048,0x5198d));import{existsSync,readFileSync}from'node:fs';function a7_0x59ca(_0x426a36,_0x1481c1){_0x426a36=_0x426a36-0x148;const _0x30483b=a7_0x3048();let _0x59ca4e=_0x30483b[_0x426a36];return _0x59ca4e;}function a7_0x3048(){const _0x22c96f=['5377270Uvidhv','8TJvvqi','/api/auth/get-session','52766DwSVAY','2560551BQhlCM','690561UHTBKt','session','user','6ReUHIc','258uhWOuU','utf-8','1085156nVfBVJ','20465zswbTk','1749060STOuja'];a7_0x3048=function(){return _0x22c96f;};return a7_0x3048();}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0x21d3fd=a7_0x59ca;try{if(!existsSync(cookieFile))return null;const _0x5d2b17=readFileSync(cookieFile,_0x21d3fd(0x14d)),_0x30ae50=await fetch(getUserDomain()+_0x21d3fd(0x153),{'headers':{'cookie':_0x5d2b17}});if(!_0x30ae50['ok'])return null;const _0x1ee716=await _0x30ae50['json']();if(!_0x1ee716[_0x21d3fd(0x149)]||!_0x1ee716[_0x21d3fd(0x14a)])return null;return _0x1ee716;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x497e11,_0x5047b2){const _0xdfed0f=a8_0x32a6,_0x666d88=_0x497e11();while(!![]){try{const _0x9cf4b3=-parseInt(_0xdfed0f(0x112))/0x1*(-parseInt(_0xdfed0f(0x116))/0x2)+parseInt(_0xdfed0f(0x10f))/0x3*(parseInt(_0xdfed0f(0x114))/0x4)+parseInt(_0xdfed0f(0x119))/0x5+parseInt(_0xdfed0f(0x10b))/0x6*(parseInt(_0xdfed0f(0x110))/0x7)+-parseInt(_0xdfed0f(0x111))/0x8*(parseInt(_0xdfed0f(0x10c))/0x9)+-parseInt(_0xdfed0f(0x10e))/0xa*(-parseInt(_0xdfed0f(0x11a))/0xb)+-parseInt(_0xdfed0f(0x117))/0xc*(parseInt(_0xdfed0f(0x113))/0xd);if(_0x9cf4b3===_0x5047b2)break;else _0x666d88['push'](_0x666d88['shift']());}catch(_0x1b516f){_0x666d88['push'](_0x666d88['shift']());}}}(a8_0x461b,0xb5116));function a8_0x461b(){const _0x3039d4=['/api/auth/get-session','1871110qAGWcD','2402769AlrpOr','4984ctMCfw','3728HtcFCX','527aRuTBX','39aTIZbb','4KbzCGa','json','1898jRXxRf','9835704KeinCn','then','5189005AvNOvJ','77pIfoWE','user','222zVqKPo','9162UybOvg'];a8_0x461b=function(){return _0x3039d4;};return a8_0x461b();}import{existsSync,readFileSync}from'node:fs';function a8_0x32a6(_0x3d4c5f,_0x1c307c){_0x3d4c5f=_0x3d4c5f-0x10a;const _0x461bad=a8_0x461b();let _0x32a66b=_0x461bad[_0x3d4c5f];return _0x32a66b;}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x1b71b2=a8_0x32a6;try{if(!existsSync(cookieFile))return![];const _0x47d45d=readFileSync(cookieFile,'utf-8'),_0x1ee2d1=await fetch(getUserDomain()+_0x1b71b2(0x10d),{'headers':{'cookie':_0x47d45d}})[_0x1b71b2(0x118)](_0x2e35b7=>_0x2e35b7[_0x1b71b2(0x115)]());return _0x1ee2d1&&_0x1ee2d1['session']&&_0x1ee2d1[_0x1b71b2(0x10a)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x2aa8b5,_0x3d60bc){const _0x5823d5=a9_0x185a,_0x3ce20d=_0x2aa8b5();while(!![]){try{const _0x1c9697=parseInt(_0x5823d5(0xff))/0x1+parseInt(_0x5823d5(0x106))/0x2*(parseInt(_0x5823d5(0x107))/0x3)+-parseInt(_0x5823d5(0xfd))/0x4*(-parseInt(_0x5823d5(0x103))/0x5)+parseInt(_0x5823d5(0xfc))/0x6+parseInt(_0x5823d5(0x100))/0x7+parseInt(_0x5823d5(0x102))/0x8*(-parseInt(_0x5823d5(0x105))/0x9)+parseInt(_0x5823d5(0x104))/0xa*(-parseInt(_0x5823d5(0xfb))/0xb);if(_0x1c9697===_0x3d60bc)break;else _0x3ce20d['push'](_0x3ce20d['shift']());}catch(_0x13c1e2){_0x3ce20d['push'](_0x3ce20d['shift']());}}}(a9_0x1db5,0x60763));function a9_0x1db5(){const _0x2dc118=['22954294nBLQtU','3793836iONPTt','18508xWazBK','</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>','785229pPeMCj','4094006kmikBS','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','48AItusT','470lqIcUC','10hFlcLO','714879QKoYIy','2XVEXMJ','1563348FoPKGd','<!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>'];a9_0x1db5=function(){return _0x2dc118;};return a9_0x1db5();}function a9_0x185a(_0xf570d3,_0x137567){_0xf570d3=_0xf570d3-0xfa;const _0x1db5d0=a9_0x1db5();let _0x185a33=_0x1db5d0[_0xf570d3];return _0x185a33;}export function buildLoginSuccessHtml(){const _0x2a1cfd=a9_0x185a,_0x3084eb=_0x2a1cfd(0x101);return _0x2a1cfd(0xfa)+_0x3084eb+_0x2a1cfd(0xfe);}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a10_0x3a97(){var _0x623c87=['46Lccary','✓\x20Logged\x20out','13582494bjTryT','!\x20Not\x20logged\x20in','10ugvQkW','8958818cGYhdh','42oAZECV','log','2334190XYIeFn','66948orDPFZ','3818520gPgndP','1348016UJCVic','3126068HhIehi','6HvwQex'];a10_0x3a97=function(){return _0x623c87;};return a10_0x3a97();}function a10_0x3453(_0x389b31,_0x10e377){_0x389b31=_0x389b31-0xb8;var _0x3a9761=a10_0x3a97();var _0x34537a=_0x3a9761[_0x389b31];return _0x34537a;}(function(_0x29dfba,_0x57dac7){var _0x2f97dc=a10_0x3453,_0x3238bb=_0x29dfba();while(!![]){try{var _0x571369=-parseInt(_0x2f97dc(0xb9))/0x1*(-parseInt(_0x2f97dc(0xc2))/0x2)+-parseInt(_0x2f97dc(0xc3))/0x3+parseInt(_0x2f97dc(0xc5))/0x4+parseInt(_0x2f97dc(0xc1))/0x5*(-parseInt(_0x2f97dc(0xb8))/0x6)+parseInt(_0x2f97dc(0xbf))/0x7*(parseInt(_0x2f97dc(0xc4))/0x8)+parseInt(_0x2f97dc(0xbb))/0x9*(-parseInt(_0x2f97dc(0xbd))/0xa)+parseInt(_0x2f97dc(0xbe))/0xb;if(_0x571369===_0x57dac7)break;else _0x3238bb['push'](_0x3238bb['shift']());}catch(_0x11fc92){_0x3238bb['push'](_0x3238bb['shift']());}}}(a10_0x3a97,0xdb387));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function logout(){var _0x38546a=a10_0x3453;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x38546a(0xba))):console[_0x38546a(0xc0)](_0x38546a(0xbc));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a11_0x3fd0(_0x3889f6,_0x568694){_0x3889f6=_0x3889f6-0xd7;const _0x1eeabb=a11_0x1eea();let _0x3fd08d=_0x1eeabb[_0x3889f6];return _0x3fd08d;}const a11_0x1da47b=a11_0x3fd0;function a11_0x1eea(){const _0x35372d=['7502080qSAVxb','131295hMJhmz','680548KJEVpf','23338oKwoQF','166220NQPOMc','4147304xXTMdP','8OXdWQr','6YulGpF','360hfpojn','9FNTsva','33ilPJlv','1347610RLBDFW','boolean'];a11_0x1eea=function(){return _0x35372d;};return a11_0x1eea();}(function(_0x2f9168,_0xa42029){const _0x100621=a11_0x3fd0,_0xcf9bb5=_0x2f9168();while(!![]){try{const _0xb052b3=parseInt(_0x100621(0xe1))/0x1*(-parseInt(_0x100621(0xda))/0x2)+parseInt(_0x100621(0xd8))/0x3*(-parseInt(_0x100621(0xdd))/0x4)+parseInt(_0x100621(0xdb))/0x5+-parseInt(_0x100621(0xde))/0x6*(-parseInt(_0x100621(0xdc))/0x7)+-parseInt(_0x100621(0xd7))/0x8*(parseInt(_0x100621(0xe0))/0x9)+-parseInt(_0x100621(0xe2))/0xa+parseInt(_0x100621(0xd9))/0xb*(parseInt(_0x100621(0xdf))/0xc);if(_0xb052b3===_0xa42029)break;else _0xcf9bb5['push'](_0xcf9bb5['shift']());}catch(_0x3bc372){_0xcf9bb5['push'](_0xcf9bb5['shift']());}}}(a11_0x1eea,0xe4ab4));export const dynamicCliFlags={'enableBffSave':{'type':a11_0x1da47b(0xe3)}};
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a12_0x468b5d=a12_0x5f1e;(function(_0x19f7b7,_0x463ec8){const _0x3b9228=a12_0x5f1e,_0x4b0a38=_0x19f7b7();while(!![]){try{const _0x3976e3=-parseInt(_0x3b9228(0xbc))/0x1*(parseInt(_0x3b9228(0xa0))/0x2)+-parseInt(_0x3b9228(0xb4))/0x3+-parseInt(_0x3b9228(0xc1))/0x4+parseInt(_0x3b9228(0xc4))/0x5+parseInt(_0x3b9228(0xa1))/0x6*(parseInt(_0x3b9228(0xc0))/0x7)+parseInt(_0x3b9228(0xc2))/0x8*(-parseInt(_0x3b9228(0xa4))/0x9)+-parseInt(_0x3b9228(0x96))/0xa*(-parseInt(_0x3b9228(0xb9))/0xb);if(_0x3976e3===_0x463ec8)break;else _0x4b0a38['push'](_0x4b0a38['shift']());}catch(_0x9641e2){_0x4b0a38['push'](_0x4b0a38['shift']());}}}(a12_0x358f,0x51a0f));import a12_0x4cd5c3 from'meow';function a12_0x358f(){const _0x373ec8=['`\x20in\x20new\x20scripts.\x0a','wildcardDef','ExitPromptError','string','4695977xInClN','error','Error:\x20','13ncyQkm','command','./constant/domain.js','now','553xasqfY','2611732DhQTky','7608pNCDxc','input','1397420bUQxSh','`\x20has\x20been\x20moved\x20to\x20`','Unexpected\x20error:','Hint:\x20','40eYRwuq','./cli-flags.js','help','name','raw','flags','unknown_service','global','runtimeDomain','stderr','74878lBsnzW','11658akCrCU','userDomain','write','3987XwqSmx','message','\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a','`;\x20prefer\x20`','service','env','defaultCommand','`\x20in\x20v2.0.\x0a','slice','hint','./constant/env.js','code','`\x20is\x20an\x20alias\x20of\x20`','log','apiDomain','dynamicCliFlags','735975riSaRI'];a12_0x358f=function(){return _0x373ec8;};return a12_0x358f();}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';function a12_0x5f1e(_0x196c1c,_0x2a8797){_0x196c1c=_0x196c1c-0x94;const _0x358f56=a12_0x358f();let _0x5f1ec3=_0x358f56[_0x196c1c];return _0x5f1ec3;}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(a12_0x468b5d(0x97)))[a12_0x468b5d(0xb3)];}catch{}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION,cli=a12_0x4cd5c3(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0xe5b909=a12_0x468b5d;let _0xa1d9c=cli[_0xe5b909(0xc3)][0x0],_0x5092bc=cli['input'][0x1];const _0x352165=cli[_0xe5b909(0x9b)];if(!_0xa1d9c){await reportCliHelpTrace(_0xe5b909(0x9d)),showHelp();return;}const _0x1ffbc2=deprecatedAliases[_0xa1d9c];if(_0x1ffbc2&&!isKnownService(_0xa1d9c)){const _0x2aed0c=_0x5092bc?CLI_BIN_NAME+'\x20'+_0xa1d9c+'\x20'+_0x5092bc:CLI_BIN_NAME+'\x20'+_0xa1d9c,_0x3ba03c=CLI_BIN_NAME+'\x20'+_0x1ffbc2[_0xe5b909(0xa8)]+'\x20'+_0x1ffbc2[_0xe5b909(0xbd)];console[_0xe5b909(0xba)]('⚠\x20`'+_0x2aed0c+_0xe5b909(0xc5)+_0x3ba03c+_0xe5b909(0xab)+_0xe5b909(0xa6)),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0xa1d9c)){await reportCliHelpTrace(_0xe5b909(0x9c),{'service':_0xa1d9c}),showHelp();return;}const _0x2b9136=getServiceEntry(_0xa1d9c);if(_0x352165[_0xe5b909(0xa9)]&&typeof _0x352165[_0xe5b909(0xa9)]===_0xe5b909(0xb8)){const {initEnv:_0x3274aa}=await import(_0xe5b909(0xae));_0x3274aa(_0x352165[_0xe5b909(0xa9)]);}const {buildConfigFromFlags:_0x202fc4}=await import('./context.js'),_0x249dff=_0x202fc4(_0x352165);if(!_0x352165[_0xe5b909(0xa9)]&&_0x249dff['env']){const {initEnv:_0x221b3b}=await import('./constant/env.js');_0x221b3b(_0x249dff[_0xe5b909(0xa9)]);}if(_0x249dff[_0xe5b909(0x9a)]?.[_0xe5b909(0xb2)]||_0x249dff[_0xe5b909(0x9a)]?.[_0xe5b909(0xa2)]||_0x249dff[_0xe5b909(0x9a)]?.[_0xe5b909(0x9e)]){const {initDomains:_0x56eea0}=await import(_0xe5b909(0xbe));_0x56eea0({'apiDomain':_0x249dff[_0xe5b909(0x9a)]['apiDomain']||undefined,'userDomain':_0x249dff[_0xe5b909(0x9a)][_0xe5b909(0xa2)]||undefined,'runtimeDomain':_0x249dff[_0xe5b909(0x9a)][_0xe5b909(0x9e)]||undefined});}if(!_0x5092bc){if(_0x352165['help']){printServiceHelp(_0xa1d9c);return;}if(_0x2b9136[_0xe5b909(0xaa)])_0x5092bc=_0x2b9136['defaultCommand'];else{if(_0x2b9136['wildcardDef']){await dispatchDeclarative(_0x2b9136[_0xe5b909(0xb6)],_0xa1d9c,'',[],_0x352165,_0x249dff);return;}else{printServiceHelp(_0xa1d9c);return;}}}const _0x5f22c6=resolveDeprecatedSubcommand(_0xa1d9c,_0x5092bc);if(_0x5f22c6){const _0x5979e6=CLI_BIN_NAME+'\x20'+_0xa1d9c+'\x20'+_0x5092bc,_0x53da98=CLI_BIN_NAME+'\x20'+_0xa1d9c+'\x20'+_0x5f22c6;console[_0xe5b909(0xba)]('⚠\x20`'+_0x5979e6+_0xe5b909(0xb0)+_0x53da98+_0xe5b909(0xa7)+_0x53da98+_0xe5b909(0xb5)),_0x5092bc=_0x5f22c6;}{let _0x21c96d=findDefinition(_0xa1d9c,_0x5092bc),_0x16b208=cli['input'][_0xe5b909(0xac)](0x2);if(!_0x21c96d){if(_0x2b9136[_0xe5b909(0xb6)]){if(_0x352165[_0xe5b909(0x98)]){console['log'](generateCommandHelp(_0x2b9136[_0xe5b909(0xb6)]));return;}_0x21c96d=_0x2b9136[_0xe5b909(0xb6)],_0x16b208=[_0x5092bc,...cli[_0xe5b909(0xc3)][_0xe5b909(0xac)](0x2)];}else{printServiceHelp(_0xa1d9c),await handleErrorAsync(CliErrors['unknownCommand'](_0xa1d9c+'\x20'+_0x5092bc));return;}}if(_0x352165[_0xe5b909(0x98)]){console[_0xe5b909(0xb1)](generateCommandHelp(_0x21c96d));return;}await dispatchDeclarative(_0x21c96d,_0xa1d9c,_0x5092bc,_0x16b208,_0x352165,_0x249dff);}}async function dispatchDeclarative(_0x12723c,_0x15f5a0,_0x19f9ba,_0x50a3b1,_0x48c7a1,_0x2c5355){const _0x4d5422=a12_0x468b5d,_0x3860ce=Date['now']();let _0x5a6b49;try{await runCommand(_0x12723c,createPipelineEnv(_0x2c5355,_0x48c7a1,_0x50a3b1));}catch(_0x9b7e10){_0x5a6b49=_0x9b7e10;}await reportCommandTrace({'service':_0x15f5a0,'command':_0x19f9ba,'flags':_0x48c7a1,'durationMs':Date[_0x4d5422(0xbf)]()-_0x3860ce,'error':_0x5a6b49});if(_0x5a6b49)await handleErrorAsync(_0x5a6b49,{'service':_0x15f5a0,'command':_0x19f9ba});}function printServiceHelp(_0x1562f5){const _0x30cd20=a12_0x468b5d;console[_0x30cd20(0xb1)](generateServiceHelp(_0x1562f5));}async function handleErrorAsync(_0x24607f,_0xf673da){const _0x5d14f4=a12_0x468b5d;if(_0x24607f instanceof Error&&_0x24607f[_0x5d14f4(0x99)]===_0x5d14f4(0xb7))return process[_0x5d14f4(0x9f)][_0x5d14f4(0xa3)]('\x0aCancelled.\x0a'),await exitWithOtelShutdown(0x0);if(_0x24607f instanceof CliError){if(_0x24607f[_0x5d14f4(0xaf)]==='cancelled')return process[_0x5d14f4(0x9f)][_0x5d14f4(0xa3)]('\x0a'+_0x24607f[_0x5d14f4(0xa5)]+'\x0a'),await exitWithOtelShutdown(0x0);console[_0x5d14f4(0xba)](_0x5d14f4(0xbb)+_0x24607f['message']);if(_0x24607f[_0x5d14f4(0xad)])console[_0x5d14f4(0xba)](_0x5d14f4(0x95)+_0x24607f[_0x5d14f4(0xad)]);if(_0xf673da)printIssueReportNudgeForError(_0x24607f,_0xf673da);return await exitWithOtelShutdown(_0x24607f['exitCode']);}console[_0x5d14f4(0xba)](_0x5d14f4(0x94),_0x24607f);if(_0xf673da)printIssueReportNudgeForError(_0x24607f,_0xf673da);return await exitWithOtelShutdown(0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a13_0x3f0b7f=a13_0x4819;(function(_0x58b6c3,_0x442b80){const _0x5d7247=a13_0x4819,_0x3179dd=_0x58b6c3();while(!![]){try{const _0x23ff79=-parseInt(_0x5d7247(0x15a))/0x1+-parseInt(_0x5d7247(0x18b))/0x2*(parseInt(_0x5d7247(0x16e))/0x3)+-parseInt(_0x5d7247(0x191))/0x4*(-parseInt(_0x5d7247(0x15b))/0x5)+-parseInt(_0x5d7247(0x158))/0x6*(parseInt(_0x5d7247(0x190))/0x7)+-parseInt(_0x5d7247(0x16c))/0x8+-parseInt(_0x5d7247(0x180))/0x9*(parseInt(_0x5d7247(0x168))/0xa)+parseInt(_0x5d7247(0x157))/0xb;if(_0x23ff79===_0x442b80)break;else _0x3179dd['push'](_0x3179dd['shift']());}catch(_0x47979c){_0x3179dd['push'](_0x3179dd['shift']());}}}(a13_0x8749,0x2b447));function a13_0x8749(){const _0x533efc=['257926JytqKx','441425sOmrTM','\x1b[90m*\x20Filtered\x20','--datasetcode\x20cannot\x20be\x20empty.','✓\x20Generated\x20','\x20file(s)','\x20doc(s)\x20failed','datasetcode','Failed\x20to\x20fetch\x20datasets','stdout','Fetched\x20','...','\x1b[90m*\x20Generating\x20docs\x20for:\x20','str','635410cmWYGU','fail','string','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','38872SUlhEo','error','12eprJoc','\x20failed','\x20doc(s)\x20in\x20','must\x20be\x20a\x20JSON\x20object','.md','\x20of\x20','Output\x20directory\x20(default:\x20./docs)','):\x20','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','\x20\x20•\x20','output','datasetCode','length','appCode','message','\x20succeeded,\x20','split','isArray','18IBgkIw','Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','succeed','\x0d\x20\x20[','Doc\x20generation:\x20','map','./docs','\x1b[0m','None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20','object','join','53790SmrCjx','cookie','params','start','filter','287553rprnpI','8fLYRtz','success','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','!\x20No\x20datasets\x20found.','validation','Invalid\x20--params:\x20','some','write','api','generate','Fetching\x20dataset\x20list\x20for\x20','8642183UFatKS','42LOogYB','Doc\x20generation\x20complete:\x20'];a13_0x8749=function(){return _0x533efc;};return a13_0x8749();}import a13_0x2fcc97 from'ora';function a13_0x4819(_0x1b3d29,_0x37a07a){_0x1b3d29=_0x1b3d29-0x156;const _0x8749d4=a13_0x8749();let _0x481993=_0x8749d4[_0x1b3d29];return _0x481993;}import{fetchModelList}from'../../api/fetch-model-list.js';import{generateDatasetDocs}from'../../api/api-doc.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export const apiGenerate={'service':a13_0x3f0b7f(0x199),'command':a13_0x3f0b7f(0x19a),'description':a13_0x3f0b7f(0x181),'risk':a13_0x3f0b7f(0x198),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a13_0x3f0b7f(0x178),'type':a13_0x3f0b7f(0x16a),'description':a13_0x3f0b7f(0x174)},{'name':a13_0x3f0b7f(0x161),'type':a13_0x3f0b7f(0x16a),'description':a13_0x3f0b7f(0x176)},{'name':a13_0x3f0b7f(0x18d),'type':a13_0x3f0b7f(0x16a),'description':a13_0x3f0b7f(0x193)}],async 'execute'(_0x3ddd75){const _0x35a684=a13_0x3f0b7f,_0x3b0153=_0x3ddd75[_0x35a684(0x167)](_0x35a684(0x178))||_0x35a684(0x186),_0x2d8dc6=_0x3ddd75[_0x35a684(0x167)](_0x35a684(0x161)),_0x10c040=_0x3ddd75['str']('params');let _0xc08a5a;if(_0x10c040)try{_0xc08a5a=JSON['parse'](_0x10c040);if(typeof _0xc08a5a!==_0x35a684(0x189)||_0xc08a5a===null||Array[_0x35a684(0x17f)](_0xc08a5a))throw new Error(_0x35a684(0x171));}catch(_0xda6cb5){throw CliErrors[_0x35a684(0x195)](_0x35a684(0x196)+(_0xda6cb5 instanceof Error?_0xda6cb5[_0x35a684(0x17c)]:String(_0xda6cb5)),_0x35a684(0x16b));}let _0x50f54e;if(_0x2d8dc6){const _0x164190=_0x2d8dc6[_0x35a684(0x17e)](',')[_0x35a684(0x185)](_0x492dd8=>_0x492dd8['trim']())[_0x35a684(0x18f)](_0x3e226c=>_0x3e226c['length']>0x0);if(_0x164190[_0x35a684(0x17a)]===0x0)throw CliErrors[_0x35a684(0x195)](_0x35a684(0x15d));_0x50f54e=new Set(_0x164190),writeCliSideChannelLine(_0x35a684(0x166)+_0x164190['join'](',\x20')+_0x35a684(0x187));}const _0x3e6ea4=a13_0x2fcc97(_0x35a684(0x156)+_0x3ddd75['appCode']+_0x35a684(0x165))[_0x35a684(0x18e)]();let _0x27eeb0;try{({configArray:_0x27eeb0}=await fetchModelList(_0x3ddd75[_0x35a684(0x17b)],_0x3ddd75[_0x35a684(0x18c)]),_0x3e6ea4[_0x35a684(0x182)](_0x35a684(0x164)+_0x27eeb0[_0x35a684(0x17a)]+'\x20dataset(s)'));}catch(_0x130ca1){_0x3e6ea4[_0x35a684(0x169)](_0x35a684(0x162));throw _0x130ca1;}if(_0x27eeb0['length']===0x0)return writeCliSideChannelLine(_0x35a684(0x194)),{'ok':!![]};let _0x139645=_0x27eeb0;if(_0x50f54e){_0x139645=_0x27eeb0[_0x35a684(0x18f)](_0xc6e6c4=>_0x50f54e['has'](_0xc6e6c4[_0x35a684(0x179)]));const _0x31637b=[..._0x50f54e]['filter'](_0x12b280=>!_0x27eeb0[_0x35a684(0x197)](_0x3d7274=>_0x3d7274[_0x35a684(0x179)]===_0x12b280));_0x31637b['length']>0x0&&writeCliSideChannelLine('\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20'+_0x31637b[_0x35a684(0x18a)](',\x20')+_0x35a684(0x187));if(_0x139645[_0x35a684(0x17a)]===0x0)throw CliErrors[_0x35a684(0x195)](_0x35a684(0x188)+[..._0x50f54e][_0x35a684(0x18a)](',\x20'));writeCliSideChannelLine(_0x35a684(0x15c)+_0x139645[_0x35a684(0x17a)]+_0x35a684(0x173)+_0x27eeb0[_0x35a684(0x17a)]+'\x20dataset(s)\x1b[0m');}let _0x2440eb=0x0;const _0x27c006=await generateDatasetDocs(_0x139645,_0x3ddd75['appCode'],_0x3ddd75['cookie'],_0x3b0153,(_0xfbd59e,_0x45c3ab,_0x39b019)=>{const _0x9aa9c3=_0x35a684;_0x2440eb=_0xfbd59e,process[_0x9aa9c3(0x163)]['write'](_0x9aa9c3(0x183)+String(_0xfbd59e)['padStart'](String(_0x45c3ab)[_0x9aa9c3(0x17a)])+'/'+_0x45c3ab+']\x20'+_0x39b019+_0x9aa9c3(0x172));},_0xc08a5a);if(_0x2440eb>0x0)process[_0x35a684(0x163)][_0x35a684(0x198)]('\x0a');const _0x2dc128=_0x27c006[_0x35a684(0x18f)](_0x3fc69c=>_0x3fc69c[_0x35a684(0x192)])[_0x35a684(0x17a)],_0xcabcbe=_0x27c006[_0x35a684(0x18f)](_0x4f74dd=>!_0x4f74dd[_0x35a684(0x192)])[_0x35a684(0x17a)];writeCliSideChannelLine(''),writeCliSideChannelLine(_0x35a684(0x15e)+_0x2dc128+_0x35a684(0x170)+_0x3b0153);if(_0xcabcbe>0x0){writeCliSideChannelLine('!\x20'+_0xcabcbe+_0x35a684(0x160));for(const _0x4c86ec of _0x27c006[_0x35a684(0x18f)](_0x37db80=>!_0x37db80['success'])){writeCliSideChannelLine(_0x35a684(0x177)+_0x4c86ec['datasetName']+'\x20('+_0x4c86ec[_0x35a684(0x179)]+_0x35a684(0x175)+_0x4c86ec[_0x35a684(0x16d)]);}}return{'ok':_0xcabcbe===0x0,'message':_0xcabcbe>0x0?_0x35a684(0x184)+_0x2dc128+_0x35a684(0x17d)+_0xcabcbe+_0x35a684(0x16f):_0x35a684(0x159)+_0x2dc128+_0x35a684(0x15f)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e79f1,_0x46db6b){const _0x5e8b58=a14_0x5e9d,_0xa280ad=_0x5e79f1();while(!![]){try{const _0x299fa1=-parseInt(_0x5e8b58(0x156))/0x1+-parseInt(_0x5e8b58(0x157))/0x2*(parseInt(_0x5e8b58(0x15d))/0x3)+parseInt(_0x5e8b58(0x158))/0x4+parseInt(_0x5e8b58(0x15a))/0x5*(-parseInt(_0x5e8b58(0x15b))/0x6)+parseInt(_0x5e8b58(0x15c))/0x7*(parseInt(_0x5e8b58(0x155))/0x8)+parseInt(_0x5e8b58(0x15f))/0x9*(parseInt(_0x5e8b58(0x159))/0xa)+parseInt(_0x5e8b58(0x15e))/0xb;if(_0x299fa1===_0x46db6b)break;else _0xa280ad['push'](_0xa280ad['shift']());}catch(_0x38afa9){_0xa280ad['push'](_0xa280ad['shift']());}}}(a14_0x2377,0x30e94));import{apiList}from'../../commands/api/list.js';import{apiPull}from'../../commands/api/pull.js';import{apiGenerate}from'../../commands/api/generate.js';function a14_0x2377(){const _0x476a79=['2043670vVtXPO','669540fpQoUV','12RrmQES','7CgzxQn','3DJaYVN','1728331ObEuJg','9khIixP','2051392FUNJyc','37671YDNwZe','239494fOXqft','30648jSabdx'];a14_0x2377=function(){return _0x476a79;};return a14_0x2377();}function a14_0x5e9d(_0x48ca8f,_0x4e6f4d){_0x48ca8f=_0x48ca8f-0x155;const _0x2377ba=a14_0x2377();let _0x5e9d52=_0x2377ba[_0x48ca8f];return _0x5e9d52;}export const apiDefinitions=[apiList,apiPull,apiGenerate];
|
package/lib/commands/api/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x54380b=a15_0x31a8;function a15_0x31a8(_0x4c2845,_0x421467){_0x4c2845=_0x4c2845-0x104;const _0x592a32=a15_0x592a();let _0x31a870=_0x592a32[_0x4c2845];return _0x31a870;}(function(_0x34ac2f,_0x19aa97){const _0x2af4f5=a15_0x31a8,_0x21dbbe=_0x34ac2f();while(!![]){try{const _0x3d387a=parseInt(_0x2af4f5(0x111))/0x1*(-parseInt(_0x2af4f5(0x10f))/0x2)+-parseInt(_0x2af4f5(0x118))/0x3+-parseInt(_0x2af4f5(0x115))/0x4*(-parseInt(_0x2af4f5(0x107))/0x5)+-parseInt(_0x2af4f5(0x117))/0x6+-parseInt(_0x2af4f5(0x10c))/0x7*(parseInt(_0x2af4f5(0x10b))/0x8)+-parseInt(_0x2af4f5(0x10d))/0x9*(-parseInt(_0x2af4f5(0x11b))/0xa)+parseInt(_0x2af4f5(0x112))/0xb*(parseInt(_0x2af4f5(0x108))/0xc);if(_0x3d387a===_0x19aa97)break;else _0x21dbbe['push'](_0x21dbbe['shift']());}catch(_0x29f33e){_0x21dbbe['push'](_0x21dbbe['shift']());}}}(a15_0x592a,0x8f3ef));function a15_0x592a(){const _0x4ddef4=['List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','61xvmwbf','6739568BLcFCV','cookie','global','848816iueCSR','appcode','3307710UhzLPC','363756yofqfA','list','rawFlags','10KOoAha','production','map','appCode','name','5LIvwZj','12WKykFX','boolean','api','96gAXOfS','44821wfdRgn','5103279eOsRuU','read','1830vMiqWY'];a15_0x592a=function(){return _0x4ddef4;};return a15_0x592a();}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_0x54380b(0x10a),'command':a15_0x54380b(0x119),'description':a15_0x54380b(0x110),'risk':a15_0x54380b(0x10e),'requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0x54380b(0x114),'type':a15_0x54380b(0x109),'description':'Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','default':![]}],async 'execute'(_0x4a9765){const _0x1eb17a=a15_0x54380b,_0x23f67e=_0x4a9765[_0x1eb17a(0x11a)][_0x1eb17a(0x116)]?String(_0x4a9765[_0x1eb17a(0x11a)]['appcode']):undefined,_0x1571d0=resolveTargetApps(_0x4a9765,_0x23f67e);if(_0x1571d0){const _0x17b0b8=[];for(const _0x3f285c of _0x1571d0){const _0x5e541f=_0x3f285c[_0x1eb17a(0x113)]||_0x4a9765[_0x1eb17a(0x113)],_0x16eb38=_0x3f285c['env']||_0x1eb17a(0x11c);initEnv(_0x16eb38);const {configArray:_0x3654de}=await fetchModelList(_0x3f285c['appcode'],_0x5e541f);_0x17b0b8['push'](..._0x3654de[_0x1eb17a(0x104)](_0x534060=>({..._0x534060,'_appName':_0x3f285c[_0x1eb17a(0x106)],'_appCode':_0x3f285c[_0x1eb17a(0x116)],'_env':_0x16eb38,'_isDefault':_0x3f285c['isDefault']})));}return{'ok':!![],'data':_0x17b0b8};}const {configArray:_0x5305db}=await fetchModelList(_0x4a9765[_0x1eb17a(0x105)],_0x4a9765['cookie']);return{'ok':!![],'data':_0x5305db};}};
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x503901=a16_0x1ff7;(function(_0x6254bb,_0x59d67e){const _0x3ba3ae=a16_0x1ff7,_0x46f0f0=_0x6254bb();while(!![]){try{const _0x35ccf4=-parseInt(_0x3ba3ae(0xd9))/0x1*(parseInt(_0x3ba3ae(0xe3))/0x2)+parseInt(_0x3ba3ae(0xce))/0x3+-parseInt(_0x3ba3ae(0xe8))/0x4*(parseInt(_0x3ba3ae(0xf1))/0x5)+parseInt(_0x3ba3ae(0xd4))/0x6*(-parseInt(_0x3ba3ae(0xc1))/0x7)+parseInt(_0x3ba3ae(0xd3))/0x8+-parseInt(_0x3ba3ae(0xc2))/0x9+-parseInt(_0x3ba3ae(0xdf))/0xa*(-parseInt(_0x3ba3ae(0xc9))/0xb);if(_0x35ccf4===_0x59d67e)break;else _0x46f0f0['push'](_0x46f0f0['shift']());}catch(_0x36e740){_0x46f0f0['push'](_0x46f0f0['shift']());}}}(a16_0x163b,0x5b5a0));import a16_0x59f330 from'ora';function a16_0x1ff7(_0x234766,_0x30ec75){_0x234766=_0x234766-0xc0;const _0x163b01=a16_0x163b();let _0x1ff74f=_0x163b01[_0x234766];return _0x1ff74f;}import a16_0x1929ca from'node:path';import{initEnv,getEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';import{generateApiFile}from'../../api/generate-api-file.js';function a16_0x163b(){const _0x1718a4=['clientFilePath','name','split','pull','140FhTarm','message','...','appcode','join','rawFlags','string','\x20model(s)','global','29845ROALFT','apiFilePath','7DtLKrd','3089556WSOSzy','.ts','fail','api','Pulling\x20API\x20config\x20for\x20','\x20succeeded,\x20','Pulled\x20','22ngBmNI','length','start','-client','isDefault','165960qYKCbC','client','slice','cookie','production','3903480RyohQM','2157444hhgAhR','Output\x20directory\x20(default:\x20','apiDir','succeed','output','2fCowvI','modelCount','\x20dataset(s),\x20generated\x20','Done:\x20','\x20\x20•\x20','Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20(','3717290NgWYOC','\x20failed','appCode','\x20app(s)\x20failed','764fivfEl'];a16_0x163b=function(){return _0x1718a4;};return a16_0x163b();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{DEFAULT_API_DIR}from'../../constant/paths.js';import{resolveTargetApps}from'../../commands/api/shared.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export const apiPull={'service':'api','command':a16_0x503901(0xe7),'description':a16_0x503901(0xde)+DEFAULT_API_DIR+'/)','risk':'write','requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a16_0x503901(0xd8),'type':a16_0x503901(0xee),'description':a16_0x503901(0xd5)+DEFAULT_API_DIR+'/)'},{'name':a16_0x503901(0xf0),'type':'boolean','description':'Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','default':![]}],async 'execute'(_0x36993e){const _0x20f07e=a16_0x503901,_0x4aebee=_0x36993e[_0x20f07e(0xed)][_0x20f07e(0xeb)]?String(_0x36993e['rawFlags']['appcode']):undefined,_0x4c0685=_0x36993e['str'](_0x20f07e(0xd8))||undefined,_0x8c18b2=resolveTargetApps(_0x36993e,_0x4aebee);if(_0x8c18b2){let _0x5732ae=0x0,_0xc459f4=0x0;for(const _0x360b3d of _0x8c18b2){const _0x280d11=_0x360b3d[_0x20f07e(0xd1)]||_0x36993e['cookie'],_0x85e865=_0x360b3d['env']||_0x20f07e(0xd2);initEnv(_0x85e865);const _0x3588f3=_0x360b3d[_0x20f07e(0xd6)]||_0x4c0685||_0x36993e[_0x20f07e(0xd6)]||DEFAULT_API_DIR,_0x28cc52=_0x360b3d[_0x20f07e(0xcd)]?'':_0x360b3d[_0x20f07e(0xe5)]||_0x360b3d['appcode'],_0xedabbf=a16_0x59f330('Pulling\x20'+_0x360b3d[_0x20f07e(0xe5)]+'\x20('+_0x360b3d['appcode']+')...')[_0x20f07e(0xcb)]();try{const {configArray:_0x3b941c}=await fetchModelList(_0x360b3d[_0x20f07e(0xeb)],_0x280d11),_0x510262=await generateApiFile(_0x3b941c,_0x28cc52,_0x360b3d[_0x20f07e(0xeb)],_0x360b3d[_0x20f07e(0xcd)],_0x85e865,_0x3588f3,_0x360b3d['name']);_0xedabbf[_0x20f07e(0xd7)](_0x360b3d[_0x20f07e(0xe5)]+':\x20'+_0x3b941c[_0x20f07e(0xca)]+'\x20dataset(s)\x20→\x20'+_0x510262[_0x20f07e(0xda)]+_0x20f07e(0xef)),writeCliSideChannelLine(_0x20f07e(0xdd)+_0x510262[_0x20f07e(0xc0)]),writeCliSideChannelLine(_0x20f07e(0xdd)+_0x510262[_0x20f07e(0xe4)]),_0x5732ae++;}catch(_0x45e311){_0xedabbf[_0x20f07e(0xc4)](_0x360b3d[_0x20f07e(0xe5)]+':\x20'+(_0x45e311 instanceof Error?_0x45e311[_0x20f07e(0xe9)]:String(_0x45e311))),_0xc459f4++;}}writeCliSideChannelLine('');if(_0xc459f4>0x0)writeCliSideChannelLine('!\x20'+_0xc459f4+_0x20f07e(0xe2));return{'ok':_0xc459f4===0x0,'message':_0x20f07e(0xdc)+_0x5732ae+_0x20f07e(0xc7)+_0xc459f4+_0x20f07e(0xe0)};}const _0x58c78b=_0x4aebee&&_0x4aebee['includes']('-')?_0x4aebee[_0x20f07e(0xe6)]('-')[_0x20f07e(0xd0)](0x1)[_0x20f07e(0xec)]('-'):'',_0x13f321=_0x4c0685||_0x36993e[_0x20f07e(0xd6)]||DEFAULT_API_DIR,_0x301ace=!_0x4aebee,_0x224d58=a16_0x59f330(_0x20f07e(0xc6)+_0x36993e[_0x20f07e(0xe1)]+_0x20f07e(0xea))[_0x20f07e(0xcb)]();try{const {configArray:_0x3adace}=await fetchModelList(_0x36993e['appCode'],_0x36993e[_0x20f07e(0xd1)]),_0x18d78d=await generateApiFile(_0x3adace,_0x58c78b,_0x36993e[_0x20f07e(0xe1)],_0x301ace,getEnv(),_0x13f321);_0x224d58['succeed'](_0x20f07e(0xc8)+_0x3adace[_0x20f07e(0xca)]+_0x20f07e(0xdb)+_0x18d78d['modelCount']+_0x20f07e(0xef));const _0x399633=_0x58c78b?_0x58c78b+'-api':_0x20f07e(0xc5),_0x2405fa=_0x58c78b?_0x58c78b+_0x20f07e(0xcc):_0x20f07e(0xcf);return writeCliSideChannelLine(_0x20f07e(0xdd)+a16_0x1929ca[_0x20f07e(0xec)](_0x13f321,_0x399633+_0x20f07e(0xc3))),writeCliSideChannelLine(_0x20f07e(0xdd)+a16_0x1929ca[_0x20f07e(0xec)](_0x13f321,_0x2405fa+_0x20f07e(0xc3))),{'ok':!![],'data':{'datasetCount':_0x3adace[_0x20f07e(0xca)],'modelCount':_0x18d78d['modelCount']}};}catch(_0x5d0ddc){_0x224d58[_0x20f07e(0xc4)]('Failed:\x20'+(_0x5d0ddc instanceof Error?_0x5d0ddc[_0x20f07e(0xe9)]:String(_0x5d0ddc)));throw _0x5d0ddc;}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x514c6f,_0x38c6f6){const _0x518ec7=a17_0x2371,_0xa8cf95=_0x514c6f();while(!![]){try{const _0x3858ab=-parseInt(_0x518ec7(0x7f))/0x1+parseInt(_0x518ec7(0x81))/0x2*(-parseInt(_0x518ec7(0x91))/0x3)+parseInt(_0x518ec7(0x84))/0x4*(parseInt(_0x518ec7(0x82))/0x5)+-parseInt(_0x518ec7(0x83))/0x6+-parseInt(_0x518ec7(0x92))/0x7*(parseInt(_0x518ec7(0x89))/0x8)+parseInt(_0x518ec7(0x8d))/0x9*(parseInt(_0x518ec7(0x7e))/0xa)+parseInt(_0x518ec7(0x80))/0xb;if(_0x3858ab===_0x38c6f6)break;else _0xa8cf95['push'](_0xa8cf95['shift']());}catch(_0xc6f87c){_0xa8cf95['push'](_0xa8cf95['shift']());}}}(a17_0x63db,0xa9842));import{getMultiAppConfigs}from'../../utils/config.js';function a17_0x2371(_0x476d23,_0x6b53f3){_0x476d23=_0x476d23-0x7e;const _0x63db62=a17_0x63db();let _0x237187=_0x63db62[_0x476d23];return _0x237187;}import{CliErrors}from'../../errors.js';function a17_0x63db(){const _0x30d28a=['888708BfYqOv','1310692UFRDrD','join','validation','selectedAppName','map','56QSMCtR','bool','length','project','10751418rhjqqK','merged','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','name','39hiXiLp','551187QzTVcW','App\x20\x22','10VyErhz','1312069mPAnSC','14758975tBNcOg','24352khItrA','5hvqqPg'];a17_0x63db=function(){return _0x30d28a;};return a17_0x63db();}export function resolveTargetApps(_0x37ef60,_0x49ec50){const _0x599f16=a17_0x2371;if(_0x49ec50)return null;const _0x493971=_0x37ef60[_0x599f16(0x8a)]('global')?_0x599f16(0x8e):_0x599f16(0x8c);let _0x1af6cd=getMultiAppConfigs(_0x493971);if(!_0x1af6cd||_0x1af6cd[_0x599f16(0x8b)]===0x0)return null;if(_0x37ef60[_0x599f16(0x87)]){const _0x275338=_0x1af6cd['filter'](_0x474029=>_0x474029[_0x599f16(0x90)]===_0x37ef60[_0x599f16(0x87)]);if(_0x275338[_0x599f16(0x8b)]===0x0){const _0x53836d=_0x1af6cd[_0x599f16(0x88)](_0xfc931=>_0xfc931[_0x599f16(0x90)])[_0x599f16(0x85)](',\x20');throw CliErrors[_0x599f16(0x86)](_0x599f16(0x93)+_0x37ef60[_0x599f16(0x87)]+_0x599f16(0x8f)+_0x53836d);}_0x1af6cd=_0x275338;}return _0x1af6cd;}
|
package/lib/commands/app/add.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a18_0xc86f03=a18_0x529b;(function(_0x4520f7,_0x2f9330){const _0x7046da=a18_0x529b,_0x1b8d72=_0x4520f7();while(!![]){try{const _0x47801c=-parseInt(_0x7046da(0x20c))/0x1+-parseInt(_0x7046da(0x1f5))/0x2+parseInt(_0x7046da(0x212))/0x3*(-parseInt(_0x7046da(0x213))/0x4)+-parseInt(_0x7046da(0x204))/0x5*(parseInt(_0x7046da(0x215))/0x6)+parseInt(_0x7046da(0x1fe))/0x7*(parseInt(_0x7046da(0x1ff))/0x8)+-parseInt(_0x7046da(0x210))/0x9*(-parseInt(_0x7046da(0x1f9))/0xa)+parseInt(_0x7046da(0x1f6))/0xb;if(_0x47801c===_0x2f9330)break;else _0x1b8d72['push'](_0x1b8d72['shift']());}catch(_0x28c5b9){_0x1b8d72['push'](_0x1b8d72['shift']());}}}(a18_0x29b5,0xb60d4));function a18_0x29b5(){const _0x2d9db1=['str','apps','Add\x20or\x20update\x20an\x20app\x20in\x20config','Updated','1256499FiKpuk','args','Usage:\x20','validation','6354CPCBZo','string','27imfDds','605016WBVUMR','global','150HQwCKm','App\x20profile\x20name','2302776vYfNkF','41709294PXhXuT','defaultApp','boolean','17780tcgDtH','trim','appcode','bool','name','3245095fdcOcP','8DGlcoI','Missing\x20app\x20name.','\x20app\x20add\x20<name>\x20--appcode\x20<code>','\x20Set\x20as\x20default\x20app.','flagMissing','199150iSlsdP','App\x20code','add','app'];a18_0x29b5=function(){return _0x2d9db1;};return a18_0x29b5();}function a18_0x529b(_0x26f651,_0x22a333){_0x26f651=_0x26f651-0x1f4;const _0x29b5b6=a18_0x29b5();let _0x529b8d=_0x29b5b6[_0x26f651];return _0x529b8d;}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(_0x5cc4cf){const _0x476e09=a18_0x529b,_0x451a5b=_0x5cc4cf[_0x476e09(0x20d)][0x0]?.[_0x476e09(0x1fa)]();if(!_0x451a5b)throw CliErrors[_0x476e09(0x20f)](_0x476e09(0x200),_0x476e09(0x20e)+CLI_BIN_NAME+_0x476e09(0x201));}async function execute(_0x37dc87){const _0x20956a=a18_0x529b,_0x2c46f4=_0x37dc87[_0x20956a(0x20d)][0x0]?.[_0x20956a(0x1fa)]();if(!_0x2c46f4)throw CliErrors[_0x20956a(0x20f)]('Missing\x20app\x20name.',_0x20956a(0x20e)+CLI_BIN_NAME+_0x20956a(0x201));const _0x3f0f82=_0x37dc87[_0x20956a(0x208)](_0x20956a(0x1fb));if(!_0x3f0f82)throw CliErrors[_0x20956a(0x203)](_0x20956a(0x1fb),_0x20956a(0x20e)+CLI_BIN_NAME+_0x20956a(0x201));const _0x256168={'global':_0x37dc87[_0x20956a(0x1fc)](_0x20956a(0x214))},_0x1fe67=readConfig(_0x256168);if(!_0x1fe67[_0x20956a(0x209)])_0x1fe67[_0x20956a(0x209)]={};const _0x432768={'appcode':_0x3f0f82,...collectAppProfileOverrides(_0x28595f=>_0x37dc87[_0x20956a(0x208)](_0x28595f))},_0x208df4=_0x1fe67[_0x20956a(0x209)],_0x554280=!!_0x208df4[_0x2c46f4];_0x208df4[_0x2c46f4]=_0x432768;if(!_0x1fe67[_0x20956a(0x1f7)])_0x1fe67[_0x20956a(0x1f7)]=_0x2c46f4;writeConfig(_0x1fe67,_0x256168);const _0x1fccac=!_0x554280&&_0x1fe67['defaultApp']===_0x2c46f4?_0x20956a(0x202):'',_0x117ffd=(_0x554280?_0x20956a(0x20b):'Added')+'\x20app\x20\x22'+_0x2c46f4+'\x22\x20(appcode:\x20'+_0x3f0f82+')'+scopeLabel(_0x256168)+'.'+_0x1fccac;return{'ok':!![],'message':_0x117ffd};}export const appAddDefinition={'service':a18_0xc86f03(0x207),'command':a18_0xc86f03(0x206),'description':a18_0xc86f03(0x20a),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a18_0xc86f03(0x1fd),'description':a18_0xc86f03(0x1f4),'required':!![]}],'flags':[{'name':a18_0xc86f03(0x1fb),'type':a18_0xc86f03(0x211),'description':a18_0xc86f03(0x205),'required':!![]},{'name':a18_0xc86f03(0x214),'type':a18_0xc86f03(0x1f8),'description':'Use\x20global\x20config\x20scope','default':![]},...getAppProfileFlagDefs()],'validate':validateArgs,'execute':execute};
|