@lovrabet/rabetbase-cli 2.5.7 → 2.5.8-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/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a0_0x7724(_0x28d5d0,_0x22a2a7){_0x28d5d0=_0x28d5d0-0x1b9;const _0x331fd4=a0_0x331f();let _0x7724d6=_0x331fd4[_0x28d5d0];return _0x7724d6;}const a0_0x47c808=a0_0x7724;(function(_0x54e5e5,_0x24edb4){const _0x5779c1=a0_0x7724,_0x374705=_0x54e5e5();while(!![]){try{const _0x157ba3=-parseInt(_0x5779c1(0x1cc))/0x1+parseInt(_0x5779c1(0x1bb))/0x2+parseInt(_0x5779c1(0x1bf))/0x3+-parseInt(_0x5779c1(0x1c6))/0x4+-parseInt(_0x5779c1(0x1bc))/0x5*(-parseInt(_0x5779c1(0x1ca))/0x6)+parseInt(_0x5779c1(0x1c5))/0x7*(parseInt(_0x5779c1(0x1c0))/0x8)+parseInt(_0x5779c1(0x1d5))/0x9*(-parseInt(_0x5779c1(0x1d3))/0xa);if(_0x157ba3===_0x24edb4)break;else _0x374705['push'](_0x374705['shift']());}catch(_0x44903e){_0x374705['push'](_0x374705['shift']());}}}(a0_0x331f,0x5f85d));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x29dcc8 from'node:path';import{fetchDatasetDoc}from'../core/api-client.js';import{logger}from'../utils/logger.js';export{fetchDatasetDoc}from'../core/api-client.js';function delay(_0x3ff77d){return new Promise(_0x29a000=>setTimeout(_0x29a000,_0x3ff77d));}export async function generateDatasetDocs(_0x3a2bf0,_0x271192,_0x3f68ab,_0x1dde64=a0_0x47c808(0x1c4),_0x1fda92,_0x5dedd6){const _0x20720b=a0_0x47c808;mkdirSync(_0x1dde64,{'recursive':!![]});const _0x31e314=[],_0x16ea2e=_0x3a2bf0['length'];console[_0x20720b(0x1cd)]('\x0a'+_0x16ea2e+'\x20datasets\x20to\x20generate\x20docs\x20for\x0a');for(let _0x1fb4b0=0x0;_0x1fb4b0<_0x3a2bf0[_0x20720b(0x1ce)];_0x1fb4b0++){const _0x50fd65=_0x3a2bf0[_0x1fb4b0],_0x952e23=_0x1fb4b0+0x1,_0x1d8536=_0x50fd65[_0x20720b(0x1d4)];try{console[_0x20720b(0x1cd)]('['+_0x952e23+'/'+_0x16ea2e+_0x20720b(0x1cb)+_0x1d8536+_0x20720b(0x1cf)+_0x50fd65['name']+')');if(_0x1fda92)_0x1fda92(_0x952e23,_0x16ea2e,_0x1d8536);const _0xd7129d=await fetchDatasetDoc({'appCode':_0x271192,'cookie':_0x3f68ab,'datasetCode':_0x50fd65[_0x20720b(0x1bd)],'datasetId':_0x50fd65['id'],'enableAI':![],'extraParams':_0x5dedd6}),_0x301984=a0_0x29dcc8['join'](_0x1dde64,_0x1d8536+_0x20720b(0x1d2));writeFileSync(_0x301984,_0xd7129d,{'encoding':_0x20720b(0x1ba)}),console[_0x20720b(0x1cd)](_0x20720b(0x1c2)+_0x1d8536+_0x20720b(0x1d2)),logger['success'](_0x20720b(0x1d1),_0x20720b(0x1be)+_0x1d8536,undefined,{'datasetCode':_0x50fd65['datasetCode'],'datasetName':_0x50fd65[_0x20720b(0x1c7)],'filePath':_0x301984,'progress':_0x952e23+'/'+_0x16ea2e}),_0x31e314[_0x20720b(0x1c8)]({'datasetCode':_0x50fd65[_0x20720b(0x1bd)],'datasetName':_0x50fd65['name'],'filePath':_0x301984,'success':!![]});if(_0x952e23<_0x16ea2e)await delay(0x1388);}catch(_0x2362d6){const _0x1d1efe=_0x2362d6 instanceof Error?_0x2362d6[_0x20720b(0x1b9)]:String(_0x2362d6);console[_0x20720b(0x1cd)](_0x20720b(0x1c1)+_0x1d8536+_0x20720b(0x1d0)+_0x1d1efe),logger[_0x20720b(0x1c3)]('api-doc',_0x20720b(0x1c9)+_0x50fd65[_0x20720b(0x1bd)],{'datasetCode':_0x50fd65['datasetCode'],'datasetName':_0x50fd65['name'],'error':_0x1d1efe,'progress':_0x952e23+'/'+_0x16ea2e}),_0x31e314[_0x20720b(0x1c8)]({'datasetCode':_0x50fd65[_0x20720b(0x1bd)],'datasetName':_0x50fd65[_0x20720b(0x1c7)],'filePath':'','success':![],'error':_0x1d1efe}),_0x952e23<_0x16ea2e&&(console[_0x20720b(0x1cd)]('Waiting\x203\x20seconds...\x0a'),await delay(0xbb8));}}return _0x31e314;}function a0_0x331f(){const _0x564d29=['./docs','1805174PIpoSa','2166980lPEPeF','name','push','Failed\x20to\x20generate\x20docs:\x20','4086174WgRwKY',']\x20Generating:\x20','651989pnIoiX','log','length','.md\x20(','.md\x20-\x20','api-doc','.md','30BzrUOi','tableName','533961CWKNIG','message','utf8','752086ieelXD','5SvIrwu','datasetCode','Generated\x20docs\x20successfully:\x20','1344084xKEBrj','8vHSQfM','✗\x20Failed:\x20','✓\x20Generated:\x20','error'];a0_0x331f=function(){return _0x564d29;};return a0_0x331f();}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a1_0x26a4(){const _0x5774b0=['filter','API\x20directory\x20\x22','3358614HKHCTy','trim','apiGroup','outputDir','33164JXLMNq','28TfbSuN','.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','validation','7284944DUEJHg','add','1280220eiSdAz','cwd','size','length','set','get','some','68550adHXgP','12868416wjEGEV','values','\x22\x20resolves\x20to\x20multiple\x20API\x20directories.','Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.','120APqBUw','push','API\x20group\x20\x22','map','Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20','app','2142441hfqAPN','normalizedApiDir'];a1_0x26a4=function(){return _0x5774b0;};return a1_0x26a4();}const a1_0xe5b919=a1_0x34c6;(function(_0x400cdc,_0x19fc9d){const _0xfb63cb=a1_0x34c6,_0x4b556b=_0x400cdc();while(!![]){try{const _0x3d25a9=-parseInt(_0xfb63cb(0xe3))/0x1*(-parseInt(_0xfb63cb(0xe4))/0x2)+parseInt(_0xfb63cb(0xdf))/0x3+parseInt(_0xfb63cb(0xf6))/0x4*(-parseInt(_0xfb63cb(0xf1))/0x5)+parseInt(_0xfb63cb(0xea))/0x6+-parseInt(_0xfb63cb(0xdb))/0x7+parseInt(_0xfb63cb(0xe8))/0x8+-parseInt(_0xfb63cb(0xf2))/0x9;if(_0x3d25a9===_0x19fc9d)break;else _0x4b556b['push'](_0x4b556b['shift']());}catch(_0x5bddeb){_0x4b556b['push'](_0x4b556b['shift']());}}}(a1_0x26a4,0x88dfb));import a1_0x271cff from'node:path';import{CliErrors}from'../errors.js';export function normalizeApiDir(_0xf00086,_0x5075e5=process[a1_0xe5b919(0xeb)]()){return a1_0x271cff['resolve'](_0x5075e5,_0xf00086);}function normalizedApiGroup(_0x429685){const _0x2ec49c=a1_0xe5b919,_0x243493=_0x429685?.[_0x2ec49c(0xe0)]();return _0x243493||undefined;}function a1_0x34c6(_0x1f6b5b,_0x3cc016){_0x1f6b5b=_0x1f6b5b-0xda;const _0x26a466=a1_0x26a4();let _0x34c61e=_0x26a466[_0x1f6b5b];return _0x34c61e;}export function resolveApiProfileLayouts(_0x3438e0,_0x1a3c2e,_0x2e3617=process['cwd']()){const _0x2f173f=a1_0xe5b919,_0x10a9b0=_0x3438e0[_0x2f173f(0xf9)](_0x5860f0=>{const _0x125a5d=_0x1a3c2e(_0x5860f0);return{'app':_0x5860f0,'outputDir':_0x125a5d,'normalizedApiDir':normalizeApiDir(_0x125a5d,_0x2e3617),'apiGroup':normalizedApiGroup(_0x5860f0['apiGroup'])};}),_0x1dc013=new Map();for(const _0x2cb109 of _0x10a9b0){if(!_0x2cb109[_0x2f173f(0xe1)])continue;const _0x2f5d32=_0x1dc013[_0x2f173f(0xef)](_0x2cb109[_0x2f173f(0xe1)])??new Set();_0x2f5d32[_0x2f173f(0xe9)](_0x2cb109['normalizedApiDir']),_0x1dc013[_0x2f173f(0xee)](_0x2cb109[_0x2f173f(0xe1)],_0x2f5d32);}for(const [_0x36a164,_0x43c315]of _0x1dc013){if(_0x43c315[_0x2f173f(0xec)]>0x1)throw CliErrors[_0x2f173f(0xe7)](_0x2f173f(0xf8)+_0x36a164+_0x2f173f(0xf4),_0x2f173f(0xf5));}const _0xf7e104=new Map();for(const _0x85dac0 of _0x10a9b0){const _0x2f271d=_0xf7e104[_0x2f173f(0xef)](_0x85dac0[_0x2f173f(0xdc)])??[];_0x2f271d[_0x2f173f(0xf7)](_0x85dac0),_0xf7e104['set'](_0x85dac0['normalizedApiDir'],_0x2f271d);}for(const _0x2d6b0f of _0xf7e104[_0x2f173f(0xf3)]()){const _0x58f85c=new Set(_0x2d6b0f['flatMap'](_0x156e71=>_0x156e71[_0x2f173f(0xe1)]?[_0x156e71[_0x2f173f(0xe1)]]:[]));if(_0x58f85c[_0x2f173f(0xec)]===0x0)continue;if(_0x58f85c['size']>0x1||_0x2d6b0f[_0x2f173f(0xf0)](_0x1220ee=>!_0x1220ee[_0x2f173f(0xe1)])){const _0x455337=_0x2d6b0f[_0x2f173f(0xf9)](_0x44c364=>_0x44c364[_0x2f173f(0xda)]['name'])['join'](',\x20');throw CliErrors['validation'](_0x2f173f(0xde)+_0x2d6b0f[0x0][_0x2f173f(0xe2)]+_0x2f173f(0xe6),_0x2f173f(0xfa)+_0x455337+_0x2f173f(0xe5));}}return _0x10a9b0;}export function getRegistryGroup(_0x1b30fc,_0x3ca2c0){const _0x1306d9=a1_0xe5b919;if(_0x3ca2c0[_0x1306d9(0xe1)])return _0x1b30fc['filter'](_0x107a35=>_0x107a35[_0x1306d9(0xe1)]===_0x3ca2c0[_0x1306d9(0xe1)]);const _0x410abf=_0x1b30fc[_0x1306d9(0xdd)](_0xde001e=>_0xde001e[_0x1306d9(0xdc)]===_0x3ca2c0[_0x1306d9(0xdc)]);return _0x410abf[_0x1306d9(0xed)]===0x1?_0x410abf:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x44b2f1,_0x395955){var _0x28e42e=a2_0x13b3,_0x3ddb76=_0x44b2f1();while(!![]){try{var _0x4d6a48=parseInt(_0x28e42e(0xc7))/0x1*(-parseInt(_0x28e42e(0xd0))/0x2)+-parseInt(_0x28e42e(0xcb))/0x3*(parseInt(_0x28e42e(0xcc))/0x4)+-parseInt(_0x28e42e(0xce))/0x5+parseInt(_0x28e42e(0xcf))/0x6+parseInt(_0x28e42e(0xc9))/0x7+-parseInt(_0x28e42e(0xd1))/0x8*(-parseInt(_0x28e42e(0xca))/0x9)+parseInt(_0x28e42e(0xcd))/0xa*(parseInt(_0x28e42e(0xc8))/0xb);if(_0x4d6a48===_0x395955)break;else _0x3ddb76['push'](_0x3ddb76['shift']());}catch(_0x40960f){_0x3ddb76['push'](_0x3ddb76['shift']());}}}(a2_0xd23f,0x98115));function a2_0x13b3(_0x4f36a6,_0x5c9d78){_0x4f36a6=_0x4f36a6-0xc7;var _0xd23fcd=a2_0xd23f();var _0x13b34e=_0xd23fcd[_0x4f36a6];return _0x13b34e;}function a2_0xd23f(){var _0x54e874=['11997AiGdnd','261ghgtsy','1152JMQcDN','11631280XdYJhi','5255890fBKuJz','6677928ZPkzYT','27038VNfozP','3704EtDKOD','91RRpPcF','11ulpuus','252259yMsLFG'];a2_0xd23f=function(){return _0x54e874;};return a2_0xd23f();}export{fetchModelList}from'../core/api-client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2481d7,_0x49e552){const _0x96e050=a3_0x2204,_0x3d2412=_0x2481d7();while(!![]){try{const _0x33e2fb=parseInt(_0x96e050(0x14b))/0x1*(parseInt(_0x96e050(0x141))/0x2)+parseInt(_0x96e050(0x14a))/0x3+parseInt(_0x96e050(0x131))/0x4*(-parseInt(_0x96e050(0x167))/0x5)+parseInt(_0x96e050(0x12d))/0x6+parseInt(_0x96e050(0x162))/0x7+-parseInt(_0x96e050(0x13b))/0x8+-parseInt(_0x96e050(0x13a))/0x9;if(_0x33e2fb===_0x49e552)break;else _0x3d2412['push'](_0x3d2412['shift']());}catch(_0x38371f){_0x3d2412['push'](_0x3d2412['shift']());}}}(a3_0x4b57,0x9df56));import a3_0x496294 from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x1ba513 from'node:path';function a3_0x2204(_0x4800cf,_0x59a237){_0x4800cf=_0x4800cf-0x12d;const _0x4b57e1=a3_0x4b57();let _0x220494=_0x4b57e1[_0x4800cf];return _0x220494;}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';function a3_0x4b57(){const _0x500e16=['{\x20apiConfigName:\x20','overwriteTypescript','16905951mPLFtS','2187984tOlNnG','key','preserved','default','runtimeDomain','basename','1718MnviEW','typescript','-api','stringify','modelRuntime','path','name','../..','test','2293899qSZHwr','701ZeXmJl','includes','allowEmptyModelReplacement','Please\x20configure\x20app\x20code\x20first\x20via\x20`','none','replace','api','length','modelProfile','join','refreshed','missing',',\x20...LOVRABET_SDK_CONFIG\x20}','action','created','overwritten',',\x20env:\x20','utf8','LOVRABET_RUNTIME_DOMAIN','CONFIG_NAMES.DEFAULT','templates/generate-api','client.ts.tpl','api.ts.tpl','3241882lyXcgs','success','map','tableName','format','24965xFJZDG','alias','existed','6323388VBAJPd','APP_','client','.ts','68BRNMah','init-api','LOVRABET','\x20config\x20set\x20app\x20<value>`','replaceApiContent','\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.','Model\x20facts\x20refreshed.'];a3_0x4b57=function(){return _0x500e16;};return a3_0x4b57();}import{generateSdkConfigFile}from'../api/generate-sdk-config-file.js';import{MODEL_REGISTRY_FILE_NAME,MODEL_RUNTIME_FILE_NAME,updateModelRegistry}from'../api/model-registry-file.js';import{renderModelRegistryScaffold}from'../api/model-registry-scaffold.js';function fileAction(_0x22a6ed,_0x295e9a){const _0x5be927=a3_0x2204;if(!_0x295e9a)return _0x22a6ed?_0x5be927(0x13d):_0x5be927(0x156);return _0x22a6ed?_0x5be927(0x15a):_0x5be927(0x159);}export async function generateApiFile(_0x561bcd,_0x49567e,_0x2fd013,_0x351e71,_0xd490de,_0x4aa34a,_0x44ac13,_0x297d24={},_0x4fa65d={}){const _0x50f839=a3_0x2204;if(!_0x2fd013)throw new Error(_0x50f839(0x14e)+CLI_BIN_NAME+_0x50f839(0x134));const _0x3282ca=_0x351e71&&!_0x44ac13,_0x2fce00=!!_0x4fa65d[_0x50f839(0x153)],_0x1e723e=_0x2fce00||_0x3282ca,_0x1f8fd9=_0x44ac13||_0x2fd013,_0x5957c9=_0x2fce00||_0x3282ca?_0x50f839(0x13e):_0x1f8fd9,_0x5a3d02=_0x2fce00||_0x3282ca?_0x50f839(0x15e):JSON[_0x50f839(0x144)](_0x1f8fd9),_0x15e39d=!isProduction(_0xd490de),_0x4ce32e=_0x15e39d?_0x50f839(0x15b)+JSON[_0x50f839(0x144)](_0xd490de):'',_0x2cb2f0=_0x50f839(0x138)+_0x5a3d02+_0x4ce32e+_0x50f839(0x157),_0x3ab747=_0x2fce00?'':_0x49567e,_0x475595=_0x3ab747?_0x3ab747+_0x50f839(0x143):_0x50f839(0x151),_0xfd3a54=_0x3ab747?_0x3ab747+'-client':_0x50f839(0x12f),_0x360ac9=_0x3ab747&&!/^app-[a-f0-9]+$/i['test'](_0x3ab747)?_0x3ab747[_0x50f839(0x150)](/-/g,'_')['toUpperCase']():_0x50f839(0x133),_0x566f71=/^\d/[_0x50f839(0x149)](_0x360ac9)?_0x50f839(0x12e)+_0x360ac9:_0x360ac9,_0x2737ea=_0x561bcd[_0x50f839(0x164)](_0x3b77d0=>({'datasetCode':_0x3b77d0['datasetCode'],'tableName':_0x3b77d0[_0x50f839(0x165)],'name':_0x3b77d0['name']||'','alias':_0x3b77d0[_0x50f839(0x168)]||_0x3b77d0[_0x50f839(0x13c)]})),_0x37b208=fileURLToPath(import.meta.url),_0x19d52a=a3_0x1ba513['resolve'](a3_0x1ba513['dirname'](_0x37b208),_0x50f839(0x148)),_0x58cf56=a3_0x1ba513[_0x50f839(0x154)](_0x19d52a,_0x50f839(0x15f)),_0x502e39=a3_0x1ba513['join'](_0x58cf56,_0x50f839(0x161)),_0x4c828a=a3_0x1ba513[_0x50f839(0x154)](_0x58cf56,_0x50f839(0x160)),_0x11441b=_0x4aa34a;mkdirSync(_0x11441b,{'recursive':!![]});const _0x2f47e0=_0x2fce00?{}:_0x297d24,_0x433296=await generateSdkConfigFile(_0x11441b,_0x2f47e0,_0x3ab747),_0xe4ada7=a3_0x1ba513[_0x50f839(0x140)](_0x433296,'.ts'),_0x52c6cf=a3_0x1ba513['join'](_0x11441b,_0x475595+_0x50f839(0x130)),_0x1b1da9=a3_0x1ba513[_0x50f839(0x154)](_0x11441b,_0xfd3a54+_0x50f839(0x130)),_0x27fc85=_0x4fa65d[_0x50f839(0x139)]===!![],_0xe14c84=existsSync(_0x52c6cf),_0x2cf8a1=existsSync(_0x1b1da9),_0x1acdf1=_0x4fa65d['scaffoldMode']??(_0x27fc85?_0x50f839(0x150):'missing'),_0x160d71=_0x1acdf1===_0x50f839(0x150)||_0x1acdf1===_0x50f839(0x156)&&!_0xe14c84,_0x465382=_0x1acdf1===_0x50f839(0x150)||_0x1acdf1===_0x50f839(0x156)&&!_0x2cf8a1,_0x2ac2f2=_0x4fa65d['modelProfile']?updateModelRegistry({'outputDir':_0x11441b,'profileName':_0x4fa65d[_0x50f839(0x153)][_0x50f839(0x147)],'defaultProfile':_0x4fa65d['modelProfile']['defaultName'],'appCode':_0x2fd013,'runtimeDomain':_0x4fa65d['modelProfile'][_0x50f839(0x13f)],'models':_0x2737ea,'allowEmptyReplacement':_0x4fa65d[_0x50f839(0x14d)]===!![]}):undefined,_0x5be13b=_0x2ac2f2?a3_0x1ba513[_0x50f839(0x154)](_0x11441b,MODEL_RUNTIME_FILE_NAME):undefined,_0xdd60fa=_0x5be13b?existsSync(_0x5be13b):![],_0x4e65bf=_0x2fce00&&_0x1acdf1!==_0x50f839(0x14f)?await renderModelRegistryScaffold(_0x11441b):undefined;_0x5be13b&&_0x4e65bf&&writeFileSync(_0x5be13b,_0x4e65bf[_0x50f839(0x145)],_0x50f839(0x15c));const _0x349742=_0x2737ea[0x0]?.[_0x50f839(0x168)];if(_0x160d71){const _0x47dc5d=_0x4e65bf?.[_0x50f839(0x151)]??readFileSync(_0x502e39,'utf8'),_0x20e9ee=_0x2fce00?_0x47dc5d:TemplateReplacer[_0x50f839(0x135)](_0x47dc5d,_0x2fd013,_0x2737ea,_0x349742,_0x475595,_0x5a3d02,undefined,_0x566f71);writeFileSync(_0x52c6cf,await a3_0x496294[_0x50f839(0x166)](_0x20e9ee,{'parser':'typescript'}),{'encoding':_0x50f839(0x15c)});}if(_0x465382){const _0x54ab70=_0x4e65bf?.[_0x50f839(0x12f)]??readFileSync(_0x4c828a,_0x50f839(0x15c)),_0x3a40fe=_0x2fce00?_0x54ab70:TemplateReplacer['replaceApiContent'](_0x54ab70,_0x2fd013,_0x2737ea,_0x349742,_0x475595,_0x5a3d02,_0x2cb2f0,_0x566f71,_0xe4ada7);writeFileSync(_0x1b1da9,await a3_0x496294['format'](_0x3a40fe,{'parser':_0x50f839(0x142)}),{'encoding':_0x50f839(0x15c)});}const _0x49dd3b=_0x2737ea[_0x50f839(0x152)],_0x38a737={'api':{'path':_0x52c6cf,'action':fileAction(_0xe14c84,_0x160d71)},'client':{'path':_0x1b1da9,'action':fileAction(_0x2cf8a1,_0x465382)},'sdkConfig':{'path':_0x433296,'action':_0x50f839(0x155)},..._0x2ac2f2?{'modelRegistry':{'path':_0x2ac2f2[_0x50f839(0x146)],'action':_0x2ac2f2[_0x50f839(0x169)]?_0x50f839(0x155):_0x50f839(0x159)},'modelRuntime':{'path':_0x5be13b,'action':_0x4e65bf?_0xdd60fa?'refreshed':_0x50f839(0x159):_0xdd60fa?_0x50f839(0x13d):_0x50f839(0x156)}}:{}},_0x239935=existsSync(_0x52c6cf)&&readFileSync(_0x52c6cf,_0x50f839(0x15c))[_0x50f839(0x14c)](MODEL_REGISTRY_FILE_NAME[_0x50f839(0x150)](_0x50f839(0x130),'')),_0x197824=existsSync(_0x1b1da9)&&readFileSync(_0x1b1da9,'utf8')['includes'](_0x50f839(0x15d)),_0x5cfd6f=_0x2fce00?!_0x239935||!_0x197824||!existsSync(_0x5be13b):![],_0x173247=_0x2fce00?_0x5cfd6f:_0x38a737['api'][_0x50f839(0x158)]===_0x50f839(0x13d)||_0x38a737[_0x50f839(0x12f)][_0x50f839(0x158)]==='preserved';return logger[_0x50f839(0x163)](_0x50f839(0x132),_0x173247?a3_0x1ba513[_0x50f839(0x140)](_0x433296)+_0x50f839(0x136):_0x2fce00?_0x50f839(0x137):'API\x20scaffold\x20written.',undefined,{'apiFile':_0x52c6cf,'clientFile':_0x1b1da9,'sdkConfig':_0x433296,'modelCount':_0x49dd3b,'configName':_0x5957c9,'isDefaultConfig':_0x1e723e,'needsAgentMerge':_0x173247,'needsProjectUpgrade':_0x5cfd6f,'files':_0x38a737}),{'appCode':_0x2fd013,'modelCount':_0x49dd3b,'models':_0x2737ea,'apiFilePath':_0x52c6cf,'clientFilePath':_0x1b1da9,'sdkConfigPath':_0x433296,'modelRegistryPath':_0x2ac2f2?.[_0x50f839(0x146)],'modelRuntimePath':_0x5be13b,'modelProfile':_0x4fa65d[_0x50f839(0x153)]?.[_0x50f839(0x147)],'configName':_0x5957c9,'isDefaultConfig':_0x1e723e,'sdkRouting':_0x2f47e0,'files':_0x38a737,'needsAgentMerge':_0x173247,'needsProjectUpgrade':_0x5cfd6f};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a4_0x29f185=a4_0x572b;(function(_0x24884d,_0x106f69){const _0x24013b=a4_0x572b,_0x140b51=_0x24884d();while(!![]){try{const _0x2c0710=parseInt(_0x24013b(0x1a2))/0x1+-parseInt(_0x24013b(0x1a1))/0x2+parseInt(_0x24013b(0x1a0))/0x3*(parseInt(_0x24013b(0x199))/0x4)+-parseInt(_0x24013b(0x19c))/0x5+-parseInt(_0x24013b(0x1aa))/0x6*(-parseInt(_0x24013b(0x19a))/0x7)+-parseInt(_0x24013b(0x196))/0x8+parseInt(_0x24013b(0x198))/0x9;if(_0x2c0710===_0x106f69)break;else _0x140b51['push'](_0x140b51['shift']());}catch(_0x460df5){_0x140b51['push'](_0x140b51['shift']());}}}(a4_0x4ba8,0xa633f));import{mkdirSync,writeFileSync}from'node:fs';import a4_0x5d9785 from'node:path';import a4_0x4e4953 from'prettier';function a4_0x572b(_0x5e83c4,_0x5bd6ff){_0x5e83c4=_0x5e83c4-0x196;const _0x4ba8c7=a4_0x4ba8();let _0x572b45=_0x4ba8c7[_0x5e83c4];return _0x572b45;}function a4_0x4ba8(){const _0x1eb23b=['2717298nPePKI','8BkBYZz','126lOSmVg','length','3408215LIleBn','\x20as\x20const;\x0a',',\x0a}','typescript','1788477xPCpct','1643726ZkfCYd','1046671PciFJb','format','/**\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','-sdk-config.ts','runtimeDomain','sdk-config.ts','runtimeDomain:\x20','{\x0a\x20\x20','14400UcAOjd','join','3198704MNKvFb','push'];a4_0x4ba8=function(){return _0x1eb23b;};return a4_0x4ba8();}export const SDK_CONFIG_FILE_NAME=a4_0x29f185(0x1a7);export function getSdkConfigFileName(_0x352e13=''){const _0x111ddf=a4_0x29f185;return _0x352e13?_0x352e13+_0x111ddf(0x1a5):SDK_CONFIG_FILE_NAME;}export async function generateSdkConfigFile(_0x2bc92c,_0x444a6a={},_0x3c9fde=''){const _0x49c966=a4_0x29f185,_0x136795=[];_0x444a6a[_0x49c966(0x1a6)]&&_0x136795[_0x49c966(0x197)](_0x49c966(0x1a8)+JSON['stringify'](_0x444a6a['runtimeDomain']));const _0x4688ac=_0x136795[_0x49c966(0x19b)]>0x0?_0x49c966(0x1a9)+_0x136795[_0x49c966(0x1ab)](',\x0a\x20\x20')+_0x49c966(0x19e):'{}',_0x40b66b=_0x49c966(0x1a4)+_0x4688ac+_0x49c966(0x19d);mkdirSync(_0x2bc92c,{'recursive':!![]});const _0x533ae9=a4_0x5d9785[_0x49c966(0x1ab)](_0x2bc92c,getSdkConfigFileName(_0x3c9fde));return writeFileSync(_0x533ae9,await a4_0x4e4953[_0x49c966(0x1a3)](_0x40b66b,{'parser':_0x49c966(0x19f)}),'utf8'),_0x533ae9;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a5_0xd059(){const _0x20e118=['MODELS_CONFIG','length','10609119vXuWCw','replace','push','map','match','includes','some','10101RxwOzE','APP_CODE','@lovrabet/sdk','matchAll','1254XkbUzU','Generated\x20by\x20Rabetbase\x20CLI','endsWith','test','433488yxNZrO','registerModels','1UySvrt','631413tCsdiL','597444lPNDFW','4750aqPwbl','825158RbbOAd'];a5_0xd059=function(){return _0x20e118;};return a5_0xd059();}(function(_0x5eee68,_0x576c8d){const _0x5e7957=a5_0x21d2,_0x9a158d=_0x5eee68();while(!![]){try{const _0x46e2fe=-parseInt(_0x5e7957(0xf5))/0x1*(parseInt(_0x5e7957(0xf9))/0x2)+-parseInt(_0x5e7957(0xf6))/0x3+-parseInt(_0x5e7957(0xf7))/0x4+parseInt(_0x5e7957(0xf8))/0x5*(-parseInt(_0x5e7957(0xef))/0x6)+-parseInt(_0x5e7957(0x103))/0x7+parseInt(_0x5e7957(0xf3))/0x8+parseInt(_0x5e7957(0xfc))/0x9;if(_0x46e2fe===_0x576c8d)break;else _0x9a158d['push'](_0x9a158d['shift']());}catch(_0x46e112){_0x9a158d['push'](_0x9a158d['shift']());}}}(a5_0xd059,0x3f9dd));export function parseLegacyApiModels(_0x422462){const _0x483c2f=a5_0x21d2,_0x102188=[],_0x42ebfa=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x3174ea;while((_0x3174ea=_0x42ebfa['exec'](_0x422462))!==null){_0x102188[_0x483c2f(0xfe)]({'datasetCode':_0x3174ea[0x1],'tableName':_0x3174ea[0x2],'name':_0x3174ea[0x3],'alias':_0x3174ea[0x4]});}return _0x102188;}export function parseLegacyApiAppCode(_0x388f2f){const _0x34acbc=a5_0x21d2;return _0x388f2f[_0x34acbc(0x100)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function a5_0x21d2(_0x506a67,_0x395aa7){_0x506a67=_0x506a67-0xed;const _0xd05983=a5_0xd059();let _0x21d200=_0xd05983[_0x506a67];return _0x21d200;}function stripComments(_0x4eb914){const _0x29fb38=a5_0x21d2;return _0x4eb914[_0x29fb38(0xfd)](/\/\*[\s\S]*?\*\//g,'')['replace'](/\/\/.*$/gm,'');}export function isLegacyGeneratedApiScaffold(_0x44a9ca){const _0x2c9819=a5_0x21d2;if(!_0x44a9ca[_0x2c9819(0x101)](_0x2c9819(0xf0)))return![];const _0x37d068=stripComments(_0x44a9ca),_0x13068f=[..._0x37d068[_0x2c9819(0xee)](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)][_0x2c9819(0xff)](_0x14df33=>_0x14df33[0x1]);if(_0x13068f[_0x2c9819(0xfb)]!==0x1||_0x13068f[0x0]!==_0x2c9819(0xed))return![];const _0x1e6010=[..._0x37d068[_0x2c9819(0xee)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)]['map'](_0x242e81=>_0x242e81[0x1]);if(_0x1e6010[_0x2c9819(0xfb)]!==0x2||!_0x1e6010[_0x2c9819(0x102)](_0x1ed352=>_0x1ed352[_0x2c9819(0xf1)](_0x2c9819(0x104)))||!_0x1e6010['some'](_0xfafcf8=>_0xfafcf8[_0x2c9819(0xf1)](_0x2c9819(0xfa))))return![];const _0x7837e=[..._0x37d068[_0x2c9819(0xee)](/^([A-Za-z_$][\w$]*)\s*\(/gm)][_0x2c9819(0xff)](_0xc56949=>_0xc56949[0x1]);return _0x7837e[_0x2c9819(0xfb)]===0x1&&_0x7837e[0x0]===_0x2c9819(0xf4);}export function isLegacyGeneratedClientScaffold(_0x117402){const _0x2faae0=a5_0x21d2;if(!_0x117402['includes'](_0x2faae0(0xf0)))return![];const _0x38410f=stripComments(_0x117402),_0x19d9af=[..._0x38410f['matchAll'](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)]['map'](_0x41a360=>_0x41a360[0x1]);if(_0x19d9af[_0x2faae0(0x102)](_0x47353a=>_0x47353a!==_0x2faae0(0xed)&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/[_0x2faae0(0xf2)](_0x47353a??'')))return![];const _0x3c7b53=[..._0x38410f[_0x2faae0(0xee)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x2faae0(0xff)](_0x1cae11=>_0x1cae11[0x1]);return _0x3c7b53[_0x2faae0(0xfb)]===0x1&&_0x3c7b53[0x0]==='lovrabetClient';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x563c69=a6_0x518d;(function(_0x161b4f,_0x2a1ff4){const _0x4df016=a6_0x518d,_0x124fbe=_0x161b4f();while(!![]){try{const _0x1212cf=parseInt(_0x4df016(0x1e4))/0x1*(-parseInt(_0x4df016(0x1e1))/0x2)+-parseInt(_0x4df016(0x1de))/0x3+parseInt(_0x4df016(0x1df))/0x4+parseInt(_0x4df016(0x1c8))/0x5*(parseInt(_0x4df016(0x1c3))/0x6)+-parseInt(_0x4df016(0x1e7))/0x7+-parseInt(_0x4df016(0x1c4))/0x8+parseInt(_0x4df016(0x1dc))/0x9*(parseInt(_0x4df016(0x1f3))/0xa);if(_0x1212cf===_0x2a1ff4)break;else _0x124fbe['push'](_0x124fbe['shift']());}catch(_0x4c176c){_0x124fbe['push'](_0x124fbe['shift']());}}}(a6_0x47df,0xb25d4));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x22aeea from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x563c69(0x1d8);export const MODEL_RUNTIME_FILE_NAME=a6_0x563c69(0x1b2);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x563c69(0x1c9);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x563c69(0x1e2),REGISTRY_START=a6_0x563c69(0x1cc),REGISTRY_END='/*\x20rabetbase-model-registry:end\x20*/';function emptyRegistry(_0x44e20a){return{'defaultProfile':_0x44e20a,'profiles':{},'models':[]};}function extractRegistryJson(_0x32cfe1){const _0x4b804f=a6_0x563c69,_0x3f291a=_0x32cfe1[_0x4b804f(0x1f0)](REGISTRY_START),_0x10a7fb=_0x32cfe1[_0x4b804f(0x1f0)](REGISTRY_END);if(_0x3f291a<0x0||_0x10a7fb<=_0x3f291a)return undefined;return _0x32cfe1['slice'](_0x3f291a+REGISTRY_START[_0x4b804f(0x1be)],_0x10a7fb)['trim']()[_0x4b804f(0x1b6)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x4b804f(0x1b6)](/;$/,'');}function migrateLegacyRegistry(_0x55f8c2){const _0x4a5c00=a6_0x563c69,_0x1ac264=emptyRegistry(_0x55f8c2[_0x4a5c00(0x1d9)]);for(const [_0x53e92b,_0x4b9fb3]of Object[_0x4a5c00(0x1da)](_0x55f8c2[_0x4a5c00(0x1d4)])){_0x1ac264[_0x4a5c00(0x1d4)][_0x53e92b]={'appCode':_0x4b9fb3[_0x4a5c00(0x1bc)],'runtimeDomain':_0x4b9fb3[_0x4a5c00(0x1ce)]},mergeProfileModels(_0x1ac264,_0x53e92b,_0x4b9fb3[_0x4a5c00(0x1cd)]);}return _0x1ac264;}function a6_0x518d(_0x2c13fd,_0xd0eea4){_0x2c13fd=_0x2c13fd-0x1ac;const _0x47df45=a6_0x47df();let _0x518d14=_0x47df45[_0x2c13fd];return _0x518d14;}function generatedObjectLiteralToJson(_0x4adce0){const _0x59c1d4=a6_0x563c69;let _0x2226bf='',_0x12177d,_0x53b7d0=![],_0x352bcc;for(let _0x32f70c=0x0;_0x32f70c<_0x4adce0[_0x59c1d4(0x1be)];_0x32f70c++){const _0x59c2fd=_0x4adce0[_0x32f70c];if(_0x12177d){_0x2226bf+=_0x59c2fd;if(_0x53b7d0)_0x53b7d0=![];else{if(_0x59c2fd==='\x5c')_0x53b7d0=!![];else{if(_0x59c2fd===_0x12177d)_0x12177d=undefined;}}continue;}if(_0x59c2fd==='\x22'){_0x12177d=_0x59c2fd,_0x2226bf+=_0x59c2fd,_0x352bcc='value';continue;}if(_0x59c2fd===','){let _0x5ea6c1=_0x32f70c+0x1;while(/\s/['test'](_0x4adce0[_0x5ea6c1]??''))_0x5ea6c1++;if(_0x4adce0[_0x5ea6c1]==='}'||_0x4adce0[_0x5ea6c1]===']')continue;_0x2226bf+=_0x59c2fd,_0x352bcc=',';continue;}if(_0x59c2fd==='{'||_0x59c2fd==='['){_0x2226bf+=_0x59c2fd,_0x352bcc=_0x59c2fd;continue;}if(_0x59c2fd==='}'||_0x59c2fd===']'){_0x2226bf+=_0x59c2fd,_0x352bcc=_0x59c2fd;continue;}if((_0x352bcc==='{'||_0x352bcc===',')&&/[A-Za-z_$]/[_0x59c1d4(0x1d1)](_0x59c2fd)){let _0x3a5c0c=_0x32f70c+0x1;while(/[A-Za-z0-9_$]/[_0x59c1d4(0x1d1)](_0x4adce0[_0x3a5c0c]??''))_0x3a5c0c++;let _0x4c9ac4=_0x3a5c0c;while(/\s/['test'](_0x4adce0[_0x4c9ac4]??''))_0x4c9ac4++;if(_0x4adce0[_0x4c9ac4]===':'){_0x2226bf+=JSON[_0x59c1d4(0x1e9)](_0x4adce0[_0x59c1d4(0x1d0)](_0x32f70c,_0x3a5c0c)),_0x32f70c=_0x3a5c0c-0x1,_0x352bcc='key';continue;}}_0x2226bf+=_0x59c2fd;if(!/\s/['test'](_0x59c2fd)&&_0x59c2fd!==':')_0x352bcc='value';}return _0x2226bf;}function parseGeneratedRegistryJson(_0x391460){const _0x13624f=a6_0x563c69;try{return JSON[_0x13624f(0x1d2)](_0x391460);}catch{return JSON['parse'](generatedObjectLiteralToJson(_0x391460));}}function normalizeModelEntries(_0x190773,_0x27707a){const _0xa397f8=a6_0x563c69,_0x26205b=Object[_0xa397f8(0x1f4)](_0x190773),_0x143c28=[];for(const _0x42c672 of _0x27707a){if(!_0x42c672||typeof _0x42c672!==_0xa397f8(0x1ed)||Array['isArray'](_0x42c672))return undefined;const _0x394a51=_0x42c672;if(typeof _0x394a51[_0xa397f8(0x1b0)]!==_0xa397f8(0x1d6)||typeof _0x394a51['tableName']!==_0xa397f8(0x1d6)||typeof _0x394a51['name']!=='string')return undefined;let _0x47e84f;if(typeof _0x394a51[_0xa397f8(0x1eb)]===_0xa397f8(0x1d6)&&_0x394a51[_0xa397f8(0x1af)]===undefined)_0x47e84f=Object[_0xa397f8(0x1dd)](_0x26205b[_0xa397f8(0x1e0)](_0x8c3ab7=>[_0x8c3ab7,_0x394a51[_0xa397f8(0x1eb)]]));else{if(_0x394a51[_0xa397f8(0x1eb)]===undefined&&_0x394a51[_0xa397f8(0x1af)]&&typeof _0x394a51['datasetCodes']==='object'&&!Array[_0xa397f8(0x1ec)](_0x394a51[_0xa397f8(0x1af)])&&Object[_0xa397f8(0x1b9)](_0x394a51[_0xa397f8(0x1af)])[_0xa397f8(0x1bb)](_0x5159e0=>typeof _0x5159e0===_0xa397f8(0x1d6)))_0x47e84f={..._0x394a51[_0xa397f8(0x1af)]};else return undefined;}_0x143c28[_0xa397f8(0x1b4)]({'alias':_0x394a51['alias'],'tableName':_0x394a51['tableName'],'name':_0x394a51[_0xa397f8(0x1b5)],'datasetCodes':_0x47e84f});}return _0x143c28;}export function parseModelRegistry(_0x1c087d){const _0x5696fd=a6_0x563c69,_0x330aba=extractRegistryJson(_0x1c087d);if(!_0x330aba)return undefined;try{const _0x430e63=parseGeneratedRegistryJson(_0x330aba);if(typeof _0x430e63['defaultProfile']!==_0x5696fd(0x1d6)||!_0x430e63[_0x5696fd(0x1d4)]||typeof _0x430e63[_0x5696fd(0x1d4)]!=='object')return undefined;if(_0x430e63[_0x5696fd(0x1ee)]===_0x5696fd(0x1cb))return migrateLegacyRegistry(_0x430e63);if(!(_0x430e63[_0x5696fd(0x1ee)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x430e63[_0x5696fd(0x1ee)]===undefined&&_0x1c087d[_0x5696fd(0x1c2)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x5696fd(0x1ec)](_0x430e63[_0x5696fd(0x1cd)]))return undefined;const _0x3777bf=_0x430e63['profiles'],_0x4264e5=normalizeModelEntries(_0x3777bf,_0x430e63['models']);if(!_0x4264e5)return undefined;return{'defaultProfile':_0x430e63['defaultProfile'],'profiles':_0x3777bf,'models':_0x4264e5};}catch{return undefined;}}export function readModelRegistry(_0x5d4c3d){const _0x3a1b0b=a6_0x563c69;if(!existsSync(_0x5d4c3d))return undefined;try{return parseModelRegistry(readFileSync(_0x5d4c3d,_0x3a1b0b(0x1f2)));}catch{return undefined;}}function a6_0x47df(){const _0x316361=['4179755NIDvkK','/*\x20rabetbase-model-registry:v2\x20*/','outputDir','lovrabet-model-registry/v1','/*\x20rabetbase-model-registry:start\x20*/','models','runtimeDomain','profileName','slice','test','parse','\x22\x20maps\x20to\x20table\x20\x22','profiles','tableName','string','\x20model(s)\x20in\x20profile\x20\x22','models.generated.ts','defaultProfile','entries','now','14738913xOLkOp','fromEntries','3114588EpybMT','1366072BLrbPV','map','34wNtriZ','lovrabet-model-registry/v2','Model\x20alias\x20\x22','33349ZwQLUQ','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','Refusing\x20to\x20replace\x20','8403941FyVosW','join','stringify','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','datasetCode','isArray','object','protocol','NOT-SET','indexOf','filter','utf8','20EBouZk','keys','/**\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','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','\x22\x20and\x20\x22','datasetCodes','alias','Table\x20\x22','model-runtime.ts','\x22\x20with\x20an\x20empty\x20result.\x20','push','name','replace','pid','set','values','flatMap','every','appCode','\x22\x20in\x20profile\x20\x22','length','\x22\x20maps\x20to\x20both\x20\x22','find','\x22\x20in\x20the\x20registry\x20but\x20\x22','includes','6gylKwQ','7332088EEViNp','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','get','.tmp'];a6_0x47df=function(){return _0x316361;};return a6_0x47df();}function registrySource(_0x1e6bd5){const _0x4c87e3=a6_0x563c69,_0x3573c1=Object[_0x4c87e3(0x1f4)](_0x1e6bd5[_0x4c87e3(0x1d4)]),_0x4f8226=_0x1e6bd5[_0x4c87e3(0x1cd)][_0x4c87e3(0x1e0)](_0x463cfa=>{const _0x1a582f=_0x4c87e3,_0x41e25b=_0x3573c1[_0x1a582f(0x1e0)](_0x1efe66=>_0x463cfa[_0x1a582f(0x1af)][_0x1efe66]),_0x3030e1=_0x41e25b[0x0],_0x3e7f91=_0x3030e1!==undefined&&_0x41e25b['every'](_0x35eca0=>_0x35eca0===_0x3030e1),_0x3ec0c5={'alias':_0x463cfa[_0x1a582f(0x1b0)],'tableName':_0x463cfa[_0x1a582f(0x1d5)],'name':_0x463cfa[_0x1a582f(0x1b5)]};return _0x3e7f91?{..._0x3ec0c5,'datasetCode':_0x3030e1}:{..._0x3ec0c5,'datasetCodes':_0x463cfa[_0x1a582f(0x1af)]};}),_0x530bee=JSON[_0x4c87e3(0x1e9)]({'defaultProfile':_0x1e6bd5[_0x4c87e3(0x1d9)],'profiles':_0x1e6bd5[_0x4c87e3(0x1d4)],'models':_0x4f8226},null,0x2)['split']('\x0a')[_0x4c87e3(0x1e0)](_0x4791e0=>'\x20\x20'+_0x4791e0)[_0x4c87e3(0x1e8)]('\x0a');return _0x4c87e3(0x1ac)+MODEL_REGISTRY_VERSION_MARKER+_0x4c87e3(0x1ad)+REGISTRY_START+'\x0a'+_0x530bee+_0x4c87e3(0x1e5)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x33bd4e,_0x4af7eb,_0x36baf0){const _0x53d4ac=a6_0x563c69,_0x3f07fc=_0x36baf0[_0x53d4ac(0x1e0)](_0x344a8f=>({..._0x344a8f,'alias':_0x344a8f[_0x53d4ac(0x1b0)]||_0x344a8f[_0x53d4ac(0x1d5)]})),_0x36da73=new Map(),_0x5209e1=new Map();for(const _0x149329 of _0x3f07fc){const _0x1f67f1=_0x36da73[_0x53d4ac(0x1c6)](_0x149329['alias']);if(_0x1f67f1&&_0x1f67f1!==_0x149329[_0x53d4ac(0x1d5)])throw new Error(_0x53d4ac(0x1e3)+_0x149329[_0x53d4ac(0x1b0)]+_0x53d4ac(0x1bf)+_0x1f67f1+_0x53d4ac(0x1ae)+_0x149329[_0x53d4ac(0x1d5)]+_0x53d4ac(0x1bd)+_0x4af7eb+'\x22.');const _0x465ca4=_0x5209e1[_0x53d4ac(0x1c6)](_0x149329[_0x53d4ac(0x1d5)]);if(_0x465ca4&&_0x465ca4!==_0x149329[_0x53d4ac(0x1b0)])throw new Error('Table\x20\x22'+_0x149329[_0x53d4ac(0x1d5)]+'\x22\x20maps\x20to\x20both\x20aliases\x20\x22'+_0x465ca4+'\x22\x20and\x20\x22'+_0x149329[_0x53d4ac(0x1b0)]+_0x53d4ac(0x1bd)+_0x4af7eb+'\x22.');_0x36da73[_0x53d4ac(0x1b8)](_0x149329[_0x53d4ac(0x1b0)],_0x149329[_0x53d4ac(0x1d5)]),_0x5209e1[_0x53d4ac(0x1b8)](_0x149329[_0x53d4ac(0x1d5)],_0x149329[_0x53d4ac(0x1b0)]);const _0x4171b=_0x33bd4e[_0x53d4ac(0x1cd)][_0x53d4ac(0x1c0)](_0x144a67=>_0x144a67['alias']===_0x149329[_0x53d4ac(0x1b0)]);if(_0x4171b&&_0x4171b['tableName']!==_0x149329[_0x53d4ac(0x1d5)])throw new Error('Model\x20alias\x20\x22'+_0x149329[_0x53d4ac(0x1b0)]+_0x53d4ac(0x1d3)+_0x4171b['tableName']+_0x53d4ac(0x1c1)+_0x149329['tableName']+_0x53d4ac(0x1bd)+_0x4af7eb+'\x22.');const _0xc43478=_0x33bd4e[_0x53d4ac(0x1cd)]['find'](_0x96f6fb=>_0x96f6fb[_0x53d4ac(0x1d5)]===_0x149329['tableName']);if(_0xc43478&&_0xc43478['alias']!==_0x149329[_0x53d4ac(0x1b0)])throw new Error(_0x53d4ac(0x1b1)+_0x149329[_0x53d4ac(0x1d5)]+'\x22\x20maps\x20to\x20alias\x20\x22'+_0xc43478[_0x53d4ac(0x1b0)]+_0x53d4ac(0x1c1)+_0x149329[_0x53d4ac(0x1b0)]+_0x53d4ac(0x1bd)+_0x4af7eb+'\x22.');}for(const _0x4fb8be of _0x33bd4e[_0x53d4ac(0x1cd)]){delete _0x4fb8be[_0x53d4ac(0x1af)][_0x4af7eb];}for(const _0xd9300c of _0x3f07fc){let _0x4e4a3d=_0x33bd4e[_0x53d4ac(0x1cd)][_0x53d4ac(0x1c0)](_0xe36038=>_0xe36038['alias']===_0xd9300c[_0x53d4ac(0x1b0)]);!_0x4e4a3d&&(_0x4e4a3d={'alias':_0xd9300c[_0x53d4ac(0x1b0)],'tableName':_0xd9300c[_0x53d4ac(0x1d5)],'name':_0xd9300c[_0x53d4ac(0x1b5)],'datasetCodes':{}},_0x33bd4e[_0x53d4ac(0x1cd)]['push'](_0x4e4a3d)),(_0x4af7eb===_0x33bd4e['defaultProfile']||!_0x4e4a3d[_0x53d4ac(0x1af)][_0x33bd4e[_0x53d4ac(0x1d9)]])&&(_0x4e4a3d['alias']=_0xd9300c[_0x53d4ac(0x1b0)],_0x4e4a3d[_0x53d4ac(0x1d5)]=_0xd9300c[_0x53d4ac(0x1d5)],_0x4e4a3d['name']=_0xd9300c[_0x53d4ac(0x1b5)]),_0x4e4a3d['datasetCodes'][_0x4af7eb]=_0xd9300c[_0x53d4ac(0x1eb)];}_0x33bd4e['models']=_0x33bd4e[_0x53d4ac(0x1cd)][_0x53d4ac(0x1f1)](_0x20553d=>Object[_0x53d4ac(0x1f4)](_0x20553d['datasetCodes'])[_0x53d4ac(0x1be)]>0x0);}function removeUnboundProfiles(_0x11e138){const _0x16a854=a6_0x563c69,_0x2e8197=Object[_0x16a854(0x1da)](_0x11e138[_0x16a854(0x1d4)])[_0x16a854(0x1f1)](([,_0x560b3b])=>_0x560b3b['appCode']===_0x16a854(0x1ef))[_0x16a854(0x1e0)](([_0x2ae7e6])=>_0x2ae7e6);if(_0x2e8197[_0x16a854(0x1be)]===0x0)return;for(const _0x215b35 of _0x2e8197){delete _0x11e138[_0x16a854(0x1d4)][_0x215b35];for(const _0x47601d of _0x11e138[_0x16a854(0x1cd)]){delete _0x47601d['datasetCodes'][_0x215b35];}}_0x11e138[_0x16a854(0x1cd)]=_0x11e138[_0x16a854(0x1cd)][_0x16a854(0x1f1)](_0x4d5204=>Object[_0x16a854(0x1f4)](_0x4d5204['datasetCodes'])[_0x16a854(0x1be)]>0x0);}export function getProfileModels(_0x30b959,_0x358059){const _0x1b155b=a6_0x563c69;return _0x30b959['models'][_0x1b155b(0x1ba)](_0x74da91=>{const _0x3600c5=_0x1b155b,_0x35fd86=_0x74da91[_0x3600c5(0x1af)][_0x358059];return _0x35fd86?[{'datasetCode':_0x35fd86,'tableName':_0x74da91[_0x3600c5(0x1d5)],'name':_0x74da91[_0x3600c5(0x1b5)],'alias':_0x74da91[_0x3600c5(0x1b0)]}]:[];});}export function updateModelRegistry(_0x3b1649){const _0x3bece2=a6_0x563c69,_0xe2b8cb=a6_0x22aeea['join'](_0x3b1649[_0x3bece2(0x1ca)],MODEL_REGISTRY_FILE_NAME),_0x4c2970=existsSync(_0xe2b8cb),_0xcdb4bf=readModelRegistry(_0xe2b8cb);if(_0x4c2970&&!_0xcdb4bf)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x3bece2(0x1c5));const _0x1a159a=_0xcdb4bf??emptyRegistry(_0x3b1649[_0x3bece2(0x1d9)]);if(_0x3b1649[_0x3bece2(0x1bc)]!=='NOT-SET')removeUnboundProfiles(_0x1a159a);const _0xd9a8bb=_0xcdb4bf?getProfileModels(_0xcdb4bf,_0x3b1649[_0x3bece2(0x1cf)])[_0x3bece2(0x1be)]:0x0;if(_0xd9a8bb>0x0&&_0x3b1649[_0x3bece2(0x1cd)][_0x3bece2(0x1be)]===0x0&&!_0x3b1649['allowEmptyReplacement'])throw new Error(_0x3bece2(0x1e6)+_0xd9a8bb+_0x3bece2(0x1d7)+_0x3b1649['profileName']+_0x3bece2(0x1b3)+_0x3bece2(0x1ea));_0x1a159a[_0x3bece2(0x1d9)]=_0x3b1649[_0x3bece2(0x1d9)],_0x1a159a[_0x3bece2(0x1d4)][_0x3b1649['profileName']]={'appCode':_0x3b1649[_0x3bece2(0x1bc)],'runtimeDomain':_0x3b1649[_0x3bece2(0x1ce)]},mergeProfileModels(_0x1a159a,_0x3b1649['profileName'],_0x3b1649[_0x3bece2(0x1cd)]),mkdirSync(_0x3b1649[_0x3bece2(0x1ca)],{'recursive':!![]});const _0x32a5e0=_0xe2b8cb+'.'+process[_0x3bece2(0x1b7)]+'.'+Date[_0x3bece2(0x1db)]()+_0x3bece2(0x1c7);try{writeFileSync(_0x32a5e0,registrySource(_0x1a159a),{'encoding':_0x3bece2(0x1f2),'mode':0x1a4}),renameSync(_0x32a5e0,_0xe2b8cb);}catch(_0x112c6a){try{unlinkSync(_0x32a5e0);}catch{}throw _0x112c6a;}return{'path':_0xe2b8cb,'registry':_0x1a159a,'existed':_0x4c2970};}
|
|
1
|
+
const a6_0x51d1e9=a6_0x136b;(function(_0x40d799,_0x4b3b9c){const _0x4854a4=a6_0x136b,_0x313b8c=_0x40d799();while(!![]){try{const _0x1069c4=parseInt(_0x4854a4(0x177))/0x1*(-parseInt(_0x4854a4(0x183))/0x2)+parseInt(_0x4854a4(0x182))/0x3*(parseInt(_0x4854a4(0x160))/0x4)+parseInt(_0x4854a4(0x16d))/0x5*(parseInt(_0x4854a4(0x18f))/0x6)+-parseInt(_0x4854a4(0x1a2))/0x7+parseInt(_0x4854a4(0x18a))/0x8*(-parseInt(_0x4854a4(0x191))/0x9)+-parseInt(_0x4854a4(0x192))/0xa*(-parseInt(_0x4854a4(0x16e))/0xb)+parseInt(_0x4854a4(0x17d))/0xc;if(_0x1069c4===_0x4b3b9c)break;else _0x313b8c['push'](_0x313b8c['shift']());}catch(_0x18f212){_0x313b8c['push'](_0x313b8c['shift']());}}}(a6_0x5856,0xe7f3a));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x522213 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x51d1e9(0x19e);export const MODEL_RUNTIME_FILE_NAME=a6_0x51d1e9(0x189);export const MODEL_REGISTRY_VERSION_MARKER='/*\x20rabetbase-model-registry:v2\x20*/';const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x51d1e9(0x1a3),REGISTRY_START=a6_0x51d1e9(0x173),REGISTRY_END=a6_0x51d1e9(0x19b);function emptyRegistry(_0x60ed92){return{'defaultProfile':_0x60ed92,'profiles':{},'models':[]};}function extractRegistryJson(_0x3c18e9){const _0x131fbf=a6_0x51d1e9,_0x6ca0ae=_0x3c18e9['indexOf'](REGISTRY_START),_0x4871b2=_0x3c18e9[_0x131fbf(0x19c)](REGISTRY_END);if(_0x6ca0ae<0x0||_0x4871b2<=_0x6ca0ae)return undefined;return _0x3c18e9[_0x131fbf(0x180)](_0x6ca0ae+REGISTRY_START[_0x131fbf(0x176)],_0x4871b2)[_0x131fbf(0x164)]()['replace'](/\s+as const satisfies LovrabetModelRegistry;?$/,'')['replace'](/;$/,'');}function migrateLegacyRegistry(_0x55c58c){const _0x299b83=a6_0x51d1e9,_0x3f99ca=emptyRegistry(_0x55c58c[_0x299b83(0x17a)]);for(const [_0x13cf76,_0xd935b8]of Object[_0x299b83(0x16c)](_0x55c58c[_0x299b83(0x1a1)])){_0x3f99ca[_0x299b83(0x1a1)][_0x13cf76]={'appCode':_0xd935b8[_0x299b83(0x171)],'runtimeDomain':_0xd935b8['runtimeDomain']},mergeProfileModels(_0x3f99ca,_0x13cf76,_0xd935b8[_0x299b83(0x18c)]);}return _0x3f99ca;}function generatedObjectLiteralToJson(_0x5f310a){const _0x2734df=a6_0x51d1e9;let _0x881b15='',_0x14d234,_0x416fe8=![],_0x4a921f;for(let _0x5604a2=0x0;_0x5604a2<_0x5f310a[_0x2734df(0x176)];_0x5604a2++){const _0x12d259=_0x5f310a[_0x5604a2];if(_0x14d234){_0x881b15+=_0x12d259;if(_0x416fe8)_0x416fe8=![];else{if(_0x12d259==='\x5c')_0x416fe8=!![];else{if(_0x12d259===_0x14d234)_0x14d234=undefined;}}continue;}if(_0x12d259==='\x22'){_0x14d234=_0x12d259,_0x881b15+=_0x12d259,_0x4a921f=_0x2734df(0x19a);continue;}if(_0x12d259===','){let _0x1d2eff=_0x5604a2+0x1;while(/\s/[_0x2734df(0x197)](_0x5f310a[_0x1d2eff]??''))_0x1d2eff++;if(_0x5f310a[_0x1d2eff]==='}'||_0x5f310a[_0x1d2eff]===']')continue;_0x881b15+=_0x12d259,_0x4a921f=',';continue;}if(_0x12d259==='{'||_0x12d259==='['){_0x881b15+=_0x12d259,_0x4a921f=_0x12d259;continue;}if(_0x12d259==='}'||_0x12d259===']'){_0x881b15+=_0x12d259,_0x4a921f=_0x12d259;continue;}if((_0x4a921f==='{'||_0x4a921f===',')&&/[A-Za-z_$]/['test'](_0x12d259)){let _0x5b719f=_0x5604a2+0x1;while(/[A-Za-z0-9_$]/[_0x2734df(0x197)](_0x5f310a[_0x5b719f]??''))_0x5b719f++;let _0x5e2efa=_0x5b719f;while(/\s/[_0x2734df(0x197)](_0x5f310a[_0x5e2efa]??''))_0x5e2efa++;if(_0x5f310a[_0x5e2efa]===':'){_0x881b15+=JSON[_0x2734df(0x193)](_0x5f310a[_0x2734df(0x180)](_0x5604a2,_0x5b719f)),_0x5604a2=_0x5b719f-0x1,_0x4a921f=_0x2734df(0x175);continue;}}_0x881b15+=_0x12d259;if(!/\s/[_0x2734df(0x197)](_0x12d259)&&_0x12d259!==':')_0x4a921f=_0x2734df(0x19a);}return _0x881b15;}function a6_0x136b(_0x48e6b5,_0x5be4b8){_0x48e6b5=_0x48e6b5-0x15c;const _0x58565c=a6_0x5856();let _0x136ba3=_0x58565c[_0x48e6b5];return _0x136ba3;}function a6_0x5856(){const _0x6f5ac0=['protocol','Refusing\x20to\x20replace\x20','test','datasetCodes','\x22\x20maps\x20to\x20alias\x20\x22','value','/*\x20rabetbase-model-registry:end\x20*/','indexOf','\x22\x20and\x20\x22','models.generated.ts','get','keys','profiles','7011438WGEfEu','lovrabet-model-registry/v2','split','\x22\x20with\x20an\x20empty\x20result.\x20','push','\x22\x20in\x20profile\x20\x22','\x22\x20maps\x20to\x20table\x20\x22','set','tableName','now','363960JhjOKB','parse','alias','find','trim','filter','fromEntries','includes','lovrabet-model-registry/v1','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','\x22\x20in\x20the\x20registry\x20but\x20\x22','every','entries','115235nytWDa','11wVWASh','datasetCode','string','appCode','\x22\x20maps\x20to\x20both\x20\x22','/*\x20rabetbase-model-registry:start\x20*/','Model\x20alias\x20\x22','key','length','97wWSNpz','\x20model(s)\x20in\x20profile\x20\x22','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','defaultProfile','map','.tmp','10385220hwOqBw','Table\x20\x22','runtimeDomain','slice','allowEmptyReplacement','27xaDTGI','32614zxZopp','outputDir','NOT-SET','utf8','join','profileName','model-runtime.ts','96tGfPfW','isArray','models','pid','name','114vgGLCs','flatMap','239409HYqeAv','17304610ozTVfn','stringify','object'];a6_0x5856=function(){return _0x6f5ac0;};return a6_0x5856();}function parseGeneratedRegistryJson(_0x5ba19b){const _0x29ec3f=a6_0x51d1e9;try{return JSON[_0x29ec3f(0x161)](_0x5ba19b);}catch{return JSON['parse'](generatedObjectLiteralToJson(_0x5ba19b));}}function normalizeModelEntries(_0x17d55c,_0x54f799){const _0x214b5f=a6_0x51d1e9,_0x11f3c5=Object['keys'](_0x17d55c),_0x2fe1dc=[];for(const _0x420768 of _0x54f799){if(!_0x420768||typeof _0x420768!=='object'||Array[_0x214b5f(0x18b)](_0x420768))return undefined;const _0x4489c0=_0x420768;if(typeof _0x4489c0[_0x214b5f(0x162)]!==_0x214b5f(0x170)||typeof _0x4489c0[_0x214b5f(0x15e)]!==_0x214b5f(0x170)||typeof _0x4489c0[_0x214b5f(0x18e)]!==_0x214b5f(0x170))return undefined;let _0x5edfb8;if(typeof _0x4489c0[_0x214b5f(0x16f)]===_0x214b5f(0x170)&&_0x4489c0[_0x214b5f(0x198)]===undefined)_0x5edfb8=Object[_0x214b5f(0x166)](_0x11f3c5['map'](_0x26ad17=>[_0x26ad17,_0x4489c0['datasetCode']]));else{if(_0x4489c0['datasetCode']===undefined&&_0x4489c0[_0x214b5f(0x198)]&&typeof _0x4489c0[_0x214b5f(0x198)]===_0x214b5f(0x194)&&!Array['isArray'](_0x4489c0[_0x214b5f(0x198)])&&Object['values'](_0x4489c0[_0x214b5f(0x198)])['every'](_0x5d7dcf=>typeof _0x5d7dcf===_0x214b5f(0x170)))_0x5edfb8={..._0x4489c0[_0x214b5f(0x198)]};else return undefined;}_0x2fe1dc['push']({'alias':_0x4489c0[_0x214b5f(0x162)],'tableName':_0x4489c0[_0x214b5f(0x15e)],'name':_0x4489c0[_0x214b5f(0x18e)],'datasetCodes':_0x5edfb8});}return _0x2fe1dc;}export function parseModelRegistry(_0x88cfad){const _0x2d705a=a6_0x51d1e9,_0x522670=extractRegistryJson(_0x88cfad);if(!_0x522670)return undefined;try{const _0x3ed22b=parseGeneratedRegistryJson(_0x522670);if(typeof _0x3ed22b[_0x2d705a(0x17a)]!==_0x2d705a(0x170)||!_0x3ed22b[_0x2d705a(0x1a1)]||typeof _0x3ed22b[_0x2d705a(0x1a1)]!==_0x2d705a(0x194))return undefined;if(_0x3ed22b[_0x2d705a(0x195)]===_0x2d705a(0x168))return migrateLegacyRegistry(_0x3ed22b);if(!(_0x3ed22b[_0x2d705a(0x195)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x3ed22b[_0x2d705a(0x195)]===undefined&&_0x88cfad[_0x2d705a(0x167)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x2d705a(0x18b)](_0x3ed22b[_0x2d705a(0x18c)]))return undefined;const _0x1dce67=_0x3ed22b[_0x2d705a(0x1a1)],_0x7a7ba5=normalizeModelEntries(_0x1dce67,_0x3ed22b[_0x2d705a(0x18c)]);if(!_0x7a7ba5)return undefined;return{'defaultProfile':_0x3ed22b['defaultProfile'],'profiles':_0x1dce67,'models':_0x7a7ba5};}catch{return undefined;}}export function readModelRegistry(_0x2d59d1){if(!existsSync(_0x2d59d1))return undefined;try{return parseModelRegistry(readFileSync(_0x2d59d1,'utf8'));}catch{return undefined;}}function registrySource(_0x25ac2d){const _0x5cd91b=a6_0x51d1e9,_0x3fcfff=Object['keys'](_0x25ac2d[_0x5cd91b(0x1a1)]),_0x340f2c=_0x25ac2d[_0x5cd91b(0x18c)]['map'](_0x5b64e2=>{const _0x8fdc48=_0x5cd91b,_0x30bf4b=_0x3fcfff[_0x8fdc48(0x17b)](_0x38986c=>_0x5b64e2[_0x8fdc48(0x198)][_0x38986c]),_0x41fac2=_0x30bf4b[0x0],_0x511a20=_0x41fac2!==undefined&&_0x30bf4b[_0x8fdc48(0x16b)](_0x5d3221=>_0x5d3221===_0x41fac2),_0x3706dd={'alias':_0x5b64e2[_0x8fdc48(0x162)],'tableName':_0x5b64e2[_0x8fdc48(0x15e)],'name':_0x5b64e2['name']};return _0x511a20?{..._0x3706dd,'datasetCode':_0x41fac2}:{..._0x3706dd,'datasetCodes':_0x5b64e2[_0x8fdc48(0x198)]};}),_0x3b0c52=JSON[_0x5cd91b(0x193)]({'defaultProfile':_0x25ac2d[_0x5cd91b(0x17a)],'profiles':_0x25ac2d[_0x5cd91b(0x1a1)],'models':_0x340f2c},null,0x2)[_0x5cd91b(0x1a4)]('\x0a')[_0x5cd91b(0x17b)](_0x3f903b=>'\x20\x20'+_0x3f903b)[_0x5cd91b(0x187)]('\x0a');return'/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a'+MODEL_REGISTRY_VERSION_MARKER+_0x5cd91b(0x179)+REGISTRY_START+'\x0a'+_0x3b0c52+_0x5cd91b(0x169)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x2de717,_0xb505b4,_0x68d298){const _0x6e3b67=a6_0x51d1e9,_0x94ef52=_0x68d298[_0x6e3b67(0x17b)](_0x46183c=>({..._0x46183c,'alias':_0x46183c['alias']||_0x46183c[_0x6e3b67(0x15e)]})),_0x12dfa2=new Map(),_0x5781d3=new Map();for(const _0x208757 of _0x94ef52){const _0x366824=_0x12dfa2[_0x6e3b67(0x19f)](_0x208757[_0x6e3b67(0x162)]);if(_0x366824&&_0x366824!==_0x208757[_0x6e3b67(0x15e)])throw new Error(_0x6e3b67(0x174)+_0x208757['alias']+_0x6e3b67(0x172)+_0x366824+_0x6e3b67(0x19d)+_0x208757[_0x6e3b67(0x15e)]+_0x6e3b67(0x1a7)+_0xb505b4+'\x22.');const _0x246d3d=_0x5781d3[_0x6e3b67(0x19f)](_0x208757[_0x6e3b67(0x15e)]);if(_0x246d3d&&_0x246d3d!==_0x208757[_0x6e3b67(0x162)])throw new Error(_0x6e3b67(0x17e)+_0x208757['tableName']+'\x22\x20maps\x20to\x20both\x20aliases\x20\x22'+_0x246d3d+_0x6e3b67(0x19d)+_0x208757['alias']+'\x22\x20in\x20profile\x20\x22'+_0xb505b4+'\x22.');_0x12dfa2[_0x6e3b67(0x15d)](_0x208757['alias'],_0x208757['tableName']),_0x5781d3[_0x6e3b67(0x15d)](_0x208757[_0x6e3b67(0x15e)],_0x208757[_0x6e3b67(0x162)]);const _0x203b7b=_0x2de717[_0x6e3b67(0x18c)][_0x6e3b67(0x163)](_0xa8c135=>_0xa8c135['alias']===_0x208757[_0x6e3b67(0x162)]);if(_0x203b7b&&_0x203b7b['tableName']!==_0x208757[_0x6e3b67(0x15e)])throw new Error(_0x6e3b67(0x174)+_0x208757[_0x6e3b67(0x162)]+_0x6e3b67(0x15c)+_0x203b7b[_0x6e3b67(0x15e)]+_0x6e3b67(0x16a)+_0x208757[_0x6e3b67(0x15e)]+_0x6e3b67(0x1a7)+_0xb505b4+'\x22.');const _0x27f939=_0x2de717[_0x6e3b67(0x18c)]['find'](_0x3a7947=>_0x3a7947[_0x6e3b67(0x15e)]===_0x208757[_0x6e3b67(0x15e)]);if(_0x27f939&&_0x27f939[_0x6e3b67(0x162)]!==_0x208757['alias'])throw new Error(_0x6e3b67(0x17e)+_0x208757['tableName']+_0x6e3b67(0x199)+_0x27f939['alias']+_0x6e3b67(0x16a)+_0x208757['alias']+_0x6e3b67(0x1a7)+_0xb505b4+'\x22.');}for(const _0x456e6a of _0x2de717[_0x6e3b67(0x18c)]){delete _0x456e6a[_0x6e3b67(0x198)][_0xb505b4];}for(const _0x33fade of _0x94ef52){let _0x1ce6aa=_0x2de717[_0x6e3b67(0x18c)][_0x6e3b67(0x163)](_0x2c7eba=>_0x2c7eba[_0x6e3b67(0x162)]===_0x33fade[_0x6e3b67(0x162)]);!_0x1ce6aa&&(_0x1ce6aa={'alias':_0x33fade['alias'],'tableName':_0x33fade['tableName'],'name':_0x33fade[_0x6e3b67(0x18e)],'datasetCodes':{}},_0x2de717['models'][_0x6e3b67(0x1a6)](_0x1ce6aa)),(_0xb505b4===_0x2de717['defaultProfile']||!_0x1ce6aa[_0x6e3b67(0x198)][_0x2de717['defaultProfile']])&&(_0x1ce6aa[_0x6e3b67(0x162)]=_0x33fade[_0x6e3b67(0x162)],_0x1ce6aa[_0x6e3b67(0x15e)]=_0x33fade[_0x6e3b67(0x15e)],_0x1ce6aa[_0x6e3b67(0x18e)]=_0x33fade[_0x6e3b67(0x18e)]),_0x1ce6aa['datasetCodes'][_0xb505b4]=_0x33fade[_0x6e3b67(0x16f)];}_0x2de717[_0x6e3b67(0x18c)]=_0x2de717[_0x6e3b67(0x18c)][_0x6e3b67(0x165)](_0x15bbeb=>Object[_0x6e3b67(0x1a0)](_0x15bbeb['datasetCodes'])[_0x6e3b67(0x176)]>0x0);}function removeUnboundProfiles(_0x445480){const _0x19a3f8=a6_0x51d1e9,_0x215b4b=Object['entries'](_0x445480[_0x19a3f8(0x1a1)])[_0x19a3f8(0x165)](([,_0x233f74])=>_0x233f74[_0x19a3f8(0x171)]===_0x19a3f8(0x185))[_0x19a3f8(0x17b)](([_0x4b203b])=>_0x4b203b);if(_0x215b4b[_0x19a3f8(0x176)]===0x0)return;for(const _0x28618e of _0x215b4b){delete _0x445480[_0x19a3f8(0x1a1)][_0x28618e];for(const _0x19e9e6 of _0x445480['models']){delete _0x19e9e6[_0x19a3f8(0x198)][_0x28618e];}}_0x445480[_0x19a3f8(0x18c)]=_0x445480[_0x19a3f8(0x18c)][_0x19a3f8(0x165)](_0x497e6d=>Object[_0x19a3f8(0x1a0)](_0x497e6d[_0x19a3f8(0x198)])[_0x19a3f8(0x176)]>0x0);}export function getProfileModels(_0x5c5f8e,_0x5dfc77){const _0x55f3c=a6_0x51d1e9;return _0x5c5f8e[_0x55f3c(0x18c)][_0x55f3c(0x190)](_0x2abbd9=>{const _0x56ef60=_0x55f3c,_0x4e6704=_0x2abbd9[_0x56ef60(0x198)][_0x5dfc77];return _0x4e6704?[{'datasetCode':_0x4e6704,'tableName':_0x2abbd9[_0x56ef60(0x15e)],'name':_0x2abbd9['name'],'alias':_0x2abbd9[_0x56ef60(0x162)]}]:[];});}export function updateModelRegistry(_0xc22359){const _0x110f85=a6_0x51d1e9,_0x185434=a6_0x522213['join'](_0xc22359[_0x110f85(0x184)],MODEL_REGISTRY_FILE_NAME),_0x5eb6da=existsSync(_0x185434),_0x42915e=readModelRegistry(_0x185434);if(_0x5eb6da&&!_0x42915e)throw new Error(MODEL_REGISTRY_FILE_NAME+'\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.');const _0x3d806e=_0x42915e??emptyRegistry(_0xc22359['defaultProfile']);if(_0xc22359[_0x110f85(0x171)]!==_0x110f85(0x185))removeUnboundProfiles(_0x3d806e);const _0x3c8ab6=_0x42915e?getProfileModels(_0x42915e,_0xc22359[_0x110f85(0x188)])[_0x110f85(0x176)]:0x0;if(_0x3c8ab6>0x0&&_0xc22359[_0x110f85(0x18c)][_0x110f85(0x176)]===0x0&&!_0xc22359[_0x110f85(0x181)])throw new Error(_0x110f85(0x196)+_0x3c8ab6+_0x110f85(0x178)+_0xc22359[_0x110f85(0x188)]+_0x110f85(0x1a5)+'Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.');_0x3d806e[_0x110f85(0x17a)]=_0xc22359[_0x110f85(0x17a)],_0x3d806e[_0x110f85(0x1a1)][_0xc22359[_0x110f85(0x188)]]={'appCode':_0xc22359[_0x110f85(0x171)],'runtimeDomain':_0xc22359[_0x110f85(0x17f)]},mergeProfileModels(_0x3d806e,_0xc22359['profileName'],_0xc22359[_0x110f85(0x18c)]),mkdirSync(_0xc22359[_0x110f85(0x184)],{'recursive':!![]});const _0xe2fe4e=_0x185434+'.'+process[_0x110f85(0x18d)]+'.'+Date[_0x110f85(0x15f)]()+_0x110f85(0x17c);try{writeFileSync(_0xe2fe4e,registrySource(_0x3d806e),{'encoding':_0x110f85(0x186),'mode':0x1a4}),renameSync(_0xe2fe4e,_0x185434);}catch(_0x13eb91){try{unlinkSync(_0xe2fe4e);}catch{}throw _0x13eb91;}return{'path':_0x185434,'registry':_0x3d806e,'existed':_0x5eb6da};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a7_0x29147d=a7_0x21fd;(function(_0x7dcc1a,_0x250a51){const _0x43160c=a7_0x21fd,_0x5afa9c=_0x7dcc1a();while(!![]){try{const _0x2dba78=-parseInt(_0x43160c(0x200))/0x1*(parseInt(_0x43160c(0x1f0))/0x2)+-parseInt(_0x43160c(0x1f1))/0x3+-parseInt(_0x43160c(0x1ee))/0x4*(-parseInt(_0x43160c(0x1fb))/0x5)+-parseInt(_0x43160c(0x1ef))/0x6+-parseInt(_0x43160c(0x1f6))/0x7*(-parseInt(_0x43160c(0x1f7))/0x8)+parseInt(_0x43160c(0x1f9))/0x9+parseInt(_0x43160c(0x1f2))/0xa;if(_0x2dba78===_0x250a51)break;else _0x5afa9c['push'](_0x5afa9c['shift']());}catch(_0x5e73f3){_0x5afa9c['push'](_0x5afa9c['shift']());}}}(a7_0x38b2,0x23173));function a7_0x21fd(_0x1a24b3,_0x1135c6){_0x1a24b3=_0x1a24b3-0x1e8;const _0x38b239=a7_0x38b2();let _0x21fd9d=_0x38b239[_0x1a24b3];return _0x21fd9d;}import{readFileSync}from'node:fs';function a7_0x38b2(){const _0x31eb6a=['utf8','profile-client.ts.tpl','1xAwISt','format','dirname','all','resolve','join','../../templates/generate-api','8XXClVl','309156oueHJi','126434xZrjfv','680799iOkNKs','2961770sPojca','cwd','profile-api.ts.tpl','relative','274127HHSVcZ','8mbqUKC','startsWith','911151jzolIf','typescript','122075dWOxVi','model-runtime.ts.tpl','replace'];a7_0x38b2=function(){return _0x31eb6a;};return a7_0x38b2();}import a7_0xdad0a7 from'node:path';import{fileURLToPath}from'node:url';import a7_0x481c00 from'prettier';import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function relativeImport(_0xd51f5d,_0x2bbc0c){const _0x4c6b42=a7_0x21fd;let _0x1e77a9=a7_0xdad0a7[_0x4c6b42(0x1f5)](_0xd51f5d,_0x2bbc0c)['replace'](/\\/g,'/');if(!_0x1e77a9[_0x4c6b42(0x1f8)]('.'))_0x1e77a9='./'+_0x1e77a9;return _0x1e77a9;}export async function renderModelRegistryScaffold(_0x53533b,_0x2381db=process[a7_0x29147d(0x1f3)]()){const _0xfcaf36=a7_0x29147d,_0xc944f0=fileURLToPath(import.meta.url),_0x273d99=a7_0xdad0a7[_0xfcaf36(0x1eb)](a7_0xdad0a7[_0xfcaf36(0x1e9)](_0xc944f0),_0xfcaf36(0x1ed)),_0x4207be=relativeImport(a7_0xdad0a7[_0xfcaf36(0x1eb)](_0x53533b),a7_0xdad0a7['resolve'](_0x2381db,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x1d4960=readFileSync(a7_0xdad0a7[_0xfcaf36(0x1ec)](_0x273d99,_0xfcaf36(0x1f4)),_0xfcaf36(0x1fe))[_0xfcaf36(0x1fd)]('{ProjectRoutingImport}',_0x4207be),[_0x5cc313,_0x4db743,_0x104dd0]=await Promise[_0xfcaf36(0x1ea)]([a7_0x481c00[_0xfcaf36(0x1e8)](_0x1d4960,{'parser':'typescript'}),a7_0x481c00[_0xfcaf36(0x1e8)](readFileSync(a7_0xdad0a7[_0xfcaf36(0x1ec)](_0x273d99,_0xfcaf36(0x1ff)),_0xfcaf36(0x1fe)),{'parser':_0xfcaf36(0x1fa)}),a7_0x481c00['format'](readFileSync(a7_0xdad0a7[_0xfcaf36(0x1ec)](_0x273d99,_0xfcaf36(0x1fc)),_0xfcaf36(0x1fe)),{'parser':_0xfcaf36(0x1fa)})]);return{'api':_0x5cc313,'client':_0x4db743,'modelRuntime':_0x104dd0};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x23b5ac,_0x472e57){const _0x4cfc02=a8_0xb949,_0x591de4=_0x23b5ac();while(!![]){try{const _0x34f495=parseInt(_0x4cfc02(0x164))/0x1*(-parseInt(_0x4cfc02(0x15a))/0x2)+-parseInt(_0x4cfc02(0x16d))/0x3*(parseInt(_0x4cfc02(0x16e))/0x4)+parseInt(_0x4cfc02(0x168))/0x5+-parseInt(_0x4cfc02(0x156))/0x6+-parseInt(_0x4cfc02(0x15c))/0x7*(-parseInt(_0x4cfc02(0x157))/0x8)+parseInt(_0x4cfc02(0x160))/0x9+parseInt(_0x4cfc02(0x155))/0xa;if(_0x34f495===_0x472e57)break;else _0x591de4['push'](_0x591de4['shift']());}catch(_0x3e19a9){_0x591de4['push'](_0x591de4['shift']());}}}(a8_0x26cf,0xb7463));import{existsSync}from'node:fs';import a8_0x4b19db from'node:path';import{readRawConfig}from'../context/config-loader.js';import{MODEL_REGISTRY_FILE_NAME,readModelRegistry}from'../api/model-registry-file.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a8_0xb949(_0x47163c,_0x5c2158){_0x47163c=_0x47163c-0x152;const _0x26cfcd=a8_0x26cf();let _0xb9499=_0x26cfcd[_0x47163c];return _0xb9499;}export function resolveApiModelSource(_0x23dbf3,_0x1669e9,_0x43dbdf){const _0x1f355e=a8_0xb949,_0x1b5a37=a8_0x4b19db[_0x1f355e(0x15b)](process[_0x1f355e(0x169)](),_0x23dbf3),_0x4c64a9=a8_0x4b19db['resolve'](_0x1b5a37,_0x1f355e(0x165)),_0xcc692c=a8_0x4b19db[_0x1f355e(0x15b)](_0x1b5a37,MODEL_REGISTRY_FILE_NAME),_0x44606c=readModelRegistry(_0xcc692c);if(_0x44606c){const _0x407cdd=_0x1669e9?Object['entries'](_0x44606c[_0x1f355e(0x162)])['filter'](([,_0x53c577])=>_0x53c577[_0x1f355e(0x161)]===_0x1669e9):[];if(_0x43dbdf){if(_0x44606c[_0x1f355e(0x162)][_0x43dbdf])return{'filePath':_0xcc692c,'profileName':_0x43dbdf};if(_0x407cdd[_0x1f355e(0x16b)]>0x0)throw CliErrors[_0x1f355e(0x171)](_0x1f355e(0x154)+_0x43dbdf+'\x22\x20is\x20missing\x20from\x20'+MODEL_REGISTRY_FILE_NAME+'.',_0x1f355e(0x167)+CLI_BIN_NAME+_0x1f355e(0x153)+_0x43dbdf+_0x1f355e(0x159));}else{if(_0x407cdd[_0x1f355e(0x16b)]===0x1)return{'filePath':_0xcc692c,'profileName':_0x407cdd[0x0][0x0]};if(_0x407cdd['length']>0x1)throw new Error(_0x1f355e(0x158)+_0x1669e9+_0x1f355e(0x15f)+_0x407cdd[_0x1f355e(0x15d)](([_0x32ca40])=>_0x32ca40)['join'](',\x20')+'.\x20'+_0x1f355e(0x16a));if(_0x44606c[_0x1f355e(0x162)][_0x44606c[_0x1f355e(0x152)]]&&!_0x1669e9)return{'filePath':_0xcc692c,'profileName':_0x44606c[_0x1f355e(0x152)]};}}if(!_0x1669e9&&!_0x43dbdf)return{'filePath':_0x4c64a9};const _0x3afae5=readRawConfig(),_0x2b88e6=_0x3afae5[_0x1f355e(0x16c)]&&typeof _0x3afae5[_0x1f355e(0x16c)]===_0x1f355e(0x163)?_0x3afae5['apps']:{},_0x2a4fa3=_0x43dbdf&&_0x2b88e6[_0x43dbdf]?[_0x43dbdf,_0x2b88e6[_0x43dbdf]]:Object[_0x1f355e(0x172)](_0x2b88e6)[_0x1f355e(0x170)](([,_0x35d2a6])=>_0x35d2a6?.[_0x1f355e(0x15e)]===_0x1669e9);if(!_0x2a4fa3)return{'filePath':_0x4c64a9};const [_0x382ad9,_0x3948b9]=_0x2a4fa3,_0x255f32=typeof _0x3afae5[_0x1f355e(0x166)]==='string'?_0x3afae5[_0x1f355e(0x166)]:undefined;if(_0x3948b9?.['apiDir'])return{'filePath':_0x4c64a9};if(_0x255f32&&_0x382ad9!==_0x255f32){const _0x366bce=a8_0x4b19db['resolve'](_0x1b5a37,_0x382ad9+_0x1f355e(0x16f));if(existsSync(_0x366bce))return{'filePath':_0x366bce};}return{'filePath':_0x4c64a9};}function a8_0x26cf(){const _0x297aec=['2731865FCvkmE','cwd','Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.','length','apps','157755kRfkeS','40IvKSBZ','-api.ts','find','validation','entries','defaultProfile','\x20api\x20pull\x20--app\x20','Model\x20profile\x20\x22','16638640lMlkEN','8545410DFllmE','16wGxUJq','AppCode\x20\x22','`\x20first.','70CwwHsV','resolve','4125002YSBPyQ','map','appcode','\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20','3008538VyrEWb','appCode','profiles','object','29209tpCMiv','api.ts','defaultApp','Run\x20`'];a8_0x26cf=function(){return _0x297aec;};return a8_0x26cf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x48bd49,_0x383db4){const _0x11aaba=a9_0x228f,_0x4ef477=_0x48bd49();while(!![]){try{const _0x484d81=parseInt(_0x11aaba(0xca))/0x1*(parseInt(_0x11aaba(0xdb))/0x2)+-parseInt(_0x11aaba(0xc9))/0x3+parseInt(_0x11aaba(0xd0))/0x4+-parseInt(_0x11aaba(0xd7))/0x5*(-parseInt(_0x11aaba(0xcc))/0x6)+parseInt(_0x11aaba(0xd1))/0x7+-parseInt(_0x11aaba(0xd9))/0x8+-parseInt(_0x11aaba(0xcf))/0x9;if(_0x484d81===_0x383db4)break;else _0x4ef477['push'](_0x4ef477['shift']());}catch(_0x599e78){_0x4ef477['push'](_0x4ef477['shift']());}}}(a9_0x3863,0x45283));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';function a9_0x3863(){const _0x110311=['*\x20Login\x20successful!','validation','56570LPHCLk','stop','1205720otTtMT','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','2SBdbXR','Run\x20`','autoYes','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','!\x20Login\x20failed.','887958ytwHHq','500839GsaNtH','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','258VuOiSP','log','start','6091164rYECqc','268816IQVHnq','2465533RmRWPJ','Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','No\x20valid\x20session.\x20Login\x20now?'];a9_0x3863=function(){return _0x110311;};return a9_0x3863();}function a9_0x228f(_0x20d7af,_0x4a554d){_0x20d7af=_0x20d7af-0xc5;const _0x3863ff=a9_0x3863();let _0x228f3c=_0x3863ff[_0x20d7af];return _0x228f3c;}import{confirm}from'@inquirer/prompts';import a9_0x598e4a from'ora';export async function runAuthServer(_0x1fb8a0){const _0x2de0eb=a9_0x228f,_0x1e80ee=await getIsSessionValid();if(_0x1e80ee){console['log'](_0x2de0eb(0xda));return;}if(_0x1fb8a0?.['nonInteractive']&&!_0x1fb8a0[_0x2de0eb(0xc6)])throw CliErrors[_0x2de0eb(0xd6)](_0x2de0eb(0xd2),_0x2de0eb(0xc5)+CLI_BIN_NAME+_0x2de0eb(0xcb));const _0x275a6c=_0x1fb8a0?.['autoYes']?!![]:await confirm({'message':_0x2de0eb(0xd4),'default':!![]});if(!_0x275a6c)return;if(_0x1fb8a0?.['nonInteractive']){console[_0x2de0eb(0xcd)](_0x2de0eb(0xd3));const _0x5f280a=await authServer({'silent':![],'openBrowser':![]});_0x5f280a?console[_0x2de0eb(0xcd)]('*\x20Login\x20successful!'):console['log'](_0x2de0eb(0xc8));return;}const _0x739b0f=a9_0x598e4a(_0x2de0eb(0xc7))[_0x2de0eb(0xce)](),_0x3fe3a2=await authServer({'silent':!![],'openBrowser':!![]});_0x739b0f[_0x2de0eb(0xd8)](),_0x3fe3a2?console[_0x2de0eb(0xcd)](_0x2de0eb(0xd5)):console['log'](_0x2de0eb(0xc8));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x413e8a=a10_0x2276;(function(_0x8c3df5,_0xc021d0){const _0x4cb958=a10_0x2276,_0xe50c05=_0x8c3df5();while(!![]){try{const _0x3e6167=parseInt(_0x4cb958(0x173))/0x1+parseInt(_0x4cb958(0x175))/0x2+-parseInt(_0x4cb958(0x199))/0x3*(parseInt(_0x4cb958(0x19c))/0x4)+parseInt(_0x4cb958(0x185))/0x5*(parseInt(_0x4cb958(0x17c))/0x6)+parseInt(_0x4cb958(0x191))/0x7*(parseInt(_0x4cb958(0x178))/0x8)+-parseInt(_0x4cb958(0x192))/0x9*(-parseInt(_0x4cb958(0x196))/0xa)+parseInt(_0x4cb958(0x18f))/0xb*(-parseInt(_0x4cb958(0x17e))/0xc);if(_0x3e6167===_0xc021d0)break;else _0xe50c05['push'](_0xe50c05['shift']());}catch(_0x1c4c83){_0xe50c05['push'](_0xe50c05['shift']());}}}(a10_0x3ed0,0x64028));import{writeFileSync}from'node:fs';function a10_0x2276(_0x2425d5,_0x418514){_0x2425d5=_0x2425d5-0x171;const _0x3ed00d=a10_0x3ed0();let _0x227640=_0x3ed00d[_0x2425d5];return _0x227640;}import a10_0x436581 from'node:http';import a10_0x3291d1 from'node:https';import{getUserDomain}from'../constant/domain.js';import{getOfficialRoutingCdn,getOfficialRoutingProfile}from'../constant/routing-profile.js';function a10_0x3ed0(){const _0x3784b2=['468925SIkAcX','isAuth','cookie','timeoutMs','error','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','win32','Auth\x20server\x20error:','silent','end','15220337WdeOxL','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','3859646sTSxMf','126YdADtt','json','cmd\x20/c\x20start\x20\x22\x22\x20\x22','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','339370VeLqqy','📍\x20Login\x20URL:','/sign-in?redirect=','1477359iNqQRt','/api/auth/get-session','open\x20\x22','4IUXQuk','text/html;\x20charset=utf-8','address','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','log','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','close','local','certificateUrl','lovrabet','headers','763087yujHjx','then','429644EnaheV','💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','openBrowser','8PKyUpH','createServer','/cert/lovrabet-dev.json','🔐\x20Starting\x20login\x20service...','18ajsPIx','session','12dTWNWS','xdg-open\x20\x22','port','utf-8','origin','writeHead','object'];a10_0x3ed0=function(){return _0x3784b2;};return a10_0x3ed0();}import{getProjectDomainRoutingManifest}from'../config/project-domain-routing.js';import{exec}from'node:child_process';import{getIsSessionValid}from'../auth/is-session-valid.js';import{cookieFile}from'../auth/constant.js';import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export function resolveAuthCallbackRouting(_0x1f5ee5){const _0x223be1=a10_0x2276;if(!_0x1f5ee5)return getProjectDomainRoutingManifest()['local'];const _0x287b90=getOfficialRoutingProfile(_0x1f5ee5),_0x174244=getOfficialRoutingCdn(_0x1f5ee5);return{'origin':_0x287b90[_0x223be1(0x1a3)][_0x223be1(0x182)],'certificateUrl':_0x174244[_0x223be1(0x171)]+_0x223be1(0x17a)};}function withPort(_0x5a3f8d,_0x26faad){const _0x4a73dd=a10_0x2276,_0x4e93f2=new URL(_0x5a3f8d);return _0x4e93f2[_0x4a73dd(0x180)]=String(_0x26faad),_0x4e93f2[_0x4a73dd(0x182)];}export async function authServer(_0x543fb4){const _0xf9e7a7=a10_0x2276,_0x3bd2f3=_0x543fb4?.[_0xf9e7a7(0x18d)]||![],_0x3b2c58=_0x543fb4?.[_0xf9e7a7(0x177)]??!![],_0x5d6799=_0x543fb4?.[_0xf9e7a7(0x188)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x24d1fe=resolveAuthCallbackRouting(),_0x3a4c44=_0x24d1fe[_0xf9e7a7(0x1a4)]?await(await fetch(_0x24d1fe[_0xf9e7a7(0x1a4)]))[_0xf9e7a7(0x193)]():undefined;return new Promise(async(_0x59ca0a,_0x2c39d8)=>{const _0x2e32a3=_0xf9e7a7;let _0x4aaeb0=0x0,_0x3ec6a1=![],_0x2509f0;const _0x5e2460=async(_0x1d9ba3,_0x48288c)=>{const _0x25ceab=a10_0x2276,_0x4ce501=getUserDomain(),_0x41cbf2=_0x1d9ba3[_0x25ceab(0x172)][_0x25ceab(0x187)]||'',_0x4bcd4c=await fetch(_0x4ce501+_0x25ceab(0x19a),{'headers':{'cookie':_0x41cbf2}})[_0x25ceab(0x174)](_0x521a85=>_0x521a85[_0x25ceab(0x193)]()),_0x254b7f=_0x4bcd4c&&_0x4bcd4c[_0x25ceab(0x17d)]&&_0x4bcd4c['user'];if(_0x254b7f){writeFileSync(cookieFile,_0x41cbf2,_0x25ceab(0x181));const _0x1dd372=buildLoginSuccessHtml();_0x48288c[_0x25ceab(0x183)](0xc8,{'Content-Type':_0x25ceab(0x19d)}),_0x48288c[_0x25ceab(0x18e)](_0x1dd372),_0x1c0d8a(!![]);}else{const _0x472199=encodeURIComponent(withPort(_0x24d1fe[_0x25ceab(0x182)],_0x4aaeb0));_0x48288c['writeHead'](0x12e,{'location':_0x4ce501+_0x25ceab(0x198)+_0x472199}),_0x48288c[_0x25ceab(0x18e)]();return;}},_0x536273=_0x3a4c44?a10_0x3291d1[_0x2e32a3(0x179)](_0x3a4c44,_0x5e2460):a10_0x436581[_0x2e32a3(0x179)](_0x5e2460);function _0x1c0d8a(_0x24a167){const _0x2f93db=_0x2e32a3;if(_0x3ec6a1)return;_0x3ec6a1=!![],_0x2509f0&&clearTimeout(_0x2509f0),_0x536273[_0x2f93db(0x1a2)](),_0x59ca0a(_0x24a167);}_0x536273['listen'](0x0,'127.0.0.1',()=>{const _0x589e23=_0x2e32a3,_0x390efc=_0x536273[_0x589e23(0x19e)]();_0x4aaeb0=typeof _0x390efc===_0x589e23(0x184)&&_0x390efc?_0x390efc[_0x589e23(0x180)]:Number(_0x390efc);const _0x437384=withPort(_0x24d1fe['origin'],_0x4aaeb0);_0x2509f0=setTimeout(()=>{const _0x4d8a8a=_0x589e23;!_0x3bd2f3&&console[_0x4d8a8a(0x1a0)]('!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.'),_0x1c0d8a(![]);},_0x5d6799);!_0x3bd2f3&&(console[_0x589e23(0x1a0)](_0x589e23(0x17b)),console['log'](_0x589e23(0x197),_0x437384),_0x3b2c58?(console[_0x589e23(0x1a0)](_0x589e23(0x195)),console['log'](''),console['log'](_0x589e23(0x190))):console[_0x589e23(0x1a0)](_0x589e23(0x176)),console[_0x589e23(0x1a0)](''));if(!_0x3b2c58)return;openInBrowser(_0x437384)[_0x589e23(0x174)](_0x1df825=>{const _0x4b2975=_0x589e23;!_0x3bd2f3&&(_0x1df825?console[_0x4b2975(0x1a0)](_0x4b2975(0x18a)):(console[_0x4b2975(0x1a0)](_0x4b2975(0x19f)),console[_0x4b2975(0x1a0)](_0x4b2975(0x1a1),_0x437384)),console[_0x4b2975(0x1a0)](''));})['catch'](()=>{const _0x414982=_0x589e23;!_0x3bd2f3&&(console[_0x414982(0x1a0)](_0x414982(0x19f)),console[_0x414982(0x1a0)](_0x414982(0x1a1),_0x437384),console[_0x414982(0x1a0)](''));});}),_0x536273['on'](_0x2e32a3(0x189),_0x300deb=>{const _0x45faa3=_0x2e32a3;if(_0x3ec6a1)return;_0x3ec6a1=!![],_0x2509f0&&clearTimeout(_0x2509f0),!_0x3bd2f3&&console[_0x45faa3(0x189)](_0x45faa3(0x18c),_0x300deb),_0x536273['close'](),_0x2c39d8(_0x300deb);});});}function openInBrowser(_0x159abf){return new Promise(_0x6fb857=>{const _0x59bf8b=a10_0x2276,_0x2f7fb9=process['platform'];let _0x2642ee;if(_0x2f7fb9===_0x59bf8b(0x18b))_0x2642ee=_0x59bf8b(0x194)+_0x159abf+'\x22';else _0x2f7fb9==='darwin'?_0x2642ee=_0x59bf8b(0x19b)+_0x159abf+'\x22':_0x2642ee=_0x59bf8b(0x17f)+_0x159abf+'\x22';exec(_0x2642ee,_0x5841fa=>{_0x5841fa?_0x6fb857(![]):_0x6fb857(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a10_0x413e8a(0x1a0)](a10_0x413e8a(0x186),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a11_0x31216d=a11_0x3be2;(function(_0x589c71,_0x470b8f){const _0x301a97=a11_0x3be2,_0x469895=_0x589c71();while(!![]){try{const _0x1d6a8b=-parseInt(_0x301a97(0xce))/0x1+parseInt(_0x301a97(0xc7))/0x2*(parseInt(_0x301a97(0xcb))/0x3)+parseInt(_0x301a97(0xcf))/0x4*(-parseInt(_0x301a97(0xcd))/0x5)+parseInt(_0x301a97(0xca))/0x6+parseInt(_0x301a97(0xc9))/0x7+parseInt(_0x301a97(0xd1))/0x8*(parseInt(_0x301a97(0xd2))/0x9)+-parseInt(_0x301a97(0xd0))/0xa*(-parseInt(_0x301a97(0xcc))/0xb);if(_0x1d6a8b===_0x470b8f)break;else _0x469895['push'](_0x469895['shift']());}catch(_0x53ad47){_0x469895['push'](_0x469895['shift']());}}}(a11_0x2007,0x8c6f8));import{mkdirSync}from'node:fs';function a11_0x3be2(_0x38acab,_0x5f3a21){_0x38acab=_0x38acab-0xc7;const _0x200711=a11_0x2007();let _0x3be236=_0x200711[_0x38acab];return _0x3be236;}import{homedir}from'node:os';import{join}from'node:path';function a11_0x2007(){const _0x35a012=['1496270MjQcxI','285288ywXRlX','261mxJkuf','359702NbWzrG','.lovrabet','1496523qrVGWR','945726ThJNcw','6IWwQvx','11vsqcqT','960eWPJdW','1140196VJmnty','4156oZmAGy'];a11_0x2007=function(){return _0x35a012;};return a11_0x2007();}export const configDir=join(homedir(),a11_0x31216d(0xc8));export const cookieFile=join(configDir,'cookie');mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ebef1,_0x291970){var _0xba1e93=a12_0x59aa,_0x579dd2=_0x3ebef1();while(!![]){try{var _0x3c5903=parseInt(_0xba1e93(0x140))/0x1*(-parseInt(_0xba1e93(0x13f))/0x2)+-parseInt(_0xba1e93(0x139))/0x3+parseInt(_0xba1e93(0x13b))/0x4*(-parseInt(_0xba1e93(0x13c))/0x5)+parseInt(_0xba1e93(0x13a))/0x6+-parseInt(_0xba1e93(0x136))/0x7*(parseInt(_0xba1e93(0x13d))/0x8)+-parseInt(_0xba1e93(0x13e))/0x9+parseInt(_0xba1e93(0x137))/0xa*(parseInt(_0xba1e93(0x138))/0xb);if(_0x3c5903===_0x291970)break;else _0x579dd2['push'](_0x579dd2['shift']());}catch(_0xccab93){_0x579dd2['push'](_0x579dd2['shift']());}}}(a12_0x568b,0x1a41f));import{readFileSync}from'node:fs';function a12_0x59aa(_0xc11dc7,_0x336fe7){_0xc11dc7=_0xc11dc7-0x136;var _0x568be2=a12_0x568b();var _0x59aa60=_0x568be2[_0xc11dc7];return _0x59aa60;}import{cookieFile}from'../auth/constant.js';function a12_0x568b(){var _0x5c0f2d=['889960lLhWfH','888867GfYBSN','54jiXkFE','6895qExGZa','7DRGiWk','1566590wDEXQQ','44woaCMx','293799XMUxdY','480252USIbGF','252APNNAv','8335JwYSGS'];a12_0x568b=function(){return _0x5c0f2d;};return a12_0x568b();}export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3dbcda,_0xabaf65){const _0x26c427=a13_0x2379,_0x2476e4=_0x3dbcda();while(!![]){try{const _0x4b4239=parseInt(_0x26c427(0x1a3))/0x1+parseInt(_0x26c427(0x1a8))/0x2+-parseInt(_0x26c427(0x1a9))/0x3*(-parseInt(_0x26c427(0x1aa))/0x4)+-parseInt(_0x26c427(0x1a2))/0x5*(parseInt(_0x26c427(0x1a0))/0x6)+parseInt(_0x26c427(0x1a6))/0x7+-parseInt(_0x26c427(0x1a1))/0x8+parseInt(_0x26c427(0x1a4))/0x9;if(_0x4b4239===_0xabaf65)break;else _0x2476e4['push'](_0x2476e4['shift']());}catch(_0x423a2b){_0x2476e4['push'](_0x2476e4['shift']());}}}(a13_0x3926,0x3e8a2));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a13_0x2379(_0x967579,_0x1f4b2d){_0x967579=_0x967579-0x1a0;const _0x392647=a13_0x3926();let _0x237944=_0x392647[_0x967579];return _0x237944;}import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0x3a118d=a13_0x2379;try{if(!existsSync(cookieFile))return null;const _0x79b49c=readFileSync(cookieFile,_0x3a118d(0x1a7)),_0x5301a7=await fetch(getUserDomain()+_0x3a118d(0x1ab),{'headers':{'cookie':_0x79b49c}});if(!_0x5301a7['ok'])return null;const _0x173415=await _0x5301a7[_0x3a118d(0x1a5)]();if(!_0x173415['session']||!_0x173415['user'])return null;return _0x173415;}catch{return null;}}function a13_0x3926(){const _0xe945db=['126308YJgMbD','411jnROZa','3732TRYbLW','/api/auth/get-session','6ajcuIC','1391664FfJPlQ','2058065KgtgSj','38265VpagSF','1907622Vtukyd','json','2803745iipLvL','utf-8'];a13_0x3926=function(){return _0xe945db;};return a13_0x3926();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x287086,_0x402658){const _0x41ff60=a14_0x4b02,_0x22b970=_0x287086();while(!![]){try{const _0x312927=-parseInt(_0x41ff60(0xf6))/0x1+parseInt(_0x41ff60(0xf0))/0x2+parseInt(_0x41ff60(0xf4))/0x3+-parseInt(_0x41ff60(0xf8))/0x4+parseInt(_0x41ff60(0xf5))/0x5*(parseInt(_0x41ff60(0xf9))/0x6)+-parseInt(_0x41ff60(0xfb))/0x7*(parseInt(_0x41ff60(0xf3))/0x8)+parseInt(_0x41ff60(0xf7))/0x9;if(_0x312927===_0x402658)break;else _0x22b970['push'](_0x22b970['shift']());}catch(_0x31e445){_0x22b970['push'](_0x22b970['shift']());}}}(a14_0x4b5c,0x544f3));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a14_0x4b02(_0x62477d,_0xf288ea){_0x62477d=_0x62477d-0xf0;const _0x4b5c64=a14_0x4b5c();let _0x4b02ca=_0x4b5c64[_0x62477d];return _0x4b02ca;}import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x524bd4=a14_0x4b02;try{if(!existsSync(cookieFile))return![];const _0x174257=readFileSync(cookieFile,'utf-8'),_0x926818=await fetch(getUserDomain()+_0x524bd4(0xf2),{'headers':{'cookie':_0x174257}})['then'](_0x1c5db8=>_0x1c5db8[_0x524bd4(0xf1)]());return _0x926818&&_0x926818[_0x524bd4(0xfa)]&&_0x926818['user'];}catch{}return![];}function a14_0x4b5c(){const _0x48a8af=['19355TnkzLg','2800341IuphIb','2611276MrONeO','386562qZuxkh','session','7hWFkRl','1261166uOvgWY','json','/api/auth/get-session','5198608qerxCG','1210392bVhayc','25dHDeEj'];a14_0x4b5c=function(){return _0x48a8af;};return a14_0x4b5c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a15_0x565d(){const _0x40a6c0=['</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>','1757hMAeqn','1733473eBhzdQ','8ONZrHI','1115500sCASIa','3uaTJVv','723825aItciv','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','636480KJqsbg','570468vrDBEg','205875Lhvoad','458qrQeyR'];a15_0x565d=function(){return _0x40a6c0;};return a15_0x565d();}function a15_0x38e9(_0x3e2d42,_0x2ceeb7){_0x3e2d42=_0x3e2d42-0x94;const _0x565d04=a15_0x565d();let _0x38e9e6=_0x565d04[_0x3e2d42];return _0x38e9e6;}(function(_0x33f8ea,_0x49f992){const _0x17dd63=a15_0x38e9,_0x2272d4=_0x33f8ea();while(!![]){try{const _0x37948c=parseInt(_0x17dd63(0x94))/0x1*(parseInt(_0x17dd63(0x9e))/0x2)+parseInt(_0x17dd63(0x98))/0x3*(-parseInt(_0x17dd63(0x97))/0x4)+parseInt(_0x17dd63(0x99))/0x5+parseInt(_0x17dd63(0x9c))/0x6+-parseInt(_0x17dd63(0x95))/0x7*(parseInt(_0x17dd63(0x96))/0x8)+parseInt(_0x17dd63(0x9d))/0x9+parseInt(_0x17dd63(0x9b))/0xa;if(_0x37948c===_0x49f992)break;else _0x2272d4['push'](_0x2272d4['shift']());}catch(_0x1043a2){_0x2272d4['push'](_0x2272d4['shift']());}}}(a15_0x565d,0x315dd));export function buildLoginSuccessHtml(){const _0x57527b=a15_0x38e9,_0x340d9c=_0x57527b(0x9a);return'<!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>'+_0x340d9c+_0x57527b(0x9f);}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a16_0xe45a(){var _0x35ed0b=['7vUEqAg','log','60WIMzAM','5029156CKsory','!\x20Not\x20logged\x20in','8AShegE','374721EGZoph','93414kLNwWJ','112824OPBRBL','2EBBTEt','195216UAgtRZ','101862EPwqQM','125nHifku','11600376YwKpZb'];a16_0xe45a=function(){return _0x35ed0b;};return a16_0xe45a();}(function(_0x32590f,_0x56c83f){var _0x1d83d0=a16_0x1a1a,_0x8b839b=_0x32590f();while(!![]){try{var _0x24a262=parseInt(_0x1d83d0(0xae))/0x1*(-parseInt(_0x1d83d0(0xaf))/0x2)+-parseInt(_0x1d83d0(0xab))/0x3*(-parseInt(_0x1d83d0(0xaa))/0x4)+-parseInt(_0x1d83d0(0xa3))/0x5*(parseInt(_0x1d83d0(0xac))/0x6)+parseInt(_0x1d83d0(0xa5))/0x7*(-parseInt(_0x1d83d0(0xad))/0x8)+parseInt(_0x1d83d0(0xa2))/0x9*(parseInt(_0x1d83d0(0xa7))/0xa)+-parseInt(_0x1d83d0(0xa8))/0xb+parseInt(_0x1d83d0(0xa4))/0xc;if(_0x24a262===_0x56c83f)break;else _0x8b839b['push'](_0x8b839b['shift']());}catch(_0x283f6f){_0x8b839b['push'](_0x8b839b['shift']());}}}(a16_0xe45a,0x37d48));function a16_0x1a1a(_0x18b4cd,_0x59d461){_0x18b4cd=_0x18b4cd-0xa2;var _0xe45ad5=a16_0xe45a();var _0x1a1a88=_0xe45ad5[_0x18b4cd];return _0x1a1a88;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function logout(){var _0xc6ab4f=a16_0x1a1a;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log']('✓\x20Logged\x20out')):console[_0xc6ab4f(0xa6)](_0xc6ab4f(0xa9));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a17_0x44b179=a17_0x1aeb;function a17_0xaf2c(){const _0x455fe5=['9033680JGUDPw','3hwKooR','988574SkviHG','boolean','414116knbipI','414454UxtHpP','5qPPqIT','10762566Wkbcvw','8907288jKAXUw','605817LdXMpj','7fgNniP'];a17_0xaf2c=function(){return _0x455fe5;};return a17_0xaf2c();}function a17_0x1aeb(_0xdd36ef,_0x1a06b4){_0xdd36ef=_0xdd36ef-0xac;const _0xaf2cbe=a17_0xaf2c();let _0x1aebbc=_0xaf2cbe[_0xdd36ef];return _0x1aebbc;}(function(_0x795b4b,_0x49c02b){const _0x4e3fc8=a17_0x1aeb,_0x5b6037=_0x795b4b();while(!![]){try{const _0x2f28a0=-parseInt(_0x4e3fc8(0xb4))/0x1+parseInt(_0x4e3fc8(0xac))/0x2*(parseInt(_0x4e3fc8(0xb3))/0x3)+parseInt(_0x4e3fc8(0xb6))/0x4+-parseInt(_0x4e3fc8(0xad))/0x5*(-parseInt(_0x4e3fc8(0xae))/0x6)+-parseInt(_0x4e3fc8(0xb1))/0x7*(parseInt(_0x4e3fc8(0xaf))/0x8)+parseInt(_0x4e3fc8(0xb0))/0x9+parseInt(_0x4e3fc8(0xb2))/0xa;if(_0x2f28a0===_0x49c02b)break;else _0x5b6037['push'](_0x5b6037['shift']());}catch(_0x14900c){_0x5b6037['push'](_0x5b6037['shift']());}}}(a17_0xaf2c,0xed99d));export const dynamicCliFlags={'enableBffSave':{'type':a17_0x44b179(0xb5)}};
|