@lovrabet/rabetbase-cli 2.5.9-beta.1 โ 2.5.10-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/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 +2 -2
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase-dataset-generation/SKILL.md +2 -2
- package/skills/rabetbase-page-generation/SKILL.md +2 -2
- package/skills/rabetbase.manifest.json +3 -3
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ business Skills, use the Lovrabet runtime CLI (`@lovrabet/lovrabet-cli`).
|
|
|
14
14
|
|
|
15
15
|
## Requirements
|
|
16
16
|
|
|
17
|
-
- Node.js
|
|
17
|
+
- Node.js 24.0.0 or later
|
|
18
18
|
- A Lovrabet account with access to the target developer app
|
|
19
19
|
- Browser login for commands that call the Lovrabet platform
|
|
20
20
|
- An existing Lovrabet frontend project, or a new project created by this CLI
|
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a0_0x329f15=a0_0x4b39;function a0_0x4b39(_0x52d068,_0x45a14b){_0x52d068=_0x52d068-0x1c4;const _0x2e7d4f=a0_0x2e7d();let _0x4b397b=_0x2e7d4f[_0x52d068];return _0x4b397b;}function a0_0x2e7d(){const _0x46ba92=['name','.md\x20-\x20','api-doc','9502213VvJDEa','โ\x20Generated:\x20','4794464kOomyl','692514udcYLL','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','log','tableName','push','1083276Vxxqiw','1630959ahsujs','./docs','utf8','length','4408670PYXZYP','join','datasetCode','.md','message','error','Failed\x20to\x20generate\x20docs:\x20','2274196vwMtDr','1VLNLtI',']\x20Generating:\x20','Generated\x20docs\x20successfully:\x20','9mRcesU'];a0_0x2e7d=function(){return _0x46ba92;};return a0_0x2e7d();}(function(_0x1f0e70,_0x55b185){const _0x23efaf=a0_0x4b39,_0x1fb0a3=_0x1f0e70();while(!![]){try{const _0x5204e3=-parseInt(_0x23efaf(0x1cf))/0x1*(-parseInt(_0x23efaf(0x1d9))/0x2)+-parseInt(_0x23efaf(0x1df))/0x3+-parseInt(_0x23efaf(0x1ce))/0x4+parseInt(_0x23efaf(0x1c7))/0x5+-parseInt(_0x23efaf(0x1de))/0x6+parseInt(_0x23efaf(0x1d6))/0x7+parseInt(_0x23efaf(0x1d8))/0x8*(-parseInt(_0x23efaf(0x1d2))/0x9);if(_0x5204e3===_0x55b185)break;else _0x1fb0a3['push'](_0x1fb0a3['shift']());}catch(_0x429344){_0x1fb0a3['push'](_0x1fb0a3['shift']());}}}(a0_0x2e7d,0xa9492));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x52c448 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(_0x352a9b){return new Promise(_0x49d2d3=>setTimeout(_0x49d2d3,_0x352a9b));}export async function generateDatasetDocs(_0x462618,_0x387fae,_0x421df8,_0x4d742d=a0_0x329f15(0x1c4),_0xbb59f,_0x25f080){const _0x22113c=a0_0x329f15;mkdirSync(_0x4d742d,{'recursive':!![]});const _0x36d642=[],_0x57801b=_0x462618[_0x22113c(0x1c6)];console['log']('\x0a'+_0x57801b+_0x22113c(0x1da));for(let _0x358b0d=0x0;_0x358b0d<_0x462618[_0x22113c(0x1c6)];_0x358b0d++){const _0x1522a1=_0x462618[_0x358b0d],_0x55155f=_0x358b0d+0x1,_0x15a951=_0x1522a1[_0x22113c(0x1dc)];try{console[_0x22113c(0x1db)]('['+_0x55155f+'/'+_0x57801b+_0x22113c(0x1d0)+_0x15a951+'.md\x20('+_0x1522a1[_0x22113c(0x1d3)]+')');if(_0xbb59f)_0xbb59f(_0x55155f,_0x57801b,_0x15a951);const _0x4bbe86=await fetchDatasetDoc({'appCode':_0x387fae,'cookie':_0x421df8,'datasetCode':_0x1522a1[_0x22113c(0x1c9)],'datasetId':_0x1522a1['id'],'enableAI':![],'extraParams':_0x25f080}),_0x45b0b3=a0_0x52c448[_0x22113c(0x1c8)](_0x4d742d,_0x15a951+_0x22113c(0x1ca));writeFileSync(_0x45b0b3,_0x4bbe86,{'encoding':_0x22113c(0x1c5)}),console[_0x22113c(0x1db)](_0x22113c(0x1d7)+_0x15a951+'.md'),logger['success'](_0x22113c(0x1d5),_0x22113c(0x1d1)+_0x15a951,undefined,{'datasetCode':_0x1522a1['datasetCode'],'datasetName':_0x1522a1[_0x22113c(0x1d3)],'filePath':_0x45b0b3,'progress':_0x55155f+'/'+_0x57801b}),_0x36d642['push']({'datasetCode':_0x1522a1[_0x22113c(0x1c9)],'datasetName':_0x1522a1['name'],'filePath':_0x45b0b3,'success':!![]});if(_0x55155f<_0x57801b)await delay(0x1388);}catch(_0x1ce9cd){const _0x5476ad=_0x1ce9cd instanceof Error?_0x1ce9cd[_0x22113c(0x1cb)]:String(_0x1ce9cd);console[_0x22113c(0x1db)]('โ\x20Failed:\x20'+_0x15a951+_0x22113c(0x1d4)+_0x5476ad),logger[_0x22113c(0x1cc)](_0x22113c(0x1d5),_0x22113c(0x1cd)+_0x1522a1[_0x22113c(0x1c9)],{'datasetCode':_0x1522a1['datasetCode'],'datasetName':_0x1522a1[_0x22113c(0x1d3)],'error':_0x5476ad,'progress':_0x55155f+'/'+_0x57801b}),_0x36d642[_0x22113c(0x1dd)]({'datasetCode':_0x1522a1[_0x22113c(0x1c9)],'datasetName':_0x1522a1[_0x22113c(0x1d3)],'filePath':'','success':![],'error':_0x5476ad}),_0x55155f<_0x57801b&&(console[_0x22113c(0x1db)]('Waiting\x203\x20seconds...\x0a'),await delay(0xbb8));}}return _0x36d642;}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x1fdc1e=a1_0x2732;(function(_0x9c2d30,_0x4fab23){const _0x2ce5a0=a1_0x2732,_0x3e3a66=_0x9c2d30();while(!![]){try{const _0x4a6bcf=-parseInt(_0x2ce5a0(0x196))/0x1*(-parseInt(_0x2ce5a0(0x188))/0x2)+parseInt(_0x2ce5a0(0x182))/0x3+parseInt(_0x2ce5a0(0x197))/0x4+parseInt(_0x2ce5a0(0x17b))/0x5*(-parseInt(_0x2ce5a0(0x181))/0x6)+-parseInt(_0x2ce5a0(0x180))/0x7*(-parseInt(_0x2ce5a0(0x192))/0x8)+-parseInt(_0x2ce5a0(0x178))/0x9*(parseInt(_0x2ce5a0(0x195))/0xa)+parseInt(_0x2ce5a0(0x194))/0xb;if(_0x4a6bcf===_0x4fab23)break;else _0x3e3a66['push'](_0x3e3a66['shift']());}catch(_0x6ce05){_0x3e3a66['push'](_0x3e3a66['shift']());}}}(a1_0x1016,0xacf6f));import a1_0x2136ba from'node:path';import{CliErrors}from'../errors.js';export function normalizeApiDir(_0x17f9a4,_0x2a031c=process[a1_0x1fdc1e(0x191)]()){return a1_0x2136ba['resolve'](_0x2a031c,_0x17f9a4);}function a1_0x1016(){const _0xcaaa50=['384iGfSbL','validation','9731480anTmRJ','20VVvfxF','73OsNtFv','790756chIvQj','Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.','6045777vlMbLq','push','app','230xJAoao','name','size','length','flatMap','161343PuXuNe','98004wiOlfD','1488837HCxjMj','map','normalizedApiDir','trim','apiGroup','filter','3242UhSqlF','set','\x22\x20resolves\x20to\x20multiple\x20API\x20directories.','some','API\x20directory\x20\x22','join','.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','get','cwd'];a1_0x1016=function(){return _0xcaaa50;};return a1_0x1016();}function normalizedApiGroup(_0x21773f){const _0x218d82=a1_0x1fdc1e,_0x5175cb=_0x21773f?.[_0x218d82(0x185)]();return _0x5175cb||undefined;}export function resolveApiProfileLayouts(_0x7423c6,_0x28880d,_0x2eb9ad=process[a1_0x1fdc1e(0x191)]()){const _0x5e716c=a1_0x1fdc1e,_0x19b085=_0x7423c6[_0x5e716c(0x183)](_0x308fb1=>{const _0x1240ba=_0x28880d(_0x308fb1);return{'app':_0x308fb1,'outputDir':_0x1240ba,'normalizedApiDir':normalizeApiDir(_0x1240ba,_0x2eb9ad),'apiGroup':normalizedApiGroup(_0x308fb1['apiGroup'])};}),_0x355b29=new Map();for(const _0x5457c2 of _0x19b085){if(!_0x5457c2[_0x5e716c(0x186)])continue;const _0x22debb=_0x355b29['get'](_0x5457c2[_0x5e716c(0x186)])??new Set();_0x22debb['add'](_0x5457c2[_0x5e716c(0x184)]),_0x355b29[_0x5e716c(0x189)](_0x5457c2[_0x5e716c(0x186)],_0x22debb);}for(const [_0x1c3a6f,_0x41c2a8]of _0x355b29){if(_0x41c2a8['size']>0x1)throw CliErrors[_0x5e716c(0x193)]('API\x20group\x20\x22'+_0x1c3a6f+_0x5e716c(0x18a),_0x5e716c(0x198));}const _0x5e5fd7=new Map();for(const _0x2a3d59 of _0x19b085){const _0x52be49=_0x5e5fd7[_0x5e716c(0x190)](_0x2a3d59['normalizedApiDir'])??[];_0x52be49[_0x5e716c(0x179)](_0x2a3d59),_0x5e5fd7[_0x5e716c(0x189)](_0x2a3d59[_0x5e716c(0x184)],_0x52be49);}for(const _0x5bb8e7 of _0x5e5fd7['values']()){const _0x390e39=new Set(_0x5bb8e7[_0x5e716c(0x17f)](_0x2585be=>_0x2585be[_0x5e716c(0x186)]?[_0x2585be[_0x5e716c(0x186)]]:[]));if(_0x390e39[_0x5e716c(0x17d)]===0x0)continue;if(_0x390e39['size']>0x1||_0x5bb8e7[_0x5e716c(0x18b)](_0x2c268d=>!_0x2c268d['apiGroup'])){const _0x292f74=_0x5bb8e7[_0x5e716c(0x183)](_0x5b6899=>_0x5b6899[_0x5e716c(0x17a)][_0x5e716c(0x17c)])[_0x5e716c(0x18d)](',\x20');throw CliErrors[_0x5e716c(0x193)](_0x5e716c(0x18c)+_0x5bb8e7[0x0]['outputDir']+_0x5e716c(0x18f),'Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20'+_0x292f74+_0x5e716c(0x18e));}}return _0x19b085;}function a1_0x2732(_0x44e04a,_0x55ca0b){_0x44e04a=_0x44e04a-0x178;const _0x10168c=a1_0x1016();let _0x27326d=_0x10168c[_0x44e04a];return _0x27326d;}export function getRegistryGroup(_0x603085,_0x322934){const _0x45ca1d=a1_0x1fdc1e;if(_0x322934[_0x45ca1d(0x186)])return _0x603085['filter'](_0xac9856=>_0xac9856['apiGroup']===_0x322934[_0x45ca1d(0x186)]);const _0x1d154c=_0x603085[_0x45ca1d(0x187)](_0x14664e=>_0x14664e[_0x45ca1d(0x184)]===_0x322934['normalizedApiDir']);return _0x1d154c[_0x45ca1d(0x17e)]===0x1?_0x1d154c:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x6798ea,_0x27ab99){var _0x57f6be=a2_0x1683,_0x4720f7=_0x6798ea();while(!![]){try{var _0x261cf5=parseInt(_0x57f6be(0xa2))/0x1+parseInt(_0x57f6be(0xa5))/0x2*(-parseInt(_0x57f6be(0x9d))/0x3)+parseInt(_0x57f6be(0xa4))/0x4+-parseInt(_0x57f6be(0x9f))/0x5+-parseInt(_0x57f6be(0xa0))/0x6+parseInt(_0x57f6be(0xa1))/0x7+-parseInt(_0x57f6be(0x9e))/0x8*(-parseInt(_0x57f6be(0xa3))/0x9);if(_0x261cf5===_0x27ab99)break;else _0x4720f7['push'](_0x4720f7['shift']());}catch(_0x5382ad){_0x4720f7['push'](_0x4720f7['shift']());}}}(a2_0x1c5a,0x240b3));function a2_0x1683(_0x172dd6,_0x448390){_0x172dd6=_0x172dd6-0x9d;var _0x1c5afd=a2_0x1c5a();var _0x16832c=_0x1c5afd[_0x172dd6];return _0x16832c;}export{fetchModelList}from'../core/api-client.js';function a2_0x1c5a(){var _0x3f1ff9=['178514jRHgUn','9wZLYFf','2536232hpbiiG','1183185DnlZuv','424302wJfeRg','251657ZGyDod','92411uLYVYi','9otEEZs','1109476PKdCEv'];a2_0x1c5a=function(){return _0x3f1ff9;};return a2_0x1c5a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2e3073,_0x4b9982){const _0x236d7a=a3_0x5396,_0x2351d9=_0x2e3073();while(!![]){try{const _0xa636d5=-parseInt(_0x236d7a(0x13c))/0x1+parseInt(_0x236d7a(0x120))/0x2*(parseInt(_0x236d7a(0x10f))/0x3)+-parseInt(_0x236d7a(0x11b))/0x4+parseInt(_0x236d7a(0x112))/0x5*(-parseInt(_0x236d7a(0x13d))/0x6)+parseInt(_0x236d7a(0x132))/0x7+parseInt(_0x236d7a(0x127))/0x8*(-parseInt(_0x236d7a(0x115))/0x9)+parseInt(_0x236d7a(0x141))/0xa;if(_0xa636d5===_0x4b9982)break;else _0x2351d9['push'](_0x2351d9['shift']());}catch(_0x353f56){_0x2351d9['push'](_0x2351d9['shift']());}}}(a3_0x5a25,0xcca4f));import a3_0x4cc7e9 from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x29daff from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';import{generateSdkConfigFile}from'../api/generate-sdk-config-file.js';import{MODEL_REGISTRY_FILE_NAME,MODEL_RUNTIME_FILE_NAME,updateModelRegistry}from'../api/model-registry-file.js';import{renderModelRegistryScaffold}from'../api/model-registry-scaffold.js';function a3_0x5396(_0x4815d0,_0x45b758){_0x4815d0=_0x4815d0-0x10a;const _0x5a25b8=a3_0x5a25();let _0x539692=_0x5a25b8[_0x4815d0];return _0x539692;}function a3_0x5a25(){const _0x4f084=['alias','dirname','replace','-api','includes','created','api','join','resolve','4264316OPXGIl','map','existed','API\x20scaffold\x20written.','path','{\x20apiConfigName:\x20','format','replaceApiContent','test','\x20config\x20set\x20app\x20<value>`','150056vCRveQ','38022JLtohS','APP_','modelProfile','overwriteTypescript','29702320ANduwr','success','LOVRABET_RUNTIME_DOMAIN','default','allowEmptyModelReplacement','length','toUpperCase',',\x20env:\x20','runtimeDomain',',\x20...LOVRABET_SDK_CONFIG\x20}','basename','14925qkKgFz','name','.ts','945Xnfysj','\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.','overwritten','24147kFhvnf','refreshed','stringify','utf8','-client','none','5040104nomzAf','key','templates/generate-api','preserved','init-api','10WuNOzn','api.ts.tpl','CONFIG_NAMES.DEFAULT','scaffoldMode','modelRuntime','Model\x20facts\x20refreshed.','client','472iBZLYs','missing'];a3_0x5a25=function(){return _0x4f084;};return a3_0x5a25();}function fileAction(_0x14f3d6,_0x5b3c7e){const _0x550ab0=a3_0x5396;if(!_0x5b3c7e)return _0x14f3d6?_0x550ab0(0x11e):_0x550ab0(0x128);return _0x14f3d6?_0x550ab0(0x114):'created';}export async function generateApiFile(_0x40baf0,_0x22c119,_0x1aabe7,_0x1228d8,_0x24b744,_0x35c19c,_0x4a7860,_0x12e8ad={},_0x21b6b3={}){const _0x5d40cb=a3_0x5396;if(!_0x1aabe7)throw new Error('Please\x20configure\x20app\x20code\x20first\x20via\x20`'+CLI_BIN_NAME+_0x5d40cb(0x13b));const _0x1a5314=_0x1228d8&&!_0x4a7860,_0x43175e=!!_0x21b6b3['modelProfile'],_0x4de621=_0x43175e||_0x1a5314,_0x2d3b77=_0x4a7860||_0x1aabe7,_0xfbb9c8=_0x43175e||_0x1a5314?_0x5d40cb(0x144):_0x2d3b77,_0x3c2263=_0x43175e||_0x1a5314?_0x5d40cb(0x122):JSON[_0x5d40cb(0x117)](_0x2d3b77),_0x2c5961=!isProduction(_0x24b744),_0x35fc0b=_0x2c5961?_0x5d40cb(0x10b)+JSON[_0x5d40cb(0x117)](_0x24b744):'',_0x2ac45f=_0x5d40cb(0x137)+_0x3c2263+_0x35fc0b+_0x5d40cb(0x10d),_0x2e01a6=_0x43175e?'':_0x22c119,_0x45cbdf=_0x2e01a6?_0x2e01a6+_0x5d40cb(0x12c):_0x5d40cb(0x12f),_0x5a9964=_0x2e01a6?_0x2e01a6+_0x5d40cb(0x119):_0x5d40cb(0x126),_0x4ca87d=_0x2e01a6&&!/^app-[a-f0-9]+$/i[_0x5d40cb(0x13a)](_0x2e01a6)?_0x2e01a6[_0x5d40cb(0x12b)](/-/g,'_')[_0x5d40cb(0x10a)]():'LOVRABET',_0x591200=/^\d/[_0x5d40cb(0x13a)](_0x4ca87d)?_0x5d40cb(0x13e)+_0x4ca87d:_0x4ca87d,_0x34c28f=_0x40baf0[_0x5d40cb(0x133)](_0x300551=>({'datasetCode':_0x300551['datasetCode'],'tableName':_0x300551['tableName'],'name':_0x300551[_0x5d40cb(0x110)]||'','alias':_0x300551[_0x5d40cb(0x129)]||_0x300551[_0x5d40cb(0x11c)]})),_0x344aae=fileURLToPath(import.meta.url),_0x133aa4=a3_0x29daff[_0x5d40cb(0x131)](a3_0x29daff[_0x5d40cb(0x12a)](_0x344aae),'../..'),_0x4a36b4=a3_0x29daff[_0x5d40cb(0x130)](_0x133aa4,_0x5d40cb(0x11d)),_0x5ee49a=a3_0x29daff[_0x5d40cb(0x130)](_0x4a36b4,_0x5d40cb(0x121)),_0x707651=a3_0x29daff[_0x5d40cb(0x130)](_0x4a36b4,'client.ts.tpl'),_0x17d499=_0x35c19c;mkdirSync(_0x17d499,{'recursive':!![]});const _0x62017a=_0x43175e?{}:_0x12e8ad,_0x35c481=await generateSdkConfigFile(_0x17d499,_0x62017a,_0x2e01a6),_0x389adc=a3_0x29daff['basename'](_0x35c481,_0x5d40cb(0x111)),_0x48eac9=a3_0x29daff[_0x5d40cb(0x130)](_0x17d499,_0x45cbdf+'.ts'),_0x40ceb7=a3_0x29daff[_0x5d40cb(0x130)](_0x17d499,_0x5a9964+_0x5d40cb(0x111)),_0x518fda=_0x21b6b3[_0x5d40cb(0x140)]===!![],_0x2a6a82=existsSync(_0x48eac9),_0x284f4f=existsSync(_0x40ceb7),_0x257fa4=_0x21b6b3[_0x5d40cb(0x123)]??(_0x518fda?_0x5d40cb(0x12b):_0x5d40cb(0x128)),_0x4290f7=_0x257fa4===_0x5d40cb(0x12b)||_0x257fa4===_0x5d40cb(0x128)&&!_0x2a6a82,_0x3ab474=_0x257fa4===_0x5d40cb(0x12b)||_0x257fa4===_0x5d40cb(0x128)&&!_0x284f4f,_0x213a9c=_0x21b6b3[_0x5d40cb(0x13f)]?updateModelRegistry({'outputDir':_0x17d499,'profileName':_0x21b6b3['modelProfile']['name'],'defaultProfile':_0x21b6b3[_0x5d40cb(0x13f)]['defaultName'],'appCode':_0x1aabe7,'runtimeDomain':_0x21b6b3[_0x5d40cb(0x13f)][_0x5d40cb(0x10c)],'models':_0x34c28f,'allowEmptyReplacement':_0x21b6b3[_0x5d40cb(0x145)]===!![]}):undefined,_0x35af9b=_0x213a9c?a3_0x29daff[_0x5d40cb(0x130)](_0x17d499,MODEL_RUNTIME_FILE_NAME):undefined,_0x2b0620=_0x35af9b?existsSync(_0x35af9b):![],_0xe22c6d=_0x43175e&&_0x257fa4!==_0x5d40cb(0x11a)?await renderModelRegistryScaffold(_0x17d499):undefined;_0x35af9b&&_0xe22c6d&&writeFileSync(_0x35af9b,_0xe22c6d[_0x5d40cb(0x124)],_0x5d40cb(0x118));const _0x2e4789=_0x34c28f[0x0]?.[_0x5d40cb(0x129)];if(_0x4290f7){const _0x11d7bb=_0xe22c6d?.[_0x5d40cb(0x12f)]??readFileSync(_0x5ee49a,_0x5d40cb(0x118)),_0x24b000=_0x43175e?_0x11d7bb:TemplateReplacer[_0x5d40cb(0x139)](_0x11d7bb,_0x1aabe7,_0x34c28f,_0x2e4789,_0x45cbdf,_0x3c2263,undefined,_0x591200);writeFileSync(_0x48eac9,await a3_0x4cc7e9[_0x5d40cb(0x138)](_0x24b000,{'parser':'typescript'}),{'encoding':_0x5d40cb(0x118)});}if(_0x3ab474){const _0x3efa36=_0xe22c6d?.['client']??readFileSync(_0x707651,'utf8'),_0x302d86=_0x43175e?_0x3efa36:TemplateReplacer['replaceApiContent'](_0x3efa36,_0x1aabe7,_0x34c28f,_0x2e4789,_0x45cbdf,_0x3c2263,_0x2ac45f,_0x591200,_0x389adc);writeFileSync(_0x40ceb7,await a3_0x4cc7e9[_0x5d40cb(0x138)](_0x302d86,{'parser':'typescript'}),{'encoding':_0x5d40cb(0x118)});}const _0x4175d6=_0x34c28f[_0x5d40cb(0x146)],_0x3e3bb3={'api':{'path':_0x48eac9,'action':fileAction(_0x2a6a82,_0x4290f7)},'client':{'path':_0x40ceb7,'action':fileAction(_0x284f4f,_0x3ab474)},'sdkConfig':{'path':_0x35c481,'action':_0x5d40cb(0x116)},..._0x213a9c?{'modelRegistry':{'path':_0x213a9c[_0x5d40cb(0x136)],'action':_0x213a9c[_0x5d40cb(0x134)]?_0x5d40cb(0x116):'created'},'modelRuntime':{'path':_0x35af9b,'action':_0xe22c6d?_0x2b0620?_0x5d40cb(0x116):_0x5d40cb(0x12e):_0x2b0620?_0x5d40cb(0x11e):_0x5d40cb(0x128)}}:{}},_0x10d114=existsSync(_0x48eac9)&&readFileSync(_0x48eac9,_0x5d40cb(0x118))[_0x5d40cb(0x12d)](MODEL_REGISTRY_FILE_NAME[_0x5d40cb(0x12b)](_0x5d40cb(0x111),'')),_0x1155fa=existsSync(_0x40ceb7)&&readFileSync(_0x40ceb7,'utf8')[_0x5d40cb(0x12d)](_0x5d40cb(0x143)),_0x4e2d68=_0x43175e?!_0x10d114||!_0x1155fa||!existsSync(_0x35af9b):![],_0x12720e=_0x43175e?_0x4e2d68:_0x3e3bb3[_0x5d40cb(0x12f)]['action']===_0x5d40cb(0x11e)||_0x3e3bb3['client']['action']===_0x5d40cb(0x11e);return logger[_0x5d40cb(0x142)](_0x5d40cb(0x11f),_0x12720e?a3_0x29daff[_0x5d40cb(0x10e)](_0x35c481)+_0x5d40cb(0x113):_0x43175e?_0x5d40cb(0x125):_0x5d40cb(0x135),undefined,{'apiFile':_0x48eac9,'clientFile':_0x40ceb7,'sdkConfig':_0x35c481,'modelCount':_0x4175d6,'configName':_0xfbb9c8,'isDefaultConfig':_0x4de621,'needsAgentMerge':_0x12720e,'needsProjectUpgrade':_0x4e2d68,'files':_0x3e3bb3}),{'appCode':_0x1aabe7,'modelCount':_0x4175d6,'models':_0x34c28f,'apiFilePath':_0x48eac9,'clientFilePath':_0x40ceb7,'sdkConfigPath':_0x35c481,'modelRegistryPath':_0x213a9c?.[_0x5d40cb(0x136)],'modelRuntimePath':_0x35af9b,'modelProfile':_0x21b6b3[_0x5d40cb(0x13f)]?.[_0x5d40cb(0x110)],'configName':_0xfbb9c8,'isDefaultConfig':_0x4de621,'sdkRouting':_0x62017a,'files':_0x3e3bb3,'needsAgentMerge':_0x12720e,'needsProjectUpgrade':_0x4e2d68};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a4_0x360c(){const _0x265a56=['254976oWpKRX','35469jKUYsL','push',',\x0a}','3788652KcuAjf',',\x0a\x20\x20','{\x0a\x20\x20','utf8','runtimeDomain','15859wRYRkz','sdk-config.ts','typescript','-sdk-config.ts','343166fYMxbA','353030FbxmoR','508632loplCV','length','\x20as\x20const;\x0a','stringify','runtimeDomain:\x20','join','format'];a4_0x360c=function(){return _0x265a56;};return a4_0x360c();}const a4_0x4f063b=a4_0x113c;(function(_0x4a13eb,_0x16b0fe){const _0x37a0f1=a4_0x113c,_0x129c0d=_0x4a13eb();while(!![]){try{const _0x513c5e=-parseInt(_0x37a0f1(0xa8))/0x1+-parseInt(_0x37a0f1(0x96))/0x2+parseInt(_0x37a0f1(0xa0))/0x3+-parseInt(_0x37a0f1(0x98))/0x4+-parseInt(_0x37a0f1(0x97))/0x5+-parseInt(_0x37a0f1(0x9f))/0x6+parseInt(_0x37a0f1(0xa3))/0x7;if(_0x513c5e===_0x16b0fe)break;else _0x129c0d['push'](_0x129c0d['shift']());}catch(_0x394723){_0x129c0d['push'](_0x129c0d['shift']());}}}(a4_0x360c,0x1e9ad));import{mkdirSync,writeFileSync}from'node:fs';import a4_0x28e9ec from'node:path';import a4_0x170ef7 from'prettier';export const SDK_CONFIG_FILE_NAME=a4_0x4f063b(0xa9);export function getSdkConfigFileName(_0x25da81=''){const _0x48e91a=a4_0x4f063b;return _0x25da81?_0x25da81+_0x48e91a(0xab):SDK_CONFIG_FILE_NAME;}function a4_0x113c(_0x20b864,_0x304d66){_0x20b864=_0x20b864-0x96;const _0x360cb4=a4_0x360c();let _0x113cee=_0x360cb4[_0x20b864];return _0x113cee;}export async function generateSdkConfigFile(_0x2240be,_0x14c70d={},_0x113da3=''){const _0x371543=a4_0x4f063b,_0x11ab26=[];_0x14c70d[_0x371543(0xa7)]&&_0x11ab26[_0x371543(0xa1)](_0x371543(0x9c)+JSON[_0x371543(0x9b)](_0x14c70d[_0x371543(0xa7)]));const _0x504001=_0x11ab26[_0x371543(0x99)]>0x0?_0x371543(0xa5)+_0x11ab26[_0x371543(0x9d)](_0x371543(0xa4))+_0x371543(0xa2):'{}',_0x1a1556='/**\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'+_0x504001+_0x371543(0x9a);mkdirSync(_0x2240be,{'recursive':!![]});const _0x456d89=a4_0x28e9ec[_0x371543(0x9d)](_0x2240be,getSdkConfigFileName(_0x113da3));return writeFileSync(_0x456d89,await a4_0x170ef7[_0x371543(0x9e)](_0x1a1556,{'parser':_0x371543(0xaa)}),_0x371543(0xa6)),_0x456d89;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a5_0x3f9e(){const _0x181cef=['1707TkFIEM','replace','some','4858548JeHplS','includes','matchAll','5847336BHfbjY','test','4951864KKlQvC','lovrabetClient','1580DKmBUZ','length','8nbifFX','match','Generated\x20by\x20Rabetbase\x20CLI','1368475qHDYOX','@lovrabet/sdk','1655485Zbjrkm','endsWith','registerModels','14014240MRXXTn','exec','APP_CODE','7UkhyJB','MODELS_CONFIG','map'];a5_0x3f9e=function(){return _0x181cef;};return a5_0x3f9e();}(function(_0x47cc78,_0x4a71cc){const _0x4a4643=a5_0x473e,_0x565675=_0x47cc78();while(!![]){try{const _0x554fac=parseInt(_0x4a4643(0xa2))/0x1+-parseInt(_0x4a4643(0x9d))/0x2*(parseInt(_0x4a4643(0xad))/0x3)+parseInt(_0x4a4643(0x9f))/0x4*(-parseInt(_0x4a4643(0xa4))/0x5)+parseInt(_0x4a4643(0xb0))/0x6*(parseInt(_0x4a4643(0xaa))/0x7)+parseInt(_0x4a4643(0x9b))/0x8+parseInt(_0x4a4643(0x99))/0x9+-parseInt(_0x4a4643(0xa7))/0xa;if(_0x554fac===_0x4a71cc)break;else _0x565675['push'](_0x565675['shift']());}catch(_0xc42c0c){_0x565675['push'](_0x565675['shift']());}}}(a5_0x3f9e,0xe3fa0));export function parseLegacyApiModels(_0x1f2893){const _0x4ee323=a5_0x473e,_0x1af924=[],_0x1df270=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x4f7a8d;while((_0x4f7a8d=_0x1df270[_0x4ee323(0xa8)](_0x1f2893))!==null){_0x1af924['push']({'datasetCode':_0x4f7a8d[0x1],'tableName':_0x4f7a8d[0x2],'name':_0x4f7a8d[0x3],'alias':_0x4f7a8d[0x4]});}return _0x1af924;}export function parseLegacyApiAppCode(_0x18951a){const _0x46118e=a5_0x473e;return _0x18951a[_0x46118e(0xa0)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function a5_0x473e(_0xe986d3,_0xcaeed7){_0xe986d3=_0xe986d3-0x99;const _0x3f9e5c=a5_0x3f9e();let _0x473eb5=_0x3f9e5c[_0xe986d3];return _0x473eb5;}function stripComments(_0x1c8101){const _0x767faf=a5_0x473e;return _0x1c8101['replace'](/\/\*[\s\S]*?\*\//g,'')[_0x767faf(0xae)](/\/\/.*$/gm,'');}export function isLegacyGeneratedApiScaffold(_0x184fe8){const _0x12adbc=a5_0x473e;if(!_0x184fe8[_0x12adbc(0xb1)](_0x12adbc(0xa1)))return![];const _0x1d0964=stripComments(_0x184fe8),_0x155ed4=[..._0x1d0964['matchAll'](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)][_0x12adbc(0xac)](_0x5aee0e=>_0x5aee0e[0x1]);if(_0x155ed4[_0x12adbc(0x9e)]!==0x1||_0x155ed4[0x0]!==_0x12adbc(0xa3))return![];const _0x1e5ee6=[..._0x1d0964[_0x12adbc(0xb2)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x12adbc(0xac)](_0x252139=>_0x252139[0x1]);if(_0x1e5ee6['length']!==0x2||!_0x1e5ee6['some'](_0x4cb3df=>_0x4cb3df[_0x12adbc(0xa5)](_0x12adbc(0xa9)))||!_0x1e5ee6[_0x12adbc(0xaf)](_0x351773=>_0x351773[_0x12adbc(0xa5)](_0x12adbc(0xab))))return![];const _0x46ab38=[..._0x1d0964[_0x12adbc(0xb2)](/^([A-Za-z_$][\w$]*)\s*\(/gm)][_0x12adbc(0xac)](_0x461fdc=>_0x461fdc[0x1]);return _0x46ab38[_0x12adbc(0x9e)]===0x1&&_0x46ab38[0x0]===_0x12adbc(0xa6);}export function isLegacyGeneratedClientScaffold(_0x258887){const _0x3005f4=a5_0x473e;if(!_0x258887[_0x3005f4(0xb1)](_0x3005f4(0xa1)))return![];const _0xae87aa=stripComments(_0x258887),_0x35cd4c=[..._0xae87aa['matchAll'](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)][_0x3005f4(0xac)](_0x3bbc13=>_0x3bbc13[0x1]);if(_0x35cd4c[_0x3005f4(0xaf)](_0x3591b5=>_0x3591b5!=='@lovrabet/sdk'&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/[_0x3005f4(0x9a)](_0x3591b5??'')))return![];const _0x538fb5=[..._0xae87aa[_0x3005f4(0xb2)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)]['map'](_0x2414ff=>_0x2414ff[0x1]);return _0x538fb5[_0x3005f4(0x9e)]===0x1&&_0x538fb5[0x0]===_0x3005f4(0x9c);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a6_0x3f55(){const _0x3c6fa4=['/*\x20rabetbase-model-registry:v2\x20*/','6398VGYJiP','Model\x20alias\x20\x22','profiles','find','\x22\x20and\x20\x22','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','alias','test','210Uovgem','outputDir','allowEmptyReplacement','261vNogJJ','4848BdlhGy','join','entries','\x22\x20in\x20profile\x20\x22','indexOf','slice','object','defaultProfile','lovrabet-model-registry/v2','profileName','486370nNEZcQ','appCode','/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a','\x22\x20in\x20the\x20registry\x20but\x20\x22','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','value','length','split','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','3jTSgGY','3723668zjnoZu','filter','flatMap','models','models.generated.ts','23160tzqKds','set','875EgqtHN','protocol','replace','.tmp','trim','every','stringify','35542xqRMig','fromEntries','datasetCode','parse','\x22\x20maps\x20to\x20both\x20\x22','datasetCodes','isArray','keys','map','tableName','246851IQGkAz','get','runtimeDomain','name','string','utf8','push','NOT-SET','34XWNzKA','444jamPjP','52770bgPfPM'];a6_0x3f55=function(){return _0x3c6fa4;};return a6_0x3f55();}const a6_0x3ec527=a6_0x40f6;(function(_0xe5f129,_0x2d0b77){const _0x5073dc=a6_0x40f6,_0x5d0d75=_0xe5f129();while(!![]){try{const _0x1bcf5c=parseInt(_0x5073dc(0x113))/0x1*(-parseInt(_0x5073dc(0x103))/0x2)+-parseInt(_0x5073dc(0x126))/0x3*(parseInt(_0x5073dc(0x127))/0x4)+-parseInt(_0x5073dc(0x105))/0x5*(-parseInt(_0x5073dc(0x10f))/0x6)+parseInt(_0x5073dc(0x12e))/0x7*(parseInt(_0x5073dc(0x12c))/0x8)+parseInt(_0x5073dc(0x112))/0x9*(parseInt(_0x5073dc(0x11d))/0xa)+-parseInt(_0x5073dc(0xfb))/0xb*(-parseInt(_0x5073dc(0x104))/0xc)+-parseInt(_0x5073dc(0xf1))/0xd*(parseInt(_0x5073dc(0x107))/0xe);if(_0x1bcf5c===_0x2d0b77)break;else _0x5d0d75['push'](_0x5d0d75['shift']());}catch(_0x492960){_0x5d0d75['push'](_0x5d0d75['shift']());}}}(a6_0x3f55,0xad2a4));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0xffc5aa from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x3ec527(0x12b);export const MODEL_RUNTIME_FILE_NAME='model-runtime.ts';export const MODEL_REGISTRY_VERSION_MARKER=a6_0x3ec527(0x106);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x3ec527(0x11b),REGISTRY_START='/*\x20rabetbase-model-registry:start\x20*/',REGISTRY_END='/*\x20rabetbase-model-registry:end\x20*/';function emptyRegistry(_0x5f0ea7){return{'defaultProfile':_0x5f0ea7,'profiles':{},'models':[]};}function extractRegistryJson(_0x163047){const _0x144740=a6_0x3ec527,_0x277ecd=_0x163047[_0x144740(0x117)](REGISTRY_START),_0x591842=_0x163047['indexOf'](REGISTRY_END);if(_0x277ecd<0x0||_0x591842<=_0x277ecd)return undefined;return _0x163047[_0x144740(0x118)](_0x277ecd+REGISTRY_START['length'],_0x591842)[_0x144740(0xee)]()[_0x144740(0x130)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x144740(0x130)](/;$/,'');}function migrateLegacyRegistry(_0x48c2b0){const _0x43643b=a6_0x3ec527,_0xd0e0a8=emptyRegistry(_0x48c2b0[_0x43643b(0x11a)]);for(const [_0x24d43a,_0x429e66]of Object[_0x43643b(0x115)](_0x48c2b0[_0x43643b(0x109)])){_0xd0e0a8[_0x43643b(0x109)][_0x24d43a]={'appCode':_0x429e66['appCode'],'runtimeDomain':_0x429e66['runtimeDomain']},mergeProfileModels(_0xd0e0a8,_0x24d43a,_0x429e66['models']);}return _0xd0e0a8;}function a6_0x40f6(_0x30c426,_0x40fd35){_0x30c426=_0x30c426-0xee;const _0x3f55b0=a6_0x3f55();let _0x40f612=_0x3f55b0[_0x30c426];return _0x40f612;}function generatedObjectLiteralToJson(_0x5e3844){const _0x7a3e01=a6_0x3ec527;let _0x3a1839='',_0x133694,_0x229077=![],_0x3b17c3;for(let _0x4db474=0x0;_0x4db474<_0x5e3844[_0x7a3e01(0x123)];_0x4db474++){const _0x4ef3dd=_0x5e3844[_0x4db474];if(_0x133694){_0x3a1839+=_0x4ef3dd;if(_0x229077)_0x229077=![];else{if(_0x4ef3dd==='\x5c')_0x229077=!![];else{if(_0x4ef3dd===_0x133694)_0x133694=undefined;}}continue;}if(_0x4ef3dd==='\x22'){_0x133694=_0x4ef3dd,_0x3a1839+=_0x4ef3dd,_0x3b17c3=_0x7a3e01(0x122);continue;}if(_0x4ef3dd===','){let _0x24ae51=_0x4db474+0x1;while(/\s/[_0x7a3e01(0x10e)](_0x5e3844[_0x24ae51]??''))_0x24ae51++;if(_0x5e3844[_0x24ae51]==='}'||_0x5e3844[_0x24ae51]===']')continue;_0x3a1839+=_0x4ef3dd,_0x3b17c3=',';continue;}if(_0x4ef3dd==='{'||_0x4ef3dd==='['){_0x3a1839+=_0x4ef3dd,_0x3b17c3=_0x4ef3dd;continue;}if(_0x4ef3dd==='}'||_0x4ef3dd===']'){_0x3a1839+=_0x4ef3dd,_0x3b17c3=_0x4ef3dd;continue;}if((_0x3b17c3==='{'||_0x3b17c3===',')&&/[A-Za-z_$]/[_0x7a3e01(0x10e)](_0x4ef3dd)){let _0x256369=_0x4db474+0x1;while(/[A-Za-z0-9_$]/[_0x7a3e01(0x10e)](_0x5e3844[_0x256369]??''))_0x256369++;let _0x2ce8bf=_0x256369;while(/\s/[_0x7a3e01(0x10e)](_0x5e3844[_0x2ce8bf]??''))_0x2ce8bf++;if(_0x5e3844[_0x2ce8bf]===':'){_0x3a1839+=JSON[_0x7a3e01(0xf0)](_0x5e3844[_0x7a3e01(0x118)](_0x4db474,_0x256369)),_0x4db474=_0x256369-0x1,_0x3b17c3='key';continue;}}_0x3a1839+=_0x4ef3dd;if(!/\s/[_0x7a3e01(0x10e)](_0x4ef3dd)&&_0x4ef3dd!==':')_0x3b17c3='value';}return _0x3a1839;}function parseGeneratedRegistryJson(_0x207ce8){const _0x349027=a6_0x3ec527;try{return JSON[_0x349027(0xf4)](_0x207ce8);}catch{return JSON[_0x349027(0xf4)](generatedObjectLiteralToJson(_0x207ce8));}}function normalizeModelEntries(_0x451c53,_0x4ca9ae){const _0x2d4c25=a6_0x3ec527,_0x1655fd=Object[_0x2d4c25(0xf8)](_0x451c53),_0x1572c7=[];for(const _0x18e2de of _0x4ca9ae){if(!_0x18e2de||typeof _0x18e2de!=='object'||Array['isArray'](_0x18e2de))return undefined;const _0x4d3378=_0x18e2de;if(typeof _0x4d3378[_0x2d4c25(0x10d)]!=='string'||typeof _0x4d3378[_0x2d4c25(0xfa)]!==_0x2d4c25(0xff)||typeof _0x4d3378[_0x2d4c25(0xfe)]!==_0x2d4c25(0xff))return undefined;let _0x4cc205;if(typeof _0x4d3378[_0x2d4c25(0xf3)]===_0x2d4c25(0xff)&&_0x4d3378['datasetCodes']===undefined)_0x4cc205=Object[_0x2d4c25(0xf2)](_0x1655fd['map'](_0x135c7d=>[_0x135c7d,_0x4d3378[_0x2d4c25(0xf3)]]));else{if(_0x4d3378[_0x2d4c25(0xf3)]===undefined&&_0x4d3378[_0x2d4c25(0xf6)]&&typeof _0x4d3378['datasetCodes']===_0x2d4c25(0x119)&&!Array['isArray'](_0x4d3378[_0x2d4c25(0xf6)])&&Object['values'](_0x4d3378[_0x2d4c25(0xf6)])[_0x2d4c25(0xef)](_0x323ba9=>typeof _0x323ba9===_0x2d4c25(0xff)))_0x4cc205={..._0x4d3378[_0x2d4c25(0xf6)]};else return undefined;}_0x1572c7[_0x2d4c25(0x101)]({'alias':_0x4d3378[_0x2d4c25(0x10d)],'tableName':_0x4d3378[_0x2d4c25(0xfa)],'name':_0x4d3378[_0x2d4c25(0xfe)],'datasetCodes':_0x4cc205});}return _0x1572c7;}export function parseModelRegistry(_0x401db2){const _0x4b404f=a6_0x3ec527,_0x256c65=extractRegistryJson(_0x401db2);if(!_0x256c65)return undefined;try{const _0x4656ce=parseGeneratedRegistryJson(_0x256c65);if(typeof _0x4656ce[_0x4b404f(0x11a)]!==_0x4b404f(0xff)||!_0x4656ce[_0x4b404f(0x109)]||typeof _0x4656ce[_0x4b404f(0x109)]!==_0x4b404f(0x119))return undefined;if(_0x4656ce[_0x4b404f(0x12f)]==='lovrabet-model-registry/v1')return migrateLegacyRegistry(_0x4656ce);if(!(_0x4656ce['protocol']===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x4656ce['protocol']===undefined&&_0x401db2['includes'](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x4b404f(0xf7)](_0x4656ce[_0x4b404f(0x12a)]))return undefined;const _0x292b4f=_0x4656ce[_0x4b404f(0x109)],_0x37e55d=normalizeModelEntries(_0x292b4f,_0x4656ce[_0x4b404f(0x12a)]);if(!_0x37e55d)return undefined;return{'defaultProfile':_0x4656ce[_0x4b404f(0x11a)],'profiles':_0x292b4f,'models':_0x37e55d};}catch{return undefined;}}export function readModelRegistry(_0x52abc9){if(!existsSync(_0x52abc9))return undefined;try{return parseModelRegistry(readFileSync(_0x52abc9,'utf8'));}catch{return undefined;}}function registrySource(_0x2f20e6){const _0xbcd43c=a6_0x3ec527,_0x326cfc=Object['keys'](_0x2f20e6[_0xbcd43c(0x109)]),_0x48b96a=_0x2f20e6[_0xbcd43c(0x12a)][_0xbcd43c(0xf9)](_0x10d3ae=>{const _0x165a54=_0xbcd43c,_0x4d05c9=_0x326cfc[_0x165a54(0xf9)](_0xc33756=>_0x10d3ae[_0x165a54(0xf6)][_0xc33756]),_0xe81e4=_0x4d05c9[0x0],_0xe46335=_0xe81e4!==undefined&&_0x4d05c9['every'](_0x39d653=>_0x39d653===_0xe81e4),_0x4b5ac2={'alias':_0x10d3ae[_0x165a54(0x10d)],'tableName':_0x10d3ae['tableName'],'name':_0x10d3ae[_0x165a54(0xfe)]};return _0xe46335?{..._0x4b5ac2,'datasetCode':_0xe81e4}:{..._0x4b5ac2,'datasetCodes':_0x10d3ae[_0x165a54(0xf6)]};}),_0x543f1c=JSON['stringify']({'defaultProfile':_0x2f20e6[_0xbcd43c(0x11a)],'profiles':_0x2f20e6[_0xbcd43c(0x109)],'models':_0x48b96a},null,0x2)[_0xbcd43c(0x124)]('\x0a')['map'](_0x29a0ed=>'\x20\x20'+_0x29a0ed)[_0xbcd43c(0x114)]('\x0a');return _0xbcd43c(0x11f)+MODEL_REGISTRY_VERSION_MARKER+_0xbcd43c(0x121)+REGISTRY_START+'\x0a'+_0x543f1c+'\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a'+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x3fe06c,_0x3270ad,_0x30b633){const _0x588327=a6_0x3ec527,_0xbb1f72=_0x30b633[_0x588327(0xf9)](_0xdf178a=>({..._0xdf178a,'alias':_0xdf178a[_0x588327(0x10d)]||_0xdf178a['tableName']})),_0x37ea0e=new Map(),_0x241997=new Map();for(const _0x17fce5 of _0xbb1f72){const _0x31ea67=_0x37ea0e[_0x588327(0xfc)](_0x17fce5[_0x588327(0x10d)]);if(_0x31ea67&&_0x31ea67!==_0x17fce5[_0x588327(0xfa)])throw new Error(_0x588327(0x108)+_0x17fce5[_0x588327(0x10d)]+_0x588327(0xf5)+_0x31ea67+_0x588327(0x10b)+_0x17fce5[_0x588327(0xfa)]+_0x588327(0x116)+_0x3270ad+'\x22.');const _0x39b896=_0x241997[_0x588327(0xfc)](_0x17fce5['tableName']);if(_0x39b896&&_0x39b896!==_0x17fce5['alias'])throw new Error('Table\x20\x22'+_0x17fce5[_0x588327(0xfa)]+_0x588327(0x125)+_0x39b896+_0x588327(0x10b)+_0x17fce5['alias']+_0x588327(0x116)+_0x3270ad+'\x22.');_0x37ea0e[_0x588327(0x12d)](_0x17fce5[_0x588327(0x10d)],_0x17fce5[_0x588327(0xfa)]),_0x241997[_0x588327(0x12d)](_0x17fce5[_0x588327(0xfa)],_0x17fce5[_0x588327(0x10d)]);const _0x1cd4ff=_0x3fe06c['models'][_0x588327(0x10a)](_0x3b48c7=>_0x3b48c7[_0x588327(0x10d)]===_0x17fce5[_0x588327(0x10d)]);if(_0x1cd4ff&&_0x1cd4ff['tableName']!==_0x17fce5['tableName'])throw new Error(_0x588327(0x108)+_0x17fce5[_0x588327(0x10d)]+'\x22\x20maps\x20to\x20table\x20\x22'+_0x1cd4ff[_0x588327(0xfa)]+_0x588327(0x120)+_0x17fce5[_0x588327(0xfa)]+_0x588327(0x116)+_0x3270ad+'\x22.');const _0x327a0a=_0x3fe06c[_0x588327(0x12a)][_0x588327(0x10a)](_0x59674e=>_0x59674e[_0x588327(0xfa)]===_0x17fce5['tableName']);if(_0x327a0a&&_0x327a0a[_0x588327(0x10d)]!==_0x17fce5[_0x588327(0x10d)])throw new Error('Table\x20\x22'+_0x17fce5[_0x588327(0xfa)]+'\x22\x20maps\x20to\x20alias\x20\x22'+_0x327a0a['alias']+_0x588327(0x120)+_0x17fce5['alias']+_0x588327(0x116)+_0x3270ad+'\x22.');}for(const _0x45c04c of _0x3fe06c['models']){delete _0x45c04c[_0x588327(0xf6)][_0x3270ad];}for(const _0x1a723a of _0xbb1f72){let _0x4d3e80=_0x3fe06c['models'][_0x588327(0x10a)](_0x359dfb=>_0x359dfb['alias']===_0x1a723a[_0x588327(0x10d)]);!_0x4d3e80&&(_0x4d3e80={'alias':_0x1a723a[_0x588327(0x10d)],'tableName':_0x1a723a[_0x588327(0xfa)],'name':_0x1a723a['name'],'datasetCodes':{}},_0x3fe06c[_0x588327(0x12a)][_0x588327(0x101)](_0x4d3e80)),(_0x3270ad===_0x3fe06c[_0x588327(0x11a)]||!_0x4d3e80[_0x588327(0xf6)][_0x3fe06c['defaultProfile']])&&(_0x4d3e80[_0x588327(0x10d)]=_0x1a723a['alias'],_0x4d3e80[_0x588327(0xfa)]=_0x1a723a['tableName'],_0x4d3e80[_0x588327(0xfe)]=_0x1a723a[_0x588327(0xfe)]),_0x4d3e80[_0x588327(0xf6)][_0x3270ad]=_0x1a723a['datasetCode'];}_0x3fe06c[_0x588327(0x12a)]=_0x3fe06c[_0x588327(0x12a)][_0x588327(0x128)](_0xe33f25=>Object[_0x588327(0xf8)](_0xe33f25['datasetCodes'])['length']>0x0);}function removeUnboundProfiles(_0x1061d2){const _0x38f9f0=a6_0x3ec527,_0x8dc340=Object['entries'](_0x1061d2['profiles'])[_0x38f9f0(0x128)](([,_0x25faf7])=>_0x25faf7['appCode']===_0x38f9f0(0x102))[_0x38f9f0(0xf9)](([_0x3f6fed])=>_0x3f6fed);if(_0x8dc340[_0x38f9f0(0x123)]===0x0)return;for(const _0x1287f0 of _0x8dc340){delete _0x1061d2[_0x38f9f0(0x109)][_0x1287f0];for(const _0xb9f515 of _0x1061d2[_0x38f9f0(0x12a)]){delete _0xb9f515[_0x38f9f0(0xf6)][_0x1287f0];}}_0x1061d2[_0x38f9f0(0x12a)]=_0x1061d2[_0x38f9f0(0x12a)][_0x38f9f0(0x128)](_0x5987c8=>Object[_0x38f9f0(0xf8)](_0x5987c8['datasetCodes'])['length']>0x0);}export function getProfileModels(_0x241bb8,_0x3f103d){const _0x1f44e0=a6_0x3ec527;return _0x241bb8[_0x1f44e0(0x12a)][_0x1f44e0(0x129)](_0x6e9d29=>{const _0x4a9526=_0x1f44e0,_0x21a9a9=_0x6e9d29['datasetCodes'][_0x3f103d];return _0x21a9a9?[{'datasetCode':_0x21a9a9,'tableName':_0x6e9d29['tableName'],'name':_0x6e9d29['name'],'alias':_0x6e9d29[_0x4a9526(0x10d)]}]:[];});}export function updateModelRegistry(_0x104e71){const _0xa5c0bb=a6_0x3ec527,_0x4556f2=a6_0xffc5aa['join'](_0x104e71['outputDir'],MODEL_REGISTRY_FILE_NAME),_0xf4944b=existsSync(_0x4556f2),_0x43745f=readModelRegistry(_0x4556f2);if(_0xf4944b&&!_0x43745f)throw new Error(MODEL_REGISTRY_FILE_NAME+_0xa5c0bb(0x10c));const _0x520387=_0x43745f??emptyRegistry(_0x104e71['defaultProfile']);if(_0x104e71['appCode']!=='NOT-SET')removeUnboundProfiles(_0x520387);const _0x3fa8de=_0x43745f?getProfileModels(_0x43745f,_0x104e71[_0xa5c0bb(0x11c)])['length']:0x0;if(_0x3fa8de>0x0&&_0x104e71[_0xa5c0bb(0x12a)]['length']===0x0&&!_0x104e71[_0xa5c0bb(0x111)])throw new Error('Refusing\x20to\x20replace\x20'+_0x3fa8de+'\x20model(s)\x20in\x20profile\x20\x22'+_0x104e71[_0xa5c0bb(0x11c)]+'\x22\x20with\x20an\x20empty\x20result.\x20'+'Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.');_0x520387[_0xa5c0bb(0x11a)]=_0x104e71[_0xa5c0bb(0x11a)],_0x520387['profiles'][_0x104e71[_0xa5c0bb(0x11c)]]={'appCode':_0x104e71[_0xa5c0bb(0x11e)],'runtimeDomain':_0x104e71[_0xa5c0bb(0xfd)]},mergeProfileModels(_0x520387,_0x104e71['profileName'],_0x104e71[_0xa5c0bb(0x12a)]),mkdirSync(_0x104e71[_0xa5c0bb(0x110)],{'recursive':!![]});const _0x4ea2b0=_0x4556f2+'.'+process['pid']+'.'+Date['now']()+_0xa5c0bb(0x131);try{writeFileSync(_0x4ea2b0,registrySource(_0x520387),{'encoding':_0xa5c0bb(0x100),'mode':0x1a4}),renameSync(_0x4ea2b0,_0x4556f2);}catch(_0x32cca3){try{unlinkSync(_0x4ea2b0);}catch{}throw _0x32cca3;}return{'path':_0x4556f2,'registry':_0x520387,'existed':_0xf4944b};}
|
|
1
|
+
const a6_0x906e4c=a6_0x4b21;(function(_0x2f50f6,_0x578d14){const _0x3a2d34=a6_0x4b21,_0x2081d1=_0x2f50f6();while(!![]){try{const _0x44cfd8=parseInt(_0x3a2d34(0x10d))/0x1*(parseInt(_0x3a2d34(0x100))/0x2)+-parseInt(_0x3a2d34(0xed))/0x3*(-parseInt(_0x3a2d34(0x112))/0x4)+parseInt(_0x3a2d34(0x103))/0x5+-parseInt(_0x3a2d34(0xf5))/0x6*(parseInt(_0x3a2d34(0x10e))/0x7)+parseInt(_0x3a2d34(0x102))/0x8+-parseInt(_0x3a2d34(0xfe))/0x9*(parseInt(_0x3a2d34(0x119))/0xa)+parseInt(_0x3a2d34(0x121))/0xb;if(_0x44cfd8===_0x578d14)break;else _0x2081d1['push'](_0x2081d1['shift']());}catch(_0x43a04b){_0x2081d1['push'](_0x2081d1['shift']());}}}(a6_0x3ab9,0x5f5a4));function a6_0x4b21(_0x49a64c,_0x24da0b){_0x49a64c=_0x49a64c-0xdd;const _0x3ab98a=a6_0x3ab9();let _0x4b210f=_0x3ab98a[_0x49a64c];return _0x4b210f;}import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x282403 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x906e4c(0xf8);export const MODEL_RUNTIME_FILE_NAME=a6_0x906e4c(0xe2);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x906e4c(0x124);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x906e4c(0x10a),REGISTRY_START='/*\x20rabetbase-model-registry:start\x20*/',REGISTRY_END=a6_0x906e4c(0x114);function emptyRegistry(_0x1b5026){return{'defaultProfile':_0x1b5026,'profiles':{},'models':[]};}function extractRegistryJson(_0x36b031){const _0x4b853c=a6_0x906e4c,_0x418e83=_0x36b031['indexOf'](REGISTRY_START),_0x5b31b4=_0x36b031['indexOf'](REGISTRY_END);if(_0x418e83<0x0||_0x5b31b4<=_0x418e83)return undefined;return _0x36b031[_0x4b853c(0xff)](_0x418e83+REGISTRY_START[_0x4b853c(0xf0)],_0x5b31b4)[_0x4b853c(0x110)]()[_0x4b853c(0xe0)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x4b853c(0xe0)](/;$/,'');}function a6_0x3ab9(){const _0x2f8fc9=['protocol','isArray','set','11046CvTpXh','profileName','models','models.generated.ts','alias','\x22\x20and\x20\x22','map','includes','find','45UYOyNi','slice','4282rNvrbB','Model\x20alias\x20\x22','2001136nXVzLh','3086885oedRdw','runtimeDomain','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','datasetCodes','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','value','NOT-SET','lovrabet-model-registry/v2','outputDir','test','232soxaMt','2429jvjxFj','Table\x20\x22','trim','push','109964XwhWAA','get','/*\x20rabetbase-model-registry:end\x20*/','profiles','defaultProfile','\x22\x20in\x20the\x20registry\x20but\x20\x22','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','1249370gMhDdq','keys','stringify','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','every','utf8','pid','\x22\x20maps\x20to\x20both\x20\x22','1676290tKDfkz','key','\x20model(s)\x20in\x20profile\x20\x22','/*\x20rabetbase-model-registry:v2\x20*/','flatMap','\x22\x20in\x20profile\x20\x22','tableName','entries','fromEntries','replace','object','model-runtime.ts','filter','values','string','parse','join','datasetCode','name','now','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','.tmp','15LrAMVl','/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a','\x22\x20maps\x20to\x20table\x20\x22','length','appCode'];a6_0x3ab9=function(){return _0x2f8fc9;};return a6_0x3ab9();}function migrateLegacyRegistry(_0x24274f){const _0x4e9238=a6_0x906e4c,_0xcbc52d=emptyRegistry(_0x24274f[_0x4e9238(0x116)]);for(const [_0x57499f,_0x54ae58]of Object[_0x4e9238(0xde)](_0x24274f[_0x4e9238(0x115)])){_0xcbc52d[_0x4e9238(0x115)][_0x57499f]={'appCode':_0x54ae58['appCode'],'runtimeDomain':_0x54ae58['runtimeDomain']},mergeProfileModels(_0xcbc52d,_0x57499f,_0x54ae58[_0x4e9238(0xf7)]);}return _0xcbc52d;}function generatedObjectLiteralToJson(_0x29fa13){const _0x31e3bb=a6_0x906e4c;let _0x277afe='',_0x5bce76,_0x5ccac5=![],_0x17199e;for(let _0x23e760=0x0;_0x23e760<_0x29fa13['length'];_0x23e760++){const _0x24c2a5=_0x29fa13[_0x23e760];if(_0x5bce76){_0x277afe+=_0x24c2a5;if(_0x5ccac5)_0x5ccac5=![];else{if(_0x24c2a5==='\x5c')_0x5ccac5=!![];else{if(_0x24c2a5===_0x5bce76)_0x5bce76=undefined;}}continue;}if(_0x24c2a5==='\x22'){_0x5bce76=_0x24c2a5,_0x277afe+=_0x24c2a5,_0x17199e=_0x31e3bb(0x108);continue;}if(_0x24c2a5===','){let _0x4fa34e=_0x23e760+0x1;while(/\s/['test'](_0x29fa13[_0x4fa34e]??''))_0x4fa34e++;if(_0x29fa13[_0x4fa34e]==='}'||_0x29fa13[_0x4fa34e]===']')continue;_0x277afe+=_0x24c2a5,_0x17199e=',';continue;}if(_0x24c2a5==='{'||_0x24c2a5==='['){_0x277afe+=_0x24c2a5,_0x17199e=_0x24c2a5;continue;}if(_0x24c2a5==='}'||_0x24c2a5===']'){_0x277afe+=_0x24c2a5,_0x17199e=_0x24c2a5;continue;}if((_0x17199e==='{'||_0x17199e===',')&&/[A-Za-z_$]/[_0x31e3bb(0x10c)](_0x24c2a5)){let _0x3b364a=_0x23e760+0x1;while(/[A-Za-z0-9_$]/[_0x31e3bb(0x10c)](_0x29fa13[_0x3b364a]??''))_0x3b364a++;let _0x5a7e4d=_0x3b364a;while(/\s/[_0x31e3bb(0x10c)](_0x29fa13[_0x5a7e4d]??''))_0x5a7e4d++;if(_0x29fa13[_0x5a7e4d]===':'){_0x277afe+=JSON[_0x31e3bb(0x11b)](_0x29fa13[_0x31e3bb(0xff)](_0x23e760,_0x3b364a)),_0x23e760=_0x3b364a-0x1,_0x17199e=_0x31e3bb(0x122);continue;}}_0x277afe+=_0x24c2a5;if(!/\s/[_0x31e3bb(0x10c)](_0x24c2a5)&&_0x24c2a5!==':')_0x17199e=_0x31e3bb(0x108);}return _0x277afe;}function parseGeneratedRegistryJson(_0x2f44a8){const _0x7dcd0=a6_0x906e4c;try{return JSON[_0x7dcd0(0xe6)](_0x2f44a8);}catch{return JSON[_0x7dcd0(0xe6)](generatedObjectLiteralToJson(_0x2f44a8));}}function normalizeModelEntries(_0x5704f2,_0x2ea7fa){const _0x543c3c=a6_0x906e4c,_0x212c70=Object['keys'](_0x5704f2),_0x5c2c2f=[];for(const _0xabf4be of _0x2ea7fa){if(!_0xabf4be||typeof _0xabf4be!=='object'||Array[_0x543c3c(0xf3)](_0xabf4be))return undefined;const _0x24b9b8=_0xabf4be;if(typeof _0x24b9b8[_0x543c3c(0xf9)]!==_0x543c3c(0xe5)||typeof _0x24b9b8['tableName']!==_0x543c3c(0xe5)||typeof _0x24b9b8[_0x543c3c(0xe9)]!==_0x543c3c(0xe5))return undefined;let _0x3681bf;if(typeof _0x24b9b8[_0x543c3c(0xe8)]===_0x543c3c(0xe5)&&_0x24b9b8[_0x543c3c(0x106)]===undefined)_0x3681bf=Object[_0x543c3c(0xdf)](_0x212c70['map'](_0x573865=>[_0x573865,_0x24b9b8[_0x543c3c(0xe8)]]));else{if(_0x24b9b8['datasetCode']===undefined&&_0x24b9b8[_0x543c3c(0x106)]&&typeof _0x24b9b8['datasetCodes']===_0x543c3c(0xe1)&&!Array[_0x543c3c(0xf3)](_0x24b9b8[_0x543c3c(0x106)])&&Object[_0x543c3c(0xe4)](_0x24b9b8[_0x543c3c(0x106)])[_0x543c3c(0x11d)](_0x2f2ae0=>typeof _0x2f2ae0===_0x543c3c(0xe5)))_0x3681bf={..._0x24b9b8[_0x543c3c(0x106)]};else return undefined;}_0x5c2c2f[_0x543c3c(0x111)]({'alias':_0x24b9b8[_0x543c3c(0xf9)],'tableName':_0x24b9b8[_0x543c3c(0xdd)],'name':_0x24b9b8[_0x543c3c(0xe9)],'datasetCodes':_0x3681bf});}return _0x5c2c2f;}export function parseModelRegistry(_0x1135b0){const _0x3d8085=a6_0x906e4c,_0x422276=extractRegistryJson(_0x1135b0);if(!_0x422276)return undefined;try{const _0xbee4bd=parseGeneratedRegistryJson(_0x422276);if(typeof _0xbee4bd[_0x3d8085(0x116)]!==_0x3d8085(0xe5)||!_0xbee4bd[_0x3d8085(0x115)]||typeof _0xbee4bd[_0x3d8085(0x115)]!=='object')return undefined;if(_0xbee4bd[_0x3d8085(0xf2)]==='lovrabet-model-registry/v1')return migrateLegacyRegistry(_0xbee4bd);if(!(_0xbee4bd[_0x3d8085(0xf2)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0xbee4bd[_0x3d8085(0xf2)]===undefined&&_0x1135b0[_0x3d8085(0xfc)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x3d8085(0xf3)](_0xbee4bd[_0x3d8085(0xf7)]))return undefined;const _0x2bd65c=_0xbee4bd['profiles'],_0x3bd051=normalizeModelEntries(_0x2bd65c,_0xbee4bd[_0x3d8085(0xf7)]);if(!_0x3bd051)return undefined;return{'defaultProfile':_0xbee4bd['defaultProfile'],'profiles':_0x2bd65c,'models':_0x3bd051};}catch{return undefined;}}export function readModelRegistry(_0x1a2cf9){if(!existsSync(_0x1a2cf9))return undefined;try{return parseModelRegistry(readFileSync(_0x1a2cf9,'utf8'));}catch{return undefined;}}function registrySource(_0x30b90c){const _0x229ddb=a6_0x906e4c,_0x3443f2=Object['keys'](_0x30b90c[_0x229ddb(0x115)]),_0x4bbb7a=_0x30b90c[_0x229ddb(0xf7)][_0x229ddb(0xfb)](_0x42dbc0=>{const _0x4f6990=_0x229ddb,_0x4c9091=_0x3443f2[_0x4f6990(0xfb)](_0x4a85b5=>_0x42dbc0['datasetCodes'][_0x4a85b5]),_0x31cadb=_0x4c9091[0x0],_0x443d5b=_0x31cadb!==undefined&&_0x4c9091[_0x4f6990(0x11d)](_0x3ee07f=>_0x3ee07f===_0x31cadb),_0x174660={'alias':_0x42dbc0[_0x4f6990(0xf9)],'tableName':_0x42dbc0[_0x4f6990(0xdd)],'name':_0x42dbc0['name']};return _0x443d5b?{..._0x174660,'datasetCode':_0x31cadb}:{..._0x174660,'datasetCodes':_0x42dbc0['datasetCodes']};}),_0x13d790=JSON['stringify']({'defaultProfile':_0x30b90c[_0x229ddb(0x116)],'profiles':_0x30b90c[_0x229ddb(0x115)],'models':_0x4bbb7a},null,0x2)['split']('\x0a')[_0x229ddb(0xfb)](_0x3e7a5a=>'\x20\x20'+_0x3e7a5a)[_0x229ddb(0xe7)]('\x0a');return _0x229ddb(0xee)+MODEL_REGISTRY_VERSION_MARKER+_0x229ddb(0x105)+REGISTRY_START+'\x0a'+_0x13d790+_0x229ddb(0x118)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x31f068,_0xfcf0fc,_0xdd4dd5){const _0x210876=a6_0x906e4c,_0x1e6314=_0xdd4dd5[_0x210876(0xfb)](_0x220ad9=>({..._0x220ad9,'alias':_0x220ad9[_0x210876(0xf9)]||_0x220ad9[_0x210876(0xdd)]})),_0x1808b0=new Map(),_0xcffb35=new Map();for(const _0xc92d52 of _0x1e6314){const _0x297d51=_0x1808b0[_0x210876(0x113)](_0xc92d52[_0x210876(0xf9)]);if(_0x297d51&&_0x297d51!==_0xc92d52[_0x210876(0xdd)])throw new Error(_0x210876(0x101)+_0xc92d52[_0x210876(0xf9)]+_0x210876(0x120)+_0x297d51+_0x210876(0xfa)+_0xc92d52[_0x210876(0xdd)]+_0x210876(0x126)+_0xfcf0fc+'\x22.');const _0x5bfefe=_0xcffb35[_0x210876(0x113)](_0xc92d52[_0x210876(0xdd)]);if(_0x5bfefe&&_0x5bfefe!==_0xc92d52['alias'])throw new Error('Table\x20\x22'+_0xc92d52[_0x210876(0xdd)]+_0x210876(0x11c)+_0x5bfefe+_0x210876(0xfa)+_0xc92d52['alias']+_0x210876(0x126)+_0xfcf0fc+'\x22.');_0x1808b0[_0x210876(0xf4)](_0xc92d52['alias'],_0xc92d52[_0x210876(0xdd)]),_0xcffb35['set'](_0xc92d52[_0x210876(0xdd)],_0xc92d52['alias']);const _0xe5fba9=_0x31f068[_0x210876(0xf7)][_0x210876(0xfd)](_0x3dfce0=>_0x3dfce0['alias']===_0xc92d52[_0x210876(0xf9)]);if(_0xe5fba9&&_0xe5fba9['tableName']!==_0xc92d52[_0x210876(0xdd)])throw new Error(_0x210876(0x101)+_0xc92d52[_0x210876(0xf9)]+_0x210876(0xef)+_0xe5fba9['tableName']+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0xc92d52['tableName']+'\x22\x20in\x20profile\x20\x22'+_0xfcf0fc+'\x22.');const _0x1d1906=_0x31f068[_0x210876(0xf7)][_0x210876(0xfd)](_0x48fe40=>_0x48fe40[_0x210876(0xdd)]===_0xc92d52[_0x210876(0xdd)]);if(_0x1d1906&&_0x1d1906['alias']!==_0xc92d52[_0x210876(0xf9)])throw new Error(_0x210876(0x10f)+_0xc92d52[_0x210876(0xdd)]+'\x22\x20maps\x20to\x20alias\x20\x22'+_0x1d1906[_0x210876(0xf9)]+_0x210876(0x117)+_0xc92d52[_0x210876(0xf9)]+'\x22\x20in\x20profile\x20\x22'+_0xfcf0fc+'\x22.');}for(const _0x1d383a of _0x31f068['models']){delete _0x1d383a['datasetCodes'][_0xfcf0fc];}for(const _0x38419a of _0x1e6314){let _0x4acc26=_0x31f068[_0x210876(0xf7)]['find'](_0x49d8de=>_0x49d8de['alias']===_0x38419a[_0x210876(0xf9)]);!_0x4acc26&&(_0x4acc26={'alias':_0x38419a[_0x210876(0xf9)],'tableName':_0x38419a[_0x210876(0xdd)],'name':_0x38419a[_0x210876(0xe9)],'datasetCodes':{}},_0x31f068[_0x210876(0xf7)][_0x210876(0x111)](_0x4acc26)),(_0xfcf0fc===_0x31f068['defaultProfile']||!_0x4acc26[_0x210876(0x106)][_0x31f068[_0x210876(0x116)]])&&(_0x4acc26['alias']=_0x38419a[_0x210876(0xf9)],_0x4acc26[_0x210876(0xdd)]=_0x38419a[_0x210876(0xdd)],_0x4acc26[_0x210876(0xe9)]=_0x38419a[_0x210876(0xe9)]),_0x4acc26[_0x210876(0x106)][_0xfcf0fc]=_0x38419a[_0x210876(0xe8)];}_0x31f068[_0x210876(0xf7)]=_0x31f068[_0x210876(0xf7)][_0x210876(0xe3)](_0x2352c9=>Object[_0x210876(0x11a)](_0x2352c9[_0x210876(0x106)])[_0x210876(0xf0)]>0x0);}function removeUnboundProfiles(_0x3f8c3d){const _0x21e308=a6_0x906e4c,_0x134a12=Object[_0x21e308(0xde)](_0x3f8c3d['profiles'])[_0x21e308(0xe3)](([,_0x1f28b0])=>_0x1f28b0['appCode']===_0x21e308(0x109))['map'](([_0x898491])=>_0x898491);if(_0x134a12['length']===0x0)return;for(const _0x2d4290 of _0x134a12){delete _0x3f8c3d[_0x21e308(0x115)][_0x2d4290];for(const _0x2f524d of _0x3f8c3d[_0x21e308(0xf7)]){delete _0x2f524d['datasetCodes'][_0x2d4290];}}_0x3f8c3d[_0x21e308(0xf7)]=_0x3f8c3d[_0x21e308(0xf7)][_0x21e308(0xe3)](_0x56e0dd=>Object[_0x21e308(0x11a)](_0x56e0dd[_0x21e308(0x106)])[_0x21e308(0xf0)]>0x0);}export function getProfileModels(_0x5c1eaf,_0x18ac09){const _0x35b805=a6_0x906e4c;return _0x5c1eaf[_0x35b805(0xf7)][_0x35b805(0x125)](_0x169132=>{const _0x484919=_0x35b805,_0x22b601=_0x169132[_0x484919(0x106)][_0x18ac09];return _0x22b601?[{'datasetCode':_0x22b601,'tableName':_0x169132[_0x484919(0xdd)],'name':_0x169132['name'],'alias':_0x169132[_0x484919(0xf9)]}]:[];});}export function updateModelRegistry(_0xd534b){const _0x3ad5ae=a6_0x906e4c,_0x1fee9a=a6_0x282403[_0x3ad5ae(0xe7)](_0xd534b['outputDir'],MODEL_REGISTRY_FILE_NAME),_0x3730fb=existsSync(_0x1fee9a),_0x2ae67d=readModelRegistry(_0x1fee9a);if(_0x3730fb&&!_0x2ae67d)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x3ad5ae(0x107));const _0x4f4609=_0x2ae67d??emptyRegistry(_0xd534b[_0x3ad5ae(0x116)]);if(_0xd534b['appCode']!==_0x3ad5ae(0x109))removeUnboundProfiles(_0x4f4609);const _0x120ae1=_0x2ae67d?getProfileModels(_0x2ae67d,_0xd534b['profileName'])['length']:0x0;if(_0x120ae1>0x0&&_0xd534b[_0x3ad5ae(0xf7)][_0x3ad5ae(0xf0)]===0x0&&!_0xd534b['allowEmptyReplacement'])throw new Error('Refusing\x20to\x20replace\x20'+_0x120ae1+_0x3ad5ae(0x123)+_0xd534b[_0x3ad5ae(0xf6)]+'\x22\x20with\x20an\x20empty\x20result.\x20'+_0x3ad5ae(0xeb));_0x4f4609[_0x3ad5ae(0x116)]=_0xd534b[_0x3ad5ae(0x116)],_0x4f4609[_0x3ad5ae(0x115)][_0xd534b[_0x3ad5ae(0xf6)]]={'appCode':_0xd534b[_0x3ad5ae(0xf1)],'runtimeDomain':_0xd534b[_0x3ad5ae(0x104)]},mergeProfileModels(_0x4f4609,_0xd534b[_0x3ad5ae(0xf6)],_0xd534b[_0x3ad5ae(0xf7)]),mkdirSync(_0xd534b[_0x3ad5ae(0x10b)],{'recursive':!![]});const _0xd56509=_0x1fee9a+'.'+process[_0x3ad5ae(0x11f)]+'.'+Date[_0x3ad5ae(0xea)]()+_0x3ad5ae(0xec);try{writeFileSync(_0xd56509,registrySource(_0x4f4609),{'encoding':_0x3ad5ae(0x11e),'mode':0x1a4}),renameSync(_0xd56509,_0x1fee9a);}catch(_0x2c8acc){try{unlinkSync(_0xd56509);}catch{}throw _0x2c8acc;}return{'path':_0x1fee9a,'registry':_0x4f4609,'existed':_0x3730fb};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a7_0x5978(_0x4caa0b,_0xb1fbd6){_0x4caa0b=_0x4caa0b-0x15b;const _0x2d7131=a7_0x2d71();let _0x5978b2=_0x2d7131[_0x4caa0b];return _0x5978b2;}const a7_0x5f317c=a7_0x5978;(function(_0xdf7a16,_0x31340){const _0x30fd6a=a7_0x5978,_0x5d6542=_0xdf7a16();while(!![]){try{const _0x306891=-parseInt(_0x30fd6a(0x171))/0x1*(parseInt(_0x30fd6a(0x15d))/0x2)+parseInt(_0x30fd6a(0x16a))/0x3+-parseInt(_0x30fd6a(0x161))/0x4+parseInt(_0x30fd6a(0x167))/0x5+parseInt(_0x30fd6a(0x16e))/0x6*(parseInt(_0x30fd6a(0x166))/0x7)+parseInt(_0x30fd6a(0x169))/0x8*(parseInt(_0x30fd6a(0x162))/0x9)+-parseInt(_0x30fd6a(0x170))/0xa*(parseInt(_0x30fd6a(0x16f))/0xb);if(_0x306891===_0x31340)break;else _0x5d6542['push'](_0x5d6542['shift']());}catch(_0x3c63aa){_0x5d6542['push'](_0x5d6542['shift']());}}}(a7_0x2d71,0x496aa));import{readFileSync}from'node:fs';import a7_0x1caa44 from'node:path';import{fileURLToPath}from'node:url';import a7_0x460a1e from'prettier';import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function relativeImport(_0x39f195,_0x49fd39){const _0xabf1b7=a7_0x5978;let _0x364024=a7_0x1caa44['relative'](_0x39f195,_0x49fd39)[_0xabf1b7(0x15b)](/\\/g,'/');if(!_0x364024[_0xabf1b7(0x15e)]('.'))_0x364024='./'+_0x364024;return _0x364024;}function a7_0x2d71(){const _0x296c4c=['2452725ipJIRo','join','246832cyaFgy','1125804vaaAEv','dirname','format','typescript','18NabthW','47201AJVbCQ','2050CLQkGN','159370LchfgO','replace','{ProjectRoutingImport}','2bPOmuL','startsWith','cwd','../../templates/generate-api','664532rSVtUQ','27WjhPxx','resolve','profile-client.ts.tpl','model-runtime.ts.tpl','1277493DOPiCV'];a7_0x2d71=function(){return _0x296c4c;};return a7_0x2d71();}export async function renderModelRegistryScaffold(_0xe4e7ee,_0x247595=process[a7_0x5f317c(0x15f)]()){const _0x4554dc=a7_0x5f317c,_0x5e1bbd=fileURLToPath(import.meta.url),_0x2bd0f7=a7_0x1caa44[_0x4554dc(0x163)](a7_0x1caa44[_0x4554dc(0x16b)](_0x5e1bbd),_0x4554dc(0x160)),_0x3b8d1b=relativeImport(a7_0x1caa44[_0x4554dc(0x163)](_0xe4e7ee),a7_0x1caa44[_0x4554dc(0x163)](_0x247595,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x3f316b=readFileSync(a7_0x1caa44['join'](_0x2bd0f7,'profile-api.ts.tpl'),'utf8')[_0x4554dc(0x15b)](_0x4554dc(0x15c),_0x3b8d1b),[_0x1fc1d6,_0x57a15e,_0x37e7fc]=await Promise['all']([a7_0x460a1e['format'](_0x3f316b,{'parser':_0x4554dc(0x16d)}),a7_0x460a1e[_0x4554dc(0x16c)](readFileSync(a7_0x1caa44[_0x4554dc(0x168)](_0x2bd0f7,_0x4554dc(0x164)),'utf8'),{'parser':_0x4554dc(0x16d)}),a7_0x460a1e[_0x4554dc(0x16c)](readFileSync(a7_0x1caa44[_0x4554dc(0x168)](_0x2bd0f7,_0x4554dc(0x165)),'utf8'),{'parser':'typescript'})]);return{'api':_0x1fc1d6,'client':_0x57a15e,'modelRuntime':_0x37e7fc};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x516278,_0x14c69){const _0xe4b0f0=a8_0x3b8f,_0x3a0e80=_0x516278();while(!![]){try{const _0x50eb69=parseInt(_0xe4b0f0(0x1e0))/0x1+parseInt(_0xe4b0f0(0x1fa))/0x2*(parseInt(_0xe4b0f0(0x1f1))/0x3)+-parseInt(_0xe4b0f0(0x1ee))/0x4*(-parseInt(_0xe4b0f0(0x1eb))/0x5)+-parseInt(_0xe4b0f0(0x200))/0x6*(-parseInt(_0xe4b0f0(0x1f9))/0x7)+-parseInt(_0xe4b0f0(0x1f3))/0x8*(-parseInt(_0xe4b0f0(0x1e2))/0x9)+-parseInt(_0xe4b0f0(0x1f0))/0xa+-parseInt(_0xe4b0f0(0x1f7))/0xb;if(_0x50eb69===_0x14c69)break;else _0x3a0e80['push'](_0x3a0e80['shift']());}catch(_0x288c82){_0x3a0e80['push'](_0x3a0e80['shift']());}}}(a8_0xb077,0x69938));import{existsSync}from'node:fs';import a8_0x5d1fd2 from'node:path';import{readRawConfig}from'../context/config-loader.js';function a8_0xb077(){const _0x194fcd=['filter','6YNZhcB','\x20api\x20pull\x20--app\x20','entries','287398uuMIbT','object','18gZjtqm','cwd','appCode','defaultApp','defaultProfile','appcode','Model\x20profile\x20\x22','join','string','1795270yPbBLy','AppCode\x20\x22','\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20','4kQwTWp','apps','2170180aRDRFu','99UDrdbj','length','2816200oMRPUQ','apiDir','profiles','-api.ts','18383618GvntDu','Run\x20`','2359161HbQCjJ','38374MWtdxa','resolve','`\x20first.','validation','\x22\x20is\x20missing\x20from\x20'];a8_0xb077=function(){return _0x194fcd;};return a8_0xb077();}import{MODEL_REGISTRY_FILE_NAME,readModelRegistry}from'../api/model-registry-file.js';import{CliErrors}from'../errors.js';function a8_0x3b8f(_0x24676f,_0x12809f){_0x24676f=_0x24676f-0x1e0;const _0xb077e5=a8_0xb077();let _0x3b8fa3=_0xb077e5[_0x24676f];return _0x3b8fa3;}import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveApiModelSource(_0x216e66,_0x47cda5,_0x650ef7){const _0x33166f=a8_0x3b8f,_0xf32a91=a8_0x5d1fd2[_0x33166f(0x1fb)](process[_0x33166f(0x1e3)](),_0x216e66),_0x14e97a=a8_0x5d1fd2[_0x33166f(0x1fb)](_0xf32a91,'api.ts'),_0x49cfdb=a8_0x5d1fd2[_0x33166f(0x1fb)](_0xf32a91,MODEL_REGISTRY_FILE_NAME),_0x389cf1=readModelRegistry(_0x49cfdb);if(_0x389cf1){const _0x18ac66=_0x47cda5?Object[_0x33166f(0x202)](_0x389cf1[_0x33166f(0x1f5)])[_0x33166f(0x1ff)](([,_0x2a2369])=>_0x2a2369[_0x33166f(0x1e4)]===_0x47cda5):[];if(_0x650ef7){if(_0x389cf1[_0x33166f(0x1f5)][_0x650ef7])return{'filePath':_0x49cfdb,'profileName':_0x650ef7};if(_0x18ac66['length']>0x0)throw CliErrors[_0x33166f(0x1fd)](_0x33166f(0x1e8)+_0x650ef7+_0x33166f(0x1fe)+MODEL_REGISTRY_FILE_NAME+'.',_0x33166f(0x1f8)+CLI_BIN_NAME+_0x33166f(0x201)+_0x650ef7+_0x33166f(0x1fc));}else{if(_0x18ac66[_0x33166f(0x1f2)]===0x1)return{'filePath':_0x49cfdb,'profileName':_0x18ac66[0x0][0x0]};if(_0x18ac66[_0x33166f(0x1f2)]>0x1)throw new Error(_0x33166f(0x1ec)+_0x47cda5+_0x33166f(0x1ed)+_0x18ac66['map'](([_0x4f6441])=>_0x4f6441)[_0x33166f(0x1e9)](',\x20')+'.\x20'+'Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.');if(_0x389cf1[_0x33166f(0x1f5)][_0x389cf1[_0x33166f(0x1e6)]]&&!_0x47cda5)return{'filePath':_0x49cfdb,'profileName':_0x389cf1['defaultProfile']};}}if(!_0x47cda5&&!_0x650ef7)return{'filePath':_0x14e97a};const _0x551193=readRawConfig(),_0x96cf11=_0x551193['apps']&&typeof _0x551193['apps']===_0x33166f(0x1e1)?_0x551193[_0x33166f(0x1ef)]:{},_0x3bc876=_0x650ef7&&_0x96cf11[_0x650ef7]?[_0x650ef7,_0x96cf11[_0x650ef7]]:Object[_0x33166f(0x202)](_0x96cf11)['find'](([,_0x18a3c0])=>_0x18a3c0?.[_0x33166f(0x1e7)]===_0x47cda5);if(!_0x3bc876)return{'filePath':_0x14e97a};const [_0x145bcd,_0x1f95bd]=_0x3bc876,_0x588438=typeof _0x551193[_0x33166f(0x1e5)]===_0x33166f(0x1ea)?_0x551193[_0x33166f(0x1e5)]:undefined;if(_0x1f95bd?.[_0x33166f(0x1f4)])return{'filePath':_0x14e97a};if(_0x588438&&_0x145bcd!==_0x588438){const _0x4ed3ae=a8_0x5d1fd2[_0x33166f(0x1fb)](_0xf32a91,_0x145bcd+_0x33166f(0x1f6));if(existsSync(_0x4ed3ae))return{'filePath':_0x4ed3ae};}return{'filePath':_0x14e97a};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x16e4cf,_0x15ff33){const _0x3571c2=a9_0x34ea,_0x27eb2f=_0x16e4cf();while(!![]){try{const _0x3a3e81=-parseInt(_0x3571c2(0xd3))/0x1*(parseInt(_0x3571c2(0xc8))/0x2)+-parseInt(_0x3571c2(0xd6))/0x3+-parseInt(_0x3571c2(0xcc))/0x4*(-parseInt(_0x3571c2(0xcf))/0x5)+-parseInt(_0x3571c2(0xc6))/0x6+parseInt(_0x3571c2(0xd2))/0x7*(parseInt(_0x3571c2(0xc1))/0x8)+-parseInt(_0x3571c2(0xbf))/0x9+-parseInt(_0x3571c2(0xc2))/0xa*(-parseInt(_0x3571c2(0xd0))/0xb);if(_0x3a3e81===_0x15ff33)break;else _0x27eb2f['push'](_0x27eb2f['shift']());}catch(_0x5c1408){_0x27eb2f['push'](_0x27eb2f['shift']());}}}(a9_0x2e1d,0x87c34));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a9_0x2e1d(){const _0x1b3c14=['Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','42465UFBPjr','55TkVXrY','No\x20valid\x20session.\x20Login\x20now?','42ezWunk','7324DjNkFS','Run\x20`','start','3140811uRqCiq','7665642jIsqSv','validation','271792EsAIFI','5155090oKDnCT','autoYes','log','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','2111802zCOXaP','!\x20Login\x20failed.','116hqAtJv','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','nonInteractive','*\x20Login\x20successful!','212ngpEWL','โ\x20Valid\x20session\x20detected,\x20no\x20login\x20required.'];a9_0x2e1d=function(){return _0x1b3c14;};return a9_0x2e1d();}import{CLI_BIN_NAME}from'../constant/cli.js';function a9_0x34ea(_0x201725,_0x5c048a){_0x201725=_0x201725-0xbf;const _0x2e1dc6=a9_0x2e1d();let _0x34ea70=_0x2e1dc6[_0x201725];return _0x34ea70;}import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';import a9_0x278c42 from'ora';export async function runAuthServer(_0xb59dfe){const _0x47d3cd=a9_0x34ea,_0xaeea59=await getIsSessionValid();if(_0xaeea59){console['log'](_0x47d3cd(0xcd));return;}if(_0xb59dfe?.[_0x47d3cd(0xca)]&&!_0xb59dfe[_0x47d3cd(0xc3)])throw CliErrors[_0x47d3cd(0xc0)](_0x47d3cd(0xce),_0x47d3cd(0xd4)+CLI_BIN_NAME+'\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.');const _0x1be4f4=_0xb59dfe?.[_0x47d3cd(0xc3)]?!![]:await confirm({'message':_0x47d3cd(0xd1),'default':!![]});if(!_0x1be4f4)return;if(_0xb59dfe?.[_0x47d3cd(0xca)]){console['log'](_0x47d3cd(0xc5));const _0x48c81b=await authServer({'silent':![],'openBrowser':![]});_0x48c81b?console[_0x47d3cd(0xc4)](_0x47d3cd(0xcb)):console[_0x47d3cd(0xc4)]('!\x20Login\x20failed.');return;}const _0x35e1ff=a9_0x278c42(_0x47d3cd(0xc9))[_0x47d3cd(0xd5)](),_0x352766=await authServer({'silent':!![],'openBrowser':!![]});_0x35e1ff['stop'](),_0x352766?console[_0x47d3cd(0xc4)]('*\x20Login\x20successful!'):console['log'](_0x47d3cd(0xc7));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x4a2762=a10_0x489e;(function(_0x2782d9,_0x45c68a){const _0x2cd074=a10_0x489e,_0x3f7ebd=_0x2782d9();while(!![]){try{const _0x37ce88=parseInt(_0x2cd074(0xd0))/0x1+parseInt(_0x2cd074(0xd1))/0x2+parseInt(_0x2cd074(0xc0))/0x3+-parseInt(_0x2cd074(0xce))/0x4*(-parseInt(_0x2cd074(0xcd))/0x5)+-parseInt(_0x2cd074(0xd4))/0x6*(parseInt(_0x2cd074(0xc5))/0x7)+parseInt(_0x2cd074(0xbd))/0x8*(parseInt(_0x2cd074(0xe0))/0x9)+-parseInt(_0x2cd074(0xc1))/0xa*(parseInt(_0x2cd074(0xdb))/0xb);if(_0x37ce88===_0x45c68a)break;else _0x3f7ebd['push'](_0x3f7ebd['shift']());}catch(_0x2d7484){_0x3f7ebd['push'](_0x3f7ebd['shift']());}}}(a10_0x58a2,0xd2187));import{writeFileSync}from'node:fs';import a10_0x268be1 from'node:http';import a10_0x258eaa from'node:https';import{getUserDomain}from'../constant/domain.js';import{getOfficialRoutingCdn,getOfficialRoutingProfile}from'../constant/routing-profile.js';import{getProjectDomainRoutingManifest}from'../config/project-domain-routing.js';import{exec}from'node:child_process';import{getIsSessionValid}from'../auth/is-session-valid.js';import{cookieFile}from'../auth/constant.js';import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export function resolveAuthCallbackRouting(_0x8eb874){const _0x3ea4e4=a10_0x489e;if(!_0x8eb874)return getProjectDomainRoutingManifest()[_0x3ea4e4(0xdd)];const _0x5bd7f7=getOfficialRoutingProfile(_0x8eb874),_0x71a0f9=getOfficialRoutingCdn(_0x8eb874);return{'origin':_0x5bd7f7[_0x3ea4e4(0xdd)]['origin'],'certificateUrl':_0x71a0f9[_0x3ea4e4(0xd8)]+_0x3ea4e4(0xe7)};}function withPort(_0x5d249e,_0x2a0c86){const _0xf2a217=a10_0x489e,_0x39ac31=new URL(_0x5d249e);return _0x39ac31['port']=String(_0x2a0c86),_0x39ac31[_0xf2a217(0xdc)];}export async function authServer(_0x4dc0a8){const _0x160f3e=a10_0x489e,_0x3d93e7=_0x4dc0a8?.[_0x160f3e(0xc9)]||![],_0x2ce205=_0x4dc0a8?.[_0x160f3e(0xe8)]??!![],_0x1e9d77=_0x4dc0a8?.[_0x160f3e(0xc7)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x192bb6=resolveAuthCallbackRouting(),_0x4ecead=_0x192bb6[_0x160f3e(0xc6)]?await(await fetch(_0x192bb6[_0x160f3e(0xc6)]))[_0x160f3e(0xd5)]():undefined;return new Promise(async(_0x2c33af,_0x46be70)=>{const _0x459a9d=_0x160f3e;let _0x320f34=0x0,_0x282774=![],_0x1d5048;const _0x145950=async(_0x51cf9d,_0x4a640c)=>{const _0x2abd67=a10_0x489e,_0x2b9b33=getUserDomain(),_0x323df4=_0x51cf9d[_0x2abd67(0xe3)][_0x2abd67(0xc2)]||'',_0x2b1648=await fetch(_0x2b9b33+_0x2abd67(0xcf),{'headers':{'cookie':_0x323df4}})['then'](_0x169989=>_0x169989[_0x2abd67(0xd5)]()),_0x34ff15=_0x2b1648&&_0x2b1648[_0x2abd67(0xcc)]&&_0x2b1648[_0x2abd67(0xeb)];if(_0x34ff15){writeFileSync(cookieFile,_0x323df4,_0x2abd67(0xe9));const _0x364ceb=buildLoginSuccessHtml();_0x4a640c[_0x2abd67(0xe2)](0xc8,{'Content-Type':_0x2abd67(0xee)}),_0x4a640c[_0x2abd67(0xdf)](_0x364ceb),_0x5a3967(!![]);}else{const _0x1ab0ff=encodeURIComponent(withPort(_0x192bb6[_0x2abd67(0xdc)],_0x320f34));_0x4a640c[_0x2abd67(0xe2)](0x12e,{'location':_0x2b9b33+_0x2abd67(0xc8)+_0x1ab0ff}),_0x4a640c[_0x2abd67(0xdf)]();return;}},_0x545f34=_0x4ecead?a10_0x258eaa[_0x459a9d(0xca)](_0x4ecead,_0x145950):a10_0x268be1[_0x459a9d(0xca)](_0x145950);function _0x5a3967(_0x2fd38c){const _0x1910c5=_0x459a9d;if(_0x282774)return;_0x282774=!![],_0x1d5048&&clearTimeout(_0x1d5048),_0x545f34[_0x1910c5(0xe6)](),_0x2c33af(_0x2fd38c);}_0x545f34[_0x459a9d(0xef)](0x0,_0x459a9d(0xd6),()=>{const _0x593730=_0x459a9d,_0x26442f=_0x545f34[_0x593730(0xbe)]();_0x320f34=typeof _0x26442f===_0x593730(0xe1)&&_0x26442f?_0x26442f[_0x593730(0xe5)]:Number(_0x26442f);const _0x15b335=withPort(_0x192bb6[_0x593730(0xdc)],_0x320f34);_0x1d5048=setTimeout(()=>{const _0x27a5fb=_0x593730;!_0x3d93e7&&console[_0x27a5fb(0xc4)](_0x27a5fb(0xda)),_0x5a3967(![]);},_0x1e9d77);!_0x3d93e7&&(console[_0x593730(0xc4)](_0x593730(0xbf)),console[_0x593730(0xc4)]('๐\x20Login\x20URL:',_0x15b335),_0x2ce205?(console[_0x593730(0xc4)]('๐\x20Attempting\x20to\x20open\x20browser\x20automatically...'),console[_0x593730(0xc4)](''),console[_0x593730(0xc4)](_0x593730(0xec))):console[_0x593730(0xc4)](_0x593730(0xd2)),console[_0x593730(0xc4)](''));if(!_0x2ce205)return;openInBrowser(_0x15b335)['then'](_0x1cc89a=>{const _0x144db9=_0x593730;!_0x3d93e7&&(_0x1cc89a?console[_0x144db9(0xc4)](_0x144db9(0xc3)):(console[_0x144db9(0xc4)](_0x144db9(0xde)),console[_0x144db9(0xc4)](_0x144db9(0xea),_0x15b335)),console[_0x144db9(0xc4)](''));})[_0x593730(0xd3)](()=>{const _0x102ad9=_0x593730;!_0x3d93e7&&(console[_0x102ad9(0xc4)](_0x102ad9(0xde)),console['log'](_0x102ad9(0xea),_0x15b335),console['log'](''));});}),_0x545f34['on'](_0x459a9d(0xd9),_0x2fa866=>{const _0x145918=_0x459a9d;if(_0x282774)return;_0x282774=!![],_0x1d5048&&clearTimeout(_0x1d5048),!_0x3d93e7&&console['error']('Auth\x20server\x20error:',_0x2fa866),_0x545f34[_0x145918(0xe6)](),_0x46be70(_0x2fa866);});});}function a10_0x489e(_0x4e96b5,_0x1defb8){_0x4e96b5=_0x4e96b5-0xbd;const _0x58a2dd=a10_0x58a2();let _0x489e57=_0x58a2dd[_0x4e96b5];return _0x489e57;}function openInBrowser(_0x277cfe){return new Promise(_0x19f5f5=>{const _0x17beb9=a10_0x489e,_0x583dba=process[_0x17beb9(0xcb)];let _0xd32280;if(_0x583dba==='win32')_0xd32280=_0x17beb9(0xe4)+_0x277cfe+'\x22';else _0x583dba==='darwin'?_0xd32280=_0x17beb9(0xd7)+_0x277cfe+'\x22':_0xd32280='xdg-open\x20\x22'+_0x277cfe+'\x22';exec(_0xd32280,_0x445563=>{_0x445563?_0x19f5f5(![]):_0x19f5f5(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a10_0x4a2762(0xc4)](a10_0x4a2762(0xed),isAuth);}function a10_0x58a2(){const _0x359149=['listen','144fYpVky','address','๐\x20Starting\x20login\x20service...','3047403tbeOoo','2080GlPLLZ','cookie','โ
\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','log','1459115GxgiyV','certificateUrl','timeoutMs','/sign-in?redirect=','silent','createServer','platform','session','5FaxZRA','426988zEhdsp','/api/auth/get-session','78917zaTwim','2337186HgGuUb','๐ก\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','catch','30HKAHvN','json','127.0.0.1','open\x20\x22','lovrabet','error','!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','39523FPQrBR','origin','local','โ ๏ธ\x20\x20Failed\x20to\x20open\x20browser\x20automatically','end','140031svMCdN','object','writeHead','headers','cmd\x20/c\x20start\x20\x22\x22\x20\x22','port','close','/cert/lovrabet-dev.json','openBrowser','utf-8','๐\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','user','๐ก\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','isAuth','text/html;\x20charset=utf-8'];a10_0x58a2=function(){return _0x359149;};return a10_0x58a2();}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a11_0x17249f=a11_0x3461;function a11_0x11e0(){const _0x4f4207=['1081885YNhtNo','6lkqkUu','69262qAweNB','27155385iuzhNX','.lovrabet','1776221HuIjxO','2213476kCsRCR','9738272mqNjyD','6DyknxG','287660WiWgeN','cookie'];a11_0x11e0=function(){return _0x4f4207;};return a11_0x11e0();}(function(_0x33581a,_0xe8384a){const _0x4a7f18=a11_0x3461,_0x43db68=_0x33581a();while(!![]){try{const _0x378c00=parseInt(_0x4a7f18(0x15c))/0x1+parseInt(_0x4a7f18(0x159))/0x2+parseInt(_0x4a7f18(0x15f))/0x3*(parseInt(_0x4a7f18(0x15d))/0x4)+-parseInt(_0x4a7f18(0x160))/0x5*(parseInt(_0x4a7f18(0x163))/0x6)+-parseInt(_0x4a7f18(0x162))/0x7+parseInt(_0x4a7f18(0x15e))/0x8+-parseInt(_0x4a7f18(0x15a))/0x9;if(_0x378c00===_0xe8384a)break;else _0x43db68['push'](_0x43db68['shift']());}catch(_0x546199){_0x43db68['push'](_0x43db68['shift']());}}}(a11_0x11e0,0xdd132));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';function a11_0x3461(_0x4f77ab,_0x3bca89){_0x4f77ab=_0x4f77ab-0x159;const _0x11e0d8=a11_0x11e0();let _0x34619a=_0x11e0d8[_0x4f77ab];return _0x34619a;}export const configDir=join(homedir(),a11_0x17249f(0x15b));export const cookieFile=join(configDir,a11_0x17249f(0x161));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a12_0x3a8f(_0xd20d4d,_0x573242){_0xd20d4d=_0xd20d4d-0xe9;var _0x2c29d2=a12_0x2c29();var _0x3a8f0f=_0x2c29d2[_0xd20d4d];return _0x3a8f0f;}function a12_0x2c29(){var _0x5cab20=['3889675rLpmlm','12LKEcTE','utf-8','6895119yihzIo','1476859CWwfeB','834222yRzXdM','9fCxxQc','6965268EZukFN','3982848XBubmQ','39431352OgOvTW'];a12_0x2c29=function(){return _0x5cab20;};return a12_0x2c29();}(function(_0x22543e,_0x3c2bdf){var _0x28d6b9=a12_0x3a8f,_0x17a986=_0x22543e();while(!![]){try{var _0x5da7ac=-parseInt(_0x28d6b9(0xf0))/0x1+parseInt(_0x28d6b9(0xf1))/0x2*(-parseInt(_0x28d6b9(0xed))/0x3)+-parseInt(_0x28d6b9(0xe9))/0x4+-parseInt(_0x28d6b9(0xec))/0x5+parseInt(_0x28d6b9(0xea))/0x6+parseInt(_0x28d6b9(0xef))/0x7+parseInt(_0x28d6b9(0xeb))/0x8*(parseInt(_0x28d6b9(0xf2))/0x9);if(_0x5da7ac===_0x3c2bdf)break;else _0x17a986['push'](_0x17a986['shift']());}catch(_0x1a3294){_0x17a986['push'](_0x17a986['shift']());}}}(a12_0x2c29,0xdef25));import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0x3860e7=a12_0x3a8f;try{return readFileSync(cookieFile,_0x3860e7(0xee));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x27a1ee,_0x539587){const _0x52deae=a13_0x5782,_0x459240=_0x27a1ee();while(!![]){try{const _0xe6d6a6=-parseInt(_0x52deae(0x1ad))/0x1*(parseInt(_0x52deae(0x1b0))/0x2)+parseInt(_0x52deae(0x1b8))/0x3*(-parseInt(_0x52deae(0x1ac))/0x4)+-parseInt(_0x52deae(0x1b1))/0x5*(parseInt(_0x52deae(0x1ab))/0x6)+-parseInt(_0x52deae(0x1b6))/0x7+parseInt(_0x52deae(0x1b2))/0x8+parseInt(_0x52deae(0x1aa))/0x9*(parseInt(_0x52deae(0x1b7))/0xa)+parseInt(_0x52deae(0x1af))/0xb*(parseInt(_0x52deae(0x1b5))/0xc);if(_0xe6d6a6===_0x539587)break;else _0x459240['push'](_0x459240['shift']());}catch(_0x364bbf){_0x459240['push'](_0x459240['shift']());}}}(a13_0xad96,0x701b4));function a13_0x5782(_0x461dd2,_0x1b52f9){_0x461dd2=_0x461dd2-0x1a9;const _0xad9626=a13_0xad96();let _0x5782dd=_0xad9626[_0x461dd2];return _0x5782dd;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a13_0xad96(){const _0x474d61=['utf-8','2172804dQZvGq','5858545EeXZSu','570dTPlVQ','60LydZMr','session','49491EYDnNE','527358bPiiOx','75476DzfMjw','101pHtuwx','user','121QRVvAP','9466CFZRES','15gYaVft','880280USCzPl','/api/auth/get-session'];a13_0xad96=function(){return _0x474d61;};return a13_0xad96();}export async function getSessionUserInfo(){const _0x1f6f1f=a13_0x5782;try{if(!existsSync(cookieFile))return null;const _0x2cb521=readFileSync(cookieFile,_0x1f6f1f(0x1b4)),_0x35e212=await fetch(getUserDomain()+_0x1f6f1f(0x1b3),{'headers':{'cookie':_0x2cb521}});if(!_0x35e212['ok'])return null;const _0x157df0=await _0x35e212['json']();if(!_0x157df0[_0x1f6f1f(0x1a9)]||!_0x157df0[_0x1f6f1f(0x1ae)])return null;return _0x157df0;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x177b9d,_0x2c36b2){const _0x5222b2=a14_0xf1b3,_0x5caafb=_0x177b9d();while(!![]){try{const _0x5be870=-parseInt(_0x5222b2(0x1cd))/0x1*(parseInt(_0x5222b2(0x1d6))/0x2)+parseInt(_0x5222b2(0x1cf))/0x3*(parseInt(_0x5222b2(0x1d7))/0x4)+parseInt(_0x5222b2(0x1d0))/0x5+parseInt(_0x5222b2(0x1d5))/0x6*(-parseInt(_0x5222b2(0x1d9))/0x7)+-parseInt(_0x5222b2(0x1d3))/0x8*(parseInt(_0x5222b2(0x1d4))/0x9)+parseInt(_0x5222b2(0x1da))/0xa+-parseInt(_0x5222b2(0x1ce))/0xb*(-parseInt(_0x5222b2(0x1d8))/0xc);if(_0x5be870===_0x2c36b2)break;else _0x5caafb['push'](_0x5caafb['shift']());}catch(_0x102e12){_0x5caafb['push'](_0x5caafb['shift']());}}}(a14_0x4e01,0x28ce1));function a14_0xf1b3(_0xea88a9,_0xedc3fe){_0xea88a9=_0xea88a9-0x1cd;const _0x4e019c=a14_0x4e01();let _0xf1b3e=_0x4e019c[_0xea88a9];return _0xf1b3e;}function a14_0x4e01(){const _0x1e495e=['user','7825BojWRu','1056oehUyE','2169adtUJR','594290rjgAnE','/api/auth/get-session','utf-8','2485224gHoSvo','9ARNQNY','1333398kkPume','70OyfaHA','824HLnoOR','66192KshUPp','7KlldLA','1765660Ygjaws','session'];a14_0x4e01=function(){return _0x1e495e;};return a14_0x4e01();}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x3f0f33=a14_0xf1b3;try{if(!existsSync(cookieFile))return![];const _0x394575=readFileSync(cookieFile,_0x3f0f33(0x1d2)),_0x5010be=await fetch(getUserDomain()+_0x3f0f33(0x1d1),{'headers':{'cookie':_0x394575}})['then'](_0x832a65=>_0x832a65['json']());return _0x5010be&&_0x5010be[_0x3f0f33(0x1db)]&&_0x5010be[_0x3f0f33(0x1dc)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a15_0x51a3(){const _0x472cfc=['134944FEpIWn','792279IRuBvU','</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>','3159513EsAsNR','<!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>','7423068upGAKk','445191sggsMD','1659972jOSEPy','135BaUpvC','178759WaZJiT','248PgrHFl'];a15_0x51a3=function(){return _0x472cfc;};return a15_0x51a3();}(function(_0x1e78a1,_0xee6aeb){const _0x4ae83e=a15_0x2d75,_0x2e7803=_0x1e78a1();while(!![]){try{const _0x16d651=parseInt(_0x4ae83e(0x187))/0x1+parseInt(_0x4ae83e(0x18d))/0x2+-parseInt(_0x4ae83e(0x18c))/0x3+-parseInt(_0x4ae83e(0x186))/0x4*(parseInt(_0x4ae83e(0x18e))/0x5)+parseInt(_0x4ae83e(0x18b))/0x6+parseInt(_0x4ae83e(0x184))/0x7*(-parseInt(_0x4ae83e(0x185))/0x8)+-parseInt(_0x4ae83e(0x189))/0x9;if(_0x16d651===_0xee6aeb)break;else _0x2e7803['push'](_0x2e7803['shift']());}catch(_0x3d941a){_0x2e7803['push'](_0x2e7803['shift']());}}}(a15_0x51a3,0xa083e));function a15_0x2d75(_0x1ac313,_0x2c7dea){_0x1ac313=_0x1ac313-0x184;const _0x51a334=a15_0x51a3();let _0x2d7523=_0x51a334[_0x1ac313];return _0x2d7523;}export function buildLoginSuccessHtml(){const _0x59b08c=a15_0x2d75,_0x5bbdca='Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.';return _0x59b08c(0x18a)+_0x5bbdca+_0x59b08c(0x188);}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a16_0x16c8(){var _0x47b9be=['โ\x20Logged\x20out','249cfFOvi','191485pHrrjm','574408djCSgo','12IWjwqy','!\x20Not\x20logged\x20in','42MNqlBn','183304yxQGbG','16756wqRVJJ','507770YXuasN','1943919knadXh','70292WjDrbN'];a16_0x16c8=function(){return _0x47b9be;};return a16_0x16c8();}(function(_0x5e8ee0,_0x1ebd05){var _0x808430=a16_0x413c,_0x412579=_0x5e8ee0();while(!![]){try{var _0x5a5465=parseInt(_0x808430(0x1ec))/0x1+-parseInt(_0x808430(0x1e8))/0x2+parseInt(_0x808430(0x1ea))/0x3*(-parseInt(_0x808430(0x1e5))/0x4)+parseInt(_0x808430(0x1eb))/0x5*(parseInt(_0x808430(0x1ed))/0x6)+parseInt(_0x808430(0x1ef))/0x7*(-parseInt(_0x808430(0x1f0))/0x8)+parseInt(_0x808430(0x1e7))/0x9+-parseInt(_0x808430(0x1e6))/0xa;if(_0x5a5465===_0x1ebd05)break;else _0x412579['push'](_0x412579['shift']());}catch(_0x2f18ba){_0x412579['push'](_0x412579['shift']());}}}(a16_0x16c8,0x483e1));import{unlinkSync,existsSync}from'node:fs';function a16_0x413c(_0x3f645d,_0x2cbf44){_0x3f645d=_0x3f645d-0x1e5;var _0x16c8be=a16_0x16c8();var _0x413cca=_0x16c8be[_0x3f645d];return _0x413cca;}import{cookieFile}from'../auth/constant.js';export function logout(){var _0x184a8b=a16_0x413c;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x184a8b(0x1e9))):console['log'](_0x184a8b(0x1ee));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a17_0x53f1(){const _0x164dac=['2761730YxMDxQ','72875flJvuu','8wBQcEp','6921WJGeub','1507818tOKKiq','boolean','46912hUurUX','5055EbYtpG','796901ZZbPgJ','328wstKzZ','220dhnyLY'];a17_0x53f1=function(){return _0x164dac;};return a17_0x53f1();}function a17_0x1420(_0x163e56,_0x590cb9){_0x163e56=_0x163e56-0x133;const _0x53f148=a17_0x53f1();let _0x14201c=_0x53f148[_0x163e56];return _0x14201c;}const a17_0x330924=a17_0x1420;(function(_0x3689b0,_0x20ee34){const _0x5ada20=a17_0x1420,_0xf024a6=_0x3689b0();while(!![]){try{const _0x125bd4=parseInt(_0x5ada20(0x134))/0x1*(parseInt(_0x5ada20(0x13b))/0x2)+parseInt(_0x5ada20(0x135))/0x3*(-parseInt(_0x5ada20(0x138))/0x4)+-parseInt(_0x5ada20(0x13a))/0x5+parseInt(_0x5ada20(0x13d))/0x6+parseInt(_0x5ada20(0x136))/0x7+-parseInt(_0x5ada20(0x137))/0x8*(parseInt(_0x5ada20(0x13c))/0x9)+-parseInt(_0x5ada20(0x139))/0xa;if(_0x125bd4===_0x20ee34)break;else _0xf024a6['push'](_0xf024a6['shift']());}catch(_0xdf406f){_0xf024a6['push'](_0xf024a6['shift']());}}}(a17_0x53f1,0x21a72));export const dynamicCliFlags={'enableBffSave':{'type':a17_0x330924(0x133)}};
|