@lovrabet/rabetbase-cli 2.5.4-beta.3 → 2.5.4-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- 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.d.ts +2 -0
- package/lib/commands/app/detail.js +1 -0
- 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/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/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/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.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.d.ts +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +3 -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.d.ts +2 -0
- package/lib/commands/menu/shared/path.js +1 -0
- package/lib/commands/menu/shared/service.d.ts +6 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.d.ts +28 -0
- package/lib/commands/menu/shared/subapp-assets.js +1 -0
- package/lib/commands/menu/shared/sync-core.d.ts +2 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +14 -4
- 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.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-status.js +1 -0
- package/lib/commands/menu/subapp-assets-update.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-update.js +1 -0
- 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.d.ts +16 -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-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-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/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 +22 -13
- package/skills/rabetbase/guides/backend-function.md +2 -7
- package/skills/rabetbase/guides/bff-creation-workflow.md +24 -23
- package/skills/rabetbase/guides/host-frontend-integration.md +62 -0
- package/skills/rabetbase/guides/independent-deployment.md +45 -0
- package/skills/rabetbase/guides/troubleshooting.md +9 -1
- package/skills/rabetbase/references/rabetbase-app-detail.md +31 -0
- package/skills/rabetbase/references/rabetbase-bff-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-push.md +2 -2
- package/skills/rabetbase/references/rabetbase-data-list-status.md +1 -0
- package/skills/rabetbase/references/rabetbase-deployment-sync-all.md +5 -1
- package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -7
- package/skills/rabetbase/references/rabetbase-menu-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-status.md +19 -0
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-update.md +27 -0
- package/skills/rabetbase/references/rabetbase-menu-sync.md +40 -14
- package/skills/rabetbase/references/rabetbase-page-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-generate-start.md +5 -3
- package/skills/rabetbase/references/rabetbase-page-generate-status.md +1 -0
- package/skills/rabetbase/references/rabetbase-user-account.md +8 -8
- package/skills/rabetbase.manifest.json +8 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a279_0x181d2d=a279_0x4b0f;(function(_0x2cd6b6,_0x26581f){const _0x423d38=a279_0x4b0f,_0x4fae88=_0x2cd6b6();while(!![]){try{const _0x3a418c=-parseInt(_0x423d38(0x1f2))/0x1*(-parseInt(_0x423d38(0x1e8))/0x2)+-parseInt(_0x423d38(0x1e9))/0x3*(parseInt(_0x423d38(0x1fa))/0x4)+-parseInt(_0x423d38(0x209))/0x5+parseInt(_0x423d38(0x1fd))/0x6+-parseInt(_0x423d38(0x1ec))/0x7+parseInt(_0x423d38(0x1ed))/0x8*(parseInt(_0x423d38(0x205))/0x9)+-parseInt(_0x423d38(0x204))/0xa*(-parseInt(_0x423d38(0x1f1))/0xb);if(_0x3a418c===_0x26581f)break;else _0x4fae88['push'](_0x4fae88['shift']());}catch(_0x7937a5){_0x4fae88['push'](_0x4fae88['shift']());}}}(a279_0x3ad6,0x8aeb3));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';function a279_0x3ad6(){const _0x5a09ef=['split','name','2670072wawLlK','HOOK','.js','before','beforeScriptId','afterScriptId','includes','10WevLSF','99bITLjI','replace','push','Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20','472780ItdkLf','isFile','ENOENT','every','test','datasetCode','operationType','toUpperCase','functionName','1770HaMBmB','114DsjgkT','endsWith','scriptsRootDir','2209032sWEllP','259152uQqoWd','COMMON','functionNode','isDirectory','6196256kkUVKB','191TnWDqn','set','toLowerCase','ENDPOINT','all','code','map','Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20','58372TqBwTh'];a279_0x3ad6=function(){return _0x5a09ef;};return a279_0x3ad6();}import{dirname,join,resolve,sep}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';function a279_0x4b0f(_0x52cbff,_0xd0c5b2){_0x52cbff=_0x52cbff-0x1e8;const _0x3ad63b=a279_0x3ad6();let _0x4b0fb7=_0x3ad63b[_0x52cbff];return _0x4b0fb7;}export const SUPPORTED_BFF_TYPES=['COMMON',a279_0x181d2d(0x1f5),a279_0x181d2d(0x1fe)];export function normalizeBffType(_0xdefce0){const _0x3fa396=a279_0x181d2d;if(!_0xdefce0)return undefined;const _0x5235b9=_0xdefce0['trim']()[_0x3fa396(0x210)]();return SUPPORTED_BFF_TYPES[_0x3fa396(0x203)](_0x5235b9)?_0x5235b9:undefined;}async function scanJsFilesRecursively(_0x42856c,_0x3ef762){const _0x34f21c=a279_0x181d2d,_0x34cd78=[];try{const _0x3cbb1f=await readdir(_0x42856c,{'withFileTypes':!![]});for(const _0x28d5d1 of _0x3cbb1f){const _0x55f397=join(_0x42856c,_0x28d5d1['name']);if(_0x28d5d1[_0x34f21c(0x1f0)]())_0x34cd78['push'](...await scanJsFilesRecursively(_0x55f397,_0x3ef762+'/'+_0x28d5d1['name']));else _0x28d5d1[_0x34f21c(0x20a)]()&&_0x28d5d1[_0x34f21c(0x1fc)][_0x34f21c(0x1ea)](_0x34f21c(0x1ff))&&_0x34cd78[_0x34f21c(0x207)]({'lockKey':_0x3ef762+'/'+_0x28d5d1[_0x34f21c(0x1fc)][_0x34f21c(0x206)](/\.js$/,''),'filePath':_0x55f397});}}catch(_0x5317a2){if(_0x5317a2[_0x34f21c(0x1f7)]!==_0x34f21c(0x20b))throw _0x5317a2;}return _0x34cd78;}async function scanFlatFunctions(_0xacdb27,_0x50557f){const _0x162bed=a279_0x181d2d,_0x278e93=join(_0xacdb27[_0x162bed(0x1eb)],_0x50557f),_0x3bc932=await scanJsFilesRecursively(_0x278e93,_0x50557f);return _0x3bc932[_0x162bed(0x1f8)](({lockKey:_0x446da5,filePath:_0x5d3f59})=>({'type':_0x50557f,'name':_0x446da5[_0x162bed(0x1fb)]('/')['at'](-0x1)??'','filePath':_0x5d3f59,'lockKey':_0x446da5}));}async function scanHookFunctions(_0x59e7cf){const _0x4394b8=a279_0x181d2d,_0x288bfe=join(_0x59e7cf['scriptsRootDir'],_0x4394b8(0x1fe)),_0x2e392a=[];try{const _0x298e23=await readdir(_0x288bfe,{'withFileTypes':!![]});for(const _0x4e0b7a of _0x298e23){if(!_0x4e0b7a[_0x4394b8(0x1f0)]())continue;const _0x29ab1f=_0x4e0b7a['name'],_0x540508=join(_0x288bfe,_0x29ab1f),_0x1f0100=await readdir(_0x540508,{'withFileTypes':!![]});for(const _0x4c5d35 of _0x1f0100){if(!_0x4c5d35['isDirectory']())continue;const _0x50feb0=_0x4c5d35[_0x4394b8(0x1fc)],_0x1202c6=join(_0x540508,_0x50feb0),_0x1b12b0=await readdir(_0x1202c6,{'withFileTypes':!![]});for(const _0x3b4c4f of _0x1b12b0){if(!_0x3b4c4f[_0x4394b8(0x1f0)]())continue;const _0x5e0a56=_0x3b4c4f[_0x4394b8(0x1fc)],_0x317b7a=join(_0x1202c6,_0x5e0a56),_0x32b63c=await readdir(_0x317b7a,{'withFileTypes':!![]});for(const _0x47c802 of _0x32b63c){if(!_0x47c802['isFile']()||!_0x47c802['name']['endsWith']('.js'))continue;const _0x3c7afe=_0x47c802[_0x4394b8(0x1fc)][_0x4394b8(0x206)](/\.js$/,'');_0x2e392a[_0x4394b8(0x207)]({'type':_0x4394b8(0x1fe),'name':_0x3c7afe,'filePath':join(_0x317b7a,_0x47c802[_0x4394b8(0x1fc)]),'lockKey':'HOOK/'+_0x29ab1f+'/'+_0x50feb0+'/'+_0x5e0a56+'/'+_0x3c7afe,'alias':_0x29ab1f,'operationType':_0x50feb0,'functionNode':_0x5e0a56});}}}}}catch(_0x106d0e){if(_0x106d0e['code']!==_0x4394b8(0x20b))throw _0x106d0e;}return _0x2e392a;}export async function scanLocalBffFunctions(_0x153a7d,_0x5224b6){const _0x5544e3=a279_0x181d2d;if(_0x5224b6===_0x5544e3(0x1ee)||_0x5224b6===_0x5544e3(0x1f5))return scanFlatFunctions(_0x153a7d,_0x5224b6);if(_0x5224b6===_0x5544e3(0x1fe))return scanHookFunctions(_0x153a7d);const [_0x30f988,_0x4a6774,_0x10a32c]=await Promise[_0x5544e3(0x1f6)]([scanFlatFunctions(_0x153a7d,_0x5544e3(0x1ee)),scanFlatFunctions(_0x153a7d,'ENDPOINT'),scanHookFunctions(_0x153a7d)]);return[..._0x30f988,..._0x4a6774,..._0x10a32c];}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x66487c){const _0xb3b669=a279_0x181d2d;return SAFE_LOCK_KEY_SEGMENT[_0xb3b669(0x20d)](_0x66487c)&&_0x66487c!=='.'&&_0x66487c!=='..';}export function resolveLocalFilePathFromLockKey(_0x3a239f,_0x244c6e){const _0x521047=a279_0x181d2d,_0x375f2b=_0x244c6e['split']('/');if(!_0x375f2b[_0x521047(0x20c)](isSafeLockKeySegment))throw new Error(_0x521047(0x208)+_0x244c6e);const _0x55a30c=resolve(join(_0x3a239f[_0x521047(0x1eb)],..._0x375f2b)+_0x521047(0x1ff)),_0x2f7c31=resolve(_0x3a239f[_0x521047(0x1eb)]);if(_0x55a30c!==_0x2f7c31&&!_0x55a30c['startsWith'](_0x2f7c31+sep))throw new Error(_0x521047(0x1f9)+_0x55a30c);return _0x55a30c;}export function createHookLocationMap(_0x4688c2){const _0x529ebb=a279_0x181d2d,_0x5d6b85=new Map();for(const _0xb7afd2 of _0x4688c2){_0xb7afd2[_0x529ebb(0x201)]&&_0x5d6b85[_0x529ebb(0x1f3)](_0xb7afd2['beforeScriptId'],{'datasetCode':_0xb7afd2[_0x529ebb(0x20e)],'operationType':snakeToCamel(_0xb7afd2['operationType']),'functionNode':_0x529ebb(0x200)}),_0xb7afd2[_0x529ebb(0x202)]&&_0x5d6b85['set'](_0xb7afd2['afterScriptId'],{'datasetCode':_0xb7afd2['datasetCode'],'operationType':snakeToCamel(_0xb7afd2[_0x529ebb(0x20f)]),'functionNode':'after'});}return _0x5d6b85;}export function resolveRemoteScriptTarget(_0x17ebc2,_0x41ceac,_0x55522f,_0x316201,_0x521193){const _0x4e65df=a279_0x181d2d,_0x3518ad=normalizeBffType(_0x41ceac['scriptType']);if(!_0x3518ad||!_0x41ceac['functionName'])return null;if(_0x3518ad===_0x4e65df(0x1fe)){const _0x2a5004=_0x41ceac['id']?_0x55522f['get'](_0x41ceac['id']):undefined,_0xb96ee0=findHookLocationByRemoteId(_0x316201,_0x41ceac['id']),_0x4d1232=_0x2a5004?{..._0xb96ee0?.[_0x4e65df(0x20e)]===_0x2a5004[_0x4e65df(0x20e)]?_0xb96ee0:{},..._0x2a5004}:_0xb96ee0;if(!_0x4d1232)return null;const _0x398e49=_0x521193['get'](_0x4d1232[_0x4e65df(0x20e)][_0x4e65df(0x1f4)]()),_0x51bde8=_0x398e49??_0x4d1232[_0x4e65df(0x20e)],_0x341c1e={..._0x4d1232,'alias':_0x398e49},_0x5e111c='HOOK/'+_0x51bde8+'/'+_0x341c1e[_0x4e65df(0x20f)]+'/'+_0x341c1e[_0x4e65df(0x1ef)]+'/'+_0x41ceac[_0x4e65df(0x211)];if(!_0x5e111c[_0x4e65df(0x1fb)]('/')[_0x4e65df(0x20c)](isSafeLockKeySegment))return null;return{'lockKey':_0x5e111c,'filePath':resolveLocalFilePathFromLockKey(_0x17ebc2,_0x5e111c),'type':_0x4e65df(0x1fe),'hookLocation':_0x341c1e};}const _0x1e30cf=_0x3518ad+'/'+_0x41ceac[_0x4e65df(0x211)];if(!_0x1e30cf[_0x4e65df(0x1fb)]('/')['every'](isSafeLockKeySegment))return null;return{'lockKey':_0x1e30cf,'filePath':resolveLocalFilePathFromLockKey(_0x17ebc2,_0x1e30cf),'type':_0x3518ad};}export async function ensureParentDirectory(_0x5b7ba2){await mkdir(dirname(_0x5b7ba2),{'recursive':!![]});}export async function fileExists(_0x3fd4fa){try{return await access(_0x3fd4fa,constants['F_OK']),!![];}catch{return![];}}export async function directoryExists(_0x3f5a59){const _0xe59ea2=a279_0x181d2d;try{const _0x4aea34=await stat(_0x3f5a59);return _0x4aea34[_0xe59ea2(0x1f0)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x41de6a,_0x5228e6){const _0x78e1dc=a280_0x32dc,_0x3ec882=_0x41de6a();while(!![]){try{const _0x50241e=-parseInt(_0x78e1dc(0xd9))/0x1*(-parseInt(_0x78e1dc(0xd7))/0x2)+-parseInt(_0x78e1dc(0xd4))/0x3+-parseInt(_0x78e1dc(0xd8))/0x4*(parseInt(_0x78e1dc(0xcd))/0x5)+-parseInt(_0x78e1dc(0xd5))/0x6*(parseInt(_0x78e1dc(0xd0))/0x7)+parseInt(_0x78e1dc(0xce))/0x8+parseInt(_0x78e1dc(0xd2))/0x9+-parseInt(_0x78e1dc(0xd6))/0xa*(-parseInt(_0x78e1dc(0xda))/0xb);if(_0x50241e===_0x5228e6)break;else _0x3ec882['push'](_0x3ec882['shift']());}catch(_0x49c1d2){_0x3ec882['push'](_0x3ec882['shift']());}}}(a280_0x487c,0x3fb8b));import{readFile}from'node:fs/promises';import a280_0x19faf1 from'node:crypto';export function computeContentHash(_0x24965c){const _0x90c4f4=a280_0x32dc;return a280_0x19faf1[_0x90c4f4(0xcf)](_0x90c4f4(0xd3))[_0x90c4f4(0xd1)](_0x24965c)['digest']('hex');}function a280_0x32dc(_0x5a47b1,_0x4845e6){_0x5a47b1=_0x5a47b1-0xcd;const _0x487cb3=a280_0x487c();let _0x32dc8a=_0x487cb3[_0x5a47b1];return _0x32dc8a;}export async function computeFileHash(_0x400340){const _0x4fbf38=await readFile(_0x400340,'utf8');return computeContentHash(_0x4fbf38);}function a280_0x487c(){const _0x34388b=['42iqFiWI','update','1071828SrZhGr','md5','1238370RhWDwe','84792yXMwWe','2086970FHeTvR','2XwfigO','378748BbtGiI','108367MRYUOR','33OyIEto','15XOQTlq','1512768UOrdPR','createHash'];a280_0x487c=function(){return _0x34388b;};return a280_0x487c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1050d7,_0x30822f){const _0x23a1a2=a276_0x47f9,_0x141d54=_0x1050d7();while(!![]){try{const _0x32601b=parseInt(_0x23a1a2(0x12c))/0x1*(-parseInt(_0x23a1a2(0x156))/0x2)+parseInt(_0x23a1a2(0x13d))/0x3*(parseInt(_0x23a1a2(0x139))/0x4)+parseInt(_0x23a1a2(0x150))/0x5*(-parseInt(_0x23a1a2(0x13a))/0x6)+-parseInt(_0x23a1a2(0x13c))/0x7+-parseInt(_0x23a1a2(0x132))/0x8*(parseInt(_0x23a1a2(0x128))/0x9)+-parseInt(_0x23a1a2(0x154))/0xa*(-parseInt(_0x23a1a2(0x135))/0xb)+parseInt(_0x23a1a2(0x14a))/0xc;if(_0x32601b===_0x30822f)break;else _0x141d54['push'](_0x141d54['shift']());}catch(_0x1dc83b){_0x141d54['push'](_0x141d54['shift']());}}}(a276_0x4a04,0xd7283));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x5f4e04){const _0x445ec9=a276_0x47f9,_0x292fb2=[];for(const [_0x592900,_0x1e49f7]of Object['entries'](_0x5f4e04['functions'])){const [_0x4295be,_0x4c6e08]=_0x592900[_0x445ec9(0x131)]('/');if(_0x4295be!==_0x445ec9(0x14d)||!_0x4c6e08||!_0x1e49f7[_0x445ec9(0x143)])continue;_0x292fb2[_0x445ec9(0x134)]({'alias':_0x4c6e08,'datasetCode':_0x1e49f7[_0x445ec9(0x143)]});}return _0x292fb2;}export function uniqueTrackedHookDirectoryByDataset(_0x1acb1d){const _0x28cf34=a276_0x47f9,_0x1efac1=new Map();for(const _0x22a5cb of trackedHookDirectoryMappings(_0x1acb1d)){const _0x2d4df6=directoryIdentity(_0x22a5cb['datasetCode']),_0xe2f172=_0x1efac1[_0x28cf34(0x12b)](_0x2d4df6)??new Map();_0xe2f172[_0x28cf34(0x141)](directoryIdentity(_0x22a5cb[_0x28cf34(0x13f)]),_0x22a5cb[_0x28cf34(0x13f)]),_0x1efac1[_0x28cf34(0x141)](_0x2d4df6,_0xe2f172);}const _0x3a1c08=new Map();for(const [_0x5184ac,_0x3343c6]of _0x1efac1){if(_0x3343c6[_0x28cf34(0x148)]>0x1)throw hookDirectoryError(_0x28cf34(0x130),'Dataset\x20\x22'+_0x5184ac+'\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20'+[..._0x3343c6[_0x28cf34(0x12a)]()][_0x28cf34(0x14c)](',\x20')+'.',{'datasetCode':_0x5184ac,'directories':[..._0x3343c6[_0x28cf34(0x12a)]()]});_0x3a1c08['set'](_0x5184ac,[..._0x3343c6['values']()][0x0]);}return _0x3a1c08;}export function assertUnambiguousHookDirectoryMappings(_0x3c2541){const _0x16f12d=a276_0x47f9,_0x3b55d4=new Map();for(const {alias:_0x59ae2e,datasetCode:_0x3f3691}of _0x3c2541){const _0x282858=directoryIdentity(_0x59ae2e),_0x3c7743=_0x3b55d4[_0x16f12d(0x12b)](_0x282858)??new Set();_0x3c7743['add'](_0x3f3691),_0x3b55d4[_0x16f12d(0x141)](_0x282858,_0x3c7743);}for(const [_0x1ed8eb,_0x115032]of _0x3b55d4){if(_0x115032[_0x16f12d(0x148)]>0x1)throw hookDirectoryError(_0x16f12d(0x142),_0x16f12d(0x153)+_0x1ed8eb+_0x16f12d(0x14f),{'directoryName':_0x1ed8eb,'datasetCodes':[..._0x115032]});}}export function assertUnambiguousHookAliases(_0x1bf918){const _0x3512a5=a276_0x47f9,_0xb2b3f3=[..._0x1bf918],_0x599ffd=new Map(),_0x1d5d5c=new Map();for(const {alias:_0x51d0c9,datasetCode:_0x4a7ce6}of _0xb2b3f3){const _0x489eee=directoryIdentity(_0x51d0c9),_0x18fc19=directoryIdentity(_0x4a7ce6),_0x8f05c0=_0x599ffd[_0x3512a5(0x12b)](_0x489eee)??new Set();_0x8f05c0[_0x3512a5(0x136)](_0x4a7ce6),_0x599ffd[_0x3512a5(0x141)](_0x489eee,_0x8f05c0);const _0x2b2269=_0x1d5d5c['get'](_0x18fc19)??new Set();_0x2b2269[_0x3512a5(0x136)](_0x51d0c9),_0x1d5d5c['set'](_0x18fc19,_0x2b2269);}for(const [_0x28598,_0x52cd08]of _0x599ffd){if(_0x52cd08[_0x3512a5(0x148)]>0x1)throw hookDirectoryError(_0x3512a5(0x138),'SDK\x20alias\x20\x22'+_0x28598+_0x3512a5(0x14f),{'alias':_0x28598,'datasetCodes':[..._0x52cd08]});}for(const [_0x5dd049,_0x396459]of _0x1d5d5c){if(_0x396459[_0x3512a5(0x148)]>0x1)throw hookDirectoryError(_0x3512a5(0x138),_0x3512a5(0x149)+_0x5dd049+'\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.',{'datasetCode':_0x5dd049,'aliases':[..._0x396459]});}}export function buildHookDirectoryIndexes(_0x1f9e48,_0x5cab36=[]){const _0xa3e14f=a276_0x47f9,_0x55d401=[..._0x5cab36];assertUnambiguousHookDirectoryMappings(_0x55d401[_0xa3e14f(0x155)](([_0x1ba8f8,_0x417d0d])=>({'alias':_0x1ba8f8,'datasetCode':_0x417d0d})));const _0x18ab3d=new Map(),_0x30ae84=new Map();for(const _0x1d459a of _0x1f9e48){appendUnique(_0x18ab3d,directoryIdentity(_0x1d459a[_0xa3e14f(0x13e)]),_0x1d459a,_0x48d38e=>_0x48d38e[_0xa3e14f(0x13e)]);}for(const [_0x310015,_0x40863a]of _0x55d401){appendUnique(_0x30ae84,directoryIdentity(_0x310015),_0x40863a,_0x4ebf51=>_0x4ebf51);}return{'datasetCodeToDatasets':_0x18ab3d,'aliasToDatasetCodes':_0x30ae84};}export function resolvePushHookDirectory(_0x21626e,_0x3d52b7,_0x1d77a3){const _0x1dbf7e=a276_0x47f9,_0x297391=directoryIdentity(_0x21626e),_0x3c4c35=_0x1d77a3[_0x1dbf7e(0x125)][_0x1dbf7e(0x12b)](_0x297391)??[],_0x3ad416=_0x1d77a3[_0x1dbf7e(0x129)]['get'](_0x297391)??[],_0xb5d5ac=new Set([..._0x3c4c35[_0x1dbf7e(0x155)](_0x1d090c=>_0x1d090c[_0x1dbf7e(0x13e)]),..._0x3ad416]);if(_0xb5d5ac[_0x1dbf7e(0x148)]>0x1)throw hookDirectoryError(_0x1dbf7e(0x142),_0x1dbf7e(0x153)+_0x21626e+'\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.',{'directoryName':_0x21626e,'datasetCodes':[..._0xb5d5ac]});const _0x361ed2=[..._0xb5d5ac][0x0];if(_0x361ed2&&_0x3d52b7?.[_0x1dbf7e(0x143)]&&_0x361ed2!==_0x3d52b7[_0x1dbf7e(0x143)])throw hookDirectoryError(_0x1dbf7e(0x133),'HOOK\x20directory\x20\x22'+_0x21626e+'\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22'+_0x3d52b7[_0x1dbf7e(0x143)]+_0x1dbf7e(0x144)+_0x361ed2+'\x22.',{'directoryName':_0x21626e,'datasetCode':_0x361ed2,'lockedDatasetCode':_0x3d52b7['datasetCode']});const _0x527ae1=_0x361ed2?findDatasetByCode(_0x1d77a3,_0x361ed2):undefined,_0xd40674=!!_0x361ed2&&_0x3ad416[_0x1dbf7e(0x12f)](_0x361ed2);if(_0x527ae1)return{'dataset':_0x527ae1,'datasetCode':_0x527ae1[_0x1dbf7e(0x13e)],..._0xd40674?{'alias':_0x21626e}:{},'directoryProtocol':_0xd40674?_0x1dbf7e(0x13f):_0x1dbf7e(0x143),'warnings':[]};const _0x266945=_0x3d52b7?.['datasetCode'];if(_0x266945){const _0x2bb964=findDatasetByCode(_0x1d77a3,_0x266945);if(_0x2bb964)return{'dataset':_0x2bb964,'datasetCode':_0x2bb964[_0x1dbf7e(0x13e)],..._0x3d52b7[_0x1dbf7e(0x13f)]?{'alias':_0x3d52b7[_0x1dbf7e(0x13f)]}:{},'directoryProtocol':_0x3d52b7['alias']?'alias':_0x1dbf7e(0x143),'warnings':[]};}if(_0x361ed2||_0x266945){const _0x37069c=_0x361ed2??_0x266945;throw hookDirectoryError(_0x1dbf7e(0x137),_0x1dbf7e(0x153)+_0x21626e+_0x1dbf7e(0x126),{'directoryName':_0x21626e,'datasetCode':_0x37069c});}throw hookDirectoryError(_0x1dbf7e(0x146),'Cannot\x20resolve\x20HOOK\x20directory\x20\x22'+_0x21626e+_0x1dbf7e(0x13b),{'directoryName':_0x21626e});}export function preflightPushHookDirectories(_0xedb49f,_0x45c013,_0x49aea5,_0x242e58){const _0x1387d8=a276_0x47f9,_0x36e865=new Map(),_0x2edd2e=new Map();for(const _0x1efce2 of _0xedb49f){if(_0x1efce2['type']!==_0x1387d8(0x14d))continue;const _0x59ffaa=_0x1efce2[_0x1387d8(0x13f)];if(!_0x59ffaa)throw hookDirectoryError('HOOK_DIRECTORY_UNRESOLVED',_0x1387d8(0x14e)+_0x1efce2[_0x1387d8(0x145)],{'lockKey':_0x1efce2[_0x1387d8(0x145)]});let _0x12a1bf;try{_0x12a1bf=resolvePushHookDirectory(_0x59ffaa,_0x45c013['functions'][_0x1efce2[_0x1387d8(0x145)]],_0x49aea5);}catch(_0x1e7bca){if(_0x242e58&&_0x1e7bca instanceof CliError&&[_0x1387d8(0x137),_0x1387d8(0x146)][_0x1387d8(0x12f)](_0x1e7bca[_0x1387d8(0x13e)])){_0x242e58['set'](_0x1efce2[_0x1387d8(0x145)],_0x1e7bca['message']);continue;}throw _0x1e7bca;}_0x36e865['set'](_0x1efce2[_0x1387d8(0x145)],_0x12a1bf);const _0x5eef83=_0x2edd2e[_0x1387d8(0x12b)](_0x12a1bf['datasetCode'])??new Set();_0x5eef83[_0x1387d8(0x136)](_0x59ffaa),_0x2edd2e[_0x1387d8(0x141)](_0x12a1bf[_0x1387d8(0x143)],_0x5eef83);}for(const [_0x16c577,_0x36a485]of _0x2edd2e){if(_0x36a485[_0x1387d8(0x148)]>0x1)throw hookDirectoryError(_0x1387d8(0x130),_0x1387d8(0x149)+_0x16c577+'\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20'+[..._0x36a485][_0x1387d8(0x14c)](',\x20')+'.',{'datasetCode':_0x16c577,'directories':[..._0x36a485]});}return _0x36e865;}export function hookDirectoryError(_0x146d41,_0x41993d,_0x108f9b){const _0x3446b7=a276_0x47f9,_0x22c82d=new CliError(_0x146d41,0x2,_0x146d41+':\x20'+_0x41993d);return _0x22c82d[_0x3446b7(0x12e)]=_0x108f9b,_0x22c82d;}function findDatasetByCode(_0x4aee84,_0x5518af){const _0x3df98b=a276_0x47f9,_0x55d1e7=_0x4aee84[_0x3df98b(0x125)][_0x3df98b(0x12b)](directoryIdentity(_0x5518af))??[];if(_0x55d1e7[_0x3df98b(0x140)]>0x1)throw hookDirectoryError(_0x3df98b(0x127),'Dataset\x20code\x20\x22'+_0x5518af+_0x3df98b(0x152),{'datasetCode':_0x5518af,'candidates':_0x55d1e7['map'](datasetFact)});return _0x55d1e7[0x0];}function a276_0x47f9(_0x4bb511,_0x4e1a5f){_0x4bb511=_0x4bb511-0x125;const _0x4a04f7=a276_0x4a04();let _0x47f978=_0x4a04f7[_0x4bb511];return _0x47f978;}function a276_0x4a04(){const _0x423947=['\x22\x20to\x20\x22','lockKey','HOOK_DIRECTORY_UNRESOLVED','normalize','size','Dataset\x20\x22','60258852AxiShS','some','join','HOOK','Incomplete\x20HOOK\x20path:\x20','\x22\x20resolves\x20to\x20multiple\x20Datasets.','5252620NvRFlx','name','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','HOOK\x20directory\x20\x22','10WPNCoG','map','12626qFoWtP','datasetCodeToDatasets','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','HOOK_DATASET_CODE_AMBIGUOUS','9lErGrk','aliasToDatasetCodes','values','get','89hNnvBs','toLowerCase','details','includes','HOOK_DUPLICATE_DIRECTORIES','split','10124328XlBHhT','HOOK_MAPPING_DRIFT','push','4126903jKoKTl','add','HOOK_DATASET_NOT_FOUND','HOOK_ALIAS_AMBIGUOUS','4SxlfKY','6hOlfJP','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','11531625wnMnYF','29508vzXDsm','code','alias','length','set','HOOK_DIRECTORY_AMBIGUOUS','datasetCode'];a276_0x4a04=function(){return _0x423947;};return a276_0x4a04();}function directoryIdentity(_0xa5ee58){const _0x17cb91=a276_0x47f9;return _0xa5ee58[_0x17cb91(0x147)]('NFC')[_0x17cb91(0x12d)]();}function appendUnique(_0x74c96a,_0x18b0c6,_0x1b1398,_0x230678){const _0x2e48d4=a276_0x47f9,_0x59409f=_0x74c96a['get'](_0x18b0c6)??[];!_0x59409f[_0x2e48d4(0x14b)](_0x1423b1=>_0x230678(_0x1423b1)===_0x230678(_0x1b1398))&&_0x59409f['push'](_0x1b1398),_0x74c96a[_0x2e48d4(0x141)](_0x18b0c6,_0x59409f);}function datasetFact(_0x28af02){const _0x154f5a=a276_0x47f9;return{'id':_0x28af02['id'],'name':_0x28af02[_0x154f5a(0x151)],'datasetCode':_0x28af02[_0x154f5a(0x13e)]};}
|
|
1
|
+
(function(_0x3cf6d7,_0x5e231e){const _0x28aa84=a281_0x2012,_0x15f312=_0x3cf6d7();while(!![]){try{const _0x4ed6a7=parseInt(_0x28aa84(0x196))/0x1+parseInt(_0x28aa84(0x1a2))/0x2*(parseInt(_0x28aa84(0x1b3))/0x3)+-parseInt(_0x28aa84(0x19e))/0x4*(-parseInt(_0x28aa84(0x1be))/0x5)+-parseInt(_0x28aa84(0x1ba))/0x6+parseInt(_0x28aa84(0x18b))/0x7*(parseInt(_0x28aa84(0x1ae))/0x8)+-parseInt(_0x28aa84(0x1c1))/0x9*(-parseInt(_0x28aa84(0x18f))/0xa)+-parseInt(_0x28aa84(0x19f))/0xb;if(_0x4ed6a7===_0x5e231e)break;else _0x15f312['push'](_0x15f312['shift']());}catch(_0x45cc00){_0x15f312['push'](_0x15f312['shift']());}}}(a281_0x2b87,0x2fb5f));import{CliError}from'../../errors.js';function a281_0x2012(_0x411a61,_0x4a5772){_0x411a61=_0x411a61-0x18b;const _0x2b87b2=a281_0x2b87();let _0x20129c=_0x2b87b2[_0x411a61];return _0x20129c;}export function trackedHookDirectoryMappings(_0x4f22d3){const _0x2a7509=a281_0x2012,_0x1e218c=[];for(const [_0x5a6c96,_0x58ebc8]of Object[_0x2a7509(0x19d)](_0x4f22d3[_0x2a7509(0x18d)])){const [_0x42b6c5,_0x597e1d]=_0x5a6c96[_0x2a7509(0x190)]('/');if(_0x42b6c5!==_0x2a7509(0x1af)||!_0x597e1d||!_0x58ebc8[_0x2a7509(0x1c2)])continue;_0x1e218c[_0x2a7509(0x1a0)]({'alias':_0x597e1d,'datasetCode':_0x58ebc8[_0x2a7509(0x1c2)]});}return _0x1e218c;}export function uniqueTrackedHookDirectoryByDataset(_0x4877ea){const _0x32aec9=a281_0x2012,_0x23949b=new Map();for(const _0x285ad1 of trackedHookDirectoryMappings(_0x4877ea)){const _0x17b848=directoryIdentity(_0x285ad1[_0x32aec9(0x1c2)]),_0x4a2f0a=_0x23949b['get'](_0x17b848)??new Map();_0x4a2f0a[_0x32aec9(0x197)](directoryIdentity(_0x285ad1['alias']),_0x285ad1['alias']),_0x23949b[_0x32aec9(0x197)](_0x17b848,_0x4a2f0a);}const _0x212ea7=new Map();for(const [_0x3e23e6,_0x4746e9]of _0x23949b){if(_0x4746e9[_0x32aec9(0x1b5)]>0x1)throw hookDirectoryError('HOOK_DUPLICATE_DIRECTORIES','Dataset\x20\x22'+_0x3e23e6+_0x32aec9(0x192)+[..._0x4746e9['values']()][_0x32aec9(0x1aa)](',\x20')+'.',{'datasetCode':_0x3e23e6,'directories':[..._0x4746e9[_0x32aec9(0x1bd)]()]});_0x212ea7['set'](_0x3e23e6,[..._0x4746e9[_0x32aec9(0x1bd)]()][0x0]);}return _0x212ea7;}export function assertUnambiguousHookDirectoryMappings(_0x1b19e0){const _0x5142b5=a281_0x2012,_0x59f668=new Map();for(const {alias:_0x4b727c,datasetCode:_0x537cad}of _0x1b19e0){const _0x14db83=directoryIdentity(_0x4b727c),_0x4fbbf0=_0x59f668[_0x5142b5(0x19c)](_0x14db83)??new Set();_0x4fbbf0[_0x5142b5(0x1a7)](_0x537cad),_0x59f668[_0x5142b5(0x197)](_0x14db83,_0x4fbbf0);}for(const [_0x264712,_0x5d9a02]of _0x59f668){if(_0x5d9a02[_0x5142b5(0x1b5)]>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS',_0x5142b5(0x199)+_0x264712+_0x5142b5(0x1bb),{'directoryName':_0x264712,'datasetCodes':[..._0x5d9a02]});}}export function assertUnambiguousHookAliases(_0x26a3c2){const _0x2ad6fa=a281_0x2012,_0x415d5b=[..._0x26a3c2],_0x5bcabd=new Map(),_0x367061=new Map();for(const {alias:_0x9da9ba,datasetCode:_0x47376a}of _0x415d5b){const _0x18bd71=directoryIdentity(_0x9da9ba),_0x24f9b6=directoryIdentity(_0x47376a),_0xc225d1=_0x5bcabd[_0x2ad6fa(0x19c)](_0x18bd71)??new Set();_0xc225d1[_0x2ad6fa(0x1a7)](_0x47376a),_0x5bcabd[_0x2ad6fa(0x197)](_0x18bd71,_0xc225d1);const _0x2ec3c1=_0x367061['get'](_0x24f9b6)??new Set();_0x2ec3c1['add'](_0x9da9ba),_0x367061[_0x2ad6fa(0x197)](_0x24f9b6,_0x2ec3c1);}for(const [_0x3d6ca2,_0x4660c6]of _0x5bcabd){if(_0x4660c6[_0x2ad6fa(0x1b5)]>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS',_0x2ad6fa(0x195)+_0x3d6ca2+_0x2ad6fa(0x1bb),{'alias':_0x3d6ca2,'datasetCodes':[..._0x4660c6]});}for(const [_0x44c3d9,_0x272573]of _0x367061){if(_0x272573[_0x2ad6fa(0x1b5)]>0x1)throw hookDirectoryError(_0x2ad6fa(0x1b1),_0x2ad6fa(0x1a4)+_0x44c3d9+_0x2ad6fa(0x1a9),{'datasetCode':_0x44c3d9,'aliases':[..._0x272573]});}}export function buildHookDirectoryIndexes(_0x5307f4,_0x46f9ff=[]){const _0x39508c=a281_0x2012,_0x34ad5a=[..._0x46f9ff];assertUnambiguousHookDirectoryMappings(_0x34ad5a[_0x39508c(0x191)](([_0x2ec2df,_0xf7a128])=>({'alias':_0x2ec2df,'datasetCode':_0xf7a128})));const _0x5de061=new Map(),_0x18dc0e=new Map();for(const _0x351277 of _0x5307f4){appendUnique(_0x5de061,directoryIdentity(_0x351277[_0x39508c(0x18c)]),_0x351277,_0x40bb27=>_0x40bb27[_0x39508c(0x18c)]);}for(const [_0x189404,_0x22f6a3]of _0x34ad5a){appendUnique(_0x18dc0e,directoryIdentity(_0x189404),_0x22f6a3,_0x58579d=>_0x58579d);}return{'datasetCodeToDatasets':_0x5de061,'aliasToDatasetCodes':_0x18dc0e};}export function resolvePushHookDirectory(_0x30e79c,_0xeed25c,_0x544abe){const _0x56dafa=a281_0x2012,_0x229b95=directoryIdentity(_0x30e79c),_0x2c40a2=_0x544abe[_0x56dafa(0x1a6)]['get'](_0x229b95)??[],_0x57b548=_0x544abe['aliasToDatasetCodes'][_0x56dafa(0x19c)](_0x229b95)??[],_0xd439dd=new Set([..._0x2c40a2['map'](_0x4e0bf5=>_0x4e0bf5['code']),..._0x57b548]);if(_0xd439dd[_0x56dafa(0x1b5)]>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS','HOOK\x20directory\x20\x22'+_0x30e79c+_0x56dafa(0x1a1),{'directoryName':_0x30e79c,'datasetCodes':[..._0xd439dd]});const _0x16222f=[..._0xd439dd][0x0];if(_0x16222f&&_0xeed25c?.[_0x56dafa(0x1c2)]&&_0x16222f!==_0xeed25c['datasetCode'])throw hookDirectoryError('HOOK_MAPPING_DRIFT',_0x56dafa(0x199)+_0x30e79c+_0x56dafa(0x19a)+_0xeed25c[_0x56dafa(0x1c2)]+_0x56dafa(0x1ad)+_0x16222f+'\x22.',{'directoryName':_0x30e79c,'datasetCode':_0x16222f,'lockedDatasetCode':_0xeed25c['datasetCode']});const _0x37aad7=_0x16222f?findDatasetByCode(_0x544abe,_0x16222f):undefined,_0x127bbe=!!_0x16222f&&_0x57b548[_0x56dafa(0x1b7)](_0x16222f);if(_0x37aad7)return{'dataset':_0x37aad7,'datasetCode':_0x37aad7['code'],..._0x127bbe?{'alias':_0x30e79c}:{},'directoryProtocol':_0x127bbe?_0x56dafa(0x1b2):_0x56dafa(0x1c2),'warnings':[]};const _0x3f8112=_0xeed25c?.['datasetCode'];if(_0x3f8112){const _0x65db8a=findDatasetByCode(_0x544abe,_0x3f8112);if(_0x65db8a)return{'dataset':_0x65db8a,'datasetCode':_0x65db8a[_0x56dafa(0x18c)],..._0xeed25c[_0x56dafa(0x1b2)]?{'alias':_0xeed25c['alias']}:{},'directoryProtocol':_0xeed25c[_0x56dafa(0x1b2)]?_0x56dafa(0x1b2):'datasetCode','warnings':[]};}if(_0x16222f||_0x3f8112){const _0x434fb9=_0x16222f??_0x3f8112;throw hookDirectoryError(_0x56dafa(0x194),'HOOK\x20directory\x20\x22'+_0x30e79c+_0x56dafa(0x1b0),{'directoryName':_0x30e79c,'datasetCode':_0x434fb9});}throw hookDirectoryError(_0x56dafa(0x1b6),_0x56dafa(0x1a5)+_0x30e79c+_0x56dafa(0x1b8),{'directoryName':_0x30e79c});}export function preflightPushHookDirectories(_0x3557be,_0x326e38,_0x59c5df,_0x3c2c4c){const _0x354ef6=a281_0x2012,_0x44c529=new Map(),_0xc78efe=new Map();for(const _0x351fc3 of _0x3557be){if(_0x351fc3[_0x354ef6(0x1b9)]!==_0x354ef6(0x1af))continue;const _0x3ed739=_0x351fc3[_0x354ef6(0x1b2)];if(!_0x3ed739)throw hookDirectoryError(_0x354ef6(0x1b6),'Incomplete\x20HOOK\x20path:\x20'+_0x351fc3['lockKey'],{'lockKey':_0x351fc3[_0x354ef6(0x1bc)]});let _0x2db2cc;try{_0x2db2cc=resolvePushHookDirectory(_0x3ed739,_0x326e38['functions'][_0x351fc3[_0x354ef6(0x1bc)]],_0x59c5df);}catch(_0x174869){if(_0x3c2c4c&&_0x174869 instanceof CliError&&[_0x354ef6(0x194),_0x354ef6(0x1b6)]['includes'](_0x174869[_0x354ef6(0x18c)])){_0x3c2c4c[_0x354ef6(0x197)](_0x351fc3[_0x354ef6(0x1bc)],_0x174869[_0x354ef6(0x1a8)]);continue;}throw _0x174869;}_0x44c529['set'](_0x351fc3[_0x354ef6(0x1bc)],_0x2db2cc);const _0x5d108f=_0xc78efe[_0x354ef6(0x19c)](_0x2db2cc[_0x354ef6(0x1c2)])??new Set();_0x5d108f[_0x354ef6(0x1a7)](_0x3ed739),_0xc78efe[_0x354ef6(0x197)](_0x2db2cc['datasetCode'],_0x5d108f);}for(const [_0x2336e0,_0x3098f4]of _0xc78efe){if(_0x3098f4['size']>0x1)throw hookDirectoryError(_0x354ef6(0x18e),_0x354ef6(0x1a4)+_0x2336e0+_0x354ef6(0x1ab)+[..._0x3098f4]['join'](',\x20')+'.',{'datasetCode':_0x2336e0,'directories':[..._0x3098f4]});}return _0x44c529;}export function hookDirectoryError(_0x5d0ca9,_0x49e70b,_0x853dd){const _0x24cc11=a281_0x2012,_0x255d48=new CliError(_0x5d0ca9,0x2,_0x5d0ca9+':\x20'+_0x49e70b);return _0x255d48[_0x24cc11(0x19b)]=_0x853dd,_0x255d48;}function findDatasetByCode(_0x407091,_0x4138b9){const _0x1e3c0b=a281_0x2012,_0x370589=_0x407091[_0x1e3c0b(0x1a6)][_0x1e3c0b(0x19c)](directoryIdentity(_0x4138b9))??[];if(_0x370589[_0x1e3c0b(0x1bf)]>0x1)throw hookDirectoryError('HOOK_DATASET_CODE_AMBIGUOUS',_0x1e3c0b(0x1a3)+_0x4138b9+_0x1e3c0b(0x198),{'datasetCode':_0x4138b9,'candidates':_0x370589['map'](datasetFact)});return _0x370589[0x0];}function directoryIdentity(_0x556c11){const _0x4b6afa=a281_0x2012;return _0x556c11[_0x4b6afa(0x1c0)](_0x4b6afa(0x193))[_0x4b6afa(0x1b4)]();}function a281_0x2b87(){const _0x19d440=['get','entries','169908yltcez','4170749MznmWR','push','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','2954wZQUUm','Dataset\x20code\x20\x22','Dataset\x20\x22','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','datasetCodeToDatasets','add','message','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','join','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','name','\x22\x20to\x20\x22','128nHPkHo','HOOK','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','HOOK_ALIAS_AMBIGUOUS','alias','30biqzbg','toLowerCase','size','HOOK_DIRECTORY_UNRESOLVED','includes','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','type','1709286fneJaZ','\x22\x20resolves\x20to\x20multiple\x20Datasets.','lockKey','values','10gbBlYI','length','normalize','153UtLltm','datasetCode','138635GMetsl','code','functions','HOOK_DUPLICATE_DIRECTORIES','148130GQlpWS','split','map','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','NFC','HOOK_DATASET_NOT_FOUND','SDK\x20alias\x20\x22','191038NOvnSA','set','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','HOOK\x20directory\x20\x22','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','details'];a281_0x2b87=function(){return _0x19d440;};return a281_0x2b87();}function appendUnique(_0xc2aec3,_0x633b3f,_0x32ba11,_0x5b9557){const _0x4ed391=a281_0x2012,_0x4cba5c=_0xc2aec3[_0x4ed391(0x19c)](_0x633b3f)??[];!_0x4cba5c['some'](_0x387558=>_0x5b9557(_0x387558)===_0x5b9557(_0x32ba11))&&_0x4cba5c[_0x4ed391(0x1a0)](_0x32ba11),_0xc2aec3[_0x4ed391(0x197)](_0x633b3f,_0x4cba5c);}function datasetFact(_0xc3c6dc){const _0x2f35e2=a281_0x2012;return{'id':_0xc3c6dc['id'],'name':_0xc3c6dc[_0x2f35e2(0x1ac)],'datasetCode':_0xc3c6dc[_0x2f35e2(0x18c)]};}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x565203,_0x25fa7a){const _0x2f1aa1=a282_0x5199,_0x2ae442=_0x565203();while(!![]){try{const _0x446b6d=parseInt(_0x2f1aa1(0x1af))/0x1+parseInt(_0x2f1aa1(0x1b5))/0x2+-parseInt(_0x2f1aa1(0x1b4))/0x3*(-parseInt(_0x2f1aa1(0x1a9))/0x4)+-parseInt(_0x2f1aa1(0x1b3))/0x5*(-parseInt(_0x2f1aa1(0x1ad))/0x6)+-parseInt(_0x2f1aa1(0x1a6))/0x7*(parseInt(_0x2f1aa1(0x1a0))/0x8)+parseInt(_0x2f1aa1(0x1a2))/0x9+-parseInt(_0x2f1aa1(0x1ae))/0xa;if(_0x446b6d===_0x25fa7a)break;else _0x2ae442['push'](_0x2ae442['shift']());}catch(_0x402dda){_0x2ae442['push'](_0x2ae442['shift']());}}}(a282_0x3418,0x54995));import{mkdir,readFile,writeFile}from'node:fs/promises';function a282_0x3418(){const _0x41787f=['10533640XtdwLC','298387oznwlb','Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20','stringify','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','264580kGyYVV','6bdfsrL','1203448NbmVud','\x22\x20vs\x20lock\x20\x22','19272oHMafv','lastSync','4032639taHYdd','object','scriptsRoot',':\x20scriptsRoot\x20mismatch\x20—\x20','1141dkgUcL','functions','current\x20\x22','465404njOZxP','apps','ENOENT','utf8','24kqPxyJ'];a282_0x3418=function(){return _0x41787f;};return a282_0x3418();}function a282_0x5199(_0xbb72bd,_0x512e0f){_0xbb72bd=_0xbb72bd-0x1a0;const _0x341850=a282_0x3418();let _0x5199ff=_0x341850[_0xbb72bd];return _0x5199ff;}import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x44c212,_0x339837,_0x15d27b,_0x502dc0){const _0x3d2a4e=a282_0x5199,_0x22f4ac={'apps':_0x44c212['apps']&&typeof _0x44c212['apps']===_0x3d2a4e(0x1a3)?_0x44c212[_0x3d2a4e(0x1aa)]:{}};let _0xe3360f=_0x22f4ac[_0x3d2a4e(0x1aa)][_0x339837];if(!_0xe3360f)return _0xe3360f={'scriptsRoot':_0x15d27b,'lastSync':'','functions':{}},_0x22f4ac['apps'][_0x339837]=_0xe3360f,{'lockData':_0x22f4ac,'appLock':_0xe3360f};if(!_0xe3360f[_0x3d2a4e(0x1a4)])_0xe3360f[_0x3d2a4e(0x1a4)]=_0x15d27b;else{if(_0xe3360f[_0x3d2a4e(0x1a4)]!==_0x15d27b)throw new Error(_0x502dc0+_0x3d2a4e(0x1a5)+(_0x3d2a4e(0x1a8)+_0x15d27b+_0x3d2a4e(0x1b6)+_0xe3360f[_0x3d2a4e(0x1a4)]+'\x22.\x20')+_0x3d2a4e(0x1b2));}return!_0xe3360f[_0x3d2a4e(0x1a7)]&&(_0xe3360f[_0x3d2a4e(0x1a7)]={}),!_0xe3360f['lastSync']&&(_0xe3360f[_0x3d2a4e(0x1a1)]=''),{'lockData':_0x22f4ac,'appLock':_0xe3360f};}export async function readBffLockFile(_0x568661){const _0x443ac1=a282_0x5199;try{const _0x3689c5=await readFile(_0x568661,_0x443ac1(0x1ac)),_0x382807=JSON['parse'](_0x3689c5);return{'apps':_0x382807['apps']&&typeof _0x382807[_0x443ac1(0x1aa)]===_0x443ac1(0x1a3)?_0x382807[_0x443ac1(0x1aa)]:{}};}catch(_0x65419){if(_0x65419['code']===_0x443ac1(0x1ab))return null;throw new Error(_0x443ac1(0x1b0)+String(_0x65419));}}export async function writeBffLockFile(_0x2955b1,_0x7007d1){const _0xbbc614=a282_0x5199;await mkdir(dirname(_0x2955b1),{'recursive':!![]}),await writeFile(_0x2955b1,JSON[_0xbbc614(0x1b1)](_0x7007d1,null,0x2),_0xbbc614(0x1ac));}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a284_0x2accd1=a284_0x165d;(function(_0x52f5e2,_0x183718){const _0x2d7664=a284_0x165d,_0x2a1069=_0x52f5e2();while(!![]){try{const _0x2814ea=-parseInt(_0x2d7664(0xd5))/0x1*(parseInt(_0x2d7664(0xd2))/0x2)+-parseInt(_0x2d7664(0xd6))/0x3*(parseInt(_0x2d7664(0xc9))/0x4)+parseInt(_0x2d7664(0xcb))/0x5*(-parseInt(_0x2d7664(0xcc))/0x6)+parseInt(_0x2d7664(0xdb))/0x7+parseInt(_0x2d7664(0xd8))/0x8*(parseInt(_0x2d7664(0xd1))/0x9)+-parseInt(_0x2d7664(0xc5))/0xa*(-parseInt(_0x2d7664(0xd0))/0xb)+parseInt(_0x2d7664(0xdc))/0xc;if(_0x2814ea===_0x183718)break;else _0x2a1069['push'](_0x2a1069['shift']());}catch(_0x30d53c){_0x2a1069['push'](_0x2a1069['shift']());}}}(a284_0xf1ba,0x6281d));export const DEFAULT_BFF_SCRIPT_DESCRIPTION=a284_0x2accd1(0xcf);const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION=a284_0x2accd1(0xc4);export function snakeToCamel(_0x4209f7){const _0x1b80e5=a284_0x2accd1;return _0x4209f7[_0x1b80e5(0xe1)]()[_0x1b80e5(0xdf)](/_([a-z])/g,(_0x4b0899,_0x20b391)=>_0x20b391['toUpperCase']());}export function findHookLocationByRemoteId(_0x40d71,_0x1e5f36){const _0x698b52=a284_0x2accd1;if(!_0x1e5f36)return undefined;for(const [_0x219c10,_0x2d0902]of Object['entries'](_0x40d71)){if(_0x2d0902[_0x698b52(0xd9)]===_0x1e5f36&&_0x2d0902[_0x698b52(0xca)]&&_0x2d0902[_0x698b52(0xce)]&&_0x2d0902[_0x698b52(0xda)]){const _0x14480f=_0x219c10['split']('/')[0x1];return{'alias':_0x14480f||_0x2d0902[_0x698b52(0xe0)],'datasetCode':_0x2d0902[_0x698b52(0xca)],'operationType':_0x2d0902[_0x698b52(0xce)],'functionNode':_0x2d0902['functionNode']};}}return undefined;}function a284_0x165d(_0x21644b,_0x21c06a){_0x21644b=_0x21644b-0xc4;const _0xf1ba18=a284_0xf1ba();let _0x165dcb=_0xf1ba18[_0x21644b];return _0x165dcb;}export function extractScriptDescription(_0x1adb10){const _0x1c8177=a284_0x2accd1,_0x5a2bf7=_0x1adb10[_0x1c8177(0xde)](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x5a2bf7?.[0x1])return undefined;const _0xde3ac8=_0x5a2bf7[0x1],_0x28a939=_0x33103f=>{const _0x46e8d4=_0x1c8177,_0x5852a3=_0x33103f?.[_0x46e8d4(0xc8)]();if(!_0x5852a3||_0x5852a3===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0x5852a3===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0x5852a3;},_0x301644=_0xde3ac8[_0x1c8177(0xde)](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x301644)return _0x28a939(_0x301644[0x1]);const _0x4842f2=_0xde3ac8[_0x1c8177(0xc6)](/\r?\n/)[_0x1c8177(0xdd)](_0x184970=>_0x184970[_0x1c8177(0xdf)](/^\s*\*\s?/,'')['trim']()),_0xfffd6a=_0x4842f2[_0x1c8177(0xd4)](_0x3cf8f4=>/^\[\s*脚本类型\s*]\s*\S+/['test'](_0x3cf8f4))&&_0x4842f2['some'](_0x429828=>/^\[\s*脚本名称\s*]\s*\S+/[_0x1c8177(0xd7)](_0x429828));if(!_0xfffd6a)return undefined;for(const _0x5bd2fe of _0x4842f2){if(!_0x5bd2fe||_0x5bd2fe[_0x1c8177(0xcd)]('@')||/^\[[^\]]+]\s*/[_0x1c8177(0xd7)](_0x5bd2fe))continue;return _0x28a939(_0x5bd2fe);}return undefined;}export function isValidBffFunctionName(_0x326a42){const _0x25ce66=a284_0x2accd1;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x25ce66(0xd7)](_0x326a42);}export function normalizeHookFunctionNode(_0x25a3ae){const _0x548648=a284_0x2accd1;if(!_0x25a3ae)return undefined;const _0x58c930=_0x25a3ae[_0x548648(0xc8)]()[_0x548648(0xe1)]();if(_0x58c930===_0x548648(0xd3)||_0x58c930===_0x548648(0xc7))return _0x58c930;return undefined;}function a284_0xf1ba(){const _0x322daa=['1872738reviGJ','13900896yNRbXm','map','match','replace','alias','toLowerCase','TODO:\x20add\x20script\x20description','471180pKvLHZ','split','after','trim','1562704jFZkTI','datasetCode','5qnvavD','221244ItfKeR','startsWith','operationType','TODO:\x20补充脚本功能描述','22WvDbaq','604701nTlrfT','756332mWTZtz','before','some','2xLemdv','3LmuXQY','test','8cwvVbJ','remoteId','functionNode'];a284_0xf1ba=function(){return _0x322daa;};return a284_0xf1ba();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a285_0x49acbb=a285_0xdfbf;function a285_0xdfbf(_0x2003d1,_0x4dd472){_0x2003d1=_0x2003d1-0x79;const _0x20dff7=a285_0x20df();let _0xdfbf4a=_0x20dff7[_0x2003d1];return _0xdfbf4a;}(function(_0x1239f1,_0xe8d57d){const _0x47e1d0=a285_0xdfbf,_0x365716=_0x1239f1();while(!![]){try{const _0xc91c22=-parseInt(_0x47e1d0(0x85))/0x1*(parseInt(_0x47e1d0(0x7d))/0x2)+-parseInt(_0x47e1d0(0x7e))/0x3*(parseInt(_0x47e1d0(0x86))/0x4)+-parseInt(_0x47e1d0(0x87))/0x5*(-parseInt(_0x47e1d0(0x83))/0x6)+-parseInt(_0x47e1d0(0x80))/0x7+parseInt(_0x47e1d0(0x82))/0x8*(parseInt(_0x47e1d0(0x7b))/0x9)+parseInt(_0x47e1d0(0x7f))/0xa*(-parseInt(_0x47e1d0(0x84))/0xb)+parseInt(_0x47e1d0(0x88))/0xc;if(_0xc91c22===_0xe8d57d)break;else _0x365716['push'](_0x365716['shift']());}catch(_0x4a35a5){_0x365716['push'](_0x365716['shift']());}}}(a285_0x20df,0x4c0dc));function a285_0x20df(){const _0x37e2ec=['1713AzZDzK','890wiWyJX','393526LMTGqk','/smartapi/cross-db-relation/update','2768mcBfHp','252oPDNPC','66319lMqeBD','2PWYoYM','2572KoiGBj','7170cwfhNe','19535280zwJeJq','/smartapi/cross-db-relation/delete','/smartapi/cross-db-relation/create','3204BAgNmy','/smartapi/cross-db-relation/query','539876bOYqtP'];a285_0x20df=function(){return _0x37e2ec;};return a285_0x20df();}export const CROSS_DB_RELATION_PATHS={'list':a285_0x49acbb(0x7c),'create':a285_0x49acbb(0x7a),'update':a285_0x49acbb(0x81),'delete':a285_0x49acbb(0x79)};
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xd4caab,_0x1a59ad){const _0x497907=a286_0x4585,_0x39a767=_0xd4caab();while(!![]){try{const _0x45dcf2=parseInt(_0x497907(0x19f))/0x1+parseInt(_0x497907(0x1aa))/0x2*(parseInt(_0x497907(0x1ad))/0x3)+parseInt(_0x497907(0x1b3))/0x4+parseInt(_0x497907(0x1a5))/0x5*(-parseInt(_0x497907(0x1b8))/0x6)+parseInt(_0x497907(0x1b2))/0x7*(-parseInt(_0x497907(0x1a0))/0x8)+-parseInt(_0x497907(0x1a2))/0x9+-parseInt(_0x497907(0x1b0))/0xa*(-parseInt(_0x497907(0x1a7))/0xb);if(_0x45dcf2===_0x1a59ad)break;else _0x39a767['push'](_0x39a767['shift']());}catch(_0x11f986){_0x39a767['push'](_0x39a767['shift']());}}}(a286_0x15ae,0x30bda));function a286_0x4585(_0x2de5ed,_0x2f7623){_0x2de5ed=_0x2de5ed-0x19f;const _0x15aeef=a286_0x15ae();let _0x4585fc=_0x15aeef[_0x2de5ed];return _0x4585fc;}import{listDatasets}from'../core/api-client.js';const cache=new Map();function a286_0x15ae(){const _0x1967e7=['2zzQdoW','entries','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','589689jUBujk','dbtableConfig','db-','3350050WIyhVj','find','644CDRSYj','401016cHPeuQ','dbId','filter','.\x20Be\x20more\x20specific.','dbName','234FfLDXJ','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','has','set','No\x20database\x20matching\x20\x22','282768kmlWJo','20128hcNdAH','map','1855323Ryohpv','\x22.\x20Available:\x20','includes','35555VcIjqU','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','11kUNCvD','length','join'];a286_0x15ae=function(){return _0x1967e7;};return a286_0x15ae();}export async function listDatabases(_0x4136a2){const _0x22709d=a286_0x4585;if(cache[_0x22709d(0x1ba)](_0x4136a2))return cache['get'](_0x4136a2);const _0x32472d=await listDatasets(_0x4136a2),_0x45e004=new Map();for(const _0x4eab5c of _0x32472d){const _0x1fc243=_0x4eab5c[_0x22709d(0x1ae)];_0x1fc243?.[_0x22709d(0x1b4)]!=null&&_0x45e004[_0x22709d(0x1bb)](_0x1fc243['dbId'],_0x1fc243[_0x22709d(0x1b7)]??_0x22709d(0x1af)+_0x1fc243[_0x22709d(0x1b4)]);}const _0x166c4d=[..._0x45e004[_0x22709d(0x1ab)]()][_0x22709d(0x1a1)](([_0x504171,_0xe316c6])=>({'dbId':_0x504171,'dbName':_0xe316c6}));return cache[_0x22709d(0x1bb)](_0x4136a2,_0x166c4d),_0x166c4d;}export async function resolveDb(_0x3bb3d1,_0x2f3431){const _0x4d541f=a286_0x4585,_0x3da8b4=await listDatabases(_0x3bb3d1);if(_0x3da8b4[_0x4d541f(0x1a8)]===0x0)return{'resolved':[],'error':'No\x20linked\x20databases\x20found\x20under\x20app\x20\x22'+_0x3bb3d1+_0x4d541f(0x1ac)};if(!_0x2f3431)return{'resolved':_0x3da8b4};const _0x22efd3=Number(_0x2f3431);if(!Number['isNaN'](_0x22efd3)){const _0xd644ae=_0x3da8b4['find'](_0x9eac07=>_0x9eac07[_0x4d541f(0x1b4)]===_0x22efd3);if(_0xd644ae)return{'resolved':[_0xd644ae]};}const _0x3effa8=_0x2f3431['toLowerCase'](),_0x461437=_0x3da8b4[_0x4d541f(0x1b5)](_0x25aa39=>_0x25aa39[_0x4d541f(0x1b7)]['toLowerCase']()[_0x4d541f(0x1a4)](_0x3effa8));if(_0x461437[_0x4d541f(0x1a8)]>0x0)return{'resolved':_0x461437};const _0x1a49b4=_0x3da8b4[_0x4d541f(0x1a1)](_0x206f9e=>_0x206f9e['dbName']+'\x20('+_0x206f9e[_0x4d541f(0x1b4)]+')')[_0x4d541f(0x1a9)](',\x20');return{'resolved':[],'error':_0x4d541f(0x1bc)+_0x2f3431+'\x22\x20under\x20app\x20\x22'+_0x3bb3d1+_0x4d541f(0x1a3)+_0x1a49b4+_0x4d541f(0x1a6)};}export async function resolveOneDb(_0x41cea0,_0xebff11){const _0x2e4c13=a286_0x4585,{resolved:_0xfbba56,error:_0x862bc9}=await resolveDb(_0x41cea0,_0xebff11);if(_0x862bc9)return{'db':null,'error':_0x862bc9};if(_0xfbba56[_0x2e4c13(0x1a8)]===0x1)return{'db':_0xfbba56[0x0]};if(!_0xebff11){const _0x505fcf=_0xfbba56[_0x2e4c13(0x1a1)](_0x3bb41a=>_0x3bb41a[_0x2e4c13(0x1b7)]+'\x20('+_0x3bb41a[_0x2e4c13(0x1b4)]+')')[_0x2e4c13(0x1a9)](',\x20');return{'db':null,'error':_0x2e4c13(0x1b9)+_0x505fcf};}const _0x2d3488=_0xfbba56[_0x2e4c13(0x1a1)](_0x537e80=>_0x537e80[_0x2e4c13(0x1b7)]+'\x20('+_0x537e80[_0x2e4c13(0x1b4)]+')')['join'](',\x20');return{'db':null,'error':'\x22'+_0xebff11+'\x22\x20matches\x20multiple\x20databases:\x20'+_0x2d3488+_0x2e4c13(0x1b6)};}export async function getDbName(_0x22b737,_0x5b515e){const _0x46770c=a286_0x4585,_0x206fa1=await listDatabases(_0x22b737);return _0x206fa1[_0x46770c(0x1b1)](_0x2de4f6=>_0x2de4f6['dbId']===_0x5b515e)?.[_0x46770c(0x1b7)];}
|