@lovrabet/rabetbase-cli 2.5.10 → 2.5.11-beta.1
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-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
|
-
const
|
|
1
|
+
const a290_0xb521ac=a290_0x2d93;(function(_0x59dade,_0x145531){const _0xe452b4=a290_0x2d93,_0x49c91c=_0x59dade();while(!![]){try{const _0x5dffdd=parseInt(_0xe452b4(0xb2))/0x1*(-parseInt(_0xe452b4(0xc3))/0x2)+parseInt(_0xe452b4(0xc8))/0x3+parseInt(_0xe452b4(0xaf))/0x4*(parseInt(_0xe452b4(0xc4))/0x5)+-parseInt(_0xe452b4(0xac))/0x6*(-parseInt(_0xe452b4(0xcb))/0x7)+-parseInt(_0xe452b4(0xbe))/0x8*(parseInt(_0xe452b4(0xc0))/0x9)+parseInt(_0xe452b4(0xb7))/0xa*(parseInt(_0xe452b4(0xbd))/0xb)+-parseInt(_0xe452b4(0xb4))/0xc;if(_0x5dffdd===_0x145531)break;else _0x49c91c['push'](_0x49c91c['shift']());}catch(_0x47c805){_0x49c91c['push'](_0x49c91c['shift']());}}}(a290_0x797c,0x193ce));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_0xb521ac(0xa3),'ENDPOINT',a290_0xb521ac(0xcf)];export function normalizeBffType(_0x3977dc){const _0xaee769=a290_0xb521ac;if(!_0x3977dc)return undefined;const _0x3c2421=_0x3977dc[_0xaee769(0xcc)]()['toUpperCase']();return SUPPORTED_BFF_TYPES[_0xaee769(0xb9)](_0x3c2421)?_0x3c2421:undefined;}async function scanJsFilesRecursively(_0x410c0e,_0x5fcf71){const _0x2f1808=a290_0xb521ac,_0x3dfe1e=[];try{const _0x40bae6=await readdir(_0x410c0e,{'withFileTypes':!![]});for(const _0x27d809 of _0x40bae6){const _0x3412e3=join(_0x410c0e,_0x27d809[_0x2f1808(0xaa)]);if(_0x27d809[_0x2f1808(0xae)]())_0x3dfe1e[_0x2f1808(0xa2)](...await scanJsFilesRecursively(_0x3412e3,_0x5fcf71+'/'+_0x27d809[_0x2f1808(0xaa)]));else _0x27d809[_0x2f1808(0xce)]()&&_0x27d809[_0x2f1808(0xaa)][_0x2f1808(0xbc)](_0x2f1808(0xa6))&&_0x3dfe1e['push']({'lockKey':_0x5fcf71+'/'+_0x27d809['name'][_0x2f1808(0xc2)](/\.js$/,''),'filePath':_0x3412e3});}}catch(_0x120e46){if(_0x120e46['code']!==_0x2f1808(0xcd))throw _0x120e46;}return _0x3dfe1e;}async function scanFlatFunctions(_0x57e650,_0x477ef8){const _0x3be765=a290_0xb521ac,_0x2753c8=join(_0x57e650[_0x3be765(0xbf)],_0x477ef8),_0x5f5ce6=await scanJsFilesRecursively(_0x2753c8,_0x477ef8);return _0x5f5ce6[_0x3be765(0xa8)](({lockKey:_0x40f6dc,filePath:_0x2832b1})=>({'type':_0x477ef8,'name':_0x40f6dc[_0x3be765(0xb0)]('/')['at'](-0x1)??'','filePath':_0x2832b1,'lockKey':_0x40f6dc}));}async function scanHookFunctions(_0x41339f){const _0x551a4d=a290_0xb521ac,_0x195de4=join(_0x41339f['scriptsRootDir'],_0x551a4d(0xcf)),_0x1a0162=[];try{const _0x4ebc7b=await readdir(_0x195de4,{'withFileTypes':!![]});for(const _0x33b34e of _0x4ebc7b){if(!_0x33b34e[_0x551a4d(0xae)]())continue;const _0x3b52d2=_0x33b34e[_0x551a4d(0xaa)],_0x2bb2b1=join(_0x195de4,_0x3b52d2),_0x42b58c=await readdir(_0x2bb2b1,{'withFileTypes':!![]});for(const _0x345c4b of _0x42b58c){if(!_0x345c4b['isDirectory']())continue;const _0x397cc0=_0x345c4b[_0x551a4d(0xaa)],_0xb76d8d=join(_0x2bb2b1,_0x397cc0),_0x2a732a=await readdir(_0xb76d8d,{'withFileTypes':!![]});for(const _0x1ed666 of _0x2a732a){if(!_0x1ed666[_0x551a4d(0xae)]())continue;const _0x12c7a3=_0x1ed666[_0x551a4d(0xaa)],_0x5a0598=join(_0xb76d8d,_0x12c7a3),_0x2506c2=await readdir(_0x5a0598,{'withFileTypes':!![]});for(const _0x1ab669 of _0x2506c2){if(!_0x1ab669[_0x551a4d(0xce)]()||!_0x1ab669[_0x551a4d(0xaa)]['endsWith'](_0x551a4d(0xa6)))continue;const _0x4dba19=_0x1ab669[_0x551a4d(0xaa)][_0x551a4d(0xc2)](/\.js$/,'');_0x1a0162['push']({'type':_0x551a4d(0xcf),'name':_0x4dba19,'filePath':join(_0x5a0598,_0x1ab669['name']),'lockKey':_0x551a4d(0xa9)+_0x3b52d2+'/'+_0x397cc0+'/'+_0x12c7a3+'/'+_0x4dba19,'alias':_0x3b52d2,'operationType':_0x397cc0,'functionNode':_0x12c7a3});}}}}}catch(_0x57ec2e){if(_0x57ec2e['code']!==_0x551a4d(0xcd))throw _0x57ec2e;}return _0x1a0162;}function a290_0x2d93(_0x1b414d,_0x375962){_0x1b414d=_0x1b414d-0xa2;const _0x797cc7=a290_0x797c();let _0x2d938d=_0x797cc7[_0x1b414d];return _0x2d938d;}export async function scanLocalBffFunctions(_0x37ae2a,_0x29e155){const _0x47ee8a=a290_0xb521ac;if(_0x29e155===_0x47ee8a(0xa3)||_0x29e155===_0x47ee8a(0xad))return scanFlatFunctions(_0x37ae2a,_0x29e155);if(_0x29e155===_0x47ee8a(0xcf))return scanHookFunctions(_0x37ae2a);const [_0x10a350,_0x104b0e,_0x15c25c]=await Promise[_0x47ee8a(0xb1)]([scanFlatFunctions(_0x37ae2a,'COMMON'),scanFlatFunctions(_0x37ae2a,_0x47ee8a(0xad)),scanHookFunctions(_0x37ae2a)]);return[..._0x10a350,..._0x104b0e,..._0x15c25c];}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x13fd5b){const _0x35e0f0=a290_0xb521ac;return SAFE_LOCK_KEY_SEGMENT[_0x35e0f0(0xc7)](_0x13fd5b)&&_0x13fd5b!=='.'&&_0x13fd5b!=='..';}export function resolveLocalFilePathFromLockKey(_0x50fb3c,_0x1fcd4b){const _0x29dcac=a290_0xb521ac,_0x3b5b4e=_0x1fcd4b[_0x29dcac(0xb0)]('/');if(!_0x3b5b4e['every'](isSafeLockKeySegment))throw new Error(_0x29dcac(0xd0)+_0x1fcd4b);const _0x5e658a=resolve(join(_0x50fb3c['scriptsRootDir'],..._0x3b5b4e)+_0x29dcac(0xa6)),_0x13367f=resolve(_0x50fb3c[_0x29dcac(0xbf)]);if(_0x5e658a!==_0x13367f&&!_0x5e658a[_0x29dcac(0xc9)](_0x13367f+sep))throw new Error(_0x29dcac(0xc1)+_0x5e658a);return _0x5e658a;}export function createHookLocationMap(_0x56927a){const _0x9feae5=a290_0xb521ac,_0x19bd77=new Map();for(const _0x6695b7 of _0x56927a){_0x6695b7[_0x9feae5(0xca)]&&_0x19bd77[_0x9feae5(0xbb)](_0x6695b7['beforeScriptId'],{'datasetCode':_0x6695b7[_0x9feae5(0xb8)],'operationType':snakeToCamel(_0x6695b7[_0x9feae5(0xb6)]),'functionNode':_0x9feae5(0xb3)}),_0x6695b7[_0x9feae5(0xa7)]&&_0x19bd77[_0x9feae5(0xbb)](_0x6695b7[_0x9feae5(0xa7)],{'datasetCode':_0x6695b7['datasetCode'],'operationType':snakeToCamel(_0x6695b7[_0x9feae5(0xb6)]),'functionNode':_0x9feae5(0xab)});}return _0x19bd77;}function a290_0x797c(){const _0x5f4343=['.js','afterScriptId','map','HOOK/','name','after','2094BUzgSI','ENDPOINT','isDirectory','69796daoKQd','split','all','5vZOWqe','before','2442408rbovkx','scriptType','operationType','59230HGKmza','datasetCode','includes','functionName','set','endsWith','330umWkre','448HngdAt','scriptsRootDir','6894rTAtDE','Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20','replace','17562NpZhkm','5svTJjl','F_OK','get','test','573723KuJNbV','startsWith','beforeScriptId','147SPhWdp','trim','ENOENT','isFile','HOOK','Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20','push','COMMON','toLowerCase','every'];a290_0x797c=function(){return _0x5f4343;};return a290_0x797c();}export function resolveRemoteScriptTarget(_0x462752,_0x8cef38,_0x301ae3,_0x47e36a,_0x9c332a){const _0x88915e=a290_0xb521ac,_0x3a9882=normalizeBffType(_0x8cef38[_0x88915e(0xb5)]);if(!_0x3a9882||!_0x8cef38[_0x88915e(0xba)])return null;if(_0x3a9882===_0x88915e(0xcf)){const _0x27dca7=_0x8cef38['id']?_0x301ae3[_0x88915e(0xc6)](_0x8cef38['id']):undefined,_0x7dd525=findHookLocationByRemoteId(_0x47e36a,_0x8cef38['id']),_0x29c360=_0x27dca7?{..._0x7dd525?.[_0x88915e(0xb8)]===_0x27dca7['datasetCode']?_0x7dd525:{},..._0x27dca7}:_0x7dd525;if(!_0x29c360)return null;const _0x24bb81=_0x9c332a[_0x88915e(0xc6)](_0x29c360[_0x88915e(0xb8)][_0x88915e(0xa4)]()),_0x3966a6=_0x24bb81??_0x29c360[_0x88915e(0xb8)],_0x4a0737={..._0x29c360,'alias':_0x24bb81},_0x54d57f='HOOK/'+_0x3966a6+'/'+_0x4a0737[_0x88915e(0xb6)]+'/'+_0x4a0737['functionNode']+'/'+_0x8cef38[_0x88915e(0xba)];if(!_0x54d57f[_0x88915e(0xb0)]('/')[_0x88915e(0xa5)](isSafeLockKeySegment))return null;return{'lockKey':_0x54d57f,'filePath':resolveLocalFilePathFromLockKey(_0x462752,_0x54d57f),'type':_0x88915e(0xcf),'hookLocation':_0x4a0737};}const _0x129751=_0x3a9882+'/'+_0x8cef38['functionName'];if(!_0x129751[_0x88915e(0xb0)]('/')[_0x88915e(0xa5)](isSafeLockKeySegment))return null;return{'lockKey':_0x129751,'filePath':resolveLocalFilePathFromLockKey(_0x462752,_0x129751),'type':_0x3a9882};}export async function ensureParentDirectory(_0x689766){await mkdir(dirname(_0x689766),{'recursive':!![]});}export async function fileExists(_0x33e47c){const _0x34bb24=a290_0xb521ac;try{return await access(_0x33e47c,constants[_0x34bb24(0xc5)]),!![];}catch{return![];}}export async function directoryExists(_0x42ba11){const _0x57dc2d=a290_0xb521ac;try{const _0x5ee44d=await stat(_0x42ba11);return _0x5ee44d[_0x57dc2d(0xae)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e14ea,_0x54967f){const _0x2affe6=a291_0x579c,_0xb5a9d0=_0x5e14ea();while(!![]){try{const _0x7b53fe=parseInt(_0x2affe6(0x172))/0x1+parseInt(_0x2affe6(0x175))/0x2+parseInt(_0x2affe6(0x16a))/0x3*(parseInt(_0x2affe6(0x16c))/0x4)+-parseInt(_0x2affe6(0x171))/0x5*(-parseInt(_0x2affe6(0x177))/0x6)+-parseInt(_0x2affe6(0x16f))/0x7+parseInt(_0x2affe6(0x173))/0x8+-parseInt(_0x2affe6(0x16d))/0x9;if(_0x7b53fe===_0x54967f)break;else _0xb5a9d0['push'](_0xb5a9d0['shift']());}catch(_0x584d7b){_0xb5a9d0['push'](_0xb5a9d0['shift']());}}}(a291_0x3efb,0xf2c12));import{readFile}from'node:fs/promises';import a291_0x1f53f0 from'node:crypto';function a291_0x3efb(){const _0x1f876a=['11390816oGfvkJ','md5','819786dhrlXC','hex','6TJcqFk','94524KTAsuX','createHash','152MnKRBD','39640257aCaCBs','utf8','6249411rcQFQm','digest','8347630RhMJXX','1590993NmmgNY'];a291_0x3efb=function(){return _0x1f876a;};return a291_0x3efb();}export function computeContentHash(_0x1636e4){const _0x575157=a291_0x579c;return a291_0x1f53f0[_0x575157(0x16b)](_0x575157(0x174))['update'](_0x1636e4)[_0x575157(0x170)](_0x575157(0x176));}function a291_0x579c(_0x2d4bc8,_0x5bfe14){_0x2d4bc8=_0x2d4bc8-0x16a;const _0x3efbe2=a291_0x3efb();let _0x579c75=_0x3efbe2[_0x2d4bc8];return _0x579c75;}export async function computeFileHash(_0x5ace90){const _0x25b546=a291_0x579c,_0x1dbac0=await readFile(_0x5ace90,_0x25b546(0x16e));return computeContentHash(_0x1dbac0);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3ad3c9,_0x1bbf7f){const _0x478eab=a292_0x510a,_0x3225ea=_0x3ad3c9();while(!![]){try{const _0x349bda=-parseInt(_0x478eab(0x13d))/0x1+-parseInt(_0x478eab(0x132))/0x2*(-parseInt(_0x478eab(0x126))/0x3)+-parseInt(_0x478eab(0x135))/0x4+-parseInt(_0x478eab(0x141))/0x5+-parseInt(_0x478eab(0x12a))/0x6*(-parseInt(_0x478eab(0x131))/0x7)+-parseInt(_0x478eab(0x11d))/0x8+parseInt(_0x478eab(0x127))/0x9;if(_0x349bda===_0x1bbf7f)break;else _0x3225ea['push'](_0x3225ea['shift']());}catch(_0x3dc3c1){_0x3225ea['push'](_0x3225ea['shift']());}}}(a292_0x30db,0xc9c68));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x2173e5){const _0x36e3de=a292_0x510a,_0xe26d44=[];for(const [_0x3ad0d5,_0x18f7a5]of Object[_0x36e3de(0x12d)](_0x2173e5[_0x36e3de(0x120)])){const [_0x1408c0,_0x46693b]=_0x3ad0d5[_0x36e3de(0x140)]('/');if(_0x1408c0!==_0x36e3de(0x13f)||!_0x46693b||!_0x18f7a5[_0x36e3de(0x13a)])continue;_0xe26d44[_0x36e3de(0x13b)]({'alias':_0x46693b,'datasetCode':_0x18f7a5['datasetCode']});}return _0xe26d44;}export function uniqueTrackedHookDirectoryByDataset(_0x543168){const _0x4ae7a0=a292_0x510a,_0x579a2c=new Map();for(const _0x1c0438 of trackedHookDirectoryMappings(_0x543168)){const _0x259bb0=directoryIdentity(_0x1c0438[_0x4ae7a0(0x13a)]),_0x30a4e2=_0x579a2c['get'](_0x259bb0)??new Map();_0x30a4e2[_0x4ae7a0(0x125)](directoryIdentity(_0x1c0438[_0x4ae7a0(0x14c)]),_0x1c0438[_0x4ae7a0(0x14c)]),_0x579a2c['set'](_0x259bb0,_0x30a4e2);}const _0x1130a2=new Map();for(const [_0x2da62a,_0x1e7500]of _0x579a2c){if(_0x1e7500[_0x4ae7a0(0x14a)]>0x1)throw hookDirectoryError(_0x4ae7a0(0x12c),_0x4ae7a0(0x130)+_0x2da62a+'\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20'+[..._0x1e7500[_0x4ae7a0(0x143)]()][_0x4ae7a0(0x150)](',\x20')+'.',{'datasetCode':_0x2da62a,'directories':[..._0x1e7500['values']()]});_0x1130a2[_0x4ae7a0(0x125)](_0x2da62a,[..._0x1e7500[_0x4ae7a0(0x143)]()][0x0]);}return _0x1130a2;}export function assertUnambiguousHookDirectoryMappings(_0x2dd7fd){const _0x5398fa=a292_0x510a,_0x8482ce=new Map();for(const {alias:_0x462c5d,datasetCode:_0x2ccf8d}of _0x2dd7fd){const _0x5cb0c7=directoryIdentity(_0x462c5d),_0x54c5de=_0x8482ce[_0x5398fa(0x136)](_0x5cb0c7)??new Set();_0x54c5de[_0x5398fa(0x139)](_0x2ccf8d),_0x8482ce[_0x5398fa(0x125)](_0x5cb0c7,_0x54c5de);}for(const [_0x2aa776,_0x30ae81]of _0x8482ce){if(_0x30ae81[_0x5398fa(0x14a)]>0x1)throw hookDirectoryError(_0x5398fa(0x133),'HOOK\x20directory\x20\x22'+_0x2aa776+_0x5398fa(0x11e),{'directoryName':_0x2aa776,'datasetCodes':[..._0x30ae81]});}}export function assertUnambiguousHookAliases(_0x4e1100){const _0x349896=a292_0x510a,_0x36b204=[..._0x4e1100],_0x39d035=new Map(),_0x54ba0a=new Map();for(const {alias:_0x258c41,datasetCode:_0x154177}of _0x36b204){const _0xddb102=directoryIdentity(_0x258c41),_0x44567b=directoryIdentity(_0x154177),_0x317851=_0x39d035[_0x349896(0x136)](_0xddb102)??new Set();_0x317851[_0x349896(0x139)](_0x154177),_0x39d035['set'](_0xddb102,_0x317851);const _0x522ad1=_0x54ba0a[_0x349896(0x136)](_0x44567b)??new Set();_0x522ad1[_0x349896(0x139)](_0x258c41),_0x54ba0a[_0x349896(0x125)](_0x44567b,_0x522ad1);}for(const [_0xb61ae3,_0xf2355f]of _0x39d035){if(_0xf2355f[_0x349896(0x14a)]>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS',_0x349896(0x14e)+_0xb61ae3+_0x349896(0x11e),{'alias':_0xb61ae3,'datasetCodes':[..._0xf2355f]});}for(const [_0x353e50,_0x42c034]of _0x54ba0a){if(_0x42c034[_0x349896(0x14a)]>0x1)throw hookDirectoryError(_0x349896(0x14d),_0x349896(0x130)+_0x353e50+_0x349896(0x13e),{'datasetCode':_0x353e50,'aliases':[..._0x42c034]});}}export function buildHookDirectoryIndexes(_0x55f7ce,_0x4e7df2=[]){const _0x31588d=a292_0x510a,_0x3c5061=[..._0x4e7df2];assertUnambiguousHookDirectoryMappings(_0x3c5061[_0x31588d(0x121)](([_0xf363b8,_0x38c39b])=>({'alias':_0xf363b8,'datasetCode':_0x38c39b})));const _0x4494b2=new Map(),_0x24f59b=new Map();for(const _0x5b196a of _0x55f7ce){appendUnique(_0x4494b2,directoryIdentity(_0x5b196a[_0x31588d(0x122)]),_0x5b196a,_0x488261=>_0x488261['code']);}for(const [_0x14bb9d,_0x256ed4]of _0x3c5061){appendUnique(_0x24f59b,directoryIdentity(_0x14bb9d),_0x256ed4,_0x2794a4=>_0x2794a4);}return{'datasetCodeToDatasets':_0x4494b2,'aliasToDatasetCodes':_0x24f59b};}export function resolvePushHookDirectory(_0x575a11,_0xf1976e,_0xb750f4){const _0x12e2b9=a292_0x510a,_0x4d6949=directoryIdentity(_0x575a11),_0x21ee8b=_0xb750f4[_0x12e2b9(0x13c)]['get'](_0x4d6949)??[],_0x2efd45=_0xb750f4['aliasToDatasetCodes'][_0x12e2b9(0x136)](_0x4d6949)??[],_0x236e55=new Set([..._0x21ee8b['map'](_0x370c1e=>_0x370c1e['code']),..._0x2efd45]);if(_0x236e55['size']>0x1)throw hookDirectoryError(_0x12e2b9(0x133),_0x12e2b9(0x142)+_0x575a11+_0x12e2b9(0x11f),{'directoryName':_0x575a11,'datasetCodes':[..._0x236e55]});const _0x205a6e=[..._0x236e55][0x0];if(_0x205a6e&&_0xf1976e?.[_0x12e2b9(0x13a)]&&_0x205a6e!==_0xf1976e['datasetCode'])throw hookDirectoryError(_0x12e2b9(0x145),'HOOK\x20directory\x20\x22'+_0x575a11+_0x12e2b9(0x14b)+_0xf1976e['datasetCode']+_0x12e2b9(0x138)+_0x205a6e+'\x22.',{'directoryName':_0x575a11,'datasetCode':_0x205a6e,'lockedDatasetCode':_0xf1976e[_0x12e2b9(0x13a)]});const _0x3972ba=_0x205a6e?findDatasetByCode(_0xb750f4,_0x205a6e):undefined,_0x46c355=!!_0x205a6e&&_0x2efd45[_0x12e2b9(0x149)](_0x205a6e);if(_0x3972ba)return{'dataset':_0x3972ba,'datasetCode':_0x3972ba[_0x12e2b9(0x122)],..._0x46c355?{'alias':_0x575a11}:{},'directoryProtocol':_0x46c355?_0x12e2b9(0x14c):'datasetCode','warnings':[]};const _0x57c1ee=_0xf1976e?.[_0x12e2b9(0x13a)];if(_0x57c1ee){const _0x37655b=findDatasetByCode(_0xb750f4,_0x57c1ee);if(_0x37655b)return{'dataset':_0x37655b,'datasetCode':_0x37655b[_0x12e2b9(0x122)],..._0xf1976e['alias']?{'alias':_0xf1976e['alias']}:{},'directoryProtocol':_0xf1976e[_0x12e2b9(0x14c)]?_0x12e2b9(0x14c):_0x12e2b9(0x13a),'warnings':[]};}if(_0x205a6e||_0x57c1ee){const _0x5a8036=_0x205a6e??_0x57c1ee;throw hookDirectoryError(_0x12e2b9(0x124),'HOOK\x20directory\x20\x22'+_0x575a11+_0x12e2b9(0x151),{'directoryName':_0x575a11,'datasetCode':_0x5a8036});}throw hookDirectoryError(_0x12e2b9(0x12b),'Cannot\x20resolve\x20HOOK\x20directory\x20\x22'+_0x575a11+_0x12e2b9(0x147),{'directoryName':_0x575a11});}export function preflightPushHookDirectories(_0x536bc1,_0x3e55f6,_0xb91326,_0x221874){const _0x5b97c4=a292_0x510a,_0x107901=new Map(),_0x51f10b=new Map();for(const _0x4d774a of _0x536bc1){if(_0x4d774a['type']!==_0x5b97c4(0x13f))continue;const _0x34d5eb=_0x4d774a[_0x5b97c4(0x14c)];if(!_0x34d5eb)throw hookDirectoryError(_0x5b97c4(0x12b),'Incomplete\x20HOOK\x20path:\x20'+_0x4d774a[_0x5b97c4(0x14f)],{'lockKey':_0x4d774a[_0x5b97c4(0x14f)]});let _0x13f6ca;try{_0x13f6ca=resolvePushHookDirectory(_0x34d5eb,_0x3e55f6[_0x5b97c4(0x120)][_0x4d774a['lockKey']],_0xb91326);}catch(_0xd98f33){if(_0x221874&&_0xd98f33 instanceof CliError&&[_0x5b97c4(0x124),'HOOK_DIRECTORY_UNRESOLVED'][_0x5b97c4(0x149)](_0xd98f33[_0x5b97c4(0x122)])){_0x221874['set'](_0x4d774a[_0x5b97c4(0x14f)],_0xd98f33[_0x5b97c4(0x12f)]);continue;}throw _0xd98f33;}_0x107901[_0x5b97c4(0x125)](_0x4d774a['lockKey'],_0x13f6ca);const _0xc26f96=_0x51f10b[_0x5b97c4(0x136)](_0x13f6ca['datasetCode'])??new Set();_0xc26f96[_0x5b97c4(0x139)](_0x34d5eb),_0x51f10b[_0x5b97c4(0x125)](_0x13f6ca['datasetCode'],_0xc26f96);}for(const [_0x281d0d,_0x4d6588]of _0x51f10b){if(_0x4d6588[_0x5b97c4(0x14a)]>0x1)throw hookDirectoryError(_0x5b97c4(0x12c),_0x5b97c4(0x130)+_0x281d0d+_0x5b97c4(0x123)+[..._0x4d6588][_0x5b97c4(0x150)](',\x20')+'.',{'datasetCode':_0x281d0d,'directories':[..._0x4d6588]});}return _0x107901;}function a292_0x510a(_0x99ee67,_0x5f1eb2){_0x99ee67=_0x99ee67-0x11d;const _0x30db57=a292_0x30db();let _0x510a2b=_0x30db57[_0x99ee67];return _0x510a2b;}export function hookDirectoryError(_0x22e8d0,_0x36ee38,_0x5eb4e5){const _0x2ae2d4=a292_0x510a,_0x3fe6db=new CliError(_0x22e8d0,0x2,_0x22e8d0+':\x20'+_0x36ee38);return _0x3fe6db[_0x2ae2d4(0x137)]=_0x5eb4e5,_0x3fe6db;}function a292_0x30db(){const _0x48b26b=['get','details','\x22\x20to\x20\x22','add','datasetCode','push','datasetCodeToDatasets','1042437hyiFOC','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','HOOK','split','5891390TWrqTE','HOOK\x20directory\x20\x22','values','Dataset\x20code\x20\x22','HOOK_MAPPING_DRIFT','some','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','name','includes','size','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','alias','HOOK_ALIAS_AMBIGUOUS','SDK\x20alias\x20\x22','lockKey','join','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','7839952gAJWEw','\x22\x20resolves\x20to\x20multiple\x20Datasets.','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','functions','map','code','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','HOOK_DATASET_NOT_FOUND','set','4396983fhgeZd','31335021itOcsG','toLowerCase','HOOK_DATASET_CODE_AMBIGUOUS','318DQaWWD','HOOK_DIRECTORY_UNRESOLVED','HOOK_DUPLICATE_DIRECTORIES','entries','NFC','message','Dataset\x20\x22','24038LSSZaf','2NqfMNL','HOOK_DIRECTORY_AMBIGUOUS','normalize','4408604jusomq'];a292_0x30db=function(){return _0x48b26b;};return a292_0x30db();}function findDatasetByCode(_0x5092bf,_0x6ba2a7){const _0x415e43=a292_0x510a,_0x41d9a3=_0x5092bf['datasetCodeToDatasets'][_0x415e43(0x136)](directoryIdentity(_0x6ba2a7))??[];if(_0x41d9a3['length']>0x1)throw hookDirectoryError(_0x415e43(0x129),_0x415e43(0x144)+_0x6ba2a7+'\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.',{'datasetCode':_0x6ba2a7,'candidates':_0x41d9a3[_0x415e43(0x121)](datasetFact)});return _0x41d9a3[0x0];}function directoryIdentity(_0x32c15d){const _0x265696=a292_0x510a;return _0x32c15d[_0x265696(0x134)](_0x265696(0x12e))[_0x265696(0x128)]();}function appendUnique(_0x4db5f4,_0x4e4603,_0x1849f6,_0x43b208){const _0xe0de05=a292_0x510a,_0x9fee73=_0x4db5f4['get'](_0x4e4603)??[];!_0x9fee73[_0xe0de05(0x146)](_0x369b53=>_0x43b208(_0x369b53)===_0x43b208(_0x1849f6))&&_0x9fee73[_0xe0de05(0x13b)](_0x1849f6),_0x4db5f4[_0xe0de05(0x125)](_0x4e4603,_0x9fee73);}function datasetFact(_0x2fe46f){const _0x565f48=a292_0x510a;return{'id':_0x2fe46f['id'],'name':_0x2fe46f[_0x565f48(0x148)],'datasetCode':_0x2fe46f[_0x565f48(0x122)]};}
|
|
1
|
+
(function(_0x202d10,_0x3741e7){const _0x2b0d6d=a292_0x25fd,_0x38d18b=_0x202d10();while(!![]){try{const _0x5bbb50=-parseInt(_0x2b0d6d(0xb4))/0x1*(-parseInt(_0x2b0d6d(0xb8))/0x2)+parseInt(_0x2b0d6d(0xaf))/0x3*(-parseInt(_0x2b0d6d(0xbd))/0x4)+-parseInt(_0x2b0d6d(0xd8))/0x5+parseInt(_0x2b0d6d(0xc4))/0x6*(parseInt(_0x2b0d6d(0xd6))/0x7)+-parseInt(_0x2b0d6d(0xc5))/0x8+parseInt(_0x2b0d6d(0xcb))/0x9+-parseInt(_0x2b0d6d(0xc1))/0xa*(-parseInt(_0x2b0d6d(0xb7))/0xb);if(_0x5bbb50===_0x3741e7)break;else _0x38d18b['push'](_0x38d18b['shift']());}catch(_0x2b843d){_0x38d18b['push'](_0x38d18b['shift']());}}}(a292_0x4b2c,0xb1633));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x8e4e31){const _0xf7636a=a292_0x25fd,_0x4d1934=[];for(const [_0xf3f833,_0x4398ee]of Object['entries'](_0x8e4e31[_0xf7636a(0xc0)])){const [_0x231334,_0x513fa2]=_0xf3f833[_0xf7636a(0xad)]('/');if(_0x231334!==_0xf7636a(0xa7)||!_0x513fa2||!_0x4398ee[_0xf7636a(0xc7)])continue;_0x4d1934[_0xf7636a(0xb3)]({'alias':_0x513fa2,'datasetCode':_0x4398ee[_0xf7636a(0xc7)]});}return _0x4d1934;}export function uniqueTrackedHookDirectoryByDataset(_0x4ffea9){const _0x49ae64=a292_0x25fd,_0x2ca2b2=new Map();for(const _0x2c378d of trackedHookDirectoryMappings(_0x4ffea9)){const _0xe1538d=directoryIdentity(_0x2c378d['datasetCode']),_0x4e79cf=_0x2ca2b2[_0x49ae64(0xc6)](_0xe1538d)??new Map();_0x4e79cf[_0x49ae64(0xd4)](directoryIdentity(_0x2c378d['alias']),_0x2c378d[_0x49ae64(0xb0)]),_0x2ca2b2[_0x49ae64(0xd4)](_0xe1538d,_0x4e79cf);}const _0xb55fc=new Map();for(const [_0x5e328e,_0x422440]of _0x2ca2b2){if(_0x422440['size']>0x1)throw hookDirectoryError(_0x49ae64(0xca),_0x49ae64(0xcf)+_0x5e328e+_0x49ae64(0xd0)+[..._0x422440[_0x49ae64(0xb2)]()][_0x49ae64(0xb6)](',\x20')+'.',{'datasetCode':_0x5e328e,'directories':[..._0x422440[_0x49ae64(0xb2)]()]});_0xb55fc[_0x49ae64(0xd4)](_0x5e328e,[..._0x422440[_0x49ae64(0xb2)]()][0x0]);}return _0xb55fc;}export function assertUnambiguousHookDirectoryMappings(_0x4847b2){const _0xab242c=a292_0x25fd,_0x300779=new Map();for(const {alias:_0x4e0be3,datasetCode:_0x530eb9}of _0x4847b2){const _0x55dc3a=directoryIdentity(_0x4e0be3),_0x3ab366=_0x300779[_0xab242c(0xc6)](_0x55dc3a)??new Set();_0x3ab366['add'](_0x530eb9),_0x300779['set'](_0x55dc3a,_0x3ab366);}for(const [_0x87e8d4,_0x31e7e3]of _0x300779){if(_0x31e7e3['size']>0x1)throw hookDirectoryError(_0xab242c(0xb9),_0xab242c(0xbb)+_0x87e8d4+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'directoryName':_0x87e8d4,'datasetCodes':[..._0x31e7e3]});}}export function assertUnambiguousHookAliases(_0xb98853){const _0x3c6787=a292_0x25fd,_0x532368=[..._0xb98853],_0x49cbfe=new Map(),_0x1dab40=new Map();for(const {alias:_0x2c56be,datasetCode:_0x408fbe}of _0x532368){const _0x11ef41=directoryIdentity(_0x2c56be),_0x5e4c27=directoryIdentity(_0x408fbe),_0x2bee38=_0x49cbfe[_0x3c6787(0xc6)](_0x11ef41)??new Set();_0x2bee38[_0x3c6787(0xd3)](_0x408fbe),_0x49cbfe[_0x3c6787(0xd4)](_0x11ef41,_0x2bee38);const _0x25da01=_0x1dab40[_0x3c6787(0xc6)](_0x5e4c27)??new Set();_0x25da01[_0x3c6787(0xd3)](_0x2c56be),_0x1dab40[_0x3c6787(0xd4)](_0x5e4c27,_0x25da01);}for(const [_0x1228b4,_0x358452]of _0x49cbfe){if(_0x358452[_0x3c6787(0xc8)]>0x1)throw hookDirectoryError(_0x3c6787(0xba),_0x3c6787(0xae)+_0x1228b4+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'alias':_0x1228b4,'datasetCodes':[..._0x358452]});}for(const [_0xb956d3,_0x2fac16]of _0x1dab40){if(_0x2fac16[_0x3c6787(0xc8)]>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS',_0x3c6787(0xcf)+_0xb956d3+_0x3c6787(0xc2),{'datasetCode':_0xb956d3,'aliases':[..._0x2fac16]});}}function a292_0x25fd(_0x1a3fa3,_0x4726d4){_0x1a3fa3=_0x1a3fa3-0xa5;const _0x4b2c1b=a292_0x4b2c();let _0x25fde0=_0x4b2c1b[_0x1a3fa3];return _0x25fde0;}export function buildHookDirectoryIndexes(_0xc4a6b,_0x1ee376=[]){const _0x15ca69=a292_0x25fd,_0x3d6dad=[..._0x1ee376];assertUnambiguousHookDirectoryMappings(_0x3d6dad[_0x15ca69(0xa9)](([_0x5b0998,_0x540325])=>({'alias':_0x5b0998,'datasetCode':_0x540325})));const _0x321676=new Map(),_0x1cefb8=new Map();for(const _0x4dcec2 of _0xc4a6b){appendUnique(_0x321676,directoryIdentity(_0x4dcec2[_0x15ca69(0xb1)]),_0x4dcec2,_0x4033da=>_0x4033da['code']);}for(const [_0x2feadf,_0x579c65]of _0x3d6dad){appendUnique(_0x1cefb8,directoryIdentity(_0x2feadf),_0x579c65,_0x5c840b=>_0x5c840b);}return{'datasetCodeToDatasets':_0x321676,'aliasToDatasetCodes':_0x1cefb8};}export function resolvePushHookDirectory(_0x3b7083,_0x1d6482,_0x4cc217){const _0x2ff722=a292_0x25fd,_0x328355=directoryIdentity(_0x3b7083),_0xa859dc=_0x4cc217['datasetCodeToDatasets'][_0x2ff722(0xc6)](_0x328355)??[],_0x1fedcc=_0x4cc217[_0x2ff722(0xa5)][_0x2ff722(0xc6)](_0x328355)??[],_0x37dc78=new Set([..._0xa859dc['map'](_0x589bfc=>_0x589bfc[_0x2ff722(0xb1)]),..._0x1fedcc]);if(_0x37dc78['size']>0x1)throw hookDirectoryError(_0x2ff722(0xb9),_0x2ff722(0xbb)+_0x3b7083+_0x2ff722(0xd9),{'directoryName':_0x3b7083,'datasetCodes':[..._0x37dc78]});const _0x43f60c=[..._0x37dc78][0x0];if(_0x43f60c&&_0x1d6482?.[_0x2ff722(0xc7)]&&_0x43f60c!==_0x1d6482[_0x2ff722(0xc7)])throw hookDirectoryError('HOOK_MAPPING_DRIFT','HOOK\x20directory\x20\x22'+_0x3b7083+_0x2ff722(0xab)+_0x1d6482[_0x2ff722(0xc7)]+_0x2ff722(0xbe)+_0x43f60c+'\x22.',{'directoryName':_0x3b7083,'datasetCode':_0x43f60c,'lockedDatasetCode':_0x1d6482[_0x2ff722(0xc7)]});const _0x2d2ccd=_0x43f60c?findDatasetByCode(_0x4cc217,_0x43f60c):undefined,_0x101eea=!!_0x43f60c&&_0x1fedcc[_0x2ff722(0xc3)](_0x43f60c);if(_0x2d2ccd)return{'dataset':_0x2d2ccd,'datasetCode':_0x2d2ccd['code'],..._0x101eea?{'alias':_0x3b7083}:{},'directoryProtocol':_0x101eea?_0x2ff722(0xb0):_0x2ff722(0xc7),'warnings':[]};const _0x8f158a=_0x1d6482?.[_0x2ff722(0xc7)];if(_0x8f158a){const _0x1f6fb5=findDatasetByCode(_0x4cc217,_0x8f158a);if(_0x1f6fb5)return{'dataset':_0x1f6fb5,'datasetCode':_0x1f6fb5[_0x2ff722(0xb1)],..._0x1d6482['alias']?{'alias':_0x1d6482['alias']}:{},'directoryProtocol':_0x1d6482['alias']?_0x2ff722(0xb0):'datasetCode','warnings':[]};}if(_0x43f60c||_0x8f158a){const _0x1fed37=_0x43f60c??_0x8f158a;throw hookDirectoryError(_0x2ff722(0xda),_0x2ff722(0xbb)+_0x3b7083+_0x2ff722(0xac),{'directoryName':_0x3b7083,'datasetCode':_0x1fed37});}throw hookDirectoryError(_0x2ff722(0xbc),_0x2ff722(0xcd)+_0x3b7083+_0x2ff722(0xbf),{'directoryName':_0x3b7083});}export function preflightPushHookDirectories(_0x5e19d0,_0xac8658,_0x12fb06,_0x367d0c){const _0x2fc5a8=a292_0x25fd,_0x36d11d=new Map(),_0x2c54f3=new Map();for(const _0x23afc9 of _0x5e19d0){if(_0x23afc9[_0x2fc5a8(0xdb)]!==_0x2fc5a8(0xa7))continue;const _0x2407a5=_0x23afc9[_0x2fc5a8(0xb0)];if(!_0x2407a5)throw hookDirectoryError(_0x2fc5a8(0xbc),_0x2fc5a8(0xc9)+_0x23afc9[_0x2fc5a8(0xd7)],{'lockKey':_0x23afc9['lockKey']});let _0x491e05;try{_0x491e05=resolvePushHookDirectory(_0x2407a5,_0xac8658[_0x2fc5a8(0xc0)][_0x23afc9['lockKey']],_0x12fb06);}catch(_0x3e7f00){if(_0x367d0c&&_0x3e7f00 instanceof CliError&&[_0x2fc5a8(0xda),_0x2fc5a8(0xbc)][_0x2fc5a8(0xc3)](_0x3e7f00[_0x2fc5a8(0xb1)])){_0x367d0c[_0x2fc5a8(0xd4)](_0x23afc9[_0x2fc5a8(0xd7)],_0x3e7f00[_0x2fc5a8(0xd5)]);continue;}throw _0x3e7f00;}_0x36d11d[_0x2fc5a8(0xd4)](_0x23afc9[_0x2fc5a8(0xd7)],_0x491e05);const _0x1d276b=_0x2c54f3[_0x2fc5a8(0xc6)](_0x491e05[_0x2fc5a8(0xc7)])??new Set();_0x1d276b['add'](_0x2407a5),_0x2c54f3['set'](_0x491e05[_0x2fc5a8(0xc7)],_0x1d276b);}for(const [_0x54ac15,_0x404a8f]of _0x2c54f3){if(_0x404a8f[_0x2fc5a8(0xc8)]>0x1)throw hookDirectoryError(_0x2fc5a8(0xca),'Dataset\x20\x22'+_0x54ac15+_0x2fc5a8(0xb5)+[..._0x404a8f][_0x2fc5a8(0xb6)](',\x20')+'.',{'datasetCode':_0x54ac15,'directories':[..._0x404a8f]});}return _0x36d11d;}export function hookDirectoryError(_0x562029,_0x5ddb96,_0x27fef5){const _0x4e6883=a292_0x25fd,_0x26de23=new CliError(_0x562029,0x2,_0x562029+':\x20'+_0x5ddb96);return _0x26de23[_0x4e6883(0xd1)]=_0x27fef5,_0x26de23;}function a292_0x4b2c(){const _0x544020=['split','SDK\x20alias\x20\x22','2903703SYVADZ','alias','code','values','push','128982QwpXPz','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','join','77ATZmtC','4TijpGy','HOOK_DIRECTORY_AMBIGUOUS','HOOK_ALIAS_AMBIGUOUS','HOOK\x20directory\x20\x22','HOOK_DIRECTORY_UNRESOLVED','4HKkgWZ','\x22\x20to\x20\x22','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','functions','2014810wqWqdA','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','includes','50628FMIFnP','8524432zEoNBJ','get','datasetCode','size','Incomplete\x20HOOK\x20path:\x20','HOOK_DUPLICATE_DIRECTORIES','6414507mTNuTN','toLowerCase','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','Dataset\x20code\x20\x22','Dataset\x20\x22','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','details','datasetCodeToDatasets','add','set','message','413ZCePjD','lockKey','594310kSMhva','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','HOOK_DATASET_NOT_FOUND','type','some','aliasToDatasetCodes','HOOK_DATASET_CODE_AMBIGUOUS','HOOK','name','map','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.'];a292_0x4b2c=function(){return _0x544020;};return a292_0x4b2c();}function findDatasetByCode(_0x6bcaba,_0x23fe06){const _0x12c0e3=a292_0x25fd,_0x534a3c=_0x6bcaba[_0x12c0e3(0xd2)]['get'](directoryIdentity(_0x23fe06))??[];if(_0x534a3c['length']>0x1)throw hookDirectoryError(_0x12c0e3(0xa6),_0x12c0e3(0xce)+_0x23fe06+_0x12c0e3(0xaa),{'datasetCode':_0x23fe06,'candidates':_0x534a3c[_0x12c0e3(0xa9)](datasetFact)});return _0x534a3c[0x0];}function directoryIdentity(_0x571183){const _0x142134=a292_0x25fd;return _0x571183['normalize']('NFC')[_0x142134(0xcc)]();}function appendUnique(_0x4d1c04,_0x2f7233,_0x1bf53e,_0x2a37e3){const _0x23d162=a292_0x25fd,_0x47622a=_0x4d1c04[_0x23d162(0xc6)](_0x2f7233)??[];!_0x47622a[_0x23d162(0xdc)](_0x3bbb84=>_0x2a37e3(_0x3bbb84)===_0x2a37e3(_0x1bf53e))&&_0x47622a['push'](_0x1bf53e),_0x4d1c04['set'](_0x2f7233,_0x47622a);}function datasetFact(_0x4c4ae7){const _0x40819f=a292_0x25fd;return{'id':_0x4c4ae7['id'],'name':_0x4c4ae7[_0x40819f(0xa8)],'datasetCode':_0x4c4ae7['code']};}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a293_0x3bc4(){const _0x3d1d07=['78MYGUUp','785589xXhbbf','100800jEtTez','5YxRDBZ','Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20','code','stringify','4075698unhgDT','18744ZJKdiJ','scriptsRoot','lastSync','23116HBAYuy','apps','ENOENT','parse','9435654gxlVPB','84909RMWciE','functions','utf8','object','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','\x22\x20vs\x20lock\x20\x22','current\x20\x22'];a293_0x3bc4=function(){return _0x3d1d07;};return a293_0x3bc4();}(function(_0x12c9cd,_0x1d756f){const _0x56edfe=a293_0x5816,_0xd34e08=_0x12c9cd();while(!![]){try{const _0x3ffa64=-parseInt(_0x56edfe(0x10e))/0x1+parseInt(_0x56edfe(0x11d))/0x2+parseInt(_0x56edfe(0x115))/0x3*(parseInt(_0x56edfe(0x109))/0x4)+-parseInt(_0x56edfe(0x118))/0x5*(parseInt(_0x56edfe(0x11c))/0x6)+-parseInt(_0x56edfe(0x116))/0x7+parseInt(_0x56edfe(0x117))/0x8+parseInt(_0x56edfe(0x10d))/0x9;if(_0x3ffa64===_0x1d756f)break;else _0xd34e08['push'](_0xd34e08['shift']());}catch(_0x2df025){_0xd34e08['push'](_0xd34e08['shift']());}}}(a293_0x3bc4,0x54095));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a293_0x5816(_0x356220,_0x52a606){_0x356220=_0x356220-0x109;const _0x3bc435=a293_0x3bc4();let _0x58169a=_0x3bc435[_0x356220];return _0x58169a;}export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x33f0ab,_0x7ded94,_0x7ee585,_0x38a7fe){const _0x2feb1c=a293_0x5816,_0x49b03e={'apps':_0x33f0ab[_0x2feb1c(0x10a)]&&typeof _0x33f0ab[_0x2feb1c(0x10a)]===_0x2feb1c(0x111)?_0x33f0ab[_0x2feb1c(0x10a)]:{}};let _0x2ac00b=_0x49b03e[_0x2feb1c(0x10a)][_0x7ded94];if(!_0x2ac00b)return _0x2ac00b={'scriptsRoot':_0x7ee585,'lastSync':'','functions':{}},_0x49b03e[_0x2feb1c(0x10a)][_0x7ded94]=_0x2ac00b,{'lockData':_0x49b03e,'appLock':_0x2ac00b};if(!_0x2ac00b[_0x2feb1c(0x11e)])_0x2ac00b[_0x2feb1c(0x11e)]=_0x7ee585;else{if(_0x2ac00b['scriptsRoot']!==_0x7ee585)throw new Error(_0x38a7fe+':\x20scriptsRoot\x20mismatch\x20—\x20'+(_0x2feb1c(0x114)+_0x7ee585+_0x2feb1c(0x113)+_0x2ac00b[_0x2feb1c(0x11e)]+'\x22.\x20')+_0x2feb1c(0x112));}return!_0x2ac00b[_0x2feb1c(0x10f)]&&(_0x2ac00b[_0x2feb1c(0x10f)]={}),!_0x2ac00b[_0x2feb1c(0x11f)]&&(_0x2ac00b[_0x2feb1c(0x11f)]=''),{'lockData':_0x49b03e,'appLock':_0x2ac00b};}export async function readBffLockFile(_0xb5d673){const _0x52e3f5=a293_0x5816;try{const _0x1e74e9=await readFile(_0xb5d673,_0x52e3f5(0x110)),_0x54669f=JSON[_0x52e3f5(0x10c)](_0x1e74e9);return{'apps':_0x54669f[_0x52e3f5(0x10a)]&&typeof _0x54669f[_0x52e3f5(0x10a)]===_0x52e3f5(0x111)?_0x54669f[_0x52e3f5(0x10a)]:{}};}catch(_0x2cc092){if(_0x2cc092[_0x52e3f5(0x11a)]===_0x52e3f5(0x10b))return null;throw new Error(_0x52e3f5(0x119)+String(_0x2cc092));}}export async function writeBffLockFile(_0x52cfcb,_0x342db9){const _0x4a7a13=a293_0x5816;await mkdir(dirname(_0x52cfcb),{'recursive':!![]}),await writeFile(_0x52cfcb,JSON[_0x4a7a13(0x11b)](_0x342db9,null,0x2),_0x4a7a13(0x110));}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a295_0x2d2af3=a295_0x47f5;(function(_0x2f9723,_0x1f2fe3){const _0x17af8b=a295_0x47f5,_0xc483a4=_0x2f9723();while(!![]){try{const _0x222080=parseInt(_0x17af8b(0xc6))/0x1+parseInt(_0x17af8b(0xc8))/0x2+parseInt(_0x17af8b(0xc4))/0x3*(-parseInt(_0x17af8b(0xca))/0x4)+-parseInt(_0x17af8b(0xcf))/0x5+parseInt(_0x17af8b(0xd7))/0x6*(-parseInt(_0x17af8b(0xd0))/0x7)+parseInt(_0x17af8b(0xe0))/0x8*(parseInt(_0x17af8b(0xd2))/0x9)+parseInt(_0x17af8b(0xce))/0xa;if(_0x222080===_0x1f2fe3)break;else _0xc483a4['push'](_0xc483a4['shift']());}catch(_0x297a5d){_0xc483a4['push'](_0xc483a4['shift']());}}}(a295_0x2efa,0x6d5f9));export const DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x2d2af3(0xc5);const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x2d2af3(0xdf);export function snakeToCamel(_0x29ff01){const _0x13fb4d=a295_0x2d2af3;return _0x29ff01[_0x13fb4d(0xdc)]()[_0x13fb4d(0xd8)](/_([a-z])/g,(_0x3db122,_0x3bfb57)=>_0x3bfb57[_0x13fb4d(0xc7)]());}function a295_0x47f5(_0xa07f54,_0x7aec5a){_0xa07f54=_0xa07f54-0xc4;const _0x2efa8e=a295_0x2efa();let _0x47f57f=_0x2efa8e[_0xa07f54];return _0x47f57f;}export function findHookLocationByRemoteId(_0x53df06,_0x71cfac){const _0x3db83a=a295_0x2d2af3;if(!_0x71cfac)return undefined;for(const [_0x86813f,_0x2683f3]of Object[_0x3db83a(0xdd)](_0x53df06)){if(_0x2683f3['remoteId']===_0x71cfac&&_0x2683f3[_0x3db83a(0xda)]&&_0x2683f3[_0x3db83a(0xc9)]&&_0x2683f3['functionNode']){const _0x471ca3=_0x86813f['split']('/')[0x1];return{'alias':_0x471ca3||_0x2683f3[_0x3db83a(0xd1)],'datasetCode':_0x2683f3[_0x3db83a(0xda)],'operationType':_0x2683f3['operationType'],'functionNode':_0x2683f3[_0x3db83a(0xde)]};}}return undefined;}export function extractScriptDescription(_0x281673){const _0x59311c=a295_0x2d2af3,_0x274a66=_0x281673['match'](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x274a66?.[0x1])return undefined;const _0x3ccb15=_0x274a66[0x1],_0x59748f=_0x48d828=>{const _0x22bcc5=a295_0x47f5,_0x22e668=_0x48d828?.[_0x22bcc5(0xd6)]();if(!_0x22e668||_0x22e668===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0x22e668===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0x22e668;},_0x4a643a=_0x3ccb15[_0x59311c(0xd3)](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x4a643a)return _0x59748f(_0x4a643a[0x1]);const _0xf424a9=_0x3ccb15[_0x59311c(0xcc)](/\r?\n/)[_0x59311c(0xd9)](_0x12b96b=>_0x12b96b['replace'](/^\s*\*\s?/,'')[_0x59311c(0xd6)]()),_0x531c1b=_0xf424a9[_0x59311c(0xdb)](_0x2574f3=>/^\[\s*脚本类型\s*]\s*\S+/[_0x59311c(0xcd)](_0x2574f3))&&_0xf424a9[_0x59311c(0xdb)](_0x26214b=>/^\[\s*脚本名称\s*]\s*\S+/[_0x59311c(0xcd)](_0x26214b));if(!_0x531c1b)return undefined;for(const _0x57842b of _0xf424a9){if(!_0x57842b||_0x57842b[_0x59311c(0xcb)]('@')||/^\[[^\]]+]\s*/[_0x59311c(0xcd)](_0x57842b))continue;return _0x59748f(_0x57842b);}return undefined;}export function isValidBffFunctionName(_0x5d0730){return/^[A-Za-z_$][A-Za-z0-9_$]*$/['test'](_0x5d0730);}export function normalizeHookFunctionNode(_0x52b3bf){const _0x554b7d=a295_0x2d2af3;if(!_0x52b3bf)return undefined;const _0x597d50=_0x52b3bf[_0x554b7d(0xd6)]()[_0x554b7d(0xdc)]();if(_0x597d50===_0x554b7d(0xd5)||_0x597d50===_0x554b7d(0xd4))return _0x597d50;return undefined;}function a295_0x2efa(){const _0x6a47af=['functionNode','TODO:\x20add\x20script\x20description','22024JCgmnV','472557UUdRwN','TODO:\x20补充脚本功能描述','26216Dcrlah','toUpperCase','1614614GEaVxY','operationType','4AHdbKR','startsWith','split','test','1575320uzHjFY','706390MapByv','393701cRlnvD','alias','1224ywKwMe','match','after','before','trim','66mvGIyK','replace','map','datasetCode','some','toLowerCase','entries'];a295_0x2efa=function(){return _0x6a47af;};return a295_0x2efa();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a296_0x5eeea1=a296_0x41c0;(function(_0x3b9d47,_0x3fc67a){const _0x1d2975=a296_0x41c0,_0x4a031c=_0x3b9d47();while(!![]){try{const _0x1b0f64=-parseInt(_0x1d2975(0x18b))/0x1+parseInt(_0x1d2975(0x183))/0x2*(-parseInt(_0x1d2975(0x18d))/0x3)+parseInt(_0x1d2975(0x189))/0x4*(parseInt(_0x1d2975(0x18e))/0x5)+-parseInt(_0x1d2975(0x187))/0x6+parseInt(_0x1d2975(0x182))/0x7*(-parseInt(_0x1d2975(0x184))/0x8)+parseInt(_0x1d2975(0x18f))/0x9*(parseInt(_0x1d2975(0x18a))/0xa)+parseInt(_0x1d2975(0x186))/0xb;if(_0x1b0f64===_0x3fc67a)break;else _0x4a031c['push'](_0x4a031c['shift']());}catch(_0x1205f7){_0x4a031c['push'](_0x4a031c['shift']());}}}(a296_0xcaad,0xe1139));export const CROSS_DB_ANALYSIS_PATHS={'start':a296_0x5eeea1(0x188),'status':a296_0x5eeea1(0x185),'latest':a296_0x5eeea1(0x18c)};function a296_0x41c0(_0x9c5e56,_0x3907a6){_0x9c5e56=_0x9c5e56-0x182;const _0xcaad4f=a296_0xcaad();let _0x41c014=_0xcaad4f[_0x9c5e56];return _0x41c014;}function a296_0xcaad(){const _0x5607bd=['1742656kECdtT','/smartapi/db-analysis/cross-db/status','25670436sRzsSX','8924340OcQDVN','/smartapi/db-analysis/cross-db/start','68jVlfJx','850zomGsA','534857ddPhxl','/smartapi/db-analysis/cross-db/latest-job','3CboPEo','364835NlnOBi','51066kPfYVk','14URnsGo','1353162XRheYi'];a296_0xcaad=function(){return _0x5607bd;};return a296_0xcaad();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a297_0x181a(_0x3bebd8,_0x21c589){_0x3bebd8=_0x3bebd8-0x1e1;const _0x4831a6=a297_0x4831();let _0x181a95=_0x4831a6[_0x3bebd8];return _0x181a95;}const a297_0x5d8721=a297_0x181a;function a297_0x4831(){const _0x1ea6f9=['999280YdtxnA','1098vbjObM','3698808mIpEyX','8119905HBeBQn','1WtBxIu','4906832pVJhxA','/smartapi/cross-db-relation/update','/smartapi/cross-db-relation/query','39142nptfuf','55570LBcWaM','28jSVLQI','445755nDmlBD'];a297_0x4831=function(){return _0x1ea6f9;};return a297_0x4831();}(function(_0x4dff6e,_0x98097e){const _0x31d269=a297_0x181a,_0x17a951=_0x4dff6e();while(!![]){try{const _0x2cf8fe=parseInt(_0x31d269(0x1e7))/0x1*(parseInt(_0x31d269(0x1eb))/0x2)+-parseInt(_0x31d269(0x1e2))/0x3+-parseInt(_0x31d269(0x1e8))/0x4+parseInt(_0x31d269(0x1e6))/0x5+-parseInt(_0x31d269(0x1e5))/0x6+parseInt(_0x31d269(0x1e1))/0x7*(parseInt(_0x31d269(0x1e3))/0x8)+-parseInt(_0x31d269(0x1e4))/0x9*(-parseInt(_0x31d269(0x1ec))/0xa);if(_0x2cf8fe===_0x98097e)break;else _0x17a951['push'](_0x17a951['shift']());}catch(_0x376afb){_0x17a951['push'](_0x17a951['shift']());}}}(a297_0x4831,0xca7c9));export const CROSS_DB_RELATION_PATHS={'list':a297_0x5d8721(0x1ea),'create':'/smartapi/cross-db-relation/create','update':a297_0x5d8721(0x1e9),'delete':'/smartapi/cross-db-relation/delete'};
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1631f8,_0x34e348){const _0x2c189b=a298_0x1ae3,_0x40208f=_0x1631f8();while(!![]){try{const _0xe1a12=-parseInt(_0x2c189b(0x1db))/0x1*(parseInt(_0x2c189b(0x1e3))/0x2)+-parseInt(_0x2c189b(0x1dd))/0x3*(-parseInt(_0x2c189b(0x1e2))/0x4)+parseInt(_0x2c189b(0x1e1))/0x5*(-parseInt(_0x2c189b(0x1e5))/0x6)+-parseInt(_0x2c189b(0x1d6))/0x7+parseInt(_0x2c189b(0x1e6))/0x8*(-parseInt(_0x2c189b(0x1d7))/0x9)+-parseInt(_0x2c189b(0x1f0))/0xa*(parseInt(_0x2c189b(0x1d4))/0xb)+parseInt(_0x2c189b(0x1ec))/0xc;if(_0xe1a12===_0x34e348)break;else _0x40208f['push'](_0x40208f['shift']());}catch(_0x50e58){_0x40208f['push'](_0x40208f['shift']());}}}(a298_0x321a,0x1d3d6));import{listDatasets}from'../core/api-client.js';function a298_0x321a(){const _0x28b882=['830fAlrvv','1096zeQTpq','2cnNOfH','join','4902mbjYOt','156856jlEUjS','has','\x22.\x20Available:\x20','map','length','\x22\x20under\x20app\x20\x22','10095912EAEhRM','dbId','\x22\x20matches\x20multiple\x20databases:\x20','filter','10fALxeE','995863BjeVYX','toLowerCase','1480990EdxsKS','36XZIyDp','find','.\x20Be\x20more\x20specific.','dbtableConfig','222943BAbNqw','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','192iMJfYI','dbName','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20'];a298_0x321a=function(){return _0x28b882;};return a298_0x321a();}const cache=new Map();export async function listDatabases(_0x436570){const _0x3505e2=a298_0x1ae3;if(cache[_0x3505e2(0x1e7)](_0x436570))return cache['get'](_0x436570);const _0x2d4e61=await listDatasets(_0x436570),_0x5718bb=new Map();for(const _0x36d087 of _0x2d4e61){const _0x3a046f=_0x36d087[_0x3505e2(0x1da)];_0x3a046f?.['dbId']!=null&&_0x5718bb['set'](_0x3a046f['dbId'],_0x3a046f['dbName']??'db-'+_0x3a046f[_0x3505e2(0x1ed)]);}const _0xdf79cf=[..._0x5718bb['entries']()][_0x3505e2(0x1e9)](([_0x50cf23,_0x5d946d])=>({'dbId':_0x50cf23,'dbName':_0x5d946d}));return cache['set'](_0x436570,_0xdf79cf),_0xdf79cf;}export async function resolveDb(_0x1e3db9,_0x17a30a){const _0x348948=a298_0x1ae3,_0x12e79e=await listDatabases(_0x1e3db9);if(_0x12e79e[_0x348948(0x1ea)]===0x0)return{'resolved':[],'error':_0x348948(0x1df)+_0x1e3db9+_0x348948(0x1dc)};if(!_0x17a30a)return{'resolved':_0x12e79e};const _0x240bb1=Number(_0x17a30a);if(!Number['isNaN'](_0x240bb1)){const _0x530903=_0x12e79e[_0x348948(0x1d8)](_0x27556a=>_0x27556a[_0x348948(0x1ed)]===_0x240bb1);if(_0x530903)return{'resolved':[_0x530903]};}const _0x5d5002=_0x17a30a[_0x348948(0x1d5)](),_0x10910e=_0x12e79e[_0x348948(0x1ef)](_0x49d94d=>_0x49d94d[_0x348948(0x1de)][_0x348948(0x1d5)]()['includes'](_0x5d5002));if(_0x10910e[_0x348948(0x1ea)]>0x0)return{'resolved':_0x10910e};const _0x15f956=_0x12e79e[_0x348948(0x1e9)](_0x2d6760=>_0x2d6760[_0x348948(0x1de)]+'\x20('+_0x2d6760[_0x348948(0x1ed)]+')')[_0x348948(0x1e4)](',\x20');return{'resolved':[],'error':'No\x20database\x20matching\x20\x22'+_0x17a30a+_0x348948(0x1eb)+_0x1e3db9+_0x348948(0x1e8)+_0x15f956+'.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.'};}function a298_0x1ae3(_0x1440cd,_0x1a335c){_0x1440cd=_0x1440cd-0x1d4;const _0x321a4c=a298_0x321a();let _0x1ae323=_0x321a4c[_0x1440cd];return _0x1ae323;}export async function resolveOneDb(_0x34176f,_0x107800){const _0xd9c0c6=a298_0x1ae3,{resolved:_0x48fecc,error:_0x4ff05a}=await resolveDb(_0x34176f,_0x107800);if(_0x4ff05a)return{'db':null,'error':_0x4ff05a};if(_0x48fecc['length']===0x1)return{'db':_0x48fecc[0x0]};if(!_0x107800){const _0x243c27=_0x48fecc['map'](_0x2e9111=>_0x2e9111[_0xd9c0c6(0x1de)]+'\x20('+_0x2e9111[_0xd9c0c6(0x1ed)]+')')['join'](',\x20');return{'db':null,'error':_0xd9c0c6(0x1e0)+_0x243c27};}const _0x1f412f=_0x48fecc[_0xd9c0c6(0x1e9)](_0x250163=>_0x250163['dbName']+'\x20('+_0x250163['dbId']+')')[_0xd9c0c6(0x1e4)](',\x20');return{'db':null,'error':'\x22'+_0x107800+_0xd9c0c6(0x1ee)+_0x1f412f+_0xd9c0c6(0x1d9)};}export async function getDbName(_0x4cc40a,_0x1b00a0){const _0x577529=a298_0x1ae3,_0x5e50b5=await listDatabases(_0x4cc40a);return _0x5e50b5[_0x577529(0x1d8)](_0x5ca635=>_0x5ca635[_0x577529(0x1ed)]===_0x1b00a0)?.[_0x577529(0x1de)];}
|