@lovrabet/rabetbase-cli 2.3.1-beta.2 → 2.3.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 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.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-skill/index.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 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a141_0x3669(_0x31cd1e,_0x5780c9){_0x31cd1e=_0x31cd1e-0xcc;const _0x25e184=a141_0x25e1();let _0x366976=_0x25e184[_0x31cd1e];return _0x366976;}const a141_0x165bc3=a141_0x3669;(function(_0x190011,_0x8eb23){const _0x20f971=a141_0x3669,_0x4975e4=_0x190011();while(!![]){try{const _0x173d23=parseInt(_0x20f971(0xe3))/0x1+-parseInt(_0x20f971(0xed))/0x2*(parseInt(_0x20f971(0xdc))/0x3)+parseInt(_0x20f971(0xef))/0x4*(parseInt(_0x20f971(0xd4))/0x5)+-parseInt(_0x20f971(0xeb))/0x6+parseInt(_0x20f971(0xf5))/0x7*(parseInt(_0x20f971(0xd3))/0x8)+-parseInt(_0x20f971(0xcc))/0x9+parseInt(_0x20f971(0xda))/0xa;if(_0x173d23===_0x8eb23)break;else _0x4975e4['push'](_0x4975e4['shift']());}catch(_0x2195dd){_0x4975e4['push'](_0x4975e4['shift']());}}}(a141_0x25e1,0x479ca));function a141_0x25e1(){const _0x1289df=['map','\x22\x20not\x20found\x20or\x20not\x20accessible','108267WGpPLn','type','message','str','\x22\x20not\x20found\x20in\x20any\x20dataset','trim','name','Provide\x20--file\x20or\x20--sql','987462ruQDik','filter','2RssyzJ','reason','4vwcZem','fields','split','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','toLowerCase','isDangerous','406WqDodm','validation','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','isSelectOnly','from','file','2171808fSHrbp','push','tableName','validate','parameters','string','cwd','29288FAaqhe','1609495hNNjnR','sqlType','valid','sql','dbtableConfig','tables','1958480teEmDw','schemas','417423vONwSd','schemaWarnings','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','Table\x20\x22','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'];a141_0x25e1=function(){return _0x1289df;};return a141_0x25e1();}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':a141_0x165bc3(0xd7),'command':a141_0x165bc3(0xcf),'description':a141_0x165bc3(0xf2),'risk':'read','flags':[{'name':a141_0x165bc3(0xfa),'type':a141_0x165bc3(0xd1),'description':a141_0x165bc3(0xe0)},{'name':'sql','type':a141_0x165bc3(0xd1),'description':a141_0x165bc3(0xde)},{'name':a141_0x165bc3(0xdb),'type':a141_0x165bc3(0xd1),'description':a141_0x165bc3(0xf7)}],async 'execute'(_0xe77b42){const _0x309b10=a141_0x165bc3,_0x1d9c8a=_0xe77b42[_0x309b10(0xe6)]('file'),_0x561e14=_0xe77b42[_0x309b10(0xe6)](_0x309b10(0xd7));if(!_0x1d9c8a&&!_0x561e14)throw CliErrors['flagMissing'](_0x309b10(0xfa),_0x309b10(0xea));let _0x4c1f2e;if(_0x1d9c8a){const _0x15711e=resolve(process[_0x309b10(0xd2)](),_0x1d9c8a);if(!existsSync(_0x15711e))throw CliErrors[_0x309b10(0xf6)]('File\x20not\x20found:\x20'+_0x15711e);_0x4c1f2e=readFileSync(_0x15711e,'utf-8');}else _0x4c1f2e=_0x561e14;const _0x4a342d=validateSql(_0x4c1f2e),_0x37e88e={'valid':_0x4a342d[_0x309b10(0xd6)],'sqlType':_0x4a342d[_0x309b10(0xd5)][_0x309b10(0xe4)],'isSelectOnly':_0x4a342d[_0x309b10(0xd5)][_0x309b10(0xf8)],'isDangerous':_0x4a342d[_0x309b10(0xd5)][_0x309b10(0xf4)],'tables':_0x4a342d[_0x309b10(0xd9)],'parameters':_0x4a342d[_0x309b10(0xd0)],'message':_0x4a342d[_0x309b10(0xe5)]};_0x4a342d[_0x309b10(0xd5)][_0x309b10(0xee)]&&(_0x37e88e[_0x309b10(0xee)]=_0x4a342d['sqlType'][_0x309b10(0xee)]);const _0x3d52af=_0xe77b42[_0x309b10(0xe6)](_0x309b10(0xdb));if(_0x3d52af&&_0x4a342d[_0x309b10(0xd6)]){const _0xa9cf68=_0x3d52af[_0x309b10(0xf1)](',')[_0x309b10(0xe1)](_0xf2cd69=>_0xf2cd69[_0x309b10(0xe8)]())[_0x309b10(0xec)](Boolean),_0x3243f0=[],_0xabf9cc=filterDbTableBackedDatasets(await listDatasets(_0xe77b42['appCode'])),_0x564f28=new Map(_0xabf9cc[_0x309b10(0xe1)](_0x334337=>[_0x334337['dbtableConfig']?.['tableName']?.[_0x309b10(0xf3)](),_0x334337]));for(const _0x44672d of _0x4a342d['tables']){const _0x3b034b=_0x564f28['get'](_0x44672d['toLowerCase']());!_0x3b034b&&_0x3243f0[_0x309b10(0xcd)](_0x309b10(0xdf)+_0x44672d+_0x309b10(0xe7));}for(const _0x311260 of _0xa9cf68){let _0x56b979;try{_0x56b979=await getDatasetDetail(_0x311260);}catch{_0x3243f0[_0x309b10(0xcd)]('Dataset\x20\x22'+_0x311260+_0x309b10(0xe2));continue;}assertDatasetIsDbTableBacked(_0x56b979,'SQL\x20schema\x20validation');const _0x234715=Array['isArray'](_0x56b979[_0x309b10(0xf0)])?_0x56b979[_0x309b10(0xf0)]:[],_0x4fa2e6=new Set(_0x234715[_0x309b10(0xe1)](_0x59401a=>_0x59401a[_0x309b10(0xe9)]?.[_0x309b10(0xf3)]())),_0x200013=_0x56b979[_0x309b10(0xd8)]?.[_0x309b10(0xce)]||_0x56b979['tableName']||_0x311260;_0x37e88e['schema:'+_0x200013]={'code':_0x311260,'tableName':_0x200013,'fieldCount':_0x4fa2e6['size'],'fields':Array[_0x309b10(0xf9)](_0x4fa2e6)};}_0x3243f0['length']>0x0&&(_0x37e88e[_0x309b10(0xdd)]=_0x3243f0);}return{'ok':_0x4a342d[_0x309b10(0xd6)],'data':_0x37e88e,'message':_0x4a342d[_0x309b10(0xe5)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a142_0x49a54d=a142_0x1f91;(function(_0x4f0558,_0x2ead69){const _0x4c5ccf=a142_0x1f91,_0x1e713b=_0x4f0558();while(!![]){try{const _0x196173=-parseInt(_0x4c5ccf(0x180))/0x1+-parseInt(_0x4c5ccf(0x17e))/0x2*(parseInt(_0x4c5ccf(0x176))/0x3)+-parseInt(_0x4c5ccf(0x190))/0x4*(-parseInt(_0x4c5ccf(0x189))/0x5)+-parseInt(_0x4c5ccf(0x19c))/0x6+parseInt(_0x4c5ccf(0x1a6))/0x7+-parseInt(_0x4c5ccf(0x1a2))/0x8+parseInt(_0x4c5ccf(0x173))/0x9;if(_0x196173===_0x2ead69)break;else _0x1e713b['push'](_0x1e713b['shift']());}catch(_0x33578f){_0x1e713b['push'](_0x1e713b['shift']());}}}(a142_0x4e21,0xa342e));import{CliErrors}from'../../errors.js';function a142_0x4e21(){const _0x5bb0f7=['defaultApp','Target\x20environment','4727366xYpxUs','length','env','workspace.','init','\x20workspace\x20use\x20--app\x20<name>`.','validation','write','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','14621832NlIGwZ','app','apps','3334398KaWOeU','riskLevel','apiDir','\x22\x20not\x20found.','use','Invalid\x20appcode:\x20','string','\x20--app\x20','2cRTvPu','join','571637uTwxvU','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','\x20(appcode:\x20','format','str','Locale\x20for\x20this\x20workspace\x20app\x20profile','keys','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','locale','237735OBpGeP','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','initialized','isArray','flag','\x20--appcode\x20<code>`.','Switch\x20the\x20current\x20workspace\x20app\x20binding','108JjFxEJ','number','trim','Missing\x20workspace\x20app\x20selector.','workspace','defaultFormat','Initialize\x20the\x20current\x20workspace\x20app\x20binding','appcode',').\x20Config:\x20','Use\x20`','.\x20Credentials:\x20not\x20written.','Workspace\x20','3086214fHMaPX','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','project','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','\x20workspace\x20','5740520bYafRV','pageSize'];a142_0x4e21=function(){return _0x5bb0f7;};return a142_0x4e21();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{RISK_LEVEL_VALUES}from'../../constant/risk.js';import{validateAppcode}from'../../commands/common/validate.js';import{readConfigFile,readRawConfigWithLayers,resolveWriteConfigPath,writeConfigFile}from'../../context.js';const WORKSPACE_USAGE=CLI_BIN_NAME+a142_0x49a54d(0x187),SAFE_PROFILE_KEYS=['appcode',a142_0x49a54d(0x1a8),a142_0x49a54d(0x178),a142_0x49a54d(0x183),'pageSize',a142_0x49a54d(0x177),a142_0x49a54d(0x188)],workspaceFlags=[{'name':'app','type':'string','description':a142_0x49a54d(0x18a)},{'name':a142_0x49a54d(0x197),'type':a142_0x49a54d(0x17c),'description':a142_0x49a54d(0x19e)},{'name':a142_0x49a54d(0x1a8),'type':a142_0x49a54d(0x17c),'description':a142_0x49a54d(0x1a5),'enum':[...RABETBASE_ENV_VALUES]},{'name':a142_0x49a54d(0x178),'type':'string','description':a142_0x49a54d(0x171)},{'name':a142_0x49a54d(0x195),'type':a142_0x49a54d(0x17c),'description':'Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a142_0x49a54d(0x1a3),'type':a142_0x49a54d(0x191),'description':a142_0x49a54d(0x1a0)},{'name':a142_0x49a54d(0x177),'type':'string','description':a142_0x49a54d(0x19d),'enum':[...RISK_LEVEL_VALUES]},{'name':a142_0x49a54d(0x188),'type':'string','description':a142_0x49a54d(0x185)}];function isRecord(_0x1dfc1d){const _0x416e04=a142_0x49a54d;return!!_0x1dfc1d&&typeof _0x1dfc1d==='object'&&!Array[_0x416e04(0x18c)](_0x1dfc1d);}function assertValidAppcode(_0xcd704c){const _0x474845=a142_0x49a54d,{valid:_0x396564,message:_0x54edd0}=validateAppcode(_0xcd704c);if(!_0x396564)throw CliErrors[_0x474845(0x16f)](_0x474845(0x17b)+_0xcd704c,_0x54edd0);}function sanitizeProfile(_0x5dc7c1){if(!isRecord(_0x5dc7c1))return{};const _0x29ebc7={};for(const _0x2ea3a5 of SAFE_PROFILE_KEYS){if(_0x5dc7c1[_0x2ea3a5]!==undefined)_0x29ebc7[_0x2ea3a5]=_0x5dc7c1[_0x2ea3a5];}return _0x29ebc7;}function cloneProfile(_0x472600){return isRecord(_0x472600)?{..._0x472600}:{};}function collectWorkspaceProfileOverrides(_0x272fd0){const _0x5ea11f=a142_0x49a54d,_0x32cb06={},_0x39f897=_0x272fd0[_0x5ea11f(0x184)](_0x5ea11f(0x1a8)),_0x5acfb7=_0x272fd0[_0x5ea11f(0x184)](_0x5ea11f(0x178)),_0x49c23c=_0x272fd0[_0x5ea11f(0x184)]('defaultFormat'),_0x265ce1=_0x272fd0[_0x5ea11f(0x18d)](_0x5ea11f(0x1a3)),_0x3f5fb1=_0x272fd0[_0x5ea11f(0x184)](_0x5ea11f(0x177)),_0x1cdb3d=_0x272fd0[_0x5ea11f(0x184)](_0x5ea11f(0x188));if(_0x39f897)_0x32cb06[_0x5ea11f(0x1a8)]=_0x39f897;if(_0x5acfb7)_0x32cb06[_0x5ea11f(0x178)]=_0x5acfb7;if(_0x49c23c)_0x32cb06['format']=_0x49c23c;if(_0x265ce1!==undefined&&_0x265ce1!=='')_0x32cb06[_0x5ea11f(0x1a3)]=Number(_0x265ce1);if(_0x3f5fb1)_0x32cb06[_0x5ea11f(0x177)]=_0x3f5fb1;if(_0x1cdb3d)_0x32cb06[_0x5ea11f(0x188)]=_0x1cdb3d;return _0x32cb06;}function a142_0x1f91(_0x34e9a7,_0x5dd477){_0x34e9a7=_0x34e9a7-0x16e;const _0x4e2132=a142_0x4e21();let _0x1f9174=_0x4e2132[_0x34e9a7];return _0x1f9174;}async function validateWorkspaceArgs(_0x2734c6){const _0x57dbb6=a142_0x49a54d,_0x13bd2f=_0x2734c6['str'](_0x57dbb6(0x174))[_0x57dbb6(0x192)](),_0x398d27=_0x2734c6['str'](_0x57dbb6(0x197))['trim']();if(!_0x13bd2f&&!_0x398d27)throw CliErrors['validation'](_0x57dbb6(0x193),_0x57dbb6(0x199)+CLI_BIN_NAME+_0x57dbb6(0x181)+CLI_BIN_NAME+_0x57dbb6(0x16e));if(_0x398d27)assertValidAppcode(_0x398d27);}function resolveKnownApps(){const _0x4a4ac6=a142_0x49a54d,{config:_0x1bf441,layers:_0x483546}=readRawConfigWithLayers(),_0x2c48c6=isRecord(_0x1bf441[_0x4a4ac6(0x175)])?_0x1bf441[_0x4a4ac6(0x175)]:{},_0x1075a7=isRecord(_0x483546['globalConfig'][_0x4a4ac6(0x175)])?_0x483546['globalConfig'][_0x4a4ac6(0x175)]:{};return{..._0x1075a7,..._0x2c48c6};}async function configureWorkspace(_0x55a4d6,_0x52467c){const _0x25c7a7=a142_0x49a54d,_0x200612=_0x55a4d6['str'](_0x25c7a7(0x174))[_0x25c7a7(0x192)](),_0x1f0417=_0x55a4d6[_0x25c7a7(0x184)](_0x25c7a7(0x197))[_0x25c7a7(0x192)](),_0x12492d=_0x200612||_0x1f0417;if(!_0x12492d)throw CliErrors[_0x25c7a7(0x16f)](_0x25c7a7(0x193),'Use\x20`'+CLI_BIN_NAME+_0x25c7a7(0x181)+CLI_BIN_NAME+_0x25c7a7(0x16e));if(_0x1f0417)assertValidAppcode(_0x1f0417);const _0x496901=resolveWriteConfigPath(_0x25c7a7(0x19f)),_0x4f52b9=readConfigFile(_0x496901),_0x526003=resolveKnownApps(),_0x3c4007=isRecord(_0x4f52b9[_0x25c7a7(0x175)])?{..._0x4f52b9[_0x25c7a7(0x175)]}:{},_0x4a9535=cloneProfile(_0x3c4007[_0x12492d]),_0x360362=sanitizeProfile(_0x526003[_0x12492d]),_0x55aff9=_0x1f0417?{}:_0x360362,_0x18aa6e=_0x1f0417||_0x55aff9[_0x25c7a7(0x197)];if(!_0x18aa6e){const _0x24e1dc=Object[_0x25c7a7(0x186)](_0x526003),_0x208e0b=_0x24e1dc[_0x25c7a7(0x1a7)]===0x0?'Use\x20`'+CLI_BIN_NAME+_0x25c7a7(0x1a1)+_0x52467c+_0x25c7a7(0x17d)+_0x12492d+_0x25c7a7(0x18e):_0x25c7a7(0x172)+_0x24e1dc[_0x25c7a7(0x17f)](',\x20');throw CliErrors[_0x25c7a7(0x16f)]('App\x20\x22'+_0x12492d+_0x25c7a7(0x179),_0x208e0b);}assertValidAppcode(String(_0x18aa6e));const _0x11c485={..._0x55aff9,..._0x4a9535,'appcode':String(_0x18aa6e),...collectWorkspaceProfileOverrides(_0x55a4d6)};return _0x3c4007[_0x12492d]=_0x11c485,_0x4f52b9[_0x25c7a7(0x175)]=_0x3c4007,_0x4f52b9[_0x25c7a7(0x1a4)]=_0x12492d,delete _0x4f52b9[_0x25c7a7(0x197)],delete _0x4f52b9['app'],_0x11c485[_0x25c7a7(0x1a8)]&&(_0x4f52b9[_0x25c7a7(0x1a8)]=_0x11c485[_0x25c7a7(0x1a8)]),writeConfigFile(_0x496901,_0x4f52b9),{'ok':!![],'message':_0x25c7a7(0x19b)+(_0x52467c==='init'?_0x25c7a7(0x18b):'updated')+':\x20'+_0x12492d+_0x25c7a7(0x182)+_0x11c485[_0x25c7a7(0x197)]+_0x25c7a7(0x198)+_0x496901+_0x25c7a7(0x19a),'data':{'operation':_0x25c7a7(0x1a9)+_0x52467c,'configPath':_0x496901,'app':_0x12492d,'appcode':_0x11c485['appcode'],'env':_0x11c485[_0x25c7a7(0x1a8)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a142_0x49a54d(0x194),'command':a142_0x49a54d(0x1aa),'description':a142_0x49a54d(0x196),'risk':a142_0x49a54d(0x170),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x583b55=>configureWorkspace(_0x583b55,'init')},workspaceUseDefinition={'service':a142_0x49a54d(0x194),'command':a142_0x49a54d(0x17a),'description':a142_0x49a54d(0x18f),'risk':a142_0x49a54d(0x170),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x1857c8=>configureWorkspace(_0x1857c8,'use')};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition];export{WORKSPACE_USAGE};
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a143_0x3146bf=a143_0xa8a2;(function(_0x170f6d,_0x584872){const _0x2aa7b2=a143_0xa8a2,_0x57f007=_0x170f6d();while(!![]){try{const _0x3fc959=parseInt(_0x2aa7b2(0x144))/0x1+parseInt(_0x2aa7b2(0x138))/0x2*(-parseInt(_0x2aa7b2(0x11f))/0x3)+-parseInt(_0x2aa7b2(0x143))/0x4+parseInt(_0x2aa7b2(0x130))/0x5+-parseInt(_0x2aa7b2(0x121))/0x6*(parseInt(_0x2aa7b2(0x12c))/0x7)+parseInt(_0x2aa7b2(0x132))/0x8*(parseInt(_0x2aa7b2(0x13e))/0x9)+parseInt(_0x2aa7b2(0x13c))/0xa*(-parseInt(_0x2aa7b2(0x131))/0xb);if(_0x3fc959===_0x584872)break;else _0x57f007['push'](_0x57f007['shift']());}catch(_0x3c2a7b){_0x57f007['push'](_0x57f007['shift']());}}}(a143_0x45bc,0xd79bd));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=[a143_0x3146bf(0x120),'accessKey','locale',a143_0x3146bf(0x14a),a143_0x3146bf(0x124)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a143_0x3146bf(0x12b),a143_0x3146bf(0x12d),a143_0x3146bf(0x13b),a143_0x3146bf(0x14a),a143_0x3146bf(0x120),a143_0x3146bf(0x127),a143_0x3146bf(0x149)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x5b531c){const _0x11b660=a143_0x3146bf;return[..._0x5b531c][_0x11b660(0x13d)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x576a02){const _0x1b89ab=a143_0x3146bf;return TOP_LEVEL_CONFIG_KEYS[_0x1b89ab(0x139)](_0x576a02);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}function a143_0x45bc(){const _0x4db61e=['Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','string','7678695tOUgxK','598147ahlQdG','1392OkObmZ','Auth\x20cookie','apps','zh-CN','Access\x20key','toLowerCase','128906tFYnfT','has','length','locale','360pPiIsn','join','69372OHhauG','pageSize','defaultFormat','trim','API\x20directory\x20path','1069988jJtnXy','1731789PejgKm','en-US','Locale','map','Default\x20page\x20size','apiDir','format','42gaOFVs','cookie','24924TJaoPt','filter','inherit','riskLevel','number','defaultApp','accessKey','entries','app','Target\x20environment','appcode','1008gyWnBy','env'];a143_0x45bc=function(){return _0x4db61e;};return a143_0x45bc();}export function getConfigCommandKeyDescription(){return'Config\x20key\x20('+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':'env','apiDir':a143_0x3146bf(0x149),'cookie':'cookie','accessKey':a143_0x3146bf(0x127),'defaultFormat':a143_0x3146bf(0x14a),'pageSize':a143_0x3146bf(0x13f),'riskLevel':a143_0x3146bf(0x124),'locale':a143_0x3146bf(0x13b)};export function getAppProfileFlagDefs(){const _0x47f79c=a143_0x3146bf;return[{'name':_0x47f79c(0x12d),'type':_0x47f79c(0x12f),'description':_0x47f79c(0x12a),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x47f79c(0x149),'type':_0x47f79c(0x12f),'description':_0x47f79c(0x142)},{'name':_0x47f79c(0x120),'type':_0x47f79c(0x12f),'description':_0x47f79c(0x133),'hidden':!![]},{'name':_0x47f79c(0x127),'type':_0x47f79c(0x12f),'description':_0x47f79c(0x136),'hidden':!![]},{'name':_0x47f79c(0x140),'type':_0x47f79c(0x12f),'description':_0x47f79c(0x12e),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':_0x47f79c(0x125),'description':_0x47f79c(0x148)},{'name':'riskLevel','type':_0x47f79c(0x12f),'description':'Risk\x20level','enum':[...RISK_LEVEL_VALUES]},{'name':_0x47f79c(0x13b),'type':_0x47f79c(0x12f),'description':_0x47f79c(0x146)}];}export function collectAppProfileOverrides(_0x7443e){const _0x37c978=a143_0x3146bf,_0x3b8522={};for(const [_0x1d21b9,_0x5afb54]of Object[_0x37c978(0x128)](APP_PROFILE_FLAG_KEY_MAP)){const _0x28c118=_0x7443e(_0x1d21b9);if(!_0x28c118)continue;_0x3b8522[_0x5afb54]=_0x5afb54==='pageSize'?Number(_0x28c118):_0x28c118;}return _0x3b8522;}export function buildAppProfileListFields(_0x201d6c){const _0x3de585=a143_0x3146bf;return{'env':_0x201d6c[_0x3de585(0x12d)]??null,'apiDir':_0x201d6c[_0x3de585(0x149)]??null,'hasCookie':!!_0x201d6c[_0x3de585(0x120)],'hasAccessKey':!!_0x201d6c[_0x3de585(0x127)],'format':_0x201d6c[_0x3de585(0x14a)]??null,'pageSize':_0x201d6c[_0x3de585(0x13f)]??null,'riskLevel':_0x201d6c[_0x3de585(0x124)]??null,'locale':_0x201d6c[_0x3de585(0x13b)]??null};}export function buildAppDoctorFields(_0x3758eb,_0x5717a3){const _0x46fb24=a143_0x3146bf;return{'env':{'value':_0x3758eb[_0x46fb24(0x12d)]||_0x5717a3['env'],'source':_0x3758eb[_0x46fb24(0x12d)]?_0x46fb24(0x129):_0x46fb24(0x123)},'apiDir':{'value':_0x3758eb['apiDir']||_0x5717a3[_0x46fb24(0x149)],'source':_0x3758eb[_0x46fb24(0x149)]?_0x46fb24(0x129):_0x46fb24(0x123)},'cookie':{'value':_0x3758eb['cookie']||_0x5717a3[_0x46fb24(0x120)],'source':_0x3758eb[_0x46fb24(0x120)]?_0x46fb24(0x129):_0x46fb24(0x123)},'accessKey':{'value':_0x3758eb[_0x46fb24(0x127)]||_0x5717a3['accessKey'],'source':_0x3758eb['accessKey']?_0x46fb24(0x129):'inherit'}};}export function buildCanonicalAppConfig(_0x243570,_0x156f0d){const _0x17ac18=a143_0x3146bf,_0x416289=_0x243570[_0x17ac18(0x147)](_0x2983a4=>String(_0x2983a4||'')[_0x17ac18(0x141)]())[_0x17ac18(0x122)](Boolean);if(_0x416289[_0x17ac18(0x13a)]===0x0)return{};const _0x24e9cd={};for(const _0x174b83 of _0x416289){_0x24e9cd[_0x174b83]=_0x156f0d?{'appcode':_0x174b83,'env':_0x156f0d}:{'appcode':_0x174b83};}return{'apps':_0x24e9cd,'defaultApp':_0x416289[0x0]};}function a143_0xa8a2(_0x189f09,_0x5cb1f0){_0x189f09=_0x189f09-0x11f;const _0x45bc9a=a143_0x45bc();let _0xa8a23f=_0x45bc9a[_0x189f09];return _0xa8a23f;}export function buildCanonicalProjectConfig(_0x189ce5,_0x393168){const _0x8f8fdf=a143_0x3146bf,{appCodes:appCodes=[],env:_0x535372,metadata:_0x4b6771}=_0x393168,_0x2dd1bc={..._0x189ce5,..._0x4b6771||{}};delete _0x2dd1bc[_0x8f8fdf(0x12b)],delete _0x2dd1bc[_0x8f8fdf(0x129)];if(_0x535372)_0x2dd1bc['env']=_0x535372;else!_0x2dd1bc['env']&&(_0x2dd1bc['env']=DEFAULT_CONFIG_VALUES[_0x8f8fdf(0x12d)]);const _0x3d1792=buildCanonicalAppConfig(appCodes,_0x2dd1bc[_0x8f8fdf(0x12d)]);return Object['keys'](_0x3d1792)[_0x8f8fdf(0x13a)]>0x0&&(_0x2dd1bc['apps']=_0x3d1792[_0x8f8fdf(0x134)],_0x2dd1bc[_0x8f8fdf(0x126)]=_0x3d1792['defaultApp']),_0x2dd1bc;}const LOCALE_MAP={'zh':a143_0x3146bf(0x135),'zh-cn':a143_0x3146bf(0x135),'zh_cn':a143_0x3146bf(0x135),'en':'en-US','en-us':a143_0x3146bf(0x145),'en_us':a143_0x3146bf(0x145)};export function normalizeLocale(_0x4a4e30){const _0x4f0145=a143_0x3146bf;if(!_0x4a4e30)return null;return LOCALE_MAP[_0x4a4e30[_0x4f0145(0x137)]()]??null;}
|
package/lib/constant/cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a144_0x7f56(){const _0x2a8205=['806650LbriFw','20245024KgKEcB','2158196FsFgQv','1335190gsPqqR','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','175UPyklw','483254OkTvGq','1847496pEPNzv','91404HiYnFC'];a144_0x7f56=function(){return _0x2a8205;};return a144_0x7f56();}const a144_0x3656fa=a144_0x4872;function a144_0x4872(_0x32da5e,_0x4a81e2){_0x32da5e=_0x32da5e-0x11b;const _0x7f56c0=a144_0x7f56();let _0x4872a7=_0x7f56c0[_0x32da5e];return _0x4872a7;}(function(_0x11f255,_0x417307){const _0x63287f=a144_0x4872,_0x5937d0=_0x11f255();while(!![]){try{const _0x5e8902=-parseInt(_0x63287f(0x11b))/0x1+parseInt(_0x63287f(0x121))/0x2+-parseInt(_0x63287f(0x122))/0x3+-parseInt(_0x63287f(0x11d))/0x4+parseInt(_0x63287f(0x11e))/0x5+parseInt(_0x63287f(0x123))/0x6*(-parseInt(_0x63287f(0x120))/0x7)+parseInt(_0x63287f(0x11c))/0x8;if(_0x5e8902===_0x417307)break;else _0x5937d0['push'](_0x5937d0['shift']());}catch(_0x2eda62){_0x5937d0['push'](_0x5937d0['shift']());}}}(a144_0x7f56,0xaa05c));export const CLI_VERSION_POLICY_URL=a144_0x3656fa(0x11f);
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a145_0x4f98d5=a145_0x2c25;function a145_0x2c25(_0x44a262,_0x9b07d0){_0x44a262=_0x44a262-0x7b;const _0x418531=a145_0x4185();let _0x2c2530=_0x418531[_0x44a262];return _0x2c2530;}function a145_0x4185(){const _0x2bf569=['SQL\x20name','map','file','Force\x20non-interactive\x20mode\x20(CI)','app','format','from-env','key','keyword','skip-imports','<expr>','fromEntries','stdin','code','Verbose\x20output','dry-run','Environment','DB\x20ID','Force\x20overwrite','enableBffSave','env','meowKey','File\x20path','title','reveal','clear','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','503420jpimzs','string','remote','operation','SQL\x20string','function-node','global','Page\x20number','target','Output\x20format','tags','force','SQL\x20code','params','dbid','datasetcode','enable-bff-save','Operation\x20type','1548239EnvPiq','Select\x20app\x20profile\x20by\x20name','description','Read\x20value\x20from\x20environment\x20variable','JSON\x20params','Show\x20help','pagesize','117GbWYvy','page','Use\x20remote','675303WGMvRZ','Description\x20file','Description','output','Watch\x20mode','operationType','value','Apply\x20to\x20all','help','functionNode','Dataset\x20code','Function\x20node','nonInteractive','project','Read\x20value\x20from\x20stdin','Code\x20filter','20NApKot','Output\x20path','description-file','watch','Target\x20path','Config\x20value','schemas','operation-type','Use\x20global\x20config\x20scope','name','production\x20|\x20daily','sql-name','Preview\x20operation\x20without\x20executing','927822yuCOOc','Config\x20key','sqlcode','verbose','1YzXeLQ','boolean','Enable\x20BFF\x20save','type','confirm','sql','Override\x20appcode','14072JRWVEI','12cjrjaG','Clear','378LGKRaB','12mXigUc','db-id','appcode','1030178KVRjuU','fromEnv','all','9427132MgolKQ','dbId','expected-count','yes','<name>','Skip\x20import\x20generation','Alias\x20for\x20--non-interactive','sqlname'];a145_0x4185=function(){return _0x2bf569;};return a145_0x4185();}(function(_0x2e6e6b,_0x53358f){const _0x380388=a145_0x2c25,_0x36d9a9=_0x2e6e6b();while(!![]){try{const _0x377cbd=-parseInt(_0x380388(0xa5))/0x1*(-parseInt(_0x380388(0xb3))/0x2)+parseInt(_0x380388(0x84))/0x3*(-parseInt(_0x380388(0xb0))/0x4)+parseInt(_0x380388(0x94))/0x5*(-parseInt(_0x380388(0xa1))/0x6)+parseInt(_0x380388(0xaf))/0x7*(-parseInt(_0x380388(0xac))/0x8)+parseInt(_0x380388(0x81))/0x9*(parseInt(_0x380388(0xd9))/0xa)+-parseInt(_0x380388(0xeb))/0xb+-parseInt(_0x380388(0xad))/0xc*(-parseInt(_0x380388(0xb6))/0xd);if(_0x377cbd===_0x53358f)break;else _0x36d9a9['push'](_0x36d9a9['shift']());}catch(_0x54731e){_0x36d9a9['push'](_0x36d9a9['shift']());}}}(a145_0x4185,0x59239));export const CLI_BIN_NAME='rabetbase';export const CLI_DISPLAY_NAME='Rabetbase\x20CLI';export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';export const GLOBAL_FLAGS=[{'name':a145_0x4f98d5(0xb2),'meowKey':a145_0x4f98d5(0xb2),'type':'string','description':a145_0x4f98d5(0xab),'hint':'<code>'},{'name':a145_0x4f98d5(0xc2),'meowKey':a145_0x4f98d5(0xc2),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0x7b),'hint':a145_0x4f98d5(0xba)},{'name':a145_0x4f98d5(0xd2),'meowKey':a145_0x4f98d5(0xd2),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xce),'hint':a145_0x4f98d5(0x9e)},{'name':a145_0x4f98d5(0xc3),'meowKey':a145_0x4f98d5(0xc3),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xe2),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xd8),'hint':a145_0x4f98d5(0xc8)},{'name':'dry-run','meowKey':'dryRun','type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0xa0)},{'name':a145_0x4f98d5(0xb9),'meowKey':a145_0x4f98d5(0xb9),'type':a145_0x4f98d5(0xa6),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':'non-interactive','meowKey':a145_0x4f98d5(0x90),'type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0xc1)},{'name':'global','meowKey':a145_0x4f98d5(0xdf),'type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0x9c)},{'name':'project','meowKey':a145_0x4f98d5(0x91),'type':a145_0x4f98d5(0xa6),'description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0xbc),'hidden':!![]},{'name':a145_0x4f98d5(0x8c),'meowKey':a145_0x4f98d5(0x8c),'type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0x7f)},{'name':a145_0x4f98d5(0x9d),'meowKey':a145_0x4f98d5(0x9d),'type':'string','description':'Name','hidden':!![]},{'name':'title','meowKey':a145_0x4f98d5(0xd5),'type':a145_0x4f98d5(0xda),'description':'Title','hidden':!![]},{'name':a145_0x4f98d5(0xd7),'meowKey':a145_0x4f98d5(0xd7),'type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0xae),'hidden':!![]},{'name':a145_0x4f98d5(0x97),'meowKey':a145_0x4f98d5(0x97),'type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0x88),'hidden':!![]},{'name':a145_0x4f98d5(0x87),'meowKey':a145_0x4f98d5(0x87),'type':'string','description':a145_0x4f98d5(0x95),'hidden':!![]},{'name':a145_0x4f98d5(0xe6),'meowKey':a145_0x4f98d5(0xe6),'type':'string','description':a145_0x4f98d5(0x7e),'hidden':!![]},{'name':a145_0x4f98d5(0xe8),'meowKey':a145_0x4f98d5(0xe8),'type':'string','description':a145_0x4f98d5(0x8e),'hidden':!![]},{'name':a145_0x4f98d5(0xb5),'meowKey':a145_0x4f98d5(0xb5),'type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0x8b),'hidden':!![]},{'name':a145_0x4f98d5(0xe9),'meowKey':a145_0x4f98d5(0xd1),'type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0xa7),'hidden':!![]},{'name':'id','meowKey':'id','type':a145_0x4f98d5(0xda),'description':'Record\x20ID','hidden':!![]},{'name':a145_0x4f98d5(0xa8),'meowKey':a145_0x4f98d5(0xa8),'type':'string','description':'Type\x20filter','hidden':!![]},{'name':a145_0x4f98d5(0xc0),'meowKey':'file','type':'string','description':a145_0x4f98d5(0xd4),'hidden':!![]},{'name':a145_0x4f98d5(0xa3),'meowKey':a145_0x4f98d5(0xa3),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xe5),'hidden':!![]},{'name':a145_0x4f98d5(0x9f),'meowKey':'sqlName','type':a145_0x4f98d5(0xda),'description':'SQL\x20name','hidden':!![]},{'name':a145_0x4f98d5(0xbd),'meowKey':a145_0x4f98d5(0xbd),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xbe),'hidden':!![]},{'name':a145_0x4f98d5(0xb1),'meowKey':a145_0x4f98d5(0xb7),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xcf),'hidden':!![]},{'name':a145_0x4f98d5(0xe7),'meowKey':'dbid','type':a145_0x4f98d5(0xda),'description':'DB\x20ID','hidden':!![]},{'name':a145_0x4f98d5(0x7c),'meowKey':'description','type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0x86),'hidden':!![]},{'name':a145_0x4f98d5(0x96),'meowKey':'descriptionFile','type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0x85),'hidden':!![]},{'name':a145_0x4f98d5(0x82),'meowKey':'page','type':'string','description':a145_0x4f98d5(0xe0),'hidden':!![]},{'name':a145_0x4f98d5(0x80),'meowKey':a145_0x4f98d5(0x80),'type':a145_0x4f98d5(0xda),'description':'Page\x20size','hidden':!![]},{'name':a145_0x4f98d5(0xc6),'meowKey':'keyword','type':a145_0x4f98d5(0xda),'description':'Keyword\x20filter','hidden':!![]},{'name':a145_0x4f98d5(0xcb),'meowKey':a145_0x4f98d5(0xcb),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0x93),'hidden':!![]},{'name':a145_0x4f98d5(0xaa),'meowKey':a145_0x4f98d5(0xaa),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xdd),'hidden':!![]},{'name':a145_0x4f98d5(0x9a),'meowKey':a145_0x4f98d5(0x9a),'type':a145_0x4f98d5(0xda),'description':'Schemas','hidden':!![]},{'name':'operation','meowKey':a145_0x4f98d5(0xdc),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xea),'hidden':!![]},{'name':'target','meowKey':a145_0x4f98d5(0xe1),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0x98),'hidden':!![]},{'name':a145_0x4f98d5(0xc7),'meowKey':'skipImports','type':'boolean','description':a145_0x4f98d5(0xbb),'hidden':!![]},{'name':a145_0x4f98d5(0xc5),'meowKey':a145_0x4f98d5(0xc5),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xa2),'hidden':!![]},{'name':'value','meowKey':a145_0x4f98d5(0x8a),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0x99),'hidden':!![]},{'name':a145_0x4f98d5(0xe3),'meowKey':'tags','type':a145_0x4f98d5(0xda),'description':'Tags','hidden':!![]},{'name':a145_0x4f98d5(0xca),'meowKey':'stdin','type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0x92),'hidden':!![]},{'name':a145_0x4f98d5(0xc4),'meowKey':a145_0x4f98d5(0xb4),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0x7d),'hidden':!![]},{'name':a145_0x4f98d5(0xd6),'meowKey':a145_0x4f98d5(0xd6),'type':'boolean','description':'Reveal\x20sensitive\x20value','hidden':!![]},{'name':a145_0x4f98d5(0xe4),'meowKey':a145_0x4f98d5(0xe4),'type':'boolean','description':a145_0x4f98d5(0xd0),'hidden':!![]},{'name':a145_0x4f98d5(0xa9),'meowKey':'confirm','type':a145_0x4f98d5(0xa6),'description':'Confirm\x20destructive\x20action','hidden':!![]},{'name':a145_0x4f98d5(0xdb),'meowKey':a145_0x4f98d5(0xdb),'type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0x83),'hidden':!![]},{'name':a145_0x4f98d5(0xa4),'meowKey':a145_0x4f98d5(0xa4),'type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0xcc),'hidden':!![]},{'name':a145_0x4f98d5(0xb8),'meowKey':'expectedCount','type':a145_0x4f98d5(0xda),'description':'Expected\x20affected\x20count','hidden':!![]},{'name':a145_0x4f98d5(0x9b),'meowKey':a145_0x4f98d5(0x89),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xea),'hidden':!![]},{'name':a145_0x4f98d5(0xde),'meowKey':a145_0x4f98d5(0x8d),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0x8f),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a145_0x4f98d5(0xb2),a145_0x4f98d5(0xc2),a145_0x4f98d5(0xd2),a145_0x4f98d5(0xc3),'jq',a145_0x4f98d5(0xcd),a145_0x4f98d5(0xb9),'non-interactive','ci']);export function buildMeowFlags(){const _0x5eccea=a145_0x4f98d5;return Object[_0x5eccea(0xc9)](GLOBAL_FLAGS[_0x5eccea(0xbf)](_0x2aabf7=>[_0x2aabf7[_0x5eccea(0xd3)],{'type':_0x2aabf7[_0x5eccea(0xa8)]}]));}
|
|
1
|
+
const a145_0x397acb=a145_0x5b29;(function(_0x418047,_0x55b07e){const _0x2219a4=a145_0x5b29,_0x3f0354=_0x418047();while(!![]){try{const _0x1bfa00=-parseInt(_0x2219a4(0x163))/0x1+parseInt(_0x2219a4(0x149))/0x2+parseInt(_0x2219a4(0x13b))/0x3+parseInt(_0x2219a4(0x16b))/0x4*(parseInt(_0x2219a4(0x14c))/0x5)+parseInt(_0x2219a4(0x143))/0x6*(parseInt(_0x2219a4(0x12a))/0x7)+-parseInt(_0x2219a4(0x141))/0x8+-parseInt(_0x2219a4(0x119))/0x9*(parseInt(_0x2219a4(0x161))/0xa);if(_0x1bfa00===_0x55b07e)break;else _0x3f0354['push'](_0x3f0354['shift']());}catch(_0x22bcb0){_0x3f0354['push'](_0x3f0354['shift']());}}}(a145_0x1d2d,0x2bba6));function a145_0x1d2d(){const _0x233b0e=['136lUnYIp','type','Read\x20value\x20from\x20stdin','Function\x20node','code','all','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','env','sql-name','SQL\x20string','project','skip-imports','watch','<expr>','Override\x20appcode','Alias\x20for\x20--non-interactive','dry-run','Watch\x20mode','Target\x20path','Skip\x20confirmation\x20for\x20high-risk\x20writes','SQL\x20code','enableBffSave','expectedCount','dbid','JSON\x20params','from-env','yes','sqlcode','operationType','DB\x20ID','Expected\x20affected\x20count','skipImports','153HTmvOC','keyword','clear','descriptionFile','Tags','Schemas','stdin','key','Keyword\x20filter','Show\x20help','Use\x20global\x20config\x20scope','Clear','sql','Type\x20filter','Config\x20key','non-interactive','app','15988LzOPpX','appcode','Use\x20remote','Operation\x20type','Select\x20app\x20profile\x20by\x20name','value','title','Read\x20value\x20from\x20environment\x20variable','SQL\x20name','functionNode','expected-count','Force\x20overwrite','name','file','File\x20path','string','Apply\x20to\x20all','426702aMKcwy','Skip\x20import\x20generation','nonInteractive','schemas','help','operation','392664IskBcf','enable-bff-save','366JBfIgq','Config\x20value','global','Verbose\x20output','datasetcode','Preview\x20operation\x20without\x20executing','58026ZoaRsN','format','sqlname','7005YtLKKf','Rabetbase\x20CLI','Description\x20file','tags','verbose','description-file','pagesize','description','Enable\x20BFF\x20save','dryRun','dbId','Page\x20number','boolean','output','Force\x20non-interactive\x20mode\x20(CI)','page','Record\x20ID','params','Code\x20filter','Output\x20path','Confirm\x20destructive\x20action','69310Nwazle','<name>','12185WzDlGy','sqlName','reveal','db-id','target','Reveal\x20sensitive\x20value','force','Dataset\x20code'];a145_0x1d2d=function(){return _0x233b0e;};return a145_0x1d2d();}export const CLI_BIN_NAME='rabetbase';export const CLI_DISPLAY_NAME=a145_0x397acb(0x14d);export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';export const GLOBAL_FLAGS=[{'name':a145_0x397acb(0x12b),'meowKey':'appcode','type':a145_0x397acb(0x139),'description':a145_0x397acb(0x179),'hint':'<code>'},{'name':a145_0x397acb(0x129),'meowKey':a145_0x397acb(0x129),'type':a145_0x397acb(0x139),'description':a145_0x397acb(0x12e),'hint':a145_0x397acb(0x162)},{'name':a145_0x397acb(0x172),'meowKey':a145_0x397acb(0x172),'type':a145_0x397acb(0x139),'description':'Environment','hint':'production\x20|\x20daily'},{'name':a145_0x397acb(0x14a),'meowKey':a145_0x397acb(0x14a),'type':a145_0x397acb(0x139),'description':'Output\x20format','hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a145_0x397acb(0x139),'description':a145_0x397acb(0x171),'hint':a145_0x397acb(0x178)},{'name':a145_0x397acb(0x17b),'meowKey':a145_0x397acb(0x155),'type':a145_0x397acb(0x158),'description':a145_0x397acb(0x148)},{'name':a145_0x397acb(0x113),'meowKey':'yes','type':'boolean','description':a145_0x397acb(0x17e)},{'name':a145_0x397acb(0x128),'meowKey':a145_0x397acb(0x13d),'type':a145_0x397acb(0x158),'description':a145_0x397acb(0x15a)},{'name':'global','meowKey':a145_0x397acb(0x145),'type':a145_0x397acb(0x158),'description':a145_0x397acb(0x123)},{'name':a145_0x397acb(0x175),'meowKey':a145_0x397acb(0x175),'type':'boolean','description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a145_0x397acb(0x158),'description':a145_0x397acb(0x17a),'hidden':!![]},{'name':a145_0x397acb(0x13f),'meowKey':a145_0x397acb(0x13f),'type':'boolean','description':a145_0x397acb(0x122)},{'name':a145_0x397acb(0x136),'meowKey':a145_0x397acb(0x136),'type':a145_0x397acb(0x139),'description':'Name','hidden':!![]},{'name':a145_0x397acb(0x130),'meowKey':a145_0x397acb(0x130),'type':a145_0x397acb(0x139),'description':'Title','hidden':!![]},{'name':a145_0x397acb(0x11b),'meowKey':a145_0x397acb(0x11b),'type':a145_0x397acb(0x158),'description':a145_0x397acb(0x124),'hidden':!![]},{'name':a145_0x397acb(0x177),'meowKey':a145_0x397acb(0x177),'type':a145_0x397acb(0x158),'description':a145_0x397acb(0x17c),'hidden':!![]},{'name':a145_0x397acb(0x159),'meowKey':a145_0x397acb(0x159),'type':a145_0x397acb(0x139),'description':a145_0x397acb(0x15f),'hidden':!![]},{'name':a145_0x397acb(0x15d),'meowKey':'params','type':a145_0x397acb(0x139),'description':a145_0x397acb(0x111),'hidden':!![]},{'name':a145_0x397acb(0x147),'meowKey':a145_0x397acb(0x147),'type':a145_0x397acb(0x139),'description':a145_0x397acb(0x16a),'hidden':!![]},{'name':a145_0x397acb(0x170),'meowKey':'all','type':'boolean','description':a145_0x397acb(0x13a),'hidden':!![]},{'name':a145_0x397acb(0x142),'meowKey':a145_0x397acb(0x180),'type':a145_0x397acb(0x158),'description':a145_0x397acb(0x154),'hidden':!![]},{'name':'id','meowKey':'id','type':a145_0x397acb(0x139),'description':a145_0x397acb(0x15c),'hidden':!![]},{'name':a145_0x397acb(0x16c),'meowKey':a145_0x397acb(0x16c),'type':'string','description':a145_0x397acb(0x126),'hidden':!![]},{'name':'file','meowKey':a145_0x397acb(0x137),'type':a145_0x397acb(0x139),'description':a145_0x397acb(0x138),'hidden':!![]},{'name':a145_0x397acb(0x114),'meowKey':'sqlcode','type':a145_0x397acb(0x139),'description':a145_0x397acb(0x17f),'hidden':!![]},{'name':a145_0x397acb(0x173),'meowKey':a145_0x397acb(0x164),'type':'string','description':a145_0x397acb(0x132),'hidden':!![]},{'name':a145_0x397acb(0x14b),'meowKey':a145_0x397acb(0x14b),'type':'string','description':a145_0x397acb(0x132),'hidden':!![]},{'name':a145_0x397acb(0x166),'meowKey':a145_0x397acb(0x156),'type':'string','description':a145_0x397acb(0x116),'hidden':!![]},{'name':a145_0x397acb(0x182),'meowKey':a145_0x397acb(0x182),'type':a145_0x397acb(0x139),'description':a145_0x397acb(0x116),'hidden':!![]},{'name':'description','meowKey':a145_0x397acb(0x153),'type':'string','description':'Description','hidden':!![]},{'name':a145_0x397acb(0x151),'meowKey':a145_0x397acb(0x11c),'type':a145_0x397acb(0x139),'description':a145_0x397acb(0x14e),'hidden':!![]},{'name':a145_0x397acb(0x15b),'meowKey':a145_0x397acb(0x15b),'type':a145_0x397acb(0x139),'description':a145_0x397acb(0x157),'hidden':!![]},{'name':a145_0x397acb(0x152),'meowKey':a145_0x397acb(0x152),'type':a145_0x397acb(0x139),'description':'Page\x20size','hidden':!![]},{'name':a145_0x397acb(0x11a),'meowKey':a145_0x397acb(0x11a),'type':a145_0x397acb(0x139),'description':a145_0x397acb(0x121),'hidden':!![]},{'name':a145_0x397acb(0x16f),'meowKey':a145_0x397acb(0x16f),'type':'string','description':a145_0x397acb(0x15e),'hidden':!![]},{'name':a145_0x397acb(0x125),'meowKey':'sql','type':'string','description':a145_0x397acb(0x174),'hidden':!![]},{'name':a145_0x397acb(0x13e),'meowKey':'schemas','type':a145_0x397acb(0x139),'description':a145_0x397acb(0x11e),'hidden':!![]},{'name':a145_0x397acb(0x140),'meowKey':a145_0x397acb(0x140),'type':a145_0x397acb(0x139),'description':a145_0x397acb(0x12d),'hidden':!![]},{'name':a145_0x397acb(0x167),'meowKey':'target','type':a145_0x397acb(0x139),'description':a145_0x397acb(0x17d),'hidden':!![]},{'name':a145_0x397acb(0x176),'meowKey':a145_0x397acb(0x118),'type':a145_0x397acb(0x158),'description':a145_0x397acb(0x13c),'hidden':!![]},{'name':a145_0x397acb(0x120),'meowKey':a145_0x397acb(0x120),'type':a145_0x397acb(0x139),'description':a145_0x397acb(0x127),'hidden':!![]},{'name':a145_0x397acb(0x12f),'meowKey':a145_0x397acb(0x12f),'type':a145_0x397acb(0x139),'description':a145_0x397acb(0x144),'hidden':!![]},{'name':a145_0x397acb(0x14f),'meowKey':a145_0x397acb(0x14f),'type':a145_0x397acb(0x139),'description':a145_0x397acb(0x11d),'hidden':!![]},{'name':'stdin','meowKey':a145_0x397acb(0x11f),'type':'boolean','description':a145_0x397acb(0x16d),'hidden':!![]},{'name':a145_0x397acb(0x112),'meowKey':'fromEnv','type':'string','description':a145_0x397acb(0x131),'hidden':!![]},{'name':a145_0x397acb(0x165),'meowKey':a145_0x397acb(0x165),'type':a145_0x397acb(0x158),'description':a145_0x397acb(0x168),'hidden':!![]},{'name':a145_0x397acb(0x169),'meowKey':a145_0x397acb(0x169),'type':'boolean','description':a145_0x397acb(0x135),'hidden':!![]},{'name':'confirm','meowKey':'confirm','type':a145_0x397acb(0x158),'description':a145_0x397acb(0x160),'hidden':!![]},{'name':'remote','meowKey':'remote','type':'boolean','description':a145_0x397acb(0x12c),'hidden':!![]},{'name':a145_0x397acb(0x150),'meowKey':a145_0x397acb(0x150),'type':'boolean','description':a145_0x397acb(0x146),'hidden':!![]},{'name':a145_0x397acb(0x134),'meowKey':a145_0x397acb(0x181),'type':'string','description':a145_0x397acb(0x117),'hidden':!![]},{'name':'operation-type','meowKey':a145_0x397acb(0x115),'type':a145_0x397acb(0x139),'description':a145_0x397acb(0x12d),'hidden':!![]},{'name':'function-node','meowKey':a145_0x397acb(0x133),'type':a145_0x397acb(0x139),'description':a145_0x397acb(0x16e),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a145_0x397acb(0x12b),'app','env',a145_0x397acb(0x14a),'jq',a145_0x397acb(0x17b),a145_0x397acb(0x113),a145_0x397acb(0x128),'ci']);function a145_0x5b29(_0x3d5e5c,_0x39ff48){_0x3d5e5c=_0x3d5e5c-0x111;const _0x1d2d12=a145_0x1d2d();let _0x5b297e=_0x1d2d12[_0x3d5e5c];return _0x5b297e;}export function buildMeowFlags(){const _0x14f8b8=a145_0x397acb;return Object['fromEntries'](GLOBAL_FLAGS['map'](_0x386c59=>[_0x386c59['meowKey'],{'type':_0x386c59[_0x14f8b8(0x16c)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a146_0x1f34(_0xc27eaf,_0x33eef7){_0xc27eaf=_0xc27eaf-0x16f;const _0x194df2=a146_0x194d();let _0x1f3416=_0x194df2[_0xc27eaf];return _0x1f3416;}const a146_0x589836=a146_0x1f34;(function(_0x22b800,_0x1cf22f){const _0x3a2fed=a146_0x1f34,_0x5ef436=_0x22b800();while(!![]){try{const _0x442d46=-parseInt(_0x3a2fed(0x175))/0x1+parseInt(_0x3a2fed(0x16f))/0x2+-parseInt(_0x3a2fed(0x173))/0x3*(-parseInt(_0x3a2fed(0x178))/0x4)+-parseInt(_0x3a2fed(0x172))/0x5*(parseInt(_0x3a2fed(0x170))/0x6)+-parseInt(_0x3a2fed(0x171))/0x7*(-parseInt(_0x3a2fed(0x17b))/0x8)+-parseInt(_0x3a2fed(0x176))/0x9+parseInt(_0x3a2fed(0x174))/0xa;if(_0x442d46===_0x1cf22f)break;else _0x5ef436['push'](_0x5ef436['shift']());}catch(_0x2fdc9e){_0x5ef436['push'](_0x5ef436['shift']());}}}(a146_0x194d,0x39ddf));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a146_0x589836(0x177),'format':a146_0x589836(0x179),'locale':a146_0x589836(0x17a),'riskLevel':'high-risk-write','apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a146_0x589836(0x179);function a146_0x194d(){const _0xcf29e7=['1055439usrcgN','production','8ZalSkU','compress','en-US','8UvVfgf','235182MvMPFS','12MkMEAH','35595FjQQIx','4755FXOlcy','319602CsxXvJ','3039570KGzDzX','283505cuuHWW'];a146_0x194d=function(){return _0xcf29e7;};return a146_0x194d();}
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0x43a527=a147_0x1348;(function(_0xf588ee,_0x1a42c9){const _0x2835c2=a147_0x1348,_0xc42af0=_0xf588ee();while(!![]){try{const _0x38f993=parseInt(_0x2835c2(0x14a))/0x1+parseInt(_0x2835c2(0x138))/0x2*(parseInt(_0x2835c2(0x14b))/0x3)+parseInt(_0x2835c2(0x145))/0x4*(parseInt(_0x2835c2(0x14e))/0x5)+-parseInt(_0x2835c2(0x141))/0x6*(parseInt(_0x2835c2(0x147))/0x7)+-parseInt(_0x2835c2(0x143))/0x8*(-parseInt(_0x2835c2(0x13c))/0x9)+parseInt(_0x2835c2(0x142))/0xa+-parseInt(_0x2835c2(0x13a))/0xb*(parseInt(_0x2835c2(0x139))/0xc);if(_0x38f993===_0x1a42c9)break;else _0xc42af0['push'](_0xc42af0['shift']());}catch(_0x3db841){_0xc42af0['push'](_0xc42af0['shift']());}}}(a147_0x4311,0xde4d0));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x29ab65){const _0x4ccaff=a147_0x1348;customApiDomain=_0x29ab65?.[_0x4ccaff(0x13f)],customUserDomain=_0x29ab65?.[_0x4ccaff(0x149)],customRuntimeDomain=_0x29ab65?.[_0x4ccaff(0x144)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a147_0x43a527(0x13d):'https://user-daily.lovrabet.com');export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a147_0x43a527(0x148):a147_0x43a527(0x146));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a147_0x43a527(0x140):a147_0x43a527(0x14c));function a147_0x4311(){const _0xb50665=['309702OgMOCt','987297SLkxAO','https://daily-runtime.lovrabet.com','/web-app/app/','10QYahzF','10roDnRr','180gJvLVF','1297098tgVsGg','https://daily.lovrabet.com','2962107xgTiXC','https://user.lovrabet.com','trim','apiDomain','https://runtime.lovrabet.com','8082IsdAKd','5840830EAACVy','8KMfmXz','runtimeDomain','637460CukbbU','https://daily-api.lovrabet.com','2639hJlOLE','https://api.lovrabet.com','userDomain'];a147_0x4311=function(){return _0xb50665;};return a147_0x4311();}export const getAppDomain=()=>isProduction(getEnv())?'https://app.lovrabet.com':a147_0x43a527(0x13b);function a147_0x1348(_0x4e0de2,_0x45eded){_0x4e0de2=_0x4e0de2-0x138;const _0x4311f6=a147_0x4311();let _0x134802=_0x4311f6[_0x4e0de2];return _0x134802;}export const getAppBaseUrl=_0xfb25b2=>{const _0x548f43=a147_0x43a527,_0xc81d0e=encodeURIComponent(_0xfb25b2[_0x548f43(0x13e)]());return isProduction(getEnv())?getAppDomain()+'/app/'+_0xc81d0e:getAppDomain()+_0x548f43(0x14d)+_0xc81d0e;};
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a148_0x1f7d(_0xf2a07c,_0x97b6a){_0xf2a07c=_0xf2a07c-0x145;const _0x116ab2=a148_0x116a();let _0x1f7d8b=_0x116ab2[_0xf2a07c];return _0x1f7d8b;}const a148_0x1b7a1a=a148_0x1f7d;(function(_0xadbd14,_0xc2d73){const _0x2a9e41=a148_0x1f7d,_0x16f56e=_0xadbd14();while(!![]){try{const _0x201132=-parseInt(_0x2a9e41(0x147))/0x1*(parseInt(_0x2a9e41(0x154))/0x2)+parseInt(_0x2a9e41(0x145))/0x3*(parseInt(_0x2a9e41(0x148))/0x4)+parseInt(_0x2a9e41(0x14e))/0x5+parseInt(_0x2a9e41(0x14f))/0x6*(-parseInt(_0x2a9e41(0x151))/0x7)+parseInt(_0x2a9e41(0x14b))/0x8+parseInt(_0x2a9e41(0x152))/0x9*(parseInt(_0x2a9e41(0x149))/0xa)+-parseInt(_0x2a9e41(0x150))/0xb;if(_0x201132===_0xc2d73)break;else _0x16f56e['push'](_0x16f56e['shift']());}catch(_0x3626f3){_0x16f56e['push'](_0x16f56e['shift']());}}}(a148_0x116a,0x56245));export const RABETBASE_ENV_VALUES=[a148_0x1b7a1a(0x146),'daily'];export function normalizeEnv(_0x58e13c){const _0x1bc1d8=a148_0x1b7a1a;return _0x58e13c===_0x1bc1d8(0x153)?_0x1bc1d8(0x146):_0x58e13c;}export function isProduction(_0x461a6a){const _0x3b295d=a148_0x1b7a1a;return normalizeEnv(_0x461a6a)===_0x3b295d(0x146);}export function isDaily(_0x478e8d){const _0x36866a=a148_0x1b7a1a;return normalizeEnv(_0x478e8d)===_0x36866a(0x14a);}function a148_0x116a(){const _0x24f865=['6KlOnmr','1172831tFWWpe','4842523OPmyYF','3834sSerCm','online','778364DxegxB','6249XRzsjZ','production','1YIEfKI','1212fRDDPh','9090SIJvnU','daily','1980848jPKbnO','dev','development','1372200DswnYz'];a148_0x116a=function(){return _0x24f865;};return a148_0x116a();}export function isDev(_0x15f585){const _0x32a501=a148_0x1b7a1a,_0x50e2bb=normalizeEnv(_0x15f585);return _0x50e2bb===_0x32a501(0x14d)||_0x50e2bb===_0x32a501(0x14c);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||'production');export function getEnv(){return env;}export function initEnv(_0x18776e){env=normalizeEnv(_0x18776e);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a149_0x3e73(_0x1fd169,_0x469ada){_0x1fd169=_0x1fd169-0xff;const _0x178469=a149_0x1784();let _0x3e7387=_0x178469[_0x1fd169];return _0x3e7387;}const a149_0x378dd5=a149_0x3e73;function a149_0x1784(){const _0x2b3732=['compress','1863115lzLDkS','18tqMrsM','json','4437545sYgBWS','9RpepNX','2984594ylEjMf','17453760jjOygH','832332VYLhGo','3057760tHVYdx','1dZppZz','pretty','21lPDyYT','30770102xuyOTZ'];a149_0x1784=function(){return _0x2b3732;};return a149_0x1784();}(function(_0x2e15e2,_0x15365f){const _0x3f07e7=a149_0x3e73,_0x1c15f9=_0x2e15e2();while(!![]){try{const _0x1965e6=-parseInt(_0x3f07e7(0xff))/0x1*(-parseInt(_0x3f07e7(0x109))/0x2)+parseInt(_0x3f07e7(0x101))/0x3*(-parseInt(_0x3f07e7(0x10b))/0x4)+-parseInt(_0x3f07e7(0x104))/0x5*(parseInt(_0x3f07e7(0x105))/0x6)+parseInt(_0x3f07e7(0x107))/0x7+parseInt(_0x3f07e7(0x10c))/0x8+parseInt(_0x3f07e7(0x108))/0x9*(-parseInt(_0x3f07e7(0x10a))/0xa)+parseInt(_0x3f07e7(0x102))/0xb;if(_0x1965e6===_0x15365f)break;else _0x1c15f9['push'](_0x1c15f9['shift']());}catch(_0x297d20){_0x1c15f9['push'](_0x1c15f9['shift']());}}}(a149_0x1784,0xf0b34));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a149_0x378dd5(0x106),a149_0x378dd5(0x100),a149_0x378dd5(0x103)];
|
package/lib/constant/paths.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x16a519,_0x4d560f){const _0x4c40fc=a150_0x3145,_0x93ff1a=_0x16a519();while(!![]){try{const _0x3cd43c=-parseInt(_0x4c40fc(0x138))/0x1*(-parseInt(_0x4c40fc(0x13a))/0x2)+parseInt(_0x4c40fc(0x133))/0x3+-parseInt(_0x4c40fc(0x136))/0x4*(-parseInt(_0x4c40fc(0x137))/0x5)+parseInt(_0x4c40fc(0x13b))/0x6*(-parseInt(_0x4c40fc(0x134))/0x7)+parseInt(_0x4c40fc(0x135))/0x8+parseInt(_0x4c40fc(0x132))/0x9+-parseInt(_0x4c40fc(0x13c))/0xa*(parseInt(_0x4c40fc(0x139))/0xb);if(_0x3cd43c===_0x4d560f)break;else _0x93ff1a['push'](_0x93ff1a['shift']());}catch(_0xab40d){_0x93ff1a['push'](_0x93ff1a['shift']());}}}(a150_0x48de,0x69522));export const DEFAULT_API_DIR='./src/api';function a150_0x3145(_0x1a6132,_0x29919d){_0x1a6132=_0x1a6132-0x132;const _0x48de11=a150_0x48de();let _0x3145e4=_0x48de11[_0x1a6132];return _0x3145e4;}function a150_0x48de(){const _0x1849d5=['25PVOvrP','1DdWils','11fJFXPr','171074eRhqKu','4888458ZZDoch','12086640sAGTUX','7753608smSSZY','2283237lsauqP','7CQWmZY','286704yuelYU','568668fywOCn'];a150_0x48de=function(){return _0x1849d5;};return a150_0x48de();}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a151_0x40c897=a151_0x2275;function a151_0x2275(_0xa4ff78,_0x352e7c){_0xa4ff78=_0xa4ff78-0x1d1;const _0x11330e=a151_0x1133();let _0x22755f=_0x11330e[_0xa4ff78];return _0x22755f;}(function(_0x2c23d4,_0x1231cd){const _0x4a109d=a151_0x2275,_0x4da3fa=_0x2c23d4();while(!![]){try{const _0x35886f=-parseInt(_0x4a109d(0x1d3))/0x1+-parseInt(_0x4a109d(0x1d1))/0x2*(-parseInt(_0x4a109d(0x1d2))/0x3)+parseInt(_0x4a109d(0x1d5))/0x4+parseInt(_0x4a109d(0x1d7))/0x5*(-parseInt(_0x4a109d(0x1dd))/0x6)+parseInt(_0x4a109d(0x1db))/0x7*(-parseInt(_0x4a109d(0x1d8))/0x8)+-parseInt(_0x4a109d(0x1d4))/0x9+parseInt(_0x4a109d(0x1d9))/0xa;if(_0x35886f===_0x1231cd)break;else _0x4da3fa['push'](_0x4da3fa['shift']());}catch(_0x543a90){_0x4da3fa['push'](_0x4da3fa['shift']());}}}(a151_0x1133,0x6c44b));export const RISK_LEVEL_VALUES=[a151_0x40c897(0x1d6),a151_0x40c897(0x1dc),a151_0x40c897(0x1da)];function a151_0x1133(){const _0x4f8436=['6DjPQdW','90151TRYgYG','7954110ulRrZH','2058936DMfQgu','read','28555tyurWi','107768zBhknW','12031350SVhxBR','high-risk-write','14DLDxoc','write','822iBazcn','508888LeaCyI'];a151_0x1133=function(){return _0x4f8436;};return a151_0x1133();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a152_0x3ca4(){const _0x511ebe=['9fAnlsC','write','apiDir','1774221BtGXzR','RISK_LEVEL','VERBOSE','globalConfig','entries','trim','production','appcode','apps','accessKey','riskLevel','length','app','maxRisk','object','1136292bipzsO','inherit','defaultApp','723186stuvAa','PAGE_SIZE','true','find','pageSize','daily','ACCESS_KEY','locale','577136SWKgfy','7290344NKESTH','cookie','35EusQbi','format','2139376cAxVhb','3428824IWXMyR','env','keys','APP'];a152_0x3ca4=function(){return _0x511ebe;};return a152_0x3ca4();}(function(_0x5700c9,_0x70aa29){const _0xcb2761=a152_0x4304,_0x54c111=_0x5700c9();while(!![]){try{const _0x21aef5=-parseInt(_0xcb2761(0xe2))/0x1+parseInt(_0xcb2761(0xfe))/0x2+parseInt(_0xcb2761(0xef))/0x3+-parseInt(_0xcb2761(0xe7))/0x4+parseInt(_0xcb2761(0xe5))/0x5*(parseInt(_0xcb2761(0x101))/0x6)+parseInt(_0xcb2761(0xe8))/0x7+parseInt(_0xcb2761(0xe3))/0x8*(-parseInt(_0xcb2761(0xec))/0x9);if(_0x21aef5===_0x70aa29)break;else _0x54c111['push'](_0x54c111['shift']());}catch(_0x251cec){_0x54c111['push'](_0x54c111['shift']());}}}(a152_0x3ca4,0x72b45));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat}from'../framework/types.js';function stringConfigValue(_0x4566b1){return typeof _0x4566b1==='string'&&_0x4566b1['trim']()?_0x4566b1['trim']():undefined;}function appProfiles(_0x1908f2){const _0x27bf7d=a152_0x4304;return _0x1908f2[_0x27bf7d(0xf7)]&&typeof _0x1908f2[_0x27bf7d(0xf7)]===_0x27bf7d(0xfd)?_0x1908f2[_0x27bf7d(0xf7)]:{};}function resolveDefaultAppName(_0x116bcd){const _0xc79f9=a152_0x4304,_0xabbe93=stringConfigValue(_0x116bcd[_0xc79f9(0x100)]);if(_0xabbe93)return _0xabbe93;return Object[_0xc79f9(0xea)](appProfiles(_0x116bcd))[0x0];}function a152_0x4304(_0x3ca1a1,_0x3651f0){_0x3ca1a1=_0x3ca1a1-0xe1;const _0x3ca44d=a152_0x3ca4();let _0x430417=_0x3ca44d[_0x3ca1a1];return _0x430417;}function resolveTopLevelAppCode(_0x4306a4){const _0x2db8b0=a152_0x4304;return stringConfigValue(_0x4306a4[_0x2db8b0(0xf6)])||stringConfigValue(_0x4306a4[_0x2db8b0(0xfb)]);}export function resolveAppConfig({raw:_0x3cab9d,flags:_0x17b8b4,layers:_0x3eb6b5,readEnv:_0x521212}){const _0x373524=a152_0x4304,_0x2062c3=_0x3eb6b5?.['projectConfig']??{},_0x49f47f=_0x3eb6b5?.[_0x373524(0xf2)]??{},_0x5886da=Object['keys'](_0x2062c3)[_0x373524(0xfa)]>0x0,_0x21a73d=!_0x5886da||_0x2062c3[_0x373524(0xff)]===!![],_0x22b0e2=_0x5886da?resolveDefaultAppName(_0x2062c3):undefined,_0x4df8d8=_0x21a73d?resolveDefaultAppName(_0x49f47f):undefined,_0x4d0ab1=stringConfigValue(_0x17b8b4[_0x373524(0xfb)]),_0x50f257=_0x521212(_0x373524(0xeb)),_0x292e23={};if(_0x3cab9d[_0x373524(0xf7)]&&typeof _0x3cab9d['apps']==='object')for(const [_0x574c1e,_0x59cf81]of Object[_0x373524(0xf3)](_0x3cab9d['apps'])){_0x59cf81&&typeof _0x59cf81===_0x373524(0xfd)&&_0x59cf81[_0x373524(0xf6)]&&(_0x292e23[_0x574c1e]=_0x59cf81);}const _0x3c9f3b=_0x3cab9d[_0x373524(0x100)]||undefined,_0x87ade9=Object[_0x373524(0xea)](_0x292e23)[_0x373524(0xfa)]>0x0,_0x1d7687=_0x4d0ab1||_0x22b0e2||_0x50f257||_0x4df8d8||_0x3c9f3b||undefined,_0x394a71=stringConfigValue(_0x17b8b4[_0x373524(0xf6)]),_0x3fd500=_0x394a71?Object[_0x373524(0xf3)](_0x292e23)[_0x373524(0x104)](([,_0xec311])=>_0xec311?.[_0x373524(0xf6)]===_0x394a71):undefined,_0x11ef47=_0x3fd500?.[0x0],_0x580fa7=_0x3fd500?.[0x1],_0x4ef664=_0x394a71?_0x11ef47:_0x1d7687;let _0x5a5660=_0x4ef664&&_0x292e23[_0x4ef664]?_0x292e23[_0x4ef664]:undefined;_0x394a71&&_0x580fa7&&(_0x5a5660=_0x580fa7);const _0x318bd0=_0x394a71?_0x580fa7??_0x5a5660:_0x5a5660,_0x1ce7c0=!_0x4d0ab1&&!_0x22b0e2&&_0x50f257&&_0x4ef664===_0x50f257,_0x5557a6=_0x4d0ab1||(_0x1ce7c0?_0x50f257:undefined)||(_0x394a71?_0x11ef47:undefined),_0x16deee=_0x318bd0?.['appcode'],_0x3e5485=_0x5886da?resolveTopLevelAppCode(_0x2062c3):undefined,_0x18d5b8=_0x21a73d?resolveTopLevelAppCode(_0x49f47f):undefined,_0x330807=_0x4d0ab1||_0x22b0e2?_0x16deee:undefined,_0x5f3c32=!_0x4d0ab1&&!_0x22b0e2?_0x16deee:undefined,_0x14869d=_0x394a71||_0x330807||_0x3e5485||_0x5f3c32||_0x18d5b8||undefined,_0x4cc66a=_0x5886da?stringConfigValue(_0x2062c3[_0x373524(0xe9)]):undefined,_0x495811=_0x21a73d?stringConfigValue(_0x49f47f['env']):undefined,_0xec595b=_0x17b8b4[_0x373524(0xe9)]||_0x318bd0?.['env']||_0x4cc66a||_0x521212('ENV')||_0x495811||_0x3cab9d[_0x373524(0xe9)]||DEFAULT_CONFIG_VALUES[_0x373524(0xe9)],_0x154b6c=_0x318bd0?.[_0x373524(0xe1)]||_0x3cab9d[_0x373524(0xe1)]||DEFAULT_CONFIG_VALUES[_0x373524(0xe1)],_0x2dc59a=_0x521212('COOKIE')||_0x318bd0?.[_0x373524(0xe4)]||_0x3cab9d[_0x373524(0xe4)]||undefined,_0x2b3af5=_0x521212(_0x373524(0x107))||_0x318bd0?.[_0x373524(0xf8)]||_0x3cab9d[_0x373524(0xf8)]||undefined,_0x3343a2=_0x17b8b4['format']||_0x521212('FORMAT')||_0x318bd0?.[_0x373524(0xe6)]||_0x3cab9d[_0x373524(0xe6)],_0x2cf93b=normalizeLegacyOutputFormat(_0x3343a2),_0x18ce93=_0x521212(_0x373524(0x102))||_0x318bd0?.[_0x373524(0x105)]||_0x3cab9d[_0x373524(0x105)],_0x1a629a=_0x18ce93?Number(_0x18ce93)||undefined:undefined,_0x26ae55=_0x521212(_0x373524(0xf0))||_0x521212('MAX_RISK')||_0x318bd0?.[_0x373524(0xf9)]||_0x3cab9d[_0x373524(0xf9)]||_0x3cab9d[_0x373524(0xfc)],_0x4d6e1b=_0x26ae55==='read'||_0x26ae55===_0x373524(0xed)?_0x26ae55:DEFAULT_CONFIG_VALUES['riskLevel'],_0x5ca8a8=_0x521212(_0x373524(0xf1)),_0x2f877b=_0x5ca8a8==='1'||_0x5ca8a8===_0x373524(0x103),_0xd5f5fa=_0x318bd0?.[_0x373524(0xee)]||_0x3cab9d[_0x373524(0xee)]||DEFAULT_CONFIG_VALUES[_0x373524(0xee)],_0x4af787=isDaily(normalizeEnv(String(_0xec595b)))?_0x373524(0x106):_0x373524(0xf5);return{'appCode':typeof _0x14869d==='string'&&_0x14869d[_0x373524(0xf4)]()?_0x14869d[_0x373524(0xf4)]():undefined,'env':_0x4af787,'locale':_0x154b6c,'cookie':_0x2dc59a,'accessKey':_0x2b3af5,'format':_0x2cf93b,'pageSize':_0x1a629a,'riskLevel':_0x4d6e1b,'verbose':_0x2f877b,'apiDir':_0xd5f5fa,'apps':_0x292e23,'defaultApp':_0x3c9f3b,'currentApp':_0x87ade9?_0x4ef664:undefined,'explicitAppName':_0x5557a6};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4ca213,_0x1d5271){const _0x1fdd9a=a153_0x3c1e,_0x12356c=_0x4ca213();while(!![]){try{const _0x449047=-parseInt(_0x1fdd9a(0x80))/0x1+parseInt(_0x1fdd9a(0x85))/0x2+-parseInt(_0x1fdd9a(0x7d))/0x3*(-parseInt(_0x1fdd9a(0x86))/0x4)+-parseInt(_0x1fdd9a(0x7e))/0x5*(-parseInt(_0x1fdd9a(0x87))/0x6)+-parseInt(_0x1fdd9a(0x7f))/0x7*(parseInt(_0x1fdd9a(0x81))/0x8)+parseInt(_0x1fdd9a(0x82))/0x9+-parseInt(_0x1fdd9a(0x83))/0xa;if(_0x449047===_0x1d5271)break;else _0x12356c['push'](_0x12356c['shift']());}catch(_0x111587){_0x12356c['push'](_0x12356c['shift']());}}}(a153_0x4774,0x9a39f));function a153_0x4774(){const _0x4da156=['4gyoYXC','6zitIDY','cookie','979647NdyFUV','1394335veGzaQ','139342ufWOcy','376120iYxQIQ','32iuEpVo','9435789xJEkDT','5693250fqPjFx','authRequired','5886hFqTGZ'];a153_0x4774=function(){return _0x4da156;};return a153_0x4774();}import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';function a153_0x3c1e(_0x432a63,_0x4bf0b4){_0x432a63=_0x432a63-0x7d;const _0x4774a=a153_0x4774();let _0x3c1e43=_0x4774a[_0x432a63];return _0x3c1e43;}export async function buildAuth(_0x4b6555){const _0x46efea=a153_0x3c1e,{getCookie:_0x37e68f}=await import('../auth/get-cookie.js'),_0x362128=_0x4b6555[_0x46efea(0x88)]||_0x37e68f(),_0x3eaf70=_0x362128?await getIsSessionValid():![];return{'cookie':_0x362128,'isLoggedIn':_0x3eaf70,async 'getOrLogin'(){const _0x2d30a3=_0x46efea;if(_0x362128&&_0x3eaf70)return _0x362128;throw CliErrors[_0x2d30a3(0x84)]();}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a154_0x58e8db=a154_0x1489;(function(_0x305962,_0xc210b0){const _0x5c16cd=a154_0x1489,_0x471630=_0x305962();while(!![]){try{const _0x314579=-parseInt(_0x5c16cd(0x1ee))/0x1+-parseInt(_0x5c16cd(0x1cf))/0x2*(-parseInt(_0x5c16cd(0x1d9))/0x3)+parseInt(_0x5c16cd(0x1e1))/0x4+-parseInt(_0x5c16cd(0x1c5))/0x5*(-parseInt(_0x5c16cd(0x1da))/0x6)+parseInt(_0x5c16cd(0x1e9))/0x7+-parseInt(_0x5c16cd(0x1cb))/0x8*(-parseInt(_0x5c16cd(0x1d7))/0x9)+-parseInt(_0x5c16cd(0x1eb))/0xa;if(_0x314579===_0xc210b0)break;else _0x471630['push'](_0x471630['shift']());}catch(_0x5951f2){_0x471630['push'](_0x471630['shift']());}}}(a154_0xab58,0x9f009));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';import{homedir}from'node:os';import{CLI_BIN_NAME}from'../constant/cli.js';export const NEW_CONFIG_NAME=a154_0x58e8db(0x1c8);export const CONFIG_NAMES=['.rabetbase.json',a154_0x58e8db(0x1e6),a154_0x58e8db(0x1e4)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a154_0x58e8db(0x1c9)](_0x3a60a6=>_0x3a60a6!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x45782f){for(const _0x5645bf of CONFIG_NAMES){const _0x3b2f17=resolve(_0x45782f,_0x5645bf);if(existsSync(_0x3b2f17))return _0x3b2f17;}return undefined;}export function findProjectRootDirectory(_0x9d0a74=process[a154_0x58e8db(0x1ec)]()){let _0x153aa6=resolve(_0x9d0a74);const {root:_0x9862a5}=parse(_0x153aa6),_0x243649=homedir();while(!![]){if(resolveConfigPath(_0x153aa6)){if(_0x153aa6===_0x243649)break;return _0x153aa6;}if(_0x153aa6===_0x9862a5||_0x153aa6===_0x243649)break;const _0x33862b=dirname(_0x153aa6);if(_0x33862b===_0x153aa6)break;_0x153aa6=_0x33862b;}return resolve(_0x9d0a74);}export function getProjectConfigPath(){const _0x372816=a154_0x58e8db;return resolveConfigPath(process[_0x372816(0x1ec)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x4d2c36){const _0x25aaa7=a154_0x58e8db;if(!existsSync(_0x4d2c36))return{'status':_0x25aaa7(0x1e3)};try{const _0x3e6516=readFileSync(_0x4d2c36,{'encoding':_0x25aaa7(0x1d8)});if(!_0x3e6516?.['trim']())return{'status':_0x25aaa7(0x1db)};const _0x1f107f=JSON[_0x25aaa7(0x1cd)](_0x3e6516);return{'status':'ok','data':_0x1f107f};}catch(_0x2c73d5){return{'status':'error','message':_0x2c73d5 instanceof Error?_0x2c73d5['message']:String(_0x2c73d5)};}}function parseCliConfigJsonFile(_0x431d85,_0x46a169,_0x314245){const _0x2f9c02=a154_0x58e8db,_0x2c62d6=inspectCliConfigJsonFile(_0x431d85);if(_0x2c62d6[_0x2f9c02(0x1ef)]==='missing'||_0x2c62d6[_0x2f9c02(0x1ef)]==='empty')return{};if(_0x2c62d6['status']==='ok')return _0x2c62d6[_0x2f9c02(0x1d0)];return _0x46a169===_0x2f9c02(0x1e7)&&_0x314245&&console[_0x2f9c02(0x1ed)](CLI_BIN_NAME+':\x20'+_0x314245+_0x2f9c02(0x1e2)+_0x431d85+_0x2f9c02(0x1c7)+_0x2c62d6[_0x2f9c02(0x1e8)]),{};}function normalizeLegacyConfigShape(_0x42ed83){const _0x512dee=a154_0x58e8db;if(!_0x42ed83||typeof _0x42ed83!==_0x512dee(0x1c0))return{'config':{},'migrated':![]};const _0x3bac5c={..._0x42ed83},_0x2eca51=_0x3bac5c[_0x512dee(0x1dc)]&&typeof _0x3bac5c[_0x512dee(0x1dc)]===_0x512dee(0x1c0)?{..._0x3bac5c[_0x512dee(0x1dc)]}:{},_0x2c70cc=Object[_0x512dee(0x1e0)](_0x2eca51)[_0x512dee(0x1df)],_0xb9effb=_0x3bac5c[_0x512dee(0x1f0)]||_0x3bac5c[_0x512dee(0x1d3)];let _0x3cdab9=![];if(_0xb9effb&&_0x2c70cc===0x0){const _0x307084=typeof _0x3bac5c[_0x512dee(0x1ce)]===_0x512dee(0x1d6)&&_0x3bac5c[_0x512dee(0x1ce)]['trim']()?_0x3bac5c[_0x512dee(0x1ce)]:String(_0xb9effb)[_0x512dee(0x1e5)]();_0x2eca51[_0x307084]={'appcode':String(_0xb9effb)[_0x512dee(0x1e5)](),..._0x3bac5c[_0x512dee(0x1c4)]!=null?{'env':_0x3bac5c[_0x512dee(0x1c4)]}:{},..._0x3bac5c[_0x512dee(0x1c2)]!=null?{'apiDir':_0x3bac5c[_0x512dee(0x1c2)]}:{},..._0x3bac5c[_0x512dee(0x1dd)]!=null?{'cookie':_0x3bac5c[_0x512dee(0x1dd)]}:{},..._0x3bac5c[_0x512dee(0x1d1)]!=null?{'accessKey':_0x3bac5c[_0x512dee(0x1d1)]}:{},..._0x3bac5c[_0x512dee(0x1d4)]!=null?{'format':_0x3bac5c[_0x512dee(0x1d4)]}:{},..._0x3bac5c[_0x512dee(0x1de)]!=null?{'pageSize':_0x3bac5c[_0x512dee(0x1de)]}:{},..._0x3bac5c[_0x512dee(0x1c3)]!=null?{'riskLevel':_0x3bac5c[_0x512dee(0x1c3)]}:{},..._0x3bac5c[_0x512dee(0x1bf)]!=null?{'locale':_0x3bac5c[_0x512dee(0x1bf)]}:{}},_0x3bac5c[_0x512dee(0x1dc)]=_0x2eca51;if(!_0x3bac5c[_0x512dee(0x1ce)])_0x3bac5c['defaultApp']=_0x307084;_0x3cdab9=!![];}return(_0x512dee(0x1f0)in _0x3bac5c||_0x512dee(0x1d3)in _0x3bac5c)&&(delete _0x3bac5c[_0x512dee(0x1f0)],delete _0x3bac5c[_0x512dee(0x1d3)],_0x3cdab9=!![]),{'config':_0x3bac5c,'migrated':_0x3cdab9};}function writeNormalizedConfigIfNeeded(_0x1a1c68,_0x5dfb2f){const _0x2ba3e2=JSON['stringify'](_0x5dfb2f,null,0x2)+'\x0a';if(normalizedWriteCache['get'](_0x1a1c68)===_0x2ba3e2)return;writeConfigFile(_0x1a1c68,_0x5dfb2f),normalizedWriteCache['set'](_0x1a1c68,_0x2ba3e2);}function parseAndNormalizeConfig(_0x15bf17,_0x50f67f,_0x297332){const _0x533e6d=a154_0x58e8db,_0x5288af=parseCliConfigJsonFile(_0x15bf17,_0x50f67f,_0x297332),_0x450cb4=normalizeLegacyConfigShape(_0x5288af);if(_0x450cb4[_0x533e6d(0x1c1)])try{writeNormalizedConfigIfNeeded(_0x15bf17,_0x450cb4[_0x533e6d(0x1cc)]);}catch{}return _0x450cb4[_0x533e6d(0x1cc)];}function a154_0x1489(_0xb6c39c,_0x57ff07){_0xb6c39c=_0xb6c39c-0x1bf;const _0xab584d=a154_0xab58();let _0x14892f=_0xab584d[_0xb6c39c];return _0x14892f;}export function loadRawConfigLayers(_0x9dc107){const _0x4b37b3=a154_0x58e8db;let _0x50791b={},_0x191a27={};const _0x4e673f=resolveConfigPath(homedir());_0x4e673f&&(_0x50791b=parseAndNormalizeConfig(_0x4e673f,_0x4b37b3(0x1e7),_0x4b37b3(0x1ca)));const _0xbbca16=_0x9dc107??findProjectRootDirectory(),_0x3ff19a=resolveConfigPath(_0xbbca16);return _0x3ff19a&&(_0x191a27=parseAndNormalizeConfig(_0x3ff19a,_0x4b37b3(0x1e7),_0x4b37b3(0x1f1))),{'globalPath':_0x4e673f,'projectPath':_0x3ff19a,'globalConfig':_0x50791b,'projectConfig':_0x191a27};}const INHERIT_WHITELIST=[a154_0x58e8db(0x1dd),a154_0x58e8db(0x1d1),a154_0x58e8db(0x1bf),a154_0x58e8db(0x1d4),'riskLevel',a154_0x58e8db(0x1de)];export function mergeRawConfigLayers(_0x518cdb){const _0x581226=a154_0x58e8db,{globalConfig:_0x5c9594,projectConfig:_0x318371}=_0x518cdb,_0x568d11=Object[_0x581226(0x1e0)](_0x318371)[_0x581226(0x1df)]>0x0;if(!_0x568d11)return mergeGlobalOnly(_0x5c9594);if(_0x318371[_0x581226(0x1d2)]===!![])return mergeFullInherit(_0x5c9594,_0x318371);if(_0x318371[_0x581226(0x1d2)]===![])return mergeIsolated(_0x318371);return mergeProjectFirst(_0x5c9594,_0x318371);}function mergeGlobalOnly(_0x2f014f){const _0x53704f=a154_0x58e8db,_0x5538f9={..._0x2f014f},_0xf1420b=_0x2f014f[_0x53704f(0x1dc)]&&typeof _0x2f014f[_0x53704f(0x1dc)]===_0x53704f(0x1c0)?_0x2f014f[_0x53704f(0x1dc)]:{};if(Object[_0x53704f(0x1e0)](_0xf1420b)[_0x53704f(0x1df)]>0x0)_0x5538f9['apps']=_0xf1420b;if(_0x2f014f[_0x53704f(0x1ce)])_0x5538f9['defaultApp']=_0x2f014f[_0x53704f(0x1ce)];else{const _0x321f6d=Object[_0x53704f(0x1e0)](_0xf1420b);if(_0x321f6d[_0x53704f(0x1df)]>0x0)_0x5538f9[_0x53704f(0x1ce)]=_0x321f6d[0x0];}return _0x5538f9;}function mergeIsolated(_0x2e8867){const _0x1d0787=a154_0x58e8db,_0x38465d={..._0x2e8867};delete _0x38465d[_0x1d0787(0x1d2)];const _0x191214=_0x2e8867['apps']&&typeof _0x2e8867[_0x1d0787(0x1dc)]==='object'?_0x2e8867['apps']:{};Object[_0x1d0787(0x1e0)](_0x191214)['length']>0x0?_0x38465d[_0x1d0787(0x1dc)]=_0x191214:delete _0x38465d[_0x1d0787(0x1dc)];if(_0x1d0787(0x1ce)in _0x2e8867)_0x38465d['defaultApp']=_0x2e8867[_0x1d0787(0x1ce)];else Object[_0x1d0787(0x1e0)](_0x191214)['length']>0x0?_0x38465d[_0x1d0787(0x1ce)]=Object[_0x1d0787(0x1e0)](_0x191214)[0x0]:delete _0x38465d[_0x1d0787(0x1ce)];return _0x38465d;}function mergeProjectFirst(_0x5f3183,_0xf174e7){const _0x4cb6c5=a154_0x58e8db,_0x5bc773={..._0xf174e7};delete _0x5bc773[_0x4cb6c5(0x1d2)];for(const _0xe53f8a of INHERIT_WHITELIST){!(_0xe53f8a in _0x5bc773)&&_0xe53f8a in _0x5f3183&&(_0x5bc773[_0xe53f8a]=_0x5f3183[_0xe53f8a]);}const _0x5d8256=_0xf174e7[_0x4cb6c5(0x1dc)]&&typeof _0xf174e7[_0x4cb6c5(0x1dc)]==='object'?_0xf174e7[_0x4cb6c5(0x1dc)]:{};Object[_0x4cb6c5(0x1e0)](_0x5d8256)[_0x4cb6c5(0x1df)]>0x0?_0x5bc773[_0x4cb6c5(0x1dc)]=_0x5d8256:delete _0x5bc773[_0x4cb6c5(0x1dc)];if(_0x4cb6c5(0x1ce)in _0xf174e7)_0x5bc773[_0x4cb6c5(0x1ce)]=_0xf174e7[_0x4cb6c5(0x1ce)];else Object[_0x4cb6c5(0x1e0)](_0x5d8256)[_0x4cb6c5(0x1df)]>0x0?_0x5bc773[_0x4cb6c5(0x1ce)]=Object[_0x4cb6c5(0x1e0)](_0x5d8256)[0x0]:delete _0x5bc773[_0x4cb6c5(0x1ce)];return _0x5bc773;}function a154_0xab58(){const _0x5e40cb=['29545920wUmmrB','cwd','error','166561tRmMdF','status','appcode','Project','locale','object','migrated','apiDir','riskLevel','env','1435qWMfDC','.tmp','\x0a\x20\x20','.rabetbase.json','filter','Global','8hvMrUD','config','parse','defaultApp','4rmJxYM','data','accessKey','inherit','app','format','silent','string','5524371iIbbTh','utf8','1731531crzQye','9570ioFzdc','empty','apps','cookie','pageSize','length','keys','1062088VVqiUg','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','missing','.lovrabetrc','trim','.lovrabet.json','warn','message','8966762UEdiRD','stringify'];a154_0xab58=function(){return _0x5e40cb;};return a154_0xab58();}function mergeFullInherit(_0x441bdc,_0x1fe63d){const _0x37e986=a154_0x58e8db,_0x44b3de=_0x441bdc[_0x37e986(0x1dc)]&&typeof _0x441bdc[_0x37e986(0x1dc)]==='object'?_0x441bdc[_0x37e986(0x1dc)]:{},_0x50aa6c=_0x1fe63d[_0x37e986(0x1dc)]&&typeof _0x1fe63d[_0x37e986(0x1dc)]==='object'?_0x1fe63d['apps']:{},_0x41c2e8={..._0x44b3de,..._0x50aa6c},_0x65f1dc={..._0x441bdc,..._0x1fe63d};delete _0x65f1dc[_0x37e986(0x1d2)];if(Object['keys'](_0x41c2e8)[_0x37e986(0x1df)]>0x0)_0x65f1dc['apps']=_0x41c2e8;if(_0x37e986(0x1ce)in _0x1fe63d)_0x65f1dc[_0x37e986(0x1ce)]=_0x1fe63d[_0x37e986(0x1ce)];else{if(Object['keys'](_0x50aa6c)[_0x37e986(0x1df)]>0x0)_0x65f1dc['defaultApp']=Object[_0x37e986(0x1e0)](_0x50aa6c)[0x0];else{if(_0x441bdc[_0x37e986(0x1ce)])_0x65f1dc[_0x37e986(0x1ce)]=_0x441bdc['defaultApp'];else{const _0xc927ff=Object[_0x37e986(0x1e0)](_0x44b3de);if(_0xc927ff['length']>0x0)_0x65f1dc[_0x37e986(0x1ce)]=_0xc927ff[0x0];}}}return _0x65f1dc;}export function readRawConfigWithLayers(_0x578478){const _0x1d6f9f=loadRawConfigLayers(_0x578478);return{'config':mergeRawConfigLayers(_0x1d6f9f),'layers':_0x1d6f9f};}export function readRawConfig(_0x1db9ce){return mergeRawConfigLayers(loadRawConfigLayers(_0x1db9ce));}export function readConfigFile(_0x206549){const _0x209f9d=a154_0x58e8db;return parseAndNormalizeConfig(_0x206549,_0x209f9d(0x1d5));}export function writeConfigFile(_0x1dc460,_0x5db22b){const _0x184c37=a154_0x58e8db,_0x3b08a=dirname(_0x1dc460);!existsSync(_0x3b08a)&&mkdirSync(_0x3b08a,{'recursive':!![]});const _0x39685b=_0x1dc460+_0x184c37(0x1c6);try{writeFileSync(_0x39685b,JSON[_0x184c37(0x1ea)](_0x5db22b,null,0x2)+'\x0a',{'encoding':_0x184c37(0x1d8),'mode':0x180}),renameSync(_0x39685b,_0x1dc460);}catch(_0x1dd95d){try{unlinkSync(_0x39685b);}catch{}throw _0x1dd95d;}}export function resolveWriteConfigPath(_0x5e1acf){const _0x440e8b=_0x5e1acf==='project'?process['cwd']():homedir(),_0x43a769=resolveConfigPath(_0x440e8b);return _0x43a769??resolve(_0x440e8b,NEW_CONFIG_NAME);}
|
|
1
|
+
const a154_0x31ab27=a154_0x43b5;(function(_0x1e3211,_0x113c0a){const _0x25ab17=a154_0x43b5,_0x1ab632=_0x1e3211();while(!![]){try{const _0x3fb69b=parseInt(_0x25ab17(0x8d))/0x1+parseInt(_0x25ab17(0x97))/0x2+-parseInt(_0x25ab17(0xa1))/0x3*(parseInt(_0x25ab17(0xaa))/0x4)+parseInt(_0x25ab17(0xb1))/0x5*(-parseInt(_0x25ab17(0x9c))/0x6)+parseInt(_0x25ab17(0x98))/0x7*(parseInt(_0x25ab17(0x94))/0x8)+-parseInt(_0x25ab17(0x86))/0x9*(-parseInt(_0x25ab17(0x8b))/0xa)+-parseInt(_0x25ab17(0xb5))/0xb;if(_0x3fb69b===_0x113c0a)break;else _0x1ab632['push'](_0x1ab632['shift']());}catch(_0x2b28a4){_0x1ab632['push'](_0x1ab632['shift']());}}}(a154_0x1629,0x9ecf4));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';import{homedir}from'node:os';import{CLI_BIN_NAME}from'../constant/cli.js';export const NEW_CONFIG_NAME='.rabetbase.json';export const CONFIG_NAMES=['.rabetbase.json',a154_0x31ab27(0xaf),a154_0x31ab27(0x8f)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a154_0x31ab27(0xac)](_0x435f95=>_0x435f95!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x24e505){for(const _0x528c5b of CONFIG_NAMES){const _0x3071f4=resolve(_0x24e505,_0x528c5b);if(existsSync(_0x3071f4))return _0x3071f4;}return undefined;}export function findProjectRootDirectory(_0x5b74c9=process[a154_0x31ab27(0xad)]()){let _0x367b23=resolve(_0x5b74c9);const {root:_0x5e4054}=parse(_0x367b23),_0x44b1c0=homedir();while(!![]){if(resolveConfigPath(_0x367b23)){if(_0x367b23===_0x44b1c0)break;return _0x367b23;}if(_0x367b23===_0x5e4054||_0x367b23===_0x44b1c0)break;const _0x355611=dirname(_0x367b23);if(_0x355611===_0x367b23)break;_0x367b23=_0x355611;}return resolve(_0x5b74c9);}export function getProjectConfigPath(){const _0x853194=a154_0x31ab27;return resolveConfigPath(process[_0x853194(0xad)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x363985){const _0x5808b8=a154_0x31ab27;if(!existsSync(_0x363985))return{'status':'missing'};try{const _0x2dda41=readFileSync(_0x363985,{'encoding':'utf8'});if(!_0x2dda41?.[_0x5808b8(0xa5)]())return{'status':_0x5808b8(0x9a)};const _0x1647b9=JSON[_0x5808b8(0xb4)](_0x2dda41);return{'status':'ok','data':_0x1647b9};}catch(_0x6339cf){return{'status':_0x5808b8(0x8a),'message':_0x6339cf instanceof Error?_0x6339cf['message']:String(_0x6339cf)};}}function a154_0x43b5(_0x50ac56,_0xee3361){_0x50ac56=_0x50ac56-0x83;const _0x162962=a154_0x1629();let _0x43b5b0=_0x162962[_0x50ac56];return _0x43b5b0;}function parseCliConfigJsonFile(_0x7743ed,_0x35579b,_0x120c18){const _0x31d135=a154_0x31ab27,_0x4f943c=inspectCliConfigJsonFile(_0x7743ed);if(_0x4f943c[_0x31d135(0xa8)]==='missing'||_0x4f943c[_0x31d135(0xa8)]===_0x31d135(0x9a))return{};if(_0x4f943c[_0x31d135(0xa8)]==='ok')return _0x4f943c[_0x31d135(0x84)];return _0x35579b===_0x31d135(0x96)&&_0x120c18&&console[_0x31d135(0x8a)](CLI_BIN_NAME+':\x20'+_0x120c18+_0x31d135(0xae)+_0x7743ed+_0x31d135(0xa4)+_0x4f943c['message']),{};}function normalizeLegacyConfigShape(_0x1fc532){const _0x3fde6d=a154_0x31ab27;if(!_0x1fc532||typeof _0x1fc532!==_0x3fde6d(0x85))return{'config':{},'migrated':![]};const _0x40ea23={..._0x1fc532},_0x3d9882=_0x40ea23[_0x3fde6d(0x8c)]&&typeof _0x40ea23[_0x3fde6d(0x8c)]===_0x3fde6d(0x85)?{..._0x40ea23[_0x3fde6d(0x8c)]}:{},_0x1a7a5e=Object['keys'](_0x3d9882)[_0x3fde6d(0xa9)],_0x35f25e=_0x40ea23[_0x3fde6d(0x9b)]||_0x40ea23[_0x3fde6d(0xa3)];let _0x530fa0=![];if(_0x35f25e&&_0x1a7a5e===0x0){const _0xd937d4=typeof _0x40ea23[_0x3fde6d(0xa6)]===_0x3fde6d(0x8e)&&_0x40ea23[_0x3fde6d(0xa6)]['trim']()?_0x40ea23[_0x3fde6d(0xa6)]:String(_0x35f25e)[_0x3fde6d(0xa5)]();_0x3d9882[_0xd937d4]={'appcode':String(_0x35f25e)[_0x3fde6d(0xa5)](),..._0x40ea23[_0x3fde6d(0x99)]!=null?{'env':_0x40ea23[_0x3fde6d(0x99)]}:{},..._0x40ea23[_0x3fde6d(0x92)]!=null?{'apiDir':_0x40ea23[_0x3fde6d(0x92)]}:{},..._0x40ea23[_0x3fde6d(0xa2)]!=null?{'cookie':_0x40ea23[_0x3fde6d(0xa2)]}:{},..._0x40ea23[_0x3fde6d(0xb3)]!=null?{'accessKey':_0x40ea23[_0x3fde6d(0xb3)]}:{},..._0x40ea23[_0x3fde6d(0x9f)]!=null?{'format':_0x40ea23[_0x3fde6d(0x9f)]}:{},..._0x40ea23[_0x3fde6d(0xb2)]!=null?{'pageSize':_0x40ea23[_0x3fde6d(0xb2)]}:{},..._0x40ea23[_0x3fde6d(0xa7)]!=null?{'riskLevel':_0x40ea23['riskLevel']}:{},..._0x40ea23[_0x3fde6d(0x88)]!=null?{'locale':_0x40ea23[_0x3fde6d(0x88)]}:{}},_0x40ea23[_0x3fde6d(0x8c)]=_0x3d9882;if(!_0x40ea23[_0x3fde6d(0xa6)])_0x40ea23[_0x3fde6d(0xa6)]=_0xd937d4;_0x530fa0=!![];}return('appcode'in _0x40ea23||_0x3fde6d(0xa3)in _0x40ea23)&&(delete _0x40ea23[_0x3fde6d(0x9b)],delete _0x40ea23[_0x3fde6d(0xa3)],_0x530fa0=!![]),{'config':_0x40ea23,'migrated':_0x530fa0};}function writeNormalizedConfigIfNeeded(_0xfc8f6b,_0x1e9e2c){const _0xdfc06a=a154_0x31ab27,_0x5ef868=JSON['stringify'](_0x1e9e2c,null,0x2)+'\x0a';if(normalizedWriteCache[_0xdfc06a(0x91)](_0xfc8f6b)===_0x5ef868)return;writeConfigFile(_0xfc8f6b,_0x1e9e2c),normalizedWriteCache[_0xdfc06a(0x87)](_0xfc8f6b,_0x5ef868);}function parseAndNormalizeConfig(_0x333e9b,_0x5156f5,_0x1f2d6c){const _0x1679c0=a154_0x31ab27,_0x40b844=parseCliConfigJsonFile(_0x333e9b,_0x5156f5,_0x1f2d6c),_0x506062=normalizeLegacyConfigShape(_0x40b844);if(_0x506062[_0x1679c0(0x93)])try{writeNormalizedConfigIfNeeded(_0x333e9b,_0x506062['config']);}catch{}return _0x506062[_0x1679c0(0x89)];}export function loadRawConfigLayers(_0x324a8e){const _0x4f5680=a154_0x31ab27;let _0x54ac9c={},_0x4e2054={};const _0x559683=resolveConfigPath(homedir());_0x559683&&(_0x54ac9c=parseAndNormalizeConfig(_0x559683,_0x4f5680(0x96),_0x4f5680(0xb0)));const _0x327b7e=_0x324a8e??findProjectRootDirectory(),_0x15f7eb=resolveConfigPath(_0x327b7e);return _0x15f7eb&&(_0x4e2054=parseAndNormalizeConfig(_0x15f7eb,_0x4f5680(0x96),_0x4f5680(0x83))),{'globalPath':_0x559683,'projectPath':_0x15f7eb,'globalConfig':_0x54ac9c,'projectConfig':_0x4e2054};}const INHERIT_WHITELIST=['cookie',a154_0x31ab27(0xb3),a154_0x31ab27(0x88),a154_0x31ab27(0x9f),'riskLevel','pageSize'];export function mergeRawConfigLayers(_0x525a35){const _0x55fa87=a154_0x31ab27,{globalConfig:_0x1ba91f,projectConfig:_0x18a504}=_0x525a35,_0x4e4b2c=Object[_0x55fa87(0xab)](_0x18a504)[_0x55fa87(0xa9)]>0x0;if(!_0x4e4b2c)return mergeGlobalOnly(_0x1ba91f);if(_0x18a504[_0x55fa87(0x9d)]===!![])return mergeFullInherit(_0x1ba91f,_0x18a504);if(_0x18a504[_0x55fa87(0x9d)]===![])return mergeIsolated(_0x18a504);return mergeProjectFirst(_0x1ba91f,_0x18a504);}function a154_0x1629(){const _0x466bc6=['data','object','3935403nbfseN','set','locale','config','error','20MurAvF','apps','1279442eWteJY','string','.lovrabetrc','stringify','get','apiDir','migrated','8lSvFMD','utf8','warn','130308OjVNQr','5085101ZorfGI','env','empty','appcode','6UulJsM','inherit','project','format','.tmp','730014XBooZe','cookie','app','\x0a\x20\x20','trim','defaultApp','riskLevel','status','length','12tsMMmU','keys','filter','cwd','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','.lovrabet.json','Global','5976270yfyoIv','pageSize','accessKey','parse','4068031hJsMaQ','Project'];a154_0x1629=function(){return _0x466bc6;};return a154_0x1629();}function mergeGlobalOnly(_0x42bd5a){const _0x4b9666=a154_0x31ab27,_0x53d2fc={..._0x42bd5a},_0x4b06db=_0x42bd5a[_0x4b9666(0x8c)]&&typeof _0x42bd5a[_0x4b9666(0x8c)]===_0x4b9666(0x85)?_0x42bd5a[_0x4b9666(0x8c)]:{};if(Object[_0x4b9666(0xab)](_0x4b06db)[_0x4b9666(0xa9)]>0x0)_0x53d2fc[_0x4b9666(0x8c)]=_0x4b06db;if(_0x42bd5a['defaultApp'])_0x53d2fc['defaultApp']=_0x42bd5a[_0x4b9666(0xa6)];else{const _0x23fef2=Object['keys'](_0x4b06db);if(_0x23fef2[_0x4b9666(0xa9)]>0x0)_0x53d2fc[_0x4b9666(0xa6)]=_0x23fef2[0x0];}return _0x53d2fc;}function mergeIsolated(_0x2d8b8e){const _0x14b872=a154_0x31ab27,_0x14ebfd={..._0x2d8b8e};delete _0x14ebfd['inherit'];const _0x3e8b5f=_0x2d8b8e[_0x14b872(0x8c)]&&typeof _0x2d8b8e[_0x14b872(0x8c)]===_0x14b872(0x85)?_0x2d8b8e['apps']:{};Object[_0x14b872(0xab)](_0x3e8b5f)['length']>0x0?_0x14ebfd[_0x14b872(0x8c)]=_0x3e8b5f:delete _0x14ebfd[_0x14b872(0x8c)];if(_0x14b872(0xa6)in _0x2d8b8e)_0x14ebfd[_0x14b872(0xa6)]=_0x2d8b8e['defaultApp'];else Object[_0x14b872(0xab)](_0x3e8b5f)[_0x14b872(0xa9)]>0x0?_0x14ebfd[_0x14b872(0xa6)]=Object['keys'](_0x3e8b5f)[0x0]:delete _0x14ebfd['defaultApp'];return _0x14ebfd;}function mergeProjectFirst(_0x547f4d,_0x151d9d){const _0x4e0ee5=a154_0x31ab27,_0x5c5cba={..._0x151d9d};delete _0x5c5cba[_0x4e0ee5(0x9d)];for(const _0x34e77c of INHERIT_WHITELIST){!(_0x34e77c in _0x5c5cba)&&_0x34e77c in _0x547f4d&&(_0x5c5cba[_0x34e77c]=_0x547f4d[_0x34e77c]);}const _0x104211=_0x151d9d['apps']&&typeof _0x151d9d[_0x4e0ee5(0x8c)]===_0x4e0ee5(0x85)?_0x151d9d['apps']:{};Object[_0x4e0ee5(0xab)](_0x104211)['length']>0x0?_0x5c5cba[_0x4e0ee5(0x8c)]=_0x104211:delete _0x5c5cba[_0x4e0ee5(0x8c)];if(_0x4e0ee5(0xa6)in _0x151d9d)_0x5c5cba[_0x4e0ee5(0xa6)]=_0x151d9d[_0x4e0ee5(0xa6)];else Object['keys'](_0x104211)[_0x4e0ee5(0xa9)]>0x0?_0x5c5cba['defaultApp']=Object[_0x4e0ee5(0xab)](_0x104211)[0x0]:delete _0x5c5cba['defaultApp'];return _0x5c5cba;}function mergeFullInherit(_0x4d1d04,_0x1a4156){const _0x28b89b=a154_0x31ab27,_0x4d5184=_0x4d1d04['apps']&&typeof _0x4d1d04[_0x28b89b(0x8c)]==='object'?_0x4d1d04[_0x28b89b(0x8c)]:{},_0x1b0c09=_0x1a4156[_0x28b89b(0x8c)]&&typeof _0x1a4156[_0x28b89b(0x8c)]===_0x28b89b(0x85)?_0x1a4156[_0x28b89b(0x8c)]:{},_0x22aca9={..._0x4d5184,..._0x1b0c09},_0x64cff6={..._0x4d1d04,..._0x1a4156};delete _0x64cff6[_0x28b89b(0x9d)];if(Object[_0x28b89b(0xab)](_0x22aca9)[_0x28b89b(0xa9)]>0x0)_0x64cff6[_0x28b89b(0x8c)]=_0x22aca9;if(_0x28b89b(0xa6)in _0x1a4156)_0x64cff6[_0x28b89b(0xa6)]=_0x1a4156[_0x28b89b(0xa6)];else{if(Object[_0x28b89b(0xab)](_0x1b0c09)[_0x28b89b(0xa9)]>0x0)_0x64cff6['defaultApp']=Object[_0x28b89b(0xab)](_0x1b0c09)[0x0];else{if(_0x4d1d04[_0x28b89b(0xa6)])_0x64cff6[_0x28b89b(0xa6)]=_0x4d1d04['defaultApp'];else{const _0x151247=Object['keys'](_0x4d5184);if(_0x151247[_0x28b89b(0xa9)]>0x0)_0x64cff6[_0x28b89b(0xa6)]=_0x151247[0x0];}}}return _0x64cff6;}export function readRawConfigWithLayers(_0xb127d3){const _0x21aed2=loadRawConfigLayers(_0xb127d3);return{'config':mergeRawConfigLayers(_0x21aed2),'layers':_0x21aed2};}export function readRawConfig(_0x16c5fd){return mergeRawConfigLayers(loadRawConfigLayers(_0x16c5fd));}export function readConfigFile(_0x41cf62){return parseAndNormalizeConfig(_0x41cf62,'silent');}export function writeConfigFile(_0xf1868f,_0x799692){const _0x3a47c2=a154_0x31ab27,_0x329c16=dirname(_0xf1868f);!existsSync(_0x329c16)&&mkdirSync(_0x329c16,{'recursive':!![]});const _0x227bdc=_0xf1868f+_0x3a47c2(0xa0);try{writeFileSync(_0x227bdc,JSON[_0x3a47c2(0x90)](_0x799692,null,0x2)+'\x0a',{'encoding':_0x3a47c2(0x95),'mode':0x180}),renameSync(_0x227bdc,_0xf1868f);}catch(_0x33f367){try{unlinkSync(_0x227bdc);}catch{}throw _0x33f367;}}export function resolveWriteConfigPath(_0x52d76a){const _0x4b48e8=a154_0x31ab27,_0x2bc4b6=_0x52d76a===_0x4b48e8(0x9e)?process[_0x4b48e8(0xad)]():homedir(),_0xc32be4=resolveConfigPath(_0x2bc4b6);return _0xc32be4??resolve(_0x2bc4b6,NEW_CONFIG_NAME);}
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e1f64,_0x28f39c){const _0x586d98=a155_0x5de2,_0x8828ad=_0x5e1f64();while(!![]){try{const _0x45b187=parseInt(_0x586d98(0x12d))/0x1*(parseInt(_0x586d98(0x144))/0x2)+-parseInt(_0x586d98(0x139))/0x3+-parseInt(_0x586d98(0x13d))/0x4*(parseInt(_0x586d98(0x13e))/0x5)+-parseInt(_0x586d98(0x145))/0x6*(-parseInt(_0x586d98(0x14e))/0x7)+-parseInt(_0x586d98(0x133))/0x8+parseInt(_0x586d98(0x14a))/0x9*(parseInt(_0x586d98(0x150))/0xa)+parseInt(_0x586d98(0x12c))/0xb*(-parseInt(_0x586d98(0x137))/0xc);if(_0x45b187===_0x28f39c)break;else _0x8828ad['push'](_0x8828ad['shift']());}catch(_0x35018f){_0x8828ad['push'](_0x8828ad['shift']());}}}(a155_0x49e3,0xd817b));import{resolve}from'node:path';import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{logger}from'./utils/logger.js';export{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x38a2ea){return process.env[`RABETBASE_${_0x38a2ea}`]||process.env[`LOVRABET_${_0x38a2ea}`]||undefined;}export async function createContext(_0x5b22a1){const _0x5ec8d1=a155_0x5de2,{config:_0x38f9f4,layers:_0x596e6}=readRawConfigWithLayers(),_0x368611=buildConfig(_0x38f9f4,_0x5b22a1,_0x596e6),{initEnv:_0x4bcf1b}=await import(_0x5ec8d1(0x13a));if(_0x368611[_0x5ec8d1(0x140)])_0x4bcf1b(_0x368611['env']);else _0x5b22a1[_0x5ec8d1(0x140)]&&typeof _0x5b22a1[_0x5ec8d1(0x140)]==='string'&&_0x4bcf1b(_0x5b22a1['env']);const {initDomains:_0x4320fb,getUserDomain:_0x75e1c0,getApiDomain:_0x4ac667}=await import(_0x5ec8d1(0x12e));_0x4320fb({'apiDomain':_0x38f9f4[_0x5ec8d1(0x151)]||undefined,'userDomain':_0x38f9f4[_0x5ec8d1(0x13c)]||undefined,'runtimeDomain':_0x38f9f4[_0x5ec8d1(0x14b)]||undefined});const _0xd63342={'apiDomain':_0x4ac667(),'userDomain':_0x75e1c0()},_0x192786=await buildAuth(_0x368611);logger['setLogPath'](process['cwd']());const _0x14f6b2=(CLI_BIN_NAME+'\x20'+process[_0x5ec8d1(0x12f)]['slice'](0x2)[_0x5ec8d1(0x134)]('\x20'))[_0x5ec8d1(0x12a)]();logger[_0x5ec8d1(0x147)](_0x14f6b2);const {isNonInteractive:_0x42fd55}=await import(_0x5ec8d1(0x138)),_0x5ea063=_0x42fd55(_0x5b22a1);return{'config':_0x368611,'auth':_0x192786,'logger':logger,'env':_0xd63342,'nonInteractive':_0x5ea063};}function a155_0x5de2(_0x886585,_0x1b6e9e){_0x886585=_0x886585-0x129;const _0x49e345=a155_0x49e3();let _0x5de219=_0x49e345[_0x886585];return _0x5de219;}export function buildConfigFromFlags(_0x40b296){const {config:_0x336f2d,layers:_0xd1f925}=readRawConfigWithLayers();return buildConfig(_0x336f2d,_0x40b296,_0xd1f925);}export function getConfigAppCode(_0xaf1494){const _0x5d2370=a155_0x5de2,_0x260f36=readRawConfig(_0xaf1494);if(_0x260f36['apps']&&typeof _0x260f36[_0x5d2370(0x148)]===_0x5d2370(0x13b)){const _0x55f56a=_0x260f36['defaultApp'];if(_0x55f56a&&_0x260f36[_0x5d2370(0x148)][_0x55f56a]?.['appcode'])return String(_0x260f36[_0x5d2370(0x148)][_0x55f56a]['appcode'])[_0x5d2370(0x12a)]();const _0x4dd7cb=Object['values'](_0x260f36[_0x5d2370(0x148)])[0x0];if(_0x4dd7cb?.[_0x5d2370(0x142)])return String(_0x4dd7cb['appcode'])[_0x5d2370(0x12a)]();}const _0x5f275f=_0x260f36[_0x5d2370(0x142)]||_0x260f36['app'];if(typeof _0x5f275f!==_0x5d2370(0x136)||_0x5f275f['trim']()==='')return undefined;return _0x5f275f[_0x5d2370(0x12a)]();}export function getMultiAppConfigs(_0x22b309='project',_0x49f592){const _0x4bb4d7=a155_0x5de2,_0x200ce1=loadRawConfigLayers(_0x49f592);let _0x442e91,_0x4c643f;if(_0x22b309===_0x4bb4d7(0x152)){const _0x343c00=_0x200ce1[_0x4bb4d7(0x143)][_0x4bb4d7(0x148)]&&typeof _0x200ce1[_0x4bb4d7(0x143)][_0x4bb4d7(0x148)]==='object'?_0x200ce1['globalConfig'][_0x4bb4d7(0x148)]:{},_0x4718dd=_0x200ce1['projectConfig'][_0x4bb4d7(0x148)]&&typeof _0x200ce1[_0x4bb4d7(0x12b)][_0x4bb4d7(0x148)]===_0x4bb4d7(0x13b)?_0x200ce1[_0x4bb4d7(0x12b)][_0x4bb4d7(0x148)]:{};_0x442e91={..._0x343c00,..._0x4718dd};const _0x19ce3d=readRawConfig(_0x49f592);_0x4c643f=_0x19ce3d['defaultApp'];}else _0x442e91=_0x200ce1[_0x4bb4d7(0x12b)]['apps'],_0x4c643f=_0x200ce1['projectConfig'][_0x4bb4d7(0x14d)];if(!_0x442e91||typeof _0x442e91!=='object'||Object[_0x4bb4d7(0x14f)](_0x442e91)[_0x4bb4d7(0x14c)]===0x0)return null;return Object['entries'](_0x442e91)[_0x4bb4d7(0x130)](([_0x44568f,_0xd3727f])=>({'name':_0x44568f,'appcode':_0xd3727f?.[_0x4bb4d7(0x142)]||'','isDefault':_0x44568f===_0x4c643f,'env':_0xd3727f?.[_0x4bb4d7(0x140)],'apiDir':_0xd3727f?.[_0x4bb4d7(0x129)],'cookie':_0xd3727f?.[_0x4bb4d7(0x141)]||undefined}))[_0x4bb4d7(0x135)](_0x8609e4=>_0x8609e4[_0x4bb4d7(0x142)]);}export function getTemplateBaseUrl(_0x2207e6){const _0x4efe70=a155_0x5de2,_0x146c45=readRawConfig(_0x2207e6);if(_0x146c45['template_base_url']&&typeof _0x146c45['template_base_url']==='string')return _0x146c45[_0x4efe70(0x149)][_0x4efe70(0x146)](/\/$/,'');return _0x4efe70(0x131);}function buildConfig(_0x16f05c,_0x5d42eb,_0x27e059){return{...resolveAppConfig({'raw':_0x16f05c,'flags':_0x5d42eb,'layers':_0x27e059,'readEnv':env}),'raw':_0x16f05c};}export function resolveApiFilePath(_0x330b69,_0x39bb06){const _0x3bbe6f=a155_0x5de2,_0x594684=resolve(process['cwd'](),_0x330b69),_0x4a0628=resolve(_0x594684,'api.ts');if(!_0x39bb06)return _0x4a0628;const _0x197dfd=readRawConfig(),_0x428883=_0x197dfd[_0x3bbe6f(0x148)]&&typeof _0x197dfd['apps']===_0x3bbe6f(0x13b)?_0x197dfd[_0x3bbe6f(0x148)]:{},_0x9d71f7=Object['entries'](_0x428883)[_0x3bbe6f(0x13f)](([,_0x2c6455])=>_0x2c6455?.[_0x3bbe6f(0x142)]===_0x39bb06);if(!_0x9d71f7)return _0x4a0628;const [_0x26c7e0,_0x233412]=_0x9d71f7,_0x6c181f=typeof _0x197dfd['defaultApp']===_0x3bbe6f(0x136)?_0x197dfd['defaultApp']:undefined;if(_0x233412?.[_0x3bbe6f(0x129)])return _0x4a0628;if(_0x6c181f&&_0x26c7e0!==_0x6c181f)return resolve(_0x594684,_0x26c7e0+_0x3bbe6f(0x132));return _0x4a0628;}function a155_0x49e3(){const _0x334486=['apiDomain','merged','apiDir','trim','projectConfig','11xDXHAr','9KHDKwu','./constant/domain.js','argv','map','https://g.lovrabet.com/dist/lovrabet-skill','-api.ts','10210336CcvYsk','join','filter','string','954552GOSeri','./utils/is-non-interactive.js','1632030xMZySj','./constant/env.js','object','userDomain','38260gQMUaJ','5lkZJmF','find','env','cookie','appcode','globalConfig','231144ZzPfjr','6dVatpG','replace','setRawCommand','apps','template_base_url','81054pKoKtb','runtimeDomain','length','defaultApp','870058warnCy','keys','1810fIYOQO'];a155_0x49e3=function(){return _0x334486;};return a155_0x49e3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x271f2b,_0x54b81e){const _0x4b3ef9=a156_0x4c77,_0x3e145d=_0x271f2b();while(!![]){try{const _0x23deb4=-parseInt(_0x4b3ef9(0x16b))/0x1*(-parseInt(_0x4b3ef9(0x179))/0x2)+parseInt(_0x4b3ef9(0x169))/0x3*(parseInt(_0x4b3ef9(0x168))/0x4)+parseInt(_0x4b3ef9(0x16e))/0x5+-parseInt(_0x4b3ef9(0x175))/0x6+-parseInt(_0x4b3ef9(0x17a))/0x7+parseInt(_0x4b3ef9(0x172))/0x8*(parseInt(_0x4b3ef9(0x174))/0x9)+-parseInt(_0x4b3ef9(0x170))/0xa*(-parseInt(_0x4b3ef9(0x16f))/0xb);if(_0x23deb4===_0x54b81e)break;else _0x3e145d['push'](_0x3e145d['shift']());}catch(_0x4eb69b){_0x3e145d['push'](_0x3e145d['shift']());}}}(a156_0x182f,0x54814));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function a156_0x182f(){const _0x1f5d60=['utf-8','api.ts','cwd','4mvTEDM','4687137dSCueK','2604pjEIsm','1338UwwlLE','set','232923psikAN','get','datasetCode','2279600AwCbQG','190465kVIhIO','250EvuMhT','exec','8vVQThU','alias','121194Zwksir','3856380PTcmyX'];a156_0x182f=function(){return _0x1f5d60;};return a156_0x182f();}function parseApiFile(_0x3ef1e7){const _0x4a9036=a156_0x4c77,_0x1d98ee=[],_0x4b2dc4=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x28aa63;while((_0x28aa63=_0x4b2dc4[_0x4a9036(0x171)](_0x3ef1e7))!==null){_0x1d98ee['push']({'datasetCode':_0x28aa63[0x1],'tableName':_0x28aa63[0x2],'name':_0x28aa63[0x3],'alias':_0x28aa63[0x4]});}return _0x1d98ee;}export function loadAliasMap(_0xc4f54d,_0x55ec9e,_0x2bda7f){const _0x323d91=a156_0x4c77,_0x51e6c3=_0x2bda7f??resolve(process[_0x323d91(0x178)](),_0xc4f54d,_0x323d91(0x177));if(cache['has'](_0x51e6c3))return cache[_0x323d91(0x16c)](_0x51e6c3);if(!existsSync(_0x51e6c3))return cache[_0x323d91(0x16a)](_0x51e6c3,[]),[];try{const _0x3f9c29=readFileSync(_0x51e6c3,_0x323d91(0x176)),_0x27e34b=parseApiFile(_0x3f9c29);return cache[_0x323d91(0x16a)](_0x51e6c3,_0x27e34b),_0x27e34b;}catch{return cache[_0x323d91(0x16a)](_0x51e6c3,[]),[];}}export function resolveAlias(_0x5605ec,_0x156fb9,_0x5801be,_0x48ada1){const _0x22a66b=a156_0x4c77;if(!_0x156fb9)return undefined;const _0x5efd94=loadAliasMap(_0x5605ec,_0x5801be,_0x48ada1),_0x2afacd=_0x5efd94['find'](_0x53cc08=>_0x53cc08[_0x22a66b(0x173)]===_0x156fb9);return _0x2afacd?.[_0x22a66b(0x16d)];}function a156_0x4c77(_0x4caea2,_0x510526){_0x4caea2=_0x4caea2-0x168;const _0x182f14=a156_0x182f();let _0x4c77f6=_0x182f14[_0x4caea2];return _0x4c77f6;}export function listAliases(_0x3bbd92,_0x554170,_0x370232){return loadAliasMap(_0x3bbd92,_0x554170,_0x370232);}
|