@lovrabet/rabetbase-cli 2.5.8-beta.2 → 2.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.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/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/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a290_0x1cb9af=a290_0x4ab4;(function(_0x35f888,_0x514f5a){const _0x2b0919=a290_0x4ab4,_0x4e4e1a=_0x35f888();while(!![]){try{const _0x42bcae=-parseInt(_0x2b0919(0x1b3))/0x1+-parseInt(_0x2b0919(0x1cc))/0x2*(parseInt(_0x2b0919(0x1b7))/0x3)+parseInt(_0x2b0919(0x1bb))/0x4+-parseInt(_0x2b0919(0x1ce))/0x5*(parseInt(_0x2b0919(0x1bc))/0x6)+parseInt(_0x2b0919(0x1c1))/0x7+parseInt(_0x2b0919(0x1b2))/0x8+parseInt(_0x2b0919(0x1b0))/0x9;if(_0x42bcae===_0x514f5a)break;else _0x4e4e1a['push'](_0x4e4e1a['shift']());}catch(_0x584b1c){_0x4e4e1a['push'](_0x4e4e1a['shift']());}}}(a290_0x5712,0x9db95));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_0x1cb9af(0x1d1),a290_0x1cb9af(0x1cb),a290_0x1cb9af(0x1d5)];export function normalizeBffType(_0x523736){const _0xceecf5=a290_0x1cb9af;if(!_0x523736)return undefined;const _0x264b8e=_0x523736[_0xceecf5(0x1c2)]()[_0xceecf5(0x1c9)]();return SUPPORTED_BFF_TYPES['includes'](_0x264b8e)?_0x264b8e:undefined;}function a290_0x4ab4(_0x1e4060,_0x28d8cb){_0x1e4060=_0x1e4060-0x1ab;const _0x5712b1=a290_0x5712();let _0x4ab43f=_0x5712b1[_0x1e4060];return _0x4ab43f;}async function scanJsFilesRecursively(_0x165428,_0xeb42d){const _0x863b50=a290_0x1cb9af,_0x227d39=[];try{const _0x50dd1e=await readdir(_0x165428,{'withFileTypes':!![]});for(const _0x231e77 of _0x50dd1e){const _0x52f89a=join(_0x165428,_0x231e77[_0x863b50(0x1d4)]);if(_0x231e77[_0x863b50(0x1bd)]())_0x227d39[_0x863b50(0x1b1)](...await scanJsFilesRecursively(_0x52f89a,_0xeb42d+'/'+_0x231e77[_0x863b50(0x1d4)]));else _0x231e77[_0x863b50(0x1cf)]()&&_0x231e77[_0x863b50(0x1d4)][_0x863b50(0x1c7)]('.js')&&_0x227d39[_0x863b50(0x1b1)]({'lockKey':_0xeb42d+'/'+_0x231e77[_0x863b50(0x1d4)]['replace'](/\.js$/,''),'filePath':_0x52f89a});}}catch(_0x3fa22e){if(_0x3fa22e[_0x863b50(0x1d3)]!==_0x863b50(0x1b8))throw _0x3fa22e;}return _0x227d39;}async function scanFlatFunctions(_0x96ff4e,_0x470680){const _0x5070f5=a290_0x1cb9af,_0x42208a=join(_0x96ff4e[_0x5070f5(0x1ca)],_0x470680),_0x3a80af=await scanJsFilesRecursively(_0x42208a,_0x470680);return _0x3a80af[_0x5070f5(0x1b5)](({lockKey:_0x1460d1,filePath:_0x2a805d})=>({'type':_0x470680,'name':_0x1460d1[_0x5070f5(0x1c5)]('/')['at'](-0x1)??'','filePath':_0x2a805d,'lockKey':_0x1460d1}));}async function scanHookFunctions(_0xcc6b54){const _0x4a5250=a290_0x1cb9af,_0x3f13e6=join(_0xcc6b54[_0x4a5250(0x1ca)],_0x4a5250(0x1d5)),_0x2a0ebb=[];try{const _0x4ffb1d=await readdir(_0x3f13e6,{'withFileTypes':!![]});for(const _0x3f17c5 of _0x4ffb1d){if(!_0x3f17c5[_0x4a5250(0x1bd)]())continue;const _0x269eb2=_0x3f17c5['name'],_0x17a721=join(_0x3f13e6,_0x269eb2),_0x5efc6a=await readdir(_0x17a721,{'withFileTypes':!![]});for(const _0x1a03e2 of _0x5efc6a){if(!_0x1a03e2[_0x4a5250(0x1bd)]())continue;const _0x2a874b=_0x1a03e2[_0x4a5250(0x1d4)],_0x50dfe8=join(_0x17a721,_0x2a874b),_0x255d57=await readdir(_0x50dfe8,{'withFileTypes':!![]});for(const _0x5d060a of _0x255d57){if(!_0x5d060a[_0x4a5250(0x1bd)]())continue;const _0x254cae=_0x5d060a['name'],_0x1d0fdb=join(_0x50dfe8,_0x254cae),_0x530aa3=await readdir(_0x1d0fdb,{'withFileTypes':!![]});for(const _0x5bb43c of _0x530aa3){if(!_0x5bb43c[_0x4a5250(0x1cf)]()||!_0x5bb43c[_0x4a5250(0x1d4)][_0x4a5250(0x1c7)](_0x4a5250(0x1d2)))continue;const _0x2d3456=_0x5bb43c['name'][_0x4a5250(0x1cd)](/\.js$/,'');_0x2a0ebb['push']({'type':'HOOK','name':_0x2d3456,'filePath':join(_0x1d0fdb,_0x5bb43c[_0x4a5250(0x1d4)]),'lockKey':_0x4a5250(0x1c3)+_0x269eb2+'/'+_0x2a874b+'/'+_0x254cae+'/'+_0x2d3456,'alias':_0x269eb2,'operationType':_0x2a874b,'functionNode':_0x254cae});}}}}}catch(_0x1ed2aa){if(_0x1ed2aa[_0x4a5250(0x1d3)]!==_0x4a5250(0x1b8))throw _0x1ed2aa;}return _0x2a0ebb;}export async function scanLocalBffFunctions(_0x55264e,_0x1809c7){const _0x1d52ba=a290_0x1cb9af;if(_0x1809c7===_0x1d52ba(0x1d1)||_0x1809c7===_0x1d52ba(0x1cb))return scanFlatFunctions(_0x55264e,_0x1809c7);if(_0x1809c7==='HOOK')return scanHookFunctions(_0x55264e);const [_0x2112da,_0x226831,_0x44e511]=await Promise[_0x1d52ba(0x1ad)]([scanFlatFunctions(_0x55264e,_0x1d52ba(0x1d1)),scanFlatFunctions(_0x55264e,_0x1d52ba(0x1cb)),scanHookFunctions(_0x55264e)]);return[..._0x2112da,..._0x226831,..._0x44e511];}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x3819d6){const _0x5989f7=a290_0x1cb9af;return SAFE_LOCK_KEY_SEGMENT[_0x5989f7(0x1b6)](_0x3819d6)&&_0x3819d6!=='.'&&_0x3819d6!=='..';}export function resolveLocalFilePathFromLockKey(_0xe8eb68,_0x38ddfc){const _0x501a30=a290_0x1cb9af,_0x2028d0=_0x38ddfc[_0x501a30(0x1c5)]('/');if(!_0x2028d0[_0x501a30(0x1c8)](isSafeLockKeySegment))throw new Error(_0x501a30(0x1d6)+_0x38ddfc);const _0x46cfbb=resolve(join(_0xe8eb68[_0x501a30(0x1ca)],..._0x2028d0)+'.js'),_0x39ea4d=resolve(_0xe8eb68[_0x501a30(0x1ca)]);if(_0x46cfbb!==_0x39ea4d&&!_0x46cfbb[_0x501a30(0x1c0)](_0x39ea4d+sep))throw new Error('Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20'+_0x46cfbb);return _0x46cfbb;}export function createHookLocationMap(_0x177e72){const _0x3c040d=a290_0x1cb9af,_0x2f4041=new Map();for(const _0x2c7c33 of _0x177e72){_0x2c7c33[_0x3c040d(0x1c6)]&&_0x2f4041[_0x3c040d(0x1be)](_0x2c7c33[_0x3c040d(0x1c6)],{'datasetCode':_0x2c7c33[_0x3c040d(0x1d0)],'operationType':snakeToCamel(_0x2c7c33[_0x3c040d(0x1b4)]),'functionNode':_0x3c040d(0x1af)}),_0x2c7c33[_0x3c040d(0x1b9)]&&_0x2f4041['set'](_0x2c7c33[_0x3c040d(0x1b9)],{'datasetCode':_0x2c7c33[_0x3c040d(0x1d0)],'operationType':snakeToCamel(_0x2c7c33[_0x3c040d(0x1b4)]),'functionNode':_0x3c040d(0x1ba)});}return _0x2f4041;}export function resolveRemoteScriptTarget(_0xb6f0eb,_0x114076,_0x28222f,_0x4a4946,_0x23452c){const _0x15d5a4=a290_0x1cb9af,_0xc9cae9=normalizeBffType(_0x114076[_0x15d5a4(0x1ab)]);if(!_0xc9cae9||!_0x114076['functionName'])return null;if(_0xc9cae9===_0x15d5a4(0x1d5)){const _0xcada9b=_0x114076['id']?_0x28222f[_0x15d5a4(0x1bf)](_0x114076['id']):undefined,_0xc8862d=findHookLocationByRemoteId(_0x4a4946,_0x114076['id']),_0x575c21=_0xcada9b?{..._0xc8862d?.['datasetCode']===_0xcada9b[_0x15d5a4(0x1d0)]?_0xc8862d:{},..._0xcada9b}:_0xc8862d;if(!_0x575c21)return null;const _0xc9f4fa=_0x23452c[_0x15d5a4(0x1bf)](_0x575c21['datasetCode'][_0x15d5a4(0x1ac)]()),_0x53c6bd=_0xc9f4fa??_0x575c21[_0x15d5a4(0x1d0)],_0x258b57={..._0x575c21,'alias':_0xc9f4fa},_0x5744a2=_0x15d5a4(0x1c3)+_0x53c6bd+'/'+_0x258b57['operationType']+'/'+_0x258b57[_0x15d5a4(0x1c4)]+'/'+_0x114076[_0x15d5a4(0x1ae)];if(!_0x5744a2[_0x15d5a4(0x1c5)]('/')['every'](isSafeLockKeySegment))return null;return{'lockKey':_0x5744a2,'filePath':resolveLocalFilePathFromLockKey(_0xb6f0eb,_0x5744a2),'type':_0x15d5a4(0x1d5),'hookLocation':_0x258b57};}const _0x43142b=_0xc9cae9+'/'+_0x114076[_0x15d5a4(0x1ae)];if(!_0x43142b[_0x15d5a4(0x1c5)]('/')[_0x15d5a4(0x1c8)](isSafeLockKeySegment))return null;return{'lockKey':_0x43142b,'filePath':resolveLocalFilePathFromLockKey(_0xb6f0eb,_0x43142b),'type':_0xc9cae9};}function a290_0x5712(){const _0x9f9709=['functionNode','split','beforeScriptId','endsWith','every','toUpperCase','scriptsRootDir','ENDPOINT','2488934mRiZau','replace','5OQRHUZ','isFile','datasetCode','COMMON','.js','code','name','HOOK','Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20','scriptType','toLowerCase','all','functionName','before','4393773FFrvIN','push','9275784iNTOQa','1055854ZIWosP','operationType','map','test','3nhlzVl','ENOENT','afterScriptId','after','4845732PNDgAj','3602472cjFtaj','isDirectory','set','get','startsWith','4813669CWdlxJ','trim','HOOK/'];a290_0x5712=function(){return _0x9f9709;};return a290_0x5712();}export async function ensureParentDirectory(_0x2a6e9a){await mkdir(dirname(_0x2a6e9a),{'recursive':!![]});}export async function fileExists(_0x17470a){try{return await access(_0x17470a,constants['F_OK']),!![];}catch{return![];}}export async function directoryExists(_0x57b1a2){const _0x935136=a290_0x1cb9af;try{const _0x1c8e83=await stat(_0x57b1a2);return _0x1c8e83[_0x935136(0x1bd)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a291_0x3090(_0x4b653d,_0x4cd820){_0x4b653d=_0x4b653d-0x170;const _0x5f31c8=a291_0x5f31();let _0x30901e=_0x5f31c8[_0x4b653d];return _0x30901e;}function a291_0x5f31(){const _0x348677=['digest','7Dtxgpv','5GsFMye','md5','2038450jhAAxw','update','hex','createHash','51PEKlYd','6185752jHIKlM','49467MdtaGU','7778637oavHfL','10KAGwjy','74572mXMoZc','533418HVFITI','3684XENZjp','3018492CsvXHS'];a291_0x5f31=function(){return _0x348677;};return a291_0x5f31();}(function(_0x152565,_0x4266c7){const _0x3f0f69=a291_0x3090,_0x253fe6=_0x152565();while(!![]){try{const _0x3589cf=-parseInt(_0x3f0f69(0x172))/0x1*(-parseInt(_0x3f0f69(0x17e))/0x2)+parseInt(_0x3f0f69(0x178))/0x3*(-parseInt(_0x3f0f69(0x17d))/0x4)+-parseInt(_0x3f0f69(0x174))/0x5+parseInt(_0x3f0f69(0x180))/0x6+parseInt(_0x3f0f69(0x171))/0x7*(-parseInt(_0x3f0f69(0x179))/0x8)+-parseInt(_0x3f0f69(0x17b))/0x9*(parseInt(_0x3f0f69(0x17c))/0xa)+-parseInt(_0x3f0f69(0x17a))/0xb*(-parseInt(_0x3f0f69(0x17f))/0xc);if(_0x3589cf===_0x4266c7)break;else _0x253fe6['push'](_0x253fe6['shift']());}catch(_0x4cf681){_0x253fe6['push'](_0x253fe6['shift']());}}}(a291_0x5f31,0xd0c21));import{readFile}from'node:fs/promises';import a291_0x4a285e from'node:crypto';export function computeContentHash(_0x29c395){const _0x9e4323=a291_0x3090;return a291_0x4a285e[_0x9e4323(0x177)](_0x9e4323(0x173))[_0x9e4323(0x175)](_0x29c395)[_0x9e4323(0x170)](_0x9e4323(0x176));}export async function computeFileHash(_0x58812d){const _0x1396d4=await readFile(_0x58812d,'utf8');return computeContentHash(_0x1396d4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4d938e,_0x406051){const _0x208cda=a292_0x2f57,_0xf46bec=_0x4d938e();while(!![]){try{const _0x3ea285=-parseInt(_0x208cda(0xfe))/0x1*(-parseInt(_0x208cda(0x101))/0x2)+parseInt(_0x208cda(0x11d))/0x3*(parseInt(_0x208cda(0x105))/0x4)+parseInt(_0x208cda(0x122))/0x5*(-parseInt(_0x208cda(0x10c))/0x6)+-parseInt(_0x208cda(0x120))/0x7*(parseInt(_0x208cda(0x111))/0x8)+parseInt(_0x208cda(0x11e))/0x9+-parseInt(_0x208cda(0x110))/0xa*(-parseInt(_0x208cda(0x119))/0xb)+parseInt(_0x208cda(0xf0))/0xc*(-parseInt(_0x208cda(0xef))/0xd);if(_0x3ea285===_0x406051)break;else _0xf46bec['push'](_0xf46bec['shift']());}catch(_0x84801c){_0xf46bec['push'](_0xf46bec['shift']());}}}(a292_0x5825,0xe2ebf));function a292_0x5825(){const _0x1019be=['HOOK_ALIAS_AMBIGUOUS','message','get','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','some','length','push','join','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','lockKey','code','HOOK_DIRECTORY_UNRESOLVED','HOOK\x20directory\x20\x22','1490Lntzhk','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','toLowerCase','2258aVSrZj','includes','set','functions','4wQbWlx','size','datasetCode','entries','\x22\x20to\x20\x22','HOOK_DUPLICATE_DIRECTORIES','name','5927394FIeIDo','HOOK_MAPPING_DRIFT','HOOK_DATASET_CODE_AMBIGUOUS','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','93830mCOKhi','8VLdphk','NFC','HOOK_DIRECTORY_AMBIGUOUS','Dataset\x20\x22','normalize','\x22\x20resolves\x20to\x20multiple\x20Datasets.','add','HOOK','2090BsXMiM','map','values','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','4329996hLmYoq','15849072YZvHvX','alias','4065551WrdAda','type','5PVeNmm','datasetCodeToDatasets','SDK\x20alias\x20\x22','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','split','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','54225041CRoIiM','12GOlrXT'];a292_0x5825=function(){return _0x1019be;};return a292_0x5825();}import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x5169ea){const _0x1cad1c=a292_0x2f57,_0x323a07=[];for(const [_0x194c78,_0x22ed34]of Object[_0x1cad1c(0x108)](_0x5169ea[_0x1cad1c(0x104)])){const [_0x391942,_0x3e51e9]=_0x194c78[_0x1cad1c(0xed)]('/');if(_0x391942!==_0x1cad1c(0x118)||!_0x3e51e9||!_0x22ed34[_0x1cad1c(0x107)])continue;_0x323a07[_0x1cad1c(0xf7)]({'alias':_0x3e51e9,'datasetCode':_0x22ed34[_0x1cad1c(0x107)]});}return _0x323a07;}export function uniqueTrackedHookDirectoryByDataset(_0x35112b){const _0x55c057=a292_0x2f57,_0x353114=new Map();for(const _0x5a6052 of trackedHookDirectoryMappings(_0x35112b)){const _0x2a2120=directoryIdentity(_0x5a6052[_0x55c057(0x107)]),_0x40d41f=_0x353114[_0x55c057(0xf3)](_0x2a2120)??new Map();_0x40d41f[_0x55c057(0x103)](directoryIdentity(_0x5a6052['alias']),_0x5a6052['alias']),_0x353114[_0x55c057(0x103)](_0x2a2120,_0x40d41f);}const _0x4d7926=new Map();for(const [_0x579a12,_0x5f52d8]of _0x353114){if(_0x5f52d8['size']>0x1)throw hookDirectoryError(_0x55c057(0x10a),_0x55c057(0x114)+_0x579a12+'\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20'+[..._0x5f52d8['values']()][_0x55c057(0xf8)](',\x20')+'.',{'datasetCode':_0x579a12,'directories':[..._0x5f52d8[_0x55c057(0x11b)]()]});_0x4d7926[_0x55c057(0x103)](_0x579a12,[..._0x5f52d8[_0x55c057(0x11b)]()][0x0]);}return _0x4d7926;}export function assertUnambiguousHookDirectoryMappings(_0x55fdf7){const _0x314945=a292_0x2f57,_0x164390=new Map();for(const {alias:_0x384113,datasetCode:_0x25ee72}of _0x55fdf7){const _0x40ee27=directoryIdentity(_0x384113),_0x252676=_0x164390['get'](_0x40ee27)??new Set();_0x252676[_0x314945(0x117)](_0x25ee72),_0x164390[_0x314945(0x103)](_0x40ee27,_0x252676);}for(const [_0x31eb28,_0x4de0a1]of _0x164390){if(_0x4de0a1[_0x314945(0x106)]>0x1)throw hookDirectoryError(_0x314945(0x113),_0x314945(0xfd)+_0x31eb28+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'directoryName':_0x31eb28,'datasetCodes':[..._0x4de0a1]});}}export function assertUnambiguousHookAliases(_0x583ff5){const _0xa0fd6a=a292_0x2f57,_0x2e6e27=[..._0x583ff5],_0x4a6ff4=new Map(),_0x5381da=new Map();for(const {alias:_0x3c30f0,datasetCode:_0x52dc34}of _0x2e6e27){const _0x3eaf1d=directoryIdentity(_0x3c30f0),_0x5a7d9d=directoryIdentity(_0x52dc34),_0x24d30c=_0x4a6ff4[_0xa0fd6a(0xf3)](_0x3eaf1d)??new Set();_0x24d30c[_0xa0fd6a(0x117)](_0x52dc34),_0x4a6ff4['set'](_0x3eaf1d,_0x24d30c);const _0x2dd12c=_0x5381da[_0xa0fd6a(0xf3)](_0x5a7d9d)??new Set();_0x2dd12c[_0xa0fd6a(0x117)](_0x3c30f0),_0x5381da[_0xa0fd6a(0x103)](_0x5a7d9d,_0x2dd12c);}for(const [_0x1f1933,_0x5aa819]of _0x4a6ff4){if(_0x5aa819[_0xa0fd6a(0x106)]>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS',_0xa0fd6a(0x124)+_0x1f1933+_0xa0fd6a(0x116),{'alias':_0x1f1933,'datasetCodes':[..._0x5aa819]});}for(const [_0x49e9e6,_0x4d6418]of _0x5381da){if(_0x4d6418['size']>0x1)throw hookDirectoryError(_0xa0fd6a(0xf1),'Dataset\x20\x22'+_0x49e9e6+_0xa0fd6a(0x10f),{'datasetCode':_0x49e9e6,'aliases':[..._0x4d6418]});}}export function buildHookDirectoryIndexes(_0x4851cd,_0x5f2163=[]){const _0x6fc2d0=a292_0x2f57,_0x187bc5=[..._0x5f2163];assertUnambiguousHookDirectoryMappings(_0x187bc5[_0x6fc2d0(0x11a)](([_0x59d925,_0x3d89eb])=>({'alias':_0x59d925,'datasetCode':_0x3d89eb})));const _0x3cd102=new Map(),_0x35e3db=new Map();for(const _0x2f70a8 of _0x4851cd){appendUnique(_0x3cd102,directoryIdentity(_0x2f70a8[_0x6fc2d0(0xfb)]),_0x2f70a8,_0x3e52ad=>_0x3e52ad['code']);}for(const [_0x2653e3,_0x285d3d]of _0x187bc5){appendUnique(_0x35e3db,directoryIdentity(_0x2653e3),_0x285d3d,_0x5dffc6=>_0x5dffc6);}return{'datasetCodeToDatasets':_0x3cd102,'aliasToDatasetCodes':_0x35e3db};}export function resolvePushHookDirectory(_0xb10051,_0x638cf2,_0x4be684){const _0x559f9a=a292_0x2f57,_0x197ebd=directoryIdentity(_0xb10051),_0x3d3e47=_0x4be684['datasetCodeToDatasets'][_0x559f9a(0xf3)](_0x197ebd)??[],_0x5d406b=_0x4be684['aliasToDatasetCodes'][_0x559f9a(0xf3)](_0x197ebd)??[],_0x4b01e2=new Set([..._0x3d3e47[_0x559f9a(0x11a)](_0x4bc06d=>_0x4bc06d[_0x559f9a(0xfb)]),..._0x5d406b]);if(_0x4b01e2[_0x559f9a(0x106)]>0x1)throw hookDirectoryError(_0x559f9a(0x113),_0x559f9a(0xfd)+_0xb10051+'\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.',{'directoryName':_0xb10051,'datasetCodes':[..._0x4b01e2]});const _0x387271=[..._0x4b01e2][0x0];if(_0x387271&&_0x638cf2?.[_0x559f9a(0x107)]&&_0x387271!==_0x638cf2[_0x559f9a(0x107)])throw hookDirectoryError(_0x559f9a(0x10d),'HOOK\x20directory\x20\x22'+_0xb10051+_0x559f9a(0xee)+_0x638cf2[_0x559f9a(0x107)]+_0x559f9a(0x109)+_0x387271+'\x22.',{'directoryName':_0xb10051,'datasetCode':_0x387271,'lockedDatasetCode':_0x638cf2['datasetCode']});const _0x3f1cdc=_0x387271?findDatasetByCode(_0x4be684,_0x387271):undefined,_0x5147a3=!!_0x387271&&_0x5d406b[_0x559f9a(0x102)](_0x387271);if(_0x3f1cdc)return{'dataset':_0x3f1cdc,'datasetCode':_0x3f1cdc[_0x559f9a(0xfb)],..._0x5147a3?{'alias':_0xb10051}:{},'directoryProtocol':_0x5147a3?_0x559f9a(0x11f):_0x559f9a(0x107),'warnings':[]};const _0x364129=_0x638cf2?.[_0x559f9a(0x107)];if(_0x364129){const _0x59d5bc=findDatasetByCode(_0x4be684,_0x364129);if(_0x59d5bc)return{'dataset':_0x59d5bc,'datasetCode':_0x59d5bc[_0x559f9a(0xfb)],..._0x638cf2[_0x559f9a(0x11f)]?{'alias':_0x638cf2[_0x559f9a(0x11f)]}:{},'directoryProtocol':_0x638cf2[_0x559f9a(0x11f)]?_0x559f9a(0x11f):_0x559f9a(0x107),'warnings':[]};}if(_0x387271||_0x364129){const _0x44af53=_0x387271??_0x364129;throw hookDirectoryError('HOOK_DATASET_NOT_FOUND',_0x559f9a(0xfd)+_0xb10051+_0x559f9a(0xf9),{'directoryName':_0xb10051,'datasetCode':_0x44af53});}throw hookDirectoryError(_0x559f9a(0xfc),_0x559f9a(0xff)+_0xb10051+_0x559f9a(0x125),{'directoryName':_0xb10051});}export function preflightPushHookDirectories(_0x56ffcc,_0xdd4c8a,_0x49fdfd,_0x5386fe){const _0x424f62=a292_0x2f57,_0xb4af57=new Map(),_0x31419e=new Map();for(const _0x45f776 of _0x56ffcc){if(_0x45f776[_0x424f62(0x121)]!==_0x424f62(0x118))continue;const _0x362924=_0x45f776['alias'];if(!_0x362924)throw hookDirectoryError(_0x424f62(0xfc),'Incomplete\x20HOOK\x20path:\x20'+_0x45f776[_0x424f62(0xfa)],{'lockKey':_0x45f776['lockKey']});let _0x1c0646;try{_0x1c0646=resolvePushHookDirectory(_0x362924,_0xdd4c8a[_0x424f62(0x104)][_0x45f776[_0x424f62(0xfa)]],_0x49fdfd);}catch(_0x33b46d){if(_0x5386fe&&_0x33b46d instanceof CliError&&['HOOK_DATASET_NOT_FOUND','HOOK_DIRECTORY_UNRESOLVED'][_0x424f62(0x102)](_0x33b46d[_0x424f62(0xfb)])){_0x5386fe[_0x424f62(0x103)](_0x45f776[_0x424f62(0xfa)],_0x33b46d[_0x424f62(0xf2)]);continue;}throw _0x33b46d;}_0xb4af57['set'](_0x45f776[_0x424f62(0xfa)],_0x1c0646);const _0x5c3e1=_0x31419e[_0x424f62(0xf3)](_0x1c0646['datasetCode'])??new Set();_0x5c3e1[_0x424f62(0x117)](_0x362924),_0x31419e[_0x424f62(0x103)](_0x1c0646['datasetCode'],_0x5c3e1);}for(const [_0x245748,_0x227739]of _0x31419e){if(_0x227739['size']>0x1)throw hookDirectoryError(_0x424f62(0x10a),_0x424f62(0x114)+_0x245748+_0x424f62(0x11c)+[..._0x227739][_0x424f62(0xf8)](',\x20')+'.',{'datasetCode':_0x245748,'directories':[..._0x227739]});}return _0xb4af57;}export function hookDirectoryError(_0x52af59,_0x1e5cad,_0x80a1f7){const _0x6812d3=new CliError(_0x52af59,0x2,_0x52af59+':\x20'+_0x1e5cad);return _0x6812d3['details']=_0x80a1f7,_0x6812d3;}function findDatasetByCode(_0x37f806,_0x136b99){const _0x41a17d=a292_0x2f57,_0x49e187=_0x37f806[_0x41a17d(0x123)][_0x41a17d(0xf3)](directoryIdentity(_0x136b99))??[];if(_0x49e187[_0x41a17d(0xf6)]>0x1)throw hookDirectoryError(_0x41a17d(0x10e),'Dataset\x20code\x20\x22'+_0x136b99+_0x41a17d(0xf4),{'datasetCode':_0x136b99,'candidates':_0x49e187[_0x41a17d(0x11a)](datasetFact)});return _0x49e187[0x0];}function directoryIdentity(_0x48d916){const _0x2d5c38=a292_0x2f57;return _0x48d916[_0x2d5c38(0x115)](_0x2d5c38(0x112))[_0x2d5c38(0x100)]();}function a292_0x2f57(_0x4067ab,_0x5e8e8e){_0x4067ab=_0x4067ab-0xed;const _0x58252b=a292_0x5825();let _0x2f5743=_0x58252b[_0x4067ab];return _0x2f5743;}function appendUnique(_0x6fd878,_0x18dd60,_0x50ea08,_0x188be4){const _0x18781b=a292_0x2f57,_0x5c0aef=_0x6fd878['get'](_0x18dd60)??[];!_0x5c0aef[_0x18781b(0xf5)](_0x780458=>_0x188be4(_0x780458)===_0x188be4(_0x50ea08))&&_0x5c0aef[_0x18781b(0xf7)](_0x50ea08),_0x6fd878[_0x18781b(0x103)](_0x18dd60,_0x5c0aef);}function datasetFact(_0x179aa9){const _0x337b6b=a292_0x2f57;return{'id':_0x179aa9['id'],'name':_0x179aa9[_0x337b6b(0x10b)],'datasetCode':_0x179aa9['code']};}
|
|
1
|
+
function a292_0xd79a(_0x2c11aa,_0x2d400f){_0x2c11aa=_0x2c11aa-0x1e5;const _0x53bd84=a292_0x53bd();let _0xd79a57=_0x53bd84[_0x2c11aa];return _0xd79a57;}(function(_0x3d44a4,_0x120821){const _0x5f014e=a292_0xd79a,_0x9b0606=_0x3d44a4();while(!![]){try{const _0x53889a=parseInt(_0x5f014e(0x1f3))/0x1*(parseInt(_0x5f014e(0x204))/0x2)+parseInt(_0x5f014e(0x213))/0x3*(-parseInt(_0x5f014e(0x215))/0x4)+parseInt(_0x5f014e(0x20a))/0x5+parseInt(_0x5f014e(0x208))/0x6*(parseInt(_0x5f014e(0x1ed))/0x7)+parseInt(_0x5f014e(0x1e8))/0x8*(-parseInt(_0x5f014e(0x1ea))/0x9)+parseInt(_0x5f014e(0x216))/0xa+-parseInt(_0x5f014e(0x1e6))/0xb*(parseInt(_0x5f014e(0x1e5))/0xc);if(_0x53889a===_0x120821)break;else _0x9b0606['push'](_0x9b0606['shift']());}catch(_0x12ebd1){_0x9b0606['push'](_0x9b0606['shift']());}}}(a292_0x53bd,0x8a9dd));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x3f3689){const _0x3d2376=a292_0xd79a,_0x36d6fc=[];for(const [_0x451f1f,_0x5840f9]of Object[_0x3d2376(0x1fb)](_0x3f3689[_0x3d2376(0x20d)])){const [_0x14b6aa,_0x343f0e]=_0x451f1f[_0x3d2376(0x214)]('/');if(_0x14b6aa!==_0x3d2376(0x1fe)||!_0x343f0e||!_0x5840f9[_0x3d2376(0x209)])continue;_0x36d6fc[_0x3d2376(0x1fc)]({'alias':_0x343f0e,'datasetCode':_0x5840f9['datasetCode']});}return _0x36d6fc;}export function uniqueTrackedHookDirectoryByDataset(_0x13efb1){const _0x5b5a6c=a292_0xd79a,_0x1e8455=new Map();for(const _0x8262cb of trackedHookDirectoryMappings(_0x13efb1)){const _0x48d4b3=directoryIdentity(_0x8262cb[_0x5b5a6c(0x209)]),_0x4a0b53=_0x1e8455[_0x5b5a6c(0x1fa)](_0x48d4b3)??new Map();_0x4a0b53['set'](directoryIdentity(_0x8262cb[_0x5b5a6c(0x203)]),_0x8262cb[_0x5b5a6c(0x203)]),_0x1e8455[_0x5b5a6c(0x218)](_0x48d4b3,_0x4a0b53);}const _0x1194d4=new Map();for(const [_0x40114a,_0x58ebe8]of _0x1e8455){if(_0x58ebe8[_0x5b5a6c(0x1f8)]>0x1)throw hookDirectoryError(_0x5b5a6c(0x20c),_0x5b5a6c(0x219)+_0x40114a+'\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20'+[..._0x58ebe8[_0x5b5a6c(0x1ee)]()][_0x5b5a6c(0x1f4)](',\x20')+'.',{'datasetCode':_0x40114a,'directories':[..._0x58ebe8[_0x5b5a6c(0x1ee)]()]});_0x1194d4[_0x5b5a6c(0x218)](_0x40114a,[..._0x58ebe8[_0x5b5a6c(0x1ee)]()][0x0]);}return _0x1194d4;}export function assertUnambiguousHookDirectoryMappings(_0x18006d){const _0x33a8bb=a292_0xd79a,_0x3ffecd=new Map();for(const {alias:_0x530b21,datasetCode:_0x3481e2}of _0x18006d){const _0x10341f=directoryIdentity(_0x530b21),_0x4f83dc=_0x3ffecd[_0x33a8bb(0x1fa)](_0x10341f)??new Set();_0x4f83dc[_0x33a8bb(0x206)](_0x3481e2),_0x3ffecd['set'](_0x10341f,_0x4f83dc);}for(const [_0x3e74ca,_0xaeeded]of _0x3ffecd){if(_0xaeeded[_0x33a8bb(0x1f8)]>0x1)throw hookDirectoryError(_0x33a8bb(0x1f7),_0x33a8bb(0x1fd)+_0x3e74ca+_0x33a8bb(0x205),{'directoryName':_0x3e74ca,'datasetCodes':[..._0xaeeded]});}}export function assertUnambiguousHookAliases(_0x26f2cd){const _0xd3b755=a292_0xd79a,_0x438239=[..._0x26f2cd],_0x702c12=new Map(),_0x1483d3=new Map();for(const {alias:_0x15e4bb,datasetCode:_0x4ce7fb}of _0x438239){const _0x1b5d62=directoryIdentity(_0x15e4bb),_0x3cdb06=directoryIdentity(_0x4ce7fb),_0x2e9408=_0x702c12[_0xd3b755(0x1fa)](_0x1b5d62)??new Set();_0x2e9408[_0xd3b755(0x206)](_0x4ce7fb),_0x702c12[_0xd3b755(0x218)](_0x1b5d62,_0x2e9408);const _0xbfb62e=_0x1483d3[_0xd3b755(0x1fa)](_0x3cdb06)??new Set();_0xbfb62e['add'](_0x15e4bb),_0x1483d3[_0xd3b755(0x218)](_0x3cdb06,_0xbfb62e);}for(const [_0x4036eb,_0x3da2d8]of _0x702c12){if(_0x3da2d8[_0xd3b755(0x1f8)]>0x1)throw hookDirectoryError(_0xd3b755(0x211),_0xd3b755(0x1f6)+_0x4036eb+_0xd3b755(0x205),{'alias':_0x4036eb,'datasetCodes':[..._0x3da2d8]});}for(const [_0x2f6df3,_0x31fc78]of _0x1483d3){if(_0x31fc78[_0xd3b755(0x1f8)]>0x1)throw hookDirectoryError(_0xd3b755(0x211),_0xd3b755(0x219)+_0x2f6df3+_0xd3b755(0x1f1),{'datasetCode':_0x2f6df3,'aliases':[..._0x31fc78]});}}export function buildHookDirectoryIndexes(_0x43d0aa,_0x2925e3=[]){const _0x11af32=a292_0xd79a,_0x41a2f1=[..._0x2925e3];assertUnambiguousHookDirectoryMappings(_0x41a2f1['map'](([_0xf10ad1,_0x1800fc])=>({'alias':_0xf10ad1,'datasetCode':_0x1800fc})));const _0x52350b=new Map(),_0x5a3f3f=new Map();for(const _0x55dd2f of _0x43d0aa){appendUnique(_0x52350b,directoryIdentity(_0x55dd2f[_0x11af32(0x202)]),_0x55dd2f,_0x5427bc=>_0x5427bc['code']);}for(const [_0x1834cc,_0x266933]of _0x41a2f1){appendUnique(_0x5a3f3f,directoryIdentity(_0x1834cc),_0x266933,_0x209738=>_0x209738);}return{'datasetCodeToDatasets':_0x52350b,'aliasToDatasetCodes':_0x5a3f3f};}export function resolvePushHookDirectory(_0x4bf12d,_0x187b35,_0x20d34e){const _0x44a03d=a292_0xd79a,_0xddfcfe=directoryIdentity(_0x4bf12d),_0x3c6fd2=_0x20d34e['datasetCodeToDatasets'][_0x44a03d(0x1fa)](_0xddfcfe)??[],_0x3f4cfb=_0x20d34e['aliasToDatasetCodes'][_0x44a03d(0x1fa)](_0xddfcfe)??[],_0x40c54f=new Set([..._0x3c6fd2['map'](_0x2cfb6e=>_0x2cfb6e['code']),..._0x3f4cfb]);if(_0x40c54f[_0x44a03d(0x1f8)]>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS',_0x44a03d(0x1fd)+_0x4bf12d+_0x44a03d(0x20b),{'directoryName':_0x4bf12d,'datasetCodes':[..._0x40c54f]});const _0xa46ee7=[..._0x40c54f][0x0];if(_0xa46ee7&&_0x187b35?.[_0x44a03d(0x209)]&&_0xa46ee7!==_0x187b35[_0x44a03d(0x209)])throw hookDirectoryError(_0x44a03d(0x200),'HOOK\x20directory\x20\x22'+_0x4bf12d+'\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22'+_0x187b35['datasetCode']+_0x44a03d(0x1f9)+_0xa46ee7+'\x22.',{'directoryName':_0x4bf12d,'datasetCode':_0xa46ee7,'lockedDatasetCode':_0x187b35[_0x44a03d(0x209)]});const _0x3c9df4=_0xa46ee7?findDatasetByCode(_0x20d34e,_0xa46ee7):undefined,_0x55a1ee=!!_0xa46ee7&&_0x3f4cfb[_0x44a03d(0x20e)](_0xa46ee7);if(_0x3c9df4)return{'dataset':_0x3c9df4,'datasetCode':_0x3c9df4[_0x44a03d(0x202)],..._0x55a1ee?{'alias':_0x4bf12d}:{},'directoryProtocol':_0x55a1ee?_0x44a03d(0x203):_0x44a03d(0x209),'warnings':[]};const _0x322c93=_0x187b35?.[_0x44a03d(0x209)];if(_0x322c93){const _0x904c6=findDatasetByCode(_0x20d34e,_0x322c93);if(_0x904c6)return{'dataset':_0x904c6,'datasetCode':_0x904c6[_0x44a03d(0x202)],..._0x187b35['alias']?{'alias':_0x187b35[_0x44a03d(0x203)]}:{},'directoryProtocol':_0x187b35[_0x44a03d(0x203)]?'alias':_0x44a03d(0x209),'warnings':[]};}if(_0xa46ee7||_0x322c93){const _0x20cc1f=_0xa46ee7??_0x322c93;throw hookDirectoryError('HOOK_DATASET_NOT_FOUND','HOOK\x20directory\x20\x22'+_0x4bf12d+'\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.',{'directoryName':_0x4bf12d,'datasetCode':_0x20cc1f});}throw hookDirectoryError(_0x44a03d(0x20f),_0x44a03d(0x1f5)+_0x4bf12d+_0x44a03d(0x1e7),{'directoryName':_0x4bf12d});}export function preflightPushHookDirectories(_0xf01d64,_0x168d71,_0x390dc7,_0xa22efd){const _0x237754=a292_0xd79a,_0x3edfa9=new Map(),_0x315ea6=new Map();for(const _0x3a11b2 of _0xf01d64){if(_0x3a11b2[_0x237754(0x217)]!==_0x237754(0x1fe))continue;const _0x2813a2=_0x3a11b2[_0x237754(0x203)];if(!_0x2813a2)throw hookDirectoryError('HOOK_DIRECTORY_UNRESOLVED','Incomplete\x20HOOK\x20path:\x20'+_0x3a11b2[_0x237754(0x212)],{'lockKey':_0x3a11b2[_0x237754(0x212)]});let _0xb86cf6;try{_0xb86cf6=resolvePushHookDirectory(_0x2813a2,_0x168d71[_0x237754(0x20d)][_0x3a11b2[_0x237754(0x212)]],_0x390dc7);}catch(_0x252285){if(_0xa22efd&&_0x252285 instanceof CliError&&[_0x237754(0x207),'HOOK_DIRECTORY_UNRESOLVED']['includes'](_0x252285[_0x237754(0x202)])){_0xa22efd[_0x237754(0x218)](_0x3a11b2['lockKey'],_0x252285['message']);continue;}throw _0x252285;}_0x3edfa9['set'](_0x3a11b2[_0x237754(0x212)],_0xb86cf6);const _0x22c470=_0x315ea6[_0x237754(0x1fa)](_0xb86cf6[_0x237754(0x209)])??new Set();_0x22c470[_0x237754(0x206)](_0x2813a2),_0x315ea6['set'](_0xb86cf6[_0x237754(0x209)],_0x22c470);}for(const [_0x1c91ec,_0x5c2460]of _0x315ea6){if(_0x5c2460[_0x237754(0x1f8)]>0x1)throw hookDirectoryError('HOOK_DUPLICATE_DIRECTORIES','Dataset\x20\x22'+_0x1c91ec+_0x237754(0x201)+[..._0x5c2460][_0x237754(0x1f4)](',\x20')+'.',{'datasetCode':_0x1c91ec,'directories':[..._0x5c2460]});}return _0x3edfa9;}export function hookDirectoryError(_0x523916,_0x15648a,_0x1038c5){const _0x8d8ed3=a292_0xd79a,_0x4f1c24=new CliError(_0x523916,0x2,_0x523916+':\x20'+_0x15648a);return _0x4f1c24[_0x8d8ed3(0x1eb)]=_0x1038c5,_0x4f1c24;}function a292_0x53bd(){const _0x49c93d=['8219510XKtVxQ','type','set','Dataset\x20\x22','5190456xkydFv','44hzEmzN','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','930640hzXBXQ','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','9TXiUSp','details','name','7DXvVHS','values','Dataset\x20code\x20\x22','map','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','HOOK_DATASET_CODE_AMBIGUOUS','5JoyBbd','join','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','SDK\x20alias\x20\x22','HOOK_DIRECTORY_AMBIGUOUS','size','\x22\x20to\x20\x22','get','entries','push','HOOK\x20directory\x20\x22','HOOK','normalize','HOOK_MAPPING_DRIFT','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','code','alias','17462QJxBru','\x22\x20resolves\x20to\x20multiple\x20Datasets.','add','HOOK_DATASET_NOT_FOUND','6549906yBFZRg','datasetCode','4780785rDEQvW','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','HOOK_DUPLICATE_DIRECTORIES','functions','includes','HOOK_DIRECTORY_UNRESOLVED','datasetCodeToDatasets','HOOK_ALIAS_AMBIGUOUS','lockKey','3vSqEuF','split','1996636FmeRGx'];a292_0x53bd=function(){return _0x49c93d;};return a292_0x53bd();}function findDatasetByCode(_0xa60177,_0x451534){const _0x3a5c76=a292_0xd79a,_0x468815=_0xa60177[_0x3a5c76(0x210)]['get'](directoryIdentity(_0x451534))??[];if(_0x468815['length']>0x1)throw hookDirectoryError(_0x3a5c76(0x1f2),_0x3a5c76(0x1ef)+_0x451534+_0x3a5c76(0x1e9),{'datasetCode':_0x451534,'candidates':_0x468815[_0x3a5c76(0x1f0)](datasetFact)});return _0x468815[0x0];}function directoryIdentity(_0x15f232){const _0xf8186b=a292_0xd79a;return _0x15f232[_0xf8186b(0x1ff)]('NFC')['toLowerCase']();}function appendUnique(_0xe2d61a,_0x4ef4b2,_0x255dfd,_0x10003d){const _0x5ad723=a292_0xd79a,_0x1a7978=_0xe2d61a[_0x5ad723(0x1fa)](_0x4ef4b2)??[];!_0x1a7978['some'](_0x2ee661=>_0x10003d(_0x2ee661)===_0x10003d(_0x255dfd))&&_0x1a7978[_0x5ad723(0x1fc)](_0x255dfd),_0xe2d61a[_0x5ad723(0x218)](_0x4ef4b2,_0x1a7978);}function datasetFact(_0x2e5a4f){const _0x224ff7=a292_0xd79a;return{'id':_0x2e5a4f['id'],'name':_0x2e5a4f[_0x224ff7(0x1ec)],'datasetCode':_0x2e5a4f['code']};}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x47fbcd,_0x4e39d3){const _0x555014=a293_0x535e,_0x2397c7=_0x47fbcd();while(!![]){try{const _0x50660c=parseInt(_0x555014(0x7b))/0x1*(-parseInt(_0x555014(0x89))/0x2)+parseInt(_0x555014(0x83))/0x3*(parseInt(_0x555014(0x8a))/0x4)+-parseInt(_0x555014(0x7d))/0x5+-parseInt(_0x555014(0x7e))/0x6*(parseInt(_0x555014(0x72))/0x7)+parseInt(_0x555014(0x84))/0x8+-parseInt(_0x555014(0x87))/0x9+-parseInt(_0x555014(0x85))/0xa*(-parseInt(_0x555014(0x88))/0xb);if(_0x50660c===_0x4e39d3)break;else _0x2397c7['push'](_0x2397c7['shift']());}catch(_0x3b4888){_0x2397c7['push'](_0x2397c7['shift']());}}}(a293_0x47b5,0x7fa7f));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x8e24d0,_0x8e7a76,_0x2493a8,_0x45017c){const _0x49443b=a293_0x535e,_0x4c6dc2={'apps':_0x8e24d0[_0x49443b(0x74)]&&typeof _0x8e24d0[_0x49443b(0x74)]===_0x49443b(0x8b)?_0x8e24d0['apps']:{}};let _0x3d2436=_0x4c6dc2['apps'][_0x8e7a76];if(!_0x3d2436)return _0x3d2436={'scriptsRoot':_0x2493a8,'lastSync':'','functions':{}},_0x4c6dc2[_0x49443b(0x74)][_0x8e7a76]=_0x3d2436,{'lockData':_0x4c6dc2,'appLock':_0x3d2436};if(!_0x3d2436[_0x49443b(0x7c)])_0x3d2436[_0x49443b(0x7c)]=_0x2493a8;else{if(_0x3d2436[_0x49443b(0x7c)]!==_0x2493a8)throw new Error(_0x45017c+_0x49443b(0x73)+(_0x49443b(0x77)+_0x2493a8+'\x22\x20vs\x20lock\x20\x22'+_0x3d2436['scriptsRoot']+_0x49443b(0x7f))+_0x49443b(0x82));}return!_0x3d2436[_0x49443b(0x7a)]&&(_0x3d2436[_0x49443b(0x7a)]={}),!_0x3d2436[_0x49443b(0x81)]&&(_0x3d2436[_0x49443b(0x81)]=''),{'lockData':_0x4c6dc2,'appLock':_0x3d2436};}export async function readBffLockFile(_0x5bde73){const _0x54d965=a293_0x535e;try{const _0x1b6d9e=await readFile(_0x5bde73,_0x54d965(0x75)),_0x49d321=JSON[_0x54d965(0x76)](_0x1b6d9e);return{'apps':_0x49d321[_0x54d965(0x74)]&&typeof _0x49d321[_0x54d965(0x74)]===_0x54d965(0x8b)?_0x49d321['apps']:{}};}catch(_0x113c79){if(_0x113c79[_0x54d965(0x79)]===_0x54d965(0x78))return null;throw new Error(_0x54d965(0x86)+String(_0x113c79));}}function a293_0x535e(_0x22b6a5,_0x4e5dba){_0x22b6a5=_0x22b6a5-0x72;const _0x47b56c=a293_0x47b5();let _0x535ecd=_0x47b56c[_0x22b6a5];return _0x535ecd;}function a293_0x47b5(){const _0x3af6ba=['24588YLxWao','object','3899dCiakG',':\x20scriptsRoot\x20mismatch\x20—\x20','apps','utf8','parse','current\x20\x22','ENOENT','code','functions','149FCtqqN','scriptsRoot','2579180UXSsxQ','150ntYwGN','\x22.\x20','stringify','lastSync','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','42LrerKL','2513080ynbFBC','10uavpNm','Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20','4714884pOtbzo','15793052uItlea','3482JCZGKk'];a293_0x47b5=function(){return _0x3af6ba;};return a293_0x47b5();}export async function writeBffLockFile(_0x3ca3b3,_0x22ab82){const _0x4b2a80=a293_0x535e;await mkdir(dirname(_0x3ca3b3),{'recursive':!![]}),await writeFile(_0x3ca3b3,JSON[_0x4b2a80(0x80)](_0x22ab82,null,0x2),_0x4b2a80(0x75));}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a295_0x3b3b(_0x936090,_0x879a77){_0x936090=_0x936090-0x1be;const _0xf6372b=a295_0xf637();let _0x3b3b0e=_0xf6372b[_0x936090];return _0x3b3b0e;}function a295_0xf637(){const _0x2f1f32=['23534kBtAif','toLowerCase','619146KnyJWh','13586067ZYieyu','replace','operationType','646170vZuWkw','map','functionNode','startsWith','trim','TODO:\x20补充脚本功能描述','60BoEfye','546762XZNHfW','alias','split','10nWwbFK','TODO:\x20add\x20script\x20description','after','16gphHUp','4985496WtIjTc','776sjUPEN','datasetCode','2281196ZZZmcg','some','test','match','before'];a295_0xf637=function(){return _0x2f1f32;};return a295_0xf637();}const a295_0x522e71=a295_0x3b3b;(function(_0x2111c4,_0x51d605){const _0x11734f=a295_0x3b3b,_0x3a711b=_0x2111c4();while(!![]){try{const _0x41b27e=parseInt(_0x11734f(0x1c1))/0x1+parseInt(_0x11734f(0x1ce))/0x2*(parseInt(_0x11734f(0x1c8))/0x3)+parseInt(_0x11734f(0x1d2))/0x4*(-parseInt(_0x11734f(0x1cb))/0x5)+parseInt(_0x11734f(0x1cf))/0x6+-parseInt(_0x11734f(0x1d7))/0x7*(-parseInt(_0x11734f(0x1d0))/0x8)+-parseInt(_0x11734f(0x1be))/0x9+parseInt(_0x11734f(0x1c7))/0xa*(parseInt(_0x11734f(0x1d9))/0xb);if(_0x41b27e===_0x51d605)break;else _0x3a711b['push'](_0x3a711b['shift']());}catch(_0x54abdc){_0x3a711b['push'](_0x3a711b['shift']());}}}(a295_0xf637,0xe7a33));export const DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x522e71(0x1c6);const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x522e71(0x1cc);export function snakeToCamel(_0xd70005){const _0x54d552=a295_0x522e71;return _0xd70005[_0x54d552(0x1d8)]()[_0x54d552(0x1bf)](/_([a-z])/g,(_0x34c0cb,_0x3c93a6)=>_0x3c93a6['toUpperCase']());}export function findHookLocationByRemoteId(_0xe7f03f,_0xa96c30){const _0x193a55=a295_0x522e71;if(!_0xa96c30)return undefined;for(const [_0x461eec,_0x149cf6]of Object['entries'](_0xe7f03f)){if(_0x149cf6['remoteId']===_0xa96c30&&_0x149cf6[_0x193a55(0x1d1)]&&_0x149cf6[_0x193a55(0x1c0)]&&_0x149cf6[_0x193a55(0x1c3)]){const _0x53ce2e=_0x461eec[_0x193a55(0x1ca)]('/')[0x1];return{'alias':_0x53ce2e||_0x149cf6[_0x193a55(0x1c9)],'datasetCode':_0x149cf6['datasetCode'],'operationType':_0x149cf6[_0x193a55(0x1c0)],'functionNode':_0x149cf6['functionNode']};}}return undefined;}export function extractScriptDescription(_0x4178de){const _0x6020a2=a295_0x522e71,_0x4c3f5a=_0x4178de['match'](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x4c3f5a?.[0x1])return undefined;const _0x326d37=_0x4c3f5a[0x1],_0x3cc5f6=_0x3b2532=>{const _0x5d2b6c=_0x3b2532?.['trim']();if(!_0x5d2b6c||_0x5d2b6c===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0x5d2b6c===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0x5d2b6c;},_0x50928c=_0x326d37[_0x6020a2(0x1d5)](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x50928c)return _0x3cc5f6(_0x50928c[0x1]);const _0x2d4bb9=_0x326d37['split'](/\r?\n/)[_0x6020a2(0x1c2)](_0x4f1aed=>_0x4f1aed[_0x6020a2(0x1bf)](/^\s*\*\s?/,'')[_0x6020a2(0x1c5)]()),_0x24f78f=_0x2d4bb9[_0x6020a2(0x1d3)](_0x4cf82d=>/^\[\s*脚本类型\s*]\s*\S+/['test'](_0x4cf82d))&&_0x2d4bb9[_0x6020a2(0x1d3)](_0xe39a00=>/^\[\s*脚本名称\s*]\s*\S+/[_0x6020a2(0x1d4)](_0xe39a00));if(!_0x24f78f)return undefined;for(const _0x4b5091 of _0x2d4bb9){if(!_0x4b5091||_0x4b5091[_0x6020a2(0x1c4)]('@')||/^\[[^\]]+]\s*/['test'](_0x4b5091))continue;return _0x3cc5f6(_0x4b5091);}return undefined;}export function isValidBffFunctionName(_0x36766a){const _0x52b0a7=a295_0x522e71;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x52b0a7(0x1d4)](_0x36766a);}export function normalizeHookFunctionNode(_0x334ca2){const _0x2abb45=a295_0x522e71;if(!_0x334ca2)return undefined;const _0x472018=_0x334ca2[_0x2abb45(0x1c5)]()['toLowerCase']();if(_0x472018===_0x2abb45(0x1d6)||_0x472018===_0x2abb45(0x1cd))return _0x472018;return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a296_0x2cbb4c=a296_0x2e31;function a296_0x2e31(_0x19ba90,_0x1fd945){_0x19ba90=_0x19ba90-0x8d;const _0x1fdf33=a296_0x1fdf();let _0x2e319a=_0x1fdf33[_0x19ba90];return _0x2e319a;}(function(_0x2f6dd9,_0x5b67ff){const _0x468617=a296_0x2e31,_0x2fe2f3=_0x2f6dd9();while(!![]){try{const _0x241a20=-parseInt(_0x468617(0x93))/0x1+parseInt(_0x468617(0x90))/0x2*(-parseInt(_0x468617(0x94))/0x3)+-parseInt(_0x468617(0x97))/0x4+parseInt(_0x468617(0x92))/0x5*(parseInt(_0x468617(0x98))/0x6)+parseInt(_0x468617(0x8e))/0x7+-parseInt(_0x468617(0x91))/0x8+parseInt(_0x468617(0x95))/0x9*(parseInt(_0x468617(0x8f))/0xa);if(_0x241a20===_0x5b67ff)break;else _0x2fe2f3['push'](_0x2fe2f3['shift']());}catch(_0x1fccf8){_0x2fe2f3['push'](_0x2fe2f3['shift']());}}}(a296_0x1fdf,0x7a0bf));export const CROSS_DB_ANALYSIS_PATHS={'start':a296_0x2cbb4c(0x8d),'status':a296_0x2cbb4c(0x96),'latest':'/smartapi/db-analysis/cross-db/latest-job'};function a296_0x1fdf(){const _0x180cef=['33nXPRKg','18112824dpNfGR','/smartapi/db-analysis/cross-db/status','990116dlXuMM','55050gdSOYJ','/smartapi/db-analysis/cross-db/start','2379608GeUEZN','10FyYQkv','165374hYiMTU','5851696UAATvI','45uMuUju','46604XDZBJy'];a296_0x1fdf=function(){return _0x180cef;};return a296_0x1fdf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a297_0x12af6b=a297_0x24fc;function a297_0x24fc(_0x3e5603,_0x47e55a){_0x3e5603=_0x3e5603-0x8b;const _0x2f4bbf=a297_0x2f4b();let _0x24fc16=_0x2f4bbf[_0x3e5603];return _0x24fc16;}(function(_0x14dc74,_0xf0bcc9){const _0x40db1c=a297_0x24fc,_0x5d7d91=_0x14dc74();while(!![]){try{const _0x49b609=parseInt(_0x40db1c(0x97))/0x1*(-parseInt(_0x40db1c(0x94))/0x2)+-parseInt(_0x40db1c(0x8c))/0x3+-parseInt(_0x40db1c(0x99))/0x4*(-parseInt(_0x40db1c(0x92))/0x5)+-parseInt(_0x40db1c(0x91))/0x6*(parseInt(_0x40db1c(0x96))/0x7)+parseInt(_0x40db1c(0x8f))/0x8+parseInt(_0x40db1c(0x8e))/0x9*(-parseInt(_0x40db1c(0x9a))/0xa)+-parseInt(_0x40db1c(0x8d))/0xb*(-parseInt(_0x40db1c(0x95))/0xc);if(_0x49b609===_0xf0bcc9)break;else _0x5d7d91['push'](_0x5d7d91['shift']());}catch(_0xd55e1){_0x5d7d91['push'](_0x5d7d91['shift']());}}}(a297_0x2f4b,0x7a9cb));export const CROSS_DB_RELATION_PATHS={'list':a297_0x12af6b(0x98),'create':a297_0x12af6b(0x90),'update':a297_0x12af6b(0x93),'delete':a297_0x12af6b(0x8b)};function a297_0x2f4b(){const _0x3aa2fd=['13617900dbDxBe','3111682JPYazv','11816EyaTIY','/smartapi/cross-db-relation/query','16oqOZaW','53230biTMbA','/smartapi/cross-db-relation/delete','2277927OndTSv','11NZcRzK','315SwTKVa','4745712lByNeu','/smartapi/cross-db-relation/create','6eUcNfE','988210TpgupZ','/smartapi/cross-db-relation/update','106vaUhab'];a297_0x2f4b=function(){return _0x3aa2fd;};return a297_0x2f4b();}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x38ae4b,_0x146f6c){const _0x1a64ee=a298_0x5271,_0x5e8a99=_0x38ae4b();while(!![]){try{const _0x2d886d=parseInt(_0x1a64ee(0x1df))/0x1*(parseInt(_0x1a64ee(0x1e9))/0x2)+parseInt(_0x1a64ee(0x1d8))/0x3+parseInt(_0x1a64ee(0x1e1))/0x4+-parseInt(_0x1a64ee(0x1eb))/0x5*(parseInt(_0x1a64ee(0x1e8))/0x6)+parseInt(_0x1a64ee(0x1de))/0x7*(-parseInt(_0x1a64ee(0x1e0))/0x8)+-parseInt(_0x1a64ee(0x1d3))/0x9+-parseInt(_0x1a64ee(0x1e2))/0xa*(parseInt(_0x1a64ee(0x1db))/0xb);if(_0x2d886d===_0x146f6c)break;else _0x5e8a99['push'](_0x5e8a99['shift']());}catch(_0x4073b1){_0x5e8a99['push'](_0x5e8a99['shift']());}}}(a298_0x24db,0x54121));import{listDatasets}from'../core/api-client.js';const cache=new Map();function a298_0x5271(_0x233568,_0x2a112d){_0x233568=_0x233568-0x1d0;const _0x24dbdb=a298_0x24db();let _0x527164=_0x24dbdb[_0x233568];return _0x527164;}export async function listDatabases(_0x23e8d2){const _0x3f84ce=a298_0x5271;if(cache[_0x3f84ce(0x1d2)](_0x23e8d2))return cache[_0x3f84ce(0x1dc)](_0x23e8d2);const _0x35f1a0=await listDatasets(_0x23e8d2),_0x1eb276=new Map();for(const _0x3efe74 of _0x35f1a0){const _0x2820e8=_0x3efe74[_0x3f84ce(0x1e6)];_0x2820e8?.[_0x3f84ce(0x1e7)]!=null&&_0x1eb276['set'](_0x2820e8[_0x3f84ce(0x1e7)],_0x2820e8[_0x3f84ce(0x1d0)]??_0x3f84ce(0x1d5)+_0x2820e8[_0x3f84ce(0x1e7)]);}const _0x3207b0=[..._0x1eb276[_0x3f84ce(0x1d4)]()]['map'](([_0x31abb7,_0x5b10b3])=>({'dbId':_0x31abb7,'dbName':_0x5b10b3}));return cache[_0x3f84ce(0x1ed)](_0x23e8d2,_0x3207b0),_0x3207b0;}function a298_0x24db(){const _0x23c805=['dbName','isNaN','has','6080445khAFjv','entries','db-','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','map','1917564DBRkGI','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','No\x20database\x20matching\x20\x22','129723KWsGvy','get','join','179207MKUmpG','5693jCpzLU','8pttJdp','1209124YCLItt','210KwBKsG','find','length','filter','dbtableConfig','dbId','6bPBwOn','226ydbtbu','toLowerCase','1457830FswEIg','.\x20Be\x20more\x20specific.','set','\x22\x20matches\x20multiple\x20databases:\x20'];a298_0x24db=function(){return _0x23c805;};return a298_0x24db();}export async function resolveDb(_0x4ec825,_0x39901f){const _0x115557=a298_0x5271,_0x4f0046=await listDatabases(_0x4ec825);if(_0x4f0046[_0x115557(0x1e4)]===0x0)return{'resolved':[],'error':_0x115557(0x1d9)+_0x4ec825+_0x115557(0x1d6)};if(!_0x39901f)return{'resolved':_0x4f0046};const _0x19ee83=Number(_0x39901f);if(!Number[_0x115557(0x1d1)](_0x19ee83)){const _0x581028=_0x4f0046[_0x115557(0x1e3)](_0x14814a=>_0x14814a[_0x115557(0x1e7)]===_0x19ee83);if(_0x581028)return{'resolved':[_0x581028]};}const _0x48c1c7=_0x39901f[_0x115557(0x1ea)](),_0x2bf549=_0x4f0046[_0x115557(0x1e5)](_0x5e5c90=>_0x5e5c90['dbName']['toLowerCase']()['includes'](_0x48c1c7));if(_0x2bf549[_0x115557(0x1e4)]>0x0)return{'resolved':_0x2bf549};const _0x1eaa89=_0x4f0046[_0x115557(0x1d7)](_0x202e77=>_0x202e77['dbName']+'\x20('+_0x202e77[_0x115557(0x1e7)]+')')[_0x115557(0x1dd)](',\x20');return{'resolved':[],'error':_0x115557(0x1da)+_0x39901f+'\x22\x20under\x20app\x20\x22'+_0x4ec825+'\x22.\x20Available:\x20'+_0x1eaa89+'.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.'};}export async function resolveOneDb(_0x3cdb44,_0x4232a3){const _0x20322b=a298_0x5271,{resolved:_0x1c6485,error:_0x5040c5}=await resolveDb(_0x3cdb44,_0x4232a3);if(_0x5040c5)return{'db':null,'error':_0x5040c5};if(_0x1c6485[_0x20322b(0x1e4)]===0x1)return{'db':_0x1c6485[0x0]};if(!_0x4232a3){const _0x292660=_0x1c6485[_0x20322b(0x1d7)](_0x235204=>_0x235204[_0x20322b(0x1d0)]+'\x20('+_0x235204[_0x20322b(0x1e7)]+')')[_0x20322b(0x1dd)](',\x20');return{'db':null,'error':'Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20'+_0x292660};}const _0x225f48=_0x1c6485[_0x20322b(0x1d7)](_0x4b9b14=>_0x4b9b14[_0x20322b(0x1d0)]+'\x20('+_0x4b9b14[_0x20322b(0x1e7)]+')')[_0x20322b(0x1dd)](',\x20');return{'db':null,'error':'\x22'+_0x4232a3+_0x20322b(0x1ee)+_0x225f48+_0x20322b(0x1ec)};}export async function getDbName(_0x22377b,_0x3b2b10){const _0x5e4525=a298_0x5271,_0x2e2b45=await listDatabases(_0x22377b);return _0x2e2b45['find'](_0x2de277=>_0x2de277[_0x5e4525(0x1e7)]===_0x3b2b10)?.[_0x5e4525(0x1d0)];}
|