@lovrabet/rabetbase-cli 2.3.14 → 2.3.15-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -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/restore.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 a176_0x2db0bc=a176_0x26e1;(function(_0x908a49,_0x960252){const _0x2b9eac=a176_0x26e1,_0x4bc2d0=_0x908a49();while(!![]){try{const _0x259ca5=-parseInt(_0x2b9eac(0xe5))/0x1+parseInt(_0x2b9eac(0xf9))/0x2*(-parseInt(_0x2b9eac(0xf6))/0x3)+-parseInt(_0x2b9eac(0xf4))/0x4*(-parseInt(_0x2b9eac(0x102))/0x5)+parseInt(_0x2b9eac(0xed))/0x6*(-parseInt(_0x2b9eac(0xe3))/0x7)+-parseInt(_0x2b9eac(0x10e))/0x8+parseInt(_0x2b9eac(0xf1))/0x9*(parseInt(_0x2b9eac(0x112))/0xa)+-parseInt(_0x2b9eac(0xeb))/0xb*(-parseInt(_0x2b9eac(0xff))/0xc);if(_0x259ca5===_0x960252)break;else _0x4bc2d0['push'](_0x4bc2d0['shift']());}catch(_0x1d28ae){_0x4bc2d0['push'](_0x4bc2d0['shift']());}}}(a176_0x4bb8,0x50a00));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{fileExists}from'../../core/bff/file-system.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';function a176_0x26e1(_0x2d2276,_0x1756b9){_0x2d2276=_0x2d2276-0xdd;const _0x4bb80b=a176_0x4bb8();let _0x26e1be=_0x4bb80b[_0x2d2276];return _0x26e1be;}import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x5b096d,_0x3400a0,_0x3755d8){const _0x1352a1=a176_0x26e1,_0x20bb0a=await scanLocalSqlQueries(_0x5b096d),_0x4d5310=new Map();for(const _0x50b693 of _0x20bb0a){if(_0x3755d8&&_0x50b693[_0x1352a1(0xee)]!==_0x3755d8)continue;const _0xd799ee=_0x4d5310[_0x1352a1(0xde)](_0x50b693[_0x1352a1(0xee)])??[];_0xd799ee['push'](_0x50b693),_0x4d5310[_0x1352a1(0x11c)](_0x50b693[_0x1352a1(0xee)],_0xd799ee);}if(_0x3755d8&&!_0x4d5310[_0x1352a1(0xea)](_0x3755d8))throw CliErrors[_0x1352a1(0x114)](_0x1352a1(0x119)+_0x3755d8);const _0x4086ce=[];for(const [_0x14c973,_0x2b2981]of _0x4d5310[_0x1352a1(0x10d)]()){if(_0x2b2981[_0x1352a1(0x107)]===0x1){_0x4086ce[_0x1352a1(0x106)](_0x2b2981[0x0]);continue;}const _0x30d222=_0x3400a0['sqls'][_0x14c973],_0x5b3230=_0x30d222?.[_0x1352a1(0xf8)],_0x45d184=_0x5b3230?_0x2b2981[_0x1352a1(0xdd)](_0x3bad10=>_0x3bad10[_0x1352a1(0xfe)]!==_0x5b3230):_0x2b2981;if(_0x30d222&&_0x45d184[_0x1352a1(0x107)]===0x1){_0x4086ce['push'](_0x45d184[0x0]);continue;}throw CliErrors[_0x1352a1(0x114)]('Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20'+_0x14c973+_0x1352a1(0x11e));}return _0x4086ce;}export const sqlPush={'service':'sql','command':a176_0x2db0bc(0x106),'description':a176_0x2db0bc(0xef),'risk':a176_0x2db0bc(0x120),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a176_0x2db0bc(0x11a),'type':a176_0x2db0bc(0x100),'description':a176_0x2db0bc(0x108)}],async 'dryRun'(_0x46374d){const _0x382eb4=a176_0x2db0bc,_0x160056=loadSqlProjectConfig(_0x46374d[_0x382eb4(0xf7)]),_0xc98bf=await readSqlLockFile(_0x160056['lockFilePath']),{appLock:_0x5ef940}=ensureSqlLockScope(_0xc98bf??createEmptySqlLock(),_0x46374d[_0x382eb4(0xf7)],_0x160056['sqlRoot'],'push'),_0x33489f=await getTargetSqlQueries(_0x160056,_0x5ef940,_0x46374d[_0x382eb4(0xe9)](_0x382eb4(0x101))||undefined),_0x4bd9b9=[];for(const _0x25673b of _0x33489f){const _0x5eb5f2=await computeSqlFileHash(_0x25673b[_0x382eb4(0x109)]),_0x11644f=_0x5ef940['sqls'][_0x25673b['sqlCode']],_0x3385a1=!!_0x11644f&&(_0x11644f[_0x382eb4(0xf8)]!==_0x25673b[_0x382eb4(0xfe)]||!!_0x25673b[_0x382eb4(0x117)]&&_0x11644f[_0x382eb4(0x117)]!==_0x25673b['sqlName']);if(!_0x46374d['bool'](_0x382eb4(0x11a))&&_0x11644f&&_0x11644f[_0x382eb4(0x10a)]===_0x5eb5f2&&!_0x3385a1)continue;_0x4bd9b9[_0x382eb4(0x106)](_0x25673b[_0x382eb4(0xee)]);}return{'method':'POST','url':_0x382eb4(0xe7),'body':{'sqlCodes':_0x4bd9b9,'appCode':_0x46374d[_0x382eb4(0xf7)]},'description':'Would\x20push\x20'+_0x4bd9b9['length']+_0x382eb4(0x10c)};},async 'execute'(_0x1d747d){const _0x2ad211=a176_0x2db0bc,_0x1d23f6=loadSqlProjectConfig(_0x1d747d[_0x2ad211(0xf7)]),_0x4b09d9=await readSqlLockFile(_0x1d23f6['lockFilePath']),{lockData:_0x4ee694,appLock:_0x607f1a}=ensureSqlLockScope(_0x4b09d9??createEmptySqlLock(),_0x1d747d[_0x2ad211(0xf7)],_0x1d23f6[_0x2ad211(0xe1)],_0x2ad211(0x106)),_0x18b6b4=await getTargetSqlQueries(_0x1d23f6,_0x607f1a,_0x1d747d[_0x2ad211(0xe9)](_0x2ad211(0x101))||undefined);if(_0x18b6b4[_0x2ad211(0x107)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x2ad211(0x11f)};const _0x5753ac=[],_0x5722d8=[],_0x5be53c=[];for(const _0x1e9fce of _0x18b6b4){const _0x3a8be2=_0x607f1a['sqls'][_0x1e9fce[_0x2ad211(0xee)]];if(!_0x3a8be2){_0x5be53c[_0x2ad211(0x106)]({'sqlCode':_0x1e9fce[_0x2ad211(0xee)],'error':'local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first'});continue;}try{const _0x326fa1=await computeSqlFileHash(_0x1e9fce[_0x2ad211(0x109)]),_0x3227f6=_0x3a8be2['path']!==_0x1e9fce[_0x2ad211(0xfe)]||!!_0x1e9fce['sqlName']&&_0x3a8be2[_0x2ad211(0x117)]!==_0x1e9fce[_0x2ad211(0x117)];if(!_0x1d747d[_0x2ad211(0xdf)](_0x2ad211(0x11a))&&_0x3a8be2[_0x2ad211(0x10a)]===_0x326fa1&&!_0x3227f6){_0x5722d8[_0x2ad211(0x106)]({'sqlCode':_0x1e9fce['sqlCode'],'reason':_0x2ad211(0x118)});continue;}if(_0x3a8be2[_0x2ad211(0x111)]==null){_0x5be53c['push']({'sqlCode':_0x1e9fce[_0x2ad211(0xee)],'error':'missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first'});continue;}const _0x961c19=await readFile(_0x1e9fce[_0x2ad211(0x109)],_0x2ad211(0x103)),_0x2345fa=stripLocalSqlMetadata(_0x961c19,_0x1e9fce[_0x2ad211(0x115)]),_0x54d528=_0x1e9fce['sqlName']||_0x3a8be2[_0x2ad211(0x117)],_0x4e198a=await resolveTargetDbBinding(_0x1d747d[_0x2ad211(0xf7)],_0x1e9fce,_0x3a8be2),_0x39789a=await updateSqlQuery({'id':_0x3a8be2['remoteId'],'appCode':_0x1d747d[_0x2ad211(0xf7)],'sqlCode':_0x1e9fce[_0x2ad211(0xee)],'sqlName':_0x54d528,'dbId':_0x4e198a[_0x2ad211(0xf3)],'version':_0x3a8be2[_0x2ad211(0x111)],'sqlContent':_0x2345fa,'sqlConfig':_0x3a8be2[_0x2ad211(0xfd)]??undefined}),_0x3437b7=_0x39789a[_0x2ad211(0xf3)]?await getDbName(_0x1d747d[_0x2ad211(0xf7)],Number(_0x39789a[_0x2ad211(0xf3)]))[_0x2ad211(0xf0)](()=>_0x4e198a[_0x2ad211(0xfb)]):_0x4e198a[_0x2ad211(0xfb)];_0x607f1a[_0x2ad211(0x10b)][_0x1e9fce['sqlCode']]={...buildSqlLockEntry(_0x39789a,_0x2345fa,_0x326fa1,{'dbName':_0x3437b7}),'path':_0x1e9fce[_0x2ad211(0xfe)],'mode':_0x3a8be2[_0x2ad211(0x115)]},await archivePreviousSqlFileIfNeeded(_0x1d23f6,_0x3a8be2[_0x2ad211(0xf8)],_0x1e9fce['relativePath']),_0x5753ac['push']({'sqlCode':_0x1e9fce['sqlCode'],'remoteId':_0x3a8be2[_0x2ad211(0x116)]});}catch(_0x6e3c4f){_0x5be53c[_0x2ad211(0x106)]({'sqlCode':_0x1e9fce[_0x2ad211(0xee)],'error':_0x6e3c4f instanceof Error?_0x6e3c4f[_0x2ad211(0xe6)]:String(_0x6e3c4f)});}}return _0x607f1a[_0x2ad211(0x11b)]=new Date()['toISOString'](),await writeSqlLockFile(_0x1d23f6[_0x2ad211(0x105)],_0x4ee694),{'ok':_0x5be53c[_0x2ad211(0x107)]===0x0,'data':{'pushed':_0x5753ac,'skipped':_0x5722d8,'failed':_0x5be53c},'message':_0x2ad211(0xf2)+_0x5753ac[_0x2ad211(0x107)]+'\x20pushed,\x20'+_0x5722d8[_0x2ad211(0x107)]+_0x2ad211(0x113)+_0x5be53c[_0x2ad211(0x107)]+_0x2ad211(0xf5)};}};function a176_0x4bb8(){const _0x210b50=['path','2282BKPxss','join','dbName','projectRoot','sqlConfig','relativePath','51252iYXigS','boolean','sqlcode','1135tLQANu','utf8','isFinite','lockFilePath','push','length','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','filePath','hash','sqls','\x20SQL\x20file(s)','entries','2097920DXfphM','exec','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','version','911560NDUSjC','\x20skipped,\x20','validation','mode','remoteId','sqlName','unchanged','Local\x20SQL\x20not\x20found:\x20','force','lastSync','set','No\x20database\x20matches\x20local\x20directory\x20\x22','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','No\x20local\x20SQL\x20files\x20found.','high-risk-write','filter','get','bool','replace','sqlRoot','map','7QCUmLQ','trashDir','593252UGrhFQ','message','/smartapi/custom/updateUserCustomSql','sqlRootDir','str','has','2167LSVwEg','Local\x20directory\x20\x22','1530294ILeqds','sqlCode','Push\x20local\x20SQL\x20files\x20to\x20remote','catch','63yllaQU','Push\x20complete:\x20','dbId','8808WzJOKa','\x20failed','1416tBJTYE','appCode'];a176_0x4bb8=function(){return _0x210b50;};return a176_0x4bb8();}async function archivePreviousSqlFileIfNeeded(_0x418873,_0x111e15,_0x3ca672){const _0x56647f=a176_0x2db0bc;if(!_0x111e15||_0x111e15===_0x3ca672)return;const _0xda3c23=join(_0x418873['sqlRootDir'],_0x111e15);if(!await fileExists(_0xda3c23))return;const _0x3c4259=await moveToTrash(_0x418873[_0x56647f(0xfc)],_0x418873[_0x56647f(0xe4)],_0xda3c23);await cleanupEmptyDirectories(dirname(_0xda3c23),_0x418873[_0x56647f(0xe8)]),void _0x3c4259;}async function moveToTrash(_0x46f759,_0x11e721,_0x163843){const _0x4cf627=a176_0x2db0bc,_0x320902=new Date()['toISOString']()[_0x4cf627(0xe0)](/[:.]/g,'-'),_0x1db5d7=relative(_0x46f759,_0x163843),_0x2a8639=join(_0x11e721,_0x320902,_0x1db5d7);return await mkdir(dirname(_0x2a8639),{'recursive':!![]}),await rename(_0x163843,_0x2a8639),_0x2a8639;}async function cleanupEmptyDirectories(_0x45f551,_0x51e220){const _0x122b37=a176_0x2db0bc;let _0x125083=resolve(_0x45f551);const _0x2648c2=resolve(_0x51e220);while(_0x125083['startsWith'](''+_0x2648c2+sep)||_0x125083===_0x2648c2){if(_0x125083===_0x2648c2)return;try{const _0xcaef0f=await readdir(_0x125083);if(_0xcaef0f[_0x122b37(0x107)]>0x0)return;await rmdir(_0x125083);}catch{return;}_0x125083=dirname(_0x125083);}}async function resolveTargetDbBinding(_0x68ae57,_0x14c8a1,_0x4f0f90){const _0x45ab89=a176_0x2db0bc,_0x500c80=_0x14c8a1['dbDirectory'];if(!_0x500c80)return{'dbId':_0x4f0f90[_0x45ab89(0xf3)],'dbName':_0x4f0f90[_0x45ab89(0xfb)]};const _0x2dcd71=buildDbDirectoryName(_0x4f0f90[_0x45ab89(0xfb)],_0x4f0f90[_0x45ab89(0xf3)]);if(_0x500c80===_0x2dcd71)return{'dbId':_0x4f0f90[_0x45ab89(0xf3)],'dbName':_0x4f0f90[_0x45ab89(0xfb)]};const _0x2e9d05=parseExplicitDbDirectory(_0x500c80);if(_0x2e9d05!=null)return{'dbId':_0x2e9d05,'dbName':await getDbName(_0x68ae57,_0x2e9d05)[_0x45ab89(0xf0)](()=>undefined)};const _0x268b0b=await listDatabases(_0x68ae57),_0x5b1cb0=_0x268b0b[_0x45ab89(0xdd)](_0x31f2c5=>buildDbDirectoryName(_0x31f2c5[_0x45ab89(0xfb)],_0x31f2c5[_0x45ab89(0xf3)])===_0x500c80);if(_0x5b1cb0[_0x45ab89(0x107)]===0x1)return{'dbId':_0x5b1cb0[0x0][_0x45ab89(0xf3)],'dbName':_0x5b1cb0[0x0][_0x45ab89(0xfb)]};if(_0x5b1cb0[_0x45ab89(0x107)]===0x0)throw CliErrors[_0x45ab89(0x114)](_0x45ab89(0x11d)+_0x500c80+'\x22\x20for\x20sqlCode\x20'+_0x14c8a1[_0x45ab89(0xee)]+'.');const _0x1b5ce9=_0x5b1cb0[_0x45ab89(0xe2)](_0x3d13f5=>_0x3d13f5[_0x45ab89(0xfb)]+'\x20('+_0x3d13f5[_0x45ab89(0xf3)]+')')[_0x45ab89(0xfa)](',\x20');throw CliErrors[_0x45ab89(0x114)](_0x45ab89(0xec)+_0x500c80+_0x45ab89(0x110)+_0x14c8a1['sqlCode']+':\x20'+_0x1b5ce9);}function parseExplicitDbDirectory(_0x593b1d){const _0x183de9=a176_0x2db0bc,_0x757e10=/^db-(\d+)$/[_0x183de9(0x10f)](_0x593b1d);if(!_0x757e10)return null;const _0x135d5b=Number(_0x757e10[0x1]);return Number[_0x183de9(0x104)](_0x135d5b)&&_0x135d5b>0x0?_0x135d5b:null;}
|
|
1
|
+
const a176_0x34404f=a176_0x4f09;(function(_0x4d41f7,_0x1cc348){const _0x532d39=a176_0x4f09,_0x10dca0=_0x4d41f7();while(!![]){try{const _0x4acc7a=parseInt(_0x532d39(0x14f))/0x1+-parseInt(_0x532d39(0x164))/0x2*(parseInt(_0x532d39(0x157))/0x3)+-parseInt(_0x532d39(0x148))/0x4*(-parseInt(_0x532d39(0x147))/0x5)+parseInt(_0x532d39(0x183))/0x6+parseInt(_0x532d39(0x149))/0x7+parseInt(_0x532d39(0x175))/0x8*(-parseInt(_0x532d39(0x185))/0x9)+-parseInt(_0x532d39(0x182))/0xa*(parseInt(_0x532d39(0x16a))/0xb);if(_0x4acc7a===_0x1cc348)break;else _0x10dca0['push'](_0x10dca0['shift']());}catch(_0x217247){_0x10dca0['push'](_0x10dca0['shift']());}}}(a176_0x3fd7,0x3e2a6));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';function a176_0x4f09(_0x4e020c,_0x1e7c02){_0x4e020c=_0x4e020c-0x144;const _0x3fd78d=a176_0x3fd7();let _0x4f097e=_0x3fd78d[_0x4e020c];return _0x4f097e;}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';function a176_0x3fd7(){const _0x49ee4d=['61587TPOQpr','sqlRoot','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','remoteId','85YIonLl','11932znpadW','636692BnHNZa','isFinite','lockFilePath','No\x20local\x20SQL\x20files\x20found.','filePath','sqlcode','246854jqImYj','mode','trashDir','dbId','\x20SQL\x20file(s)','Would\x20push\x20','push','relativePath','6VRbtUh','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','sqls','boolean','bool','exec','validation','Push\x20complete:\x20','force','set','path','sql','unchanged','143508rTYZWE','appCode','dbName','str','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','Push\x20local\x20SQL\x20files\x20to\x20remote','361680PHkJJT','hash','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','version','sqlConfig','utf8','has','join','sqlRootDir','sqlName','startsWith','496LNxTpQ','lastSync','filter','entries','/smartapi/custom/updateUserCustomSql','Local\x20directory\x20\x22','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','catch','message','sqlCode','replace','length','map','10lzafWt','2800578whiLvG','\x20skipped,\x20'];a176_0x3fd7=function(){return _0x49ee4d;};return a176_0x3fd7();}import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x4a36df,_0x34f4aa,_0x48f674){const _0x49b234=a176_0x4f09,_0x37af29=await scanLocalSqlQueries(_0x4a36df),_0x46bac6=new Map();for(const _0x51a043 of _0x37af29){if(_0x48f674&&_0x51a043['sqlCode']!==_0x48f674)continue;const _0x4fa177=_0x46bac6['get'](_0x51a043['sqlCode'])??[];_0x4fa177[_0x49b234(0x155)](_0x51a043),_0x46bac6[_0x49b234(0x160)](_0x51a043['sqlCode'],_0x4fa177);}if(_0x48f674&&!_0x46bac6[_0x49b234(0x170)](_0x48f674))throw CliErrors[_0x49b234(0x15d)]('Local\x20SQL\x20not\x20found:\x20'+_0x48f674);const _0x29b96f=[];for(const [_0x46c1d6,_0x8827af]of _0x46bac6[_0x49b234(0x178)]()){if(_0x8827af[_0x49b234(0x180)]===0x1){_0x29b96f['push'](_0x8827af[0x0]);continue;}const _0x1faa4a=_0x34f4aa[_0x49b234(0x159)][_0x46c1d6],_0x7ab372=_0x1faa4a?.[_0x49b234(0x161)],_0x18e426=_0x7ab372?_0x8827af[_0x49b234(0x177)](_0x403ac4=>_0x403ac4[_0x49b234(0x156)]!==_0x7ab372):_0x8827af;if(_0x1faa4a&&_0x18e426[_0x49b234(0x180)]===0x1){_0x29b96f[_0x49b234(0x155)](_0x18e426[0x0]);continue;}throw CliErrors[_0x49b234(0x15d)](_0x49b234(0x168)+_0x46c1d6+'.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.');}return _0x29b96f;}export const sqlPush={'service':a176_0x34404f(0x162),'command':a176_0x34404f(0x155),'description':a176_0x34404f(0x169),'risk':'high-risk-write','flags':[SQLCODE_FLAG_OPTIONAL,{'name':a176_0x34404f(0x15f),'type':a176_0x34404f(0x15a),'description':a176_0x34404f(0x158)}],async 'dryRun'(_0x5842b0){const _0x3cde6d=a176_0x34404f,_0x9f56a3=loadSqlProjectConfig(_0x5842b0[_0x3cde6d(0x165)]),_0x3b4283=await readSqlLockFile(_0x9f56a3['lockFilePath']),{appLock:_0x146c8a}=ensureSqlLockScope(_0x3b4283??createEmptySqlLock(),_0x5842b0['appCode'],_0x9f56a3[_0x3cde6d(0x144)],_0x3cde6d(0x155)),_0x1d6126=await getTargetSqlQueries(_0x9f56a3,_0x146c8a,_0x5842b0[_0x3cde6d(0x167)]('sqlcode')||undefined),_0x596054=[];for(const _0xb76020 of _0x1d6126){const _0x562513=await computeSqlFileHash(_0xb76020[_0x3cde6d(0x14d)]),_0x51e937=_0x146c8a[_0x3cde6d(0x159)][_0xb76020[_0x3cde6d(0x17e)]],_0x1f81fd=!!_0x51e937&&(_0x51e937[_0x3cde6d(0x161)]!==_0xb76020[_0x3cde6d(0x156)]||!!_0xb76020[_0x3cde6d(0x173)]&&_0x51e937[_0x3cde6d(0x173)]!==_0xb76020[_0x3cde6d(0x173)]);if(!_0x5842b0[_0x3cde6d(0x15b)](_0x3cde6d(0x15f))&&_0x51e937&&_0x51e937['hash']===_0x562513&&!_0x1f81fd)continue;_0x596054['push'](_0xb76020[_0x3cde6d(0x17e)]);}return{'method':'POST','url':_0x3cde6d(0x179),'body':{'sqlCodes':_0x596054,'appCode':_0x5842b0[_0x3cde6d(0x165)]},'description':_0x3cde6d(0x154)+_0x596054['length']+_0x3cde6d(0x153)};},async 'execute'(_0x5d9c72){const _0x3fcf13=a176_0x34404f,_0xda5cc8=loadSqlProjectConfig(_0x5d9c72[_0x3fcf13(0x165)]),_0x472b71=await readSqlLockFile(_0xda5cc8['lockFilePath']),{lockData:_0x59f037,appLock:_0x10ced8}=ensureSqlLockScope(_0x472b71??createEmptySqlLock(),_0x5d9c72[_0x3fcf13(0x165)],_0xda5cc8['sqlRoot'],_0x3fcf13(0x155)),_0x15edba=await getTargetSqlQueries(_0xda5cc8,_0x10ced8,_0x5d9c72[_0x3fcf13(0x167)](_0x3fcf13(0x14e))||undefined);if(_0x15edba[_0x3fcf13(0x180)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x3fcf13(0x14c)};const _0x54eb35=[],_0x1738be=[],_0x185005=[];for(const _0x496e3c of _0x15edba){const _0x4911fb=_0x10ced8[_0x3fcf13(0x159)][_0x496e3c[_0x3fcf13(0x17e)]];if(!_0x4911fb){_0x185005[_0x3fcf13(0x155)]({'sqlCode':_0x496e3c[_0x3fcf13(0x17e)],'error':_0x3fcf13(0x145)});continue;}try{const _0x536e4b=await computeSqlFileHash(_0x496e3c[_0x3fcf13(0x14d)]),_0x337054=_0x4911fb['path']!==_0x496e3c[_0x3fcf13(0x156)]||!!_0x496e3c[_0x3fcf13(0x173)]&&_0x4911fb[_0x3fcf13(0x173)]!==_0x496e3c[_0x3fcf13(0x173)];if(!_0x5d9c72[_0x3fcf13(0x15b)](_0x3fcf13(0x15f))&&_0x4911fb[_0x3fcf13(0x16b)]===_0x536e4b&&!_0x337054){_0x1738be[_0x3fcf13(0x155)]({'sqlCode':_0x496e3c[_0x3fcf13(0x17e)],'reason':_0x3fcf13(0x163)});continue;}if(_0x4911fb['version']==null){_0x185005[_0x3fcf13(0x155)]({'sqlCode':_0x496e3c['sqlCode'],'error':_0x3fcf13(0x16c)});continue;}const _0x23b352=await readFile(_0x496e3c[_0x3fcf13(0x14d)],_0x3fcf13(0x16f)),_0x47dcac=stripLocalSqlMetadata(_0x23b352,_0x496e3c['mode']),_0x4dc4e3=_0x496e3c['sqlName']||_0x4911fb[_0x3fcf13(0x173)],_0x4e2b50=await resolveTargetDbBinding(_0x5d9c72[_0x3fcf13(0x165)],_0x496e3c,_0x4911fb),_0x2402a8=await updateSqlQuery({'id':_0x4911fb[_0x3fcf13(0x146)],'appCode':_0x5d9c72[_0x3fcf13(0x165)],'sqlCode':_0x496e3c['sqlCode'],'sqlName':_0x4dc4e3,'dbId':_0x4e2b50[_0x3fcf13(0x152)],'version':_0x4911fb[_0x3fcf13(0x16d)],'sqlContent':_0x47dcac,'sqlConfig':_0x4911fb[_0x3fcf13(0x16e)]??undefined}),_0x373984=_0x2402a8[_0x3fcf13(0x152)]?await getDbName(_0x5d9c72[_0x3fcf13(0x165)],Number(_0x2402a8[_0x3fcf13(0x152)]))['catch'](()=>_0x4e2b50[_0x3fcf13(0x166)]):_0x4e2b50['dbName'];_0x10ced8[_0x3fcf13(0x159)][_0x496e3c[_0x3fcf13(0x17e)]]={...buildSqlLockEntry(_0x2402a8,_0x47dcac,_0x536e4b,{'dbName':_0x373984}),'path':_0x496e3c[_0x3fcf13(0x156)],'mode':_0x4911fb[_0x3fcf13(0x150)]},await archivePreviousSqlFileIfNeeded(_0xda5cc8,_0x4911fb['path'],_0x496e3c['relativePath']),_0x54eb35[_0x3fcf13(0x155)]({'sqlCode':_0x496e3c['sqlCode'],'remoteId':_0x4911fb[_0x3fcf13(0x146)]});}catch(_0x1fbc7c){_0x185005['push']({'sqlCode':_0x496e3c[_0x3fcf13(0x17e)],'error':_0x1fbc7c instanceof Error?_0x1fbc7c[_0x3fcf13(0x17d)]:String(_0x1fbc7c)});}}return _0x10ced8[_0x3fcf13(0x176)]=new Date()['toISOString'](),await writeSqlLockFile(_0xda5cc8[_0x3fcf13(0x14b)],_0x59f037),{'ok':_0x185005[_0x3fcf13(0x180)]===0x0,'data':{'pushed':_0x54eb35,'skipped':_0x1738be,'failed':_0x185005},'message':_0x3fcf13(0x15e)+_0x54eb35[_0x3fcf13(0x180)]+'\x20pushed,\x20'+_0x1738be[_0x3fcf13(0x180)]+_0x3fcf13(0x184)+_0x185005[_0x3fcf13(0x180)]+'\x20failed'};}};async function archivePreviousSqlFileIfNeeded(_0x379fe2,_0x5f0845,_0x37b4f0){const _0x3eb492=a176_0x34404f;if(!_0x5f0845||_0x5f0845===_0x37b4f0)return;const _0x1ad543=join(_0x379fe2['sqlRootDir'],_0x5f0845);if(!await fileExists(_0x1ad543))return;const _0x27d07c=await moveToTrash(_0x379fe2['projectRoot'],_0x379fe2[_0x3eb492(0x151)],_0x1ad543);await cleanupEmptyDirectories(dirname(_0x1ad543),_0x379fe2[_0x3eb492(0x172)]),void _0x27d07c;}async function moveToTrash(_0x957c49,_0x40bd99,_0x22f87e){const _0x1ecbc3=a176_0x34404f,_0x3fff24=new Date()['toISOString']()[_0x1ecbc3(0x17f)](/[:.]/g,'-'),_0x5b9b24=relative(_0x957c49,_0x22f87e),_0x11dd43=join(_0x40bd99,_0x3fff24,_0x5b9b24);return await mkdir(dirname(_0x11dd43),{'recursive':!![]}),await rename(_0x22f87e,_0x11dd43),_0x11dd43;}async function cleanupEmptyDirectories(_0x125f16,_0x516dbd){const _0x2831e8=a176_0x34404f;let _0x24236a=resolve(_0x125f16);const _0x342a89=resolve(_0x516dbd);while(_0x24236a[_0x2831e8(0x174)](''+_0x342a89+sep)||_0x24236a===_0x342a89){if(_0x24236a===_0x342a89)return;try{const _0xe8c8b5=await readdir(_0x24236a);if(_0xe8c8b5[_0x2831e8(0x180)]>0x0)return;await rmdir(_0x24236a);}catch{return;}_0x24236a=dirname(_0x24236a);}}async function resolveTargetDbBinding(_0xe9a658,_0x1ed5ea,_0x426e2d){const _0x3ce4fa=a176_0x34404f,_0x23af5d=_0x1ed5ea['dbDirectory'];if(!_0x23af5d)return{'dbId':_0x426e2d[_0x3ce4fa(0x152)],'dbName':_0x426e2d[_0x3ce4fa(0x166)]};const _0x4208d9=buildDbDirectoryName(_0x426e2d['dbName'],_0x426e2d['dbId']);if(_0x23af5d===_0x4208d9)return{'dbId':_0x426e2d[_0x3ce4fa(0x152)],'dbName':_0x426e2d[_0x3ce4fa(0x166)]};const _0x1da198=parseExplicitDbDirectory(_0x23af5d);if(_0x1da198!=null)return{'dbId':_0x1da198,'dbName':await getDbName(_0xe9a658,_0x1da198)[_0x3ce4fa(0x17c)](()=>undefined)};const _0x2aea3c=await listDatabases(_0xe9a658),_0x4de116=_0x2aea3c['filter'](_0x540373=>buildDbDirectoryName(_0x540373[_0x3ce4fa(0x166)],_0x540373[_0x3ce4fa(0x152)])===_0x23af5d);if(_0x4de116[_0x3ce4fa(0x180)]===0x1)return{'dbId':_0x4de116[0x0]['dbId'],'dbName':_0x4de116[0x0][_0x3ce4fa(0x166)]};if(_0x4de116[_0x3ce4fa(0x180)]===0x0)throw CliErrors['validation']('No\x20database\x20matches\x20local\x20directory\x20\x22'+_0x23af5d+'\x22\x20for\x20sqlCode\x20'+_0x1ed5ea['sqlCode']+'.');const _0x27d4cc=_0x4de116[_0x3ce4fa(0x181)](_0x33799f=>_0x33799f[_0x3ce4fa(0x166)]+'\x20('+_0x33799f[_0x3ce4fa(0x152)]+')')[_0x3ce4fa(0x171)](',\x20');throw CliErrors['validation'](_0x3ce4fa(0x17a)+_0x23af5d+_0x3ce4fa(0x17b)+_0x1ed5ea[_0x3ce4fa(0x17e)]+':\x20'+_0x27d4cc);}function parseExplicitDbDirectory(_0x210b3d){const _0x50d27b=a176_0x34404f,_0xef8691=/^db-(\d+)$/[_0x50d27b(0x15c)](_0x210b3d);if(!_0xef8691)return null;const _0x943557=Number(_0xef8691[0x1]);return Number[_0x50d27b(0x14a)](_0x943557)&&_0x943557>0x0?_0x943557:null;}
|
package/lib/commands/sql/save.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a177_0x3745(_0x5ef9b5,_0x1bdb66){_0x5ef9b5=_0x5ef9b5-0xcc;const _0x53fb45=a177_0x53fb();let _0x374593=_0x53fb45[_0x5ef9b5];return _0x374593;}const a177_0x1f5209=a177_0x3745;(function(_0x278b09,_0x2710b3){const _0x56a121=a177_0x3745,_0x57c7e7=_0x278b09();while(!![]){try{const _0x1fb6af=-parseInt(_0x56a121(0xd9))/0x1+parseInt(_0x56a121(0xdc))/0x2+parseInt(_0x56a121(0xde))/0x3*(parseInt(_0x56a121(0xd6))/0x4)+parseInt(_0x56a121(0xdd))/0x5*(parseInt(_0x56a121(0xd2))/0x6)+-parseInt(_0x56a121(0xcf))/0x7+-parseInt(_0x56a121(0xe1))/0x8*(-parseInt(_0x56a121(0xda))/0x9)+-parseInt(_0x56a121(0xcd))/0xa*(parseInt(_0x56a121(0xcc))/0xb);if(_0x1fb6af===_0x2710b3)break;else _0x57c7e7['push'](_0x57c7e7['shift']());}catch(_0x1e129c){_0x57c7e7['push'](_0x57c7e7['shift']());}}}(a177_0x53fb,0x97fca));function a177_0x53fb(){const _0x1cbfc3=['string','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','Query\x20description','86788uovGng','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','Path\x20to\x20the\x20SQL\x20file','639513kGtGDB','36fGtNLM','save','341258PvmxWc','5261230GYBnRK','84UJkwfc','file','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`.','836536qkEgBx','write','sqlname','validation','1045lmVASZ','47030fZZPUn','SQL\x20query\x20display\x20name','3778761DRiShv','sql','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','6nMjDTQ'];a177_0x53fb=function(){return _0x1cbfc3;};return a177_0x53fb();}import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=[a177_0x1f5209(0xd1),a177_0x1f5209(0xd7),a177_0x1f5209(0xe0)]['join']('\x0a');export const sqlSave={'service':a177_0x1f5209(0xd0),'command':a177_0x1f5209(0xdb),'description':'Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','risk':a177_0x1f5209(0xe2),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a177_0x1f5209(0xdf),'type':a177_0x1f5209(0xd3),'required':!![],'description':a177_0x1f5209(0xd8)},SQLCODE_FLAG_OPTIONAL,{'name':a177_0x1f5209(0xe3),'type':a177_0x1f5209(0xd3),'description':a177_0x1f5209(0xce)},{'name':'db','type':a177_0x1f5209(0xd3),'description':a177_0x1f5209(0xd4)},{'name':'description','type':a177_0x1f5209(0xd3),'description':a177_0x1f5209(0xd5)}],async 'validate'(){const _0x3eb405=a177_0x1f5209;throw CliErrors[_0x3eb405(0xe4)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x433c38=a177_0x1f5209;throw CliErrors[_0x433c38(0xe4)](SQL_SAVE_DEPRECATED_HINT);}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a178_0x558815=a178_0xaaf8;(function(_0x4ba46,_0x3ddfff){const _0x1342c3=a178_0xaaf8,_0x208f2d=_0x4ba46();while(!![]){try{const _0x49c46a=parseInt(_0x1342c3(0x19f))/0x1*(-parseInt(_0x1342c3(0x195))/0x2)+-parseInt(_0x1342c3(0x192))/0x3*(parseInt(_0x1342c3(0x19d))/0x4)+parseInt(_0x1342c3(0x19a))/0x5*(parseInt(_0x1342c3(0x199))/0x6)+-parseInt(_0x1342c3(0x1b1))/0x7*(-parseInt(_0x1342c3(0x1a7))/0x8)+parseInt(_0x1342c3(0x1ac))/0x9+parseInt(_0x1342c3(0x18c))/0xa+-parseInt(_0x1342c3(0x18b))/0xb;if(_0x49c46a===_0x3ddfff)break;else _0x208f2d['push'](_0x208f2d['shift']());}catch(_0x2b691e){_0x208f2d['push'](_0x208f2d['shift']());}}}(a178_0x3b2b,0x5c813));import{createInterface}from'node:readline';import{join}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';function a178_0xaaf8(_0x92b42b,_0x474207){_0x92b42b=_0x92b42b-0x18b;const _0x3b2b57=a178_0x3b2b();let _0xaaf8be=_0x3b2b57[_0x92b42b];return _0xaaf8be;}export const SQL_LOCAL_REL_DIR=a178_0x558815(0x1ad);export function buildSqlLockEntry(_0x2eb13e,_0x2e3457,_0xc5c5c9,_0x5be135){const _0x5da681=a178_0x558815,_0x4cc6bb=detectSqlMode(_0x2e3457);return{'path':buildSqlRelativePath(_0x2eb13e['sqlCode'],_0x2eb13e[_0x5da681(0x18e)],_0x5be135?.[_0x5da681(0x1af)],_0x4cc6bb,_0x2eb13e['dbId']),'hash':_0xc5c5c9,'remoteId':_0x2eb13e['id'],'version':_0x2eb13e['version'],'dbId':Number(_0x2eb13e[_0x5da681(0x1b2)]),'dbName':_0x5be135?.['dbName'],'sqlName':_0x2eb13e[_0x5da681(0x18e)],'sqlConfig':_0x2eb13e[_0x5da681(0x1b5)]??undefined,'mode':_0x4cc6bb};}export function cloneSqlLockData(_0x43859b){const _0x32d4a3=a178_0x558815;return{'apps':Object['fromEntries'](Object[_0x32d4a3(0x1a1)](_0x43859b[_0x32d4a3(0x1a0)])[_0x32d4a3(0x1a5)](([_0x1d1b73,_0x2db63a])=>[_0x1d1b73,{'sqlRoot':_0x2db63a[_0x32d4a3(0x1a3)],'lastSync':_0x2db63a['lastSync'],'sqls':{..._0x2db63a[_0x32d4a3(0x194)]}}]))};}export function ensureRemoteSqlContent(_0x2ab097){return _0x2ab097['sqlContent']??'';}export function buildLocalSqlFileContent(_0x50c177,_0x1e6ec6,_0x575ac7){const _0x3303fa=a178_0x558815,_0x202834=_0x575ac7?.[_0x3303fa(0x1a6)]??detectSqlMode(_0x1e6ec6),_0x434b6e=stripLocalSqlMetadata(_0x1e6ec6,_0x202834)[_0x3303fa(0x1a4)](),_0x320513=[...buildMetadataHeaderLines({'sqlCode':_0x50c177[_0x3303fa(0x19b)],'sqlName':_0x50c177[_0x3303fa(0x18e)],'dbId':_0x50c177['dbId'],'dbName':_0x575ac7?.['dbName'],'mode':_0x202834,'syncedAt':_0x575ac7?.['syncedAt'],'description':_0x575ac7?.[_0x3303fa(0x1ab)]},_0x202834),'',_0x434b6e],_0x33dadc=_0x320513[_0x3303fa(0x197)]('\x0a');return _0x33dadc['endsWith']('\x0a')?_0x33dadc:_0x33dadc+'\x0a';}function a178_0x3b2b(){const _0x5aa9f9=['mode','56bakaCe','path','\x20-->','stderr','description','6530571fFLrtm','.rabetbase/sql','includes','dbName','close','476994pmetUd','dbId','trimStart','length','sqlConfig','10482846GAqfHB','7133940EGvfqa','replace','sqlName','test','syncedAt','filter','309UweWsZ','yes','sqls','1520DioVkt','question','join','stdin','6TmozzZ','1945145KXCgUd','sqlCode','push','11908AUZvpE','mybatisXml','877gRruDT','apps','entries','toLowerCase','sqlRoot','trim','map'];a178_0x3b2b=function(){return _0x5aa9f9;};return a178_0x3b2b();}export function stripLocalSqlMetadata(_0x9344d0,_0x33af85){const _0x517e58=a178_0x558815,_0x21f01e=_0x9344d0[_0x517e58(0x18d)](/\r\n/g,'\x0a')['split']('\x0a'),_0x530f96=[];let _0x9c0281=0x0;if(_0x33af85===_0x517e58(0x19e))while(_0x9c0281<_0x21f01e[_0x517e58(0x1b4)]){const _0x41fae6=_0x21f01e[_0x9c0281]??'';if(/^\s*<!--\s*@lovrabet\./[_0x517e58(0x18f)](_0x41fae6)){_0x9c0281++;continue;}if(_0x41fae6[_0x517e58(0x1a4)]()===''&&_0x9c0281>0x0){_0x9c0281++;continue;}break;}else while(_0x9c0281<_0x21f01e[_0x517e58(0x1b4)]){const _0x2ec5bf=_0x21f01e[_0x9c0281]??'';if(/^\s*--\s*@lovrabet\./['test'](_0x2ec5bf)){_0x9c0281++;continue;}if(_0x2ec5bf[_0x517e58(0x1a4)]()===''&&_0x9c0281>0x0){_0x9c0281++;continue;}break;}for(;_0x9c0281<_0x21f01e['length'];_0x9c0281++){_0x530f96[_0x517e58(0x19c)](_0x21f01e[_0x9c0281]);}return _0x530f96['join']('\x0a')[_0x517e58(0x1b3)]();}export function resolveSqlMode(_0x5465e5,_0x535af8){const _0x5de07d=a178_0x558815;if(_0x535af8?.[_0x5de07d(0x1a6)])return _0x535af8['mode'];return detectSqlMode(_0x5465e5);}export function resolveSqlFileName(_0x5f54ee,_0x45d634,_0x1b79c3){const _0x4fdbd6=a178_0x558815;if(_0x1b79c3?.[_0x4fdbd6(0x1a8)])return _0x1b79c3[_0x4fdbd6(0x1a8)];if(_0x1b79c3?.[_0x4fdbd6(0x18e)]||_0x1b79c3?.[_0x4fdbd6(0x1af)])return buildSqlRelativePath(_0x5f54ee,_0x1b79c3?.[_0x4fdbd6(0x18e)],_0x1b79c3?.[_0x4fdbd6(0x1af)],resolveSqlMode(_0x45d634,_0x1b79c3),_0x1b79c3?.[_0x4fdbd6(0x1b2)]);return buildDefaultSqlFileName(_0x5f54ee,resolveSqlMode(_0x45d634,_0x1b79c3));}export function resolveSqlLocalDir(_0x19ec77,_0x38affc){return join(_0x19ec77,SQL_LOCAL_REL_DIR,_0x38affc);}export async function confirmForceOverwrite(_0x2c05a9){const _0x52865b=a178_0x558815,_0x241831=createInterface({'input':process[_0x52865b(0x198)],'output':process[_0x52865b(0x1aa)]}),_0x545b4f=await new Promise(_0x1f6f6a=>{const _0x532ba0=_0x52865b;_0x241831[_0x532ba0(0x196)](_0x2c05a9+'\x20[y/N]\x20',_0x1f6f6a);});return _0x241831[_0x52865b(0x1b0)](),['y',_0x52865b(0x193)][_0x52865b(0x1ae)](_0x545b4f[_0x52865b(0x1a4)]()[_0x52865b(0x1a2)]());}export function findSqlLockScope(_0x25ed04,_0x1137ee){const _0x2d7e28=a178_0x558815;return _0x25ed04[_0x2d7e28(0x1a0)][_0x1137ee];}function buildMetadataHeaderLines(_0x57cc07,_0x1d5697){const _0x24c3cd=a178_0x558815,_0x269700=[['sqlCode',_0x57cc07[_0x24c3cd(0x19b)]],[_0x24c3cd(0x18e),_0x57cc07[_0x24c3cd(0x18e)]],['dbId',_0x57cc07[_0x24c3cd(0x1b2)]],[_0x24c3cd(0x1af),_0x57cc07[_0x24c3cd(0x1af)]],['mode',_0x57cc07[_0x24c3cd(0x1a6)]],[_0x24c3cd(0x190),_0x57cc07[_0x24c3cd(0x190)]],['description',_0x57cc07[_0x24c3cd(0x1ab)]]];if(_0x1d5697===_0x24c3cd(0x19e))return _0x269700[_0x24c3cd(0x191)](([,_0x5b8333])=>_0x5b8333!==undefined&&_0x5b8333!==null&&String(_0x5b8333)['trim']()!=='')['map'](([_0x3efcc9,_0x20479f])=>'<!--\x20@lovrabet.'+_0x3efcc9+':\x20'+String(_0x20479f)+_0x24c3cd(0x1a9));return _0x269700[_0x24c3cd(0x191)](([,_0x3baf3f])=>_0x3baf3f!==undefined&&_0x3baf3f!==null&&String(_0x3baf3f)[_0x24c3cd(0x1a4)]()!=='')[_0x24c3cd(0x1a5)](([_0x48dbf8,_0x13bcd0])=>'--\x20@lovrabet.'+_0x48dbf8+':\x20'+String(_0x13bcd0));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a179_0x379b0f=a179_0xd16c;function a179_0xd16c(_0x2bf438,_0x2d1126){_0x2bf438=_0x2bf438-0xbe;const _0x40768b=a179_0x4076();let _0xd16ca6=_0x40768b[_0x2bf438];return _0xd16ca6;}(function(_0x79a793,_0x318ab6){const _0x59d793=a179_0xd16c,_0x3afb17=_0x79a793();while(!![]){try{const _0x180419=-parseInt(_0x59d793(0xc0))/0x1*(-parseInt(_0x59d793(0xc7))/0x2)+parseInt(_0x59d793(0xcf))/0x3+-parseInt(_0x59d793(0xcc))/0x4+parseInt(_0x59d793(0xd7))/0x5*(-parseInt(_0x59d793(0xc6))/0x6)+-parseInt(_0x59d793(0xc8))/0x7+-parseInt(_0x59d793(0xcb))/0x8+parseInt(_0x59d793(0xd2))/0x9;if(_0x180419===_0x318ab6)break;else _0x3afb17['push'](_0x3afb17['shift']());}catch(_0x4479d4){_0x3afb17['push'](_0x3afb17['shift']());}}}(a179_0x4076,0x9619c));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';function a179_0x4076(){const _0x426ace=['map','sqlRoot','18430209kOFVVf','totalCount','boolean','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','All\x20SQL\x20queries\x20are\x20in\x20sync.','556805SdvfBt','\x20missing,\x20','keys','status','lockFilePath','sqls','path','length','\x20remote-only','appCode','filePath','\x20modified,\x20','paging','tableData','relativePath','bool','1JzHayf','push','sqlName','lockKey','hash','\x20added,\x20','18hXtqqV','1990004kRbJej','4743830oZAJeg','has','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','6127760YZJdBi','4521864pfjodd','\x20unchanged','read','1440654FYEvHI'];a179_0x4076=function(){return _0x426ace;};return a179_0x4076();}const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x4801de){const _0x5ce012=a179_0xd16c,_0x22eb3c=[];let _0x4e7544=0x1;while(!![]){const _0x26b1f6=await listSqlQueries(_0x4801de,{'currentPage':_0x4e7544,'pageSize':PAGE_SIZE}),_0xeff654=_0x26b1f6[_0x5ce012(0xe4)]??[];_0x22eb3c[_0x5ce012(0xc1)](..._0xeff654[_0x5ce012(0xd0)](_0x37c213=>_0x37c213['sqlCode']));if(_0xeff654[_0x5ce012(0xde)]===0x0)break;const _0x49af1a=_0x26b1f6[_0x5ce012(0xe3)]?.[_0x5ce012(0xd3)];if(_0x49af1a!=null?_0x22eb3c[_0x5ce012(0xde)]>=_0x49af1a:_0xeff654[_0x5ce012(0xde)]<PAGE_SIZE)break;_0x4e7544++;}return _0x22eb3c;}export const sqlStatus={'service':'sql','command':a179_0x379b0f(0xda),'description':a179_0x379b0f(0xd5),'risk':a179_0x379b0f(0xce),'flags':[{'name':'remote','type':a179_0x379b0f(0xd4),'description':a179_0x379b0f(0xca)}],async 'execute'(_0x3dc2d7){const _0xdfba20=a179_0x379b0f,_0xee2510=loadSqlProjectConfig(_0x3dc2d7['appCode']),_0x176c08=await readSqlLockFile(_0xee2510[_0xdfba20(0xdb)]),{appLock:_0x27c35b}=ensureSqlLockScope(_0x176c08??createEmptySqlLock(),_0xee2510[_0xdfba20(0xe0)],_0xee2510[_0xdfba20(0xd1)],_0xdfba20(0xda)),_0x853794=await scanLocalSqlQueries(_0xee2510),_0x1829de=[],_0x67ff0c=[],_0x75d0e9=[],_0x292f74=[],_0x18ceb1=new Set(_0x853794['map'](_0x5985ad=>_0x5985ad[_0xdfba20(0xc3)]));for(const _0x44ff88 of _0x853794){const _0x2f6446=await computeSqlFileHash(_0x44ff88[_0xdfba20(0xe1)]),_0x4ccd29=_0x27c35b[_0xdfba20(0xdc)][_0x44ff88[_0xdfba20(0xc3)]],_0x3a86dd=!!_0x4ccd29&&_0x4ccd29[_0xdfba20(0xdd)]!==_0x44ff88[_0xdfba20(0xbe)],_0x3564f1=!!_0x4ccd29&&!!_0x44ff88[_0xdfba20(0xc2)]&&_0x4ccd29[_0xdfba20(0xc2)]!==_0x44ff88[_0xdfba20(0xc2)];if(!_0x4ccd29)_0x1829de[_0xdfba20(0xc1)](_0x44ff88[_0xdfba20(0xc3)]);else _0x4ccd29[_0xdfba20(0xc4)]!==_0x2f6446||_0x3a86dd||_0x3564f1?_0x67ff0c['push'](_0x44ff88['lockKey']):_0x75d0e9[_0xdfba20(0xc1)](_0x44ff88[_0xdfba20(0xc3)]);}for(const _0x46b613 of Object[_0xdfba20(0xd9)](_0x27c35b['sqls'])){!_0x18ceb1[_0xdfba20(0xc9)](_0x46b613)&&_0x292f74[_0xdfba20(0xc1)](_0x46b613);}const _0x44f9d1=[];if(_0x3dc2d7[_0xdfba20(0xbf)]('remote')){const _0xa90297=await fetchAllSqlCodes(_0x3dc2d7['appCode']);for(const _0x405429 of _0xa90297){!_0x18ceb1[_0xdfba20(0xc9)](_0x405429)&&!_0x27c35b['sqls'][_0x405429]&&_0x44f9d1['push'](_0x405429);}}const _0xe62fba=_0x1829de['length']===0x0&&_0x67ff0c[_0xdfba20(0xde)]===0x0&&_0x292f74[_0xdfba20(0xde)]===0x0&&_0x44f9d1[_0xdfba20(0xde)]===0x0;return{'ok':!![],'data':{'added':_0x1829de,'modified':_0x67ff0c,'missing':_0x292f74,'unchanged':_0x75d0e9,'remoteOnly':_0x44f9d1},'message':_0xe62fba?_0xdfba20(0xd6):_0x1829de['length']+_0xdfba20(0xc5)+_0x67ff0c[_0xdfba20(0xde)]+_0xdfba20(0xe2)+_0x292f74['length']+_0xdfba20(0xd8)+_0x75d0e9[_0xdfba20(0xde)]+_0xdfba20(0xcd)+(_0x44f9d1[_0xdfba20(0xde)]>0x0?',\x20'+_0x44f9d1[_0xdfba20(0xde)]+_0xdfba20(0xdf):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a180_0x298a70=a180_0x37bd;(function(_0x45d89a,_0x910d92){const _0x185570=a180_0x37bd,_0x1f8942=_0x45d89a();while(!![]){try{const _0xe19854=-parseInt(_0x185570(0xc9))/0x1*(-parseInt(_0x185570(0xd8))/0x2)+-parseInt(_0x185570(0xf5))/0x3+parseInt(_0x185570(0xe2))/0x4*(parseInt(_0x185570(0xeb))/0x5)+parseInt(_0x185570(0xf6))/0x6*(-parseInt(_0x185570(0xf1))/0x7)+-parseInt(_0x185570(0xea))/0x8*(parseInt(_0x185570(0xd5))/0x9)+parseInt(_0x185570(0xf2))/0xa+-parseInt(_0x185570(0xe0))/0xb;if(_0xe19854===_0x910d92)break;else _0x1f8942['push'](_0x1f8942['shift']());}catch(_0x53837f){_0x1f8942['push'](_0x1f8942['shift']());}}}(a180_0x6345,0xe35ef));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';function a180_0x37bd(_0x2de38a,_0x4da0e8){_0x2de38a=_0x2de38a-0xbc;const _0x6345b5=a180_0x6345();let _0x37bdec=_0x6345b5[_0x2de38a];return _0x37bdec;}function a180_0x6345(){const _0x357893=['pkField','length','from','Dataset\x20\x22','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','type','schemaWarnings','tables','string','23FKXVUl','sql','isSelectOnly','validation','map','dbtableConfig','\x22\x20not\x20found\x20in\x20any\x20dataset','schema:','indexName','fields','cwd','valid','34911czpBRD','parameters','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','68794zkkTCq','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','reason','Table\x20\x22','schemas','tableName','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','appCode','3861693dSHFTA','isArray','4ZahqxN','toLowerCase','find','index_type','message','size','utf-8','columns','2024AZbfsK','9068165RTSXFE','filter','read','--check-indexes\x20requires\x20--schemas.','SQL\x20schema\x20validation','validate','273Hppubb','16252390ZEPgJA','str','flagMissing','2283543CPMYXv','185394oHbYrx','unshift','split','dataset','push','File\x20not\x20found:\x20','indexes','file','sqlType','get','isDangerous','Provide\x20--file\x20or\x20--sql','name','index_columns','trim'];a180_0x6345=function(){return _0x357893;};return a180_0x6345();}import{auditSqlJoinIndexes}from'../../core/sql-index-auditor.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':a180_0x298a70(0xca),'command':a180_0x298a70(0xf0),'description':a180_0x298a70(0xc4),'risk':a180_0x298a70(0xed),'flags':[{'name':a180_0x298a70(0xfd),'type':a180_0x298a70(0xc8),'description':a180_0x298a70(0xd7)},{'name':a180_0x298a70(0xca),'type':a180_0x298a70(0xc8),'description':a180_0x298a70(0xd9)},{'name':a180_0x298a70(0xdc),'type':a180_0x298a70(0xc8),'description':a180_0x298a70(0xde)},{'name':'check-indexes','type':'boolean','description':'Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata'}],async 'execute'(_0xdca971){const _0x583d35=a180_0x298a70,_0x890794=_0xdca971[_0x583d35(0xf3)](_0x583d35(0xfd)),_0xbfbae9=_0xdca971[_0x583d35(0xf3)](_0x583d35(0xca)),_0x63ae17=_0xdca971[_0x583d35(0xf3)](_0x583d35(0xdc)),_0xf87917=_0xdca971['bool']('check-indexes');if(!_0x890794&&!_0xbfbae9)throw CliErrors[_0x583d35(0xf4)](_0x583d35(0xfd),_0x583d35(0xbc));if(_0xf87917&&!_0x63ae17)throw CliErrors['validation'](_0x583d35(0xee));let _0x2a0554;if(_0x890794){const _0x541d1c=resolve(process[_0x583d35(0xd3)](),_0x890794);if(!existsSync(_0x541d1c))throw CliErrors[_0x583d35(0xcc)](_0x583d35(0xfb)+_0x541d1c);_0x2a0554=readFileSync(_0x541d1c,_0x583d35(0xe8));}else _0x2a0554=_0xbfbae9;const _0x1990a7=validateSql(_0x2a0554),_0xbbefc9={'valid':_0x1990a7[_0x583d35(0xd4)],'sqlType':_0x1990a7['sqlType'][_0x583d35(0xc5)],'isSelectOnly':_0x1990a7[_0x583d35(0xfe)][_0x583d35(0xcb)],'isDangerous':_0x1990a7[_0x583d35(0xfe)][_0x583d35(0x100)],'tables':_0x1990a7['tables'],'parameters':_0x1990a7[_0x583d35(0xd6)],'message':_0x1990a7[_0x583d35(0xe6)]};_0x1990a7[_0x583d35(0xfe)][_0x583d35(0xda)]&&(_0xbbefc9['reason']=_0x1990a7['sqlType']['reason']);if(_0x63ae17&&_0x1990a7[_0x583d35(0xd4)]){const _0x5f425a=_0x63ae17[_0x583d35(0xf8)](',')[_0x583d35(0xcd)](_0x8df41=>_0x8df41[_0x583d35(0xbf)]())['filter'](Boolean),_0x4fddb8=[],_0x210dcb=[],_0x1b7496=filterDbTableBackedDatasets(await listDatasets(_0xdca971[_0x583d35(0xdf)])),_0x3f635d=new Map(_0x1b7496[_0x583d35(0xcd)](_0x1ba5eb=>[_0x1ba5eb[_0x583d35(0xce)]?.['tableName']?.['toLowerCase'](),_0x1ba5eb]));for(const _0x59d8df of _0x1990a7[_0x583d35(0xc7)]){const _0x1bbb43=_0x3f635d[_0x583d35(0xff)](_0x59d8df[_0x583d35(0xe3)]());!_0x1bbb43&&_0x4fddb8[_0x583d35(0xfa)](_0x583d35(0xdb)+_0x59d8df+_0x583d35(0xcf));}for(const _0x178e6b of _0x5f425a){let _0x42f2c8;try{_0x42f2c8=await getDatasetDetail(_0x178e6b);}catch{_0x4fddb8[_0x583d35(0xfa)](_0x583d35(0xc3)+_0x178e6b+'\x22\x20not\x20found\x20or\x20not\x20accessible');continue;}assertDatasetIsDbTableBacked(_0x42f2c8,_0x583d35(0xef));const _0x27b54c=Array[_0x583d35(0xe1)](_0x42f2c8['fields'])?_0x42f2c8[_0x583d35(0xd2)]:[],_0x118f67=new Set(_0x27b54c[_0x583d35(0xcd)](_0x2d54f8=>_0x2d54f8['name']?.[_0x583d35(0xe3)]())),_0x45e5c2=_0x42f2c8[_0x583d35(0xce)]?.[_0x583d35(0xdd)]||_0x42f2c8[_0x583d35(0xdd)]||_0x178e6b;_0xbbefc9[_0x583d35(0xd0)+_0x45e5c2]={'code':_0x178e6b,'tableName':_0x45e5c2,'fieldCount':_0x118f67[_0x583d35(0xe7)],'fields':Array[_0x583d35(0xc2)](_0x118f67)};if(_0xf87917){const _0x38cf4b=normalizeDatasetIndexes(_0x42f2c8);_0x210dcb[_0x583d35(0xfa)]({'tableName':_0x45e5c2,..._0x38cf4b});}}_0x4fddb8[_0x583d35(0xc1)]>0x0&&(_0xbbefc9[_0x583d35(0xc6)]=_0x4fddb8),_0xf87917&&(_0xbbefc9['joinAudit']=auditSqlJoinIndexes(_0x2a0554,_0x210dcb));}return{'ok':_0x1990a7[_0x583d35(0xd4)],'data':_0xbbefc9,'message':_0x1990a7['message']};}};function normalizeDatasetIndexes(_0x35cf30){const _0x57b965=a180_0x298a70,_0x44ae57=Array[_0x57b965(0xe1)](_0x35cf30?.['dataset']?.[_0x57b965(0xfc)])?_0x35cf30[_0x57b965(0xf9)]['indexes']:Array['isArray'](_0x35cf30?.[_0x57b965(0xfc)])?_0x35cf30[_0x57b965(0xfc)]:[],_0x4ba35c=_0x44ae57['flatMap'](_0x4098cb=>{const _0x2c486e=_0x57b965,_0x208bbd=Array[_0x2c486e(0xe1)](_0x4098cb?.[_0x2c486e(0xbe)])?_0x4098cb[_0x2c486e(0xbe)]:Array[_0x2c486e(0xe1)](_0x4098cb?.['columnNames'])?_0x4098cb['columnNames']:Array[_0x2c486e(0xe1)](_0x4098cb?.[_0x2c486e(0xe9)])?_0x4098cb[_0x2c486e(0xe9)]:[],_0x35a973=_0x208bbd[_0x2c486e(0xec)](_0x12d63c=>typeof _0x12d63c===_0x2c486e(0xc8))[_0x2c486e(0xcd)](_0x232e91=>_0x232e91[_0x2c486e(0xbf)]())[_0x2c486e(0xec)](Boolean);if(_0x35a973[_0x2c486e(0xc1)]===0x0)return[];const _0x46a188=[_0x4098cb?.[_0x2c486e(0xd1)],_0x4098cb?.['index_name'],_0x4098cb?.[_0x2c486e(0xbd)]][_0x2c486e(0xe4)](_0x435485=>typeof _0x435485===_0x2c486e(0xc8)&&_0x435485[_0x2c486e(0xbf)]()),_0x3b1665=[_0x4098cb?.[_0x2c486e(0xe5)],_0x4098cb?.[_0x2c486e(0xc5)]][_0x2c486e(0xe4)](_0x5a26eb=>typeof _0x5a26eb==='string'&&_0x5a26eb[_0x2c486e(0xbf)]());return[{..._0x46a188?{'name':_0x46a188[_0x2c486e(0xbf)]()}:{},..._0x3b1665?{'type':_0x3b1665['trim']()}:{},'columns':_0x35a973}];}),_0x284748=[..._0x4ba35c],_0x2298b3=typeof _0x35cf30?.[_0x57b965(0xce)]?.[_0x57b965(0xc0)]===_0x57b965(0xc8)?_0x35cf30[_0x57b965(0xce)][_0x57b965(0xc0)][_0x57b965(0xf8)](',')[_0x57b965(0xcd)](_0x4aab45=>_0x4aab45[_0x57b965(0xbf)]())[_0x57b965(0xec)](Boolean):[];return _0x2298b3['length']>0x0&&_0x284748[_0x57b965(0xf7)]({'type':'primary','columns':_0x2298b3}),{'indexes':_0x284748,'metadataAvailable':_0x4ba35c[_0x57b965(0xc1)]>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x46499a,_0x5efbd5){const _0x339b36=a181_0x5b86,_0x307c48=_0x46499a();while(!![]){try{const _0x153277=parseInt(_0x339b36(0x1c9))/0x1*(-parseInt(_0x339b36(0x1d4))/0x2)+-parseInt(_0x339b36(0x1ce))/0x3*(parseInt(_0x339b36(0x1d1))/0x4)+-parseInt(_0x339b36(0x1d0))/0x5*(parseInt(_0x339b36(0x1cf))/0x6)+-parseInt(_0x339b36(0x1d3))/0x7+parseInt(_0x339b36(0x1cc))/0x8*(parseInt(_0x339b36(0x1ca))/0x9)+parseInt(_0x339b36(0x1cb))/0xa*(-parseInt(_0x339b36(0x1cd))/0xb)+parseInt(_0x339b36(0x1d2))/0xc;if(_0x153277===_0x5efbd5)break;else _0x307c48['push'](_0x307c48['shift']());}catch(_0x40f301){_0x307c48['push'](_0x307c48['shift']());}}}(a181_0x257a,0x5b104));import{taskStatus}from'../../commands/task/status.js';function a181_0x257a(){const _0x3fe12e=['2258770RZtJWN','2187784jxTFDM','11EzPfak','90159QSWbIL','12yyYfyB','231705olvRQh','28jFYSqZ','16416912mVQPLe','2076480jPPHdY','2158JQiALB','664Mzlamr','18WuaJHf'];a181_0x257a=function(){return _0x3fe12e;};return a181_0x257a();}function a181_0x5b86(_0x1756a7,_0x2bd710){_0x1756a7=_0x1756a7-0x1c9;const _0x257ace=a181_0x257a();let _0x5b8607=_0x257ace[_0x1756a7];return _0x5b8607;}export const taskDefinitions=[taskStatus];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a182_0x416758=a182_0xc70c;(function(_0x2c5c80,_0x20370e){const _0x3a7c42=a182_0xc70c,_0x2e1bfa=_0x2c5c80();while(!![]){try{const _0x56aa28=-parseInt(_0x3a7c42(0xed))/0x1+parseInt(_0x3a7c42(0xe0))/0x2+parseInt(_0x3a7c42(0xe7))/0x3*(parseInt(_0x3a7c42(0xdb))/0x4)+parseInt(_0x3a7c42(0xe5))/0x5+-parseInt(_0x3a7c42(0xde))/0x6+-parseInt(_0x3a7c42(0xeb))/0x7+parseInt(_0x3a7c42(0xdf))/0x8*(parseInt(_0x3a7c42(0xd9))/0x9);if(_0x56aa28===_0x20370e)break;else _0x2e1bfa['push'](_0x2e1bfa['shift']());}catch(_0x1e6b10){_0x2e1bfa['push'](_0x2e1bfa['shift']());}}}(a182_0x30e2,0xc9f98));function a182_0xc70c(_0x5c7b2b,_0x23d3da){_0x5c7b2b=_0x5c7b2b-0xd6;const _0x30e22f=a182_0x30e2();let _0xc70cb9=_0x30e22f[_0x5c7b2b];return _0xc70cb9;}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';export const taskStatus={'service':a182_0x416758(0xe4),'command':a182_0x416758(0xe1),'description':'Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','risk':a182_0x416758(0xe6),'defaultOutputFormat':'compress','structuredErrors':!![],'flags':[{'name':a182_0x416758(0xd6),'type':a182_0x416758(0xd8),'required':!![],'description':'Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4a2a70){const _0x17a494=a182_0x416758;if(!_0x4a2a70['str'](_0x17a494(0xd6))[_0x17a494(0xe9)]())throw CliErrors[_0x17a494(0xea)](_0x17a494(0xd6));},async 'execute'(_0x2dbabf){const _0x58f262=a182_0x416758,_0x52fe78=_0x2dbabf[_0x58f262(0xdc)](_0x58f262(0xd6))[_0x58f262(0xe9)](),_0x1c92c7=normalizeAsyncTask(await getAsyncTaskStatus(_0x52fe78,_0x2dbabf[_0x58f262(0xec)],_0x2dbabf[_0x58f262(0xdd)]));if(_0x1c92c7[_0x58f262(0xe8)]!==_0x52fe78)throw CliErrors[_0x58f262(0xd7)](_0x58f262(0xe3)+_0x52fe78+_0x58f262(0xe2)+_0x1c92c7[_0x58f262(0xe8)]+'.');const _0x170a0b=buildAsyncTaskStatusCommand(_0x1c92c7[_0x58f262(0xe8)],_0x2dbabf['appCode']);return{'ok':!![],'message':asyncTaskMessage(_0x1c92c7),'data':{'appCode':_0x2dbabf[_0x58f262(0xec)],..._0x1c92c7,'query':_0x1c92c7[_0x58f262(0xda)]?null:{'command':_0x170a0b}}};}};function a182_0x30e2(){const _0xeb0cd1=[',\x20received\x20','Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','task','4003080tAAEIw','read','3SDLizQ','taskId','trim','flagMissing','4829097YNaAMB','appCode','1449923NVSUZG','task-id','apiError','string','36xocdVY','isTerminal','1073588rnzcMY','str','cookie','2590050whrQlS','3156176AilSYS','1503312krePBY','status'];a182_0x30e2=function(){return _0xeb0cd1;};return a182_0x30e2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a183_0x2460(_0x31d006,_0x58656a){_0x31d006=_0x31d006-0x16c;const _0x4c7cc9=a183_0x4c7c();let _0x246036=_0x4c7cc9[_0x31d006];return _0x246036;}function a183_0x4c7c(){const _0x30ab70=['1956460QlsbPu','2329833kGGsaX','2yXuDgn','6878367ySOBxa','6913740uzJQol','12145jbqgOt','520KXUKNf','add','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','1195742ZPLCJg','workspace\x20add','App\x20profile\x20name','name','510512advYHK'];a183_0x4c7c=function(){return _0x30ab70;};return a183_0x4c7c();}const a183_0x5f376e=a183_0x2460;(function(_0x1fda13,_0x4916a4){const _0x4ce751=a183_0x2460,_0x249cee=_0x1fda13();while(!![]){try{const _0xd2e045=parseInt(_0x4ce751(0x16c))/0x1*(parseInt(_0x4ce751(0x173))/0x2)+-parseInt(_0x4ce751(0x172))/0x3+parseInt(_0x4ce751(0x170))/0x4+-parseInt(_0x4ce751(0x171))/0x5+parseInt(_0x4ce751(0x175))/0x6+-parseInt(_0x4ce751(0x176))/0x7*(-parseInt(_0x4ce751(0x177))/0x8)+-parseInt(_0x4ce751(0x174))/0x9;if(_0xd2e045===_0x4916a4)break;else _0x249cee['push'](_0x249cee['shift']());}catch(_0x2b91da){_0x249cee['push'](_0x249cee['shift']());}}}(a183_0x4c7c,0xa038d));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';export const workspaceAddDefinition={'service':'workspace','command':a183_0x5f376e(0x178),'description':a183_0x5f376e(0x179),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a183_0x5f376e(0x16f),'description':a183_0x5f376e(0x16e),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x1476bd=>validateAppName(_0x1476bd,a183_0x5f376e(0x16d)),'execute':_0x11f576=>runAppAdd(_0x11f576,a183_0x5f376e(0x16d))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a184_0xd8dca9=a184_0x3f2d;(function(_0x21daca,_0x548fb2){const _0x3e9631=a184_0x3f2d,_0x34a683=_0x21daca();while(!![]){try{const _0x28b186=parseInt(_0x3e9631(0xfb))/0x1+parseInt(_0x3e9631(0xfd))/0x2*(parseInt(_0x3e9631(0x107))/0x3)+parseInt(_0x3e9631(0xfc))/0x4*(parseInt(_0x3e9631(0x102))/0x5)+-parseInt(_0x3e9631(0x11d))/0x6+parseInt(_0x3e9631(0xef))/0x7+parseInt(_0x3e9631(0x10a))/0x8*(-parseInt(_0x3e9631(0xf3))/0x9)+-parseInt(_0x3e9631(0xf0))/0xa;if(_0x28b186===_0x548fb2)break;else _0x34a683['push'](_0x34a683['shift']());}catch(_0x129b87){_0x34a683['push'](_0x34a683['shift']());}}}(a184_0x3b9f,0xc6cbc));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';function a184_0x3f2d(_0x2ac886,_0x4ac2a4){_0x2ac886=_0x2ac886-0xef;const _0x3b9f4c=a184_0x3b9f();let _0x3f2da2=_0x3b9f4c[_0x2ac886];return _0x3f2da2;}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+a184_0xd8dca9(0x121),SAFE_PROFILE_KEYS=[a184_0xd8dca9(0x110),a184_0xd8dca9(0x103),a184_0xd8dca9(0x10b),'format',a184_0xd8dca9(0xfa),'riskLevel',a184_0xd8dca9(0x11f)],workspaceFlags=[{'name':a184_0xd8dca9(0x11c),'type':a184_0xd8dca9(0x117),'description':a184_0xd8dca9(0xf5)},{'name':a184_0xd8dca9(0x110),'type':'string','description':a184_0xd8dca9(0x105)},{'name':a184_0xd8dca9(0x103),'type':a184_0xd8dca9(0x117),'description':'Target\x20environment','enum':[...RABETBASE_ENV_VALUES]},{'name':a184_0xd8dca9(0x10b),'type':a184_0xd8dca9(0x117),'description':a184_0xd8dca9(0x113)},{'name':a184_0xd8dca9(0x120),'type':a184_0xd8dca9(0x117),'description':'Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a184_0xd8dca9(0xfa),'type':a184_0xd8dca9(0xff),'description':a184_0xd8dca9(0x118)},{'name':a184_0xd8dca9(0x100),'type':a184_0xd8dca9(0x117),'description':a184_0xd8dca9(0x11b),'enum':[...RISK_LEVEL_VALUES]},{'name':'locale','type':a184_0xd8dca9(0x117),'description':a184_0xd8dca9(0xf8)}];function isRecord(_0x2e3566){const _0x15f423=a184_0xd8dca9;return!!_0x2e3566&&typeof _0x2e3566===_0x15f423(0x123)&&!Array['isArray'](_0x2e3566);}function assertValidAppcode(_0x10b400){const _0x325e13=a184_0xd8dca9,{valid:_0x6c64a4,message:_0x4e23d6}=validateAppcode(_0x10b400);if(!_0x6c64a4)throw CliErrors[_0x325e13(0xf9)](_0x325e13(0x10c)+_0x10b400,_0x4e23d6);}function sanitizeProfile(_0x4b1d87){if(!isRecord(_0x4b1d87))return{};const _0x513498={};for(const _0x482ee6 of SAFE_PROFILE_KEYS){if(_0x4b1d87[_0x482ee6]!==undefined)_0x513498[_0x482ee6]=_0x4b1d87[_0x482ee6];}return _0x513498;}function cloneProfile(_0x4106f9){return isRecord(_0x4106f9)?{..._0x4106f9}:{};}function collectWorkspaceProfileOverrides(_0x5ebe48){const _0x66e314=a184_0xd8dca9,_0x473a5a={},_0x5c24a9=_0x5ebe48['str'](_0x66e314(0x103)),_0x39cdb3=_0x5ebe48[_0x66e314(0xf7)](_0x66e314(0x10b)),_0x525225=_0x5ebe48[_0x66e314(0xf7)](_0x66e314(0x120)),_0x3c33a0=_0x5ebe48[_0x66e314(0x119)](_0x66e314(0xfa)),_0x1daab4=_0x5ebe48['str'](_0x66e314(0x100)),_0x41d74e=_0x5ebe48[_0x66e314(0xf7)](_0x66e314(0x11f));if(_0x5c24a9)_0x473a5a[_0x66e314(0x103)]=_0x5c24a9;if(_0x39cdb3)_0x473a5a[_0x66e314(0x10b)]=_0x39cdb3;if(_0x525225)_0x473a5a[_0x66e314(0x112)]=_0x525225;if(_0x3c33a0!==undefined&&_0x3c33a0!=='')_0x473a5a[_0x66e314(0xfa)]=Number(_0x3c33a0);if(_0x1daab4)_0x473a5a[_0x66e314(0x100)]=_0x1daab4;if(_0x41d74e)_0x473a5a[_0x66e314(0x11f)]=_0x41d74e;return _0x473a5a;}async function validateWorkspaceArgs(_0x5587d5){const _0xb8c818=a184_0xd8dca9,_0x5c6eac=_0x5587d5[_0xb8c818(0xf7)](_0xb8c818(0x11c))[_0xb8c818(0x114)](),_0x49b1e7=_0x5587d5[_0xb8c818(0xf7)]('appcode')[_0xb8c818(0x114)]();if(!_0x5c6eac&&!_0x49b1e7)throw CliErrors[_0xb8c818(0xf9)](_0xb8c818(0x126),_0xb8c818(0x115)+CLI_BIN_NAME+_0xb8c818(0x124)+CLI_BIN_NAME+_0xb8c818(0xf4));if(_0x49b1e7)assertValidAppcode(_0x49b1e7);}function resolveKnownApps(){const _0x444ed0=a184_0xd8dca9,{config:_0x46d2b1,layers:_0x5bfa8f}=readRawConfigWithLayers(),_0x3b8ecd=isRecord(_0x46d2b1[_0x444ed0(0x10e)])?_0x46d2b1[_0x444ed0(0x10e)]:{},_0x107c87=isRecord(_0x5bfa8f['globalConfig'][_0x444ed0(0x10e)])?_0x5bfa8f['globalConfig']['apps']:{};return{..._0x107c87,..._0x3b8ecd};}async function configureWorkspace(_0x1f7166,_0x2c7341){const _0x33967f=a184_0xd8dca9,_0x5723b4=_0x1f7166[_0x33967f(0xf7)](_0x33967f(0x11c))[_0x33967f(0x114)](),_0x23ea3d=_0x1f7166[_0x33967f(0xf7)]('appcode')[_0x33967f(0x114)](),_0x21f435=_0x5723b4||_0x23ea3d;if(!_0x21f435)throw CliErrors[_0x33967f(0xf9)](_0x33967f(0x126),_0x33967f(0x115)+CLI_BIN_NAME+_0x33967f(0x124)+CLI_BIN_NAME+_0x33967f(0xf4));if(_0x23ea3d)assertValidAppcode(_0x23ea3d);const _0x510455=resolveWriteConfigPath(_0x33967f(0x101)),_0xc582d0=readConfigFile(_0x510455),_0x58df72=resolveKnownApps(),_0x4a0f56=isRecord(_0xc582d0[_0x33967f(0x10e)])?{..._0xc582d0['apps']}:{},_0x4f49fc=cloneProfile(_0x4a0f56[_0x21f435]),_0x41aa90=sanitizeProfile(_0x58df72[_0x21f435]),_0x4759fa=_0x23ea3d?{}:_0x41aa90,_0x4f4153=_0x23ea3d||_0x4759fa[_0x33967f(0x110)];if(!_0x4f4153){const _0x35d81b=Object[_0x33967f(0x125)](_0x58df72),_0x4c801f=_0x35d81b[_0x33967f(0x109)]===0x0?_0x33967f(0x115)+CLI_BIN_NAME+_0x33967f(0x111)+_0x2c7341+_0x33967f(0x11a)+_0x21f435+_0x33967f(0x127):_0x33967f(0x116)+_0x35d81b[_0x33967f(0xf2)](',\x20');throw CliErrors[_0x33967f(0xf9)](_0x33967f(0x10d)+_0x21f435+_0x33967f(0x104),_0x4c801f);}assertValidAppcode(String(_0x4f4153));const _0x162346={..._0x4759fa,..._0x4f49fc,'appcode':String(_0x4f4153),...collectWorkspaceProfileOverrides(_0x1f7166)};return _0x4a0f56[_0x21f435]=_0x162346,_0xc582d0['apps']=_0x4a0f56,_0xc582d0[_0x33967f(0x106)]=_0x21f435,delete _0xc582d0[_0x33967f(0x110)],delete _0xc582d0[_0x33967f(0x11c)],_0x162346[_0x33967f(0x103)]&&(_0xc582d0['env']=_0x162346[_0x33967f(0x103)]),writeConfigFile(_0x510455,_0xc582d0),{'ok':!![],'message':_0x33967f(0x108)+(_0x2c7341==='init'?'initialized':'updated')+':\x20'+_0x21f435+_0x33967f(0xfe)+_0x162346[_0x33967f(0x110)]+_0x33967f(0x10f)+_0x510455+_0x33967f(0xf1),'data':{'operation':'workspace.'+_0x2c7341,'configPath':_0x510455,'app':_0x21f435,'appcode':_0x162346[_0x33967f(0x110)],'env':_0x162346[_0x33967f(0x103)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':'workspace','command':a184_0xd8dca9(0x128),'description':'Initialize\x20the\x20current\x20workspace\x20app\x20binding','risk':a184_0xd8dca9(0xf6),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x681078=>configureWorkspace(_0x681078,'init')},workspaceUseDefinition={'service':'workspace','command':a184_0xd8dca9(0x122),'description':a184_0xd8dca9(0x11e),'risk':a184_0xd8dca9(0xf6),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x97e9f1=>configureWorkspace(_0x97e9f1,a184_0xd8dca9(0x122))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];function a184_0x3b9f(){const _0x42192b=['use','object','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','keys','Missing\x20workspace\x20app\x20selector.','\x20--appcode\x20<code>`.','init','9699144TQSrOC','8816610tYnRSo','.\x20Credentials:\x20not\x20written.','join','9SCVkQD','\x20workspace\x20use\x20--app\x20<name>`.','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','write','str','Locale\x20for\x20this\x20workspace\x20app\x20profile','validation','pageSize','28864TcYPzB','4cusXzr','44spsyxo','\x20(appcode:\x20','number','riskLevel','project','5609260SiAyAq','env','\x22\x20not\x20found.','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','defaultApp','123183aJCzPr','Workspace\x20','length','7713976izdByW','apiDir','Invalid\x20appcode:\x20','App\x20\x22','apps',').\x20Config:\x20','appcode','\x20workspace\x20','format','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','trim','Use\x20`','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','string','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','flag','\x20--app\x20','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','app','4676844JUllOG','Switch\x20the\x20current\x20workspace\x20app\x20binding','locale','defaultFormat','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]'];a184_0x3b9f=function(){return _0x42192b;};return a184_0x3b9f();}export{WORKSPACE_USAGE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a185_0x11063d=a185_0x9a40;function a185_0x4d25(){const _0x4ac206=['30fzjMWe','56PfCBJJ','high-risk-write','remove','workspace','2297168xBKASf','2669579eCenCL','441324ZPHdKY','1275039ZzJGwb','name','162755IDgZyC','4564044atFMol','100DbPwLe','317168vscfTW','workspace\x20remove','Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','App\x20profile\x20name\x20to\x20remove','4UmDClr'];a185_0x4d25=function(){return _0x4ac206;};return a185_0x4d25();}(function(_0x4f9cd5,_0x4aefe8){const _0x3ca19c=a185_0x9a40,_0x14ee92=_0x4f9cd5();while(!![]){try{const _0x5b21c8=-parseInt(_0x3ca19c(0x11d))/0x1+-parseInt(_0x3ca19c(0x11b))/0x2+-parseInt(_0x3ca19c(0x11e))/0x3*(-parseInt(_0x3ca19c(0x115))/0x4)+parseInt(_0x3ca19c(0x120))/0x5*(parseInt(_0x3ca19c(0x116))/0x6)+parseInt(_0x3ca19c(0x117))/0x7*(-parseInt(_0x3ca19c(0x111))/0x8)+-parseInt(_0x3ca19c(0x121))/0x9+-parseInt(_0x3ca19c(0x110))/0xa*(-parseInt(_0x3ca19c(0x11c))/0xb);if(_0x5b21c8===_0x4aefe8)break;else _0x14ee92['push'](_0x14ee92['shift']());}catch(_0x370898){_0x14ee92['push'](_0x14ee92['shift']());}}}(a185_0x4d25,0x92992));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a185_0x9a40(_0x2247d1,_0x5df2ae){_0x2247d1=_0x2247d1-0x110;const _0x4d2575=a185_0x4d25();let _0x9a4062=_0x4d2575[_0x2247d1];return _0x9a4062;}export const workspaceRemoveDefinition={'service':a185_0x11063d(0x11a),'command':a185_0x11063d(0x119),'description':a185_0x11063d(0x113),'risk':a185_0x11063d(0x118),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a185_0x11063d(0x11f),'description':a185_0x11063d(0x114),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x586de8=>validateAppName(_0x586de8,a185_0x11063d(0x112)),'execute':_0x3a7a53=>runAppRemove(_0x3a7a53,a185_0x11063d(0x112))};
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a186_0x2599bc=a186_0x3b04;(function(_0x2b96ac,_0x5482f6){const _0x4a71a8=a186_0x3b04,_0x453725=_0x2b96ac();while(!![]){try{const _0x5ac054=parseInt(_0x4a71a8(0xcf))/0x1+-parseInt(_0x4a71a8(0xbe))/0x2+-parseInt(_0x4a71a8(0xc3))/0x3*(parseInt(_0x4a71a8(0xc7))/0x4)+-parseInt(_0x4a71a8(0xbc))/0x5*(-parseInt(_0x4a71a8(0xc9))/0x6)+-parseInt(_0x4a71a8(0xc8))/0x7*(-parseInt(_0x4a71a8(0xdc))/0x8)+-parseInt(_0x4a71a8(0xd9))/0x9+parseInt(_0x4a71a8(0xd3))/0xa*(-parseInt(_0x4a71a8(0xc1))/0xb);if(_0x5ac054===_0x5482f6)break;else _0x453725['push'](_0x453725['shift']());}catch(_0x352b05){_0x453725['push'](_0x453725['shift']());}}}(a186_0x2faa,0xd56c0));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=['cookie',a186_0x2599bc(0xdb),a186_0x2599bc(0xb9),'format',a186_0x2599bc(0xcc)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a186_0x2599bc(0xca),a186_0x2599bc(0xd7),a186_0x2599bc(0xb9),'format',a186_0x2599bc(0xc6),a186_0x2599bc(0xdb),a186_0x2599bc(0xd5)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x1a86b2){const _0x238612=a186_0x2599bc;return[..._0x1a86b2][_0x238612(0xdd)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x14ddbb){return TOP_LEVEL_CONFIG_KEYS['has'](_0x14ddbb);}function a186_0x2faa(){const _0x2ec196=['109137oFjESk','toLowerCase','Access\x20key','cookie','68pAORTT','4719281XsabKz','54QQiDoa','appcode','inherit','riskLevel','Risk\x20level','filter','971306VMMzXT','format','number','zh-CN','1277690tyspWW','Locale','apiDir','Config\x20key\x20(','env','trim','1215504wdeRQr','en-US','accessKey','16JcMnFb','join','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','app','entries','length','Default\x20page\x20size','locale','Target\x20environment','defaultApp','246305QVdUPk','string','2015154EKClkA','apps','Auth\x20cookie','11ysTTsB','pageSize'];a186_0x2faa=function(){return _0x2ec196;};return a186_0x2faa();}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}function a186_0x3b04(_0x30cdfa,_0x1ba40b){_0x30cdfa=_0x30cdfa-0xb4;const _0x2faa62=a186_0x2faa();let _0x3b0435=_0x2faa62[_0x30cdfa];return _0x3b0435;}export function getConfigCommandKeyDescription(){const _0x2a7ba2=a186_0x2599bc;return _0x2a7ba2(0xd6)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a186_0x2599bc(0xd7),'apiDir':a186_0x2599bc(0xd5),'cookie':a186_0x2599bc(0xc6),'accessKey':a186_0x2599bc(0xdb),'defaultFormat':a186_0x2599bc(0xd0),'pageSize':'pageSize','riskLevel':a186_0x2599bc(0xcc),'locale':a186_0x2599bc(0xb9)};export function getAppProfileFlagDefs(){const _0x10611c=a186_0x2599bc;return[{'name':_0x10611c(0xd7),'type':_0x10611c(0xbd),'description':_0x10611c(0xba),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x10611c(0xd5),'type':'string','description':'API\x20directory\x20path'},{'name':_0x10611c(0xc6),'type':_0x10611c(0xbd),'description':_0x10611c(0xc0),'hidden':!![]},{'name':_0x10611c(0xdb),'type':'string','description':_0x10611c(0xc5),'hidden':!![]},{'name':'defaultFormat','type':_0x10611c(0xbd),'description':_0x10611c(0xb4),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x10611c(0xc2),'type':_0x10611c(0xd1),'description':_0x10611c(0xb8)},{'name':'riskLevel','type':_0x10611c(0xbd),'description':_0x10611c(0xcd),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x10611c(0xb9),'type':_0x10611c(0xbd),'description':_0x10611c(0xd4)}];}export function collectAppProfileOverrides(_0xa2272c){const _0x3aacec=a186_0x2599bc,_0x2664ab={};for(const [_0x50c146,_0x10fbc7]of Object[_0x3aacec(0xb6)](APP_PROFILE_FLAG_KEY_MAP)){const _0x365e08=_0xa2272c(_0x50c146);if(!_0x365e08)continue;_0x2664ab[_0x10fbc7]=_0x10fbc7===_0x3aacec(0xc2)?Number(_0x365e08):_0x365e08;}return _0x2664ab;}export function buildAppProfileListFields(_0x5cae6b){const _0x245d31=a186_0x2599bc;return{'env':_0x5cae6b[_0x245d31(0xd7)]??null,'apiDir':_0x5cae6b[_0x245d31(0xd5)]??null,'hasCookie':!!_0x5cae6b[_0x245d31(0xc6)],'hasAccessKey':!!_0x5cae6b[_0x245d31(0xdb)],'format':_0x5cae6b[_0x245d31(0xd0)]??null,'pageSize':_0x5cae6b['pageSize']??null,'riskLevel':_0x5cae6b[_0x245d31(0xcc)]??null,'locale':_0x5cae6b[_0x245d31(0xb9)]??null};}export function buildAppDoctorFields(_0x391ebc,_0x5221ab){const _0x416aca=a186_0x2599bc;return{'env':{'value':_0x391ebc[_0x416aca(0xd7)]||_0x5221ab[_0x416aca(0xd7)],'source':_0x391ebc[_0x416aca(0xd7)]?_0x416aca(0xb5):_0x416aca(0xcb)},'apiDir':{'value':_0x391ebc['apiDir']||_0x5221ab['apiDir'],'source':_0x391ebc[_0x416aca(0xd5)]?_0x416aca(0xb5):_0x416aca(0xcb)},'cookie':{'value':_0x391ebc['cookie']||_0x5221ab[_0x416aca(0xc6)],'source':_0x391ebc[_0x416aca(0xc6)]?_0x416aca(0xb5):_0x416aca(0xcb)},'accessKey':{'value':_0x391ebc['accessKey']||_0x5221ab['accessKey'],'source':_0x391ebc[_0x416aca(0xdb)]?_0x416aca(0xb5):_0x416aca(0xcb)}};}export function buildCanonicalAppConfig(_0x5d9cf9,_0x152218){const _0x2697ff=a186_0x2599bc,_0x441f09=_0x5d9cf9['map'](_0x4f74c8=>String(_0x4f74c8||'')[_0x2697ff(0xd8)]())[_0x2697ff(0xce)](Boolean);if(_0x441f09[_0x2697ff(0xb7)]===0x0)return{};const _0x97948b={};for(const _0x2a76b2 of _0x441f09){_0x97948b[_0x2a76b2]=_0x152218?{'appcode':_0x2a76b2,'env':_0x152218}:{'appcode':_0x2a76b2};}return{'apps':_0x97948b,'defaultApp':_0x441f09[0x0]};}export function buildCanonicalProjectConfig(_0x312a93,_0x2677da){const _0x2d80fa=a186_0x2599bc,{appCodes:appCodes=[],env:_0x39e7b5,metadata:_0x3aae6e}=_0x2677da,_0x24b348={..._0x312a93,..._0x3aae6e||{}};delete _0x24b348[_0x2d80fa(0xca)],delete _0x24b348['app'];if(_0x39e7b5)_0x24b348[_0x2d80fa(0xd7)]=_0x39e7b5;else!_0x24b348['env']&&(_0x24b348[_0x2d80fa(0xd7)]=DEFAULT_CONFIG_VALUES[_0x2d80fa(0xd7)]);const _0x2fe863=buildCanonicalAppConfig(appCodes,_0x24b348['env']);return Object['keys'](_0x2fe863)['length']>0x0&&(_0x24b348[_0x2d80fa(0xbf)]=_0x2fe863[_0x2d80fa(0xbf)],_0x24b348[_0x2d80fa(0xbb)]=_0x2fe863['defaultApp']),_0x24b348;}const LOCALE_MAP={'zh':'zh-CN','zh-cn':'zh-CN','zh_cn':a186_0x2599bc(0xd2),'en':'en-US','en-us':a186_0x2599bc(0xda),'en_us':a186_0x2599bc(0xda)};export function normalizeLocale(_0x26a3a9){const _0x2383ef=a186_0x2599bc;if(!_0x26a3a9)return null;return LOCALE_MAP[_0x26a3a9[_0x2383ef(0xc4)]()]??null;}
|
package/lib/constant/cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a187_0x467629=a187_0x1369;function a187_0x296f(){const _0xf7ff4c=['8pDBkWJ','384292uyyHCE','12qNOqsN','346331BBUkTE','3093454IiOIMk','5MZPntP','11ygTIQu','1685890AdlHFA','3201309lqfmvc','74RBLdOj','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','4375kLzPtC','12039OtTjNp','1806UdOGZL'];a187_0x296f=function(){return _0xf7ff4c;};return a187_0x296f();}(function(_0x384530,_0xca4809){const _0x232af6=a187_0x1369,_0xaf80cd=_0x384530();while(!![]){try{const _0x45a151=parseInt(_0x232af6(0xeb))/0x1+-parseInt(_0x232af6(0xf1))/0x2*(parseInt(_0x232af6(0xf4))/0x3)+parseInt(_0x232af6(0xf7))/0x4*(-parseInt(_0x232af6(0xed))/0x5)+-parseInt(_0x232af6(0xf5))/0x6*(parseInt(_0x232af6(0xf3))/0x7)+parseInt(_0x232af6(0xf6))/0x8*(parseInt(_0x232af6(0xf0))/0x9)+-parseInt(_0x232af6(0xef))/0xa*(-parseInt(_0x232af6(0xee))/0xb)+parseInt(_0x232af6(0xf8))/0xc*(-parseInt(_0x232af6(0xec))/0xd);if(_0x45a151===_0xca4809)break;else _0xaf80cd['push'](_0xaf80cd['shift']());}catch(_0x4f5048){_0xaf80cd['push'](_0xaf80cd['shift']());}}}(a187_0x296f,0x30d30));function a187_0x1369(_0x282af0,_0x1419c0){_0x282af0=_0x282af0-0xeb;const _0x296fc3=a187_0x296f();let _0x136915=_0x296fc3[_0x282af0];return _0x136915;}export const CLI_VERSION_POLICY_URL=a187_0x467629(0xf2);
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a188_0x42bc(){const _0x4d880a=['string','expect-path','fromEntries','menuIds','project','Output\x20format','file','Dataset\x20code','all','Enable\x20BFF\x20save','sqlName','File\x20path','key','operation','name','map','json\x20|\x20pretty\x20|\x20compress','90204FhfCVm','Asynchronous\x20task\x20ID','menu-ids','boolean','Title','yes','value','target','datasetcode','stdin','operationType','Force\x20non-interactive\x20mode\x20(CI)','function-node','verbose','clear','12BfleSA','Function\x20node','Alias\x20for\x20--non-interactive','Use\x20global\x20config\x20scope','params','pagesize','taskId','help','Page\x20number','Skip\x20import\x20generation','db-id','dbid','21742kokJGW','1112CthOni','Schemas','Select\x20app\x20profile\x20by\x20name','confirm','parent-id','Config\x20key','sql','Description\x20file','122990WvlEqZ','expect-parent-id','enableBffSave','Code\x20filter','Page\x20size','Config\x20value','DB\x20ID','Tags','output','skipImports','1485115blOkGr','Expected\x20current\x20child\x20count','enable-bff-save','<expr>','dbId','type','JSON\x20params','expected-children-count','<code>','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','Expected\x20current\x20menu\x20path','operation-type','3907512bdtuol','SQL\x20string','nonInteractive','Verbose\x20output','fromEnv','8BTdrSq','Skip\x20confirmation\x20for\x20high-risk\x20writes','expectPath','Clear','Preview\x20operation\x20without\x20executing','sort','force','description-file','Read\x20value\x20from\x20environment\x20variable','title','remote','2219610xdZfys','Description','Rabetbase\x20CLI','skip-imports','Operation\x20type','production\x20|\x20daily','label','meowKey','rabetbase','Comma-separated\x20menu\x20IDs','expectedChildrenCount','code','sqlcode','sqlname','tags','description','Watch\x20mode','from-env','global','Name','watch','expected-count','Read\x20value\x20from\x20stdin','<name>','SQL\x20code','page','SQL\x20name','env','reveal','4461201MyCvwh','schemas','format','keyword','functionNode','Expected\x20affected\x20count','Keyword\x20filter','Target\x20path','Menu\x20label','descriptionFile','appcode','task-id','dry-run','app','@lovrabet/rabetbase-cli','Show\x20help'];a188_0x42bc=function(){return _0x4d880a;};return a188_0x42bc();}const a188_0x202215=a188_0x38f4;(function(_0x196d21,_0x524b19){const _0x401678=a188_0x38f4,_0x55a029=_0x196d21();while(!![]){try{const _0x70c790=-parseInt(_0x401678(0x14e))/0x1*(-parseInt(_0x401678(0x169))/0x2)+parseInt(_0x401678(0x1c1))/0x3*(-parseInt(_0x401678(0x1b2))/0x4)+parseInt(_0x401678(0x158))/0x5+-parseInt(_0x401678(0x164))/0x6+-parseInt(_0x401678(0x145))/0x7*(parseInt(_0x401678(0x146))/0x8)+parseInt(_0x401678(0x191))/0x9+parseInt(_0x401678(0x174))/0xa;if(_0x70c790===_0x524b19)break;else _0x55a029['push'](_0x55a029['shift']());}catch(_0x284b90){_0x55a029['push'](_0x55a029['shift']());}}}(a188_0x42bc,0x51683));export const CLI_BIN_NAME=a188_0x202215(0x17c);export const CLI_DISPLAY_NAME=a188_0x202215(0x176);export const NPM_PACKAGE_NAME=a188_0x202215(0x19f);export const GLOBAL_FLAGS=[{'name':a188_0x202215(0x19b),'meowKey':a188_0x202215(0x19b),'type':a188_0x202215(0x1a1),'description':'Override\x20appcode','hint':a188_0x202215(0x160)},{'name':'app','meowKey':a188_0x202215(0x19e),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x148),'hint':a188_0x202215(0x18b)},{'name':a188_0x202215(0x18f),'meowKey':'env','type':a188_0x202215(0x1a1),'description':'Environment','hint':a188_0x202215(0x179)},{'name':'format','meowKey':a188_0x202215(0x193),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x1a6),'hint':a188_0x202215(0x1b1)},{'name':'jq','meowKey':'jq','type':'string','description':a188_0x202215(0x161),'hint':a188_0x202215(0x15b)},{'name':a188_0x202215(0x19d),'meowKey':'dryRun','type':a188_0x202215(0x1b5),'description':a188_0x202215(0x16d)},{'name':a188_0x202215(0x1b7),'meowKey':a188_0x202215(0x1b7),'type':a188_0x202215(0x1b5),'description':a188_0x202215(0x16a)},{'name':'non-interactive','meowKey':a188_0x202215(0x166),'type':a188_0x202215(0x1b5),'description':a188_0x202215(0x1bd)},{'name':'global','meowKey':a188_0x202215(0x186),'type':a188_0x202215(0x1b5),'description':a188_0x202215(0x13c)},{'name':a188_0x202215(0x1a5),'meowKey':a188_0x202215(0x1a5),'type':a188_0x202215(0x1b5),'description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a188_0x202215(0x1b5),'description':a188_0x202215(0x13b),'hidden':!![]},{'name':'help','meowKey':a188_0x202215(0x140),'type':a188_0x202215(0x1b5),'description':a188_0x202215(0x1a0)},{'name':'name','meowKey':a188_0x202215(0x1af),'type':'string','description':a188_0x202215(0x187),'hidden':!![]},{'name':'title','meowKey':a188_0x202215(0x172),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x1b6),'hidden':!![]},{'name':a188_0x202215(0x1c0),'meowKey':a188_0x202215(0x1c0),'type':'boolean','description':a188_0x202215(0x16c),'hidden':!![]},{'name':a188_0x202215(0x188),'meowKey':a188_0x202215(0x188),'type':a188_0x202215(0x1b5),'description':a188_0x202215(0x184),'hidden':!![]},{'name':a188_0x202215(0x156),'meowKey':a188_0x202215(0x156),'type':a188_0x202215(0x1a1),'description':'Output\x20path','hidden':!![]},{'name':a188_0x202215(0x13d),'meowKey':'params','type':'string','description':a188_0x202215(0x15e),'hidden':!![]},{'name':a188_0x202215(0x1ba),'meowKey':'datasetcode','type':a188_0x202215(0x1a1),'description':a188_0x202215(0x1a8),'hidden':!![]},{'name':a188_0x202215(0x1a9),'meowKey':a188_0x202215(0x1a9),'type':'boolean','description':'Apply\x20to\x20all','hidden':!![]},{'name':a188_0x202215(0x15a),'meowKey':a188_0x202215(0x150),'type':a188_0x202215(0x1b5),'description':a188_0x202215(0x1aa),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':'Record\x20ID','hidden':!![]},{'name':a188_0x202215(0x15d),'meowKey':'type','type':a188_0x202215(0x1a1),'description':'Type\x20filter','hidden':!![]},{'name':a188_0x202215(0x1a7),'meowKey':'file','type':a188_0x202215(0x1a1),'description':a188_0x202215(0x1ac),'hidden':!![]},{'name':a188_0x202215(0x180),'meowKey':a188_0x202215(0x180),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x18c),'hidden':!![]},{'name':'sql-name','meowKey':a188_0x202215(0x1ab),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x18e),'hidden':!![]},{'name':a188_0x202215(0x181),'meowKey':a188_0x202215(0x181),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x18e),'hidden':!![]},{'name':a188_0x202215(0x143),'meowKey':a188_0x202215(0x15c),'type':'string','description':a188_0x202215(0x154),'hidden':!![]},{'name':a188_0x202215(0x144),'meowKey':a188_0x202215(0x144),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x154),'hidden':!![]},{'name':a188_0x202215(0x183),'meowKey':a188_0x202215(0x183),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x175),'hidden':!![]},{'name':a188_0x202215(0x170),'meowKey':a188_0x202215(0x19a),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x14d),'hidden':!![]},{'name':a188_0x202215(0x18d),'meowKey':a188_0x202215(0x18d),'type':'string','description':a188_0x202215(0x141),'hidden':!![]},{'name':'pagesize','meowKey':a188_0x202215(0x13e),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x152),'hidden':!![]},{'name':a188_0x202215(0x194),'meowKey':'keyword','type':a188_0x202215(0x1a1),'description':a188_0x202215(0x197),'hidden':!![]},{'name':a188_0x202215(0x17f),'meowKey':a188_0x202215(0x17f),'type':'string','description':a188_0x202215(0x151),'hidden':!![]},{'name':a188_0x202215(0x14c),'meowKey':a188_0x202215(0x14c),'type':'string','description':a188_0x202215(0x165),'hidden':!![]},{'name':a188_0x202215(0x192),'meowKey':'schemas','type':a188_0x202215(0x1a1),'description':a188_0x202215(0x147),'hidden':!![]},{'name':a188_0x202215(0x1ae),'meowKey':'operation','type':a188_0x202215(0x1a1),'description':a188_0x202215(0x178),'hidden':!![]},{'name':'target','meowKey':a188_0x202215(0x1b9),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x198),'hidden':!![]},{'name':a188_0x202215(0x177),'meowKey':a188_0x202215(0x157),'type':'boolean','description':a188_0x202215(0x142),'hidden':!![]},{'name':a188_0x202215(0x1ad),'meowKey':a188_0x202215(0x1ad),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x14b),'hidden':!![]},{'name':a188_0x202215(0x1b8),'meowKey':a188_0x202215(0x1b8),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x153),'hidden':!![]},{'name':a188_0x202215(0x182),'meowKey':a188_0x202215(0x182),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x155),'hidden':!![]},{'name':a188_0x202215(0x1bb),'meowKey':a188_0x202215(0x1bb),'type':a188_0x202215(0x1b5),'description':a188_0x202215(0x18a),'hidden':!![]},{'name':a188_0x202215(0x185),'meowKey':a188_0x202215(0x168),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x171),'hidden':!![]},{'name':a188_0x202215(0x190),'meowKey':a188_0x202215(0x190),'type':a188_0x202215(0x1b5),'description':'Reveal\x20sensitive\x20value','hidden':!![]},{'name':'force','meowKey':a188_0x202215(0x16f),'type':'boolean','description':'Force\x20overwrite','hidden':!![]},{'name':a188_0x202215(0x149),'meowKey':'confirm','type':a188_0x202215(0x1b5),'description':'Confirm\x20destructive\x20action','hidden':!![]},{'name':a188_0x202215(0x173),'meowKey':a188_0x202215(0x173),'type':a188_0x202215(0x1b5),'description':'Use\x20remote','hidden':!![]},{'name':'verbose','meowKey':a188_0x202215(0x1bf),'type':a188_0x202215(0x1b5),'description':a188_0x202215(0x167),'hidden':!![]},{'name':a188_0x202215(0x189),'meowKey':'expectedCount','type':a188_0x202215(0x1a1),'description':a188_0x202215(0x196),'hidden':!![]},{'name':a188_0x202215(0x17a),'meowKey':a188_0x202215(0x17a),'type':'string','description':a188_0x202215(0x199),'hidden':!![]},{'name':a188_0x202215(0x14a),'meowKey':'parentId','type':a188_0x202215(0x1a1),'description':'Parent\x20menu\x20id','hidden':!![]},{'name':a188_0x202215(0x16e),'meowKey':'sort','type':a188_0x202215(0x1a1),'description':'Menu\x20sort\x20value','hidden':!![]},{'name':a188_0x202215(0x14f),'meowKey':'expectParentId','type':a188_0x202215(0x1a1),'description':'Expected\x20current\x20parent\x20menu\x20id','hidden':!![]},{'name':a188_0x202215(0x1a2),'meowKey':a188_0x202215(0x16b),'type':'string','description':a188_0x202215(0x162),'hidden':!![]},{'name':a188_0x202215(0x15f),'meowKey':a188_0x202215(0x17e),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x159),'hidden':!![]},{'name':a188_0x202215(0x1b4),'meowKey':a188_0x202215(0x1a4),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x17d),'hidden':!![]},{'name':a188_0x202215(0x19c),'meowKey':a188_0x202215(0x13f),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x1b3),'hidden':!![]},{'name':a188_0x202215(0x163),'meowKey':a188_0x202215(0x1bc),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x178),'hidden':!![]},{'name':a188_0x202215(0x1be),'meowKey':a188_0x202215(0x195),'type':a188_0x202215(0x1a1),'description':a188_0x202215(0x1c2),'hidden':!![]}];function a188_0x38f4(_0xca5da6,_0x42af42){_0xca5da6=_0xca5da6-0x13b;const _0x42bc7e=a188_0x42bc();let _0x38f447=_0x42bc7e[_0xca5da6];return _0x38f447;}export const PIPELINE_FLAG_NAMES=new Set([a188_0x202215(0x19b),a188_0x202215(0x19e),a188_0x202215(0x18f),a188_0x202215(0x193),'jq',a188_0x202215(0x19d),'yes','non-interactive','ci']);export function buildMeowFlags(){const _0x48a0ec=a188_0x202215;return Object[_0x48a0ec(0x1a3)](GLOBAL_FLAGS[_0x48a0ec(0x1b0)](_0x201eb6=>[_0x201eb6[_0x48a0ec(0x17b)],{'type':_0x201eb6[_0x48a0ec(0x15d)]}]));}
|
|
1
|
+
const a188_0xe113cf=a188_0x50ed;(function(_0x50953b,_0x3e4192){const _0x2b1d76=a188_0x50ed,_0x10d106=_0x50953b();while(!![]){try{const _0x30dd51=parseInt(_0x2b1d76(0xcc))/0x1+-parseInt(_0x2b1d76(0xdb))/0x2+-parseInt(_0x2b1d76(0xec))/0x3*(-parseInt(_0x2b1d76(0xff))/0x4)+parseInt(_0x2b1d76(0xd8))/0x5+-parseInt(_0x2b1d76(0x120))/0x6*(parseInt(_0x2b1d76(0xd6))/0x7)+parseInt(_0x2b1d76(0xfb))/0x8+-parseInt(_0x2b1d76(0x13a))/0x9;if(_0x30dd51===_0x3e4192)break;else _0x10d106['push'](_0x10d106['shift']());}catch(_0x4a4e4c){_0x10d106['push'](_0x10d106['shift']());}}}(a188_0xdfbc,0xf1a38));export const CLI_BIN_NAME=a188_0xe113cf(0xcb);export const CLI_DISPLAY_NAME=a188_0xe113cf(0xd0);function a188_0x50ed(_0x494097,_0x1410bf){_0x494097=_0x494097-0xc4;const _0xdfbc8e=a188_0xdfbc();let _0x50ed40=_0xdfbc8e[_0x494097];return _0x50ed40;}export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a188_0xe113cf(0x13e),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xee),'hint':'<code>'},{'name':'app','meowKey':a188_0xe113cf(0xdd),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x13d),'hint':a188_0xe113cf(0x124)},{'name':a188_0xe113cf(0xf0),'meowKey':a188_0xe113cf(0xf0),'type':'string','description':'Environment','hint':a188_0xe113cf(0xed)},{'name':a188_0xe113cf(0x105),'meowKey':a188_0xe113cf(0x105),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xea),'hint':a188_0xe113cf(0xeb)},{'name':'jq','meowKey':'jq','type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x129),'hint':'<expr>'},{'name':a188_0xe113cf(0x128),'meowKey':a188_0xe113cf(0x109),'type':a188_0xe113cf(0x12d),'description':a188_0xe113cf(0xcd)},{'name':'yes','meowKey':a188_0xe113cf(0x12e),'type':a188_0xe113cf(0x12d),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a188_0xe113cf(0xd7),'meowKey':a188_0xe113cf(0xdc),'type':'boolean','description':a188_0xe113cf(0x12a)},{'name':a188_0xe113cf(0x104),'meowKey':a188_0xe113cf(0x104),'type':a188_0xe113cf(0x12d),'description':a188_0xe113cf(0xf4)},{'name':'project','meowKey':a188_0xe113cf(0x112),'type':'boolean','description':a188_0xe113cf(0xf5)},{'name':'ci','meowKey':'ci','type':a188_0xe113cf(0x12d),'description':a188_0xe113cf(0x134),'hidden':!![]},{'name':a188_0xe113cf(0xcf),'meowKey':'help','type':'boolean','description':a188_0xe113cf(0x10c)},{'name':a188_0xe113cf(0xd4),'meowKey':a188_0xe113cf(0xd4),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x102),'hidden':!![]},{'name':'title','meowKey':a188_0xe113cf(0x10e),'type':a188_0xe113cf(0xf7),'description':'Title','hidden':!![]},{'name':a188_0xe113cf(0xef),'meowKey':'clear','type':'boolean','description':'Clear','hidden':!![]},{'name':'watch','meowKey':a188_0xe113cf(0x13c),'type':a188_0xe113cf(0x12d),'description':a188_0xe113cf(0xe0),'hidden':!![]},{'name':'output','meowKey':a188_0xe113cf(0x108),'type':a188_0xe113cf(0xf7),'description':'Output\x20path','hidden':!![]},{'name':a188_0xe113cf(0x10d),'meowKey':a188_0xe113cf(0x10d),'type':a188_0xe113cf(0xf7),'description':'JSON\x20params','hidden':!![]},{'name':a188_0xe113cf(0x107),'meowKey':a188_0xe113cf(0x107),'type':a188_0xe113cf(0xf7),'description':'Dataset\x20code','hidden':!![]},{'name':a188_0xe113cf(0xd1),'meowKey':'all','type':a188_0xe113cf(0x12d),'description':a188_0xe113cf(0xdf),'hidden':!![]},{'name':a188_0xe113cf(0x101),'meowKey':a188_0xe113cf(0xfa),'type':a188_0xe113cf(0x12d),'description':a188_0xe113cf(0xf3),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':'Record\x20ID','hidden':!![]},{'name':a188_0xe113cf(0xe2),'meowKey':a188_0xe113cf(0xe2),'type':'string','description':a188_0xe113cf(0x10b),'hidden':!![]},{'name':'file','meowKey':a188_0xe113cf(0x11c),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x113),'hidden':!![]},{'name':a188_0xe113cf(0x11e),'meowKey':a188_0xe113cf(0x11e),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xca),'hidden':!![]},{'name':a188_0xe113cf(0x111),'meowKey':a188_0xe113cf(0x141),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xe4),'hidden':!![]},{'name':'sqlname','meowKey':'sqlname','type':a188_0xe113cf(0xf7),'description':'SQL\x20name','hidden':!![]},{'name':a188_0xe113cf(0x122),'meowKey':a188_0xe113cf(0xfc),'type':a188_0xe113cf(0xf7),'description':'DB\x20ID','hidden':!![]},{'name':a188_0xe113cf(0xc8),'meowKey':a188_0xe113cf(0xc8),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xde),'hidden':!![]},{'name':a188_0xe113cf(0xe6),'meowKey':a188_0xe113cf(0xe6),'type':'string','description':a188_0xe113cf(0xe3),'hidden':!![]},{'name':a188_0xe113cf(0xc5),'meowKey':a188_0xe113cf(0x11f),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x121),'hidden':!![]},{'name':a188_0xe113cf(0xe9),'meowKey':a188_0xe113cf(0xe9),'type':a188_0xe113cf(0xf7),'description':'Page\x20number','hidden':!![]},{'name':a188_0xe113cf(0x130),'meowKey':a188_0xe113cf(0x130),'type':'string','description':a188_0xe113cf(0x118),'hidden':!![]},{'name':a188_0xe113cf(0x12f),'meowKey':a188_0xe113cf(0x12f),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x11a),'hidden':!![]},{'name':'code','meowKey':a188_0xe113cf(0xe5),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xd2),'hidden':!![]},{'name':a188_0xe113cf(0xc4),'meowKey':'sql','type':a188_0xe113cf(0xf7),'description':'SQL\x20string','hidden':!![]},{'name':a188_0xe113cf(0x114),'meowKey':a188_0xe113cf(0x114),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x140),'hidden':!![]},{'name':a188_0xe113cf(0x115),'meowKey':a188_0xe113cf(0x115),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xf6),'hidden':!![]},{'name':a188_0xe113cf(0xfe),'meowKey':a188_0xe113cf(0xfe),'type':a188_0xe113cf(0xf7),'description':'Target\x20path','hidden':!![]},{'name':a188_0xe113cf(0x127),'meowKey':a188_0xe113cf(0x11d),'type':'boolean','description':a188_0xe113cf(0x138),'hidden':!![]},{'name':a188_0xe113cf(0x137),'meowKey':a188_0xe113cf(0x137),'type':'string','description':a188_0xe113cf(0x13f),'hidden':!![]},{'name':'value','meowKey':'value','type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x10f),'hidden':!![]},{'name':a188_0xe113cf(0x11b),'meowKey':a188_0xe113cf(0x11b),'type':'string','description':a188_0xe113cf(0xda),'hidden':!![]},{'name':a188_0xe113cf(0xe7),'meowKey':'stdin','type':a188_0xe113cf(0x12d),'description':a188_0xe113cf(0x10a),'hidden':!![]},{'name':'from-env','meowKey':'fromEnv','type':'string','description':'Read\x20value\x20from\x20environment\x20variable','hidden':!![]},{'name':a188_0xe113cf(0xfd),'meowKey':a188_0xe113cf(0xfd),'type':a188_0xe113cf(0x12d),'description':a188_0xe113cf(0xce),'hidden':!![]},{'name':a188_0xe113cf(0x117),'meowKey':a188_0xe113cf(0x117),'type':a188_0xe113cf(0x12d),'description':'Force\x20overwrite','hidden':!![]},{'name':a188_0xe113cf(0x133),'meowKey':a188_0xe113cf(0x133),'type':a188_0xe113cf(0x12d),'description':'Confirm\x20destructive\x20action','hidden':!![]},{'name':a188_0xe113cf(0x12c),'meowKey':'remote','type':a188_0xe113cf(0x12d),'description':'Use\x20remote','hidden':!![]},{'name':a188_0xe113cf(0xf1),'meowKey':a188_0xe113cf(0xf1),'type':a188_0xe113cf(0x12d),'description':a188_0xe113cf(0xd3),'hidden':!![]},{'name':a188_0xe113cf(0xd5),'meowKey':a188_0xe113cf(0x119),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x106),'hidden':!![]},{'name':a188_0xe113cf(0x116),'meowKey':a188_0xe113cf(0x116),'type':'string','description':'Menu\x20label','hidden':!![]},{'name':a188_0xe113cf(0x125),'meowKey':a188_0xe113cf(0xc7),'type':'string','description':a188_0xe113cf(0x13b),'hidden':!![]},{'name':a188_0xe113cf(0x139),'meowKey':'sort','type':'string','description':a188_0xe113cf(0xe8),'hidden':!![]},{'name':a188_0xe113cf(0x12b),'meowKey':'expectParentId','type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xf8),'hidden':!![]},{'name':a188_0xe113cf(0x100),'meowKey':'expectPath','type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x142),'hidden':!![]},{'name':'expected-children-count','meowKey':a188_0xe113cf(0x132),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xe1),'hidden':!![]},{'name':a188_0xe113cf(0x103),'meowKey':a188_0xe113cf(0xc9),'type':a188_0xe113cf(0xf7),'description':'Comma-separated\x20menu\x20IDs','hidden':!![]},{'name':'task-id','meowKey':a188_0xe113cf(0x126),'type':'string','description':a188_0xe113cf(0xc6),'hidden':!![]},{'name':a188_0xe113cf(0xf9),'meowKey':a188_0xe113cf(0x131),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xf6),'hidden':!![]},{'name':a188_0xe113cf(0x135),'meowKey':a188_0xe113cf(0x123),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xd9),'hidden':!![]}];function a188_0xdfbc(){const _0xd06ff3=['fromEntries','key','Skip\x20import\x20generation','sort','28830888rFZnlA','Parent\x20menu\x20id','watch','Select\x20app\x20profile\x20by\x20name','appcode','Config\x20key','Schemas','sqlName','Expected\x20current\x20menu\x20path','sql','description-file','Asynchronous\x20task\x20ID','parentId','dbid','menuIds','SQL\x20code','rabetbase','1104351lxypRf','Preview\x20operation\x20without\x20executing','Reveal\x20sensitive\x20value','help','Rabetbase\x20CLI','all','Code\x20filter','Verbose\x20output','name','expected-count','1967bwqMEh','non-interactive','9799110eJZpRT','Function\x20node','Tags','540306GhExVH','nonInteractive','app','DB\x20ID','Apply\x20to\x20all','Watch\x20mode','Expected\x20current\x20child\x20count','type','Description','SQL\x20name','code','description','stdin','Menu\x20sort\x20value','page','Output\x20format','json\x20|\x20pretty\x20|\x20compress','30CeUALs','production\x20|\x20daily','Override\x20appcode','clear','env','verbose','meowKey','Enable\x20BFF\x20save','Use\x20global\x20config\x20scope','Use\x20project\x20config\x20scope','Operation\x20type','string','Expected\x20current\x20parent\x20menu\x20id','operation-type','enableBffSave','15480240OONIdZ','dbId','reveal','target','105544wyIZoB','expect-path','enable-bff-save','Name','menu-ids','global','format','Expected\x20affected\x20count','datasetcode','output','dryRun','Read\x20value\x20from\x20stdin','Type\x20filter','Show\x20help','params','title','Config\x20value','map','sql-name','project','File\x20path','schemas','operation','label','force','Page\x20size','expectedCount','Keyword\x20filter','tags','file','skipImports','sqlcode','descriptionFile','17076Ztbxtq','Description\x20file','db-id','functionNode','<name>','parent-id','taskId','skip-imports','dry-run','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','Force\x20non-interactive\x20mode\x20(CI)','expect-parent-id','remote','boolean','yes','keyword','pagesize','operationType','expectedChildrenCount','confirm','Alias\x20for\x20--non-interactive','function-node'];a188_0xdfbc=function(){return _0xd06ff3;};return a188_0xdfbc();}export const PIPELINE_FLAG_NAMES=new Set(['appcode',a188_0xe113cf(0xdd),a188_0xe113cf(0xf0),a188_0xe113cf(0x105),'jq',a188_0xe113cf(0x128),a188_0xe113cf(0x12e),a188_0xe113cf(0xd7),'ci']);export function buildMeowFlags(){const _0xdb5c3a=a188_0xe113cf;return Object[_0xdb5c3a(0x136)](GLOBAL_FLAGS[_0xdb5c3a(0x110)](_0x1376f4=>[_0x1376f4[_0xdb5c3a(0xf2)],{'type':_0x1376f4['type']}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a189_0x514cf4=a189_0x2c9a;(function(_0x1a0051,_0xfce1b6){const _0x2c828b=a189_0x2c9a,_0x9e2455=_0x1a0051();while(!![]){try{const _0x20531b=-parseInt(_0x2c828b(0xcd))/0x1+-parseInt(_0x2c828b(0xcb))/0x2*(parseInt(_0x2c828b(0xcc))/0x3)+parseInt(_0x2c828b(0xd0))/0x4+-parseInt(_0x2c828b(0xc6))/0x5*(-parseInt(_0x2c828b(0xce))/0x6)+parseInt(_0x2c828b(0xcf))/0x7+parseInt(_0x2c828b(0xc9))/0x8*(parseInt(_0x2c828b(0xca))/0x9)+-parseInt(_0x2c828b(0xc7))/0xa;if(_0x20531b===_0xfce1b6)break;else _0x9e2455['push'](_0x9e2455['shift']());}catch(_0x3079f8){_0x9e2455['push'](_0x9e2455['shift']());}}}(a189_0x3a7e,0x866e5));function a189_0x2c9a(_0x2df475,_0x33898b){_0x2df475=_0x2df475-0xc6;const _0x3a7e1b=a189_0x3a7e();let _0x2c9af2=_0x3a7e1b[_0x2df475];return _0x2c9af2;}import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a189_0x514cf4(0xd1),'format':a189_0x514cf4(0xc8),'locale':a189_0x514cf4(0xd3),'riskLevel':a189_0x514cf4(0xd2),'apiDir':DEFAULT_API_DIR};function a189_0x3a7e(){const _0x598798=['942662LLjmZQ','7584gbpckW','6613362puRYMO','4238980RfisXb','production','high-risk-write','en-US','365LSHhxx','7634050FWeIcG','compress','10616StYfQW','7389ZEZdlG','4TRnhuP','1394331ofmuag'];a189_0x3a7e=function(){return _0x598798;};return a189_0x3a7e();}export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
|