@lovrabet/rabetbase-cli 2.5.4-beta.5 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/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/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/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-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-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/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 +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a279_0x2920c2=a279_0x158d;(function(_0x182619,_0x1a41ce){const _0x5d45c4=a279_0x158d,_0x55b545=_0x182619();while(!![]){try{const _0x2fcf9e=parseInt(_0x5d45c4(0x16f))/0x1+parseInt(_0x5d45c4(0x17b))/0x2*(-parseInt(_0x5d45c4(0x172))/0x3)+parseInt(_0x5d45c4(0x176))/0x4+parseInt(_0x5d45c4(0x193))/0x5+-parseInt(_0x5d45c4(0x186))/0x6*(parseInt(_0x5d45c4(0x17a))/0x7)+parseInt(_0x5d45c4(0x182))/0x8+-parseInt(_0x5d45c4(0x16d))/0x9*(parseInt(_0x5d45c4(0x197))/0xa);if(_0x2fcf9e===_0x1a41ce)break;else _0x55b545['push'](_0x55b545['shift']());}catch(_0x6b8c94){_0x55b545['push'](_0x55b545['shift']());}}}(a279_0xe3b1,0xef367));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',a279_0x2920c2(0x181),a279_0x2920c2(0x195)];function a279_0x158d(_0x4f7a09,_0x11842c){_0x4f7a09=_0x4f7a09-0x16d;const _0xe3b158=a279_0xe3b1();let _0x158d14=_0xe3b158[_0x4f7a09];return _0x158d14;}export function normalizeBffType(_0x37cd6f){const _0x592cc3=a279_0x2920c2;if(!_0x37cd6f)return undefined;const _0x185455=_0x37cd6f[_0x592cc3(0x191)]()[_0x592cc3(0x189)]();return SUPPORTED_BFF_TYPES[_0x592cc3(0x175)](_0x185455)?_0x185455:undefined;}async function scanJsFilesRecursively(_0x3afd9a,_0x4f73df){const _0x48371d=a279_0x2920c2,_0x32c81e=[];try{const _0x3a8f1d=await readdir(_0x3afd9a,{'withFileTypes':!![]});for(const _0x11c4fa of _0x3a8f1d){const _0x4dd720=join(_0x3afd9a,_0x11c4fa[_0x48371d(0x171)]);if(_0x11c4fa[_0x48371d(0x194)]())_0x32c81e[_0x48371d(0x16e)](...await scanJsFilesRecursively(_0x4dd720,_0x4f73df+'/'+_0x11c4fa[_0x48371d(0x171)]));else _0x11c4fa[_0x48371d(0x178)]()&&_0x11c4fa['name'][_0x48371d(0x174)]('.js')&&_0x32c81e['push']({'lockKey':_0x4f73df+'/'+_0x11c4fa['name']['replace'](/\.js$/,''),'filePath':_0x4dd720});}}catch(_0x263d97){if(_0x263d97[_0x48371d(0x17d)]!=='ENOENT')throw _0x263d97;}return _0x32c81e;}async function scanFlatFunctions(_0x2e4b0c,_0x53873d){const _0x22cb64=a279_0x2920c2,_0xb31de5=join(_0x2e4b0c[_0x22cb64(0x179)],_0x53873d),_0x76c61b=await scanJsFilesRecursively(_0xb31de5,_0x53873d);return _0x76c61b[_0x22cb64(0x170)](({lockKey:_0x415fac,filePath:_0x5b7dee})=>({'type':_0x53873d,'name':_0x415fac['split']('/')['at'](-0x1)??'','filePath':_0x5b7dee,'lockKey':_0x415fac}));}async function scanHookFunctions(_0x392f8d){const _0xa6f0ca=a279_0x2920c2,_0x4b785e=join(_0x392f8d[_0xa6f0ca(0x179)],_0xa6f0ca(0x195)),_0x323eb8=[];try{const _0x441afe=await readdir(_0x4b785e,{'withFileTypes':!![]});for(const _0x2860fe of _0x441afe){if(!_0x2860fe[_0xa6f0ca(0x194)]())continue;const _0x5b0a0c=_0x2860fe['name'],_0x162da4=join(_0x4b785e,_0x5b0a0c),_0xae9831=await readdir(_0x162da4,{'withFileTypes':!![]});for(const _0x3f0731 of _0xae9831){if(!_0x3f0731[_0xa6f0ca(0x194)]())continue;const _0x5df0c2=_0x3f0731[_0xa6f0ca(0x171)],_0x37e924=join(_0x162da4,_0x5df0c2),_0x3db4c5=await readdir(_0x37e924,{'withFileTypes':!![]});for(const _0x540e6e of _0x3db4c5){if(!_0x540e6e[_0xa6f0ca(0x194)]())continue;const _0x2565ab=_0x540e6e['name'],_0x246575=join(_0x37e924,_0x2565ab),_0x2e9421=await readdir(_0x246575,{'withFileTypes':!![]});for(const _0x229418 of _0x2e9421){if(!_0x229418[_0xa6f0ca(0x178)]()||!_0x229418[_0xa6f0ca(0x171)][_0xa6f0ca(0x174)](_0xa6f0ca(0x184)))continue;const _0x3975d4=_0x229418['name'][_0xa6f0ca(0x173)](/\.js$/,'');_0x323eb8[_0xa6f0ca(0x16e)]({'type':_0xa6f0ca(0x195),'name':_0x3975d4,'filePath':join(_0x246575,_0x229418[_0xa6f0ca(0x171)]),'lockKey':_0xa6f0ca(0x18c)+_0x5b0a0c+'/'+_0x5df0c2+'/'+_0x2565ab+'/'+_0x3975d4,'alias':_0x5b0a0c,'operationType':_0x5df0c2,'functionNode':_0x2565ab});}}}}}catch(_0x5c4916){if(_0x5c4916[_0xa6f0ca(0x17d)]!=='ENOENT')throw _0x5c4916;}return _0x323eb8;}export async function scanLocalBffFunctions(_0x420b02,_0x57d1ef){const _0x1ba0ff=a279_0x2920c2;if(_0x57d1ef===_0x1ba0ff(0x180)||_0x57d1ef==='ENDPOINT')return scanFlatFunctions(_0x420b02,_0x57d1ef);if(_0x57d1ef===_0x1ba0ff(0x195))return scanHookFunctions(_0x420b02);const [_0x574b7e,_0x24f280,_0x4202fb]=await Promise[_0x1ba0ff(0x188)]([scanFlatFunctions(_0x420b02,_0x1ba0ff(0x180)),scanFlatFunctions(_0x420b02,_0x1ba0ff(0x181)),scanHookFunctions(_0x420b02)]);return[..._0x574b7e,..._0x24f280,..._0x4202fb];}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x4cd674){const _0x35ca0d=a279_0x2920c2;return SAFE_LOCK_KEY_SEGMENT[_0x35ca0d(0x18b)](_0x4cd674)&&_0x4cd674!=='.'&&_0x4cd674!=='..';}export function resolveLocalFilePathFromLockKey(_0x38253f,_0x10e752){const _0x4822dd=a279_0x2920c2,_0x2110ba=_0x10e752[_0x4822dd(0x190)]('/');if(!_0x2110ba['every'](isSafeLockKeySegment))throw new Error(_0x4822dd(0x17f)+_0x10e752);const _0x1844ff=resolve(join(_0x38253f[_0x4822dd(0x179)],..._0x2110ba)+_0x4822dd(0x184)),_0x319001=resolve(_0x38253f['scriptsRootDir']);if(_0x1844ff!==_0x319001&&!_0x1844ff[_0x4822dd(0x18d)](_0x319001+sep))throw new Error('Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20'+_0x1844ff);return _0x1844ff;}export function createHookLocationMap(_0x123409){const _0x4041e5=a279_0x2920c2,_0x1efc42=new Map();for(const _0xf64f1b of _0x123409){_0xf64f1b['beforeScriptId']&&_0x1efc42['set'](_0xf64f1b[_0x4041e5(0x183)],{'datasetCode':_0xf64f1b[_0x4041e5(0x196)],'operationType':snakeToCamel(_0xf64f1b[_0x4041e5(0x18a)]),'functionNode':'before'}),_0xf64f1b[_0x4041e5(0x18e)]&&_0x1efc42[_0x4041e5(0x17e)](_0xf64f1b[_0x4041e5(0x18e)],{'datasetCode':_0xf64f1b[_0x4041e5(0x196)],'operationType':snakeToCamel(_0xf64f1b['operationType']),'functionNode':_0x4041e5(0x185)});}return _0x1efc42;}function a279_0xe3b1(){const _0x16b6eb=['functionName','code','set','Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20','COMMON','ENDPOINT','14562576lSvskg','beforeScriptId','.js','after','2185338QArppV','functionNode','all','toUpperCase','operationType','test','HOOK/','startsWith','afterScriptId','toLowerCase','split','trim','get','7333330lfDQEp','isDirectory','HOOK','datasetCode','311510xfBdvw','819UmZHlE','push','1299506zorMgO','map','name','223815rxuzrK','replace','endsWith','includes','7584952wqfxcT','every','isFile','scriptsRootDir','14QAAoEd','52EBjqsx'];a279_0xe3b1=function(){return _0x16b6eb;};return a279_0xe3b1();}export function resolveRemoteScriptTarget(_0x4193db,_0x17b591,_0x3c77d4,_0xf404c0,_0x350187){const _0x33c8ac=a279_0x2920c2,_0x36731f=normalizeBffType(_0x17b591['scriptType']);if(!_0x36731f||!_0x17b591[_0x33c8ac(0x17c)])return null;if(_0x36731f===_0x33c8ac(0x195)){const _0x21622e=_0x17b591['id']?_0x3c77d4[_0x33c8ac(0x192)](_0x17b591['id']):undefined,_0x16aa1c=findHookLocationByRemoteId(_0xf404c0,_0x17b591['id']),_0x1f6bff=_0x21622e?{..._0x16aa1c?.[_0x33c8ac(0x196)]===_0x21622e[_0x33c8ac(0x196)]?_0x16aa1c:{},..._0x21622e}:_0x16aa1c;if(!_0x1f6bff)return null;const _0x2cde16=_0x350187[_0x33c8ac(0x192)](_0x1f6bff['datasetCode'][_0x33c8ac(0x18f)]()),_0x110188=_0x2cde16??_0x1f6bff[_0x33c8ac(0x196)],_0xe66410={..._0x1f6bff,'alias':_0x2cde16},_0x15a900='HOOK/'+_0x110188+'/'+_0xe66410['operationType']+'/'+_0xe66410[_0x33c8ac(0x187)]+'/'+_0x17b591[_0x33c8ac(0x17c)];if(!_0x15a900[_0x33c8ac(0x190)]('/')[_0x33c8ac(0x177)](isSafeLockKeySegment))return null;return{'lockKey':_0x15a900,'filePath':resolveLocalFilePathFromLockKey(_0x4193db,_0x15a900),'type':_0x33c8ac(0x195),'hookLocation':_0xe66410};}const _0x592c28=_0x36731f+'/'+_0x17b591[_0x33c8ac(0x17c)];if(!_0x592c28[_0x33c8ac(0x190)]('/')[_0x33c8ac(0x177)](isSafeLockKeySegment))return null;return{'lockKey':_0x592c28,'filePath':resolveLocalFilePathFromLockKey(_0x4193db,_0x592c28),'type':_0x36731f};}export async function ensureParentDirectory(_0x3cebdb){await mkdir(dirname(_0x3cebdb),{'recursive':!![]});}export async function fileExists(_0x50ee3d){try{return await access(_0x50ee3d,constants['F_OK']),!![];}catch{return![];}}export async function directoryExists(_0x415064){const _0x345e0a=a279_0x2920c2;try{const _0x279bb2=await stat(_0x415064);return _0x279bb2[_0x345e0a(0x194)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x27fbf3,_0x1c7506){const _0x1866de=a280_0x3f22,_0x133514=_0x27fbf3();while(!![]){try{const _0x3e00ac=-parseInt(_0x1866de(0x8f))/0x1*(parseInt(_0x1866de(0x95))/0x2)+-parseInt(_0x1866de(0x99))/0x3+parseInt(_0x1866de(0x9c))/0x4+parseInt(_0x1866de(0x98))/0x5+-parseInt(_0x1866de(0x8e))/0x6*(parseInt(_0x1866de(0x91))/0x7)+parseInt(_0x1866de(0x90))/0x8*(-parseInt(_0x1866de(0x93))/0x9)+-parseInt(_0x1866de(0x94))/0xa*(-parseInt(_0x1866de(0x9b))/0xb);if(_0x3e00ac===_0x1c7506)break;else _0x133514['push'](_0x133514['shift']());}catch(_0x3159ed){_0x133514['push'](_0x133514['shift']());}}}(a280_0x5b0e,0x20da6));import{readFile}from'node:fs/promises';import a280_0x38f993 from'node:crypto';export function computeContentHash(_0x26a3a2){const _0xa76eac=a280_0x3f22;return a280_0x38f993[_0xa76eac(0x97)](_0xa76eac(0x9a))[_0xa76eac(0x96)](_0x26a3a2)['digest'](_0xa76eac(0x92));}function a280_0x5b0e(){const _0x376e55=['hex','1962cvvfEV','4878890qzCvwi','6lZcYmb','update','createHash','265715kXDFRX','287346lMPVDh','md5','11PyBSdE','616456dWTRsF','1362zuNvmX','9011hdvung','8176QaHudj','6629TRigld'];a280_0x5b0e=function(){return _0x376e55;};return a280_0x5b0e();}function a280_0x3f22(_0x39b7f4,_0x1cf9dc){_0x39b7f4=_0x39b7f4-0x8e;const _0x5b0e25=a280_0x5b0e();let _0x3f228a=_0x5b0e25[_0x39b7f4];return _0x3f228a;}export async function computeFileHash(_0x5189da){const _0x3198c4=await readFile(_0x5189da,'utf8');return computeContentHash(_0x3198c4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3cf6d7,_0x5e231e){const _0x28aa84=a281_0x2012,_0x15f312=_0x3cf6d7();while(!![]){try{const _0x4ed6a7=parseInt(_0x28aa84(0x196))/0x1+parseInt(_0x28aa84(0x1a2))/0x2*(parseInt(_0x28aa84(0x1b3))/0x3)+-parseInt(_0x28aa84(0x19e))/0x4*(-parseInt(_0x28aa84(0x1be))/0x5)+-parseInt(_0x28aa84(0x1ba))/0x6+parseInt(_0x28aa84(0x18b))/0x7*(parseInt(_0x28aa84(0x1ae))/0x8)+-parseInt(_0x28aa84(0x1c1))/0x9*(-parseInt(_0x28aa84(0x18f))/0xa)+-parseInt(_0x28aa84(0x19f))/0xb;if(_0x4ed6a7===_0x5e231e)break;else _0x15f312['push'](_0x15f312['shift']());}catch(_0x45cc00){_0x15f312['push'](_0x15f312['shift']());}}}(a281_0x2b87,0x2fb5f));import{CliError}from'../../errors.js';function a281_0x2012(_0x411a61,_0x4a5772){_0x411a61=_0x411a61-0x18b;const _0x2b87b2=a281_0x2b87();let _0x20129c=_0x2b87b2[_0x411a61];return _0x20129c;}export function trackedHookDirectoryMappings(_0x4f22d3){const _0x2a7509=a281_0x2012,_0x1e218c=[];for(const [_0x5a6c96,_0x58ebc8]of Object[_0x2a7509(0x19d)](_0x4f22d3[_0x2a7509(0x18d)])){const [_0x42b6c5,_0x597e1d]=_0x5a6c96[_0x2a7509(0x190)]('/');if(_0x42b6c5!==_0x2a7509(0x1af)||!_0x597e1d||!_0x58ebc8[_0x2a7509(0x1c2)])continue;_0x1e218c[_0x2a7509(0x1a0)]({'alias':_0x597e1d,'datasetCode':_0x58ebc8[_0x2a7509(0x1c2)]});}return _0x1e218c;}export function uniqueTrackedHookDirectoryByDataset(_0x4877ea){const _0x32aec9=a281_0x2012,_0x23949b=new Map();for(const _0x285ad1 of trackedHookDirectoryMappings(_0x4877ea)){const _0x17b848=directoryIdentity(_0x285ad1[_0x32aec9(0x1c2)]),_0x4a2f0a=_0x23949b['get'](_0x17b848)??new Map();_0x4a2f0a[_0x32aec9(0x197)](directoryIdentity(_0x285ad1['alias']),_0x285ad1['alias']),_0x23949b[_0x32aec9(0x197)](_0x17b848,_0x4a2f0a);}const _0x212ea7=new Map();for(const [_0x3e23e6,_0x4746e9]of _0x23949b){if(_0x4746e9[_0x32aec9(0x1b5)]>0x1)throw hookDirectoryError('HOOK_DUPLICATE_DIRECTORIES','Dataset\x20\x22'+_0x3e23e6+_0x32aec9(0x192)+[..._0x4746e9['values']()][_0x32aec9(0x1aa)](',\x20')+'.',{'datasetCode':_0x3e23e6,'directories':[..._0x4746e9[_0x32aec9(0x1bd)]()]});_0x212ea7['set'](_0x3e23e6,[..._0x4746e9[_0x32aec9(0x1bd)]()][0x0]);}return _0x212ea7;}export function assertUnambiguousHookDirectoryMappings(_0x1b19e0){const _0x5142b5=a281_0x2012,_0x59f668=new Map();for(const {alias:_0x4b727c,datasetCode:_0x537cad}of _0x1b19e0){const _0x14db83=directoryIdentity(_0x4b727c),_0x4fbbf0=_0x59f668[_0x5142b5(0x19c)](_0x14db83)??new Set();_0x4fbbf0[_0x5142b5(0x1a7)](_0x537cad),_0x59f668[_0x5142b5(0x197)](_0x14db83,_0x4fbbf0);}for(const [_0x264712,_0x5d9a02]of _0x59f668){if(_0x5d9a02[_0x5142b5(0x1b5)]>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS',_0x5142b5(0x199)+_0x264712+_0x5142b5(0x1bb),{'directoryName':_0x264712,'datasetCodes':[..._0x5d9a02]});}}export function assertUnambiguousHookAliases(_0x26a3c2){const _0x2ad6fa=a281_0x2012,_0x415d5b=[..._0x26a3c2],_0x5bcabd=new Map(),_0x367061=new Map();for(const {alias:_0x9da9ba,datasetCode:_0x47376a}of _0x415d5b){const _0x18bd71=directoryIdentity(_0x9da9ba),_0x24f9b6=directoryIdentity(_0x47376a),_0xc225d1=_0x5bcabd[_0x2ad6fa(0x19c)](_0x18bd71)??new Set();_0xc225d1[_0x2ad6fa(0x1a7)](_0x47376a),_0x5bcabd[_0x2ad6fa(0x197)](_0x18bd71,_0xc225d1);const _0x2ec3c1=_0x367061['get'](_0x24f9b6)??new Set();_0x2ec3c1['add'](_0x9da9ba),_0x367061[_0x2ad6fa(0x197)](_0x24f9b6,_0x2ec3c1);}for(const [_0x3d6ca2,_0x4660c6]of _0x5bcabd){if(_0x4660c6[_0x2ad6fa(0x1b5)]>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS',_0x2ad6fa(0x195)+_0x3d6ca2+_0x2ad6fa(0x1bb),{'alias':_0x3d6ca2,'datasetCodes':[..._0x4660c6]});}for(const [_0x44c3d9,_0x272573]of _0x367061){if(_0x272573[_0x2ad6fa(0x1b5)]>0x1)throw hookDirectoryError(_0x2ad6fa(0x1b1),_0x2ad6fa(0x1a4)+_0x44c3d9+_0x2ad6fa(0x1a9),{'datasetCode':_0x44c3d9,'aliases':[..._0x272573]});}}export function buildHookDirectoryIndexes(_0x5307f4,_0x46f9ff=[]){const _0x39508c=a281_0x2012,_0x34ad5a=[..._0x46f9ff];assertUnambiguousHookDirectoryMappings(_0x34ad5a[_0x39508c(0x191)](([_0x2ec2df,_0xf7a128])=>({'alias':_0x2ec2df,'datasetCode':_0xf7a128})));const _0x5de061=new Map(),_0x18dc0e=new Map();for(const _0x351277 of _0x5307f4){appendUnique(_0x5de061,directoryIdentity(_0x351277[_0x39508c(0x18c)]),_0x351277,_0x40bb27=>_0x40bb27[_0x39508c(0x18c)]);}for(const [_0x189404,_0x22f6a3]of _0x34ad5a){appendUnique(_0x18dc0e,directoryIdentity(_0x189404),_0x22f6a3,_0x58579d=>_0x58579d);}return{'datasetCodeToDatasets':_0x5de061,'aliasToDatasetCodes':_0x18dc0e};}export function resolvePushHookDirectory(_0x30e79c,_0xeed25c,_0x544abe){const _0x56dafa=a281_0x2012,_0x229b95=directoryIdentity(_0x30e79c),_0x2c40a2=_0x544abe[_0x56dafa(0x1a6)]['get'](_0x229b95)??[],_0x57b548=_0x544abe['aliasToDatasetCodes'][_0x56dafa(0x19c)](_0x229b95)??[],_0xd439dd=new Set([..._0x2c40a2['map'](_0x4e0bf5=>_0x4e0bf5['code']),..._0x57b548]);if(_0xd439dd[_0x56dafa(0x1b5)]>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS','HOOK\x20directory\x20\x22'+_0x30e79c+_0x56dafa(0x1a1),{'directoryName':_0x30e79c,'datasetCodes':[..._0xd439dd]});const _0x16222f=[..._0xd439dd][0x0];if(_0x16222f&&_0xeed25c?.[_0x56dafa(0x1c2)]&&_0x16222f!==_0xeed25c['datasetCode'])throw hookDirectoryError('HOOK_MAPPING_DRIFT',_0x56dafa(0x199)+_0x30e79c+_0x56dafa(0x19a)+_0xeed25c[_0x56dafa(0x1c2)]+_0x56dafa(0x1ad)+_0x16222f+'\x22.',{'directoryName':_0x30e79c,'datasetCode':_0x16222f,'lockedDatasetCode':_0xeed25c['datasetCode']});const _0x37aad7=_0x16222f?findDatasetByCode(_0x544abe,_0x16222f):undefined,_0x127bbe=!!_0x16222f&&_0x57b548[_0x56dafa(0x1b7)](_0x16222f);if(_0x37aad7)return{'dataset':_0x37aad7,'datasetCode':_0x37aad7['code'],..._0x127bbe?{'alias':_0x30e79c}:{},'directoryProtocol':_0x127bbe?_0x56dafa(0x1b2):_0x56dafa(0x1c2),'warnings':[]};const _0x3f8112=_0xeed25c?.['datasetCode'];if(_0x3f8112){const _0x65db8a=findDatasetByCode(_0x544abe,_0x3f8112);if(_0x65db8a)return{'dataset':_0x65db8a,'datasetCode':_0x65db8a[_0x56dafa(0x18c)],..._0xeed25c[_0x56dafa(0x1b2)]?{'alias':_0xeed25c['alias']}:{},'directoryProtocol':_0xeed25c[_0x56dafa(0x1b2)]?_0x56dafa(0x1b2):'datasetCode','warnings':[]};}if(_0x16222f||_0x3f8112){const _0x434fb9=_0x16222f??_0x3f8112;throw hookDirectoryError(_0x56dafa(0x194),'HOOK\x20directory\x20\x22'+_0x30e79c+_0x56dafa(0x1b0),{'directoryName':_0x30e79c,'datasetCode':_0x434fb9});}throw hookDirectoryError(_0x56dafa(0x1b6),_0x56dafa(0x1a5)+_0x30e79c+_0x56dafa(0x1b8),{'directoryName':_0x30e79c});}export function preflightPushHookDirectories(_0x3557be,_0x326e38,_0x59c5df,_0x3c2c4c){const _0x354ef6=a281_0x2012,_0x44c529=new Map(),_0xc78efe=new Map();for(const _0x351fc3 of _0x3557be){if(_0x351fc3[_0x354ef6(0x1b9)]!==_0x354ef6(0x1af))continue;const _0x3ed739=_0x351fc3[_0x354ef6(0x1b2)];if(!_0x3ed739)throw hookDirectoryError(_0x354ef6(0x1b6),'Incomplete\x20HOOK\x20path:\x20'+_0x351fc3['lockKey'],{'lockKey':_0x351fc3[_0x354ef6(0x1bc)]});let _0x2db2cc;try{_0x2db2cc=resolvePushHookDirectory(_0x3ed739,_0x326e38['functions'][_0x351fc3[_0x354ef6(0x1bc)]],_0x59c5df);}catch(_0x174869){if(_0x3c2c4c&&_0x174869 instanceof CliError&&[_0x354ef6(0x194),_0x354ef6(0x1b6)]['includes'](_0x174869[_0x354ef6(0x18c)])){_0x3c2c4c[_0x354ef6(0x197)](_0x351fc3[_0x354ef6(0x1bc)],_0x174869[_0x354ef6(0x1a8)]);continue;}throw _0x174869;}_0x44c529['set'](_0x351fc3[_0x354ef6(0x1bc)],_0x2db2cc);const _0x5d108f=_0xc78efe[_0x354ef6(0x19c)](_0x2db2cc[_0x354ef6(0x1c2)])??new Set();_0x5d108f[_0x354ef6(0x1a7)](_0x3ed739),_0xc78efe[_0x354ef6(0x197)](_0x2db2cc['datasetCode'],_0x5d108f);}for(const [_0x2336e0,_0x3098f4]of _0xc78efe){if(_0x3098f4['size']>0x1)throw hookDirectoryError(_0x354ef6(0x18e),_0x354ef6(0x1a4)+_0x2336e0+_0x354ef6(0x1ab)+[..._0x3098f4]['join'](',\x20')+'.',{'datasetCode':_0x2336e0,'directories':[..._0x3098f4]});}return _0x44c529;}export function hookDirectoryError(_0x5d0ca9,_0x49e70b,_0x853dd){const _0x24cc11=a281_0x2012,_0x255d48=new CliError(_0x5d0ca9,0x2,_0x5d0ca9+':\x20'+_0x49e70b);return _0x255d48[_0x24cc11(0x19b)]=_0x853dd,_0x255d48;}function findDatasetByCode(_0x407091,_0x4138b9){const _0x1e3c0b=a281_0x2012,_0x370589=_0x407091[_0x1e3c0b(0x1a6)][_0x1e3c0b(0x19c)](directoryIdentity(_0x4138b9))??[];if(_0x370589[_0x1e3c0b(0x1bf)]>0x1)throw hookDirectoryError('HOOK_DATASET_CODE_AMBIGUOUS',_0x1e3c0b(0x1a3)+_0x4138b9+_0x1e3c0b(0x198),{'datasetCode':_0x4138b9,'candidates':_0x370589['map'](datasetFact)});return _0x370589[0x0];}function directoryIdentity(_0x556c11){const _0x4b6afa=a281_0x2012;return _0x556c11[_0x4b6afa(0x1c0)](_0x4b6afa(0x193))[_0x4b6afa(0x1b4)]();}function a281_0x2b87(){const _0x19d440=['get','entries','169908yltcez','4170749MznmWR','push','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','2954wZQUUm','Dataset\x20code\x20\x22','Dataset\x20\x22','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','datasetCodeToDatasets','add','message','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','join','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','name','\x22\x20to\x20\x22','128nHPkHo','HOOK','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','HOOK_ALIAS_AMBIGUOUS','alias','30biqzbg','toLowerCase','size','HOOK_DIRECTORY_UNRESOLVED','includes','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','type','1709286fneJaZ','\x22\x20resolves\x20to\x20multiple\x20Datasets.','lockKey','values','10gbBlYI','length','normalize','153UtLltm','datasetCode','138635GMetsl','code','functions','HOOK_DUPLICATE_DIRECTORIES','148130GQlpWS','split','map','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','NFC','HOOK_DATASET_NOT_FOUND','SDK\x20alias\x20\x22','191038NOvnSA','set','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','HOOK\x20directory\x20\x22','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','details'];a281_0x2b87=function(){return _0x19d440;};return a281_0x2b87();}function appendUnique(_0xc2aec3,_0x633b3f,_0x32ba11,_0x5b9557){const _0x4ed391=a281_0x2012,_0x4cba5c=_0xc2aec3[_0x4ed391(0x19c)](_0x633b3f)??[];!_0x4cba5c['some'](_0x387558=>_0x5b9557(_0x387558)===_0x5b9557(_0x32ba11))&&_0x4cba5c[_0x4ed391(0x1a0)](_0x32ba11),_0xc2aec3[_0x4ed391(0x197)](_0x633b3f,_0x4cba5c);}function datasetFact(_0xc3c6dc){const _0x2f35e2=a281_0x2012;return{'id':_0xc3c6dc['id'],'name':_0xc3c6dc[_0x2f35e2(0x1ac)],'datasetCode':_0xc3c6dc[_0x2f35e2(0x18c)]};}
|
|
1
|
+
(function(_0x3ec328,_0x38c47c){const _0x430972=a281_0x3254,_0x52f2bc=_0x3ec328();while(!![]){try{const _0x4a1f84=-parseInt(_0x430972(0xe8))/0x1*(-parseInt(_0x430972(0xde))/0x2)+-parseInt(_0x430972(0xf5))/0x3+parseInt(_0x430972(0xc3))/0x4+parseInt(_0x430972(0xda))/0x5+parseInt(_0x430972(0xef))/0x6+-parseInt(_0x430972(0xdc))/0x7+-parseInt(_0x430972(0xd4))/0x8;if(_0x4a1f84===_0x38c47c)break;else _0x52f2bc['push'](_0x52f2bc['shift']());}catch(_0x3714cd){_0x52f2bc['push'](_0x52f2bc['shift']());}}}(a281_0x1798,0x5f40d));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x512280){const _0x739556=a281_0x3254,_0x2ebd00=[];for(const [_0x35b2d1,_0x9d174]of Object[_0x739556(0xd5)](_0x512280[_0x739556(0xd2)])){const [_0x5d56dd,_0x323a58]=_0x35b2d1[_0x739556(0xce)]('/');if(_0x5d56dd!=='HOOK'||!_0x323a58||!_0x9d174[_0x739556(0xcf)])continue;_0x2ebd00[_0x739556(0xe0)]({'alias':_0x323a58,'datasetCode':_0x9d174[_0x739556(0xcf)]});}return _0x2ebd00;}export function uniqueTrackedHookDirectoryByDataset(_0x5d7eba){const _0x49d464=a281_0x3254,_0x50a1de=new Map();for(const _0x38ae9d of trackedHookDirectoryMappings(_0x5d7eba)){const _0x2718a0=directoryIdentity(_0x38ae9d[_0x49d464(0xcf)]),_0x45b229=_0x50a1de['get'](_0x2718a0)??new Map();_0x45b229[_0x49d464(0xe7)](directoryIdentity(_0x38ae9d[_0x49d464(0xf1)]),_0x38ae9d[_0x49d464(0xf1)]),_0x50a1de[_0x49d464(0xe7)](_0x2718a0,_0x45b229);}const _0x565bb1=new Map();for(const [_0x275fb9,_0x78af73]of _0x50a1de){if(_0x78af73[_0x49d464(0xdd)]>0x1)throw hookDirectoryError(_0x49d464(0xd9),_0x49d464(0xea)+_0x275fb9+_0x49d464(0xeb)+[..._0x78af73['values']()][_0x49d464(0xcb)](',\x20')+'.',{'datasetCode':_0x275fb9,'directories':[..._0x78af73[_0x49d464(0xc8)]()]});_0x565bb1[_0x49d464(0xe7)](_0x275fb9,[..._0x78af73[_0x49d464(0xc8)]()][0x0]);}return _0x565bb1;}export function assertUnambiguousHookDirectoryMappings(_0x311def){const _0x5c97a9=a281_0x3254,_0x14dcdc=new Map();for(const {alias:_0x4c4187,datasetCode:_0x4caedc}of _0x311def){const _0x2489cf=directoryIdentity(_0x4c4187),_0x105c87=_0x14dcdc[_0x5c97a9(0xd0)](_0x2489cf)??new Set();_0x105c87['add'](_0x4caedc),_0x14dcdc[_0x5c97a9(0xe7)](_0x2489cf,_0x105c87);}for(const [_0x529434,_0x4f16fe]of _0x14dcdc){if(_0x4f16fe['size']>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS',_0x5c97a9(0xe1)+_0x529434+_0x5c97a9(0xca),{'directoryName':_0x529434,'datasetCodes':[..._0x4f16fe]});}}export function assertUnambiguousHookAliases(_0x455827){const _0x196ea7=a281_0x3254,_0x4eecba=[..._0x455827],_0x45dbb1=new Map(),_0x97c539=new Map();for(const {alias:_0x22111e,datasetCode:_0x4ed6b7}of _0x4eecba){const _0x18f960=directoryIdentity(_0x22111e),_0x3c70c0=directoryIdentity(_0x4ed6b7),_0x4db20c=_0x45dbb1['get'](_0x18f960)??new Set();_0x4db20c[_0x196ea7(0xcd)](_0x4ed6b7),_0x45dbb1['set'](_0x18f960,_0x4db20c);const _0xf33447=_0x97c539['get'](_0x3c70c0)??new Set();_0xf33447[_0x196ea7(0xcd)](_0x22111e),_0x97c539['set'](_0x3c70c0,_0xf33447);}for(const [_0x36419e,_0x557a13]of _0x45dbb1){if(_0x557a13[_0x196ea7(0xdd)]>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS',_0x196ea7(0xed)+_0x36419e+_0x196ea7(0xca),{'alias':_0x36419e,'datasetCodes':[..._0x557a13]});}for(const [_0x30a228,_0x489dcc]of _0x97c539){if(_0x489dcc[_0x196ea7(0xdd)]>0x1)throw hookDirectoryError(_0x196ea7(0xf2),_0x196ea7(0xea)+_0x30a228+'\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.',{'datasetCode':_0x30a228,'aliases':[..._0x489dcc]});}}export function buildHookDirectoryIndexes(_0x46528c,_0x8efbb3=[]){const _0x4fd9e7=a281_0x3254,_0x57c013=[..._0x8efbb3];assertUnambiguousHookDirectoryMappings(_0x57c013['map'](([_0x1b03b0,_0x5de580])=>({'alias':_0x1b03b0,'datasetCode':_0x5de580})));const _0x854a7d=new Map(),_0x4ddaf4=new Map();for(const _0x4b1418 of _0x46528c){appendUnique(_0x854a7d,directoryIdentity(_0x4b1418[_0x4fd9e7(0xd7)]),_0x4b1418,_0x107904=>_0x107904[_0x4fd9e7(0xd7)]);}for(const [_0x267c65,_0x528a30]of _0x57c013){appendUnique(_0x4ddaf4,directoryIdentity(_0x267c65),_0x528a30,_0x25336e=>_0x25336e);}return{'datasetCodeToDatasets':_0x854a7d,'aliasToDatasetCodes':_0x4ddaf4};}export function resolvePushHookDirectory(_0xce70c9,_0x7053c4,_0x358c49){const _0x195b1e=a281_0x3254,_0x1fb9cb=directoryIdentity(_0xce70c9),_0x393b01=_0x358c49[_0x195b1e(0xc9)][_0x195b1e(0xd0)](_0x1fb9cb)??[],_0x2f70d1=_0x358c49['aliasToDatasetCodes'][_0x195b1e(0xd0)](_0x1fb9cb)??[],_0x1241ad=new Set([..._0x393b01[_0x195b1e(0xe9)](_0x1ab7fb=>_0x1ab7fb[_0x195b1e(0xd7)]),..._0x2f70d1]);if(_0x1241ad[_0x195b1e(0xdd)]>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS',_0x195b1e(0xe1)+_0xce70c9+_0x195b1e(0xe2),{'directoryName':_0xce70c9,'datasetCodes':[..._0x1241ad]});const _0x2be483=[..._0x1241ad][0x0];if(_0x2be483&&_0x7053c4?.['datasetCode']&&_0x2be483!==_0x7053c4[_0x195b1e(0xcf)])throw hookDirectoryError(_0x195b1e(0xd8),_0x195b1e(0xe1)+_0xce70c9+'\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22'+_0x7053c4['datasetCode']+_0x195b1e(0xdf)+_0x2be483+'\x22.',{'directoryName':_0xce70c9,'datasetCode':_0x2be483,'lockedDatasetCode':_0x7053c4[_0x195b1e(0xcf)]});const _0xaea957=_0x2be483?findDatasetByCode(_0x358c49,_0x2be483):undefined,_0x53be19=!!_0x2be483&&_0x2f70d1[_0x195b1e(0xe5)](_0x2be483);if(_0xaea957)return{'dataset':_0xaea957,'datasetCode':_0xaea957[_0x195b1e(0xd7)],..._0x53be19?{'alias':_0xce70c9}:{},'directoryProtocol':_0x53be19?_0x195b1e(0xf1):_0x195b1e(0xcf),'warnings':[]};const _0x888a0f=_0x7053c4?.[_0x195b1e(0xcf)];if(_0x888a0f){const _0x2754c7=findDatasetByCode(_0x358c49,_0x888a0f);if(_0x2754c7)return{'dataset':_0x2754c7,'datasetCode':_0x2754c7[_0x195b1e(0xd7)],..._0x7053c4['alias']?{'alias':_0x7053c4[_0x195b1e(0xf1)]}:{},'directoryProtocol':_0x7053c4[_0x195b1e(0xf1)]?_0x195b1e(0xf1):_0x195b1e(0xcf),'warnings':[]};}if(_0x2be483||_0x888a0f){const _0x746d79=_0x2be483??_0x888a0f;throw hookDirectoryError(_0x195b1e(0xe3),'HOOK\x20directory\x20\x22'+_0xce70c9+_0x195b1e(0xd6),{'directoryName':_0xce70c9,'datasetCode':_0x746d79});}throw hookDirectoryError(_0x195b1e(0xd1),_0x195b1e(0xc7)+_0xce70c9+'\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.',{'directoryName':_0xce70c9});}function a281_0x1798(){const _0x7e7fd9=['code','HOOK_MAPPING_DRIFT','HOOK_DUPLICATE_DIRECTORIES','3706700TAGULE','Incomplete\x20HOOK\x20path:\x20','5202897NgXiJp','size','12ymSClK','\x22\x20to\x20\x22','push','HOOK\x20directory\x20\x22','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','HOOK_DATASET_NOT_FOUND','lockKey','includes','toLowerCase','set','67697GBSjZS','map','Dataset\x20\x22','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','message','SDK\x20alias\x20\x22','HOOK','1035666Tnmtht','Dataset\x20code\x20\x22','alias','HOOK_ALIAS_AMBIGUOUS','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','type','169335zNRALu','NFC','2988584izFItu','name','HOOK_DATASET_CODE_AMBIGUOUS','normalize','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','values','datasetCodeToDatasets','\x22\x20resolves\x20to\x20multiple\x20Datasets.','join','some','add','split','datasetCode','get','HOOK_DIRECTORY_UNRESOLVED','functions','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','7019248JmSUxd','entries','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.'];a281_0x1798=function(){return _0x7e7fd9;};return a281_0x1798();}export function preflightPushHookDirectories(_0x4b01a4,_0x2f22bb,_0x4205b0,_0x50d5fb){const _0x57bc9f=a281_0x3254,_0xf6e6d7=new Map(),_0x181548=new Map();for(const _0x3a4eae of _0x4b01a4){if(_0x3a4eae[_0x57bc9f(0xf4)]!==_0x57bc9f(0xee))continue;const _0x44492b=_0x3a4eae[_0x57bc9f(0xf1)];if(!_0x44492b)throw hookDirectoryError(_0x57bc9f(0xd1),_0x57bc9f(0xdb)+_0x3a4eae[_0x57bc9f(0xe4)],{'lockKey':_0x3a4eae[_0x57bc9f(0xe4)]});let _0x5b8b0e;try{_0x5b8b0e=resolvePushHookDirectory(_0x44492b,_0x2f22bb[_0x57bc9f(0xd2)][_0x3a4eae[_0x57bc9f(0xe4)]],_0x4205b0);}catch(_0x1ae17b){if(_0x50d5fb&&_0x1ae17b instanceof CliError&&[_0x57bc9f(0xe3),_0x57bc9f(0xd1)][_0x57bc9f(0xe5)](_0x1ae17b[_0x57bc9f(0xd7)])){_0x50d5fb[_0x57bc9f(0xe7)](_0x3a4eae[_0x57bc9f(0xe4)],_0x1ae17b[_0x57bc9f(0xec)]);continue;}throw _0x1ae17b;}_0xf6e6d7['set'](_0x3a4eae[_0x57bc9f(0xe4)],_0x5b8b0e);const _0x482f25=_0x181548[_0x57bc9f(0xd0)](_0x5b8b0e[_0x57bc9f(0xcf)])??new Set();_0x482f25[_0x57bc9f(0xcd)](_0x44492b),_0x181548[_0x57bc9f(0xe7)](_0x5b8b0e[_0x57bc9f(0xcf)],_0x482f25);}for(const [_0x3054d1,_0x1e0634]of _0x181548){if(_0x1e0634['size']>0x1)throw hookDirectoryError(_0x57bc9f(0xd9),_0x57bc9f(0xea)+_0x3054d1+_0x57bc9f(0xf3)+[..._0x1e0634][_0x57bc9f(0xcb)](',\x20')+'.',{'datasetCode':_0x3054d1,'directories':[..._0x1e0634]});}return _0xf6e6d7;}export function hookDirectoryError(_0x3f067f,_0x12e0ea,_0x317842){const _0x1a69c0=new CliError(_0x3f067f,0x2,_0x3f067f+':\x20'+_0x12e0ea);return _0x1a69c0['details']=_0x317842,_0x1a69c0;}function findDatasetByCode(_0x1cc408,_0x20f49f){const _0xd6b3cb=a281_0x3254,_0x9df8ed=_0x1cc408[_0xd6b3cb(0xc9)][_0xd6b3cb(0xd0)](directoryIdentity(_0x20f49f))??[];if(_0x9df8ed['length']>0x1)throw hookDirectoryError(_0xd6b3cb(0xc5),_0xd6b3cb(0xf0)+_0x20f49f+_0xd6b3cb(0xd3),{'datasetCode':_0x20f49f,'candidates':_0x9df8ed[_0xd6b3cb(0xe9)](datasetFact)});return _0x9df8ed[0x0];}function a281_0x3254(_0xb85f85,_0x3701ea){_0xb85f85=_0xb85f85-0xc3;const _0x17986f=a281_0x1798();let _0x3254ad=_0x17986f[_0xb85f85];return _0x3254ad;}function directoryIdentity(_0x529445){const _0x22bb4e=a281_0x3254;return _0x529445[_0x22bb4e(0xc6)](_0x22bb4e(0xf6))[_0x22bb4e(0xe6)]();}function appendUnique(_0x173887,_0x1b1071,_0x4aa76d,_0x26b77d){const _0x41ac62=a281_0x3254,_0x10f7d4=_0x173887[_0x41ac62(0xd0)](_0x1b1071)??[];!_0x10f7d4[_0x41ac62(0xcc)](_0x4c1372=>_0x26b77d(_0x4c1372)===_0x26b77d(_0x4aa76d))&&_0x10f7d4[_0x41ac62(0xe0)](_0x4aa76d),_0x173887[_0x41ac62(0xe7)](_0x1b1071,_0x10f7d4);}function datasetFact(_0x4549d1){const _0x4a3b07=a281_0x3254;return{'id':_0x4549d1['id'],'name':_0x4549d1[_0x4a3b07(0xc4)],'datasetCode':_0x4549d1[_0x4a3b07(0xd7)]};}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a282_0x431b(){const _0x3a3786=['4003173tnvTev','\x22.\x20','772436DkmWXg','50RxBYwn',':\x20scriptsRoot\x20mismatch\x20—\x20','11trsxiN','lastSync','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','840537BHaQKL','8UsONqs','159756EqiNea','functions','scriptsRoot','stringify','13743670MPCUnY','2dlJvDc','apps','ENOENT','code','2660203BNDJAN','116257PixNbo','utf8','object','current\x20\x22'];a282_0x431b=function(){return _0x3a3786;};return a282_0x431b();}(function(_0x1e508d,_0x59ec12){const _0x272d5b=a282_0xa5bf,_0x4d99ef=_0x1e508d();while(!![]){try{const _0x1fba50=-parseInt(_0x272d5b(0x145))/0x1*(parseInt(_0x272d5b(0x158))/0x2)+parseInt(_0x272d5b(0x151))/0x3+-parseInt(_0x272d5b(0x14b))/0x4+parseInt(_0x272d5b(0x14c))/0x5*(-parseInt(_0x272d5b(0x153))/0x6)+-parseInt(_0x272d5b(0x144))/0x7+-parseInt(_0x272d5b(0x152))/0x8*(parseInt(_0x272d5b(0x149))/0x9)+-parseInt(_0x272d5b(0x157))/0xa*(-parseInt(_0x272d5b(0x14e))/0xb);if(_0x1fba50===_0x59ec12)break;else _0x4d99ef['push'](_0x4d99ef['shift']());}catch(_0x1a1ca8){_0x4d99ef['push'](_0x4d99ef['shift']());}}}(a282_0x431b,0x3e08e));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x5321a6,_0x14b747,_0x5218d5,_0x1c2aaf){const _0xc82af1=a282_0xa5bf,_0x1e62ed={'apps':_0x5321a6[_0xc82af1(0x141)]&&typeof _0x5321a6[_0xc82af1(0x141)]===_0xc82af1(0x147)?_0x5321a6[_0xc82af1(0x141)]:{}};let _0x482ed2=_0x1e62ed[_0xc82af1(0x141)][_0x14b747];if(!_0x482ed2)return _0x482ed2={'scriptsRoot':_0x5218d5,'lastSync':'','functions':{}},_0x1e62ed[_0xc82af1(0x141)][_0x14b747]=_0x482ed2,{'lockData':_0x1e62ed,'appLock':_0x482ed2};if(!_0x482ed2[_0xc82af1(0x155)])_0x482ed2[_0xc82af1(0x155)]=_0x5218d5;else{if(_0x482ed2[_0xc82af1(0x155)]!==_0x5218d5)throw new Error(_0x1c2aaf+_0xc82af1(0x14d)+(_0xc82af1(0x148)+_0x5218d5+'\x22\x20vs\x20lock\x20\x22'+_0x482ed2['scriptsRoot']+_0xc82af1(0x14a))+_0xc82af1(0x150));}return!_0x482ed2[_0xc82af1(0x154)]&&(_0x482ed2[_0xc82af1(0x154)]={}),!_0x482ed2[_0xc82af1(0x14f)]&&(_0x482ed2[_0xc82af1(0x14f)]=''),{'lockData':_0x1e62ed,'appLock':_0x482ed2};}export async function readBffLockFile(_0x415a19){const _0x5502b3=a282_0xa5bf;try{const _0x45d51c=await readFile(_0x415a19,'utf8'),_0x8df084=JSON['parse'](_0x45d51c);return{'apps':_0x8df084['apps']&&typeof _0x8df084[_0x5502b3(0x141)]==='object'?_0x8df084[_0x5502b3(0x141)]:{}};}catch(_0x567bbc){if(_0x567bbc[_0x5502b3(0x143)]===_0x5502b3(0x142))return null;throw new Error('Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20'+String(_0x567bbc));}}function a282_0xa5bf(_0x39e985,_0x43acde){_0x39e985=_0x39e985-0x141;const _0x431bf6=a282_0x431b();let _0xa5bf43=_0x431bf6[_0x39e985];return _0xa5bf43;}export async function writeBffLockFile(_0x3f3888,_0x226d0a){const _0x2e446d=a282_0xa5bf;await mkdir(dirname(_0x3f3888),{'recursive':!![]}),await writeFile(_0x3f3888,JSON[_0x2e446d(0x156)](_0x226d0a,null,0x2),_0x2e446d(0x146));}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a284_0x511b04=a284_0x3382;(function(_0x5169dc,_0x50fed4){const _0x200b2a=a284_0x3382,_0x3cbaec=_0x5169dc();while(!![]){try{const _0x17a376=parseInt(_0x200b2a(0x158))/0x1+-parseInt(_0x200b2a(0x162))/0x2*(parseInt(_0x200b2a(0x156))/0x3)+parseInt(_0x200b2a(0x161))/0x4+-parseInt(_0x200b2a(0x160))/0x5+parseInt(_0x200b2a(0x154))/0x6+parseInt(_0x200b2a(0x159))/0x7*(-parseInt(_0x200b2a(0x151))/0x8)+parseInt(_0x200b2a(0x14f))/0x9;if(_0x17a376===_0x50fed4)break;else _0x3cbaec['push'](_0x3cbaec['shift']());}catch(_0x14e18b){_0x3cbaec['push'](_0x3cbaec['shift']());}}}(a284_0x177b,0x3e58e));export const DEFAULT_BFF_SCRIPT_DESCRIPTION='TODO:\x20补充脚本功能描述';const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION=a284_0x511b04(0x163);export function snakeToCamel(_0x3f8b49){const _0x59617b=a284_0x511b04;return _0x3f8b49['toLowerCase']()[_0x59617b(0x15e)](/_([a-z])/g,(_0x59b9df,_0x1b296e)=>_0x1b296e['toUpperCase']());}export function findHookLocationByRemoteId(_0x198483,_0x4d66d7){const _0x1c12dc=a284_0x511b04;if(!_0x4d66d7)return undefined;for(const [_0x30f90d,_0x55eafa]of Object[_0x1c12dc(0x15c)](_0x198483)){if(_0x55eafa['remoteId']===_0x4d66d7&&_0x55eafa['datasetCode']&&_0x55eafa[_0x1c12dc(0x153)]&&_0x55eafa[_0x1c12dc(0x15d)]){const _0x2ffe85=_0x30f90d[_0x1c12dc(0x15f)]('/')[0x1];return{'alias':_0x2ffe85||_0x55eafa['alias'],'datasetCode':_0x55eafa['datasetCode'],'operationType':_0x55eafa['operationType'],'functionNode':_0x55eafa['functionNode']};}}return undefined;}function a284_0x177b(){const _0x1160cc=['functionNode','replace','split','2199350TXAHJA','45516LOuyql','170BUfqXy','TODO:\x20add\x20script\x20description','after','9215334fhgdRU','before','667832wPstmY','startsWith','operationType','2377818AQbfwu','trim','17211UskBpS','toLowerCase','1718DKujtn','21tVbqKv','some','test','entries'];a284_0x177b=function(){return _0x1160cc;};return a284_0x177b();}function a284_0x3382(_0x4297a3,_0x53d7a7){_0x4297a3=_0x4297a3-0x14f;const _0x177bd3=a284_0x177b();let _0x3382ee=_0x177bd3[_0x4297a3];return _0x3382ee;}export function extractScriptDescription(_0x5ad072){const _0x4c635b=a284_0x511b04,_0x4e3549=_0x5ad072['match'](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x4e3549?.[0x1])return undefined;const _0x19abb8=_0x4e3549[0x1],_0x56e79b=_0x260108=>{const _0x17fba8=a284_0x3382,_0xc58e4d=_0x260108?.[_0x17fba8(0x155)]();if(!_0xc58e4d||_0xc58e4d===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0xc58e4d===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0xc58e4d;},_0xc7e01f=_0x19abb8['match'](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0xc7e01f)return _0x56e79b(_0xc7e01f[0x1]);const _0x3e3012=_0x19abb8[_0x4c635b(0x15f)](/\r?\n/)['map'](_0x30a588=>_0x30a588['replace'](/^\s*\*\s?/,'')[_0x4c635b(0x155)]()),_0x37bf98=_0x3e3012[_0x4c635b(0x15a)](_0x2cfbb0=>/^\[\s*脚本类型\s*]\s*\S+/[_0x4c635b(0x15b)](_0x2cfbb0))&&_0x3e3012['some'](_0x53e347=>/^\[\s*脚本名称\s*]\s*\S+/[_0x4c635b(0x15b)](_0x53e347));if(!_0x37bf98)return undefined;for(const _0x3b6e76 of _0x3e3012){if(!_0x3b6e76||_0x3b6e76[_0x4c635b(0x152)]('@')||/^\[[^\]]+]\s*/[_0x4c635b(0x15b)](_0x3b6e76))continue;return _0x56e79b(_0x3b6e76);}return undefined;}export function isValidBffFunctionName(_0x3718bd){const _0x2f8c69=a284_0x511b04;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x2f8c69(0x15b)](_0x3718bd);}export function normalizeHookFunctionNode(_0x20fe7e){const _0x1856bd=a284_0x511b04;if(!_0x20fe7e)return undefined;const _0x33793c=_0x20fe7e[_0x1856bd(0x155)]()[_0x1856bd(0x157)]();if(_0x33793c===_0x1856bd(0x150)||_0x33793c===_0x1856bd(0x164))return _0x33793c;return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a285_0x1df8dc=a285_0x1415;(function(_0x1fe1ad,_0x7b10cd){const _0x41bb30=a285_0x1415,_0xaadb4f=_0x1fe1ad();while(!![]){try{const _0x59f9fe=-parseInt(_0x41bb30(0x1bf))/0x1+parseInt(_0x41bb30(0x1c3))/0x2+parseInt(_0x41bb30(0x1c8))/0x3+-parseInt(_0x41bb30(0x1c4))/0x4+parseInt(_0x41bb30(0x1c2))/0x5*(parseInt(_0x41bb30(0x1c1))/0x6)+-parseInt(_0x41bb30(0x1c5))/0x7*(parseInt(_0x41bb30(0x1c7))/0x8)+parseInt(_0x41bb30(0x1c6))/0x9;if(_0x59f9fe===_0x7b10cd)break;else _0xaadb4f['push'](_0xaadb4f['shift']());}catch(_0x36775e){_0xaadb4f['push'](_0xaadb4f['shift']());}}}(a285_0x4001,0x8e163));function a285_0x1415(_0x3456d1,_0x213856){_0x3456d1=_0x3456d1-0x1bf;const _0x40013b=a285_0x4001();let _0x141542=_0x40013b[_0x3456d1];return _0x141542;}export const CROSS_DB_RELATION_PATHS={'list':a285_0x1df8dc(0x1c9),'create':'/smartapi/cross-db-relation/create','update':'/smartapi/cross-db-relation/update','delete':a285_0x1df8dc(0x1c0)};function a285_0x4001(){const _0x2fc3e3=['513501BPjWDr','/smartapi/cross-db-relation/query','733527gKqAWI','/smartapi/cross-db-relation/delete','6KUhsyO','529195qHOhvz','952826qljkMw','334212pGsvul','1666IxprRc','16013178GddwKo','38104nhhqxB'];a285_0x4001=function(){return _0x2fc3e3;};return a285_0x4001();}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5d7088,_0x2b88f9){const _0x51eace=a286_0x167d,_0x3a5796=_0x5d7088();while(!![]){try{const _0x3e2c34=-parseInt(_0x51eace(0xab))/0x1*(parseInt(_0x51eace(0x9c))/0x2)+-parseInt(_0x51eace(0x9d))/0x3*(parseInt(_0x51eace(0xb0))/0x4)+parseInt(_0x51eace(0xa3))/0x5+parseInt(_0x51eace(0xa7))/0x6*(parseInt(_0x51eace(0x9a))/0x7)+parseInt(_0x51eace(0xa8))/0x8+-parseInt(_0x51eace(0xaf))/0x9+parseInt(_0x51eace(0x99))/0xa*(parseInt(_0x51eace(0xa1))/0xb);if(_0x3e2c34===_0x2b88f9)break;else _0x3a5796['push'](_0x3a5796['shift']());}catch(_0x2de0ec){_0x3a5796['push'](_0x3a5796['shift']());}}}(a286_0x4a1c,0xd1545));import{listDatasets}from'../core/api-client.js';function a286_0x167d(_0x6794c6,_0x4d3c0c){_0x6794c6=_0x6794c6-0x99;const _0x4a1ce6=a286_0x4a1c();let _0x167df0=_0x4a1ce6[_0x6794c6];return _0x167df0;}const cache=new Map();export async function listDatabases(_0x8f989b){const _0x213461=a286_0x167d;if(cache[_0x213461(0x9e)](_0x8f989b))return cache['get'](_0x8f989b);const _0x59baab=await listDatasets(_0x8f989b),_0xd649bd=new Map();for(const _0x2e2481 of _0x59baab){const _0x1586f5=_0x2e2481[_0x213461(0xa2)];_0x1586f5?.[_0x213461(0x9f)]!=null&&_0xd649bd[_0x213461(0xb2)](_0x1586f5[_0x213461(0x9f)],_0x1586f5[_0x213461(0xa5)]??'db-'+_0x1586f5[_0x213461(0x9f)]);}const _0x3ba6f3=[..._0xd649bd[_0x213461(0xa6)]()][_0x213461(0xad)](([_0x2a8922,_0x263da6])=>({'dbId':_0x2a8922,'dbName':_0x263da6}));return cache[_0x213461(0xb2)](_0x8f989b,_0x3ba6f3),_0x3ba6f3;}export async function resolveDb(_0x4742ee,_0x3e3acd){const _0x408869=a286_0x167d,_0x39ce2c=await listDatabases(_0x4742ee);if(_0x39ce2c[_0x408869(0xb1)]===0x0)return{'resolved':[],'error':_0x408869(0xa4)+_0x4742ee+'\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.'};if(!_0x3e3acd)return{'resolved':_0x39ce2c};const _0x487336=Number(_0x3e3acd);if(!Number['isNaN'](_0x487336)){const _0x432419=_0x39ce2c['find'](_0x6d42b1=>_0x6d42b1[_0x408869(0x9f)]===_0x487336);if(_0x432419)return{'resolved':[_0x432419]};}const _0x3c671b=_0x3e3acd[_0x408869(0xb4)](),_0x5401b8=_0x39ce2c['filter'](_0x1433e6=>_0x1433e6[_0x408869(0xa5)][_0x408869(0xb4)]()[_0x408869(0xaa)](_0x3c671b));if(_0x5401b8[_0x408869(0xb1)]>0x0)return{'resolved':_0x5401b8};const _0x32893a=_0x39ce2c[_0x408869(0xad)](_0x55d7d3=>_0x55d7d3[_0x408869(0xa5)]+'\x20('+_0x55d7d3['dbId']+')')[_0x408869(0xa0)](',\x20');return{'resolved':[],'error':_0x408869(0x9b)+_0x3e3acd+'\x22\x20under\x20app\x20\x22'+_0x4742ee+'\x22.\x20Available:\x20'+_0x32893a+_0x408869(0xae)};}function a286_0x4a1c(){const _0x5cfbb2=['dbtableConfig','6629905XSWoUJ','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','dbName','entries','4777524cEBEwb','2209880ScLZbL','\x22\x20matches\x20multiple\x20databases:\x20','includes','639qwNDFo','find','map','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','3505140glKXhd','731144mIMfka','length','set','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','toLowerCase','603580cZNOlD','7vcmDSJ','No\x20database\x20matching\x20\x22','2838XwvisT','6pgkggF','has','dbId','join','22dJObkq'];a286_0x4a1c=function(){return _0x5cfbb2;};return a286_0x4a1c();}export async function resolveOneDb(_0x3f9b30,_0x3dfa4d){const _0x3eeaa4=a286_0x167d,{resolved:_0x506d2b,error:_0x25d5b7}=await resolveDb(_0x3f9b30,_0x3dfa4d);if(_0x25d5b7)return{'db':null,'error':_0x25d5b7};if(_0x506d2b[_0x3eeaa4(0xb1)]===0x1)return{'db':_0x506d2b[0x0]};if(!_0x3dfa4d){const _0x1970aa=_0x506d2b['map'](_0x328f5f=>_0x328f5f[_0x3eeaa4(0xa5)]+'\x20('+_0x328f5f[_0x3eeaa4(0x9f)]+')')['join'](',\x20');return{'db':null,'error':_0x3eeaa4(0xb3)+_0x1970aa};}const _0x20b028=_0x506d2b[_0x3eeaa4(0xad)](_0x37a2e9=>_0x37a2e9[_0x3eeaa4(0xa5)]+'\x20('+_0x37a2e9[_0x3eeaa4(0x9f)]+')')[_0x3eeaa4(0xa0)](',\x20');return{'db':null,'error':'\x22'+_0x3dfa4d+_0x3eeaa4(0xa9)+_0x20b028+'.\x20Be\x20more\x20specific.'};}export async function getDbName(_0x29f78e,_0x44e7c2){const _0x33f96a=a286_0x167d,_0x191118=await listDatabases(_0x29f78e);return _0x191118[_0x33f96a(0xac)](_0x432121=>_0x432121[_0x33f96a(0x9f)]===_0x44e7c2)?.['dbName'];}
|