@lovrabet/rabetbase-cli 2.5.12-beta.1 → 2.5.12
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_0x4c08d6=a290_0x289c;(function(_0x3d7488,_0x169af9){const _0x48df3d=a290_0x289c,_0x128fbe=_0x3d7488();while(!![]){try{const _0x1ed5ca=parseInt(_0x48df3d(0x160))/0x1+-parseInt(_0x48df3d(0x16b))/0x2*(-parseInt(_0x48df3d(0x183))/0x3)+-parseInt(_0x48df3d(0x188))/0x4+parseInt(_0x48df3d(0x180))/0x5*(-parseInt(_0x48df3d(0x179))/0x6)+-parseInt(_0x48df3d(0x17c))/0x7+parseInt(_0x48df3d(0x175))/0x8*(-parseInt(_0x48df3d(0x18c))/0x9)+parseInt(_0x48df3d(0x18d))/0xa;if(_0x1ed5ca===_0x169af9)break;else _0x128fbe['push'](_0x128fbe['shift']());}catch(_0x200e8c){_0x128fbe['push'](_0x128fbe['shift']());}}}(a290_0x2cfb,0x5c2f9));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_0x4c08d6(0x181),'ENDPOINT',a290_0x4c08d6(0x18a)];export function normalizeBffType(_0x550056){const _0x2dc802=a290_0x4c08d6;if(!_0x550056)return undefined;const _0x2784d3=_0x550056[_0x2dc802(0x177)]()[_0x2dc802(0x16a)]();return SUPPORTED_BFF_TYPES['includes'](_0x2784d3)?_0x2784d3:undefined;}async function scanJsFilesRecursively(_0x4c6b44,_0x58c6bc){const _0x38813f=a290_0x4c08d6,_0x2f4452=[];try{const _0x6e6c07=await readdir(_0x4c6b44,{'withFileTypes':!![]});for(const _0x3181a6 of _0x6e6c07){const _0x40e668=join(_0x4c6b44,_0x3181a6[_0x38813f(0x164)]);if(_0x3181a6[_0x38813f(0x186)]())_0x2f4452[_0x38813f(0x170)](...await scanJsFilesRecursively(_0x40e668,_0x58c6bc+'/'+_0x3181a6[_0x38813f(0x164)]));else _0x3181a6[_0x38813f(0x167)]()&&_0x3181a6[_0x38813f(0x164)][_0x38813f(0x176)]('.js')&&_0x2f4452[_0x38813f(0x170)]({'lockKey':_0x58c6bc+'/'+_0x3181a6[_0x38813f(0x164)][_0x38813f(0x172)](/\.js$/,''),'filePath':_0x40e668});}}catch(_0x520334){if(_0x520334[_0x38813f(0x169)]!=='ENOENT')throw _0x520334;}return _0x2f4452;}async function scanFlatFunctions(_0x1a0ca9,_0x45ae72){const _0x4632ab=join(_0x1a0ca9['scriptsRootDir'],_0x45ae72),_0xdd6a44=await scanJsFilesRecursively(_0x4632ab,_0x45ae72);return _0xdd6a44['map'](({lockKey:_0xdebb68,filePath:_0x5c6a9d})=>({'type':_0x45ae72,'name':_0xdebb68['split']('/')['at'](-0x1)??'','filePath':_0x5c6a9d,'lockKey':_0xdebb68}));}async function scanHookFunctions(_0x5c4848){const _0x55bec7=a290_0x4c08d6,_0x3965f4=join(_0x5c4848['scriptsRootDir'],_0x55bec7(0x18a)),_0x217f38=[];try{const _0x497631=await readdir(_0x3965f4,{'withFileTypes':!![]});for(const _0x867035 of _0x497631){if(!_0x867035[_0x55bec7(0x186)]())continue;const _0x1beb4f=_0x867035[_0x55bec7(0x164)],_0x28f42e=join(_0x3965f4,_0x1beb4f),_0x24e477=await readdir(_0x28f42e,{'withFileTypes':!![]});for(const _0x34a259 of _0x24e477){if(!_0x34a259[_0x55bec7(0x186)]())continue;const _0x5e5a2e=_0x34a259[_0x55bec7(0x164)],_0x4d6df9=join(_0x28f42e,_0x5e5a2e),_0x243505=await readdir(_0x4d6df9,{'withFileTypes':!![]});for(const _0x321937 of _0x243505){if(!_0x321937[_0x55bec7(0x186)]())continue;const _0x592d8f=_0x321937[_0x55bec7(0x164)],_0x561e72=join(_0x4d6df9,_0x592d8f),_0x5547bb=await readdir(_0x561e72,{'withFileTypes':!![]});for(const _0x3d288b of _0x5547bb){if(!_0x3d288b[_0x55bec7(0x167)]()||!_0x3d288b[_0x55bec7(0x164)][_0x55bec7(0x176)]('.js'))continue;const _0x1f4437=_0x3d288b[_0x55bec7(0x164)]['replace'](/\.js$/,'');_0x217f38[_0x55bec7(0x170)]({'type':_0x55bec7(0x18a),'name':_0x1f4437,'filePath':join(_0x561e72,_0x3d288b[_0x55bec7(0x164)]),'lockKey':'HOOK/'+_0x1beb4f+'/'+_0x5e5a2e+'/'+_0x592d8f+'/'+_0x1f4437,'alias':_0x1beb4f,'operationType':_0x5e5a2e,'functionNode':_0x592d8f});}}}}}catch(_0x2f90af){if(_0x2f90af['code']!==_0x55bec7(0x162))throw _0x2f90af;}return _0x217f38;}export async function scanLocalBffFunctions(_0x4ae0c5,_0x5a6ecd){const _0x366c13=a290_0x4c08d6;if(_0x5a6ecd===_0x366c13(0x181)||_0x5a6ecd===_0x366c13(0x16f))return scanFlatFunctions(_0x4ae0c5,_0x5a6ecd);if(_0x5a6ecd===_0x366c13(0x18a))return scanHookFunctions(_0x4ae0c5);const [_0x4a1974,_0x1f4e77,_0x5bb436]=await Promise[_0x366c13(0x163)]([scanFlatFunctions(_0x4ae0c5,_0x366c13(0x181)),scanFlatFunctions(_0x4ae0c5,'ENDPOINT'),scanHookFunctions(_0x4ae0c5)]);return[..._0x4a1974,..._0x1f4e77,..._0x5bb436];}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x1a7ff2){const _0x19b67d=a290_0x4c08d6;return SAFE_LOCK_KEY_SEGMENT[_0x19b67d(0x168)](_0x1a7ff2)&&_0x1a7ff2!=='.'&&_0x1a7ff2!=='..';}export function resolveLocalFilePathFromLockKey(_0x436633,_0x5eb9a4){const _0x5eb62d=a290_0x4c08d6,_0x5357dc=_0x5eb9a4[_0x5eb62d(0x165)]('/');if(!_0x5357dc[_0x5eb62d(0x17b)](isSafeLockKeySegment))throw new Error(_0x5eb62d(0x16e)+_0x5eb9a4);const _0x4cbaa4=resolve(join(_0x436633[_0x5eb62d(0x178)],..._0x5357dc)+_0x5eb62d(0x182)),_0x165681=resolve(_0x436633[_0x5eb62d(0x178)]);if(_0x4cbaa4!==_0x165681&&!_0x4cbaa4[_0x5eb62d(0x184)](_0x165681+sep))throw new Error(_0x5eb62d(0x187)+_0x4cbaa4);return _0x4cbaa4;}export function createHookLocationMap(_0x51e598){const _0x39de44=a290_0x4c08d6,_0x31695d=new Map();for(const _0x4ac512 of _0x51e598){_0x4ac512[_0x39de44(0x185)]&&_0x31695d[_0x39de44(0x174)](_0x4ac512['beforeScriptId'],{'datasetCode':_0x4ac512[_0x39de44(0x18b)],'operationType':snakeToCamel(_0x4ac512[_0x39de44(0x189)]),'functionNode':_0x39de44(0x16c)}),_0x4ac512[_0x39de44(0x173)]&&_0x31695d[_0x39de44(0x174)](_0x4ac512['afterScriptId'],{'datasetCode':_0x4ac512[_0x39de44(0x18b)],'operationType':snakeToCamel(_0x4ac512[_0x39de44(0x189)]),'functionNode':_0x39de44(0x161)});}return _0x31695d;}export function resolveRemoteScriptTarget(_0x42895b,_0x3b2fc1,_0x2bb5a8,_0x3e49f3,_0x42469b){const _0x41b741=a290_0x4c08d6,_0x2beef2=normalizeBffType(_0x3b2fc1[_0x41b741(0x17d)]);if(!_0x2beef2||!_0x3b2fc1[_0x41b741(0x16d)])return null;if(_0x2beef2===_0x41b741(0x18a)){const _0x3111ec=_0x3b2fc1['id']?_0x2bb5a8['get'](_0x3b2fc1['id']):undefined,_0x151644=findHookLocationByRemoteId(_0x3e49f3,_0x3b2fc1['id']),_0x406f3f=_0x3111ec?{..._0x151644?.[_0x41b741(0x18b)]===_0x3111ec['datasetCode']?_0x151644:{},..._0x3111ec}:_0x151644;if(!_0x406f3f)return null;const _0x493ca2=_0x42469b[_0x41b741(0x171)](_0x406f3f[_0x41b741(0x18b)][_0x41b741(0x17f)]()),_0x3e5594=_0x493ca2??_0x406f3f[_0x41b741(0x18b)],_0x4c5051={..._0x406f3f,'alias':_0x493ca2},_0x462618=_0x41b741(0x17a)+_0x3e5594+'/'+_0x4c5051['operationType']+'/'+_0x4c5051[_0x41b741(0x17e)]+'/'+_0x3b2fc1[_0x41b741(0x16d)];if(!_0x462618[_0x41b741(0x165)]('/')[_0x41b741(0x17b)](isSafeLockKeySegment))return null;return{'lockKey':_0x462618,'filePath':resolveLocalFilePathFromLockKey(_0x42895b,_0x462618),'type':_0x41b741(0x18a),'hookLocation':_0x4c5051};}const _0x440552=_0x2beef2+'/'+_0x3b2fc1['functionName'];if(!_0x440552[_0x41b741(0x165)]('/')[_0x41b741(0x17b)](isSafeLockKeySegment))return null;return{'lockKey':_0x440552,'filePath':resolveLocalFilePathFromLockKey(_0x42895b,_0x440552),'type':_0x2beef2};}function a290_0x289c(_0x202f30,_0x2225c9){_0x202f30=_0x202f30-0x160;const _0x2cfb19=a290_0x2cfb();let _0x289c40=_0x2cfb19[_0x202f30];return _0x289c40;}export async function ensureParentDirectory(_0x40dc1b){await mkdir(dirname(_0x40dc1b),{'recursive':!![]});}export async function fileExists(_0x2826f){const _0x130b29=a290_0x4c08d6;try{return await access(_0x2826f,constants[_0x130b29(0x166)]),!![];}catch{return![];}}function a290_0x2cfb(){const _0x4a190c=['functionName','Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20','ENDPOINT','push','get','replace','afterScriptId','set','162976NpLhUF','endsWith','trim','scriptsRootDir','6MEZIJb','HOOK/','every','963011GnjfBm','scriptType','functionNode','toLowerCase','3244655mTyleW','COMMON','.js','813oVIFAz','startsWith','beforeScriptId','isDirectory','Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20','330084bqkfyL','operationType','HOOK','datasetCode','171zyYaMI','9696530RGvLZK','51302eQirSn','after','ENOENT','all','name','split','F_OK','isFile','test','code','toUpperCase','4522sGbpMn','before'];a290_0x2cfb=function(){return _0x4a190c;};return a290_0x2cfb();}export async function directoryExists(_0x366619){const _0x3101c6=a290_0x4c08d6;try{const _0x2d01cd=await stat(_0x366619);return _0x2d01cd[_0x3101c6(0x186)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a291_0xbb08(_0x391ff7,_0x568896){_0x391ff7=_0x391ff7-0x16c;const _0xcdf5dd=a291_0xcdf5();let _0xbb08b2=_0xcdf5dd[_0x391ff7];return _0xbb08b2;}(function(_0x54a031,_0x2c7b61){const _0x24a948=a291_0xbb08,_0x25db42=_0x54a031();while(!![]){try{const _0xbf19db=parseInt(_0x24a948(0x171))/0x1+-parseInt(_0x24a948(0x179))/0x2*(parseInt(_0x24a948(0x16e))/0x3)+-parseInt(_0x24a948(0x176))/0x4+parseInt(_0x24a948(0x175))/0x5+-parseInt(_0x24a948(0x172))/0x6+parseInt(_0x24a948(0x177))/0x7*(-parseInt(_0x24a948(0x16d))/0x8)+parseInt(_0x24a948(0x170))/0x9*(parseInt(_0x24a948(0x17a))/0xa);if(_0xbf19db===_0x2c7b61)break;else _0x25db42['push'](_0x25db42['shift']());}catch(_0xfd5bbe){_0x25db42['push'](_0x25db42['shift']());}}}(a291_0xcdf5,0x2e08a));import{readFile}from'node:fs/promises';import a291_0x598400 from'node:crypto';export function computeContentHash(_0x104f15){const _0x2bd17d=a291_0xbb08;return a291_0x598400['createHash'](_0x2bd17d(0x178))[_0x2bd17d(0x16c)](_0x104f15)[_0x2bd17d(0x173)](_0x2bd17d(0x174));}export async function computeFileHash(_0x569106){const _0x15b09a=a291_0xbb08,_0x20fad6=await readFile(_0x569106,_0x15b09a(0x16f));return computeContentHash(_0x20fad6);}function a291_0xcdf5(){const _0x56ed2e=['9PdtLIT','utf8','8469VqsKCw','311327CohKfG','247122cGNIvb','digest','hex','666800oKSmpL','1114268BwBRKu','70KVGDZg','md5','60184ievfDy','3670rBVKjJ','update','153160uNYZoq'];a291_0xcdf5=function(){return _0x56ed2e;};return a291_0xcdf5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x170fb8,_0x5194d3){const _0x2a83f1=a292_0x3524,_0x4f8bcb=_0x170fb8();while(!![]){try{const _0x1ad26f=parseInt(_0x2a83f1(0x1f7))/0x1+parseInt(_0x2a83f1(0x1f1))/0x2*(-parseInt(_0x2a83f1(0x1d7))/0x3)+parseInt(_0x2a83f1(0x1de))/0x4+parseInt(_0x2a83f1(0x1ef))/0x5+parseInt(_0x2a83f1(0x1e3))/0x6*(-parseInt(_0x2a83f1(0x1cd))/0x7)+parseInt(_0x2a83f1(0x1c7))/0x8+parseInt(_0x2a83f1(0x1f5))/0x9*(parseInt(_0x2a83f1(0x1d9))/0xa);if(_0x1ad26f===_0x5194d3)break;else _0x4f8bcb['push'](_0x4f8bcb['shift']());}catch(_0x1f2c2b){_0x4f8bcb['push'](_0x4f8bcb['shift']());}}}(a292_0xf246,0x2bc42));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x393687){const _0x2e1128=a292_0x3524,_0x5963c9=[];for(const [_0x16de3d,_0xca92b2]of Object['entries'](_0x393687[_0x2e1128(0x1c6)])){const [_0x3404bc,_0x31bce6]=_0x16de3d[_0x2e1128(0x1cc)]('/');if(_0x3404bc!==_0x2e1128(0x1d2)||!_0x31bce6||!_0xca92b2['datasetCode'])continue;_0x5963c9['push']({'alias':_0x31bce6,'datasetCode':_0xca92b2[_0x2e1128(0x1ca)]});}return _0x5963c9;}export function uniqueTrackedHookDirectoryByDataset(_0x5a1f89){const _0xdb7712=a292_0x3524,_0x5f08fc=new Map();for(const _0x36e466 of trackedHookDirectoryMappings(_0x5a1f89)){const _0x1dbce9=directoryIdentity(_0x36e466['datasetCode']),_0x277ad1=_0x5f08fc[_0xdb7712(0x1c9)](_0x1dbce9)??new Map();_0x277ad1[_0xdb7712(0x1f3)](directoryIdentity(_0x36e466[_0xdb7712(0x1c8)]),_0x36e466[_0xdb7712(0x1c8)]),_0x5f08fc[_0xdb7712(0x1f3)](_0x1dbce9,_0x277ad1);}const _0x39f80d=new Map();for(const [_0x1a18dc,_0x3178b5]of _0x5f08fc){if(_0x3178b5[_0xdb7712(0x1e7)]>0x1)throw hookDirectoryError(_0xdb7712(0x1ce),_0xdb7712(0x1e8)+_0x1a18dc+_0xdb7712(0x1e6)+[..._0x3178b5[_0xdb7712(0x1df)]()][_0xdb7712(0x1db)](',\x20')+'.',{'datasetCode':_0x1a18dc,'directories':[..._0x3178b5['values']()]});_0x39f80d[_0xdb7712(0x1f3)](_0x1a18dc,[..._0x3178b5['values']()][0x0]);}return _0x39f80d;}export function assertUnambiguousHookDirectoryMappings(_0x27f919){const _0x312f50=a292_0x3524,_0x380484=new Map();for(const {alias:_0x418cc3,datasetCode:_0x5be17b}of _0x27f919){const _0x6faf28=directoryIdentity(_0x418cc3),_0x42f656=_0x380484['get'](_0x6faf28)??new Set();_0x42f656[_0x312f50(0x1e1)](_0x5be17b),_0x380484[_0x312f50(0x1f3)](_0x6faf28,_0x42f656);}for(const [_0x358897,_0x5628d0]of _0x380484){if(_0x5628d0[_0x312f50(0x1e7)]>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS',_0x312f50(0x1e5)+_0x358897+_0x312f50(0x1e2),{'directoryName':_0x358897,'datasetCodes':[..._0x5628d0]});}}export function assertUnambiguousHookAliases(_0x2ba89f){const _0x4f417c=a292_0x3524,_0x4f1fe0=[..._0x2ba89f],_0x908b28=new Map(),_0x5cae3d=new Map();for(const {alias:_0x46d0c2,datasetCode:_0x261404}of _0x4f1fe0){const _0x3189d7=directoryIdentity(_0x46d0c2),_0xc4306f=directoryIdentity(_0x261404),_0xcdc4d5=_0x908b28[_0x4f417c(0x1c9)](_0x3189d7)??new Set();_0xcdc4d5[_0x4f417c(0x1e1)](_0x261404),_0x908b28[_0x4f417c(0x1f3)](_0x3189d7,_0xcdc4d5);const _0x364412=_0x5cae3d['get'](_0xc4306f)??new Set();_0x364412['add'](_0x46d0c2),_0x5cae3d['set'](_0xc4306f,_0x364412);}for(const [_0xfa743b,_0x1d82ca]of _0x908b28){if(_0x1d82ca['size']>0x1)throw hookDirectoryError(_0x4f417c(0x1dc),_0x4f417c(0x1e9)+_0xfa743b+_0x4f417c(0x1e2),{'alias':_0xfa743b,'datasetCodes':[..._0x1d82ca]});}for(const [_0x3db762,_0x97bad9]of _0x5cae3d){if(_0x97bad9[_0x4f417c(0x1e7)]>0x1)throw hookDirectoryError(_0x4f417c(0x1dc),_0x4f417c(0x1e8)+_0x3db762+_0x4f417c(0x1f2),{'datasetCode':_0x3db762,'aliases':[..._0x97bad9]});}}export function buildHookDirectoryIndexes(_0x294610,_0x19c5ee=[]){const _0x1def77=a292_0x3524,_0xa9ae25=[..._0x19c5ee];assertUnambiguousHookDirectoryMappings(_0xa9ae25[_0x1def77(0x1c4)](([_0xe9224c,_0x2eefeb])=>({'alias':_0xe9224c,'datasetCode':_0x2eefeb})));const _0x1d8a17=new Map(),_0x358b8f=new Map();for(const _0x138e24 of _0x294610){appendUnique(_0x1d8a17,directoryIdentity(_0x138e24[_0x1def77(0x1f4)]),_0x138e24,_0x59a63c=>_0x59a63c['code']);}for(const [_0x321d11,_0x5ecab7]of _0xa9ae25){appendUnique(_0x358b8f,directoryIdentity(_0x321d11),_0x5ecab7,_0x1ee5bc=>_0x1ee5bc);}return{'datasetCodeToDatasets':_0x1d8a17,'aliasToDatasetCodes':_0x358b8f};}export function resolvePushHookDirectory(_0x4022de,_0x46817d,_0xd6c727){const _0x4c517d=a292_0x3524,_0x34c663=directoryIdentity(_0x4022de),_0x2d8966=_0xd6c727['datasetCodeToDatasets'][_0x4c517d(0x1c9)](_0x34c663)??[],_0x2b2d20=_0xd6c727[_0x4c517d(0x1c3)][_0x4c517d(0x1c9)](_0x34c663)??[],_0x1844b1=new Set([..._0x2d8966['map'](_0x232b8a=>_0x232b8a[_0x4c517d(0x1f4)]),..._0x2b2d20]);if(_0x1844b1['size']>0x1)throw hookDirectoryError(_0x4c517d(0x1ec),_0x4c517d(0x1e5)+_0x4022de+_0x4c517d(0x1d6),{'directoryName':_0x4022de,'datasetCodes':[..._0x1844b1]});const _0x2010e4=[..._0x1844b1][0x0];if(_0x2010e4&&_0x46817d?.[_0x4c517d(0x1ca)]&&_0x2010e4!==_0x46817d[_0x4c517d(0x1ca)])throw hookDirectoryError(_0x4c517d(0x1d0),_0x4c517d(0x1e5)+_0x4022de+_0x4c517d(0x1d8)+_0x46817d[_0x4c517d(0x1ca)]+_0x4c517d(0x1e0)+_0x2010e4+'\x22.',{'directoryName':_0x4022de,'datasetCode':_0x2010e4,'lockedDatasetCode':_0x46817d[_0x4c517d(0x1ca)]});const _0x2c9d99=_0x2010e4?findDatasetByCode(_0xd6c727,_0x2010e4):undefined,_0x4c7942=!!_0x2010e4&&_0x2b2d20[_0x4c517d(0x1d5)](_0x2010e4);if(_0x2c9d99)return{'dataset':_0x2c9d99,'datasetCode':_0x2c9d99[_0x4c517d(0x1f4)],..._0x4c7942?{'alias':_0x4022de}:{},'directoryProtocol':_0x4c7942?_0x4c517d(0x1c8):_0x4c517d(0x1ca),'warnings':[]};const _0x49d199=_0x46817d?.['datasetCode'];if(_0x49d199){const _0x35178f=findDatasetByCode(_0xd6c727,_0x49d199);if(_0x35178f)return{'dataset':_0x35178f,'datasetCode':_0x35178f[_0x4c517d(0x1f4)],..._0x46817d[_0x4c517d(0x1c8)]?{'alias':_0x46817d['alias']}:{},'directoryProtocol':_0x46817d[_0x4c517d(0x1c8)]?_0x4c517d(0x1c8):'datasetCode','warnings':[]};}if(_0x2010e4||_0x49d199){const _0xa455c3=_0x2010e4??_0x49d199;throw hookDirectoryError('HOOK_DATASET_NOT_FOUND',_0x4c517d(0x1e5)+_0x4022de+_0x4c517d(0x1e4),{'directoryName':_0x4022de,'datasetCode':_0xa455c3});}throw hookDirectoryError('HOOK_DIRECTORY_UNRESOLVED',_0x4c517d(0x1d4)+_0x4022de+_0x4c517d(0x1ea),{'directoryName':_0x4022de});}export function preflightPushHookDirectories(_0x567bd5,_0x19b1b9,_0x841f2b,_0x1f641a){const _0x196fc7=a292_0x3524,_0x416253=new Map(),_0x5d18ce=new Map();for(const _0x120906 of _0x567bd5){if(_0x120906[_0x196fc7(0x1c5)]!==_0x196fc7(0x1d2))continue;const _0x334bf0=_0x120906[_0x196fc7(0x1c8)];if(!_0x334bf0)throw hookDirectoryError(_0x196fc7(0x1da),_0x196fc7(0x1cf)+_0x120906[_0x196fc7(0x1f0)],{'lockKey':_0x120906['lockKey']});let _0x5964a2;try{_0x5964a2=resolvePushHookDirectory(_0x334bf0,_0x19b1b9['functions'][_0x120906[_0x196fc7(0x1f0)]],_0x841f2b);}catch(_0x509b4c){if(_0x1f641a&&_0x509b4c instanceof CliError&&[_0x196fc7(0x1f6),_0x196fc7(0x1da)][_0x196fc7(0x1d5)](_0x509b4c[_0x196fc7(0x1f4)])){_0x1f641a['set'](_0x120906[_0x196fc7(0x1f0)],_0x509b4c[_0x196fc7(0x1cb)]);continue;}throw _0x509b4c;}_0x416253[_0x196fc7(0x1f3)](_0x120906['lockKey'],_0x5964a2);const _0x506a98=_0x5d18ce['get'](_0x5964a2[_0x196fc7(0x1ca)])??new Set();_0x506a98[_0x196fc7(0x1e1)](_0x334bf0),_0x5d18ce[_0x196fc7(0x1f3)](_0x5964a2['datasetCode'],_0x506a98);}for(const [_0x2fe030,_0x191fe8]of _0x5d18ce){if(_0x191fe8[_0x196fc7(0x1e7)]>0x1)throw hookDirectoryError(_0x196fc7(0x1ce),_0x196fc7(0x1e8)+_0x2fe030+'\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20'+[..._0x191fe8][_0x196fc7(0x1db)](',\x20')+'.',{'datasetCode':_0x2fe030,'directories':[..._0x191fe8]});}return _0x416253;}export function hookDirectoryError(_0x5b4b30,_0xb2e65b,_0x629dbc){const _0x5bea4f=a292_0x3524,_0x823070=new CliError(_0x5b4b30,0x2,_0x5b4b30+':\x20'+_0xb2e65b);return _0x823070[_0x5bea4f(0x1ee)]=_0x629dbc,_0x823070;}function a292_0x3524(_0x19d521,_0x588091){_0x19d521=_0x19d521-0x1c2;const _0xf2461f=a292_0xf246();let _0x352459=_0xf2461f[_0x19d521];return _0x352459;}function a292_0xf246(){const _0x989b5b=['\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','datasetCodeToDatasets','HOOK_DIRECTORY_AMBIGUOUS','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','details','147215VTzoRx','lockKey','639278CbBjNM','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','set','code','9WNJAZO','HOOK_DATASET_NOT_FOUND','176721IRQKyu','normalize','length','aliasToDatasetCodes','map','type','functions','1284072VehRUh','alias','get','datasetCode','message','split','42hsvRxZ','HOOK_DUPLICATE_DIRECTORIES','Incomplete\x20HOOK\x20path:\x20','HOOK_MAPPING_DRIFT','push','HOOK','Dataset\x20code\x20\x22','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','includes','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','3HrqvWL','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','1032430KKGEqE','HOOK_DIRECTORY_UNRESOLVED','join','HOOK_ALIAS_AMBIGUOUS','NFC','188220sggcJZ','values','\x22\x20to\x20\x22','add','\x22\x20resolves\x20to\x20multiple\x20Datasets.','18066Krzbrm','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','HOOK\x20directory\x20\x22','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','size','Dataset\x20\x22','SDK\x20alias\x20\x22'];a292_0xf246=function(){return _0x989b5b;};return a292_0xf246();}function findDatasetByCode(_0x53ebc3,_0x13b74e){const _0x4ad0a2=a292_0x3524,_0x19ec53=_0x53ebc3[_0x4ad0a2(0x1eb)][_0x4ad0a2(0x1c9)](directoryIdentity(_0x13b74e))??[];if(_0x19ec53[_0x4ad0a2(0x1c2)]>0x1)throw hookDirectoryError('HOOK_DATASET_CODE_AMBIGUOUS',_0x4ad0a2(0x1d3)+_0x13b74e+_0x4ad0a2(0x1ed),{'datasetCode':_0x13b74e,'candidates':_0x19ec53['map'](datasetFact)});return _0x19ec53[0x0];}function directoryIdentity(_0x1365fa){const _0x21dbb6=a292_0x3524;return _0x1365fa[_0x21dbb6(0x1f8)](_0x21dbb6(0x1dd))['toLowerCase']();}function appendUnique(_0x25ff27,_0x2fde65,_0x5cbe3e,_0x13618c){const _0x34adca=a292_0x3524,_0x342ab1=_0x25ff27['get'](_0x2fde65)??[];!_0x342ab1['some'](_0x3f3684=>_0x13618c(_0x3f3684)===_0x13618c(_0x5cbe3e))&&_0x342ab1[_0x34adca(0x1d1)](_0x5cbe3e),_0x25ff27[_0x34adca(0x1f3)](_0x2fde65,_0x342ab1);}function datasetFact(_0xd8fc96){const _0x50e329=a292_0x3524;return{'id':_0xd8fc96['id'],'name':_0xd8fc96['name'],'datasetCode':_0xd8fc96[_0x50e329(0x1f4)]};}
|
|
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']};}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x228710,_0x33e831){const _0x2c132c=a293_0x37c3,_0x4d9a20=_0x228710();while(!![]){try{const _0x3f62e1=-parseInt(_0x2c132c(0x113))/0x1+-parseInt(_0x2c132c(0x10d))/0x2+parseInt(_0x2c132c(0x11e))/0x3+-parseInt(_0x2c132c(0x10b))/0x4+-parseInt(_0x2c132c(0x11b))/0x5+-parseInt(_0x2c132c(0x110))/0x6+-parseInt(_0x2c132c(0x11f))/0x7*(-parseInt(_0x2c132c(0x114))/0x8);if(_0x3f62e1===_0x33e831)break;else _0x4d9a20['push'](_0x4d9a20['shift']());}catch(_0x2ce2a7){_0x4d9a20['push'](_0x4d9a20['shift']());}}}(a293_0x1f30,0xb30cd));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a293_0x1f30(){const _0x34dddc=['5209770WSvfln','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','parse','3906633poQRhw','14cqjRVC','object','476692HTpgiq','current\x20\x22','1101012vzTNct','utf8','\x22\x20vs\x20lock\x20\x22','2428284EcIHyJ','apps',':\x20scriptsRoot\x20mismatch\x20—\x20','221503xpWEcF','7076112ZyMAyp','code','\x22.\x20','lastSync','scriptsRoot','stringify','functions'];a293_0x1f30=function(){return _0x34dddc;};return a293_0x1f30();}export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x1f82e3,_0x536366,_0x2ec283,_0x2460a3){const _0x5421db=a293_0x37c3,_0x521225={'apps':_0x1f82e3[_0x5421db(0x111)]&&typeof _0x1f82e3[_0x5421db(0x111)]===_0x5421db(0x120)?_0x1f82e3[_0x5421db(0x111)]:{}};let _0x111e9c=_0x521225[_0x5421db(0x111)][_0x536366];if(!_0x111e9c)return _0x111e9c={'scriptsRoot':_0x2ec283,'lastSync':'','functions':{}},_0x521225[_0x5421db(0x111)][_0x536366]=_0x111e9c,{'lockData':_0x521225,'appLock':_0x111e9c};if(!_0x111e9c['scriptsRoot'])_0x111e9c['scriptsRoot']=_0x2ec283;else{if(_0x111e9c['scriptsRoot']!==_0x2ec283)throw new Error(_0x2460a3+_0x5421db(0x112)+(_0x5421db(0x10c)+_0x2ec283+_0x5421db(0x10f)+_0x111e9c[_0x5421db(0x118)]+_0x5421db(0x116))+_0x5421db(0x11c));}return!_0x111e9c['functions']&&(_0x111e9c[_0x5421db(0x11a)]={}),!_0x111e9c[_0x5421db(0x117)]&&(_0x111e9c[_0x5421db(0x117)]=''),{'lockData':_0x521225,'appLock':_0x111e9c};}function a293_0x37c3(_0x3219e9,_0x4dda46){_0x3219e9=_0x3219e9-0x10b;const _0x1f3015=a293_0x1f30();let _0x37c3b0=_0x1f3015[_0x3219e9];return _0x37c3b0;}export async function readBffLockFile(_0x2b05f8){const _0xbd8717=a293_0x37c3;try{const _0x1207ae=await readFile(_0x2b05f8,_0xbd8717(0x10e)),_0x485b0d=JSON[_0xbd8717(0x11d)](_0x1207ae);return{'apps':_0x485b0d[_0xbd8717(0x111)]&&typeof _0x485b0d[_0xbd8717(0x111)]==='object'?_0x485b0d[_0xbd8717(0x111)]:{}};}catch(_0x3f2ae4){if(_0x3f2ae4[_0xbd8717(0x115)]==='ENOENT')return null;throw new Error('Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20'+String(_0x3f2ae4));}}export async function writeBffLockFile(_0x3e1bd0,_0x3fe4d8){const _0x555b21=a293_0x37c3;await mkdir(dirname(_0x3e1bd0),{'recursive':!![]}),await writeFile(_0x3e1bd0,JSON[_0x555b21(0x119)](_0x3fe4d8,null,0x2),'utf8');}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a295_0x66a5(){const _0x3d4b9c=['startsWith','TODO:\x20补充脚本功能描述','after','1086rsfZhx','remoteId','functionNode','933ZQrQJP','split','match','trim','69928idptnW','test','alias','1617073dOxlMD','15772uCuTCg','5907750jYQNJl','map','5538050tjzPDX','1053RMQrHd','30639HTxzeC','toLowerCase','datasetCode','toUpperCase','some','TODO:\x20add\x20script\x20description','3672162JxWicM','operationType','replace'];a295_0x66a5=function(){return _0x3d4b9c;};return a295_0x66a5();}const a295_0x2690c6=a295_0x5cf1;(function(_0x55f918,_0x606328){const _0x583bba=a295_0x5cf1,_0x48e44c=_0x55f918();while(!![]){try{const _0x291687=parseInt(_0x583bba(0x10d))/0x1+-parseInt(_0x583bba(0x119))/0x2+parseInt(_0x583bba(0x122))/0x3*(-parseInt(_0x583bba(0x10e))/0x4)+parseInt(_0x583bba(0x10f))/0x5+-parseInt(_0x583bba(0x11f))/0x6*(-parseInt(_0x583bba(0x113))/0x7)+-parseInt(_0x583bba(0x10a))/0x8*(-parseInt(_0x583bba(0x112))/0x9)+-parseInt(_0x583bba(0x111))/0xa;if(_0x291687===_0x606328)break;else _0x48e44c['push'](_0x48e44c['shift']());}catch(_0x5d82fe){_0x48e44c['push'](_0x48e44c['shift']());}}}(a295_0x66a5,0xf3816));function a295_0x5cf1(_0x1a73fe,_0x21c1c1){_0x1a73fe=_0x1a73fe-0x109;const _0x66a5e6=a295_0x66a5();let _0x5cf119=_0x66a5e6[_0x1a73fe];return _0x5cf119;}export const DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x2690c6(0x11d);const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x2690c6(0x118);export function snakeToCamel(_0x52cbbc){const _0xf43ebf=a295_0x2690c6;return _0x52cbbc[_0xf43ebf(0x114)]()[_0xf43ebf(0x11b)](/_([a-z])/g,(_0x1dc56c,_0x490b70)=>_0x490b70[_0xf43ebf(0x116)]());}export function findHookLocationByRemoteId(_0x46b380,_0x383d63){const _0x5cbe50=a295_0x2690c6;if(!_0x383d63)return undefined;for(const [_0x19b1a7,_0x6c8d4]of Object['entries'](_0x46b380)){if(_0x6c8d4[_0x5cbe50(0x120)]===_0x383d63&&_0x6c8d4[_0x5cbe50(0x115)]&&_0x6c8d4[_0x5cbe50(0x11a)]&&_0x6c8d4[_0x5cbe50(0x121)]){const _0x50ee84=_0x19b1a7[_0x5cbe50(0x123)]('/')[0x1];return{'alias':_0x50ee84||_0x6c8d4[_0x5cbe50(0x10c)],'datasetCode':_0x6c8d4[_0x5cbe50(0x115)],'operationType':_0x6c8d4['operationType'],'functionNode':_0x6c8d4[_0x5cbe50(0x121)]};}}return undefined;}export function extractScriptDescription(_0x546c10){const _0x7574a0=a295_0x2690c6,_0x54f88f=_0x546c10[_0x7574a0(0x124)](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x54f88f?.[0x1])return undefined;const _0x206039=_0x54f88f[0x1],_0x18a5e1=_0x3fd9bf=>{const _0x2f04f7=_0x3fd9bf?.['trim']();if(!_0x2f04f7||_0x2f04f7===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0x2f04f7===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0x2f04f7;},_0x25fe39=_0x206039[_0x7574a0(0x124)](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x25fe39)return _0x18a5e1(_0x25fe39[0x1]);const _0x2ebbae=_0x206039['split'](/\r?\n/)[_0x7574a0(0x110)](_0x530964=>_0x530964[_0x7574a0(0x11b)](/^\s*\*\s?/,'')[_0x7574a0(0x109)]()),_0x5660b=_0x2ebbae[_0x7574a0(0x117)](_0x139633=>/^\[\s*脚本类型\s*]\s*\S+/[_0x7574a0(0x10b)](_0x139633))&&_0x2ebbae['some'](_0xe26785=>/^\[\s*脚本名称\s*]\s*\S+/['test'](_0xe26785));if(!_0x5660b)return undefined;for(const _0x52d610 of _0x2ebbae){if(!_0x52d610||_0x52d610[_0x7574a0(0x11c)]('@')||/^\[[^\]]+]\s*/[_0x7574a0(0x10b)](_0x52d610))continue;return _0x18a5e1(_0x52d610);}return undefined;}export function isValidBffFunctionName(_0x5c841b){const _0x1a3e5e=a295_0x2690c6;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x1a3e5e(0x10b)](_0x5c841b);}export function normalizeHookFunctionNode(_0x5e1198){const _0x33954f=a295_0x2690c6;if(!_0x5e1198)return undefined;const _0x19dc76=_0x5e1198[_0x33954f(0x109)]()[_0x33954f(0x114)]();if(_0x19dc76==='before'||_0x19dc76===_0x33954f(0x11e))return _0x19dc76;return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a296_0x5a1a(){const _0x34f93e=['15008PVLabl','225291CIYDIy','/smartapi/db-analysis/cross-db/start','14583plyKcI','4280jqzxYE','43191tuHOAW','84kjZhjM','/smartapi/db-analysis/cross-db/latest-job','5860892LbWmHd','23325753leZogm','/smartapi/db-analysis/cross-db/status','770yhXyaD','144475YQqOEz','454EViDLm'];a296_0x5a1a=function(){return _0x34f93e;};return a296_0x5a1a();}function a296_0x3515(_0x2928f6,_0x3c3103){_0x2928f6=_0x2928f6-0x1d9;const _0x5a1a26=a296_0x5a1a();let _0x35154e=_0x5a1a26[_0x2928f6];return _0x35154e;}const a296_0x33f2fe=a296_0x3515;(function(_0x5bdd0d,_0x5de8b8){const _0x2a6be1=a296_0x3515,_0x3d2513=_0x5bdd0d();while(!![]){try{const _0xff253e=parseInt(_0x2a6be1(0x1dd))/0x1+-parseInt(_0x2a6be1(0x1db))/0x2*(-parseInt(_0x2a6be1(0x1df))/0x3)+-parseInt(_0x2a6be1(0x1e4))/0x4+-parseInt(_0x2a6be1(0x1da))/0x5*(parseInt(_0x2a6be1(0x1e2))/0x6)+-parseInt(_0x2a6be1(0x1dc))/0x7*(parseInt(_0x2a6be1(0x1e0))/0x8)+-parseInt(_0x2a6be1(0x1e1))/0x9*(-parseInt(_0x2a6be1(0x1d9))/0xa)+parseInt(_0x2a6be1(0x1e5))/0xb;if(_0xff253e===_0x5de8b8)break;else _0x3d2513['push'](_0x3d2513['shift']());}catch(_0x325582){_0x3d2513['push'](_0x3d2513['shift']());}}}(a296_0x5a1a,0xc3cc7));export const CROSS_DB_ANALYSIS_PATHS={'start':a296_0x33f2fe(0x1de),'status':a296_0x33f2fe(0x1e6),'latest':a296_0x33f2fe(0x1e3)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a297_0x447587=a297_0x524c;(function(_0x48f3dd,_0x29ad93){const _0x8b1fdb=a297_0x524c,_0x102dc4=_0x48f3dd();while(!![]){try{const _0x1baf6a=parseInt(_0x8b1fdb(0x135))/0x1+parseInt(_0x8b1fdb(0x130))/0x2+-parseInt(_0x8b1fdb(0x12f))/0x3*(parseInt(_0x8b1fdb(0x136))/0x4)+parseInt(_0x8b1fdb(0x134))/0x5+-parseInt(_0x8b1fdb(0x131))/0x6*(-parseInt(_0x8b1fdb(0x12c))/0x7)+-parseInt(_0x8b1fdb(0x12a))/0x8*(-parseInt(_0x8b1fdb(0x12e))/0x9)+-parseInt(_0x8b1fdb(0x133))/0xa;if(_0x1baf6a===_0x29ad93)break;else _0x102dc4['push'](_0x102dc4['shift']());}catch(_0x326da3){_0x102dc4['push'](_0x102dc4['shift']());}}}(a297_0x1c87,0x70893));function a297_0x524c(_0x5c4553,_0x4cfbb7){_0x5c4553=_0x5c4553-0x12a;const _0x1c8741=a297_0x1c87();let _0x524c50=_0x1c8741[_0x5c4553];return _0x524c50;}function a297_0x1c87(){const _0x2aa66c=['581210UvtmyA','32cStjTG','48tLcmTZ','/smartapi/cross-db-relation/query','1477BafxYR','/smartapi/cross-db-relation/create','683352DeZbuE','2577jvmVgD','1040194SJkxXM','1524WqQcDG','/smartapi/cross-db-relation/delete','17907310HSzauz','3240405ZSuapv'];a297_0x1c87=function(){return _0x2aa66c;};return a297_0x1c87();}export const CROSS_DB_RELATION_PATHS={'list':a297_0x447587(0x12b),'create':a297_0x447587(0x12d),'update':'/smartapi/cross-db-relation/update','delete':a297_0x447587(0x132)};
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a298_0x546a(){const _0x396058=['.\x20Be\x20more\x20specific.','find','6544NgGluA','toLowerCase','set','607058zyQYIs','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','No\x20database\x20matching\x20\x22','253SgXstc','11687128fZmfdG','1035410BUiqAo','has','length','isNaN','map','join','entries','1427238tJPikO','dbName','dbId','36jpgZKP','1062880MPYdWO','3160cevsuP','db-','\x22.\x20Available:\x20','15KbiOQd','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','1349448lTLVeM','get','\x22\x20under\x20app\x20\x22'];a298_0x546a=function(){return _0x396058;};return a298_0x546a();}(function(_0x5cf305,_0x16dba1){const _0x35c594=a298_0x57dc,_0x1df3e6=_0x5cf305();while(!![]){try{const _0x249ea3=-parseInt(_0x35c594(0x1d0))/0x1+-parseInt(_0x35c594(0x1d8))/0x2*(parseInt(_0x35c594(0x1ce))/0x3)+-parseInt(_0x35c594(0x1d5))/0x4*(-parseInt(_0x35c594(0x1cb))/0x5)+parseInt(_0x35c594(0x1c9))/0x6*(-parseInt(_0x35c594(0x1ca))/0x7)+parseInt(_0x35c594(0x1be))/0x8+-parseInt(_0x35c594(0x1c6))/0x9+-parseInt(_0x35c594(0x1bf))/0xa*(-parseInt(_0x35c594(0x1bd))/0xb);if(_0x249ea3===_0x16dba1)break;else _0x1df3e6['push'](_0x1df3e6['shift']());}catch(_0x35a730){_0x1df3e6['push'](_0x1df3e6['shift']());}}}(a298_0x546a,0xe5633));function a298_0x57dc(_0x1b6af5,_0x26a7d8){_0x1b6af5=_0x1b6af5-0x1ba;const _0x546ad4=a298_0x546a();let _0x57dc0e=_0x546ad4[_0x1b6af5];return _0x57dc0e;}import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x440029){const _0x5ce24e=a298_0x57dc;if(cache[_0x5ce24e(0x1c0)](_0x440029))return cache[_0x5ce24e(0x1d1)](_0x440029);const _0x118ca0=await listDatasets(_0x440029),_0x2a2907=new Map();for(const _0x52e67c of _0x118ca0){const _0x175357=_0x52e67c['dbtableConfig'];_0x175357?.['dbId']!=null&&_0x2a2907[_0x5ce24e(0x1d7)](_0x175357['dbId'],_0x175357[_0x5ce24e(0x1c7)]??_0x5ce24e(0x1cc)+_0x175357['dbId']);}const _0x49a359=[..._0x2a2907[_0x5ce24e(0x1c5)]()][_0x5ce24e(0x1c3)](([_0x5e89a8,_0x26add1])=>({'dbId':_0x5e89a8,'dbName':_0x26add1}));return cache[_0x5ce24e(0x1d7)](_0x440029,_0x49a359),_0x49a359;}export async function resolveDb(_0x7935a,_0xe899e0){const _0x3c7508=a298_0x57dc,_0x2b90a3=await listDatabases(_0x7935a);if(_0x2b90a3[_0x3c7508(0x1c1)]===0x0)return{'resolved':[],'error':_0x3c7508(0x1bb)+_0x7935a+_0x3c7508(0x1cf)};if(!_0xe899e0)return{'resolved':_0x2b90a3};const _0x140a51=Number(_0xe899e0);if(!Number[_0x3c7508(0x1c2)](_0x140a51)){const _0x3d62d3=_0x2b90a3['find'](_0x26fd04=>_0x26fd04[_0x3c7508(0x1c8)]===_0x140a51);if(_0x3d62d3)return{'resolved':[_0x3d62d3]};}const _0x30cda4=_0xe899e0[_0x3c7508(0x1d6)](),_0x1b701e=_0x2b90a3['filter'](_0x1ddc3c=>_0x1ddc3c[_0x3c7508(0x1c7)][_0x3c7508(0x1d6)]()['includes'](_0x30cda4));if(_0x1b701e['length']>0x0)return{'resolved':_0x1b701e};const _0x4dd554=_0x2b90a3[_0x3c7508(0x1c3)](_0xe647c2=>_0xe647c2[_0x3c7508(0x1c7)]+'\x20('+_0xe647c2['dbId']+')')[_0x3c7508(0x1c4)](',\x20');return{'resolved':[],'error':_0x3c7508(0x1bc)+_0xe899e0+_0x3c7508(0x1d2)+_0x7935a+_0x3c7508(0x1cd)+_0x4dd554+_0x3c7508(0x1ba)};}export async function resolveOneDb(_0x1f29aa,_0x239f92){const _0x14beda=a298_0x57dc,{resolved:_0x544ef2,error:_0xca86e7}=await resolveDb(_0x1f29aa,_0x239f92);if(_0xca86e7)return{'db':null,'error':_0xca86e7};if(_0x544ef2['length']===0x1)return{'db':_0x544ef2[0x0]};if(!_0x239f92){const _0x176ce6=_0x544ef2[_0x14beda(0x1c3)](_0x4ef718=>_0x4ef718[_0x14beda(0x1c7)]+'\x20('+_0x4ef718[_0x14beda(0x1c8)]+')')[_0x14beda(0x1c4)](',\x20');return{'db':null,'error':'Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20'+_0x176ce6};}const _0x5f43a0=_0x544ef2[_0x14beda(0x1c3)](_0x20eb47=>_0x20eb47[_0x14beda(0x1c7)]+'\x20('+_0x20eb47[_0x14beda(0x1c8)]+')')[_0x14beda(0x1c4)](',\x20');return{'db':null,'error':'\x22'+_0x239f92+'\x22\x20matches\x20multiple\x20databases:\x20'+_0x5f43a0+_0x14beda(0x1d3)};}export async function getDbName(_0x15eb2e,_0x548bd4){const _0x5e078a=a298_0x57dc,_0x10de81=await listDatabases(_0x15eb2e);return _0x10de81[_0x5e078a(0x1d4)](_0x5a1cfe=>_0x5a1cfe['dbId']===_0x548bd4)?.[_0x5e078a(0x1c7)];}
|