@lovrabet/rabetbase-cli 2.5.12 → 2.5.13
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/context.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/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/guides/custom-page-workflow.md +32 -2
- package/skills/rabetbase/knowledge/custom-page/generation-standards.md +106 -6
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
- package/templates/custom-pages/blank.json +1 -1
- package/templates/custom-pages/dashboard.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a290_0x322a16=a290_0x1d6b;(function(_0x53a690,_0x1543c0){const _0x227218=a290_0x1d6b,_0x211f55=_0x53a690();while(!![]){try{const _0x4a1381=-parseInt(_0x227218(0x1a2))/0x1+-parseInt(_0x227218(0x18d))/0x2+-parseInt(_0x227218(0x196))/0x3+parseInt(_0x227218(0x18a))/0x4+-parseInt(_0x227218(0x18f))/0x5*(parseInt(_0x227218(0x197))/0x6)+-parseInt(_0x227218(0x180))/0x7*(parseInt(_0x227218(0x199))/0x8)+parseInt(_0x227218(0x185))/0x9;if(_0x4a1381===_0x1543c0)break;else _0x211f55['push'](_0x211f55['shift']());}catch(_0xb5aa7f){_0x211f55['push'](_0x211f55['shift']());}}}(a290_0x1d55,0xd006b));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_0x322a16(0x19d),a290_0x322a16(0x184),a290_0x322a16(0x191)];export function normalizeBffType(_0x2ac27e){const _0x21614e=a290_0x322a16;if(!_0x2ac27e)return undefined;const _0x37c501=_0x2ac27e[_0x21614e(0x17f)]()['toUpperCase']();return SUPPORTED_BFF_TYPES[_0x21614e(0x192)](_0x37c501)?_0x37c501:undefined;}async function scanJsFilesRecursively(_0x1d7b3b,_0x2ff487){const _0x3ae69a=a290_0x322a16,_0x5dc6e3=[];try{const _0x3832fd=await readdir(_0x1d7b3b,{'withFileTypes':!![]});for(const _0xca3b88 of _0x3832fd){const _0x2224b9=join(_0x1d7b3b,_0xca3b88[_0x3ae69a(0x19e)]);if(_0xca3b88[_0x3ae69a(0x186)]())_0x5dc6e3['push'](...await scanJsFilesRecursively(_0x2224b9,_0x2ff487+'/'+_0xca3b88[_0x3ae69a(0x19e)]));else _0xca3b88['isFile']()&&_0xca3b88[_0x3ae69a(0x19e)]['endsWith'](_0x3ae69a(0x19b))&&_0x5dc6e3[_0x3ae69a(0x181)]({'lockKey':_0x2ff487+'/'+_0xca3b88[_0x3ae69a(0x19e)][_0x3ae69a(0x18e)](/\.js$/,''),'filePath':_0x2224b9});}}catch(_0x2ec0d2){if(_0x2ec0d2[_0x3ae69a(0x198)]!==_0x3ae69a(0x18b))throw _0x2ec0d2;}return _0x5dc6e3;}function a290_0x1d6b(_0x5f5cf5,_0x32486f){_0x5f5cf5=_0x5f5cf5-0x17a;const _0x1d5509=a290_0x1d55();let _0x1d6bff=_0x1d5509[_0x5f5cf5];return _0x1d6bff;}async function scanFlatFunctions(_0xabe776,_0x56a717){const _0x18db8d=a290_0x322a16,_0x1cefcd=join(_0xabe776['scriptsRootDir'],_0x56a717),_0x14dc15=await scanJsFilesRecursively(_0x1cefcd,_0x56a717);return _0x14dc15[_0x18db8d(0x188)](({lockKey:_0x333fc1,filePath:_0x3a0f79})=>({'type':_0x56a717,'name':_0x333fc1[_0x18db8d(0x1a1)]('/')['at'](-0x1)??'','filePath':_0x3a0f79,'lockKey':_0x333fc1}));}async function scanHookFunctions(_0x360c0d){const _0x3ba658=a290_0x322a16,_0x40c404=join(_0x360c0d['scriptsRootDir'],'HOOK'),_0x5311db=[];try{const _0x4f2147=await readdir(_0x40c404,{'withFileTypes':!![]});for(const _0xa0c33c of _0x4f2147){if(!_0xa0c33c['isDirectory']())continue;const _0x25117b=_0xa0c33c[_0x3ba658(0x19e)],_0x54874b=join(_0x40c404,_0x25117b),_0x409970=await readdir(_0x54874b,{'withFileTypes':!![]});for(const _0x1c3d13 of _0x409970){if(!_0x1c3d13[_0x3ba658(0x186)]())continue;const _0x46d2cb=_0x1c3d13['name'],_0x45262d=join(_0x54874b,_0x46d2cb),_0x41fdfb=await readdir(_0x45262d,{'withFileTypes':!![]});for(const _0x134aa4 of _0x41fdfb){if(!_0x134aa4['isDirectory']())continue;const _0x50c8c4=_0x134aa4[_0x3ba658(0x19e)],_0x419f8d=join(_0x45262d,_0x50c8c4),_0x39d4d8=await readdir(_0x419f8d,{'withFileTypes':!![]});for(const _0x28a4fd of _0x39d4d8){if(!_0x28a4fd[_0x3ba658(0x1a0)]()||!_0x28a4fd['name'][_0x3ba658(0x194)]('.js'))continue;const _0x2aee41=_0x28a4fd[_0x3ba658(0x19e)][_0x3ba658(0x18e)](/\.js$/,'');_0x5311db[_0x3ba658(0x181)]({'type':_0x3ba658(0x191),'name':_0x2aee41,'filePath':join(_0x419f8d,_0x28a4fd[_0x3ba658(0x19e)]),'lockKey':_0x3ba658(0x183)+_0x25117b+'/'+_0x46d2cb+'/'+_0x50c8c4+'/'+_0x2aee41,'alias':_0x25117b,'operationType':_0x46d2cb,'functionNode':_0x50c8c4});}}}}}catch(_0x28cd89){if(_0x28cd89['code']!==_0x3ba658(0x18b))throw _0x28cd89;}return _0x5311db;}export async function scanLocalBffFunctions(_0x5d5532,_0x320a15){const _0x5b7c39=a290_0x322a16;if(_0x320a15===_0x5b7c39(0x19d)||_0x320a15===_0x5b7c39(0x184))return scanFlatFunctions(_0x5d5532,_0x320a15);if(_0x320a15===_0x5b7c39(0x191))return scanHookFunctions(_0x5d5532);const [_0x37a80a,_0x20791a,_0x1d2e33]=await Promise[_0x5b7c39(0x193)]([scanFlatFunctions(_0x5d5532,_0x5b7c39(0x19d)),scanFlatFunctions(_0x5d5532,'ENDPOINT'),scanHookFunctions(_0x5d5532)]);return[..._0x37a80a,..._0x20791a,..._0x1d2e33];}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x45e2d2){const _0x4ad71b=a290_0x322a16;return SAFE_LOCK_KEY_SEGMENT[_0x4ad71b(0x17a)](_0x45e2d2)&&_0x45e2d2!=='.'&&_0x45e2d2!=='..';}export function resolveLocalFilePathFromLockKey(_0x4c1525,_0x22126d){const _0x310e9b=a290_0x322a16,_0x5292fe=_0x22126d['split']('/');if(!_0x5292fe[_0x310e9b(0x189)](isSafeLockKeySegment))throw new Error('Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20'+_0x22126d);const _0x11a1d9=resolve(join(_0x4c1525[_0x310e9b(0x187)],..._0x5292fe)+_0x310e9b(0x19b)),_0x3a595a=resolve(_0x4c1525['scriptsRootDir']);if(_0x11a1d9!==_0x3a595a&&!_0x11a1d9[_0x310e9b(0x182)](_0x3a595a+sep))throw new Error('Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20'+_0x11a1d9);return _0x11a1d9;}export function createHookLocationMap(_0x28189a){const _0x4d949d=a290_0x322a16,_0x298683=new Map();for(const _0x2b5210 of _0x28189a){_0x2b5210['beforeScriptId']&&_0x298683[_0x4d949d(0x19c)](_0x2b5210[_0x4d949d(0x19f)],{'datasetCode':_0x2b5210['datasetCode'],'operationType':snakeToCamel(_0x2b5210[_0x4d949d(0x17b)]),'functionNode':_0x4d949d(0x190)}),_0x2b5210[_0x4d949d(0x17e)]&&_0x298683[_0x4d949d(0x19c)](_0x2b5210[_0x4d949d(0x17e)],{'datasetCode':_0x2b5210[_0x4d949d(0x18c)],'operationType':snakeToCamel(_0x2b5210[_0x4d949d(0x17b)]),'functionNode':_0x4d949d(0x19a)});}return _0x298683;}export function resolveRemoteScriptTarget(_0x41c5cd,_0x12fdfe,_0x3b4a68,_0x35ce0a,_0x111135){const _0x4e8a68=a290_0x322a16,_0x15c76f=normalizeBffType(_0x12fdfe[_0x4e8a68(0x17c)]);if(!_0x15c76f||!_0x12fdfe[_0x4e8a68(0x195)])return null;if(_0x15c76f==='HOOK'){const _0x4a147b=_0x12fdfe['id']?_0x3b4a68['get'](_0x12fdfe['id']):undefined,_0x404049=findHookLocationByRemoteId(_0x35ce0a,_0x12fdfe['id']),_0x11f088=_0x4a147b?{..._0x404049?.[_0x4e8a68(0x18c)]===_0x4a147b[_0x4e8a68(0x18c)]?_0x404049:{},..._0x4a147b}:_0x404049;if(!_0x11f088)return null;const _0x1e64c9=_0x111135['get'](_0x11f088['datasetCode']['toLowerCase']()),_0x34a1af=_0x1e64c9??_0x11f088['datasetCode'],_0x2440e1={..._0x11f088,'alias':_0x1e64c9},_0x9fa7c7='HOOK/'+_0x34a1af+'/'+_0x2440e1[_0x4e8a68(0x17b)]+'/'+_0x2440e1[_0x4e8a68(0x17d)]+'/'+_0x12fdfe[_0x4e8a68(0x195)];if(!_0x9fa7c7[_0x4e8a68(0x1a1)]('/')['every'](isSafeLockKeySegment))return null;return{'lockKey':_0x9fa7c7,'filePath':resolveLocalFilePathFromLockKey(_0x41c5cd,_0x9fa7c7),'type':_0x4e8a68(0x191),'hookLocation':_0x2440e1};}const _0x5ba828=_0x15c76f+'/'+_0x12fdfe[_0x4e8a68(0x195)];if(!_0x5ba828['split']('/')[_0x4e8a68(0x189)](isSafeLockKeySegment))return null;return{'lockKey':_0x5ba828,'filePath':resolveLocalFilePathFromLockKey(_0x41c5cd,_0x5ba828),'type':_0x15c76f};}function a290_0x1d55(){const _0x11a3d4=['beforeScriptId','isFile','split','1017897oOJTvh','test','operationType','scriptType','functionNode','afterScriptId','trim','147434pUuPsZ','push','startsWith','HOOK/','ENDPOINT','29649393idtxLt','isDirectory','scriptsRootDir','map','every','4258264RkACcc','ENOENT','datasetCode','1514122LqSZtr','replace','5rdBdaL','before','HOOK','includes','all','endsWith','functionName','967092MhUbbc','369468EbCKPz','code','512XsXvLV','after','.js','set','COMMON','name'];a290_0x1d55=function(){return _0x11a3d4;};return a290_0x1d55();}export async function ensureParentDirectory(_0x4dd82a){await mkdir(dirname(_0x4dd82a),{'recursive':!![]});}export async function fileExists(_0x55e0ae){try{return await access(_0x55e0ae,constants['F_OK']),!![];}catch{return![];}}export async function directoryExists(_0x39f1e9){const _0x3128e7=a290_0x322a16;try{const _0x2a877c=await stat(_0x39f1e9);return _0x2a877c[_0x3128e7(0x186)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a291_0x372a(_0x1699ca,_0x1a4f31){_0x1699ca=_0x1699ca-0x12d;const _0x4eeb69=a291_0x4eeb();let _0x372a1e=_0x4eeb69[_0x1699ca];return _0x372a1e;}function a291_0x4eeb(){const _0x1aa5cf=['18GfeOWv','5rByzWg','2764144XmvoDR','1256958GfOlcI','270348CyrKcy','hex','md5','3408174BjpvtK','utf8','609972MeEDMM','9724EKtoGz','842592RTvqHP','update','createHash'];a291_0x4eeb=function(){return _0x1aa5cf;};return a291_0x4eeb();}(function(_0xd94d0b,_0x407615){const _0x45eaea=a291_0x372a,_0x30f590=_0xd94d0b();while(!![]){try{const _0x592c15=parseInt(_0x45eaea(0x12d))/0x1+-parseInt(_0x45eaea(0x133))/0x2+-parseInt(_0x45eaea(0x132))/0x3+-parseInt(_0x45eaea(0x134))/0x4+-parseInt(_0x45eaea(0x138))/0x5*(-parseInt(_0x45eaea(0x13a))/0x6)+-parseInt(_0x45eaea(0x130))/0x7+parseInt(_0x45eaea(0x139))/0x8*(parseInt(_0x45eaea(0x137))/0x9);if(_0x592c15===_0x407615)break;else _0x30f590['push'](_0x30f590['shift']());}catch(_0x178762){_0x30f590['push'](_0x30f590['shift']());}}}(a291_0x4eeb,0x40bc9));import{readFile}from'node:fs/promises';import a291_0x33756c from'node:crypto';export function computeContentHash(_0x1951e9){const _0x5f1e03=a291_0x372a;return a291_0x33756c[_0x5f1e03(0x136)](_0x5f1e03(0x12f))[_0x5f1e03(0x135)](_0x1951e9)['digest'](_0x5f1e03(0x12e));}export async function computeFileHash(_0x36367b){const _0x491ce7=a291_0x372a,_0x2ed554=await readFile(_0x36367b,_0x491ce7(0x131));return computeContentHash(_0x2ed554);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x58caa0,_0x9def15){const _0xf777e9=a292_0x113e,_0x577b12=_0x58caa0();while(!![]){try{const _0x5870d2=parseInt(_0xf777e9(0xd8))/0x1*(parseInt(_0xf777e9(0xc9))/0x2)+parseInt(_0xf777e9(0xc3))/0x3+parseInt(_0xf777e9(0xde))/0x4*(parseInt(_0xf777e9(0xd9))/0x5)+parseInt(_0xf777e9(0xc8))/0x6*(-parseInt(_0xf777e9(0xb8))/0x7)+parseInt(_0xf777e9(0xef))/0x8*(-parseInt(_0xf777e9(0xd0))/0x9)+parseInt(_0xf777e9(0xf0))/0xa*(parseInt(_0xf777e9(0xcb))/0xb)+parseInt(_0xf777e9(0xd7))/0xc;if(_0x5870d2===_0x9def15)break;else _0x577b12['push'](_0x577b12['shift']());}catch(_0x4899f4){_0x577b12['push'](_0x577b12['shift']());}}}(a292_0x3785,0x70aa9));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x5b0e61){const _0xeaf13c=a292_0x113e,_0xf2f9df=[];for(const [_0xee3d9e,_0x204ad6]of Object[_0xeaf13c(0xd2)](_0x5b0e61['functions'])){const [_0x160b98,_0x462585]=_0xee3d9e[_0xeaf13c(0xcc)]('/');if(_0x160b98!==_0xeaf13c(0xd5)||!_0x462585||!_0x204ad6['datasetCode'])continue;_0xf2f9df[_0xeaf13c(0xe8)]({'alias':_0x462585,'datasetCode':_0x204ad6[_0xeaf13c(0xc7)]});}return _0xf2f9df;}export function uniqueTrackedHookDirectoryByDataset(_0x57adf2){const _0x1affcb=a292_0x113e,_0x349ed3=new Map();for(const _0x225298 of trackedHookDirectoryMappings(_0x57adf2)){const _0x17cbc3=directoryIdentity(_0x225298[_0x1affcb(0xc7)]),_0x18921a=_0x349ed3[_0x1affcb(0xc1)](_0x17cbc3)??new Map();_0x18921a[_0x1affcb(0xc6)](directoryIdentity(_0x225298['alias']),_0x225298['alias']),_0x349ed3[_0x1affcb(0xc6)](_0x17cbc3,_0x18921a);}const _0xf8c12e=new Map();for(const [_0x33de21,_0xc16969]of _0x349ed3){if(_0xc16969[_0x1affcb(0xcd)]>0x1)throw hookDirectoryError('HOOK_DUPLICATE_DIRECTORIES',_0x1affcb(0xec)+_0x33de21+_0x1affcb(0xed)+[..._0xc16969[_0x1affcb(0xdb)]()]['join'](',\x20')+'.',{'datasetCode':_0x33de21,'directories':[..._0xc16969[_0x1affcb(0xdb)]()]});_0xf8c12e[_0x1affcb(0xc6)](_0x33de21,[..._0xc16969[_0x1affcb(0xdb)]()][0x0]);}return _0xf8c12e;}export function assertUnambiguousHookDirectoryMappings(_0x534d31){const _0xc4fbbf=a292_0x113e,_0x40ab65=new Map();for(const {alias:_0x2bb66b,datasetCode:_0x5ac05a}of _0x534d31){const _0x54895b=directoryIdentity(_0x2bb66b),_0x56575b=_0x40ab65[_0xc4fbbf(0xc1)](_0x54895b)??new Set();_0x56575b['add'](_0x5ac05a),_0x40ab65['set'](_0x54895b,_0x56575b);}for(const [_0xed1f40,_0x267d9e]of _0x40ab65){if(_0x267d9e[_0xc4fbbf(0xcd)]>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS','HOOK\x20directory\x20\x22'+_0xed1f40+_0xc4fbbf(0xbd),{'directoryName':_0xed1f40,'datasetCodes':[..._0x267d9e]});}}export function assertUnambiguousHookAliases(_0x105d5f){const _0x32614e=a292_0x113e,_0x5d9057=[..._0x105d5f],_0x499814=new Map(),_0x3e32d8=new Map();for(const {alias:_0x2ae001,datasetCode:_0x171b44}of _0x5d9057){const _0x41ec15=directoryIdentity(_0x2ae001),_0x1b36f0=directoryIdentity(_0x171b44),_0x433e89=_0x499814[_0x32614e(0xc1)](_0x41ec15)??new Set();_0x433e89[_0x32614e(0xe9)](_0x171b44),_0x499814[_0x32614e(0xc6)](_0x41ec15,_0x433e89);const _0x3d2860=_0x3e32d8[_0x32614e(0xc1)](_0x1b36f0)??new Set();_0x3d2860[_0x32614e(0xe9)](_0x2ae001),_0x3e32d8[_0x32614e(0xc6)](_0x1b36f0,_0x3d2860);}for(const [_0x4f6951,_0x593b1b]of _0x499814){if(_0x593b1b['size']>0x1)throw hookDirectoryError(_0x32614e(0xeb),_0x32614e(0xca)+_0x4f6951+_0x32614e(0xbd),{'alias':_0x4f6951,'datasetCodes':[..._0x593b1b]});}for(const [_0xc91417,_0xbdebc6]of _0x3e32d8){if(_0xbdebc6[_0x32614e(0xcd)]>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS','Dataset\x20\x22'+_0xc91417+_0x32614e(0xe1),{'datasetCode':_0xc91417,'aliases':[..._0xbdebc6]});}}export function buildHookDirectoryIndexes(_0x4e9ddc,_0x34604e=[]){const _0xe90c82=a292_0x113e,_0x29ab45=[..._0x34604e];assertUnambiguousHookDirectoryMappings(_0x29ab45[_0xe90c82(0xbe)](([_0x366338,_0x54bbd7])=>({'alias':_0x366338,'datasetCode':_0x54bbd7})));const _0x1912d5=new Map(),_0x1b3db4=new Map();for(const _0x4fd86c of _0x4e9ddc){appendUnique(_0x1912d5,directoryIdentity(_0x4fd86c[_0xe90c82(0xdd)]),_0x4fd86c,_0x42f7da=>_0x42f7da['code']);}for(const [_0x1a817f,_0x96cb7f]of _0x29ab45){appendUnique(_0x1b3db4,directoryIdentity(_0x1a817f),_0x96cb7f,_0x4c02f3=>_0x4c02f3);}return{'datasetCodeToDatasets':_0x1912d5,'aliasToDatasetCodes':_0x1b3db4};}function a292_0x113e(_0x41179d,_0x32650f){_0x41179d=_0x41179d-0xb8;const _0x378534=a292_0x3785();let _0x113e36=_0x378534[_0x41179d];return _0x113e36;}export function resolvePushHookDirectory(_0x38927a,_0x43a62c,_0x2e4dc8){const _0x5e0284=a292_0x113e,_0x311921=directoryIdentity(_0x38927a),_0x1e9eda=_0x2e4dc8[_0x5e0284(0xc2)]['get'](_0x311921)??[],_0x8b298b=_0x2e4dc8[_0x5e0284(0xee)][_0x5e0284(0xc1)](_0x311921)??[],_0x426d1e=new Set([..._0x1e9eda[_0x5e0284(0xbe)](_0x23d972=>_0x23d972[_0x5e0284(0xdd)]),..._0x8b298b]);if(_0x426d1e[_0x5e0284(0xcd)]>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS',_0x5e0284(0xce)+_0x38927a+_0x5e0284(0xd6),{'directoryName':_0x38927a,'datasetCodes':[..._0x426d1e]});const _0x4c8107=[..._0x426d1e][0x0];if(_0x4c8107&&_0x43a62c?.[_0x5e0284(0xc7)]&&_0x4c8107!==_0x43a62c['datasetCode'])throw hookDirectoryError(_0x5e0284(0xba),_0x5e0284(0xce)+_0x38927a+_0x5e0284(0xe5)+_0x43a62c['datasetCode']+_0x5e0284(0xe0)+_0x4c8107+'\x22.',{'directoryName':_0x38927a,'datasetCode':_0x4c8107,'lockedDatasetCode':_0x43a62c['datasetCode']});const _0x33fc46=_0x4c8107?findDatasetByCode(_0x2e4dc8,_0x4c8107):undefined,_0x1aaecb=!!_0x4c8107&&_0x8b298b[_0x5e0284(0xbf)](_0x4c8107);if(_0x33fc46)return{'dataset':_0x33fc46,'datasetCode':_0x33fc46[_0x5e0284(0xdd)],..._0x1aaecb?{'alias':_0x38927a}:{},'directoryProtocol':_0x1aaecb?'alias':_0x5e0284(0xc7),'warnings':[]};const _0x1bee7d=_0x43a62c?.[_0x5e0284(0xc7)];if(_0x1bee7d){const _0x6011c9=findDatasetByCode(_0x2e4dc8,_0x1bee7d);if(_0x6011c9)return{'dataset':_0x6011c9,'datasetCode':_0x6011c9['code'],..._0x43a62c[_0x5e0284(0xea)]?{'alias':_0x43a62c[_0x5e0284(0xea)]}:{},'directoryProtocol':_0x43a62c[_0x5e0284(0xea)]?_0x5e0284(0xea):'datasetCode','warnings':[]};}if(_0x4c8107||_0x1bee7d){const _0x56cf6c=_0x4c8107??_0x1bee7d;throw hookDirectoryError(_0x5e0284(0xb9),_0x5e0284(0xce)+_0x38927a+_0x5e0284(0xc5),{'directoryName':_0x38927a,'datasetCode':_0x56cf6c});}throw hookDirectoryError('HOOK_DIRECTORY_UNRESOLVED','Cannot\x20resolve\x20HOOK\x20directory\x20\x22'+_0x38927a+_0x5e0284(0xdc),{'directoryName':_0x38927a});}export function preflightPushHookDirectories(_0x316ab7,_0x152c75,_0x5b0c7a,_0x1c46de){const _0x208be5=a292_0x113e,_0x5d7de2=new Map(),_0x5be1aa=new Map();for(const _0x2f28b5 of _0x316ab7){if(_0x2f28b5['type']!==_0x208be5(0xd5))continue;const _0x23b968=_0x2f28b5[_0x208be5(0xea)];if(!_0x23b968)throw hookDirectoryError(_0x208be5(0xd4),'Incomplete\x20HOOK\x20path:\x20'+_0x2f28b5[_0x208be5(0xd1)],{'lockKey':_0x2f28b5[_0x208be5(0xd1)]});let _0x18ab25;try{_0x18ab25=resolvePushHookDirectory(_0x23b968,_0x152c75[_0x208be5(0xe4)][_0x2f28b5[_0x208be5(0xd1)]],_0x5b0c7a);}catch(_0x11706c){if(_0x1c46de&&_0x11706c instanceof CliError&&['HOOK_DATASET_NOT_FOUND','HOOK_DIRECTORY_UNRESOLVED'][_0x208be5(0xbf)](_0x11706c[_0x208be5(0xdd)])){_0x1c46de['set'](_0x2f28b5[_0x208be5(0xd1)],_0x11706c[_0x208be5(0xd3)]);continue;}throw _0x11706c;}_0x5d7de2['set'](_0x2f28b5[_0x208be5(0xd1)],_0x18ab25);const _0xe20aae=_0x5be1aa[_0x208be5(0xc1)](_0x18ab25[_0x208be5(0xc7)])??new Set();_0xe20aae[_0x208be5(0xe9)](_0x23b968),_0x5be1aa['set'](_0x18ab25[_0x208be5(0xc7)],_0xe20aae);}for(const [_0x350fc6,_0x76a148]of _0x5be1aa){if(_0x76a148[_0x208be5(0xcd)]>0x1)throw hookDirectoryError(_0x208be5(0xc0),_0x208be5(0xec)+_0x350fc6+_0x208be5(0xcf)+[..._0x76a148]['join'](',\x20')+'.',{'datasetCode':_0x350fc6,'directories':[..._0x76a148]});}return _0x5d7de2;}export function hookDirectoryError(_0x347b6c,_0xd21fa8,_0x45989c){const _0x28ef36=a292_0x113e,_0x284823=new CliError(_0x347b6c,0x2,_0x347b6c+':\x20'+_0xd21fa8);return _0x284823[_0x28ef36(0xe6)]=_0x45989c,_0x284823;}function a292_0x3785(){const _0x4fbad8=['1IpufQg','10oqZLRT','normalize','values','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','code','1193084uyPVyT','some','\x22\x20to\x20\x22','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','name','Dataset\x20code\x20\x22','functions','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','details','HOOK_DATASET_CODE_AMBIGUOUS','push','add','alias','HOOK_ALIAS_AMBIGUOUS','Dataset\x20\x22','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','aliasToDatasetCodes','5973784MFPEXg','20QPBAAG','70SUZHJK','HOOK_DATASET_NOT_FOUND','HOOK_MAPPING_DRIFT','toLowerCase','length','\x22\x20resolves\x20to\x20multiple\x20Datasets.','map','includes','HOOK_DUPLICATE_DIRECTORIES','get','datasetCodeToDatasets','455793kPWDWV','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','set','datasetCode','327192TgJjXs','221558Jiuhxa','SDK\x20alias\x20\x22','341451LvVcxe','split','size','HOOK\x20directory\x20\x22','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','9oyRBuN','lockKey','entries','message','HOOK_DIRECTORY_UNRESOLVED','HOOK','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','9986280FzsOwS'];a292_0x3785=function(){return _0x4fbad8;};return a292_0x3785();}function findDatasetByCode(_0x3898e4,_0x1d093c){const _0x1cb19d=a292_0x113e,_0x1d89e3=_0x3898e4['datasetCodeToDatasets'][_0x1cb19d(0xc1)](directoryIdentity(_0x1d093c))??[];if(_0x1d89e3[_0x1cb19d(0xbc)]>0x1)throw hookDirectoryError(_0x1cb19d(0xe7),_0x1cb19d(0xe3)+_0x1d093c+_0x1cb19d(0xc4),{'datasetCode':_0x1d093c,'candidates':_0x1d89e3[_0x1cb19d(0xbe)](datasetFact)});return _0x1d89e3[0x0];}function directoryIdentity(_0x1107b2){const _0x3bc38e=a292_0x113e;return _0x1107b2[_0x3bc38e(0xda)]('NFC')[_0x3bc38e(0xbb)]();}function appendUnique(_0xe331c8,_0x56cde4,_0x14d892,_0x28bc78){const _0x2a5cd6=a292_0x113e,_0x2c41ca=_0xe331c8[_0x2a5cd6(0xc1)](_0x56cde4)??[];!_0x2c41ca[_0x2a5cd6(0xdf)](_0x3a8d8d=>_0x28bc78(_0x3a8d8d)===_0x28bc78(_0x14d892))&&_0x2c41ca[_0x2a5cd6(0xe8)](_0x14d892),_0xe331c8['set'](_0x56cde4,_0x2c41ca);}function datasetFact(_0x5e2cc9){const _0x168c48=a292_0x113e;return{'id':_0x5e2cc9['id'],'name':_0x5e2cc9[_0x168c48(0xe2)],'datasetCode':_0x5e2cc9['code']};}
|
|
1
|
+
(function(_0x7a85b5,_0x10eca7){const _0x28c51e=a292_0x3416,_0x258374=_0x7a85b5();while(!![]){try{const _0x374b41=parseInt(_0x28c51e(0x171))/0x1+parseInt(_0x28c51e(0x18c))/0x2+parseInt(_0x28c51e(0x1a0))/0x3*(parseInt(_0x28c51e(0x16d))/0x4)+parseInt(_0x28c51e(0x17d))/0x5*(parseInt(_0x28c51e(0x175))/0x6)+-parseInt(_0x28c51e(0x178))/0x7*(parseInt(_0x28c51e(0x180))/0x8)+parseInt(_0x28c51e(0x188))/0x9*(-parseInt(_0x28c51e(0x170))/0xa)+parseInt(_0x28c51e(0x179))/0xb;if(_0x374b41===_0x10eca7)break;else _0x258374['push'](_0x258374['shift']());}catch(_0x46d234){_0x258374['push'](_0x258374['shift']());}}}(a292_0x56ec,0x87595));import{CliError}from'../../errors.js';function a292_0x56ec(){const _0x4b64b6=['NFC','join','split','2554510rfYKHE','lockKey','HOOK_ALIAS_AMBIGUOUS','8fdxeBc','aliasToDatasetCodes','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','map','functions','HOOK_DIRECTORY_AMBIGUOUS','\x22\x20resolves\x20to\x20multiple\x20Datasets.','HOOK_DATASET_NOT_FOUND','3359628EzAdTj','add','some','toLowerCase','90650TxGQQq','length','get','includes','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','alias','push','HOOK_DIRECTORY_UNRESOLVED','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','message','set','name','size','Dataset\x20code\x20\x22','HOOK_MAPPING_DRIFT','HOOK','code','HOOK_DUPLICATE_DIRECTORIES','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','774mvusvU','datasetCodeToDatasets','7636jzifGc','datasetCode','entries','10MLfMyN','366726TYugxY','HOOK\x20directory\x20\x22','Incomplete\x20HOOK\x20path:\x20','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','6sxOrUN','Dataset\x20\x22','values','6037745ThAoOl','4122151qTkuXW'];a292_0x56ec=function(){return _0x4b64b6;};return a292_0x56ec();}export function trackedHookDirectoryMappings(_0x51a195){const _0x2c0943=a292_0x3416,_0x578993=[];for(const [_0x95d555,_0x154949]of Object[_0x2c0943(0x16f)](_0x51a195[_0x2c0943(0x184)])){const [_0x3f0afb,_0x38d607]=_0x95d555[_0x2c0943(0x17c)]('/');if(_0x3f0afb!==_0x2c0943(0x19b)||!_0x38d607||!_0x154949['datasetCode'])continue;_0x578993[_0x2c0943(0x192)]({'alias':_0x38d607,'datasetCode':_0x154949['datasetCode']});}return _0x578993;}export function uniqueTrackedHookDirectoryByDataset(_0x3d9f0f){const _0x3b2656=a292_0x3416,_0x334271=new Map();for(const _0x315c9f of trackedHookDirectoryMappings(_0x3d9f0f)){const _0x7bf4e5=directoryIdentity(_0x315c9f[_0x3b2656(0x16e)]),_0x2a31ac=_0x334271['get'](_0x7bf4e5)??new Map();_0x2a31ac[_0x3b2656(0x196)](directoryIdentity(_0x315c9f[_0x3b2656(0x191)]),_0x315c9f[_0x3b2656(0x191)]),_0x334271[_0x3b2656(0x196)](_0x7bf4e5,_0x2a31ac);}const _0x2968bd=new Map();for(const [_0x4339c9,_0x33dc4d]of _0x334271){if(_0x33dc4d[_0x3b2656(0x198)]>0x1)throw hookDirectoryError(_0x3b2656(0x19d),_0x3b2656(0x176)+_0x4339c9+_0x3b2656(0x19e)+[..._0x33dc4d[_0x3b2656(0x177)]()][_0x3b2656(0x17b)](',\x20')+'.',{'datasetCode':_0x4339c9,'directories':[..._0x33dc4d['values']()]});_0x2968bd[_0x3b2656(0x196)](_0x4339c9,[..._0x33dc4d[_0x3b2656(0x177)]()][0x0]);}return _0x2968bd;}export function assertUnambiguousHookDirectoryMappings(_0x265cdf){const _0x5129d4=a292_0x3416,_0x259e87=new Map();for(const {alias:_0x4930e2,datasetCode:_0x2d7979}of _0x265cdf){const _0x213728=directoryIdentity(_0x4930e2),_0x31aba6=_0x259e87[_0x5129d4(0x18e)](_0x213728)??new Set();_0x31aba6[_0x5129d4(0x189)](_0x2d7979),_0x259e87[_0x5129d4(0x196)](_0x213728,_0x31aba6);}for(const [_0x155d85,_0x4ac50e]of _0x259e87){if(_0x4ac50e[_0x5129d4(0x198)]>0x1)throw hookDirectoryError(_0x5129d4(0x185),'HOOK\x20directory\x20\x22'+_0x155d85+_0x5129d4(0x186),{'directoryName':_0x155d85,'datasetCodes':[..._0x4ac50e]});}}export function assertUnambiguousHookAliases(_0x3b23da){const _0x2e7cc0=a292_0x3416,_0x59eaf6=[..._0x3b23da],_0x43e539=new Map(),_0x4df6d2=new Map();for(const {alias:_0x35c5ad,datasetCode:_0x7c582}of _0x59eaf6){const _0x217417=directoryIdentity(_0x35c5ad),_0x10567b=directoryIdentity(_0x7c582),_0x4086a7=_0x43e539[_0x2e7cc0(0x18e)](_0x217417)??new Set();_0x4086a7[_0x2e7cc0(0x189)](_0x7c582),_0x43e539['set'](_0x217417,_0x4086a7);const _0x433409=_0x4df6d2[_0x2e7cc0(0x18e)](_0x10567b)??new Set();_0x433409[_0x2e7cc0(0x189)](_0x35c5ad),_0x4df6d2[_0x2e7cc0(0x196)](_0x10567b,_0x433409);}for(const [_0x44ffa1,_0x3e384c]of _0x43e539){if(_0x3e384c[_0x2e7cc0(0x198)]>0x1)throw hookDirectoryError(_0x2e7cc0(0x17f),'SDK\x20alias\x20\x22'+_0x44ffa1+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'alias':_0x44ffa1,'datasetCodes':[..._0x3e384c]});}for(const [_0x281e5d,_0x31c746]of _0x4df6d2){if(_0x31c746['size']>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS',_0x2e7cc0(0x176)+_0x281e5d+_0x2e7cc0(0x19f),{'datasetCode':_0x281e5d,'aliases':[..._0x31c746]});}}function a292_0x3416(_0x5a1544,_0x15183b){_0x5a1544=_0x5a1544-0x16d;const _0x56ec43=a292_0x56ec();let _0x341649=_0x56ec43[_0x5a1544];return _0x341649;}export function buildHookDirectoryIndexes(_0x10e8d1,_0x43806a=[]){const _0x3d1505=a292_0x3416,_0x2083a3=[..._0x43806a];assertUnambiguousHookDirectoryMappings(_0x2083a3['map'](([_0x54df18,_0x8c9cfe])=>({'alias':_0x54df18,'datasetCode':_0x8c9cfe})));const _0x5a7d4b=new Map(),_0x2f3792=new Map();for(const _0x12dce3 of _0x10e8d1){appendUnique(_0x5a7d4b,directoryIdentity(_0x12dce3['code']),_0x12dce3,_0x43aab2=>_0x43aab2[_0x3d1505(0x19c)]);}for(const [_0x51d9fc,_0x5ba5c8]of _0x2083a3){appendUnique(_0x2f3792,directoryIdentity(_0x51d9fc),_0x5ba5c8,_0x3223cc=>_0x3223cc);}return{'datasetCodeToDatasets':_0x5a7d4b,'aliasToDatasetCodes':_0x2f3792};}export function resolvePushHookDirectory(_0x1413e4,_0x5f5271,_0x160477){const _0xd38697=a292_0x3416,_0x294035=directoryIdentity(_0x1413e4),_0x1cd366=_0x160477['datasetCodeToDatasets'][_0xd38697(0x18e)](_0x294035)??[],_0x39d90b=_0x160477[_0xd38697(0x181)][_0xd38697(0x18e)](_0x294035)??[],_0x3d3c06=new Set([..._0x1cd366[_0xd38697(0x183)](_0x18c4f9=>_0x18c4f9[_0xd38697(0x19c)]),..._0x39d90b]);if(_0x3d3c06[_0xd38697(0x198)]>0x1)throw hookDirectoryError(_0xd38697(0x185),_0xd38697(0x172)+_0x1413e4+'\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.',{'directoryName':_0x1413e4,'datasetCodes':[..._0x3d3c06]});const _0xb4c7f4=[..._0x3d3c06][0x0];if(_0xb4c7f4&&_0x5f5271?.[_0xd38697(0x16e)]&&_0xb4c7f4!==_0x5f5271['datasetCode'])throw hookDirectoryError(_0xd38697(0x19a),'HOOK\x20directory\x20\x22'+_0x1413e4+_0xd38697(0x182)+_0x5f5271[_0xd38697(0x16e)]+'\x22\x20to\x20\x22'+_0xb4c7f4+'\x22.',{'directoryName':_0x1413e4,'datasetCode':_0xb4c7f4,'lockedDatasetCode':_0x5f5271['datasetCode']});const _0x60156e=_0xb4c7f4?findDatasetByCode(_0x160477,_0xb4c7f4):undefined,_0x9d4e2b=!!_0xb4c7f4&&_0x39d90b[_0xd38697(0x18f)](_0xb4c7f4);if(_0x60156e)return{'dataset':_0x60156e,'datasetCode':_0x60156e[_0xd38697(0x19c)],..._0x9d4e2b?{'alias':_0x1413e4}:{},'directoryProtocol':_0x9d4e2b?_0xd38697(0x191):_0xd38697(0x16e),'warnings':[]};const _0xcb1495=_0x5f5271?.[_0xd38697(0x16e)];if(_0xcb1495){const _0x3a5426=findDatasetByCode(_0x160477,_0xcb1495);if(_0x3a5426)return{'dataset':_0x3a5426,'datasetCode':_0x3a5426['code'],..._0x5f5271[_0xd38697(0x191)]?{'alias':_0x5f5271[_0xd38697(0x191)]}:{},'directoryProtocol':_0x5f5271[_0xd38697(0x191)]?'alias':_0xd38697(0x16e),'warnings':[]};}if(_0xb4c7f4||_0xcb1495){const _0x59a035=_0xb4c7f4??_0xcb1495;throw hookDirectoryError(_0xd38697(0x187),_0xd38697(0x172)+_0x1413e4+_0xd38697(0x174),{'directoryName':_0x1413e4,'datasetCode':_0x59a035});}throw hookDirectoryError('HOOK_DIRECTORY_UNRESOLVED','Cannot\x20resolve\x20HOOK\x20directory\x20\x22'+_0x1413e4+'\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.',{'directoryName':_0x1413e4});}export function preflightPushHookDirectories(_0x1583c6,_0x1aee70,_0x43a65a,_0x28e2f2){const _0x33231f=a292_0x3416,_0x1620b1=new Map(),_0x44873b=new Map();for(const _0x32ee48 of _0x1583c6){if(_0x32ee48['type']!==_0x33231f(0x19b))continue;const _0x5d9a0a=_0x32ee48[_0x33231f(0x191)];if(!_0x5d9a0a)throw hookDirectoryError(_0x33231f(0x193),_0x33231f(0x173)+_0x32ee48[_0x33231f(0x17e)],{'lockKey':_0x32ee48['lockKey']});let _0x2c96da;try{_0x2c96da=resolvePushHookDirectory(_0x5d9a0a,_0x1aee70[_0x33231f(0x184)][_0x32ee48[_0x33231f(0x17e)]],_0x43a65a);}catch(_0x154306){if(_0x28e2f2&&_0x154306 instanceof CliError&&[_0x33231f(0x187),_0x33231f(0x193)][_0x33231f(0x18f)](_0x154306[_0x33231f(0x19c)])){_0x28e2f2[_0x33231f(0x196)](_0x32ee48[_0x33231f(0x17e)],_0x154306[_0x33231f(0x195)]);continue;}throw _0x154306;}_0x1620b1[_0x33231f(0x196)](_0x32ee48[_0x33231f(0x17e)],_0x2c96da);const _0xd264e=_0x44873b[_0x33231f(0x18e)](_0x2c96da['datasetCode'])??new Set();_0xd264e[_0x33231f(0x189)](_0x5d9a0a),_0x44873b[_0x33231f(0x196)](_0x2c96da[_0x33231f(0x16e)],_0xd264e);}for(const [_0x3147e4,_0x5ebf8c]of _0x44873b){if(_0x5ebf8c[_0x33231f(0x198)]>0x1)throw hookDirectoryError(_0x33231f(0x19d),_0x33231f(0x176)+_0x3147e4+_0x33231f(0x190)+[..._0x5ebf8c][_0x33231f(0x17b)](',\x20')+'.',{'datasetCode':_0x3147e4,'directories':[..._0x5ebf8c]});}return _0x1620b1;}export function hookDirectoryError(_0x34a024,_0x5e2195,_0x1089a1){const _0x71fe81=new CliError(_0x34a024,0x2,_0x34a024+':\x20'+_0x5e2195);return _0x71fe81['details']=_0x1089a1,_0x71fe81;}function findDatasetByCode(_0x3303f6,_0x18fb22){const _0x386380=a292_0x3416,_0x4573c0=_0x3303f6[_0x386380(0x1a1)][_0x386380(0x18e)](directoryIdentity(_0x18fb22))??[];if(_0x4573c0[_0x386380(0x18d)]>0x1)throw hookDirectoryError('HOOK_DATASET_CODE_AMBIGUOUS',_0x386380(0x199)+_0x18fb22+_0x386380(0x194),{'datasetCode':_0x18fb22,'candidates':_0x4573c0[_0x386380(0x183)](datasetFact)});return _0x4573c0[0x0];}function directoryIdentity(_0x30846f){const _0x15af67=a292_0x3416;return _0x30846f['normalize'](_0x15af67(0x17a))[_0x15af67(0x18b)]();}function appendUnique(_0x2890d8,_0x45f36f,_0x5b94f6,_0x3a58fe){const _0x49bdbb=a292_0x3416,_0x2f512b=_0x2890d8[_0x49bdbb(0x18e)](_0x45f36f)??[];!_0x2f512b[_0x49bdbb(0x18a)](_0x231216=>_0x3a58fe(_0x231216)===_0x3a58fe(_0x5b94f6))&&_0x2f512b[_0x49bdbb(0x192)](_0x5b94f6),_0x2890d8[_0x49bdbb(0x196)](_0x45f36f,_0x2f512b);}function datasetFact(_0x229820){const _0x3428b8=a292_0x3416;return{'id':_0x229820['id'],'name':_0x229820[_0x3428b8(0x197)],'datasetCode':_0x229820[_0x3428b8(0x19c)]};}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x409d1f,_0x9155f3){const _0x50b2da=a293_0x48cb,_0x184f9b=_0x409d1f();while(!![]){try{const _0x5a6b69=-parseInt(_0x50b2da(0xf3))/0x1+parseInt(_0x50b2da(0xfd))/0x2+parseInt(_0x50b2da(0xfc))/0x3+-parseInt(_0x50b2da(0xf9))/0x4+parseInt(_0x50b2da(0x102))/0x5*(parseInt(_0x50b2da(0xf8))/0x6)+-parseInt(_0x50b2da(0x104))/0x7*(-parseInt(_0x50b2da(0xfe))/0x8)+-parseInt(_0x50b2da(0xff))/0x9;if(_0x5a6b69===_0x9155f3)break;else _0x184f9b['push'](_0x184f9b['shift']());}catch(_0x422985){_0x184f9b['push'](_0x184f9b['shift']());}}}(a293_0x1549,0xf3ea5));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a293_0x1549(){const _0x382c7d=['6062104oaTeJm','lastSync','apps','2968695dvNjUx','1795606QqfOgf','49736yytIXM','1191942UgyGbg','functions','scriptsRoot','325875dbFpDT',':\x20scriptsRoot\x20mismatch\x20—\x20','1393jCEjiy','\x22\x20vs\x20lock\x20\x22','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','1781010XKiZYS','object','stringify','utf8','code','120UqGoGU'];a293_0x1549=function(){return _0x382c7d;};return a293_0x1549();}export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x56ce32,_0x48bb4b,_0x59ae9e,_0x349858){const _0x4acc95=a293_0x48cb,_0x6dc249={'apps':_0x56ce32[_0x4acc95(0xfb)]&&typeof _0x56ce32[_0x4acc95(0xfb)]===_0x4acc95(0xf4)?_0x56ce32[_0x4acc95(0xfb)]:{}};let _0x24ff57=_0x6dc249[_0x4acc95(0xfb)][_0x48bb4b];if(!_0x24ff57)return _0x24ff57={'scriptsRoot':_0x59ae9e,'lastSync':'','functions':{}},_0x6dc249[_0x4acc95(0xfb)][_0x48bb4b]=_0x24ff57,{'lockData':_0x6dc249,'appLock':_0x24ff57};if(!_0x24ff57[_0x4acc95(0x101)])_0x24ff57[_0x4acc95(0x101)]=_0x59ae9e;else{if(_0x24ff57[_0x4acc95(0x101)]!==_0x59ae9e)throw new Error(_0x349858+_0x4acc95(0x103)+('current\x20\x22'+_0x59ae9e+_0x4acc95(0xf1)+_0x24ff57[_0x4acc95(0x101)]+'\x22.\x20')+_0x4acc95(0xf2));}return!_0x24ff57[_0x4acc95(0x100)]&&(_0x24ff57[_0x4acc95(0x100)]={}),!_0x24ff57[_0x4acc95(0xfa)]&&(_0x24ff57[_0x4acc95(0xfa)]=''),{'lockData':_0x6dc249,'appLock':_0x24ff57};}export async function readBffLockFile(_0x22d903){const _0x4bb27e=a293_0x48cb;try{const _0x32aa67=await readFile(_0x22d903,_0x4bb27e(0xf6)),_0x24b6a6=JSON['parse'](_0x32aa67);return{'apps':_0x24b6a6[_0x4bb27e(0xfb)]&&typeof _0x24b6a6['apps']===_0x4bb27e(0xf4)?_0x24b6a6[_0x4bb27e(0xfb)]:{}};}catch(_0xc2c260){if(_0xc2c260[_0x4bb27e(0xf7)]==='ENOENT')return null;throw new Error('Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20'+String(_0xc2c260));}}function a293_0x48cb(_0x344f28,_0x27bcee){_0x344f28=_0x344f28-0xf1;const _0x15491b=a293_0x1549();let _0x48cb90=_0x15491b[_0x344f28];return _0x48cb90;}export async function writeBffLockFile(_0x477290,_0x41c47e){const _0x51cd4a=a293_0x48cb;await mkdir(dirname(_0x477290),{'recursive':!![]}),await writeFile(_0x477290,JSON[_0x51cd4a(0xf5)](_0x41c47e,null,0x2),'utf8');}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a295_0x65a65=a295_0x1f42;function a295_0x1f42(_0x51133a,_0x185207){_0x51133a=_0x51133a-0x67;const _0x302899=a295_0x3028();let _0x1f4213=_0x302899[_0x51133a];return _0x1f4213;}(function(_0x34187e,_0x26bdeb){const _0x182605=a295_0x1f42,_0xfccae6=_0x34187e();while(!![]){try{const _0x4a0d72=parseInt(_0x182605(0x77))/0x1+-parseInt(_0x182605(0x78))/0x2*(-parseInt(_0x182605(0x7e))/0x3)+parseInt(_0x182605(0x6f))/0x4+-parseInt(_0x182605(0x74))/0x5+parseInt(_0x182605(0x76))/0x6+-parseInt(_0x182605(0x6b))/0x7+-parseInt(_0x182605(0x73))/0x8;if(_0x4a0d72===_0x26bdeb)break;else _0xfccae6['push'](_0xfccae6['shift']());}catch(_0xe1f17e){_0xfccae6['push'](_0xfccae6['shift']());}}}(a295_0x3028,0x54e3c));export const DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x65a65(0x75);const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x65a65(0x67);export function snakeToCamel(_0x3b79e3){const _0x159bd6=a295_0x65a65;return _0x3b79e3['toLowerCase']()['replace'](/_([a-z])/g,(_0x4eea62,_0x197079)=>_0x197079[_0x159bd6(0x71)]());}export function findHookLocationByRemoteId(_0x2dc4ce,_0xe39500){const _0x2850a6=a295_0x65a65;if(!_0xe39500)return undefined;for(const [_0x96bd62,_0x43813e]of Object[_0x2850a6(0x7f)](_0x2dc4ce)){if(_0x43813e[_0x2850a6(0x72)]===_0xe39500&&_0x43813e[_0x2850a6(0x7c)]&&_0x43813e['operationType']&&_0x43813e[_0x2850a6(0x80)]){const _0x5ec35e=_0x96bd62[_0x2850a6(0x6c)]('/')[0x1];return{'alias':_0x5ec35e||_0x43813e[_0x2850a6(0x6e)],'datasetCode':_0x43813e[_0x2850a6(0x7c)],'operationType':_0x43813e[_0x2850a6(0x70)],'functionNode':_0x43813e[_0x2850a6(0x80)]};}}return undefined;}export function extractScriptDescription(_0x498ec5){const _0x5cbd82=a295_0x65a65,_0x3f4144=_0x498ec5[_0x5cbd82(0x6d)](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x3f4144?.[0x1])return undefined;const _0x30f1b8=_0x3f4144[0x1],_0x5bbf79=_0x2b3aa8=>{const _0x360762=_0x5cbd82,_0x49a7c5=_0x2b3aa8?.[_0x360762(0x7d)]();if(!_0x49a7c5||_0x49a7c5===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0x49a7c5===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0x49a7c5;},_0x38c76d=_0x30f1b8[_0x5cbd82(0x6d)](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x38c76d)return _0x5bbf79(_0x38c76d[0x1]);const _0x20c880=_0x30f1b8[_0x5cbd82(0x6c)](/\r?\n/)[_0x5cbd82(0x68)](_0x4da5f3=>_0x4da5f3['replace'](/^\s*\*\s?/,'')[_0x5cbd82(0x7d)]()),_0x4e8e10=_0x20c880[_0x5cbd82(0x69)](_0x1c5c0f=>/^\[\s*脚本类型\s*]\s*\S+/[_0x5cbd82(0x6a)](_0x1c5c0f))&&_0x20c880[_0x5cbd82(0x69)](_0x56fd58=>/^\[\s*脚本名称\s*]\s*\S+/[_0x5cbd82(0x6a)](_0x56fd58));if(!_0x4e8e10)return undefined;for(const _0x198348 of _0x20c880){if(!_0x198348||_0x198348[_0x5cbd82(0x79)]('@')||/^\[[^\]]+]\s*/[_0x5cbd82(0x6a)](_0x198348))continue;return _0x5bbf79(_0x198348);}return undefined;}export function isValidBffFunctionName(_0x538690){const _0x4d87cf=a295_0x65a65;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x4d87cf(0x6a)](_0x538690);}function a295_0x3028(){const _0x13507c=['operationType','toUpperCase','remoteId','778536PhMUDR','942655aFIOVr','TODO:\x20补充脚本功能描述','2059650qgFYHk','116516qiFHit','80092hpuzwO','startsWith','after','toLowerCase','datasetCode','trim','51YxRmAF','entries','functionNode','TODO:\x20add\x20script\x20description','map','some','test','4585154QBFoet','split','match','alias','592020qwKhlQ'];a295_0x3028=function(){return _0x13507c;};return a295_0x3028();}export function normalizeHookFunctionNode(_0x4fbecc){const _0x203c2b=a295_0x65a65;if(!_0x4fbecc)return undefined;const _0x5c569f=_0x4fbecc[_0x203c2b(0x7d)]()[_0x203c2b(0x7b)]();if(_0x5c569f==='before'||_0x5c569f===_0x203c2b(0x7a))return _0x5c569f;return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a296_0x1d7f(_0x25ac4f,_0x2b5f5f){_0x25ac4f=_0x25ac4f-0xcb;const _0x18e1d6=a296_0x18e1();let _0x1d7f44=_0x18e1d6[_0x25ac4f];return _0x1d7f44;}const a296_0x11ce5b=a296_0x1d7f;function a296_0x18e1(){const _0x532819=['64761kJoGgV','/smartapi/db-analysis/cross-db/start','1482032CQuXHA','423qUUSqK','294088BvJTPl','7578185rvRnnJ','1620630aEcdrZ','8869602vHpZOE','4FTUvaN','48756570agLrFA','166rOmpQC'];a296_0x18e1=function(){return _0x532819;};return a296_0x18e1();}(function(_0x31d904,_0x27a2eb){const _0x1f4e76=a296_0x1d7f,_0x2770bd=_0x31d904();while(!![]){try{const _0x4dffdc=-parseInt(_0x1f4e76(0xd1))/0x1+parseInt(_0x1f4e76(0xce))/0x2*(parseInt(_0x1f4e76(0xcf))/0x3)+-parseInt(_0x1f4e76(0xcc))/0x4*(parseInt(_0x1f4e76(0xd4))/0x5)+parseInt(_0x1f4e76(0xd5))/0x6+-parseInt(_0x1f4e76(0xcb))/0x7+parseInt(_0x1f4e76(0xd3))/0x8*(-parseInt(_0x1f4e76(0xd2))/0x9)+parseInt(_0x1f4e76(0xcd))/0xa;if(_0x4dffdc===_0x27a2eb)break;else _0x2770bd['push'](_0x2770bd['shift']());}catch(_0x6d188b){_0x2770bd['push'](_0x2770bd['shift']());}}}(a296_0x18e1,0xe6b41));export const CROSS_DB_ANALYSIS_PATHS={'start':a296_0x11ce5b(0xd0),'status':'/smartapi/db-analysis/cross-db/status','latest':'/smartapi/db-analysis/cross-db/latest-job'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a297_0x1994(){const _0x58b984=['1451523pYWraW','65jmrCdv','318078gqQRSM','134952bNlNyK','12030gZzgPm','152501PDiKTB','/smartapi/cross-db-relation/delete','282358MWSoAE','/smartapi/cross-db-relation/query','15489vKNkHN','/smartapi/cross-db-relation/create','3475900xfTXsf','119lTDGWB'];a297_0x1994=function(){return _0x58b984;};return a297_0x1994();}const a297_0x2466c3=a297_0x5c58;(function(_0x306c3e,_0x39568d){const _0x23e70c=a297_0x5c58,_0x35b70b=_0x306c3e();while(!![]){try{const _0x3aed1a=parseInt(_0x23e70c(0x17d))/0x1+parseInt(_0x23e70c(0x172))/0x2+parseInt(_0x23e70c(0x178))/0x3+parseInt(_0x23e70c(0x176))/0x4+parseInt(_0x23e70c(0x179))/0x5*(parseInt(_0x23e70c(0x17a))/0x6)+-parseInt(_0x23e70c(0x177))/0x7*(-parseInt(_0x23e70c(0x17b))/0x8)+-parseInt(_0x23e70c(0x174))/0x9*(parseInt(_0x23e70c(0x17c))/0xa);if(_0x3aed1a===_0x39568d)break;else _0x35b70b['push'](_0x35b70b['shift']());}catch(_0x339077){_0x35b70b['push'](_0x35b70b['shift']());}}}(a297_0x1994,0x86c8b));function a297_0x5c58(_0x287037,_0x36eb6f){_0x287037=_0x287037-0x171;const _0x1994d4=a297_0x1994();let _0x5c58cd=_0x1994d4[_0x287037];return _0x5c58cd;}export const CROSS_DB_RELATION_PATHS={'list':a297_0x2466c3(0x173),'create':a297_0x2466c3(0x175),'update':'/smartapi/cross-db-relation/update','delete':a297_0x2466c3(0x171)};
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x235bc7,_0x307191){const _0x46075e=a298_0x1ac1,_0x579651=_0x235bc7();while(!![]){try{const _0x56fbc6=parseInt(_0x46075e(0x147))/0x1*(-parseInt(_0x46075e(0x150))/0x2)+-parseInt(_0x46075e(0x14f))/0x3+-parseInt(_0x46075e(0x148))/0x4+-parseInt(_0x46075e(0x133))/0x5*(-parseInt(_0x46075e(0x136))/0x6)+parseInt(_0x46075e(0x14c))/0x7+-parseInt(_0x46075e(0x149))/0x8+parseInt(_0x46075e(0x13c))/0x9;if(_0x56fbc6===_0x307191)break;else _0x579651['push'](_0x579651['shift']());}catch(_0x377f3a){_0x579651['push'](_0x579651['shift']());}}}(a298_0x35dc,0x82850));import{listDatasets}from'../core/api-client.js';function a298_0x35dc(){const _0xbc5ac3=['1242087fspNKd','2224iSqYvS','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','\x22.\x20Available:\x20','275wGbZqd','No\x20database\x20matching\x20\x22','join','3810LDQzeF','\x22\x20under\x20app\x20\x22','toLowerCase','dbtableConfig','dbName','length','17232804gpmKDk','find','.\x20Be\x20more\x20specific.','map','isNaN','includes','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','\x22\x20matches\x20multiple\x20databases:\x20','db-','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','filter','8tJassv','2779180mzeulC','8467936IZVHTG','set','entries','5327973KxrFDW','has','dbId'];a298_0x35dc=function(){return _0xbc5ac3;};return a298_0x35dc();}function a298_0x1ac1(_0xbab7c,_0x306e98){_0xbab7c=_0xbab7c-0x132;const _0x35dc54=a298_0x35dc();let _0x1ac148=_0x35dc54[_0xbab7c];return _0x1ac148;}const cache=new Map();export async function listDatabases(_0x2ca05a){const _0x32e591=a298_0x1ac1;if(cache[_0x32e591(0x14d)](_0x2ca05a))return cache['get'](_0x2ca05a);const _0x9189bd=await listDatasets(_0x2ca05a),_0x1656c2=new Map();for(const _0x41b641 of _0x9189bd){const _0x55720f=_0x41b641[_0x32e591(0x139)];_0x55720f?.['dbId']!=null&&_0x1656c2[_0x32e591(0x14a)](_0x55720f[_0x32e591(0x14e)],_0x55720f[_0x32e591(0x13a)]??_0x32e591(0x144)+_0x55720f[_0x32e591(0x14e)]);}const _0x5dec71=[..._0x1656c2[_0x32e591(0x14b)]()][_0x32e591(0x13f)](([_0x4a00b0,_0x323e91])=>({'dbId':_0x4a00b0,'dbName':_0x323e91}));return cache[_0x32e591(0x14a)](_0x2ca05a,_0x5dec71),_0x5dec71;}export async function resolveDb(_0x264808,_0x3d57c8){const _0x770c7f=a298_0x1ac1,_0x2de5f7=await listDatabases(_0x264808);if(_0x2de5f7[_0x770c7f(0x13b)]===0x0)return{'resolved':[],'error':_0x770c7f(0x145)+_0x264808+_0x770c7f(0x142)};if(!_0x3d57c8)return{'resolved':_0x2de5f7};const _0x46a9dd=Number(_0x3d57c8);if(!Number[_0x770c7f(0x140)](_0x46a9dd)){const _0x1daddc=_0x2de5f7[_0x770c7f(0x13d)](_0x5b7e6a=>_0x5b7e6a[_0x770c7f(0x14e)]===_0x46a9dd);if(_0x1daddc)return{'resolved':[_0x1daddc]};}const _0x308971=_0x3d57c8[_0x770c7f(0x138)](),_0x1a22a9=_0x2de5f7[_0x770c7f(0x146)](_0x2ae45a=>_0x2ae45a[_0x770c7f(0x13a)]['toLowerCase']()[_0x770c7f(0x141)](_0x308971));if(_0x1a22a9[_0x770c7f(0x13b)]>0x0)return{'resolved':_0x1a22a9};const _0x262ccd=_0x2de5f7[_0x770c7f(0x13f)](_0x5b096b=>_0x5b096b[_0x770c7f(0x13a)]+'\x20('+_0x5b096b['dbId']+')')[_0x770c7f(0x135)](',\x20');return{'resolved':[],'error':_0x770c7f(0x134)+_0x3d57c8+_0x770c7f(0x137)+_0x264808+_0x770c7f(0x132)+_0x262ccd+'.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.'};}export async function resolveOneDb(_0x177b8b,_0x1d2670){const _0x23ff4b=a298_0x1ac1,{resolved:_0x325cba,error:_0x3931e1}=await resolveDb(_0x177b8b,_0x1d2670);if(_0x3931e1)return{'db':null,'error':_0x3931e1};if(_0x325cba[_0x23ff4b(0x13b)]===0x1)return{'db':_0x325cba[0x0]};if(!_0x1d2670){const _0x86e9a4=_0x325cba['map'](_0x23aa35=>_0x23aa35['dbName']+'\x20('+_0x23aa35[_0x23ff4b(0x14e)]+')')[_0x23ff4b(0x135)](',\x20');return{'db':null,'error':_0x23ff4b(0x151)+_0x86e9a4};}const _0x39f128=_0x325cba[_0x23ff4b(0x13f)](_0x594b89=>_0x594b89[_0x23ff4b(0x13a)]+'\x20('+_0x594b89[_0x23ff4b(0x14e)]+')')[_0x23ff4b(0x135)](',\x20');return{'db':null,'error':'\x22'+_0x1d2670+_0x23ff4b(0x143)+_0x39f128+_0x23ff4b(0x13e)};}export async function getDbName(_0x3904ec,_0x526ce1){const _0x18dcf8=a298_0x1ac1,_0x42412f=await listDatabases(_0x3904ec);return _0x42412f[_0x18dcf8(0x13d)](_0x5efb01=>_0x5efb01[_0x18dcf8(0x14e)]===_0x526ce1)?.[_0x18dcf8(0x13a)];}
|