@lovrabet/rabetbase-cli 2.5.7-beta.1 → 2.5.8-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/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-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 +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/core/bff/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a289_0x14f8(_0x1b6afb,_0x123061){_0x1b6afb=_0x1b6afb-0x149;const _0x3eac65=a289_0x3eac();let _0x14f82e=_0x3eac65[_0x1b6afb];return _0x14f82e;}const a289_0x4b933c=a289_0x14f8;(function(_0x2b8b62,_0x1e31a2){const _0x11b43d=a289_0x14f8,_0x37490e=_0x2b8b62();while(!![]){try{const _0x15ba49=-parseInt(_0x11b43d(0x153))/0x1*(-parseInt(_0x11b43d(0x14c))/0x2)+parseInt(_0x11b43d(0x14b))/0x3+parseInt(_0x11b43d(0x152))/0x4*(-parseInt(_0x11b43d(0x150))/0x5)+parseInt(_0x11b43d(0x14d))/0x6+parseInt(_0x11b43d(0x14f))/0x7*(-parseInt(_0x11b43d(0x14a))/0x8)+-parseInt(_0x11b43d(0x14e))/0x9+-parseInt(_0x11b43d(0x156))/0xa;if(_0x15ba49===_0x1e31a2)break;else _0x37490e['push'](_0x37490e['shift']());}catch(_0x25a874){_0x37490e['push'](_0x37490e['shift']());}}}(a289_0x3eac,0x966e4));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR='.rabetbase',LOCK_FILE_NAME=a289_0x4b933c(0x151),TRASH_DIR_NAME=a289_0x4b933c(0x149);function a289_0x3eac(){const _0x2e5742=['360VwHpKe','2614260wBPzwB','304462MfJATP','5402574WGUPbs','900621kASeDA','138194vlxeCo','1064560CjVXTo','bff.lock.json','4LQIQyi','1xNHHvD','/bff','bff','1065450xyHVAb','bff-trash'];a289_0x3eac=function(){return _0x2e5742;};return a289_0x3eac();}export function loadBffProjectConfig(_0x282ca7,_0x4be4f2){const _0x147fb9=a289_0x4b933c,_0x505c7a=resolve(_0x4be4f2??findProjectRootDirectory()),_0x4d6679=DOT_DIR+_0x147fb9(0x154),_0x45b4a9=_0x4d6679+'/'+_0x282ca7;return{'projectRoot':_0x505c7a,'appCode':_0x282ca7,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x4d6679,'scriptsRoot':_0x45b4a9,'scriptsRootDir':resolve(_0x505c7a,DOT_DIR,_0x147fb9(0x155),_0x282ca7),'lockFilePath':resolve(_0x505c7a,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x505c7a,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a290_0x569e63=a290_0x410a;(function(_0x7da8f2,_0x1b088f){const _0x32d0bb=a290_0x410a,_0x3cf8d7=_0x7da8f2();while(!![]){try{const _0x429f34=parseInt(_0x32d0bb(0x7e))/0x1+parseInt(_0x32d0bb(0xa0))/0x2+parseInt(_0x32d0bb(0x80))/0x3+-parseInt(_0x32d0bb(0x7d))/0x4+parseInt(_0x32d0bb(0x93))/0x5*(parseInt(_0x32d0bb(0x91))/0x6)+-parseInt(_0x32d0bb(0xa4))/0x7*(parseInt(_0x32d0bb(0x8f))/0x8)+parseInt(_0x32d0bb(0x92))/0x9;if(_0x429f34===_0x1b088f)break;else _0x3cf8d7['push'](_0x3cf8d7['shift']());}catch(_0xbff55f){_0x3cf8d7['push'](_0x3cf8d7['shift']());}}}(a290_0xaaf9,0xad188));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_0x569e63(0x8c),a290_0x569e63(0x96),a290_0x569e63(0x7f)];export function normalizeBffType(_0x4ffdd6){const _0x69d313=a290_0x569e63;if(!_0x4ffdd6)return undefined;const _0x358a1e=_0x4ffdd6[_0x69d313(0x82)]()[_0x69d313(0x9e)]();return SUPPORTED_BFF_TYPES[_0x69d313(0xa1)](_0x358a1e)?_0x358a1e:undefined;}async function scanJsFilesRecursively(_0x26a409,_0x2dc252){const _0x395d56=a290_0x569e63,_0x18ff6d=[];try{const _0x5d21bb=await readdir(_0x26a409,{'withFileTypes':!![]});for(const _0x27f3ba of _0x5d21bb){const _0x583d9f=join(_0x26a409,_0x27f3ba['name']);if(_0x27f3ba[_0x395d56(0x9d)]())_0x18ff6d[_0x395d56(0x95)](...await scanJsFilesRecursively(_0x583d9f,_0x2dc252+'/'+_0x27f3ba[_0x395d56(0x99)]));else _0x27f3ba['isFile']()&&_0x27f3ba[_0x395d56(0x99)][_0x395d56(0x7c)](_0x395d56(0x86))&&_0x18ff6d[_0x395d56(0x95)]({'lockKey':_0x2dc252+'/'+_0x27f3ba[_0x395d56(0x99)]['replace'](/\.js$/,''),'filePath':_0x583d9f});}}catch(_0x325432){if(_0x325432[_0x395d56(0x89)]!=='ENOENT')throw _0x325432;}return _0x18ff6d;}function a290_0xaaf9(){const _0x5ce115=['toLowerCase','345116SQTmdX','includes','split','beforeScriptId','233821lzmzyI','test','endsWith','5017464nFWCjq','1183092GEaMmN','HOOK','458454FOEYYf','functionName','trim','map','set','ENOENT','.js','scriptType','isFile','code','datasetCode','get','COMMON','after','every','232Epxhpy','scriptsRootDir','2383146hmvsGB','9237546cyXQzU','5haAnYz','F_OK','push','ENDPOINT','afterScriptId','replace','name','HOOK/','operationType','Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20','isDirectory','toUpperCase'];a290_0xaaf9=function(){return _0x5ce115;};return a290_0xaaf9();}async function scanFlatFunctions(_0x46d9e5,_0x3b7e16){const _0x2f8305=a290_0x569e63,_0x549d99=join(_0x46d9e5[_0x2f8305(0x90)],_0x3b7e16),_0x9fd8=await scanJsFilesRecursively(_0x549d99,_0x3b7e16);return _0x9fd8[_0x2f8305(0x83)](({lockKey:_0x1baa40,filePath:_0x3f5da9})=>({'type':_0x3b7e16,'name':_0x1baa40['split']('/')['at'](-0x1)??'','filePath':_0x3f5da9,'lockKey':_0x1baa40}));}async function scanHookFunctions(_0x5c4512){const _0x25090c=a290_0x569e63,_0x126418=join(_0x5c4512[_0x25090c(0x90)],_0x25090c(0x7f)),_0x37a4c6=[];try{const _0x42c005=await readdir(_0x126418,{'withFileTypes':!![]});for(const _0x4ac18b of _0x42c005){if(!_0x4ac18b[_0x25090c(0x9d)]())continue;const _0x393b63=_0x4ac18b['name'],_0x744192=join(_0x126418,_0x393b63),_0x3d9d32=await readdir(_0x744192,{'withFileTypes':!![]});for(const _0x2fd499 of _0x3d9d32){if(!_0x2fd499[_0x25090c(0x9d)]())continue;const _0x4e10da=_0x2fd499['name'],_0x2f3188=join(_0x744192,_0x4e10da),_0x5b9c26=await readdir(_0x2f3188,{'withFileTypes':!![]});for(const _0x4957db of _0x5b9c26){if(!_0x4957db['isDirectory']())continue;const _0x55fd2f=_0x4957db['name'],_0x33dc4b=join(_0x2f3188,_0x55fd2f),_0x1f71a9=await readdir(_0x33dc4b,{'withFileTypes':!![]});for(const _0x5c9dce of _0x1f71a9){if(!_0x5c9dce[_0x25090c(0x88)]()||!_0x5c9dce['name'][_0x25090c(0x7c)](_0x25090c(0x86)))continue;const _0x1625b3=_0x5c9dce['name'][_0x25090c(0x98)](/\.js$/,'');_0x37a4c6[_0x25090c(0x95)]({'type':_0x25090c(0x7f),'name':_0x1625b3,'filePath':join(_0x33dc4b,_0x5c9dce[_0x25090c(0x99)]),'lockKey':_0x25090c(0x9a)+_0x393b63+'/'+_0x4e10da+'/'+_0x55fd2f+'/'+_0x1625b3,'alias':_0x393b63,'operationType':_0x4e10da,'functionNode':_0x55fd2f});}}}}}catch(_0x5c1575){if(_0x5c1575['code']!==_0x25090c(0x85))throw _0x5c1575;}return _0x37a4c6;}export async function scanLocalBffFunctions(_0x3c9fe6,_0x2e9aa2){const _0x472f1f=a290_0x569e63;if(_0x2e9aa2===_0x472f1f(0x8c)||_0x2e9aa2===_0x472f1f(0x96))return scanFlatFunctions(_0x3c9fe6,_0x2e9aa2);if(_0x2e9aa2===_0x472f1f(0x7f))return scanHookFunctions(_0x3c9fe6);const [_0x394f12,_0x5591d8,_0x413ea5]=await Promise['all']([scanFlatFunctions(_0x3c9fe6,_0x472f1f(0x8c)),scanFlatFunctions(_0x3c9fe6,_0x472f1f(0x96)),scanHookFunctions(_0x3c9fe6)]);return[..._0x394f12,..._0x5591d8,..._0x413ea5];}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x1adb13){const _0x530956=a290_0x569e63;return SAFE_LOCK_KEY_SEGMENT[_0x530956(0x7b)](_0x1adb13)&&_0x1adb13!=='.'&&_0x1adb13!=='..';}export function resolveLocalFilePathFromLockKey(_0x20ebe1,_0xf926e8){const _0x4af76e=a290_0x569e63,_0x1c9b37=_0xf926e8[_0x4af76e(0xa2)]('/');if(!_0x1c9b37['every'](isSafeLockKeySegment))throw new Error(_0x4af76e(0x9c)+_0xf926e8);const _0x3302c7=resolve(join(_0x20ebe1['scriptsRootDir'],..._0x1c9b37)+'.js'),_0x4b85cb=resolve(_0x20ebe1[_0x4af76e(0x90)]);if(_0x3302c7!==_0x4b85cb&&!_0x3302c7['startsWith'](_0x4b85cb+sep))throw new Error('Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20'+_0x3302c7);return _0x3302c7;}function a290_0x410a(_0x1721d9,_0x99151c){_0x1721d9=_0x1721d9-0x7b;const _0xaaf98e=a290_0xaaf9();let _0x410ae8=_0xaaf98e[_0x1721d9];return _0x410ae8;}export function createHookLocationMap(_0x14a729){const _0xe283a8=a290_0x569e63,_0x3706a9=new Map();for(const _0x2a4386 of _0x14a729){_0x2a4386[_0xe283a8(0xa3)]&&_0x3706a9[_0xe283a8(0x84)](_0x2a4386['beforeScriptId'],{'datasetCode':_0x2a4386[_0xe283a8(0x8a)],'operationType':snakeToCamel(_0x2a4386['operationType']),'functionNode':'before'}),_0x2a4386[_0xe283a8(0x97)]&&_0x3706a9[_0xe283a8(0x84)](_0x2a4386['afterScriptId'],{'datasetCode':_0x2a4386[_0xe283a8(0x8a)],'operationType':snakeToCamel(_0x2a4386[_0xe283a8(0x9b)]),'functionNode':_0xe283a8(0x8d)});}return _0x3706a9;}export function resolveRemoteScriptTarget(_0x50cb97,_0x49eb0a,_0x3a81e3,_0x4b70f9,_0x156233){const _0x4dfaaf=a290_0x569e63,_0x3628cc=normalizeBffType(_0x49eb0a[_0x4dfaaf(0x87)]);if(!_0x3628cc||!_0x49eb0a[_0x4dfaaf(0x81)])return null;if(_0x3628cc===_0x4dfaaf(0x7f)){const _0x394d8f=_0x49eb0a['id']?_0x3a81e3['get'](_0x49eb0a['id']):undefined,_0x2c2ba4=findHookLocationByRemoteId(_0x4b70f9,_0x49eb0a['id']),_0x5b32ed=_0x394d8f?{..._0x2c2ba4?.[_0x4dfaaf(0x8a)]===_0x394d8f['datasetCode']?_0x2c2ba4:{},..._0x394d8f}:_0x2c2ba4;if(!_0x5b32ed)return null;const _0x3be7f8=_0x156233[_0x4dfaaf(0x8b)](_0x5b32ed[_0x4dfaaf(0x8a)][_0x4dfaaf(0x9f)]()),_0x4d900b=_0x3be7f8??_0x5b32ed[_0x4dfaaf(0x8a)],_0x203ce8={..._0x5b32ed,'alias':_0x3be7f8},_0x18cb66='HOOK/'+_0x4d900b+'/'+_0x203ce8['operationType']+'/'+_0x203ce8['functionNode']+'/'+_0x49eb0a[_0x4dfaaf(0x81)];if(!_0x18cb66[_0x4dfaaf(0xa2)]('/')[_0x4dfaaf(0x8e)](isSafeLockKeySegment))return null;return{'lockKey':_0x18cb66,'filePath':resolveLocalFilePathFromLockKey(_0x50cb97,_0x18cb66),'type':_0x4dfaaf(0x7f),'hookLocation':_0x203ce8};}const _0x4f43af=_0x3628cc+'/'+_0x49eb0a[_0x4dfaaf(0x81)];if(!_0x4f43af[_0x4dfaaf(0xa2)]('/')[_0x4dfaaf(0x8e)](isSafeLockKeySegment))return null;return{'lockKey':_0x4f43af,'filePath':resolveLocalFilePathFromLockKey(_0x50cb97,_0x4f43af),'type':_0x3628cc};}export async function ensureParentDirectory(_0x353642){await mkdir(dirname(_0x353642),{'recursive':!![]});}export async function fileExists(_0x296723){const _0x4bc6b7=a290_0x569e63;try{return await access(_0x296723,constants[_0x4bc6b7(0x94)]),!![];}catch{return![];}}export async function directoryExists(_0x41d45c){const _0x1dcd01=a290_0x569e63;try{const _0x25281b=await stat(_0x41d45c);return _0x25281b[_0x1dcd01(0x9d)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xcbcadd,_0x1696dc){const _0x5c92c2=a291_0xa650,_0x542ebd=_0xcbcadd();while(!![]){try{const _0x1149bf=parseInt(_0x5c92c2(0xa1))/0x1*(-parseInt(_0x5c92c2(0x9e))/0x2)+parseInt(_0x5c92c2(0xa9))/0x3+-parseInt(_0x5c92c2(0x9f))/0x4+-parseInt(_0x5c92c2(0xa6))/0x5+parseInt(_0x5c92c2(0x9c))/0x6+-parseInt(_0x5c92c2(0xa7))/0x7+parseInt(_0x5c92c2(0xaa))/0x8*(parseInt(_0x5c92c2(0xa3))/0x9);if(_0x1149bf===_0x1696dc)break;else _0x542ebd['push'](_0x542ebd['shift']());}catch(_0x596ac3){_0x542ebd['push'](_0x542ebd['shift']());}}}(a291_0x2d78,0x5045b));import{readFile}from'node:fs/promises';import a291_0x1a591f from'node:crypto';function a291_0xa650(_0x2b7a79,_0x3cfff0){_0x2b7a79=_0x2b7a79-0x9c;const _0x2d780a=a291_0x2d78();let _0xa6500f=_0x2d780a[_0x2b7a79];return _0xa6500f;}function a291_0x2d78(){const _0x4d6d43=['2108827dengIN','digest','1343049NhmUgV','824NsnwZV','340836JrENha','update','746rWMBPu','2025988pwfznz','md5','57mWxHTB','createHash','109323yLFGMl','utf8','hex','2989080BsStuN'];a291_0x2d78=function(){return _0x4d6d43;};return a291_0x2d78();}export function computeContentHash(_0x33577c){const _0x1eeae7=a291_0xa650;return a291_0x1a591f[_0x1eeae7(0xa2)](_0x1eeae7(0xa0))[_0x1eeae7(0x9d)](_0x33577c)[_0x1eeae7(0xa8)](_0x1eeae7(0xa5));}export async function computeFileHash(_0x10ee6e){const _0x3be853=a291_0xa650,_0x1f2cdf=await readFile(_0x10ee6e,_0x3be853(0xa4));return computeContentHash(_0x1f2cdf);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a292_0x3506(_0x5dfac9,_0x498d30){_0x5dfac9=_0x5dfac9-0xfe;const _0x4ae0b9=a292_0x4ae0();let _0x3506dc=_0x4ae0b9[_0x5dfac9];return _0x3506dc;}(function(_0x41f609,_0x4cceed){const _0x3ecca9=a292_0x3506,_0x4fc81c=_0x41f609();while(!![]){try{const _0x16cdd2=parseInt(_0x3ecca9(0x106))/0x1*(-parseInt(_0x3ecca9(0x130))/0x2)+parseInt(_0x3ecca9(0x125))/0x3*(-parseInt(_0x3ecca9(0x104))/0x4)+parseInt(_0x3ecca9(0x12f))/0x5+-parseInt(_0x3ecca9(0x127))/0x6*(-parseInt(_0x3ecca9(0x11f))/0x7)+parseInt(_0x3ecca9(0x123))/0x8*(-parseInt(_0x3ecca9(0x118))/0x9)+parseInt(_0x3ecca9(0x108))/0xa*(-parseInt(_0x3ecca9(0xff))/0xb)+-parseInt(_0x3ecca9(0x11e))/0xc*(-parseInt(_0x3ecca9(0x107))/0xd);if(_0x16cdd2===_0x4cceed)break;else _0x4fc81c['push'](_0x4fc81c['shift']());}catch(_0x4f9c5b){_0x4fc81c['push'](_0x4fc81c['shift']());}}}(a292_0x4ae0,0xb2a84));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x445fb9){const _0x1c0b5d=a292_0x3506,_0x4164ef=[];for(const [_0x1d38a5,_0x5df623]of Object[_0x1c0b5d(0x105)](_0x445fb9[_0x1c0b5d(0x128)])){const [_0x634dd2,_0x2941ea]=_0x1d38a5[_0x1c0b5d(0x134)]('/');if(_0x634dd2!==_0x1c0b5d(0x12e)||!_0x2941ea||!_0x5df623[_0x1c0b5d(0x113)])continue;_0x4164ef[_0x1c0b5d(0x131)]({'alias':_0x2941ea,'datasetCode':_0x5df623[_0x1c0b5d(0x113)]});}return _0x4164ef;}export function uniqueTrackedHookDirectoryByDataset(_0x74e9d1){const _0x3ae5f9=a292_0x3506,_0x390cd5=new Map();for(const _0x85d096 of trackedHookDirectoryMappings(_0x74e9d1)){const _0x311044=directoryIdentity(_0x85d096[_0x3ae5f9(0x113)]),_0x4158c6=_0x390cd5[_0x3ae5f9(0x102)](_0x311044)??new Map();_0x4158c6[_0x3ae5f9(0x12b)](directoryIdentity(_0x85d096[_0x3ae5f9(0x12c)]),_0x85d096[_0x3ae5f9(0x12c)]),_0x390cd5[_0x3ae5f9(0x12b)](_0x311044,_0x4158c6);}const _0x2af711=new Map();for(const [_0x40119a,_0x4d2560]of _0x390cd5){if(_0x4d2560[_0x3ae5f9(0x12a)]>0x1)throw hookDirectoryError(_0x3ae5f9(0x10d),_0x3ae5f9(0x11b)+_0x40119a+_0x3ae5f9(0x111)+[..._0x4d2560[_0x3ae5f9(0x10a)]()][_0x3ae5f9(0x110)](',\x20')+'.',{'datasetCode':_0x40119a,'directories':[..._0x4d2560[_0x3ae5f9(0x10a)]()]});_0x2af711[_0x3ae5f9(0x12b)](_0x40119a,[..._0x4d2560['values']()][0x0]);}return _0x2af711;}export function assertUnambiguousHookDirectoryMappings(_0x55e142){const _0x1112a5=a292_0x3506,_0x1a47a0=new Map();for(const {alias:_0x48d425,datasetCode:_0x110fda}of _0x55e142){const _0x3730e3=directoryIdentity(_0x48d425),_0x3bc47d=_0x1a47a0['get'](_0x3730e3)??new Set();_0x3bc47d['add'](_0x110fda),_0x1a47a0[_0x1112a5(0x12b)](_0x3730e3,_0x3bc47d);}for(const [_0x587244,_0x30ca84]of _0x1a47a0){if(_0x30ca84[_0x1112a5(0x12a)]>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS',_0x1112a5(0x12d)+_0x587244+_0x1112a5(0x112),{'directoryName':_0x587244,'datasetCodes':[..._0x30ca84]});}}export function assertUnambiguousHookAliases(_0x55d3d7){const _0x1fc627=a292_0x3506,_0x4d0546=[..._0x55d3d7],_0x11447f=new Map(),_0x3af9cb=new Map();for(const {alias:_0x25786,datasetCode:_0x5aae94}of _0x4d0546){const _0x47e191=directoryIdentity(_0x25786),_0x125306=directoryIdentity(_0x5aae94),_0x22f1b8=_0x11447f[_0x1fc627(0x102)](_0x47e191)??new Set();_0x22f1b8['add'](_0x5aae94),_0x11447f['set'](_0x47e191,_0x22f1b8);const _0x2da73b=_0x3af9cb['get'](_0x125306)??new Set();_0x2da73b[_0x1fc627(0x133)](_0x25786),_0x3af9cb['set'](_0x125306,_0x2da73b);}for(const [_0x21fca2,_0x52c2d8]of _0x11447f){if(_0x52c2d8[_0x1fc627(0x12a)]>0x1)throw hookDirectoryError(_0x1fc627(0x132),'SDK\x20alias\x20\x22'+_0x21fca2+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'alias':_0x21fca2,'datasetCodes':[..._0x52c2d8]});}for(const [_0x1b55a9,_0x1f744c]of _0x3af9cb){if(_0x1f744c[_0x1fc627(0x12a)]>0x1)throw hookDirectoryError(_0x1fc627(0x132),_0x1fc627(0x11b)+_0x1b55a9+_0x1fc627(0xfe),{'datasetCode':_0x1b55a9,'aliases':[..._0x1f744c]});}}export function buildHookDirectoryIndexes(_0x33b37f,_0x52030c=[]){const _0x1956a6=a292_0x3506,_0x3afafa=[..._0x52030c];assertUnambiguousHookDirectoryMappings(_0x3afafa[_0x1956a6(0x135)](([_0x572b9a,_0x26b691])=>({'alias':_0x572b9a,'datasetCode':_0x26b691})));const _0x344420=new Map(),_0x4e41de=new Map();for(const _0xe859c1 of _0x33b37f){appendUnique(_0x344420,directoryIdentity(_0xe859c1['code']),_0xe859c1,_0x49497b=>_0x49497b[_0x1956a6(0x114)]);}for(const [_0x418d63,_0x5e6511]of _0x3afafa){appendUnique(_0x4e41de,directoryIdentity(_0x418d63),_0x5e6511,_0x544807=>_0x544807);}return{'datasetCodeToDatasets':_0x344420,'aliasToDatasetCodes':_0x4e41de};}function a292_0x4ae0(){const _0x28c43e=['lockKey','Dataset\x20\x22','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','36pfDbez','1557689gBTtUG','NFC','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','HOOK_DIRECTORY_AMBIGUOUS','32984OmkhHZ','aliasToDatasetCodes','139509JgsYXz','details','30lSSEkT','functions','\x22\x20to\x20\x22','size','set','alias','HOOK\x20directory\x20\x22','HOOK','1887410ebIshu','6iVnMtG','push','HOOK_ALIAS_AMBIGUOUS','add','split','map','length','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','11ilfuRr','some','includes','get','HOOK_DATASET_NOT_FOUND','68ONIJHy','entries','78095zBdDhZ','5935891JkFkah','3158290ztaVvX','message','values','HOOK_DIRECTORY_UNRESOLVED','HOOK_MAPPING_DRIFT','HOOK_DUPLICATE_DIRECTORIES','datasetCodeToDatasets','name','join','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','\x22\x20resolves\x20to\x20multiple\x20Datasets.','datasetCode','code','normalize','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','1719tVIHql','toLowerCase'];a292_0x4ae0=function(){return _0x28c43e;};return a292_0x4ae0();}export function resolvePushHookDirectory(_0x424977,_0x5f3099,_0x493158){const _0x338387=a292_0x3506,_0x5e50fb=directoryIdentity(_0x424977),_0xa592de=_0x493158[_0x338387(0x10e)]['get'](_0x5e50fb)??[],_0x2686fc=_0x493158[_0x338387(0x124)]['get'](_0x5e50fb)??[],_0x2b3b05=new Set([..._0xa592de[_0x338387(0x135)](_0x43c56f=>_0x43c56f[_0x338387(0x114)]),..._0x2686fc]);if(_0x2b3b05[_0x338387(0x12a)]>0x1)throw hookDirectoryError(_0x338387(0x122),_0x338387(0x12d)+_0x424977+_0x338387(0x11d),{'directoryName':_0x424977,'datasetCodes':[..._0x2b3b05]});const _0x8fad50=[..._0x2b3b05][0x0];if(_0x8fad50&&_0x5f3099?.[_0x338387(0x113)]&&_0x8fad50!==_0x5f3099['datasetCode'])throw hookDirectoryError(_0x338387(0x10c),'HOOK\x20directory\x20\x22'+_0x424977+_0x338387(0x137)+_0x5f3099[_0x338387(0x113)]+_0x338387(0x129)+_0x8fad50+'\x22.',{'directoryName':_0x424977,'datasetCode':_0x8fad50,'lockedDatasetCode':_0x5f3099[_0x338387(0x113)]});const _0x10cf17=_0x8fad50?findDatasetByCode(_0x493158,_0x8fad50):undefined,_0x2f7361=!!_0x8fad50&&_0x2686fc[_0x338387(0x101)](_0x8fad50);if(_0x10cf17)return{'dataset':_0x10cf17,'datasetCode':_0x10cf17[_0x338387(0x114)],..._0x2f7361?{'alias':_0x424977}:{},'directoryProtocol':_0x2f7361?_0x338387(0x12c):'datasetCode','warnings':[]};const _0x580048=_0x5f3099?.['datasetCode'];if(_0x580048){const _0x32ca87=findDatasetByCode(_0x493158,_0x580048);if(_0x32ca87)return{'dataset':_0x32ca87,'datasetCode':_0x32ca87[_0x338387(0x114)],..._0x5f3099['alias']?{'alias':_0x5f3099[_0x338387(0x12c)]}:{},'directoryProtocol':_0x5f3099[_0x338387(0x12c)]?_0x338387(0x12c):'datasetCode','warnings':[]};}if(_0x8fad50||_0x580048){const _0x2488a1=_0x8fad50??_0x580048;throw hookDirectoryError(_0x338387(0x103),_0x338387(0x12d)+_0x424977+_0x338387(0x116),{'directoryName':_0x424977,'datasetCode':_0x2488a1});}throw hookDirectoryError(_0x338387(0x10b),_0x338387(0x11c)+_0x424977+_0x338387(0x117),{'directoryName':_0x424977});}export function preflightPushHookDirectories(_0x599897,_0x7ed518,_0x38ebde,_0x2cae1c){const _0x2b6525=a292_0x3506,_0x349b97=new Map(),_0x8c12f6=new Map();for(const _0x4f66a8 of _0x599897){if(_0x4f66a8['type']!=='HOOK')continue;const _0x44ebe5=_0x4f66a8[_0x2b6525(0x12c)];if(!_0x44ebe5)throw hookDirectoryError(_0x2b6525(0x10b),'Incomplete\x20HOOK\x20path:\x20'+_0x4f66a8[_0x2b6525(0x11a)],{'lockKey':_0x4f66a8[_0x2b6525(0x11a)]});let _0x21a456;try{_0x21a456=resolvePushHookDirectory(_0x44ebe5,_0x7ed518[_0x2b6525(0x128)][_0x4f66a8[_0x2b6525(0x11a)]],_0x38ebde);}catch(_0x45ce79){if(_0x2cae1c&&_0x45ce79 instanceof CliError&&[_0x2b6525(0x103),_0x2b6525(0x10b)]['includes'](_0x45ce79[_0x2b6525(0x114)])){_0x2cae1c['set'](_0x4f66a8['lockKey'],_0x45ce79[_0x2b6525(0x109)]);continue;}throw _0x45ce79;}_0x349b97['set'](_0x4f66a8[_0x2b6525(0x11a)],_0x21a456);const _0x9296c2=_0x8c12f6['get'](_0x21a456[_0x2b6525(0x113)])??new Set();_0x9296c2['add'](_0x44ebe5),_0x8c12f6[_0x2b6525(0x12b)](_0x21a456['datasetCode'],_0x9296c2);}for(const [_0x1635cb,_0x47ea7b]of _0x8c12f6){if(_0x47ea7b[_0x2b6525(0x12a)]>0x1)throw hookDirectoryError(_0x2b6525(0x10d),'Dataset\x20\x22'+_0x1635cb+'\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20'+[..._0x47ea7b]['join'](',\x20')+'.',{'datasetCode':_0x1635cb,'directories':[..._0x47ea7b]});}return _0x349b97;}export function hookDirectoryError(_0x54902b,_0x8c2a8d,_0x233415){const _0x33d09a=a292_0x3506,_0x22a190=new CliError(_0x54902b,0x2,_0x54902b+':\x20'+_0x8c2a8d);return _0x22a190[_0x33d09a(0x126)]=_0x233415,_0x22a190;}function findDatasetByCode(_0x5d4a8f,_0x1f4c9f){const _0x574285=a292_0x3506,_0x499cca=_0x5d4a8f['datasetCodeToDatasets'][_0x574285(0x102)](directoryIdentity(_0x1f4c9f))??[];if(_0x499cca[_0x574285(0x136)]>0x1)throw hookDirectoryError('HOOK_DATASET_CODE_AMBIGUOUS','Dataset\x20code\x20\x22'+_0x1f4c9f+_0x574285(0x121),{'datasetCode':_0x1f4c9f,'candidates':_0x499cca[_0x574285(0x135)](datasetFact)});return _0x499cca[0x0];}function directoryIdentity(_0x19b36d){const _0x3d38d0=a292_0x3506;return _0x19b36d[_0x3d38d0(0x115)](_0x3d38d0(0x120))[_0x3d38d0(0x119)]();}function appendUnique(_0x38b927,_0x9976c4,_0x42984f,_0x56ef9f){const _0x107d2a=a292_0x3506,_0x302e39=_0x38b927[_0x107d2a(0x102)](_0x9976c4)??[];!_0x302e39[_0x107d2a(0x100)](_0xee5f2f=>_0x56ef9f(_0xee5f2f)===_0x56ef9f(_0x42984f))&&_0x302e39['push'](_0x42984f),_0x38b927[_0x107d2a(0x12b)](_0x9976c4,_0x302e39);}function datasetFact(_0xf884fb){const _0x4212ea=a292_0x3506;return{'id':_0xf884fb['id'],'name':_0xf884fb[_0x4212ea(0x10f)],'datasetCode':_0xf884fb[_0x4212ea(0x114)]};}
|
|
1
|
+
(function(_0x43ac0b,_0x57d6d6){const _0x5648fe=a292_0x3c67,_0x3f672f=_0x43ac0b();while(!![]){try{const _0x4a0ca3=-parseInt(_0x5648fe(0xe3))/0x1*(-parseInt(_0x5648fe(0xee))/0x2)+parseInt(_0x5648fe(0xe0))/0x3+parseInt(_0x5648fe(0xd0))/0x4+-parseInt(_0x5648fe(0xf8))/0x5+-parseInt(_0x5648fe(0xd8))/0x6+parseInt(_0x5648fe(0xfb))/0x7+-parseInt(_0x5648fe(0xcf))/0x8*(parseInt(_0x5648fe(0xf9))/0x9);if(_0x4a0ca3===_0x57d6d6)break;else _0x3f672f['push'](_0x3f672f['shift']());}catch(_0x322182){_0x3f672f['push'](_0x3f672f['shift']());}}}(a292_0x2d25,0x61569));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x47f74f){const _0x1bd00f=a292_0x3c67,_0x2b1023=[];for(const [_0x160816,_0x232b13]of Object[_0x1bd00f(0xd2)](_0x47f74f[_0x1bd00f(0xf3)])){const [_0x4ff14e,_0x38abea]=_0x160816['split']('/');if(_0x4ff14e!==_0x1bd00f(0xd9)||!_0x38abea||!_0x232b13[_0x1bd00f(0xe6)])continue;_0x2b1023[_0x1bd00f(0xfe)]({'alias':_0x38abea,'datasetCode':_0x232b13[_0x1bd00f(0xe6)]});}return _0x2b1023;}export function uniqueTrackedHookDirectoryByDataset(_0x2f8b99){const _0x3889f2=a292_0x3c67,_0x59c20f=new Map();for(const _0x1c9558 of trackedHookDirectoryMappings(_0x2f8b99)){const _0x1991f4=directoryIdentity(_0x1c9558['datasetCode']),_0x1a5d0e=_0x59c20f[_0x3889f2(0xff)](_0x1991f4)??new Map();_0x1a5d0e[_0x3889f2(0xf6)](directoryIdentity(_0x1c9558[_0x3889f2(0xe8)]),_0x1c9558[_0x3889f2(0xe8)]),_0x59c20f[_0x3889f2(0xf6)](_0x1991f4,_0x1a5d0e);}const _0x229153=new Map();for(const [_0x36cab8,_0x43c7e4]of _0x59c20f){if(_0x43c7e4[_0x3889f2(0xe9)]>0x1)throw hookDirectoryError(_0x3889f2(0xda),_0x3889f2(0xde)+_0x36cab8+_0x3889f2(0xe7)+[..._0x43c7e4[_0x3889f2(0xd3)]()][_0x3889f2(0xed)](',\x20')+'.',{'datasetCode':_0x36cab8,'directories':[..._0x43c7e4[_0x3889f2(0xd3)]()]});_0x229153[_0x3889f2(0xf6)](_0x36cab8,[..._0x43c7e4[_0x3889f2(0xd3)]()][0x0]);}return _0x229153;}export function assertUnambiguousHookDirectoryMappings(_0x469724){const _0x571cd3=a292_0x3c67,_0x5812f9=new Map();for(const {alias:_0x510d4c,datasetCode:_0x4475db}of _0x469724){const _0xb2e288=directoryIdentity(_0x510d4c),_0x1a0458=_0x5812f9[_0x571cd3(0xff)](_0xb2e288)??new Set();_0x1a0458[_0x571cd3(0xf0)](_0x4475db),_0x5812f9[_0x571cd3(0xf6)](_0xb2e288,_0x1a0458);}for(const [_0x44c2d2,_0xd60b50]of _0x5812f9){if(_0xd60b50[_0x571cd3(0xe9)]>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS','HOOK\x20directory\x20\x22'+_0x44c2d2+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'directoryName':_0x44c2d2,'datasetCodes':[..._0xd60b50]});}}function a292_0x3c67(_0x1f8998,_0xef565d){_0x1f8998=_0x1f8998-0xcf;const _0x2d259b=a292_0x2d25();let _0x3c6731=_0x2d259b[_0x1f8998];return _0x3c6731;}export function assertUnambiguousHookAliases(_0x52c09c){const _0x709f15=a292_0x3c67,_0x99a408=[..._0x52c09c],_0x5853d8=new Map(),_0x484b6d=new Map();for(const {alias:_0x3c9e2b,datasetCode:_0x5886e3}of _0x99a408){const _0x58ca34=directoryIdentity(_0x3c9e2b),_0x2769bd=directoryIdentity(_0x5886e3),_0xb2b8f2=_0x5853d8['get'](_0x58ca34)??new Set();_0xb2b8f2[_0x709f15(0xf0)](_0x5886e3),_0x5853d8['set'](_0x58ca34,_0xb2b8f2);const _0x474745=_0x484b6d[_0x709f15(0xff)](_0x2769bd)??new Set();_0x474745[_0x709f15(0xf0)](_0x3c9e2b),_0x484b6d[_0x709f15(0xf6)](_0x2769bd,_0x474745);}for(const [_0x1e9d98,_0x5c3936]of _0x5853d8){if(_0x5c3936[_0x709f15(0xe9)]>0x1)throw hookDirectoryError(_0x709f15(0xfa),_0x709f15(0xfd)+_0x1e9d98+_0x709f15(0xe1),{'alias':_0x1e9d98,'datasetCodes':[..._0x5c3936]});}for(const [_0x29236c,_0x356db8]of _0x484b6d){if(_0x356db8[_0x709f15(0xe9)]>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS',_0x709f15(0xde)+_0x29236c+_0x709f15(0xf1),{'datasetCode':_0x29236c,'aliases':[..._0x356db8]});}}export function buildHookDirectoryIndexes(_0x212274,_0x4c6702=[]){const _0x388455=a292_0x3c67,_0x4b7f7e=[..._0x4c6702];assertUnambiguousHookDirectoryMappings(_0x4b7f7e[_0x388455(0xea)](([_0x386818,_0x344505])=>({'alias':_0x386818,'datasetCode':_0x344505})));const _0x48e55d=new Map(),_0x177d3b=new Map();for(const _0x396809 of _0x212274){appendUnique(_0x48e55d,directoryIdentity(_0x396809[_0x388455(0xdc)]),_0x396809,_0x3ebd91=>_0x3ebd91[_0x388455(0xdc)]);}for(const [_0x294c1f,_0x4f5aa5]of _0x4b7f7e){appendUnique(_0x177d3b,directoryIdentity(_0x294c1f),_0x4f5aa5,_0x209379=>_0x209379);}return{'datasetCodeToDatasets':_0x48e55d,'aliasToDatasetCodes':_0x177d3b};}export function resolvePushHookDirectory(_0x13922c,_0x34d21e,_0x35e9a5){const _0x2cd656=a292_0x3c67,_0xa303b4=directoryIdentity(_0x13922c),_0x4abab9=_0x35e9a5[_0x2cd656(0xec)][_0x2cd656(0xff)](_0xa303b4)??[],_0x44f0e2=_0x35e9a5[_0x2cd656(0xf7)]['get'](_0xa303b4)??[],_0x257fb7=new Set([..._0x4abab9[_0x2cd656(0xea)](_0x4dcce8=>_0x4dcce8[_0x2cd656(0xdc)]),..._0x44f0e2]);if(_0x257fb7[_0x2cd656(0xe9)]>0x1)throw hookDirectoryError(_0x2cd656(0xdd),_0x2cd656(0xd5)+_0x13922c+'\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.',{'directoryName':_0x13922c,'datasetCodes':[..._0x257fb7]});const _0x171486=[..._0x257fb7][0x0];if(_0x171486&&_0x34d21e?.[_0x2cd656(0xe6)]&&_0x171486!==_0x34d21e['datasetCode'])throw hookDirectoryError('HOOK_MAPPING_DRIFT',_0x2cd656(0xd5)+_0x13922c+'\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22'+_0x34d21e[_0x2cd656(0xe6)]+'\x22\x20to\x20\x22'+_0x171486+'\x22.',{'directoryName':_0x13922c,'datasetCode':_0x171486,'lockedDatasetCode':_0x34d21e['datasetCode']});const _0x1139af=_0x171486?findDatasetByCode(_0x35e9a5,_0x171486):undefined,_0x3a875c=!!_0x171486&&_0x44f0e2[_0x2cd656(0xd1)](_0x171486);if(_0x1139af)return{'dataset':_0x1139af,'datasetCode':_0x1139af[_0x2cd656(0xdc)],..._0x3a875c?{'alias':_0x13922c}:{},'directoryProtocol':_0x3a875c?_0x2cd656(0xe8):_0x2cd656(0xe6),'warnings':[]};const _0x54328e=_0x34d21e?.['datasetCode'];if(_0x54328e){const _0x135eb5=findDatasetByCode(_0x35e9a5,_0x54328e);if(_0x135eb5)return{'dataset':_0x135eb5,'datasetCode':_0x135eb5['code'],..._0x34d21e[_0x2cd656(0xe8)]?{'alias':_0x34d21e[_0x2cd656(0xe8)]}:{},'directoryProtocol':_0x34d21e['alias']?_0x2cd656(0xe8):_0x2cd656(0xe6),'warnings':[]};}if(_0x171486||_0x54328e){const _0x527e88=_0x171486??_0x54328e;throw hookDirectoryError(_0x2cd656(0xf4),'HOOK\x20directory\x20\x22'+_0x13922c+_0x2cd656(0xd4),{'directoryName':_0x13922c,'datasetCode':_0x527e88});}throw hookDirectoryError(_0x2cd656(0xe2),_0x2cd656(0xf5)+_0x13922c+'\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.',{'directoryName':_0x13922c});}export function preflightPushHookDirectories(_0x4cbe8a,_0x4d4b7e,_0x469d2d,_0x4d7f4e){const _0x36251c=a292_0x3c67,_0x153aeb=new Map(),_0x8fbefd=new Map();for(const _0x379015 of _0x4cbe8a){if(_0x379015[_0x36251c(0xeb)]!==_0x36251c(0xd9))continue;const _0x226c16=_0x379015[_0x36251c(0xe8)];if(!_0x226c16)throw hookDirectoryError(_0x36251c(0xe2),'Incomplete\x20HOOK\x20path:\x20'+_0x379015['lockKey'],{'lockKey':_0x379015[_0x36251c(0xe4)]});let _0x2cd778;try{_0x2cd778=resolvePushHookDirectory(_0x226c16,_0x4d4b7e[_0x36251c(0xf3)][_0x379015[_0x36251c(0xe4)]],_0x469d2d);}catch(_0x47e2cf){if(_0x4d7f4e&&_0x47e2cf instanceof CliError&&[_0x36251c(0xf4),'HOOK_DIRECTORY_UNRESOLVED'][_0x36251c(0xd1)](_0x47e2cf[_0x36251c(0xdc)])){_0x4d7f4e[_0x36251c(0xf6)](_0x379015['lockKey'],_0x47e2cf[_0x36251c(0xdb)]);continue;}throw _0x47e2cf;}_0x153aeb[_0x36251c(0xf6)](_0x379015['lockKey'],_0x2cd778);const _0x2f7bc9=_0x8fbefd[_0x36251c(0xff)](_0x2cd778[_0x36251c(0xe6)])??new Set();_0x2f7bc9[_0x36251c(0xf0)](_0x226c16),_0x8fbefd[_0x36251c(0xf6)](_0x2cd778[_0x36251c(0xe6)],_0x2f7bc9);}for(const [_0x29f390,_0x261b3a]of _0x8fbefd){if(_0x261b3a[_0x36251c(0xe9)]>0x1)throw hookDirectoryError(_0x36251c(0xda),_0x36251c(0xde)+_0x29f390+'\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20'+[..._0x261b3a]['join'](',\x20')+'.',{'datasetCode':_0x29f390,'directories':[..._0x261b3a]});}return _0x153aeb;}export function hookDirectoryError(_0x1c0501,_0x4dae75,_0x568195){const _0x5ae73b=a292_0x3c67,_0x2095b3=new CliError(_0x1c0501,0x2,_0x1c0501+':\x20'+_0x4dae75);return _0x2095b3[_0x5ae73b(0xe5)]=_0x568195,_0x2095b3;}function findDatasetByCode(_0x3283c7,_0x35ff61){const _0x111405=a292_0x3c67,_0x15c5c8=_0x3283c7[_0x111405(0xec)][_0x111405(0xff)](directoryIdentity(_0x35ff61))??[];if(_0x15c5c8[_0x111405(0xfc)]>0x1)throw hookDirectoryError('HOOK_DATASET_CODE_AMBIGUOUS',_0x111405(0xd6)+_0x35ff61+_0x111405(0xdf),{'datasetCode':_0x35ff61,'candidates':_0x15c5c8[_0x111405(0xea)](datasetFact)});return _0x15c5c8[0x0];}function directoryIdentity(_0x3c51c6){const _0xac2a83=a292_0x3c67;return _0x3c51c6[_0xac2a83(0xf2)](_0xac2a83(0xd7))[_0xac2a83(0xef)]();}function appendUnique(_0x437cbe,_0x239c39,_0x9c91e6,_0x20e747){const _0x443530=_0x437cbe['get'](_0x239c39)??[];!_0x443530['some'](_0x586584=>_0x20e747(_0x586584)===_0x20e747(_0x9c91e6))&&_0x443530['push'](_0x9c91e6),_0x437cbe['set'](_0x239c39,_0x443530);}function datasetFact(_0x4112a0){const _0x17ef25=a292_0x3c67;return{'id':_0x4112a0['id'],'name':_0x4112a0['name'],'datasetCode':_0x4112a0[_0x17ef25(0xdc)]};}function a292_0x2d25(){const _0x2d082f=['Cannot\x20resolve\x20HOOK\x20directory\x20\x22','set','aliasToDatasetCodes','2125720ongASA','196119ExRIDJ','HOOK_ALIAS_AMBIGUOUS','1358168jCFwCZ','length','SDK\x20alias\x20\x22','push','get','80VwcguE','943056YpWbzw','includes','entries','values','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','HOOK\x20directory\x20\x22','Dataset\x20code\x20\x22','NFC','2999838ABDfRP','HOOK','HOOK_DUPLICATE_DIRECTORIES','message','code','HOOK_DIRECTORY_AMBIGUOUS','Dataset\x20\x22','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','1446387AUHUeL','\x22\x20resolves\x20to\x20multiple\x20Datasets.','HOOK_DIRECTORY_UNRESOLVED','629807ZsgOLA','lockKey','details','datasetCode','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','alias','size','map','type','datasetCodeToDatasets','join','2dfsFQo','toLowerCase','add','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','normalize','functions','HOOK_DATASET_NOT_FOUND'];a292_0x2d25=function(){return _0x2d082f;};return a292_0x2d25();}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4ffce6,_0xd566c8){const _0x4c5ddd=a293_0xd45a,_0x39e0f9=_0x4ffce6();while(!![]){try{const _0x3118d6=-parseInt(_0x4c5ddd(0xd1))/0x1+parseInt(_0x4c5ddd(0xd6))/0x2*(parseInt(_0x4c5ddd(0xcd))/0x3)+parseInt(_0x4c5ddd(0xca))/0x4+-parseInt(_0x4c5ddd(0xcf))/0x5*(-parseInt(_0x4c5ddd(0xd2))/0x6)+-parseInt(_0x4c5ddd(0xd0))/0x7+parseInt(_0x4c5ddd(0xcc))/0x8+-parseInt(_0x4c5ddd(0xc9))/0x9;if(_0x3118d6===_0xd566c8)break;else _0x39e0f9['push'](_0x39e0f9['shift']());}catch(_0x19117a){_0x39e0f9['push'](_0x39e0f9['shift']());}}}(a293_0x59ed,0x9f3fe));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a293_0x59ed(){const _0x3b3287=['3168792FqKlFr','168008HLAbIT','apps','258256Djrxqz','3278553PMqrFd','stringify','231895oGnbKJ','5801152SUZfzS','122468resVpe','102dTgYyx','\x22.\x20','lastSync','ENOENT','2hguiLw','current\x20\x22','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','scriptsRoot','utf8','functions'];a293_0x59ed=function(){return _0x3b3287;};return a293_0x59ed();}export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x1a83e2,_0x5267da,_0x3e1778,_0x3cc347){const _0x2a16fe=a293_0xd45a,_0x3850d3={'apps':_0x1a83e2[_0x2a16fe(0xcb)]&&typeof _0x1a83e2[_0x2a16fe(0xcb)]==='object'?_0x1a83e2[_0x2a16fe(0xcb)]:{}};let _0x6514f9=_0x3850d3[_0x2a16fe(0xcb)][_0x5267da];if(!_0x6514f9)return _0x6514f9={'scriptsRoot':_0x3e1778,'lastSync':'','functions':{}},_0x3850d3[_0x2a16fe(0xcb)][_0x5267da]=_0x6514f9,{'lockData':_0x3850d3,'appLock':_0x6514f9};if(!_0x6514f9[_0x2a16fe(0xd9)])_0x6514f9[_0x2a16fe(0xd9)]=_0x3e1778;else{if(_0x6514f9[_0x2a16fe(0xd9)]!==_0x3e1778)throw new Error(_0x3cc347+':\x20scriptsRoot\x20mismatch\x20—\x20'+(_0x2a16fe(0xd7)+_0x3e1778+'\x22\x20vs\x20lock\x20\x22'+_0x6514f9[_0x2a16fe(0xd9)]+_0x2a16fe(0xd3))+_0x2a16fe(0xd8));}return!_0x6514f9[_0x2a16fe(0xc8)]&&(_0x6514f9[_0x2a16fe(0xc8)]={}),!_0x6514f9[_0x2a16fe(0xd4)]&&(_0x6514f9['lastSync']=''),{'lockData':_0x3850d3,'appLock':_0x6514f9};}function a293_0xd45a(_0x1b7460,_0x467fd8){_0x1b7460=_0x1b7460-0xc7;const _0x59ed78=a293_0x59ed();let _0xd45a33=_0x59ed78[_0x1b7460];return _0xd45a33;}export async function readBffLockFile(_0x52aa85){const _0x23a1ba=a293_0xd45a;try{const _0x5b774c=await readFile(_0x52aa85,_0x23a1ba(0xc7)),_0x5542d5=JSON['parse'](_0x5b774c);return{'apps':_0x5542d5[_0x23a1ba(0xcb)]&&typeof _0x5542d5['apps']==='object'?_0x5542d5['apps']:{}};}catch(_0x3da3f6){if(_0x3da3f6['code']===_0x23a1ba(0xd5))return null;throw new Error('Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20'+String(_0x3da3f6));}}export async function writeBffLockFile(_0x1c9b5f,_0x3afcfa){const _0x4a769c=a293_0xd45a;await mkdir(dirname(_0x1c9b5f),{'recursive':!![]}),await writeFile(_0x1c9b5f,JSON[_0x4a769c(0xce)](_0x3afcfa,null,0x2),_0x4a769c(0xc7));}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a295_0x5aae41=a295_0xf1cc;(function(_0x1a4f44,_0x4e72b4){const _0x26cdba=a295_0xf1cc,_0x10e360=_0x1a4f44();while(!![]){try{const _0x1e2701=-parseInt(_0x26cdba(0xab))/0x1*(parseInt(_0x26cdba(0xb3))/0x2)+-parseInt(_0x26cdba(0xba))/0x3+-parseInt(_0x26cdba(0xb4))/0x4+-parseInt(_0x26cdba(0xb9))/0x5*(-parseInt(_0x26cdba(0xb7))/0x6)+-parseInt(_0x26cdba(0xc0))/0x7*(-parseInt(_0x26cdba(0xb5))/0x8)+-parseInt(_0x26cdba(0xad))/0x9+-parseInt(_0x26cdba(0xbc))/0xa*(-parseInt(_0x26cdba(0xc5))/0xb);if(_0x1e2701===_0x4e72b4)break;else _0x10e360['push'](_0x10e360['shift']());}catch(_0x38694d){_0x10e360['push'](_0x10e360['shift']());}}}(a295_0x2bcd,0x90e11));function a295_0xf1cc(_0x495626,_0x2edac9){_0x495626=_0x495626-0xab;const _0x2bcd46=a295_0x2bcd();let _0xf1cc58=_0x2bcd46[_0x495626];return _0xf1cc58;}export const DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x5aae41(0xbf);const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION='TODO:\x20add\x20script\x20description';export function snakeToCamel(_0x2cc4b0){const _0x179ea4=a295_0x5aae41;return _0x2cc4b0[_0x179ea4(0xbd)]()[_0x179ea4(0xb1)](/_([a-z])/g,(_0xcda5c5,_0x16f4fe)=>_0x16f4fe[_0x179ea4(0xc2)]());}export function findHookLocationByRemoteId(_0x10fcab,_0x1cc1e6){const _0x4626cd=a295_0x5aae41;if(!_0x1cc1e6)return undefined;for(const [_0x27c06f,_0x2c5278]of Object[_0x4626cd(0xb8)](_0x10fcab)){if(_0x2c5278[_0x4626cd(0xc3)]===_0x1cc1e6&&_0x2c5278[_0x4626cd(0xac)]&&_0x2c5278['operationType']&&_0x2c5278['functionNode']){const _0x3076fc=_0x27c06f[_0x4626cd(0xaf)]('/')[0x1];return{'alias':_0x3076fc||_0x2c5278[_0x4626cd(0xb6)],'datasetCode':_0x2c5278[_0x4626cd(0xac)],'operationType':_0x2c5278['operationType'],'functionNode':_0x2c5278['functionNode']};}}return undefined;}export function extractScriptDescription(_0x58faf){const _0x238240=a295_0x5aae41,_0x1840f5=_0x58faf[_0x238240(0xae)](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x1840f5?.[0x1])return undefined;const _0x142e6b=_0x1840f5[0x1],_0x32b6e4=_0x358886=>{const _0x488d8e=_0x358886?.['trim']();if(!_0x488d8e||_0x488d8e===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0x488d8e===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0x488d8e;},_0x4ccc25=_0x142e6b[_0x238240(0xae)](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x4ccc25)return _0x32b6e4(_0x4ccc25[0x1]);const _0xcc00f0=_0x142e6b[_0x238240(0xaf)](/\r?\n/)['map'](_0x4ed8cd=>_0x4ed8cd[_0x238240(0xb1)](/^\s*\*\s?/,'')[_0x238240(0xbe)]()),_0x377620=_0xcc00f0[_0x238240(0xbb)](_0x323719=>/^\[\s*脚本类型\s*]\s*\S+/['test'](_0x323719))&&_0xcc00f0['some'](_0x457c31=>/^\[\s*脚本名称\s*]\s*\S+/[_0x238240(0xc4)](_0x457c31));if(!_0x377620)return undefined;for(const _0x216943 of _0xcc00f0){if(!_0x216943||_0x216943[_0x238240(0xb0)]('@')||/^\[[^\]]+]\s*/[_0x238240(0xc4)](_0x216943))continue;return _0x32b6e4(_0x216943);}return undefined;}export function isValidBffFunctionName(_0x4e162e){const _0x4f4b59=a295_0x5aae41;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x4f4b59(0xc4)](_0x4e162e);}export function normalizeHookFunctionNode(_0x4904ed){const _0x428d15=a295_0x5aae41;if(!_0x4904ed)return undefined;const _0x32cc7f=_0x4904ed['trim']()['toLowerCase']();if(_0x32cc7f===_0x428d15(0xc1)||_0x32cc7f===_0x428d15(0xb2))return _0x32cc7f;return undefined;}function a295_0x2bcd(){const _0x29feca=['9164475tYuHzj','match','split','startsWith','replace','after','1949736bUvvmO','4396460VrMrXL','752wrzqPI','alias','6OnBBzB','entries','741595xpVKVz','1504374WkkJHG','some','10TXKqrX','toLowerCase','trim','TODO:\x20补充脚本功能描述','6881EcwRTv','before','toUpperCase','remoteId','test','43410620WAbrdW','1jqUFWt','datasetCode'];a295_0x2bcd=function(){return _0x29feca;};return a295_0x2bcd();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a296_0x2f2e(_0x1e94cc,_0x5753e1){_0x1e94cc=_0x1e94cc-0x1ac;const _0x1e483a=a296_0x1e48();let _0x2f2e65=_0x1e483a[_0x1e94cc];return _0x2f2e65;}const a296_0x5a5b05=a296_0x2f2e;(function(_0x395234,_0x179784){const _0x48f790=a296_0x2f2e,_0x1a0f3e=_0x395234();while(!![]){try{const _0x42c13b=-parseInt(_0x48f790(0x1af))/0x1+-parseInt(_0x48f790(0x1b4))/0x2+-parseInt(_0x48f790(0x1b2))/0x3*(parseInt(_0x48f790(0x1ae))/0x4)+-parseInt(_0x48f790(0x1ac))/0x5*(-parseInt(_0x48f790(0x1b3))/0x6)+parseInt(_0x48f790(0x1ad))/0x7+-parseInt(_0x48f790(0x1b8))/0x8*(-parseInt(_0x48f790(0x1b6))/0x9)+-parseInt(_0x48f790(0x1b1))/0xa;if(_0x42c13b===_0x179784)break;else _0x1a0f3e['push'](_0x1a0f3e['shift']());}catch(_0x18a4b1){_0x1a0f3e['push'](_0x1a0f3e['shift']());}}}(a296_0x1e48,0x6d6ad));export const CROSS_DB_ANALYSIS_PATHS={'start':a296_0x5a5b05(0x1b7),'status':a296_0x5a5b05(0x1b0),'latest':a296_0x5a5b05(0x1b5)};function a296_0x1e48(){const _0x5519b0=['577790qiudOX','12NpqPar','156MJIQil','1134262YGCVJp','/smartapi/db-analysis/cross-db/latest-job','3364506AqbmCL','/smartapi/db-analysis/cross-db/start','8DjdvNW','60730BZMQWv','4191733fiyUnz','170164ckhyxA','45202xwhPLv','/smartapi/db-analysis/cross-db/status'];a296_0x1e48=function(){return _0x5519b0;};return a296_0x1e48();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a297_0xcdda45=a297_0x2c07;function a297_0x2c07(_0x569fba,_0x533a69){_0x569fba=_0x569fba-0xdc;const _0x5d775e=a297_0x5d77();let _0x2c07dd=_0x5d775e[_0x569fba];return _0x2c07dd;}(function(_0x3bf183,_0x155756){const _0x5afc68=a297_0x2c07,_0x23a33f=_0x3bf183();while(!![]){try{const _0x105678=-parseInt(_0x5afc68(0xe0))/0x1+-parseInt(_0x5afc68(0xe5))/0x2+-parseInt(_0x5afc68(0xdf))/0x3*(parseInt(_0x5afc68(0xe2))/0x4)+parseInt(_0x5afc68(0xe1))/0x5+parseInt(_0x5afc68(0xdc))/0x6*(parseInt(_0x5afc68(0xe6))/0x7)+parseInt(_0x5afc68(0xe7))/0x8*(parseInt(_0x5afc68(0xe8))/0x9)+parseInt(_0x5afc68(0xde))/0xa;if(_0x105678===_0x155756)break;else _0x23a33f['push'](_0x23a33f['shift']());}catch(_0x3dd711){_0x23a33f['push'](_0x23a33f['shift']());}}}(a297_0x5d77,0xa9b06));export const CROSS_DB_RELATION_PATHS={'list':'/smartapi/cross-db-relation/query','create':a297_0xcdda45(0xdd),'update':a297_0xcdda45(0xe4),'delete':a297_0xcdda45(0xe3)};function a297_0x5d77(){const _0x29e94b=['284477MursbQ','3048415ZbrkBC','380216fNkSEr','/smartapi/cross-db-relation/delete','/smartapi/cross-db-relation/update','2652238kBvxBl','30975NymIqX','44264zJkvbF','1701cZZXfO','1446mXvgOF','/smartapi/cross-db-relation/create','8194990TLEuhz','39haBxFi'];a297_0x5d77=function(){return _0x29e94b;};return a297_0x5d77();}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x484e61,_0x39ec60){const _0x13ea0a=a298_0x24d8,_0x2c1da4=_0x484e61();while(!![]){try{const _0x1968ae=-parseInt(_0x13ea0a(0x1e3))/0x1+-parseInt(_0x13ea0a(0x1f5))/0x2+-parseInt(_0x13ea0a(0x1f0))/0x3+-parseInt(_0x13ea0a(0x1ea))/0x4*(-parseInt(_0x13ea0a(0x1e6))/0x5)+-parseInt(_0x13ea0a(0x1ed))/0x6*(parseInt(_0x13ea0a(0x1ec))/0x7)+parseInt(_0x13ea0a(0x1dd))/0x8*(-parseInt(_0x13ea0a(0x1ef))/0x9)+parseInt(_0x13ea0a(0x1da))/0xa;if(_0x1968ae===_0x39ec60)break;else _0x2c1da4['push'](_0x2c1da4['shift']());}catch(_0xaef4b3){_0x2c1da4['push'](_0x2c1da4['shift']());}}}(a298_0x85ce,0x769f8));import{listDatasets}from'../core/api-client.js';function a298_0x85ce(){const _0x366339=['\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','map','dbId','1402212reVbpe','set','31413030vpfQWW','entries','toLowerCase','6689912qkzZze','dbtableConfig','has','join','includes','get','628792BLGLvU','db-','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','53945EWTnLf','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','dbName','length','188wDGqYI','\x22.\x20Available:\x20','1435bnaYFs','14670ZsnYfa','find','9JBYTLt','1485432uDHgyN','isNaN'];a298_0x85ce=function(){return _0x366339;};return a298_0x85ce();}const cache=new Map();function a298_0x24d8(_0x2e2f00,_0x54bfff){_0x2e2f00=_0x2e2f00-0x1d9;const _0x85ceba=a298_0x85ce();let _0x24d808=_0x85ceba[_0x2e2f00];return _0x24d808;}export async function listDatabases(_0x2e025d){const _0x45a5fa=a298_0x24d8;if(cache[_0x45a5fa(0x1df)](_0x2e025d))return cache[_0x45a5fa(0x1e2)](_0x2e025d);const _0xc7cb2f=await listDatasets(_0x2e025d),_0xaf36f9=new Map();for(const _0x4fe230 of _0xc7cb2f){const _0xcf2ce7=_0x4fe230[_0x45a5fa(0x1de)];_0xcf2ce7?.[_0x45a5fa(0x1f4)]!=null&&_0xaf36f9[_0x45a5fa(0x1d9)](_0xcf2ce7[_0x45a5fa(0x1f4)],_0xcf2ce7['dbName']??_0x45a5fa(0x1e4)+_0xcf2ce7[_0x45a5fa(0x1f4)]);}const _0x3f0247=[..._0xaf36f9[_0x45a5fa(0x1db)]()]['map'](([_0x2f2bd7,_0x2e63f6])=>({'dbId':_0x2f2bd7,'dbName':_0x2e63f6}));return cache[_0x45a5fa(0x1d9)](_0x2e025d,_0x3f0247),_0x3f0247;}export async function resolveDb(_0x1fd4cc,_0x2fc96c){const _0x11bad3=a298_0x24d8,_0x564b94=await listDatabases(_0x1fd4cc);if(_0x564b94[_0x11bad3(0x1e9)]===0x0)return{'resolved':[],'error':'No\x20linked\x20databases\x20found\x20under\x20app\x20\x22'+_0x1fd4cc+_0x11bad3(0x1f2)};if(!_0x2fc96c)return{'resolved':_0x564b94};const _0x1f6b65=Number(_0x2fc96c);if(!Number[_0x11bad3(0x1f1)](_0x1f6b65)){const _0x380c2f=_0x564b94[_0x11bad3(0x1ee)](_0x1cf6e0=>_0x1cf6e0[_0x11bad3(0x1f4)]===_0x1f6b65);if(_0x380c2f)return{'resolved':[_0x380c2f]};}const _0x32df81=_0x2fc96c[_0x11bad3(0x1dc)](),_0x208644=_0x564b94['filter'](_0x2adce5=>_0x2adce5[_0x11bad3(0x1e8)][_0x11bad3(0x1dc)]()[_0x11bad3(0x1e1)](_0x32df81));if(_0x208644['length']>0x0)return{'resolved':_0x208644};const _0x25f661=_0x564b94[_0x11bad3(0x1f3)](_0xe75bb7=>_0xe75bb7['dbName']+'\x20('+_0xe75bb7[_0x11bad3(0x1f4)]+')')[_0x11bad3(0x1e0)](',\x20');return{'resolved':[],'error':'No\x20database\x20matching\x20\x22'+_0x2fc96c+'\x22\x20under\x20app\x20\x22'+_0x1fd4cc+_0x11bad3(0x1eb)+_0x25f661+_0x11bad3(0x1e5)};}export async function resolveOneDb(_0x4b0567,_0x40d477){const _0x399366=a298_0x24d8,{resolved:_0x768e7a,error:_0x12187c}=await resolveDb(_0x4b0567,_0x40d477);if(_0x12187c)return{'db':null,'error':_0x12187c};if(_0x768e7a[_0x399366(0x1e9)]===0x1)return{'db':_0x768e7a[0x0]};if(!_0x40d477){const _0x690e71=_0x768e7a[_0x399366(0x1f3)](_0x370de2=>_0x370de2[_0x399366(0x1e8)]+'\x20('+_0x370de2[_0x399366(0x1f4)]+')')[_0x399366(0x1e0)](',\x20');return{'db':null,'error':_0x399366(0x1e7)+_0x690e71};}const _0x82fc5c=_0x768e7a[_0x399366(0x1f3)](_0x6d6dd8=>_0x6d6dd8[_0x399366(0x1e8)]+'\x20('+_0x6d6dd8[_0x399366(0x1f4)]+')')[_0x399366(0x1e0)](',\x20');return{'db':null,'error':'\x22'+_0x40d477+'\x22\x20matches\x20multiple\x20databases:\x20'+_0x82fc5c+'.\x20Be\x20more\x20specific.'};}export async function getDbName(_0x4f6530,_0x50c5a3){const _0x4abc27=a298_0x24d8,_0x390725=await listDatabases(_0x4f6530);return _0x390725['find'](_0x48a37a=>_0x48a37a[_0x4abc27(0x1f4)]===_0x50c5a3)?.[_0x4abc27(0x1e8)];}
|