@lovrabet/rabetbase-cli 2.5.12 → 2.5.13-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/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/context.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/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/guides/custom-page-workflow.md +32 -2
- package/skills/rabetbase/knowledge/custom-page/generation-standards.md +106 -6
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
- package/templates/custom-pages/blank.json +1 -1
- package/templates/custom-pages/dashboard.json +1 -1
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x1cb37d=a0_0x261a;(function(_0x18cdcd,_0x197d36){const _0x132caf=a0_0x261a,_0x3e5569=_0x18cdcd();while(!![]){try{const _0x102af7=-parseInt(_0x132caf(0x158))/0x1*(-parseInt(_0x132caf(0x15e))/0x2)+parseInt(_0x132caf(0x148))/0x3+parseInt(_0x132caf(0x15d))/0x4+-parseInt(_0x132caf(0x15b))/0x5*(parseInt(_0x132caf(0x160))/0x6)+parseInt(_0x132caf(0x164))/0x7+-parseInt(_0x132caf(0x14b))/0x8*(parseInt(_0x132caf(0x149))/0x9)+-parseInt(_0x132caf(0x15c))/0xa*(parseInt(_0x132caf(0x14a))/0xb);if(_0x102af7===_0x197d36)break;else _0x3e5569['push'](_0x3e5569['shift']());}catch(_0x5cee99){_0x3e5569['push'](_0x3e5569['shift']());}}}(a0_0x3235,0xc9c1e));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x3382f6 from'node:path';import{fetchDatasetDoc}from'../core/api-client.js';import{logger}from'../utils/logger.js';function a0_0x3235(){const _0x29e371=['18WEzksq','11OqQaAL','6021272ljnvir','.md','datasetCode','Failed\x20to\x20generate\x20docs:\x20','api-doc','✓\x20Generated:\x20','log','message','./docs','error','utf8','success','.md\x20-\x20','17gUyIoM','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','join','38865LmNQZP','16666190nbOQcL','6459092BrlDkG','160752jxWanp','push','342RUCxnZ','✗\x20Failed:\x20','length','name','8444065zhjBwl','Waiting\x203\x20seconds...\x0a','.md\x20(','761808uasZRM'];a0_0x3235=function(){return _0x29e371;};return a0_0x3235();}function a0_0x261a(_0x54ac25,_0x4b35fa){_0x54ac25=_0x54ac25-0x146;const _0x3235b1=a0_0x3235();let _0x261a1d=_0x3235b1[_0x54ac25];return _0x261a1d;}export{fetchDatasetDoc}from'../core/api-client.js';function delay(_0x14d513){return new Promise(_0x1c622f=>setTimeout(_0x1c622f,_0x14d513));}export async function generateDatasetDocs(_0x3fedf7,_0x95ba20,_0x1af596,_0x4d5344=a0_0x1cb37d(0x153),_0x2c6ac2,_0x13279c){const _0x3e6343=a0_0x1cb37d;mkdirSync(_0x4d5344,{'recursive':!![]});const _0x50a375=[],_0x18fda5=_0x3fedf7[_0x3e6343(0x162)];console[_0x3e6343(0x151)]('\x0a'+_0x18fda5+_0x3e6343(0x159));for(let _0x4edd64=0x0;_0x4edd64<_0x3fedf7[_0x3e6343(0x162)];_0x4edd64++){const _0xc1651e=_0x3fedf7[_0x4edd64],_0x58894d=_0x4edd64+0x1,_0x50a57c=_0xc1651e['tableName'];try{console[_0x3e6343(0x151)]('['+_0x58894d+'/'+_0x18fda5+']\x20Generating:\x20'+_0x50a57c+_0x3e6343(0x147)+_0xc1651e[_0x3e6343(0x163)]+')');if(_0x2c6ac2)_0x2c6ac2(_0x58894d,_0x18fda5,_0x50a57c);const _0x36078c=await fetchDatasetDoc({'appCode':_0x95ba20,'cookie':_0x1af596,'datasetCode':_0xc1651e[_0x3e6343(0x14d)],'datasetId':_0xc1651e['id'],'enableAI':![],'extraParams':_0x13279c}),_0x100764=a0_0x3382f6[_0x3e6343(0x15a)](_0x4d5344,_0x50a57c+_0x3e6343(0x14c));writeFileSync(_0x100764,_0x36078c,{'encoding':_0x3e6343(0x155)}),console[_0x3e6343(0x151)](_0x3e6343(0x150)+_0x50a57c+'.md'),logger[_0x3e6343(0x156)](_0x3e6343(0x14f),'Generated\x20docs\x20successfully:\x20'+_0x50a57c,undefined,{'datasetCode':_0xc1651e[_0x3e6343(0x14d)],'datasetName':_0xc1651e[_0x3e6343(0x163)],'filePath':_0x100764,'progress':_0x58894d+'/'+_0x18fda5}),_0x50a375['push']({'datasetCode':_0xc1651e[_0x3e6343(0x14d)],'datasetName':_0xc1651e[_0x3e6343(0x163)],'filePath':_0x100764,'success':!![]});if(_0x58894d<_0x18fda5)await delay(0x1388);}catch(_0x45b969){const _0x29787c=_0x45b969 instanceof Error?_0x45b969[_0x3e6343(0x152)]:String(_0x45b969);console[_0x3e6343(0x151)](_0x3e6343(0x161)+_0x50a57c+_0x3e6343(0x157)+_0x29787c),logger[_0x3e6343(0x154)]('api-doc',_0x3e6343(0x14e)+_0xc1651e['datasetCode'],{'datasetCode':_0xc1651e['datasetCode'],'datasetName':_0xc1651e[_0x3e6343(0x163)],'error':_0x29787c,'progress':_0x58894d+'/'+_0x18fda5}),_0x50a375[_0x3e6343(0x15f)]({'datasetCode':_0xc1651e['datasetCode'],'datasetName':_0xc1651e[_0x3e6343(0x163)],'filePath':'','success':![],'error':_0x29787c}),_0x58894d<_0x18fda5&&(console['log'](_0x3e6343(0x146)),await delay(0xbb8));}}return _0x50a375;}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x1ae48f=a1_0x2822;(function(_0x19f511,_0x33fd33){const _0x4e65ea=a1_0x2822,_0x45ff3a=_0x19f511();while(!![]){try{const _0x3f134d=-parseInt(_0x4e65ea(0x135))/0x1+parseInt(_0x4e65ea(0x134))/0x2*(parseInt(_0x4e65ea(0x12a))/0x3)+parseInt(_0x4e65ea(0x12d))/0x4*(parseInt(_0x4e65ea(0x11a))/0x5)+-parseInt(_0x4e65ea(0x11e))/0x6*(parseInt(_0x4e65ea(0x137))/0x7)+parseInt(_0x4e65ea(0x11c))/0x8*(-parseInt(_0x4e65ea(0x136))/0x9)+-parseInt(_0x4e65ea(0x117))/0xa+parseInt(_0x4e65ea(0x124))/0xb*(parseInt(_0x4e65ea(0x130))/0xc);if(_0x3f134d===_0x33fd33)break;else _0x45ff3a['push'](_0x45ff3a['shift']());}catch(_0x2ae39c){_0x45ff3a['push'](_0x45ff3a['shift']());}}}(a1_0xa3d4,0x32e2e));import a1_0x1b7144 from'node:path';import{CliErrors}from'../errors.js';export function normalizeApiDir(_0x2a8c35,_0x52ebd8=process[a1_0x1ae48f(0x131)]()){const _0x2c4a90=a1_0x1ae48f;return a1_0x1b7144[_0x2c4a90(0x129)](_0x52ebd8,_0x2a8c35);}function a1_0x2822(_0x4ac4eb,_0x97f20a){_0x4ac4eb=_0x4ac4eb-0x116;const _0xa3d4d0=a1_0xa3d4();let _0x2822b8=_0xa3d4d0[_0x4ac4eb];return _0x2822b8;}function normalizedApiGroup(_0xf4c66d){const _0xcf39dd=a1_0x1ae48f,_0xbf933c=_0xf4c66d?.[_0xcf39dd(0x12b)]();return _0xbf933c||undefined;}export function resolveApiProfileLayouts(_0x164516,_0x3db3cd,_0x43be54=process[a1_0x1ae48f(0x131)]()){const _0x4b3ea3=a1_0x1ae48f,_0x42a06b=_0x164516['map'](_0x52ac4a=>{const _0x19ff99=a1_0x2822,_0x28e5d4=_0x3db3cd(_0x52ac4a);return{'app':_0x52ac4a,'outputDir':_0x28e5d4,'normalizedApiDir':normalizeApiDir(_0x28e5d4,_0x43be54),'apiGroup':normalizedApiGroup(_0x52ac4a[_0x19ff99(0x123)])};}),_0x41501b=new Map();for(const _0x586195 of _0x42a06b){if(!_0x586195[_0x4b3ea3(0x123)])continue;const _0x33c80b=_0x41501b[_0x4b3ea3(0x11d)](_0x586195[_0x4b3ea3(0x123)])??new Set();_0x33c80b[_0x4b3ea3(0x120)](_0x586195[_0x4b3ea3(0x138)]),_0x41501b[_0x4b3ea3(0x12c)](_0x586195['apiGroup'],_0x33c80b);}for(const [_0x1d142a,_0x3de9a0]of _0x41501b){if(_0x3de9a0[_0x4b3ea3(0x121)]>0x1)throw CliErrors[_0x4b3ea3(0x125)](_0x4b3ea3(0x12e)+_0x1d142a+'\x22\x20resolves\x20to\x20multiple\x20API\x20directories.','Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.');}const _0x320694=new Map();for(const _0x2daca5 of _0x42a06b){const _0xb1b1c3=_0x320694['get'](_0x2daca5[_0x4b3ea3(0x138)])??[];_0xb1b1c3['push'](_0x2daca5),_0x320694[_0x4b3ea3(0x12c)](_0x2daca5[_0x4b3ea3(0x138)],_0xb1b1c3);}for(const _0x6df53e of _0x320694[_0x4b3ea3(0x11f)]()){const _0x4e0226=new Set(_0x6df53e[_0x4b3ea3(0x12f)](_0x1d52bd=>_0x1d52bd[_0x4b3ea3(0x123)]?[_0x1d52bd[_0x4b3ea3(0x123)]]:[]));if(_0x4e0226[_0x4b3ea3(0x121)]===0x0)continue;if(_0x4e0226['size']>0x1||_0x6df53e[_0x4b3ea3(0x133)](_0xc8ffc9=>!_0xc8ffc9[_0x4b3ea3(0x123)])){const _0x4a5169=_0x6df53e[_0x4b3ea3(0x128)](_0x53873e=>_0x53873e[_0x4b3ea3(0x116)][_0x4b3ea3(0x122)])['join'](',\x20');throw CliErrors['validation'](_0x4b3ea3(0x127)+_0x6df53e[0x0][_0x4b3ea3(0x11b)]+_0x4b3ea3(0x119),_0x4b3ea3(0x118)+_0x4a5169+_0x4b3ea3(0x126));}}return _0x42a06b;}function a1_0xa3d4(){const _0x5562a1=['26aVMXTo','190403rqIiOr','851292VsLkmt','115339MaIujg','normalizedApiDir','app','1088840SwfXvC','Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','40QRgGdV','outputDir','8xBtlng','get','6gOgSBj','values','add','size','name','apiGroup','16522tNAWEs','validation','.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.','API\x20directory\x20\x22','map','resolve','72084tceAsq','trim','set','111904HkhgbO','API\x20group\x20\x22','flatMap','660ztNjhU','cwd','filter','some'];a1_0xa3d4=function(){return _0x5562a1;};return a1_0xa3d4();}export function getRegistryGroup(_0x5efa3c,_0x499d31){const _0x555d8b=a1_0x1ae48f;if(_0x499d31[_0x555d8b(0x123)])return _0x5efa3c[_0x555d8b(0x132)](_0x14cfe0=>_0x14cfe0[_0x555d8b(0x123)]===_0x499d31['apiGroup']);const _0x52d03d=_0x5efa3c[_0x555d8b(0x132)](_0x325aee=>_0x325aee[_0x555d8b(0x138)]===_0x499d31[_0x555d8b(0x138)]);return _0x52d03d['length']===0x1?_0x52d03d:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a2_0x449d(_0x422c60,_0x48304c){_0x422c60=_0x422c60-0x179;var _0x29439=a2_0x2943();var _0x449d64=_0x29439[_0x422c60];return _0x449d64;}function a2_0x2943(){var _0x574ef2=['8onWXwy','10lShOmU','3199662GJmVkF','3268610cdQcOh','83SZtSzN','7eWTpUU','2385567qMnDql','5136582lWNiNv','15722FrVpFg','6073507RXnDoU','4199440UfskDV'];a2_0x2943=function(){return _0x574ef2;};return a2_0x2943();}(function(_0x4e52d2,_0x5c6b4c){var _0x116a55=a2_0x449d,_0xa173c9=_0x4e52d2();while(!![]){try{var _0x3f6a46=-parseInt(_0x116a55(0x17f))/0x1*(-parseInt(_0x116a55(0x183))/0x2)+parseInt(_0x116a55(0x17d))/0x3+-parseInt(_0x116a55(0x17a))/0x4+-parseInt(_0x116a55(0x17e))/0x5+-parseInt(_0x116a55(0x182))/0x6*(-parseInt(_0x116a55(0x180))/0x7)+-parseInt(_0x116a55(0x17b))/0x8*(-parseInt(_0x116a55(0x181))/0x9)+-parseInt(_0x116a55(0x17c))/0xa*(parseInt(_0x116a55(0x179))/0xb);if(_0x3f6a46===_0x5c6b4c)break;else _0xa173c9['push'](_0xa173c9['shift']());}catch(_0x229375){_0xa173c9['push'](_0xa173c9['shift']());}}}(a2_0x2943,0x8eb0a));export{fetchModelList}from'../core/api-client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x519cb2,_0x2510c0){const _0x5a2e56=a3_0x5ccb,_0x163d95=_0x519cb2();while(!![]){try{const _0x41adfa=-parseInt(_0x5a2e56(0x17e))/0x1+-parseInt(_0x5a2e56(0x192))/0x2+parseInt(_0x5a2e56(0x189))/0x3*(parseInt(_0x5a2e56(0x197))/0x4)+parseInt(_0x5a2e56(0x163))/0x5*(parseInt(_0x5a2e56(0x17b))/0x6)+parseInt(_0x5a2e56(0x178))/0x7*(-parseInt(_0x5a2e56(0x16d))/0x8)+-parseInt(_0x5a2e56(0x169))/0x9+-parseInt(_0x5a2e56(0x18c))/0xa*(-parseInt(_0x5a2e56(0x180))/0xb);if(_0x41adfa===_0x2510c0)break;else _0x163d95['push'](_0x163d95['shift']());}catch(_0x26cd43){_0x163d95['push'](_0x163d95['shift']());}}}(a3_0x3f26,0x94600));import a3_0x547ef2 from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x2cd635 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';function a3_0x5ccb(_0x86f53d,_0x3ed8f8){_0x86f53d=_0x86f53d-0x162;const _0x3f264b=a3_0x3f26();let _0x5ccb4d=_0x3f264b[_0x86f53d];return _0x5ccb4d;}import{renderModelRegistryScaffold}from'../api/model-registry-scaffold.js';function a3_0x3f26(){const _0x26ff30=['runtimeDomain','preserved','allowEmptyModelReplacement','6445377rTIgkz','key','stringify','default','2038424npWAoA','APP_','init-api','join','tableName','missing','LOVRABET_RUNTIME_DOMAIN','templates/generate-api','dirname','typescript','api.ts.tpl','7arFpvd','-api','alias','3048222HIesny','\x20config\x20set\x20app\x20<value>`','client','959399JKTapV',',\x20env:\x20','33YbfHQO','\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.','none','replace','format','utf8','api','created','modelRuntime','285486NaSxyQ','action','datasetCode','7411190KHjtyw','modelProfile','path','-client','success','existed','1973636IJHpNo','includes','name','test','LOVRABET','12adlWLP','replaceApiContent','overwritten','length','../..','.ts','defaultName','10nCNnTq','refreshed','API\x20scaffold\x20written.'];a3_0x3f26=function(){return _0x26ff30;};return a3_0x3f26();}function fileAction(_0x12500f,_0x282e91){const _0x93d493=a3_0x5ccb;if(!_0x282e91)return _0x12500f?_0x93d493(0x167):_0x93d493(0x172);return _0x12500f?_0x93d493(0x199):'created';}export async function generateApiFile(_0x2a15bd,_0x43efc8,_0x30c7af,_0x52a946,_0x10b480,_0x50b45a,_0x499c6b,_0x9e39c5={},_0x5caf08={}){const _0x1d31a2=a3_0x5ccb;if(!_0x30c7af)throw new Error('Please\x20configure\x20app\x20code\x20first\x20via\x20`'+CLI_BIN_NAME+_0x1d31a2(0x17c));const _0x228400=_0x52a946&&!_0x499c6b,_0x532d9a=!!_0x5caf08[_0x1d31a2(0x18d)],_0x501190=_0x532d9a||_0x228400,_0x45335a=_0x499c6b||_0x30c7af,_0x71ad0b=_0x532d9a||_0x228400?_0x1d31a2(0x16c):_0x45335a,_0x5b793c=_0x532d9a||_0x228400?'CONFIG_NAMES.DEFAULT':JSON[_0x1d31a2(0x16b)](_0x45335a),_0x35acfa=!isProduction(_0x10b480),_0x7c0808=_0x35acfa?_0x1d31a2(0x17f)+JSON[_0x1d31a2(0x16b)](_0x10b480):'',_0x2b520c='{\x20apiConfigName:\x20'+_0x5b793c+_0x7c0808+',\x20...LOVRABET_SDK_CONFIG\x20}',_0x224eab=_0x532d9a?'':_0x43efc8,_0x33ca26=_0x224eab?_0x224eab+_0x1d31a2(0x179):_0x1d31a2(0x186),_0xcdea28=_0x224eab?_0x224eab+_0x1d31a2(0x18f):_0x1d31a2(0x17d),_0x41769c=_0x224eab&&!/^app-[a-f0-9]+$/i['test'](_0x224eab)?_0x224eab[_0x1d31a2(0x183)](/-/g,'_')['toUpperCase']():_0x1d31a2(0x196),_0x5358c5=/^\d/[_0x1d31a2(0x195)](_0x41769c)?_0x1d31a2(0x16e)+_0x41769c:_0x41769c,_0x4d3427=_0x2a15bd['map'](_0x44a63b=>({'datasetCode':_0x44a63b[_0x1d31a2(0x18b)],'tableName':_0x44a63b[_0x1d31a2(0x171)],'name':_0x44a63b[_0x1d31a2(0x194)]||'','alias':_0x44a63b[_0x1d31a2(0x17a)]||_0x44a63b[_0x1d31a2(0x16a)]})),_0x26ed32=fileURLToPath(import.meta.url),_0x344050=a3_0x2cd635['resolve'](a3_0x2cd635[_0x1d31a2(0x175)](_0x26ed32),_0x1d31a2(0x19b)),_0x28bf57=a3_0x2cd635[_0x1d31a2(0x170)](_0x344050,_0x1d31a2(0x174)),_0x3a2ffa=a3_0x2cd635['join'](_0x28bf57,_0x1d31a2(0x177)),_0x5ed7d4=a3_0x2cd635[_0x1d31a2(0x170)](_0x28bf57,'client.ts.tpl'),_0x318943=_0x50b45a;mkdirSync(_0x318943,{'recursive':!![]});const _0x7257dc=_0x532d9a?{}:_0x9e39c5,_0x4b69b4=await generateSdkConfigFile(_0x318943,_0x7257dc,_0x224eab),_0x586ef7=a3_0x2cd635['basename'](_0x4b69b4,_0x1d31a2(0x19c)),_0x2317ff=a3_0x2cd635['join'](_0x318943,_0x33ca26+'.ts'),_0x453c1e=a3_0x2cd635[_0x1d31a2(0x170)](_0x318943,_0xcdea28+_0x1d31a2(0x19c)),_0x1f910b=_0x5caf08['overwriteTypescript']===!![],_0x20b30d=existsSync(_0x2317ff),_0x210a87=existsSync(_0x453c1e),_0x322818=_0x5caf08['scaffoldMode']??(_0x1f910b?'replace':_0x1d31a2(0x172)),_0x434b53=_0x322818==='replace'||_0x322818===_0x1d31a2(0x172)&&!_0x20b30d,_0x275cc1=_0x322818===_0x1d31a2(0x183)||_0x322818===_0x1d31a2(0x172)&&!_0x210a87,_0x3c93eb=_0x5caf08[_0x1d31a2(0x18d)]?updateModelRegistry({'outputDir':_0x318943,'profileName':_0x5caf08['modelProfile']['name'],'defaultProfile':_0x5caf08[_0x1d31a2(0x18d)][_0x1d31a2(0x162)],'appCode':_0x30c7af,'runtimeDomain':_0x5caf08[_0x1d31a2(0x18d)][_0x1d31a2(0x166)],'models':_0x4d3427,'allowEmptyReplacement':_0x5caf08[_0x1d31a2(0x168)]===!![]}):undefined,_0x398328=_0x3c93eb?a3_0x2cd635[_0x1d31a2(0x170)](_0x318943,MODEL_RUNTIME_FILE_NAME):undefined,_0x3ec298=_0x398328?existsSync(_0x398328):![],_0x164d7b=_0x532d9a&&_0x322818!==_0x1d31a2(0x182)?await renderModelRegistryScaffold(_0x318943):undefined;_0x398328&&_0x164d7b&&writeFileSync(_0x398328,_0x164d7b[_0x1d31a2(0x188)],_0x1d31a2(0x185));const _0x5e9474=_0x4d3427[0x0]?.[_0x1d31a2(0x17a)];if(_0x434b53){const _0x104cb8=_0x164d7b?.[_0x1d31a2(0x186)]??readFileSync(_0x3a2ffa,_0x1d31a2(0x185)),_0x4996a=_0x532d9a?_0x104cb8:TemplateReplacer[_0x1d31a2(0x198)](_0x104cb8,_0x30c7af,_0x4d3427,_0x5e9474,_0x33ca26,_0x5b793c,undefined,_0x5358c5);writeFileSync(_0x2317ff,await a3_0x547ef2[_0x1d31a2(0x184)](_0x4996a,{'parser':'typescript'}),{'encoding':'utf8'});}if(_0x275cc1){const _0x50ddc0=_0x164d7b?.[_0x1d31a2(0x17d)]??readFileSync(_0x5ed7d4,'utf8'),_0x28340d=_0x532d9a?_0x50ddc0:TemplateReplacer[_0x1d31a2(0x198)](_0x50ddc0,_0x30c7af,_0x4d3427,_0x5e9474,_0x33ca26,_0x5b793c,_0x2b520c,_0x5358c5,_0x586ef7);writeFileSync(_0x453c1e,await a3_0x547ef2[_0x1d31a2(0x184)](_0x28340d,{'parser':_0x1d31a2(0x176)}),{'encoding':_0x1d31a2(0x185)});}const _0x19e245=_0x4d3427[_0x1d31a2(0x19a)],_0xb97b51={'api':{'path':_0x2317ff,'action':fileAction(_0x20b30d,_0x434b53)},'client':{'path':_0x453c1e,'action':fileAction(_0x210a87,_0x275cc1)},'sdkConfig':{'path':_0x4b69b4,'action':_0x1d31a2(0x164)},..._0x3c93eb?{'modelRegistry':{'path':_0x3c93eb[_0x1d31a2(0x18e)],'action':_0x3c93eb[_0x1d31a2(0x191)]?_0x1d31a2(0x164):'created'},'modelRuntime':{'path':_0x398328,'action':_0x164d7b?_0x3ec298?_0x1d31a2(0x164):_0x1d31a2(0x187):_0x3ec298?'preserved':_0x1d31a2(0x172)}}:{}},_0x3f59c3=existsSync(_0x2317ff)&&readFileSync(_0x2317ff,'utf8')['includes'](MODEL_REGISTRY_FILE_NAME['replace'](_0x1d31a2(0x19c),'')),_0x4ade05=existsSync(_0x453c1e)&&readFileSync(_0x453c1e,_0x1d31a2(0x185))[_0x1d31a2(0x193)](_0x1d31a2(0x173)),_0x5b02a3=_0x532d9a?!_0x3f59c3||!_0x4ade05||!existsSync(_0x398328):![],_0x5befae=_0x532d9a?_0x5b02a3:_0xb97b51[_0x1d31a2(0x186)][_0x1d31a2(0x18a)]===_0x1d31a2(0x167)||_0xb97b51[_0x1d31a2(0x17d)]['action']===_0x1d31a2(0x167);return logger[_0x1d31a2(0x190)](_0x1d31a2(0x16f),_0x5befae?a3_0x2cd635['basename'](_0x4b69b4)+_0x1d31a2(0x181):_0x532d9a?'Model\x20facts\x20refreshed.':_0x1d31a2(0x165),undefined,{'apiFile':_0x2317ff,'clientFile':_0x453c1e,'sdkConfig':_0x4b69b4,'modelCount':_0x19e245,'configName':_0x71ad0b,'isDefaultConfig':_0x501190,'needsAgentMerge':_0x5befae,'needsProjectUpgrade':_0x5b02a3,'files':_0xb97b51}),{'appCode':_0x30c7af,'modelCount':_0x19e245,'models':_0x4d3427,'apiFilePath':_0x2317ff,'clientFilePath':_0x453c1e,'sdkConfigPath':_0x4b69b4,'modelRegistryPath':_0x3c93eb?.[_0x1d31a2(0x18e)],'modelRuntimePath':_0x398328,'modelProfile':_0x5caf08['modelProfile']?.[_0x1d31a2(0x194)],'configName':_0x71ad0b,'isDefaultConfig':_0x501190,'sdkRouting':_0x7257dc,'files':_0xb97b51,'needsAgentMerge':_0x5befae,'needsProjectUpgrade':_0x5b02a3};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x1dbaa2=a4_0xfcef;(function(_0x49bb7b,_0x415fc0){const _0x2dcb7c=a4_0xfcef,_0x207862=_0x49bb7b();while(!![]){try{const _0x32f16e=parseInt(_0x2dcb7c(0x152))/0x1*(parseInt(_0x2dcb7c(0x151))/0x2)+parseInt(_0x2dcb7c(0x148))/0x3*(-parseInt(_0x2dcb7c(0x147))/0x4)+parseInt(_0x2dcb7c(0x150))/0x5+parseInt(_0x2dcb7c(0x149))/0x6+-parseInt(_0x2dcb7c(0x146))/0x7*(-parseInt(_0x2dcb7c(0x14a))/0x8)+parseInt(_0x2dcb7c(0x153))/0x9+parseInt(_0x2dcb7c(0x14e))/0xa*(-parseInt(_0x2dcb7c(0x155))/0xb);if(_0x32f16e===_0x415fc0)break;else _0x207862['push'](_0x207862['shift']());}catch(_0x4b85af){_0x207862['push'](_0x207862['shift']());}}}(a4_0x3920,0x7d26a));import{mkdirSync,writeFileSync}from'node:fs';import a4_0xc5cc30 from'node:path';import a4_0x33f0b8 from'prettier';export const SDK_CONFIG_FILE_NAME=a4_0x1dbaa2(0x144);export function getSdkConfigFileName(_0x542709=''){const _0x58aab6=a4_0x1dbaa2;return _0x542709?_0x542709+_0x58aab6(0x145):SDK_CONFIG_FILE_NAME;}function a4_0xfcef(_0x1d363e,_0x3967dd){_0x1d363e=_0x1d363e-0x143;const _0x392073=a4_0x3920();let _0xfceff9=_0x392073[_0x1d363e];return _0xfceff9;}function a4_0x3920(){const _0x1aaba9=['32105tvnHTp','4694004gEnEoT','typescript','11Bnvuzx','utf8','format','runtimeDomain','sdk-config.ts','-sdk-config.ts','63oziVlg','70172XQvYjj','18GwAerF','4555320bTUNTS','489680NkvcAl',',\x0a\x20\x20','\x20as\x20const;\x0a','join','21637870zkTsIV','runtimeDomain:\x20','415810WezqhX','54MqAZHP'];a4_0x3920=function(){return _0x1aaba9;};return a4_0x3920();}export async function generateSdkConfigFile(_0x5e1937,_0x1076f2={},_0xdb6bec=''){const _0xea02b7=a4_0x1dbaa2,_0x4eacb0=[];_0x1076f2[_0xea02b7(0x143)]&&_0x4eacb0['push'](_0xea02b7(0x14f)+JSON['stringify'](_0x1076f2[_0xea02b7(0x143)]));const _0x139225=_0x4eacb0['length']>0x0?'{\x0a\x20\x20'+_0x4eacb0[_0xea02b7(0x14d)](_0xea02b7(0x14b))+',\x0a}':'{}',_0x42dd38='/**\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'+_0x139225+_0xea02b7(0x14c);mkdirSync(_0x5e1937,{'recursive':!![]});const _0xe3e922=a4_0xc5cc30[_0xea02b7(0x14d)](_0x5e1937,getSdkConfigFileName(_0xdb6bec));return writeFileSync(_0xe3e922,await a4_0x33f0b8[_0xea02b7(0x157)](_0x42dd38,{'parser':_0xea02b7(0x154)}),_0xea02b7(0x156)),_0xe3e922;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a5_0x1af5(_0x34567e,_0x312abe){_0x34567e=_0x34567e-0x1cf;const _0x27f7b1=a5_0x27f7();let _0x1af54b=_0x27f7b1[_0x34567e];return _0x1af54b;}(function(_0x148ddc,_0x3ba4e3){const _0x43470a=a5_0x1af5,_0x1cb43d=_0x148ddc();while(!![]){try{const _0x33b2b5=-parseInt(_0x43470a(0x1d4))/0x1*(parseInt(_0x43470a(0x1d9))/0x2)+-parseInt(_0x43470a(0x1d3))/0x3*(-parseInt(_0x43470a(0x1e1))/0x4)+parseInt(_0x43470a(0x1d0))/0x5+-parseInt(_0x43470a(0x1df))/0x6+parseInt(_0x43470a(0x1da))/0x7+-parseInt(_0x43470a(0x1d7))/0x8*(-parseInt(_0x43470a(0x1db))/0x9)+-parseInt(_0x43470a(0x1de))/0xa;if(_0x33b2b5===_0x3ba4e3)break;else _0x1cb43d['push'](_0x1cb43d['shift']());}catch(_0x275994){_0x1cb43d['push'](_0x1cb43d['shift']());}}}(a5_0x27f7,0xd7893));export function parseLegacyApiModels(_0x3371b7){const _0x31c108=a5_0x1af5,_0x5b8ed3=[],_0x717f=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x5b4200;while((_0x5b4200=_0x717f[_0x31c108(0x1e0)](_0x3371b7))!==null){_0x5b8ed3[_0x31c108(0x1e4)]({'datasetCode':_0x5b4200[0x1],'tableName':_0x5b4200[0x2],'name':_0x5b4200[0x3],'alias':_0x5b4200[0x4]});}return _0x5b8ed3;}export function parseLegacyApiAppCode(_0x4040ae){const _0x1a212d=a5_0x1af5;return _0x4040ae[_0x1a212d(0x1dc)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function stripComments(_0x312dd8){const _0x4ccb4b=a5_0x1af5;return _0x312dd8[_0x4ccb4b(0x1d8)](/\/\*[\s\S]*?\*\//g,'')[_0x4ccb4b(0x1d8)](/\/\/.*$/gm,'');}export function isLegacyGeneratedApiScaffold(_0x1caee8){const _0x21f312=a5_0x1af5;if(!_0x1caee8[_0x21f312(0x1e5)](_0x21f312(0x1d6)))return![];const _0x4ba54f=stripComments(_0x1caee8),_0x24a81a=[..._0x4ba54f['matchAll'](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)][_0x21f312(0x1e2)](_0x4df34a=>_0x4df34a[0x1]);if(_0x24a81a['length']!==0x1||_0x24a81a[0x0]!=='@lovrabet/sdk')return![];const _0x264578=[..._0x4ba54f[_0x21f312(0x1cf)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)]['map'](_0x7e7177=>_0x7e7177[0x1]);if(_0x264578['length']!==0x2||!_0x264578['some'](_0x153cc1=>_0x153cc1[_0x21f312(0x1e6)]('APP_CODE'))||!_0x264578[_0x21f312(0x1d5)](_0x42bdda=>_0x42bdda[_0x21f312(0x1e6)](_0x21f312(0x1d1))))return![];const _0x3195e2=[..._0x4ba54f['matchAll'](/^([A-Za-z_$][\w$]*)\s*\(/gm)]['map'](_0x46fda2=>_0x46fda2[0x1]);return _0x3195e2[_0x21f312(0x1e3)]===0x1&&_0x3195e2[0x0]===_0x21f312(0x1d2);}function a5_0x27f7(){const _0x23c053=['matchAll','4879120rgYIoV','MODELS_CONFIG','registerModels','492EtZdHe','1yeUKdW','some','Generated\x20by\x20Rabetbase\x20CLI','27896yaTYfS','replace','1172474KcJXJq','1121358TGTHCW','45PhtDhN','match','test','2970450PZFCYs','6356880eeQBue','exec','40784qOzUYM','map','length','push','includes','endsWith','lovrabetClient'];a5_0x27f7=function(){return _0x23c053;};return a5_0x27f7();}export function isLegacyGeneratedClientScaffold(_0x35392c){const _0x58dacf=a5_0x1af5;if(!_0x35392c[_0x58dacf(0x1e5)](_0x58dacf(0x1d6)))return![];const _0x6df03b=stripComments(_0x35392c),_0x1ed633=[..._0x6df03b[_0x58dacf(0x1cf)](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)][_0x58dacf(0x1e2)](_0x5503f9=>_0x5503f9[0x1]);if(_0x1ed633[_0x58dacf(0x1d5)](_0xa31962=>_0xa31962!=='@lovrabet/sdk'&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/[_0x58dacf(0x1dd)](_0xa31962??'')))return![];const _0xa8cba0=[..._0x6df03b['matchAll'](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)]['map'](_0x842209=>_0x842209[0x1]);return _0xa8cba0[_0x58dacf(0x1e3)]===0x1&&_0xa8cba0[0x0]===_0x58dacf(0x1e7);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x547e7d=a6_0x2de4;(function(_0x237f85,_0x344b44){const _0x5f2b1d=a6_0x2de4,_0x34dbb6=_0x237f85();while(!![]){try{const _0x44f8af=-parseInt(_0x5f2b1d(0x94))/0x1*(parseInt(_0x5f2b1d(0xa7))/0x2)+parseInt(_0x5f2b1d(0xbc))/0x3*(-parseInt(_0x5f2b1d(0xd1))/0x4)+parseInt(_0x5f2b1d(0xa5))/0x5+parseInt(_0x5f2b1d(0xae))/0x6*(parseInt(_0x5f2b1d(0xb6))/0x7)+-parseInt(_0x5f2b1d(0x9e))/0x8*(-parseInt(_0x5f2b1d(0xd2))/0x9)+-parseInt(_0x5f2b1d(0xb3))/0xa*(parseInt(_0x5f2b1d(0xab))/0xb)+-parseInt(_0x5f2b1d(0x90))/0xc;if(_0x44f8af===_0x344b44)break;else _0x34dbb6['push'](_0x34dbb6['shift']());}catch(_0x25706a){_0x34dbb6['push'](_0x34dbb6['shift']());}}}(a6_0x58e7,0x24a36));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x2b8a08 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x547e7d(0xd6);export const MODEL_RUNTIME_FILE_NAME=a6_0x547e7d(0xc8);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x547e7d(0xbb);function a6_0x58e7(){const _0xa24736=['find','length','isArray','outputDir','/*\x20rabetbase-model-registry:v2\x20*/','15ZUeGpa','get','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','\x22\x20maps\x20to\x20both\x20\x22','alias','appCode','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','keys','\x22\x20maps\x20to\x20table\x20\x22','values','name','parse','model-runtime.ts','tableName','Model\x20alias\x20\x22','datasetCode','join','utf8','every','\x20model(s)\x20in\x20profile\x20\x22','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','38524SkgLBb','549hElUUN','models','string','map','models.generated.ts','Refusing\x20to\x20replace\x20','\x22\x20maps\x20to\x20alias\x20\x22','value','entries','191484BfzARX','profiles','\x22\x20and\x20\x22','pid','1coCtwD','replace','lovrabet-model-registry/v2','profileName','protocol','indexOf','filter','Table\x20\x22','push','now','13528CwZHoc','defaultProfile','/**\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','slice','split','datasetCodes','runtimeDomain','924010oidPpF','set','83250alralJ','key','\x22\x20in\x20the\x20registry\x20but\x20\x22','stringify','1768547lcKWQo','fromEntries','test','14562JzlTyw','\x22\x20in\x20profile\x20\x22','NOT-SET','includes','.tmp','10JpSOIW','/*\x20rabetbase-model-registry:start\x20*/','trim','371ApOqVu'];a6_0x58e7=function(){return _0xa24736;};return a6_0x58e7();}const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x547e7d(0x96),REGISTRY_START=a6_0x547e7d(0xb4),REGISTRY_END='/*\x20rabetbase-model-registry:end\x20*/';function emptyRegistry(_0x45fd8d){return{'defaultProfile':_0x45fd8d,'profiles':{},'models':[]};}function extractRegistryJson(_0x51f539){const _0x3546ad=a6_0x547e7d,_0x52bb6b=_0x51f539[_0x3546ad(0x99)](REGISTRY_START),_0x113d64=_0x51f539[_0x3546ad(0x99)](REGISTRY_END);if(_0x52bb6b<0x0||_0x113d64<=_0x52bb6b)return undefined;return _0x51f539[_0x3546ad(0xa1)](_0x52bb6b+REGISTRY_START[_0x3546ad(0xb8)],_0x113d64)[_0x3546ad(0xb5)]()[_0x3546ad(0x95)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x3546ad(0x95)](/;$/,'');}function migrateLegacyRegistry(_0x28e16a){const _0x363a89=a6_0x547e7d,_0x22f58e=emptyRegistry(_0x28e16a['defaultProfile']);for(const [_0x54b2fd,_0x59299d]of Object[_0x363a89(0xda)](_0x28e16a[_0x363a89(0x91)])){_0x22f58e['profiles'][_0x54b2fd]={'appCode':_0x59299d[_0x363a89(0xc1)],'runtimeDomain':_0x59299d['runtimeDomain']},mergeProfileModels(_0x22f58e,_0x54b2fd,_0x59299d[_0x363a89(0xd3)]);}return _0x22f58e;}function generatedObjectLiteralToJson(_0xf12c1b){const _0x4d094e=a6_0x547e7d;let _0x43625c='',_0x5ed684,_0x190a0c=![],_0x94c3b;for(let _0x1b8aec=0x0;_0x1b8aec<_0xf12c1b['length'];_0x1b8aec++){const _0x130147=_0xf12c1b[_0x1b8aec];if(_0x5ed684){_0x43625c+=_0x130147;if(_0x190a0c)_0x190a0c=![];else{if(_0x130147==='\x5c')_0x190a0c=!![];else{if(_0x130147===_0x5ed684)_0x5ed684=undefined;}}continue;}if(_0x130147==='\x22'){_0x5ed684=_0x130147,_0x43625c+=_0x130147,_0x94c3b=_0x4d094e(0xd9);continue;}if(_0x130147===','){let _0x37b0bf=_0x1b8aec+0x1;while(/\s/[_0x4d094e(0xad)](_0xf12c1b[_0x37b0bf]??''))_0x37b0bf++;if(_0xf12c1b[_0x37b0bf]==='}'||_0xf12c1b[_0x37b0bf]===']')continue;_0x43625c+=_0x130147,_0x94c3b=',';continue;}if(_0x130147==='{'||_0x130147==='['){_0x43625c+=_0x130147,_0x94c3b=_0x130147;continue;}if(_0x130147==='}'||_0x130147===']'){_0x43625c+=_0x130147,_0x94c3b=_0x130147;continue;}if((_0x94c3b==='{'||_0x94c3b===',')&&/[A-Za-z_$]/[_0x4d094e(0xad)](_0x130147)){let _0x18e56b=_0x1b8aec+0x1;while(/[A-Za-z0-9_$]/[_0x4d094e(0xad)](_0xf12c1b[_0x18e56b]??''))_0x18e56b++;let _0x4cab0d=_0x18e56b;while(/\s/[_0x4d094e(0xad)](_0xf12c1b[_0x4cab0d]??''))_0x4cab0d++;if(_0xf12c1b[_0x4cab0d]===':'){_0x43625c+=JSON[_0x4d094e(0xaa)](_0xf12c1b[_0x4d094e(0xa1)](_0x1b8aec,_0x18e56b)),_0x1b8aec=_0x18e56b-0x1,_0x94c3b=_0x4d094e(0xa8);continue;}}_0x43625c+=_0x130147;if(!/\s/['test'](_0x130147)&&_0x130147!==':')_0x94c3b=_0x4d094e(0xd9);}return _0x43625c;}function parseGeneratedRegistryJson(_0x590bdb){const _0x728910=a6_0x547e7d;try{return JSON[_0x728910(0xc7)](_0x590bdb);}catch{return JSON[_0x728910(0xc7)](generatedObjectLiteralToJson(_0x590bdb));}}function normalizeModelEntries(_0x580730,_0x1e7e4c){const _0x2aec10=a6_0x547e7d,_0x31d96b=Object[_0x2aec10(0xc3)](_0x580730),_0x3fb193=[];for(const _0x3f5bdd of _0x1e7e4c){if(!_0x3f5bdd||typeof _0x3f5bdd!=='object'||Array[_0x2aec10(0xb9)](_0x3f5bdd))return undefined;const _0x2b2a2b=_0x3f5bdd;if(typeof _0x2b2a2b['alias']!=='string'||typeof _0x2b2a2b[_0x2aec10(0xc9)]!==_0x2aec10(0xd4)||typeof _0x2b2a2b[_0x2aec10(0xc6)]!==_0x2aec10(0xd4))return undefined;let _0x3388a8;if(typeof _0x2b2a2b[_0x2aec10(0xcb)]==='string'&&_0x2b2a2b[_0x2aec10(0xa3)]===undefined)_0x3388a8=Object[_0x2aec10(0xac)](_0x31d96b[_0x2aec10(0xd5)](_0x1d82a2=>[_0x1d82a2,_0x2b2a2b[_0x2aec10(0xcb)]]));else{if(_0x2b2a2b['datasetCode']===undefined&&_0x2b2a2b[_0x2aec10(0xa3)]&&typeof _0x2b2a2b[_0x2aec10(0xa3)]==='object'&&!Array[_0x2aec10(0xb9)](_0x2b2a2b[_0x2aec10(0xa3)])&&Object[_0x2aec10(0xc5)](_0x2b2a2b[_0x2aec10(0xa3)])[_0x2aec10(0xce)](_0x1c036d=>typeof _0x1c036d===_0x2aec10(0xd4)))_0x3388a8={..._0x2b2a2b[_0x2aec10(0xa3)]};else return undefined;}_0x3fb193[_0x2aec10(0x9c)]({'alias':_0x2b2a2b[_0x2aec10(0xc0)],'tableName':_0x2b2a2b[_0x2aec10(0xc9)],'name':_0x2b2a2b[_0x2aec10(0xc6)],'datasetCodes':_0x3388a8});}return _0x3fb193;}function a6_0x2de4(_0x2a51da,_0x1a12ee){_0x2a51da=_0x2a51da-0x90;const _0x58e710=a6_0x58e7();let _0x2de4eb=_0x58e710[_0x2a51da];return _0x2de4eb;}export function parseModelRegistry(_0x1743f4){const _0x11561c=a6_0x547e7d,_0x200a06=extractRegistryJson(_0x1743f4);if(!_0x200a06)return undefined;try{const _0x21d27c=parseGeneratedRegistryJson(_0x200a06);if(typeof _0x21d27c['defaultProfile']!=='string'||!_0x21d27c[_0x11561c(0x91)]||typeof _0x21d27c[_0x11561c(0x91)]!=='object')return undefined;if(_0x21d27c[_0x11561c(0x98)]==='lovrabet-model-registry/v1')return migrateLegacyRegistry(_0x21d27c);if(!(_0x21d27c[_0x11561c(0x98)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x21d27c[_0x11561c(0x98)]===undefined&&_0x1743f4[_0x11561c(0xb1)](MODEL_REGISTRY_VERSION_MARKER))||!Array['isArray'](_0x21d27c[_0x11561c(0xd3)]))return undefined;const _0xadf629=_0x21d27c['profiles'],_0x5410bd=normalizeModelEntries(_0xadf629,_0x21d27c[_0x11561c(0xd3)]);if(!_0x5410bd)return undefined;return{'defaultProfile':_0x21d27c['defaultProfile'],'profiles':_0xadf629,'models':_0x5410bd};}catch{return undefined;}}export function readModelRegistry(_0x247027){const _0x5c1652=a6_0x547e7d;if(!existsSync(_0x247027))return undefined;try{return parseModelRegistry(readFileSync(_0x247027,_0x5c1652(0xcd)));}catch{return undefined;}}function registrySource(_0x1ec7e9){const _0x2121f2=a6_0x547e7d,_0x5e2883=Object[_0x2121f2(0xc3)](_0x1ec7e9['profiles']),_0x1b50a4=_0x1ec7e9['models'][_0x2121f2(0xd5)](_0x54e6a2=>{const _0x26a624=_0x2121f2,_0xefa805=_0x5e2883['map'](_0x3b443e=>_0x54e6a2['datasetCodes'][_0x3b443e]),_0x280aff=_0xefa805[0x0],_0x1202fd=_0x280aff!==undefined&&_0xefa805['every'](_0x456c1c=>_0x456c1c===_0x280aff),_0x5d1b70={'alias':_0x54e6a2[_0x26a624(0xc0)],'tableName':_0x54e6a2[_0x26a624(0xc9)],'name':_0x54e6a2[_0x26a624(0xc6)]};return _0x1202fd?{..._0x5d1b70,'datasetCode':_0x280aff}:{..._0x5d1b70,'datasetCodes':_0x54e6a2[_0x26a624(0xa3)]};}),_0x5ac005=JSON[_0x2121f2(0xaa)]({'defaultProfile':_0x1ec7e9['defaultProfile'],'profiles':_0x1ec7e9[_0x2121f2(0x91)],'models':_0x1b50a4},null,0x2)[_0x2121f2(0xa2)]('\x0a')[_0x2121f2(0xd5)](_0x357546=>'\x20\x20'+_0x357546)['join']('\x0a');return _0x2121f2(0xa0)+MODEL_REGISTRY_VERSION_MARKER+_0x2121f2(0xbe)+REGISTRY_START+'\x0a'+_0x5ac005+_0x2121f2(0xd0)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x45f958,_0x3d9420,_0x5157de){const _0x243050=a6_0x547e7d,_0x45ce3c=_0x5157de[_0x243050(0xd5)](_0xdbd9f0=>({..._0xdbd9f0,'alias':_0xdbd9f0[_0x243050(0xc0)]||_0xdbd9f0[_0x243050(0xc9)]})),_0x131815=new Map(),_0xc7e717=new Map();for(const _0x4a801a of _0x45ce3c){const _0x5b6bb2=_0x131815[_0x243050(0xbd)](_0x4a801a['alias']);if(_0x5b6bb2&&_0x5b6bb2!==_0x4a801a[_0x243050(0xc9)])throw new Error('Model\x20alias\x20\x22'+_0x4a801a['alias']+_0x243050(0xbf)+_0x5b6bb2+'\x22\x20and\x20\x22'+_0x4a801a['tableName']+_0x243050(0xaf)+_0x3d9420+'\x22.');const _0x3c520b=_0xc7e717[_0x243050(0xbd)](_0x4a801a[_0x243050(0xc9)]);if(_0x3c520b&&_0x3c520b!==_0x4a801a[_0x243050(0xc0)])throw new Error(_0x243050(0x9b)+_0x4a801a[_0x243050(0xc9)]+'\x22\x20maps\x20to\x20both\x20aliases\x20\x22'+_0x3c520b+_0x243050(0x92)+_0x4a801a[_0x243050(0xc0)]+_0x243050(0xaf)+_0x3d9420+'\x22.');_0x131815[_0x243050(0xa6)](_0x4a801a[_0x243050(0xc0)],_0x4a801a['tableName']),_0xc7e717['set'](_0x4a801a['tableName'],_0x4a801a[_0x243050(0xc0)]);const _0x17f246=_0x45f958['models']['find'](_0xddd9e0=>_0xddd9e0[_0x243050(0xc0)]===_0x4a801a['alias']);if(_0x17f246&&_0x17f246[_0x243050(0xc9)]!==_0x4a801a[_0x243050(0xc9)])throw new Error(_0x243050(0xca)+_0x4a801a[_0x243050(0xc0)]+_0x243050(0xc4)+_0x17f246[_0x243050(0xc9)]+_0x243050(0xa9)+_0x4a801a[_0x243050(0xc9)]+_0x243050(0xaf)+_0x3d9420+'\x22.');const _0x4f3815=_0x45f958[_0x243050(0xd3)][_0x243050(0xb7)](_0x13ce0b=>_0x13ce0b[_0x243050(0xc9)]===_0x4a801a[_0x243050(0xc9)]);if(_0x4f3815&&_0x4f3815[_0x243050(0xc0)]!==_0x4a801a[_0x243050(0xc0)])throw new Error(_0x243050(0x9b)+_0x4a801a[_0x243050(0xc9)]+_0x243050(0xd8)+_0x4f3815[_0x243050(0xc0)]+_0x243050(0xa9)+_0x4a801a['alias']+_0x243050(0xaf)+_0x3d9420+'\x22.');}for(const _0x33f587 of _0x45f958[_0x243050(0xd3)]){delete _0x33f587[_0x243050(0xa3)][_0x3d9420];}for(const _0xb3b687 of _0x45ce3c){let _0x353a74=_0x45f958[_0x243050(0xd3)][_0x243050(0xb7)](_0x97079=>_0x97079['alias']===_0xb3b687['alias']);!_0x353a74&&(_0x353a74={'alias':_0xb3b687[_0x243050(0xc0)],'tableName':_0xb3b687['tableName'],'name':_0xb3b687[_0x243050(0xc6)],'datasetCodes':{}},_0x45f958[_0x243050(0xd3)][_0x243050(0x9c)](_0x353a74)),(_0x3d9420===_0x45f958[_0x243050(0x9f)]||!_0x353a74['datasetCodes'][_0x45f958['defaultProfile']])&&(_0x353a74[_0x243050(0xc0)]=_0xb3b687[_0x243050(0xc0)],_0x353a74[_0x243050(0xc9)]=_0xb3b687[_0x243050(0xc9)],_0x353a74[_0x243050(0xc6)]=_0xb3b687['name']),_0x353a74[_0x243050(0xa3)][_0x3d9420]=_0xb3b687['datasetCode'];}_0x45f958[_0x243050(0xd3)]=_0x45f958[_0x243050(0xd3)]['filter'](_0xa72791=>Object[_0x243050(0xc3)](_0xa72791[_0x243050(0xa3)])[_0x243050(0xb8)]>0x0);}function removeUnboundProfiles(_0x1acf55){const _0x4fe4dc=a6_0x547e7d,_0x248a6d=Object[_0x4fe4dc(0xda)](_0x1acf55[_0x4fe4dc(0x91)])[_0x4fe4dc(0x9a)](([,_0x1d132a])=>_0x1d132a[_0x4fe4dc(0xc1)]==='NOT-SET')[_0x4fe4dc(0xd5)](([_0x5d8a1d])=>_0x5d8a1d);if(_0x248a6d['length']===0x0)return;for(const _0x2f91bc of _0x248a6d){delete _0x1acf55[_0x4fe4dc(0x91)][_0x2f91bc];for(const _0x4ea0b3 of _0x1acf55[_0x4fe4dc(0xd3)]){delete _0x4ea0b3[_0x4fe4dc(0xa3)][_0x2f91bc];}}_0x1acf55[_0x4fe4dc(0xd3)]=_0x1acf55[_0x4fe4dc(0xd3)][_0x4fe4dc(0x9a)](_0x2ae1dc=>Object[_0x4fe4dc(0xc3)](_0x2ae1dc[_0x4fe4dc(0xa3)])[_0x4fe4dc(0xb8)]>0x0);}export function getProfileModels(_0x23321f,_0x7a8083){const _0x321f0a=a6_0x547e7d;return _0x23321f[_0x321f0a(0xd3)]['flatMap'](_0x48f10f=>{const _0x2b4e38=_0x321f0a,_0x4fe276=_0x48f10f[_0x2b4e38(0xa3)][_0x7a8083];return _0x4fe276?[{'datasetCode':_0x4fe276,'tableName':_0x48f10f[_0x2b4e38(0xc9)],'name':_0x48f10f[_0x2b4e38(0xc6)],'alias':_0x48f10f['alias']}]:[];});}export function updateModelRegistry(_0x3d683f){const _0x48c1d6=a6_0x547e7d,_0x491260=a6_0x2b8a08[_0x48c1d6(0xcc)](_0x3d683f['outputDir'],MODEL_REGISTRY_FILE_NAME),_0x415014=existsSync(_0x491260),_0x4c8b05=readModelRegistry(_0x491260);if(_0x415014&&!_0x4c8b05)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x48c1d6(0xc2));const _0x188a23=_0x4c8b05??emptyRegistry(_0x3d683f[_0x48c1d6(0x9f)]);if(_0x3d683f[_0x48c1d6(0xc1)]!==_0x48c1d6(0xb0))removeUnboundProfiles(_0x188a23);const _0x8050ec=_0x4c8b05?getProfileModels(_0x4c8b05,_0x3d683f[_0x48c1d6(0x97)])[_0x48c1d6(0xb8)]:0x0;if(_0x8050ec>0x0&&_0x3d683f[_0x48c1d6(0xd3)]['length']===0x0&&!_0x3d683f['allowEmptyReplacement'])throw new Error(_0x48c1d6(0xd7)+_0x8050ec+_0x48c1d6(0xcf)+_0x3d683f[_0x48c1d6(0x97)]+'\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.');_0x188a23[_0x48c1d6(0x9f)]=_0x3d683f[_0x48c1d6(0x9f)],_0x188a23[_0x48c1d6(0x91)][_0x3d683f['profileName']]={'appCode':_0x3d683f[_0x48c1d6(0xc1)],'runtimeDomain':_0x3d683f[_0x48c1d6(0xa4)]},mergeProfileModels(_0x188a23,_0x3d683f[_0x48c1d6(0x97)],_0x3d683f[_0x48c1d6(0xd3)]),mkdirSync(_0x3d683f[_0x48c1d6(0xba)],{'recursive':!![]});const _0xae3339=_0x491260+'.'+process[_0x48c1d6(0x93)]+'.'+Date[_0x48c1d6(0x9d)]()+_0x48c1d6(0xb2);try{writeFileSync(_0xae3339,registrySource(_0x188a23),{'encoding':'utf8','mode':0x1a4}),renameSync(_0xae3339,_0x491260);}catch(_0x516827){try{unlinkSync(_0xae3339);}catch{}throw _0x516827;}return{'path':_0x491260,'registry':_0x188a23,'existed':_0x415014};}
|
|
1
|
+
const a6_0x11b664=a6_0x6f0b;(function(_0x44350b,_0x4786a1){const _0x56183b=a6_0x6f0b,_0xb0aec1=_0x44350b();while(!![]){try{const _0x4d04c6=parseInt(_0x56183b(0x16c))/0x1+parseInt(_0x56183b(0x14c))/0x2*(parseInt(_0x56183b(0x13f))/0x3)+parseInt(_0x56183b(0x139))/0x4*(-parseInt(_0x56183b(0x140))/0x5)+parseInt(_0x56183b(0x17e))/0x6+-parseInt(_0x56183b(0x172))/0x7*(-parseInt(_0x56183b(0x16f))/0x8)+-parseInt(_0x56183b(0x170))/0x9*(parseInt(_0x56183b(0x151))/0xa)+parseInt(_0x56183b(0x17c))/0xb;if(_0x4d04c6===_0x4786a1)break;else _0xb0aec1['push'](_0xb0aec1['shift']());}catch(_0x261a17){_0xb0aec1['push'](_0xb0aec1['shift']());}}}(a6_0x2e95,0x1fb65));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x4ac867 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x11b664(0x159);export const MODEL_RUNTIME_FILE_NAME='model-runtime.ts';export const MODEL_REGISTRY_VERSION_MARKER=a6_0x11b664(0x14b);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x11b664(0x154),REGISTRY_START=a6_0x11b664(0x14a),REGISTRY_END=a6_0x11b664(0x156);function emptyRegistry(_0x48e728){return{'defaultProfile':_0x48e728,'profiles':{},'models':[]};}function extractRegistryJson(_0x359a92){const _0x5332b7=a6_0x11b664,_0x59c401=_0x359a92[_0x5332b7(0x13e)](REGISTRY_START),_0x238da0=_0x359a92[_0x5332b7(0x13e)](REGISTRY_END);if(_0x59c401<0x0||_0x238da0<=_0x59c401)return undefined;return _0x359a92[_0x5332b7(0x13d)](_0x59c401+REGISTRY_START['length'],_0x238da0)[_0x5332b7(0x173)]()[_0x5332b7(0x141)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x5332b7(0x141)](/;$/,'');}function migrateLegacyRegistry(_0x59a99c){const _0x329e16=a6_0x11b664,_0x3172a9=emptyRegistry(_0x59a99c[_0x329e16(0x138)]);for(const [_0x13dcd3,_0xc6e00f]of Object[_0x329e16(0x181)](_0x59a99c['profiles'])){_0x3172a9['profiles'][_0x13dcd3]={'appCode':_0xc6e00f['appCode'],'runtimeDomain':_0xc6e00f['runtimeDomain']},mergeProfileModels(_0x3172a9,_0x13dcd3,_0xc6e00f[_0x329e16(0x14f)]);}return _0x3172a9;}function generatedObjectLiteralToJson(_0x2f65ee){const _0x41ca9f=a6_0x11b664;let _0x4599ba='',_0x379eea,_0x5d558b=![],_0x3d59ba;for(let _0x3c4308=0x0;_0x3c4308<_0x2f65ee['length'];_0x3c4308++){const _0x3ce2fc=_0x2f65ee[_0x3c4308];if(_0x379eea){_0x4599ba+=_0x3ce2fc;if(_0x5d558b)_0x5d558b=![];else{if(_0x3ce2fc==='\x5c')_0x5d558b=!![];else{if(_0x3ce2fc===_0x379eea)_0x379eea=undefined;}}continue;}if(_0x3ce2fc==='\x22'){_0x379eea=_0x3ce2fc,_0x4599ba+=_0x3ce2fc,_0x3d59ba='value';continue;}if(_0x3ce2fc===','){let _0x274ba3=_0x3c4308+0x1;while(/\s/[_0x41ca9f(0x15b)](_0x2f65ee[_0x274ba3]??''))_0x274ba3++;if(_0x2f65ee[_0x274ba3]==='}'||_0x2f65ee[_0x274ba3]===']')continue;_0x4599ba+=_0x3ce2fc,_0x3d59ba=',';continue;}if(_0x3ce2fc==='{'||_0x3ce2fc==='['){_0x4599ba+=_0x3ce2fc,_0x3d59ba=_0x3ce2fc;continue;}if(_0x3ce2fc==='}'||_0x3ce2fc===']'){_0x4599ba+=_0x3ce2fc,_0x3d59ba=_0x3ce2fc;continue;}if((_0x3d59ba==='{'||_0x3d59ba===',')&&/[A-Za-z_$]/[_0x41ca9f(0x15b)](_0x3ce2fc)){let _0x45ce5d=_0x3c4308+0x1;while(/[A-Za-z0-9_$]/[_0x41ca9f(0x15b)](_0x2f65ee[_0x45ce5d]??''))_0x45ce5d++;let _0x4accf3=_0x45ce5d;while(/\s/[_0x41ca9f(0x15b)](_0x2f65ee[_0x4accf3]??''))_0x4accf3++;if(_0x2f65ee[_0x4accf3]===':'){_0x4599ba+=JSON[_0x41ca9f(0x175)](_0x2f65ee['slice'](_0x3c4308,_0x45ce5d)),_0x3c4308=_0x45ce5d-0x1,_0x3d59ba='key';continue;}}_0x4599ba+=_0x3ce2fc;if(!/\s/['test'](_0x3ce2fc)&&_0x3ce2fc!==':')_0x3d59ba=_0x41ca9f(0x152);}return _0x4599ba;}function parseGeneratedRegistryJson(_0x1d84cd){const _0x45a7d4=a6_0x11b664;try{return JSON[_0x45a7d4(0x13a)](_0x1d84cd);}catch{return JSON[_0x45a7d4(0x13a)](generatedObjectLiteralToJson(_0x1d84cd));}}function normalizeModelEntries(_0x24cb5c,_0x375c76){const _0xa972bf=a6_0x11b664,_0x21a9eb=Object['keys'](_0x24cb5c),_0x2771ea=[];for(const _0x398ad3 of _0x375c76){if(!_0x398ad3||typeof _0x398ad3!==_0xa972bf(0x17a)||Array['isArray'](_0x398ad3))return undefined;const _0x429ef6=_0x398ad3;if(typeof _0x429ef6[_0xa972bf(0x16e)]!==_0xa972bf(0x143)||typeof _0x429ef6[_0xa972bf(0x166)]!=='string'||typeof _0x429ef6[_0xa972bf(0x15f)]!==_0xa972bf(0x143))return undefined;let _0x580e1c;if(typeof _0x429ef6['datasetCode']===_0xa972bf(0x143)&&_0x429ef6[_0xa972bf(0x174)]===undefined)_0x580e1c=Object[_0xa972bf(0x168)](_0x21a9eb[_0xa972bf(0x161)](_0x15e954=>[_0x15e954,_0x429ef6[_0xa972bf(0x13b)]]));else{if(_0x429ef6[_0xa972bf(0x13b)]===undefined&&_0x429ef6[_0xa972bf(0x174)]&&typeof _0x429ef6['datasetCodes']===_0xa972bf(0x17a)&&!Array[_0xa972bf(0x15e)](_0x429ef6[_0xa972bf(0x174)])&&Object['values'](_0x429ef6[_0xa972bf(0x174)])[_0xa972bf(0x15a)](_0x241892=>typeof _0x241892===_0xa972bf(0x143)))_0x580e1c={..._0x429ef6[_0xa972bf(0x174)]};else return undefined;}_0x2771ea['push']({'alias':_0x429ef6[_0xa972bf(0x16e)],'tableName':_0x429ef6[_0xa972bf(0x166)],'name':_0x429ef6['name'],'datasetCodes':_0x580e1c});}return _0x2771ea;}export function parseModelRegistry(_0x588ae0){const _0x538bc0=a6_0x11b664,_0x3f360b=extractRegistryJson(_0x588ae0);if(!_0x3f360b)return undefined;try{const _0x9d3438=parseGeneratedRegistryJson(_0x3f360b);if(typeof _0x9d3438[_0x538bc0(0x138)]!==_0x538bc0(0x143)||!_0x9d3438[_0x538bc0(0x178)]||typeof _0x9d3438['profiles']!==_0x538bc0(0x17a))return undefined;if(_0x9d3438['protocol']===_0x538bc0(0x155))return migrateLegacyRegistry(_0x9d3438);if(!(_0x9d3438[_0x538bc0(0x160)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x9d3438[_0x538bc0(0x160)]===undefined&&_0x588ae0[_0x538bc0(0x171)](MODEL_REGISTRY_VERSION_MARKER))||!Array['isArray'](_0x9d3438['models']))return undefined;const _0x58ecc5=_0x9d3438[_0x538bc0(0x178)],_0x5c221d=normalizeModelEntries(_0x58ecc5,_0x9d3438[_0x538bc0(0x14f)]);if(!_0x5c221d)return undefined;return{'defaultProfile':_0x9d3438[_0x538bc0(0x138)],'profiles':_0x58ecc5,'models':_0x5c221d};}catch{return undefined;}}function a6_0x6f0b(_0x5b2029,_0x3c4a82){_0x5b2029=_0x5b2029-0x138;const _0x2e9511=a6_0x2e95();let _0x6f0b7b=_0x2e9511[_0x5b2029];return _0x6f0b7b;}export function readModelRegistry(_0x9a5cea){const _0x2021ff=a6_0x11b664;if(!existsSync(_0x9a5cea))return undefined;try{return parseModelRegistry(readFileSync(_0x9a5cea,_0x2021ff(0x169)));}catch{return undefined;}}function registrySource(_0x3d20d6){const _0x1d32cc=a6_0x11b664,_0xb14923=Object['keys'](_0x3d20d6[_0x1d32cc(0x178)]),_0x5de70c=_0x3d20d6[_0x1d32cc(0x14f)][_0x1d32cc(0x161)](_0x3c7546=>{const _0x17d664=_0x1d32cc,_0x296ffd=_0xb14923[_0x17d664(0x161)](_0x2965e2=>_0x3c7546['datasetCodes'][_0x2965e2]),_0x5b7931=_0x296ffd[0x0],_0x4532b9=_0x5b7931!==undefined&&_0x296ffd['every'](_0x46c0e3=>_0x46c0e3===_0x5b7931),_0x8cc5d7={'alias':_0x3c7546[_0x17d664(0x16e)],'tableName':_0x3c7546[_0x17d664(0x166)],'name':_0x3c7546['name']};return _0x4532b9?{..._0x8cc5d7,'datasetCode':_0x5b7931}:{..._0x8cc5d7,'datasetCodes':_0x3c7546[_0x17d664(0x174)]};}),_0x155af3=JSON[_0x1d32cc(0x175)]({'defaultProfile':_0x3d20d6['defaultProfile'],'profiles':_0x3d20d6[_0x1d32cc(0x178)],'models':_0x5de70c},null,0x2)['split']('\x0a')[_0x1d32cc(0x161)](_0x4cc7d5=>'\x20\x20'+_0x4cc7d5)[_0x1d32cc(0x153)]('\x0a');return _0x1d32cc(0x148)+MODEL_REGISTRY_VERSION_MARKER+_0x1d32cc(0x177)+REGISTRY_START+'\x0a'+_0x155af3+_0x1d32cc(0x179)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x526391,_0x4c6de8,_0x543df9){const _0x4ca864=a6_0x11b664,_0x59c201=_0x543df9[_0x4ca864(0x161)](_0x12d2c4=>({..._0x12d2c4,'alias':_0x12d2c4[_0x4ca864(0x16e)]||_0x12d2c4[_0x4ca864(0x166)]})),_0x430596=new Map(),_0x1df36a=new Map();for(const _0x45de62 of _0x59c201){const _0x41a7d2=_0x430596['get'](_0x45de62[_0x4ca864(0x16e)]);if(_0x41a7d2&&_0x41a7d2!==_0x45de62[_0x4ca864(0x166)])throw new Error(_0x4ca864(0x158)+_0x45de62[_0x4ca864(0x16e)]+_0x4ca864(0x15c)+_0x41a7d2+'\x22\x20and\x20\x22'+_0x45de62[_0x4ca864(0x166)]+'\x22\x20in\x20profile\x20\x22'+_0x4c6de8+'\x22.');const _0x5cf703=_0x1df36a[_0x4ca864(0x176)](_0x45de62[_0x4ca864(0x166)]);if(_0x5cf703&&_0x5cf703!==_0x45de62['alias'])throw new Error('Table\x20\x22'+_0x45de62[_0x4ca864(0x166)]+_0x4ca864(0x13c)+_0x5cf703+'\x22\x20and\x20\x22'+_0x45de62[_0x4ca864(0x16e)]+_0x4ca864(0x150)+_0x4c6de8+'\x22.');_0x430596['set'](_0x45de62[_0x4ca864(0x16e)],_0x45de62[_0x4ca864(0x166)]),_0x1df36a[_0x4ca864(0x14d)](_0x45de62[_0x4ca864(0x166)],_0x45de62[_0x4ca864(0x16e)]);const _0x5f5448=_0x526391[_0x4ca864(0x14f)][_0x4ca864(0x16a)](_0x55045e=>_0x55045e[_0x4ca864(0x16e)]===_0x45de62['alias']);if(_0x5f5448&&_0x5f5448[_0x4ca864(0x166)]!==_0x45de62[_0x4ca864(0x166)])throw new Error(_0x4ca864(0x158)+_0x45de62[_0x4ca864(0x16e)]+_0x4ca864(0x14e)+_0x5f5448[_0x4ca864(0x166)]+_0x4ca864(0x157)+_0x45de62[_0x4ca864(0x166)]+_0x4ca864(0x150)+_0x4c6de8+'\x22.');const _0x2f6c50=_0x526391[_0x4ca864(0x14f)][_0x4ca864(0x16a)](_0x2d6cd8=>_0x2d6cd8['tableName']===_0x45de62[_0x4ca864(0x166)]);if(_0x2f6c50&&_0x2f6c50[_0x4ca864(0x16e)]!==_0x45de62['alias'])throw new Error(_0x4ca864(0x165)+_0x45de62[_0x4ca864(0x166)]+_0x4ca864(0x146)+_0x2f6c50[_0x4ca864(0x16e)]+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x45de62[_0x4ca864(0x16e)]+_0x4ca864(0x150)+_0x4c6de8+'\x22.');}for(const _0x5a7783 of _0x526391[_0x4ca864(0x14f)]){delete _0x5a7783[_0x4ca864(0x174)][_0x4c6de8];}for(const _0xe1ee46 of _0x59c201){let _0x4f40f9=_0x526391['models'][_0x4ca864(0x16a)](_0x7eb432=>_0x7eb432[_0x4ca864(0x16e)]===_0xe1ee46[_0x4ca864(0x16e)]);!_0x4f40f9&&(_0x4f40f9={'alias':_0xe1ee46[_0x4ca864(0x16e)],'tableName':_0xe1ee46[_0x4ca864(0x166)],'name':_0xe1ee46[_0x4ca864(0x15f)],'datasetCodes':{}},_0x526391['models'][_0x4ca864(0x180)](_0x4f40f9)),(_0x4c6de8===_0x526391[_0x4ca864(0x138)]||!_0x4f40f9['datasetCodes'][_0x526391[_0x4ca864(0x138)]])&&(_0x4f40f9['alias']=_0xe1ee46['alias'],_0x4f40f9[_0x4ca864(0x166)]=_0xe1ee46[_0x4ca864(0x166)],_0x4f40f9['name']=_0xe1ee46[_0x4ca864(0x15f)]),_0x4f40f9[_0x4ca864(0x174)][_0x4c6de8]=_0xe1ee46[_0x4ca864(0x13b)];}_0x526391[_0x4ca864(0x14f)]=_0x526391[_0x4ca864(0x14f)]['filter'](_0x309c01=>Object[_0x4ca864(0x167)](_0x309c01[_0x4ca864(0x174)])[_0x4ca864(0x149)]>0x0);}function removeUnboundProfiles(_0x9f30a0){const _0x4cfc1b=a6_0x11b664,_0x1d82fb=Object[_0x4cfc1b(0x181)](_0x9f30a0[_0x4cfc1b(0x178)])[_0x4cfc1b(0x163)](([,_0x1afa8f])=>_0x1afa8f[_0x4cfc1b(0x142)]===_0x4cfc1b(0x16d))[_0x4cfc1b(0x161)](([_0x1b70c7])=>_0x1b70c7);if(_0x1d82fb[_0x4cfc1b(0x149)]===0x0)return;for(const _0x479dbd of _0x1d82fb){delete _0x9f30a0[_0x4cfc1b(0x178)][_0x479dbd];for(const _0x1d0024 of _0x9f30a0['models']){delete _0x1d0024[_0x4cfc1b(0x174)][_0x479dbd];}}_0x9f30a0['models']=_0x9f30a0[_0x4cfc1b(0x14f)][_0x4cfc1b(0x163)](_0x2a6b6d=>Object[_0x4cfc1b(0x167)](_0x2a6b6d['datasetCodes'])[_0x4cfc1b(0x149)]>0x0);}function a6_0x2e95(){const _0x30ed1c=['\x22\x20maps\x20to\x20alias\x20\x22','pid','/**\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','length','/*\x20rabetbase-model-registry:start\x20*/','/*\x20rabetbase-model-registry:v2\x20*/','2360IQWOcU','set','\x22\x20maps\x20to\x20table\x20\x22','models','\x22\x20in\x20profile\x20\x22','230RqJceK','value','join','lovrabet-model-registry/v2','lovrabet-model-registry/v1','/*\x20rabetbase-model-registry:end\x20*/','\x22\x20in\x20the\x20registry\x20but\x20\x22','Model\x20alias\x20\x22','models.generated.ts','every','test','\x22\x20maps\x20to\x20both\x20\x22','runtimeDomain','isArray','name','protocol','map','\x22\x20with\x20an\x20empty\x20result.\x20','filter','flatMap','Table\x20\x22','tableName','keys','fromEntries','utf8','find','profileName','122332UVZnpA','NOT-SET','alias','80xnUOkJ','56232NwUWBJ','includes','23653oCqNJz','trim','datasetCodes','stringify','get','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','profiles','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','object','outputDir','498201TMEcxO','\x20model(s)\x20in\x20profile\x20\x22','746022hnyebK','allowEmptyReplacement','push','entries','defaultProfile','110716LKzrQO','parse','datasetCode','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','slice','indexOf','360Njcosp','35fVLyFh','replace','appCode','string','Refusing\x20to\x20replace\x20','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.'];a6_0x2e95=function(){return _0x30ed1c;};return a6_0x2e95();}export function getProfileModels(_0x21425a,_0x1b4ff1){const _0x517fbb=a6_0x11b664;return _0x21425a['models'][_0x517fbb(0x164)](_0x211234=>{const _0x15f15a=_0x517fbb,_0x2019cf=_0x211234[_0x15f15a(0x174)][_0x1b4ff1];return _0x2019cf?[{'datasetCode':_0x2019cf,'tableName':_0x211234[_0x15f15a(0x166)],'name':_0x211234['name'],'alias':_0x211234[_0x15f15a(0x16e)]}]:[];});}export function updateModelRegistry(_0x5690ee){const _0x591b91=a6_0x11b664,_0x2bb649=a6_0x4ac867[_0x591b91(0x153)](_0x5690ee[_0x591b91(0x17b)],MODEL_REGISTRY_FILE_NAME),_0x3082a9=existsSync(_0x2bb649),_0x34d0d3=readModelRegistry(_0x2bb649);if(_0x3082a9&&!_0x34d0d3)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x591b91(0x145));const _0x33714f=_0x34d0d3??emptyRegistry(_0x5690ee[_0x591b91(0x138)]);if(_0x5690ee[_0x591b91(0x142)]!==_0x591b91(0x16d))removeUnboundProfiles(_0x33714f);const _0x4f96b2=_0x34d0d3?getProfileModels(_0x34d0d3,_0x5690ee[_0x591b91(0x16b)])[_0x591b91(0x149)]:0x0;if(_0x4f96b2>0x0&&_0x5690ee[_0x591b91(0x14f)][_0x591b91(0x149)]===0x0&&!_0x5690ee[_0x591b91(0x17f)])throw new Error(_0x591b91(0x144)+_0x4f96b2+_0x591b91(0x17d)+_0x5690ee[_0x591b91(0x16b)]+_0x591b91(0x162)+'Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.');_0x33714f[_0x591b91(0x138)]=_0x5690ee[_0x591b91(0x138)],_0x33714f[_0x591b91(0x178)][_0x5690ee[_0x591b91(0x16b)]]={'appCode':_0x5690ee['appCode'],'runtimeDomain':_0x5690ee[_0x591b91(0x15d)]},mergeProfileModels(_0x33714f,_0x5690ee['profileName'],_0x5690ee[_0x591b91(0x14f)]),mkdirSync(_0x5690ee[_0x591b91(0x17b)],{'recursive':!![]});const _0x37f74f=_0x2bb649+'.'+process[_0x591b91(0x147)]+'.'+Date['now']()+'.tmp';try{writeFileSync(_0x37f74f,registrySource(_0x33714f),{'encoding':_0x591b91(0x169),'mode':0x1a4}),renameSync(_0x37f74f,_0x2bb649);}catch(_0x1b6193){try{unlinkSync(_0x37f74f);}catch{}throw _0x1b6193;}return{'path':_0x2bb649,'registry':_0x33714f,'existed':_0x3082a9};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a7_0x129112=a7_0x2f37;function a7_0xce8d(){const _0x4555d2=['{ProjectRoutingImport}','30UGSaXU','utf8','profile-api.ts.tpl','5488301KCCDth','relative','1636795lpIhWs','1482969ojYSUU','model-runtime.ts.tpl','cwd','all','6251940SfyAuW','typescript','12WBjHTE','join','1690200pXCUFJ','125816gyvERL','format','resolve','replace','568048zGWTNY','profile-client.ts.tpl'];a7_0xce8d=function(){return _0x4555d2;};return a7_0xce8d();}(function(_0x4079c4,_0x5d36c8){const _0x176323=a7_0x2f37,_0x5b8b26=_0x4079c4();while(!![]){try{const _0x3ce834=-parseInt(_0x176323(0x7d))/0x1*(-parseInt(_0x176323(0x84))/0x2)+parseInt(_0x176323(0x8a))/0x3*(parseInt(_0x176323(0x7a))/0x4)+-parseInt(_0x176323(0x89))/0x5+-parseInt(_0x176323(0x8e))/0x6+-parseInt(_0x176323(0x87))/0x7+-parseInt(_0x176323(0x81))/0x8+-parseInt(_0x176323(0x7c))/0x9;if(_0x3ce834===_0x5d36c8)break;else _0x5b8b26['push'](_0x5b8b26['shift']());}catch(_0x295c6f){_0x5b8b26['push'](_0x5b8b26['shift']());}}}(a7_0xce8d,0xe9e3b));import{readFileSync}from'node:fs';import a7_0x3ed7a3 from'node:path';import{fileURLToPath}from'node:url';import a7_0x2c9258 from'prettier';function a7_0x2f37(_0x303733,_0xf2d25b){_0x303733=_0x303733-0x7a;const _0xce8d59=a7_0xce8d();let _0x2f3754=_0xce8d59[_0x303733];return _0x2f3754;}import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function relativeImport(_0x44b203,_0x3862b0){const _0x17ab74=a7_0x2f37;let _0x25e5b9=a7_0x3ed7a3[_0x17ab74(0x88)](_0x44b203,_0x3862b0)[_0x17ab74(0x80)](/\\/g,'/');if(!_0x25e5b9['startsWith']('.'))_0x25e5b9='./'+_0x25e5b9;return _0x25e5b9;}export async function renderModelRegistryScaffold(_0x511344,_0x1c4204=process[a7_0x129112(0x8c)]()){const _0x339ac9=a7_0x129112,_0x471379=fileURLToPath(import.meta.url),_0x20ea95=a7_0x3ed7a3[_0x339ac9(0x7f)](a7_0x3ed7a3['dirname'](_0x471379),'../../templates/generate-api'),_0x2ccf85=relativeImport(a7_0x3ed7a3['resolve'](_0x511344),a7_0x3ed7a3['resolve'](_0x1c4204,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x3f7ef4=readFileSync(a7_0x3ed7a3[_0x339ac9(0x7b)](_0x20ea95,_0x339ac9(0x86)),_0x339ac9(0x85))[_0x339ac9(0x80)](_0x339ac9(0x83),_0x2ccf85),[_0x400107,_0x50f4d4,_0xdecec3]=await Promise[_0x339ac9(0x8d)]([a7_0x2c9258['format'](_0x3f7ef4,{'parser':_0x339ac9(0x8f)}),a7_0x2c9258[_0x339ac9(0x7e)](readFileSync(a7_0x3ed7a3['join'](_0x20ea95,_0x339ac9(0x82)),_0x339ac9(0x85)),{'parser':_0x339ac9(0x8f)}),a7_0x2c9258[_0x339ac9(0x7e)](readFileSync(a7_0x3ed7a3[_0x339ac9(0x7b)](_0x20ea95,_0x339ac9(0x8b)),'utf8'),{'parser':_0x339ac9(0x8f)})]);return{'api':_0x400107,'client':_0x50f4d4,'modelRuntime':_0xdecec3};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x193ccc,_0x43b18b){const _0x58de58=a8_0x7204,_0x5e1106=_0x193ccc();while(!![]){try{const _0x126453=parseInt(_0x58de58(0xc3))/0x1+parseInt(_0x58de58(0xb6))/0x2+-parseInt(_0x58de58(0xce))/0x3*(parseInt(_0x58de58(0xc6))/0x4)+-parseInt(_0x58de58(0xd2))/0x5*(-parseInt(_0x58de58(0xc0))/0x6)+-parseInt(_0x58de58(0xc8))/0x7+parseInt(_0x58de58(0xd3))/0x8+-parseInt(_0x58de58(0xc9))/0x9;if(_0x126453===_0x43b18b)break;else _0x5e1106['push'](_0x5e1106['shift']());}catch(_0x556b5c){_0x5e1106['push'](_0x5e1106['shift']());}}}(a8_0x3267,0x2e415));import{existsSync}from'node:fs';import a8_0x1ee415 from'node:path';import{readRawConfig}from'../context/config-loader.js';function a8_0x7204(_0x518f6d,_0x5da80e){_0x518f6d=_0x518f6d-0xb6;const _0x326780=a8_0x3267();let _0x7204ff=_0x326780[_0x518f6d];return _0x7204ff;}import{MODEL_REGISTRY_FILE_NAME,readModelRegistry}from'../api/model-registry-file.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a8_0x3267(){const _0x2e47=['165703UXbefX','defaultApp','profiles','4XItycD','filter','753032tNzuHV','3193065suWWNs','entries','-api.ts','apiDir','string','945495AFFozj','map','\x22\x20is\x20missing\x20from\x20','defaultProfile','5tNotXd','1654920Jtqtgi','Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.','670410KXWUKy','length','find','appCode','api.ts','apps','appcode','AppCode\x20\x22','validation','cwd','1555284aZRdFt','`\x20first.','resolve'];a8_0x3267=function(){return _0x2e47;};return a8_0x3267();}export function resolveApiModelSource(_0x15f343,_0xafdf68,_0x1a1c63){const _0x8ea8a0=a8_0x7204,_0x4bdc6c=a8_0x1ee415[_0x8ea8a0(0xc2)](process[_0x8ea8a0(0xbf)](),_0x15f343),_0x1f9399=a8_0x1ee415['resolve'](_0x4bdc6c,_0x8ea8a0(0xba)),_0x273df8=a8_0x1ee415['resolve'](_0x4bdc6c,MODEL_REGISTRY_FILE_NAME),_0x51c4d0=readModelRegistry(_0x273df8);if(_0x51c4d0){const _0xeb0261=_0xafdf68?Object[_0x8ea8a0(0xca)](_0x51c4d0[_0x8ea8a0(0xc5)])[_0x8ea8a0(0xc7)](([,_0x4b130e])=>_0x4b130e[_0x8ea8a0(0xb9)]===_0xafdf68):[];if(_0x1a1c63){if(_0x51c4d0[_0x8ea8a0(0xc5)][_0x1a1c63])return{'filePath':_0x273df8,'profileName':_0x1a1c63};if(_0xeb0261['length']>0x0)throw CliErrors[_0x8ea8a0(0xbe)]('Model\x20profile\x20\x22'+_0x1a1c63+_0x8ea8a0(0xd0)+MODEL_REGISTRY_FILE_NAME+'.','Run\x20`'+CLI_BIN_NAME+'\x20api\x20pull\x20--app\x20'+_0x1a1c63+_0x8ea8a0(0xc1));}else{if(_0xeb0261[_0x8ea8a0(0xb7)]===0x1)return{'filePath':_0x273df8,'profileName':_0xeb0261[0x0][0x0]};if(_0xeb0261['length']>0x1)throw new Error(_0x8ea8a0(0xbd)+_0xafdf68+'\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20'+_0xeb0261[_0x8ea8a0(0xcf)](([_0x5f090e])=>_0x5f090e)['join'](',\x20')+'.\x20'+_0x8ea8a0(0xd4));if(_0x51c4d0[_0x8ea8a0(0xc5)][_0x51c4d0[_0x8ea8a0(0xd1)]]&&!_0xafdf68)return{'filePath':_0x273df8,'profileName':_0x51c4d0[_0x8ea8a0(0xd1)]};}}if(!_0xafdf68&&!_0x1a1c63)return{'filePath':_0x1f9399};const _0x1087f0=readRawConfig(),_0x4df186=_0x1087f0[_0x8ea8a0(0xbb)]&&typeof _0x1087f0[_0x8ea8a0(0xbb)]==='object'?_0x1087f0[_0x8ea8a0(0xbb)]:{},_0x5b4708=_0x1a1c63&&_0x4df186[_0x1a1c63]?[_0x1a1c63,_0x4df186[_0x1a1c63]]:Object[_0x8ea8a0(0xca)](_0x4df186)[_0x8ea8a0(0xb8)](([,_0x1f3df5])=>_0x1f3df5?.[_0x8ea8a0(0xbc)]===_0xafdf68);if(!_0x5b4708)return{'filePath':_0x1f9399};const [_0x29187b,_0x4c1995]=_0x5b4708,_0x2ef9b5=typeof _0x1087f0[_0x8ea8a0(0xc4)]===_0x8ea8a0(0xcd)?_0x1087f0[_0x8ea8a0(0xc4)]:undefined;if(_0x4c1995?.[_0x8ea8a0(0xcc)])return{'filePath':_0x1f9399};if(_0x2ef9b5&&_0x29187b!==_0x2ef9b5){const _0x4bec76=a8_0x1ee415[_0x8ea8a0(0xc2)](_0x4bdc6c,_0x29187b+_0x8ea8a0(0xcb));if(existsSync(_0x4bec76))return{'filePath':_0x4bec76};}return{'filePath':_0x1f9399};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x537a16,_0x169a3a){const _0xd116fb=a9_0x451d,_0x1010e9=_0x537a16();while(!![]){try{const _0x497596=parseInt(_0xd116fb(0xb2))/0x1*(-parseInt(_0xd116fb(0xae))/0x2)+-parseInt(_0xd116fb(0xb5))/0x3*(parseInt(_0xd116fb(0xb1))/0x4)+-parseInt(_0xd116fb(0xb3))/0x5+-parseInt(_0xd116fb(0xb7))/0x6+-parseInt(_0xd116fb(0xb4))/0x7*(-parseInt(_0xd116fb(0xac))/0x8)+parseInt(_0xd116fb(0xbe))/0x9*(parseInt(_0xd116fb(0xbc))/0xa)+parseInt(_0xd116fb(0xb6))/0xb;if(_0x497596===_0x169a3a)break;else _0x1010e9['push'](_0x1010e9['shift']());}catch(_0x32610a){_0x1010e9['push'](_0x1010e9['shift']());}}}(a9_0x1153,0x320a2));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a9_0x451d(_0x46efb8,_0x559f9d){_0x46efb8=_0x46efb8-0xab;const _0x115338=a9_0x1153();let _0x451dfb=_0x115338[_0x46efb8];return _0x451dfb;}import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';function a9_0x1153(){const _0x323b8c=['2esrWod','log','autoYes','112vBAVOZ','329779MItGUu','407980zIHpka','112gArStd','13083BaGOFk','5708076sWXnaF','961710PVbnJk','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','stop','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','10KbKczp','Run\x20`','774918eytDrp','start','*\x20Login\x20successful!','146856gCDmeW','nonInteractive'];a9_0x1153=function(){return _0x323b8c;};return a9_0x1153();}import a9_0x7e9df1 from'ora';export async function runAuthServer(_0xe425c7){const _0x6753a3=a9_0x451d,_0x4242eb=await getIsSessionValid();if(_0x4242eb){console[_0x6753a3(0xaf)](_0x6753a3(0xba));return;}if(_0xe425c7?.[_0x6753a3(0xad)]&&!_0xe425c7[_0x6753a3(0xb0)])throw CliErrors['validation'](_0x6753a3(0xbb),_0x6753a3(0xbd)+CLI_BIN_NAME+'\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.');const _0x4b8909=_0xe425c7?.[_0x6753a3(0xb0)]?!![]:await confirm({'message':'No\x20valid\x20session.\x20Login\x20now?','default':!![]});if(!_0x4b8909)return;if(_0xe425c7?.['nonInteractive']){console['log']('Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.');const _0x5a6089=await authServer({'silent':![],'openBrowser':![]});_0x5a6089?console[_0x6753a3(0xaf)]('*\x20Login\x20successful!'):console[_0x6753a3(0xaf)]('!\x20Login\x20failed.');return;}const _0x5c86b4=a9_0x7e9df1(_0x6753a3(0xb8))[_0x6753a3(0xbf)](),_0x4c25c2=await authServer({'silent':!![],'openBrowser':!![]});_0x5c86b4[_0x6753a3(0xb9)](),_0x4c25c2?console[_0x6753a3(0xaf)](_0x6753a3(0xab)):console['log']('!\x20Login\x20failed.');}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x9590d8=a10_0x5064;(function(_0x520e88,_0x4ff928){const _0x1f5302=a10_0x5064,_0x1f8bd2=_0x520e88();while(!![]){try{const _0x488e81=-parseInt(_0x1f5302(0x1da))/0x1+parseInt(_0x1f5302(0x1ea))/0x2*(parseInt(_0x1f5302(0x1dd))/0x3)+-parseInt(_0x1f5302(0x1f3))/0x4+-parseInt(_0x1f5302(0x1d1))/0x5+-parseInt(_0x1f5302(0x1e2))/0x6+-parseInt(_0x1f5302(0x1e4))/0x7+-parseInt(_0x1f5302(0x1de))/0x8*(-parseInt(_0x1f5302(0x1d0))/0x9);if(_0x488e81===_0x4ff928)break;else _0x1f8bd2['push'](_0x1f8bd2['shift']());}catch(_0x210d3f){_0x1f8bd2['push'](_0x1f8bd2['shift']());}}}(a10_0x5c5e,0xd3df3));import{writeFileSync}from'node:fs';import a10_0x26651e from'node:http';import a10_0x827428 from'node:https';import{getUserDomain}from'../constant/domain.js';function a10_0x5064(_0x2edd32,_0x325be0){_0x2edd32=_0x2edd32-0x1d0;const _0x5c5e3c=a10_0x5c5e();let _0x506457=_0x5c5e3c[_0x2edd32];return _0x506457;}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';function a10_0x5c5e(){const _0x48f345=['💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','5753732PGfzFT','127.0.0.1','cookie','win32','📍\x20Login\x20URL:','then','end','headers','text/html;\x20charset=utf-8','open\x20\x22','certificateUrl','45LYgpMY','3758195gOWpmV','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','origin','💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','close','utf-8','🔐\x20Starting\x20login\x20service...','log','writeHead','677025dEuEdK','/cert/lovrabet-dev.json','json','6jvHMvC','4472336fYsHFM','session','catch','isAuth','802812ftYJqe','xdg-open\x20\x22','4088784EiTGJd','cmd\x20/c\x20start\x20\x22\x22\x20\x22','/api/auth/get-session','silent','platform','error','1657628DcDocZ','listen','port','createServer','address','user','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','local'];a10_0x5c5e=function(){return _0x48f345;};return a10_0x5c5e();}export const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export function resolveAuthCallbackRouting(_0x4dc82e){const _0x306764=a10_0x5064;if(!_0x4dc82e)return getProjectDomainRoutingManifest()[_0x306764(0x1f1)];const _0x3fd232=getOfficialRoutingProfile(_0x4dc82e),_0x52cd09=getOfficialRoutingCdn(_0x4dc82e);return{'origin':_0x3fd232['local']['origin'],'certificateUrl':_0x52cd09['lovrabet']+_0x306764(0x1db)};}function withPort(_0x4dc687,_0x570520){const _0x4f99ce=a10_0x5064,_0x3f261d=new URL(_0x4dc687);return _0x3f261d[_0x4f99ce(0x1ec)]=String(_0x570520),_0x3f261d[_0x4f99ce(0x1d3)];}export async function authServer(_0x2cee74){const _0x3eeb27=a10_0x5064,_0x3bee1b=_0x2cee74?.[_0x3eeb27(0x1e7)]||![],_0x4333b6=_0x2cee74?.['openBrowser']??!![],_0x464a22=_0x2cee74?.['timeoutMs']??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x5519fa=resolveAuthCallbackRouting(),_0x4263b8=_0x5519fa[_0x3eeb27(0x1fd)]?await(await fetch(_0x5519fa[_0x3eeb27(0x1fd)]))[_0x3eeb27(0x1dc)]():undefined;return new Promise(async(_0x2ca2e1,_0x4501d3)=>{const _0x5665b9=_0x3eeb27;let _0x585881=0x0,_0x5c99af=![],_0x54dd4d;const _0x193c82=async(_0x1b8bfb,_0x1967b2)=>{const _0x2f3819=a10_0x5064,_0x1cf8d1=getUserDomain(),_0x23ca10=_0x1b8bfb[_0x2f3819(0x1fa)][_0x2f3819(0x1f5)]||'',_0xef5618=await fetch(_0x1cf8d1+_0x2f3819(0x1e6),{'headers':{'cookie':_0x23ca10}})[_0x2f3819(0x1f8)](_0xb1a8b7=>_0xb1a8b7[_0x2f3819(0x1dc)]()),_0x4ce02a=_0xef5618&&_0xef5618[_0x2f3819(0x1df)]&&_0xef5618[_0x2f3819(0x1ef)];if(_0x4ce02a){writeFileSync(cookieFile,_0x23ca10,_0x2f3819(0x1d6));const _0x327ca6=buildLoginSuccessHtml();_0x1967b2[_0x2f3819(0x1d9)](0xc8,{'Content-Type':_0x2f3819(0x1fb)}),_0x1967b2[_0x2f3819(0x1f9)](_0x327ca6),_0xd3edf0(!![]);}else{const _0x2e7a15=encodeURIComponent(withPort(_0x5519fa[_0x2f3819(0x1d3)],_0x585881));_0x1967b2[_0x2f3819(0x1d9)](0x12e,{'location':_0x1cf8d1+'/sign-in?redirect='+_0x2e7a15}),_0x1967b2[_0x2f3819(0x1f9)]();return;}},_0x51a355=_0x4263b8?a10_0x827428[_0x5665b9(0x1ed)](_0x4263b8,_0x193c82):a10_0x26651e[_0x5665b9(0x1ed)](_0x193c82);function _0xd3edf0(_0x181d57){const _0x2fb50e=_0x5665b9;if(_0x5c99af)return;_0x5c99af=!![],_0x54dd4d&&clearTimeout(_0x54dd4d),_0x51a355[_0x2fb50e(0x1d5)](),_0x2ca2e1(_0x181d57);}_0x51a355[_0x5665b9(0x1eb)](0x0,_0x5665b9(0x1f4),()=>{const _0x945202=_0x5665b9,_0x29498a=_0x51a355[_0x945202(0x1ee)]();_0x585881=typeof _0x29498a==='object'&&_0x29498a?_0x29498a['port']:Number(_0x29498a);const _0x3c703f=withPort(_0x5519fa[_0x945202(0x1d3)],_0x585881);_0x54dd4d=setTimeout(()=>{!_0x3bee1b&&console['log']('!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.'),_0xd3edf0(![]);},_0x464a22);!_0x3bee1b&&(console['log'](_0x945202(0x1d7)),console[_0x945202(0x1d8)](_0x945202(0x1f7),_0x3c703f),_0x4333b6?(console[_0x945202(0x1d8)]('🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...'),console['log'](''),console['log'](_0x945202(0x1f2))):console[_0x945202(0x1d8)](_0x945202(0x1d4)),console[_0x945202(0x1d8)](''));if(!_0x4333b6)return;openInBrowser(_0x3c703f)[_0x945202(0x1f8)](_0x34e376=>{const _0x40b510=_0x945202;!_0x3bee1b&&(_0x34e376?console[_0x40b510(0x1d8)](_0x40b510(0x1d2)):(console[_0x40b510(0x1d8)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x40b510(0x1d8)](_0x40b510(0x1f0),_0x3c703f)),console[_0x40b510(0x1d8)](''));})[_0x945202(0x1e0)](()=>{const _0x5631dd=_0x945202;!_0x3bee1b&&(console[_0x5631dd(0x1d8)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x5631dd(0x1d8)](_0x5631dd(0x1f0),_0x3c703f),console[_0x5631dd(0x1d8)](''));});}),_0x51a355['on']('error',_0x2fc037=>{const _0x2ac20c=_0x5665b9;if(_0x5c99af)return;_0x5c99af=!![],_0x54dd4d&&clearTimeout(_0x54dd4d),!_0x3bee1b&&console[_0x2ac20c(0x1e9)]('Auth\x20server\x20error:',_0x2fc037),_0x51a355['close'](),_0x4501d3(_0x2fc037);});});}function openInBrowser(_0xe2a3c8){return new Promise(_0x183611=>{const _0x36c8e2=a10_0x5064,_0x4bc608=process[_0x36c8e2(0x1e8)];let _0x5067d9;if(_0x4bc608===_0x36c8e2(0x1f6))_0x5067d9=_0x36c8e2(0x1e5)+_0xe2a3c8+'\x22';else _0x4bc608==='darwin'?_0x5067d9=_0x36c8e2(0x1fc)+_0xe2a3c8+'\x22':_0x5067d9=_0x36c8e2(0x1e3)+_0xe2a3c8+'\x22';exec(_0x5067d9,_0x4d9daf=>{_0x4d9daf?_0x183611(![]):_0x183611(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a10_0x9590d8(0x1d8)](a10_0x9590d8(0x1e1),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a11_0x2927(){const _0x411e54=['247281eOwrrB','.lovrabet','3680400YKjUFt','cookie','2859702wNZtje','542365ovhlep','4aROwkf','20teGiDP','2340jnIekv','78057dhYwyC','408047tKLqKQ','2549750vJkNSQ'];a11_0x2927=function(){return _0x411e54;};return a11_0x2927();}const a11_0x4d62ec=a11_0x5eaf;(function(_0x16c733,_0x12bf70){const _0x8f939=a11_0x5eaf,_0x20cb36=_0x16c733();while(!![]){try{const _0x81e97=-parseInt(_0x8f939(0x1e8))/0x1+parseInt(_0x8f939(0x1f0))/0x2*(-parseInt(_0x8f939(0x1ea))/0x3)+-parseInt(_0x8f939(0x1f1))/0x4*(parseInt(_0x8f939(0x1ef))/0x5)+-parseInt(_0x8f939(0x1ee))/0x6+parseInt(_0x8f939(0x1e9))/0x7+-parseInt(_0x8f939(0x1ec))/0x8+-parseInt(_0x8f939(0x1e7))/0x9*(-parseInt(_0x8f939(0x1e6))/0xa);if(_0x81e97===_0x12bf70)break;else _0x20cb36['push'](_0x20cb36['shift']());}catch(_0x4e7e94){_0x20cb36['push'](_0x20cb36['shift']());}}}(a11_0x2927,0x53727));import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a11_0x5eaf(_0x30918c,_0x3848d4){_0x30918c=_0x30918c-0x1e6;const _0x292744=a11_0x2927();let _0x5eaf6b=_0x292744[_0x30918c];return _0x5eaf6b;}import{join}from'node:path';export const configDir=join(homedir(),a11_0x4d62ec(0x1eb));export const cookieFile=join(configDir,a11_0x4d62ec(0x1ed));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a12_0x2cc1(){var _0x1ca191=['192LOSdHv','utf-8','4GaiLLE','364484qXvqaP','6642126dYdxOH','6421840jqTDJH','2059232MTNJmu','301900UOTMeY','121961DmCmSH','930060aXgYyF'];a12_0x2cc1=function(){return _0x1ca191;};return a12_0x2cc1();}(function(_0x529d88,_0x5440cb){var _0x4a1e85=a12_0x2afa,_0xadd082=_0x529d88();while(!![]){try{var _0x205549=parseInt(_0x4a1e85(0x1c7))/0x1+-parseInt(_0x4a1e85(0x1c3))/0x2+-parseInt(_0x4a1e85(0x1c9))/0x3+parseInt(_0x4a1e85(0x1c2))/0x4*(parseInt(_0x4a1e85(0x1c5))/0x5)+-parseInt(_0x4a1e85(0x1ca))/0x6*(-parseInt(_0x4a1e85(0x1c8))/0x7)+-parseInt(_0x4a1e85(0x1c6))/0x8+-parseInt(_0x4a1e85(0x1c4))/0x9;if(_0x205549===_0x5440cb)break;else _0xadd082['push'](_0xadd082['shift']());}catch(_0x1adf6e){_0xadd082['push'](_0xadd082['shift']());}}}(a12_0x2cc1,0xa02fc));import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';function a12_0x2afa(_0x342db6,_0x11492d){_0x342db6=_0x342db6-0x1c2;var _0x2cc17d=a12_0x2cc1();var _0x2afa12=_0x2cc17d[_0x342db6];return _0x2afa12;}export function getCookie(){var _0x24f329=a12_0x2afa;try{return readFileSync(cookieFile,_0x24f329(0x1cb));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x413069,_0x339853){const _0x6c77f5=a13_0x5b4c,_0x1670fe=_0x413069();while(!![]){try{const _0x3377fd=parseInt(_0x6c77f5(0x10d))/0x1+-parseInt(_0x6c77f5(0x115))/0x2*(parseInt(_0x6c77f5(0x118))/0x3)+-parseInt(_0x6c77f5(0x112))/0x4+parseInt(_0x6c77f5(0x119))/0x5+-parseInt(_0x6c77f5(0x10f))/0x6*(-parseInt(_0x6c77f5(0x113))/0x7)+-parseInt(_0x6c77f5(0x117))/0x8+parseInt(_0x6c77f5(0x10e))/0x9*(parseInt(_0x6c77f5(0x114))/0xa);if(_0x3377fd===_0x339853)break;else _0x1670fe['push'](_0x1670fe['shift']());}catch(_0x2c8e95){_0x1670fe['push'](_0x1670fe['shift']());}}}(a13_0x3485,0x8086c));import{existsSync,readFileSync}from'node:fs';function a13_0x3485(){const _0xfbab9f=['18VGRcBW','6TSbYnE','user','utf-8','3749432GflOGz','6656699DNwMdj','3317860QhGYql','2tvAzkq','/api/auth/get-session','2499016xvAVnP','2112897HyMzWU','708130yHRitm','json','724323UUImgI'];a13_0x3485=function(){return _0xfbab9f;};return a13_0x3485();}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a13_0x5b4c(_0x3b9919,_0x216e4b){_0x3b9919=_0x3b9919-0x10c;const _0x3485e3=a13_0x3485();let _0x5b4cab=_0x3485e3[_0x3b9919];return _0x5b4cab;}export async function getSessionUserInfo(_0x314073){const _0x1cf5b2=a13_0x5b4c;try{if(_0x314073===undefined){if(!existsSync(cookieFile))return null;_0x314073=readFileSync(cookieFile,_0x1cf5b2(0x111));}if(!_0x314073)return null;const _0x2e0efd=await fetch(getUserDomain()+_0x1cf5b2(0x116),{'headers':{'cookie':_0x314073}});if(!_0x2e0efd['ok'])return null;const _0x1f7bc0=await _0x2e0efd[_0x1cf5b2(0x10c)]();if(!_0x1f7bc0['session']||!_0x1f7bc0[_0x1cf5b2(0x110)])return null;return _0x1f7bc0;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4c0063,_0x58b60f){const _0x545ab8=a14_0x1133,_0x4594ac=_0x4c0063();while(!![]){try{const _0x16f522=-parseInt(_0x545ab8(0xa8))/0x1+parseInt(_0x545ab8(0xae))/0x2*(-parseInt(_0x545ab8(0xb1))/0x3)+parseInt(_0x545ab8(0xab))/0x4+parseInt(_0x545ab8(0xb3))/0x5+parseInt(_0x545ab8(0xac))/0x6+parseInt(_0x545ab8(0xaf))/0x7+-parseInt(_0x545ab8(0xb2))/0x8;if(_0x16f522===_0x58b60f)break;else _0x4594ac['push'](_0x4594ac['shift']());}catch(_0x207fca){_0x4594ac['push'](_0x4594ac['shift']());}}}(a14_0x4cdb,0xb0a3b));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a14_0x1133(_0x1261a2,_0x330ca6){_0x1261a2=_0x1261a2-0xa7;const _0x4cdb8c=a14_0x4cdb();let _0x113333=_0x4cdb8c[_0x1261a2];return _0x113333;}import{cookieFile}from'../auth/constant.js';function a14_0x4cdb(){const _0x11b04e=['4473305paobXI','session','utf-8','344497dTMbYu','/api/auth/get-session','then','5517708GJhXZr','581628zHSZpT','user','72dKnygP','9572577KJvBxm','json','60240FEEnaa','15581160MeJXqq'];a14_0x4cdb=function(){return _0x11b04e;};return a14_0x4cdb();}export async function getIsSessionValid(){const _0x5e2eb7=a14_0x1133;try{if(!existsSync(cookieFile))return![];const _0x416b87=readFileSync(cookieFile,_0x5e2eb7(0xa7)),_0x313116=await fetch(getUserDomain()+_0x5e2eb7(0xa9),{'headers':{'cookie':_0x416b87}})[_0x5e2eb7(0xaa)](_0x1b3c65=>_0x1b3c65[_0x5e2eb7(0xb0)]());return _0x313116&&_0x313116[_0x5e2eb7(0xb4)]&&_0x313116[_0x5e2eb7(0xad)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a15_0x4cf9(){const _0x100899=['287706PgWGVP','8DGuwQz','308889lqkdaW','81FTTqRK','6ibJRPu','</div>\x0a\x20\x20\x20\x20<p\x20class=\x22cli-hint\x22>Rabetbase\x20CLI\x20·\x20session\x20saved\x20locally</p>\x0a\x20\x20</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>','<!doctype\x20html>\x0a<html\x20lang=\x22en\x22>\x0a<head>\x0a\x20\x20<meta\x20charset=\x22utf-8\x22>\x0a\x20\x20<meta\x20name=\x22viewport\x22\x20content=\x22width=device-width,\x20initial-scale=1\x22>\x0a\x20\x20<title>Login\x20successful\x20·\x20Rabetbase\x20CLI</title>\x0a\x20\x20<style>\x0a\x20\x20\x20\x20:root\x20{\x0a\x20\x20\x20\x20\x20\x20--bg0:\x20#0f1419;\x0a\x20\x20\x20\x20\x20\x20--bg1:\x20#1a2332;\x0a\x20\x20\x20\x20\x20\x20--card:\x20#ffffff;\x0a\x20\x20\x20\x20\x20\x20--text:\x20#1c2128;\x0a\x20\x20\x20\x20\x20\x20--muted:\x20#5c6570;\x0a\x20\x20\x20\x20\x20\x20--accent:\x20#2563eb;\x0a\x20\x20\x20\x20\x20\x20--accent-soft:\x20#eff6ff;\x0a\x20\x20\x20\x20\x20\x20--success:\x20#059669;\x0a\x20\x20\x20\x20\x20\x20--radius:\x2016px;\x0a\x20\x20\x20\x20\x20\x20--shadow:\x200\x2025px\x2050px\x20-12px\x20rgba(15,\x2020,\x2025,\x200.35);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20*\x20{\x20box-sizing:\x20border-box;\x20}\x0a\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20min-height:\x20100vh;\x0a\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20\x20\x20padding:\x2024px;\x0a\x20\x20\x20\x20\x20\x20font-family:\x20ui-sans-serif,\x20system-ui,\x20-apple-system,\x20\x22Segoe\x20UI\x22,\x20Roboto,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22Helvetica\x20Neue\x22,\x20Arial,\x20\x22Noto\x20Sans\x22,\x20\x22PingFang\x20SC\x22,\x20\x22Microsoft\x20YaHei\x22,\x20sans-serif;\x0a\x20\x20\x20\x20\x20\x20background:\x20linear-gradient(160deg,\x20var(--bg0)\x200%,\x20var(--bg1)\x2045%,\x20#243047\x20100%);\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--text);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.card\x20{\x0a\x20\x20\x20\x20\x20\x20width:\x20100%;\x0a\x20\x20\x20\x20\x20\x20max-width:\x20420px;\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--card);\x0a\x20\x20\x20\x20\x20\x20border-radius:\x20var(--radius);\x0a\x20\x20\x20\x20\x20\x20box-shadow:\x20var(--shadow);\x0a\x20\x20\x20\x20\x20\x20padding:\x2040px\x2036px\x2032px;\x0a\x20\x20\x20\x20\x20\x20text-align:\x20center;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.icon\x20{\x0a\x20\x20\x20\x20\x20\x20width:\x2064px;\x0a\x20\x20\x20\x20\x20\x20height:\x2064px;\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x20auto\x2020px;\x0a\x20\x20\x20\x20\x20\x20border-radius:\x2050%;\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--accent-soft);\x0a\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.icon\x20svg\x20{\x20width:\x2036px;\x20height:\x2036px;\x20}\x0a\x20\x20\x20\x20h1\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x200\x2012px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x201.375rem;\x0a\x20\x20\x20\x20\x20\x20font-weight:\x20600;\x0a\x20\x20\x20\x20\x20\x20letter-spacing:\x20-0.02em;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20p.lead\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x200\x208px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.9375rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--muted);\x0a\x20\x20\x20\x20\x20\x20line-height:\x201.55;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.countdown\x20{\x0a\x20\x20\x20\x20\x20\x20display:\x20inline-flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20gap:\x206px;\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2016px;\x0a\x20\x20\x20\x20\x20\x20padding:\x208px\x2014px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.875rem;\x0a\x20\x20\x20\x20\x20\x20font-variant-numeric:\x20tabular-nums;\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--accent);\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--accent-soft);\x0a\x20\x20\x20\x20\x20\x20border-radius:\x20999px;\x0a\x20\x20\x20\x20\x20\x20font-weight:\x20500;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20#manualMsg\x20{\x0a\x20\x20\x20\x20\x20\x20display:\x20none;\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2020px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.8125rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20#b91c1c;\x0a\x20\x20\x20\x20\x20\x20line-height:\x201.45;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.cli-hint\x20{\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2028px;\x0a\x20\x20\x20\x20\x20\x20padding-top:\x2024px;\x0a\x20\x20\x20\x20\x20\x20border-top:\x201px\x20solid\x20#e8ecf0;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.75rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20#8b949e;\x0a\x20\x20\x20\x20}\x0a\x20\x20</style>\x0a</head>\x0a<body>\x0a\x20\x20<div\x20class=\x22card\x22\x20role=\x22status\x22\x20aria-live=\x22polite\x22>\x0a\x20\x20\x20\x20<div\x20class=\x22icon\x22\x20aria-hidden=\x22true\x22>\x0a\x20\x20\x20\x20\x20\x20<svg\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x2210\x22\x20stroke=\x22#059669\x22\x20stroke-width=\x222\x22\x20fill=\x22none\x22/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M8\x2012.5l2.5\x202.5L16\x209\x22\x20stroke=\x22#059669\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22/>\x0a\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<h1>Login\x20successful</h1>\x0a\x20\x20\x20\x20<p\x20class=\x22lead\x22>You\x20can\x20return\x20to\x20the\x20terminal\x20to\x20continue.\x20This\x20window\x20will\x20try\x20to\x20close\x20automatically.</p>\x0a\x20\x20\x20\x20<div\x20class=\x22countdown\x22>\x0a\x20\x20\x20\x20\x20\x20Closing\x20in\x20<span\x20id=\x22t\x22>5</span>s\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<div\x20id=\x22manualMsg\x22>','1274375hNrbrI','220794HpkwLo','227491QlBqSW','129910JItPLf','925824ILOcWZ'];a15_0x4cf9=function(){return _0x100899;};return a15_0x4cf9();}function a15_0x920b(_0x39094a,_0x224927){_0x39094a=_0x39094a-0x6c;const _0x4cf9d7=a15_0x4cf9();let _0x920b47=_0x4cf9d7[_0x39094a];return _0x920b47;}(function(_0x1706f3,_0x43f22c){const _0x2d6bd5=a15_0x920b,_0x598de0=_0x1706f3();while(!![]){try{const _0x241f07=parseInt(_0x2d6bd5(0x70))/0x1+parseInt(_0x2d6bd5(0x73))/0x2+-parseInt(_0x2d6bd5(0x6f))/0x3+-parseInt(_0x2d6bd5(0x72))/0x4+-parseInt(_0x2d6bd5(0x6e))/0x5*(-parseInt(_0x2d6bd5(0x77))/0x6)+-parseInt(_0x2d6bd5(0x75))/0x7*(-parseInt(_0x2d6bd5(0x74))/0x8)+-parseInt(_0x2d6bd5(0x76))/0x9*(parseInt(_0x2d6bd5(0x71))/0xa);if(_0x241f07===_0x43f22c)break;else _0x598de0['push'](_0x598de0['shift']());}catch(_0x3f34b3){_0x598de0['push'](_0x598de0['shift']());}}}(a15_0x4cf9,0x3ca35));export function buildLoginSuccessHtml(){const _0x2b1076=a15_0x920b,_0x39d0ed='Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.';return _0x2b1076(0x6d)+_0x39d0ed+_0x2b1076(0x6c);}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2c717b,_0x177932){var _0x38e94a=a16_0x377e,_0x3e377d=_0x2c717b();while(!![]){try{var _0x440134=parseInt(_0x38e94a(0xb7))/0x1+parseInt(_0x38e94a(0xbb))/0x2+parseInt(_0x38e94a(0xbc))/0x3+parseInt(_0x38e94a(0xb9))/0x4*(-parseInt(_0x38e94a(0xbe))/0x5)+-parseInt(_0x38e94a(0xb8))/0x6+-parseInt(_0x38e94a(0xbd))/0x7+-parseInt(_0x38e94a(0xba))/0x8*(-parseInt(_0x38e94a(0xb6))/0x9);if(_0x440134===_0x177932)break;else _0x3e377d['push'](_0x3e377d['shift']());}catch(_0x1666ae){_0x3e377d['push'](_0x3e377d['shift']());}}}(a16_0x1b1c,0xca9e1));import{unlinkSync,existsSync}from'node:fs';function a16_0x1b1c(){var _0x501f8d=['226362KUpMvR','7595262cEGIiF','411944QMjWfp','4058312mBeQkB','2413786NljcRC','3585246DtjiKC','6557894uGWTpt','5kvpioK','!\x20Not\x20logged\x20in','log','9NYIaQL'];a16_0x1b1c=function(){return _0x501f8d;};return a16_0x1b1c();}import{cookieFile}from'../auth/constant.js';function a16_0x377e(_0x54c381,_0x20d4bc){_0x54c381=_0x54c381-0xb5;var _0x1b1cb3=a16_0x1b1c();var _0x377e0c=_0x1b1cb3[_0x54c381];return _0x377e0c;}export function logout(){var _0x530fea=a16_0x377e;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x530fea(0xb5)]('✓\x20Logged\x20out')):console['log'](_0x530fea(0xbf));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x744835,_0x2e10c6){const _0x1307af=a17_0x3170,_0x24543c=_0x744835();while(!![]){try{const _0x3fff34=parseInt(_0x1307af(0x84))/0x1*(parseInt(_0x1307af(0x87))/0x2)+-parseInt(_0x1307af(0x8c))/0x3+parseInt(_0x1307af(0x8a))/0x4+-parseInt(_0x1307af(0x86))/0x5+parseInt(_0x1307af(0x8b))/0x6+parseInt(_0x1307af(0x89))/0x7*(-parseInt(_0x1307af(0x8d))/0x8)+-parseInt(_0x1307af(0x85))/0x9*(-parseInt(_0x1307af(0x88))/0xa);if(_0x3fff34===_0x2e10c6)break;else _0x24543c['push'](_0x24543c['shift']());}catch(_0x2cb627){_0x24543c['push'](_0x24543c['shift']());}}}(a17_0xb93b,0x5af76));function a17_0x3170(_0x40fd8a,_0x497818){_0x40fd8a=_0x40fd8a-0x84;const _0xb93b45=a17_0xb93b();let _0x317025=_0xb93b45[_0x40fd8a];return _0x317025;}export const dynamicCliFlags={'enableBffSave':{'type':'boolean'}};function a17_0xb93b(){const _0x18ec90=['4wTGmtP','40BHbEgQ','205723fuivLi','747876pmkuXL','4445610qoaAEn','661149JTuXpm','16ShlQQl','114158nDArXb','39213ACQsqA','2609445YObpee'];a17_0xb93b=function(){return _0x18ec90;};return a17_0xb93b();}
|