@lovrabet/rabetbase-cli 2.3.13-beta.3 → 2.3.13
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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.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-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.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/generate.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-audit.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/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.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/file/index.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/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.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/mutations.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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.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/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.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/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.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/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.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-index-auditor.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/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/commands/sql/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a174_0xe7f959=a174_0x3eae;(function(_0x543f68,_0x444120){const _0x131212=a174_0x3eae,_0x9c7c8d=_0x543f68();while(!![]){try{const _0x2b50ae=-parseInt(_0x131212(0x183))/0x1*(-parseInt(_0x131212(0x181))/0x2)+parseInt(_0x131212(0x199))/0x3*(parseInt(_0x131212(0x1a7))/0x4)+parseInt(_0x131212(0x1a6))/0x5+-parseInt(_0x131212(0x1a1))/0x6+parseInt(_0x131212(0x1ab))/0x7*(parseInt(_0x131212(0x1aa))/0x8)+parseInt(_0x131212(0x18d))/0x9*(parseInt(_0x131212(0x189))/0xa)+parseInt(_0x131212(0x186))/0xb*(-parseInt(_0x131212(0x185))/0xc);if(_0x2b50ae===_0x444120)break;else _0x9c7c8d['push'](_0x9c7c8d['shift']());}catch(_0x3503c9){_0x9c7c8d['push'](_0x9c7c8d['shift']());}}}(a174_0x34d6,0x25a01));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';function a174_0x3eae(_0x715a06,_0x5a99a0){_0x715a06=_0x715a06-0x16f;const _0x34d61e=a174_0x34d6();let _0x3eae15=_0x34d61e[_0x715a06];return _0x3eae15;}import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';function a174_0x34d6(){const _0x2a0236=['10mTrsfj','Local\x20SQL\x20not\x20found:\x20','has','map','1539819waJdrT','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','relativePath','sqlRootDir','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','str','\x20skipped,\x20','lastSync','validation','No\x20local\x20SQL\x20files\x20found.','filePath','Push\x20complete:\x20','3TTDXzB','sqlRoot','No\x20database\x20matches\x20local\x20directory\x20\x22','lockFilePath','filter','force','version','sqlcode','422340DhOADI','sqls','length','boolean','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','1521005DFKuyx','146612WbkFFt','Push\x20local\x20SQL\x20files\x20to\x20remote','exec','392cmUpDw','28959bBYdfN','POST','startsWith','trashDir','bool','unchanged','remoteId','dbDirectory','replace','sqlName','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','get','\x22\x20for\x20sqlCode\x20','/smartapi/custom/updateUserCustomSql','push','sqlCode','dbName','appCode','path','mode','Would\x20push\x20','sqlConfig','dbId','\x20pushed,\x20','\x20SQL\x20file(s)','\x20failed','toISOString','Local\x20directory\x20\x22','136522hffuJl','set','3Teslib','projectRoot','2779752NhLTxZ','33ndNuTf','entries','catch'];a174_0x34d6=function(){return _0x2a0236;};return a174_0x34d6();}import{fileExists}from'../../core/bff/file-system.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x3db009,_0x2a995b,_0x2f7f57){const _0x19f6fa=a174_0x3eae,_0x245c63=await scanLocalSqlQueries(_0x3db009),_0xb4da8f=new Map();for(const _0x4ee655 of _0x245c63){if(_0x2f7f57&&_0x4ee655['sqlCode']!==_0x2f7f57)continue;const _0x5c5f8a=_0xb4da8f[_0x19f6fa(0x170)](_0x4ee655[_0x19f6fa(0x174)])??[];_0x5c5f8a[_0x19f6fa(0x173)](_0x4ee655),_0xb4da8f[_0x19f6fa(0x182)](_0x4ee655[_0x19f6fa(0x174)],_0x5c5f8a);}if(_0x2f7f57&&!_0xb4da8f[_0x19f6fa(0x18b)](_0x2f7f57))throw CliErrors[_0x19f6fa(0x195)](_0x19f6fa(0x18a)+_0x2f7f57);const _0x45dde4=[];for(const [_0x2469b4,_0x42abe7]of _0xb4da8f[_0x19f6fa(0x187)]()){if(_0x42abe7[_0x19f6fa(0x1a3)]===0x1){_0x45dde4['push'](_0x42abe7[0x0]);continue;}const _0x386f07=_0x2a995b[_0x19f6fa(0x1a2)][_0x2469b4],_0x14584a=_0x386f07?.[_0x19f6fa(0x177)],_0x5177ae=_0x14584a?_0x42abe7[_0x19f6fa(0x19d)](_0x427d5c=>_0x427d5c['relativePath']!==_0x14584a):_0x42abe7;if(_0x386f07&&_0x5177ae[_0x19f6fa(0x1a3)]===0x1){_0x45dde4[_0x19f6fa(0x173)](_0x5177ae[0x0]);continue;}throw CliErrors[_0x19f6fa(0x195)](_0x19f6fa(0x18e)+_0x2469b4+'.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.');}return _0x45dde4;}export const sqlPush={'service':'sql','command':'push','description':a174_0xe7f959(0x1a8),'risk':'high-risk-write','flags':[SQLCODE_FLAG_OPTIONAL,{'name':a174_0xe7f959(0x19e),'type':a174_0xe7f959(0x1a4),'description':a174_0xe7f959(0x1a5)}],async 'dryRun'(_0x50edbf){const _0x17faa1=a174_0xe7f959,_0x55aa15=loadSqlProjectConfig(_0x50edbf[_0x17faa1(0x176)]),_0x46f209=await readSqlLockFile(_0x55aa15[_0x17faa1(0x19c)]),{appLock:_0x3b18f3}=ensureSqlLockScope(_0x46f209??createEmptySqlLock(),_0x50edbf[_0x17faa1(0x176)],_0x55aa15[_0x17faa1(0x19a)],'push'),_0x2afc3b=await getTargetSqlQueries(_0x55aa15,_0x3b18f3,_0x50edbf[_0x17faa1(0x192)]('sqlcode')||undefined),_0x476331=[];for(const _0x1ab07d of _0x2afc3b){const _0x595d25=await computeSqlFileHash(_0x1ab07d[_0x17faa1(0x197)]),_0x55b933=_0x3b18f3['sqls'][_0x1ab07d[_0x17faa1(0x174)]],_0x269334=!!_0x55b933&&(_0x55b933[_0x17faa1(0x177)]!==_0x1ab07d[_0x17faa1(0x18f)]||!!_0x1ab07d[_0x17faa1(0x1b4)]&&_0x55b933[_0x17faa1(0x1b4)]!==_0x1ab07d[_0x17faa1(0x1b4)]);if(!_0x50edbf[_0x17faa1(0x1af)]('force')&&_0x55b933&&_0x55b933['hash']===_0x595d25&&!_0x269334)continue;_0x476331[_0x17faa1(0x173)](_0x1ab07d[_0x17faa1(0x174)]);}return{'method':_0x17faa1(0x1ac),'url':_0x17faa1(0x172),'body':{'sqlCodes':_0x476331,'appCode':_0x50edbf['appCode']},'description':_0x17faa1(0x179)+_0x476331[_0x17faa1(0x1a3)]+_0x17faa1(0x17d)};},async 'execute'(_0x4aff68){const _0x127875=a174_0xe7f959,_0x4fb347=loadSqlProjectConfig(_0x4aff68['appCode']),_0xc40571=await readSqlLockFile(_0x4fb347['lockFilePath']),{lockData:_0x1aa6b1,appLock:_0x504726}=ensureSqlLockScope(_0xc40571??createEmptySqlLock(),_0x4aff68[_0x127875(0x176)],_0x4fb347[_0x127875(0x19a)],'push'),_0x454290=await getTargetSqlQueries(_0x4fb347,_0x504726,_0x4aff68['str'](_0x127875(0x1a0))||undefined);if(_0x454290[_0x127875(0x1a3)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x127875(0x196)};const _0x29857c=[],_0x450343=[],_0x16777a=[];for(const _0x2e41f6 of _0x454290){const _0x1b9169=_0x504726[_0x127875(0x1a2)][_0x2e41f6[_0x127875(0x174)]];if(!_0x1b9169){_0x16777a['push']({'sqlCode':_0x2e41f6[_0x127875(0x174)],'error':_0x127875(0x16f)});continue;}try{const _0x5ef864=await computeSqlFileHash(_0x2e41f6['filePath']),_0x4b7e2a=_0x1b9169[_0x127875(0x177)]!==_0x2e41f6[_0x127875(0x18f)]||!!_0x2e41f6[_0x127875(0x1b4)]&&_0x1b9169[_0x127875(0x1b4)]!==_0x2e41f6[_0x127875(0x1b4)];if(!_0x4aff68[_0x127875(0x1af)](_0x127875(0x19e))&&_0x1b9169['hash']===_0x5ef864&&!_0x4b7e2a){_0x450343[_0x127875(0x173)]({'sqlCode':_0x2e41f6[_0x127875(0x174)],'reason':_0x127875(0x1b0)});continue;}if(_0x1b9169[_0x127875(0x19f)]==null){_0x16777a[_0x127875(0x173)]({'sqlCode':_0x2e41f6[_0x127875(0x174)],'error':_0x127875(0x191)});continue;}const _0x27fff0=await readFile(_0x2e41f6[_0x127875(0x197)],'utf8'),_0x42bee6=stripLocalSqlMetadata(_0x27fff0,_0x2e41f6[_0x127875(0x178)]),_0x5e20a5=_0x2e41f6[_0x127875(0x1b4)]||_0x1b9169['sqlName'],_0x48363e=await resolveTargetDbBinding(_0x4aff68[_0x127875(0x176)],_0x2e41f6,_0x1b9169),_0x1d1132=await updateSqlQuery({'id':_0x1b9169['remoteId'],'appCode':_0x4aff68[_0x127875(0x176)],'sqlCode':_0x2e41f6['sqlCode'],'sqlName':_0x5e20a5,'dbId':_0x48363e[_0x127875(0x17b)],'version':_0x1b9169[_0x127875(0x19f)],'sqlContent':_0x42bee6,'sqlConfig':_0x1b9169[_0x127875(0x17a)]??undefined}),_0x3a2c3c=_0x1d1132[_0x127875(0x17b)]?await getDbName(_0x4aff68[_0x127875(0x176)],Number(_0x1d1132[_0x127875(0x17b)]))[_0x127875(0x188)](()=>_0x48363e[_0x127875(0x175)]):_0x48363e[_0x127875(0x175)];_0x504726[_0x127875(0x1a2)][_0x2e41f6['sqlCode']]={...buildSqlLockEntry(_0x1d1132,_0x42bee6,_0x5ef864,{'dbName':_0x3a2c3c}),'path':_0x2e41f6[_0x127875(0x18f)],'mode':_0x1b9169[_0x127875(0x178)]},await archivePreviousSqlFileIfNeeded(_0x4fb347,_0x1b9169[_0x127875(0x177)],_0x2e41f6[_0x127875(0x18f)]),_0x29857c[_0x127875(0x173)]({'sqlCode':_0x2e41f6['sqlCode'],'remoteId':_0x1b9169[_0x127875(0x1b1)]});}catch(_0x58f2b2){_0x16777a['push']({'sqlCode':_0x2e41f6[_0x127875(0x174)],'error':_0x58f2b2 instanceof Error?_0x58f2b2['message']:String(_0x58f2b2)});}}return _0x504726[_0x127875(0x194)]=new Date()[_0x127875(0x17f)](),await writeSqlLockFile(_0x4fb347[_0x127875(0x19c)],_0x1aa6b1),{'ok':_0x16777a['length']===0x0,'data':{'pushed':_0x29857c,'skipped':_0x450343,'failed':_0x16777a},'message':_0x127875(0x198)+_0x29857c[_0x127875(0x1a3)]+_0x127875(0x17c)+_0x450343[_0x127875(0x1a3)]+_0x127875(0x193)+_0x16777a[_0x127875(0x1a3)]+_0x127875(0x17e)};}};async function archivePreviousSqlFileIfNeeded(_0x585b27,_0x4f58dc,_0x42c92b){const _0x1c5076=a174_0xe7f959;if(!_0x4f58dc||_0x4f58dc===_0x42c92b)return;const _0x220bc8=join(_0x585b27[_0x1c5076(0x190)],_0x4f58dc);if(!await fileExists(_0x220bc8))return;const _0x4fd7b5=await moveToTrash(_0x585b27[_0x1c5076(0x184)],_0x585b27[_0x1c5076(0x1ae)],_0x220bc8);await cleanupEmptyDirectories(dirname(_0x220bc8),_0x585b27[_0x1c5076(0x190)]),void _0x4fd7b5;}async function moveToTrash(_0x14b4ef,_0x268426,_0x310f0a){const _0x5b90fc=a174_0xe7f959,_0x346581=new Date()[_0x5b90fc(0x17f)]()[_0x5b90fc(0x1b3)](/[:.]/g,'-'),_0x498a23=relative(_0x14b4ef,_0x310f0a),_0x1daa1b=join(_0x268426,_0x346581,_0x498a23);return await mkdir(dirname(_0x1daa1b),{'recursive':!![]}),await rename(_0x310f0a,_0x1daa1b),_0x1daa1b;}async function cleanupEmptyDirectories(_0x55b477,_0x5e6126){const _0x42e22e=a174_0xe7f959;let _0x2edc09=resolve(_0x55b477);const _0x44f65f=resolve(_0x5e6126);while(_0x2edc09[_0x42e22e(0x1ad)](''+_0x44f65f+sep)||_0x2edc09===_0x44f65f){if(_0x2edc09===_0x44f65f)return;try{const _0x32a791=await readdir(_0x2edc09);if(_0x32a791[_0x42e22e(0x1a3)]>0x0)return;await rmdir(_0x2edc09);}catch{return;}_0x2edc09=dirname(_0x2edc09);}}async function resolveTargetDbBinding(_0x146e69,_0x2a0379,_0x5bf052){const _0x2085e2=a174_0xe7f959,_0x368577=_0x2a0379[_0x2085e2(0x1b2)];if(!_0x368577)return{'dbId':_0x5bf052[_0x2085e2(0x17b)],'dbName':_0x5bf052[_0x2085e2(0x175)]};const _0xce1b1=buildDbDirectoryName(_0x5bf052[_0x2085e2(0x175)],_0x5bf052[_0x2085e2(0x17b)]);if(_0x368577===_0xce1b1)return{'dbId':_0x5bf052[_0x2085e2(0x17b)],'dbName':_0x5bf052['dbName']};const _0x295742=parseExplicitDbDirectory(_0x368577);if(_0x295742!=null)return{'dbId':_0x295742,'dbName':await getDbName(_0x146e69,_0x295742)[_0x2085e2(0x188)](()=>undefined)};const _0x41596e=await listDatabases(_0x146e69),_0x254fd2=_0x41596e['filter'](_0x469da5=>buildDbDirectoryName(_0x469da5[_0x2085e2(0x175)],_0x469da5[_0x2085e2(0x17b)])===_0x368577);if(_0x254fd2[_0x2085e2(0x1a3)]===0x1)return{'dbId':_0x254fd2[0x0][_0x2085e2(0x17b)],'dbName':_0x254fd2[0x0][_0x2085e2(0x175)]};if(_0x254fd2['length']===0x0)throw CliErrors['validation'](_0x2085e2(0x19b)+_0x368577+_0x2085e2(0x171)+_0x2a0379[_0x2085e2(0x174)]+'.');const _0x4a5cd9=_0x254fd2[_0x2085e2(0x18c)](_0x37f82a=>_0x37f82a[_0x2085e2(0x175)]+'\x20('+_0x37f82a[_0x2085e2(0x17b)]+')')['join'](',\x20');throw CliErrors[_0x2085e2(0x195)](_0x2085e2(0x180)+_0x368577+'\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20'+_0x2a0379[_0x2085e2(0x174)]+':\x20'+_0x4a5cd9);}function parseExplicitDbDirectory(_0x5cc311){const _0x4644fe=a174_0xe7f959,_0x349f32=/^db-(\d+)$/[_0x4644fe(0x1a9)](_0x5cc311);if(!_0x349f32)return null;const _0x4e9973=Number(_0x349f32[0x1]);return Number['isFinite'](_0x4e9973)&&_0x4e9973>0x0?_0x4e9973:null;}
|
|
1
|
+
const a174_0x21cb4e=a174_0xe9ae;(function(_0x173693,_0x248571){const _0x35a777=a174_0xe9ae,_0x51e590=_0x173693();while(!![]){try{const _0x31b114=parseInt(_0x35a777(0xae))/0x1+-parseInt(_0x35a777(0x8f))/0x2*(parseInt(_0x35a777(0x7c))/0x3)+parseInt(_0x35a777(0xb1))/0x4*(parseInt(_0x35a777(0x8a))/0x5)+parseInt(_0x35a777(0x88))/0x6*(parseInt(_0x35a777(0x99))/0x7)+parseInt(_0x35a777(0x9f))/0x8*(-parseInt(_0x35a777(0xa9))/0x9)+-parseInt(_0x35a777(0xa8))/0xa*(parseInt(_0x35a777(0x87))/0xb)+-parseInt(_0x35a777(0x97))/0xc*(-parseInt(_0x35a777(0x9b))/0xd);if(_0x31b114===_0x248571)break;else _0x51e590['push'](_0x51e590['shift']());}catch(_0x5a32e0){_0x51e590['push'](_0x51e590['shift']());}}}(a174_0x2fce,0x58744));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{fileExists}from'../../core/bff/file-system.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x53ac07,_0x8987b2,_0x2bdfdc){const _0x364d5f=a174_0xe9ae,_0xfeed22=await scanLocalSqlQueries(_0x53ac07),_0x2f138c=new Map();for(const _0x50115f of _0xfeed22){if(_0x2bdfdc&&_0x50115f[_0x364d5f(0x81)]!==_0x2bdfdc)continue;const _0xe5b137=_0x2f138c[_0x364d5f(0xa0)](_0x50115f['sqlCode'])??[];_0xe5b137['push'](_0x50115f),_0x2f138c['set'](_0x50115f[_0x364d5f(0x81)],_0xe5b137);}if(_0x2bdfdc&&!_0x2f138c[_0x364d5f(0x9e)](_0x2bdfdc))throw CliErrors['validation'](_0x364d5f(0xb4)+_0x2bdfdc);const _0x4929c7=[];for(const [_0x3e7e94,_0x503f6c]of _0x2f138c['entries']()){if(_0x503f6c[_0x364d5f(0x9c)]===0x1){_0x4929c7['push'](_0x503f6c[0x0]);continue;}const _0x18ac56=_0x8987b2['sqls'][_0x3e7e94],_0x4dd262=_0x18ac56?.[_0x364d5f(0xaa)],_0x5a5e92=_0x4dd262?_0x503f6c[_0x364d5f(0xad)](_0x6ca02f=>_0x6ca02f[_0x364d5f(0x92)]!==_0x4dd262):_0x503f6c;if(_0x18ac56&&_0x5a5e92[_0x364d5f(0x9c)]===0x1){_0x4929c7[_0x364d5f(0xac)](_0x5a5e92[0x0]);continue;}throw CliErrors[_0x364d5f(0xb2)]('Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20'+_0x3e7e94+'.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.');}return _0x4929c7;}export const sqlPush={'service':a174_0x21cb4e(0x84),'command':'push','description':'Push\x20local\x20SQL\x20files\x20to\x20remote','risk':'high-risk-write','flags':[SQLCODE_FLAG_OPTIONAL,{'name':a174_0x21cb4e(0xb0),'type':a174_0x21cb4e(0x82),'description':a174_0x21cb4e(0xa4)}],async 'dryRun'(_0x419734){const _0x351fa2=a174_0x21cb4e,_0x4bc37b=loadSqlProjectConfig(_0x419734[_0x351fa2(0xb3)]),_0x2d187e=await readSqlLockFile(_0x4bc37b['lockFilePath']),{appLock:_0xb5057e}=ensureSqlLockScope(_0x2d187e??createEmptySqlLock(),_0x419734[_0x351fa2(0xb3)],_0x4bc37b[_0x351fa2(0xab)],_0x351fa2(0xac)),_0x238359=await getTargetSqlQueries(_0x4bc37b,_0xb5057e,_0x419734[_0x351fa2(0x7d)](_0x351fa2(0xb9))||undefined),_0x3e0fc1=[];for(const _0x443f67 of _0x238359){const _0x9347d0=await computeSqlFileHash(_0x443f67[_0x351fa2(0xb7)]),_0x5119e7=_0xb5057e[_0x351fa2(0x94)][_0x443f67[_0x351fa2(0x81)]],_0x19e4e5=!!_0x5119e7&&(_0x5119e7[_0x351fa2(0xaa)]!==_0x443f67[_0x351fa2(0x92)]||!!_0x443f67[_0x351fa2(0xa6)]&&_0x5119e7[_0x351fa2(0xa6)]!==_0x443f67[_0x351fa2(0xa6)]);if(!_0x419734['bool'](_0x351fa2(0xb0))&&_0x5119e7&&_0x5119e7[_0x351fa2(0xb8)]===_0x9347d0&&!_0x19e4e5)continue;_0x3e0fc1[_0x351fa2(0xac)](_0x443f67[_0x351fa2(0x81)]);}return{'method':'POST','url':'/smartapi/custom/updateUserCustomSql','body':{'sqlCodes':_0x3e0fc1,'appCode':_0x419734[_0x351fa2(0xb3)]},'description':_0x351fa2(0x86)+_0x3e0fc1[_0x351fa2(0x9c)]+_0x351fa2(0x85)};},async 'execute'(_0x1f1404){const _0x507dec=a174_0x21cb4e,_0x44a72c=loadSqlProjectConfig(_0x1f1404[_0x507dec(0xb3)]),_0x5116fc=await readSqlLockFile(_0x44a72c[_0x507dec(0x90)]),{lockData:_0x555206,appLock:_0x1d0481}=ensureSqlLockScope(_0x5116fc??createEmptySqlLock(),_0x1f1404[_0x507dec(0xb3)],_0x44a72c[_0x507dec(0xab)],_0x507dec(0xac)),_0x53c817=await getTargetSqlQueries(_0x44a72c,_0x1d0481,_0x1f1404[_0x507dec(0x7d)](_0x507dec(0xb9))||undefined);if(_0x53c817[_0x507dec(0x9c)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':'No\x20local\x20SQL\x20files\x20found.'};const _0x188882=[],_0x4f906a=[],_0x3ced26=[];for(const _0x25ca9c of _0x53c817){const _0x29725d=_0x1d0481[_0x507dec(0x94)][_0x25ca9c['sqlCode']];if(!_0x29725d){_0x3ced26[_0x507dec(0xac)]({'sqlCode':_0x25ca9c[_0x507dec(0x81)],'error':_0x507dec(0x89)});continue;}try{const _0x31490d=await computeSqlFileHash(_0x25ca9c[_0x507dec(0xb7)]),_0x2c7e10=_0x29725d[_0x507dec(0xaa)]!==_0x25ca9c['relativePath']||!!_0x25ca9c[_0x507dec(0xa6)]&&_0x29725d[_0x507dec(0xa6)]!==_0x25ca9c[_0x507dec(0xa6)];if(!_0x1f1404[_0x507dec(0xaf)]('force')&&_0x29725d['hash']===_0x31490d&&!_0x2c7e10){_0x4f906a[_0x507dec(0xac)]({'sqlCode':_0x25ca9c[_0x507dec(0x81)],'reason':_0x507dec(0x98)});continue;}if(_0x29725d[_0x507dec(0xa2)]==null){_0x3ced26[_0x507dec(0xac)]({'sqlCode':_0x25ca9c[_0x507dec(0x81)],'error':'missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first'});continue;}const _0x5308b5=await readFile(_0x25ca9c['filePath'],_0x507dec(0xa3)),_0xc603f7=stripLocalSqlMetadata(_0x5308b5,_0x25ca9c[_0x507dec(0x96)]),_0x2eb49e=_0x25ca9c[_0x507dec(0xa6)]||_0x29725d[_0x507dec(0xa6)],_0x11edee=await resolveTargetDbBinding(_0x1f1404[_0x507dec(0xb3)],_0x25ca9c,_0x29725d),_0x2f6b8a=await updateSqlQuery({'id':_0x29725d[_0x507dec(0x95)],'appCode':_0x1f1404['appCode'],'sqlCode':_0x25ca9c[_0x507dec(0x81)],'sqlName':_0x2eb49e,'dbId':_0x11edee[_0x507dec(0x91)],'version':_0x29725d[_0x507dec(0xa2)],'sqlContent':_0xc603f7,'sqlConfig':_0x29725d[_0x507dec(0xa7)]??undefined}),_0x5a0fb8=_0x2f6b8a[_0x507dec(0x91)]?await getDbName(_0x1f1404[_0x507dec(0xb3)],Number(_0x2f6b8a[_0x507dec(0x91)]))[_0x507dec(0x83)](()=>_0x11edee[_0x507dec(0x8b)]):_0x11edee[_0x507dec(0x8b)];_0x1d0481[_0x507dec(0x94)][_0x25ca9c['sqlCode']]={...buildSqlLockEntry(_0x2f6b8a,_0xc603f7,_0x31490d,{'dbName':_0x5a0fb8}),'path':_0x25ca9c[_0x507dec(0x92)],'mode':_0x29725d[_0x507dec(0x96)]},await archivePreviousSqlFileIfNeeded(_0x44a72c,_0x29725d[_0x507dec(0xaa)],_0x25ca9c['relativePath']),_0x188882[_0x507dec(0xac)]({'sqlCode':_0x25ca9c[_0x507dec(0x81)],'remoteId':_0x29725d[_0x507dec(0x95)]});}catch(_0x2d8867){_0x3ced26[_0x507dec(0xac)]({'sqlCode':_0x25ca9c['sqlCode'],'error':_0x2d8867 instanceof Error?_0x2d8867[_0x507dec(0x9d)]:String(_0x2d8867)});}}return _0x1d0481[_0x507dec(0xbb)]=new Date()[_0x507dec(0x8c)](),await writeSqlLockFile(_0x44a72c['lockFilePath'],_0x555206),{'ok':_0x3ced26['length']===0x0,'data':{'pushed':_0x188882,'skipped':_0x4f906a,'failed':_0x3ced26},'message':_0x507dec(0xa5)+_0x188882[_0x507dec(0x9c)]+'\x20pushed,\x20'+_0x4f906a[_0x507dec(0x9c)]+'\x20skipped,\x20'+_0x3ced26['length']+_0x507dec(0xb6)};}};async function archivePreviousSqlFileIfNeeded(_0x533146,_0x298ec7,_0xfef381){const _0x94d76f=a174_0x21cb4e;if(!_0x298ec7||_0x298ec7===_0xfef381)return;const _0x51ce79=join(_0x533146['sqlRootDir'],_0x298ec7);if(!await fileExists(_0x51ce79))return;const _0x92d897=await moveToTrash(_0x533146[_0x94d76f(0x8d)],_0x533146[_0x94d76f(0x80)],_0x51ce79);await cleanupEmptyDirectories(dirname(_0x51ce79),_0x533146[_0x94d76f(0xba)]),void _0x92d897;}async function moveToTrash(_0x1dfb4e,_0x701daa,_0x1c179d){const _0x5576f7=a174_0x21cb4e,_0x36cf5e=new Date()[_0x5576f7(0x8c)]()['replace'](/[:.]/g,'-'),_0x1301bc=relative(_0x1dfb4e,_0x1c179d),_0x30e23c=join(_0x701daa,_0x36cf5e,_0x1301bc);return await mkdir(dirname(_0x30e23c),{'recursive':!![]}),await rename(_0x1c179d,_0x30e23c),_0x30e23c;}async function cleanupEmptyDirectories(_0x1198dd,_0xfbb575){const _0x21ab00=a174_0x21cb4e;let _0x44daa1=resolve(_0x1198dd);const _0xd0cd29=resolve(_0xfbb575);while(_0x44daa1[_0x21ab00(0xb5)](''+_0xd0cd29+sep)||_0x44daa1===_0xd0cd29){if(_0x44daa1===_0xd0cd29)return;try{const _0x4809f7=await readdir(_0x44daa1);if(_0x4809f7[_0x21ab00(0x9c)]>0x0)return;await rmdir(_0x44daa1);}catch{return;}_0x44daa1=dirname(_0x44daa1);}}function a174_0xe9ae(_0x2cab8f,_0x5ecf73){_0x2cab8f=_0x2cab8f-0x7c;const _0x2fce02=a174_0x2fce();let _0xe9ae5a=_0x2fce02[_0x2cab8f];return _0xe9ae5a;}function a174_0x2fce(){const _0x3ca7ab=['Local\x20SQL\x20not\x20found:\x20','startsWith','\x20failed','filePath','hash','sqlcode','sqlRootDir','lastSync','1050474xKqAdw','str','Local\x20directory\x20\x22','isFinite','trashDir','sqlCode','boolean','catch','sql','\x20SQL\x20file(s)','Would\x20push\x20','235653uygvdm','773646TivieL','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','35TTxnWy','dbName','toISOString','projectRoot','join','2CXIUey','lockFilePath','dbId','relativePath','map','sqls','remoteId','mode','37644GbzJYG','unchanged','14ZtSYsx','dbDirectory','559WtdlTC','length','message','has','43752bHbGgI','get','No\x20database\x20matches\x20local\x20directory\x20\x22','version','utf8','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','Push\x20complete:\x20','sqlName','sqlConfig','50MnShWm','1125IwIGsf','path','sqlRoot','push','filter','387998wgnqEV','bool','force','412820OzbKQK','validation','appCode'];a174_0x2fce=function(){return _0x3ca7ab;};return a174_0x2fce();}async function resolveTargetDbBinding(_0x1f43bb,_0x2daa0c,_0x383312){const _0x200564=a174_0x21cb4e,_0x23586d=_0x2daa0c[_0x200564(0x9a)];if(!_0x23586d)return{'dbId':_0x383312['dbId'],'dbName':_0x383312[_0x200564(0x8b)]};const _0x55709c=buildDbDirectoryName(_0x383312[_0x200564(0x8b)],_0x383312[_0x200564(0x91)]);if(_0x23586d===_0x55709c)return{'dbId':_0x383312[_0x200564(0x91)],'dbName':_0x383312[_0x200564(0x8b)]};const _0x3ee2a4=parseExplicitDbDirectory(_0x23586d);if(_0x3ee2a4!=null)return{'dbId':_0x3ee2a4,'dbName':await getDbName(_0x1f43bb,_0x3ee2a4)['catch'](()=>undefined)};const _0x568265=await listDatabases(_0x1f43bb),_0x553a8b=_0x568265[_0x200564(0xad)](_0x3a65bd=>buildDbDirectoryName(_0x3a65bd['dbName'],_0x3a65bd[_0x200564(0x91)])===_0x23586d);if(_0x553a8b[_0x200564(0x9c)]===0x1)return{'dbId':_0x553a8b[0x0][_0x200564(0x91)],'dbName':_0x553a8b[0x0]['dbName']};if(_0x553a8b[_0x200564(0x9c)]===0x0)throw CliErrors['validation'](_0x200564(0xa1)+_0x23586d+'\x22\x20for\x20sqlCode\x20'+_0x2daa0c['sqlCode']+'.');const _0x5d4ae2=_0x553a8b[_0x200564(0x93)](_0x8fcb42=>_0x8fcb42[_0x200564(0x8b)]+'\x20('+_0x8fcb42[_0x200564(0x91)]+')')[_0x200564(0x8e)](',\x20');throw CliErrors['validation'](_0x200564(0x7e)+_0x23586d+'\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20'+_0x2daa0c[_0x200564(0x81)]+':\x20'+_0x5d4ae2);}function parseExplicitDbDirectory(_0x40396b){const _0x27c112=a174_0x21cb4e,_0x42fd4d=/^db-(\d+)$/['exec'](_0x40396b);if(!_0x42fd4d)return null;const _0x1b89d9=Number(_0x42fd4d[0x1]);return Number[_0x27c112(0x7f)](_0x1b89d9)&&_0x1b89d9>0x0?_0x1b89d9:null;}
|
package/lib/commands/sql/save.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a175_0x3dcea7=a175_0x1331;(function(_0x561817,_0x4df36d){const _0x8eef37=a175_0x1331,_0x393468=_0x561817();while(!![]){try{const _0x262b7a=-parseInt(_0x8eef37(0xff))/0x1+-parseInt(_0x8eef37(0x100))/0x2+-parseInt(_0x8eef37(0x10e))/0x3*(parseInt(_0x8eef37(0xfe))/0x4)+-parseInt(_0x8eef37(0x102))/0x5+parseInt(_0x8eef37(0xfd))/0x6+-parseInt(_0x8eef37(0x111))/0x7+-parseInt(_0x8eef37(0x106))/0x8*(-parseInt(_0x8eef37(0x10b))/0x9);if(_0x262b7a===_0x4df36d)break;else _0x393468['push'](_0x393468['shift']());}catch(_0x371020){_0x393468['push'](_0x393468['shift']());}}}(a175_0x3d72,0x7e4ee));function a175_0x1331(_0x411280,_0x1b1990){_0x411280=_0x411280-0xfc;const _0x3d7274=a175_0x3d72();let _0x13317a=_0x3d7274[_0x411280];return _0x13317a;}import{CliErrors}from'../../errors.js';function a175_0x3d72(){const _0x3899e2=['sql','sqlname','22849704lMwWzF','string','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','12amnAmX','description','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','5882499DVXoDj','SQL\x20query\x20display\x20name','1376112CiKgWZ','583868dmmqhZ','206148mPqLpH','4268gYCKQN','file','3091715lwPIGp','join','save','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','8HswanU','Query\x20description','validation'];a175_0x3d72=function(){return _0x3899e2;};return a175_0x3d72();}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=[a175_0x3dcea7(0x105),a175_0x3dcea7(0x10d),'Update\x20existing\x20SQL\x20by\x20editing\x20the\x20synced\x20file\x20under\x20`.rabetbase/sql/<appCode>/<dbName|db-<id>>/`\x20and\x20then\x20running\x20`rabetbase\x20sql\x20push\x20--sqlcode\x20<code>\x20--yes`.'][a175_0x3dcea7(0x103)]('\x0a');export const sqlSave={'service':a175_0x3dcea7(0x109),'command':a175_0x3dcea7(0x104),'description':'Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a175_0x3dcea7(0x101),'type':a175_0x3dcea7(0x10c),'required':!![],'description':'Path\x20to\x20the\x20SQL\x20file'},SQLCODE_FLAG_OPTIONAL,{'name':a175_0x3dcea7(0x10a),'type':a175_0x3dcea7(0x10c),'description':a175_0x3dcea7(0xfc)},{'name':'db','type':a175_0x3dcea7(0x10c),'description':a175_0x3dcea7(0x110)},{'name':a175_0x3dcea7(0x10f),'type':a175_0x3dcea7(0x10c),'description':a175_0x3dcea7(0x107)}],async 'validate'(){const _0x4f0bfa=a175_0x3dcea7;throw CliErrors[_0x4f0bfa(0x108)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x2ac9b5=a175_0x3dcea7;throw CliErrors[_0x2ac9b5(0x108)](SQL_SAVE_DEPRECATED_HINT);}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a176_0x378d(){const _0x17172a=['248XEMlJf','4686645fZDdLC','map','691914Gbqzlg','dbId','toLowerCase','stderr','mybatisXml','sqlRoot','trimStart','--\x20@lovrabet.','path','1717779RVSlfQ','\x20-->','\x20[y/N]\x20','20082610MMclTq','<!--\x20@lovrabet.','split','length','dbName','question','apps','endsWith','fromEntries','join','test','sqlName','1792770OamKpW','254511BTHecp','description','1313971iyuYmT','filter','7yGWQXg','sqlContent','sqlCode','stdin','.rabetbase/sql','mode','close','replace','push','syncedAt','includes','4zcLWdF','version','trim','sqls'];a176_0x378d=function(){return _0x17172a;};return a176_0x378d();}const a176_0x3f91b2=a176_0x351c;function a176_0x351c(_0x336888,_0x1bec2b){_0x336888=_0x336888-0x177;const _0x378df3=a176_0x378d();let _0x351c7b=_0x378df3[_0x336888];return _0x351c7b;}(function(_0x5180f2,_0x5a0e14){const _0x26ae2e=a176_0x351c,_0x2e8e7c=_0x5180f2();while(!![]){try{const _0xe2e80e=parseInt(_0x26ae2e(0x19a))/0x1+parseInt(_0x26ae2e(0x197))/0x2+parseInt(_0x26ae2e(0x188))/0x3+-parseInt(_0x26ae2e(0x178))/0x4*(parseInt(_0x26ae2e(0x17d))/0x5)+-parseInt(_0x26ae2e(0x17f))/0x6*(-parseInt(_0x26ae2e(0x19c))/0x7)+-parseInt(_0x26ae2e(0x17c))/0x8*(-parseInt(_0x26ae2e(0x198))/0x9)+-parseInt(_0x26ae2e(0x18b))/0xa;if(_0xe2e80e===_0x5a0e14)break;else _0x2e8e7c['push'](_0x2e8e7c['shift']());}catch(_0x411ebf){_0x2e8e7c['push'](_0x2e8e7c['shift']());}}}(a176_0x378d,0xca78f));import{createInterface}from'node:readline';import{join}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';export const SQL_LOCAL_REL_DIR=a176_0x3f91b2(0x1a0);export function buildSqlLockEntry(_0x90b5a9,_0x304051,_0x3ccc92,_0x4795fd){const _0x4fc128=a176_0x3f91b2,_0x4f5e08=detectSqlMode(_0x304051);return{'path':buildSqlRelativePath(_0x90b5a9['sqlCode'],_0x90b5a9['sqlName'],_0x4795fd?.[_0x4fc128(0x18f)],_0x4f5e08,_0x90b5a9[_0x4fc128(0x180)]),'hash':_0x3ccc92,'remoteId':_0x90b5a9['id'],'version':_0x90b5a9[_0x4fc128(0x179)],'dbId':Number(_0x90b5a9[_0x4fc128(0x180)]),'dbName':_0x4795fd?.['dbName'],'sqlName':_0x90b5a9[_0x4fc128(0x196)],'sqlConfig':_0x90b5a9['sqlConfig']??undefined,'mode':_0x4f5e08};}export function cloneSqlLockData(_0x518afe){const _0x2ba9f1=a176_0x3f91b2;return{'apps':Object[_0x2ba9f1(0x193)](Object['entries'](_0x518afe[_0x2ba9f1(0x191)])['map'](([_0x454f3d,_0x5586fd])=>[_0x454f3d,{'sqlRoot':_0x5586fd[_0x2ba9f1(0x184)],'lastSync':_0x5586fd['lastSync'],'sqls':{..._0x5586fd[_0x2ba9f1(0x17b)]}}]))};}export function ensureRemoteSqlContent(_0x3db2f8){const _0x5d3a69=a176_0x3f91b2;return _0x3db2f8[_0x5d3a69(0x19d)]??'';}export function buildLocalSqlFileContent(_0x2962be,_0x205933,_0x2ad6a7){const _0x37ac71=a176_0x3f91b2,_0x1ec5c8=_0x2ad6a7?.[_0x37ac71(0x1a1)]??detectSqlMode(_0x205933),_0x4bfaa3=stripLocalSqlMetadata(_0x205933,_0x1ec5c8)[_0x37ac71(0x17a)](),_0x33ad08=[...buildMetadataHeaderLines({'sqlCode':_0x2962be[_0x37ac71(0x19e)],'sqlName':_0x2962be[_0x37ac71(0x196)],'dbId':_0x2962be[_0x37ac71(0x180)],'dbName':_0x2ad6a7?.['dbName'],'mode':_0x1ec5c8,'syncedAt':_0x2ad6a7?.[_0x37ac71(0x1a5)],'description':_0x2ad6a7?.[_0x37ac71(0x199)]},_0x1ec5c8),'',_0x4bfaa3],_0x2f3f4d=_0x33ad08[_0x37ac71(0x194)]('\x0a');return _0x2f3f4d[_0x37ac71(0x192)]('\x0a')?_0x2f3f4d:_0x2f3f4d+'\x0a';}export function stripLocalSqlMetadata(_0x2db1fd,_0x33b1bc){const _0x2dacf6=a176_0x3f91b2,_0x566c4a=_0x2db1fd[_0x2dacf6(0x1a3)](/\r\n/g,'\x0a')[_0x2dacf6(0x18d)]('\x0a'),_0x5f57f3=[];let _0x1a2a90=0x0;if(_0x33b1bc===_0x2dacf6(0x183))while(_0x1a2a90<_0x566c4a[_0x2dacf6(0x18e)]){const _0x5b256d=_0x566c4a[_0x1a2a90]??'';if(/^\s*<!--\s*@lovrabet\./['test'](_0x5b256d)){_0x1a2a90++;continue;}if(_0x5b256d['trim']()===''&&_0x1a2a90>0x0){_0x1a2a90++;continue;}break;}else while(_0x1a2a90<_0x566c4a['length']){const _0x475750=_0x566c4a[_0x1a2a90]??'';if(/^\s*--\s*@lovrabet\./[_0x2dacf6(0x195)](_0x475750)){_0x1a2a90++;continue;}if(_0x475750[_0x2dacf6(0x17a)]()===''&&_0x1a2a90>0x0){_0x1a2a90++;continue;}break;}for(;_0x1a2a90<_0x566c4a[_0x2dacf6(0x18e)];_0x1a2a90++){_0x5f57f3[_0x2dacf6(0x1a4)](_0x566c4a[_0x1a2a90]);}return _0x5f57f3[_0x2dacf6(0x194)]('\x0a')[_0x2dacf6(0x185)]();}export function resolveSqlMode(_0x34c79e,_0x2b5a5a){const _0x24725c=a176_0x3f91b2;if(_0x2b5a5a?.[_0x24725c(0x1a1)])return _0x2b5a5a[_0x24725c(0x1a1)];return detectSqlMode(_0x34c79e);}export function resolveSqlFileName(_0x2a1de0,_0x4995ab,_0x1099b2){const _0x5debfc=a176_0x3f91b2;if(_0x1099b2?.[_0x5debfc(0x187)])return _0x1099b2['path'];if(_0x1099b2?.[_0x5debfc(0x196)]||_0x1099b2?.['dbName'])return buildSqlRelativePath(_0x2a1de0,_0x1099b2?.['sqlName'],_0x1099b2?.[_0x5debfc(0x18f)],resolveSqlMode(_0x4995ab,_0x1099b2),_0x1099b2?.['dbId']);return buildDefaultSqlFileName(_0x2a1de0,resolveSqlMode(_0x4995ab,_0x1099b2));}export function resolveSqlLocalDir(_0x5812a3,_0x1762a6){return join(_0x5812a3,SQL_LOCAL_REL_DIR,_0x1762a6);}export async function confirmForceOverwrite(_0x156dc8){const _0x547490=a176_0x3f91b2,_0x4412c6=createInterface({'input':process[_0x547490(0x19f)],'output':process[_0x547490(0x182)]}),_0x2f781c=await new Promise(_0x4cb201=>{const _0x31e406=_0x547490;_0x4412c6[_0x31e406(0x190)](_0x156dc8+_0x31e406(0x18a),_0x4cb201);});return _0x4412c6[_0x547490(0x1a2)](),['y','yes'][_0x547490(0x177)](_0x2f781c['trim']()[_0x547490(0x181)]());}export function findSqlLockScope(_0x4d6668,_0x389383){return _0x4d6668['apps'][_0x389383];}function buildMetadataHeaderLines(_0x14e10e,_0x34cc90){const _0x4eaefb=a176_0x3f91b2,_0x3430d4=[[_0x4eaefb(0x19e),_0x14e10e[_0x4eaefb(0x19e)]],[_0x4eaefb(0x196),_0x14e10e[_0x4eaefb(0x196)]],[_0x4eaefb(0x180),_0x14e10e[_0x4eaefb(0x180)]],[_0x4eaefb(0x18f),_0x14e10e['dbName']],[_0x4eaefb(0x1a1),_0x14e10e['mode']],['syncedAt',_0x14e10e[_0x4eaefb(0x1a5)]],[_0x4eaefb(0x199),_0x14e10e['description']]];if(_0x34cc90===_0x4eaefb(0x183))return _0x3430d4[_0x4eaefb(0x19b)](([,_0x131d18])=>_0x131d18!==undefined&&_0x131d18!==null&&String(_0x131d18)[_0x4eaefb(0x17a)]()!=='')[_0x4eaefb(0x17e)](([_0x23e868,_0x35f4b2])=>_0x4eaefb(0x18c)+_0x23e868+':\x20'+String(_0x35f4b2)+_0x4eaefb(0x189));return _0x3430d4[_0x4eaefb(0x19b)](([,_0x1b339f])=>_0x1b339f!==undefined&&_0x1b339f!==null&&String(_0x1b339f)[_0x4eaefb(0x17a)]()!=='')['map'](([_0x3bec64,_0x4f1c69])=>_0x4eaefb(0x186)+_0x3bec64+':\x20'+String(_0x4f1c69));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a177_0x4e72(_0xf93641,_0x3d19d7){_0xf93641=_0xf93641-0x10f;const _0x3f4da6=a177_0x3f4d();let _0x4e723d=_0x3f4da6[_0xf93641];return _0x4e723d;}const a177_0xca1032=a177_0x4e72;(function(_0x40dd3b,_0x3adadb){const _0x1d5be4=a177_0x4e72,_0x55d601=_0x40dd3b();while(!![]){try{const _0x191e66=parseInt(_0x1d5be4(0x12f))/0x1*(-parseInt(_0x1d5be4(0x123))/0x2)+parseInt(_0x1d5be4(0x12a))/0x3*(parseInt(_0x1d5be4(0x130))/0x4)+-parseInt(_0x1d5be4(0x12c))/0x5*(-parseInt(_0x1d5be4(0x11c))/0x6)+parseInt(_0x1d5be4(0x11f))/0x7*(parseInt(_0x1d5be4(0x12e))/0x8)+-parseInt(_0x1d5be4(0x136))/0x9*(-parseInt(_0x1d5be4(0x112))/0xa)+-parseInt(_0x1d5be4(0x131))/0xb*(parseInt(_0x1d5be4(0x116))/0xc)+-parseInt(_0x1d5be4(0x12d))/0xd;if(_0x191e66===_0x3adadb)break;else _0x55d601['push'](_0x55d601['shift']());}catch(_0x4b9e69){_0x55d601['push'](_0x55d601['shift']());}}}(a177_0x3f4d,0x632b1));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x1d57fc){const _0x15cd01=a177_0x4e72,_0x30cb96=[];let _0x39ee1a=0x1;while(!![]){const _0x224364=await listSqlQueries(_0x1d57fc,{'currentPage':_0x39ee1a,'pageSize':PAGE_SIZE}),_0x726975=_0x224364[_0x15cd01(0x119)]??[];_0x30cb96[_0x15cd01(0x118)](..._0x726975[_0x15cd01(0x135)](_0x512bd8=>_0x512bd8[_0x15cd01(0x117)]));if(_0x726975['length']===0x0)break;const _0x1cd5ee=_0x224364[_0x15cd01(0x10f)]?.['totalCount'];if(_0x1cd5ee!=null?_0x30cb96[_0x15cd01(0x114)]>=_0x1cd5ee:_0x726975[_0x15cd01(0x114)]<PAGE_SIZE)break;_0x39ee1a++;}return _0x30cb96;}export const sqlStatus={'service':a177_0xca1032(0x124),'command':a177_0xca1032(0x132),'description':'Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','risk':a177_0xca1032(0x11a),'flags':[{'name':a177_0xca1032(0x111),'type':a177_0xca1032(0x110),'description':a177_0xca1032(0x134)}],async 'execute'(_0x185d1a){const _0x570dcc=a177_0xca1032,_0x473d54=loadSqlProjectConfig(_0x185d1a['appCode']),_0x110da3=await readSqlLockFile(_0x473d54[_0x570dcc(0x127)]),{appLock:_0x1a8287}=ensureSqlLockScope(_0x110da3??createEmptySqlLock(),_0x473d54[_0x570dcc(0x126)],_0x473d54['sqlRoot'],_0x570dcc(0x132)),_0x3a71ae=await scanLocalSqlQueries(_0x473d54),_0x25160c=[],_0x5345e4=[],_0x2d9426=[],_0x1434d7=[],_0x4fc34b=new Set(_0x3a71ae[_0x570dcc(0x135)](_0x4b88de=>_0x4b88de['lockKey']));for(const _0x140256 of _0x3a71ae){const _0x5ab8fc=await computeSqlFileHash(_0x140256[_0x570dcc(0x113)]),_0x2c95b8=_0x1a8287[_0x570dcc(0x11b)][_0x140256[_0x570dcc(0x125)]],_0x2811cb=!!_0x2c95b8&&_0x2c95b8[_0x570dcc(0x115)]!==_0x140256[_0x570dcc(0x121)],_0x5d0239=!!_0x2c95b8&&!!_0x140256[_0x570dcc(0x120)]&&_0x2c95b8[_0x570dcc(0x120)]!==_0x140256[_0x570dcc(0x120)];if(!_0x2c95b8)_0x25160c[_0x570dcc(0x118)](_0x140256[_0x570dcc(0x125)]);else _0x2c95b8[_0x570dcc(0x11e)]!==_0x5ab8fc||_0x2811cb||_0x5d0239?_0x5345e4[_0x570dcc(0x118)](_0x140256['lockKey']):_0x2d9426['push'](_0x140256[_0x570dcc(0x125)]);}for(const _0xd18fc6 of Object[_0x570dcc(0x129)](_0x1a8287[_0x570dcc(0x11b)])){!_0x4fc34b[_0x570dcc(0x12b)](_0xd18fc6)&&_0x1434d7[_0x570dcc(0x118)](_0xd18fc6);}const _0x38c8d8=[];if(_0x185d1a[_0x570dcc(0x11d)](_0x570dcc(0x111))){const _0x4afa85=await fetchAllSqlCodes(_0x185d1a[_0x570dcc(0x126)]);for(const _0x1e6264 of _0x4afa85){!_0x4fc34b[_0x570dcc(0x12b)](_0x1e6264)&&!_0x1a8287[_0x570dcc(0x11b)][_0x1e6264]&&_0x38c8d8[_0x570dcc(0x118)](_0x1e6264);}}const _0x4526d1=_0x25160c['length']===0x0&&_0x5345e4[_0x570dcc(0x114)]===0x0&&_0x1434d7['length']===0x0&&_0x38c8d8[_0x570dcc(0x114)]===0x0;return{'ok':!![],'data':{'added':_0x25160c,'modified':_0x5345e4,'missing':_0x1434d7,'unchanged':_0x2d9426,'remoteOnly':_0x38c8d8},'message':_0x4526d1?_0x570dcc(0x133):_0x25160c['length']+'\x20added,\x20'+_0x5345e4[_0x570dcc(0x114)]+_0x570dcc(0x122)+_0x1434d7['length']+_0x570dcc(0x128)+_0x2d9426[_0x570dcc(0x114)]+'\x20unchanged'+(_0x38c8d8[_0x570dcc(0x114)]>0x0?',\x20'+_0x38c8d8[_0x570dcc(0x114)]+'\x20remote-only':'')};}};function a177_0x3f4d(){const _0x38c170=['filePath','length','path','26484IfcIfa','sqlCode','push','tableData','read','sqls','60KWjmAi','bool','hash','3479WKZcEW','sqlName','relativePath','\x20modified,\x20','1448OwxqFc','sql','lockKey','appCode','lockFilePath','\x20missing,\x20','keys','16062pGLMfL','has','276995BwmMYn','2205216eCPCem','4064zOkqRU','471bcLGkm','320zGhgsN','3388hnYtNS','status','All\x20SQL\x20queries\x20are\x20in\x20sync.','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','map','9YEENiP','paging','boolean','remote','3617990ZdysTA'];a177_0x3f4d=function(){return _0x38c170;};return a177_0x3f4d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a178_0x11d2b6=a178_0x826b;(function(_0x59cad4,_0x311fe1){const _0x1f21ea=a178_0x826b,_0x1fda73=_0x59cad4();while(!![]){try{const _0x67496d=parseInt(_0x1f21ea(0x164))/0x1*(parseInt(_0x1f21ea(0x13f))/0x2)+-parseInt(_0x1f21ea(0x159))/0x3+parseInt(_0x1f21ea(0x140))/0x4*(-parseInt(_0x1f21ea(0x15b))/0x5)+parseInt(_0x1f21ea(0x16e))/0x6+parseInt(_0x1f21ea(0x13a))/0x7*(-parseInt(_0x1f21ea(0x14b))/0x8)+parseInt(_0x1f21ea(0x163))/0x9+-parseInt(_0x1f21ea(0x154))/0xa;if(_0x67496d===_0x311fe1)break;else _0x1fda73['push'](_0x1fda73['shift']());}catch(_0x1851d6){_0x1fda73['push'](_0x1fda73['shift']());}}}(a178_0x2304,0xb1e9e));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{auditSqlJoinIndexes}from'../../core/sql-index-auditor.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':a178_0x11d2b6(0x14d),'command':a178_0x11d2b6(0x155),'description':'Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','risk':a178_0x11d2b6(0x166),'flags':[{'name':a178_0x11d2b6(0x14f),'type':a178_0x11d2b6(0x152),'description':'Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'},{'name':'sql','type':a178_0x11d2b6(0x152),'description':a178_0x11d2b6(0x142)},{'name':a178_0x11d2b6(0x136),'type':a178_0x11d2b6(0x152),'description':a178_0x11d2b6(0x12d)},{'name':'check-indexes','type':a178_0x11d2b6(0x13b),'description':'Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata'}],async 'execute'(_0x271811){const _0x41eb0f=a178_0x11d2b6,_0x337104=_0x271811['str'](_0x41eb0f(0x14f)),_0x586eed=_0x271811[_0x41eb0f(0x16a)](_0x41eb0f(0x14d)),_0x40d112=_0x271811[_0x41eb0f(0x16a)]('schemas'),_0x4a034a=_0x271811[_0x41eb0f(0x145)]('check-indexes');if(!_0x337104&&!_0x586eed)throw CliErrors[_0x41eb0f(0x135)](_0x41eb0f(0x14f),_0x41eb0f(0x160));if(_0x4a034a&&!_0x40d112)throw CliErrors[_0x41eb0f(0x15e)](_0x41eb0f(0x148));let _0x1c653b;if(_0x337104){const _0x4359f5=resolve(process['cwd'](),_0x337104);if(!existsSync(_0x4359f5))throw CliErrors[_0x41eb0f(0x15e)](_0x41eb0f(0x15f)+_0x4359f5);_0x1c653b=readFileSync(_0x4359f5,_0x41eb0f(0x16f));}else _0x1c653b=_0x586eed;const _0x5e5f70=validateSql(_0x1c653b),_0x596009={'valid':_0x5e5f70[_0x41eb0f(0x161)],'sqlType':_0x5e5f70[_0x41eb0f(0x130)][_0x41eb0f(0x158)],'isSelectOnly':_0x5e5f70[_0x41eb0f(0x130)][_0x41eb0f(0x157)],'isDangerous':_0x5e5f70[_0x41eb0f(0x130)][_0x41eb0f(0x138)],'tables':_0x5e5f70[_0x41eb0f(0x16d)],'parameters':_0x5e5f70[_0x41eb0f(0x13c)],'message':_0x5e5f70[_0x41eb0f(0x147)]};_0x5e5f70[_0x41eb0f(0x130)][_0x41eb0f(0x141)]&&(_0x596009[_0x41eb0f(0x141)]=_0x5e5f70[_0x41eb0f(0x130)][_0x41eb0f(0x141)]);if(_0x40d112&&_0x5e5f70['valid']){const _0x482e38=_0x40d112['split'](',')['map'](_0x1b38b8=>_0x1b38b8[_0x41eb0f(0x151)]())['filter'](Boolean),_0x4ccc28=[],_0x2a86a6=[],_0x18ad7c=filterDbTableBackedDatasets(await listDatasets(_0x271811['appCode'])),_0x250f2d=new Map(_0x18ad7c[_0x41eb0f(0x16b)](_0x473ea1=>[_0x473ea1[_0x41eb0f(0x15c)]?.['tableName']?.[_0x41eb0f(0x131)](),_0x473ea1]));for(const _0x5d24c0 of _0x5e5f70[_0x41eb0f(0x16d)]){const _0x2cf589=_0x250f2d[_0x41eb0f(0x139)](_0x5d24c0[_0x41eb0f(0x131)]());!_0x2cf589&&_0x4ccc28['push'](_0x41eb0f(0x13d)+_0x5d24c0+_0x41eb0f(0x14c));}for(const _0x414b68 of _0x482e38){let _0x121446;try{_0x121446=await getDatasetDetail(_0x414b68);}catch{_0x4ccc28[_0x41eb0f(0x153)](_0x41eb0f(0x16c)+_0x414b68+_0x41eb0f(0x162));continue;}assertDatasetIsDbTableBacked(_0x121446,_0x41eb0f(0x168));const _0x3ede3d=Array[_0x41eb0f(0x169)](_0x121446['fields'])?_0x121446[_0x41eb0f(0x150)]:[],_0x4ac659=new Set(_0x3ede3d[_0x41eb0f(0x16b)](_0x5d558d=>_0x5d558d[_0x41eb0f(0x14a)]?.[_0x41eb0f(0x131)]())),_0x45449c=_0x121446[_0x41eb0f(0x15c)]?.[_0x41eb0f(0x149)]||_0x121446[_0x41eb0f(0x149)]||_0x414b68;_0x596009[_0x41eb0f(0x134)+_0x45449c]={'code':_0x414b68,'tableName':_0x45449c,'fieldCount':_0x4ac659['size'],'fields':Array[_0x41eb0f(0x133)](_0x4ac659)};if(_0x4a034a){const _0x53ec33=normalizeDatasetIndexes(_0x121446);_0x2a86a6[_0x41eb0f(0x153)]({'tableName':_0x45449c,..._0x53ec33});}}_0x4ccc28['length']>0x0&&(_0x596009[_0x41eb0f(0x13e)]=_0x4ccc28),_0x4a034a&&(_0x596009[_0x41eb0f(0x132)]=auditSqlJoinIndexes(_0x1c653b,_0x2a86a6));}return{'ok':_0x5e5f70['valid'],'data':_0x596009,'message':_0x5e5f70[_0x41eb0f(0x147)]};}};function normalizeDatasetIndexes(_0x4cc4f4){const _0xdd8ea8=a178_0x11d2b6,_0x19afb3=Array[_0xdd8ea8(0x169)](_0x4cc4f4?.[_0xdd8ea8(0x144)]?.[_0xdd8ea8(0x165)])?_0x4cc4f4[_0xdd8ea8(0x144)][_0xdd8ea8(0x165)]:Array[_0xdd8ea8(0x169)](_0x4cc4f4?.['indexes'])?_0x4cc4f4[_0xdd8ea8(0x165)]:[],_0x115722=_0x19afb3[_0xdd8ea8(0x156)](_0x3eb5b1=>{const _0x4b7f26=_0xdd8ea8,_0x9aebc4=Array['isArray'](_0x3eb5b1?.[_0x4b7f26(0x167)])?_0x3eb5b1['index_columns']:Array[_0x4b7f26(0x169)](_0x3eb5b1?.[_0x4b7f26(0x171)])?_0x3eb5b1[_0x4b7f26(0x171)]:Array[_0x4b7f26(0x169)](_0x3eb5b1?.[_0x4b7f26(0x143)])?_0x3eb5b1[_0x4b7f26(0x143)]:[],_0x15252a=_0x9aebc4['filter'](_0x1ca733=>typeof _0x1ca733==='string')[_0x4b7f26(0x16b)](_0x5cd74d=>_0x5cd74d[_0x4b7f26(0x151)]())[_0x4b7f26(0x146)](Boolean);if(_0x15252a[_0x4b7f26(0x12e)]===0x0)return[];const _0x387fa0=[_0x3eb5b1?.[_0x4b7f26(0x14e)],_0x3eb5b1?.[_0x4b7f26(0x172)],_0x3eb5b1?.['name']]['find'](_0x50478a=>typeof _0x50478a===_0x4b7f26(0x152)&&_0x50478a[_0x4b7f26(0x151)]()),_0x1397e2=[_0x3eb5b1?.[_0x4b7f26(0x15d)],_0x3eb5b1?.['type']][_0x4b7f26(0x15a)](_0x1720c9=>typeof _0x1720c9===_0x4b7f26(0x152)&&_0x1720c9[_0x4b7f26(0x151)]());return[{..._0x387fa0?{'name':_0x387fa0[_0x4b7f26(0x151)]()}:{},..._0x1397e2?{'type':_0x1397e2['trim']()}:{},'columns':_0x15252a}];}),_0x3549b1=[..._0x115722],_0x193f43=typeof _0x4cc4f4?.['dbtableConfig']?.['pkField']==='string'?_0x4cc4f4['dbtableConfig'][_0xdd8ea8(0x170)][_0xdd8ea8(0x12f)](',')[_0xdd8ea8(0x16b)](_0x556dc2=>_0x556dc2[_0xdd8ea8(0x151)]())[_0xdd8ea8(0x146)](Boolean):[];return _0x193f43[_0xdd8ea8(0x12e)]>0x0&&_0x3549b1['unshift']({'type':_0xdd8ea8(0x137),'columns':_0x193f43}),{'indexes':_0x3549b1,'metadataAvailable':_0x115722[_0xdd8ea8(0x12e)]>0x0};}function a178_0x826b(_0x2b4116,_0x2509df){_0x2b4116=_0x2b4116-0x12d;const _0x230453=a178_0x2304();let _0x826b3f=_0x230453[_0x2b4116];return _0x826b3f;}function a178_0x2304(){const _0x372612=['primary','isDangerous','get','4557mQxgDI','boolean','parameters','Table\x20\x22','schemaWarnings','6MhdYUt','16gENzTk','reason','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','columns','dataset','bool','filter','message','--check-indexes\x20requires\x20--schemas.','tableName','name','7168IcJzKl','\x22\x20not\x20found\x20in\x20any\x20dataset','sql','indexName','file','fields','trim','string','push','4191570YUyQNb','validate','flatMap','isSelectOnly','type','1238109zbLgWU','find','257910UwzMLx','dbtableConfig','index_type','validation','File\x20not\x20found:\x20','Provide\x20--file\x20or\x20--sql','valid','\x22\x20not\x20found\x20or\x20not\x20accessible','9308403MUVWvw','255476WFyLWB','indexes','read','index_columns','SQL\x20schema\x20validation','isArray','str','map','Dataset\x20\x22','tables','3297138uSqEng','utf-8','pkField','columnNames','index_name','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','length','split','sqlType','toLowerCase','joinAudit','from','schema:','flagMissing','schemas'];a178_0x2304=function(){return _0x372612;};return a178_0x2304();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4b005d,_0x4e6100){const _0x601676=a179_0x4108,_0xc2659f=_0x4b005d();while(!![]){try{const _0x333f2f=parseInt(_0x601676(0x1f4))/0x1*(-parseInt(_0x601676(0x1f7))/0x2)+parseInt(_0x601676(0x1ee))/0x3*(parseInt(_0x601676(0x1f6))/0x4)+-parseInt(_0x601676(0x1f2))/0x5*(parseInt(_0x601676(0x1f0))/0x6)+-parseInt(_0x601676(0x1f3))/0x7+-parseInt(_0x601676(0x1f5))/0x8+-parseInt(_0x601676(0x1ef))/0x9+parseInt(_0x601676(0x1f1))/0xa;if(_0x333f2f===_0x4e6100)break;else _0xc2659f['push'](_0xc2659f['shift']());}catch(_0x9b3710){_0xc2659f['push'](_0xc2659f['shift']());}}}(a179_0x3f52,0xa245a));function a179_0x4108(_0x12e6c6,_0x4f981a){_0x12e6c6=_0x12e6c6-0x1ee;const _0x3f52d8=a179_0x3f52();let _0x410886=_0x3f52d8[_0x12e6c6];return _0x410886;}function a179_0x3f52(){const _0x33c50b=['5270608RiUZfW','28JfjNMI','20186GqqFPl','508038hRfazZ','683496tNYlbL','7118904UTHAip','23703970mHSLWU','5xAUJqB','501354KWMwZo','89KPzULK'];a179_0x3f52=function(){return _0x33c50b;};return a179_0x3f52();}import{taskStatus}from'../../commands/task/status.js';export const taskDefinitions=[taskStatus];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a180_0x3bee(){const _0x12670f=['1188650FJNhoC','Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','6525666PqbjrL','1639839XeGzaC','trim','Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','apiError','flagMissing','taskId','str','compress','406763SBRhnU','12USYxhu','144clphvF','status','appCode','33QZgnmW','task-id','340962LIJBxr','14879292usWfyU','cookie','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','read','task','333555xvpjel','string','20gLpNNu','4hzplWc'];a180_0x3bee=function(){return _0x12670f;};return a180_0x3bee();}const a180_0x2b3d54=a180_0x5835;(function(_0x3cdf1e,_0x4deb33){const _0x2e09ea=a180_0x5835,_0x21baf9=_0x3cdf1e();while(!![]){try{const _0xfcaba0=parseInt(_0x2e09ea(0xec))/0x1+parseInt(_0x2e09ea(0xeb))/0x2*(parseInt(_0x2e09ea(0xef))/0x3)+-parseInt(_0x2e09ea(0xdc))/0x4*(parseInt(_0x2e09ea(0xe8))/0x5)+-parseInt(_0x2e09ea(0xe2))/0x6+-parseInt(_0x2e09ea(0xdb))/0x7*(-parseInt(_0x2e09ea(0xdd))/0x8)+-parseInt(_0x2e09ea(0xee))/0x9*(-parseInt(_0x2e09ea(0xea))/0xa)+parseInt(_0x2e09ea(0xe0))/0xb*(-parseInt(_0x2e09ea(0xe3))/0xc);if(_0xfcaba0===_0x4deb33)break;else _0x21baf9['push'](_0x21baf9['shift']());}catch(_0x478420){_0x21baf9['push'](_0x21baf9['shift']());}}}(a180_0x3bee,0xc39b3));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from'../../commands/common/async-task.js';import{getAsyncTaskStatus}from'../../core/api-client.js';function a180_0x5835(_0x2350f7,_0x22079e){_0x2350f7=_0x2350f7-0xd4;const _0x3beeda=a180_0x3bee();let _0x583515=_0x3beeda[_0x2350f7];return _0x583515;}import{CliErrors}from'../../errors.js';export const taskStatus={'service':a180_0x2b3d54(0xe7),'command':a180_0x2b3d54(0xde),'description':a180_0x2b3d54(0xd5),'risk':a180_0x2b3d54(0xe6),'defaultOutputFormat':a180_0x2b3d54(0xda),'structuredErrors':!![],'flags':[{'name':a180_0x2b3d54(0xe1),'type':a180_0x2b3d54(0xe9),'required':!![],'description':a180_0x2b3d54(0xe5)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x16d7e3){const _0xd04f4a=a180_0x2b3d54;if(!_0x16d7e3['str'](_0xd04f4a(0xe1))[_0xd04f4a(0xd4)]())throw CliErrors[_0xd04f4a(0xd7)]('task-id');},async 'execute'(_0x44ad57){const _0x41a648=a180_0x2b3d54,_0x50bbb8=_0x44ad57[_0x41a648(0xd9)](_0x41a648(0xe1))['trim'](),_0x1e130a=normalizeAsyncTask(await getAsyncTaskStatus(_0x50bbb8,_0x44ad57[_0x41a648(0xdf)],_0x44ad57[_0x41a648(0xe4)]));if(_0x1e130a[_0x41a648(0xd8)]!==_0x50bbb8)throw CliErrors[_0x41a648(0xd6)](_0x41a648(0xed)+_0x50bbb8+',\x20received\x20'+_0x1e130a[_0x41a648(0xd8)]+'.');const _0x59a263=buildAsyncTaskStatusCommand(_0x1e130a['taskId'],_0x44ad57[_0x41a648(0xdf)]);return{'ok':!![],'message':asyncTaskMessage(_0x1e130a),'data':{'appCode':_0x44ad57[_0x41a648(0xdf)],..._0x1e130a,'query':_0x1e130a['isTerminal']?null:{'command':_0x59a263}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a181_0xf7a064=a181_0x195d;function a181_0x57dd(){const _0x32fe57=['workspace','write','72tRLPpo','90hYmjUn','359879fMmtNx','name','add','128LIQoWq','178920NchLNG','81372HGXTPZ','199174OPIIaI','App\x20profile\x20name','workspace\x20add','3iwfBjV','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','634010xxzwqn','21121089hHjktf','22464zbNKil'];a181_0x57dd=function(){return _0x32fe57;};return a181_0x57dd();}function a181_0x195d(_0x1a5ede,_0x53fa27){_0x1a5ede=_0x1a5ede-0x186;const _0x57dd2e=a181_0x57dd();let _0x195dc9=_0x57dd2e[_0x1a5ede];return _0x195dc9;}(function(_0x5380d0,_0x33e34e){const _0x5cf2f9=a181_0x195d,_0x4e10c1=_0x5380d0();while(!![]){try{const _0x4b4f47=-parseInt(_0x5cf2f9(0x193))/0x1+parseInt(_0x5cf2f9(0x187))/0x2*(parseInt(_0x5cf2f9(0x18a))/0x3)+parseInt(_0x5cf2f9(0x186))/0x4*(-parseInt(_0x5cf2f9(0x192))/0x5)+-parseInt(_0x5cf2f9(0x18e))/0x6+parseInt(_0x5cf2f9(0x197))/0x7*(-parseInt(_0x5cf2f9(0x196))/0x8)+-parseInt(_0x5cf2f9(0x191))/0x9*(parseInt(_0x5cf2f9(0x18c))/0xa)+parseInt(_0x5cf2f9(0x18d))/0xb;if(_0x4b4f47===_0x33e34e)break;else _0x4e10c1['push'](_0x4e10c1['shift']());}catch(_0x439089){_0x4e10c1['push'](_0x4e10c1['shift']());}}}(a181_0x57dd,0x5b3d9));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';export const workspaceAddDefinition={'service':a181_0xf7a064(0x18f),'command':a181_0xf7a064(0x195),'description':a181_0xf7a064(0x18b),'risk':a181_0xf7a064(0x190),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a181_0xf7a064(0x194),'description':a181_0xf7a064(0x188),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x5657b3=>validateAppName(_0x5657b3,a181_0xf7a064(0x189)),'execute':_0x490a29=>runAppAdd(_0x490a29,'workspace\x20add')};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a182_0x184ac4=a182_0x3eb2;(function(_0x1eb5e6,_0x55b7ad){const _0x3694f6=a182_0x3eb2,_0x2f88aa=_0x1eb5e6();while(!![]){try{const _0x1a367a=-parseInt(_0x3694f6(0x13d))/0x1*(-parseInt(_0x3694f6(0x164))/0x2)+parseInt(_0x3694f6(0x155))/0x3*(-parseInt(_0x3694f6(0x16b))/0x4)+parseInt(_0x3694f6(0x14a))/0x5*(-parseInt(_0x3694f6(0x15a))/0x6)+-parseInt(_0x3694f6(0x165))/0x7*(-parseInt(_0x3694f6(0x147))/0x8)+-parseInt(_0x3694f6(0x139))/0x9+-parseInt(_0x3694f6(0x151))/0xa*(parseInt(_0x3694f6(0x14d))/0xb)+-parseInt(_0x3694f6(0x149))/0xc*(-parseInt(_0x3694f6(0x145))/0xd);if(_0x1a367a===_0x55b7ad)break;else _0x2f88aa['push'](_0x2f88aa['shift']());}catch(_0x4c89d9){_0x2f88aa['push'](_0x2f88aa['shift']());}}}(a182_0x43fa,0x4010d));import{CliErrors}from'../../errors.js';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';import{workspaceAddDefinition}from'../../commands/workspace/add.js';import{workspaceRemoveDefinition}from'../../commands/workspace/remove.js';const WORKSPACE_USAGE=CLI_BIN_NAME+a182_0x184ac4(0x13f),SAFE_PROFILE_KEYS=[a182_0x184ac4(0x166),a182_0x184ac4(0x136),a182_0x184ac4(0x15c),'format','pageSize','riskLevel',a182_0x184ac4(0x15d)],workspaceFlags=[{'name':a182_0x184ac4(0x138),'type':'string','description':a182_0x184ac4(0x159)},{'name':a182_0x184ac4(0x166),'type':a182_0x184ac4(0x143),'description':a182_0x184ac4(0x160)},{'name':a182_0x184ac4(0x136),'type':a182_0x184ac4(0x143),'description':a182_0x184ac4(0x144),'enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':a182_0x184ac4(0x143),'description':a182_0x184ac4(0x14f)},{'name':a182_0x184ac4(0x15b),'type':a182_0x184ac4(0x143),'description':a182_0x184ac4(0x134),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a182_0x184ac4(0x152),'type':a182_0x184ac4(0x132),'description':a182_0x184ac4(0x162)},{'name':a182_0x184ac4(0x156),'type':a182_0x184ac4(0x143),'description':a182_0x184ac4(0x158),'enum':[...RISK_LEVEL_VALUES]},{'name':'locale','type':a182_0x184ac4(0x143),'description':a182_0x184ac4(0x130)}];function isRecord(_0x3e9549){const _0x834628=a182_0x184ac4;return!!_0x3e9549&&typeof _0x3e9549===_0x834628(0x154)&&!Array[_0x834628(0x13e)](_0x3e9549);}function assertValidAppcode(_0x1453b0){const _0x25c593=a182_0x184ac4,{valid:_0x2096e7,message:_0x32e488}=validateAppcode(_0x1453b0);if(!_0x2096e7)throw CliErrors[_0x25c593(0x163)](_0x25c593(0x15f)+_0x1453b0,_0x32e488);}function sanitizeProfile(_0x1fd2be){if(!isRecord(_0x1fd2be))return{};const _0x483e42={};for(const _0x1958f4 of SAFE_PROFILE_KEYS){if(_0x1fd2be[_0x1958f4]!==undefined)_0x483e42[_0x1958f4]=_0x1fd2be[_0x1958f4];}return _0x483e42;}function cloneProfile(_0x4f2cce){return isRecord(_0x4f2cce)?{..._0x4f2cce}:{};}function collectWorkspaceProfileOverrides(_0x1ab6ef){const _0x4b2812=a182_0x184ac4,_0x336d71={},_0x2931c0=_0x1ab6ef[_0x4b2812(0x15e)](_0x4b2812(0x136)),_0x51b68d=_0x1ab6ef['str'](_0x4b2812(0x15c)),_0x2a609e=_0x1ab6ef[_0x4b2812(0x15e)](_0x4b2812(0x15b)),_0x2b0676=_0x1ab6ef[_0x4b2812(0x14e)](_0x4b2812(0x152)),_0x5794fe=_0x1ab6ef[_0x4b2812(0x15e)](_0x4b2812(0x156)),_0x3713fe=_0x1ab6ef['str'](_0x4b2812(0x15d));if(_0x2931c0)_0x336d71[_0x4b2812(0x136)]=_0x2931c0;if(_0x51b68d)_0x336d71['apiDir']=_0x51b68d;if(_0x2a609e)_0x336d71[_0x4b2812(0x161)]=_0x2a609e;if(_0x2b0676!==undefined&&_0x2b0676!=='')_0x336d71[_0x4b2812(0x152)]=Number(_0x2b0676);if(_0x5794fe)_0x336d71[_0x4b2812(0x156)]=_0x5794fe;if(_0x3713fe)_0x336d71[_0x4b2812(0x15d)]=_0x3713fe;return _0x336d71;}async function validateWorkspaceArgs(_0x303afc){const _0x198ce7=a182_0x184ac4,_0x3b7cc3=_0x303afc[_0x198ce7(0x15e)](_0x198ce7(0x138))[_0x198ce7(0x141)](),_0x5f2b34=_0x303afc[_0x198ce7(0x15e)](_0x198ce7(0x166))[_0x198ce7(0x141)]();if(!_0x3b7cc3&&!_0x5f2b34)throw CliErrors[_0x198ce7(0x163)]('Missing\x20workspace\x20app\x20selector.',_0x198ce7(0x13a)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x198ce7(0x140));if(_0x5f2b34)assertValidAppcode(_0x5f2b34);}function resolveKnownApps(){const _0x2e301f=a182_0x184ac4,{config:_0x2d1696,layers:_0x514056}=readRawConfigWithLayers(),_0x2a70bc=isRecord(_0x2d1696[_0x2e301f(0x169)])?_0x2d1696[_0x2e301f(0x169)]:{},_0x5a4f05=isRecord(_0x514056['globalConfig'][_0x2e301f(0x169)])?_0x514056[_0x2e301f(0x142)][_0x2e301f(0x169)]:{};return{..._0x5a4f05,..._0x2a70bc};}function a182_0x43fa(){const _0x485cac=[').\x20Config:\x20','3572129WgoJyV','flag','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','.\x20Credentials:\x20not\x20written.','10SqcZqJ','pageSize','Switch\x20the\x20current\x20workspace\x20app\x20binding','object','84741aCGeTl','riskLevel','defaultApp','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','96WGGVfA','defaultFormat','apiDir','locale','str','Invalid\x20appcode:\x20','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','format','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','validation','15932abBneZ','4858RFFNRf','appcode','use','workspace.','apps','\x22\x20not\x20found.','40leYPWy','Locale\x20for\x20this\x20workspace\x20app\x20profile','project','number','init','Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','\x20(appcode:\x20','env','updated','app','3700449QnYNcR','Use\x20`','keys','initialized','32hfRLKG','isArray','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','\x20workspace\x20use\x20--app\x20<name>`.','trim','globalConfig','string','Target\x20environment','13225277NoqljA','App\x20\x22','552EjOVIR','Initialize\x20the\x20current\x20workspace\x20app\x20binding','12TGicHv','12295rbxyMV','write'];a182_0x43fa=function(){return _0x485cac;};return a182_0x43fa();}function a182_0x3eb2(_0x2b6476,_0x48d501){_0x2b6476=_0x2b6476-0x130;const _0x43fa22=a182_0x43fa();let _0x3eb29c=_0x43fa22[_0x2b6476];return _0x3eb29c;}async function configureWorkspace(_0x56f1d3,_0x30f91c){const _0x3b9963=a182_0x184ac4,_0x50fdb=_0x56f1d3[_0x3b9963(0x15e)](_0x3b9963(0x138))[_0x3b9963(0x141)](),_0x28a9b1=_0x56f1d3[_0x3b9963(0x15e)]('appcode')[_0x3b9963(0x141)](),_0xef6c66=_0x50fdb||_0x28a9b1;if(!_0xef6c66)throw CliErrors[_0x3b9963(0x163)]('Missing\x20workspace\x20app\x20selector.',_0x3b9963(0x13a)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x3b9963(0x140));if(_0x28a9b1)assertValidAppcode(_0x28a9b1);const _0x44f624=resolveWriteConfigPath(_0x3b9963(0x131)),_0x226978=readConfigFile(_0x44f624),_0x1fe810=resolveKnownApps(),_0x583638=isRecord(_0x226978[_0x3b9963(0x169)])?{..._0x226978['apps']}:{},_0x445ae9=cloneProfile(_0x583638[_0xef6c66]),_0x59db63=sanitizeProfile(_0x1fe810[_0xef6c66]),_0x34b01e=_0x28a9b1?{}:_0x59db63,_0x9c3d54=_0x28a9b1||_0x34b01e[_0x3b9963(0x166)];if(!_0x9c3d54){const _0x507a75=Object[_0x3b9963(0x13b)](_0x1fe810),_0x14e63a=_0x507a75['length']===0x0?_0x3b9963(0x13a)+CLI_BIN_NAME+'\x20workspace\x20'+_0x30f91c+'\x20--app\x20'+_0xef6c66+'\x20--appcode\x20<code>`.':'Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20'+_0x507a75['join'](',\x20');throw CliErrors[_0x3b9963(0x163)](_0x3b9963(0x146)+_0xef6c66+_0x3b9963(0x16a),_0x14e63a);}assertValidAppcode(String(_0x9c3d54));const _0x30eb6a={..._0x34b01e,..._0x445ae9,'appcode':String(_0x9c3d54),...collectWorkspaceProfileOverrides(_0x56f1d3)};return _0x583638[_0xef6c66]=_0x30eb6a,_0x226978[_0x3b9963(0x169)]=_0x583638,_0x226978[_0x3b9963(0x157)]=_0xef6c66,delete _0x226978[_0x3b9963(0x166)],delete _0x226978[_0x3b9963(0x138)],_0x30eb6a[_0x3b9963(0x136)]&&(_0x226978[_0x3b9963(0x136)]=_0x30eb6a[_0x3b9963(0x136)]),writeConfigFile(_0x44f624,_0x226978),{'ok':!![],'message':'Workspace\x20'+(_0x30f91c==='init'?_0x3b9963(0x13c):_0x3b9963(0x137))+':\x20'+_0xef6c66+_0x3b9963(0x135)+_0x30eb6a[_0x3b9963(0x166)]+_0x3b9963(0x14c)+_0x44f624+_0x3b9963(0x150),'data':{'operation':_0x3b9963(0x168)+_0x30f91c,'configPath':_0x44f624,'app':_0xef6c66,'appcode':_0x30eb6a[_0x3b9963(0x166)],'env':_0x30eb6a[_0x3b9963(0x136)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':'workspace','command':a182_0x184ac4(0x133),'description':a182_0x184ac4(0x148),'risk':a182_0x184ac4(0x14b),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x1e07da=>configureWorkspace(_0x1e07da,a182_0x184ac4(0x133))},workspaceUseDefinition={'service':'workspace','command':a182_0x184ac4(0x167),'description':a182_0x184ac4(0x153),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x2630ed=>configureWorkspace(_0x2630ed,a182_0x184ac4(0x167))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a183_0x5b60(_0xee1307,_0x4f5547){_0xee1307=_0xee1307-0xb8;const _0x377542=a183_0x3775();let _0x5b608f=_0x377542[_0xee1307];return _0x5b608f;}const a183_0x991685=a183_0x5b60;(function(_0x2688ea,_0x41f4f5){const _0x3034d4=a183_0x5b60,_0xf0522c=_0x2688ea();while(!![]){try{const _0xc56be7=parseInt(_0x3034d4(0xc4))/0x1+-parseInt(_0x3034d4(0xc0))/0x2+parseInt(_0x3034d4(0xbe))/0x3*(parseInt(_0x3034d4(0xba))/0x4)+-parseInt(_0x3034d4(0xbc))/0x5+parseInt(_0x3034d4(0xbd))/0x6*(parseInt(_0x3034d4(0xc2))/0x7)+parseInt(_0x3034d4(0xc5))/0x8+-parseInt(_0x3034d4(0xbf))/0x9;if(_0xc56be7===_0x41f4f5)break;else _0xf0522c['push'](_0xf0522c['shift']());}catch(_0x84b0a9){_0xf0522c['push'](_0xf0522c['shift']());}}}(a183_0x3775,0xca39e));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const workspaceRemoveDefinition={'service':a183_0x991685(0xbb),'command':a183_0x991685(0xc6),'description':'Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','risk':a183_0x991685(0xb9),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a183_0x991685(0xc3),'description':a183_0x991685(0xc1),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x17f378=>validateAppName(_0x17f378,a183_0x991685(0xb8)),'execute':_0x4d891b=>runAppRemove(_0x4d891b,a183_0x991685(0xb8))};function a183_0x3775(){const _0x336f46=['name','171576WHevPy','8676384UvXjbR','remove','workspace\x20remove','high-risk-write','43688OOAkhp','workspace','6881735UgSuoJ','6NcnLdW','312kLpULL','4549041yjpLsh','1641658DgZNUv','App\x20profile\x20name\x20to\x20remove','7972517cKIPqt'];a183_0x3775=function(){return _0x336f46;};return a183_0x3775();}
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a184_0x3f7f82=a184_0x22b5;(function(_0x3e8e92,_0x128e19){const _0x2bb881=a184_0x22b5,_0x364c7d=_0x3e8e92();while(!![]){try{const _0x3dc981=-parseInt(_0x2bb881(0x106))/0x1+parseInt(_0x2bb881(0x107))/0x2+parseInt(_0x2bb881(0x103))/0x3+parseInt(_0x2bb881(0x101))/0x4*(parseInt(_0x2bb881(0x114))/0x5)+-parseInt(_0x2bb881(0xf9))/0x6+parseInt(_0x2bb881(0xf8))/0x7+-parseInt(_0x2bb881(0xef))/0x8*(-parseInt(_0x2bb881(0x100))/0x9);if(_0x3dc981===_0x128e19)break;else _0x364c7d['push'](_0x364c7d['shift']());}catch(_0x2c8cb9){_0x364c7d['push'](_0x364c7d['shift']());}}}(a184_0x7e15,0x838a0));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=[a184_0x3f7f82(0xfd),a184_0x3f7f82(0x110),a184_0x3f7f82(0x111),a184_0x3f7f82(0xf6),'riskLevel'];function a184_0x22b5(_0x59307d,_0x3b84e2){_0x59307d=_0x59307d-0xec;const _0x7e1584=a184_0x7e15();let _0x22b5a8=_0x7e1584[_0x59307d];return _0x22b5a8;}export const TOP_LEVEL_CONFIG_KEYS=new Set(['appcode',a184_0x3f7f82(0xf1),a184_0x3f7f82(0x111),a184_0x3f7f82(0xf6),a184_0x3f7f82(0xfd),a184_0x3f7f82(0x110),'apiDir']);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x425575){return[..._0x425575]['join'](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0xd7ad1d){return TOP_LEVEL_CONFIG_KEYS['has'](_0xd7ad1d);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x2985d1=a184_0x3f7f82;return _0x2985d1(0xfe)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a184_0x3f7f82(0xf1),'apiDir':'apiDir','cookie':a184_0x3f7f82(0xfd),'accessKey':a184_0x3f7f82(0x110),'defaultFormat':'format','pageSize':'pageSize','riskLevel':a184_0x3f7f82(0x10e),'locale':'locale'};export function getAppProfileFlagDefs(){const _0x3510d5=a184_0x3f7f82;return[{'name':_0x3510d5(0xf1),'type':_0x3510d5(0xf5),'description':_0x3510d5(0x112),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x3510d5(0x10d),'type':_0x3510d5(0xf5),'description':_0x3510d5(0x109)},{'name':_0x3510d5(0xfd),'type':_0x3510d5(0xf5),'description':'Auth\x20cookie','hidden':!![]},{'name':'accessKey','type':'string','description':_0x3510d5(0xee),'hidden':!![]},{'name':_0x3510d5(0xff),'type':'string','description':_0x3510d5(0x102),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x3510d5(0xfb),'type':_0x3510d5(0xf3),'description':_0x3510d5(0xf0)},{'name':_0x3510d5(0x10e),'type':_0x3510d5(0xf5),'description':_0x3510d5(0x105),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x3510d5(0x111),'type':'string','description':_0x3510d5(0xec)}];}export function collectAppProfileOverrides(_0x30c57f){const _0x833607=a184_0x3f7f82,_0x3b4bb6={};for(const [_0x4e1ea5,_0x2b2722]of Object[_0x833607(0x104)](APP_PROFILE_FLAG_KEY_MAP)){const _0x58ae9d=_0x30c57f(_0x4e1ea5);if(!_0x58ae9d)continue;_0x3b4bb6[_0x2b2722]=_0x2b2722===_0x833607(0xfb)?Number(_0x58ae9d):_0x58ae9d;}return _0x3b4bb6;}export function buildAppProfileListFields(_0x1ebc92){const _0x38696e=a184_0x3f7f82;return{'env':_0x1ebc92[_0x38696e(0xf1)]??null,'apiDir':_0x1ebc92[_0x38696e(0x10d)]??null,'hasCookie':!!_0x1ebc92['cookie'],'hasAccessKey':!!_0x1ebc92[_0x38696e(0x110)],'format':_0x1ebc92[_0x38696e(0xf6)]??null,'pageSize':_0x1ebc92[_0x38696e(0xfb)]??null,'riskLevel':_0x1ebc92[_0x38696e(0x10e)]??null,'locale':_0x1ebc92[_0x38696e(0x111)]??null};}function a184_0x7e15(){const _0x5b793f=['834158nZfqjb','20102Dhpcqy','appcode','API\x20directory\x20path','defaultApp','inherit','length','apiDir','riskLevel','zh-CN','accessKey','locale','Target\x20environment','en-US','1065GndXFY','Locale','keys','Access\x20key','668632HkXzXx','Default\x20page\x20size','env','toLowerCase','number','filter','string','format','apps','3332658NyIpZX','2132922aFZtSt','app','pageSize','trim','cookie','Config\x20key\x20(','defaultFormat','45wIzkoC','14052XshkrE','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','228360oGHcBf','entries','Risk\x20level'];a184_0x7e15=function(){return _0x5b793f;};return a184_0x7e15();}export function buildAppDoctorFields(_0x578791,_0x266d32){const _0x1a23e3=a184_0x3f7f82;return{'env':{'value':_0x578791[_0x1a23e3(0xf1)]||_0x266d32['env'],'source':_0x578791[_0x1a23e3(0xf1)]?'app':'inherit'},'apiDir':{'value':_0x578791[_0x1a23e3(0x10d)]||_0x266d32[_0x1a23e3(0x10d)],'source':_0x578791[_0x1a23e3(0x10d)]?'app':_0x1a23e3(0x10b)},'cookie':{'value':_0x578791[_0x1a23e3(0xfd)]||_0x266d32[_0x1a23e3(0xfd)],'source':_0x578791[_0x1a23e3(0xfd)]?_0x1a23e3(0xfa):_0x1a23e3(0x10b)},'accessKey':{'value':_0x578791[_0x1a23e3(0x110)]||_0x266d32[_0x1a23e3(0x110)],'source':_0x578791[_0x1a23e3(0x110)]?'app':_0x1a23e3(0x10b)}};}export function buildCanonicalAppConfig(_0x2cdd3c,_0x8fe814){const _0x1a1d8f=a184_0x3f7f82,_0x5f2ac0=_0x2cdd3c['map'](_0x454aa8=>String(_0x454aa8||'')[_0x1a1d8f(0xfc)]())[_0x1a1d8f(0xf4)](Boolean);if(_0x5f2ac0[_0x1a1d8f(0x10c)]===0x0)return{};const _0x20654d={};for(const _0xe20979 of _0x5f2ac0){_0x20654d[_0xe20979]=_0x8fe814?{'appcode':_0xe20979,'env':_0x8fe814}:{'appcode':_0xe20979};}return{'apps':_0x20654d,'defaultApp':_0x5f2ac0[0x0]};}export function buildCanonicalProjectConfig(_0x5911e8,_0x230262){const _0xde7adc=a184_0x3f7f82,{appCodes:appCodes=[],env:_0x2eb583,metadata:_0xc80bd0}=_0x230262,_0x5b1925={..._0x5911e8,..._0xc80bd0||{}};delete _0x5b1925[_0xde7adc(0x108)],delete _0x5b1925[_0xde7adc(0xfa)];if(_0x2eb583)_0x5b1925[_0xde7adc(0xf1)]=_0x2eb583;else!_0x5b1925[_0xde7adc(0xf1)]&&(_0x5b1925['env']=DEFAULT_CONFIG_VALUES[_0xde7adc(0xf1)]);const _0x324fe5=buildCanonicalAppConfig(appCodes,_0x5b1925[_0xde7adc(0xf1)]);return Object[_0xde7adc(0xed)](_0x324fe5)[_0xde7adc(0x10c)]>0x0&&(_0x5b1925[_0xde7adc(0xf7)]=_0x324fe5['apps'],_0x5b1925[_0xde7adc(0x10a)]=_0x324fe5[_0xde7adc(0x10a)]),_0x5b1925;}const LOCALE_MAP={'zh':a184_0x3f7f82(0x10f),'zh-cn':a184_0x3f7f82(0x10f),'zh_cn':a184_0x3f7f82(0x10f),'en':a184_0x3f7f82(0x113),'en-us':a184_0x3f7f82(0x113),'en_us':'en-US'};export function normalizeLocale(_0x558b2d){const _0x33bd29=a184_0x3f7f82;if(!_0x558b2d)return null;return LOCALE_MAP[_0x558b2d[_0x33bd29(0xf2)]()]??null;}
|
package/lib/constant/cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a185_0x25612f=a185_0x3e77;(function(_0xa2f2c3,_0x32b4cc){const _0x2aef6e=a185_0x3e77,_0x3d1d84=_0xa2f2c3();while(!![]){try{const _0x4ae150=-parseInt(_0x2aef6e(0x181))/0x1*(-parseInt(_0x2aef6e(0x186))/0x2)+parseInt(_0x2aef6e(0x183))/0x3+parseInt(_0x2aef6e(0x17e))/0x4*(parseInt(_0x2aef6e(0x182))/0x5)+-parseInt(_0x2aef6e(0x185))/0x6*(parseInt(_0x2aef6e(0x187))/0x7)+parseInt(_0x2aef6e(0x17c))/0x8*(-parseInt(_0x2aef6e(0x184))/0x9)+parseInt(_0x2aef6e(0x180))/0xa+-parseInt(_0x2aef6e(0x17f))/0xb;if(_0x4ae150===_0x32b4cc)break;else _0x3d1d84['push'](_0x3d1d84['shift']());}catch(_0x2ec26c){_0x3d1d84['push'](_0x3d1d84['shift']());}}}(a185_0x2474,0x79f53));function a185_0x3e77(_0x473504,_0x87b61a){_0x473504=_0x473504-0x17c;const _0x247498=a185_0x2474();let _0x3e776b=_0x247498[_0x473504];return _0x3e776b;}function a185_0x2474(){const _0x108100=['4002OnxMZr','527676CTiZId','7105yPBiVS','40344oMKgxK','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','289148zNLBjd','8159250hvbAck','2776070RDCpAI','3csYXPL','45TdDfWK','989124qsXWqS','234xyFjgd'];a185_0x2474=function(){return _0x108100;};return a185_0x2474();}export const CLI_VERSION_POLICY_URL=a185_0x25612f(0x17d);
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a186_0x95c00e=a186_0x3c8a;(function(_0x57cf17,_0x132d3e){const _0x31f4a6=a186_0x3c8a,_0xb02353=_0x57cf17();while(!![]){try{const _0x76efc2=-parseInt(_0x31f4a6(0x167))/0x1*(-parseInt(_0x31f4a6(0x1cf))/0x2)+-parseInt(_0x31f4a6(0x1ba))/0x3*(parseInt(_0x31f4a6(0x192))/0x4)+parseInt(_0x31f4a6(0x17f))/0x5+-parseInt(_0x31f4a6(0x18c))/0x6+-parseInt(_0x31f4a6(0x175))/0x7*(parseInt(_0x31f4a6(0x168))/0x8)+parseInt(_0x31f4a6(0x17b))/0x9+-parseInt(_0x31f4a6(0x1a6))/0xa*(parseInt(_0x31f4a6(0x1b0))/0xb);if(_0x76efc2===_0x132d3e)break;else _0xb02353['push'](_0xb02353['shift']());}catch(_0x39fe24){_0xb02353['push'](_0xb02353['shift']());}}}(a186_0xb310,0x4efa8));export const CLI_BIN_NAME=a186_0x95c00e(0x1ad);function a186_0xb310(){const _0x5a01cb=['1717965GgsjRP','Apply\x20to\x20all','help','params','Use\x20global\x20config\x20scope','Menu\x20sort\x20value','enable-bff-save','Config\x20key','Keyword\x20filter','Use\x20project\x20config\x20scope','Watch\x20mode','<expr>','Description','443292fLczhJ','Code\x20filter','sort','operation-type','Operation\x20type','all','12VCOjGc','expected-count','Show\x20help','skipImports','Rabetbase\x20CLI','clear','SQL\x20name','Read\x20value\x20from\x20environment\x20variable','Title','operation','Output\x20path','Clear','Target\x20path','code','Use\x20remote','Skip\x20confirmation\x20for\x20high-risk\x20writes','Page\x20size','fromEnv','menuIds','skip-imports','10whhwXM','reveal','title','Config\x20value','description','operationType','json\x20|\x20pretty\x20|\x20compress','rabetbase','<name>','Function\x20node','9049040doKDea','expectedChildrenCount','expected-children-count','key','project','stdin','Preview\x20operation\x20without\x20executing','Record\x20ID','Force\x20overwrite','verbose','203571pGOkUU','Expected\x20current\x20menu\x20path','yes','schemas','tags','Type\x20filter','remote','@lovrabet/rabetbase-cli','from-env','expectPath','keyword','type','Schemas','Comma-separated\x20menu\x20IDs','confirm','sql','Force\x20non-interactive\x20mode\x20(CI)','Output\x20format','dry-run','description-file','watch','283456SHkzNN','SQL\x20code','Expected\x20current\x20parent\x20menu\x20id','sqlcode','expect-parent-id','function-node','Expected\x20current\x20child\x20count','SQL\x20string','app','non-interactive','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','dbid','sql-name','enableBffSave','env','name','nonInteractive','format','string','Environment','Expected\x20affected\x20count','Enable\x20BFF\x20save','output','Name','label','Confirm\x20destructive\x20action','appcode','JSON\x20params','4MSsOYb','756160WhQfBw','pagesize','page','sqlname','dbId','force','file','Reveal\x20sensitive\x20value','<code>','Menu\x20label','DB\x20ID','Read\x20value\x20from\x20stdin','Tags','7UXnovt','target','taskId','global','datasetcode','boolean','5468436ETQzve','fromEntries','File\x20path','expectParentId'];a186_0xb310=function(){return _0x5a01cb;};return a186_0xb310();}export const CLI_DISPLAY_NAME=a186_0x95c00e(0x196);export const NPM_PACKAGE_NAME=a186_0x95c00e(0x1c1);export const GLOBAL_FLAGS=[{'name':a186_0x95c00e(0x165),'meowKey':'appcode','type':a186_0x95c00e(0x1e1),'description':'Override\x20appcode','hint':a186_0x95c00e(0x170)},{'name':'app','meowKey':a186_0x95c00e(0x1d7),'type':a186_0x95c00e(0x1e1),'description':'Select\x20app\x20profile\x20by\x20name','hint':a186_0x95c00e(0x1ae)},{'name':a186_0x95c00e(0x1dd),'meowKey':'env','type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1e2),'hint':'production\x20|\x20daily'},{'name':a186_0x95c00e(0x1e0),'meowKey':'format','type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1cb),'hint':a186_0x95c00e(0x1ac)},{'name':'jq','meowKey':'jq','type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1d9),'hint':a186_0x95c00e(0x18a)},{'name':'dry-run','meowKey':'dryRun','type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x1b6)},{'name':a186_0x95c00e(0x1bc),'meowKey':a186_0x95c00e(0x1bc),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x1a1)},{'name':a186_0x95c00e(0x1d8),'meowKey':a186_0x95c00e(0x1df),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x1ca)},{'name':a186_0x95c00e(0x178),'meowKey':a186_0x95c00e(0x178),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x183)},{'name':a186_0x95c00e(0x1b4),'meowKey':a186_0x95c00e(0x1b4),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x188)},{'name':'ci','meowKey':'ci','type':'boolean','description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a186_0x95c00e(0x181),'meowKey':a186_0x95c00e(0x181),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x194)},{'name':a186_0x95c00e(0x1de),'meowKey':a186_0x95c00e(0x1de),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x162),'hidden':!![]},{'name':a186_0x95c00e(0x1a8),'meowKey':a186_0x95c00e(0x1a8),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x19a),'hidden':!![]},{'name':a186_0x95c00e(0x197),'meowKey':a186_0x95c00e(0x197),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x19d),'hidden':!![]},{'name':a186_0x95c00e(0x1ce),'meowKey':a186_0x95c00e(0x1ce),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x189),'hidden':!![]},{'name':a186_0x95c00e(0x161),'meowKey':a186_0x95c00e(0x161),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x19c),'hidden':!![]},{'name':'params','meowKey':a186_0x95c00e(0x182),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x166),'hidden':!![]},{'name':a186_0x95c00e(0x179),'meowKey':a186_0x95c00e(0x179),'type':a186_0x95c00e(0x1e1),'description':'Dataset\x20code','hidden':!![]},{'name':a186_0x95c00e(0x191),'meowKey':'all','type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x180),'hidden':!![]},{'name':a186_0x95c00e(0x185),'meowKey':a186_0x95c00e(0x1dc),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x160),'hidden':!![]},{'name':'id','meowKey':'id','type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1b7),'hidden':!![]},{'name':'type','meowKey':'type','type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1bf),'hidden':!![]},{'name':'file','meowKey':a186_0x95c00e(0x16e),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x17d),'hidden':!![]},{'name':a186_0x95c00e(0x1d2),'meowKey':a186_0x95c00e(0x1d2),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1d0),'hidden':!![]},{'name':a186_0x95c00e(0x1db),'meowKey':'sqlName','type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x198),'hidden':!![]},{'name':a186_0x95c00e(0x16b),'meowKey':'sqlname','type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x198),'hidden':!![]},{'name':'db-id','meowKey':a186_0x95c00e(0x16c),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x172),'hidden':!![]},{'name':'dbid','meowKey':a186_0x95c00e(0x1da),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x172),'hidden':!![]},{'name':'description','meowKey':a186_0x95c00e(0x1aa),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x18b),'hidden':!![]},{'name':a186_0x95c00e(0x1cd),'meowKey':'descriptionFile','type':a186_0x95c00e(0x1e1),'description':'Description\x20file','hidden':!![]},{'name':a186_0x95c00e(0x16a),'meowKey':a186_0x95c00e(0x16a),'type':a186_0x95c00e(0x1e1),'description':'Page\x20number','hidden':!![]},{'name':a186_0x95c00e(0x169),'meowKey':a186_0x95c00e(0x169),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1a2),'hidden':!![]},{'name':a186_0x95c00e(0x1c4),'meowKey':a186_0x95c00e(0x1c4),'type':'string','description':a186_0x95c00e(0x187),'hidden':!![]},{'name':'code','meowKey':a186_0x95c00e(0x19f),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x18d),'hidden':!![]},{'name':a186_0x95c00e(0x1c9),'meowKey':a186_0x95c00e(0x1c9),'type':'string','description':a186_0x95c00e(0x1d6),'hidden':!![]},{'name':a186_0x95c00e(0x1bd),'meowKey':a186_0x95c00e(0x1bd),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1c6),'hidden':!![]},{'name':'operation','meowKey':a186_0x95c00e(0x19b),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x190),'hidden':!![]},{'name':a186_0x95c00e(0x176),'meowKey':a186_0x95c00e(0x176),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x19e),'hidden':!![]},{'name':a186_0x95c00e(0x1a5),'meowKey':a186_0x95c00e(0x195),'type':'boolean','description':'Skip\x20import\x20generation','hidden':!![]},{'name':a186_0x95c00e(0x1b3),'meowKey':a186_0x95c00e(0x1b3),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x186),'hidden':!![]},{'name':'value','meowKey':'value','type':'string','description':a186_0x95c00e(0x1a9),'hidden':!![]},{'name':a186_0x95c00e(0x1be),'meowKey':a186_0x95c00e(0x1be),'type':'string','description':a186_0x95c00e(0x174),'hidden':!![]},{'name':a186_0x95c00e(0x1b5),'meowKey':a186_0x95c00e(0x1b5),'type':'boolean','description':a186_0x95c00e(0x173),'hidden':!![]},{'name':a186_0x95c00e(0x1c2),'meowKey':a186_0x95c00e(0x1a3),'type':'string','description':a186_0x95c00e(0x199),'hidden':!![]},{'name':'reveal','meowKey':a186_0x95c00e(0x1a7),'type':'boolean','description':a186_0x95c00e(0x16f),'hidden':!![]},{'name':a186_0x95c00e(0x16d),'meowKey':a186_0x95c00e(0x16d),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x1b8),'hidden':!![]},{'name':a186_0x95c00e(0x1c8),'meowKey':a186_0x95c00e(0x1c8),'type':'boolean','description':a186_0x95c00e(0x164),'hidden':!![]},{'name':a186_0x95c00e(0x1c0),'meowKey':a186_0x95c00e(0x1c0),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x1a0),'hidden':!![]},{'name':a186_0x95c00e(0x1b9),'meowKey':'verbose','type':'boolean','description':'Verbose\x20output','hidden':!![]},{'name':a186_0x95c00e(0x193),'meowKey':'expectedCount','type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1e3),'hidden':!![]},{'name':a186_0x95c00e(0x163),'meowKey':a186_0x95c00e(0x163),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x171),'hidden':!![]},{'name':'parent-id','meowKey':'parentId','type':a186_0x95c00e(0x1e1),'description':'Parent\x20menu\x20id','hidden':!![]},{'name':'sort','meowKey':a186_0x95c00e(0x18e),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x184),'hidden':!![]},{'name':a186_0x95c00e(0x1d3),'meowKey':a186_0x95c00e(0x17e),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1d1),'hidden':!![]},{'name':'expect-path','meowKey':a186_0x95c00e(0x1c3),'type':'string','description':a186_0x95c00e(0x1bb),'hidden':!![]},{'name':a186_0x95c00e(0x1b2),'meowKey':a186_0x95c00e(0x1b1),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1d5),'hidden':!![]},{'name':'menu-ids','meowKey':a186_0x95c00e(0x1a4),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1c7),'hidden':!![]},{'name':'task-id','meowKey':a186_0x95c00e(0x177),'type':a186_0x95c00e(0x1e1),'description':'Asynchronous\x20task\x20ID','hidden':!![]},{'name':a186_0x95c00e(0x18f),'meowKey':a186_0x95c00e(0x1ab),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x190),'hidden':!![]},{'name':a186_0x95c00e(0x1d4),'meowKey':'functionNode','type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1af),'hidden':!![]}];function a186_0x3c8a(_0x1b1472,_0x2deeba){_0x1b1472=_0x1b1472-0x160;const _0xb310b6=a186_0xb310();let _0x3c8a23=_0xb310b6[_0x1b1472];return _0x3c8a23;}export const PIPELINE_FLAG_NAMES=new Set([a186_0x95c00e(0x165),a186_0x95c00e(0x1d7),'env',a186_0x95c00e(0x1e0),'jq',a186_0x95c00e(0x1cc),'yes',a186_0x95c00e(0x1d8),'ci']);export function buildMeowFlags(){const _0x2a3878=a186_0x95c00e;return Object[_0x2a3878(0x17c)](GLOBAL_FLAGS['map'](_0x2e3ce3=>[_0x2e3ce3['meowKey'],{'type':_0x2e3ce3[_0x2a3878(0x1c5)]}]));}
|
|
1
|
+
function a186_0x4eb7(){const _0x45aa6c=['parentId','sqlcode','datasetcode','pagesize','Confirm\x20destructive\x20action','taskId','3352EhwInN','<code>','10XKfTUO','4977UGFHmb','sqlname','from-env','label','stdin','enableBffSave','expected-count','SQL\x20string','Alias\x20for\x20--non-interactive','production\x20|\x20daily','Select\x20app\x20profile\x20by\x20name','type','Operation\x20type','Preview\x20operation\x20without\x20executing','Output\x20path','non-interactive','Show\x20help','SQL\x20code','title','sqlName','Config\x20key','description-file','Output\x20format','12648519iuSgRm','skipImports','1193450hRFsgc','SQL\x20name','global','Asynchronous\x20task\x20ID','help','<expr>','map','boolean','env','reveal','Skip\x20import\x20generation','Read\x20value\x20from\x20environment\x20variable','dry-run','Enable\x20BFF\x20save','@lovrabet/rabetbase-cli','parent-id','enable-bff-save','Clear','file','watch','Schemas','Read\x20value\x20from\x20stdin','File\x20path','menuIds','code','Name','meowKey','output','menu-ids','expectedChildrenCount','clear','Keyword\x20filter','app','name','function-node','functionNode','Expected\x20current\x20child\x20count','Reveal\x20sensitive\x20value','keyword','json\x20|\x20pretty\x20|\x20compress','6616720UuRWaz','Force\x20non-interactive\x20mode\x20(CI)','value','yes','remote','page','Skip\x20confirmation\x20for\x20high-risk\x20writes','sql-name','appcode','expected-children-count','Expected\x20affected\x20count','all','params','expectPath','Watch\x20mode','192rGAPrM','description','Expected\x20current\x20parent\x20menu\x20id','170745GpBuxW','DB\x20ID','Code\x20filter','Function\x20node','1016790VkPixJ','Apply\x20to\x20all','JSON\x20params','expectParentId','Page\x20size','Record\x20ID','<name>','key','format','sql','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','Rabetbase\x20CLI','confirm','Expected\x20current\x20menu\x20path','Environment','dbid','5644219JieSwm','task-id','string','fromEntries','Config\x20value','sort','operationType','schemas','Comma-separated\x20menu\x20IDs','Description\x20file','target','Tags','Use\x20remote','verbose','Title','Force\x20overwrite','force','rabetbase','operation','project','Menu\x20label','descriptionFile','skip-imports','nonInteractive'];a186_0x4eb7=function(){return _0x45aa6c;};return a186_0x4eb7();}const a186_0x1d59a8=a186_0x2f33;(function(_0x5b1c76,_0x1c901d){const _0x4f7823=a186_0x2f33,_0x5c50ff=_0x5b1c76();while(!![]){try{const _0x3d02a7=parseInt(_0x4f7823(0x182))/0x1+-parseInt(_0x4f7823(0x1c0))/0x2+-parseInt(_0x4f7823(0x1f1))/0x3*(-parseInt(_0x4f7823(0x1ee))/0x4)+-parseInt(_0x4f7823(0x1bc))/0x5*(parseInt(_0x4f7823(0x1b9))/0x6)+-parseInt(_0x4f7823(0x1d0))/0x7+-parseInt(_0x4f7823(0x1aa))/0x8+parseInt(_0x4f7823(0x180))/0x9*(parseInt(_0x4f7823(0x1f0))/0xa);if(_0x3d02a7===_0x1c901d)break;else _0x5c50ff['push'](_0x5c50ff['shift']());}catch(_0xcf85f7){_0x5c50ff['push'](_0x5c50ff['shift']());}}}(a186_0x4eb7,0xb8351));export const CLI_BIN_NAME=a186_0x1d59a8(0x1e1);export const CLI_DISPLAY_NAME=a186_0x1d59a8(0x1cb);export const NPM_PACKAGE_NAME=a186_0x1d59a8(0x190);export const GLOBAL_FLAGS=[{'name':a186_0x1d59a8(0x1b2),'meowKey':'appcode','type':a186_0x1d59a8(0x1d2),'description':'Override\x20appcode','hint':a186_0x1d59a8(0x1ef)},{'name':'app','meowKey':a186_0x1d59a8(0x1a2),'type':'string','description':a186_0x1d59a8(0x173),'hint':a186_0x1d59a8(0x1c6)},{'name':a186_0x1d59a8(0x18a),'meowKey':'env','type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x1ce),'hint':a186_0x1d59a8(0x172)},{'name':a186_0x1d59a8(0x1c8),'meowKey':a186_0x1d59a8(0x1c8),'type':'string','description':a186_0x1d59a8(0x17f),'hint':a186_0x1d59a8(0x1a9)},{'name':'jq','meowKey':'jq','type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x1ca),'hint':a186_0x1d59a8(0x187)},{'name':a186_0x1d59a8(0x18e),'meowKey':'dryRun','type':'boolean','description':a186_0x1d59a8(0x176)},{'name':a186_0x1d59a8(0x1ad),'meowKey':a186_0x1d59a8(0x1ad),'type':a186_0x1d59a8(0x189),'description':a186_0x1d59a8(0x1b0)},{'name':a186_0x1d59a8(0x178),'meowKey':a186_0x1d59a8(0x1e7),'type':'boolean','description':a186_0x1d59a8(0x1ab)},{'name':'global','meowKey':a186_0x1d59a8(0x184),'type':a186_0x1d59a8(0x189),'description':'Use\x20global\x20config\x20scope'},{'name':a186_0x1d59a8(0x1e3),'meowKey':'project','type':a186_0x1d59a8(0x189),'description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a186_0x1d59a8(0x189),'description':a186_0x1d59a8(0x171),'hidden':!![]},{'name':'help','meowKey':a186_0x1d59a8(0x186),'type':'boolean','description':a186_0x1d59a8(0x179)},{'name':a186_0x1d59a8(0x1a3),'meowKey':a186_0x1d59a8(0x1a3),'type':'string','description':a186_0x1d59a8(0x19b),'hidden':!![]},{'name':a186_0x1d59a8(0x17b),'meowKey':'title','type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x1de),'hidden':!![]},{'name':a186_0x1d59a8(0x1a0),'meowKey':a186_0x1d59a8(0x1a0),'type':a186_0x1d59a8(0x189),'description':a186_0x1d59a8(0x193),'hidden':!![]},{'name':'watch','meowKey':a186_0x1d59a8(0x195),'type':a186_0x1d59a8(0x189),'description':a186_0x1d59a8(0x1b8),'hidden':!![]},{'name':a186_0x1d59a8(0x19d),'meowKey':a186_0x1d59a8(0x19d),'type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x177),'hidden':!![]},{'name':a186_0x1d59a8(0x1b6),'meowKey':a186_0x1d59a8(0x1b6),'type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x1c2),'hidden':!![]},{'name':'datasetcode','meowKey':a186_0x1d59a8(0x1ea),'type':a186_0x1d59a8(0x1d2),'description':'Dataset\x20code','hidden':!![]},{'name':a186_0x1d59a8(0x1b5),'meowKey':a186_0x1d59a8(0x1b5),'type':a186_0x1d59a8(0x189),'description':a186_0x1d59a8(0x1c1),'hidden':!![]},{'name':a186_0x1d59a8(0x192),'meowKey':a186_0x1d59a8(0x16e),'type':a186_0x1d59a8(0x189),'description':a186_0x1d59a8(0x18f),'hidden':!![]},{'name':'id','meowKey':'id','type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x1c5),'hidden':!![]},{'name':a186_0x1d59a8(0x174),'meowKey':a186_0x1d59a8(0x174),'type':a186_0x1d59a8(0x1d2),'description':'Type\x20filter','hidden':!![]},{'name':a186_0x1d59a8(0x194),'meowKey':a186_0x1d59a8(0x194),'type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x198),'hidden':!![]},{'name':a186_0x1d59a8(0x1e9),'meowKey':'sqlcode','type':'string','description':a186_0x1d59a8(0x17a),'hidden':!![]},{'name':a186_0x1d59a8(0x1b1),'meowKey':a186_0x1d59a8(0x17c),'type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x183),'hidden':!![]},{'name':a186_0x1d59a8(0x1f2),'meowKey':'sqlname','type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x183),'hidden':!![]},{'name':'db-id','meowKey':'dbId','type':'string','description':a186_0x1d59a8(0x1bd),'hidden':!![]},{'name':a186_0x1d59a8(0x1cf),'meowKey':a186_0x1d59a8(0x1cf),'type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x1bd),'hidden':!![]},{'name':'description','meowKey':a186_0x1d59a8(0x1ba),'type':a186_0x1d59a8(0x1d2),'description':'Description','hidden':!![]},{'name':a186_0x1d59a8(0x17e),'meowKey':a186_0x1d59a8(0x1e5),'type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x1d9),'hidden':!![]},{'name':'page','meowKey':a186_0x1d59a8(0x1af),'type':a186_0x1d59a8(0x1d2),'description':'Page\x20number','hidden':!![]},{'name':'pagesize','meowKey':a186_0x1d59a8(0x1eb),'type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x1c4),'hidden':!![]},{'name':a186_0x1d59a8(0x1a8),'meowKey':'keyword','type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x1a1),'hidden':!![]},{'name':a186_0x1d59a8(0x19a),'meowKey':a186_0x1d59a8(0x19a),'type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x1be),'hidden':!![]},{'name':a186_0x1d59a8(0x1c9),'meowKey':a186_0x1d59a8(0x1c9),'type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x170),'hidden':!![]},{'name':a186_0x1d59a8(0x1d7),'meowKey':a186_0x1d59a8(0x1d7),'type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x196),'hidden':!![]},{'name':a186_0x1d59a8(0x1e2),'meowKey':a186_0x1d59a8(0x1e2),'type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x175),'hidden':!![]},{'name':a186_0x1d59a8(0x1da),'meowKey':a186_0x1d59a8(0x1da),'type':a186_0x1d59a8(0x1d2),'description':'Target\x20path','hidden':!![]},{'name':a186_0x1d59a8(0x1e6),'meowKey':a186_0x1d59a8(0x181),'type':a186_0x1d59a8(0x189),'description':a186_0x1d59a8(0x18c),'hidden':!![]},{'name':a186_0x1d59a8(0x1c7),'meowKey':'key','type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x17d),'hidden':!![]},{'name':a186_0x1d59a8(0x1ac),'meowKey':a186_0x1d59a8(0x1ac),'type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x1d4),'hidden':!![]},{'name':'tags','meowKey':'tags','type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x1db),'hidden':!![]},{'name':a186_0x1d59a8(0x16d),'meowKey':a186_0x1d59a8(0x16d),'type':'boolean','description':a186_0x1d59a8(0x197),'hidden':!![]},{'name':a186_0x1d59a8(0x16b),'meowKey':'fromEnv','type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x18d),'hidden':!![]},{'name':a186_0x1d59a8(0x18b),'meowKey':'reveal','type':a186_0x1d59a8(0x189),'description':a186_0x1d59a8(0x1a7),'hidden':!![]},{'name':a186_0x1d59a8(0x1e0),'meowKey':a186_0x1d59a8(0x1e0),'type':a186_0x1d59a8(0x189),'description':a186_0x1d59a8(0x1df),'hidden':!![]},{'name':a186_0x1d59a8(0x1cc),'meowKey':a186_0x1d59a8(0x1cc),'type':a186_0x1d59a8(0x189),'description':a186_0x1d59a8(0x1ec),'hidden':!![]},{'name':a186_0x1d59a8(0x1ae),'meowKey':'remote','type':a186_0x1d59a8(0x189),'description':a186_0x1d59a8(0x1dc),'hidden':!![]},{'name':'verbose','meowKey':a186_0x1d59a8(0x1dd),'type':a186_0x1d59a8(0x189),'description':'Verbose\x20output','hidden':!![]},{'name':a186_0x1d59a8(0x16f),'meowKey':'expectedCount','type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x1b4),'hidden':!![]},{'name':a186_0x1d59a8(0x16c),'meowKey':'label','type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x1e4),'hidden':!![]},{'name':a186_0x1d59a8(0x191),'meowKey':a186_0x1d59a8(0x1e8),'type':a186_0x1d59a8(0x1d2),'description':'Parent\x20menu\x20id','hidden':!![]},{'name':'sort','meowKey':a186_0x1d59a8(0x1d5),'type':a186_0x1d59a8(0x1d2),'description':'Menu\x20sort\x20value','hidden':!![]},{'name':'expect-parent-id','meowKey':a186_0x1d59a8(0x1c3),'type':'string','description':a186_0x1d59a8(0x1bb),'hidden':!![]},{'name':'expect-path','meowKey':a186_0x1d59a8(0x1b7),'type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x1cd),'hidden':!![]},{'name':a186_0x1d59a8(0x1b3),'meowKey':a186_0x1d59a8(0x19f),'type':'string','description':a186_0x1d59a8(0x1a6),'hidden':!![]},{'name':a186_0x1d59a8(0x19e),'meowKey':a186_0x1d59a8(0x199),'type':'string','description':a186_0x1d59a8(0x1d8),'hidden':!![]},{'name':a186_0x1d59a8(0x1d1),'meowKey':a186_0x1d59a8(0x1ed),'type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x185),'hidden':!![]},{'name':'operation-type','meowKey':a186_0x1d59a8(0x1d6),'type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x175),'hidden':!![]},{'name':a186_0x1d59a8(0x1a4),'meowKey':a186_0x1d59a8(0x1a5),'type':a186_0x1d59a8(0x1d2),'description':a186_0x1d59a8(0x1bf),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a186_0x1d59a8(0x1b2),'app','env',a186_0x1d59a8(0x1c8),'jq',a186_0x1d59a8(0x18e),a186_0x1d59a8(0x1ad),a186_0x1d59a8(0x178),'ci']);function a186_0x2f33(_0xcecdd9,_0x582415){_0xcecdd9=_0xcecdd9-0x16b;const _0x4eb755=a186_0x4eb7();let _0x2f334b=_0x4eb755[_0xcecdd9];return _0x2f334b;}export function buildMeowFlags(){const _0x278b92=a186_0x1d59a8;return Object[_0x278b92(0x1d3)](GLOBAL_FLAGS[_0x278b92(0x188)](_0x11b83b=>[_0x11b83b[_0x278b92(0x19c)],{'type':_0x11b83b[_0x278b92(0x174)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a187_0x4951cd=a187_0x91d9;(function(_0x7c49a1,_0xf6b200){const _0x5a950b=a187_0x91d9,_0x4540ad=_0x7c49a1();while(!![]){try{const _0x5699f8=parseInt(_0x5a950b(0x15a))/0x1+-parseInt(_0x5a950b(0x154))/0x2*(parseInt(_0x5a950b(0x15f))/0x3)+-parseInt(_0x5a950b(0x15d))/0x4*(-parseInt(_0x5a950b(0x153))/0x5)+-parseInt(_0x5a950b(0x156))/0x6+-parseInt(_0x5a950b(0x15b))/0x7*(-parseInt(_0x5a950b(0x158))/0x8)+parseInt(_0x5a950b(0x15c))/0x9+-parseInt(_0x5a950b(0x157))/0xa;if(_0x5699f8===_0xf6b200)break;else _0x4540ad['push'](_0x4540ad['shift']());}catch(_0x27b1eb){_0x4540ad['push'](_0x4540ad['shift']());}}}(a187_0x1467,0xda6f2));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a187_0x4951cd(0x15e),'format':a187_0x4951cd(0x155),'locale':a187_0x4951cd(0x159),'riskLevel':'high-risk-write','apiDir':DEFAULT_API_DIR};function a187_0x91d9(_0xc46548,_0x474ce5){_0xc46548=_0xc46548-0x153;const _0x1467cd=a187_0x1467();let _0x91d98f=_0x1467cd[_0xc46548];return _0x91d98f;}function a187_0x1467(){const _0x7c69ea=['15520MhqBSa','en-US','6368AVruem','371VvzUqi','4920102LxXQEH','814456PTRTZV','production','84QHwXLg','35pyduap','24104mNCloD','compress','1172118wYcmbv','6536490WalimA'];a187_0x1467=function(){return _0x7c69ea;};return a187_0x1467();}export const DEFAULT_COMMAND_OUTPUT_FORMAT=a187_0x4951cd(0x155);
|