@lovrabet/rabetbase-cli 2.5.4 → 2.5.5-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +39 -0
- package/skills/rabetbase-page-generation/references/component-baseline.md +18 -0
- package/skills/rabetbase-page-generation/references/generation.md +126 -0
- package/skills/rabetbase-page-generation/templates/onepage/build.mjs +48 -0
- package/skills/rabetbase-page-generation/templates/onepage/create/README.md +20 -0
- package/skills/rabetbase-page-generation/templates/onepage/create/index.jsx +4 -0
- package/skills/rabetbase-page-generation/templates/onepage/create/preview.png +0 -0
- package/skills/rabetbase-page-generation/templates/onepage/detail/README.md +20 -0
- package/skills/rabetbase-page-generation/templates/onepage/detail/index.jsx +194 -0
- package/skills/rabetbase-page-generation/templates/onepage/detail/preview.png +0 -0
- package/skills/rabetbase-page-generation/templates/onepage/list/README.md +20 -0
- package/skills/rabetbase-page-generation/templates/onepage/list/index.jsx +721 -0
- package/skills/rabetbase-page-generation/templates/onepage/list/preview.png +0 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/editor.jsx +395 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/model.js +141 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/page.css +377 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/record-layout.jsx +90 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/responsive.jsx +70 -0
- package/skills/rabetbase-page-generation/templates/onepage/update/README.md +21 -0
- package/skills/rabetbase-page-generation/templates/onepage/update/index.jsx +4 -0
- package/skills/rabetbase-page-generation/templates/onepage/update/preview.png +0 -0
- package/skills/rabetbase.manifest.json +3 -3
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a0_0x2c687a=a0_0x568b;(function(_0x2c998d,_0xb5bd0b){const _0x40371e=a0_0x568b,_0x3b4dc2=_0x2c998d();while(!![]){try{const _0x464f7b=parseInt(_0x40371e(0xa4))/0x1*(parseInt(_0x40371e(0xa8))/0x2)+-parseInt(_0x40371e(0xa3))/0x3*(parseInt(_0x40371e(0xad))/0x4)+parseInt(_0x40371e(0x9c))/0x5+parseInt(_0x40371e(0x97))/0x6*(parseInt(_0x40371e(0x9a))/0x7)+-parseInt(_0x40371e(0xa0))/0x8*(-parseInt(_0x40371e(0x95))/0x9)+-parseInt(_0x40371e(0x9e))/0xa+-parseInt(_0x40371e(0x9b))/0xb*(parseInt(_0x40371e(0xa7))/0xc);if(_0x464f7b===_0xb5bd0b)break;else _0x3b4dc2['push'](_0x3b4dc2['shift']());}catch(_0x591b35){_0x3b4dc2['push'](_0x3b4dc2['shift']());}}}(a0_0x3316,0x4c8e4));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x2591b7 from'node:path';import{fetchDatasetDoc}from'../core/api-client.js';import{logger}from'../utils/logger.js';export{fetchDatasetDoc}from'../core/api-client.js';function a0_0x568b(_0x36d7c4,_0x5e54b2){_0x36d7c4=_0x36d7c4-0x95;const _0x3316de=a0_0x3316();let _0x568bf2=_0x3316de[_0x36d7c4];return _0x568bf2;}function delay(_0x1f7509){return new Promise(_0xd3c020=>setTimeout(_0xd3c020,_0x1f7509));}function a0_0x3316(){const _0x8e91a7=['push','length','1140IRPxUN','166FolcOC','utf8','name','message','.md','3404VnWUlo','datasetCode','✓\x20Generated:\x20','2257461YgIEnB','api-doc','2179248CBEVdR','Waiting\x203\x20seconds...\x0a','.md\x20(','7wOvHnu','638AseVFh','1776975aKVjjy','join','4390610FtetvA','Failed\x20to\x20generate\x20docs:\x20','16SwUTTR','./docs','log','1929cEdecK','1025Xvvnrt'];a0_0x3316=function(){return _0x8e91a7;};return a0_0x3316();}export async function generateDatasetDocs(_0x5e78b7,_0x1af806,_0x4ab342,_0x4bfb92=a0_0x2c687a(0xa1),_0x36fc42,_0x46d7a1){const _0x28de98=a0_0x2c687a;mkdirSync(_0x4bfb92,{'recursive':!![]});const _0x1f2a96=[],_0x316ddb=_0x5e78b7[_0x28de98(0xa6)];console[_0x28de98(0xa2)]('\x0a'+_0x316ddb+'\x20datasets\x20to\x20generate\x20docs\x20for\x0a');for(let _0xbf4d7=0x0;_0xbf4d7<_0x5e78b7['length'];_0xbf4d7++){const _0x492de7=_0x5e78b7[_0xbf4d7],_0x50238c=_0xbf4d7+0x1,_0x4d54d0=_0x492de7['tableName'];try{console['log']('['+_0x50238c+'/'+_0x316ddb+']\x20Generating:\x20'+_0x4d54d0+_0x28de98(0x99)+_0x492de7[_0x28de98(0xaa)]+')');if(_0x36fc42)_0x36fc42(_0x50238c,_0x316ddb,_0x4d54d0);const _0x32c35a=await fetchDatasetDoc({'appCode':_0x1af806,'cookie':_0x4ab342,'datasetCode':_0x492de7[_0x28de98(0xae)],'datasetId':_0x492de7['id'],'enableAI':![],'extraParams':_0x46d7a1}),_0x58882a=a0_0x2591b7[_0x28de98(0x9d)](_0x4bfb92,_0x4d54d0+_0x28de98(0xac));writeFileSync(_0x58882a,_0x32c35a,{'encoding':_0x28de98(0xa9)}),console[_0x28de98(0xa2)](_0x28de98(0xaf)+_0x4d54d0+_0x28de98(0xac)),logger['success'](_0x28de98(0x96),'Generated\x20docs\x20successfully:\x20'+_0x4d54d0,undefined,{'datasetCode':_0x492de7[_0x28de98(0xae)],'datasetName':_0x492de7[_0x28de98(0xaa)],'filePath':_0x58882a,'progress':_0x50238c+'/'+_0x316ddb}),_0x1f2a96['push']({'datasetCode':_0x492de7['datasetCode'],'datasetName':_0x492de7['name'],'filePath':_0x58882a,'success':!![]});if(_0x50238c<_0x316ddb)await delay(0x1388);}catch(_0x31b93c){const _0x23e0dd=_0x31b93c instanceof Error?_0x31b93c[_0x28de98(0xab)]:String(_0x31b93c);console[_0x28de98(0xa2)]('✗\x20Failed:\x20'+_0x4d54d0+'.md\x20-\x20'+_0x23e0dd),logger['error'](_0x28de98(0x96),_0x28de98(0x9f)+_0x492de7[_0x28de98(0xae)],{'datasetCode':_0x492de7[_0x28de98(0xae)],'datasetName':_0x492de7[_0x28de98(0xaa)],'error':_0x23e0dd,'progress':_0x50238c+'/'+_0x316ddb}),_0x1f2a96[_0x28de98(0xa5)]({'datasetCode':_0x492de7[_0x28de98(0xae)],'datasetName':_0x492de7[_0x28de98(0xaa)],'filePath':'','success':![],'error':_0x23e0dd}),_0x50238c<_0x316ddb&&(console[_0x28de98(0xa2)](_0x28de98(0x98)),await delay(0xbb8));}}return _0x1f2a96;}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a1_0x44b9(_0x10ae47,_0x45475a){_0x10ae47=_0x10ae47-0x8a;const _0x3e9da3=a1_0x3e9d();let _0x44b969=_0x3e9da3[_0x10ae47];return _0x44b969;}const a1_0x57e5fd=a1_0x44b9;(function(_0x408621,_0x59cc73){const _0x2a81a9=a1_0x44b9,_0x300d08=_0x408621();while(!![]){try{const _0x23e8ae=parseInt(_0x2a81a9(0x91))/0x1*(-parseInt(_0x2a81a9(0xa4))/0x2)+-parseInt(_0x2a81a9(0xa1))/0x3*(-parseInt(_0x2a81a9(0x9a))/0x4)+parseInt(_0x2a81a9(0x90))/0x5*(parseInt(_0x2a81a9(0x99))/0x6)+parseInt(_0x2a81a9(0x95))/0x7+parseInt(_0x2a81a9(0xa2))/0x8*(-parseInt(_0x2a81a9(0x9e))/0x9)+-parseInt(_0x2a81a9(0x9d))/0xa*(parseInt(_0x2a81a9(0xad))/0xb)+parseInt(_0x2a81a9(0xa5))/0xc;if(_0x23e8ae===_0x59cc73)break;else _0x300d08['push'](_0x300d08['shift']());}catch(_0x3c85f5){_0x300d08['push'](_0x300d08['shift']());}}}(a1_0x3e9d,0x5d71b));import a1_0x2fc8e3 from'node:path';function a1_0x3e9d(){const _0x23740a=['72020OBPJMy','9DEJvWy','cwd','push','16908cfwpgr','2686568CzpSOV','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','23914Pvtvep','5483736bVlzgo','.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.','values','outputDir','\x22\x20resolves\x20to\x20multiple\x20API\x20directories.','join','flatMap','validation','209wuIWVQ','apiGroup','length','trim','filter','Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20','app','name','1028810GSGKlM','59LjJjFW','normalizedApiDir','Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.','set','3446359GbvAuY','add','map','resolve','6qVHWbq','288svPtey','size','API\x20directory\x20\x22'];a1_0x3e9d=function(){return _0x23740a;};return a1_0x3e9d();}import{CliErrors}from'../errors.js';export function normalizeApiDir(_0x267286,_0x15ec0c=process['cwd']()){const _0x1289ee=a1_0x44b9;return a1_0x2fc8e3[_0x1289ee(0x98)](_0x15ec0c,_0x267286);}function normalizedApiGroup(_0x5096eb){const _0x361533=a1_0x44b9,_0x76777d=_0x5096eb?.[_0x361533(0x8b)]();return _0x76777d||undefined;}export function resolveApiProfileLayouts(_0x1ffe17,_0x15661a,_0x1e807e=process[a1_0x57e5fd(0x9f)]()){const _0x3d31cf=a1_0x57e5fd,_0x26e90e=_0x1ffe17[_0x3d31cf(0x97)](_0x495035=>{const _0x3eb4db=_0x3d31cf,_0x422699=_0x15661a(_0x495035);return{'app':_0x495035,'outputDir':_0x422699,'normalizedApiDir':normalizeApiDir(_0x422699,_0x1e807e),'apiGroup':normalizedApiGroup(_0x495035[_0x3eb4db(0xae)])};}),_0x38ff11=new Map();for(const _0x5ec1d2 of _0x26e90e){if(!_0x5ec1d2[_0x3d31cf(0xae)])continue;const _0x5d19a5=_0x38ff11['get'](_0x5ec1d2[_0x3d31cf(0xae)])??new Set();_0x5d19a5[_0x3d31cf(0x96)](_0x5ec1d2[_0x3d31cf(0x92)]),_0x38ff11[_0x3d31cf(0x94)](_0x5ec1d2[_0x3d31cf(0xae)],_0x5d19a5);}for(const [_0x258fac,_0x4839c2]of _0x38ff11){if(_0x4839c2[_0x3d31cf(0x9b)]>0x1)throw CliErrors['validation']('API\x20group\x20\x22'+_0x258fac+_0x3d31cf(0xa9),_0x3d31cf(0x93));}const _0x5c957b=new Map();for(const _0x517f2e of _0x26e90e){const _0x55ec2e=_0x5c957b['get'](_0x517f2e[_0x3d31cf(0x92)])??[];_0x55ec2e[_0x3d31cf(0xa0)](_0x517f2e),_0x5c957b[_0x3d31cf(0x94)](_0x517f2e['normalizedApiDir'],_0x55ec2e);}for(const _0x10de67 of _0x5c957b[_0x3d31cf(0xa7)]()){const _0x45dee2=new Set(_0x10de67[_0x3d31cf(0xab)](_0x597dc1=>_0x597dc1['apiGroup']?[_0x597dc1[_0x3d31cf(0xae)]]:[]));if(_0x45dee2['size']===0x0)continue;if(_0x45dee2['size']>0x1||_0x10de67['some'](_0x37d043=>!_0x37d043[_0x3d31cf(0xae)])){const _0x593d32=_0x10de67[_0x3d31cf(0x97)](_0x383048=>_0x383048[_0x3d31cf(0x8e)][_0x3d31cf(0x8f)])[_0x3d31cf(0xaa)](',\x20');throw CliErrors[_0x3d31cf(0xac)](_0x3d31cf(0x9c)+_0x10de67[0x0][_0x3d31cf(0xa8)]+_0x3d31cf(0xa3),_0x3d31cf(0x8d)+_0x593d32+_0x3d31cf(0xa6));}}return _0x26e90e;}export function getRegistryGroup(_0x5d93b2,_0xd90a73){const _0x58b002=a1_0x57e5fd;if(_0xd90a73[_0x58b002(0xae)])return _0x5d93b2[_0x58b002(0x8c)](_0x20310d=>_0x20310d[_0x58b002(0xae)]===_0xd90a73[_0x58b002(0xae)]);const _0x31dcf2=_0x5d93b2['filter'](_0x267c2f=>_0x267c2f[_0x58b002(0x92)]===_0xd90a73[_0x58b002(0x92)]);return _0x31dcf2[_0x58b002(0x8a)]===0x1?_0x31dcf2:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x98d65e,_0x31072d){var _0x3fb945=a2_0x4821,_0x397b64=_0x98d65e();while(!![]){try{var _0x47e4a2=parseInt(_0x3fb945(0x1b4))/0x1*(-parseInt(_0x3fb945(0x1be))/0x2)+-parseInt(_0x3fb945(0x1b3))/0x3*(parseInt(_0x3fb945(0x1b5))/0x4)+parseInt(_0x3fb945(0x1bc))/0x5+parseInt(_0x3fb945(0x1bd))/0x6*(-parseInt(_0x3fb945(0x1b8))/0x7)+parseInt(_0x3fb945(0x1ba))/0x8+parseInt(_0x3fb945(0x1bb))/0x9*(-parseInt(_0x3fb945(0x1b6))/0xa)+-parseInt(_0x3fb945(0x1b7))/0xb*(-parseInt(_0x3fb945(0x1b9))/0xc);if(_0x47e4a2===_0x31072d)break;else _0x397b64['push'](_0x397b64['shift']());}catch(_0x39cd15){_0x397b64['push'](_0x397b64['shift']());}}}(a2_0x1fdc,0xd2e73));function a2_0x1fdc(){var _0x5de668=['264YvrWNF','12079488vCHmqy','126tlpNCZ','7644770eKpxfp','1669506RiyqyD','134xnmQrJ','867ixrFVj','25736kjbwTC','17656NrCtaB','682810ElgKiC','1029556XEvQqg','7VgYOaq'];a2_0x1fdc=function(){return _0x5de668;};return a2_0x1fdc();}function a2_0x4821(_0x2e3dcb,_0x24926d){_0x2e3dcb=_0x2e3dcb-0x1b3;var _0x1fdc82=a2_0x1fdc();var _0x48214a=_0x1fdc82[_0x2e3dcb];return _0x48214a;}export{fetchModelList}from'../core/api-client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x47b9a4,_0x456d77){const _0x17dba4=a3_0x5462,_0x48b5f6=_0x47b9a4();while(!![]){try{const _0xf92d1d=parseInt(_0x17dba4(0x170))/0x1*(-parseInt(_0x17dba4(0x142))/0x2)+parseInt(_0x17dba4(0x143))/0x3*(-parseInt(_0x17dba4(0x177))/0x4)+-parseInt(_0x17dba4(0x150))/0x5+-parseInt(_0x17dba4(0x174))/0x6*(-parseInt(_0x17dba4(0x15a))/0x7)+parseInt(_0x17dba4(0x164))/0x8+parseInt(_0x17dba4(0x157))/0x9*(parseInt(_0x17dba4(0x179))/0xa)+parseInt(_0x17dba4(0x161))/0xb;if(_0xf92d1d===_0x456d77)break;else _0x48b5f6['push'](_0x48b5f6['shift']());}catch(_0x2a9943){_0x48b5f6['push'](_0x48b5f6['shift']());}}}(a3_0x217f,0x6de6f));import a3_0x281e6f from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';function a3_0x217f(){const _0x13998a=['refreshed','client.ts.tpl','719768AWoJTt','basename','api','length','allowEmptyModelReplacement','tableName','stringify','utf8','alias','key','join','defaultName','1CZzKLO','resolve','.ts','typescript','169020sDUAyc','toUpperCase','path','84ayABtp','API\x20scaffold\x20written.','10MXdFhZ','Please\x20configure\x20app\x20code\x20first\x20via\x20`','replaceApiContent','replace','APP_','1132886rUEzfV','73746XjZHwW','api.ts.tpl',',\x20env:\x20','-client','client','includes','overwritten','default','missing','name','preserved','\x20config\x20set\x20app\x20<value>`','{\x20apiConfigName:\x20','2041250XTszTQ',',\x20...LOVRABET_SDK_CONFIG\x20}','CONFIG_NAMES.DEFAULT','templates/generate-api','modelRuntime','format','scaffoldMode','2168433VrgWFW','action','LOVRABET_RUNTIME_DOMAIN','63UeKxas','LOVRABET','modelProfile','test','success','dirname','created','14922996nWMRTR'];a3_0x217f=function(){return _0x13998a;};return a3_0x217f();}import a3_0x268d42 from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';function a3_0x5462(_0x376bca,_0x3f2e53){_0x376bca=_0x376bca-0x142;const _0x217f9f=a3_0x217f();let _0x5462d2=_0x217f9f[_0x376bca];return _0x5462d2;}import{isProduction}from'../constant/env.js';import{generateSdkConfigFile}from'../api/generate-sdk-config-file.js';import{MODEL_REGISTRY_FILE_NAME,MODEL_RUNTIME_FILE_NAME,updateModelRegistry}from'../api/model-registry-file.js';import{renderModelRegistryScaffold}from'../api/model-registry-scaffold.js';function fileAction(_0x2d5dfb,_0x6b627f){const _0x25ab26=a3_0x5462;if(!_0x6b627f)return _0x2d5dfb?_0x25ab26(0x14d):_0x25ab26(0x14b);return _0x2d5dfb?_0x25ab26(0x149):_0x25ab26(0x160);}export async function generateApiFile(_0x5c7ba5,_0xdb4287,_0x59e886,_0x3419de,_0x586153,_0x31c5d1,_0x1f990e,_0x2b7599={},_0x243be5={}){const _0x2d9e98=a3_0x5462;if(!_0x59e886)throw new Error(_0x2d9e98(0x17a)+CLI_BIN_NAME+_0x2d9e98(0x14e));const _0x4b382a=_0x3419de&&!_0x1f990e,_0x2c88b4=!!_0x243be5[_0x2d9e98(0x15c)],_0x487946=_0x2c88b4||_0x4b382a,_0x4dcf6b=_0x1f990e||_0x59e886,_0x1f258f=_0x2c88b4||_0x4b382a?_0x2d9e98(0x14a):_0x4dcf6b,_0x2ee91e=_0x2c88b4||_0x4b382a?_0x2d9e98(0x152):JSON[_0x2d9e98(0x16a)](_0x4dcf6b),_0x75bbf8=!isProduction(_0x586153),_0x2aae85=_0x75bbf8?_0x2d9e98(0x145)+JSON['stringify'](_0x586153):'',_0x5989e2=_0x2d9e98(0x14f)+_0x2ee91e+_0x2aae85+_0x2d9e98(0x151),_0x1e96df=_0x2c88b4?'':_0xdb4287,_0x325a24=_0x1e96df?_0x1e96df+'-api':_0x2d9e98(0x166),_0x572502=_0x1e96df?_0x1e96df+_0x2d9e98(0x146):_0x2d9e98(0x147),_0x5cdd24=_0x1e96df&&!/^app-[a-f0-9]+$/i[_0x2d9e98(0x15d)](_0x1e96df)?_0x1e96df[_0x2d9e98(0x17c)](/-/g,'_')[_0x2d9e98(0x175)]():_0x2d9e98(0x15b),_0x4cef7c=/^\d/[_0x2d9e98(0x15d)](_0x5cdd24)?_0x2d9e98(0x17d)+_0x5cdd24:_0x5cdd24,_0x405b15=_0x5c7ba5['map'](_0x334e36=>({'datasetCode':_0x334e36['datasetCode'],'tableName':_0x334e36[_0x2d9e98(0x169)],'name':_0x334e36['name']||'','alias':_0x334e36[_0x2d9e98(0x16c)]||_0x334e36[_0x2d9e98(0x16d)]})),_0x11e428=fileURLToPath(import.meta.url),_0x4afa02=a3_0x268d42[_0x2d9e98(0x171)](a3_0x268d42[_0x2d9e98(0x15f)](_0x11e428),'../..'),_0x391c21=a3_0x268d42[_0x2d9e98(0x16e)](_0x4afa02,_0x2d9e98(0x153)),_0x41567c=a3_0x268d42[_0x2d9e98(0x16e)](_0x391c21,_0x2d9e98(0x144)),_0x403df1=a3_0x268d42['join'](_0x391c21,_0x2d9e98(0x163)),_0x2984e6=_0x31c5d1;mkdirSync(_0x2984e6,{'recursive':!![]});const _0x54e8b9=_0x2c88b4?{}:_0x2b7599,_0x140f39=await generateSdkConfigFile(_0x2984e6,_0x54e8b9,_0x1e96df),_0x462d52=a3_0x268d42[_0x2d9e98(0x165)](_0x140f39,_0x2d9e98(0x172)),_0x3e43c0=a3_0x268d42[_0x2d9e98(0x16e)](_0x2984e6,_0x325a24+_0x2d9e98(0x172)),_0x2f41f7=a3_0x268d42['join'](_0x2984e6,_0x572502+_0x2d9e98(0x172)),_0x43e16c=_0x243be5['overwriteTypescript']===!![],_0x1d176e=existsSync(_0x3e43c0),_0x2f8ffd=existsSync(_0x2f41f7),_0x4da9b4=_0x243be5[_0x2d9e98(0x156)]??(_0x43e16c?_0x2d9e98(0x17c):_0x2d9e98(0x14b)),_0x4cadfa=_0x4da9b4===_0x2d9e98(0x17c)||_0x4da9b4===_0x2d9e98(0x14b)&&!_0x1d176e,_0x49306b=_0x4da9b4==='replace'||_0x4da9b4===_0x2d9e98(0x14b)&&!_0x2f8ffd,_0x94fda9=_0x243be5['modelProfile']?updateModelRegistry({'outputDir':_0x2984e6,'profileName':_0x243be5['modelProfile'][_0x2d9e98(0x14c)],'defaultProfile':_0x243be5[_0x2d9e98(0x15c)][_0x2d9e98(0x16f)],'appCode':_0x59e886,'runtimeDomain':_0x243be5[_0x2d9e98(0x15c)]['runtimeDomain'],'models':_0x405b15,'allowEmptyReplacement':_0x243be5[_0x2d9e98(0x168)]===!![]}):undefined,_0xeeb918=_0x94fda9?a3_0x268d42[_0x2d9e98(0x16e)](_0x2984e6,MODEL_RUNTIME_FILE_NAME):undefined,_0x2d62a9=_0xeeb918?existsSync(_0xeeb918):![],_0x4eb504=_0x2c88b4&&_0x4da9b4!=='none'?await renderModelRegistryScaffold(_0x2984e6):undefined;_0xeeb918&&_0x4eb504&&writeFileSync(_0xeeb918,_0x4eb504[_0x2d9e98(0x154)],_0x2d9e98(0x16b));const _0x25bcbf=_0x405b15[0x0]?.['alias'];if(_0x4cadfa){const _0x49a65d=_0x4eb504?.[_0x2d9e98(0x166)]??readFileSync(_0x41567c,'utf8'),_0x58c107=_0x2c88b4?_0x49a65d:TemplateReplacer[_0x2d9e98(0x17b)](_0x49a65d,_0x59e886,_0x405b15,_0x25bcbf,_0x325a24,_0x2ee91e,undefined,_0x4cef7c);writeFileSync(_0x3e43c0,await a3_0x281e6f['format'](_0x58c107,{'parser':_0x2d9e98(0x173)}),{'encoding':_0x2d9e98(0x16b)});}if(_0x49306b){const _0x58d6b2=_0x4eb504?.[_0x2d9e98(0x147)]??readFileSync(_0x403df1,_0x2d9e98(0x16b)),_0x56122c=_0x2c88b4?_0x58d6b2:TemplateReplacer['replaceApiContent'](_0x58d6b2,_0x59e886,_0x405b15,_0x25bcbf,_0x325a24,_0x2ee91e,_0x5989e2,_0x4cef7c,_0x462d52);writeFileSync(_0x2f41f7,await a3_0x281e6f[_0x2d9e98(0x155)](_0x56122c,{'parser':_0x2d9e98(0x173)}),{'encoding':'utf8'});}const _0xb393f8=_0x405b15[_0x2d9e98(0x167)],_0xec4bb4={'api':{'path':_0x3e43c0,'action':fileAction(_0x1d176e,_0x4cadfa)},'client':{'path':_0x2f41f7,'action':fileAction(_0x2f8ffd,_0x49306b)},'sdkConfig':{'path':_0x140f39,'action':_0x2d9e98(0x162)},..._0x94fda9?{'modelRegistry':{'path':_0x94fda9[_0x2d9e98(0x176)],'action':_0x94fda9['existed']?_0x2d9e98(0x162):_0x2d9e98(0x160)},'modelRuntime':{'path':_0xeeb918,'action':_0x4eb504?_0x2d62a9?'refreshed':_0x2d9e98(0x160):_0x2d62a9?_0x2d9e98(0x14d):_0x2d9e98(0x14b)}}:{}},_0x201343=existsSync(_0x3e43c0)&&readFileSync(_0x3e43c0,'utf8')[_0x2d9e98(0x148)](MODEL_REGISTRY_FILE_NAME['replace'](_0x2d9e98(0x172),'')),_0x3f4c57=existsSync(_0x2f41f7)&&readFileSync(_0x2f41f7,'utf8')[_0x2d9e98(0x148)](_0x2d9e98(0x159)),_0x112dd3=_0x2c88b4?!_0x201343||!_0x3f4c57||!existsSync(_0xeeb918):![],_0x42c982=_0x2c88b4?_0x112dd3:_0xec4bb4['api'][_0x2d9e98(0x158)]==='preserved'||_0xec4bb4['client'][_0x2d9e98(0x158)]===_0x2d9e98(0x14d);return logger[_0x2d9e98(0x15e)]('init-api',_0x42c982?a3_0x268d42[_0x2d9e98(0x165)](_0x140f39)+'\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.':_0x2c88b4?'Model\x20facts\x20refreshed.':_0x2d9e98(0x178),undefined,{'apiFile':_0x3e43c0,'clientFile':_0x2f41f7,'sdkConfig':_0x140f39,'modelCount':_0xb393f8,'configName':_0x1f258f,'isDefaultConfig':_0x487946,'needsAgentMerge':_0x42c982,'needsProjectUpgrade':_0x112dd3,'files':_0xec4bb4}),{'appCode':_0x59e886,'modelCount':_0xb393f8,'models':_0x405b15,'apiFilePath':_0x3e43c0,'clientFilePath':_0x2f41f7,'sdkConfigPath':_0x140f39,'modelRegistryPath':_0x94fda9?.['path'],'modelRuntimePath':_0xeeb918,'modelProfile':_0x243be5[_0x2d9e98(0x15c)]?.[_0x2d9e98(0x14c)],'configName':_0x1f258f,'isDefaultConfig':_0x487946,'sdkRouting':_0x54e8b9,'files':_0xec4bb4,'needsAgentMerge':_0x42c982,'needsProjectUpgrade':_0x112dd3};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a4_0x455b(){const _0xf86c5c=['-sdk-config.ts','join','21090dOnXga','185ggUXkH','typescript',',\x0a}','1009203HnMDVY','834688ZbCuCR','35992572xujrgY','push','5164DfZlOM','format','length','1654oLyixf','/**\x0a\x20*\x20Lovrabet\x20SDK\x20runtime\x20routing.\x0a\x20*\x20Generated\x20by\x20Rabetbase\x20CLI.\x20Do\x20not\x20add\x20credentials\x20to\x20this\x20file.\x0a\x20*/\x0aexport\x20const\x20LOVRABET_SDK_CONFIG\x20=\x20','runtimeDomain','runtimeDomain:\x20','stringify','3652278phgPZU','38lEVJKl','sdk-config.ts','14DtLrZA','4788cgIyeJ'];a4_0x455b=function(){return _0xf86c5c;};return a4_0x455b();}const a4_0x105ad5=a4_0x184f;(function(_0x371148,_0xcd7e0a){const _0x4e9d37=a4_0x184f,_0x24c075=_0x371148();while(!![]){try{const _0x55fef2=parseInt(_0x4e9d37(0x97))/0x1*(-parseInt(_0x4e9d37(0x86))/0x2)+-parseInt(_0x4e9d37(0x90))/0x3+parseInt(_0x4e9d37(0x94))/0x4*(-parseInt(_0x4e9d37(0x8d))/0x5)+-parseInt(_0x4e9d37(0x85))/0x6*(parseInt(_0x4e9d37(0x88))/0x7)+parseInt(_0x4e9d37(0x91))/0x8+parseInt(_0x4e9d37(0x89))/0x9*(-parseInt(_0x4e9d37(0x8c))/0xa)+parseInt(_0x4e9d37(0x92))/0xb;if(_0x55fef2===_0xcd7e0a)break;else _0x24c075['push'](_0x24c075['shift']());}catch(_0x4019a4){_0x24c075['push'](_0x24c075['shift']());}}}(a4_0x455b,0x97b44));import{mkdirSync,writeFileSync}from'node:fs';import a4_0x4f4c94 from'node:path';function a4_0x184f(_0x5bebee,_0x4c5e75){_0x5bebee=_0x5bebee-0x84;const _0x455b40=a4_0x455b();let _0x184f5d=_0x455b40[_0x5bebee];return _0x184f5d;}import a4_0x44b6a0 from'prettier';export const SDK_CONFIG_FILE_NAME=a4_0x105ad5(0x87);export function getSdkConfigFileName(_0x33f17d=''){const _0x4f64d6=a4_0x105ad5;return _0x33f17d?_0x33f17d+_0x4f64d6(0x8a):SDK_CONFIG_FILE_NAME;}export async function generateSdkConfigFile(_0x5c667a,_0x170dcc={},_0x1b66c4=''){const _0x14b67a=a4_0x105ad5,_0x1cfc48=[];_0x170dcc['runtimeDomain']&&_0x1cfc48[_0x14b67a(0x93)](_0x14b67a(0x9a)+JSON[_0x14b67a(0x84)](_0x170dcc[_0x14b67a(0x99)]));const _0x5eeb24=_0x1cfc48[_0x14b67a(0x96)]>0x0?'{\x0a\x20\x20'+_0x1cfc48[_0x14b67a(0x8b)](',\x0a\x20\x20')+_0x14b67a(0x8f):'{}',_0x537c90=_0x14b67a(0x98)+_0x5eeb24+'\x20as\x20const;\x0a';mkdirSync(_0x5c667a,{'recursive':!![]});const _0x27bf66=a4_0x4f4c94[_0x14b67a(0x8b)](_0x5c667a,getSdkConfigFileName(_0x1b66c4));return writeFileSync(_0x27bf66,await a4_0x44b6a0[_0x14b67a(0x95)](_0x537c90,{'parser':_0x14b67a(0x8e)}),'utf8'),_0x27bf66;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x999428,_0xeb5f8c){const _0x5d7466=a5_0x5aa7,_0x1668e5=_0x999428();while(!![]){try{const _0x1d8468=parseInt(_0x5d7466(0x137))/0x1*(parseInt(_0x5d7466(0x129))/0x2)+-parseInt(_0x5d7466(0x127))/0x3*(-parseInt(_0x5d7466(0x139))/0x4)+parseInt(_0x5d7466(0x126))/0x5*(parseInt(_0x5d7466(0x136))/0x6)+parseInt(_0x5d7466(0x12c))/0x7+parseInt(_0x5d7466(0x124))/0x8*(-parseInt(_0x5d7466(0x132))/0x9)+parseInt(_0x5d7466(0x122))/0xa*(-parseInt(_0x5d7466(0x130))/0xb)+-parseInt(_0x5d7466(0x12d))/0xc;if(_0x1d8468===_0xeb5f8c)break;else _0x1668e5['push'](_0x1668e5['shift']());}catch(_0x101275){_0x1668e5['push'](_0x1668e5['shift']());}}}(a5_0x3ecd,0x657bb));export function parseLegacyApiModels(_0x1a0e38){const _0x4e6f83=[],_0x55d0bb=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x2b18ef;while((_0x2b18ef=_0x55d0bb['exec'](_0x1a0e38))!==null){_0x4e6f83['push']({'datasetCode':_0x2b18ef[0x1],'tableName':_0x2b18ef[0x2],'name':_0x2b18ef[0x3],'alias':_0x2b18ef[0x4]});}return _0x4e6f83;}function a5_0x3ecd(){const _0x34b320=['2932CNbhAs','match','includes','830PeaCTE','endsWith','88dihmkz','length','821005aPKVOB','708UrcZaP','map','24cJklMY','registerModels','test','836997aFzDHb','2181192ygIaaT','lovrabetClient','replace','104764tEEeGG','some','252189NvYdIb','MODELS_CONFIG','matchAll','Generated\x20by\x20Rabetbase\x20CLI','30znqcec','48550MqREyQ','APP_CODE'];a5_0x3ecd=function(){return _0x34b320;};return a5_0x3ecd();}export function parseLegacyApiAppCode(_0x336b72){const _0x45b7f6=a5_0x5aa7;return _0x336b72[_0x45b7f6(0x13a)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function stripComments(_0x32262e){const _0x27bfb3=a5_0x5aa7;return _0x32262e[_0x27bfb3(0x12f)](/\/\*[\s\S]*?\*\//g,'')['replace'](/\/\/.*$/gm,'');}function a5_0x5aa7(_0x58ef26,_0x300121){_0x58ef26=_0x58ef26-0x122;const _0x3ecdb4=a5_0x3ecd();let _0x5aa79e=_0x3ecdb4[_0x58ef26];return _0x5aa79e;}export function isLegacyGeneratedApiScaffold(_0x156383){const _0xb60cfb=a5_0x5aa7;if(!_0x156383[_0xb60cfb(0x13b)](_0xb60cfb(0x135)))return![];const _0x3d3ec4=stripComments(_0x156383),_0x4cc26f=[..._0x3d3ec4[_0xb60cfb(0x134)](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)][_0xb60cfb(0x128)](_0x41ce4a=>_0x41ce4a[0x1]);if(_0x4cc26f['length']!==0x1||_0x4cc26f[0x0]!=='@lovrabet/sdk')return![];const _0x1f784f=[..._0x3d3ec4[_0xb60cfb(0x134)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)]['map'](_0x34c33e=>_0x34c33e[0x1]);if(_0x1f784f['length']!==0x2||!_0x1f784f['some'](_0xa39ce7=>_0xa39ce7['endsWith'](_0xb60cfb(0x138)))||!_0x1f784f[_0xb60cfb(0x131)](_0x57fda7=>_0x57fda7[_0xb60cfb(0x123)](_0xb60cfb(0x133))))return![];const _0x1f6be1=[..._0x3d3ec4[_0xb60cfb(0x134)](/^([A-Za-z_$][\w$]*)\s*\(/gm)][_0xb60cfb(0x128)](_0x20658f=>_0x20658f[0x1]);return _0x1f6be1['length']===0x1&&_0x1f6be1[0x0]===_0xb60cfb(0x12a);}export function isLegacyGeneratedClientScaffold(_0x3d54c0){const _0x505af4=a5_0x5aa7;if(!_0x3d54c0[_0x505af4(0x13b)]('Generated\x20by\x20Rabetbase\x20CLI'))return![];const _0x3c09b3=stripComments(_0x3d54c0),_0x2f8762=[..._0x3c09b3['matchAll'](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)][_0x505af4(0x128)](_0x58563b=>_0x58563b[0x1]);if(_0x2f8762['some'](_0x21edaa=>_0x21edaa!=='@lovrabet/sdk'&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/[_0x505af4(0x12b)](_0x21edaa??'')))return![];const _0x2e09f7=[..._0x3c09b3['matchAll'](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x505af4(0x128)](_0x7ba738=>_0x7ba738[0x1]);return _0x2e09f7[_0x505af4(0x125)]===0x1&&_0x2e09f7[0x0]===_0x505af4(0x12e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x13b324=a6_0x2b6f;(function(_0x3cf20d,_0x593522){const _0x3d6262=a6_0x2b6f,_0x1cdc16=_0x3cf20d();while(!![]){try{const _0x7756a1=-parseInt(_0x3d6262(0x1d4))/0x1*(-parseInt(_0x3d6262(0x1ba))/0x2)+-parseInt(_0x3d6262(0x1de))/0x3*(-parseInt(_0x3d6262(0x1b9))/0x4)+parseInt(_0x3d6262(0x1cd))/0x5+-parseInt(_0x3d6262(0x1d1))/0x6*(-parseInt(_0x3d6262(0x1cb))/0x7)+parseInt(_0x3d6262(0x1ec))/0x8*(parseInt(_0x3d6262(0x1bf))/0x9)+parseInt(_0x3d6262(0x1b8))/0xa+parseInt(_0x3d6262(0x1b2))/0xb*(-parseInt(_0x3d6262(0x1b0))/0xc);if(_0x7756a1===_0x593522)break;else _0x1cdc16['push'](_0x1cdc16['shift']());}catch(_0x5ea840){_0x1cdc16['push'](_0x1cdc16['shift']());}}}(a6_0xf1a4,0xc3aa0));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x2ecada from'node:path';function a6_0x2b6f(_0x24f911,_0x4a1974){_0x24f911=_0x24f911-0x1a9;const _0xf1a486=a6_0xf1a4();let _0x2b6f30=_0xf1a486[_0x24f911];return _0x2b6f30;}export const MODEL_REGISTRY_FILE_NAME=a6_0x13b324(0x1b6);export const MODEL_RUNTIME_FILE_NAME=a6_0x13b324(0x1c8);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x13b324(0x1df);function a6_0xf1a4(){const _0x30664f=['parse','fromEntries','Refusing\x20to\x20replace\x20','stringify','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','defaultProfile','Model\x20alias\x20\x22','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','model-runtime.ts','runtimeDomain','key','13951UBCJDL','includes','3081515MHhEhF','utf8','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','filter','2298JvPMoV','datasetCodes','/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a','71xelYVz','push','\x22\x20maps\x20to\x20alias\x20\x22','/*\x20rabetbase-model-registry:start\x20*/','flatMap','appCode','entries','values','keys','models','3755169qJuuBb','/*\x20rabetbase-model-registry:v2\x20*/','now','tableName','isArray','NOT-SET','outputDir','length','pid','profiles','\x22\x20and\x20\x22','Table\x20\x22','\x20model(s)\x20in\x20profile\x20\x22','replace','8LwIHwm','join','test','split','profileName','\x22\x20in\x20the\x20registry\x20but\x20\x22','\x22\x20maps\x20to\x20table\x20\x22','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','string','find','get','name','indexOf','\x22\x20in\x20profile\x20\x22','lovrabet-model-registry/v1','12756yMGnzo','protocol','47685rHgoGh','map','object','allowEmptyReplacement','models.generated.ts','alias','11466090ahOBUk','4xDNRca','35716MLglys','datasetCode','trim','/*\x20rabetbase-model-registry:end\x20*/','every','3273057ElVeyC'];a6_0xf1a4=function(){return _0x30664f;};return a6_0xf1a4();}const LEGACY_MODEL_REGISTRY_V2_PROTOCOL='lovrabet-model-registry/v2',REGISTRY_START=a6_0x13b324(0x1d7),REGISTRY_END=a6_0x13b324(0x1bd);function emptyRegistry(_0x1bf1df){return{'defaultProfile':_0x1bf1df,'profiles':{},'models':[]};}function extractRegistryJson(_0x2acc17){const _0x224416=a6_0x13b324,_0x9a0daf=_0x2acc17[_0x224416(0x1ad)](REGISTRY_START),_0x5a46c8=_0x2acc17[_0x224416(0x1ad)](REGISTRY_END);if(_0x9a0daf<0x0||_0x5a46c8<=_0x9a0daf)return undefined;return _0x2acc17['slice'](_0x9a0daf+REGISTRY_START[_0x224416(0x1e5)],_0x5a46c8)[_0x224416(0x1bc)]()[_0x224416(0x1eb)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x224416(0x1eb)](/;$/,'');}function migrateLegacyRegistry(_0x2e3445){const _0x1aa586=a6_0x13b324,_0x3fa896=emptyRegistry(_0x2e3445[_0x1aa586(0x1c5)]);for(const [_0x3d6ef4,_0x16035b]of Object[_0x1aa586(0x1da)](_0x2e3445['profiles'])){_0x3fa896['profiles'][_0x3d6ef4]={'appCode':_0x16035b[_0x1aa586(0x1d9)],'runtimeDomain':_0x16035b[_0x1aa586(0x1c9)]},mergeProfileModels(_0x3fa896,_0x3d6ef4,_0x16035b[_0x1aa586(0x1dd)]);}return _0x3fa896;}function generatedObjectLiteralToJson(_0x313841){const _0x4e96a7=a6_0x13b324;let _0x4ad6dd='',_0x5b430f,_0x8e3d45=![],_0x1aa0b7;for(let _0x2ba421=0x0;_0x2ba421<_0x313841['length'];_0x2ba421++){const _0x1c2c0f=_0x313841[_0x2ba421];if(_0x5b430f){_0x4ad6dd+=_0x1c2c0f;if(_0x8e3d45)_0x8e3d45=![];else{if(_0x1c2c0f==='\x5c')_0x8e3d45=!![];else{if(_0x1c2c0f===_0x5b430f)_0x5b430f=undefined;}}continue;}if(_0x1c2c0f==='\x22'){_0x5b430f=_0x1c2c0f,_0x4ad6dd+=_0x1c2c0f,_0x1aa0b7='value';continue;}if(_0x1c2c0f===','){let _0x3468e2=_0x2ba421+0x1;while(/\s/['test'](_0x313841[_0x3468e2]??''))_0x3468e2++;if(_0x313841[_0x3468e2]==='}'||_0x313841[_0x3468e2]===']')continue;_0x4ad6dd+=_0x1c2c0f,_0x1aa0b7=',';continue;}if(_0x1c2c0f==='{'||_0x1c2c0f==='['){_0x4ad6dd+=_0x1c2c0f,_0x1aa0b7=_0x1c2c0f;continue;}if(_0x1c2c0f==='}'||_0x1c2c0f===']'){_0x4ad6dd+=_0x1c2c0f,_0x1aa0b7=_0x1c2c0f;continue;}if((_0x1aa0b7==='{'||_0x1aa0b7===',')&&/[A-Za-z_$]/[_0x4e96a7(0x1ee)](_0x1c2c0f)){let _0x229d26=_0x2ba421+0x1;while(/[A-Za-z0-9_$]/['test'](_0x313841[_0x229d26]??''))_0x229d26++;let _0x1e1bc2=_0x229d26;while(/\s/[_0x4e96a7(0x1ee)](_0x313841[_0x1e1bc2]??''))_0x1e1bc2++;if(_0x313841[_0x1e1bc2]===':'){_0x4ad6dd+=JSON[_0x4e96a7(0x1c3)](_0x313841['slice'](_0x2ba421,_0x229d26)),_0x2ba421=_0x229d26-0x1,_0x1aa0b7=_0x4e96a7(0x1ca);continue;}}_0x4ad6dd+=_0x1c2c0f;if(!/\s/[_0x4e96a7(0x1ee)](_0x1c2c0f)&&_0x1c2c0f!==':')_0x1aa0b7='value';}return _0x4ad6dd;}function parseGeneratedRegistryJson(_0x1fbcbd){const _0x320a92=a6_0x13b324;try{return JSON[_0x320a92(0x1c0)](_0x1fbcbd);}catch{return JSON['parse'](generatedObjectLiteralToJson(_0x1fbcbd));}}function normalizeModelEntries(_0x32319b,_0xc3dc85){const _0x558800=a6_0x13b324,_0xb3c5e5=Object[_0x558800(0x1dc)](_0x32319b),_0x45f066=[];for(const _0x1c9d05 of _0xc3dc85){if(!_0x1c9d05||typeof _0x1c9d05!==_0x558800(0x1b4)||Array['isArray'](_0x1c9d05))return undefined;const _0x2c71b5=_0x1c9d05;if(typeof _0x2c71b5[_0x558800(0x1b7)]!==_0x558800(0x1a9)||typeof _0x2c71b5['tableName']!==_0x558800(0x1a9)||typeof _0x2c71b5['name']!==_0x558800(0x1a9))return undefined;let _0x52d079;if(typeof _0x2c71b5[_0x558800(0x1bb)]===_0x558800(0x1a9)&&_0x2c71b5[_0x558800(0x1d2)]===undefined)_0x52d079=Object[_0x558800(0x1c1)](_0xb3c5e5['map'](_0x125d81=>[_0x125d81,_0x2c71b5[_0x558800(0x1bb)]]));else{if(_0x2c71b5['datasetCode']===undefined&&_0x2c71b5[_0x558800(0x1d2)]&&typeof _0x2c71b5[_0x558800(0x1d2)]===_0x558800(0x1b4)&&!Array[_0x558800(0x1e2)](_0x2c71b5[_0x558800(0x1d2)])&&Object[_0x558800(0x1db)](_0x2c71b5[_0x558800(0x1d2)])[_0x558800(0x1be)](_0x2c486b=>typeof _0x2c486b==='string'))_0x52d079={..._0x2c71b5[_0x558800(0x1d2)]};else return undefined;}_0x45f066[_0x558800(0x1d5)]({'alias':_0x2c71b5[_0x558800(0x1b7)],'tableName':_0x2c71b5[_0x558800(0x1e1)],'name':_0x2c71b5[_0x558800(0x1ac)],'datasetCodes':_0x52d079});}return _0x45f066;}export function parseModelRegistry(_0x456fe4){const _0xf17611=a6_0x13b324,_0x37a3d9=extractRegistryJson(_0x456fe4);if(!_0x37a3d9)return undefined;try{const _0x7d864a=parseGeneratedRegistryJson(_0x37a3d9);if(typeof _0x7d864a['defaultProfile']!==_0xf17611(0x1a9)||!_0x7d864a['profiles']||typeof _0x7d864a[_0xf17611(0x1e7)]!==_0xf17611(0x1b4))return undefined;if(_0x7d864a[_0xf17611(0x1b1)]===_0xf17611(0x1af))return migrateLegacyRegistry(_0x7d864a);if(!(_0x7d864a[_0xf17611(0x1b1)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x7d864a[_0xf17611(0x1b1)]===undefined&&_0x456fe4[_0xf17611(0x1cc)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0xf17611(0x1e2)](_0x7d864a[_0xf17611(0x1dd)]))return undefined;const _0x53e280=_0x7d864a['profiles'],_0xe1f621=normalizeModelEntries(_0x53e280,_0x7d864a[_0xf17611(0x1dd)]);if(!_0xe1f621)return undefined;return{'defaultProfile':_0x7d864a[_0xf17611(0x1c5)],'profiles':_0x53e280,'models':_0xe1f621};}catch{return undefined;}}export function readModelRegistry(_0x21f3a9){if(!existsSync(_0x21f3a9))return undefined;try{return parseModelRegistry(readFileSync(_0x21f3a9,'utf8'));}catch{return undefined;}}function registrySource(_0x1ec6a6){const _0x3634c0=a6_0x13b324,_0x4e7d94=Object[_0x3634c0(0x1dc)](_0x1ec6a6[_0x3634c0(0x1e7)]),_0x3ca0b6=_0x1ec6a6[_0x3634c0(0x1dd)][_0x3634c0(0x1b3)](_0x4b912a=>{const _0x17fdaf=_0x3634c0,_0x245678=_0x4e7d94[_0x17fdaf(0x1b3)](_0x454cd5=>_0x4b912a[_0x17fdaf(0x1d2)][_0x454cd5]),_0xb5c717=_0x245678[0x0],_0x50c409=_0xb5c717!==undefined&&_0x245678[_0x17fdaf(0x1be)](_0x3fa270=>_0x3fa270===_0xb5c717),_0x40ee38={'alias':_0x4b912a['alias'],'tableName':_0x4b912a['tableName'],'name':_0x4b912a[_0x17fdaf(0x1ac)]};return _0x50c409?{..._0x40ee38,'datasetCode':_0xb5c717}:{..._0x40ee38,'datasetCodes':_0x4b912a[_0x17fdaf(0x1d2)]};}),_0x103146=JSON[_0x3634c0(0x1c3)]({'defaultProfile':_0x1ec6a6[_0x3634c0(0x1c5)],'profiles':_0x1ec6a6[_0x3634c0(0x1e7)],'models':_0x3ca0b6},null,0x2)[_0x3634c0(0x1ef)]('\x0a')[_0x3634c0(0x1b3)](_0x125d04=>'\x20\x20'+_0x125d04)[_0x3634c0(0x1ed)]('\x0a');return _0x3634c0(0x1d3)+MODEL_REGISTRY_VERSION_MARKER+_0x3634c0(0x1f3)+REGISTRY_START+'\x0a'+_0x103146+_0x3634c0(0x1c7)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x4739c8,_0x16f621,_0x1c634a){const _0x2f1f68=a6_0x13b324,_0x55e2ac=_0x1c634a[_0x2f1f68(0x1b3)](_0x27b43e=>({..._0x27b43e,'alias':_0x27b43e['alias']||_0x27b43e[_0x2f1f68(0x1e1)]})),_0xbb9475=new Map(),_0x3d71b2=new Map();for(const _0x50046d of _0x55e2ac){const _0x8a3951=_0xbb9475[_0x2f1f68(0x1ab)](_0x50046d[_0x2f1f68(0x1b7)]);if(_0x8a3951&&_0x8a3951!==_0x50046d[_0x2f1f68(0x1e1)])throw new Error('Model\x20alias\x20\x22'+_0x50046d[_0x2f1f68(0x1b7)]+'\x22\x20maps\x20to\x20both\x20\x22'+_0x8a3951+_0x2f1f68(0x1e8)+_0x50046d['tableName']+_0x2f1f68(0x1ae)+_0x16f621+'\x22.');const _0x2ea8dd=_0x3d71b2['get'](_0x50046d[_0x2f1f68(0x1e1)]);if(_0x2ea8dd&&_0x2ea8dd!==_0x50046d[_0x2f1f68(0x1b7)])throw new Error(_0x2f1f68(0x1e9)+_0x50046d[_0x2f1f68(0x1e1)]+_0x2f1f68(0x1f4)+_0x2ea8dd+_0x2f1f68(0x1e8)+_0x50046d[_0x2f1f68(0x1b7)]+'\x22\x20in\x20profile\x20\x22'+_0x16f621+'\x22.');_0xbb9475['set'](_0x50046d[_0x2f1f68(0x1b7)],_0x50046d[_0x2f1f68(0x1e1)]),_0x3d71b2['set'](_0x50046d[_0x2f1f68(0x1e1)],_0x50046d['alias']);const _0xe629fd=_0x4739c8['models'][_0x2f1f68(0x1aa)](_0x1fdb51=>_0x1fdb51['alias']===_0x50046d['alias']);if(_0xe629fd&&_0xe629fd['tableName']!==_0x50046d[_0x2f1f68(0x1e1)])throw new Error(_0x2f1f68(0x1c6)+_0x50046d['alias']+_0x2f1f68(0x1f2)+_0xe629fd['tableName']+_0x2f1f68(0x1f1)+_0x50046d['tableName']+_0x2f1f68(0x1ae)+_0x16f621+'\x22.');const _0x9be725=_0x4739c8[_0x2f1f68(0x1dd)][_0x2f1f68(0x1aa)](_0x4996c4=>_0x4996c4[_0x2f1f68(0x1e1)]===_0x50046d[_0x2f1f68(0x1e1)]);if(_0x9be725&&_0x9be725[_0x2f1f68(0x1b7)]!==_0x50046d[_0x2f1f68(0x1b7)])throw new Error(_0x2f1f68(0x1e9)+_0x50046d['tableName']+_0x2f1f68(0x1d6)+_0x9be725[_0x2f1f68(0x1b7)]+_0x2f1f68(0x1f1)+_0x50046d['alias']+_0x2f1f68(0x1ae)+_0x16f621+'\x22.');}for(const _0x2bef58 of _0x4739c8[_0x2f1f68(0x1dd)]){delete _0x2bef58[_0x2f1f68(0x1d2)][_0x16f621];}for(const _0x5e9410 of _0x55e2ac){let _0x1d95a6=_0x4739c8[_0x2f1f68(0x1dd)][_0x2f1f68(0x1aa)](_0x24ee61=>_0x24ee61[_0x2f1f68(0x1b7)]===_0x5e9410[_0x2f1f68(0x1b7)]);!_0x1d95a6&&(_0x1d95a6={'alias':_0x5e9410[_0x2f1f68(0x1b7)],'tableName':_0x5e9410[_0x2f1f68(0x1e1)],'name':_0x5e9410[_0x2f1f68(0x1ac)],'datasetCodes':{}},_0x4739c8[_0x2f1f68(0x1dd)][_0x2f1f68(0x1d5)](_0x1d95a6)),(_0x16f621===_0x4739c8['defaultProfile']||!_0x1d95a6[_0x2f1f68(0x1d2)][_0x4739c8[_0x2f1f68(0x1c5)]])&&(_0x1d95a6[_0x2f1f68(0x1b7)]=_0x5e9410['alias'],_0x1d95a6[_0x2f1f68(0x1e1)]=_0x5e9410['tableName'],_0x1d95a6['name']=_0x5e9410['name']),_0x1d95a6['datasetCodes'][_0x16f621]=_0x5e9410[_0x2f1f68(0x1bb)];}_0x4739c8[_0x2f1f68(0x1dd)]=_0x4739c8[_0x2f1f68(0x1dd)]['filter'](_0x3981b6=>Object[_0x2f1f68(0x1dc)](_0x3981b6[_0x2f1f68(0x1d2)])['length']>0x0);}function removeUnboundProfiles(_0xcaca3d){const _0x126bfb=a6_0x13b324,_0x3de9d4=Object[_0x126bfb(0x1da)](_0xcaca3d[_0x126bfb(0x1e7)])[_0x126bfb(0x1d0)](([,_0x1cafa8])=>_0x1cafa8[_0x126bfb(0x1d9)]==='NOT-SET')[_0x126bfb(0x1b3)](([_0x566ae8])=>_0x566ae8);if(_0x3de9d4[_0x126bfb(0x1e5)]===0x0)return;for(const _0x5c5070 of _0x3de9d4){delete _0xcaca3d[_0x126bfb(0x1e7)][_0x5c5070];for(const _0x17528c of _0xcaca3d['models']){delete _0x17528c['datasetCodes'][_0x5c5070];}}_0xcaca3d['models']=_0xcaca3d['models'][_0x126bfb(0x1d0)](_0x2f79af=>Object['keys'](_0x2f79af['datasetCodes'])[_0x126bfb(0x1e5)]>0x0);}export function getProfileModels(_0x171ee8,_0x26a59a){const _0x249119=a6_0x13b324;return _0x171ee8['models'][_0x249119(0x1d8)](_0x226671=>{const _0x1a1cc0=_0x249119,_0x2dc190=_0x226671[_0x1a1cc0(0x1d2)][_0x26a59a];return _0x2dc190?[{'datasetCode':_0x2dc190,'tableName':_0x226671['tableName'],'name':_0x226671['name'],'alias':_0x226671['alias']}]:[];});}export function updateModelRegistry(_0x4e1b30){const _0x42329a=a6_0x13b324,_0xfd5b4e=a6_0x2ecada[_0x42329a(0x1ed)](_0x4e1b30[_0x42329a(0x1e4)],MODEL_REGISTRY_FILE_NAME),_0x319993=existsSync(_0xfd5b4e),_0xa3cf92=readModelRegistry(_0xfd5b4e);if(_0x319993&&!_0xa3cf92)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x42329a(0x1cf));const _0x4dbc7c=_0xa3cf92??emptyRegistry(_0x4e1b30[_0x42329a(0x1c5)]);if(_0x4e1b30['appCode']!==_0x42329a(0x1e3))removeUnboundProfiles(_0x4dbc7c);const _0x33c8ad=_0xa3cf92?getProfileModels(_0xa3cf92,_0x4e1b30[_0x42329a(0x1f0)])[_0x42329a(0x1e5)]:0x0;if(_0x33c8ad>0x0&&_0x4e1b30['models'][_0x42329a(0x1e5)]===0x0&&!_0x4e1b30[_0x42329a(0x1b5)])throw new Error(_0x42329a(0x1c2)+_0x33c8ad+_0x42329a(0x1ea)+_0x4e1b30[_0x42329a(0x1f0)]+'\x22\x20with\x20an\x20empty\x20result.\x20'+_0x42329a(0x1c4));_0x4dbc7c[_0x42329a(0x1c5)]=_0x4e1b30[_0x42329a(0x1c5)],_0x4dbc7c[_0x42329a(0x1e7)][_0x4e1b30['profileName']]={'appCode':_0x4e1b30[_0x42329a(0x1d9)],'runtimeDomain':_0x4e1b30[_0x42329a(0x1c9)]},mergeProfileModels(_0x4dbc7c,_0x4e1b30[_0x42329a(0x1f0)],_0x4e1b30[_0x42329a(0x1dd)]),mkdirSync(_0x4e1b30[_0x42329a(0x1e4)],{'recursive':!![]});const _0x284561=_0xfd5b4e+'.'+process[_0x42329a(0x1e6)]+'.'+Date[_0x42329a(0x1e0)]()+'.tmp';try{writeFileSync(_0x284561,registrySource(_0x4dbc7c),{'encoding':_0x42329a(0x1ce),'mode':0x1a4}),renameSync(_0x284561,_0xfd5b4e);}catch(_0x29108e){try{unlinkSync(_0x284561);}catch{}throw _0x29108e;}return{'path':_0xfd5b4e,'registry':_0x4dbc7c,'existed':_0x319993};}
|
|
1
|
+
const a6_0x3fdcdf=a6_0x148d;(function(_0x1df1a6,_0x355d06){const _0xac8667=a6_0x148d,_0x192646=_0x1df1a6();while(!![]){try{const _0x7d1e65=-parseInt(_0xac8667(0x171))/0x1+-parseInt(_0xac8667(0x186))/0x2+parseInt(_0xac8667(0x190))/0x3+parseInt(_0xac8667(0x16c))/0x4+parseInt(_0xac8667(0x195))/0x5+parseInt(_0xac8667(0x1a0))/0x6*(-parseInt(_0xac8667(0x197))/0x7)+parseInt(_0xac8667(0x19d))/0x8*(parseInt(_0xac8667(0x187))/0x9);if(_0x7d1e65===_0x355d06)break;else _0x192646['push'](_0x192646['shift']());}catch(_0x3a878e){_0x192646['push'](_0x192646['shift']());}}}(a6_0x7c3a,0x93090));function a6_0x148d(_0x435d42,_0x89cdb4){_0x435d42=_0x435d42-0x169;const _0x7c3afd=a6_0x7c3a();let _0x148d16=_0x7c3afd[_0x435d42];return _0x148d16;}import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x2accac from'node:path';export const MODEL_REGISTRY_FILE_NAME='models.generated.ts';export const MODEL_RUNTIME_FILE_NAME=a6_0x3fdcdf(0x183);export const MODEL_REGISTRY_VERSION_MARKER='/*\x20rabetbase-model-registry:v2\x20*/';const LEGACY_MODEL_REGISTRY_V2_PROTOCOL='lovrabet-model-registry/v2',REGISTRY_START=a6_0x3fdcdf(0x173),REGISTRY_END=a6_0x3fdcdf(0x191);function emptyRegistry(_0x4641bd){return{'defaultProfile':_0x4641bd,'profiles':{},'models':[]};}function extractRegistryJson(_0x50d99b){const _0x866b48=a6_0x3fdcdf,_0x2b3c4f=_0x50d99b[_0x866b48(0x1ab)](REGISTRY_START),_0x50a657=_0x50d99b[_0x866b48(0x1ab)](REGISTRY_END);if(_0x2b3c4f<0x0||_0x50a657<=_0x2b3c4f)return undefined;return _0x50d99b[_0x866b48(0x189)](_0x2b3c4f+REGISTRY_START[_0x866b48(0x1a3)],_0x50a657)[_0x866b48(0x1a5)]()[_0x866b48(0x18c)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x866b48(0x18c)](/;$/,'');}function migrateLegacyRegistry(_0x236a5f){const _0x3f2d53=a6_0x3fdcdf,_0xd3c046=emptyRegistry(_0x236a5f[_0x3f2d53(0x1a6)]);for(const [_0x300326,_0x5a11ac]of Object[_0x3f2d53(0x17a)](_0x236a5f[_0x3f2d53(0x19f)])){_0xd3c046['profiles'][_0x300326]={'appCode':_0x5a11ac[_0x3f2d53(0x172)],'runtimeDomain':_0x5a11ac[_0x3f2d53(0x185)]},mergeProfileModels(_0xd3c046,_0x300326,_0x5a11ac['models']);}return _0xd3c046;}function generatedObjectLiteralToJson(_0xf500e8){const _0x378fbe=a6_0x3fdcdf;let _0x402530='',_0x27e932,_0x50daef=![],_0x500a5e;for(let _0x36ecfe=0x0;_0x36ecfe<_0xf500e8[_0x378fbe(0x1a3)];_0x36ecfe++){const _0x5d97c6=_0xf500e8[_0x36ecfe];if(_0x27e932){_0x402530+=_0x5d97c6;if(_0x50daef)_0x50daef=![];else{if(_0x5d97c6==='\x5c')_0x50daef=!![];else{if(_0x5d97c6===_0x27e932)_0x27e932=undefined;}}continue;}if(_0x5d97c6==='\x22'){_0x27e932=_0x5d97c6,_0x402530+=_0x5d97c6,_0x500a5e=_0x378fbe(0x18a);continue;}if(_0x5d97c6===','){let _0x596f86=_0x36ecfe+0x1;while(/\s/[_0x378fbe(0x196)](_0xf500e8[_0x596f86]??''))_0x596f86++;if(_0xf500e8[_0x596f86]==='}'||_0xf500e8[_0x596f86]===']')continue;_0x402530+=_0x5d97c6,_0x500a5e=',';continue;}if(_0x5d97c6==='{'||_0x5d97c6==='['){_0x402530+=_0x5d97c6,_0x500a5e=_0x5d97c6;continue;}if(_0x5d97c6==='}'||_0x5d97c6===']'){_0x402530+=_0x5d97c6,_0x500a5e=_0x5d97c6;continue;}if((_0x500a5e==='{'||_0x500a5e===',')&&/[A-Za-z_$]/['test'](_0x5d97c6)){let _0x56a74e=_0x36ecfe+0x1;while(/[A-Za-z0-9_$]/[_0x378fbe(0x196)](_0xf500e8[_0x56a74e]??''))_0x56a74e++;let _0x48be22=_0x56a74e;while(/\s/[_0x378fbe(0x196)](_0xf500e8[_0x48be22]??''))_0x48be22++;if(_0xf500e8[_0x48be22]===':'){_0x402530+=JSON['stringify'](_0xf500e8[_0x378fbe(0x189)](_0x36ecfe,_0x56a74e)),_0x36ecfe=_0x56a74e-0x1,_0x500a5e=_0x378fbe(0x193);continue;}}_0x402530+=_0x5d97c6;if(!/\s/['test'](_0x5d97c6)&&_0x5d97c6!==':')_0x500a5e=_0x378fbe(0x18a);}return _0x402530;}function parseGeneratedRegistryJson(_0xa2b4a7){const _0x400db2=a6_0x3fdcdf;try{return JSON[_0x400db2(0x194)](_0xa2b4a7);}catch{return JSON[_0x400db2(0x194)](generatedObjectLiteralToJson(_0xa2b4a7));}}function normalizeModelEntries(_0x4f12f9,_0x504418){const _0x1d0655=a6_0x3fdcdf,_0x2f7b8a=Object[_0x1d0655(0x1a2)](_0x4f12f9),_0x42167b=[];for(const _0x504d0d of _0x504418){if(!_0x504d0d||typeof _0x504d0d!==_0x1d0655(0x17c)||Array[_0x1d0655(0x17e)](_0x504d0d))return undefined;const _0x36ca94=_0x504d0d;if(typeof _0x36ca94[_0x1d0655(0x179)]!==_0x1d0655(0x1a4)||typeof _0x36ca94[_0x1d0655(0x192)]!==_0x1d0655(0x1a4)||typeof _0x36ca94[_0x1d0655(0x19e)]!==_0x1d0655(0x1a4))return undefined;let _0x2fccad;if(typeof _0x36ca94[_0x1d0655(0x18f)]===_0x1d0655(0x1a4)&&_0x36ca94[_0x1d0655(0x170)]===undefined)_0x2fccad=Object[_0x1d0655(0x19c)](_0x2f7b8a['map'](_0x556870=>[_0x556870,_0x36ca94[_0x1d0655(0x18f)]]));else{if(_0x36ca94[_0x1d0655(0x18f)]===undefined&&_0x36ca94[_0x1d0655(0x170)]&&typeof _0x36ca94[_0x1d0655(0x170)]===_0x1d0655(0x17c)&&!Array[_0x1d0655(0x17e)](_0x36ca94[_0x1d0655(0x170)])&&Object['values'](_0x36ca94[_0x1d0655(0x170)])[_0x1d0655(0x181)](_0x57b2d9=>typeof _0x57b2d9==='string'))_0x2fccad={..._0x36ca94[_0x1d0655(0x170)]};else return undefined;}_0x42167b['push']({'alias':_0x36ca94[_0x1d0655(0x179)],'tableName':_0x36ca94[_0x1d0655(0x192)],'name':_0x36ca94['name'],'datasetCodes':_0x2fccad});}return _0x42167b;}export function parseModelRegistry(_0x43faf1){const _0x40b5c1=a6_0x3fdcdf,_0x3bd928=extractRegistryJson(_0x43faf1);if(!_0x3bd928)return undefined;try{const _0x132cda=parseGeneratedRegistryJson(_0x3bd928);if(typeof _0x132cda[_0x40b5c1(0x1a6)]!==_0x40b5c1(0x1a4)||!_0x132cda['profiles']||typeof _0x132cda[_0x40b5c1(0x19f)]!==_0x40b5c1(0x17c))return undefined;if(_0x132cda[_0x40b5c1(0x176)]==='lovrabet-model-registry/v1')return migrateLegacyRegistry(_0x132cda);if(!(_0x132cda[_0x40b5c1(0x176)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x132cda[_0x40b5c1(0x176)]===undefined&&_0x43faf1['includes'](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x40b5c1(0x17e)](_0x132cda[_0x40b5c1(0x178)]))return undefined;const _0x7e7270=_0x132cda[_0x40b5c1(0x19f)],_0x4f7c69=normalizeModelEntries(_0x7e7270,_0x132cda[_0x40b5c1(0x178)]);if(!_0x4f7c69)return undefined;return{'defaultProfile':_0x132cda['defaultProfile'],'profiles':_0x7e7270,'models':_0x4f7c69};}catch{return undefined;}}export function readModelRegistry(_0x17c3b8){const _0x268c2d=a6_0x3fdcdf;if(!existsSync(_0x17c3b8))return undefined;try{return parseModelRegistry(readFileSync(_0x17c3b8,_0x268c2d(0x1ad)));}catch{return undefined;}}function registrySource(_0x1a3b9e){const _0x278a64=a6_0x3fdcdf,_0x2bc7da=Object[_0x278a64(0x1a2)](_0x1a3b9e[_0x278a64(0x19f)]),_0x2ecf6e=_0x1a3b9e[_0x278a64(0x178)]['map'](_0x29c7a4=>{const _0x384963=_0x278a64,_0x2f2772=_0x2bc7da[_0x384963(0x1a7)](_0x5d54c5=>_0x29c7a4[_0x384963(0x170)][_0x5d54c5]),_0x2b7833=_0x2f2772[0x0],_0x1aff02=_0x2b7833!==undefined&&_0x2f2772[_0x384963(0x181)](_0x3dba97=>_0x3dba97===_0x2b7833),_0x5a46b9={'alias':_0x29c7a4[_0x384963(0x179)],'tableName':_0x29c7a4['tableName'],'name':_0x29c7a4[_0x384963(0x19e)]};return _0x1aff02?{..._0x5a46b9,'datasetCode':_0x2b7833}:{..._0x5a46b9,'datasetCodes':_0x29c7a4[_0x384963(0x170)]};}),_0x1c14d9=JSON['stringify']({'defaultProfile':_0x1a3b9e[_0x278a64(0x1a6)],'profiles':_0x1a3b9e['profiles'],'models':_0x2ecf6e},null,0x2)[_0x278a64(0x1a9)]('\x0a')['map'](_0x510345=>'\x20\x20'+_0x510345)[_0x278a64(0x18b)]('\x0a');return _0x278a64(0x1a8)+MODEL_REGISTRY_VERSION_MARKER+'\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20'+REGISTRY_START+'\x0a'+_0x1c14d9+'\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a'+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x4f474c,_0x1fe6e1,_0x4e7b1d){const _0x4e2fd8=a6_0x3fdcdf,_0x5d5772=_0x4e7b1d[_0x4e2fd8(0x1a7)](_0x263003=>({..._0x263003,'alias':_0x263003['alias']||_0x263003[_0x4e2fd8(0x192)]})),_0x2c4862=new Map(),_0x4714c5=new Map();for(const _0x2a17ae of _0x5d5772){const _0x126e89=_0x2c4862[_0x4e2fd8(0x182)](_0x2a17ae['alias']);if(_0x126e89&&_0x126e89!==_0x2a17ae[_0x4e2fd8(0x192)])throw new Error('Model\x20alias\x20\x22'+_0x2a17ae[_0x4e2fd8(0x179)]+_0x4e2fd8(0x16e)+_0x126e89+_0x4e2fd8(0x175)+_0x2a17ae[_0x4e2fd8(0x192)]+'\x22\x20in\x20profile\x20\x22'+_0x1fe6e1+'\x22.');const _0x333743=_0x4714c5[_0x4e2fd8(0x182)](_0x2a17ae[_0x4e2fd8(0x192)]);if(_0x333743&&_0x333743!==_0x2a17ae[_0x4e2fd8(0x179)])throw new Error(_0x4e2fd8(0x17d)+_0x2a17ae[_0x4e2fd8(0x192)]+_0x4e2fd8(0x18e)+_0x333743+'\x22\x20and\x20\x22'+_0x2a17ae[_0x4e2fd8(0x179)]+'\x22\x20in\x20profile\x20\x22'+_0x1fe6e1+'\x22.');_0x2c4862[_0x4e2fd8(0x17b)](_0x2a17ae['alias'],_0x2a17ae[_0x4e2fd8(0x192)]),_0x4714c5[_0x4e2fd8(0x17b)](_0x2a17ae[_0x4e2fd8(0x192)],_0x2a17ae['alias']);const _0x36fe2e=_0x4f474c['models'][_0x4e2fd8(0x188)](_0x2e99fc=>_0x2e99fc[_0x4e2fd8(0x179)]===_0x2a17ae['alias']);if(_0x36fe2e&&_0x36fe2e['tableName']!==_0x2a17ae[_0x4e2fd8(0x192)])throw new Error(_0x4e2fd8(0x180)+_0x2a17ae[_0x4e2fd8(0x179)]+_0x4e2fd8(0x16f)+_0x36fe2e[_0x4e2fd8(0x192)]+_0x4e2fd8(0x16d)+_0x2a17ae['tableName']+_0x4e2fd8(0x17f)+_0x1fe6e1+'\x22.');const _0x56a6c8=_0x4f474c['models'][_0x4e2fd8(0x188)](_0x2d6879=>_0x2d6879[_0x4e2fd8(0x192)]===_0x2a17ae[_0x4e2fd8(0x192)]);if(_0x56a6c8&&_0x56a6c8[_0x4e2fd8(0x179)]!==_0x2a17ae[_0x4e2fd8(0x179)])throw new Error(_0x4e2fd8(0x17d)+_0x2a17ae[_0x4e2fd8(0x192)]+_0x4e2fd8(0x177)+_0x56a6c8[_0x4e2fd8(0x179)]+_0x4e2fd8(0x16d)+_0x2a17ae[_0x4e2fd8(0x179)]+_0x4e2fd8(0x17f)+_0x1fe6e1+'\x22.');}for(const _0x3618ba of _0x4f474c[_0x4e2fd8(0x178)]){delete _0x3618ba['datasetCodes'][_0x1fe6e1];}for(const _0x3c051f of _0x5d5772){let _0x122594=_0x4f474c[_0x4e2fd8(0x178)][_0x4e2fd8(0x188)](_0x4c59e7=>_0x4c59e7['alias']===_0x3c051f[_0x4e2fd8(0x179)]);!_0x122594&&(_0x122594={'alias':_0x3c051f[_0x4e2fd8(0x179)],'tableName':_0x3c051f[_0x4e2fd8(0x192)],'name':_0x3c051f['name'],'datasetCodes':{}},_0x4f474c[_0x4e2fd8(0x178)][_0x4e2fd8(0x1aa)](_0x122594)),(_0x1fe6e1===_0x4f474c[_0x4e2fd8(0x1a6)]||!_0x122594[_0x4e2fd8(0x170)][_0x4f474c[_0x4e2fd8(0x1a6)]])&&(_0x122594['alias']=_0x3c051f['alias'],_0x122594[_0x4e2fd8(0x192)]=_0x3c051f['tableName'],_0x122594[_0x4e2fd8(0x19e)]=_0x3c051f[_0x4e2fd8(0x19e)]),_0x122594['datasetCodes'][_0x1fe6e1]=_0x3c051f[_0x4e2fd8(0x18f)];}_0x4f474c[_0x4e2fd8(0x178)]=_0x4f474c[_0x4e2fd8(0x178)][_0x4e2fd8(0x169)](_0x3dadb0=>Object[_0x4e2fd8(0x1a2)](_0x3dadb0['datasetCodes'])[_0x4e2fd8(0x1a3)]>0x0);}function removeUnboundProfiles(_0x2126ef){const _0x2f9ec9=a6_0x3fdcdf,_0x320062=Object['entries'](_0x2126ef['profiles'])[_0x2f9ec9(0x169)](([,_0xb2de77])=>_0xb2de77[_0x2f9ec9(0x172)]===_0x2f9ec9(0x19b))[_0x2f9ec9(0x1a7)](([_0x3c646c])=>_0x3c646c);if(_0x320062[_0x2f9ec9(0x1a3)]===0x0)return;for(const _0x305bdb of _0x320062){delete _0x2126ef['profiles'][_0x305bdb];for(const _0xfcf226 of _0x2126ef[_0x2f9ec9(0x178)]){delete _0xfcf226['datasetCodes'][_0x305bdb];}}_0x2126ef[_0x2f9ec9(0x178)]=_0x2126ef[_0x2f9ec9(0x178)][_0x2f9ec9(0x169)](_0x3aa7db=>Object[_0x2f9ec9(0x1a2)](_0x3aa7db[_0x2f9ec9(0x170)])['length']>0x0);}export function getProfileModels(_0x28d16c,_0x457497){const _0x42fa3d=a6_0x3fdcdf;return _0x28d16c[_0x42fa3d(0x178)][_0x42fa3d(0x1a1)](_0xfd2f4f=>{const _0xb2bcb1=_0x42fa3d,_0x4be9c8=_0xfd2f4f[_0xb2bcb1(0x170)][_0x457497];return _0x4be9c8?[{'datasetCode':_0x4be9c8,'tableName':_0xfd2f4f[_0xb2bcb1(0x192)],'name':_0xfd2f4f[_0xb2bcb1(0x19e)],'alias':_0xfd2f4f[_0xb2bcb1(0x179)]}]:[];});}function a6_0x7c3a(){const _0xf52479=['\x22\x20maps\x20to\x20table\x20\x22','datasetCodes','1054785blEDCx','appCode','/*\x20rabetbase-model-registry:start\x20*/','allowEmptyReplacement','\x22\x20and\x20\x22','protocol','\x22\x20maps\x20to\x20alias\x20\x22','models','alias','entries','set','object','Table\x20\x22','isArray','\x22\x20in\x20profile\x20\x22','Model\x20alias\x20\x22','every','get','model-runtime.ts','Refusing\x20to\x20replace\x20','runtimeDomain','1435082oGKDSB','9580068tySpKQ','find','slice','value','join','replace','\x20model(s)\x20in\x20profile\x20\x22','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','datasetCode','1714902yBZtUC','/*\x20rabetbase-model-registry:end\x20*/','tableName','key','parse','697280rNahPO','test','21ZZItKi','outputDir','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','profileName','NOT-SET','fromEntries','8mJAohX','name','profiles','35610oNKNQN','flatMap','keys','length','string','trim','defaultProfile','map','/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a','split','push','indexOf','.tmp','utf8','filter','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','\x22\x20with\x20an\x20empty\x20result.\x20','2467380bnmWmR','\x22\x20in\x20the\x20registry\x20but\x20\x22','\x22\x20maps\x20to\x20both\x20\x22'];a6_0x7c3a=function(){return _0xf52479;};return a6_0x7c3a();}export function updateModelRegistry(_0x2ff9a4){const _0x52dcbe=a6_0x3fdcdf,_0x2fc487=a6_0x2accac[_0x52dcbe(0x18b)](_0x2ff9a4[_0x52dcbe(0x198)],MODEL_REGISTRY_FILE_NAME),_0x5959b3=existsSync(_0x2fc487),_0x504f76=readModelRegistry(_0x2fc487);if(_0x5959b3&&!_0x504f76)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x52dcbe(0x199));const _0x49403c=_0x504f76??emptyRegistry(_0x2ff9a4[_0x52dcbe(0x1a6)]);if(_0x2ff9a4['appCode']!==_0x52dcbe(0x19b))removeUnboundProfiles(_0x49403c);const _0x7f4c0=_0x504f76?getProfileModels(_0x504f76,_0x2ff9a4[_0x52dcbe(0x19a)])[_0x52dcbe(0x1a3)]:0x0;if(_0x7f4c0>0x0&&_0x2ff9a4['models'][_0x52dcbe(0x1a3)]===0x0&&!_0x2ff9a4[_0x52dcbe(0x174)])throw new Error(_0x52dcbe(0x184)+_0x7f4c0+_0x52dcbe(0x18d)+_0x2ff9a4[_0x52dcbe(0x19a)]+_0x52dcbe(0x16b)+_0x52dcbe(0x16a));_0x49403c['defaultProfile']=_0x2ff9a4[_0x52dcbe(0x1a6)],_0x49403c[_0x52dcbe(0x19f)][_0x2ff9a4[_0x52dcbe(0x19a)]]={'appCode':_0x2ff9a4[_0x52dcbe(0x172)],'runtimeDomain':_0x2ff9a4[_0x52dcbe(0x185)]},mergeProfileModels(_0x49403c,_0x2ff9a4[_0x52dcbe(0x19a)],_0x2ff9a4[_0x52dcbe(0x178)]),mkdirSync(_0x2ff9a4[_0x52dcbe(0x198)],{'recursive':!![]});const _0x5b0003=_0x2fc487+'.'+process['pid']+'.'+Date['now']()+_0x52dcbe(0x1ac);try{writeFileSync(_0x5b0003,registrySource(_0x49403c),{'encoding':_0x52dcbe(0x1ad),'mode':0x1a4}),renameSync(_0x5b0003,_0x2fc487);}catch(_0x34ff51){try{unlinkSync(_0x5b0003);}catch{}throw _0x34ff51;}return{'path':_0x2fc487,'registry':_0x49403c,'existed':_0x5959b3};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a7_0x2bfe(_0x105dcf,_0x22bbf2){_0x105dcf=_0x105dcf-0x1b9;const _0x2aeec0=a7_0x2aee();let _0x2bfef7=_0x2aeec0[_0x105dcf];return _0x2bfef7;}function a7_0x2aee(){const _0x5021a1=['1253895lDUdgw','../../templates/generate-api','{ProjectRoutingImport}','profile-client.ts.tpl','3247698HLrcTv','relative','startsWith','resolve','all','join','2326125mnVDli','688550cvAzLc','dirname','profile-api.ts.tpl','format','2605911IpqRqi','typescript','utf8','123368qIyfxn','6691098MzkDpZ'];a7_0x2aee=function(){return _0x5021a1;};return a7_0x2aee();}(function(_0x210e03,_0x420415){const _0x578b2d=a7_0x2bfe,_0x3a2c82=_0x210e03();while(!![]){try{const _0x5340d8=parseInt(_0x578b2d(0x1c9))/0x1+parseInt(_0x578b2d(0x1c0))/0x2+parseInt(_0x578b2d(0x1b9))/0x3+-parseInt(_0x578b2d(0x1c7))/0x4+-parseInt(_0x578b2d(0x1bf))/0x5+-parseInt(_0x578b2d(0x1c8))/0x6+-parseInt(_0x578b2d(0x1c4))/0x7;if(_0x5340d8===_0x420415)break;else _0x3a2c82['push'](_0x3a2c82['shift']());}catch(_0x36525a){_0x3a2c82['push'](_0x3a2c82['shift']());}}}(a7_0x2aee,0xaa37d));import{readFileSync}from'node:fs';import a7_0xbd1e55 from'node:path';import{fileURLToPath}from'node:url';import a7_0x595675 from'prettier';import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function relativeImport(_0x37e828,_0x34f8b2){const _0x553462=a7_0x2bfe;let _0x5213f4=a7_0xbd1e55[_0x553462(0x1ba)](_0x37e828,_0x34f8b2)['replace'](/\\/g,'/');if(!_0x5213f4[_0x553462(0x1bb)]('.'))_0x5213f4='./'+_0x5213f4;return _0x5213f4;}export async function renderModelRegistryScaffold(_0x4f8c9d,_0x5dde65=process['cwd']()){const _0x7273c2=a7_0x2bfe,_0x7b81e3=fileURLToPath(import.meta.url),_0x31ac03=a7_0xbd1e55[_0x7273c2(0x1bc)](a7_0xbd1e55[_0x7273c2(0x1c1)](_0x7b81e3),_0x7273c2(0x1ca)),_0x5d6535=relativeImport(a7_0xbd1e55[_0x7273c2(0x1bc)](_0x4f8c9d),a7_0xbd1e55['resolve'](_0x5dde65,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x4e6329=readFileSync(a7_0xbd1e55['join'](_0x31ac03,_0x7273c2(0x1c2)),_0x7273c2(0x1c6))['replace'](_0x7273c2(0x1cb),_0x5d6535),[_0xb7ca31,_0x442ff0,_0x2d825d]=await Promise[_0x7273c2(0x1bd)]([a7_0x595675[_0x7273c2(0x1c3)](_0x4e6329,{'parser':_0x7273c2(0x1c5)}),a7_0x595675[_0x7273c2(0x1c3)](readFileSync(a7_0xbd1e55[_0x7273c2(0x1be)](_0x31ac03,_0x7273c2(0x1cc)),_0x7273c2(0x1c6)),{'parser':_0x7273c2(0x1c5)}),a7_0x595675[_0x7273c2(0x1c3)](readFileSync(a7_0xbd1e55[_0x7273c2(0x1be)](_0x31ac03,'model-runtime.ts.tpl'),'utf8'),{'parser':_0x7273c2(0x1c5)})]);return{'api':_0xb7ca31,'client':_0x442ff0,'modelRuntime':_0x2d825d};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a8_0x5648(){const _0x40dd29=['defaultApp','481689wDjTNC','apps','\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20','`\x20first.','entries','validation','9MbezLu','34qscTcK','length','4puxifj','resolve','3037017nKenLi','-api.ts','filter','join','1644GqDNgy','string','16agQTwZ','Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.','18530963BJkqEV','object','23543TmmVhl','Run\x20`','11366990uckjeN','162BoHxgT','2545739mwRxkE','AppCode\x20\x22','\x22\x20is\x20missing\x20from\x20','271485jOnYoX','Model\x20profile\x20\x22','profiles','map'];a8_0x5648=function(){return _0x40dd29;};return a8_0x5648();}(function(_0x5993c8,_0x11f7d7){const _0x541424=a8_0x4a56,_0x1d63fc=_0x5993c8();while(!![]){try{const _0x361287=parseInt(_0x541424(0xd2))/0x1*(parseInt(_0x541424(0xc4))/0x2)+parseInt(_0x541424(0xc8))/0x3*(-parseInt(_0x541424(0xc6))/0x4)+-parseInt(_0x541424(0xd9))/0x5*(parseInt(_0x541424(0xd5))/0x6)+parseInt(_0x541424(0xd6))/0x7*(parseInt(_0x541424(0xce))/0x8)+parseInt(_0x541424(0xc3))/0x9*(-parseInt(_0x541424(0xd4))/0xa)+-parseInt(_0x541424(0xd0))/0xb+parseInt(_0x541424(0xcc))/0xc*(parseInt(_0x541424(0xde))/0xd);if(_0x361287===_0x11f7d7)break;else _0x1d63fc['push'](_0x1d63fc['shift']());}catch(_0xc95b5b){_0x1d63fc['push'](_0x1d63fc['shift']());}}}(a8_0x5648,0xdcbdc));function a8_0x4a56(_0x3dc8d7,_0xb9f20a){_0x3dc8d7=_0x3dc8d7-0xc1;const _0x564839=a8_0x5648();let _0x4a56f5=_0x564839[_0x3dc8d7];return _0x4a56f5;}import{existsSync}from'node:fs';import a8_0x1a0070 from'node:path';import{readRawConfig}from'../context/config-loader.js';import{MODEL_REGISTRY_FILE_NAME,readModelRegistry}from'../api/model-registry-file.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveApiModelSource(_0x5f4347,_0x2c0cab,_0x379436){const _0x213eb0=a8_0x4a56,_0x2d1de9=a8_0x1a0070[_0x213eb0(0xc7)](process['cwd'](),_0x5f4347),_0x3b44d1=a8_0x1a0070[_0x213eb0(0xc7)](_0x2d1de9,'api.ts'),_0x32d95f=a8_0x1a0070[_0x213eb0(0xc7)](_0x2d1de9,MODEL_REGISTRY_FILE_NAME),_0x5a23f2=readModelRegistry(_0x32d95f);if(_0x5a23f2){const _0x40e876=_0x2c0cab?Object[_0x213eb0(0xc1)](_0x5a23f2[_0x213eb0(0xdb)])[_0x213eb0(0xca)](([,_0x947d6c])=>_0x947d6c['appCode']===_0x2c0cab):[];if(_0x379436){if(_0x5a23f2[_0x213eb0(0xdb)][_0x379436])return{'filePath':_0x32d95f,'profileName':_0x379436};if(_0x40e876[_0x213eb0(0xc5)]>0x0)throw CliErrors[_0x213eb0(0xc2)](_0x213eb0(0xda)+_0x379436+_0x213eb0(0xd8)+MODEL_REGISTRY_FILE_NAME+'.',_0x213eb0(0xd3)+CLI_BIN_NAME+'\x20api\x20pull\x20--app\x20'+_0x379436+_0x213eb0(0xe1));}else{if(_0x40e876['length']===0x1)return{'filePath':_0x32d95f,'profileName':_0x40e876[0x0][0x0]};if(_0x40e876['length']>0x1)throw new Error(_0x213eb0(0xd7)+_0x2c0cab+_0x213eb0(0xe0)+_0x40e876[_0x213eb0(0xdc)](([_0x317871])=>_0x317871)[_0x213eb0(0xcb)](',\x20')+'.\x20'+_0x213eb0(0xcf));if(_0x5a23f2[_0x213eb0(0xdb)][_0x5a23f2['defaultProfile']]&&!_0x2c0cab)return{'filePath':_0x32d95f,'profileName':_0x5a23f2['defaultProfile']};}}if(!_0x2c0cab&&!_0x379436)return{'filePath':_0x3b44d1};const _0x333c96=readRawConfig(),_0x3146ee=_0x333c96['apps']&&typeof _0x333c96[_0x213eb0(0xdf)]===_0x213eb0(0xd1)?_0x333c96[_0x213eb0(0xdf)]:{},_0x384ada=_0x379436&&_0x3146ee[_0x379436]?[_0x379436,_0x3146ee[_0x379436]]:Object[_0x213eb0(0xc1)](_0x3146ee)['find'](([,_0x54c0ee])=>_0x54c0ee?.['appcode']===_0x2c0cab);if(!_0x384ada)return{'filePath':_0x3b44d1};const [_0x50344d,_0x49b491]=_0x384ada,_0x3f86c8=typeof _0x333c96[_0x213eb0(0xdd)]===_0x213eb0(0xcd)?_0x333c96['defaultApp']:undefined;if(_0x49b491?.['apiDir'])return{'filePath':_0x3b44d1};if(_0x3f86c8&&_0x50344d!==_0x3f86c8){const _0x22059c=a8_0x1a0070[_0x213eb0(0xc7)](_0x2d1de9,_0x50344d+_0x213eb0(0xc9));if(existsSync(_0x22059c))return{'filePath':_0x22059c};}return{'filePath':_0x3b44d1};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x533885,_0xd66649){const _0x98ee30=a9_0x2cd9,_0x32ef67=_0x533885();while(!![]){try{const _0x291d27=-parseInt(_0x98ee30(0x97))/0x1+-parseInt(_0x98ee30(0xa2))/0x2*(parseInt(_0x98ee30(0xa1))/0x3)+-parseInt(_0x98ee30(0x95))/0x4*(-parseInt(_0x98ee30(0x9c))/0x5)+-parseInt(_0x98ee30(0xa3))/0x6+-parseInt(_0x98ee30(0xa0))/0x7*(-parseInt(_0x98ee30(0x98))/0x8)+-parseInt(_0x98ee30(0xa4))/0x9*(parseInt(_0x98ee30(0x96))/0xa)+parseInt(_0x98ee30(0x99))/0xb;if(_0x291d27===_0xd66649)break;else _0x32ef67['push'](_0x32ef67['shift']());}catch(_0x5b77ea){_0x32ef67['push'](_0x32ef67['shift']());}}}(a9_0x4919,0x63870));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';import a9_0x56655b from'ora';function a9_0x2cd9(_0x4c2f9b,_0xa52dad){_0x4c2f9b=_0x4c2f9b-0x93;const _0x491976=a9_0x4919();let _0x2cd978=_0x491976[_0x4c2f9b];return _0x2cd978;}export async function runAuthServer(_0x10df29){const _0x51ea15=a9_0x2cd9,_0x2acc22=await getIsSessionValid();if(_0x2acc22){console[_0x51ea15(0x9e)](_0x51ea15(0xa6));return;}if(_0x10df29?.['nonInteractive']&&!_0x10df29[_0x51ea15(0x9b)])throw CliErrors[_0x51ea15(0x9f)]('Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.',_0x51ea15(0x9a)+CLI_BIN_NAME+_0x51ea15(0x94));const _0xdf6b01=_0x10df29?.[_0x51ea15(0x9b)]?!![]:await confirm({'message':'No\x20valid\x20session.\x20Login\x20now?','default':!![]});if(!_0xdf6b01)return;if(_0x10df29?.['nonInteractive']){console[_0x51ea15(0x9e)]('Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.');const _0xfbd43a=await authServer({'silent':![],'openBrowser':![]});_0xfbd43a?console[_0x51ea15(0x9e)](_0x51ea15(0xa7)):console[_0x51ea15(0x9e)](_0x51ea15(0xa5));return;}const _0x227367=a9_0x56655b(_0x51ea15(0x9d))['start'](),_0x4b213a=await authServer({'silent':!![],'openBrowser':!![]});_0x227367[_0x51ea15(0x93)](),_0x4b213a?console[_0x51ea15(0x9e)](_0x51ea15(0xa7)):console[_0x51ea15(0x9e)](_0x51ea15(0xa5));}function a9_0x4919(){const _0x51c2d4=['!\x20Login\x20failed.','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','*\x20Login\x20successful!','stop','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','131188stRXOE','8920RFmwgW','414646jUZXUn','3196360mtBasy','66363BIdyJD','Run\x20`','autoYes','80SNopkz','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','log','validation','14gEwtro','15hzJPQu','38162nlLRPJ','2226768dZakyH','414XONAkU'];a9_0x4919=function(){return _0x51c2d4;};return a9_0x4919();}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x2c0c2b=a10_0x5a8f;(function(_0x31f4ab,_0x222838){const _0xeb9991=a10_0x5a8f,_0x56aba9=_0x31f4ab();while(!![]){try{const _0x42804b=parseInt(_0xeb9991(0x95))/0x1*(parseInt(_0xeb9991(0x85))/0x2)+-parseInt(_0xeb9991(0x84))/0x3*(-parseInt(_0xeb9991(0x79))/0x4)+parseInt(_0xeb9991(0x75))/0x5*(parseInt(_0xeb9991(0xa3))/0x6)+-parseInt(_0xeb9991(0x9a))/0x7+-parseInt(_0xeb9991(0x7e))/0x8*(parseInt(_0xeb9991(0x7c))/0x9)+-parseInt(_0xeb9991(0x90))/0xa+parseInt(_0xeb9991(0x81))/0xb*(parseInt(_0xeb9991(0x76))/0xc);if(_0x42804b===_0x222838)break;else _0x56aba9['push'](_0x56aba9['shift']());}catch(_0xcacf6f){_0x56aba9['push'](_0x56aba9['shift']());}}}(a10_0x3d4a,0xba1a3));import{writeFileSync}from'node:fs';import a10_0x3fdbd3 from'node:http';function a10_0x3d4a(){const _0x5846ad=['xdg-open\x20\x22','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','Auth\x20server\x20error:','writeHead','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','json','createServer','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','13545760wzsSje','origin','certificateUrl','user','darwin','89638ALLkmu','🔐\x20Starting\x20login\x20service...','log','cookie','listen','8469279KyEkAW','headers','!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','/api/auth/get-session','/cert/lovrabet-dev.json','open\x20\x22','port','win32','11082Fetuqs','error','2845JYAJHs','129732ZnyEsi','cmd\x20/c\x20start\x20\x22\x22\x20\x22','127.0.0.1','752jBTqPJ','object','💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','36lkofHT','close','2669064ocRPZI','/sign-in?redirect=','📍\x20Login\x20URL:','2959hvmvLS','platform','then','4053UeQxCd','10JbfwSU','timeoutMs','isAuth'];a10_0x3d4a=function(){return _0x5846ad;};return a10_0x3d4a();}import a10_0x259c65 from'node:https';import{getUserDomain}from'../constant/domain.js';import{getOfficialRoutingCdn,getOfficialRoutingProfile}from'../constant/routing-profile.js';import{getProjectDomainRoutingManifest}from'../config/project-domain-routing.js';import{exec}from'node:child_process';import{getIsSessionValid}from'../auth/is-session-valid.js';import{cookieFile}from'../auth/constant.js';import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export function resolveAuthCallbackRouting(_0x4bdffe){const _0x4fb136=a10_0x5a8f;if(!_0x4bdffe)return getProjectDomainRoutingManifest()['local'];const _0x4b949d=getOfficialRoutingProfile(_0x4bdffe),_0x5ed3c6=getOfficialRoutingCdn(_0x4bdffe);return{'origin':_0x4b949d['local'][_0x4fb136(0x91)],'certificateUrl':_0x5ed3c6['lovrabet']+_0x4fb136(0x9f)};}function withPort(_0x1708bc,_0x3cd4fe){const _0x4dc773=a10_0x5a8f,_0x5827dd=new URL(_0x1708bc);return _0x5827dd[_0x4dc773(0xa1)]=String(_0x3cd4fe),_0x5827dd[_0x4dc773(0x91)];}export async function authServer(_0x42fe6f){const _0x543caa=a10_0x5a8f,_0x7b5ee=_0x42fe6f?.['silent']||![],_0x4d7db1=_0x42fe6f?.['openBrowser']??!![],_0x30d993=_0x42fe6f?.[_0x543caa(0x86)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x51f9af=resolveAuthCallbackRouting(),_0x51bb58=_0x51f9af[_0x543caa(0x92)]?await(await fetch(_0x51f9af[_0x543caa(0x92)]))[_0x543caa(0x8d)]():undefined;return new Promise(async(_0x3356bf,_0xde3d1)=>{const _0x3e8090=_0x543caa;let _0x2785b2=0x0,_0x4a7d60=![],_0x228259;const _0x38475=async(_0xe277ab,_0x41be91)=>{const _0x59dd54=a10_0x5a8f,_0x540392=getUserDomain(),_0xc4a6fd=_0xe277ab[_0x59dd54(0x9b)][_0x59dd54(0x98)]||'',_0x309ebc=await fetch(_0x540392+_0x59dd54(0x9e),{'headers':{'cookie':_0xc4a6fd}})[_0x59dd54(0x83)](_0x528fbf=>_0x528fbf[_0x59dd54(0x8d)]()),_0x3d64e8=_0x309ebc&&_0x309ebc['session']&&_0x309ebc[_0x59dd54(0x93)];if(_0x3d64e8){writeFileSync(cookieFile,_0xc4a6fd,'utf-8');const _0x38314b=buildLoginSuccessHtml();_0x41be91[_0x59dd54(0x8b)](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x41be91['end'](_0x38314b),_0x53e862(!![]);}else{const _0x32953f=encodeURIComponent(withPort(_0x51f9af[_0x59dd54(0x91)],_0x2785b2));_0x41be91['writeHead'](0x12e,{'location':_0x540392+_0x59dd54(0x7f)+_0x32953f}),_0x41be91['end']();return;}},_0x39a452=_0x51bb58?a10_0x259c65['createServer'](_0x51bb58,_0x38475):a10_0x3fdbd3[_0x3e8090(0x8e)](_0x38475);function _0x53e862(_0x44db09){const _0x132fa9=_0x3e8090;if(_0x4a7d60)return;_0x4a7d60=!![],_0x228259&&clearTimeout(_0x228259),_0x39a452[_0x132fa9(0x7d)](),_0x3356bf(_0x44db09);}_0x39a452[_0x3e8090(0x99)](0x0,_0x3e8090(0x78),()=>{const _0x2681f5=_0x3e8090,_0x774c4d=_0x39a452['address']();_0x2785b2=typeof _0x774c4d===_0x2681f5(0x7a)&&_0x774c4d?_0x774c4d[_0x2681f5(0xa1)]:Number(_0x774c4d);const _0x59ca32=withPort(_0x51f9af[_0x2681f5(0x91)],_0x2785b2);_0x228259=setTimeout(()=>{const _0x28391d=_0x2681f5;!_0x7b5ee&&console['log'](_0x28391d(0x9c)),_0x53e862(![]);},_0x30d993);!_0x7b5ee&&(console[_0x2681f5(0x97)](_0x2681f5(0x96)),console[_0x2681f5(0x97)](_0x2681f5(0x80),_0x59ca32),_0x4d7db1?(console[_0x2681f5(0x97)](_0x2681f5(0x89)),console[_0x2681f5(0x97)](''),console[_0x2681f5(0x97)]('💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.')):console[_0x2681f5(0x97)](_0x2681f5(0x7b)),console[_0x2681f5(0x97)](''));if(!_0x4d7db1)return;openInBrowser(_0x59ca32)[_0x2681f5(0x83)](_0x15329b=>{const _0x219a35=_0x2681f5;!_0x7b5ee&&(_0x15329b?console['log'](_0x219a35(0x8f)):(console[_0x219a35(0x97)](_0x219a35(0x8c)),console['log'](_0x219a35(0x9d),_0x59ca32)),console[_0x219a35(0x97)](''));})['catch'](()=>{const _0xea20e5=_0x2681f5;!_0x7b5ee&&(console['log'](_0xea20e5(0x8c)),console['log']('🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0x59ca32),console[_0xea20e5(0x97)](''));});}),_0x39a452['on'](_0x3e8090(0x74),_0x119bbf=>{const _0x20a3e4=_0x3e8090;if(_0x4a7d60)return;_0x4a7d60=!![],_0x228259&&clearTimeout(_0x228259),!_0x7b5ee&&console[_0x20a3e4(0x74)](_0x20a3e4(0x8a),_0x119bbf),_0x39a452[_0x20a3e4(0x7d)](),_0xde3d1(_0x119bbf);});});}function a10_0x5a8f(_0x4b6f91,_0x1c6d38){_0x4b6f91=_0x4b6f91-0x74;const _0x3d4a0d=a10_0x3d4a();let _0x5a8f24=_0x3d4a0d[_0x4b6f91];return _0x5a8f24;}function openInBrowser(_0x43e41a){return new Promise(_0x54f38c=>{const _0x5f0c18=a10_0x5a8f,_0x2cc2bb=process[_0x5f0c18(0x82)];let _0xe1579;if(_0x2cc2bb===_0x5f0c18(0xa2))_0xe1579=_0x5f0c18(0x77)+_0x43e41a+'\x22';else _0x2cc2bb===_0x5f0c18(0x94)?_0xe1579=_0x5f0c18(0xa0)+_0x43e41a+'\x22':_0xe1579=_0x5f0c18(0x88)+_0x43e41a+'\x22';exec(_0xe1579,_0x5c6298=>{_0x5c6298?_0x54f38c(![]):_0x54f38c(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a10_0x2c0c2b(0x97)](a10_0x2c0c2b(0x87),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a11_0x1b7adc=a11_0x1f9d;(function(_0x51c514,_0x5954bc){const _0x49668b=a11_0x1f9d,_0xe4a641=_0x51c514();while(!![]){try{const _0x5ddba7=-parseInt(_0x49668b(0x189))/0x1*(-parseInt(_0x49668b(0x18a))/0x2)+-parseInt(_0x49668b(0x18c))/0x3*(-parseInt(_0x49668b(0x18b))/0x4)+parseInt(_0x49668b(0x188))/0x5*(parseInt(_0x49668b(0x192))/0x6)+parseInt(_0x49668b(0x186))/0x7*(-parseInt(_0x49668b(0x18f))/0x8)+parseInt(_0x49668b(0x18d))/0x9+-parseInt(_0x49668b(0x187))/0xa*(parseInt(_0x49668b(0x190))/0xb)+-parseInt(_0x49668b(0x18e))/0xc*(-parseInt(_0x49668b(0x191))/0xd);if(_0x5ddba7===_0x5954bc)break;else _0xe4a641['push'](_0xe4a641['shift']());}catch(_0x9c8e03){_0xe4a641['push'](_0xe4a641['shift']());}}}(a11_0x1965,0x71e27));function a11_0x1965(){const _0x28a943=['36192aTBdlB','40EWVsWQ','20829lTLOBh','2921202gxHWWl','482748YhPzcY','19496XbdBiE','300773wqiFCw','26vDOjEA','3801906WTjgsI','.lovrabet','553RDEdUb','290XKeozA','5GWPLdw','19tQwHvN'];a11_0x1965=function(){return _0x28a943;};return a11_0x1965();}import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a11_0x1b7adc(0x193));function a11_0x1f9d(_0x47838f,_0x2d40f0){_0x47838f=_0x47838f-0x186;const _0x1965f0=a11_0x1965();let _0x1f9d03=_0x1965f0[_0x47838f];return _0x1f9d03;}export const cookieFile=join(configDir,'cookie');mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4556c7,_0x4ce278){var _0x3bdb53=a12_0x1fea,_0x1a905a=_0x4556c7();while(!![]){try{var _0x53c9f9=-parseInt(_0x3bdb53(0x1d1))/0x1*(-parseInt(_0x3bdb53(0x1ca))/0x2)+parseInt(_0x3bdb53(0x1d3))/0x3*(parseInt(_0x3bdb53(0x1d2))/0x4)+parseInt(_0x3bdb53(0x1d0))/0x5+-parseInt(_0x3bdb53(0x1ce))/0x6*(-parseInt(_0x3bdb53(0x1cf))/0x7)+-parseInt(_0x3bdb53(0x1cc))/0x8+parseInt(_0x3bdb53(0x1cd))/0x9+-parseInt(_0x3bdb53(0x1c9))/0xa;if(_0x53c9f9===_0x4ce278)break;else _0x1a905a['push'](_0x1a905a['shift']());}catch(_0x395f18){_0x1a905a['push'](_0x1a905a['shift']());}}}(a12_0x24f7,0x4215d));function a12_0x24f7(){var _0x911251=['1860480hwzEps','2074149Aisqoy','1090818NtgqJx','7BkwBjn','1812155LJVaBO','48226yBpDJM','4GULyIe','1057209BHvAek','9614350CeBBhC','14yooYyX','utf-8'];a12_0x24f7=function(){return _0x911251;};return a12_0x24f7();}import{readFileSync}from'node:fs';function a12_0x1fea(_0x24819c,_0x4b4c96){_0x24819c=_0x24819c-0x1c9;var _0x24f7a9=a12_0x24f7();var _0x1fea4b=_0x24f7a9[_0x24819c];return _0x1fea4b;}import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0x197d83=a12_0x1fea;try{return readFileSync(cookieFile,_0x197d83(0x1cb));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4bbcbc,_0x4ca37d){const _0x1592fd=a13_0x1440,_0x301749=_0x4bbcbc();while(!![]){try{const _0x32ed0b=parseInt(_0x1592fd(0x68))/0x1+parseInt(_0x1592fd(0x6d))/0x2*(parseInt(_0x1592fd(0x6b))/0x3)+parseInt(_0x1592fd(0x69))/0x4*(parseInt(_0x1592fd(0x70))/0x5)+parseInt(_0x1592fd(0x6f))/0x6*(-parseInt(_0x1592fd(0x6c))/0x7)+parseInt(_0x1592fd(0x67))/0x8+-parseInt(_0x1592fd(0x64))/0x9*(parseInt(_0x1592fd(0x65))/0xa)+-parseInt(_0x1592fd(0x66))/0xb;if(_0x32ed0b===_0x4ca37d)break;else _0x301749['push'](_0x301749['shift']());}catch(_0x1d3d52){_0x301749['push'](_0x301749['shift']());}}}(a13_0x323e,0x46709));function a13_0x1440(_0x2ca260,_0x199985){_0x2ca260=_0x2ca260-0x64;const _0x323ee3=a13_0x323e();let _0x144094=_0x323ee3[_0x2ca260];return _0x144094;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a13_0x323e(){const _0x45e044=['3423948UUjixk','2145864GdvvPG','265713fOaOfL','100uIiVPa','utf-8','1083XOLdSq','14GYOUTM','2078bJIXqH','/api/auth/get-session','995334pgguLs','77890qvLjcz','json','session','36xwznIl','917270rrTpEN'];a13_0x323e=function(){return _0x45e044;};return a13_0x323e();}import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0x5265d1=a13_0x1440;try{if(!existsSync(cookieFile))return null;const _0x398590=readFileSync(cookieFile,_0x5265d1(0x6a)),_0x23394c=await fetch(getUserDomain()+_0x5265d1(0x6e),{'headers':{'cookie':_0x398590}});if(!_0x23394c['ok'])return null;const _0x4a7dbc=await _0x23394c[_0x5265d1(0x71)]();if(!_0x4a7dbc[_0x5265d1(0x72)]||!_0x4a7dbc['user'])return null;return _0x4a7dbc;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x487b2c,_0x1b51d4){const _0x17ead0=a14_0x214a,_0x15ffab=_0x487b2c();while(!![]){try{const _0x1eaf67=-parseInt(_0x17ead0(0x151))/0x1+parseInt(_0x17ead0(0x153))/0x2*(parseInt(_0x17ead0(0x15e))/0x3)+parseInt(_0x17ead0(0x15c))/0x4*(parseInt(_0x17ead0(0x159))/0x5)+-parseInt(_0x17ead0(0x15d))/0x6*(parseInt(_0x17ead0(0x15a))/0x7)+parseInt(_0x17ead0(0x155))/0x8*(-parseInt(_0x17ead0(0x156))/0x9)+-parseInt(_0x17ead0(0x158))/0xa+parseInt(_0x17ead0(0x157))/0xb*(parseInt(_0x17ead0(0x14f))/0xc);if(_0x1eaf67===_0x1b51d4)break;else _0x15ffab['push'](_0x15ffab['shift']());}catch(_0x55ee8a){_0x15ffab['push'](_0x15ffab['shift']());}}}(a14_0x2a81,0x9efc8));function a14_0x214a(_0x2e95e3,_0x2edbb3){_0x2e95e3=_0x2e95e3-0x14d;const _0x2a8192=a14_0x2a81();let _0x214aba=_0x2a8192[_0x2e95e3];return _0x214aba;}function a14_0x2a81(){const _0x5d2599=['4429310IXbRSA','5dfGHrR','4021885jGjxXZ','json','473444fmIXxA','12CWkTZJ','220461pVRZeG','session','user','45432ClzAWf','then','1021252TojgSL','utf-8','8lvAKFi','/api/auth/get-session','1424jHHaMX','31518GkHHyC','10098sevJfk'];a14_0x2a81=function(){return _0x5d2599;};return a14_0x2a81();}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x550241=a14_0x214a;try{if(!existsSync(cookieFile))return![];const _0x46349e=readFileSync(cookieFile,_0x550241(0x152)),_0x19d323=await fetch(getUserDomain()+_0x550241(0x154),{'headers':{'cookie':_0x46349e}})[_0x550241(0x150)](_0x1a4e6f=>_0x1a4e6f[_0x550241(0x15b)]());return _0x19d323&&_0x19d323[_0x550241(0x14d)]&&_0x19d323[_0x550241(0x14e)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a15_0x1ecf(){const _0x7a17ad=['Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','336108TZPCyf','25941sUsIRt','5512qJcUEC','3665VUUNEp','7910PHKrov','3606sJfSDt','3150kdabio','16057VRkupH','3689grrniD','<!doctype\x20html>\x0a<html\x20lang=\x22en\x22>\x0a<head>\x0a\x20\x20<meta\x20charset=\x22utf-8\x22>\x0a\x20\x20<meta\x20name=\x22viewport\x22\x20content=\x22width=device-width,\x20initial-scale=1\x22>\x0a\x20\x20<title>Login\x20successful\x20·\x20Rabetbase\x20CLI</title>\x0a\x20\x20<style>\x0a\x20\x20\x20\x20:root\x20{\x0a\x20\x20\x20\x20\x20\x20--bg0:\x20#0f1419;\x0a\x20\x20\x20\x20\x20\x20--bg1:\x20#1a2332;\x0a\x20\x20\x20\x20\x20\x20--card:\x20#ffffff;\x0a\x20\x20\x20\x20\x20\x20--text:\x20#1c2128;\x0a\x20\x20\x20\x20\x20\x20--muted:\x20#5c6570;\x0a\x20\x20\x20\x20\x20\x20--accent:\x20#2563eb;\x0a\x20\x20\x20\x20\x20\x20--accent-soft:\x20#eff6ff;\x0a\x20\x20\x20\x20\x20\x20--success:\x20#059669;\x0a\x20\x20\x20\x20\x20\x20--radius:\x2016px;\x0a\x20\x20\x20\x20\x20\x20--shadow:\x200\x2025px\x2050px\x20-12px\x20rgba(15,\x2020,\x2025,\x200.35);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20*\x20{\x20box-sizing:\x20border-box;\x20}\x0a\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20min-height:\x20100vh;\x0a\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20\x20\x20padding:\x2024px;\x0a\x20\x20\x20\x20\x20\x20font-family:\x20ui-sans-serif,\x20system-ui,\x20-apple-system,\x20\x22Segoe\x20UI\x22,\x20Roboto,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22Helvetica\x20Neue\x22,\x20Arial,\x20\x22Noto\x20Sans\x22,\x20\x22PingFang\x20SC\x22,\x20\x22Microsoft\x20YaHei\x22,\x20sans-serif;\x0a\x20\x20\x20\x20\x20\x20background:\x20linear-gradient(160deg,\x20var(--bg0)\x200%,\x20var(--bg1)\x2045%,\x20#243047\x20100%);\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--text);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.card\x20{\x0a\x20\x20\x20\x20\x20\x20width:\x20100%;\x0a\x20\x20\x20\x20\x20\x20max-width:\x20420px;\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--card);\x0a\x20\x20\x20\x20\x20\x20border-radius:\x20var(--radius);\x0a\x20\x20\x20\x20\x20\x20box-shadow:\x20var(--shadow);\x0a\x20\x20\x20\x20\x20\x20padding:\x2040px\x2036px\x2032px;\x0a\x20\x20\x20\x20\x20\x20text-align:\x20center;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.icon\x20{\x0a\x20\x20\x20\x20\x20\x20width:\x2064px;\x0a\x20\x20\x20\x20\x20\x20height:\x2064px;\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x20auto\x2020px;\x0a\x20\x20\x20\x20\x20\x20border-radius:\x2050%;\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--accent-soft);\x0a\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.icon\x20svg\x20{\x20width:\x2036px;\x20height:\x2036px;\x20}\x0a\x20\x20\x20\x20h1\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x200\x2012px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x201.375rem;\x0a\x20\x20\x20\x20\x20\x20font-weight:\x20600;\x0a\x20\x20\x20\x20\x20\x20letter-spacing:\x20-0.02em;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20p.lead\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x200\x208px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.9375rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--muted);\x0a\x20\x20\x20\x20\x20\x20line-height:\x201.55;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.countdown\x20{\x0a\x20\x20\x20\x20\x20\x20display:\x20inline-flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20gap:\x206px;\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2016px;\x0a\x20\x20\x20\x20\x20\x20padding:\x208px\x2014px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.875rem;\x0a\x20\x20\x20\x20\x20\x20font-variant-numeric:\x20tabular-nums;\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--accent);\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--accent-soft);\x0a\x20\x20\x20\x20\x20\x20border-radius:\x20999px;\x0a\x20\x20\x20\x20\x20\x20font-weight:\x20500;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20#manualMsg\x20{\x0a\x20\x20\x20\x20\x20\x20display:\x20none;\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2020px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.8125rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20#b91c1c;\x0a\x20\x20\x20\x20\x20\x20line-height:\x201.45;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.cli-hint\x20{\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2028px;\x0a\x20\x20\x20\x20\x20\x20padding-top:\x2024px;\x0a\x20\x20\x20\x20\x20\x20border-top:\x201px\x20solid\x20#e8ecf0;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.75rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20#8b949e;\x0a\x20\x20\x20\x20}\x0a\x20\x20</style>\x0a</head>\x0a<body>\x0a\x20\x20<div\x20class=\x22card\x22\x20role=\x22status\x22\x20aria-live=\x22polite\x22>\x0a\x20\x20\x20\x20<div\x20class=\x22icon\x22\x20aria-hidden=\x22true\x22>\x0a\x20\x20\x20\x20\x20\x20<svg\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x2210\x22\x20stroke=\x22#059669\x22\x20stroke-width=\x222\x22\x20fill=\x22none\x22/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M8\x2012.5l2.5\x202.5L16\x209\x22\x20stroke=\x22#059669\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22/>\x0a\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<h1>Login\x20successful</h1>\x0a\x20\x20\x20\x20<p\x20class=\x22lead\x22>You\x20can\x20return\x20to\x20the\x20terminal\x20to\x20continue.\x20This\x20window\x20will\x20try\x20to\x20close\x20automatically.</p>\x0a\x20\x20\x20\x20<div\x20class=\x22countdown\x22>\x0a\x20\x20\x20\x20\x20\x20Closing\x20in\x20<span\x20id=\x22t\x22>5</span>s\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<div\x20id=\x22manualMsg\x22>','</div>\x0a\x20\x20\x20\x20<p\x20class=\x22cli-hint\x22>Rabetbase\x20CLI\x20·\x20session\x20saved\x20locally</p>\x0a\x20\x20</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>','5660149QrKBFD','180YShqOd'];a15_0x1ecf=function(){return _0x7a17ad;};return a15_0x1ecf();}(function(_0xb2d82c,_0x17a913){const _0x223fc1=a15_0x6c06,_0x527f14=_0xb2d82c();while(!![]){try{const _0x5bc307=parseInt(_0x223fc1(0xfb))/0x1+-parseInt(_0x223fc1(0x102))/0x2+parseInt(_0x223fc1(0x103))/0x3*(-parseInt(_0x223fc1(0x100))/0x4)+parseInt(_0x223fc1(0x105))/0x5*(parseInt(_0x223fc1(0xf9))/0x6)+parseInt(_0x223fc1(0xfc))/0x7*(-parseInt(_0x223fc1(0x104))/0x8)+parseInt(_0x223fc1(0xfa))/0x9*(parseInt(_0x223fc1(0x106))/0xa)+parseInt(_0x223fc1(0xff))/0xb;if(_0x5bc307===_0x17a913)break;else _0x527f14['push'](_0x527f14['shift']());}catch(_0x54ab13){_0x527f14['push'](_0x527f14['shift']());}}}(a15_0x1ecf,0x5002f));function a15_0x6c06(_0x1bc8da,_0x59e070){_0x1bc8da=_0x1bc8da-0xf9;const _0x1ecf66=a15_0x1ecf();let _0x6c06b1=_0x1ecf66[_0x1bc8da];return _0x6c06b1;}export function buildLoginSuccessHtml(){const _0x150740=a15_0x6c06,_0x19c251=_0x150740(0x101);return _0x150740(0xfd)+_0x19c251+_0x150740(0xfe);}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xe2aaca,_0x74ee82){var _0x549e37=a16_0x491f,_0x554234=_0xe2aaca();while(!![]){try{var _0x5adc22=-parseInt(_0x549e37(0x8c))/0x1*(-parseInt(_0x549e37(0x82))/0x2)+-parseInt(_0x549e37(0x84))/0x3*(-parseInt(_0x549e37(0x8b))/0x4)+-parseInt(_0x549e37(0x86))/0x5*(-parseInt(_0x549e37(0x85))/0x6)+parseInt(_0x549e37(0x81))/0x7*(-parseInt(_0x549e37(0x88))/0x8)+-parseInt(_0x549e37(0x80))/0x9+parseInt(_0x549e37(0x87))/0xa+-parseInt(_0x549e37(0x7f))/0xb;if(_0x5adc22===_0x74ee82)break;else _0x554234['push'](_0x554234['shift']());}catch(_0xcc13ef){_0x554234['push'](_0x554234['shift']());}}}(a16_0x1080,0x9e534));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function logout(){var _0x1b5ea3=a16_0x491f;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x1b5ea3(0x89)](_0x1b5ea3(0x83))):console[_0x1b5ea3(0x89)](_0x1b5ea3(0x8a));}function a16_0x491f(_0x1693f8,_0x180726){_0x1693f8=_0x1693f8-0x7f;var _0x1080f5=a16_0x1080();var _0x491f35=_0x1080f5[_0x1693f8];return _0x491f35;}function a16_0x1080(){var _0x4d7162=['63SKNlqp','1888qHMbAR','✓\x20Logged\x20out','931713zLHhUw','544338OgrnzG','45TKlwuI','5582450ryiDKN','611944SdlTXh','log','!\x20Not\x20logged\x20in','12KkCuel','538eForOK','2870637PfoQbS','10947897IvFLcI'];a16_0x1080=function(){return _0x4d7162;};return a16_0x1080();}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a17_0x5a6a(){const _0x37a755=['boolean','10288950Zdgcfw','42039790HNaVOE','5449206WLbEUw','96272wOpcTe','5512806DtryuW','1976SAcwpo','2DRhwjZ','2375CWdAIb','1720307LVjQMp','1043UXlEbu'];a17_0x5a6a=function(){return _0x37a755;};return a17_0x5a6a();}const a17_0x4046de=a17_0xb23f;function a17_0xb23f(_0x439796,_0x4ca09b){_0x439796=_0x439796-0x18c;const _0x5a6ab0=a17_0x5a6a();let _0xb23f44=_0x5a6ab0[_0x439796];return _0xb23f44;}(function(_0x3b0be7,_0x556c29){const _0x326676=a17_0xb23f,_0x165e6b=_0x3b0be7();while(!![]){try{const _0x173d47=-parseInt(_0x326676(0x18d))/0x1*(parseInt(_0x326676(0x196))/0x2)+-parseInt(_0x326676(0x192))/0x3+-parseInt(_0x326676(0x195))/0x4*(parseInt(_0x326676(0x18c))/0x5)+parseInt(_0x326676(0x190))/0x6+parseInt(_0x326676(0x18e))/0x7*(-parseInt(_0x326676(0x193))/0x8)+parseInt(_0x326676(0x194))/0x9+parseInt(_0x326676(0x191))/0xa;if(_0x173d47===_0x556c29)break;else _0x165e6b['push'](_0x165e6b['shift']());}catch(_0x50babe){_0x165e6b['push'](_0x165e6b['shift']());}}}(a17_0x5a6a,0xec101));export const dynamicCliFlags={'enableBffSave':{'type':a17_0x4046de(0x18f)}};
|