@lovrabet/rabetbase-cli 2.3.12-beta.1 → 2.3.12
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/delete.js +1 -1
- package/lib/commands/menu/external-link-create.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/menu/update.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/commands/sql/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a173_0x1839b9=a173_0x4ab2;(function(_0x4e4a00,_0x176912){const _0x54eb03=a173_0x4ab2,_0x2f2e2a=_0x4e4a00();while(!![]){try{const _0x20de16=-parseInt(_0x54eb03(0x1b5))/0x1+-parseInt(_0x54eb03(0x1b6))/0x2*(-parseInt(_0x54eb03(0x1a8))/0x3)+-parseInt(_0x54eb03(0x1a9))/0x4+parseInt(_0x54eb03(0x1c5))/0x5+parseInt(_0x54eb03(0x1b9))/0x6+parseInt(_0x54eb03(0x1ae))/0x7+parseInt(_0x54eb03(0x1ba))/0x8;if(_0x20de16===_0x176912)break;else _0x2f2e2a['push'](_0x2f2e2a['shift']());}catch(_0x500938){_0x2f2e2a['push'](_0x2f2e2a['shift']());}}}(a173_0x4d07,0xb11ba));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(_0x49c6a0,_0x49c781,_0x16ed82){const _0x402b79=a173_0x4ab2,_0xc1d513=await scanLocalSqlQueries(_0x49c6a0),_0x2ed495=new Map();for(const _0x1844bc of _0xc1d513){if(_0x16ed82&&_0x1844bc[_0x402b79(0x1d2)]!==_0x16ed82)continue;const _0x1b0e3f=_0x2ed495['get'](_0x1844bc['sqlCode'])??[];_0x1b0e3f[_0x402b79(0x1c7)](_0x1844bc),_0x2ed495[_0x402b79(0x1b1)](_0x1844bc[_0x402b79(0x1d2)],_0x1b0e3f);}if(_0x16ed82&&!_0x2ed495[_0x402b79(0x1bd)](_0x16ed82))throw CliErrors[_0x402b79(0x1df)](_0x402b79(0x1b8)+_0x16ed82);const _0x13ed8a=[];for(const [_0x16c361,_0x154b48]of _0x2ed495[_0x402b79(0x1de)]()){if(_0x154b48['length']===0x1){_0x13ed8a[_0x402b79(0x1c7)](_0x154b48[0x0]);continue;}const _0x46dbaf=_0x49c781['sqls'][_0x16c361],_0x3d2f13=_0x46dbaf?.[_0x402b79(0x1cf)],_0x34beb9=_0x3d2f13?_0x154b48[_0x402b79(0x1d5)](_0x4828c2=>_0x4828c2[_0x402b79(0x1dc)]!==_0x3d2f13):_0x154b48;if(_0x46dbaf&&_0x34beb9['length']===0x1){_0x13ed8a['push'](_0x34beb9[0x0]);continue;}throw CliErrors['validation'](_0x402b79(0x1bf)+_0x16c361+'.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.');}return _0x13ed8a;}export const sqlPush={'service':a173_0x1839b9(0x1dd),'command':a173_0x1839b9(0x1c7),'description':a173_0x1839b9(0x1d6),'risk':a173_0x1839b9(0x1c4),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a173_0x1839b9(0x1c6),'type':a173_0x1839b9(0x1cb),'description':a173_0x1839b9(0x1ab)}],async 'dryRun'(_0x51006e){const _0x579cfd=a173_0x1839b9,_0x4242c0=loadSqlProjectConfig(_0x51006e[_0x579cfd(0x1e5)]),_0x9bf743=await readSqlLockFile(_0x4242c0[_0x579cfd(0x1da)]),{appLock:_0x546f71}=ensureSqlLockScope(_0x9bf743??createEmptySqlLock(),_0x51006e[_0x579cfd(0x1e5)],_0x4242c0[_0x579cfd(0x1c9)],_0x579cfd(0x1c7)),_0x16c233=await getTargetSqlQueries(_0x4242c0,_0x546f71,_0x51006e['str'](_0x579cfd(0x1c1))||undefined),_0x51851c=[];for(const _0x32dc7a of _0x16c233){const _0x41e885=await computeSqlFileHash(_0x32dc7a['filePath']),_0x3bae87=_0x546f71[_0x579cfd(0x1ce)][_0x32dc7a[_0x579cfd(0x1d2)]],_0x19405c=!!_0x3bae87&&(_0x3bae87[_0x579cfd(0x1cf)]!==_0x32dc7a[_0x579cfd(0x1dc)]||!!_0x32dc7a[_0x579cfd(0x1d9)]&&_0x3bae87['sqlName']!==_0x32dc7a[_0x579cfd(0x1d9)]);if(!_0x51006e[_0x579cfd(0x1db)]('force')&&_0x3bae87&&_0x3bae87['hash']===_0x41e885&&!_0x19405c)continue;_0x51851c[_0x579cfd(0x1c7)](_0x32dc7a[_0x579cfd(0x1d2)]);}return{'method':_0x579cfd(0x1af),'url':_0x579cfd(0x1ca),'body':{'sqlCodes':_0x51851c,'appCode':_0x51006e[_0x579cfd(0x1e5)]},'description':_0x579cfd(0x1e8)+_0x51851c[_0x579cfd(0x1e9)]+_0x579cfd(0x1d1)};},async 'execute'(_0x5ad2e3){const _0x5be17a=a173_0x1839b9,_0x15efec=loadSqlProjectConfig(_0x5ad2e3[_0x5be17a(0x1e5)]),_0x1c6de3=await readSqlLockFile(_0x15efec['lockFilePath']),{lockData:_0x203a26,appLock:_0x751eb9}=ensureSqlLockScope(_0x1c6de3??createEmptySqlLock(),_0x5ad2e3[_0x5be17a(0x1e5)],_0x15efec['sqlRoot'],_0x5be17a(0x1c7)),_0x357842=await getTargetSqlQueries(_0x15efec,_0x751eb9,_0x5ad2e3[_0x5be17a(0x1ac)](_0x5be17a(0x1c1))||undefined);if(_0x357842[_0x5be17a(0x1e9)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x5be17a(0x1d7)};const _0x1f2c08=[],_0x21aa2e=[],_0x4074b7=[];for(const _0x4df687 of _0x357842){const _0x13e3cc=_0x751eb9[_0x5be17a(0x1ce)][_0x4df687[_0x5be17a(0x1d2)]];if(!_0x13e3cc){_0x4074b7[_0x5be17a(0x1c7)]({'sqlCode':_0x4df687[_0x5be17a(0x1d2)],'error':'local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first'});continue;}try{const _0x231d9d=await computeSqlFileHash(_0x4df687[_0x5be17a(0x1e6)]),_0x396737=_0x13e3cc[_0x5be17a(0x1cf)]!==_0x4df687['relativePath']||!!_0x4df687[_0x5be17a(0x1d9)]&&_0x13e3cc[_0x5be17a(0x1d9)]!==_0x4df687[_0x5be17a(0x1d9)];if(!_0x5ad2e3[_0x5be17a(0x1db)](_0x5be17a(0x1c6))&&_0x13e3cc[_0x5be17a(0x1e0)]===_0x231d9d&&!_0x396737){_0x21aa2e['push']({'sqlCode':_0x4df687[_0x5be17a(0x1d2)],'reason':'unchanged'});continue;}if(_0x13e3cc[_0x5be17a(0x1e7)]==null){_0x4074b7[_0x5be17a(0x1c7)]({'sqlCode':_0x4df687[_0x5be17a(0x1d2)],'error':_0x5be17a(0x1b3)});continue;}const _0x4d9e38=await readFile(_0x4df687[_0x5be17a(0x1e6)],_0x5be17a(0x1d3)),_0x1d1f7e=stripLocalSqlMetadata(_0x4d9e38,_0x4df687[_0x5be17a(0x1c2)]),_0x549d61=_0x4df687['sqlName']||_0x13e3cc[_0x5be17a(0x1d9)],_0x4dc4bd=await resolveTargetDbBinding(_0x5ad2e3[_0x5be17a(0x1e5)],_0x4df687,_0x13e3cc),_0x332976=await updateSqlQuery({'id':_0x13e3cc['remoteId'],'appCode':_0x5ad2e3[_0x5be17a(0x1e5)],'sqlCode':_0x4df687['sqlCode'],'sqlName':_0x549d61,'dbId':_0x4dc4bd['dbId'],'version':_0x13e3cc[_0x5be17a(0x1e7)],'sqlContent':_0x1d1f7e,'sqlConfig':_0x13e3cc[_0x5be17a(0x1e4)]??undefined}),_0x1b439d=_0x332976[_0x5be17a(0x1c3)]?await getDbName(_0x5ad2e3[_0x5be17a(0x1e5)],Number(_0x332976[_0x5be17a(0x1c3)]))[_0x5be17a(0x1e2)](()=>_0x4dc4bd[_0x5be17a(0x1be)]):_0x4dc4bd[_0x5be17a(0x1be)];_0x751eb9[_0x5be17a(0x1ce)][_0x4df687['sqlCode']]={...buildSqlLockEntry(_0x332976,_0x1d1f7e,_0x231d9d,{'dbName':_0x1b439d}),'path':_0x4df687[_0x5be17a(0x1dc)],'mode':_0x13e3cc['mode']},await archivePreviousSqlFileIfNeeded(_0x15efec,_0x13e3cc['path'],_0x4df687[_0x5be17a(0x1dc)]),_0x1f2c08['push']({'sqlCode':_0x4df687[_0x5be17a(0x1d2)],'remoteId':_0x13e3cc['remoteId']});}catch(_0x7265e9){_0x4074b7[_0x5be17a(0x1c7)]({'sqlCode':_0x4df687[_0x5be17a(0x1d2)],'error':_0x7265e9 instanceof Error?_0x7265e9[_0x5be17a(0x1b2)]:String(_0x7265e9)});}}return _0x751eb9[_0x5be17a(0x1b0)]=new Date()['toISOString'](),await writeSqlLockFile(_0x15efec['lockFilePath'],_0x203a26),{'ok':_0x4074b7[_0x5be17a(0x1e9)]===0x0,'data':{'pushed':_0x1f2c08,'skipped':_0x21aa2e,'failed':_0x4074b7},'message':_0x5be17a(0x1cc)+_0x1f2c08[_0x5be17a(0x1e9)]+_0x5be17a(0x1d4)+_0x21aa2e[_0x5be17a(0x1e9)]+_0x5be17a(0x1b7)+_0x4074b7['length']+_0x5be17a(0x1c8)};}};function a173_0x4d07(){const _0x2354a8=['990026dmbdrj','\x20skipped,\x20','Local\x20SQL\x20not\x20found:\x20','2188098GkqNjS','9325880bqIbts','isFinite','join','has','dbName','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','\x22\x20for\x20sqlCode\x20','sqlcode','mode','dbId','high-risk-write','127310lHhrpM','force','push','\x20failed','sqlRoot','/smartapi/custom/updateUserCustomSql','boolean','Push\x20complete:\x20','toISOString','sqls','path','replace','\x20SQL\x20file(s)','sqlCode','utf8','\x20pushed,\x20','filter','Push\x20local\x20SQL\x20files\x20to\x20remote','No\x20local\x20SQL\x20files\x20found.','sqlRootDir','sqlName','lockFilePath','bool','relativePath','sql','entries','validation','hash','trashDir','catch','No\x20database\x20matches\x20local\x20directory\x20\x22','sqlConfig','appCode','filePath','version','Would\x20push\x20','length','exec','3zJdbxT','3139020vteTOG','startsWith','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','str','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','6095152CiEhxC','POST','lastSync','set','message','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','projectRoot','1411440VKboer'];a173_0x4d07=function(){return _0x2354a8;};return a173_0x4d07();}function a173_0x4ab2(_0x46573c,_0x5401ec){_0x46573c=_0x46573c-0x1a8;const _0x4d07a0=a173_0x4d07();let _0x4ab24b=_0x4d07a0[_0x46573c];return _0x4ab24b;}async function archivePreviousSqlFileIfNeeded(_0x1d9705,_0x17611c,_0x4c3bc1){const _0x59aa34=a173_0x1839b9;if(!_0x17611c||_0x17611c===_0x4c3bc1)return;const _0x585135=join(_0x1d9705['sqlRootDir'],_0x17611c);if(!await fileExists(_0x585135))return;const _0x191caa=await moveToTrash(_0x1d9705[_0x59aa34(0x1b4)],_0x1d9705[_0x59aa34(0x1e1)],_0x585135);await cleanupEmptyDirectories(dirname(_0x585135),_0x1d9705[_0x59aa34(0x1d8)]),void _0x191caa;}async function moveToTrash(_0x22710a,_0x3e81a4,_0x21176b){const _0x3ee9b8=a173_0x1839b9,_0x59b0c4=new Date()[_0x3ee9b8(0x1cd)]()[_0x3ee9b8(0x1d0)](/[:.]/g,'-'),_0xeb372d=relative(_0x22710a,_0x21176b),_0x9b88cc=join(_0x3e81a4,_0x59b0c4,_0xeb372d);return await mkdir(dirname(_0x9b88cc),{'recursive':!![]}),await rename(_0x21176b,_0x9b88cc),_0x9b88cc;}async function cleanupEmptyDirectories(_0x3eab05,_0x19adf1){const _0x109e45=a173_0x1839b9;let _0x2f1e4e=resolve(_0x3eab05);const _0x145892=resolve(_0x19adf1);while(_0x2f1e4e[_0x109e45(0x1aa)](''+_0x145892+sep)||_0x2f1e4e===_0x145892){if(_0x2f1e4e===_0x145892)return;try{const _0x53f95d=await readdir(_0x2f1e4e);if(_0x53f95d[_0x109e45(0x1e9)]>0x0)return;await rmdir(_0x2f1e4e);}catch{return;}_0x2f1e4e=dirname(_0x2f1e4e);}}async function resolveTargetDbBinding(_0x3188ef,_0x4ad894,_0x34202b){const _0x1de28c=a173_0x1839b9,_0x440ac4=_0x4ad894['dbDirectory'];if(!_0x440ac4)return{'dbId':_0x34202b[_0x1de28c(0x1c3)],'dbName':_0x34202b[_0x1de28c(0x1be)]};const _0x3b815c=buildDbDirectoryName(_0x34202b[_0x1de28c(0x1be)],_0x34202b['dbId']);if(_0x440ac4===_0x3b815c)return{'dbId':_0x34202b['dbId'],'dbName':_0x34202b[_0x1de28c(0x1be)]};const _0x52375d=parseExplicitDbDirectory(_0x440ac4);if(_0x52375d!=null)return{'dbId':_0x52375d,'dbName':await getDbName(_0x3188ef,_0x52375d)['catch'](()=>undefined)};const _0x48f845=await listDatabases(_0x3188ef),_0x4596f8=_0x48f845[_0x1de28c(0x1d5)](_0x1d6783=>buildDbDirectoryName(_0x1d6783['dbName'],_0x1d6783[_0x1de28c(0x1c3)])===_0x440ac4);if(_0x4596f8[_0x1de28c(0x1e9)]===0x1)return{'dbId':_0x4596f8[0x0][_0x1de28c(0x1c3)],'dbName':_0x4596f8[0x0][_0x1de28c(0x1be)]};if(_0x4596f8['length']===0x0)throw CliErrors['validation'](_0x1de28c(0x1e3)+_0x440ac4+_0x1de28c(0x1c0)+_0x4ad894[_0x1de28c(0x1d2)]+'.');const _0x5ebc6a=_0x4596f8['map'](_0xb53095=>_0xb53095[_0x1de28c(0x1be)]+'\x20('+_0xb53095['dbId']+')')[_0x1de28c(0x1bc)](',\x20');throw CliErrors[_0x1de28c(0x1df)]('Local\x20directory\x20\x22'+_0x440ac4+_0x1de28c(0x1ad)+_0x4ad894['sqlCode']+':\x20'+_0x5ebc6a);}function parseExplicitDbDirectory(_0x571bdd){const _0x58afc8=a173_0x1839b9,_0xe4a8b7=/^db-(\d+)$/[_0x58afc8(0x1ea)](_0x571bdd);if(!_0xe4a8b7)return null;const _0x153dca=Number(_0xe4a8b7[0x1]);return Number[_0x58afc8(0x1bb)](_0x153dca)&&_0x153dca>0x0?_0x153dca:null;}
|
|
1
|
+
const a173_0x2a0fde=a173_0x59b6;(function(_0x81925,_0x257cbe){const _0x3cac9f=a173_0x59b6,_0x3bd90d=_0x81925();while(!![]){try{const _0x1c1ad0=parseInt(_0x3cac9f(0xc5))/0x1*(parseInt(_0x3cac9f(0xc9))/0x2)+parseInt(_0x3cac9f(0x102))/0x3+-parseInt(_0x3cac9f(0xe2))/0x4+parseInt(_0x3cac9f(0xff))/0x5*(-parseInt(_0x3cac9f(0xc6))/0x6)+parseInt(_0x3cac9f(0xcf))/0x7*(parseInt(_0x3cac9f(0xda))/0x8)+parseInt(_0x3cac9f(0xde))/0x9+parseInt(_0x3cac9f(0xf0))/0xa;if(_0x1c1ad0===_0x257cbe)break;else _0x3bd90d['push'](_0x3bd90d['shift']());}catch(_0x5b97f5){_0x3bd90d['push'](_0x3bd90d['shift']());}}}(a173_0x1db8,0x9586c));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';function a173_0x1db8(){const _0x383d71=['projectRoot','lastSync','7211464dYJDZl','hash','sqlcode','POST','1754361uUJdGb','Push\x20complete:\x20','\x20SQL\x20file(s)','sqlRoot','4764856yowubo','unchanged','sqlName','dbName','join','force','Local\x20SQL\x20not\x20found:\x20','relativePath','exec','bool','length','sqlRootDir','utf8','\x20skipped,\x20','6963530kYKapx','filePath','entries','replace','sql','filter','/smartapi/custom/updateUserCustomSql','has','catch','remoteId','appCode','sqls','dbDirectory','\x20pushed,\x20','lockFilePath','334155xlUpsH','trashDir','toISOString','2475030uAXUig','str','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','validation','23oFaPNG','108Bsqpls','sqlConfig','sqlCode','33818rCBmwS','startsWith','\x20failed','version','Push\x20local\x20SQL\x20files\x20to\x20remote','boolean','7nSTQNA','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','push','\x22\x20for\x20sqlCode\x20','dbId','No\x20database\x20matches\x20local\x20directory\x20\x22','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','message','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20'];a173_0x1db8=function(){return _0x383d71;};return a173_0x1db8();}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(_0x540ecb,_0x581274,_0x423834){const _0x5f4752=a173_0x59b6,_0x2b4019=await scanLocalSqlQueries(_0x540ecb),_0x483c83=new Map();for(const _0x45224d of _0x2b4019){if(_0x423834&&_0x45224d[_0x5f4752(0xc8)]!==_0x423834)continue;const _0x3a1ac6=_0x483c83['get'](_0x45224d[_0x5f4752(0xc8)])??[];_0x3a1ac6[_0x5f4752(0xd1)](_0x45224d),_0x483c83['set'](_0x45224d['sqlCode'],_0x3a1ac6);}if(_0x423834&&!_0x483c83[_0x5f4752(0xf7)](_0x423834))throw CliErrors[_0x5f4752(0xc4)](_0x5f4752(0xe8)+_0x423834);const _0x4757f8=[];for(const [_0x2ba07e,_0x544418]of _0x483c83[_0x5f4752(0xf2)]()){if(_0x544418[_0x5f4752(0xec)]===0x1){_0x4757f8[_0x5f4752(0xd1)](_0x544418[0x0]);continue;}const _0x54c4ff=_0x581274[_0x5f4752(0xfb)][_0x2ba07e],_0x2494d5=_0x54c4ff?.['path'],_0x27b500=_0x2494d5?_0x544418[_0x5f4752(0xf5)](_0x2b54b8=>_0x2b54b8[_0x5f4752(0xe9)]!==_0x2494d5):_0x544418;if(_0x54c4ff&&_0x27b500[_0x5f4752(0xec)]===0x1){_0x4757f8[_0x5f4752(0xd1)](_0x27b500[0x0]);continue;}throw CliErrors[_0x5f4752(0xc4)](_0x5f4752(0xd7)+_0x2ba07e+_0x5f4752(0xd5));}return _0x4757f8;}export const sqlPush={'service':a173_0x2a0fde(0xf4),'command':'push','description':a173_0x2a0fde(0xcd),'risk':'high-risk-write','flags':[SQLCODE_FLAG_OPTIONAL,{'name':a173_0x2a0fde(0xe7),'type':a173_0x2a0fde(0xce),'description':a173_0x2a0fde(0xd0)}],async 'dryRun'(_0x433de6){const _0x1d979a=a173_0x2a0fde,_0x5df3d4=loadSqlProjectConfig(_0x433de6[_0x1d979a(0xfa)]),_0xce60e0=await readSqlLockFile(_0x5df3d4[_0x1d979a(0xfe)]),{appLock:_0x2e1bd7}=ensureSqlLockScope(_0xce60e0??createEmptySqlLock(),_0x433de6[_0x1d979a(0xfa)],_0x5df3d4[_0x1d979a(0xe1)],_0x1d979a(0xd1)),_0x510102=await getTargetSqlQueries(_0x5df3d4,_0x2e1bd7,_0x433de6[_0x1d979a(0x103)](_0x1d979a(0xdc))||undefined),_0x97043d=[];for(const _0x1eee98 of _0x510102){const _0x3323f5=await computeSqlFileHash(_0x1eee98['filePath']),_0x28bce1=_0x2e1bd7['sqls'][_0x1eee98[_0x1d979a(0xc8)]],_0x3ac3fa=!!_0x28bce1&&(_0x28bce1['path']!==_0x1eee98['relativePath']||!!_0x1eee98['sqlName']&&_0x28bce1[_0x1d979a(0xe4)]!==_0x1eee98[_0x1d979a(0xe4)]);if(!_0x433de6[_0x1d979a(0xeb)]('force')&&_0x28bce1&&_0x28bce1[_0x1d979a(0xdb)]===_0x3323f5&&!_0x3ac3fa)continue;_0x97043d['push'](_0x1eee98[_0x1d979a(0xc8)]);}return{'method':_0x1d979a(0xdd),'url':_0x1d979a(0xf6),'body':{'sqlCodes':_0x97043d,'appCode':_0x433de6[_0x1d979a(0xfa)]},'description':'Would\x20push\x20'+_0x97043d[_0x1d979a(0xec)]+_0x1d979a(0xe0)};},async 'execute'(_0x15947b){const _0x1c4cbf=a173_0x2a0fde,_0x3f077e=loadSqlProjectConfig(_0x15947b[_0x1c4cbf(0xfa)]),_0x24fced=await readSqlLockFile(_0x3f077e[_0x1c4cbf(0xfe)]),{lockData:_0x3ac16a,appLock:_0x1ad803}=ensureSqlLockScope(_0x24fced??createEmptySqlLock(),_0x15947b[_0x1c4cbf(0xfa)],_0x3f077e[_0x1c4cbf(0xe1)],'push'),_0x3c4dea=await getTargetSqlQueries(_0x3f077e,_0x1ad803,_0x15947b[_0x1c4cbf(0x103)](_0x1c4cbf(0xdc))||undefined);if(_0x3c4dea['length']===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':'No\x20local\x20SQL\x20files\x20found.'};const _0x3d4ecc=[],_0x271128=[],_0xec7023=[];for(const _0x56e655 of _0x3c4dea){const _0x253ca6=_0x1ad803[_0x1c4cbf(0xfb)][_0x56e655[_0x1c4cbf(0xc8)]];if(!_0x253ca6){_0xec7023[_0x1c4cbf(0xd1)]({'sqlCode':_0x56e655[_0x1c4cbf(0xc8)],'error':_0x1c4cbf(0xc2)});continue;}try{const _0x4d5838=await computeSqlFileHash(_0x56e655[_0x1c4cbf(0xf1)]),_0x36ea9b=_0x253ca6['path']!==_0x56e655['relativePath']||!!_0x56e655[_0x1c4cbf(0xe4)]&&_0x253ca6[_0x1c4cbf(0xe4)]!==_0x56e655[_0x1c4cbf(0xe4)];if(!_0x15947b[_0x1c4cbf(0xeb)](_0x1c4cbf(0xe7))&&_0x253ca6['hash']===_0x4d5838&&!_0x36ea9b){_0x271128[_0x1c4cbf(0xd1)]({'sqlCode':_0x56e655[_0x1c4cbf(0xc8)],'reason':_0x1c4cbf(0xe3)});continue;}if(_0x253ca6[_0x1c4cbf(0xcc)]==null){_0xec7023[_0x1c4cbf(0xd1)]({'sqlCode':_0x56e655[_0x1c4cbf(0xc8)],'error':'missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first'});continue;}const _0x179315=await readFile(_0x56e655[_0x1c4cbf(0xf1)],_0x1c4cbf(0xee)),_0x267eae=stripLocalSqlMetadata(_0x179315,_0x56e655['mode']),_0x4d759a=_0x56e655[_0x1c4cbf(0xe4)]||_0x253ca6[_0x1c4cbf(0xe4)],_0x4f9f61=await resolveTargetDbBinding(_0x15947b[_0x1c4cbf(0xfa)],_0x56e655,_0x253ca6),_0x31e530=await updateSqlQuery({'id':_0x253ca6[_0x1c4cbf(0xf9)],'appCode':_0x15947b[_0x1c4cbf(0xfa)],'sqlCode':_0x56e655[_0x1c4cbf(0xc8)],'sqlName':_0x4d759a,'dbId':_0x4f9f61[_0x1c4cbf(0xd3)],'version':_0x253ca6[_0x1c4cbf(0xcc)],'sqlContent':_0x267eae,'sqlConfig':_0x253ca6[_0x1c4cbf(0xc7)]??undefined}),_0x1d9b0e=_0x31e530[_0x1c4cbf(0xd3)]?await getDbName(_0x15947b[_0x1c4cbf(0xfa)],Number(_0x31e530[_0x1c4cbf(0xd3)]))['catch'](()=>_0x4f9f61[_0x1c4cbf(0xe5)]):_0x4f9f61['dbName'];_0x1ad803[_0x1c4cbf(0xfb)][_0x56e655['sqlCode']]={...buildSqlLockEntry(_0x31e530,_0x267eae,_0x4d5838,{'dbName':_0x1d9b0e}),'path':_0x56e655[_0x1c4cbf(0xe9)],'mode':_0x253ca6['mode']},await archivePreviousSqlFileIfNeeded(_0x3f077e,_0x253ca6['path'],_0x56e655[_0x1c4cbf(0xe9)]),_0x3d4ecc['push']({'sqlCode':_0x56e655['sqlCode'],'remoteId':_0x253ca6[_0x1c4cbf(0xf9)]});}catch(_0x25f09a){_0xec7023[_0x1c4cbf(0xd1)]({'sqlCode':_0x56e655[_0x1c4cbf(0xc8)],'error':_0x25f09a instanceof Error?_0x25f09a[_0x1c4cbf(0xd6)]:String(_0x25f09a)});}}return _0x1ad803[_0x1c4cbf(0xd9)]=new Date()[_0x1c4cbf(0x101)](),await writeSqlLockFile(_0x3f077e[_0x1c4cbf(0xfe)],_0x3ac16a),{'ok':_0xec7023[_0x1c4cbf(0xec)]===0x0,'data':{'pushed':_0x3d4ecc,'skipped':_0x271128,'failed':_0xec7023},'message':_0x1c4cbf(0xdf)+_0x3d4ecc[_0x1c4cbf(0xec)]+_0x1c4cbf(0xfd)+_0x271128[_0x1c4cbf(0xec)]+_0x1c4cbf(0xef)+_0xec7023[_0x1c4cbf(0xec)]+_0x1c4cbf(0xcb)};}};function a173_0x59b6(_0x30778f,_0x2a78a9){_0x30778f=_0x30778f-0xc2;const _0x1db8d5=a173_0x1db8();let _0x59b6c4=_0x1db8d5[_0x30778f];return _0x59b6c4;}async function archivePreviousSqlFileIfNeeded(_0x3a0050,_0x240e43,_0x3d4b16){const _0x47c9b0=a173_0x2a0fde;if(!_0x240e43||_0x240e43===_0x3d4b16)return;const _0x17dbba=join(_0x3a0050[_0x47c9b0(0xed)],_0x240e43);if(!await fileExists(_0x17dbba))return;const _0x301f8c=await moveToTrash(_0x3a0050[_0x47c9b0(0xd8)],_0x3a0050[_0x47c9b0(0x100)],_0x17dbba);await cleanupEmptyDirectories(dirname(_0x17dbba),_0x3a0050[_0x47c9b0(0xed)]),void _0x301f8c;}async function moveToTrash(_0xa35868,_0x4af45b,_0xee9f2){const _0x16b7f6=a173_0x2a0fde,_0x1e07f6=new Date()['toISOString']()[_0x16b7f6(0xf3)](/[:.]/g,'-'),_0x312f35=relative(_0xa35868,_0xee9f2),_0x4cca72=join(_0x4af45b,_0x1e07f6,_0x312f35);return await mkdir(dirname(_0x4cca72),{'recursive':!![]}),await rename(_0xee9f2,_0x4cca72),_0x4cca72;}async function cleanupEmptyDirectories(_0x3ddefb,_0x2c21c7){const _0xdfbdf8=a173_0x2a0fde;let _0x5c8930=resolve(_0x3ddefb);const _0x364b54=resolve(_0x2c21c7);while(_0x5c8930[_0xdfbdf8(0xca)](''+_0x364b54+sep)||_0x5c8930===_0x364b54){if(_0x5c8930===_0x364b54)return;try{const _0x1f6a16=await readdir(_0x5c8930);if(_0x1f6a16[_0xdfbdf8(0xec)]>0x0)return;await rmdir(_0x5c8930);}catch{return;}_0x5c8930=dirname(_0x5c8930);}}async function resolveTargetDbBinding(_0x104b75,_0x555d65,_0x1496a5){const _0x36483b=a173_0x2a0fde,_0x1da0a9=_0x555d65[_0x36483b(0xfc)];if(!_0x1da0a9)return{'dbId':_0x1496a5['dbId'],'dbName':_0x1496a5[_0x36483b(0xe5)]};const _0x4de33d=buildDbDirectoryName(_0x1496a5[_0x36483b(0xe5)],_0x1496a5[_0x36483b(0xd3)]);if(_0x1da0a9===_0x4de33d)return{'dbId':_0x1496a5[_0x36483b(0xd3)],'dbName':_0x1496a5[_0x36483b(0xe5)]};const _0x28e1df=parseExplicitDbDirectory(_0x1da0a9);if(_0x28e1df!=null)return{'dbId':_0x28e1df,'dbName':await getDbName(_0x104b75,_0x28e1df)[_0x36483b(0xf8)](()=>undefined)};const _0x2894ae=await listDatabases(_0x104b75),_0x113c7a=_0x2894ae[_0x36483b(0xf5)](_0x14f93d=>buildDbDirectoryName(_0x14f93d[_0x36483b(0xe5)],_0x14f93d[_0x36483b(0xd3)])===_0x1da0a9);if(_0x113c7a['length']===0x1)return{'dbId':_0x113c7a[0x0]['dbId'],'dbName':_0x113c7a[0x0][_0x36483b(0xe5)]};if(_0x113c7a[_0x36483b(0xec)]===0x0)throw CliErrors[_0x36483b(0xc4)](_0x36483b(0xd4)+_0x1da0a9+_0x36483b(0xd2)+_0x555d65[_0x36483b(0xc8)]+'.');const _0x4dc499=_0x113c7a['map'](_0x131902=>_0x131902[_0x36483b(0xe5)]+'\x20('+_0x131902[_0x36483b(0xd3)]+')')[_0x36483b(0xe6)](',\x20');throw CliErrors[_0x36483b(0xc4)]('Local\x20directory\x20\x22'+_0x1da0a9+_0x36483b(0xc3)+_0x555d65[_0x36483b(0xc8)]+':\x20'+_0x4dc499);}function parseExplicitDbDirectory(_0x11fa81){const _0x22ee68=a173_0x2a0fde,_0x47cbb3=/^db-(\d+)$/[_0x22ee68(0xea)](_0x11fa81);if(!_0x47cbb3)return null;const _0x1648d0=Number(_0x47cbb3[0x1]);return Number['isFinite'](_0x1648d0)&&_0x1648d0>0x0?_0x1648d0:null;}
|
package/lib/commands/sql/save.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a174_0x2928(_0x3741c8,_0x5acf2e){_0x3741c8=_0x3741c8-0x139;const _0x28c34c=a174_0x28c3();let _0x29280a=_0x28c34c[_0x3741c8];return _0x29280a;}const a174_0x57d148=a174_0x2928;(function(_0x1cf565,_0x4ce2a5){const _0x4ef816=a174_0x2928,_0x516d0b=_0x1cf565();while(!![]){try{const _0x566f52=parseInt(_0x4ef816(0x142))/0x1+parseInt(_0x4ef816(0x146))/0x2*(parseInt(_0x4ef816(0x14b))/0x3)+parseInt(_0x4ef816(0x13e))/0x4+parseInt(_0x4ef816(0x13c))/0x5*(-parseInt(_0x4ef816(0x152))/0x6)+-parseInt(_0x4ef816(0x141))/0x7+-parseInt(_0x4ef816(0x14a))/0x8*(-parseInt(_0x4ef816(0x148))/0x9)+-parseInt(_0x4ef816(0x147))/0xa*(parseInt(_0x4ef816(0x13f))/0xb);if(_0x566f52===_0x4ce2a5)break;else _0x516d0b['push'](_0x516d0b['shift']());}catch(_0x1a6851){_0x516d0b['push'](_0x516d0b['shift']());}}}(a174_0x28c3,0xde3b7));import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a174_0x28c3(){const _0x30eec2=['2045736RLTjaY','9YjkpjO','file','Path\x20to\x20the\x20SQL\x20file','write','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','sqlname','string','198vVjXLr','validation','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`.','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','5555zPFTVl','save','609444NROnRE','957891NrxYHQ','description','7182238SxChxI','1005685esMXVO','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','Query\x20description','join','278794ZiIwZD','160FcbVCO','63rAHOzu','sql'];a174_0x28c3=function(){return _0x30eec2;};return a174_0x28c3();}const SQL_SAVE_DEPRECATED_HINT=[a174_0x57d148(0x13b),a174_0x57d148(0x143),a174_0x57d148(0x139)][a174_0x57d148(0x145)]('\x0a');export const sqlSave={'service':a174_0x57d148(0x149),'command':a174_0x57d148(0x13d),'description':a174_0x57d148(0x13a),'risk':a174_0x57d148(0x14e),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a174_0x57d148(0x14c),'type':'string','required':!![],'description':a174_0x57d148(0x14d)},SQLCODE_FLAG_OPTIONAL,{'name':a174_0x57d148(0x150),'type':a174_0x57d148(0x151),'description':'SQL\x20query\x20display\x20name'},{'name':'db','type':a174_0x57d148(0x151),'description':a174_0x57d148(0x14f)},{'name':a174_0x57d148(0x140),'type':a174_0x57d148(0x151),'description':a174_0x57d148(0x144)}],async 'validate'(){const _0x3ac2a4=a174_0x57d148;throw CliErrors[_0x3ac2a4(0x153)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x5088=a174_0x57d148;throw CliErrors[_0x5088(0x153)](SQL_SAVE_DEPRECATED_HINT);}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a175_0x3fd231=a175_0x4aa3;(function(_0x41264d,_0x5da3e2){const _0x32277c=a175_0x4aa3,_0x4be238=_0x41264d();while(!![]){try{const _0x3c7c54=parseInt(_0x32277c(0xab))/0x1+parseInt(_0x32277c(0xb7))/0x2+parseInt(_0x32277c(0xbc))/0x3*(-parseInt(_0x32277c(0xc4))/0x4)+-parseInt(_0x32277c(0xae))/0x5+-parseInt(_0x32277c(0xc1))/0x6+parseInt(_0x32277c(0xc8))/0x7*(-parseInt(_0x32277c(0xbd))/0x8)+parseInt(_0x32277c(0xaf))/0x9*(parseInt(_0x32277c(0xc3))/0xa);if(_0x3c7c54===_0x5da3e2)break;else _0x4be238['push'](_0x4be238['shift']());}catch(_0x1336f4){_0x4be238['push'](_0x4be238['shift']());}}}(a175_0x9ede,0x2e0b0));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=a175_0x3fd231(0xb6);export function buildSqlLockEntry(_0x4747b1,_0x3b0ec1,_0x74609d,_0x345b1b){const _0x22aca7=a175_0x3fd231,_0x5a7bc5=detectSqlMode(_0x3b0ec1);return{'path':buildSqlRelativePath(_0x4747b1[_0x22aca7(0xb4)],_0x4747b1[_0x22aca7(0xcc)],_0x345b1b?.[_0x22aca7(0xc7)],_0x5a7bc5,_0x4747b1[_0x22aca7(0xb1)]),'hash':_0x74609d,'remoteId':_0x4747b1['id'],'version':_0x4747b1[_0x22aca7(0xc5)],'dbId':Number(_0x4747b1[_0x22aca7(0xb1)]),'dbName':_0x345b1b?.[_0x22aca7(0xc7)],'sqlName':_0x4747b1[_0x22aca7(0xcc)],'sqlConfig':_0x4747b1[_0x22aca7(0xb8)]??undefined,'mode':_0x5a7bc5};}export function cloneSqlLockData(_0x34c0fc){const _0x39a90c=a175_0x3fd231;return{'apps':Object[_0x39a90c(0xb0)](Object[_0x39a90c(0xbb)](_0x34c0fc[_0x39a90c(0xa7)])[_0x39a90c(0xac)](([_0x2ff115,_0x132c30])=>[_0x2ff115,{'sqlRoot':_0x132c30[_0x39a90c(0xb5)],'lastSync':_0x132c30['lastSync'],'sqls':{..._0x132c30['sqls']}}]))};}export function ensureRemoteSqlContent(_0x512905){return _0x512905['sqlContent']??'';}export function buildLocalSqlFileContent(_0xd75d1c,_0x1683f6,_0x5a7675){const _0x536883=a175_0x3fd231,_0x3b5a4a=_0x5a7675?.[_0x536883(0xa9)]??detectSqlMode(_0x1683f6),_0x3ab92c=stripLocalSqlMetadata(_0x1683f6,_0x3b5a4a)[_0x536883(0xaa)](),_0x150c64=[...buildMetadataHeaderLines({'sqlCode':_0xd75d1c[_0x536883(0xb4)],'sqlName':_0xd75d1c['sqlName'],'dbId':_0xd75d1c['dbId'],'dbName':_0x5a7675?.[_0x536883(0xc7)],'mode':_0x3b5a4a,'syncedAt':_0x5a7675?.['syncedAt'],'description':_0x5a7675?.[_0x536883(0xc6)]},_0x3b5a4a),'',_0x3ab92c],_0x28135f=_0x150c64['join']('\x0a');return _0x28135f[_0x536883(0xcd)]('\x0a')?_0x28135f:_0x28135f+'\x0a';}export function stripLocalSqlMetadata(_0x3eb5d5,_0x199a86){const _0x16bc88=a175_0x3fd231,_0x1fe8df=_0x3eb5d5[_0x16bc88(0xcb)](/\r\n/g,'\x0a')['split']('\x0a'),_0x51e697=[];let _0x53b7ed=0x0;if(_0x199a86==='mybatisXml')while(_0x53b7ed<_0x1fe8df[_0x16bc88(0xbe)]){const _0x245a0f=_0x1fe8df[_0x53b7ed]??'';if(/^\s*<!--\s*@lovrabet\./[_0x16bc88(0xca)](_0x245a0f)){_0x53b7ed++;continue;}if(_0x245a0f['trim']()===''&&_0x53b7ed>0x0){_0x53b7ed++;continue;}break;}else while(_0x53b7ed<_0x1fe8df['length']){const _0x225966=_0x1fe8df[_0x53b7ed]??'';if(/^\s*--\s*@lovrabet\./[_0x16bc88(0xca)](_0x225966)){_0x53b7ed++;continue;}if(_0x225966['trim']()===''&&_0x53b7ed>0x0){_0x53b7ed++;continue;}break;}for(;_0x53b7ed<_0x1fe8df['length'];_0x53b7ed++){_0x51e697['push'](_0x1fe8df[_0x53b7ed]);}return _0x51e697['join']('\x0a')['trimStart']();}export function resolveSqlMode(_0x151003,_0x350606){const _0x24f6ce=a175_0x3fd231;if(_0x350606?.[_0x24f6ce(0xa9)])return _0x350606[_0x24f6ce(0xa9)];return detectSqlMode(_0x151003);}export function resolveSqlFileName(_0x58924d,_0x3fe9bf,_0x13faa4){const _0x41eead=a175_0x3fd231;if(_0x13faa4?.[_0x41eead(0xb3)])return _0x13faa4[_0x41eead(0xb3)];if(_0x13faa4?.['sqlName']||_0x13faa4?.[_0x41eead(0xc7)])return buildSqlRelativePath(_0x58924d,_0x13faa4?.['sqlName'],_0x13faa4?.[_0x41eead(0xc7)],resolveSqlMode(_0x3fe9bf,_0x13faa4),_0x13faa4?.[_0x41eead(0xb1)]);return buildDefaultSqlFileName(_0x58924d,resolveSqlMode(_0x3fe9bf,_0x13faa4));}export function resolveSqlLocalDir(_0x31f7f8,_0x7136eb){return join(_0x31f7f8,SQL_LOCAL_REL_DIR,_0x7136eb);}export async function confirmForceOverwrite(_0x1ee882){const _0x1cf736=a175_0x3fd231,_0x483e63=createInterface({'input':process[_0x1cf736(0xce)],'output':process[_0x1cf736(0xc9)]}),_0x43d4d5=await new Promise(_0x4805e0=>{const _0x487c96=_0x1cf736;_0x483e63[_0x487c96(0xc2)](_0x1ee882+'\x20[y/N]\x20',_0x4805e0);});return _0x483e63[_0x1cf736(0xad)](),['y',_0x1cf736(0xbf)][_0x1cf736(0xb9)](_0x43d4d5[_0x1cf736(0xaa)]()[_0x1cf736(0xc0)]());}export function findSqlLockScope(_0x27199c,_0x5aa7ab){return _0x27199c['apps'][_0x5aa7ab];}function buildMetadataHeaderLines(_0x4257be,_0x122d0c){const _0x4dd5fb=a175_0x3fd231,_0x28184e=[[_0x4dd5fb(0xb4),_0x4257be[_0x4dd5fb(0xb4)]],[_0x4dd5fb(0xcc),_0x4257be['sqlName']],[_0x4dd5fb(0xb1),_0x4257be[_0x4dd5fb(0xb1)]],[_0x4dd5fb(0xc7),_0x4257be[_0x4dd5fb(0xc7)]],['mode',_0x4257be['mode']],[_0x4dd5fb(0xa6),_0x4257be[_0x4dd5fb(0xa6)]],[_0x4dd5fb(0xc6),_0x4257be[_0x4dd5fb(0xc6)]]];if(_0x122d0c==='mybatisXml')return _0x28184e[_0x4dd5fb(0xa8)](([,_0x31bf4c])=>_0x31bf4c!==undefined&&_0x31bf4c!==null&&String(_0x31bf4c)[_0x4dd5fb(0xaa)]()!=='')['map'](([_0x525222,_0x4e755a])=>_0x4dd5fb(0xba)+_0x525222+':\x20'+String(_0x4e755a)+_0x4dd5fb(0xb2));return _0x28184e[_0x4dd5fb(0xa8)](([,_0x520757])=>_0x520757!==undefined&&_0x520757!==null&&String(_0x520757)[_0x4dd5fb(0xaa)]()!=='')['map'](([_0x140d67,_0x6cd676])=>'--\x20@lovrabet.'+_0x140d67+':\x20'+String(_0x6cd676));}function a175_0x4aa3(_0x3ce457,_0xa13359){_0x3ce457=_0x3ce457-0xa6;const _0x9ede22=a175_0x9ede();let _0x4aa393=_0x9ede22[_0x3ce457];return _0x4aa393;}function a175_0x9ede(){const _0x3f225b=['question','88490HcsAqc','1129292tDkueZ','version','description','dbName','119AgOYND','stderr','test','replace','sqlName','endsWith','stdin','syncedAt','apps','filter','mode','trim','252644hVHcqF','map','close','1569150pHSKCl','684mgTbmk','fromEntries','dbId','\x20-->','path','sqlCode','sqlRoot','.rabetbase/sql','177396kfyLlE','sqlConfig','includes','<!--\x20@lovrabet.','entries','3iyqFaa','13816TvNYAR','length','yes','toLowerCase','1198572fdAtET'];a175_0x9ede=function(){return _0x3f225b;};return a175_0x9ede();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a176_0x6e75d7=a176_0x3a2c;(function(_0x44de17,_0x6cff42){const _0x2ac469=a176_0x3a2c,_0x34a132=_0x44de17();while(!![]){try{const _0x95adfe=parseInt(_0x2ac469(0x160))/0x1*(-parseInt(_0x2ac469(0x168))/0x2)+parseInt(_0x2ac469(0x158))/0x3*(-parseInt(_0x2ac469(0x163))/0x4)+-parseInt(_0x2ac469(0x15a))/0x5+-parseInt(_0x2ac469(0x15b))/0x6+parseInt(_0x2ac469(0x151))/0x7+parseInt(_0x2ac469(0x15e))/0x8*(-parseInt(_0x2ac469(0x15f))/0x9)+parseInt(_0x2ac469(0x15c))/0xa;if(_0x95adfe===_0x6cff42)break;else _0x34a132['push'](_0x34a132['shift']());}catch(_0x585fd8){_0x34a132['push'](_0x34a132['shift']());}}}(a176_0x2bc7,0x7c9f2));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';function a176_0x3a2c(_0x1962d1,_0x7f0fdd){_0x1962d1=_0x1962d1-0x14d;const _0x2bc70e=a176_0x2bc7();let _0x3a2cae=_0x2bc70e[_0x1962d1];return _0x3a2cae;}import{computeSqlFileHash}from'../../core/sql-sync/hash.js';function a176_0x2bc7(){const _0x70fa52=['\x20missing,\x20','length','1925560SxOgeB','boolean','\x20modified,\x20','map','\x20remote-only','read','sqlName','74913qdIjEX','filePath','1499575PBVnuT','1257858pmVSXy','24032340vJOrHc','paging','680040rJSkVl','54fcqJAk','67PzdTCV','status','push','128eYIZak','has','hash','remote','sqls','10424EKZvHl','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','relativePath','lockKey','tableData','appCode','path','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally'];a176_0x2bc7=function(){return _0x70fa52;};return a176_0x2bc7();}import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x232c3d){const _0x45d0a5=a176_0x3a2c,_0x2bb340=[];let _0x9ab98f=0x1;while(!![]){const _0xf80199=await listSqlQueries(_0x232c3d,{'currentPage':_0x9ab98f,'pageSize':PAGE_SIZE}),_0x5eb896=_0xf80199[_0x45d0a5(0x16c)]??[];_0x2bb340[_0x45d0a5(0x162)](..._0x5eb896[_0x45d0a5(0x154)](_0x32fc34=>_0x32fc34['sqlCode']));if(_0x5eb896[_0x45d0a5(0x150)]===0x0)break;const _0x54ca64=_0xf80199[_0x45d0a5(0x15d)]?.['totalCount'];if(_0x54ca64!=null?_0x2bb340[_0x45d0a5(0x150)]>=_0x54ca64:_0x5eb896[_0x45d0a5(0x150)]<PAGE_SIZE)break;_0x9ab98f++;}return _0x2bb340;}export const sqlStatus={'service':'sql','command':a176_0x6e75d7(0x161),'description':a176_0x6e75d7(0x169),'risk':a176_0x6e75d7(0x156),'flags':[{'name':a176_0x6e75d7(0x166),'type':a176_0x6e75d7(0x152),'description':a176_0x6e75d7(0x14e)}],async 'execute'(_0x563724){const _0x40332f=a176_0x6e75d7,_0xf2a22f=loadSqlProjectConfig(_0x563724[_0x40332f(0x16d)]),_0x1cb275=await readSqlLockFile(_0xf2a22f['lockFilePath']),{appLock:_0x161b17}=ensureSqlLockScope(_0x1cb275??createEmptySqlLock(),_0xf2a22f[_0x40332f(0x16d)],_0xf2a22f['sqlRoot'],_0x40332f(0x161)),_0x3170b7=await scanLocalSqlQueries(_0xf2a22f),_0x7102d7=[],_0x1f3407=[],_0xfa4619=[],_0x90e2a0=[],_0x2d3b5f=new Set(_0x3170b7[_0x40332f(0x154)](_0x4925a3=>_0x4925a3[_0x40332f(0x16b)]));for(const _0x887033 of _0x3170b7){const _0x2e99a6=await computeSqlFileHash(_0x887033[_0x40332f(0x159)]),_0x1324a6=_0x161b17[_0x40332f(0x167)][_0x887033[_0x40332f(0x16b)]],_0x5f39f8=!!_0x1324a6&&_0x1324a6[_0x40332f(0x14d)]!==_0x887033[_0x40332f(0x16a)],_0x3e404b=!!_0x1324a6&&!!_0x887033[_0x40332f(0x157)]&&_0x1324a6['sqlName']!==_0x887033[_0x40332f(0x157)];if(!_0x1324a6)_0x7102d7[_0x40332f(0x162)](_0x887033[_0x40332f(0x16b)]);else _0x1324a6[_0x40332f(0x165)]!==_0x2e99a6||_0x5f39f8||_0x3e404b?_0x1f3407[_0x40332f(0x162)](_0x887033[_0x40332f(0x16b)]):_0xfa4619[_0x40332f(0x162)](_0x887033[_0x40332f(0x16b)]);}for(const _0x518023 of Object['keys'](_0x161b17['sqls'])){!_0x2d3b5f[_0x40332f(0x164)](_0x518023)&&_0x90e2a0['push'](_0x518023);}const _0x4b7a21=[];if(_0x563724['bool'](_0x40332f(0x166))){const _0x590983=await fetchAllSqlCodes(_0x563724[_0x40332f(0x16d)]);for(const _0x39f6c6 of _0x590983){!_0x2d3b5f[_0x40332f(0x164)](_0x39f6c6)&&!_0x161b17['sqls'][_0x39f6c6]&&_0x4b7a21[_0x40332f(0x162)](_0x39f6c6);}}const _0x209cf6=_0x7102d7[_0x40332f(0x150)]===0x0&&_0x1f3407['length']===0x0&&_0x90e2a0['length']===0x0&&_0x4b7a21[_0x40332f(0x150)]===0x0;return{'ok':!![],'data':{'added':_0x7102d7,'modified':_0x1f3407,'missing':_0x90e2a0,'unchanged':_0xfa4619,'remoteOnly':_0x4b7a21},'message':_0x209cf6?'All\x20SQL\x20queries\x20are\x20in\x20sync.':_0x7102d7[_0x40332f(0x150)]+'\x20added,\x20'+_0x1f3407[_0x40332f(0x150)]+_0x40332f(0x153)+_0x90e2a0[_0x40332f(0x150)]+_0x40332f(0x14f)+_0xfa4619[_0x40332f(0x150)]+'\x20unchanged'+(_0x4b7a21['length']>0x0?',\x20'+_0x4b7a21[_0x40332f(0x150)]+_0x40332f(0x155):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a177_0x462d8e=a177_0xfe4a;(function(_0x57044e,_0x17816d){const _0x4eaac2=a177_0xfe4a,_0x59c4a5=_0x57044e();while(!![]){try{const _0x3fb420=-parseInt(_0x4eaac2(0x12a))/0x1+-parseInt(_0x4eaac2(0x112))/0x2*(parseInt(_0x4eaac2(0x147))/0x3)+-parseInt(_0x4eaac2(0x125))/0x4+parseInt(_0x4eaac2(0x127))/0x5+parseInt(_0x4eaac2(0x114))/0x6*(-parseInt(_0x4eaac2(0x11b))/0x7)+-parseInt(_0x4eaac2(0x139))/0x8+parseInt(_0x4eaac2(0x117))/0x9;if(_0x3fb420===_0x17816d)break;else _0x59c4a5['push'](_0x59c4a5['shift']());}catch(_0x5e319c){_0x59c4a5['push'](_0x59c4a5['shift']());}}}(a177_0x1ee2,0xbb2e9));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';function a177_0xfe4a(_0x756e67,_0x35c727){_0x756e67=_0x756e67-0x109;const _0x1ee237=a177_0x1ee2();let _0xfe4abe=_0x1ee237[_0x756e67];return _0xfe4abe;}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a177_0x1ee2(){const _0xca4cc1=['get','schema:','183894OvBnil','pkField','boolean','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','--check-indexes\x20requires\x20--schemas.','valid','Table\x20\x22','sqlType','file','isArray','read','\x22\x20not\x20found\x20or\x20not\x20accessible','validation','Dataset\x20\x22','index_columns','12bpkwmb','columns','8736HqHxAk','flagMissing','appCode','29923740DVqTQf','filter','map','sql','1778JFPjDW','reason','SQL\x20schema\x20validation','parameters','str','size','dbtableConfig','columnNames','Provide\x20--file\x20or\x20--sql','fields','5361268smVqgj','cwd','7214775xzTeir','indexName','tables','1444089BJomJe','indexes','find','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','push','check-indexes','primary','flatMap','name','length','split','\x22\x20not\x20found\x20in\x20any\x20dataset','isDangerous','index_type','dataset','3832800RndLSX','message','toLowerCase','unshift','string','type','trim','schemaWarnings','schemas','File\x20not\x20found:\x20','tableName','index_name'];a177_0x1ee2=function(){return _0xca4cc1;};return a177_0x1ee2();}import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':a177_0x462d8e(0x11a),'command':'validate','description':a177_0x462d8e(0x14a),'risk':a177_0x462d8e(0x10d),'flags':[{'name':a177_0x462d8e(0x10b),'type':a177_0x462d8e(0x13d),'description':'Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'},{'name':a177_0x462d8e(0x11a),'type':a177_0x462d8e(0x13d),'description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a177_0x462d8e(0x141),'type':a177_0x462d8e(0x13d),'description':a177_0x462d8e(0x12d)},{'name':a177_0x462d8e(0x12f),'type':a177_0x462d8e(0x149),'description':'Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata'}],async 'execute'(_0xf76b75){const _0x3e2fd1=a177_0x462d8e,_0x523869=_0xf76b75[_0x3e2fd1(0x11f)]('file'),_0x4e5f27=_0xf76b75['str'](_0x3e2fd1(0x11a)),_0x26d6a3=_0xf76b75[_0x3e2fd1(0x11f)](_0x3e2fd1(0x141)),_0x1ed69e=_0xf76b75['bool'](_0x3e2fd1(0x12f));if(!_0x523869&&!_0x4e5f27)throw CliErrors[_0x3e2fd1(0x115)](_0x3e2fd1(0x10b),_0x3e2fd1(0x123));if(_0x1ed69e&&!_0x26d6a3)throw CliErrors[_0x3e2fd1(0x10f)](_0x3e2fd1(0x14b));let _0xa24bdc;if(_0x523869){const _0x28f88c=resolve(process[_0x3e2fd1(0x126)](),_0x523869);if(!existsSync(_0x28f88c))throw CliErrors[_0x3e2fd1(0x10f)](_0x3e2fd1(0x142)+_0x28f88c);_0xa24bdc=readFileSync(_0x28f88c,'utf-8');}else _0xa24bdc=_0x4e5f27;const _0x1b438d=validateSql(_0xa24bdc),_0x538c74={'valid':_0x1b438d[_0x3e2fd1(0x14c)],'sqlType':_0x1b438d[_0x3e2fd1(0x10a)][_0x3e2fd1(0x13e)],'isSelectOnly':_0x1b438d[_0x3e2fd1(0x10a)]['isSelectOnly'],'isDangerous':_0x1b438d[_0x3e2fd1(0x10a)][_0x3e2fd1(0x136)],'tables':_0x1b438d[_0x3e2fd1(0x129)],'parameters':_0x1b438d[_0x3e2fd1(0x11e)],'message':_0x1b438d['message']};_0x1b438d['sqlType']['reason']&&(_0x538c74[_0x3e2fd1(0x11c)]=_0x1b438d[_0x3e2fd1(0x10a)][_0x3e2fd1(0x11c)]);if(_0x26d6a3&&_0x1b438d['valid']){const _0x554312=_0x26d6a3[_0x3e2fd1(0x134)](',')[_0x3e2fd1(0x119)](_0x580287=>_0x580287['trim']())[_0x3e2fd1(0x118)](Boolean),_0x4fa63e=[],_0x3aabba=[],_0x4f32d5=filterDbTableBackedDatasets(await listDatasets(_0xf76b75[_0x3e2fd1(0x116)])),_0x1860cc=new Map(_0x4f32d5[_0x3e2fd1(0x119)](_0x1658e4=>[_0x1658e4[_0x3e2fd1(0x121)]?.[_0x3e2fd1(0x143)]?.[_0x3e2fd1(0x13b)](),_0x1658e4]));for(const _0x2115f1 of _0x1b438d['tables']){const _0x55d97c=_0x1860cc[_0x3e2fd1(0x145)](_0x2115f1[_0x3e2fd1(0x13b)]());!_0x55d97c&&_0x4fa63e[_0x3e2fd1(0x12e)](_0x3e2fd1(0x109)+_0x2115f1+_0x3e2fd1(0x135));}for(const _0x371804 of _0x554312){let _0x2c402d;try{_0x2c402d=await getDatasetDetail(_0x371804);}catch{_0x4fa63e[_0x3e2fd1(0x12e)](_0x3e2fd1(0x110)+_0x371804+_0x3e2fd1(0x10e));continue;}assertDatasetIsDbTableBacked(_0x2c402d,_0x3e2fd1(0x11d));const _0x4b0331=Array[_0x3e2fd1(0x10c)](_0x2c402d[_0x3e2fd1(0x124)])?_0x2c402d[_0x3e2fd1(0x124)]:[],_0x57e6a2=new Set(_0x4b0331[_0x3e2fd1(0x119)](_0x19a0cb=>_0x19a0cb[_0x3e2fd1(0x132)]?.[_0x3e2fd1(0x13b)]())),_0x13d5fe=_0x2c402d[_0x3e2fd1(0x121)]?.[_0x3e2fd1(0x143)]||_0x2c402d[_0x3e2fd1(0x143)]||_0x371804;_0x538c74[_0x3e2fd1(0x146)+_0x13d5fe]={'code':_0x371804,'tableName':_0x13d5fe,'fieldCount':_0x57e6a2[_0x3e2fd1(0x120)],'fields':Array['from'](_0x57e6a2)};if(_0x1ed69e){const _0x4a0e70=normalizeDatasetIndexes(_0x2c402d);_0x3aabba[_0x3e2fd1(0x12e)]({'tableName':_0x13d5fe,..._0x4a0e70});}}_0x4fa63e[_0x3e2fd1(0x133)]>0x0&&(_0x538c74[_0x3e2fd1(0x140)]=_0x4fa63e),_0x1ed69e&&(_0x538c74['joinAudit']=auditSqlJoinIndexes(_0xa24bdc,_0x3aabba));}return{'ok':_0x1b438d[_0x3e2fd1(0x14c)],'data':_0x538c74,'message':_0x1b438d[_0x3e2fd1(0x13a)]};}};function normalizeDatasetIndexes(_0x4fb970){const _0x13d248=a177_0x462d8e,_0x414128=Array[_0x13d248(0x10c)](_0x4fb970?.['dataset']?.['indexes'])?_0x4fb970[_0x13d248(0x138)][_0x13d248(0x12b)]:Array[_0x13d248(0x10c)](_0x4fb970?.[_0x13d248(0x12b)])?_0x4fb970[_0x13d248(0x12b)]:[],_0x550bc5=_0x414128[_0x13d248(0x131)](_0x2b937d=>{const _0x558257=_0x13d248,_0x5c1034=Array[_0x558257(0x10c)](_0x2b937d?.[_0x558257(0x111)])?_0x2b937d[_0x558257(0x111)]:Array[_0x558257(0x10c)](_0x2b937d?.[_0x558257(0x122)])?_0x2b937d[_0x558257(0x122)]:Array[_0x558257(0x10c)](_0x2b937d?.[_0x558257(0x113)])?_0x2b937d[_0x558257(0x113)]:[],_0x4f6b04=_0x5c1034[_0x558257(0x118)](_0x178431=>typeof _0x178431===_0x558257(0x13d))[_0x558257(0x119)](_0x513f17=>_0x513f17[_0x558257(0x13f)]())['filter'](Boolean);if(_0x4f6b04[_0x558257(0x133)]===0x0)return[];const _0x1470e7=[_0x2b937d?.[_0x558257(0x128)],_0x2b937d?.[_0x558257(0x144)],_0x2b937d?.[_0x558257(0x132)]]['find'](_0x31a50d=>typeof _0x31a50d===_0x558257(0x13d)&&_0x31a50d[_0x558257(0x13f)]()),_0x1dbd22=[_0x2b937d?.[_0x558257(0x137)],_0x2b937d?.[_0x558257(0x13e)]][_0x558257(0x12c)](_0x19b887=>typeof _0x19b887===_0x558257(0x13d)&&_0x19b887[_0x558257(0x13f)]());return[{..._0x1470e7?{'name':_0x1470e7[_0x558257(0x13f)]()}:{},..._0x1dbd22?{'type':_0x1dbd22[_0x558257(0x13f)]()}:{},'columns':_0x4f6b04}];}),_0x1985e6=[..._0x550bc5],_0x5b21be=typeof _0x4fb970?.[_0x13d248(0x121)]?.[_0x13d248(0x148)]===_0x13d248(0x13d)?_0x4fb970[_0x13d248(0x121)][_0x13d248(0x148)]['split'](',')[_0x13d248(0x119)](_0x2dd723=>_0x2dd723[_0x13d248(0x13f)]())[_0x13d248(0x118)](Boolean):[];return _0x5b21be[_0x13d248(0x133)]>0x0&&_0x1985e6[_0x13d248(0x13c)]({'type':_0x13d248(0x130),'columns':_0x5b21be}),{'indexes':_0x1985e6,'metadataAvailable':_0x550bc5[_0x13d248(0x133)]>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x37b4f5,_0x486bea){const _0x534e7d=a178_0x3552,_0x11d2d4=_0x37b4f5();while(!![]){try{const _0x23c3c9=-parseInt(_0x534e7d(0xa3))/0x1+-parseInt(_0x534e7d(0xa2))/0x2+-parseInt(_0x534e7d(0xa5))/0x3+parseInt(_0x534e7d(0xa1))/0x4+parseInt(_0x534e7d(0xa9))/0x5+-parseInt(_0x534e7d(0xa8))/0x6*(-parseInt(_0x534e7d(0xa6))/0x7)+-parseInt(_0x534e7d(0xa4))/0x8*(-parseInt(_0x534e7d(0xa7))/0x9);if(_0x23c3c9===_0x486bea)break;else _0x11d2d4['push'](_0x11d2d4['shift']());}catch(_0x1b7626){_0x11d2d4['push'](_0x11d2d4['shift']());}}}(a178_0x30ab,0x4234e));import{taskStatus}from'../../commands/task/status.js';export const taskDefinitions=[taskStatus];function a178_0x3552(_0x57e87b,_0x14484f){_0x57e87b=_0x57e87b-0xa1;const _0x30ab1b=a178_0x30ab();let _0x355244=_0x30ab1b[_0x57e87b];return _0x355244;}function a178_0x30ab(){const _0x366935=['1635005YqlfYL','29132zUqPcY','640352miTFPh','325175eDSCOZ','1640ApMnhK','476997NacrbP','348481AbRTgU','30357OLmDjj','6JTkxvQ'];a178_0x30ab=function(){return _0x366935;};return a178_0x30ab();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a179_0xdbb9d2=a179_0x5556;(function(_0x529635,_0x4b8610){const _0xa5fc7d=a179_0x5556,_0x2f28e9=_0x529635();while(!![]){try{const _0x39a593=parseInt(_0xa5fc7d(0x11d))/0x1+parseInt(_0xa5fc7d(0x115))/0x2+-parseInt(_0xa5fc7d(0x11c))/0x3*(parseInt(_0xa5fc7d(0x11e))/0x4)+parseInt(_0xa5fc7d(0x119))/0x5*(-parseInt(_0xa5fc7d(0x120))/0x6)+-parseInt(_0xa5fc7d(0x10f))/0x7+-parseInt(_0xa5fc7d(0x11b))/0x8+parseInt(_0xa5fc7d(0x110))/0x9*(parseInt(_0xa5fc7d(0x127))/0xa);if(_0x39a593===_0x4b8610)break;else _0x2f28e9['push'](_0x2f28e9['shift']());}catch(_0x2dfb4c){_0x2f28e9['push'](_0x2f28e9['shift']());}}}(a179_0x2737,0x18dc7));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from'../../commands/common/async-task.js';import{getAsyncTaskStatus}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a179_0x5556(_0x2aa15b,_0x6efe88){_0x2aa15b=_0x2aa15b-0x10f;const _0x273767=a179_0x2737();let _0x5556dd=_0x273767[_0x2aa15b];return _0x5556dd;}function a179_0x2737(){const _0x2c9bdb=['task','210290PvXGct','read','taskId','Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','82905zeWWaA','Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','579864dytKPZ','4743yxrFNB','75155SJPtQC','80HMBJZT','cookie','18UtKNAe','string','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','compress','appCode','isTerminal','task-id','11710zSHFvR',',\x20received\x20','595350ZVIBuc','1233UwHPVK','str','flagMissing','trim'];a179_0x2737=function(){return _0x2c9bdb;};return a179_0x2737();}export const taskStatus={'service':a179_0xdbb9d2(0x114),'command':'status','description':a179_0xdbb9d2(0x118),'risk':a179_0xdbb9d2(0x116),'defaultOutputFormat':a179_0xdbb9d2(0x123),'structuredErrors':!![],'flags':[{'name':a179_0xdbb9d2(0x126),'type':a179_0xdbb9d2(0x121),'required':!![],'description':a179_0xdbb9d2(0x122)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x54903b){const _0x1ae19b=a179_0xdbb9d2;if(!_0x54903b[_0x1ae19b(0x111)]('task-id')[_0x1ae19b(0x113)]())throw CliErrors[_0x1ae19b(0x112)]('task-id');},async 'execute'(_0x2ecb89){const _0xeca792=a179_0xdbb9d2,_0x372bf3=_0x2ecb89[_0xeca792(0x111)](_0xeca792(0x126))[_0xeca792(0x113)](),_0x3022dd=normalizeAsyncTask(await getAsyncTaskStatus(_0x372bf3,_0x2ecb89[_0xeca792(0x124)],_0x2ecb89[_0xeca792(0x11f)]));if(_0x3022dd[_0xeca792(0x117)]!==_0x372bf3)throw CliErrors['apiError'](_0xeca792(0x11a)+_0x372bf3+_0xeca792(0x128)+_0x3022dd[_0xeca792(0x117)]+'.');const _0x43eb0d=buildAsyncTaskStatusCommand(_0x3022dd['taskId'],_0x2ecb89['appCode']);return{'ok':!![],'message':asyncTaskMessage(_0x3022dd),'data':{'appCode':_0x2ecb89[_0xeca792(0x124)],..._0x3022dd,'query':_0x3022dd[_0xeca792(0x125)]?null:{'command':_0x43eb0d}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a180_0x234b(_0x10374b,_0x8c04ea){_0x10374b=_0x10374b-0x1b7;const _0x5e7028=a180_0x5e70();let _0x234ba5=_0x5e7028[_0x10374b];return _0x234ba5;}function a180_0x5e70(){const _0x2a97d5=['460910GjPjfs','2118645XShJdK','App\x20profile\x20name','807kXfGkr','9251ERYmLt','2072pvNGxT','2434590haVcro','write','28gXFzJL','workspace','66JgtEuN','name','1987445QFGTOf','16PqmTbP','476024IPtSVT','workspace\x20add','add'];a180_0x5e70=function(){return _0x2a97d5;};return a180_0x5e70();}const a180_0x3d3b8b=a180_0x234b;(function(_0x43c06c,_0x725d6){const _0x5bec81=a180_0x234b,_0x27d417=_0x43c06c();while(!![]){try{const _0x46dcb4=-parseInt(_0x5bec81(0x1c7))/0x1*(-parseInt(_0x5bec81(0x1bf))/0x2)+-parseInt(_0x5bec81(0x1c6))/0x3*(parseInt(_0x5bec81(0x1b7))/0x4)+-parseInt(_0x5bec81(0x1be))/0x5+parseInt(_0x5bec81(0x1b8))/0x6+parseInt(_0x5bec81(0x1ba))/0x7*(parseInt(_0x5bec81(0x1c0))/0x8)+-parseInt(_0x5bec81(0x1c4))/0x9+parseInt(_0x5bec81(0x1c3))/0xa*(parseInt(_0x5bec81(0x1bc))/0xb);if(_0x46dcb4===_0x725d6)break;else _0x27d417['push'](_0x27d417['shift']());}catch(_0x1ce23a){_0x27d417['push'](_0x27d417['shift']());}}}(a180_0x5e70,0x3638f));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';export const workspaceAddDefinition={'service':a180_0x3d3b8b(0x1bb),'command':a180_0x3d3b8b(0x1c2),'description':'Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','risk':a180_0x3d3b8b(0x1b9),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a180_0x3d3b8b(0x1bd),'description':a180_0x3d3b8b(0x1c5),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x21a63a=>validateAppName(_0x21a63a,a180_0x3d3b8b(0x1c1)),'execute':_0x54aef6=>runAppAdd(_0x54aef6,'workspace\x20add')};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a181_0x44f7f5=a181_0x2529;function a181_0x1a04(){const _0x15c7c5=['Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','defaultFormat','948unwDHQ','isArray','trim','riskLevel','470LSWghj','324384bUIUOW','\x20--app\x20','1BFJhGx','\x20workspace\x20use\x20--app\x20<name>`.','app','88kGmbRS','\x20(appcode:\x20','format','\x20--appcode\x20<code>`.','workspace','Initialize\x20the\x20current\x20workspace\x20app\x20binding','2097yzHAmu','locale','Invalid\x20appcode:\x20','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','workspace.','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','number','defaultApp','100246atBjcS','55033IVBvcv','object','pageSize','Missing\x20workspace\x20app\x20selector.','join','\x22\x20not\x20found.','apiDir','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','env','\x20workspace\x20','validation','init','10367KUQbiI','string','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','1330270YAijVF','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','initialized','str','project','length','write','apps','keys','flag','Target\x20environment','use','Workspace\x20','2311569cUXoCI','appcode','updated','Use\x20`'];a181_0x1a04=function(){return _0x15c7c5;};return a181_0x1a04();}(function(_0x1a8e0f,_0x2f8d3f){const _0x3a630c=a181_0x2529,_0x2731d6=_0x1a8e0f();while(!![]){try{const _0xfcb1e6=-parseInt(_0x3a630c(0x215))/0x1*(parseInt(_0x3a630c(0x226))/0x2)+-parseInt(_0x3a630c(0x21e))/0x3*(parseInt(_0x3a630c(0x20e))/0x4)+parseInt(_0x3a630c(0x1fb))/0x5+parseInt(_0x3a630c(0x213))/0x6+parseInt(_0x3a630c(0x1f8))/0x7*(parseInt(_0x3a630c(0x218))/0x8)+parseInt(_0x3a630c(0x208))/0x9+parseInt(_0x3a630c(0x212))/0xa*(-parseInt(_0x3a630c(0x227))/0xb);if(_0xfcb1e6===_0x2f8d3f)break;else _0x2731d6['push'](_0x2731d6['shift']());}catch(_0x3faec4){_0x2731d6['push'](_0x2731d6['shift']());}}}(a181_0x1a04,0x22bf3));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{RISK_LEVEL_VALUES}from'../../constant/risk.js';import{validateAppcode}from'../../commands/common/validate.js';import{readConfigFile,readRawConfigWithLayers,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{workspaceAddDefinition}from'../../commands/workspace/add.js';import{workspaceRemoveDefinition}from'../../commands/workspace/remove.js';const WORKSPACE_USAGE=CLI_BIN_NAME+a181_0x44f7f5(0x223),SAFE_PROFILE_KEYS=['appcode','env',a181_0x44f7f5(0x1f1),a181_0x44f7f5(0x21a),a181_0x44f7f5(0x229),a181_0x44f7f5(0x211),a181_0x44f7f5(0x21f)],workspaceFlags=[{'name':a181_0x44f7f5(0x217),'type':a181_0x44f7f5(0x1f9),'description':a181_0x44f7f5(0x1fa)},{'name':'appcode','type':'string','description':'App\x20code\x20to\x20bind\x20to\x20this\x20workspace'},{'name':a181_0x44f7f5(0x1f4),'type':'string','description':a181_0x44f7f5(0x205),'enum':[...RABETBASE_ENV_VALUES]},{'name':a181_0x44f7f5(0x1f1),'type':a181_0x44f7f5(0x1f9),'description':a181_0x44f7f5(0x1fc)},{'name':a181_0x44f7f5(0x20d),'type':a181_0x44f7f5(0x1f9),'description':'Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a181_0x44f7f5(0x229),'type':a181_0x44f7f5(0x224),'description':a181_0x44f7f5(0x221)},{'name':'riskLevel','type':a181_0x44f7f5(0x1f9),'description':a181_0x44f7f5(0x1f3),'enum':[...RISK_LEVEL_VALUES]},{'name':a181_0x44f7f5(0x21f),'type':'string','description':'Locale\x20for\x20this\x20workspace\x20app\x20profile'}];function isRecord(_0x2aaa6f){const _0x206b98=a181_0x44f7f5;return!!_0x2aaa6f&&typeof _0x2aaa6f===_0x206b98(0x228)&&!Array[_0x206b98(0x20f)](_0x2aaa6f);}function assertValidAppcode(_0x3bbfba){const _0x4b12df=a181_0x44f7f5,{valid:_0x5d5f99,message:_0x917581}=validateAppcode(_0x3bbfba);if(!_0x5d5f99)throw CliErrors[_0x4b12df(0x1f6)](_0x4b12df(0x220)+_0x3bbfba,_0x917581);}function sanitizeProfile(_0x27cf83){if(!isRecord(_0x27cf83))return{};const _0x5d5629={};for(const _0x19c05c of SAFE_PROFILE_KEYS){if(_0x27cf83[_0x19c05c]!==undefined)_0x5d5629[_0x19c05c]=_0x27cf83[_0x19c05c];}return _0x5d5629;}function cloneProfile(_0x1b4483){return isRecord(_0x1b4483)?{..._0x1b4483}:{};}function a181_0x2529(_0x1b84f1,_0x409e31){_0x1b84f1=_0x1b84f1-0x1f0;const _0x1a04f3=a181_0x1a04();let _0x252998=_0x1a04f3[_0x1b84f1];return _0x252998;}function collectWorkspaceProfileOverrides(_0x257aa0){const _0x28ff55=a181_0x44f7f5,_0xf948eb={},_0x3d6c28=_0x257aa0['str'](_0x28ff55(0x1f4)),_0x5adf79=_0x257aa0[_0x28ff55(0x1fe)](_0x28ff55(0x1f1)),_0x2c9d29=_0x257aa0[_0x28ff55(0x1fe)](_0x28ff55(0x20d)),_0x5d09d6=_0x257aa0[_0x28ff55(0x204)](_0x28ff55(0x229)),_0x12343c=_0x257aa0['str']('riskLevel'),_0x4ff726=_0x257aa0[_0x28ff55(0x1fe)](_0x28ff55(0x21f));if(_0x3d6c28)_0xf948eb['env']=_0x3d6c28;if(_0x5adf79)_0xf948eb[_0x28ff55(0x1f1)]=_0x5adf79;if(_0x2c9d29)_0xf948eb['format']=_0x2c9d29;if(_0x5d09d6!==undefined&&_0x5d09d6!=='')_0xf948eb[_0x28ff55(0x229)]=Number(_0x5d09d6);if(_0x12343c)_0xf948eb['riskLevel']=_0x12343c;if(_0x4ff726)_0xf948eb['locale']=_0x4ff726;return _0xf948eb;}async function validateWorkspaceArgs(_0x459d35){const _0x38788f=a181_0x44f7f5,_0x12b559=_0x459d35[_0x38788f(0x1fe)](_0x38788f(0x217))[_0x38788f(0x210)](),_0x5f5ccc=_0x459d35[_0x38788f(0x1fe)](_0x38788f(0x209))['trim']();if(!_0x12b559&&!_0x5f5ccc)throw CliErrors[_0x38788f(0x1f6)](_0x38788f(0x22a),'Use\x20`'+CLI_BIN_NAME+_0x38788f(0x1f2)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`.');if(_0x5f5ccc)assertValidAppcode(_0x5f5ccc);}function resolveKnownApps(){const _0x2e69e7=a181_0x44f7f5,{config:_0x30bf13,layers:_0x154b4d}=readRawConfigWithLayers(),_0x10e669=isRecord(_0x30bf13[_0x2e69e7(0x202)])?_0x30bf13[_0x2e69e7(0x202)]:{},_0x53fdcf=isRecord(_0x154b4d['globalConfig'][_0x2e69e7(0x202)])?_0x154b4d['globalConfig'][_0x2e69e7(0x202)]:{};return{..._0x53fdcf,..._0x10e669};}async function configureWorkspace(_0x972282,_0x5052cf){const _0x3725d2=a181_0x44f7f5,_0x230d03=_0x972282[_0x3725d2(0x1fe)](_0x3725d2(0x217))[_0x3725d2(0x210)](),_0xe9a0a5=_0x972282[_0x3725d2(0x1fe)](_0x3725d2(0x209))[_0x3725d2(0x210)](),_0x4ec902=_0x230d03||_0xe9a0a5;if(!_0x4ec902)throw CliErrors[_0x3725d2(0x1f6)](_0x3725d2(0x22a),_0x3725d2(0x20b)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x3725d2(0x216));if(_0xe9a0a5)assertValidAppcode(_0xe9a0a5);const _0x1cc9a1=resolveWriteConfigPath(_0x3725d2(0x1ff)),_0x277e2f=readConfigFile(_0x1cc9a1),_0x3427f6=resolveKnownApps(),_0x21478c=isRecord(_0x277e2f[_0x3725d2(0x202)])?{..._0x277e2f['apps']}:{},_0x2b82a2=cloneProfile(_0x21478c[_0x4ec902]),_0x5b57eb=sanitizeProfile(_0x3427f6[_0x4ec902]),_0x10156a=_0xe9a0a5?{}:_0x5b57eb,_0xc099eb=_0xe9a0a5||_0x10156a[_0x3725d2(0x209)];if(!_0xc099eb){const _0xa80535=Object[_0x3725d2(0x203)](_0x3427f6),_0x4bf704=_0xa80535[_0x3725d2(0x200)]===0x0?_0x3725d2(0x20b)+CLI_BIN_NAME+_0x3725d2(0x1f5)+_0x5052cf+_0x3725d2(0x214)+_0x4ec902+_0x3725d2(0x21b):_0x3725d2(0x20c)+_0xa80535[_0x3725d2(0x22b)](',\x20');throw CliErrors[_0x3725d2(0x1f6)]('App\x20\x22'+_0x4ec902+_0x3725d2(0x1f0),_0x4bf704);}assertValidAppcode(String(_0xc099eb));const _0x2794dc={..._0x10156a,..._0x2b82a2,'appcode':String(_0xc099eb),...collectWorkspaceProfileOverrides(_0x972282)};return _0x21478c[_0x4ec902]=_0x2794dc,_0x277e2f[_0x3725d2(0x202)]=_0x21478c,_0x277e2f[_0x3725d2(0x225)]=_0x4ec902,delete _0x277e2f[_0x3725d2(0x209)],delete _0x277e2f[_0x3725d2(0x217)],_0x2794dc['env']&&(_0x277e2f[_0x3725d2(0x1f4)]=_0x2794dc[_0x3725d2(0x1f4)]),writeConfigFile(_0x1cc9a1,_0x277e2f),{'ok':!![],'message':_0x3725d2(0x207)+(_0x5052cf===_0x3725d2(0x1f7)?_0x3725d2(0x1fd):_0x3725d2(0x20a))+':\x20'+_0x4ec902+_0x3725d2(0x219)+_0x2794dc[_0x3725d2(0x209)]+').\x20Config:\x20'+_0x1cc9a1+'.\x20Credentials:\x20not\x20written.','data':{'operation':_0x3725d2(0x222)+_0x5052cf,'configPath':_0x1cc9a1,'app':_0x4ec902,'appcode':_0x2794dc[_0x3725d2(0x209)],'env':_0x2794dc[_0x3725d2(0x1f4)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a181_0x44f7f5(0x21c),'command':a181_0x44f7f5(0x1f7),'description':a181_0x44f7f5(0x21d),'risk':a181_0x44f7f5(0x201),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x4a04a1=>configureWorkspace(_0x4a04a1,'init')},workspaceUseDefinition={'service':a181_0x44f7f5(0x21c),'command':a181_0x44f7f5(0x206),'description':'Switch\x20the\x20current\x20workspace\x20app\x20binding','risk':a181_0x44f7f5(0x201),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x545cdb=>configureWorkspace(_0x545cdb,a181_0x44f7f5(0x206))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a182_0x37ebea=a182_0x28b3;function a182_0x3984(){const _0x18bfad=['15IRUIyc','high-risk-write','309192FnsWgA','10gRyhsa','workspace\x20remove','workspace','8TutUkr','28488exqlhe','642231lozNxs','4307360AZanuK','28355FSabWA','141948ZAAdBp','1289022jAqkuW'];a182_0x3984=function(){return _0x18bfad;};return a182_0x3984();}(function(_0xf2d6af,_0x25bb0a){const _0x3e9d0b=a182_0x28b3,_0x3cdca1=_0xf2d6af();while(!![]){try{const _0x1836a8=parseInt(_0x3e9d0b(0x1a3))/0x1+-parseInt(_0x3e9d0b(0x1a9))/0x2*(parseInt(_0x3e9d0b(0x1ad))/0x3)+parseInt(_0x3e9d0b(0x1a4))/0x4*(-parseInt(_0x3e9d0b(0x1a6))/0x5)+parseInt(_0x3e9d0b(0x1a8))/0x6+-parseInt(_0x3e9d0b(0x1a5))/0x7+-parseInt(_0x3e9d0b(0x1ac))/0x8*(parseInt(_0x3e9d0b(0x1a1))/0x9)+parseInt(_0x3e9d0b(0x1a2))/0xa;if(_0x1836a8===_0x25bb0a)break;else _0x3cdca1['push'](_0x3cdca1['shift']());}catch(_0x2e8df2){_0x3cdca1['push'](_0x3cdca1['shift']());}}}(a182_0x3984,0x18b39));function a182_0x28b3(_0x135c54,_0x20f582){_0x135c54=_0x135c54-0x1a1;const _0x39843b=a182_0x3984();let _0x28b333=_0x39843b[_0x135c54];return _0x28b333;}import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const workspaceRemoveDefinition={'service':a182_0x37ebea(0x1ab),'command':'remove','description':'Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','risk':a182_0x37ebea(0x1a7),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':'App\x20profile\x20name\x20to\x20remove','required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x13edb0=>validateAppName(_0x13edb0,a182_0x37ebea(0x1aa)),'execute':_0x2f12eb=>runAppRemove(_0x2f12eb,a182_0x37ebea(0x1aa))};
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a183_0x32f603=a183_0x19bb;(function(_0x2c3b0a,_0xc3d69e){const _0x429e1d=a183_0x19bb,_0x18e29a=_0x2c3b0a();while(!![]){try{const _0x5b3425=-parseInt(_0x429e1d(0x1f0))/0x1*(-parseInt(_0x429e1d(0x1e3))/0x2)+-parseInt(_0x429e1d(0x1d1))/0x3*(-parseInt(_0x429e1d(0x1d6))/0x4)+-parseInt(_0x429e1d(0x1f1))/0x5*(parseInt(_0x429e1d(0x1ea))/0x6)+parseInt(_0x429e1d(0x1de))/0x7+-parseInt(_0x429e1d(0x1d9))/0x8+parseInt(_0x429e1d(0x1e7))/0x9*(parseInt(_0x429e1d(0x1eb))/0xa)+-parseInt(_0x429e1d(0x1dc))/0xb*(parseInt(_0x429e1d(0x1e1))/0xc);if(_0x5b3425===_0xc3d69e)break;else _0x18e29a['push'](_0x18e29a['shift']());}catch(_0x461050){_0x18e29a['push'](_0x18e29a['shift']());}}}(a183_0x5155,0x43d5b));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';function a183_0x19bb(_0x5e5253,_0x3b51aa){_0x5e5253=_0x5e5253-0x1c9;const _0x51550b=a183_0x5155();let _0x19bb03=_0x51550b[_0x5e5253];return _0x19bb03;}export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=[a183_0x32f603(0x1d2),'accessKey',a183_0x32f603(0x1e4),a183_0x32f603(0x1f2),a183_0x32f603(0x1ca)];export const TOP_LEVEL_CONFIG_KEYS=new Set(['appcode',a183_0x32f603(0x1ce),a183_0x32f603(0x1e4),a183_0x32f603(0x1f2),a183_0x32f603(0x1d2),'accessKey',a183_0x32f603(0x1d5)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x386fe8){const _0x3d7046=a183_0x32f603;return[..._0x386fe8][_0x3d7046(0x1df)](',\x20');}function a183_0x5155(){const _0x4ade86=['2180wwQRHR','number','accessKey','1218344bSUBlO','pageSize','map','14025BnMDtS','filter','473067dWeLZy','join','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','2640YCguAP','defaultApp','334HUyPZs','locale','defaultFormat','app','549027yMGJcp','en-US','appcode','114wCMQnE','20FebYab','Risk\x20level','string','Locale','trim','662HmeXUx','31665ktPlaS','format','Auth\x20cookie','Target\x20environment','riskLevel','Default\x20page\x20size','entries','Access\x20key','env','length','inherit','2922ZIrfMR','cookie','zh-CN','apps','apiDir'];a183_0x5155=function(){return _0x4ade86;};return a183_0x5155();}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x2ee6ed){return TOP_LEVEL_CONFIG_KEYS['has'](_0x2ee6ed);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){return'Config\x20key\x20('+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a183_0x32f603(0x1ce),'apiDir':a183_0x32f603(0x1d5),'cookie':a183_0x32f603(0x1d2),'accessKey':'accessKey','defaultFormat':a183_0x32f603(0x1f2),'pageSize':a183_0x32f603(0x1da),'riskLevel':a183_0x32f603(0x1ca),'locale':a183_0x32f603(0x1e4)};export function getAppProfileFlagDefs(){const _0x1a8c85=a183_0x32f603;return[{'name':_0x1a8c85(0x1ce),'type':_0x1a8c85(0x1ed),'description':_0x1a8c85(0x1c9),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x1a8c85(0x1d5),'type':_0x1a8c85(0x1ed),'description':'API\x20directory\x20path'},{'name':_0x1a8c85(0x1d2),'type':'string','description':_0x1a8c85(0x1f3),'hidden':!![]},{'name':_0x1a8c85(0x1d8),'type':'string','description':_0x1a8c85(0x1cd),'hidden':!![]},{'name':_0x1a8c85(0x1e5),'type':_0x1a8c85(0x1ed),'description':_0x1a8c85(0x1e0),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x1a8c85(0x1da),'type':_0x1a8c85(0x1d7),'description':_0x1a8c85(0x1cb)},{'name':'riskLevel','type':_0x1a8c85(0x1ed),'description':_0x1a8c85(0x1ec),'enum':[...RISK_LEVEL_VALUES]},{'name':'locale','type':_0x1a8c85(0x1ed),'description':_0x1a8c85(0x1ee)}];}export function collectAppProfileOverrides(_0x4ed206){const _0x2069be=a183_0x32f603,_0x244ed8={};for(const [_0x143532,_0x7cbabd]of Object[_0x2069be(0x1cc)](APP_PROFILE_FLAG_KEY_MAP)){const _0x1c51fd=_0x4ed206(_0x143532);if(!_0x1c51fd)continue;_0x244ed8[_0x7cbabd]=_0x7cbabd===_0x2069be(0x1da)?Number(_0x1c51fd):_0x1c51fd;}return _0x244ed8;}export function buildAppProfileListFields(_0x1225d9){const _0x11cec8=a183_0x32f603;return{'env':_0x1225d9['env']??null,'apiDir':_0x1225d9['apiDir']??null,'hasCookie':!!_0x1225d9[_0x11cec8(0x1d2)],'hasAccessKey':!!_0x1225d9[_0x11cec8(0x1d8)],'format':_0x1225d9['format']??null,'pageSize':_0x1225d9[_0x11cec8(0x1da)]??null,'riskLevel':_0x1225d9['riskLevel']??null,'locale':_0x1225d9[_0x11cec8(0x1e4)]??null};}export function buildAppDoctorFields(_0x2eecdb,_0x57f809){const _0x39b164=a183_0x32f603;return{'env':{'value':_0x2eecdb[_0x39b164(0x1ce)]||_0x57f809[_0x39b164(0x1ce)],'source':_0x2eecdb[_0x39b164(0x1ce)]?'app':'inherit'},'apiDir':{'value':_0x2eecdb[_0x39b164(0x1d5)]||_0x57f809[_0x39b164(0x1d5)],'source':_0x2eecdb[_0x39b164(0x1d5)]?'app':_0x39b164(0x1d0)},'cookie':{'value':_0x2eecdb[_0x39b164(0x1d2)]||_0x57f809[_0x39b164(0x1d2)],'source':_0x2eecdb[_0x39b164(0x1d2)]?_0x39b164(0x1e6):_0x39b164(0x1d0)},'accessKey':{'value':_0x2eecdb[_0x39b164(0x1d8)]||_0x57f809[_0x39b164(0x1d8)],'source':_0x2eecdb[_0x39b164(0x1d8)]?_0x39b164(0x1e6):_0x39b164(0x1d0)}};}export function buildCanonicalAppConfig(_0x37a0ae,_0x256ee){const _0x36004a=a183_0x32f603,_0x3649bf=_0x37a0ae[_0x36004a(0x1db)](_0x3c5733=>String(_0x3c5733||'')[_0x36004a(0x1ef)]())[_0x36004a(0x1dd)](Boolean);if(_0x3649bf[_0x36004a(0x1cf)]===0x0)return{};const _0x25ede8={};for(const _0x485f7a of _0x3649bf){_0x25ede8[_0x485f7a]=_0x256ee?{'appcode':_0x485f7a,'env':_0x256ee}:{'appcode':_0x485f7a};}return{'apps':_0x25ede8,'defaultApp':_0x3649bf[0x0]};}export function buildCanonicalProjectConfig(_0x500d45,_0x24bcf3){const _0x18d86e=a183_0x32f603,{appCodes:appCodes=[],env:_0x350e36,metadata:_0x3cd15c}=_0x24bcf3,_0x5155f2={..._0x500d45,..._0x3cd15c||{}};delete _0x5155f2[_0x18d86e(0x1e9)],delete _0x5155f2[_0x18d86e(0x1e6)];if(_0x350e36)_0x5155f2[_0x18d86e(0x1ce)]=_0x350e36;else!_0x5155f2[_0x18d86e(0x1ce)]&&(_0x5155f2[_0x18d86e(0x1ce)]=DEFAULT_CONFIG_VALUES[_0x18d86e(0x1ce)]);const _0x4151e2=buildCanonicalAppConfig(appCodes,_0x5155f2[_0x18d86e(0x1ce)]);return Object['keys'](_0x4151e2)[_0x18d86e(0x1cf)]>0x0&&(_0x5155f2['apps']=_0x4151e2[_0x18d86e(0x1d4)],_0x5155f2[_0x18d86e(0x1e2)]=_0x4151e2[_0x18d86e(0x1e2)]),_0x5155f2;}const LOCALE_MAP={'zh':a183_0x32f603(0x1d3),'zh-cn':'zh-CN','zh_cn':'zh-CN','en':a183_0x32f603(0x1e8),'en-us':a183_0x32f603(0x1e8),'en_us':a183_0x32f603(0x1e8)};export function normalizeLocale(_0x542579){if(!_0x542579)return null;return LOCALE_MAP[_0x542579['toLowerCase']()]??null;}
|
package/lib/constant/cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a184_0x18e9(){const _0x2a3df1=['84798BgYThg','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','1496586EvBRBW','156FnDKXv','857858xHJjgW','14484040QTSBuy','2320905iJidzo','1032mKVUaJ','4841634UsBKBa'];a184_0x18e9=function(){return _0x2a3df1;};return a184_0x18e9();}function a184_0x1ad1(_0xcaeb57,_0x5b25b5){_0xcaeb57=_0xcaeb57-0x189;const _0x18e953=a184_0x18e9();let _0x1ad11c=_0x18e953[_0xcaeb57];return _0x1ad11c;}const a184_0x968164=a184_0x1ad1;(function(_0x1327f1,_0x57e19c){const _0x395ace=a184_0x1ad1,_0x276e58=_0x1327f1();while(!![]){try{const _0x4b5c4e=-parseInt(_0x395ace(0x18e))/0x1+-parseInt(_0x395ace(0x18c))/0x2+-parseInt(_0x395ace(0x18d))/0x3*(parseInt(_0x395ace(0x191))/0x4)+-parseInt(_0x395ace(0x190))/0x5+parseInt(_0x395ace(0x189))/0x6+-parseInt(_0x395ace(0x18a))/0x7+parseInt(_0x395ace(0x18f))/0x8;if(_0x4b5c4e===_0x57e19c)break;else _0x276e58['push'](_0x276e58['shift']());}catch(_0x31eccf){_0x276e58['push'](_0x276e58['shift']());}}}(a184_0x18e9,0x7f56e));export const CLI_VERSION_POLICY_URL=a184_0x968164(0x18b);
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a185_0x56bdc9=a185_0xac00;(function(_0x57d88,_0x2cf866){const _0x170bc1=a185_0xac00,_0x31c866=_0x57d88();while(!![]){try{const _0x1305e8=parseInt(_0x170bc1(0x207))/0x1*(parseInt(_0x170bc1(0x221))/0x2)+parseInt(_0x170bc1(0x211))/0x3*(parseInt(_0x170bc1(0x1ae))/0x4)+parseInt(_0x170bc1(0x1c8))/0x5*(-parseInt(_0x170bc1(0x1bf))/0x6)+-parseInt(_0x170bc1(0x1b8))/0x7+-parseInt(_0x170bc1(0x1bc))/0x8*(-parseInt(_0x170bc1(0x210))/0x9)+parseInt(_0x170bc1(0x1cf))/0xa+-parseInt(_0x170bc1(0x1f9))/0xb;if(_0x1305e8===_0x2cf866)break;else _0x31c866['push'](_0x31c866['shift']());}catch(_0x5bf36e){_0x31c866['push'](_0x31c866['shift']());}}}(a185_0x3c4b,0xb191b));function a185_0xac00(_0x444544,_0x1ff0b6){_0x444544=_0x444544-0x1a9;const _0x3c4bd6=a185_0x3c4b();let _0xac0007=_0x3c4bd6[_0x444544];return _0xac0007;}function a185_0x3c4b(){const _0x28c876=['SQL\x20string','10QjNQkA','Output\x20path','Asynchronous\x20task\x20ID','Reveal\x20sensitive\x20value','SQL\x20code','Skip\x20import\x20generation','dryRun','1070240AdPOHP','Page\x20size','Override\x20appcode','Alias\x20for\x20--non-interactive','dbid','expected-children-count','all','Use\x20project\x20config\x20scope','operation','taskId','watch','Expected\x20current\x20menu\x20path','tags','Keyword\x20filter','Apply\x20to\x20all','Dataset\x20code','production\x20|\x20daily','sort','Config\x20value','fromEntries','File\x20path','Schemas','expect-parent-id','operation-type','sqlname','map','functionNode','DB\x20ID','project','Menu\x20sort\x20value','Config\x20key','datasetcode','<expr>','nonInteractive','string','schemas','format','app','Read\x20value\x20from\x20environment\x20variable','Target\x20path','function-node','sql','11239459EfGjqO','appcode','Preview\x20operation\x20without\x20executing','help','remote','clear','Skip\x20confirmation\x20for\x20high-risk\x20writes','@lovrabet/rabetbase-cli','Force\x20non-interactive\x20mode\x20(CI)','Use\x20global\x20config\x20scope','type','target','value','yes','4yjsDlQ','Output\x20format','file','confirm','page','parent-id','sqlName','force','boolean','4176ojYgbH','2962728rneFct','skipImports','from-env','key','stdin','params','Read\x20value\x20from\x20stdin','Page\x20number','Force\x20overwrite','Watch\x20mode','env','SQL\x20name','expectParentId','expectedChildrenCount','Expected\x20current\x20child\x20count','keyword','580314zQSdnD','Expected\x20affected\x20count','Title','description-file','Verbose\x20output','meowKey','verbose','Confirm\x20destructive\x20action','code','Type\x20filter','sqlcode','description','output','4kAYVxB','non-interactive','expectPath','Clear','Code\x20filter','Operation\x20type','parentId','Parent\x20menu\x20id','fromEnv','Show\x20help','3712478Thwzvc','global','enableBffSave','title','21968utHRjI','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','name','3749778pJtuON','json\x20|\x20pretty\x20|\x20compress','Select\x20app\x20profile\x20by\x20name','label','Record\x20ID','reveal','pagesize','dry-run'];a185_0x3c4b=function(){return _0x28c876;};return a185_0x3c4b();}export const CLI_BIN_NAME='rabetbase';export const CLI_DISPLAY_NAME='Rabetbase\x20CLI';export const NPM_PACKAGE_NAME=a185_0x56bdc9(0x200);export const GLOBAL_FLAGS=[{'name':a185_0x56bdc9(0x1fa),'meowKey':a185_0x56bdc9(0x1fa),'type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1d1),'hint':'<code>'},{'name':a185_0x56bdc9(0x1f4),'meowKey':a185_0x56bdc9(0x1f4),'type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1c1),'hint':'<name>'},{'name':'env','meowKey':a185_0x56bdc9(0x21b),'type':a185_0x56bdc9(0x1f1),'description':'Environment','hint':a185_0x56bdc9(0x1df)},{'name':a185_0x56bdc9(0x1f3),'meowKey':a185_0x56bdc9(0x1f3),'type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x208),'hint':a185_0x56bdc9(0x1c0)},{'name':'jq','meowKey':'jq','type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1bd),'hint':a185_0x56bdc9(0x1ef)},{'name':a185_0x56bdc9(0x1c6),'meowKey':a185_0x56bdc9(0x1ce),'type':'boolean','description':a185_0x56bdc9(0x1fb)},{'name':a185_0x56bdc9(0x206),'meowKey':a185_0x56bdc9(0x206),'type':a185_0x56bdc9(0x20f),'description':a185_0x56bdc9(0x1ff)},{'name':a185_0x56bdc9(0x1af),'meowKey':a185_0x56bdc9(0x1f0),'type':a185_0x56bdc9(0x20f),'description':a185_0x56bdc9(0x201)},{'name':a185_0x56bdc9(0x1b9),'meowKey':a185_0x56bdc9(0x1b9),'type':a185_0x56bdc9(0x20f),'description':a185_0x56bdc9(0x202)},{'name':a185_0x56bdc9(0x1eb),'meowKey':a185_0x56bdc9(0x1eb),'type':'boolean','description':a185_0x56bdc9(0x1d6)},{'name':'ci','meowKey':'ci','type':'boolean','description':a185_0x56bdc9(0x1d2),'hidden':!![]},{'name':'help','meowKey':a185_0x56bdc9(0x1fc),'type':a185_0x56bdc9(0x20f),'description':a185_0x56bdc9(0x1b7)},{'name':a185_0x56bdc9(0x1be),'meowKey':a185_0x56bdc9(0x1be),'type':a185_0x56bdc9(0x1f1),'description':'Name','hidden':!![]},{'name':a185_0x56bdc9(0x1bb),'meowKey':a185_0x56bdc9(0x1bb),'type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x223),'hidden':!![]},{'name':a185_0x56bdc9(0x1fe),'meowKey':a185_0x56bdc9(0x1fe),'type':a185_0x56bdc9(0x20f),'description':a185_0x56bdc9(0x1b1),'hidden':!![]},{'name':a185_0x56bdc9(0x1d9),'meowKey':a185_0x56bdc9(0x1d9),'type':a185_0x56bdc9(0x20f),'description':a185_0x56bdc9(0x21a),'hidden':!![]},{'name':a185_0x56bdc9(0x1ad),'meowKey':'output','type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1c9),'hidden':!![]},{'name':a185_0x56bdc9(0x216),'meowKey':a185_0x56bdc9(0x216),'type':a185_0x56bdc9(0x1f1),'description':'JSON\x20params','hidden':!![]},{'name':a185_0x56bdc9(0x1ee),'meowKey':a185_0x56bdc9(0x1ee),'type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1de),'hidden':!![]},{'name':a185_0x56bdc9(0x1d5),'meowKey':'all','type':a185_0x56bdc9(0x20f),'description':a185_0x56bdc9(0x1dd),'hidden':!![]},{'name':'enable-bff-save','meowKey':a185_0x56bdc9(0x1ba),'type':a185_0x56bdc9(0x20f),'description':'Enable\x20BFF\x20save','hidden':!![]},{'name':'id','meowKey':'id','type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1c3),'hidden':!![]},{'name':a185_0x56bdc9(0x203),'meowKey':'type','type':'string','description':a185_0x56bdc9(0x1aa),'hidden':!![]},{'name':a185_0x56bdc9(0x209),'meowKey':a185_0x56bdc9(0x209),'type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1e3),'hidden':!![]},{'name':a185_0x56bdc9(0x1ab),'meowKey':'sqlcode','type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1cc),'hidden':!![]},{'name':'sql-name','meowKey':a185_0x56bdc9(0x20d),'type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x21c),'hidden':!![]},{'name':a185_0x56bdc9(0x1e7),'meowKey':a185_0x56bdc9(0x1e7),'type':'string','description':'SQL\x20name','hidden':!![]},{'name':'db-id','meowKey':'dbId','type':'string','description':a185_0x56bdc9(0x1ea),'hidden':!![]},{'name':a185_0x56bdc9(0x1d3),'meowKey':a185_0x56bdc9(0x1d3),'type':a185_0x56bdc9(0x1f1),'description':'DB\x20ID','hidden':!![]},{'name':'description','meowKey':a185_0x56bdc9(0x1ac),'type':a185_0x56bdc9(0x1f1),'description':'Description','hidden':!![]},{'name':a185_0x56bdc9(0x224),'meowKey':'descriptionFile','type':'string','description':'Description\x20file','hidden':!![]},{'name':a185_0x56bdc9(0x20b),'meowKey':'page','type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x218),'hidden':!![]},{'name':a185_0x56bdc9(0x1c5),'meowKey':a185_0x56bdc9(0x1c5),'type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1d0),'hidden':!![]},{'name':'keyword','meowKey':a185_0x56bdc9(0x220),'type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1dc),'hidden':!![]},{'name':a185_0x56bdc9(0x1a9),'meowKey':a185_0x56bdc9(0x1a9),'type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1b2),'hidden':!![]},{'name':'sql','meowKey':a185_0x56bdc9(0x1f8),'type':'string','description':a185_0x56bdc9(0x1c7),'hidden':!![]},{'name':a185_0x56bdc9(0x1f2),'meowKey':'schemas','type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1e4),'hidden':!![]},{'name':a185_0x56bdc9(0x1d7),'meowKey':a185_0x56bdc9(0x1d7),'type':a185_0x56bdc9(0x1f1),'description':'Operation\x20type','hidden':!![]},{'name':a185_0x56bdc9(0x204),'meowKey':'target','type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1f6),'hidden':!![]},{'name':'skip-imports','meowKey':a185_0x56bdc9(0x212),'type':a185_0x56bdc9(0x20f),'description':a185_0x56bdc9(0x1cd),'hidden':!![]},{'name':a185_0x56bdc9(0x214),'meowKey':a185_0x56bdc9(0x214),'type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1ed),'hidden':!![]},{'name':a185_0x56bdc9(0x205),'meowKey':a185_0x56bdc9(0x205),'type':'string','description':a185_0x56bdc9(0x1e1),'hidden':!![]},{'name':a185_0x56bdc9(0x1db),'meowKey':'tags','type':a185_0x56bdc9(0x1f1),'description':'Tags','hidden':!![]},{'name':a185_0x56bdc9(0x215),'meowKey':a185_0x56bdc9(0x215),'type':a185_0x56bdc9(0x20f),'description':a185_0x56bdc9(0x217),'hidden':!![]},{'name':a185_0x56bdc9(0x213),'meowKey':a185_0x56bdc9(0x1b6),'type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1f5),'hidden':!![]},{'name':'reveal','meowKey':a185_0x56bdc9(0x1c4),'type':a185_0x56bdc9(0x20f),'description':a185_0x56bdc9(0x1cb),'hidden':!![]},{'name':a185_0x56bdc9(0x20e),'meowKey':'force','type':a185_0x56bdc9(0x20f),'description':a185_0x56bdc9(0x219),'hidden':!![]},{'name':a185_0x56bdc9(0x20a),'meowKey':a185_0x56bdc9(0x20a),'type':a185_0x56bdc9(0x20f),'description':a185_0x56bdc9(0x228),'hidden':!![]},{'name':a185_0x56bdc9(0x1fd),'meowKey':'remote','type':a185_0x56bdc9(0x20f),'description':'Use\x20remote','hidden':!![]},{'name':a185_0x56bdc9(0x227),'meowKey':a185_0x56bdc9(0x227),'type':a185_0x56bdc9(0x20f),'description':a185_0x56bdc9(0x225),'hidden':!![]},{'name':'expected-count','meowKey':'expectedCount','type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x222),'hidden':!![]},{'name':a185_0x56bdc9(0x1c2),'meowKey':a185_0x56bdc9(0x1c2),'type':a185_0x56bdc9(0x1f1),'description':'Menu\x20label','hidden':!![]},{'name':a185_0x56bdc9(0x20c),'meowKey':a185_0x56bdc9(0x1b4),'type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1b5),'hidden':!![]},{'name':a185_0x56bdc9(0x1e0),'meowKey':a185_0x56bdc9(0x1e0),'type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1ec),'hidden':!![]},{'name':a185_0x56bdc9(0x1e5),'meowKey':a185_0x56bdc9(0x21d),'type':a185_0x56bdc9(0x1f1),'description':'Expected\x20current\x20parent\x20menu\x20id','hidden':!![]},{'name':'expect-path','meowKey':a185_0x56bdc9(0x1b0),'type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1da),'hidden':!![]},{'name':a185_0x56bdc9(0x1d4),'meowKey':a185_0x56bdc9(0x21e),'type':'string','description':a185_0x56bdc9(0x21f),'hidden':!![]},{'name':'menu-ids','meowKey':'menuIds','type':a185_0x56bdc9(0x1f1),'description':'Comma-separated\x20menu\x20IDs','hidden':!![]},{'name':'task-id','meowKey':a185_0x56bdc9(0x1d8),'type':a185_0x56bdc9(0x1f1),'description':a185_0x56bdc9(0x1ca),'hidden':!![]},{'name':a185_0x56bdc9(0x1e6),'meowKey':'operationType','type':'string','description':a185_0x56bdc9(0x1b3),'hidden':!![]},{'name':a185_0x56bdc9(0x1f7),'meowKey':a185_0x56bdc9(0x1e9),'type':'string','description':'Function\x20node','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a185_0x56bdc9(0x1fa),a185_0x56bdc9(0x1f4),a185_0x56bdc9(0x21b),a185_0x56bdc9(0x1f3),'jq',a185_0x56bdc9(0x1c6),a185_0x56bdc9(0x206),a185_0x56bdc9(0x1af),'ci']);export function buildMeowFlags(){const _0x2833e1=a185_0x56bdc9;return Object[_0x2833e1(0x1e2)](GLOBAL_FLAGS[_0x2833e1(0x1e8)](_0x454c4b=>[_0x454c4b[_0x2833e1(0x226)],{'type':_0x454c4b[_0x2833e1(0x203)]}]));}
|
|
1
|
+
const a185_0x5ea4c0=a185_0x3903;(function(_0xd3d804,_0x27b0fa){const _0x120e86=a185_0x3903,_0x22b290=_0xd3d804();while(!![]){try{const _0xeddccb=parseInt(_0x120e86(0xc6))/0x1*(-parseInt(_0x120e86(0x121))/0x2)+parseInt(_0x120e86(0xfc))/0x3*(parseInt(_0x120e86(0xb3))/0x4)+parseInt(_0x120e86(0x115))/0x5+-parseInt(_0x120e86(0x107))/0x6*(parseInt(_0x120e86(0x11e))/0x7)+-parseInt(_0x120e86(0xf8))/0x8*(-parseInt(_0x120e86(0xe1))/0x9)+-parseInt(_0x120e86(0x108))/0xa*(parseInt(_0x120e86(0xde))/0xb)+parseInt(_0x120e86(0xca))/0xc;if(_0xeddccb===_0x27b0fa)break;else _0x22b290['push'](_0x22b290['shift']());}catch(_0xcee716){_0x22b290['push'](_0x22b290['shift']());}}}(a185_0x11fa,0x26702));export const CLI_BIN_NAME=a185_0x5ea4c0(0xdb);function a185_0x3903(_0x10b625,_0x2a9bbd){_0x10b625=_0x10b625-0xb1;const _0x11fa60=a185_0x11fa();let _0x39039e=_0x11fa60[_0x10b625];return _0x39039e;}export const CLI_DISPLAY_NAME='Rabetbase\x20CLI';export const NPM_PACKAGE_NAME=a185_0x5ea4c0(0xeb);export const GLOBAL_FLAGS=[{'name':a185_0x5ea4c0(0xe5),'meowKey':a185_0x5ea4c0(0xe5),'type':'string','description':'Override\x20appcode','hint':'<code>'},{'name':a185_0x5ea4c0(0xec),'meowKey':a185_0x5ea4c0(0xec),'type':'string','description':'Select\x20app\x20profile\x20by\x20name','hint':a185_0x5ea4c0(0xb9)},{'name':a185_0x5ea4c0(0x10f),'meowKey':a185_0x5ea4c0(0x10f),'type':'string','description':a185_0x5ea4c0(0x120),'hint':'production\x20|\x20daily'},{'name':'format','meowKey':a185_0x5ea4c0(0xdf),'type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0xfa),'hint':a185_0x5ea4c0(0xe0)},{'name':'jq','meowKey':'jq','type':'string','description':'Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','hint':a185_0x5ea4c0(0xf1)},{'name':a185_0x5ea4c0(0xb4),'meowKey':'dryRun','type':a185_0x5ea4c0(0xe4),'description':a185_0x5ea4c0(0xf3)},{'name':a185_0x5ea4c0(0xf9),'meowKey':'yes','type':'boolean','description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a185_0x5ea4c0(0x125),'meowKey':a185_0x5ea4c0(0xe8),'type':a185_0x5ea4c0(0xe4),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':'global','meowKey':a185_0x5ea4c0(0x113),'type':a185_0x5ea4c0(0xe4),'description':a185_0x5ea4c0(0x109)},{'name':a185_0x5ea4c0(0xea),'meowKey':a185_0x5ea4c0(0xea),'type':a185_0x5ea4c0(0xe4),'description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a185_0x5ea4c0(0xe4),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':'help','meowKey':a185_0x5ea4c0(0xc0),'type':a185_0x5ea4c0(0xe4),'description':a185_0x5ea4c0(0x11f)},{'name':a185_0x5ea4c0(0xc3),'meowKey':a185_0x5ea4c0(0xc3),'type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0x116),'hidden':!![]},{'name':a185_0x5ea4c0(0xff),'meowKey':'title','type':'string','description':a185_0x5ea4c0(0xd4),'hidden':!![]},{'name':a185_0x5ea4c0(0x127),'meowKey':a185_0x5ea4c0(0x127),'type':a185_0x5ea4c0(0xe4),'description':a185_0x5ea4c0(0x10a),'hidden':!![]},{'name':a185_0x5ea4c0(0xd8),'meowKey':a185_0x5ea4c0(0xd8),'type':a185_0x5ea4c0(0xe4),'description':'Watch\x20mode','hidden':!![]},{'name':a185_0x5ea4c0(0xdd),'meowKey':a185_0x5ea4c0(0xdd),'type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0xc8),'hidden':!![]},{'name':'params','meowKey':a185_0x5ea4c0(0x119),'type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0x101),'hidden':!![]},{'name':'datasetcode','meowKey':'datasetcode','type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0xb6),'hidden':!![]},{'name':a185_0x5ea4c0(0x12c),'meowKey':a185_0x5ea4c0(0x12c),'type':a185_0x5ea4c0(0xe4),'description':'Apply\x20to\x20all','hidden':!![]},{'name':a185_0x5ea4c0(0x114),'meowKey':a185_0x5ea4c0(0x100),'type':'boolean','description':a185_0x5ea4c0(0x11a),'hidden':!![]},{'name':'id','meowKey':'id','type':a185_0x5ea4c0(0xe9),'description':'Record\x20ID','hidden':!![]},{'name':a185_0x5ea4c0(0x122),'meowKey':a185_0x5ea4c0(0x122),'type':'string','description':a185_0x5ea4c0(0xe7),'hidden':!![]},{'name':a185_0x5ea4c0(0xf6),'meowKey':a185_0x5ea4c0(0xf6),'type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0xb7),'hidden':!![]},{'name':a185_0x5ea4c0(0x11b),'meowKey':'sqlcode','type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0xc7),'hidden':!![]},{'name':'sql-name','meowKey':a185_0x5ea4c0(0xc5),'type':a185_0x5ea4c0(0xe9),'description':'SQL\x20name','hidden':!![]},{'name':a185_0x5ea4c0(0x10d),'meowKey':a185_0x5ea4c0(0x10d),'type':'string','description':a185_0x5ea4c0(0xf2),'hidden':!![]},{'name':'db-id','meowKey':a185_0x5ea4c0(0xcd),'type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0x12a),'hidden':!![]},{'name':a185_0x5ea4c0(0xce),'meowKey':'dbid','type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0x12a),'hidden':!![]},{'name':a185_0x5ea4c0(0x102),'meowKey':a185_0x5ea4c0(0x102),'type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0x11d),'hidden':!![]},{'name':a185_0x5ea4c0(0x128),'meowKey':a185_0x5ea4c0(0xe2),'type':a185_0x5ea4c0(0xe9),'description':'Description\x20file','hidden':!![]},{'name':a185_0x5ea4c0(0xd5),'meowKey':'page','type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0x10e),'hidden':!![]},{'name':a185_0x5ea4c0(0x129),'meowKey':'pagesize','type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0xc2),'hidden':!![]},{'name':a185_0x5ea4c0(0x12b),'meowKey':a185_0x5ea4c0(0x12b),'type':'string','description':a185_0x5ea4c0(0xed),'hidden':!![]},{'name':a185_0x5ea4c0(0x123),'meowKey':a185_0x5ea4c0(0x123),'type':a185_0x5ea4c0(0xe9),'description':'Code\x20filter','hidden':!![]},{'name':a185_0x5ea4c0(0x103),'meowKey':a185_0x5ea4c0(0x103),'type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0x104),'hidden':!![]},{'name':a185_0x5ea4c0(0x112),'meowKey':a185_0x5ea4c0(0x112),'type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0x126),'hidden':!![]},{'name':a185_0x5ea4c0(0xd9),'meowKey':a185_0x5ea4c0(0xd9),'type':'string','description':a185_0x5ea4c0(0x10b),'hidden':!![]},{'name':a185_0x5ea4c0(0xd7),'meowKey':a185_0x5ea4c0(0xd7),'type':a185_0x5ea4c0(0xe9),'description':'Target\x20path','hidden':!![]},{'name':'skip-imports','meowKey':'skipImports','type':a185_0x5ea4c0(0xe4),'description':'Skip\x20import\x20generation','hidden':!![]},{'name':a185_0x5ea4c0(0x110),'meowKey':a185_0x5ea4c0(0x110),'type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0xb8),'hidden':!![]},{'name':a185_0x5ea4c0(0xf7),'meowKey':a185_0x5ea4c0(0xf7),'type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0xe3),'hidden':!![]},{'name':a185_0x5ea4c0(0xcb),'meowKey':a185_0x5ea4c0(0xcb),'type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0xd1),'hidden':!![]},{'name':'stdin','meowKey':a185_0x5ea4c0(0xc9),'type':'boolean','description':a185_0x5ea4c0(0xb2),'hidden':!![]},{'name':a185_0x5ea4c0(0xf4),'meowKey':'fromEnv','type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0x11c),'hidden':!![]},{'name':a185_0x5ea4c0(0x118),'meowKey':a185_0x5ea4c0(0x118),'type':'boolean','description':a185_0x5ea4c0(0xb1),'hidden':!![]},{'name':a185_0x5ea4c0(0xdc),'meowKey':'force','type':a185_0x5ea4c0(0xe4),'description':'Force\x20overwrite','hidden':!![]},{'name':a185_0x5ea4c0(0x124),'meowKey':a185_0x5ea4c0(0x124),'type':a185_0x5ea4c0(0xe4),'description':'Confirm\x20destructive\x20action','hidden':!![]},{'name':a185_0x5ea4c0(0xc4),'meowKey':a185_0x5ea4c0(0xc4),'type':a185_0x5ea4c0(0xe4),'description':'Use\x20remote','hidden':!![]},{'name':a185_0x5ea4c0(0xe6),'meowKey':a185_0x5ea4c0(0xe6),'type':a185_0x5ea4c0(0xe4),'description':a185_0x5ea4c0(0xfe),'hidden':!![]},{'name':a185_0x5ea4c0(0xd0),'meowKey':a185_0x5ea4c0(0xc1),'type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0xef),'hidden':!![]},{'name':a185_0x5ea4c0(0xd3),'meowKey':a185_0x5ea4c0(0xd3),'type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0x105),'hidden':!![]},{'name':'parent-id','meowKey':a185_0x5ea4c0(0xfd),'type':a185_0x5ea4c0(0xe9),'description':'Parent\x20menu\x20id','hidden':!![]},{'name':a185_0x5ea4c0(0xba),'meowKey':a185_0x5ea4c0(0xba),'type':'string','description':a185_0x5ea4c0(0x12d),'hidden':!![]},{'name':a185_0x5ea4c0(0x106),'meowKey':a185_0x5ea4c0(0xda),'type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0xf5),'hidden':!![]},{'name':a185_0x5ea4c0(0xfb),'meowKey':'expectPath','type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0xcc),'hidden':!![]},{'name':a185_0x5ea4c0(0xd6),'meowKey':a185_0x5ea4c0(0xbf),'type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0x10c),'hidden':!![]},{'name':a185_0x5ea4c0(0xcf),'meowKey':'menuIds','type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0xd2),'hidden':!![]},{'name':a185_0x5ea4c0(0xbe),'meowKey':'taskId','type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0xee),'hidden':!![]},{'name':a185_0x5ea4c0(0xbb),'meowKey':a185_0x5ea4c0(0xbc),'type':'string','description':a185_0x5ea4c0(0x10b),'hidden':!![]},{'name':a185_0x5ea4c0(0x111),'meowKey':a185_0x5ea4c0(0xf0),'type':a185_0x5ea4c0(0xe9),'description':a185_0x5ea4c0(0xbd),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a185_0x5ea4c0(0xe5),a185_0x5ea4c0(0xec),a185_0x5ea4c0(0x10f),a185_0x5ea4c0(0xdf),'jq',a185_0x5ea4c0(0xb4),a185_0x5ea4c0(0xf9),'non-interactive','ci']);export function buildMeowFlags(){const _0x30c333=a185_0x5ea4c0;return Object['fromEntries'](GLOBAL_FLAGS[_0x30c333(0x117)](_0x10f750=>[_0x10f750[_0x30c333(0xb5)],{'type':_0x10f750['type']}]));}function a185_0x11fa(){const _0x2e0a6a=['File\x20path','Config\x20key','<name>','sort','operation-type','operationType','Function\x20node','task-id','expectedChildrenCount','help','expectedCount','Page\x20size','name','remote','sqlName','3VIEESz','SQL\x20code','Output\x20path','stdin','1217856PQAlkg','tags','Expected\x20current\x20menu\x20path','dbId','dbid','menu-ids','expected-count','Tags','Comma-separated\x20menu\x20IDs','label','Title','page','expected-children-count','target','watch','operation','expectParentId','rabetbase','force','output','1034sGRhSz','format','json\x20|\x20pretty\x20|\x20compress','2168262YYuQMS','descriptionFile','Config\x20value','boolean','appcode','verbose','Type\x20filter','nonInteractive','string','project','@lovrabet/rabetbase-cli','app','Keyword\x20filter','Asynchronous\x20task\x20ID','Expected\x20affected\x20count','functionNode','<expr>','SQL\x20name','Preview\x20operation\x20without\x20executing','from-env','Expected\x20current\x20parent\x20menu\x20id','file','value','8QDsgxj','yes','Output\x20format','expect-path','681shVarq','parentId','Verbose\x20output','title','enableBffSave','JSON\x20params','description','sql','SQL\x20string','Menu\x20label','expect-parent-id','1792662trNCJl','11840gAQXrR','Use\x20global\x20config\x20scope','Clear','Operation\x20type','Expected\x20current\x20child\x20count','sqlname','Page\x20number','env','key','function-node','schemas','global','enable-bff-save','499845zzeXxw','Name','map','reveal','params','Enable\x20BFF\x20save','sqlcode','Read\x20value\x20from\x20environment\x20variable','Description','7ejOMHY','Show\x20help','Environment','19026iwvcSG','type','code','confirm','non-interactive','Schemas','clear','description-file','pagesize','DB\x20ID','keyword','all','Menu\x20sort\x20value','Reveal\x20sensitive\x20value','Read\x20value\x20from\x20stdin','2708ucLhwS','dry-run','meowKey','Dataset\x20code'];a185_0x11fa=function(){return _0x2e0a6a;};return a185_0x11fa();}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a186_0x1b6b(_0x1356be,_0x25b2a8){_0x1356be=_0x1356be-0x16d;const _0xca234=a186_0xca23();let _0x1b6ba9=_0xca234[_0x1356be];return _0x1b6ba9;}const a186_0x50854c=a186_0x1b6b;(function(_0x5004fa,_0xef1d61){const _0x3f6102=a186_0x1b6b,_0xc1b193=_0x5004fa();while(!![]){try{const _0x145b84=parseInt(_0x3f6102(0x16e))/0x1*(-parseInt(_0x3f6102(0x171))/0x2)+parseInt(_0x3f6102(0x175))/0x3+-parseInt(_0x3f6102(0x16f))/0x4+-parseInt(_0x3f6102(0x172))/0x5+-parseInt(_0x3f6102(0x176))/0x6+-parseInt(_0x3f6102(0x170))/0x7+parseInt(_0x3f6102(0x177))/0x8;if(_0x145b84===_0xef1d61)break;else _0xc1b193['push'](_0xc1b193['shift']());}catch(_0x181012){_0xc1b193['push'](_0xc1b193['shift']());}}}(a186_0xca23,0x67d93));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':'production','format':a186_0x50854c(0x174),'locale':a186_0x50854c(0x173),'riskLevel':a186_0x50854c(0x16d),'apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a186_0x50854c(0x174);function a186_0xca23(){const _0x2e23f4=['high-risk-write','173aBTsSD','1246392AlrBts','5350394BKPYkh','9482thHBZG','1280225IfgkoL','en-US','compress','2370432Prgkxv','3063924qsGQbY','18384408KcesYv'];a186_0xca23=function(){return _0x2e23f4;};return a186_0xca23();}
|