@lovrabet/rabetbase-cli 2.5.10-beta.2 → 2.5.10-beta.4
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 +10 -0
- 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.d.ts +2 -2
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.d.ts +3 -0
- package/lib/commands/issue/context.js +1 -0
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -2
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase/references/rabetbase-issue-report.md +4 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
- package/lib/commands/issue/shared.d.ts +0 -32
- package/lib/commands/issue/shared.js +0 -1
- package/lib/telemetry/send-platform-issue-collect-log.d.ts +0 -26
- package/lib/telemetry/send-platform-issue-collect-log.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a290_0x1be4b9=a290_0x45fd;(function(_0x5535f1,_0x5d0729){const _0x3c3d5a=a290_0x45fd,_0x2d35a6=_0x5535f1();while(!![]){try{const _0x1a4ceb=-parseInt(_0x3c3d5a(0xbe))/0x1+parseInt(_0x3c3d5a(0xc8))/0x2*(parseInt(_0x3c3d5a(0xbb))/0x3)+parseInt(_0x3c3d5a(0xc5))/0x4+-parseInt(_0x3c3d5a(0xca))/0x5+-parseInt(_0x3c3d5a(0xc2))/0x6*(-parseInt(_0x3c3d5a(0xd5))/0x7)+-parseInt(_0x3c3d5a(0xcf))/0x8*(parseInt(_0x3c3d5a(0xb7))/0x9)+parseInt(_0x3c3d5a(0xda))/0xa;if(_0x1a4ceb===_0x5d0729)break;else _0x2d35a6['push'](_0x2d35a6['shift']());}catch(_0x30e844){_0x2d35a6['push'](_0x2d35a6['shift']());}}}(a290_0x55da,0xd8f41));import{access,mkdir,readdir,stat}from'node:fs/promises';function a290_0x45fd(_0x347710,_0x4943b6){_0x347710=_0x347710-0xb6;const _0x55da51=a290_0x55da();let _0x45fda4=_0x55da51[_0x347710];return _0x45fda4;}import{constants}from'node:fs';function a290_0x55da(){const _0x4fa029=['3248364QRoyAA','name','Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20','34GEWEqK','operationType','4030745AGZRfw','beforeScriptId','datasetCode','split','HOOK','7002584IlERkz','get','ENOENT','toUpperCase','trim','toLowerCase','175KsWcRT','isDirectory','endsWith','before','scriptType','6882810hImgqI','every','replace','scriptsRootDir','9ypNKYK','ENDPOINT','HOOK/','.js','226161ygfAzJ','functionName','push','972813YfHTBD','functionNode','COMMON','set','182634iEeduD','afterScriptId','code'];a290_0x55da=function(){return _0x4fa029;};return a290_0x55da();}import{dirname,join,resolve,sep}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=[a290_0x1be4b9(0xc0),a290_0x1be4b9(0xb8),a290_0x1be4b9(0xce)];export function normalizeBffType(_0x41b62b){const _0x2f9f0a=a290_0x1be4b9;if(!_0x41b62b)return undefined;const _0x5ca4a0=_0x41b62b[_0x2f9f0a(0xd3)]()[_0x2f9f0a(0xd2)]();return SUPPORTED_BFF_TYPES['includes'](_0x5ca4a0)?_0x5ca4a0:undefined;}async function scanJsFilesRecursively(_0x455e10,_0x5c26cc){const _0x5bd8ed=a290_0x1be4b9,_0x27040c=[];try{const _0xfd7899=await readdir(_0x455e10,{'withFileTypes':!![]});for(const _0x66785e of _0xfd7899){const _0x4536b8=join(_0x455e10,_0x66785e[_0x5bd8ed(0xc6)]);if(_0x66785e['isDirectory']())_0x27040c[_0x5bd8ed(0xbd)](...await scanJsFilesRecursively(_0x4536b8,_0x5c26cc+'/'+_0x66785e['name']));else _0x66785e['isFile']()&&_0x66785e[_0x5bd8ed(0xc6)][_0x5bd8ed(0xd7)](_0x5bd8ed(0xba))&&_0x27040c[_0x5bd8ed(0xbd)]({'lockKey':_0x5c26cc+'/'+_0x66785e[_0x5bd8ed(0xc6)][_0x5bd8ed(0xdc)](/\.js$/,''),'filePath':_0x4536b8});}}catch(_0x3f0d6b){if(_0x3f0d6b[_0x5bd8ed(0xc4)]!==_0x5bd8ed(0xd1))throw _0x3f0d6b;}return _0x27040c;}async function scanFlatFunctions(_0x20addb,_0x183870){const _0x590d5b=a290_0x1be4b9,_0x22bed4=join(_0x20addb['scriptsRootDir'],_0x183870),_0x18ad45=await scanJsFilesRecursively(_0x22bed4,_0x183870);return _0x18ad45['map'](({lockKey:_0x54708c,filePath:_0x88464d})=>({'type':_0x183870,'name':_0x54708c[_0x590d5b(0xcd)]('/')['at'](-0x1)??'','filePath':_0x88464d,'lockKey':_0x54708c}));}async function scanHookFunctions(_0x2688c5){const _0x47e685=a290_0x1be4b9,_0x456938=join(_0x2688c5['scriptsRootDir'],_0x47e685(0xce)),_0x1ff6cf=[];try{const _0x4acdd2=await readdir(_0x456938,{'withFileTypes':!![]});for(const _0xa3cff7 of _0x4acdd2){if(!_0xa3cff7[_0x47e685(0xd6)]())continue;const _0x5918d7=_0xa3cff7['name'],_0x3c8319=join(_0x456938,_0x5918d7),_0x16a73b=await readdir(_0x3c8319,{'withFileTypes':!![]});for(const _0x192582 of _0x16a73b){if(!_0x192582[_0x47e685(0xd6)]())continue;const _0x5bd467=_0x192582[_0x47e685(0xc6)],_0x136a9c=join(_0x3c8319,_0x5bd467),_0x223e55=await readdir(_0x136a9c,{'withFileTypes':!![]});for(const _0x35b9ae of _0x223e55){if(!_0x35b9ae['isDirectory']())continue;const _0x82d2a=_0x35b9ae[_0x47e685(0xc6)],_0xa3e5e=join(_0x136a9c,_0x82d2a),_0x5177b4=await readdir(_0xa3e5e,{'withFileTypes':!![]});for(const _0x1e24de of _0x5177b4){if(!_0x1e24de['isFile']()||!_0x1e24de[_0x47e685(0xc6)][_0x47e685(0xd7)](_0x47e685(0xba)))continue;const _0x3d43c0=_0x1e24de[_0x47e685(0xc6)]['replace'](/\.js$/,'');_0x1ff6cf[_0x47e685(0xbd)]({'type':_0x47e685(0xce),'name':_0x3d43c0,'filePath':join(_0xa3e5e,_0x1e24de[_0x47e685(0xc6)]),'lockKey':_0x47e685(0xb9)+_0x5918d7+'/'+_0x5bd467+'/'+_0x82d2a+'/'+_0x3d43c0,'alias':_0x5918d7,'operationType':_0x5bd467,'functionNode':_0x82d2a});}}}}}catch(_0x142ce6){if(_0x142ce6[_0x47e685(0xc4)]!=='ENOENT')throw _0x142ce6;}return _0x1ff6cf;}export async function scanLocalBffFunctions(_0x2a130c,_0x38526b){const _0x35dac5=a290_0x1be4b9;if(_0x38526b===_0x35dac5(0xc0)||_0x38526b===_0x35dac5(0xb8))return scanFlatFunctions(_0x2a130c,_0x38526b);if(_0x38526b===_0x35dac5(0xce))return scanHookFunctions(_0x2a130c);const [_0x3dcc45,_0x525b8f,_0x3dbd26]=await Promise['all']([scanFlatFunctions(_0x2a130c,'COMMON'),scanFlatFunctions(_0x2a130c,_0x35dac5(0xb8)),scanHookFunctions(_0x2a130c)]);return[..._0x3dcc45,..._0x525b8f,..._0x3dbd26];}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x111f8b){return SAFE_LOCK_KEY_SEGMENT['test'](_0x111f8b)&&_0x111f8b!=='.'&&_0x111f8b!=='..';}export function resolveLocalFilePathFromLockKey(_0x38159e,_0xef8375){const _0x3de8dd=a290_0x1be4b9,_0x1fbc07=_0xef8375[_0x3de8dd(0xcd)]('/');if(!_0x1fbc07[_0x3de8dd(0xdb)](isSafeLockKeySegment))throw new Error(_0x3de8dd(0xc7)+_0xef8375);const _0x5b2b46=resolve(join(_0x38159e['scriptsRootDir'],..._0x1fbc07)+_0x3de8dd(0xba)),_0x378ca6=resolve(_0x38159e[_0x3de8dd(0xb6)]);if(_0x5b2b46!==_0x378ca6&&!_0x5b2b46['startsWith'](_0x378ca6+sep))throw new Error('Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20'+_0x5b2b46);return _0x5b2b46;}export function createHookLocationMap(_0x599956){const _0x18ae66=a290_0x1be4b9,_0x5b14e2=new Map();for(const _0x36d76f of _0x599956){_0x36d76f[_0x18ae66(0xcb)]&&_0x5b14e2[_0x18ae66(0xc1)](_0x36d76f[_0x18ae66(0xcb)],{'datasetCode':_0x36d76f[_0x18ae66(0xcc)],'operationType':snakeToCamel(_0x36d76f[_0x18ae66(0xc9)]),'functionNode':_0x18ae66(0xd8)}),_0x36d76f['afterScriptId']&&_0x5b14e2[_0x18ae66(0xc1)](_0x36d76f[_0x18ae66(0xc3)],{'datasetCode':_0x36d76f[_0x18ae66(0xcc)],'operationType':snakeToCamel(_0x36d76f[_0x18ae66(0xc9)]),'functionNode':'after'});}return _0x5b14e2;}export function resolveRemoteScriptTarget(_0x3ebb36,_0x3c493f,_0x4144d2,_0x53dfa5,_0x1b2f80){const _0x2f579a=a290_0x1be4b9,_0x15997d=normalizeBffType(_0x3c493f[_0x2f579a(0xd9)]);if(!_0x15997d||!_0x3c493f[_0x2f579a(0xbc)])return null;if(_0x15997d===_0x2f579a(0xce)){const _0x6779c3=_0x3c493f['id']?_0x4144d2[_0x2f579a(0xd0)](_0x3c493f['id']):undefined,_0x54eeaf=findHookLocationByRemoteId(_0x53dfa5,_0x3c493f['id']),_0x362a73=_0x6779c3?{..._0x54eeaf?.[_0x2f579a(0xcc)]===_0x6779c3[_0x2f579a(0xcc)]?_0x54eeaf:{},..._0x6779c3}:_0x54eeaf;if(!_0x362a73)return null;const _0x4ddee5=_0x1b2f80['get'](_0x362a73[_0x2f579a(0xcc)][_0x2f579a(0xd4)]()),_0x30a88d=_0x4ddee5??_0x362a73[_0x2f579a(0xcc)],_0x12cda3={..._0x362a73,'alias':_0x4ddee5},_0x22b063=_0x2f579a(0xb9)+_0x30a88d+'/'+_0x12cda3[_0x2f579a(0xc9)]+'/'+_0x12cda3[_0x2f579a(0xbf)]+'/'+_0x3c493f[_0x2f579a(0xbc)];if(!_0x22b063[_0x2f579a(0xcd)]('/')[_0x2f579a(0xdb)](isSafeLockKeySegment))return null;return{'lockKey':_0x22b063,'filePath':resolveLocalFilePathFromLockKey(_0x3ebb36,_0x22b063),'type':'HOOK','hookLocation':_0x12cda3};}const _0x4a4778=_0x15997d+'/'+_0x3c493f['functionName'];if(!_0x4a4778[_0x2f579a(0xcd)]('/')['every'](isSafeLockKeySegment))return null;return{'lockKey':_0x4a4778,'filePath':resolveLocalFilePathFromLockKey(_0x3ebb36,_0x4a4778),'type':_0x15997d};}export async function ensureParentDirectory(_0x7ffe7f){await mkdir(dirname(_0x7ffe7f),{'recursive':!![]});}export async function fileExists(_0x2c424d){try{return await access(_0x2c424d,constants['F_OK']),!![];}catch{return![];}}export async function directoryExists(_0x1b4e77){const _0x4383a5=a290_0x1be4b9;try{const _0x4a35b7=await stat(_0x1b4e77);return _0x4a35b7[_0x4383a5(0xd6)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x17b6d7,_0x608409){const _0x494bb8=a291_0xae16,_0x22dd18=_0x17b6d7();while(!![]){try{const _0x300c3f=-parseInt(_0x494bb8(0xe1))/0x1*(parseInt(_0x494bb8(0xdf))/0x2)+-parseInt(_0x494bb8(0xda))/0x3+-parseInt(_0x494bb8(0xd6))/0x4+-parseInt(_0x494bb8(0xd9))/0x5+parseInt(_0x494bb8(0xe2))/0x6*(-parseInt(_0x494bb8(0xd8))/0x7)+-parseInt(_0x494bb8(0xdc))/0x8*(parseInt(_0x494bb8(0xde))/0x9)+parseInt(_0x494bb8(0xe0))/0xa;if(_0x300c3f===_0x608409)break;else _0x22dd18['push'](_0x22dd18['shift']());}catch(_0x1b6ce8){_0x22dd18['push'](_0x22dd18['shift']());}}}(a291_0x472a,0x83dc0));import{readFile}from'node:fs/promises';function a291_0xae16(_0x21818a,_0x442159){_0x21818a=_0x21818a-0xd5;const _0x472a2d=a291_0x472a();let _0xae16e7=_0x472a2d[_0x21818a];return _0xae16e7;}import a291_0x281de5 from'node:crypto';export function computeContentHash(_0x42f6f9){const _0x41f792=a291_0xae16;return a291_0x281de5[_0x41f792(0xd7)](_0x41f792(0xd5))[_0x41f792(0xdb)](_0x42f6f9)[_0x41f792(0xdd)]('hex');}function a291_0x472a(){const _0x347273=['createHash','88431ajihvX','2965175aBuVnw','1558188ztpQPU','update','6632TRYtUH','digest','11007zJruAA','27534fTSDMc','39689930pNJwiq','61QqywoI','18adCUbU','md5','1699652vUmQUv'];a291_0x472a=function(){return _0x347273;};return a291_0x472a();}export async function computeFileHash(_0x19ef33){const _0x5cf22e=await readFile(_0x19ef33,'utf8');return computeContentHash(_0x5cf22e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x566874,_0x4fbc82){const _0x58126b=a292_0x42f4,_0x3c8099=_0x566874();while(!![]){try{const _0x53084b=-parseInt(_0x58126b(0x189))/0x1*(-parseInt(_0x58126b(0x199))/0x2)+parseInt(_0x58126b(0x173))/0x3+-parseInt(_0x58126b(0x180))/0x4*(parseInt(_0x58126b(0x17d))/0x5)+-parseInt(_0x58126b(0x194))/0x6+-parseInt(_0x58126b(0x184))/0x7*(-parseInt(_0x58126b(0x1a3))/0x8)+parseInt(_0x58126b(0x182))/0x9*(-parseInt(_0x58126b(0x18a))/0xa)+parseInt(_0x58126b(0x19c))/0xb;if(_0x53084b===_0x4fbc82)break;else _0x3c8099['push'](_0x3c8099['shift']());}catch(_0x40b10a){_0x3c8099['push'](_0x3c8099['shift']());}}}(a292_0x262c,0x3ab59));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x1e5607){const _0x5f5bc0=a292_0x42f4,_0x17d749=[];for(const [_0x25d707,_0x28b6be]of Object[_0x5f5bc0(0x174)](_0x1e5607[_0x5f5bc0(0x188)])){const [_0x239155,_0x369be0]=_0x25d707[_0x5f5bc0(0x186)]('/');if(_0x239155!==_0x5f5bc0(0x183)||!_0x369be0||!_0x28b6be[_0x5f5bc0(0x17f)])continue;_0x17d749[_0x5f5bc0(0x171)]({'alias':_0x369be0,'datasetCode':_0x28b6be[_0x5f5bc0(0x17f)]});}return _0x17d749;}export function uniqueTrackedHookDirectoryByDataset(_0x4ac490){const _0xb599e1=a292_0x42f4,_0x135fb3=new Map();for(const _0x58ee3f of trackedHookDirectoryMappings(_0x4ac490)){const _0x589064=directoryIdentity(_0x58ee3f[_0xb599e1(0x17f)]),_0xfde3a4=_0x135fb3[_0xb599e1(0x17c)](_0x589064)??new Map();_0xfde3a4[_0xb599e1(0x178)](directoryIdentity(_0x58ee3f[_0xb599e1(0x190)]),_0x58ee3f['alias']),_0x135fb3['set'](_0x589064,_0xfde3a4);}const _0x1770b7=new Map();for(const [_0x1798b1,_0x86f1d6]of _0x135fb3){if(_0x86f1d6[_0xb599e1(0x193)]>0x1)throw hookDirectoryError(_0xb599e1(0x179),_0xb599e1(0x192)+_0x1798b1+'\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20'+[..._0x86f1d6[_0xb599e1(0x175)]()][_0xb599e1(0x172)](',\x20')+'.',{'datasetCode':_0x1798b1,'directories':[..._0x86f1d6['values']()]});_0x1770b7[_0xb599e1(0x178)](_0x1798b1,[..._0x86f1d6[_0xb599e1(0x175)]()][0x0]);}return _0x1770b7;}export function assertUnambiguousHookDirectoryMappings(_0x3d4bc3){const _0x3f3e37=a292_0x42f4,_0x44e363=new Map();for(const {alias:_0x2e8c2a,datasetCode:_0x27f679}of _0x3d4bc3){const _0x44a31b=directoryIdentity(_0x2e8c2a),_0x19f885=_0x44e363[_0x3f3e37(0x17c)](_0x44a31b)??new Set();_0x19f885[_0x3f3e37(0x19f)](_0x27f679),_0x44e363[_0x3f3e37(0x178)](_0x44a31b,_0x19f885);}for(const [_0x196a63,_0x6dd3b6]of _0x44e363){if(_0x6dd3b6[_0x3f3e37(0x193)]>0x1)throw hookDirectoryError(_0x3f3e37(0x17b),'HOOK\x20directory\x20\x22'+_0x196a63+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'directoryName':_0x196a63,'datasetCodes':[..._0x6dd3b6]});}}export function assertUnambiguousHookAliases(_0x32159d){const _0x375afa=a292_0x42f4,_0x483d78=[..._0x32159d],_0x28d9a1=new Map(),_0x51521c=new Map();for(const {alias:_0x545e72,datasetCode:_0x1180df}of _0x483d78){const _0x43cc40=directoryIdentity(_0x545e72),_0x1c1f42=directoryIdentity(_0x1180df),_0x1de198=_0x28d9a1[_0x375afa(0x17c)](_0x43cc40)??new Set();_0x1de198[_0x375afa(0x19f)](_0x1180df),_0x28d9a1[_0x375afa(0x178)](_0x43cc40,_0x1de198);const _0x46e24=_0x51521c[_0x375afa(0x17c)](_0x1c1f42)??new Set();_0x46e24['add'](_0x545e72),_0x51521c[_0x375afa(0x178)](_0x1c1f42,_0x46e24);}for(const [_0xe877ee,_0x5a7ab2]of _0x28d9a1){if(_0x5a7ab2['size']>0x1)throw hookDirectoryError(_0x375afa(0x198),_0x375afa(0x181)+_0xe877ee+_0x375afa(0x1a0),{'alias':_0xe877ee,'datasetCodes':[..._0x5a7ab2]});}for(const [_0x54f4a7,_0x28ff94]of _0x51521c){if(_0x28ff94[_0x375afa(0x193)]>0x1)throw hookDirectoryError(_0x375afa(0x198),_0x375afa(0x192)+_0x54f4a7+_0x375afa(0x18f),{'datasetCode':_0x54f4a7,'aliases':[..._0x28ff94]});}}export function buildHookDirectoryIndexes(_0xe49475,_0x56d6cd=[]){const _0x342cc4=a292_0x42f4,_0x22bd3f=[..._0x56d6cd];assertUnambiguousHookDirectoryMappings(_0x22bd3f[_0x342cc4(0x17e)](([_0xdef2d2,_0x43fa8b])=>({'alias':_0xdef2d2,'datasetCode':_0x43fa8b})));const _0x4255e3=new Map(),_0x3a38c8=new Map();for(const _0x3a96fa of _0xe49475){appendUnique(_0x4255e3,directoryIdentity(_0x3a96fa[_0x342cc4(0x1a2)]),_0x3a96fa,_0x5cd120=>_0x5cd120[_0x342cc4(0x1a2)]);}for(const [_0x3e9f6c,_0x46c59d]of _0x22bd3f){appendUnique(_0x3a38c8,directoryIdentity(_0x3e9f6c),_0x46c59d,_0x426f79=>_0x426f79);}return{'datasetCodeToDatasets':_0x4255e3,'aliasToDatasetCodes':_0x3a38c8};}export function resolvePushHookDirectory(_0x5e6492,_0x151090,_0x515347){const _0x362034=a292_0x42f4,_0x508007=directoryIdentity(_0x5e6492),_0x4b422e=_0x515347[_0x362034(0x17a)][_0x362034(0x17c)](_0x508007)??[],_0x2a74b=_0x515347['aliasToDatasetCodes']['get'](_0x508007)??[],_0x51b35a=new Set([..._0x4b422e[_0x362034(0x17e)](_0x4610b3=>_0x4610b3[_0x362034(0x1a2)]),..._0x2a74b]);if(_0x51b35a[_0x362034(0x193)]>0x1)throw hookDirectoryError(_0x362034(0x17b),_0x362034(0x18e)+_0x5e6492+'\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.',{'directoryName':_0x5e6492,'datasetCodes':[..._0x51b35a]});const _0x2775c0=[..._0x51b35a][0x0];if(_0x2775c0&&_0x151090?.[_0x362034(0x17f)]&&_0x2775c0!==_0x151090['datasetCode'])throw hookDirectoryError(_0x362034(0x185),_0x362034(0x18e)+_0x5e6492+'\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22'+_0x151090[_0x362034(0x17f)]+'\x22\x20to\x20\x22'+_0x2775c0+'\x22.',{'directoryName':_0x5e6492,'datasetCode':_0x2775c0,'lockedDatasetCode':_0x151090[_0x362034(0x17f)]});const _0xe1daa2=_0x2775c0?findDatasetByCode(_0x515347,_0x2775c0):undefined,_0x259c8a=!!_0x2775c0&&_0x2a74b[_0x362034(0x19d)](_0x2775c0);if(_0xe1daa2)return{'dataset':_0xe1daa2,'datasetCode':_0xe1daa2[_0x362034(0x1a2)],..._0x259c8a?{'alias':_0x5e6492}:{},'directoryProtocol':_0x259c8a?'alias':_0x362034(0x17f),'warnings':[]};const _0xd34676=_0x151090?.[_0x362034(0x17f)];if(_0xd34676){const _0x17f204=findDatasetByCode(_0x515347,_0xd34676);if(_0x17f204)return{'dataset':_0x17f204,'datasetCode':_0x17f204['code'],..._0x151090[_0x362034(0x190)]?{'alias':_0x151090[_0x362034(0x190)]}:{},'directoryProtocol':_0x151090['alias']?_0x362034(0x190):_0x362034(0x17f),'warnings':[]};}if(_0x2775c0||_0xd34676){const _0x1b0202=_0x2775c0??_0xd34676;throw hookDirectoryError('HOOK_DATASET_NOT_FOUND','HOOK\x20directory\x20\x22'+_0x5e6492+_0x362034(0x177),{'directoryName':_0x5e6492,'datasetCode':_0x1b0202});}throw hookDirectoryError(_0x362034(0x19a),_0x362034(0x195)+_0x5e6492+_0x362034(0x1a1),{'directoryName':_0x5e6492});}export function preflightPushHookDirectories(_0x30b9b1,_0x4e575a,_0x3ab7e1,_0x4db387){const _0x247bf9=a292_0x42f4,_0x263a3d=new Map(),_0x59d401=new Map();for(const _0x5783b8 of _0x30b9b1){if(_0x5783b8[_0x247bf9(0x18c)]!=='HOOK')continue;const _0x4949ea=_0x5783b8['alias'];if(!_0x4949ea)throw hookDirectoryError('HOOK_DIRECTORY_UNRESOLVED',_0x247bf9(0x197)+_0x5783b8[_0x247bf9(0x18b)],{'lockKey':_0x5783b8['lockKey']});let _0x626b1c;try{_0x626b1c=resolvePushHookDirectory(_0x4949ea,_0x4e575a[_0x247bf9(0x188)][_0x5783b8[_0x247bf9(0x18b)]],_0x3ab7e1);}catch(_0x5a18a8){if(_0x4db387&&_0x5a18a8 instanceof CliError&&['HOOK_DATASET_NOT_FOUND',_0x247bf9(0x19a)][_0x247bf9(0x19d)](_0x5a18a8[_0x247bf9(0x1a2)])){_0x4db387[_0x247bf9(0x178)](_0x5783b8[_0x247bf9(0x18b)],_0x5a18a8[_0x247bf9(0x19e)]);continue;}throw _0x5a18a8;}_0x263a3d[_0x247bf9(0x178)](_0x5783b8[_0x247bf9(0x18b)],_0x626b1c);const _0x315753=_0x59d401[_0x247bf9(0x17c)](_0x626b1c['datasetCode'])??new Set();_0x315753[_0x247bf9(0x19f)](_0x4949ea),_0x59d401[_0x247bf9(0x178)](_0x626b1c[_0x247bf9(0x17f)],_0x315753);}for(const [_0x5777a2,_0x5a1b03]of _0x59d401){if(_0x5a1b03['size']>0x1)throw hookDirectoryError('HOOK_DUPLICATE_DIRECTORIES',_0x247bf9(0x192)+_0x5777a2+_0x247bf9(0x1a4)+[..._0x5a1b03]['join'](',\x20')+'.',{'datasetCode':_0x5777a2,'directories':[..._0x5a1b03]});}return _0x263a3d;}export function hookDirectoryError(_0x5544e1,_0x40f309,_0xf01db5){const _0x448540=a292_0x42f4,_0x41f0d5=new CliError(_0x5544e1,0x2,_0x5544e1+':\x20'+_0x40f309);return _0x41f0d5[_0x448540(0x191)]=_0xf01db5,_0x41f0d5;}function findDatasetByCode(_0x8e2809,_0x8f0a93){const _0x70cf08=a292_0x42f4,_0x585085=_0x8e2809[_0x70cf08(0x17a)][_0x70cf08(0x17c)](directoryIdentity(_0x8f0a93))??[];if(_0x585085[_0x70cf08(0x19b)]>0x1)throw hookDirectoryError('HOOK_DATASET_CODE_AMBIGUOUS',_0x70cf08(0x196)+_0x8f0a93+_0x70cf08(0x187),{'datasetCode':_0x8f0a93,'candidates':_0x585085[_0x70cf08(0x17e)](datasetFact)});return _0x585085[0x0];}function a292_0x42f4(_0x5bb169,_0x2e6f1c){_0x5bb169=_0x5bb169-0x171;const _0x262cea=a292_0x262c();let _0x42f4fa=_0x262cea[_0x5bb169];return _0x42f4fa;}function directoryIdentity(_0x2c5131){const _0x3b1f29=a292_0x42f4;return _0x2c5131['normalize'](_0x3b1f29(0x176))['toLowerCase']();}function appendUnique(_0x29fc01,_0x33308f,_0x5b3ff0,_0x3d615b){const _0xd1c1b6=a292_0x42f4,_0x1caded=_0x29fc01['get'](_0x33308f)??[];!_0x1caded[_0xd1c1b6(0x18d)](_0x2d8a50=>_0x3d615b(_0x2d8a50)===_0x3d615b(_0x5b3ff0))&&_0x1caded[_0xd1c1b6(0x171)](_0x5b3ff0),_0x29fc01['set'](_0x33308f,_0x1caded);}function a292_0x262c(){const _0x56e627=['includes','message','add','\x22\x20resolves\x20to\x20multiple\x20Datasets.','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','code','456DrRXSE','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','push','join','1423350oozBKa','entries','values','NFC','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','set','HOOK_DUPLICATE_DIRECTORIES','datasetCodeToDatasets','HOOK_DIRECTORY_AMBIGUOUS','get','10ceHOvb','map','datasetCode','874972FptHyb','SDK\x20alias\x20\x22','27sZfSnD','HOOK','17689EowQXZ','HOOK_MAPPING_DRIFT','split','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','functions','1XOPokj','549670RGRueB','lockKey','type','some','HOOK\x20directory\x20\x22','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','alias','details','Dataset\x20\x22','size','2547702miCFDw','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','Dataset\x20code\x20\x22','Incomplete\x20HOOK\x20path:\x20','HOOK_ALIAS_AMBIGUOUS','921738sJZaEy','HOOK_DIRECTORY_UNRESOLVED','length','2069309rMrhgq'];a292_0x262c=function(){return _0x56e627;};return a292_0x262c();}function datasetFact(_0x5de3bb){const _0x5c28f9=a292_0x42f4;return{'id':_0x5de3bb['id'],'name':_0x5de3bb['name'],'datasetCode':_0x5de3bb[_0x5c28f9(0x1a2)]};}
|
|
1
|
+
(function(_0x572fac,_0x196733){const _0x2ebae4=a292_0x3871,_0x464792=_0x572fac();while(!![]){try{const _0xcefadc=-parseInt(_0x2ebae4(0x1d2))/0x1+parseInt(_0x2ebae4(0x1ab))/0x2+-parseInt(_0x2ebae4(0x1a2))/0x3*(parseInt(_0x2ebae4(0x1a3))/0x4)+-parseInt(_0x2ebae4(0x1c6))/0x5*(-parseInt(_0x2ebae4(0x1be))/0x6)+-parseInt(_0x2ebae4(0x1d3))/0x7+parseInt(_0x2ebae4(0x1ba))/0x8+parseInt(_0x2ebae4(0x1b7))/0x9*(parseInt(_0x2ebae4(0x1c8))/0xa);if(_0xcefadc===_0x196733)break;else _0x464792['push'](_0x464792['shift']());}catch(_0x41f278){_0x464792['push'](_0x464792['shift']());}}}(a292_0x2c4d,0x849e4));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x3ba18c){const _0x1a3737=a292_0x3871,_0x1bb4b0=[];for(const [_0x567b3d,_0x43a130]of Object['entries'](_0x3ba18c[_0x1a3737(0x1aa)])){const [_0x18d88e,_0x1a89cd]=_0x567b3d[_0x1a3737(0x1c9)]('/');if(_0x18d88e!==_0x1a3737(0x1c4)||!_0x1a89cd||!_0x43a130[_0x1a3737(0x1a9)])continue;_0x1bb4b0['push']({'alias':_0x1a89cd,'datasetCode':_0x43a130['datasetCode']});}return _0x1bb4b0;}export function uniqueTrackedHookDirectoryByDataset(_0x4d487e){const _0x5e43e2=a292_0x3871,_0x20da22=new Map();for(const _0x53a897 of trackedHookDirectoryMappings(_0x4d487e)){const _0x5c3893=directoryIdentity(_0x53a897[_0x5e43e2(0x1a9)]),_0x562f41=_0x20da22[_0x5e43e2(0x1ce)](_0x5c3893)??new Map();_0x562f41[_0x5e43e2(0x1a8)](directoryIdentity(_0x53a897['alias']),_0x53a897[_0x5e43e2(0x1c7)]),_0x20da22[_0x5e43e2(0x1a8)](_0x5c3893,_0x562f41);}const _0x4072eb=new Map();for(const [_0x27f2f7,_0x2d8896]of _0x20da22){if(_0x2d8896[_0x5e43e2(0x1b3)]>0x1)throw hookDirectoryError(_0x5e43e2(0x1a4),_0x5e43e2(0x1c2)+_0x27f2f7+_0x5e43e2(0x1b6)+[..._0x2d8896[_0x5e43e2(0x1bd)]()][_0x5e43e2(0x1ca)](',\x20')+'.',{'datasetCode':_0x27f2f7,'directories':[..._0x2d8896[_0x5e43e2(0x1bd)]()]});_0x4072eb[_0x5e43e2(0x1a8)](_0x27f2f7,[..._0x2d8896[_0x5e43e2(0x1bd)]()][0x0]);}return _0x4072eb;}export function assertUnambiguousHookDirectoryMappings(_0x16315b){const _0x386acc=a292_0x3871,_0x4a3db8=new Map();for(const {alias:_0x3b80db,datasetCode:_0x3cd124}of _0x16315b){const _0x187558=directoryIdentity(_0x3b80db),_0x2df4da=_0x4a3db8[_0x386acc(0x1ce)](_0x187558)??new Set();_0x2df4da[_0x386acc(0x1cc)](_0x3cd124),_0x4a3db8['set'](_0x187558,_0x2df4da);}for(const [_0x2d7ace,_0x336492]of _0x4a3db8){if(_0x336492[_0x386acc(0x1b3)]>0x1)throw hookDirectoryError(_0x386acc(0x1b1),'HOOK\x20directory\x20\x22'+_0x2d7ace+_0x386acc(0x1ac),{'directoryName':_0x2d7ace,'datasetCodes':[..._0x336492]});}}export function assertUnambiguousHookAliases(_0x5e24f2){const _0x83f0fe=a292_0x3871,_0x5524ba=[..._0x5e24f2],_0x360106=new Map(),_0x2d75e3=new Map();for(const {alias:_0x3de1b5,datasetCode:_0x4ac3f8}of _0x5524ba){const _0x40515e=directoryIdentity(_0x3de1b5),_0x564b8d=directoryIdentity(_0x4ac3f8),_0x4d650b=_0x360106[_0x83f0fe(0x1ce)](_0x40515e)??new Set();_0x4d650b[_0x83f0fe(0x1cc)](_0x4ac3f8),_0x360106[_0x83f0fe(0x1a8)](_0x40515e,_0x4d650b);const _0x27f53b=_0x2d75e3[_0x83f0fe(0x1ce)](_0x564b8d)??new Set();_0x27f53b['add'](_0x3de1b5),_0x2d75e3[_0x83f0fe(0x1a8)](_0x564b8d,_0x27f53b);}for(const [_0x31bf18,_0xa208a0]of _0x360106){if(_0xa208a0['size']>0x1)throw hookDirectoryError(_0x83f0fe(0x1af),_0x83f0fe(0x1bc)+_0x31bf18+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'alias':_0x31bf18,'datasetCodes':[..._0xa208a0]});}for(const [_0x4bc5ef,_0x45854a]of _0x2d75e3){if(_0x45854a[_0x83f0fe(0x1b3)]>0x1)throw hookDirectoryError(_0x83f0fe(0x1af),_0x83f0fe(0x1c2)+_0x4bc5ef+_0x83f0fe(0x1a5),{'datasetCode':_0x4bc5ef,'aliases':[..._0x45854a]});}}export function buildHookDirectoryIndexes(_0x348522,_0x3529f3=[]){const _0xe23943=a292_0x3871,_0x4dcaea=[..._0x3529f3];assertUnambiguousHookDirectoryMappings(_0x4dcaea[_0xe23943(0x1c5)](([_0x3748e1,_0x161ff9])=>({'alias':_0x3748e1,'datasetCode':_0x161ff9})));const _0x27a6bb=new Map(),_0x1ed401=new Map();for(const _0x2e9e18 of _0x348522){appendUnique(_0x27a6bb,directoryIdentity(_0x2e9e18[_0xe23943(0x1b0)]),_0x2e9e18,_0x5449ea=>_0x5449ea[_0xe23943(0x1b0)]);}for(const [_0x28510d,_0x17484a]of _0x4dcaea){appendUnique(_0x1ed401,directoryIdentity(_0x28510d),_0x17484a,_0x3b8ff4=>_0x3b8ff4);}return{'datasetCodeToDatasets':_0x27a6bb,'aliasToDatasetCodes':_0x1ed401};}export function resolvePushHookDirectory(_0x15110c,_0x4a5b30,_0x4ec412){const _0x45b989=a292_0x3871,_0x5e47ee=directoryIdentity(_0x15110c),_0x2cd9e5=_0x4ec412[_0x45b989(0x1ae)]['get'](_0x5e47ee)??[],_0x289805=_0x4ec412[_0x45b989(0x1cf)][_0x45b989(0x1ce)](_0x5e47ee)??[],_0xb53e1b=new Set([..._0x2cd9e5[_0x45b989(0x1c5)](_0x74f1a1=>_0x74f1a1[_0x45b989(0x1b0)]),..._0x289805]);if(_0xb53e1b[_0x45b989(0x1b3)]>0x1)throw hookDirectoryError(_0x45b989(0x1b1),_0x45b989(0x1d1)+_0x15110c+_0x45b989(0x1b9),{'directoryName':_0x15110c,'datasetCodes':[..._0xb53e1b]});const _0xfc009e=[..._0xb53e1b][0x0];if(_0xfc009e&&_0x4a5b30?.[_0x45b989(0x1a9)]&&_0xfc009e!==_0x4a5b30['datasetCode'])throw hookDirectoryError(_0x45b989(0x1b5),_0x45b989(0x1d1)+_0x15110c+_0x45b989(0x1b2)+_0x4a5b30[_0x45b989(0x1a9)]+'\x22\x20to\x20\x22'+_0xfc009e+'\x22.',{'directoryName':_0x15110c,'datasetCode':_0xfc009e,'lockedDatasetCode':_0x4a5b30['datasetCode']});const _0x4e9886=_0xfc009e?findDatasetByCode(_0x4ec412,_0xfc009e):undefined,_0x5c7239=!!_0xfc009e&&_0x289805['includes'](_0xfc009e);if(_0x4e9886)return{'dataset':_0x4e9886,'datasetCode':_0x4e9886[_0x45b989(0x1b0)],..._0x5c7239?{'alias':_0x15110c}:{},'directoryProtocol':_0x5c7239?_0x45b989(0x1c7):_0x45b989(0x1a9),'warnings':[]};const _0x1d2efc=_0x4a5b30?.[_0x45b989(0x1a9)];if(_0x1d2efc){const _0x5a0290=findDatasetByCode(_0x4ec412,_0x1d2efc);if(_0x5a0290)return{'dataset':_0x5a0290,'datasetCode':_0x5a0290[_0x45b989(0x1b0)],..._0x4a5b30[_0x45b989(0x1c7)]?{'alias':_0x4a5b30[_0x45b989(0x1c7)]}:{},'directoryProtocol':_0x4a5b30[_0x45b989(0x1c7)]?'alias':'datasetCode','warnings':[]};}if(_0xfc009e||_0x1d2efc){const _0x4b4f5c=_0xfc009e??_0x1d2efc;throw hookDirectoryError('HOOK_DATASET_NOT_FOUND',_0x45b989(0x1d1)+_0x15110c+_0x45b989(0x1c1),{'directoryName':_0x15110c,'datasetCode':_0x4b4f5c});}throw hookDirectoryError(_0x45b989(0x1cb),'Cannot\x20resolve\x20HOOK\x20directory\x20\x22'+_0x15110c+_0x45b989(0x1bb),{'directoryName':_0x15110c});}export function preflightPushHookDirectories(_0x4a8c9e,_0x1b1a17,_0x5015f9,_0x3a78b6){const _0x58d1ad=a292_0x3871,_0x5aff74=new Map(),_0x3c4f81=new Map();for(const _0x154c99 of _0x4a8c9e){if(_0x154c99[_0x58d1ad(0x1b8)]!=='HOOK')continue;const _0x3e46b9=_0x154c99[_0x58d1ad(0x1c7)];if(!_0x3e46b9)throw hookDirectoryError(_0x58d1ad(0x1cb),_0x58d1ad(0x1c0)+_0x154c99[_0x58d1ad(0x1c3)],{'lockKey':_0x154c99['lockKey']});let _0x39b1b6;try{_0x39b1b6=resolvePushHookDirectory(_0x3e46b9,_0x1b1a17[_0x58d1ad(0x1aa)][_0x154c99['lockKey']],_0x5015f9);}catch(_0x4be015){if(_0x3a78b6&&_0x4be015 instanceof CliError&&['HOOK_DATASET_NOT_FOUND','HOOK_DIRECTORY_UNRESOLVED'][_0x58d1ad(0x1cd)](_0x4be015['code'])){_0x3a78b6[_0x58d1ad(0x1a8)](_0x154c99[_0x58d1ad(0x1c3)],_0x4be015[_0x58d1ad(0x1d0)]);continue;}throw _0x4be015;}_0x5aff74['set'](_0x154c99[_0x58d1ad(0x1c3)],_0x39b1b6);const _0x40c202=_0x3c4f81['get'](_0x39b1b6[_0x58d1ad(0x1a9)])??new Set();_0x40c202['add'](_0x3e46b9),_0x3c4f81[_0x58d1ad(0x1a8)](_0x39b1b6[_0x58d1ad(0x1a9)],_0x40c202);}for(const [_0x3b248c,_0x299f53]of _0x3c4f81){if(_0x299f53['size']>0x1)throw hookDirectoryError(_0x58d1ad(0x1a4),'Dataset\x20\x22'+_0x3b248c+'\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20'+[..._0x299f53][_0x58d1ad(0x1ca)](',\x20')+'.',{'datasetCode':_0x3b248c,'directories':[..._0x299f53]});}return _0x5aff74;}function a292_0x2c4d(){const _0x52798a=['aliasToDatasetCodes','message','HOOK\x20directory\x20\x22','964497fvziCE','2042999nVHNEo','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','details','some','6FquQsb','319108DowvEb','HOOK_DUPLICATE_DIRECTORIES','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','HOOK_DATASET_CODE_AMBIGUOUS','length','set','datasetCode','functions','1599326xgUbwu','\x22\x20resolves\x20to\x20multiple\x20Datasets.','name','datasetCodeToDatasets','HOOK_ALIAS_AMBIGUOUS','code','HOOK_DIRECTORY_AMBIGUOUS','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','size','Dataset\x20code\x20\x22','HOOK_MAPPING_DRIFT','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','339777tDYeyG','type','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','3004504cykGUN','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','SDK\x20alias\x20\x22','values','34482KkyEEJ','toLowerCase','Incomplete\x20HOOK\x20path:\x20','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','Dataset\x20\x22','lockKey','HOOK','map','255ANQkFO','alias','130hxuNAX','split','join','HOOK_DIRECTORY_UNRESOLVED','add','includes','get'];a292_0x2c4d=function(){return _0x52798a;};return a292_0x2c4d();}export function hookDirectoryError(_0x4f61ec,_0x1e7cad,_0x544a37){const _0x5c7ada=a292_0x3871,_0x536fd5=new CliError(_0x4f61ec,0x2,_0x4f61ec+':\x20'+_0x1e7cad);return _0x536fd5[_0x5c7ada(0x1d5)]=_0x544a37,_0x536fd5;}function findDatasetByCode(_0x2ea7d2,_0x1a73b6){const _0x269eae=a292_0x3871,_0x327a04=_0x2ea7d2[_0x269eae(0x1ae)][_0x269eae(0x1ce)](directoryIdentity(_0x1a73b6))??[];if(_0x327a04[_0x269eae(0x1a7)]>0x1)throw hookDirectoryError(_0x269eae(0x1a6),_0x269eae(0x1b4)+_0x1a73b6+_0x269eae(0x1d4),{'datasetCode':_0x1a73b6,'candidates':_0x327a04[_0x269eae(0x1c5)](datasetFact)});return _0x327a04[0x0];}function directoryIdentity(_0x56d871){const _0x4c4110=a292_0x3871;return _0x56d871['normalize']('NFC')[_0x4c4110(0x1bf)]();}function a292_0x3871(_0x413af5,_0x4dc809){_0x413af5=_0x413af5-0x1a2;const _0x2c4d89=a292_0x2c4d();let _0x387198=_0x2c4d89[_0x413af5];return _0x387198;}function appendUnique(_0x315ade,_0x332598,_0xd2daea,_0xde5f5c){const _0xd7862c=a292_0x3871,_0x54677b=_0x315ade['get'](_0x332598)??[];!_0x54677b[_0xd7862c(0x1d6)](_0x311049=>_0xde5f5c(_0x311049)===_0xde5f5c(_0xd2daea))&&_0x54677b['push'](_0xd2daea),_0x315ade[_0xd7862c(0x1a8)](_0x332598,_0x54677b);}function datasetFact(_0x4bfb29){const _0x495873=a292_0x3871;return{'id':_0x4bfb29['id'],'name':_0x4bfb29[_0x495873(0x1ad)],'datasetCode':_0x4bfb29[_0x495873(0x1b0)]};}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a293_0x2855(_0x4be560,_0xf82a72){_0x4be560=_0x4be560-0x1d4;const _0x51f171=a293_0x51f1();let _0x2855fc=_0x51f171[_0x4be560];return _0x2855fc;}(function(_0x3746e5,_0x4948b8){const _0x224ec2=a293_0x2855,_0x17f37e=_0x3746e5();while(!![]){try{const _0x2a23ed=parseInt(_0x224ec2(0x1e4))/0x1+parseInt(_0x224ec2(0x1db))/0x2+-parseInt(_0x224ec2(0x1d9))/0x3*(-parseInt(_0x224ec2(0x1e1))/0x4)+-parseInt(_0x224ec2(0x1dc))/0x5+parseInt(_0x224ec2(0x1e2))/0x6*(-parseInt(_0x224ec2(0x1d4))/0x7)+-parseInt(_0x224ec2(0x1d7))/0x8+parseInt(_0x224ec2(0x1e6))/0x9;if(_0x2a23ed===_0x4948b8)break;else _0x17f37e['push'](_0x17f37e['shift']());}catch(_0x3e8a3){_0x17f37e['push'](_0x17f37e['shift']());}}}(a293_0x51f1,0xd63f2));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x4ce05b,_0x5cce5f,_0x48e8fc,_0x566081){const _0x3c3463=a293_0x2855,_0x242b0f={'apps':_0x4ce05b['apps']&&typeof _0x4ce05b[_0x3c3463(0x1ea)]===_0x3c3463(0x1d5)?_0x4ce05b['apps']:{}};let _0x11d119=_0x242b0f['apps'][_0x5cce5f];if(!_0x11d119)return _0x11d119={'scriptsRoot':_0x48e8fc,'lastSync':'','functions':{}},_0x242b0f[_0x3c3463(0x1ea)][_0x5cce5f]=_0x11d119,{'lockData':_0x242b0f,'appLock':_0x11d119};if(!_0x11d119[_0x3c3463(0x1d8)])_0x11d119[_0x3c3463(0x1d8)]=_0x48e8fc;else{if(_0x11d119[_0x3c3463(0x1d8)]!==_0x48e8fc)throw new Error(_0x566081+_0x3c3463(0x1dd)+(_0x3c3463(0x1e5)+_0x48e8fc+'\x22\x20vs\x20lock\x20\x22'+_0x11d119[_0x3c3463(0x1d8)]+'\x22.\x20')+_0x3c3463(0x1e0));}return!_0x11d119['functions']&&(_0x11d119[_0x3c3463(0x1da)]={}),!_0x11d119[_0x3c3463(0x1e3)]&&(_0x11d119[_0x3c3463(0x1e3)]=''),{'lockData':_0x242b0f,'appLock':_0x11d119};}export async function readBffLockFile(_0x42343f){const _0x31d7d8=a293_0x2855;try{const _0xcdb6ce=await readFile(_0x42343f,_0x31d7d8(0x1e9)),_0x153445=JSON[_0x31d7d8(0x1df)](_0xcdb6ce);return{'apps':_0x153445['apps']&&typeof _0x153445[_0x31d7d8(0x1ea)]===_0x31d7d8(0x1d5)?_0x153445[_0x31d7d8(0x1ea)]:{}};}catch(_0x116fb5){if(_0x116fb5[_0x31d7d8(0x1e8)]===_0x31d7d8(0x1de))return null;throw new Error(_0x31d7d8(0x1d6)+String(_0x116fb5));}}export async function writeBffLockFile(_0x447655,_0x10ff95){const _0x3794a5=a293_0x2855;await mkdir(dirname(_0x447655),{'recursive':!![]}),await writeFile(_0x447655,JSON[_0x3794a5(0x1e7)](_0x10ff95,null,0x2),'utf8');}function a293_0x51f1(){const _0x42fd13=['1707520sLMmIu','1733400VXKcGG',':\x20scriptsRoot\x20mismatch\x20—\x20','ENOENT','parse','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','5860thjHwt','2794098QuKVIL','lastSync','122046EhBkCK','current\x20\x22','13471344WTSeMo','stringify','code','utf8','apps','21KYTXSm','object','Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20','6147432jspUlt','scriptsRoot','1878EtwCTD','functions'];a293_0x51f1=function(){return _0x42fd13;};return a293_0x51f1();}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a295_0x1d1d8a=a295_0xfbb4;(function(_0x4fb070,_0x4f053c){const _0x211983=a295_0xfbb4,_0x30cc40=_0x4fb070();while(!![]){try{const _0x487f0f=-parseInt(_0x211983(0x18a))/0x1*(-parseInt(_0x211983(0x185))/0x2)+-parseInt(_0x211983(0x187))/0x3+parseInt(_0x211983(0x193))/0x4*(parseInt(_0x211983(0x197))/0x5)+-parseInt(_0x211983(0x180))/0x6*(parseInt(_0x211983(0x196))/0x7)+-parseInt(_0x211983(0x199))/0x8+parseInt(_0x211983(0x195))/0x9+-parseInt(_0x211983(0x18c))/0xa*(-parseInt(_0x211983(0x190))/0xb);if(_0x487f0f===_0x4f053c)break;else _0x30cc40['push'](_0x30cc40['shift']());}catch(_0x3d9d20){_0x30cc40['push'](_0x30cc40['shift']());}}}(a295_0x3102,0x3fe16));export const DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x1d1d8a(0x18b);function a295_0x3102(){const _0x16818b=['toUpperCase','replace','20zKCltD','entries','757647SJCGXe','793499JMxQxE','64110HLumak','functionNode','2881528YKFRoY','12unLhoo','datasetCode','trim','map','test','188830EkgLMA','toLowerCase','154035ckpUko','remoteId','operationType','2HPTBVg','TODO:\x20补充脚本功能描述','5627810JkllGR','startsWith','TODO:\x20add\x20script\x20description','match','11eVMetm'];a295_0x3102=function(){return _0x16818b;};return a295_0x3102();}const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x1d1d8a(0x18e);export function snakeToCamel(_0x4fc243){const _0xc5ac0f=a295_0x1d1d8a;return _0x4fc243[_0xc5ac0f(0x186)]()[_0xc5ac0f(0x192)](/_([a-z])/g,(_0x2b6085,_0x5352fc)=>_0x5352fc[_0xc5ac0f(0x191)]());}export function findHookLocationByRemoteId(_0x57e0ed,_0xb2479e){const _0x4a6953=a295_0x1d1d8a;if(!_0xb2479e)return undefined;for(const [_0x5e1abb,_0x35ec7c]of Object[_0x4a6953(0x194)](_0x57e0ed)){if(_0x35ec7c[_0x4a6953(0x188)]===_0xb2479e&&_0x35ec7c['datasetCode']&&_0x35ec7c[_0x4a6953(0x189)]&&_0x35ec7c[_0x4a6953(0x198)]){const _0x374fcf=_0x5e1abb['split']('/')[0x1];return{'alias':_0x374fcf||_0x35ec7c['alias'],'datasetCode':_0x35ec7c[_0x4a6953(0x181)],'operationType':_0x35ec7c[_0x4a6953(0x189)],'functionNode':_0x35ec7c['functionNode']};}}return undefined;}export function extractScriptDescription(_0x350111){const _0x1b31e6=a295_0x1d1d8a,_0x5e2792=_0x350111[_0x1b31e6(0x18f)](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x5e2792?.[0x1])return undefined;const _0x1d762f=_0x5e2792[0x1],_0x4d8905=_0xf96880=>{const _0x54e593=_0xf96880?.['trim']();if(!_0x54e593||_0x54e593===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0x54e593===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0x54e593;},_0x5dcc27=_0x1d762f[_0x1b31e6(0x18f)](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x5dcc27)return _0x4d8905(_0x5dcc27[0x1]);const _0x4fde0a=_0x1d762f['split'](/\r?\n/)[_0x1b31e6(0x183)](_0x34f6d1=>_0x34f6d1[_0x1b31e6(0x192)](/^\s*\*\s?/,'')[_0x1b31e6(0x182)]()),_0x2408c0=_0x4fde0a['some'](_0x576a75=>/^\[\s*脚本类型\s*]\s*\S+/[_0x1b31e6(0x184)](_0x576a75))&&_0x4fde0a['some'](_0x2a5fb5=>/^\[\s*脚本名称\s*]\s*\S+/[_0x1b31e6(0x184)](_0x2a5fb5));if(!_0x2408c0)return undefined;for(const _0x2e49d6 of _0x4fde0a){if(!_0x2e49d6||_0x2e49d6[_0x1b31e6(0x18d)]('@')||/^\[[^\]]+]\s*/[_0x1b31e6(0x184)](_0x2e49d6))continue;return _0x4d8905(_0x2e49d6);}return undefined;}export function isValidBffFunctionName(_0x157cb6){const _0x3d806a=a295_0x1d1d8a;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x3d806a(0x184)](_0x157cb6);}function a295_0xfbb4(_0x47d453,_0x5d7c0a){_0x47d453=_0x47d453-0x180;const _0x310222=a295_0x3102();let _0xfbb40d=_0x310222[_0x47d453];return _0xfbb40d;}export function normalizeHookFunctionNode(_0x28e38a){const _0x3d0f46=a295_0x1d1d8a;if(!_0x28e38a)return undefined;const _0x48a7df=_0x28e38a[_0x3d0f46(0x182)]()[_0x3d0f46(0x186)]();if(_0x48a7df==='before'||_0x48a7df==='after')return _0x48a7df;return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a296_0x38dea5=a296_0x2c4c;(function(_0x432220,_0x599e4c){const _0x2993a9=a296_0x2c4c,_0x56a738=_0x432220();while(!![]){try{const _0x3f5d47=parseInt(_0x2993a9(0x18f))/0x1*(parseInt(_0x2993a9(0x188))/0x2)+parseInt(_0x2993a9(0x186))/0x3+parseInt(_0x2993a9(0x187))/0x4*(parseInt(_0x2993a9(0x190))/0x5)+-parseInt(_0x2993a9(0x18c))/0x6+parseInt(_0x2993a9(0x189))/0x7+parseInt(_0x2993a9(0x18e))/0x8+-parseInt(_0x2993a9(0x18b))/0x9*(parseInt(_0x2993a9(0x18a))/0xa);if(_0x3f5d47===_0x599e4c)break;else _0x56a738['push'](_0x56a738['shift']());}catch(_0x205598){_0x56a738['push'](_0x56a738['shift']());}}}(a296_0x1695,0xcdf20));function a296_0x2c4c(_0x54c187,_0x397040){_0x54c187=_0x54c187-0x185;const _0x1695da=a296_0x1695();let _0x2c4c5a=_0x1695da[_0x54c187];return _0x2c4c5a;}export const CROSS_DB_ANALYSIS_PATHS={'start':'/smartapi/db-analysis/cross-db/start','status':a296_0x38dea5(0x18d),'latest':a296_0x38dea5(0x185)};function a296_0x1695(){const _0x308b5c=['/smartapi/db-analysis/cross-db/status','8476000TlCosq','1GWhJer','10CFWMZc','/smartapi/db-analysis/cross-db/latest-job','1247313pLrfqb','2602456DyGIvA','2175318BakGsp','1290149bHjjHB','262840kWbxko','666BhrzpK','7559382NYbTgX'];a296_0x1695=function(){return _0x308b5c;};return a296_0x1695();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a297_0x4cb779=a297_0x3e96;function a297_0x3e96(_0x46dd3f,_0x222fa4){_0x46dd3f=_0x46dd3f-0x9a;const _0x51f77c=a297_0x51f7();let _0x3e960b=_0x51f77c[_0x46dd3f];return _0x3e960b;}function a297_0x51f7(){const _0x5975ea=['214039neGMPU','827430zzjOHA','/smartapi/cross-db-relation/update','964TzGpYc','6350HuoBGQ','490VreekZ','/smartapi/cross-db-relation/query','108xCbIhf','192731NwQvgg','13QAdDVC','/smartapi/cross-db-relation/delete','243OmNyWJ','775089lWJAZo','114952aXPeKq','5410716LKpxvA','8LFaRoB'];a297_0x51f7=function(){return _0x5975ea;};return a297_0x51f7();}(function(_0x5695a6,_0x575a4b){const _0x246fdc=a297_0x3e96,_0x4580d8=_0x5695a6();while(!![]){try{const _0x28f05c=parseInt(_0x246fdc(0xa2))/0x1+parseInt(_0x246fdc(0xa5))/0x2*(-parseInt(_0x246fdc(0xa7))/0x3)+-parseInt(_0x246fdc(0xa9))/0x4*(parseInt(_0x246fdc(0x9a))/0x5)+-parseInt(_0x246fdc(0x9d))/0x6*(-parseInt(_0x246fdc(0xa6))/0x7)+-parseInt(_0x246fdc(0xa3))/0x8*(parseInt(_0x246fdc(0xa1))/0x9)+-parseInt(_0x246fdc(0x9b))/0xa*(-parseInt(_0x246fdc(0x9e))/0xb)+-parseInt(_0x246fdc(0xa4))/0xc*(-parseInt(_0x246fdc(0x9f))/0xd);if(_0x28f05c===_0x575a4b)break;else _0x4580d8['push'](_0x4580d8['shift']());}catch(_0x58669e){_0x4580d8['push'](_0x4580d8['shift']());}}}(a297_0x51f7,0xcc7f8));export const CROSS_DB_RELATION_PATHS={'list':a297_0x4cb779(0x9c),'create':'/smartapi/cross-db-relation/create','update':a297_0x4cb779(0xa8),'delete':a297_0x4cb779(0xa0)};
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3363ce,_0x2cf567){const _0x2666fb=a298_0x2457,_0x25f82e=_0x3363ce();while(!![]){try{const _0xe990fe=-parseInt(_0x2666fb(0x1ba))/0x1*(-parseInt(_0x2666fb(0x1bb))/0x2)+-parseInt(_0x2666fb(0x1d5))/0x3+parseInt(_0x2666fb(0x1b9))/0x4*(parseInt(_0x2666fb(0x1cf))/0x5)+parseInt(_0x2666fb(0x1bd))/0x6*(parseInt(_0x2666fb(0x1c4))/0x7)+-parseInt(_0x2666fb(0x1c3))/0x8*(parseInt(_0x2666fb(0x1be))/0x9)+parseInt(_0x2666fb(0x1b8))/0xa*(parseInt(_0x2666fb(0x1c5))/0xb)+-parseInt(_0x2666fb(0x1cd))/0xc;if(_0xe990fe===_0x2cf567)break;else _0x25f82e['push'](_0x25f82e['shift']());}catch(_0x1ce02b){_0x25f82e['push'](_0x25f82e['shift']());}}}(a298_0x3e3a,0xbba58));import{listDatasets}from'../core/api-client.js';function a298_0x3e3a(){const _0x43b0de=['10319823qoAMGE','join','find','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','filter','8OuDSVe','1009183BfhKSy','10255619cfLWIC','dbtableConfig','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','db-','includes','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','toLowerCase','isNaN','24610068GiNjpT','dbName','5iFkyxE','\x22\x20under\x20app\x20\x22','length','.\x20Be\x20more\x20specific.','dbId','No\x20database\x20matching\x20\x22','576510NTWeoe','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','10QXczTU','3029124cyTHQq','125cVhmkm','18738kljWSc','map','54AYSlRZ'];a298_0x3e3a=function(){return _0x43b0de;};return a298_0x3e3a();}const cache=new Map();export async function listDatabases(_0x1370e7){const _0x8c6d76=a298_0x2457;if(cache['has'](_0x1370e7))return cache['get'](_0x1370e7);const _0x34ad77=await listDatasets(_0x1370e7),_0x2c20e3=new Map();for(const _0x267c40 of _0x34ad77){const _0x1e6e21=_0x267c40[_0x8c6d76(0x1c6)];_0x1e6e21?.[_0x8c6d76(0x1d3)]!=null&&_0x2c20e3['set'](_0x1e6e21['dbId'],_0x1e6e21['dbName']??_0x8c6d76(0x1c8)+_0x1e6e21[_0x8c6d76(0x1d3)]);}const _0x3a77a9=[..._0x2c20e3['entries']()][_0x8c6d76(0x1bc)](([_0x596c96,_0x48b3c9])=>({'dbId':_0x596c96,'dbName':_0x48b3c9}));return cache['set'](_0x1370e7,_0x3a77a9),_0x3a77a9;}export async function resolveDb(_0xa251be,_0x47ecfa){const _0x248e2e=a298_0x2457,_0x2297bc=await listDatabases(_0xa251be);if(_0x2297bc['length']===0x0)return{'resolved':[],'error':_0x248e2e(0x1c1)+_0xa251be+_0x248e2e(0x1c7)};if(!_0x47ecfa)return{'resolved':_0x2297bc};const _0x17f44c=Number(_0x47ecfa);if(!Number[_0x248e2e(0x1cc)](_0x17f44c)){const _0x1eb088=_0x2297bc[_0x248e2e(0x1c0)](_0x11033c=>_0x11033c['dbId']===_0x17f44c);if(_0x1eb088)return{'resolved':[_0x1eb088]};}const _0x1ad19d=_0x47ecfa['toLowerCase'](),_0xe74fed=_0x2297bc[_0x248e2e(0x1c2)](_0x433361=>_0x433361[_0x248e2e(0x1ce)][_0x248e2e(0x1cb)]()[_0x248e2e(0x1c9)](_0x1ad19d));if(_0xe74fed[_0x248e2e(0x1d1)]>0x0)return{'resolved':_0xe74fed};const _0x27140f=_0x2297bc[_0x248e2e(0x1bc)](_0x2e3505=>_0x2e3505['dbName']+'\x20('+_0x2e3505['dbId']+')')[_0x248e2e(0x1bf)](',\x20');return{'resolved':[],'error':_0x248e2e(0x1d4)+_0x47ecfa+_0x248e2e(0x1d0)+_0xa251be+'\x22.\x20Available:\x20'+_0x27140f+_0x248e2e(0x1ca)};}function a298_0x2457(_0x476af4,_0xdb387d){_0x476af4=_0x476af4-0x1b7;const _0x3e3a0a=a298_0x3e3a();let _0x24573c=_0x3e3a0a[_0x476af4];return _0x24573c;}export async function resolveOneDb(_0x9e6f5c,_0xab6995){const _0x425d4f=a298_0x2457,{resolved:_0x45b647,error:_0x1a1929}=await resolveDb(_0x9e6f5c,_0xab6995);if(_0x1a1929)return{'db':null,'error':_0x1a1929};if(_0x45b647[_0x425d4f(0x1d1)]===0x1)return{'db':_0x45b647[0x0]};if(!_0xab6995){const _0x1b6344=_0x45b647[_0x425d4f(0x1bc)](_0x3acb73=>_0x3acb73[_0x425d4f(0x1ce)]+'\x20('+_0x3acb73[_0x425d4f(0x1d3)]+')')['join'](',\x20');return{'db':null,'error':_0x425d4f(0x1b7)+_0x1b6344};}const _0x4658a2=_0x45b647['map'](_0xcaa39a=>_0xcaa39a[_0x425d4f(0x1ce)]+'\x20('+_0xcaa39a[_0x425d4f(0x1d3)]+')')[_0x425d4f(0x1bf)](',\x20');return{'db':null,'error':'\x22'+_0xab6995+'\x22\x20matches\x20multiple\x20databases:\x20'+_0x4658a2+_0x425d4f(0x1d2)};}export async function getDbName(_0x2182a6,_0x276aa){const _0x362d47=a298_0x2457,_0x1d043b=await listDatabases(_0x2182a6);return _0x1d043b[_0x362d47(0x1c0)](_0x5333e4=>_0x5333e4[_0x362d47(0x1d3)]===_0x276aa)?.['dbName'];}
|