@lovrabet/rabetbase-cli 2.3.4-beta.2 → 2.3.4-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/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/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x501a7b,_0x496fc8){const _0x3e3fd4=a157_0x5854,_0x436bf9=_0x501a7b();while(!![]){try{const _0x208c91=-parseInt(_0x3e3fd4(0x173))/0x1+-parseInt(_0x3e3fd4(0x16d))/0x2*(-parseInt(_0x3e3fd4(0x16f))/0x3)+parseInt(_0x3e3fd4(0x16e))/0x4+-parseInt(_0x3e3fd4(0x177))/0x5+-parseInt(_0x3e3fd4(0x16c))/0x6*(-parseInt(_0x3e3fd4(0x170))/0x7)+parseInt(_0x3e3fd4(0x174))/0x8*(-parseInt(_0x3e3fd4(0x176))/0x9)+parseInt(_0x3e3fd4(0x172))/0xa*(parseInt(_0x3e3fd4(0x168))/0xb);if(_0x208c91===_0x496fc8)break;else _0x436bf9['push'](_0x436bf9['shift']());}catch(_0x19e37d){_0x436bf9['push'](_0x436bf9['shift']());}}}(a157_0x1c07,0xd0791));function a157_0x5854(_0x359b18,_0x5be1ae){_0x359b18=_0x359b18-0x168;const _0x1c07b8=a157_0x1c07();let _0x5854c0=_0x1c07b8[_0x359b18];return _0x5854c0;}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function a157_0x1c07(){const _0x3460cd=['7829288gzvOsy','set','9tVZxDK','6747345rYpTWs','alias','utf-8','11IQwjbR','push','find','get','108ZGcnEU','21002wmUSQK','2434168SxjFXd','243UrJngJ','328139sSPaVi','api.ts','17743330raPPWB','895207vAYygO'];a157_0x1c07=function(){return _0x3460cd;};return a157_0x1c07();}function parseApiFile(_0x4143c6){const _0x161a6e=a157_0x5854,_0x393100=[],_0x180513=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x296a43;while((_0x296a43=_0x180513['exec'](_0x4143c6))!==null){_0x393100[_0x161a6e(0x169)]({'datasetCode':_0x296a43[0x1],'tableName':_0x296a43[0x2],'name':_0x296a43[0x3],'alias':_0x296a43[0x4]});}return _0x393100;}export function loadAliasMap(_0x241f3b,_0x433082,_0x315ab6){const _0xf4479e=a157_0x5854,_0x203096=_0x315ab6??resolve(process['cwd'](),_0x241f3b,_0xf4479e(0x171));if(cache['has'](_0x203096))return cache[_0xf4479e(0x16b)](_0x203096);if(!existsSync(_0x203096))return cache['set'](_0x203096,[]),[];try{const _0xa18bcc=readFileSync(_0x203096,_0xf4479e(0x179)),_0xc7cded=parseApiFile(_0xa18bcc);return cache['set'](_0x203096,_0xc7cded),_0xc7cded;}catch{return cache[_0xf4479e(0x175)](_0x203096,[]),[];}}export function resolveAlias(_0x4b6b18,_0x2108a6,_0x46ceab,_0x1ee68d){const _0x52bdae=a157_0x5854;if(!_0x2108a6)return undefined;const _0x4ee691=loadAliasMap(_0x4b6b18,_0x46ceab,_0x1ee68d),_0x38370d=_0x4ee691[_0x52bdae(0x16a)](_0x5a6269=>_0x5a6269[_0x52bdae(0x178)]===_0x2108a6);return _0x38370d?.['datasetCode'];}export function listAliases(_0x16661a,_0x310c33,_0x46aed1){return loadAliasMap(_0x16661a,_0x310c33,_0x46aed1);}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1a1e71,_0x2cf56f){const _0x4e9c9f=a158_0x2b98,_0x5ce546=_0x1a1e71();while(!![]){try{const _0x5ba673=-parseInt(_0x4e9c9f(0x1a2))/0x1*(parseInt(_0x4e9c9f(0x1d5))/0x2)+-parseInt(_0x4e9c9f(0x1a3))/0x3+-parseInt(_0x4e9c9f(0x16f))/0x4+parseInt(_0x4e9c9f(0x1da))/0x5*(-parseInt(_0x4e9c9f(0x18c))/0x6)+parseInt(_0x4e9c9f(0x1fe))/0x7*(parseInt(_0x4e9c9f(0x1cf))/0x8)+-parseInt(_0x4e9c9f(0x1ac))/0x9+parseInt(_0x4e9c9f(0x1b3))/0xa;if(_0x5ba673===_0x2cf56f)break;else _0x5ce546['push'](_0x5ce546['shift']());}catch(_0x5b3088){_0x5ce546['push'](_0x5ce546['shift']());}}}(a158_0x3fd0,0xa4b6b));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';let _activeCookie;export function setActiveCookie(_0x20621b){_activeCookie=_0x20621b||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530,ER_CONFIG_REQUEST_TIMEOUT_MS=0x1d4c0,TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS=0x2bf20;function createFetchFailureError(_0x2ff8a9,_0x3c3467){const _0x14f7f3=a158_0x2b98,_0xc9e900=_0x3c3467 instanceof Error?_0x3c3467['message']:String(_0x3c3467);return CliErrors[_0x14f7f3(0x188)](_0x14f7f3(0x197)+_0x2ff8a9+(_0xc9e900?'\x20('+_0xc9e900+')':''),_0x14f7f3(0x1db));}async function apiRequest(_0x13ea9b,_0x5f3dee={}){const _0x48d4aa=a158_0x2b98,{method:method=_0x48d4aa(0x19c),body:_0x426192,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0x5f3dee,_0x5eb0ba=useRuntime?getRuntimeDomain():getApiDomain(),_0x4c7248=_activeCookie||getCookie(),_0x1a2199=''+_0x5eb0ba+_0x13ea9b,_0x366146=new AbortController(),_0x5f018f=setTimeout(()=>_0x366146[_0x48d4aa(0x187)](),timeout);try{const _0x144155=await fetch(_0x1a2199,{'method':method,'headers':{'Content-Type':_0x48d4aa(0x1f6),'Cookie':_0x4c7248,'X-Invoke-Source':_0x48d4aa(0x1d9),...headers},'body':_0x426192?JSON[_0x48d4aa(0x189)](_0x426192):undefined,'signal':_0x366146[_0x48d4aa(0x1dc)]});let _0x222c22;try{_0x222c22=await _0x144155[_0x48d4aa(0x18f)]();}catch(_0x222c7e){if(_0x222c7e instanceof Error&&_0x222c7e[_0x48d4aa(0x1fa)]===_0x48d4aa(0x198))throw CliErrors[_0x48d4aa(0x188)](_0x48d4aa(0x1b7)+_0x1a2199);if(_0x144155['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors['apiError']('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x144155[_0x48d4aa(0x1a5)]+')',_0x144155[_0x48d4aa(0x1a5)]>=0x190?_0x48d4aa(0x18e):undefined);}if(!_0x144155['ok']||_0x222c22[_0x48d4aa(0x202)]===![])throw CliErrors[_0x48d4aa(0x188)](_0x222c22['errorMsg']||_0x222c22['message']||_0x48d4aa(0x1ef)+_0x144155['status'],_0x222c22[_0x48d4aa(0x182)]?_0x48d4aa(0x17b)+_0x222c22[_0x48d4aa(0x182)]:undefined);return _0x222c22;}catch(_0x2fc043){if(_0x2fc043 instanceof CliError)throw _0x2fc043;if(_0x2fc043 instanceof Error&&_0x2fc043[_0x48d4aa(0x1fa)]===_0x48d4aa(0x198))throw CliErrors['apiError'](_0x48d4aa(0x1b7)+_0x1a2199);throw createFetchFailureError(_0x1a2199,_0x2fc043);}finally{clearTimeout(_0x5f018f);}}function isAuthFailure(_0x6c85ce){const _0xc7b8e2=a158_0x2b98,_0x494dc1=_0x6c85ce['errorMsg']||_0x6c85ce[_0xc7b8e2(0x183)]||_0x6c85ce[_0xc7b8e2(0x170)]?.[_0xc7b8e2(0x183)]||_0x6c85ce[_0xc7b8e2(0x1e7)]||_0x6c85ce['error']||'';return _0x6c85ce[_0xc7b8e2(0x182)]===_0xc7b8e2(0x1e8)||_0x6c85ce[_0xc7b8e2(0x1d1)]===0x191||_0x6c85ce[_0xc7b8e2(0x1d1)]===_0xc7b8e2(0x17f)||_0x494dc1[_0xc7b8e2(0x1a0)]('401')||_0x494dc1[_0xc7b8e2(0x1a0)]('Unauthorized')||_0x494dc1['includes']('登录')||_0x494dc1[_0xc7b8e2(0x1a0)]('认证');}export async function platformFetch(_0x1848a7,_0x302a5a){const _0x44093b=a158_0x2b98;let _0x18120d;try{_0x18120d=await fetch(_0x1848a7,{'method':_0x302a5a['method']??'GET','headers':{'Content-Type':_0x44093b(0x1f6),'Cookie':_0x302a5a[_0x44093b(0x1b6)],'X-Invoke-Source':'cli:rabetbase'},..._0x302a5a['body']&&{'body':JSON[_0x44093b(0x189)](_0x302a5a['body'])}});}catch(_0x5609fa){throw createFetchFailureError(_0x1848a7,_0x5609fa);}if(!_0x18120d['ok']){if(_0x18120d[_0x44093b(0x1a5)]===0x191)throw CliErrors[_0x44093b(0x193)]();throw CliErrors[_0x44093b(0x188)](_0x302a5a['label']+_0x44093b(0x172)+_0x18120d[_0x44093b(0x1a5)]);}const _0x357bed=await _0x18120d[_0x44093b(0x18f)]();if(_0x357bed[_0x44093b(0x202)]===![]){if(isAuthFailure(_0x357bed))throw CliErrors['authRequired']();throw CliErrors[_0x44093b(0x188)](_0x357bed[_0x44093b(0x1f9)]||_0x357bed[_0x44093b(0x183)]||_0x302a5a['label']+_0x44093b(0x171));}return _0x357bed[_0x44093b(0x170)];}export async function listBffScripts(_0x2144c0,_0x419dd2,_0x39c1f2){const _0x12ae4a=a158_0x2b98;let _0x1cfc3d='/api/management/library/scripts/list?appCode='+_0x2144c0;if(_0x419dd2)_0x1cfc3d+='&type='+_0x419dd2;const _0x52424a=await apiRequest(_0x1cfc3d);let _0x25772c=extractList(_0x52424a[_0x12ae4a(0x170)]);if(_0x39c1f2?.[_0x12ae4a(0x1a8)]){const _0x5b4ab6=_0x39c1f2[_0x12ae4a(0x1a8)][_0x12ae4a(0x1e6)]();_0x25772c=_0x25772c['filter'](_0x2d8bda=>_0x2d8bda['functionName']?.[_0x12ae4a(0x1e6)]()[_0x12ae4a(0x1a0)](_0x5b4ab6)||_0x2d8bda[_0x12ae4a(0x1ba)]?.[_0x12ae4a(0x1e6)]()['includes'](_0x5b4ab6));}return _0x25772c;}export async function getBffScriptInfo(_0x5cc63f){const _0x2a4f1a=a158_0x2b98,_0x17bbb3=await apiRequest(_0x2a4f1a(0x1bd)+_0x5cc63f);if(!_0x17bbb3[_0x2a4f1a(0x170)])throw CliErrors['validation']('BFF\x20script\x20not\x20found:\x20id='+_0x5cc63f);return _0x17bbb3['data'];}export async function saveBffScript(_0x221255){const _0xedc3d3=a158_0x2b98,_0x51b916=await apiRequest('/api/management/library/scripts/save',{'method':_0xedc3d3(0x176),'body':_0x221255}),{id:_0x38ec0c,entity:_0x40177d}=normalizeEntityWithIdResponse(_0x51b916[_0xedc3d3(0x170)]);if(_0x38ec0c!==undefined){const _0x407add=typeof _0x40177d[_0xedc3d3(0x1a7)]===_0xedc3d3(0x1fb)||typeof _0x40177d[_0xedc3d3(0x1ff)]==='string'?_0x40177d:undefined;return{'id':_0x38ec0c,'script':_0x407add};}throw CliErrors[_0xedc3d3(0x188)](_0xedc3d3(0x1c0));}export async function deleteBffScript(_0x5d144b){const _0x40632a=a158_0x2b98;await apiRequest(_0x40632a(0x1af),{'method':_0x40632a(0x176),'body':{'id':_0x5d144b}});}export async function getBffScriptStatistics(_0x4e5f52){const _0x26be0f=a158_0x2b98,_0x2a71af=await apiRequest('/api/management/library/scripts/statistics?appCode='+_0x4e5f52);return extractList(_0x2a71af[_0x26be0f(0x170)]);}export async function clearBffScriptCache(){const _0x518cfc=a158_0x2b98,_0x2cf990=await apiRequest(_0x518cfc(0x190),{'method':_0x518cfc(0x176),'useRuntime':!![]});return typeof _0x2cf990[_0x518cfc(0x170)]===_0x518cfc(0x1fb)?_0x2cf990[_0x518cfc(0x170)]:'';}export async function listBffDatasetOperations(_0x3860c7,_0x20ef7d){const _0x7cfaf1=a158_0x2b98,_0x333eda=await apiRequest(_0x7cfaf1(0x1f4),{'method':_0x7cfaf1(0x176),'body':{'appCode':_0x3860c7,'datasetId':_0x20ef7d}});return _0x333eda[_0x7cfaf1(0x170)];}export async function listSqlQueries(_0x5c6e83,_0x268a4f){const _0x2d9049=a158_0x2b98,_0x5ed998=await apiRequest(_0x2d9049(0x203),{'method':_0x2d9049(0x176),'body':{'appCode':_0x5c6e83,'currentPage':_0x268a4f?.[_0x2d9049(0x192)]??0x1,'pageSize':_0x268a4f?.[_0x2d9049(0x1f5)]??0x32,'sqlCode':_0x268a4f?.[_0x2d9049(0x1a9)],'sqlName':_0x268a4f?.[_0x2d9049(0x1a4)]}});return _0x5ed998[_0x2d9049(0x170)];}export async function getSqlQueryInfo(_0x323e44,_0x3ebe20){const _0x5bacf5=a158_0x2b98,_0x239e4f=await listSqlQueries(_0x323e44,{'sqlCode':_0x3ebe20}),_0x1cbc7a=_0x239e4f[_0x5bacf5(0x1e5)]?.[0x0];if(!_0x1cbc7a)throw CliErrors['validation']('SQL\x20query\x20not\x20found:\x20'+_0x3ebe20);return _0x1cbc7a;}export async function getSqlQueryDetail(_0x44c361){const _0x18bda3=a158_0x2b98,_0x466c25=await apiRequest(_0x18bda3(0x1bc)+(_0x18bda3(0x167)+encodeURIComponent(_0x44c361)));if(!_0x466c25[_0x18bda3(0x170)])throw CliErrors['validation'](_0x18bda3(0x1ee)+_0x44c361);return _0x466c25[_0x18bda3(0x170)];}export async function getSqlQueryDetailById(_0x5e225a){const _0x31affa=a158_0x2b98,_0x1f2bcd=await apiRequest('/smartapi/custom/getUserCustomSql?id='+_0x5e225a);if(!_0x1f2bcd['data'])throw CliErrors[_0x31affa(0x1d7)](_0x31affa(0x184)+_0x5e225a);return _0x1f2bcd[_0x31affa(0x170)];}export async function createSqlQuery(_0x5b9535){const _0x2a4c81=a158_0x2b98,_0x2c6e47=await apiRequest(_0x2a4c81(0x1f3),{'method':_0x2a4c81(0x176),'body':_0x5b9535}),{id:_0x488780,entity:_0x517cc3}=normalizeEntityWithIdResponse(_0x2c6e47['data']);if(!('sqlCode'in _0x517cc3)&&_0x488780)return getSqlQueryDetailById(_0x488780);return normalizeSqlQueryEntity(_0x517cc3);}export async function updateSqlQuery(_0x5a351a){const _0x2906a8=a158_0x2b98,_0x120cc2=await apiRequest('/smartapi/custom/updateUserCustomSql',{'method':_0x2906a8(0x176),'body':_0x5a351a}),{id:_0x299c16,entity:_0x1bf4e0}=normalizeEntityWithIdResponse(_0x120cc2[_0x2906a8(0x170)]);if(!(_0x2906a8(0x1a9)in _0x1bf4e0)){if(_0x5a351a[_0x2906a8(0x1a9)])return getSqlQueryDetail(_0x5a351a[_0x2906a8(0x1a9)]);if(_0x299c16)return getSqlQueryDetailById(_0x299c16);}return normalizeSqlQueryEntity(_0x1bf4e0);}export async function deleteSqlQuery(_0xeab811){const _0x3205b7=a158_0x2b98;await apiRequest(_0x3205b7(0x17e),{'method':_0x3205b7(0x176),'body':_0xeab811});}export async function saveSqlQuery(_0x1465b2){const _0x4cd319=a158_0x2b98,_0x5e2b15=await apiRequest(_0x4cd319(0x201),{'method':_0x4cd319(0x176),'body':_0x1465b2});return _0x5e2b15[_0x4cd319(0x170)];}function normalizeSqlQueryEntity(_0x4aca02){const _0x5ea73f=a158_0x2b98;return{..._0x4aca02,'id':Number(_0x4aca02['id']),'dbId':_0x4aca02[_0x5ea73f(0x1b5)]==null?undefined:Number(_0x4aca02[_0x5ea73f(0x1b5)]),'version':_0x4aca02[_0x5ea73f(0x1b8)]==null?undefined:Number(_0x4aca02['version'])};}export async function executeSql(_0x545593,_0x49b418,_0x3bd4fb){const _0x11416b=a158_0x2b98,_0x5d1c01=await apiRequest(_0x11416b(0x1b9),{'method':_0x11416b(0x176),'body':{'appCode':_0x545593,'sqlCode':_0x49b418,..._0x3bd4fb&&{'params':_0x3bd4fb}},'useRuntime':!![]});return _0x5d1c01[_0x11416b(0x170)];}export async function executeDatasetDataOperation(_0x7f45e2,_0x12f2f5,_0x29220f,_0x27b7c3={}){const _0x3dddf2=a158_0x2b98;try{const _0x3087e8=await apiRequest(_0x3dddf2(0x1a1)+_0x7f45e2+'/'+_0x12f2f5+'/'+_0x29220f,{'method':'POST','body':_0x27b7c3,'useRuntime':!![]});return _0x3087e8[_0x3dddf2(0x170)];}catch(_0x3c2d43){if(_0x29220f===_0x3dddf2(0x205)&&_0x3c2d43 instanceof CliError&&_0x3c2d43['code']===_0x3dddf2(0x1d6)&&_0x27b7c3['id']!==undefined&&_0x27b7c3['id']!==null&&_0x27b7c3['id']!==''){const _0x1fecef=await apiRequest(_0x3dddf2(0x1a1)+_0x7f45e2+'/'+_0x12f2f5+'/filter',{'method':_0x3dddf2(0x176),'body':{'where':{'id':{'$eq':_0x27b7c3['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x37a2bc=Array[_0x3dddf2(0x1c8)](_0x1fecef[_0x3dddf2(0x170)]?.[_0x3dddf2(0x1e5)])?_0x1fecef['data'][_0x3dddf2(0x1e5)]:[];return _0x37a2bc[0x0]??null;}throw _0x3c2d43;}}export async function listDatasets(_0x1bf216,_0x180786){const _0x1b0e19=a158_0x2b98,_0x3d36b8={'appCode':_0x1bf216,'deleted':_0x180786?.[_0x1b0e19(0x1b1)]??![]};if(_0x180786?.[_0x1b0e19(0x1d1)])_0x3d36b8[_0x1b0e19(0x1d1)]=_0x180786[_0x1b0e19(0x1d1)];if(_0x180786?.['name'])_0x3d36b8['name']=_0x180786[_0x1b0e19(0x1fa)];const _0x416efb=await apiRequest(_0x1b0e19(0x17a),{'method':_0x1b0e19(0x176),'body':_0x3d36b8});return extractList(_0x416efb['data']);}export async function deleteDataset(_0x1f6b77,_0x56a4a3){const _0x43d69f=a158_0x2b98;await apiRequest(_0x43d69f(0x165),{'method':'POST','body':{'appCode':_0x1f6b77,'datasetId':_0x56a4a3}});}export async function restoreDataset(_0x57a3de,_0x425481){const _0x5c4647=a158_0x2b98;await apiRequest('/smartapi/dataset/restore-dataset',{'method':_0x5c4647(0x176),'body':{'appCode':_0x57a3de,'datasetId':_0x425481}});}export async function previewTextGeneratedDataset(_0x4395a7,_0x2fa98c){const _0x3656db=a158_0x2b98,_0x4fad7d=await apiRequest('/smartapi/dataset/text-generate/preview',{'method':_0x3656db(0x176),'body':{'appCode':_0x4395a7,'datasetName':_0x2fa98c[_0x3656db(0x1c2)],'requirementDescription':_0x2fa98c[_0x3656db(0x19b)]},'timeout':TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS});return _0x4fad7d[_0x3656db(0x170)];}export async function startTextGeneratedDataset(_0x3253b7,_0x4042cf,_0x35cfed){const _0x5e61e8=a158_0x2b98,_0x2684a7=await apiRequest(_0x5e61e8(0x1eb),{'method':_0x5e61e8(0x176),'body':{'appCode':_0x3253b7,..._0x35cfed?.['clientOperationId']?{'clientOperationId':_0x35cfed[_0x5e61e8(0x1d2)]}:{},'design':_0x4042cf},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x2684a7[_0x5e61e8(0x170)];}export async function getTextGeneratedDatasetStatus(_0x3c361e,_0x3e7ed9){const _0x15e69b=a158_0x2b98,_0x2f441f=new URLSearchParams({'appCode':_0x3c361e});_0x3e7ed9[_0x15e69b(0x1cb)]&&_0x2f441f['set']('operationId',_0x3e7ed9[_0x15e69b(0x1cb)]);_0x3e7ed9['clientOperationId']&&_0x2f441f['set']('clientOperationId',_0x3e7ed9[_0x15e69b(0x1d2)]);const _0x4b0be4=await apiRequest(_0x15e69b(0x194)+_0x2f441f[_0x15e69b(0x163)]());return _0x4b0be4[_0x15e69b(0x170)];}export async function searchDatasets(_0x2d4eb4,_0x2daa1a){const _0x358fa9=a158_0x2b98,_0x11d9c2=await listDatasets(_0x2d4eb4,{'name':_0x2daa1a}),_0x59a288=_0x2daa1a[_0x358fa9(0x1e6)](),_0x270fde=new Set(_0x11d9c2[_0x358fa9(0x19f)](_0x1760bd=>_0x1760bd['id'])),_0x24bc18=_0x11d9c2[_0x358fa9(0x1c1)](_0x391ba4=>_0x391ba4['dbtableConfig']?.['tableName']?.[_0x358fa9(0x1e6)]()[_0x358fa9(0x1a0)](_0x59a288)||_0x391ba4['description']?.[_0x358fa9(0x1e6)]()[_0x358fa9(0x1a0)](_0x59a288)),_0x405828=await listDatasets(_0x2d4eb4,{'code':_0x2daa1a});for(const _0x4a971f of _0x405828){!_0x270fde[_0x358fa9(0x16a)](_0x4a971f['id'])&&(_0x11d9c2[_0x358fa9(0x1aa)](_0x4a971f),_0x270fde[_0x358fa9(0x1ca)](_0x4a971f['id']));}return _0x11d9c2;}export function normalizeDatasetOperations(_0x2052bc){const _0x42ec65=a158_0x2b98;if(Array[_0x42ec65(0x1c8)](_0x2052bc))return _0x2052bc[_0x42ec65(0x1c1)](_0xcb9572=>_0xcb9572!=null&&typeof _0xcb9572==='object');if(_0x2052bc&&typeof _0x2052bc===_0x42ec65(0x178))return Object['entries'](_0x2052bc)[_0x42ec65(0x1c1)](([,_0x4a9835])=>_0x4a9835!=null&&typeof _0x4a9835===_0x42ec65(0x178))['map'](([_0x1a5c3b,_0x18968b])=>({..._0x18968b,'name':_0x18968b[_0x42ec65(0x1fa)]??_0x18968b['operationName']??_0x1a5c3b}));return[];}export async function getDatasetDetail(_0x44ade8){const _0x33a370=a158_0x2b98,_0x50746f=/^\d+$/[_0x33a370(0x19a)](_0x44ade8)?'id':'code',_0xd93db1=await apiRequest(_0x33a370(0x1cc)+_0x50746f+'='+_0x44ade8);return _0xd93db1[_0x33a370(0x170)];}export async function updateDrivenData(_0x350a0d){const _0x1e9195=a158_0x2b98,_0x112b1a=await apiRequest('/smartapi/dataset/update-driven-data',{'method':'POST','body':_0x350a0d});return _0x112b1a[_0x1e9195(0x170)];}export async function getDatasetOperations(_0x242efa){const _0x1135ab=a158_0x2b98,_0x41b603=await getDatasetDetail(_0x242efa),_0x1f5090=normalizeDatasetOperations(_0x41b603[_0x1135ab(0x1e1)])[_0x1135ab(0x19f)](_0x18fe5e=>({'name':_0x18fe5e[_0x1135ab(0x1fa)]||_0x18fe5e[_0x1135ab(0x1ae)],'displayName':_0x18fe5e[_0x1135ab(0x1c3)]||_0x18fe5e[_0x1135ab(0x1fa)],'type':_0x18fe5e['type'],'method':_0x18fe5e['method'],'path':_0x18fe5e[_0x1135ab(0x177)],'enabled':_0x18fe5e[_0x1135ab(0x1d0)]??!![],'requestFields':_0x18fe5e[_0x1135ab(0x185)],'responseFields':_0x18fe5e[_0x1135ab(0x17d)]}));return{'dataset':{'id':_0x41b603['id']??_0x41b603[_0x1135ab(0x169)],'name':_0x41b603[_0x1135ab(0x1fa)],'code':_0x41b603[_0x1135ab(0x1d1)]||_0x41b603[_0x1135ab(0x1e3)],'tableName':_0x41b603['tableName']||_0x41b603['dbtableConfig']?.[_0x1135ab(0x204)]},'operations':_0x1f5090};}export async function getOperationDetail(_0x5303b3,_0x4e4f40,_0x239e4e){const _0x450753=a158_0x2b98;let _0x264456=_0x4e4f40;if(!/^\d+$/[_0x450753(0x19a)](_0x4e4f40)){const _0x3e7684=await listDatasets(_0x5303b3,{'code':_0x4e4f40}),_0x2b5a6e=_0x3e7684[_0x450753(0x18b)](_0x89daf5=>_0x89daf5[_0x450753(0x1d1)]===_0x4e4f40||String(_0x89daf5['id'])===_0x4e4f40);if(!_0x2b5a6e)throw CliErrors[_0x450753(0x1d7)](_0x450753(0x18d)+_0x4e4f40);_0x264456=String(_0x2b5a6e['id']);}const _0xfc2feb=await getDatasetDetail(_0x264456),_0x1f8409=normalizeDatasetOperations(_0xfc2feb[_0x450753(0x1e1)])[_0x450753(0x18b)](_0x4b3548=>(_0x4b3548['name']||_0x4b3548['operationName'])===_0x239e4e);if(!_0x1f8409)throw CliErrors[_0x450753(0x1d7)](_0x450753(0x19d)+_0x239e4e+'\x22\x20not\x20found\x20in\x20dataset\x20'+_0x4e4f40);return{'dataset':{'id':_0xfc2feb['id']??_0xfc2feb[_0x450753(0x169)],'name':_0xfc2feb[_0x450753(0x1fa)],'code':_0xfc2feb['code']||_0xfc2feb[_0x450753(0x1e3)],'tableName':_0xfc2feb['tableName']||_0xfc2feb[_0x450753(0x1c5)]?.['tableName']},'operation':_0x1f8409};}export async function startGenerateStandardPages(_0x1bcedf,_0x2cef84,_0x58ef5b){const _0x2dbfa6=a158_0x2b98,_0x411a0b=await apiRequest(_0x2dbfa6(0x16d)+_0x2cef84+'/generate-standard-pages/start',{'method':'POST','body':{'appCode':_0x1bcedf,..._0x58ef5b?.['clientOperationId']?{'clientOperationId':_0x58ef5b[_0x2dbfa6(0x1d2)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x411a0b[_0x2dbfa6(0x170)];}export async function getGenerateStandardPagesStatus(_0x35aab2,_0x250fb8,_0x79fb47){const _0x4c82eb=a158_0x2b98,_0x2ce5ab=new URLSearchParams({'appCode':_0x35aab2});_0x79fb47[_0x4c82eb(0x1cb)]&&_0x2ce5ab[_0x4c82eb(0x196)](_0x4c82eb(0x1cb),_0x79fb47[_0x4c82eb(0x1cb)]);_0x79fb47[_0x4c82eb(0x1d2)]&&_0x2ce5ab[_0x4c82eb(0x196)](_0x4c82eb(0x1d2),_0x79fb47[_0x4c82eb(0x1d2)]);const _0x38f9ff=await apiRequest('/smartapi/lovrabet/dataset/'+_0x250fb8+'/generate-standard-pages/status?'+_0x2ce5ab[_0x4c82eb(0x163)]());return _0x38f9ff['data'];}export async function getStandardPageStatus(_0x5556db,_0x3da00f){const _0x51a528=a158_0x2b98,_0x49799c=await apiRequest(_0x51a528(0x16d)+_0x3da00f+_0x51a528(0x175)+encodeURIComponent(_0x5556db));return _0x49799c['data'];}export async function tryGetStandardPageStatus(_0x4d9680,_0x2537d6){const _0x3b7419=a158_0x2b98;try{return await getStandardPageStatus(_0x4d9680,_0x2537d6);}catch(_0x4d2d51){if(_0x4d2d51 instanceof CliError&&_0x4d2d51['code']===_0x3b7419(0x1d6)&&/404|not found|non-json response/i[_0x3b7419(0x19a)](_0x4d2d51[_0x3b7419(0x183)]))return null;throw _0x4d2d51;}}export async function syncStandardPages(_0x2d42b3,_0x55d6af){const _0x268359=a158_0x2b98,_0x5487c8=await apiRequest('/smartapi/lovrabet/dataset/'+_0x55d6af+'/sync-to-pages',{'method':'POST','body':{'appCode':_0x2d42b3}});return _0x5487c8[_0x268359(0x170)];}export async function getPageDetail(_0x1b9cbf){const _0x3ebab6=a158_0x2b98,_0xa9b574=await apiRequest('/smartapi/lovrabet/detail?pageId='+_0x1b9cbf);if(!_0xa9b574[_0x3ebab6(0x170)])throw CliErrors['validation']('Page\x20not\x20found:\x20'+_0x1b9cbf);return _0xa9b574[_0x3ebab6(0x170)];}export async function updatePage(_0x3e3df6,_0x4f0af7,_0x588354,_0xc217ce){const _0x339c33=a158_0x2b98,_0x7ca095=await apiRequest(_0x339c33(0x195),{'method':_0x339c33(0x176),'body':{'appCode':_0x3e3df6,'pageId':_0x4f0af7,'code':_0x588354,'datasetIds':_0xc217ce}});return _0x7ca095[_0x339c33(0x170)];}function a158_0x3fd0(){const _0x9cf7fa=['tags','abort','apiError','stringify','totalCount','find','438zzLVSx','Dataset\x20not\x20found:\x20','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','json','/api/management/script/cache/clear','/smartapi/dblink/create','currentPage','authRequired','/smartapi/dataset/text-generate/status?','/smartapi/lovrabet/update-page','set','Request\x20failed:\x20','AbortError','delete','test','requirementDescription','GET','Operation\x20\x22','const\x20results\x20=\x20data.execResult\x20||\x20[];','map','includes','/api/','136199omuHFh','1369965HbDdGx','sqlName','status','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','functionName','scriptName','sqlCode','push','/smartapi/question/er-config/erDelete','8552898KyZbKd','replace','operationName','/api/management/library/scripts/delete','/smartapi/dblink/delete','deleted','dataset_','36029400zKklnw','const\x20result\x20=\x20await\x20client.models.','dbId','cookie','Request\x20timeout:\x20','version','/api/custom/executeSql','description','appCode','/smartapi/custom/getUserCustomSql','/api/management/library/scripts/info?id=','.create({\x20/*\x20fields\x20*/\x20});','.filter({','BFF\x20save\x20returned\x20no\x20valid\x20id','filter','datasetName','displayName','\x20\x20return\x20rows;','dbtableConfig','planId','});','isArray','\x20\x20sqlCode:\x20\x27','add','operationId','/smartapi/dataset/get-driven-data?','/smartapi/dblink/update','tableList','217208QyhqKR','enabled','code','clientOperationId','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','16cMQwgf','api_error','validation','/smartapi/dblink/getTableDiffV2ByPage','cli:rabetbase','90775hzwRXH','Check\x20network\x20connectivity\x20and\x20try\x20again.','signal','\x20\x20currentPage:\x201,','/smartapi/question/er-config/update-single','update','/smartapi/question/er-config','operations','list','modelCode','/smartapi/dblink/getAllTableList','tableData','toLowerCase','errorMessage','UNAUTHORIZED','/smartapi/app-config/delete','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','/smartapi/dataset/text-generate/start','summary','length','SQL\x20query\x20not\x20found:\x20','API\x20error:\x20','join','/smartapi/question/er-config/erCreate','entries','/smartapi/custom/saveUserCustomSql','/smartapi/dataset/get-dataset-operation','pageSize','application/json','/smartapi/app/getList','\x20apps.\x20','errorMsg','name','string','//\x20','/smartapi/app-config/update','238zFYkmV','scriptType','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','/api/node-toolbox/sql/save','success','/smartapi/custom/queryUserCustomSqlList','tableName','getOne','includeImports','toString','create','/smartapi/dataset/delete-dataset','const\x20data\x20=\x20await\x20client.sql.execute({','?sqlCode=','target','modelId','has','warn','//\x20SQL:\x20','/smartapi/lovrabet/dataset/','.remove(id);','118092LhRxTe','data','\x20failed','\x20failed,\x20HTTP\x20','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','pageIndex','/standard-page-status?appCode=','POST','path','object','value','/smartapi/dataset/get-dataset-list','API\x20error\x20code:\x20','key','responseFields','/smartapi/custom/deleteUserCustomSql','401','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','sdk','errorCode','message','SQL\x20query\x20not\x20found:\x20id=','requestFields'];a158_0x3fd0=function(){return _0x9cf7fa;};return a158_0x3fd0();}export function generateSdkCode(_0x19fa26,_0x4254b8,_0x3b8e0d){const _0x33db3f=a158_0x2b98,_0x13679b=_0x3b8e0d?.[_0x33db3f(0x162)]??!![],_0xce1182=_0x33db3f(0x1b2)+_0x19fa26[_0x33db3f(0x1d1)]?.[_0x33db3f(0x1ad)](/-/g,'_'),_0x19d140=_0x4254b8['name']||_0x4254b8[_0x33db3f(0x1ae)]||_0x33db3f(0x1c1),_0x379424=[];_0x13679b&&_0x379424['push'](_0x33db3f(0x1ea),'',_0x33db3f(0x1a6),'');_0x379424[_0x33db3f(0x1aa)](_0x33db3f(0x1fc)+_0x19fa26[_0x33db3f(0x1fa)]+'\x20('+(_0x19fa26[_0x33db3f(0x204)]||'table')+')');if(_0x19d140===_0x33db3f(0x1c1))_0x379424['push'](_0x33db3f(0x1b4)+_0xce1182+_0x33db3f(0x1bf),'\x20\x20where:\x20{},','\x20\x20pageSize:\x2020,',_0x33db3f(0x1dd),_0x33db3f(0x1c7));else{if(_0x19d140===_0x33db3f(0x205))_0x379424['push']('const\x20result\x20=\x20await\x20client.models.'+_0xce1182+'.getOne(id);');else{if(_0x19d140===_0x33db3f(0x164))_0x379424[_0x33db3f(0x1aa)]('const\x20result\x20=\x20await\x20client.models.'+_0xce1182+_0x33db3f(0x1be));else{if(_0x19d140===_0x33db3f(0x1df))_0x379424['push']('const\x20result\x20=\x20await\x20client.models.'+_0xce1182+_0x33db3f(0x1d4));else _0x19d140===_0x33db3f(0x199)||_0x19d140==='remove'?_0x379424['push'](_0x33db3f(0x1b4)+_0xce1182+_0x33db3f(0x16e)):_0x379424[_0x33db3f(0x1aa)]('const\x20result\x20=\x20await\x20client.models.'+_0xce1182+'.'+_0x19d140+'(/*\x20params\x20*/);');}}}return _0x379424[_0x33db3f(0x1f0)]('\x0a');}export function generateSqlCodeTemplate(_0x3fe6a3,_0x49e232){const _0x56e4f9=a158_0x2b98,_0x5bd47a=_0x49e232?.[_0x56e4f9(0x168)]??_0x56e4f9(0x181),_0x49d2f7=_0x49e232?.[_0x56e4f9(0x162)]??!![],_0x8c2070=[];return _0x8c2070[_0x56e4f9(0x1aa)](_0x56e4f9(0x16c)+_0x3fe6a3[_0x56e4f9(0x1a4)]+'\x20('+_0x3fe6a3[_0x56e4f9(0x1a9)]+')'),_0x5bd47a===_0x56e4f9(0x181)?(_0x49d2f7&&_0x8c2070[_0x56e4f9(0x1aa)](_0x56e4f9(0x1ea),'',_0x56e4f9(0x1a6),''),_0x8c2070['push'](_0x56e4f9(0x166),_0x56e4f9(0x1c9)+_0x3fe6a3['sqlCode']+'\x27,',_0x56e4f9(0x200),_0x56e4f9(0x1c7),_0x56e4f9(0x180),_0x56e4f9(0x19e))):_0x8c2070['push'](_0x56e4f9(0x173),'export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','\x20\x20\x20\x20sqlCode:\x20\x27'+_0x3fe6a3['sqlCode']+'\x27,',_0x56e4f9(0x1d3),'\x20\x20});',_0x56e4f9(0x1c4),'}'),_0x8c2070[_0x56e4f9(0x1f0)]('\x0a');}export async function getErConfig(_0x5144fa,_0x3f0bd2){const _0xdffeb6=a158_0x2b98,_0x1807d2=await apiRequest(_0xdffeb6(0x1e0),{'method':_0xdffeb6(0x176),'body':{'appCode':_0x5144fa,'dblinkId':_0x3f0bd2},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x1807d2[_0xdffeb6(0x170)];}export async function createErRelation(_0xc0ee9c){const _0xe5078b=a158_0x2b98,_0xb44c69=await apiRequest(_0xe5078b(0x1f1),{'method':_0xe5078b(0x176),'body':_0xc0ee9c,'allowNonJsonSuccess':!![]});return _0xb44c69[_0xe5078b(0x170)];}export async function updateErRelation(_0x1ffe23){const _0x4aaf4e=a158_0x2b98,_0x5da7d9=await apiRequest(_0x4aaf4e(0x1de),{'method':_0x4aaf4e(0x176),'body':_0x1ffe23,'allowNonJsonSuccess':!![]});return _0x5da7d9[_0x4aaf4e(0x170)];}export async function deleteErRelation(_0x28637a){const _0x50fa96=a158_0x2b98,_0x1d9df0=await apiRequest(_0x50fa96(0x1ab),{'method':_0x50fa96(0x176),'body':_0x28637a,'allowNonJsonSuccess':!![]});return _0x1d9df0[_0x50fa96(0x170)];}export async function updateErBusinessGroup(_0x269c91){const _0x3dd0c2=a158_0x2b98,_0x58bc77=await apiRequest('/smartapi/question/er-config/business-group/edit',{'method':_0x3dd0c2(0x176),'body':_0x269c91,'allowNonJsonSuccess':!![]});return _0x58bc77[_0x3dd0c2(0x170)];}function buildQuery(_0x495087){const _0x1cf252=a158_0x2b98,_0xc5449=new URLSearchParams();for(const [_0x261fdd,_0x238510]of Object[_0x1cf252(0x1f2)](_0x495087)){if(_0x238510===undefined||_0x238510==='')continue;_0xc5449[_0x1cf252(0x196)](_0x261fdd,String(_0x238510));}const _0x54b2e5=_0xc5449[_0x1cf252(0x163)]();return _0x54b2e5?'?'+_0x54b2e5:'';}function a158_0x2b98(_0x32c18f,_0x5aff6a){_0x32c18f=_0x32c18f-0x162;const _0x3fd047=a158_0x3fd0();let _0x2b9823=_0x3fd047[_0x32c18f];return _0x2b9823;}export async function listAppConfigs(_0x6e582c,_0x28a19d){const _0x493450=a158_0x2b98,_0xe6a453=await apiRequest('/smartapi/app-config/list',{'method':_0x493450(0x176),'body':{'appCode':_0x6e582c,..._0x28a19d?.[_0x493450(0x17c)]?{'key':_0x28a19d[_0x493450(0x17c)]}:{},..._0x28a19d?.[_0x493450(0x186)]?{'tags':_0x28a19d['tags']}:{}}});return extractAppConfigList(_0xe6a453['data']);}export async function getAppConfigByKey(_0x23a005,_0x42ac39){const _0x5ad3f6=a158_0x2b98,_0x3da339=await apiRequest('/smartapi/app-config/getByKey'+buildQuery({'appCode':_0x23a005,'key':_0x42ac39}));return _0x3da339[_0x5ad3f6(0x170)]??null;}export async function createAppConfig(_0x10fd6b){const _0x8c5fc1=a158_0x2b98,_0x57fb86=await apiRequest('/smartapi/app-config/create',{'method':_0x8c5fc1(0x176),'body':{'appCode':_0x10fd6b[_0x8c5fc1(0x1bb)],'key':_0x10fd6b[_0x8c5fc1(0x17c)],'value':_0x10fd6b[_0x8c5fc1(0x179)],..._0x10fd6b[_0x8c5fc1(0x186)]?{'tags':_0x10fd6b[_0x8c5fc1(0x186)]}:{}}});return _0x57fb86[_0x8c5fc1(0x170)];}export async function updateAppConfig(_0x561d88){const _0x54c2de=a158_0x2b98;await apiRequest(_0x54c2de(0x1fd),{'method':_0x54c2de(0x176),'body':{'id':_0x561d88['id'],'appCode':_0x561d88[_0x54c2de(0x1bb)],'key':_0x561d88[_0x54c2de(0x17c)],'value':_0x561d88[_0x54c2de(0x179)],..._0x561d88[_0x54c2de(0x186)]?{'tags':_0x561d88[_0x54c2de(0x186)]}:{}}});}export async function deleteAppConfig(_0x46c124){const _0x2c91e8=a158_0x2b98;await apiRequest(_0x2c91e8(0x1e9),{'method':_0x2c91e8(0x176),'body':_0x46c124});}function extractAppConfigList(_0x3343fe){const _0x55278b=a158_0x2b98;if(Array[_0x55278b(0x1c8)](_0x3343fe))return _0x3343fe;if(_0x3343fe&&typeof _0x3343fe===_0x55278b(0x178)&&Array['isArray'](_0x3343fe[_0x55278b(0x1e2)]))return _0x3343fe[_0x55278b(0x1e2)];return extractList(_0x3343fe);}export async function listDbLinks(_0x59333b,_0x1660eb){const _0x170237=a158_0x2b98,_0x280fc6=await apiRequest('/smartapi/dblink/getList',{'method':_0x170237(0x176),'body':{'appCode':_0x59333b,'currentPage':_0x1660eb?.['currentPage']??0x1,'pageSize':_0x1660eb?.['pageSize']??0x64}});return{'items':extractList(_0x280fc6[_0x170237(0x170)]),'paging':extractPaging(_0x280fc6[_0x170237(0x170)])};}export async function getDbLinkInfo(_0x543d81){const _0x1cd325=a158_0x2b98,_0x42d73b=await apiRequest('/smartapi/dblink/getOne'+buildQuery({'id':_0x543d81}));return _0x42d73b[_0x1cd325(0x170)];}export async function createDbLink(_0x4b66ca){const _0x46bdb4=a158_0x2b98,_0x3b4804=await apiRequest(_0x46bdb4(0x191),{'method':_0x46bdb4(0x176),'body':_0x4b66ca});return _0x3b4804[_0x46bdb4(0x170)];}export async function updateDbLink(_0x2afeed){const _0x148f5c=a158_0x2b98,_0x404697=await apiRequest(_0x148f5c(0x1cd),{'method':_0x148f5c(0x176),'body':_0x2afeed});return _0x404697[_0x148f5c(0x170)];}export async function deleteDbLink(_0x5aaae5){const _0x9bce04=a158_0x2b98;await apiRequest(_0x9bce04(0x1b0),{'method':_0x9bce04(0x176),'body':{'id':_0x5aaae5}});}export async function testDbLinkConnect(_0x2af2f9){const _0x13c565=await apiRequest('/smartapi/dblink/testConnect'+buildQuery({'id':_0x2af2f9}));return _0x13c565['data'];}export async function startDbAnalysis(_0xb99caa,_0x304140){const _0x2d228d=a158_0x2b98,_0x59ab8d=await apiRequest('/smartapi/db-analysis/start',{'method':_0x2d228d(0x176),'body':{'dbLinkId':_0xb99caa,..._0x304140&&_0x304140[_0x2d228d(0x1ed)]>0x0?{'tableNames':_0x304140}:{}}}),_0x38e756=_0x59ab8d[_0x2d228d(0x170)];if(typeof _0x38e756==='string')return _0x38e756;if(_0x38e756&&typeof _0x38e756===_0x2d228d(0x178)&&typeof _0x38e756[_0x2d228d(0x1c6)]==='string')return _0x38e756[_0x2d228d(0x1c6)];return _0x38e756!=null?String(_0x38e756):'';}export async function cancelDbAnalysis(_0x27a92e){const _0x3ec0fe=a158_0x2b98;await apiRequest('/smartapi/db-analysis/jobs/cancel'+buildQuery({'planId':_0x27a92e}),{'method':_0x3ec0fe(0x176)});}export async function getDbAnalysisStatus(_0x557769){const _0x1c7ffe=a158_0x2b98,_0x576436=await apiRequest('/smartapi/db-analysis/status/'+encodeURIComponent(_0x557769));return _0x576436[_0x1c7ffe(0x170)];}export async function getDbAllTableList(_0x532332,_0x37057f){const _0x4f5b1a=a158_0x2b98,_0x266111=await apiRequest(_0x4f5b1a(0x1e4)+buildQuery({'appCode':_0x532332,'dbLinkId':_0x37057f})),_0x4bddd9=_0x266111[_0x4f5b1a(0x170)];if(Array[_0x4f5b1a(0x1c8)](_0x4bddd9))return _0x4bddd9;return extractList(_0x4bddd9);}export async function getDbTableDiff(_0x490a9e,_0x570625,_0x2c032a){const _0x561806=a158_0x2b98,_0x32a0b5=await apiRequest(_0x561806(0x1d8)+buildQuery({'appCode':_0x490a9e,'dbLinkId':_0x570625,'pageIndex':_0x2c032a?.[_0x561806(0x174)]??0x1,'pageSize':_0x2c032a?.[_0x561806(0x1f5)]??0x14,'tableName':_0x2c032a?.[_0x561806(0x204)]})),_0x122719=_0x32a0b5[_0x561806(0x170)];return{'totalCount':_0x122719?.[_0x561806(0x18a)]??0x0,'physicalTableCount':_0x122719?.['physicalTableCount']??0x0,'datasetTableCount':_0x122719?.['datasetTableCount']??0x0,..._0x122719?.[_0x561806(0x1ec)]?{'summary':_0x122719[_0x561806(0x1ec)]}:{},'tableList':Array[_0x561806(0x1c8)](_0x122719?.[_0x561806(0x1ce)])?_0x122719[_0x561806(0x1ce)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x48e36d=a158_0x2b98,_0x13a92a=await apiRequest(_0x48e36d(0x1f7),{'method':'POST','body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x22bc00=extractList(_0x13a92a[_0x48e36d(0x170)]),_0x2ab2f1=extractPaging(_0x13a92a['data']);return _0x2ab2f1&&_0x2ab2f1[_0x48e36d(0x18a)]>REMOTE_APP_PAGE_SIZE&&console[_0x48e36d(0x16b)]('Warning:\x20showing\x20first\x20'+REMOTE_APP_PAGE_SIZE+'\x20of\x20'+_0x2ab2f1['totalCount']+_0x48e36d(0x1f8)+'Use\x20the\x20platform\x20console\x20to\x20see\x20all.'),_0x22bc00;}
|
|
1
|
+
(function(_0x28373c,_0x31fd83){const _0x2749d5=a158_0x5e70,_0x33361b=_0x28373c();while(!![]){try{const _0x4c49b2=parseInt(_0x2749d5(0x222))/0x1+parseInt(_0x2749d5(0x1b4))/0x2+-parseInt(_0x2749d5(0x1b5))/0x3*(parseInt(_0x2749d5(0x1dc))/0x4)+parseInt(_0x2749d5(0x1b3))/0x5+parseInt(_0x2749d5(0x1ea))/0x6*(parseInt(_0x2749d5(0x1bb))/0x7)+-parseInt(_0x2749d5(0x20a))/0x8+-parseInt(_0x2749d5(0x1d0))/0x9;if(_0x4c49b2===_0x31fd83)break;else _0x33361b['push'](_0x33361b['shift']());}catch(_0x178fbd){_0x33361b['push'](_0x33361b['shift']());}}}(a158_0x4b98,0xcf8fe));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';let _activeCookie;function a158_0x4b98(){const _0x2de777=['/smartapi/dataset/get-dataset-list','dbId','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','remove','164ZeQmKR','401','tableList','/smartapi/question/er-config/cli/update-single','/smartapi/dataset/text-generate/preview','entries','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','operations','BFF\x20script\x20not\x20found:\x20id=','type','\x20\x20return\x20rows;','/smartapi/custom/getUserCustomSql?id=','&type=','dataset_','6wyroku','AbortError','API\x20error\x20code:\x20','/api/management/library/scripts/save','code','has','const\x20result\x20=\x20await\x20client.models.','abort','/sync-to-pages','toString','/smartapi/question/er-config/business-group/edit','/smartapi/db-analysis/start','pageIndex','/smartapi/lovrabet/detail?pageId=','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','test','physicalTableCount','deleted','sdk','/smartapi/dblink/create','/smartapi/dblink/getList','object','POST','table','map','\x20apps.\x20','enabled','//\x20SQL:\x20','description','version','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','find','12603520dNzrfg','pageSize','message','modelCode','/smartapi/lovrabet/dataset/','/smartapi/custom/getUserCustomSql','\x20\x20pageSize:\x2020,','join','\x20\x20where:\x20{},','/smartapi/app-config/delete','Page\x20not\x20found:\x20','/smartapi/dataset/get-dataset-operation','Warning:\x20showing\x20first\x20','tableData','includeImports','stringify','/api/management/library/scripts/delete','/smartapi/custom/saveUserCustomSql','filter','authRequired','dbtableConfig','/filter','/smartapi/dataset/text-generate/start','method','630139KiHffO','/smartapi/app/getList','list','apiError','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','update','\x20\x20sqlCode:\x20\x27','requirementDescription','/smartapi/dataset/update-driven-data','string','/api/','/api/management/library/scripts/statistics?appCode=','tableName','value','label','/smartapi/dblink/delete','clientOperationId','summary','});','target','/smartapi/dblink/getOne','Unauthorized','operationName','sqlCode','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','/smartapi/db-analysis/jobs/cancel','.getOne(id);','validation','functionName','warn','planId','body','set','application/json','json','sqlName','\x20failed','const\x20results\x20=\x20data.execResult\x20||\x20[];','push','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','operationId','name','/generate-standard-pages/status?','API\x20error:\x20','scriptType','scriptName','errorMessage','cli:rabetbase','/smartapi/dblink/update','/smartapi/custom/updateUserCustomSql','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','datasetTableCount','\x20of\x20','errorCode','key','?sqlCode=','/smartapi/question/er-config/cli/delete-single','cookie','currentPage','/smartapi/dblink/testConnect','7999965dTfPHe','726220BtZtRR','5637ByFdKa','/smartapi/custom/queryUserCustomSqlList','/smartapi/app-config/create','SQL\x20query\x20not\x20found:\x20id=','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','getOne','971341MrBQEw','/smartapi/dataset/delete-dataset','modelId','success','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','/smartapi/dataset/restore-dataset','/standard-page-status?appCode=','api_error','/smartapi/lovrabet/update-page','Dataset\x20not\x20found:\x20','Request\x20timeout:\x20','add','errorMsg','GET','includes','\x20\x20});','status','tags','toLowerCase','isArray','replace','2064168DIrobf','totalCount','const\x20data\x20=\x20await\x20client.sql.execute({','UNAUTHORIZED','data','path','/api/node-toolbox/sql/save','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly'];a158_0x4b98=function(){return _0x2de777;};return a158_0x4b98();}export function setActiveCookie(_0x10886c){_activeCookie=_0x10886c||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530,ER_CONFIG_REQUEST_TIMEOUT_MS=0x1d4c0,TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS=0x2bf20;function createFetchFailureError(_0x5247e6,_0x46fcf9){const _0x4f62ca=a158_0x5e70,_0x36d805=_0x46fcf9 instanceof Error?_0x46fcf9['message']:String(_0x46fcf9);return CliErrors[_0x4f62ca(0x225)]('Request\x20failed:\x20'+_0x5247e6+(_0x36d805?'\x20('+_0x36d805+')':''),'Check\x20network\x20connectivity\x20and\x20try\x20again.');}async function apiRequest(_0x196b9b,_0x1d5832={}){const _0x40f6a6=a158_0x5e70,{method:method='GET',body:_0xc2ab4a,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0x1d5832,_0x13538a=useRuntime?getRuntimeDomain():getApiDomain(),_0x3e44b4=_activeCookie||getCookie(),_0x29bf02=''+_0x13538a+_0x196b9b,_0x382477=new AbortController(),_0x59e56e=setTimeout(()=>_0x382477[_0x40f6a6(0x1f1)](),timeout);try{const _0x4c71a9=await fetch(_0x29bf02,{'method':method,'headers':{'Content-Type':_0x40f6a6(0x243),'Cookie':_0x3e44b4,'X-Invoke-Source':_0x40f6a6(0x1a6),...headers},'body':_0xc2ab4a?JSON[_0x40f6a6(0x219)](_0xc2ab4a):undefined,'signal':_0x382477['signal']});let _0x2adbfc;try{_0x2adbfc=await _0x4c71a9[_0x40f6a6(0x244)]();}catch(_0x5bc3e9){if(_0x5bc3e9 instanceof Error&&_0x5bc3e9[_0x40f6a6(0x24b)]===_0x40f6a6(0x1eb))throw CliErrors[_0x40f6a6(0x225)](_0x40f6a6(0x1c5)+_0x29bf02);if(_0x4c71a9['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors[_0x40f6a6(0x225)](_0x40f6a6(0x1da)+_0x4c71a9[_0x40f6a6(0x1cb)]+')',_0x4c71a9[_0x40f6a6(0x1cb)]>=0x190?_0x40f6a6(0x23a):undefined);}if(!_0x4c71a9['ok']||_0x2adbfc[_0x40f6a6(0x1be)]===![])throw CliErrors[_0x40f6a6(0x225)](_0x2adbfc[_0x40f6a6(0x1c7)]||_0x2adbfc[_0x40f6a6(0x20c)]||_0x40f6a6(0x1a2)+_0x4c71a9[_0x40f6a6(0x1cb)],_0x2adbfc[_0x40f6a6(0x1ac)]?_0x40f6a6(0x1ec)+_0x2adbfc[_0x40f6a6(0x1ac)]:undefined);return _0x2adbfc;}catch(_0x45d218){if(_0x45d218 instanceof CliError)throw _0x45d218;if(_0x45d218 instanceof Error&&_0x45d218[_0x40f6a6(0x24b)]===_0x40f6a6(0x1eb))throw CliErrors['apiError'](_0x40f6a6(0x1c5)+_0x29bf02);throw createFetchFailureError(_0x29bf02,_0x45d218);}finally{clearTimeout(_0x59e56e);}}function isAuthFailure(_0x38d408){const _0x237f98=a158_0x5e70,_0xfe579=_0x38d408[_0x237f98(0x1c7)]||_0x38d408[_0x237f98(0x20c)]||_0x38d408[_0x237f98(0x1d4)]?.[_0x237f98(0x20c)]||_0x38d408[_0x237f98(0x1a5)]||_0x38d408['error']||'';return _0x38d408[_0x237f98(0x1ac)]===_0x237f98(0x1d3)||_0x38d408[_0x237f98(0x1ee)]===0x191||_0x38d408[_0x237f98(0x1ee)]==='401'||_0xfe579[_0x237f98(0x1c9)](_0x237f98(0x1dd))||_0xfe579['includes'](_0x237f98(0x237))||_0xfe579[_0x237f98(0x1c9)]('登录')||_0xfe579[_0x237f98(0x1c9)]('认证');}export async function platformFetch(_0x1a609a,_0x438d4c){const _0x297186=a158_0x5e70;let _0x28f450;try{_0x28f450=await fetch(_0x1a609a,{'method':_0x438d4c[_0x297186(0x221)]??_0x297186(0x1c8),'headers':{'Content-Type':'application/json','Cookie':_0x438d4c[_0x297186(0x1b0)],'X-Invoke-Source':_0x297186(0x1a6)},..._0x438d4c[_0x297186(0x241)]&&{'body':JSON[_0x297186(0x219)](_0x438d4c[_0x297186(0x241)])}});}catch(_0xe65c48){throw createFetchFailureError(_0x1a609a,_0xe65c48);}if(!_0x28f450['ok']){if(_0x28f450[_0x297186(0x1cb)]===0x191)throw CliErrors[_0x297186(0x21d)]();throw CliErrors[_0x297186(0x225)](_0x438d4c['label']+'\x20failed,\x20HTTP\x20'+_0x28f450[_0x297186(0x1cb)]);}const _0x2d3627=await _0x28f450[_0x297186(0x244)]();if(_0x2d3627[_0x297186(0x1be)]===![]){if(isAuthFailure(_0x2d3627))throw CliErrors['authRequired']();throw CliErrors[_0x297186(0x225)](_0x2d3627['errorMsg']||_0x2d3627['message']||_0x438d4c[_0x297186(0x230)]+_0x297186(0x246));}return _0x2d3627[_0x297186(0x1d4)];}export async function listBffScripts(_0x562db1,_0x219249,_0x175633){const _0x3f02d1=a158_0x5e70;let _0x2789eb='/api/management/library/scripts/list?appCode='+_0x562db1;if(_0x219249)_0x2789eb+=_0x3f02d1(0x1e8)+_0x219249;const _0x20fe4a=await apiRequest(_0x2789eb);let _0x3c03e0=extractList(_0x20fe4a[_0x3f02d1(0x1d4)]);if(_0x175633?.[_0x3f02d1(0x1a4)]){const _0x1cf52e=_0x175633[_0x3f02d1(0x1a4)][_0x3f02d1(0x1cd)]();_0x3c03e0=_0x3c03e0[_0x3f02d1(0x21c)](_0x248e5b=>_0x248e5b[_0x3f02d1(0x23e)]?.[_0x3f02d1(0x1cd)]()[_0x3f02d1(0x1c9)](_0x1cf52e)||_0x248e5b[_0x3f02d1(0x206)]?.[_0x3f02d1(0x1cd)]()[_0x3f02d1(0x1c9)](_0x1cf52e));}return _0x3c03e0;}export async function getBffScriptInfo(_0xa6cdfb){const _0x1f4b87=a158_0x5e70,_0x127b9b=await apiRequest('/api/management/library/scripts/info?id='+_0xa6cdfb);if(!_0x127b9b[_0x1f4b87(0x1d4)])throw CliErrors[_0x1f4b87(0x23d)](_0x1f4b87(0x1e4)+_0xa6cdfb);return _0x127b9b[_0x1f4b87(0x1d4)];}export async function saveBffScript(_0x5cc817){const _0x44d3fe=a158_0x5e70,_0xf34620=await apiRequest(_0x44d3fe(0x1ed),{'method':'POST','body':_0x5cc817}),{id:_0x380d07,entity:_0x58903d}=normalizeEntityWithIdResponse(_0xf34620[_0x44d3fe(0x1d4)]);if(_0x380d07!==undefined){const _0x26669c=typeof _0x58903d[_0x44d3fe(0x23e)]===_0x44d3fe(0x22b)||typeof _0x58903d[_0x44d3fe(0x1a3)]===_0x44d3fe(0x22b)?_0x58903d:undefined;return{'id':_0x380d07,'script':_0x26669c};}throw CliErrors[_0x44d3fe(0x225)]('BFF\x20save\x20returned\x20no\x20valid\x20id');}export async function deleteBffScript(_0x4d0129){const _0x1f50d8=a158_0x5e70;await apiRequest(_0x1f50d8(0x21a),{'method':_0x1f50d8(0x200),'body':{'id':_0x4d0129}});}export async function getBffScriptStatistics(_0x3694b6){const _0x44861c=a158_0x5e70,_0x1f3ddf=await apiRequest(_0x44861c(0x22d)+_0x3694b6);return extractList(_0x1f3ddf[_0x44861c(0x1d4)]);}export async function clearBffScriptCache(){const _0x2ad66b=a158_0x5e70,_0x4b1dda=await apiRequest('/api/management/script/cache/clear',{'method':_0x2ad66b(0x200),'useRuntime':!![]});return typeof _0x4b1dda[_0x2ad66b(0x1d4)]===_0x2ad66b(0x22b)?_0x4b1dda['data']:'';}export async function listBffDatasetOperations(_0x1d5871,_0x436cc6){const _0x24f081=a158_0x5e70,_0xbe06b9=await apiRequest(_0x24f081(0x215),{'method':'POST','body':{'appCode':_0x1d5871,'datasetId':_0x436cc6}});return _0xbe06b9[_0x24f081(0x1d4)];}export async function listSqlQueries(_0x8c8744,_0x5bfe67){const _0x5f07cb=a158_0x5e70,_0xaac315=await apiRequest(_0x5f07cb(0x1b6),{'method':'POST','body':{'appCode':_0x8c8744,'currentPage':_0x5bfe67?.['currentPage']??0x1,'pageSize':_0x5bfe67?.[_0x5f07cb(0x20b)]??0x32,'sqlCode':_0x5bfe67?.[_0x5f07cb(0x239)],'sqlName':_0x5bfe67?.[_0x5f07cb(0x245)]}});return _0xaac315[_0x5f07cb(0x1d4)];}export async function getSqlQueryInfo(_0x90235e,_0xf9a25f){const _0x4021b8=a158_0x5e70,_0x2e6c0c=await listSqlQueries(_0x90235e,{'sqlCode':_0xf9a25f}),_0x43b3e0=_0x2e6c0c[_0x4021b8(0x217)]?.[0x0];if(!_0x43b3e0)throw CliErrors[_0x4021b8(0x23d)]('SQL\x20query\x20not\x20found:\x20'+_0xf9a25f);return _0x43b3e0;}export async function getSqlQueryDetail(_0xca8dea){const _0x29ae0c=a158_0x5e70,_0x32429b=await apiRequest(_0x29ae0c(0x20f)+(_0x29ae0c(0x1ae)+encodeURIComponent(_0xca8dea)));if(!_0x32429b[_0x29ae0c(0x1d4)])throw CliErrors[_0x29ae0c(0x23d)]('SQL\x20query\x20not\x20found:\x20'+_0xca8dea);return _0x32429b[_0x29ae0c(0x1d4)];}export async function getSqlQueryDetailById(_0x3e8ff2){const _0x19844d=a158_0x5e70,_0x1523d2=await apiRequest(_0x19844d(0x1e7)+_0x3e8ff2);if(!_0x1523d2[_0x19844d(0x1d4)])throw CliErrors['validation'](_0x19844d(0x1b8)+_0x3e8ff2);return _0x1523d2[_0x19844d(0x1d4)];}export async function createSqlQuery(_0x576ef2){const _0x28a40f=a158_0x5e70,_0x456620=await apiRequest(_0x28a40f(0x21b),{'method':_0x28a40f(0x200),'body':_0x576ef2}),{id:_0x1a2f25,entity:_0xecc2d5}=normalizeEntityWithIdResponse(_0x456620[_0x28a40f(0x1d4)]);if(!(_0x28a40f(0x239)in _0xecc2d5)&&_0x1a2f25)return getSqlQueryDetailById(_0x1a2f25);return normalizeSqlQueryEntity(_0xecc2d5);}export async function updateSqlQuery(_0x5168fe){const _0x5dcd42=a158_0x5e70,_0x527a2e=await apiRequest(_0x5dcd42(0x1a8),{'method':_0x5dcd42(0x200),'body':_0x5168fe}),{id:_0x4f8ad2,entity:_0x4b7192}=normalizeEntityWithIdResponse(_0x527a2e[_0x5dcd42(0x1d4)]);if(!(_0x5dcd42(0x239)in _0x4b7192)){if(_0x5168fe[_0x5dcd42(0x239)])return getSqlQueryDetail(_0x5168fe[_0x5dcd42(0x239)]);if(_0x4f8ad2)return getSqlQueryDetailById(_0x4f8ad2);}return normalizeSqlQueryEntity(_0x4b7192);}export async function deleteSqlQuery(_0x42ca93){const _0x190814=a158_0x5e70;await apiRequest('/smartapi/custom/deleteUserCustomSql',{'method':_0x190814(0x200),'body':_0x42ca93});}export async function saveSqlQuery(_0x1f48c9){const _0x505c17=a158_0x5e70,_0x13c980=await apiRequest(_0x505c17(0x1d6),{'method':'POST','body':_0x1f48c9});return _0x13c980['data'];}function a158_0x5e70(_0x4934c9,_0x53ac68){_0x4934c9=_0x4934c9-0x1a2;const _0x4b9897=a158_0x4b98();let _0x5e70cc=_0x4b9897[_0x4934c9];return _0x5e70cc;}function normalizeSqlQueryEntity(_0x105d7d){const _0x392ff2=a158_0x5e70;return{..._0x105d7d,'id':Number(_0x105d7d['id']),'dbId':_0x105d7d[_0x392ff2(0x1d9)]==null?undefined:Number(_0x105d7d[_0x392ff2(0x1d9)]),'version':_0x105d7d[_0x392ff2(0x207)]==null?undefined:Number(_0x105d7d[_0x392ff2(0x207)])};}export async function executeSql(_0x1642a9,_0x45c9fc,_0x186775){const _0x14055b=a158_0x5e70,_0x2a5f3b=await apiRequest('/api/custom/executeSql',{'method':_0x14055b(0x200),'body':{'appCode':_0x1642a9,'sqlCode':_0x45c9fc,..._0x186775&&{'params':_0x186775}},'useRuntime':!![]});return _0x2a5f3b[_0x14055b(0x1d4)];}export async function executeDatasetDataOperation(_0x12d850,_0xb9d32f,_0x2dbe82,_0x33a47d={}){const _0x52a1e1=a158_0x5e70;try{const _0x42ba72=await apiRequest(_0x52a1e1(0x22c)+_0x12d850+'/'+_0xb9d32f+'/'+_0x2dbe82,{'method':_0x52a1e1(0x200),'body':_0x33a47d,'useRuntime':!![]});return _0x42ba72[_0x52a1e1(0x1d4)];}catch(_0x3b22a7){if(_0x2dbe82===_0x52a1e1(0x1ba)&&_0x3b22a7 instanceof CliError&&_0x3b22a7[_0x52a1e1(0x1ee)]===_0x52a1e1(0x1c2)&&_0x33a47d['id']!==undefined&&_0x33a47d['id']!==null&&_0x33a47d['id']!==''){const _0x44cbbe=await apiRequest(_0x52a1e1(0x22c)+_0x12d850+'/'+_0xb9d32f+_0x52a1e1(0x21f),{'method':_0x52a1e1(0x200),'body':{'where':{'id':{'$eq':_0x33a47d['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0xe4a04a=Array['isArray'](_0x44cbbe[_0x52a1e1(0x1d4)]?.['tableData'])?_0x44cbbe['data'][_0x52a1e1(0x217)]:[];return _0xe4a04a[0x0]??null;}throw _0x3b22a7;}}export async function listDatasets(_0xbf79de,_0x3c07d0){const _0x1765c8=a158_0x5e70,_0x4be27a={'appCode':_0xbf79de,'deleted':_0x3c07d0?.[_0x1765c8(0x1fb)]??![]};if(_0x3c07d0?.[_0x1765c8(0x1ee)])_0x4be27a[_0x1765c8(0x1ee)]=_0x3c07d0['code'];if(_0x3c07d0?.[_0x1765c8(0x24b)])_0x4be27a[_0x1765c8(0x24b)]=_0x3c07d0[_0x1765c8(0x24b)];const _0x3ed395=await apiRequest(_0x1765c8(0x1d8),{'method':_0x1765c8(0x200),'body':_0x4be27a});return extractList(_0x3ed395[_0x1765c8(0x1d4)]);}export async function deleteDataset(_0x3bdcd0,_0x34cb01){const _0x1b840d=a158_0x5e70;await apiRequest(_0x1b840d(0x1bc),{'method':_0x1b840d(0x200),'body':{'appCode':_0x3bdcd0,'datasetId':_0x34cb01}});}export async function restoreDataset(_0x335c1a,_0x280484){const _0x6ba5b3=a158_0x5e70;await apiRequest(_0x6ba5b3(0x1c0),{'method':_0x6ba5b3(0x200),'body':{'appCode':_0x335c1a,'datasetId':_0x280484}});}export async function previewTextGeneratedDataset(_0x19d078,_0x4d09f2){const _0x27c857=a158_0x5e70,_0x8d1859=await apiRequest(_0x27c857(0x1e0),{'method':_0x27c857(0x200),'body':{'appCode':_0x19d078,'datasetName':_0x4d09f2['datasetName'],'requirementDescription':_0x4d09f2[_0x27c857(0x229)]},'timeout':TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS});return _0x8d1859[_0x27c857(0x1d4)];}export async function startTextGeneratedDataset(_0x4e4386,_0x15b984,_0x17e701){const _0x498c95=a158_0x5e70,_0x3ac9d4=await apiRequest(_0x498c95(0x220),{'method':_0x498c95(0x200),'body':{'appCode':_0x4e4386,..._0x17e701?.['clientOperationId']?{'clientOperationId':_0x17e701[_0x498c95(0x232)]}:{},'design':_0x15b984},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x3ac9d4[_0x498c95(0x1d4)];}export async function getTextGeneratedDatasetStatus(_0x3f662d,_0x39e8de){const _0x2a6b06=a158_0x5e70,_0x3ae8ec=new URLSearchParams({'appCode':_0x3f662d});_0x39e8de['operationId']&&_0x3ae8ec['set']('operationId',_0x39e8de[_0x2a6b06(0x24a)]);_0x39e8de[_0x2a6b06(0x232)]&&_0x3ae8ec[_0x2a6b06(0x242)](_0x2a6b06(0x232),_0x39e8de[_0x2a6b06(0x232)]);const _0x3a5b65=await apiRequest('/smartapi/dataset/text-generate/status?'+_0x3ae8ec[_0x2a6b06(0x1f3)]());return _0x3a5b65['data'];}export async function searchDatasets(_0x4b127f,_0x1d4603){const _0x1a31f1=a158_0x5e70,_0x4a5da0=await listDatasets(_0x4b127f,{'name':_0x1d4603}),_0x1a6977=_0x1d4603[_0x1a31f1(0x1cd)](),_0x397f9b=new Set(_0x4a5da0[_0x1a31f1(0x202)](_0x1ea1ed=>_0x1ea1ed['id'])),_0x3300a1=_0x4a5da0[_0x1a31f1(0x21c)](_0x38ffd7=>_0x38ffd7[_0x1a31f1(0x21e)]?.[_0x1a31f1(0x22e)]?.['toLowerCase']()[_0x1a31f1(0x1c9)](_0x1a6977)||_0x38ffd7[_0x1a31f1(0x206)]?.[_0x1a31f1(0x1cd)]()[_0x1a31f1(0x1c9)](_0x1a6977)),_0x388ec6=await listDatasets(_0x4b127f,{'code':_0x1d4603});for(const _0x142561 of _0x388ec6){!_0x397f9b[_0x1a31f1(0x1ef)](_0x142561['id'])&&(_0x4a5da0[_0x1a31f1(0x248)](_0x142561),_0x397f9b[_0x1a31f1(0x1c6)](_0x142561['id']));}return _0x4a5da0;}export function normalizeDatasetOperations(_0x5a834d){const _0xcede2c=a158_0x5e70;if(Array['isArray'](_0x5a834d))return _0x5a834d[_0xcede2c(0x21c)](_0x1468ee=>_0x1468ee!=null&&typeof _0x1468ee===_0xcede2c(0x1ff));if(_0x5a834d&&typeof _0x5a834d===_0xcede2c(0x1ff))return Object[_0xcede2c(0x1e1)](_0x5a834d)[_0xcede2c(0x21c)](([,_0x4627d4])=>_0x4627d4!=null&&typeof _0x4627d4===_0xcede2c(0x1ff))[_0xcede2c(0x202)](([_0x5d0232,_0x47d58c])=>({..._0x47d58c,'name':_0x47d58c[_0xcede2c(0x24b)]??_0x47d58c[_0xcede2c(0x238)]??_0x5d0232}));return[];}export async function getDatasetDetail(_0x4ec8f6){const _0x1a364f=a158_0x5e70,_0x477e73=/^\d+$/['test'](_0x4ec8f6)?'id':_0x1a364f(0x1ee),_0x5ebd53=await apiRequest('/smartapi/dataset/get-driven-data?'+_0x477e73+'='+_0x4ec8f6);return _0x5ebd53['data'];}export async function updateDrivenData(_0x402204){const _0x37d768=a158_0x5e70,_0x2a659c=await apiRequest(_0x37d768(0x22a),{'method':_0x37d768(0x200),'body':_0x402204});return _0x2a659c[_0x37d768(0x1d4)];}export async function getDatasetOperations(_0x33cf99){const _0x30e80c=a158_0x5e70,_0x50c48e=await getDatasetDetail(_0x33cf99),_0x4620da=normalizeDatasetOperations(_0x50c48e[_0x30e80c(0x1e3)])[_0x30e80c(0x202)](_0x4fe678=>({'name':_0x4fe678['name']||_0x4fe678[_0x30e80c(0x238)],'displayName':_0x4fe678['displayName']||_0x4fe678[_0x30e80c(0x24b)],'type':_0x4fe678[_0x30e80c(0x1e5)],'method':_0x4fe678[_0x30e80c(0x221)],'path':_0x4fe678[_0x30e80c(0x1d5)],'enabled':_0x4fe678[_0x30e80c(0x204)]??!![],'requestFields':_0x4fe678['requestFields'],'responseFields':_0x4fe678['responseFields']}));return{'dataset':{'id':_0x50c48e['id']??_0x50c48e[_0x30e80c(0x1bd)],'name':_0x50c48e[_0x30e80c(0x24b)],'code':_0x50c48e[_0x30e80c(0x1ee)]||_0x50c48e['modelCode'],'tableName':_0x50c48e['tableName']||_0x50c48e[_0x30e80c(0x21e)]?.[_0x30e80c(0x22e)]},'operations':_0x4620da};}export async function getOperationDetail(_0x5a0db8,_0x59f97a,_0x2e3a32){const _0x3e06ac=a158_0x5e70;let _0xa70686=_0x59f97a;if(!/^\d+$/['test'](_0x59f97a)){const _0x163b61=await listDatasets(_0x5a0db8,{'code':_0x59f97a}),_0x521984=_0x163b61[_0x3e06ac(0x209)](_0x44196f=>_0x44196f[_0x3e06ac(0x1ee)]===_0x59f97a||String(_0x44196f['id'])===_0x59f97a);if(!_0x521984)throw CliErrors[_0x3e06ac(0x23d)](_0x3e06ac(0x1c4)+_0x59f97a);_0xa70686=String(_0x521984['id']);}const _0x513c2e=await getDatasetDetail(_0xa70686),_0x2e9ded=normalizeDatasetOperations(_0x513c2e[_0x3e06ac(0x1e3)])[_0x3e06ac(0x209)](_0x2db315=>(_0x2db315[_0x3e06ac(0x24b)]||_0x2db315[_0x3e06ac(0x238)])===_0x2e3a32);if(!_0x2e9ded)throw CliErrors[_0x3e06ac(0x23d)]('Operation\x20\x22'+_0x2e3a32+'\x22\x20not\x20found\x20in\x20dataset\x20'+_0x59f97a);return{'dataset':{'id':_0x513c2e['id']??_0x513c2e[_0x3e06ac(0x1bd)],'name':_0x513c2e[_0x3e06ac(0x24b)],'code':_0x513c2e[_0x3e06ac(0x1ee)]||_0x513c2e[_0x3e06ac(0x20d)],'tableName':_0x513c2e[_0x3e06ac(0x22e)]||_0x513c2e['dbtableConfig']?.['tableName']},'operation':_0x2e9ded};}export async function startGenerateStandardPages(_0x21673f,_0x3eb1be,_0x42685d){const _0x1dbb2f=a158_0x5e70,_0x309dfa=await apiRequest('/smartapi/lovrabet/dataset/'+_0x3eb1be+'/generate-standard-pages/start',{'method':_0x1dbb2f(0x200),'body':{'appCode':_0x21673f,..._0x42685d?.[_0x1dbb2f(0x232)]?{'clientOperationId':_0x42685d['clientOperationId']}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x309dfa[_0x1dbb2f(0x1d4)];}export async function getGenerateStandardPagesStatus(_0x5386e6,_0x44d74f,_0xd3c413){const _0x328353=a158_0x5e70,_0x59be83=new URLSearchParams({'appCode':_0x5386e6});_0xd3c413[_0x328353(0x24a)]&&_0x59be83[_0x328353(0x242)](_0x328353(0x24a),_0xd3c413['operationId']);_0xd3c413[_0x328353(0x232)]&&_0x59be83['set'](_0x328353(0x232),_0xd3c413[_0x328353(0x232)]);const _0x94c43c=await apiRequest(_0x328353(0x20e)+_0x44d74f+_0x328353(0x24c)+_0x59be83['toString']());return _0x94c43c[_0x328353(0x1d4)];}export async function getStandardPageStatus(_0x5ac79a,_0x52dd1f){const _0x33297c=a158_0x5e70,_0xbd9532=await apiRequest(_0x33297c(0x20e)+_0x52dd1f+_0x33297c(0x1c1)+encodeURIComponent(_0x5ac79a));return _0xbd9532['data'];}export async function tryGetStandardPageStatus(_0x5f0cbe,_0x272ff5){const _0x8dcfb1=a158_0x5e70;try{return await getStandardPageStatus(_0x5f0cbe,_0x272ff5);}catch(_0x1adc69){if(_0x1adc69 instanceof CliError&&_0x1adc69['code']===_0x8dcfb1(0x1c2)&&/404|not found|non-json response/i[_0x8dcfb1(0x1f9)](_0x1adc69[_0x8dcfb1(0x20c)]))return null;throw _0x1adc69;}}export async function syncStandardPages(_0x728a48,_0x4ec245){const _0x104c39=a158_0x5e70,_0xf8e719=await apiRequest(_0x104c39(0x20e)+_0x4ec245+_0x104c39(0x1f2),{'method':_0x104c39(0x200),'body':{'appCode':_0x728a48}});return _0xf8e719[_0x104c39(0x1d4)];}export async function getPageDetail(_0x54cada){const _0x3f09a8=a158_0x5e70,_0x8bd623=await apiRequest(_0x3f09a8(0x1f7)+_0x54cada);if(!_0x8bd623[_0x3f09a8(0x1d4)])throw CliErrors['validation'](_0x3f09a8(0x214)+_0x54cada);return _0x8bd623[_0x3f09a8(0x1d4)];}export async function updatePage(_0x46db75,_0xef95b8,_0x109ee2,_0x5924ac){const _0x5a438e=a158_0x5e70,_0x436db7=await apiRequest(_0x5a438e(0x1c3),{'method':'POST','body':{'appCode':_0x46db75,'pageId':_0xef95b8,'code':_0x109ee2,'datasetIds':_0x5924ac}});return _0x436db7[_0x5a438e(0x1d4)];}export function generateSdkCode(_0x430574,_0x299fd6,_0x53a33a){const _0x2fad95=a158_0x5e70,_0x370a7d=_0x53a33a?.[_0x2fad95(0x218)]??!![],_0xd63bab=_0x2fad95(0x1e9)+_0x430574[_0x2fad95(0x1ee)]?.[_0x2fad95(0x1cf)](/-/g,'_'),_0x4614e4=_0x299fd6[_0x2fad95(0x24b)]||_0x299fd6[_0x2fad95(0x238)]||'filter',_0xa54085=[];_0x370a7d&&_0xa54085['push'](_0x2fad95(0x1a9),'',_0x2fad95(0x1b9),'');_0xa54085['push']('//\x20'+_0x430574[_0x2fad95(0x24b)]+'\x20('+(_0x430574[_0x2fad95(0x22e)]||_0x2fad95(0x201))+')');if(_0x4614e4===_0x2fad95(0x21c))_0xa54085['push'](_0x2fad95(0x1f0)+_0xd63bab+'.filter({',_0x2fad95(0x212),_0x2fad95(0x210),'\x20\x20currentPage:\x201,',_0x2fad95(0x234));else{if(_0x4614e4===_0x2fad95(0x1ba))_0xa54085[_0x2fad95(0x248)]('const\x20result\x20=\x20await\x20client.models.'+_0xd63bab+_0x2fad95(0x23c));else{if(_0x4614e4==='create')_0xa54085[_0x2fad95(0x248)]('const\x20result\x20=\x20await\x20client.models.'+_0xd63bab+'.create({\x20/*\x20fields\x20*/\x20});');else{if(_0x4614e4===_0x2fad95(0x227))_0xa54085['push'](_0x2fad95(0x1f0)+_0xd63bab+_0x2fad95(0x226));else _0x4614e4==='delete'||_0x4614e4===_0x2fad95(0x1db)?_0xa54085[_0x2fad95(0x248)](_0x2fad95(0x1f0)+_0xd63bab+'.remove(id);'):_0xa54085['push'](_0x2fad95(0x1f0)+_0xd63bab+'.'+_0x4614e4+'(/*\x20params\x20*/);');}}}return _0xa54085[_0x2fad95(0x211)]('\x0a');}export function generateSqlCodeTemplate(_0x317bb5,_0x3776b6){const _0x4b7697=a158_0x5e70,_0x2e81dc=_0x3776b6?.[_0x4b7697(0x235)]??_0x4b7697(0x1fc),_0x1ec4c3=_0x3776b6?.[_0x4b7697(0x218)]??!![],_0x45be1e=[];return _0x45be1e['push'](_0x4b7697(0x205)+_0x317bb5[_0x4b7697(0x245)]+'\x20('+_0x317bb5[_0x4b7697(0x239)]+')'),_0x2e81dc==='sdk'?(_0x1ec4c3&&_0x45be1e[_0x4b7697(0x248)](_0x4b7697(0x1a9),'',_0x4b7697(0x1b9),''),_0x45be1e[_0x4b7697(0x248)](_0x4b7697(0x1d2),_0x4b7697(0x228)+_0x317bb5[_0x4b7697(0x239)]+'\x27,',_0x4b7697(0x1bf),_0x4b7697(0x234),_0x4b7697(0x1e2),_0x4b7697(0x247))):_0x45be1e['push'](_0x4b7697(0x1d7),'export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{',_0x4b7697(0x1f8),'\x20\x20\x20\x20sqlCode:\x20\x27'+_0x317bb5[_0x4b7697(0x239)]+'\x27,',_0x4b7697(0x208),_0x4b7697(0x1ca),_0x4b7697(0x1e6),'}'),_0x45be1e[_0x4b7697(0x211)]('\x0a');}export async function getErConfig(_0x340a70,_0x4ba27a){const _0x53f0e0=a158_0x5e70,_0x3ad09b=await apiRequest('/smartapi/question/er-config',{'method':'POST','body':{'appCode':_0x340a70,'dblinkId':_0x4ba27a},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x3ad09b[_0x53f0e0(0x1d4)];}export async function createErRelation(_0x151bd2){const _0x27dc8f=a158_0x5e70,_0x507206=await apiRequest('/smartapi/question/er-config/cli/erCreate',{'method':_0x27dc8f(0x200),'body':_0x151bd2,'allowNonJsonSuccess':!![]});return _0x507206[_0x27dc8f(0x1d4)];}export async function updateErRelation(_0x3d3efb){const _0x534a69=a158_0x5e70,_0x1a4478=await apiRequest(_0x534a69(0x1df),{'method':_0x534a69(0x200),'body':_0x3d3efb,'allowNonJsonSuccess':!![]});return _0x1a4478[_0x534a69(0x1d4)];}export async function deleteErRelation(_0xa6a10c){const _0x8e6f6f=a158_0x5e70,_0x58b8ab=await apiRequest(_0x8e6f6f(0x1af),{'method':'POST','body':_0xa6a10c,'allowNonJsonSuccess':!![]});return _0x58b8ab[_0x8e6f6f(0x1d4)];}export async function updateErBusinessGroup(_0x5cd314){const _0x47c6a0=a158_0x5e70,_0x53833b=await apiRequest(_0x47c6a0(0x1f4),{'method':_0x47c6a0(0x200),'body':_0x5cd314,'allowNonJsonSuccess':!![]});return _0x53833b[_0x47c6a0(0x1d4)];}function buildQuery(_0x4a2d57){const _0x45dad5=a158_0x5e70,_0x1cbae9=new URLSearchParams();for(const [_0x11927f,_0x3fa37a]of Object['entries'](_0x4a2d57)){if(_0x3fa37a===undefined||_0x3fa37a==='')continue;_0x1cbae9['set'](_0x11927f,String(_0x3fa37a));}const _0x100bcc=_0x1cbae9[_0x45dad5(0x1f3)]();return _0x100bcc?'?'+_0x100bcc:'';}export async function listAppConfigs(_0x17f2bf,_0x432217){const _0x42f262=a158_0x5e70,_0x10ba66=await apiRequest('/smartapi/app-config/list',{'method':_0x42f262(0x200),'body':{'appCode':_0x17f2bf,..._0x432217?.[_0x42f262(0x1ad)]?{'key':_0x432217[_0x42f262(0x1ad)]}:{},..._0x432217?.[_0x42f262(0x1cc)]?{'tags':_0x432217['tags']}:{}}});return extractAppConfigList(_0x10ba66[_0x42f262(0x1d4)]);}export async function getAppConfigByKey(_0x5d8251,_0x2a59b5){const _0x22eaa7=await apiRequest('/smartapi/app-config/getByKey'+buildQuery({'appCode':_0x5d8251,'key':_0x2a59b5}));return _0x22eaa7['data']??null;}export async function createAppConfig(_0x5d62e8){const _0x2e0313=a158_0x5e70,_0x56576a=await apiRequest(_0x2e0313(0x1b7),{'method':_0x2e0313(0x200),'body':{'appCode':_0x5d62e8['appCode'],'key':_0x5d62e8[_0x2e0313(0x1ad)],'value':_0x5d62e8[_0x2e0313(0x22f)],..._0x5d62e8[_0x2e0313(0x1cc)]?{'tags':_0x5d62e8['tags']}:{}}});return _0x56576a[_0x2e0313(0x1d4)];}export async function updateAppConfig(_0x54a5d7){const _0x178f4a=a158_0x5e70;await apiRequest('/smartapi/app-config/update',{'method':_0x178f4a(0x200),'body':{'id':_0x54a5d7['id'],'appCode':_0x54a5d7['appCode'],'key':_0x54a5d7[_0x178f4a(0x1ad)],'value':_0x54a5d7[_0x178f4a(0x22f)],..._0x54a5d7['tags']?{'tags':_0x54a5d7['tags']}:{}}});}export async function deleteAppConfig(_0x27d9be){const _0x39c492=a158_0x5e70;await apiRequest(_0x39c492(0x213),{'method':'POST','body':_0x27d9be});}function extractAppConfigList(_0x3266f4){const _0x82d7f3=a158_0x5e70;if(Array[_0x82d7f3(0x1ce)](_0x3266f4))return _0x3266f4;if(_0x3266f4&&typeof _0x3266f4===_0x82d7f3(0x1ff)&&Array[_0x82d7f3(0x1ce)](_0x3266f4[_0x82d7f3(0x224)]))return _0x3266f4[_0x82d7f3(0x224)];return extractList(_0x3266f4);}export async function listDbLinks(_0x4558ad,_0x52ed6c){const _0x54ba75=a158_0x5e70,_0x4b52c5=await apiRequest(_0x54ba75(0x1fe),{'method':_0x54ba75(0x200),'body':{'appCode':_0x4558ad,'currentPage':_0x52ed6c?.[_0x54ba75(0x1b1)]??0x1,'pageSize':_0x52ed6c?.[_0x54ba75(0x20b)]??0x64}});return{'items':extractList(_0x4b52c5[_0x54ba75(0x1d4)]),'paging':extractPaging(_0x4b52c5['data'])};}export async function getDbLinkInfo(_0x2767e3){const _0xa767b7=a158_0x5e70,_0x110c1e=await apiRequest(_0xa767b7(0x236)+buildQuery({'id':_0x2767e3}));return _0x110c1e[_0xa767b7(0x1d4)];}export async function createDbLink(_0x83d0d0){const _0x13d71a=a158_0x5e70,_0x1b6cba=await apiRequest(_0x13d71a(0x1fd),{'method':'POST','body':_0x83d0d0});return _0x1b6cba['data'];}export async function updateDbLink(_0x2a7f78){const _0x23563e=a158_0x5e70,_0x2a9f82=await apiRequest(_0x23563e(0x1a7),{'method':_0x23563e(0x200),'body':_0x2a7f78});return _0x2a9f82[_0x23563e(0x1d4)];}export async function deleteDbLink(_0x461600){const _0x386521=a158_0x5e70;await apiRequest(_0x386521(0x231),{'method':_0x386521(0x200),'body':{'id':_0x461600}});}export async function testDbLinkConnect(_0x462e44){const _0x593509=a158_0x5e70,_0x2324bb=await apiRequest(_0x593509(0x1b2)+buildQuery({'id':_0x462e44}));return _0x2324bb[_0x593509(0x1d4)];}export async function startDbAnalysis(_0x39836f,_0x1bbb38){const _0x8a433=a158_0x5e70,_0x53f8f0=await apiRequest(_0x8a433(0x1f5),{'method':_0x8a433(0x200),'body':{'dbLinkId':_0x39836f,..._0x1bbb38&&_0x1bbb38['length']>0x0?{'tableNames':_0x1bbb38}:{}}}),_0x218172=_0x53f8f0['data'];if(typeof _0x218172===_0x8a433(0x22b))return _0x218172;if(_0x218172&&typeof _0x218172===_0x8a433(0x1ff)&&typeof _0x218172['planId']===_0x8a433(0x22b))return _0x218172[_0x8a433(0x240)];return _0x218172!=null?String(_0x218172):'';}export async function cancelDbAnalysis(_0x575fc0){const _0x2747f5=a158_0x5e70;await apiRequest(_0x2747f5(0x23b)+buildQuery({'planId':_0x575fc0}),{'method':_0x2747f5(0x200)});}export async function getDbAnalysisStatus(_0x4466e4){const _0x4f0c9f=a158_0x5e70,_0x5c2194=await apiRequest('/smartapi/db-analysis/status/'+encodeURIComponent(_0x4466e4));return _0x5c2194[_0x4f0c9f(0x1d4)];}export async function getDbAllTableList(_0x4db957,_0x545217){const _0x99b65=a158_0x5e70,_0x5e7c74=await apiRequest('/smartapi/dblink/getAllTableList'+buildQuery({'appCode':_0x4db957,'dbLinkId':_0x545217})),_0x2ae298=_0x5e7c74[_0x99b65(0x1d4)];if(Array[_0x99b65(0x1ce)](_0x2ae298))return _0x2ae298;return extractList(_0x2ae298);}export async function getDbTableDiff(_0x2461e2,_0x347342,_0x112651){const _0x397bc2=a158_0x5e70,_0x48577c=await apiRequest('/smartapi/dblink/getTableDiffV2ByPage'+buildQuery({'appCode':_0x2461e2,'dbLinkId':_0x347342,'pageIndex':_0x112651?.[_0x397bc2(0x1f6)]??0x1,'pageSize':_0x112651?.['pageSize']??0x14,'tableName':_0x112651?.[_0x397bc2(0x22e)]})),_0x16e5b7=_0x48577c[_0x397bc2(0x1d4)];return{'totalCount':_0x16e5b7?.['totalCount']??0x0,'physicalTableCount':_0x16e5b7?.[_0x397bc2(0x1fa)]??0x0,'datasetTableCount':_0x16e5b7?.[_0x397bc2(0x1aa)]??0x0,..._0x16e5b7?.['summary']?{'summary':_0x16e5b7[_0x397bc2(0x233)]}:{},'tableList':Array[_0x397bc2(0x1ce)](_0x16e5b7?.[_0x397bc2(0x1de)])?_0x16e5b7[_0x397bc2(0x1de)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0xff74fa=a158_0x5e70,_0x45f8c9=await apiRequest(_0xff74fa(0x223),{'method':_0xff74fa(0x200),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x1fe023=extractList(_0x45f8c9[_0xff74fa(0x1d4)]),_0x1bf377=extractPaging(_0x45f8c9[_0xff74fa(0x1d4)]);return _0x1bf377&&_0x1bf377[_0xff74fa(0x1d1)]>REMOTE_APP_PAGE_SIZE&&console[_0xff74fa(0x23f)](_0xff74fa(0x216)+REMOTE_APP_PAGE_SIZE+_0xff74fa(0x1ab)+_0x1bf377[_0xff74fa(0x1d1)]+_0xff74fa(0x203)+_0xff74fa(0x249)),_0x1fe023;}
|
package/lib/core/bff/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a159_0x41fa(){const _0x1a4682=['/bff','100gcocxp','86713bQUegy','4BXrrkP','159320LfYsuB','1098jJGPgc','bff.lock.json','27ZGEQiH','903foxEaf','.rabetbase','526qMiDYt','140bLJnNt','715881nHubUd','2195988unOuHc','bff-trash','306800MBpAoc'];a159_0x41fa=function(){return _0x1a4682;};return a159_0x41fa();}const a159_0x5f51d5=a159_0xeee5;(function(_0x4addc2,_0x15d2a3){const _0x574f5d=a159_0xeee5,_0x446e19=_0x4addc2();while(!![]){try{const _0x41fe2f=parseInt(_0x574f5d(0x1a2))/0x1*(-parseInt(_0x574f5d(0x1a9))/0x2)+parseInt(_0x574f5d(0x1a4))/0x3*(-parseInt(_0x574f5d(0x1ab))/0x4)+-parseInt(_0x574f5d(0x1ac))/0x5+parseInt(_0x574f5d(0x1ad))/0x6*(parseInt(_0x574f5d(0x1a0))/0x7)+parseInt(_0x574f5d(0x1a7))/0x8*(parseInt(_0x574f5d(0x19f))/0x9)+parseInt(_0x574f5d(0x1a3))/0xa*(parseInt(_0x574f5d(0x1aa))/0xb)+parseInt(_0x574f5d(0x1a5))/0xc;if(_0x41fe2f===_0x15d2a3)break;else _0x446e19['push'](_0x446e19['shift']());}catch(_0x3d7b5b){_0x446e19['push'](_0x446e19['shift']());}}}(a159_0x41fa,0x2103b));import{resolve}from'node:path';function a159_0xeee5(_0x54fd0f,_0x477cad){_0x54fd0f=_0x54fd0f-0x19f;const _0x41fabc=a159_0x41fa();let _0xeee562=_0x41fabc[_0x54fd0f];return _0xeee562;}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a159_0x5f51d5(0x1a1),LOCK_FILE_NAME=a159_0x5f51d5(0x1ae),TRASH_DIR_NAME=a159_0x5f51d5(0x1a6);export function loadBffProjectConfig(_0x4bd4bc,_0x5337b3){const _0x29052c=a159_0x5f51d5,_0x390f7a=resolve(_0x5337b3??findProjectRootDirectory()),_0x2ca657=DOT_DIR+_0x29052c(0x1a8),_0x49f62a=_0x2ca657+'/'+_0x4bd4bc;return{'projectRoot':_0x390f7a,'appCode':_0x4bd4bc,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x2ca657,'scriptsRoot':_0x49f62a,'scriptsRootDir':resolve(_0x390f7a,DOT_DIR,'bff',_0x4bd4bc),'lockFilePath':resolve(_0x390f7a,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x390f7a,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a160_0x281c(_0x3e015c,_0x2f33f7){_0x3e015c=_0x3e015c-0x77;const _0x31bfc9=a160_0x31bf();let _0x281c14=_0x31bfc9[_0x3e015c];return _0x281c14;}const a160_0x24736e=a160_0x281c;(function(_0x3d6f9e,_0x1b6460){const _0x2e3414=a160_0x281c,_0x2ba85c=_0x3d6f9e();while(!![]){try{const _0x1855a4=-parseInt(_0x2e3414(0x90))/0x1*(-parseInt(_0x2e3414(0x7e))/0x2)+parseInt(_0x2e3414(0x7f))/0x3*(parseInt(_0x2e3414(0x80))/0x4)+-parseInt(_0x2e3414(0x9c))/0x5*(parseInt(_0x2e3414(0x91))/0x6)+-parseInt(_0x2e3414(0x97))/0x7*(-parseInt(_0x2e3414(0x9a))/0x8)+-parseInt(_0x2e3414(0x88))/0x9*(parseInt(_0x2e3414(0x86))/0xa)+parseInt(_0x2e3414(0x98))/0xb+-parseInt(_0x2e3414(0x8e))/0xc*(parseInt(_0x2e3414(0x7b))/0xd);if(_0x1855a4===_0x1b6460)break;else _0x2ba85c['push'](_0x2ba85c['shift']());}catch(_0x6663e0){_0x2ba85c['push'](_0x2ba85c['shift']());}}}(a160_0x31bf,0xc64e0));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join}from'node:path';function a160_0x31bf(){const _0x3e9884=['405fSisyx','1528tegeWg','push','includes','name','code','.js','198500QNPJhj','HOOK','99oYnWQN','split','endsWith','afterScriptId','scriptType','operationType','661608mHKcIK','functionNode','1kzbgkD','54UymSWa','ENOENT','set','functionName','scriptsRootDir','trim','161ILLEur','6599736XTciEM','HOOK/','155240jfEtrk','alias','590380BHSoOn','replace','map','isDirectory','ENDPOINT','all','beforeScriptId','get','COMMON','datasetCode','52QUhTeQ','toUpperCase','isFile','2431930fVInMc'];a160_0x31bf=function(){return _0x3e9884;};return a160_0x31bf();}import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=[a160_0x24736e(0x79),a160_0x24736e(0xa0),a160_0x24736e(0x87)];export function normalizeBffType(_0x219cc7){const _0x2df204=a160_0x24736e;if(!_0x219cc7)return undefined;const _0x1dcf2b=_0x219cc7[_0x2df204(0x96)]()[_0x2df204(0x7c)]();return SUPPORTED_BFF_TYPES[_0x2df204(0x82)](_0x1dcf2b)?_0x1dcf2b:undefined;}async function scanJsFilesRecursively(_0x1f6cce,_0x440244){const _0x3e2a6d=a160_0x24736e,_0x3f8f0d=[];try{const _0x188ae7=await readdir(_0x1f6cce,{'withFileTypes':!![]});for(const _0x334de8 of _0x188ae7){const _0x28d828=join(_0x1f6cce,_0x334de8[_0x3e2a6d(0x83)]);if(_0x334de8[_0x3e2a6d(0x9f)]())_0x3f8f0d[_0x3e2a6d(0x81)](...await scanJsFilesRecursively(_0x28d828,_0x440244+'/'+_0x334de8['name']));else _0x334de8[_0x3e2a6d(0x7d)]()&&_0x334de8[_0x3e2a6d(0x83)][_0x3e2a6d(0x8a)](_0x3e2a6d(0x85))&&_0x3f8f0d[_0x3e2a6d(0x81)]({'lockKey':_0x440244+'/'+_0x334de8[_0x3e2a6d(0x83)]['replace'](/\.js$/,''),'filePath':_0x28d828});}}catch(_0x2b9373){if(_0x2b9373['code']!==_0x3e2a6d(0x92))throw _0x2b9373;}return _0x3f8f0d;}async function scanFlatFunctions(_0x4c2cfc,_0x1d3d90){const _0x1ce2a1=a160_0x24736e,_0x5211cd=join(_0x4c2cfc[_0x1ce2a1(0x95)],_0x1d3d90),_0x5b0676=await scanJsFilesRecursively(_0x5211cd,_0x1d3d90);return _0x5b0676[_0x1ce2a1(0x9e)](({lockKey:_0x352618,filePath:_0xee94c6})=>({'type':_0x1d3d90,'name':_0x352618['split']('/')['at'](-0x1)??'','filePath':_0xee94c6,'lockKey':_0x352618}));}async function scanHookFunctions(_0x5ae716){const _0x408b21=a160_0x24736e,_0x189a13=join(_0x5ae716['scriptsRootDir'],_0x408b21(0x87)),_0x29cbe2=[];try{const _0x10fa0e=await readdir(_0x189a13,{'withFileTypes':!![]});for(const _0x22afba of _0x10fa0e){if(!_0x22afba[_0x408b21(0x9f)]())continue;const _0x5d5442=_0x22afba[_0x408b21(0x83)],_0x5ac79c=join(_0x189a13,_0x5d5442),_0x4651a3=await readdir(_0x5ac79c,{'withFileTypes':!![]});for(const _0x8f2ead of _0x4651a3){if(!_0x8f2ead[_0x408b21(0x9f)]())continue;const _0x47ca23=_0x8f2ead['name'],_0x5ca66c=join(_0x5ac79c,_0x47ca23),_0xd3bf0=await readdir(_0x5ca66c,{'withFileTypes':!![]});for(const _0x28be4c of _0xd3bf0){if(!_0x28be4c[_0x408b21(0x9f)]())continue;const _0x568942=_0x28be4c[_0x408b21(0x83)],_0x32b052=join(_0x5ca66c,_0x568942),_0x1570a9=await readdir(_0x32b052,{'withFileTypes':!![]});for(const _0x1463ee of _0x1570a9){if(!_0x1463ee['isFile']()||!_0x1463ee['name'][_0x408b21(0x8a)](_0x408b21(0x85)))continue;const _0x593d56=_0x1463ee[_0x408b21(0x83)][_0x408b21(0x9d)](/\.js$/,'');_0x29cbe2[_0x408b21(0x81)]({'type':_0x408b21(0x87),'name':_0x593d56,'filePath':join(_0x32b052,_0x1463ee[_0x408b21(0x83)]),'lockKey':_0x408b21(0x99)+_0x5d5442+'/'+_0x47ca23+'/'+_0x568942+'/'+_0x593d56,'alias':_0x5d5442,'operationType':_0x47ca23,'functionNode':_0x568942});}}}}}catch(_0x185c4d){if(_0x185c4d[_0x408b21(0x84)]!==_0x408b21(0x92))throw _0x185c4d;}return _0x29cbe2;}export async function scanLocalBffFunctions(_0x4c38b4,_0x48a289){const _0x163f19=a160_0x24736e;if(_0x48a289===_0x163f19(0x79)||_0x48a289==='ENDPOINT')return scanFlatFunctions(_0x4c38b4,_0x48a289);if(_0x48a289===_0x163f19(0x87))return scanHookFunctions(_0x4c38b4);const [_0x2cbd8f,_0x2708e2,_0x59dd55]=await Promise[_0x163f19(0xa1)]([scanFlatFunctions(_0x4c38b4,_0x163f19(0x79)),scanFlatFunctions(_0x4c38b4,_0x163f19(0xa0)),scanHookFunctions(_0x4c38b4)]);return[..._0x2cbd8f,..._0x2708e2,..._0x59dd55];}export function resolveLocalFilePathFromLockKey(_0x4b0038,_0x4df403){const _0x500aa3=a160_0x24736e;return join(_0x4b0038[_0x500aa3(0x95)],..._0x4df403[_0x500aa3(0x89)]('/'))+'.js';}export function createHookLocationMap(_0x5dc447){const _0x561f0f=a160_0x24736e,_0x554207=new Map();for(const _0x3cfca6 of _0x5dc447){_0x3cfca6[_0x561f0f(0x77)]&&_0x554207[_0x561f0f(0x93)](_0x3cfca6['beforeScriptId'],{'datasetCode':_0x3cfca6[_0x561f0f(0x7a)],'operationType':snakeToCamel(_0x3cfca6[_0x561f0f(0x8d)]),'functionNode':'before'}),_0x3cfca6[_0x561f0f(0x8b)]&&_0x554207['set'](_0x3cfca6['afterScriptId'],{'datasetCode':_0x3cfca6[_0x561f0f(0x7a)],'operationType':snakeToCamel(_0x3cfca6[_0x561f0f(0x8d)]),'functionNode':'after'});}return _0x554207;}export function resolveRemoteScriptTarget(_0x382c40,_0x2779bf,_0x2885d7,_0xc59243,_0x23438e){const _0x5250f8=a160_0x24736e,_0xc4ee29=normalizeBffType(_0x2779bf[_0x5250f8(0x8c)]);if(!_0xc4ee29||!_0x2779bf[_0x5250f8(0x94)])return null;if(_0xc4ee29===_0x5250f8(0x87)){const _0x4c9087=(_0x2779bf['id']?_0x2885d7['get'](_0x2779bf['id']):undefined)??findHookLocationByRemoteId(_0xc59243,_0x2779bf['id']);if(!_0x4c9087)return null;const _0x4478ce=_0x4c9087[_0x5250f8(0x9b)]||_0x23438e[_0x5250f8(0x78)](_0x4c9087[_0x5250f8(0x7a)]),_0x2709f1=_0x4478ce??_0x4c9087[_0x5250f8(0x7a)],_0x33d507={..._0x4c9087,'alias':_0x4478ce},_0x582136=_0x5250f8(0x99)+_0x2709f1+'/'+_0x33d507['operationType']+'/'+_0x33d507[_0x5250f8(0x8f)]+'/'+_0x2779bf[_0x5250f8(0x94)];return{'lockKey':_0x582136,'filePath':resolveLocalFilePathFromLockKey(_0x382c40,_0x582136),'type':_0x5250f8(0x87),'hookLocation':_0x33d507};}const _0x431784=_0xc4ee29+'/'+_0x2779bf[_0x5250f8(0x94)];return{'lockKey':_0x431784,'filePath':resolveLocalFilePathFromLockKey(_0x382c40,_0x431784),'type':_0xc4ee29};}export async function ensureParentDirectory(_0x3450de){await mkdir(dirname(_0x3450de),{'recursive':!![]});}export async function fileExists(_0x3ccdd1){try{return await access(_0x3ccdd1,constants['F_OK']),!![];}catch{return![];}}export async function directoryExists(_0x3f012b){const _0x32539e=a160_0x24736e;try{const _0x31932a=await stat(_0x3f012b);return _0x31932a[_0x32539e(0x9f)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a161_0x4c9f(_0x2d847f,_0x18b33d){_0x2d847f=_0x2d847f-0x94;const _0x56bea2=a161_0x56be();let _0x4c9f7b=_0x56bea2[_0x2d847f];return _0x4c9f7b;}(function(_0x4f99fb,_0x3b59a0){const _0x57ee7a=a161_0x4c9f,_0x8d1594=_0x4f99fb();while(!![]){try{const _0x6d5d1c=parseInt(_0x57ee7a(0x9a))/0x1*(parseInt(_0x57ee7a(0x9d))/0x2)+-parseInt(_0x57ee7a(0x9c))/0x3+parseInt(_0x57ee7a(0xa1))/0x4*(parseInt(_0x57ee7a(0x9b))/0x5)+-parseInt(_0x57ee7a(0x96))/0x6+parseInt(_0x57ee7a(0x97))/0x7*(parseInt(_0x57ee7a(0xa0))/0x8)+-parseInt(_0x57ee7a(0x9f))/0x9+-parseInt(_0x57ee7a(0x94))/0xa*(-parseInt(_0x57ee7a(0x95))/0xb);if(_0x6d5d1c===_0x3b59a0)break;else _0x8d1594['push'](_0x8d1594['shift']());}catch(_0x2b05c4){_0x8d1594['push'](_0x8d1594['shift']());}}}(a161_0x56be,0x1a983));import{readFile}from'node:fs/promises';function a161_0x56be(){const _0x24317d=['2432WmZTtg','4xmadvY','createHash','utf8','27680fpMjzY','2090qzDEDl','919176CzcQhE','133EkWFCb','digest','hex','101ngRdJv','51775UFeJYB','528021ieajdN','102cDTSwq','md5','981612KBhltk'];a161_0x56be=function(){return _0x24317d;};return a161_0x56be();}import a161_0x3e7dd5 from'node:crypto';export function computeContentHash(_0x1b94c9){const _0x507909=a161_0x4c9f;return a161_0x3e7dd5[_0x507909(0xa2)](_0x507909(0x9e))['update'](_0x1b94c9)[_0x507909(0x98)](_0x507909(0x99));}export async function computeFileHash(_0x365c49){const _0x2f05f3=a161_0x4c9f,_0xc56d42=await readFile(_0x365c49,_0x2f05f3(0xa3));return computeContentHash(_0xc56d42);}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3eda66,_0x578f81){const _0x1f078f=a162_0x5d67,_0x3cb70c=_0x3eda66();while(!![]){try{const _0x5bb80e=-parseInt(_0x1f078f(0x97))/0x1*(parseInt(_0x1f078f(0xa0))/0x2)+-parseInt(_0x1f078f(0x9b))/0x3*(parseInt(_0x1f078f(0x95))/0x4)+parseInt(_0x1f078f(0xa6))/0x5*(-parseInt(_0x1f078f(0xa2))/0x6)+-parseInt(_0x1f078f(0xa3))/0x7+parseInt(_0x1f078f(0xaa))/0x8+-parseInt(_0x1f078f(0x9e))/0x9*(parseInt(_0x1f078f(0x99))/0xa)+parseInt(_0x1f078f(0x96))/0xb*(parseInt(_0x1f078f(0xa4))/0xc);if(_0x5bb80e===_0x578f81)break;else _0x3cb70c['push'](_0x3cb70c['shift']());}catch(_0x46f2c8){_0x3cb70c['push'](_0x3cb70c['shift']());}}}(a162_0x3b6f,0x8446e));function a162_0x5d67(_0x38836e,_0x5a5a63){_0x38836e=_0x38836e-0x91;const _0x3b6ff3=a162_0x3b6f();let _0x5d6780=_0x3b6ff3[_0x38836e];return _0x5d6780;}function a162_0x3b6f(){const _0x3723a3=['7787528nGWCZN','\x22\x20vs\x20lock\x20\x22','lastSync','apps','\x22.\x20','148UIPUHS','11SraWgK','1841wancRr','code','367320TIQwXc','ENOENT','52257EomsSP','object','current\x20\x22','45igAKqf','scriptsRoot','706BKcdcU','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20','4848294dFGEQU','2489529JdnEGh','26521164eylOLb','utf8','5QAycse','functions','parse',':\x20scriptsRoot\x20mismatch\x20—\x20'];a162_0x3b6f=function(){return _0x3723a3;};return a162_0x3b6f();}import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x318260,_0x40f738,_0x281f7e,_0x22d85e){const _0x59594b=a162_0x5d67,_0x12a908={'apps':_0x318260[_0x59594b(0x93)]&&typeof _0x318260[_0x59594b(0x93)]==='object'?_0x318260[_0x59594b(0x93)]:{}};let _0x338088=_0x12a908[_0x59594b(0x93)][_0x40f738];if(!_0x338088)return _0x338088={'scriptsRoot':_0x281f7e,'lastSync':'','functions':{}},_0x12a908[_0x59594b(0x93)][_0x40f738]=_0x338088,{'lockData':_0x12a908,'appLock':_0x338088};if(!_0x338088[_0x59594b(0x9f)])_0x338088[_0x59594b(0x9f)]=_0x281f7e;else{if(_0x338088[_0x59594b(0x9f)]!==_0x281f7e)throw new Error(_0x22d85e+_0x59594b(0xa9)+(_0x59594b(0x9d)+_0x281f7e+_0x59594b(0x91)+_0x338088[_0x59594b(0x9f)]+_0x59594b(0x94))+'Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x338088[_0x59594b(0xa7)]&&(_0x338088['functions']={}),!_0x338088[_0x59594b(0x92)]&&(_0x338088[_0x59594b(0x92)]=''),{'lockData':_0x12a908,'appLock':_0x338088};}export async function readBffLockFile(_0x337a32){const _0x3a1f42=a162_0x5d67;try{const _0x4737f3=await readFile(_0x337a32,_0x3a1f42(0xa5)),_0x30fe3b=JSON[_0x3a1f42(0xa8)](_0x4737f3);return{'apps':_0x30fe3b[_0x3a1f42(0x93)]&&typeof _0x30fe3b[_0x3a1f42(0x93)]===_0x3a1f42(0x9c)?_0x30fe3b[_0x3a1f42(0x93)]:{}};}catch(_0x71e527){if(_0x71e527[_0x3a1f42(0x98)]===_0x3a1f42(0x9a))return null;throw new Error(_0x3a1f42(0xa1)+String(_0x71e527));}}export async function writeBffLockFile(_0x2aecfe,_0x494757){const _0x58381d=a162_0x5d67;await mkdir(dirname(_0x2aecfe),{'recursive':!![]}),await writeFile(_0x2aecfe,JSON['stringify'](_0x494757,null,0x2),_0x58381d(0xa5));}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1c5904,_0xc82e8f){const _0x5a9404=a164_0x59ef,_0x372bf5=_0x1c5904();while(!![]){try{const _0x50d346=parseInt(_0x5a9404(0x7c))/0x1*(-parseInt(_0x5a9404(0x7b))/0x2)+parseInt(_0x5a9404(0x80))/0x3*(parseInt(_0x5a9404(0x76))/0x4)+-parseInt(_0x5a9404(0x79))/0x5*(parseInt(_0x5a9404(0x77))/0x6)+parseInt(_0x5a9404(0x7f))/0x7*(-parseInt(_0x5a9404(0x7d))/0x8)+parseInt(_0x5a9404(0x83))/0x9+parseInt(_0x5a9404(0x84))/0xa+parseInt(_0x5a9404(0x78))/0xb;if(_0x50d346===_0xc82e8f)break;else _0x372bf5['push'](_0x372bf5['shift']());}catch(_0x2cb1cd){_0x372bf5['push'](_0x372bf5['shift']());}}}(a164_0x73b4,0x47f61));export function snakeToCamel(_0xd16b4d){const _0x1224c9=a164_0x59ef;return _0xd16b4d[_0x1224c9(0x72)]()[_0x1224c9(0x81)](/_([a-z])/g,(_0x5e2546,_0x12405a)=>_0x12405a[_0x1224c9(0x85)]());}export function findHookLocationByRemoteId(_0x276b76,_0x324c71){const _0x4d0f21=a164_0x59ef;if(!_0x324c71)return undefined;for(const _0x335d30 of Object[_0x4d0f21(0x70)](_0x276b76)){if(_0x335d30[_0x4d0f21(0x7e)]===_0x324c71&&_0x335d30[_0x4d0f21(0x71)]&&_0x335d30[_0x4d0f21(0x75)]&&_0x335d30[_0x4d0f21(0x82)])return{'datasetCode':_0x335d30[_0x4d0f21(0x71)],'operationType':_0x335d30[_0x4d0f21(0x75)],'functionNode':_0x335d30['functionNode']};}return undefined;}export function extractScriptDescription(_0xf43e7e){const _0x1e451d=a164_0x59ef,_0x1b689a=_0xf43e7e[_0x1e451d(0x86)](/\[\s*脚本描述\s*]\s*(.+)/);return _0x1b689a?.[0x1]?.[_0x1e451d(0x73)]()||undefined;}function a164_0x73b4(){const _0x4ea7f0=['trim','after','operationType','26724UAskUQ','122178rOnIyA','7402978hTYGeW','75fLLNho','before','5464SRlddG','172kUUhed','3663176wFEYuh','remoteId','7BSbWnl','114HpjwYL','replace','functionNode','1598769UrEiAv','4234820QRTZOz','toUpperCase','match','values','datasetCode','toLowerCase'];a164_0x73b4=function(){return _0x4ea7f0;};return a164_0x73b4();}function a164_0x59ef(_0xc1d5c1,_0x1701b9){_0xc1d5c1=_0xc1d5c1-0x70;const _0x73b4bf=a164_0x73b4();let _0x59ef93=_0x73b4bf[_0xc1d5c1];return _0x59ef93;}export function isValidBffFunctionName(_0x31efc0){return/^[A-Za-z_$][A-Za-z0-9_$]*$/['test'](_0x31efc0);}export function normalizeHookFunctionNode(_0x4570c4){const _0x3d5479=a164_0x59ef;if(!_0x4570c4)return undefined;const _0x2be1e5=_0x4570c4['trim']()[_0x3d5479(0x72)]();if(_0x2be1e5===_0x3d5479(0x7a)||_0x2be1e5===_0x3d5479(0x74))return _0x2be1e5;return undefined;}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5635ce,_0x37fef8){const _0x4fa156=a165_0x2dab,_0x3a3b1e=_0x5635ce();while(!![]){try{const _0x1cf89e=parseInt(_0x4fa156(0x172))/0x1+-parseInt(_0x4fa156(0x16f))/0x2*(-parseInt(_0x4fa156(0x161))/0x3)+parseInt(_0x4fa156(0x17c))/0x4+parseInt(_0x4fa156(0x16e))/0x5+-parseInt(_0x4fa156(0x177))/0x6+-parseInt(_0x4fa156(0x167))/0x7+-parseInt(_0x4fa156(0x17a))/0x8*(parseInt(_0x4fa156(0x174))/0x9);if(_0x1cf89e===_0x37fef8)break;else _0x3a3b1e['push'](_0x3a3b1e['shift']());}catch(_0x1522c6){_0x3a3b1e['push'](_0x3a3b1e['shift']());}}}(a165_0xe1e8,0x7da9a));import{listDatasets}from'../core/api-client.js';const cache=new Map();function a165_0x2dab(_0x28287f,_0x3617ab){_0x28287f=_0x28287f-0x160;const _0xe1e867=a165_0xe1e8();let _0x2dab7c=_0xe1e867[_0x28287f];return _0x2dab7c;}export async function listDatabases(_0x11a274){const _0x2c9622=a165_0x2dab;if(cache['has'](_0x11a274))return cache[_0x2c9622(0x16d)](_0x11a274);const _0x510096=await listDatasets(_0x11a274),_0x29baa1=new Map();for(const _0x1ab680 of _0x510096){const _0x2970ec=_0x1ab680[_0x2c9622(0x175)];_0x2970ec?.[_0x2c9622(0x170)]!=null&&_0x29baa1[_0x2c9622(0x17b)](_0x2970ec[_0x2c9622(0x170)],_0x2970ec[_0x2c9622(0x16c)]??_0x2c9622(0x166)+_0x2970ec[_0x2c9622(0x170)]);}const _0x124a59=[..._0x29baa1[_0x2c9622(0x165)]()][_0x2c9622(0x171)](([_0x3c5afe,_0x2e542c])=>({'dbId':_0x3c5afe,'dbName':_0x2e542c}));return cache[_0x2c9622(0x17b)](_0x11a274,_0x124a59),_0x124a59;}export async function resolveDb(_0x1c8cd7,_0x1a2f1a){const _0x3a0921=a165_0x2dab,_0x243d37=await listDatabases(_0x1c8cd7);if(_0x243d37[_0x3a0921(0x160)]===0x0)return{'resolved':[],'error':_0x3a0921(0x163)+_0x1c8cd7+_0x3a0921(0x176)};if(!_0x1a2f1a)return{'resolved':_0x243d37};const _0x26242a=Number(_0x1a2f1a);if(!Number[_0x3a0921(0x173)](_0x26242a)){const _0x35235d=_0x243d37['find'](_0x248833=>_0x248833['dbId']===_0x26242a);if(_0x35235d)return{'resolved':[_0x35235d]};}const _0x3e182e=_0x1a2f1a[_0x3a0921(0x16b)](),_0x35f5c2=_0x243d37[_0x3a0921(0x164)](_0x59004c=>_0x59004c[_0x3a0921(0x16c)][_0x3a0921(0x16b)]()[_0x3a0921(0x179)](_0x3e182e));if(_0x35f5c2['length']>0x0)return{'resolved':_0x35f5c2};const _0x7e4418=_0x243d37[_0x3a0921(0x171)](_0x43d1d3=>_0x43d1d3[_0x3a0921(0x16c)]+'\x20('+_0x43d1d3[_0x3a0921(0x170)]+')')[_0x3a0921(0x162)](',\x20');return{'resolved':[],'error':'No\x20database\x20matching\x20\x22'+_0x1a2f1a+_0x3a0921(0x17e)+_0x1c8cd7+'\x22.\x20Available:\x20'+_0x7e4418+_0x3a0921(0x178)};}export async function resolveOneDb(_0x3f3efa,_0x7b61e0){const _0x21cfff=a165_0x2dab,{resolved:_0x4e1646,error:_0x40c854}=await resolveDb(_0x3f3efa,_0x7b61e0);if(_0x40c854)return{'db':null,'error':_0x40c854};if(_0x4e1646['length']===0x1)return{'db':_0x4e1646[0x0]};if(!_0x7b61e0){const _0x356321=_0x4e1646['map'](_0x4a4949=>_0x4a4949['dbName']+'\x20('+_0x4a4949['dbId']+')')['join'](',\x20');return{'db':null,'error':_0x21cfff(0x16a)+_0x356321};}const _0x2e7964=_0x4e1646['map'](_0x5730c1=>_0x5730c1[_0x21cfff(0x16c)]+'\x20('+_0x5730c1[_0x21cfff(0x170)]+')')[_0x21cfff(0x162)](',\x20');return{'db':null,'error':'\x22'+_0x7b61e0+_0x21cfff(0x169)+_0x2e7964+_0x21cfff(0x168)};}export async function getDbName(_0x4b310f,_0x7dc1f9){const _0x2a4ed9=a165_0x2dab,_0x2ad601=await listDatabases(_0x4b310f);return _0x2ad601[_0x2a4ed9(0x17d)](_0x5de75a=>_0x5de75a[_0x2a4ed9(0x170)]===_0x7dc1f9)?.[_0x2a4ed9(0x16c)];}function a165_0xe1e8(){const _0x4f10c5=['includes','24lfniHm','set','1332480xUeHqE','find','\x22\x20under\x20app\x20\x22','length','360051hfZOrx','join','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','filter','entries','db-','2929556AsZDRn','.\x20Be\x20more\x20specific.','\x22\x20matches\x20multiple\x20databases:\x20','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','toLowerCase','dbName','get','2184245XIlJNf','14jhHJWl','dbId','map','327605uCsGcN','isNaN','829017BByvmx','dbtableConfig','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','4368792wlsPey','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.'];a165_0xe1e8=function(){return _0x4f10c5;};return a165_0xe1e8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a166_0x2141b5=a166_0x5b69;(function(_0x17fad3,_0x1250f6){const _0x4a1b96=a166_0x5b69,_0x1d6966=_0x17fad3();while(!![]){try{const _0x184f3d=parseInt(_0x4a1b96(0x85))/0x1*(parseInt(_0x4a1b96(0x84))/0x2)+parseInt(_0x4a1b96(0x81))/0x3*(parseInt(_0x4a1b96(0x7e))/0x4)+parseInt(_0x4a1b96(0x7d))/0x5+-parseInt(_0x4a1b96(0x88))/0x6+parseInt(_0x4a1b96(0x87))/0x7+parseInt(_0x4a1b96(0x83))/0x8+-parseInt(_0x4a1b96(0x80))/0x9;if(_0x184f3d===_0x1250f6)break;else _0x1d6966['push'](_0x1d6966['shift']());}catch(_0x27bbe9){_0x1d6966['push'](_0x1d6966['shift']());}}}(a166_0x2072,0x70b14));import{constants}from'node:fs';function a166_0x2072(){const _0x1737b5=['537912ymmgaL','cwd','.rabetbase','page.lock.json','997850kWTidI','68DpYzoi','.json','9744273bhDbyL','32646acTaYF','F_OK','4329168PQjqjS','102246NJooTc','1MBgaAw','appPagesDir','4599728NlvntE'];a166_0x2072=function(){return _0x1737b5;};return a166_0x2072();}import{access,mkdir}from'node:fs/promises';import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0x5cf6fb,_0x1caf9b=process[a166_0x2141b5(0x89)]()){const _0x5e5815=a166_0x2141b5,_0x4c83c9=resolve(_0x1caf9b),_0x1d2841=join(_0x4c83c9,_0x5e5815(0x7b),'page');return{'projectRoot':_0x4c83c9,'pagesBaseDir':_0x1d2841,'appPagesDir':join(_0x1d2841,_0x5cf6fb),'lockFilePath':join(_0x4c83c9,_0x5e5815(0x7b),_0x5e5815(0x7c))};}export function buildPageFileName(_0x25d824,_0x5d3bb8){const _0x42b466=a166_0x2141b5;return _0x25d824+'-'+String(_0x5d3bb8)['toUpperCase']()+_0x42b466(0x7f);}export function resolvePageFilePath(_0xec208a,_0x377114,_0x4cdfea){const _0x349433=a166_0x2141b5;return join(_0xec208a[_0x349433(0x86)],buildPageFileName(_0x377114,_0x4cdfea));}function a166_0x5b69(_0x5c87e1,_0x285202){_0x5c87e1=_0x5c87e1-0x7b;const _0x207224=a166_0x2072();let _0x5b69c=_0x207224[_0x5c87e1];return _0x5b69c;}export async function ensureParentDirectory(_0x559bcf){await mkdir(dirname(_0x559bcf),{'recursive':!![]});}export async function fileExists(_0x137590){const _0x29e199=a166_0x2141b5;try{return await access(_0x137590,constants[_0x29e199(0x82)]),!![];}catch{return![];}}
|
package/lib/core/page/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x130cd1,_0x5f524c){const _0x1f3e54=a167_0x31d3,_0x43ba70=_0x130cd1();while(!![]){try{const _0x591091=-parseInt(_0x1f3e54(0x17e))/0x1*(parseInt(_0x1f3e54(0x187))/0x2)+-parseInt(_0x1f3e54(0x17d))/0x3*(parseInt(_0x1f3e54(0x188))/0x4)+parseInt(_0x1f3e54(0x180))/0x5*(parseInt(_0x1f3e54(0x183))/0x6)+-parseInt(_0x1f3e54(0x184))/0x7+-parseInt(_0x1f3e54(0x176))/0x8+parseInt(_0x1f3e54(0x178))/0x9*(-parseInt(_0x1f3e54(0x17f))/0xa)+-parseInt(_0x1f3e54(0x17c))/0xb*(-parseInt(_0x1f3e54(0x17b))/0xc);if(_0x591091===_0x5f524c)break;else _0x43ba70['push'](_0x43ba70['shift']());}catch(_0x228b28){_0x43ba70['push'](_0x43ba70['shift']());}}}(a167_0x4303,0x6c1e0));function a167_0x31d3(_0x553d55,_0x3f8c8c){_0x553d55=_0x553d55-0x176;const _0x430300=a167_0x4303();let _0x31d3fc=_0x430300[_0x553d55];return _0x31d3fc;}import a167_0x38daf8 from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x4fd65d){const _0x62e662=a167_0x31d3;return JSON[_0x62e662(0x186)](JSON[_0x62e662(0x182)](_0x4fd65d),null,0x2)+'\x0a';}export function computePageContentHash(_0x46e26d){const _0x19c387=a167_0x31d3;return a167_0x38daf8[_0x19c387(0x177)](_0x19c387(0x181))['update'](_0x46e26d)[_0x19c387(0x17a)](_0x19c387(0x185));}function a167_0x4303(){const _0x36bda7=['212LSpErs','5706496GrxmuS','createHash','273447VmuLcP','utf8','digest','96wCNkGL','3834380mePATM','27282FrfRAk','2244nTVycn','140fhzNCV','5KqeoMy','md5','parse','1524282QodzNg','2298961nzoSsC','hex','stringify','580AsdgrX'];a167_0x4303=function(){return _0x36bda7;};return a167_0x4303();}export function computeSerializedSchemaHash(_0x25792a){return computePageContentHash(serializePageSchemaForFile(_0x25792a));}export async function computePageFileHash(_0x49a463){const _0x30e2fc=a167_0x31d3,_0x32eb07=await readFile(_0x49a463,_0x30e2fc(0x179));return computePageContentHash(_0x32eb07);}
|
package/lib/core/page/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a168_0x4632(){const _0x5bf62b=['139210DOvLZT','pages','700ZxoQxu','331984rZtctN','lastSync','parse','3vivHsF','319KMrHDm','1519060QmwDpp','ENOENT','54qLarEQ','619386MLfcHT','object','apps','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','466290GJxMpU','utf8','stringify','107970nubLct','15160SgkNqG'];a168_0x4632=function(){return _0x5bf62b;};return a168_0x4632();}(function(_0x317257,_0x1b2781){const _0x35b29f=a168_0xf023,_0x178ad5=_0x317257();while(!![]){try{const _0x5ed72e=parseInt(_0x35b29f(0x163))/0x1+-parseInt(_0x35b29f(0x16b))/0x2*(parseInt(_0x35b29f(0x166))/0x3)+parseInt(_0x35b29f(0x168))/0x4+-parseInt(_0x35b29f(0x160))/0x5*(parseInt(_0x35b29f(0x16a))/0x6)+parseInt(_0x35b29f(0x162))/0x7*(-parseInt(_0x35b29f(0x15f))/0x8)+-parseInt(_0x35b29f(0x15b))/0x9+-parseInt(_0x35b29f(0x15e))/0xa*(-parseInt(_0x35b29f(0x167))/0xb);if(_0x5ed72e===_0x1b2781)break;else _0x178ad5['push'](_0x178ad5['shift']());}catch(_0x332add){_0x178ad5['push'](_0x178ad5['shift']());}}}(a168_0x4632,0x36831));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x337e3c,_0x551aef){const _0x4fb9d6=a168_0xf023,_0x2b5b91={'apps':_0x337e3c['apps']&&typeof _0x337e3c['apps']===_0x4fb9d6(0x16c)?_0x337e3c[_0x4fb9d6(0x16d)]:{}};let _0x341a11=_0x2b5b91[_0x4fb9d6(0x16d)][_0x551aef];if(!_0x341a11)return _0x341a11={'lastSync':'','pages':{}},_0x2b5b91[_0x4fb9d6(0x16d)][_0x551aef]=_0x341a11,{'lockData':_0x2b5b91,'appLock':_0x341a11};return!_0x341a11[_0x4fb9d6(0x164)]&&(_0x341a11[_0x4fb9d6(0x164)]=''),(!_0x341a11['pages']||typeof _0x341a11[_0x4fb9d6(0x161)]!==_0x4fb9d6(0x16c))&&(_0x341a11[_0x4fb9d6(0x161)]={}),{'lockData':_0x2b5b91,'appLock':_0x341a11};}export async function readPageLockFile(_0x33ef4c){const _0xe6ea7d=a168_0xf023;try{const _0x225a8a=await readFile(_0x33ef4c,_0xe6ea7d(0x15c)),_0x522b68=JSON[_0xe6ea7d(0x165)](_0x225a8a);return{'apps':_0x522b68[_0xe6ea7d(0x16d)]&&typeof _0x522b68[_0xe6ea7d(0x16d)]===_0xe6ea7d(0x16c)?_0x522b68['apps']:{}};}catch(_0x5878bb){if(_0x5878bb['code']===_0xe6ea7d(0x169))return null;throw new Error(_0xe6ea7d(0x16e)+String(_0x5878bb));}}function a168_0xf023(_0x4571db,_0x2f4b0b){_0x4571db=_0x4571db-0x15b;const _0x463227=a168_0x4632();let _0xf02359=_0x463227[_0x4571db];return _0xf02359;}export async function writePageLockFile(_0x3dea15,_0x17a5f7){const _0x2a5d00=a168_0xf023;await mkdir(dirname(_0x3dea15),{'recursive':!![]}),await writeFile(_0x3dea15,JSON[_0x2a5d00(0x15d)](_0x17a5f7,null,0x2),_0x2a5d00(0x15c));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a170_0x54fb53=a170_0x1306;function a170_0x5d0c(){const _0xff00dd=['sql-trash','283119iYRiwF','69676JICLts','103890YQvRUX','.rabetbase','sql.lock.json','7188775RcvNBz','2uaudzX','sql','20Vekkef','724213SlEvtV','302359bwnemB','1794972WchKka','45wrjXNT','8zkpLxk'];a170_0x5d0c=function(){return _0xff00dd;};return a170_0x5d0c();}(function(_0x2e060f,_0x5038db){const _0x1db9d9=a170_0x1306,_0x1cf8be=_0x2e060f();while(!![]){try{const _0x1cdc1a=parseInt(_0x1db9d9(0x1ca))/0x1*(parseInt(_0x1db9d9(0x1c6))/0x2)+parseInt(_0x1db9d9(0x1c0))/0x3+-parseInt(_0x1db9d9(0x1c1))/0x4*(-parseInt(_0x1db9d9(0x1c8))/0x5)+parseInt(_0x1db9d9(0x1bc))/0x6+-parseInt(_0x1db9d9(0x1c9))/0x7*(-parseInt(_0x1db9d9(0x1be))/0x8)+parseInt(_0x1db9d9(0x1bd))/0x9*(-parseInt(_0x1db9d9(0x1c2))/0xa)+-parseInt(_0x1db9d9(0x1c5))/0xb;if(_0x1cdc1a===_0x5038db)break;else _0x1cf8be['push'](_0x1cf8be['shift']());}catch(_0x34c1a2){_0x1cf8be['push'](_0x1cf8be['shift']());}}}(a170_0x5d0c,0x27ee7));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a170_0x54fb53(0x1c3),LOCK_FILE_NAME=a170_0x54fb53(0x1c4),TRASH_DIR_NAME=a170_0x54fb53(0x1bf);function a170_0x1306(_0x1fa5e2,_0x549f22){_0x1fa5e2=_0x1fa5e2-0x1bc;const _0x5d0c6f=a170_0x5d0c();let _0x130632=_0x5d0c6f[_0x1fa5e2];return _0x130632;}export function loadSqlProjectConfig(_0x69ffc4,_0x56f7d7){const _0x514874=a170_0x54fb53,_0x247460=resolve(_0x56f7d7??findProjectRootDirectory()),_0x21e7e6=DOT_DIR+'/sql',_0x460e7e=_0x21e7e6+'/'+_0x69ffc4;return{'projectRoot':_0x247460,'appCode':_0x69ffc4,'sqlWorkspaceRoot':_0x21e7e6,'sqlRoot':_0x460e7e,'sqlRootDir':resolve(_0x247460,DOT_DIR,_0x514874(0x1c7),_0x69ffc4),'lockFilePath':resolve(_0x247460,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x247460,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x57eaae,_0x9bed1a){const _0x3aa5ce=a171_0x2d33,_0x484336=_0x57eaae();while(!![]){try{const _0x26dfed=parseInt(_0x3aa5ce(0x17b))/0x1+-parseInt(_0x3aa5ce(0x18b))/0x2*(parseInt(_0x3aa5ce(0x17c))/0x3)+parseInt(_0x3aa5ce(0x188))/0x4*(-parseInt(_0x3aa5ce(0x187))/0x5)+-parseInt(_0x3aa5ce(0x177))/0x6+-parseInt(_0x3aa5ce(0x18e))/0x7*(parseInt(_0x3aa5ce(0x18d))/0x8)+parseInt(_0x3aa5ce(0x181))/0x9+-parseInt(_0x3aa5ce(0x17d))/0xa*(-parseInt(_0x3aa5ce(0x191))/0xb);if(_0x26dfed===_0x9bed1a)break;else _0x484336['push'](_0x484336['shift']());}catch(_0x844194){_0x484336['push'](_0x484336['shift']());}}}(a171_0x5d1e,0x23b95));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x86a485){const _0x2ba36c=a171_0x2d33;if(_0x86a485===_0x2ba36c(0x17e))return _0x2ba36c(0x17a);if(_0x86a485==='.xml')return _0x2ba36c(0x18a);return undefined;}async function scanSqlFilesRecursively(_0x59a1ef,_0x543d88){const _0x30bc16=a171_0x2d33,_0x179e6b=[];try{const _0x4b8dd3=await readdir(_0x59a1ef,{'withFileTypes':!![]});for(const _0x436788 of _0x4b8dd3){const _0x28c63c=join(_0x59a1ef,_0x436788[_0x30bc16(0x189)]);if(_0x436788[_0x30bc16(0x192)]()){_0x179e6b[_0x30bc16(0x180)](...await scanSqlFilesRecursively(_0x28c63c,_0x543d88));continue;}if(!_0x436788[_0x30bc16(0x194)]())continue;const _0x1d5183=extname(_0x436788['name'])[_0x30bc16(0x178)](),_0x1294a2=extensionToMode(_0x1d5183);if(!_0x1294a2)continue;const _0x31907e=relative(_0x543d88,_0x28c63c)[_0x30bc16(0x184)](/\\/g,'/'),_0x1e3136=_0x31907e['split']('/')[_0x30bc16(0x190)](Boolean),_0x33246d=parseSqlPath(_0x1e3136,_0x436788[_0x30bc16(0x189)],_0x1d5183);if(!_0x33246d)continue;_0x179e6b[_0x30bc16(0x180)]({'sqlCode':_0x33246d[_0x30bc16(0x179)],'sqlName':_0x33246d[_0x30bc16(0x185)],'dbDirectory':_0x1e3136[0x0],'filePath':_0x28c63c,'relativePath':_0x31907e,'lockKey':_0x33246d[_0x30bc16(0x179)],'mode':_0x1294a2});}}catch(_0x5a8fda){if(_0x5a8fda[_0x30bc16(0x193)]!==_0x30bc16(0x196))throw _0x5a8fda;}return _0x179e6b;}export async function scanLocalSqlQueries(_0xec3df5){const _0x28ebeb=a171_0x2d33;return scanSqlFilesRecursively(_0xec3df5[_0x28ebeb(0x18f)],_0xec3df5[_0x28ebeb(0x18f)]);}function a171_0x2d33(_0x5acac7,_0x424b88){_0x5acac7=_0x5acac7-0x177;const _0x5d1ef2=a171_0x5d1e();let _0x2d33b5=_0x5d1ef2[_0x5acac7];return _0x2d33b5;}export function resolveLocalSqlFilePath(_0x1df27e,_0x301f01,_0x4f3524){const _0x44e43c=a171_0x2d33,_0x5ebec=_0x4f3524?.[_0x44e43c(0x17f)]||(_0x4f3524?.[_0x44e43c(0x185)]||_0x4f3524?.[_0x44e43c(0x186)]?buildSqlRelativePath(_0x301f01,_0x4f3524?.[_0x44e43c(0x185)],_0x4f3524?.[_0x44e43c(0x186)],_0x4f3524?.[_0x44e43c(0x195)]||_0x44e43c(0x17a),_0x4f3524?.[_0x44e43c(0x182)]):buildDefaultSqlFileName(_0x301f01,_0x4f3524?.[_0x44e43c(0x195)]||'sql'));return join(_0x1df27e[_0x44e43c(0x18f)],_0x5ebec);}export async function directoryExists(_0x1f6ba7){const _0x2ad8fd=a171_0x2d33;try{const _0x4d5637=await stat(_0x1f6ba7);return _0x4d5637[_0x2ad8fd(0x192)]();}catch{return![];}}function parseSqlPath(_0x1d75a4,_0x3157fd,_0x290f0a){const _0x3b03a7=a171_0x2d33,_0x3086b4=_0x3157fd[_0x3b03a7(0x18c)](0x0,-_0x290f0a[_0x3b03a7(0x197)]);if(_0x1d75a4['length']<0x2)return null;const _0x5a6cc9=_0x3086b4['indexOf']('_');if(_0x5a6cc9<=0x0||_0x5a6cc9>=_0x3086b4[_0x3b03a7(0x197)]-0x1)return null;const _0x41a774=_0x3086b4[_0x3b03a7(0x18c)](0x0,_0x5a6cc9);if(!isLikelySqlCode(_0x41a774))return null;return{'sqlCode':_0x41a774,'sqlName':_0x3086b4[_0x3b03a7(0x18c)](_0x5a6cc9+0x1)};}function a171_0x5d1e(){const _0x4b22cc=['sqlCode','sql','213123TVhzOE','6LgxgLU','90wLUdNn','.sql','path','push','2617380GYKXqE','dbId','test','replace','sqlName','dbName','187625SkKEpY','16YxqFJf','name','mybatisXml','13938TwUYUb','slice','25064nHMImk','637qnmPMs','sqlRootDir','filter','380699LLTGCx','isDirectory','code','isFile','mode','ENOENT','length','1319748JmWkDc','toLowerCase'];a171_0x5d1e=function(){return _0x4b22cc;};return a171_0x5d1e();}function isLikelySqlCode(_0x3dd67c){const _0x435700=a171_0x2d33;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x435700(0x183)](_0x3dd67c);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d742f,_0x32d0c2){const _0x38de7a=a172_0x41ff,_0x4a305b=_0x4d742f();while(!![]){try{const _0x4d2a83=-parseInt(_0x38de7a(0x118))/0x1*(-parseInt(_0x38de7a(0x107))/0x2)+parseInt(_0x38de7a(0x114))/0x3+-parseInt(_0x38de7a(0x10a))/0x4*(-parseInt(_0x38de7a(0x10f))/0x5)+-parseInt(_0x38de7a(0x113))/0x6+-parseInt(_0x38de7a(0x116))/0x7*(-parseInt(_0x38de7a(0x10c))/0x8)+-parseInt(_0x38de7a(0x10e))/0x9*(-parseInt(_0x38de7a(0x112))/0xa)+parseInt(_0x38de7a(0x115))/0xb*(-parseInt(_0x38de7a(0x109))/0xc);if(_0x4d2a83===_0x32d0c2)break;else _0x4a305b['push'](_0x4a305b['shift']());}catch(_0x4e1f9f){_0x4a305b['push'](_0x4a305b['shift']());}}}(a172_0x5b88,0x20911));function a172_0x41ff(_0x228260,_0x1a2bbf){_0x228260=_0x228260-0x107;const _0x5b88cc=a172_0x5b88();let _0x41ff92=_0x5b88cc[_0x228260];return _0x41ff92;}import{readFile}from'node:fs/promises';import a172_0x231c49 from'node:crypto';export function computeSqlContentHash(_0x48e847){const _0x1e41fa=a172_0x41ff;return a172_0x231c49[_0x1e41fa(0x10d)](_0x1e41fa(0x117))[_0x1e41fa(0x111)](_0x48e847)[_0x1e41fa(0x108)](_0x1e41fa(0x10b));}function a172_0x5b88(){const _0x13f0b4=['10mvXLQb','945324CZSLyx','680280GwrOqN','445544dnaRYi','42pwDpPN','md5','61iIJSEM','2708xUhIYY','digest','132lSRKnR','8ZMneAy','hex','318040DnSjln','createHash','1325349VBeMjy','103365jIhbpp','utf8','update'];a172_0x5b88=function(){return _0x13f0b4;};return a172_0x5b88();}export async function computeSqlFileHash(_0x3268dc){const _0x42a7bf=a172_0x41ff,_0x289b72=await readFile(_0x3268dc,_0x42a7bf(0x110));return computeSqlContentHash(_0x289b72);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x231414,_0xd6626f){const _0x479b53=a173_0x14ce,_0x45e432=_0x231414();while(!![]){try{const _0x4fc21d=parseInt(_0x479b53(0x7a))/0x1+-parseInt(_0x479b53(0x7d))/0x2*(-parseInt(_0x479b53(0x83))/0x3)+-parseInt(_0x479b53(0x75))/0x4*(parseInt(_0x479b53(0x72))/0x5)+parseInt(_0x479b53(0x73))/0x6+parseInt(_0x479b53(0x82))/0x7*(parseInt(_0x479b53(0x74))/0x8)+parseInt(_0x479b53(0x78))/0x9+parseInt(_0x479b53(0x87))/0xa*(-parseInt(_0x479b53(0x77))/0xb);if(_0x4fc21d===_0xd6626f)break;else _0x45e432['push'](_0x45e432['shift']());}catch(_0xb1deaf){_0x45e432['push'](_0x45e432['shift']());}}}(a173_0xefb6,0x18bd9));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x38114a,_0x267845,_0x4ba151,_0x50be76){const _0xbccf31=a173_0x14ce,_0x516351=_0x38114a??createEmptySqlLock();let _0xf2ced2=_0x516351[_0xbccf31(0x85)][_0x267845];if(!_0xf2ced2)return _0xf2ced2={'sqlRoot':_0x4ba151,'lastSync':'','sqls':{}},_0x516351[_0xbccf31(0x85)][_0x267845]=_0xf2ced2,{'lockData':_0x516351,'appLock':_0xf2ced2};if(!_0xf2ced2[_0xbccf31(0x7f)])_0xf2ced2[_0xbccf31(0x7f)]=_0x4ba151;else{if(_0xf2ced2['sqlRoot']!==_0x4ba151)throw new Error(_0x50be76+_0xbccf31(0x7b)+_0x4ba151+_0xbccf31(0x84)+_0xf2ced2[_0xbccf31(0x7f)]+_0xbccf31(0x71)+_0xbccf31(0x76));}return!_0xf2ced2[_0xbccf31(0x7c)]&&(_0xf2ced2[_0xbccf31(0x7c)]={}),!_0xf2ced2[_0xbccf31(0x79)]&&(_0xf2ced2['lastSync']=''),{'lockData':_0x516351,'appLock':_0xf2ced2};}function a173_0x14ce(_0x442c0b,_0x7b2103){_0x442c0b=_0x442c0b-0x70;const _0xefb6fb=a173_0xefb6();let _0x14ce22=_0xefb6fb[_0x442c0b];return _0x14ce22;}function a173_0xefb6(){const _0x3590f5=['1384380rqYrTz','lastSync','104292HWaqEh',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','sqls','2XKoLvN','stringify','sqlRoot','utf8','parse','6167GtTacz','187053SBeGhj','\x22\x20vs\x20lock\x20\x22','apps','code','160qBebNz','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','\x22.\x20','143875hvszLh','22128EhUAxH','552sDFwTw','20tClTYd','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','96063OmqrdE'];a173_0xefb6=function(){return _0x3590f5;};return a173_0xefb6();}export async function readSqlLockFile(_0x4bba12){const _0xef964=a173_0x14ce;try{const _0x1e09c1=await readFile(_0x4bba12,_0xef964(0x80));return JSON[_0xef964(0x81)](_0x1e09c1);}catch(_0xe752a1){if(_0xe752a1[_0xef964(0x86)]==='ENOENT')return null;throw new Error(_0xef964(0x70)+String(_0xe752a1));}}export async function writeSqlLockFile(_0x48e362,_0x22fb44){const _0x1b89f8=a173_0x14ce;await mkdir(dirname(_0x48e362),{'recursive':!![]}),await writeFile(_0x48e362,JSON[_0x1b89f8(0x7e)](_0x22fb44,null,0x2),_0x1b89f8(0x80));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x37541c,_0x2ab3aa){const _0x1e4ca4=a175_0x1b38,_0x5d75a0=_0x37541c();while(!![]){try{const _0x77c058=parseInt(_0x1e4ca4(0x16d))/0x1+parseInt(_0x1e4ca4(0x169))/0x2*(parseInt(_0x1e4ca4(0x163))/0x3)+parseInt(_0x1e4ca4(0x16b))/0x4+parseInt(_0x1e4ca4(0x166))/0x5*(parseInt(_0x1e4ca4(0x164))/0x6)+parseInt(_0x1e4ca4(0x16c))/0x7*(-parseInt(_0x1e4ca4(0x171))/0x8)+-parseInt(_0x1e4ca4(0x162))/0x9+-parseInt(_0x1e4ca4(0x168))/0xa;if(_0x77c058===_0x2ab3aa)break;else _0x5d75a0['push'](_0x5d75a0['shift']());}catch(_0xacd29e){_0x5d75a0['push'](_0x5d75a0['shift']());}}}(a175_0x4556,0xde5ad));function a175_0x4556(){const _0x5dea02=['12114hUvEpt','db-','2515DIXnfQ','mybatisXml','8625820YYGKDF','1433846ceGlEh','test','2987188RlPMPz','7tXnKlr','709591mxuSzD','trimStart','unknown-db','trim','6776896HXEUQW','unknown-sql','.xml','replace','5115681BOByOL','3njblws'];a175_0x4556=function(){return _0x5dea02;};return a175_0x4556();}export function detectSqlMode(_0x4f7658){const _0x506d2f=a175_0x1b38,_0x53a317=_0x4f7658[_0x506d2f(0x16e)]();if(/^<(select|insert|update|delete)\b/i[_0x506d2f(0x16a)](_0x53a317))return _0x506d2f(0x167);return'sql';}export function getSqlFileExtension(_0x291686){const _0x2e9622=a175_0x1b38;return _0x291686==='mybatisXml'?_0x2e9622(0x173):'.sql';}export function buildDefaultSqlFileName(_0x25a9c8,_0x35c0b0){return''+_0x25a9c8+getSqlFileExtension(_0x35c0b0);}function a175_0x1b38(_0x2db236,_0x29f900){_0x2db236=_0x2db236-0x162;const _0x4556d0=a175_0x4556();let _0x1b3825=_0x4556d0[_0x2db236];return _0x1b3825;}export function sanitizeSqlPathSegment(_0x164ca1,_0x276afe){const _0x14c0df=a175_0x1b38,_0x3f912c=String(_0x164ca1??'')[_0x14c0df(0x170)](),_0x461675=_0x3f912c['replace'](/[<>:"/\\|?*\u0000-\u001F]/g,'-')['replace'](/\s+/g,'-')[_0x14c0df(0x174)](/-+/g,'-')[_0x14c0df(0x174)](/^\.+/,'')[_0x14c0df(0x174)](/\.+$/,'')['replace'](/^-+/,'')['replace'](/-+$/,'');return _0x461675||_0x276afe;}export function buildDbDirectoryName(_0x3f2472,_0x57c5f5){const _0x525eaf=a175_0x1b38;return sanitizeSqlPathSegment(_0x3f2472,_0x57c5f5!=null?_0x525eaf(0x165)+_0x57c5f5:_0x525eaf(0x16f));}export function buildSqlRelativePath(_0x7a554b,_0x1671dc,_0x423c5e,_0x3f319a,_0x36173a){const _0x33e18e=a175_0x1b38,_0x25712d=buildDbDirectoryName(_0x423c5e,_0x36173a),_0x4ea475=sanitizeSqlPathSegment(_0x7a554b,_0x33e18e(0x172)),_0x5f2e7f=sanitizeSqlPathSegment(_0x1671dc,_0x4ea475);return _0x25712d+'/'+_0x4ea475+'_'+_0x5f2e7f+getSqlFileExtension(_0x3f319a);}
|