@lovrabet/rabetbase-cli 2.1.10-beta.2 → 2.1.10-beta.3
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 -0
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -1
- package/lib/commands/dataset/link-delete.js +1 -1
- package/lib/commands/dataset/link-shared.js +1 -1
- package/lib/commands/dataset/link-update.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x5089da=a0_0x4dfa;(function(_0x34e3f4,_0x562fe7){const _0x390bc9=a0_0x4dfa,_0x22b0d2=_0x34e3f4();while(!![]){try{const _0x121474=parseInt(_0x390bc9(0x9b))/0x1*(-parseInt(_0x390bc9(0xba))/0x2)+parseInt(_0x390bc9(0xac))/0x3+parseInt(_0x390bc9(0xa0))/0x4*(-parseInt(_0x390bc9(0xb4))/0x5)+-parseInt(_0x390bc9(0xaa))/0x6*(parseInt(_0x390bc9(0x9e))/0x7)+parseInt(_0x390bc9(0xb0))/0x8+parseInt(_0x390bc9(0x9c))/0x9*(parseInt(_0x390bc9(0xbd))/0xa)+parseInt(_0x390bc9(0xb1))/0xb*(parseInt(_0x390bc9(0xa6))/0xc);if(_0x121474===_0x562fe7)break;else _0x22b0d2['push'](_0x22b0d2['shift']());}catch(_0x1710fc){_0x22b0d2['push'](_0x22b0d2['shift']());}}}(a0_0x5f23,0xf08bd));import{mkdirSync,writeFileSync}from'node:fs';function a0_0x4dfa(_0x4667c4,_0x49c6b4){_0x4667c4=_0x4667c4-0x9a;const _0x5f23a3=a0_0x5f23();let _0x4dfad2=_0x5f23a3[_0x4667c4];return _0x4dfad2;}import a0_0x4a9ab4 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(_0x2f9d00){const _0x202a3c=a0_0x4dfa,{appCode:_0x1be5aa,cookie:_0x272909,datasetCode:_0x29eb33,datasetId:_0x1ab880,extraParams:_0x297a5a}=_0x2f9d00,_0x599765=getApiDomain()+_0x202a3c(0x9a),_0xa2e818=await platformFetch(_0x599765,{'method':_0x202a3c(0xa1),'body':{'appCode':_0x1be5aa,'datasetCode':_0x29eb33,'datasetId':_0x1ab880,..._0x297a5a||{}},'cookie':_0x272909,'label':_0x202a3c(0xb6)+_0x29eb33+')'});if(!_0xa2e818||typeof _0xa2e818[_0x202a3c(0xb5)]!==_0x202a3c(0xb9))throw new Error(_0x202a3c(0xbf)+_0x29eb33+_0x202a3c(0xbb));return _0xa2e818[_0x202a3c(0xb5)];}function delay(_0x20f0df){return new Promise(_0x39fff8=>setTimeout(_0x39fff8,_0x20f0df));}export async function generateDatasetDocs(_0x3960ae,_0x3e5634,_0x12e36e,_0x2a2bab=a0_0x5089da(0xa5),_0x38cc4c,_0x446ef5){const _0x45dfc0=a0_0x5089da;mkdirSync(_0x2a2bab,{'recursive':!![]});const _0x8dd916=[],_0x3010c3=_0x3960ae[_0x45dfc0(0xa3)];console['log']('\x0a'+_0x3010c3+'\x20datasets\x20to\x20generate\x20docs\x20for\x0a');for(let _0x3a483c=0x0;_0x3a483c<_0x3960ae[_0x45dfc0(0xa3)];_0x3a483c++){const _0x3b492b=_0x3960ae[_0x3a483c],_0x1629cc=_0x3a483c+0x1,_0x409939=_0x3b492b[_0x45dfc0(0x9d)];try{console['log']('['+_0x1629cc+'/'+_0x3010c3+_0x45dfc0(0x9f)+_0x409939+_0x45dfc0(0xaf)+_0x3b492b[_0x45dfc0(0xa7)]+')');if(_0x38cc4c)_0x38cc4c(_0x1629cc,_0x3010c3,_0x409939);const _0x2cc88d=await fetchDatasetDoc({'appCode':_0x3e5634,'cookie':_0x12e36e,'datasetCode':_0x3b492b[_0x45dfc0(0xad)],'datasetId':_0x3b492b['id'],'enableAI':![],'extraParams':_0x446ef5}),_0x26849b=a0_0x4a9ab4['join'](_0x2a2bab,_0x409939+_0x45dfc0(0xb3));writeFileSync(_0x26849b,_0x2cc88d,{'encoding':_0x45dfc0(0xbc)}),console['log'](_0x45dfc0(0xa9)+_0x409939+'.md'),logger[_0x45dfc0(0xab)](_0x45dfc0(0xa4),_0x45dfc0(0xb2)+_0x409939,undefined,{'datasetCode':_0x3b492b[_0x45dfc0(0xad)],'datasetName':_0x3b492b[_0x45dfc0(0xa7)],'filePath':_0x26849b,'progress':_0x1629cc+'/'+_0x3010c3}),_0x8dd916['push']({'datasetCode':_0x3b492b[_0x45dfc0(0xad)],'datasetName':_0x3b492b[_0x45dfc0(0xa7)],'filePath':_0x26849b,'success':!![]});if(_0x1629cc<_0x3010c3)await delay(0x1388);}catch(_0xf2c48c){const _0x34da33=_0xf2c48c instanceof Error?_0xf2c48c['message']:String(_0xf2c48c);console[_0x45dfc0(0xb8)](_0x45dfc0(0xa8)+_0x409939+_0x45dfc0(0xbe)+_0x34da33),logger[_0x45dfc0(0xb7)]('api-doc',_0x45dfc0(0xae)+_0x3b492b[_0x45dfc0(0xad)],{'datasetCode':_0x3b492b['datasetCode'],'datasetName':_0x3b492b[_0x45dfc0(0xa7)],'error':_0x34da33,'progress':_0x1629cc+'/'+_0x3010c3}),_0x8dd916['push']({'datasetCode':_0x3b492b['datasetCode'],'datasetName':_0x3b492b[_0x45dfc0(0xa7)],'filePath':'','success':![],'error':_0x34da33}),_0x1629cc<_0x3010c3&&(console[_0x45dfc0(0xb8)](_0x45dfc0(0xa2)),await delay(0xbb8));}}return _0x8dd916;}function a0_0x5f23(){const _0x5c5942=['36BgAPhh','tableName','13762511spybgI',']\x20Generating:\x20','488276FZzAoA','POST','Waiting\x203\x20seconds...\x0a','length','api-doc','./docs','4692SKPYam','name','✗\x20Failed:\x20','✓\x20Generated:\x20','6DMblQE','success','1346583LZWNgY','datasetCode','生成文档失败:\x20','.md\x20(','15485872wKZPXg','638WNTGHk','生成文档成功:\x20','.md','5ATkHGG','markdown','Fetch\x20doc\x20(','error','log','string','326658DACLLU','):\x20missing\x20data.markdown\x20field','utf8','2482010wCcDxy','.md\x20-\x20','Invalid\x20response\x20format\x20(','/api/node-toolbox/api-doc-generator','2UALuxm'];a0_0x5f23=function(){return _0x5c5942;};return a0_0x5f23();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x52b419,_0x43844b){const _0x51e2a2=a1_0x49f1,_0x19b526=_0x52b419();while(!![]){try{const _0x4071f9=parseInt(_0x51e2a2(0x16e))/0x1*(parseInt(_0x51e2a2(0x165))/0x2)+parseInt(_0x51e2a2(0x16b))/0x3+parseInt(_0x51e2a2(0x168))/0x4*(parseInt(_0x51e2a2(0x160))/0x5)+parseInt(_0x51e2a2(0x169))/0x6+parseInt(_0x51e2a2(0x166))/0x7+parseInt(_0x51e2a2(0x16a))/0x8+-parseInt(_0x51e2a2(0x161))/0x9;if(_0x4071f9===_0x43844b)break;else _0x19b526['push'](_0x19b526['shift']());}catch(_0x25c637){_0x19b526['push'](_0x19b526['shift']());}}}(a1_0x23dc,0xc8663));import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';function a1_0x23dc(){const _0x469103=['正在从服务器拉取模型列表...\x20(环境:\x20','147691rMRzDL','&otype=array','replace','fetch-model-list','/api/node-toolbox/dataset/model-list?appcode=','40HjIJps','32936814VCnwJC','configArray','trim','info','8FhTLMM','4669644MPddEp','length','604308XoZzIp','8963586kyuEUQ','2908248AcDWXX','469641ZlPwhc','map'];a1_0x23dc=function(){return _0x469103;};return a1_0x23dc();}import{getEnv}from'../constant/env.js';import{platformFetch}from'../core/api-client.js';function cleanNewlines(_0x48c4b4){const _0x526669=a1_0x49f1;return _0x48c4b4[_0x526669(0x170)](/[\r\n]+/g,'\x20')[_0x526669(0x163)]();}function cleanDatasetName(_0x5bffb9){if(!_0x5bffb9['name'])return _0x5bffb9;return{..._0x5bffb9,'name':cleanNewlines(_0x5bffb9['name'])};}function a1_0x49f1(_0x2e702a,_0x2fa5f1){_0x2e702a=_0x2e702a-0x15f;const _0x23dc28=a1_0x23dc();let _0x49f1e5=_0x23dc28[_0x2e702a];return _0x49f1e5;}export async function fetchModelList(_0x1af0f5,_0x2946d7){const _0x13abcb=a1_0x49f1,_0x228453=getEnv(),_0x2e82da=getApiDomain()+_0x13abcb(0x15f)+_0x1af0f5+_0x13abcb(0x16f);logger[_0x13abcb(0x164)](_0x13abcb(0x171),_0x13abcb(0x16d)+_0x228453+')',{'apiUrl':_0x2e82da});const _0x35bd49=await platformFetch(_0x2e82da,{'cookie':_0x2946d7,'label':'Fetch\x20datasets'}),_0x4ca9f2=(_0x35bd49[_0x13abcb(0x162)]??[])[_0x13abcb(0x16c)](cleanDatasetName);return{'configArray':_0x4ca9f2,'count':_0x4ca9f2[_0x13abcb(0x167)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a2_0x47c6(){const _0x40f170=['utf8','length','dirname','key','-client','join','\x22\x20}','10MYaBSW','2252421yVaVAy','51313IumRQG','replaceApiContent','354296uHrKeF','668890zveCTu','197356wjqZSr','API\x20文件生成成功!','templates/generate-api','push','795858BGpfvN','test','replace','9IkOZYD','CONFIG_NAMES.DEFAULT','.ts','client','Please\x20configure\x20app\x20code\x20first\x20via\x20`','alias','forEach','511980VvEjqv','toUpperCase','api.ts.tpl','init-api',',\x20env:\x20\x22','{\x20apiConfigName:\x20','name','typescript','client.ts.tpl','datasetCode','\x20config\x20set\x20app\x20<value>`','../..','{\x20apiConfigName:\x20\x22'];a2_0x47c6=function(){return _0x40f170;};return a2_0x47c6();}(function(_0x96145a,_0x7da8af){const _0x5bf8f7=a2_0xd2f6,_0x5d4b80=_0x96145a();while(!![]){try{const _0x3e42da=-parseInt(_0x5bf8f7(0x1e7))/0x1*(parseInt(_0x5bf8f7(0x1e5))/0x2)+parseInt(_0x5bf8f7(0x1f2))/0x3*(-parseInt(_0x5bf8f7(0x1eb))/0x4)+parseInt(_0x5bf8f7(0x1ea))/0x5+parseInt(_0x5bf8f7(0x1f9))/0x6+parseInt(_0x5bf8f7(0x1ef))/0x7+-parseInt(_0x5bf8f7(0x1e9))/0x8+parseInt(_0x5bf8f7(0x1e6))/0x9;if(_0x3e42da===_0x7da8af)break;else _0x5d4b80['push'](_0x5d4b80['shift']());}catch(_0x2e67bc){_0x5d4b80['push'](_0x5d4b80['shift']());}}}(a2_0x47c6,0x20c3a));import a2_0x47bf81 from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a2_0x50217d 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';function a2_0xd2f6(_0x220087,_0x5e4ddd){_0x220087=_0x220087-0x1e0;const _0x47c6be=a2_0x47c6();let _0xd2f62e=_0x47c6be[_0x220087];return _0xd2f62e;}export async function generateApiFile(_0x42ed8f,_0x2909eb,_0x148c15,_0x268057,_0x421f7f,_0xbe004d,_0x3fae14){const _0x2af56b=a2_0xd2f6;if(!_0x148c15)throw new Error(_0x2af56b(0x1f6)+CLI_BIN_NAME+_0x2af56b(0x203));const _0x839569=_0x268057&&!_0x3fae14,_0x41e5df=_0x3fae14||_0x148c15,_0x56a60c=_0x839569?_0x2af56b(0x1f3):'\x22'+_0x41e5df+'\x22',_0x1afee8=!isProduction(_0x421f7f);let _0x48678f;if(_0x839569)_0x1afee8?_0x48678f=_0x2af56b(0x1fe)+_0x56a60c+',\x20env:\x20\x22'+_0x421f7f+_0x2af56b(0x1e4):_0x48678f='';else{const _0xad373b=_0x1afee8?_0x2af56b(0x1fd)+_0x421f7f+'\x22':'';_0x48678f=_0x2af56b(0x205)+_0x41e5df+'\x22'+_0xad373b+'\x20}';}const _0x1fc12f=_0x2909eb?_0x2909eb+'-api':'api',_0x12e681=_0x2909eb?_0x2909eb+_0x2af56b(0x1e2):_0x2af56b(0x1f5),_0x5736df=_0x2909eb&&!/^app-[a-f0-9]+$/i[_0x2af56b(0x1f0)](_0x2909eb)?_0x2909eb[_0x2af56b(0x1f1)](/-/g,'_')[_0x2af56b(0x1fa)]():'LOVRABET',_0x38968d=[];_0x42ed8f[_0x2af56b(0x1f8)](_0x1252f1=>{const _0x315e78=_0x2af56b;_0x38968d[_0x315e78(0x1ee)]({'datasetCode':_0x1252f1[_0x315e78(0x202)],'tableName':_0x1252f1['tableName'],'name':_0x1252f1[_0x315e78(0x1ff)]||'','alias':_0x1252f1[_0x315e78(0x1f7)]||_0x1252f1[_0x315e78(0x1e1)]});});const _0x4d45c6=fileURLToPath(import.meta.url),_0x1f09d7=a2_0x50217d['resolve'](a2_0x50217d[_0x2af56b(0x1e0)](_0x4d45c6),_0x2af56b(0x204)),_0x29767b=a2_0x50217d['join'](_0x1f09d7,_0x2af56b(0x1ed)),_0x1fc291=a2_0x50217d['join'](_0x29767b,_0x2af56b(0x1fb)),_0x47bdbd=a2_0x50217d[_0x2af56b(0x1e3)](_0x29767b,_0x2af56b(0x201)),_0x580b5c=_0xbe004d;mkdirSync(_0x580b5c,{'recursive':!![]});const _0x427b4a=_0x38968d[0x0]?.[_0x2af56b(0x1f7)],_0x7dbf25=readFileSync(_0x1fc291,_0x2af56b(0x206)),_0x3a2911=TemplateReplacer[_0x2af56b(0x1e8)](_0x7dbf25,_0x148c15,_0x38968d,_0x427b4a,_0x1fc12f,_0x56a60c,undefined,_0x5736df),_0x292798=await a2_0x47bf81['format'](_0x3a2911,{'parser':_0x2af56b(0x200)}),_0x152e77=a2_0x50217d[_0x2af56b(0x1e3)](_0x580b5c,_0x1fc12f+_0x2af56b(0x1f4));writeFileSync(_0x152e77,_0x292798,{'encoding':'utf8'});const _0x357ec5=readFileSync(_0x47bdbd,_0x2af56b(0x206)),_0xae0094=TemplateReplacer[_0x2af56b(0x1e8)](_0x357ec5,_0x148c15,_0x38968d,_0x427b4a,_0x1fc12f,_0x56a60c,_0x48678f,_0x5736df),_0x559534=await a2_0x47bf81['format'](_0xae0094,{'parser':_0x2af56b(0x200)}),_0x2c01dc=a2_0x50217d[_0x2af56b(0x1e3)](_0x580b5c,_0x12e681+'.ts');writeFileSync(_0x2c01dc,_0x559534,{'encoding':_0x2af56b(0x206)});const _0x3a9cea=_0x38968d[_0x2af56b(0x207)];return logger['success'](_0x2af56b(0x1fc),_0x2af56b(0x1ec),undefined,{'apiFile':_0x152e77,'clientFile':_0x2c01dc,'modelCount':_0x3a9cea,'configName':_0x56a60c}),{'modelCount':_0x3a9cea,'apiFilePath':_0x152e77,'clientFilePath':_0x2c01dc,'configName':_0x56a60c};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a3_0x28d2(_0x569df4,_0x4d196b){_0x569df4=_0x569df4-0x9f;const _0x1248b2=a3_0x1248();let _0x28d249=_0x1248b2[_0x569df4];return _0x28d249;}(function(_0x434341,_0x24a446){const _0x28aea2=a3_0x28d2,_0x362e9b=_0x434341();while(!![]){try{const _0x1317c9=parseInt(_0x28aea2(0xb0))/0x1+parseInt(_0x28aea2(0xb3))/0x2+parseInt(_0x28aea2(0xa8))/0x3+parseInt(_0x28aea2(0xa4))/0x4*(-parseInt(_0x28aea2(0xaa))/0x5)+-parseInt(_0x28aea2(0xa0))/0x6*(parseInt(_0x28aea2(0xa6))/0x7)+parseInt(_0x28aea2(0xb1))/0x8*(parseInt(_0x28aea2(0xad))/0x9)+-parseInt(_0x28aea2(0xa9))/0xa;if(_0x1317c9===_0x24a446)break;else _0x362e9b['push'](_0x362e9b['shift']());}catch(_0x23161f){_0x362e9b['push'](_0x362e9b['shift']());}}}(a3_0x1248,0x9a468));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a3_0x1248(){const _0x5b6bc7=['log','9qDrxmV','autoYes','start','798765lMIxgI','6028896BeeLMr','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','2303646hZupwI','!\x20Login\x20failed.','Run\x20`','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','stop','5705034GqcEgY','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','nonInteractive','2370772QUebOM','*\x20Login\x20successful!','7hXZuZL','validation','3271359ufiTJG','16192090ZMeEWw','5fhJOTL','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.'];a3_0x1248=function(){return _0x5b6bc7;};return a3_0x1248();}import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';import a3_0x252060 from'ora';export async function runAuthServer(_0x2c0038){const _0x5f4d21=a3_0x28d2,_0x339f92=await getIsSessionValid();if(_0x339f92){console['log'](_0x5f4d21(0xab));return;}if(_0x2c0038?.[_0x5f4d21(0xa3)]&&!_0x2c0038[_0x5f4d21(0xae)])throw CliErrors[_0x5f4d21(0xa7)](_0x5f4d21(0xa2),_0x5f4d21(0xb5)+CLI_BIN_NAME+_0x5f4d21(0xa1));const _0x813a1b=_0x2c0038?.[_0x5f4d21(0xae)]?!![]:await confirm({'message':'No\x20valid\x20session.\x20Login\x20now?','default':!![]});if(!_0x813a1b)return;if(_0x2c0038?.['nonInteractive']){console[_0x5f4d21(0xac)](_0x5f4d21(0xb2));const _0x261cfc=await authServer({'silent':![],'openBrowser':![]});_0x261cfc?console[_0x5f4d21(0xac)](_0x5f4d21(0xa5)):console[_0x5f4d21(0xac)](_0x5f4d21(0xb4));return;}const _0xa1d15d=a3_0x252060(_0x5f4d21(0xb6))[_0x5f4d21(0xaf)](),_0x6be665=await authServer({'silent':!![],'openBrowser':!![]});_0xa1d15d[_0x5f4d21(0x9f)](),_0x6be665?console[_0x5f4d21(0xac)](_0x5f4d21(0xa5)):console[_0x5f4d21(0xac)](_0x5f4d21(0xb4));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x379965=a4_0x2b27;(function(_0x71b22c,_0x1acb2e){const _0x1b59a7=a4_0x2b27,_0x3c0e8e=_0x71b22c();while(!![]){try{const _0x572922=parseInt(_0x1b59a7(0x1eb))/0x1*(-parseInt(_0x1b59a7(0x1f3))/0x2)+parseInt(_0x1b59a7(0x1e1))/0x3+-parseInt(_0x1b59a7(0x1dc))/0x4+parseInt(_0x1b59a7(0x1e7))/0x5+parseInt(_0x1b59a7(0x1d8))/0x6+-parseInt(_0x1b59a7(0x1db))/0x7*(parseInt(_0x1b59a7(0x1e6))/0x8)+parseInt(_0x1b59a7(0x1ee))/0x9*(parseInt(_0x1b59a7(0x1de))/0xa);if(_0x572922===_0x1acb2e)break;else _0x3c0e8e['push'](_0x3c0e8e['shift']());}catch(_0x12649e){_0x3c0e8e['push'](_0x3c0e8e['shift']());}}}(a4_0x1776,0x7d4e0));import{writeFileSync}from'node:fs';import a4_0x21ad0e from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';function a4_0x2b27(_0x25df1b,_0x2fd9ac){_0x25df1b=_0x25df1b-0x1cb;const _0x177648=a4_0x1776();let _0x2b2770=_0x177648[_0x25df1b];return _0x2b2770;}import{getIsSessionValid}from'../auth/is-session-valid.js';import{cookieFile}from'../auth/constant.js';import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;function a4_0x1776(){const _0x4cf93a=['platform','port','162wgqWcn','json','open\x20\x22','listen','address','14suNOwU','darwin','cookie','object','text/html;\x20charset=utf-8','cmd\x20/c\x20start\x20\x22\x22\x20\x22','log','error','writeHead','end','xdg-open\x20\x22','127.0.0.1','createServer','utf-8','isAuth','silent','867354XUHuPi','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','close','322cEuVor','3675112HDZVIg','user','665960ICmXrU','then','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','2800287NMcTpu','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','headers','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','openBrowser','16336NZOzsP','193545ynHVGR','session','https://dev.lovrabet.com:','🔐\x20Starting\x20login\x20service...','112781ohKnGb'];a4_0x1776=function(){return _0x4cf93a;};return a4_0x1776();}export async function authServer(_0x4813f4){const _0x237cd0=a4_0x2b27,_0x29a20e=_0x4813f4?.[_0x237cd0(0x1d7)]||![],_0x57ae3f=_0x4813f4?.[_0x237cd0(0x1e5)]??!![],_0x3830f1=_0x4813f4?.['timeoutMs']??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x1dacb9=await(await fetch('https://g.yuntooai.com/cert/lovrabet-dev.json'))[_0x237cd0(0x1ef)]();return new Promise(async(_0x13c798,_0x238d33)=>{const _0x256983=_0x237cd0;let _0x48e815=0x0,_0x1849b9=![],_0x1f085b;const _0x2973c0=a4_0x21ad0e[_0x256983(0x1d4)](_0x1dacb9,async(_0x3670e7,_0x45f490)=>{const _0xb8c8be=_0x256983,_0x3d8c75=getUserDomain(),_0x5282e0=_0x3670e7[_0xb8c8be(0x1e3)][_0xb8c8be(0x1f5)]||'',_0x1219d2=await fetch(_0x3d8c75+'/api/auth/get-session',{'headers':{'cookie':_0x5282e0}})[_0xb8c8be(0x1df)](_0x57a1b2=>_0x57a1b2[_0xb8c8be(0x1ef)]()),_0x26f51f=_0x1219d2&&_0x1219d2[_0xb8c8be(0x1e8)]&&_0x1219d2[_0xb8c8be(0x1dd)];if(_0x26f51f){writeFileSync(cookieFile,_0x5282e0,_0xb8c8be(0x1d5));const _0x4882dd=buildLoginSuccessHtml();_0x45f490['writeHead'](0xc8,{'Content-Type':_0xb8c8be(0x1cc)}),_0x45f490[_0xb8c8be(0x1d1)](_0x4882dd),_0x57b4b4(!![]);}else{const _0x17e9f4=''+encodeURIComponent('https://dev.lovrabet.com:'+_0x48e815);_0x45f490[_0xb8c8be(0x1d0)](0x12e,{'location':_0x3d8c75+'/sign-in?redirect='+_0x17e9f4}),_0x45f490[_0xb8c8be(0x1d1)]();return;}});function _0x57b4b4(_0x1ca455){if(_0x1849b9)return;_0x1849b9=!![],_0x1f085b&&clearTimeout(_0x1f085b),_0x2973c0['close'](),_0x13c798(_0x1ca455);}_0x2973c0[_0x256983(0x1f1)](0x0,_0x256983(0x1d3),()=>{const _0x2704dc=_0x256983,_0x2d1547=_0x2973c0[_0x2704dc(0x1f2)]();_0x48e815=typeof _0x2d1547===_0x2704dc(0x1cb)&&_0x2d1547?_0x2d1547[_0x2704dc(0x1ed)]:Number(_0x2d1547);const _0x2796cd=_0x2704dc(0x1e9)+_0x48e815;_0x1f085b=setTimeout(()=>{const _0x33fbf4=_0x2704dc;!_0x29a20e&&console[_0x33fbf4(0x1ce)]('!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.'),_0x57b4b4(![]);},_0x3830f1);!_0x29a20e&&(console['log'](_0x2704dc(0x1ea)),console[_0x2704dc(0x1ce)]('📍\x20Login\x20URL:',_0x2796cd),_0x57ae3f?(console[_0x2704dc(0x1ce)](_0x2704dc(0x1d9)),console['log'](''),console[_0x2704dc(0x1ce)]('💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.')):console[_0x2704dc(0x1ce)]('💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.'),console[_0x2704dc(0x1ce)](''));if(!_0x57ae3f)return;openInBrowser(_0x2796cd)[_0x2704dc(0x1df)](_0x10cdc1=>{const _0x4af5dc=_0x2704dc;!_0x29a20e&&(_0x10cdc1?console[_0x4af5dc(0x1ce)](_0x4af5dc(0x1e4)):(console[_0x4af5dc(0x1ce)](_0x4af5dc(0x1e2)),console[_0x4af5dc(0x1ce)]('🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0x2796cd)),console[_0x4af5dc(0x1ce)](''));})['catch'](()=>{const _0xc130d3=_0x2704dc;!_0x29a20e&&(console[_0xc130d3(0x1ce)](_0xc130d3(0x1e2)),console[_0xc130d3(0x1ce)](_0xc130d3(0x1e0),_0x2796cd),console['log'](''));});}),_0x2973c0['on'](_0x256983(0x1cf),_0x3d3455=>{const _0x4f9949=_0x256983;if(_0x1849b9)return;_0x1849b9=!![],_0x1f085b&&clearTimeout(_0x1f085b),!_0x29a20e&&console['error']('Auth\x20server\x20error:',_0x3d3455),_0x2973c0[_0x4f9949(0x1da)](),_0x238d33(_0x3d3455);});});}function openInBrowser(_0x1761ef){return new Promise(_0x10066e=>{const _0x1011e0=a4_0x2b27,_0x3bf093=process[_0x1011e0(0x1ec)];let _0x51ae49;if(_0x3bf093==='win32')_0x51ae49=_0x1011e0(0x1cd)+_0x1761ef+'\x22';else _0x3bf093===_0x1011e0(0x1f4)?_0x51ae49=_0x1011e0(0x1f0)+_0x1761ef+'\x22':_0x51ae49=_0x1011e0(0x1d2)+_0x1761ef+'\x22';exec(_0x51ae49,_0x3bb3eb=>{_0x3bb3eb?_0x10066e(![]):_0x10066e(!![]);});});}if(import.meta.main){const isAuth=await authServer();console['log'](a4_0x379965(0x1d6),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x23003f=a5_0x3910;(function(_0x2c2ae5,_0x553f22){const _0x36e4c2=a5_0x3910,_0x51ee5e=_0x2c2ae5();while(!![]){try{const _0x5ccd60=-parseInt(_0x36e4c2(0xe6))/0x1+parseInt(_0x36e4c2(0xde))/0x2+-parseInt(_0x36e4c2(0xe3))/0x3+parseInt(_0x36e4c2(0xdd))/0x4+parseInt(_0x36e4c2(0xe4))/0x5+-parseInt(_0x36e4c2(0xe1))/0x6+parseInt(_0x36e4c2(0xe2))/0x7*(parseInt(_0x36e4c2(0xe0))/0x8);if(_0x5ccd60===_0x553f22)break;else _0x51ee5e['push'](_0x51ee5e['shift']());}catch(_0x1d313f){_0x51ee5e['push'](_0x51ee5e['shift']());}}}(a5_0x2a4a,0x61a7e));import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a5_0x3910(_0x2f41dd,_0x168ea4){_0x2f41dd=_0x2f41dd-0xdd;const _0x2a4a83=a5_0x2a4a();let _0x391085=_0x2a4a83[_0x2f41dd];return _0x391085;}import{join}from'node:path';export const configDir=join(homedir(),a5_0x23003f(0xe5));export const cookieFile=join(configDir,a5_0x23003f(0xdf));function a5_0x2a4a(){const _0x344897=['89732MxFuub','229040edmIGa','cookie','24pmVzJc','3996936jimfjq','5133954vxhOme','2377635uRoGvO','299550STFdkY','.lovrabet','538430mxjKwI'];a5_0x2a4a=function(){return _0x344897;};return a5_0x2a4a();}mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xc9eaa0,_0x4e5128){var _0x32613b=a6_0x1249,_0x21248a=_0xc9eaa0();while(!![]){try{var _0x50daef=-parseInt(_0x32613b(0x9b))/0x1+-parseInt(_0x32613b(0x9c))/0x2*(parseInt(_0x32613b(0x96))/0x3)+parseInt(_0x32613b(0x9a))/0x4+parseInt(_0x32613b(0x97))/0x5*(parseInt(_0x32613b(0xa1))/0x6)+-parseInt(_0x32613b(0x98))/0x7*(parseInt(_0x32613b(0x9d))/0x8)+-parseInt(_0x32613b(0x99))/0x9*(-parseInt(_0x32613b(0xa2))/0xa)+-parseInt(_0x32613b(0x9f))/0xb*(-parseInt(_0x32613b(0x9e))/0xc);if(_0x50daef===_0x4e5128)break;else _0x21248a['push'](_0x21248a['shift']());}catch(_0x3c402c){_0x21248a['push'](_0x21248a['shift']());}}}(a6_0x518f,0x8ca34));function a6_0x518f(){var _0x302c8a=['3963888trFSEc','353596mQnlmF','1736826MXUorC','4264EanSbd','36AgjDDu','285461Abteiz','utf-8','2598ZTuQcG','201470ehDjpN','3zNBjvY','5165lQLmBE','2912BtBgwk','225iZWqXI'];a6_0x518f=function(){return _0x302c8a;};return a6_0x518f();}import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';function a6_0x1249(_0x2bf291,_0x12de09){_0x2bf291=_0x2bf291-0x96;var _0x518f4d=a6_0x518f();var _0x12499d=_0x518f4d[_0x2bf291];return _0x12499d;}export function getCookie(){var _0x769c64=a6_0x1249;try{return readFileSync(cookieFile,_0x769c64(0xa0));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3a2aa3,_0x5ee660){const _0x3b9758=a7_0x3c4b,_0x22f9fd=_0x3a2aa3();while(!![]){try{const _0x2ceafe=parseInt(_0x3b9758(0x1aa))/0x1*(-parseInt(_0x3b9758(0x1ae))/0x2)+parseInt(_0x3b9758(0x1b1))/0x3*(parseInt(_0x3b9758(0x1ac))/0x4)+parseInt(_0x3b9758(0x1b6))/0x5*(-parseInt(_0x3b9758(0x1af))/0x6)+-parseInt(_0x3b9758(0x1a9))/0x7*(-parseInt(_0x3b9758(0x1b2))/0x8)+parseInt(_0x3b9758(0x1a8))/0x9+-parseInt(_0x3b9758(0x1b5))/0xa*(parseInt(_0x3b9758(0x1ad))/0xb)+parseInt(_0x3b9758(0x1b3))/0xc*(-parseInt(_0x3b9758(0x1b7))/0xd);if(_0x2ceafe===_0x5ee660)break;else _0x22f9fd['push'](_0x22f9fd['shift']());}catch(_0x5435c1){_0x22f9fd['push'](_0x22f9fd['shift']());}}}(a7_0x2605,0xd8228));import{existsSync,readFileSync}from'node:fs';function a7_0x3c4b(_0x46fd93,_0x227a08){_0x46fd93=_0x46fd93-0x1a7;const _0x260549=a7_0x2605();let _0x3c4b11=_0x260549[_0x46fd93];return _0x3c4b11;}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0xfbdd26=a7_0x3c4b;try{if(!existsSync(cookieFile))return null;const _0x34a5ba=readFileSync(cookieFile,_0xfbdd26(0x1b0)),_0x599370=await fetch(getUserDomain()+_0xfbdd26(0x1b4),{'headers':{'cookie':_0x34a5ba}});if(!_0x599370['ok'])return null;const _0x3a4719=await _0x599370[_0xfbdd26(0x1a7)]();if(!_0x3a4719['session']||!_0x3a4719[_0xfbdd26(0x1ab)])return null;return _0x3a4719;}catch{return null;}}function a7_0x2605(){const _0x3ab4a9=['59397eyvHte','json','3059262UEzVMx','7063jDHPwn','1xGaHMA','user','5742512owChha','26367hhPsgR','1317612dgPonm','109866qvjPYZ','utf-8','3JFqsxa','9616WzBvuO','12GfrFFU','/api/auth/get-session','1270fAsqbc','310BwkuiP'];a7_0x2605=function(){return _0x3ab4a9;};return a7_0x2605();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a8_0x2dc4(_0x186ddf,_0x3cc95c){_0x186ddf=_0x186ddf-0x13d;const _0xde845=a8_0xde84();let _0x2dc4ce=_0xde845[_0x186ddf];return _0x2dc4ce;}(function(_0x24179a,_0x58dcb0){const _0x21e015=a8_0x2dc4,_0x317097=_0x24179a();while(!![]){try{const _0x5de096=parseInt(_0x21e015(0x143))/0x1*(-parseInt(_0x21e015(0x140))/0x2)+parseInt(_0x21e015(0x13e))/0x3+-parseInt(_0x21e015(0x14a))/0x4+parseInt(_0x21e015(0x149))/0x5+-parseInt(_0x21e015(0x144))/0x6+parseInt(_0x21e015(0x145))/0x7+-parseInt(_0x21e015(0x148))/0x8;if(_0x5de096===_0x58dcb0)break;else _0x317097['push'](_0x317097['shift']());}catch(_0x3b131f){_0x317097['push'](_0x317097['shift']());}}}(a8_0xde84,0xebc7b));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a8_0xde84(){const _0x89b358=['then','json','7ePPreO','9740814ooFqDv','12195330geBDaS','/api/auth/get-session','utf-8','5737536pqPSWS','6804430DWRAQJ','730804OomvtH','session','3647358AtIzmQ','user','237070WPyBLf'];a8_0xde84=function(){return _0x89b358;};return a8_0xde84();}export async function getIsSessionValid(){const _0x4d8e99=a8_0x2dc4;try{if(!existsSync(cookieFile))return![];const _0xc0fad2=readFileSync(cookieFile,_0x4d8e99(0x147)),_0x42cc13=await fetch(getUserDomain()+_0x4d8e99(0x146),{'headers':{'cookie':_0xc0fad2}})[_0x4d8e99(0x141)](_0x24333d=>_0x24333d[_0x4d8e99(0x142)]());return _0x42cc13&&_0x42cc13[_0x4d8e99(0x13d)]&&_0x42cc13[_0x4d8e99(0x13f)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3cad0a,_0x492408){const _0x305b63=a9_0x1092,_0x30d2dd=_0x3cad0a();while(!![]){try{const _0x46ce38=parseInt(_0x305b63(0x1d4))/0x1+parseInt(_0x305b63(0x1cd))/0x2+-parseInt(_0x305b63(0x1d3))/0x3+parseInt(_0x305b63(0x1d0))/0x4*(-parseInt(_0x305b63(0x1ce))/0x5)+parseInt(_0x305b63(0x1d1))/0x6+-parseInt(_0x305b63(0x1d2))/0x7+parseInt(_0x305b63(0x1cb))/0x8*(parseInt(_0x305b63(0x1cf))/0x9);if(_0x46ce38===_0x492408)break;else _0x30d2dd['push'](_0x30d2dd['shift']());}catch(_0x102e08){_0x30d2dd['push'](_0x30d2dd['shift']());}}}(a9_0x14ef,0xb0fa4));function a9_0x1092(_0x40e3d9,_0x590ab6){_0x40e3d9=_0x40e3d9-0x1ca;const _0x14efe5=a9_0x14ef();let _0x10920e=_0x14efe5[_0x40e3d9];return _0x10920e;}function a9_0x14ef(){const _0xea30a3=['2670367KjTGKE','885978CzjMSH','98040Vcwayt','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','<!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>','358728TxCjOh','</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>','1215274DROdQC','485rLYrjW','153kLEmez','21668ClUJdU','2755092jIERXr'];a9_0x14ef=function(){return _0xea30a3;};return a9_0x14ef();}export function buildLoginSuccessHtml(){const _0x551ded=a9_0x1092,_0x1487cb=_0x551ded(0x1d5);return _0x551ded(0x1ca)+_0x1487cb+_0x551ded(0x1cc);}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x43aebd,_0x5bd0bb){var _0x371187=a10_0x1a13,_0x3fd837=_0x43aebd();while(!![]){try{var _0xf00588=parseInt(_0x371187(0x194))/0x1+-parseInt(_0x371187(0x19d))/0x2+-parseInt(_0x371187(0x199))/0x3+parseInt(_0x371187(0x19b))/0x4*(parseInt(_0x371187(0x198))/0x5)+parseInt(_0x371187(0x19c))/0x6*(-parseInt(_0x371187(0x19a))/0x7)+parseInt(_0x371187(0x196))/0x8+-parseInt(_0x371187(0x195))/0x9*(-parseInt(_0x371187(0x19f))/0xa);if(_0xf00588===_0x5bd0bb)break;else _0x3fd837['push'](_0x3fd837['shift']());}catch(_0x57c47e){_0x3fd837['push'](_0x3fd837['shift']());}}}(a10_0x13b9,0x48c5f));function a10_0x13b9(){var _0x3684dd=['7RkFWHs','1488816jIgMjD','3106506DwNoiA','750018UEGJFI','✓\x20Logged\x20out','692130uLitZE','!\x20Not\x20logged\x20in','227384DINtfQ','27zXzAZe','3278912fTfsnB','log','5RaFmpk','78756pwijSg'];a10_0x13b9=function(){return _0x3684dd;};return a10_0x13b9();}import{unlinkSync,existsSync}from'node:fs';function a10_0x1a13(_0x3cd234,_0x4742e8){_0x3cd234=_0x3cd234-0x193;var _0x13b981=a10_0x13b9();var _0x1a1362=_0x13b981[_0x3cd234];return _0x1a1362;}import{cookieFile}from'../auth/constant.js';export function logout(){var _0x859886=a10_0x1a13;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x859886(0x197)](_0x859886(0x19e))):console[_0x859886(0x197)](_0x859886(0x193));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3635d2,_0x2f45a9){const _0x555678=a11_0x372a,_0x2e924e=_0x3635d2();while(!![]){try{const _0x4d3918=parseInt(_0x555678(0x6a))/0x1*(parseInt(_0x555678(0x70))/0x2)+parseInt(_0x555678(0x71))/0x3+-parseInt(_0x555678(0x75))/0x4*(parseInt(_0x555678(0x6e))/0x5)+parseInt(_0x555678(0x6f))/0x6*(-parseInt(_0x555678(0x73))/0x7)+parseInt(_0x555678(0x74))/0x8*(parseInt(_0x555678(0x6d))/0x9)+parseInt(_0x555678(0x72))/0xa*(-parseInt(_0x555678(0x6b))/0xb)+parseInt(_0x555678(0x76))/0xc*(parseInt(_0x555678(0x6c))/0xd);if(_0x4d3918===_0x2f45a9)break;else _0x2e924e['push'](_0x2e924e['shift']());}catch(_0x581392){_0x2e924e['push'](_0x2e924e['shift']());}}}(a11_0x4136,0x8f4f0));export const dynamicCliFlags={'enableBffSave':{'type':'boolean'}};function a11_0x372a(_0x4f4764,_0x7a6107){_0x4f4764=_0x4f4764-0x6a;const _0x413628=a11_0x4136();let _0x372a54=_0x413628[_0x4f4764];return _0x372a54;}function a11_0x4136(){const _0x28d599=['3632GwDipQ','1903GMnmau','26RshvXA','18fgioZk','3640cIRxfD','18VklhJS','168NGgIza','2847888MpUgzf','60110JjVNDT','1093617mFdXKY','3688144McauHO','2408SxuUSX','2144544uQBLqH'];a11_0x4136=function(){return _0x28d599;};return a11_0x4136();}
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a12_0x281528=a12_0x9e98;(function(_0x20b3b8,_0x3e850e){const _0x574fc0=a12_0x9e98,_0x1581ad=_0x20b3b8();while(!![]){try{const _0x207e8d=-parseInt(_0x574fc0(0xab))/0x1*(parseInt(_0x574fc0(0xb8))/0x2)+-parseInt(_0x574fc0(0xac))/0x3+-parseInt(_0x574fc0(0xbb))/0x4*(parseInt(_0x574fc0(0xba))/0x5)+parseInt(_0x574fc0(0xad))/0x6+parseInt(_0x574fc0(0xb0))/0x7*(parseInt(_0x574fc0(0xc2))/0x8)+-parseInt(_0x574fc0(0xcc))/0x9+parseInt(_0x574fc0(0xb9))/0xa;if(_0x207e8d===_0x3e850e)break;else _0x1581ad['push'](_0x1581ad['shift']());}catch(_0xea1275){_0x1581ad['push'](_0x1581ad['shift']());}}}(a12_0xaa2a,0xd1e79));import a12_0x5e3e2d from'meow';function a12_0x9e98(_0x37138c,_0x169b18){_0x37138c=_0x37138c-0xaa;const _0xaa2a8b=a12_0xaa2a();let _0x9e98e0=_0xaa2a8b[_0x37138c];return _0x9e98e0;}import{showHelp}from'./help.js';function a12_0xaa2a(){const _0x4ad390=['now','command','unknown_service','2SxRHZj','4397877iabZFe','4784598EuunUv','`\x20in\x20v2.0.\x0a','log','2849007pVYPCN','cancelled','global','./constant/domain.js','./context.js','⚠\x20`','Hint:\x20','error','833116vmIijH','41264780PzgmPq','10OMjcub','2043592hTnkal','help','exitCode','./constant/env.js','message','unknown','name','16yqTEsG','runtimeDomain','wildcardDef','hint','raw','stderr','slice','string','\x0aCancelled.\x0a','`\x20in\x20new\x20scripts.\x0a','14015457rwEDUr','flags','defaultCommand','Unexpected\x20error:','Error:\x20','unknownCommand','apiDomain','input','`;\x20prefer\x20`','\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a','write','dynamicCliFlags','env'];a12_0xaa2a=function(){return _0x4ad390;};return a12_0xaa2a();}import{CliError,CliErrors}from'./errors.js';import{isKnownService,getServiceEntry,findDefinition,deprecatedAliases,resolveDeprecatedSubcommand}from'./commands/registry.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{CLI_BIN_NAME,buildMeowFlags}from'./constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'./generated/build-info.js';import{reportCliHelpTrace}from'./telemetry/cli-help-trace.js';import{reportCommandTrace}from'./telemetry/cli-command-trace.js';import{registerOtelShutdownOnExit,exitWithOtelShutdown}from'./telemetry/register-otel-exit-shutdown.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import('./cli-flags.js'))[a12_0x281528(0xd7)];}catch{}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!==a12_0x281528(0xc0)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[a12_0x281528(0xc8)](0x0,0xa)+')':VERSION,cli=a12_0x5e3e2d(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0x560967=a12_0x281528;let _0x4716b6=cli[_0x560967(0xd3)][0x0],_0x219025=cli[_0x560967(0xd3)][0x1];const _0x23653e=cli[_0x560967(0xcd)];if(!_0x4716b6){await reportCliHelpTrace(_0x560967(0xb2)),showHelp();return;}const _0x474a60=deprecatedAliases[_0x4716b6];if(_0x474a60&&!isKnownService(_0x4716b6)){const _0x1b1364=_0x219025?CLI_BIN_NAME+'\x20'+_0x4716b6+'\x20'+_0x219025:CLI_BIN_NAME+'\x20'+_0x4716b6,_0x431fb3=CLI_BIN_NAME+'\x20'+_0x474a60['service']+'\x20'+_0x474a60[_0x560967(0xda)];console['error'](_0x560967(0xb5)+_0x1b1364+'`\x20has\x20been\x20moved\x20to\x20`'+_0x431fb3+_0x560967(0xae)+_0x560967(0xd5)),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x4716b6)){await reportCliHelpTrace(_0x560967(0xaa),{'service':_0x4716b6}),showHelp();return;}const _0x5216ff=getServiceEntry(_0x4716b6);if(_0x23653e[_0x560967(0xd8)]&&typeof _0x23653e[_0x560967(0xd8)]===_0x560967(0xc9)){const {initEnv:_0xce3fb}=await import(_0x560967(0xbe));_0xce3fb(_0x23653e['env']);}const {buildConfigFromFlags:_0x4c6750}=await import(_0x560967(0xb4)),_0x4792b1=_0x4c6750(_0x23653e);if(!_0x23653e[_0x560967(0xd8)]&&_0x4792b1[_0x560967(0xd8)]){const {initEnv:_0x11227e}=await import(_0x560967(0xbe));_0x11227e(_0x4792b1[_0x560967(0xd8)]);}if(_0x4792b1[_0x560967(0xc6)]?.[_0x560967(0xd2)]||_0x4792b1[_0x560967(0xc6)]?.['userDomain']||_0x4792b1[_0x560967(0xc6)]?.['runtimeDomain']){const {initDomains:_0x175df3}=await import(_0x560967(0xb3));_0x175df3({'apiDomain':_0x4792b1[_0x560967(0xc6)][_0x560967(0xd2)]||undefined,'userDomain':_0x4792b1[_0x560967(0xc6)]['userDomain']||undefined,'runtimeDomain':_0x4792b1[_0x560967(0xc6)][_0x560967(0xc3)]||undefined});}if(!_0x219025){if(_0x23653e['help']){printServiceHelp(_0x4716b6);return;}if(_0x5216ff['defaultCommand'])_0x219025=_0x5216ff[_0x560967(0xce)];else{if(_0x5216ff[_0x560967(0xc4)]){await dispatchDeclarative(_0x5216ff[_0x560967(0xc4)],_0x4716b6,'',[],_0x23653e,_0x4792b1);return;}else{printServiceHelp(_0x4716b6);return;}}}const _0x147ebd=resolveDeprecatedSubcommand(_0x4716b6,_0x219025);if(_0x147ebd){const _0x364094=CLI_BIN_NAME+'\x20'+_0x4716b6+'\x20'+_0x219025,_0x3a8a7e=CLI_BIN_NAME+'\x20'+_0x4716b6+'\x20'+_0x147ebd;console[_0x560967(0xb7)](_0x560967(0xb5)+_0x364094+'`\x20is\x20an\x20alias\x20of\x20`'+_0x3a8a7e+_0x560967(0xd4)+_0x3a8a7e+_0x560967(0xcb)),_0x219025=_0x147ebd;}if(_0x23653e['help']&&!findDefinition(_0x4716b6,_0x219025)){printServiceHelp(_0x4716b6);return;}{let _0x48c286=findDefinition(_0x4716b6,_0x219025),_0x254df3=cli[_0x560967(0xd3)]['slice'](0x2);if(!_0x48c286){if(_0x5216ff['wildcardDef']){if(_0x23653e[_0x560967(0xbc)]){console[_0x560967(0xaf)](generateCommandHelp(_0x5216ff[_0x560967(0xc4)]));return;}_0x48c286=_0x5216ff[_0x560967(0xc4)],_0x254df3=[_0x219025,...cli[_0x560967(0xd3)][_0x560967(0xc8)](0x2)];}else{printServiceHelp(_0x4716b6),await handleErrorAsync(CliErrors[_0x560967(0xd1)](_0x4716b6+'\x20'+_0x219025));return;}}if(_0x23653e[_0x560967(0xbc)]){console[_0x560967(0xaf)](generateCommandHelp(_0x48c286));return;}await dispatchDeclarative(_0x48c286,_0x4716b6,_0x219025,_0x254df3,_0x23653e,_0x4792b1);}}async function dispatchDeclarative(_0x545aec,_0x15ea5c,_0x41e9e6,_0x45a9af,_0x641cbc,_0x264f31){const _0x4477eb=a12_0x281528,_0x337f88=Date[_0x4477eb(0xd9)]();let _0x6fe493;try{await runCommand(_0x545aec,createPipelineEnv(_0x264f31,_0x641cbc,_0x45a9af));}catch(_0x18551d){_0x6fe493=_0x18551d;}await reportCommandTrace({'service':_0x15ea5c,'command':_0x41e9e6,'flags':_0x641cbc,'durationMs':Date[_0x4477eb(0xd9)]()-_0x337f88,'error':_0x6fe493});if(_0x6fe493)await handleErrorAsync(_0x6fe493);}function printServiceHelp(_0x339cb5){const _0x190799=a12_0x281528;console[_0x190799(0xaf)](generateServiceHelp(_0x339cb5));}async function handleErrorAsync(_0x13aeef){const _0xd95055=a12_0x281528;if(_0x13aeef instanceof Error&&_0x13aeef[_0xd95055(0xc1)]==='ExitPromptError')return process[_0xd95055(0xc7)][_0xd95055(0xd6)](_0xd95055(0xca)),await exitWithOtelShutdown(0x0);if(_0x13aeef instanceof CliError){if(_0x13aeef['code']===_0xd95055(0xb1))return process[_0xd95055(0xc7)][_0xd95055(0xd6)]('\x0a'+_0x13aeef['message']+'\x0a'),await exitWithOtelShutdown(0x0);console[_0xd95055(0xb7)](_0xd95055(0xd0)+_0x13aeef[_0xd95055(0xbf)]);if(_0x13aeef[_0xd95055(0xc5)])console['error'](_0xd95055(0xb6)+_0x13aeef[_0xd95055(0xc5)]);return await exitWithOtelShutdown(_0x13aeef[_0xd95055(0xbd)]);}return console[_0xd95055(0xb7)](_0xd95055(0xcf),_0x13aeef),await exitWithOtelShutdown(0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13_0x22265e=a13_0x41ad;(function(_0x3335c2,_0x50f6bc){const _0x5885a3=a13_0x41ad,_0xb704be=_0x3335c2();while(!![]){try{const _0x56da80=-parseInt(_0x5885a3(0xfc))/0x1+-parseInt(_0x5885a3(0x102))/0x2*(-parseInt(_0x5885a3(0xe8))/0x3)+parseInt(_0x5885a3(0xfb))/0x4*(-parseInt(_0x5885a3(0xfd))/0x5)+-parseInt(_0x5885a3(0xdd))/0x6+-parseInt(_0x5885a3(0xf2))/0x7+-parseInt(_0x5885a3(0xf4))/0x8*(parseInt(_0x5885a3(0x117))/0x9)+parseInt(_0x5885a3(0x111))/0xa;if(_0x56da80===_0x50f6bc)break;else _0xb704be['push'](_0xb704be['shift']());}catch(_0x137d7d){_0xb704be['push'](_0xb704be['shift']());}}}(a13_0x3bda,0x6f1bf));import a13_0x4d847d from'ora';function a13_0x3bda(){const _0x38a662=['has','object','.md','Fetching\x20dataset\x20list\x20for\x20','Failed\x20to\x20fetch\x20datasets','\x1b[90m*\x20Generating\x20docs\x20for:\x20','parse','24284890JmBtur','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','...','\x20\x20•\x20','149157UOCdBr','./docs','--datasetcode\x20cannot\x20be\x20empty.','stdout','\x20of\x20','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','\x0d\x20\x20[','605796aodxRl','length','✓\x20Generated\x20','message','split','succeed','datasetName','appCode','api','\x20succeeded,\x20','\x1b[90m*\x20Filtered\x20','144489dJCUUb','some','Output\x20directory\x20(default:\x20./docs)','map','generate','join','output','!\x20No\x20datasets\x20found.','):\x20','Fetched\x20','4707129nEBeMd','\x20file(s)','208sKgcrU','isArray','str','cookie','\x20doc(s)\x20failed','datasetcode','success','488GYtIec','660198TNrsLU','26175fVCMPH','datasetCode','padStart','filter','\x20failed','22VmLLvD','fail','string','Invalid\x20--params:\x20','\x20dataset(s)','error','write','validation'];a13_0x3bda=function(){return _0x38a662;};return a13_0x3bda();}function a13_0x41ad(_0x40e754,_0x3c01bc){_0x40e754=_0x40e754-0xd8;const _0x3bda4d=a13_0x3bda();let _0x41adb8=_0x3bda4d[_0x40e754];return _0x41adb8;}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_0x22265e(0xe5),'command':a13_0x22265e(0xec),'description':'Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','risk':'write','requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a13_0x22265e(0xee),'type':a13_0x22265e(0x104),'description':a13_0x22265e(0xea)},{'name':'datasetcode','type':'string','description':a13_0x22265e(0xdb)},{'name':'params','type':a13_0x22265e(0x104),'description':'Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)'}],async 'execute'(_0x3b0351){const _0x557167=a13_0x22265e,_0x327236=_0x3b0351['str']('output')||_0x557167(0x118),_0x1d1959=_0x3b0351[_0x557167(0xf6)](_0x557167(0xf9)),_0x4b4baa=_0x3b0351['str']('params');let _0x2329dd;if(_0x4b4baa)try{_0x2329dd=JSON[_0x557167(0x110)](_0x4b4baa);if(typeof _0x2329dd!==_0x557167(0x10b)||_0x2329dd===null||Array[_0x557167(0xf5)](_0x2329dd))throw new Error('must\x20be\x20a\x20JSON\x20object');}catch(_0x154f10){throw CliErrors[_0x557167(0x109)](_0x557167(0x105)+(_0x154f10 instanceof Error?_0x154f10[_0x557167(0xe0)]:String(_0x154f10)),_0x557167(0x114));}let _0x3e7410;if(_0x1d1959){const _0xed2e4a=_0x1d1959[_0x557167(0xe1)](',')[_0x557167(0xeb)](_0x454a86=>_0x454a86['trim']())[_0x557167(0x100)](_0x3bba80=>_0x3bba80[_0x557167(0xde)]>0x0);if(_0xed2e4a[_0x557167(0xde)]===0x0)throw CliErrors[_0x557167(0x109)](_0x557167(0xd8));_0x3e7410=new Set(_0xed2e4a),writeCliSideChannelLine(_0x557167(0x10f)+_0xed2e4a[_0x557167(0xed)](',\x20')+'\x1b[0m');}const _0x27c42c=a13_0x4d847d(_0x557167(0x10d)+_0x3b0351[_0x557167(0xe4)]+_0x557167(0x115))['start']();let _0x1e5256;try{({configArray:_0x1e5256}=await fetchModelList(_0x3b0351[_0x557167(0xe4)],_0x3b0351[_0x557167(0xf7)]),_0x27c42c[_0x557167(0xe2)](_0x557167(0xf1)+_0x1e5256[_0x557167(0xde)]+_0x557167(0x106)));}catch(_0x472ceb){_0x27c42c[_0x557167(0x103)](_0x557167(0x10e));throw _0x472ceb;}if(_0x1e5256[_0x557167(0xde)]===0x0)return writeCliSideChannelLine(_0x557167(0xef)),{'ok':!![]};let _0x1a57b2=_0x1e5256;if(_0x3e7410){_0x1a57b2=_0x1e5256[_0x557167(0x100)](_0x3aacc9=>_0x3e7410[_0x557167(0x10a)](_0x3aacc9['datasetCode']));const _0x5a06cd=[..._0x3e7410][_0x557167(0x100)](_0x4f6e63=>!_0x1e5256[_0x557167(0xe9)](_0x5cc09e=>_0x5cc09e[_0x557167(0xfe)]===_0x4f6e63));_0x5a06cd[_0x557167(0xde)]>0x0&&writeCliSideChannelLine(_0x557167(0x112)+_0x5a06cd[_0x557167(0xed)](',\x20')+'\x1b[0m');if(_0x1a57b2[_0x557167(0xde)]===0x0)throw CliErrors[_0x557167(0x109)](_0x557167(0x113)+[..._0x3e7410]['join'](',\x20'));writeCliSideChannelLine(_0x557167(0xe7)+_0x1a57b2[_0x557167(0xde)]+_0x557167(0xda)+_0x1e5256[_0x557167(0xde)]+'\x20dataset(s)\x1b[0m');}let _0x1710d8=0x0;const _0x54ee69=await generateDatasetDocs(_0x1a57b2,_0x3b0351[_0x557167(0xe4)],_0x3b0351[_0x557167(0xf7)],_0x327236,(_0x1434cc,_0x113f0f,_0x471e88)=>{const _0x576e9f=_0x557167;_0x1710d8=_0x1434cc,process['stdout'][_0x576e9f(0x108)](_0x576e9f(0xdc)+String(_0x1434cc)[_0x576e9f(0xff)](String(_0x113f0f)['length'])+'/'+_0x113f0f+']\x20'+_0x471e88+_0x576e9f(0x10c));},_0x2329dd);if(_0x1710d8>0x0)process[_0x557167(0xd9)][_0x557167(0x108)]('\x0a');const _0x52bb90=_0x54ee69[_0x557167(0x100)](_0xc80945=>_0xc80945[_0x557167(0xfa)])['length'],_0x1d05cb=_0x54ee69[_0x557167(0x100)](_0x3303a2=>!_0x3303a2[_0x557167(0xfa)])[_0x557167(0xde)];writeCliSideChannelLine(''),writeCliSideChannelLine(_0x557167(0xdf)+_0x52bb90+'\x20doc(s)\x20in\x20'+_0x327236);if(_0x1d05cb>0x0){writeCliSideChannelLine('!\x20'+_0x1d05cb+_0x557167(0xf8));for(const _0x439b79 of _0x54ee69[_0x557167(0x100)](_0x1981da=>!_0x1981da['success'])){writeCliSideChannelLine(_0x557167(0x116)+_0x439b79[_0x557167(0xe3)]+'\x20('+_0x439b79[_0x557167(0xfe)]+_0x557167(0xf0)+_0x439b79[_0x557167(0x107)]);}}return{'ok':_0x1d05cb===0x0,'message':_0x1d05cb>0x0?'Doc\x20generation:\x20'+_0x52bb90+_0x557167(0xe6)+_0x1d05cb+_0x557167(0x101):'Doc\x20generation\x20complete:\x20'+_0x52bb90+_0x557167(0xf3)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf0b498,_0xb64c86){const _0x410de0=a14_0x2cc5,_0x300a45=_0xf0b498();while(!![]){try{const _0x53af02=-parseInt(_0x410de0(0x146))/0x1+parseInt(_0x410de0(0x145))/0x2+-parseInt(_0x410de0(0x148))/0x3*(parseInt(_0x410de0(0x149))/0x4)+parseInt(_0x410de0(0x143))/0x5*(-parseInt(_0x410de0(0x144))/0x6)+-parseInt(_0x410de0(0x14a))/0x7+parseInt(_0x410de0(0x142))/0x8+parseInt(_0x410de0(0x147))/0x9;if(_0x53af02===_0xb64c86)break;else _0x300a45['push'](_0x300a45['shift']());}catch(_0x4ff471){_0x300a45['push'](_0x300a45['shift']());}}}(a14_0x1d62,0xd8252));import{apiList}from'../../commands/api/list.js';function a14_0x2cc5(_0x22e3a5,_0x4f19df){_0x22e3a5=_0x22e3a5-0x142;const _0x1d62fb=a14_0x1d62();let _0x2cc583=_0x1d62fb[_0x22e3a5];return _0x2cc583;}function a14_0x1d62(){const _0x39e8af=['116hOmPYC','6401213kkNzIn','3260120rdebwG','2109035cSaDnB','6Uqbsun','473272EgQaxx','436764dfTcBo','26477532oGBbeK','95973oVVAsg'];a14_0x1d62=function(){return _0x39e8af;};return a14_0x1d62();}import{apiPull}from'../../commands/api/pull.js';import{apiGenerate}from'../../commands/api/generate.js';export const apiDefinitions=[apiList,apiPull,apiGenerate];
|
package/lib/commands/api/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x22a3e1=a15_0x3dae;function a15_0x4e84(){const _0x35875d=['push','304899rlYzpn','List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','global','87000LMtrLc','appCode','1196590eVZMxq','isDefault','cookie','4IdohmH','api','30UWGImO','1053567pxnetv','production','rawFlags','list','87941PMgYZo','1440928kpihBW','372837YqVIwI','appcode','map'];a15_0x4e84=function(){return _0x35875d;};return a15_0x4e84();}(function(_0xc3be3f,_0x255979){const _0xb38a05=a15_0x3dae,_0x1511ab=_0xc3be3f();while(!![]){try{const _0x38f670=parseInt(_0xb38a05(0x100))/0x1+parseInt(_0xb38a05(0xf2))/0x2+parseInt(_0xb38a05(0xef))/0x3*(parseInt(_0xb38a05(0xf7))/0x4)+-parseInt(_0xb38a05(0xf4))/0x5+-parseInt(_0xb38a05(0xf9))/0x6*(parseInt(_0xb38a05(0xfe))/0x7)+parseInt(_0xb38a05(0xff))/0x8+-parseInt(_0xb38a05(0xfa))/0x9;if(_0x38f670===_0x255979)break;else _0x1511ab['push'](_0x1511ab['shift']());}catch(_0x2fa6ab){_0x1511ab['push'](_0x1511ab['shift']());}}}(a15_0x4e84,0x4416a));function a15_0x3dae(_0x398324,_0x28e7bc){_0x398324=_0x398324-0xef;const _0x4e8406=a15_0x4e84();let _0x3daed6=_0x4e8406[_0x398324];return _0x3daed6;}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_0x22a3e1(0xf8),'command':a15_0x22a3e1(0xfd),'description':a15_0x22a3e1(0xf0),'risk':'read','requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0x22a3e1(0xf1),'type':'boolean','description':'Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','default':![]}],async 'execute'(_0x481ebd){const _0x1f3aef=a15_0x22a3e1,_0x59320c=_0x481ebd[_0x1f3aef(0xfc)][_0x1f3aef(0x101)]?String(_0x481ebd['rawFlags']['appcode']):undefined,_0x3c48a8=resolveTargetApps(_0x481ebd,_0x59320c);if(_0x3c48a8){const _0x4d6545=[];for(const _0x3ff633 of _0x3c48a8){const _0x1ba6f9=_0x3ff633[_0x1f3aef(0xf6)]||_0x481ebd[_0x1f3aef(0xf6)],_0x2c7408=_0x3ff633['env']||_0x1f3aef(0xfb);initEnv(_0x2c7408);const {configArray:_0x399570}=await fetchModelList(_0x3ff633[_0x1f3aef(0x101)],_0x1ba6f9);_0x4d6545[_0x1f3aef(0x103)](..._0x399570[_0x1f3aef(0x102)](_0xd5976=>({..._0xd5976,'_appName':_0x3ff633['name'],'_appCode':_0x3ff633[_0x1f3aef(0x101)],'_env':_0x2c7408,'_isDefault':_0x3ff633[_0x1f3aef(0xf5)]})));}return{'ok':!![],'data':_0x4d6545};}const {configArray:_0x5858ff}=await fetchModelList(_0x481ebd[_0x1f3aef(0xf3)],_0x481ebd[_0x1f3aef(0xf6)]);return{'ok':!![],'data':_0x5858ff};}};
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x18145f=a16_0x4905;(function(_0x59096f,_0x2ee56e){const _0xf02b80=a16_0x4905,_0x4b0626=_0x59096f();while(!![]){try{const _0x3ca5f5=parseInt(_0xf02b80(0x203))/0x1+-parseInt(_0xf02b80(0x1dc))/0x2*(-parseInt(_0xf02b80(0x1e8))/0x3)+parseInt(_0xf02b80(0x20e))/0x4*(-parseInt(_0xf02b80(0x207))/0x5)+-parseInt(_0xf02b80(0x1ea))/0x6+-parseInt(_0xf02b80(0x1ff))/0x7*(parseInt(_0xf02b80(0x20a))/0x8)+parseInt(_0xf02b80(0x208))/0x9*(-parseInt(_0xf02b80(0x202))/0xa)+-parseInt(_0xf02b80(0x1e7))/0xb*(-parseInt(_0xf02b80(0x1e6))/0xc);if(_0x3ca5f5===_0x2ee56e)break;else _0x4b0626['push'](_0x4b0626['shift']());}catch(_0x4353b9){_0x4b0626['push'](_0x4b0626['shift']());}}}(a16_0x3097,0x1c142));import a16_0x4b83d2 from'ora';function a16_0x3097(){const _0x4c4f17=['\x20\x20•\x20','70mvIHaV','68206DGMDwX','name','Failed:\x20','global','20ZuotVF','210411mQTwGX','clientFilePath','8UHSMSE','join','\x20model(s)','apiFilePath','84136isLgea','start','modelCount','4GGRKtI','appcode','split','apiDir','\x20app(s)\x20failed','boolean','includes','pull','rawFlags','\x20dataset(s),\x20generated\x20','108IotpSS','480502wijXOZ','41925pCncBh','cookie','591174WRKaqB','\x20dataset(s)\x20→\x20','api','Pulled\x20','succeed','message','length','slice','appCode','-client','Output\x20directory\x20(default:\x20','client','isDefault','-api',')...','Done:\x20','output','.ts','production','Pulling\x20','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','195762HeuSZO','fail'];a16_0x3097=function(){return _0x4c4f17;};return a16_0x3097();}import a16_0x19edde 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_0x4905(_0x3b5bdc,_0x43c323){_0x3b5bdc=_0x3b5bdc-0x1dc;const _0x309768=a16_0x3097();let _0x4905fc=_0x309768[_0x3b5bdc];return _0x4905fc;}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_0x18145f(0x1e3),'description':'Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20('+DEFAULT_API_DIR+'/)','risk':'write','requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a16_0x18145f(0x1fa),'type':'string','description':a16_0x18145f(0x1f4)+DEFAULT_API_DIR+'/)'},{'name':a16_0x18145f(0x206),'type':a16_0x18145f(0x1e1),'description':a16_0x18145f(0x1fe),'default':![]}],async 'execute'(_0x499b14){const _0x5f35dc=a16_0x18145f,_0x1ffda2=_0x499b14[_0x5f35dc(0x1e4)]['appcode']?String(_0x499b14[_0x5f35dc(0x1e4)]['appcode']):undefined,_0x1cbba5=_0x499b14['str'](_0x5f35dc(0x1fa))||undefined,_0x2ef5f2=resolveTargetApps(_0x499b14,_0x1ffda2);if(_0x2ef5f2){let _0x188e10=0x0,_0x386719=0x0;for(const _0x510288 of _0x2ef5f2){const _0x343ce2=_0x510288[_0x5f35dc(0x1e9)]||_0x499b14[_0x5f35dc(0x1e9)],_0x283966=_0x510288['env']||_0x5f35dc(0x1fc);initEnv(_0x283966);const _0x2a8309=_0x510288[_0x5f35dc(0x1df)]||_0x1cbba5||_0x499b14[_0x5f35dc(0x1df)]||DEFAULT_API_DIR,_0x58a860=_0x510288[_0x5f35dc(0x1f6)]?'':_0x510288[_0x5f35dc(0x204)]||_0x510288[_0x5f35dc(0x1dd)],_0x53be45=a16_0x4b83d2(_0x5f35dc(0x1fd)+_0x510288[_0x5f35dc(0x204)]+'\x20('+_0x510288[_0x5f35dc(0x1dd)]+_0x5f35dc(0x1f8))[_0x5f35dc(0x20f)]();try{const {configArray:_0x3ccd4b}=await fetchModelList(_0x510288['appcode'],_0x343ce2),_0x1b6072=await generateApiFile(_0x3ccd4b,_0x58a860,_0x510288[_0x5f35dc(0x1dd)],_0x510288[_0x5f35dc(0x1f6)],_0x283966,_0x2a8309,_0x510288['name']);_0x53be45[_0x5f35dc(0x1ee)](_0x510288[_0x5f35dc(0x204)]+':\x20'+_0x3ccd4b[_0x5f35dc(0x1f0)]+_0x5f35dc(0x1eb)+_0x1b6072[_0x5f35dc(0x210)]+_0x5f35dc(0x20c)),writeCliSideChannelLine(_0x5f35dc(0x201)+_0x1b6072[_0x5f35dc(0x20d)]),writeCliSideChannelLine('\x20\x20•\x20'+_0x1b6072[_0x5f35dc(0x209)]),_0x188e10++;}catch(_0x308445){_0x53be45[_0x5f35dc(0x200)](_0x510288['name']+':\x20'+(_0x308445 instanceof Error?_0x308445[_0x5f35dc(0x1ef)]:String(_0x308445))),_0x386719++;}}writeCliSideChannelLine('');if(_0x386719>0x0)writeCliSideChannelLine('!\x20'+_0x386719+_0x5f35dc(0x1e0));return{'ok':_0x386719===0x0,'message':_0x5f35dc(0x1f9)+_0x188e10+'\x20succeeded,\x20'+_0x386719+'\x20failed'};}const _0xb31fb8=_0x1ffda2&&_0x1ffda2[_0x5f35dc(0x1e2)]('-')?_0x1ffda2[_0x5f35dc(0x1de)]('-')[_0x5f35dc(0x1f1)](0x1)['join']('-'):'',_0x456655=_0x1cbba5||_0x499b14[_0x5f35dc(0x1df)]||DEFAULT_API_DIR,_0x459fc5=!_0x1ffda2,_0x32658e=a16_0x4b83d2('Pulling\x20API\x20config\x20for\x20'+_0x499b14[_0x5f35dc(0x1f2)]+'...')[_0x5f35dc(0x20f)]();try{const {configArray:_0xe6d9b0}=await fetchModelList(_0x499b14[_0x5f35dc(0x1f2)],_0x499b14['cookie']),_0xee9ca4=await generateApiFile(_0xe6d9b0,_0xb31fb8,_0x499b14[_0x5f35dc(0x1f2)],_0x459fc5,getEnv(),_0x456655);_0x32658e[_0x5f35dc(0x1ee)](_0x5f35dc(0x1ed)+_0xe6d9b0[_0x5f35dc(0x1f0)]+_0x5f35dc(0x1e5)+_0xee9ca4[_0x5f35dc(0x210)]+_0x5f35dc(0x20c));const _0xbb9249=_0xb31fb8?_0xb31fb8+_0x5f35dc(0x1f7):_0x5f35dc(0x1ec),_0x5f5901=_0xb31fb8?_0xb31fb8+_0x5f35dc(0x1f3):_0x5f35dc(0x1f5);return writeCliSideChannelLine(_0x5f35dc(0x201)+a16_0x19edde['join'](_0x456655,_0xbb9249+_0x5f35dc(0x1fb))),writeCliSideChannelLine(_0x5f35dc(0x201)+a16_0x19edde[_0x5f35dc(0x20b)](_0x456655,_0x5f5901+_0x5f35dc(0x1fb))),{'ok':!![],'data':{'datasetCount':_0xe6d9b0['length'],'modelCount':_0xee9ca4[_0x5f35dc(0x210)]}};}catch(_0x701ae1){_0x32658e[_0x5f35dc(0x200)](_0x5f35dc(0x205)+(_0x701ae1 instanceof Error?_0x701ae1[_0x5f35dc(0x1ef)]:String(_0x701ae1)));throw _0x701ae1;}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4528af,_0x5514af){const _0x17a9e0=a17_0x160c,_0xf332e1=_0x4528af();while(!![]){try{const _0x5f1102=parseInt(_0x17a9e0(0x1bd))/0x1+-parseInt(_0x17a9e0(0x1be))/0x2+parseInt(_0x17a9e0(0x1c0))/0x3+-parseInt(_0x17a9e0(0x1c2))/0x4*(parseInt(_0x17a9e0(0x1c6))/0x5)+parseInt(_0x17a9e0(0x1c7))/0x6*(parseInt(_0x17a9e0(0x1c4))/0x7)+-parseInt(_0x17a9e0(0x1cb))/0x8+-parseInt(_0x17a9e0(0x1c3))/0x9*(parseInt(_0x17a9e0(0x1c8))/0xa);if(_0x5f1102===_0x5514af)break;else _0xf332e1['push'](_0xf332e1['shift']());}catch(_0x2fd934){_0xf332e1['push'](_0xf332e1['shift']());}}}(a17_0x53cd,0x497b9));function a17_0x160c(_0x3b9e76,_0x1775c3){_0x3b9e76=_0x3b9e76-0x1b8;const _0x53cde8=a17_0x53cd();let _0x160c0c=_0x53cde8[_0x3b9e76];return _0x160c0c;}function a17_0x53cd(){const _0x34bc0e=['bool','App\x20\x22','1058024qMBJUj','filter','selectedAppName','validation','join','project','599733mClURN','706582sdbuSa','length','1686423rtaeIu','name','910084xumWZT','145764fjSTRP','1281889JnhajU','merged','10HFhEkH','18RrfTxK','290MIgmdj'];a17_0x53cd=function(){return _0x34bc0e;};return a17_0x53cd();}import{getMultiAppConfigs}from'../../utils/config.js';import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x18bdc9,_0x12bc1d){const _0x2d98f8=a17_0x160c;if(_0x12bc1d)return null;const _0xe312ad=_0x18bdc9[_0x2d98f8(0x1c9)]('global')?_0x2d98f8(0x1c5):_0x2d98f8(0x1bc);let _0x34feb5=getMultiAppConfigs(_0xe312ad);if(!_0x34feb5||_0x34feb5[_0x2d98f8(0x1bf)]===0x0)return null;if(_0x18bdc9[_0x2d98f8(0x1b9)]){const _0x325380=_0x34feb5[_0x2d98f8(0x1b8)](_0x5707ef=>_0x5707ef[_0x2d98f8(0x1c1)]===_0x18bdc9[_0x2d98f8(0x1b9)]);if(_0x325380[_0x2d98f8(0x1bf)]===0x0){const _0x520991=_0x34feb5['map'](_0x3c8a4f=>_0x3c8a4f[_0x2d98f8(0x1c1)])[_0x2d98f8(0x1bb)](',\x20');throw CliErrors[_0x2d98f8(0x1ba)](_0x2d98f8(0x1ca)+_0x18bdc9[_0x2d98f8(0x1b9)]+'\x22\x20not\x20found\x20in\x20config.\x20Available:\x20'+_0x520991);}_0x34feb5=_0x325380;}return _0x34feb5;}
|
package/lib/commands/app/add.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a18_0x5c1802=a18_0x5b43;(function(_0x36017b,_0x4f3a0a){const _0x1b727b=a18_0x5b43,_0x35e35b=_0x36017b();while(!![]){try{const _0x1d70cc=parseInt(_0x1b727b(0xd2))/0x1*(-parseInt(_0x1b727b(0xc9))/0x2)+parseInt(_0x1b727b(0xc8))/0x3*(parseInt(_0x1b727b(0xd1))/0x4)+parseInt(_0x1b727b(0xcc))/0x5*(parseInt(_0x1b727b(0xc0))/0x6)+-parseInt(_0x1b727b(0xbe))/0x7+parseInt(_0x1b727b(0xbd))/0x8+parseInt(_0x1b727b(0xb6))/0x9+-parseInt(_0x1b727b(0xbc))/0xa*(-parseInt(_0x1b727b(0xd6))/0xb);if(_0x1d70cc===_0x4f3a0a)break;else _0x35e35b['push'](_0x35e35b['shift']());}catch(_0xa5be5d){_0x35e35b['push'](_0x35e35b['shift']());}}}(a18_0x2d2c,0x7365b));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(_0x5cf7fc){const _0x3a82d1=a18_0x5b43,_0x42cbc6=_0x5cf7fc[_0x3a82d1(0xcd)][0x0]?.[_0x3a82d1(0xca)]();if(!_0x42cbc6)throw CliErrors['validation']('Missing\x20app\x20name.',_0x3a82d1(0xc6)+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20<code>');}function a18_0x5b43(_0x46b76b,_0x4102ac){_0x46b76b=_0x46b76b-0xb5;const _0x2d2c84=a18_0x2d2c();let _0x5b4394=_0x2d2c84[_0x46b76b];return _0x5b4394;}function a18_0x2d2c(){const _0x375f73=['trim','apps','5AHajtu','args','Missing\x20app\x20name.','add','string','16MUUbWT','8SgYEks','appcode','\x22\x20(appcode:\x20','App\x20profile\x20name','262361wVlPDm','write','7193025JyUSES','App\x20code','flagMissing','defaultApp','global','\x20app\x20add\x20<name>\x20--appcode\x20<code>','10hgKoRE','4192472VILtFw','2911174Caadkz','\x20Set\x20as\x20default\x20app.','2047860SpuhXv','bool','app','Updated','name','boolean','Usage:\x20','validation','35466AzcIaw','211796kYuQFC'];a18_0x2d2c=function(){return _0x375f73;};return a18_0x2d2c();}async function execute(_0x192c10){const _0x4d6726=a18_0x5b43,_0x4f3b7d=_0x192c10[_0x4d6726(0xcd)][0x0]?.[_0x4d6726(0xca)]();if(!_0x4f3b7d)throw CliErrors[_0x4d6726(0xc7)](_0x4d6726(0xce),_0x4d6726(0xc6)+CLI_BIN_NAME+_0x4d6726(0xbb));const _0x44d1a4=_0x192c10['str']('appcode');if(!_0x44d1a4)throw CliErrors[_0x4d6726(0xb8)](_0x4d6726(0xd3),_0x4d6726(0xc6)+CLI_BIN_NAME+_0x4d6726(0xbb));const _0x28d74f={'global':_0x192c10[_0x4d6726(0xc1)](_0x4d6726(0xba))},_0x5c3104=readConfig(_0x28d74f);if(!_0x5c3104['apps'])_0x5c3104[_0x4d6726(0xcb)]={};const _0x4a0161={'appcode':_0x44d1a4,...collectAppProfileOverrides(_0x3231ad=>_0x192c10['str'](_0x3231ad))},_0x3075ba=_0x5c3104[_0x4d6726(0xcb)],_0x5ab999=!!_0x3075ba[_0x4f3b7d];_0x3075ba[_0x4f3b7d]=_0x4a0161;if(!_0x5c3104[_0x4d6726(0xb9)])_0x5c3104[_0x4d6726(0xb9)]=_0x4f3b7d;writeConfig(_0x5c3104,_0x28d74f);const _0x41e448=!_0x5ab999&&_0x5c3104[_0x4d6726(0xb9)]===_0x4f3b7d?_0x4d6726(0xbf):'',_0x591d50=(_0x5ab999?_0x4d6726(0xc3):'Added')+'\x20app\x20\x22'+_0x4f3b7d+_0x4d6726(0xd4)+_0x44d1a4+')'+scopeLabel(_0x28d74f)+'.'+_0x41e448;return{'ok':!![],'message':_0x591d50};}export const appAddDefinition={'service':a18_0x5c1802(0xc2),'command':a18_0x5c1802(0xcf),'description':'Add\x20or\x20update\x20an\x20app\x20in\x20config','risk':a18_0x5c1802(0xb5),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a18_0x5c1802(0xc4),'description':a18_0x5c1802(0xd5),'required':!![]}],'flags':[{'name':a18_0x5c1802(0xd3),'type':a18_0x5c1802(0xd0),'description':a18_0x5c1802(0xb7),'required':!![]},{'name':a18_0x5c1802(0xba),'type':a18_0x5c1802(0xc5),'description':'Use\x20global\x20config\x20scope','default':![]},...getAppProfileFlagDefs()],'validate':validateArgs,'execute':execute};
|