@lovrabet/rabetbase-cli 2.5.10-beta.2 → 2.5.10-beta.4
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
|
+
(function(_0x470fe8,_0x327145){const _0x1e20ec=a0_0x4eed,_0x2a1f86=_0x470fe8();while(!![]){try{const _0x5e7663=parseInt(_0x1e20ec(0x109))/0x1*(parseInt(_0x1e20ec(0x10a))/0x2)+parseInt(_0x1e20ec(0x107))/0x3*(parseInt(_0x1e20ec(0x118))/0x4)+-parseInt(_0x1e20ec(0x11b))/0x5+-parseInt(_0x1e20ec(0x108))/0x6+-parseInt(_0x1e20ec(0xff))/0x7*(parseInt(_0x1e20ec(0x113))/0x8)+-parseInt(_0x1e20ec(0x11d))/0x9*(-parseInt(_0x1e20ec(0x101))/0xa)+parseInt(_0x1e20ec(0xfe))/0xb*(parseInt(_0x1e20ec(0x111))/0xc);if(_0x5e7663===_0x327145)break;else _0x2a1f86['push'](_0x2a1f86['shift']());}catch(_0x57b8f5){_0x2a1f86['push'](_0x2a1f86['shift']());}}}(a0_0x2ab1,0xcb66d));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x3b606d from'node:path';function a0_0x2ab1(){const _0x1a8089=['38006gMBbYx','✗\x20Failed:\x20','join','Waiting\x203\x20seconds...\x0a','success','error','Failed\x20to\x20generate\x20docs:\x20','6785232ZVqcww','push','1025512WXtsoK','message','datasetCode','Generated\x20docs\x20successfully:\x20','.md\x20(','28teKMvH','length','.md\x20-\x20','2339370BXYwOR',']\x20Generating:\x20','3824433fpMzxR','log','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','22bNULZU','70iLAJQP','tableName','10CpWExN','api-doc','.md','name','utf8','✓\x20Generated:\x20','274701PdgxnG','5664546nEDwan','70GPFaNE'];a0_0x2ab1=function(){return _0x1a8089;};return a0_0x2ab1();}import{fetchDatasetDoc}from'../core/api-client.js';import{logger}from'../utils/logger.js';function a0_0x4eed(_0x38a38a,_0x52a544){_0x38a38a=_0x38a38a-0xfd;const _0x2ab16b=a0_0x2ab1();let _0x4eeda1=_0x2ab16b[_0x38a38a];return _0x4eeda1;}export{fetchDatasetDoc}from'../core/api-client.js';function delay(_0x4ec8f7){return new Promise(_0x1b7188=>setTimeout(_0x1b7188,_0x4ec8f7));}export async function generateDatasetDocs(_0x2eabba,_0x22b35c,_0xff68ec,_0x33e813='./docs',_0x599830,_0xb052d9){const _0x5f22b3=a0_0x4eed;mkdirSync(_0x33e813,{'recursive':!![]});const _0x4d7408=[],_0x2004c4=_0x2eabba[_0x5f22b3(0x119)];console[_0x5f22b3(0x11e)]('\x0a'+_0x2004c4+_0x5f22b3(0xfd));for(let _0x5e3c3d=0x0;_0x5e3c3d<_0x2eabba[_0x5f22b3(0x119)];_0x5e3c3d++){const _0x344e9c=_0x2eabba[_0x5e3c3d],_0x4eccb8=_0x5e3c3d+0x1,_0x20c131=_0x344e9c[_0x5f22b3(0x100)];try{console['log']('['+_0x4eccb8+'/'+_0x2004c4+_0x5f22b3(0x11c)+_0x20c131+_0x5f22b3(0x117)+_0x344e9c[_0x5f22b3(0x104)]+')');if(_0x599830)_0x599830(_0x4eccb8,_0x2004c4,_0x20c131);const _0x23161b=await fetchDatasetDoc({'appCode':_0x22b35c,'cookie':_0xff68ec,'datasetCode':_0x344e9c[_0x5f22b3(0x115)],'datasetId':_0x344e9c['id'],'enableAI':![],'extraParams':_0xb052d9}),_0x97a43d=a0_0x3b606d[_0x5f22b3(0x10c)](_0x33e813,_0x20c131+_0x5f22b3(0x103));writeFileSync(_0x97a43d,_0x23161b,{'encoding':_0x5f22b3(0x105)}),console[_0x5f22b3(0x11e)](_0x5f22b3(0x106)+_0x20c131+'.md'),logger[_0x5f22b3(0x10e)](_0x5f22b3(0x102),_0x5f22b3(0x116)+_0x20c131,undefined,{'datasetCode':_0x344e9c['datasetCode'],'datasetName':_0x344e9c[_0x5f22b3(0x104)],'filePath':_0x97a43d,'progress':_0x4eccb8+'/'+_0x2004c4}),_0x4d7408[_0x5f22b3(0x112)]({'datasetCode':_0x344e9c[_0x5f22b3(0x115)],'datasetName':_0x344e9c['name'],'filePath':_0x97a43d,'success':!![]});if(_0x4eccb8<_0x2004c4)await delay(0x1388);}catch(_0x4281cc){const _0x3a9ab3=_0x4281cc instanceof Error?_0x4281cc[_0x5f22b3(0x114)]:String(_0x4281cc);console[_0x5f22b3(0x11e)](_0x5f22b3(0x10b)+_0x20c131+_0x5f22b3(0x11a)+_0x3a9ab3),logger[_0x5f22b3(0x10f)](_0x5f22b3(0x102),_0x5f22b3(0x110)+_0x344e9c[_0x5f22b3(0x115)],{'datasetCode':_0x344e9c[_0x5f22b3(0x115)],'datasetName':_0x344e9c[_0x5f22b3(0x104)],'error':_0x3a9ab3,'progress':_0x4eccb8+'/'+_0x2004c4}),_0x4d7408[_0x5f22b3(0x112)]({'datasetCode':_0x344e9c[_0x5f22b3(0x115)],'datasetName':_0x344e9c[_0x5f22b3(0x104)],'filePath':'','success':![],'error':_0x3a9ab3}),_0x4eccb8<_0x2004c4&&(console[_0x5f22b3(0x11e)](_0x5f22b3(0x10d)),await delay(0xbb8));}}return _0x4d7408;}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x987dc1=a1_0x2457;(function(_0x3d2abe,_0x61e06d){const _0x9db13d=a1_0x2457,_0x153c3c=_0x3d2abe();while(!![]){try{const _0x3395e0=-parseInt(_0x9db13d(0x1ed))/0x1+parseInt(_0x9db13d(0x1f5))/0x2+-parseInt(_0x9db13d(0x1ea))/0x3+parseInt(_0x9db13d(0x1e1))/0x4+-parseInt(_0x9db13d(0x1eb))/0x5+parseInt(_0x9db13d(0x1da))/0x6*(parseInt(_0x9db13d(0x1df))/0x7)+parseInt(_0x9db13d(0x1f1))/0x8;if(_0x3395e0===_0x61e06d)break;else _0x153c3c['push'](_0x153c3c['shift']());}catch(_0x2a108d){_0x153c3c['push'](_0x153c3c['shift']());}}}(a1_0x26c4,0x53af2));import a1_0x2511f3 from'node:path';import{CliErrors}from'../errors.js';function a1_0x2457(_0x28b993,_0x39905b){_0x28b993=_0x28b993-0x1d9;const _0x26c41e=a1_0x26c4();let _0x245729=_0x26c41e[_0x28b993];return _0x245729;}export function normalizeApiDir(_0x4727ac,_0x680cf8=process['cwd']()){const _0x36630f=a1_0x2457;return a1_0x2511f3[_0x36630f(0x1dd)](_0x680cf8,_0x4727ac);}function a1_0x26c4(){const _0x345bc1=['423801KnJhtc','86535YrMMBP','validation','514579wtFWqd','API\x20directory\x20\x22','size','push','6033488AiNztp','get','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','apiGroup','287382QZoNIP','.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.','6CTTldW','add','trim','resolve','\x22\x20resolves\x20to\x20multiple\x20API\x20directories.','177639PgSbZN','API\x20group\x20\x22','370676LZHjGt','join','outputDir','normalizedApiDir','set','map','cwd','app','filter'];a1_0x26c4=function(){return _0x345bc1;};return a1_0x26c4();}function normalizedApiGroup(_0x26815e){const _0x595521=a1_0x2457,_0x70dbb7=_0x26815e?.[_0x595521(0x1dc)]();return _0x70dbb7||undefined;}export function resolveApiProfileLayouts(_0x3b9942,_0x18fc56,_0x5b28ad=process[a1_0x987dc1(0x1e7)]()){const _0x5e5f35=a1_0x987dc1,_0xd90b83=_0x3b9942[_0x5e5f35(0x1e6)](_0xd3a985=>{const _0xdf69ce=_0x18fc56(_0xd3a985);return{'app':_0xd3a985,'outputDir':_0xdf69ce,'normalizedApiDir':normalizeApiDir(_0xdf69ce,_0x5b28ad),'apiGroup':normalizedApiGroup(_0xd3a985['apiGroup'])};}),_0x493567=new Map();for(const _0x5badf7 of _0xd90b83){if(!_0x5badf7[_0x5e5f35(0x1f4)])continue;const _0x2de379=_0x493567[_0x5e5f35(0x1f2)](_0x5badf7[_0x5e5f35(0x1f4)])??new Set();_0x2de379[_0x5e5f35(0x1db)](_0x5badf7['normalizedApiDir']),_0x493567[_0x5e5f35(0x1e5)](_0x5badf7['apiGroup'],_0x2de379);}for(const [_0x48bc7b,_0x357ab4]of _0x493567){if(_0x357ab4[_0x5e5f35(0x1ef)]>0x1)throw CliErrors['validation'](_0x5e5f35(0x1e0)+_0x48bc7b+_0x5e5f35(0x1de),'Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.');}const _0x20a033=new Map();for(const _0x52e44a of _0xd90b83){const _0x34d159=_0x20a033[_0x5e5f35(0x1f2)](_0x52e44a[_0x5e5f35(0x1e4)])??[];_0x34d159[_0x5e5f35(0x1f0)](_0x52e44a),_0x20a033[_0x5e5f35(0x1e5)](_0x52e44a[_0x5e5f35(0x1e4)],_0x34d159);}for(const _0x4161e7 of _0x20a033['values']()){const _0x86c366=new Set(_0x4161e7['flatMap'](_0x287745=>_0x287745[_0x5e5f35(0x1f4)]?[_0x287745[_0x5e5f35(0x1f4)]]:[]));if(_0x86c366[_0x5e5f35(0x1ef)]===0x0)continue;if(_0x86c366[_0x5e5f35(0x1ef)]>0x1||_0x4161e7['some'](_0x51ec43=>!_0x51ec43[_0x5e5f35(0x1f4)])){const _0x31c2fb=_0x4161e7[_0x5e5f35(0x1e6)](_0x211612=>_0x211612[_0x5e5f35(0x1e8)]['name'])[_0x5e5f35(0x1e2)](',\x20');throw CliErrors[_0x5e5f35(0x1ec)](_0x5e5f35(0x1ee)+_0x4161e7[0x0][_0x5e5f35(0x1e3)]+_0x5e5f35(0x1f3),'Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20'+_0x31c2fb+_0x5e5f35(0x1d9));}}return _0xd90b83;}export function getRegistryGroup(_0x5b1c17,_0x457825){const _0x13ae6d=a1_0x987dc1;if(_0x457825[_0x13ae6d(0x1f4)])return _0x5b1c17[_0x13ae6d(0x1e9)](_0x22f985=>_0x22f985[_0x13ae6d(0x1f4)]===_0x457825[_0x13ae6d(0x1f4)]);const _0x2ed3a7=_0x5b1c17['filter'](_0x21cea9=>_0x21cea9[_0x13ae6d(0x1e4)]===_0x457825[_0x13ae6d(0x1e4)]);return _0x2ed3a7['length']===0x1?_0x2ed3a7:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x11eac4,_0x53b61f){var _0x4c2708=a2_0x2b55,_0x20ff3d=_0x11eac4();while(!![]){try{var _0x5b9458=-parseInt(_0x4c2708(0xc8))/0x1*(-parseInt(_0x4c2708(0xc5))/0x2)+parseInt(_0x4c2708(0xcc))/0x3+parseInt(_0x4c2708(0xcd))/0x4*(parseInt(_0x4c2708(0xce))/0x5)+-parseInt(_0x4c2708(0xcb))/0x6+-parseInt(_0x4c2708(0xcf))/0x7*(parseInt(_0x4c2708(0xc9))/0x8)+parseInt(_0x4c2708(0xc6))/0x9*(-parseInt(_0x4c2708(0xd0))/0xa)+-parseInt(_0x4c2708(0xc7))/0xb*(-parseInt(_0x4c2708(0xca))/0xc);if(_0x5b9458===_0x53b61f)break;else _0x20ff3d['push'](_0x20ff3d['shift']());}catch(_0x3d1670){_0x20ff3d['push'](_0x20ff3d['shift']());}}}(a2_0x58d8,0xd9771));function a2_0x58d8(){var _0x230bc8=['3224979EGueYh','124mZGIiL','76300vVeJHP','20860LZSgEe','20BozaqQ','140DJOVNf','4767390vtQDIo','3966237ZOENBt','3007BRkFfP','1352ocSeNs','72YQWTNf','8809008wdOIXC'];a2_0x58d8=function(){return _0x230bc8;};return a2_0x58d8();}function a2_0x2b55(_0x219175,_0xcb5d94){_0x219175=_0x219175-0xc5;var _0x58d897=a2_0x58d8();var _0x2b552b=_0x58d897[_0x219175];return _0x2b552b;}export{fetchModelList}from'../core/api-client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xcdd4f1,_0x561faa){const _0x4a1839=a3_0x5500,_0xa6b538=_0xcdd4f1();while(!![]){try{const _0x41b0ee=parseInt(_0x4a1839(0x1ef))/0x1+parseInt(_0x4a1839(0x1f0))/0x2*(-parseInt(_0x4a1839(0x212))/0x3)+parseInt(_0x4a1839(0x1fe))/0x4+parseInt(_0x4a1839(0x1ff))/0x5+parseInt(_0x4a1839(0x1eb))/0x6+parseInt(_0x4a1839(0x1f2))/0x7*(-parseInt(_0x4a1839(0x1fd))/0x8)+-parseInt(_0x4a1839(0x214))/0x9*(parseInt(_0x4a1839(0x1fb))/0xa);if(_0x41b0ee===_0x561faa)break;else _0xa6b538['push'](_0xa6b538['shift']());}catch(_0x12fd36){_0xa6b538['push'](_0xa6b538['shift']());}}}(a3_0x2a54,0xad667));function a3_0x5500(_0x9ed5fc,_0x180985){_0x9ed5fc=_0x9ed5fc-0x1de;const _0x2a54e5=a3_0x2a54();let _0x5500dc=_0x2a54e5[_0x9ed5fc];return _0x5500dc;}import a3_0x4cd7bf from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x3a5fa6 from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';import{generateSdkConfigFile}from'../api/generate-sdk-config-file.js';import{MODEL_REGISTRY_FILE_NAME,MODEL_RUNTIME_FILE_NAME,updateModelRegistry}from'../api/model-registry-file.js';import{renderModelRegistryScaffold}from'../api/model-registry-scaffold.js';function a3_0x2a54(){const _0x53d7d7=['modelProfile','CONFIG_NAMES.DEFAULT','dirname','action','format',',\x20env:\x20','client.ts.tpl','name','api','-api','replaceApiContent','APP_','3000tiqcgW','typescript','scaffoldMode','overwriteTypescript','647866zsxwcO','182670zrqbgb','map','14QfHlKV','resolve','replace','{\x20apiConfigName:\x20',',\x20...LOVRABET_SDK_CONFIG\x20}','includes','LOVRABET','stringify','.ts','4060gSMbVR','Model\x20facts\x20refreshed.','1373032MGhQuL','5138572FeLzxN','6267725MghZPW','test','existed','alias','path','length','toUpperCase','\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.','client','join','-client','created','basename','allowEmptyModelReplacement','defaultName','API\x20scaffold\x20written.','missing','api.ts.tpl','preserved','15CUbQFH','../..','37161rdxAsH','Please\x20configure\x20app\x20code\x20first\x20via\x20`','refreshed','datasetCode','utf8','overwritten'];a3_0x2a54=function(){return _0x53d7d7;};return a3_0x2a54();}function fileAction(_0x43fe89,_0xf2ba84){const _0x741d73=a3_0x5500;if(!_0xf2ba84)return _0x43fe89?_0x741d73(0x211):'missing';return _0x43fe89?_0x741d73(0x1de):_0x741d73(0x20a);}export async function generateApiFile(_0x59f636,_0x3e2863,_0x971835,_0x310216,_0x334b96,_0x3e3b5a,_0xaf3213,_0x1e030a={},_0x5b6674={}){const _0xd960d1=a3_0x5500;if(!_0x971835)throw new Error(_0xd960d1(0x215)+CLI_BIN_NAME+'\x20config\x20set\x20app\x20<value>`');const _0x57508d=_0x310216&&!_0xaf3213,_0x2981c3=!!_0x5b6674[_0xd960d1(0x1df)],_0x3c6949=_0x2981c3||_0x57508d,_0x3caa97=_0xaf3213||_0x971835,_0x5a06bf=_0x2981c3||_0x57508d?'default':_0x3caa97,_0x30a6f9=_0x2981c3||_0x57508d?_0xd960d1(0x1e0):JSON[_0xd960d1(0x1f9)](_0x3caa97),_0x5e71c8=!isProduction(_0x334b96),_0xb1ea9b=_0x5e71c8?_0xd960d1(0x1e4)+JSON[_0xd960d1(0x1f9)](_0x334b96):'',_0x13c082=_0xd960d1(0x1f5)+_0x30a6f9+_0xb1ea9b+_0xd960d1(0x1f6),_0x3a000f=_0x2981c3?'':_0x3e2863,_0x2b2a3d=_0x3a000f?_0x3a000f+_0xd960d1(0x1e8):_0xd960d1(0x1e7),_0x362bc9=_0x3a000f?_0x3a000f+_0xd960d1(0x209):_0xd960d1(0x207),_0x762b98=_0x3a000f&&!/^app-[a-f0-9]+$/i[_0xd960d1(0x200)](_0x3a000f)?_0x3a000f['replace'](/-/g,'_')[_0xd960d1(0x205)]():_0xd960d1(0x1f8),_0x239401=/^\d/[_0xd960d1(0x200)](_0x762b98)?_0xd960d1(0x1ea)+_0x762b98:_0x762b98,_0x2b8ea6=_0x59f636[_0xd960d1(0x1f1)](_0x5d4ff1=>({'datasetCode':_0x5d4ff1[_0xd960d1(0x217)],'tableName':_0x5d4ff1['tableName'],'name':_0x5d4ff1[_0xd960d1(0x1e6)]||'','alias':_0x5d4ff1[_0xd960d1(0x202)]||_0x5d4ff1['key']})),_0x3a19ed=fileURLToPath(import.meta.url),_0x2362b4=a3_0x3a5fa6[_0xd960d1(0x1f3)](a3_0x3a5fa6[_0xd960d1(0x1e1)](_0x3a19ed),_0xd960d1(0x213)),_0x5727c6=a3_0x3a5fa6[_0xd960d1(0x208)](_0x2362b4,'templates/generate-api'),_0x4e7a46=a3_0x3a5fa6[_0xd960d1(0x208)](_0x5727c6,_0xd960d1(0x210)),_0x51bfa8=a3_0x3a5fa6[_0xd960d1(0x208)](_0x5727c6,_0xd960d1(0x1e5)),_0x37754a=_0x3e3b5a;mkdirSync(_0x37754a,{'recursive':!![]});const _0x2d365c=_0x2981c3?{}:_0x1e030a,_0x4b3b56=await generateSdkConfigFile(_0x37754a,_0x2d365c,_0x3a000f),_0x33a690=a3_0x3a5fa6[_0xd960d1(0x20b)](_0x4b3b56,_0xd960d1(0x1fa)),_0x380961=a3_0x3a5fa6[_0xd960d1(0x208)](_0x37754a,_0x2b2a3d+_0xd960d1(0x1fa)),_0x24c6b8=a3_0x3a5fa6[_0xd960d1(0x208)](_0x37754a,_0x362bc9+_0xd960d1(0x1fa)),_0x3dbc50=_0x5b6674[_0xd960d1(0x1ee)]===!![],_0x457ef2=existsSync(_0x380961),_0x5bd92f=existsSync(_0x24c6b8),_0x2fae27=_0x5b6674[_0xd960d1(0x1ed)]??(_0x3dbc50?_0xd960d1(0x1f4):'missing'),_0x217c6f=_0x2fae27==='replace'||_0x2fae27==='missing'&&!_0x457ef2,_0x12d6d3=_0x2fae27==='replace'||_0x2fae27==='missing'&&!_0x5bd92f,_0xb71901=_0x5b6674[_0xd960d1(0x1df)]?updateModelRegistry({'outputDir':_0x37754a,'profileName':_0x5b6674[_0xd960d1(0x1df)]['name'],'defaultProfile':_0x5b6674['modelProfile'][_0xd960d1(0x20d)],'appCode':_0x971835,'runtimeDomain':_0x5b6674[_0xd960d1(0x1df)]['runtimeDomain'],'models':_0x2b8ea6,'allowEmptyReplacement':_0x5b6674[_0xd960d1(0x20c)]===!![]}):undefined,_0x38bc0b=_0xb71901?a3_0x3a5fa6['join'](_0x37754a,MODEL_RUNTIME_FILE_NAME):undefined,_0x9a157=_0x38bc0b?existsSync(_0x38bc0b):![],_0x268e55=_0x2981c3&&_0x2fae27!=='none'?await renderModelRegistryScaffold(_0x37754a):undefined;_0x38bc0b&&_0x268e55&&writeFileSync(_0x38bc0b,_0x268e55['modelRuntime'],_0xd960d1(0x218));const _0x20212c=_0x2b8ea6[0x0]?.['alias'];if(_0x217c6f){const _0x288190=_0x268e55?.['api']??readFileSync(_0x4e7a46,'utf8'),_0x2337e5=_0x2981c3?_0x288190:TemplateReplacer['replaceApiContent'](_0x288190,_0x971835,_0x2b8ea6,_0x20212c,_0x2b2a3d,_0x30a6f9,undefined,_0x239401);writeFileSync(_0x380961,await a3_0x4cd7bf[_0xd960d1(0x1e3)](_0x2337e5,{'parser':_0xd960d1(0x1ec)}),{'encoding':_0xd960d1(0x218)});}if(_0x12d6d3){const _0x3f2c44=_0x268e55?.[_0xd960d1(0x207)]??readFileSync(_0x51bfa8,_0xd960d1(0x218)),_0x46a6b1=_0x2981c3?_0x3f2c44:TemplateReplacer[_0xd960d1(0x1e9)](_0x3f2c44,_0x971835,_0x2b8ea6,_0x20212c,_0x2b2a3d,_0x30a6f9,_0x13c082,_0x239401,_0x33a690);writeFileSync(_0x24c6b8,await a3_0x4cd7bf[_0xd960d1(0x1e3)](_0x46a6b1,{'parser':_0xd960d1(0x1ec)}),{'encoding':_0xd960d1(0x218)});}const _0x30e035=_0x2b8ea6[_0xd960d1(0x204)],_0x5b8195={'api':{'path':_0x380961,'action':fileAction(_0x457ef2,_0x217c6f)},'client':{'path':_0x24c6b8,'action':fileAction(_0x5bd92f,_0x12d6d3)},'sdkConfig':{'path':_0x4b3b56,'action':_0xd960d1(0x216)},..._0xb71901?{'modelRegistry':{'path':_0xb71901[_0xd960d1(0x203)],'action':_0xb71901[_0xd960d1(0x201)]?_0xd960d1(0x216):_0xd960d1(0x20a)},'modelRuntime':{'path':_0x38bc0b,'action':_0x268e55?_0x9a157?_0xd960d1(0x216):_0xd960d1(0x20a):_0x9a157?_0xd960d1(0x211):_0xd960d1(0x20f)}}:{}},_0x104842=existsSync(_0x380961)&&readFileSync(_0x380961,_0xd960d1(0x218))['includes'](MODEL_REGISTRY_FILE_NAME[_0xd960d1(0x1f4)](_0xd960d1(0x1fa),'')),_0x41d161=existsSync(_0x24c6b8)&&readFileSync(_0x24c6b8,_0xd960d1(0x218))[_0xd960d1(0x1f7)]('LOVRABET_RUNTIME_DOMAIN'),_0x8d7448=_0x2981c3?!_0x104842||!_0x41d161||!existsSync(_0x38bc0b):![],_0x590b71=_0x2981c3?_0x8d7448:_0x5b8195[_0xd960d1(0x1e7)][_0xd960d1(0x1e2)]===_0xd960d1(0x211)||_0x5b8195[_0xd960d1(0x207)][_0xd960d1(0x1e2)]===_0xd960d1(0x211);return logger['success']('init-api',_0x590b71?a3_0x3a5fa6[_0xd960d1(0x20b)](_0x4b3b56)+_0xd960d1(0x206):_0x2981c3?_0xd960d1(0x1fc):_0xd960d1(0x20e),undefined,{'apiFile':_0x380961,'clientFile':_0x24c6b8,'sdkConfig':_0x4b3b56,'modelCount':_0x30e035,'configName':_0x5a06bf,'isDefaultConfig':_0x3c6949,'needsAgentMerge':_0x590b71,'needsProjectUpgrade':_0x8d7448,'files':_0x5b8195}),{'appCode':_0x971835,'modelCount':_0x30e035,'models':_0x2b8ea6,'apiFilePath':_0x380961,'clientFilePath':_0x24c6b8,'sdkConfigPath':_0x4b3b56,'modelRegistryPath':_0xb71901?.[_0xd960d1(0x203)],'modelRuntimePath':_0x38bc0b,'modelProfile':_0x5b6674['modelProfile']?.[_0xd960d1(0x1e6)],'configName':_0x5a06bf,'isDefaultConfig':_0x3c6949,'sdkRouting':_0x2d365c,'files':_0x5b8195,'needsAgentMerge':_0x590b71,'needsProjectUpgrade':_0x8d7448};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a4_0x3e337d=a4_0x2b5a;(function(_0x3079cf,_0x50856f){const _0x89b831=a4_0x2b5a,_0x3ff926=_0x3079cf();while(!![]){try{const _0x5b4639=parseInt(_0x89b831(0x1b3))/0x1+-parseInt(_0x89b831(0x1a7))/0x2*(parseInt(_0x89b831(0x1ab))/0x3)+parseInt(_0x89b831(0x1a6))/0x4+-parseInt(_0x89b831(0x1a5))/0x5*(-parseInt(_0x89b831(0x1a4))/0x6)+parseInt(_0x89b831(0x1b1))/0x7+-parseInt(_0x89b831(0x1ad))/0x8*(-parseInt(_0x89b831(0x1a3))/0x9)+-parseInt(_0x89b831(0x1a2))/0xa;if(_0x5b4639===_0x50856f)break;else _0x3ff926['push'](_0x3ff926['shift']());}catch(_0x1eb656){_0x3ff926['push'](_0x3ff926['shift']());}}}(a4_0x398d,0x889ca));import{mkdirSync,writeFileSync}from'node:fs';function a4_0x2b5a(_0x56b86d,_0xa1a9e3){_0x56b86d=_0x56b86d-0x1a1;const _0x398d70=a4_0x398d();let _0x2b5af2=_0x398d70[_0x56b86d];return _0x2b5af2;}import a4_0x5666ad from'node:path';function a4_0x398d(){const _0x328378=[',\x0a}','/**\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','length','2957318qmvPgy',',\x0a\x20\x20','688075yPgRyl','-sdk-config.ts','runtimeDomain','{\x0a\x20\x20','18577890EveRXT','27HxIrrh','45534JnmmFf','415EXEWwF','1654248rgsLmV','2dwJLVP','\x20as\x20const;\x0a','sdk-config.ts','join','20004OXaflj','push','720056RABOSz'];a4_0x398d=function(){return _0x328378;};return a4_0x398d();}import a4_0x41fa8a from'prettier';export const SDK_CONFIG_FILE_NAME=a4_0x3e337d(0x1a9);export function getSdkConfigFileName(_0x3ea39f=''){const _0x458e5f=a4_0x3e337d;return _0x3ea39f?_0x3ea39f+_0x458e5f(0x1b4):SDK_CONFIG_FILE_NAME;}export async function generateSdkConfigFile(_0x238e49,_0x4d2cdc={},_0x4c208c=''){const _0x5cc99b=a4_0x3e337d,_0x4b234c=[];_0x4d2cdc['runtimeDomain']&&_0x4b234c[_0x5cc99b(0x1ac)]('runtimeDomain:\x20'+JSON['stringify'](_0x4d2cdc[_0x5cc99b(0x1b5)]));const _0x2e09f7=_0x4b234c[_0x5cc99b(0x1b0)]>0x0?_0x5cc99b(0x1a1)+_0x4b234c[_0x5cc99b(0x1aa)](_0x5cc99b(0x1b2))+_0x5cc99b(0x1ae):'{}',_0xa2bc41=_0x5cc99b(0x1af)+_0x2e09f7+_0x5cc99b(0x1a8);mkdirSync(_0x238e49,{'recursive':!![]});const _0x444996=a4_0x5666ad[_0x5cc99b(0x1aa)](_0x238e49,getSdkConfigFileName(_0x4c208c));return writeFileSync(_0x444996,await a4_0x41fa8a['format'](_0xa2bc41,{'parser':'typescript'}),'utf8'),_0x444996;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x137919,_0xec39d2){const _0x3fbbcc=a5_0x2565,_0x5e4fa4=_0x137919();while(!![]){try{const _0xe85af5=-parseInt(_0x3fbbcc(0x125))/0x1*(parseInt(_0x3fbbcc(0x139))/0x2)+parseInt(_0x3fbbcc(0x131))/0x3+parseInt(_0x3fbbcc(0x12a))/0x4+-parseInt(_0x3fbbcc(0x134))/0x5+parseInt(_0x3fbbcc(0x136))/0x6+parseInt(_0x3fbbcc(0x138))/0x7+-parseInt(_0x3fbbcc(0x13a))/0x8;if(_0xe85af5===_0xec39d2)break;else _0x5e4fa4['push'](_0x5e4fa4['shift']());}catch(_0x28d3ff){_0x5e4fa4['push'](_0x5e4fa4['shift']());}}}(a5_0x48b7,0xd2099));export function parseLegacyApiModels(_0x14e9f8){const _0x25f3b9=a5_0x2565,_0x192dd5=[],_0x3b785b=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x487277;while((_0x487277=_0x3b785b[_0x25f3b9(0x12f)](_0x14e9f8))!==null){_0x192dd5[_0x25f3b9(0x137)]({'datasetCode':_0x487277[0x1],'tableName':_0x487277[0x2],'name':_0x487277[0x3],'alias':_0x487277[0x4]});}return _0x192dd5;}export function parseLegacyApiAppCode(_0x239b90){const _0x54213e=a5_0x2565;return _0x239b90[_0x54213e(0x13c)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function a5_0x2565(_0x509702,_0x9b1cfe){_0x509702=_0x509702-0x124;const _0x48b7ab=a5_0x48b7();let _0x25658b=_0x48b7ab[_0x509702];return _0x25658b;}function stripComments(_0x116a3f){const _0x2c004a=a5_0x2565;return _0x116a3f[_0x2c004a(0x124)](/\/\*[\s\S]*?\*\//g,'')[_0x2c004a(0x124)](/\/\/.*$/gm,'');}export function isLegacyGeneratedApiScaffold(_0x341b77){const _0x50fc01=a5_0x2565;if(!_0x341b77[_0x50fc01(0x129)](_0x50fc01(0x128)))return![];const _0x3c9802=stripComments(_0x341b77),_0x1a0e41=[..._0x3c9802['matchAll'](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)][_0x50fc01(0x132)](_0x4ce5d8=>_0x4ce5d8[0x1]);if(_0x1a0e41[_0x50fc01(0x12e)]!==0x1||_0x1a0e41[0x0]!==_0x50fc01(0x135))return![];const _0x54bd44=[..._0x3c9802[_0x50fc01(0x133)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x50fc01(0x132)](_0x1383f2=>_0x1383f2[0x1]);if(_0x54bd44[_0x50fc01(0x12e)]!==0x2||!_0x54bd44[_0x50fc01(0x12c)](_0x1d5849=>_0x1d5849[_0x50fc01(0x12b)](_0x50fc01(0x126)))||!_0x54bd44[_0x50fc01(0x12c)](_0x119e2f=>_0x119e2f[_0x50fc01(0x12b)](_0x50fc01(0x130))))return![];const _0x3898ff=[..._0x3c9802['matchAll'](/^([A-Za-z_$][\w$]*)\s*\(/gm)][_0x50fc01(0x132)](_0x464552=>_0x464552[0x1]);return _0x3898ff[_0x50fc01(0x12e)]===0x1&&_0x3898ff[0x0]===_0x50fc01(0x127);}function a5_0x48b7(){const _0x10e065=['APP_CODE','registerModels','Generated\x20by\x20Rabetbase\x20CLI','includes','3819092jtbiwi','endsWith','some','test','length','exec','MODELS_CONFIG','861504JBeqoc','map','matchAll','1590255JFMDnx','@lovrabet/sdk','10256532FwugFO','push','5783554spCyGZ','44582OempdE','7775824IbQXkA','lovrabetClient','match','replace','73sAgxcb'];a5_0x48b7=function(){return _0x10e065;};return a5_0x48b7();}export function isLegacyGeneratedClientScaffold(_0x2b7ee4){const _0x292bb3=a5_0x2565;if(!_0x2b7ee4[_0x292bb3(0x129)](_0x292bb3(0x128)))return![];const _0x4387f1=stripComments(_0x2b7ee4),_0x5b17a0=[..._0x4387f1['matchAll'](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)][_0x292bb3(0x132)](_0x5a285f=>_0x5a285f[0x1]);if(_0x5b17a0[_0x292bb3(0x12c)](_0x5577ee=>_0x5577ee!==_0x292bb3(0x135)&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/[_0x292bb3(0x12d)](_0x5577ee??'')))return![];const _0x112d3a=[..._0x4387f1[_0x292bb3(0x133)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x292bb3(0x132)](_0x30a4bd=>_0x30a4bd[0x1]);return _0x112d3a[_0x292bb3(0x12e)]===0x1&&_0x112d3a[0x0]===_0x292bb3(0x13b);}
|
|
@@ -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_0x841126=a6_0x1961;(function(_0x2e2b3b,_0x5f39b3){const _0x19909c=a6_0x1961,_0x25dc97=_0x2e2b3b();while(!![]){try{const _0x349978=parseInt(_0x19909c(0xcd))/0x1*(-parseInt(_0x19909c(0xa3))/0x2)+parseInt(_0x19909c(0xb3))/0x3*(-parseInt(_0x19909c(0xd2))/0x4)+parseInt(_0x19909c(0xa7))/0x5*(parseInt(_0x19909c(0xcf))/0x6)+parseInt(_0x19909c(0xc1))/0x7*(parseInt(_0x19909c(0xda))/0x8)+-parseInt(_0x19909c(0x9d))/0x9+parseInt(_0x19909c(0x99))/0xa+-parseInt(_0x19909c(0xa9))/0xb*(-parseInt(_0x19909c(0xc7))/0xc);if(_0x349978===_0x5f39b3)break;else _0x25dc97['push'](_0x25dc97['shift']());}catch(_0x20412a){_0x25dc97['push'](_0x25dc97['shift']());}}}(a6_0x1e19,0xc0aab));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x29040a from'node:path';export const MODEL_REGISTRY_FILE_NAME='models.generated.ts';export const MODEL_RUNTIME_FILE_NAME=a6_0x841126(0xa1);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x841126(0xd0);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL='lovrabet-model-registry/v2',REGISTRY_START='/*\x20rabetbase-model-registry:start\x20*/',REGISTRY_END=a6_0x841126(0xbb);function emptyRegistry(_0xc9327e){return{'defaultProfile':_0xc9327e,'profiles':{},'models':[]};}function extractRegistryJson(_0x37589f){const _0x35787e=a6_0x841126,_0x5453b4=_0x37589f[_0x35787e(0xaf)](REGISTRY_START),_0x434b34=_0x37589f[_0x35787e(0xaf)](REGISTRY_END);if(_0x5453b4<0x0||_0x434b34<=_0x5453b4)return undefined;return _0x37589f[_0x35787e(0x9a)](_0x5453b4+REGISTRY_START[_0x35787e(0xdb)],_0x434b34)[_0x35787e(0xca)]()[_0x35787e(0xc5)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x35787e(0xc5)](/;$/,'');}function a6_0x1e19(){const _0x179f6e=['filter','pid','8133yvcKXy','appCode','join','get','key','\x22\x20and\x20\x22','Model\x20alias\x20\x22','\x22\x20in\x20profile\x20\x22','/*\x20rabetbase-model-registry:end\x20*/','test','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','tableName','parse','string','365372JXyyZv','find','entries','values','replace','set','13048212HspwmK','flatMap','NOT-SET','trim','defaultProfile','name','56779EgJVZs','datasetCode','6610374cRpiMP','/*\x20rabetbase-model-registry:v2\x20*/','outputDir','1748WoiJlV','includes','keys','Refusing\x20to\x20replace\x20','push','object','\x20model(s)\x20in\x20profile\x20\x22','split','152paJoym','length','profiles','profileName','map','/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a','\x22\x20maps\x20to\x20alias\x20\x22','allowEmptyReplacement','6081060topuwk','slice','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','\x22\x20maps\x20to\x20both\x20\x22','13780305kIJjJD','protocol','lovrabet-model-registry/v1','isArray','model-runtime.ts','utf8','10NmprzZ','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','every','\x22\x20in\x20the\x20registry\x20but\x20\x22','5btIgPi','models','11wZcvEy','\x22\x20maps\x20to\x20table\x20\x22','.tmp','alias','datasetCodes','stringify','indexOf','runtimeDomain'];a6_0x1e19=function(){return _0x179f6e;};return a6_0x1e19();}function migrateLegacyRegistry(_0x1de601){const _0x34217a=a6_0x841126,_0x2d7abe=emptyRegistry(_0x1de601[_0x34217a(0xcb)]);for(const [_0x1a9455,_0x4379b6]of Object[_0x34217a(0xc3)](_0x1de601[_0x34217a(0x93)])){_0x2d7abe[_0x34217a(0x93)][_0x1a9455]={'appCode':_0x4379b6['appCode'],'runtimeDomain':_0x4379b6[_0x34217a(0xb0)]},mergeProfileModels(_0x2d7abe,_0x1a9455,_0x4379b6[_0x34217a(0xa8)]);}return _0x2d7abe;}function a6_0x1961(_0x5747ea,_0x2e6f23){_0x5747ea=_0x5747ea-0x93;const _0x1e1973=a6_0x1e19();let _0x196173=_0x1e1973[_0x5747ea];return _0x196173;}function generatedObjectLiteralToJson(_0x28fe82){const _0x4785f9=a6_0x841126;let _0x1ceab0='',_0xe21aaa,_0x1d415e=![],_0x43e974;for(let _0x5cdb08=0x0;_0x5cdb08<_0x28fe82['length'];_0x5cdb08++){const _0x345021=_0x28fe82[_0x5cdb08];if(_0xe21aaa){_0x1ceab0+=_0x345021;if(_0x1d415e)_0x1d415e=![];else{if(_0x345021==='\x5c')_0x1d415e=!![];else{if(_0x345021===_0xe21aaa)_0xe21aaa=undefined;}}continue;}if(_0x345021==='\x22'){_0xe21aaa=_0x345021,_0x1ceab0+=_0x345021,_0x43e974='value';continue;}if(_0x345021===','){let _0x47bab3=_0x5cdb08+0x1;while(/\s/[_0x4785f9(0xbc)](_0x28fe82[_0x47bab3]??''))_0x47bab3++;if(_0x28fe82[_0x47bab3]==='}'||_0x28fe82[_0x47bab3]===']')continue;_0x1ceab0+=_0x345021,_0x43e974=',';continue;}if(_0x345021==='{'||_0x345021==='['){_0x1ceab0+=_0x345021,_0x43e974=_0x345021;continue;}if(_0x345021==='}'||_0x345021===']'){_0x1ceab0+=_0x345021,_0x43e974=_0x345021;continue;}if((_0x43e974==='{'||_0x43e974===',')&&/[A-Za-z_$]/['test'](_0x345021)){let _0x751aa2=_0x5cdb08+0x1;while(/[A-Za-z0-9_$]/[_0x4785f9(0xbc)](_0x28fe82[_0x751aa2]??''))_0x751aa2++;let _0x549a42=_0x751aa2;while(/\s/[_0x4785f9(0xbc)](_0x28fe82[_0x549a42]??''))_0x549a42++;if(_0x28fe82[_0x549a42]===':'){_0x1ceab0+=JSON[_0x4785f9(0xae)](_0x28fe82[_0x4785f9(0x9a)](_0x5cdb08,_0x751aa2)),_0x5cdb08=_0x751aa2-0x1,_0x43e974=_0x4785f9(0xb7);continue;}}_0x1ceab0+=_0x345021;if(!/\s/['test'](_0x345021)&&_0x345021!==':')_0x43e974='value';}return _0x1ceab0;}function parseGeneratedRegistryJson(_0x457543){const _0x3e4d82=a6_0x841126;try{return JSON[_0x3e4d82(0xbf)](_0x457543);}catch{return JSON[_0x3e4d82(0xbf)](generatedObjectLiteralToJson(_0x457543));}}function normalizeModelEntries(_0x507e59,_0x556fd7){const _0x76a7fe=a6_0x841126,_0x1ca994=Object[_0x76a7fe(0xd4)](_0x507e59),_0x5cc03d=[];for(const _0x258a01 of _0x556fd7){if(!_0x258a01||typeof _0x258a01!==_0x76a7fe(0xd7)||Array[_0x76a7fe(0xa0)](_0x258a01))return undefined;const _0x2f5f31=_0x258a01;if(typeof _0x2f5f31['alias']!==_0x76a7fe(0xc0)||typeof _0x2f5f31[_0x76a7fe(0xbe)]!==_0x76a7fe(0xc0)||typeof _0x2f5f31[_0x76a7fe(0xcc)]!=='string')return undefined;let _0x4a47cd;if(typeof _0x2f5f31['datasetCode']===_0x76a7fe(0xc0)&&_0x2f5f31[_0x76a7fe(0xad)]===undefined)_0x4a47cd=Object['fromEntries'](_0x1ca994[_0x76a7fe(0x95)](_0x2e0a67=>[_0x2e0a67,_0x2f5f31['datasetCode']]));else{if(_0x2f5f31[_0x76a7fe(0xce)]===undefined&&_0x2f5f31['datasetCodes']&&typeof _0x2f5f31[_0x76a7fe(0xad)]===_0x76a7fe(0xd7)&&!Array['isArray'](_0x2f5f31[_0x76a7fe(0xad)])&&Object[_0x76a7fe(0xc4)](_0x2f5f31[_0x76a7fe(0xad)])[_0x76a7fe(0xa5)](_0xf02d55=>typeof _0xf02d55===_0x76a7fe(0xc0)))_0x4a47cd={..._0x2f5f31[_0x76a7fe(0xad)]};else return undefined;}_0x5cc03d[_0x76a7fe(0xd6)]({'alias':_0x2f5f31[_0x76a7fe(0xac)],'tableName':_0x2f5f31['tableName'],'name':_0x2f5f31[_0x76a7fe(0xcc)],'datasetCodes':_0x4a47cd});}return _0x5cc03d;}export function parseModelRegistry(_0x11b70a){const _0x44b4da=a6_0x841126,_0x35a116=extractRegistryJson(_0x11b70a);if(!_0x35a116)return undefined;try{const _0xa7ebda=parseGeneratedRegistryJson(_0x35a116);if(typeof _0xa7ebda[_0x44b4da(0xcb)]!==_0x44b4da(0xc0)||!_0xa7ebda['profiles']||typeof _0xa7ebda[_0x44b4da(0x93)]!==_0x44b4da(0xd7))return undefined;if(_0xa7ebda['protocol']===_0x44b4da(0x9f))return migrateLegacyRegistry(_0xa7ebda);if(!(_0xa7ebda['protocol']===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0xa7ebda[_0x44b4da(0x9e)]===undefined&&_0x11b70a[_0x44b4da(0xd3)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x44b4da(0xa0)](_0xa7ebda[_0x44b4da(0xa8)]))return undefined;const _0x194f90=_0xa7ebda[_0x44b4da(0x93)],_0x28ac36=normalizeModelEntries(_0x194f90,_0xa7ebda[_0x44b4da(0xa8)]);if(!_0x28ac36)return undefined;return{'defaultProfile':_0xa7ebda['defaultProfile'],'profiles':_0x194f90,'models':_0x28ac36};}catch{return undefined;}}export function readModelRegistry(_0x51ee74){const _0x49d7a6=a6_0x841126;if(!existsSync(_0x51ee74))return undefined;try{return parseModelRegistry(readFileSync(_0x51ee74,_0x49d7a6(0xa2)));}catch{return undefined;}}function registrySource(_0x317571){const _0x2e5aba=a6_0x841126,_0xca39db=Object[_0x2e5aba(0xd4)](_0x317571[_0x2e5aba(0x93)]),_0x16c38f=_0x317571[_0x2e5aba(0xa8)][_0x2e5aba(0x95)](_0x1fda9a=>{const _0x17b1ad=_0x2e5aba,_0x54c35c=_0xca39db['map'](_0x46b526=>_0x1fda9a[_0x17b1ad(0xad)][_0x46b526]),_0x5e4a5b=_0x54c35c[0x0],_0x2f2148=_0x5e4a5b!==undefined&&_0x54c35c['every'](_0x185b8b=>_0x185b8b===_0x5e4a5b),_0x5d40a8={'alias':_0x1fda9a[_0x17b1ad(0xac)],'tableName':_0x1fda9a['tableName'],'name':_0x1fda9a[_0x17b1ad(0xcc)]};return _0x2f2148?{..._0x5d40a8,'datasetCode':_0x5e4a5b}:{..._0x5d40a8,'datasetCodes':_0x1fda9a['datasetCodes']};}),_0x1903c1=JSON['stringify']({'defaultProfile':_0x317571['defaultProfile'],'profiles':_0x317571[_0x2e5aba(0x93)],'models':_0x16c38f},null,0x2)[_0x2e5aba(0xd9)]('\x0a')[_0x2e5aba(0x95)](_0x1edb6b=>'\x20\x20'+_0x1edb6b)['join']('\x0a');return _0x2e5aba(0x96)+MODEL_REGISTRY_VERSION_MARKER+_0x2e5aba(0xbd)+REGISTRY_START+'\x0a'+_0x1903c1+'\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a'+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x5c7184,_0x47c034,_0x115967){const _0x4e2826=a6_0x841126,_0x321f9b=_0x115967['map'](_0x39c22f=>({..._0x39c22f,'alias':_0x39c22f['alias']||_0x39c22f[_0x4e2826(0xbe)]})),_0x3b6f49=new Map(),_0x4b4316=new Map();for(const _0x5c5adf of _0x321f9b){const _0x39308a=_0x3b6f49[_0x4e2826(0xb6)](_0x5c5adf[_0x4e2826(0xac)]);if(_0x39308a&&_0x39308a!==_0x5c5adf[_0x4e2826(0xbe)])throw new Error(_0x4e2826(0xb9)+_0x5c5adf[_0x4e2826(0xac)]+_0x4e2826(0x9c)+_0x39308a+_0x4e2826(0xb8)+_0x5c5adf[_0x4e2826(0xbe)]+_0x4e2826(0xba)+_0x47c034+'\x22.');const _0x19c3c3=_0x4b4316[_0x4e2826(0xb6)](_0x5c5adf[_0x4e2826(0xbe)]);if(_0x19c3c3&&_0x19c3c3!==_0x5c5adf[_0x4e2826(0xac)])throw new Error('Table\x20\x22'+_0x5c5adf[_0x4e2826(0xbe)]+'\x22\x20maps\x20to\x20both\x20aliases\x20\x22'+_0x19c3c3+_0x4e2826(0xb8)+_0x5c5adf[_0x4e2826(0xac)]+_0x4e2826(0xba)+_0x47c034+'\x22.');_0x3b6f49[_0x4e2826(0xc6)](_0x5c5adf[_0x4e2826(0xac)],_0x5c5adf[_0x4e2826(0xbe)]),_0x4b4316[_0x4e2826(0xc6)](_0x5c5adf[_0x4e2826(0xbe)],_0x5c5adf[_0x4e2826(0xac)]);const _0x13ab7d=_0x5c7184[_0x4e2826(0xa8)][_0x4e2826(0xc2)](_0x2f9d04=>_0x2f9d04[_0x4e2826(0xac)]===_0x5c5adf[_0x4e2826(0xac)]);if(_0x13ab7d&&_0x13ab7d[_0x4e2826(0xbe)]!==_0x5c5adf[_0x4e2826(0xbe)])throw new Error(_0x4e2826(0xb9)+_0x5c5adf[_0x4e2826(0xac)]+_0x4e2826(0xaa)+_0x13ab7d[_0x4e2826(0xbe)]+_0x4e2826(0xa6)+_0x5c5adf[_0x4e2826(0xbe)]+_0x4e2826(0xba)+_0x47c034+'\x22.');const _0x95d99f=_0x5c7184[_0x4e2826(0xa8)][_0x4e2826(0xc2)](_0x2ed432=>_0x2ed432[_0x4e2826(0xbe)]===_0x5c5adf[_0x4e2826(0xbe)]);if(_0x95d99f&&_0x95d99f[_0x4e2826(0xac)]!==_0x5c5adf[_0x4e2826(0xac)])throw new Error('Table\x20\x22'+_0x5c5adf[_0x4e2826(0xbe)]+_0x4e2826(0x97)+_0x95d99f[_0x4e2826(0xac)]+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x5c5adf[_0x4e2826(0xac)]+_0x4e2826(0xba)+_0x47c034+'\x22.');}for(const _0x94e2e8 of _0x5c7184[_0x4e2826(0xa8)]){delete _0x94e2e8['datasetCodes'][_0x47c034];}for(const _0x502545 of _0x321f9b){let _0x384f1c=_0x5c7184[_0x4e2826(0xa8)][_0x4e2826(0xc2)](_0x99f054=>_0x99f054[_0x4e2826(0xac)]===_0x502545['alias']);!_0x384f1c&&(_0x384f1c={'alias':_0x502545[_0x4e2826(0xac)],'tableName':_0x502545[_0x4e2826(0xbe)],'name':_0x502545[_0x4e2826(0xcc)],'datasetCodes':{}},_0x5c7184[_0x4e2826(0xa8)][_0x4e2826(0xd6)](_0x384f1c)),(_0x47c034===_0x5c7184[_0x4e2826(0xcb)]||!_0x384f1c[_0x4e2826(0xad)][_0x5c7184[_0x4e2826(0xcb)]])&&(_0x384f1c[_0x4e2826(0xac)]=_0x502545[_0x4e2826(0xac)],_0x384f1c[_0x4e2826(0xbe)]=_0x502545[_0x4e2826(0xbe)],_0x384f1c[_0x4e2826(0xcc)]=_0x502545[_0x4e2826(0xcc)]),_0x384f1c['datasetCodes'][_0x47c034]=_0x502545['datasetCode'];}_0x5c7184[_0x4e2826(0xa8)]=_0x5c7184[_0x4e2826(0xa8)][_0x4e2826(0xb1)](_0xed58cc=>Object[_0x4e2826(0xd4)](_0xed58cc[_0x4e2826(0xad)])[_0x4e2826(0xdb)]>0x0);}function removeUnboundProfiles(_0xfd63f7){const _0x5089f5=a6_0x841126,_0xc513e7=Object['entries'](_0xfd63f7[_0x5089f5(0x93)])[_0x5089f5(0xb1)](([,_0x5ea024])=>_0x5ea024[_0x5089f5(0xb4)]===_0x5089f5(0xc9))[_0x5089f5(0x95)](([_0x669e86])=>_0x669e86);if(_0xc513e7[_0x5089f5(0xdb)]===0x0)return;for(const _0x32779c of _0xc513e7){delete _0xfd63f7[_0x5089f5(0x93)][_0x32779c];for(const _0x4e4989 of _0xfd63f7[_0x5089f5(0xa8)]){delete _0x4e4989['datasetCodes'][_0x32779c];}}_0xfd63f7['models']=_0xfd63f7[_0x5089f5(0xa8)][_0x5089f5(0xb1)](_0x4e3177=>Object[_0x5089f5(0xd4)](_0x4e3177[_0x5089f5(0xad)])[_0x5089f5(0xdb)]>0x0);}export function getProfileModels(_0x2ef337,_0x43b212){const _0x44aacc=a6_0x841126;return _0x2ef337[_0x44aacc(0xa8)][_0x44aacc(0xc8)](_0x3e6ec5=>{const _0x29b4ef=_0x44aacc,_0x9864a3=_0x3e6ec5[_0x29b4ef(0xad)][_0x43b212];return _0x9864a3?[{'datasetCode':_0x9864a3,'tableName':_0x3e6ec5[_0x29b4ef(0xbe)],'name':_0x3e6ec5[_0x29b4ef(0xcc)],'alias':_0x3e6ec5['alias']}]:[];});}export function updateModelRegistry(_0x3cf9cb){const _0xbf9c36=a6_0x841126,_0x1bffd3=a6_0x29040a[_0xbf9c36(0xb5)](_0x3cf9cb[_0xbf9c36(0xd1)],MODEL_REGISTRY_FILE_NAME),_0xff7d09=existsSync(_0x1bffd3),_0x4b7274=readModelRegistry(_0x1bffd3);if(_0xff7d09&&!_0x4b7274)throw new Error(MODEL_REGISTRY_FILE_NAME+_0xbf9c36(0x9b));const _0x57562b=_0x4b7274??emptyRegistry(_0x3cf9cb[_0xbf9c36(0xcb)]);if(_0x3cf9cb[_0xbf9c36(0xb4)]!==_0xbf9c36(0xc9))removeUnboundProfiles(_0x57562b);const _0x1b55dd=_0x4b7274?getProfileModels(_0x4b7274,_0x3cf9cb[_0xbf9c36(0x94)])[_0xbf9c36(0xdb)]:0x0;if(_0x1b55dd>0x0&&_0x3cf9cb[_0xbf9c36(0xa8)][_0xbf9c36(0xdb)]===0x0&&!_0x3cf9cb[_0xbf9c36(0x98)])throw new Error(_0xbf9c36(0xd5)+_0x1b55dd+_0xbf9c36(0xd8)+_0x3cf9cb['profileName']+'\x22\x20with\x20an\x20empty\x20result.\x20'+_0xbf9c36(0xa4));_0x57562b[_0xbf9c36(0xcb)]=_0x3cf9cb[_0xbf9c36(0xcb)],_0x57562b[_0xbf9c36(0x93)][_0x3cf9cb[_0xbf9c36(0x94)]]={'appCode':_0x3cf9cb[_0xbf9c36(0xb4)],'runtimeDomain':_0x3cf9cb['runtimeDomain']},mergeProfileModels(_0x57562b,_0x3cf9cb[_0xbf9c36(0x94)],_0x3cf9cb[_0xbf9c36(0xa8)]),mkdirSync(_0x3cf9cb[_0xbf9c36(0xd1)],{'recursive':!![]});const _0x15f3bc=_0x1bffd3+'.'+process[_0xbf9c36(0xb2)]+'.'+Date['now']()+_0xbf9c36(0xab);try{writeFileSync(_0x15f3bc,registrySource(_0x57562b),{'encoding':_0xbf9c36(0xa2),'mode':0x1a4}),renameSync(_0x15f3bc,_0x1bffd3);}catch(_0x478535){try{unlinkSync(_0x15f3bc);}catch{}throw _0x478535;}return{'path':_0x1bffd3,'registry':_0x57562b,'existed':_0xff7d09};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a7_0x2936d7=a7_0x21fc;function a7_0x21fc(_0x465cec,_0xa3699f){_0x465cec=_0x465cec-0x1bf;const _0x5fd5c=a7_0x5fd5();let _0x21fc08=_0x5fd5c[_0x465cec];return _0x21fc08;}(function(_0x20dbd7,_0x2e5f32){const _0x199fcf=a7_0x21fc,_0x166279=_0x20dbd7();while(!![]){try{const _0x24886b=-parseInt(_0x199fcf(0x1c1))/0x1+parseInt(_0x199fcf(0x1c9))/0x2*(parseInt(_0x199fcf(0x1d3))/0x3)+parseInt(_0x199fcf(0x1c6))/0x4+-parseInt(_0x199fcf(0x1ce))/0x5+-parseInt(_0x199fcf(0x1c0))/0x6+-parseInt(_0x199fcf(0x1ca))/0x7+parseInt(_0x199fcf(0x1cb))/0x8;if(_0x24886b===_0x2e5f32)break;else _0x166279['push'](_0x166279['shift']());}catch(_0x483f2f){_0x166279['push'](_0x166279['shift']());}}}(a7_0x5fd5,0xc0969));import{readFileSync}from'node:fs';import a7_0x3285ef from'node:path';import{fileURLToPath}from'node:url';import a7_0x80b215 from'prettier';import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function relativeImport(_0x4c9ba4,_0x22a9ee){const _0x3ec43f=a7_0x21fc;let _0x1f1a96=a7_0x3285ef['relative'](_0x4c9ba4,_0x22a9ee)[_0x3ec43f(0x1c2)](/\\/g,'/');if(!_0x1f1a96[_0x3ec43f(0x1c4)]('.'))_0x1f1a96='./'+_0x1f1a96;return _0x1f1a96;}function a7_0x5fd5(){const _0x35370e=['resolve','utf8','365577GKQDtC','profile-api.ts.tpl','7002552tIRTJq','976883SaLLPh','replace','model-runtime.ts.tpl','startsWith','typescript','5310960NycwMJ','{ProjectRoutingImport}','cwd','20tAqDwa','10028984spasgw','24934384XoNkyG','join','dirname','6488000qeKpbS','profile-client.ts.tpl','format'];a7_0x5fd5=function(){return _0x35370e;};return a7_0x5fd5();}export async function renderModelRegistryScaffold(_0x570c4b,_0x21afcd=process[a7_0x2936d7(0x1c8)]()){const _0x231f77=a7_0x2936d7,_0x513a43=fileURLToPath(import.meta.url),_0x3aa406=a7_0x3285ef['resolve'](a7_0x3285ef[_0x231f77(0x1cd)](_0x513a43),'../../templates/generate-api'),_0x2ad7e2=relativeImport(a7_0x3285ef[_0x231f77(0x1d1)](_0x570c4b),a7_0x3285ef[_0x231f77(0x1d1)](_0x21afcd,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x387bd8=readFileSync(a7_0x3285ef[_0x231f77(0x1cc)](_0x3aa406,_0x231f77(0x1bf)),_0x231f77(0x1d2))[_0x231f77(0x1c2)](_0x231f77(0x1c7),_0x2ad7e2),[_0x326a55,_0x53ddb6,_0x25202c]=await Promise['all']([a7_0x80b215[_0x231f77(0x1d0)](_0x387bd8,{'parser':_0x231f77(0x1c5)}),a7_0x80b215[_0x231f77(0x1d0)](readFileSync(a7_0x3285ef[_0x231f77(0x1cc)](_0x3aa406,_0x231f77(0x1cf)),'utf8'),{'parser':_0x231f77(0x1c5)}),a7_0x80b215[_0x231f77(0x1d0)](readFileSync(a7_0x3285ef['join'](_0x3aa406,_0x231f77(0x1c3)),'utf8'),{'parser':_0x231f77(0x1c5)})]);return{'api':_0x326a55,'client':_0x53ddb6,'modelRuntime':_0x25202c};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x143c16,_0x3f5671){const _0x2b2dc4=a8_0x59e0,_0x4f2bb7=_0x143c16();while(!![]){try{const _0x4513aa=-parseInt(_0x2b2dc4(0xb3))/0x1+parseInt(_0x2b2dc4(0xb7))/0x2*(parseInt(_0x2b2dc4(0xbc))/0x3)+parseInt(_0x2b2dc4(0xbf))/0x4+parseInt(_0x2b2dc4(0xa6))/0x5+-parseInt(_0x2b2dc4(0xb5))/0x6+parseInt(_0x2b2dc4(0xa7))/0x7*(-parseInt(_0x2b2dc4(0xb4))/0x8)+parseInt(_0x2b2dc4(0xb2))/0x9;if(_0x4513aa===_0x3f5671)break;else _0x4f2bb7['push'](_0x4f2bb7['shift']());}catch(_0x5eec02){_0x4f2bb7['push'](_0x4f2bb7['shift']());}}}(a8_0x2d17,0xd2dfd));import{existsSync}from'node:fs';import a8_0x328016 from'node:path';function a8_0x2d17(){const _0x6bd398=['3778580BoVJAU','7oMjSKT','string','Run\x20`','appcode','find','defaultProfile','entries','object','apiDir','profiles','appCode','21017196rGCmaw','1082208ohtSad','11060264vmVZWx','7311102DDevii','cwd','12202QSAzux','filter','length','\x20api\x20pull\x20--app\x20','\x22\x20is\x20missing\x20from\x20','687bEgVnI','api.ts','AppCode\x20\x22','235640RnwMjN','apps','`\x20first.','join','resolve'];a8_0x2d17=function(){return _0x6bd398;};return a8_0x2d17();}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_0x59e0(_0x5979b1,_0x49b50f){_0x5979b1=_0x5979b1-0xa4;const _0x2d1778=a8_0x2d17();let _0x59e045=_0x2d1778[_0x5979b1];return _0x59e045;}export function resolveApiModelSource(_0x42163b,_0x343731,_0x8b3298){const _0x1cba67=a8_0x59e0,_0x41528b=a8_0x328016[_0x1cba67(0xa5)](process[_0x1cba67(0xb6)](),_0x42163b),_0x5cac08=a8_0x328016[_0x1cba67(0xa5)](_0x41528b,_0x1cba67(0xbd)),_0xbbd6df=a8_0x328016[_0x1cba67(0xa5)](_0x41528b,MODEL_REGISTRY_FILE_NAME),_0x199003=readModelRegistry(_0xbbd6df);if(_0x199003){const _0xa1bbd3=_0x343731?Object[_0x1cba67(0xad)](_0x199003[_0x1cba67(0xb0)])[_0x1cba67(0xb8)](([,_0x1412bd])=>_0x1412bd[_0x1cba67(0xb1)]===_0x343731):[];if(_0x8b3298){if(_0x199003[_0x1cba67(0xb0)][_0x8b3298])return{'filePath':_0xbbd6df,'profileName':_0x8b3298};if(_0xa1bbd3[_0x1cba67(0xb9)]>0x0)throw CliErrors['validation']('Model\x20profile\x20\x22'+_0x8b3298+_0x1cba67(0xbb)+MODEL_REGISTRY_FILE_NAME+'.',_0x1cba67(0xa9)+CLI_BIN_NAME+_0x1cba67(0xba)+_0x8b3298+_0x1cba67(0xc1));}else{if(_0xa1bbd3[_0x1cba67(0xb9)]===0x1)return{'filePath':_0xbbd6df,'profileName':_0xa1bbd3[0x0][0x0]};if(_0xa1bbd3[_0x1cba67(0xb9)]>0x1)throw new Error(_0x1cba67(0xbe)+_0x343731+'\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20'+_0xa1bbd3['map'](([_0x182a8d])=>_0x182a8d)[_0x1cba67(0xa4)](',\x20')+'.\x20'+'Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.');if(_0x199003[_0x1cba67(0xb0)][_0x199003[_0x1cba67(0xac)]]&&!_0x343731)return{'filePath':_0xbbd6df,'profileName':_0x199003['defaultProfile']};}}if(!_0x343731&&!_0x8b3298)return{'filePath':_0x5cac08};const _0x107086=readRawConfig(),_0x12680e=_0x107086['apps']&&typeof _0x107086['apps']===_0x1cba67(0xae)?_0x107086[_0x1cba67(0xc0)]:{},_0x2bb61b=_0x8b3298&&_0x12680e[_0x8b3298]?[_0x8b3298,_0x12680e[_0x8b3298]]:Object[_0x1cba67(0xad)](_0x12680e)[_0x1cba67(0xab)](([,_0x8eae39])=>_0x8eae39?.[_0x1cba67(0xaa)]===_0x343731);if(!_0x2bb61b)return{'filePath':_0x5cac08};const [_0x190de3,_0x4d6e3c]=_0x2bb61b,_0x32399d=typeof _0x107086['defaultApp']===_0x1cba67(0xa8)?_0x107086['defaultApp']:undefined;if(_0x4d6e3c?.[_0x1cba67(0xaf)])return{'filePath':_0x5cac08};if(_0x32399d&&_0x190de3!==_0x32399d){const _0x42edc2=a8_0x328016['resolve'](_0x41528b,_0x190de3+'-api.ts');if(existsSync(_0x42edc2))return{'filePath':_0x42edc2};}return{'filePath':_0x5cac08};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x500f4e,_0x4a2e83){const _0x11f81b=a9_0x3cb4,_0x4862f2=_0x500f4e();while(!![]){try{const _0xae0a3d=parseInt(_0x11f81b(0xef))/0x1*(parseInt(_0x11f81b(0xe7))/0x2)+-parseInt(_0x11f81b(0xfe))/0x3*(-parseInt(_0x11f81b(0xe6))/0x4)+-parseInt(_0x11f81b(0xf6))/0x5*(-parseInt(_0x11f81b(0x101))/0x6)+parseInt(_0x11f81b(0xf0))/0x7*(-parseInt(_0x11f81b(0xf9))/0x8)+parseInt(_0x11f81b(0xfa))/0x9+parseInt(_0x11f81b(0xf8))/0xa*(-parseInt(_0x11f81b(0xe9))/0xb)+parseInt(_0x11f81b(0xed))/0xc*(-parseInt(_0x11f81b(0x100))/0xd);if(_0xae0a3d===_0x4a2e83)break;else _0x4862f2['push'](_0x4862f2['shift']());}catch(_0x5a2016){_0x4862f2['push'](_0x4862f2['shift']());}}}(a9_0x9638,0xbfbdb));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a9_0x9638(){const _0x3b8b8e=['validation','start','*\x20Login\x20successful!','2868sVYOXs','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','35lVwGni','949865IRzmmy','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','autoYes','No\x20valid\x20session.\x20Login\x20now?','Run\x20`','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','1965tMpPdN','Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','6740830DIKqth','40QHlsBy','13323645YMgKck','log','nonInteractive','stop','174969IRSvCd','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','108849EmeWYg','4002TsYjnJ','60xDBZzj','86954RzQhzI','!\x20Login\x20failed.','11ZIVZQo'];a9_0x9638=function(){return _0x3b8b8e;};return a9_0x9638();}import{CliErrors}from'../errors.js';function a9_0x3cb4(_0x45e2bc,_0x362fff){_0x45e2bc=_0x45e2bc-0xe6;const _0x9638db=a9_0x9638();let _0x3cb474=_0x9638db[_0x45e2bc];return _0x3cb474;}import{confirm}from'@inquirer/prompts';import a9_0x2bbada from'ora';export async function runAuthServer(_0x5b03a2){const _0x5e0173=a9_0x3cb4,_0x560962=await getIsSessionValid();if(_0x560962){console[_0x5e0173(0xfb)](_0x5e0173(0xf1));return;}if(_0x5b03a2?.[_0x5e0173(0xfc)]&&!_0x5b03a2[_0x5e0173(0xf2)])throw CliErrors[_0x5e0173(0xea)](_0x5e0173(0xf7),_0x5e0173(0xf4)+CLI_BIN_NAME+_0x5e0173(0xff));const _0x21024b=_0x5b03a2?.[_0x5e0173(0xf2)]?!![]:await confirm({'message':_0x5e0173(0xf3),'default':!![]});if(!_0x21024b)return;if(_0x5b03a2?.[_0x5e0173(0xfc)]){console['log'](_0x5e0173(0xf5));const _0x160ce8=await authServer({'silent':![],'openBrowser':![]});_0x160ce8?console['log'](_0x5e0173(0xec)):console[_0x5e0173(0xfb)](_0x5e0173(0xe8));return;}const _0x50dc53=a9_0x2bbada(_0x5e0173(0xee))[_0x5e0173(0xeb)](),_0x5c0c32=await authServer({'silent':!![],'openBrowser':!![]});_0x50dc53[_0x5e0173(0xfd)](),_0x5c0c32?console[_0x5e0173(0xfb)](_0x5e0173(0xec)):console['log'](_0x5e0173(0xe8));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2e061d,_0x545e59){const _0x1a37fd=a10_0x25f9,_0x12c9fe=_0x2e061d();while(!![]){try{const _0x30bdde=-parseInt(_0x1a37fd(0x18a))/0x1+-parseInt(_0x1a37fd(0x181))/0x2*(parseInt(_0x1a37fd(0x182))/0x3)+parseInt(_0x1a37fd(0x199))/0x4*(parseInt(_0x1a37fd(0x173))/0x5)+-parseInt(_0x1a37fd(0x19b))/0x6+-parseInt(_0x1a37fd(0x178))/0x7*(parseInt(_0x1a37fd(0x197))/0x8)+parseInt(_0x1a37fd(0x17a))/0x9*(parseInt(_0x1a37fd(0x184))/0xa)+-parseInt(_0x1a37fd(0x172))/0xb*(-parseInt(_0x1a37fd(0x18d))/0xc);if(_0x30bdde===_0x545e59)break;else _0x12c9fe['push'](_0x12c9fe['shift']());}catch(_0x20af68){_0x12c9fe['push'](_0x12c9fe['shift']());}}}(a10_0x2836,0x4b013));import{writeFileSync}from'node:fs';import a10_0x1c612e from'node:http';import a10_0x57935b from'node:https';import{getUserDomain}from'../constant/domain.js';import{getOfficialRoutingCdn,getOfficialRoutingProfile}from'../constant/routing-profile.js';import{getProjectDomainRoutingManifest}from'../config/project-domain-routing.js';import{exec}from'node:child_process';import{getIsSessionValid}from'../auth/is-session-valid.js';import{cookieFile}from'../auth/constant.js';import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export function resolveAuthCallbackRouting(_0x5143fc){const _0x37e6cf=a10_0x25f9;if(!_0x5143fc)return getProjectDomainRoutingManifest()['local'];const _0x203596=getOfficialRoutingProfile(_0x5143fc),_0x4fe9e3=getOfficialRoutingCdn(_0x5143fc);return{'origin':_0x203596['local'][_0x37e6cf(0x191)],'certificateUrl':_0x4fe9e3['lovrabet']+_0x37e6cf(0x185)};}function a10_0x2836(){const _0xc4b05=['8932DMzYTQ','3585ckfTgY','💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','certificateUrl','open\x20\x22','then','182qiwDEL','win32','1053eTqYNl','openBrowser','127.0.0.1','listen','session','user','🔐\x20Starting\x20login\x20service...','938xkUpdl','327kPltxP','writeHead','32910PMBjAd','/cert/lovrabet-dev.json','/api/auth/get-session','error','end','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','131113dRSoXA','cookie','xdg-open\x20\x22','8952wZeAdY','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','origin','close','json','port','platform','📍\x20Login\x20URL:','188184GVsoDz','object','2252uxpfJq','Auth\x20server\x20error:','1760514cyTsda','headers','/sign-in?redirect=','catch','log','utf-8','createServer'];a10_0x2836=function(){return _0xc4b05;};return a10_0x2836();}function withPort(_0x2e4cd3,_0x51cf12){const _0x2352cb=a10_0x25f9,_0x4bcfa4=new URL(_0x2e4cd3);return _0x4bcfa4[_0x2352cb(0x194)]=String(_0x51cf12),_0x4bcfa4[_0x2352cb(0x191)];}export async function authServer(_0x23ab07){const _0x4ca609=a10_0x25f9,_0x481c46=_0x23ab07?.['silent']||![],_0x2671da=_0x23ab07?.[_0x4ca609(0x17b)]??!![],_0x30e1c6=_0x23ab07?.['timeoutMs']??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x44ab47=resolveAuthCallbackRouting(),_0x396391=_0x44ab47[_0x4ca609(0x175)]?await(await fetch(_0x44ab47[_0x4ca609(0x175)]))[_0x4ca609(0x193)]():undefined;return new Promise(async(_0x1d3298,_0x423461)=>{const _0x475ac8=_0x4ca609;let _0x3052ee=0x0,_0x5d27ca=![],_0x3e7838;const _0x209bd1=async(_0x1e3a86,_0x55636d)=>{const _0xdfce9f=a10_0x25f9,_0x132580=getUserDomain(),_0x139ddd=_0x1e3a86[_0xdfce9f(0x19c)][_0xdfce9f(0x18b)]||'',_0x5e2d13=await fetch(_0x132580+_0xdfce9f(0x186),{'headers':{'cookie':_0x139ddd}})[_0xdfce9f(0x177)](_0x51d762=>_0x51d762['json']()),_0x509ad1=_0x5e2d13&&_0x5e2d13[_0xdfce9f(0x17e)]&&_0x5e2d13[_0xdfce9f(0x17f)];if(_0x509ad1){writeFileSync(cookieFile,_0x139ddd,_0xdfce9f(0x1a0));const _0x12ba64=buildLoginSuccessHtml();_0x55636d[_0xdfce9f(0x183)](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x55636d[_0xdfce9f(0x188)](_0x12ba64),_0x33b9cb(!![]);}else{const _0x40cd20=encodeURIComponent(withPort(_0x44ab47['origin'],_0x3052ee));_0x55636d[_0xdfce9f(0x183)](0x12e,{'location':_0x132580+_0xdfce9f(0x19d)+_0x40cd20}),_0x55636d[_0xdfce9f(0x188)]();return;}},_0x5b3172=_0x396391?a10_0x57935b[_0x475ac8(0x171)](_0x396391,_0x209bd1):a10_0x1c612e[_0x475ac8(0x171)](_0x209bd1);function _0x33b9cb(_0x1cc1f2){const _0x3da064=_0x475ac8;if(_0x5d27ca)return;_0x5d27ca=!![],_0x3e7838&&clearTimeout(_0x3e7838),_0x5b3172[_0x3da064(0x192)](),_0x1d3298(_0x1cc1f2);}_0x5b3172[_0x475ac8(0x17d)](0x0,_0x475ac8(0x17c),()=>{const _0x52e7ea=_0x475ac8,_0x4ed0e3=_0x5b3172['address']();_0x3052ee=typeof _0x4ed0e3===_0x52e7ea(0x198)&&_0x4ed0e3?_0x4ed0e3['port']:Number(_0x4ed0e3);const _0xf0328b=withPort(_0x44ab47['origin'],_0x3052ee);_0x3e7838=setTimeout(()=>{const _0x46f9b5=_0x52e7ea;!_0x481c46&&console[_0x46f9b5(0x19f)]('!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.'),_0x33b9cb(![]);},_0x30e1c6);!_0x481c46&&(console['log'](_0x52e7ea(0x180)),console[_0x52e7ea(0x19f)](_0x52e7ea(0x196),_0xf0328b),_0x2671da?(console[_0x52e7ea(0x19f)](_0x52e7ea(0x18e)),console[_0x52e7ea(0x19f)](''),console[_0x52e7ea(0x19f)](_0x52e7ea(0x190))):console['log'](_0x52e7ea(0x174)),console[_0x52e7ea(0x19f)](''));if(!_0x2671da)return;openInBrowser(_0xf0328b)[_0x52e7ea(0x177)](_0x2277a3=>{const _0x36624f=_0x52e7ea;!_0x481c46&&(_0x2277a3?console[_0x36624f(0x19f)]('✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.'):(console['log'](_0x36624f(0x189)),console[_0x36624f(0x19f)]('🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0xf0328b)),console[_0x36624f(0x19f)](''));})[_0x52e7ea(0x19e)](()=>{const _0x26f4e4=_0x52e7ea;!_0x481c46&&(console[_0x26f4e4(0x19f)](_0x26f4e4(0x189)),console[_0x26f4e4(0x19f)](_0x26f4e4(0x18f),_0xf0328b),console['log'](''));});}),_0x5b3172['on'](_0x475ac8(0x187),_0x460b6a=>{const _0x32a9a8=_0x475ac8;if(_0x5d27ca)return;_0x5d27ca=!![],_0x3e7838&&clearTimeout(_0x3e7838),!_0x481c46&&console[_0x32a9a8(0x187)](_0x32a9a8(0x19a),_0x460b6a),_0x5b3172[_0x32a9a8(0x192)](),_0x423461(_0x460b6a);});});}function openInBrowser(_0x3e1202){return new Promise(_0x28f14a=>{const _0xb4c51=a10_0x25f9,_0x48b2e7=process[_0xb4c51(0x195)];let _0x3fce71;if(_0x48b2e7===_0xb4c51(0x179))_0x3fce71='cmd\x20/c\x20start\x20\x22\x22\x20\x22'+_0x3e1202+'\x22';else _0x48b2e7==='darwin'?_0x3fce71=_0xb4c51(0x176)+_0x3e1202+'\x22':_0x3fce71=_0xb4c51(0x18c)+_0x3e1202+'\x22';exec(_0x3fce71,_0x4fe43f=>{_0x4fe43f?_0x28f14a(![]):_0x28f14a(!![]);});});}function a10_0x25f9(_0x50e076,_0x4c2b99){_0x50e076=_0x50e076-0x171;const _0x283637=a10_0x2836();let _0x25f98e=_0x283637[_0x50e076];return _0x25f98e;}if(import.meta.main){const isAuth=await authServer();console['log']('isAuth',isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a11_0x2a13f=a11_0x2175;(function(_0x92d895,_0x213677){const _0x1de157=a11_0x2175,_0x757bb0=_0x92d895();while(!![]){try{const _0x19d63d=-parseInt(_0x1de157(0x104))/0x1+-parseInt(_0x1de157(0xfd))/0x2*(-parseInt(_0x1de157(0xfb))/0x3)+-parseInt(_0x1de157(0xfe))/0x4*(-parseInt(_0x1de157(0xff))/0x5)+-parseInt(_0x1de157(0xfc))/0x6*(parseInt(_0x1de157(0x105))/0x7)+-parseInt(_0x1de157(0x101))/0x8+-parseInt(_0x1de157(0xfa))/0x9*(parseInt(_0x1de157(0x100))/0xa)+parseInt(_0x1de157(0x102))/0xb;if(_0x19d63d===_0x213677)break;else _0x757bb0['push'](_0x757bb0['shift']());}catch(_0x463fc8){_0x757bb0['push'](_0x757bb0['shift']());}}}(a11_0x3719,0x2086a));import{mkdirSync}from'node:fs';function a11_0x3719(){const _0x4619c5=['163816VhrdVM','56OzepJg','430ysgOmA','5190idzAmc','2064776ArYaxV','5429413CcxQaB','.lovrabet','62139xTVegU','53536rJJBrH','cookie','999KuaKtZ','9jSoEok','180zOaBOi'];a11_0x3719=function(){return _0x4619c5;};return a11_0x3719();}import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a11_0x2a13f(0x103));export const cookieFile=join(configDir,a11_0x2a13f(0xf9));function a11_0x2175(_0x242e9b,_0x17e17c){_0x242e9b=_0x242e9b-0xf9;const _0x371954=a11_0x3719();let _0x217550=_0x371954[_0x242e9b];return _0x217550;}mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3e3eaf,_0x2f96d6){var _0x27c460=a12_0x177d,_0x290ed2=_0x3e3eaf();while(!![]){try{var _0xf4add2=-parseInt(_0x27c460(0x125))/0x1+parseInt(_0x27c460(0x12a))/0x2*(-parseInt(_0x27c460(0x12b))/0x3)+parseInt(_0x27c460(0x126))/0x4*(-parseInt(_0x27c460(0x12c))/0x5)+parseInt(_0x27c460(0x12f))/0x6+parseInt(_0x27c460(0x128))/0x7+-parseInt(_0x27c460(0x129))/0x8+parseInt(_0x27c460(0x127))/0x9*(parseInt(_0x27c460(0x12e))/0xa);if(_0xf4add2===_0x2f96d6)break;else _0x290ed2['push'](_0x290ed2['shift']());}catch(_0x3de6f6){_0x290ed2['push'](_0x290ed2['shift']());}}}(a12_0x5216,0x9af69));import{readFileSync}from'node:fs';function a12_0x177d(_0xa69a4c,_0x5c757a){_0xa69a4c=_0xa69a4c-0x125;var _0x52162e=a12_0x5216();var _0x177dcc=_0x52162e[_0xa69a4c];return _0x177dcc;}import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0x4d4a9b=a12_0x177d;try{return readFileSync(cookieFile,_0x4d4a9b(0x12d));}catch{}return'';}function a12_0x5216(){var _0x2b82cd=['utf-8','10qtBwcL','7034490bGRJFm','878582yplkAu','3508PrTmJZ','9092772dDehEQ','5586385OCYGhp','7735440qpEjbk','5468xHqUIX','402dBCspF','765eiKmws'];a12_0x5216=function(){return _0x2b82cd;};return a12_0x5216();}
|
|
@@ -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(_0x4705e7,_0x51b13c){const _0x241d32=a13_0x5db5,_0xf00f0f=_0x4705e7();while(!![]){try{const _0x5d57e0=parseInt(_0x241d32(0x9d))/0x1+parseInt(_0x241d32(0xa0))/0x2*(-parseInt(_0x241d32(0xa8))/0x3)+-parseInt(_0x241d32(0xa4))/0x4*(-parseInt(_0x241d32(0x9c))/0x5)+parseInt(_0x241d32(0xa6))/0x6*(parseInt(_0x241d32(0x9f))/0x7)+parseInt(_0x241d32(0xa1))/0x8+-parseInt(_0x241d32(0xa9))/0x9*(parseInt(_0x241d32(0xa7))/0xa)+-parseInt(_0x241d32(0xa3))/0xb;if(_0x5d57e0===_0x51b13c)break;else _0xf00f0f['push'](_0xf00f0f['shift']());}catch(_0x30c62f){_0xf00f0f['push'](_0xf00f0f['shift']());}}}(a13_0x54d0,0x6cbd7));function a13_0x5db5(_0x4f00dd,_0x28ef0d){_0x4f00dd=_0x4f00dd-0x9c;const _0x54d0e6=a13_0x54d0();let _0x5db5c0=_0x54d0e6[_0x4f00dd];return _0x5db5c0;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(_0x155e01){const _0x2e1a17=a13_0x5db5;try{if(_0x155e01===undefined){if(!existsSync(cookieFile))return null;_0x155e01=readFileSync(cookieFile,_0x2e1a17(0xa5));}if(!_0x155e01)return null;const _0x59f1bb=await fetch(getUserDomain()+_0x2e1a17(0x9e),{'headers':{'cookie':_0x155e01}});if(!_0x59f1bb['ok'])return null;const _0x11a369=await _0x59f1bb[_0x2e1a17(0xaa)]();if(!_0x11a369[_0x2e1a17(0xa2)]||!_0x11a369[_0x2e1a17(0xab)])return null;return _0x11a369;}catch{return null;}}function a13_0x54d0(){const _0x12d646=['user','5SUTClE','160112hWKYRR','/api/auth/get-session','7xNgoaG','129924YXkBtV','5227520DKNrqm','session','7675954IRHFcw','1476856LVuOjx','utf-8','3808494JaZWzR','548920QnGeoc','21fcpTDc','36mtrchL','json'];a13_0x54d0=function(){return _0x12d646;};return a13_0x54d0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a14_0x2e07(){const _0x4592cf=['1360596kIUnve','484345FcMUuE','24338440iQiqqK','/api/auth/get-session','63iZxSzL','utf-8','531566kaBGAY','json','5504292pMbnQv','user','session','744067SfVBMr','712662oerqWn','then'];a14_0x2e07=function(){return _0x4592cf;};return a14_0x2e07();}(function(_0x48e881,_0x5907c2){const _0x424a1e=a14_0xb31d,_0x4f6f2b=_0x48e881();while(!![]){try{const _0x4b9ab7=parseInt(_0x424a1e(0xd7))/0x1+parseInt(_0x424a1e(0xe0))/0x2+parseInt(_0x424a1e(0xda))/0x3+parseInt(_0x424a1e(0xe2))/0x4+-parseInt(_0x424a1e(0xdb))/0x5+parseInt(_0x424a1e(0xd8))/0x6*(parseInt(_0x424a1e(0xde))/0x7)+-parseInt(_0x424a1e(0xdc))/0x8;if(_0x4b9ab7===_0x5907c2)break;else _0x4f6f2b['push'](_0x4f6f2b['shift']());}catch(_0x428d1c){_0x4f6f2b['push'](_0x4f6f2b['shift']());}}}(a14_0x2e07,0xbbcfa));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a14_0xb31d(_0x14bbe0,_0x280744){_0x14bbe0=_0x14bbe0-0xd7;const _0x2e075a=a14_0x2e07();let _0xb31de6=_0x2e075a[_0x14bbe0];return _0xb31de6;}export async function getIsSessionValid(){const _0x167d1d=a14_0xb31d;try{if(!existsSync(cookieFile))return![];const _0x35e7b6=readFileSync(cookieFile,_0x167d1d(0xdf)),_0x444e92=await fetch(getUserDomain()+_0x167d1d(0xdd),{'headers':{'cookie':_0x35e7b6}})[_0x167d1d(0xd9)](_0x526eb3=>_0x526eb3[_0x167d1d(0xe1)]());return _0x444e92&&_0x444e92[_0x167d1d(0xe4)]&&_0x444e92[_0x167d1d(0xe3)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a15_0x388d(){const _0x2155b8=['83924JfvidJ','</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>','<!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>','133BMAPNP','30780OBcmEg','11690zlqAJs','6971058iRBTlB','8549110TStSKO','567592YGRIgs','1569004OFJOXF','4HZupbu','2027343JkHVAU'];a15_0x388d=function(){return _0x2155b8;};return a15_0x388d();}(function(_0x280e69,_0x2648f0){const _0x5b5e5b=a15_0x2b8c,_0x5aa764=_0x280e69();while(!![]){try{const _0xbdc42f=-parseInt(_0x5b5e5b(0x1d5))/0x1+-parseInt(_0x5b5e5b(0x1d8))/0x2+-parseInt(_0x5b5e5b(0x1d7))/0x3*(parseInt(_0x5b5e5b(0x1d6))/0x4)+parseInt(_0x5b5e5b(0x1d3))/0x5+-parseInt(_0x5b5e5b(0x1d2))/0x6+parseInt(_0x5b5e5b(0x1cf))/0x7*(-parseInt(_0x5b5e5b(0x1d4))/0x8)+-parseInt(_0x5b5e5b(0x1d0))/0x9*(-parseInt(_0x5b5e5b(0x1d1))/0xa);if(_0xbdc42f===_0x2648f0)break;else _0x5aa764['push'](_0x5aa764['shift']());}catch(_0x27e110){_0x5aa764['push'](_0x5aa764['shift']());}}}(a15_0x388d,0xde74d));function a15_0x2b8c(_0x3ad2e7,_0x3d3846){_0x3ad2e7=_0x3ad2e7-0x1ce;const _0x388dab=a15_0x388d();let _0x2b8c0e=_0x388dab[_0x3ad2e7];return _0x2b8c0e;}export function buildLoginSuccessHtml(){const _0x4c56c2=a15_0x2b8c,_0x2de613='Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.';return _0x4c56c2(0x1ce)+_0x2de613+_0x4c56c2(0x1d9);}
|