@lovrabet/rabetbase-cli 2.5.9-beta.1 → 2.5.10-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -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_0x13454b=a290_0x52d7;(function(_0x4dbd43,_0x106623){const _0x3fc39b=a290_0x52d7,_0x19f594=_0x4dbd43();while(!![]){try{const _0x471eab=-parseInt(_0x3fc39b(0x170))/0x1+parseInt(_0x3fc39b(0x17a))/0x2*(-parseInt(_0x3fc39b(0x160))/0x3)+-parseInt(_0x3fc39b(0x167))/0x4*(-parseInt(_0x3fc39b(0x15b))/0x5)+parseInt(_0x3fc39b(0x168))/0x6+parseInt(_0x3fc39b(0x17e))/0x7+-parseInt(_0x3fc39b(0x16b))/0x8*(parseInt(_0x3fc39b(0x173))/0x9)+parseInt(_0x3fc39b(0x159))/0xa*(parseInt(_0x3fc39b(0x164))/0xb);if(_0x471eab===_0x106623)break;else _0x19f594['push'](_0x19f594['shift']());}catch(_0x5eae51){_0x19f594['push'](_0x19f594['shift']());}}}(a290_0x3139,0xf3907));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_0x13454b(0x166),a290_0x13454b(0x175),a290_0x13454b(0x163)];export function normalizeBffType(_0x51b12c){if(!_0x51b12c)return undefined;const _0x55ebdf=_0x51b12c['trim']()['toUpperCase']();return SUPPORTED_BFF_TYPES['includes'](_0x55ebdf)?_0x55ebdf:undefined;}async function scanJsFilesRecursively(_0x5ef3e4,_0x560cc8){const _0x51aa56=a290_0x13454b,_0x3fadbc=[];try{const _0x61dba2=await readdir(_0x5ef3e4,{'withFileTypes':!![]});for(const _0x55ef71 of _0x61dba2){const _0x178692=join(_0x5ef3e4,_0x55ef71['name']);if(_0x55ef71[_0x51aa56(0x178)]())_0x3fadbc[_0x51aa56(0x176)](...await scanJsFilesRecursively(_0x178692,_0x560cc8+'/'+_0x55ef71[_0x51aa56(0x155)]));else _0x55ef71['isFile']()&&_0x55ef71['name']['endsWith'](_0x51aa56(0x15d))&&_0x3fadbc['push']({'lockKey':_0x560cc8+'/'+_0x55ef71[_0x51aa56(0x155)][_0x51aa56(0x16f)](/\.js$/,''),'filePath':_0x178692});}}catch(_0xb5ece5){if(_0xb5ece5[_0x51aa56(0x158)]!==_0x51aa56(0x179))throw _0xb5ece5;}return _0x3fadbc;}async function scanFlatFunctions(_0xc658ec,_0x54d30e){const _0x3ab7fb=a290_0x13454b,_0x3ebdf6=join(_0xc658ec[_0x3ab7fb(0x16c)],_0x54d30e),_0x30838c=await scanJsFilesRecursively(_0x3ebdf6,_0x54d30e);return _0x30838c['map'](({lockKey:_0x296ec5,filePath:_0x54627c})=>({'type':_0x54d30e,'name':_0x296ec5['split']('/')['at'](-0x1)??'','filePath':_0x54627c,'lockKey':_0x296ec5}));}async function scanHookFunctions(_0x2b631c){const _0x13019b=a290_0x13454b,_0x405de9=join(_0x2b631c[_0x13019b(0x16c)],_0x13019b(0x163)),_0x1f7aee=[];try{const _0x31e6c5=await readdir(_0x405de9,{'withFileTypes':!![]});for(const _0x43eb1e of _0x31e6c5){if(!_0x43eb1e[_0x13019b(0x178)]())continue;const _0x524589=_0x43eb1e[_0x13019b(0x155)],_0x544d6b=join(_0x405de9,_0x524589),_0x57de5f=await readdir(_0x544d6b,{'withFileTypes':!![]});for(const _0x290507 of _0x57de5f){if(!_0x290507['isDirectory']())continue;const _0x1887b6=_0x290507[_0x13019b(0x155)],_0xf653=join(_0x544d6b,_0x1887b6),_0x589a59=await readdir(_0xf653,{'withFileTypes':!![]});for(const _0x28d206 of _0x589a59){if(!_0x28d206['isDirectory']())continue;const _0x2a794a=_0x28d206[_0x13019b(0x155)],_0x17af72=join(_0xf653,_0x2a794a),_0x138b62=await readdir(_0x17af72,{'withFileTypes':!![]});for(const _0x43efcb of _0x138b62){if(!_0x43efcb[_0x13019b(0x156)]()||!_0x43efcb[_0x13019b(0x155)]['endsWith'](_0x13019b(0x15d)))continue;const _0x19ef0c=_0x43efcb['name']['replace'](/\.js$/,'');_0x1f7aee['push']({'type':_0x13019b(0x163),'name':_0x19ef0c,'filePath':join(_0x17af72,_0x43efcb['name']),'lockKey':_0x13019b(0x17b)+_0x524589+'/'+_0x1887b6+'/'+_0x2a794a+'/'+_0x19ef0c,'alias':_0x524589,'operationType':_0x1887b6,'functionNode':_0x2a794a});}}}}}catch(_0x1af787){if(_0x1af787['code']!==_0x13019b(0x179))throw _0x1af787;}return _0x1f7aee;}function a290_0x3139(){const _0x301572=['8013446kJrCKu','name','isFile','functionName','code','20DWqCBq','functionNode','2385035eYFnSE','F_OK','.js','afterScriptId','toLowerCase','1336782YgOqVP','get','datasetCode','HOOK','8967497rVnwMi','after','COMMON','8GiIxWE','6380262EJjZcs','split','set','1880QDxxsu','scriptsRootDir','all','Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20','replace','1925491ZqBACG','beforeScriptId','test','37467xbmcCg','every','ENDPOINT','push','operationType','isDirectory','ENOENT','4JQgZeN','HOOK/','startsWith','Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20'];a290_0x3139=function(){return _0x301572;};return a290_0x3139();}export async function scanLocalBffFunctions(_0x396f5d,_0x459a68){const _0x11d915=a290_0x13454b;if(_0x459a68===_0x11d915(0x166)||_0x459a68==='ENDPOINT')return scanFlatFunctions(_0x396f5d,_0x459a68);if(_0x459a68===_0x11d915(0x163))return scanHookFunctions(_0x396f5d);const [_0x6e1a45,_0x150d1a,_0x61fe0c]=await Promise[_0x11d915(0x16d)]([scanFlatFunctions(_0x396f5d,'COMMON'),scanFlatFunctions(_0x396f5d,_0x11d915(0x175)),scanHookFunctions(_0x396f5d)]);return[..._0x6e1a45,..._0x150d1a,..._0x61fe0c];}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x46ea47){const _0x478c98=a290_0x13454b;return SAFE_LOCK_KEY_SEGMENT[_0x478c98(0x172)](_0x46ea47)&&_0x46ea47!=='.'&&_0x46ea47!=='..';}export function resolveLocalFilePathFromLockKey(_0xaef1bb,_0x167339){const _0x7ecd33=a290_0x13454b,_0x5bfff1=_0x167339[_0x7ecd33(0x169)]('/');if(!_0x5bfff1[_0x7ecd33(0x174)](isSafeLockKeySegment))throw new Error(_0x7ecd33(0x17d)+_0x167339);const _0x38ba59=resolve(join(_0xaef1bb[_0x7ecd33(0x16c)],..._0x5bfff1)+'.js'),_0x2f054d=resolve(_0xaef1bb[_0x7ecd33(0x16c)]);if(_0x38ba59!==_0x2f054d&&!_0x38ba59[_0x7ecd33(0x17c)](_0x2f054d+sep))throw new Error(_0x7ecd33(0x16e)+_0x38ba59);return _0x38ba59;}export function createHookLocationMap(_0x331e19){const _0x6ec3d0=a290_0x13454b,_0x15950f=new Map();for(const _0x3bc427 of _0x331e19){_0x3bc427[_0x6ec3d0(0x171)]&&_0x15950f[_0x6ec3d0(0x16a)](_0x3bc427[_0x6ec3d0(0x171)],{'datasetCode':_0x3bc427['datasetCode'],'operationType':snakeToCamel(_0x3bc427[_0x6ec3d0(0x177)]),'functionNode':'before'}),_0x3bc427[_0x6ec3d0(0x15e)]&&_0x15950f[_0x6ec3d0(0x16a)](_0x3bc427['afterScriptId'],{'datasetCode':_0x3bc427[_0x6ec3d0(0x162)],'operationType':snakeToCamel(_0x3bc427[_0x6ec3d0(0x177)]),'functionNode':_0x6ec3d0(0x165)});}return _0x15950f;}function a290_0x52d7(_0x13e096,_0x41060b){_0x13e096=_0x13e096-0x155;const _0x313956=a290_0x3139();let _0x52d7ba=_0x313956[_0x13e096];return _0x52d7ba;}export function resolveRemoteScriptTarget(_0x597b7e,_0xc1479c,_0x510375,_0x183d18,_0x3c3c08){const _0x2b43df=a290_0x13454b,_0x1114ef=normalizeBffType(_0xc1479c['scriptType']);if(!_0x1114ef||!_0xc1479c['functionName'])return null;if(_0x1114ef===_0x2b43df(0x163)){const _0x949dba=_0xc1479c['id']?_0x510375[_0x2b43df(0x161)](_0xc1479c['id']):undefined,_0x43656a=findHookLocationByRemoteId(_0x183d18,_0xc1479c['id']),_0x2892ae=_0x949dba?{..._0x43656a?.[_0x2b43df(0x162)]===_0x949dba[_0x2b43df(0x162)]?_0x43656a:{},..._0x949dba}:_0x43656a;if(!_0x2892ae)return null;const _0x20c43d=_0x3c3c08[_0x2b43df(0x161)](_0x2892ae[_0x2b43df(0x162)][_0x2b43df(0x15f)]()),_0x4a5975=_0x20c43d??_0x2892ae['datasetCode'],_0x5db719={..._0x2892ae,'alias':_0x20c43d},_0x38c230=_0x2b43df(0x17b)+_0x4a5975+'/'+_0x5db719[_0x2b43df(0x177)]+'/'+_0x5db719[_0x2b43df(0x15a)]+'/'+_0xc1479c[_0x2b43df(0x157)];if(!_0x38c230[_0x2b43df(0x169)]('/')[_0x2b43df(0x174)](isSafeLockKeySegment))return null;return{'lockKey':_0x38c230,'filePath':resolveLocalFilePathFromLockKey(_0x597b7e,_0x38c230),'type':_0x2b43df(0x163),'hookLocation':_0x5db719};}const _0x293470=_0x1114ef+'/'+_0xc1479c[_0x2b43df(0x157)];if(!_0x293470['split']('/')[_0x2b43df(0x174)](isSafeLockKeySegment))return null;return{'lockKey':_0x293470,'filePath':resolveLocalFilePathFromLockKey(_0x597b7e,_0x293470),'type':_0x1114ef};}export async function ensureParentDirectory(_0x7e981a){await mkdir(dirname(_0x7e981a),{'recursive':!![]});}export async function fileExists(_0x56c3e3){const _0x2813=a290_0x13454b;try{return await access(_0x56c3e3,constants[_0x2813(0x15c)]),!![];}catch{return![];}}export async function directoryExists(_0x1c872b){const _0x2f65f3=a290_0x13454b;try{const _0x5ad121=await stat(_0x1c872b);return _0x5ad121[_0x2f65f3(0x178)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5d3f40,_0x233797){const _0x5780f9=a291_0x26b1,_0x419ce3=_0x5d3f40();while(!![]){try{const _0x7cfa07=parseInt(_0x5780f9(0xeb))/0x1*(parseInt(_0x5780f9(0xf6))/0x2)+parseInt(_0x5780f9(0xf1))/0x3+parseInt(_0x5780f9(0xee))/0x4+parseInt(_0x5780f9(0xe9))/0x5+parseInt(_0x5780f9(0xf0))/0x6*(parseInt(_0x5780f9(0xf7))/0x7)+-parseInt(_0x5780f9(0xf3))/0x8*(-parseInt(_0x5780f9(0xea))/0x9)+-parseInt(_0x5780f9(0xf4))/0xa;if(_0x7cfa07===_0x233797)break;else _0x419ce3['push'](_0x419ce3['shift']());}catch(_0x584a9d){_0x419ce3['push'](_0x419ce3['shift']());}}}(a291_0x3d9c,0xdd61c));import{readFile}from'node:fs/promises';function a291_0x26b1(_0x730d14,_0x30e422){_0x730d14=_0x730d14-0xe9;const _0x3d9cc7=a291_0x3d9c();let _0x26b1b2=_0x3d9cc7[_0x730d14];return _0x26b1b2;}import a291_0x159d94 from'node:crypto';function a291_0x3d9c(){const _0x37d87c=['4648aIRgBo','44411320NXQQdd','hex','1016Nojfcu','52059rTfxRB','6631890NvdvLA','9981cqpjGH','587NAjNBt','utf8','update','6050044BEdtpP','createHash','1146HyDANv','438093QzHHft','digest'];a291_0x3d9c=function(){return _0x37d87c;};return a291_0x3d9c();}export function computeContentHash(_0x33f664){const _0x5d7aa2=a291_0x26b1;return a291_0x159d94[_0x5d7aa2(0xef)]('md5')[_0x5d7aa2(0xed)](_0x33f664)[_0x5d7aa2(0xf2)](_0x5d7aa2(0xf5));}export async function computeFileHash(_0x4b021a){const _0x300f63=a291_0x26b1,_0x223f47=await readFile(_0x4b021a,_0x300f63(0xec));return computeContentHash(_0x223f47);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5e1705,_0x5caf15){const _0x160f74=a292_0x54bd,_0x367c51=_0x5e1705();while(!![]){try{const _0x53cf80=parseInt(_0x160f74(0x157))/0x1*(-parseInt(_0x160f74(0x15f))/0x2)+parseInt(_0x160f74(0x130))/0x3*(-parseInt(_0x160f74(0x14d))/0x4)+parseInt(_0x160f74(0x15c))/0x5+parseInt(_0x160f74(0x14a))/0x6+-parseInt(_0x160f74(0x131))/0x7+-parseInt(_0x160f74(0x140))/0x8+parseInt(_0x160f74(0x142))/0x9;if(_0x53cf80===_0x5caf15)break;else _0x367c51['push'](_0x367c51['shift']());}catch(_0x119385){_0x367c51['push'](_0x367c51['shift']());}}}(a292_0x5e51,0x3cfcb));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x239aa1){const _0x33bd48=a292_0x54bd,_0x5da2a6=[];for(const [_0x1e2745,_0x4b3902]of Object['entries'](_0x239aa1['functions'])){const [_0x446531,_0x5edcca]=_0x1e2745[_0x33bd48(0x143)]('/');if(_0x446531!==_0x33bd48(0x12f)||!_0x5edcca||!_0x4b3902[_0x33bd48(0x14b)])continue;_0x5da2a6[_0x33bd48(0x15d)]({'alias':_0x5edcca,'datasetCode':_0x4b3902[_0x33bd48(0x14b)]});}return _0x5da2a6;}function a292_0x5e51(){const _0x32407e=['2250801txEcOZ','split','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','includes','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','values','aliasToDatasetCodes','1971840tBDUck','datasetCode','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','4KyHpYS','Incomplete\x20HOOK\x20path:\x20','functions','HOOK_MAPPING_DRIFT','size','details','set','some','map','SDK\x20alias\x20\x22','19658XbaTVs','lockKey','toLowerCase','HOOK_DUPLICATE_DIRECTORIES','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','1595660ioePim','push','HOOK_DIRECTORY_UNRESOLVED','22pkwrIy','get','HOOK','434619FPpjRQ','1648381SHhojX','join','\x22\x20to\x20\x22','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','HOOK_DATASET_CODE_AMBIGUOUS','add','Dataset\x20code\x20\x22','HOOK_ALIAS_AMBIGUOUS','HOOK\x20directory\x20\x22','alias','datasetCodeToDatasets','length','HOOK_DIRECTORY_AMBIGUOUS','code','HOOK_DATASET_NOT_FOUND','411712OkcyLe','\x22\x20resolves\x20to\x20multiple\x20Datasets.'];a292_0x5e51=function(){return _0x32407e;};return a292_0x5e51();}export function uniqueTrackedHookDirectoryByDataset(_0x39d60a){const _0xf21e00=a292_0x54bd,_0x171632=new Map();for(const _0x485509 of trackedHookDirectoryMappings(_0x39d60a)){const _0x37291e=directoryIdentity(_0x485509['datasetCode']),_0x1bd460=_0x171632['get'](_0x37291e)??new Map();_0x1bd460[_0xf21e00(0x153)](directoryIdentity(_0x485509['alias']),_0x485509[_0xf21e00(0x13a)]),_0x171632[_0xf21e00(0x153)](_0x37291e,_0x1bd460);}const _0x2da616=new Map();for(const [_0x2b568d,_0x17417e]of _0x171632){if(_0x17417e[_0xf21e00(0x151)]>0x1)throw hookDirectoryError(_0xf21e00(0x15a),'Dataset\x20\x22'+_0x2b568d+'\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20'+[..._0x17417e[_0xf21e00(0x148)]()][_0xf21e00(0x132)](',\x20')+'.',{'datasetCode':_0x2b568d,'directories':[..._0x17417e[_0xf21e00(0x148)]()]});_0x2da616[_0xf21e00(0x153)](_0x2b568d,[..._0x17417e[_0xf21e00(0x148)]()][0x0]);}return _0x2da616;}function a292_0x54bd(_0x304c30,_0x24cbaa){_0x304c30=_0x304c30-0x12f;const _0x5e51cf=a292_0x5e51();let _0x54bdf5=_0x5e51cf[_0x304c30];return _0x54bdf5;}export function assertUnambiguousHookDirectoryMappings(_0x4658db){const _0x11cb03=a292_0x54bd,_0x195173=new Map();for(const {alias:_0x1571ea,datasetCode:_0x31ffe5}of _0x4658db){const _0x31014c=directoryIdentity(_0x1571ea),_0x3490=_0x195173[_0x11cb03(0x160)](_0x31014c)??new Set();_0x3490[_0x11cb03(0x136)](_0x31ffe5),_0x195173[_0x11cb03(0x153)](_0x31014c,_0x3490);}for(const [_0x3c8b72,_0x295783]of _0x195173){if(_0x295783['size']>0x1)throw hookDirectoryError(_0x11cb03(0x13d),'HOOK\x20directory\x20\x22'+_0x3c8b72+_0x11cb03(0x141),{'directoryName':_0x3c8b72,'datasetCodes':[..._0x295783]});}}export function assertUnambiguousHookAliases(_0x13f566){const _0xef0036=a292_0x54bd,_0x408798=[..._0x13f566],_0x58c7b0=new Map(),_0x2a3ddb=new Map();for(const {alias:_0x1e14b5,datasetCode:_0x325e45}of _0x408798){const _0x11b0f3=directoryIdentity(_0x1e14b5),_0x262261=directoryIdentity(_0x325e45),_0x1556a5=_0x58c7b0[_0xef0036(0x160)](_0x11b0f3)??new Set();_0x1556a5['add'](_0x325e45),_0x58c7b0[_0xef0036(0x153)](_0x11b0f3,_0x1556a5);const _0x768fa4=_0x2a3ddb[_0xef0036(0x160)](_0x262261)??new Set();_0x768fa4[_0xef0036(0x136)](_0x1e14b5),_0x2a3ddb[_0xef0036(0x153)](_0x262261,_0x768fa4);}for(const [_0x3b238c,_0x415b6a]of _0x58c7b0){if(_0x415b6a[_0xef0036(0x151)]>0x1)throw hookDirectoryError(_0xef0036(0x138),_0xef0036(0x156)+_0x3b238c+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'alias':_0x3b238c,'datasetCodes':[..._0x415b6a]});}for(const [_0x9424d,_0x5504ca]of _0x2a3ddb){if(_0x5504ca[_0xef0036(0x151)]>0x1)throw hookDirectoryError(_0xef0036(0x138),'Dataset\x20\x22'+_0x9424d+_0xef0036(0x134),{'datasetCode':_0x9424d,'aliases':[..._0x5504ca]});}}export function buildHookDirectoryIndexes(_0x52b6f0,_0x4291fd=[]){const _0x46164f=a292_0x54bd,_0x2a82f0=[..._0x4291fd];assertUnambiguousHookDirectoryMappings(_0x2a82f0[_0x46164f(0x155)](([_0x577cac,_0x222980])=>({'alias':_0x577cac,'datasetCode':_0x222980})));const _0x3a1133=new Map(),_0x53d81c=new Map();for(const _0x3d4d76 of _0x52b6f0){appendUnique(_0x3a1133,directoryIdentity(_0x3d4d76[_0x46164f(0x13e)]),_0x3d4d76,_0x15da96=>_0x15da96['code']);}for(const [_0x23969f,_0x3ebe05]of _0x2a82f0){appendUnique(_0x53d81c,directoryIdentity(_0x23969f),_0x3ebe05,_0x5a3300=>_0x5a3300);}return{'datasetCodeToDatasets':_0x3a1133,'aliasToDatasetCodes':_0x53d81c};}export function resolvePushHookDirectory(_0x463053,_0x3d2632,_0x56fae4){const _0x13145c=a292_0x54bd,_0x473976=directoryIdentity(_0x463053),_0x3baa26=_0x56fae4[_0x13145c(0x13b)]['get'](_0x473976)??[],_0x5f0888=_0x56fae4[_0x13145c(0x149)]['get'](_0x473976)??[],_0xacea27=new Set([..._0x3baa26[_0x13145c(0x155)](_0x42695a=>_0x42695a['code']),..._0x5f0888]);if(_0xacea27['size']>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS',_0x13145c(0x139)+_0x463053+_0x13145c(0x144),{'directoryName':_0x463053,'datasetCodes':[..._0xacea27]});const _0x43813c=[..._0xacea27][0x0];if(_0x43813c&&_0x3d2632?.[_0x13145c(0x14b)]&&_0x43813c!==_0x3d2632[_0x13145c(0x14b)])throw hookDirectoryError(_0x13145c(0x150),_0x13145c(0x139)+_0x463053+'\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22'+_0x3d2632['datasetCode']+_0x13145c(0x133)+_0x43813c+'\x22.',{'directoryName':_0x463053,'datasetCode':_0x43813c,'lockedDatasetCode':_0x3d2632[_0x13145c(0x14b)]});const _0x339570=_0x43813c?findDatasetByCode(_0x56fae4,_0x43813c):undefined,_0x16c362=!!_0x43813c&&_0x5f0888[_0x13145c(0x146)](_0x43813c);if(_0x339570)return{'dataset':_0x339570,'datasetCode':_0x339570[_0x13145c(0x13e)],..._0x16c362?{'alias':_0x463053}:{},'directoryProtocol':_0x16c362?'alias':_0x13145c(0x14b),'warnings':[]};const _0x52495f=_0x3d2632?.[_0x13145c(0x14b)];if(_0x52495f){const _0x5703a0=findDatasetByCode(_0x56fae4,_0x52495f);if(_0x5703a0)return{'dataset':_0x5703a0,'datasetCode':_0x5703a0[_0x13145c(0x13e)],..._0x3d2632['alias']?{'alias':_0x3d2632['alias']}:{},'directoryProtocol':_0x3d2632[_0x13145c(0x13a)]?'alias':_0x13145c(0x14b),'warnings':[]};}if(_0x43813c||_0x52495f){const _0x7de140=_0x43813c??_0x52495f;throw hookDirectoryError(_0x13145c(0x13f),'HOOK\x20directory\x20\x22'+_0x463053+_0x13145c(0x147),{'directoryName':_0x463053,'datasetCode':_0x7de140});}throw hookDirectoryError(_0x13145c(0x15e),_0x13145c(0x145)+_0x463053+_0x13145c(0x14c),{'directoryName':_0x463053});}export function preflightPushHookDirectories(_0x5e7c13,_0x43791e,_0x2dd8ff,_0x151191){const _0x37482d=a292_0x54bd,_0x530e2c=new Map(),_0x339547=new Map();for(const _0x26fc72 of _0x5e7c13){if(_0x26fc72['type']!==_0x37482d(0x12f))continue;const _0x32c2a7=_0x26fc72[_0x37482d(0x13a)];if(!_0x32c2a7)throw hookDirectoryError(_0x37482d(0x15e),_0x37482d(0x14e)+_0x26fc72[_0x37482d(0x158)],{'lockKey':_0x26fc72[_0x37482d(0x158)]});let _0x1d6d02;try{_0x1d6d02=resolvePushHookDirectory(_0x32c2a7,_0x43791e[_0x37482d(0x14f)][_0x26fc72[_0x37482d(0x158)]],_0x2dd8ff);}catch(_0x2207a7){if(_0x151191&&_0x2207a7 instanceof CliError&&[_0x37482d(0x13f),_0x37482d(0x15e)][_0x37482d(0x146)](_0x2207a7['code'])){_0x151191[_0x37482d(0x153)](_0x26fc72['lockKey'],_0x2207a7['message']);continue;}throw _0x2207a7;}_0x530e2c[_0x37482d(0x153)](_0x26fc72[_0x37482d(0x158)],_0x1d6d02);const _0x61b29e=_0x339547[_0x37482d(0x160)](_0x1d6d02['datasetCode'])??new Set();_0x61b29e['add'](_0x32c2a7),_0x339547['set'](_0x1d6d02[_0x37482d(0x14b)],_0x61b29e);}for(const [_0x27f5fb,_0x497287]of _0x339547){if(_0x497287[_0x37482d(0x151)]>0x1)throw hookDirectoryError(_0x37482d(0x15a),'Dataset\x20\x22'+_0x27f5fb+_0x37482d(0x15b)+[..._0x497287][_0x37482d(0x132)](',\x20')+'.',{'datasetCode':_0x27f5fb,'directories':[..._0x497287]});}return _0x530e2c;}export function hookDirectoryError(_0x3319df,_0x2e07fc,_0x9422f8){const _0x37f0b0=a292_0x54bd,_0x5cbb77=new CliError(_0x3319df,0x2,_0x3319df+':\x20'+_0x2e07fc);return _0x5cbb77[_0x37f0b0(0x152)]=_0x9422f8,_0x5cbb77;}function findDatasetByCode(_0x1e40de,_0x5f5d46){const _0x3b04a9=a292_0x54bd,_0x29976b=_0x1e40de['datasetCodeToDatasets'][_0x3b04a9(0x160)](directoryIdentity(_0x5f5d46))??[];if(_0x29976b[_0x3b04a9(0x13c)]>0x1)throw hookDirectoryError(_0x3b04a9(0x135),_0x3b04a9(0x137)+_0x5f5d46+'\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.',{'datasetCode':_0x5f5d46,'candidates':_0x29976b[_0x3b04a9(0x155)](datasetFact)});return _0x29976b[0x0];}function directoryIdentity(_0x35fdca){const _0x589546=a292_0x54bd;return _0x35fdca['normalize']('NFC')[_0x589546(0x159)]();}function appendUnique(_0x3d89ff,_0x5f45eb,_0x45f3c0,_0x2a9ccc){const _0x4f22d1=a292_0x54bd,_0x6d9836=_0x3d89ff['get'](_0x5f45eb)??[];!_0x6d9836[_0x4f22d1(0x154)](_0x27784e=>_0x2a9ccc(_0x27784e)===_0x2a9ccc(_0x45f3c0))&&_0x6d9836[_0x4f22d1(0x15d)](_0x45f3c0),_0x3d89ff[_0x4f22d1(0x153)](_0x5f45eb,_0x6d9836);}function datasetFact(_0xc935ce){const _0x350be6=a292_0x54bd;return{'id':_0xc935ce['id'],'name':_0xc935ce['name'],'datasetCode':_0xc935ce[_0x350be6(0x13e)]};}
|
|
1
|
+
(function(_0x15d53c,_0x531d38){const _0x29703a=a292_0x2b23,_0x221c22=_0x15d53c();while(!![]){try{const _0x921bff=parseInt(_0x29703a(0x154))/0x1+-parseInt(_0x29703a(0x150))/0x2+-parseInt(_0x29703a(0x16e))/0x3+parseInt(_0x29703a(0x172))/0x4+parseInt(_0x29703a(0x167))/0x5+-parseInt(_0x29703a(0x175))/0x6*(parseInt(_0x29703a(0x160))/0x7)+parseInt(_0x29703a(0x14b))/0x8;if(_0x921bff===_0x531d38)break;else _0x221c22['push'](_0x221c22['shift']());}catch(_0x30d10b){_0x221c22['push'](_0x221c22['shift']());}}}(a292_0x2c6f,0x7019b));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x304d72){const _0x212093=a292_0x2b23,_0x32ca1f=[];for(const [_0x39ab65,_0x473038]of Object[_0x212093(0x165)](_0x304d72[_0x212093(0x149)])){const [_0x2455ec,_0x74f829]=_0x39ab65[_0x212093(0x15d)]('/');if(_0x2455ec!==_0x212093(0x159)||!_0x74f829||!_0x473038[_0x212093(0x16f)])continue;_0x32ca1f[_0x212093(0x155)]({'alias':_0x74f829,'datasetCode':_0x473038[_0x212093(0x16f)]});}return _0x32ca1f;}export function uniqueTrackedHookDirectoryByDataset(_0x10f5d5){const _0x47927c=a292_0x2b23,_0x65f849=new Map();for(const _0x55ad16 of trackedHookDirectoryMappings(_0x10f5d5)){const _0x4e79e3=directoryIdentity(_0x55ad16['datasetCode']),_0x621e00=_0x65f849[_0x47927c(0x151)](_0x4e79e3)??new Map();_0x621e00[_0x47927c(0x156)](directoryIdentity(_0x55ad16[_0x47927c(0x14c)]),_0x55ad16[_0x47927c(0x14c)]),_0x65f849[_0x47927c(0x156)](_0x4e79e3,_0x621e00);}const _0x113499=new Map();for(const [_0xdb0d72,_0x4616ae]of _0x65f849){if(_0x4616ae[_0x47927c(0x152)]>0x1)throw hookDirectoryError(_0x47927c(0x16a),_0x47927c(0x14a)+_0xdb0d72+'\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20'+[..._0x4616ae[_0x47927c(0x15e)]()][_0x47927c(0x16d)](',\x20')+'.',{'datasetCode':_0xdb0d72,'directories':[..._0x4616ae[_0x47927c(0x15e)]()]});_0x113499[_0x47927c(0x156)](_0xdb0d72,[..._0x4616ae[_0x47927c(0x15e)]()][0x0]);}return _0x113499;}function a292_0x2c6f(){const _0x19fab7=['HOOK_DATASET_NOT_FOUND','HOOK_MAPPING_DRIFT','join','855498JFtdJZ','datasetCode','HOOK\x20directory\x20\x22','datasetCodeToDatasets','1189588sSPxFW','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','HOOK_DATASET_CODE_AMBIGUOUS','126jxqHUk','functions','Dataset\x20\x22','7872424LawGVi','alias','details','toLowerCase','code','772662swyItP','get','size','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','17717fLPStC','push','set','SDK\x20alias\x20\x22','HOOK_ALIAS_AMBIGUOUS','HOOK','HOOK_DIRECTORY_AMBIGUOUS','type','map','split','values','message','130263SUKqIU','includes','Incomplete\x20HOOK\x20path:\x20','lockKey','length','entries','HOOK_DIRECTORY_UNRESOLVED','1111410UJvhoB','add','normalize','HOOK_DUPLICATE_DIRECTORIES'];a292_0x2c6f=function(){return _0x19fab7;};return a292_0x2c6f();}export function assertUnambiguousHookDirectoryMappings(_0x349845){const _0x154f10=a292_0x2b23,_0x1e069b=new Map();for(const {alias:_0x5c5ff5,datasetCode:_0x548b14}of _0x349845){const _0x31048e=directoryIdentity(_0x5c5ff5),_0x9fbb28=_0x1e069b[_0x154f10(0x151)](_0x31048e)??new Set();_0x9fbb28[_0x154f10(0x168)](_0x548b14),_0x1e069b[_0x154f10(0x156)](_0x31048e,_0x9fbb28);}for(const [_0x34112f,_0x9fa2bf]of _0x1e069b){if(_0x9fa2bf[_0x154f10(0x152)]>0x1)throw hookDirectoryError(_0x154f10(0x15a),'HOOK\x20directory\x20\x22'+_0x34112f+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'directoryName':_0x34112f,'datasetCodes':[..._0x9fa2bf]});}}export function assertUnambiguousHookAliases(_0x1124cc){const _0x4141d0=a292_0x2b23,_0x14563f=[..._0x1124cc],_0x29205f=new Map(),_0x119977=new Map();for(const {alias:_0x13989a,datasetCode:_0x23a22d}of _0x14563f){const _0x2ed1ee=directoryIdentity(_0x13989a),_0xad6d29=directoryIdentity(_0x23a22d),_0x30ea35=_0x29205f[_0x4141d0(0x151)](_0x2ed1ee)??new Set();_0x30ea35['add'](_0x23a22d),_0x29205f[_0x4141d0(0x156)](_0x2ed1ee,_0x30ea35);const _0x47cb8c=_0x119977['get'](_0xad6d29)??new Set();_0x47cb8c[_0x4141d0(0x168)](_0x13989a),_0x119977[_0x4141d0(0x156)](_0xad6d29,_0x47cb8c);}for(const [_0x2b350a,_0xb37458]of _0x29205f){if(_0xb37458[_0x4141d0(0x152)]>0x1)throw hookDirectoryError(_0x4141d0(0x158),_0x4141d0(0x157)+_0x2b350a+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'alias':_0x2b350a,'datasetCodes':[..._0xb37458]});}for(const [_0x369077,_0x64bc9a]of _0x119977){if(_0x64bc9a[_0x4141d0(0x152)]>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS','Dataset\x20\x22'+_0x369077+'\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.',{'datasetCode':_0x369077,'aliases':[..._0x64bc9a]});}}function a292_0x2b23(_0x5da015,_0x5cc098){_0x5da015=_0x5da015-0x149;const _0x2c6f29=a292_0x2c6f();let _0x2b2333=_0x2c6f29[_0x5da015];return _0x2b2333;}export function buildHookDirectoryIndexes(_0x4970b3,_0x46ed48=[]){const _0x1f17f2=a292_0x2b23,_0x4fecc1=[..._0x46ed48];assertUnambiguousHookDirectoryMappings(_0x4fecc1[_0x1f17f2(0x15c)](([_0x73bfac,_0x51d592])=>({'alias':_0x73bfac,'datasetCode':_0x51d592})));const _0x4eb2e2=new Map(),_0x3f0ee1=new Map();for(const _0x5c3f1e of _0x4970b3){appendUnique(_0x4eb2e2,directoryIdentity(_0x5c3f1e['code']),_0x5c3f1e,_0x26e3c1=>_0x26e3c1[_0x1f17f2(0x14f)]);}for(const [_0x553737,_0x16c9fc]of _0x4fecc1){appendUnique(_0x3f0ee1,directoryIdentity(_0x553737),_0x16c9fc,_0x54d4cf=>_0x54d4cf);}return{'datasetCodeToDatasets':_0x4eb2e2,'aliasToDatasetCodes':_0x3f0ee1};}export function resolvePushHookDirectory(_0x5e7922,_0xeddbb2,_0x113fe3){const _0x36d809=a292_0x2b23,_0x26b915=directoryIdentity(_0x5e7922),_0x476971=_0x113fe3[_0x36d809(0x171)][_0x36d809(0x151)](_0x26b915)??[],_0x2715ff=_0x113fe3['aliasToDatasetCodes']['get'](_0x26b915)??[],_0x55eea4=new Set([..._0x476971[_0x36d809(0x15c)](_0x136b25=>_0x136b25[_0x36d809(0x14f)]),..._0x2715ff]);if(_0x55eea4['size']>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS','HOOK\x20directory\x20\x22'+_0x5e7922+'\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.',{'directoryName':_0x5e7922,'datasetCodes':[..._0x55eea4]});const _0x45eeda=[..._0x55eea4][0x0];if(_0x45eeda&&_0xeddbb2?.[_0x36d809(0x16f)]&&_0x45eeda!==_0xeddbb2[_0x36d809(0x16f)])throw hookDirectoryError(_0x36d809(0x16c),_0x36d809(0x170)+_0x5e7922+_0x36d809(0x173)+_0xeddbb2[_0x36d809(0x16f)]+'\x22\x20to\x20\x22'+_0x45eeda+'\x22.',{'directoryName':_0x5e7922,'datasetCode':_0x45eeda,'lockedDatasetCode':_0xeddbb2[_0x36d809(0x16f)]});const _0x2e02e6=_0x45eeda?findDatasetByCode(_0x113fe3,_0x45eeda):undefined,_0x21d40f=!!_0x45eeda&&_0x2715ff[_0x36d809(0x161)](_0x45eeda);if(_0x2e02e6)return{'dataset':_0x2e02e6,'datasetCode':_0x2e02e6[_0x36d809(0x14f)],..._0x21d40f?{'alias':_0x5e7922}:{},'directoryProtocol':_0x21d40f?_0x36d809(0x14c):_0x36d809(0x16f),'warnings':[]};const _0x1ca35b=_0xeddbb2?.['datasetCode'];if(_0x1ca35b){const _0xd193ec=findDatasetByCode(_0x113fe3,_0x1ca35b);if(_0xd193ec)return{'dataset':_0xd193ec,'datasetCode':_0xd193ec[_0x36d809(0x14f)],..._0xeddbb2['alias']?{'alias':_0xeddbb2['alias']}:{},'directoryProtocol':_0xeddbb2['alias']?_0x36d809(0x14c):_0x36d809(0x16f),'warnings':[]};}if(_0x45eeda||_0x1ca35b){const _0x85e164=_0x45eeda??_0x1ca35b;throw hookDirectoryError(_0x36d809(0x16b),_0x36d809(0x170)+_0x5e7922+'\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.',{'directoryName':_0x5e7922,'datasetCode':_0x85e164});}throw hookDirectoryError(_0x36d809(0x166),'Cannot\x20resolve\x20HOOK\x20directory\x20\x22'+_0x5e7922+'\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.',{'directoryName':_0x5e7922});}export function preflightPushHookDirectories(_0x51b925,_0x3f817d,_0x4ca510,_0x1fb14a){const _0x228bfc=a292_0x2b23,_0x71edbf=new Map(),_0x2e35fd=new Map();for(const _0x300d65 of _0x51b925){if(_0x300d65[_0x228bfc(0x15b)]!==_0x228bfc(0x159))continue;const _0x98bd4a=_0x300d65[_0x228bfc(0x14c)];if(!_0x98bd4a)throw hookDirectoryError(_0x228bfc(0x166),_0x228bfc(0x162)+_0x300d65['lockKey'],{'lockKey':_0x300d65['lockKey']});let _0x3d5346;try{_0x3d5346=resolvePushHookDirectory(_0x98bd4a,_0x3f817d[_0x228bfc(0x149)][_0x300d65[_0x228bfc(0x163)]],_0x4ca510);}catch(_0x13c822){if(_0x1fb14a&&_0x13c822 instanceof CliError&&[_0x228bfc(0x16b),'HOOK_DIRECTORY_UNRESOLVED'][_0x228bfc(0x161)](_0x13c822[_0x228bfc(0x14f)])){_0x1fb14a[_0x228bfc(0x156)](_0x300d65[_0x228bfc(0x163)],_0x13c822[_0x228bfc(0x15f)]);continue;}throw _0x13c822;}_0x71edbf['set'](_0x300d65[_0x228bfc(0x163)],_0x3d5346);const _0x44d79a=_0x2e35fd[_0x228bfc(0x151)](_0x3d5346[_0x228bfc(0x16f)])??new Set();_0x44d79a[_0x228bfc(0x168)](_0x98bd4a),_0x2e35fd[_0x228bfc(0x156)](_0x3d5346[_0x228bfc(0x16f)],_0x44d79a);}for(const [_0x2cb895,_0x14c5c1]of _0x2e35fd){if(_0x14c5c1['size']>0x1)throw hookDirectoryError(_0x228bfc(0x16a),_0x228bfc(0x14a)+_0x2cb895+_0x228bfc(0x153)+[..._0x14c5c1][_0x228bfc(0x16d)](',\x20')+'.',{'datasetCode':_0x2cb895,'directories':[..._0x14c5c1]});}return _0x71edbf;}export function hookDirectoryError(_0x801753,_0x385946,_0x3b2272){const _0x43f816=a292_0x2b23,_0x25d61a=new CliError(_0x801753,0x2,_0x801753+':\x20'+_0x385946);return _0x25d61a[_0x43f816(0x14d)]=_0x3b2272,_0x25d61a;}function findDatasetByCode(_0x114305,_0x1cfee5){const _0x1c5c2c=a292_0x2b23,_0x2f124f=_0x114305[_0x1c5c2c(0x171)][_0x1c5c2c(0x151)](directoryIdentity(_0x1cfee5))??[];if(_0x2f124f[_0x1c5c2c(0x164)]>0x1)throw hookDirectoryError(_0x1c5c2c(0x174),'Dataset\x20code\x20\x22'+_0x1cfee5+'\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.',{'datasetCode':_0x1cfee5,'candidates':_0x2f124f['map'](datasetFact)});return _0x2f124f[0x0];}function directoryIdentity(_0x4f16f9){const _0x16bcc8=a292_0x2b23;return _0x4f16f9[_0x16bcc8(0x169)]('NFC')[_0x16bcc8(0x14e)]();}function appendUnique(_0x16a46f,_0x28beb1,_0x5ec305,_0x4015bc){const _0x1c86b3=a292_0x2b23,_0x221b5d=_0x16a46f[_0x1c86b3(0x151)](_0x28beb1)??[];!_0x221b5d['some'](_0x524108=>_0x4015bc(_0x524108)===_0x4015bc(_0x5ec305))&&_0x221b5d[_0x1c86b3(0x155)](_0x5ec305),_0x16a46f[_0x1c86b3(0x156)](_0x28beb1,_0x221b5d);}function datasetFact(_0x45aae6){return{'id':_0x45aae6['id'],'name':_0x45aae6['name'],'datasetCode':_0x45aae6['code']};}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1a58b7,_0x7a854b){const _0x14f33a=a293_0x678c,_0x27a04b=_0x1a58b7();while(!![]){try{const _0x49ded1=-parseInt(_0x14f33a(0x10c))/0x1+parseInt(_0x14f33a(0x107))/0x2*(-parseInt(_0x14f33a(0x105))/0x3)+-parseInt(_0x14f33a(0x110))/0x4+parseInt(_0x14f33a(0x115))/0x5+parseInt(_0x14f33a(0x118))/0x6*(-parseInt(_0x14f33a(0x117))/0x7)+-parseInt(_0x14f33a(0x116))/0x8+parseInt(_0x14f33a(0x10b))/0x9*(parseInt(_0x14f33a(0x10a))/0xa);if(_0x49ded1===_0x7a854b)break;else _0x27a04b['push'](_0x27a04b['shift']());}catch(_0x3eb3d9){_0x27a04b['push'](_0x27a04b['shift']());}}}(a293_0x5ec9,0xb24f1));import{mkdir,readFile,writeFile}from'node:fs/promises';function a293_0x678c(_0x1c1c82,_0x4a768d){_0x1c1c82=_0x1c1c82-0x103;const _0x5ec920=a293_0x5ec9();let _0x678c0a=_0x5ec920[_0x1c1c82];return _0x678c0a;}import{dirname}from'node:path';function a293_0x5ec9(){const _0x305271=['object','scriptsRoot','code','5058460poKimd','2982784yZxWBX','4513327xAilsb','6YjugfA','Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20','functions','5667KeUmIS','stringify','892mmLSxs','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','parse','637870uKwETg','468junrMC','1417183kIwYdu',':\x20scriptsRoot\x20mismatch\x20—\x20','utf8','current\x20\x22','1283908PvKJqT','apps'];a293_0x5ec9=function(){return _0x305271;};return a293_0x5ec9();}export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x33301a,_0x1bf164,_0xe07b04,_0x152d37){const _0x4cf7d0=a293_0x678c,_0x49cbb0={'apps':_0x33301a[_0x4cf7d0(0x111)]&&typeof _0x33301a['apps']===_0x4cf7d0(0x112)?_0x33301a[_0x4cf7d0(0x111)]:{}};let _0xc57830=_0x49cbb0[_0x4cf7d0(0x111)][_0x1bf164];if(!_0xc57830)return _0xc57830={'scriptsRoot':_0xe07b04,'lastSync':'','functions':{}},_0x49cbb0[_0x4cf7d0(0x111)][_0x1bf164]=_0xc57830,{'lockData':_0x49cbb0,'appLock':_0xc57830};if(!_0xc57830[_0x4cf7d0(0x113)])_0xc57830['scriptsRoot']=_0xe07b04;else{if(_0xc57830[_0x4cf7d0(0x113)]!==_0xe07b04)throw new Error(_0x152d37+_0x4cf7d0(0x10d)+(_0x4cf7d0(0x10f)+_0xe07b04+'\x22\x20vs\x20lock\x20\x22'+_0xc57830[_0x4cf7d0(0x113)]+'\x22.\x20')+_0x4cf7d0(0x108));}return!_0xc57830[_0x4cf7d0(0x104)]&&(_0xc57830['functions']={}),!_0xc57830['lastSync']&&(_0xc57830['lastSync']=''),{'lockData':_0x49cbb0,'appLock':_0xc57830};}export async function readBffLockFile(_0x2d9c85){const _0x265f40=a293_0x678c;try{const _0x2ce557=await readFile(_0x2d9c85,_0x265f40(0x10e)),_0x2a222d=JSON[_0x265f40(0x109)](_0x2ce557);return{'apps':_0x2a222d[_0x265f40(0x111)]&&typeof _0x2a222d['apps']===_0x265f40(0x112)?_0x2a222d[_0x265f40(0x111)]:{}};}catch(_0x457d99){if(_0x457d99[_0x265f40(0x114)]==='ENOENT')return null;throw new Error(_0x265f40(0x103)+String(_0x457d99));}}export async function writeBffLockFile(_0x5bdcbf,_0x3e4795){const _0x1c375a=a293_0x678c;await mkdir(dirname(_0x5bdcbf),{'recursive':!![]}),await writeFile(_0x5bdcbf,JSON[_0x1c375a(0x106)](_0x3e4795,null,0x2),_0x1c375a(0x10e));}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x10d34c,_0x3a185f){const _0x3b3ac0=a295_0x1e7e,_0x2fb3ba=_0x10d34c();while(!![]){try{const _0x154a91=-parseInt(_0x3b3ac0(0xe6))/0x1*(-parseInt(_0x3b3ac0(0xd1))/0x2)+-parseInt(_0x3b3ac0(0xe8))/0x3*(parseInt(_0x3b3ac0(0xea))/0x4)+parseInt(_0x3b3ac0(0xd4))/0x5*(parseInt(_0x3b3ac0(0xd7))/0x6)+parseInt(_0x3b3ac0(0xe4))/0x7*(-parseInt(_0x3b3ac0(0xe7))/0x8)+parseInt(_0x3b3ac0(0xdb))/0x9+-parseInt(_0x3b3ac0(0xdf))/0xa*(-parseInt(_0x3b3ac0(0xe1))/0xb)+-parseInt(_0x3b3ac0(0xd9))/0xc*(-parseInt(_0x3b3ac0(0xd6))/0xd);if(_0x154a91===_0x3a185f)break;else _0x2fb3ba['push'](_0x2fb3ba['shift']());}catch(_0x53fcb0){_0x2fb3ba['push'](_0x2fb3ba['shift']());}}}(a295_0x2fbf,0x8e3eb));export const DEFAULT_BFF_SCRIPT_DESCRIPTION='TODO:\x20补充脚本功能描述';const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION='TODO:\x20add\x20script\x20description';export function snakeToCamel(_0x6ddcfe){const _0x4b667c=a295_0x1e7e;return _0x6ddcfe[_0x4b667c(0xd5)]()[_0x4b667c(0xe0)](/_([a-z])/g,(_0x23488a,_0x424982)=>_0x424982['toUpperCase']());}export function findHookLocationByRemoteId(_0x3231a7,_0x1b2c13){const _0x224f9b=a295_0x1e7e;if(!_0x1b2c13)return undefined;for(const [_0x48122a,_0xe8d734]of Object[_0x224f9b(0xe3)](_0x3231a7)){if(_0xe8d734['remoteId']===_0x1b2c13&&_0xe8d734[_0x224f9b(0xde)]&&_0xe8d734[_0x224f9b(0xe5)]&&_0xe8d734[_0x224f9b(0xdd)]){const _0x5f33b8=_0x48122a[_0x224f9b(0xdc)]('/')[0x1];return{'alias':_0x5f33b8||_0xe8d734[_0x224f9b(0xd8)],'datasetCode':_0xe8d734['datasetCode'],'operationType':_0xe8d734[_0x224f9b(0xe5)],'functionNode':_0xe8d734['functionNode']};}}return undefined;}export function extractScriptDescription(_0x55e1e9){const _0xfe5859=a295_0x1e7e,_0xc6ab38=_0x55e1e9[_0xfe5859(0xda)](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0xc6ab38?.[0x1])return undefined;const _0x1d86ff=_0xc6ab38[0x1],_0x5e2bf2=_0x6a00cf=>{const _0x2c19a5=_0xfe5859,_0x44c2ee=_0x6a00cf?.[_0x2c19a5(0xd0)]();if(!_0x44c2ee||_0x44c2ee===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0x44c2ee===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0x44c2ee;},_0x783b63=_0x1d86ff[_0xfe5859(0xda)](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x783b63)return _0x5e2bf2(_0x783b63[0x1]);const _0x587e08=_0x1d86ff['split'](/\r?\n/)[_0xfe5859(0xeb)](_0x57f5f2=>_0x57f5f2[_0xfe5859(0xe0)](/^\s*\*\s?/,'')[_0xfe5859(0xd0)]()),_0x115e8b=_0x587e08[_0xfe5859(0xe9)](_0x4c47e6=>/^\[\s*脚本类型\s*]\s*\S+/['test'](_0x4c47e6))&&_0x587e08[_0xfe5859(0xe9)](_0x2e0548=>/^\[\s*脚本名称\s*]\s*\S+/[_0xfe5859(0xd3)](_0x2e0548));if(!_0x115e8b)return undefined;for(const _0x45a6c3 of _0x587e08){if(!_0x45a6c3||_0x45a6c3[_0xfe5859(0xd2)]('@')||/^\[[^\]]+]\s*/[_0xfe5859(0xd3)](_0x45a6c3))continue;return _0x5e2bf2(_0x45a6c3);}return undefined;}function a295_0x1e7e(_0x394edf,_0x5d9985){_0x394edf=_0x394edf-0xd0;const _0x2fbfdf=a295_0x2fbf();let _0x1e7e0b=_0x2fbfdf[_0x394edf];return _0x1e7e0b;}export function isValidBffFunctionName(_0x3decc7){return/^[A-Za-z_$][A-Za-z0-9_$]*$/['test'](_0x3decc7);}export function normalizeHookFunctionNode(_0x2ecd6b){const _0x54b862=a295_0x1e7e;if(!_0x2ecd6b)return undefined;const _0x16b543=_0x2ecd6b['trim']()[_0x54b862(0xd5)]();if(_0x16b543===_0x54b862(0xe2)||_0x16b543===_0x54b862(0xec))return _0x16b543;return undefined;}function a295_0x2fbf(){const _0x55ee03=['map','after','trim','34UYuqAv','startsWith','test','3565fKxzWk','toLowerCase','494AfQfsb','3858VqxpxI','alias','35124AjyxeE','match','7053588ZTxgjj','split','functionNode','datasetCode','1249030vQjZTp','replace','11HolWbf','before','entries','6181fJsPoP','operationType','45112RFPGxh','7344NKDEmv','30795kNdZWr','some','332IvpJsu'];a295_0x2fbf=function(){return _0x55ee03;};return a295_0x2fbf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a296_0xce0f(){const _0x19bc9a=['901960UiIWNb','11241izBCFK','2983925ojiSoD','6AaIeqd','6vJRYHn','1370JzoEgB','/smartapi/db-analysis/cross-db/start','591494mlIfHU','431487mStIKN','756780pnSwNa','4617347spvtVB','/smartapi/db-analysis/cross-db/status'];a296_0xce0f=function(){return _0x19bc9a;};return a296_0xce0f();}const a296_0xd2dbc8=a296_0x5215;function a296_0x5215(_0x540c7d,_0x5c37f8){_0x540c7d=_0x540c7d-0x17a;const _0xce0fe6=a296_0xce0f();let _0x52155f=_0xce0fe6[_0x540c7d];return _0x52155f;}(function(_0x154678,_0x22fadd){const _0x3f0a98=a296_0x5215,_0x1b20f8=_0x154678();while(!![]){try{const _0x3e853d=-parseInt(_0x3f0a98(0x17a))/0x1+parseInt(_0x3f0a98(0x185))/0x2*(parseInt(_0x3f0a98(0x181))/0x3)+parseInt(_0x3f0a98(0x17b))/0x4+-parseInt(_0x3f0a98(0x180))/0x5+parseInt(_0x3f0a98(0x182))/0x6*(parseInt(_0x3f0a98(0x17c))/0x7)+parseInt(_0x3f0a98(0x17e))/0x8+parseInt(_0x3f0a98(0x17f))/0x9*(-parseInt(_0x3f0a98(0x183))/0xa);if(_0x3e853d===_0x22fadd)break;else _0x1b20f8['push'](_0x1b20f8['shift']());}catch(_0x510554){_0x1b20f8['push'](_0x1b20f8['shift']());}}}(a296_0xce0f,0x56586));export const CROSS_DB_ANALYSIS_PATHS={'start':a296_0xd2dbc8(0x184),'status':a296_0xd2dbc8(0x17d),'latest':'/smartapi/db-analysis/cross-db/latest-job'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a297_0x1a4b(_0x52410b,_0x32c9fe){_0x52410b=_0x52410b-0xf4;const _0x1eaa0f=a297_0x1eaa();let _0x1a4b3f=_0x1eaa0f[_0x52410b];return _0x1a4b3f;}const a297_0x560164=a297_0x1a4b;(function(_0x311640,_0x4560a7){const _0xfcf32e=a297_0x1a4b,_0x31f01f=_0x311640();while(!![]){try{const _0x163ffa=parseInt(_0xfcf32e(0x102))/0x1*(-parseInt(_0xfcf32e(0x100))/0x2)+-parseInt(_0xfcf32e(0xf7))/0x3+parseInt(_0xfcf32e(0xfa))/0x4*(-parseInt(_0xfcf32e(0xf5))/0x5)+parseInt(_0xfcf32e(0xf9))/0x6*(parseInt(_0xfcf32e(0xf8))/0x7)+-parseInt(_0xfcf32e(0xfc))/0x8+-parseInt(_0xfcf32e(0xfe))/0x9+parseInt(_0xfcf32e(0xf4))/0xa*(parseInt(_0xfcf32e(0x101))/0xb);if(_0x163ffa===_0x4560a7)break;else _0x31f01f['push'](_0x31f01f['shift']());}catch(_0x5b7720){_0x31f01f['push'](_0x31f01f['shift']());}}}(a297_0x1eaa,0x821b9));function a297_0x1eaa(){const _0x269212=['10aLquSN','3911835DUVQMn','/smartapi/cross-db-relation/create','1409697tcwIFV','53123MOBUZB','210kGjgZI','4kfIGaV','/smartapi/cross-db-relation/update','7641968ddxQrU','/smartapi/cross-db-relation/query','3853152Karoru','/smartapi/cross-db-relation/delete','185732sYritr','36018510onUKug','4kMGVsK'];a297_0x1eaa=function(){return _0x269212;};return a297_0x1eaa();}export const CROSS_DB_RELATION_PATHS={'list':a297_0x560164(0xfd),'create':a297_0x560164(0xf6),'update':a297_0x560164(0xfb),'delete':a297_0x560164(0xff)};
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1831c3,_0xf3a81){const _0x2bc058=a298_0x8663,_0x1e3336=_0x1831c3();while(!![]){try{const _0x2a05e2=-parseInt(_0x2bc058(0x150))/0x1+-parseInt(_0x2bc058(0x157))/0x2+parseInt(_0x2bc058(0x149))/0x3*(parseInt(_0x2bc058(0x14a))/0x4)+-parseInt(_0x2bc058(0x13d))/0x5*(-parseInt(_0x2bc058(0x141))/0x6)+parseInt(_0x2bc058(0x147))/0x7*(-parseInt(_0x2bc058(0x13e))/0x8)+parseInt(_0x2bc058(0x153))/0x9+-parseInt(_0x2bc058(0x148))/0xa*(-parseInt(_0x2bc058(0x145))/0xb);if(_0x2a05e2===_0xf3a81)break;else _0x1e3336['push'](_0x1e3336['shift']());}catch(_0x2a0ae8){_0x1e3336['push'](_0x1e3336['shift']());}}}(a298_0x39f6,0x7aba2));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x46c07){const _0x44248c=a298_0x8663;if(cache['has'](_0x46c07))return cache['get'](_0x46c07);const _0x9d4502=await listDatasets(_0x46c07),_0x9a6a3c=new Map();for(const _0x5dc784 of _0x9d4502){const _0x2cf2e1=_0x5dc784[_0x44248c(0x143)];_0x2cf2e1?.['dbId']!=null&&_0x9a6a3c[_0x44248c(0x142)](_0x2cf2e1[_0x44248c(0x146)],_0x2cf2e1[_0x44248c(0x140)]??_0x44248c(0x152)+_0x2cf2e1[_0x44248c(0x146)]);}const _0x4518cd=[..._0x9a6a3c[_0x44248c(0x15a)]()][_0x44248c(0x13f)](([_0x40ad75,_0x99e6c5])=>({'dbId':_0x40ad75,'dbName':_0x99e6c5}));return cache['set'](_0x46c07,_0x4518cd),_0x4518cd;}export async function resolveDb(_0x40390c,_0x37b584){const _0x206496=a298_0x8663,_0x1aad8c=await listDatabases(_0x40390c);if(_0x1aad8c[_0x206496(0x154)]===0x0)return{'resolved':[],'error':_0x206496(0x151)+_0x40390c+_0x206496(0x159)};if(!_0x37b584)return{'resolved':_0x1aad8c};const _0x4a90c2=Number(_0x37b584);if(!Number[_0x206496(0x144)](_0x4a90c2)){const _0x1d99b5=_0x1aad8c['find'](_0x294715=>_0x294715['dbId']===_0x4a90c2);if(_0x1d99b5)return{'resolved':[_0x1d99b5]};}const _0x5f2aa9=_0x37b584[_0x206496(0x14c)](),_0x3befd2=_0x1aad8c['filter'](_0x4a5666=>_0x4a5666[_0x206496(0x140)]['toLowerCase']()['includes'](_0x5f2aa9));if(_0x3befd2[_0x206496(0x154)]>0x0)return{'resolved':_0x3befd2};const _0x3a708a=_0x1aad8c[_0x206496(0x13f)](_0x2c6b95=>_0x2c6b95['dbName']+'\x20('+_0x2c6b95[_0x206496(0x146)]+')')[_0x206496(0x155)](',\x20');return{'resolved':[],'error':_0x206496(0x158)+_0x37b584+_0x206496(0x14e)+_0x40390c+'\x22.\x20Available:\x20'+_0x3a708a+_0x206496(0x14f)};}function a298_0x39f6(){const _0x446b05=['\x22\x20matches\x20multiple\x20databases:\x20','toLowerCase','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','\x22\x20under\x20app\x20\x22','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','870120NnYmXq','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','db-','5111523nKHJOD','length','join','find','284574unYESf','No\x20database\x20matching\x20\x22','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','entries','.\x20Be\x20more\x20specific.','1241485CFJsvd','96iYYJYA','map','dbName','6IBkxki','set','dbtableConfig','isNaN','4937735VtFmmv','dbId','20475qbNsLH','10fBuvRR','12uSgBcO','285068kKzQZt'];a298_0x39f6=function(){return _0x446b05;};return a298_0x39f6();}export async function resolveOneDb(_0x509aea,_0x122015){const _0x7db79f=a298_0x8663,{resolved:_0x362bd9,error:_0x367aea}=await resolveDb(_0x509aea,_0x122015);if(_0x367aea)return{'db':null,'error':_0x367aea};if(_0x362bd9[_0x7db79f(0x154)]===0x1)return{'db':_0x362bd9[0x0]};if(!_0x122015){const _0x35d10=_0x362bd9[_0x7db79f(0x13f)](_0x42eb5=>_0x42eb5[_0x7db79f(0x140)]+'\x20('+_0x42eb5[_0x7db79f(0x146)]+')')[_0x7db79f(0x155)](',\x20');return{'db':null,'error':_0x7db79f(0x14d)+_0x35d10};}const _0x4b36a8=_0x362bd9['map'](_0x40c7e7=>_0x40c7e7[_0x7db79f(0x140)]+'\x20('+_0x40c7e7[_0x7db79f(0x146)]+')')['join'](',\x20');return{'db':null,'error':'\x22'+_0x122015+_0x7db79f(0x14b)+_0x4b36a8+_0x7db79f(0x13c)};}function a298_0x8663(_0x310f5e,_0x1e0a81){_0x310f5e=_0x310f5e-0x13c;const _0x39f630=a298_0x39f6();let _0x8663e7=_0x39f630[_0x310f5e];return _0x8663e7;}export async function getDbName(_0x5eb63f,_0x481e39){const _0x19d8a9=a298_0x8663,_0x351bfa=await listDatabases(_0x5eb63f);return _0x351bfa[_0x19d8a9(0x156)](_0xc94f25=>_0xc94f25[_0x19d8a9(0x146)]===_0x481e39)?.['dbName'];}
|