@lovrabet/rabetbase-cli 2.5.8-beta.1 → 2.5.8
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 +7 -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.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/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -2
- 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/kb-management-client.d.ts +19 -0
- package/lib/core/kb-management-client.js +1 -0
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase/references/rabetbase-kb.md +7 -6
- 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/README.md
CHANGED
|
@@ -149,6 +149,13 @@ exclusive.
|
|
|
149
149
|
React and Ant Design. `cdn.lovrabet` is the HTTPS origin for Lovrabet-owned
|
|
150
150
|
assets. Independent deployments declare both explicitly.
|
|
151
151
|
|
|
152
|
+
Company knowledge management and V2 search use `kbServiceDomain` with the developer
|
|
153
|
+
Cookie. Management requires a trusted HTTPS origin, rejects redirects, and sends
|
|
154
|
+
`X-CSRF-Token: kb-browser-v1` on create/update/delete. App rules continue to use
|
|
155
|
+
`kbDomain`. Management JSON requests are limited to 32 MiB; oversized input is
|
|
156
|
+
rejected without truncation. A missing independent-deployment `kbServiceDomain`
|
|
157
|
+
must be configured before management commands can run.
|
|
158
|
+
|
|
152
159
|
Official routing is compiled into this package from the independent
|
|
153
160
|
`lovrabet-routing` repository. The CLI does not download that catalog at
|
|
154
161
|
runtime. Generated files under `src/generated/` are read-only snapshots with a
|
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x569919,_0x58cd39){const _0x19b41b=a0_0x4cbf,_0x3d3fdf=_0x569919();while(!![]){try{const _0x3e8c91=-parseInt(_0x19b41b(0x77))/0x1+-parseInt(_0x19b41b(0x89))/0x2*(parseInt(_0x19b41b(0x90))/0x3)+-parseInt(_0x19b41b(0x8a))/0x4*(parseInt(_0x19b41b(0x87))/0x5)+-parseInt(_0x19b41b(0x7e))/0x6+parseInt(_0x19b41b(0x79))/0x7*(parseInt(_0x19b41b(0x7d))/0x8)+-parseInt(_0x19b41b(0x7c))/0x9+parseInt(_0x19b41b(0x82))/0xa;if(_0x3e8c91===_0x58cd39)break;else _0x3d3fdf['push'](_0x3d3fdf['shift']());}catch(_0x5830e3){_0x3d3fdf['push'](_0x3d3fdf['shift']());}}}(a0_0x3647,0x33ec0));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x4ab672 from'node:path';import{fetchDatasetDoc}from'../core/api-client.js';import{logger}from'../utils/logger.js';function a0_0x4cbf(_0xeac92b,_0x59774a){_0xeac92b=_0xeac92b-0x75;const _0x364707=a0_0x3647();let _0x4cbf76=_0x364707[_0xeac92b];return _0x4cbf76;}export{fetchDatasetDoc}from'../core/api-client.js';function delay(_0x3e37b6){return new Promise(_0x5a42e5=>setTimeout(_0x5a42e5,_0x3e37b6));}function a0_0x3647(){const _0x34572a=['105958LPpeJj','13236JLEYiW','.md\x20(','push','length','✓\x20Generated:\x20','api-doc','15zkJPqF','✗\x20Failed:\x20','.md\x20-\x20','189554bfgwRj','Waiting\x203\x20seconds...\x0a','75243PHlDxs','log','tableName','2825406ABiUVV','248CBShjK','318900gDhtVT','Generated\x20docs\x20successfully:\x20','datasetCode','utf8','7109130tKEihI','name',']\x20Generating:\x20','success','message','15jSlfnh','.md'];a0_0x3647=function(){return _0x34572a;};return a0_0x3647();}export async function generateDatasetDocs(_0x14b02e,_0x50565b,_0x212188,_0x2a7a55='./docs',_0x44c41e,_0x12863c){const _0xfd1f0f=a0_0x4cbf;mkdirSync(_0x2a7a55,{'recursive':!![]});const _0x5beafc=[],_0x3e4703=_0x14b02e[_0xfd1f0f(0x8d)];console['log']('\x0a'+_0x3e4703+'\x20datasets\x20to\x20generate\x20docs\x20for\x0a');for(let _0x5a2269=0x0;_0x5a2269<_0x14b02e[_0xfd1f0f(0x8d)];_0x5a2269++){const _0x3571b9=_0x14b02e[_0x5a2269],_0x49b5ab=_0x5a2269+0x1,_0x449122=_0x3571b9[_0xfd1f0f(0x7b)];try{console[_0xfd1f0f(0x7a)]('['+_0x49b5ab+'/'+_0x3e4703+_0xfd1f0f(0x84)+_0x449122+_0xfd1f0f(0x8b)+_0x3571b9['name']+')');if(_0x44c41e)_0x44c41e(_0x49b5ab,_0x3e4703,_0x449122);const _0x7569d7=await fetchDatasetDoc({'appCode':_0x50565b,'cookie':_0x212188,'datasetCode':_0x3571b9[_0xfd1f0f(0x80)],'datasetId':_0x3571b9['id'],'enableAI':![],'extraParams':_0x12863c}),_0x395370=a0_0x4ab672['join'](_0x2a7a55,_0x449122+_0xfd1f0f(0x88));writeFileSync(_0x395370,_0x7569d7,{'encoding':_0xfd1f0f(0x81)}),console[_0xfd1f0f(0x7a)](_0xfd1f0f(0x8e)+_0x449122+_0xfd1f0f(0x88)),logger[_0xfd1f0f(0x85)](_0xfd1f0f(0x8f),_0xfd1f0f(0x7f)+_0x449122,undefined,{'datasetCode':_0x3571b9[_0xfd1f0f(0x80)],'datasetName':_0x3571b9[_0xfd1f0f(0x83)],'filePath':_0x395370,'progress':_0x49b5ab+'/'+_0x3e4703}),_0x5beafc['push']({'datasetCode':_0x3571b9[_0xfd1f0f(0x80)],'datasetName':_0x3571b9[_0xfd1f0f(0x83)],'filePath':_0x395370,'success':!![]});if(_0x49b5ab<_0x3e4703)await delay(0x1388);}catch(_0x3adae8){const _0x4f3c58=_0x3adae8 instanceof Error?_0x3adae8[_0xfd1f0f(0x86)]:String(_0x3adae8);console[_0xfd1f0f(0x7a)](_0xfd1f0f(0x75)+_0x449122+_0xfd1f0f(0x76)+_0x4f3c58),logger['error'](_0xfd1f0f(0x8f),'Failed\x20to\x20generate\x20docs:\x20'+_0x3571b9[_0xfd1f0f(0x80)],{'datasetCode':_0x3571b9[_0xfd1f0f(0x80)],'datasetName':_0x3571b9[_0xfd1f0f(0x83)],'error':_0x4f3c58,'progress':_0x49b5ab+'/'+_0x3e4703}),_0x5beafc[_0xfd1f0f(0x8c)]({'datasetCode':_0x3571b9[_0xfd1f0f(0x80)],'datasetName':_0x3571b9[_0xfd1f0f(0x83)],'filePath':'','success':![],'error':_0x4f3c58}),_0x49b5ab<_0x3e4703&&(console[_0xfd1f0f(0x7a)](_0xfd1f0f(0x78)),await delay(0xbb8));}}return _0x5beafc;}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a1_0x52ae7d=a1_0x4aab;(function(_0x3653ce,_0x93bb2f){const _0xa925c3=a1_0x4aab,_0x24bd7b=_0x3653ce();while(!![]){try{const _0x3b297a=parseInt(_0xa925c3(0x99))/0x1+-parseInt(_0xa925c3(0xa5))/0x2*(parseInt(_0xa925c3(0x91))/0x3)+parseInt(_0xa925c3(0x97))/0x4+-parseInt(_0xa925c3(0x8d))/0x5+-parseInt(_0xa925c3(0x9a))/0x6*(-parseInt(_0xa925c3(0x90))/0x7)+-parseInt(_0xa925c3(0x8c))/0x8*(-parseInt(_0xa925c3(0x96))/0x9)+parseInt(_0xa925c3(0x9e))/0xa;if(_0x3b297a===_0x93bb2f)break;else _0x24bd7b['push'](_0x24bd7b['shift']());}catch(_0x8fc9ee){_0x24bd7b['push'](_0x24bd7b['shift']());}}}(a1_0x1841,0x31dec));function a1_0x1841(){const _0x499590=['\x22\x20resolves\x20to\x20multiple\x20API\x20directories.','1099467wKHIEn','768908lQxEDQ','get','257116JDaVwJ','6042piIyEh','Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20','length','Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.','446010TvRJkL','map','API\x20group\x20\x22','apiGroup','outputDir','cwd','validation','2yckNmM','API\x20directory\x20\x22','name','filter','set','trim','flatMap','app','resolve','8eCpvnb','2025660ctggAz','push','size','49kMTiLn','41268fRxjgR','join','normalizedApiDir','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.'];a1_0x1841=function(){return _0x499590;};return a1_0x1841();}import a1_0x163d36 from'node:path';function a1_0x4aab(_0x5a43e1,_0x5027d0){_0x5a43e1=_0x5a43e1-0x89;const _0x18419a=a1_0x1841();let _0x4aabba=_0x18419a[_0x5a43e1];return _0x4aabba;}import{CliErrors}from'../errors.js';export function normalizeApiDir(_0x29bc86,_0xfc81bd=process[a1_0x52ae7d(0xa3)]()){const _0x3ce149=a1_0x52ae7d;return a1_0x163d36[_0x3ce149(0x8b)](_0xfc81bd,_0x29bc86);}function normalizedApiGroup(_0x384260){const _0xb72896=a1_0x52ae7d,_0x2933c1=_0x384260?.[_0xb72896(0xaa)]();return _0x2933c1||undefined;}export function resolveApiProfileLayouts(_0x2d7e9c,_0x13a512,_0x45222c=process[a1_0x52ae7d(0xa3)]()){const _0x10179a=a1_0x52ae7d,_0x180e02=_0x2d7e9c[_0x10179a(0x9f)](_0x3fe92e=>{const _0x212f50=_0x10179a,_0x1aa508=_0x13a512(_0x3fe92e);return{'app':_0x3fe92e,'outputDir':_0x1aa508,'normalizedApiDir':normalizeApiDir(_0x1aa508,_0x45222c),'apiGroup':normalizedApiGroup(_0x3fe92e[_0x212f50(0xa1)])};}),_0x48df68=new Map();for(const _0x248fed of _0x180e02){if(!_0x248fed[_0x10179a(0xa1)])continue;const _0x4eb993=_0x48df68['get'](_0x248fed[_0x10179a(0xa1)])??new Set();_0x4eb993['add'](_0x248fed[_0x10179a(0x93)]),_0x48df68[_0x10179a(0xa9)](_0x248fed[_0x10179a(0xa1)],_0x4eb993);}for(const [_0x5c4383,_0x5d599e]of _0x48df68){if(_0x5d599e['size']>0x1)throw CliErrors[_0x10179a(0xa4)](_0x10179a(0xa0)+_0x5c4383+_0x10179a(0x95),_0x10179a(0x9d));}const _0x2fb4bc=new Map();for(const _0x5b1285 of _0x180e02){const _0x2ab2b4=_0x2fb4bc[_0x10179a(0x98)](_0x5b1285['normalizedApiDir'])??[];_0x2ab2b4[_0x10179a(0x8e)](_0x5b1285),_0x2fb4bc[_0x10179a(0xa9)](_0x5b1285['normalizedApiDir'],_0x2ab2b4);}for(const _0x3d70f5 of _0x2fb4bc['values']()){const _0x4d0a12=new Set(_0x3d70f5[_0x10179a(0x89)](_0x1d2862=>_0x1d2862[_0x10179a(0xa1)]?[_0x1d2862[_0x10179a(0xa1)]]:[]));if(_0x4d0a12['size']===0x0)continue;if(_0x4d0a12[_0x10179a(0x8f)]>0x1||_0x3d70f5['some'](_0x3d5f52=>!_0x3d5f52[_0x10179a(0xa1)])){const _0x17b4b5=_0x3d70f5[_0x10179a(0x9f)](_0xa04946=>_0xa04946[_0x10179a(0x8a)][_0x10179a(0xa7)])[_0x10179a(0x92)](',\x20');throw CliErrors[_0x10179a(0xa4)](_0x10179a(0xa6)+_0x3d70f5[0x0][_0x10179a(0xa2)]+_0x10179a(0x94),_0x10179a(0x9b)+_0x17b4b5+'.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.');}}return _0x180e02;}export function getRegistryGroup(_0x4f32d1,_0x467240){const _0x4ac3be=a1_0x52ae7d;if(_0x467240[_0x4ac3be(0xa1)])return _0x4f32d1[_0x4ac3be(0xa8)](_0x1fbad0=>_0x1fbad0['apiGroup']===_0x467240[_0x4ac3be(0xa1)]);const _0x1bfd02=_0x4f32d1[_0x4ac3be(0xa8)](_0x486f4f=>_0x486f4f[_0x4ac3be(0x93)]===_0x467240['normalizedApiDir']);return _0x1bfd02[_0x4ac3be(0x9c)]===0x1?_0x1bfd02:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d7184,_0x2e1641){var _0x2bf724=a2_0x1adc,_0x151dd4=_0x4d7184();while(!![]){try{var _0x19d40f=-parseInt(_0x2bf724(0x1d9))/0x1+-parseInt(_0x2bf724(0x1dd))/0x2*(parseInt(_0x2bf724(0x1d7))/0x3)+parseInt(_0x2bf724(0x1da))/0x4*(parseInt(_0x2bf724(0x1d6))/0x5)+-parseInt(_0x2bf724(0x1dc))/0x6*(-parseInt(_0x2bf724(0x1d8))/0x7)+-parseInt(_0x2bf724(0x1d4))/0x8+-parseInt(_0x2bf724(0x1d5))/0x9+parseInt(_0x2bf724(0x1db))/0xa;if(_0x19d40f===_0x2e1641)break;else _0x151dd4['push'](_0x151dd4['shift']());}catch(_0x27d2c5){_0x151dd4['push'](_0x151dd4['shift']());}}}(a2_0x2924,0x350c7));function a2_0x2924(){var _0x35fe6e=['4869610EgrPMC','359826KByjWE','30UCkGtR','1595320OEArRb','3728367GSyTts','236935HqUqlS','22164xXrWep','28dZonMP','164156ObfmlP','32uPxzMM'];a2_0x2924=function(){return _0x35fe6e;};return a2_0x2924();}function a2_0x1adc(_0x3e7d11,_0x1f90c0){_0x3e7d11=_0x3e7d11-0x1d4;var _0x292416=a2_0x2924();var _0x1adc9a=_0x292416[_0x3e7d11];return _0x1adc9a;}export{fetchModelList}from'../core/api-client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5268aa,_0x45bee8){const _0x289bf4=a3_0x29f4,_0x434ed=_0x5268aa();while(!![]){try{const _0x422060=parseInt(_0x289bf4(0x1c2))/0x1*(-parseInt(_0x289bf4(0x1af))/0x2)+parseInt(_0x289bf4(0x1d5))/0x3*(-parseInt(_0x289bf4(0x1e2))/0x4)+parseInt(_0x289bf4(0x1b2))/0x5+-parseInt(_0x289bf4(0x1d3))/0x6+-parseInt(_0x289bf4(0x1ba))/0x7+parseInt(_0x289bf4(0x1c4))/0x8*(-parseInt(_0x289bf4(0x1d9))/0x9)+parseInt(_0x289bf4(0x1db))/0xa*(parseInt(_0x289bf4(0x1ca))/0xb);if(_0x422060===_0x45bee8)break;else _0x434ed['push'](_0x434ed['shift']());}catch(_0x2c3221){_0x434ed['push'](_0x434ed['shift']());}}}(a3_0x11c5,0x3c5db));import a3_0x384454 from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x2a50a8 from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a3_0x11c5(){const _0x31d391=['allowEmptyModelReplacement','overwriteTypescript','alias','APP_','236407WxMVQh','datasetCode','24CMAEhA','templates/generate-api','utf8','modelRuntime','\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.','none','583wiEwNB','default','action','join','init-api','resolve','-client','CONFIG_NAMES.DEFAULT','includes','579012MyjDol','api.ts.tpl','71727azVwGf','-api','preserved',',\x20env:\x20','1218897ascBDW','defaultName','232680kOZSAI','refreshed','dirname','../..','Model\x20facts\x20refreshed.','\x20config\x20set\x20app\x20<value>`','typescript','52qPVpwo','scaffoldMode','name','path','map','.ts','key','missing','2FZCQFW','api','created','889920ucPvDe','client','replace','LOVRABET_RUNTIME_DOMAIN','basename','replaceApiContent','modelProfile','{\x20apiConfigName:\x20','797328eXHNAI','stringify','test',',\x20...LOVRABET_SDK_CONFIG\x20}'];a3_0x11c5=function(){return _0x31d391;};return a3_0x11c5();}import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';import{generateSdkConfigFile}from'../api/generate-sdk-config-file.js';function a3_0x29f4(_0x37811e,_0x111c5b){_0x37811e=_0x37811e-0x1ac;const _0x11c586=a3_0x11c5();let _0x29f435=_0x11c586[_0x37811e];return _0x29f435;}import{MODEL_REGISTRY_FILE_NAME,MODEL_RUNTIME_FILE_NAME,updateModelRegistry}from'../api/model-registry-file.js';import{renderModelRegistryScaffold}from'../api/model-registry-scaffold.js';function fileAction(_0xed8a0d,_0x5d8e95){const _0x566033=a3_0x29f4;if(!_0x5d8e95)return _0xed8a0d?_0x566033(0x1d7):_0x566033(0x1ae);return _0xed8a0d?'overwritten':_0x566033(0x1b1);}export async function generateApiFile(_0x120c71,_0x2ffa68,_0x24e4a1,_0x2df246,_0x1dd80a,_0x2f281e,_0x129373,_0x3c6146={},_0x33434f={}){const _0x5368af=a3_0x29f4;if(!_0x24e4a1)throw new Error('Please\x20configure\x20app\x20code\x20first\x20via\x20`'+CLI_BIN_NAME+_0x5368af(0x1e0));const _0x4d0db7=_0x2df246&&!_0x129373,_0x3e6fdb=!!_0x33434f[_0x5368af(0x1b8)],_0x202e46=_0x3e6fdb||_0x4d0db7,_0x360c6d=_0x129373||_0x24e4a1,_0x194745=_0x3e6fdb||_0x4d0db7?_0x5368af(0x1cb):_0x360c6d,_0x32fad0=_0x3e6fdb||_0x4d0db7?_0x5368af(0x1d1):JSON[_0x5368af(0x1bb)](_0x360c6d),_0x1e8349=!isProduction(_0x1dd80a),_0x47a794=_0x1e8349?_0x5368af(0x1d8)+JSON[_0x5368af(0x1bb)](_0x1dd80a):'',_0xa81671=_0x5368af(0x1b9)+_0x32fad0+_0x47a794+_0x5368af(0x1bd),_0x13b53f=_0x3e6fdb?'':_0x2ffa68,_0x3eb591=_0x13b53f?_0x13b53f+_0x5368af(0x1d6):_0x5368af(0x1b0),_0x2e198d=_0x13b53f?_0x13b53f+_0x5368af(0x1d0):_0x5368af(0x1b3),_0x14832a=_0x13b53f&&!/^app-[a-f0-9]+$/i['test'](_0x13b53f)?_0x13b53f[_0x5368af(0x1b4)](/-/g,'_')['toUpperCase']():'LOVRABET',_0x36c1f8=/^\d/[_0x5368af(0x1bc)](_0x14832a)?_0x5368af(0x1c1)+_0x14832a:_0x14832a,_0x17780b=_0x120c71[_0x5368af(0x1e6)](_0x4e2066=>({'datasetCode':_0x4e2066[_0x5368af(0x1c3)],'tableName':_0x4e2066['tableName'],'name':_0x4e2066[_0x5368af(0x1e4)]||'','alias':_0x4e2066[_0x5368af(0x1c0)]||_0x4e2066[_0x5368af(0x1ad)]})),_0x1ebad7=fileURLToPath(import.meta.url),_0x2b9cb8=a3_0x2a50a8[_0x5368af(0x1cf)](a3_0x2a50a8[_0x5368af(0x1dd)](_0x1ebad7),_0x5368af(0x1de)),_0x2e7cd0=a3_0x2a50a8[_0x5368af(0x1cd)](_0x2b9cb8,_0x5368af(0x1c5)),_0x6713=a3_0x2a50a8[_0x5368af(0x1cd)](_0x2e7cd0,_0x5368af(0x1d4)),_0x3abd08=a3_0x2a50a8[_0x5368af(0x1cd)](_0x2e7cd0,'client.ts.tpl'),_0x2862ab=_0x2f281e;mkdirSync(_0x2862ab,{'recursive':!![]});const _0xd6b055=_0x3e6fdb?{}:_0x3c6146,_0x54e512=await generateSdkConfigFile(_0x2862ab,_0xd6b055,_0x13b53f),_0x356aff=a3_0x2a50a8[_0x5368af(0x1b6)](_0x54e512,'.ts'),_0x591d2f=a3_0x2a50a8[_0x5368af(0x1cd)](_0x2862ab,_0x3eb591+_0x5368af(0x1ac)),_0x12d34b=a3_0x2a50a8['join'](_0x2862ab,_0x2e198d+_0x5368af(0x1ac)),_0x1b74b5=_0x33434f[_0x5368af(0x1bf)]===!![],_0x582524=existsSync(_0x591d2f),_0x6b1f1c=existsSync(_0x12d34b),_0x446a03=_0x33434f[_0x5368af(0x1e3)]??(_0x1b74b5?_0x5368af(0x1b4):_0x5368af(0x1ae)),_0x4aedde=_0x446a03===_0x5368af(0x1b4)||_0x446a03===_0x5368af(0x1ae)&&!_0x582524,_0x25897c=_0x446a03==='replace'||_0x446a03===_0x5368af(0x1ae)&&!_0x6b1f1c,_0x5049a0=_0x33434f[_0x5368af(0x1b8)]?updateModelRegistry({'outputDir':_0x2862ab,'profileName':_0x33434f[_0x5368af(0x1b8)][_0x5368af(0x1e4)],'defaultProfile':_0x33434f['modelProfile'][_0x5368af(0x1da)],'appCode':_0x24e4a1,'runtimeDomain':_0x33434f[_0x5368af(0x1b8)]['runtimeDomain'],'models':_0x17780b,'allowEmptyReplacement':_0x33434f[_0x5368af(0x1be)]===!![]}):undefined,_0x512b52=_0x5049a0?a3_0x2a50a8[_0x5368af(0x1cd)](_0x2862ab,MODEL_RUNTIME_FILE_NAME):undefined,_0x26e1c9=_0x512b52?existsSync(_0x512b52):![],_0x27b4c9=_0x3e6fdb&&_0x446a03!==_0x5368af(0x1c9)?await renderModelRegistryScaffold(_0x2862ab):undefined;_0x512b52&&_0x27b4c9&&writeFileSync(_0x512b52,_0x27b4c9[_0x5368af(0x1c7)],_0x5368af(0x1c6));const _0x592696=_0x17780b[0x0]?.[_0x5368af(0x1c0)];if(_0x4aedde){const _0x197c58=_0x27b4c9?.[_0x5368af(0x1b0)]??readFileSync(_0x6713,_0x5368af(0x1c6)),_0xc0f521=_0x3e6fdb?_0x197c58:TemplateReplacer['replaceApiContent'](_0x197c58,_0x24e4a1,_0x17780b,_0x592696,_0x3eb591,_0x32fad0,undefined,_0x36c1f8);writeFileSync(_0x591d2f,await a3_0x384454['format'](_0xc0f521,{'parser':_0x5368af(0x1e1)}),{'encoding':_0x5368af(0x1c6)});}if(_0x25897c){const _0x4ffbee=_0x27b4c9?.[_0x5368af(0x1b3)]??readFileSync(_0x3abd08,'utf8'),_0x31b123=_0x3e6fdb?_0x4ffbee:TemplateReplacer[_0x5368af(0x1b7)](_0x4ffbee,_0x24e4a1,_0x17780b,_0x592696,_0x3eb591,_0x32fad0,_0xa81671,_0x36c1f8,_0x356aff);writeFileSync(_0x12d34b,await a3_0x384454['format'](_0x31b123,{'parser':_0x5368af(0x1e1)}),{'encoding':_0x5368af(0x1c6)});}const _0x2769f8=_0x17780b['length'],_0x40c389={'api':{'path':_0x591d2f,'action':fileAction(_0x582524,_0x4aedde)},'client':{'path':_0x12d34b,'action':fileAction(_0x6b1f1c,_0x25897c)},'sdkConfig':{'path':_0x54e512,'action':'refreshed'},..._0x5049a0?{'modelRegistry':{'path':_0x5049a0['path'],'action':_0x5049a0['existed']?'refreshed':_0x5368af(0x1b1)},'modelRuntime':{'path':_0x512b52,'action':_0x27b4c9?_0x26e1c9?_0x5368af(0x1dc):_0x5368af(0x1b1):_0x26e1c9?_0x5368af(0x1d7):'missing'}}:{}},_0x278a84=existsSync(_0x591d2f)&&readFileSync(_0x591d2f,'utf8')[_0x5368af(0x1d2)](MODEL_REGISTRY_FILE_NAME['replace'](_0x5368af(0x1ac),'')),_0x2ce66a=existsSync(_0x12d34b)&&readFileSync(_0x12d34b,_0x5368af(0x1c6))[_0x5368af(0x1d2)](_0x5368af(0x1b5)),_0x1dbd74=_0x3e6fdb?!_0x278a84||!_0x2ce66a||!existsSync(_0x512b52):![],_0x417af2=_0x3e6fdb?_0x1dbd74:_0x40c389[_0x5368af(0x1b0)][_0x5368af(0x1cc)]==='preserved'||_0x40c389[_0x5368af(0x1b3)][_0x5368af(0x1cc)]===_0x5368af(0x1d7);return logger['success'](_0x5368af(0x1ce),_0x417af2?a3_0x2a50a8[_0x5368af(0x1b6)](_0x54e512)+_0x5368af(0x1c8):_0x3e6fdb?_0x5368af(0x1df):'API\x20scaffold\x20written.',undefined,{'apiFile':_0x591d2f,'clientFile':_0x12d34b,'sdkConfig':_0x54e512,'modelCount':_0x2769f8,'configName':_0x194745,'isDefaultConfig':_0x202e46,'needsAgentMerge':_0x417af2,'needsProjectUpgrade':_0x1dbd74,'files':_0x40c389}),{'appCode':_0x24e4a1,'modelCount':_0x2769f8,'models':_0x17780b,'apiFilePath':_0x591d2f,'clientFilePath':_0x12d34b,'sdkConfigPath':_0x54e512,'modelRegistryPath':_0x5049a0?.[_0x5368af(0x1e5)],'modelRuntimePath':_0x512b52,'modelProfile':_0x33434f[_0x5368af(0x1b8)]?.['name'],'configName':_0x194745,'isDefaultConfig':_0x202e46,'sdkRouting':_0xd6b055,'files':_0x40c389,'needsAgentMerge':_0x417af2,'needsProjectUpgrade':_0x1dbd74};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x319030=a4_0x2638;(function(_0x352e7f,_0x2884f9){const _0x2a5063=a4_0x2638,_0x46c2b6=_0x352e7f();while(!![]){try{const _0x5cf83e=parseInt(_0x2a5063(0xa0))/0x1+parseInt(_0x2a5063(0xa7))/0x2*(parseInt(_0x2a5063(0x99))/0x3)+parseInt(_0x2a5063(0xa9))/0x4+-parseInt(_0x2a5063(0xa4))/0x5+parseInt(_0x2a5063(0x9d))/0x6*(-parseInt(_0x2a5063(0xa1))/0x7)+-parseInt(_0x2a5063(0xaa))/0x8+parseInt(_0x2a5063(0xad))/0x9*(parseInt(_0x2a5063(0x9e))/0xa);if(_0x5cf83e===_0x2884f9)break;else _0x46c2b6['push'](_0x46c2b6['shift']());}catch(_0xd6d7a8){_0x46c2b6['push'](_0x46c2b6['shift']());}}}(a4_0x201c,0x1b3e4));import{mkdirSync,writeFileSync}from'node:fs';import a4_0x2ee0d3 from'node:path';import a4_0x78a065 from'prettier';function a4_0x2638(_0x220712,_0x113514){_0x220712=_0x220712-0x97;const _0x201c71=a4_0x201c();let _0x2638b2=_0x201c71[_0x220712];return _0x2638b2;}function a4_0x201c(){const _0x4530df=['160068tsChfe','-sdk-config.ts','runtimeDomain','sdk-config.ts','42yucgpe','230LqDIgS','push','1237QDNFtk','18424JVNMOP',',\x0a}',',\x0a\x20\x20','201180sjrLAT','stringify','runtimeDomain:\x20','2znrXSu','format','300160pWXsiL','174640HRXuYm','{\x0a\x20\x20','utf8','24435YJootS','join','typescript'];a4_0x201c=function(){return _0x4530df;};return a4_0x201c();}export const SDK_CONFIG_FILE_NAME=a4_0x319030(0x9c);export function getSdkConfigFileName(_0x4e749e=''){const _0x2487fd=a4_0x319030;return _0x4e749e?_0x4e749e+_0x2487fd(0x9a):SDK_CONFIG_FILE_NAME;}export async function generateSdkConfigFile(_0x4489cb,_0x36c3a7={},_0x11fc87=''){const _0x3229dc=a4_0x319030,_0x3ff21a=[];_0x36c3a7[_0x3229dc(0x9b)]&&_0x3ff21a[_0x3229dc(0x9f)](_0x3229dc(0xa6)+JSON[_0x3229dc(0xa5)](_0x36c3a7[_0x3229dc(0x9b)]));const _0x5ea5ec=_0x3ff21a['length']>0x0?_0x3229dc(0xab)+_0x3ff21a[_0x3229dc(0x97)](_0x3229dc(0xa3))+_0x3229dc(0xa2):'{}',_0x46319c='/**\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'+_0x5ea5ec+'\x20as\x20const;\x0a';mkdirSync(_0x4489cb,{'recursive':!![]});const _0x41fee7=a4_0x2ee0d3[_0x3229dc(0x97)](_0x4489cb,getSdkConfigFileName(_0x11fc87));return writeFileSync(_0x41fee7,await a4_0x78a065[_0x3229dc(0xa8)](_0x46319c,{'parser':_0x3229dc(0x98)}),_0x3229dc(0xac)),_0x41fee7;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xb1c4a,_0x352b74){const _0x17c63d=a5_0x4285,_0x22f766=_0xb1c4a();while(!![]){try{const _0x24ef57=parseInt(_0x17c63d(0xaf))/0x1*(-parseInt(_0x17c63d(0xac))/0x2)+-parseInt(_0x17c63d(0xa8))/0x3+parseInt(_0x17c63d(0xad))/0x4+-parseInt(_0x17c63d(0xa2))/0x5*(parseInt(_0x17c63d(0xa6))/0x6)+parseInt(_0x17c63d(0x9a))/0x7+-parseInt(_0x17c63d(0x99))/0x8*(-parseInt(_0x17c63d(0xa0))/0x9)+parseInt(_0x17c63d(0xab))/0xa;if(_0x24ef57===_0x352b74)break;else _0x22f766['push'](_0x22f766['shift']());}catch(_0x43360f){_0x22f766['push'](_0x22f766['shift']());}}}(a5_0x50c9,0xba798));export function parseLegacyApiModels(_0xd30ce6){const _0x12ddef=a5_0x4285,_0x3234d4=[],_0x49b741=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x2712f7;while((_0x2712f7=_0x49b741[_0x12ddef(0x9e)](_0xd30ce6))!==null){_0x3234d4['push']({'datasetCode':_0x2712f7[0x1],'tableName':_0x2712f7[0x2],'name':_0x2712f7[0x3],'alias':_0x2712f7[0x4]});}return _0x3234d4;}function a5_0x4285(_0x4e8cd2,_0x3f1fd7){_0x4e8cd2=_0x4e8cd2-0x98;const _0x50c96b=a5_0x50c9();let _0x428561=_0x50c96b[_0x4e8cd2];return _0x428561;}export function parseLegacyApiAppCode(_0x1f8009){const _0x596921=a5_0x4285;return _0x1f8009[_0x596921(0xa3)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function stripComments(_0x58318a){const _0x1f83a6=a5_0x4285;return _0x58318a[_0x1f83a6(0x98)](/\/\*[\s\S]*?\*\//g,'')[_0x1f83a6(0x98)](/\/\/.*$/gm,'');}export function isLegacyGeneratedApiScaffold(_0x521e87){const _0x198da7=a5_0x4285;if(!_0x521e87['includes'](_0x198da7(0x9b)))return![];const _0x25d346=stripComments(_0x521e87),_0x40afad=[..._0x25d346[_0x198da7(0xae)](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)][_0x198da7(0xa5)](_0x125898=>_0x125898[0x1]);if(_0x40afad[_0x198da7(0xa7)]!==0x1||_0x40afad[0x0]!==_0x198da7(0xa4))return![];const _0x355743=[..._0x25d346[_0x198da7(0xae)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x198da7(0xa5)](_0x3081a1=>_0x3081a1[0x1]);if(_0x355743[_0x198da7(0xa7)]!==0x2||!_0x355743[_0x198da7(0xa1)](_0x4d1f77=>_0x4d1f77[_0x198da7(0x9d)](_0x198da7(0x9f)))||!_0x355743['some'](_0x4e378a=>_0x4e378a[_0x198da7(0x9d)](_0x198da7(0x9c))))return![];const _0x25c340=[..._0x25d346[_0x198da7(0xae)](/^([A-Za-z_$][\w$]*)\s*\(/gm)][_0x198da7(0xa5)](_0x53a9e1=>_0x53a9e1[0x1]);return _0x25c340[_0x198da7(0xa7)]===0x1&&_0x25c340[0x0]===_0x198da7(0xa9);}export function isLegacyGeneratedClientScaffold(_0x2354f7){const _0x14a89f=a5_0x4285;if(!_0x2354f7['includes'](_0x14a89f(0x9b)))return![];const _0x97e1fe=stripComments(_0x2354f7),_0xe1ad9b=[..._0x97e1fe[_0x14a89f(0xae)](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)]['map'](_0xe55235=>_0xe55235[0x1]);if(_0xe1ad9b[_0x14a89f(0xa1)](_0x10906c=>_0x10906c!==_0x14a89f(0xa4)&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/[_0x14a89f(0xaa)](_0x10906c??'')))return![];const _0x223ad8=[..._0x97e1fe[_0x14a89f(0xae)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x14a89f(0xa5)](_0x260675=>_0x260675[0x1]);return _0x223ad8[_0x14a89f(0xa7)]===0x1&&_0x223ad8[0x0]==='lovrabetClient';}function a5_0x50c9(){const _0x20da3a=['487140RWOawi','length','983505XSeiMa','registerModels','test','817770nTIejL','4ZegamC','412392ydATnb','matchAll','161999mMijxs','replace','16wwFMsE','5584908boUdOG','Generated\x20by\x20Rabetbase\x20CLI','MODELS_CONFIG','endsWith','exec','APP_CODE','4505598NRdynX','some','35wPHxup','match','@lovrabet/sdk','map'];a5_0x50c9=function(){return _0x20da3a;};return a5_0x50c9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x51d1e9=a6_0x136b;(function(_0x40d799,_0x4b3b9c){const _0x4854a4=a6_0x136b,_0x313b8c=_0x40d799();while(!![]){try{const _0x1069c4=parseInt(_0x4854a4(0x177))/0x1*(-parseInt(_0x4854a4(0x183))/0x2)+parseInt(_0x4854a4(0x182))/0x3*(parseInt(_0x4854a4(0x160))/0x4)+parseInt(_0x4854a4(0x16d))/0x5*(parseInt(_0x4854a4(0x18f))/0x6)+-parseInt(_0x4854a4(0x1a2))/0x7+parseInt(_0x4854a4(0x18a))/0x8*(-parseInt(_0x4854a4(0x191))/0x9)+-parseInt(_0x4854a4(0x192))/0xa*(-parseInt(_0x4854a4(0x16e))/0xb)+parseInt(_0x4854a4(0x17d))/0xc;if(_0x1069c4===_0x4b3b9c)break;else _0x313b8c['push'](_0x313b8c['shift']());}catch(_0x18f212){_0x313b8c['push'](_0x313b8c['shift']());}}}(a6_0x5856,0xe7f3a));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x522213 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x51d1e9(0x19e);export const MODEL_RUNTIME_FILE_NAME=a6_0x51d1e9(0x189);export const MODEL_REGISTRY_VERSION_MARKER='/*\x20rabetbase-model-registry:v2\x20*/';const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x51d1e9(0x1a3),REGISTRY_START=a6_0x51d1e9(0x173),REGISTRY_END=a6_0x51d1e9(0x19b);function emptyRegistry(_0x60ed92){return{'defaultProfile':_0x60ed92,'profiles':{},'models':[]};}function extractRegistryJson(_0x3c18e9){const _0x131fbf=a6_0x51d1e9,_0x6ca0ae=_0x3c18e9['indexOf'](REGISTRY_START),_0x4871b2=_0x3c18e9[_0x131fbf(0x19c)](REGISTRY_END);if(_0x6ca0ae<0x0||_0x4871b2<=_0x6ca0ae)return undefined;return _0x3c18e9[_0x131fbf(0x180)](_0x6ca0ae+REGISTRY_START[_0x131fbf(0x176)],_0x4871b2)[_0x131fbf(0x164)]()['replace'](/\s+as const satisfies LovrabetModelRegistry;?$/,'')['replace'](/;$/,'');}function migrateLegacyRegistry(_0x55c58c){const _0x299b83=a6_0x51d1e9,_0x3f99ca=emptyRegistry(_0x55c58c[_0x299b83(0x17a)]);for(const [_0x13cf76,_0xd935b8]of Object[_0x299b83(0x16c)](_0x55c58c[_0x299b83(0x1a1)])){_0x3f99ca[_0x299b83(0x1a1)][_0x13cf76]={'appCode':_0xd935b8[_0x299b83(0x171)],'runtimeDomain':_0xd935b8['runtimeDomain']},mergeProfileModels(_0x3f99ca,_0x13cf76,_0xd935b8[_0x299b83(0x18c)]);}return _0x3f99ca;}function generatedObjectLiteralToJson(_0x5f310a){const _0x2734df=a6_0x51d1e9;let _0x881b15='',_0x14d234,_0x416fe8=![],_0x4a921f;for(let _0x5604a2=0x0;_0x5604a2<_0x5f310a[_0x2734df(0x176)];_0x5604a2++){const _0x12d259=_0x5f310a[_0x5604a2];if(_0x14d234){_0x881b15+=_0x12d259;if(_0x416fe8)_0x416fe8=![];else{if(_0x12d259==='\x5c')_0x416fe8=!![];else{if(_0x12d259===_0x14d234)_0x14d234=undefined;}}continue;}if(_0x12d259==='\x22'){_0x14d234=_0x12d259,_0x881b15+=_0x12d259,_0x4a921f=_0x2734df(0x19a);continue;}if(_0x12d259===','){let _0x1d2eff=_0x5604a2+0x1;while(/\s/[_0x2734df(0x197)](_0x5f310a[_0x1d2eff]??''))_0x1d2eff++;if(_0x5f310a[_0x1d2eff]==='}'||_0x5f310a[_0x1d2eff]===']')continue;_0x881b15+=_0x12d259,_0x4a921f=',';continue;}if(_0x12d259==='{'||_0x12d259==='['){_0x881b15+=_0x12d259,_0x4a921f=_0x12d259;continue;}if(_0x12d259==='}'||_0x12d259===']'){_0x881b15+=_0x12d259,_0x4a921f=_0x12d259;continue;}if((_0x4a921f==='{'||_0x4a921f===',')&&/[A-Za-z_$]/['test'](_0x12d259)){let _0x5b719f=_0x5604a2+0x1;while(/[A-Za-z0-9_$]/[_0x2734df(0x197)](_0x5f310a[_0x5b719f]??''))_0x5b719f++;let _0x5e2efa=_0x5b719f;while(/\s/[_0x2734df(0x197)](_0x5f310a[_0x5e2efa]??''))_0x5e2efa++;if(_0x5f310a[_0x5e2efa]===':'){_0x881b15+=JSON[_0x2734df(0x193)](_0x5f310a[_0x2734df(0x180)](_0x5604a2,_0x5b719f)),_0x5604a2=_0x5b719f-0x1,_0x4a921f=_0x2734df(0x175);continue;}}_0x881b15+=_0x12d259;if(!/\s/[_0x2734df(0x197)](_0x12d259)&&_0x12d259!==':')_0x4a921f=_0x2734df(0x19a);}return _0x881b15;}function a6_0x136b(_0x48e6b5,_0x5be4b8){_0x48e6b5=_0x48e6b5-0x15c;const _0x58565c=a6_0x5856();let _0x136ba3=_0x58565c[_0x48e6b5];return _0x136ba3;}function a6_0x5856(){const _0x6f5ac0=['protocol','Refusing\x20to\x20replace\x20','test','datasetCodes','\x22\x20maps\x20to\x20alias\x20\x22','value','/*\x20rabetbase-model-registry:end\x20*/','indexOf','\x22\x20and\x20\x22','models.generated.ts','get','keys','profiles','7011438WGEfEu','lovrabet-model-registry/v2','split','\x22\x20with\x20an\x20empty\x20result.\x20','push','\x22\x20in\x20profile\x20\x22','\x22\x20maps\x20to\x20table\x20\x22','set','tableName','now','363960JhjOKB','parse','alias','find','trim','filter','fromEntries','includes','lovrabet-model-registry/v1','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','\x22\x20in\x20the\x20registry\x20but\x20\x22','every','entries','115235nytWDa','11wVWASh','datasetCode','string','appCode','\x22\x20maps\x20to\x20both\x20\x22','/*\x20rabetbase-model-registry:start\x20*/','Model\x20alias\x20\x22','key','length','97wWSNpz','\x20model(s)\x20in\x20profile\x20\x22','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','defaultProfile','map','.tmp','10385220hwOqBw','Table\x20\x22','runtimeDomain','slice','allowEmptyReplacement','27xaDTGI','32614zxZopp','outputDir','NOT-SET','utf8','join','profileName','model-runtime.ts','96tGfPfW','isArray','models','pid','name','114vgGLCs','flatMap','239409HYqeAv','17304610ozTVfn','stringify','object'];a6_0x5856=function(){return _0x6f5ac0;};return a6_0x5856();}function parseGeneratedRegistryJson(_0x5ba19b){const _0x29ec3f=a6_0x51d1e9;try{return JSON[_0x29ec3f(0x161)](_0x5ba19b);}catch{return JSON['parse'](generatedObjectLiteralToJson(_0x5ba19b));}}function normalizeModelEntries(_0x17d55c,_0x54f799){const _0x214b5f=a6_0x51d1e9,_0x11f3c5=Object['keys'](_0x17d55c),_0x2fe1dc=[];for(const _0x420768 of _0x54f799){if(!_0x420768||typeof _0x420768!=='object'||Array[_0x214b5f(0x18b)](_0x420768))return undefined;const _0x4489c0=_0x420768;if(typeof _0x4489c0[_0x214b5f(0x162)]!==_0x214b5f(0x170)||typeof _0x4489c0[_0x214b5f(0x15e)]!==_0x214b5f(0x170)||typeof _0x4489c0[_0x214b5f(0x18e)]!==_0x214b5f(0x170))return undefined;let _0x5edfb8;if(typeof _0x4489c0[_0x214b5f(0x16f)]===_0x214b5f(0x170)&&_0x4489c0[_0x214b5f(0x198)]===undefined)_0x5edfb8=Object[_0x214b5f(0x166)](_0x11f3c5['map'](_0x26ad17=>[_0x26ad17,_0x4489c0['datasetCode']]));else{if(_0x4489c0['datasetCode']===undefined&&_0x4489c0[_0x214b5f(0x198)]&&typeof _0x4489c0[_0x214b5f(0x198)]===_0x214b5f(0x194)&&!Array['isArray'](_0x4489c0[_0x214b5f(0x198)])&&Object['values'](_0x4489c0[_0x214b5f(0x198)])['every'](_0x5d7dcf=>typeof _0x5d7dcf===_0x214b5f(0x170)))_0x5edfb8={..._0x4489c0[_0x214b5f(0x198)]};else return undefined;}_0x2fe1dc['push']({'alias':_0x4489c0[_0x214b5f(0x162)],'tableName':_0x4489c0[_0x214b5f(0x15e)],'name':_0x4489c0[_0x214b5f(0x18e)],'datasetCodes':_0x5edfb8});}return _0x2fe1dc;}export function parseModelRegistry(_0x88cfad){const _0x2d705a=a6_0x51d1e9,_0x522670=extractRegistryJson(_0x88cfad);if(!_0x522670)return undefined;try{const _0x3ed22b=parseGeneratedRegistryJson(_0x522670);if(typeof _0x3ed22b[_0x2d705a(0x17a)]!==_0x2d705a(0x170)||!_0x3ed22b[_0x2d705a(0x1a1)]||typeof _0x3ed22b[_0x2d705a(0x1a1)]!==_0x2d705a(0x194))return undefined;if(_0x3ed22b[_0x2d705a(0x195)]===_0x2d705a(0x168))return migrateLegacyRegistry(_0x3ed22b);if(!(_0x3ed22b[_0x2d705a(0x195)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x3ed22b[_0x2d705a(0x195)]===undefined&&_0x88cfad[_0x2d705a(0x167)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x2d705a(0x18b)](_0x3ed22b[_0x2d705a(0x18c)]))return undefined;const _0x1dce67=_0x3ed22b[_0x2d705a(0x1a1)],_0x7a7ba5=normalizeModelEntries(_0x1dce67,_0x3ed22b[_0x2d705a(0x18c)]);if(!_0x7a7ba5)return undefined;return{'defaultProfile':_0x3ed22b['defaultProfile'],'profiles':_0x1dce67,'models':_0x7a7ba5};}catch{return undefined;}}export function readModelRegistry(_0x2d59d1){if(!existsSync(_0x2d59d1))return undefined;try{return parseModelRegistry(readFileSync(_0x2d59d1,'utf8'));}catch{return undefined;}}function registrySource(_0x25ac2d){const _0x5cd91b=a6_0x51d1e9,_0x3fcfff=Object['keys'](_0x25ac2d[_0x5cd91b(0x1a1)]),_0x340f2c=_0x25ac2d[_0x5cd91b(0x18c)]['map'](_0x5b64e2=>{const _0x8fdc48=_0x5cd91b,_0x30bf4b=_0x3fcfff[_0x8fdc48(0x17b)](_0x38986c=>_0x5b64e2[_0x8fdc48(0x198)][_0x38986c]),_0x41fac2=_0x30bf4b[0x0],_0x511a20=_0x41fac2!==undefined&&_0x30bf4b[_0x8fdc48(0x16b)](_0x5d3221=>_0x5d3221===_0x41fac2),_0x3706dd={'alias':_0x5b64e2[_0x8fdc48(0x162)],'tableName':_0x5b64e2[_0x8fdc48(0x15e)],'name':_0x5b64e2['name']};return _0x511a20?{..._0x3706dd,'datasetCode':_0x41fac2}:{..._0x3706dd,'datasetCodes':_0x5b64e2[_0x8fdc48(0x198)]};}),_0x3b0c52=JSON[_0x5cd91b(0x193)]({'defaultProfile':_0x25ac2d[_0x5cd91b(0x17a)],'profiles':_0x25ac2d[_0x5cd91b(0x1a1)],'models':_0x340f2c},null,0x2)[_0x5cd91b(0x1a4)]('\x0a')[_0x5cd91b(0x17b)](_0x3f903b=>'\x20\x20'+_0x3f903b)[_0x5cd91b(0x187)]('\x0a');return'/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a'+MODEL_REGISTRY_VERSION_MARKER+_0x5cd91b(0x179)+REGISTRY_START+'\x0a'+_0x3b0c52+_0x5cd91b(0x169)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x2de717,_0xb505b4,_0x68d298){const _0x6e3b67=a6_0x51d1e9,_0x94ef52=_0x68d298[_0x6e3b67(0x17b)](_0x46183c=>({..._0x46183c,'alias':_0x46183c['alias']||_0x46183c[_0x6e3b67(0x15e)]})),_0x12dfa2=new Map(),_0x5781d3=new Map();for(const _0x208757 of _0x94ef52){const _0x366824=_0x12dfa2[_0x6e3b67(0x19f)](_0x208757[_0x6e3b67(0x162)]);if(_0x366824&&_0x366824!==_0x208757[_0x6e3b67(0x15e)])throw new Error(_0x6e3b67(0x174)+_0x208757['alias']+_0x6e3b67(0x172)+_0x366824+_0x6e3b67(0x19d)+_0x208757[_0x6e3b67(0x15e)]+_0x6e3b67(0x1a7)+_0xb505b4+'\x22.');const _0x246d3d=_0x5781d3[_0x6e3b67(0x19f)](_0x208757[_0x6e3b67(0x15e)]);if(_0x246d3d&&_0x246d3d!==_0x208757[_0x6e3b67(0x162)])throw new Error(_0x6e3b67(0x17e)+_0x208757['tableName']+'\x22\x20maps\x20to\x20both\x20aliases\x20\x22'+_0x246d3d+_0x6e3b67(0x19d)+_0x208757['alias']+'\x22\x20in\x20profile\x20\x22'+_0xb505b4+'\x22.');_0x12dfa2[_0x6e3b67(0x15d)](_0x208757['alias'],_0x208757['tableName']),_0x5781d3[_0x6e3b67(0x15d)](_0x208757[_0x6e3b67(0x15e)],_0x208757[_0x6e3b67(0x162)]);const _0x203b7b=_0x2de717[_0x6e3b67(0x18c)][_0x6e3b67(0x163)](_0xa8c135=>_0xa8c135['alias']===_0x208757[_0x6e3b67(0x162)]);if(_0x203b7b&&_0x203b7b['tableName']!==_0x208757[_0x6e3b67(0x15e)])throw new Error(_0x6e3b67(0x174)+_0x208757[_0x6e3b67(0x162)]+_0x6e3b67(0x15c)+_0x203b7b[_0x6e3b67(0x15e)]+_0x6e3b67(0x16a)+_0x208757[_0x6e3b67(0x15e)]+_0x6e3b67(0x1a7)+_0xb505b4+'\x22.');const _0x27f939=_0x2de717[_0x6e3b67(0x18c)]['find'](_0x3a7947=>_0x3a7947[_0x6e3b67(0x15e)]===_0x208757[_0x6e3b67(0x15e)]);if(_0x27f939&&_0x27f939[_0x6e3b67(0x162)]!==_0x208757['alias'])throw new Error(_0x6e3b67(0x17e)+_0x208757['tableName']+_0x6e3b67(0x199)+_0x27f939['alias']+_0x6e3b67(0x16a)+_0x208757['alias']+_0x6e3b67(0x1a7)+_0xb505b4+'\x22.');}for(const _0x456e6a of _0x2de717[_0x6e3b67(0x18c)]){delete _0x456e6a[_0x6e3b67(0x198)][_0xb505b4];}for(const _0x33fade of _0x94ef52){let _0x1ce6aa=_0x2de717[_0x6e3b67(0x18c)][_0x6e3b67(0x163)](_0x2c7eba=>_0x2c7eba[_0x6e3b67(0x162)]===_0x33fade[_0x6e3b67(0x162)]);!_0x1ce6aa&&(_0x1ce6aa={'alias':_0x33fade['alias'],'tableName':_0x33fade['tableName'],'name':_0x33fade[_0x6e3b67(0x18e)],'datasetCodes':{}},_0x2de717['models'][_0x6e3b67(0x1a6)](_0x1ce6aa)),(_0xb505b4===_0x2de717['defaultProfile']||!_0x1ce6aa[_0x6e3b67(0x198)][_0x2de717['defaultProfile']])&&(_0x1ce6aa[_0x6e3b67(0x162)]=_0x33fade[_0x6e3b67(0x162)],_0x1ce6aa[_0x6e3b67(0x15e)]=_0x33fade[_0x6e3b67(0x15e)],_0x1ce6aa[_0x6e3b67(0x18e)]=_0x33fade[_0x6e3b67(0x18e)]),_0x1ce6aa['datasetCodes'][_0xb505b4]=_0x33fade[_0x6e3b67(0x16f)];}_0x2de717[_0x6e3b67(0x18c)]=_0x2de717[_0x6e3b67(0x18c)][_0x6e3b67(0x165)](_0x15bbeb=>Object[_0x6e3b67(0x1a0)](_0x15bbeb['datasetCodes'])[_0x6e3b67(0x176)]>0x0);}function removeUnboundProfiles(_0x445480){const _0x19a3f8=a6_0x51d1e9,_0x215b4b=Object['entries'](_0x445480[_0x19a3f8(0x1a1)])[_0x19a3f8(0x165)](([,_0x233f74])=>_0x233f74[_0x19a3f8(0x171)]===_0x19a3f8(0x185))[_0x19a3f8(0x17b)](([_0x4b203b])=>_0x4b203b);if(_0x215b4b[_0x19a3f8(0x176)]===0x0)return;for(const _0x28618e of _0x215b4b){delete _0x445480[_0x19a3f8(0x1a1)][_0x28618e];for(const _0x19e9e6 of _0x445480['models']){delete _0x19e9e6[_0x19a3f8(0x198)][_0x28618e];}}_0x445480[_0x19a3f8(0x18c)]=_0x445480[_0x19a3f8(0x18c)][_0x19a3f8(0x165)](_0x497e6d=>Object[_0x19a3f8(0x1a0)](_0x497e6d[_0x19a3f8(0x198)])[_0x19a3f8(0x176)]>0x0);}export function getProfileModels(_0x5c5f8e,_0x5dfc77){const _0x55f3c=a6_0x51d1e9;return _0x5c5f8e[_0x55f3c(0x18c)][_0x55f3c(0x190)](_0x2abbd9=>{const _0x56ef60=_0x55f3c,_0x4e6704=_0x2abbd9[_0x56ef60(0x198)][_0x5dfc77];return _0x4e6704?[{'datasetCode':_0x4e6704,'tableName':_0x2abbd9[_0x56ef60(0x15e)],'name':_0x2abbd9['name'],'alias':_0x2abbd9[_0x56ef60(0x162)]}]:[];});}export function updateModelRegistry(_0xc22359){const _0x110f85=a6_0x51d1e9,_0x185434=a6_0x522213['join'](_0xc22359[_0x110f85(0x184)],MODEL_REGISTRY_FILE_NAME),_0x5eb6da=existsSync(_0x185434),_0x42915e=readModelRegistry(_0x185434);if(_0x5eb6da&&!_0x42915e)throw new Error(MODEL_REGISTRY_FILE_NAME+'\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.');const _0x3d806e=_0x42915e??emptyRegistry(_0xc22359['defaultProfile']);if(_0xc22359[_0x110f85(0x171)]!==_0x110f85(0x185))removeUnboundProfiles(_0x3d806e);const _0x3c8ab6=_0x42915e?getProfileModels(_0x42915e,_0xc22359[_0x110f85(0x188)])[_0x110f85(0x176)]:0x0;if(_0x3c8ab6>0x0&&_0xc22359[_0x110f85(0x18c)][_0x110f85(0x176)]===0x0&&!_0xc22359[_0x110f85(0x181)])throw new Error(_0x110f85(0x196)+_0x3c8ab6+_0x110f85(0x178)+_0xc22359[_0x110f85(0x188)]+_0x110f85(0x1a5)+'Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.');_0x3d806e[_0x110f85(0x17a)]=_0xc22359[_0x110f85(0x17a)],_0x3d806e[_0x110f85(0x1a1)][_0xc22359[_0x110f85(0x188)]]={'appCode':_0xc22359[_0x110f85(0x171)],'runtimeDomain':_0xc22359[_0x110f85(0x17f)]},mergeProfileModels(_0x3d806e,_0xc22359['profileName'],_0xc22359[_0x110f85(0x18c)]),mkdirSync(_0xc22359[_0x110f85(0x184)],{'recursive':!![]});const _0xe2fe4e=_0x185434+'.'+process[_0x110f85(0x18d)]+'.'+Date[_0x110f85(0x15f)]()+_0x110f85(0x17c);try{writeFileSync(_0xe2fe4e,registrySource(_0x3d806e),{'encoding':_0x110f85(0x186),'mode':0x1a4}),renameSync(_0xe2fe4e,_0x185434);}catch(_0x13eb91){try{unlinkSync(_0xe2fe4e);}catch{}throw _0x13eb91;}return{'path':_0x185434,'registry':_0x3d806e,'existed':_0x5eb6da};}
|
|
1
|
+
function a6_0x3ec3(_0x3b0e37,_0x8b3d0){_0x3b0e37=_0x3b0e37-0x11e;const _0x3c140f=a6_0x3c14();let _0x3ec3fd=_0x3c140f[_0x3b0e37];return _0x3ec3fd;}const a6_0x2f7bf1=a6_0x3ec3;(function(_0x4a275b,_0x2e5069){const _0x36f3f2=a6_0x3ec3,_0x338c80=_0x4a275b();while(!![]){try{const _0x3f51ce=-parseInt(_0x36f3f2(0x152))/0x1+parseInt(_0x36f3f2(0x15a))/0x2*(parseInt(_0x36f3f2(0x133))/0x3)+-parseInt(_0x36f3f2(0x129))/0x4*(-parseInt(_0x36f3f2(0x126))/0x5)+parseInt(_0x36f3f2(0x15c))/0x6+parseInt(_0x36f3f2(0x162))/0x7+-parseInt(_0x36f3f2(0x166))/0x8*(parseInt(_0x36f3f2(0x153))/0x9)+parseInt(_0x36f3f2(0x140))/0xa*(-parseInt(_0x36f3f2(0x156))/0xb);if(_0x3f51ce===_0x2e5069)break;else _0x338c80['push'](_0x338c80['shift']());}catch(_0x542b03){_0x338c80['push'](_0x338c80['shift']());}}}(a6_0x3c14,0x705bb));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x3b133 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x2f7bf1(0x14a);export const MODEL_RUNTIME_FILE_NAME=a6_0x2f7bf1(0x145);export const MODEL_REGISTRY_VERSION_MARKER='/*\x20rabetbase-model-registry:v2\x20*/';const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x2f7bf1(0x136),REGISTRY_START='/*\x20rabetbase-model-registry:start\x20*/',REGISTRY_END=a6_0x2f7bf1(0x161);function emptyRegistry(_0x47be32){return{'defaultProfile':_0x47be32,'profiles':{},'models':[]};}function extractRegistryJson(_0xea9383){const _0x49965c=a6_0x2f7bf1,_0x4efcd0=_0xea9383[_0x49965c(0x15d)](REGISTRY_START),_0x2d087b=_0xea9383['indexOf'](REGISTRY_END);if(_0x4efcd0<0x0||_0x2d087b<=_0x4efcd0)return undefined;return _0xea9383[_0x49965c(0x160)](_0x4efcd0+REGISTRY_START[_0x49965c(0x123)],_0x2d087b)['trim']()[_0x49965c(0x14d)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x49965c(0x14d)](/;$/,'');}function migrateLegacyRegistry(_0x22f922){const _0x554129=a6_0x2f7bf1,_0x66bc24=emptyRegistry(_0x22f922[_0x554129(0x144)]);for(const [_0x5db849,_0x1bdd53]of Object['entries'](_0x22f922['profiles'])){_0x66bc24[_0x554129(0x143)][_0x5db849]={'appCode':_0x1bdd53['appCode'],'runtimeDomain':_0x1bdd53['runtimeDomain']},mergeProfileModels(_0x66bc24,_0x5db849,_0x1bdd53[_0x554129(0x15f)]);}return _0x66bc24;}function generatedObjectLiteralToJson(_0x2bce39){const _0x10535b=a6_0x2f7bf1;let _0x48b2ae='',_0x2289c9,_0x18a6db=![],_0x4cf782;for(let _0xedb629=0x0;_0xedb629<_0x2bce39[_0x10535b(0x123)];_0xedb629++){const _0x1fcbea=_0x2bce39[_0xedb629];if(_0x2289c9){_0x48b2ae+=_0x1fcbea;if(_0x18a6db)_0x18a6db=![];else{if(_0x1fcbea==='\x5c')_0x18a6db=!![];else{if(_0x1fcbea===_0x2289c9)_0x2289c9=undefined;}}continue;}if(_0x1fcbea==='\x22'){_0x2289c9=_0x1fcbea,_0x48b2ae+=_0x1fcbea,_0x4cf782='value';continue;}if(_0x1fcbea===','){let _0x3b4c74=_0xedb629+0x1;while(/\s/[_0x10535b(0x121)](_0x2bce39[_0x3b4c74]??''))_0x3b4c74++;if(_0x2bce39[_0x3b4c74]==='}'||_0x2bce39[_0x3b4c74]===']')continue;_0x48b2ae+=_0x1fcbea,_0x4cf782=',';continue;}if(_0x1fcbea==='{'||_0x1fcbea==='['){_0x48b2ae+=_0x1fcbea,_0x4cf782=_0x1fcbea;continue;}if(_0x1fcbea==='}'||_0x1fcbea===']'){_0x48b2ae+=_0x1fcbea,_0x4cf782=_0x1fcbea;continue;}if((_0x4cf782==='{'||_0x4cf782===',')&&/[A-Za-z_$]/[_0x10535b(0x121)](_0x1fcbea)){let _0xc05233=_0xedb629+0x1;while(/[A-Za-z0-9_$]/[_0x10535b(0x121)](_0x2bce39[_0xc05233]??''))_0xc05233++;let _0x177ca9=_0xc05233;while(/\s/[_0x10535b(0x121)](_0x2bce39[_0x177ca9]??''))_0x177ca9++;if(_0x2bce39[_0x177ca9]===':'){_0x48b2ae+=JSON['stringify'](_0x2bce39[_0x10535b(0x160)](_0xedb629,_0xc05233)),_0xedb629=_0xc05233-0x1,_0x4cf782=_0x10535b(0x124);continue;}}_0x48b2ae+=_0x1fcbea;if(!/\s/['test'](_0x1fcbea)&&_0x1fcbea!==':')_0x4cf782=_0x10535b(0x12c);}return _0x48b2ae;}function a6_0x3c14(){const _0x46fdae=['value','Model\x20alias\x20\x22','\x22\x20maps\x20to\x20alias\x20\x22','parse','\x22\x20and\x20\x22','profileName','lovrabet-model-registry/v1','603ngHcsX','utf8','entries','lovrabet-model-registry/v2','name','flatMap','runtimeDomain','\x22\x20maps\x20to\x20both\x20\x22','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','map','Table\x20\x22','filter','split','19580IIqozq','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','appCode','profiles','defaultProfile','model-runtime.ts','join','outputDir','datasetCode','find','models.generated.ts','string','Refusing\x20to\x20replace\x20','replace','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','includes','datasetCodes','.tmp','93730dWwoue','153MDQgjJ','protocol','stringify','6655rDqeoK','isArray','tableName','get','5592dYrmWE','alias','2762880YZidai','indexOf','pid','models','slice','/*\x20rabetbase-model-registry:end\x20*/','3307920zoXCXw','keys','\x22\x20in\x20profile\x20\x22','every','5432DgMETj','\x20model(s)\x20in\x20profile\x20\x22','set','allowEmptyReplacement','test','values','length','key','\x22\x20with\x20an\x20empty\x20result.\x20','55DjBTJN','\x22\x20in\x20the\x20registry\x20but\x20\x22','push','92744KTCDmn','now','NOT-SET'];a6_0x3c14=function(){return _0x46fdae;};return a6_0x3c14();}function parseGeneratedRegistryJson(_0x55b451){const _0x3be2bd=a6_0x2f7bf1;try{return JSON['parse'](_0x55b451);}catch{return JSON[_0x3be2bd(0x12f)](generatedObjectLiteralToJson(_0x55b451));}}function normalizeModelEntries(_0x214e34,_0x14f4a9){const _0x341022=a6_0x2f7bf1,_0x44109e=Object[_0x341022(0x163)](_0x214e34),_0x3589fe=[];for(const _0x1f03b9 of _0x14f4a9){if(!_0x1f03b9||typeof _0x1f03b9!=='object'||Array[_0x341022(0x157)](_0x1f03b9))return undefined;const _0x5a2943=_0x1f03b9;if(typeof _0x5a2943[_0x341022(0x15b)]!==_0x341022(0x14b)||typeof _0x5a2943[_0x341022(0x158)]!==_0x341022(0x14b)||typeof _0x5a2943[_0x341022(0x137)]!=='string')return undefined;let _0x391460;if(typeof _0x5a2943['datasetCode']===_0x341022(0x14b)&&_0x5a2943['datasetCodes']===undefined)_0x391460=Object['fromEntries'](_0x44109e[_0x341022(0x13c)](_0x419667=>[_0x419667,_0x5a2943[_0x341022(0x148)]]));else{if(_0x5a2943[_0x341022(0x148)]===undefined&&_0x5a2943[_0x341022(0x150)]&&typeof _0x5a2943[_0x341022(0x150)]==='object'&&!Array['isArray'](_0x5a2943[_0x341022(0x150)])&&Object[_0x341022(0x122)](_0x5a2943[_0x341022(0x150)])['every'](_0x3459db=>typeof _0x3459db===_0x341022(0x14b)))_0x391460={..._0x5a2943[_0x341022(0x150)]};else return undefined;}_0x3589fe['push']({'alias':_0x5a2943[_0x341022(0x15b)],'tableName':_0x5a2943[_0x341022(0x158)],'name':_0x5a2943['name'],'datasetCodes':_0x391460});}return _0x3589fe;}export function parseModelRegistry(_0x49dcf1){const _0x34c80c=a6_0x2f7bf1,_0x2ea628=extractRegistryJson(_0x49dcf1);if(!_0x2ea628)return undefined;try{const _0x3c4b80=parseGeneratedRegistryJson(_0x2ea628);if(typeof _0x3c4b80[_0x34c80c(0x144)]!==_0x34c80c(0x14b)||!_0x3c4b80['profiles']||typeof _0x3c4b80[_0x34c80c(0x143)]!=='object')return undefined;if(_0x3c4b80['protocol']===_0x34c80c(0x132))return migrateLegacyRegistry(_0x3c4b80);if(!(_0x3c4b80[_0x34c80c(0x154)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x3c4b80[_0x34c80c(0x154)]===undefined&&_0x49dcf1[_0x34c80c(0x14f)](MODEL_REGISTRY_VERSION_MARKER))||!Array['isArray'](_0x3c4b80['models']))return undefined;const _0x18a62a=_0x3c4b80[_0x34c80c(0x143)],_0x5c6f8f=normalizeModelEntries(_0x18a62a,_0x3c4b80[_0x34c80c(0x15f)]);if(!_0x5c6f8f)return undefined;return{'defaultProfile':_0x3c4b80[_0x34c80c(0x144)],'profiles':_0x18a62a,'models':_0x5c6f8f};}catch{return undefined;}}export function readModelRegistry(_0x8e6214){const _0x17aae1=a6_0x2f7bf1;if(!existsSync(_0x8e6214))return undefined;try{return parseModelRegistry(readFileSync(_0x8e6214,_0x17aae1(0x134)));}catch{return undefined;}}function registrySource(_0x331a75){const _0x112074=a6_0x2f7bf1,_0x237a4f=Object[_0x112074(0x163)](_0x331a75[_0x112074(0x143)]),_0x647fb6=_0x331a75[_0x112074(0x15f)][_0x112074(0x13c)](_0x440d0e=>{const _0x3f81d9=_0x112074,_0x3571a0=_0x237a4f[_0x3f81d9(0x13c)](_0x3a9a22=>_0x440d0e[_0x3f81d9(0x150)][_0x3a9a22]),_0x2ac5d1=_0x3571a0[0x0],_0x2bd8e4=_0x2ac5d1!==undefined&&_0x3571a0[_0x3f81d9(0x165)](_0x1aa3a9=>_0x1aa3a9===_0x2ac5d1),_0xf08c7e={'alias':_0x440d0e[_0x3f81d9(0x15b)],'tableName':_0x440d0e[_0x3f81d9(0x158)],'name':_0x440d0e[_0x3f81d9(0x137)]};return _0x2bd8e4?{..._0xf08c7e,'datasetCode':_0x2ac5d1}:{..._0xf08c7e,'datasetCodes':_0x440d0e[_0x3f81d9(0x150)]};}),_0x57f8e6=JSON[_0x112074(0x155)]({'defaultProfile':_0x331a75['defaultProfile'],'profiles':_0x331a75[_0x112074(0x143)],'models':_0x647fb6},null,0x2)[_0x112074(0x13f)]('\x0a')['map'](_0x2a002c=>'\x20\x20'+_0x2a002c)[_0x112074(0x146)]('\x0a');return'/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a'+MODEL_REGISTRY_VERSION_MARKER+_0x112074(0x14e)+REGISTRY_START+'\x0a'+_0x57f8e6+'\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a'+REGISTRY_END+'\x0a';}function mergeProfileModels(_0xe2a3b,_0x11a638,_0x1fd498){const _0x9aec42=a6_0x2f7bf1,_0x3ec920=_0x1fd498[_0x9aec42(0x13c)](_0xc3f3f=>({..._0xc3f3f,'alias':_0xc3f3f[_0x9aec42(0x15b)]||_0xc3f3f[_0x9aec42(0x158)]})),_0x2894cd=new Map(),_0x4456b9=new Map();for(const _0x217c29 of _0x3ec920){const _0x379227=_0x2894cd[_0x9aec42(0x159)](_0x217c29[_0x9aec42(0x15b)]);if(_0x379227&&_0x379227!==_0x217c29['tableName'])throw new Error(_0x9aec42(0x12d)+_0x217c29[_0x9aec42(0x15b)]+_0x9aec42(0x13a)+_0x379227+_0x9aec42(0x130)+_0x217c29[_0x9aec42(0x158)]+_0x9aec42(0x164)+_0x11a638+'\x22.');const _0x1f7769=_0x4456b9[_0x9aec42(0x159)](_0x217c29[_0x9aec42(0x158)]);if(_0x1f7769&&_0x1f7769!==_0x217c29[_0x9aec42(0x15b)])throw new Error(_0x9aec42(0x13d)+_0x217c29[_0x9aec42(0x158)]+'\x22\x20maps\x20to\x20both\x20aliases\x20\x22'+_0x1f7769+_0x9aec42(0x130)+_0x217c29[_0x9aec42(0x15b)]+_0x9aec42(0x164)+_0x11a638+'\x22.');_0x2894cd[_0x9aec42(0x11f)](_0x217c29[_0x9aec42(0x15b)],_0x217c29[_0x9aec42(0x158)]),_0x4456b9[_0x9aec42(0x11f)](_0x217c29[_0x9aec42(0x158)],_0x217c29[_0x9aec42(0x15b)]);const _0x117966=_0xe2a3b[_0x9aec42(0x15f)][_0x9aec42(0x149)](_0x4792e6=>_0x4792e6[_0x9aec42(0x15b)]===_0x217c29[_0x9aec42(0x15b)]);if(_0x117966&&_0x117966[_0x9aec42(0x158)]!==_0x217c29[_0x9aec42(0x158)])throw new Error(_0x9aec42(0x12d)+_0x217c29[_0x9aec42(0x15b)]+'\x22\x20maps\x20to\x20table\x20\x22'+_0x117966['tableName']+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x217c29[_0x9aec42(0x158)]+_0x9aec42(0x164)+_0x11a638+'\x22.');const _0x59e690=_0xe2a3b[_0x9aec42(0x15f)][_0x9aec42(0x149)](_0x370ccf=>_0x370ccf[_0x9aec42(0x158)]===_0x217c29[_0x9aec42(0x158)]);if(_0x59e690&&_0x59e690[_0x9aec42(0x15b)]!==_0x217c29[_0x9aec42(0x15b)])throw new Error('Table\x20\x22'+_0x217c29[_0x9aec42(0x158)]+_0x9aec42(0x12e)+_0x59e690[_0x9aec42(0x15b)]+_0x9aec42(0x127)+_0x217c29[_0x9aec42(0x15b)]+_0x9aec42(0x164)+_0x11a638+'\x22.');}for(const _0x424f2e of _0xe2a3b['models']){delete _0x424f2e[_0x9aec42(0x150)][_0x11a638];}for(const _0x941da3 of _0x3ec920){let _0x1b3c40=_0xe2a3b[_0x9aec42(0x15f)][_0x9aec42(0x149)](_0x37e1d1=>_0x37e1d1[_0x9aec42(0x15b)]===_0x941da3[_0x9aec42(0x15b)]);!_0x1b3c40&&(_0x1b3c40={'alias':_0x941da3[_0x9aec42(0x15b)],'tableName':_0x941da3[_0x9aec42(0x158)],'name':_0x941da3[_0x9aec42(0x137)],'datasetCodes':{}},_0xe2a3b[_0x9aec42(0x15f)][_0x9aec42(0x128)](_0x1b3c40)),(_0x11a638===_0xe2a3b['defaultProfile']||!_0x1b3c40[_0x9aec42(0x150)][_0xe2a3b[_0x9aec42(0x144)]])&&(_0x1b3c40['alias']=_0x941da3[_0x9aec42(0x15b)],_0x1b3c40[_0x9aec42(0x158)]=_0x941da3['tableName'],_0x1b3c40[_0x9aec42(0x137)]=_0x941da3['name']),_0x1b3c40[_0x9aec42(0x150)][_0x11a638]=_0x941da3['datasetCode'];}_0xe2a3b['models']=_0xe2a3b[_0x9aec42(0x15f)][_0x9aec42(0x13e)](_0x90eaa4=>Object[_0x9aec42(0x163)](_0x90eaa4[_0x9aec42(0x150)])[_0x9aec42(0x123)]>0x0);}function removeUnboundProfiles(_0x13dd6c){const _0x210fe8=a6_0x2f7bf1,_0x29b59a=Object[_0x210fe8(0x135)](_0x13dd6c[_0x210fe8(0x143)])[_0x210fe8(0x13e)](([,_0x2b403d])=>_0x2b403d[_0x210fe8(0x142)]===_0x210fe8(0x12b))['map'](([_0x62f63b])=>_0x62f63b);if(_0x29b59a[_0x210fe8(0x123)]===0x0)return;for(const _0x5627b0 of _0x29b59a){delete _0x13dd6c[_0x210fe8(0x143)][_0x5627b0];for(const _0x4d779c of _0x13dd6c['models']){delete _0x4d779c[_0x210fe8(0x150)][_0x5627b0];}}_0x13dd6c[_0x210fe8(0x15f)]=_0x13dd6c[_0x210fe8(0x15f)][_0x210fe8(0x13e)](_0x1ab794=>Object[_0x210fe8(0x163)](_0x1ab794[_0x210fe8(0x150)])[_0x210fe8(0x123)]>0x0);}export function getProfileModels(_0x15a86d,_0x35877c){const _0x4d12cf=a6_0x2f7bf1;return _0x15a86d['models'][_0x4d12cf(0x138)](_0x2fab77=>{const _0x1e50aa=_0x4d12cf,_0x5102f2=_0x2fab77[_0x1e50aa(0x150)][_0x35877c];return _0x5102f2?[{'datasetCode':_0x5102f2,'tableName':_0x2fab77[_0x1e50aa(0x158)],'name':_0x2fab77[_0x1e50aa(0x137)],'alias':_0x2fab77[_0x1e50aa(0x15b)]}]:[];});}export function updateModelRegistry(_0x20d0b7){const _0x40276b=a6_0x2f7bf1,_0x4fc65e=a6_0x3b133[_0x40276b(0x146)](_0x20d0b7['outputDir'],MODEL_REGISTRY_FILE_NAME),_0x1654ee=existsSync(_0x4fc65e),_0xef6a23=readModelRegistry(_0x4fc65e);if(_0x1654ee&&!_0xef6a23)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x40276b(0x141));const _0x2b66f1=_0xef6a23??emptyRegistry(_0x20d0b7['defaultProfile']);if(_0x20d0b7[_0x40276b(0x142)]!==_0x40276b(0x12b))removeUnboundProfiles(_0x2b66f1);const _0x5b2eda=_0xef6a23?getProfileModels(_0xef6a23,_0x20d0b7[_0x40276b(0x131)])['length']:0x0;if(_0x5b2eda>0x0&&_0x20d0b7[_0x40276b(0x15f)][_0x40276b(0x123)]===0x0&&!_0x20d0b7[_0x40276b(0x120)])throw new Error(_0x40276b(0x14c)+_0x5b2eda+_0x40276b(0x11e)+_0x20d0b7[_0x40276b(0x131)]+_0x40276b(0x125)+_0x40276b(0x13b));_0x2b66f1[_0x40276b(0x144)]=_0x20d0b7[_0x40276b(0x144)],_0x2b66f1[_0x40276b(0x143)][_0x20d0b7[_0x40276b(0x131)]]={'appCode':_0x20d0b7[_0x40276b(0x142)],'runtimeDomain':_0x20d0b7[_0x40276b(0x139)]},mergeProfileModels(_0x2b66f1,_0x20d0b7[_0x40276b(0x131)],_0x20d0b7[_0x40276b(0x15f)]),mkdirSync(_0x20d0b7[_0x40276b(0x147)],{'recursive':!![]});const _0x4080bf=_0x4fc65e+'.'+process[_0x40276b(0x15e)]+'.'+Date[_0x40276b(0x12a)]()+_0x40276b(0x151);try{writeFileSync(_0x4080bf,registrySource(_0x2b66f1),{'encoding':_0x40276b(0x134),'mode':0x1a4}),renameSync(_0x4080bf,_0x4fc65e);}catch(_0x33cb83){try{unlinkSync(_0x4080bf);}catch{}throw _0x33cb83;}return{'path':_0x4fc65e,'registry':_0x2b66f1,'existed':_0x1654ee};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3abaaf,_0x48c556){const _0x4c5f62=a7_0x337a,_0xeaa67e=_0x3abaaf();while(!![]){try{const _0x5188c3=parseInt(_0x4c5f62(0xdd))/0x1+-parseInt(_0x4c5f62(0xe4))/0x2*(parseInt(_0x4c5f62(0xd4))/0x3)+-parseInt(_0x4c5f62(0xda))/0x4+-parseInt(_0x4c5f62(0xe7))/0x5+-parseInt(_0x4c5f62(0xdb))/0x6*(-parseInt(_0x4c5f62(0xdc))/0x7)+-parseInt(_0x4c5f62(0xe2))/0x8+parseInt(_0x4c5f62(0xd6))/0x9*(parseInt(_0x4c5f62(0xe9))/0xa);if(_0x5188c3===_0x48c556)break;else _0xeaa67e['push'](_0xeaa67e['shift']());}catch(_0x576b33){_0xeaa67e['push'](_0xeaa67e['shift']());}}}(a7_0x1df9,0xc16a8));function a7_0x1df9(){const _0x20d349=['572004gwQFEB','resolve','model-runtime.ts.tpl','3376055JBaQtJ','../../templates/generate-api','20405270KPFyJq','utf8','{ProjectRoutingImport}','6zSirYc','all','9ykoboR','profile-client.ts.tpl','dirname','startsWith','1147124GNOEke','436902shIJrI','28fImxFW','1291465HOuMXk','format','typescript','replace','join','10376256EfSPtK','profile-api.ts.tpl'];a7_0x1df9=function(){return _0x20d349;};return a7_0x1df9();}function a7_0x337a(_0x37b025,_0x2c91eb){_0x37b025=_0x37b025-0xd3;const _0x1df946=a7_0x1df9();let _0x337aa9=_0x1df946[_0x37b025];return _0x337aa9;}import{readFileSync}from'node:fs';import a7_0xba5651 from'node:path';import{fileURLToPath}from'node:url';import a7_0x2e6c63 from'prettier';import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function relativeImport(_0x3bfe22,_0x1f9978){const _0x14232c=a7_0x337a;let _0x19db1f=a7_0xba5651['relative'](_0x3bfe22,_0x1f9978)[_0x14232c(0xe0)](/\\/g,'/');if(!_0x19db1f[_0x14232c(0xd9)]('.'))_0x19db1f='./'+_0x19db1f;return _0x19db1f;}export async function renderModelRegistryScaffold(_0x36284a,_0x365dcf=process['cwd']()){const _0x269b23=a7_0x337a,_0x1b4098=fileURLToPath(import.meta.url),_0x541ba4=a7_0xba5651[_0x269b23(0xe5)](a7_0xba5651[_0x269b23(0xd8)](_0x1b4098),_0x269b23(0xe8)),_0x7702ab=relativeImport(a7_0xba5651['resolve'](_0x36284a),a7_0xba5651[_0x269b23(0xe5)](_0x365dcf,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x3c3998=readFileSync(a7_0xba5651['join'](_0x541ba4,_0x269b23(0xe3)),_0x269b23(0xea))['replace'](_0x269b23(0xd3),_0x7702ab),[_0x20b240,_0x30a7f1,_0x37a4f9]=await Promise[_0x269b23(0xd5)]([a7_0x2e6c63[_0x269b23(0xde)](_0x3c3998,{'parser':_0x269b23(0xdf)}),a7_0x2e6c63['format'](readFileSync(a7_0xba5651['join'](_0x541ba4,_0x269b23(0xd7)),_0x269b23(0xea)),{'parser':'typescript'}),a7_0x2e6c63[_0x269b23(0xde)](readFileSync(a7_0xba5651[_0x269b23(0xe1)](_0x541ba4,_0x269b23(0xe6)),_0x269b23(0xea)),{'parser':'typescript'})]);return{'api':_0x20b240,'client':_0x30a7f1,'modelRuntime':_0x37a4f9};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x17bd94,_0x571e99){const _0x5b45d5=a8_0x3016,_0x104b6b=_0x17bd94();while(!![]){try{const _0x1e300b=parseInt(_0x5b45d5(0x9b))/0x1*(-parseInt(_0x5b45d5(0x85))/0x2)+parseInt(_0x5b45d5(0x98))/0x3*(parseInt(_0x5b45d5(0x9c))/0x4)+-parseInt(_0x5b45d5(0x9a))/0x5*(-parseInt(_0x5b45d5(0x9e))/0x6)+parseInt(_0x5b45d5(0x89))/0x7*(-parseInt(_0x5b45d5(0x91))/0x8)+parseInt(_0x5b45d5(0x99))/0x9*(-parseInt(_0x5b45d5(0x93))/0xa)+-parseInt(_0x5b45d5(0x96))/0xb+parseInt(_0x5b45d5(0x97))/0xc;if(_0x1e300b===_0x571e99)break;else _0x104b6b['push'](_0x104b6b['shift']());}catch(_0x118bc3){_0x104b6b['push'](_0x104b6b['shift']());}}}(a8_0x5115,0x7b6bb));import{existsSync}from'node:fs';import a8_0x5c977a from'node:path';function a8_0x3016(_0x1a8fd,_0x2b1b58){_0x1a8fd=_0x1a8fd-0x7e;const _0x51152c=a8_0x5115();let _0x30161d=_0x51152c[_0x1a8fd];return _0x30161d;}import{readRawConfig}from'../context/config-loader.js';import{MODEL_REGISTRY_FILE_NAME,readModelRegistry}from'../api/model-registry-file.js';import{CliErrors}from'../errors.js';function a8_0x5115(){const _0x233777=['resolve','map','152XRevSl','profiles','5185900npFbRM','`\x20first.','length','3307447SBgUxt','13409544sjTVOA','9204yUNJUR','9VSVlMn','410xHIGcj','15658wKbvKG','12yscqcm','appcode','29076RIiaZB','join','object','api.ts','\x22\x20is\x20missing\x20from\x20','defaultProfile','defaultApp','Model\x20profile\x20\x22','6PeUVTI','\x20api\x20pull\x20--app\x20','find','cwd','56098HJwGcG','validation','entries','appCode','apps','\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20'];a8_0x5115=function(){return _0x233777;};return a8_0x5115();}import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveApiModelSource(_0x2bb161,_0x39e7cd,_0xa303b2){const _0x310324=a8_0x3016,_0x30b25e=a8_0x5c977a['resolve'](process[_0x310324(0x88)](),_0x2bb161),_0x408561=a8_0x5c977a[_0x310324(0x8f)](_0x30b25e,_0x310324(0x80)),_0x155b53=a8_0x5c977a[_0x310324(0x8f)](_0x30b25e,MODEL_REGISTRY_FILE_NAME),_0x3d2823=readModelRegistry(_0x155b53);if(_0x3d2823){const _0xe115e0=_0x39e7cd?Object[_0x310324(0x8b)](_0x3d2823[_0x310324(0x92)])['filter'](([,_0x31259c])=>_0x31259c[_0x310324(0x8c)]===_0x39e7cd):[];if(_0xa303b2){if(_0x3d2823[_0x310324(0x92)][_0xa303b2])return{'filePath':_0x155b53,'profileName':_0xa303b2};if(_0xe115e0[_0x310324(0x95)]>0x0)throw CliErrors[_0x310324(0x8a)](_0x310324(0x84)+_0xa303b2+_0x310324(0x81)+MODEL_REGISTRY_FILE_NAME+'.','Run\x20`'+CLI_BIN_NAME+_0x310324(0x86)+_0xa303b2+_0x310324(0x94));}else{if(_0xe115e0['length']===0x1)return{'filePath':_0x155b53,'profileName':_0xe115e0[0x0][0x0]};if(_0xe115e0[_0x310324(0x95)]>0x1)throw new Error('AppCode\x20\x22'+_0x39e7cd+_0x310324(0x8e)+_0xe115e0[_0x310324(0x90)](([_0x29d22e])=>_0x29d22e)[_0x310324(0x7e)](',\x20')+'.\x20'+'Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.');if(_0x3d2823[_0x310324(0x92)][_0x3d2823[_0x310324(0x82)]]&&!_0x39e7cd)return{'filePath':_0x155b53,'profileName':_0x3d2823['defaultProfile']};}}if(!_0x39e7cd&&!_0xa303b2)return{'filePath':_0x408561};const _0x2fa9da=readRawConfig(),_0x1dd069=_0x2fa9da[_0x310324(0x8d)]&&typeof _0x2fa9da[_0x310324(0x8d)]===_0x310324(0x7f)?_0x2fa9da[_0x310324(0x8d)]:{},_0x23f668=_0xa303b2&&_0x1dd069[_0xa303b2]?[_0xa303b2,_0x1dd069[_0xa303b2]]:Object['entries'](_0x1dd069)[_0x310324(0x87)](([,_0x5148c7])=>_0x5148c7?.[_0x310324(0x9d)]===_0x39e7cd);if(!_0x23f668)return{'filePath':_0x408561};const [_0x594190,_0x4d31c3]=_0x23f668,_0x17b590=typeof _0x2fa9da[_0x310324(0x83)]==='string'?_0x2fa9da['defaultApp']:undefined;if(_0x4d31c3?.['apiDir'])return{'filePath':_0x408561};if(_0x17b590&&_0x594190!==_0x17b590){const _0x1b2777=a8_0x5c977a[_0x310324(0x8f)](_0x30b25e,_0x594190+'-api.ts');if(existsSync(_0x1b2777))return{'filePath':_0x1b2777};}return{'filePath':_0x408561};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a9_0x162c(_0x448fcc,_0x305699){_0x448fcc=_0x448fcc-0x191;const _0x4b62fc=a9_0x4b62();let _0x162cca=_0x4b62fc[_0x448fcc];return _0x162cca;}function a9_0x4b62(){const _0x252d3f=['No\x20valid\x20session.\x20Login\x20now?','*\x20Login\x20successful!','stop','start','4298205VbbCJh','576086EJrnNx','618HCwHYl','autoYes','nonInteractive','1506708JGHvss','validation','Run\x20`','log','!\x20Login\x20failed.','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','3758298PKkAdb','299425iCZieu','1418UUQPnW','8558792LqwvMP','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.'];a9_0x4b62=function(){return _0x252d3f;};return a9_0x4b62();}(function(_0x3d4d29,_0x23e39b){const _0x18e8eb=a9_0x162c,_0x1d2943=_0x3d4d29();while(!![]){try{const _0x4722f0=parseInt(_0x18e8eb(0x199))/0x1+-parseInt(_0x18e8eb(0x191))/0x2*(parseInt(_0x18e8eb(0x19a))/0x3)+parseInt(_0x18e8eb(0x19d))/0x4+-parseInt(_0x18e8eb(0x198))/0x5+-parseInt(_0x18e8eb(0x1a4))/0x6+parseInt(_0x18e8eb(0x1a5))/0x7+parseInt(_0x18e8eb(0x192))/0x8;if(_0x4722f0===_0x23e39b)break;else _0x1d2943['push'](_0x1d2943['shift']());}catch(_0x33e86a){_0x1d2943['push'](_0x1d2943['shift']());}}}(a9_0x4b62,0x69c9d));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';import a9_0x48fa5b from'ora';export async function runAuthServer(_0x2bc2f2){const _0x395c71=a9_0x162c,_0x1e869b=await getIsSessionValid();if(_0x1e869b){console[_0x395c71(0x1a0)](_0x395c71(0x1a3));return;}if(_0x2bc2f2?.['nonInteractive']&&!_0x2bc2f2[_0x395c71(0x19b)])throw CliErrors[_0x395c71(0x19e)]('Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.',_0x395c71(0x19f)+CLI_BIN_NAME+_0x395c71(0x193));const _0x1d3445=_0x2bc2f2?.['autoYes']?!![]:await confirm({'message':_0x395c71(0x194),'default':!![]});if(!_0x1d3445)return;if(_0x2bc2f2?.[_0x395c71(0x19c)]){console[_0x395c71(0x1a0)](_0x395c71(0x1a2));const _0x1169b6=await authServer({'silent':![],'openBrowser':![]});_0x1169b6?console[_0x395c71(0x1a0)](_0x395c71(0x195)):console['log'](_0x395c71(0x1a1));return;}const _0x5c8466=a9_0x48fa5b('Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.')[_0x395c71(0x197)](),_0x4dbb4a=await authServer({'silent':!![],'openBrowser':!![]});_0x5c8466[_0x395c71(0x196)](),_0x4dbb4a?console[_0x395c71(0x1a0)](_0x395c71(0x195)):console['log'](_0x395c71(0x1a1));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x534917=a10_0x4a34;(function(_0x53818e,_0x3eb60c){const _0x396e27=a10_0x4a34,_0x4bdd16=_0x53818e();while(!![]){try{const _0x4fe388=-parseInt(_0x396e27(0x75))/0x1*(parseInt(_0x396e27(0x8d))/0x2)+-parseInt(_0x396e27(0x99))/0x3*(parseInt(_0x396e27(0x78))/0x4)+parseInt(_0x396e27(0x91))/0x5*(parseInt(_0x396e27(0x84))/0x6)+parseInt(_0x396e27(0x7c))/0x7+parseInt(_0x396e27(0x8f))/0x8+-parseInt(_0x396e27(0x82))/0x9*(-parseInt(_0x396e27(0x7a))/0xa)+-parseInt(_0x396e27(0x90))/0xb;if(_0x4fe388===_0x3eb60c)break;else _0x4bdd16['push'](_0x4bdd16['shift']());}catch(_0x3bbff5){_0x4bdd16['push'](_0x4bdd16['shift']());}}}(a10_0x2b9f,0x68f83));import{writeFileSync}from'node:fs';import a10_0x38b732 from'node:http';import a10_0x1e7c35 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(_0x1ef4b1){const _0x254018=a10_0x4a34;if(!_0x1ef4b1)return getProjectDomainRoutingManifest()[_0x254018(0x95)];const _0x4c46a6=getOfficialRoutingProfile(_0x1ef4b1),_0x5e6ebe=getOfficialRoutingCdn(_0x1ef4b1);return{'origin':_0x4c46a6[_0x254018(0x95)][_0x254018(0x94)],'certificateUrl':_0x5e6ebe[_0x254018(0x86)]+_0x254018(0x8e)};}function withPort(_0x1c4a04,_0x2fdce0){const _0xf2d141=a10_0x4a34,_0x24d978=new URL(_0x1c4a04);return _0x24d978[_0xf2d141(0x98)]=String(_0x2fdce0),_0x24d978[_0xf2d141(0x94)];}export async function authServer(_0x52bd39){const _0xbcf3dd=a10_0x4a34,_0x5a0e6c=_0x52bd39?.['silent']||![],_0x21e270=_0x52bd39?.['openBrowser']??!![],_0x352095=_0x52bd39?.[_0xbcf3dd(0x9d)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x36254f=resolveAuthCallbackRouting(),_0x5bcaf5=_0x36254f[_0xbcf3dd(0xa2)]?await(await fetch(_0x36254f[_0xbcf3dd(0xa2)]))[_0xbcf3dd(0xa6)]():undefined;return new Promise(async(_0x3c796b,_0xfb5af3)=>{const _0x387b4c=_0xbcf3dd;let _0xe616e2=0x0,_0x346f62=![],_0x292a15;const _0x52a2e0=async(_0x38396d,_0x4fbf54)=>{const _0xd2f655=a10_0x4a34,_0xa7640e=getUserDomain(),_0x2f5b7=_0x38396d[_0xd2f655(0x92)][_0xd2f655(0x97)]||'',_0x54a71a=await fetch(_0xa7640e+_0xd2f655(0x8b),{'headers':{'cookie':_0x2f5b7}})['then'](_0x2e0989=>_0x2e0989[_0xd2f655(0xa6)]()),_0x448745=_0x54a71a&&_0x54a71a[_0xd2f655(0x7b)]&&_0x54a71a[_0xd2f655(0x8a)];if(_0x448745){writeFileSync(cookieFile,_0x2f5b7,_0xd2f655(0x9b));const _0x2187fa=buildLoginSuccessHtml();_0x4fbf54[_0xd2f655(0xa1)](0xc8,{'Content-Type':_0xd2f655(0xa5)}),_0x4fbf54[_0xd2f655(0x89)](_0x2187fa),_0x575c6a(!![]);}else{const _0x4e6cec=encodeURIComponent(withPort(_0x36254f[_0xd2f655(0x94)],_0xe616e2));_0x4fbf54['writeHead'](0x12e,{'location':_0xa7640e+_0xd2f655(0xa3)+_0x4e6cec}),_0x4fbf54[_0xd2f655(0x89)]();return;}},_0x1d7ffc=_0x5bcaf5?a10_0x1e7c35['createServer'](_0x5bcaf5,_0x52a2e0):a10_0x38b732[_0x387b4c(0x79)](_0x52a2e0);function _0x575c6a(_0x1e25f0){const _0x53a74e=_0x387b4c;if(_0x346f62)return;_0x346f62=!![],_0x292a15&&clearTimeout(_0x292a15),_0x1d7ffc[_0x53a74e(0x9c)](),_0x3c796b(_0x1e25f0);}_0x1d7ffc[_0x387b4c(0x7d)](0x0,'127.0.0.1',()=>{const _0x37be43=_0x387b4c,_0x2f8d6d=_0x1d7ffc[_0x37be43(0xa0)]();_0xe616e2=typeof _0x2f8d6d===_0x37be43(0x85)&&_0x2f8d6d?_0x2f8d6d[_0x37be43(0x98)]:Number(_0x2f8d6d);const _0x433790=withPort(_0x36254f[_0x37be43(0x94)],_0xe616e2);_0x292a15=setTimeout(()=>{const _0x18553b=_0x37be43;!_0x5a0e6c&&console[_0x18553b(0x7e)](_0x18553b(0x7f)),_0x575c6a(![]);},_0x352095);!_0x5a0e6c&&(console[_0x37be43(0x7e)](_0x37be43(0x77)),console[_0x37be43(0x7e)](_0x37be43(0x96),_0x433790),_0x21e270?(console[_0x37be43(0x7e)]('🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...'),console[_0x37be43(0x7e)](''),console[_0x37be43(0x7e)](_0x37be43(0x87))):console['log']('💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.'),console[_0x37be43(0x7e)](''));if(!_0x21e270)return;openInBrowser(_0x433790)['then'](_0x593c73=>{const _0x2e9423=_0x37be43;!_0x5a0e6c&&(_0x593c73?console[_0x2e9423(0x7e)](_0x2e9423(0x9f)):(console[_0x2e9423(0x7e)](_0x2e9423(0x74)),console['log'](_0x2e9423(0x80),_0x433790)),console[_0x2e9423(0x7e)](''));})[_0x37be43(0x81)](()=>{const _0x707d93=_0x37be43;!_0x5a0e6c&&(console[_0x707d93(0x7e)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x707d93(0x7e)](_0x707d93(0x80),_0x433790),console['log'](''));});}),_0x1d7ffc['on'](_0x387b4c(0x88),_0x571afc=>{const _0xf41bdb=_0x387b4c;if(_0x346f62)return;_0x346f62=!![],_0x292a15&&clearTimeout(_0x292a15),!_0x5a0e6c&&console[_0xf41bdb(0x88)](_0xf41bdb(0x83),_0x571afc),_0x1d7ffc[_0xf41bdb(0x9c)](),_0xfb5af3(_0x571afc);});});}function a10_0x4a34(_0x1ce656,_0xc1edf9){_0x1ce656=_0x1ce656-0x74;const _0x2b9f74=a10_0x2b9f();let _0x4a349d=_0x2b9f74[_0x1ce656];return _0x4a349d;}function a10_0x2b9f(){const _0x854727=['utf-8','close','timeoutMs','cmd\x20/c\x20start\x20\x22\x22\x20\x22','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','address','writeHead','certificateUrl','/sign-in?redirect=','darwin','text/html;\x20charset=utf-8','json','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','695cDyccb','win32','🔐\x20Starting\x20login\x20service...','710956FekwwR','createServer','60nsofOX','session','1481753phUnnA','listen','log','!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','catch','774063pMsxUX','Auth\x20server\x20error:','2622354ibKxDp','object','lovrabet','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','error','end','user','/api/auth/get-session','isAuth','1312lFrqUe','/cert/lovrabet-dev.json','4459968DlahCa','5290153Klenfp','5tLabAi','headers','platform','origin','local','📍\x20Login\x20URL:','cookie','port','6wDlgcA','xdg-open\x20\x22'];a10_0x2b9f=function(){return _0x854727;};return a10_0x2b9f();}function openInBrowser(_0x154c23){return new Promise(_0x1a16f1=>{const _0x49090c=a10_0x4a34,_0x3c5286=process[_0x49090c(0x93)];let _0x2af81f;if(_0x3c5286===_0x49090c(0x76))_0x2af81f=_0x49090c(0x9e)+_0x154c23+'\x22';else _0x3c5286===_0x49090c(0xa4)?_0x2af81f='open\x20\x22'+_0x154c23+'\x22':_0x2af81f=_0x49090c(0x9a)+_0x154c23+'\x22';exec(_0x2af81f,_0x126c57=>{_0x126c57?_0x1a16f1(![]):_0x1a16f1(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a10_0x534917(0x7e)](a10_0x534917(0x8c),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a11_0x28cb(){const _0x5a1268=['11tkgplT','980520BtGHeS','91imSvTd','135432KKCoXG','cookie','1YrvdfK','186808XwbAtn','2541390SbUTCg','1286364sJdzoA','163164WWbghh','.lovrabet','72OCPMUR','12628940rsagqW'];a11_0x28cb=function(){return _0x5a1268;};return a11_0x28cb();}const a11_0x6e621b=a11_0x5f11;(function(_0x8101f4,_0x345ff7){const _0x318631=a11_0x5f11,_0x49c8ae=_0x8101f4();while(!![]){try{const _0x341b90=-parseInt(_0x318631(0x1cc))/0x1*(parseInt(_0x318631(0x1c8))/0x2)+-parseInt(_0x318631(0x1c2))/0x3+-parseInt(_0x318631(0x1ca))/0x4+-parseInt(_0x318631(0x1ce))/0x5+-parseInt(_0x318631(0x1c3))/0x6*(-parseInt(_0x318631(0x1c9))/0x7)+parseInt(_0x318631(0x1cd))/0x8*(parseInt(_0x318631(0x1c5))/0x9)+parseInt(_0x318631(0x1c6))/0xa*(parseInt(_0x318631(0x1c7))/0xb);if(_0x341b90===_0x345ff7)break;else _0x49c8ae['push'](_0x49c8ae['shift']());}catch(_0x1df6cf){_0x49c8ae['push'](_0x49c8ae['shift']());}}}(a11_0x28cb,0x53818));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';function a11_0x5f11(_0x43daad,_0x45374d){_0x43daad=_0x43daad-0x1c2;const _0x28cb33=a11_0x28cb();let _0x5f118d=_0x28cb33[_0x43daad];return _0x5f118d;}export const configDir=join(homedir(),a11_0x6e621b(0x1c4));export const cookieFile=join(configDir,a11_0x6e621b(0x1cb));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x39c8e2,_0x36d836){var _0x28f3a9=a12_0x3272,_0x44a60c=_0x39c8e2();while(!![]){try{var _0x3a5882=-parseInt(_0x28f3a9(0x7a))/0x1*(parseInt(_0x28f3a9(0x85))/0x2)+-parseInt(_0x28f3a9(0x7e))/0x3+parseInt(_0x28f3a9(0x84))/0x4*(parseInt(_0x28f3a9(0x80))/0x5)+parseInt(_0x28f3a9(0x83))/0x6+parseInt(_0x28f3a9(0x82))/0x7+parseInt(_0x28f3a9(0x7f))/0x8*(parseInt(_0x28f3a9(0x7d))/0x9)+parseInt(_0x28f3a9(0x7c))/0xa*(-parseInt(_0x28f3a9(0x7b))/0xb);if(_0x3a5882===_0x36d836)break;else _0x44a60c['push'](_0x44a60c['shift']());}catch(_0x36fca9){_0x44a60c['push'](_0x44a60c['shift']());}}}(a12_0x5dad,0x46839));import{readFileSync}from'node:fs';function a12_0x5dad(){var _0x3c9b95=['1124394yaikKT','4yEQAXb','8252BWudad','41pjQlaR','3366253PWZuSx','20yTDOCg','3289257ECscEj','228tXMBAf','8BJNwlC','903085jBbTjV','utf-8','2356368ZpRMWl'];a12_0x5dad=function(){return _0x3c9b95;};return a12_0x5dad();}import{cookieFile}from'../auth/constant.js';function a12_0x3272(_0x5753ea,_0x29c1f6){_0x5753ea=_0x5753ea-0x7a;var _0x5dad69=a12_0x5dad();var _0x327223=_0x5dad69[_0x5753ea];return _0x327223;}export function getCookie(){var _0x5bbe34=a12_0x3272;try{return readFileSync(cookieFile,_0x5bbe34(0x81));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a13_0x11c0(_0x44a9dc,_0x3a57f3){_0x44a9dc=_0x44a9dc-0x1dd;const _0x11468e=a13_0x1146();let _0x11c046=_0x11468e[_0x44a9dc];return _0x11c046;}(function(_0x44ef4f,_0x965ed){const _0x59493a=a13_0x11c0,_0x5a7e1e=_0x44ef4f();while(!![]){try{const _0x57f3=-parseInt(_0x59493a(0x1e4))/0x1*(-parseInt(_0x59493a(0x1e5))/0x2)+parseInt(_0x59493a(0x1de))/0x3+parseInt(_0x59493a(0x1e0))/0x4*(-parseInt(_0x59493a(0x1e1))/0x5)+parseInt(_0x59493a(0x1ea))/0x6+parseInt(_0x59493a(0x1df))/0x7+-parseInt(_0x59493a(0x1e2))/0x8*(-parseInt(_0x59493a(0x1e8))/0x9)+-parseInt(_0x59493a(0x1e3))/0xa*(parseInt(_0x59493a(0x1e7))/0xb);if(_0x57f3===_0x965ed)break;else _0x5a7e1e['push'](_0x5a7e1e['shift']());}catch(_0x542ba7){_0x5a7e1e['push'](_0x5a7e1e['shift']());}}}(a13_0x1146,0xb7bdb));import{existsSync,readFileSync}from'node:fs';function a13_0x1146(){const _0x577fec=['2010xXLvnC','158744LrxRpo','26186590YUZqPh','19909JpPjzb','76sKLlhO','json','11yCTHZz','594aFwKHJ','session','2337180gnPOKK','user','2731152BBieVJ','2115722AwlNEE','2956oZdkRs'];a13_0x1146=function(){return _0x577fec;};return a13_0x1146();}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0xc08299=a13_0x11c0;try{if(!existsSync(cookieFile))return null;const _0x5a9ff8=readFileSync(cookieFile,'utf-8'),_0x111e1e=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x5a9ff8}});if(!_0x111e1e['ok'])return null;const _0x4cac09=await _0x111e1e[_0xc08299(0x1e6)]();if(!_0x4cac09[_0xc08299(0x1e9)]||!_0x4cac09[_0xc08299(0x1dd)])return null;return _0x4cac09;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x49ec34,_0x53e4d0){const _0x5b9ed1=a14_0x3fb6,_0x4cbbe0=_0x49ec34();while(!![]){try{const _0x2126e5=parseInt(_0x5b9ed1(0x15e))/0x1*(-parseInt(_0x5b9ed1(0x16a))/0x2)+parseInt(_0x5b9ed1(0x15c))/0x3+parseInt(_0x5b9ed1(0x168))/0x4+parseInt(_0x5b9ed1(0x165))/0x5*(-parseInt(_0x5b9ed1(0x15d))/0x6)+-parseInt(_0x5b9ed1(0x15f))/0x7*(parseInt(_0x5b9ed1(0x161))/0x8)+parseInt(_0x5b9ed1(0x169))/0x9+-parseInt(_0x5b9ed1(0x160))/0xa*(parseInt(_0x5b9ed1(0x163))/0xb);if(_0x2126e5===_0x53e4d0)break;else _0x4cbbe0['push'](_0x4cbbe0['shift']());}catch(_0x5ac259){_0x4cbbe0['push'](_0x4cbbe0['shift']());}}}(a14_0x5103,0xdd00b));import{existsSync,readFileSync}from'node:fs';function a14_0x5103(){const _0x5a7006=['4595679bcVhoM','28Awmyuv','5153403tzvxqB','5958geKgwi','206nKxpEO','357CPSjTf','580110KSBfSo','87504wPjvkv','/api/auth/get-session','99iTRMOG','then','8790ygNubQ','utf-8','json','6021240xyibCd'];a14_0x5103=function(){return _0x5a7006;};return a14_0x5103();}import{getUserDomain}from'../constant/domain.js';function a14_0x3fb6(_0x58d14a,_0x2c1289){_0x58d14a=_0x58d14a-0x15c;const _0x5103ab=a14_0x5103();let _0x3fb69a=_0x5103ab[_0x58d14a];return _0x3fb69a;}import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x283a7c=a14_0x3fb6;try{if(!existsSync(cookieFile))return![];const _0x35118c=readFileSync(cookieFile,_0x283a7c(0x166)),_0x4e693a=await fetch(getUserDomain()+_0x283a7c(0x162),{'headers':{'cookie':_0x35118c}})[_0x283a7c(0x164)](_0x1a96bd=>_0x1a96bd[_0x283a7c(0x167)]());return _0x4e693a&&_0x4e693a['session']&&_0x4e693a['user'];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a15_0x2d68(_0x524c69,_0x469843){_0x524c69=_0x524c69-0xbd;const _0x49e578=a15_0x49e5();let _0x2d6874=_0x49e578[_0x524c69];return _0x2d6874;}function a15_0x49e5(){const _0x5edca2=['<!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>','11263032deoqFp','2992779NrDKJq','1774480JOYpyg','5GMAcLF','1KHbCMD','739448YYFPfl','150328DVpRmP','133nGdgqm','2403378jAxRzz','3LYspnB','3078932CLVcxr'];a15_0x49e5=function(){return _0x5edca2;};return a15_0x49e5();}(function(_0x423224,_0x1f0ac4){const _0x423954=a15_0x2d68,_0x220e1a=_0x423224();while(!![]){try{const _0x52f180=parseInt(_0x423954(0xc6))/0x1*(parseInt(_0x423954(0xc7))/0x2)+parseInt(_0x423954(0xbf))/0x3*(parseInt(_0x423954(0xc0))/0x4)+parseInt(_0x423954(0xc5))/0x5*(parseInt(_0x423954(0xbe))/0x6)+-parseInt(_0x423954(0xbd))/0x7*(parseInt(_0x423954(0xc8))/0x8)+parseInt(_0x423954(0xc3))/0x9+parseInt(_0x423954(0xc4))/0xa+-parseInt(_0x423954(0xc2))/0xb;if(_0x52f180===_0x1f0ac4)break;else _0x220e1a['push'](_0x220e1a['shift']());}catch(_0x2c7754){_0x220e1a['push'](_0x220e1a['shift']());}}}(a15_0x49e5,0xa3582));export function buildLoginSuccessHtml(){const _0x1f6382=a15_0x2d68,_0x1193c3='Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.';return _0x1f6382(0xc1)+_0x1193c3+'</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>';}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x18754f,_0x367ae0){var _0x6d7b7f=a16_0x4b42,_0x2ae2a9=_0x18754f();while(!![]){try{var _0x27b9f2=-parseInt(_0x6d7b7f(0xf8))/0x1+parseInt(_0x6d7b7f(0xf9))/0x2+-parseInt(_0x6d7b7f(0xf0))/0x3+parseInt(_0x6d7b7f(0xf6))/0x4*(-parseInt(_0x6d7b7f(0xf1))/0x5)+-parseInt(_0x6d7b7f(0xef))/0x6*(parseInt(_0x6d7b7f(0xee))/0x7)+-parseInt(_0x6d7b7f(0xf2))/0x8*(parseInt(_0x6d7b7f(0xf5))/0x9)+parseInt(_0x6d7b7f(0xf4))/0xa*(parseInt(_0x6d7b7f(0xf3))/0xb);if(_0x27b9f2===_0x367ae0)break;else _0x2ae2a9['push'](_0x2ae2a9['shift']());}catch(_0x51b37c){_0x2ae2a9['push'](_0x2ae2a9['shift']());}}}(a16_0xdea3,0x9f121));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';function a16_0x4b42(_0xb9d097,_0x53f992){_0xb9d097=_0xb9d097-0xed;var _0xdea3f4=a16_0xdea3();var _0x4b421a=_0xdea3f4[_0xb9d097];return _0x4b421a;}function a16_0xdea3(){var _0x49678d=['3932148bgoBKD','log','740761vAdUjb','497544HiQCKx','✓\x20Logged\x20out','203gVayRg','84804wMqTXi','185004SUCBzk','5QThpdi','16hhJJOB','4573547bWgFID','70pWQpwQ','1405377NomJGS'];a16_0xdea3=function(){return _0x49678d;};return a16_0xdea3();}export function logout(){var _0x56aecd=a16_0x4b42;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x56aecd(0xed))):console[_0x56aecd(0xf7)]('!\x20Not\x20logged\x20in');}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x4ff06d=a17_0x3a99;(function(_0x2b1160,_0x21f3f0){const _0x74d403=a17_0x3a99,_0x47ab1e=_0x2b1160();while(!![]){try{const _0xd16a63=parseInt(_0x74d403(0x1d6))/0x1+parseInt(_0x74d403(0x1d5))/0x2+parseInt(_0x74d403(0x1cf))/0x3*(-parseInt(_0x74d403(0x1d1))/0x4)+-parseInt(_0x74d403(0x1da))/0x5*(-parseInt(_0x74d403(0x1d4))/0x6)+parseInt(_0x74d403(0x1d3))/0x7*(-parseInt(_0x74d403(0x1d2))/0x8)+-parseInt(_0x74d403(0x1db))/0x9*(parseInt(_0x74d403(0x1d8))/0xa)+parseInt(_0x74d403(0x1d9))/0xb*(-parseInt(_0x74d403(0x1d7))/0xc);if(_0xd16a63===_0x21f3f0)break;else _0x47ab1e['push'](_0x47ab1e['shift']());}catch(_0x1ba6a8){_0x47ab1e['push'](_0x47ab1e['shift']());}}}(a17_0xdc84,0x7db29));function a17_0x3a99(_0x4a5b40,_0x8e0b5e){_0x4a5b40=_0x4a5b40-0x1cf;const _0xdc8430=a17_0xdc84();let _0x3a9965=_0xdc8430[_0x4a5b40];return _0x3a9965;}export const dynamicCliFlags={'enableBffSave':{'type':a17_0x4ff06d(0x1d0)}};function a17_0xdc84(){const _0x52bc50=['967354rWiDTC','72xHgMvZ','290IPGJrk','367587xXtwRz','4391305IGEZbn','131193TzzvYQ','963VdmiyI','boolean','7064iyxKpx','3367928eihXIn','7nEhheE','6umeEEr','560708SYOTGl'];a17_0xdc84=function(){return _0x52bc50;};return a17_0xdc84();}
|