@lovrabet/rabetbase-cli 2.5.10-beta.1 → 2.5.10-beta.3
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.d.ts +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.d.ts +0 -28
- 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.d.ts +8 -0
- package/lib/core/instant-api-policy/endpoints.js +1 -0
- package/lib/core/kb-management-client.d.ts +3 -9
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +1 -4
- 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 +3 -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_0x211cdf=a290_0x4099;(function(_0x3176ef,_0xa1c58b){const _0x39195d=a290_0x4099,_0x44fce0=_0x3176ef();while(!![]){try{const _0x3c511c=parseInt(_0x39195d(0x18f))/0x1*(-parseInt(_0x39195d(0x1aa))/0x2)+-parseInt(_0x39195d(0x1ae))/0x3+parseInt(_0x39195d(0x1b1))/0x4+-parseInt(_0x39195d(0x1a3))/0x5+parseInt(_0x39195d(0x1b6))/0x6*(-parseInt(_0x39195d(0x1a1))/0x7)+parseInt(_0x39195d(0x1a2))/0x8*(-parseInt(_0x39195d(0x193))/0x9)+parseInt(_0x39195d(0x197))/0xa;if(_0x3c511c===_0xa1c58b)break;else _0x44fce0['push'](_0x44fce0['shift']());}catch(_0x4439fa){_0x44fce0['push'](_0x44fce0['shift']());}}}(a290_0x492e,0x68879));function a290_0x4099(_0x57f10a,_0x3a0eb8){_0x57f10a=_0x57f10a-0x18c;const _0x492e04=a290_0x492e();let _0x4099fc=_0x492e04[_0x57f10a];return _0x4099fc;}import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join,resolve,sep}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=[a290_0x211cdf(0x18e),a290_0x211cdf(0x196),'HOOK'];export function normalizeBffType(_0x3e95ee){const _0x1a2396=a290_0x211cdf;if(!_0x3e95ee)return undefined;const _0x343fd1=_0x3e95ee[_0x1a2396(0x1a7)]()[_0x1a2396(0x1b0)]();return SUPPORTED_BFF_TYPES[_0x1a2396(0x19e)](_0x343fd1)?_0x343fd1:undefined;}async function scanJsFilesRecursively(_0x13d39d,_0x17574a){const _0x2da6f8=a290_0x211cdf,_0x5287d8=[];try{const _0x313565=await readdir(_0x13d39d,{'withFileTypes':!![]});for(const _0x3fdef9 of _0x313565){const _0x4c035b=join(_0x13d39d,_0x3fdef9['name']);if(_0x3fdef9['isDirectory']())_0x5287d8[_0x2da6f8(0x19a)](...await scanJsFilesRecursively(_0x4c035b,_0x17574a+'/'+_0x3fdef9['name']));else _0x3fdef9[_0x2da6f8(0x18d)]()&&_0x3fdef9[_0x2da6f8(0x1a4)]['endsWith'](_0x2da6f8(0x1b3))&&_0x5287d8[_0x2da6f8(0x19a)]({'lockKey':_0x17574a+'/'+_0x3fdef9[_0x2da6f8(0x1a4)][_0x2da6f8(0x1ab)](/\.js$/,''),'filePath':_0x4c035b});}}catch(_0x46c317){if(_0x46c317[_0x2da6f8(0x1b4)]!==_0x2da6f8(0x1ac))throw _0x46c317;}return _0x5287d8;}async function scanFlatFunctions(_0x4701e3,_0x21e636){const _0x3a4e0b=a290_0x211cdf,_0x9684d5=join(_0x4701e3[_0x3a4e0b(0x1af)],_0x21e636),_0x1406cc=await scanJsFilesRecursively(_0x9684d5,_0x21e636);return _0x1406cc[_0x3a4e0b(0x1a6)](({lockKey:_0x2a5ccb,filePath:_0x31f5a8})=>({'type':_0x21e636,'name':_0x2a5ccb[_0x3a4e0b(0x19c)]('/')['at'](-0x1)??'','filePath':_0x31f5a8,'lockKey':_0x2a5ccb}));}async function scanHookFunctions(_0x4bb65f){const _0x291afa=a290_0x211cdf,_0x1652f5=join(_0x4bb65f[_0x291afa(0x1af)],_0x291afa(0x199)),_0x8350b5=[];try{const _0x342c97=await readdir(_0x1652f5,{'withFileTypes':!![]});for(const _0x16a15f of _0x342c97){if(!_0x16a15f[_0x291afa(0x192)]())continue;const _0x470f7c=_0x16a15f[_0x291afa(0x1a4)],_0x4745bd=join(_0x1652f5,_0x470f7c),_0x200975=await readdir(_0x4745bd,{'withFileTypes':!![]});for(const _0x34a1fa of _0x200975){if(!_0x34a1fa[_0x291afa(0x192)]())continue;const _0x56e8b0=_0x34a1fa['name'],_0x326b89=join(_0x4745bd,_0x56e8b0),_0x413e3a=await readdir(_0x326b89,{'withFileTypes':!![]});for(const _0x2d480d of _0x413e3a){if(!_0x2d480d[_0x291afa(0x192)]())continue;const _0x30332f=_0x2d480d[_0x291afa(0x1a4)],_0x214bb5=join(_0x326b89,_0x30332f),_0x3d7df2=await readdir(_0x214bb5,{'withFileTypes':!![]});for(const _0x24e8c1 of _0x3d7df2){if(!_0x24e8c1['isFile']()||!_0x24e8c1[_0x291afa(0x1a4)][_0x291afa(0x190)](_0x291afa(0x1b3)))continue;const _0x15ff80=_0x24e8c1[_0x291afa(0x1a4)][_0x291afa(0x1ab)](/\.js$/,'');_0x8350b5[_0x291afa(0x19a)]({'type':_0x291afa(0x199),'name':_0x15ff80,'filePath':join(_0x214bb5,_0x24e8c1[_0x291afa(0x1a4)]),'lockKey':_0x291afa(0x1ad)+_0x470f7c+'/'+_0x56e8b0+'/'+_0x30332f+'/'+_0x15ff80,'alias':_0x470f7c,'operationType':_0x56e8b0,'functionNode':_0x30332f});}}}}}catch(_0x2cbb6a){if(_0x2cbb6a[_0x291afa(0x1b4)]!==_0x291afa(0x1ac))throw _0x2cbb6a;}return _0x8350b5;}export async function scanLocalBffFunctions(_0x49acc1,_0x2c4b17){const _0x4e5481=a290_0x211cdf;if(_0x2c4b17===_0x4e5481(0x18e)||_0x2c4b17===_0x4e5481(0x196))return scanFlatFunctions(_0x49acc1,_0x2c4b17);if(_0x2c4b17==='HOOK')return scanHookFunctions(_0x49acc1);const [_0x346f36,_0x207313,_0x595f7d]=await Promise['all']([scanFlatFunctions(_0x49acc1,_0x4e5481(0x18e)),scanFlatFunctions(_0x49acc1,_0x4e5481(0x196)),scanHookFunctions(_0x49acc1)]);return[..._0x346f36,..._0x207313,..._0x595f7d];}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x5d7438){const _0x1520d6=a290_0x211cdf;return SAFE_LOCK_KEY_SEGMENT[_0x1520d6(0x1a5)](_0x5d7438)&&_0x5d7438!=='.'&&_0x5d7438!=='..';}export function resolveLocalFilePathFromLockKey(_0x1b8d20,_0x37b244){const _0x9cd6b1=a290_0x211cdf,_0x16da9f=_0x37b244[_0x9cd6b1(0x19c)]('/');if(!_0x16da9f['every'](isSafeLockKeySegment))throw new Error(_0x9cd6b1(0x1b5)+_0x37b244);const _0x3f6cc9=resolve(join(_0x1b8d20['scriptsRootDir'],..._0x16da9f)+_0x9cd6b1(0x1b3)),_0x4c4ae0=resolve(_0x1b8d20[_0x9cd6b1(0x1af)]);if(_0x3f6cc9!==_0x4c4ae0&&!_0x3f6cc9['startsWith'](_0x4c4ae0+sep))throw new Error(_0x9cd6b1(0x195)+_0x3f6cc9);return _0x3f6cc9;}export function createHookLocationMap(_0x31127f){const _0x3bb25b=a290_0x211cdf,_0x1fab85=new Map();for(const _0x1e74ec of _0x31127f){_0x1e74ec[_0x3bb25b(0x19f)]&&_0x1fab85[_0x3bb25b(0x194)](_0x1e74ec[_0x3bb25b(0x19f)],{'datasetCode':_0x1e74ec[_0x3bb25b(0x19b)],'operationType':snakeToCamel(_0x1e74ec[_0x3bb25b(0x191)]),'functionNode':_0x3bb25b(0x1a0)}),_0x1e74ec[_0x3bb25b(0x18c)]&&_0x1fab85[_0x3bb25b(0x194)](_0x1e74ec[_0x3bb25b(0x18c)],{'datasetCode':_0x1e74ec[_0x3bb25b(0x19b)],'operationType':snakeToCamel(_0x1e74ec['operationType']),'functionNode':_0x3bb25b(0x1a9)});}return _0x1fab85;}export function resolveRemoteScriptTarget(_0x5a25c1,_0x46eae9,_0x29f45f,_0x3d1bf8,_0x1e18c5){const _0x5ee4cb=a290_0x211cdf,_0x433770=normalizeBffType(_0x46eae9[_0x5ee4cb(0x1b2)]);if(!_0x433770||!_0x46eae9[_0x5ee4cb(0x1a8)])return null;if(_0x433770===_0x5ee4cb(0x199)){const _0x5ece96=_0x46eae9['id']?_0x29f45f[_0x5ee4cb(0x19d)](_0x46eae9['id']):undefined,_0x95abab=findHookLocationByRemoteId(_0x3d1bf8,_0x46eae9['id']),_0x30240d=_0x5ece96?{..._0x95abab?.['datasetCode']===_0x5ece96['datasetCode']?_0x95abab:{},..._0x5ece96}:_0x95abab;if(!_0x30240d)return null;const _0x1f10cf=_0x1e18c5[_0x5ee4cb(0x19d)](_0x30240d[_0x5ee4cb(0x19b)]['toLowerCase']()),_0x49a7a3=_0x1f10cf??_0x30240d[_0x5ee4cb(0x19b)],_0x41f750={..._0x30240d,'alias':_0x1f10cf},_0x531e41='HOOK/'+_0x49a7a3+'/'+_0x41f750[_0x5ee4cb(0x191)]+'/'+_0x41f750['functionNode']+'/'+_0x46eae9[_0x5ee4cb(0x1a8)];if(!_0x531e41['split']('/')['every'](isSafeLockKeySegment))return null;return{'lockKey':_0x531e41,'filePath':resolveLocalFilePathFromLockKey(_0x5a25c1,_0x531e41),'type':_0x5ee4cb(0x199),'hookLocation':_0x41f750};}const _0x2dc931=_0x433770+'/'+_0x46eae9['functionName'];if(!_0x2dc931[_0x5ee4cb(0x19c)]('/')['every'](isSafeLockKeySegment))return null;return{'lockKey':_0x2dc931,'filePath':resolveLocalFilePathFromLockKey(_0x5a25c1,_0x2dc931),'type':_0x433770};}function a290_0x492e(){const _0x234ac5=['functionName','after','6676AZVydt','replace','ENOENT','HOOK/','1909881xEjiPu','scriptsRootDir','toUpperCase','2891828Qxvhfj','scriptType','.js','code','Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20','6RNdiwJ','afterScriptId','isFile','COMMON','157XgmpjE','endsWith','operationType','isDirectory','1082583urnGaq','set','Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20','ENDPOINT','24941800CVcbdp','F_OK','HOOK','push','datasetCode','split','get','includes','beforeScriptId','before','5513669leaRit','8TpTqQu','3601685SFosFN','name','test','map','trim'];a290_0x492e=function(){return _0x234ac5;};return a290_0x492e();}export async function ensureParentDirectory(_0x4a5da6){await mkdir(dirname(_0x4a5da6),{'recursive':!![]});}export async function fileExists(_0x4275a2){const _0x10e33f=a290_0x211cdf;try{return await access(_0x4275a2,constants[_0x10e33f(0x198)]),!![];}catch{return![];}}export async function directoryExists(_0x59f8f3){try{const _0x321959=await stat(_0x59f8f3);return _0x321959['isDirectory']();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x10be35,_0x3422b3){const _0x3e1186=a291_0x550b,_0x19fa61=_0x10be35();while(!![]){try{const _0x17c348=-parseInt(_0x3e1186(0x86))/0x1*(-parseInt(_0x3e1186(0x89))/0x2)+-parseInt(_0x3e1186(0x8a))/0x3*(parseInt(_0x3e1186(0x8b))/0x4)+-parseInt(_0x3e1186(0x85))/0x5*(-parseInt(_0x3e1186(0x87))/0x6)+parseInt(_0x3e1186(0x83))/0x7+-parseInt(_0x3e1186(0x8e))/0x8+-parseInt(_0x3e1186(0x8f))/0x9+-parseInt(_0x3e1186(0x84))/0xa*(-parseInt(_0x3e1186(0x91))/0xb);if(_0x17c348===_0x3422b3)break;else _0x19fa61['push'](_0x19fa61['shift']());}catch(_0x13a9d6){_0x19fa61['push'](_0x19fa61['shift']());}}}(a291_0x13f8,0x4dbfc));import{readFile}from'node:fs/promises';function a291_0x550b(_0x59099d,_0x1409fc){_0x59099d=_0x59099d-0x83;const _0x13f87a=a291_0x13f8();let _0x550b08=_0x13f87a[_0x59099d];return _0x550b08;}import a291_0x191bdb from'node:crypto';export function computeContentHash(_0x562267){const _0x1a9546=a291_0x550b;return a291_0x191bdb['createHash'](_0x1a9546(0x8c))['update'](_0x562267)[_0x1a9546(0x88)](_0x1a9546(0x90));}export async function computeFileHash(_0x1a188f){const _0x5b7b96=a291_0x550b,_0x4650c0=await readFile(_0x1a188f,_0x5b7b96(0x8d));return computeContentHash(_0x4650c0);}function a291_0x13f8(){const _0x9fe8ca=['2955354NRqHOM','digest','366iHgwFo','13752qEIJQc','264anoXHq','md5','utf8','955408ixThVV','4706145QStRRV','hex','11PsBweJ','3484418DbQFUK','136910Pipali','5wocJRY','1417QYVykU'];a291_0x13f8=function(){return _0x9fe8ca;};return a291_0x13f8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x15d53c,_0x531d38){const _0x29703a=a292_0x2b23,_0x221c22=_0x15d53c();while(!![]){try{const _0x921bff=parseInt(_0x29703a(0x154))/0x1+-parseInt(_0x29703a(0x150))/0x2+-parseInt(_0x29703a(0x16e))/0x3+parseInt(_0x29703a(0x172))/0x4+parseInt(_0x29703a(0x167))/0x5+-parseInt(_0x29703a(0x175))/0x6*(parseInt(_0x29703a(0x160))/0x7)+parseInt(_0x29703a(0x14b))/0x8;if(_0x921bff===_0x531d38)break;else _0x221c22['push'](_0x221c22['shift']());}catch(_0x30d10b){_0x221c22['push'](_0x221c22['shift']());}}}(a292_0x2c6f,0x7019b));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x304d72){const _0x212093=a292_0x2b23,_0x32ca1f=[];for(const [_0x39ab65,_0x473038]of Object[_0x212093(0x165)](_0x304d72[_0x212093(0x149)])){const [_0x2455ec,_0x74f829]=_0x39ab65[_0x212093(0x15d)]('/');if(_0x2455ec!==_0x212093(0x159)||!_0x74f829||!_0x473038[_0x212093(0x16f)])continue;_0x32ca1f[_0x212093(0x155)]({'alias':_0x74f829,'datasetCode':_0x473038[_0x212093(0x16f)]});}return _0x32ca1f;}export function uniqueTrackedHookDirectoryByDataset(_0x10f5d5){const _0x47927c=a292_0x2b23,_0x65f849=new Map();for(const _0x55ad16 of trackedHookDirectoryMappings(_0x10f5d5)){const _0x4e79e3=directoryIdentity(_0x55ad16['datasetCode']),_0x621e00=_0x65f849[_0x47927c(0x151)](_0x4e79e3)??new Map();_0x621e00[_0x47927c(0x156)](directoryIdentity(_0x55ad16[_0x47927c(0x14c)]),_0x55ad16[_0x47927c(0x14c)]),_0x65f849[_0x47927c(0x156)](_0x4e79e3,_0x621e00);}const _0x113499=new Map();for(const [_0xdb0d72,_0x4616ae]of _0x65f849){if(_0x4616ae[_0x47927c(0x152)]>0x1)throw hookDirectoryError(_0x47927c(0x16a),_0x47927c(0x14a)+_0xdb0d72+'\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20'+[..._0x4616ae[_0x47927c(0x15e)]()][_0x47927c(0x16d)](',\x20')+'.',{'datasetCode':_0xdb0d72,'directories':[..._0x4616ae[_0x47927c(0x15e)]()]});_0x113499[_0x47927c(0x156)](_0xdb0d72,[..._0x4616ae[_0x47927c(0x15e)]()][0x0]);}return _0x113499;}function a292_0x2c6f(){const _0x19fab7=['HOOK_DATASET_NOT_FOUND','HOOK_MAPPING_DRIFT','join','855498JFtdJZ','datasetCode','HOOK\x20directory\x20\x22','datasetCodeToDatasets','1189588sSPxFW','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','HOOK_DATASET_CODE_AMBIGUOUS','126jxqHUk','functions','Dataset\x20\x22','7872424LawGVi','alias','details','toLowerCase','code','772662swyItP','get','size','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','17717fLPStC','push','set','SDK\x20alias\x20\x22','HOOK_ALIAS_AMBIGUOUS','HOOK','HOOK_DIRECTORY_AMBIGUOUS','type','map','split','values','message','130263SUKqIU','includes','Incomplete\x20HOOK\x20path:\x20','lockKey','length','entries','HOOK_DIRECTORY_UNRESOLVED','1111410UJvhoB','add','normalize','HOOK_DUPLICATE_DIRECTORIES'];a292_0x2c6f=function(){return _0x19fab7;};return a292_0x2c6f();}export function assertUnambiguousHookDirectoryMappings(_0x349845){const _0x154f10=a292_0x2b23,_0x1e069b=new Map();for(const {alias:_0x5c5ff5,datasetCode:_0x548b14}of _0x349845){const _0x31048e=directoryIdentity(_0x5c5ff5),_0x9fbb28=_0x1e069b[_0x154f10(0x151)](_0x31048e)??new Set();_0x9fbb28[_0x154f10(0x168)](_0x548b14),_0x1e069b[_0x154f10(0x156)](_0x31048e,_0x9fbb28);}for(const [_0x34112f,_0x9fa2bf]of _0x1e069b){if(_0x9fa2bf[_0x154f10(0x152)]>0x1)throw hookDirectoryError(_0x154f10(0x15a),'HOOK\x20directory\x20\x22'+_0x34112f+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'directoryName':_0x34112f,'datasetCodes':[..._0x9fa2bf]});}}export function assertUnambiguousHookAliases(_0x1124cc){const _0x4141d0=a292_0x2b23,_0x14563f=[..._0x1124cc],_0x29205f=new Map(),_0x119977=new Map();for(const {alias:_0x13989a,datasetCode:_0x23a22d}of _0x14563f){const _0x2ed1ee=directoryIdentity(_0x13989a),_0xad6d29=directoryIdentity(_0x23a22d),_0x30ea35=_0x29205f[_0x4141d0(0x151)](_0x2ed1ee)??new Set();_0x30ea35['add'](_0x23a22d),_0x29205f[_0x4141d0(0x156)](_0x2ed1ee,_0x30ea35);const _0x47cb8c=_0x119977['get'](_0xad6d29)??new Set();_0x47cb8c[_0x4141d0(0x168)](_0x13989a),_0x119977[_0x4141d0(0x156)](_0xad6d29,_0x47cb8c);}for(const [_0x2b350a,_0xb37458]of _0x29205f){if(_0xb37458[_0x4141d0(0x152)]>0x1)throw hookDirectoryError(_0x4141d0(0x158),_0x4141d0(0x157)+_0x2b350a+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'alias':_0x2b350a,'datasetCodes':[..._0xb37458]});}for(const [_0x369077,_0x64bc9a]of _0x119977){if(_0x64bc9a[_0x4141d0(0x152)]>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS','Dataset\x20\x22'+_0x369077+'\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.',{'datasetCode':_0x369077,'aliases':[..._0x64bc9a]});}}function a292_0x2b23(_0x5da015,_0x5cc098){_0x5da015=_0x5da015-0x149;const _0x2c6f29=a292_0x2c6f();let _0x2b2333=_0x2c6f29[_0x5da015];return _0x2b2333;}export function buildHookDirectoryIndexes(_0x4970b3,_0x46ed48=[]){const _0x1f17f2=a292_0x2b23,_0x4fecc1=[..._0x46ed48];assertUnambiguousHookDirectoryMappings(_0x4fecc1[_0x1f17f2(0x15c)](([_0x73bfac,_0x51d592])=>({'alias':_0x73bfac,'datasetCode':_0x51d592})));const _0x4eb2e2=new Map(),_0x3f0ee1=new Map();for(const _0x5c3f1e of _0x4970b3){appendUnique(_0x4eb2e2,directoryIdentity(_0x5c3f1e['code']),_0x5c3f1e,_0x26e3c1=>_0x26e3c1[_0x1f17f2(0x14f)]);}for(const [_0x553737,_0x16c9fc]of _0x4fecc1){appendUnique(_0x3f0ee1,directoryIdentity(_0x553737),_0x16c9fc,_0x54d4cf=>_0x54d4cf);}return{'datasetCodeToDatasets':_0x4eb2e2,'aliasToDatasetCodes':_0x3f0ee1};}export function resolvePushHookDirectory(_0x5e7922,_0xeddbb2,_0x113fe3){const _0x36d809=a292_0x2b23,_0x26b915=directoryIdentity(_0x5e7922),_0x476971=_0x113fe3[_0x36d809(0x171)][_0x36d809(0x151)](_0x26b915)??[],_0x2715ff=_0x113fe3['aliasToDatasetCodes']['get'](_0x26b915)??[],_0x55eea4=new Set([..._0x476971[_0x36d809(0x15c)](_0x136b25=>_0x136b25[_0x36d809(0x14f)]),..._0x2715ff]);if(_0x55eea4['size']>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS','HOOK\x20directory\x20\x22'+_0x5e7922+'\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.',{'directoryName':_0x5e7922,'datasetCodes':[..._0x55eea4]});const _0x45eeda=[..._0x55eea4][0x0];if(_0x45eeda&&_0xeddbb2?.[_0x36d809(0x16f)]&&_0x45eeda!==_0xeddbb2[_0x36d809(0x16f)])throw hookDirectoryError(_0x36d809(0x16c),_0x36d809(0x170)+_0x5e7922+_0x36d809(0x173)+_0xeddbb2[_0x36d809(0x16f)]+'\x22\x20to\x20\x22'+_0x45eeda+'\x22.',{'directoryName':_0x5e7922,'datasetCode':_0x45eeda,'lockedDatasetCode':_0xeddbb2[_0x36d809(0x16f)]});const _0x2e02e6=_0x45eeda?findDatasetByCode(_0x113fe3,_0x45eeda):undefined,_0x21d40f=!!_0x45eeda&&_0x2715ff[_0x36d809(0x161)](_0x45eeda);if(_0x2e02e6)return{'dataset':_0x2e02e6,'datasetCode':_0x2e02e6[_0x36d809(0x14f)],..._0x21d40f?{'alias':_0x5e7922}:{},'directoryProtocol':_0x21d40f?_0x36d809(0x14c):_0x36d809(0x16f),'warnings':[]};const _0x1ca35b=_0xeddbb2?.['datasetCode'];if(_0x1ca35b){const _0xd193ec=findDatasetByCode(_0x113fe3,_0x1ca35b);if(_0xd193ec)return{'dataset':_0xd193ec,'datasetCode':_0xd193ec[_0x36d809(0x14f)],..._0xeddbb2['alias']?{'alias':_0xeddbb2['alias']}:{},'directoryProtocol':_0xeddbb2['alias']?_0x36d809(0x14c):_0x36d809(0x16f),'warnings':[]};}if(_0x45eeda||_0x1ca35b){const _0x85e164=_0x45eeda??_0x1ca35b;throw hookDirectoryError(_0x36d809(0x16b),_0x36d809(0x170)+_0x5e7922+'\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.',{'directoryName':_0x5e7922,'datasetCode':_0x85e164});}throw hookDirectoryError(_0x36d809(0x166),'Cannot\x20resolve\x20HOOK\x20directory\x20\x22'+_0x5e7922+'\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.',{'directoryName':_0x5e7922});}export function preflightPushHookDirectories(_0x51b925,_0x3f817d,_0x4ca510,_0x1fb14a){const _0x228bfc=a292_0x2b23,_0x71edbf=new Map(),_0x2e35fd=new Map();for(const _0x300d65 of _0x51b925){if(_0x300d65[_0x228bfc(0x15b)]!==_0x228bfc(0x159))continue;const _0x98bd4a=_0x300d65[_0x228bfc(0x14c)];if(!_0x98bd4a)throw hookDirectoryError(_0x228bfc(0x166),_0x228bfc(0x162)+_0x300d65['lockKey'],{'lockKey':_0x300d65['lockKey']});let _0x3d5346;try{_0x3d5346=resolvePushHookDirectory(_0x98bd4a,_0x3f817d[_0x228bfc(0x149)][_0x300d65[_0x228bfc(0x163)]],_0x4ca510);}catch(_0x13c822){if(_0x1fb14a&&_0x13c822 instanceof CliError&&[_0x228bfc(0x16b),'HOOK_DIRECTORY_UNRESOLVED'][_0x228bfc(0x161)](_0x13c822[_0x228bfc(0x14f)])){_0x1fb14a[_0x228bfc(0x156)](_0x300d65[_0x228bfc(0x163)],_0x13c822[_0x228bfc(0x15f)]);continue;}throw _0x13c822;}_0x71edbf['set'](_0x300d65[_0x228bfc(0x163)],_0x3d5346);const _0x44d79a=_0x2e35fd[_0x228bfc(0x151)](_0x3d5346[_0x228bfc(0x16f)])??new Set();_0x44d79a[_0x228bfc(0x168)](_0x98bd4a),_0x2e35fd[_0x228bfc(0x156)](_0x3d5346[_0x228bfc(0x16f)],_0x44d79a);}for(const [_0x2cb895,_0x14c5c1]of _0x2e35fd){if(_0x14c5c1['size']>0x1)throw hookDirectoryError(_0x228bfc(0x16a),_0x228bfc(0x14a)+_0x2cb895+_0x228bfc(0x153)+[..._0x14c5c1][_0x228bfc(0x16d)](',\x20')+'.',{'datasetCode':_0x2cb895,'directories':[..._0x14c5c1]});}return _0x71edbf;}export function hookDirectoryError(_0x801753,_0x385946,_0x3b2272){const _0x43f816=a292_0x2b23,_0x25d61a=new CliError(_0x801753,0x2,_0x801753+':\x20'+_0x385946);return _0x25d61a[_0x43f816(0x14d)]=_0x3b2272,_0x25d61a;}function findDatasetByCode(_0x114305,_0x1cfee5){const _0x1c5c2c=a292_0x2b23,_0x2f124f=_0x114305[_0x1c5c2c(0x171)][_0x1c5c2c(0x151)](directoryIdentity(_0x1cfee5))??[];if(_0x2f124f[_0x1c5c2c(0x164)]>0x1)throw hookDirectoryError(_0x1c5c2c(0x174),'Dataset\x20code\x20\x22'+_0x1cfee5+'\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.',{'datasetCode':_0x1cfee5,'candidates':_0x2f124f['map'](datasetFact)});return _0x2f124f[0x0];}function directoryIdentity(_0x4f16f9){const _0x16bcc8=a292_0x2b23;return _0x4f16f9[_0x16bcc8(0x169)]('NFC')[_0x16bcc8(0x14e)]();}function appendUnique(_0x16a46f,_0x28beb1,_0x5ec305,_0x4015bc){const _0x1c86b3=a292_0x2b23,_0x221b5d=_0x16a46f[_0x1c86b3(0x151)](_0x28beb1)??[];!_0x221b5d['some'](_0x524108=>_0x4015bc(_0x524108)===_0x4015bc(_0x5ec305))&&_0x221b5d[_0x1c86b3(0x155)](_0x5ec305),_0x16a46f[_0x1c86b3(0x156)](_0x28beb1,_0x221b5d);}function datasetFact(_0x45aae6){return{'id':_0x45aae6['id'],'name':_0x45aae6['name'],'datasetCode':_0x45aae6['code']};}
|
|
1
|
+
(function(_0x277455,_0x4b856e){const _0x2eb773=a292_0xed1e,_0x5261fd=_0x277455();while(!![]){try{const _0x4e4a64=parseInt(_0x2eb773(0x189))/0x1*(-parseInt(_0x2eb773(0x16b))/0x2)+-parseInt(_0x2eb773(0x18b))/0x3*(-parseInt(_0x2eb773(0x181))/0x4)+-parseInt(_0x2eb773(0x16f))/0x5+-parseInt(_0x2eb773(0x167))/0x6*(parseInt(_0x2eb773(0x16a))/0x7)+parseInt(_0x2eb773(0x171))/0x8*(-parseInt(_0x2eb773(0x17c))/0x9)+parseInt(_0x2eb773(0x192))/0xa*(-parseInt(_0x2eb773(0x16c))/0xb)+parseInt(_0x2eb773(0x17d))/0xc;if(_0x4e4a64===_0x4b856e)break;else _0x5261fd['push'](_0x5261fd['shift']());}catch(_0x500edf){_0x5261fd['push'](_0x5261fd['shift']());}}}(a292_0x4fec,0x7fed0));function a292_0x4fec(){const _0x1856fd=['map','size','Incomplete\x20HOOK\x20path:\x20','datasetCode','values','set','add','6VHLETS','code','datasetCodeToDatasets','6562934WyPANk','1129996wbTByY','32593xUUgjY','alias','\x22\x20to\x20\x22','1874880LiMRDm','\x22\x20resolves\x20to\x20multiple\x20Datasets.','112EBLNFE','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','normalize','HOOK_ALIAS_AMBIGUOUS','some','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','HOOK','HOOK_DIRECTORY_AMBIGUOUS','HOOK_DUPLICATE_DIRECTORIES','HOOK_DIRECTORY_UNRESOLVED','name','168687CWobGN','27544116roNoBs','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','aliasToDatasetCodes','3098040Xraanj','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','Dataset\x20\x22','entries','type','HOOK\x20directory\x20\x22','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','1wMPwAW','HOOK_DATASET_CODE_AMBIGUOUS','3dCxrvo','push','HOOK_DATASET_NOT_FOUND','HOOK_MAPPING_DRIFT','functions','details','get','1370RcyYUd','Dataset\x20code\x20\x22','toLowerCase','message','lockKey'];a292_0x4fec=function(){return _0x1856fd;};return a292_0x4fec();}import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x82cc7b){const _0x12db5b=a292_0xed1e,_0x5ab350=[];for(const [_0x1c751e,_0x25fd6e]of Object[_0x12db5b(0x184)](_0x82cc7b['functions'])){const [_0x2ca5ca,_0x413958]=_0x1c751e['split']('/');if(_0x2ca5ca!==_0x12db5b(0x177)||!_0x413958||!_0x25fd6e[_0x12db5b(0x163)])continue;_0x5ab350[_0x12db5b(0x18c)]({'alias':_0x413958,'datasetCode':_0x25fd6e[_0x12db5b(0x163)]});}return _0x5ab350;}export function uniqueTrackedHookDirectoryByDataset(_0x1d9ecf){const _0x105196=a292_0xed1e,_0x2f5157=new Map();for(const _0x3e5b83 of trackedHookDirectoryMappings(_0x1d9ecf)){const _0x158968=directoryIdentity(_0x3e5b83[_0x105196(0x163)]),_0xfbb9e=_0x2f5157[_0x105196(0x191)](_0x158968)??new Map();_0xfbb9e[_0x105196(0x165)](directoryIdentity(_0x3e5b83['alias']),_0x3e5b83[_0x105196(0x16d)]),_0x2f5157[_0x105196(0x165)](_0x158968,_0xfbb9e);}const _0x12284c=new Map();for(const [_0x49e31d,_0x58e5fe]of _0x2f5157){if(_0x58e5fe[_0x105196(0x161)]>0x1)throw hookDirectoryError(_0x105196(0x179),_0x105196(0x183)+_0x49e31d+_0x105196(0x176)+[..._0x58e5fe[_0x105196(0x164)]()]['join'](',\x20')+'.',{'datasetCode':_0x49e31d,'directories':[..._0x58e5fe[_0x105196(0x164)]()]});_0x12284c[_0x105196(0x165)](_0x49e31d,[..._0x58e5fe[_0x105196(0x164)]()][0x0]);}return _0x12284c;}export function assertUnambiguousHookDirectoryMappings(_0x1e5c87){const _0x43153f=a292_0xed1e,_0xc20062=new Map();for(const {alias:_0x250ed4,datasetCode:_0x3c718c}of _0x1e5c87){const _0x52d9f2=directoryIdentity(_0x250ed4),_0x5e0b1b=_0xc20062[_0x43153f(0x191)](_0x52d9f2)??new Set();_0x5e0b1b[_0x43153f(0x166)](_0x3c718c),_0xc20062[_0x43153f(0x165)](_0x52d9f2,_0x5e0b1b);}for(const [_0x57d334,_0x485649]of _0xc20062){if(_0x485649[_0x43153f(0x161)]>0x1)throw hookDirectoryError(_0x43153f(0x178),'HOOK\x20directory\x20\x22'+_0x57d334+_0x43153f(0x170),{'directoryName':_0x57d334,'datasetCodes':[..._0x485649]});}}export function assertUnambiguousHookAliases(_0x1a8a40){const _0x1fbc2d=a292_0xed1e,_0xa03635=[..._0x1a8a40],_0x2f219c=new Map(),_0x45350a=new Map();for(const {alias:_0xec5b6c,datasetCode:_0x5cd5c2}of _0xa03635){const _0x2543ea=directoryIdentity(_0xec5b6c),_0xda4013=directoryIdentity(_0x5cd5c2),_0x354217=_0x2f219c[_0x1fbc2d(0x191)](_0x2543ea)??new Set();_0x354217[_0x1fbc2d(0x166)](_0x5cd5c2),_0x2f219c[_0x1fbc2d(0x165)](_0x2543ea,_0x354217);const _0x265894=_0x45350a[_0x1fbc2d(0x191)](_0xda4013)??new Set();_0x265894[_0x1fbc2d(0x166)](_0xec5b6c),_0x45350a[_0x1fbc2d(0x165)](_0xda4013,_0x265894);}for(const [_0x39ee06,_0x515d54]of _0x2f219c){if(_0x515d54[_0x1fbc2d(0x161)]>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS','SDK\x20alias\x20\x22'+_0x39ee06+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'alias':_0x39ee06,'datasetCodes':[..._0x515d54]});}for(const [_0x52be6e,_0x33ac07]of _0x45350a){if(_0x33ac07['size']>0x1)throw hookDirectoryError(_0x1fbc2d(0x174),_0x1fbc2d(0x183)+_0x52be6e+_0x1fbc2d(0x172),{'datasetCode':_0x52be6e,'aliases':[..._0x33ac07]});}}export function buildHookDirectoryIndexes(_0x3c2812,_0x2a8eff=[]){const _0x2faaa6=a292_0xed1e,_0x1ed63a=[..._0x2a8eff];assertUnambiguousHookDirectoryMappings(_0x1ed63a['map'](([_0x4b4d81,_0x346caa])=>({'alias':_0x4b4d81,'datasetCode':_0x346caa})));const _0x324e85=new Map(),_0x3e2f27=new Map();for(const _0x1a1909 of _0x3c2812){appendUnique(_0x324e85,directoryIdentity(_0x1a1909['code']),_0x1a1909,_0x3ebc82=>_0x3ebc82[_0x2faaa6(0x168)]);}for(const [_0x11649c,_0x3af212]of _0x1ed63a){appendUnique(_0x3e2f27,directoryIdentity(_0x11649c),_0x3af212,_0x592639=>_0x592639);}return{'datasetCodeToDatasets':_0x324e85,'aliasToDatasetCodes':_0x3e2f27};}export function resolvePushHookDirectory(_0x564d77,_0xfa6091,_0x19e3f3){const _0x3088a4=a292_0xed1e,_0x31c3cc=directoryIdentity(_0x564d77),_0x26a9cd=_0x19e3f3['datasetCodeToDatasets'][_0x3088a4(0x191)](_0x31c3cc)??[],_0xf77760=_0x19e3f3[_0x3088a4(0x180)][_0x3088a4(0x191)](_0x31c3cc)??[],_0x422b43=new Set([..._0x26a9cd[_0x3088a4(0x160)](_0x38d578=>_0x38d578[_0x3088a4(0x168)]),..._0xf77760]);if(_0x422b43[_0x3088a4(0x161)]>0x1)throw hookDirectoryError(_0x3088a4(0x178),_0x3088a4(0x186)+_0x564d77+_0x3088a4(0x188),{'directoryName':_0x564d77,'datasetCodes':[..._0x422b43]});const _0x57f788=[..._0x422b43][0x0];if(_0x57f788&&_0xfa6091?.[_0x3088a4(0x163)]&&_0x57f788!==_0xfa6091[_0x3088a4(0x163)])throw hookDirectoryError(_0x3088a4(0x18e),_0x3088a4(0x186)+_0x564d77+_0x3088a4(0x17e)+_0xfa6091[_0x3088a4(0x163)]+_0x3088a4(0x16e)+_0x57f788+'\x22.',{'directoryName':_0x564d77,'datasetCode':_0x57f788,'lockedDatasetCode':_0xfa6091[_0x3088a4(0x163)]});const _0x1ef267=_0x57f788?findDatasetByCode(_0x19e3f3,_0x57f788):undefined,_0x360be7=!!_0x57f788&&_0xf77760['includes'](_0x57f788);if(_0x1ef267)return{'dataset':_0x1ef267,'datasetCode':_0x1ef267[_0x3088a4(0x168)],..._0x360be7?{'alias':_0x564d77}:{},'directoryProtocol':_0x360be7?_0x3088a4(0x16d):_0x3088a4(0x163),'warnings':[]};const _0x584ba7=_0xfa6091?.[_0x3088a4(0x163)];if(_0x584ba7){const _0x4b7d8a=findDatasetByCode(_0x19e3f3,_0x584ba7);if(_0x4b7d8a)return{'dataset':_0x4b7d8a,'datasetCode':_0x4b7d8a[_0x3088a4(0x168)],..._0xfa6091[_0x3088a4(0x16d)]?{'alias':_0xfa6091[_0x3088a4(0x16d)]}:{},'directoryProtocol':_0xfa6091[_0x3088a4(0x16d)]?_0x3088a4(0x16d):_0x3088a4(0x163),'warnings':[]};}if(_0x57f788||_0x584ba7){const _0x4a6585=_0x57f788??_0x584ba7;throw hookDirectoryError(_0x3088a4(0x18d),_0x3088a4(0x186)+_0x564d77+_0x3088a4(0x182),{'directoryName':_0x564d77,'datasetCode':_0x4a6585});}throw hookDirectoryError(_0x3088a4(0x17a),'Cannot\x20resolve\x20HOOK\x20directory\x20\x22'+_0x564d77+'\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.',{'directoryName':_0x564d77});}function a292_0xed1e(_0x24484e,_0x3d96ac){_0x24484e=_0x24484e-0x15f;const _0x4fecad=a292_0x4fec();let _0xed1ed6=_0x4fecad[_0x24484e];return _0xed1ed6;}export function preflightPushHookDirectories(_0x74cd,_0xa7a909,_0x3a1c7f,_0xee770d){const _0x3fe190=a292_0xed1e,_0x90320b=new Map(),_0x1dd8cf=new Map();for(const _0x30889a of _0x74cd){if(_0x30889a[_0x3fe190(0x185)]!==_0x3fe190(0x177))continue;const _0x191829=_0x30889a['alias'];if(!_0x191829)throw hookDirectoryError('HOOK_DIRECTORY_UNRESOLVED',_0x3fe190(0x162)+_0x30889a[_0x3fe190(0x15f)],{'lockKey':_0x30889a[_0x3fe190(0x15f)]});let _0xbcc60f;try{_0xbcc60f=resolvePushHookDirectory(_0x191829,_0xa7a909[_0x3fe190(0x18f)][_0x30889a['lockKey']],_0x3a1c7f);}catch(_0x174d42){if(_0xee770d&&_0x174d42 instanceof CliError&&['HOOK_DATASET_NOT_FOUND',_0x3fe190(0x17a)]['includes'](_0x174d42[_0x3fe190(0x168)])){_0xee770d[_0x3fe190(0x165)](_0x30889a[_0x3fe190(0x15f)],_0x174d42[_0x3fe190(0x195)]);continue;}throw _0x174d42;}_0x90320b[_0x3fe190(0x165)](_0x30889a['lockKey'],_0xbcc60f);const _0x44e2a2=_0x1dd8cf[_0x3fe190(0x191)](_0xbcc60f[_0x3fe190(0x163)])??new Set();_0x44e2a2[_0x3fe190(0x166)](_0x191829),_0x1dd8cf[_0x3fe190(0x165)](_0xbcc60f[_0x3fe190(0x163)],_0x44e2a2);}for(const [_0x60f3dc,_0x49fad6]of _0x1dd8cf){if(_0x49fad6[_0x3fe190(0x161)]>0x1)throw hookDirectoryError(_0x3fe190(0x179),'Dataset\x20\x22'+_0x60f3dc+_0x3fe190(0x17f)+[..._0x49fad6]['join'](',\x20')+'.',{'datasetCode':_0x60f3dc,'directories':[..._0x49fad6]});}return _0x90320b;}export function hookDirectoryError(_0x1f5e4b,_0x59ca88,_0x44a40){const _0x4caaa1=a292_0xed1e,_0x4f398d=new CliError(_0x1f5e4b,0x2,_0x1f5e4b+':\x20'+_0x59ca88);return _0x4f398d[_0x4caaa1(0x190)]=_0x44a40,_0x4f398d;}function findDatasetByCode(_0x49421c,_0x59edfd){const _0x1be7bb=a292_0xed1e,_0x373ec9=_0x49421c[_0x1be7bb(0x169)][_0x1be7bb(0x191)](directoryIdentity(_0x59edfd))??[];if(_0x373ec9['length']>0x1)throw hookDirectoryError(_0x1be7bb(0x18a),_0x1be7bb(0x193)+_0x59edfd+_0x1be7bb(0x187),{'datasetCode':_0x59edfd,'candidates':_0x373ec9[_0x1be7bb(0x160)](datasetFact)});return _0x373ec9[0x0];}function directoryIdentity(_0x3017d2){const _0x5a6cf8=a292_0xed1e;return _0x3017d2[_0x5a6cf8(0x173)]('NFC')[_0x5a6cf8(0x194)]();}function appendUnique(_0x5a04d5,_0x564907,_0x4abd02,_0x40c10a){const _0x84d83d=a292_0xed1e,_0x17efbe=_0x5a04d5[_0x84d83d(0x191)](_0x564907)??[];!_0x17efbe[_0x84d83d(0x175)](_0x414c35=>_0x40c10a(_0x414c35)===_0x40c10a(_0x4abd02))&&_0x17efbe[_0x84d83d(0x18c)](_0x4abd02),_0x5a04d5[_0x84d83d(0x165)](_0x564907,_0x17efbe);}function datasetFact(_0x548d07){const _0x2d1343=a292_0xed1e;return{'id':_0x548d07['id'],'name':_0x548d07[_0x2d1343(0x17b)],'datasetCode':_0x548d07['code']};}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x19d9e5,_0x382806){const _0x5f2015=a293_0xf672,_0x5c39a5=_0x19d9e5();while(!![]){try{const _0x444420=-parseInt(_0x5f2015(0x98))/0x1*(parseInt(_0x5f2015(0x9c))/0x2)+-parseInt(_0x5f2015(0x9a))/0x3+parseInt(_0x5f2015(0xa5))/0x4+parseInt(_0x5f2015(0x9d))/0x5*(-parseInt(_0x5f2015(0xa3))/0x6)+-parseInt(_0x5f2015(0x95))/0x7+-parseInt(_0x5f2015(0xa8))/0x8+parseInt(_0x5f2015(0x96))/0x9*(parseInt(_0x5f2015(0xa1))/0xa);if(_0x444420===_0x382806)break;else _0x5c39a5['push'](_0x5c39a5['shift']());}catch(_0x54b328){_0x5c39a5['push'](_0x5c39a5['shift']());}}}(a293_0x4259,0xb0460));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}function a293_0x4259(){const _0x425aed=['6988240StheIx','functions','9831052seIrjq','9MegEnq','parse','1UJIDJy','current\x20\x22','2202495IkZrDS','\x22.\x20','571696CfteJl','5iMAOsy','\x22\x20vs\x20lock\x20\x22','apps','utf8','38151090MOXUnc','object','2526492QsWddV','lastSync','2503872ZjbSAN','scriptsRoot','Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20'];a293_0x4259=function(){return _0x425aed;};return a293_0x4259();}function a293_0xf672(_0x7f314e,_0x3542da){_0x7f314e=_0x7f314e-0x95;const _0x4259a6=a293_0x4259();let _0xf6721c=_0x4259a6[_0x7f314e];return _0xf6721c;}export function ensureLockScope(_0x137424,_0x393caa,_0xcb32ac,_0x3ed426){const _0x4ce790=a293_0xf672,_0x2750e2={'apps':_0x137424[_0x4ce790(0x9f)]&&typeof _0x137424[_0x4ce790(0x9f)]==='object'?_0x137424[_0x4ce790(0x9f)]:{}};let _0x25b87b=_0x2750e2[_0x4ce790(0x9f)][_0x393caa];if(!_0x25b87b)return _0x25b87b={'scriptsRoot':_0xcb32ac,'lastSync':'','functions':{}},_0x2750e2['apps'][_0x393caa]=_0x25b87b,{'lockData':_0x2750e2,'appLock':_0x25b87b};if(!_0x25b87b['scriptsRoot'])_0x25b87b[_0x4ce790(0xa6)]=_0xcb32ac;else{if(_0x25b87b['scriptsRoot']!==_0xcb32ac)throw new Error(_0x3ed426+':\x20scriptsRoot\x20mismatch\x20—\x20'+(_0x4ce790(0x99)+_0xcb32ac+_0x4ce790(0x9e)+_0x25b87b['scriptsRoot']+_0x4ce790(0x9b))+'Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x25b87b[_0x4ce790(0xa9)]&&(_0x25b87b[_0x4ce790(0xa9)]={}),!_0x25b87b[_0x4ce790(0xa4)]&&(_0x25b87b[_0x4ce790(0xa4)]=''),{'lockData':_0x2750e2,'appLock':_0x25b87b};}export async function readBffLockFile(_0x3ec099){const _0x2e2500=a293_0xf672;try{const _0x173e05=await readFile(_0x3ec099,_0x2e2500(0xa0)),_0x1efbf0=JSON[_0x2e2500(0x97)](_0x173e05);return{'apps':_0x1efbf0['apps']&&typeof _0x1efbf0[_0x2e2500(0x9f)]===_0x2e2500(0xa2)?_0x1efbf0[_0x2e2500(0x9f)]:{}};}catch(_0x456984){if(_0x456984['code']==='ENOENT')return null;throw new Error(_0x2e2500(0xa7)+String(_0x456984));}}export async function writeBffLockFile(_0x260416,_0x24add0){await mkdir(dirname(_0x260416),{'recursive':!![]}),await writeFile(_0x260416,JSON['stringify'](_0x24add0,null,0x2),'utf8');}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a295_0x47f66f=a295_0x5ecd;(function(_0x58358e,_0x4b543a){const _0x150e86=a295_0x5ecd,_0x321847=_0x58358e();while(!![]){try{const _0x2f638f=parseInt(_0x150e86(0x8f))/0x1*(parseInt(_0x150e86(0x90))/0x2)+parseInt(_0x150e86(0x93))/0x3+parseInt(_0x150e86(0x92))/0x4*(-parseInt(_0x150e86(0x96))/0x5)+parseInt(_0x150e86(0x7c))/0x6*(-parseInt(_0x150e86(0x81))/0x7)+parseInt(_0x150e86(0x8c))/0x8*(-parseInt(_0x150e86(0x83))/0x9)+parseInt(_0x150e86(0x87))/0xa*(-parseInt(_0x150e86(0x8e))/0xb)+-parseInt(_0x150e86(0x89))/0xc*(-parseInt(_0x150e86(0x95))/0xd);if(_0x2f638f===_0x4b543a)break;else _0x321847['push'](_0x321847['shift']());}catch(_0x2802fd){_0x321847['push'](_0x321847['shift']());}}}(a295_0xd909,0xc7a13));export const DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x47f66f(0x8b);const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x47f66f(0x8a);export function snakeToCamel(_0x22e4c5){const _0x520d73=a295_0x47f66f;return _0x22e4c5[_0x520d73(0x7f)]()[_0x520d73(0x85)](/_([a-z])/g,(_0x623726,_0x1b407a)=>_0x1b407a[_0x520d73(0x82)]());}export function findHookLocationByRemoteId(_0x5a9163,_0x11b170){const _0x38937b=a295_0x47f66f;if(!_0x11b170)return undefined;for(const [_0x48a6c6,_0x252eaa]of Object['entries'](_0x5a9163)){if(_0x252eaa[_0x38937b(0x7e)]===_0x11b170&&_0x252eaa['datasetCode']&&_0x252eaa[_0x38937b(0x94)]&&_0x252eaa[_0x38937b(0x8d)]){const _0x27ad9c=_0x48a6c6[_0x38937b(0x80)]('/')[0x1];return{'alias':_0x27ad9c||_0x252eaa['alias'],'datasetCode':_0x252eaa[_0x38937b(0x86)],'operationType':_0x252eaa['operationType'],'functionNode':_0x252eaa[_0x38937b(0x8d)]};}}return undefined;}function a295_0x5ecd(_0x471720,_0x16efd3){_0x471720=_0x471720-0x7c;const _0xd909cb=a295_0xd909();let _0x5ecdcf=_0xd909cb[_0x471720];return _0x5ecdcf;}function a295_0xd909(){const _0x18a0df=['TODO:\x20add\x20script\x20description','TODO:\x20补充脚本功能描述','1909712CnByNQ','functionNode','1397ONDXuF','934521xkNqGF','2MTYMRV','match','95524WDSDoH','3802401UnxUHk','operationType','949AciUbm','90pZCtJg','map','some','6327834uWvRWe','test','remoteId','toLowerCase','split','7qBXrXj','toUpperCase','27BvyHEi','startsWith','replace','datasetCode','81670cgpWLM','after','304692WXDYVU'];a295_0xd909=function(){return _0x18a0df;};return a295_0xd909();}export function extractScriptDescription(_0x56eb8d){const _0x2229ca=a295_0x47f66f,_0x363028=_0x56eb8d[_0x2229ca(0x91)](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x363028?.[0x1])return undefined;const _0x14bf70=_0x363028[0x1],_0x49219d=_0x871b09=>{const _0x2e4107=_0x871b09?.['trim']();if(!_0x2e4107||_0x2e4107===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0x2e4107===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0x2e4107;},_0x34395a=_0x14bf70[_0x2229ca(0x91)](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x34395a)return _0x49219d(_0x34395a[0x1]);const _0x50d7ec=_0x14bf70[_0x2229ca(0x80)](/\r?\n/)[_0x2229ca(0x97)](_0x11b678=>_0x11b678[_0x2229ca(0x85)](/^\s*\*\s?/,'')['trim']()),_0x51f963=_0x50d7ec[_0x2229ca(0x98)](_0x3bb437=>/^\[\s*脚本类型\s*]\s*\S+/[_0x2229ca(0x7d)](_0x3bb437))&&_0x50d7ec['some'](_0x297ea3=>/^\[\s*脚本名称\s*]\s*\S+/[_0x2229ca(0x7d)](_0x297ea3));if(!_0x51f963)return undefined;for(const _0x48ef11 of _0x50d7ec){if(!_0x48ef11||_0x48ef11[_0x2229ca(0x84)]('@')||/^\[[^\]]+]\s*/['test'](_0x48ef11))continue;return _0x49219d(_0x48ef11);}return undefined;}export function isValidBffFunctionName(_0x24c7f3){const _0x5de081=a295_0x47f66f;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x5de081(0x7d)](_0x24c7f3);}export function normalizeHookFunctionNode(_0x572acf){const _0x4910e7=a295_0x47f66f;if(!_0x572acf)return undefined;const _0x470394=_0x572acf['trim']()[_0x4910e7(0x7f)]();if(_0x470394==='before'||_0x470394===_0x4910e7(0x88))return _0x470394;return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a296_0x329c41=a296_0x14b7;(function(_0x47e749,_0x5485bc){const _0x5d7d74=a296_0x14b7,_0x7538fa=_0x47e749();while(!![]){try{const _0x164e6f=-parseInt(_0x5d7d74(0x1fd))/0x1*(parseInt(_0x5d7d74(0x1f8))/0x2)+parseInt(_0x5d7d74(0x1fe))/0x3*(parseInt(_0x5d7d74(0x1f5))/0x4)+parseInt(_0x5d7d74(0x1fc))/0x5*(parseInt(_0x5d7d74(0x1fb))/0x6)+-parseInt(_0x5d7d74(0x1f2))/0x7*(parseInt(_0x5d7d74(0x1f9))/0x8)+-parseInt(_0x5d7d74(0x1f7))/0x9*(parseInt(_0x5d7d74(0x1f6))/0xa)+parseInt(_0x5d7d74(0x1fa))/0xb+parseInt(_0x5d7d74(0x1f3))/0xc;if(_0x164e6f===_0x5485bc)break;else _0x7538fa['push'](_0x7538fa['shift']());}catch(_0x37cca8){_0x7538fa['push'](_0x7538fa['shift']());}}}(a296_0x3741,0x9b13f));function a296_0x14b7(_0x3ff9a3,_0x3c3bd6){_0x3ff9a3=_0x3ff9a3-0x1f2;const _0x3741fd=a296_0x3741();let _0x14b77a=_0x3741fd[_0x3ff9a3];return _0x14b77a;}function a296_0x3741(){const _0x22badf=['7fUFdVP','1568688cVQMJw','/smartapi/db-analysis/cross-db/start','3163372sYxROY','10970ubwFCN','738FoFHnb','1604ivoQzG','113144cUygcF','10771805rBXNqT','47346WSdKPx','40pMVQVM','1527YHAKho','3tPReXr'];a296_0x3741=function(){return _0x22badf;};return a296_0x3741();}export const CROSS_DB_ANALYSIS_PATHS={'start':a296_0x329c41(0x1f4),'status':'/smartapi/db-analysis/cross-db/status','latest':'/smartapi/db-analysis/cross-db/latest-job'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a297_0x4473(){const _0x2ce495=['981612dsFFGU','214668NuUlgt','4620500UgAjRd','/smartapi/cross-db-relation/update','8SxZHXI','27413040jxTtcj','107288FdmWEX','2852310MOubFg','/smartapi/cross-db-relation/delete','49HMAIpI','/smartapi/cross-db-relation/create','152LxFEdL','4051947iLRSIP'];a297_0x4473=function(){return _0x2ce495;};return a297_0x4473();}const a297_0x6fd5=a297_0x3476;(function(_0x4e5573,_0x47e432){const _0x21d1a7=a297_0x3476,_0x3461c2=_0x4e5573();while(!![]){try{const _0x4e13ab=-parseInt(_0x21d1a7(0xd0))/0x1*(-parseInt(_0x21d1a7(0xce))/0x2)+-parseInt(_0x21d1a7(0xc9))/0x3+parseInt(_0x21d1a7(0xcc))/0x4+-parseInt(_0x21d1a7(0xd1))/0x5+-parseInt(_0x21d1a7(0xca))/0x6*(parseInt(_0x21d1a7(0xd3))/0x7)+parseInt(_0x21d1a7(0xd5))/0x8*(-parseInt(_0x21d1a7(0xcb))/0x9)+parseInt(_0x21d1a7(0xcf))/0xa;if(_0x4e13ab===_0x47e432)break;else _0x3461c2['push'](_0x3461c2['shift']());}catch(_0x5c0876){_0x3461c2['push'](_0x3461c2['shift']());}}}(a297_0x4473,0xc4cb4));function a297_0x3476(_0x32bc8b,_0x448aa3){_0x32bc8b=_0x32bc8b-0xc9;const _0x4473c1=a297_0x4473();let _0x3476aa=_0x4473c1[_0x32bc8b];return _0x3476aa;}export const CROSS_DB_RELATION_PATHS={'list':'/smartapi/cross-db-relation/query','create':a297_0x6fd5(0xd4),'update':a297_0x6fd5(0xcd),'delete':a297_0x6fd5(0xd2)};
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x142f22,_0x5a7130){const _0x5489c9=a298_0x5972,_0x5f28e0=_0x142f22();while(!![]){try{const _0x1478ad=parseInt(_0x5489c9(0x103))/0x1*(-parseInt(_0x5489c9(0x101))/0x2)+parseInt(_0x5489c9(0xf3))/0x3*(parseInt(_0x5489c9(0xf8))/0x4)+parseInt(_0x5489c9(0xf7))/0x5*(parseInt(_0x5489c9(0xfb))/0x6)+-parseInt(_0x5489c9(0xf0))/0x7+-parseInt(_0x5489c9(0xe9))/0x8+parseInt(_0x5489c9(0xee))/0x9+-parseInt(_0x5489c9(0xff))/0xa*(-parseInt(_0x5489c9(0x100))/0xb);if(_0x1478ad===_0x5a7130)break;else _0x5f28e0['push'](_0x5f28e0['shift']());}catch(_0x527cd4){_0x5f28e0['push'](_0x5f28e0['shift']());}}}(a298_0x26f8,0x38b84));import{listDatasets}from'../core/api-client.js';function a298_0x26f8(){const _0x243a8e=['626527xpQWZC','30gFwWeT','find','22280nzxedA','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','3373568oeUciN','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','No\x20database\x20matching\x20\x22','has','join','1591803STyUqf','length','2325701znrGaW','map','toLowerCase','6daFhTl','includes','dbId','entries','1819130lvTgWN','192572pyuugb','dbName','dbtableConfig','6GoAQhD','isNaN','set','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','120cFuxNF'];a298_0x26f8=function(){return _0x243a8e;};return a298_0x26f8();}const cache=new Map();export async function listDatabases(_0x431c5f){const _0xe657f4=a298_0x5972;if(cache[_0xe657f4(0xec)](_0x431c5f))return cache['get'](_0x431c5f);const _0xc163e9=await listDatasets(_0x431c5f),_0x466b61=new Map();for(const _0x51eae1 of _0xc163e9){const _0x17ff22=_0x51eae1[_0xe657f4(0xfa)];_0x17ff22?.[_0xe657f4(0xf5)]!=null&&_0x466b61[_0xe657f4(0xfd)](_0x17ff22[_0xe657f4(0xf5)],_0x17ff22[_0xe657f4(0xf9)]??'db-'+_0x17ff22['dbId']);}const _0x317a37=[..._0x466b61[_0xe657f4(0xf6)]()]['map'](([_0x32f633,_0x132d83])=>({'dbId':_0x32f633,'dbName':_0x132d83}));return cache[_0xe657f4(0xfd)](_0x431c5f,_0x317a37),_0x317a37;}export async function resolveDb(_0x4a8bdb,_0xb3a740){const _0x28a170=a298_0x5972,_0x46df4e=await listDatabases(_0x4a8bdb);if(_0x46df4e[_0x28a170(0xef)]===0x0)return{'resolved':[],'error':_0x28a170(0xfe)+_0x4a8bdb+'\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.'};if(!_0xb3a740)return{'resolved':_0x46df4e};const _0x29d9af=Number(_0xb3a740);if(!Number[_0x28a170(0xfc)](_0x29d9af)){const _0x75676f=_0x46df4e[_0x28a170(0x102)](_0x971767=>_0x971767[_0x28a170(0xf5)]===_0x29d9af);if(_0x75676f)return{'resolved':[_0x75676f]};}const _0x4afd73=_0xb3a740[_0x28a170(0xf2)](),_0x5b063e=_0x46df4e['filter'](_0x45f0fd=>_0x45f0fd[_0x28a170(0xf9)][_0x28a170(0xf2)]()[_0x28a170(0xf4)](_0x4afd73));if(_0x5b063e[_0x28a170(0xef)]>0x0)return{'resolved':_0x5b063e};const _0x594f7e=_0x46df4e[_0x28a170(0xf1)](_0x219fcf=>_0x219fcf['dbName']+'\x20('+_0x219fcf[_0x28a170(0xf5)]+')')[_0x28a170(0xed)](',\x20');return{'resolved':[],'error':_0x28a170(0xeb)+_0xb3a740+'\x22\x20under\x20app\x20\x22'+_0x4a8bdb+'\x22.\x20Available:\x20'+_0x594f7e+_0x28a170(0xe8)};}function a298_0x5972(_0x3f8464,_0x4aef08){_0x3f8464=_0x3f8464-0xe8;const _0x26f897=a298_0x26f8();let _0x59726c=_0x26f897[_0x3f8464];return _0x59726c;}export async function resolveOneDb(_0x25c39b,_0xa1a6a1){const _0x1e46be=a298_0x5972,{resolved:_0x2a7f14,error:_0x76a6ef}=await resolveDb(_0x25c39b,_0xa1a6a1);if(_0x76a6ef)return{'db':null,'error':_0x76a6ef};if(_0x2a7f14['length']===0x1)return{'db':_0x2a7f14[0x0]};if(!_0xa1a6a1){const _0x40b52a=_0x2a7f14[_0x1e46be(0xf1)](_0x5379e7=>_0x5379e7['dbName']+'\x20('+_0x5379e7['dbId']+')')[_0x1e46be(0xed)](',\x20');return{'db':null,'error':_0x1e46be(0xea)+_0x40b52a};}const _0x5349e7=_0x2a7f14[_0x1e46be(0xf1)](_0x4210d0=>_0x4210d0[_0x1e46be(0xf9)]+'\x20('+_0x4210d0['dbId']+')')[_0x1e46be(0xed)](',\x20');return{'db':null,'error':'\x22'+_0xa1a6a1+'\x22\x20matches\x20multiple\x20databases:\x20'+_0x5349e7+'.\x20Be\x20more\x20specific.'};}export async function getDbName(_0x4ac5e6,_0x3edbfb){const _0x1ea9a6=a298_0x5972,_0x50328e=await listDatabases(_0x4ac5e6);return _0x50328e[_0x1ea9a6(0x102)](_0xf5df29=>_0xf5df29[_0x1ea9a6(0xf5)]===_0x3edbfb)?.[_0x1ea9a6(0xf9)];}
|