@lovrabet/rabetbase-cli 2.5.8 → 2.5.9
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/README.md +6 -6
- 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/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/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.d.ts +8 -5
- 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.d.ts +5 -3
- 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.d.ts +14 -11
- 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/kb-management-client.d.ts +2 -2
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +3 -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/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/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/references/rabetbase-kb.md +17 -15
- package/skills/rabetbase/references/rabetbase-rule.md +8 -6
- 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_0x5e2a2f=a290_0x5e07;(function(_0x28d862,_0x204062){const _0x541b6f=a290_0x5e07,_0x11dfb4=_0x28d862();while(!![]){try{const _0x7123b5=parseInt(_0x541b6f(0x1d7))/0x1+-parseInt(_0x541b6f(0x1de))/0x2*(parseInt(_0x541b6f(0x1d3))/0x3)+-parseInt(_0x541b6f(0x1f2))/0x4+-parseInt(_0x541b6f(0x1f3))/0x5+parseInt(_0x541b6f(0x1ed))/0x6+-parseInt(_0x541b6f(0x1e9))/0x7+parseInt(_0x541b6f(0x1e7))/0x8;if(_0x7123b5===_0x204062)break;else _0x11dfb4['push'](_0x11dfb4['shift']());}catch(_0x186757){_0x11dfb4['push'](_0x11dfb4['shift']());}}}(a290_0x84c2,0xcf292));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=['COMMON',a290_0x5e2a2f(0x1ee),a290_0x5e2a2f(0x1d8)];export function normalizeBffType(_0x4cba21){const _0x20cab5=a290_0x5e2a2f;if(!_0x4cba21)return undefined;const _0xc80b9a=_0x4cba21['trim']()['toUpperCase']();return SUPPORTED_BFF_TYPES[_0x20cab5(0x1d6)](_0xc80b9a)?_0xc80b9a:undefined;}async function scanJsFilesRecursively(_0x1c7ffa,_0x35df33){const _0x2d2164=a290_0x5e2a2f,_0x3af284=[];try{const _0x2a23e4=await readdir(_0x1c7ffa,{'withFileTypes':!![]});for(const _0x1266ef of _0x2a23e4){const _0x59c589=join(_0x1c7ffa,_0x1266ef[_0x2d2164(0x1e5)]);if(_0x1266ef['isDirectory']())_0x3af284[_0x2d2164(0x1e4)](...await scanJsFilesRecursively(_0x59c589,_0x35df33+'/'+_0x1266ef[_0x2d2164(0x1e5)]));else _0x1266ef['isFile']()&&_0x1266ef[_0x2d2164(0x1e5)][_0x2d2164(0x1f0)]('.js')&&_0x3af284['push']({'lockKey':_0x35df33+'/'+_0x1266ef['name'][_0x2d2164(0x1e6)](/\.js$/,''),'filePath':_0x59c589});}}catch(_0x1fa088){if(_0x1fa088[_0x2d2164(0x1e8)]!=='ENOENT')throw _0x1fa088;}return _0x3af284;}async function scanFlatFunctions(_0x101c00,_0x112294){const _0x5247f5=a290_0x5e2a2f,_0x5de537=join(_0x101c00[_0x5247f5(0x1eb)],_0x112294),_0x3b846b=await scanJsFilesRecursively(_0x5de537,_0x112294);return _0x3b846b[_0x5247f5(0x1db)](({lockKey:_0x4e67d6,filePath:_0x142a95})=>({'type':_0x112294,'name':_0x4e67d6[_0x5247f5(0x1ec)]('/')['at'](-0x1)??'','filePath':_0x142a95,'lockKey':_0x4e67d6}));}async function scanHookFunctions(_0xd36ad1){const _0x35d308=a290_0x5e2a2f,_0x588cb1=join(_0xd36ad1[_0x35d308(0x1eb)],'HOOK'),_0x216772=[];try{const _0x81ab4=await readdir(_0x588cb1,{'withFileTypes':!![]});for(const _0x9980b9 of _0x81ab4){if(!_0x9980b9[_0x35d308(0x1d1)]())continue;const _0x39037a=_0x9980b9[_0x35d308(0x1e5)],_0x2a4255=join(_0x588cb1,_0x39037a),_0x5e7a58=await readdir(_0x2a4255,{'withFileTypes':!![]});for(const _0x3dadce of _0x5e7a58){if(!_0x3dadce[_0x35d308(0x1d1)]())continue;const _0x16bb76=_0x3dadce[_0x35d308(0x1e5)],_0xf5ca22=join(_0x2a4255,_0x16bb76),_0x3802b7=await readdir(_0xf5ca22,{'withFileTypes':!![]});for(const _0x814e6b of _0x3802b7){if(!_0x814e6b[_0x35d308(0x1d1)]())continue;const _0x22d477=_0x814e6b[_0x35d308(0x1e5)],_0x2e944f=join(_0xf5ca22,_0x22d477),_0x836954=await readdir(_0x2e944f,{'withFileTypes':!![]});for(const _0x4add94 of _0x836954){if(!_0x4add94[_0x35d308(0x1f7)]()||!_0x4add94[_0x35d308(0x1e5)][_0x35d308(0x1f0)](_0x35d308(0x1dc)))continue;const _0x93ef24=_0x4add94[_0x35d308(0x1e5)][_0x35d308(0x1e6)](/\.js$/,'');_0x216772[_0x35d308(0x1e4)]({'type':_0x35d308(0x1d8),'name':_0x93ef24,'filePath':join(_0x2e944f,_0x4add94[_0x35d308(0x1e5)]),'lockKey':_0x35d308(0x1df)+_0x39037a+'/'+_0x16bb76+'/'+_0x22d477+'/'+_0x93ef24,'alias':_0x39037a,'operationType':_0x16bb76,'functionNode':_0x22d477});}}}}}catch(_0x36985f){if(_0x36985f[_0x35d308(0x1e8)]!=='ENOENT')throw _0x36985f;}return _0x216772;}export async function scanLocalBffFunctions(_0x2cf5ec,_0x4bc6d6){const _0x46927e=a290_0x5e2a2f;if(_0x4bc6d6==='COMMON'||_0x4bc6d6===_0x46927e(0x1ee))return scanFlatFunctions(_0x2cf5ec,_0x4bc6d6);if(_0x4bc6d6===_0x46927e(0x1d8))return scanHookFunctions(_0x2cf5ec);const [_0x20060b,_0x17137d,_0x5f0d51]=await Promise[_0x46927e(0x1e0)]([scanFlatFunctions(_0x2cf5ec,_0x46927e(0x1dd)),scanFlatFunctions(_0x2cf5ec,_0x46927e(0x1ee)),scanHookFunctions(_0x2cf5ec)]);return[..._0x20060b,..._0x17137d,..._0x5f0d51];}function a290_0x84c2(){const _0x278f72=['COMMON','118mQJANz','HOOK/','all','scriptType','functionName','functionNode','push','name','replace','13416848MmxRxF','code','7829430BvRZxA','F_OK','scriptsRootDir','split','5338866esnlVr','ENDPOINT','operationType','endsWith','datasetCode','3989088KIYxvb','3397610ygXaYp','Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20','set','beforeScriptId','isFile','get','isDirectory','afterScriptId','14379TxfAYn','every','before','includes','1359684RsFKwl','HOOK','startsWith','Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20','map','.js'];a290_0x84c2=function(){return _0x278f72;};return a290_0x84c2();}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x11d597){return SAFE_LOCK_KEY_SEGMENT['test'](_0x11d597)&&_0x11d597!=='.'&&_0x11d597!=='..';}export function resolveLocalFilePathFromLockKey(_0x34535a,_0x40e97f){const _0x28a858=a290_0x5e2a2f,_0x568d3d=_0x40e97f[_0x28a858(0x1ec)]('/');if(!_0x568d3d[_0x28a858(0x1d4)](isSafeLockKeySegment))throw new Error(_0x28a858(0x1f4)+_0x40e97f);const _0x27e761=resolve(join(_0x34535a[_0x28a858(0x1eb)],..._0x568d3d)+_0x28a858(0x1dc)),_0x29949b=resolve(_0x34535a['scriptsRootDir']);if(_0x27e761!==_0x29949b&&!_0x27e761[_0x28a858(0x1d9)](_0x29949b+sep))throw new Error(_0x28a858(0x1da)+_0x27e761);return _0x27e761;}function a290_0x5e07(_0x31c294,_0x9ca9ed){_0x31c294=_0x31c294-0x1d0;const _0x84c237=a290_0x84c2();let _0x5e0774=_0x84c237[_0x31c294];return _0x5e0774;}export function createHookLocationMap(_0x3e9dd8){const _0x1fb56c=a290_0x5e2a2f,_0x884ff7=new Map();for(const _0x393634 of _0x3e9dd8){_0x393634[_0x1fb56c(0x1f6)]&&_0x884ff7[_0x1fb56c(0x1f5)](_0x393634['beforeScriptId'],{'datasetCode':_0x393634[_0x1fb56c(0x1f1)],'operationType':snakeToCamel(_0x393634[_0x1fb56c(0x1ef)]),'functionNode':_0x1fb56c(0x1d5)}),_0x393634[_0x1fb56c(0x1d2)]&&_0x884ff7['set'](_0x393634[_0x1fb56c(0x1d2)],{'datasetCode':_0x393634['datasetCode'],'operationType':snakeToCamel(_0x393634[_0x1fb56c(0x1ef)]),'functionNode':'after'});}return _0x884ff7;}export function resolveRemoteScriptTarget(_0x2845e9,_0x485e7d,_0x3c4e8b,_0x30834a,_0x54fe4f){const _0x2c89fe=a290_0x5e2a2f,_0x4dc93b=normalizeBffType(_0x485e7d[_0x2c89fe(0x1e1)]);if(!_0x4dc93b||!_0x485e7d[_0x2c89fe(0x1e2)])return null;if(_0x4dc93b===_0x2c89fe(0x1d8)){const _0x5a2d25=_0x485e7d['id']?_0x3c4e8b[_0x2c89fe(0x1d0)](_0x485e7d['id']):undefined,_0x115bec=findHookLocationByRemoteId(_0x30834a,_0x485e7d['id']),_0x3d3056=_0x5a2d25?{..._0x115bec?.[_0x2c89fe(0x1f1)]===_0x5a2d25[_0x2c89fe(0x1f1)]?_0x115bec:{},..._0x5a2d25}:_0x115bec;if(!_0x3d3056)return null;const _0x4cbadf=_0x54fe4f[_0x2c89fe(0x1d0)](_0x3d3056[_0x2c89fe(0x1f1)]['toLowerCase']()),_0x33518b=_0x4cbadf??_0x3d3056[_0x2c89fe(0x1f1)],_0xe5b52={..._0x3d3056,'alias':_0x4cbadf},_0x29d717=_0x2c89fe(0x1df)+_0x33518b+'/'+_0xe5b52[_0x2c89fe(0x1ef)]+'/'+_0xe5b52[_0x2c89fe(0x1e3)]+'/'+_0x485e7d[_0x2c89fe(0x1e2)];if(!_0x29d717[_0x2c89fe(0x1ec)]('/')[_0x2c89fe(0x1d4)](isSafeLockKeySegment))return null;return{'lockKey':_0x29d717,'filePath':resolveLocalFilePathFromLockKey(_0x2845e9,_0x29d717),'type':_0x2c89fe(0x1d8),'hookLocation':_0xe5b52};}const _0x4d490c=_0x4dc93b+'/'+_0x485e7d[_0x2c89fe(0x1e2)];if(!_0x4d490c[_0x2c89fe(0x1ec)]('/')[_0x2c89fe(0x1d4)](isSafeLockKeySegment))return null;return{'lockKey':_0x4d490c,'filePath':resolveLocalFilePathFromLockKey(_0x2845e9,_0x4d490c),'type':_0x4dc93b};}export async function ensureParentDirectory(_0x1d9852){await mkdir(dirname(_0x1d9852),{'recursive':!![]});}export async function fileExists(_0x193cac){const _0x2a8cbe=a290_0x5e2a2f;try{return await access(_0x193cac,constants[_0x2a8cbe(0x1ea)]),!![];}catch{return![];}}export async function directoryExists(_0x1ad54f){const _0x1567fa=a290_0x5e2a2f;try{const _0x39e940=await stat(_0x1ad54f);return _0x39e940[_0x1567fa(0x1d1)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x295f14,_0x48a44a){const _0x44710f=a291_0x4f23,_0x4dae6f=_0x295f14();while(!![]){try{const _0x441ed6=parseInt(_0x44710f(0x8a))/0x1+-parseInt(_0x44710f(0x8c))/0x2*(-parseInt(_0x44710f(0x83))/0x3)+-parseInt(_0x44710f(0x8d))/0x4*(parseInt(_0x44710f(0x86))/0x5)+-parseInt(_0x44710f(0x88))/0x6+parseInt(_0x44710f(0x8b))/0x7+-parseInt(_0x44710f(0x87))/0x8+-parseInt(_0x44710f(0x84))/0x9;if(_0x441ed6===_0x48a44a)break;else _0x4dae6f['push'](_0x4dae6f['shift']());}catch(_0x2729aa){_0x4dae6f['push'](_0x4dae6f['shift']());}}}(a291_0x54e3,0x52f7a));import{readFile}from'node:fs/promises';function a291_0x54e3(){const _0x54b8a3=['update','5DYfvzf','3416984KqLZKb','185568zXWXbz','utf8','606180TzOQWi','2111529hyzrkV','2ZCSyvy','1233972eOzwJq','hex','1761729OiLBIL','3498228krqxZd'];a291_0x54e3=function(){return _0x54b8a3;};return a291_0x54e3();}function a291_0x4f23(_0xd784d8,_0x5b7301){_0xd784d8=_0xd784d8-0x82;const _0x54e3a4=a291_0x54e3();let _0x4f2381=_0x54e3a4[_0xd784d8];return _0x4f2381;}import a291_0x4c21bd from'node:crypto';export function computeContentHash(_0x546ead){const _0x4f8aeb=a291_0x4f23;return a291_0x4c21bd['createHash']('md5')[_0x4f8aeb(0x85)](_0x546ead)['digest'](_0x4f8aeb(0x82));}export async function computeFileHash(_0x3504f7){const _0x31885a=a291_0x4f23,_0x38fa79=await readFile(_0x3504f7,_0x31885a(0x89));return computeContentHash(_0x38fa79);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a292_0xd79a(_0x2c11aa,_0x2d400f){_0x2c11aa=_0x2c11aa-0x1e5;const _0x53bd84=a292_0x53bd();let _0xd79a57=_0x53bd84[_0x2c11aa];return _0xd79a57;}(function(_0x3d44a4,_0x120821){const _0x5f014e=a292_0xd79a,_0x9b0606=_0x3d44a4();while(!![]){try{const _0x53889a=parseInt(_0x5f014e(0x1f3))/0x1*(parseInt(_0x5f014e(0x204))/0x2)+parseInt(_0x5f014e(0x213))/0x3*(-parseInt(_0x5f014e(0x215))/0x4)+parseInt(_0x5f014e(0x20a))/0x5+parseInt(_0x5f014e(0x208))/0x6*(parseInt(_0x5f014e(0x1ed))/0x7)+parseInt(_0x5f014e(0x1e8))/0x8*(-parseInt(_0x5f014e(0x1ea))/0x9)+parseInt(_0x5f014e(0x216))/0xa+-parseInt(_0x5f014e(0x1e6))/0xb*(parseInt(_0x5f014e(0x1e5))/0xc);if(_0x53889a===_0x120821)break;else _0x9b0606['push'](_0x9b0606['shift']());}catch(_0x12ebd1){_0x9b0606['push'](_0x9b0606['shift']());}}}(a292_0x53bd,0x8a9dd));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x3f3689){const _0x3d2376=a292_0xd79a,_0x36d6fc=[];for(const [_0x451f1f,_0x5840f9]of Object[_0x3d2376(0x1fb)](_0x3f3689[_0x3d2376(0x20d)])){const [_0x14b6aa,_0x343f0e]=_0x451f1f[_0x3d2376(0x214)]('/');if(_0x14b6aa!==_0x3d2376(0x1fe)||!_0x343f0e||!_0x5840f9[_0x3d2376(0x209)])continue;_0x36d6fc[_0x3d2376(0x1fc)]({'alias':_0x343f0e,'datasetCode':_0x5840f9['datasetCode']});}return _0x36d6fc;}export function uniqueTrackedHookDirectoryByDataset(_0x13efb1){const _0x5b5a6c=a292_0xd79a,_0x1e8455=new Map();for(const _0x8262cb of trackedHookDirectoryMappings(_0x13efb1)){const _0x48d4b3=directoryIdentity(_0x8262cb[_0x5b5a6c(0x209)]),_0x4a0b53=_0x1e8455[_0x5b5a6c(0x1fa)](_0x48d4b3)??new Map();_0x4a0b53['set'](directoryIdentity(_0x8262cb[_0x5b5a6c(0x203)]),_0x8262cb[_0x5b5a6c(0x203)]),_0x1e8455[_0x5b5a6c(0x218)](_0x48d4b3,_0x4a0b53);}const _0x1194d4=new Map();for(const [_0x40114a,_0x58ebe8]of _0x1e8455){if(_0x58ebe8[_0x5b5a6c(0x1f8)]>0x1)throw hookDirectoryError(_0x5b5a6c(0x20c),_0x5b5a6c(0x219)+_0x40114a+'\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20'+[..._0x58ebe8[_0x5b5a6c(0x1ee)]()][_0x5b5a6c(0x1f4)](',\x20')+'.',{'datasetCode':_0x40114a,'directories':[..._0x58ebe8[_0x5b5a6c(0x1ee)]()]});_0x1194d4[_0x5b5a6c(0x218)](_0x40114a,[..._0x58ebe8[_0x5b5a6c(0x1ee)]()][0x0]);}return _0x1194d4;}export function assertUnambiguousHookDirectoryMappings(_0x18006d){const _0x33a8bb=a292_0xd79a,_0x3ffecd=new Map();for(const {alias:_0x530b21,datasetCode:_0x3481e2}of _0x18006d){const _0x10341f=directoryIdentity(_0x530b21),_0x4f83dc=_0x3ffecd[_0x33a8bb(0x1fa)](_0x10341f)??new Set();_0x4f83dc[_0x33a8bb(0x206)](_0x3481e2),_0x3ffecd['set'](_0x10341f,_0x4f83dc);}for(const [_0x3e74ca,_0xaeeded]of _0x3ffecd){if(_0xaeeded[_0x33a8bb(0x1f8)]>0x1)throw hookDirectoryError(_0x33a8bb(0x1f7),_0x33a8bb(0x1fd)+_0x3e74ca+_0x33a8bb(0x205),{'directoryName':_0x3e74ca,'datasetCodes':[..._0xaeeded]});}}export function assertUnambiguousHookAliases(_0x26f2cd){const _0xd3b755=a292_0xd79a,_0x438239=[..._0x26f2cd],_0x702c12=new Map(),_0x1483d3=new Map();for(const {alias:_0x15e4bb,datasetCode:_0x4ce7fb}of _0x438239){const _0x1b5d62=directoryIdentity(_0x15e4bb),_0x3cdb06=directoryIdentity(_0x4ce7fb),_0x2e9408=_0x702c12[_0xd3b755(0x1fa)](_0x1b5d62)??new Set();_0x2e9408[_0xd3b755(0x206)](_0x4ce7fb),_0x702c12[_0xd3b755(0x218)](_0x1b5d62,_0x2e9408);const _0xbfb62e=_0x1483d3[_0xd3b755(0x1fa)](_0x3cdb06)??new Set();_0xbfb62e['add'](_0x15e4bb),_0x1483d3[_0xd3b755(0x218)](_0x3cdb06,_0xbfb62e);}for(const [_0x4036eb,_0x3da2d8]of _0x702c12){if(_0x3da2d8[_0xd3b755(0x1f8)]>0x1)throw hookDirectoryError(_0xd3b755(0x211),_0xd3b755(0x1f6)+_0x4036eb+_0xd3b755(0x205),{'alias':_0x4036eb,'datasetCodes':[..._0x3da2d8]});}for(const [_0x2f6df3,_0x31fc78]of _0x1483d3){if(_0x31fc78[_0xd3b755(0x1f8)]>0x1)throw hookDirectoryError(_0xd3b755(0x211),_0xd3b755(0x219)+_0x2f6df3+_0xd3b755(0x1f1),{'datasetCode':_0x2f6df3,'aliases':[..._0x31fc78]});}}export function buildHookDirectoryIndexes(_0x43d0aa,_0x2925e3=[]){const _0x11af32=a292_0xd79a,_0x41a2f1=[..._0x2925e3];assertUnambiguousHookDirectoryMappings(_0x41a2f1['map'](([_0xf10ad1,_0x1800fc])=>({'alias':_0xf10ad1,'datasetCode':_0x1800fc})));const _0x52350b=new Map(),_0x5a3f3f=new Map();for(const _0x55dd2f of _0x43d0aa){appendUnique(_0x52350b,directoryIdentity(_0x55dd2f[_0x11af32(0x202)]),_0x55dd2f,_0x5427bc=>_0x5427bc['code']);}for(const [_0x1834cc,_0x266933]of _0x41a2f1){appendUnique(_0x5a3f3f,directoryIdentity(_0x1834cc),_0x266933,_0x209738=>_0x209738);}return{'datasetCodeToDatasets':_0x52350b,'aliasToDatasetCodes':_0x5a3f3f};}export function resolvePushHookDirectory(_0x4bf12d,_0x187b35,_0x20d34e){const _0x44a03d=a292_0xd79a,_0xddfcfe=directoryIdentity(_0x4bf12d),_0x3c6fd2=_0x20d34e['datasetCodeToDatasets'][_0x44a03d(0x1fa)](_0xddfcfe)??[],_0x3f4cfb=_0x20d34e['aliasToDatasetCodes'][_0x44a03d(0x1fa)](_0xddfcfe)??[],_0x40c54f=new Set([..._0x3c6fd2['map'](_0x2cfb6e=>_0x2cfb6e['code']),..._0x3f4cfb]);if(_0x40c54f[_0x44a03d(0x1f8)]>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS',_0x44a03d(0x1fd)+_0x4bf12d+_0x44a03d(0x20b),{'directoryName':_0x4bf12d,'datasetCodes':[..._0x40c54f]});const _0xa46ee7=[..._0x40c54f][0x0];if(_0xa46ee7&&_0x187b35?.[_0x44a03d(0x209)]&&_0xa46ee7!==_0x187b35[_0x44a03d(0x209)])throw hookDirectoryError(_0x44a03d(0x200),'HOOK\x20directory\x20\x22'+_0x4bf12d+'\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22'+_0x187b35['datasetCode']+_0x44a03d(0x1f9)+_0xa46ee7+'\x22.',{'directoryName':_0x4bf12d,'datasetCode':_0xa46ee7,'lockedDatasetCode':_0x187b35[_0x44a03d(0x209)]});const _0x3c9df4=_0xa46ee7?findDatasetByCode(_0x20d34e,_0xa46ee7):undefined,_0x55a1ee=!!_0xa46ee7&&_0x3f4cfb[_0x44a03d(0x20e)](_0xa46ee7);if(_0x3c9df4)return{'dataset':_0x3c9df4,'datasetCode':_0x3c9df4[_0x44a03d(0x202)],..._0x55a1ee?{'alias':_0x4bf12d}:{},'directoryProtocol':_0x55a1ee?_0x44a03d(0x203):_0x44a03d(0x209),'warnings':[]};const _0x322c93=_0x187b35?.[_0x44a03d(0x209)];if(_0x322c93){const _0x904c6=findDatasetByCode(_0x20d34e,_0x322c93);if(_0x904c6)return{'dataset':_0x904c6,'datasetCode':_0x904c6[_0x44a03d(0x202)],..._0x187b35['alias']?{'alias':_0x187b35[_0x44a03d(0x203)]}:{},'directoryProtocol':_0x187b35[_0x44a03d(0x203)]?'alias':_0x44a03d(0x209),'warnings':[]};}if(_0xa46ee7||_0x322c93){const _0x20cc1f=_0xa46ee7??_0x322c93;throw hookDirectoryError('HOOK_DATASET_NOT_FOUND','HOOK\x20directory\x20\x22'+_0x4bf12d+'\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.',{'directoryName':_0x4bf12d,'datasetCode':_0x20cc1f});}throw hookDirectoryError(_0x44a03d(0x20f),_0x44a03d(0x1f5)+_0x4bf12d+_0x44a03d(0x1e7),{'directoryName':_0x4bf12d});}export function preflightPushHookDirectories(_0xf01d64,_0x168d71,_0x390dc7,_0xa22efd){const _0x237754=a292_0xd79a,_0x3edfa9=new Map(),_0x315ea6=new Map();for(const _0x3a11b2 of _0xf01d64){if(_0x3a11b2[_0x237754(0x217)]!==_0x237754(0x1fe))continue;const _0x2813a2=_0x3a11b2[_0x237754(0x203)];if(!_0x2813a2)throw hookDirectoryError('HOOK_DIRECTORY_UNRESOLVED','Incomplete\x20HOOK\x20path:\x20'+_0x3a11b2[_0x237754(0x212)],{'lockKey':_0x3a11b2[_0x237754(0x212)]});let _0xb86cf6;try{_0xb86cf6=resolvePushHookDirectory(_0x2813a2,_0x168d71[_0x237754(0x20d)][_0x3a11b2[_0x237754(0x212)]],_0x390dc7);}catch(_0x252285){if(_0xa22efd&&_0x252285 instanceof CliError&&[_0x237754(0x207),'HOOK_DIRECTORY_UNRESOLVED']['includes'](_0x252285[_0x237754(0x202)])){_0xa22efd[_0x237754(0x218)](_0x3a11b2['lockKey'],_0x252285['message']);continue;}throw _0x252285;}_0x3edfa9['set'](_0x3a11b2[_0x237754(0x212)],_0xb86cf6);const _0x22c470=_0x315ea6[_0x237754(0x1fa)](_0xb86cf6[_0x237754(0x209)])??new Set();_0x22c470[_0x237754(0x206)](_0x2813a2),_0x315ea6['set'](_0xb86cf6[_0x237754(0x209)],_0x22c470);}for(const [_0x1c91ec,_0x5c2460]of _0x315ea6){if(_0x5c2460[_0x237754(0x1f8)]>0x1)throw hookDirectoryError('HOOK_DUPLICATE_DIRECTORIES','Dataset\x20\x22'+_0x1c91ec+_0x237754(0x201)+[..._0x5c2460][_0x237754(0x1f4)](',\x20')+'.',{'datasetCode':_0x1c91ec,'directories':[..._0x5c2460]});}return _0x3edfa9;}export function hookDirectoryError(_0x523916,_0x15648a,_0x1038c5){const _0x8d8ed3=a292_0xd79a,_0x4f1c24=new CliError(_0x523916,0x2,_0x523916+':\x20'+_0x15648a);return _0x4f1c24[_0x8d8ed3(0x1eb)]=_0x1038c5,_0x4f1c24;}function a292_0x53bd(){const _0x49c93d=['8219510XKtVxQ','type','set','Dataset\x20\x22','5190456xkydFv','44hzEmzN','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','930640hzXBXQ','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','9TXiUSp','details','name','7DXvVHS','values','Dataset\x20code\x20\x22','map','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','HOOK_DATASET_CODE_AMBIGUOUS','5JoyBbd','join','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','SDK\x20alias\x20\x22','HOOK_DIRECTORY_AMBIGUOUS','size','\x22\x20to\x20\x22','get','entries','push','HOOK\x20directory\x20\x22','HOOK','normalize','HOOK_MAPPING_DRIFT','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','code','alias','17462QJxBru','\x22\x20resolves\x20to\x20multiple\x20Datasets.','add','HOOK_DATASET_NOT_FOUND','6549906yBFZRg','datasetCode','4780785rDEQvW','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','HOOK_DUPLICATE_DIRECTORIES','functions','includes','HOOK_DIRECTORY_UNRESOLVED','datasetCodeToDatasets','HOOK_ALIAS_AMBIGUOUS','lockKey','3vSqEuF','split','1996636FmeRGx'];a292_0x53bd=function(){return _0x49c93d;};return a292_0x53bd();}function findDatasetByCode(_0xa60177,_0x451534){const _0x3a5c76=a292_0xd79a,_0x468815=_0xa60177[_0x3a5c76(0x210)]['get'](directoryIdentity(_0x451534))??[];if(_0x468815['length']>0x1)throw hookDirectoryError(_0x3a5c76(0x1f2),_0x3a5c76(0x1ef)+_0x451534+_0x3a5c76(0x1e9),{'datasetCode':_0x451534,'candidates':_0x468815[_0x3a5c76(0x1f0)](datasetFact)});return _0x468815[0x0];}function directoryIdentity(_0x15f232){const _0xf8186b=a292_0xd79a;return _0x15f232[_0xf8186b(0x1ff)]('NFC')['toLowerCase']();}function appendUnique(_0xe2d61a,_0x4ef4b2,_0x255dfd,_0x10003d){const _0x5ad723=a292_0xd79a,_0x1a7978=_0xe2d61a[_0x5ad723(0x1fa)](_0x4ef4b2)??[];!_0x1a7978['some'](_0x2ee661=>_0x10003d(_0x2ee661)===_0x10003d(_0x255dfd))&&_0x1a7978[_0x5ad723(0x1fc)](_0x255dfd),_0xe2d61a[_0x5ad723(0x218)](_0x4ef4b2,_0x1a7978);}function datasetFact(_0x2e5a4f){const _0x224ff7=a292_0xd79a;return{'id':_0x2e5a4f['id'],'name':_0x2e5a4f[_0x224ff7(0x1ec)],'datasetCode':_0x2e5a4f['code']};}
|
|
1
|
+
(function(_0x4772e2,_0x23f3dd){const _0x355178=a292_0x558f,_0x28d1d9=_0x4772e2();while(!![]){try{const _0x5ac173=parseInt(_0x355178(0x212))/0x1*(-parseInt(_0x355178(0x20b))/0x2)+-parseInt(_0x355178(0x1f8))/0x3*(-parseInt(_0x355178(0x1f2))/0x4)+parseInt(_0x355178(0x222))/0x5*(parseInt(_0x355178(0x202))/0x6)+-parseInt(_0x355178(0x21d))/0x7+parseInt(_0x355178(0x217))/0x8*(-parseInt(_0x355178(0x223))/0x9)+parseInt(_0x355178(0x1f5))/0xa+parseInt(_0x355178(0x20a))/0xb;if(_0x5ac173===_0x23f3dd)break;else _0x28d1d9['push'](_0x28d1d9['shift']());}catch(_0x241e77){_0x28d1d9['push'](_0x28d1d9['shift']());}}}(a292_0x4fc8,0x9ce6d));function a292_0x4fc8(){const _0x52b2bb=['name','6096293gNJRfE','SDK\x20alias\x20\x22','\x22\x20resolves\x20to\x20multiple\x20Datasets.','HOOK_ALIAS_AMBIGUOUS','aliasToDatasetCodes','729230FWRomX','6896070eDJZhq','length','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','HOOK_DIRECTORY_AMBIGUOUS','add','entries','686824dqwTkr','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','map','4802380VImOTt','Dataset\x20\x22','NFC','3MeOIdq','Incomplete\x20HOOK\x20path:\x20','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','HOOK_DUPLICATE_DIRECTORIES','size','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','alias','HOOK\x20directory\x20\x22','HOOK_DATASET_NOT_FOUND','30slBofv','push','message','functions','includes','lockKey','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','22587972yVSJSt','898KrXSpV','HOOK_DATASET_CODE_AMBIGUOUS','HOOK','Dataset\x20code\x20\x22','HOOK_MAPPING_DRIFT','values','some','2572kEdVkQ','join','set','HOOK_DIRECTORY_UNRESOLVED','code','8bFjSPS','datasetCodeToDatasets','get','split','datasetCode'];a292_0x4fc8=function(){return _0x52b2bb;};return a292_0x4fc8();}import{CliError}from'../../errors.js';function a292_0x558f(_0x189431,_0x20cf90){_0x189431=_0x189431-0x1ed;const _0x4fc842=a292_0x4fc8();let _0x558ff0=_0x4fc842[_0x189431];return _0x558ff0;}export function trackedHookDirectoryMappings(_0x2a7e9c){const _0x57bb86=a292_0x558f,_0x2e540a=[];for(const [_0x14f50e,_0x2d1c00]of Object[_0x57bb86(0x1f1)](_0x2a7e9c[_0x57bb86(0x205)])){const [_0x531807,_0x228c38]=_0x14f50e[_0x57bb86(0x21a)]('/');if(_0x531807!==_0x57bb86(0x20d)||!_0x228c38||!_0x2d1c00[_0x57bb86(0x21b)])continue;_0x2e540a['push']({'alias':_0x228c38,'datasetCode':_0x2d1c00['datasetCode']});}return _0x2e540a;}export function uniqueTrackedHookDirectoryByDataset(_0x2e6ceb){const _0x27fb9b=a292_0x558f,_0x599923=new Map();for(const _0xc9296a of trackedHookDirectoryMappings(_0x2e6ceb)){const _0x137823=directoryIdentity(_0xc9296a[_0x27fb9b(0x21b)]),_0x525b41=_0x599923['get'](_0x137823)??new Map();_0x525b41['set'](directoryIdentity(_0xc9296a[_0x27fb9b(0x1ff)]),_0xc9296a[_0x27fb9b(0x1ff)]),_0x599923['set'](_0x137823,_0x525b41);}const _0x4b21cd=new Map();for(const [_0x1df9cd,_0x602c6d]of _0x599923){if(_0x602c6d['size']>0x1)throw hookDirectoryError(_0x27fb9b(0x1fb),_0x27fb9b(0x1f6)+_0x1df9cd+_0x27fb9b(0x1fa)+[..._0x602c6d[_0x27fb9b(0x210)]()]['join'](',\x20')+'.',{'datasetCode':_0x1df9cd,'directories':[..._0x602c6d[_0x27fb9b(0x210)]()]});_0x4b21cd['set'](_0x1df9cd,[..._0x602c6d[_0x27fb9b(0x210)]()][0x0]);}return _0x4b21cd;}export function assertUnambiguousHookDirectoryMappings(_0x119d20){const _0x254b07=a292_0x558f,_0x15ac53=new Map();for(const {alias:_0x5897b8,datasetCode:_0x1992e5}of _0x119d20){const _0x5c9ae2=directoryIdentity(_0x5897b8),_0xfd2bc2=_0x15ac53[_0x254b07(0x219)](_0x5c9ae2)??new Set();_0xfd2bc2[_0x254b07(0x1f0)](_0x1992e5),_0x15ac53[_0x254b07(0x214)](_0x5c9ae2,_0xfd2bc2);}for(const [_0x2be03b,_0x511e70]of _0x15ac53){if(_0x511e70['size']>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS',_0x254b07(0x200)+_0x2be03b+_0x254b07(0x21f),{'directoryName':_0x2be03b,'datasetCodes':[..._0x511e70]});}}export function assertUnambiguousHookAliases(_0x32749a){const _0x4789a8=a292_0x558f,_0x593081=[..._0x32749a],_0x233b2e=new Map(),_0x5dd516=new Map();for(const {alias:_0x1d253e,datasetCode:_0x189aff}of _0x593081){const _0x2b014a=directoryIdentity(_0x1d253e),_0x5d9edb=directoryIdentity(_0x189aff),_0x7f35a3=_0x233b2e[_0x4789a8(0x219)](_0x2b014a)??new Set();_0x7f35a3['add'](_0x189aff),_0x233b2e[_0x4789a8(0x214)](_0x2b014a,_0x7f35a3);const _0x4ba6d3=_0x5dd516['get'](_0x5d9edb)??new Set();_0x4ba6d3[_0x4789a8(0x1f0)](_0x1d253e),_0x5dd516[_0x4789a8(0x214)](_0x5d9edb,_0x4ba6d3);}for(const [_0x14238e,_0x255b02]of _0x233b2e){if(_0x255b02['size']>0x1)throw hookDirectoryError(_0x4789a8(0x220),_0x4789a8(0x21e)+_0x14238e+_0x4789a8(0x21f),{'alias':_0x14238e,'datasetCodes':[..._0x255b02]});}for(const [_0x269544,_0x539d09]of _0x5dd516){if(_0x539d09[_0x4789a8(0x1fc)]>0x1)throw hookDirectoryError(_0x4789a8(0x220),_0x4789a8(0x1f6)+_0x269544+_0x4789a8(0x1fd),{'datasetCode':_0x269544,'aliases':[..._0x539d09]});}}export function buildHookDirectoryIndexes(_0x10425a,_0x331904=[]){const _0x1d69fd=a292_0x558f,_0x41584e=[..._0x331904];assertUnambiguousHookDirectoryMappings(_0x41584e[_0x1d69fd(0x1f4)](([_0x49056d,_0x45ddc4])=>({'alias':_0x49056d,'datasetCode':_0x45ddc4})));const _0x523559=new Map(),_0x5467d2=new Map();for(const _0x1cd6f3 of _0x10425a){appendUnique(_0x523559,directoryIdentity(_0x1cd6f3['code']),_0x1cd6f3,_0x5dcb27=>_0x5dcb27[_0x1d69fd(0x216)]);}for(const [_0x45e510,_0x5a62fa]of _0x41584e){appendUnique(_0x5467d2,directoryIdentity(_0x45e510),_0x5a62fa,_0x1adfcf=>_0x1adfcf);}return{'datasetCodeToDatasets':_0x523559,'aliasToDatasetCodes':_0x5467d2};}export function resolvePushHookDirectory(_0x5e21a8,_0x45f770,_0x354636){const _0xbb0d2e=a292_0x558f,_0xf0a996=directoryIdentity(_0x5e21a8),_0x827a25=_0x354636['datasetCodeToDatasets']['get'](_0xf0a996)??[],_0x4d9534=_0x354636[_0xbb0d2e(0x221)][_0xbb0d2e(0x219)](_0xf0a996)??[],_0x39eb8c=new Set([..._0x827a25[_0xbb0d2e(0x1f4)](_0x48b9de=>_0x48b9de[_0xbb0d2e(0x216)]),..._0x4d9534]);if(_0x39eb8c[_0xbb0d2e(0x1fc)]>0x1)throw hookDirectoryError(_0xbb0d2e(0x1ef),_0xbb0d2e(0x200)+_0x5e21a8+_0xbb0d2e(0x208),{'directoryName':_0x5e21a8,'datasetCodes':[..._0x39eb8c]});const _0x23cc73=[..._0x39eb8c][0x0];if(_0x23cc73&&_0x45f770?.['datasetCode']&&_0x23cc73!==_0x45f770[_0xbb0d2e(0x21b)])throw hookDirectoryError(_0xbb0d2e(0x20f),_0xbb0d2e(0x200)+_0x5e21a8+_0xbb0d2e(0x1f3)+_0x45f770['datasetCode']+'\x22\x20to\x20\x22'+_0x23cc73+'\x22.',{'directoryName':_0x5e21a8,'datasetCode':_0x23cc73,'lockedDatasetCode':_0x45f770['datasetCode']});const _0x3cc854=_0x23cc73?findDatasetByCode(_0x354636,_0x23cc73):undefined,_0x56b433=!!_0x23cc73&&_0x4d9534[_0xbb0d2e(0x206)](_0x23cc73);if(_0x3cc854)return{'dataset':_0x3cc854,'datasetCode':_0x3cc854['code'],..._0x56b433?{'alias':_0x5e21a8}:{},'directoryProtocol':_0x56b433?_0xbb0d2e(0x1ff):_0xbb0d2e(0x21b),'warnings':[]};const _0x1d2ae0=_0x45f770?.['datasetCode'];if(_0x1d2ae0){const _0x121991=findDatasetByCode(_0x354636,_0x1d2ae0);if(_0x121991)return{'dataset':_0x121991,'datasetCode':_0x121991[_0xbb0d2e(0x216)],..._0x45f770[_0xbb0d2e(0x1ff)]?{'alias':_0x45f770[_0xbb0d2e(0x1ff)]}:{},'directoryProtocol':_0x45f770[_0xbb0d2e(0x1ff)]?_0xbb0d2e(0x1ff):_0xbb0d2e(0x21b),'warnings':[]};}if(_0x23cc73||_0x1d2ae0){const _0x3fb8b2=_0x23cc73??_0x1d2ae0;throw hookDirectoryError('HOOK_DATASET_NOT_FOUND',_0xbb0d2e(0x200)+_0x5e21a8+_0xbb0d2e(0x209),{'directoryName':_0x5e21a8,'datasetCode':_0x3fb8b2});}throw hookDirectoryError('HOOK_DIRECTORY_UNRESOLVED',_0xbb0d2e(0x1ee)+_0x5e21a8+'\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.',{'directoryName':_0x5e21a8});}export function preflightPushHookDirectories(_0x83342e,_0x46e711,_0x2dc009,_0x5c7e16){const _0x5b295e=a292_0x558f,_0xa9b12=new Map(),_0x36e5a1=new Map();for(const _0x4c7f7e of _0x83342e){if(_0x4c7f7e['type']!==_0x5b295e(0x20d))continue;const _0x4b9a69=_0x4c7f7e['alias'];if(!_0x4b9a69)throw hookDirectoryError(_0x5b295e(0x215),_0x5b295e(0x1f9)+_0x4c7f7e['lockKey'],{'lockKey':_0x4c7f7e[_0x5b295e(0x207)]});let _0x3564c8;try{_0x3564c8=resolvePushHookDirectory(_0x4b9a69,_0x46e711[_0x5b295e(0x205)][_0x4c7f7e[_0x5b295e(0x207)]],_0x2dc009);}catch(_0x24da12){if(_0x5c7e16&&_0x24da12 instanceof CliError&&[_0x5b295e(0x201),_0x5b295e(0x215)]['includes'](_0x24da12[_0x5b295e(0x216)])){_0x5c7e16[_0x5b295e(0x214)](_0x4c7f7e[_0x5b295e(0x207)],_0x24da12[_0x5b295e(0x204)]);continue;}throw _0x24da12;}_0xa9b12[_0x5b295e(0x214)](_0x4c7f7e['lockKey'],_0x3564c8);const _0x12ad15=_0x36e5a1[_0x5b295e(0x219)](_0x3564c8[_0x5b295e(0x21b)])??new Set();_0x12ad15[_0x5b295e(0x1f0)](_0x4b9a69),_0x36e5a1[_0x5b295e(0x214)](_0x3564c8['datasetCode'],_0x12ad15);}for(const [_0x43534b,_0x4f1ece]of _0x36e5a1){if(_0x4f1ece[_0x5b295e(0x1fc)]>0x1)throw hookDirectoryError(_0x5b295e(0x1fb),'Dataset\x20\x22'+_0x43534b+_0x5b295e(0x1fe)+[..._0x4f1ece][_0x5b295e(0x213)](',\x20')+'.',{'datasetCode':_0x43534b,'directories':[..._0x4f1ece]});}return _0xa9b12;}export function hookDirectoryError(_0x5693d5,_0x3bc646,_0x170593){const _0x16329d=new CliError(_0x5693d5,0x2,_0x5693d5+':\x20'+_0x3bc646);return _0x16329d['details']=_0x170593,_0x16329d;}function findDatasetByCode(_0x2e183a,_0x4e2234){const _0x383cc3=a292_0x558f,_0x51bed7=_0x2e183a[_0x383cc3(0x218)][_0x383cc3(0x219)](directoryIdentity(_0x4e2234))??[];if(_0x51bed7[_0x383cc3(0x1ed)]>0x1)throw hookDirectoryError(_0x383cc3(0x20c),_0x383cc3(0x20e)+_0x4e2234+'\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.',{'datasetCode':_0x4e2234,'candidates':_0x51bed7[_0x383cc3(0x1f4)](datasetFact)});return _0x51bed7[0x0];}function directoryIdentity(_0x81dadd){const _0x502d8=a292_0x558f;return _0x81dadd['normalize'](_0x502d8(0x1f7))['toLowerCase']();}function appendUnique(_0x496e1e,_0x6332eb,_0x1ce0af,_0x430ef2){const _0x11a3be=a292_0x558f,_0x2cb68a=_0x496e1e[_0x11a3be(0x219)](_0x6332eb)??[];!_0x2cb68a[_0x11a3be(0x211)](_0x1df70b=>_0x430ef2(_0x1df70b)===_0x430ef2(_0x1ce0af))&&_0x2cb68a[_0x11a3be(0x203)](_0x1ce0af),_0x496e1e[_0x11a3be(0x214)](_0x6332eb,_0x2cb68a);}function datasetFact(_0x26ce26){const _0x49ffb8=a292_0x558f;return{'id':_0x26ce26['id'],'name':_0x26ce26[_0x49ffb8(0x21c)],'datasetCode':_0x26ce26[_0x49ffb8(0x216)]};}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x15353b,_0x5d115a){const _0x10fb05=a293_0x27fc,_0x68e8cd=_0x15353b();while(!![]){try{const _0x2180c0=parseInt(_0x10fb05(0x87))/0x1+parseInt(_0x10fb05(0x9a))/0x2+-parseInt(_0x10fb05(0x8c))/0x3*(parseInt(_0x10fb05(0x96))/0x4)+parseInt(_0x10fb05(0x90))/0x5*(parseInt(_0x10fb05(0x8f))/0x6)+-parseInt(_0x10fb05(0x9b))/0x7+parseInt(_0x10fb05(0x97))/0x8+-parseInt(_0x10fb05(0x91))/0x9*(parseInt(_0x10fb05(0x95))/0xa);if(_0x2180c0===_0x5d115a)break;else _0x68e8cd['push'](_0x68e8cd['shift']());}catch(_0x345fab){_0x68e8cd['push'](_0x68e8cd['shift']());}}}(a293_0x3bbc,0x4509b));import{mkdir,readFile,writeFile}from'node:fs/promises';function a293_0x27fc(_0x43a2b2,_0x19dced){_0x43a2b2=_0x43a2b2-0x86;const _0x3bbc9d=a293_0x3bbc();let _0x27fc20=_0x3bbc9d[_0x43a2b2];return _0x27fc20;}import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}function a293_0x3bbc(){const _0x33dc84=['457731KrIyhB','Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20','scriptsRoot','6YxGjaV','454110ZeKYRj','17577VvQkdC','functions','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','lastSync','1290kDJeGY','8fNFCCC','3174512kKiEPA','ENOENT',':\x20scriptsRoot\x20mismatch\x20—\x20','799414NmPhOx','2608123XkeQAK','code','parse','\x22.\x20','stringify','325116HKKuwu','utf8','object','apps','current\x20\x22'];a293_0x3bbc=function(){return _0x33dc84;};return a293_0x3bbc();}export function ensureLockScope(_0x5aeab3,_0x511d6d,_0x480523,_0x4270a4){const _0x460e8e=a293_0x27fc,_0xe68e5={'apps':_0x5aeab3[_0x460e8e(0x8a)]&&typeof _0x5aeab3[_0x460e8e(0x8a)]===_0x460e8e(0x89)?_0x5aeab3['apps']:{}};let _0x242756=_0xe68e5[_0x460e8e(0x8a)][_0x511d6d];if(!_0x242756)return _0x242756={'scriptsRoot':_0x480523,'lastSync':'','functions':{}},_0xe68e5['apps'][_0x511d6d]=_0x242756,{'lockData':_0xe68e5,'appLock':_0x242756};if(!_0x242756['scriptsRoot'])_0x242756['scriptsRoot']=_0x480523;else{if(_0x242756['scriptsRoot']!==_0x480523)throw new Error(_0x4270a4+_0x460e8e(0x99)+(_0x460e8e(0x8b)+_0x480523+'\x22\x20vs\x20lock\x20\x22'+_0x242756[_0x460e8e(0x8e)]+_0x460e8e(0x9e))+_0x460e8e(0x93));}return!_0x242756[_0x460e8e(0x92)]&&(_0x242756[_0x460e8e(0x92)]={}),!_0x242756[_0x460e8e(0x94)]&&(_0x242756['lastSync']=''),{'lockData':_0xe68e5,'appLock':_0x242756};}export async function readBffLockFile(_0x2e813f){const _0x4ca923=a293_0x27fc;try{const _0x182437=await readFile(_0x2e813f,_0x4ca923(0x88)),_0x10b53f=JSON[_0x4ca923(0x9d)](_0x182437);return{'apps':_0x10b53f[_0x4ca923(0x8a)]&&typeof _0x10b53f[_0x4ca923(0x8a)]===_0x4ca923(0x89)?_0x10b53f[_0x4ca923(0x8a)]:{}};}catch(_0x184dda){if(_0x184dda[_0x4ca923(0x9c)]===_0x4ca923(0x98))return null;throw new Error(_0x4ca923(0x8d)+String(_0x184dda));}}export async function writeBffLockFile(_0x944dbb,_0x3a4ea0){const _0x15d0ae=a293_0x27fc;await mkdir(dirname(_0x944dbb),{'recursive':!![]}),await writeFile(_0x944dbb,JSON[_0x15d0ae(0x86)](_0x3a4ea0,null,0x2),'utf8');}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a295_0x54a4a0=a295_0x3bd7;(function(_0x5e2775,_0x761618){const _0x13ae33=a295_0x3bd7,_0x76bcc7=_0x5e2775();while(!![]){try{const _0x4dccd0=parseInt(_0x13ae33(0xe7))/0x1+parseInt(_0x13ae33(0xe1))/0x2*(-parseInt(_0x13ae33(0xec))/0x3)+-parseInt(_0x13ae33(0xe0))/0x4+-parseInt(_0x13ae33(0xf9))/0x5*(parseInt(_0x13ae33(0xeb))/0x6)+-parseInt(_0x13ae33(0xe9))/0x7*(parseInt(_0x13ae33(0xe3))/0x8)+parseInt(_0x13ae33(0xf6))/0x9+parseInt(_0x13ae33(0xf4))/0xa;if(_0x4dccd0===_0x761618)break;else _0x76bcc7['push'](_0x76bcc7['shift']());}catch(_0x2616d6){_0x76bcc7['push'](_0x76bcc7['shift']());}}}(a295_0x3c58,0x3d26b));export const DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x54a4a0(0xed);const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x54a4a0(0xf2);export function snakeToCamel(_0x48d612){const _0x2b213e=a295_0x54a4a0;return _0x48d612[_0x2b213e(0xf1)]()[_0x2b213e(0xde)](/_([a-z])/g,(_0x4d167d,_0xab0ecd)=>_0xab0ecd[_0x2b213e(0xe5)]());}function a295_0x3bd7(_0x1676b8,_0x13ea51){_0x1676b8=_0x1676b8-0xde;const _0x3c5858=a295_0x3c58();let _0x3bd78f=_0x3c5858[_0x1676b8];return _0x3bd78f;}export function findHookLocationByRemoteId(_0xad6c5,_0x178f91){const _0x3297e5=a295_0x54a4a0;if(!_0x178f91)return undefined;for(const [_0x514f78,_0x1d882d]of Object['entries'](_0xad6c5)){if(_0x1d882d[_0x3297e5(0xe8)]===_0x178f91&&_0x1d882d[_0x3297e5(0xe4)]&&_0x1d882d['operationType']&&_0x1d882d[_0x3297e5(0xf0)]){const _0x2948e6=_0x514f78['split']('/')[0x1];return{'alias':_0x2948e6||_0x1d882d[_0x3297e5(0xe2)],'datasetCode':_0x1d882d[_0x3297e5(0xe4)],'operationType':_0x1d882d[_0x3297e5(0xf3)],'functionNode':_0x1d882d[_0x3297e5(0xf0)]};}}return undefined;}export function extractScriptDescription(_0x42b6ec){const _0x1c99a6=a295_0x54a4a0,_0x1b42cc=_0x42b6ec[_0x1c99a6(0xe6)](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x1b42cc?.[0x1])return undefined;const _0x1eecc3=_0x1b42cc[0x1],_0x5eb5a=_0x55635e=>{const _0x385bdd=_0x1c99a6,_0x1c2f4d=_0x55635e?.[_0x385bdd(0xf7)]();if(!_0x1c2f4d||_0x1c2f4d===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0x1c2f4d===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0x1c2f4d;},_0x307c7f=_0x1eecc3[_0x1c99a6(0xe6)](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x307c7f)return _0x5eb5a(_0x307c7f[0x1]);const _0x7f7490=_0x1eecc3[_0x1c99a6(0xf5)](/\r?\n/)[_0x1c99a6(0xdf)](_0x27b519=>_0x27b519[_0x1c99a6(0xde)](/^\s*\*\s?/,'')[_0x1c99a6(0xf7)]()),_0x53cd0f=_0x7f7490[_0x1c99a6(0xee)](_0x1d389a=>/^\[\s*脚本类型\s*]\s*\S+/['test'](_0x1d389a))&&_0x7f7490[_0x1c99a6(0xee)](_0x1471b9=>/^\[\s*脚本名称\s*]\s*\S+/[_0x1c99a6(0xef)](_0x1471b9));if(!_0x53cd0f)return undefined;for(const _0xde245f of _0x7f7490){if(!_0xde245f||_0xde245f[_0x1c99a6(0xea)]('@')||/^\[[^\]]+]\s*/[_0x1c99a6(0xef)](_0xde245f))continue;return _0x5eb5a(_0xde245f);}return undefined;}export function isValidBffFunctionName(_0x1077a3){const _0x3b59c3=a295_0x54a4a0;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x3b59c3(0xef)](_0x1077a3);}function a295_0x3c58(){const _0x56cd61=['toLowerCase','TODO:\x20add\x20script\x20description','operationType','4641820vpxIGS','split','2606787keseTD','trim','after','401605IhtoMe','before','replace','map','1562020oHWZkn','35688dMECtB','alias','24mBvXSZ','datasetCode','toUpperCase','match','428647nTYpEd','remoteId','597198PvKaDc','startsWith','12mTKNrr','21rUvsnf','TODO:\x20补充脚本功能描述','some','test','functionNode'];a295_0x3c58=function(){return _0x56cd61;};return a295_0x3c58();}export function normalizeHookFunctionNode(_0x28cd2e){const _0x7a055d=a295_0x54a4a0;if(!_0x28cd2e)return undefined;const _0x1db041=_0x28cd2e[_0x7a055d(0xf7)]()['toLowerCase']();if(_0x1db041===_0x7a055d(0xfa)||_0x1db041===_0x7a055d(0xf8))return _0x1db041;return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a296_0x4d5b27=a296_0x78e7;(function(_0x166d29,_0x5b0d56){const _0x525924=a296_0x78e7,_0x40cdf6=_0x166d29();while(!![]){try{const _0xa48a92=parseInt(_0x525924(0x135))/0x1*(-parseInt(_0x525924(0x131))/0x2)+parseInt(_0x525924(0x130))/0x3*(-parseInt(_0x525924(0x13d))/0x4)+-parseInt(_0x525924(0x13a))/0x5*(-parseInt(_0x525924(0x134))/0x6)+-parseInt(_0x525924(0x13b))/0x7*(parseInt(_0x525924(0x139))/0x8)+parseInt(_0x525924(0x12f))/0x9*(-parseInt(_0x525924(0x133))/0xa)+-parseInt(_0x525924(0x13c))/0xb*(-parseInt(_0x525924(0x137))/0xc)+parseInt(_0x525924(0x138))/0xd;if(_0xa48a92===_0x5b0d56)break;else _0x40cdf6['push'](_0x40cdf6['shift']());}catch(_0x16db77){_0x40cdf6['push'](_0x40cdf6['shift']());}}}(a296_0x3ed5,0x2153d));function a296_0x78e7(_0x3120d6,_0x3a9a02){_0x3120d6=_0x3120d6-0x12f;const _0x3ed56d=a296_0x3ed5();let _0x78e7ab=_0x3ed56d[_0x3120d6];return _0x78e7ab;}function a296_0x3ed5(){const _0x1c0534=['879fYZeuF','292RfRULR','/smartapi/db-analysis/cross-db/status','120zrbbHS','6lJTHdN','356nWYddJ','/smartapi/db-analysis/cross-db/start','12hLCqZx','5643404iCWgrw','56haalaO','580685sGobLF','264971JpKatv','129811EWdzTY','520GetqTi','52875LFPgfv'];a296_0x3ed5=function(){return _0x1c0534;};return a296_0x3ed5();}export const CROSS_DB_ANALYSIS_PATHS={'start':a296_0x4d5b27(0x136),'status':a296_0x4d5b27(0x132),'latest':'/smartapi/db-analysis/cross-db/latest-job'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a297_0x2056a9=a297_0x177c;function a297_0x177c(_0x5689ee,_0x52966b){_0x5689ee=_0x5689ee-0x17b;const _0x4a4e57=a297_0x4a4e();let _0x177cbc=_0x4a4e57[_0x5689ee];return _0x177cbc;}(function(_0x363439,_0x2c6dc4){const _0x5990cf=a297_0x177c,_0x4888ca=_0x363439();while(!![]){try{const _0x271c2e=-parseInt(_0x5990cf(0x17b))/0x1+parseInt(_0x5990cf(0x17d))/0x2+parseInt(_0x5990cf(0x184))/0x3*(-parseInt(_0x5990cf(0x185))/0x4)+parseInt(_0x5990cf(0x187))/0x5+-parseInt(_0x5990cf(0x182))/0x6*(parseInt(_0x5990cf(0x183))/0x7)+parseInt(_0x5990cf(0x17f))/0x8+-parseInt(_0x5990cf(0x17c))/0x9;if(_0x271c2e===_0x2c6dc4)break;else _0x4888ca['push'](_0x4888ca['shift']());}catch(_0x850045){_0x4888ca['push'](_0x4888ca['shift']());}}}(a297_0x4a4e,0x52432));export const CROSS_DB_RELATION_PATHS={'list':a297_0x2056a9(0x180),'create':a297_0x2056a9(0x181),'update':a297_0x2056a9(0x186),'delete':a297_0x2056a9(0x17e)};function a297_0x4a4e(){const _0x577a78=['587222QhCStv','/smartapi/cross-db-relation/delete','548448FCWnWR','/smartapi/cross-db-relation/query','/smartapi/cross-db-relation/create','30528kqWTbW','175rRkynk','549711RITXod','4KrjYgO','/smartapi/cross-db-relation/update','2786670CDDoUM','184415icrghU','789327LlSAcj'];a297_0x4a4e=function(){return _0x577a78;};return a297_0x4a4e();}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x692c0,_0x2a8b88){const _0x505f23=a298_0x540a,_0x11a061=_0x692c0();while(!![]){try{const _0x5679b8=parseInt(_0x505f23(0xaa))/0x1*(parseInt(_0x505f23(0xbc))/0x2)+-parseInt(_0x505f23(0xb0))/0x3+parseInt(_0x505f23(0xa4))/0x4+parseInt(_0x505f23(0xb3))/0x5+-parseInt(_0x505f23(0xb8))/0x6*(parseInt(_0x505f23(0xb1))/0x7)+-parseInt(_0x505f23(0xbb))/0x8*(-parseInt(_0x505f23(0xb5))/0x9)+parseInt(_0x505f23(0xb6))/0xa*(-parseInt(_0x505f23(0xae))/0xb);if(_0x5679b8===_0x2a8b88)break;else _0x11a061['push'](_0x11a061['shift']());}catch(_0x389ebb){_0x11a061['push'](_0x11a061['shift']());}}}(a298_0x4a0e,0xcbe0f));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x4edf07){const _0x4ec441=a298_0x540a;if(cache[_0x4ec441(0xa3)](_0x4edf07))return cache[_0x4ec441(0x9d)](_0x4edf07);const _0x20a5d5=await listDatasets(_0x4edf07),_0x550b79=new Map();for(const _0x5ddf3d of _0x20a5d5){const _0x2a9d94=_0x5ddf3d['dbtableConfig'];_0x2a9d94?.['dbId']!=null&&_0x550b79['set'](_0x2a9d94[_0x4ec441(0xb4)],_0x2a9d94['dbName']??'db-'+_0x2a9d94[_0x4ec441(0xb4)]);}const _0x2a1a0b=[..._0x550b79[_0x4ec441(0xb9)]()][_0x4ec441(0xa7)](([_0x5a0ea6,_0x44634f])=>({'dbId':_0x5a0ea6,'dbName':_0x44634f}));return cache[_0x4ec441(0x9c)](_0x4edf07,_0x2a1a0b),_0x2a1a0b;}export async function resolveDb(_0x5d3ba5,_0x36a931){const _0x3dfbb2=a298_0x540a,_0x2edfac=await listDatabases(_0x5d3ba5);if(_0x2edfac[_0x3dfbb2(0xba)]===0x0)return{'resolved':[],'error':_0x3dfbb2(0xad)+_0x5d3ba5+'\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.'};if(!_0x36a931)return{'resolved':_0x2edfac};const _0x165d08=Number(_0x36a931);if(!Number[_0x3dfbb2(0xa6)](_0x165d08)){const _0x2e916e=_0x2edfac[_0x3dfbb2(0xac)](_0x3b7535=>_0x3b7535[_0x3dfbb2(0xb4)]===_0x165d08);if(_0x2e916e)return{'resolved':[_0x2e916e]};}const _0x6f6bb0=_0x36a931['toLowerCase'](),_0x111fbd=_0x2edfac[_0x3dfbb2(0xa5)](_0x14910a=>_0x14910a['dbName'][_0x3dfbb2(0xa9)]()[_0x3dfbb2(0xb7)](_0x6f6bb0));if(_0x111fbd[_0x3dfbb2(0xba)]>0x0)return{'resolved':_0x111fbd};const _0x1fe593=_0x2edfac[_0x3dfbb2(0xa7)](_0x3d894b=>_0x3d894b[_0x3dfbb2(0xab)]+'\x20('+_0x3d894b[_0x3dfbb2(0xb4)]+')')['join'](',\x20');return{'resolved':[],'error':_0x3dfbb2(0xaf)+_0x36a931+_0x3dfbb2(0xa2)+_0x5d3ba5+_0x3dfbb2(0x9f)+_0x1fe593+_0x3dfbb2(0x9e)};}function a298_0x540a(_0x15a4fd,_0x433ba4){_0x15a4fd=_0x15a4fd-0x9c;const _0x4a0e18=a298_0x4a0e();let _0x540a5b=_0x4a0e18[_0x15a4fd];return _0x540a5b;}export async function resolveOneDb(_0x483329,_0x3a33af){const _0x100e68=a298_0x540a,{resolved:_0x4f9d39,error:_0xc75e04}=await resolveDb(_0x483329,_0x3a33af);if(_0xc75e04)return{'db':null,'error':_0xc75e04};if(_0x4f9d39[_0x100e68(0xba)]===0x1)return{'db':_0x4f9d39[0x0]};if(!_0x3a33af){const _0x39c98a=_0x4f9d39[_0x100e68(0xa7)](_0x565473=>_0x565473[_0x100e68(0xab)]+'\x20('+_0x565473[_0x100e68(0xb4)]+')')[_0x100e68(0xa8)](',\x20');return{'db':null,'error':_0x100e68(0xb2)+_0x39c98a};}const _0x1dad86=_0x4f9d39[_0x100e68(0xa7)](_0x1745fe=>_0x1745fe[_0x100e68(0xab)]+'\x20('+_0x1745fe[_0x100e68(0xb4)]+')')['join'](',\x20');return{'db':null,'error':'\x22'+_0x3a33af+_0x100e68(0xa0)+_0x1dad86+_0x100e68(0xa1)};}export async function getDbName(_0x53862e,_0x587391){const _0x124bdd=a298_0x540a,_0x4f418a=await listDatabases(_0x53862e);return _0x4f418a[_0x124bdd(0xac)](_0x4ebda9=>_0x4ebda9[_0x124bdd(0xb4)]===_0x587391)?.[_0x124bdd(0xab)];}function a298_0x4a0e(){const _0x434746=['.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','\x22.\x20Available:\x20','\x22\x20matches\x20multiple\x20databases:\x20','.\x20Be\x20more\x20specific.','\x22\x20under\x20app\x20\x22','has','3376128dBtjgL','filter','isNaN','map','join','toLowerCase','1039211BirRgL','dbName','find','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','6852791wRLJgV','No\x20database\x20matching\x20\x22','569340CWdBtt','91JuCuxz','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','341545BifnAx','dbId','36rgCnBa','20kkUrpr','includes','337074EnvEQS','entries','length','2099208EOuXry','2vcsdYB','set','get'];a298_0x4a0e=function(){return _0x434746;};return a298_0x4a0e();}
|