@lovrabet/rabetbase-cli 2.2.4-beta.6 → 2.2.5-beta.1
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/app-config/delete.js +1 -0
- package/lib/commands/app-config/get.js +1 -0
- package/lib/commands/app-config/index.js +1 -0
- package/lib/commands/app-config/list.js +1 -0
- package/lib/commands/app-config/set.js +1 -0
- package/lib/commands/app-config/shared.js +1 -0
- 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/business-group-update.js +1 -0
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a0_0x5e1084=a0_0x2121;function a0_0x2121(_0x2b6512,_0x23c91c){_0x2b6512=_0x2b6512-0xbe;const _0x1fc0a7=a0_0x1fc0();let _0x2121d2=_0x1fc0a7[_0x2b6512];return _0x2121d2;}(function(_0x52d20f,_0x4cb369){const _0x573ddf=a0_0x2121,_0x483c52=_0x52d20f();while(!![]){try{const _0x3972cc=-parseInt(_0x573ddf(0xca))/0x1+parseInt(_0x573ddf(0xd7))/0x2+parseInt(_0x573ddf(0xcc))/0x3*(parseInt(_0x573ddf(0xc8))/0x4)+-parseInt(_0x573ddf(0xce))/0x5*(parseInt(_0x573ddf(0xbe))/0x6)+parseInt(_0x573ddf(0xd6))/0x7+parseInt(_0x573ddf(0xcf))/0x8+-parseInt(_0x573ddf(0xc5))/0x9;if(_0x3972cc===_0x4cb369)break;else _0x483c52['push'](_0x483c52['shift']());}catch(_0x5d31f6){_0x483c52['push'](_0x483c52['shift']());}}}(a0_0x1fc0,0x4b133));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x5f4def 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(_0x3381d5){const _0x1da371=a0_0x2121,{appCode:_0x33bed9,cookie:_0x4e2f35,datasetCode:_0x451bae,datasetId:_0x1a3160,extraParams:_0x378892}=_0x3381d5,_0x5c44b1=getApiDomain()+'/api/node-toolbox/api-doc-generator',_0x37653d=await platformFetch(_0x5c44b1,{'method':_0x1da371(0xc2),'body':{'appCode':_0x33bed9,'datasetCode':_0x451bae,'datasetId':_0x1a3160,..._0x378892||{}},'cookie':_0x4e2f35,'label':_0x1da371(0xd5)+_0x451bae+')'});if(!_0x37653d||typeof _0x37653d[_0x1da371(0xc3)]!=='string')throw new Error(_0x1da371(0xdc)+_0x451bae+_0x1da371(0xc1));return _0x37653d['markdown'];}function a0_0x1fc0(){const _0x5e7c62=['push','Fetch\x20doc\x20(','3798487FjqoBS','848002GXMGFB','log','datasetCode','length','api-doc','Invalid\x20response\x20format\x20(','生成文档成功:\x20','✗\x20Failed:\x20','282absDrA','./docs','.md\x20-\x20','):\x20missing\x20data.markdown\x20field','POST','markdown','Waiting\x203\x20seconds...\x0a','8505162GYPnYM','name','error','16TmSvOr','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','270430UIeGLL','message','208569CixBEE','tableName','8035DXELPK','2830000vWfqym','.md','utf8','生成文档失败:\x20','join'];a0_0x1fc0=function(){return _0x5e7c62;};return a0_0x1fc0();}function delay(_0x553779){return new Promise(_0x309a2b=>setTimeout(_0x309a2b,_0x553779));}export async function generateDatasetDocs(_0x23396a,_0x174464,_0x7d615,_0x1d8555=a0_0x5e1084(0xbf),_0xcaebcd,_0x489da1){const _0xa0b8eb=a0_0x5e1084;mkdirSync(_0x1d8555,{'recursive':!![]});const _0x38baa7=[],_0x80b202=_0x23396a[_0xa0b8eb(0xda)];console[_0xa0b8eb(0xd8)]('\x0a'+_0x80b202+_0xa0b8eb(0xc9));for(let _0x413a37=0x0;_0x413a37<_0x23396a[_0xa0b8eb(0xda)];_0x413a37++){const _0x19fe24=_0x23396a[_0x413a37],_0x32c17f=_0x413a37+0x1,_0x825016=_0x19fe24[_0xa0b8eb(0xcd)];try{console[_0xa0b8eb(0xd8)]('['+_0x32c17f+'/'+_0x80b202+']\x20Generating:\x20'+_0x825016+'.md\x20('+_0x19fe24[_0xa0b8eb(0xc6)]+')');if(_0xcaebcd)_0xcaebcd(_0x32c17f,_0x80b202,_0x825016);const _0x3cb09b=await fetchDatasetDoc({'appCode':_0x174464,'cookie':_0x7d615,'datasetCode':_0x19fe24[_0xa0b8eb(0xd9)],'datasetId':_0x19fe24['id'],'enableAI':![],'extraParams':_0x489da1}),_0x3e2fff=a0_0x5f4def[_0xa0b8eb(0xd3)](_0x1d8555,_0x825016+'.md');writeFileSync(_0x3e2fff,_0x3cb09b,{'encoding':_0xa0b8eb(0xd1)}),console[_0xa0b8eb(0xd8)]('✓\x20Generated:\x20'+_0x825016+_0xa0b8eb(0xd0)),logger['success']('api-doc',_0xa0b8eb(0xdd)+_0x825016,undefined,{'datasetCode':_0x19fe24[_0xa0b8eb(0xd9)],'datasetName':_0x19fe24[_0xa0b8eb(0xc6)],'filePath':_0x3e2fff,'progress':_0x32c17f+'/'+_0x80b202}),_0x38baa7[_0xa0b8eb(0xd4)]({'datasetCode':_0x19fe24['datasetCode'],'datasetName':_0x19fe24[_0xa0b8eb(0xc6)],'filePath':_0x3e2fff,'success':!![]});if(_0x32c17f<_0x80b202)await delay(0x1388);}catch(_0xe90491){const _0x317ab6=_0xe90491 instanceof Error?_0xe90491[_0xa0b8eb(0xcb)]:String(_0xe90491);console[_0xa0b8eb(0xd8)](_0xa0b8eb(0xde)+_0x825016+_0xa0b8eb(0xc0)+_0x317ab6),logger[_0xa0b8eb(0xc7)](_0xa0b8eb(0xdb),_0xa0b8eb(0xd2)+_0x19fe24[_0xa0b8eb(0xd9)],{'datasetCode':_0x19fe24[_0xa0b8eb(0xd9)],'datasetName':_0x19fe24[_0xa0b8eb(0xc6)],'error':_0x317ab6,'progress':_0x32c17f+'/'+_0x80b202}),_0x38baa7[_0xa0b8eb(0xd4)]({'datasetCode':_0x19fe24[_0xa0b8eb(0xd9)],'datasetName':_0x19fe24[_0xa0b8eb(0xc6)],'filePath':'','success':![],'error':_0x317ab6}),_0x32c17f<_0x80b202&&(console['log'](_0xa0b8eb(0xc4)),await delay(0xbb8));}}return _0x38baa7;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1f4f9f,_0x114a29){const _0x4d3748=a1_0x16ac,_0x4dc8bb=_0x1f4f9f();while(!![]){try{const _0x13f053=-parseInt(_0x4d3748(0x181))/0x1*(parseInt(_0x4d3748(0x182))/0x2)+parseInt(_0x4d3748(0x176))/0x3+parseInt(_0x4d3748(0x17e))/0x4+-parseInt(_0x4d3748(0x17f))/0x5*(parseInt(_0x4d3748(0x179))/0x6)+-parseInt(_0x4d3748(0x173))/0x7*(-parseInt(_0x4d3748(0x17c))/0x8)+-parseInt(_0x4d3748(0x183))/0x9+parseInt(_0x4d3748(0x177))/0xa;if(_0x13f053===_0x114a29)break;else _0x4dc8bb['push'](_0x4dc8bb['shift']());}catch(_0xf5ea49){_0x4dc8bb['push'](_0x4dc8bb['shift']());}}}(a1_0x89d6,0x6dada));import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';function a1_0x89d6(){const _0x16c62e=['正在从服务器拉取模型列表...\x20(环境:\x20','1916508rWHCEF','265AGbIXP','/api/node-toolbox/dataset/model-list?appcode=','45549onQZtN','14ULhHgo','7446834KdaXTa','&otype=array','7tWSaxF','length','info','557430ZGgIyf','9067070OqMLde','trim','64428RSdBya','fetch-model-list','replace','4743848eLTozz'];a1_0x89d6=function(){return _0x16c62e;};return a1_0x89d6();}import{platformFetch}from'../core/api-client.js';function a1_0x16ac(_0x5adf1f,_0x138f4e){_0x5adf1f=_0x5adf1f-0x173;const _0x89d679=a1_0x89d6();let _0x16acaa=_0x89d679[_0x5adf1f];return _0x16acaa;}function cleanNewlines(_0x4048d0){const _0x1afa57=a1_0x16ac;return _0x4048d0[_0x1afa57(0x17b)](/[\r\n]+/g,'\x20')[_0x1afa57(0x178)]();}function cleanDatasetName(_0x3fd40f){if(!_0x3fd40f['name'])return _0x3fd40f;return{..._0x3fd40f,'name':cleanNewlines(_0x3fd40f['name'])};}export async function fetchModelList(_0x3141d0,_0x5acf90){const _0x16e2e5=a1_0x16ac,_0x43a86f=getEnv(),_0x477de8=getApiDomain()+_0x16e2e5(0x180)+_0x3141d0+_0x16e2e5(0x184);logger[_0x16e2e5(0x175)](_0x16e2e5(0x17a),_0x16e2e5(0x17d)+_0x43a86f+')',{'apiUrl':_0x477de8});const _0x4dc1b6=await platformFetch(_0x477de8,{'cookie':_0x5acf90,'label':'Fetch\x20datasets'}),_0x80800f=(_0x4dc1b6['configArray']??[])['map'](cleanDatasetName);return{'configArray':_0x80800f,'count':_0x80800f[_0x16e2e5(0x174)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4daaa8,_0x373e3d){const _0x582c2c=a2_0x261d,_0x4d643a=_0x4daaa8();while(!![]){try{const _0x2476f9=-parseInt(_0x582c2c(0x9e))/0x1+-parseInt(_0x582c2c(0x94))/0x2+-parseInt(_0x582c2c(0x80))/0x3+parseInt(_0x582c2c(0x93))/0x4*(-parseInt(_0x582c2c(0x98))/0x5)+parseInt(_0x582c2c(0x83))/0x6*(-parseInt(_0x582c2c(0x92))/0x7)+parseInt(_0x582c2c(0x89))/0x8*(parseInt(_0x582c2c(0x90))/0x9)+parseInt(_0x582c2c(0x7e))/0xa;if(_0x2476f9===_0x373e3d)break;else _0x4d643a['push'](_0x4d643a['shift']());}catch(_0x37262e){_0x4d643a['push'](_0x4d643a['shift']());}}}(a2_0x26f4,0x1aa1d));import a2_0x1dd73e from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a2_0x1e1b6d from'node:path';import{fileURLToPath}from'node:url';function a2_0x26f4(){const _0x287bbe=['2367pfAinJ','length','14BSOBiM','431620RbsBUG','259914vaYdGV','replace','replaceApiContent','forEach','5NQHSHd','key','alias','api.ts.tpl','API\x20文件生成成功!','dirname','168535HpeCkf','-client','../..',',\x20env:\x20\x22','typescript','Please\x20configure\x20app\x20code\x20first\x20via\x20`','api','\x22\x20}','5074800rWYemG','test','89319IhaehB','success','push','297744OodudC','format','name','resolve','utf8','client.ts.tpl','4168HfqxrK','.ts','tableName','{\x20apiConfigName:\x20','templates/generate-api','client','join'];a2_0x26f4=function(){return _0x287bbe;};return a2_0x26f4();}import{TemplateReplacer}from'../utils/template-replacer.js';function a2_0x261d(_0x55a668,_0x2d39eb){_0x55a668=_0x55a668-0x7a;const _0x26f4e5=a2_0x26f4();let _0x261d59=_0x26f4e5[_0x55a668];return _0x261d59;}import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';export async function generateApiFile(_0x5d9f57,_0x4684a7,_0x2435b5,_0x35941f,_0x340089,_0x3d2221,_0x5514e1){const _0x274b6f=a2_0x261d;if(!_0x2435b5)throw new Error(_0x274b6f(0x7b)+CLI_BIN_NAME+'\x20config\x20set\x20app\x20<value>`');const _0x5c3c79=_0x35941f&&!_0x5514e1,_0x4fe079=_0x5514e1||_0x2435b5,_0x562de3=_0x5c3c79?'CONFIG_NAMES.DEFAULT':'\x22'+_0x4fe079+'\x22',_0x1b6a8b=!isProduction(_0x340089);let _0xcfbb38;if(_0x5c3c79)_0x1b6a8b?_0xcfbb38=_0x274b6f(0x8c)+_0x562de3+_0x274b6f(0xa1)+_0x340089+_0x274b6f(0x7d):_0xcfbb38='';else{const _0x1bcb67=_0x1b6a8b?_0x274b6f(0xa1)+_0x340089+'\x22':'';_0xcfbb38='{\x20apiConfigName:\x20\x22'+_0x4fe079+'\x22'+_0x1bcb67+'\x20}';}const _0x67d447=_0x4684a7?_0x4684a7+'-api':_0x274b6f(0x7c),_0xf4641d=_0x4684a7?_0x4684a7+_0x274b6f(0x9f):_0x274b6f(0x8e),_0x52c989=_0x4684a7&&!/^app-[a-f0-9]+$/i[_0x274b6f(0x7f)](_0x4684a7)?_0x4684a7[_0x274b6f(0x95)](/-/g,'_')['toUpperCase']():'LOVRABET',_0x375dbb=[];_0x5d9f57[_0x274b6f(0x97)](_0x48adfc=>{const _0x20a26e=_0x274b6f;_0x375dbb[_0x20a26e(0x82)]({'datasetCode':_0x48adfc['datasetCode'],'tableName':_0x48adfc[_0x20a26e(0x8b)],'name':_0x48adfc[_0x20a26e(0x85)]||'','alias':_0x48adfc[_0x20a26e(0x9a)]||_0x48adfc[_0x20a26e(0x99)]});});const _0x48ea05=fileURLToPath(import.meta.url),_0xc9fd5=a2_0x1e1b6d[_0x274b6f(0x86)](a2_0x1e1b6d[_0x274b6f(0x9d)](_0x48ea05),_0x274b6f(0xa0)),_0x216a16=a2_0x1e1b6d[_0x274b6f(0x8f)](_0xc9fd5,_0x274b6f(0x8d)),_0x5bc65a=a2_0x1e1b6d[_0x274b6f(0x8f)](_0x216a16,_0x274b6f(0x9b)),_0x1c6902=a2_0x1e1b6d['join'](_0x216a16,_0x274b6f(0x88)),_0x3515f1=_0x3d2221;mkdirSync(_0x3515f1,{'recursive':!![]});const _0x4dd69c=_0x375dbb[0x0]?.['alias'],_0x4944fc=readFileSync(_0x5bc65a,_0x274b6f(0x87)),_0x5071d0=TemplateReplacer[_0x274b6f(0x96)](_0x4944fc,_0x2435b5,_0x375dbb,_0x4dd69c,_0x67d447,_0x562de3,undefined,_0x52c989),_0x38a460=await a2_0x1dd73e[_0x274b6f(0x84)](_0x5071d0,{'parser':_0x274b6f(0x7a)}),_0x259924=a2_0x1e1b6d[_0x274b6f(0x8f)](_0x3515f1,_0x67d447+'.ts');writeFileSync(_0x259924,_0x38a460,{'encoding':_0x274b6f(0x87)});const _0x2d3e28=readFileSync(_0x1c6902,'utf8'),_0xbabf7=TemplateReplacer[_0x274b6f(0x96)](_0x2d3e28,_0x2435b5,_0x375dbb,_0x4dd69c,_0x67d447,_0x562de3,_0xcfbb38,_0x52c989),_0x9fc7e9=await a2_0x1dd73e['format'](_0xbabf7,{'parser':_0x274b6f(0x7a)}),_0x3d2446=a2_0x1e1b6d[_0x274b6f(0x8f)](_0x3515f1,_0xf4641d+_0x274b6f(0x8a));writeFileSync(_0x3d2446,_0x9fc7e9,{'encoding':_0x274b6f(0x87)});const _0x1edcf3=_0x375dbb[_0x274b6f(0x91)];return logger[_0x274b6f(0x81)]('init-api',_0x274b6f(0x9c),undefined,{'apiFile':_0x259924,'clientFile':_0x3d2446,'modelCount':_0x1edcf3,'configName':_0x562de3}),{'modelCount':_0x1edcf3,'apiFilePath':_0x259924,'clientFilePath':_0x3d2446,'configName':_0x562de3};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a3_0x5df7(_0x41d812,_0x18ae89){_0x41d812=_0x41d812-0xa3;const _0x4d9d0d=a3_0x4d9d();let _0x5df7b2=_0x4d9d0d[_0x41d812];return _0x5df7b2;}function a3_0x4d9d(){const _0x55b4ee=['!\x20Login\x20failed.','*\x20Login\x20successful!','validation','autoYes','stop','nonInteractive','515148qcThTz','6758460QHEVAc','18UzQMfF','382149jUMtKN','184pqsZiA','start','15EPPreu','1722476RKSRKn','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','14iGxwPj','6295090rgGkiG','34581ztQwhn','8348439rjqMfD','log','12pkvblD','Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.'];a3_0x4d9d=function(){return _0x55b4ee;};return a3_0x4d9d();}(function(_0x41e443,_0x5548a2){const _0x51b3c2=a3_0x5df7,_0x564250=_0x41e443();while(!![]){try{const _0x252fe6=-parseInt(_0x51b3c2(0xb7))/0x1*(parseInt(_0x51b3c2(0xb5))/0x2)+-parseInt(_0x51b3c2(0xb2))/0x3*(parseInt(_0x51b3c2(0xac))/0x4)+parseInt(_0x51b3c2(0xb6))/0x5+parseInt(_0x51b3c2(0xae))/0x6*(-parseInt(_0x51b3c2(0xb3))/0x7)+parseInt(_0x51b3c2(0xb0))/0x8*(parseInt(_0x51b3c2(0xaf))/0x9)+-parseInt(_0x51b3c2(0xad))/0xa+-parseInt(_0x51b3c2(0xb8))/0xb*(-parseInt(_0x51b3c2(0xa4))/0xc);if(_0x252fe6===_0x5548a2)break;else _0x564250['push'](_0x564250['shift']());}catch(_0x33bf12){_0x564250['push'](_0x564250['shift']());}}}(a3_0x4d9d,0xa98f6));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';import a3_0x1d6129 from'ora';export async function runAuthServer(_0x40baf8){const _0x55fca0=a3_0x5df7,_0x135430=await getIsSessionValid();if(_0x135430){console[_0x55fca0(0xa3)]('√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.');return;}if(_0x40baf8?.[_0x55fca0(0xab)]&&!_0x40baf8['autoYes'])throw CliErrors[_0x55fca0(0xa8)](_0x55fca0(0xa5),'Run\x20`'+CLI_BIN_NAME+'\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.');const _0x4bd885=_0x40baf8?.[_0x55fca0(0xa9)]?!![]:await confirm({'message':'No\x20valid\x20session.\x20Login\x20now?','default':!![]});if(!_0x4bd885)return;if(_0x40baf8?.[_0x55fca0(0xab)]){console[_0x55fca0(0xa3)]('Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.');const _0x2650a4=await authServer({'silent':![],'openBrowser':![]});_0x2650a4?console['log'](_0x55fca0(0xa7)):console[_0x55fca0(0xa3)](_0x55fca0(0xa6));return;}const _0x36a04f=a3_0x1d6129(_0x55fca0(0xb4))[_0x55fca0(0xb1)](),_0x197afb=await authServer({'silent':!![],'openBrowser':!![]});_0x36a04f[_0x55fca0(0xaa)](),_0x197afb?console[_0x55fca0(0xa3)](_0x55fca0(0xa7)):console[_0x55fca0(0xa3)](_0x55fca0(0xa6));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a4_0x5dd9(){const _0x13a461=['close','then','object','platform','💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','46960iomDMv','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','99640TRElil','/sign-in?redirect=','4239112GafxdL','end','675665ffcKuQ','16079ELvSve','📍\x20Login\x20URL:','9MEVNZl','port','writeHead','text/html;\x20charset=utf-8','log','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','isAuth','cmd\x20/c\x20start\x20\x22\x22\x20\x22','listen','https://dev.lovrabet.com:','🔐\x20Starting\x20login\x20service...','darwin','timeoutMs','json','catch','error','utf-8','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','6658660WdwkYH','1314dOkdun','308754HSQcrq','Auth\x20server\x20error:','user','https://g.yuntooai.com/cert/lovrabet-dev.json','silent','win32','/api/auth/get-session','cookie','60zbVgAz'];a4_0x5dd9=function(){return _0x13a461;};return a4_0x5dd9();}const a4_0x47115f=a4_0x4fc6;(function(_0x329fe9,_0x3ed9cf){const _0x419ab6=a4_0x4fc6,_0x32d23f=_0x329fe9();while(!![]){try{const _0x23aeb8=-parseInt(_0x419ab6(0x20e))/0x1+parseInt(_0x419ab6(0x1fa))/0x2+-parseInt(_0x419ab6(0x202))/0x3*(-parseInt(_0x419ab6(0x20a))/0x4)+parseInt(_0x419ab6(0x208))/0x5+-parseInt(_0x419ab6(0x1f9))/0x6*(-parseInt(_0x419ab6(0x20f))/0x7)+-parseInt(_0x419ab6(0x20c))/0x8*(-parseInt(_0x419ab6(0x211))/0x9)+-parseInt(_0x419ab6(0x1f8))/0xa;if(_0x23aeb8===_0x3ed9cf)break;else _0x32d23f['push'](_0x32d23f['shift']());}catch(_0xbb006d){_0x32d23f['push'](_0x32d23f['shift']());}}}(a4_0x5dd9,0x5645a));function a4_0x4fc6(_0x301485,_0x2b1e93){_0x301485=_0x301485-0x1ef;const _0x5dd9c0=a4_0x5dd9();let _0x4fc611=_0x5dd9c0[_0x301485];return _0x4fc611;}import{writeFileSync}from'node:fs';import a4_0x76f1a0 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'../auth/is-session-valid.js';import{cookieFile}from'../auth/constant.js';import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export async function authServer(_0x58f826){const _0x48ef61=a4_0x4fc6,_0x30c97d=_0x58f826?.[_0x48ef61(0x1fe)]||![],_0x29ad7a=_0x58f826?.['openBrowser']??!![],_0x30d8cc=_0x58f826?.[_0x48ef61(0x1f2)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x1d3b1d=await(await fetch(_0x48ef61(0x1fd)))[_0x48ef61(0x1f3)]();return new Promise(async(_0x369b46,_0x3f6ca3)=>{const _0x454678=_0x48ef61;let _0x5eef43=0x0,_0x48285c=![],_0x359745;const _0x5cac4c=a4_0x76f1a0['createServer'](_0x1d3b1d,async(_0x3794f0,_0x454b85)=>{const _0x49f059=a4_0x4fc6,_0x5be779=getUserDomain(),_0x1f8c4d=_0x3794f0['headers'][_0x49f059(0x201)]||'',_0x31c423=await fetch(_0x5be779+_0x49f059(0x200),{'headers':{'cookie':_0x1f8c4d}})['then'](_0x3874f1=>_0x3874f1['json']()),_0x58147f=_0x31c423&&_0x31c423['session']&&_0x31c423[_0x49f059(0x1fc)];if(_0x58147f){writeFileSync(cookieFile,_0x1f8c4d,_0x49f059(0x1f6));const _0x500ed7=buildLoginSuccessHtml();_0x454b85['writeHead'](0xc8,{'Content-Type':_0x49f059(0x214)}),_0x454b85[_0x49f059(0x20d)](_0x500ed7),_0x4ad647(!![]);}else{const _0x5309a1=''+encodeURIComponent(_0x49f059(0x1ef)+_0x5eef43);_0x454b85[_0x49f059(0x213)](0x12e,{'location':_0x5be779+_0x49f059(0x20b)+_0x5309a1}),_0x454b85[_0x49f059(0x20d)]();return;}});function _0x4ad647(_0x337707){const _0x23d377=a4_0x4fc6;if(_0x48285c)return;_0x48285c=!![],_0x359745&&clearTimeout(_0x359745),_0x5cac4c[_0x23d377(0x203)](),_0x369b46(_0x337707);}_0x5cac4c[_0x454678(0x219)](0x0,'127.0.0.1',()=>{const _0x57e508=_0x454678,_0x2c897e=_0x5cac4c['address']();_0x5eef43=typeof _0x2c897e===_0x57e508(0x205)&&_0x2c897e?_0x2c897e[_0x57e508(0x212)]:Number(_0x2c897e);const _0x2bce0b=_0x57e508(0x1ef)+_0x5eef43;_0x359745=setTimeout(()=>{const _0x446ee8=_0x57e508;!_0x30c97d&&console[_0x446ee8(0x215)]('!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.'),_0x4ad647(![]);},_0x30d8cc);!_0x30c97d&&(console[_0x57e508(0x215)](_0x57e508(0x1f0)),console['log'](_0x57e508(0x210),_0x2bce0b),_0x29ad7a?(console[_0x57e508(0x215)](_0x57e508(0x216)),console[_0x57e508(0x215)](''),console[_0x57e508(0x215)]('💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.')):console['log'](_0x57e508(0x207)),console['log'](''));if(!_0x29ad7a)return;openInBrowser(_0x2bce0b)[_0x57e508(0x204)](_0x26369e=>{const _0x370d08=_0x57e508;!_0x30c97d&&(_0x26369e?console[_0x370d08(0x215)]('✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.'):(console[_0x370d08(0x215)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x370d08(0x215)](_0x370d08(0x209),_0x2bce0b)),console['log'](''));})[_0x57e508(0x1f4)](()=>{const _0x479f04=_0x57e508;!_0x30c97d&&(console['log'](_0x479f04(0x1f7)),console[_0x479f04(0x215)](_0x479f04(0x209),_0x2bce0b),console['log'](''));});}),_0x5cac4c['on'](_0x454678(0x1f5),_0x2403ae=>{const _0x2341df=_0x454678;if(_0x48285c)return;_0x48285c=!![],_0x359745&&clearTimeout(_0x359745),!_0x30c97d&&console[_0x2341df(0x1f5)](_0x2341df(0x1fb),_0x2403ae),_0x5cac4c[_0x2341df(0x203)](),_0x3f6ca3(_0x2403ae);});});}function openInBrowser(_0x1e2315){return new Promise(_0x7ce1fd=>{const _0x5b22c5=a4_0x4fc6,_0x21330a=process[_0x5b22c5(0x206)];let _0x4b6ede;if(_0x21330a===_0x5b22c5(0x1ff))_0x4b6ede=_0x5b22c5(0x218)+_0x1e2315+'\x22';else _0x21330a===_0x5b22c5(0x1f1)?_0x4b6ede='open\x20\x22'+_0x1e2315+'\x22':_0x4b6ede='xdg-open\x20\x22'+_0x1e2315+'\x22';exec(_0x4b6ede,_0x1100b7=>{_0x1100b7?_0x7ce1fd(![]):_0x7ce1fd(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a4_0x47115f(0x215)](a4_0x47115f(0x217),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a5_0x1f06(_0x20c218,_0x527577){_0x20c218=_0x20c218-0x14b;const _0x307b96=a5_0x307b();let _0x1f0698=_0x307b96[_0x20c218];return _0x1f0698;}const a5_0x280f81=a5_0x1f06;(function(_0x256292,_0x10247a){const _0x581c27=a5_0x1f06,_0x357104=_0x256292();while(!![]){try{const _0x2d832e=parseInt(_0x581c27(0x153))/0x1+parseInt(_0x581c27(0x14b))/0x2+-parseInt(_0x581c27(0x150))/0x3*(-parseInt(_0x581c27(0x154))/0x4)+parseInt(_0x581c27(0x155))/0x5+-parseInt(_0x581c27(0x14e))/0x6+parseInt(_0x581c27(0x14c))/0x7+-parseInt(_0x581c27(0x14d))/0x8*(parseInt(_0x581c27(0x151))/0x9);if(_0x2d832e===_0x10247a)break;else _0x357104['push'](_0x357104['shift']());}catch(_0x302f77){_0x357104['push'](_0x357104['shift']());}}}(a5_0x307b,0xcc17b));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a5_0x280f81(0x152));function a5_0x307b(){const _0x496ce0=['8zbVofr','5917614tLiBLQ','cookie','3Ezlesr','11383479tuRVpg','.lovrabet','388335uejfMJ','831884CkjkpZ','5458395dbxFCB','2491148ECPMok','1074528rndXji'];a5_0x307b=function(){return _0x496ce0;};return a5_0x307b();}export const cookieFile=join(configDir,a5_0x280f81(0x14f));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a6_0xec2f(_0x37d6ea,_0x57859e){_0x37d6ea=_0x37d6ea-0x1f4;var _0x593b47=a6_0x593b();var _0xec2fa8=_0x593b47[_0x37d6ea];return _0xec2fa8;}(function(_0x3df8b4,_0x186842){var _0x1baa27=a6_0xec2f,_0x355b19=_0x3df8b4();while(!![]){try{var _0xedba0d=-parseInt(_0x1baa27(0x1fa))/0x1+parseInt(_0x1baa27(0x1f5))/0x2+parseInt(_0x1baa27(0x1fd))/0x3*(-parseInt(_0x1baa27(0x1f8))/0x4)+-parseInt(_0x1baa27(0x1f6))/0x5+-parseInt(_0x1baa27(0x1f7))/0x6+-parseInt(_0x1baa27(0x1fc))/0x7*(-parseInt(_0x1baa27(0x1fb))/0x8)+parseInt(_0x1baa27(0x1f9))/0x9;if(_0xedba0d===_0x186842)break;else _0x355b19['push'](_0x355b19['shift']());}catch(_0x8eea99){_0x355b19['push'](_0x355b19['shift']());}}}(a6_0x593b,0x48e1e));function a6_0x593b(){var _0x289c51=['10124127lPtHcj','300999PAkxVg','8mKiYfd','3090024VDOZNL','1179078CpVzBk','utf-8','211062qUDtaZ','2413745aOJBEP','1179396XVRYcC','4hrkNDH'];a6_0x593b=function(){return _0x289c51;};return a6_0x593b();}import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0x23ee15=a6_0xec2f;try{return readFileSync(cookieFile,_0x23ee15(0x1f4));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x598aef,_0x497168){const _0x28f335=a7_0x2cc9,_0x51aec4=_0x598aef();while(!![]){try{const _0x5572e5=parseInt(_0x28f335(0xd0))/0x1*(parseInt(_0x28f335(0xce))/0x2)+parseInt(_0x28f335(0xd6))/0x3+-parseInt(_0x28f335(0xd7))/0x4+-parseInt(_0x28f335(0xcc))/0x5*(parseInt(_0x28f335(0xd9))/0x6)+-parseInt(_0x28f335(0xd4))/0x7+parseInt(_0x28f335(0xd3))/0x8+parseInt(_0x28f335(0xcf))/0x9*(parseInt(_0x28f335(0xd2))/0xa);if(_0x5572e5===_0x497168)break;else _0x51aec4['push'](_0x51aec4['shift']());}catch(_0x57221d){_0x51aec4['push'](_0x51aec4['shift']());}}}(a7_0x478d,0x9bfd8));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a7_0x478d(){const _0x3efb8c=['4587136aAuMat','user','6gEIbHg','832805fHwhXR','/api/auth/get-session','17138SnxJSc','408087gMFTZC','67oLmBql','utf-8','220JqnDJb','1498128lZOBze','7584668Jiihzu','session','3830610iTvjoG'];a7_0x478d=function(){return _0x3efb8c;};return a7_0x478d();}function a7_0x2cc9(_0x453808,_0x144df7){_0x453808=_0x453808-0xcc;const _0x478dc1=a7_0x478d();let _0x2cc974=_0x478dc1[_0x453808];return _0x2cc974;}import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0x5c8910=a7_0x2cc9;try{if(!existsSync(cookieFile))return null;const _0x2835ab=readFileSync(cookieFile,_0x5c8910(0xd1)),_0x85e8ee=await fetch(getUserDomain()+_0x5c8910(0xcd),{'headers':{'cookie':_0x2835ab}});if(!_0x85e8ee['ok'])return null;const _0x4d3390=await _0x85e8ee['json']();if(!_0x4d3390[_0x5c8910(0xd5)]||!_0x4d3390[_0x5c8910(0xd8)])return null;return _0x4d3390;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a8_0x57b0(_0x336a4d,_0x8ae0ee){_0x336a4d=_0x336a4d-0x7b;const _0x57d9a5=a8_0x57d9();let _0x57b0dc=_0x57d9a5[_0x336a4d];return _0x57b0dc;}(function(_0x2656bf,_0x22810e){const _0x2776ba=a8_0x57b0,_0x30a101=_0x2656bf();while(!![]){try{const _0x29d5b7=parseInt(_0x2776ba(0x81))/0x1*(parseInt(_0x2776ba(0x85))/0x2)+parseInt(_0x2776ba(0x84))/0x3*(parseInt(_0x2776ba(0x83))/0x4)+-parseInt(_0x2776ba(0x7f))/0x5*(parseInt(_0x2776ba(0x88))/0x6)+-parseInt(_0x2776ba(0x89))/0x7+-parseInt(_0x2776ba(0x87))/0x8+parseInt(_0x2776ba(0x7d))/0x9*(parseInt(_0x2776ba(0x82))/0xa)+parseInt(_0x2776ba(0x80))/0xb;if(_0x29d5b7===_0x22810e)break;else _0x30a101['push'](_0x30a101['shift']());}catch(_0x439498){_0x30a101['push'](_0x30a101['shift']());}}}(a8_0x57d9,0x71a88));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x5aaf88=a8_0x57b0;try{if(!existsSync(cookieFile))return![];const _0xfbc87=readFileSync(cookieFile,'utf-8'),_0x4d353d=await fetch(getUserDomain()+_0x5aaf88(0x7b),{'headers':{'cookie':_0xfbc87}})[_0x5aaf88(0x7e)](_0x364c6c=>_0x364c6c[_0x5aaf88(0x86)]());return _0x4d353d&&_0x4d353d[_0x5aaf88(0x7c)]&&_0x4d353d['user'];}catch{}return![];}function a8_0x57d9(){const _0x2ad0eb=['20660rNCylt','10112806Wxbtin','1607YlKecF','1891660iPLomQ','168pwuman','45033oKNVLh','1032oyNmUh','json','5724024kCzgsq','1350lHPQQg','5850397xbuTec','/api/auth/get-session','session','27rBCiOe','then'];a8_0x57d9=function(){return _0x2ad0eb;};return a8_0x57d9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a9_0x216e(_0x4f06ec,_0x1d1876){_0x4f06ec=_0x4f06ec-0x7b;const _0x1a7201=a9_0x1a72();let _0x216efd=_0x1a7201[_0x4f06ec];return _0x216efd;}(function(_0xaf978f,_0x300f99){const _0x4c09b5=a9_0x216e,_0xf53eea=_0xaf978f();while(!![]){try{const _0x1adc02=-parseInt(_0x4c09b5(0x81))/0x1*(-parseInt(_0x4c09b5(0x82))/0x2)+-parseInt(_0x4c09b5(0x7f))/0x3*(-parseInt(_0x4c09b5(0x7b))/0x4)+-parseInt(_0x4c09b5(0x7d))/0x5+-parseInt(_0x4c09b5(0x83))/0x6*(parseInt(_0x4c09b5(0x80))/0x7)+parseInt(_0x4c09b5(0x86))/0x8*(parseInt(_0x4c09b5(0x7c))/0x9)+-parseInt(_0x4c09b5(0x87))/0xa*(parseInt(_0x4c09b5(0x7e))/0xb)+parseInt(_0x4c09b5(0x84))/0xc;if(_0x1adc02===_0x300f99)break;else _0xf53eea['push'](_0xf53eea['shift']());}catch(_0x5db63e){_0xf53eea['push'](_0xf53eea['shift']());}}}(a9_0x1a72,0xa6671));export function buildLoginSuccessHtml(){const _0x55ebee=a9_0x216e,_0x38b681='Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.';return _0x55ebee(0x85)+_0x38b681+_0x55ebee(0x88);}function a9_0x1a72(){const _0xe57e05=['</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>','4wtkPaA','302562LggCGg','1951685gHsfKb','11ynILKH','2044671bjBWul','140HKEdWe','1747bNOynn','122jgjXeG','313374CvsgAe','18149316xtIUfs','<!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>','8xMRZcN','2176830XkgCif'];a9_0x1a72=function(){return _0xe57e05;};return a9_0x1a72();}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x281c57,_0x277d74){var _0x1aff66=a10_0x3da8,_0x3c5d68=_0x281c57();while(!![]){try{var _0x331921=parseInt(_0x1aff66(0x100))/0x1+-parseInt(_0x1aff66(0x104))/0x2+parseInt(_0x1aff66(0x106))/0x3*(-parseInt(_0x1aff66(0x109))/0x4)+parseInt(_0x1aff66(0x107))/0x5+-parseInt(_0x1aff66(0x101))/0x6*(parseInt(_0x1aff66(0x103))/0x7)+parseInt(_0x1aff66(0x105))/0x8+parseInt(_0x1aff66(0x102))/0x9;if(_0x331921===_0x277d74)break;else _0x3c5d68['push'](_0x3c5d68['shift']());}catch(_0xf8704d){_0x3c5d68['push'](_0x3c5d68['shift']());}}}(a10_0x3a47,0x8e527));function a10_0x3a47(){var _0x154cdd=['✓\x20Logged\x20out','1077615hPEUWV','242754NHdjaX','5969772tVoVhg','175JdeurF','896548zTCqKq','7379872XQSFTr','279KLiXOm','706210cveBhy','log','32772bEbkNK'];a10_0x3a47=function(){return _0x154cdd;};return a10_0x3a47();}import{unlinkSync,existsSync}from'node:fs';function a10_0x3da8(_0x43e1a9,_0x5b5fa8){_0x43e1a9=_0x43e1a9-0xff;var _0x3a47ab=a10_0x3a47();var _0x3da80c=_0x3a47ab[_0x43e1a9];return _0x3da80c;}import{cookieFile}from'../auth/constant.js';export function logout(){var _0x4780a3=a10_0x3da8;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x4780a3(0x108)](_0x4780a3(0xff))):console[_0x4780a3(0x108)]('!\x20Not\x20logged\x20in');}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a11_0x5aa5(_0x483606,_0x6c7137){_0x483606=_0x483606-0x173;const _0x3c0f01=a11_0x3c0f();let _0x5aa555=_0x3c0f01[_0x483606];return _0x5aa555;}(function(_0x1fa5b6,_0x1388f7){const _0x329d8d=a11_0x5aa5,_0x2025e4=_0x1fa5b6();while(!![]){try{const _0xb3cb38=parseInt(_0x329d8d(0x17a))/0x1*(-parseInt(_0x329d8d(0x17c))/0x2)+-parseInt(_0x329d8d(0x17d))/0x3*(parseInt(_0x329d8d(0x176))/0x4)+-parseInt(_0x329d8d(0x174))/0x5+-parseInt(_0x329d8d(0x177))/0x6*(-parseInt(_0x329d8d(0x179))/0x7)+parseInt(_0x329d8d(0x178))/0x8*(-parseInt(_0x329d8d(0x173))/0x9)+parseInt(_0x329d8d(0x17b))/0xa+parseInt(_0x329d8d(0x175))/0xb;if(_0xb3cb38===_0x1388f7)break;else _0x2025e4['push'](_0x2025e4['shift']());}catch(_0x31d082){_0x2025e4['push'](_0x2025e4['shift']());}}}(a11_0x3c0f,0x4e2c1));export const dynamicCliFlags={'enableBffSave':{'type':'boolean'}};function a11_0x3c0f(){const _0x374339=['1DAkFsY','4395480fgAfaD','2854GGwSYM','18LRqUiN','17937oxSspT','1959730fFiqUE','7532789FVvxpV','186128cKHeyg','7302hwTcgt','792MOCxvA','378XRZAgP'];a11_0x3c0f=function(){return _0x374339;};return a11_0x3c0f();}
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a12_0x5cdfd6=a12_0x38d5;(function(_0x3ea6ae,_0x239f77){const _0x5a3cba=a12_0x38d5,_0x5234db=_0x3ea6ae();while(!![]){try{const _0x4563f7=-parseInt(_0x5a3cba(0xc0))/0x1*(-parseInt(_0x5a3cba(0xad))/0x2)+parseInt(_0x5a3cba(0xbb))/0x3+parseInt(_0x5a3cba(0xb8))/0x4+parseInt(_0x5a3cba(0xb3))/0x5*(-parseInt(_0x5a3cba(0xa5))/0x6)+-parseInt(_0x5a3cba(0xbe))/0x7*(parseInt(_0x5a3cba(0xaf))/0x8)+-parseInt(_0x5a3cba(0xb5))/0x9*(-parseInt(_0x5a3cba(0xb0))/0xa)+-parseInt(_0x5a3cba(0xcd))/0xb;if(_0x4563f7===_0x239f77)break;else _0x5234db['push'](_0x5234db['shift']());}catch(_0x3e2857){_0x5234db['push'](_0x5234db['shift']());}}}(a12_0x5e4c,0xd5689));import a12_0x2d3178 from'meow';import{showHelp}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{isKnownService,getServiceEntry,findDefinition,deprecatedAliases,resolveDeprecatedSubcommand}from'./commands/registry.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{CLI_BIN_NAME,buildMeowFlags}from'./constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'./generated/build-info.js';import{reportCliHelpTrace}from'./telemetry/cli-help-trace.js';import{reportCommandTrace}from'./telemetry/cli-command-trace.js';import{registerOtelShutdownOnExit,exitWithOtelShutdown}from'./telemetry/register-otel-exit-shutdown.js';function a12_0x5e4c(){const _0x100540=['1133568TJVZky','input','slice','1286425JPcUef','⚠\x20`','180743EHwZFp','userDomain','unknownCommand','stderr','log','global','unknown','error','Error:\x20','cancelled','Hint:\x20','runtimeDomain','help','14659667hnaDxE','./constant/env.js','write','./constant/domain.js','\x0aCancelled.\x0a','now','env','`\x20in\x20v2.0.\x0a','apiDomain','2502012HcesgN','./cli-flags.js','service','code','hint','exitCode','unknown_service','message','10gSsLlG','`\x20in\x20new\x20scripts.\x0a','8lZOxAK','670YsTyGP','Unexpected\x20error:','dynamicCliFlags','15VmBNPn','`\x20has\x20been\x20moved\x20to\x20`','195966rxtLTc','command','./context.js','3604680rQguxv','wildcardDef','raw'];a12_0x5e4c=function(){return _0x100540;};return a12_0x5e4c();}import{printIssueReportNudgeForError}from'./commands/issue/nudge.js';let dynamicCliFlags=null;function a12_0x38d5(_0x47ebdb,_0x553fc2){_0x47ebdb=_0x47ebdb-0x9d;const _0x5e4cb2=a12_0x5e4c();let _0x38d541=_0x5e4cb2[_0x47ebdb];return _0x38d541;}try{dynamicCliFlags=(await import(a12_0x5cdfd6(0xa6)))[a12_0x5cdfd6(0xb2)];}catch{}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!==a12_0x5cdfd6(0xc6)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[a12_0x5cdfd6(0xbd)](0x0,0xa)+')':VERSION,cli=a12_0x2d3178(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0x66ad13=a12_0x5cdfd6;let _0x3e5e9f=cli[_0x66ad13(0xbc)][0x0],_0x5c8acc=cli['input'][0x1];const _0x537ab3=cli['flags'];if(!_0x3e5e9f){await reportCliHelpTrace(_0x66ad13(0xc5)),showHelp();return;}const _0x2fe288=deprecatedAliases[_0x3e5e9f];if(_0x2fe288&&!isKnownService(_0x3e5e9f)){const _0x194b2e=_0x5c8acc?CLI_BIN_NAME+'\x20'+_0x3e5e9f+'\x20'+_0x5c8acc:CLI_BIN_NAME+'\x20'+_0x3e5e9f,_0x197bed=CLI_BIN_NAME+'\x20'+_0x2fe288[_0x66ad13(0xa7)]+'\x20'+_0x2fe288[_0x66ad13(0xb6)];console[_0x66ad13(0xc7)]('⚠\x20`'+_0x194b2e+_0x66ad13(0xb4)+_0x197bed+_0x66ad13(0xa3)+'\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a'),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x3e5e9f)){await reportCliHelpTrace(_0x66ad13(0xab),{'service':_0x3e5e9f}),showHelp();return;}const _0x43e196=getServiceEntry(_0x3e5e9f);if(_0x537ab3['env']&&typeof _0x537ab3[_0x66ad13(0xa2)]==='string'){const {initEnv:_0x3b145f}=await import(_0x66ad13(0x9d));_0x3b145f(_0x537ab3['env']);}const {buildConfigFromFlags:_0x59f5be}=await import(_0x66ad13(0xb7)),_0x220463=_0x59f5be(_0x537ab3);if(!_0x537ab3[_0x66ad13(0xa2)]&&_0x220463[_0x66ad13(0xa2)]){const {initEnv:_0x3ae2ff}=await import(_0x66ad13(0x9d));_0x3ae2ff(_0x220463[_0x66ad13(0xa2)]);}if(_0x220463[_0x66ad13(0xba)]?.[_0x66ad13(0xa4)]||_0x220463['raw']?.[_0x66ad13(0xc1)]||_0x220463[_0x66ad13(0xba)]?.['runtimeDomain']){const {initDomains:_0x414937}=await import(_0x66ad13(0x9f));_0x414937({'apiDomain':_0x220463['raw'][_0x66ad13(0xa4)]||undefined,'userDomain':_0x220463['raw'][_0x66ad13(0xc1)]||undefined,'runtimeDomain':_0x220463[_0x66ad13(0xba)][_0x66ad13(0xcb)]||undefined});}if(!_0x5c8acc){if(_0x537ab3['help']){printServiceHelp(_0x3e5e9f);return;}if(_0x43e196['defaultCommand'])_0x5c8acc=_0x43e196['defaultCommand'];else{if(_0x43e196[_0x66ad13(0xb9)]){await dispatchDeclarative(_0x43e196[_0x66ad13(0xb9)],_0x3e5e9f,'',[],_0x537ab3,_0x220463);return;}else{printServiceHelp(_0x3e5e9f);return;}}}const _0x586871=resolveDeprecatedSubcommand(_0x3e5e9f,_0x5c8acc);if(_0x586871){const _0x139e9f=CLI_BIN_NAME+'\x20'+_0x3e5e9f+'\x20'+_0x5c8acc,_0x37309c=CLI_BIN_NAME+'\x20'+_0x3e5e9f+'\x20'+_0x586871;console['error'](_0x66ad13(0xbf)+_0x139e9f+'`\x20is\x20an\x20alias\x20of\x20`'+_0x37309c+'`;\x20prefer\x20`'+_0x37309c+_0x66ad13(0xae)),_0x5c8acc=_0x586871;}{let _0x5dc5de=findDefinition(_0x3e5e9f,_0x5c8acc),_0xda308c=cli['input']['slice'](0x2);if(!_0x5dc5de){if(_0x43e196[_0x66ad13(0xb9)]){if(_0x537ab3[_0x66ad13(0xcc)]){console['log'](generateCommandHelp(_0x43e196['wildcardDef']));return;}_0x5dc5de=_0x43e196[_0x66ad13(0xb9)],_0xda308c=[_0x5c8acc,...cli[_0x66ad13(0xbc)][_0x66ad13(0xbd)](0x2)];}else{printServiceHelp(_0x3e5e9f),await handleErrorAsync(CliErrors[_0x66ad13(0xc2)](_0x3e5e9f+'\x20'+_0x5c8acc));return;}}if(_0x537ab3[_0x66ad13(0xcc)]){console[_0x66ad13(0xc4)](generateCommandHelp(_0x5dc5de));return;}await dispatchDeclarative(_0x5dc5de,_0x3e5e9f,_0x5c8acc,_0xda308c,_0x537ab3,_0x220463);}}async function dispatchDeclarative(_0x5930a0,_0x59f4bd,_0x4ef8c5,_0x10b8b1,_0x363877,_0x2bac23){const _0xe2df82=a12_0x5cdfd6,_0x229096=Date['now']();let _0xd3e665;try{await runCommand(_0x5930a0,createPipelineEnv(_0x2bac23,_0x363877,_0x10b8b1));}catch(_0xd725cb){_0xd3e665=_0xd725cb;}await reportCommandTrace({'service':_0x59f4bd,'command':_0x4ef8c5,'flags':_0x363877,'durationMs':Date[_0xe2df82(0xa1)]()-_0x229096,'error':_0xd3e665});if(_0xd3e665)await handleErrorAsync(_0xd3e665,{'service':_0x59f4bd,'command':_0x4ef8c5});}function printServiceHelp(_0x2b98f5){const _0x12431d=a12_0x5cdfd6;console[_0x12431d(0xc4)](generateServiceHelp(_0x2b98f5));}async function handleErrorAsync(_0x2d328b,_0x266543){const _0x387815=a12_0x5cdfd6;if(_0x2d328b instanceof Error&&_0x2d328b['name']==='ExitPromptError')return process[_0x387815(0xc3)][_0x387815(0x9e)](_0x387815(0xa0)),await exitWithOtelShutdown(0x0);if(_0x2d328b instanceof CliError){if(_0x2d328b[_0x387815(0xa8)]===_0x387815(0xc9))return process[_0x387815(0xc3)][_0x387815(0x9e)]('\x0a'+_0x2d328b[_0x387815(0xac)]+'\x0a'),await exitWithOtelShutdown(0x0);console['error'](_0x387815(0xc8)+_0x2d328b[_0x387815(0xac)]);if(_0x2d328b[_0x387815(0xa9)])console[_0x387815(0xc7)](_0x387815(0xca)+_0x2d328b[_0x387815(0xa9)]);if(_0x266543)printIssueReportNudgeForError(_0x2d328b,_0x266543);return await exitWithOtelShutdown(_0x2d328b[_0x387815(0xaa)]);}console[_0x387815(0xc7)](_0x387815(0xb1),_0x2d328b);if(_0x266543)printIssueReportNudgeForError(_0x2d328b,_0x266543);return await exitWithOtelShutdown(0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13_0x4a879c=a13_0x5a4f;(function(_0x23d615,_0x2c9aee){const _0x5ca146=a13_0x5a4f,_0x5272a9=_0x23d615();while(!![]){try{const _0x38f7bd=parseInt(_0x5ca146(0xda))/0x1+parseInt(_0x5ca146(0xea))/0x2*(-parseInt(_0x5ca146(0xb8))/0x3)+parseInt(_0x5ca146(0xde))/0x4+parseInt(_0x5ca146(0xd4))/0x5*(-parseInt(_0x5ca146(0xd1))/0x6)+-parseInt(_0x5ca146(0xd7))/0x7+-parseInt(_0x5ca146(0xc5))/0x8+parseInt(_0x5ca146(0xc7))/0x9;if(_0x38f7bd===_0x2c9aee)break;else _0x5272a9['push'](_0x5272a9['shift']());}catch(_0x4de69a){_0x5272a9['push'](_0x5272a9['shift']());}}}(a13_0x1c86,0xdb730));import a13_0x10781b from'ora';function a13_0x1c86(){const _0x3d0fde=['write','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','\x20file(s)','params','generate','trim','\x20failed','5458LyGDCk','.md','validation','appCode','datasetName','\x1b[0m','isArray','start','parse','Fetched\x20','length','fail','\x1b[90m*\x20Generating\x20docs\x20for:\x20','1317NIiwuq','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','\x20dataset(s)','!\x20No\x20datasets\x20found.','string','has','filter','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','\x20\x20•\x20','Output\x20directory\x20(default:\x20./docs)','map','Failed\x20to\x20fetch\x20datasets','Fetching\x20dataset\x20list\x20for\x20','5391048vSZzkN','success','40544829UaUuYB','\x20doc(s)\x20in\x20','Invalid\x20--params:\x20','\x20doc(s)\x20failed','padStart','output','...','cookie','join','✓\x20Generated\x20','30DAFqyO','datasetCode','message','1209325hWzUcw','some','./docs','8709883ZHwFDF','must\x20be\x20a\x20JSON\x20object','str','319959jgVYhK','Doc\x20generation:\x20','stdout','object','1597720ulmlSf','\x20succeeded,\x20','datasetcode','Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','succeed'];a13_0x1c86=function(){return _0x3d0fde;};return a13_0x1c86();}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';function a13_0x5a4f(_0x31b7cf,_0x5efe2b){_0x31b7cf=_0x31b7cf-0xae;const _0x1c867f=a13_0x1c86();let _0x5a4f21=_0x1c867f[_0x31b7cf];return _0x5a4f21;}export const apiGenerate={'service':'api','command':a13_0x4a879c(0xe7),'description':a13_0x4a879c(0xe1),'risk':a13_0x4a879c(0xe3),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':'output','type':a13_0x4a879c(0xbc),'description':a13_0x4a879c(0xc1)},{'name':'datasetcode','type':a13_0x4a879c(0xbc),'description':a13_0x4a879c(0xb9)},{'name':a13_0x4a879c(0xe6),'type':a13_0x4a879c(0xbc),'description':a13_0x4a879c(0xe4)}],async 'execute'(_0x4e0dce){const _0x294d7d=a13_0x4a879c,_0x22f671=_0x4e0dce[_0x294d7d(0xd9)](_0x294d7d(0xcc))||_0x294d7d(0xd6),_0x34e0f4=_0x4e0dce['str'](_0x294d7d(0xe0)),_0xf7b335=_0x4e0dce[_0x294d7d(0xd9)](_0x294d7d(0xe6));let _0x299359;if(_0xf7b335)try{_0x299359=JSON[_0x294d7d(0xb3)](_0xf7b335);if(typeof _0x299359!==_0x294d7d(0xdd)||_0x299359===null||Array[_0x294d7d(0xb1)](_0x299359))throw new Error(_0x294d7d(0xd8));}catch(_0x47f19c){throw CliErrors[_0x294d7d(0xec)](_0x294d7d(0xc9)+(_0x47f19c instanceof Error?_0x47f19c[_0x294d7d(0xd3)]:String(_0x47f19c)),'Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27');}let _0x2e18e2;if(_0x34e0f4){const _0x347eb2=_0x34e0f4['split'](',')[_0x294d7d(0xc2)](_0x29a239=>_0x29a239[_0x294d7d(0xe8)]())[_0x294d7d(0xbe)](_0x43d80b=>_0x43d80b[_0x294d7d(0xb5)]>0x0);if(_0x347eb2['length']===0x0)throw CliErrors[_0x294d7d(0xec)]('--datasetcode\x20cannot\x20be\x20empty.');_0x2e18e2=new Set(_0x347eb2),writeCliSideChannelLine(_0x294d7d(0xb7)+_0x347eb2[_0x294d7d(0xcf)](',\x20')+_0x294d7d(0xb0));}const _0x3db37f=a13_0x10781b(_0x294d7d(0xc4)+_0x4e0dce[_0x294d7d(0xae)]+_0x294d7d(0xcd))[_0x294d7d(0xb2)]();let _0x21a42c;try{({configArray:_0x21a42c}=await fetchModelList(_0x4e0dce[_0x294d7d(0xae)],_0x4e0dce[_0x294d7d(0xce)]),_0x3db37f[_0x294d7d(0xe2)](_0x294d7d(0xb4)+_0x21a42c[_0x294d7d(0xb5)]+_0x294d7d(0xba)));}catch(_0x2b6da1){_0x3db37f[_0x294d7d(0xb6)](_0x294d7d(0xc3));throw _0x2b6da1;}if(_0x21a42c[_0x294d7d(0xb5)]===0x0)return writeCliSideChannelLine(_0x294d7d(0xbb)),{'ok':!![]};let _0x5b948f=_0x21a42c;if(_0x2e18e2){_0x5b948f=_0x21a42c[_0x294d7d(0xbe)](_0x3e2e82=>_0x2e18e2[_0x294d7d(0xbd)](_0x3e2e82['datasetCode']));const _0x3a9a08=[..._0x2e18e2][_0x294d7d(0xbe)](_0x4ada51=>!_0x21a42c[_0x294d7d(0xd5)](_0x24719f=>_0x24719f['datasetCode']===_0x4ada51));_0x3a9a08['length']>0x0&&writeCliSideChannelLine(_0x294d7d(0xbf)+_0x3a9a08[_0x294d7d(0xcf)](',\x20')+_0x294d7d(0xb0));if(_0x5b948f[_0x294d7d(0xb5)]===0x0)throw CliErrors[_0x294d7d(0xec)]('None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20'+[..._0x2e18e2][_0x294d7d(0xcf)](',\x20'));writeCliSideChannelLine('\x1b[90m*\x20Filtered\x20'+_0x5b948f[_0x294d7d(0xb5)]+'\x20of\x20'+_0x21a42c[_0x294d7d(0xb5)]+'\x20dataset(s)\x1b[0m');}let _0x489350=0x0;const _0x326f66=await generateDatasetDocs(_0x5b948f,_0x4e0dce[_0x294d7d(0xae)],_0x4e0dce[_0x294d7d(0xce)],_0x22f671,(_0x3e600f,_0x4bf7ae,_0x599122)=>{const _0x38aa4b=_0x294d7d;_0x489350=_0x3e600f,process[_0x38aa4b(0xdc)][_0x38aa4b(0xe3)]('\x0d\x20\x20['+String(_0x3e600f)[_0x38aa4b(0xcb)](String(_0x4bf7ae)[_0x38aa4b(0xb5)])+'/'+_0x4bf7ae+']\x20'+_0x599122+_0x38aa4b(0xeb));},_0x299359);if(_0x489350>0x0)process[_0x294d7d(0xdc)][_0x294d7d(0xe3)]('\x0a');const _0x228740=_0x326f66[_0x294d7d(0xbe)](_0x6ebbd3=>_0x6ebbd3[_0x294d7d(0xc6)])['length'],_0x4c38fb=_0x326f66[_0x294d7d(0xbe)](_0x140111=>!_0x140111[_0x294d7d(0xc6)])['length'];writeCliSideChannelLine(''),writeCliSideChannelLine(_0x294d7d(0xd0)+_0x228740+_0x294d7d(0xc8)+_0x22f671);if(_0x4c38fb>0x0){writeCliSideChannelLine('!\x20'+_0x4c38fb+_0x294d7d(0xca));for(const _0x207ef7 of _0x326f66[_0x294d7d(0xbe)](_0x30427e=>!_0x30427e['success'])){writeCliSideChannelLine(_0x294d7d(0xc0)+_0x207ef7[_0x294d7d(0xaf)]+'\x20('+_0x207ef7[_0x294d7d(0xd2)]+'):\x20'+_0x207ef7['error']);}}return{'ok':_0x4c38fb===0x0,'message':_0x4c38fb>0x0?_0x294d7d(0xdb)+_0x228740+_0x294d7d(0xdf)+_0x4c38fb+_0x294d7d(0xe9):'Doc\x20generation\x20complete:\x20'+_0x228740+_0x294d7d(0xe5)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x56b2cf,_0x45f3de){const _0x4afe0d=a14_0x964f,_0x15b21b=_0x56b2cf();while(!![]){try{const _0x10cc84=parseInt(_0x4afe0d(0x82))/0x1+parseInt(_0x4afe0d(0x78))/0x2*(-parseInt(_0x4afe0d(0x83))/0x3)+-parseInt(_0x4afe0d(0x7a))/0x4*(-parseInt(_0x4afe0d(0x7e))/0x5)+parseInt(_0x4afe0d(0x7c))/0x6*(parseInt(_0x4afe0d(0x7b))/0x7)+parseInt(_0x4afe0d(0x79))/0x8*(-parseInt(_0x4afe0d(0x81))/0x9)+-parseInt(_0x4afe0d(0x7d))/0xa+parseInt(_0x4afe0d(0x7f))/0xb*(parseInt(_0x4afe0d(0x80))/0xc);if(_0x10cc84===_0x45f3de)break;else _0x15b21b['push'](_0x15b21b['shift']());}catch(_0x10bfbe){_0x15b21b['push'](_0x15b21b['shift']());}}}(a14_0x3522,0x33d2f));import{apiList}from'../../commands/api/list.js';function a14_0x3522(){const _0x26daed=['2400hzlaQc','663633GlxblF','22624KOvgLx','10491DVKHws','188TROmqj','24KWINYp','76HpSFBG','294JBbhWo','5040tARscB','1279850xAkPuu','44495kOlGCn','36476Odflmn'];a14_0x3522=function(){return _0x26daed;};return a14_0x3522();}import{apiPull}from'../../commands/api/pull.js';function a14_0x964f(_0x7cf50e,_0x16e354){_0x7cf50e=_0x7cf50e-0x78;const _0x35229f=a14_0x3522();let _0x964f5f=_0x35229f[_0x7cf50e];return _0x964f5f;}import{apiGenerate}from'../../commands/api/generate.js';export const apiDefinitions=[apiList,apiPull,apiGenerate];
|
package/lib/commands/api/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a15_0xabf0e5=a15_0x3b74;function a15_0x4112(){const _0x1b39b2=['appcode','1481294hMoJbv','1812EWHJGl','push','3747yDsyml','global','cookie','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','rawFlags','8981892lDrEYL','name','isDefault','list','env','api','2445295hmSNdp','read','11449949Wliinv','production','36115432GEhpsM','1194572xdUqQp'];a15_0x4112=function(){return _0x1b39b2;};return a15_0x4112();}(function(_0x3d3912,_0x5d7f17){const _0x49e3e5=a15_0x3b74,_0xe78028=_0x3d3912();while(!![]){try{const _0x2fa590=-parseInt(_0x49e3e5(0x7a))/0x1+-parseInt(_0x49e3e5(0x7b))/0x2*(parseInt(_0x49e3e5(0x7d))/0x3)+-parseInt(_0x49e3e5(0x78))/0x4+-parseInt(_0x49e3e5(0x73))/0x5+parseInt(_0x49e3e5(0x82))/0x6+-parseInt(_0x49e3e5(0x75))/0x7+parseInt(_0x49e3e5(0x77))/0x8;if(_0x2fa590===_0x5d7f17)break;else _0xe78028['push'](_0xe78028['shift']());}catch(_0x5e3d10){_0xe78028['push'](_0xe78028['shift']());}}}(a15_0x4112,0xee10a));function a15_0x3b74(_0x3c870d,_0x15b449){_0x3c870d=_0x3c870d-0x70;const _0x411204=a15_0x4112();let _0x3b7409=_0x411204[_0x3c870d];return _0x3b7409;}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_0xabf0e5(0x72),'command':a15_0xabf0e5(0x70),'description':'List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','risk':a15_0xabf0e5(0x74),'requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0xabf0e5(0x7e),'type':'boolean','description':a15_0xabf0e5(0x80),'default':![]}],async 'execute'(_0x407f1e){const _0x37c26f=a15_0xabf0e5,_0x3f8338=_0x407f1e[_0x37c26f(0x81)]['appcode']?String(_0x407f1e[_0x37c26f(0x81)][_0x37c26f(0x79)]):undefined,_0x58e556=resolveTargetApps(_0x407f1e,_0x3f8338);if(_0x58e556){const _0x2badfd=[];for(const _0x45648c of _0x58e556){const _0x1fe88e=_0x45648c['cookie']||_0x407f1e[_0x37c26f(0x7f)],_0xc0e810=_0x45648c[_0x37c26f(0x71)]||_0x37c26f(0x76);initEnv(_0xc0e810);const {configArray:_0x22e326}=await fetchModelList(_0x45648c[_0x37c26f(0x79)],_0x1fe88e);_0x2badfd[_0x37c26f(0x7c)](..._0x22e326['map'](_0x63ebac=>({..._0x63ebac,'_appName':_0x45648c[_0x37c26f(0x83)],'_appCode':_0x45648c[_0x37c26f(0x79)],'_env':_0xc0e810,'_isDefault':_0x45648c[_0x37c26f(0x84)]})));}return{'ok':!![],'data':_0x2badfd};}const {configArray:_0xcc89bf}=await fetchModelList(_0x407f1e['appCode'],_0x407f1e['cookie']);return{'ok':!![],'data':_0xcc89bf};}};
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a16_0x3d98(){const _0x395e29=['132jOvphW','join','write','rawFlags','Done:\x20','appcode','47259NyLvBo','production','Failed:\x20','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','env','split','4782864YIKfNA','\x20model(s)','api','str','6968qwDIvu','cookie','output','succeed','pull','1841KWzvpz','\x20\x20•\x20','180lQOkxA','string','5kiddoN','length','clientFilePath','isDefault','.ts','fail','4583544WciSNN','apiDir','name','appCode','\x20app(s)\x20failed','apiFilePath','...','\x20failed','796616FcmAqk','\x20dataset(s),\x20generated\x20','Pulling\x20API\x20config\x20for\x20','\x20dataset(s)\x20→\x20','\x20succeeded,\x20','2EdLHQL','start','message','includes','3709911AVfGRi','3724924KUTDbF','Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20(','modelCount','client'];a16_0x3d98=function(){return _0x395e29;};return a16_0x3d98();}const a16_0x4d48c5=a16_0x5db4;(function(_0x154c87,_0x39cd9b){const _0x10bbe6=a16_0x5db4,_0x425c7b=_0x154c87();while(!![]){try{const _0x4bf922=-parseInt(_0x10bbe6(0x1c7))/0x1*(parseInt(_0x10bbe6(0x1c2))/0x2)+-parseInt(_0x10bbe6(0x1cb))/0x3+-parseInt(_0x10bbe6(0x197))/0x4*(parseInt(_0x10bbe6(0x1b4))/0x5)+-parseInt(_0x10bbe6(0x1ba))/0x6+parseInt(_0x10bbe6(0x1b0))/0x7*(-parseInt(_0x10bbe6(0x1ab))/0x8)+-parseInt(_0x10bbe6(0x1a1))/0x9*(parseInt(_0x10bbe6(0x1b2))/0xa)+-parseInt(_0x10bbe6(0x19b))/0xb*(-parseInt(_0x10bbe6(0x1a7))/0xc);if(_0x4bf922===_0x39cd9b)break;else _0x425c7b['push'](_0x425c7b['shift']());}catch(_0x494da9){_0x425c7b['push'](_0x425c7b['shift']());}}}(a16_0x3d98,0xb26f1));import a16_0x41f30b from'ora';import a16_0x1f27ba from'node:path';import{initEnv,getEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';import{generateApiFile}from'../../api/generate-api-file.js';function a16_0x5db4(_0x2f928e,_0x3fa6e4){_0x2f928e=_0x2f928e-0x197;const _0x3d982b=a16_0x3d98();let _0x5db4c9=_0x3d982b[_0x2f928e];return _0x5db4c9;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{DEFAULT_API_DIR}from'../../constant/paths.js';import{resolveTargetApps}from'../../commands/api/shared.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export const apiPull={'service':a16_0x4d48c5(0x1a9),'command':a16_0x4d48c5(0x1af),'description':a16_0x4d48c5(0x198)+DEFAULT_API_DIR+'/)','risk':a16_0x4d48c5(0x19d),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':'output','type':a16_0x4d48c5(0x1b3),'description':'Output\x20directory\x20(default:\x20'+DEFAULT_API_DIR+'/)'},{'name':'global','type':'boolean','description':a16_0x4d48c5(0x1a4),'default':![]}],async 'execute'(_0x5ddcda){const _0x30c023=a16_0x4d48c5,_0x4babba=_0x5ddcda[_0x30c023(0x19e)][_0x30c023(0x1a0)]?String(_0x5ddcda['rawFlags'][_0x30c023(0x1a0)]):undefined,_0x3afb41=_0x5ddcda[_0x30c023(0x1aa)](_0x30c023(0x1ad))||undefined,_0xc774c0=resolveTargetApps(_0x5ddcda,_0x4babba);if(_0xc774c0){let _0x5db827=0x0,_0xf5a849=0x0;for(const _0x328d53 of _0xc774c0){const _0x3b441c=_0x328d53['cookie']||_0x5ddcda[_0x30c023(0x1ac)],_0x1ffee4=_0x328d53[_0x30c023(0x1a5)]||_0x30c023(0x1a2);initEnv(_0x1ffee4);const _0xbbe957=_0x328d53['apiDir']||_0x3afb41||_0x5ddcda[_0x30c023(0x1bb)]||DEFAULT_API_DIR,_0x5e2336=_0x328d53[_0x30c023(0x1b7)]?'':_0x328d53[_0x30c023(0x1bc)]||_0x328d53[_0x30c023(0x1a0)],_0x486e9e=a16_0x41f30b('Pulling\x20'+_0x328d53[_0x30c023(0x1bc)]+'\x20('+_0x328d53['appcode']+')...')['start']();try{const {configArray:_0xbb1241}=await fetchModelList(_0x328d53[_0x30c023(0x1a0)],_0x3b441c),_0x4c5408=await generateApiFile(_0xbb1241,_0x5e2336,_0x328d53[_0x30c023(0x1a0)],_0x328d53[_0x30c023(0x1b7)],_0x1ffee4,_0xbbe957,_0x328d53[_0x30c023(0x1bc)]);_0x486e9e[_0x30c023(0x1ae)](_0x328d53[_0x30c023(0x1bc)]+':\x20'+_0xbb1241[_0x30c023(0x1b5)]+_0x30c023(0x1c5)+_0x4c5408[_0x30c023(0x199)]+_0x30c023(0x1a8)),writeCliSideChannelLine(_0x30c023(0x1b1)+_0x4c5408[_0x30c023(0x1bf)]),writeCliSideChannelLine(_0x30c023(0x1b1)+_0x4c5408[_0x30c023(0x1b6)]),_0x5db827++;}catch(_0x3878ff){_0x486e9e[_0x30c023(0x1b9)](_0x328d53[_0x30c023(0x1bc)]+':\x20'+(_0x3878ff instanceof Error?_0x3878ff['message']:String(_0x3878ff))),_0xf5a849++;}}writeCliSideChannelLine('');if(_0xf5a849>0x0)writeCliSideChannelLine('!\x20'+_0xf5a849+_0x30c023(0x1be));return{'ok':_0xf5a849===0x0,'message':_0x30c023(0x19f)+_0x5db827+_0x30c023(0x1c6)+_0xf5a849+_0x30c023(0x1c1)};}const _0x4046cb=_0x4babba&&_0x4babba[_0x30c023(0x1ca)]('-')?_0x4babba[_0x30c023(0x1a6)]('-')['slice'](0x1)['join']('-'):'',_0x250ea8=_0x3afb41||_0x5ddcda[_0x30c023(0x1bb)]||DEFAULT_API_DIR,_0x357d5d=!_0x4babba,_0x5ebe19=a16_0x41f30b(_0x30c023(0x1c4)+_0x5ddcda[_0x30c023(0x1bd)]+_0x30c023(0x1c0))[_0x30c023(0x1c8)]();try{const {configArray:_0x148ce7}=await fetchModelList(_0x5ddcda[_0x30c023(0x1bd)],_0x5ddcda[_0x30c023(0x1ac)]),_0x5af50c=await generateApiFile(_0x148ce7,_0x4046cb,_0x5ddcda[_0x30c023(0x1bd)],_0x357d5d,getEnv(),_0x250ea8);_0x5ebe19[_0x30c023(0x1ae)]('Pulled\x20'+_0x148ce7['length']+_0x30c023(0x1c3)+_0x5af50c[_0x30c023(0x199)]+_0x30c023(0x1a8));const _0x138458=_0x4046cb?_0x4046cb+'-api':_0x30c023(0x1a9),_0x55e713=_0x4046cb?_0x4046cb+'-client':_0x30c023(0x19a);return writeCliSideChannelLine(_0x30c023(0x1b1)+a16_0x1f27ba[_0x30c023(0x19c)](_0x250ea8,_0x138458+_0x30c023(0x1b8))),writeCliSideChannelLine(_0x30c023(0x1b1)+a16_0x1f27ba[_0x30c023(0x19c)](_0x250ea8,_0x55e713+_0x30c023(0x1b8))),{'ok':!![],'data':{'datasetCount':_0x148ce7[_0x30c023(0x1b5)],'modelCount':_0x5af50c['modelCount']}};}catch(_0x50505a){_0x5ebe19[_0x30c023(0x1b9)](_0x30c023(0x1a3)+(_0x50505a instanceof Error?_0x50505a[_0x30c023(0x1c9)]:String(_0x50505a)));throw _0x50505a;}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a17_0x88cf(_0x15ff70,_0x4c85eb){_0x15ff70=_0x15ff70-0x70;const _0x357f2f=a17_0x357f();let _0x88cf3=_0x357f2f[_0x15ff70];return _0x88cf3;}(function(_0x281b8e,_0x17e9c1){const _0xd4e8ec=a17_0x88cf,_0x2a748f=_0x281b8e();while(!![]){try{const _0x535bc5=parseInt(_0xd4e8ec(0x71))/0x1+-parseInt(_0xd4e8ec(0x7f))/0x2*(-parseInt(_0xd4e8ec(0x80))/0x3)+-parseInt(_0xd4e8ec(0x79))/0x4*(parseInt(_0xd4e8ec(0x76))/0x5)+-parseInt(_0xd4e8ec(0x85))/0x6*(parseInt(_0xd4e8ec(0x73))/0x7)+parseInt(_0xd4e8ec(0x78))/0x8+parseInt(_0xd4e8ec(0x82))/0x9*(-parseInt(_0xd4e8ec(0x84))/0xa)+-parseInt(_0xd4e8ec(0x86))/0xb*(-parseInt(_0xd4e8ec(0x81))/0xc);if(_0x535bc5===_0x17e9c1)break;else _0x2a748f['push'](_0x2a748f['shift']());}catch(_0x4f7d34){_0x2a748f['push'](_0x2a748f['shift']());}}}(a17_0x357f,0x9c71e));function a17_0x357f(){const _0x2a8674=['name','28642vfQkvu','84aJTjyr','12jhgDrS','218223JkShKX','global','210gWLUGS','58890FYABYb','11553454QBmEuL','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','840927DAFMag','merged','182QWSvbu','selectedAppName','validation','10jeDlHj','filter','3122944zCAMBm','2554844dgiJSH','map','join','project','length'];a17_0x357f=function(){return _0x2a8674;};return a17_0x357f();}import{getMultiAppConfigs}from'../../utils/config.js';import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x103697,_0x22c893){const _0x18d3b1=a17_0x88cf;if(_0x22c893)return null;const _0x1ce12c=_0x103697['bool'](_0x18d3b1(0x83))?_0x18d3b1(0x72):_0x18d3b1(0x7c);let _0x73748a=getMultiAppConfigs(_0x1ce12c);if(!_0x73748a||_0x73748a[_0x18d3b1(0x7d)]===0x0)return null;if(_0x103697[_0x18d3b1(0x74)]){const _0x543a1f=_0x73748a[_0x18d3b1(0x77)](_0x39742e=>_0x39742e[_0x18d3b1(0x7e)]===_0x103697['selectedAppName']);if(_0x543a1f[_0x18d3b1(0x7d)]===0x0){const _0x1a29e5=_0x73748a[_0x18d3b1(0x7a)](_0x5649b6=>_0x5649b6[_0x18d3b1(0x7e)])[_0x18d3b1(0x7b)](',\x20');throw CliErrors[_0x18d3b1(0x75)]('App\x20\x22'+_0x103697[_0x18d3b1(0x74)]+_0x18d3b1(0x70)+_0x1a29e5);}_0x73748a=_0x543a1f;}return _0x73748a;}
|
package/lib/commands/app/add.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a18_0x3d2281=a18_0x38cf;(function(_0x1e47fb,_0x107ca9){const _0x146046=a18_0x38cf,_0x50cd62=_0x1e47fb();while(!![]){try{const _0x2d696c=parseInt(_0x146046(0x10d))/0x1*(parseInt(_0x146046(0x103))/0x2)+-parseInt(_0x146046(0xf7))/0x3+-parseInt(_0x146046(0xf9))/0x4*(parseInt(_0x146046(0x107))/0x5)+-parseInt(_0x146046(0x101))/0x6*(parseInt(_0x146046(0x10a))/0x7)+-parseInt(_0x146046(0xf6))/0x8*(-parseInt(_0x146046(0x100))/0x9)+parseInt(_0x146046(0xf4))/0xa*(-parseInt(_0x146046(0x102))/0xb)+-parseInt(_0x146046(0xf3))/0xc*(-parseInt(_0x146046(0x104))/0xd);if(_0x2d696c===_0x107ca9)break;else _0x50cd62['push'](_0x50cd62['shift']());}catch(_0x4bac7a){_0x50cd62['push'](_0x50cd62['shift']());}}}(a18_0x5639,0x7c26b));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';function a18_0x38cf(_0x39a994,_0x597093){_0x39a994=_0x39a994-0xee;const _0x56391e=a18_0x5639();let _0x38cfc0=_0x56391e[_0x39a994];return _0x38cfc0;}function a18_0x5639(){const _0x1ffe06=['Missing\x20app\x20name.','string','trim','Use\x20global\x20config\x20scope','write','Updated','\x20Set\x20as\x20default\x20app.','App\x20profile\x20name','apps','636gONgRQ','8433590vpNdLb','Added','4553680MJYjbw','2885226oHRmbj','defaultApp','3355280jVvFhI','Usage:\x20','args','global','flagMissing','str','validation','9mFOTqn','22614RWKcte','11HpOvjN','22574guggDF','603317fOOwnI','\x20app\x20add\x20<name>\x20--appcode\x20<code>','Add\x20or\x20update\x20an\x20app\x20in\x20config','5YxgxIc','name','App\x20code','630hZQcxw','appcode','app','41JTNRIm','\x22\x20(appcode:\x20'];a18_0x5639=function(){return _0x1ffe06;};return a18_0x5639();}import{readConfig,writeConfig,scopeLabel}from'../../commands/app/shared.js';async function validateArgs(_0x2589f7){const _0x5d0846=a18_0x38cf,_0x503237=_0x2589f7['args'][0x0]?.[_0x5d0846(0x111)]();if(!_0x503237)throw CliErrors[_0x5d0846(0xff)](_0x5d0846(0x10f),_0x5d0846(0xfa)+CLI_BIN_NAME+_0x5d0846(0x105));}async function execute(_0x633893){const _0x4ac63c=a18_0x38cf,_0x114593=_0x633893[_0x4ac63c(0xfb)][0x0]?.[_0x4ac63c(0x111)]();if(!_0x114593)throw CliErrors[_0x4ac63c(0xff)](_0x4ac63c(0x10f),_0x4ac63c(0xfa)+CLI_BIN_NAME+_0x4ac63c(0x105));const _0x3d3f55=_0x633893[_0x4ac63c(0xfe)]('appcode');if(!_0x3d3f55)throw CliErrors[_0x4ac63c(0xfd)](_0x4ac63c(0x10b),_0x4ac63c(0xfa)+CLI_BIN_NAME+_0x4ac63c(0x105));const _0xf25ecd={'global':_0x633893['bool'](_0x4ac63c(0xfc))},_0x1391b3=readConfig(_0xf25ecd);if(!_0x1391b3['apps'])_0x1391b3[_0x4ac63c(0xf2)]={};const _0x2d4109={'appcode':_0x3d3f55,...collectAppProfileOverrides(_0x30e744=>_0x633893[_0x4ac63c(0xfe)](_0x30e744))},_0x42b389=_0x1391b3['apps'],_0x36fd45=!!_0x42b389[_0x114593];_0x42b389[_0x114593]=_0x2d4109;if(!_0x1391b3[_0x4ac63c(0xf8)])_0x1391b3[_0x4ac63c(0xf8)]=_0x114593;writeConfig(_0x1391b3,_0xf25ecd);const _0x5cd626=!_0x36fd45&&_0x1391b3['defaultApp']===_0x114593?_0x4ac63c(0xf0):'',_0x4cde72=(_0x36fd45?_0x4ac63c(0xef):_0x4ac63c(0xf5))+'\x20app\x20\x22'+_0x114593+_0x4ac63c(0x10e)+_0x3d3f55+')'+scopeLabel(_0xf25ecd)+'.'+_0x5cd626;return{'ok':!![],'message':_0x4cde72};}export const appAddDefinition={'service':a18_0x3d2281(0x10c),'command':'add','description':a18_0x3d2281(0x106),'risk':a18_0x3d2281(0xee),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a18_0x3d2281(0x108),'description':a18_0x3d2281(0xf1),'required':!![]}],'flags':[{'name':'appcode','type':a18_0x3d2281(0x110),'description':a18_0x3d2281(0x109),'required':!![]},{'name':a18_0x3d2281(0xfc),'type':'boolean','description':a18_0x3d2281(0x112),'default':![]},...getAppProfileFlagDefs()],'validate':validateArgs,'execute':execute};
|