@lovrabet/rabetbase-cli 2.5.10-beta.2 → 2.5.10-beta.3
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/README.md +10 -0
- 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.d.ts +2 -2
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.d.ts +3 -0
- package/lib/commands/issue/context.js +1 -0
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -2
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase/references/rabetbase-issue-report.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 +3 -3
- package/lib/commands/issue/shared.d.ts +0 -32
- package/lib/commands/issue/shared.js +0 -1
- package/lib/telemetry/send-platform-issue-collect-log.d.ts +0 -26
- package/lib/telemetry/send-platform-issue-collect-log.js +0 -1
package/README.md
CHANGED
|
@@ -304,3 +304,13 @@ rabetbase kb search --appcode app-xxxxx --query "business rules" --format json
|
|
|
304
304
|
```
|
|
305
305
|
|
|
306
306
|
Search sends the current developer Cookie directly to `/api/knowledge-base/search` and returns public/company knowledge. `--kb-service-url` can override the trusted HTTPS origin for one request without persisting it. Global has no registered KB endpoint and does not borrow another region's address. Missing routes fail closed; redirects and switching endpoints after request failures are disabled. Management and rule commands use the same trusted `kbServiceDomain`. Wire Result document IDs are decoded losslessly into strings; updates, deletes, and rule writes use server-side version compare-and-set. Company management uses `/api/knowledge-base/company/{operation}`; app rules use `/api/knowledge-base/company/rules/{operation}` and retain their app-owned `scope=rules` VO. All knowledge calls use POST JSON with appCode and document IDs in the body and scope selected by the path (no body.scope), without a protocol header; Result/VO responses are retained. Search sends explicit public/company scopes and preserves the existing development output profile. See [KB workflow](skills/rabetbase/references/rabetbase-kb.md).
|
|
307
|
+
|
|
308
|
+
## Report a problem
|
|
309
|
+
|
|
310
|
+
```bash
|
|
311
|
+
rabetbase issue report --title "Page push failed" --description-file ./issue.md --dry-run
|
|
312
|
+
rabetbase issue report --title "Page push failed" --description-file ./issue.md
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Preview the redacted content before submitting. On success, the command displays
|
|
316
|
+
`Issue log submitted`.
|
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a0_0x344988=a0_0x1f22;(function(_0x4851ca,_0x515370){const _0x443891=a0_0x1f22,_0x27616b=_0x4851ca();while(!![]){try{const _0x45caf8=parseInt(_0x443891(0x11d))/0x1*(-parseInt(_0x443891(0x11c))/0x2)+parseInt(_0x443891(0x109))/0x3+-parseInt(_0x443891(0x125))/0x4+-parseInt(_0x443891(0x128))/0x5*(-parseInt(_0x443891(0x11a))/0x6)+-parseInt(_0x443891(0x113))/0x7*(parseInt(_0x443891(0x11f))/0x8)+parseInt(_0x443891(0x10d))/0x9*(-parseInt(_0x443891(0x118))/0xa)+parseInt(_0x443891(0x120))/0xb;if(_0x45caf8===_0x515370)break;else _0x27616b['push'](_0x27616b['shift']());}catch(_0x2dc860){_0x27616b['push'](_0x27616b['shift']());}}}(a0_0x1648,0xc3355));import{mkdirSync,writeFileSync}from'node:fs';import a0_0xc4b7fc from'node:path';function a0_0x1648(){const _0x2a82e7=['error','.md\x20-\x20','6115980kJGAwg','success','utf8','5GclQbP','1784736zNqxfp','datasetCode','✗\x20Failed:\x20','Generated\x20docs\x20successfully:\x20','9sMshGN','.md\x20(','✓\x20Generated:\x20','message','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','push','2442181jDjTjv','log','length','Waiting\x203\x20seconds...\x0a',']\x20Generating:\x20','15369050JVZpYV','./docs','8552904cxlaWJ','join','16138JWwmHe','23qnDwgx','api-doc','8RdEVSL','26175017ziUVuC','.md','name'];a0_0x1648=function(){return _0x2a82e7;};return a0_0x1648();}function a0_0x1f22(_0x28d660,_0x3f6fd0){_0x28d660=_0x28d660-0x109;const _0x1648f6=a0_0x1648();let _0x1f22e7=_0x1648f6[_0x28d660];return _0x1f22e7;}import{fetchDatasetDoc}from'../core/api-client.js';import{logger}from'../utils/logger.js';export{fetchDatasetDoc}from'../core/api-client.js';function delay(_0x52176f){return new Promise(_0x4e5f15=>setTimeout(_0x4e5f15,_0x52176f));}export async function generateDatasetDocs(_0x1d8bfa,_0x3160bc,_0x3e9b94,_0x3b8ce7=a0_0x344988(0x119),_0x9bd49b,_0x3b2d1d){const _0x529f31=a0_0x344988;mkdirSync(_0x3b8ce7,{'recursive':!![]});const _0x306d7b=[],_0x3297e0=_0x1d8bfa[_0x529f31(0x115)];console[_0x529f31(0x114)]('\x0a'+_0x3297e0+_0x529f31(0x111));for(let _0xe5f0d9=0x0;_0xe5f0d9<_0x1d8bfa['length'];_0xe5f0d9++){const _0x3380e2=_0x1d8bfa[_0xe5f0d9],_0x481a10=_0xe5f0d9+0x1,_0xd364ac=_0x3380e2['tableName'];try{console[_0x529f31(0x114)]('['+_0x481a10+'/'+_0x3297e0+_0x529f31(0x117)+_0xd364ac+_0x529f31(0x10e)+_0x3380e2['name']+')');if(_0x9bd49b)_0x9bd49b(_0x481a10,_0x3297e0,_0xd364ac);const _0x607ff0=await fetchDatasetDoc({'appCode':_0x3160bc,'cookie':_0x3e9b94,'datasetCode':_0x3380e2[_0x529f31(0x10a)],'datasetId':_0x3380e2['id'],'enableAI':![],'extraParams':_0x3b2d1d}),_0x262224=a0_0xc4b7fc[_0x529f31(0x11b)](_0x3b8ce7,_0xd364ac+_0x529f31(0x121));writeFileSync(_0x262224,_0x607ff0,{'encoding':_0x529f31(0x127)}),console[_0x529f31(0x114)](_0x529f31(0x10f)+_0xd364ac+_0x529f31(0x121)),logger[_0x529f31(0x126)](_0x529f31(0x11e),_0x529f31(0x10c)+_0xd364ac,undefined,{'datasetCode':_0x3380e2[_0x529f31(0x10a)],'datasetName':_0x3380e2['name'],'filePath':_0x262224,'progress':_0x481a10+'/'+_0x3297e0}),_0x306d7b[_0x529f31(0x112)]({'datasetCode':_0x3380e2[_0x529f31(0x10a)],'datasetName':_0x3380e2['name'],'filePath':_0x262224,'success':!![]});if(_0x481a10<_0x3297e0)await delay(0x1388);}catch(_0x4f5976){const _0x4fb04e=_0x4f5976 instanceof Error?_0x4f5976[_0x529f31(0x110)]:String(_0x4f5976);console[_0x529f31(0x114)](_0x529f31(0x10b)+_0xd364ac+_0x529f31(0x124)+_0x4fb04e),logger[_0x529f31(0x123)](_0x529f31(0x11e),'Failed\x20to\x20generate\x20docs:\x20'+_0x3380e2[_0x529f31(0x10a)],{'datasetCode':_0x3380e2[_0x529f31(0x10a)],'datasetName':_0x3380e2[_0x529f31(0x122)],'error':_0x4fb04e,'progress':_0x481a10+'/'+_0x3297e0}),_0x306d7b[_0x529f31(0x112)]({'datasetCode':_0x3380e2[_0x529f31(0x10a)],'datasetName':_0x3380e2[_0x529f31(0x122)],'filePath':'','success':![],'error':_0x4fb04e}),_0x481a10<_0x3297e0&&(console[_0x529f31(0x114)](_0x529f31(0x116)),await delay(0xbb8));}}return _0x306d7b;}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x193218=a1_0x4944;(function(_0x3ddbb2,_0x111c5e){const _0x27e31c=a1_0x4944,_0x2cc885=_0x3ddbb2();while(!![]){try{const _0x17823a=-parseInt(_0x27e31c(0x7d))/0x1*(-parseInt(_0x27e31c(0x8b))/0x2)+parseInt(_0x27e31c(0x96))/0x3*(-parseInt(_0x27e31c(0x92))/0x4)+parseInt(_0x27e31c(0x83))/0x5+-parseInt(_0x27e31c(0x8a))/0x6*(-parseInt(_0x27e31c(0x8e))/0x7)+parseInt(_0x27e31c(0x79))/0x8+parseInt(_0x27e31c(0x8d))/0x9*(-parseInt(_0x27e31c(0x78))/0xa)+-parseInt(_0x27e31c(0x87))/0xb*(parseInt(_0x27e31c(0x7a))/0xc);if(_0x17823a===_0x111c5e)break;else _0x2cc885['push'](_0x2cc885['shift']());}catch(_0x2a45a3){_0x2cc885['push'](_0x2cc885['shift']());}}}(a1_0x6277,0x38019));import a1_0xb6a430 from'node:path';import{CliErrors}from'../errors.js';function a1_0x4944(_0x5a5e2e,_0x18d93c){_0x5a5e2e=_0x5a5e2e-0x77;const _0x62771f=a1_0x6277();let _0x4944f4=_0x62771f[_0x5a5e2e];return _0x4944f4;}export function normalizeApiDir(_0x4459c7,_0x60481=process[a1_0x193218(0x7b)]()){const _0x22fcdc=a1_0x193218;return a1_0xb6a430[_0x22fcdc(0x7c)](_0x60481,_0x4459c7);}function normalizedApiGroup(_0x3bf740){const _0x2c4f41=a1_0x193218,_0x3fc4c8=_0x3bf740?.[_0x2c4f41(0x7f)]();return _0x3fc4c8||undefined;}export function resolveApiProfileLayouts(_0x3f4d7c,_0x2e7722,_0x2dd0f8=process[a1_0x193218(0x7b)]()){const _0x33e499=a1_0x193218,_0x1a466a=_0x3f4d7c['map'](_0x147654=>{const _0x5f3c91=a1_0x4944,_0xdfe2f2=_0x2e7722(_0x147654);return{'app':_0x147654,'outputDir':_0xdfe2f2,'normalizedApiDir':normalizeApiDir(_0xdfe2f2,_0x2dd0f8),'apiGroup':normalizedApiGroup(_0x147654[_0x5f3c91(0x80)])};}),_0x9e7fda=new Map();for(const _0x55f699 of _0x1a466a){if(!_0x55f699[_0x33e499(0x80)])continue;const _0x160c4d=_0x9e7fda['get'](_0x55f699['apiGroup'])??new Set();_0x160c4d[_0x33e499(0x86)](_0x55f699['normalizedApiDir']),_0x9e7fda[_0x33e499(0x93)](_0x55f699[_0x33e499(0x80)],_0x160c4d);}for(const [_0x5e4d9d,_0x1f0230]of _0x9e7fda){if(_0x1f0230[_0x33e499(0x88)]>0x1)throw CliErrors[_0x33e499(0x94)]('API\x20group\x20\x22'+_0x5e4d9d+_0x33e499(0x91),_0x33e499(0x99));}const _0x16a2d2=new Map();for(const _0x3c370c of _0x1a466a){const _0x28da99=_0x16a2d2[_0x33e499(0x8c)](_0x3c370c[_0x33e499(0x97)])??[];_0x28da99['push'](_0x3c370c),_0x16a2d2[_0x33e499(0x93)](_0x3c370c[_0x33e499(0x97)],_0x28da99);}for(const _0x155687 of _0x16a2d2[_0x33e499(0x95)]()){const _0x2882ed=new Set(_0x155687[_0x33e499(0x98)](_0xeebacb=>_0xeebacb['apiGroup']?[_0xeebacb['apiGroup']]:[]));if(_0x2882ed[_0x33e499(0x88)]===0x0)continue;if(_0x2882ed[_0x33e499(0x88)]>0x1||_0x155687['some'](_0xd1ea00=>!_0xd1ea00[_0x33e499(0x80)])){const _0x41f8ec=_0x155687[_0x33e499(0x90)](_0x329fb4=>_0x329fb4['app'][_0x33e499(0x85)])[_0x33e499(0x77)](',\x20');throw CliErrors['validation']('API\x20directory\x20\x22'+_0x155687[0x0][_0x33e499(0x8f)]+_0x33e499(0x7e),_0x33e499(0x84)+_0x41f8ec+_0x33e499(0x82));}}return _0x1a466a;}function a1_0x6277(){const _0xefc629=['2347758suerHf','8XvQbKX','get','18vvEEvn','7MRYtFu','outputDir','map','\x22\x20resolves\x20to\x20multiple\x20API\x20directories.','28804WrXJiD','set','validation','values','33QZuEUO','normalizedApiDir','flatMap','Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.','join','1227430Mopknn','1951936uuLaYY','156pmoruR','cwd','resolve','44472LQbVHW','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','trim','apiGroup','filter','.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.','1445610vvlgQp','Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20','name','add','463859pkwpNd','size','length'];a1_0x6277=function(){return _0xefc629;};return a1_0x6277();}export function getRegistryGroup(_0x3c13c4,_0x5dd059){const _0x16fb35=a1_0x193218;if(_0x5dd059[_0x16fb35(0x80)])return _0x3c13c4[_0x16fb35(0x81)](_0x40a7ad=>_0x40a7ad[_0x16fb35(0x80)]===_0x5dd059[_0x16fb35(0x80)]);const _0x49ef3b=_0x3c13c4[_0x16fb35(0x81)](_0x5bafaa=>_0x5bafaa[_0x16fb35(0x97)]===_0x5dd059[_0x16fb35(0x97)]);return _0x49ef3b[_0x16fb35(0x89)]===0x1?_0x49ef3b:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5c6e69,_0x25f437){var _0x5b542f=a2_0x3ef5,_0x3d86d6=_0x5c6e69();while(!![]){try{var _0x4c09f5=-parseInt(_0x5b542f(0x96))/0x1*(-parseInt(_0x5b542f(0x93))/0x2)+-parseInt(_0x5b542f(0x8d))/0x3*(parseInt(_0x5b542f(0x95))/0x4)+parseInt(_0x5b542f(0x8b))/0x5+-parseInt(_0x5b542f(0x8c))/0x6+parseInt(_0x5b542f(0x91))/0x7*(parseInt(_0x5b542f(0x90))/0x8)+parseInt(_0x5b542f(0x8f))/0x9*(-parseInt(_0x5b542f(0x8e))/0xa)+parseInt(_0x5b542f(0x94))/0xb*(parseInt(_0x5b542f(0x92))/0xc);if(_0x4c09f5===_0x25f437)break;else _0x3d86d6['push'](_0x3d86d6['shift']());}catch(_0x2c51be){_0x3d86d6['push'](_0x3d86d6['shift']());}}}(a2_0x6047,0xed3b1));export{fetchModelList}from'../core/api-client.js';function a2_0x3ef5(_0x4a5ec2,_0x3f2198){_0x4a5ec2=_0x4a5ec2-0x8b;var _0x6047bf=a2_0x6047();var _0x3ef51d=_0x6047bf[_0x4a5ec2];return _0x3ef51d;}function a2_0x6047(){var _0x212e4c=['58IrHAre','2059775bWNZNb','666942sLakFZ','321ODVFwo','7635050GWdArC','9dbDMxh','82024jhllia','70HOkFgZ','4922484THbaeV','24794OaJujP','55NjSVAL','53764gsScWV'];a2_0x6047=function(){return _0x212e4c;};return a2_0x6047();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a3_0x89a2(_0x2b26de,_0x25e405){_0x2b26de=_0x2b26de-0x154;const _0x269616=a3_0x2696();let _0x89a2bd=_0x269616[_0x2b26de];return _0x89a2bd;}(function(_0x37dff7,_0xf2edc1){const _0x584949=a3_0x89a2,_0x480833=_0x37dff7();while(!![]){try{const _0x3d2da5=parseInt(_0x584949(0x183))/0x1+-parseInt(_0x584949(0x172))/0x2+-parseInt(_0x584949(0x17b))/0x3+parseInt(_0x584949(0x185))/0x4*(-parseInt(_0x584949(0x181))/0x5)+-parseInt(_0x584949(0x15e))/0x6+parseInt(_0x584949(0x17c))/0x7*(-parseInt(_0x584949(0x187))/0x8)+-parseInt(_0x584949(0x18b))/0x9*(-parseInt(_0x584949(0x166))/0xa);if(_0x3d2da5===_0xf2edc1)break;else _0x480833['push'](_0x480833['shift']());}catch(_0x3548cb){_0x480833['push'](_0x480833['shift']());}}}(a3_0x2696,0xcc75d));import a3_0x179176 from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x2e7364 from'node:path';import{fileURLToPath}from'node:url';function a3_0x2696(){const _0x54b05f=['CONFIG_NAMES.DEFAULT','-api','resolve','success','runtimeDomain','410OAXFou','overwritten','API\x20scaffold\x20written.','APP_','refreshed','action','allowEmptyModelReplacement','.ts','created','defaultName','Model\x20facts\x20refreshed.','key','1248014BbUEob','LOVRABET_RUNTIME_DOMAIN','name','replace','default','includes','api.ts.tpl','basename','utf8','3828489SZGTwl','119KXJJlC','templates/generate-api','path',',\x20...LOVRABET_SDK_CONFIG\x20}','length','1073270jdEjAV','init-api','736445mEiiDU','Please\x20configure\x20app\x20code\x20first\x20via\x20`','4NeGWoV','client','41720KROjaj','map','client.ts.tpl','format','827793aGbLWp','dirname','modelRuntime','typescript','preserved','{\x20apiConfigName:\x20','missing','replaceApiContent','api','overwriteTypescript','join','\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.',',\x20env:\x20','-client','../..','modelProfile','stringify','8799324CqFXOD','scaffoldMode','datasetCode'];a3_0x2696=function(){return _0x54b05f;};return a3_0x2696();}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';import{renderModelRegistryScaffold}from'../api/model-registry-scaffold.js';function fileAction(_0x161d87,_0x10f49c){const _0x2d0f77=a3_0x89a2;if(!_0x10f49c)return _0x161d87?_0x2d0f77(0x18f):_0x2d0f77(0x191);return _0x161d87?_0x2d0f77(0x167):_0x2d0f77(0x16e);}export async function generateApiFile(_0xf5369d,_0x3f99ee,_0x4ec568,_0x712838,_0x57e3c7,_0x4fadbd,_0x27ee73,_0x4bdb5b={},_0x3973e5={}){const _0x17bbe0=a3_0x89a2;if(!_0x4ec568)throw new Error(_0x17bbe0(0x184)+CLI_BIN_NAME+'\x20config\x20set\x20app\x20<value>`');const _0x1a805b=_0x712838&&!_0x27ee73,_0x492822=!!_0x3973e5[_0x17bbe0(0x15c)],_0x43dffb=_0x492822||_0x1a805b,_0x5de1e9=_0x27ee73||_0x4ec568,_0x3b1a91=_0x492822||_0x1a805b?_0x17bbe0(0x176):_0x5de1e9,_0x21415b=_0x492822||_0x1a805b?_0x17bbe0(0x161):JSON[_0x17bbe0(0x15d)](_0x5de1e9),_0x13b71c=!isProduction(_0x57e3c7),_0xd15b4f=_0x13b71c?_0x17bbe0(0x159)+JSON[_0x17bbe0(0x15d)](_0x57e3c7):'',_0x277389=_0x17bbe0(0x190)+_0x21415b+_0xd15b4f+_0x17bbe0(0x17f),_0x56e858=_0x492822?'':_0x3f99ee,_0x23bced=_0x56e858?_0x56e858+_0x17bbe0(0x162):_0x17bbe0(0x155),_0x2b6503=_0x56e858?_0x56e858+_0x17bbe0(0x15a):_0x17bbe0(0x186),_0x10169b=_0x56e858&&!/^app-[a-f0-9]+$/i['test'](_0x56e858)?_0x56e858[_0x17bbe0(0x175)](/-/g,'_')['toUpperCase']():'LOVRABET',_0x1d287a=/^\d/['test'](_0x10169b)?_0x17bbe0(0x169)+_0x10169b:_0x10169b,_0x2326d7=_0xf5369d[_0x17bbe0(0x188)](_0x52dca4=>({'datasetCode':_0x52dca4[_0x17bbe0(0x160)],'tableName':_0x52dca4['tableName'],'name':_0x52dca4[_0x17bbe0(0x174)]||'','alias':_0x52dca4['alias']||_0x52dca4[_0x17bbe0(0x171)]})),_0x4ae125=fileURLToPath(import.meta.url),_0x2c9ef9=a3_0x2e7364[_0x17bbe0(0x163)](a3_0x2e7364[_0x17bbe0(0x18c)](_0x4ae125),_0x17bbe0(0x15b)),_0x58ba06=a3_0x2e7364['join'](_0x2c9ef9,_0x17bbe0(0x17d)),_0x3ce229=a3_0x2e7364['join'](_0x58ba06,_0x17bbe0(0x178)),_0x2c601c=a3_0x2e7364[_0x17bbe0(0x157)](_0x58ba06,_0x17bbe0(0x189)),_0x4a52c7=_0x4fadbd;mkdirSync(_0x4a52c7,{'recursive':!![]});const _0xe0ab88=_0x492822?{}:_0x4bdb5b,_0x1cc783=await generateSdkConfigFile(_0x4a52c7,_0xe0ab88,_0x56e858),_0x56459c=a3_0x2e7364[_0x17bbe0(0x179)](_0x1cc783,'.ts'),_0x5c3045=a3_0x2e7364[_0x17bbe0(0x157)](_0x4a52c7,_0x23bced+_0x17bbe0(0x16d)),_0x5cb1b8=a3_0x2e7364[_0x17bbe0(0x157)](_0x4a52c7,_0x2b6503+'.ts'),_0x1c20fa=_0x3973e5[_0x17bbe0(0x156)]===!![],_0x56e8e5=existsSync(_0x5c3045),_0x3cf7b6=existsSync(_0x5cb1b8),_0x33a66e=_0x3973e5[_0x17bbe0(0x15f)]??(_0x1c20fa?_0x17bbe0(0x175):'missing'),_0x4f4211=_0x33a66e==='replace'||_0x33a66e==='missing'&&!_0x56e8e5,_0x3e7d99=_0x33a66e===_0x17bbe0(0x175)||_0x33a66e===_0x17bbe0(0x191)&&!_0x3cf7b6,_0x349d95=_0x3973e5['modelProfile']?updateModelRegistry({'outputDir':_0x4a52c7,'profileName':_0x3973e5[_0x17bbe0(0x15c)][_0x17bbe0(0x174)],'defaultProfile':_0x3973e5[_0x17bbe0(0x15c)][_0x17bbe0(0x16f)],'appCode':_0x4ec568,'runtimeDomain':_0x3973e5[_0x17bbe0(0x15c)][_0x17bbe0(0x165)],'models':_0x2326d7,'allowEmptyReplacement':_0x3973e5[_0x17bbe0(0x16c)]===!![]}):undefined,_0x2f9a21=_0x349d95?a3_0x2e7364[_0x17bbe0(0x157)](_0x4a52c7,MODEL_RUNTIME_FILE_NAME):undefined,_0x1d8e81=_0x2f9a21?existsSync(_0x2f9a21):![],_0x2863bf=_0x492822&&_0x33a66e!=='none'?await renderModelRegistryScaffold(_0x4a52c7):undefined;_0x2f9a21&&_0x2863bf&&writeFileSync(_0x2f9a21,_0x2863bf[_0x17bbe0(0x18d)],_0x17bbe0(0x17a));const _0x5a277c=_0x2326d7[0x0]?.['alias'];if(_0x4f4211){const _0x5b2c0c=_0x2863bf?.[_0x17bbe0(0x155)]??readFileSync(_0x3ce229,_0x17bbe0(0x17a)),_0xeb476f=_0x492822?_0x5b2c0c:TemplateReplacer[_0x17bbe0(0x154)](_0x5b2c0c,_0x4ec568,_0x2326d7,_0x5a277c,_0x23bced,_0x21415b,undefined,_0x1d287a);writeFileSync(_0x5c3045,await a3_0x179176[_0x17bbe0(0x18a)](_0xeb476f,{'parser':'typescript'}),{'encoding':_0x17bbe0(0x17a)});}if(_0x3e7d99){const _0x18edc0=_0x2863bf?.[_0x17bbe0(0x186)]??readFileSync(_0x2c601c,'utf8'),_0x11f8a8=_0x492822?_0x18edc0:TemplateReplacer[_0x17bbe0(0x154)](_0x18edc0,_0x4ec568,_0x2326d7,_0x5a277c,_0x23bced,_0x21415b,_0x277389,_0x1d287a,_0x56459c);writeFileSync(_0x5cb1b8,await a3_0x179176[_0x17bbe0(0x18a)](_0x11f8a8,{'parser':_0x17bbe0(0x18e)}),{'encoding':_0x17bbe0(0x17a)});}const _0x400fcf=_0x2326d7[_0x17bbe0(0x180)],_0x24aa91={'api':{'path':_0x5c3045,'action':fileAction(_0x56e8e5,_0x4f4211)},'client':{'path':_0x5cb1b8,'action':fileAction(_0x3cf7b6,_0x3e7d99)},'sdkConfig':{'path':_0x1cc783,'action':'refreshed'},..._0x349d95?{'modelRegistry':{'path':_0x349d95[_0x17bbe0(0x17e)],'action':_0x349d95['existed']?_0x17bbe0(0x16a):_0x17bbe0(0x16e)},'modelRuntime':{'path':_0x2f9a21,'action':_0x2863bf?_0x1d8e81?_0x17bbe0(0x16a):_0x17bbe0(0x16e):_0x1d8e81?_0x17bbe0(0x18f):_0x17bbe0(0x191)}}:{}},_0x502536=existsSync(_0x5c3045)&&readFileSync(_0x5c3045,_0x17bbe0(0x17a))[_0x17bbe0(0x177)](MODEL_REGISTRY_FILE_NAME[_0x17bbe0(0x175)](_0x17bbe0(0x16d),'')),_0x3411f0=existsSync(_0x5cb1b8)&&readFileSync(_0x5cb1b8,_0x17bbe0(0x17a))['includes'](_0x17bbe0(0x173)),_0x474c29=_0x492822?!_0x502536||!_0x3411f0||!existsSync(_0x2f9a21):![],_0x1d4391=_0x492822?_0x474c29:_0x24aa91[_0x17bbe0(0x155)][_0x17bbe0(0x16b)]==='preserved'||_0x24aa91[_0x17bbe0(0x186)][_0x17bbe0(0x16b)]==='preserved';return logger[_0x17bbe0(0x164)](_0x17bbe0(0x182),_0x1d4391?a3_0x2e7364['basename'](_0x1cc783)+_0x17bbe0(0x158):_0x492822?_0x17bbe0(0x170):_0x17bbe0(0x168),undefined,{'apiFile':_0x5c3045,'clientFile':_0x5cb1b8,'sdkConfig':_0x1cc783,'modelCount':_0x400fcf,'configName':_0x3b1a91,'isDefaultConfig':_0x43dffb,'needsAgentMerge':_0x1d4391,'needsProjectUpgrade':_0x474c29,'files':_0x24aa91}),{'appCode':_0x4ec568,'modelCount':_0x400fcf,'models':_0x2326d7,'apiFilePath':_0x5c3045,'clientFilePath':_0x5cb1b8,'sdkConfigPath':_0x1cc783,'modelRegistryPath':_0x349d95?.[_0x17bbe0(0x17e)],'modelRuntimePath':_0x2f9a21,'modelProfile':_0x3973e5[_0x17bbe0(0x15c)]?.[_0x17bbe0(0x174)],'configName':_0x3b1a91,'isDefaultConfig':_0x43dffb,'sdkRouting':_0xe0ab88,'files':_0x24aa91,'needsAgentMerge':_0x1d4391,'needsProjectUpgrade':_0x474c29};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a4_0x81a773=a4_0x3d9d;(function(_0x17c344,_0x3272d5){const _0x31f8c9=a4_0x3d9d,_0x32bb25=_0x17c344();while(!![]){try{const _0xc86039=parseInt(_0x31f8c9(0x1b9))/0x1*(-parseInt(_0x31f8c9(0x1b2))/0x2)+parseInt(_0x31f8c9(0x1b7))/0x3*(-parseInt(_0x31f8c9(0x1b1))/0x4)+-parseInt(_0x31f8c9(0x1b6))/0x5+-parseInt(_0x31f8c9(0x1a7))/0x6+parseInt(_0x31f8c9(0x1aa))/0x7+parseInt(_0x31f8c9(0x1b4))/0x8+parseInt(_0x31f8c9(0x1ae))/0x9;if(_0xc86039===_0x3272d5)break;else _0x32bb25['push'](_0x32bb25['shift']());}catch(_0x169956){_0x32bb25['push'](_0x32bb25['shift']());}}}(a4_0x173e,0x5b70a));import{mkdirSync,writeFileSync}from'node:fs';import a4_0x9760a8 from'node:path';import a4_0x1ce4f2 from'prettier';export const SDK_CONFIG_FILE_NAME=a4_0x81a773(0x1a6);export function getSdkConfigFileName(_0xdd4946=''){const _0x26d820=a4_0x81a773;return _0xdd4946?_0xdd4946+_0x26d820(0x1b5):SDK_CONFIG_FILE_NAME;}export async function generateSdkConfigFile(_0x553fcd,_0xe3280e={},_0x57039a=''){const _0x30290f=a4_0x81a773,_0x5aa537=[];_0xe3280e['runtimeDomain']&&_0x5aa537[_0x30290f(0x1a9)](_0x30290f(0x1ad)+JSON[_0x30290f(0x1af)](_0xe3280e['runtimeDomain']));const _0x4a1070=_0x5aa537[_0x30290f(0x1ac)]>0x0?_0x30290f(0x1a8)+_0x5aa537['join'](_0x30290f(0x1a5))+',\x0a}':'{}',_0x3212a1='/**\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'+_0x4a1070+_0x30290f(0x1b0);mkdirSync(_0x553fcd,{'recursive':!![]});const _0x19cd7c=a4_0x9760a8[_0x30290f(0x1b3)](_0x553fcd,getSdkConfigFileName(_0x57039a));return writeFileSync(_0x19cd7c,await a4_0x1ce4f2['format'](_0x3212a1,{'parser':_0x30290f(0x1ab)}),_0x30290f(0x1b8)),_0x19cd7c;}function a4_0x3d9d(_0x5df1ae,_0x55b966){_0x5df1ae=_0x5df1ae-0x1a5;const _0x173ef5=a4_0x173e();let _0x3d9d5d=_0x173ef5[_0x5df1ae];return _0x3d9d5d;}function a4_0x173e(){const _0x49a35b=['4196673dXjybQ','stringify','\x20as\x20const;\x0a','16ffllNg','20kfeCZr','join','4970168yKvFUv','-sdk-config.ts','514310zVdaoM','506994DdiVQG','utf8','18661KvMhJL',',\x0a\x20\x20','sdk-config.ts','510768stGCmo','{\x0a\x20\x20','push','2362934zlLSPL','typescript','length','runtimeDomain:\x20'];a4_0x173e=function(){return _0x49a35b;};return a4_0x173e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a5_0x204c(_0x34f75d,_0x29723e){_0x34f75d=_0x34f75d-0x1a1;const _0x30241e=a5_0x3024();let _0x204ce2=_0x30241e[_0x34f75d];return _0x204ce2;}(function(_0x39df59,_0x5e6526){const _0x122589=a5_0x204c,_0x5839d6=_0x39df59();while(!![]){try{const _0x5aed4d=parseInt(_0x122589(0x1a8))/0x1+parseInt(_0x122589(0x1a6))/0x2*(parseInt(_0x122589(0x1b8))/0x3)+-parseInt(_0x122589(0x1aa))/0x4*(-parseInt(_0x122589(0x1b5))/0x5)+parseInt(_0x122589(0x1ba))/0x6+-parseInt(_0x122589(0x1a3))/0x7+-parseInt(_0x122589(0x1b3))/0x8*(-parseInt(_0x122589(0x1b0))/0x9)+parseInt(_0x122589(0x1b2))/0xa*(-parseInt(_0x122589(0x1a1))/0xb);if(_0x5aed4d===_0x5e6526)break;else _0x5839d6['push'](_0x5839d6['shift']());}catch(_0x2299c2){_0x5839d6['push'](_0x5839d6['shift']());}}}(a5_0x3024,0x5349d));export function parseLegacyApiModels(_0x2ccf8c){const _0x518868=a5_0x204c,_0x4bb7de=[],_0x4c2fe5=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0xd116de;while((_0xd116de=_0x4c2fe5['exec'](_0x2ccf8c))!==null){_0x4bb7de[_0x518868(0x1a2)]({'datasetCode':_0xd116de[0x1],'tableName':_0xd116de[0x2],'name':_0xd116de[0x3],'alias':_0xd116de[0x4]});}return _0x4bb7de;}function a5_0x3024(){const _0x31b5ae=['@lovrabet/sdk','10QDfcIl','16WlNjyW','APP_CODE','5hCYgJJ','lovrabetClient','endsWith','436269xQJdkO','some','2121216wGoZpY','18037679HQCfxV','push','2340905oPHpIt','test','includes','2EZugJH','length','605646aohCSD','registerModels','2189048SORvLS','matchAll','MODELS_CONFIG','Generated\x20by\x20Rabetbase\x20CLI','map','replace','2985687NMYdNX'];a5_0x3024=function(){return _0x31b5ae;};return a5_0x3024();}export function parseLegacyApiAppCode(_0x197561){return _0x197561['match'](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function stripComments(_0x4bd9a0){const _0x23589e=a5_0x204c;return _0x4bd9a0[_0x23589e(0x1af)](/\/\*[\s\S]*?\*\//g,'')[_0x23589e(0x1af)](/\/\/.*$/gm,'');}export function isLegacyGeneratedApiScaffold(_0xe72acc){const _0x2dfcae=a5_0x204c;if(!_0xe72acc[_0x2dfcae(0x1a5)](_0x2dfcae(0x1ad)))return![];const _0x2ea495=stripComments(_0xe72acc),_0x363055=[..._0x2ea495[_0x2dfcae(0x1ab)](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)]['map'](_0x1b0843=>_0x1b0843[0x1]);if(_0x363055['length']!==0x1||_0x363055[0x0]!==_0x2dfcae(0x1b1))return![];const _0x593733=[..._0x2ea495['matchAll'](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x2dfcae(0x1ae)](_0x5a3257=>_0x5a3257[0x1]);if(_0x593733['length']!==0x2||!_0x593733[_0x2dfcae(0x1b9)](_0x5acf95=>_0x5acf95['endsWith'](_0x2dfcae(0x1b4)))||!_0x593733[_0x2dfcae(0x1b9)](_0x5cabf5=>_0x5cabf5[_0x2dfcae(0x1b7)](_0x2dfcae(0x1ac))))return![];const _0xbcfd1f=[..._0x2ea495['matchAll'](/^([A-Za-z_$][\w$]*)\s*\(/gm)][_0x2dfcae(0x1ae)](_0x5605ff=>_0x5605ff[0x1]);return _0xbcfd1f[_0x2dfcae(0x1a7)]===0x1&&_0xbcfd1f[0x0]===_0x2dfcae(0x1a9);}export function isLegacyGeneratedClientScaffold(_0x10697a){const _0x4918d8=a5_0x204c;if(!_0x10697a[_0x4918d8(0x1a5)]('Generated\x20by\x20Rabetbase\x20CLI'))return![];const _0x192426=stripComments(_0x10697a),_0x194753=[..._0x192426[_0x4918d8(0x1ab)](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)]['map'](_0x23fa7d=>_0x23fa7d[0x1]);if(_0x194753[_0x4918d8(0x1b9)](_0x31baf9=>_0x31baf9!==_0x4918d8(0x1b1)&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/[_0x4918d8(0x1a4)](_0x31baf9??'')))return![];const _0x3735ad=[..._0x192426['matchAll'](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x4918d8(0x1ae)](_0x2d8c01=>_0x2d8c01[0x1]);return _0x3735ad['length']===0x1&&_0x3735ad[0x0]===_0x4918d8(0x1b6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x4f47ba=a6_0x2f19;function a6_0x1246(){const _0x366a96=['398HoOqsP','.tmp','flatMap','72owZlmI','values','replace','\x22\x20with\x20an\x20empty\x20result.\x20','outputDir','\x22\x20maps\x20to\x20alias\x20\x22','/*\x20rabetbase-model-registry:v2\x20*/','defaultProfile','filter','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','tableName','\x22\x20maps\x20to\x20table\x20\x22','6FOOTkN','name','alias','keys','string','now','isArray','\x22\x20maps\x20to\x20both\x20\x22','includes','value','\x20model(s)\x20in\x20profile\x20\x22','find','models.generated.ts','parse','560907fADnea','protocol','/*\x20rabetbase-model-registry:end\x20*/','join','models','split','key','indexOf','push','trim','allowEmptyReplacement','1103682EsAxUF','lovrabet-model-registry/v2','set','NOT-SET','datasetCodes','stringify','test','get','entries','Table\x20\x22','\x22\x20and\x20\x22','datasetCode','runtimeDomain','length','/**\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','3396400YjQBvp','\x22\x20in\x20profile\x20\x22','every','utf8','\x22\x20in\x20the\x20registry\x20but\x20\x22','225GcPZvo','4135920HISCbF','profiles','977890asmrRJ','lovrabet-model-registry/v1','appCode','3469795KFLwWM','Refusing\x20to\x20replace\x20','slice','object','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','55nGxirH','Model\x20alias\x20\x22','profileName','pid','map','/*\x20rabetbase-model-registry:start\x20*/'];a6_0x1246=function(){return _0x366a96;};return a6_0x1246();}(function(_0x455a63,_0x5aa9f1){const _0x345409=a6_0x2f19,_0x3dcbd6=_0x455a63();while(!![]){try{const _0x51826e=-parseInt(_0x345409(0x20d))/0x1+parseInt(_0x345409(0x232))/0x2*(-parseInt(_0x345409(0x221))/0x3)+parseInt(_0x345409(0x21c))/0x4+parseInt(_0x345409(0x222))/0x5+parseInt(_0x345409(0x1f4))/0x6*(parseInt(_0x345409(0x227))/0x7)+-parseInt(_0x345409(0x235))/0x8*(parseInt(_0x345409(0x202))/0x9)+parseInt(_0x345409(0x224))/0xa*(parseInt(_0x345409(0x22c))/0xb);if(_0x51826e===_0x5aa9f1)break;else _0x3dcbd6['push'](_0x3dcbd6['shift']());}catch(_0x39809b){_0x3dcbd6['push'](_0x3dcbd6['shift']());}}}(a6_0x1246,0xef998));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x4515b0 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x4f47ba(0x200);export const MODEL_RUNTIME_FILE_NAME='model-runtime.ts';export const MODEL_REGISTRY_VERSION_MARKER=a6_0x4f47ba(0x23b);function a6_0x2f19(_0x24fec6,_0x3ca975){_0x24fec6=_0x24fec6-0x1f2;const _0x12467d=a6_0x1246();let _0x2f197b=_0x12467d[_0x24fec6];return _0x2f197b;}const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x4f47ba(0x20e),REGISTRY_START=a6_0x4f47ba(0x231),REGISTRY_END=a6_0x4f47ba(0x204);function emptyRegistry(_0x3fce6e){return{'defaultProfile':_0x3fce6e,'profiles':{},'models':[]};}function extractRegistryJson(_0x4cfa8b){const _0x44b7a9=a6_0x4f47ba,_0x1ad7d6=_0x4cfa8b[_0x44b7a9(0x209)](REGISTRY_START),_0x250cf4=_0x4cfa8b['indexOf'](REGISTRY_END);if(_0x1ad7d6<0x0||_0x250cf4<=_0x1ad7d6)return undefined;return _0x4cfa8b[_0x44b7a9(0x229)](_0x1ad7d6+REGISTRY_START[_0x44b7a9(0x21a)],_0x250cf4)[_0x44b7a9(0x20b)]()[_0x44b7a9(0x237)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x44b7a9(0x237)](/;$/,'');}function migrateLegacyRegistry(_0x15ca1f){const _0x43a912=a6_0x4f47ba,_0x210dea=emptyRegistry(_0x15ca1f[_0x43a912(0x23c)]);for(const [_0x29c55f,_0xbfb995]of Object[_0x43a912(0x215)](_0x15ca1f['profiles'])){_0x210dea[_0x43a912(0x223)][_0x29c55f]={'appCode':_0xbfb995[_0x43a912(0x226)],'runtimeDomain':_0xbfb995[_0x43a912(0x219)]},mergeProfileModels(_0x210dea,_0x29c55f,_0xbfb995['models']);}return _0x210dea;}function generatedObjectLiteralToJson(_0x17213e){const _0x13c3da=a6_0x4f47ba;let _0x2cd54c='',_0x3defa5,_0x55b53f=![],_0x335050;for(let _0x308060=0x0;_0x308060<_0x17213e['length'];_0x308060++){const _0x20368a=_0x17213e[_0x308060];if(_0x3defa5){_0x2cd54c+=_0x20368a;if(_0x55b53f)_0x55b53f=![];else{if(_0x20368a==='\x5c')_0x55b53f=!![];else{if(_0x20368a===_0x3defa5)_0x3defa5=undefined;}}continue;}if(_0x20368a==='\x22'){_0x3defa5=_0x20368a,_0x2cd54c+=_0x20368a,_0x335050='value';continue;}if(_0x20368a===','){let _0x3f3865=_0x308060+0x1;while(/\s/[_0x13c3da(0x213)](_0x17213e[_0x3f3865]??''))_0x3f3865++;if(_0x17213e[_0x3f3865]==='}'||_0x17213e[_0x3f3865]===']')continue;_0x2cd54c+=_0x20368a,_0x335050=',';continue;}if(_0x20368a==='{'||_0x20368a==='['){_0x2cd54c+=_0x20368a,_0x335050=_0x20368a;continue;}if(_0x20368a==='}'||_0x20368a===']'){_0x2cd54c+=_0x20368a,_0x335050=_0x20368a;continue;}if((_0x335050==='{'||_0x335050===',')&&/[A-Za-z_$]/[_0x13c3da(0x213)](_0x20368a)){let _0x53d46c=_0x308060+0x1;while(/[A-Za-z0-9_$]/[_0x13c3da(0x213)](_0x17213e[_0x53d46c]??''))_0x53d46c++;let _0x2cee54=_0x53d46c;while(/\s/[_0x13c3da(0x213)](_0x17213e[_0x2cee54]??''))_0x2cee54++;if(_0x17213e[_0x2cee54]===':'){_0x2cd54c+=JSON['stringify'](_0x17213e['slice'](_0x308060,_0x53d46c)),_0x308060=_0x53d46c-0x1,_0x335050=_0x13c3da(0x208);continue;}}_0x2cd54c+=_0x20368a;if(!/\s/[_0x13c3da(0x213)](_0x20368a)&&_0x20368a!==':')_0x335050=_0x13c3da(0x1fd);}return _0x2cd54c;}function parseGeneratedRegistryJson(_0x89d9f2){const _0x22f7ea=a6_0x4f47ba;try{return JSON[_0x22f7ea(0x201)](_0x89d9f2);}catch{return JSON[_0x22f7ea(0x201)](generatedObjectLiteralToJson(_0x89d9f2));}}function normalizeModelEntries(_0x1b4538,_0x4a2a91){const _0x5e9853=a6_0x4f47ba,_0x3e8542=Object['keys'](_0x1b4538),_0x5be098=[];for(const _0x329e26 of _0x4a2a91){if(!_0x329e26||typeof _0x329e26!==_0x5e9853(0x22a)||Array['isArray'](_0x329e26))return undefined;const _0x1076cd=_0x329e26;if(typeof _0x1076cd['alias']!=='string'||typeof _0x1076cd['tableName']!==_0x5e9853(0x1f8)||typeof _0x1076cd[_0x5e9853(0x1f5)]!=='string')return undefined;let _0x5b6fc9;if(typeof _0x1076cd['datasetCode']==='string'&&_0x1076cd[_0x5e9853(0x211)]===undefined)_0x5b6fc9=Object['fromEntries'](_0x3e8542[_0x5e9853(0x230)](_0x3bd6b8=>[_0x3bd6b8,_0x1076cd['datasetCode']]));else{if(_0x1076cd[_0x5e9853(0x218)]===undefined&&_0x1076cd[_0x5e9853(0x211)]&&typeof _0x1076cd[_0x5e9853(0x211)]===_0x5e9853(0x22a)&&!Array['isArray'](_0x1076cd[_0x5e9853(0x211)])&&Object[_0x5e9853(0x236)](_0x1076cd['datasetCodes'])['every'](_0x56009a=>typeof _0x56009a===_0x5e9853(0x1f8)))_0x5b6fc9={..._0x1076cd[_0x5e9853(0x211)]};else return undefined;}_0x5be098['push']({'alias':_0x1076cd[_0x5e9853(0x1f6)],'tableName':_0x1076cd[_0x5e9853(0x1f2)],'name':_0x1076cd[_0x5e9853(0x1f5)],'datasetCodes':_0x5b6fc9});}return _0x5be098;}export function parseModelRegistry(_0x3c367a){const _0x5d24e1=a6_0x4f47ba,_0x361b71=extractRegistryJson(_0x3c367a);if(!_0x361b71)return undefined;try{const _0x46fa04=parseGeneratedRegistryJson(_0x361b71);if(typeof _0x46fa04[_0x5d24e1(0x23c)]!==_0x5d24e1(0x1f8)||!_0x46fa04[_0x5d24e1(0x223)]||typeof _0x46fa04[_0x5d24e1(0x223)]!=='object')return undefined;if(_0x46fa04[_0x5d24e1(0x203)]===_0x5d24e1(0x225))return migrateLegacyRegistry(_0x46fa04);if(!(_0x46fa04['protocol']===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x46fa04[_0x5d24e1(0x203)]===undefined&&_0x3c367a[_0x5d24e1(0x1fc)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x5d24e1(0x1fa)](_0x46fa04['models']))return undefined;const _0x36c922=_0x46fa04[_0x5d24e1(0x223)],_0x30f0b9=normalizeModelEntries(_0x36c922,_0x46fa04[_0x5d24e1(0x206)]);if(!_0x30f0b9)return undefined;return{'defaultProfile':_0x46fa04[_0x5d24e1(0x23c)],'profiles':_0x36c922,'models':_0x30f0b9};}catch{return undefined;}}export function readModelRegistry(_0x485ba4){const _0x44cc8c=a6_0x4f47ba;if(!existsSync(_0x485ba4))return undefined;try{return parseModelRegistry(readFileSync(_0x485ba4,_0x44cc8c(0x21f)));}catch{return undefined;}}function registrySource(_0x570a27){const _0x2db170=a6_0x4f47ba,_0x3d7e4d=Object[_0x2db170(0x1f7)](_0x570a27['profiles']),_0x35e226=_0x570a27[_0x2db170(0x206)][_0x2db170(0x230)](_0x3b6c73=>{const _0x5ea206=_0x2db170,_0x402569=_0x3d7e4d['map'](_0x38eec2=>_0x3b6c73[_0x5ea206(0x211)][_0x38eec2]),_0x279870=_0x402569[0x0],_0x2de3f6=_0x279870!==undefined&&_0x402569[_0x5ea206(0x21e)](_0x47abf7=>_0x47abf7===_0x279870),_0x12f813={'alias':_0x3b6c73['alias'],'tableName':_0x3b6c73['tableName'],'name':_0x3b6c73[_0x5ea206(0x1f5)]};return _0x2de3f6?{..._0x12f813,'datasetCode':_0x279870}:{..._0x12f813,'datasetCodes':_0x3b6c73[_0x5ea206(0x211)]};}),_0xfc3b3=JSON[_0x2db170(0x212)]({'defaultProfile':_0x570a27[_0x2db170(0x23c)],'profiles':_0x570a27[_0x2db170(0x223)],'models':_0x35e226},null,0x2)[_0x2db170(0x207)]('\x0a')['map'](_0xc99076=>'\x20\x20'+_0xc99076)[_0x2db170(0x205)]('\x0a');return _0x2db170(0x21b)+MODEL_REGISTRY_VERSION_MARKER+_0x2db170(0x23e)+REGISTRY_START+'\x0a'+_0xfc3b3+_0x2db170(0x22b)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x55ea3d,_0x4ffd8a,_0x242505){const _0x2f0883=a6_0x4f47ba,_0x9a77c2=_0x242505[_0x2f0883(0x230)](_0x1e6b0c=>({..._0x1e6b0c,'alias':_0x1e6b0c[_0x2f0883(0x1f6)]||_0x1e6b0c[_0x2f0883(0x1f2)]})),_0x1ebe99=new Map(),_0x1c43d8=new Map();for(const _0xf46755 of _0x9a77c2){const _0x2978e9=_0x1ebe99[_0x2f0883(0x214)](_0xf46755[_0x2f0883(0x1f6)]);if(_0x2978e9&&_0x2978e9!==_0xf46755['tableName'])throw new Error(_0x2f0883(0x22d)+_0xf46755['alias']+_0x2f0883(0x1fb)+_0x2978e9+_0x2f0883(0x217)+_0xf46755[_0x2f0883(0x1f2)]+_0x2f0883(0x21d)+_0x4ffd8a+'\x22.');const _0x40fc26=_0x1c43d8[_0x2f0883(0x214)](_0xf46755[_0x2f0883(0x1f2)]);if(_0x40fc26&&_0x40fc26!==_0xf46755[_0x2f0883(0x1f6)])throw new Error(_0x2f0883(0x216)+_0xf46755[_0x2f0883(0x1f2)]+'\x22\x20maps\x20to\x20both\x20aliases\x20\x22'+_0x40fc26+'\x22\x20and\x20\x22'+_0xf46755[_0x2f0883(0x1f6)]+_0x2f0883(0x21d)+_0x4ffd8a+'\x22.');_0x1ebe99[_0x2f0883(0x20f)](_0xf46755[_0x2f0883(0x1f6)],_0xf46755[_0x2f0883(0x1f2)]),_0x1c43d8['set'](_0xf46755['tableName'],_0xf46755[_0x2f0883(0x1f6)]);const _0x51962c=_0x55ea3d[_0x2f0883(0x206)][_0x2f0883(0x1ff)](_0x6e50f2=>_0x6e50f2['alias']===_0xf46755[_0x2f0883(0x1f6)]);if(_0x51962c&&_0x51962c[_0x2f0883(0x1f2)]!==_0xf46755[_0x2f0883(0x1f2)])throw new Error('Model\x20alias\x20\x22'+_0xf46755['alias']+_0x2f0883(0x1f3)+_0x51962c[_0x2f0883(0x1f2)]+_0x2f0883(0x220)+_0xf46755[_0x2f0883(0x1f2)]+_0x2f0883(0x21d)+_0x4ffd8a+'\x22.');const _0x29827d=_0x55ea3d[_0x2f0883(0x206)][_0x2f0883(0x1ff)](_0x6a886=>_0x6a886['tableName']===_0xf46755['tableName']);if(_0x29827d&&_0x29827d[_0x2f0883(0x1f6)]!==_0xf46755[_0x2f0883(0x1f6)])throw new Error(_0x2f0883(0x216)+_0xf46755[_0x2f0883(0x1f2)]+_0x2f0883(0x23a)+_0x29827d[_0x2f0883(0x1f6)]+_0x2f0883(0x220)+_0xf46755[_0x2f0883(0x1f6)]+_0x2f0883(0x21d)+_0x4ffd8a+'\x22.');}for(const _0x20f8f8 of _0x55ea3d[_0x2f0883(0x206)]){delete _0x20f8f8['datasetCodes'][_0x4ffd8a];}for(const _0xdc0fc5 of _0x9a77c2){let _0x2a35f5=_0x55ea3d[_0x2f0883(0x206)][_0x2f0883(0x1ff)](_0x178167=>_0x178167[_0x2f0883(0x1f6)]===_0xdc0fc5[_0x2f0883(0x1f6)]);!_0x2a35f5&&(_0x2a35f5={'alias':_0xdc0fc5['alias'],'tableName':_0xdc0fc5['tableName'],'name':_0xdc0fc5[_0x2f0883(0x1f5)],'datasetCodes':{}},_0x55ea3d[_0x2f0883(0x206)][_0x2f0883(0x20a)](_0x2a35f5)),(_0x4ffd8a===_0x55ea3d[_0x2f0883(0x23c)]||!_0x2a35f5[_0x2f0883(0x211)][_0x55ea3d['defaultProfile']])&&(_0x2a35f5['alias']=_0xdc0fc5[_0x2f0883(0x1f6)],_0x2a35f5[_0x2f0883(0x1f2)]=_0xdc0fc5[_0x2f0883(0x1f2)],_0x2a35f5[_0x2f0883(0x1f5)]=_0xdc0fc5[_0x2f0883(0x1f5)]),_0x2a35f5[_0x2f0883(0x211)][_0x4ffd8a]=_0xdc0fc5['datasetCode'];}_0x55ea3d[_0x2f0883(0x206)]=_0x55ea3d[_0x2f0883(0x206)][_0x2f0883(0x23d)](_0x4a78ff=>Object['keys'](_0x4a78ff[_0x2f0883(0x211)])[_0x2f0883(0x21a)]>0x0);}function removeUnboundProfiles(_0x25b6be){const _0x4c0cbe=a6_0x4f47ba,_0x121e10=Object[_0x4c0cbe(0x215)](_0x25b6be[_0x4c0cbe(0x223)])[_0x4c0cbe(0x23d)](([,_0x539a4b])=>_0x539a4b[_0x4c0cbe(0x226)]===_0x4c0cbe(0x210))[_0x4c0cbe(0x230)](([_0x551434])=>_0x551434);if(_0x121e10[_0x4c0cbe(0x21a)]===0x0)return;for(const _0x1e510e of _0x121e10){delete _0x25b6be[_0x4c0cbe(0x223)][_0x1e510e];for(const _0x435406 of _0x25b6be[_0x4c0cbe(0x206)]){delete _0x435406['datasetCodes'][_0x1e510e];}}_0x25b6be['models']=_0x25b6be[_0x4c0cbe(0x206)][_0x4c0cbe(0x23d)](_0x3a30c1=>Object[_0x4c0cbe(0x1f7)](_0x3a30c1[_0x4c0cbe(0x211)])[_0x4c0cbe(0x21a)]>0x0);}export function getProfileModels(_0x4adb17,_0x2e8cd2){const _0x47e484=a6_0x4f47ba;return _0x4adb17[_0x47e484(0x206)][_0x47e484(0x234)](_0x3ddc0f=>{const _0x43fbf7=_0x47e484,_0x3b001b=_0x3ddc0f[_0x43fbf7(0x211)][_0x2e8cd2];return _0x3b001b?[{'datasetCode':_0x3b001b,'tableName':_0x3ddc0f[_0x43fbf7(0x1f2)],'name':_0x3ddc0f[_0x43fbf7(0x1f5)],'alias':_0x3ddc0f[_0x43fbf7(0x1f6)]}]:[];});}export function updateModelRegistry(_0x291c95){const _0x5b2d58=a6_0x4f47ba,_0x5e1138=a6_0x4515b0[_0x5b2d58(0x205)](_0x291c95[_0x5b2d58(0x239)],MODEL_REGISTRY_FILE_NAME),_0x2aec6e=existsSync(_0x5e1138),_0x2c5970=readModelRegistry(_0x5e1138);if(_0x2aec6e&&!_0x2c5970)throw new Error(MODEL_REGISTRY_FILE_NAME+'\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.');const _0x440275=_0x2c5970??emptyRegistry(_0x291c95[_0x5b2d58(0x23c)]);if(_0x291c95[_0x5b2d58(0x226)]!==_0x5b2d58(0x210))removeUnboundProfiles(_0x440275);const _0x3be304=_0x2c5970?getProfileModels(_0x2c5970,_0x291c95['profileName'])[_0x5b2d58(0x21a)]:0x0;if(_0x3be304>0x0&&_0x291c95[_0x5b2d58(0x206)][_0x5b2d58(0x21a)]===0x0&&!_0x291c95[_0x5b2d58(0x20c)])throw new Error(_0x5b2d58(0x228)+_0x3be304+_0x5b2d58(0x1fe)+_0x291c95[_0x5b2d58(0x22e)]+_0x5b2d58(0x238)+'Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.');_0x440275['defaultProfile']=_0x291c95[_0x5b2d58(0x23c)],_0x440275[_0x5b2d58(0x223)][_0x291c95[_0x5b2d58(0x22e)]]={'appCode':_0x291c95[_0x5b2d58(0x226)],'runtimeDomain':_0x291c95[_0x5b2d58(0x219)]},mergeProfileModels(_0x440275,_0x291c95[_0x5b2d58(0x22e)],_0x291c95[_0x5b2d58(0x206)]),mkdirSync(_0x291c95['outputDir'],{'recursive':!![]});const _0x309eac=_0x5e1138+'.'+process[_0x5b2d58(0x22f)]+'.'+Date[_0x5b2d58(0x1f9)]()+_0x5b2d58(0x233);try{writeFileSync(_0x309eac,registrySource(_0x440275),{'encoding':'utf8','mode':0x1a4}),renameSync(_0x309eac,_0x5e1138);}catch(_0x17aff5){try{unlinkSync(_0x309eac);}catch{}throw _0x17aff5;}return{'path':_0x5e1138,'registry':_0x440275,'existed':_0x2aec6e};}
|
|
1
|
+
const a6_0x1a83f6=a6_0x5140;(function(_0x4bc70a,_0x54da54){const _0x281057=a6_0x5140,_0x3e350d=_0x4bc70a();while(!![]){try{const _0x27b489=-parseInt(_0x281057(0x10c))/0x1*(-parseInt(_0x281057(0xff))/0x2)+parseInt(_0x281057(0xf6))/0x3*(-parseInt(_0x281057(0xd4))/0x4)+-parseInt(_0x281057(0xe2))/0x5+-parseInt(_0x281057(0xe9))/0x6+-parseInt(_0x281057(0xfd))/0x7+parseInt(_0x281057(0xdb))/0x8*(parseInt(_0x281057(0xf4))/0x9)+parseInt(_0x281057(0xe4))/0xa;if(_0x27b489===_0x54da54)break;else _0x3e350d['push'](_0x3e350d['shift']());}catch(_0x5c0b54){_0x3e350d['push'](_0x3e350d['shift']());}}}(a6_0x1ee9,0xbcdc5));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x1f4dbc from'node:path';export const MODEL_REGISTRY_FILE_NAME='models.generated.ts';export const MODEL_RUNTIME_FILE_NAME='model-runtime.ts';export const MODEL_REGISTRY_VERSION_MARKER='/*\x20rabetbase-model-registry:v2\x20*/';const LEGACY_MODEL_REGISTRY_V2_PROTOCOL='lovrabet-model-registry/v2',REGISTRY_START=a6_0x1a83f6(0x101),REGISTRY_END=a6_0x1a83f6(0xe0);function emptyRegistry(_0x1681f0){return{'defaultProfile':_0x1681f0,'profiles':{},'models':[]};}function extractRegistryJson(_0xd5a4af){const _0x14e440=a6_0x1a83f6,_0x2d56e2=_0xd5a4af[_0x14e440(0xe1)](REGISTRY_START),_0x2a1df6=_0xd5a4af[_0x14e440(0xe1)](REGISTRY_END);if(_0x2d56e2<0x0||_0x2a1df6<=_0x2d56e2)return undefined;return _0xd5a4af[_0x14e440(0xf0)](_0x2d56e2+REGISTRY_START[_0x14e440(0xd3)],_0x2a1df6)[_0x14e440(0xd5)]()[_0x14e440(0x102)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')['replace'](/;$/,'');}function migrateLegacyRegistry(_0x4ab8ad){const _0x266a35=a6_0x1a83f6,_0x1bb5ec=emptyRegistry(_0x4ab8ad[_0x266a35(0xe6)]);for(const [_0x5225af,_0x297a04]of Object['entries'](_0x4ab8ad['profiles'])){_0x1bb5ec[_0x266a35(0x100)][_0x5225af]={'appCode':_0x297a04[_0x266a35(0xea)],'runtimeDomain':_0x297a04[_0x266a35(0xd2)]},mergeProfileModels(_0x1bb5ec,_0x5225af,_0x297a04['models']);}return _0x1bb5ec;}function generatedObjectLiteralToJson(_0x47e937){const _0x272630=a6_0x1a83f6;let _0x36a98e='',_0x6d5d3,_0x159b3f=![],_0x58f6c4;for(let _0x27fb52=0x0;_0x27fb52<_0x47e937[_0x272630(0xd3)];_0x27fb52++){const _0x4ee47f=_0x47e937[_0x27fb52];if(_0x6d5d3){_0x36a98e+=_0x4ee47f;if(_0x159b3f)_0x159b3f=![];else{if(_0x4ee47f==='\x5c')_0x159b3f=!![];else{if(_0x4ee47f===_0x6d5d3)_0x6d5d3=undefined;}}continue;}if(_0x4ee47f==='\x22'){_0x6d5d3=_0x4ee47f,_0x36a98e+=_0x4ee47f,_0x58f6c4=_0x272630(0x10e);continue;}if(_0x4ee47f===','){let _0x2d4dc1=_0x27fb52+0x1;while(/\s/['test'](_0x47e937[_0x2d4dc1]??''))_0x2d4dc1++;if(_0x47e937[_0x2d4dc1]==='}'||_0x47e937[_0x2d4dc1]===']')continue;_0x36a98e+=_0x4ee47f,_0x58f6c4=',';continue;}if(_0x4ee47f==='{'||_0x4ee47f==='['){_0x36a98e+=_0x4ee47f,_0x58f6c4=_0x4ee47f;continue;}if(_0x4ee47f==='}'||_0x4ee47f===']'){_0x36a98e+=_0x4ee47f,_0x58f6c4=_0x4ee47f;continue;}if((_0x58f6c4==='{'||_0x58f6c4===',')&&/[A-Za-z_$]/[_0x272630(0x105)](_0x4ee47f)){let _0x212ee3=_0x27fb52+0x1;while(/[A-Za-z0-9_$]/[_0x272630(0x105)](_0x47e937[_0x212ee3]??''))_0x212ee3++;let _0xbcf86=_0x212ee3;while(/\s/[_0x272630(0x105)](_0x47e937[_0xbcf86]??''))_0xbcf86++;if(_0x47e937[_0xbcf86]===':'){_0x36a98e+=JSON['stringify'](_0x47e937[_0x272630(0xf0)](_0x27fb52,_0x212ee3)),_0x27fb52=_0x212ee3-0x1,_0x58f6c4='key';continue;}}_0x36a98e+=_0x4ee47f;if(!/\s/['test'](_0x4ee47f)&&_0x4ee47f!==':')_0x58f6c4=_0x272630(0x10e);}return _0x36a98e;}function parseGeneratedRegistryJson(_0x498a24){const _0x2a4992=a6_0x1a83f6;try{return JSON[_0x2a4992(0x103)](_0x498a24);}catch{return JSON[_0x2a4992(0x103)](generatedObjectLiteralToJson(_0x498a24));}}function normalizeModelEntries(_0x30bdf9,_0x54e1da){const _0x4590cd=a6_0x1a83f6,_0xd2820a=Object[_0x4590cd(0xd9)](_0x30bdf9),_0x3634ce=[];for(const _0x240787 of _0x54e1da){if(!_0x240787||typeof _0x240787!==_0x4590cd(0xdc)||Array[_0x4590cd(0xd0)](_0x240787))return undefined;const _0x34fcf2=_0x240787;if(typeof _0x34fcf2[_0x4590cd(0xd6)]!==_0x4590cd(0x107)||typeof _0x34fcf2[_0x4590cd(0xfc)]!==_0x4590cd(0x107)||typeof _0x34fcf2[_0x4590cd(0x109)]!==_0x4590cd(0x107))return undefined;let _0xa5e71;if(typeof _0x34fcf2[_0x4590cd(0xdd)]===_0x4590cd(0x107)&&_0x34fcf2['datasetCodes']===undefined)_0xa5e71=Object[_0x4590cd(0xda)](_0xd2820a[_0x4590cd(0xfa)](_0x2aad66=>[_0x2aad66,_0x34fcf2[_0x4590cd(0xdd)]]));else{if(_0x34fcf2['datasetCode']===undefined&&_0x34fcf2['datasetCodes']&&typeof _0x34fcf2['datasetCodes']===_0x4590cd(0xdc)&&!Array[_0x4590cd(0xd0)](_0x34fcf2['datasetCodes'])&&Object[_0x4590cd(0xd7)](_0x34fcf2[_0x4590cd(0xfe)])[_0x4590cd(0xed)](_0x3bc0bf=>typeof _0x3bc0bf===_0x4590cd(0x107)))_0xa5e71={..._0x34fcf2[_0x4590cd(0xfe)]};else return undefined;}_0x3634ce[_0x4590cd(0xcf)]({'alias':_0x34fcf2[_0x4590cd(0xd6)],'tableName':_0x34fcf2[_0x4590cd(0xfc)],'name':_0x34fcf2['name'],'datasetCodes':_0xa5e71});}return _0x3634ce;}export function parseModelRegistry(_0x10b351){const _0x3ce3df=a6_0x1a83f6,_0x4c922c=extractRegistryJson(_0x10b351);if(!_0x4c922c)return undefined;try{const _0x2ca928=parseGeneratedRegistryJson(_0x4c922c);if(typeof _0x2ca928['defaultProfile']!=='string'||!_0x2ca928[_0x3ce3df(0x100)]||typeof _0x2ca928['profiles']!==_0x3ce3df(0xdc))return undefined;if(_0x2ca928[_0x3ce3df(0xfb)]===_0x3ce3df(0x10a))return migrateLegacyRegistry(_0x2ca928);if(!(_0x2ca928[_0x3ce3df(0xfb)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x2ca928[_0x3ce3df(0xfb)]===undefined&&_0x10b351['includes'](MODEL_REGISTRY_VERSION_MARKER))||!Array['isArray'](_0x2ca928['models']))return undefined;const _0x516432=_0x2ca928[_0x3ce3df(0x100)],_0x2960a2=normalizeModelEntries(_0x516432,_0x2ca928[_0x3ce3df(0xf3)]);if(!_0x2960a2)return undefined;return{'defaultProfile':_0x2ca928[_0x3ce3df(0xe6)],'profiles':_0x516432,'models':_0x2960a2};}catch{return undefined;}}export function readModelRegistry(_0x5a7f75){const _0x165f26=a6_0x1a83f6;if(!existsSync(_0x5a7f75))return undefined;try{return parseModelRegistry(readFileSync(_0x5a7f75,_0x165f26(0xce)));}catch{return undefined;}}function registrySource(_0x4ab874){const _0x7d0631=a6_0x1a83f6,_0x3cea7f=Object[_0x7d0631(0xd9)](_0x4ab874['profiles']),_0x265c6d=_0x4ab874[_0x7d0631(0xf3)][_0x7d0631(0xfa)](_0x4ba1e0=>{const _0x1b3c03=_0x7d0631,_0x1a0992=_0x3cea7f['map'](_0x3de8d0=>_0x4ba1e0[_0x1b3c03(0xfe)][_0x3de8d0]),_0x15cb38=_0x1a0992[0x0],_0x599422=_0x15cb38!==undefined&&_0x1a0992[_0x1b3c03(0xed)](_0x17a5f9=>_0x17a5f9===_0x15cb38),_0x59f0b5={'alias':_0x4ba1e0['alias'],'tableName':_0x4ba1e0[_0x1b3c03(0xfc)],'name':_0x4ba1e0[_0x1b3c03(0x109)]};return _0x599422?{..._0x59f0b5,'datasetCode':_0x15cb38}:{..._0x59f0b5,'datasetCodes':_0x4ba1e0[_0x1b3c03(0xfe)]};}),_0x57d511=JSON['stringify']({'defaultProfile':_0x4ab874[_0x7d0631(0xe6)],'profiles':_0x4ab874[_0x7d0631(0x100)],'models':_0x265c6d},null,0x2)['split']('\x0a')[_0x7d0631(0xfa)](_0x15404a=>'\x20\x20'+_0x15404a)[_0x7d0631(0xe5)]('\x0a');return _0x7d0631(0xf9)+MODEL_REGISTRY_VERSION_MARKER+_0x7d0631(0xe7)+REGISTRY_START+'\x0a'+_0x57d511+_0x7d0631(0xef)+REGISTRY_END+'\x0a';}function a6_0x5140(_0xa6d3c7,_0xa5a44d){_0xa6d3c7=_0xa6d3c7-0xcb;const _0x1ee990=a6_0x1ee9();let _0x51403e=_0x1ee990[_0xa6d3c7];return _0x51403e;}function mergeProfileModels(_0xb3fd5a,_0x4fd7fd,_0x641ddb){const _0x46b6f3=a6_0x1a83f6,_0xcf68e3=_0x641ddb[_0x46b6f3(0xfa)](_0x574999=>({..._0x574999,'alias':_0x574999['alias']||_0x574999[_0x46b6f3(0xfc)]})),_0x1321f8=new Map(),_0x9ed012=new Map();for(const _0x11938d of _0xcf68e3){const _0x383e07=_0x1321f8[_0x46b6f3(0x108)](_0x11938d['alias']);if(_0x383e07&&_0x383e07!==_0x11938d['tableName'])throw new Error('Model\x20alias\x20\x22'+_0x11938d[_0x46b6f3(0xd6)]+_0x46b6f3(0x10d)+_0x383e07+_0x46b6f3(0xee)+_0x11938d[_0x46b6f3(0xfc)]+_0x46b6f3(0xd1)+_0x4fd7fd+'\x22.');const _0x417ba7=_0x9ed012[_0x46b6f3(0x108)](_0x11938d['tableName']);if(_0x417ba7&&_0x417ba7!==_0x11938d[_0x46b6f3(0xd6)])throw new Error('Table\x20\x22'+_0x11938d[_0x46b6f3(0xfc)]+_0x46b6f3(0x10b)+_0x417ba7+_0x46b6f3(0xee)+_0x11938d[_0x46b6f3(0xd6)]+_0x46b6f3(0xd1)+_0x4fd7fd+'\x22.');_0x1321f8[_0x46b6f3(0xcd)](_0x11938d[_0x46b6f3(0xd6)],_0x11938d[_0x46b6f3(0xfc)]),_0x9ed012[_0x46b6f3(0xcd)](_0x11938d[_0x46b6f3(0xfc)],_0x11938d['alias']);const _0x2677f6=_0xb3fd5a[_0x46b6f3(0xf3)]['find'](_0x387bba=>_0x387bba['alias']===_0x11938d[_0x46b6f3(0xd6)]);if(_0x2677f6&&_0x2677f6[_0x46b6f3(0xfc)]!==_0x11938d[_0x46b6f3(0xfc)])throw new Error('Model\x20alias\x20\x22'+_0x11938d[_0x46b6f3(0xd6)]+_0x46b6f3(0xf1)+_0x2677f6[_0x46b6f3(0xfc)]+_0x46b6f3(0x106)+_0x11938d[_0x46b6f3(0xfc)]+'\x22\x20in\x20profile\x20\x22'+_0x4fd7fd+'\x22.');const _0x5eac1c=_0xb3fd5a[_0x46b6f3(0xf3)][_0x46b6f3(0x104)](_0x30b517=>_0x30b517['tableName']===_0x11938d[_0x46b6f3(0xfc)]);if(_0x5eac1c&&_0x5eac1c['alias']!==_0x11938d[_0x46b6f3(0xd6)])throw new Error(_0x46b6f3(0xf5)+_0x11938d['tableName']+'\x22\x20maps\x20to\x20alias\x20\x22'+_0x5eac1c[_0x46b6f3(0xd6)]+_0x46b6f3(0x106)+_0x11938d[_0x46b6f3(0xd6)]+_0x46b6f3(0xd1)+_0x4fd7fd+'\x22.');}for(const _0x520133 of _0xb3fd5a[_0x46b6f3(0xf3)]){delete _0x520133[_0x46b6f3(0xfe)][_0x4fd7fd];}for(const _0x47153c of _0xcf68e3){let _0x182611=_0xb3fd5a['models'][_0x46b6f3(0x104)](_0x1ac19b=>_0x1ac19b[_0x46b6f3(0xd6)]===_0x47153c[_0x46b6f3(0xd6)]);!_0x182611&&(_0x182611={'alias':_0x47153c[_0x46b6f3(0xd6)],'tableName':_0x47153c[_0x46b6f3(0xfc)],'name':_0x47153c[_0x46b6f3(0x109)],'datasetCodes':{}},_0xb3fd5a[_0x46b6f3(0xf3)]['push'](_0x182611)),(_0x4fd7fd===_0xb3fd5a[_0x46b6f3(0xe6)]||!_0x182611[_0x46b6f3(0xfe)][_0xb3fd5a['defaultProfile']])&&(_0x182611[_0x46b6f3(0xd6)]=_0x47153c['alias'],_0x182611[_0x46b6f3(0xfc)]=_0x47153c[_0x46b6f3(0xfc)],_0x182611['name']=_0x47153c[_0x46b6f3(0x109)]),_0x182611['datasetCodes'][_0x4fd7fd]=_0x47153c['datasetCode'];}_0xb3fd5a[_0x46b6f3(0xf3)]=_0xb3fd5a['models']['filter'](_0x28054a=>Object[_0x46b6f3(0xd9)](_0x28054a['datasetCodes'])[_0x46b6f3(0xd3)]>0x0);}function removeUnboundProfiles(_0x5c2e1d){const _0x93717=a6_0x1a83f6,_0x1f35ff=Object[_0x93717(0xdf)](_0x5c2e1d[_0x93717(0x100)])[_0x93717(0xd8)](([,_0x264cf4])=>_0x264cf4[_0x93717(0xea)]===_0x93717(0xeb))[_0x93717(0xfa)](([_0xde6227])=>_0xde6227);if(_0x1f35ff['length']===0x0)return;for(const _0x244cd2 of _0x1f35ff){delete _0x5c2e1d[_0x93717(0x100)][_0x244cd2];for(const _0x236d01 of _0x5c2e1d[_0x93717(0xf3)]){delete _0x236d01[_0x93717(0xfe)][_0x244cd2];}}_0x5c2e1d['models']=_0x5c2e1d[_0x93717(0xf3)][_0x93717(0xd8)](_0x503e43=>Object[_0x93717(0xd9)](_0x503e43[_0x93717(0xfe)])[_0x93717(0xd3)]>0x0);}export function getProfileModels(_0x4fd1a9,_0x40455d){const _0x40d322=a6_0x1a83f6;return _0x4fd1a9[_0x40d322(0xf3)][_0x40d322(0xf2)](_0x2edeec=>{const _0x5e4f0b=_0x40d322,_0x1bddae=_0x2edeec[_0x5e4f0b(0xfe)][_0x40455d];return _0x1bddae?[{'datasetCode':_0x1bddae,'tableName':_0x2edeec['tableName'],'name':_0x2edeec[_0x5e4f0b(0x109)],'alias':_0x2edeec['alias']}]:[];});}export function updateModelRegistry(_0x5b9c11){const _0x3584a7=a6_0x1a83f6,_0x876eb=a6_0x1f4dbc[_0x3584a7(0xe5)](_0x5b9c11[_0x3584a7(0xde)],MODEL_REGISTRY_FILE_NAME),_0x458525=existsSync(_0x876eb),_0xf8e273=readModelRegistry(_0x876eb);if(_0x458525&&!_0xf8e273)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x3584a7(0xf8));const _0x3316f0=_0xf8e273??emptyRegistry(_0x5b9c11[_0x3584a7(0xe6)]);if(_0x5b9c11[_0x3584a7(0xea)]!==_0x3584a7(0xeb))removeUnboundProfiles(_0x3316f0);const _0x5ed276=_0xf8e273?getProfileModels(_0xf8e273,_0x5b9c11['profileName'])[_0x3584a7(0xd3)]:0x0;if(_0x5ed276>0x0&&_0x5b9c11[_0x3584a7(0xf3)][_0x3584a7(0xd3)]===0x0&&!_0x5b9c11['allowEmptyReplacement'])throw new Error(_0x3584a7(0xcc)+_0x5ed276+'\x20model(s)\x20in\x20profile\x20\x22'+_0x5b9c11[_0x3584a7(0xec)]+_0x3584a7(0xcb)+_0x3584a7(0xe8));_0x3316f0[_0x3584a7(0xe6)]=_0x5b9c11['defaultProfile'],_0x3316f0[_0x3584a7(0x100)][_0x5b9c11['profileName']]={'appCode':_0x5b9c11[_0x3584a7(0xea)],'runtimeDomain':_0x5b9c11[_0x3584a7(0xd2)]},mergeProfileModels(_0x3316f0,_0x5b9c11['profileName'],_0x5b9c11[_0x3584a7(0xf3)]),mkdirSync(_0x5b9c11[_0x3584a7(0xde)],{'recursive':!![]});const _0x308958=_0x876eb+'.'+process[_0x3584a7(0xe3)]+'.'+Date[_0x3584a7(0xf7)]()+'.tmp';try{writeFileSync(_0x308958,registrySource(_0x3316f0),{'encoding':_0x3584a7(0xce),'mode':0x1a4}),renameSync(_0x308958,_0x876eb);}catch(_0x295134){try{unlinkSync(_0x308958);}catch{}throw _0x295134;}return{'path':_0x876eb,'registry':_0x3316f0,'existed':_0x458525};}function a6_0x1ee9(){const _0xc60a23=['236858kzaMRl','profiles','/*\x20rabetbase-model-registry:start\x20*/','replace','parse','find','test','\x22\x20in\x20the\x20registry\x20but\x20\x22','string','get','name','lovrabet-model-registry/v1','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','2IlMYpl','\x22\x20maps\x20to\x20both\x20\x22','value','\x22\x20with\x20an\x20empty\x20result.\x20','Refusing\x20to\x20replace\x20','set','utf8','push','isArray','\x22\x20in\x20profile\x20\x22','runtimeDomain','length','540JPDVHS','trim','alias','values','filter','keys','fromEntries','42424wZFTdd','object','datasetCode','outputDir','entries','/*\x20rabetbase-model-registry:end\x20*/','indexOf','3305885jxFUXk','pid','21349290dUcJpl','join','defaultProfile','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','7160592CJjxeA','appCode','NOT-SET','profileName','every','\x22\x20and\x20\x22','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','slice','\x22\x20maps\x20to\x20table\x20\x22','flatMap','models','1503hJMQcg','Table\x20\x22','1005JpiSRk','now','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','/**\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','map','protocol','tableName','4087867YTkPvE','datasetCodes'];a6_0x1ee9=function(){return _0xc60a23;};return a6_0x1ee9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a7_0x12f67d=a7_0x23ff;(function(_0x57c7f9,_0x698b4f){const _0x122689=a7_0x23ff,_0x5e66da=_0x57c7f9();while(!![]){try{const _0x40b901=parseInt(_0x122689(0x108))/0x1*(-parseInt(_0x122689(0x117))/0x2)+-parseInt(_0x122689(0x111))/0x3+-parseInt(_0x122689(0x119))/0x4*(-parseInt(_0x122689(0x11c))/0x5)+parseInt(_0x122689(0x10c))/0x6+-parseInt(_0x122689(0x10d))/0x7*(parseInt(_0x122689(0x114))/0x8)+-parseInt(_0x122689(0x10b))/0x9+parseInt(_0x122689(0x11d))/0xa*(parseInt(_0x122689(0x110))/0xb);if(_0x40b901===_0x698b4f)break;else _0x5e66da['push'](_0x5e66da['shift']());}catch(_0x29e76c){_0x5e66da['push'](_0x5e66da['shift']());}}}(a7_0xa34d,0x57204));import{readFileSync}from'node:fs';import a7_0x57b15b from'node:path';function a7_0xa34d(){const _0x11e5d2=['1595412vLiBoC','profile-api.ts.tpl','profile-client.ts.tpl','2213936TdfIFJ','typescript','cwd','1366EIHibk','startsWith','1238360nMmxDs','join','replace','5SleULz','29840oTbIht','resolve','relative','141DkOQqp','utf8','model-runtime.ts.tpl','1399518ythuBw','3781134IHyPjn','7yQCNJa','format','{ProjectRoutingImport}','1760pDUEuM'];a7_0xa34d=function(){return _0x11e5d2;};return a7_0xa34d();}import{fileURLToPath}from'node:url';function a7_0x23ff(_0x45fdca,_0x33248e){_0x45fdca=_0x45fdca-0x106;const _0xa34d92=a7_0xa34d();let _0x23ffed=_0xa34d92[_0x45fdca];return _0x23ffed;}import a7_0x4e0fb3 from'prettier';import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function relativeImport(_0x596125,_0x82521f){const _0x2235c3=a7_0x23ff;let _0x2343cb=a7_0x57b15b[_0x2235c3(0x107)](_0x596125,_0x82521f)[_0x2235c3(0x11b)](/\\/g,'/');if(!_0x2343cb[_0x2235c3(0x118)]('.'))_0x2343cb='./'+_0x2343cb;return _0x2343cb;}export async function renderModelRegistryScaffold(_0x1084d3,_0xeb6ec5=process[a7_0x12f67d(0x116)]()){const _0xadb93b=a7_0x12f67d,_0x9cdb9=fileURLToPath(import.meta.url),_0x34662e=a7_0x57b15b[_0xadb93b(0x106)](a7_0x57b15b['dirname'](_0x9cdb9),'../../templates/generate-api'),_0x5baea9=relativeImport(a7_0x57b15b['resolve'](_0x1084d3),a7_0x57b15b[_0xadb93b(0x106)](_0xeb6ec5,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x3a7ec4=readFileSync(a7_0x57b15b[_0xadb93b(0x11a)](_0x34662e,_0xadb93b(0x112)),'utf8')['replace'](_0xadb93b(0x10f),_0x5baea9),[_0x5da30b,_0x515efa,_0x4a44a8]=await Promise['all']([a7_0x4e0fb3[_0xadb93b(0x10e)](_0x3a7ec4,{'parser':_0xadb93b(0x115)}),a7_0x4e0fb3['format'](readFileSync(a7_0x57b15b['join'](_0x34662e,_0xadb93b(0x113)),_0xadb93b(0x109)),{'parser':'typescript'}),a7_0x4e0fb3[_0xadb93b(0x10e)](readFileSync(a7_0x57b15b[_0xadb93b(0x11a)](_0x34662e,_0xadb93b(0x10a)),_0xadb93b(0x109)),{'parser':'typescript'})]);return{'api':_0x5da30b,'client':_0x515efa,'modelRuntime':_0x4a44a8};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53d9c0,_0x2ddd61){const _0x16f54f=a8_0x1fcd,_0x11c1cc=_0x53d9c0();while(!![]){try{const _0x476f6f=parseInt(_0x16f54f(0x1a9))/0x1+parseInt(_0x16f54f(0x1ac))/0x2+parseInt(_0x16f54f(0x1ad))/0x3*(parseInt(_0x16f54f(0x1b9))/0x4)+-parseInt(_0x16f54f(0x1b6))/0x5+-parseInt(_0x16f54f(0x1c1))/0x6*(parseInt(_0x16f54f(0x1a6))/0x7)+parseInt(_0x16f54f(0x1a7))/0x8*(-parseInt(_0x16f54f(0x1b5))/0x9)+parseInt(_0x16f54f(0x1bb))/0xa;if(_0x476f6f===_0x2ddd61)break;else _0x11c1cc['push'](_0x11c1cc['shift']());}catch(_0x5f0cf2){_0x11c1cc['push'](_0x11c1cc['shift']());}}}(a8_0x5822,0x497c1));import{existsSync}from'node:fs';function a8_0x1fcd(_0x58e345,_0x4c80e){_0x58e345=_0x58e345-0x1a6;const _0x582286=a8_0x5822();let _0x1fcd52=_0x582286[_0x58e345];return _0x1fcd52;}import a8_0x4581e5 from'node:path';import{readRawConfig}from'../context/config-loader.js';import{MODEL_REGISTRY_FILE_NAME,readModelRegistry}from'../api/model-registry-file.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a8_0x5822(){const _0x82b4b1=['defaultApp','cwd','65016dDJzXP','Model\x20profile\x20\x22','8823140CkuJRw','validation','resolve','object','\x20api\x20pull\x20--app\x20','profiles','6xOvfeu','entries','2515443kFeGVI','314392nooMWt','Run\x20`','292453SeeIIs','map','apps','301996kEumbL','3LFUSse','api.ts','defaultProfile','\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20','appcode','`\x20first.','apiDir','length','72oLHCsX','1836425MTEhGX'];a8_0x5822=function(){return _0x82b4b1;};return a8_0x5822();}export function resolveApiModelSource(_0x244e96,_0x960fbb,_0x5e15b6){const _0x50fe10=a8_0x1fcd,_0x41cf22=a8_0x4581e5[_0x50fe10(0x1bd)](process[_0x50fe10(0x1b8)](),_0x244e96),_0x7064c5=a8_0x4581e5[_0x50fe10(0x1bd)](_0x41cf22,_0x50fe10(0x1ae)),_0x1ca3f9=a8_0x4581e5[_0x50fe10(0x1bd)](_0x41cf22,MODEL_REGISTRY_FILE_NAME),_0x505683=readModelRegistry(_0x1ca3f9);if(_0x505683){const _0x365b80=_0x960fbb?Object['entries'](_0x505683[_0x50fe10(0x1c0)])['filter'](([,_0x2c020b])=>_0x2c020b['appCode']===_0x960fbb):[];if(_0x5e15b6){if(_0x505683[_0x50fe10(0x1c0)][_0x5e15b6])return{'filePath':_0x1ca3f9,'profileName':_0x5e15b6};if(_0x365b80[_0x50fe10(0x1b4)]>0x0)throw CliErrors[_0x50fe10(0x1bc)](_0x50fe10(0x1ba)+_0x5e15b6+'\x22\x20is\x20missing\x20from\x20'+MODEL_REGISTRY_FILE_NAME+'.',_0x50fe10(0x1a8)+CLI_BIN_NAME+_0x50fe10(0x1bf)+_0x5e15b6+_0x50fe10(0x1b2));}else{if(_0x365b80[_0x50fe10(0x1b4)]===0x1)return{'filePath':_0x1ca3f9,'profileName':_0x365b80[0x0][0x0]};if(_0x365b80[_0x50fe10(0x1b4)]>0x1)throw new Error('AppCode\x20\x22'+_0x960fbb+_0x50fe10(0x1b0)+_0x365b80[_0x50fe10(0x1aa)](([_0x5da406])=>_0x5da406)['join'](',\x20')+'.\x20'+'Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.');if(_0x505683[_0x50fe10(0x1c0)][_0x505683[_0x50fe10(0x1af)]]&&!_0x960fbb)return{'filePath':_0x1ca3f9,'profileName':_0x505683[_0x50fe10(0x1af)]};}}if(!_0x960fbb&&!_0x5e15b6)return{'filePath':_0x7064c5};const _0x31ee6f=readRawConfig(),_0x52a098=_0x31ee6f[_0x50fe10(0x1ab)]&&typeof _0x31ee6f[_0x50fe10(0x1ab)]===_0x50fe10(0x1be)?_0x31ee6f[_0x50fe10(0x1ab)]:{},_0x49e3c1=_0x5e15b6&&_0x52a098[_0x5e15b6]?[_0x5e15b6,_0x52a098[_0x5e15b6]]:Object[_0x50fe10(0x1c2)](_0x52a098)['find'](([,_0x4e9072])=>_0x4e9072?.[_0x50fe10(0x1b1)]===_0x960fbb);if(!_0x49e3c1)return{'filePath':_0x7064c5};const [_0x490a34,_0x39789f]=_0x49e3c1,_0x15d3e6=typeof _0x31ee6f[_0x50fe10(0x1b7)]==='string'?_0x31ee6f['defaultApp']:undefined;if(_0x39789f?.[_0x50fe10(0x1b3)])return{'filePath':_0x7064c5};if(_0x15d3e6&&_0x490a34!==_0x15d3e6){const _0x40474c=a8_0x4581e5[_0x50fe10(0x1bd)](_0x41cf22,_0x490a34+'-api.ts');if(existsSync(_0x40474c))return{'filePath':_0x40474c};}return{'filePath':_0x7064c5};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x489e82,_0x4b545a){const _0x3ee8a1=a9_0x276d,_0x6be4c4=_0x489e82();while(!![]){try{const _0x40fb33=parseInt(_0x3ee8a1(0x190))/0x1+parseInt(_0x3ee8a1(0x186))/0x2*(parseInt(_0x3ee8a1(0x182))/0x3)+parseInt(_0x3ee8a1(0x191))/0x4+parseInt(_0x3ee8a1(0x18b))/0x5*(parseInt(_0x3ee8a1(0x18d))/0x6)+parseInt(_0x3ee8a1(0x184))/0x7+-parseInt(_0x3ee8a1(0x17e))/0x8*(-parseInt(_0x3ee8a1(0x17f))/0x9)+-parseInt(_0x3ee8a1(0x185))/0xa;if(_0x40fb33===_0x4b545a)break;else _0x6be4c4['push'](_0x6be4c4['shift']());}catch(_0x5eceb7){_0x6be4c4['push'](_0x6be4c4['shift']());}}}(a9_0x776b,0x9cbbe));function a9_0x776b(){const _0x27b262=['12816rZDTfe','start','Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','498298eXDQWW','1681676yCFLjZ','!\x20Login\x20failed.','validation','8WKADAR','10477269OOuZoP','Run\x20`','log','41295tCpYUP','*\x20Login\x20successful!','5321134nHcLTg','39800610zZvfGl','166NmnojN','nonInteractive','stop','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','1490kplJlP','autoYes'];a9_0x776b=function(){return _0x27b262;};return a9_0x776b();}function a9_0x276d(_0x5da885,_0x150baa){_0x5da885=_0x5da885-0x17e;const _0x776ba2=a9_0x776b();let _0x276d8c=_0x776ba2[_0x5da885];return _0x276d8c;}import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';import a9_0x327d05 from'ora';export async function runAuthServer(_0x55cf65){const _0x1021d1=a9_0x276d,_0x10a57f=await getIsSessionValid();if(_0x10a57f){console[_0x1021d1(0x181)]('√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.');return;}if(_0x55cf65?.[_0x1021d1(0x187)]&&!_0x55cf65[_0x1021d1(0x18c)])throw CliErrors[_0x1021d1(0x193)](_0x1021d1(0x18f),_0x1021d1(0x180)+CLI_BIN_NAME+'\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.');const _0x49b581=_0x55cf65?.['autoYes']?!![]:await confirm({'message':'No\x20valid\x20session.\x20Login\x20now?','default':!![]});if(!_0x49b581)return;if(_0x55cf65?.[_0x1021d1(0x187)]){console[_0x1021d1(0x181)](_0x1021d1(0x189));const _0x2c5a86=await authServer({'silent':![],'openBrowser':![]});_0x2c5a86?console[_0x1021d1(0x181)]('*\x20Login\x20successful!'):console[_0x1021d1(0x181)](_0x1021d1(0x192));return;}const _0x4be9ab=a9_0x327d05(_0x1021d1(0x18a))[_0x1021d1(0x18e)](),_0x32642d=await authServer({'silent':!![],'openBrowser':!![]});_0x4be9ab[_0x1021d1(0x188)](),_0x32642d?console[_0x1021d1(0x181)](_0x1021d1(0x183)):console[_0x1021d1(0x181)](_0x1021d1(0x192));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x1b9751=a10_0x3279;(function(_0x49dd84,_0x2220ed){const _0x650de8=a10_0x3279,_0x4284fc=_0x49dd84();while(!![]){try{const _0x17fba4=-parseInt(_0x650de8(0xde))/0x1*(parseInt(_0x650de8(0xf4))/0x2)+-parseInt(_0x650de8(0xe2))/0x3*(-parseInt(_0x650de8(0x101))/0x4)+parseInt(_0x650de8(0x100))/0x5*(-parseInt(_0x650de8(0xea))/0x6)+-parseInt(_0x650de8(0xf2))/0x7+parseInt(_0x650de8(0xef))/0x8+-parseInt(_0x650de8(0x108))/0x9+parseInt(_0x650de8(0xdf))/0xa;if(_0x17fba4===_0x2220ed)break;else _0x4284fc['push'](_0x4284fc['shift']());}catch(_0x34956b){_0x4284fc['push'](_0x4284fc['shift']());}}}(a10_0x4bfa,0x2d178));import{writeFileSync}from'node:fs';import a10_0x75e751 from'node:http';function a10_0x3279(_0x2c579a,_0x4381bd){_0x2c579a=_0x2c579a-0xdc;const _0x4bfa80=a10_0x4bfa();let _0x32791e=_0x4bfa80[_0x2c579a];return _0x32791e;}import a10_0x3c58a0 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';function a10_0x4bfa(){const _0x476cf8=['⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','timeoutMs','isAuth','port','json','127.0.0.1','lovrabet','silent','end','listen','darwin','954190dMjHQl','92XJHkat','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','/sign-in?redirect=','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','cmd\x20/c\x20start\x20\x22\x22\x20\x22','text/html;\x20charset=utf-8','user','357075MdjGxi','!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','close','then','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','open\x20\x22','/api/auth/get-session','📍\x20Login\x20URL:','error','origin','9895YugPRH','7797900uugQko','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','address','4095aKXOnO','catch','local','certificateUrl','headers','🔐\x20Starting\x20login\x20service...','object','platform','6pEhROp','win32','openBrowser','createServer','xdg-open\x20\x22','1211160npgPak','writeHead','utf-8','1822912shfnyR','log','58MdNzhI'];a10_0x4bfa=function(){return _0x476cf8;};return a10_0x4bfa();}import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export function resolveAuthCallbackRouting(_0x3277c1){const _0x1ae01e=a10_0x3279;if(!_0x3277c1)return getProjectDomainRoutingManifest()[_0x1ae01e(0xe4)];const _0x49b7f7=getOfficialRoutingProfile(_0x3277c1),_0x27ce37=getOfficialRoutingCdn(_0x3277c1);return{'origin':_0x49b7f7['local'][_0x1ae01e(0xdd)],'certificateUrl':_0x27ce37[_0x1ae01e(0xfb)]+'/cert/lovrabet-dev.json'};}function withPort(_0x497189,_0x4547f9){const _0x52fd24=a10_0x3279,_0x5947cb=new URL(_0x497189);return _0x5947cb[_0x52fd24(0xf8)]=String(_0x4547f9),_0x5947cb['origin'];}export async function authServer(_0x5cedac){const _0x2cb589=a10_0x3279,_0x5729dc=_0x5cedac?.[_0x2cb589(0xfc)]||![],_0x1c5700=_0x5cedac?.[_0x2cb589(0xec)]??!![],_0x964485=_0x5cedac?.[_0x2cb589(0xf6)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x47af2c=resolveAuthCallbackRouting(),_0x312352=_0x47af2c[_0x2cb589(0xe5)]?await(await fetch(_0x47af2c['certificateUrl']))[_0x2cb589(0xf9)]():undefined;return new Promise(async(_0x4aa3a8,_0x2e248f)=>{const _0x1f16a2=_0x2cb589;let _0xfc3a40=0x0,_0x39f62d=![],_0x4a030d;const _0x37a787=async(_0x3df529,_0x1d181e)=>{const _0x7b4fb9=a10_0x3279,_0x382fd4=getUserDomain(),_0x15d86c=_0x3df529[_0x7b4fb9(0xe6)]['cookie']||'',_0x11a7d7=await fetch(_0x382fd4+_0x7b4fb9(0x10e),{'headers':{'cookie':_0x15d86c}})[_0x7b4fb9(0x10b)](_0x33f2f0=>_0x33f2f0[_0x7b4fb9(0xf9)]()),_0x25e65a=_0x11a7d7&&_0x11a7d7['session']&&_0x11a7d7[_0x7b4fb9(0x107)];if(_0x25e65a){writeFileSync(cookieFile,_0x15d86c,_0x7b4fb9(0xf1));const _0x2254c8=buildLoginSuccessHtml();_0x1d181e[_0x7b4fb9(0xf0)](0xc8,{'Content-Type':_0x7b4fb9(0x106)}),_0x1d181e[_0x7b4fb9(0xfd)](_0x2254c8),_0x1abd7c(!![]);}else{const _0x34594b=encodeURIComponent(withPort(_0x47af2c[_0x7b4fb9(0xdd)],_0xfc3a40));_0x1d181e[_0x7b4fb9(0xf0)](0x12e,{'location':_0x382fd4+_0x7b4fb9(0x103)+_0x34594b}),_0x1d181e[_0x7b4fb9(0xfd)]();return;}},_0x2450e6=_0x312352?a10_0x3c58a0[_0x1f16a2(0xed)](_0x312352,_0x37a787):a10_0x75e751[_0x1f16a2(0xed)](_0x37a787);function _0x1abd7c(_0x43373b){const _0x58cdea=_0x1f16a2;if(_0x39f62d)return;_0x39f62d=!![],_0x4a030d&&clearTimeout(_0x4a030d),_0x2450e6[_0x58cdea(0x10a)](),_0x4aa3a8(_0x43373b);}_0x2450e6[_0x1f16a2(0xfe)](0x0,_0x1f16a2(0xfa),()=>{const _0x46e7cd=_0x1f16a2,_0x71494d=_0x2450e6[_0x46e7cd(0xe1)]();_0xfc3a40=typeof _0x71494d===_0x46e7cd(0xe8)&&_0x71494d?_0x71494d[_0x46e7cd(0xf8)]:Number(_0x71494d);const _0x33607e=withPort(_0x47af2c['origin'],_0xfc3a40);_0x4a030d=setTimeout(()=>{const _0x2c5fd3=_0x46e7cd;!_0x5729dc&&console[_0x2c5fd3(0xf3)](_0x2c5fd3(0x109)),_0x1abd7c(![]);},_0x964485);!_0x5729dc&&(console[_0x46e7cd(0xf3)](_0x46e7cd(0xe7)),console[_0x46e7cd(0xf3)](_0x46e7cd(0x10f),_0x33607e),_0x1c5700?(console['log'](_0x46e7cd(0x104)),console[_0x46e7cd(0xf3)](''),console[_0x46e7cd(0xf3)](_0x46e7cd(0x10c))):console['log']('💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.'),console['log'](''));if(!_0x1c5700)return;openInBrowser(_0x33607e)[_0x46e7cd(0x10b)](_0xee97a3=>{const _0x917f31=_0x46e7cd;!_0x5729dc&&(_0xee97a3?console[_0x917f31(0xf3)](_0x917f31(0x102)):(console[_0x917f31(0xf3)](_0x917f31(0xf5)),console[_0x917f31(0xf3)](_0x917f31(0xe0),_0x33607e)),console[_0x917f31(0xf3)](''));})[_0x46e7cd(0xe3)](()=>{const _0x32b5c2=_0x46e7cd;!_0x5729dc&&(console['log']('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console['log'](_0x32b5c2(0xe0),_0x33607e),console['log'](''));});}),_0x2450e6['on'](_0x1f16a2(0xdc),_0x48c311=>{const _0x5044a5=_0x1f16a2;if(_0x39f62d)return;_0x39f62d=!![],_0x4a030d&&clearTimeout(_0x4a030d),!_0x5729dc&&console[_0x5044a5(0xdc)]('Auth\x20server\x20error:',_0x48c311),_0x2450e6[_0x5044a5(0x10a)](),_0x2e248f(_0x48c311);});});}function openInBrowser(_0x302680){return new Promise(_0x31800a=>{const _0x3ab70c=a10_0x3279,_0x5bffe3=process[_0x3ab70c(0xe9)];let _0x276c8b;if(_0x5bffe3===_0x3ab70c(0xeb))_0x276c8b=_0x3ab70c(0x105)+_0x302680+'\x22';else _0x5bffe3===_0x3ab70c(0xff)?_0x276c8b=_0x3ab70c(0x10d)+_0x302680+'\x22':_0x276c8b=_0x3ab70c(0xee)+_0x302680+'\x22';exec(_0x276c8b,_0x5bf249=>{_0x5bf249?_0x31800a(![]):_0x31800a(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a10_0x1b9751(0xf3)](a10_0x1b9751(0xf7),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a11_0x26c975=a11_0x57b2;function a11_0x57b2(_0x5f5828,_0x5c6bc4){_0x5f5828=_0x5f5828-0xbd;const _0x3a4f5c=a11_0x3a4f();let _0x57b214=_0x3a4f5c[_0x5f5828];return _0x57b214;}(function(_0x437212,_0x5b7b19){const _0x47a30d=a11_0x57b2,_0x156e56=_0x437212();while(!![]){try{const _0x5f5140=parseInt(_0x47a30d(0xc0))/0x1+-parseInt(_0x47a30d(0xc2))/0x2*(-parseInt(_0x47a30d(0xbd))/0x3)+parseInt(_0x47a30d(0xc4))/0x4+-parseInt(_0x47a30d(0xc1))/0x5+-parseInt(_0x47a30d(0xbe))/0x6+parseInt(_0x47a30d(0xc6))/0x7+parseInt(_0x47a30d(0xc5))/0x8*(-parseInt(_0x47a30d(0xc3))/0x9);if(_0x5f5140===_0x5b7b19)break;else _0x156e56['push'](_0x156e56['shift']());}catch(_0x2b7056){_0x156e56['push'](_0x156e56['shift']());}}}(a11_0x3a4f,0x3641c));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a11_0x26c975(0xbf));function a11_0x3a4f(){const _0x3cbe83=['49216cjHxyb','391566CISueR','1127601vclVhk','106092thldiP','.lovrabet','240945oEQaYs','1529190QZLpss','2hVuLun','738TKjhzl','1509880zkmPQg'];a11_0x3a4f=function(){return _0x3cbe83;};return a11_0x3a4f();}export const cookieFile=join(configDir,'cookie');mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2d542e,_0x1c85d8){var _0x243045=a12_0x48c6,_0x34ef73=_0x2d542e();while(!![]){try{var _0x38cdab=parseInt(_0x243045(0x129))/0x1*(parseInt(_0x243045(0x127))/0x2)+parseInt(_0x243045(0x128))/0x3+-parseInt(_0x243045(0x124))/0x4+parseInt(_0x243045(0x12b))/0x5+parseInt(_0x243045(0x12a))/0x6+-parseInt(_0x243045(0x126))/0x7+parseInt(_0x243045(0x125))/0x8;if(_0x38cdab===_0x1c85d8)break;else _0x34ef73['push'](_0x34ef73['shift']());}catch(_0x444ffe){_0x34ef73['push'](_0x34ef73['shift']());}}}(a12_0x3885,0xe42bc));import{readFileSync}from'node:fs';function a12_0x48c6(_0x1643ea,_0x3a2c7c){_0x1643ea=_0x1643ea-0x124;var _0x3885b7=a12_0x3885();var _0x48c67f=_0x3885b7[_0x1643ea];return _0x48c67f;}import{cookieFile}from'../auth/constant.js';export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}function a12_0x3885(){var _0x1a9d04=['7202992RWyRPA','5892544xUmSVO','62970yXpgeV','2061189USaulD','11ffDGeD','7783758YnlVSU','545790BzGryc','6255372YXvWTX'];a12_0x3885=function(){return _0x1a9d04;};return a12_0x3885();}
|
|
@@ -45,7 +45,7 @@ export type AuthSessionUserResponse = {
|
|
|
45
45
|
user: AuthUserPayload;
|
|
46
46
|
};
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* 使用调用方 Cookie 请求当前身份;无参数时保留原有的本地 Cookie 行为。
|
|
49
49
|
* 未登录、无 Cookie、请求失败或会话无效时返回 `null`。
|
|
50
50
|
*/
|
|
51
|
-
export declare function getSessionUserInfo(): Promise<AuthSessionUserResponse | null>;
|
|
51
|
+
export declare function getSessionUserInfo(cookie?: string): Promise<AuthSessionUserResponse | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x102461,_0x42f4c0){const _0x5c174c=a13_0x23a4,_0x14ed52=_0x102461();while(!![]){try{const _0x4248d3=-parseInt(_0x5c174c(0x1b0))/0x1*(-parseInt(_0x5c174c(0x1a5))/0x2)+-parseInt(_0x5c174c(0x1a7))/0x3*(parseInt(_0x5c174c(0x1af))/0x4)+-parseInt(_0x5c174c(0x1ac))/0x5+parseInt(_0x5c174c(0x1b1))/0x6*(-parseInt(_0x5c174c(0x1ab))/0x7)+parseInt(_0x5c174c(0x1a8))/0x8*(parseInt(_0x5c174c(0x1ad))/0x9)+-parseInt(_0x5c174c(0x1a6))/0xa+parseInt(_0x5c174c(0x1aa))/0xb;if(_0x4248d3===_0x42f4c0)break;else _0x14ed52['push'](_0x14ed52['shift']());}catch(_0x865143){_0x14ed52['push'](_0x14ed52['shift']());}}}(a13_0x87a8,0x719b8));import{existsSync,readFileSync}from'node:fs';function a13_0x23a4(_0x4ba59d,_0x5e334d){_0x4ba59d=_0x4ba59d-0x1a5;const _0x87a8ec=a13_0x87a8();let _0x23a456=_0x87a8ec[_0x4ba59d];return _0x23a456;}import{getUserDomain}from'../constant/domain.js';function a13_0x87a8(){const _0x221425=['json','16PubqtP','5CAzGii','30CJOKPj','106586zJftWU','6234160RFoPXx','608505ZGtTRl','522072FyaaRN','session','25273644TapJct','347613xoqtWa','4036180KMxOXe','54JLzDjq'];a13_0x87a8=function(){return _0x221425;};return a13_0x87a8();}import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(_0x3d355b){const _0x131433=a13_0x23a4;try{if(_0x3d355b===undefined){if(!existsSync(cookieFile))return null;_0x3d355b=readFileSync(cookieFile,'utf-8');}if(!_0x3d355b)return null;const _0x257991=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x3d355b}});if(!_0x257991['ok'])return null;const _0x500d59=await _0x257991[_0x131433(0x1ae)]();if(!_0x500d59[_0x131433(0x1a9)]||!_0x500d59['user'])return null;return _0x500d59;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a14_0x19e4(_0x310148,_0x3ed89f){_0x310148=_0x310148-0xd1;const _0x1e9f29=a14_0x1e9f();let _0x19e42f=_0x1e9f29[_0x310148];return _0x19e42f;}(function(_0x5953f4,_0xc87cc2){const _0x4fb9ae=a14_0x19e4,_0xbe50c1=_0x5953f4();while(!![]){try{const _0x4cb72c=-parseInt(_0x4fb9ae(0xd3))/0x1+parseInt(_0x4fb9ae(0xdb))/0x2*(parseInt(_0x4fb9ae(0xd5))/0x3)+parseInt(_0x4fb9ae(0xdc))/0x4*(-parseInt(_0x4fb9ae(0xd9))/0x5)+-parseInt(_0x4fb9ae(0xdf))/0x6+-parseInt(_0x4fb9ae(0xd4))/0x7+parseInt(_0x4fb9ae(0xd1))/0x8*(-parseInt(_0x4fb9ae(0xe0))/0x9)+-parseInt(_0x4fb9ae(0xd8))/0xa*(-parseInt(_0x4fb9ae(0xd7))/0xb);if(_0x4cb72c===_0xc87cc2)break;else _0xbe50c1['push'](_0xbe50c1['shift']());}catch(_0x5c22b9){_0xbe50c1['push'](_0xbe50c1['shift']());}}}(a14_0x1e9f,0xd1bdf));function a14_0x1e9f(){const _0x367ef2=['6009129PpBPoA','json','8HZsWBD','user','865508TVLVhI','11812612cpQZtp','165EkrUZc','then','1056JVnZas','731320qumWwa','267130WIGQPq','session','2542RlkFUg','116cezuBx','utf-8','/api/auth/get-session','8768490xrDeca'];a14_0x1e9f=function(){return _0x367ef2;};return a14_0x1e9f();}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x234d1d=a14_0x19e4;try{if(!existsSync(cookieFile))return![];const _0x394c52=readFileSync(cookieFile,_0x234d1d(0xdd)),_0x49ed5e=await fetch(getUserDomain()+_0x234d1d(0xde),{'headers':{'cookie':_0x394c52}})[_0x234d1d(0xd6)](_0x59c33d=>_0x59c33d[_0x234d1d(0xe1)]());return _0x49ed5e&&_0x49ed5e[_0x234d1d(0xda)]&&_0x49ed5e[_0x234d1d(0xd2)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a15_0x5d1d(){const _0x1507b8=['4fmyrPn','593624uTumIw','7105464psIzws','1990360iOSElk','28BJdfYb','</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>','12dxVIeW','11KBwPjo','347252mWYpnw','16850832IgfETD','21MEieck','<!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>','346404cTZWTp','9073570MauOMq'];a15_0x5d1d=function(){return _0x1507b8;};return a15_0x5d1d();}function a15_0x1809(_0x1e94ff,_0x5ec92a){_0x1e94ff=_0x1e94ff-0x1ea;const _0x5d1daa=a15_0x5d1d();let _0x180901=_0x5d1daa[_0x1e94ff];return _0x180901;}(function(_0x244eb4,_0x20226b){const _0x503a78=a15_0x1809,_0x445f24=_0x244eb4();while(!![]){try{const _0x14aa35=parseInt(_0x503a78(0x1f1))/0x1*(-parseInt(_0x503a78(0x1ef))/0x2)+-parseInt(_0x503a78(0x1ed))/0x3*(parseInt(_0x503a78(0x1eb))/0x4)+parseInt(_0x503a78(0x1f4))/0x5*(parseInt(_0x503a78(0x1f7))/0x6)+-parseInt(_0x503a78(0x1f5))/0x7*(parseInt(_0x503a78(0x1f2))/0x8)+parseInt(_0x503a78(0x1f3))/0x9+-parseInt(_0x503a78(0x1f0))/0xa+-parseInt(_0x503a78(0x1ea))/0xb*(-parseInt(_0x503a78(0x1ec))/0xc);if(_0x14aa35===_0x20226b)break;else _0x445f24['push'](_0x445f24['shift']());}catch(_0x2bfb56){_0x445f24['push'](_0x445f24['shift']());}}}(a15_0x5d1d,0x76758));export function buildLoginSuccessHtml(){const _0x2b6dee=a15_0x1809,_0xfcf9a9='Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.';return _0x2b6dee(0x1ee)+_0xfcf9a9+_0x2b6dee(0x1f6);}
|