@lovrabet/rabetbase-cli 2.1.1-beta.0 → 2.1.2-beta.0
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 -0
- 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 -0
- 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 -0
- 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/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/new.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/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.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/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/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/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/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/config/schema.js +1 -0
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -0
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -0
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -0
- 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/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 -0
- 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/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/config.js +1 -1
- package/lib/utils/copy-directory.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/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 +3 -2
- package/lib/commands/api/doc.js +0 -1
- package/lib/commands/app/remote.js +0 -1
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a0_0x1739cc=a0_0x80ab;(function(_0x5c4964,_0x47f4af){const _0x5d16c8=a0_0x80ab,_0xf300d=_0x5c4964();while(!![]){try{const _0x1fb779=-parseInt(_0x5d16c8(0x1f4))/0x1*(parseInt(_0x5d16c8(0x1fb))/0x2)+-parseInt(_0x5d16c8(0x1e5))/0x3+-parseInt(_0x5d16c8(0x1e9))/0x4+parseInt(_0x5d16c8(0x1e2))/0x5*(parseInt(_0x5d16c8(0x1fa))/0x6)+-parseInt(_0x5d16c8(0x1e4))/0x7*(parseInt(_0x5d16c8(0x1f0))/0x8)+-parseInt(_0x5d16c8(0x200))/0x9*(-parseInt(_0x5d16c8(0x1f9))/0xa)+parseInt(_0x5d16c8(0x1f6))/0xb*(parseInt(_0x5d16c8(0x1fc))/0xc);if(_0x1fb779===_0x47f4af)break;else _0xf300d['push'](_0xf300d['shift']());}catch(_0x29e031){_0xf300d['push'](_0xf300d['shift']());}}}(a0_0x128b,0x2a63e));import{mkdirSync,writeFileSync}from'node:fs';function a0_0x128b(){const _0x3a0b29=['34730Qqlpqy','138378CterYZ','8206KpPcCg','588LsuOdP','datasetCode','utf8','POST','369NASbkN','生成文档成功:\x20','tableName','.md\x20-\x20','api-doc','60ilrbcL','Invalid\x20response\x20format\x20(','7loEQqo','171858lPXswJ','./docs','success','log','32440VLzEZn',']\x20Generating:\x20','error','name','length','/api/node-toolbox/api-doc-generator','✗\x20Failed:\x20','2607600jOiDpY','):\x20missing\x20data.markdown\x20field','.md','Fetch\x20doc\x20(','53TjtAJp','.md\x20(','81554oyedxt','push','markdown'];a0_0x128b=function(){return _0x3a0b29;};return a0_0x128b();}import a0_0x21ef32 from'node:path';function a0_0x80ab(_0x1cc8b7,_0x2f4971){_0x1cc8b7=_0x1cc8b7-0x1e1;const _0x128b7f=a0_0x128b();let _0x80abb4=_0x128b7f[_0x1cc8b7];return _0x80abb4;}import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{platformFetch}from'../core/api-client.js';export async function fetchDatasetDoc(_0xb0bc77){const _0x1ad112=a0_0x80ab,{appCode:_0x3b3ea6,cookie:_0x4465e8,datasetCode:_0x5b59d4,datasetId:_0x1bf99c,extraParams:_0x4183f5}=_0xb0bc77,_0x595cbe=getApiDomain()+_0x1ad112(0x1ee),_0x5a4a78=await platformFetch(_0x595cbe,{'method':_0x1ad112(0x1ff),'body':{'appCode':_0x3b3ea6,'datasetCode':_0x5b59d4,'datasetId':_0x1bf99c,..._0x4183f5||{}},'cookie':_0x4465e8,'label':_0x1ad112(0x1f3)+_0x5b59d4+')'});if(!_0x5a4a78||typeof _0x5a4a78['markdown']!=='string')throw new Error(_0x1ad112(0x1e3)+_0x5b59d4+_0x1ad112(0x1f1));return _0x5a4a78[_0x1ad112(0x1f8)];}function delay(_0x2cfe3a){return new Promise(_0x13c0ba=>setTimeout(_0x13c0ba,_0x2cfe3a));}export async function generateDatasetDocs(_0x58c8ac,_0x42d8e3,_0x586c51,_0x5773e9=a0_0x1739cc(0x1e6),_0x3ea50a,_0x22162b){const _0x4dce66=a0_0x1739cc;mkdirSync(_0x5773e9,{'recursive':!![]});const _0x560ade=[],_0xa003bf=_0x58c8ac[_0x4dce66(0x1ed)];console[_0x4dce66(0x1e8)]('\x0a'+_0xa003bf+'\x20datasets\x20to\x20generate\x20docs\x20for\x0a');for(let _0x27f669=0x0;_0x27f669<_0x58c8ac[_0x4dce66(0x1ed)];_0x27f669++){const _0x46127c=_0x58c8ac[_0x27f669],_0xb14e8=_0x27f669+0x1,_0x232236=_0x46127c[_0x4dce66(0x202)];try{console[_0x4dce66(0x1e8)]('['+_0xb14e8+'/'+_0xa003bf+_0x4dce66(0x1ea)+_0x232236+_0x4dce66(0x1f5)+_0x46127c[_0x4dce66(0x1ec)]+')');if(_0x3ea50a)_0x3ea50a(_0xb14e8,_0xa003bf,_0x232236);const _0x53c1d3=await fetchDatasetDoc({'appCode':_0x42d8e3,'cookie':_0x586c51,'datasetCode':_0x46127c[_0x4dce66(0x1fd)],'datasetId':_0x46127c['id'],'enableAI':![],'extraParams':_0x22162b}),_0x3f7898=a0_0x21ef32['join'](_0x5773e9,_0x232236+_0x4dce66(0x1f2));writeFileSync(_0x3f7898,_0x53c1d3,{'encoding':_0x4dce66(0x1fe)}),console['log']('✓\x20Generated:\x20'+_0x232236+_0x4dce66(0x1f2)),logger[_0x4dce66(0x1e7)](_0x4dce66(0x1e1),_0x4dce66(0x201)+_0x232236,undefined,{'datasetCode':_0x46127c[_0x4dce66(0x1fd)],'datasetName':_0x46127c[_0x4dce66(0x1ec)],'filePath':_0x3f7898,'progress':_0xb14e8+'/'+_0xa003bf}),_0x560ade[_0x4dce66(0x1f7)]({'datasetCode':_0x46127c[_0x4dce66(0x1fd)],'datasetName':_0x46127c[_0x4dce66(0x1ec)],'filePath':_0x3f7898,'success':!![]});if(_0xb14e8<_0xa003bf)await delay(0x1388);}catch(_0x213b46){const _0x2739b2=_0x213b46 instanceof Error?_0x213b46['message']:String(_0x213b46);console[_0x4dce66(0x1e8)](_0x4dce66(0x1ef)+_0x232236+_0x4dce66(0x203)+_0x2739b2),logger[_0x4dce66(0x1eb)](_0x4dce66(0x1e1),'生成文档失败:\x20'+_0x46127c[_0x4dce66(0x1fd)],{'datasetCode':_0x46127c[_0x4dce66(0x1fd)],'datasetName':_0x46127c['name'],'error':_0x2739b2,'progress':_0xb14e8+'/'+_0xa003bf}),_0x560ade[_0x4dce66(0x1f7)]({'datasetCode':_0x46127c[_0x4dce66(0x1fd)],'datasetName':_0x46127c['name'],'filePath':'','success':![],'error':_0x2739b2}),_0xb14e8<_0xa003bf&&(console[_0x4dce66(0x1e8)]('Waiting\x203\x20seconds...\x0a'),await delay(0xbb8));}}return _0x560ade;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x260bfd,_0x3eaaa7){const _0x3744c6=a1_0x4b33,_0x42b6fe=_0x260bfd();while(!![]){try{const _0x14f723=parseInt(_0x3744c6(0x13b))/0x1+-parseInt(_0x3744c6(0x13e))/0x2+parseInt(_0x3744c6(0x136))/0x3+-parseInt(_0x3744c6(0x139))/0x4*(-parseInt(_0x3744c6(0x13c))/0x5)+-parseInt(_0x3744c6(0x13f))/0x6+parseInt(_0x3744c6(0x133))/0x7+parseInt(_0x3744c6(0x13d))/0x8;if(_0x14f723===_0x3eaaa7)break;else _0x42b6fe['push'](_0x42b6fe['shift']());}catch(_0x368bb5){_0x42b6fe['push'](_0x42b6fe['shift']());}}}(a1_0x1e4b,0xd4265));import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';function a1_0x1e4b(){const _0xc9846c=['name','fetch-model-list','2708wUeNvH','map','1481208gRQurQ','215Hturhv','1183568VQZYcp','2933476HzpDaK','3389472jyyrOp','replace','Fetch\x20datasets','5667235OupWaU','&otype=array','正在从服务器拉取模型列表...\x20(环境:\x20','1298235zfAxfL'];a1_0x1e4b=function(){return _0xc9846c;};return a1_0x1e4b();}import{platformFetch}from'../core/api-client.js';function a1_0x4b33(_0x24eaae,_0x181e14){_0x24eaae=_0x24eaae-0x132;const _0x1e4b0d=a1_0x1e4b();let _0x4b33fe=_0x1e4b0d[_0x24eaae];return _0x4b33fe;}function cleanNewlines(_0x5d43ff){const _0x3e4204=a1_0x4b33;return _0x5d43ff[_0x3e4204(0x140)](/[\r\n]+/g,'\x20')['trim']();}function cleanDatasetName(_0x8dab6a){const _0x505a43=a1_0x4b33;if(!_0x8dab6a[_0x505a43(0x137)])return _0x8dab6a;return{..._0x8dab6a,'name':cleanNewlines(_0x8dab6a[_0x505a43(0x137)])};}export async function fetchModelList(_0x1d099e,_0x10f13a){const _0x44fa6a=a1_0x4b33,_0xbf56d8=getEnv(),_0x1c13b6=getApiDomain()+'/api/node-toolbox/dataset/model-list?appcode='+_0x1d099e+_0x44fa6a(0x134);logger['info'](_0x44fa6a(0x138),_0x44fa6a(0x135)+_0xbf56d8+')',{'apiUrl':_0x1c13b6});const _0x49171b=await platformFetch(_0x1c13b6,{'cookie':_0x10f13a,'label':_0x44fa6a(0x132)}),_0x54392b=(_0x49171b['configArray']??[])[_0x44fa6a(0x13a)](cleanDatasetName);return{'configArray':_0x54392b,'count':_0x54392b['length']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3366d0,_0x58ab39){const _0x3ed7c3=a2_0x4066,_0x476deb=_0x3366d0();while(!![]){try{const _0x18a12b=parseInt(_0x3ed7c3(0x191))/0x1*(-parseInt(_0x3ed7c3(0x198))/0x2)+-parseInt(_0x3ed7c3(0x176))/0x3*(-parseInt(_0x3ed7c3(0x197))/0x4)+parseInt(_0x3ed7c3(0x196))/0x5*(parseInt(_0x3ed7c3(0x193))/0x6)+parseInt(_0x3ed7c3(0x194))/0x7+parseInt(_0x3ed7c3(0x17e))/0x8+-parseInt(_0x3ed7c3(0x17f))/0x9+-parseInt(_0x3ed7c3(0x190))/0xa*(parseInt(_0x3ed7c3(0x175))/0xb);if(_0x18a12b===_0x58ab39)break;else _0x476deb['push'](_0x476deb['shift']());}catch(_0x16639){_0x476deb['push'](_0x476deb['shift']());}}}(a2_0x14cb,0xd5411));import a2_0x3e0634 from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a2_0x329e3d 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(_0x55e4ce,_0x37f2ef,_0x5801e4,_0x543fce,_0x579524,_0x3b045d,_0x15d5f1){const _0x2b5a7c=a2_0x4066;if(!_0x5801e4)throw new Error(_0x2b5a7c(0x187)+CLI_BIN_NAME+_0x2b5a7c(0x17d));const _0x1882bf=_0x543fce&&!_0x15d5f1,_0x4704ed=_0x15d5f1||_0x5801e4,_0x46559a=_0x1882bf?'CONFIG_NAMES.DEFAULT':'\x22'+_0x4704ed+'\x22',_0x385d60=!isProduction(_0x579524);let _0x358c88;if(_0x1882bf)_0x385d60?_0x358c88='{\x20apiConfigName:\x20'+_0x46559a+_0x2b5a7c(0x18e)+_0x579524+_0x2b5a7c(0x182):_0x358c88='';else{const _0x985dc7=_0x385d60?_0x2b5a7c(0x18e)+_0x579524+'\x22':'';_0x358c88=_0x2b5a7c(0x178)+_0x4704ed+'\x22'+_0x985dc7+'\x20}';}const _0x577ee5=_0x37f2ef?_0x37f2ef+'-api':_0x2b5a7c(0x18c),_0x488b09=_0x37f2ef?_0x37f2ef+'-client':_0x2b5a7c(0x17a),_0x42c00c=_0x37f2ef&&!/^app-[a-f0-9]+$/i[_0x2b5a7c(0x192)](_0x37f2ef)?_0x37f2ef[_0x2b5a7c(0x173)](/-/g,'_')[_0x2b5a7c(0x183)]():_0x2b5a7c(0x17c),_0xc11475=[];_0x55e4ce['forEach'](_0x1fdbcb=>{const _0x29ad2f=_0x2b5a7c;_0xc11475['push']({'datasetCode':_0x1fdbcb['datasetCode'],'tableName':_0x1fdbcb['tableName'],'name':_0x1fdbcb['name']||'','alias':_0x1fdbcb[_0x29ad2f(0x177)]||_0x1fdbcb[_0x29ad2f(0x180)]});});const _0x5aa55d=fileURLToPath(import.meta.url),_0x3beee1=a2_0x329e3d[_0x2b5a7c(0x189)](a2_0x329e3d[_0x2b5a7c(0x18f)](_0x5aa55d),_0x2b5a7c(0x179)),_0x1dd233=a2_0x329e3d[_0x2b5a7c(0x18b)](_0x3beee1,'templates/generate-api'),_0x3c4ab5=a2_0x329e3d[_0x2b5a7c(0x18b)](_0x1dd233,'api.ts.tpl'),_0x3be771=a2_0x329e3d[_0x2b5a7c(0x18b)](_0x1dd233,_0x2b5a7c(0x195)),_0x53a757=_0x3b045d;mkdirSync(_0x53a757,{'recursive':!![]});const _0x403ce6=_0xc11475[0x0]?.['alias'],_0x1495d4=readFileSync(_0x3c4ab5,_0x2b5a7c(0x17b)),_0x2c3c7c=TemplateReplacer[_0x2b5a7c(0x186)](_0x1495d4,_0x5801e4,_0xc11475,_0x403ce6,_0x577ee5,_0x46559a,undefined,_0x42c00c),_0x1e20c0=await a2_0x3e0634['format'](_0x2c3c7c,{'parser':'typescript'}),_0x14dcb3=a2_0x329e3d[_0x2b5a7c(0x18b)](_0x53a757,_0x577ee5+_0x2b5a7c(0x18d));writeFileSync(_0x14dcb3,_0x1e20c0,{'encoding':_0x2b5a7c(0x17b)});const _0x4872b0=readFileSync(_0x3be771,_0x2b5a7c(0x17b)),_0x3261d4=TemplateReplacer[_0x2b5a7c(0x186)](_0x4872b0,_0x5801e4,_0xc11475,_0x403ce6,_0x577ee5,_0x46559a,_0x358c88,_0x42c00c),_0x1ab8d7=await a2_0x3e0634[_0x2b5a7c(0x181)](_0x3261d4,{'parser':_0x2b5a7c(0x185)}),_0x164e02=a2_0x329e3d[_0x2b5a7c(0x18b)](_0x53a757,_0x488b09+'.ts');writeFileSync(_0x164e02,_0x1ab8d7,{'encoding':_0x2b5a7c(0x17b)});const _0x52966e=_0xc11475[_0x2b5a7c(0x174)];return logger[_0x2b5a7c(0x184)](_0x2b5a7c(0x18a),_0x2b5a7c(0x188),undefined,{'apiFile':_0x14dcb3,'clientFile':_0x164e02,'modelCount':_0x52966e,'configName':_0x46559a}),{'modelCount':_0x52966e,'apiFilePath':_0x14dcb3,'clientFilePath':_0x164e02,'configName':_0x46559a};}function a2_0x4066(_0x329eb2,_0x54a24b){_0x329eb2=_0x329eb2-0x173;const _0x14cb92=a2_0x14cb();let _0x40664b=_0x14cb92[_0x329eb2];return _0x40664b;}function a2_0x14cb(){const _0x26a7a2=['replaceApiContent','Please\x20configure\x20app\x20code\x20first\x20via\x20`','API\x20文件生成成功!','resolve','init-api','join','api','.ts',',\x20env:\x20\x22','dirname','36371960azZNiW','193jtbaNF','test','6zMgGVB','9050909fERhEX','client.ts.tpl','7028590VxnsiV','4VwjgKY','932GWZspm','replace','length','11TILfIX','2435289mAeqXB','alias','{\x20apiConfigName:\x20\x22','../..','client','utf8','LOVRABET','\x20config\x20set\x20app\x20<value>`','9294520uDPbDh','644940tKQnNV','key','format','\x22\x20}','toUpperCase','success','typescript'];a2_0x14cb=function(){return _0x26a7a2;};return a2_0x14cb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x533d2f,_0x543104){const _0x5cfde4=a3_0x5cc2,_0x3fdd24=_0x533d2f();while(!![]){try{const _0x453c49=parseInt(_0x5cfde4(0x1f4))/0x1*(-parseInt(_0x5cfde4(0x1eb))/0x2)+-parseInt(_0x5cfde4(0x1e8))/0x3*(-parseInt(_0x5cfde4(0x1f3))/0x4)+parseInt(_0x5cfde4(0x1ec))/0x5+parseInt(_0x5cfde4(0x1ef))/0x6+-parseInt(_0x5cfde4(0x1e7))/0x7+parseInt(_0x5cfde4(0x1e9))/0x8+parseInt(_0x5cfde4(0x1f1))/0x9;if(_0x453c49===_0x543104)break;else _0x3fdd24['push'](_0x3fdd24['shift']());}catch(_0x26832e){_0x3fdd24['push'](_0x3fdd24['shift']());}}}(a3_0x2d64,0xe629a));import{getIsSessionValid}from'../auth/is-session-valid.js';function a3_0x2d64(){const _0x4dcd90=['3851648WUsuNX','log','14riZWjS','4356560PhATJP','*\x20Login\x20successful!','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','3232866ZgsTrB','!\x20Login\x20failed.','11488239BCCYFo','start','4euWYJE','128671TBDDZe','No\x20valid\x20session.\x20Login\x20now?','9369997wXhbxS','41892lDpzCo'];a3_0x2d64=function(){return _0x4dcd90;};return a3_0x2d64();}import{authServer}from'../auth/auth-server.js';function a3_0x5cc2(_0x51796a,_0x4b39d0){_0x51796a=_0x51796a-0x1e7;const _0x2d6455=a3_0x2d64();let _0x5cc20e=_0x2d6455[_0x51796a];return _0x5cc20e;}import{confirm}from'@inquirer/prompts';import a3_0x1137c9 from'ora';export async function runAuthServer(){const _0x270891=a3_0x5cc2,_0x5e8129=await getIsSessionValid();if(_0x5e8129){console[_0x270891(0x1ea)]('√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.');return;}const _0x43bd0c=await confirm({'message':_0x270891(0x1f5),'default':!![]});if(!_0x43bd0c)return;const _0x7dc545=a3_0x1137c9(_0x270891(0x1ee))[_0x270891(0x1f2)](),_0x282454=await authServer({'silent':!![]});_0x7dc545['stop'](),_0x282454?console[_0x270891(0x1ea)](_0x270891(0x1ed)):console[_0x270891(0x1ea)](_0x270891(0x1f0));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x4220e5=a4_0x3393;(function(_0x410681,_0x583905){const _0x40b580=a4_0x3393,_0x4e1d08=_0x410681();while(!![]){try{const _0x545bd9=-parseInt(_0x40b580(0x1de))/0x1+parseInt(_0x40b580(0x1e7))/0x2*(-parseInt(_0x40b580(0x1f5))/0x3)+parseInt(_0x40b580(0x1f3))/0x4*(-parseInt(_0x40b580(0x1f0))/0x5)+-parseInt(_0x40b580(0x1ed))/0x6+-parseInt(_0x40b580(0x1e4))/0x7+parseInt(_0x40b580(0x1ec))/0x8*(-parseInt(_0x40b580(0x1e8))/0x9)+parseInt(_0x40b580(0x1f9))/0xa*(parseInt(_0x40b580(0x1d8))/0xb);if(_0x545bd9===_0x583905)break;else _0x4e1d08['push'](_0x4e1d08['shift']());}catch(_0x5ee5f4){_0x4e1d08['push'](_0x4e1d08['shift']());}}}(a4_0x4f81,0x3ca9c));import{writeFileSync}from'node:fs';import a4_0x47ea6a from'node:https';import{getUserDomain}from'../constant/domain.js';function a4_0x3393(_0x2e95e8,_0x109081){_0x2e95e8=_0x2e95e8-0x1d1;const _0x4f8128=a4_0x4f81();let _0x33934f=_0x4f8128[_0x2e95e8];return _0x33934f;}import{exec}from'node:child_process';function a4_0x4f81(){const _0x261187=['session','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','319flgjgq','json','https://g.yuntooai.com/cert/lovrabet-dev.json','darwin','🔐\x20Starting\x20login\x20service...','log','101470RYZCyA','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','listen','xdg-open\x20\x22','createServer','cmd\x20/c\x20start\x20\x22\x22\x20\x22','492961rIyRzx','error','https://dev.lovrabet.com:','25378UernGO','23553ymCRvW','text/html;\x20charset=utf-8','win32','catch','1496yPFsdX','2654226nUmRLh','end','cookie','95BvNLgF','127.0.0.1','📍\x20Login\x20URL:','56048twnaGn','writeHead','54xvnYqc','open\x20\x22','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','Auth\x20server\x20error:','636810aJfQJr','platform','isAuth','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','object','/api/auth/get-session','then'];a4_0x4f81=function(){return _0x261187;};return a4_0x4f81();}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(_0x370935){const _0x1a42ef=a4_0x3393,_0x2e8f12=_0x370935?.['silent']||![];if(await getIsSessionValid())return!![];const _0x2a3dd4=await(await fetch(_0x1a42ef(0x1da)))[_0x1a42ef(0x1d9)]();return new Promise(async(_0x28c6ab,_0x5e5152)=>{const _0x2ea610=_0x1a42ef;let _0x5cf5db=0x0;const _0x424673=a4_0x47ea6a[_0x2ea610(0x1e2)](_0x2a3dd4,async(_0x11c985,_0x2b1b3a)=>{const _0x4bdb4d=_0x2ea610,_0x1f82d9=getUserDomain(),_0x524d7c=_0x11c985['headers'][_0x4bdb4d(0x1ef)]||'',_0x4999f9=await fetch(_0x1f82d9+_0x4bdb4d(0x1d4),{'headers':{'cookie':_0x524d7c}})['then'](_0xebd64b=>_0xebd64b[_0x4bdb4d(0x1d9)]()),_0x695b88=_0x4999f9&&_0x4999f9[_0x4bdb4d(0x1d6)]&&_0x4999f9['user'];if(_0x695b88){writeFileSync(cookieFile,_0x524d7c,'utf-8'),_0x28c6ab(!![]);const _0xfff0c8=buildLoginSuccessHtml();_0x2b1b3a[_0x4bdb4d(0x1f4)](0xc8,{'Content-Type':_0x4bdb4d(0x1e9)}),_0x2b1b3a[_0x4bdb4d(0x1ee)](_0xfff0c8),_0x424673['close']();}else{const _0x562079=''+encodeURIComponent(_0x4bdb4d(0x1e6)+_0x5cf5db);_0x2b1b3a[_0x4bdb4d(0x1f4)](0x12e,{'location':_0x1f82d9+'/sign-in?redirect='+_0x562079}),_0x2b1b3a[_0x4bdb4d(0x1ee)]();return;}});_0x424673[_0x2ea610(0x1e0)](0x0,_0x2ea610(0x1f1),()=>{const _0x3001da=_0x2ea610,_0x2e77dc=_0x424673['address']();_0x5cf5db=typeof _0x2e77dc===_0x3001da(0x1d3)&&_0x2e77dc?_0x2e77dc['port']:Number(_0x2e77dc);const _0x40eb47=_0x3001da(0x1e6)+_0x5cf5db;!_0x2e8f12&&(console[_0x3001da(0x1dd)](_0x3001da(0x1dc)),console[_0x3001da(0x1dd)](_0x3001da(0x1f2),_0x40eb47),console[_0x3001da(0x1dd)]('🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...'),console[_0x3001da(0x1dd)](''),console['log'](_0x3001da(0x1d2)),console[_0x3001da(0x1dd)]('')),openInBrowser(_0x40eb47)[_0x3001da(0x1d5)](_0x2a3e78=>{const _0x6ceba=_0x3001da;!_0x2e8f12&&(_0x2a3e78?console[_0x6ceba(0x1dd)](_0x6ceba(0x1f7)):(console[_0x6ceba(0x1dd)](_0x6ceba(0x1df)),console['log'](_0x6ceba(0x1d7),_0x40eb47)),console[_0x6ceba(0x1dd)](''));})[_0x3001da(0x1eb)](()=>{const _0x5ceeb9=_0x3001da;!_0x2e8f12&&(console[_0x5ceeb9(0x1dd)](_0x5ceeb9(0x1df)),console['log'](_0x5ceeb9(0x1d7),_0x40eb47),console['log'](''));});}),_0x424673['on']('error',_0x292ecb=>{const _0x48e444=_0x2ea610;!_0x2e8f12&&console[_0x48e444(0x1e5)](_0x48e444(0x1f8),_0x292ecb),_0x5e5152(_0x292ecb);});});}function openInBrowser(_0x211e85){return new Promise(_0x20cf4d=>{const _0x490ee0=a4_0x3393,_0x5beb5f=process[_0x490ee0(0x1fa)];let _0x95df2;if(_0x5beb5f===_0x490ee0(0x1ea))_0x95df2=_0x490ee0(0x1e3)+_0x211e85+'\x22';else _0x5beb5f===_0x490ee0(0x1db)?_0x95df2=_0x490ee0(0x1f6)+_0x211e85+'\x22':_0x95df2=_0x490ee0(0x1e1)+_0x211e85+'\x22';exec(_0x95df2,_0x4f3915=>{_0x4f3915?_0x20cf4d(![]):_0x20cf4d(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a4_0x4220e5(0x1dd)](a4_0x4220e5(0x1d1),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x5e3b28=a5_0xd449;(function(_0xe2cd3a,_0x10f532){const _0x34cc04=a5_0xd449,_0x2b5e02=_0xe2cd3a();while(!![]){try{const _0x38170c=parseInt(_0x34cc04(0x1e1))/0x1*(parseInt(_0x34cc04(0x1de))/0x2)+parseInt(_0x34cc04(0x1ea))/0x3+parseInt(_0x34cc04(0x1e5))/0x4*(-parseInt(_0x34cc04(0x1e2))/0x5)+parseInt(_0x34cc04(0x1e9))/0x6+-parseInt(_0x34cc04(0x1e3))/0x7*(parseInt(_0x34cc04(0x1e4))/0x8)+parseInt(_0x34cc04(0x1e0))/0x9+-parseInt(_0x34cc04(0x1e8))/0xa*(parseInt(_0x34cc04(0x1df))/0xb);if(_0x38170c===_0x10f532)break;else _0x2b5e02['push'](_0x2b5e02['shift']());}catch(_0x17dfaa){_0x2b5e02['push'](_0x2b5e02['shift']());}}}(a5_0xbecf,0x43f60));import{mkdirSync}from'node:fs';function a5_0xd449(_0x3c5639,_0x5d8eac){_0x3c5639=_0x3c5639-0x1de;const _0xbecfe2=a5_0xbecf();let _0xd449e4=_0xbecfe2[_0x3c5639];return _0xd449e4;}import{homedir}from'node:os';function a5_0xbecf(){const _0x1b2ce8=['74113ihaYoJ','10Vahjjd','35KthEzd','258288HKdApC','663524uFHFUT','cookie','.lovrabet','70190tmMSwP','777090IGkkBJ','793848XSJIlO','6Popzlf','11mhshtK','1458981TmjqSf'];a5_0xbecf=function(){return _0x1b2ce8;};return a5_0xbecf();}import{join}from'node:path';export const configDir=join(homedir(),a5_0x5e3b28(0x1e7));export const cookieFile=join(configDir,a5_0x5e3b28(0x1e6));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a6_0x4a85(_0x57229d,_0xb4dc4e){_0x57229d=_0x57229d-0x1aa;var _0x185f79=a6_0x185f();var _0x4a853c=_0x185f79[_0x57229d];return _0x4a853c;}(function(_0x4a81b6,_0x2c87ad){var _0x3d5465=a6_0x4a85,_0x3fe294=_0x4a81b6();while(!![]){try{var _0x5178b5=-parseInt(_0x3d5465(0x1ac))/0x1+parseInt(_0x3d5465(0x1ab))/0x2+parseInt(_0x3d5465(0x1af))/0x3+-parseInt(_0x3d5465(0x1b0))/0x4*(parseInt(_0x3d5465(0x1ae))/0x5)+parseInt(_0x3d5465(0x1b1))/0x6+-parseInt(_0x3d5465(0x1ad))/0x7+parseInt(_0x3d5465(0x1aa))/0x8;if(_0x5178b5===_0x2c87ad)break;else _0x3fe294['push'](_0x3fe294['shift']());}catch(_0x2c9301){_0x3fe294['push'](_0x3fe294['shift']());}}}(a6_0x185f,0x7385f));import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';function a6_0x185f(){var _0x25c9d9=['1426929IvfuFc','239260WhrTvc','1337892mJSCjy','16droDxS','1112328Fwkmhv','utf-8','2426736MZZMlk','1697378JlIFem','914945xpYFej'];a6_0x185f=function(){return _0x25c9d9;};return a6_0x185f();}export function getCookie(){var _0x3924a6=a6_0x4a85;try{return readFileSync(cookieFile,_0x3924a6(0x1b2));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a7_0x3bba(_0x124e43,_0x1b7c9d){_0x124e43=_0x124e43-0xd7;const _0x44937c=a7_0x4493();let _0x3bba03=_0x44937c[_0x124e43];return _0x3bba03;}(function(_0x4105d6,_0x1efcde){const _0x2e3425=a7_0x3bba,_0x1ae5e3=_0x4105d6();while(!![]){try{const _0x1ed89a=-parseInt(_0x2e3425(0xd9))/0x1+parseInt(_0x2e3425(0xe0))/0x2*(parseInt(_0x2e3425(0xe1))/0x3)+-parseInt(_0x2e3425(0xde))/0x4+-parseInt(_0x2e3425(0xd7))/0x5*(parseInt(_0x2e3425(0xe3))/0x6)+-parseInt(_0x2e3425(0xda))/0x7+-parseInt(_0x2e3425(0xe2))/0x8+parseInt(_0x2e3425(0xd8))/0x9;if(_0x1ed89a===_0x1efcde)break;else _0x1ae5e3['push'](_0x1ae5e3['shift']());}catch(_0x5740ba){_0x1ae5e3['push'](_0x1ae5e3['shift']());}}}(a7_0x4493,0x6c014));function a7_0x4493(){const _0x2054ed=['48moaMUv','217840Pksygu','21617874GeOWJR','339720aAMWyq','599914cHnakX','/api/auth/get-session','user','utf-8','2961792ihjrMD','session','282232yLLDBp','9ywLFrB','6948256xrZfzT'];a7_0x4493=function(){return _0x2054ed;};return a7_0x4493();}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0x2f68b2=a7_0x3bba;try{if(!existsSync(cookieFile))return null;const _0x55d80c=readFileSync(cookieFile,_0x2f68b2(0xdd)),_0xb94cb7=await fetch(getUserDomain()+_0x2f68b2(0xdb),{'headers':{'cookie':_0x55d80c}});if(!_0xb94cb7['ok'])return null;const _0x14be4c=await _0xb94cb7['json']();if(!_0x14be4c[_0x2f68b2(0xdf)]||!_0x14be4c[_0x2f68b2(0xdc)])return null;return _0x14be4c;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a8_0x544f(){const _0x180e05=['1409649fcKLCu','7993374HxysjT','5tBPRJy','utf-8','8ihhNhk','1526344ZoNERN','session','user','29516410IRrAsX','6018411MfOoGr','106tYtZcT','8725vcbveg','/api/auth/get-session','json','5393493fIrVJn'];a8_0x544f=function(){return _0x180e05;};return a8_0x544f();}function a8_0x54d9(_0x5d3913,_0x23a7da){_0x5d3913=_0x5d3913-0x9d;const _0x544f16=a8_0x544f();let _0x54d9fc=_0x544f16[_0x5d3913];return _0x54d9fc;}(function(_0xafb6c0,_0x2da142){const _0x1d9877=a8_0x54d9,_0x1b8266=_0xafb6c0();while(!![]){try{const _0x2eae27=parseInt(_0x1d9877(0x9f))/0x1*(parseInt(_0x1d9877(0x9e))/0x2)+-parseInt(_0x1d9877(0xa3))/0x3*(parseInt(_0x1d9877(0xa7))/0x4)+parseInt(_0x1d9877(0xa5))/0x5*(-parseInt(_0x1d9877(0xa4))/0x6)+-parseInt(_0x1d9877(0x9d))/0x7+-parseInt(_0x1d9877(0xa8))/0x8+parseInt(_0x1d9877(0xa2))/0x9+parseInt(_0x1d9877(0xab))/0xa;if(_0x2eae27===_0x2da142)break;else _0x1b8266['push'](_0x1b8266['shift']());}catch(_0x325589){_0x1b8266['push'](_0x1b8266['shift']());}}}(a8_0x544f,0xa8a5e));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x1fa4e4=a8_0x54d9;try{if(!existsSync(cookieFile))return![];const _0x31ec68=readFileSync(cookieFile,_0x1fa4e4(0xa6)),_0x1395ec=await fetch(getUserDomain()+_0x1fa4e4(0xa0),{'headers':{'cookie':_0x31ec68}})['then'](_0x147f6a=>_0x147f6a[_0x1fa4e4(0xa1)]());return _0x1395ec&&_0x1395ec[_0x1fa4e4(0xa9)]&&_0x1395ec[_0x1fa4e4(0xaa)];}catch{}return![];}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a9_0x1b50(){const _0x28ae14=['27431090fFddDt','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','411msplQq','879494PSVQdK','3775410FYSeUd','54csoZSv','2570oyjUAl','12531288Lyzqbd','5270zJRNhC','</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>','236LlUlFI','1294239KODpiP'];a9_0x1b50=function(){return _0x28ae14;};return a9_0x1b50();}function a9_0x1aa9(_0x3ff982,_0x341f6e){_0x3ff982=_0x3ff982-0x18f;const _0x1b508d=a9_0x1b50();let _0x1aa9cc=_0x1b508d[_0x3ff982];return _0x1aa9cc;}(function(_0x10dadb,_0x237995){const _0x5aebf2=a9_0x1aa9,_0x19cecf=_0x10dadb();while(!![]){try{const _0x368f12=parseInt(_0x5aebf2(0x197))/0x1+parseInt(_0x5aebf2(0x192))/0x2*(-parseInt(_0x5aebf2(0x19a))/0x3)+parseInt(_0x5aebf2(0x196))/0x4*(parseInt(_0x5aebf2(0x194))/0x5)+parseInt(_0x5aebf2(0x191))/0x6*(-parseInt(_0x5aebf2(0x18f))/0x7)+-parseInt(_0x5aebf2(0x193))/0x8+-parseInt(_0x5aebf2(0x190))/0x9+parseInt(_0x5aebf2(0x198))/0xa;if(_0x368f12===_0x237995)break;else _0x19cecf['push'](_0x19cecf['shift']());}catch(_0x299328){_0x19cecf['push'](_0x19cecf['shift']());}}}(a9_0x1b50,0xc4f9a));export function buildLoginSuccessHtml(){const _0x29470c=a9_0x1aa9,_0x583721=_0x29470c(0x199);return'<!doctype\x20html>\x0a<html\x20lang=\x22en\x22>\x0a<head>\x0a\x20\x20<meta\x20charset=\x22utf-8\x22>\x0a\x20\x20<meta\x20name=\x22viewport\x22\x20content=\x22width=device-width,\x20initial-scale=1\x22>\x0a\x20\x20<title>Login\x20successful\x20·\x20Rabetbase\x20CLI</title>\x0a\x20\x20<style>\x0a\x20\x20\x20\x20:root\x20{\x0a\x20\x20\x20\x20\x20\x20--bg0:\x20#0f1419;\x0a\x20\x20\x20\x20\x20\x20--bg1:\x20#1a2332;\x0a\x20\x20\x20\x20\x20\x20--card:\x20#ffffff;\x0a\x20\x20\x20\x20\x20\x20--text:\x20#1c2128;\x0a\x20\x20\x20\x20\x20\x20--muted:\x20#5c6570;\x0a\x20\x20\x20\x20\x20\x20--accent:\x20#2563eb;\x0a\x20\x20\x20\x20\x20\x20--accent-soft:\x20#eff6ff;\x0a\x20\x20\x20\x20\x20\x20--success:\x20#059669;\x0a\x20\x20\x20\x20\x20\x20--radius:\x2016px;\x0a\x20\x20\x20\x20\x20\x20--shadow:\x200\x2025px\x2050px\x20-12px\x20rgba(15,\x2020,\x2025,\x200.35);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20*\x20{\x20box-sizing:\x20border-box;\x20}\x0a\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20min-height:\x20100vh;\x0a\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20\x20\x20padding:\x2024px;\x0a\x20\x20\x20\x20\x20\x20font-family:\x20ui-sans-serif,\x20system-ui,\x20-apple-system,\x20\x22Segoe\x20UI\x22,\x20Roboto,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22Helvetica\x20Neue\x22,\x20Arial,\x20\x22Noto\x20Sans\x22,\x20\x22PingFang\x20SC\x22,\x20\x22Microsoft\x20YaHei\x22,\x20sans-serif;\x0a\x20\x20\x20\x20\x20\x20background:\x20linear-gradient(160deg,\x20var(--bg0)\x200%,\x20var(--bg1)\x2045%,\x20#243047\x20100%);\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--text);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.card\x20{\x0a\x20\x20\x20\x20\x20\x20width:\x20100%;\x0a\x20\x20\x20\x20\x20\x20max-width:\x20420px;\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--card);\x0a\x20\x20\x20\x20\x20\x20border-radius:\x20var(--radius);\x0a\x20\x20\x20\x20\x20\x20box-shadow:\x20var(--shadow);\x0a\x20\x20\x20\x20\x20\x20padding:\x2040px\x2036px\x2032px;\x0a\x20\x20\x20\x20\x20\x20text-align:\x20center;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.icon\x20{\x0a\x20\x20\x20\x20\x20\x20width:\x2064px;\x0a\x20\x20\x20\x20\x20\x20height:\x2064px;\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x20auto\x2020px;\x0a\x20\x20\x20\x20\x20\x20border-radius:\x2050%;\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--accent-soft);\x0a\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.icon\x20svg\x20{\x20width:\x2036px;\x20height:\x2036px;\x20}\x0a\x20\x20\x20\x20h1\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x200\x2012px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x201.375rem;\x0a\x20\x20\x20\x20\x20\x20font-weight:\x20600;\x0a\x20\x20\x20\x20\x20\x20letter-spacing:\x20-0.02em;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20p.lead\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x200\x208px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.9375rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--muted);\x0a\x20\x20\x20\x20\x20\x20line-height:\x201.55;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.countdown\x20{\x0a\x20\x20\x20\x20\x20\x20display:\x20inline-flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20gap:\x206px;\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2016px;\x0a\x20\x20\x20\x20\x20\x20padding:\x208px\x2014px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.875rem;\x0a\x20\x20\x20\x20\x20\x20font-variant-numeric:\x20tabular-nums;\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--accent);\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--accent-soft);\x0a\x20\x20\x20\x20\x20\x20border-radius:\x20999px;\x0a\x20\x20\x20\x20\x20\x20font-weight:\x20500;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20#manualMsg\x20{\x0a\x20\x20\x20\x20\x20\x20display:\x20none;\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2020px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.8125rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20#b91c1c;\x0a\x20\x20\x20\x20\x20\x20line-height:\x201.45;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.cli-hint\x20{\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2028px;\x0a\x20\x20\x20\x20\x20\x20padding-top:\x2024px;\x0a\x20\x20\x20\x20\x20\x20border-top:\x201px\x20solid\x20#e8ecf0;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.75rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20#8b949e;\x0a\x20\x20\x20\x20}\x0a\x20\x20</style>\x0a</head>\x0a<body>\x0a\x20\x20<div\x20class=\x22card\x22\x20role=\x22status\x22\x20aria-live=\x22polite\x22>\x0a\x20\x20\x20\x20<div\x20class=\x22icon\x22\x20aria-hidden=\x22true\x22>\x0a\x20\x20\x20\x20\x20\x20<svg\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x2210\x22\x20stroke=\x22#059669\x22\x20stroke-width=\x222\x22\x20fill=\x22none\x22/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M8\x2012.5l2.5\x202.5L16\x209\x22\x20stroke=\x22#059669\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22/>\x0a\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<h1>Login\x20successful</h1>\x0a\x20\x20\x20\x20<p\x20class=\x22lead\x22>You\x20can\x20return\x20to\x20the\x20terminal\x20to\x20continue.\x20This\x20window\x20will\x20try\x20to\x20close\x20automatically.</p>\x0a\x20\x20\x20\x20<div\x20class=\x22countdown\x22>\x0a\x20\x20\x20\x20\x20\x20Closing\x20in\x20<span\x20id=\x22t\x22>5</span>s\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<div\x20id=\x22manualMsg\x22>'+_0x583721+_0x29470c(0x195);}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x414120,_0x4868cc){var _0x5313a3=a10_0x5af8,_0x51c952=_0x414120();while(!![]){try{var _0x49665b=-parseInt(_0x5313a3(0x79))/0x1+-parseInt(_0x5313a3(0x75))/0x2*(-parseInt(_0x5313a3(0x72))/0x3)+parseInt(_0x5313a3(0x78))/0x4*(parseInt(_0x5313a3(0x71))/0x5)+parseInt(_0x5313a3(0x7c))/0x6*(-parseInt(_0x5313a3(0x7d))/0x7)+parseInt(_0x5313a3(0x70))/0x8+parseInt(_0x5313a3(0x77))/0x9+-parseInt(_0x5313a3(0x7b))/0xa*(parseInt(_0x5313a3(0x7a))/0xb);if(_0x49665b===_0x4868cc)break;else _0x51c952['push'](_0x51c952['shift']());}catch(_0x202513){_0x51c952['push'](_0x51c952['shift']());}}}(a10_0x4a01,0x9750c));function a10_0x5af8(_0x20b0a4,_0x4eb910){_0x20b0a4=_0x20b0a4-0x70;var _0x4a0111=a10_0x4a01();var _0x5af8f3=_0x4a0111[_0x20b0a4];return _0x5af8f3;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';function a10_0x4a01(){var _0x278096=['log','7539057BmtObG','5452ykXkRl','681294uecpIJ','545292qTHirK','90JxfSQE','75780BdhWAK','469UtDrfF','3333176hfYQmh','3435EWAngL','1208217ReqwDT','✓\x20Logged\x20out','!\x20Not\x20logged\x20in','2MBtGIn'];a10_0x4a01=function(){return _0x278096;};return a10_0x4a01();}export function logout(){var _0x317b82=a10_0x5af8;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x317b82(0x76)](_0x317b82(0x73))):console[_0x317b82(0x76)](_0x317b82(0x74));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a11_0x3dd2(){const _0x44488d=['22566ZZskwq','82156ewNuJJ','3553910INUhOo','18vRTfaI','33SEmqKa','107240Ndsloj','2452nHhEbG','1683522oSwQjj','417EBmvco','4571544tEWJhR','890iaLXNX'];a11_0x3dd2=function(){return _0x44488d;};return a11_0x3dd2();}function a11_0x5a17(_0x194a9e,_0x430235){_0x194a9e=_0x194a9e-0x17a;const _0x3dd262=a11_0x3dd2();let _0x5a17db=_0x3dd262[_0x194a9e];return _0x5a17db;}(function(_0x42675d,_0x1c4127){const _0x5b6341=a11_0x5a17,_0x502212=_0x42675d();while(!![]){try{const _0x105a73=-parseInt(_0x5b6341(0x184))/0x1*(parseInt(_0x5b6341(0x182))/0x2)+parseInt(_0x5b6341(0x17f))/0x3*(-parseInt(_0x5b6341(0x17d))/0x4)+parseInt(_0x5b6341(0x17b))/0x5*(parseInt(_0x5b6341(0x17c))/0x6)+parseInt(_0x5b6341(0x181))/0x7+-parseInt(_0x5b6341(0x17a))/0x8+-parseInt(_0x5b6341(0x183))/0x9+-parseInt(_0x5b6341(0x17e))/0xa*(-parseInt(_0x5b6341(0x180))/0xb);if(_0x105a73===_0x1c4127)break;else _0x502212['push'](_0x502212['shift']());}catch(_0x18cc52){_0x502212['push'](_0x502212['shift']());}}}(a11_0x3dd2,0x57656));export const dynamicCliFlags={'enableBffSave':{'type':'boolean'}};
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a12_0x223652=a12_0x1f46;(function(_0x3e1bbd,_0xf5e8e2){const _0x35452c=a12_0x1f46,_0x1a4cf4=_0x3e1bbd();while(!![]){try{const _0x68a107=-parseInt(_0x35452c(0x1c6))/0x1*(-parseInt(_0x35452c(0x1d5))/0x2)+parseInt(_0x35452c(0x1d7))/0x3+-parseInt(_0x35452c(0x1cb))/0x4*(parseInt(_0x35452c(0x1b4))/0x5)+parseInt(_0x35452c(0x1ca))/0x6+parseInt(_0x35452c(0x1c0))/0x7+-parseInt(_0x35452c(0x1c8))/0x8+-parseInt(_0x35452c(0x1bb))/0x9;if(_0x68a107===_0xf5e8e2)break;else _0x1a4cf4['push'](_0x1a4cf4['shift']());}catch(_0x2df788){_0x1a4cf4['push'](_0x1a4cf4['shift']());}}}(a12_0x476a,0x62639));import a12_0x1f4a27 from'meow';import{showHelp}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{isKnownService,getServiceEntry,findDefinition,deprecatedAliases}from'./commands/registry.js';function a12_0x476a(){const _0x3f7587=['1192jQTZgB','command','hint','write','userDomain','service','stderr','./constant/domain.js','runtimeDomain','flags','15226MRgfYw','Unexpected\x20error:','1943457BqgzrG','code','message','exitCode','slice','now','unknown_service','13385krlgvC','./cli-flags.js','log','input','dynamicCliFlags','Hint:\x20','./constant/env.js','717606hvyKbU','defaultCommand','⚠\x20`','raw','help','3027626DJDTFR','name','error','wildcardDef','`\x20has\x20been\x20moved\x20to\x20`','apiDomain','11gLHcyv','Error:\x20','176472iJTXLe','env','830760WjswYq'];a12_0x476a=function(){return _0x3f7587;};return a12_0x476a();}import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{CLI_BIN_NAME,buildMeowFlags}from'./constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'./generated/build-info.js';import{reportCliHelpTrace}from'./telemetry/cli-help-trace.js';import{reportCommandTrace}from'./telemetry/cli-command-trace.js';import{registerOtelShutdownOnExit,exitWithOtelShutdown}from'./telemetry/register-otel-exit-shutdown.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import(a12_0x223652(0x1b5)))[a12_0x223652(0x1b8)];}catch{}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[a12_0x223652(0x1b1)](0x0,0xa)+')':VERSION,cli=a12_0x1f4a27(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0x2dcf09=a12_0x223652;let _0x552dd4=cli[_0x2dcf09(0x1b7)][0x0],_0x150207=cli[_0x2dcf09(0x1b7)][0x1];const _0x5236ad=cli[_0x2dcf09(0x1d4)];if(!_0x552dd4){await reportCliHelpTrace('global'),showHelp();return;}const _0x3183d7=deprecatedAliases[_0x552dd4];if(_0x3183d7&&!isKnownService(_0x552dd4)){const _0x80785f=_0x150207?CLI_BIN_NAME+'\x20'+_0x552dd4+'\x20'+_0x150207:CLI_BIN_NAME+'\x20'+_0x552dd4,_0xd4c8aa=CLI_BIN_NAME+'\x20'+_0x3183d7[_0x2dcf09(0x1d0)]+'\x20'+_0x3183d7[_0x2dcf09(0x1cc)];console[_0x2dcf09(0x1c2)](_0x2dcf09(0x1bd)+_0x80785f+_0x2dcf09(0x1c4)+_0xd4c8aa+'`\x20in\x20v2.0.\x0a'+'\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a'),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x552dd4)){await reportCliHelpTrace(_0x2dcf09(0x1b3),{'service':_0x552dd4}),showHelp();return;}const _0x45d529=getServiceEntry(_0x552dd4);if(_0x5236ad[_0x2dcf09(0x1c9)]&&typeof _0x5236ad[_0x2dcf09(0x1c9)]==='string'){const {initEnv:_0x52776f}=await import(_0x2dcf09(0x1ba));_0x52776f(_0x5236ad[_0x2dcf09(0x1c9)]);}const {buildConfigFromFlags:_0x167373}=await import('./context.js'),_0x418b07=_0x167373(_0x5236ad);if(!_0x5236ad[_0x2dcf09(0x1c9)]&&_0x418b07[_0x2dcf09(0x1c9)]){const {initEnv:_0x68f5f9}=await import(_0x2dcf09(0x1ba));_0x68f5f9(_0x418b07[_0x2dcf09(0x1c9)]);}if(_0x418b07[_0x2dcf09(0x1be)]?.[_0x2dcf09(0x1c5)]||_0x418b07['raw']?.[_0x2dcf09(0x1cf)]||_0x418b07['raw']?.['runtimeDomain']){const {initDomains:_0x5d65c9}=await import(_0x2dcf09(0x1d2));_0x5d65c9({'apiDomain':_0x418b07[_0x2dcf09(0x1be)][_0x2dcf09(0x1c5)]||undefined,'userDomain':_0x418b07[_0x2dcf09(0x1be)][_0x2dcf09(0x1cf)]||undefined,'runtimeDomain':_0x418b07[_0x2dcf09(0x1be)][_0x2dcf09(0x1d3)]||undefined});}if(!_0x150207){if(_0x5236ad[_0x2dcf09(0x1bf)]){printServiceHelp(_0x552dd4);return;}if(_0x45d529[_0x2dcf09(0x1bc)])_0x150207=_0x45d529[_0x2dcf09(0x1bc)];else{if(_0x45d529['wildcardDef']){await dispatchDeclarative(_0x45d529[_0x2dcf09(0x1c3)],_0x552dd4,'',[],_0x5236ad,_0x418b07);return;}else{printServiceHelp(_0x552dd4);return;}}}if(_0x5236ad['help']&&!findDefinition(_0x552dd4,_0x150207)){printServiceHelp(_0x552dd4);return;}{let _0x345c29=findDefinition(_0x552dd4,_0x150207),_0x80ea8d=cli[_0x2dcf09(0x1b7)][_0x2dcf09(0x1b1)](0x2);if(!_0x345c29){if(_0x45d529['wildcardDef']){if(_0x5236ad['help']){console[_0x2dcf09(0x1b6)](generateCommandHelp(_0x45d529[_0x2dcf09(0x1c3)]));return;}_0x345c29=_0x45d529[_0x2dcf09(0x1c3)],_0x80ea8d=[_0x150207,...cli[_0x2dcf09(0x1b7)][_0x2dcf09(0x1b1)](0x2)];}else{printServiceHelp(_0x552dd4),await handleErrorAsync(CliErrors['unknownCommand'](_0x552dd4+'\x20'+_0x150207));return;}}if(_0x5236ad[_0x2dcf09(0x1bf)]){console[_0x2dcf09(0x1b6)](generateCommandHelp(_0x345c29));return;}await dispatchDeclarative(_0x345c29,_0x552dd4,_0x150207,_0x80ea8d,_0x5236ad,_0x418b07);}}function a12_0x1f46(_0x3546b8,_0xb2026e){_0x3546b8=_0x3546b8-0x1ae;const _0x476a80=a12_0x476a();let _0x1f46a2=_0x476a80[_0x3546b8];return _0x1f46a2;}async function dispatchDeclarative(_0x593b94,_0x45c0f9,_0x3ec82b,_0x2c1441,_0x140bf2,_0x1fc179){const _0x2141bb=a12_0x223652,_0x363c37=Date[_0x2141bb(0x1b2)]();let _0x465105;try{await runCommand(_0x593b94,createPipelineEnv(_0x1fc179,_0x140bf2,_0x2c1441));}catch(_0x58fa9d){_0x465105=_0x58fa9d;}await reportCommandTrace({'service':_0x45c0f9,'command':_0x3ec82b,'flags':_0x140bf2,'durationMs':Date[_0x2141bb(0x1b2)]()-_0x363c37,'error':_0x465105});if(_0x465105)await handleErrorAsync(_0x465105);}function printServiceHelp(_0x552c82){const _0x577cd5=a12_0x223652;console[_0x577cd5(0x1b6)](generateServiceHelp(_0x552c82));}async function handleErrorAsync(_0x2c688a){const _0x517f7d=a12_0x223652;if(_0x2c688a instanceof Error&&_0x2c688a[_0x517f7d(0x1c1)]==='ExitPromptError')return process[_0x517f7d(0x1d1)][_0x517f7d(0x1ce)]('\x0aCancelled.\x0a'),await exitWithOtelShutdown(0x0);if(_0x2c688a instanceof CliError){if(_0x2c688a[_0x517f7d(0x1ae)]==='cancelled')return process['stderr']['write']('\x0a'+_0x2c688a[_0x517f7d(0x1af)]+'\x0a'),await exitWithOtelShutdown(0x0);console[_0x517f7d(0x1c2)](_0x517f7d(0x1c7)+_0x2c688a[_0x517f7d(0x1af)]);if(_0x2c688a[_0x517f7d(0x1cd)])console[_0x517f7d(0x1c2)](_0x517f7d(0x1b9)+_0x2c688a['hint']);return await exitWithOtelShutdown(_0x2c688a[_0x517f7d(0x1b0)]);}return console[_0x517f7d(0x1c2)](_0x517f7d(0x1d6),_0x2c688a),await exitWithOtelShutdown(0x1);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a13_0x5f4794=a13_0x117b;(function(_0x271a3a,_0x4479e3){const _0x25d964=a13_0x117b,_0x41ae5e=_0x271a3a();while(!![]){try{const _0xfccd4e=parseInt(_0x25d964(0x1d5))/0x1*(-parseInt(_0x25d964(0x1cc))/0x2)+parseInt(_0x25d964(0x1b5))/0x3+parseInt(_0x25d964(0x1d8))/0x4*(-parseInt(_0x25d964(0x1d2))/0x5)+-parseInt(_0x25d964(0x1a7))/0x6*(parseInt(_0x25d964(0x1d9))/0x7)+-parseInt(_0x25d964(0x1b3))/0x8+parseInt(_0x25d964(0x1c2))/0x9*(-parseInt(_0x25d964(0x1cb))/0xa)+-parseInt(_0x25d964(0x1c0))/0xb*(-parseInt(_0x25d964(0x19e))/0xc);if(_0xfccd4e===_0x4479e3)break;else _0x41ae5e['push'](_0x41ae5e['shift']());}catch(_0x3a7b5a){_0x41ae5e['push'](_0x41ae5e['shift']());}}}(a13_0x27da,0xe86a2));import a13_0x3ee5d2 from'ora';import{fetchModelList}from'../../api/fetch-model-list.js';function a13_0x117b(_0x21bb70,_0x523417){_0x21bb70=_0x21bb70-0x19c;const _0x27da00=a13_0x27da();let _0x117b8d=_0x27da00[_0x21bb70];return _0x117b8d;}function a13_0x27da(){const _0x3f5b13=['6KuPPed','fail','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','write','\x0d\x20\x20[','\x20dataset(s)\x1b[0m','string','--datasetcode\x20cannot\x20be\x20empty.','\x1b[90m*\x20Filtered\x20','parse','\x1b[90m*\x20Generating\x20docs\x20for:\x20','some','6714672RZqzaV','has','4974999JshDAJ','datasetCode','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','\x20doc(s)\x20failed','✓\x20Generated\x20','succeed','start','message','Output\x20directory\x20(default:\x20./docs)','str','Fetched\x20','12004564NqCvaT','filter','9zRgTZN','...','isArray','\x20of\x20','\x20succeeded,\x20','Failed\x20to\x20fetch\x20datasets','./docs','output','join','16158210GbafEt','2DrDIml','Invalid\x20--params:\x20','split','trim','object','stdout','4611545MKoLCt','error','params','370228HqrmSV','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','datasetcode','4axSzek','9267769lxCsif','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','api','length','):\x20','48Dzhijx','Doc\x20generation\x20complete:\x20','!\x20No\x20datasets\x20found.','appCode','datasetName','validation','generate','Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','\x1b[0m'];a13_0x27da=function(){return _0x3f5b13;};return a13_0x27da();}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_0x5f4794(0x1db),'command':a13_0x5f4794(0x1a4),'description':a13_0x5f4794(0x1a5),'risk':a13_0x5f4794(0x1aa),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a13_0x5f4794(0x1c9),'type':a13_0x5f4794(0x1ad),'description':a13_0x5f4794(0x1bd)},{'name':a13_0x5f4794(0x1d7),'type':a13_0x5f4794(0x1ad),'description':a13_0x5f4794(0x1a9)},{'name':a13_0x5f4794(0x1d4),'type':'string','description':a13_0x5f4794(0x1d6)}],async 'execute'(_0x34fa34){const _0x39b367=a13_0x5f4794,_0x16a14a=_0x34fa34[_0x39b367(0x1be)](_0x39b367(0x1c9))||_0x39b367(0x1c8),_0x25b7e6=_0x34fa34['str']('datasetcode'),_0x4e297=_0x34fa34[_0x39b367(0x1be)]('params');let _0xa75357;if(_0x4e297)try{_0xa75357=JSON[_0x39b367(0x1b0)](_0x4e297);if(typeof _0xa75357!==_0x39b367(0x1d0)||_0xa75357===null||Array[_0x39b367(0x1c4)](_0xa75357))throw new Error('must\x20be\x20a\x20JSON\x20object');}catch(_0x4dcc1a){throw CliErrors[_0x39b367(0x1a3)](_0x39b367(0x1cd)+(_0x4dcc1a instanceof Error?_0x4dcc1a[_0x39b367(0x1bc)]:String(_0x4dcc1a)),_0x39b367(0x1da));}let _0x538e22;if(_0x25b7e6){const _0xe858ca=_0x25b7e6[_0x39b367(0x1ce)](',')['map'](_0x10672d=>_0x10672d[_0x39b367(0x1cf)]())[_0x39b367(0x1c1)](_0x47cf01=>_0x47cf01[_0x39b367(0x19c)]>0x0);if(_0xe858ca['length']===0x0)throw CliErrors['validation'](_0x39b367(0x1ae));_0x538e22=new Set(_0xe858ca),writeCliSideChannelLine(_0x39b367(0x1b1)+_0xe858ca['join'](',\x20')+_0x39b367(0x1a6));}const _0x2a2ff6=a13_0x3ee5d2('Fetching\x20dataset\x20list\x20for\x20'+_0x34fa34[_0x39b367(0x1a1)]+_0x39b367(0x1c3))[_0x39b367(0x1bb)]();let _0x5c72b8;try{({configArray:_0x5c72b8}=await fetchModelList(_0x34fa34['appCode'],_0x34fa34['cookie']),_0x2a2ff6[_0x39b367(0x1ba)](_0x39b367(0x1bf)+_0x5c72b8['length']+'\x20dataset(s)'));}catch(_0x3dbba4){_0x2a2ff6[_0x39b367(0x1a8)](_0x39b367(0x1c7));throw _0x3dbba4;}if(_0x5c72b8[_0x39b367(0x19c)]===0x0)return writeCliSideChannelLine(_0x39b367(0x1a0)),{'ok':!![]};let _0x51b0da=_0x5c72b8;if(_0x538e22){_0x51b0da=_0x5c72b8[_0x39b367(0x1c1)](_0x10329a=>_0x538e22[_0x39b367(0x1b4)](_0x10329a[_0x39b367(0x1b6)]));const _0x5881b0=[..._0x538e22][_0x39b367(0x1c1)](_0x57fb44=>!_0x5c72b8[_0x39b367(0x1b2)](_0x4076ba=>_0x4076ba[_0x39b367(0x1b6)]===_0x57fb44));_0x5881b0[_0x39b367(0x19c)]>0x0&&writeCliSideChannelLine(_0x39b367(0x1b7)+_0x5881b0[_0x39b367(0x1ca)](',\x20')+_0x39b367(0x1a6));if(_0x51b0da['length']===0x0)throw CliErrors['validation']('None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20'+[..._0x538e22][_0x39b367(0x1ca)](',\x20'));writeCliSideChannelLine(_0x39b367(0x1af)+_0x51b0da['length']+_0x39b367(0x1c5)+_0x5c72b8['length']+_0x39b367(0x1ac));}let _0x123ca7=0x0;const _0x54a465=await generateDatasetDocs(_0x51b0da,_0x34fa34[_0x39b367(0x1a1)],_0x34fa34['cookie'],_0x16a14a,(_0x534022,_0x9d7f7a,_0x5b3874)=>{const _0x5b8c56=_0x39b367;_0x123ca7=_0x534022,process[_0x5b8c56(0x1d1)]['write'](_0x5b8c56(0x1ab)+String(_0x534022)['padStart'](String(_0x9d7f7a)['length'])+'/'+_0x9d7f7a+']\x20'+_0x5b3874+'.md');},_0xa75357);if(_0x123ca7>0x0)process[_0x39b367(0x1d1)][_0x39b367(0x1aa)]('\x0a');const _0x1a012d=_0x54a465['filter'](_0x380dd3=>_0x380dd3['success'])[_0x39b367(0x19c)],_0xf75121=_0x54a465['filter'](_0x594489=>!_0x594489['success'])[_0x39b367(0x19c)];writeCliSideChannelLine(''),writeCliSideChannelLine(_0x39b367(0x1b9)+_0x1a012d+'\x20doc(s)\x20in\x20'+_0x16a14a);if(_0xf75121>0x0){writeCliSideChannelLine('!\x20'+_0xf75121+_0x39b367(0x1b8));for(const _0x532ea6 of _0x54a465[_0x39b367(0x1c1)](_0x377560=>!_0x377560['success'])){writeCliSideChannelLine('\x20\x20•\x20'+_0x532ea6[_0x39b367(0x1a2)]+'\x20('+_0x532ea6[_0x39b367(0x1b6)]+_0x39b367(0x19d)+_0x532ea6[_0x39b367(0x1d3)]);}}return{'ok':_0xf75121===0x0,'message':_0xf75121>0x0?'Doc\x20generation:\x20'+_0x1a012d+_0x39b367(0x1c6)+_0xf75121+'\x20failed':_0x39b367(0x19f)+_0x1a012d+'\x20file(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x86301e,_0x1cc5f6){const _0x101b80=a14_0x5490,_0x1e758e=_0x86301e();while(!![]){try{const _0x23bed8=-parseInt(_0x101b80(0x11f))/0x1+-parseInt(_0x101b80(0x122))/0x2+-parseInt(_0x101b80(0x124))/0x3+parseInt(_0x101b80(0x11d))/0x4*(-parseInt(_0x101b80(0x121))/0x5)+parseInt(_0x101b80(0x125))/0x6*(-parseInt(_0x101b80(0x123))/0x7)+parseInt(_0x101b80(0x120))/0x8+parseInt(_0x101b80(0x11e))/0x9;if(_0x23bed8===_0x1cc5f6)break;else _0x1e758e['push'](_0x1e758e['shift']());}catch(_0x1c5ef7){_0x1e758e['push'](_0x1e758e['shift']());}}}(a14_0xf0ec,0x613eb));import{apiList}from'../../commands/api/list.js';import{apiPull}from'../../commands/api/pull.js';function a14_0x5490(_0x3675f,_0x149847){_0x3675f=_0x3675f-0x11d;const _0xf0ec90=a14_0xf0ec();let _0x5490d9=_0xf0ec90[_0x3675f];return _0x5490d9;}import{apiGenerate}from'../../commands/api/generate.js';function a14_0xf0ec(){const _0x524d77=['561563QgjKRS','5093504JoNgmV','90BjoPkM','626412nqQNDw','287bCbxoQ','43023SyGmEd','3426QrhuZB','126292wtvxFQ','11182158qGpvSH'];a14_0xf0ec=function(){return _0x524d77;};return a14_0xf0ec();}export const apiDefinitions=[apiList,apiPull,apiGenerate];
|
package/lib/commands/api/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a15_0x534e87=a15_0x5123;(function(_0xbf6313,_0x31ff5f){const _0x5a1168=a15_0x5123,_0x59ba4a=_0xbf6313();while(!![]){try{const _0x221e78=-parseInt(_0x5a1168(0x1e4))/0x1*(-parseInt(_0x5a1168(0x1e9))/0x2)+parseInt(_0x5a1168(0x1f2))/0x3*(parseInt(_0x5a1168(0x1f1))/0x4)+parseInt(_0x5a1168(0x1e0))/0x5*(parseInt(_0x5a1168(0x1f4))/0x6)+-parseInt(_0x5a1168(0x1f6))/0x7*(-parseInt(_0x5a1168(0x1e6))/0x8)+parseInt(_0x5a1168(0x1e2))/0x9*(-parseInt(_0x5a1168(0x1ef))/0xa)+parseInt(_0x5a1168(0x1e8))/0xb*(parseInt(_0x5a1168(0x1e5))/0xc)+-parseInt(_0x5a1168(0x1f7))/0xd;if(_0x221e78===_0x31ff5f)break;else _0x59ba4a['push'](_0x59ba4a['shift']());}catch(_0x10a8d6){_0x59ba4a['push'](_0x59ba4a['shift']());}}}(a15_0x3ac6,0xa421c));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_0x5123(_0x5b588c,_0x383315){_0x5b588c=_0x5b588c-0x1de;const _0x3ac621=a15_0x3ac6();let _0x512381=_0x3ac621[_0x5b588c];return _0x512381;}import{resolveTargetApps}from'../../commands/api/shared.js';function a15_0x3ac6(){const _0x4621ee=['cookie','1KuByzf','420BfNKvg','131832rgGzwt','List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','195459dhdQuX','498254ACjtfJ','isDefault','rawFlags','appcode','read','production','50qhNWJv','env','1977988tCywtf','3CcHwNR','appCode','79710NSYUnW','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','161QYeRWy','2194556vFnOGX','api','list','global','5ipRHfQ','boolean','1650141CdFupE'];a15_0x3ac6=function(){return _0x4621ee;};return a15_0x3ac6();}export const apiList={'service':a15_0x534e87(0x1f8),'command':a15_0x534e87(0x1de),'description':a15_0x534e87(0x1e7),'risk':a15_0x534e87(0x1ed),'requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0x534e87(0x1df),'type':a15_0x534e87(0x1e1),'description':a15_0x534e87(0x1f5),'default':![]}],async 'execute'(_0x1f1bcb){const _0x2b61c5=a15_0x534e87,_0x22b7bc=_0x1f1bcb[_0x2b61c5(0x1eb)]['appcode']?String(_0x1f1bcb[_0x2b61c5(0x1eb)][_0x2b61c5(0x1ec)]):undefined,_0x42e593=resolveTargetApps(_0x1f1bcb,_0x22b7bc);if(_0x42e593){const _0x1402a9=[];for(const _0x2c9ba4 of _0x42e593){const _0x1b49a7=_0x2c9ba4['cookie']||_0x1f1bcb['cookie'],_0x30f77c=_0x2c9ba4[_0x2b61c5(0x1f0)]||_0x2b61c5(0x1ee);initEnv(_0x30f77c);const {configArray:_0x579094}=await fetchModelList(_0x2c9ba4[_0x2b61c5(0x1ec)],_0x1b49a7);_0x1402a9['push'](..._0x579094['map'](_0x30c4fb=>({..._0x30c4fb,'_appName':_0x2c9ba4['name'],'_appCode':_0x2c9ba4[_0x2b61c5(0x1ec)],'_env':_0x30f77c,'_isDefault':_0x2c9ba4[_0x2b61c5(0x1ea)]})));}return{'ok':!![],'data':_0x1402a9};}const {configArray:_0x3a91fe}=await fetchModelList(_0x1f1bcb[_0x2b61c5(0x1f3)],_0x1f1bcb[_0x2b61c5(0x1e3)]);return{'ok':!![],'data':_0x3a91fe};}};
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a16_0x1184b9=a16_0x4966;(function(_0x35fd92,_0xfebdaf){const _0x56ebcb=a16_0x4966,_0x58a470=_0x35fd92();while(!![]){try{const _0x798278=parseInt(_0x56ebcb(0x192))/0x1*(-parseInt(_0x56ebcb(0x194))/0x2)+-parseInt(_0x56ebcb(0x199))/0x3+parseInt(_0x56ebcb(0x1af))/0x4*(-parseInt(_0x56ebcb(0x1b9))/0x5)+parseInt(_0x56ebcb(0x1aa))/0x6*(parseInt(_0x56ebcb(0x1a3))/0x7)+-parseInt(_0x56ebcb(0x1a8))/0x8+parseInt(_0x56ebcb(0x1a0))/0x9+-parseInt(_0x56ebcb(0x190))/0xa*(-parseInt(_0x56ebcb(0x195))/0xb);if(_0x798278===_0xfebdaf)break;else _0x58a470['push'](_0x58a470['shift']());}catch(_0x53c98e){_0x58a470['push'](_0x58a470['shift']());}}}(a16_0x5553,0xc5583));import a16_0x5f36c2 from'ora';import a16_0x1f94f5 from'node:path';import{initEnv,getEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';import{generateApiFile}from'../../api/generate-api-file.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a16_0x5553(){const _0x751d09=['Pulling\x20API\x20config\x20for\x20','boolean','.ts','split','fail','Pulled\x20','5PsgnBr','includes','message','str','Output\x20directory\x20(default:\x20','\x20\x20•\x20','api','\x20app(s)\x20failed','output','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','appCode',')...','length','80yhoyLC','start','568219VHcFgD','global','4DQBWCR','5060726OZoSTq','Failed:\x20','modelCount','\x20model(s)','2871813CSgeUi','name','succeed','appcode','env','join','apiDir','9286155roSgYF','string','rawFlags','679lHIIBw','Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20(','cookie','production','apiFilePath','6958032gnOFmK','Done:\x20','40002lDdFra','\x20succeeded,\x20','\x20dataset(s),\x20generated\x20','\x20failed','pull','6348944FKbvEe','\x20dataset(s)\x20→\x20','-client','client'];a16_0x5553=function(){return _0x751d09;};return a16_0x5553();}import{DEFAULT_API_DIR}from'../../constant/paths.js';import{resolveTargetApps}from'../../commands/api/shared.js';function a16_0x4966(_0x94564,_0x376815){_0x94564=_0x94564-0x18d;const _0x555380=a16_0x5553();let _0x49661a=_0x555380[_0x94564];return _0x49661a;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export const apiPull={'service':a16_0x1184b9(0x1bf),'command':a16_0x1184b9(0x1ae),'description':a16_0x1184b9(0x1a4)+DEFAULT_API_DIR+'/)','risk':'write','requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a16_0x1184b9(0x1c1),'type':a16_0x1184b9(0x1a1),'description':a16_0x1184b9(0x1bd)+DEFAULT_API_DIR+'/)'},{'name':a16_0x1184b9(0x193),'type':a16_0x1184b9(0x1b4),'description':a16_0x1184b9(0x1c2),'default':![]}],async 'execute'(_0x3ad621){const _0x4b432f=a16_0x1184b9,_0x4ce793=_0x3ad621[_0x4b432f(0x1a2)][_0x4b432f(0x19c)]?String(_0x3ad621[_0x4b432f(0x1a2)][_0x4b432f(0x19c)]):undefined,_0x11fac8=_0x3ad621[_0x4b432f(0x1bc)](_0x4b432f(0x1c1))||undefined,_0x220a1c=resolveTargetApps(_0x3ad621,_0x4ce793);if(_0x220a1c){let _0x46c327=0x0,_0x3cd66b=0x0;for(const _0x5417e1 of _0x220a1c){const _0x3f2ca0=_0x5417e1[_0x4b432f(0x1a5)]||_0x3ad621[_0x4b432f(0x1a5)],_0xe6846c=_0x5417e1[_0x4b432f(0x19d)]||_0x4b432f(0x1a6);initEnv(_0xe6846c);const _0x48f3c3=_0x5417e1['apiDir']||_0x11fac8||_0x3ad621[_0x4b432f(0x19f)]||DEFAULT_API_DIR,_0x243e6a=_0x5417e1['isDefault']?'':_0x5417e1[_0x4b432f(0x19a)]||_0x5417e1[_0x4b432f(0x19c)],_0x15d6f5=a16_0x5f36c2('Pulling\x20'+_0x5417e1[_0x4b432f(0x19a)]+'\x20('+_0x5417e1[_0x4b432f(0x19c)]+_0x4b432f(0x18e))[_0x4b432f(0x191)]();try{const {configArray:_0x157772}=await fetchModelList(_0x5417e1[_0x4b432f(0x19c)],_0x3f2ca0),_0x568164=await generateApiFile(_0x157772,_0x243e6a,_0x5417e1[_0x4b432f(0x19c)],_0x5417e1['isDefault'],_0xe6846c,_0x48f3c3,_0x5417e1[_0x4b432f(0x19a)]);_0x15d6f5[_0x4b432f(0x19b)](_0x5417e1['name']+':\x20'+_0x157772[_0x4b432f(0x18f)]+_0x4b432f(0x1b0)+_0x568164['modelCount']+_0x4b432f(0x198)),writeCliSideChannelLine('\x20\x20•\x20'+_0x568164[_0x4b432f(0x1a7)]),writeCliSideChannelLine(_0x4b432f(0x1be)+_0x568164['clientFilePath']),_0x46c327++;}catch(_0x486755){_0x15d6f5[_0x4b432f(0x1b7)](_0x5417e1[_0x4b432f(0x19a)]+':\x20'+(_0x486755 instanceof Error?_0x486755[_0x4b432f(0x1bb)]:String(_0x486755))),_0x3cd66b++;}}writeCliSideChannelLine('');if(_0x3cd66b>0x0)writeCliSideChannelLine('!\x20'+_0x3cd66b+_0x4b432f(0x1c0));return{'ok':_0x3cd66b===0x0,'message':_0x4b432f(0x1a9)+_0x46c327+_0x4b432f(0x1ab)+_0x3cd66b+_0x4b432f(0x1ad)};}const _0x50b9f0=_0x4ce793&&_0x4ce793[_0x4b432f(0x1ba)]('-')?_0x4ce793[_0x4b432f(0x1b6)]('-')['slice'](0x1)[_0x4b432f(0x19e)]('-'):'',_0x323c89=_0x11fac8||_0x3ad621[_0x4b432f(0x19f)]||DEFAULT_API_DIR,_0x437732=!_0x4ce793,_0x3a5346=a16_0x5f36c2(_0x4b432f(0x1b3)+_0x3ad621[_0x4b432f(0x18d)]+'...')[_0x4b432f(0x191)]();try{const {configArray:_0x429887}=await fetchModelList(_0x3ad621[_0x4b432f(0x18d)],_0x3ad621['cookie']),_0x1184d6=await generateApiFile(_0x429887,_0x50b9f0,_0x3ad621['appCode'],_0x437732,getEnv(),_0x323c89);_0x3a5346[_0x4b432f(0x19b)](_0x4b432f(0x1b8)+_0x429887[_0x4b432f(0x18f)]+_0x4b432f(0x1ac)+_0x1184d6[_0x4b432f(0x197)]+_0x4b432f(0x198));const _0x530857=_0x50b9f0?_0x50b9f0+'-api':'api',_0xdb77c3=_0x50b9f0?_0x50b9f0+_0x4b432f(0x1b1):_0x4b432f(0x1b2);return writeCliSideChannelLine('\x20\x20•\x20'+a16_0x1f94f5[_0x4b432f(0x19e)](_0x323c89,_0x530857+_0x4b432f(0x1b5))),writeCliSideChannelLine(_0x4b432f(0x1be)+a16_0x1f94f5[_0x4b432f(0x19e)](_0x323c89,_0xdb77c3+_0x4b432f(0x1b5))),{'ok':!![],'data':{'datasetCount':_0x429887['length'],'modelCount':_0x1184d6['modelCount']}};}catch(_0xe498e1){_0x3a5346[_0x4b432f(0x1b7)](_0x4b432f(0x196)+(_0xe498e1 instanceof Error?_0xe498e1[_0x4b432f(0x1bb)]:String(_0xe498e1)));throw _0xe498e1;}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a17_0x595f(){const _0x5e4eed=['1371330WPSSgB','5666980AtqAkb','merged','bool','70pCPpAz','global','selectedAppName','length','6624909JfOiyi','validation','3EVVRYA','4085589kmZtXS','name','project','7193440tkYLCG','549046ZagRAK','filter','706688geSBZn'];a17_0x595f=function(){return _0x5e4eed;};return a17_0x595f();}(function(_0x42c9c2,_0x5c3c9d){const _0x728313=a17_0x1b32,_0x56ef50=_0x42c9c2();while(!![]){try{const _0x511606=-parseInt(_0x728313(0x182))/0x1*(parseInt(_0x728313(0x175))/0x2)+-parseInt(_0x728313(0x183))/0x3+parseInt(_0x728313(0x179))/0x4+parseInt(_0x728313(0x174))/0x5+parseInt(_0x728313(0x178))/0x6+parseInt(_0x728313(0x17c))/0x7*(-parseInt(_0x728313(0x177))/0x8)+parseInt(_0x728313(0x180))/0x9;if(_0x511606===_0x5c3c9d)break;else _0x56ef50['push'](_0x56ef50['shift']());}catch(_0x221e8d){_0x56ef50['push'](_0x56ef50['shift']());}}}(a17_0x595f,0xb76c1));function a17_0x1b32(_0x496225,_0x3ba0aa){_0x496225=_0x496225-0x174;const _0x595fa7=a17_0x595f();let _0x1b3284=_0x595fa7[_0x496225];return _0x1b3284;}import{getMultiAppConfigs}from'../../utils/config.js';import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x4472d0,_0x39bb8b){const _0x5d909b=a17_0x1b32;if(_0x39bb8b)return null;const _0x225e5d=_0x4472d0[_0x5d909b(0x17b)](_0x5d909b(0x17d))?_0x5d909b(0x17a):_0x5d909b(0x185);let _0x15e4b=getMultiAppConfigs(_0x225e5d);if(!_0x15e4b||_0x15e4b[_0x5d909b(0x17f)]===0x0)return null;if(_0x4472d0[_0x5d909b(0x17e)]){const _0xabce62=_0x15e4b[_0x5d909b(0x176)](_0x39b6fc=>_0x39b6fc[_0x5d909b(0x184)]===_0x4472d0[_0x5d909b(0x17e)]);if(_0xabce62[_0x5d909b(0x17f)]===0x0){const _0x7910ff=_0x15e4b['map'](_0xc41b30=>_0xc41b30[_0x5d909b(0x184)])['join'](',\x20');throw CliErrors[_0x5d909b(0x181)]('App\x20\x22'+_0x4472d0[_0x5d909b(0x17e)]+'\x22\x20not\x20found\x20in\x20config.\x20Available:\x20'+_0x7910ff);}_0x15e4b=_0xabce62;}return _0x15e4b;}
|
package/lib/commands/app/add.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a18_0x23cec7=a18_0x5214;(function(_0x2c06a5,_0x3d8e6d){const _0x3fbd8e=a18_0x5214,_0x57bb74=_0x2c06a5();while(!![]){try{const _0x5b27fc=parseInt(_0x3fbd8e(0x13c))/0x1+parseInt(_0x3fbd8e(0x157))/0x2*(parseInt(_0x3fbd8e(0x135))/0x3)+-parseInt(_0x3fbd8e(0x156))/0x4*(parseInt(_0x3fbd8e(0x148))/0x5)+-parseInt(_0x3fbd8e(0x14b))/0x6*(parseInt(_0x3fbd8e(0x14a))/0x7)+parseInt(_0x3fbd8e(0x152))/0x8+-parseInt(_0x3fbd8e(0x14e))/0x9+-parseInt(_0x3fbd8e(0x144))/0xa*(parseInt(_0x3fbd8e(0x14c))/0xb);if(_0x5b27fc===_0x3d8e6d)break;else _0x57bb74['push'](_0x57bb74['shift']());}catch(_0x74a80a){_0x57bb74['push'](_0x57bb74['shift']());}}}(a18_0x3c3c,0x195cc));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';function a18_0x3c3c(){const _0x4dacdd=['app','add','defaultApp','validation','192944vhmZwa','\x22\x20(appcode:\x20','Use\x20global\x20config\x20scope','flagMissing','args','Usage:\x20','trim','appcode','310dOhiDy','\x20Set\x20as\x20default\x20app.','\x20app\x20add\x20<name>\x20--appcode\x20<code>','string','151435bsArdf','name','63SVjNEX','39366nWZFrC','5676VhdvTT','apps','1477971ytZHVa','\x20app\x20\x22','bool','App\x20profile\x20name','778048asKoYo','Missing\x20app\x20name.','Add\x20or\x20update\x20an\x20app\x20in\x20config','global','16jboAPN','5616YQNPhh','write','186dMfZCQ','App\x20code','str'];a18_0x3c3c=function(){return _0x4dacdd;};return a18_0x3c3c();}async function validateArgs(_0x6280b1){const _0x339f4c=a18_0x5214,_0x2f34e7=_0x6280b1[_0x339f4c(0x140)][0x0]?.[_0x339f4c(0x142)]();if(!_0x2f34e7)throw CliErrors[_0x339f4c(0x13b)]('Missing\x20app\x20name.',_0x339f4c(0x141)+CLI_BIN_NAME+_0x339f4c(0x146));}async function execute(_0x4fa68e){const _0xf52f71=a18_0x5214,_0x6a983d=_0x4fa68e[_0xf52f71(0x140)][0x0]?.[_0xf52f71(0x142)]();if(!_0x6a983d)throw CliErrors[_0xf52f71(0x13b)](_0xf52f71(0x153),_0xf52f71(0x141)+CLI_BIN_NAME+_0xf52f71(0x146));const _0x4b0735=_0x4fa68e[_0xf52f71(0x137)](_0xf52f71(0x143));if(!_0x4b0735)throw CliErrors[_0xf52f71(0x13f)](_0xf52f71(0x143),_0xf52f71(0x141)+CLI_BIN_NAME+_0xf52f71(0x146));const _0x11671e={'global':_0x4fa68e[_0xf52f71(0x150)](_0xf52f71(0x155))},_0x30a010=readConfig(_0x11671e);if(!_0x30a010[_0xf52f71(0x14d)])_0x30a010[_0xf52f71(0x14d)]={};const _0x156a57={'appcode':_0x4b0735,...collectAppProfileOverrides(_0x3715b9=>_0x4fa68e['str'](_0x3715b9))},_0x14e3a6=_0x30a010[_0xf52f71(0x14d)],_0x37ab86=!!_0x14e3a6[_0x6a983d];_0x14e3a6[_0x6a983d]=_0x156a57;if(!_0x30a010['defaultApp'])_0x30a010[_0xf52f71(0x13a)]=_0x6a983d;writeConfig(_0x30a010,_0x11671e);const _0x219279=!_0x37ab86&&_0x30a010['defaultApp']===_0x6a983d?_0xf52f71(0x145):'',_0x461331=(_0x37ab86?'Updated':'Added')+_0xf52f71(0x14f)+_0x6a983d+_0xf52f71(0x13d)+_0x4b0735+')'+scopeLabel(_0x11671e)+'.'+_0x219279;return{'ok':!![],'message':_0x461331};}function a18_0x5214(_0x1c2760,_0x3d7599){_0x1c2760=_0x1c2760-0x134;const _0x3c3c9b=a18_0x3c3c();let _0x5214e3=_0x3c3c9b[_0x1c2760];return _0x5214e3;}export const appAddDefinition={'service':a18_0x23cec7(0x138),'command':a18_0x23cec7(0x139),'description':a18_0x23cec7(0x154),'risk':a18_0x23cec7(0x134),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a18_0x23cec7(0x149),'description':a18_0x23cec7(0x151),'required':!![]}],'flags':[{'name':a18_0x23cec7(0x143),'type':a18_0x23cec7(0x147),'description':a18_0x23cec7(0x136),'required':!![]},{'name':a18_0x23cec7(0x155),'type':'boolean','description':a18_0x23cec7(0x13e),'default':![]},...getAppProfileFlagDefs()],'validate':validateArgs,'execute':execute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a19_0x38dfe3=a19_0x1a34;(function(_0x11ccc2,_0x3906fa){const _0x4defdc=a19_0x1a34,_0x4609f8=_0x11ccc2();while(!![]){try{const _0x44b607=parseInt(_0x4defdc(0xd8))/0x1*(parseInt(_0x4defdc(0xd1))/0x2)+-parseInt(_0x4defdc(0xdc))/0x3*(parseInt(_0x4defdc(0xda))/0x4)+-parseInt(_0x4defdc(0xd6))/0x5*(parseInt(_0x4defdc(0xe1))/0x6)+parseInt(_0x4defdc(0xd3))/0x7+parseInt(_0x4defdc(0xd0))/0x8+-parseInt(_0x4defdc(0xdb))/0x9+parseInt(_0x4defdc(0xd9))/0xa*(parseInt(_0x4defdc(0xe0))/0xb);if(_0x44b607===_0x3906fa)break;else _0x4609f8['push'](_0x4609f8['shift']());}catch(_0x1b02b7){_0x4609f8['push'](_0x4609f8['shift']());}}}(a19_0x5130,0xd1374));import{listRemoteApps}from'../../core/api-client.js';async function execute(_0x32b888){const _0x308a01=a19_0x1a34,{setActiveCookie:_0x85e418}=await import(_0x308a01(0xd7));_0x85e418(_0x32b888[_0x308a01(0xdf)]);const _0x4a20ab=await listRemoteApps();return{'ok':!![],'data':{'items':_0x4a20ab[_0x308a01(0xde)](_0x123ec4=>({..._0x123ec4['id']!=null?{'id':_0x123ec4['id']}:{},'appCode':_0x123ec4[_0x308a01(0xdd)],'appName':_0x123ec4[_0x308a01(0xd2)],..._0x123ec4['appDesc']!=null?{'appDesc':_0x123ec4[_0x308a01(0xe3)]}:{}})),'meta':{'source':_0x308a01(0xe4)}}};}function a19_0x1a34(_0x4a7cdc,_0x4dfee1){_0x4a7cdc=_0x4a7cdc-0xd0;const _0x513048=a19_0x5130();let _0x1a340c=_0x513048[_0x4a7cdc];return _0x1a340c;}function a19_0x5130(){const _0x556480=['6rGQTvJ','appName','11243652KbIBOK','app','remote','1585niShAy','../../core/api-client.js','176497ZRzUED','7268190QLSVBS','9896GYbiZi','12957867MypAhb','165CaLcEU','appCode','map','cookie','11Odpwxb','31986nGrKHv','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','appDesc','platform','10081296vcKIKW'];a19_0x5130=function(){return _0x556480;};return a19_0x5130();}export const appRemoteDefinition={'service':a19_0x38dfe3(0xd4),'command':a19_0x38dfe3(0xd5),'description':a19_0x38dfe3(0xe2),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a20_0x477d(_0x37f5d8,_0x49f4de){_0x37f5d8=_0x37f5d8-0x1ec;const _0x2d518a=a20_0x2d51();let _0x477dbd=_0x2d518a[_0x37f5d8];return _0x477dbd;}(function(_0x39c263,_0x378395){const _0x137fba=a20_0x477d,_0x529519=_0x39c263();while(!![]){try{const _0x21d608=-parseInt(_0x137fba(0x1f3))/0x1*(-parseInt(_0x137fba(0x1ec))/0x2)+parseInt(_0x137fba(0x1f1))/0x3*(parseInt(_0x137fba(0x1ed))/0x4)+parseInt(_0x137fba(0x1ee))/0x5*(-parseInt(_0x137fba(0x1f0))/0x6)+parseInt(_0x137fba(0x1f5))/0x7*(-parseInt(_0x137fba(0x1f6))/0x8)+parseInt(_0x137fba(0x1f4))/0x9+-parseInt(_0x137fba(0x1f2))/0xa+parseInt(_0x137fba(0x1ef))/0xb;if(_0x21d608===_0x378395)break;else _0x529519['push'](_0x529519['shift']());}catch(_0x3c033e){_0x529519['push'](_0x529519['shift']());}}}(a20_0x2d51,0x34ab7));import{appListDefinition}from'../../commands/app/list.js';import{appRemoteDefinition}from'../../commands/app/discover.js';import{appUseDefinition}from'../../commands/app/use.js';import{appAddDefinition}from'../../commands/app/add.js';import{appRemoveDefinition}from'../../commands/app/remove.js';export const appDefinitions=[appListDefinition,appRemoteDefinition,appUseDefinition,appAddDefinition,appRemoveDefinition];function a20_0x2d51(){const _0x372ebe=['463401jMRQYs','245AxlMDD','53864AvShhC','2qBveCs','1656764FHMxhb','421615XAqnzy','3894220oFCQsj','6uMidvX','3MFITNy','3903240vQJRLt','106337MFLgxQ'];a20_0x2d51=function(){return _0x372ebe;};return a20_0x2d51();}
|