@lovrabet/rabetbase-cli 2.5.11-beta.1 → 2.5.11
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 +1 -1
- 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_0x5da3aa=a290_0x3a09;(function(_0x1c631c,_0x35e6ef){const _0x250caf=a290_0x3a09,_0x5ca859=_0x1c631c();while(!![]){try{const _0x4dc93e=parseInt(_0x250caf(0x1c1))/0x1*(-parseInt(_0x250caf(0x1bf))/0x2)+-parseInt(_0x250caf(0x1b9))/0x3*(parseInt(_0x250caf(0x1b8))/0x4)+parseInt(_0x250caf(0x1c3))/0x5*(parseInt(_0x250caf(0x1d2))/0x6)+-parseInt(_0x250caf(0x1ac))/0x7*(parseInt(_0x250caf(0x1cb))/0x8)+-parseInt(_0x250caf(0x1b5))/0x9+-parseInt(_0x250caf(0x1ae))/0xa*(parseInt(_0x250caf(0x1c2))/0xb)+parseInt(_0x250caf(0x1b4))/0xc;if(_0x4dc93e===_0x35e6ef)break;else _0x5ca859['push'](_0x5ca859['shift']());}catch(_0xb6e1ea){_0x5ca859['push'](_0x5ca859['shift']());}}}(a290_0x48dc,0xef2ba));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join,resolve,sep}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=[a290_0x5da3aa(0x1bb),a290_0x5da3aa(0x1c8),'HOOK'];export function normalizeBffType(_0x5649c5){const _0x33bd47=a290_0x5da3aa;if(!_0x5649c5)return undefined;const _0x24fd60=_0x5649c5[_0x33bd47(0x1cf)]()['toUpperCase']();return SUPPORTED_BFF_TYPES[_0x33bd47(0x1ce)](_0x24fd60)?_0x24fd60:undefined;}async function scanJsFilesRecursively(_0xbd0faa,_0x21bfc5){const _0x7b520=a290_0x5da3aa,_0xd6e138=[];try{const _0x2e90bc=await readdir(_0xbd0faa,{'withFileTypes':!![]});for(const _0x1e09de of _0x2e90bc){const _0x509742=join(_0xbd0faa,_0x1e09de[_0x7b520(0x1c4)]);if(_0x1e09de[_0x7b520(0x1a9)]())_0xd6e138[_0x7b520(0x1bc)](...await scanJsFilesRecursively(_0x509742,_0x21bfc5+'/'+_0x1e09de['name']));else _0x1e09de['isFile']()&&_0x1e09de['name'][_0x7b520(0x1aa)](_0x7b520(0x1a7))&&_0xd6e138[_0x7b520(0x1bc)]({'lockKey':_0x21bfc5+'/'+_0x1e09de[_0x7b520(0x1c4)][_0x7b520(0x1c6)](/\.js$/,''),'filePath':_0x509742});}}catch(_0x3308e2){if(_0x3308e2[_0x7b520(0x1c7)]!==_0x7b520(0x1b2))throw _0x3308e2;}return _0xd6e138;}async function scanFlatFunctions(_0x5941a3,_0x53f9a5){const _0x37a3cc=a290_0x5da3aa,_0x2eee12=join(_0x5941a3[_0x37a3cc(0x1b3)],_0x53f9a5),_0x5955f7=await scanJsFilesRecursively(_0x2eee12,_0x53f9a5);return _0x5955f7[_0x37a3cc(0x1cd)](({lockKey:_0x49b019,filePath:_0x220805})=>({'type':_0x53f9a5,'name':_0x49b019[_0x37a3cc(0x1b0)]('/')['at'](-0x1)??'','filePath':_0x220805,'lockKey':_0x49b019}));}async function scanHookFunctions(_0x3b83ae){const _0x7a5ce3=a290_0x5da3aa,_0x2bae0a=join(_0x3b83ae[_0x7a5ce3(0x1b3)],'HOOK'),_0x4293ab=[];try{const _0x20389f=await readdir(_0x2bae0a,{'withFileTypes':!![]});for(const _0xf45c65 of _0x20389f){if(!_0xf45c65[_0x7a5ce3(0x1a9)]())continue;const _0x421922=_0xf45c65[_0x7a5ce3(0x1c4)],_0x15b7d8=join(_0x2bae0a,_0x421922),_0x5598e4=await readdir(_0x15b7d8,{'withFileTypes':!![]});for(const _0x316eda of _0x5598e4){if(!_0x316eda[_0x7a5ce3(0x1a9)]())continue;const _0x3e464c=_0x316eda['name'],_0x258e2f=join(_0x15b7d8,_0x3e464c),_0x1fe230=await readdir(_0x258e2f,{'withFileTypes':!![]});for(const _0x299ed9 of _0x1fe230){if(!_0x299ed9[_0x7a5ce3(0x1a9)]())continue;const _0x53ca7c=_0x299ed9['name'],_0x5bab29=join(_0x258e2f,_0x53ca7c),_0x399bf6=await readdir(_0x5bab29,{'withFileTypes':!![]});for(const _0xa65f05 of _0x399bf6){if(!_0xa65f05[_0x7a5ce3(0x1a4)]()||!_0xa65f05[_0x7a5ce3(0x1c4)][_0x7a5ce3(0x1aa)](_0x7a5ce3(0x1a7)))continue;const _0x7123db=_0xa65f05[_0x7a5ce3(0x1c4)]['replace'](/\.js$/,'');_0x4293ab['push']({'type':_0x7a5ce3(0x1a5),'name':_0x7123db,'filePath':join(_0x5bab29,_0xa65f05['name']),'lockKey':_0x7a5ce3(0x1b6)+_0x421922+'/'+_0x3e464c+'/'+_0x53ca7c+'/'+_0x7123db,'alias':_0x421922,'operationType':_0x3e464c,'functionNode':_0x53ca7c});}}}}}catch(_0x3ff9bf){if(_0x3ff9bf[_0x7a5ce3(0x1c7)]!==_0x7a5ce3(0x1b2))throw _0x3ff9bf;}return _0x4293ab;}export async function scanLocalBffFunctions(_0x564060,_0x244e84){const _0xc6f11a=a290_0x5da3aa;if(_0x244e84==='COMMON'||_0x244e84==='ENDPOINT')return scanFlatFunctions(_0x564060,_0x244e84);if(_0x244e84===_0xc6f11a(0x1a5))return scanHookFunctions(_0x564060);const [_0x146719,_0x4e0a3f,_0x3c6dbe]=await Promise[_0xc6f11a(0x1a6)]([scanFlatFunctions(_0x564060,_0xc6f11a(0x1bb)),scanFlatFunctions(_0x564060,_0xc6f11a(0x1c8)),scanHookFunctions(_0x564060)]);return[..._0x146719,..._0x4e0a3f,..._0x3c6dbe];}function a290_0x3a09(_0x5bac66,_0x1316c6){_0x5bac66=_0x5bac66-0x1a4;const _0x48dc8a=a290_0x48dc();let _0x3a091d=_0x48dc8a[_0x5bac66];return _0x3a091d;}function a290_0x48dc(){const _0x4a8e02=['operationType','datasetCode','2bFSRHU','afterScriptId','779855uzsOoU','294074JthxUs','5046765HPddxn','name','startsWith','replace','code','ENDPOINT','before','functionNode','8sMVbGI','Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20','map','includes','trim','beforeScriptId','get','6eMisss','isFile','HOOK','all','.js','toLowerCase','isDirectory','endsWith','Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20','3365061pPfMyV','scriptType','10Fdjyov','set','split','F_OK','ENOENT','scriptsRootDir','28035264YJvqFD','64575AzflTj','HOOK/','functionName','1071496gbilkk','12MHXUzG','every','COMMON','push'];a290_0x48dc=function(){return _0x4a8e02;};return a290_0x48dc();}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x1ffe92){return SAFE_LOCK_KEY_SEGMENT['test'](_0x1ffe92)&&_0x1ffe92!=='.'&&_0x1ffe92!=='..';}export function resolveLocalFilePathFromLockKey(_0x352b13,_0x10bf2f){const _0x505845=a290_0x5da3aa,_0x1b1e79=_0x10bf2f['split']('/');if(!_0x1b1e79['every'](isSafeLockKeySegment))throw new Error(_0x505845(0x1ab)+_0x10bf2f);const _0x39a388=resolve(join(_0x352b13['scriptsRootDir'],..._0x1b1e79)+_0x505845(0x1a7)),_0x152869=resolve(_0x352b13['scriptsRootDir']);if(_0x39a388!==_0x152869&&!_0x39a388[_0x505845(0x1c5)](_0x152869+sep))throw new Error(_0x505845(0x1cc)+_0x39a388);return _0x39a388;}export function createHookLocationMap(_0x2f97ae){const _0x2e1bd8=a290_0x5da3aa,_0x41e826=new Map();for(const _0x52e3ed of _0x2f97ae){_0x52e3ed[_0x2e1bd8(0x1d0)]&&_0x41e826[_0x2e1bd8(0x1af)](_0x52e3ed[_0x2e1bd8(0x1d0)],{'datasetCode':_0x52e3ed[_0x2e1bd8(0x1be)],'operationType':snakeToCamel(_0x52e3ed[_0x2e1bd8(0x1bd)]),'functionNode':_0x2e1bd8(0x1c9)}),_0x52e3ed[_0x2e1bd8(0x1c0)]&&_0x41e826[_0x2e1bd8(0x1af)](_0x52e3ed[_0x2e1bd8(0x1c0)],{'datasetCode':_0x52e3ed[_0x2e1bd8(0x1be)],'operationType':snakeToCamel(_0x52e3ed[_0x2e1bd8(0x1bd)]),'functionNode':'after'});}return _0x41e826;}export function resolveRemoteScriptTarget(_0x33bdc5,_0x2cdab6,_0x27e768,_0x2d9f3d,_0x3b6311){const _0x2ad3a1=a290_0x5da3aa,_0x594d82=normalizeBffType(_0x2cdab6[_0x2ad3a1(0x1ad)]);if(!_0x594d82||!_0x2cdab6[_0x2ad3a1(0x1b7)])return null;if(_0x594d82===_0x2ad3a1(0x1a5)){const _0x2eae1b=_0x2cdab6['id']?_0x27e768[_0x2ad3a1(0x1d1)](_0x2cdab6['id']):undefined,_0x2695c9=findHookLocationByRemoteId(_0x2d9f3d,_0x2cdab6['id']),_0x4158cc=_0x2eae1b?{..._0x2695c9?.['datasetCode']===_0x2eae1b[_0x2ad3a1(0x1be)]?_0x2695c9:{},..._0x2eae1b}:_0x2695c9;if(!_0x4158cc)return null;const _0x4f263d=_0x3b6311['get'](_0x4158cc[_0x2ad3a1(0x1be)][_0x2ad3a1(0x1a8)]()),_0x4590b3=_0x4f263d??_0x4158cc[_0x2ad3a1(0x1be)],_0x4b05c7={..._0x4158cc,'alias':_0x4f263d},_0xbb6e7f=_0x2ad3a1(0x1b6)+_0x4590b3+'/'+_0x4b05c7[_0x2ad3a1(0x1bd)]+'/'+_0x4b05c7[_0x2ad3a1(0x1ca)]+'/'+_0x2cdab6[_0x2ad3a1(0x1b7)];if(!_0xbb6e7f[_0x2ad3a1(0x1b0)]('/')[_0x2ad3a1(0x1ba)](isSafeLockKeySegment))return null;return{'lockKey':_0xbb6e7f,'filePath':resolveLocalFilePathFromLockKey(_0x33bdc5,_0xbb6e7f),'type':'HOOK','hookLocation':_0x4b05c7};}const _0x2ea97a=_0x594d82+'/'+_0x2cdab6[_0x2ad3a1(0x1b7)];if(!_0x2ea97a[_0x2ad3a1(0x1b0)]('/')[_0x2ad3a1(0x1ba)](isSafeLockKeySegment))return null;return{'lockKey':_0x2ea97a,'filePath':resolveLocalFilePathFromLockKey(_0x33bdc5,_0x2ea97a),'type':_0x594d82};}export async function ensureParentDirectory(_0x7ad119){await mkdir(dirname(_0x7ad119),{'recursive':!![]});}export async function fileExists(_0x1d977e){const _0x1a5553=a290_0x5da3aa;try{return await access(_0x1d977e,constants[_0x1a5553(0x1b1)]),!![];}catch{return![];}}export async function directoryExists(_0x553702){try{const _0x901bcb=await stat(_0x553702);return _0x901bcb['isDirectory']();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a291_0x2b82(){const _0x2ead4b=['188403oNRSaK','2640XMzSfc','8095IqAzGK','hex','2683LIBZta','3330ecJGnZ','update','15432lryXwF','utf8','2424850kLsfaB','24OnntjL','36252JACcla','70ojnCxk','5427653TgAODl','md5','2979xNjcfo','digest'];a291_0x2b82=function(){return _0x2ead4b;};return a291_0x2b82();}(function(_0x382b12,_0x4944bc){const _0x49d955=a291_0x3d1e,_0x427ef6=_0x382b12();while(!![]){try{const _0xd13e5b=parseInt(_0x49d955(0x105))/0x1*(parseInt(_0x49d955(0xfc))/0x2)+-parseInt(_0x49d955(0x101))/0x3*(-parseInt(_0x49d955(0x10b))/0x4)+-parseInt(_0x49d955(0x103))/0x5*(-parseInt(_0x49d955(0x106))/0x6)+parseInt(_0x49d955(0xfd))/0x7+-parseInt(_0x49d955(0x108))/0x8*(parseInt(_0x49d955(0xff))/0x9)+-parseInt(_0x49d955(0x10a))/0xa+-parseInt(_0x49d955(0x102))/0xb*(parseInt(_0x49d955(0x10c))/0xc);if(_0xd13e5b===_0x4944bc)break;else _0x427ef6['push'](_0x427ef6['shift']());}catch(_0x5ef43a){_0x427ef6['push'](_0x427ef6['shift']());}}}(a291_0x2b82,0x837f3));import{readFile}from'node:fs/promises';import a291_0x44bb45 from'node:crypto';export function computeContentHash(_0x968daa){const _0x2aaf5b=a291_0x3d1e;return a291_0x44bb45['createHash'](_0x2aaf5b(0xfe))[_0x2aaf5b(0x107)](_0x968daa)[_0x2aaf5b(0x100)](_0x2aaf5b(0x104));}function a291_0x3d1e(_0x477ac0,_0xdb7b4a){_0x477ac0=_0x477ac0-0xfc;const _0x2b8234=a291_0x2b82();let _0x3d1edb=_0x2b8234[_0x477ac0];return _0x3d1edb;}export async function computeFileHash(_0x8273dc){const _0x40fdaa=a291_0x3d1e,_0x4a9718=await readFile(_0x8273dc,_0x40fdaa(0x109));return computeContentHash(_0x4a9718);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x202d10,_0x3741e7){const _0x2b0d6d=a292_0x25fd,_0x38d18b=_0x202d10();while(!![]){try{const _0x5bbb50=-parseInt(_0x2b0d6d(0xb4))/0x1*(-parseInt(_0x2b0d6d(0xb8))/0x2)+parseInt(_0x2b0d6d(0xaf))/0x3*(-parseInt(_0x2b0d6d(0xbd))/0x4)+-parseInt(_0x2b0d6d(0xd8))/0x5+parseInt(_0x2b0d6d(0xc4))/0x6*(parseInt(_0x2b0d6d(0xd6))/0x7)+-parseInt(_0x2b0d6d(0xc5))/0x8+parseInt(_0x2b0d6d(0xcb))/0x9+-parseInt(_0x2b0d6d(0xc1))/0xa*(-parseInt(_0x2b0d6d(0xb7))/0xb);if(_0x5bbb50===_0x3741e7)break;else _0x38d18b['push'](_0x38d18b['shift']());}catch(_0x2b843d){_0x38d18b['push'](_0x38d18b['shift']());}}}(a292_0x4b2c,0xb1633));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x8e4e31){const _0xf7636a=a292_0x25fd,_0x4d1934=[];for(const [_0xf3f833,_0x4398ee]of Object['entries'](_0x8e4e31[_0xf7636a(0xc0)])){const [_0x231334,_0x513fa2]=_0xf3f833[_0xf7636a(0xad)]('/');if(_0x231334!==_0xf7636a(0xa7)||!_0x513fa2||!_0x4398ee[_0xf7636a(0xc7)])continue;_0x4d1934[_0xf7636a(0xb3)]({'alias':_0x513fa2,'datasetCode':_0x4398ee[_0xf7636a(0xc7)]});}return _0x4d1934;}export function uniqueTrackedHookDirectoryByDataset(_0x4ffea9){const _0x49ae64=a292_0x25fd,_0x2ca2b2=new Map();for(const _0x2c378d of trackedHookDirectoryMappings(_0x4ffea9)){const _0xe1538d=directoryIdentity(_0x2c378d['datasetCode']),_0x4e79cf=_0x2ca2b2[_0x49ae64(0xc6)](_0xe1538d)??new Map();_0x4e79cf[_0x49ae64(0xd4)](directoryIdentity(_0x2c378d['alias']),_0x2c378d[_0x49ae64(0xb0)]),_0x2ca2b2[_0x49ae64(0xd4)](_0xe1538d,_0x4e79cf);}const _0xb55fc=new Map();for(const [_0x5e328e,_0x422440]of _0x2ca2b2){if(_0x422440['size']>0x1)throw hookDirectoryError(_0x49ae64(0xca),_0x49ae64(0xcf)+_0x5e328e+_0x49ae64(0xd0)+[..._0x422440[_0x49ae64(0xb2)]()][_0x49ae64(0xb6)](',\x20')+'.',{'datasetCode':_0x5e328e,'directories':[..._0x422440[_0x49ae64(0xb2)]()]});_0xb55fc[_0x49ae64(0xd4)](_0x5e328e,[..._0x422440[_0x49ae64(0xb2)]()][0x0]);}return _0xb55fc;}export function assertUnambiguousHookDirectoryMappings(_0x4847b2){const _0xab242c=a292_0x25fd,_0x300779=new Map();for(const {alias:_0x4e0be3,datasetCode:_0x530eb9}of _0x4847b2){const _0x55dc3a=directoryIdentity(_0x4e0be3),_0x3ab366=_0x300779[_0xab242c(0xc6)](_0x55dc3a)??new Set();_0x3ab366['add'](_0x530eb9),_0x300779['set'](_0x55dc3a,_0x3ab366);}for(const [_0x87e8d4,_0x31e7e3]of _0x300779){if(_0x31e7e3['size']>0x1)throw hookDirectoryError(_0xab242c(0xb9),_0xab242c(0xbb)+_0x87e8d4+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'directoryName':_0x87e8d4,'datasetCodes':[..._0x31e7e3]});}}export function assertUnambiguousHookAliases(_0xb98853){const _0x3c6787=a292_0x25fd,_0x532368=[..._0xb98853],_0x49cbfe=new Map(),_0x1dab40=new Map();for(const {alias:_0x2c56be,datasetCode:_0x408fbe}of _0x532368){const _0x11ef41=directoryIdentity(_0x2c56be),_0x5e4c27=directoryIdentity(_0x408fbe),_0x2bee38=_0x49cbfe[_0x3c6787(0xc6)](_0x11ef41)??new Set();_0x2bee38[_0x3c6787(0xd3)](_0x408fbe),_0x49cbfe[_0x3c6787(0xd4)](_0x11ef41,_0x2bee38);const _0x25da01=_0x1dab40[_0x3c6787(0xc6)](_0x5e4c27)??new Set();_0x25da01[_0x3c6787(0xd3)](_0x2c56be),_0x1dab40[_0x3c6787(0xd4)](_0x5e4c27,_0x25da01);}for(const [_0x1228b4,_0x358452]of _0x49cbfe){if(_0x358452[_0x3c6787(0xc8)]>0x1)throw hookDirectoryError(_0x3c6787(0xba),_0x3c6787(0xae)+_0x1228b4+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'alias':_0x1228b4,'datasetCodes':[..._0x358452]});}for(const [_0xb956d3,_0x2fac16]of _0x1dab40){if(_0x2fac16[_0x3c6787(0xc8)]>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS',_0x3c6787(0xcf)+_0xb956d3+_0x3c6787(0xc2),{'datasetCode':_0xb956d3,'aliases':[..._0x2fac16]});}}function a292_0x25fd(_0x1a3fa3,_0x4726d4){_0x1a3fa3=_0x1a3fa3-0xa5;const _0x4b2c1b=a292_0x4b2c();let _0x25fde0=_0x4b2c1b[_0x1a3fa3];return _0x25fde0;}export function buildHookDirectoryIndexes(_0xc4a6b,_0x1ee376=[]){const _0x15ca69=a292_0x25fd,_0x3d6dad=[..._0x1ee376];assertUnambiguousHookDirectoryMappings(_0x3d6dad[_0x15ca69(0xa9)](([_0x5b0998,_0x540325])=>({'alias':_0x5b0998,'datasetCode':_0x540325})));const _0x321676=new Map(),_0x1cefb8=new Map();for(const _0x4dcec2 of _0xc4a6b){appendUnique(_0x321676,directoryIdentity(_0x4dcec2[_0x15ca69(0xb1)]),_0x4dcec2,_0x4033da=>_0x4033da['code']);}for(const [_0x2feadf,_0x579c65]of _0x3d6dad){appendUnique(_0x1cefb8,directoryIdentity(_0x2feadf),_0x579c65,_0x5c840b=>_0x5c840b);}return{'datasetCodeToDatasets':_0x321676,'aliasToDatasetCodes':_0x1cefb8};}export function resolvePushHookDirectory(_0x3b7083,_0x1d6482,_0x4cc217){const _0x2ff722=a292_0x25fd,_0x328355=directoryIdentity(_0x3b7083),_0xa859dc=_0x4cc217['datasetCodeToDatasets'][_0x2ff722(0xc6)](_0x328355)??[],_0x1fedcc=_0x4cc217[_0x2ff722(0xa5)][_0x2ff722(0xc6)](_0x328355)??[],_0x37dc78=new Set([..._0xa859dc['map'](_0x589bfc=>_0x589bfc[_0x2ff722(0xb1)]),..._0x1fedcc]);if(_0x37dc78['size']>0x1)throw hookDirectoryError(_0x2ff722(0xb9),_0x2ff722(0xbb)+_0x3b7083+_0x2ff722(0xd9),{'directoryName':_0x3b7083,'datasetCodes':[..._0x37dc78]});const _0x43f60c=[..._0x37dc78][0x0];if(_0x43f60c&&_0x1d6482?.[_0x2ff722(0xc7)]&&_0x43f60c!==_0x1d6482[_0x2ff722(0xc7)])throw hookDirectoryError('HOOK_MAPPING_DRIFT','HOOK\x20directory\x20\x22'+_0x3b7083+_0x2ff722(0xab)+_0x1d6482[_0x2ff722(0xc7)]+_0x2ff722(0xbe)+_0x43f60c+'\x22.',{'directoryName':_0x3b7083,'datasetCode':_0x43f60c,'lockedDatasetCode':_0x1d6482[_0x2ff722(0xc7)]});const _0x2d2ccd=_0x43f60c?findDatasetByCode(_0x4cc217,_0x43f60c):undefined,_0x101eea=!!_0x43f60c&&_0x1fedcc[_0x2ff722(0xc3)](_0x43f60c);if(_0x2d2ccd)return{'dataset':_0x2d2ccd,'datasetCode':_0x2d2ccd['code'],..._0x101eea?{'alias':_0x3b7083}:{},'directoryProtocol':_0x101eea?_0x2ff722(0xb0):_0x2ff722(0xc7),'warnings':[]};const _0x8f158a=_0x1d6482?.[_0x2ff722(0xc7)];if(_0x8f158a){const _0x1f6fb5=findDatasetByCode(_0x4cc217,_0x8f158a);if(_0x1f6fb5)return{'dataset':_0x1f6fb5,'datasetCode':_0x1f6fb5[_0x2ff722(0xb1)],..._0x1d6482['alias']?{'alias':_0x1d6482['alias']}:{},'directoryProtocol':_0x1d6482['alias']?_0x2ff722(0xb0):'datasetCode','warnings':[]};}if(_0x43f60c||_0x8f158a){const _0x1fed37=_0x43f60c??_0x8f158a;throw hookDirectoryError(_0x2ff722(0xda),_0x2ff722(0xbb)+_0x3b7083+_0x2ff722(0xac),{'directoryName':_0x3b7083,'datasetCode':_0x1fed37});}throw hookDirectoryError(_0x2ff722(0xbc),_0x2ff722(0xcd)+_0x3b7083+_0x2ff722(0xbf),{'directoryName':_0x3b7083});}export function preflightPushHookDirectories(_0x5e19d0,_0xac8658,_0x12fb06,_0x367d0c){const _0x2fc5a8=a292_0x25fd,_0x36d11d=new Map(),_0x2c54f3=new Map();for(const _0x23afc9 of _0x5e19d0){if(_0x23afc9[_0x2fc5a8(0xdb)]!==_0x2fc5a8(0xa7))continue;const _0x2407a5=_0x23afc9[_0x2fc5a8(0xb0)];if(!_0x2407a5)throw hookDirectoryError(_0x2fc5a8(0xbc),_0x2fc5a8(0xc9)+_0x23afc9[_0x2fc5a8(0xd7)],{'lockKey':_0x23afc9['lockKey']});let _0x491e05;try{_0x491e05=resolvePushHookDirectory(_0x2407a5,_0xac8658[_0x2fc5a8(0xc0)][_0x23afc9['lockKey']],_0x12fb06);}catch(_0x3e7f00){if(_0x367d0c&&_0x3e7f00 instanceof CliError&&[_0x2fc5a8(0xda),_0x2fc5a8(0xbc)][_0x2fc5a8(0xc3)](_0x3e7f00[_0x2fc5a8(0xb1)])){_0x367d0c[_0x2fc5a8(0xd4)](_0x23afc9[_0x2fc5a8(0xd7)],_0x3e7f00[_0x2fc5a8(0xd5)]);continue;}throw _0x3e7f00;}_0x36d11d[_0x2fc5a8(0xd4)](_0x23afc9[_0x2fc5a8(0xd7)],_0x491e05);const _0x1d276b=_0x2c54f3[_0x2fc5a8(0xc6)](_0x491e05[_0x2fc5a8(0xc7)])??new Set();_0x1d276b['add'](_0x2407a5),_0x2c54f3['set'](_0x491e05[_0x2fc5a8(0xc7)],_0x1d276b);}for(const [_0x54ac15,_0x404a8f]of _0x2c54f3){if(_0x404a8f[_0x2fc5a8(0xc8)]>0x1)throw hookDirectoryError(_0x2fc5a8(0xca),'Dataset\x20\x22'+_0x54ac15+_0x2fc5a8(0xb5)+[..._0x404a8f][_0x2fc5a8(0xb6)](',\x20')+'.',{'datasetCode':_0x54ac15,'directories':[..._0x404a8f]});}return _0x36d11d;}export function hookDirectoryError(_0x562029,_0x5ddb96,_0x27fef5){const _0x4e6883=a292_0x25fd,_0x26de23=new CliError(_0x562029,0x2,_0x562029+':\x20'+_0x5ddb96);return _0x26de23[_0x4e6883(0xd1)]=_0x27fef5,_0x26de23;}function a292_0x4b2c(){const _0x544020=['split','SDK\x20alias\x20\x22','2903703SYVADZ','alias','code','values','push','128982QwpXPz','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','join','77ATZmtC','4TijpGy','HOOK_DIRECTORY_AMBIGUOUS','HOOK_ALIAS_AMBIGUOUS','HOOK\x20directory\x20\x22','HOOK_DIRECTORY_UNRESOLVED','4HKkgWZ','\x22\x20to\x20\x22','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','functions','2014810wqWqdA','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','includes','50628FMIFnP','8524432zEoNBJ','get','datasetCode','size','Incomplete\x20HOOK\x20path:\x20','HOOK_DUPLICATE_DIRECTORIES','6414507mTNuTN','toLowerCase','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','Dataset\x20code\x20\x22','Dataset\x20\x22','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','details','datasetCodeToDatasets','add','set','message','413ZCePjD','lockKey','594310kSMhva','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','HOOK_DATASET_NOT_FOUND','type','some','aliasToDatasetCodes','HOOK_DATASET_CODE_AMBIGUOUS','HOOK','name','map','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.'];a292_0x4b2c=function(){return _0x544020;};return a292_0x4b2c();}function findDatasetByCode(_0x6bcaba,_0x23fe06){const _0x12c0e3=a292_0x25fd,_0x534a3c=_0x6bcaba[_0x12c0e3(0xd2)]['get'](directoryIdentity(_0x23fe06))??[];if(_0x534a3c['length']>0x1)throw hookDirectoryError(_0x12c0e3(0xa6),_0x12c0e3(0xce)+_0x23fe06+_0x12c0e3(0xaa),{'datasetCode':_0x23fe06,'candidates':_0x534a3c[_0x12c0e3(0xa9)](datasetFact)});return _0x534a3c[0x0];}function directoryIdentity(_0x571183){const _0x142134=a292_0x25fd;return _0x571183['normalize']('NFC')[_0x142134(0xcc)]();}function appendUnique(_0x4d1c04,_0x2f7233,_0x1bf53e,_0x2a37e3){const _0x23d162=a292_0x25fd,_0x47622a=_0x4d1c04[_0x23d162(0xc6)](_0x2f7233)??[];!_0x47622a[_0x23d162(0xdc)](_0x3bbb84=>_0x2a37e3(_0x3bbb84)===_0x2a37e3(_0x1bf53e))&&_0x47622a['push'](_0x1bf53e),_0x4d1c04['set'](_0x2f7233,_0x47622a);}function datasetFact(_0x4c4ae7){const _0x40819f=a292_0x25fd;return{'id':_0x4c4ae7['id'],'name':_0x4c4ae7[_0x40819f(0xa8)],'datasetCode':_0x4c4ae7['code']};}
|
|
1
|
+
(function(_0x16035a,_0x42a247){const _0x35f149=a292_0xff3d,_0x21f575=_0x16035a();while(!![]){try{const _0x1a987f=parseInt(_0x35f149(0xc4))/0x1+-parseInt(_0x35f149(0xc2))/0x2*(-parseInt(_0x35f149(0x9a))/0x3)+parseInt(_0x35f149(0xb9))/0x4*(-parseInt(_0x35f149(0xb6))/0x5)+parseInt(_0x35f149(0xa6))/0x6+-parseInt(_0x35f149(0xa2))/0x7+-parseInt(_0x35f149(0x9b))/0x8+-parseInt(_0x35f149(0xc1))/0x9*(-parseInt(_0x35f149(0xb1))/0xa);if(_0x1a987f===_0x42a247)break;else _0x21f575['push'](_0x21f575['shift']());}catch(_0x4bfb58){_0x21f575['push'](_0x21f575['shift']());}}}(a292_0x42c6,0x607fb));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x245bd2){const _0x32e80e=a292_0xff3d,_0x1d9b24=[];for(const [_0x414c50,_0x3267df]of Object[_0x32e80e(0xc8)](_0x245bd2['functions'])){const [_0x31686a,_0x187911]=_0x414c50['split']('/');if(_0x31686a!==_0x32e80e(0xb5)||!_0x187911||!_0x3267df[_0x32e80e(0x94)])continue;_0x1d9b24[_0x32e80e(0xa3)]({'alias':_0x187911,'datasetCode':_0x3267df[_0x32e80e(0x94)]});}return _0x1d9b24;}export function uniqueTrackedHookDirectoryByDataset(_0x4a4e6c){const _0x2f31c0=a292_0xff3d,_0x69067f=new Map();for(const _0x25e405 of trackedHookDirectoryMappings(_0x4a4e6c)){const _0x330a7a=directoryIdentity(_0x25e405['datasetCode']),_0x16473f=_0x69067f[_0x2f31c0(0xaa)](_0x330a7a)??new Map();_0x16473f[_0x2f31c0(0xad)](directoryIdentity(_0x25e405[_0x2f31c0(0x9e)]),_0x25e405[_0x2f31c0(0x9e)]),_0x69067f['set'](_0x330a7a,_0x16473f);}const _0x1d6ddf=new Map();for(const [_0x2f3e2e,_0x752b1f]of _0x69067f){if(_0x752b1f[_0x2f31c0(0xbe)]>0x1)throw hookDirectoryError('HOOK_DUPLICATE_DIRECTORIES',_0x2f31c0(0x97)+_0x2f3e2e+_0x2f31c0(0xc3)+[..._0x752b1f['values']()][_0x2f31c0(0xc7)](',\x20')+'.',{'datasetCode':_0x2f3e2e,'directories':[..._0x752b1f[_0x2f31c0(0xb7)]()]});_0x1d6ddf['set'](_0x2f3e2e,[..._0x752b1f[_0x2f31c0(0xb7)]()][0x0]);}return _0x1d6ddf;}export function assertUnambiguousHookDirectoryMappings(_0x12277b){const _0x22de3c=a292_0xff3d,_0xc68c0f=new Map();for(const {alias:_0xfa91c1,datasetCode:_0x5a6a3c}of _0x12277b){const _0x1a1e9b=directoryIdentity(_0xfa91c1),_0x37ab38=_0xc68c0f[_0x22de3c(0xaa)](_0x1a1e9b)??new Set();_0x37ab38[_0x22de3c(0xb3)](_0x5a6a3c),_0xc68c0f[_0x22de3c(0xad)](_0x1a1e9b,_0x37ab38);}for(const [_0x187abd,_0x3ecb30]of _0xc68c0f){if(_0x3ecb30['size']>0x1)throw hookDirectoryError(_0x22de3c(0xb0),_0x22de3c(0x93)+_0x187abd+_0x22de3c(0xa5),{'directoryName':_0x187abd,'datasetCodes':[..._0x3ecb30]});}}function a292_0x42c6(){const _0x524d85=['functions','get','NFC','message','set','toLowerCase','Incomplete\x20HOOK\x20path:\x20','HOOK_DIRECTORY_AMBIGUOUS','10zqNecM','normalize','add','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','HOOK','3539275glSwoy','values','lockKey','4nUsJzS','includes','length','name','HOOK_DATASET_NOT_FOUND','size','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','HOOK_ALIAS_AMBIGUOUS','8476173zeXmYN','144230gWSwJY','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','125274XneTEv','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','code','join','entries','HOOK\x20directory\x20\x22','datasetCode','details','Dataset\x20code\x20\x22','Dataset\x20\x22','HOOK_DUPLICATE_DIRECTORIES','map','21cFNaUB','698760MWeBqa','HOOK_DATASET_CODE_AMBIGUOUS','some','alias','aliasToDatasetCodes','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','SDK\x20alias\x20\x22','3798851IbwKKi','push','HOOK_DIRECTORY_UNRESOLVED','\x22\x20resolves\x20to\x20multiple\x20Datasets.','967656SpTCgw','type','HOOK_MAPPING_DRIFT'];a292_0x42c6=function(){return _0x524d85;};return a292_0x42c6();}export function assertUnambiguousHookAliases(_0x32c42b){const _0x238976=a292_0xff3d,_0x1880b5=[..._0x32c42b],_0x208729=new Map(),_0x48088e=new Map();for(const {alias:_0x365fa6,datasetCode:_0x47c6bc}of _0x1880b5){const _0x5b57d1=directoryIdentity(_0x365fa6),_0x2c9e06=directoryIdentity(_0x47c6bc),_0x869631=_0x208729[_0x238976(0xaa)](_0x5b57d1)??new Set();_0x869631[_0x238976(0xb3)](_0x47c6bc),_0x208729[_0x238976(0xad)](_0x5b57d1,_0x869631);const _0x1c095a=_0x48088e[_0x238976(0xaa)](_0x2c9e06)??new Set();_0x1c095a['add'](_0x365fa6),_0x48088e['set'](_0x2c9e06,_0x1c095a);}for(const [_0x1e91d5,_0x5c04b2]of _0x208729){if(_0x5c04b2['size']>0x1)throw hookDirectoryError(_0x238976(0xc0),_0x238976(0xa1)+_0x1e91d5+_0x238976(0xa5),{'alias':_0x1e91d5,'datasetCodes':[..._0x5c04b2]});}for(const [_0xb197c4,_0x3ef968]of _0x48088e){if(_0x3ef968['size']>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS',_0x238976(0x97)+_0xb197c4+'\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.',{'datasetCode':_0xb197c4,'aliases':[..._0x3ef968]});}}export function buildHookDirectoryIndexes(_0x2453c6,_0x539402=[]){const _0x2ee5b6=a292_0xff3d,_0xa4cb4f=[..._0x539402];assertUnambiguousHookDirectoryMappings(_0xa4cb4f[_0x2ee5b6(0x99)](([_0x2881a2,_0x1316c5])=>({'alias':_0x2881a2,'datasetCode':_0x1316c5})));const _0x324545=new Map(),_0x15cc50=new Map();for(const _0x10a0ac of _0x2453c6){appendUnique(_0x324545,directoryIdentity(_0x10a0ac['code']),_0x10a0ac,_0x35d3a0=>_0x35d3a0[_0x2ee5b6(0xc6)]);}for(const [_0x3b497c,_0x3a0e25]of _0xa4cb4f){appendUnique(_0x15cc50,directoryIdentity(_0x3b497c),_0x3a0e25,_0x3686e2=>_0x3686e2);}return{'datasetCodeToDatasets':_0x324545,'aliasToDatasetCodes':_0x15cc50};}function a292_0xff3d(_0xc263d8,_0x208c8a){_0xc263d8=_0xc263d8-0x93;const _0x42c6ac=a292_0x42c6();let _0xff3d27=_0x42c6ac[_0xc263d8];return _0xff3d27;}export function resolvePushHookDirectory(_0x24a4bd,_0x6a21fa,_0x368688){const _0x575642=a292_0xff3d,_0x4a4e70=directoryIdentity(_0x24a4bd),_0x4e6eed=_0x368688['datasetCodeToDatasets'][_0x575642(0xaa)](_0x4a4e70)??[],_0x5bdfb3=_0x368688[_0x575642(0x9f)][_0x575642(0xaa)](_0x4a4e70)??[],_0x39e041=new Set([..._0x4e6eed['map'](_0x585b65=>_0x585b65[_0x575642(0xc6)]),..._0x5bdfb3]);if(_0x39e041[_0x575642(0xbe)]>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS','HOOK\x20directory\x20\x22'+_0x24a4bd+'\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.',{'directoryName':_0x24a4bd,'datasetCodes':[..._0x39e041]});const _0x4e6fd1=[..._0x39e041][0x0];if(_0x4e6fd1&&_0x6a21fa?.[_0x575642(0x94)]&&_0x4e6fd1!==_0x6a21fa['datasetCode'])throw hookDirectoryError(_0x575642(0xa8),_0x575642(0x93)+_0x24a4bd+'\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22'+_0x6a21fa[_0x575642(0x94)]+'\x22\x20to\x20\x22'+_0x4e6fd1+'\x22.',{'directoryName':_0x24a4bd,'datasetCode':_0x4e6fd1,'lockedDatasetCode':_0x6a21fa[_0x575642(0x94)]});const _0x203d86=_0x4e6fd1?findDatasetByCode(_0x368688,_0x4e6fd1):undefined,_0x31731b=!!_0x4e6fd1&&_0x5bdfb3[_0x575642(0xba)](_0x4e6fd1);if(_0x203d86)return{'dataset':_0x203d86,'datasetCode':_0x203d86[_0x575642(0xc6)],..._0x31731b?{'alias':_0x24a4bd}:{},'directoryProtocol':_0x31731b?_0x575642(0x9e):'datasetCode','warnings':[]};const _0x38ccf3=_0x6a21fa?.['datasetCode'];if(_0x38ccf3){const _0x21d150=findDatasetByCode(_0x368688,_0x38ccf3);if(_0x21d150)return{'dataset':_0x21d150,'datasetCode':_0x21d150[_0x575642(0xc6)],..._0x6a21fa['alias']?{'alias':_0x6a21fa[_0x575642(0x9e)]}:{},'directoryProtocol':_0x6a21fa['alias']?'alias':_0x575642(0x94),'warnings':[]};}if(_0x4e6fd1||_0x38ccf3){const _0xc92f88=_0x4e6fd1??_0x38ccf3;throw hookDirectoryError('HOOK_DATASET_NOT_FOUND',_0x575642(0x93)+_0x24a4bd+'\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.',{'directoryName':_0x24a4bd,'datasetCode':_0xc92f88});}throw hookDirectoryError(_0x575642(0xa4),_0x575642(0xb4)+_0x24a4bd+_0x575642(0xa0),{'directoryName':_0x24a4bd});}export function preflightPushHookDirectories(_0x1e78d4,_0x1546f2,_0x1f5ae5,_0x5e269d){const _0x50ab9e=a292_0xff3d,_0x3ea228=new Map(),_0x5368b5=new Map();for(const _0x42ba2e of _0x1e78d4){if(_0x42ba2e[_0x50ab9e(0xa7)]!==_0x50ab9e(0xb5))continue;const _0x51d042=_0x42ba2e[_0x50ab9e(0x9e)];if(!_0x51d042)throw hookDirectoryError(_0x50ab9e(0xa4),_0x50ab9e(0xaf)+_0x42ba2e['lockKey'],{'lockKey':_0x42ba2e[_0x50ab9e(0xb8)]});let _0x4b78ca;try{_0x4b78ca=resolvePushHookDirectory(_0x51d042,_0x1546f2[_0x50ab9e(0xa9)][_0x42ba2e[_0x50ab9e(0xb8)]],_0x1f5ae5);}catch(_0x40f6df){if(_0x5e269d&&_0x40f6df instanceof CliError&&[_0x50ab9e(0xbd),'HOOK_DIRECTORY_UNRESOLVED']['includes'](_0x40f6df[_0x50ab9e(0xc6)])){_0x5e269d[_0x50ab9e(0xad)](_0x42ba2e['lockKey'],_0x40f6df[_0x50ab9e(0xac)]);continue;}throw _0x40f6df;}_0x3ea228['set'](_0x42ba2e[_0x50ab9e(0xb8)],_0x4b78ca);const _0x7bf3a9=_0x5368b5['get'](_0x4b78ca[_0x50ab9e(0x94)])??new Set();_0x7bf3a9[_0x50ab9e(0xb3)](_0x51d042),_0x5368b5[_0x50ab9e(0xad)](_0x4b78ca[_0x50ab9e(0x94)],_0x7bf3a9);}for(const [_0x39d13c,_0x19ef3a]of _0x5368b5){if(_0x19ef3a['size']>0x1)throw hookDirectoryError(_0x50ab9e(0x98),_0x50ab9e(0x97)+_0x39d13c+_0x50ab9e(0xc5)+[..._0x19ef3a]['join'](',\x20')+'.',{'datasetCode':_0x39d13c,'directories':[..._0x19ef3a]});}return _0x3ea228;}export function hookDirectoryError(_0x327829,_0x649ec3,_0x41426d){const _0x17f2ea=a292_0xff3d,_0xd639e3=new CliError(_0x327829,0x2,_0x327829+':\x20'+_0x649ec3);return _0xd639e3[_0x17f2ea(0x95)]=_0x41426d,_0xd639e3;}function findDatasetByCode(_0x211704,_0x503b55){const _0x5899cb=a292_0xff3d,_0x2debef=_0x211704['datasetCodeToDatasets'][_0x5899cb(0xaa)](directoryIdentity(_0x503b55))??[];if(_0x2debef[_0x5899cb(0xbb)]>0x1)throw hookDirectoryError(_0x5899cb(0x9c),_0x5899cb(0x96)+_0x503b55+_0x5899cb(0xbf),{'datasetCode':_0x503b55,'candidates':_0x2debef[_0x5899cb(0x99)](datasetFact)});return _0x2debef[0x0];}function directoryIdentity(_0x3438cf){const _0x1f031e=a292_0xff3d;return _0x3438cf[_0x1f031e(0xb2)](_0x1f031e(0xab))[_0x1f031e(0xae)]();}function appendUnique(_0xcfdcd3,_0x35f7c2,_0x43678e,_0x26173d){const _0x2405cc=a292_0xff3d,_0x221767=_0xcfdcd3[_0x2405cc(0xaa)](_0x35f7c2)??[];!_0x221767[_0x2405cc(0x9d)](_0x3acdeb=>_0x26173d(_0x3acdeb)===_0x26173d(_0x43678e))&&_0x221767[_0x2405cc(0xa3)](_0x43678e),_0xcfdcd3[_0x2405cc(0xad)](_0x35f7c2,_0x221767);}function datasetFact(_0x481f1e){const _0x988591=a292_0xff3d;return{'id':_0x481f1e['id'],'name':_0x481f1e[_0x988591(0xbc)],'datasetCode':_0x481f1e[_0x988591(0xc6)]};}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2a47ca,_0x212fa3){const _0x446ff8=a293_0x2aa3,_0x422eb5=_0x2a47ca();while(!![]){try{const _0x3594f6=-parseInt(_0x446ff8(0x1ca))/0x1*(parseInt(_0x446ff8(0x1d6))/0x2)+-parseInt(_0x446ff8(0x1d2))/0x3+parseInt(_0x446ff8(0x1d0))/0x4*(-parseInt(_0x446ff8(0x1bf))/0x5)+parseInt(_0x446ff8(0x1cc))/0x6*(-parseInt(_0x446ff8(0x1ce))/0x7)+-parseInt(_0x446ff8(0x1be))/0x8*(-parseInt(_0x446ff8(0x1c2))/0x9)+parseInt(_0x446ff8(0x1bd))/0xa*(parseInt(_0x446ff8(0x1c3))/0xb)+parseInt(_0x446ff8(0x1c4))/0xc;if(_0x3594f6===_0x212fa3)break;else _0x422eb5['push'](_0x422eb5['shift']());}catch(_0x56e817){_0x422eb5['push'](_0x422eb5['shift']());}}}(a293_0x2e42,0x5fd3e));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a293_0x2e42(){const _0x52168f=['parse','225954BtvQCh','33vPZibM','15458796TIzehq','utf8','apps','Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20','\x22\x20vs\x20lock\x20\x22','lastSync','221pUMdMh','current\x20\x22','1060194QbYGar','functions','28BpkFFg','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','4ZyHnzR','ENOENT','1620711uDMGHX','code','stringify','scriptsRoot','3154xshJxv','object','620280qKXFRB','184eWcCNc','318475lxLstY','\x22.\x20'];a293_0x2e42=function(){return _0x52168f;};return a293_0x2e42();}export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x197913,_0x49733a,_0xae7210,_0x571651){const _0xd7b615=a293_0x2aa3,_0xb749f5={'apps':_0x197913[_0xd7b615(0x1c6)]&&typeof _0x197913[_0xd7b615(0x1c6)]===_0xd7b615(0x1bc)?_0x197913['apps']:{}};let _0x5cbfd3=_0xb749f5[_0xd7b615(0x1c6)][_0x49733a];if(!_0x5cbfd3)return _0x5cbfd3={'scriptsRoot':_0xae7210,'lastSync':'','functions':{}},_0xb749f5[_0xd7b615(0x1c6)][_0x49733a]=_0x5cbfd3,{'lockData':_0xb749f5,'appLock':_0x5cbfd3};if(!_0x5cbfd3[_0xd7b615(0x1d5)])_0x5cbfd3[_0xd7b615(0x1d5)]=_0xae7210;else{if(_0x5cbfd3[_0xd7b615(0x1d5)]!==_0xae7210)throw new Error(_0x571651+':\x20scriptsRoot\x20mismatch\x20—\x20'+(_0xd7b615(0x1cb)+_0xae7210+_0xd7b615(0x1c8)+_0x5cbfd3['scriptsRoot']+_0xd7b615(0x1c0))+_0xd7b615(0x1cf));}return!_0x5cbfd3[_0xd7b615(0x1cd)]&&(_0x5cbfd3['functions']={}),!_0x5cbfd3[_0xd7b615(0x1c9)]&&(_0x5cbfd3['lastSync']=''),{'lockData':_0xb749f5,'appLock':_0x5cbfd3};}export async function readBffLockFile(_0x20783b){const _0x3abefd=a293_0x2aa3;try{const _0x59d770=await readFile(_0x20783b,_0x3abefd(0x1c5)),_0x598d13=JSON[_0x3abefd(0x1c1)](_0x59d770);return{'apps':_0x598d13[_0x3abefd(0x1c6)]&&typeof _0x598d13[_0x3abefd(0x1c6)]===_0x3abefd(0x1bc)?_0x598d13[_0x3abefd(0x1c6)]:{}};}catch(_0x3f0fc0){if(_0x3f0fc0[_0x3abefd(0x1d3)]===_0x3abefd(0x1d1))return null;throw new Error(_0x3abefd(0x1c7)+String(_0x3f0fc0));}}function a293_0x2aa3(_0xf0cb87,_0x365e24){_0xf0cb87=_0xf0cb87-0x1bc;const _0x2e4286=a293_0x2e42();let _0x2aa3e2=_0x2e4286[_0xf0cb87];return _0x2aa3e2;}export async function writeBffLockFile(_0x4160ac,_0x166bd1){const _0x32a4d7=a293_0x2aa3;await mkdir(dirname(_0x4160ac),{'recursive':!![]}),await writeFile(_0x4160ac,JSON[_0x32a4d7(0x1d4)](_0x166bd1,null,0x2),_0x32a4d7(0x1c5));}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a295_0x5871(){const _0x16fe63=['some','11520DvXOOH','split','datasetCode','3JHlMFD','replace','trim','461746qfbfBL','72KpYWcy','1oFclNX','toUpperCase','operationType','80932xQPBjw','test','61817clYkuK','functionNode','map','353595brZxfB','520pdFONh','match','remoteId','550020ubUDHK','766205YAggEp','after','startsWith','entries','toLowerCase'];a295_0x5871=function(){return _0x16fe63;};return a295_0x5871();}(function(_0x405fe4,_0x487c5e){const _0x26bc7b=a295_0x2012,_0x1e5825=_0x405fe4();while(!![]){try{const _0x140cea=parseInt(_0x26bc7b(0xc1))/0x1*(parseInt(_0x26bc7b(0xbf))/0x2)+-parseInt(_0x26bc7b(0xbc))/0x3*(-parseInt(_0x26bc7b(0xc4))/0x4)+-parseInt(_0x26bc7b(0xb3))/0x5+-parseInt(_0x26bc7b(0xcd))/0x6+parseInt(_0x26bc7b(0xc6))/0x7*(parseInt(_0x26bc7b(0xc0))/0x8)+-parseInt(_0x26bc7b(0xb9))/0x9*(-parseInt(_0x26bc7b(0xca))/0xa)+-parseInt(_0x26bc7b(0xc9))/0xb;if(_0x140cea===_0x487c5e)break;else _0x1e5825['push'](_0x1e5825['shift']());}catch(_0x463a2d){_0x1e5825['push'](_0x1e5825['shift']());}}}(a295_0x5871,0x1d519));export const DEFAULT_BFF_SCRIPT_DESCRIPTION='TODO:\x20补充脚本功能描述';const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION='TODO:\x20add\x20script\x20description';export function snakeToCamel(_0x5b1891){const _0x837baa=a295_0x2012;return _0x5b1891[_0x837baa(0xb7)]()['replace'](/_([a-z])/g,(_0x196e4e,_0x2301c9)=>_0x2301c9[_0x837baa(0xc2)]());}function a295_0x2012(_0x79e37f,_0x4c2a0c){_0x79e37f=_0x79e37f-0xb3;const _0x5871dc=a295_0x5871();let _0x201212=_0x5871dc[_0x79e37f];return _0x201212;}export function findHookLocationByRemoteId(_0x44c35a,_0x47a986){const _0x59c7cf=a295_0x2012;if(!_0x47a986)return undefined;for(const [_0x4dd7e1,_0x46545b]of Object[_0x59c7cf(0xb6)](_0x44c35a)){if(_0x46545b[_0x59c7cf(0xcc)]===_0x47a986&&_0x46545b[_0x59c7cf(0xbb)]&&_0x46545b[_0x59c7cf(0xc3)]&&_0x46545b[_0x59c7cf(0xc7)]){const _0x14b7db=_0x4dd7e1[_0x59c7cf(0xba)]('/')[0x1];return{'alias':_0x14b7db||_0x46545b['alias'],'datasetCode':_0x46545b['datasetCode'],'operationType':_0x46545b[_0x59c7cf(0xc3)],'functionNode':_0x46545b[_0x59c7cf(0xc7)]};}}return undefined;}export function extractScriptDescription(_0x5819c3){const _0x3e840d=a295_0x2012,_0x104be9=_0x5819c3['match'](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x104be9?.[0x1])return undefined;const _0x3d95a5=_0x104be9[0x1],_0x2969a0=_0x4881aa=>{const _0x4f03b6=a295_0x2012,_0xd9417a=_0x4881aa?.[_0x4f03b6(0xbe)]();if(!_0xd9417a||_0xd9417a===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0xd9417a===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0xd9417a;},_0x24b5d7=_0x3d95a5[_0x3e840d(0xcb)](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x24b5d7)return _0x2969a0(_0x24b5d7[0x1]);const _0x175c2f=_0x3d95a5[_0x3e840d(0xba)](/\r?\n/)[_0x3e840d(0xc8)](_0x4d2ca1=>_0x4d2ca1[_0x3e840d(0xbd)](/^\s*\*\s?/,'')[_0x3e840d(0xbe)]()),_0x39b6dd=_0x175c2f[_0x3e840d(0xb8)](_0x5b2fcd=>/^\[\s*脚本类型\s*]\s*\S+/[_0x3e840d(0xc5)](_0x5b2fcd))&&_0x175c2f['some'](_0x1713b1=>/^\[\s*脚本名称\s*]\s*\S+/[_0x3e840d(0xc5)](_0x1713b1));if(!_0x39b6dd)return undefined;for(const _0x4ca92c of _0x175c2f){if(!_0x4ca92c||_0x4ca92c[_0x3e840d(0xb5)]('@')||/^\[[^\]]+]\s*/[_0x3e840d(0xc5)](_0x4ca92c))continue;return _0x2969a0(_0x4ca92c);}return undefined;}export function isValidBffFunctionName(_0xe8571d){return/^[A-Za-z_$][A-Za-z0-9_$]*$/['test'](_0xe8571d);}export function normalizeHookFunctionNode(_0x35b763){const _0x53a9b0=a295_0x2012;if(!_0x35b763)return undefined;const _0x3e963d=_0x35b763[_0x53a9b0(0xbe)]()[_0x53a9b0(0xb7)]();if(_0x3e963d==='before'||_0x3e963d===_0x53a9b0(0xb4))return _0x3e963d;return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a296_0x927af2=a296_0x3a23;function a296_0x3a23(_0xa4509e,_0x4469a4){_0xa4509e=_0xa4509e-0xc5;const _0x3f3236=a296_0x3f32();let _0x3a23a6=_0x3f3236[_0xa4509e];return _0x3a23a6;}(function(_0x1711cd,_0x45d234){const _0x51b59f=a296_0x3a23,_0x1f9e18=_0x1711cd();while(!![]){try{const _0x5c8847=-parseInt(_0x51b59f(0xcf))/0x1+parseInt(_0x51b59f(0xcb))/0x2+-parseInt(_0x51b59f(0xcd))/0x3*(-parseInt(_0x51b59f(0xc5))/0x4)+parseInt(_0x51b59f(0xc6))/0x5+-parseInt(_0x51b59f(0xd1))/0x6*(-parseInt(_0x51b59f(0xc7))/0x7)+parseInt(_0x51b59f(0xc8))/0x8+-parseInt(_0x51b59f(0xca))/0x9*(parseInt(_0x51b59f(0xc9))/0xa);if(_0x5c8847===_0x45d234)break;else _0x1f9e18['push'](_0x1f9e18['shift']());}catch(_0xe11493){_0x1f9e18['push'](_0x1f9e18['shift']());}}}(a296_0x3f32,0x271d4));function a296_0x3f32(){const _0x55231b=['210010sABhqk','351ZjJHgV','551182vgCLtZ','/smartapi/db-analysis/cross-db/start','3WCmwDJ','/smartapi/db-analysis/cross-db/latest-job','84771mgTnht','/smartapi/db-analysis/cross-db/status','15546XPvPtz','495396edCURb','1312385mZaFtw','462dchdqm','1848792GeHnGi'];a296_0x3f32=function(){return _0x55231b;};return a296_0x3f32();}export const CROSS_DB_ANALYSIS_PATHS={'start':a296_0x927af2(0xcc),'status':a296_0x927af2(0xd0),'latest':a296_0x927af2(0xce)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a297_0x158572=a297_0x37ac;function a297_0xd710(){const _0x416787=['5bTejvJ','27683epQJWO','886372bzcrxH','207CDTSmZ','3nJAEZX','3641118onaRgz','/smartapi/cross-db-relation/create','/smartapi/cross-db-relation/update','2ZSFoSp','287364zvzdQR','256210rXydZZ','1604691YzmnGQ','2859392RnxLSf'];a297_0xd710=function(){return _0x416787;};return a297_0xd710();}function a297_0x37ac(_0x4774b4,_0x4bd8d4){_0x4774b4=_0x4774b4-0x7e;const _0xd710ee=a297_0xd710();let _0x37ac01=_0xd710ee[_0x4774b4];return _0x37ac01;}(function(_0x507d32,_0x21a71d){const _0x1c4403=a297_0x37ac,_0x4c2cab=_0x507d32();while(!![]){try{const _0x384722=-parseInt(_0x1c4403(0x82))/0x1*(parseInt(_0x1c4403(0x89))/0x2)+-parseInt(_0x1c4403(0x85))/0x3*(parseInt(_0x1c4403(0x83))/0x4)+parseInt(_0x1c4403(0x81))/0x5*(parseInt(_0x1c4403(0x86))/0x6)+-parseInt(_0x1c4403(0x8a))/0x7+-parseInt(_0x1c4403(0x80))/0x8+parseInt(_0x1c4403(0x84))/0x9*(parseInt(_0x1c4403(0x7e))/0xa)+-parseInt(_0x1c4403(0x7f))/0xb;if(_0x384722===_0x21a71d)break;else _0x4c2cab['push'](_0x4c2cab['shift']());}catch(_0x355fb2){_0x4c2cab['push'](_0x4c2cab['shift']());}}}(a297_0xd710,0x62447));export const CROSS_DB_RELATION_PATHS={'list':'/smartapi/cross-db-relation/query','create':a297_0x158572(0x87),'update':a297_0x158572(0x88),'delete':'/smartapi/cross-db-relation/delete'};
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2fbca1,_0x5c10d0){const _0x41b849=a298_0x4d67,_0x299816=_0x2fbca1();while(!![]){try{const _0x3340df=-parseInt(_0x41b849(0x1e8))/0x1+-parseInt(_0x41b849(0x1eb))/0x2+-parseInt(_0x41b849(0x1fd))/0x3+-parseInt(_0x41b849(0x1ea))/0x4+-parseInt(_0x41b849(0x1e9))/0x5*(parseInt(_0x41b849(0x1f4))/0x6)+parseInt(_0x41b849(0x1f0))/0x7+parseInt(_0x41b849(0x1ed))/0x8*(parseInt(_0x41b849(0x1ee))/0x9);if(_0x3340df===_0x5c10d0)break;else _0x299816['push'](_0x299816['shift']());}catch(_0x3bd9db){_0x299816['push'](_0x299816['shift']());}}}(a298_0x39dd,0xc4781));import{listDatasets}from'../core/api-client.js';const cache=new Map();function a298_0x4d67(_0x252f25,_0x714d65){_0x252f25=_0x252f25-0x1e2;const _0x39ddcd=a298_0x39dd();let _0x4d67c9=_0x39ddcd[_0x252f25];return _0x4d67c9;}export async function listDatabases(_0x3d32c6){const _0x589d7f=a298_0x4d67;if(cache[_0x589d7f(0x1f8)](_0x3d32c6))return cache[_0x589d7f(0x1f6)](_0x3d32c6);const _0xd63c44=await listDatasets(_0x3d32c6),_0x26c0e3=new Map();for(const _0x154412 of _0xd63c44){const _0x5a1eda=_0x154412[_0x589d7f(0x1f1)];_0x5a1eda?.[_0x589d7f(0x1e6)]!=null&&_0x26c0e3[_0x589d7f(0x1f5)](_0x5a1eda[_0x589d7f(0x1e6)],_0x5a1eda['dbName']??'db-'+_0x5a1eda[_0x589d7f(0x1e6)]);}const _0x397b18=[..._0x26c0e3[_0x589d7f(0x1f3)]()]['map'](([_0x2f170c,_0x410f28])=>({'dbId':_0x2f170c,'dbName':_0x410f28}));return cache[_0x589d7f(0x1f5)](_0x3d32c6,_0x397b18),_0x397b18;}export async function resolveDb(_0x10b9a8,_0x1cccf8){const _0x55c39a=a298_0x4d67,_0x3d0f1a=await listDatabases(_0x10b9a8);if(_0x3d0f1a['length']===0x0)return{'resolved':[],'error':_0x55c39a(0x1e3)+_0x10b9a8+_0x55c39a(0x1f7)};if(!_0x1cccf8)return{'resolved':_0x3d0f1a};const _0xf47a96=Number(_0x1cccf8);if(!Number[_0x55c39a(0x1e5)](_0xf47a96)){const _0x317cb4=_0x3d0f1a[_0x55c39a(0x1f9)](_0x4c32d4=>_0x4c32d4[_0x55c39a(0x1e6)]===_0xf47a96);if(_0x317cb4)return{'resolved':[_0x317cb4]};}const _0x28477e=_0x1cccf8[_0x55c39a(0x1e4)](),_0x3c9188=_0x3d0f1a['filter'](_0x62c765=>_0x62c765['dbName']['toLowerCase']()[_0x55c39a(0x1f2)](_0x28477e));if(_0x3c9188[_0x55c39a(0x1ef)]>0x0)return{'resolved':_0x3c9188};const _0x20af54=_0x3d0f1a[_0x55c39a(0x1ec)](_0x45e533=>_0x45e533[_0x55c39a(0x1fa)]+'\x20('+_0x45e533['dbId']+')')[_0x55c39a(0x1fb)](',\x20');return{'resolved':[],'error':_0x55c39a(0x1e2)+_0x1cccf8+'\x22\x20under\x20app\x20\x22'+_0x10b9a8+_0x55c39a(0x1e7)+_0x20af54+_0x55c39a(0x1fc)};}export async function resolveOneDb(_0x27426a,_0x5dd611){const _0x3d6dc4=a298_0x4d67,{resolved:_0x472380,error:_0xe09601}=await resolveDb(_0x27426a,_0x5dd611);if(_0xe09601)return{'db':null,'error':_0xe09601};if(_0x472380[_0x3d6dc4(0x1ef)]===0x1)return{'db':_0x472380[0x0]};if(!_0x5dd611){const _0x28d827=_0x472380[_0x3d6dc4(0x1ec)](_0x396bdc=>_0x396bdc['dbName']+'\x20('+_0x396bdc[_0x3d6dc4(0x1e6)]+')')[_0x3d6dc4(0x1fb)](',\x20');return{'db':null,'error':'Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20'+_0x28d827};}const _0x1e7d45=_0x472380['map'](_0x3cb54b=>_0x3cb54b[_0x3d6dc4(0x1fa)]+'\x20('+_0x3cb54b[_0x3d6dc4(0x1e6)]+')')[_0x3d6dc4(0x1fb)](',\x20');return{'db':null,'error':'\x22'+_0x5dd611+'\x22\x20matches\x20multiple\x20databases:\x20'+_0x1e7d45+'.\x20Be\x20more\x20specific.'};}export async function getDbName(_0x2f20a1,_0x2d7bc4){const _0x480345=a298_0x4d67,_0x3544bb=await listDatabases(_0x2f20a1);return _0x3544bb['find'](_0x563cad=>_0x563cad[_0x480345(0x1e6)]===_0x2d7bc4)?.['dbName'];}function a298_0x39dd(){const _0x4c4f25=['5146744XEQfLU','1758080bmXMbO','map','8ANFPfY','35913483BYckge','length','8783705MChBOp','dbtableConfig','includes','entries','366wYjwlR','set','get','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','has','find','dbName','join','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','1918368lfJydQ','No\x20database\x20matching\x20\x22','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','toLowerCase','isNaN','dbId','\x22.\x20Available:\x20','757310ItQMgB','71965ZTfwTL'];a298_0x39dd=function(){return _0x4c4f25;};return a298_0x39dd();}
|