@lovrabet/rabetbase-cli 2.5.4-beta.3 โ 2.5.4-beta.5
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 +8 -2
- 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.d.ts +2 -0
- package/lib/commands/app/detail.js +1 -0
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.d.ts +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +3 -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.d.ts +2 -0
- package/lib/commands/menu/shared/path.js +1 -0
- package/lib/commands/menu/shared/service.d.ts +6 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.d.ts +28 -0
- package/lib/commands/menu/shared/subapp-assets.js +1 -0
- package/lib/commands/menu/shared/sync-core.d.ts +2 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +14 -4
- 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.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-status.js +1 -0
- package/lib/commands/menu/subapp-assets-update.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-update.js +1 -0
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +16 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +22 -13
- package/skills/rabetbase/guides/backend-function.md +2 -7
- package/skills/rabetbase/guides/bff-creation-workflow.md +24 -23
- package/skills/rabetbase/guides/host-frontend-integration.md +62 -0
- package/skills/rabetbase/guides/independent-deployment.md +45 -0
- package/skills/rabetbase/guides/troubleshooting.md +9 -1
- package/skills/rabetbase/references/rabetbase-app-detail.md +31 -0
- package/skills/rabetbase/references/rabetbase-bff-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-push.md +2 -2
- package/skills/rabetbase/references/rabetbase-data-list-status.md +1 -0
- package/skills/rabetbase/references/rabetbase-deployment-sync-all.md +5 -1
- package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -7
- package/skills/rabetbase/references/rabetbase-menu-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-status.md +19 -0
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-update.md +27 -0
- package/skills/rabetbase/references/rabetbase-menu-sync.md +40 -14
- package/skills/rabetbase/references/rabetbase-page-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-generate-start.md +5 -3
- package/skills/rabetbase/references/rabetbase-page-generate-status.md +1 -0
- package/skills/rabetbase/references/rabetbase-user-account.md +8 -8
- package/skills/rabetbase.manifest.json +8 -3
package/README.md
CHANGED
|
@@ -202,14 +202,20 @@ lovrabet skill install
|
|
|
202
202
|
| App profiles | `rabetbase app list`, `rabetbase workspace add`, `rabetbase workspace remove` |
|
|
203
203
|
| Dataset contracts | `rabetbase dataset list`, `rabetbase dataset detail`, `rabetbase dataset operations`, `rabetbase dataset relations`, `rabetbase dataset relation-audit` |
|
|
204
204
|
| Dataset changes | `rabetbase dataset generate-start`, `rabetbase dataset generate-status`, `rabetbase dataset field-update`, `rabetbase dataset extend-update`, `rabetbase dataset business-group-update` |
|
|
205
|
-
| API
|
|
205
|
+
| API metadata and documentation | `rabetbase api list`, `rabetbase api pull`, `rabetbase api generate` |
|
|
206
|
+
| Invocation code snippets | `rabetbase codegen sdk`, `rabetbase codegen sql` |
|
|
206
207
|
| Data List Pages | `rabetbase page generate-start`, `rabetbase page generate-status`, `rabetbase page pull`, `rabetbase page push`, `rabetbase page sync`, `rabetbase page relation-audit` |
|
|
207
208
|
| Custom Pages | `rabetbase page create --page-pattern <BLANK|ONEPAGE|DASHBOARD>`, `rabetbase page custom-list`, `rabetbase page custom-detail`, `rabetbase page custom-update`, `rabetbase page custom-publish` |
|
|
208
209
|
| SQL and Backend Function assets | `rabetbase sql list`, `rabetbase sql detail`, `rabetbase sql create`, `rabetbase sql push`, `rabetbase sql validate`, `rabetbase bff list`, `rabetbase bff detail`, `rabetbase bff push` |
|
|
209
210
|
| Database connections | `rabetbase db list`, `rabetbase db detail`, `rabetbase db create`, `rabetbase db test`, `rabetbase db analyze-start`, `rabetbase db analyze-status` |
|
|
210
|
-
| Platform management | `rabetbase menu list`, `rabetbase menu external-link-create`, `rabetbase menu external-link-update`, `rabetbase menu sync`, `rabetbase menu asset-update`, `rabetbase app-config list/get/set`, `rabetbase kb list/detail/create/update/delete` |
|
|
211
|
+
| Platform management | `rabetbase menu list`, `rabetbase menu external-link-create`, `rabetbase menu external-link-update`, `rabetbase menu sync`, `rabetbase menu asset-update`, `rabetbase menu subapp-assets-status`, `rabetbase menu subapp-assets-update`, `rabetbase app-config list/get/set`, `rabetbase kb list/detail/create/update/delete` |
|
|
211
212
|
| Diagnostics | `rabetbase doctor`, `rabetbase schema`, `rabetbase logs show`, `rabetbase update` |
|
|
212
213
|
|
|
214
|
+
`api pull` refreshes dataset facts and the project's SDK model registry; `api generate` produces dataset Markdown documentation. `codegen` means code generation: `codegen sdk` generates a TypeScript invocation snippet for a dataset operation, while `codegen sql` generates one for a saved custom SQL query, targeting SDK or Backend Function code.
|
|
215
|
+
|
|
216
|
+
For frontend subapps, prefer asking your Agent to inspect the menu tree, preserve existing groups, register pages under the intended parents, and use shared subapp resources. The existing `menu sync` wizard and batch commands remain available as fallback workflows, with their current parameters and behavior.
|
|
217
|
+
|
|
218
|
+
|
|
213
219
|
Run command-level help for flags and prerequisites:
|
|
214
220
|
|
|
215
221
|
```bash
|
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3e5426,_0x43ee59){const _0x2aefac=a0_0x2b0a,_0xa873ba=_0x3e5426();while(!![]){try{const _0x39449f=-parseInt(_0x2aefac(0xe5))/0x1*(parseInt(_0x2aefac(0xf3))/0x2)+parseInt(_0x2aefac(0xfb))/0x3+-parseInt(_0x2aefac(0xf0))/0x4+-parseInt(_0x2aefac(0xf1))/0x5*(-parseInt(_0x2aefac(0xe2))/0x6)+parseInt(_0x2aefac(0xf8))/0x7*(parseInt(_0x2aefac(0xe4))/0x8)+-parseInt(_0x2aefac(0xe7))/0x9*(-parseInt(_0x2aefac(0xec))/0xa)+-parseInt(_0x2aefac(0xf4))/0xb;if(_0x39449f===_0x43ee59)break;else _0xa873ba['push'](_0xa873ba['shift']());}catch(_0x5120dd){_0xa873ba['push'](_0xa873ba['shift']());}}}(a0_0x30d0,0x6cf4b));function a0_0x2b0a(_0x1e93a7,_0x1ce76e){_0x1e93a7=_0x1e93a7-0xe0;const _0x30d09c=a0_0x30d0();let _0x2b0a81=_0x30d09c[_0x1e93a7];return _0x2b0a81;}import{mkdirSync,writeFileSync}from'node:fs';import a0_0x3010db from'node:path';import{fetchDatasetDoc}from'../core/api-client.js';import{logger}from'../utils/logger.js';export{fetchDatasetDoc}from'../core/api-client.js';function delay(_0x2b7eeb){return new Promise(_0x50d3ab=>setTimeout(_0x50d3ab,_0x2b7eeb));}function a0_0x30d0(){const _0x577d38=['1392234LuVipj','push','95792oOJEZy','1cKTYxh','length','1611DsyGTz','Failed\x20to\x20generate\x20docs:\x20','Generated\x20docs\x20successfully:\x20','success','api-doc','37910Ytrzxi','utf8','.md','โ\x20Generated:\x20','1591604IZkZZZ','10WuYpAo','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','929374NbojKj','4142402mLyaEt','โ\x20Failed:\x20','datasetCode','name','119CWvnvP','Waiting\x203\x20seconds...\x0a','tableName','1017684SDDKAc','log','error',']\x20Generating:\x20'];a0_0x30d0=function(){return _0x577d38;};return a0_0x30d0();}export async function generateDatasetDocs(_0x303323,_0x433009,_0x4ce253,_0x466855='./docs',_0x5820ac,_0x52cbac){const _0x5ce3e3=a0_0x2b0a;mkdirSync(_0x466855,{'recursive':!![]});const _0x3e76aa=[],_0x5eedb1=_0x303323[_0x5ce3e3(0xe6)];console[_0x5ce3e3(0xfc)]('\x0a'+_0x5eedb1+_0x5ce3e3(0xf2));for(let _0x4dfa0d=0x0;_0x4dfa0d<_0x303323[_0x5ce3e3(0xe6)];_0x4dfa0d++){const _0x1f513c=_0x303323[_0x4dfa0d],_0x318526=_0x4dfa0d+0x1,_0x4264c5=_0x1f513c[_0x5ce3e3(0xfa)];try{console[_0x5ce3e3(0xfc)]('['+_0x318526+'/'+_0x5eedb1+_0x5ce3e3(0xe1)+_0x4264c5+'.md\x20('+_0x1f513c[_0x5ce3e3(0xf7)]+')');if(_0x5820ac)_0x5820ac(_0x318526,_0x5eedb1,_0x4264c5);const _0xfe54b9=await fetchDatasetDoc({'appCode':_0x433009,'cookie':_0x4ce253,'datasetCode':_0x1f513c[_0x5ce3e3(0xf6)],'datasetId':_0x1f513c['id'],'enableAI':![],'extraParams':_0x52cbac}),_0x397adf=a0_0x3010db['join'](_0x466855,_0x4264c5+_0x5ce3e3(0xee));writeFileSync(_0x397adf,_0xfe54b9,{'encoding':_0x5ce3e3(0xed)}),console['log'](_0x5ce3e3(0xef)+_0x4264c5+'.md'),logger[_0x5ce3e3(0xea)](_0x5ce3e3(0xeb),_0x5ce3e3(0xe9)+_0x4264c5,undefined,{'datasetCode':_0x1f513c[_0x5ce3e3(0xf6)],'datasetName':_0x1f513c[_0x5ce3e3(0xf7)],'filePath':_0x397adf,'progress':_0x318526+'/'+_0x5eedb1}),_0x3e76aa[_0x5ce3e3(0xe3)]({'datasetCode':_0x1f513c[_0x5ce3e3(0xf6)],'datasetName':_0x1f513c[_0x5ce3e3(0xf7)],'filePath':_0x397adf,'success':!![]});if(_0x318526<_0x5eedb1)await delay(0x1388);}catch(_0x5e2b42){const _0x170c66=_0x5e2b42 instanceof Error?_0x5e2b42['message']:String(_0x5e2b42);console[_0x5ce3e3(0xfc)](_0x5ce3e3(0xf5)+_0x4264c5+'.md\x20-\x20'+_0x170c66),logger[_0x5ce3e3(0xe0)](_0x5ce3e3(0xeb),_0x5ce3e3(0xe8)+_0x1f513c['datasetCode'],{'datasetCode':_0x1f513c[_0x5ce3e3(0xf6)],'datasetName':_0x1f513c[_0x5ce3e3(0xf7)],'error':_0x170c66,'progress':_0x318526+'/'+_0x5eedb1}),_0x3e76aa[_0x5ce3e3(0xe3)]({'datasetCode':_0x1f513c[_0x5ce3e3(0xf6)],'datasetName':_0x1f513c['name'],'filePath':'','success':![],'error':_0x170c66}),_0x318526<_0x5eedb1&&(console[_0x5ce3e3(0xfc)](_0x5ce3e3(0xf9)),await delay(0xbb8));}}return _0x3e76aa;}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x5d2b7b=a1_0x3568;(function(_0x5f0a48,_0x3e4847){const _0x4753e3=a1_0x3568,_0x19e00d=_0x5f0a48();while(!![]){try{const _0x5b7997=parseInt(_0x4753e3(0xf0))/0x1*(parseInt(_0x4753e3(0xf1))/0x2)+-parseInt(_0x4753e3(0xfa))/0x3+parseInt(_0x4753e3(0xee))/0x4+parseInt(_0x4753e3(0xf7))/0x5*(parseInt(_0x4753e3(0xf9))/0x6)+parseInt(_0x4753e3(0xfb))/0x7+parseInt(_0x4753e3(0xec))/0x8*(parseInt(_0x4753e3(0xe8))/0x9)+-parseInt(_0x4753e3(0xf8))/0xa;if(_0x5b7997===_0x3e4847)break;else _0x19e00d['push'](_0x19e00d['shift']());}catch(_0x1fdaf4){_0x19e00d['push'](_0x19e00d['shift']());}}}(a1_0x5201,0xbe9e5));import a1_0x3ee0f2 from'node:path';import{CliErrors}from'../errors.js';function a1_0x5201(){const _0xc467f=['apiGroup','16735JcuSPx','6qamNhm','map','filter','set','normalizedApiDir','Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20','570ctMbel','24198380YsviIZ','35754zDrsPM','1568640fysHpD','10590342hrAmDE','push','Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.','flatMap','API\x20directory\x20\x22','.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.','some','cwd','values','trim','size','app','get','length','252htDDWO','add','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','name','230600HHonTU','validation','2695816EAujWa'];a1_0x5201=function(){return _0xc467f;};return a1_0x5201();}export function normalizeApiDir(_0x3abd18,_0x242956=process[a1_0x5d2b7b(0xe1)]()){return a1_0x3ee0f2['resolve'](_0x242956,_0x3abd18);}function normalizedApiGroup(_0x48310b){const _0x190466=a1_0x5d2b7b,_0x9fc73d=_0x48310b?.[_0x190466(0xe3)]();return _0x9fc73d||undefined;}function a1_0x3568(_0xe0cbe9,_0x14d145){_0xe0cbe9=_0xe0cbe9-0xdb;const _0x520141=a1_0x5201();let _0x356825=_0x520141[_0xe0cbe9];return _0x356825;}export function resolveApiProfileLayouts(_0x636ce9,_0x446f5b,_0x10749b=process['cwd']()){const _0x31143c=a1_0x5d2b7b,_0x38fef4=_0x636ce9[_0x31143c(0xf2)](_0x2d52ee=>{const _0x1f33c2=_0x31143c,_0x3540bc=_0x446f5b(_0x2d52ee);return{'app':_0x2d52ee,'outputDir':_0x3540bc,'normalizedApiDir':normalizeApiDir(_0x3540bc,_0x10749b),'apiGroup':normalizedApiGroup(_0x2d52ee[_0x1f33c2(0xef)])};}),_0x59dc74=new Map();for(const _0x6c9beb of _0x38fef4){if(!_0x6c9beb[_0x31143c(0xef)])continue;const _0x53ed78=_0x59dc74['get'](_0x6c9beb[_0x31143c(0xef)])??new Set();_0x53ed78[_0x31143c(0xe9)](_0x6c9beb['normalizedApiDir']),_0x59dc74[_0x31143c(0xf4)](_0x6c9beb[_0x31143c(0xef)],_0x53ed78);}for(const [_0x157baa,_0x293a2f]of _0x59dc74){if(_0x293a2f[_0x31143c(0xe4)]>0x1)throw CliErrors[_0x31143c(0xed)]('API\x20group\x20\x22'+_0x157baa+'\x22\x20resolves\x20to\x20multiple\x20API\x20directories.',_0x31143c(0xdc));}const _0xe1324f=new Map();for(const _0x2e4c1a of _0x38fef4){const _0x486006=_0xe1324f[_0x31143c(0xe6)](_0x2e4c1a[_0x31143c(0xf5)])??[];_0x486006[_0x31143c(0xdb)](_0x2e4c1a),_0xe1324f[_0x31143c(0xf4)](_0x2e4c1a[_0x31143c(0xf5)],_0x486006);}for(const _0x128879 of _0xe1324f[_0x31143c(0xe2)]()){const _0x442c87=new Set(_0x128879[_0x31143c(0xdd)](_0x395f8f=>_0x395f8f[_0x31143c(0xef)]?[_0x395f8f[_0x31143c(0xef)]]:[]));if(_0x442c87[_0x31143c(0xe4)]===0x0)continue;if(_0x442c87[_0x31143c(0xe4)]>0x1||_0x128879[_0x31143c(0xe0)](_0x35fb6d=>!_0x35fb6d[_0x31143c(0xef)])){const _0x4bede2=_0x128879[_0x31143c(0xf2)](_0x1e092b=>_0x1e092b[_0x31143c(0xe5)][_0x31143c(0xeb)])['join'](',\x20');throw CliErrors['validation'](_0x31143c(0xde)+_0x128879[0x0]['outputDir']+_0x31143c(0xea),_0x31143c(0xf6)+_0x4bede2+_0x31143c(0xdf));}}return _0x38fef4;}export function getRegistryGroup(_0x594554,_0x4fe951){const _0x3699be=a1_0x5d2b7b;if(_0x4fe951[_0x3699be(0xef)])return _0x594554['filter'](_0x261f99=>_0x261f99['apiGroup']===_0x4fe951[_0x3699be(0xef)]);const _0x16bf89=_0x594554[_0x3699be(0xf3)](_0x41bb95=>_0x41bb95['normalizedApiDir']===_0x4fe951[_0x3699be(0xf5)]);return _0x16bf89[_0x3699be(0xe7)]===0x1?_0x16bf89:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a2_0x3fc5(){var _0x33048b=['12919jURizR','8879575gluRBJ','25110602svZcTt','29586ZiFooB','3EWGlDs','171RjJlJa','2872140pltATm','602BwRbAW','1914930nKdJNe','288SYRggr','575544mxmVdQ'];a2_0x3fc5=function(){return _0x33048b;};return a2_0x3fc5();}function a2_0x10f8(_0x41a341,_0x249c5a){_0x41a341=_0x41a341-0x1c6;var _0x3fc574=a2_0x3fc5();var _0x10f866=_0x3fc574[_0x41a341];return _0x10f866;}(function(_0x53e060,_0x275b73){var _0x40ca55=a2_0x10f8,_0xf079bb=_0x53e060();while(!![]){try{var _0x23948f=-parseInt(_0x40ca55(0x1c7))/0x1*(-parseInt(_0x40ca55(0x1d0))/0x2)+parseInt(_0x40ca55(0x1cb))/0x3*(parseInt(_0x40ca55(0x1cd))/0x4)+parseInt(_0x40ca55(0x1c8))/0x5+parseInt(_0x40ca55(0x1ca))/0x6*(parseInt(_0x40ca55(0x1ce))/0x7)+parseInt(_0x40ca55(0x1c6))/0x8*(-parseInt(_0x40ca55(0x1cc))/0x9)+-parseInt(_0x40ca55(0x1cf))/0xa+-parseInt(_0x40ca55(0x1c9))/0xb;if(_0x23948f===_0x275b73)break;else _0xf079bb['push'](_0xf079bb['shift']());}catch(_0x980ebd){_0xf079bb['push'](_0xf079bb['shift']());}}}(a2_0x3fc5,0xe4cc8));export{fetchModelList}from'../core/api-client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a3_0x4362(){const _0x188e1e=['2618105USyxzR','created','1243704efkXeY','replaceApiContent','2254832LWMQbN','{\x20apiConfigName:\x20','client','utf8','key','alias','path','join','../..','name','map','overwriteTypescript','\x20config\x20set\x20app\x20<value>`','allowEmptyModelReplacement','client.ts.tpl','Model\x20facts\x20refreshed.','api','runtimeDomain','replace','datasetCode','243405YvZvgC','templates/generate-api','Please\x20configure\x20app\x20code\x20first\x20via\x20`','scaffoldMode','length','resolve',',\x20env:\x20',',\x20...LOVRABET_SDK_CONFIG\x20}','format','-api','refreshed','2259qUPmtc','\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.','action','includes','API\x20scaffold\x20written.','modelRuntime','defaultName','test','37534170JxKlzk','basename','6152zUiNPQ','preserved','176HIECMm','tableName','missing','7eNwnno','CONFIG_NAMES.DEFAULT','stringify','5413002MeuOsi','typescript','modelProfile','.ts'];a3_0x4362=function(){return _0x188e1e;};return a3_0x4362();}function a3_0x3bc4(_0x26e15a,_0x53975c){_0x26e15a=_0x26e15a-0xf8;const _0x436200=a3_0x4362();let _0x3bc466=_0x436200[_0x26e15a];return _0x3bc466;}(function(_0x57a944,_0x5dde39){const _0x1ccaaa=a3_0x3bc4,_0x1ebdfa=_0x57a944();while(!![]){try{const _0x586d48=parseInt(_0x1ccaaa(0x12a))/0x1+-parseInt(_0x1ccaaa(0x12c))/0x2+-parseInt(_0x1ccaaa(0x112))/0x3*(parseInt(_0x1ccaaa(0x11c))/0x4)+-parseInt(_0x1ccaaa(0x128))/0x5+parseInt(_0x1ccaaa(0x124))/0x6*(-parseInt(_0x1ccaaa(0x121))/0x7)+parseInt(_0x1ccaaa(0x11e))/0x8*(-parseInt(_0x1ccaaa(0x107))/0x9)+parseInt(_0x1ccaaa(0x11a))/0xa;if(_0x586d48===_0x5dde39)break;else _0x1ebdfa['push'](_0x1ebdfa['shift']());}catch(_0x1ead6c){_0x1ebdfa['push'](_0x1ebdfa['shift']());}}}(a3_0x4362,0xa8a7d));import a3_0x4efdb8 from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x204428 from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';import{generateSdkConfigFile}from'../api/generate-sdk-config-file.js';import{MODEL_REGISTRY_FILE_NAME,MODEL_RUNTIME_FILE_NAME,updateModelRegistry}from'../api/model-registry-file.js';import{renderModelRegistryScaffold}from'../api/model-registry-scaffold.js';function fileAction(_0x343e61,_0x3f9c08){const _0xae531d=a3_0x3bc4;if(!_0x3f9c08)return _0x343e61?_0xae531d(0x11d):_0xae531d(0x120);return _0x343e61?'overwritten':_0xae531d(0x129);}export async function generateApiFile(_0x88314a,_0x5e31c3,_0x15985e,_0x21e227,_0x3fc871,_0x6ba5ab,_0x168fe2,_0x1c4d94={},_0x5373c1={}){const _0x235fc5=a3_0x3bc4;if(!_0x15985e)throw new Error(_0x235fc5(0x109)+CLI_BIN_NAME+_0x235fc5(0xff));const _0x1cc90d=_0x21e227&&!_0x168fe2,_0x5e5f4c=!!_0x5373c1[_0x235fc5(0x126)],_0xcaafa5=_0x5e5f4c||_0x1cc90d,_0x49fe19=_0x168fe2||_0x15985e,_0x43acc1=_0x5e5f4c||_0x1cc90d?'default':_0x49fe19,_0x47454e=_0x5e5f4c||_0x1cc90d?_0x235fc5(0x122):JSON[_0x235fc5(0x123)](_0x49fe19),_0x2e67ae=!isProduction(_0x3fc871),_0x119377=_0x2e67ae?_0x235fc5(0x10d)+JSON[_0x235fc5(0x123)](_0x3fc871):'',_0x4dd6e8=_0x235fc5(0x12d)+_0x47454e+_0x119377+_0x235fc5(0x10e),_0x32c36b=_0x5e5f4c?'':_0x5e31c3,_0x1c0a6a=_0x32c36b?_0x32c36b+_0x235fc5(0x110):_0x235fc5(0x103),_0x1cf25a=_0x32c36b?_0x32c36b+'-client':_0x235fc5(0x12e),_0x1f0503=_0x32c36b&&!/^app-[a-f0-9]+$/i[_0x235fc5(0x119)](_0x32c36b)?_0x32c36b[_0x235fc5(0x105)](/-/g,'_')['toUpperCase']():'LOVRABET',_0xc07ed5=/^\d/[_0x235fc5(0x119)](_0x1f0503)?'APP_'+_0x1f0503:_0x1f0503,_0x4f5fb1=_0x88314a[_0x235fc5(0xfd)](_0x136233=>({'datasetCode':_0x136233[_0x235fc5(0x106)],'tableName':_0x136233[_0x235fc5(0x11f)],'name':_0x136233[_0x235fc5(0xfc)]||'','alias':_0x136233[_0x235fc5(0xf8)]||_0x136233[_0x235fc5(0x130)]})),_0x81545b=fileURLToPath(import.meta.url),_0x155b0d=a3_0x204428[_0x235fc5(0x10c)](a3_0x204428['dirname'](_0x81545b),_0x235fc5(0xfb)),_0x403771=a3_0x204428[_0x235fc5(0xfa)](_0x155b0d,_0x235fc5(0x108)),_0x40413c=a3_0x204428['join'](_0x403771,'api.ts.tpl'),_0x312d90=a3_0x204428['join'](_0x403771,_0x235fc5(0x101)),_0x212826=_0x6ba5ab;mkdirSync(_0x212826,{'recursive':!![]});const _0x34eb18=_0x5e5f4c?{}:_0x1c4d94,_0x472729=await generateSdkConfigFile(_0x212826,_0x34eb18,_0x32c36b),_0x54bd91=a3_0x204428['basename'](_0x472729,_0x235fc5(0x127)),_0x3832a5=a3_0x204428['join'](_0x212826,_0x1c0a6a+_0x235fc5(0x127)),_0x304197=a3_0x204428[_0x235fc5(0xfa)](_0x212826,_0x1cf25a+'.ts'),_0x14eb32=_0x5373c1[_0x235fc5(0xfe)]===!![],_0x2c465a=existsSync(_0x3832a5),_0x834a73=existsSync(_0x304197),_0x349f31=_0x5373c1[_0x235fc5(0x10a)]??(_0x14eb32?'replace':_0x235fc5(0x120)),_0x127d78=_0x349f31===_0x235fc5(0x105)||_0x349f31===_0x235fc5(0x120)&&!_0x2c465a,_0x386885=_0x349f31==='replace'||_0x349f31===_0x235fc5(0x120)&&!_0x834a73,_0x536a9c=_0x5373c1[_0x235fc5(0x126)]?updateModelRegistry({'outputDir':_0x212826,'profileName':_0x5373c1['modelProfile'][_0x235fc5(0xfc)],'defaultProfile':_0x5373c1[_0x235fc5(0x126)][_0x235fc5(0x118)],'appCode':_0x15985e,'runtimeDomain':_0x5373c1[_0x235fc5(0x126)][_0x235fc5(0x104)],'models':_0x4f5fb1,'allowEmptyReplacement':_0x5373c1[_0x235fc5(0x100)]===!![]}):undefined,_0x3e39c4=_0x536a9c?a3_0x204428[_0x235fc5(0xfa)](_0x212826,MODEL_RUNTIME_FILE_NAME):undefined,_0x51f567=_0x3e39c4?existsSync(_0x3e39c4):![],_0x13b714=_0x5e5f4c&&_0x349f31!=='none'?await renderModelRegistryScaffold(_0x212826):undefined;_0x3e39c4&&_0x13b714&&writeFileSync(_0x3e39c4,_0x13b714[_0x235fc5(0x117)],_0x235fc5(0x12f));const _0x41e4a2=_0x4f5fb1[0x0]?.[_0x235fc5(0xf8)];if(_0x127d78){const _0x70dfdc=_0x13b714?.[_0x235fc5(0x103)]??readFileSync(_0x40413c,_0x235fc5(0x12f)),_0x281862=_0x5e5f4c?_0x70dfdc:TemplateReplacer[_0x235fc5(0x12b)](_0x70dfdc,_0x15985e,_0x4f5fb1,_0x41e4a2,_0x1c0a6a,_0x47454e,undefined,_0xc07ed5);writeFileSync(_0x3832a5,await a3_0x4efdb8[_0x235fc5(0x10f)](_0x281862,{'parser':_0x235fc5(0x125)}),{'encoding':_0x235fc5(0x12f)});}if(_0x386885){const _0x174538=_0x13b714?.[_0x235fc5(0x12e)]??readFileSync(_0x312d90,'utf8'),_0x327b9b=_0x5e5f4c?_0x174538:TemplateReplacer['replaceApiContent'](_0x174538,_0x15985e,_0x4f5fb1,_0x41e4a2,_0x1c0a6a,_0x47454e,_0x4dd6e8,_0xc07ed5,_0x54bd91);writeFileSync(_0x304197,await a3_0x4efdb8[_0x235fc5(0x10f)](_0x327b9b,{'parser':_0x235fc5(0x125)}),{'encoding':_0x235fc5(0x12f)});}const _0x366e9f=_0x4f5fb1[_0x235fc5(0x10b)],_0x2ea2bd={'api':{'path':_0x3832a5,'action':fileAction(_0x2c465a,_0x127d78)},'client':{'path':_0x304197,'action':fileAction(_0x834a73,_0x386885)},'sdkConfig':{'path':_0x472729,'action':_0x235fc5(0x111)},..._0x536a9c?{'modelRegistry':{'path':_0x536a9c[_0x235fc5(0xf9)],'action':_0x536a9c['existed']?_0x235fc5(0x111):_0x235fc5(0x129)},'modelRuntime':{'path':_0x3e39c4,'action':_0x13b714?_0x51f567?'refreshed':_0x235fc5(0x129):_0x51f567?_0x235fc5(0x11d):_0x235fc5(0x120)}}:{}},_0x123f6f=existsSync(_0x3832a5)&&readFileSync(_0x3832a5,_0x235fc5(0x12f))[_0x235fc5(0x115)](MODEL_REGISTRY_FILE_NAME[_0x235fc5(0x105)](_0x235fc5(0x127),'')),_0x3def48=existsSync(_0x304197)&&readFileSync(_0x304197,_0x235fc5(0x12f))[_0x235fc5(0x115)]('LOVRABET_RUNTIME_DOMAIN'),_0x5c76d4=_0x5e5f4c?!_0x123f6f||!_0x3def48||!existsSync(_0x3e39c4):![],_0x40a0ac=_0x5e5f4c?_0x5c76d4:_0x2ea2bd[_0x235fc5(0x103)][_0x235fc5(0x114)]===_0x235fc5(0x11d)||_0x2ea2bd['client']['action']===_0x235fc5(0x11d);return logger['success']('init-api',_0x40a0ac?a3_0x204428[_0x235fc5(0x11b)](_0x472729)+_0x235fc5(0x113):_0x5e5f4c?_0x235fc5(0x102):_0x235fc5(0x116),undefined,{'apiFile':_0x3832a5,'clientFile':_0x304197,'sdkConfig':_0x472729,'modelCount':_0x366e9f,'configName':_0x43acc1,'isDefaultConfig':_0xcaafa5,'needsAgentMerge':_0x40a0ac,'needsProjectUpgrade':_0x5c76d4,'files':_0x2ea2bd}),{'appCode':_0x15985e,'modelCount':_0x366e9f,'models':_0x4f5fb1,'apiFilePath':_0x3832a5,'clientFilePath':_0x304197,'sdkConfigPath':_0x472729,'modelRegistryPath':_0x536a9c?.['path'],'modelRuntimePath':_0x3e39c4,'modelProfile':_0x5373c1[_0x235fc5(0x126)]?.[_0x235fc5(0xfc)],'configName':_0x43acc1,'isDefaultConfig':_0xcaafa5,'sdkRouting':_0x34eb18,'files':_0x2ea2bd,'needsAgentMerge':_0x40a0ac,'needsProjectUpgrade':_0x5c76d4};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x537220=a4_0x2e79;(function(_0x1489e1,_0x167ab6){const _0x7eb9db=a4_0x2e79,_0x5d3fb4=_0x1489e1();while(!![]){try{const _0x2a446a=-parseInt(_0x7eb9db(0x76))/0x1+parseInt(_0x7eb9db(0x7c))/0x2+parseInt(_0x7eb9db(0x7d))/0x3*(-parseInt(_0x7eb9db(0x7f))/0x4)+-parseInt(_0x7eb9db(0x7e))/0x5*(-parseInt(_0x7eb9db(0x89))/0x6)+parseInt(_0x7eb9db(0x81))/0x7*(parseInt(_0x7eb9db(0x7a))/0x8)+parseInt(_0x7eb9db(0x83))/0x9*(-parseInt(_0x7eb9db(0x8a))/0xa)+parseInt(_0x7eb9db(0x86))/0xb;if(_0x2a446a===_0x167ab6)break;else _0x5d3fb4['push'](_0x5d3fb4['shift']());}catch(_0x5d6b66){_0x5d3fb4['push'](_0x5d3fb4['shift']());}}}(a4_0x1a32,0x61a91));import{mkdirSync,writeFileSync}from'node:fs';function a4_0x1a32(){const _0x176b1b=['4395886ARciwq','runtimeDomain:\x20','utf8','534yGJNVs','25570hkZbGe','format','391457DgFBPn','-sdk-config.ts','runtimeDomain','{\x0a\x20\x20','2872giqcLo','length','544000SIlzeL','998394ZThmkF','8715Vcdzqn','4HpEuKC',',\x0a}','10787uCyaQE','join','900OGPlTe','push','sdk-config.ts'];a4_0x1a32=function(){return _0x176b1b;};return a4_0x1a32();}function a4_0x2e79(_0x3a8ae8,_0x277abd){_0x3a8ae8=_0x3a8ae8-0x75;const _0x1a325e=a4_0x1a32();let _0x2e79c4=_0x1a325e[_0x3a8ae8];return _0x2e79c4;}import a4_0x2b5fcc from'node:path';import a4_0x519693 from'prettier';export const SDK_CONFIG_FILE_NAME=a4_0x537220(0x85);export function getSdkConfigFileName(_0x2431c1=''){const _0x5e8223=a4_0x537220;return _0x2431c1?_0x2431c1+_0x5e8223(0x77):SDK_CONFIG_FILE_NAME;}export async function generateSdkConfigFile(_0x1ad891,_0x21f603={},_0x2e3283=''){const _0x2595e2=a4_0x537220,_0x3922da=[];_0x21f603[_0x2595e2(0x78)]&&_0x3922da[_0x2595e2(0x84)](_0x2595e2(0x87)+JSON['stringify'](_0x21f603[_0x2595e2(0x78)]));const _0x140500=_0x3922da[_0x2595e2(0x7b)]>0x0?_0x2595e2(0x79)+_0x3922da[_0x2595e2(0x82)](',\x0a\x20\x20')+_0x2595e2(0x80):'{}',_0x3cd6e8='/**\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'+_0x140500+'\x20as\x20const;\x0a';mkdirSync(_0x1ad891,{'recursive':!![]});const _0x170d56=a4_0x2b5fcc[_0x2595e2(0x82)](_0x1ad891,getSdkConfigFileName(_0x2e3283));return writeFileSync(_0x170d56,await a4_0x519693[_0x2595e2(0x75)](_0x3cd6e8,{'parser':'typescript'}),_0x2595e2(0x88)),_0x170d56;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5e85e6,_0x12f067){const _0x2f345b=a5_0x2dec,_0x21532f=_0x5e85e6();while(!![]){try{const _0x3de5af=-parseInt(_0x2f345b(0x148))/0x1*(parseInt(_0x2f345b(0x147))/0x2)+parseInt(_0x2f345b(0x155))/0x3*(parseInt(_0x2f345b(0x143))/0x4)+parseInt(_0x2f345b(0x151))/0x5+-parseInt(_0x2f345b(0x14f))/0x6+parseInt(_0x2f345b(0x152))/0x7+-parseInt(_0x2f345b(0x15b))/0x8*(parseInt(_0x2f345b(0x158))/0x9)+parseInt(_0x2f345b(0x14b))/0xa;if(_0x3de5af===_0x12f067)break;else _0x21532f['push'](_0x21532f['shift']());}catch(_0x197ce1){_0x21532f['push'](_0x21532f['shift']());}}}(a5_0x317d,0x30508));export function parseLegacyApiModels(_0x24e503){const _0x293cea=a5_0x2dec,_0x963cc3=[],_0xf4b49d=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x479d61;while((_0x479d61=_0xf4b49d[_0x293cea(0x14e)](_0x24e503))!==null){_0x963cc3['push']({'datasetCode':_0x479d61[0x1],'tableName':_0x479d61[0x2],'name':_0x479d61[0x3],'alias':_0x479d61[0x4]});}return _0x963cc3;}export function parseLegacyApiAppCode(_0x486764){const _0x6a672c=a5_0x2dec;return _0x486764[_0x6a672c(0x159)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function stripComments(_0x5f4854){const _0x30452b=a5_0x2dec;return _0x5f4854[_0x30452b(0x145)](/\/\*[\s\S]*?\*\//g,'')[_0x30452b(0x145)](/\/\/.*$/gm,'');}function a5_0x2dec(_0x4e27d6,_0x125f68){_0x4e27d6=_0x4e27d6-0x143;const _0x317d5a=a5_0x317d();let _0x2dec3e=_0x317d5a[_0x4e27d6];return _0x2dec3e;}export function isLegacyGeneratedApiScaffold(_0x476434){const _0x19ab1a=a5_0x2dec;if(!_0x476434[_0x19ab1a(0x146)]('Generated\x20by\x20Rabetbase\x20CLI'))return![];const _0x342ca1=stripComments(_0x476434),_0x38333b=[..._0x342ca1[_0x19ab1a(0x14a)](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)]['map'](_0x1d5b38=>_0x1d5b38[0x1]);if(_0x38333b[_0x19ab1a(0x149)]!==0x1||_0x38333b[0x0]!==_0x19ab1a(0x153))return![];const _0xbc7a43=[..._0x342ca1['matchAll'](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x19ab1a(0x156)](_0x394ec4=>_0x394ec4[0x1]);if(_0xbc7a43[_0x19ab1a(0x149)]!==0x2||!_0xbc7a43[_0x19ab1a(0x157)](_0x5b4a9e=>_0x5b4a9e[_0x19ab1a(0x150)](_0x19ab1a(0x14c)))||!_0xbc7a43[_0x19ab1a(0x157)](_0x34fca2=>_0x34fca2[_0x19ab1a(0x150)](_0x19ab1a(0x14d))))return![];const _0xb39019=[..._0x342ca1[_0x19ab1a(0x14a)](/^([A-Za-z_$][\w$]*)\s*\(/gm)][_0x19ab1a(0x156)](_0x3402d4=>_0x3402d4[0x1]);return _0xb39019[_0x19ab1a(0x149)]===0x1&&_0xb39019[0x0]===_0x19ab1a(0x154);}export function isLegacyGeneratedClientScaffold(_0x2ffa2b){const _0xb04625=a5_0x2dec;if(!_0x2ffa2b['includes'](_0xb04625(0x144)))return![];const _0x4c204b=stripComments(_0x2ffa2b),_0x4a0c61=[..._0x4c204b[_0xb04625(0x14a)](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)][_0xb04625(0x156)](_0x3c8ffa=>_0x3c8ffa[0x1]);if(_0x4a0c61[_0xb04625(0x157)](_0x6a8403=>_0x6a8403!==_0xb04625(0x153)&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/['test'](_0x6a8403??'')))return![];const _0x70f6a=[..._0x4c204b[_0xb04625(0x14a)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)]['map'](_0x1376d2=>_0x1376d2[0x1]);return _0x70f6a[_0xb04625(0x149)]===0x1&&_0x70f6a[0x0]===_0xb04625(0x15a);}function a5_0x317d(){const _0x121c96=['map','some','621MEbAcL','match','lovrabetClient','176GllulT','34852Rkqkmk','Generated\x20by\x20Rabetbase\x20CLI','replace','includes','623738mXreZJ','1aicsBl','length','matchAll','446830FXCmep','APP_CODE','MODELS_CONFIG','exec','848736SFkRSi','endsWith','1553710fBNMXd','2020207tMjmBa','@lovrabet/sdk','registerModels','3XHWEOu'];a5_0x317d=function(){return _0x121c96;};return a5_0x317d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x1c9924=a6_0x204c;(function(_0x340823,_0x5e77fb){const _0x1e3851=a6_0x204c,_0x3e72b7=_0x340823();while(!![]){try{const _0x54259c=-parseInt(_0x1e3851(0x12f))/0x1*(-parseInt(_0x1e3851(0x112))/0x2)+-parseInt(_0x1e3851(0x11a))/0x3+parseInt(_0x1e3851(0x10f))/0x4*(parseInt(_0x1e3851(0x108))/0x5)+parseInt(_0x1e3851(0x117))/0x6*(parseInt(_0x1e3851(0x109))/0x7)+-parseInt(_0x1e3851(0x134))/0x8*(parseInt(_0x1e3851(0x118))/0x9)+-parseInt(_0x1e3851(0x12c))/0xa+parseInt(_0x1e3851(0x10e))/0xb;if(_0x54259c===_0x5e77fb)break;else _0x3e72b7['push'](_0x3e72b7['shift']());}catch(_0x6c1c82){_0x3e72b7['push'](_0x3e72b7['shift']());}}}(a6_0x3b77,0x5de15));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x444cb9 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x1c9924(0x114);function a6_0x204c(_0x36ba92,_0x2a6c3c){_0x36ba92=_0x36ba92-0x101;const _0x3b77aa=a6_0x3b77();let _0x204c54=_0x3b77aa[_0x36ba92];return _0x204c54;}function a6_0x3b77(){const _0x114068=['models.generated.ts','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','isArray','20070hOWmQr','156042aIrRaI','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','1247304runEhH','datasetCodes','profileName','\x22\x20and\x20\x22','profiles','\x20model(s)\x20in\x20profile\x20\x22','Refusing\x20to\x20replace\x20','.tmp','string','Model\x20alias\x20\x22','name','map','length','slice','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','key','set','object','4556080SXQjDh','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','filter','40446MbFBZC','trim','datasetCode','appCode','value','344dDraVY','indexOf','Table\x20\x22','push','entries','runtimeDomain','get','find','protocol','replace','join','\x22\x20in\x20profile\x20\x22','alias','tableName','keys','/*\x20rabetbase-model-registry:v2\x20*/','test','now','models','\x22\x20maps\x20to\x20alias\x20\x22','3446110OvEoUf','1358gwTniX','parse','stringify','\x22\x20in\x20the\x20registry\x20but\x20\x22','split','622611rNcAzt','4jFDBQW','every','\x22\x20with\x20an\x20empty\x20result.\x20','30SaUiam','defaultProfile'];a6_0x3b77=function(){return _0x114068;};return a6_0x3b77();}export const MODEL_RUNTIME_FILE_NAME='model-runtime.ts';export const MODEL_REGISTRY_VERSION_MARKER=a6_0x1c9924(0x103);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL='lovrabet-model-registry/v2',REGISTRY_START='/*\x20rabetbase-model-registry:start\x20*/',REGISTRY_END='/*\x20rabetbase-model-registry:end\x20*/';function emptyRegistry(_0x1284f3){return{'defaultProfile':_0x1284f3,'profiles':{},'models':[]};}function extractRegistryJson(_0x1bfbab){const _0x36fb7e=a6_0x1c9924,_0x5325e1=_0x1bfbab['indexOf'](REGISTRY_START),_0x5aaa7b=_0x1bfbab[_0x36fb7e(0x135)](REGISTRY_END);if(_0x5325e1<0x0||_0x5aaa7b<=_0x5325e1)return undefined;return _0x1bfbab[_0x36fb7e(0x127)](_0x5325e1+REGISTRY_START[_0x36fb7e(0x126)],_0x5aaa7b)[_0x36fb7e(0x130)]()[_0x36fb7e(0x13d)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x36fb7e(0x13d)](/;$/,'');}function migrateLegacyRegistry(_0x3713e1){const _0x573332=a6_0x1c9924,_0x3f349c=emptyRegistry(_0x3713e1[_0x573332(0x113)]);for(const [_0x1efab1,_0x311b82]of Object[_0x573332(0x138)](_0x3713e1[_0x573332(0x11e)])){_0x3f349c[_0x573332(0x11e)][_0x1efab1]={'appCode':_0x311b82[_0x573332(0x132)],'runtimeDomain':_0x311b82[_0x573332(0x139)]},mergeProfileModels(_0x3f349c,_0x1efab1,_0x311b82['models']);}return _0x3f349c;}function generatedObjectLiteralToJson(_0x1f528f){const _0x5c6833=a6_0x1c9924;let _0x3d394d='',_0x9b1429,_0x475b43=![],_0x5a6a5e;for(let _0xa387b5=0x0;_0xa387b5<_0x1f528f[_0x5c6833(0x126)];_0xa387b5++){const _0x4728a0=_0x1f528f[_0xa387b5];if(_0x9b1429){_0x3d394d+=_0x4728a0;if(_0x475b43)_0x475b43=![];else{if(_0x4728a0==='\x5c')_0x475b43=!![];else{if(_0x4728a0===_0x9b1429)_0x9b1429=undefined;}}continue;}if(_0x4728a0==='\x22'){_0x9b1429=_0x4728a0,_0x3d394d+=_0x4728a0,_0x5a6a5e=_0x5c6833(0x133);continue;}if(_0x4728a0===','){let _0x514f38=_0xa387b5+0x1;while(/\s/['test'](_0x1f528f[_0x514f38]??''))_0x514f38++;if(_0x1f528f[_0x514f38]==='}'||_0x1f528f[_0x514f38]===']')continue;_0x3d394d+=_0x4728a0,_0x5a6a5e=',';continue;}if(_0x4728a0==='{'||_0x4728a0==='['){_0x3d394d+=_0x4728a0,_0x5a6a5e=_0x4728a0;continue;}if(_0x4728a0==='}'||_0x4728a0===']'){_0x3d394d+=_0x4728a0,_0x5a6a5e=_0x4728a0;continue;}if((_0x5a6a5e==='{'||_0x5a6a5e===',')&&/[A-Za-z_$]/[_0x5c6833(0x104)](_0x4728a0)){let _0xcb3f58=_0xa387b5+0x1;while(/[A-Za-z0-9_$]/[_0x5c6833(0x104)](_0x1f528f[_0xcb3f58]??''))_0xcb3f58++;let _0x3b3fc8=_0xcb3f58;while(/\s/[_0x5c6833(0x104)](_0x1f528f[_0x3b3fc8]??''))_0x3b3fc8++;if(_0x1f528f[_0x3b3fc8]===':'){_0x3d394d+=JSON[_0x5c6833(0x10b)](_0x1f528f[_0x5c6833(0x127)](_0xa387b5,_0xcb3f58)),_0xa387b5=_0xcb3f58-0x1,_0x5a6a5e=_0x5c6833(0x129);continue;}}_0x3d394d+=_0x4728a0;if(!/\s/['test'](_0x4728a0)&&_0x4728a0!==':')_0x5a6a5e=_0x5c6833(0x133);}return _0x3d394d;}function parseGeneratedRegistryJson(_0x2b994f){const _0x3c42d4=a6_0x1c9924;try{return JSON[_0x3c42d4(0x10a)](_0x2b994f);}catch{return JSON[_0x3c42d4(0x10a)](generatedObjectLiteralToJson(_0x2b994f));}}function normalizeModelEntries(_0x5e3fd2,_0x27d77f){const _0x3ab6bb=a6_0x1c9924,_0x516bcb=Object[_0x3ab6bb(0x102)](_0x5e3fd2),_0x541a71=[];for(const _0xd38fef of _0x27d77f){if(!_0xd38fef||typeof _0xd38fef!=='object'||Array[_0x3ab6bb(0x116)](_0xd38fef))return undefined;const _0x224983=_0xd38fef;if(typeof _0x224983[_0x3ab6bb(0x140)]!==_0x3ab6bb(0x122)||typeof _0x224983[_0x3ab6bb(0x101)]!==_0x3ab6bb(0x122)||typeof _0x224983[_0x3ab6bb(0x124)]!==_0x3ab6bb(0x122))return undefined;let _0x2d6016;if(typeof _0x224983[_0x3ab6bb(0x131)]===_0x3ab6bb(0x122)&&_0x224983['datasetCodes']===undefined)_0x2d6016=Object['fromEntries'](_0x516bcb[_0x3ab6bb(0x125)](_0x5a97b7=>[_0x5a97b7,_0x224983['datasetCode']]));else{if(_0x224983[_0x3ab6bb(0x131)]===undefined&&_0x224983[_0x3ab6bb(0x11b)]&&typeof _0x224983[_0x3ab6bb(0x11b)]==='object'&&!Array['isArray'](_0x224983[_0x3ab6bb(0x11b)])&&Object['values'](_0x224983['datasetCodes'])['every'](_0x48a360=>typeof _0x48a360===_0x3ab6bb(0x122)))_0x2d6016={..._0x224983[_0x3ab6bb(0x11b)]};else return undefined;}_0x541a71[_0x3ab6bb(0x137)]({'alias':_0x224983[_0x3ab6bb(0x140)],'tableName':_0x224983[_0x3ab6bb(0x101)],'name':_0x224983[_0x3ab6bb(0x124)],'datasetCodes':_0x2d6016});}return _0x541a71;}export function parseModelRegistry(_0x4314d9){const _0x43f6d4=a6_0x1c9924,_0x36f8f7=extractRegistryJson(_0x4314d9);if(!_0x36f8f7)return undefined;try{const _0x10afd1=parseGeneratedRegistryJson(_0x36f8f7);if(typeof _0x10afd1[_0x43f6d4(0x113)]!==_0x43f6d4(0x122)||!_0x10afd1[_0x43f6d4(0x11e)]||typeof _0x10afd1[_0x43f6d4(0x11e)]!==_0x43f6d4(0x12b))return undefined;if(_0x10afd1[_0x43f6d4(0x13c)]==='lovrabet-model-registry/v1')return migrateLegacyRegistry(_0x10afd1);if(!(_0x10afd1[_0x43f6d4(0x13c)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x10afd1['protocol']===undefined&&_0x4314d9['includes'](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x43f6d4(0x116)](_0x10afd1[_0x43f6d4(0x106)]))return undefined;const _0x544e25=_0x10afd1[_0x43f6d4(0x11e)],_0x5dbfc3=normalizeModelEntries(_0x544e25,_0x10afd1[_0x43f6d4(0x106)]);if(!_0x5dbfc3)return undefined;return{'defaultProfile':_0x10afd1[_0x43f6d4(0x113)],'profiles':_0x544e25,'models':_0x5dbfc3};}catch{return undefined;}}export function readModelRegistry(_0x21e460){if(!existsSync(_0x21e460))return undefined;try{return parseModelRegistry(readFileSync(_0x21e460,'utf8'));}catch{return undefined;}}function registrySource(_0x598f6e){const _0x4310b7=a6_0x1c9924,_0x445376=Object[_0x4310b7(0x102)](_0x598f6e['profiles']),_0x3ab4f3=_0x598f6e[_0x4310b7(0x106)][_0x4310b7(0x125)](_0x203852=>{const _0x51149d=_0x4310b7,_0x2b3207=_0x445376['map'](_0x30c800=>_0x203852['datasetCodes'][_0x30c800]),_0x16b65f=_0x2b3207[0x0],_0x3e595f=_0x16b65f!==undefined&&_0x2b3207[_0x51149d(0x110)](_0x10bed8=>_0x10bed8===_0x16b65f),_0x3bf6c9={'alias':_0x203852[_0x51149d(0x140)],'tableName':_0x203852[_0x51149d(0x101)],'name':_0x203852['name']};return _0x3e595f?{..._0x3bf6c9,'datasetCode':_0x16b65f}:{..._0x3bf6c9,'datasetCodes':_0x203852[_0x51149d(0x11b)]};}),_0x29a101=JSON[_0x4310b7(0x10b)]({'defaultProfile':_0x598f6e['defaultProfile'],'profiles':_0x598f6e['profiles'],'models':_0x3ab4f3},null,0x2)[_0x4310b7(0x10d)]('\x0a')['map'](_0x3f1919=>'\x20\x20'+_0x3f1919)[_0x4310b7(0x13e)]('\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+_0x4310b7(0x12d)+REGISTRY_START+'\x0a'+_0x29a101+_0x4310b7(0x119)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x862fe5,_0x13faa2,_0x263c32){const _0x47d098=a6_0x1c9924,_0x25e117=_0x263c32[_0x47d098(0x125)](_0x57cb67=>({..._0x57cb67,'alias':_0x57cb67[_0x47d098(0x140)]||_0x57cb67[_0x47d098(0x101)]})),_0xc4b4c6=new Map(),_0x516230=new Map();for(const _0x3ff684 of _0x25e117){const _0x12b232=_0xc4b4c6[_0x47d098(0x13a)](_0x3ff684[_0x47d098(0x140)]);if(_0x12b232&&_0x12b232!==_0x3ff684[_0x47d098(0x101)])throw new Error(_0x47d098(0x123)+_0x3ff684[_0x47d098(0x140)]+'\x22\x20maps\x20to\x20both\x20\x22'+_0x12b232+_0x47d098(0x11d)+_0x3ff684[_0x47d098(0x101)]+'\x22\x20in\x20profile\x20\x22'+_0x13faa2+'\x22.');const _0x12d4d2=_0x516230[_0x47d098(0x13a)](_0x3ff684['tableName']);if(_0x12d4d2&&_0x12d4d2!==_0x3ff684['alias'])throw new Error(_0x47d098(0x136)+_0x3ff684['tableName']+_0x47d098(0x128)+_0x12d4d2+'\x22\x20and\x20\x22'+_0x3ff684[_0x47d098(0x140)]+_0x47d098(0x13f)+_0x13faa2+'\x22.');_0xc4b4c6[_0x47d098(0x12a)](_0x3ff684[_0x47d098(0x140)],_0x3ff684[_0x47d098(0x101)]),_0x516230['set'](_0x3ff684[_0x47d098(0x101)],_0x3ff684[_0x47d098(0x140)]);const _0x49f22f=_0x862fe5[_0x47d098(0x106)][_0x47d098(0x13b)](_0x10bbf1=>_0x10bbf1[_0x47d098(0x140)]===_0x3ff684['alias']);if(_0x49f22f&&_0x49f22f[_0x47d098(0x101)]!==_0x3ff684[_0x47d098(0x101)])throw new Error('Model\x20alias\x20\x22'+_0x3ff684[_0x47d098(0x140)]+'\x22\x20maps\x20to\x20table\x20\x22'+_0x49f22f[_0x47d098(0x101)]+_0x47d098(0x10c)+_0x3ff684['tableName']+_0x47d098(0x13f)+_0x13faa2+'\x22.');const _0x66ae1f=_0x862fe5[_0x47d098(0x106)][_0x47d098(0x13b)](_0x354779=>_0x354779[_0x47d098(0x101)]===_0x3ff684['tableName']);if(_0x66ae1f&&_0x66ae1f[_0x47d098(0x140)]!==_0x3ff684[_0x47d098(0x140)])throw new Error('Table\x20\x22'+_0x3ff684[_0x47d098(0x101)]+_0x47d098(0x107)+_0x66ae1f[_0x47d098(0x140)]+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x3ff684[_0x47d098(0x140)]+_0x47d098(0x13f)+_0x13faa2+'\x22.');}for(const _0x4c6ed8 of _0x862fe5[_0x47d098(0x106)]){delete _0x4c6ed8[_0x47d098(0x11b)][_0x13faa2];}for(const _0x201367 of _0x25e117){let _0x27df5e=_0x862fe5[_0x47d098(0x106)]['find'](_0x12749c=>_0x12749c[_0x47d098(0x140)]===_0x201367['alias']);!_0x27df5e&&(_0x27df5e={'alias':_0x201367['alias'],'tableName':_0x201367[_0x47d098(0x101)],'name':_0x201367[_0x47d098(0x124)],'datasetCodes':{}},_0x862fe5['models'][_0x47d098(0x137)](_0x27df5e)),(_0x13faa2===_0x862fe5[_0x47d098(0x113)]||!_0x27df5e[_0x47d098(0x11b)][_0x862fe5[_0x47d098(0x113)]])&&(_0x27df5e['alias']=_0x201367[_0x47d098(0x140)],_0x27df5e[_0x47d098(0x101)]=_0x201367[_0x47d098(0x101)],_0x27df5e['name']=_0x201367[_0x47d098(0x124)]),_0x27df5e[_0x47d098(0x11b)][_0x13faa2]=_0x201367[_0x47d098(0x131)];}_0x862fe5['models']=_0x862fe5[_0x47d098(0x106)][_0x47d098(0x12e)](_0x31ea20=>Object['keys'](_0x31ea20[_0x47d098(0x11b)])['length']>0x0);}function removeUnboundProfiles(_0x2e4c8a){const _0x1b8a7a=a6_0x1c9924,_0x5c2acf=Object['entries'](_0x2e4c8a[_0x1b8a7a(0x11e)])[_0x1b8a7a(0x12e)](([,_0x5e770e])=>_0x5e770e[_0x1b8a7a(0x132)]==='NOT-SET')[_0x1b8a7a(0x125)](([_0x408dfc])=>_0x408dfc);if(_0x5c2acf['length']===0x0)return;for(const _0xc3f4 of _0x5c2acf){delete _0x2e4c8a['profiles'][_0xc3f4];for(const _0x97df8a of _0x2e4c8a['models']){delete _0x97df8a[_0x1b8a7a(0x11b)][_0xc3f4];}}_0x2e4c8a[_0x1b8a7a(0x106)]=_0x2e4c8a[_0x1b8a7a(0x106)][_0x1b8a7a(0x12e)](_0x253af5=>Object[_0x1b8a7a(0x102)](_0x253af5[_0x1b8a7a(0x11b)])[_0x1b8a7a(0x126)]>0x0);}export function getProfileModels(_0x400c0f,_0x2ef35c){const _0x9d1d3f=a6_0x1c9924;return _0x400c0f[_0x9d1d3f(0x106)]['flatMap'](_0x24206a=>{const _0x109f96=_0x9d1d3f,_0x21935c=_0x24206a['datasetCodes'][_0x2ef35c];return _0x21935c?[{'datasetCode':_0x21935c,'tableName':_0x24206a[_0x109f96(0x101)],'name':_0x24206a[_0x109f96(0x124)],'alias':_0x24206a['alias']}]:[];});}export function updateModelRegistry(_0x23d2d1){const _0x18cb35=a6_0x1c9924,_0x334bed=a6_0x444cb9[_0x18cb35(0x13e)](_0x23d2d1['outputDir'],MODEL_REGISTRY_FILE_NAME),_0x206b4d=existsSync(_0x334bed),_0x3433e9=readModelRegistry(_0x334bed);if(_0x206b4d&&!_0x3433e9)throw new Error(MODEL_REGISTRY_FILE_NAME+'\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.');const _0x484d2b=_0x3433e9??emptyRegistry(_0x23d2d1[_0x18cb35(0x113)]);if(_0x23d2d1['appCode']!=='NOT-SET')removeUnboundProfiles(_0x484d2b);const _0x49ea56=_0x3433e9?getProfileModels(_0x3433e9,_0x23d2d1[_0x18cb35(0x11c)])[_0x18cb35(0x126)]:0x0;if(_0x49ea56>0x0&&_0x23d2d1['models'][_0x18cb35(0x126)]===0x0&&!_0x23d2d1['allowEmptyReplacement'])throw new Error(_0x18cb35(0x120)+_0x49ea56+_0x18cb35(0x11f)+_0x23d2d1['profileName']+_0x18cb35(0x111)+_0x18cb35(0x115));_0x484d2b['defaultProfile']=_0x23d2d1[_0x18cb35(0x113)],_0x484d2b[_0x18cb35(0x11e)][_0x23d2d1[_0x18cb35(0x11c)]]={'appCode':_0x23d2d1[_0x18cb35(0x132)],'runtimeDomain':_0x23d2d1['runtimeDomain']},mergeProfileModels(_0x484d2b,_0x23d2d1[_0x18cb35(0x11c)],_0x23d2d1[_0x18cb35(0x106)]),mkdirSync(_0x23d2d1['outputDir'],{'recursive':!![]});const _0x2b65a4=_0x334bed+'.'+process['pid']+'.'+Date[_0x18cb35(0x105)]()+_0x18cb35(0x121);try{writeFileSync(_0x2b65a4,registrySource(_0x484d2b),{'encoding':'utf8','mode':0x1a4}),renameSync(_0x2b65a4,_0x334bed);}catch(_0x2355e4){try{unlinkSync(_0x2b65a4);}catch{}throw _0x2355e4;}return{'path':_0x334bed,'registry':_0x484d2b,'existed':_0x206b4d};}
|
|
1
|
+
const a6_0x18e8d4=a6_0xf595;(function(_0xd74635,_0x2ac25a){const _0x5e967c=a6_0xf595,_0x3a1309=_0xd74635();while(!![]){try{const _0x454006=-parseInt(_0x5e967c(0xe0))/0x1+-parseInt(_0x5e967c(0xe6))/0x2+-parseInt(_0x5e967c(0xc0))/0x3*(parseInt(_0x5e967c(0xcf))/0x4)+-parseInt(_0x5e967c(0xa4))/0x5+-parseInt(_0x5e967c(0xb9))/0x6+-parseInt(_0x5e967c(0xa5))/0x7+-parseInt(_0x5e967c(0xa2))/0x8*(-parseInt(_0x5e967c(0xd0))/0x9);if(_0x454006===_0x2ac25a)break;else _0x3a1309['push'](_0x3a1309['shift']());}catch(_0x52f164){_0x3a1309['push'](_0x3a1309['shift']());}}}(a6_0x3191,0x9af79));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x47c053 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x18e8d4(0xe4);export const MODEL_RUNTIME_FILE_NAME=a6_0x18e8d4(0xd4);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x18e8d4(0xc3);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x18e8d4(0xaa),REGISTRY_START=a6_0x18e8d4(0xdc),REGISTRY_END=a6_0x18e8d4(0xc6);function emptyRegistry(_0x4a321f){return{'defaultProfile':_0x4a321f,'profiles':{},'models':[]};}function extractRegistryJson(_0x50edf5){const _0x46827b=a6_0x18e8d4,_0x13fa80=_0x50edf5[_0x46827b(0xb2)](REGISTRY_START),_0x19ce56=_0x50edf5[_0x46827b(0xb2)](REGISTRY_END);if(_0x13fa80<0x0||_0x19ce56<=_0x13fa80)return undefined;return _0x50edf5[_0x46827b(0xda)](_0x13fa80+REGISTRY_START[_0x46827b(0xc1)],_0x19ce56)[_0x46827b(0xb3)]()['replace'](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x46827b(0xae)](/;$/,'');}function a6_0xf595(_0x1be60a,_0x1f4419){_0x1be60a=_0x1be60a-0x9f;const _0x3191bd=a6_0x3191();let _0xf595a8=_0x3191bd[_0x1be60a];return _0xf595a8;}function migrateLegacyRegistry(_0x13b4e9){const _0x3d8105=a6_0x18e8d4,_0x4ba122=emptyRegistry(_0x13b4e9[_0x3d8105(0xdd)]);for(const [_0x4ced9e,_0x5d5631]of Object[_0x3d8105(0xb6)](_0x13b4e9['profiles'])){_0x4ba122[_0x3d8105(0xab)][_0x4ced9e]={'appCode':_0x5d5631[_0x3d8105(0xa7)],'runtimeDomain':_0x5d5631['runtimeDomain']},mergeProfileModels(_0x4ba122,_0x4ced9e,_0x5d5631['models']);}return _0x4ba122;}function generatedObjectLiteralToJson(_0x4b39dd){const _0x5451ea=a6_0x18e8d4;let _0x18c1ff='',_0x2c7eb9,_0x375b85=![],_0x1f7077;for(let _0x49662a=0x0;_0x49662a<_0x4b39dd[_0x5451ea(0xc1)];_0x49662a++){const _0x34b289=_0x4b39dd[_0x49662a];if(_0x2c7eb9){_0x18c1ff+=_0x34b289;if(_0x375b85)_0x375b85=![];else{if(_0x34b289==='\x5c')_0x375b85=!![];else{if(_0x34b289===_0x2c7eb9)_0x2c7eb9=undefined;}}continue;}if(_0x34b289==='\x22'){_0x2c7eb9=_0x34b289,_0x18c1ff+=_0x34b289,_0x1f7077=_0x5451ea(0xa6);continue;}if(_0x34b289===','){let _0x574b2d=_0x49662a+0x1;while(/\s/[_0x5451ea(0xc9)](_0x4b39dd[_0x574b2d]??''))_0x574b2d++;if(_0x4b39dd[_0x574b2d]==='}'||_0x4b39dd[_0x574b2d]===']')continue;_0x18c1ff+=_0x34b289,_0x1f7077=',';continue;}if(_0x34b289==='{'||_0x34b289==='['){_0x18c1ff+=_0x34b289,_0x1f7077=_0x34b289;continue;}if(_0x34b289==='}'||_0x34b289===']'){_0x18c1ff+=_0x34b289,_0x1f7077=_0x34b289;continue;}if((_0x1f7077==='{'||_0x1f7077===',')&&/[A-Za-z_$]/[_0x5451ea(0xc9)](_0x34b289)){let _0x15ba0d=_0x49662a+0x1;while(/[A-Za-z0-9_$]/['test'](_0x4b39dd[_0x15ba0d]??''))_0x15ba0d++;let _0x5e3e2d=_0x15ba0d;while(/\s/[_0x5451ea(0xc9)](_0x4b39dd[_0x5e3e2d]??''))_0x5e3e2d++;if(_0x4b39dd[_0x5e3e2d]===':'){_0x18c1ff+=JSON[_0x5451ea(0xd9)](_0x4b39dd[_0x5451ea(0xda)](_0x49662a,_0x15ba0d)),_0x49662a=_0x15ba0d-0x1,_0x1f7077=_0x5451ea(0xe1);continue;}}_0x18c1ff+=_0x34b289;if(!/\s/[_0x5451ea(0xc9)](_0x34b289)&&_0x34b289!==':')_0x1f7077=_0x5451ea(0xa6);}return _0x18c1ff;}function parseGeneratedRegistryJson(_0x2643e8){const _0x4d102e=a6_0x18e8d4;try{return JSON[_0x4d102e(0xa0)](_0x2643e8);}catch{return JSON['parse'](generatedObjectLiteralToJson(_0x2643e8));}}function normalizeModelEntries(_0x4ad0f4,_0x468a2e){const _0x5ac7fd=a6_0x18e8d4,_0x23db29=Object['keys'](_0x4ad0f4),_0x291e25=[];for(const _0x4076d9 of _0x468a2e){if(!_0x4076d9||typeof _0x4076d9!==_0x5ac7fd(0xd5)||Array[_0x5ac7fd(0xbb)](_0x4076d9))return undefined;const _0x2fbca3=_0x4076d9;if(typeof _0x2fbca3[_0x5ac7fd(0xe5)]!==_0x5ac7fd(0xb5)||typeof _0x2fbca3[_0x5ac7fd(0xc5)]!==_0x5ac7fd(0xb5)||typeof _0x2fbca3[_0x5ac7fd(0xd8)]!==_0x5ac7fd(0xb5))return undefined;let _0x279867;if(typeof _0x2fbca3['datasetCode']===_0x5ac7fd(0xb5)&&_0x2fbca3['datasetCodes']===undefined)_0x279867=Object[_0x5ac7fd(0xc7)](_0x23db29[_0x5ac7fd(0xb7)](_0x5cf9a9=>[_0x5cf9a9,_0x2fbca3['datasetCode']]));else{if(_0x2fbca3[_0x5ac7fd(0xc4)]===undefined&&_0x2fbca3[_0x5ac7fd(0x9f)]&&typeof _0x2fbca3[_0x5ac7fd(0x9f)]==='object'&&!Array['isArray'](_0x2fbca3[_0x5ac7fd(0x9f)])&&Object[_0x5ac7fd(0xad)](_0x2fbca3[_0x5ac7fd(0x9f)])[_0x5ac7fd(0xd7)](_0x36c8eb=>typeof _0x36c8eb==='string'))_0x279867={..._0x2fbca3['datasetCodes']};else return undefined;}_0x291e25[_0x5ac7fd(0xbf)]({'alias':_0x2fbca3[_0x5ac7fd(0xe5)],'tableName':_0x2fbca3['tableName'],'name':_0x2fbca3['name'],'datasetCodes':_0x279867});}return _0x291e25;}export function parseModelRegistry(_0x127c3b){const _0x19a5ca=a6_0x18e8d4,_0x276c3a=extractRegistryJson(_0x127c3b);if(!_0x276c3a)return undefined;try{const _0x3e2cb1=parseGeneratedRegistryJson(_0x276c3a);if(typeof _0x3e2cb1[_0x19a5ca(0xdd)]!=='string'||!_0x3e2cb1[_0x19a5ca(0xab)]||typeof _0x3e2cb1[_0x19a5ca(0xab)]!==_0x19a5ca(0xd5))return undefined;if(_0x3e2cb1['protocol']===_0x19a5ca(0xb1))return migrateLegacyRegistry(_0x3e2cb1);if(!(_0x3e2cb1['protocol']===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x3e2cb1['protocol']===undefined&&_0x127c3b['includes'](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x19a5ca(0xbb)](_0x3e2cb1[_0x19a5ca(0xa1)]))return undefined;const _0x10b070=_0x3e2cb1['profiles'],_0x1ceb2c=normalizeModelEntries(_0x10b070,_0x3e2cb1[_0x19a5ca(0xa1)]);if(!_0x1ceb2c)return undefined;return{'defaultProfile':_0x3e2cb1[_0x19a5ca(0xdd)],'profiles':_0x10b070,'models':_0x1ceb2c};}catch{return undefined;}}export function readModelRegistry(_0x2fee36){const _0x713fe2=a6_0x18e8d4;if(!existsSync(_0x2fee36))return undefined;try{return parseModelRegistry(readFileSync(_0x2fee36,_0x713fe2(0xc2)));}catch{return undefined;}}function a6_0x3191(){const _0x5d9225=['join','lovrabet-model-registry/v1','indexOf','trim','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','string','entries','map','find','1340130XJAefN','\x22\x20in\x20the\x20registry\x20but\x20\x22','isArray','get','.tmp','outputDir','push','129FpgBlr','length','utf8','/*\x20rabetbase-model-registry:v2\x20*/','datasetCode','tableName','/*\x20rabetbase-model-registry:end\x20*/','fromEntries','set','test','Refusing\x20to\x20replace\x20','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','pid','\x22\x20maps\x20to\x20alias\x20\x22','\x20model(s)\x20in\x20profile\x20\x22','35260cJNFai','4023pmINcW','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','profileName','\x22\x20in\x20profile\x20\x22','model-runtime.ts','object','\x22\x20maps\x20to\x20both\x20\x22','every','name','stringify','slice','keys','/*\x20rabetbase-model-registry:start\x20*/','defaultProfile','\x22\x20maps\x20to\x20table\x20\x22','Table\x20\x22','647265YZkfhE','key','/**\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','filter','models.generated.ts','alias','1721100wboULW','datasetCodes','parse','models','79096qrLUEQ','\x22\x20and\x20\x22','3383335KUnWuf','6985034SvFLUy','value','appCode','Model\x20alias\x20\x22','NOT-SET','lovrabet-model-registry/v2','profiles','flatMap','values','replace','runtimeDomain'];a6_0x3191=function(){return _0x5d9225;};return a6_0x3191();}function registrySource(_0x4363d2){const _0x547967=a6_0x18e8d4,_0x334b29=Object[_0x547967(0xdb)](_0x4363d2['profiles']),_0x3b570e=_0x4363d2['models'][_0x547967(0xb7)](_0x46bf67=>{const _0x2bffd5=_0x547967,_0x599738=_0x334b29[_0x2bffd5(0xb7)](_0x20e50d=>_0x46bf67[_0x2bffd5(0x9f)][_0x20e50d]),_0x553334=_0x599738[0x0],_0x33561c=_0x553334!==undefined&&_0x599738[_0x2bffd5(0xd7)](_0x1f2a27=>_0x1f2a27===_0x553334),_0x5e26fa={'alias':_0x46bf67['alias'],'tableName':_0x46bf67[_0x2bffd5(0xc5)],'name':_0x46bf67['name']};return _0x33561c?{..._0x5e26fa,'datasetCode':_0x553334}:{..._0x5e26fa,'datasetCodes':_0x46bf67[_0x2bffd5(0x9f)]};}),_0x111e34=JSON['stringify']({'defaultProfile':_0x4363d2[_0x547967(0xdd)],'profiles':_0x4363d2[_0x547967(0xab)],'models':_0x3b570e},null,0x2)['split']('\x0a')[_0x547967(0xb7)](_0x2c06fd=>'\x20\x20'+_0x2c06fd)[_0x547967(0xb0)]('\x0a');return _0x547967(0xe2)+MODEL_REGISTRY_VERSION_MARKER+_0x547967(0xb4)+REGISTRY_START+'\x0a'+_0x111e34+'\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a'+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x4d5b74,_0x504c1f,_0xcea338){const _0x33a5f1=a6_0x18e8d4,_0x5e3636=_0xcea338[_0x33a5f1(0xb7)](_0x225b6f=>({..._0x225b6f,'alias':_0x225b6f[_0x33a5f1(0xe5)]||_0x225b6f[_0x33a5f1(0xc5)]})),_0x18e94a=new Map(),_0x402486=new Map();for(const _0x23fd0a of _0x5e3636){const _0x4ed13f=_0x18e94a[_0x33a5f1(0xbc)](_0x23fd0a[_0x33a5f1(0xe5)]);if(_0x4ed13f&&_0x4ed13f!==_0x23fd0a['tableName'])throw new Error('Model\x20alias\x20\x22'+_0x23fd0a[_0x33a5f1(0xe5)]+_0x33a5f1(0xd6)+_0x4ed13f+_0x33a5f1(0xa3)+_0x23fd0a[_0x33a5f1(0xc5)]+_0x33a5f1(0xd3)+_0x504c1f+'\x22.');const _0x3f5625=_0x402486[_0x33a5f1(0xbc)](_0x23fd0a[_0x33a5f1(0xc5)]);if(_0x3f5625&&_0x3f5625!==_0x23fd0a[_0x33a5f1(0xe5)])throw new Error(_0x33a5f1(0xdf)+_0x23fd0a[_0x33a5f1(0xc5)]+_0x33a5f1(0xcb)+_0x3f5625+'\x22\x20and\x20\x22'+_0x23fd0a['alias']+_0x33a5f1(0xd3)+_0x504c1f+'\x22.');_0x18e94a[_0x33a5f1(0xc8)](_0x23fd0a['alias'],_0x23fd0a[_0x33a5f1(0xc5)]),_0x402486[_0x33a5f1(0xc8)](_0x23fd0a[_0x33a5f1(0xc5)],_0x23fd0a['alias']);const _0x2a4a43=_0x4d5b74[_0x33a5f1(0xa1)][_0x33a5f1(0xb8)](_0xca3481=>_0xca3481[_0x33a5f1(0xe5)]===_0x23fd0a[_0x33a5f1(0xe5)]);if(_0x2a4a43&&_0x2a4a43[_0x33a5f1(0xc5)]!==_0x23fd0a[_0x33a5f1(0xc5)])throw new Error(_0x33a5f1(0xa8)+_0x23fd0a[_0x33a5f1(0xe5)]+_0x33a5f1(0xde)+_0x2a4a43[_0x33a5f1(0xc5)]+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x23fd0a[_0x33a5f1(0xc5)]+_0x33a5f1(0xd3)+_0x504c1f+'\x22.');const _0x47cb2e=_0x4d5b74[_0x33a5f1(0xa1)][_0x33a5f1(0xb8)](_0xbb1605=>_0xbb1605[_0x33a5f1(0xc5)]===_0x23fd0a[_0x33a5f1(0xc5)]);if(_0x47cb2e&&_0x47cb2e[_0x33a5f1(0xe5)]!==_0x23fd0a['alias'])throw new Error('Table\x20\x22'+_0x23fd0a['tableName']+_0x33a5f1(0xcd)+_0x47cb2e[_0x33a5f1(0xe5)]+_0x33a5f1(0xba)+_0x23fd0a[_0x33a5f1(0xe5)]+_0x33a5f1(0xd3)+_0x504c1f+'\x22.');}for(const _0x155e62 of _0x4d5b74[_0x33a5f1(0xa1)]){delete _0x155e62['datasetCodes'][_0x504c1f];}for(const _0x2f5588 of _0x5e3636){let _0x5e83ec=_0x4d5b74[_0x33a5f1(0xa1)][_0x33a5f1(0xb8)](_0x425daa=>_0x425daa['alias']===_0x2f5588[_0x33a5f1(0xe5)]);!_0x5e83ec&&(_0x5e83ec={'alias':_0x2f5588[_0x33a5f1(0xe5)],'tableName':_0x2f5588['tableName'],'name':_0x2f5588[_0x33a5f1(0xd8)],'datasetCodes':{}},_0x4d5b74[_0x33a5f1(0xa1)]['push'](_0x5e83ec)),(_0x504c1f===_0x4d5b74[_0x33a5f1(0xdd)]||!_0x5e83ec['datasetCodes'][_0x4d5b74['defaultProfile']])&&(_0x5e83ec[_0x33a5f1(0xe5)]=_0x2f5588[_0x33a5f1(0xe5)],_0x5e83ec[_0x33a5f1(0xc5)]=_0x2f5588[_0x33a5f1(0xc5)],_0x5e83ec[_0x33a5f1(0xd8)]=_0x2f5588[_0x33a5f1(0xd8)]),_0x5e83ec[_0x33a5f1(0x9f)][_0x504c1f]=_0x2f5588[_0x33a5f1(0xc4)];}_0x4d5b74[_0x33a5f1(0xa1)]=_0x4d5b74[_0x33a5f1(0xa1)][_0x33a5f1(0xe3)](_0x11fc53=>Object[_0x33a5f1(0xdb)](_0x11fc53[_0x33a5f1(0x9f)])[_0x33a5f1(0xc1)]>0x0);}function removeUnboundProfiles(_0x506ba7){const _0x39e658=a6_0x18e8d4,_0x1a7f42=Object[_0x39e658(0xb6)](_0x506ba7['profiles'])['filter'](([,_0x365340])=>_0x365340[_0x39e658(0xa7)]===_0x39e658(0xa9))[_0x39e658(0xb7)](([_0x1c15d2])=>_0x1c15d2);if(_0x1a7f42[_0x39e658(0xc1)]===0x0)return;for(const _0x35bd42 of _0x1a7f42){delete _0x506ba7['profiles'][_0x35bd42];for(const _0x14ec8c of _0x506ba7[_0x39e658(0xa1)]){delete _0x14ec8c[_0x39e658(0x9f)][_0x35bd42];}}_0x506ba7['models']=_0x506ba7[_0x39e658(0xa1)]['filter'](_0x1f41b6=>Object[_0x39e658(0xdb)](_0x1f41b6[_0x39e658(0x9f)])[_0x39e658(0xc1)]>0x0);}export function getProfileModels(_0x59924f,_0x4ae63f){const _0x3c0ed7=a6_0x18e8d4;return _0x59924f[_0x3c0ed7(0xa1)][_0x3c0ed7(0xac)](_0x19ae45=>{const _0x432b7c=_0x3c0ed7,_0x3acd1a=_0x19ae45[_0x432b7c(0x9f)][_0x4ae63f];return _0x3acd1a?[{'datasetCode':_0x3acd1a,'tableName':_0x19ae45[_0x432b7c(0xc5)],'name':_0x19ae45[_0x432b7c(0xd8)],'alias':_0x19ae45[_0x432b7c(0xe5)]}]:[];});}export function updateModelRegistry(_0x5d30db){const _0x3cc11a=a6_0x18e8d4,_0x15ae31=a6_0x47c053[_0x3cc11a(0xb0)](_0x5d30db['outputDir'],MODEL_REGISTRY_FILE_NAME),_0x5a1d64=existsSync(_0x15ae31),_0x16f0fe=readModelRegistry(_0x15ae31);if(_0x5a1d64&&!_0x16f0fe)throw new Error(MODEL_REGISTRY_FILE_NAME+'\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.');const _0x3fbad9=_0x16f0fe??emptyRegistry(_0x5d30db[_0x3cc11a(0xdd)]);if(_0x5d30db['appCode']!==_0x3cc11a(0xa9))removeUnboundProfiles(_0x3fbad9);const _0x420db8=_0x16f0fe?getProfileModels(_0x16f0fe,_0x5d30db[_0x3cc11a(0xd2)])['length']:0x0;if(_0x420db8>0x0&&_0x5d30db['models'][_0x3cc11a(0xc1)]===0x0&&!_0x5d30db['allowEmptyReplacement'])throw new Error(_0x3cc11a(0xca)+_0x420db8+_0x3cc11a(0xce)+_0x5d30db[_0x3cc11a(0xd2)]+'\x22\x20with\x20an\x20empty\x20result.\x20'+_0x3cc11a(0xd1));_0x3fbad9['defaultProfile']=_0x5d30db['defaultProfile'],_0x3fbad9[_0x3cc11a(0xab)][_0x5d30db[_0x3cc11a(0xd2)]]={'appCode':_0x5d30db['appCode'],'runtimeDomain':_0x5d30db[_0x3cc11a(0xaf)]},mergeProfileModels(_0x3fbad9,_0x5d30db[_0x3cc11a(0xd2)],_0x5d30db[_0x3cc11a(0xa1)]),mkdirSync(_0x5d30db[_0x3cc11a(0xbe)],{'recursive':!![]});const _0x2f2237=_0x15ae31+'.'+process[_0x3cc11a(0xcc)]+'.'+Date['now']()+_0x3cc11a(0xbd);try{writeFileSync(_0x2f2237,registrySource(_0x3fbad9),{'encoding':_0x3cc11a(0xc2),'mode':0x1a4}),renameSync(_0x2f2237,_0x15ae31);}catch(_0x32f431){try{unlinkSync(_0x2f2237);}catch{}throw _0x32f431;}return{'path':_0x15ae31,'registry':_0x3fbad9,'existed':_0x5a1d64};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a7_0x5c9c9a=a7_0x56c5;(function(_0x251ac6,_0x2d4b47){const _0x5231c3=a7_0x56c5,_0x54a5b1=_0x251ac6();while(!![]){try{const _0x2c99f3=-parseInt(_0x5231c3(0x18f))/0x1+parseInt(_0x5231c3(0x197))/0x2+parseInt(_0x5231c3(0x190))/0x3+-parseInt(_0x5231c3(0x19a))/0x4*(-parseInt(_0x5231c3(0x194))/0x5)+-parseInt(_0x5231c3(0x195))/0x6+-parseInt(_0x5231c3(0x191))/0x7+parseInt(_0x5231c3(0x1a0))/0x8;if(_0x2c99f3===_0x2d4b47)break;else _0x54a5b1['push'](_0x54a5b1['shift']());}catch(_0x30181f){_0x54a5b1['push'](_0x54a5b1['shift']());}}}(a7_0x5478,0x79c00));import{readFileSync}from'node:fs';import a7_0x5433a3 from'node:path';import{fileURLToPath}from'node:url';function a7_0x5478(){const _0x326c21=['utf8','4235030NBTxVr','4453800TJnGCV','format','1356888HGKZYh','all','startsWith','4XXVPOZ','profile-client.ts.tpl','cwd','join','relative','typescript','4222792QNQZkR','{ProjectRoutingImport}','replace','resolve','dirname','754425ImokWN','2025123sqzyNS','5130489AulHOQ','../../templates/generate-api'];a7_0x5478=function(){return _0x326c21;};return a7_0x5478();}import a7_0x90816c from'prettier';function a7_0x56c5(_0xf8c191,_0x49eaeb){_0xf8c191=_0xf8c191-0x18b;const _0x547829=a7_0x5478();let _0x56c5ee=_0x547829[_0xf8c191];return _0x56c5ee;}import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function relativeImport(_0xb35f81,_0x2d8f7e){const _0x123670=a7_0x56c5;let _0x18fb41=a7_0x5433a3[_0x123670(0x19e)](_0xb35f81,_0x2d8f7e)[_0x123670(0x18c)](/\\/g,'/');if(!_0x18fb41[_0x123670(0x199)]('.'))_0x18fb41='./'+_0x18fb41;return _0x18fb41;}export async function renderModelRegistryScaffold(_0x5001a3,_0x36d826=process[a7_0x5c9c9a(0x19c)]()){const _0x46d1fd=a7_0x5c9c9a,_0x334a7e=fileURLToPath(import.meta.url),_0x1a059a=a7_0x5433a3['resolve'](a7_0x5433a3[_0x46d1fd(0x18e)](_0x334a7e),_0x46d1fd(0x192)),_0x5ef9c=relativeImport(a7_0x5433a3[_0x46d1fd(0x18d)](_0x5001a3),a7_0x5433a3[_0x46d1fd(0x18d)](_0x36d826,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x13e5fc=readFileSync(a7_0x5433a3[_0x46d1fd(0x19d)](_0x1a059a,'profile-api.ts.tpl'),_0x46d1fd(0x193))[_0x46d1fd(0x18c)](_0x46d1fd(0x18b),_0x5ef9c),[_0x41085d,_0x4f91da,_0xb7d9c9]=await Promise[_0x46d1fd(0x198)]([a7_0x90816c[_0x46d1fd(0x196)](_0x13e5fc,{'parser':'typescript'}),a7_0x90816c[_0x46d1fd(0x196)](readFileSync(a7_0x5433a3['join'](_0x1a059a,_0x46d1fd(0x19b)),_0x46d1fd(0x193)),{'parser':'typescript'}),a7_0x90816c[_0x46d1fd(0x196)](readFileSync(a7_0x5433a3['join'](_0x1a059a,'model-runtime.ts.tpl'),_0x46d1fd(0x193)),{'parser':_0x46d1fd(0x19f)})]);return{'api':_0x41085d,'client':_0x4f91da,'modelRuntime':_0xb7d9c9};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2e8a4b,_0x544640){const _0x173ebb=a8_0x1605,_0x2078aa=_0x2e8a4b();while(!![]){try{const _0x59b881=-parseInt(_0x173ebb(0x1a3))/0x1+parseInt(_0x173ebb(0x198))/0x2*(-parseInt(_0x173ebb(0x1a0))/0x3)+parseInt(_0x173ebb(0x1aa))/0x4+-parseInt(_0x173ebb(0x196))/0x5*(-parseInt(_0x173ebb(0x1b6))/0x6)+parseInt(_0x173ebb(0x1a1))/0x7*(parseInt(_0x173ebb(0x199))/0x8)+parseInt(_0x173ebb(0x194))/0x9+-parseInt(_0x173ebb(0x19d))/0xa;if(_0x59b881===_0x544640)break;else _0x2078aa['push'](_0x2078aa['shift']());}catch(_0x76b032){_0x2078aa['push'](_0x2078aa['shift']());}}}(a8_0x566b,0x22a72));import{existsSync}from'node:fs';function a8_0x1605(_0x4e3010,_0x373a9c){_0x4e3010=_0x4e3010-0x194;const _0x566ba4=a8_0x566b();let _0x16054d=_0x566ba4[_0x4e3010];return _0x16054d;}import a8_0x3be84f from'node:path';import{readRawConfig}from'../context/config-loader.js';import{MODEL_REGISTRY_FILE_NAME,readModelRegistry}from'../api/model-registry-file.js';function a8_0x566b(){const _0x3c698e=['api.ts','\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20','\x20api\x20pull\x20--app\x20','apiDir','appCode','925256jaFXGk','-api.ts','filter','find','entries','Model\x20profile\x20\x22','AppCode\x20\x22','\x22\x20is\x20missing\x20from\x20','apps','profiles','map','length','18UbLQXb','1513350DEqzaW','defaultApp','33150CchLyt','join','186398mRZhxN','147032eHoBGj','resolve','validation','defaultProfile','599700dDgEsG','Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.','cwd','9WZceqW','42pMVlKi','appcode','48123MXCheU','`\x20first.'];a8_0x566b=function(){return _0x3c698e;};return a8_0x566b();}import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveApiModelSource(_0x34e829,_0x1cfdc7,_0x2cc4b9){const _0x29c1a7=a8_0x1605,_0x507285=a8_0x3be84f[_0x29c1a7(0x19a)](process[_0x29c1a7(0x19f)](),_0x34e829),_0x464a27=a8_0x3be84f[_0x29c1a7(0x19a)](_0x507285,_0x29c1a7(0x1a5)),_0x2aab4c=a8_0x3be84f[_0x29c1a7(0x19a)](_0x507285,MODEL_REGISTRY_FILE_NAME),_0x180c73=readModelRegistry(_0x2aab4c);if(_0x180c73){const _0x2760ca=_0x1cfdc7?Object[_0x29c1a7(0x1ae)](_0x180c73[_0x29c1a7(0x1b3)])[_0x29c1a7(0x1ac)](([,_0x1bc1a7])=>_0x1bc1a7[_0x29c1a7(0x1a9)]===_0x1cfdc7):[];if(_0x2cc4b9){if(_0x180c73[_0x29c1a7(0x1b3)][_0x2cc4b9])return{'filePath':_0x2aab4c,'profileName':_0x2cc4b9};if(_0x2760ca[_0x29c1a7(0x1b5)]>0x0)throw CliErrors[_0x29c1a7(0x19b)](_0x29c1a7(0x1af)+_0x2cc4b9+_0x29c1a7(0x1b1)+MODEL_REGISTRY_FILE_NAME+'.','Run\x20`'+CLI_BIN_NAME+_0x29c1a7(0x1a7)+_0x2cc4b9+_0x29c1a7(0x1a4));}else{if(_0x2760ca[_0x29c1a7(0x1b5)]===0x1)return{'filePath':_0x2aab4c,'profileName':_0x2760ca[0x0][0x0]};if(_0x2760ca[_0x29c1a7(0x1b5)]>0x1)throw new Error(_0x29c1a7(0x1b0)+_0x1cfdc7+_0x29c1a7(0x1a6)+_0x2760ca[_0x29c1a7(0x1b4)](([_0x1b2190])=>_0x1b2190)[_0x29c1a7(0x197)](',\x20')+'.\x20'+_0x29c1a7(0x19e));if(_0x180c73[_0x29c1a7(0x1b3)][_0x180c73[_0x29c1a7(0x19c)]]&&!_0x1cfdc7)return{'filePath':_0x2aab4c,'profileName':_0x180c73['defaultProfile']};}}if(!_0x1cfdc7&&!_0x2cc4b9)return{'filePath':_0x464a27};const _0x9f015e=readRawConfig(),_0xef5d72=_0x9f015e[_0x29c1a7(0x1b2)]&&typeof _0x9f015e[_0x29c1a7(0x1b2)]==='object'?_0x9f015e['apps']:{},_0x2bd5db=_0x2cc4b9&&_0xef5d72[_0x2cc4b9]?[_0x2cc4b9,_0xef5d72[_0x2cc4b9]]:Object[_0x29c1a7(0x1ae)](_0xef5d72)[_0x29c1a7(0x1ad)](([,_0x4e17e6])=>_0x4e17e6?.[_0x29c1a7(0x1a2)]===_0x1cfdc7);if(!_0x2bd5db)return{'filePath':_0x464a27};const [_0x411bc6,_0x293285]=_0x2bd5db,_0x195b86=typeof _0x9f015e['defaultApp']==='string'?_0x9f015e[_0x29c1a7(0x195)]:undefined;if(_0x293285?.[_0x29c1a7(0x1a8)])return{'filePath':_0x464a27};if(_0x195b86&&_0x411bc6!==_0x195b86){const _0x3ca7c8=a8_0x3be84f[_0x29c1a7(0x19a)](_0x507285,_0x411bc6+_0x29c1a7(0x1ab));if(existsSync(_0x3ca7c8))return{'filePath':_0x3ca7c8};}return{'filePath':_0x464a27};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xa3d26c,_0x499420){const _0x3e59ec=a9_0xc62d,_0x29ba8c=_0xa3d26c();while(!![]){try{const _0x505658=-parseInt(_0x3e59ec(0x113))/0x1+parseInt(_0x3e59ec(0x115))/0x2+-parseInt(_0x3e59ec(0x11e))/0x3*(parseInt(_0x3e59ec(0x11c))/0x4)+parseInt(_0x3e59ec(0x126))/0x5*(-parseInt(_0x3e59ec(0x127))/0x6)+-parseInt(_0x3e59ec(0x123))/0x7*(-parseInt(_0x3e59ec(0x120))/0x8)+parseInt(_0x3e59ec(0x11f))/0x9*(parseInt(_0x3e59ec(0x11d))/0xa)+parseInt(_0x3e59ec(0x119))/0xb;if(_0x505658===_0x499420)break;else _0x29ba8c['push'](_0x29ba8c['shift']());}catch(_0x55078f){_0x29ba8c['push'](_0x29ba8c['shift']());}}}(a9_0x521a,0xb8431));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';function a9_0xc62d(_0x3c7298,_0x2388cb){_0x3c7298=_0x3c7298-0x113;const _0x521a37=a9_0x521a();let _0xc62d33=_0x521a37[_0x3c7298];return _0xc62d33;}function a9_0x521a(){const _0x3c9ae9=['136639kuenJP','autoYes','189184FsVYmk','No\x20valid\x20session.\x20Login\x20now?','!\x20Login\x20failed.','nonInteractive','24933458MWjeWl','log','โ\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','5219752BloFYP','1502350UaxZkM','3VaIHZs','9mknfFj','80EJFWYe','validation','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','242746lAXAtT','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','*\x20Login\x20successful!','3309855enGXDn','6AtjClx','start'];a9_0x521a=function(){return _0x3c9ae9;};return a9_0x521a();}import{confirm}from'@inquirer/prompts';import a9_0x432d7c from'ora';export async function runAuthServer(_0x118aef){const _0x4ba527=a9_0xc62d,_0x5b46fb=await getIsSessionValid();if(_0x5b46fb){console['log'](_0x4ba527(0x11b));return;}if(_0x118aef?.[_0x4ba527(0x118)]&&!_0x118aef[_0x4ba527(0x114)])throw CliErrors[_0x4ba527(0x121)]('Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','Run\x20`'+CLI_BIN_NAME+'\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.');const _0x303ae7=_0x118aef?.[_0x4ba527(0x114)]?!![]:await confirm({'message':_0x4ba527(0x116),'default':!![]});if(!_0x303ae7)return;if(_0x118aef?.[_0x4ba527(0x118)]){console['log'](_0x4ba527(0x122));const _0x19be58=await authServer({'silent':![],'openBrowser':![]});_0x19be58?console['log'](_0x4ba527(0x125)):console['log'](_0x4ba527(0x117));return;}const _0x1633e8=a9_0x432d7c(_0x4ba527(0x124))[_0x4ba527(0x128)](),_0x54404e=await authServer({'silent':!![],'openBrowser':!![]});_0x1633e8['stop'](),_0x54404e?console[_0x4ba527(0x11a)](_0x4ba527(0x125)):console['log'](_0x4ba527(0x117));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x25b38e=a10_0x57f7;(function(_0x2b4cc4,_0x1c2cd0){const _0x21d44c=a10_0x57f7,_0xb75744=_0x2b4cc4();while(!![]){try{const _0x4aebe0=-parseInt(_0x21d44c(0x1f8))/0x1+-parseInt(_0x21d44c(0x1f0))/0x2+-parseInt(_0x21d44c(0x1f5))/0x3+parseInt(_0x21d44c(0x1ff))/0x4*(-parseInt(_0x21d44c(0x202))/0x5)+-parseInt(_0x21d44c(0x1f6))/0x6+-parseInt(_0x21d44c(0x1ed))/0x7+parseInt(_0x21d44c(0x20c))/0x8;if(_0x4aebe0===_0x1c2cd0)break;else _0xb75744['push'](_0xb75744['shift']());}catch(_0x1ae452){_0xb75744['push'](_0xb75744['shift']());}}}(a10_0x17a3,0x48c2f));import{writeFileSync}from'node:fs';import a10_0x116743 from'node:http';import a10_0x3182e1 from'node:https';function a10_0x17a3(){const _0x199ae1=['๐\x20Starting\x20login\x20service...','writeHead','createServer','๐\x20Attempting\x20to\x20open\x20browser\x20automatically...','local','127.0.0.1','object','json','๐\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','end','๐ก\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','win32','open\x20\x22','session','๐ก\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','3349227scvCqq','catch','/sign-in?redirect=','1130330DRjQbh','lovrabet','๐\x20Login\x20URL:','headers','โ
\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','1010601KjyxEB','1264182EOHcJu','error','356704JQxlEQ','origin','/cert/lovrabet-dev.json','listen','then','timeoutMs','log','64amoLSF','!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','/api/auth/get-session','103885IUBkqB','address','close','cmd\x20/c\x20start\x20\x22\x22\x20\x22','Auth\x20server\x20error:','cookie','openBrowser','port','xdg-open\x20\x22','isAuth','20626856xpgDZm','โ ๏ธ\x20\x20Failed\x20to\x20open\x20browser\x20automatically'];a10_0x17a3=function(){return _0x199ae1;};return a10_0x17a3();}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;function a10_0x57f7(_0x2e958b,_0x34f3f8){_0x2e958b=_0x2e958b-0x1eb;const _0x17a3bf=a10_0x17a3();let _0x57f712=_0x17a3bf[_0x2e958b];return _0x57f712;}export function resolveAuthCallbackRouting(_0xfa2bcc){const _0x471da5=a10_0x57f7;if(!_0xfa2bcc)return getProjectDomainRoutingManifest()['local'];const _0x3e39bb=getOfficialRoutingProfile(_0xfa2bcc),_0xb5c13d=getOfficialRoutingCdn(_0xfa2bcc);return{'origin':_0x3e39bb[_0x471da5(0x212)]['origin'],'certificateUrl':_0xb5c13d[_0x471da5(0x1f1)]+_0x471da5(0x1fa)};}function withPort(_0x22eb3f,_0x266a30){const _0x19a4cd=a10_0x57f7,_0x25b40b=new URL(_0x22eb3f);return _0x25b40b[_0x19a4cd(0x209)]=String(_0x266a30),_0x25b40b[_0x19a4cd(0x1f9)];}export async function authServer(_0x332540){const _0x16cf98=a10_0x57f7,_0x3d0a78=_0x332540?.['silent']||![],_0x535b14=_0x332540?.[_0x16cf98(0x208)]??!![],_0x91ad65=_0x332540?.[_0x16cf98(0x1fd)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x3692ad=resolveAuthCallbackRouting(),_0x4c159a=_0x3692ad['certificateUrl']?await(await fetch(_0x3692ad['certificateUrl']))[_0x16cf98(0x215)]():undefined;return new Promise(async(_0x4317ba,_0x5069b3)=>{const _0x3e2c35=_0x16cf98;let _0x4f8cc0=0x0,_0x5ab861=![],_0xdc52fe;const _0x44da47=async(_0x202dda,_0x31391e)=>{const _0x57968c=a10_0x57f7,_0x1fceba=getUserDomain(),_0x9305fb=_0x202dda[_0x57968c(0x1f3)][_0x57968c(0x207)]||'',_0xd6de8d=await fetch(_0x1fceba+_0x57968c(0x201),{'headers':{'cookie':_0x9305fb}})[_0x57968c(0x1fc)](_0xa4c78c=>_0xa4c78c[_0x57968c(0x215)]()),_0xa4d917=_0xd6de8d&&_0xd6de8d[_0x57968c(0x1eb)]&&_0xd6de8d['user'];if(_0xa4d917){writeFileSync(cookieFile,_0x9305fb,'utf-8');const _0x4cf1ae=buildLoginSuccessHtml();_0x31391e[_0x57968c(0x20f)](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x31391e[_0x57968c(0x217)](_0x4cf1ae),_0x43dba2(!![]);}else{const _0x362497=encodeURIComponent(withPort(_0x3692ad['origin'],_0x4f8cc0));_0x31391e[_0x57968c(0x20f)](0x12e,{'location':_0x1fceba+_0x57968c(0x1ef)+_0x362497}),_0x31391e[_0x57968c(0x217)]();return;}},_0x56e907=_0x4c159a?a10_0x3182e1[_0x3e2c35(0x210)](_0x4c159a,_0x44da47):a10_0x116743[_0x3e2c35(0x210)](_0x44da47);function _0x43dba2(_0x36cd6a){const _0x90c874=_0x3e2c35;if(_0x5ab861)return;_0x5ab861=!![],_0xdc52fe&&clearTimeout(_0xdc52fe),_0x56e907[_0x90c874(0x204)](),_0x4317ba(_0x36cd6a);}_0x56e907[_0x3e2c35(0x1fb)](0x0,_0x3e2c35(0x213),()=>{const _0x189c22=_0x3e2c35,_0x1bbf4c=_0x56e907[_0x189c22(0x203)]();_0x4f8cc0=typeof _0x1bbf4c===_0x189c22(0x214)&&_0x1bbf4c?_0x1bbf4c[_0x189c22(0x209)]:Number(_0x1bbf4c);const _0x269131=withPort(_0x3692ad[_0x189c22(0x1f9)],_0x4f8cc0);_0xdc52fe=setTimeout(()=>{const _0x477f22=_0x189c22;!_0x3d0a78&&console[_0x477f22(0x1fe)](_0x477f22(0x200)),_0x43dba2(![]);},_0x91ad65);!_0x3d0a78&&(console[_0x189c22(0x1fe)](_0x189c22(0x20e)),console[_0x189c22(0x1fe)](_0x189c22(0x1f2),_0x269131),_0x535b14?(console['log'](_0x189c22(0x211)),console['log'](''),console[_0x189c22(0x1fe)](_0x189c22(0x218))):console['log'](_0x189c22(0x1ec)),console[_0x189c22(0x1fe)](''));if(!_0x535b14)return;openInBrowser(_0x269131)[_0x189c22(0x1fc)](_0x52d1b2=>{const _0x5e6367=_0x189c22;!_0x3d0a78&&(_0x52d1b2?console[_0x5e6367(0x1fe)](_0x5e6367(0x1f4)):(console['log'](_0x5e6367(0x20d)),console[_0x5e6367(0x1fe)](_0x5e6367(0x216),_0x269131)),console[_0x5e6367(0x1fe)](''));})[_0x189c22(0x1ee)](()=>{const _0x263eef=_0x189c22;!_0x3d0a78&&(console[_0x263eef(0x1fe)](_0x263eef(0x20d)),console[_0x263eef(0x1fe)]('๐\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0x269131),console[_0x263eef(0x1fe)](''));});}),_0x56e907['on']('error',_0x3753a9=>{const _0x3cfbdf=_0x3e2c35;if(_0x5ab861)return;_0x5ab861=!![],_0xdc52fe&&clearTimeout(_0xdc52fe),!_0x3d0a78&&console[_0x3cfbdf(0x1f7)](_0x3cfbdf(0x206),_0x3753a9),_0x56e907['close'](),_0x5069b3(_0x3753a9);});});}function openInBrowser(_0x45d264){return new Promise(_0x4fecf2=>{const _0x14f72c=a10_0x57f7,_0x63eac7=process['platform'];let _0x25e56e;if(_0x63eac7===_0x14f72c(0x219))_0x25e56e=_0x14f72c(0x205)+_0x45d264+'\x22';else _0x63eac7==='darwin'?_0x25e56e=_0x14f72c(0x21a)+_0x45d264+'\x22':_0x25e56e=_0x14f72c(0x20a)+_0x45d264+'\x22';exec(_0x25e56e,_0x5986e9=>{_0x5986e9?_0x4fecf2(![]):_0x4fecf2(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a10_0x25b38e(0x1fe)](a10_0x25b38e(0x20b),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a11_0x13ad44=a11_0x8252;(function(_0x198bb2,_0x27b313){const _0x449935=a11_0x8252,_0x1992af=_0x198bb2();while(!![]){try{const _0x1645a8=parseInt(_0x449935(0x15f))/0x1+-parseInt(_0x449935(0x15b))/0x2+-parseInt(_0x449935(0x15e))/0x3*(-parseInt(_0x449935(0x166))/0x4)+parseInt(_0x449935(0x161))/0x5*(parseInt(_0x449935(0x164))/0x6)+parseInt(_0x449935(0x15c))/0x7+parseInt(_0x449935(0x162))/0x8*(-parseInt(_0x449935(0x160))/0x9)+-parseInt(_0x449935(0x15a))/0xa*(parseInt(_0x449935(0x165))/0xb);if(_0x1645a8===_0x27b313)break;else _0x1992af['push'](_0x1992af['shift']());}catch(_0x51e8e9){_0x1992af['push'](_0x1992af['shift']());}}}(a11_0x34ac,0x4ce44));function a11_0x34ac(){const _0x17caf0=['138WnIqRa','529199teDoSw','1424hDSQmY','40XxEfaM','887510TlXyzK','254590dWZPFQ','cookie','2991BzJDiv','304902LiyboM','9xhWJsX','119645LSMxie','2363456HqRfRb','.lovrabet'];a11_0x34ac=function(){return _0x17caf0;};return a11_0x34ac();}import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a11_0x8252(_0x497167,_0x7570ae){_0x497167=_0x497167-0x15a;const _0x34ac9f=a11_0x34ac();let _0x825248=_0x34ac9f[_0x497167];return _0x825248;}import{join}from'node:path';export const configDir=join(homedir(),a11_0x13ad44(0x163));export const cookieFile=join(configDir,a11_0x13ad44(0x15d));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1cee41,_0x5d03dd){var _0x51b71a=a12_0x20f6,_0xa65893=_0x1cee41();while(!![]){try{var _0x538940=parseInt(_0x51b71a(0xb3))/0x1+parseInt(_0x51b71a(0xad))/0x2+parseInt(_0x51b71a(0xb4))/0x3*(-parseInt(_0x51b71a(0xaa))/0x4)+-parseInt(_0x51b71a(0xab))/0x5*(parseInt(_0x51b71a(0xaf))/0x6)+parseInt(_0x51b71a(0xb0))/0x7+parseInt(_0x51b71a(0xac))/0x8*(-parseInt(_0x51b71a(0xb1))/0x9)+parseInt(_0x51b71a(0xb2))/0xa;if(_0x538940===_0x5d03dd)break;else _0xa65893['push'](_0xa65893['shift']());}catch(_0x40ae04){_0xa65893['push'](_0xa65893['shift']());}}}(a12_0x58cc,0x20ea9));import{readFileSync}from'node:fs';function a12_0x20f6(_0x51efb6,_0xb25a92){_0x51efb6=_0x51efb6-0xaa;var _0x58cc6e=a12_0x58cc();var _0x20f6be=_0x58cc6e[_0x51efb6];return _0x20f6be;}function a12_0x58cc(){var _0x3e0a6d=['650268BadTCJ','1050480PDNZEl','104374hnAgZD','3CfMoFy','64836HwprwK','76980kyaoTm','16quHlTC','272544RtSpiz','utf-8','60WPhFqR','726628rTckYd'];a12_0x58cc=function(){return _0x3e0a6d;};return a12_0x58cc();}import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0xf2873f=a12_0x20f6;try{return readFileSync(cookieFile,_0xf2873f(0xae));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x366fe6,_0x4a99ec){const _0x1c2dce=a13_0x569a,_0x539520=_0x366fe6();while(!![]){try{const _0x361eea=-parseInt(_0x1c2dce(0xf9))/0x1+parseInt(_0x1c2dce(0xfc))/0x2+parseInt(_0x1c2dce(0xfb))/0x3+parseInt(_0x1c2dce(0xf8))/0x4+-parseInt(_0x1c2dce(0xfe))/0x5+-parseInt(_0x1c2dce(0xf4))/0x6+parseInt(_0x1c2dce(0xfa))/0x7*(parseInt(_0x1c2dce(0xfd))/0x8);if(_0x361eea===_0x4a99ec)break;else _0x539520['push'](_0x539520['shift']());}catch(_0x201d31){_0x539520['push'](_0x539520['shift']());}}}(a13_0x40d2,0x2cc8f));function a13_0x40d2(){const _0x16baec=['8mJEJoS','1691330eCdKRH','/api/auth/get-session','json','1827396nyzVxl','session','utf-8','user','749496XxKRNC','224626SFwSjw','2786007RmUmcQ','855198hcevqI','360912yGzGqc'];a13_0x40d2=function(){return _0x16baec;};return a13_0x40d2();}function a13_0x569a(_0x57c03a,_0x2ff5ad){_0x57c03a=_0x57c03a-0xf3;const _0x40d2af=a13_0x40d2();let _0x569a96=_0x40d2af[_0x57c03a];return _0x569a96;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0x3d384f=a13_0x569a;try{if(!existsSync(cookieFile))return null;const _0x44bac2=readFileSync(cookieFile,_0x3d384f(0xf6)),_0x2cd9fa=await fetch(getUserDomain()+_0x3d384f(0xff),{'headers':{'cookie':_0x44bac2}});if(!_0x2cd9fa['ok'])return null;const _0x48d2b7=await _0x2cd9fa[_0x3d384f(0xf3)]();if(!_0x48d2b7[_0x3d384f(0xf5)]||!_0x48d2b7[_0x3d384f(0xf7)])return null;return _0x48d2b7;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x58210d,_0x100346){const _0x51f7ab=a14_0x146c,_0x4e9c24=_0x58210d();while(!![]){try{const _0x53873e=parseInt(_0x51f7ab(0x10e))/0x1*(-parseInt(_0x51f7ab(0x10d))/0x2)+parseInt(_0x51f7ab(0x116))/0x3*(parseInt(_0x51f7ab(0x118))/0x4)+-parseInt(_0x51f7ab(0x114))/0x5+parseInt(_0x51f7ab(0x10a))/0x6*(-parseInt(_0x51f7ab(0x115))/0x7)+-parseInt(_0x51f7ab(0x111))/0x8+-parseInt(_0x51f7ab(0x10f))/0x9+-parseInt(_0x51f7ab(0x112))/0xa*(-parseInt(_0x51f7ab(0x110))/0xb);if(_0x53873e===_0x100346)break;else _0x4e9c24['push'](_0x4e9c24['shift']());}catch(_0x3c9c20){_0x4e9c24['push'](_0x4e9c24['shift']());}}}(a14_0x112e,0x61c3e));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a14_0x146c(_0x235d86,_0x32b34e){_0x235d86=_0x235d86-0x10a;const _0x112e2a=a14_0x112e();let _0x146c44=_0x112e2a[_0x235d86];return _0x146c44;}export async function getIsSessionValid(){const _0x29e51c=a14_0x146c;try{if(!existsSync(cookieFile))return![];const _0x30be12=readFileSync(cookieFile,'utf-8'),_0x34b52e=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x30be12}})[_0x29e51c(0x113)](_0x201a4e=>_0x201a4e[_0x29e51c(0x10c)]());return _0x34b52e&&_0x34b52e[_0x29e51c(0x117)]&&_0x34b52e[_0x29e51c(0x10b)];}catch{}return![];}function a14_0x112e(){const _0x4215f0=['1160tMgOcZ','then','465495sbzapA','131341vXxjMS','1587boZjuL','session','2040ngqvhP','162KqsHeG','user','json','2nxeUkE','42436JStNQO','7176186yvXMiK','200519redKcI','4355344VQIeTB'];a14_0x112e=function(){return _0x4215f0;};return a14_0x112e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a15_0x24e3(){const _0x18671f=['307686lvfVWY','3627785NGmbYA','4666998RAbYfF','16564888cKHvfW','2BbaWES','<!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>','131600JrmQOw','1310444AhZIps','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','2152086XStQYA'];a15_0x24e3=function(){return _0x18671f;};return a15_0x24e3();}function a15_0x48e9(_0x2f23a8,_0x58c616){_0x2f23a8=_0x2f23a8-0x7d;const _0x24e3ad=a15_0x24e3();let _0x48e9e9=_0x24e3ad[_0x2f23a8];return _0x48e9e9;}(function(_0x1cdbd5,_0x279a0d){const _0x525f80=a15_0x48e9,_0x50ed81=_0x1cdbd5();while(!![]){try{const _0x3337d0=parseInt(_0x525f80(0x86))/0x1*(parseInt(_0x525f80(0x80))/0x2)+-parseInt(_0x525f80(0x85))/0x3+parseInt(_0x525f80(0x83))/0x4+-parseInt(_0x525f80(0x7d))/0x5+-parseInt(_0x525f80(0x7e))/0x6+-parseInt(_0x525f80(0x82))/0x7+parseInt(_0x525f80(0x7f))/0x8;if(_0x3337d0===_0x279a0d)break;else _0x50ed81['push'](_0x50ed81['shift']());}catch(_0x56342b){_0x50ed81['push'](_0x50ed81['shift']());}}}(a15_0x24e3,0x71db4));export function buildLoginSuccessHtml(){const _0x4c14a3=a15_0x48e9,_0x279b80=_0x4c14a3(0x84);return _0x4c14a3(0x81)+_0x279b80+'</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
|
-
function
|
|
1
|
+
function a16_0x32e2(_0x461bc7,_0xbfcba1){_0x461bc7=_0x461bc7-0x1e2;var _0x12cdcb=a16_0x12cd();var _0x32e293=_0x12cdcb[_0x461bc7];return _0x32e293;}(function(_0x55b369,_0x483164){var _0x438425=a16_0x32e2,_0x3e45a9=_0x55b369();while(!![]){try{var _0x8f5b22=parseInt(_0x438425(0x1e7))/0x1*(parseInt(_0x438425(0x1ec))/0x2)+-parseInt(_0x438425(0x1e9))/0x3*(parseInt(_0x438425(0x1ee))/0x4)+parseInt(_0x438425(0x1e8))/0x5+-parseInt(_0x438425(0x1ea))/0x6+parseInt(_0x438425(0x1ed))/0x7+parseInt(_0x438425(0x1e2))/0x8*(-parseInt(_0x438425(0x1eb))/0x9)+-parseInt(_0x438425(0x1e4))/0xa*(-parseInt(_0x438425(0x1e3))/0xb);if(_0x8f5b22===_0x483164)break;else _0x3e45a9['push'](_0x3e45a9['shift']());}catch(_0x3a7f06){_0x3e45a9['push'](_0x3e45a9['shift']());}}}(a16_0x12cd,0x47b23));import{unlinkSync,existsSync}from'node:fs';function a16_0x12cd(){var _0x2ec3af=['956hawkkV','log','16BtDmmU','11EXMXXw','5838370iaXGql','โ\x20Logged\x20out','!\x20Not\x20logged\x20in','23KUYeGQ','571685YEBPVw','6189yfWuXx','448794oissie','736551Mfysbi','25618ypCQdi','226940pkqrZQ'];a16_0x12cd=function(){return _0x2ec3af;};return a16_0x12cd();}import{cookieFile}from'../auth/constant.js';export function logout(){var _0x1e6e7e=a16_0x32e2;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x1e6e7e(0x1ef)](_0x1e6e7e(0x1e5))):console[_0x1e6e7e(0x1ef)](_0x1e6e7e(0x1e6));}
|