@lovrabet/rabetbase-cli 2.5.10-beta.4 → 2.5.10-beta.5
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/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.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/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.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/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.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/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.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-restore.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/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.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/table-diff-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/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.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/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.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/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.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/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.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/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.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/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.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/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.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/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.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/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.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/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/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/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 +4 -4
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a290_0x445e91=a290_0x16fc;(function(_0x32c432,_0x5f25e9){const _0x4fb8e5=a290_0x16fc,_0x449507=_0x32c432();while(!![]){try{const _0xeb5dcd=-parseInt(_0x4fb8e5(0x1b6))/0x1*(parseInt(_0x4fb8e5(0x198))/0x2)+parseInt(_0x4fb8e5(0x1a5))/0x3*(-parseInt(_0x4fb8e5(0x1be))/0x4)+parseInt(_0x4fb8e5(0x1a9))/0x5+parseInt(_0x4fb8e5(0x1a6))/0x6+parseInt(_0x4fb8e5(0x1b9))/0x7+-parseInt(_0x4fb8e5(0x1c1))/0x8+parseInt(_0x4fb8e5(0x1ad))/0x9;if(_0xeb5dcd===_0x5f25e9)break;else _0x449507['push'](_0x449507['shift']());}catch(_0x428384){_0x449507['push'](_0x449507['shift']());}}}(a290_0x132d,0xab63c));import{access,mkdir,readdir,stat}from'node:fs/promises';function a290_0x132d(){const _0x3e7b07=['7381236kJGYLE','set','includes','1278400UBNoZd','isFile','functionName','.js','3582252ztLiCh','name','push','after','ENOENT','every','COMMON','code','split','28132ihMoBi','all','HOOK','2406362kKRZYM','trim','toLowerCase','ENDPOINT','scriptType','548rEIOdy','get','datasetCode','1857904ZxEmMT','replace','functionNode','88gEPiwH','beforeScriptId','HOOK/','Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20','map','endsWith','isDirectory','startsWith','test','afterScriptId','operationType','scriptsRootDir','F_OK','1218JbRFkx'];a290_0x132d=function(){return _0x3e7b07;};return a290_0x132d();}import{constants}from'node:fs';import{dirname,join,resolve,sep}from'node:path';function a290_0x16fc(_0x3f04d0,_0x51fe01){_0x3f04d0=_0x3f04d0-0x198;const _0x132d8c=a290_0x132d();let _0x16fcbd=_0x132d8c[_0x3f04d0];return _0x16fcbd;}import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=[a290_0x445e91(0x1b3),a290_0x445e91(0x1bc),a290_0x445e91(0x1b8)];export function normalizeBffType(_0x363037){const _0x35b8dc=a290_0x445e91;if(!_0x363037)return undefined;const _0x4a9d09=_0x363037[_0x35b8dc(0x1ba)]()['toUpperCase']();return SUPPORTED_BFF_TYPES[_0x35b8dc(0x1a8)](_0x4a9d09)?_0x4a9d09:undefined;}async function scanJsFilesRecursively(_0x2861bc,_0x304869){const _0x39edda=a290_0x445e91,_0x188aa9=[];try{const _0x923ffe=await readdir(_0x2861bc,{'withFileTypes':!![]});for(const _0x4bc99d of _0x923ffe){const _0x3170b5=join(_0x2861bc,_0x4bc99d[_0x39edda(0x1ae)]);if(_0x4bc99d[_0x39edda(0x19e)]())_0x188aa9['push'](...await scanJsFilesRecursively(_0x3170b5,_0x304869+'/'+_0x4bc99d['name']));else _0x4bc99d[_0x39edda(0x1aa)]()&&_0x4bc99d[_0x39edda(0x1ae)][_0x39edda(0x19d)](_0x39edda(0x1ac))&&_0x188aa9[_0x39edda(0x1af)]({'lockKey':_0x304869+'/'+_0x4bc99d[_0x39edda(0x1ae)][_0x39edda(0x1c2)](/\.js$/,''),'filePath':_0x3170b5});}}catch(_0x5e713e){if(_0x5e713e[_0x39edda(0x1b4)]!==_0x39edda(0x1b1))throw _0x5e713e;}return _0x188aa9;}async function scanFlatFunctions(_0x38df6d,_0x324296){const _0x7a5e44=a290_0x445e91,_0x1df074=join(_0x38df6d[_0x7a5e44(0x1a3)],_0x324296),_0x47768c=await scanJsFilesRecursively(_0x1df074,_0x324296);return _0x47768c[_0x7a5e44(0x19c)](({lockKey:_0x431e73,filePath:_0x180198})=>({'type':_0x324296,'name':_0x431e73[_0x7a5e44(0x1b5)]('/')['at'](-0x1)??'','filePath':_0x180198,'lockKey':_0x431e73}));}async function scanHookFunctions(_0x8bd3b0){const _0x75843=a290_0x445e91,_0x1556b3=join(_0x8bd3b0['scriptsRootDir'],_0x75843(0x1b8)),_0x59e420=[];try{const _0x3c9942=await readdir(_0x1556b3,{'withFileTypes':!![]});for(const _0x4f7295 of _0x3c9942){if(!_0x4f7295[_0x75843(0x19e)]())continue;const _0x472002=_0x4f7295[_0x75843(0x1ae)],_0x33b536=join(_0x1556b3,_0x472002),_0x270d6c=await readdir(_0x33b536,{'withFileTypes':!![]});for(const _0x15e8ed of _0x270d6c){if(!_0x15e8ed[_0x75843(0x19e)]())continue;const _0x420f01=_0x15e8ed['name'],_0x42814a=join(_0x33b536,_0x420f01),_0x4954c3=await readdir(_0x42814a,{'withFileTypes':!![]});for(const _0x2c2aa3 of _0x4954c3){if(!_0x2c2aa3[_0x75843(0x19e)]())continue;const _0x3ac1ee=_0x2c2aa3[_0x75843(0x1ae)],_0x4227d8=join(_0x42814a,_0x3ac1ee),_0xadb920=await readdir(_0x4227d8,{'withFileTypes':!![]});for(const _0x3706af of _0xadb920){if(!_0x3706af[_0x75843(0x1aa)]()||!_0x3706af[_0x75843(0x1ae)][_0x75843(0x19d)](_0x75843(0x1ac)))continue;const _0x3cc2d9=_0x3706af[_0x75843(0x1ae)][_0x75843(0x1c2)](/\.js$/,'');_0x59e420[_0x75843(0x1af)]({'type':_0x75843(0x1b8),'name':_0x3cc2d9,'filePath':join(_0x4227d8,_0x3706af[_0x75843(0x1ae)]),'lockKey':_0x75843(0x19a)+_0x472002+'/'+_0x420f01+'/'+_0x3ac1ee+'/'+_0x3cc2d9,'alias':_0x472002,'operationType':_0x420f01,'functionNode':_0x3ac1ee});}}}}}catch(_0x480bbf){if(_0x480bbf[_0x75843(0x1b4)]!==_0x75843(0x1b1))throw _0x480bbf;}return _0x59e420;}export async function scanLocalBffFunctions(_0x4875b3,_0x48c1a9){const _0x2f3cc=a290_0x445e91;if(_0x48c1a9==='COMMON'||_0x48c1a9==='ENDPOINT')return scanFlatFunctions(_0x4875b3,_0x48c1a9);if(_0x48c1a9===_0x2f3cc(0x1b8))return scanHookFunctions(_0x4875b3);const [_0x34c1a9,_0x5edcdd,_0x530c34]=await Promise[_0x2f3cc(0x1b7)]([scanFlatFunctions(_0x4875b3,_0x2f3cc(0x1b3)),scanFlatFunctions(_0x4875b3,_0x2f3cc(0x1bc)),scanHookFunctions(_0x4875b3)]);return[..._0x34c1a9,..._0x5edcdd,..._0x530c34];}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x2b49c4){const _0x21c27d=a290_0x445e91;return SAFE_LOCK_KEY_SEGMENT[_0x21c27d(0x1a0)](_0x2b49c4)&&_0x2b49c4!=='.'&&_0x2b49c4!=='..';}export function resolveLocalFilePathFromLockKey(_0x1e92e2,_0x3d0cd7){const _0x102d61=a290_0x445e91,_0x1ac75f=_0x3d0cd7['split']('/');if(!_0x1ac75f[_0x102d61(0x1b2)](isSafeLockKeySegment))throw new Error('Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20'+_0x3d0cd7);const _0x43639f=resolve(join(_0x1e92e2[_0x102d61(0x1a3)],..._0x1ac75f)+_0x102d61(0x1ac)),_0xed15c=resolve(_0x1e92e2[_0x102d61(0x1a3)]);if(_0x43639f!==_0xed15c&&!_0x43639f[_0x102d61(0x19f)](_0xed15c+sep))throw new Error(_0x102d61(0x19b)+_0x43639f);return _0x43639f;}export function createHookLocationMap(_0x3bc379){const _0x6dc775=a290_0x445e91,_0x55a631=new Map();for(const _0x52cbd7 of _0x3bc379){_0x52cbd7[_0x6dc775(0x199)]&&_0x55a631[_0x6dc775(0x1a7)](_0x52cbd7[_0x6dc775(0x199)],{'datasetCode':_0x52cbd7[_0x6dc775(0x1c0)],'operationType':snakeToCamel(_0x52cbd7[_0x6dc775(0x1a2)]),'functionNode':'before'}),_0x52cbd7['afterScriptId']&&_0x55a631[_0x6dc775(0x1a7)](_0x52cbd7[_0x6dc775(0x1a1)],{'datasetCode':_0x52cbd7[_0x6dc775(0x1c0)],'operationType':snakeToCamel(_0x52cbd7[_0x6dc775(0x1a2)]),'functionNode':_0x6dc775(0x1b0)});}return _0x55a631;}export function resolveRemoteScriptTarget(_0x210ec7,_0x40e35e,_0x53f79f,_0x5ca233,_0x2e7f31){const _0x27b8b9=a290_0x445e91,_0x4a87de=normalizeBffType(_0x40e35e[_0x27b8b9(0x1bd)]);if(!_0x4a87de||!_0x40e35e[_0x27b8b9(0x1ab)])return null;if(_0x4a87de===_0x27b8b9(0x1b8)){const _0x224957=_0x40e35e['id']?_0x53f79f['get'](_0x40e35e['id']):undefined,_0x4add70=findHookLocationByRemoteId(_0x5ca233,_0x40e35e['id']),_0x867a2e=_0x224957?{..._0x4add70?.[_0x27b8b9(0x1c0)]===_0x224957[_0x27b8b9(0x1c0)]?_0x4add70:{},..._0x224957}:_0x4add70;if(!_0x867a2e)return null;const _0x14f945=_0x2e7f31[_0x27b8b9(0x1bf)](_0x867a2e['datasetCode'][_0x27b8b9(0x1bb)]()),_0x3e6f9a=_0x14f945??_0x867a2e[_0x27b8b9(0x1c0)],_0x920e02={..._0x867a2e,'alias':_0x14f945},_0x3d3507=_0x27b8b9(0x19a)+_0x3e6f9a+'/'+_0x920e02[_0x27b8b9(0x1a2)]+'/'+_0x920e02[_0x27b8b9(0x1c3)]+'/'+_0x40e35e['functionName'];if(!_0x3d3507[_0x27b8b9(0x1b5)]('/')['every'](isSafeLockKeySegment))return null;return{'lockKey':_0x3d3507,'filePath':resolveLocalFilePathFromLockKey(_0x210ec7,_0x3d3507),'type':_0x27b8b9(0x1b8),'hookLocation':_0x920e02};}const _0x59b40a=_0x4a87de+'/'+_0x40e35e['functionName'];if(!_0x59b40a[_0x27b8b9(0x1b5)]('/')[_0x27b8b9(0x1b2)](isSafeLockKeySegment))return null;return{'lockKey':_0x59b40a,'filePath':resolveLocalFilePathFromLockKey(_0x210ec7,_0x59b40a),'type':_0x4a87de};}export async function ensureParentDirectory(_0x44243b){await mkdir(dirname(_0x44243b),{'recursive':!![]});}export async function fileExists(_0x1a8d3b){const _0x359720=a290_0x445e91;try{return await access(_0x1a8d3b,constants[_0x359720(0x1a4)]),!![];}catch{return![];}}export async function directoryExists(_0x4246b5){const _0x1a5e7f=a290_0x445e91;try{const _0x578aea=await stat(_0x4246b5);return _0x578aea[_0x1a5e7f(0x19e)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a291_0x5097(_0xa5785d,_0xc5c476){_0xa5785d=_0xa5785d-0x19f;const _0x3866f4=a291_0x3866();let _0x509768=_0x3866f4[_0xa5785d];return _0x509768;}(function(_0x335c22,_0x1d5e27){const _0x59beba=a291_0x5097,_0x5468ae=_0x335c22();while(!![]){try{const _0x4b7c5c=parseInt(_0x59beba(0x1ae))/0x1*(-parseInt(_0x59beba(0x1a0))/0x2)+-parseInt(_0x59beba(0x1a9))/0x3*(-parseInt(_0x59beba(0x1a6))/0x4)+-parseInt(_0x59beba(0x1a1))/0x5*(parseInt(_0x59beba(0x1a5))/0x6)+parseInt(_0x59beba(0x19f))/0x7*(-parseInt(_0x59beba(0x1a7))/0x8)+parseInt(_0x59beba(0x1b0))/0x9+-parseInt(_0x59beba(0x1a3))/0xa+-parseInt(_0x59beba(0x1ad))/0xb*(-parseInt(_0x59beba(0x1ac))/0xc);if(_0x4b7c5c===_0x1d5e27)break;else _0x5468ae['push'](_0x5468ae['shift']());}catch(_0x394dd3){_0x5468ae['push'](_0x5468ae['shift']());}}}(a291_0x3866,0x784bf));import{readFile}from'node:fs/promises';function a291_0x3866(){const _0x3f287e=['600265QUADqu','createHash','9312700sbLJPT','utf8','6GWiLmT','6744ZjmDvB','1392696OOzJBf','digest','1371xFlhjX','md5','update','204BoRris','597663aejiyb','4QwaAog','hex','3537189nATMUt','14wJghXY','97476CebJMx'];a291_0x3866=function(){return _0x3f287e;};return a291_0x3866();}import a291_0x2b8b75 from'node:crypto';export function computeContentHash(_0x485adc){const _0xefa001=a291_0x5097;return a291_0x2b8b75[_0xefa001(0x1a2)](_0xefa001(0x1aa))[_0xefa001(0x1ab)](_0x485adc)[_0xefa001(0x1a8)](_0xefa001(0x1af));}export async function computeFileHash(_0x394792){const _0x11e18=a291_0x5097,_0x53e694=await readFile(_0x394792,_0x11e18(0x1a4));return computeContentHash(_0x53e694);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x572fac,_0x196733){const _0x2ebae4=a292_0x3871,_0x464792=_0x572fac();while(!![]){try{const _0xcefadc=-parseInt(_0x2ebae4(0x1d2))/0x1+parseInt(_0x2ebae4(0x1ab))/0x2+-parseInt(_0x2ebae4(0x1a2))/0x3*(parseInt(_0x2ebae4(0x1a3))/0x4)+-parseInt(_0x2ebae4(0x1c6))/0x5*(-parseInt(_0x2ebae4(0x1be))/0x6)+-parseInt(_0x2ebae4(0x1d3))/0x7+parseInt(_0x2ebae4(0x1ba))/0x8+parseInt(_0x2ebae4(0x1b7))/0x9*(parseInt(_0x2ebae4(0x1c8))/0xa);if(_0xcefadc===_0x196733)break;else _0x464792['push'](_0x464792['shift']());}catch(_0x41f278){_0x464792['push'](_0x464792['shift']());}}}(a292_0x2c4d,0x849e4));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x3ba18c){const _0x1a3737=a292_0x3871,_0x1bb4b0=[];for(const [_0x567b3d,_0x43a130]of Object['entries'](_0x3ba18c[_0x1a3737(0x1aa)])){const [_0x18d88e,_0x1a89cd]=_0x567b3d[_0x1a3737(0x1c9)]('/');if(_0x18d88e!==_0x1a3737(0x1c4)||!_0x1a89cd||!_0x43a130[_0x1a3737(0x1a9)])continue;_0x1bb4b0['push']({'alias':_0x1a89cd,'datasetCode':_0x43a130['datasetCode']});}return _0x1bb4b0;}export function uniqueTrackedHookDirectoryByDataset(_0x4d487e){const _0x5e43e2=a292_0x3871,_0x20da22=new Map();for(const _0x53a897 of trackedHookDirectoryMappings(_0x4d487e)){const _0x5c3893=directoryIdentity(_0x53a897[_0x5e43e2(0x1a9)]),_0x562f41=_0x20da22[_0x5e43e2(0x1ce)](_0x5c3893)??new Map();_0x562f41[_0x5e43e2(0x1a8)](directoryIdentity(_0x53a897['alias']),_0x53a897[_0x5e43e2(0x1c7)]),_0x20da22[_0x5e43e2(0x1a8)](_0x5c3893,_0x562f41);}const _0x4072eb=new Map();for(const [_0x27f2f7,_0x2d8896]of _0x20da22){if(_0x2d8896[_0x5e43e2(0x1b3)]>0x1)throw hookDirectoryError(_0x5e43e2(0x1a4),_0x5e43e2(0x1c2)+_0x27f2f7+_0x5e43e2(0x1b6)+[..._0x2d8896[_0x5e43e2(0x1bd)]()][_0x5e43e2(0x1ca)](',\x20')+'.',{'datasetCode':_0x27f2f7,'directories':[..._0x2d8896[_0x5e43e2(0x1bd)]()]});_0x4072eb[_0x5e43e2(0x1a8)](_0x27f2f7,[..._0x2d8896[_0x5e43e2(0x1bd)]()][0x0]);}return _0x4072eb;}export function assertUnambiguousHookDirectoryMappings(_0x16315b){const _0x386acc=a292_0x3871,_0x4a3db8=new Map();for(const {alias:_0x3b80db,datasetCode:_0x3cd124}of _0x16315b){const _0x187558=directoryIdentity(_0x3b80db),_0x2df4da=_0x4a3db8[_0x386acc(0x1ce)](_0x187558)??new Set();_0x2df4da[_0x386acc(0x1cc)](_0x3cd124),_0x4a3db8['set'](_0x187558,_0x2df4da);}for(const [_0x2d7ace,_0x336492]of _0x4a3db8){if(_0x336492[_0x386acc(0x1b3)]>0x1)throw hookDirectoryError(_0x386acc(0x1b1),'HOOK\x20directory\x20\x22'+_0x2d7ace+_0x386acc(0x1ac),{'directoryName':_0x2d7ace,'datasetCodes':[..._0x336492]});}}export function assertUnambiguousHookAliases(_0x5e24f2){const _0x83f0fe=a292_0x3871,_0x5524ba=[..._0x5e24f2],_0x360106=new Map(),_0x2d75e3=new Map();for(const {alias:_0x3de1b5,datasetCode:_0x4ac3f8}of _0x5524ba){const _0x40515e=directoryIdentity(_0x3de1b5),_0x564b8d=directoryIdentity(_0x4ac3f8),_0x4d650b=_0x360106[_0x83f0fe(0x1ce)](_0x40515e)??new Set();_0x4d650b[_0x83f0fe(0x1cc)](_0x4ac3f8),_0x360106[_0x83f0fe(0x1a8)](_0x40515e,_0x4d650b);const _0x27f53b=_0x2d75e3[_0x83f0fe(0x1ce)](_0x564b8d)??new Set();_0x27f53b['add'](_0x3de1b5),_0x2d75e3[_0x83f0fe(0x1a8)](_0x564b8d,_0x27f53b);}for(const [_0x31bf18,_0xa208a0]of _0x360106){if(_0xa208a0['size']>0x1)throw hookDirectoryError(_0x83f0fe(0x1af),_0x83f0fe(0x1bc)+_0x31bf18+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'alias':_0x31bf18,'datasetCodes':[..._0xa208a0]});}for(const [_0x4bc5ef,_0x45854a]of _0x2d75e3){if(_0x45854a[_0x83f0fe(0x1b3)]>0x1)throw hookDirectoryError(_0x83f0fe(0x1af),_0x83f0fe(0x1c2)+_0x4bc5ef+_0x83f0fe(0x1a5),{'datasetCode':_0x4bc5ef,'aliases':[..._0x45854a]});}}export function buildHookDirectoryIndexes(_0x348522,_0x3529f3=[]){const _0xe23943=a292_0x3871,_0x4dcaea=[..._0x3529f3];assertUnambiguousHookDirectoryMappings(_0x4dcaea[_0xe23943(0x1c5)](([_0x3748e1,_0x161ff9])=>({'alias':_0x3748e1,'datasetCode':_0x161ff9})));const _0x27a6bb=new Map(),_0x1ed401=new Map();for(const _0x2e9e18 of _0x348522){appendUnique(_0x27a6bb,directoryIdentity(_0x2e9e18[_0xe23943(0x1b0)]),_0x2e9e18,_0x5449ea=>_0x5449ea[_0xe23943(0x1b0)]);}for(const [_0x28510d,_0x17484a]of _0x4dcaea){appendUnique(_0x1ed401,directoryIdentity(_0x28510d),_0x17484a,_0x3b8ff4=>_0x3b8ff4);}return{'datasetCodeToDatasets':_0x27a6bb,'aliasToDatasetCodes':_0x1ed401};}export function resolvePushHookDirectory(_0x15110c,_0x4a5b30,_0x4ec412){const _0x45b989=a292_0x3871,_0x5e47ee=directoryIdentity(_0x15110c),_0x2cd9e5=_0x4ec412[_0x45b989(0x1ae)]['get'](_0x5e47ee)??[],_0x289805=_0x4ec412[_0x45b989(0x1cf)][_0x45b989(0x1ce)](_0x5e47ee)??[],_0xb53e1b=new Set([..._0x2cd9e5[_0x45b989(0x1c5)](_0x74f1a1=>_0x74f1a1[_0x45b989(0x1b0)]),..._0x289805]);if(_0xb53e1b[_0x45b989(0x1b3)]>0x1)throw hookDirectoryError(_0x45b989(0x1b1),_0x45b989(0x1d1)+_0x15110c+_0x45b989(0x1b9),{'directoryName':_0x15110c,'datasetCodes':[..._0xb53e1b]});const _0xfc009e=[..._0xb53e1b][0x0];if(_0xfc009e&&_0x4a5b30?.[_0x45b989(0x1a9)]&&_0xfc009e!==_0x4a5b30['datasetCode'])throw hookDirectoryError(_0x45b989(0x1b5),_0x45b989(0x1d1)+_0x15110c+_0x45b989(0x1b2)+_0x4a5b30[_0x45b989(0x1a9)]+'\x22\x20to\x20\x22'+_0xfc009e+'\x22.',{'directoryName':_0x15110c,'datasetCode':_0xfc009e,'lockedDatasetCode':_0x4a5b30['datasetCode']});const _0x4e9886=_0xfc009e?findDatasetByCode(_0x4ec412,_0xfc009e):undefined,_0x5c7239=!!_0xfc009e&&_0x289805['includes'](_0xfc009e);if(_0x4e9886)return{'dataset':_0x4e9886,'datasetCode':_0x4e9886[_0x45b989(0x1b0)],..._0x5c7239?{'alias':_0x15110c}:{},'directoryProtocol':_0x5c7239?_0x45b989(0x1c7):_0x45b989(0x1a9),'warnings':[]};const _0x1d2efc=_0x4a5b30?.[_0x45b989(0x1a9)];if(_0x1d2efc){const _0x5a0290=findDatasetByCode(_0x4ec412,_0x1d2efc);if(_0x5a0290)return{'dataset':_0x5a0290,'datasetCode':_0x5a0290[_0x45b989(0x1b0)],..._0x4a5b30[_0x45b989(0x1c7)]?{'alias':_0x4a5b30[_0x45b989(0x1c7)]}:{},'directoryProtocol':_0x4a5b30[_0x45b989(0x1c7)]?'alias':'datasetCode','warnings':[]};}if(_0xfc009e||_0x1d2efc){const _0x4b4f5c=_0xfc009e??_0x1d2efc;throw hookDirectoryError('HOOK_DATASET_NOT_FOUND',_0x45b989(0x1d1)+_0x15110c+_0x45b989(0x1c1),{'directoryName':_0x15110c,'datasetCode':_0x4b4f5c});}throw hookDirectoryError(_0x45b989(0x1cb),'Cannot\x20resolve\x20HOOK\x20directory\x20\x22'+_0x15110c+_0x45b989(0x1bb),{'directoryName':_0x15110c});}export function preflightPushHookDirectories(_0x4a8c9e,_0x1b1a17,_0x5015f9,_0x3a78b6){const _0x58d1ad=a292_0x3871,_0x5aff74=new Map(),_0x3c4f81=new Map();for(const _0x154c99 of _0x4a8c9e){if(_0x154c99[_0x58d1ad(0x1b8)]!=='HOOK')continue;const _0x3e46b9=_0x154c99[_0x58d1ad(0x1c7)];if(!_0x3e46b9)throw hookDirectoryError(_0x58d1ad(0x1cb),_0x58d1ad(0x1c0)+_0x154c99[_0x58d1ad(0x1c3)],{'lockKey':_0x154c99['lockKey']});let _0x39b1b6;try{_0x39b1b6=resolvePushHookDirectory(_0x3e46b9,_0x1b1a17[_0x58d1ad(0x1aa)][_0x154c99['lockKey']],_0x5015f9);}catch(_0x4be015){if(_0x3a78b6&&_0x4be015 instanceof CliError&&['HOOK_DATASET_NOT_FOUND','HOOK_DIRECTORY_UNRESOLVED'][_0x58d1ad(0x1cd)](_0x4be015['code'])){_0x3a78b6[_0x58d1ad(0x1a8)](_0x154c99[_0x58d1ad(0x1c3)],_0x4be015[_0x58d1ad(0x1d0)]);continue;}throw _0x4be015;}_0x5aff74['set'](_0x154c99[_0x58d1ad(0x1c3)],_0x39b1b6);const _0x40c202=_0x3c4f81['get'](_0x39b1b6[_0x58d1ad(0x1a9)])??new Set();_0x40c202['add'](_0x3e46b9),_0x3c4f81[_0x58d1ad(0x1a8)](_0x39b1b6[_0x58d1ad(0x1a9)],_0x40c202);}for(const [_0x3b248c,_0x299f53]of _0x3c4f81){if(_0x299f53['size']>0x1)throw hookDirectoryError(_0x58d1ad(0x1a4),'Dataset\x20\x22'+_0x3b248c+'\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20'+[..._0x299f53][_0x58d1ad(0x1ca)](',\x20')+'.',{'datasetCode':_0x3b248c,'directories':[..._0x299f53]});}return _0x5aff74;}function a292_0x2c4d(){const _0x52798a=['aliasToDatasetCodes','message','HOOK\x20directory\x20\x22','964497fvziCE','2042999nVHNEo','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','details','some','6FquQsb','319108DowvEb','HOOK_DUPLICATE_DIRECTORIES','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','HOOK_DATASET_CODE_AMBIGUOUS','length','set','datasetCode','functions','1599326xgUbwu','\x22\x20resolves\x20to\x20multiple\x20Datasets.','name','datasetCodeToDatasets','HOOK_ALIAS_AMBIGUOUS','code','HOOK_DIRECTORY_AMBIGUOUS','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','size','Dataset\x20code\x20\x22','HOOK_MAPPING_DRIFT','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','339777tDYeyG','type','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','3004504cykGUN','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','SDK\x20alias\x20\x22','values','34482KkyEEJ','toLowerCase','Incomplete\x20HOOK\x20path:\x20','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','Dataset\x20\x22','lockKey','HOOK','map','255ANQkFO','alias','130hxuNAX','split','join','HOOK_DIRECTORY_UNRESOLVED','add','includes','get'];a292_0x2c4d=function(){return _0x52798a;};return a292_0x2c4d();}export function hookDirectoryError(_0x4f61ec,_0x1e7cad,_0x544a37){const _0x5c7ada=a292_0x3871,_0x536fd5=new CliError(_0x4f61ec,0x2,_0x4f61ec+':\x20'+_0x1e7cad);return _0x536fd5[_0x5c7ada(0x1d5)]=_0x544a37,_0x536fd5;}function findDatasetByCode(_0x2ea7d2,_0x1a73b6){const _0x269eae=a292_0x3871,_0x327a04=_0x2ea7d2[_0x269eae(0x1ae)][_0x269eae(0x1ce)](directoryIdentity(_0x1a73b6))??[];if(_0x327a04[_0x269eae(0x1a7)]>0x1)throw hookDirectoryError(_0x269eae(0x1a6),_0x269eae(0x1b4)+_0x1a73b6+_0x269eae(0x1d4),{'datasetCode':_0x1a73b6,'candidates':_0x327a04[_0x269eae(0x1c5)](datasetFact)});return _0x327a04[0x0];}function directoryIdentity(_0x56d871){const _0x4c4110=a292_0x3871;return _0x56d871['normalize']('NFC')[_0x4c4110(0x1bf)]();}function a292_0x3871(_0x413af5,_0x4dc809){_0x413af5=_0x413af5-0x1a2;const _0x2c4d89=a292_0x2c4d();let _0x387198=_0x2c4d89[_0x413af5];return _0x387198;}function appendUnique(_0x315ade,_0x332598,_0xd2daea,_0xde5f5c){const _0xd7862c=a292_0x3871,_0x54677b=_0x315ade['get'](_0x332598)??[];!_0x54677b[_0xd7862c(0x1d6)](_0x311049=>_0xde5f5c(_0x311049)===_0xde5f5c(_0xd2daea))&&_0x54677b['push'](_0xd2daea),_0x315ade[_0xd7862c(0x1a8)](_0x332598,_0x54677b);}function datasetFact(_0x4bfb29){const _0x495873=a292_0x3871;return{'id':_0x4bfb29['id'],'name':_0x4bfb29[_0x495873(0x1ad)],'datasetCode':_0x4bfb29[_0x495873(0x1b0)]};}
|
|
1
|
+
(function(_0x5ef080,_0x4ce3b0){const _0x3203d8=a292_0x2991,_0x20f802=_0x5ef080();while(!![]){try{const _0x4b6be5=parseInt(_0x3203d8(0x16d))/0x1*(-parseInt(_0x3203d8(0x186))/0x2)+-parseInt(_0x3203d8(0x19c))/0x3+parseInt(_0x3203d8(0x194))/0x4+-parseInt(_0x3203d8(0x177))/0x5+parseInt(_0x3203d8(0x18a))/0x6*(parseInt(_0x3203d8(0x17d))/0x7)+parseInt(_0x3203d8(0x17c))/0x8*(parseInt(_0x3203d8(0x17e))/0x9)+-parseInt(_0x3203d8(0x17a))/0xa*(-parseInt(_0x3203d8(0x185))/0xb);if(_0x4b6be5===_0x4ce3b0)break;else _0x20f802['push'](_0x20f802['shift']());}catch(_0xf88cd8){_0x20f802['push'](_0x20f802['shift']());}}}(a292_0x66ed,0xdf10a));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x2f61bb){const _0x414a8b=a292_0x2991,_0x263a67=[];for(const [_0x139bcf,_0x11a4ba]of Object[_0x414a8b(0x181)](_0x2f61bb[_0x414a8b(0x16c)])){const [_0x50c996,_0x253f06]=_0x139bcf[_0x414a8b(0x193)]('/');if(_0x50c996!=='HOOK'||!_0x253f06||!_0x11a4ba[_0x414a8b(0x199)])continue;_0x263a67[_0x414a8b(0x19a)]({'alias':_0x253f06,'datasetCode':_0x11a4ba[_0x414a8b(0x199)]});}return _0x263a67;}function a292_0x66ed(){const _0x17e105=['HOOK_MAPPING_DRIFT','lockKey','set','some','map','add','Dataset\x20code\x20\x22','name','split','2419888Aqsoac','HOOK_DIRECTORY_AMBIGUOUS','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','datasetCode','push','\x22\x20resolves\x20to\x20multiple\x20Datasets.','4697181kKGufh','NFC','HOOK_DATASET_NOT_FOUND','toLowerCase','size','aliasToDatasetCodes','includes','functions','563QeGFMR','HOOK_DIRECTORY_UNRESOLVED','Incomplete\x20HOOK\x20path:\x20','HOOK\x20directory\x20\x22','join','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','datasetCodeToDatasets','length','HOOK_ALIAS_AMBIGUOUS','type','7782945cQxxPD','message','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','459320iligZb','get','1544gRdhRX','21WznWHX','31329hgWOSz','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','HOOK','entries','details','HOOK_DATASET_CODE_AMBIGUOUS','values','440Ofgffd','514HkQwPV','HOOK_DUPLICATE_DIRECTORIES','code','alias','2133192yQjTBK'];a292_0x66ed=function(){return _0x17e105;};return a292_0x66ed();}export function uniqueTrackedHookDirectoryByDataset(_0x2658de){const _0xfcfd28=a292_0x2991,_0x466e52=new Map();for(const _0x260f57 of trackedHookDirectoryMappings(_0x2658de)){const _0x44d047=directoryIdentity(_0x260f57[_0xfcfd28(0x199)]),_0x29430a=_0x466e52[_0xfcfd28(0x17b)](_0x44d047)??new Map();_0x29430a[_0xfcfd28(0x18d)](directoryIdentity(_0x260f57[_0xfcfd28(0x189)]),_0x260f57[_0xfcfd28(0x189)]),_0x466e52[_0xfcfd28(0x18d)](_0x44d047,_0x29430a);}const _0x7a5754=new Map();for(const [_0xef1c4c,_0x541cd0]of _0x466e52){if(_0x541cd0[_0xfcfd28(0x169)]>0x1)throw hookDirectoryError(_0xfcfd28(0x187),'Dataset\x20\x22'+_0xef1c4c+_0xfcfd28(0x197)+[..._0x541cd0[_0xfcfd28(0x184)]()][_0xfcfd28(0x171)](',\x20')+'.',{'datasetCode':_0xef1c4c,'directories':[..._0x541cd0[_0xfcfd28(0x184)]()]});_0x7a5754[_0xfcfd28(0x18d)](_0xef1c4c,[..._0x541cd0[_0xfcfd28(0x184)]()][0x0]);}return _0x7a5754;}export function assertUnambiguousHookDirectoryMappings(_0x4e5850){const _0x2336a0=a292_0x2991,_0x18e30a=new Map();for(const {alias:_0x24af97,datasetCode:_0x8d2690}of _0x4e5850){const _0x23238f=directoryIdentity(_0x24af97),_0x2d54ef=_0x18e30a['get'](_0x23238f)??new Set();_0x2d54ef[_0x2336a0(0x190)](_0x8d2690),_0x18e30a[_0x2336a0(0x18d)](_0x23238f,_0x2d54ef);}for(const [_0x2e2fa8,_0x20bbff]of _0x18e30a){if(_0x20bbff[_0x2336a0(0x169)]>0x1)throw hookDirectoryError(_0x2336a0(0x195),_0x2336a0(0x170)+_0x2e2fa8+_0x2336a0(0x19b),{'directoryName':_0x2e2fa8,'datasetCodes':[..._0x20bbff]});}}function a292_0x2991(_0x442458,_0x1ee2d1){_0x442458=_0x442458-0x168;const _0x66ed7a=a292_0x66ed();let _0x29916f=_0x66ed7a[_0x442458];return _0x29916f;}export function assertUnambiguousHookAliases(_0x327169){const _0xf58035=a292_0x2991,_0x4135ff=[..._0x327169],_0x41c858=new Map(),_0x54b23d=new Map();for(const {alias:_0x552654,datasetCode:_0x18a28c}of _0x4135ff){const _0xbfb008=directoryIdentity(_0x552654),_0x26906c=directoryIdentity(_0x18a28c),_0x1f16fa=_0x41c858[_0xf58035(0x17b)](_0xbfb008)??new Set();_0x1f16fa[_0xf58035(0x190)](_0x18a28c),_0x41c858['set'](_0xbfb008,_0x1f16fa);const _0x1b06c2=_0x54b23d[_0xf58035(0x17b)](_0x26906c)??new Set();_0x1b06c2['add'](_0x552654),_0x54b23d[_0xf58035(0x18d)](_0x26906c,_0x1b06c2);}for(const [_0x284340,_0x3fa80f]of _0x41c858){if(_0x3fa80f[_0xf58035(0x169)]>0x1)throw hookDirectoryError(_0xf58035(0x175),'SDK\x20alias\x20\x22'+_0x284340+_0xf58035(0x19b),{'alias':_0x284340,'datasetCodes':[..._0x3fa80f]});}for(const [_0xf8a86a,_0x5e3562]of _0x54b23d){if(_0x5e3562[_0xf58035(0x169)]>0x1)throw hookDirectoryError(_0xf58035(0x175),'Dataset\x20\x22'+_0xf8a86a+'\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.',{'datasetCode':_0xf8a86a,'aliases':[..._0x5e3562]});}}export function buildHookDirectoryIndexes(_0x55901e,_0x491b12=[]){const _0x26f4a2=a292_0x2991,_0xaf7fd8=[..._0x491b12];assertUnambiguousHookDirectoryMappings(_0xaf7fd8[_0x26f4a2(0x18f)](([_0x28d312,_0xc1b142])=>({'alias':_0x28d312,'datasetCode':_0xc1b142})));const _0x29a608=new Map(),_0x4e34a1=new Map();for(const _0x3c94a4 of _0x55901e){appendUnique(_0x29a608,directoryIdentity(_0x3c94a4[_0x26f4a2(0x188)]),_0x3c94a4,_0x3a19e3=>_0x3a19e3['code']);}for(const [_0x5b7605,_0x316e00]of _0xaf7fd8){appendUnique(_0x4e34a1,directoryIdentity(_0x5b7605),_0x316e00,_0x245f1f=>_0x245f1f);}return{'datasetCodeToDatasets':_0x29a608,'aliasToDatasetCodes':_0x4e34a1};}export function resolvePushHookDirectory(_0x4a06eb,_0xcd2056,_0x224b29){const _0x44997a=a292_0x2991,_0x5865a8=directoryIdentity(_0x4a06eb),_0x473d57=_0x224b29[_0x44997a(0x173)]['get'](_0x5865a8)??[],_0x3b8a2a=_0x224b29[_0x44997a(0x16a)][_0x44997a(0x17b)](_0x5865a8)??[],_0x39c687=new Set([..._0x473d57[_0x44997a(0x18f)](_0x34e33e=>_0x34e33e[_0x44997a(0x188)]),..._0x3b8a2a]);if(_0x39c687['size']>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS',_0x44997a(0x170)+_0x4a06eb+_0x44997a(0x196),{'directoryName':_0x4a06eb,'datasetCodes':[..._0x39c687]});const _0x287fcb=[..._0x39c687][0x0];if(_0x287fcb&&_0xcd2056?.['datasetCode']&&_0x287fcb!==_0xcd2056[_0x44997a(0x199)])throw hookDirectoryError(_0x44997a(0x18b),_0x44997a(0x170)+_0x4a06eb+'\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22'+_0xcd2056[_0x44997a(0x199)]+'\x22\x20to\x20\x22'+_0x287fcb+'\x22.',{'directoryName':_0x4a06eb,'datasetCode':_0x287fcb,'lockedDatasetCode':_0xcd2056[_0x44997a(0x199)]});const _0x1d6b61=_0x287fcb?findDatasetByCode(_0x224b29,_0x287fcb):undefined,_0x523e71=!!_0x287fcb&&_0x3b8a2a[_0x44997a(0x16b)](_0x287fcb);if(_0x1d6b61)return{'dataset':_0x1d6b61,'datasetCode':_0x1d6b61[_0x44997a(0x188)],..._0x523e71?{'alias':_0x4a06eb}:{},'directoryProtocol':_0x523e71?_0x44997a(0x189):_0x44997a(0x199),'warnings':[]};const _0x97b6da=_0xcd2056?.[_0x44997a(0x199)];if(_0x97b6da){const _0x6ab40d=findDatasetByCode(_0x224b29,_0x97b6da);if(_0x6ab40d)return{'dataset':_0x6ab40d,'datasetCode':_0x6ab40d[_0x44997a(0x188)],..._0xcd2056['alias']?{'alias':_0xcd2056['alias']}:{},'directoryProtocol':_0xcd2056[_0x44997a(0x189)]?'alias':'datasetCode','warnings':[]};}if(_0x287fcb||_0x97b6da){const _0x21bec3=_0x287fcb??_0x97b6da;throw hookDirectoryError(_0x44997a(0x19e),_0x44997a(0x170)+_0x4a06eb+_0x44997a(0x172),{'directoryName':_0x4a06eb,'datasetCode':_0x21bec3});}throw hookDirectoryError('HOOK_DIRECTORY_UNRESOLVED',_0x44997a(0x17f)+_0x4a06eb+'\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.',{'directoryName':_0x4a06eb});}export function preflightPushHookDirectories(_0x47f78d,_0x3b6571,_0x2b07d7,_0x3756dd){const _0x48a86d=a292_0x2991,_0x2f9163=new Map(),_0x4dafce=new Map();for(const _0x78632c of _0x47f78d){if(_0x78632c[_0x48a86d(0x176)]!==_0x48a86d(0x180))continue;const _0x313e0e=_0x78632c[_0x48a86d(0x189)];if(!_0x313e0e)throw hookDirectoryError('HOOK_DIRECTORY_UNRESOLVED',_0x48a86d(0x16f)+_0x78632c[_0x48a86d(0x18c)],{'lockKey':_0x78632c[_0x48a86d(0x18c)]});let _0x561684;try{_0x561684=resolvePushHookDirectory(_0x313e0e,_0x3b6571[_0x48a86d(0x16c)][_0x78632c[_0x48a86d(0x18c)]],_0x2b07d7);}catch(_0x2a51dd){if(_0x3756dd&&_0x2a51dd instanceof CliError&&[_0x48a86d(0x19e),_0x48a86d(0x16e)][_0x48a86d(0x16b)](_0x2a51dd[_0x48a86d(0x188)])){_0x3756dd['set'](_0x78632c[_0x48a86d(0x18c)],_0x2a51dd[_0x48a86d(0x178)]);continue;}throw _0x2a51dd;}_0x2f9163[_0x48a86d(0x18d)](_0x78632c[_0x48a86d(0x18c)],_0x561684);const _0x2aa65c=_0x4dafce[_0x48a86d(0x17b)](_0x561684[_0x48a86d(0x199)])??new Set();_0x2aa65c[_0x48a86d(0x190)](_0x313e0e),_0x4dafce[_0x48a86d(0x18d)](_0x561684[_0x48a86d(0x199)],_0x2aa65c);}for(const [_0x415bf9,_0xf7f38c]of _0x4dafce){if(_0xf7f38c['size']>0x1)throw hookDirectoryError(_0x48a86d(0x187),'Dataset\x20\x22'+_0x415bf9+_0x48a86d(0x198)+[..._0xf7f38c][_0x48a86d(0x171)](',\x20')+'.',{'datasetCode':_0x415bf9,'directories':[..._0xf7f38c]});}return _0x2f9163;}export function hookDirectoryError(_0x5e95cb,_0x553e41,_0x519b7a){const _0x52acd2=a292_0x2991,_0x183466=new CliError(_0x5e95cb,0x2,_0x5e95cb+':\x20'+_0x553e41);return _0x183466[_0x52acd2(0x182)]=_0x519b7a,_0x183466;}function findDatasetByCode(_0x59d6c1,_0x497900){const _0x25a200=a292_0x2991,_0x20bed2=_0x59d6c1[_0x25a200(0x173)][_0x25a200(0x17b)](directoryIdentity(_0x497900))??[];if(_0x20bed2[_0x25a200(0x174)]>0x1)throw hookDirectoryError(_0x25a200(0x183),_0x25a200(0x191)+_0x497900+_0x25a200(0x179),{'datasetCode':_0x497900,'candidates':_0x20bed2[_0x25a200(0x18f)](datasetFact)});return _0x20bed2[0x0];}function directoryIdentity(_0x28f931){const _0x248c02=a292_0x2991;return _0x28f931['normalize'](_0x248c02(0x19d))[_0x248c02(0x168)]();}function appendUnique(_0x41636d,_0x3fb522,_0x3dd82b,_0x51acbb){const _0x1d53f4=a292_0x2991,_0x123cad=_0x41636d[_0x1d53f4(0x17b)](_0x3fb522)??[];!_0x123cad[_0x1d53f4(0x18e)](_0x3fed5f=>_0x51acbb(_0x3fed5f)===_0x51acbb(_0x3dd82b))&&_0x123cad[_0x1d53f4(0x19a)](_0x3dd82b),_0x41636d['set'](_0x3fb522,_0x123cad);}function datasetFact(_0x58cbce){const _0x29e469=a292_0x2991;return{'id':_0x58cbce['id'],'name':_0x58cbce[_0x29e469(0x192)],'datasetCode':_0x58cbce[_0x29e469(0x188)]};}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1b4fef,_0x1d6a58){const _0x15bb4b=a293_0x48d3,_0x453e21=_0x1b4fef();while(!![]){try{const _0x143ecf=parseInt(_0x15bb4b(0x16a))/0x1*(-parseInt(_0x15bb4b(0x156))/0x2)+-parseInt(_0x15bb4b(0x15d))/0x3+parseInt(_0x15bb4b(0x163))/0x4*(parseInt(_0x15bb4b(0x16c))/0x5)+parseInt(_0x15bb4b(0x15a))/0x6+parseInt(_0x15bb4b(0x157))/0x7+-parseInt(_0x15bb4b(0x164))/0x8+parseInt(_0x15bb4b(0x169))/0x9;if(_0x143ecf===_0x1d6a58)break;else _0x453e21['push'](_0x453e21['shift']());}catch(_0x460cba){_0x453e21['push'](_0x453e21['shift']());}}}(a293_0x130c,0xdb95e));function a293_0x48d3(_0x51f321,_0x190fc0){_0x51f321=_0x51f321-0x156;const _0x130c05=a293_0x130c();let _0x48d361=_0x130c05[_0x51f321];return _0x48d361;}function a293_0x130c(){const _0x76b0cc=['\x22.\x20','ENOENT','parse','apps','11374677VRNEKn','1ZrJnAP','code','5GyjaLZ','stringify','1551306EEHnVG','9615060rsWjuA','Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20','object','7222596wndadL',':\x20scriptsRoot\x20mismatch\x20—\x20','\x22\x20vs\x20lock\x20\x22','2140053rjhFig','functions','scriptsRoot','lastSync','current\x20\x22','utf8','1033608RoAWym','13689400lCgjjl'];a293_0x130c=function(){return _0x76b0cc;};return a293_0x130c();}import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x25d304,_0x2bea97,_0x49ace9,_0x2aaeb4){const _0x548266=a293_0x48d3,_0x52086c={'apps':_0x25d304[_0x548266(0x168)]&&typeof _0x25d304[_0x548266(0x168)]===_0x548266(0x159)?_0x25d304[_0x548266(0x168)]:{}};let _0x1ba26a=_0x52086c[_0x548266(0x168)][_0x2bea97];if(!_0x1ba26a)return _0x1ba26a={'scriptsRoot':_0x49ace9,'lastSync':'','functions':{}},_0x52086c['apps'][_0x2bea97]=_0x1ba26a,{'lockData':_0x52086c,'appLock':_0x1ba26a};if(!_0x1ba26a[_0x548266(0x15f)])_0x1ba26a['scriptsRoot']=_0x49ace9;else{if(_0x1ba26a[_0x548266(0x15f)]!==_0x49ace9)throw new Error(_0x2aaeb4+_0x548266(0x15b)+(_0x548266(0x161)+_0x49ace9+_0x548266(0x15c)+_0x1ba26a[_0x548266(0x15f)]+_0x548266(0x165))+'Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x1ba26a[_0x548266(0x15e)]&&(_0x1ba26a['functions']={}),!_0x1ba26a[_0x548266(0x160)]&&(_0x1ba26a['lastSync']=''),{'lockData':_0x52086c,'appLock':_0x1ba26a};}export async function readBffLockFile(_0x31dcbf){const _0x4f0459=a293_0x48d3;try{const _0x357cbc=await readFile(_0x31dcbf,_0x4f0459(0x162)),_0x4eaba1=JSON[_0x4f0459(0x167)](_0x357cbc);return{'apps':_0x4eaba1['apps']&&typeof _0x4eaba1[_0x4f0459(0x168)]===_0x4f0459(0x159)?_0x4eaba1[_0x4f0459(0x168)]:{}};}catch(_0x2dd890){if(_0x2dd890[_0x4f0459(0x16b)]===_0x4f0459(0x166))return null;throw new Error(_0x4f0459(0x158)+String(_0x2dd890));}}export async function writeBffLockFile(_0x504f18,_0x2d1c47){const _0xe23de2=a293_0x48d3;await mkdir(dirname(_0x504f18),{'recursive':!![]}),await writeFile(_0x504f18,JSON[_0xe23de2(0x16d)](_0x2d1c47,null,0x2),'utf8');}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a295_0x2f0a(_0x14a169,_0x26cd69){_0x14a169=_0x14a169-0x135;const _0x3f4cf1=a295_0x3f4c();let _0x2f0a4a=_0x3f4cf1[_0x14a169];return _0x2f0a4a;}const a295_0x3c883b=a295_0x2f0a;(function(_0x57b2b0,_0x1b5d1a){const _0x57d700=a295_0x2f0a,_0x4d6a70=_0x57b2b0();while(!![]){try{const _0x32ba8b=-parseInt(_0x57d700(0x135))/0x1+-parseInt(_0x57d700(0x14b))/0x2+parseInt(_0x57d700(0x14c))/0x3+-parseInt(_0x57d700(0x149))/0x4+parseInt(_0x57d700(0x142))/0x5+parseInt(_0x57d700(0x143))/0x6+parseInt(_0x57d700(0x14a))/0x7*(parseInt(_0x57d700(0x14e))/0x8);if(_0x32ba8b===_0x1b5d1a)break;else _0x4d6a70['push'](_0x4d6a70['shift']());}catch(_0x4636ff){_0x4d6a70['push'](_0x4d6a70['shift']());}}}(a295_0x3f4c,0x4fbfe));export const DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x3c883b(0x139);function a295_0x3f4c(){const _0x2f1694=['383832FSzlwl','match','replace','TODO:\x20add\x20script\x20description','some','operationType','2545404Uxobby','5653403ZtWbEK','859178eaiBUB','1162371MODKGW','map','8NZGqae','501029tXJlJB','before','split','toLowerCase','TODO:\x20补充脚本功能描述','trim','functionNode','alias','datasetCode','test','entries','startsWith','remoteId','3172825tPEzot'];a295_0x3f4c=function(){return _0x2f1694;};return a295_0x3f4c();}const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x3c883b(0x146);export function snakeToCamel(_0x4325f3){const _0x4c9523=a295_0x3c883b;return _0x4325f3[_0x4c9523(0x138)]()[_0x4c9523(0x145)](/_([a-z])/g,(_0x2a94d2,_0x526a91)=>_0x526a91['toUpperCase']());}export function findHookLocationByRemoteId(_0x387dd6,_0x6597a7){const _0x4c83dc=a295_0x3c883b;if(!_0x6597a7)return undefined;for(const [_0x234858,_0x30052b]of Object[_0x4c83dc(0x13f)](_0x387dd6)){if(_0x30052b[_0x4c83dc(0x141)]===_0x6597a7&&_0x30052b['datasetCode']&&_0x30052b[_0x4c83dc(0x148)]&&_0x30052b[_0x4c83dc(0x13b)]){const _0x2aaf77=_0x234858[_0x4c83dc(0x137)]('/')[0x1];return{'alias':_0x2aaf77||_0x30052b[_0x4c83dc(0x13c)],'datasetCode':_0x30052b[_0x4c83dc(0x13d)],'operationType':_0x30052b[_0x4c83dc(0x148)],'functionNode':_0x30052b[_0x4c83dc(0x13b)]};}}return undefined;}export function extractScriptDescription(_0x413526){const _0x101699=a295_0x3c883b,_0x4c2b4e=_0x413526['match'](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x4c2b4e?.[0x1])return undefined;const _0x4d3af9=_0x4c2b4e[0x1],_0x5d9311=_0x5a8c2b=>{const _0x846801=a295_0x2f0a,_0x233043=_0x5a8c2b?.[_0x846801(0x13a)]();if(!_0x233043||_0x233043===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0x233043===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0x233043;},_0x1e8b29=_0x4d3af9[_0x101699(0x144)](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x1e8b29)return _0x5d9311(_0x1e8b29[0x1]);const _0x2228ab=_0x4d3af9[_0x101699(0x137)](/\r?\n/)[_0x101699(0x14d)](_0x5c4687=>_0x5c4687[_0x101699(0x145)](/^\s*\*\s?/,'')[_0x101699(0x13a)]()),_0x1b2de1=_0x2228ab[_0x101699(0x147)](_0x32ddd6=>/^\[\s*脚本类型\s*]\s*\S+/[_0x101699(0x13e)](_0x32ddd6))&&_0x2228ab[_0x101699(0x147)](_0x5eae68=>/^\[\s*脚本名称\s*]\s*\S+/[_0x101699(0x13e)](_0x5eae68));if(!_0x1b2de1)return undefined;for(const _0x460d3e of _0x2228ab){if(!_0x460d3e||_0x460d3e[_0x101699(0x140)]('@')||/^\[[^\]]+]\s*/[_0x101699(0x13e)](_0x460d3e))continue;return _0x5d9311(_0x460d3e);}return undefined;}export function isValidBffFunctionName(_0x48e56f){const _0xd2c73=a295_0x3c883b;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0xd2c73(0x13e)](_0x48e56f);}export function normalizeHookFunctionNode(_0x33d85b){const _0x3f3355=a295_0x3c883b;if(!_0x33d85b)return undefined;const _0x3b9269=_0x33d85b[_0x3f3355(0x13a)]()[_0x3f3355(0x138)]();if(_0x3b9269===_0x3f3355(0x136)||_0x3b9269==='after')return _0x3b9269;return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a296_0x20be48=a296_0x1827;function a296_0x1827(_0x44cd96,_0x5eaec9){_0x44cd96=_0x44cd96-0x174;const _0x6378fb=a296_0x6378();let _0x18274f=_0x6378fb[_0x44cd96];return _0x18274f;}(function(_0x3de96f,_0x3c5bf1){const _0x145807=a296_0x1827,_0x117455=_0x3de96f();while(!![]){try{const _0x2e322d=parseInt(_0x145807(0x17a))/0x1+parseInt(_0x145807(0x17b))/0x2+-parseInt(_0x145807(0x17c))/0x3*(-parseInt(_0x145807(0x175))/0x4)+parseInt(_0x145807(0x176))/0x5+parseInt(_0x145807(0x178))/0x6+parseInt(_0x145807(0x179))/0x7+parseInt(_0x145807(0x174))/0x8*(-parseInt(_0x145807(0x17d))/0x9);if(_0x2e322d===_0x3c5bf1)break;else _0x117455['push'](_0x117455['shift']());}catch(_0x557e4b){_0x117455['push'](_0x117455['shift']());}}}(a296_0x6378,0xda594));function a296_0x6378(){const _0x585db3=['7822143gPMWCS','1508663kDktoK','63480NVYmpw','129gwKfBv','5238aAiYGT','61144Ibyphy','93468zNhLlW','78840ZHwzxi','/smartapi/db-analysis/cross-db/latest-job','9985086LPvyTR'];a296_0x6378=function(){return _0x585db3;};return a296_0x6378();}export const CROSS_DB_ANALYSIS_PATHS={'start':'/smartapi/db-analysis/cross-db/start','status':'/smartapi/db-analysis/cross-db/status','latest':a296_0x20be48(0x177)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a297_0x516e(){const _0x12ca9a=['2HHMKCw','7QsZACr','4079976kxabZU','14568235XOtPZT','/smartapi/cross-db-relation/create','/smartapi/cross-db-relation/delete','/smartapi/cross-db-relation/query','/smartapi/cross-db-relation/update','4947453QEEQNn','1144529qBuUBk','10jJUAyX','6251832TyrliH','132LjiAOd','337570cQhNwX','9529768ZWUsSr'];a297_0x516e=function(){return _0x12ca9a;};return a297_0x516e();}function a297_0x39cc(_0x304d50,_0x59799a){_0x304d50=_0x304d50-0x1cc;const _0x516eb1=a297_0x516e();let _0x39ccac=_0x516eb1[_0x304d50];return _0x39ccac;}const a297_0x5e6b2b=a297_0x39cc;(function(_0x32e6aa,_0x444406){const _0x152ef7=a297_0x39cc,_0x434cd6=_0x32e6aa();while(!![]){try{const _0x2ddd04=parseInt(_0x152ef7(0x1d0))/0x1*(-parseInt(_0x152ef7(0x1d6))/0x2)+-parseInt(_0x152ef7(0x1cf))/0x3+-parseInt(_0x152ef7(0x1d8))/0x4+parseInt(_0x152ef7(0x1d4))/0x5*(parseInt(_0x152ef7(0x1d3))/0x6)+-parseInt(_0x152ef7(0x1d7))/0x7*(-parseInt(_0x152ef7(0x1d5))/0x8)+parseInt(_0x152ef7(0x1d2))/0x9*(parseInt(_0x152ef7(0x1d1))/0xa)+parseInt(_0x152ef7(0x1d9))/0xb;if(_0x2ddd04===_0x444406)break;else _0x434cd6['push'](_0x434cd6['shift']());}catch(_0x51ef15){_0x434cd6['push'](_0x434cd6['shift']());}}}(a297_0x516e,0xd74e0));export const CROSS_DB_RELATION_PATHS={'list':a297_0x5e6b2b(0x1cd),'create':a297_0x5e6b2b(0x1da),'update':a297_0x5e6b2b(0x1ce),'delete':a297_0x5e6b2b(0x1cc)};
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x70b39e,_0x3fd850){const _0x3d4cb0=a298_0x2336,_0x3560a4=_0x70b39e();while(!![]){try{const _0x169f7b=parseInt(_0x3d4cb0(0xd8))/0x1+-parseInt(_0x3d4cb0(0xdf))/0x2*(-parseInt(_0x3d4cb0(0xd3))/0x3)+-parseInt(_0x3d4cb0(0xd4))/0x4+-parseInt(_0x3d4cb0(0xd9))/0x5*(-parseInt(_0x3d4cb0(0xd5))/0x6)+parseInt(_0x3d4cb0(0xde))/0x7*(-parseInt(_0x3d4cb0(0xc9))/0x8)+parseInt(_0x3d4cb0(0xdd))/0x9*(-parseInt(_0x3d4cb0(0xd0))/0xa)+-parseInt(_0x3d4cb0(0xc4))/0xb;if(_0x169f7b===_0x3fd850)break;else _0x3560a4['push'](_0x3560a4['shift']());}catch(_0x17795c){_0x3560a4['push'](_0x3560a4['shift']());}}}(a298_0x2d49,0x46dc2));function a298_0x2336(_0x1716ca,_0x3c72cb){_0x1716ca=_0x1716ca-0xc1;const _0x2d4955=a298_0x2d49();let _0x2336b1=_0x2d4955[_0x1716ca];return _0x2336b1;}import{listDatasets}from'../core/api-client.js';function a298_0x2d49(){const _0x9264aa=['dbName','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','dbId','20zJtfow','get','includes','181311WHnldZ','1615320fIqWxX','138mJTVGM','join','has','504831kIebfm','19835CUNggH','dbtableConfig','find','set','7659KLmUnI','4823fHBOFy','16FErrSo','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','entries','toLowerCase','121495tsyexn','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','No\x20database\x20matching\x20\x22','map','\x22\x20matches\x20multiple\x20databases:\x20','4328rqVxwJ','\x22\x20under\x20app\x20\x22','db-','length'];a298_0x2d49=function(){return _0x9264aa;};return a298_0x2d49();}const cache=new Map();export async function listDatabases(_0x5002dc){const _0x122310=a298_0x2336;if(cache[_0x122310(0xd7)](_0x5002dc))return cache[_0x122310(0xd1)](_0x5002dc);const _0x30252a=await listDatasets(_0x5002dc),_0x4988ab=new Map();for(const _0x480023 of _0x30252a){const _0x5c9c2d=_0x480023[_0x122310(0xda)];_0x5c9c2d?.[_0x122310(0xcf)]!=null&&_0x4988ab[_0x122310(0xdc)](_0x5c9c2d[_0x122310(0xcf)],_0x5c9c2d[_0x122310(0xcd)]??_0x122310(0xcb)+_0x5c9c2d['dbId']);}const _0x1e36a2=[..._0x4988ab[_0x122310(0xc2)]()][_0x122310(0xc7)](([_0x366ed0,_0xbeddf7])=>({'dbId':_0x366ed0,'dbName':_0xbeddf7}));return cache['set'](_0x5002dc,_0x1e36a2),_0x1e36a2;}export async function resolveDb(_0x584150,_0x35b759){const _0x42a608=a298_0x2336,_0xba45ce=await listDatabases(_0x584150);if(_0xba45ce[_0x42a608(0xcc)]===0x0)return{'resolved':[],'error':_0x42a608(0xc1)+_0x584150+'\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.'};if(!_0x35b759)return{'resolved':_0xba45ce};const _0x7dbf8a=Number(_0x35b759);if(!Number['isNaN'](_0x7dbf8a)){const _0x5b79ec=_0xba45ce[_0x42a608(0xdb)](_0x51a58d=>_0x51a58d['dbId']===_0x7dbf8a);if(_0x5b79ec)return{'resolved':[_0x5b79ec]};}const _0x21d969=_0x35b759[_0x42a608(0xc3)](),_0x1264a2=_0xba45ce['filter'](_0x43b5e1=>_0x43b5e1[_0x42a608(0xcd)][_0x42a608(0xc3)]()[_0x42a608(0xd2)](_0x21d969));if(_0x1264a2['length']>0x0)return{'resolved':_0x1264a2};const _0x1802e8=_0xba45ce[_0x42a608(0xc7)](_0x53962b=>_0x53962b[_0x42a608(0xcd)]+'\x20('+_0x53962b['dbId']+')')[_0x42a608(0xd6)](',\x20');return{'resolved':[],'error':_0x42a608(0xc6)+_0x35b759+_0x42a608(0xca)+_0x584150+'\x22.\x20Available:\x20'+_0x1802e8+_0x42a608(0xce)};}export async function resolveOneDb(_0x3b6614,_0x1f9f0c){const _0x431a60=a298_0x2336,{resolved:_0x2c0e0c,error:_0x1e1833}=await resolveDb(_0x3b6614,_0x1f9f0c);if(_0x1e1833)return{'db':null,'error':_0x1e1833};if(_0x2c0e0c[_0x431a60(0xcc)]===0x1)return{'db':_0x2c0e0c[0x0]};if(!_0x1f9f0c){const _0x56632f=_0x2c0e0c[_0x431a60(0xc7)](_0x2ec50f=>_0x2ec50f[_0x431a60(0xcd)]+'\x20('+_0x2ec50f[_0x431a60(0xcf)]+')')[_0x431a60(0xd6)](',\x20');return{'db':null,'error':_0x431a60(0xc5)+_0x56632f};}const _0x2386e2=_0x2c0e0c['map'](_0x14b9d2=>_0x14b9d2[_0x431a60(0xcd)]+'\x20('+_0x14b9d2[_0x431a60(0xcf)]+')')[_0x431a60(0xd6)](',\x20');return{'db':null,'error':'\x22'+_0x1f9f0c+_0x431a60(0xc8)+_0x2386e2+'.\x20Be\x20more\x20specific.'};}export async function getDbName(_0x90634a,_0x4642a3){const _0x5c598f=a298_0x2336,_0x2607cc=await listDatabases(_0x90634a);return _0x2607cc[_0x5c598f(0xdb)](_0x589c38=>_0x589c38[_0x5c598f(0xcf)]===_0x4642a3)?.['dbName'];}
|