@lovrabet/rabetbase-cli 2.5.10-beta.4 → 2.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +4 -4
- 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
|
+
const a289_0xc249a2=a289_0x1c0f;(function(_0x545c2d,_0x5bdc7e){const _0x31337b=a289_0x1c0f,_0x268204=_0x545c2d();while(!![]){try{const _0x558c3f=-parseInt(_0x31337b(0x1e4))/0x1*(-parseInt(_0x31337b(0x1dd))/0x2)+-parseInt(_0x31337b(0x1e9))/0x3+-parseInt(_0x31337b(0x1e3))/0x4+parseInt(_0x31337b(0x1e1))/0x5*(-parseInt(_0x31337b(0x1ea))/0x6)+parseInt(_0x31337b(0x1df))/0x7+-parseInt(_0x31337b(0x1e8))/0x8*(-parseInt(_0x31337b(0x1e2))/0x9)+parseInt(_0x31337b(0x1dc))/0xa;if(_0x558c3f===_0x5bdc7e)break;else _0x268204['push'](_0x268204['shift']());}catch(_0xba4c6f){_0x268204['push'](_0x268204['shift']());}}}(a289_0x2483,0x5147a));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';function a289_0x1c0f(_0x12da88,_0x2948b7){_0x12da88=_0x12da88-0x1dc;const _0x2483ad=a289_0x2483();let _0x1c0f7d=_0x2483ad[_0x12da88];return _0x1c0f7d;}function a289_0x2483(){const _0x3600aa=['28638ncWaRV','2490852ulXCiO','32835iMzlBX','bff-trash','.rabetbase','bff.lock.json','1336UWxHfE','1030389ELCVSY','52674aDDuOJ','5048930vLCYZa','8eRhsTc','/bff','1350468XdIjuf','bff','35PzrznL'];a289_0x2483=function(){return _0x3600aa;};return a289_0x2483();}const DOT_DIR=a289_0xc249a2(0x1e6),LOCK_FILE_NAME=a289_0xc249a2(0x1e7),TRASH_DIR_NAME=a289_0xc249a2(0x1e5);export function loadBffProjectConfig(_0x41ea48,_0x1bdf96){const _0xc0b43a=a289_0xc249a2,_0x3af9de=resolve(_0x1bdf96??findProjectRootDirectory()),_0x315c16=DOT_DIR+_0xc0b43a(0x1de),_0x414f02=_0x315c16+'/'+_0x41ea48;return{'projectRoot':_0x3af9de,'appCode':_0x41ea48,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x315c16,'scriptsRoot':_0x414f02,'scriptsRootDir':resolve(_0x3af9de,DOT_DIR,_0xc0b43a(0x1e0),_0x41ea48),'lockFilePath':resolve(_0x3af9de,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x3af9de,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a290_0x30601b=a290_0x10cc;(function(_0x545365,_0x531aca){const _0x14702d=a290_0x10cc,_0x2d0611=_0x545365();while(!![]){try{const _0x2626c5=-parseInt(_0x14702d(0x205))/0x1+-parseInt(_0x14702d(0x206))/0x2*(-parseInt(_0x14702d(0x1f6))/0x3)+-parseInt(_0x14702d(0x209))/0x4+parseInt(_0x14702d(0x1f7))/0x5+parseInt(_0x14702d(0x20e))/0x6+-parseInt(_0x14702d(0x1ef))/0x7*(-parseInt(_0x14702d(0x20c))/0x8)+-parseInt(_0x14702d(0x1f4))/0x9;if(_0x2626c5===_0x531aca)break;else _0x2d0611['push'](_0x2d0611['shift']());}catch(_0x15cd7c){_0x2d0611['push'](_0x2d0611['shift']());}}}(a290_0x3052,0x8481d));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_0x30601b(0x1ed),a290_0x30601b(0x200),a290_0x30601b(0x1f5)];function a290_0x10cc(_0x16fb78,_0x3dba2f){_0x16fb78=_0x16fb78-0x1e2;const _0x305261=a290_0x3052();let _0x10ccfc=_0x305261[_0x16fb78];return _0x10ccfc;}export function normalizeBffType(_0x112504){const _0x1b3f21=a290_0x30601b;if(!_0x112504)return undefined;const _0x133846=_0x112504[_0x1b3f21(0x1f0)]()[_0x1b3f21(0x204)]();return SUPPORTED_BFF_TYPES[_0x1b3f21(0x1f8)](_0x133846)?_0x133846:undefined;}function a290_0x3052(){const _0x2fec0f=['every','endsWith','functionNode','.js','isDirectory','isFile','toLowerCase','ENDPOINT','beforeScriptId','push','Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20','toUpperCase','826925fysLAI','140246CHOGsw','scriptType','name','3238164PeXPdZ','HOOK/','split','8NfOHZj','test','2147544twQXuC','code','functionName','before','get','replace','F_OK','set','Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20','scriptsRootDir','datasetCode','map','COMMON','ENOENT','4294934fSfoUM','trim','all','afterScriptId','operationType','5745690GxUCVy','HOOK','33XuHsIw','5373930FNdNtp','includes'];a290_0x3052=function(){return _0x2fec0f;};return a290_0x3052();}async function scanJsFilesRecursively(_0x4dccdf,_0x1043ae){const _0x150532=a290_0x30601b,_0x300d8b=[];try{const _0x21adf6=await readdir(_0x4dccdf,{'withFileTypes':!![]});for(const _0x49a061 of _0x21adf6){const _0x26449c=join(_0x4dccdf,_0x49a061[_0x150532(0x208)]);if(_0x49a061[_0x150532(0x1fd)]())_0x300d8b[_0x150532(0x202)](...await scanJsFilesRecursively(_0x26449c,_0x1043ae+'/'+_0x49a061['name']));else _0x49a061[_0x150532(0x1fe)]()&&_0x49a061[_0x150532(0x208)]['endsWith']('.js')&&_0x300d8b[_0x150532(0x202)]({'lockKey':_0x1043ae+'/'+_0x49a061['name'][_0x150532(0x1e6)](/\.js$/,''),'filePath':_0x26449c});}}catch(_0x1c2872){if(_0x1c2872[_0x150532(0x1e2)]!=='ENOENT')throw _0x1c2872;}return _0x300d8b;}async function scanFlatFunctions(_0x1628dd,_0x4b537b){const _0x2778d3=a290_0x30601b,_0x9ef742=join(_0x1628dd['scriptsRootDir'],_0x4b537b),_0x353100=await scanJsFilesRecursively(_0x9ef742,_0x4b537b);return _0x353100[_0x2778d3(0x1ec)](({lockKey:_0x370bd5,filePath:_0x39faa4})=>({'type':_0x4b537b,'name':_0x370bd5[_0x2778d3(0x20b)]('/')['at'](-0x1)??'','filePath':_0x39faa4,'lockKey':_0x370bd5}));}async function scanHookFunctions(_0x5e6cd1){const _0x248210=a290_0x30601b,_0x446e38=join(_0x5e6cd1['scriptsRootDir'],_0x248210(0x1f5)),_0x12cef4=[];try{const _0x435450=await readdir(_0x446e38,{'withFileTypes':!![]});for(const _0xfbc72b of _0x435450){if(!_0xfbc72b['isDirectory']())continue;const _0x481b50=_0xfbc72b[_0x248210(0x208)],_0x164a7e=join(_0x446e38,_0x481b50),_0x54f8e2=await readdir(_0x164a7e,{'withFileTypes':!![]});for(const _0x24ee37 of _0x54f8e2){if(!_0x24ee37[_0x248210(0x1fd)]())continue;const _0x14a7b8=_0x24ee37[_0x248210(0x208)],_0x1d3f43=join(_0x164a7e,_0x14a7b8),_0x8ae7c2=await readdir(_0x1d3f43,{'withFileTypes':!![]});for(const _0x4080f3 of _0x8ae7c2){if(!_0x4080f3[_0x248210(0x1fd)]())continue;const _0x3925dc=_0x4080f3[_0x248210(0x208)],_0x2a64f6=join(_0x1d3f43,_0x3925dc),_0x2ad761=await readdir(_0x2a64f6,{'withFileTypes':!![]});for(const _0x3d3ee9 of _0x2ad761){if(!_0x3d3ee9[_0x248210(0x1fe)]()||!_0x3d3ee9['name'][_0x248210(0x1fa)](_0x248210(0x1fc)))continue;const _0xa35dd5=_0x3d3ee9[_0x248210(0x208)][_0x248210(0x1e6)](/\.js$/,'');_0x12cef4['push']({'type':'HOOK','name':_0xa35dd5,'filePath':join(_0x2a64f6,_0x3d3ee9[_0x248210(0x208)]),'lockKey':_0x248210(0x20a)+_0x481b50+'/'+_0x14a7b8+'/'+_0x3925dc+'/'+_0xa35dd5,'alias':_0x481b50,'operationType':_0x14a7b8,'functionNode':_0x3925dc});}}}}}catch(_0x57d812){if(_0x57d812[_0x248210(0x1e2)]!==_0x248210(0x1ee))throw _0x57d812;}return _0x12cef4;}export async function scanLocalBffFunctions(_0xbf2e38,_0x3b7714){const _0x5a96cb=a290_0x30601b;if(_0x3b7714===_0x5a96cb(0x1ed)||_0x3b7714===_0x5a96cb(0x200))return scanFlatFunctions(_0xbf2e38,_0x3b7714);if(_0x3b7714===_0x5a96cb(0x1f5))return scanHookFunctions(_0xbf2e38);const [_0xb92fe4,_0x4d229d,_0x202ace]=await Promise[_0x5a96cb(0x1f1)]([scanFlatFunctions(_0xbf2e38,_0x5a96cb(0x1ed)),scanFlatFunctions(_0xbf2e38,'ENDPOINT'),scanHookFunctions(_0xbf2e38)]);return[..._0xb92fe4,..._0x4d229d,..._0x202ace];}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x2b87d7){const _0x53ac25=a290_0x30601b;return SAFE_LOCK_KEY_SEGMENT[_0x53ac25(0x20d)](_0x2b87d7)&&_0x2b87d7!=='.'&&_0x2b87d7!=='..';}export function resolveLocalFilePathFromLockKey(_0x740a3,_0x2ba14c){const _0x58f56c=a290_0x30601b,_0x4f3e6a=_0x2ba14c[_0x58f56c(0x20b)]('/');if(!_0x4f3e6a['every'](isSafeLockKeySegment))throw new Error(_0x58f56c(0x203)+_0x2ba14c);const _0x5a0944=resolve(join(_0x740a3[_0x58f56c(0x1ea)],..._0x4f3e6a)+_0x58f56c(0x1fc)),_0x63a820=resolve(_0x740a3['scriptsRootDir']);if(_0x5a0944!==_0x63a820&&!_0x5a0944['startsWith'](_0x63a820+sep))throw new Error(_0x58f56c(0x1e9)+_0x5a0944);return _0x5a0944;}export function createHookLocationMap(_0x2f503f){const _0x25d421=a290_0x30601b,_0x44102a=new Map();for(const _0x46d260 of _0x2f503f){_0x46d260[_0x25d421(0x201)]&&_0x44102a[_0x25d421(0x1e8)](_0x46d260[_0x25d421(0x201)],{'datasetCode':_0x46d260[_0x25d421(0x1eb)],'operationType':snakeToCamel(_0x46d260[_0x25d421(0x1f3)]),'functionNode':_0x25d421(0x1e4)}),_0x46d260[_0x25d421(0x1f2)]&&_0x44102a['set'](_0x46d260[_0x25d421(0x1f2)],{'datasetCode':_0x46d260[_0x25d421(0x1eb)],'operationType':snakeToCamel(_0x46d260[_0x25d421(0x1f3)]),'functionNode':'after'});}return _0x44102a;}export function resolveRemoteScriptTarget(_0x39c8ae,_0x58a480,_0x39ce3c,_0x426e84,_0x59cd09){const _0x18712a=a290_0x30601b,_0x56dd98=normalizeBffType(_0x58a480[_0x18712a(0x207)]);if(!_0x56dd98||!_0x58a480[_0x18712a(0x1e3)])return null;if(_0x56dd98===_0x18712a(0x1f5)){const _0x3e84d0=_0x58a480['id']?_0x39ce3c[_0x18712a(0x1e5)](_0x58a480['id']):undefined,_0x340d6e=findHookLocationByRemoteId(_0x426e84,_0x58a480['id']),_0x4e29bf=_0x3e84d0?{..._0x340d6e?.['datasetCode']===_0x3e84d0[_0x18712a(0x1eb)]?_0x340d6e:{},..._0x3e84d0}:_0x340d6e;if(!_0x4e29bf)return null;const _0x8cbd76=_0x59cd09[_0x18712a(0x1e5)](_0x4e29bf['datasetCode'][_0x18712a(0x1ff)]()),_0x43edf3=_0x8cbd76??_0x4e29bf[_0x18712a(0x1eb)],_0x20027f={..._0x4e29bf,'alias':_0x8cbd76},_0x3533aa=_0x18712a(0x20a)+_0x43edf3+'/'+_0x20027f[_0x18712a(0x1f3)]+'/'+_0x20027f[_0x18712a(0x1fb)]+'/'+_0x58a480[_0x18712a(0x1e3)];if(!_0x3533aa['split']('/')[_0x18712a(0x1f9)](isSafeLockKeySegment))return null;return{'lockKey':_0x3533aa,'filePath':resolveLocalFilePathFromLockKey(_0x39c8ae,_0x3533aa),'type':_0x18712a(0x1f5),'hookLocation':_0x20027f};}const _0x4ee9d2=_0x56dd98+'/'+_0x58a480[_0x18712a(0x1e3)];if(!_0x4ee9d2[_0x18712a(0x20b)]('/')[_0x18712a(0x1f9)](isSafeLockKeySegment))return null;return{'lockKey':_0x4ee9d2,'filePath':resolveLocalFilePathFromLockKey(_0x39c8ae,_0x4ee9d2),'type':_0x56dd98};}export async function ensureParentDirectory(_0x245fdc){await mkdir(dirname(_0x245fdc),{'recursive':!![]});}export async function fileExists(_0x4a58cb){const _0x1868f3=a290_0x30601b;try{return await access(_0x4a58cb,constants[_0x1868f3(0x1e7)]),!![];}catch{return![];}}export async function directoryExists(_0x26b988){try{const _0x2adab8=await stat(_0x26b988);return _0x2adab8['isDirectory']();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x16eb4e,_0x275288){const _0x5c81bf=a291_0x3da3,_0x4d2bee=_0x16eb4e();while(!![]){try{const _0x300a2f=parseInt(_0x5c81bf(0x92))/0x1+-parseInt(_0x5c81bf(0x95))/0x2*(parseInt(_0x5c81bf(0x9d))/0x3)+-parseInt(_0x5c81bf(0x90))/0x4+-parseInt(_0x5c81bf(0x97))/0x5*(-parseInt(_0x5c81bf(0x94))/0x6)+-parseInt(_0x5c81bf(0x9a))/0x7*(parseInt(_0x5c81bf(0x91))/0x8)+-parseInt(_0x5c81bf(0x9b))/0x9+parseInt(_0x5c81bf(0x9c))/0xa;if(_0x300a2f===_0x275288)break;else _0x4d2bee['push'](_0x4d2bee['shift']());}catch(_0x3da23b){_0x4d2bee['push'](_0x4d2bee['shift']());}}}(a291_0x3d1e,0xa9643));import{readFile}from'node:fs/promises';function a291_0x3da3(_0x43f8c4,_0x25f2fa){_0x43f8c4=_0x43f8c4-0x90;const _0x3d1e55=a291_0x3d1e();let _0x3da3b6=_0x3d1e55[_0x43f8c4];return _0x3da3b6;}function a291_0x3d1e(){const _0x4cc070=['hex','update','1785uFNMOJ','11325042sbAyYg','15397740RRmxmT','163551fAlIUk','utf8','1575364HspxpO','34064SxwIZY','1010412iyNegw','createHash','2744526WxPLtN','18PDTQSN','digest','15DXBgaO'];a291_0x3d1e=function(){return _0x4cc070;};return a291_0x3d1e();}import a291_0x5a15f7 from'node:crypto';export function computeContentHash(_0x50b3cd){const _0x438227=a291_0x3da3;return a291_0x5a15f7[_0x438227(0x93)]('md5')[_0x438227(0x99)](_0x50b3cd)[_0x438227(0x96)](_0x438227(0x98));}export async function computeFileHash(_0x51ec8c){const _0x32b0ee=a291_0x3da3,_0xfbfe05=await readFile(_0x51ec8c,_0x32b0ee(0x9e));return computeContentHash(_0xfbfe05);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x572fac,_0x196733){const _0x2ebae4=a292_0x3871,_0x464792=_0x572fac();while(!![]){try{const _0xcefadc=-parseInt(_0x2ebae4(0x1d2))/0x1+parseInt(_0x2ebae4(0x1ab))/0x2+-parseInt(_0x2ebae4(0x1a2))/0x3*(parseInt(_0x2ebae4(0x1a3))/0x4)+-parseInt(_0x2ebae4(0x1c6))/0x5*(-parseInt(_0x2ebae4(0x1be))/0x6)+-parseInt(_0x2ebae4(0x1d3))/0x7+parseInt(_0x2ebae4(0x1ba))/0x8+parseInt(_0x2ebae4(0x1b7))/0x9*(parseInt(_0x2ebae4(0x1c8))/0xa);if(_0xcefadc===_0x196733)break;else _0x464792['push'](_0x464792['shift']());}catch(_0x41f278){_0x464792['push'](_0x464792['shift']());}}}(a292_0x2c4d,0x849e4));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x3ba18c){const _0x1a3737=a292_0x3871,_0x1bb4b0=[];for(const [_0x567b3d,_0x43a130]of Object['entries'](_0x3ba18c[_0x1a3737(0x1aa)])){const [_0x18d88e,_0x1a89cd]=_0x567b3d[_0x1a3737(0x1c9)]('/');if(_0x18d88e!==_0x1a3737(0x1c4)||!_0x1a89cd||!_0x43a130[_0x1a3737(0x1a9)])continue;_0x1bb4b0['push']({'alias':_0x1a89cd,'datasetCode':_0x43a130['datasetCode']});}return _0x1bb4b0;}export function uniqueTrackedHookDirectoryByDataset(_0x4d487e){const _0x5e43e2=a292_0x3871,_0x20da22=new Map();for(const _0x53a897 of trackedHookDirectoryMappings(_0x4d487e)){const _0x5c3893=directoryIdentity(_0x53a897[_0x5e43e2(0x1a9)]),_0x562f41=_0x20da22[_0x5e43e2(0x1ce)](_0x5c3893)??new Map();_0x562f41[_0x5e43e2(0x1a8)](directoryIdentity(_0x53a897['alias']),_0x53a897[_0x5e43e2(0x1c7)]),_0x20da22[_0x5e43e2(0x1a8)](_0x5c3893,_0x562f41);}const _0x4072eb=new Map();for(const [_0x27f2f7,_0x2d8896]of _0x20da22){if(_0x2d8896[_0x5e43e2(0x1b3)]>0x1)throw hookDirectoryError(_0x5e43e2(0x1a4),_0x5e43e2(0x1c2)+_0x27f2f7+_0x5e43e2(0x1b6)+[..._0x2d8896[_0x5e43e2(0x1bd)]()][_0x5e43e2(0x1ca)](',\x20')+'.',{'datasetCode':_0x27f2f7,'directories':[..._0x2d8896[_0x5e43e2(0x1bd)]()]});_0x4072eb[_0x5e43e2(0x1a8)](_0x27f2f7,[..._0x2d8896[_0x5e43e2(0x1bd)]()][0x0]);}return _0x4072eb;}export function assertUnambiguousHookDirectoryMappings(_0x16315b){const _0x386acc=a292_0x3871,_0x4a3db8=new Map();for(const {alias:_0x3b80db,datasetCode:_0x3cd124}of _0x16315b){const _0x187558=directoryIdentity(_0x3b80db),_0x2df4da=_0x4a3db8[_0x386acc(0x1ce)](_0x187558)??new Set();_0x2df4da[_0x386acc(0x1cc)](_0x3cd124),_0x4a3db8['set'](_0x187558,_0x2df4da);}for(const [_0x2d7ace,_0x336492]of _0x4a3db8){if(_0x336492[_0x386acc(0x1b3)]>0x1)throw hookDirectoryError(_0x386acc(0x1b1),'HOOK\x20directory\x20\x22'+_0x2d7ace+_0x386acc(0x1ac),{'directoryName':_0x2d7ace,'datasetCodes':[..._0x336492]});}}export function assertUnambiguousHookAliases(_0x5e24f2){const _0x83f0fe=a292_0x3871,_0x5524ba=[..._0x5e24f2],_0x360106=new Map(),_0x2d75e3=new Map();for(const {alias:_0x3de1b5,datasetCode:_0x4ac3f8}of _0x5524ba){const _0x40515e=directoryIdentity(_0x3de1b5),_0x564b8d=directoryIdentity(_0x4ac3f8),_0x4d650b=_0x360106[_0x83f0fe(0x1ce)](_0x40515e)??new Set();_0x4d650b[_0x83f0fe(0x1cc)](_0x4ac3f8),_0x360106[_0x83f0fe(0x1a8)](_0x40515e,_0x4d650b);const _0x27f53b=_0x2d75e3[_0x83f0fe(0x1ce)](_0x564b8d)??new Set();_0x27f53b['add'](_0x3de1b5),_0x2d75e3[_0x83f0fe(0x1a8)](_0x564b8d,_0x27f53b);}for(const [_0x31bf18,_0xa208a0]of _0x360106){if(_0xa208a0['size']>0x1)throw hookDirectoryError(_0x83f0fe(0x1af),_0x83f0fe(0x1bc)+_0x31bf18+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'alias':_0x31bf18,'datasetCodes':[..._0xa208a0]});}for(const [_0x4bc5ef,_0x45854a]of _0x2d75e3){if(_0x45854a[_0x83f0fe(0x1b3)]>0x1)throw hookDirectoryError(_0x83f0fe(0x1af),_0x83f0fe(0x1c2)+_0x4bc5ef+_0x83f0fe(0x1a5),{'datasetCode':_0x4bc5ef,'aliases':[..._0x45854a]});}}export function buildHookDirectoryIndexes(_0x348522,_0x3529f3=[]){const _0xe23943=a292_0x3871,_0x4dcaea=[..._0x3529f3];assertUnambiguousHookDirectoryMappings(_0x4dcaea[_0xe23943(0x1c5)](([_0x3748e1,_0x161ff9])=>({'alias':_0x3748e1,'datasetCode':_0x161ff9})));const _0x27a6bb=new Map(),_0x1ed401=new Map();for(const _0x2e9e18 of _0x348522){appendUnique(_0x27a6bb,directoryIdentity(_0x2e9e18[_0xe23943(0x1b0)]),_0x2e9e18,_0x5449ea=>_0x5449ea[_0xe23943(0x1b0)]);}for(const [_0x28510d,_0x17484a]of _0x4dcaea){appendUnique(_0x1ed401,directoryIdentity(_0x28510d),_0x17484a,_0x3b8ff4=>_0x3b8ff4);}return{'datasetCodeToDatasets':_0x27a6bb,'aliasToDatasetCodes':_0x1ed401};}export function resolvePushHookDirectory(_0x15110c,_0x4a5b30,_0x4ec412){const _0x45b989=a292_0x3871,_0x5e47ee=directoryIdentity(_0x15110c),_0x2cd9e5=_0x4ec412[_0x45b989(0x1ae)]['get'](_0x5e47ee)??[],_0x289805=_0x4ec412[_0x45b989(0x1cf)][_0x45b989(0x1ce)](_0x5e47ee)??[],_0xb53e1b=new Set([..._0x2cd9e5[_0x45b989(0x1c5)](_0x74f1a1=>_0x74f1a1[_0x45b989(0x1b0)]),..._0x289805]);if(_0xb53e1b[_0x45b989(0x1b3)]>0x1)throw hookDirectoryError(_0x45b989(0x1b1),_0x45b989(0x1d1)+_0x15110c+_0x45b989(0x1b9),{'directoryName':_0x15110c,'datasetCodes':[..._0xb53e1b]});const _0xfc009e=[..._0xb53e1b][0x0];if(_0xfc009e&&_0x4a5b30?.[_0x45b989(0x1a9)]&&_0xfc009e!==_0x4a5b30['datasetCode'])throw hookDirectoryError(_0x45b989(0x1b5),_0x45b989(0x1d1)+_0x15110c+_0x45b989(0x1b2)+_0x4a5b30[_0x45b989(0x1a9)]+'\x22\x20to\x20\x22'+_0xfc009e+'\x22.',{'directoryName':_0x15110c,'datasetCode':_0xfc009e,'lockedDatasetCode':_0x4a5b30['datasetCode']});const _0x4e9886=_0xfc009e?findDatasetByCode(_0x4ec412,_0xfc009e):undefined,_0x5c7239=!!_0xfc009e&&_0x289805['includes'](_0xfc009e);if(_0x4e9886)return{'dataset':_0x4e9886,'datasetCode':_0x4e9886[_0x45b989(0x1b0)],..._0x5c7239?{'alias':_0x15110c}:{},'directoryProtocol':_0x5c7239?_0x45b989(0x1c7):_0x45b989(0x1a9),'warnings':[]};const _0x1d2efc=_0x4a5b30?.[_0x45b989(0x1a9)];if(_0x1d2efc){const _0x5a0290=findDatasetByCode(_0x4ec412,_0x1d2efc);if(_0x5a0290)return{'dataset':_0x5a0290,'datasetCode':_0x5a0290[_0x45b989(0x1b0)],..._0x4a5b30[_0x45b989(0x1c7)]?{'alias':_0x4a5b30[_0x45b989(0x1c7)]}:{},'directoryProtocol':_0x4a5b30[_0x45b989(0x1c7)]?'alias':'datasetCode','warnings':[]};}if(_0xfc009e||_0x1d2efc){const _0x4b4f5c=_0xfc009e??_0x1d2efc;throw hookDirectoryError('HOOK_DATASET_NOT_FOUND',_0x45b989(0x1d1)+_0x15110c+_0x45b989(0x1c1),{'directoryName':_0x15110c,'datasetCode':_0x4b4f5c});}throw hookDirectoryError(_0x45b989(0x1cb),'Cannot\x20resolve\x20HOOK\x20directory\x20\x22'+_0x15110c+_0x45b989(0x1bb),{'directoryName':_0x15110c});}export function preflightPushHookDirectories(_0x4a8c9e,_0x1b1a17,_0x5015f9,_0x3a78b6){const _0x58d1ad=a292_0x3871,_0x5aff74=new Map(),_0x3c4f81=new Map();for(const _0x154c99 of _0x4a8c9e){if(_0x154c99[_0x58d1ad(0x1b8)]!=='HOOK')continue;const _0x3e46b9=_0x154c99[_0x58d1ad(0x1c7)];if(!_0x3e46b9)throw hookDirectoryError(_0x58d1ad(0x1cb),_0x58d1ad(0x1c0)+_0x154c99[_0x58d1ad(0x1c3)],{'lockKey':_0x154c99['lockKey']});let _0x39b1b6;try{_0x39b1b6=resolvePushHookDirectory(_0x3e46b9,_0x1b1a17[_0x58d1ad(0x1aa)][_0x154c99['lockKey']],_0x5015f9);}catch(_0x4be015){if(_0x3a78b6&&_0x4be015 instanceof CliError&&['HOOK_DATASET_NOT_FOUND','HOOK_DIRECTORY_UNRESOLVED'][_0x58d1ad(0x1cd)](_0x4be015['code'])){_0x3a78b6[_0x58d1ad(0x1a8)](_0x154c99[_0x58d1ad(0x1c3)],_0x4be015[_0x58d1ad(0x1d0)]);continue;}throw _0x4be015;}_0x5aff74['set'](_0x154c99[_0x58d1ad(0x1c3)],_0x39b1b6);const _0x40c202=_0x3c4f81['get'](_0x39b1b6[_0x58d1ad(0x1a9)])??new Set();_0x40c202['add'](_0x3e46b9),_0x3c4f81[_0x58d1ad(0x1a8)](_0x39b1b6[_0x58d1ad(0x1a9)],_0x40c202);}for(const [_0x3b248c,_0x299f53]of _0x3c4f81){if(_0x299f53['size']>0x1)throw hookDirectoryError(_0x58d1ad(0x1a4),'Dataset\x20\x22'+_0x3b248c+'\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20'+[..._0x299f53][_0x58d1ad(0x1ca)](',\x20')+'.',{'datasetCode':_0x3b248c,'directories':[..._0x299f53]});}return _0x5aff74;}function a292_0x2c4d(){const _0x52798a=['aliasToDatasetCodes','message','HOOK\x20directory\x20\x22','964497fvziCE','2042999nVHNEo','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','details','some','6FquQsb','319108DowvEb','HOOK_DUPLICATE_DIRECTORIES','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','HOOK_DATASET_CODE_AMBIGUOUS','length','set','datasetCode','functions','1599326xgUbwu','\x22\x20resolves\x20to\x20multiple\x20Datasets.','name','datasetCodeToDatasets','HOOK_ALIAS_AMBIGUOUS','code','HOOK_DIRECTORY_AMBIGUOUS','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','size','Dataset\x20code\x20\x22','HOOK_MAPPING_DRIFT','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','339777tDYeyG','type','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','3004504cykGUN','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','SDK\x20alias\x20\x22','values','34482KkyEEJ','toLowerCase','Incomplete\x20HOOK\x20path:\x20','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','Dataset\x20\x22','lockKey','HOOK','map','255ANQkFO','alias','130hxuNAX','split','join','HOOK_DIRECTORY_UNRESOLVED','add','includes','get'];a292_0x2c4d=function(){return _0x52798a;};return a292_0x2c4d();}export function hookDirectoryError(_0x4f61ec,_0x1e7cad,_0x544a37){const _0x5c7ada=a292_0x3871,_0x536fd5=new CliError(_0x4f61ec,0x2,_0x4f61ec+':\x20'+_0x1e7cad);return _0x536fd5[_0x5c7ada(0x1d5)]=_0x544a37,_0x536fd5;}function findDatasetByCode(_0x2ea7d2,_0x1a73b6){const _0x269eae=a292_0x3871,_0x327a04=_0x2ea7d2[_0x269eae(0x1ae)][_0x269eae(0x1ce)](directoryIdentity(_0x1a73b6))??[];if(_0x327a04[_0x269eae(0x1a7)]>0x1)throw hookDirectoryError(_0x269eae(0x1a6),_0x269eae(0x1b4)+_0x1a73b6+_0x269eae(0x1d4),{'datasetCode':_0x1a73b6,'candidates':_0x327a04[_0x269eae(0x1c5)](datasetFact)});return _0x327a04[0x0];}function directoryIdentity(_0x56d871){const _0x4c4110=a292_0x3871;return _0x56d871['normalize']('NFC')[_0x4c4110(0x1bf)]();}function a292_0x3871(_0x413af5,_0x4dc809){_0x413af5=_0x413af5-0x1a2;const _0x2c4d89=a292_0x2c4d();let _0x387198=_0x2c4d89[_0x413af5];return _0x387198;}function appendUnique(_0x315ade,_0x332598,_0xd2daea,_0xde5f5c){const _0xd7862c=a292_0x3871,_0x54677b=_0x315ade['get'](_0x332598)??[];!_0x54677b[_0xd7862c(0x1d6)](_0x311049=>_0xde5f5c(_0x311049)===_0xde5f5c(_0xd2daea))&&_0x54677b['push'](_0xd2daea),_0x315ade[_0xd7862c(0x1a8)](_0x332598,_0x54677b);}function datasetFact(_0x4bfb29){const _0x495873=a292_0x3871;return{'id':_0x4bfb29['id'],'name':_0x4bfb29[_0x495873(0x1ad)],'datasetCode':_0x4bfb29[_0x495873(0x1b0)]};}
|
|
1
|
+
(function(_0x3ad3c9,_0x1bbf7f){const _0x478eab=a292_0x510a,_0x3225ea=_0x3ad3c9();while(!![]){try{const _0x349bda=-parseInt(_0x478eab(0x13d))/0x1+-parseInt(_0x478eab(0x132))/0x2*(-parseInt(_0x478eab(0x126))/0x3)+-parseInt(_0x478eab(0x135))/0x4+-parseInt(_0x478eab(0x141))/0x5+-parseInt(_0x478eab(0x12a))/0x6*(-parseInt(_0x478eab(0x131))/0x7)+-parseInt(_0x478eab(0x11d))/0x8+parseInt(_0x478eab(0x127))/0x9;if(_0x349bda===_0x1bbf7f)break;else _0x3225ea['push'](_0x3225ea['shift']());}catch(_0x3dc3c1){_0x3225ea['push'](_0x3225ea['shift']());}}}(a292_0x30db,0xc9c68));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x2173e5){const _0x36e3de=a292_0x510a,_0xe26d44=[];for(const [_0x3ad0d5,_0x18f7a5]of Object[_0x36e3de(0x12d)](_0x2173e5[_0x36e3de(0x120)])){const [_0x1408c0,_0x46693b]=_0x3ad0d5[_0x36e3de(0x140)]('/');if(_0x1408c0!==_0x36e3de(0x13f)||!_0x46693b||!_0x18f7a5[_0x36e3de(0x13a)])continue;_0xe26d44[_0x36e3de(0x13b)]({'alias':_0x46693b,'datasetCode':_0x18f7a5['datasetCode']});}return _0xe26d44;}export function uniqueTrackedHookDirectoryByDataset(_0x543168){const _0x4ae7a0=a292_0x510a,_0x579a2c=new Map();for(const _0x1c0438 of trackedHookDirectoryMappings(_0x543168)){const _0x259bb0=directoryIdentity(_0x1c0438[_0x4ae7a0(0x13a)]),_0x30a4e2=_0x579a2c['get'](_0x259bb0)??new Map();_0x30a4e2[_0x4ae7a0(0x125)](directoryIdentity(_0x1c0438[_0x4ae7a0(0x14c)]),_0x1c0438[_0x4ae7a0(0x14c)]),_0x579a2c['set'](_0x259bb0,_0x30a4e2);}const _0x1130a2=new Map();for(const [_0x2da62a,_0x1e7500]of _0x579a2c){if(_0x1e7500[_0x4ae7a0(0x14a)]>0x1)throw hookDirectoryError(_0x4ae7a0(0x12c),_0x4ae7a0(0x130)+_0x2da62a+'\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20'+[..._0x1e7500[_0x4ae7a0(0x143)]()][_0x4ae7a0(0x150)](',\x20')+'.',{'datasetCode':_0x2da62a,'directories':[..._0x1e7500['values']()]});_0x1130a2[_0x4ae7a0(0x125)](_0x2da62a,[..._0x1e7500[_0x4ae7a0(0x143)]()][0x0]);}return _0x1130a2;}export function assertUnambiguousHookDirectoryMappings(_0x2dd7fd){const _0x5398fa=a292_0x510a,_0x8482ce=new Map();for(const {alias:_0x462c5d,datasetCode:_0x2ccf8d}of _0x2dd7fd){const _0x5cb0c7=directoryIdentity(_0x462c5d),_0x54c5de=_0x8482ce[_0x5398fa(0x136)](_0x5cb0c7)??new Set();_0x54c5de[_0x5398fa(0x139)](_0x2ccf8d),_0x8482ce[_0x5398fa(0x125)](_0x5cb0c7,_0x54c5de);}for(const [_0x2aa776,_0x30ae81]of _0x8482ce){if(_0x30ae81[_0x5398fa(0x14a)]>0x1)throw hookDirectoryError(_0x5398fa(0x133),'HOOK\x20directory\x20\x22'+_0x2aa776+_0x5398fa(0x11e),{'directoryName':_0x2aa776,'datasetCodes':[..._0x30ae81]});}}export function assertUnambiguousHookAliases(_0x4e1100){const _0x349896=a292_0x510a,_0x36b204=[..._0x4e1100],_0x39d035=new Map(),_0x54ba0a=new Map();for(const {alias:_0x258c41,datasetCode:_0x154177}of _0x36b204){const _0xddb102=directoryIdentity(_0x258c41),_0x44567b=directoryIdentity(_0x154177),_0x317851=_0x39d035[_0x349896(0x136)](_0xddb102)??new Set();_0x317851[_0x349896(0x139)](_0x154177),_0x39d035['set'](_0xddb102,_0x317851);const _0x522ad1=_0x54ba0a[_0x349896(0x136)](_0x44567b)??new Set();_0x522ad1[_0x349896(0x139)](_0x258c41),_0x54ba0a[_0x349896(0x125)](_0x44567b,_0x522ad1);}for(const [_0xb61ae3,_0xf2355f]of _0x39d035){if(_0xf2355f[_0x349896(0x14a)]>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS',_0x349896(0x14e)+_0xb61ae3+_0x349896(0x11e),{'alias':_0xb61ae3,'datasetCodes':[..._0xf2355f]});}for(const [_0x353e50,_0x42c034]of _0x54ba0a){if(_0x42c034[_0x349896(0x14a)]>0x1)throw hookDirectoryError(_0x349896(0x14d),_0x349896(0x130)+_0x353e50+_0x349896(0x13e),{'datasetCode':_0x353e50,'aliases':[..._0x42c034]});}}export function buildHookDirectoryIndexes(_0x55f7ce,_0x4e7df2=[]){const _0x31588d=a292_0x510a,_0x3c5061=[..._0x4e7df2];assertUnambiguousHookDirectoryMappings(_0x3c5061[_0x31588d(0x121)](([_0xf363b8,_0x38c39b])=>({'alias':_0xf363b8,'datasetCode':_0x38c39b})));const _0x4494b2=new Map(),_0x24f59b=new Map();for(const _0x5b196a of _0x55f7ce){appendUnique(_0x4494b2,directoryIdentity(_0x5b196a[_0x31588d(0x122)]),_0x5b196a,_0x488261=>_0x488261['code']);}for(const [_0x14bb9d,_0x256ed4]of _0x3c5061){appendUnique(_0x24f59b,directoryIdentity(_0x14bb9d),_0x256ed4,_0x2794a4=>_0x2794a4);}return{'datasetCodeToDatasets':_0x4494b2,'aliasToDatasetCodes':_0x24f59b};}export function resolvePushHookDirectory(_0x575a11,_0xf1976e,_0xb750f4){const _0x12e2b9=a292_0x510a,_0x4d6949=directoryIdentity(_0x575a11),_0x21ee8b=_0xb750f4[_0x12e2b9(0x13c)]['get'](_0x4d6949)??[],_0x2efd45=_0xb750f4['aliasToDatasetCodes'][_0x12e2b9(0x136)](_0x4d6949)??[],_0x236e55=new Set([..._0x21ee8b['map'](_0x370c1e=>_0x370c1e['code']),..._0x2efd45]);if(_0x236e55['size']>0x1)throw hookDirectoryError(_0x12e2b9(0x133),_0x12e2b9(0x142)+_0x575a11+_0x12e2b9(0x11f),{'directoryName':_0x575a11,'datasetCodes':[..._0x236e55]});const _0x205a6e=[..._0x236e55][0x0];if(_0x205a6e&&_0xf1976e?.[_0x12e2b9(0x13a)]&&_0x205a6e!==_0xf1976e['datasetCode'])throw hookDirectoryError(_0x12e2b9(0x145),'HOOK\x20directory\x20\x22'+_0x575a11+_0x12e2b9(0x14b)+_0xf1976e['datasetCode']+_0x12e2b9(0x138)+_0x205a6e+'\x22.',{'directoryName':_0x575a11,'datasetCode':_0x205a6e,'lockedDatasetCode':_0xf1976e[_0x12e2b9(0x13a)]});const _0x3972ba=_0x205a6e?findDatasetByCode(_0xb750f4,_0x205a6e):undefined,_0x46c355=!!_0x205a6e&&_0x2efd45[_0x12e2b9(0x149)](_0x205a6e);if(_0x3972ba)return{'dataset':_0x3972ba,'datasetCode':_0x3972ba[_0x12e2b9(0x122)],..._0x46c355?{'alias':_0x575a11}:{},'directoryProtocol':_0x46c355?_0x12e2b9(0x14c):'datasetCode','warnings':[]};const _0x57c1ee=_0xf1976e?.[_0x12e2b9(0x13a)];if(_0x57c1ee){const _0x37655b=findDatasetByCode(_0xb750f4,_0x57c1ee);if(_0x37655b)return{'dataset':_0x37655b,'datasetCode':_0x37655b[_0x12e2b9(0x122)],..._0xf1976e['alias']?{'alias':_0xf1976e['alias']}:{},'directoryProtocol':_0xf1976e[_0x12e2b9(0x14c)]?_0x12e2b9(0x14c):_0x12e2b9(0x13a),'warnings':[]};}if(_0x205a6e||_0x57c1ee){const _0x5a8036=_0x205a6e??_0x57c1ee;throw hookDirectoryError(_0x12e2b9(0x124),'HOOK\x20directory\x20\x22'+_0x575a11+_0x12e2b9(0x151),{'directoryName':_0x575a11,'datasetCode':_0x5a8036});}throw hookDirectoryError(_0x12e2b9(0x12b),'Cannot\x20resolve\x20HOOK\x20directory\x20\x22'+_0x575a11+_0x12e2b9(0x147),{'directoryName':_0x575a11});}export function preflightPushHookDirectories(_0x536bc1,_0x3e55f6,_0xb91326,_0x221874){const _0x5b97c4=a292_0x510a,_0x107901=new Map(),_0x51f10b=new Map();for(const _0x4d774a of _0x536bc1){if(_0x4d774a['type']!==_0x5b97c4(0x13f))continue;const _0x34d5eb=_0x4d774a[_0x5b97c4(0x14c)];if(!_0x34d5eb)throw hookDirectoryError(_0x5b97c4(0x12b),'Incomplete\x20HOOK\x20path:\x20'+_0x4d774a[_0x5b97c4(0x14f)],{'lockKey':_0x4d774a[_0x5b97c4(0x14f)]});let _0x13f6ca;try{_0x13f6ca=resolvePushHookDirectory(_0x34d5eb,_0x3e55f6[_0x5b97c4(0x120)][_0x4d774a['lockKey']],_0xb91326);}catch(_0xd98f33){if(_0x221874&&_0xd98f33 instanceof CliError&&[_0x5b97c4(0x124),'HOOK_DIRECTORY_UNRESOLVED'][_0x5b97c4(0x149)](_0xd98f33[_0x5b97c4(0x122)])){_0x221874['set'](_0x4d774a[_0x5b97c4(0x14f)],_0xd98f33[_0x5b97c4(0x12f)]);continue;}throw _0xd98f33;}_0x107901[_0x5b97c4(0x125)](_0x4d774a['lockKey'],_0x13f6ca);const _0xc26f96=_0x51f10b[_0x5b97c4(0x136)](_0x13f6ca['datasetCode'])??new Set();_0xc26f96[_0x5b97c4(0x139)](_0x34d5eb),_0x51f10b[_0x5b97c4(0x125)](_0x13f6ca['datasetCode'],_0xc26f96);}for(const [_0x281d0d,_0x4d6588]of _0x51f10b){if(_0x4d6588[_0x5b97c4(0x14a)]>0x1)throw hookDirectoryError(_0x5b97c4(0x12c),_0x5b97c4(0x130)+_0x281d0d+_0x5b97c4(0x123)+[..._0x4d6588][_0x5b97c4(0x150)](',\x20')+'.',{'datasetCode':_0x281d0d,'directories':[..._0x4d6588]});}return _0x107901;}function a292_0x510a(_0x99ee67,_0x5f1eb2){_0x99ee67=_0x99ee67-0x11d;const _0x30db57=a292_0x30db();let _0x510a2b=_0x30db57[_0x99ee67];return _0x510a2b;}export function hookDirectoryError(_0x22e8d0,_0x36ee38,_0x5eb4e5){const _0x2ae2d4=a292_0x510a,_0x3fe6db=new CliError(_0x22e8d0,0x2,_0x22e8d0+':\x20'+_0x36ee38);return _0x3fe6db[_0x2ae2d4(0x137)]=_0x5eb4e5,_0x3fe6db;}function a292_0x30db(){const _0x48b26b=['get','details','\x22\x20to\x20\x22','add','datasetCode','push','datasetCodeToDatasets','1042437hyiFOC','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','HOOK','split','5891390TWrqTE','HOOK\x20directory\x20\x22','values','Dataset\x20code\x20\x22','HOOK_MAPPING_DRIFT','some','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','name','includes','size','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','alias','HOOK_ALIAS_AMBIGUOUS','SDK\x20alias\x20\x22','lockKey','join','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','7839952gAJWEw','\x22\x20resolves\x20to\x20multiple\x20Datasets.','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','functions','map','code','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','HOOK_DATASET_NOT_FOUND','set','4396983fhgeZd','31335021itOcsG','toLowerCase','HOOK_DATASET_CODE_AMBIGUOUS','318DQaWWD','HOOK_DIRECTORY_UNRESOLVED','HOOK_DUPLICATE_DIRECTORIES','entries','NFC','message','Dataset\x20\x22','24038LSSZaf','2NqfMNL','HOOK_DIRECTORY_AMBIGUOUS','normalize','4408604jusomq'];a292_0x30db=function(){return _0x48b26b;};return a292_0x30db();}function findDatasetByCode(_0x5092bf,_0x6ba2a7){const _0x415e43=a292_0x510a,_0x41d9a3=_0x5092bf['datasetCodeToDatasets'][_0x415e43(0x136)](directoryIdentity(_0x6ba2a7))??[];if(_0x41d9a3['length']>0x1)throw hookDirectoryError(_0x415e43(0x129),_0x415e43(0x144)+_0x6ba2a7+'\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.',{'datasetCode':_0x6ba2a7,'candidates':_0x41d9a3[_0x415e43(0x121)](datasetFact)});return _0x41d9a3[0x0];}function directoryIdentity(_0x32c15d){const _0x265696=a292_0x510a;return _0x32c15d[_0x265696(0x134)](_0x265696(0x12e))[_0x265696(0x128)]();}function appendUnique(_0x4db5f4,_0x4e4603,_0x1849f6,_0x43b208){const _0xe0de05=a292_0x510a,_0x9fee73=_0x4db5f4['get'](_0x4e4603)??[];!_0x9fee73[_0xe0de05(0x146)](_0x369b53=>_0x43b208(_0x369b53)===_0x43b208(_0x1849f6))&&_0x9fee73[_0xe0de05(0x13b)](_0x1849f6),_0x4db5f4[_0xe0de05(0x125)](_0x4e4603,_0x9fee73);}function datasetFact(_0x2fe46f){const _0x565f48=a292_0x510a;return{'id':_0x2fe46f['id'],'name':_0x2fe46f[_0x565f48(0x148)],'datasetCode':_0x2fe46f[_0x565f48(0x122)]};}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x54afaa,_0x3813f5){const _0x6ba32d=a293_0x241e,_0x32e42d=_0x54afaa();while(!![]){try{const _0x56a68b=-parseInt(_0x6ba32d(0x152))/0x1*(parseInt(_0x6ba32d(0x153))/0x2)+parseInt(_0x6ba32d(0x14e))/0x3+parseInt(_0x6ba32d(0x162))/0x4*(parseInt(_0x6ba32d(0x14a))/0x5)+parseInt(_0x6ba32d(0x15c))/0x6*(-parseInt(_0x6ba32d(0x14b))/0x7)+parseInt(_0x6ba32d(0x14f))/0x8*(-parseInt(_0x6ba32d(0x15b))/0x9)+-parseInt(_0x6ba32d(0x14d))/0xa*(-parseInt(_0x6ba32d(0x14c))/0xb)+-parseInt(_0x6ba32d(0x155))/0xc;if(_0x56a68b===_0x3813f5)break;else _0x32e42d['push'](_0x32e42d['shift']());}catch(_0x30283f){_0x32e42d['push'](_0x32e42d['shift']());}}}(a293_0xc9dd,0x9c404));import{mkdir,readFile,writeFile}from'node:fs/promises';function a293_0xc9dd(){const _0x215632=['2960997JzAfXB','3668744DMPbGQ',':\x20scriptsRoot\x20mismatch\x20—\x20','scriptsRoot','6xJZEYP','27158HhESmf','object','11012076tRKfDd','lastSync','parse','\x22.\x20','code','\x22\x20vs\x20lock\x20\x22','9sIJmmL','1103106OuAnsz','ENOENT','utf8','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20','stringify','8CfqVUi','apps','functions','1290970oYpaZb','21BzCWKf','4201670WBmErZ','30vTuAlZ'];a293_0xc9dd=function(){return _0x215632;};return a293_0xc9dd();}import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}function a293_0x241e(_0x3fea00,_0x2279c9){_0x3fea00=_0x3fea00-0x149;const _0xc9dd=a293_0xc9dd();let _0x241e1d=_0xc9dd[_0x3fea00];return _0x241e1d;}export function ensureLockScope(_0x533647,_0x4590d2,_0x52b571,_0xd870c5){const _0x22496b=a293_0x241e,_0x50090f={'apps':_0x533647[_0x22496b(0x163)]&&typeof _0x533647[_0x22496b(0x163)]===_0x22496b(0x154)?_0x533647[_0x22496b(0x163)]:{}};let _0x21baff=_0x50090f[_0x22496b(0x163)][_0x4590d2];if(!_0x21baff)return _0x21baff={'scriptsRoot':_0x52b571,'lastSync':'','functions':{}},_0x50090f[_0x22496b(0x163)][_0x4590d2]=_0x21baff,{'lockData':_0x50090f,'appLock':_0x21baff};if(!_0x21baff[_0x22496b(0x151)])_0x21baff[_0x22496b(0x151)]=_0x52b571;else{if(_0x21baff[_0x22496b(0x151)]!==_0x52b571)throw new Error(_0xd870c5+_0x22496b(0x150)+('current\x20\x22'+_0x52b571+_0x22496b(0x15a)+_0x21baff[_0x22496b(0x151)]+_0x22496b(0x158))+_0x22496b(0x15f));}return!_0x21baff[_0x22496b(0x149)]&&(_0x21baff[_0x22496b(0x149)]={}),!_0x21baff[_0x22496b(0x156)]&&(_0x21baff['lastSync']=''),{'lockData':_0x50090f,'appLock':_0x21baff};}export async function readBffLockFile(_0x177ada){const _0x8f7f0f=a293_0x241e;try{const _0xa807ee=await readFile(_0x177ada,_0x8f7f0f(0x15e)),_0x58c899=JSON[_0x8f7f0f(0x157)](_0xa807ee);return{'apps':_0x58c899['apps']&&typeof _0x58c899[_0x8f7f0f(0x163)]===_0x8f7f0f(0x154)?_0x58c899[_0x8f7f0f(0x163)]:{}};}catch(_0x2a94b8){if(_0x2a94b8[_0x8f7f0f(0x159)]===_0x8f7f0f(0x15d))return null;throw new Error(_0x8f7f0f(0x160)+String(_0x2a94b8));}}export async function writeBffLockFile(_0x5b076f,_0x39256f){const _0x2272d3=a293_0x241e;await mkdir(dirname(_0x5b076f),{'recursive':!![]}),await writeFile(_0x5b076f,JSON[_0x2272d3(0x161)](_0x39256f,null,0x2),_0x2272d3(0x15e));}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a295_0x28b56a=a295_0x2917;(function(_0x3c9c5d,_0x590686){const _0x579538=a295_0x2917,_0x5b71d7=_0x3c9c5d();while(!![]){try{const _0x53f1aa=-parseInt(_0x579538(0x16d))/0x1*(parseInt(_0x579538(0x17c))/0x2)+parseInt(_0x579538(0x171))/0x3+parseInt(_0x579538(0x17d))/0x4*(-parseInt(_0x579538(0x16a))/0x5)+-parseInt(_0x579538(0x169))/0x6*(parseInt(_0x579538(0x164))/0x7)+-parseInt(_0x579538(0x176))/0x8+-parseInt(_0x579538(0x16c))/0x9*(-parseInt(_0x579538(0x170))/0xa)+-parseInt(_0x579538(0x167))/0xb*(-parseInt(_0x579538(0x177))/0xc);if(_0x53f1aa===_0x590686)break;else _0x5b71d7['push'](_0x5b71d7['shift']());}catch(_0x2a13d8){_0x5b71d7['push'](_0x5b71d7['shift']());}}}(a295_0x4d8c,0xd2b3b));export const DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x28b56a(0x175);const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION=a295_0x28b56a(0x163);export function snakeToCamel(_0x383e46){const _0x4acc24=a295_0x28b56a;return _0x383e46[_0x4acc24(0x16b)]()['replace'](/_([a-z])/g,(_0x2cf729,_0x4cd234)=>_0x4cd234[_0x4acc24(0x172)]());}export function findHookLocationByRemoteId(_0x298914,_0x32156c){const _0x5aca0a=a295_0x28b56a;if(!_0x32156c)return undefined;for(const [_0x2673a3,_0x209b10]of Object['entries'](_0x298914)){if(_0x209b10[_0x5aca0a(0x16f)]===_0x32156c&&_0x209b10[_0x5aca0a(0x16e)]&&_0x209b10[_0x5aca0a(0x179)]&&_0x209b10[_0x5aca0a(0x17b)]){const _0x3703ac=_0x2673a3[_0x5aca0a(0x174)]('/')[0x1];return{'alias':_0x3703ac||_0x209b10['alias'],'datasetCode':_0x209b10['datasetCode'],'operationType':_0x209b10[_0x5aca0a(0x179)],'functionNode':_0x209b10[_0x5aca0a(0x17b)]};}}return undefined;}function a295_0x2917(_0x176537,_0x1f9352){_0x176537=_0x176537-0x163;const _0x4d8c4d=a295_0x4d8c();let _0x2917c4=_0x4d8c4d[_0x176537];return _0x2917c4;}export function extractScriptDescription(_0x153e4c){const _0x229678=a295_0x28b56a,_0x505fcc=_0x153e4c['match'](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x505fcc?.[0x1])return undefined;const _0x1b9e30=_0x505fcc[0x1],_0x36aad8=_0x54ee58=>{const _0x15a587=_0x54ee58?.['trim']();if(!_0x15a587||_0x15a587===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0x15a587===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0x15a587;},_0x29b304=_0x1b9e30['match'](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x29b304)return _0x36aad8(_0x29b304[0x1]);const _0x59f39e=_0x1b9e30[_0x229678(0x174)](/\r?\n/)['map'](_0x4a6520=>_0x4a6520['replace'](/^\s*\*\s?/,'')[_0x229678(0x173)]()),_0x38b2fe=_0x59f39e[_0x229678(0x17a)](_0x2609bc=>/^\[\s*脚本类型\s*]\s*\S+/[_0x229678(0x165)](_0x2609bc))&&_0x59f39e[_0x229678(0x17a)](_0x31d9ee=>/^\[\s*脚本名称\s*]\s*\S+/[_0x229678(0x165)](_0x31d9ee));if(!_0x38b2fe)return undefined;for(const _0x22a5f7 of _0x59f39e){if(!_0x22a5f7||_0x22a5f7[_0x229678(0x166)]('@')||/^\[[^\]]+]\s*/['test'](_0x22a5f7))continue;return _0x36aad8(_0x22a5f7);}return undefined;}function a295_0x4d8c(){const _0x45684f=['124222JqiuxM','test','startsWith','156717WKVcrT','after','456zzrxGb','5qKOQct','toLowerCase','10559853LlysxT','1697278PNjqIH','datasetCode','remoteId','10ptRQCr','3076881GZknye','toUpperCase','trim','split','TODO:\x20补充脚本功能描述','9863496QGKFjm','3420ACNlVV','before','operationType','some','functionNode','2sPRDpk','4469572akiQGX','TODO:\x20add\x20script\x20description'];a295_0x4d8c=function(){return _0x45684f;};return a295_0x4d8c();}export function isValidBffFunctionName(_0x9ead0d){const _0x5d4416=a295_0x28b56a;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x5d4416(0x165)](_0x9ead0d);}export function normalizeHookFunctionNode(_0x1adf20){const _0x325bf3=a295_0x28b56a;if(!_0x1adf20)return undefined;const _0x7b0bc0=_0x1adf20[_0x325bf3(0x173)]()['toLowerCase']();if(_0x7b0bc0===_0x325bf3(0x178)||_0x7b0bc0===_0x325bf3(0x168))return _0x7b0bc0;return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a296_0x29f4(){const _0xe7ac94=['1671424ESMIcS','5cRqGPK','10VNktLm','15YdLoBE','1384158mqaetU','411284uKBIxn','/smartapi/db-analysis/cross-db/start','58520XCRXpo','433647jBXLsq','14888577fjMztD','2177175WEZhHs','72hwIvEB'];a296_0x29f4=function(){return _0xe7ac94;};return a296_0x29f4();}const a296_0x21b4da=a296_0x3e8c;(function(_0x322917,_0x5dba6d){const _0x111d13=a296_0x3e8c,_0x4bbff7=_0x322917();while(!![]){try{const _0x467c5e=parseInt(_0x111d13(0x11c))/0x1+parseInt(_0x111d13(0x11e))/0x2*(-parseInt(_0x111d13(0x126))/0x3)+-parseInt(_0x111d13(0x123))/0x4+parseInt(_0x111d13(0x124))/0x5*(-parseInt(_0x111d13(0x127))/0x6)+-parseInt(_0x111d13(0x121))/0x7+-parseInt(_0x111d13(0x122))/0x8*(parseInt(_0x111d13(0x11f))/0x9)+parseInt(_0x111d13(0x125))/0xa*(parseInt(_0x111d13(0x120))/0xb);if(_0x467c5e===_0x5dba6d)break;else _0x4bbff7['push'](_0x4bbff7['shift']());}catch(_0x43d81d){_0x4bbff7['push'](_0x4bbff7['shift']());}}}(a296_0x29f4,0x36ff6));function a296_0x3e8c(_0xa2946c,_0x24c2be){_0xa2946c=_0xa2946c-0x11c;const _0x29f4f3=a296_0x29f4();let _0x3e8c8d=_0x29f4f3[_0xa2946c];return _0x3e8c8d;}export const CROSS_DB_ANALYSIS_PATHS={'start':a296_0x21b4da(0x11d),'status':'/smartapi/db-analysis/cross-db/status','latest':'/smartapi/db-analysis/cross-db/latest-job'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a297_0x58ec1a=a297_0x1ae5;(function(_0x23fba7,_0x4335e0){const _0x1d7da5=a297_0x1ae5,_0x2dc114=_0x23fba7();while(!![]){try{const _0x3e8c27=-parseInt(_0x1d7da5(0x73))/0x1*(-parseInt(_0x1d7da5(0x6b))/0x2)+-parseInt(_0x1d7da5(0x6e))/0x3+-parseInt(_0x1d7da5(0x6f))/0x4+-parseInt(_0x1d7da5(0x6d))/0x5+-parseInt(_0x1d7da5(0x70))/0x6*(-parseInt(_0x1d7da5(0x72))/0x7)+parseInt(_0x1d7da5(0x6a))/0x8+-parseInt(_0x1d7da5(0x6c))/0x9*(parseInt(_0x1d7da5(0x71))/0xa);if(_0x3e8c27===_0x4335e0)break;else _0x2dc114['push'](_0x2dc114['shift']());}catch(_0x4b8ebc){_0x2dc114['push'](_0x2dc114['shift']());}}}(a297_0x281c,0xc15ff));function a297_0x1ae5(_0x1ccd39,_0x570e68){_0x1ccd39=_0x1ccd39-0x69;const _0x281c19=a297_0x281c();let _0x1ae549=_0x281c19[_0x1ccd39];return _0x1ae549;}export const CROSS_DB_RELATION_PATHS={'list':a297_0x58ec1a(0x74),'create':a297_0x58ec1a(0x69),'update':'/smartapi/cross-db-relation/update','delete':'/smartapi/cross-db-relation/delete'};function a297_0x281c(){const _0x34dfa0=['8632878pCzSWx','10iAPyXS','7CyahZY','9DFzzJH','/smartapi/cross-db-relation/query','/smartapi/cross-db-relation/create','10477568cjGxdf','79036JmOSqB','6074928TkRzPm','3270795fkMqQi','2062122NEzlHV','1182332UdKdFg'];a297_0x281c=function(){return _0x34dfa0;};return a297_0x281c();}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x15c722,_0x24f398){const _0x55ef37=a298_0x4397,_0x3fdc6a=_0x15c722();while(!![]){try{const _0x34dc96=parseInt(_0x55ef37(0x149))/0x1*(-parseInt(_0x55ef37(0x139))/0x2)+parseInt(_0x55ef37(0x13d))/0x3+-parseInt(_0x55ef37(0x142))/0x4*(parseInt(_0x55ef37(0x134))/0x5)+-parseInt(_0x55ef37(0x146))/0x6*(parseInt(_0x55ef37(0x14d))/0x7)+parseInt(_0x55ef37(0x13b))/0x8*(-parseInt(_0x55ef37(0x13e))/0x9)+parseInt(_0x55ef37(0x150))/0xa*(parseInt(_0x55ef37(0x147))/0xb)+parseInt(_0x55ef37(0x135))/0xc*(parseInt(_0x55ef37(0x148))/0xd);if(_0x34dc96===_0x24f398)break;else _0x3fdc6a['push'](_0x3fdc6a['shift']());}catch(_0x2e389b){_0x3fdc6a['push'](_0x3fdc6a['shift']());}}}(a298_0x1402,0x69c7d));import{listDatasets}from'../core/api-client.js';const cache=new Map();function a298_0x4397(_0x2fd21b,_0x4bb8af){_0x2fd21b=_0x2fd21b-0x134;const _0x14020e=a298_0x1402();let _0x439791=_0x14020e[_0x2fd21b];return _0x439791;}export async function listDatabases(_0x162c1c){const _0xeb226e=a298_0x4397;if(cache['has'](_0x162c1c))return cache[_0xeb226e(0x13a)](_0x162c1c);const _0x49a517=await listDatasets(_0x162c1c),_0x4b2998=new Map();for(const _0x30ca44 of _0x49a517){const _0xbc725d=_0x30ca44[_0xeb226e(0x14a)];_0xbc725d?.[_0xeb226e(0x14b)]!=null&&_0x4b2998[_0xeb226e(0x143)](_0xbc725d[_0xeb226e(0x14b)],_0xbc725d[_0xeb226e(0x13f)]??_0xeb226e(0x152)+_0xbc725d['dbId']);}const _0x2ae3bc=[..._0x4b2998['entries']()]['map'](([_0x6197bf,_0x384203])=>({'dbId':_0x6197bf,'dbName':_0x384203}));return cache[_0xeb226e(0x143)](_0x162c1c,_0x2ae3bc),_0x2ae3bc;}function a298_0x1402(){const _0x3d4a8f=['isNaN','503334bxeHAk','2601kRhKug','dbName','find','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','2949128BSlqkg','set','length','toLowerCase','42KdMJGy','63151serSnQ','8632kELkIS','6LBCotY','dbtableConfig','dbId','\x22\x20matches\x20multiple\x20databases:\x20','63973zjKGls','includes','No\x20database\x20matching\x20\x22','270WWjZKI','\x22.\x20Available:\x20','db-','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','.\x20Be\x20more\x20specific.','5eWyqNW','23724eyObSz','map','\x22\x20under\x20app\x20\x22','join','92526kZmZfa','get','3416gFWgtJ'];a298_0x1402=function(){return _0x3d4a8f;};return a298_0x1402();}export async function resolveDb(_0x45bbd2,_0x212ef3){const _0x38fd73=a298_0x4397,_0x4f54ea=await listDatabases(_0x45bbd2);if(_0x4f54ea['length']===0x0)return{'resolved':[],'error':_0x38fd73(0x153)+_0x45bbd2+'\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.'};if(!_0x212ef3)return{'resolved':_0x4f54ea};const _0x7413d3=Number(_0x212ef3);if(!Number[_0x38fd73(0x13c)](_0x7413d3)){const _0x941a91=_0x4f54ea[_0x38fd73(0x140)](_0x59b52e=>_0x59b52e[_0x38fd73(0x14b)]===_0x7413d3);if(_0x941a91)return{'resolved':[_0x941a91]};}const _0x200fef=_0x212ef3[_0x38fd73(0x145)](),_0x76bd35=_0x4f54ea['filter'](_0x297355=>_0x297355[_0x38fd73(0x13f)][_0x38fd73(0x145)]()[_0x38fd73(0x14e)](_0x200fef));if(_0x76bd35[_0x38fd73(0x144)]>0x0)return{'resolved':_0x76bd35};const _0x39cfcd=_0x4f54ea[_0x38fd73(0x136)](_0x35ed63=>_0x35ed63[_0x38fd73(0x13f)]+'\x20('+_0x35ed63['dbId']+')')[_0x38fd73(0x138)](',\x20');return{'resolved':[],'error':_0x38fd73(0x14f)+_0x212ef3+_0x38fd73(0x137)+_0x45bbd2+_0x38fd73(0x151)+_0x39cfcd+'.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.'};}export async function resolveOneDb(_0x28a4c5,_0x580bfa){const _0x394493=a298_0x4397,{resolved:_0xd88ec1,error:_0x1dbeb1}=await resolveDb(_0x28a4c5,_0x580bfa);if(_0x1dbeb1)return{'db':null,'error':_0x1dbeb1};if(_0xd88ec1[_0x394493(0x144)]===0x1)return{'db':_0xd88ec1[0x0]};if(!_0x580bfa){const _0x78f864=_0xd88ec1[_0x394493(0x136)](_0x5694e4=>_0x5694e4['dbName']+'\x20('+_0x5694e4[_0x394493(0x14b)]+')')[_0x394493(0x138)](',\x20');return{'db':null,'error':_0x394493(0x141)+_0x78f864};}const _0x4a32d0=_0xd88ec1[_0x394493(0x136)](_0x3983f1=>_0x3983f1[_0x394493(0x13f)]+'\x20('+_0x3983f1['dbId']+')')[_0x394493(0x138)](',\x20');return{'db':null,'error':'\x22'+_0x580bfa+_0x394493(0x14c)+_0x4a32d0+_0x394493(0x154)};}export async function getDbName(_0x53a7e3,_0x106a34){const _0x32b180=a298_0x4397,_0x399b3b=await listDatabases(_0x53a7e3);return _0x399b3b[_0x32b180(0x140)](_0x32c91d=>_0x32c91d[_0x32b180(0x14b)]===_0x106a34)?.[_0x32b180(0x13f)];}
|