@lovrabet/rabetbase-cli 2.5.6 → 2.5.7-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.d.ts +2 -0
- package/lib/commands/flow/page-list.js +1 -0
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.d.ts +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.d.ts +6 -2
- 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.d.ts +26 -6
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.d.ts +12 -0
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +8 -4
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +52 -13
- package/skills/rabetbase/guides/backend-function.md +26 -4
- package/skills/rabetbase/guides/bff-creation-workflow.md +9 -0
- package/skills/rabetbase/guides/cross-database-bff.md +1 -0
- package/skills/rabetbase/guides/custom-page-flow-sdk.md +2 -0
- package/skills/rabetbase/guides/data-api-guidelines.md +2 -0
- package/skills/rabetbase/guides/flow-config-examples.md +75 -0
- package/skills/rabetbase/guides/form-flow-start.md +61 -0
- package/skills/rabetbase/guides/typescript-sdk.md +1 -1
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +18 -4
- package/skills/rabetbase/references/rabetbase-codegen-sdk.md +5 -4
- package/skills/rabetbase/references/rabetbase-flow-commands.md +21 -2
- package/skills/rabetbase/references/rabetbase-flow-resources.md +21 -3
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +6 -2
- package/skills/rabetbase/references/rabetbase-kb.md +4 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +5 -3
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x43600b=a0_0x4edd;function a0_0x4edd(_0x16a83b,_0x2dad27){_0x16a83b=_0x16a83b-0xa2;const _0x108f5b=a0_0x108f();let _0x4edde4=_0x108f5b[_0x16a83b];return _0x4edde4;}(function(_0x37e2d1,_0x2a9df5){const _0x5d0775=a0_0x4edd,_0x1ef48d=_0x37e2d1();while(!![]){try{const _0x38d55d=-parseInt(_0x5d0775(0xa3))/0x1+-parseInt(_0x5d0775(0xb7))/0x2+-parseInt(_0x5d0775(0xbc))/0x3*(-parseInt(_0x5d0775(0xa5))/0x4)+-parseInt(_0x5d0775(0xaa))/0x5*(-parseInt(_0x5d0775(0xbe))/0x6)+parseInt(_0x5d0775(0xb0))/0x7*(-parseInt(_0x5d0775(0xa9))/0x8)+parseInt(_0x5d0775(0xb6))/0x9+-parseInt(_0x5d0775(0xab))/0xa*(-parseInt(_0x5d0775(0xb8))/0xb);if(_0x38d55d===_0x2a9df5)break;else _0x1ef48d['push'](_0x1ef48d['shift']());}catch(_0x882aa5){_0x1ef48d['push'](_0x1ef48d['shift']());}}}(a0_0x108f,0x3215a));function a0_0x108f(){const _0x5aac65=['Failed\x20to\x20generate\x20docs:\x20','join','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','24OpoAQG','.md\x20-\x20','36132voNDmE','success','257814rRCHrO','utf8','197848kPLvWg','api-doc',']\x20Generating:\x20','tableName','1072fTzMbG','5TQxYWL','2786110xGyEPH','log','datasetCode','length','.md\x20(','18977eBvpvZ','push','Generated\x20docs\x20successfully:\x20','./docs','error','name','2320245bprPiu','223800eGEYiF','11pPGCgN'];a0_0x108f=function(){return _0x5aac65;};return a0_0x108f();}import{mkdirSync,writeFileSync}from'node:fs';import a0_0x12c520 from'node:path';import{fetchDatasetDoc}from'../core/api-client.js';import{logger}from'../utils/logger.js';export{fetchDatasetDoc}from'../core/api-client.js';function delay(_0x3a7b43){return new Promise(_0x124943=>setTimeout(_0x124943,_0x3a7b43));}export async function generateDatasetDocs(_0x1cbd07,_0x50b58a,_0x165ed4,_0x205548=a0_0x43600b(0xb3),_0x624b53,_0x3ece4a){const _0x469af7=a0_0x43600b;mkdirSync(_0x205548,{'recursive':!![]});const _0x1fd5ed=[],_0x36dd56=_0x1cbd07[_0x469af7(0xae)];console[_0x469af7(0xac)]('\x0a'+_0x36dd56+_0x469af7(0xbb));for(let _0x46eaf0=0x0;_0x46eaf0<_0x1cbd07[_0x469af7(0xae)];_0x46eaf0++){const _0x1b922b=_0x1cbd07[_0x46eaf0],_0x19d9aa=_0x46eaf0+0x1,_0x27fadf=_0x1b922b[_0x469af7(0xa8)];try{console[_0x469af7(0xac)]('['+_0x19d9aa+'/'+_0x36dd56+_0x469af7(0xa7)+_0x27fadf+_0x469af7(0xaf)+_0x1b922b['name']+')');if(_0x624b53)_0x624b53(_0x19d9aa,_0x36dd56,_0x27fadf);const _0x3650fe=await fetchDatasetDoc({'appCode':_0x50b58a,'cookie':_0x165ed4,'datasetCode':_0x1b922b[_0x469af7(0xad)],'datasetId':_0x1b922b['id'],'enableAI':![],'extraParams':_0x3ece4a}),_0xa40441=a0_0x12c520[_0x469af7(0xba)](_0x205548,_0x27fadf+'.md');writeFileSync(_0xa40441,_0x3650fe,{'encoding':_0x469af7(0xa4)}),console['log']('✓\x20Generated:\x20'+_0x27fadf+'.md'),logger[_0x469af7(0xa2)](_0x469af7(0xa6),_0x469af7(0xb2)+_0x27fadf,undefined,{'datasetCode':_0x1b922b[_0x469af7(0xad)],'datasetName':_0x1b922b[_0x469af7(0xb5)],'filePath':_0xa40441,'progress':_0x19d9aa+'/'+_0x36dd56}),_0x1fd5ed[_0x469af7(0xb1)]({'datasetCode':_0x1b922b['datasetCode'],'datasetName':_0x1b922b[_0x469af7(0xb5)],'filePath':_0xa40441,'success':!![]});if(_0x19d9aa<_0x36dd56)await delay(0x1388);}catch(_0x77e519){const _0x2502c0=_0x77e519 instanceof Error?_0x77e519['message']:String(_0x77e519);console[_0x469af7(0xac)]('✗\x20Failed:\x20'+_0x27fadf+_0x469af7(0xbd)+_0x2502c0),logger[_0x469af7(0xb4)](_0x469af7(0xa6),_0x469af7(0xb9)+_0x1b922b['datasetCode'],{'datasetCode':_0x1b922b[_0x469af7(0xad)],'datasetName':_0x1b922b['name'],'error':_0x2502c0,'progress':_0x19d9aa+'/'+_0x36dd56}),_0x1fd5ed[_0x469af7(0xb1)]({'datasetCode':_0x1b922b[_0x469af7(0xad)],'datasetName':_0x1b922b[_0x469af7(0xb5)],'filePath':'','success':![],'error':_0x2502c0}),_0x19d9aa<_0x36dd56&&(console[_0x469af7(0xac)]('Waiting\x203\x20seconds...\x0a'),await delay(0xbb8));}}return _0x1fd5ed;}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x384527=a1_0x2d81;(function(_0x4edc3f,_0x2f600f){const _0x447baf=a1_0x2d81,_0x317598=_0x4edc3f();while(!![]){try{const _0x6fd44a=-parseInt(_0x447baf(0xd5))/0x1*(-parseInt(_0x447baf(0xeb))/0x2)+parseInt(_0x447baf(0xdf))/0x3+-parseInt(_0x447baf(0xde))/0x4+parseInt(_0x447baf(0xe3))/0x5*(parseInt(_0x447baf(0xd6))/0x6)+-parseInt(_0x447baf(0xe9))/0x7*(-parseInt(_0x447baf(0xd7))/0x8)+-parseInt(_0x447baf(0xdd))/0x9*(-parseInt(_0x447baf(0xd2))/0xa)+parseInt(_0x447baf(0xce))/0xb*(-parseInt(_0x447baf(0xd1))/0xc);if(_0x6fd44a===_0x2f600f)break;else _0x317598['push'](_0x317598['shift']());}catch(_0x4656c5){_0x317598['push'](_0x317598['shift']());}}}(a1_0xed4d,0xacdd1));import a1_0x1dea5e from'node:path';import{CliErrors}from'../errors.js';export function normalizeApiDir(_0x3c7b44,_0x18a416=process[a1_0x384527(0xe2)]()){const _0x33189a=a1_0x384527;return a1_0x1dea5e[_0x33189a(0xca)](_0x18a416,_0x3c7b44);}function a1_0x2d81(_0x3f7596,_0x4db006){_0x3f7596=_0x3f7596-0xc8;const _0xed4d23=a1_0xed4d();let _0x2d81e1=_0xed4d23[_0x3f7596];return _0x2d81e1;}function normalizedApiGroup(_0x2c390f){const _0x4c724e=a1_0x384527,_0x5eec09=_0x2c390f?.[_0x4c724e(0xd0)]();return _0x5eec09||undefined;}export function resolveApiProfileLayouts(_0x3ec697,_0x268ff9,_0xd2e6ac=process[a1_0x384527(0xe2)]()){const _0x3d2762=a1_0x384527,_0x24c93d=_0x3ec697[_0x3d2762(0xd8)](_0x133947=>{const _0x38a4c4=_0x268ff9(_0x133947);return{'app':_0x133947,'outputDir':_0x38a4c4,'normalizedApiDir':normalizeApiDir(_0x38a4c4,_0xd2e6ac),'apiGroup':normalizedApiGroup(_0x133947['apiGroup'])};}),_0x58cfa8=new Map();for(const _0x4d5324 of _0x24c93d){if(!_0x4d5324[_0x3d2762(0xe8)])continue;const _0x4f6875=_0x58cfa8[_0x3d2762(0xc9)](_0x4d5324[_0x3d2762(0xe8)])??new Set();_0x4f6875[_0x3d2762(0xcd)](_0x4d5324[_0x3d2762(0xd9)]),_0x58cfa8['set'](_0x4d5324[_0x3d2762(0xe8)],_0x4f6875);}for(const [_0x3f51bb,_0x495567]of _0x58cfa8){if(_0x495567['size']>0x1)throw CliErrors[_0x3d2762(0xea)](_0x3d2762(0xc8)+_0x3f51bb+_0x3d2762(0xcc),_0x3d2762(0xe6));}const _0xaa9050=new Map();for(const _0x3f7c8a of _0x24c93d){const _0x53f71a=_0xaa9050[_0x3d2762(0xc9)](_0x3f7c8a[_0x3d2762(0xd9)])??[];_0x53f71a['push'](_0x3f7c8a),_0xaa9050['set'](_0x3f7c8a['normalizedApiDir'],_0x53f71a);}for(const _0x272362 of _0xaa9050[_0x3d2762(0xe7)]()){const _0x555fd6=new Set(_0x272362[_0x3d2762(0xcf)](_0x55b87d=>_0x55b87d['apiGroup']?[_0x55b87d[_0x3d2762(0xe8)]]:[]));if(_0x555fd6[_0x3d2762(0xd4)]===0x0)continue;if(_0x555fd6[_0x3d2762(0xd4)]>0x1||_0x272362[_0x3d2762(0xda)](_0x57c6c7=>!_0x57c6c7['apiGroup'])){const _0x46d4b3=_0x272362[_0x3d2762(0xd8)](_0x21ecdf=>_0x21ecdf[_0x3d2762(0xdb)]['name'])['join'](',\x20');throw CliErrors[_0x3d2762(0xea)](_0x3d2762(0xcb)+_0x272362[0x0][_0x3d2762(0xd3)]+_0x3d2762(0xe1),_0x3d2762(0xdc)+_0x46d4b3+_0x3d2762(0xe5));}}return _0x24c93d;}export function getRegistryGroup(_0x23eed0,_0x1690cc){const _0x86b3d1=a1_0x384527;if(_0x1690cc[_0x86b3d1(0xe8)])return _0x23eed0['filter'](_0x60f184=>_0x60f184[_0x86b3d1(0xe8)]===_0x1690cc[_0x86b3d1(0xe8)]);const _0x36d714=_0x23eed0[_0x86b3d1(0xe4)](_0x256a06=>_0x256a06[_0x86b3d1(0xd9)]===_0x1690cc[_0x86b3d1(0xd9)]);return _0x36d714[_0x86b3d1(0xe0)]===0x1?_0x36d714:undefined;}function a1_0xed4d(){const _0x58cd17=['size','1IpXAHN','3426ouqKTy','24UVZKOR','map','normalizedApiDir','some','app','Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20','95292KJMUhm','3033660bIVlIr','3220161BrOXkB','length','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','cwd','9030AhlWIE','filter','.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.','Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.','values','apiGroup','721511eIHImg','validation','1254960XgwjRR','API\x20group\x20\x22','get','resolve','API\x20directory\x20\x22','\x22\x20resolves\x20to\x20multiple\x20API\x20directories.','add','187gLJlKC','flatMap','trim','2090736cmfhzl','1310klPXTF','outputDir'];a1_0xed4d=function(){return _0x58cd17;};return a1_0xed4d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a2_0x152e(_0x1d0587,_0x45c321){_0x1d0587=_0x1d0587-0x168;var _0x366112=a2_0x3661();var _0x152ed6=_0x366112[_0x1d0587];return _0x152ed6;}(function(_0x32576b,_0x216800){var _0x56e95e=a2_0x152e,_0x332278=_0x32576b();while(!![]){try{var _0x12f709=parseInt(_0x56e95e(0x16e))/0x1+-parseInt(_0x56e95e(0x16c))/0x2+parseInt(_0x56e95e(0x168))/0x3+-parseInt(_0x56e95e(0x169))/0x4+parseInt(_0x56e95e(0x16b))/0x5*(-parseInt(_0x56e95e(0x16a))/0x6)+-parseInt(_0x56e95e(0x171))/0x7*(-parseInt(_0x56e95e(0x16f))/0x8)+-parseInt(_0x56e95e(0x16d))/0x9*(parseInt(_0x56e95e(0x170))/0xa);if(_0x12f709===_0x216800)break;else _0x332278['push'](_0x332278['shift']());}catch(_0x16c416){_0x332278['push'](_0x332278['shift']());}}}(a2_0x3661,0x8e9af));function a2_0x3661(){var _0x3ea6d4=['4098984iJyJBh','5bPCOvG','337390lrEkrm','18oyqcDN','973825roTWhd','236576IeABGg','1833400HTFPnW','112xCDtJP','2115654wwzDng','1398180jTFVuV'];a2_0x3661=function(){return _0x3ea6d4;};return a2_0x3661();}export{fetchModelList}from'../core/api-client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xe721fb,_0x72db83){const _0x3db674=a3_0x118a,_0x584d7c=_0xe721fb();while(!![]){try{const _0x2c1cf7=-parseInt(_0x3db674(0x14e))/0x1+parseInt(_0x3db674(0x151))/0x2*(-parseInt(_0x3db674(0x150))/0x3)+-parseInt(_0x3db674(0x163))/0x4*(parseInt(_0x3db674(0x15b))/0x5)+-parseInt(_0x3db674(0x160))/0x6+-parseInt(_0x3db674(0x147))/0x7+parseInt(_0x3db674(0x177))/0x8+parseInt(_0x3db674(0x15c))/0x9;if(_0x2c1cf7===_0x72db83)break;else _0x584d7c['push'](_0x584d7c['shift']());}catch(_0x1647a7){_0x584d7c['push'](_0x584d7c['shift']());}}}(a3_0x362d,0xc7684));import a3_0x3f42b3 from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';function a3_0x118a(_0x2dd525,_0x136d56){_0x2dd525=_0x2dd525-0x146;const _0x362d53=a3_0x362d();let _0x118af2=_0x362d53[_0x2dd525];return _0x118af2;}import a3_0x304341 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';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';function a3_0x362d(){const _0x31561d=['toUpperCase','preserved','refreshed','format','init-api','LOVRABET_RUNTIME_DOMAIN','1449550oVIIBp','stringify','6RxiGxR','535960mWtiWg',',\x20env:\x20','\x20config\x20set\x20app\x20<value>`','APP_','tableName','-api','datasetCode','api.ts.tpl','test','allowEmptyModelReplacement','458840FRAFwj','45558990ZcJKZt','default','join','includes','6038022lbMKhT','alias','length','60dzHlYU','CONFIG_NAMES.DEFAULT','replace','Please\x20configure\x20app\x20code\x20first\x20via\x20`','api','Model\x20facts\x20refreshed.','.ts','-client','created','resolve','defaultName','LOVRABET','name','dirname','key','typescript','success','utf8','existed','action','9619584iinTab','overwritten','replaceApiContent','path','modelRuntime','missing',',\x20...LOVRABET_SDK_CONFIG\x20}','\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.','client.ts.tpl','client','basename','modelProfile','7555933NqUtOC'];a3_0x362d=function(){return _0x31561d;};return a3_0x362d();}import{renderModelRegistryScaffold}from'../api/model-registry-scaffold.js';function fileAction(_0x34798d,_0x5c6824){const _0x45b5a7=a3_0x118a;if(!_0x5c6824)return _0x34798d?_0x45b5a7(0x149):_0x45b5a7(0x17c);return _0x34798d?_0x45b5a7(0x178):_0x45b5a7(0x16b);}export async function generateApiFile(_0x569198,_0x44d652,_0x41b6e8,_0x244e85,_0x176903,_0x559806,_0x216688,_0x5b39dc={},_0x87a278={}){const _0x4cc54c=a3_0x118a;if(!_0x41b6e8)throw new Error(_0x4cc54c(0x166)+CLI_BIN_NAME+_0x4cc54c(0x153));const _0x2d0cc1=_0x244e85&&!_0x216688,_0x3cd23f=!!_0x87a278[_0x4cc54c(0x146)],_0x930a87=_0x3cd23f||_0x2d0cc1,_0x5d0bcf=_0x216688||_0x41b6e8,_0x1dd685=_0x3cd23f||_0x2d0cc1?_0x4cc54c(0x15d):_0x5d0bcf,_0x19ed80=_0x3cd23f||_0x2d0cc1?_0x4cc54c(0x164):JSON[_0x4cc54c(0x14f)](_0x5d0bcf),_0x3cc07e=!isProduction(_0x176903),_0x67d561=_0x3cc07e?_0x4cc54c(0x152)+JSON[_0x4cc54c(0x14f)](_0x176903):'',_0x3d5a84='{\x20apiConfigName:\x20'+_0x19ed80+_0x67d561+_0x4cc54c(0x17d),_0xa47368=_0x3cd23f?'':_0x44d652,_0x134880=_0xa47368?_0xa47368+_0x4cc54c(0x156):_0x4cc54c(0x167),_0x329f74=_0xa47368?_0xa47368+_0x4cc54c(0x16a):_0x4cc54c(0x180),_0x8eee87=_0xa47368&&!/^app-[a-f0-9]+$/i['test'](_0xa47368)?_0xa47368[_0x4cc54c(0x165)](/-/g,'_')[_0x4cc54c(0x148)]():_0x4cc54c(0x16e),_0x79fca4=/^\d/[_0x4cc54c(0x159)](_0x8eee87)?_0x4cc54c(0x154)+_0x8eee87:_0x8eee87,_0x5abf97=_0x569198['map'](_0x191612=>({'datasetCode':_0x191612[_0x4cc54c(0x157)],'tableName':_0x191612[_0x4cc54c(0x155)],'name':_0x191612[_0x4cc54c(0x16f)]||'','alias':_0x191612['alias']||_0x191612[_0x4cc54c(0x171)]})),_0x333e24=fileURLToPath(import.meta.url),_0x372452=a3_0x304341[_0x4cc54c(0x16c)](a3_0x304341[_0x4cc54c(0x170)](_0x333e24),'../..'),_0x3c7989=a3_0x304341[_0x4cc54c(0x15e)](_0x372452,'templates/generate-api'),_0x15e4ef=a3_0x304341[_0x4cc54c(0x15e)](_0x3c7989,_0x4cc54c(0x158)),_0x3e88a3=a3_0x304341['join'](_0x3c7989,_0x4cc54c(0x17f)),_0x41316c=_0x559806;mkdirSync(_0x41316c,{'recursive':!![]});const _0x321354=_0x3cd23f?{}:_0x5b39dc,_0x323aaf=await generateSdkConfigFile(_0x41316c,_0x321354,_0xa47368),_0x36f20d=a3_0x304341['basename'](_0x323aaf,_0x4cc54c(0x169)),_0x394cd2=a3_0x304341[_0x4cc54c(0x15e)](_0x41316c,_0x134880+_0x4cc54c(0x169)),_0x3c3da6=a3_0x304341[_0x4cc54c(0x15e)](_0x41316c,_0x329f74+'.ts'),_0xed6f4a=_0x87a278['overwriteTypescript']===!![],_0x21bf6b=existsSync(_0x394cd2),_0x23eea8=existsSync(_0x3c3da6),_0x34eecd=_0x87a278['scaffoldMode']??(_0xed6f4a?_0x4cc54c(0x165):_0x4cc54c(0x17c)),_0x5f4258=_0x34eecd===_0x4cc54c(0x165)||_0x34eecd==='missing'&&!_0x21bf6b,_0x6e5dd1=_0x34eecd===_0x4cc54c(0x165)||_0x34eecd===_0x4cc54c(0x17c)&&!_0x23eea8,_0x428e26=_0x87a278[_0x4cc54c(0x146)]?updateModelRegistry({'outputDir':_0x41316c,'profileName':_0x87a278[_0x4cc54c(0x146)][_0x4cc54c(0x16f)],'defaultProfile':_0x87a278[_0x4cc54c(0x146)][_0x4cc54c(0x16d)],'appCode':_0x41b6e8,'runtimeDomain':_0x87a278[_0x4cc54c(0x146)]['runtimeDomain'],'models':_0x5abf97,'allowEmptyReplacement':_0x87a278[_0x4cc54c(0x15a)]===!![]}):undefined,_0x537802=_0x428e26?a3_0x304341[_0x4cc54c(0x15e)](_0x41316c,MODEL_RUNTIME_FILE_NAME):undefined,_0x37cdac=_0x537802?existsSync(_0x537802):![],_0x3bba10=_0x3cd23f&&_0x34eecd!=='none'?await renderModelRegistryScaffold(_0x41316c):undefined;_0x537802&&_0x3bba10&&writeFileSync(_0x537802,_0x3bba10[_0x4cc54c(0x17b)],'utf8');const _0x3e170f=_0x5abf97[0x0]?.[_0x4cc54c(0x161)];if(_0x5f4258){const _0x4f4c31=_0x3bba10?.[_0x4cc54c(0x167)]??readFileSync(_0x15e4ef,_0x4cc54c(0x174)),_0x2bffe8=_0x3cd23f?_0x4f4c31:TemplateReplacer[_0x4cc54c(0x179)](_0x4f4c31,_0x41b6e8,_0x5abf97,_0x3e170f,_0x134880,_0x19ed80,undefined,_0x79fca4);writeFileSync(_0x394cd2,await a3_0x3f42b3['format'](_0x2bffe8,{'parser':'typescript'}),{'encoding':'utf8'});}if(_0x6e5dd1){const _0x13014a=_0x3bba10?.['client']??readFileSync(_0x3e88a3,'utf8'),_0x8485f5=_0x3cd23f?_0x13014a:TemplateReplacer[_0x4cc54c(0x179)](_0x13014a,_0x41b6e8,_0x5abf97,_0x3e170f,_0x134880,_0x19ed80,_0x3d5a84,_0x79fca4,_0x36f20d);writeFileSync(_0x3c3da6,await a3_0x3f42b3[_0x4cc54c(0x14b)](_0x8485f5,{'parser':_0x4cc54c(0x172)}),{'encoding':_0x4cc54c(0x174)});}const _0x2a2cb2=_0x5abf97[_0x4cc54c(0x162)],_0x540429={'api':{'path':_0x394cd2,'action':fileAction(_0x21bf6b,_0x5f4258)},'client':{'path':_0x3c3da6,'action':fileAction(_0x23eea8,_0x6e5dd1)},'sdkConfig':{'path':_0x323aaf,'action':'refreshed'},..._0x428e26?{'modelRegistry':{'path':_0x428e26['path'],'action':_0x428e26[_0x4cc54c(0x175)]?_0x4cc54c(0x14a):_0x4cc54c(0x16b)},'modelRuntime':{'path':_0x537802,'action':_0x3bba10?_0x37cdac?_0x4cc54c(0x14a):_0x4cc54c(0x16b):_0x37cdac?'preserved':_0x4cc54c(0x17c)}}:{}},_0xf1de9=existsSync(_0x394cd2)&&readFileSync(_0x394cd2,'utf8')[_0x4cc54c(0x15f)](MODEL_REGISTRY_FILE_NAME['replace'](_0x4cc54c(0x169),'')),_0x1d3b65=existsSync(_0x3c3da6)&&readFileSync(_0x3c3da6,_0x4cc54c(0x174))[_0x4cc54c(0x15f)](_0x4cc54c(0x14d)),_0x5dc170=_0x3cd23f?!_0xf1de9||!_0x1d3b65||!existsSync(_0x537802):![],_0x302fb1=_0x3cd23f?_0x5dc170:_0x540429[_0x4cc54c(0x167)]['action']==='preserved'||_0x540429['client'][_0x4cc54c(0x176)]===_0x4cc54c(0x149);return logger[_0x4cc54c(0x173)](_0x4cc54c(0x14c),_0x302fb1?a3_0x304341[_0x4cc54c(0x181)](_0x323aaf)+_0x4cc54c(0x17e):_0x3cd23f?_0x4cc54c(0x168):'API\x20scaffold\x20written.',undefined,{'apiFile':_0x394cd2,'clientFile':_0x3c3da6,'sdkConfig':_0x323aaf,'modelCount':_0x2a2cb2,'configName':_0x1dd685,'isDefaultConfig':_0x930a87,'needsAgentMerge':_0x302fb1,'needsProjectUpgrade':_0x5dc170,'files':_0x540429}),{'appCode':_0x41b6e8,'modelCount':_0x2a2cb2,'models':_0x5abf97,'apiFilePath':_0x394cd2,'clientFilePath':_0x3c3da6,'sdkConfigPath':_0x323aaf,'modelRegistryPath':_0x428e26?.[_0x4cc54c(0x17a)],'modelRuntimePath':_0x537802,'modelProfile':_0x87a278['modelProfile']?.[_0x4cc54c(0x16f)],'configName':_0x1dd685,'isDefaultConfig':_0x930a87,'sdkRouting':_0x321354,'files':_0x540429,'needsAgentMerge':_0x302fb1,'needsProjectUpgrade':_0x5dc170};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a4_0x2b49b7=a4_0x5f54;(function(_0x31d71f,_0xf88510){const _0x335690=a4_0x5f54,_0x51529d=_0x31d71f();while(!![]){try{const _0x4374aa=parseInt(_0x335690(0x14f))/0x1+parseInt(_0x335690(0x14e))/0x2+parseInt(_0x335690(0x161))/0x3+parseInt(_0x335690(0x154))/0x4+parseInt(_0x335690(0x157))/0x5+-parseInt(_0x335690(0x15d))/0x6*(parseInt(_0x335690(0x152))/0x7)+-parseInt(_0x335690(0x159))/0x8;if(_0x4374aa===_0xf88510)break;else _0x51529d['push'](_0x51529d['shift']());}catch(_0x1b781b){_0x51529d['push'](_0x51529d['shift']());}}}(a4_0x518d,0x57b90));import{mkdirSync,writeFileSync}from'node:fs';import a4_0x55a06d from'node:path';function a4_0x518d(){const _0x3cc3ac=['1396910sDEvRw','/**\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','9540120gWbSup','sdk-config.ts','join','length','31686bTcCOa','stringify','{\x0a\x20\x20','runtimeDomain:\x20','1020255wFMDjF','722970cTVEcA','681036sHmETX','-sdk-config.ts','\x20as\x20const;\x0a','329quKJkT','runtimeDomain','552184tNZcyb','push','typescript'];a4_0x518d=function(){return _0x3cc3ac;};return a4_0x518d();}function a4_0x5f54(_0x25d196,_0x1fa362){_0x25d196=_0x25d196-0x14e;const _0x518d21=a4_0x518d();let _0x5f5409=_0x518d21[_0x25d196];return _0x5f5409;}import a4_0x387fef from'prettier';export const SDK_CONFIG_FILE_NAME=a4_0x2b49b7(0x15a);export function getSdkConfigFileName(_0x2b40a8=''){const _0xfa0964=a4_0x2b49b7;return _0x2b40a8?_0x2b40a8+_0xfa0964(0x150):SDK_CONFIG_FILE_NAME;}export async function generateSdkConfigFile(_0x5317f7,_0x1e089f={},_0x4a39cf=''){const _0x429123=a4_0x2b49b7,_0x1089c9=[];_0x1e089f[_0x429123(0x153)]&&_0x1089c9[_0x429123(0x155)](_0x429123(0x160)+JSON[_0x429123(0x15e)](_0x1e089f[_0x429123(0x153)]));const _0x219e4b=_0x1089c9[_0x429123(0x15c)]>0x0?_0x429123(0x15f)+_0x1089c9['join'](',\x0a\x20\x20')+',\x0a}':'{}',_0x507cc6=_0x429123(0x158)+_0x219e4b+_0x429123(0x151);mkdirSync(_0x5317f7,{'recursive':!![]});const _0xd634f1=a4_0x55a06d[_0x429123(0x15b)](_0x5317f7,getSdkConfigFileName(_0x4a39cf));return writeFileSync(_0xd634f1,await a4_0x387fef['format'](_0x507cc6,{'parser':_0x429123(0x156)}),'utf8'),_0xd634f1;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3cbdb3,_0x65b9cc){const _0x33db8c=a5_0x53dd,_0xe6b1d0=_0x3cbdb3();while(!![]){try{const _0x5512ce=-parseInt(_0x33db8c(0xdb))/0x1*(parseInt(_0x33db8c(0xd7))/0x2)+parseInt(_0x33db8c(0xe7))/0x3+-parseInt(_0x33db8c(0xdf))/0x4*(-parseInt(_0x33db8c(0xe3))/0x5)+parseInt(_0x33db8c(0xd8))/0x6+-parseInt(_0x33db8c(0xe5))/0x7+-parseInt(_0x33db8c(0xdd))/0x8+-parseInt(_0x33db8c(0xe0))/0x9*(-parseInt(_0x33db8c(0xe4))/0xa);if(_0x5512ce===_0x65b9cc)break;else _0xe6b1d0['push'](_0xe6b1d0['shift']());}catch(_0x4a7cd8){_0xe6b1d0['push'](_0xe6b1d0['shift']());}}}(a5_0x3c84,0x9e797));export function parseLegacyApiModels(_0x318a35){const _0x345dcc=a5_0x53dd,_0x278fb2=[],_0x3219e3=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x129b83;while((_0x129b83=_0x3219e3['exec'](_0x318a35))!==null){_0x278fb2[_0x345dcc(0xd0)]({'datasetCode':_0x129b83[0x1],'tableName':_0x129b83[0x2],'name':_0x129b83[0x3],'alias':_0x129b83[0x4]});}return _0x278fb2;}function a5_0x53dd(_0x3b04cf,_0xa37d66){_0x3b04cf=_0x3b04cf-0xcf;const _0x3c8492=a5_0x3c84();let _0x53dd2a=_0x3c8492[_0x3b04cf];return _0x53dd2a;}function a5_0x3c84(){const _0xa45daa=['16sUalVE','3222qzPiNW','Generated\x20by\x20Rabetbase\x20CLI','replace','793235PwmFgf','45470mdSHgm','8611701gtdnjZ','endsWith','805305fwVlTy','APP_CODE','push','@lovrabet/sdk','includes','lovrabetClient','length','matchAll','registerModels','284846QEmhhQ','3160698sASagL','map','test','6ZxoKyT','some','2589920clMbSf','match'];a5_0x3c84=function(){return _0xa45daa;};return a5_0x3c84();}export function parseLegacyApiAppCode(_0x4b4e87){const _0x148863=a5_0x53dd;return _0x4b4e87[_0x148863(0xde)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function stripComments(_0x1b7cec){const _0x59ca8a=a5_0x53dd;return _0x1b7cec[_0x59ca8a(0xe2)](/\/\*[\s\S]*?\*\//g,'')['replace'](/\/\/.*$/gm,'');}export function isLegacyGeneratedApiScaffold(_0xbc1b0f){const _0x12a0bb=a5_0x53dd;if(!_0xbc1b0f['includes'](_0x12a0bb(0xe1)))return![];const _0x13620f=stripComments(_0xbc1b0f),_0x2ea374=[..._0x13620f[_0x12a0bb(0xd5)](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)][_0x12a0bb(0xd9)](_0x29690b=>_0x29690b[0x1]);if(_0x2ea374[_0x12a0bb(0xd4)]!==0x1||_0x2ea374[0x0]!=='@lovrabet/sdk')return![];const _0x3c7f98=[..._0x13620f['matchAll'](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)]['map'](_0x2318dc=>_0x2318dc[0x1]);if(_0x3c7f98[_0x12a0bb(0xd4)]!==0x2||!_0x3c7f98['some'](_0x229784=>_0x229784[_0x12a0bb(0xe6)](_0x12a0bb(0xcf)))||!_0x3c7f98['some'](_0x508712=>_0x508712[_0x12a0bb(0xe6)]('MODELS_CONFIG')))return![];const _0xc765e7=[..._0x13620f[_0x12a0bb(0xd5)](/^([A-Za-z_$][\w$]*)\s*\(/gm)][_0x12a0bb(0xd9)](_0xdd6486=>_0xdd6486[0x1]);return _0xc765e7[_0x12a0bb(0xd4)]===0x1&&_0xc765e7[0x0]===_0x12a0bb(0xd6);}export function isLegacyGeneratedClientScaffold(_0x173432){const _0x1802b3=a5_0x53dd;if(!_0x173432[_0x1802b3(0xd2)](_0x1802b3(0xe1)))return![];const _0x354636=stripComments(_0x173432),_0x29a992=[..._0x354636[_0x1802b3(0xd5)](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)][_0x1802b3(0xd9)](_0x52573b=>_0x52573b[0x1]);if(_0x29a992[_0x1802b3(0xdc)](_0x1f203a=>_0x1f203a!==_0x1802b3(0xd1)&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/[_0x1802b3(0xda)](_0x1f203a??'')))return![];const _0xd06445=[..._0x354636[_0x1802b3(0xd5)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x1802b3(0xd9)](_0x2fde20=>_0x2fde20[0x1]);return _0xd06445[_0x1802b3(0xd4)]===0x1&&_0xd06445[0x0]===_0x1802b3(0xd3);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x27ab91=a6_0xac6b;(function(_0x364a0b,_0x25e149){const _0x11a0cf=a6_0xac6b,_0xa6c66=_0x364a0b();while(!![]){try{const _0x4e44e7=-parseInt(_0x11a0cf(0xfc))/0x1+-parseInt(_0x11a0cf(0xbf))/0x2*(-parseInt(_0x11a0cf(0xf8))/0x3)+parseInt(_0x11a0cf(0xf5))/0x4+parseInt(_0x11a0cf(0xf0))/0x5+-parseInt(_0x11a0cf(0xe8))/0x6*(parseInt(_0x11a0cf(0xe0))/0x7)+-parseInt(_0x11a0cf(0xbd))/0x8*(-parseInt(_0x11a0cf(0xf4))/0x9)+parseInt(_0x11a0cf(0xee))/0xa;if(_0x4e44e7===_0x25e149)break;else _0xa6c66['push'](_0xa6c66['shift']());}catch(_0x399265){_0xa6c66['push'](_0xa6c66['shift']());}}}(a6_0x5950,0x18e4e));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x1c6142 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x27ab91(0xe5);export const MODEL_RUNTIME_FILE_NAME=a6_0x27ab91(0xdb);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x27ab91(0xc6);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x27ab91(0xfa),REGISTRY_START='/*\x20rabetbase-model-registry:start\x20*/',REGISTRY_END=a6_0x27ab91(0xb7);function emptyRegistry(_0x56b052){return{'defaultProfile':_0x56b052,'profiles':{},'models':[]};}function extractRegistryJson(_0x160d1a){const _0x30f653=a6_0x27ab91,_0x467490=_0x160d1a[_0x30f653(0xc1)](REGISTRY_START),_0x22362e=_0x160d1a[_0x30f653(0xc1)](REGISTRY_END);if(_0x467490<0x0||_0x22362e<=_0x467490)return undefined;return _0x160d1a['slice'](_0x467490+REGISTRY_START[_0x30f653(0xe1)],_0x22362e)[_0x30f653(0xc5)]()[_0x30f653(0xe3)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x30f653(0xe3)](/;$/,'');}function migrateLegacyRegistry(_0x5d8830){const _0xb4d186=a6_0x27ab91,_0x21357e=emptyRegistry(_0x5d8830[_0xb4d186(0xea)]);for(const [_0x1a4dd2,_0x14d7b6]of Object[_0xb4d186(0xbb)](_0x5d8830['profiles'])){_0x21357e[_0xb4d186(0xd7)][_0x1a4dd2]={'appCode':_0x14d7b6['appCode'],'runtimeDomain':_0x14d7b6[_0xb4d186(0xce)]},mergeProfileModels(_0x21357e,_0x1a4dd2,_0x14d7b6[_0xb4d186(0xdd)]);}return _0x21357e;}function generatedObjectLiteralToJson(_0x52a7a3){const _0x422a50=a6_0x27ab91;let _0x2d0c87='',_0x9c20db,_0x54509a=![],_0x3628d0;for(let _0x2da1e9=0x0;_0x2da1e9<_0x52a7a3[_0x422a50(0xe1)];_0x2da1e9++){const _0x5c91b5=_0x52a7a3[_0x2da1e9];if(_0x9c20db){_0x2d0c87+=_0x5c91b5;if(_0x54509a)_0x54509a=![];else{if(_0x5c91b5==='\x5c')_0x54509a=!![];else{if(_0x5c91b5===_0x9c20db)_0x9c20db=undefined;}}continue;}if(_0x5c91b5==='\x22'){_0x9c20db=_0x5c91b5,_0x2d0c87+=_0x5c91b5,_0x3628d0=_0x422a50(0xbe);continue;}if(_0x5c91b5===','){let _0x14076a=_0x2da1e9+0x1;while(/\s/[_0x422a50(0xde)](_0x52a7a3[_0x14076a]??''))_0x14076a++;if(_0x52a7a3[_0x14076a]==='}'||_0x52a7a3[_0x14076a]===']')continue;_0x2d0c87+=_0x5c91b5,_0x3628d0=',';continue;}if(_0x5c91b5==='{'||_0x5c91b5==='['){_0x2d0c87+=_0x5c91b5,_0x3628d0=_0x5c91b5;continue;}if(_0x5c91b5==='}'||_0x5c91b5===']'){_0x2d0c87+=_0x5c91b5,_0x3628d0=_0x5c91b5;continue;}if((_0x3628d0==='{'||_0x3628d0===',')&&/[A-Za-z_$]/[_0x422a50(0xde)](_0x5c91b5)){let _0x281d88=_0x2da1e9+0x1;while(/[A-Za-z0-9_$]/['test'](_0x52a7a3[_0x281d88]??''))_0x281d88++;let _0xe52443=_0x281d88;while(/\s/[_0x422a50(0xde)](_0x52a7a3[_0xe52443]??''))_0xe52443++;if(_0x52a7a3[_0xe52443]===':'){_0x2d0c87+=JSON['stringify'](_0x52a7a3[_0x422a50(0xf2)](_0x2da1e9,_0x281d88)),_0x2da1e9=_0x281d88-0x1,_0x3628d0=_0x422a50(0xc7);continue;}}_0x2d0c87+=_0x5c91b5;if(!/\s/[_0x422a50(0xde)](_0x5c91b5)&&_0x5c91b5!==':')_0x3628d0='value';}return _0x2d0c87;}function a6_0xac6b(_0x28f917,_0x4fcd87){_0x28f917=_0x28f917-0xb4;const _0x595025=a6_0x5950();let _0xac6bb5=_0x595025[_0x28f917];return _0xac6bb5;}function parseGeneratedRegistryJson(_0x804d52){const _0x3ae337=a6_0x27ab91;try{return JSON[_0x3ae337(0xf1)](_0x804d52);}catch{return JSON[_0x3ae337(0xf1)](generatedObjectLiteralToJson(_0x804d52));}}function normalizeModelEntries(_0x3b70b2,_0x40c36a){const _0x43d243=a6_0x27ab91,_0x4777ae=Object[_0x43d243(0xe2)](_0x3b70b2),_0x1f2aac=[];for(const _0x1e6bdb of _0x40c36a){if(!_0x1e6bdb||typeof _0x1e6bdb!==_0x43d243(0xdc)||Array[_0x43d243(0xf6)](_0x1e6bdb))return undefined;const _0x177f04=_0x1e6bdb;if(typeof _0x177f04[_0x43d243(0xf7)]!==_0x43d243(0xb5)||typeof _0x177f04[_0x43d243(0xd3)]!==_0x43d243(0xb5)||typeof _0x177f04['name']!=='string')return undefined;let _0x592fe5;if(typeof _0x177f04[_0x43d243(0xd8)]===_0x43d243(0xb5)&&_0x177f04[_0x43d243(0xc4)]===undefined)_0x592fe5=Object[_0x43d243(0xfd)](_0x4777ae['map'](_0x3d21a1=>[_0x3d21a1,_0x177f04['datasetCode']]));else{if(_0x177f04['datasetCode']===undefined&&_0x177f04[_0x43d243(0xc4)]&&typeof _0x177f04['datasetCodes']==='object'&&!Array[_0x43d243(0xf6)](_0x177f04['datasetCodes'])&&Object[_0x43d243(0xe4)](_0x177f04[_0x43d243(0xc4)])[_0x43d243(0xec)](_0x29b777=>typeof _0x29b777===_0x43d243(0xb5)))_0x592fe5={..._0x177f04[_0x43d243(0xc4)]};else return undefined;}_0x1f2aac[_0x43d243(0xd0)]({'alias':_0x177f04[_0x43d243(0xf7)],'tableName':_0x177f04[_0x43d243(0xd3)],'name':_0x177f04[_0x43d243(0xd2)],'datasetCodes':_0x592fe5});}return _0x1f2aac;}export function parseModelRegistry(_0x57a625){const _0x291fc4=a6_0x27ab91,_0x4ffc39=extractRegistryJson(_0x57a625);if(!_0x4ffc39)return undefined;try{const _0x5c1bf8=parseGeneratedRegistryJson(_0x4ffc39);if(typeof _0x5c1bf8[_0x291fc4(0xea)]!==_0x291fc4(0xb5)||!_0x5c1bf8[_0x291fc4(0xd7)]||typeof _0x5c1bf8['profiles']!=='object')return undefined;if(_0x5c1bf8[_0x291fc4(0xf3)]===_0x291fc4(0xed))return migrateLegacyRegistry(_0x5c1bf8);if(!(_0x5c1bf8[_0x291fc4(0xf3)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x5c1bf8[_0x291fc4(0xf3)]===undefined&&_0x57a625[_0x291fc4(0xca)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x291fc4(0xf6)](_0x5c1bf8['models']))return undefined;const _0x17151a=_0x5c1bf8[_0x291fc4(0xd7)],_0x6e748c=normalizeModelEntries(_0x17151a,_0x5c1bf8[_0x291fc4(0xdd)]);if(!_0x6e748c)return undefined;return{'defaultProfile':_0x5c1bf8[_0x291fc4(0xea)],'profiles':_0x17151a,'models':_0x6e748c};}catch{return undefined;}}export function readModelRegistry(_0x3c3a65){if(!existsSync(_0x3c3a65))return undefined;try{return parseModelRegistry(readFileSync(_0x3c3a65,'utf8'));}catch{return undefined;}}function registrySource(_0x432e46){const _0x10a0d1=a6_0x27ab91,_0x1f9f9f=Object[_0x10a0d1(0xe2)](_0x432e46[_0x10a0d1(0xd7)]),_0x1423c1=_0x432e46[_0x10a0d1(0xdd)][_0x10a0d1(0xd9)](_0x51e51f=>{const _0x5215b4=_0x10a0d1,_0x29a70b=_0x1f9f9f[_0x5215b4(0xd9)](_0x32515a=>_0x51e51f['datasetCodes'][_0x32515a]),_0x42b117=_0x29a70b[0x0],_0x46f81a=_0x42b117!==undefined&&_0x29a70b[_0x5215b4(0xec)](_0x38e87d=>_0x38e87d===_0x42b117),_0x400d1d={'alias':_0x51e51f['alias'],'tableName':_0x51e51f['tableName'],'name':_0x51e51f[_0x5215b4(0xd2)]};return _0x46f81a?{..._0x400d1d,'datasetCode':_0x42b117}:{..._0x400d1d,'datasetCodes':_0x51e51f[_0x5215b4(0xc4)]};}),_0x1c4284=JSON['stringify']({'defaultProfile':_0x432e46['defaultProfile'],'profiles':_0x432e46[_0x10a0d1(0xd7)],'models':_0x1423c1},null,0x2)['split']('\x0a')['map'](_0x3251d3=>'\x20\x20'+_0x3251d3)[_0x10a0d1(0xcd)]('\x0a');return'/**\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'+MODEL_REGISTRY_VERSION_MARKER+_0x10a0d1(0xba)+REGISTRY_START+'\x0a'+_0x1c4284+_0x10a0d1(0xd6)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x82745e,_0xc6d19a,_0x2368e5){const _0x22ac2b=a6_0x27ab91,_0x3c4c10=_0x2368e5['map'](_0xe10bcc=>({..._0xe10bcc,'alias':_0xe10bcc[_0x22ac2b(0xf7)]||_0xe10bcc[_0x22ac2b(0xd3)]})),_0x5c980c=new Map(),_0x1a9de3=new Map();for(const _0x2bcfff of _0x3c4c10){const _0x28702a=_0x5c980c[_0x22ac2b(0xcf)](_0x2bcfff[_0x22ac2b(0xf7)]);if(_0x28702a&&_0x28702a!==_0x2bcfff[_0x22ac2b(0xd3)])throw new Error(_0x22ac2b(0xd5)+_0x2bcfff['alias']+_0x22ac2b(0xbc)+_0x28702a+'\x22\x20and\x20\x22'+_0x2bcfff['tableName']+_0x22ac2b(0xf9)+_0xc6d19a+'\x22.');const _0x38d270=_0x1a9de3[_0x22ac2b(0xcf)](_0x2bcfff[_0x22ac2b(0xd3)]);if(_0x38d270&&_0x38d270!==_0x2bcfff['alias'])throw new Error(_0x22ac2b(0xef)+_0x2bcfff[_0x22ac2b(0xd3)]+_0x22ac2b(0xb9)+_0x38d270+_0x22ac2b(0xe7)+_0x2bcfff[_0x22ac2b(0xf7)]+_0x22ac2b(0xf9)+_0xc6d19a+'\x22.');_0x5c980c[_0x22ac2b(0xb4)](_0x2bcfff[_0x22ac2b(0xf7)],_0x2bcfff[_0x22ac2b(0xd3)]),_0x1a9de3[_0x22ac2b(0xb4)](_0x2bcfff[_0x22ac2b(0xd3)],_0x2bcfff[_0x22ac2b(0xf7)]);const _0x3e6b4f=_0x82745e[_0x22ac2b(0xdd)][_0x22ac2b(0xb6)](_0x64f400=>_0x64f400[_0x22ac2b(0xf7)]===_0x2bcfff[_0x22ac2b(0xf7)]);if(_0x3e6b4f&&_0x3e6b4f['tableName']!==_0x2bcfff[_0x22ac2b(0xd3)])throw new Error(_0x22ac2b(0xd5)+_0x2bcfff['alias']+_0x22ac2b(0xcb)+_0x3e6b4f[_0x22ac2b(0xd3)]+_0x22ac2b(0xeb)+_0x2bcfff[_0x22ac2b(0xd3)]+_0x22ac2b(0xf9)+_0xc6d19a+'\x22.');const _0x4cf321=_0x82745e[_0x22ac2b(0xdd)][_0x22ac2b(0xb6)](_0x7e4150=>_0x7e4150[_0x22ac2b(0xd3)]===_0x2bcfff[_0x22ac2b(0xd3)]);if(_0x4cf321&&_0x4cf321['alias']!==_0x2bcfff[_0x22ac2b(0xf7)])throw new Error(_0x22ac2b(0xef)+_0x2bcfff[_0x22ac2b(0xd3)]+_0x22ac2b(0xe6)+_0x4cf321[_0x22ac2b(0xf7)]+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x2bcfff[_0x22ac2b(0xf7)]+'\x22\x20in\x20profile\x20\x22'+_0xc6d19a+'\x22.');}for(const _0x16b5d4 of _0x82745e['models']){delete _0x16b5d4[_0x22ac2b(0xc4)][_0xc6d19a];}for(const _0x4616f1 of _0x3c4c10){let _0x5ede2d=_0x82745e[_0x22ac2b(0xdd)][_0x22ac2b(0xb6)](_0x51e21a=>_0x51e21a[_0x22ac2b(0xf7)]===_0x4616f1[_0x22ac2b(0xf7)]);!_0x5ede2d&&(_0x5ede2d={'alias':_0x4616f1[_0x22ac2b(0xf7)],'tableName':_0x4616f1[_0x22ac2b(0xd3)],'name':_0x4616f1[_0x22ac2b(0xd2)],'datasetCodes':{}},_0x82745e['models'][_0x22ac2b(0xd0)](_0x5ede2d)),(_0xc6d19a===_0x82745e['defaultProfile']||!_0x5ede2d[_0x22ac2b(0xc4)][_0x82745e[_0x22ac2b(0xea)]])&&(_0x5ede2d[_0x22ac2b(0xf7)]=_0x4616f1[_0x22ac2b(0xf7)],_0x5ede2d[_0x22ac2b(0xd3)]=_0x4616f1[_0x22ac2b(0xd3)],_0x5ede2d[_0x22ac2b(0xd2)]=_0x4616f1[_0x22ac2b(0xd2)]),_0x5ede2d[_0x22ac2b(0xc4)][_0xc6d19a]=_0x4616f1['datasetCode'];}_0x82745e['models']=_0x82745e[_0x22ac2b(0xdd)]['filter'](_0x42e2e7=>Object[_0x22ac2b(0xe2)](_0x42e2e7[_0x22ac2b(0xc4)])[_0x22ac2b(0xe1)]>0x0);}function a6_0x5950(){const _0x1f9d2f=['now','datasetCodes','trim','/*\x20rabetbase-model-registry:v2\x20*/','key','filter','profileName','includes','\x22\x20maps\x20to\x20table\x20\x22','pid','join','runtimeDomain','get','push','NOT-SET','name','tableName','flatMap','Model\x20alias\x20\x22','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','profiles','datasetCode','map','.tmp','model-runtime.ts','object','models','test','\x22\x20with\x20an\x20empty\x20result.\x20','147oQlmEK','length','keys','replace','values','models.generated.ts','\x22\x20maps\x20to\x20alias\x20\x22','\x22\x20and\x20\x22','30936PLvLmo','allowEmptyReplacement','defaultProfile','\x22\x20in\x20the\x20registry\x20but\x20\x22','every','lovrabet-model-registry/v1','365680pKkgYH','Table\x20\x22','78605wrqkJy','parse','slice','protocol','9thjvqI','496788PrJnFT','isArray','alias','129lgFhFu','\x22\x20in\x20profile\x20\x22','lovrabet-model-registry/v2','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','161093eeKcII','fromEntries','set','string','find','/*\x20rabetbase-model-registry:end\x20*/','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','entries','\x22\x20maps\x20to\x20both\x20\x22','477256MQcbgy','value','6288ZYzrfz','appCode','indexOf','utf8'];a6_0x5950=function(){return _0x1f9d2f;};return a6_0x5950();}function removeUnboundProfiles(_0x491111){const _0x134471=a6_0x27ab91,_0x3fc97d=Object[_0x134471(0xbb)](_0x491111['profiles'])['filter'](([,_0x3c0bd1])=>_0x3c0bd1[_0x134471(0xc0)]===_0x134471(0xd1))['map'](([_0x47a441])=>_0x47a441);if(_0x3fc97d[_0x134471(0xe1)]===0x0)return;for(const _0xca665 of _0x3fc97d){delete _0x491111[_0x134471(0xd7)][_0xca665];for(const _0xac2bcb of _0x491111['models']){delete _0xac2bcb[_0x134471(0xc4)][_0xca665];}}_0x491111[_0x134471(0xdd)]=_0x491111['models'][_0x134471(0xc8)](_0x257292=>Object[_0x134471(0xe2)](_0x257292['datasetCodes'])[_0x134471(0xe1)]>0x0);}export function getProfileModels(_0x5539fa,_0x2ead72){const _0x392294=a6_0x27ab91;return _0x5539fa[_0x392294(0xdd)][_0x392294(0xd4)](_0x27ff91=>{const _0x1fe59e=_0x392294,_0x2623f4=_0x27ff91[_0x1fe59e(0xc4)][_0x2ead72];return _0x2623f4?[{'datasetCode':_0x2623f4,'tableName':_0x27ff91[_0x1fe59e(0xd3)],'name':_0x27ff91[_0x1fe59e(0xd2)],'alias':_0x27ff91[_0x1fe59e(0xf7)]}]:[];});}export function updateModelRegistry(_0x5c945e){const _0x3bd53d=a6_0x27ab91,_0xe3db5a=a6_0x1c6142[_0x3bd53d(0xcd)](_0x5c945e['outputDir'],MODEL_REGISTRY_FILE_NAME),_0x102bc0=existsSync(_0xe3db5a),_0x1edae9=readModelRegistry(_0xe3db5a);if(_0x102bc0&&!_0x1edae9)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x3bd53d(0xfb));const _0x38e10b=_0x1edae9??emptyRegistry(_0x5c945e[_0x3bd53d(0xea)]);if(_0x5c945e['appCode']!=='NOT-SET')removeUnboundProfiles(_0x38e10b);const _0x43f694=_0x1edae9?getProfileModels(_0x1edae9,_0x5c945e[_0x3bd53d(0xc9)])[_0x3bd53d(0xe1)]:0x0;if(_0x43f694>0x0&&_0x5c945e['models'][_0x3bd53d(0xe1)]===0x0&&!_0x5c945e[_0x3bd53d(0xe9)])throw new Error('Refusing\x20to\x20replace\x20'+_0x43f694+'\x20model(s)\x20in\x20profile\x20\x22'+_0x5c945e['profileName']+_0x3bd53d(0xdf)+_0x3bd53d(0xb8));_0x38e10b[_0x3bd53d(0xea)]=_0x5c945e[_0x3bd53d(0xea)],_0x38e10b[_0x3bd53d(0xd7)][_0x5c945e[_0x3bd53d(0xc9)]]={'appCode':_0x5c945e[_0x3bd53d(0xc0)],'runtimeDomain':_0x5c945e[_0x3bd53d(0xce)]},mergeProfileModels(_0x38e10b,_0x5c945e[_0x3bd53d(0xc9)],_0x5c945e[_0x3bd53d(0xdd)]),mkdirSync(_0x5c945e['outputDir'],{'recursive':!![]});const _0x3f5315=_0xe3db5a+'.'+process[_0x3bd53d(0xcc)]+'.'+Date[_0x3bd53d(0xc3)]()+_0x3bd53d(0xda);try{writeFileSync(_0x3f5315,registrySource(_0x38e10b),{'encoding':_0x3bd53d(0xc2),'mode':0x1a4}),renameSync(_0x3f5315,_0xe3db5a);}catch(_0x4c31d8){try{unlinkSync(_0x3f5315);}catch{}throw _0x4c31d8;}return{'path':_0xe3db5a,'registry':_0x38e10b,'existed':_0x102bc0};}
|
|
1
|
+
const a6_0x4fd231=a6_0x511e;(function(_0x1abb0a,_0x498730){const _0x50cc29=a6_0x511e,_0x5f20c7=_0x1abb0a();while(!![]){try{const _0x2d2441=-parseInt(_0x50cc29(0x16d))/0x1*(-parseInt(_0x50cc29(0x18e))/0x2)+-parseInt(_0x50cc29(0x1a5))/0x3*(parseInt(_0x50cc29(0x177))/0x4)+parseInt(_0x50cc29(0x170))/0x5*(-parseInt(_0x50cc29(0x188))/0x6)+parseInt(_0x50cc29(0x1a4))/0x7+-parseInt(_0x50cc29(0x159))/0x8+-parseInt(_0x50cc29(0x16c))/0x9*(parseInt(_0x50cc29(0x184))/0xa)+parseInt(_0x50cc29(0x163))/0xb*(parseInt(_0x50cc29(0x195))/0xc);if(_0x2d2441===_0x498730)break;else _0x5f20c7['push'](_0x5f20c7['shift']());}catch(_0x1b5487){_0x5f20c7['push'](_0x5f20c7['shift']());}}}(a6_0x4d95,0x663f6));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x1f936c from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x4fd231(0x176);function a6_0x4d95(){const _0x1a7e17=['split','102618jYBuqy','2enJvaH','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','protocol','1448090ispJCC','Model\x20alias\x20\x22','isArray','pid','NOT-SET','fromEntries','models.generated.ts','33636vcMtKE','Table\x20\x22','trim','join','\x22\x20and\x20\x22','/*\x20rabetbase-model-registry:end\x20*/','datasetCodes','length','\x22\x20in\x20profile\x20\x22','model-runtime.ts','values','/*\x20rabetbase-model-registry:start\x20*/','entries','50XGZmzd','/*\x20rabetbase-model-registry:v2\x20*/','defaultProfile','tableName','12Eilrsq','parse','now','string','object','utf8','405562pfmgBT','Refusing\x20to\x20replace\x20','alias','\x22\x20in\x20the\x20registry\x20but\x20\x22','lovrabet-model-registry/v2','\x22\x20with\x20an\x20empty\x20result.\x20','runtimeDomain','12NDThIN','every','push','get','outputDir','appCode','indexOf','datasetCode','map','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','includes','.tmp','test','\x22\x20maps\x20to\x20both\x20\x22','\x20model(s)\x20in\x20profile\x20\x22','4282222XUYDCd','150JTiKiF','replace','stringify','2580488eXMGjT','keys','find','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','value','name','profileName','\x22\x20maps\x20to\x20alias\x20\x22','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','models','8588305NzEENG','set','profiles','/**\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','slice','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','flatMap','filter'];a6_0x4d95=function(){return _0x1a7e17;};return a6_0x4d95();}export const MODEL_RUNTIME_FILE_NAME=a6_0x4fd231(0x180);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x4fd231(0x185);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x4fd231(0x192),REGISTRY_START=a6_0x4fd231(0x182),REGISTRY_END=a6_0x4fd231(0x17c);function emptyRegistry(_0x257ded){return{'defaultProfile':_0x257ded,'profiles':{},'models':[]};}function extractRegistryJson(_0x165dc7){const _0x29916d=a6_0x4fd231,_0xea8d4a=_0x165dc7[_0x29916d(0x19b)](REGISTRY_START),_0x5e010a=_0x165dc7['indexOf'](REGISTRY_END);if(_0xea8d4a<0x0||_0x5e010a<=_0xea8d4a)return undefined;return _0x165dc7[_0x29916d(0x167)](_0xea8d4a+REGISTRY_START[_0x29916d(0x17e)],_0x5e010a)[_0x29916d(0x179)]()[_0x29916d(0x157)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')['replace'](/;$/,'');}function migrateLegacyRegistry(_0x351ef3){const _0x1b6c25=a6_0x4fd231,_0x15bd1b=emptyRegistry(_0x351ef3['defaultProfile']);for(const [_0x1ff85a,_0x34324c]of Object['entries'](_0x351ef3[_0x1b6c25(0x165)])){_0x15bd1b[_0x1b6c25(0x165)][_0x1ff85a]={'appCode':_0x34324c['appCode'],'runtimeDomain':_0x34324c['runtimeDomain']},mergeProfileModels(_0x15bd1b,_0x1ff85a,_0x34324c[_0x1b6c25(0x162)]);}return _0x15bd1b;}function generatedObjectLiteralToJson(_0x43afcc){const _0x141e7c=a6_0x4fd231;let _0x3be096='',_0x4fd617,_0x158d30=![],_0x1e42d1;for(let _0x3d8593=0x0;_0x3d8593<_0x43afcc[_0x141e7c(0x17e)];_0x3d8593++){const _0x312fa2=_0x43afcc[_0x3d8593];if(_0x4fd617){_0x3be096+=_0x312fa2;if(_0x158d30)_0x158d30=![];else{if(_0x312fa2==='\x5c')_0x158d30=!![];else{if(_0x312fa2===_0x4fd617)_0x4fd617=undefined;}}continue;}if(_0x312fa2==='\x22'){_0x4fd617=_0x312fa2,_0x3be096+=_0x312fa2,_0x1e42d1='value';continue;}if(_0x312fa2===','){let _0x4c9953=_0x3d8593+0x1;while(/\s/['test'](_0x43afcc[_0x4c9953]??''))_0x4c9953++;if(_0x43afcc[_0x4c9953]==='}'||_0x43afcc[_0x4c9953]===']')continue;_0x3be096+=_0x312fa2,_0x1e42d1=',';continue;}if(_0x312fa2==='{'||_0x312fa2==='['){_0x3be096+=_0x312fa2,_0x1e42d1=_0x312fa2;continue;}if(_0x312fa2==='}'||_0x312fa2===']'){_0x3be096+=_0x312fa2,_0x1e42d1=_0x312fa2;continue;}if((_0x1e42d1==='{'||_0x1e42d1===',')&&/[A-Za-z_$]/[_0x141e7c(0x1a1)](_0x312fa2)){let _0x49e390=_0x3d8593+0x1;while(/[A-Za-z0-9_$]/[_0x141e7c(0x1a1)](_0x43afcc[_0x49e390]??''))_0x49e390++;let _0x19901=_0x49e390;while(/\s/[_0x141e7c(0x1a1)](_0x43afcc[_0x19901]??''))_0x19901++;if(_0x43afcc[_0x19901]===':'){_0x3be096+=JSON[_0x141e7c(0x158)](_0x43afcc[_0x141e7c(0x167)](_0x3d8593,_0x49e390)),_0x3d8593=_0x49e390-0x1,_0x1e42d1='key';continue;}}_0x3be096+=_0x312fa2;if(!/\s/['test'](_0x312fa2)&&_0x312fa2!==':')_0x1e42d1=_0x141e7c(0x15d);}return _0x3be096;}function parseGeneratedRegistryJson(_0x524e12){const _0x1bbfc8=a6_0x4fd231;try{return JSON['parse'](_0x524e12);}catch{return JSON[_0x1bbfc8(0x189)](generatedObjectLiteralToJson(_0x524e12));}}function a6_0x511e(_0x1dbce5,_0x3fd3fc){_0x1dbce5=_0x1dbce5-0x157;const _0x4d9595=a6_0x4d95();let _0x511e1e=_0x4d9595[_0x1dbce5];return _0x511e1e;}function normalizeModelEntries(_0x19a165,_0x358c93){const _0x343f0c=a6_0x4fd231,_0x5cb2f4=Object[_0x343f0c(0x15a)](_0x19a165),_0x3e5f8b=[];for(const _0x48cc60 of _0x358c93){if(!_0x48cc60||typeof _0x48cc60!==_0x343f0c(0x18c)||Array['isArray'](_0x48cc60))return undefined;const _0x15fa6e=_0x48cc60;if(typeof _0x15fa6e['alias']!=='string'||typeof _0x15fa6e[_0x343f0c(0x187)]!==_0x343f0c(0x18b)||typeof _0x15fa6e[_0x343f0c(0x15e)]!=='string')return undefined;let _0xd25768;if(typeof _0x15fa6e[_0x343f0c(0x19c)]==='string'&&_0x15fa6e['datasetCodes']===undefined)_0xd25768=Object[_0x343f0c(0x175)](_0x5cb2f4[_0x343f0c(0x19d)](_0x275f72=>[_0x275f72,_0x15fa6e[_0x343f0c(0x19c)]]));else{if(_0x15fa6e['datasetCode']===undefined&&_0x15fa6e[_0x343f0c(0x17d)]&&typeof _0x15fa6e[_0x343f0c(0x17d)]===_0x343f0c(0x18c)&&!Array[_0x343f0c(0x172)](_0x15fa6e[_0x343f0c(0x17d)])&&Object[_0x343f0c(0x181)](_0x15fa6e[_0x343f0c(0x17d)])[_0x343f0c(0x196)](_0x26a9aa=>typeof _0x26a9aa===_0x343f0c(0x18b)))_0xd25768={..._0x15fa6e[_0x343f0c(0x17d)]};else return undefined;}_0x3e5f8b['push']({'alias':_0x15fa6e[_0x343f0c(0x190)],'tableName':_0x15fa6e[_0x343f0c(0x187)],'name':_0x15fa6e[_0x343f0c(0x15e)],'datasetCodes':_0xd25768});}return _0x3e5f8b;}export function parseModelRegistry(_0x47fd9b){const _0x5ea029=a6_0x4fd231,_0x32c379=extractRegistryJson(_0x47fd9b);if(!_0x32c379)return undefined;try{const _0x1e670d=parseGeneratedRegistryJson(_0x32c379);if(typeof _0x1e670d[_0x5ea029(0x186)]!==_0x5ea029(0x18b)||!_0x1e670d[_0x5ea029(0x165)]||typeof _0x1e670d[_0x5ea029(0x165)]!==_0x5ea029(0x18c))return undefined;if(_0x1e670d[_0x5ea029(0x16f)]==='lovrabet-model-registry/v1')return migrateLegacyRegistry(_0x1e670d);if(!(_0x1e670d[_0x5ea029(0x16f)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x1e670d[_0x5ea029(0x16f)]===undefined&&_0x47fd9b[_0x5ea029(0x19f)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x5ea029(0x172)](_0x1e670d[_0x5ea029(0x162)]))return undefined;const _0x20f6e2=_0x1e670d[_0x5ea029(0x165)],_0x3d7a8a=normalizeModelEntries(_0x20f6e2,_0x1e670d['models']);if(!_0x3d7a8a)return undefined;return{'defaultProfile':_0x1e670d[_0x5ea029(0x186)],'profiles':_0x20f6e2,'models':_0x3d7a8a};}catch{return undefined;}}export function readModelRegistry(_0x4e0bb7){const _0x59d6be=a6_0x4fd231;if(!existsSync(_0x4e0bb7))return undefined;try{return parseModelRegistry(readFileSync(_0x4e0bb7,_0x59d6be(0x18d)));}catch{return undefined;}}function registrySource(_0x2392d6){const _0xef328a=a6_0x4fd231,_0x4c96e6=Object['keys'](_0x2392d6[_0xef328a(0x165)]),_0x4fd9b9=_0x2392d6[_0xef328a(0x162)][_0xef328a(0x19d)](_0x8d1685=>{const _0x3d35f5=_0xef328a,_0x295eac=_0x4c96e6['map'](_0x5243a5=>_0x8d1685['datasetCodes'][_0x5243a5]),_0x184fcf=_0x295eac[0x0],_0x37b5e8=_0x184fcf!==undefined&&_0x295eac['every'](_0x5d6fe2=>_0x5d6fe2===_0x184fcf),_0x5585dd={'alias':_0x8d1685[_0x3d35f5(0x190)],'tableName':_0x8d1685[_0x3d35f5(0x187)],'name':_0x8d1685[_0x3d35f5(0x15e)]};return _0x37b5e8?{..._0x5585dd,'datasetCode':_0x184fcf}:{..._0x5585dd,'datasetCodes':_0x8d1685[_0x3d35f5(0x17d)]};}),_0x169156=JSON[_0xef328a(0x158)]({'defaultProfile':_0x2392d6['defaultProfile'],'profiles':_0x2392d6['profiles'],'models':_0x4fd9b9},null,0x2)[_0xef328a(0x16b)]('\x0a')[_0xef328a(0x19d)](_0x16ffde=>'\x20\x20'+_0x16ffde)[_0xef328a(0x17a)]('\x0a');return _0xef328a(0x166)+MODEL_REGISTRY_VERSION_MARKER+_0xef328a(0x19e)+REGISTRY_START+'\x0a'+_0x169156+_0xef328a(0x168)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x35245d,_0x2ef7d2,_0x3b6472){const _0x30cf40=a6_0x4fd231,_0x114487=_0x3b6472['map'](_0x13e419=>({..._0x13e419,'alias':_0x13e419['alias']||_0x13e419['tableName']})),_0x19b40e=new Map(),_0xa3d680=new Map();for(const _0x553544 of _0x114487){const _0xb0a3be=_0x19b40e[_0x30cf40(0x198)](_0x553544[_0x30cf40(0x190)]);if(_0xb0a3be&&_0xb0a3be!==_0x553544[_0x30cf40(0x187)])throw new Error(_0x30cf40(0x171)+_0x553544['alias']+_0x30cf40(0x1a2)+_0xb0a3be+'\x22\x20and\x20\x22'+_0x553544[_0x30cf40(0x187)]+_0x30cf40(0x17f)+_0x2ef7d2+'\x22.');const _0x2da5f4=_0xa3d680[_0x30cf40(0x198)](_0x553544[_0x30cf40(0x187)]);if(_0x2da5f4&&_0x2da5f4!==_0x553544[_0x30cf40(0x190)])throw new Error(_0x30cf40(0x178)+_0x553544[_0x30cf40(0x187)]+_0x30cf40(0x15c)+_0x2da5f4+_0x30cf40(0x17b)+_0x553544[_0x30cf40(0x190)]+_0x30cf40(0x17f)+_0x2ef7d2+'\x22.');_0x19b40e[_0x30cf40(0x164)](_0x553544[_0x30cf40(0x190)],_0x553544[_0x30cf40(0x187)]),_0xa3d680[_0x30cf40(0x164)](_0x553544['tableName'],_0x553544[_0x30cf40(0x190)]);const _0x7828b6=_0x35245d[_0x30cf40(0x162)][_0x30cf40(0x15b)](_0x3138d5=>_0x3138d5[_0x30cf40(0x190)]===_0x553544[_0x30cf40(0x190)]);if(_0x7828b6&&_0x7828b6['tableName']!==_0x553544[_0x30cf40(0x187)])throw new Error('Model\x20alias\x20\x22'+_0x553544[_0x30cf40(0x190)]+'\x22\x20maps\x20to\x20table\x20\x22'+_0x7828b6[_0x30cf40(0x187)]+_0x30cf40(0x191)+_0x553544['tableName']+_0x30cf40(0x17f)+_0x2ef7d2+'\x22.');const _0xa74e72=_0x35245d['models'][_0x30cf40(0x15b)](_0x5e211b=>_0x5e211b[_0x30cf40(0x187)]===_0x553544[_0x30cf40(0x187)]);if(_0xa74e72&&_0xa74e72[_0x30cf40(0x190)]!==_0x553544[_0x30cf40(0x190)])throw new Error(_0x30cf40(0x178)+_0x553544[_0x30cf40(0x187)]+_0x30cf40(0x160)+_0xa74e72[_0x30cf40(0x190)]+_0x30cf40(0x191)+_0x553544[_0x30cf40(0x190)]+_0x30cf40(0x17f)+_0x2ef7d2+'\x22.');}for(const _0x837d88 of _0x35245d[_0x30cf40(0x162)]){delete _0x837d88[_0x30cf40(0x17d)][_0x2ef7d2];}for(const _0x4d6572 of _0x114487){let _0x30230f=_0x35245d[_0x30cf40(0x162)][_0x30cf40(0x15b)](_0x3727c5=>_0x3727c5[_0x30cf40(0x190)]===_0x4d6572[_0x30cf40(0x190)]);!_0x30230f&&(_0x30230f={'alias':_0x4d6572[_0x30cf40(0x190)],'tableName':_0x4d6572[_0x30cf40(0x187)],'name':_0x4d6572[_0x30cf40(0x15e)],'datasetCodes':{}},_0x35245d[_0x30cf40(0x162)][_0x30cf40(0x197)](_0x30230f)),(_0x2ef7d2===_0x35245d[_0x30cf40(0x186)]||!_0x30230f[_0x30cf40(0x17d)][_0x35245d[_0x30cf40(0x186)]])&&(_0x30230f[_0x30cf40(0x190)]=_0x4d6572['alias'],_0x30230f['tableName']=_0x4d6572[_0x30cf40(0x187)],_0x30230f[_0x30cf40(0x15e)]=_0x4d6572[_0x30cf40(0x15e)]),_0x30230f[_0x30cf40(0x17d)][_0x2ef7d2]=_0x4d6572[_0x30cf40(0x19c)];}_0x35245d['models']=_0x35245d[_0x30cf40(0x162)][_0x30cf40(0x16a)](_0x39c2a7=>Object[_0x30cf40(0x15a)](_0x39c2a7[_0x30cf40(0x17d)])[_0x30cf40(0x17e)]>0x0);}function removeUnboundProfiles(_0x4d12cb){const _0x83b247=a6_0x4fd231,_0x6c355e=Object[_0x83b247(0x183)](_0x4d12cb['profiles'])['filter'](([,_0x6eb0dd])=>_0x6eb0dd['appCode']===_0x83b247(0x174))[_0x83b247(0x19d)](([_0x31eaef])=>_0x31eaef);if(_0x6c355e[_0x83b247(0x17e)]===0x0)return;for(const _0x40515a of _0x6c355e){delete _0x4d12cb[_0x83b247(0x165)][_0x40515a];for(const _0x617bbd of _0x4d12cb[_0x83b247(0x162)]){delete _0x617bbd[_0x83b247(0x17d)][_0x40515a];}}_0x4d12cb[_0x83b247(0x162)]=_0x4d12cb[_0x83b247(0x162)][_0x83b247(0x16a)](_0x496e18=>Object[_0x83b247(0x15a)](_0x496e18[_0x83b247(0x17d)])['length']>0x0);}export function getProfileModels(_0x1fbd44,_0xcc8aad){const _0x210e6e=a6_0x4fd231;return _0x1fbd44[_0x210e6e(0x162)][_0x210e6e(0x169)](_0x511495=>{const _0x1d3a18=_0x210e6e,_0x1566ae=_0x511495['datasetCodes'][_0xcc8aad];return _0x1566ae?[{'datasetCode':_0x1566ae,'tableName':_0x511495[_0x1d3a18(0x187)],'name':_0x511495[_0x1d3a18(0x15e)],'alias':_0x511495[_0x1d3a18(0x190)]}]:[];});}export function updateModelRegistry(_0x2197e3){const _0x3a5ecd=a6_0x4fd231,_0x1d5855=a6_0x1f936c['join'](_0x2197e3[_0x3a5ecd(0x199)],MODEL_REGISTRY_FILE_NAME),_0x4c2c6c=existsSync(_0x1d5855),_0x13c4be=readModelRegistry(_0x1d5855);if(_0x4c2c6c&&!_0x13c4be)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x3a5ecd(0x161));const _0x169ca4=_0x13c4be??emptyRegistry(_0x2197e3[_0x3a5ecd(0x186)]);if(_0x2197e3[_0x3a5ecd(0x19a)]!==_0x3a5ecd(0x174))removeUnboundProfiles(_0x169ca4);const _0x3b59a2=_0x13c4be?getProfileModels(_0x13c4be,_0x2197e3[_0x3a5ecd(0x15f)])['length']:0x0;if(_0x3b59a2>0x0&&_0x2197e3[_0x3a5ecd(0x162)][_0x3a5ecd(0x17e)]===0x0&&!_0x2197e3['allowEmptyReplacement'])throw new Error(_0x3a5ecd(0x18f)+_0x3b59a2+_0x3a5ecd(0x1a3)+_0x2197e3[_0x3a5ecd(0x15f)]+_0x3a5ecd(0x193)+_0x3a5ecd(0x16e));_0x169ca4['defaultProfile']=_0x2197e3[_0x3a5ecd(0x186)],_0x169ca4[_0x3a5ecd(0x165)][_0x2197e3['profileName']]={'appCode':_0x2197e3[_0x3a5ecd(0x19a)],'runtimeDomain':_0x2197e3[_0x3a5ecd(0x194)]},mergeProfileModels(_0x169ca4,_0x2197e3['profileName'],_0x2197e3['models']),mkdirSync(_0x2197e3['outputDir'],{'recursive':!![]});const _0x2f3098=_0x1d5855+'.'+process[_0x3a5ecd(0x173)]+'.'+Date[_0x3a5ecd(0x18a)]()+_0x3a5ecd(0x1a0);try{writeFileSync(_0x2f3098,registrySource(_0x169ca4),{'encoding':_0x3a5ecd(0x18d),'mode':0x1a4}),renameSync(_0x2f3098,_0x1d5855);}catch(_0x2728ba){try{unlinkSync(_0x2f3098);}catch{}throw _0x2728ba;}return{'path':_0x1d5855,'registry':_0x169ca4,'existed':_0x4c2c6c};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a7_0x313dcd=a7_0x1851;(function(_0x362bbf,_0x1d2896){const _0x241537=a7_0x1851,_0x23d4f9=_0x362bbf();while(!![]){try{const _0x136ec8=-parseInt(_0x241537(0x16b))/0x1+parseInt(_0x241537(0x16a))/0x2+-parseInt(_0x241537(0x15c))/0x3*(parseInt(_0x241537(0x16d))/0x4)+parseInt(_0x241537(0x15d))/0x5+-parseInt(_0x241537(0x15b))/0x6*(parseInt(_0x241537(0x167))/0x7)+-parseInt(_0x241537(0x156))/0x8+-parseInt(_0x241537(0x168))/0x9*(-parseInt(_0x241537(0x162))/0xa);if(_0x136ec8===_0x1d2896)break;else _0x23d4f9['push'](_0x23d4f9['shift']());}catch(_0x5bc4fb){_0x23d4f9['push'](_0x23d4f9['shift']());}}}(a7_0x50d1,0xb3ca7));import{readFileSync}from'node:fs';import a7_0x524734 from'node:path';import{fileURLToPath}from'node:url';function a7_0x1851(_0x5cb3b7,_0x4b53fb){_0x5cb3b7=_0x5cb3b7-0x156;const _0x50d191=a7_0x50d1();let _0x185175=_0x50d191[_0x5cb3b7];return _0x185175;}import a7_0x26277d from'prettier';function a7_0x50d1(){const _0x20b8b1=['186giwTzE','123stneGC','4138425djHREA','join','utf8','relative','cwd','1349990rBRpLb','../../templates/generate-api','format','resolve','{ProjectRoutingImport}','34818LrPFUA','198rjdXTu','replace','1017494OYThtU','666636prvEJd','startsWith','132524KJXaeQ','11126288Jhidlx','profile-client.ts.tpl','all','profile-api.ts.tpl','typescript'];a7_0x50d1=function(){return _0x20b8b1;};return a7_0x50d1();}import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function relativeImport(_0x33a38b,_0x2c8939){const _0x2898a3=a7_0x1851;let _0x3fb57e=a7_0x524734[_0x2898a3(0x160)](_0x33a38b,_0x2c8939)[_0x2898a3(0x169)](/\\/g,'/');if(!_0x3fb57e[_0x2898a3(0x16c)]('.'))_0x3fb57e='./'+_0x3fb57e;return _0x3fb57e;}export async function renderModelRegistryScaffold(_0x1decdb,_0x2ed0bf=process[a7_0x313dcd(0x161)]()){const _0x579f15=a7_0x313dcd,_0x3a58a0=fileURLToPath(import.meta.url),_0x5841d6=a7_0x524734[_0x579f15(0x165)](a7_0x524734['dirname'](_0x3a58a0),_0x579f15(0x163)),_0xf6e770=relativeImport(a7_0x524734[_0x579f15(0x165)](_0x1decdb),a7_0x524734[_0x579f15(0x165)](_0x2ed0bf,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x2bd9ba=readFileSync(a7_0x524734['join'](_0x5841d6,_0x579f15(0x159)),_0x579f15(0x15f))['replace'](_0x579f15(0x166),_0xf6e770),[_0x32be28,_0x3fc474,_0x2bf66e]=await Promise[_0x579f15(0x158)]([a7_0x26277d[_0x579f15(0x164)](_0x2bd9ba,{'parser':_0x579f15(0x15a)}),a7_0x26277d['format'](readFileSync(a7_0x524734[_0x579f15(0x15e)](_0x5841d6,_0x579f15(0x157)),_0x579f15(0x15f)),{'parser':_0x579f15(0x15a)}),a7_0x26277d[_0x579f15(0x164)](readFileSync(a7_0x524734[_0x579f15(0x15e)](_0x5841d6,'model-runtime.ts.tpl'),'utf8'),{'parser':'typescript'})]);return{'api':_0x32be28,'client':_0x3fc474,'modelRuntime':_0x2bf66e};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a8_0x27dd(){const _0x30ffd8=['profiles','40490LgAtUJ','\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20','appCode','-api.ts','399712CbmyLA','object','16487520JRsMSd','apiDir','join','string','length','defaultApp','16SAdhaY','validation','3RACJlx','402LrcCwK','resolve','9irglzw','apps','find','Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.','defaultProfile','api.ts','1587691roTmMf','`\x20first.','AppCode\x20\x22','cwd','478QhDYil','\x22\x20is\x20missing\x20from\x20','entries','143PavPXv','\x20api\x20pull\x20--app\x20','7477998qbqgwY','422630awHkIz'];a8_0x27dd=function(){return _0x30ffd8;};return a8_0x27dd();}(function(_0x47a8dd,_0x5d68fa){const _0x4a7e86=a8_0x1652,_0x8b6e3b=_0x47a8dd();while(!![]){try{const _0x573da6=-parseInt(_0x4a7e86(0x85))/0x1*(-parseInt(_0x4a7e86(0xa5))/0x2)+-parseInt(_0x4a7e86(0x98))/0x3*(-parseInt(_0x4a7e86(0x8e))/0x4)+-parseInt(_0x4a7e86(0x8a))/0x5*(-parseInt(_0x4a7e86(0x99))/0x6)+parseInt(_0x4a7e86(0xa1))/0x7*(parseInt(_0x4a7e86(0x96))/0x8)+parseInt(_0x4a7e86(0x9b))/0x9*(-parseInt(_0x4a7e86(0x88))/0xa)+parseInt(_0x4a7e86(0x87))/0xb+-parseInt(_0x4a7e86(0x90))/0xc;if(_0x573da6===_0x5d68fa)break;else _0x8b6e3b['push'](_0x8b6e3b['shift']());}catch(_0x2bdf5d){_0x8b6e3b['push'](_0x8b6e3b['shift']());}}}(a8_0x27dd,0x602a4));import{existsSync}from'node:fs';import a8_0x16d12a from'node:path';function a8_0x1652(_0x519bea,_0x10454d){_0x519bea=_0x519bea-0x84;const _0x27dd90=a8_0x27dd();let _0x16526f=_0x27dd90[_0x519bea];return _0x16526f;}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(_0x54450e,_0x535b91,_0x998c3c){const _0x57ea9d=a8_0x1652,_0x54794c=a8_0x16d12a[_0x57ea9d(0x9a)](process[_0x57ea9d(0xa4)](),_0x54450e),_0x2e1912=a8_0x16d12a[_0x57ea9d(0x9a)](_0x54794c,_0x57ea9d(0xa0)),_0x317431=a8_0x16d12a[_0x57ea9d(0x9a)](_0x54794c,MODEL_REGISTRY_FILE_NAME),_0x2b0ed5=readModelRegistry(_0x317431);if(_0x2b0ed5){const _0x826698=_0x535b91?Object['entries'](_0x2b0ed5[_0x57ea9d(0x89)])['filter'](([,_0x3dd3bc])=>_0x3dd3bc[_0x57ea9d(0x8c)]===_0x535b91):[];if(_0x998c3c){if(_0x2b0ed5[_0x57ea9d(0x89)][_0x998c3c])return{'filePath':_0x317431,'profileName':_0x998c3c};if(_0x826698['length']>0x0)throw CliErrors[_0x57ea9d(0x97)]('Model\x20profile\x20\x22'+_0x998c3c+_0x57ea9d(0xa6)+MODEL_REGISTRY_FILE_NAME+'.','Run\x20`'+CLI_BIN_NAME+_0x57ea9d(0x86)+_0x998c3c+_0x57ea9d(0xa2));}else{if(_0x826698[_0x57ea9d(0x94)]===0x1)return{'filePath':_0x317431,'profileName':_0x826698[0x0][0x0]};if(_0x826698[_0x57ea9d(0x94)]>0x1)throw new Error(_0x57ea9d(0xa3)+_0x535b91+_0x57ea9d(0x8b)+_0x826698['map'](([_0x456b90])=>_0x456b90)[_0x57ea9d(0x92)](',\x20')+'.\x20'+_0x57ea9d(0x9e));if(_0x2b0ed5[_0x57ea9d(0x89)][_0x2b0ed5[_0x57ea9d(0x9f)]]&&!_0x535b91)return{'filePath':_0x317431,'profileName':_0x2b0ed5[_0x57ea9d(0x9f)]};}}if(!_0x535b91&&!_0x998c3c)return{'filePath':_0x2e1912};const _0x552f07=readRawConfig(),_0x1855db=_0x552f07[_0x57ea9d(0x9c)]&&typeof _0x552f07[_0x57ea9d(0x9c)]===_0x57ea9d(0x8f)?_0x552f07[_0x57ea9d(0x9c)]:{},_0x59e437=_0x998c3c&&_0x1855db[_0x998c3c]?[_0x998c3c,_0x1855db[_0x998c3c]]:Object[_0x57ea9d(0x84)](_0x1855db)[_0x57ea9d(0x9d)](([,_0x2a9f0e])=>_0x2a9f0e?.['appcode']===_0x535b91);if(!_0x59e437)return{'filePath':_0x2e1912};const [_0x20dde4,_0x54d6c8]=_0x59e437,_0x2e6146=typeof _0x552f07[_0x57ea9d(0x95)]===_0x57ea9d(0x93)?_0x552f07[_0x57ea9d(0x95)]:undefined;if(_0x54d6c8?.[_0x57ea9d(0x91)])return{'filePath':_0x2e1912};if(_0x2e6146&&_0x20dde4!==_0x2e6146){const _0x1f66bf=a8_0x16d12a[_0x57ea9d(0x9a)](_0x54794c,_0x20dde4+_0x57ea9d(0x8d));if(existsSync(_0x1f66bf))return{'filePath':_0x1f66bf};}return{'filePath':_0x2e1912};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a9_0xfd70(){const _0x32d2ce=['*\x20Login\x20successful!','validation','stop','4140387PjIEUF','2SVEthR','39828CgchgE','!\x20Login\x20failed.','6680790pHDtBq','start','4KneGle','101880ukRryc','autoYes','1590126wfbNHD','7007KuxSLE','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','482025jIGCXw','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','2652970JfykEy','log','No\x20valid\x20session.\x20Login\x20now?','102qHfhtl','nonInteractive','931SLPTke','11mUBfJg'];a9_0xfd70=function(){return _0x32d2ce;};return a9_0xfd70();}(function(_0x49fd4e,_0xf4a6d0){const _0x44b0a4=a9_0x4d40,_0xf5d91a=_0x49fd4e();while(!![]){try{const _0x41b607=parseInt(_0x44b0a4(0xa7))/0x1*(-parseInt(_0x44b0a4(0xaf))/0x2)+-parseInt(_0x44b0a4(0xa6))/0x3*(-parseInt(_0x44b0a4(0xac))/0x4)+-parseInt(_0x44b0a4(0x9a))/0x5*(-parseInt(_0x44b0a4(0x9f))/0x6)+-parseInt(_0x44b0a4(0xa1))/0x7*(-parseInt(_0x44b0a4(0xad))/0x8)+-parseInt(_0x44b0a4(0xaa))/0x9+parseInt(_0x44b0a4(0x9c))/0xa*(parseInt(_0x44b0a4(0xa2))/0xb)+parseInt(_0x44b0a4(0xa8))/0xc*(-parseInt(_0x44b0a4(0x98))/0xd);if(_0x41b607===_0xf4a6d0)break;else _0xf5d91a['push'](_0xf5d91a['shift']());}catch(_0x7f05ab){_0xf5d91a['push'](_0xf5d91a['shift']());}}}(a9_0xfd70,0xd1271));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';function a9_0x4d40(_0xe8faab,_0x444cc7){_0xe8faab=_0xe8faab-0x98;const _0xfd700a=a9_0xfd70();let _0x4d4064=_0xfd700a[_0xe8faab];return _0x4d4064;}import{confirm}from'@inquirer/prompts';import a9_0x27a37c from'ora';export async function runAuthServer(_0x30f65b){const _0x41f01c=a9_0x4d40,_0x55d70f=await getIsSessionValid();if(_0x55d70f){console['log'](_0x41f01c(0x9b));return;}if(_0x30f65b?.[_0x41f01c(0xa0)]&&!_0x30f65b[_0x41f01c(0xae)])throw CliErrors[_0x41f01c(0xa4)]('Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','Run\x20`'+CLI_BIN_NAME+_0x41f01c(0x99));const _0x3b8b5c=_0x30f65b?.[_0x41f01c(0xae)]?!![]:await confirm({'message':_0x41f01c(0x9e),'default':!![]});if(!_0x3b8b5c)return;if(_0x30f65b?.[_0x41f01c(0xa0)]){console[_0x41f01c(0x9d)]('Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.');const _0x2535ac=await authServer({'silent':![],'openBrowser':![]});_0x2535ac?console['log'](_0x41f01c(0xa3)):console[_0x41f01c(0x9d)](_0x41f01c(0xa9));return;}const _0x3c1194=a9_0x27a37c('Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.')[_0x41f01c(0xab)](),_0xcbb93d=await authServer({'silent':!![],'openBrowser':!![]});_0x3c1194[_0x41f01c(0xa5)](),_0xcbb93d?console[_0x41f01c(0x9d)]('*\x20Login\x20successful!'):console['log'](_0x41f01c(0xa9));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x1d0111=a10_0x2e26;function a10_0x2e26(_0x37765b,_0x146b04){_0x37765b=_0x37765b-0x17d;const _0x46c02e=a10_0x46c0();let _0x2e2616=_0x46c02e[_0x37765b];return _0x2e2616;}(function(_0x34f66c,_0x4699fd){const _0x17f7df=a10_0x2e26,_0x2fe213=_0x34f66c();while(!![]){try{const _0x2de513=parseInt(_0x17f7df(0x1a4))/0x1+parseInt(_0x17f7df(0x17f))/0x2*(-parseInt(_0x17f7df(0x1a1))/0x3)+-parseInt(_0x17f7df(0x189))/0x4+-parseInt(_0x17f7df(0x18e))/0x5+-parseInt(_0x17f7df(0x19b))/0x6*(-parseInt(_0x17f7df(0x191))/0x7)+-parseInt(_0x17f7df(0x18a))/0x8*(-parseInt(_0x17f7df(0x190))/0x9)+parseInt(_0x17f7df(0x195))/0xa;if(_0x2de513===_0x4699fd)break;else _0x2fe213['push'](_0x2fe213['shift']());}catch(_0x21debf){_0x2fe213['push'](_0x2fe213['shift']());}}}(a10_0x46c0,0x3c5cc));import{writeFileSync}from'node:fs';function a10_0x46c0(){const _0x2b980f=['win32','3942009DmjcMO','14ZOEKjj','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','close','writeHead','4176080pIfOEp','platform','utf-8','darwin','isAuth','open\x20\x22','775230PBXrTj','silent','text/html;\x20charset=utf-8','!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','local','/cert/lovrabet-dev.json','9zwPJXQ','🔐\x20Starting\x20login\x20service...','listen','18585bfcbcQ','lovrabet','port','127.0.0.1','error','session','certificateUrl','log','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','user','120804ocrQzf','/api/auth/get-session','end','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','then','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','cookie','headers','origin','address','1779432XMftpt','8PRaGLl','json','createServer','openBrowser','1296480GfmJtm'];a10_0x46c0=function(){return _0x2b980f;};return a10_0x46c0();}import a10_0x3935ec from'node:http';import a10_0x294a17 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(_0x485a19){const _0x20fc93=a10_0x2e26;if(!_0x485a19)return getProjectDomainRoutingManifest()[_0x20fc93(0x19f)];const _0x444653=getOfficialRoutingProfile(_0x485a19),_0x4daffe=getOfficialRoutingCdn(_0x485a19);return{'origin':_0x444653[_0x20fc93(0x19f)]['origin'],'certificateUrl':_0x4daffe[_0x20fc93(0x1a5)]+_0x20fc93(0x1a0)};}function withPort(_0x1cb047,_0x3d10fa){const _0x446163=a10_0x2e26,_0x581722=new URL(_0x1cb047);return _0x581722[_0x446163(0x1a6)]=String(_0x3d10fa),_0x581722[_0x446163(0x187)];}export async function authServer(_0x4c8bea){const _0x4a1458=a10_0x2e26,_0x2902f0=_0x4c8bea?.[_0x4a1458(0x19c)]||![],_0x74fe3a=_0x4c8bea?.[_0x4a1458(0x18d)]??!![],_0x1c6660=_0x4c8bea?.['timeoutMs']??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x46906a=resolveAuthCallbackRouting(),_0x457aec=_0x46906a[_0x4a1458(0x1aa)]?await(await fetch(_0x46906a[_0x4a1458(0x1aa)]))[_0x4a1458(0x18b)]():undefined;return new Promise(async(_0x34a2f5,_0x5c0f7f)=>{const _0x544422=_0x4a1458;let _0xf1e755=0x0,_0x5ca872=![],_0x4eec8c;const _0x3f0eb4=async(_0x24539a,_0xea72cc)=>{const _0x31a15f=a10_0x2e26,_0x1e7328=getUserDomain(),_0x2a6b65=_0x24539a[_0x31a15f(0x186)][_0x31a15f(0x185)]||'',_0x2383a2=await fetch(_0x1e7328+_0x31a15f(0x180),{'headers':{'cookie':_0x2a6b65}})[_0x31a15f(0x183)](_0x22dbd7=>_0x22dbd7['json']()),_0x301cfd=_0x2383a2&&_0x2383a2[_0x31a15f(0x1a9)]&&_0x2383a2[_0x31a15f(0x17e)];if(_0x301cfd){writeFileSync(cookieFile,_0x2a6b65,_0x31a15f(0x197));const _0x20c1ce=buildLoginSuccessHtml();_0xea72cc[_0x31a15f(0x194)](0xc8,{'Content-Type':_0x31a15f(0x19d)}),_0xea72cc[_0x31a15f(0x181)](_0x20c1ce),_0x3a0ab6(!![]);}else{const _0x398245=encodeURIComponent(withPort(_0x46906a[_0x31a15f(0x187)],_0xf1e755));_0xea72cc['writeHead'](0x12e,{'location':_0x1e7328+'/sign-in?redirect='+_0x398245}),_0xea72cc[_0x31a15f(0x181)]();return;}},_0x5ad161=_0x457aec?a10_0x294a17[_0x544422(0x18c)](_0x457aec,_0x3f0eb4):a10_0x3935ec[_0x544422(0x18c)](_0x3f0eb4);function _0x3a0ab6(_0xdb0993){const _0x1997cb=_0x544422;if(_0x5ca872)return;_0x5ca872=!![],_0x4eec8c&&clearTimeout(_0x4eec8c),_0x5ad161[_0x1997cb(0x193)](),_0x34a2f5(_0xdb0993);}_0x5ad161[_0x544422(0x1a3)](0x0,_0x544422(0x1a7),()=>{const _0xb8f542=_0x544422,_0x551fe4=_0x5ad161[_0xb8f542(0x188)]();_0xf1e755=typeof _0x551fe4==='object'&&_0x551fe4?_0x551fe4[_0xb8f542(0x1a6)]:Number(_0x551fe4);const _0x2b990d=withPort(_0x46906a['origin'],_0xf1e755);_0x4eec8c=setTimeout(()=>{const _0x510162=_0xb8f542;!_0x2902f0&&console[_0x510162(0x1ab)](_0x510162(0x19e)),_0x3a0ab6(![]);},_0x1c6660);!_0x2902f0&&(console[_0xb8f542(0x1ab)](_0xb8f542(0x1a2)),console[_0xb8f542(0x1ab)]('📍\x20Login\x20URL:',_0x2b990d),_0x74fe3a?(console[_0xb8f542(0x1ab)](_0xb8f542(0x17d)),console['log'](''),console[_0xb8f542(0x1ab)]('💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.')):console[_0xb8f542(0x1ab)]('💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.'),console[_0xb8f542(0x1ab)](''));if(!_0x74fe3a)return;openInBrowser(_0x2b990d)[_0xb8f542(0x183)](_0x28a1da=>{const _0x2637c0=_0xb8f542;!_0x2902f0&&(_0x28a1da?console[_0x2637c0(0x1ab)](_0x2637c0(0x182)):(console['log'](_0x2637c0(0x192)),console[_0x2637c0(0x1ab)](_0x2637c0(0x184),_0x2b990d)),console[_0x2637c0(0x1ab)](''));})['catch'](()=>{const _0x18e89b=_0xb8f542;!_0x2902f0&&(console['log'](_0x18e89b(0x192)),console[_0x18e89b(0x1ab)](_0x18e89b(0x184),_0x2b990d),console['log'](''));});}),_0x5ad161['on'](_0x544422(0x1a8),_0x1efc57=>{const _0x57cb3d=_0x544422;if(_0x5ca872)return;_0x5ca872=!![],_0x4eec8c&&clearTimeout(_0x4eec8c),!_0x2902f0&&console[_0x57cb3d(0x1a8)]('Auth\x20server\x20error:',_0x1efc57),_0x5ad161['close'](),_0x5c0f7f(_0x1efc57);});});}function openInBrowser(_0x2ef88d){return new Promise(_0x56a3c2=>{const _0x5b1c04=a10_0x2e26,_0x2bb8ef=process[_0x5b1c04(0x196)];let _0x1fba52;if(_0x2bb8ef===_0x5b1c04(0x18f))_0x1fba52='cmd\x20/c\x20start\x20\x22\x22\x20\x22'+_0x2ef88d+'\x22';else _0x2bb8ef===_0x5b1c04(0x198)?_0x1fba52=_0x5b1c04(0x19a)+_0x2ef88d+'\x22':_0x1fba52='xdg-open\x20\x22'+_0x2ef88d+'\x22';exec(_0x1fba52,_0x5f5af8=>{_0x5f5af8?_0x56a3c2(![]):_0x56a3c2(!![]);});});}if(import.meta.main){const isAuth=await authServer();console['log'](a10_0x1d0111(0x199),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a11_0x371bd7=a11_0x4ca6;(function(_0x3fac81,_0x167a5f){const _0x49675e=a11_0x4ca6,_0x60dfc0=_0x3fac81();while(!![]){try{const _0x668a33=-parseInt(_0x49675e(0xb3))/0x1*(-parseInt(_0x49675e(0xae))/0x2)+parseInt(_0x49675e(0xb1))/0x3*(parseInt(_0x49675e(0xb5))/0x4)+-parseInt(_0x49675e(0xb0))/0x5*(-parseInt(_0x49675e(0xaf))/0x6)+-parseInt(_0x49675e(0xb9))/0x7+parseInt(_0x49675e(0xad))/0x8*(-parseInt(_0x49675e(0xb2))/0x9)+-parseInt(_0x49675e(0xb6))/0xa*(parseInt(_0x49675e(0xac))/0xb)+parseInt(_0x49675e(0xb4))/0xc;if(_0x668a33===_0x167a5f)break;else _0x60dfc0['push'](_0x60dfc0['shift']());}catch(_0x2c659f){_0x60dfc0['push'](_0x60dfc0['shift']());}}}(a11_0x3725,0x2d667));import{mkdirSync}from'node:fs';function a11_0x4ca6(_0x2185f8,_0x322e15){_0x2185f8=_0x2185f8-0xac;const _0x372549=a11_0x3725();let _0x4ca6e1=_0x372549[_0x2185f8];return _0x4ca6e1;}import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a11_0x371bd7(0xb7));export const cookieFile=join(configDir,a11_0x371bd7(0xb8));function a11_0x3725(){const _0x52db56=['366334xoSyOg','950652wvGcrK','5faIzXX','1674xYVRwg','8523ttgEhe','1nUizyG','2445504vSjBtc','548LrEzRp','2996530nuCnOU','.lovrabet','cookie','443212yjGjEj','11VTAsUb','616aSXGFU'];a11_0x3725=function(){return _0x52db56;};return a11_0x3725();}mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2b0ad1,_0x52ba8f){var _0x4e1bde=a12_0x4843,_0x53b8da=_0x2b0ad1();while(!![]){try{var _0x2e82b6=parseInt(_0x4e1bde(0xa3))/0x1*(-parseInt(_0x4e1bde(0xa1))/0x2)+parseInt(_0x4e1bde(0xa8))/0x3*(parseInt(_0x4e1bde(0xa9))/0x4)+-parseInt(_0x4e1bde(0xa6))/0x5+parseInt(_0x4e1bde(0xa7))/0x6+-parseInt(_0x4e1bde(0x9f))/0x7+-parseInt(_0x4e1bde(0xa5))/0x8*(parseInt(_0x4e1bde(0xa0))/0x9)+-parseInt(_0x4e1bde(0x9e))/0xa*(-parseInt(_0x4e1bde(0xa4))/0xb);if(_0x2e82b6===_0x52ba8f)break;else _0x53b8da['push'](_0x53b8da['shift']());}catch(_0x500cd2){_0x53b8da['push'](_0x53b8da['shift']());}}}(a12_0x491a,0x7e9df));function a12_0x491a(){var _0x430924=['1807qrtlJh','1105115HINfAS','184vHsxvT','4660605OvvEme','4375782QpAkfY','18dOaipK','618528bPhWnW','200CcxiOU','7121597usEoaB','275148CCFrXz','548Qxejza','utf-8'];a12_0x491a=function(){return _0x430924;};return a12_0x491a();}function a12_0x4843(_0x4c089b,_0x14f234){_0x4c089b=_0x4c089b-0x9e;var _0x491ad9=a12_0x491a();var _0x4843b8=_0x491ad9[_0x4c089b];return _0x4843b8;}import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0x139b20=a12_0x4843;try{return readFileSync(cookieFile,_0x139b20(0xa2));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x214ffd,_0x1433d0){const _0x1fa24=a13_0x4622,_0x51fa34=_0x214ffd();while(!![]){try{const _0x1c34f4=-parseInt(_0x1fa24(0x13b))/0x1+parseInt(_0x1fa24(0x13f))/0x2+-parseInt(_0x1fa24(0x132))/0x3+parseInt(_0x1fa24(0x133))/0x4+-parseInt(_0x1fa24(0x137))/0x5+-parseInt(_0x1fa24(0x134))/0x6*(parseInt(_0x1fa24(0x13c))/0x7)+parseInt(_0x1fa24(0x139))/0x8*(parseInt(_0x1fa24(0x13a))/0x9);if(_0x1c34f4===_0x1433d0)break;else _0x51fa34['push'](_0x51fa34['shift']());}catch(_0x4e66fb){_0x51fa34['push'](_0x51fa34['shift']());}}}(a13_0x23bf,0x90798));function a13_0x23bf(){const _0x3a9bf2=['32BxekDJ','3742371HdXxEb','936576WxukhF','7pOjsCG','/api/auth/get-session','utf-8','713314ZriXil','1152780osZznz','1783400OxEQde','1169376wRhzUi','session','user','1791415hspZHe','json'];a13_0x23bf=function(){return _0x3a9bf2;};return a13_0x23bf();}function a13_0x4622(_0x25ec59,_0x1f58a4){_0x25ec59=_0x25ec59-0x132;const _0x23bfb6=a13_0x23bf();let _0x462240=_0x23bfb6[_0x25ec59];return _0x462240;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0x347f04=a13_0x4622;try{if(!existsSync(cookieFile))return null;const _0x2d2542=readFileSync(cookieFile,_0x347f04(0x13e)),_0x27b0ca=await fetch(getUserDomain()+_0x347f04(0x13d),{'headers':{'cookie':_0x2d2542}});if(!_0x27b0ca['ok'])return null;const _0x285fb4=await _0x27b0ca[_0x347f04(0x138)]();if(!_0x285fb4[_0x347f04(0x135)]||!_0x285fb4[_0x347f04(0x136)])return null;return _0x285fb4;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x47b783,_0x5c0254){const _0x25fcb8=a14_0x52af,_0x32c409=_0x47b783();while(!![]){try{const _0x5ceb7c=-parseInt(_0x25fcb8(0xe4))/0x1*(parseInt(_0x25fcb8(0xeb))/0x2)+parseInt(_0x25fcb8(0xe2))/0x3+-parseInt(_0x25fcb8(0xec))/0x4*(-parseInt(_0x25fcb8(0xe1))/0x5)+-parseInt(_0x25fcb8(0xe6))/0x6+-parseInt(_0x25fcb8(0xde))/0x7*(parseInt(_0x25fcb8(0xe7))/0x8)+parseInt(_0x25fcb8(0xed))/0x9*(-parseInt(_0x25fcb8(0xdf))/0xa)+parseInt(_0x25fcb8(0xe9))/0xb;if(_0x5ceb7c===_0x5c0254)break;else _0x32c409['push'](_0x32c409['shift']());}catch(_0x267443){_0x32c409['push'](_0x32c409['shift']());}}}(a14_0x1a08,0x5335a));function a14_0x52af(_0x59d477,_0x5d47e8){_0x59d477=_0x59d477-0xde;const _0x1a08d7=a14_0x1a08();let _0x52af68=_0x1a08d7[_0x59d477];return _0x52af68;}function a14_0x1a08(){const _0xa305c5=['then','3877812ssWywj','8xswECV','/api/auth/get-session','15369354rcyMic','user','358wULClK','1092sLgbuk','32472yZeBrl','1978459CEZMLf','970IBVZFa','session','4635zPuYAz','358911eZHxae','utf-8','839uThFPn'];a14_0x1a08=function(){return _0xa305c5;};return a14_0x1a08();}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x5cbebd=a14_0x52af;try{if(!existsSync(cookieFile))return![];const _0x564720=readFileSync(cookieFile,_0x5cbebd(0xe3)),_0x5ff32=await fetch(getUserDomain()+_0x5cbebd(0xe8),{'headers':{'cookie':_0x564720}})[_0x5cbebd(0xe5)](_0x5086ab=>_0x5086ab['json']());return _0x5ff32&&_0x5ff32[_0x5cbebd(0xe0)]&&_0x5ff32[_0x5cbebd(0xea)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3ad98d,_0x459951){const _0x459128=a15_0x3f47,_0x20e473=_0x3ad98d();while(!![]){try{const _0x236375=parseInt(_0x459128(0x164))/0x1+-parseInt(_0x459128(0x167))/0x2+-parseInt(_0x459128(0x165))/0x3+-parseInt(_0x459128(0x16d))/0x4+-parseInt(_0x459128(0x16b))/0x5+parseInt(_0x459128(0x16a))/0x6+parseInt(_0x459128(0x166))/0x7*(parseInt(_0x459128(0x16c))/0x8);if(_0x236375===_0x459951)break;else _0x20e473['push'](_0x20e473['shift']());}catch(_0x44ac81){_0x20e473['push'](_0x20e473['shift']());}}}(a15_0x3e38,0x3d38f));function a15_0x3e38(){const _0x2331dd=['2058738eJeAZL','1929055mUGhyr','5172648fKphpA','178028ywvhvp','<!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>','220670Inqpyc','1062924xawwgX','7wpdarC','349962qrvVIO','</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>','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.'];a15_0x3e38=function(){return _0x2331dd;};return a15_0x3e38();}function a15_0x3f47(_0x4fc558,_0x505d0c){_0x4fc558=_0x4fc558-0x163;const _0x3e383a=a15_0x3e38();let _0x3f47f9=_0x3e383a[_0x4fc558];return _0x3f47f9;}export function buildLoginSuccessHtml(){const _0x4bd75=a15_0x3f47,_0x5b540e=_0x4bd75(0x169);return _0x4bd75(0x163)+_0x5b540e+_0x4bd75(0x168);}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x40c93b,_0x5bbf92){var _0x46c563=a16_0x4e00,_0x5382ba=_0x40c93b();while(!![]){try{var _0x28b944=-parseInt(_0x46c563(0x86))/0x1+parseInt(_0x46c563(0x7f))/0x2*(-parseInt(_0x46c563(0x7d))/0x3)+parseInt(_0x46c563(0x7e))/0x4+parseInt(_0x46c563(0x88))/0x5*(parseInt(_0x46c563(0x85))/0x6)+parseInt(_0x46c563(0x7c))/0x7*(-parseInt(_0x46c563(0x84))/0x8)+parseInt(_0x46c563(0x87))/0x9+parseInt(_0x46c563(0x83))/0xa*(parseInt(_0x46c563(0x81))/0xb);if(_0x28b944===_0x5bbf92)break;else _0x5382ba['push'](_0x5382ba['shift']());}catch(_0xb4e419){_0x5382ba['push'](_0x5382ba['shift']());}}}(a16_0x1b8d,0x2b75c));function a16_0x4e00(_0x2c8d06,_0x45cd72){_0x2c8d06=_0x2c8d06-0x7c;var _0x1b8d3c=a16_0x1b8d();var _0x4e003e=_0x1b8d3c[_0x2c8d06];return _0x4e003e;}import{unlinkSync,existsSync}from'node:fs';function a16_0x1b8d(){var _0x3f294e=['14avTPPW','55929UezZbU','1387456ZuErAb','30rVuPeY','log','264OcGALt','✓\x20Logged\x20out','40960hrzPMO','643232JQLxOQ','6708womoVB','103202FeqpVc','2126259QMupay','180etvggb'];a16_0x1b8d=function(){return _0x3f294e;};return a16_0x1b8d();}import{cookieFile}from'../auth/constant.js';export function logout(){var _0x43ad60=a16_0x4e00;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x43ad60(0x80)](_0x43ad60(0x82))):console[_0x43ad60(0x80)]('!\x20Not\x20logged\x20in');}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a17_0x567f(_0x37e91e,_0x48a932){_0x37e91e=_0x37e91e-0x139;const _0x2a0ca2=a17_0x2a0c();let _0x567f6a=_0x2a0ca2[_0x37e91e];return _0x567f6a;}function a17_0x2a0c(){const _0x1f03a8=['12hXlCfC','6622965kMNPxX','235096FpwzXk','883568vysCHU','360204IsCCDP','9BnneKH','160466KcMklz','212285EkSzsb','1362235nUyept'];a17_0x2a0c=function(){return _0x1f03a8;};return a17_0x2a0c();}(function(_0x452701,_0x5c8783){const _0xd61c45=a17_0x567f,_0x5e2d9f=_0x452701();while(!![]){try{const _0x4f47dd=-parseInt(_0xd61c45(0x13d))/0x1+-parseInt(_0xd61c45(0x141))/0x2*(parseInt(_0xd61c45(0x140))/0x3)+parseInt(_0xd61c45(0x13f))/0x4+-parseInt(_0xd61c45(0x139))/0x5*(-parseInt(_0xd61c45(0x13b))/0x6)+-parseInt(_0xd61c45(0x13a))/0x7+-parseInt(_0xd61c45(0x13e))/0x8+parseInt(_0xd61c45(0x13c))/0x9;if(_0x4f47dd===_0x5c8783)break;else _0x5e2d9f['push'](_0x5e2d9f['shift']());}catch(_0x329af0){_0x5e2d9f['push'](_0x5e2d9f['shift']());}}}(a17_0x2a0c,0x1fbd4));export const dynamicCliFlags={'enableBffSave':{'type':'boolean'}};
|