@lovrabet/rabetbase-cli 2.5.9 → 2.5.10-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- 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.d.ts +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +0 -28
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.d.ts +8 -0
- package/lib/core/instant-api-policy/endpoints.js +1 -0
- package/lib/core/kb-management-client.d.ts +3 -9
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +1 -4
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -2
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase-dataset-generation/SKILL.md +2 -2
- package/skills/rabetbase-page-generation/SKILL.md +2 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a290_0x1afc08=a290_0x18e8;(function(_0x3dd64e,_0x7017c8){const _0x185768=a290_0x18e8,_0x3528a1=_0x3dd64e();while(!![]){try{const _0x21047a=parseInt(_0x185768(0xd1))/0x1*(parseInt(_0x185768(0xd2))/0x2)+-parseInt(_0x185768(0xe3))/0x3*(-parseInt(_0x185768(0xe4))/0x4)+-parseInt(_0x185768(0xda))/0x5+-parseInt(_0x185768(0xcb))/0x6*(-parseInt(_0x185768(0xe2))/0x7)+parseInt(_0x185768(0xcc))/0x8*(parseInt(_0x185768(0xdf))/0x9)+-parseInt(_0x185768(0xd7))/0xa+-parseInt(_0x185768(0xc8))/0xb*(-parseInt(_0x185768(0xd4))/0xc);if(_0x21047a===_0x7017c8)break;else _0x3528a1['push'](_0x3528a1['shift']());}catch(_0x30d835){_0x3528a1['push'](_0x3528a1['shift']());}}}(a290_0x212a,0xa627b));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=['COMMON',a290_0x1afc08(0xcf),a290_0x1afc08(0xeb)];export function normalizeBffType(_0x16d9f6){const _0x1e85ad=a290_0x1afc08;if(!_0x16d9f6)return undefined;const _0x10f7be=_0x16d9f6[_0x1e85ad(0xe5)]()['toUpperCase']();return SUPPORTED_BFF_TYPES[_0x1e85ad(0xc1)](_0x10f7be)?_0x10f7be:undefined;}async function scanJsFilesRecursively(_0x517b68,_0x216bd1){const _0x26b556=a290_0x1afc08,_0x1ddb08=[];try{const _0x525bee=await readdir(_0x517b68,{'withFileTypes':!![]});for(const _0x5e5483 of _0x525bee){const _0x36d6ca=join(_0x517b68,_0x5e5483[_0x26b556(0xe8)]);if(_0x5e5483[_0x26b556(0xc2)]())_0x1ddb08[_0x26b556(0xc4)](...await scanJsFilesRecursively(_0x36d6ca,_0x216bd1+'/'+_0x5e5483[_0x26b556(0xe8)]));else _0x5e5483[_0x26b556(0xea)]()&&_0x5e5483[_0x26b556(0xe8)][_0x26b556(0xd3)](_0x26b556(0xca))&&_0x1ddb08[_0x26b556(0xc4)]({'lockKey':_0x216bd1+'/'+_0x5e5483[_0x26b556(0xe8)]['replace'](/\.js$/,''),'filePath':_0x36d6ca});}}catch(_0x4275bc){if(_0x4275bc['code']!==_0x26b556(0xcd))throw _0x4275bc;}return _0x1ddb08;}async function scanFlatFunctions(_0x33cec6,_0x12e050){const _0x1d2a26=a290_0x1afc08,_0x28634d=join(_0x33cec6[_0x1d2a26(0xde)],_0x12e050),_0x5375ea=await scanJsFilesRecursively(_0x28634d,_0x12e050);return _0x5375ea[_0x1d2a26(0xd0)](({lockKey:_0x281d32,filePath:_0x5da63a})=>({'type':_0x12e050,'name':_0x281d32[_0x1d2a26(0xd6)]('/')['at'](-0x1)??'','filePath':_0x5da63a,'lockKey':_0x281d32}));}async function scanHookFunctions(_0x1d53b4){const _0x403dad=a290_0x1afc08,_0x121369=join(_0x1d53b4[_0x403dad(0xde)],_0x403dad(0xeb)),_0x300e36=[];try{const _0x2527d2=await readdir(_0x121369,{'withFileTypes':!![]});for(const _0xa42921 of _0x2527d2){if(!_0xa42921[_0x403dad(0xc2)]())continue;const _0x4300b5=_0xa42921[_0x403dad(0xe8)],_0x5a9e1d=join(_0x121369,_0x4300b5),_0x3bc69f=await readdir(_0x5a9e1d,{'withFileTypes':!![]});for(const _0x1f04f5 of _0x3bc69f){if(!_0x1f04f5[_0x403dad(0xc2)]())continue;const _0x3b51b6=_0x1f04f5[_0x403dad(0xe8)],_0x11e170=join(_0x5a9e1d,_0x3b51b6),_0x6c4c34=await readdir(_0x11e170,{'withFileTypes':!![]});for(const _0x245b8f of _0x6c4c34){if(!_0x245b8f[_0x403dad(0xc2)]())continue;const _0x5cfc30=_0x245b8f[_0x403dad(0xe8)],_0x3eb8f4=join(_0x11e170,_0x5cfc30),_0x5182f2=await readdir(_0x3eb8f4,{'withFileTypes':!![]});for(const _0x2ad112 of _0x5182f2){if(!_0x2ad112[_0x403dad(0xea)]()||!_0x2ad112['name'][_0x403dad(0xd3)]('.js'))continue;const _0x542d88=_0x2ad112[_0x403dad(0xe8)][_0x403dad(0xc9)](/\.js$/,'');_0x300e36[_0x403dad(0xc4)]({'type':_0x403dad(0xeb),'name':_0x542d88,'filePath':join(_0x3eb8f4,_0x2ad112[_0x403dad(0xe8)]),'lockKey':_0x403dad(0xdd)+_0x4300b5+'/'+_0x3b51b6+'/'+_0x5cfc30+'/'+_0x542d88,'alias':_0x4300b5,'operationType':_0x3b51b6,'functionNode':_0x5cfc30});}}}}}catch(_0x5d5f46){if(_0x5d5f46['code']!==_0x403dad(0xcd))throw _0x5d5f46;}return _0x300e36;}function a290_0x18e8(_0x3943a9,_0x1e06f3){_0x3943a9=_0x3943a9-0xc0;const _0x212ab6=a290_0x212a();let _0x18e8e9=_0x212ab6[_0x3943a9];return _0x18e8e9;}export async function scanLocalBffFunctions(_0x35ad58,_0x29d466){const _0x1e1229=a290_0x1afc08;if(_0x29d466==='COMMON'||_0x29d466==='ENDPOINT')return scanFlatFunctions(_0x35ad58,_0x29d466);if(_0x29d466===_0x1e1229(0xeb))return scanHookFunctions(_0x35ad58);const [_0x57d2d2,_0x36ca3a,_0x2bf557]=await Promise[_0x1e1229(0xe6)]([scanFlatFunctions(_0x35ad58,_0x1e1229(0xdb)),scanFlatFunctions(_0x35ad58,_0x1e1229(0xcf)),scanHookFunctions(_0x35ad58)]);return[..._0x57d2d2,..._0x36ca3a,..._0x2bf557];}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x4e2aae){return SAFE_LOCK_KEY_SEGMENT['test'](_0x4e2aae)&&_0x4e2aae!=='.'&&_0x4e2aae!=='..';}export function resolveLocalFilePathFromLockKey(_0x15c53a,_0x29465a){const _0x1bc63a=a290_0x1afc08,_0x4f6de6=_0x29465a[_0x1bc63a(0xd6)]('/');if(!_0x4f6de6[_0x1bc63a(0xd5)](isSafeLockKeySegment))throw new Error(_0x1bc63a(0xd9)+_0x29465a);const _0x5560de=resolve(join(_0x15c53a['scriptsRootDir'],..._0x4f6de6)+_0x1bc63a(0xca)),_0x338e59=resolve(_0x15c53a[_0x1bc63a(0xde)]);if(_0x5560de!==_0x338e59&&!_0x5560de[_0x1bc63a(0xe1)](_0x338e59+sep))throw new Error('Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20'+_0x5560de);return _0x5560de;}export function createHookLocationMap(_0x29b04d){const _0x3a7c79=a290_0x1afc08,_0x134098=new Map();for(const _0x38eb97 of _0x29b04d){_0x38eb97['beforeScriptId']&&_0x134098['set'](_0x38eb97[_0x3a7c79(0xe7)],{'datasetCode':_0x38eb97[_0x3a7c79(0xc6)],'operationType':snakeToCamel(_0x38eb97[_0x3a7c79(0xc3)]),'functionNode':_0x3a7c79(0xc0)}),_0x38eb97[_0x3a7c79(0xc7)]&&_0x134098[_0x3a7c79(0xe0)](_0x38eb97[_0x3a7c79(0xc7)],{'datasetCode':_0x38eb97[_0x3a7c79(0xc6)],'operationType':snakeToCamel(_0x38eb97[_0x3a7c79(0xc3)]),'functionNode':'after'});}return _0x134098;}export function resolveRemoteScriptTarget(_0x286fe2,_0x4dc7c0,_0x2af83f,_0x1b0b9a,_0x3a9d66){const _0x44249f=a290_0x1afc08,_0x2e827e=normalizeBffType(_0x4dc7c0[_0x44249f(0xd8)]);if(!_0x2e827e||!_0x4dc7c0[_0x44249f(0xe9)])return null;if(_0x2e827e===_0x44249f(0xeb)){const _0x469b3f=_0x4dc7c0['id']?_0x2af83f[_0x44249f(0xce)](_0x4dc7c0['id']):undefined,_0x49c68c=findHookLocationByRemoteId(_0x1b0b9a,_0x4dc7c0['id']),_0x10578e=_0x469b3f?{..._0x49c68c?.[_0x44249f(0xc6)]===_0x469b3f[_0x44249f(0xc6)]?_0x49c68c:{},..._0x469b3f}:_0x49c68c;if(!_0x10578e)return null;const _0x1411e6=_0x3a9d66[_0x44249f(0xce)](_0x10578e[_0x44249f(0xc6)]['toLowerCase']()),_0x207c2b=_0x1411e6??_0x10578e[_0x44249f(0xc6)],_0x48db12={..._0x10578e,'alias':_0x1411e6},_0x2afccb=_0x44249f(0xdd)+_0x207c2b+'/'+_0x48db12['operationType']+'/'+_0x48db12[_0x44249f(0xc5)]+'/'+_0x4dc7c0[_0x44249f(0xe9)];if(!_0x2afccb[_0x44249f(0xd6)]('/')[_0x44249f(0xd5)](isSafeLockKeySegment))return null;return{'lockKey':_0x2afccb,'filePath':resolveLocalFilePathFromLockKey(_0x286fe2,_0x2afccb),'type':'HOOK','hookLocation':_0x48db12};}const _0x515bc6=_0x2e827e+'/'+_0x4dc7c0[_0x44249f(0xe9)];if(!_0x515bc6['split']('/')[_0x44249f(0xd5)](isSafeLockKeySegment))return null;return{'lockKey':_0x515bc6,'filePath':resolveLocalFilePathFromLockKey(_0x286fe2,_0x515bc6),'type':_0x2e827e};}function a290_0x212a(){const _0x194d73=['7459146yYFejJ','set','startsWith','1166389OOzGAp','596589tQnijY','8NOnvSz','trim','all','beforeScriptId','name','functionName','isFile','HOOK','before','includes','isDirectory','operationType','push','functionNode','datasetCode','afterScriptId','11LwZOhK','replace','.js','6aWqkGG','8reMEqe','ENOENT','get','ENDPOINT','map','212eAcIEQ','3702IwBgiV','endsWith','4709748rJBLAt','every','split','10639640sTdsrs','scriptType','Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20','2167515jLMEOQ','COMMON','F_OK','HOOK/','scriptsRootDir'];a290_0x212a=function(){return _0x194d73;};return a290_0x212a();}export async function ensureParentDirectory(_0x90d755){await mkdir(dirname(_0x90d755),{'recursive':!![]});}export async function fileExists(_0x3ce754){const _0x5a562=a290_0x1afc08;try{return await access(_0x3ce754,constants[_0x5a562(0xdc)]),!![];}catch{return![];}}export async function directoryExists(_0x33e2ff){const _0x5ebe95=a290_0x1afc08;try{const _0x3e88ef=await stat(_0x33e2ff);return _0x3e88ef[_0x5ebe95(0xc2)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x9596be,_0x2b3c32){const _0x53b362=a291_0xcad0,_0x378446=_0x9596be();while(!![]){try{const _0x5a053f=parseInt(_0x53b362(0x8d))/0x1*(parseInt(_0x53b362(0x8c))/0x2)+parseInt(_0x53b362(0x84))/0x3*(-parseInt(_0x53b362(0x81))/0x4)+parseInt(_0x53b362(0x8e))/0x5*(parseInt(_0x53b362(0x8a))/0x6)+-parseInt(_0x53b362(0x8b))/0x7*(-parseInt(_0x53b362(0x88))/0x8)+parseInt(_0x53b362(0x86))/0x9+parseInt(_0x53b362(0x90))/0xa*(parseInt(_0x53b362(0x82))/0xb)+-parseInt(_0x53b362(0x85))/0xc;if(_0x5a053f===_0x2b3c32)break;else _0x378446['push'](_0x378446['shift']());}catch(_0x5af7a7){_0x378446['push'](_0x378446['shift']());}}}(a291_0x266e,0xc8246));import{readFile}from'node:fs/promises';import a291_0x375245 from'node:crypto';function a291_0xcad0(_0x444740,_0x1858e2){_0x444740=_0x444740-0x81;const _0x266eaf=a291_0x266e();let _0xcad0ea=_0x266eaf[_0x444740];return _0xcad0ea;}function a291_0x266e(){const _0x3628ed=['md5','7418110fIyQnL','844980vgjqfM','22XRgNma','digest','9YNjIsx','30710268IijHMm','6729561SXXlMe','createHash','616VltKbw','utf8','6YVeVeX','25277eOqjCY','9092pdFMqi','327GkNGmY','83830lucEqF'];a291_0x266e=function(){return _0x3628ed;};return a291_0x266e();}export function computeContentHash(_0x391293){const _0x468475=a291_0xcad0;return a291_0x375245[_0x468475(0x87)](_0x468475(0x8f))['update'](_0x391293)[_0x468475(0x83)]('hex');}export async function computeFileHash(_0x1087cf){const _0x350d9f=a291_0xcad0,_0x187fa6=await readFile(_0x1087cf,_0x350d9f(0x89));return computeContentHash(_0x187fa6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4772e2,_0x23f3dd){const _0x355178=a292_0x558f,_0x28d1d9=_0x4772e2();while(!![]){try{const _0x5ac173=parseInt(_0x355178(0x212))/0x1*(-parseInt(_0x355178(0x20b))/0x2)+-parseInt(_0x355178(0x1f8))/0x3*(-parseInt(_0x355178(0x1f2))/0x4)+parseInt(_0x355178(0x222))/0x5*(parseInt(_0x355178(0x202))/0x6)+-parseInt(_0x355178(0x21d))/0x7+parseInt(_0x355178(0x217))/0x8*(-parseInt(_0x355178(0x223))/0x9)+parseInt(_0x355178(0x1f5))/0xa+parseInt(_0x355178(0x20a))/0xb;if(_0x5ac173===_0x23f3dd)break;else _0x28d1d9['push'](_0x28d1d9['shift']());}catch(_0x241e77){_0x28d1d9['push'](_0x28d1d9['shift']());}}}(a292_0x4fc8,0x9ce6d));function a292_0x4fc8(){const _0x52b2bb=['name','6096293gNJRfE','SDK\x20alias\x20\x22','\x22\x20resolves\x20to\x20multiple\x20Datasets.','HOOK_ALIAS_AMBIGUOUS','aliasToDatasetCodes','729230FWRomX','6896070eDJZhq','length','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','HOOK_DIRECTORY_AMBIGUOUS','add','entries','686824dqwTkr','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','map','4802380VImOTt','Dataset\x20\x22','NFC','3MeOIdq','Incomplete\x20HOOK\x20path:\x20','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','HOOK_DUPLICATE_DIRECTORIES','size','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','alias','HOOK\x20directory\x20\x22','HOOK_DATASET_NOT_FOUND','30slBofv','push','message','functions','includes','lockKey','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','22587972yVSJSt','898KrXSpV','HOOK_DATASET_CODE_AMBIGUOUS','HOOK','Dataset\x20code\x20\x22','HOOK_MAPPING_DRIFT','values','some','2572kEdVkQ','join','set','HOOK_DIRECTORY_UNRESOLVED','code','8bFjSPS','datasetCodeToDatasets','get','split','datasetCode'];a292_0x4fc8=function(){return _0x52b2bb;};return a292_0x4fc8();}import{CliError}from'../../errors.js';function a292_0x558f(_0x189431,_0x20cf90){_0x189431=_0x189431-0x1ed;const _0x4fc842=a292_0x4fc8();let _0x558ff0=_0x4fc842[_0x189431];return _0x558ff0;}export function trackedHookDirectoryMappings(_0x2a7e9c){const _0x57bb86=a292_0x558f,_0x2e540a=[];for(const [_0x14f50e,_0x2d1c00]of Object[_0x57bb86(0x1f1)](_0x2a7e9c[_0x57bb86(0x205)])){const [_0x531807,_0x228c38]=_0x14f50e[_0x57bb86(0x21a)]('/');if(_0x531807!==_0x57bb86(0x20d)||!_0x228c38||!_0x2d1c00[_0x57bb86(0x21b)])continue;_0x2e540a['push']({'alias':_0x228c38,'datasetCode':_0x2d1c00['datasetCode']});}return _0x2e540a;}export function uniqueTrackedHookDirectoryByDataset(_0x2e6ceb){const _0x27fb9b=a292_0x558f,_0x599923=new Map();for(const _0xc9296a of trackedHookDirectoryMappings(_0x2e6ceb)){const _0x137823=directoryIdentity(_0xc9296a[_0x27fb9b(0x21b)]),_0x525b41=_0x599923['get'](_0x137823)??new Map();_0x525b41['set'](directoryIdentity(_0xc9296a[_0x27fb9b(0x1ff)]),_0xc9296a[_0x27fb9b(0x1ff)]),_0x599923['set'](_0x137823,_0x525b41);}const _0x4b21cd=new Map();for(const [_0x1df9cd,_0x602c6d]of _0x599923){if(_0x602c6d['size']>0x1)throw hookDirectoryError(_0x27fb9b(0x1fb),_0x27fb9b(0x1f6)+_0x1df9cd+_0x27fb9b(0x1fa)+[..._0x602c6d[_0x27fb9b(0x210)]()]['join'](',\x20')+'.',{'datasetCode':_0x1df9cd,'directories':[..._0x602c6d[_0x27fb9b(0x210)]()]});_0x4b21cd['set'](_0x1df9cd,[..._0x602c6d[_0x27fb9b(0x210)]()][0x0]);}return _0x4b21cd;}export function assertUnambiguousHookDirectoryMappings(_0x119d20){const _0x254b07=a292_0x558f,_0x15ac53=new Map();for(const {alias:_0x5897b8,datasetCode:_0x1992e5}of _0x119d20){const _0x5c9ae2=directoryIdentity(_0x5897b8),_0xfd2bc2=_0x15ac53[_0x254b07(0x219)](_0x5c9ae2)??new Set();_0xfd2bc2[_0x254b07(0x1f0)](_0x1992e5),_0x15ac53[_0x254b07(0x214)](_0x5c9ae2,_0xfd2bc2);}for(const [_0x2be03b,_0x511e70]of _0x15ac53){if(_0x511e70['size']>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS',_0x254b07(0x200)+_0x2be03b+_0x254b07(0x21f),{'directoryName':_0x2be03b,'datasetCodes':[..._0x511e70]});}}export function assertUnambiguousHookAliases(_0x32749a){const _0x4789a8=a292_0x558f,_0x593081=[..._0x32749a],_0x233b2e=new Map(),_0x5dd516=new Map();for(const {alias:_0x1d253e,datasetCode:_0x189aff}of _0x593081){const _0x2b014a=directoryIdentity(_0x1d253e),_0x5d9edb=directoryIdentity(_0x189aff),_0x7f35a3=_0x233b2e[_0x4789a8(0x219)](_0x2b014a)??new Set();_0x7f35a3['add'](_0x189aff),_0x233b2e[_0x4789a8(0x214)](_0x2b014a,_0x7f35a3);const _0x4ba6d3=_0x5dd516['get'](_0x5d9edb)??new Set();_0x4ba6d3[_0x4789a8(0x1f0)](_0x1d253e),_0x5dd516[_0x4789a8(0x214)](_0x5d9edb,_0x4ba6d3);}for(const [_0x14238e,_0x255b02]of _0x233b2e){if(_0x255b02['size']>0x1)throw hookDirectoryError(_0x4789a8(0x220),_0x4789a8(0x21e)+_0x14238e+_0x4789a8(0x21f),{'alias':_0x14238e,'datasetCodes':[..._0x255b02]});}for(const [_0x269544,_0x539d09]of _0x5dd516){if(_0x539d09[_0x4789a8(0x1fc)]>0x1)throw hookDirectoryError(_0x4789a8(0x220),_0x4789a8(0x1f6)+_0x269544+_0x4789a8(0x1fd),{'datasetCode':_0x269544,'aliases':[..._0x539d09]});}}export function buildHookDirectoryIndexes(_0x10425a,_0x331904=[]){const _0x1d69fd=a292_0x558f,_0x41584e=[..._0x331904];assertUnambiguousHookDirectoryMappings(_0x41584e[_0x1d69fd(0x1f4)](([_0x49056d,_0x45ddc4])=>({'alias':_0x49056d,'datasetCode':_0x45ddc4})));const _0x523559=new Map(),_0x5467d2=new Map();for(const _0x1cd6f3 of _0x10425a){appendUnique(_0x523559,directoryIdentity(_0x1cd6f3['code']),_0x1cd6f3,_0x5dcb27=>_0x5dcb27[_0x1d69fd(0x216)]);}for(const [_0x45e510,_0x5a62fa]of _0x41584e){appendUnique(_0x5467d2,directoryIdentity(_0x45e510),_0x5a62fa,_0x1adfcf=>_0x1adfcf);}return{'datasetCodeToDatasets':_0x523559,'aliasToDatasetCodes':_0x5467d2};}export function resolvePushHookDirectory(_0x5e21a8,_0x45f770,_0x354636){const _0xbb0d2e=a292_0x558f,_0xf0a996=directoryIdentity(_0x5e21a8),_0x827a25=_0x354636['datasetCodeToDatasets']['get'](_0xf0a996)??[],_0x4d9534=_0x354636[_0xbb0d2e(0x221)][_0xbb0d2e(0x219)](_0xf0a996)??[],_0x39eb8c=new Set([..._0x827a25[_0xbb0d2e(0x1f4)](_0x48b9de=>_0x48b9de[_0xbb0d2e(0x216)]),..._0x4d9534]);if(_0x39eb8c[_0xbb0d2e(0x1fc)]>0x1)throw hookDirectoryError(_0xbb0d2e(0x1ef),_0xbb0d2e(0x200)+_0x5e21a8+_0xbb0d2e(0x208),{'directoryName':_0x5e21a8,'datasetCodes':[..._0x39eb8c]});const _0x23cc73=[..._0x39eb8c][0x0];if(_0x23cc73&&_0x45f770?.['datasetCode']&&_0x23cc73!==_0x45f770[_0xbb0d2e(0x21b)])throw hookDirectoryError(_0xbb0d2e(0x20f),_0xbb0d2e(0x200)+_0x5e21a8+_0xbb0d2e(0x1f3)+_0x45f770['datasetCode']+'\x22\x20to\x20\x22'+_0x23cc73+'\x22.',{'directoryName':_0x5e21a8,'datasetCode':_0x23cc73,'lockedDatasetCode':_0x45f770['datasetCode']});const _0x3cc854=_0x23cc73?findDatasetByCode(_0x354636,_0x23cc73):undefined,_0x56b433=!!_0x23cc73&&_0x4d9534[_0xbb0d2e(0x206)](_0x23cc73);if(_0x3cc854)return{'dataset':_0x3cc854,'datasetCode':_0x3cc854['code'],..._0x56b433?{'alias':_0x5e21a8}:{},'directoryProtocol':_0x56b433?_0xbb0d2e(0x1ff):_0xbb0d2e(0x21b),'warnings':[]};const _0x1d2ae0=_0x45f770?.['datasetCode'];if(_0x1d2ae0){const _0x121991=findDatasetByCode(_0x354636,_0x1d2ae0);if(_0x121991)return{'dataset':_0x121991,'datasetCode':_0x121991[_0xbb0d2e(0x216)],..._0x45f770[_0xbb0d2e(0x1ff)]?{'alias':_0x45f770[_0xbb0d2e(0x1ff)]}:{},'directoryProtocol':_0x45f770[_0xbb0d2e(0x1ff)]?_0xbb0d2e(0x1ff):_0xbb0d2e(0x21b),'warnings':[]};}if(_0x23cc73||_0x1d2ae0){const _0x3fb8b2=_0x23cc73??_0x1d2ae0;throw hookDirectoryError('HOOK_DATASET_NOT_FOUND',_0xbb0d2e(0x200)+_0x5e21a8+_0xbb0d2e(0x209),{'directoryName':_0x5e21a8,'datasetCode':_0x3fb8b2});}throw hookDirectoryError('HOOK_DIRECTORY_UNRESOLVED',_0xbb0d2e(0x1ee)+_0x5e21a8+'\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.',{'directoryName':_0x5e21a8});}export function preflightPushHookDirectories(_0x83342e,_0x46e711,_0x2dc009,_0x5c7e16){const _0x5b295e=a292_0x558f,_0xa9b12=new Map(),_0x36e5a1=new Map();for(const _0x4c7f7e of _0x83342e){if(_0x4c7f7e['type']!==_0x5b295e(0x20d))continue;const _0x4b9a69=_0x4c7f7e['alias'];if(!_0x4b9a69)throw hookDirectoryError(_0x5b295e(0x215),_0x5b295e(0x1f9)+_0x4c7f7e['lockKey'],{'lockKey':_0x4c7f7e[_0x5b295e(0x207)]});let _0x3564c8;try{_0x3564c8=resolvePushHookDirectory(_0x4b9a69,_0x46e711[_0x5b295e(0x205)][_0x4c7f7e[_0x5b295e(0x207)]],_0x2dc009);}catch(_0x24da12){if(_0x5c7e16&&_0x24da12 instanceof CliError&&[_0x5b295e(0x201),_0x5b295e(0x215)]['includes'](_0x24da12[_0x5b295e(0x216)])){_0x5c7e16[_0x5b295e(0x214)](_0x4c7f7e[_0x5b295e(0x207)],_0x24da12[_0x5b295e(0x204)]);continue;}throw _0x24da12;}_0xa9b12[_0x5b295e(0x214)](_0x4c7f7e['lockKey'],_0x3564c8);const _0x12ad15=_0x36e5a1[_0x5b295e(0x219)](_0x3564c8[_0x5b295e(0x21b)])??new Set();_0x12ad15[_0x5b295e(0x1f0)](_0x4b9a69),_0x36e5a1[_0x5b295e(0x214)](_0x3564c8['datasetCode'],_0x12ad15);}for(const [_0x43534b,_0x4f1ece]of _0x36e5a1){if(_0x4f1ece[_0x5b295e(0x1fc)]>0x1)throw hookDirectoryError(_0x5b295e(0x1fb),'Dataset\x20\x22'+_0x43534b+_0x5b295e(0x1fe)+[..._0x4f1ece][_0x5b295e(0x213)](',\x20')+'.',{'datasetCode':_0x43534b,'directories':[..._0x4f1ece]});}return _0xa9b12;}export function hookDirectoryError(_0x5693d5,_0x3bc646,_0x170593){const _0x16329d=new CliError(_0x5693d5,0x2,_0x5693d5+':\x20'+_0x3bc646);return _0x16329d['details']=_0x170593,_0x16329d;}function findDatasetByCode(_0x2e183a,_0x4e2234){const _0x383cc3=a292_0x558f,_0x51bed7=_0x2e183a[_0x383cc3(0x218)][_0x383cc3(0x219)](directoryIdentity(_0x4e2234))??[];if(_0x51bed7[_0x383cc3(0x1ed)]>0x1)throw hookDirectoryError(_0x383cc3(0x20c),_0x383cc3(0x20e)+_0x4e2234+'\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.',{'datasetCode':_0x4e2234,'candidates':_0x51bed7[_0x383cc3(0x1f4)](datasetFact)});return _0x51bed7[0x0];}function directoryIdentity(_0x81dadd){const _0x502d8=a292_0x558f;return _0x81dadd['normalize'](_0x502d8(0x1f7))['toLowerCase']();}function appendUnique(_0x496e1e,_0x6332eb,_0x1ce0af,_0x430ef2){const _0x11a3be=a292_0x558f,_0x2cb68a=_0x496e1e[_0x11a3be(0x219)](_0x6332eb)??[];!_0x2cb68a[_0x11a3be(0x211)](_0x1df70b=>_0x430ef2(_0x1df70b)===_0x430ef2(_0x1ce0af))&&_0x2cb68a[_0x11a3be(0x203)](_0x1ce0af),_0x496e1e[_0x11a3be(0x214)](_0x6332eb,_0x2cb68a);}function datasetFact(_0x26ce26){const _0x49ffb8=a292_0x558f;return{'id':_0x26ce26['id'],'name':_0x26ce26[_0x49ffb8(0x21c)],'datasetCode':_0x26ce26[_0x49ffb8(0x216)]};}
|
|
1
|
+
(function(_0x566874,_0x4fbc82){const _0x58126b=a292_0x42f4,_0x3c8099=_0x566874();while(!![]){try{const _0x53084b=-parseInt(_0x58126b(0x189))/0x1*(-parseInt(_0x58126b(0x199))/0x2)+parseInt(_0x58126b(0x173))/0x3+-parseInt(_0x58126b(0x180))/0x4*(parseInt(_0x58126b(0x17d))/0x5)+-parseInt(_0x58126b(0x194))/0x6+-parseInt(_0x58126b(0x184))/0x7*(-parseInt(_0x58126b(0x1a3))/0x8)+parseInt(_0x58126b(0x182))/0x9*(-parseInt(_0x58126b(0x18a))/0xa)+parseInt(_0x58126b(0x19c))/0xb;if(_0x53084b===_0x4fbc82)break;else _0x3c8099['push'](_0x3c8099['shift']());}catch(_0x40b10a){_0x3c8099['push'](_0x3c8099['shift']());}}}(a292_0x262c,0x3ab59));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x1e5607){const _0x5f5bc0=a292_0x42f4,_0x17d749=[];for(const [_0x25d707,_0x28b6be]of Object[_0x5f5bc0(0x174)](_0x1e5607[_0x5f5bc0(0x188)])){const [_0x239155,_0x369be0]=_0x25d707[_0x5f5bc0(0x186)]('/');if(_0x239155!==_0x5f5bc0(0x183)||!_0x369be0||!_0x28b6be[_0x5f5bc0(0x17f)])continue;_0x17d749[_0x5f5bc0(0x171)]({'alias':_0x369be0,'datasetCode':_0x28b6be[_0x5f5bc0(0x17f)]});}return _0x17d749;}export function uniqueTrackedHookDirectoryByDataset(_0x4ac490){const _0xb599e1=a292_0x42f4,_0x135fb3=new Map();for(const _0x58ee3f of trackedHookDirectoryMappings(_0x4ac490)){const _0x589064=directoryIdentity(_0x58ee3f[_0xb599e1(0x17f)]),_0xfde3a4=_0x135fb3[_0xb599e1(0x17c)](_0x589064)??new Map();_0xfde3a4[_0xb599e1(0x178)](directoryIdentity(_0x58ee3f[_0xb599e1(0x190)]),_0x58ee3f['alias']),_0x135fb3['set'](_0x589064,_0xfde3a4);}const _0x1770b7=new Map();for(const [_0x1798b1,_0x86f1d6]of _0x135fb3){if(_0x86f1d6[_0xb599e1(0x193)]>0x1)throw hookDirectoryError(_0xb599e1(0x179),_0xb599e1(0x192)+_0x1798b1+'\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20'+[..._0x86f1d6[_0xb599e1(0x175)]()][_0xb599e1(0x172)](',\x20')+'.',{'datasetCode':_0x1798b1,'directories':[..._0x86f1d6['values']()]});_0x1770b7[_0xb599e1(0x178)](_0x1798b1,[..._0x86f1d6[_0xb599e1(0x175)]()][0x0]);}return _0x1770b7;}export function assertUnambiguousHookDirectoryMappings(_0x3d4bc3){const _0x3f3e37=a292_0x42f4,_0x44e363=new Map();for(const {alias:_0x2e8c2a,datasetCode:_0x27f679}of _0x3d4bc3){const _0x44a31b=directoryIdentity(_0x2e8c2a),_0x19f885=_0x44e363[_0x3f3e37(0x17c)](_0x44a31b)??new Set();_0x19f885[_0x3f3e37(0x19f)](_0x27f679),_0x44e363[_0x3f3e37(0x178)](_0x44a31b,_0x19f885);}for(const [_0x196a63,_0x6dd3b6]of _0x44e363){if(_0x6dd3b6[_0x3f3e37(0x193)]>0x1)throw hookDirectoryError(_0x3f3e37(0x17b),'HOOK\x20directory\x20\x22'+_0x196a63+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'directoryName':_0x196a63,'datasetCodes':[..._0x6dd3b6]});}}export function assertUnambiguousHookAliases(_0x32159d){const _0x375afa=a292_0x42f4,_0x483d78=[..._0x32159d],_0x28d9a1=new Map(),_0x51521c=new Map();for(const {alias:_0x545e72,datasetCode:_0x1180df}of _0x483d78){const _0x43cc40=directoryIdentity(_0x545e72),_0x1c1f42=directoryIdentity(_0x1180df),_0x1de198=_0x28d9a1[_0x375afa(0x17c)](_0x43cc40)??new Set();_0x1de198[_0x375afa(0x19f)](_0x1180df),_0x28d9a1[_0x375afa(0x178)](_0x43cc40,_0x1de198);const _0x46e24=_0x51521c[_0x375afa(0x17c)](_0x1c1f42)??new Set();_0x46e24['add'](_0x545e72),_0x51521c[_0x375afa(0x178)](_0x1c1f42,_0x46e24);}for(const [_0xe877ee,_0x5a7ab2]of _0x28d9a1){if(_0x5a7ab2['size']>0x1)throw hookDirectoryError(_0x375afa(0x198),_0x375afa(0x181)+_0xe877ee+_0x375afa(0x1a0),{'alias':_0xe877ee,'datasetCodes':[..._0x5a7ab2]});}for(const [_0x54f4a7,_0x28ff94]of _0x51521c){if(_0x28ff94[_0x375afa(0x193)]>0x1)throw hookDirectoryError(_0x375afa(0x198),_0x375afa(0x192)+_0x54f4a7+_0x375afa(0x18f),{'datasetCode':_0x54f4a7,'aliases':[..._0x28ff94]});}}export function buildHookDirectoryIndexes(_0xe49475,_0x56d6cd=[]){const _0x342cc4=a292_0x42f4,_0x22bd3f=[..._0x56d6cd];assertUnambiguousHookDirectoryMappings(_0x22bd3f[_0x342cc4(0x17e)](([_0xdef2d2,_0x43fa8b])=>({'alias':_0xdef2d2,'datasetCode':_0x43fa8b})));const _0x4255e3=new Map(),_0x3a38c8=new Map();for(const _0x3a96fa of _0xe49475){appendUnique(_0x4255e3,directoryIdentity(_0x3a96fa[_0x342cc4(0x1a2)]),_0x3a96fa,_0x5cd120=>_0x5cd120[_0x342cc4(0x1a2)]);}for(const [_0x3e9f6c,_0x46c59d]of _0x22bd3f){appendUnique(_0x3a38c8,directoryIdentity(_0x3e9f6c),_0x46c59d,_0x426f79=>_0x426f79);}return{'datasetCodeToDatasets':_0x4255e3,'aliasToDatasetCodes':_0x3a38c8};}export function resolvePushHookDirectory(_0x5e6492,_0x151090,_0x515347){const _0x362034=a292_0x42f4,_0x508007=directoryIdentity(_0x5e6492),_0x4b422e=_0x515347[_0x362034(0x17a)][_0x362034(0x17c)](_0x508007)??[],_0x2a74b=_0x515347['aliasToDatasetCodes']['get'](_0x508007)??[],_0x51b35a=new Set([..._0x4b422e[_0x362034(0x17e)](_0x4610b3=>_0x4610b3[_0x362034(0x1a2)]),..._0x2a74b]);if(_0x51b35a[_0x362034(0x193)]>0x1)throw hookDirectoryError(_0x362034(0x17b),_0x362034(0x18e)+_0x5e6492+'\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.',{'directoryName':_0x5e6492,'datasetCodes':[..._0x51b35a]});const _0x2775c0=[..._0x51b35a][0x0];if(_0x2775c0&&_0x151090?.[_0x362034(0x17f)]&&_0x2775c0!==_0x151090['datasetCode'])throw hookDirectoryError(_0x362034(0x185),_0x362034(0x18e)+_0x5e6492+'\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22'+_0x151090[_0x362034(0x17f)]+'\x22\x20to\x20\x22'+_0x2775c0+'\x22.',{'directoryName':_0x5e6492,'datasetCode':_0x2775c0,'lockedDatasetCode':_0x151090[_0x362034(0x17f)]});const _0xe1daa2=_0x2775c0?findDatasetByCode(_0x515347,_0x2775c0):undefined,_0x259c8a=!!_0x2775c0&&_0x2a74b[_0x362034(0x19d)](_0x2775c0);if(_0xe1daa2)return{'dataset':_0xe1daa2,'datasetCode':_0xe1daa2[_0x362034(0x1a2)],..._0x259c8a?{'alias':_0x5e6492}:{},'directoryProtocol':_0x259c8a?'alias':_0x362034(0x17f),'warnings':[]};const _0xd34676=_0x151090?.[_0x362034(0x17f)];if(_0xd34676){const _0x17f204=findDatasetByCode(_0x515347,_0xd34676);if(_0x17f204)return{'dataset':_0x17f204,'datasetCode':_0x17f204['code'],..._0x151090[_0x362034(0x190)]?{'alias':_0x151090[_0x362034(0x190)]}:{},'directoryProtocol':_0x151090['alias']?_0x362034(0x190):_0x362034(0x17f),'warnings':[]};}if(_0x2775c0||_0xd34676){const _0x1b0202=_0x2775c0??_0xd34676;throw hookDirectoryError('HOOK_DATASET_NOT_FOUND','HOOK\x20directory\x20\x22'+_0x5e6492+_0x362034(0x177),{'directoryName':_0x5e6492,'datasetCode':_0x1b0202});}throw hookDirectoryError(_0x362034(0x19a),_0x362034(0x195)+_0x5e6492+_0x362034(0x1a1),{'directoryName':_0x5e6492});}export function preflightPushHookDirectories(_0x30b9b1,_0x4e575a,_0x3ab7e1,_0x4db387){const _0x247bf9=a292_0x42f4,_0x263a3d=new Map(),_0x59d401=new Map();for(const _0x5783b8 of _0x30b9b1){if(_0x5783b8[_0x247bf9(0x18c)]!=='HOOK')continue;const _0x4949ea=_0x5783b8['alias'];if(!_0x4949ea)throw hookDirectoryError('HOOK_DIRECTORY_UNRESOLVED',_0x247bf9(0x197)+_0x5783b8[_0x247bf9(0x18b)],{'lockKey':_0x5783b8['lockKey']});let _0x626b1c;try{_0x626b1c=resolvePushHookDirectory(_0x4949ea,_0x4e575a[_0x247bf9(0x188)][_0x5783b8[_0x247bf9(0x18b)]],_0x3ab7e1);}catch(_0x5a18a8){if(_0x4db387&&_0x5a18a8 instanceof CliError&&['HOOK_DATASET_NOT_FOUND',_0x247bf9(0x19a)][_0x247bf9(0x19d)](_0x5a18a8[_0x247bf9(0x1a2)])){_0x4db387[_0x247bf9(0x178)](_0x5783b8[_0x247bf9(0x18b)],_0x5a18a8[_0x247bf9(0x19e)]);continue;}throw _0x5a18a8;}_0x263a3d[_0x247bf9(0x178)](_0x5783b8[_0x247bf9(0x18b)],_0x626b1c);const _0x315753=_0x59d401[_0x247bf9(0x17c)](_0x626b1c['datasetCode'])??new Set();_0x315753[_0x247bf9(0x19f)](_0x4949ea),_0x59d401[_0x247bf9(0x178)](_0x626b1c[_0x247bf9(0x17f)],_0x315753);}for(const [_0x5777a2,_0x5a1b03]of _0x59d401){if(_0x5a1b03['size']>0x1)throw hookDirectoryError('HOOK_DUPLICATE_DIRECTORIES',_0x247bf9(0x192)+_0x5777a2+_0x247bf9(0x1a4)+[..._0x5a1b03]['join'](',\x20')+'.',{'datasetCode':_0x5777a2,'directories':[..._0x5a1b03]});}return _0x263a3d;}export function hookDirectoryError(_0x5544e1,_0x40f309,_0xf01db5){const _0x448540=a292_0x42f4,_0x41f0d5=new CliError(_0x5544e1,0x2,_0x5544e1+':\x20'+_0x40f309);return _0x41f0d5[_0x448540(0x191)]=_0xf01db5,_0x41f0d5;}function findDatasetByCode(_0x8e2809,_0x8f0a93){const _0x70cf08=a292_0x42f4,_0x585085=_0x8e2809[_0x70cf08(0x17a)][_0x70cf08(0x17c)](directoryIdentity(_0x8f0a93))??[];if(_0x585085[_0x70cf08(0x19b)]>0x1)throw hookDirectoryError('HOOK_DATASET_CODE_AMBIGUOUS',_0x70cf08(0x196)+_0x8f0a93+_0x70cf08(0x187),{'datasetCode':_0x8f0a93,'candidates':_0x585085[_0x70cf08(0x17e)](datasetFact)});return _0x585085[0x0];}function a292_0x42f4(_0x5bb169,_0x2e6f1c){_0x5bb169=_0x5bb169-0x171;const _0x262cea=a292_0x262c();let _0x42f4fa=_0x262cea[_0x5bb169];return _0x42f4fa;}function directoryIdentity(_0x2c5131){const _0x3b1f29=a292_0x42f4;return _0x2c5131['normalize'](_0x3b1f29(0x176))['toLowerCase']();}function appendUnique(_0x29fc01,_0x33308f,_0x5b3ff0,_0x3d615b){const _0xd1c1b6=a292_0x42f4,_0x1caded=_0x29fc01['get'](_0x33308f)??[];!_0x1caded[_0xd1c1b6(0x18d)](_0x2d8a50=>_0x3d615b(_0x2d8a50)===_0x3d615b(_0x5b3ff0))&&_0x1caded[_0xd1c1b6(0x171)](_0x5b3ff0),_0x29fc01['set'](_0x33308f,_0x1caded);}function a292_0x262c(){const _0x56e627=['includes','message','add','\x22\x20resolves\x20to\x20multiple\x20Datasets.','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','code','456DrRXSE','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','push','join','1423350oozBKa','entries','values','NFC','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','set','HOOK_DUPLICATE_DIRECTORIES','datasetCodeToDatasets','HOOK_DIRECTORY_AMBIGUOUS','get','10ceHOvb','map','datasetCode','874972FptHyb','SDK\x20alias\x20\x22','27sZfSnD','HOOK','17689EowQXZ','HOOK_MAPPING_DRIFT','split','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','functions','1XOPokj','549670RGRueB','lockKey','type','some','HOOK\x20directory\x20\x22','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','alias','details','Dataset\x20\x22','size','2547702miCFDw','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','Dataset\x20code\x20\x22','Incomplete\x20HOOK\x20path:\x20','HOOK_ALIAS_AMBIGUOUS','921738sJZaEy','HOOK_DIRECTORY_UNRESOLVED','length','2069309rMrhgq'];a292_0x262c=function(){return _0x56e627;};return a292_0x262c();}function datasetFact(_0x5de3bb){const _0x5c28f9=a292_0x42f4;return{'id':_0x5de3bb['id'],'name':_0x5de3bb['name'],'datasetCode':_0x5de3bb[_0x5c28f9(0x1a2)]};}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x289c17,_0x58605b){const _0x4c88d4=a293_0x1a49,_0x5a61c3=_0x289c17();while(!![]){try{const _0x3c7f2a=-parseInt(_0x4c88d4(0x154))/0x1+parseInt(_0x4c88d4(0x151))/0x2*(parseInt(_0x4c88d4(0x14b))/0x3)+-parseInt(_0x4c88d4(0x15e))/0x4*(-parseInt(_0x4c88d4(0x159))/0x5)+-parseInt(_0x4c88d4(0x14a))/0x6+-parseInt(_0x4c88d4(0x14f))/0x7*(-parseInt(_0x4c88d4(0x15f))/0x8)+-parseInt(_0x4c88d4(0x15c))/0x9*(parseInt(_0x4c88d4(0x15a))/0xa)+-parseInt(_0x4c88d4(0x158))/0xb*(parseInt(_0x4c88d4(0x15b))/0xc);if(_0x3c7f2a===_0x58605b)break;else _0x5a61c3['push'](_0x5a61c3['shift']());}catch(_0x586302){_0x5a61c3['push'](_0x5a61c3['shift']());}}}(a293_0x1a0f,0x4910e));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}function a293_0x1a0f(){const _0x1318f6=['824uwVSeG','object','668172kXXpMi','266151MpJmGN','stringify','current\x20\x22','scriptsRoot','35070iMXpzZ','apps','4VsOkzp','functions','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','242104NZFjel','code','\x22\x20vs\x20lock\x20\x22',':\x20scriptsRoot\x20mismatch\x20—\x20','81290iOJaSN','2695895kcMJXy','2030090SgbjPV','612WkbfSY','9nStHFU','parse','4spysbR'];a293_0x1a0f=function(){return _0x1318f6;};return a293_0x1a0f();}function a293_0x1a49(_0x49a092,_0x559259){_0x49a092=_0x49a092-0x14a;const _0x1a0f08=a293_0x1a0f();let _0x1a49e9=_0x1a0f08[_0x49a092];return _0x1a49e9;}export function ensureLockScope(_0x210a5e,_0x2a268f,_0x1e70f5,_0x25998d){const _0x47a82a=a293_0x1a49,_0x2d95d8={'apps':_0x210a5e['apps']&&typeof _0x210a5e[_0x47a82a(0x150)]==='object'?_0x210a5e[_0x47a82a(0x150)]:{}};let _0x11089b=_0x2d95d8['apps'][_0x2a268f];if(!_0x11089b)return _0x11089b={'scriptsRoot':_0x1e70f5,'lastSync':'','functions':{}},_0x2d95d8[_0x47a82a(0x150)][_0x2a268f]=_0x11089b,{'lockData':_0x2d95d8,'appLock':_0x11089b};if(!_0x11089b[_0x47a82a(0x14e)])_0x11089b[_0x47a82a(0x14e)]=_0x1e70f5;else{if(_0x11089b[_0x47a82a(0x14e)]!==_0x1e70f5)throw new Error(_0x25998d+_0x47a82a(0x157)+(_0x47a82a(0x14d)+_0x1e70f5+_0x47a82a(0x156)+_0x11089b[_0x47a82a(0x14e)]+'\x22.\x20')+_0x47a82a(0x153));}return!_0x11089b['functions']&&(_0x11089b[_0x47a82a(0x152)]={}),!_0x11089b['lastSync']&&(_0x11089b['lastSync']=''),{'lockData':_0x2d95d8,'appLock':_0x11089b};}export async function readBffLockFile(_0x5e81c1){const _0x15af13=a293_0x1a49;try{const _0x13a80c=await readFile(_0x5e81c1,'utf8'),_0x3bbee8=JSON[_0x15af13(0x15d)](_0x13a80c);return{'apps':_0x3bbee8['apps']&&typeof _0x3bbee8[_0x15af13(0x150)]===_0x15af13(0x160)?_0x3bbee8[_0x15af13(0x150)]:{}};}catch(_0x3b0ffb){if(_0x3b0ffb[_0x15af13(0x155)]==='ENOENT')return null;throw new Error('Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20'+String(_0x3b0ffb));}}export async function writeBffLockFile(_0x464da9,_0x53ac46){const _0x3ffa2c=a293_0x1a49;await mkdir(dirname(_0x464da9),{'recursive':!![]}),await writeFile(_0x464da9,JSON[_0x3ffa2c(0x14c)](_0x53ac46,null,0x2),'utf8');}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a295_0x18cb(_0x485dc1,_0x16546d){_0x485dc1=_0x485dc1-0x1ad;const _0x1bd251=a295_0x1bd2();let _0x18cbd5=_0x1bd251[_0x485dc1];return _0x18cbd5;}const a295_0x9fb9c5=a295_0x18cb;function a295_0x1bd2(){const _0x44d669=['2454711nzxNaO','16pPaTWe','trim','813953DBWdyC','replace','before','30ZeRTeN','datasetCode','109baLObZ','split','22617573PpuPoo','6784JpQpfo','alias','some','TODO:\x20add\x20script\x20description','3766779aCfMlw','remoteId','match','2470FsXZEz','6332850qRIHqD','15118VmYaSj','operationType','toLowerCase','test','startsWith'];a295_0x1bd2=function(){return _0x44d669;};return a295_0x1bd2();}(function(_0x2b43d2,_0x499b9b){const _0x42d496=a295_0x18cb,_0x383c7a=_0x2b43d2();while(!![]){try{const _0x5309ae=-parseInt(_0x42d496(0x1c0))/0x1*(parseInt(_0x42d496(0x1b3))/0x2)+-parseInt(_0x42d496(0x1b8))/0x3+-parseInt(_0x42d496(0x1c3))/0x4*(parseInt(_0x42d496(0x1b1))/0x5)+-parseInt(_0x42d496(0x1be))/0x6*(parseInt(_0x42d496(0x1bb))/0x7)+parseInt(_0x42d496(0x1b9))/0x8*(parseInt(_0x42d496(0x1ae))/0x9)+parseInt(_0x42d496(0x1b2))/0xa+parseInt(_0x42d496(0x1c2))/0xb;if(_0x5309ae===_0x499b9b)break;else _0x383c7a['push'](_0x383c7a['shift']());}catch(_0x4a67b2){_0x383c7a['push'](_0x383c7a['shift']());}}}(a295_0x1bd2,0x718cf));export const DEFAULT_BFF_SCRIPT_DESCRIPTION='TODO:\x20补充脚本功能描述';const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x9fb9c5(0x1ad);export function snakeToCamel(_0x1ac4f7){const _0x2039ab=a295_0x9fb9c5;return _0x1ac4f7[_0x2039ab(0x1b5)]()[_0x2039ab(0x1bc)](/_([a-z])/g,(_0xb03d6a,_0x1dd7ed)=>_0x1dd7ed['toUpperCase']());}export function findHookLocationByRemoteId(_0x51a18b,_0x50cb06){const _0x381007=a295_0x9fb9c5;if(!_0x50cb06)return undefined;for(const [_0x2b92e0,_0x5816a7]of Object['entries'](_0x51a18b)){if(_0x5816a7[_0x381007(0x1af)]===_0x50cb06&&_0x5816a7[_0x381007(0x1bf)]&&_0x5816a7[_0x381007(0x1b4)]&&_0x5816a7['functionNode']){const _0xf2cb0f=_0x2b92e0[_0x381007(0x1c1)]('/')[0x1];return{'alias':_0xf2cb0f||_0x5816a7[_0x381007(0x1c4)],'datasetCode':_0x5816a7[_0x381007(0x1bf)],'operationType':_0x5816a7[_0x381007(0x1b4)],'functionNode':_0x5816a7['functionNode']};}}return undefined;}export function extractScriptDescription(_0x2e2978){const _0xd7c109=a295_0x9fb9c5,_0x5d7eb9=_0x2e2978[_0xd7c109(0x1b0)](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x5d7eb9?.[0x1])return undefined;const _0x4cfebb=_0x5d7eb9[0x1],_0x2e3898=_0x4a58da=>{const _0x46033d=_0xd7c109,_0x9c9c5e=_0x4a58da?.[_0x46033d(0x1ba)]();if(!_0x9c9c5e||_0x9c9c5e===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0x9c9c5e===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0x9c9c5e;},_0x31ee6a=_0x4cfebb[_0xd7c109(0x1b0)](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x31ee6a)return _0x2e3898(_0x31ee6a[0x1]);const _0x3bcb3b=_0x4cfebb['split'](/\r?\n/)['map'](_0x364a9d=>_0x364a9d['replace'](/^\s*\*\s?/,'')[_0xd7c109(0x1ba)]()),_0x287037=_0x3bcb3b[_0xd7c109(0x1c5)](_0x5201ed=>/^\[\s*脚本类型\s*]\s*\S+/[_0xd7c109(0x1b6)](_0x5201ed))&&_0x3bcb3b[_0xd7c109(0x1c5)](_0x1d9f79=>/^\[\s*脚本名称\s*]\s*\S+/[_0xd7c109(0x1b6)](_0x1d9f79));if(!_0x287037)return undefined;for(const _0x173c41 of _0x3bcb3b){if(!_0x173c41||_0x173c41[_0xd7c109(0x1b7)]('@')||/^\[[^\]]+]\s*/['test'](_0x173c41))continue;return _0x2e3898(_0x173c41);}return undefined;}export function isValidBffFunctionName(_0x22d729){const _0x38778c=a295_0x9fb9c5;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x38778c(0x1b6)](_0x22d729);}export function normalizeHookFunctionNode(_0x44c09e){const _0x44f72a=a295_0x9fb9c5;if(!_0x44c09e)return undefined;const _0x326cfd=_0x44c09e['trim']()[_0x44f72a(0x1b5)]();if(_0x326cfd===_0x44f72a(0x1bd)||_0x326cfd==='after')return _0x326cfd;return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a296_0x55de(){const _0x3de580=['638160SIvfwT','4311657EsjlRn','4483888tRkGlW','81LlbGhp','7726255WxYVlu','646310jHZuhJ','269142IFPCxa','/smartapi/db-analysis/cross-db/start','/smartapi/db-analysis/cross-db/status','243028gQyFQP','9CIMbxg'];a296_0x55de=function(){return _0x3de580;};return a296_0x55de();}const a296_0x124d8c=a296_0x556b;(function(_0x22ad88,_0x4835d1){const _0x4d5f15=a296_0x556b,_0x2b1919=_0x22ad88();while(!![]){try{const _0x1f345d=-parseInt(_0x4d5f15(0xca))/0x1+parseInt(_0x4d5f15(0xcb))/0x2+-parseInt(_0x4d5f15(0xc8))/0x3*(-parseInt(_0x4d5f15(0xc3))/0x4)+-parseInt(_0x4d5f15(0xc9))/0x5+parseInt(_0x4d5f15(0xc5))/0x6+parseInt(_0x4d5f15(0xc6))/0x7+-parseInt(_0x4d5f15(0xc7))/0x8*(-parseInt(_0x4d5f15(0xc4))/0x9);if(_0x1f345d===_0x4835d1)break;else _0x2b1919['push'](_0x2b1919['shift']());}catch(_0x2e6b1e){_0x2b1919['push'](_0x2b1919['shift']());}}}(a296_0x55de,0xd37c6));function a296_0x556b(_0x4037c6,_0x353387){_0x4037c6=_0x4037c6-0xc3;const _0x55de6e=a296_0x55de();let _0x556bac=_0x55de6e[_0x4037c6];return _0x556bac;}export const CROSS_DB_ANALYSIS_PATHS={'start':a296_0x124d8c(0xcc),'status':a296_0x124d8c(0xcd),'latest':'/smartapi/db-analysis/cross-db/latest-job'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a297_0x2fc1d1=a297_0x4aca;function a297_0x4aca(_0x12df16,_0x40526a){_0x12df16=_0x12df16-0x103;const _0x3ac5fd=a297_0x3ac5();let _0x4acaba=_0x3ac5fd[_0x12df16];return _0x4acaba;}(function(_0x1b4485,_0x5ac924){const _0x532f35=a297_0x4aca,_0x3608ad=_0x1b4485();while(!![]){try{const _0x453a9c=-parseInt(_0x532f35(0x10c))/0x1*(parseInt(_0x532f35(0x10f))/0x2)+parseInt(_0x532f35(0x103))/0x3*(-parseInt(_0x532f35(0x107))/0x4)+parseInt(_0x532f35(0x10b))/0x5+parseInt(_0x532f35(0x10a))/0x6+parseInt(_0x532f35(0x106))/0x7+-parseInt(_0x532f35(0x10e))/0x8*(parseInt(_0x532f35(0x10d))/0x9)+parseInt(_0x532f35(0x109))/0xa;if(_0x453a9c===_0x5ac924)break;else _0x3608ad['push'](_0x3608ad['shift']());}catch(_0x2e8436){_0x3608ad['push'](_0x3608ad['shift']());}}}(a297_0x3ac5,0x3e653));function a297_0x3ac5(){const _0x3736d5=['1701525LepBdj','104381fLSdFw','9936sbdcBt','2288CnoPkM','6dAbxGH','1191wlLTxO','/smartapi/cross-db-relation/create','/smartapi/cross-db-relation/delete','2680006wrkQZd','964IkJaeo','/smartapi/cross-db-relation/update','1765970pOyQRi','482250gVQeky'];a297_0x3ac5=function(){return _0x3736d5;};return a297_0x3ac5();}export const CROSS_DB_RELATION_PATHS={'list':'/smartapi/cross-db-relation/query','create':a297_0x2fc1d1(0x104),'update':a297_0x2fc1d1(0x108),'delete':a297_0x2fc1d1(0x105)};
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x70f797,_0x5b93ec){const _0x15f445=a298_0x5d46,_0x545384=_0x70f797();while(!![]){try{const _0x28142c=-parseInt(_0x15f445(0x178))/0x1*(-parseInt(_0x15f445(0x175))/0x2)+-parseInt(_0x15f445(0x177))/0x3+-parseInt(_0x15f445(0x174))/0x4*(-parseInt(_0x15f445(0x16d))/0x5)+parseInt(_0x15f445(0x16f))/0x6+-parseInt(_0x15f445(0x167))/0x7+parseInt(_0x15f445(0x166))/0x8+-parseInt(_0x15f445(0x164))/0x9;if(_0x28142c===_0x5b93ec)break;else _0x545384['push'](_0x545384['shift']());}catch(_0x3dd92b){_0x545384['push'](_0x545384['shift']());}}}(a298_0x5daf,0x6fb1b));function a298_0x5daf(){const _0x49121b=['dbId','No\x20database\x20matching\x20\x22','toLowerCase','get','map','join','isNaN','entries','2431170Tzidtd','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','6096184oQZNne','1461334ZjpcaT','.\x20Be\x20more\x20specific.','find','length','filter','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','5335ZOGiwc','set','3134712HZqmYU','has','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','\x22\x20matches\x20multiple\x20databases:\x20','\x22\x20under\x20app\x20\x22','136BbLpma','2018NBeZnI','dbName','2333616lolUDn','390JYGygA','db-'];a298_0x5daf=function(){return _0x49121b;};return a298_0x5daf();}import{listDatasets}from'../core/api-client.js';const cache=new Map();function a298_0x5d46(_0x2a1b60,_0x532e21){_0x2a1b60=_0x2a1b60-0x162;const _0x5daf0c=a298_0x5daf();let _0x5d467c=_0x5daf0c[_0x2a1b60];return _0x5d467c;}export async function listDatabases(_0x31e741){const _0x2f949f=a298_0x5d46;if(cache[_0x2f949f(0x170)](_0x31e741))return cache[_0x2f949f(0x17d)](_0x31e741);const _0x29da3f=await listDatasets(_0x31e741),_0x2d4bc7=new Map();for(const _0x5d0e4e of _0x29da3f){const _0x5b0774=_0x5d0e4e['dbtableConfig'];_0x5b0774?.[_0x2f949f(0x17a)]!=null&&_0x2d4bc7[_0x2f949f(0x16e)](_0x5b0774[_0x2f949f(0x17a)],_0x5b0774[_0x2f949f(0x176)]??_0x2f949f(0x179)+_0x5b0774[_0x2f949f(0x17a)]);}const _0x3bb19e=[..._0x2d4bc7[_0x2f949f(0x163)]()][_0x2f949f(0x17e)](([_0x439120,_0xf2a53c])=>({'dbId':_0x439120,'dbName':_0xf2a53c}));return cache['set'](_0x31e741,_0x3bb19e),_0x3bb19e;}export async function resolveDb(_0x3aa18e,_0x344675){const _0x25c920=a298_0x5d46,_0x35c61f=await listDatabases(_0x3aa18e);if(_0x35c61f[_0x25c920(0x16a)]===0x0)return{'resolved':[],'error':_0x25c920(0x171)+_0x3aa18e+_0x25c920(0x16c)};if(!_0x344675)return{'resolved':_0x35c61f};const _0x3cb5a8=Number(_0x344675);if(!Number[_0x25c920(0x162)](_0x3cb5a8)){const _0x679954=_0x35c61f[_0x25c920(0x169)](_0x10a6c1=>_0x10a6c1[_0x25c920(0x17a)]===_0x3cb5a8);if(_0x679954)return{'resolved':[_0x679954]};}const _0x54db46=_0x344675[_0x25c920(0x17c)](),_0x36db89=_0x35c61f[_0x25c920(0x16b)](_0x36e2a8=>_0x36e2a8['dbName'][_0x25c920(0x17c)]()['includes'](_0x54db46));if(_0x36db89['length']>0x0)return{'resolved':_0x36db89};const _0x21bd03=_0x35c61f[_0x25c920(0x17e)](_0x335720=>_0x335720[_0x25c920(0x176)]+'\x20('+_0x335720[_0x25c920(0x17a)]+')')['join'](',\x20');return{'resolved':[],'error':_0x25c920(0x17b)+_0x344675+_0x25c920(0x173)+_0x3aa18e+'\x22.\x20Available:\x20'+_0x21bd03+'.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.'};}export async function resolveOneDb(_0x1d9e17,_0x16d260){const _0x41a1de=a298_0x5d46,{resolved:_0x25dedf,error:_0x284871}=await resolveDb(_0x1d9e17,_0x16d260);if(_0x284871)return{'db':null,'error':_0x284871};if(_0x25dedf[_0x41a1de(0x16a)]===0x1)return{'db':_0x25dedf[0x0]};if(!_0x16d260){const _0x5e178d=_0x25dedf[_0x41a1de(0x17e)](_0xce0b83=>_0xce0b83[_0x41a1de(0x176)]+'\x20('+_0xce0b83['dbId']+')')[_0x41a1de(0x17f)](',\x20');return{'db':null,'error':_0x41a1de(0x165)+_0x5e178d};}const _0x13e363=_0x25dedf[_0x41a1de(0x17e)](_0x285b0b=>_0x285b0b['dbName']+'\x20('+_0x285b0b[_0x41a1de(0x17a)]+')')[_0x41a1de(0x17f)](',\x20');return{'db':null,'error':'\x22'+_0x16d260+_0x41a1de(0x172)+_0x13e363+_0x41a1de(0x168)};}export async function getDbName(_0x43eba2,_0x2c7932){const _0x26de8e=a298_0x5d46,_0x5ae527=await listDatabases(_0x43eba2);return _0x5ae527['find'](_0xd5cfb2=>_0xd5cfb2['dbId']===_0x2c7932)?.[_0x26de8e(0x176)];}
|