@lovrabet/rabetbase-cli 2.3.13 → 2.3.14
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/ocr/index.js +1 -0
- 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/restore.js +1 -0
- 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_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;}
|
|
1
|
+
const a176_0x2db0bc=a176_0x26e1;(function(_0x908a49,_0x960252){const _0x2b9eac=a176_0x26e1,_0x4bc2d0=_0x908a49();while(!![]){try{const _0x259ca5=-parseInt(_0x2b9eac(0xe5))/0x1+parseInt(_0x2b9eac(0xf9))/0x2*(-parseInt(_0x2b9eac(0xf6))/0x3)+-parseInt(_0x2b9eac(0xf4))/0x4*(-parseInt(_0x2b9eac(0x102))/0x5)+parseInt(_0x2b9eac(0xed))/0x6*(-parseInt(_0x2b9eac(0xe3))/0x7)+-parseInt(_0x2b9eac(0x10e))/0x8+parseInt(_0x2b9eac(0xf1))/0x9*(parseInt(_0x2b9eac(0x112))/0xa)+-parseInt(_0x2b9eac(0xeb))/0xb*(-parseInt(_0x2b9eac(0xff))/0xc);if(_0x259ca5===_0x960252)break;else _0x4bc2d0['push'](_0x4bc2d0['shift']());}catch(_0x1d28ae){_0x4bc2d0['push'](_0x4bc2d0['shift']());}}}(a176_0x4bb8,0x50a00));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';function a176_0x26e1(_0x2d2276,_0x1756b9){_0x2d2276=_0x2d2276-0xdd;const _0x4bb80b=a176_0x4bb8();let _0x26e1be=_0x4bb80b[_0x2d2276];return _0x26e1be;}import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x5b096d,_0x3400a0,_0x3755d8){const _0x1352a1=a176_0x26e1,_0x20bb0a=await scanLocalSqlQueries(_0x5b096d),_0x4d5310=new Map();for(const _0x50b693 of _0x20bb0a){if(_0x3755d8&&_0x50b693[_0x1352a1(0xee)]!==_0x3755d8)continue;const _0xd799ee=_0x4d5310[_0x1352a1(0xde)](_0x50b693[_0x1352a1(0xee)])??[];_0xd799ee['push'](_0x50b693),_0x4d5310[_0x1352a1(0x11c)](_0x50b693[_0x1352a1(0xee)],_0xd799ee);}if(_0x3755d8&&!_0x4d5310[_0x1352a1(0xea)](_0x3755d8))throw CliErrors[_0x1352a1(0x114)](_0x1352a1(0x119)+_0x3755d8);const _0x4086ce=[];for(const [_0x14c973,_0x2b2981]of _0x4d5310[_0x1352a1(0x10d)]()){if(_0x2b2981[_0x1352a1(0x107)]===0x1){_0x4086ce[_0x1352a1(0x106)](_0x2b2981[0x0]);continue;}const _0x30d222=_0x3400a0['sqls'][_0x14c973],_0x5b3230=_0x30d222?.[_0x1352a1(0xf8)],_0x45d184=_0x5b3230?_0x2b2981[_0x1352a1(0xdd)](_0x3bad10=>_0x3bad10[_0x1352a1(0xfe)]!==_0x5b3230):_0x2b2981;if(_0x30d222&&_0x45d184[_0x1352a1(0x107)]===0x1){_0x4086ce['push'](_0x45d184[0x0]);continue;}throw CliErrors[_0x1352a1(0x114)]('Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20'+_0x14c973+_0x1352a1(0x11e));}return _0x4086ce;}export const sqlPush={'service':'sql','command':a176_0x2db0bc(0x106),'description':a176_0x2db0bc(0xef),'risk':a176_0x2db0bc(0x120),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a176_0x2db0bc(0x11a),'type':a176_0x2db0bc(0x100),'description':a176_0x2db0bc(0x108)}],async 'dryRun'(_0x46374d){const _0x382eb4=a176_0x2db0bc,_0x160056=loadSqlProjectConfig(_0x46374d[_0x382eb4(0xf7)]),_0xc98bf=await readSqlLockFile(_0x160056['lockFilePath']),{appLock:_0x5ef940}=ensureSqlLockScope(_0xc98bf??createEmptySqlLock(),_0x46374d[_0x382eb4(0xf7)],_0x160056['sqlRoot'],'push'),_0x33489f=await getTargetSqlQueries(_0x160056,_0x5ef940,_0x46374d[_0x382eb4(0xe9)](_0x382eb4(0x101))||undefined),_0x4bd9b9=[];for(const _0x25673b of _0x33489f){const _0x5eb5f2=await computeSqlFileHash(_0x25673b[_0x382eb4(0x109)]),_0x11644f=_0x5ef940['sqls'][_0x25673b['sqlCode']],_0x3385a1=!!_0x11644f&&(_0x11644f[_0x382eb4(0xf8)]!==_0x25673b[_0x382eb4(0xfe)]||!!_0x25673b[_0x382eb4(0x117)]&&_0x11644f[_0x382eb4(0x117)]!==_0x25673b['sqlName']);if(!_0x46374d['bool'](_0x382eb4(0x11a))&&_0x11644f&&_0x11644f[_0x382eb4(0x10a)]===_0x5eb5f2&&!_0x3385a1)continue;_0x4bd9b9[_0x382eb4(0x106)](_0x25673b[_0x382eb4(0xee)]);}return{'method':'POST','url':_0x382eb4(0xe7),'body':{'sqlCodes':_0x4bd9b9,'appCode':_0x46374d[_0x382eb4(0xf7)]},'description':'Would\x20push\x20'+_0x4bd9b9['length']+_0x382eb4(0x10c)};},async 'execute'(_0x1d747d){const _0x2ad211=a176_0x2db0bc,_0x1d23f6=loadSqlProjectConfig(_0x1d747d[_0x2ad211(0xf7)]),_0x4b09d9=await readSqlLockFile(_0x1d23f6['lockFilePath']),{lockData:_0x4ee694,appLock:_0x607f1a}=ensureSqlLockScope(_0x4b09d9??createEmptySqlLock(),_0x1d747d[_0x2ad211(0xf7)],_0x1d23f6[_0x2ad211(0xe1)],_0x2ad211(0x106)),_0x18b6b4=await getTargetSqlQueries(_0x1d23f6,_0x607f1a,_0x1d747d[_0x2ad211(0xe9)](_0x2ad211(0x101))||undefined);if(_0x18b6b4[_0x2ad211(0x107)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x2ad211(0x11f)};const _0x5753ac=[],_0x5722d8=[],_0x5be53c=[];for(const _0x1e9fce of _0x18b6b4){const _0x3a8be2=_0x607f1a['sqls'][_0x1e9fce[_0x2ad211(0xee)]];if(!_0x3a8be2){_0x5be53c[_0x2ad211(0x106)]({'sqlCode':_0x1e9fce[_0x2ad211(0xee)],'error':'local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first'});continue;}try{const _0x326fa1=await computeSqlFileHash(_0x1e9fce[_0x2ad211(0x109)]),_0x3227f6=_0x3a8be2['path']!==_0x1e9fce[_0x2ad211(0xfe)]||!!_0x1e9fce['sqlName']&&_0x3a8be2[_0x2ad211(0x117)]!==_0x1e9fce[_0x2ad211(0x117)];if(!_0x1d747d[_0x2ad211(0xdf)](_0x2ad211(0x11a))&&_0x3a8be2[_0x2ad211(0x10a)]===_0x326fa1&&!_0x3227f6){_0x5722d8[_0x2ad211(0x106)]({'sqlCode':_0x1e9fce['sqlCode'],'reason':_0x2ad211(0x118)});continue;}if(_0x3a8be2[_0x2ad211(0x111)]==null){_0x5be53c['push']({'sqlCode':_0x1e9fce[_0x2ad211(0xee)],'error':'missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first'});continue;}const _0x961c19=await readFile(_0x1e9fce[_0x2ad211(0x109)],_0x2ad211(0x103)),_0x2345fa=stripLocalSqlMetadata(_0x961c19,_0x1e9fce[_0x2ad211(0x115)]),_0x54d528=_0x1e9fce['sqlName']||_0x3a8be2[_0x2ad211(0x117)],_0x4e198a=await resolveTargetDbBinding(_0x1d747d[_0x2ad211(0xf7)],_0x1e9fce,_0x3a8be2),_0x39789a=await updateSqlQuery({'id':_0x3a8be2['remoteId'],'appCode':_0x1d747d[_0x2ad211(0xf7)],'sqlCode':_0x1e9fce[_0x2ad211(0xee)],'sqlName':_0x54d528,'dbId':_0x4e198a[_0x2ad211(0xf3)],'version':_0x3a8be2[_0x2ad211(0x111)],'sqlContent':_0x2345fa,'sqlConfig':_0x3a8be2[_0x2ad211(0xfd)]??undefined}),_0x3437b7=_0x39789a[_0x2ad211(0xf3)]?await getDbName(_0x1d747d[_0x2ad211(0xf7)],Number(_0x39789a[_0x2ad211(0xf3)]))[_0x2ad211(0xf0)](()=>_0x4e198a[_0x2ad211(0xfb)]):_0x4e198a[_0x2ad211(0xfb)];_0x607f1a[_0x2ad211(0x10b)][_0x1e9fce['sqlCode']]={...buildSqlLockEntry(_0x39789a,_0x2345fa,_0x326fa1,{'dbName':_0x3437b7}),'path':_0x1e9fce[_0x2ad211(0xfe)],'mode':_0x3a8be2[_0x2ad211(0x115)]},await archivePreviousSqlFileIfNeeded(_0x1d23f6,_0x3a8be2[_0x2ad211(0xf8)],_0x1e9fce['relativePath']),_0x5753ac['push']({'sqlCode':_0x1e9fce['sqlCode'],'remoteId':_0x3a8be2[_0x2ad211(0x116)]});}catch(_0x6e3c4f){_0x5be53c[_0x2ad211(0x106)]({'sqlCode':_0x1e9fce[_0x2ad211(0xee)],'error':_0x6e3c4f instanceof Error?_0x6e3c4f[_0x2ad211(0xe6)]:String(_0x6e3c4f)});}}return _0x607f1a[_0x2ad211(0x11b)]=new Date()['toISOString'](),await writeSqlLockFile(_0x1d23f6[_0x2ad211(0x105)],_0x4ee694),{'ok':_0x5be53c[_0x2ad211(0x107)]===0x0,'data':{'pushed':_0x5753ac,'skipped':_0x5722d8,'failed':_0x5be53c},'message':_0x2ad211(0xf2)+_0x5753ac[_0x2ad211(0x107)]+'\x20pushed,\x20'+_0x5722d8[_0x2ad211(0x107)]+_0x2ad211(0x113)+_0x5be53c[_0x2ad211(0x107)]+_0x2ad211(0xf5)};}};function a176_0x4bb8(){const _0x210b50=['path','2282BKPxss','join','dbName','projectRoot','sqlConfig','relativePath','51252iYXigS','boolean','sqlcode','1135tLQANu','utf8','isFinite','lockFilePath','push','length','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','filePath','hash','sqls','\x20SQL\x20file(s)','entries','2097920DXfphM','exec','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','version','911560NDUSjC','\x20skipped,\x20','validation','mode','remoteId','sqlName','unchanged','Local\x20SQL\x20not\x20found:\x20','force','lastSync','set','No\x20database\x20matches\x20local\x20directory\x20\x22','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','No\x20local\x20SQL\x20files\x20found.','high-risk-write','filter','get','bool','replace','sqlRoot','map','7QCUmLQ','trashDir','593252UGrhFQ','message','/smartapi/custom/updateUserCustomSql','sqlRootDir','str','has','2167LSVwEg','Local\x20directory\x20\x22','1530294ILeqds','sqlCode','Push\x20local\x20SQL\x20files\x20to\x20remote','catch','63yllaQU','Push\x20complete:\x20','dbId','8808WzJOKa','\x20failed','1416tBJTYE','appCode'];a176_0x4bb8=function(){return _0x210b50;};return a176_0x4bb8();}async function archivePreviousSqlFileIfNeeded(_0x418873,_0x111e15,_0x3ca672){const _0x56647f=a176_0x2db0bc;if(!_0x111e15||_0x111e15===_0x3ca672)return;const _0xda3c23=join(_0x418873['sqlRootDir'],_0x111e15);if(!await fileExists(_0xda3c23))return;const _0x3c4259=await moveToTrash(_0x418873[_0x56647f(0xfc)],_0x418873[_0x56647f(0xe4)],_0xda3c23);await cleanupEmptyDirectories(dirname(_0xda3c23),_0x418873[_0x56647f(0xe8)]),void _0x3c4259;}async function moveToTrash(_0x46f759,_0x11e721,_0x163843){const _0x4cf627=a176_0x2db0bc,_0x320902=new Date()['toISOString']()[_0x4cf627(0xe0)](/[:.]/g,'-'),_0x1db5d7=relative(_0x46f759,_0x163843),_0x2a8639=join(_0x11e721,_0x320902,_0x1db5d7);return await mkdir(dirname(_0x2a8639),{'recursive':!![]}),await rename(_0x163843,_0x2a8639),_0x2a8639;}async function cleanupEmptyDirectories(_0x45f551,_0x51e220){const _0x122b37=a176_0x2db0bc;let _0x125083=resolve(_0x45f551);const _0x2648c2=resolve(_0x51e220);while(_0x125083['startsWith'](''+_0x2648c2+sep)||_0x125083===_0x2648c2){if(_0x125083===_0x2648c2)return;try{const _0xcaef0f=await readdir(_0x125083);if(_0xcaef0f[_0x122b37(0x107)]>0x0)return;await rmdir(_0x125083);}catch{return;}_0x125083=dirname(_0x125083);}}async function resolveTargetDbBinding(_0x68ae57,_0x14c8a1,_0x4f0f90){const _0x45ab89=a176_0x2db0bc,_0x500c80=_0x14c8a1['dbDirectory'];if(!_0x500c80)return{'dbId':_0x4f0f90[_0x45ab89(0xf3)],'dbName':_0x4f0f90[_0x45ab89(0xfb)]};const _0x2dcd71=buildDbDirectoryName(_0x4f0f90[_0x45ab89(0xfb)],_0x4f0f90[_0x45ab89(0xf3)]);if(_0x500c80===_0x2dcd71)return{'dbId':_0x4f0f90[_0x45ab89(0xf3)],'dbName':_0x4f0f90[_0x45ab89(0xfb)]};const _0x2e9d05=parseExplicitDbDirectory(_0x500c80);if(_0x2e9d05!=null)return{'dbId':_0x2e9d05,'dbName':await getDbName(_0x68ae57,_0x2e9d05)[_0x45ab89(0xf0)](()=>undefined)};const _0x268b0b=await listDatabases(_0x68ae57),_0x5b1cb0=_0x268b0b[_0x45ab89(0xdd)](_0x31f2c5=>buildDbDirectoryName(_0x31f2c5[_0x45ab89(0xfb)],_0x31f2c5[_0x45ab89(0xf3)])===_0x500c80);if(_0x5b1cb0[_0x45ab89(0x107)]===0x1)return{'dbId':_0x5b1cb0[0x0][_0x45ab89(0xf3)],'dbName':_0x5b1cb0[0x0][_0x45ab89(0xfb)]};if(_0x5b1cb0[_0x45ab89(0x107)]===0x0)throw CliErrors[_0x45ab89(0x114)](_0x45ab89(0x11d)+_0x500c80+'\x22\x20for\x20sqlCode\x20'+_0x14c8a1[_0x45ab89(0xee)]+'.');const _0x1b5ce9=_0x5b1cb0[_0x45ab89(0xe2)](_0x3d13f5=>_0x3d13f5[_0x45ab89(0xfb)]+'\x20('+_0x3d13f5[_0x45ab89(0xf3)]+')')[_0x45ab89(0xfa)](',\x20');throw CliErrors[_0x45ab89(0x114)](_0x45ab89(0xec)+_0x500c80+_0x45ab89(0x110)+_0x14c8a1['sqlCode']+':\x20'+_0x1b5ce9);}function parseExplicitDbDirectory(_0x593b1d){const _0x183de9=a176_0x2db0bc,_0x757e10=/^db-(\d+)$/[_0x183de9(0x10f)](_0x593b1d);if(!_0x757e10)return null;const _0x135d5b=Number(_0x757e10[0x1]);return Number[_0x183de9(0x104)](_0x135d5b)&&_0x135d5b>0x0?_0x135d5b:null;}
|
package/lib/commands/sql/save.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a177_0x21420f=a177_0x4b30;(function(_0x222b48,_0x4902d6){const _0xe9eb34=a177_0x4b30,_0xd7bfb1=_0x222b48();while(!![]){try{const _0x8d33aa=-parseInt(_0xe9eb34(0x15a))/0x1+parseInt(_0xe9eb34(0x155))/0x2*(-parseInt(_0xe9eb34(0x163))/0x3)+-parseInt(_0xe9eb34(0x168))/0x4*(parseInt(_0xe9eb34(0x167))/0x5)+-parseInt(_0xe9eb34(0x15c))/0x6*(-parseInt(_0xe9eb34(0x157))/0x7)+-parseInt(_0xe9eb34(0x161))/0x8*(parseInt(_0xe9eb34(0x15e))/0x9)+parseInt(_0xe9eb34(0x15b))/0xa*(parseInt(_0xe9eb34(0x16d))/0xb)+parseInt(_0xe9eb34(0x15f))/0xc;if(_0x8d33aa===_0x4902d6)break;else _0xd7bfb1['push'](_0xd7bfb1['shift']());}catch(_0x3a8980){_0xd7bfb1['push'](_0xd7bfb1['shift']());}}}(a177_0x4232,0xc7a1c));import{CliErrors}from'../../errors.js';function a177_0x4b30(_0x2716e2,_0x2b49ae){_0x2716e2=_0x2716e2-0x155;const _0x4232e3=a177_0x4232();let _0x4b30db=_0x4232e3[_0x2716e2];return _0x4b30db;}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=[a177_0x21420f(0x158),a177_0x21420f(0x160),'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`.'][a177_0x21420f(0x16a)]('\x0a');export const sqlSave={'service':a177_0x21420f(0x165),'command':'save','description':a177_0x21420f(0x156),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a177_0x21420f(0x169),'type':a177_0x21420f(0x15d),'required':!![],'description':a177_0x21420f(0x162)},SQLCODE_FLAG_OPTIONAL,{'name':a177_0x21420f(0x159),'type':a177_0x21420f(0x15d),'description':a177_0x21420f(0x16c)},{'name':'db','type':a177_0x21420f(0x15d),'description':a177_0x21420f(0x164)},{'name':'description','type':a177_0x21420f(0x15d),'description':a177_0x21420f(0x16b)}],async 'validate'(){const _0x345c5f=a177_0x21420f;throw CliErrors[_0x345c5f(0x166)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x3e6302=a177_0x21420f;throw CliErrors[_0x3e6302(0x166)](SQL_SAVE_DEPRECATED_HINT);}};function a177_0x4232(){const _0x45c4bf=['`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','sqlname','373007lMphpv','120AzJwSX','6esvTSy','string','4400883HssvVz','12921336qoFcTt','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','8ZDHosp','Path\x20to\x20the\x20SQL\x20file','427827nTjFrD','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','sql','validation','10RUFLKP','1960776NGHDzE','file','join','Query\x20description','SQL\x20query\x20display\x20name','1138852vwVLRH','18pQdtAE','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','11370751qBqXRM'];a177_0x4232=function(){return _0x45c4bf;};return a177_0x4232();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x35c731,_0x2c6ac3){const _0xf75eb8=a178_0xf1c8,_0xc32d7=_0x35c731();while(!![]){try{const _0x432f1e=parseInt(_0xf75eb8(0x1cd))/0x1*(parseInt(_0xf75eb8(0x1d7))/0x2)+-parseInt(_0xf75eb8(0x1e8))/0x3*(parseInt(_0xf75eb8(0x1cc))/0x4)+-parseInt(_0xf75eb8(0x1e5))/0x5*(-parseInt(_0xf75eb8(0x1d5))/0x6)+-parseInt(_0xf75eb8(0x1ea))/0x7*(parseInt(_0xf75eb8(0x1f4))/0x8)+parseInt(_0xf75eb8(0x1cb))/0x9+-parseInt(_0xf75eb8(0x1f1))/0xa+-parseInt(_0xf75eb8(0x1de))/0xb*(parseInt(_0xf75eb8(0x1dc))/0xc);if(_0x432f1e===_0x2c6ac3)break;else _0xc32d7['push'](_0xc32d7['shift']());}catch(_0xbee27){_0xc32d7['push'](_0xc32d7['shift']());}}}(a178_0x5892,0x49123));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='.rabetbase/sql';export function buildSqlLockEntry(_0x2d6bba,_0x27ddd6,_0x553eee,_0x4714f2){const _0x3dab09=a178_0xf1c8,_0x2f853f=detectSqlMode(_0x27ddd6);return{'path':buildSqlRelativePath(_0x2d6bba[_0x3dab09(0x1d1)],_0x2d6bba[_0x3dab09(0x1df)],_0x4714f2?.['dbName'],_0x2f853f,_0x2d6bba[_0x3dab09(0x1f8)]),'hash':_0x553eee,'remoteId':_0x2d6bba['id'],'version':_0x2d6bba[_0x3dab09(0x1e3)],'dbId':Number(_0x2d6bba['dbId']),'dbName':_0x4714f2?.['dbName'],'sqlName':_0x2d6bba[_0x3dab09(0x1df)],'sqlConfig':_0x2d6bba['sqlConfig']??undefined,'mode':_0x2f853f};}export function cloneSqlLockData(_0x5e788f){const _0x17c77a=a178_0xf1c8;return{'apps':Object[_0x17c77a(0x1dd)](Object['entries'](_0x5e788f['apps'])[_0x17c77a(0x1e4)](([_0x4b1336,_0xde45dc])=>[_0x4b1336,{'sqlRoot':_0xde45dc[_0x17c77a(0x1e2)],'lastSync':_0xde45dc[_0x17c77a(0x1ed)],'sqls':{..._0xde45dc['sqls']}}]))};}function a178_0x5892(){const _0x2fdb48=['stdin','test','filter','4002540yYRddu','mode','sqlContent','144zRkgCS','trim','yes','question','dbId','close','2646360lMIHDW','40slHYoW','1OmgKpy','description','stderr','\x20-->','sqlCode','split','syncedAt','join','23808ZsVhrD','dbName','513496BBSjFG','<!--\x20@lovrabet.','endsWith','apps','trimStart','36UQPSKr','fromEntries','909689LJJjms','sqlName','path','push','sqlRoot','version','map','645WEtndM','replace','\x20[y/N]\x20','3669MlwEsz','toLowerCase','39970auajHz','length','mybatisXml','lastSync'];a178_0x5892=function(){return _0x2fdb48;};return a178_0x5892();}export function ensureRemoteSqlContent(_0xb6aecd){const _0x1343f8=a178_0xf1c8;return _0xb6aecd[_0x1343f8(0x1f3)]??'';}export function buildLocalSqlFileContent(_0xc35269,_0x456f38,_0x519291){const _0x4d0fad=a178_0xf1c8,_0x2188f4=_0x519291?.['mode']??detectSqlMode(_0x456f38),_0x2f4278=stripLocalSqlMetadata(_0x456f38,_0x2188f4)[_0x4d0fad(0x1f5)](),_0x34f9e5=[...buildMetadataHeaderLines({'sqlCode':_0xc35269[_0x4d0fad(0x1d1)],'sqlName':_0xc35269[_0x4d0fad(0x1df)],'dbId':_0xc35269[_0x4d0fad(0x1f8)],'dbName':_0x519291?.[_0x4d0fad(0x1d6)],'mode':_0x2188f4,'syncedAt':_0x519291?.[_0x4d0fad(0x1d3)],'description':_0x519291?.[_0x4d0fad(0x1ce)]},_0x2188f4),'',_0x2f4278],_0x5f2633=_0x34f9e5['join']('\x0a');return _0x5f2633[_0x4d0fad(0x1d9)]('\x0a')?_0x5f2633:_0x5f2633+'\x0a';}export function stripLocalSqlMetadata(_0x2e7f42,_0x18c37a){const _0x7d5655=a178_0xf1c8,_0x32013d=_0x2e7f42[_0x7d5655(0x1e6)](/\r\n/g,'\x0a')[_0x7d5655(0x1d2)]('\x0a'),_0x1241af=[];let _0x28257e=0x0;if(_0x18c37a===_0x7d5655(0x1ec))while(_0x28257e<_0x32013d[_0x7d5655(0x1eb)]){const _0x3ee249=_0x32013d[_0x28257e]??'';if(/^\s*<!--\s*@lovrabet\./[_0x7d5655(0x1ef)](_0x3ee249)){_0x28257e++;continue;}if(_0x3ee249[_0x7d5655(0x1f5)]()===''&&_0x28257e>0x0){_0x28257e++;continue;}break;}else while(_0x28257e<_0x32013d[_0x7d5655(0x1eb)]){const _0x1576c4=_0x32013d[_0x28257e]??'';if(/^\s*--\s*@lovrabet\./[_0x7d5655(0x1ef)](_0x1576c4)){_0x28257e++;continue;}if(_0x1576c4[_0x7d5655(0x1f5)]()===''&&_0x28257e>0x0){_0x28257e++;continue;}break;}for(;_0x28257e<_0x32013d['length'];_0x28257e++){_0x1241af[_0x7d5655(0x1e1)](_0x32013d[_0x28257e]);}return _0x1241af[_0x7d5655(0x1d4)]('\x0a')[_0x7d5655(0x1db)]();}export function resolveSqlMode(_0xc81e9a,_0x53df6d){const _0x455d66=a178_0xf1c8;if(_0x53df6d?.[_0x455d66(0x1f2)])return _0x53df6d[_0x455d66(0x1f2)];return detectSqlMode(_0xc81e9a);}export function resolveSqlFileName(_0x5e1032,_0x21f214,_0x186b47){const _0x5827d5=a178_0xf1c8;if(_0x186b47?.[_0x5827d5(0x1e0)])return _0x186b47['path'];if(_0x186b47?.[_0x5827d5(0x1df)]||_0x186b47?.[_0x5827d5(0x1d6)])return buildSqlRelativePath(_0x5e1032,_0x186b47?.['sqlName'],_0x186b47?.['dbName'],resolveSqlMode(_0x21f214,_0x186b47),_0x186b47?.[_0x5827d5(0x1f8)]);return buildDefaultSqlFileName(_0x5e1032,resolveSqlMode(_0x21f214,_0x186b47));}export function resolveSqlLocalDir(_0xd73223,_0x54c144){return join(_0xd73223,SQL_LOCAL_REL_DIR,_0x54c144);}export async function confirmForceOverwrite(_0x3ab351){const _0x229d4c=a178_0xf1c8,_0x3888e4=createInterface({'input':process[_0x229d4c(0x1ee)],'output':process[_0x229d4c(0x1cf)]}),_0x5e5a14=await new Promise(_0x46307a=>{const _0x162cb9=_0x229d4c;_0x3888e4[_0x162cb9(0x1f7)](_0x3ab351+_0x162cb9(0x1e7),_0x46307a);});return _0x3888e4[_0x229d4c(0x1ca)](),['y',_0x229d4c(0x1f6)]['includes'](_0x5e5a14['trim']()[_0x229d4c(0x1e9)]());}export function findSqlLockScope(_0x4f3850,_0x11202b){const _0x578c60=a178_0xf1c8;return _0x4f3850[_0x578c60(0x1da)][_0x11202b];}function a178_0xf1c8(_0x921dc3,_0x3f417c){_0x921dc3=_0x921dc3-0x1ca;const _0x5892b7=a178_0x5892();let _0xf1c87b=_0x5892b7[_0x921dc3];return _0xf1c87b;}function buildMetadataHeaderLines(_0x33de3b,_0x5a577b){const _0x4f863d=a178_0xf1c8,_0x182a39=[[_0x4f863d(0x1d1),_0x33de3b[_0x4f863d(0x1d1)]],['sqlName',_0x33de3b[_0x4f863d(0x1df)]],[_0x4f863d(0x1f8),_0x33de3b[_0x4f863d(0x1f8)]],[_0x4f863d(0x1d6),_0x33de3b['dbName']],[_0x4f863d(0x1f2),_0x33de3b['mode']],[_0x4f863d(0x1d3),_0x33de3b['syncedAt']],[_0x4f863d(0x1ce),_0x33de3b[_0x4f863d(0x1ce)]]];if(_0x5a577b==='mybatisXml')return _0x182a39[_0x4f863d(0x1f0)](([,_0x9eb5ef])=>_0x9eb5ef!==undefined&&_0x9eb5ef!==null&&String(_0x9eb5ef)['trim']()!=='')[_0x4f863d(0x1e4)](([_0x50d3c9,_0x53185c])=>_0x4f863d(0x1d8)+_0x50d3c9+':\x20'+String(_0x53185c)+_0x4f863d(0x1d0));return _0x182a39['filter'](([,_0x4778ae])=>_0x4778ae!==undefined&&_0x4778ae!==null&&String(_0x4778ae)['trim']()!=='')['map'](([_0x30b1f9,_0x3a53fa])=>'--\x20@lovrabet.'+_0x30b1f9+':\x20'+String(_0x3a53fa));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a179_0x2b5d(){const _0xfc2862=['remote','\x20missing,\x20','status','6GEFCXM','1231775TGLbsA','6387835cKnckb','totalCount','sqlName','3972315NqrZCH','tableData','keys','sqls','boolean','hash','lockFilePath','lockKey','appCode','read','sqlRoot','sql','map','1423076YJNdmZ','1621420yQubRK','push','sqlCode','has','path','length','\x20unchanged','28827712UQynFV','paging','\x20added,\x20','4556755hIOuue'];a179_0x2b5d=function(){return _0xfc2862;};return a179_0x2b5d();}const a179_0x34c744=a179_0x5c75;(function(_0x4d08b2,_0x2f21e1){const _0x4f77d2=a179_0x5c75,_0x25c194=_0x4d08b2();while(!![]){try{const _0x231ef3=-parseInt(_0x4f77d2(0x14d))/0x1+parseInt(_0x4f77d2(0x15f))/0x2+-parseInt(_0x4f77d2(0x151))/0x3+-parseInt(_0x4f77d2(0x15e))/0x4+-parseInt(_0x4f77d2(0x14e))/0x5*(parseInt(_0x4f77d2(0x14c))/0x6)+parseInt(_0x4f77d2(0x148))/0x7+parseInt(_0x4f77d2(0x145))/0x8;if(_0x231ef3===_0x2f21e1)break;else _0x25c194['push'](_0x25c194['shift']());}catch(_0x82d8ed){_0x25c194['push'](_0x25c194['shift']());}}}(a179_0x2b5d,0xd5d93));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';function a179_0x5c75(_0x58d538,_0x5860b0){_0x58d538=_0x58d538-0x140;const _0x2b5d29=a179_0x2b5d();let _0x5c7535=_0x2b5d29[_0x58d538];return _0x5c7535;}import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x5064ea){const _0x3a08ee=a179_0x5c75,_0x4a59ef=[];let _0x5b404b=0x1;while(!![]){const _0x3edf91=await listSqlQueries(_0x5064ea,{'currentPage':_0x5b404b,'pageSize':PAGE_SIZE}),_0x4f0ca2=_0x3edf91[_0x3a08ee(0x152)]??[];_0x4a59ef[_0x3a08ee(0x160)](..._0x4f0ca2['map'](_0x47d777=>_0x47d777[_0x3a08ee(0x140)]));if(_0x4f0ca2[_0x3a08ee(0x143)]===0x0)break;const _0x3c4851=_0x3edf91[_0x3a08ee(0x146)]?.[_0x3a08ee(0x14f)];if(_0x3c4851!=null?_0x4a59ef[_0x3a08ee(0x143)]>=_0x3c4851:_0x4f0ca2[_0x3a08ee(0x143)]<PAGE_SIZE)break;_0x5b404b++;}return _0x4a59ef;}export const sqlStatus={'service':a179_0x34c744(0x15c),'command':a179_0x34c744(0x14b),'description':'Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','risk':a179_0x34c744(0x15a),'flags':[{'name':a179_0x34c744(0x149),'type':a179_0x34c744(0x155),'description':'Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally'}],async 'execute'(_0x538d3d){const _0x40b3d0=a179_0x34c744,_0x49f1a7=loadSqlProjectConfig(_0x538d3d['appCode']),_0x251b71=await readSqlLockFile(_0x49f1a7[_0x40b3d0(0x157)]),{appLock:_0x1949b2}=ensureSqlLockScope(_0x251b71??createEmptySqlLock(),_0x49f1a7[_0x40b3d0(0x159)],_0x49f1a7[_0x40b3d0(0x15b)],_0x40b3d0(0x14b)),_0x2c389a=await scanLocalSqlQueries(_0x49f1a7),_0x5b36e6=[],_0x293f71=[],_0x37f7a4=[],_0x57ef43=[],_0x511d64=new Set(_0x2c389a[_0x40b3d0(0x15d)](_0x5c009a=>_0x5c009a[_0x40b3d0(0x158)]));for(const _0x2053cd of _0x2c389a){const _0x8076b6=await computeSqlFileHash(_0x2053cd['filePath']),_0x4cc691=_0x1949b2[_0x40b3d0(0x154)][_0x2053cd[_0x40b3d0(0x158)]],_0x4935a4=!!_0x4cc691&&_0x4cc691[_0x40b3d0(0x142)]!==_0x2053cd['relativePath'],_0x4a0316=!!_0x4cc691&&!!_0x2053cd[_0x40b3d0(0x150)]&&_0x4cc691[_0x40b3d0(0x150)]!==_0x2053cd[_0x40b3d0(0x150)];if(!_0x4cc691)_0x5b36e6[_0x40b3d0(0x160)](_0x2053cd[_0x40b3d0(0x158)]);else _0x4cc691[_0x40b3d0(0x156)]!==_0x8076b6||_0x4935a4||_0x4a0316?_0x293f71[_0x40b3d0(0x160)](_0x2053cd['lockKey']):_0x37f7a4['push'](_0x2053cd['lockKey']);}for(const _0x4dbf65 of Object[_0x40b3d0(0x153)](_0x1949b2['sqls'])){!_0x511d64['has'](_0x4dbf65)&&_0x57ef43[_0x40b3d0(0x160)](_0x4dbf65);}const _0x568f18=[];if(_0x538d3d['bool'](_0x40b3d0(0x149))){const _0x2c0d42=await fetchAllSqlCodes(_0x538d3d['appCode']);for(const _0x1f73d2 of _0x2c0d42){!_0x511d64[_0x40b3d0(0x141)](_0x1f73d2)&&!_0x1949b2[_0x40b3d0(0x154)][_0x1f73d2]&&_0x568f18[_0x40b3d0(0x160)](_0x1f73d2);}}const _0x35df43=_0x5b36e6[_0x40b3d0(0x143)]===0x0&&_0x293f71[_0x40b3d0(0x143)]===0x0&&_0x57ef43[_0x40b3d0(0x143)]===0x0&&_0x568f18['length']===0x0;return{'ok':!![],'data':{'added':_0x5b36e6,'modified':_0x293f71,'missing':_0x57ef43,'unchanged':_0x37f7a4,'remoteOnly':_0x568f18},'message':_0x35df43?'All\x20SQL\x20queries\x20are\x20in\x20sync.':_0x5b36e6['length']+_0x40b3d0(0x147)+_0x293f71[_0x40b3d0(0x143)]+'\x20modified,\x20'+_0x57ef43[_0x40b3d0(0x143)]+_0x40b3d0(0x14a)+_0x37f7a4['length']+_0x40b3d0(0x144)+(_0x568f18[_0x40b3d0(0x143)]>0x0?',\x20'+_0x568f18[_0x40b3d0(0x143)]+'\x20remote-only':'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a180_0x23fc54=a180_0x22c9;(function(_0x272e9a,_0x266b81){const _0x3cccc8=a180_0x22c9,_0xdedf65=_0x272e9a();while(!![]){try{const _0x3e4508=-parseInt(_0x3cccc8(0xfa))/0x1*(parseInt(_0x3cccc8(0x10e))/0x2)+parseInt(_0x3cccc8(0xfb))/0x3*(parseInt(_0x3cccc8(0xe3))/0x4)+-parseInt(_0x3cccc8(0x109))/0x5+parseInt(_0x3cccc8(0x116))/0x6+-parseInt(_0x3cccc8(0x114))/0x7*(parseInt(_0x3cccc8(0x102))/0x8)+-parseInt(_0x3cccc8(0x10a))/0x9+parseInt(_0x3cccc8(0x110))/0xa;if(_0x3e4508===_0x266b81)break;else _0xdedf65['push'](_0xdedf65['shift']());}catch(_0x1e4094){_0xdedf65['push'](_0xdedf65['shift']());}}}(a180_0x50f0,0x8ea06));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';function a180_0x22c9(_0x73c46c,_0x196319){_0x73c46c=_0x73c46c-0xe1;const _0x50f009=a180_0x50f0();let _0x22c9f0=_0x50f009[_0x73c46c];return _0x22c9f0;}import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':a180_0x23fc54(0x100),'command':a180_0x23fc54(0xe5),'description':a180_0x23fc54(0x11a),'risk':a180_0x23fc54(0x105),'flags':[{'name':'file','type':a180_0x23fc54(0x123),'description':'Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'},{'name':'sql','type':a180_0x23fc54(0x123),'description':a180_0x23fc54(0xff)},{'name':a180_0x23fc54(0xfc),'type':'string','description':a180_0x23fc54(0x112)},{'name':a180_0x23fc54(0xe6),'type':a180_0x23fc54(0xe1),'description':'Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata'}],async 'execute'(_0x20ba6c){const _0x4fe917=a180_0x23fc54,_0x42b1fb=_0x20ba6c[_0x4fe917(0x125)](_0x4fe917(0x11e)),_0x3c702d=_0x20ba6c['str'](_0x4fe917(0x100)),_0x4dfa56=_0x20ba6c[_0x4fe917(0x125)](_0x4fe917(0xfc)),_0x35512f=_0x20ba6c[_0x4fe917(0xee)]('check-indexes');if(!_0x42b1fb&&!_0x3c702d)throw CliErrors[_0x4fe917(0x122)]('file',_0x4fe917(0xeb));if(_0x35512f&&!_0x4dfa56)throw CliErrors[_0x4fe917(0xf2)](_0x4fe917(0xf4));let _0x3ca634;if(_0x42b1fb){const _0x58f19a=resolve(process[_0x4fe917(0xf7)](),_0x42b1fb);if(!existsSync(_0x58f19a))throw CliErrors[_0x4fe917(0xf2)](_0x4fe917(0x117)+_0x58f19a);_0x3ca634=readFileSync(_0x58f19a,_0x4fe917(0x121));}else _0x3ca634=_0x3c702d;const _0x5dce59=validateSql(_0x3ca634),_0x5e268d={'valid':_0x5dce59['valid'],'sqlType':_0x5dce59[_0x4fe917(0x104)][_0x4fe917(0x11f)],'isSelectOnly':_0x5dce59[_0x4fe917(0x104)]['isSelectOnly'],'isDangerous':_0x5dce59[_0x4fe917(0x104)][_0x4fe917(0x118)],'tables':_0x5dce59[_0x4fe917(0xe8)],'parameters':_0x5dce59[_0x4fe917(0x119)],'message':_0x5dce59[_0x4fe917(0x107)]};_0x5dce59[_0x4fe917(0x104)][_0x4fe917(0xe7)]&&(_0x5e268d['reason']=_0x5dce59[_0x4fe917(0x104)][_0x4fe917(0xe7)]);if(_0x4dfa56&&_0x5dce59[_0x4fe917(0xfd)]){const _0x46e4b9=_0x4dfa56[_0x4fe917(0xf1)](',')['map'](_0x58e67=>_0x58e67['trim']())[_0x4fe917(0xf8)](Boolean),_0x35375b=[],_0x1c48f1=[],_0x16e47a=filterDbTableBackedDatasets(await listDatasets(_0x20ba6c[_0x4fe917(0x11c)])),_0xf39ff1=new Map(_0x16e47a[_0x4fe917(0x106)](_0x35e51b=>[_0x35e51b[_0x4fe917(0xf5)]?.['tableName']?.[_0x4fe917(0x101)](),_0x35e51b]));for(const _0x8c767a of _0x5dce59['tables']){const _0x4b9556=_0xf39ff1[_0x4fe917(0x10c)](_0x8c767a[_0x4fe917(0x101)]());!_0x4b9556&&_0x35375b[_0x4fe917(0xf3)]('Table\x20\x22'+_0x8c767a+_0x4fe917(0xf0));}for(const _0x11c690 of _0x46e4b9){let _0x4dfbb6;try{_0x4dfbb6=await getDatasetDetail(_0x11c690);}catch{_0x35375b['push'](_0x4fe917(0x103)+_0x11c690+'\x22\x20not\x20found\x20or\x20not\x20accessible');continue;}assertDatasetIsDbTableBacked(_0x4dfbb6,_0x4fe917(0x120));const _0x378b8d=Array[_0x4fe917(0xfe)](_0x4dfbb6[_0x4fe917(0xed)])?_0x4dfbb6[_0x4fe917(0xed)]:[],_0x1ac448=new Set(_0x378b8d[_0x4fe917(0x106)](_0x4572be=>_0x4572be[_0x4fe917(0x10f)]?.[_0x4fe917(0x101)]())),_0x79e9c=_0x4dfbb6[_0x4fe917(0xf5)]?.[_0x4fe917(0x115)]||_0x4dfbb6[_0x4fe917(0x115)]||_0x11c690;_0x5e268d['schema:'+_0x79e9c]={'code':_0x11c690,'tableName':_0x79e9c,'fieldCount':_0x1ac448[_0x4fe917(0xe2)],'fields':Array[_0x4fe917(0xe9)](_0x1ac448)};if(_0x35512f){const _0x64b384=normalizeDatasetIndexes(_0x4dfbb6);_0x1c48f1['push']({'tableName':_0x79e9c,..._0x64b384});}}_0x35375b[_0x4fe917(0xef)]>0x0&&(_0x5e268d['schemaWarnings']=_0x35375b),_0x35512f&&(_0x5e268d[_0x4fe917(0xec)]=auditSqlJoinIndexes(_0x3ca634,_0x1c48f1));}return{'ok':_0x5dce59[_0x4fe917(0xfd)],'data':_0x5e268d,'message':_0x5dce59['message']};}};function a180_0x50f0(){const _0x36c499=['file','type','SQL\x20schema\x20validation','utf-8','flagMissing','string','trim','str','find','boolean','size','20316hnieaQ','primary','validate','check-indexes','reason','tables','from','indexes','Provide\x20--file\x20or\x20--sql','joinAudit','fields','bool','length','\x22\x20not\x20found\x20in\x20any\x20dataset','split','validation','push','--check-indexes\x20requires\x20--schemas.','dbtableConfig','index_columns','cwd','filter','dataset','222886eiZWAX','669CEEODt','schemas','valid','isArray','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','sql','toLowerCase','139976gAlFWs','Dataset\x20\x22','sqlType','read','map','message','flatMap','977770pNREGL','10233414UkGUFM','columnNames','get','columns','2uVmFQd','name','9988930IZgZPd','index_type','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','pkField','168qjncXq','tableName','2568612MOIAGF','File\x20not\x20found:\x20','isDangerous','parameters','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','index_name','appCode','indexName'];a180_0x50f0=function(){return _0x36c499;};return a180_0x50f0();}function normalizeDatasetIndexes(_0x26877d){const _0xdc29b3=a180_0x23fc54,_0x42e24c=Array[_0xdc29b3(0xfe)](_0x26877d?.[_0xdc29b3(0xf9)]?.[_0xdc29b3(0xea)])?_0x26877d[_0xdc29b3(0xf9)][_0xdc29b3(0xea)]:Array[_0xdc29b3(0xfe)](_0x26877d?.[_0xdc29b3(0xea)])?_0x26877d['indexes']:[],_0x19d5eb=_0x42e24c[_0xdc29b3(0x108)](_0x1a745c=>{const _0x406432=_0xdc29b3,_0x8416f8=Array['isArray'](_0x1a745c?.[_0x406432(0xf6)])?_0x1a745c[_0x406432(0xf6)]:Array[_0x406432(0xfe)](_0x1a745c?.[_0x406432(0x10b)])?_0x1a745c[_0x406432(0x10b)]:Array[_0x406432(0xfe)](_0x1a745c?.[_0x406432(0x10d)])?_0x1a745c[_0x406432(0x10d)]:[],_0x36395d=_0x8416f8[_0x406432(0xf8)](_0x551f4c=>typeof _0x551f4c===_0x406432(0x123))['map'](_0x1c661d=>_0x1c661d[_0x406432(0x124)]())[_0x406432(0xf8)](Boolean);if(_0x36395d[_0x406432(0xef)]===0x0)return[];const _0x15a6e3=[_0x1a745c?.[_0x406432(0x11d)],_0x1a745c?.[_0x406432(0x11b)],_0x1a745c?.[_0x406432(0x10f)]][_0x406432(0x126)](_0x5caed6=>typeof _0x5caed6===_0x406432(0x123)&&_0x5caed6[_0x406432(0x124)]()),_0x245936=[_0x1a745c?.[_0x406432(0x111)],_0x1a745c?.[_0x406432(0x11f)]][_0x406432(0x126)](_0xfe275b=>typeof _0xfe275b==='string'&&_0xfe275b[_0x406432(0x124)]());return[{..._0x15a6e3?{'name':_0x15a6e3[_0x406432(0x124)]()}:{},..._0x245936?{'type':_0x245936[_0x406432(0x124)]()}:{},'columns':_0x36395d}];}),_0x2412ce=[..._0x19d5eb],_0x204f5e=typeof _0x26877d?.[_0xdc29b3(0xf5)]?.[_0xdc29b3(0x113)]===_0xdc29b3(0x123)?_0x26877d['dbtableConfig'][_0xdc29b3(0x113)][_0xdc29b3(0xf1)](',')['map'](_0x4e5e49=>_0x4e5e49['trim']())[_0xdc29b3(0xf8)](Boolean):[];return _0x204f5e[_0xdc29b3(0xef)]>0x0&&_0x2412ce['unshift']({'type':_0xdc29b3(0xe4),'columns':_0x204f5e}),{'indexes':_0x2412ce,'metadataAvailable':_0x19d5eb[_0xdc29b3(0xef)]>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x15ed5a,_0x505844){const _0x9d5968=a181_0x30d2,_0x5c1a75=_0x15ed5a();while(!![]){try{const _0x17bc77=parseInt(_0x9d5968(0xa1))/0x1*(-parseInt(_0x9d5968(0xa4))/0x2)+parseInt(_0x9d5968(0xa5))/0x3+parseInt(_0x9d5968(0xa8))/0x4*(-parseInt(_0x9d5968(0xa2))/0x5)+-parseInt(_0x9d5968(0xa3))/0x6*(-parseInt(_0x9d5968(0xa6))/0x7)+parseInt(_0x9d5968(0xa7))/0x8+parseInt(_0x9d5968(0xa0))/0x9*(-parseInt(_0x9d5968(0xa9))/0xa)+-parseInt(_0x9d5968(0xaa))/0xb*(-parseInt(_0x9d5968(0x9f))/0xc);if(_0x17bc77===_0x505844)break;else _0x5c1a75['push'](_0x5c1a75['shift']());}catch(_0x4e8922){_0x5c1a75['push'](_0x5c1a75['shift']());}}}(a181_0xb949,0xbf9d3));import{taskStatus}from'../../commands/task/status.js';function a181_0xb949(){const _0x39b202=['6355zGXpyF','176880uukhfg','1021070NPqAgJ','1216338zuxwOt','140AbxIyq','6490400jKPbcb','4404fibjmg','3099160HVINxe','22QjIKum','12112668DXlDGM','18cCHXdI','2QrGXNE'];a181_0xb949=function(){return _0x39b202;};return a181_0xb949();}function a181_0x30d2(_0x461aa4,_0x24ed24){_0x461aa4=_0x461aa4-0x9f;const _0xb9499f=a181_0xb949();let _0x30d284=_0xb9499f[_0x461aa4];return _0x30d284;}export const taskDefinitions=[taskStatus];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a182_0x3e1938=a182_0x3510;(function(_0xdd2f65,_0x3dc77e){const _0x5a4264=a182_0x3510,_0x1082ba=_0xdd2f65();while(!![]){try{const _0x4a4421=-parseInt(_0x5a4264(0x86))/0x1*(parseInt(_0x5a4264(0x90))/0x2)+parseInt(_0x5a4264(0x8c))/0x3*(-parseInt(_0x5a4264(0x89))/0x4)+parseInt(_0x5a4264(0x8b))/0x5+-parseInt(_0x5a4264(0x8f))/0x6+-parseInt(_0x5a4264(0x82))/0x7*(parseInt(_0x5a4264(0x8a))/0x8)+-parseInt(_0x5a4264(0x81))/0x9*(-parseInt(_0x5a4264(0x85))/0xa)+parseInt(_0x5a4264(0x96))/0xb;if(_0x4a4421===_0x3dc77e)break;else _0x1082ba['push'](_0x1082ba['shift']());}catch(_0x1cb138){_0x1082ba['push'](_0x1082ba['shift']());}}}(a182_0x2ec3,0xef265));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a182_0x2ec3(){const _0x58d23c=['6222152fwGuSG','88RFSolg','1624590sFEMJi','3qgttbx',',\x20received\x20','flagMissing','4114302KDXmzN','2QJEMaU','compress','task','Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','task-id','string','35195171NLJujQ','isTerminal','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','cookie','str','4642047fStUdc','366583HbrKjc','taskId','appCode','10qgFLGS','243391FcNoxP','status','read'];a182_0x2ec3=function(){return _0x58d23c;};return a182_0x2ec3();}import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from'../../commands/common/async-task.js';function a182_0x3510(_0xe5ace4,_0x338ae1){_0xe5ace4=_0xe5ace4-0x7f;const _0x2ec3b7=a182_0x2ec3();let _0x351010=_0x2ec3b7[_0xe5ace4];return _0x351010;}import{getAsyncTaskStatus}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const taskStatus={'service':a182_0x3e1938(0x92),'command':a182_0x3e1938(0x87),'description':'Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','risk':a182_0x3e1938(0x88),'defaultOutputFormat':a182_0x3e1938(0x91),'structuredErrors':!![],'flags':[{'name':'task-id','type':a182_0x3e1938(0x95),'required':!![],'description':a182_0x3e1938(0x98)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2daf40){const _0x53caa6=a182_0x3e1938;if(!_0x2daf40[_0x53caa6(0x80)](_0x53caa6(0x94))['trim']())throw CliErrors[_0x53caa6(0x8e)](_0x53caa6(0x94));},async 'execute'(_0x30c4f2){const _0x3f6d93=a182_0x3e1938,_0x268351=_0x30c4f2[_0x3f6d93(0x80)](_0x3f6d93(0x94))['trim'](),_0x264cf5=normalizeAsyncTask(await getAsyncTaskStatus(_0x268351,_0x30c4f2[_0x3f6d93(0x84)],_0x30c4f2[_0x3f6d93(0x7f)]));if(_0x264cf5[_0x3f6d93(0x83)]!==_0x268351)throw CliErrors['apiError'](_0x3f6d93(0x93)+_0x268351+_0x3f6d93(0x8d)+_0x264cf5[_0x3f6d93(0x83)]+'.');const _0x1d4301=buildAsyncTaskStatusCommand(_0x264cf5[_0x3f6d93(0x83)],_0x30c4f2[_0x3f6d93(0x84)]);return{'ok':!![],'message':asyncTaskMessage(_0x264cf5),'data':{'appCode':_0x30c4f2[_0x3f6d93(0x84)],..._0x264cf5,'query':_0x264cf5[_0x3f6d93(0x97)]?null:{'command':_0x1d4301}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a183_0x1dc2fa=a183_0x4df3;(function(_0x4bc582,_0xfc296f){const _0x385123=a183_0x4df3,_0x14b4ab=_0x4bc582();while(!![]){try{const _0x496859=-parseInt(_0x385123(0x156))/0x1+-parseInt(_0x385123(0x14c))/0x2+-parseInt(_0x385123(0x157))/0x3+parseInt(_0x385123(0x153))/0x4*(parseInt(_0x385123(0x14b))/0x5)+-parseInt(_0x385123(0x155))/0x6*(parseInt(_0x385123(0x150))/0x7)+-parseInt(_0x385123(0x152))/0x8+-parseInt(_0x385123(0x14d))/0x9*(-parseInt(_0x385123(0x14f))/0xa);if(_0x496859===_0xfc296f)break;else _0x14b4ab['push'](_0x14b4ab['shift']());}catch(_0x56862e){_0x14b4ab['push'](_0x14b4ab['shift']());}}}(a183_0x1227,0x2c89c));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';function a183_0x4df3(_0x4f8dee,_0x553e09){_0x4f8dee=_0x4f8dee-0x14a;const _0x122703=a183_0x1227();let _0x4df31f=_0x122703[_0x4f8dee];return _0x4df31f;}export const workspaceAddDefinition={'service':a183_0x1dc2fa(0x158),'command':a183_0x1dc2fa(0x151),'description':a183_0x1dc2fa(0x154),'risk':a183_0x1dc2fa(0x159),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a183_0x1dc2fa(0x14a),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x125f61=>validateAppName(_0x125f61,a183_0x1dc2fa(0x14e)),'execute':_0x5a146f=>runAppAdd(_0x5a146f,a183_0x1dc2fa(0x14e))};function a183_0x1227(){const _0x28e9bc=['App\x20profile\x20name','1495sQrMLT','589416UANcfp','450ArwXRv','workspace\x20add','131430RLYmOx','21vbjEWd','add','6120ULLwnh','1348RERYpe','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','73266JyaOsG','84043Qzmbzc','478008QAHFOW','workspace','write'];a183_0x1227=function(){return _0x28e9bc;};return a183_0x1227();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a184_0x51823d=a184_0x251b;(function(_0x16a6ad,_0x555fe7){const _0x5879f1=a184_0x251b,_0x338491=_0x16a6ad();while(!![]){try{const _0x199c1c=-parseInt(_0x5879f1(0xc4))/0x1*(parseInt(_0x5879f1(0xcd))/0x2)+-parseInt(_0x5879f1(0xc2))/0x3*(parseInt(_0x5879f1(0xd9))/0x4)+-parseInt(_0x5879f1(0xf3))/0x5+-parseInt(_0x5879f1(0xd7))/0x6*(-parseInt(_0x5879f1(0xd6))/0x7)+parseInt(_0x5879f1(0xe4))/0x8*(parseInt(_0x5879f1(0xda))/0x9)+parseInt(_0x5879f1(0xe1))/0xa+parseInt(_0x5879f1(0xe9))/0xb*(parseInt(_0x5879f1(0xdc))/0xc);if(_0x199c1c===_0x555fe7)break;else _0x338491['push'](_0x338491['shift']());}catch(_0x34bfd5){_0x338491['push'](_0x338491['shift']());}}}(a184_0x2f86,0x4f526));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';function a184_0x2f86(){const _0x21332f=['pageSize','riskLevel','12752mdMjec','App\x20\x22','workspace','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','defaultApp','66VYkdVD','env','locale','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','\x20workspace\x20use\x20--app\x20<name>`.','flag','appcode','.\x20Credentials:\x20not\x20written.','write','\x22\x20not\x20found.','1467070XoyIBv','str','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','format','join','string','Target\x20environment','apps','48FGqyZt','validation','6wGemFA','Use\x20`','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','use','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','app','\x20(appcode:\x20','workspace.','isArray','90450dIjReD','length','Missing\x20workspace\x20app\x20selector.','\x20--appcode\x20<code>`.','keys',').\x20Config:\x20','init','number','object','229901wxfSmg','24lEFFZI','\x20workspace\x20','59704AJyUxQ','3474hujzAT','Locale\x20for\x20this\x20workspace\x20app\x20profile','46908CNmhma','trim','\x20--app\x20','defaultFormat','Workspace\x20','3583720ziPaUS'];a184_0x2f86=function(){return _0x21332f;};return a184_0x2f86();}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+a184_0x51823d(0xe7),SAFE_PROFILE_KEYS=[a184_0x51823d(0xef),a184_0x51823d(0xea),'apiDir',a184_0x51823d(0xf7),a184_0x51823d(0xe2),a184_0x51823d(0xe3),a184_0x51823d(0xeb)],workspaceFlags=[{'name':a184_0x51823d(0xc9),'type':'string','description':'App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace'},{'name':a184_0x51823d(0xef),'type':'string','description':a184_0x51823d(0xf5)},{'name':a184_0x51823d(0xea),'type':a184_0x51823d(0xbf),'description':a184_0x51823d(0xc0),'enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':'string','description':a184_0x51823d(0xc8)},{'name':'defaultFormat','type':a184_0x51823d(0xbf),'description':'Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a184_0x51823d(0xe2),'type':a184_0x51823d(0xd4),'description':a184_0x51823d(0xf6)},{'name':a184_0x51823d(0xe3),'type':a184_0x51823d(0xbf),'description':'Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RISK_LEVEL_VALUES]},{'name':a184_0x51823d(0xeb),'type':a184_0x51823d(0xbf),'description':a184_0x51823d(0xdb)}];function isRecord(_0x2ccbe4){const _0x4cf789=a184_0x51823d;return!!_0x2ccbe4&&typeof _0x2ccbe4===_0x4cf789(0xd5)&&!Array[_0x4cf789(0xcc)](_0x2ccbe4);}function assertValidAppcode(_0x27f76a){const _0x5a90bf=a184_0x51823d,{valid:_0x172aaf,message:_0x5890}=validateAppcode(_0x27f76a);if(!_0x172aaf)throw CliErrors[_0x5a90bf(0xc3)]('Invalid\x20appcode:\x20'+_0x27f76a,_0x5890);}function sanitizeProfile(_0x35d5a2){if(!isRecord(_0x35d5a2))return{};const _0x212981={};for(const _0x4fc9a6 of SAFE_PROFILE_KEYS){if(_0x35d5a2[_0x4fc9a6]!==undefined)_0x212981[_0x4fc9a6]=_0x35d5a2[_0x4fc9a6];}return _0x212981;}function cloneProfile(_0x1eee44){return isRecord(_0x1eee44)?{..._0x1eee44}:{};}function collectWorkspaceProfileOverrides(_0x3a20d6){const _0x22f415=a184_0x51823d,_0x1a8c1d={},_0x59ee06=_0x3a20d6['str'](_0x22f415(0xea)),_0x1130f7=_0x3a20d6['str']('apiDir'),_0x4b9b6b=_0x3a20d6['str'](_0x22f415(0xdf)),_0x28ec15=_0x3a20d6[_0x22f415(0xee)](_0x22f415(0xe2)),_0x2c812c=_0x3a20d6[_0x22f415(0xf4)]('riskLevel'),_0x4300d8=_0x3a20d6[_0x22f415(0xf4)](_0x22f415(0xeb));if(_0x59ee06)_0x1a8c1d[_0x22f415(0xea)]=_0x59ee06;if(_0x1130f7)_0x1a8c1d['apiDir']=_0x1130f7;if(_0x4b9b6b)_0x1a8c1d[_0x22f415(0xf7)]=_0x4b9b6b;if(_0x28ec15!==undefined&&_0x28ec15!=='')_0x1a8c1d[_0x22f415(0xe2)]=Number(_0x28ec15);if(_0x2c812c)_0x1a8c1d[_0x22f415(0xe3)]=_0x2c812c;if(_0x4300d8)_0x1a8c1d[_0x22f415(0xeb)]=_0x4300d8;return _0x1a8c1d;}async function validateWorkspaceArgs(_0x23bf72){const _0xd39a5f=a184_0x51823d,_0x48dc57=_0x23bf72['str']('app')[_0xd39a5f(0xdd)](),_0x178215=_0x23bf72['str'](_0xd39a5f(0xef))[_0xd39a5f(0xdd)]();if(!_0x48dc57&&!_0x178215)throw CliErrors[_0xd39a5f(0xc3)](_0xd39a5f(0xcf),_0xd39a5f(0xc5)+CLI_BIN_NAME+_0xd39a5f(0xc6)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`.');if(_0x178215)assertValidAppcode(_0x178215);}function resolveKnownApps(){const _0x1827d8=a184_0x51823d,{config:_0x326bc5,layers:_0xf9e1ea}=readRawConfigWithLayers(),_0x40e340=isRecord(_0x326bc5[_0x1827d8(0xc1)])?_0x326bc5[_0x1827d8(0xc1)]:{},_0x35005f=isRecord(_0xf9e1ea['globalConfig'][_0x1827d8(0xc1)])?_0xf9e1ea['globalConfig'][_0x1827d8(0xc1)]:{};return{..._0x35005f,..._0x40e340};}async function configureWorkspace(_0x4bdee3,_0x291c3f){const _0x4a1ae5=a184_0x51823d,_0x3c8743=_0x4bdee3[_0x4a1ae5(0xf4)](_0x4a1ae5(0xc9))[_0x4a1ae5(0xdd)](),_0x28dd3b=_0x4bdee3[_0x4a1ae5(0xf4)](_0x4a1ae5(0xef))[_0x4a1ae5(0xdd)](),_0x4cfee6=_0x3c8743||_0x28dd3b;if(!_0x4cfee6)throw CliErrors[_0x4a1ae5(0xc3)]('Missing\x20workspace\x20app\x20selector.','Use\x20`'+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x4a1ae5(0xed));if(_0x28dd3b)assertValidAppcode(_0x28dd3b);const _0x23423e=resolveWriteConfigPath('project'),_0x2460c9=readConfigFile(_0x23423e),_0x404c1b=resolveKnownApps(),_0x593270=isRecord(_0x2460c9[_0x4a1ae5(0xc1)])?{..._0x2460c9[_0x4a1ae5(0xc1)]}:{},_0x36173d=cloneProfile(_0x593270[_0x4cfee6]),_0x5d4a30=sanitizeProfile(_0x404c1b[_0x4cfee6]),_0x18ecae=_0x28dd3b?{}:_0x5d4a30,_0xfad9cd=_0x28dd3b||_0x18ecae['appcode'];if(!_0xfad9cd){const _0x29f458=Object[_0x4a1ae5(0xd1)](_0x404c1b),_0x53b04f=_0x29f458[_0x4a1ae5(0xce)]===0x0?'Use\x20`'+CLI_BIN_NAME+_0x4a1ae5(0xd8)+_0x291c3f+_0x4a1ae5(0xde)+_0x4cfee6+_0x4a1ae5(0xd0):_0x4a1ae5(0xec)+_0x29f458[_0x4a1ae5(0xbe)](',\x20');throw CliErrors['validation'](_0x4a1ae5(0xe5)+_0x4cfee6+_0x4a1ae5(0xf2),_0x53b04f);}assertValidAppcode(String(_0xfad9cd));const _0x19fa09={..._0x18ecae,..._0x36173d,'appcode':String(_0xfad9cd),...collectWorkspaceProfileOverrides(_0x4bdee3)};return _0x593270[_0x4cfee6]=_0x19fa09,_0x2460c9['apps']=_0x593270,_0x2460c9[_0x4a1ae5(0xe8)]=_0x4cfee6,delete _0x2460c9[_0x4a1ae5(0xef)],delete _0x2460c9[_0x4a1ae5(0xc9)],_0x19fa09[_0x4a1ae5(0xea)]&&(_0x2460c9[_0x4a1ae5(0xea)]=_0x19fa09['env']),writeConfigFile(_0x23423e,_0x2460c9),{'ok':!![],'message':_0x4a1ae5(0xe0)+(_0x291c3f===_0x4a1ae5(0xd3)?'initialized':'updated')+':\x20'+_0x4cfee6+_0x4a1ae5(0xca)+_0x19fa09[_0x4a1ae5(0xef)]+_0x4a1ae5(0xd2)+_0x23423e+_0x4a1ae5(0xf0),'data':{'operation':_0x4a1ae5(0xcb)+_0x291c3f,'configPath':_0x23423e,'app':_0x4cfee6,'appcode':_0x19fa09[_0x4a1ae5(0xef)],'env':_0x19fa09[_0x4a1ae5(0xea)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a184_0x51823d(0xe6),'command':a184_0x51823d(0xd3),'description':'Initialize\x20the\x20current\x20workspace\x20app\x20binding','risk':a184_0x51823d(0xf1),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x515e52=>configureWorkspace(_0x515e52,a184_0x51823d(0xd3))},workspaceUseDefinition={'service':a184_0x51823d(0xe6),'command':a184_0x51823d(0xc7),'description':'Switch\x20the\x20current\x20workspace\x20app\x20binding','risk':a184_0x51823d(0xf1),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0xb25d5f=>configureWorkspace(_0xb25d5f,a184_0x51823d(0xc7))};function a184_0x251b(_0x949b60,_0x38c023){_0x949b60=_0x949b60-0xbe;const _0x2f86fb=a184_0x2f86();let _0x251ba1=_0x2f86fb[_0x949b60];return _0x251ba1;}export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a185_0x18fd4f=a185_0x56da;(function(_0x1f32d2,_0x569c25){const _0x73e2f8=a185_0x56da,_0x5c452b=_0x1f32d2();while(!![]){try{const _0x213e86=parseInt(_0x73e2f8(0x16b))/0x1*(-parseInt(_0x73e2f8(0x165))/0x2)+parseInt(_0x73e2f8(0x16f))/0x3*(-parseInt(_0x73e2f8(0x168))/0x4)+-parseInt(_0x73e2f8(0x16c))/0x5*(-parseInt(_0x73e2f8(0x164))/0x6)+-parseInt(_0x73e2f8(0x16d))/0x7+-parseInt(_0x73e2f8(0x16e))/0x8*(parseInt(_0x73e2f8(0x175))/0x9)+-parseInt(_0x73e2f8(0x173))/0xa+-parseInt(_0x73e2f8(0x16a))/0xb*(-parseInt(_0x73e2f8(0x171))/0xc);if(_0x213e86===_0x569c25)break;else _0x5c452b['push'](_0x5c452b['shift']());}catch(_0x3bed4b){_0x5c452b['push'](_0x5c452b['shift']());}}}(a185_0x4e41,0x70619));function a185_0x56da(_0x579d28,_0xfba3ec){_0x579d28=_0x579d28-0x164;const _0x4e4178=a185_0x4e41();let _0x56da38=_0x4e4178[_0x579d28];return _0x56da38;}import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a185_0x4e41(){const _0xd82d43=['high-risk-write','remove','385776EHbdwX','Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','6127xJobzg','1IKXeXS','193805XDqAxO','5096252FxvpMl','40QkaGJw','21OWXxRs','workspace','32688wdTbYm','App\x20profile\x20name\x20to\x20remove','714510ZSKGmG','workspace\x20remove','554994xaGxaa','138zswVbd','331066wcyNrw'];a185_0x4e41=function(){return _0xd82d43;};return a185_0x4e41();}export const workspaceRemoveDefinition={'service':a185_0x18fd4f(0x170),'command':a185_0x18fd4f(0x167),'description':a185_0x18fd4f(0x169),'risk':a185_0x18fd4f(0x166),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a185_0x18fd4f(0x172),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x40508a=>validateAppName(_0x40508a,'workspace\x20remove'),'execute':_0x41e618=>runAppRemove(_0x41e618,a185_0x18fd4f(0x174))};
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a186_0x2512(_0x514917,_0x516262){_0x514917=_0x514917-0x120;const _0x10fb10=a186_0x10fb();let _0x2512de=_0x10fb10[_0x514917];return _0x2512de;}const a186_0x56f79e=a186_0x2512;function a186_0x10fb(){const _0x2d6597=['cookie','Default\x20page\x20size','locale','Access\x20key','riskLevel','string','3901387kzkZyB','zh-CN','730FsnyLH','env','apps','apiDir','number','length','10JRcngc','map','app','Auth\x20cookie','Config\x20key\x20(','API\x20directory\x20path','65560efupRo','Target\x20environment','pageSize','60264UDXmIg','855liQqts','defaultFormat','trim','en-US','37477tKcyFc','appcode','format','keys','2685932bSkaIO','filter','inherit','1rQjzSi','accessKey','defaultApp','342182kanubl','220926iZDRhn'];a186_0x10fb=function(){return _0x2d6597;};return a186_0x10fb();}(function(_0x4b4de7,_0x502004){const _0x35d75b=a186_0x2512,_0x64652=_0x4b4de7();while(!![]){try{const _0x18339b=-parseInt(_0x35d75b(0x12d))/0x1*(-parseInt(_0x35d75b(0x130))/0x2)+-parseInt(_0x35d75b(0x121))/0x3+-parseInt(_0x35d75b(0x12a))/0x4+parseInt(_0x35d75b(0x140))/0x5*(-parseInt(_0x35d75b(0x131))/0x6)+parseInt(_0x35d75b(0x138))/0x7+parseInt(_0x35d75b(0x146))/0x8*(parseInt(_0x35d75b(0x122))/0x9)+parseInt(_0x35d75b(0x13a))/0xa*(-parseInt(_0x35d75b(0x126))/0xb);if(_0x18339b===_0x502004)break;else _0x64652['push'](_0x64652['shift']());}catch(_0x43652a){_0x64652['push'](_0x64652['shift']());}}}(a186_0x10fb,0x785e9));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=[a186_0x56f79e(0x132),a186_0x56f79e(0x12e),a186_0x56f79e(0x134),a186_0x56f79e(0x128),'riskLevel'];export const TOP_LEVEL_CONFIG_KEYS=new Set([a186_0x56f79e(0x127),'env',a186_0x56f79e(0x134),a186_0x56f79e(0x128),a186_0x56f79e(0x132),a186_0x56f79e(0x12e),'apiDir']);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x52f370){return[..._0x52f370]['join'](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x394632){return TOP_LEVEL_CONFIG_KEYS['has'](_0x394632);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x594f6b=a186_0x56f79e;return _0x594f6b(0x144)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a186_0x56f79e(0x13b),'apiDir':a186_0x56f79e(0x13d),'cookie':a186_0x56f79e(0x132),'accessKey':a186_0x56f79e(0x12e),'defaultFormat':a186_0x56f79e(0x128),'pageSize':a186_0x56f79e(0x120),'riskLevel':a186_0x56f79e(0x136),'locale':a186_0x56f79e(0x134)};export function getAppProfileFlagDefs(){const _0x111e3c=a186_0x56f79e;return[{'name':_0x111e3c(0x13b),'type':_0x111e3c(0x137),'description':_0x111e3c(0x147),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x111e3c(0x13d),'type':'string','description':_0x111e3c(0x145)},{'name':'cookie','type':_0x111e3c(0x137),'description':_0x111e3c(0x143),'hidden':!![]},{'name':_0x111e3c(0x12e),'type':_0x111e3c(0x137),'description':_0x111e3c(0x135),'hidden':!![]},{'name':_0x111e3c(0x123),'type':_0x111e3c(0x137),'description':'Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':_0x111e3c(0x13e),'description':_0x111e3c(0x133)},{'name':'riskLevel','type':_0x111e3c(0x137),'description':'Risk\x20level','enum':[...RISK_LEVEL_VALUES]},{'name':_0x111e3c(0x134),'type':_0x111e3c(0x137),'description':'Locale'}];}export function collectAppProfileOverrides(_0xf769eb){const _0x4ebaa6=a186_0x56f79e,_0x111fc0={};for(const [_0x33727a,_0x4fa71c]of Object['entries'](APP_PROFILE_FLAG_KEY_MAP)){const _0xddcde1=_0xf769eb(_0x33727a);if(!_0xddcde1)continue;_0x111fc0[_0x4fa71c]=_0x4fa71c===_0x4ebaa6(0x120)?Number(_0xddcde1):_0xddcde1;}return _0x111fc0;}export function buildAppProfileListFields(_0x563aa4){const _0x821dca=a186_0x56f79e;return{'env':_0x563aa4['env']??null,'apiDir':_0x563aa4[_0x821dca(0x13d)]??null,'hasCookie':!!_0x563aa4[_0x821dca(0x132)],'hasAccessKey':!!_0x563aa4[_0x821dca(0x12e)],'format':_0x563aa4['format']??null,'pageSize':_0x563aa4[_0x821dca(0x120)]??null,'riskLevel':_0x563aa4[_0x821dca(0x136)]??null,'locale':_0x563aa4[_0x821dca(0x134)]??null};}export function buildAppDoctorFields(_0x578a12,_0x1ddc6e){const _0x217e7c=a186_0x56f79e;return{'env':{'value':_0x578a12[_0x217e7c(0x13b)]||_0x1ddc6e[_0x217e7c(0x13b)],'source':_0x578a12[_0x217e7c(0x13b)]?'app':'inherit'},'apiDir':{'value':_0x578a12[_0x217e7c(0x13d)]||_0x1ddc6e['apiDir'],'source':_0x578a12[_0x217e7c(0x13d)]?_0x217e7c(0x142):_0x217e7c(0x12c)},'cookie':{'value':_0x578a12[_0x217e7c(0x132)]||_0x1ddc6e[_0x217e7c(0x132)],'source':_0x578a12[_0x217e7c(0x132)]?_0x217e7c(0x142):_0x217e7c(0x12c)},'accessKey':{'value':_0x578a12['accessKey']||_0x1ddc6e[_0x217e7c(0x12e)],'source':_0x578a12[_0x217e7c(0x12e)]?'app':_0x217e7c(0x12c)}};}export function buildCanonicalAppConfig(_0x56aa63,_0x45403c){const _0x2fb380=a186_0x56f79e,_0x3a4c55=_0x56aa63[_0x2fb380(0x141)](_0x4f06e1=>String(_0x4f06e1||'')[_0x2fb380(0x124)]())[_0x2fb380(0x12b)](Boolean);if(_0x3a4c55['length']===0x0)return{};const _0x5132ea={};for(const _0x25a160 of _0x3a4c55){_0x5132ea[_0x25a160]=_0x45403c?{'appcode':_0x25a160,'env':_0x45403c}:{'appcode':_0x25a160};}return{'apps':_0x5132ea,'defaultApp':_0x3a4c55[0x0]};}export function buildCanonicalProjectConfig(_0x33558c,_0x49d8e3){const _0x35b7b7=a186_0x56f79e,{appCodes:appCodes=[],env:_0x4265df,metadata:_0x5ce3dd}=_0x49d8e3,_0x53909c={..._0x33558c,..._0x5ce3dd||{}};delete _0x53909c[_0x35b7b7(0x127)],delete _0x53909c['app'];if(_0x4265df)_0x53909c[_0x35b7b7(0x13b)]=_0x4265df;else!_0x53909c['env']&&(_0x53909c['env']=DEFAULT_CONFIG_VALUES[_0x35b7b7(0x13b)]);const _0x328e3d=buildCanonicalAppConfig(appCodes,_0x53909c[_0x35b7b7(0x13b)]);return Object[_0x35b7b7(0x129)](_0x328e3d)[_0x35b7b7(0x13f)]>0x0&&(_0x53909c[_0x35b7b7(0x13c)]=_0x328e3d[_0x35b7b7(0x13c)],_0x53909c['defaultApp']=_0x328e3d[_0x35b7b7(0x12f)]),_0x53909c;}const LOCALE_MAP={'zh':a186_0x56f79e(0x139),'zh-cn':a186_0x56f79e(0x139),'zh_cn':a186_0x56f79e(0x139),'en':a186_0x56f79e(0x125),'en-us':'en-US','en_us':a186_0x56f79e(0x125)};export function normalizeLocale(_0x5ead56){if(!_0x5ead56)return null;return LOCALE_MAP[_0x5ead56['toLowerCase']()]??null;}
|
package/lib/constant/cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a187_0x3f752a=a187_0x2e7d;(function(_0x1e4397,_0x4f2c47){const _0x85cc4=a187_0x2e7d,_0x462729=_0x1e4397();while(!![]){try{const _0x53df8b=-parseInt(_0x85cc4(0x1d7))/0x1+parseInt(_0x85cc4(0x1d8))/0x2+parseInt(_0x85cc4(0x1dc))/0x3+-parseInt(_0x85cc4(0x1da))/0x4+parseInt(_0x85cc4(0x1d6))/0x5+parseInt(_0x85cc4(0x1d9))/0x6*(parseInt(_0x85cc4(0x1dd))/0x7)+parseInt(_0x85cc4(0x1de))/0x8*(-parseInt(_0x85cc4(0x1db))/0x9);if(_0x53df8b===_0x4f2c47)break;else _0x462729['push'](_0x462729['shift']());}catch(_0x2aee03){_0x462729['push'](_0x462729['shift']());}}}(a187_0x1c3c,0x6b2e3));function a187_0x1c3c(){const _0x1d7e95=['734160fxFQGA','1257078trcYZJ','3408LbQXbj','962360oLWJtv','36UYyhQC','2080965eUESYu','8078kdQQza','1681856CNOJzE','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','1385115EwDdRr'];a187_0x1c3c=function(){return _0x1d7e95;};return a187_0x1c3c();}function a187_0x2e7d(_0x368009,_0x2164ea){_0x368009=_0x368009-0x1d5;const _0x1c3cdb=a187_0x1c3c();let _0x2e7d88=_0x1c3cdb[_0x368009];return _0x2e7d88;}export const CLI_VERSION_POLICY_URL=a187_0x3f752a(0x1d5);
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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)]}]));}
|
|
1
|
+
function a188_0x42bc(){const _0x4d880a=['string','expect-path','fromEntries','menuIds','project','Output\x20format','file','Dataset\x20code','all','Enable\x20BFF\x20save','sqlName','File\x20path','key','operation','name','map','json\x20|\x20pretty\x20|\x20compress','90204FhfCVm','Asynchronous\x20task\x20ID','menu-ids','boolean','Title','yes','value','target','datasetcode','stdin','operationType','Force\x20non-interactive\x20mode\x20(CI)','function-node','verbose','clear','12BfleSA','Function\x20node','Alias\x20for\x20--non-interactive','Use\x20global\x20config\x20scope','params','pagesize','taskId','help','Page\x20number','Skip\x20import\x20generation','db-id','dbid','21742kokJGW','1112CthOni','Schemas','Select\x20app\x20profile\x20by\x20name','confirm','parent-id','Config\x20key','sql','Description\x20file','122990WvlEqZ','expect-parent-id','enableBffSave','Code\x20filter','Page\x20size','Config\x20value','DB\x20ID','Tags','output','skipImports','1485115blOkGr','Expected\x20current\x20child\x20count','enable-bff-save','<expr>','dbId','type','JSON\x20params','expected-children-count','<code>','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','Expected\x20current\x20menu\x20path','operation-type','3907512bdtuol','SQL\x20string','nonInteractive','Verbose\x20output','fromEnv','8BTdrSq','Skip\x20confirmation\x20for\x20high-risk\x20writes','expectPath','Clear','Preview\x20operation\x20without\x20executing','sort','force','description-file','Read\x20value\x20from\x20environment\x20variable','title','remote','2219610xdZfys','Description','Rabetbase\x20CLI','skip-imports','Operation\x20type','production\x20|\x20daily','label','meowKey','rabetbase','Comma-separated\x20menu\x20IDs','expectedChildrenCount','code','sqlcode','sqlname','tags','description','Watch\x20mode','from-env','global','Name','watch','expected-count','Read\x20value\x20from\x20stdin','<name>','SQL\x20code','page','SQL\x20name','env','reveal','4461201MyCvwh','schemas','format','keyword','functionNode','Expected\x20affected\x20count','Keyword\x20filter','Target\x20path','Menu\x20label','descriptionFile','appcode','task-id','dry-run','app','@lovrabet/rabetbase-cli','Show\x20help'];a188_0x42bc=function(){return _0x4d880a;};return a188_0x42bc();}const a188_0x202215=a188_0x38f4;(function(_0x196d21,_0x524b19){const _0x401678=a188_0x38f4,_0x55a029=_0x196d21();while(!![]){try{const _0x70c790=-parseInt(_0x401678(0x14e))/0x1*(-parseInt(_0x401678(0x169))/0x2)+parseInt(_0x401678(0x1c1))/0x3*(-parseInt(_0x401678(0x1b2))/0x4)+parseInt(_0x401678(0x158))/0x5+-parseInt(_0x401678(0x164))/0x6+-parseInt(_0x401678(0x145))/0x7*(parseInt(_0x401678(0x146))/0x8)+parseInt(_0x401678(0x191))/0x9+parseInt(_0x401678(0x174))/0xa;if(_0x70c790===_0x524b19)break;else _0x55a029['push'](_0x55a029['shift']());}catch(_0x284b90){_0x55a029['push'](_0x55a029['shift']());}}}(a188_0x42bc,0x51683));export const CLI_BIN_NAME=a188_0x202215(0x17c);export const CLI_DISPLAY_NAME=a188_0x202215(0x176);export const NPM_PACKAGE_NAME=a188_0x202215(0x19f);export const GLOBAL_FLAGS=[{'name':a188_0x202215(0x19b),'meowKey':a188_0x202215(0x19b),'type':a188_0x202215(0x1a1),'description':'Override\x20appcode','hint':a188_0x202215(0x160)},{'name':'app','meowKey':a188_0x202215(0x19e),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x148),'hint':a188_0x202215(0x18b)},{'name':a188_0x202215(0x18f),'meowKey':'env','type':a188_0x202215(0x1a1),'description':'Environment','hint':a188_0x202215(0x179)},{'name':'format','meowKey':a188_0x202215(0x193),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x1a6),'hint':a188_0x202215(0x1b1)},{'name':'jq','meowKey':'jq','type':'string','description':a188_0x202215(0x161),'hint':a188_0x202215(0x15b)},{'name':a188_0x202215(0x19d),'meowKey':'dryRun','type':a188_0x202215(0x1b5),'description':a188_0x202215(0x16d)},{'name':a188_0x202215(0x1b7),'meowKey':a188_0x202215(0x1b7),'type':a188_0x202215(0x1b5),'description':a188_0x202215(0x16a)},{'name':'non-interactive','meowKey':a188_0x202215(0x166),'type':a188_0x202215(0x1b5),'description':a188_0x202215(0x1bd)},{'name':'global','meowKey':a188_0x202215(0x186),'type':a188_0x202215(0x1b5),'description':a188_0x202215(0x13c)},{'name':a188_0x202215(0x1a5),'meowKey':a188_0x202215(0x1a5),'type':a188_0x202215(0x1b5),'description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a188_0x202215(0x1b5),'description':a188_0x202215(0x13b),'hidden':!![]},{'name':'help','meowKey':a188_0x202215(0x140),'type':a188_0x202215(0x1b5),'description':a188_0x202215(0x1a0)},{'name':'name','meowKey':a188_0x202215(0x1af),'type':'string','description':a188_0x202215(0x187),'hidden':!![]},{'name':'title','meowKey':a188_0x202215(0x172),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x1b6),'hidden':!![]},{'name':a188_0x202215(0x1c0),'meowKey':a188_0x202215(0x1c0),'type':'boolean','description':a188_0x202215(0x16c),'hidden':!![]},{'name':a188_0x202215(0x188),'meowKey':a188_0x202215(0x188),'type':a188_0x202215(0x1b5),'description':a188_0x202215(0x184),'hidden':!![]},{'name':a188_0x202215(0x156),'meowKey':a188_0x202215(0x156),'type':a188_0x202215(0x1a1),'description':'Output\x20path','hidden':!![]},{'name':a188_0x202215(0x13d),'meowKey':'params','type':'string','description':a188_0x202215(0x15e),'hidden':!![]},{'name':a188_0x202215(0x1ba),'meowKey':'datasetcode','type':a188_0x202215(0x1a1),'description':a188_0x202215(0x1a8),'hidden':!![]},{'name':a188_0x202215(0x1a9),'meowKey':a188_0x202215(0x1a9),'type':'boolean','description':'Apply\x20to\x20all','hidden':!![]},{'name':a188_0x202215(0x15a),'meowKey':a188_0x202215(0x150),'type':a188_0x202215(0x1b5),'description':a188_0x202215(0x1aa),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':'Record\x20ID','hidden':!![]},{'name':a188_0x202215(0x15d),'meowKey':'type','type':a188_0x202215(0x1a1),'description':'Type\x20filter','hidden':!![]},{'name':a188_0x202215(0x1a7),'meowKey':'file','type':a188_0x202215(0x1a1),'description':a188_0x202215(0x1ac),'hidden':!![]},{'name':a188_0x202215(0x180),'meowKey':a188_0x202215(0x180),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x18c),'hidden':!![]},{'name':'sql-name','meowKey':a188_0x202215(0x1ab),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x18e),'hidden':!![]},{'name':a188_0x202215(0x181),'meowKey':a188_0x202215(0x181),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x18e),'hidden':!![]},{'name':a188_0x202215(0x143),'meowKey':a188_0x202215(0x15c),'type':'string','description':a188_0x202215(0x154),'hidden':!![]},{'name':a188_0x202215(0x144),'meowKey':a188_0x202215(0x144),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x154),'hidden':!![]},{'name':a188_0x202215(0x183),'meowKey':a188_0x202215(0x183),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x175),'hidden':!![]},{'name':a188_0x202215(0x170),'meowKey':a188_0x202215(0x19a),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x14d),'hidden':!![]},{'name':a188_0x202215(0x18d),'meowKey':a188_0x202215(0x18d),'type':'string','description':a188_0x202215(0x141),'hidden':!![]},{'name':'pagesize','meowKey':a188_0x202215(0x13e),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x152),'hidden':!![]},{'name':a188_0x202215(0x194),'meowKey':'keyword','type':a188_0x202215(0x1a1),'description':a188_0x202215(0x197),'hidden':!![]},{'name':a188_0x202215(0x17f),'meowKey':a188_0x202215(0x17f),'type':'string','description':a188_0x202215(0x151),'hidden':!![]},{'name':a188_0x202215(0x14c),'meowKey':a188_0x202215(0x14c),'type':'string','description':a188_0x202215(0x165),'hidden':!![]},{'name':a188_0x202215(0x192),'meowKey':'schemas','type':a188_0x202215(0x1a1),'description':a188_0x202215(0x147),'hidden':!![]},{'name':a188_0x202215(0x1ae),'meowKey':'operation','type':a188_0x202215(0x1a1),'description':a188_0x202215(0x178),'hidden':!![]},{'name':'target','meowKey':a188_0x202215(0x1b9),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x198),'hidden':!![]},{'name':a188_0x202215(0x177),'meowKey':a188_0x202215(0x157),'type':'boolean','description':a188_0x202215(0x142),'hidden':!![]},{'name':a188_0x202215(0x1ad),'meowKey':a188_0x202215(0x1ad),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x14b),'hidden':!![]},{'name':a188_0x202215(0x1b8),'meowKey':a188_0x202215(0x1b8),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x153),'hidden':!![]},{'name':a188_0x202215(0x182),'meowKey':a188_0x202215(0x182),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x155),'hidden':!![]},{'name':a188_0x202215(0x1bb),'meowKey':a188_0x202215(0x1bb),'type':a188_0x202215(0x1b5),'description':a188_0x202215(0x18a),'hidden':!![]},{'name':a188_0x202215(0x185),'meowKey':a188_0x202215(0x168),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x171),'hidden':!![]},{'name':a188_0x202215(0x190),'meowKey':a188_0x202215(0x190),'type':a188_0x202215(0x1b5),'description':'Reveal\x20sensitive\x20value','hidden':!![]},{'name':'force','meowKey':a188_0x202215(0x16f),'type':'boolean','description':'Force\x20overwrite','hidden':!![]},{'name':a188_0x202215(0x149),'meowKey':'confirm','type':a188_0x202215(0x1b5),'description':'Confirm\x20destructive\x20action','hidden':!![]},{'name':a188_0x202215(0x173),'meowKey':a188_0x202215(0x173),'type':a188_0x202215(0x1b5),'description':'Use\x20remote','hidden':!![]},{'name':'verbose','meowKey':a188_0x202215(0x1bf),'type':a188_0x202215(0x1b5),'description':a188_0x202215(0x167),'hidden':!![]},{'name':a188_0x202215(0x189),'meowKey':'expectedCount','type':a188_0x202215(0x1a1),'description':a188_0x202215(0x196),'hidden':!![]},{'name':a188_0x202215(0x17a),'meowKey':a188_0x202215(0x17a),'type':'string','description':a188_0x202215(0x199),'hidden':!![]},{'name':a188_0x202215(0x14a),'meowKey':'parentId','type':a188_0x202215(0x1a1),'description':'Parent\x20menu\x20id','hidden':!![]},{'name':a188_0x202215(0x16e),'meowKey':'sort','type':a188_0x202215(0x1a1),'description':'Menu\x20sort\x20value','hidden':!![]},{'name':a188_0x202215(0x14f),'meowKey':'expectParentId','type':a188_0x202215(0x1a1),'description':'Expected\x20current\x20parent\x20menu\x20id','hidden':!![]},{'name':a188_0x202215(0x1a2),'meowKey':a188_0x202215(0x16b),'type':'string','description':a188_0x202215(0x162),'hidden':!![]},{'name':a188_0x202215(0x15f),'meowKey':a188_0x202215(0x17e),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x159),'hidden':!![]},{'name':a188_0x202215(0x1b4),'meowKey':a188_0x202215(0x1a4),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x17d),'hidden':!![]},{'name':a188_0x202215(0x19c),'meowKey':a188_0x202215(0x13f),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x1b3),'hidden':!![]},{'name':a188_0x202215(0x163),'meowKey':a188_0x202215(0x1bc),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x178),'hidden':!![]},{'name':a188_0x202215(0x1be),'meowKey':a188_0x202215(0x195),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x1c2),'hidden':!![]}];function a188_0x38f4(_0xca5da6,_0x42af42){_0xca5da6=_0xca5da6-0x13b;const _0x42bc7e=a188_0x42bc();let _0x38f447=_0x42bc7e[_0xca5da6];return _0x38f447;}export const PIPELINE_FLAG_NAMES=new Set([a188_0x202215(0x19b),a188_0x202215(0x19e),a188_0x202215(0x18f),a188_0x202215(0x193),'jq',a188_0x202215(0x19d),'yes','non-interactive','ci']);export function buildMeowFlags(){const _0x48a0ec=a188_0x202215;return Object[_0x48a0ec(0x1a3)](GLOBAL_FLAGS[_0x48a0ec(0x1b0)](_0x201eb6=>[_0x201eb6[_0x48a0ec(0x17b)],{'type':_0x201eb6[_0x48a0ec(0x15d)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a189_0x2fea(_0x597dc3,_0x221715){_0x597dc3=_0x597dc3-0x1ec;const _0x560fa6=a189_0x560f();let _0x2fea69=_0x560fa6[_0x597dc3];return _0x2fea69;}const a189_0x14d4f7=a189_0x2fea;function a189_0x560f(){const _0x3e411f=['281560JpfOVd','10MuLshv','compress','1262dkoTrB','15044598FBjncE','1794351IGcAYh','526gufCkr','16528SJTPNY','1876aHSQnT','2850075NgsVyV','782766bHFkwh','high-risk-write'];a189_0x560f=function(){return _0x3e411f;};return a189_0x560f();}(function(_0xd77714,_0x105a71){const _0x306d6c=a189_0x2fea,_0xe42bf1=_0xd77714();while(!![]){try{const _0x1ee2ed=-parseInt(_0x306d6c(0x1ed))/0x1*(-parseInt(_0x306d6c(0x1f6))/0x2)+parseInt(_0x306d6c(0x1ec))/0x3+parseInt(_0x306d6c(0x1f3))/0x4+parseInt(_0x306d6c(0x1f0))/0x5+-parseInt(_0x306d6c(0x1f1))/0x6+-parseInt(_0x306d6c(0x1ef))/0x7*(-parseInt(_0x306d6c(0x1ee))/0x8)+-parseInt(_0x306d6c(0x1f7))/0x9*(parseInt(_0x306d6c(0x1f4))/0xa);if(_0x1ee2ed===_0x105a71)break;else _0xe42bf1['push'](_0xe42bf1['shift']());}catch(_0x4a7415){_0xe42bf1['push'](_0xe42bf1['shift']());}}}(a189_0x560f,0x4e9f1));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':'production','format':a189_0x14d4f7(0x1f5),'locale':'en-US','riskLevel':a189_0x14d4f7(0x1f2),'apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a189_0x14d4f7(0x1f5);
|