@lovrabet/rabetbase-cli 2.5.11 → 2.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.d.ts +1 -0
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.d.ts +2 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.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
|
-
|
|
1
|
+
const a0_0x5a3c6a=a0_0x143b;(function(_0x984375,_0x5ded09){const _0x4ca00b=a0_0x143b,_0x3c2301=_0x984375();while(!![]){try{const _0x98e9f9=-parseInt(_0x4ca00b(0x138))/0x1+parseInt(_0x4ca00b(0x12c))/0x2+parseInt(_0x4ca00b(0x140))/0x3+parseInt(_0x4ca00b(0x132))/0x4*(parseInt(_0x4ca00b(0x13c))/0x5)+-parseInt(_0x4ca00b(0x136))/0x6+-parseInt(_0x4ca00b(0x13d))/0x7*(parseInt(_0x4ca00b(0x13e))/0x8)+parseInt(_0x4ca00b(0x13f))/0x9;if(_0x98e9f9===_0x5ded09)break;else _0x3c2301['push'](_0x3c2301['shift']());}catch(_0x4e9456){_0x3c2301['push'](_0x3c2301['shift']());}}}(a0_0x2dcf,0xc1c5c));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x20448b from'node:path';import{fetchDatasetDoc}from'../core/api-client.js';function a0_0x143b(_0x253779,_0x14b277){_0x253779=_0x253779-0x126;const _0x2dcf08=a0_0x2dcf();let _0x143baa=_0x2dcf08[_0x253779];return _0x143baa;}import{logger}from'../utils/logger.js';export{fetchDatasetDoc}from'../core/api-client.js';function delay(_0x3a7a55){return new Promise(_0x15b001=>setTimeout(_0x15b001,_0x3a7a55));}export async function generateDatasetDocs(_0x5a120d,_0x1ebeaa,_0xb0e21e,_0x5c7690=a0_0x5a3c6a(0x130),_0x344e32,_0x281484){const _0x2344ae=a0_0x5a3c6a;mkdirSync(_0x5c7690,{'recursive':!![]});const _0x3a7172=[],_0x521db2=_0x5a120d[_0x2344ae(0x13b)];console[_0x2344ae(0x128)]('\x0a'+_0x521db2+_0x2344ae(0x126));for(let _0x50b394=0x0;_0x50b394<_0x5a120d['length'];_0x50b394++){const _0x24014d=_0x5a120d[_0x50b394],_0x355c25=_0x50b394+0x1,_0x525d90=_0x24014d[_0x2344ae(0x133)];try{console[_0x2344ae(0x128)]('['+_0x355c25+'/'+_0x521db2+_0x2344ae(0x134)+_0x525d90+_0x2344ae(0x12d)+_0x24014d[_0x2344ae(0x131)]+')');if(_0x344e32)_0x344e32(_0x355c25,_0x521db2,_0x525d90);const _0x2cfaaa=await fetchDatasetDoc({'appCode':_0x1ebeaa,'cookie':_0xb0e21e,'datasetCode':_0x24014d[_0x2344ae(0x12e)],'datasetId':_0x24014d['id'],'enableAI':![],'extraParams':_0x281484}),_0x52131b=a0_0x20448b[_0x2344ae(0x129)](_0x5c7690,_0x525d90+_0x2344ae(0x137));writeFileSync(_0x52131b,_0x2cfaaa,{'encoding':'utf8'}),console[_0x2344ae(0x128)](_0x2344ae(0x139)+_0x525d90+_0x2344ae(0x137)),logger[_0x2344ae(0x135)](_0x2344ae(0x12a),'Generated\x20docs\x20successfully:\x20'+_0x525d90,undefined,{'datasetCode':_0x24014d[_0x2344ae(0x12e)],'datasetName':_0x24014d[_0x2344ae(0x131)],'filePath':_0x52131b,'progress':_0x355c25+'/'+_0x521db2}),_0x3a7172[_0x2344ae(0x12b)]({'datasetCode':_0x24014d[_0x2344ae(0x12e)],'datasetName':_0x24014d[_0x2344ae(0x131)],'filePath':_0x52131b,'success':!![]});if(_0x355c25<_0x521db2)await delay(0x1388);}catch(_0x33e672){const _0x5558ee=_0x33e672 instanceof Error?_0x33e672[_0x2344ae(0x127)]:String(_0x33e672);console[_0x2344ae(0x128)](_0x2344ae(0x12f)+_0x525d90+_0x2344ae(0x13a)+_0x5558ee),logger['error'](_0x2344ae(0x12a),'Failed\x20to\x20generate\x20docs:\x20'+_0x24014d['datasetCode'],{'datasetCode':_0x24014d[_0x2344ae(0x12e)],'datasetName':_0x24014d[_0x2344ae(0x131)],'error':_0x5558ee,'progress':_0x355c25+'/'+_0x521db2}),_0x3a7172[_0x2344ae(0x12b)]({'datasetCode':_0x24014d['datasetCode'],'datasetName':_0x24014d[_0x2344ae(0x131)],'filePath':'','success':![],'error':_0x5558ee}),_0x355c25<_0x521db2&&(console['log']('Waiting\x203\x20seconds...\x0a'),await delay(0xbb8));}}return _0x3a7172;}function a0_0x2dcf(){const _0x4bccc3=['45fPeeLq','3827103DUFgjm','8geIwpb','8951040NciNfK','1608717oqowLy','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','message','log','join','api-doc','push','2845456uGegiO','.md\x20(','datasetCode','✗\x20Failed:\x20','./docs','name','107336uSriZG','tableName',']\x20Generating:\x20','success','9428784pqvkpn','.md','283148SQZIcS','✓\x20Generated:\x20','.md\x20-\x20','length'];a0_0x2dcf=function(){return _0x4bccc3;};return a0_0x2dcf();}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x28623f=a1_0x3a33;(function(_0x15885b,_0x431283){const _0x5cca4f=a1_0x3a33,_0x23cd34=_0x15885b();while(!![]){try{const _0x405774=parseInt(_0x5cca4f(0x16b))/0x1*(parseInt(_0x5cca4f(0x17c))/0x2)+parseInt(_0x5cca4f(0x17b))/0x3+-parseInt(_0x5cca4f(0x15d))/0x4*(-parseInt(_0x5cca4f(0x168))/0x5)+-parseInt(_0x5cca4f(0x169))/0x6+parseInt(_0x5cca4f(0x15f))/0x7*(parseInt(_0x5cca4f(0x165))/0x8)+parseInt(_0x5cca4f(0x176))/0x9+parseInt(_0x5cca4f(0x164))/0xa*(-parseInt(_0x5cca4f(0x163))/0xb);if(_0x405774===_0x431283)break;else _0x23cd34['push'](_0x23cd34['shift']());}catch(_0x555236){_0x23cd34['push'](_0x23cd34['shift']());}}}(a1_0x5bc8,0xe3e04));import a1_0x3437de from'node:path';import{CliErrors}from'../errors.js';export function normalizeApiDir(_0x2563b8,_0x2211db=process[a1_0x28623f(0x16c)]()){const _0x589fc8=a1_0x28623f;return a1_0x3437de[_0x589fc8(0x15e)](_0x2211db,_0x2563b8);}function a1_0x3a33(_0x530bf1,_0x306978){_0x530bf1=_0x530bf1-0x15c;const _0x5bc89c=a1_0x5bc8();let _0x3a33d1=_0x5bc89c[_0x530bf1];return _0x3a33d1;}function normalizedApiGroup(_0x4301ec){const _0x1771a6=a1_0x28623f,_0x5a5203=_0x4301ec?.[_0x1771a6(0x178)]();return _0x5a5203||undefined;}function a1_0x5bc8(){const _0x2e1dbc=['apiGroup','some','13174659cSflzI','size','trim','push','normalizedApiDir','4033656CfdLfE','15154IXRzLm','get','map','106396BsMUkZ','resolve','5063303hVWTju','API\x20group\x20\x22','flatMap','set','26642fKlzxa','18370RSbkKD','16FfCjqC','join','outputDir','305ZFAKFW','3651966IGGDhZ','add','15ssnyqa','cwd','validation','\x22\x20resolves\x20to\x20multiple\x20API\x20directories.','Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','API\x20directory\x20\x22','Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20','name'];a1_0x5bc8=function(){return _0x2e1dbc;};return a1_0x5bc8();}export function resolveApiProfileLayouts(_0x4f0ef4,_0xa5d174,_0x22d203=process['cwd']()){const _0xddfc71=a1_0x28623f,_0x45e213=_0x4f0ef4[_0xddfc71(0x15c)](_0x5e739b=>{const _0x45d206=_0xddfc71,_0x12faa8=_0xa5d174(_0x5e739b);return{'app':_0x5e739b,'outputDir':_0x12faa8,'normalizedApiDir':normalizeApiDir(_0x12faa8,_0x22d203),'apiGroup':normalizedApiGroup(_0x5e739b[_0x45d206(0x174)])};}),_0x2eb389=new Map();for(const _0x3ae7d6 of _0x45e213){if(!_0x3ae7d6[_0xddfc71(0x174)])continue;const _0x5efd2d=_0x2eb389['get'](_0x3ae7d6[_0xddfc71(0x174)])??new Set();_0x5efd2d[_0xddfc71(0x16a)](_0x3ae7d6[_0xddfc71(0x17a)]),_0x2eb389[_0xddfc71(0x162)](_0x3ae7d6['apiGroup'],_0x5efd2d);}for(const [_0x32a4c9,_0x3fdf48]of _0x2eb389){if(_0x3fdf48[_0xddfc71(0x177)]>0x1)throw CliErrors['validation'](_0xddfc71(0x160)+_0x32a4c9+_0xddfc71(0x16e),_0xddfc71(0x16f));}const _0xb90717=new Map();for(const _0x2ac9de of _0x45e213){const _0x273d80=_0xb90717[_0xddfc71(0x17d)](_0x2ac9de[_0xddfc71(0x17a)])??[];_0x273d80[_0xddfc71(0x179)](_0x2ac9de),_0xb90717['set'](_0x2ac9de[_0xddfc71(0x17a)],_0x273d80);}for(const _0x9764be of _0xb90717['values']()){const _0x49f8ac=new Set(_0x9764be[_0xddfc71(0x161)](_0x49ea88=>_0x49ea88['apiGroup']?[_0x49ea88[_0xddfc71(0x174)]]:[]));if(_0x49f8ac['size']===0x0)continue;if(_0x49f8ac[_0xddfc71(0x177)]>0x1||_0x9764be[_0xddfc71(0x175)](_0x297251=>!_0x297251['apiGroup'])){const _0x237637=_0x9764be[_0xddfc71(0x15c)](_0x1367c4=>_0x1367c4['app'][_0xddfc71(0x173)])[_0xddfc71(0x166)](',\x20');throw CliErrors[_0xddfc71(0x16d)](_0xddfc71(0x171)+_0x9764be[0x0][_0xddfc71(0x167)]+_0xddfc71(0x170),_0xddfc71(0x172)+_0x237637+'.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.');}}return _0x45e213;}export function getRegistryGroup(_0xeee201,_0x3f09b7){const _0x15a433=a1_0x28623f;if(_0x3f09b7[_0x15a433(0x174)])return _0xeee201['filter'](_0x51b60c=>_0x51b60c[_0x15a433(0x174)]===_0x3f09b7['apiGroup']);const _0x1565e5=_0xeee201['filter'](_0x12c1ec=>_0x12c1ec[_0x15a433(0x17a)]===_0x3f09b7['normalizedApiDir']);return _0x1565e5['length']===0x1?_0x1565e5:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a2_0x1433(_0x32e9d5,_0x24e7e9){_0x32e9d5=_0x32e9d5-0x1e6;var _0x3cd63f=a2_0x3cd6();var _0x14331a=_0x3cd63f[_0x32e9d5];return _0x14331a;}(function(_0x1c886e,_0x447bc4){var _0x357dc2=a2_0x1433,_0x4dcd0c=_0x1c886e();while(!![]){try{var _0x3f027b=-parseInt(_0x357dc2(0x1eb))/0x1*(-parseInt(_0x357dc2(0x1ec))/0x2)+parseInt(_0x357dc2(0x1e6))/0x3*(-parseInt(_0x357dc2(0x1ef))/0x4)+parseInt(_0x357dc2(0x1ee))/0x5*(-parseInt(_0x357dc2(0x1e8))/0x6)+-parseInt(_0x357dc2(0x1ed))/0x7*(parseInt(_0x357dc2(0x1f0))/0x8)+-parseInt(_0x357dc2(0x1e7))/0x9+parseInt(_0x357dc2(0x1ea))/0xa+-parseInt(_0x357dc2(0x1e9))/0xb*(-parseInt(_0x357dc2(0x1f1))/0xc);if(_0x3f027b===_0x447bc4)break;else _0x4dcd0c['push'](_0x4dcd0c['shift']());}catch(_0x16a506){_0x4dcd0c['push'](_0x4dcd0c['shift']());}}}(a2_0x3cd6,0x23930));function a2_0x3cd6(){var _0x3dc66b=['34AztmKB','2898CKBWlw','7FWFQVh','5aJzXPj','1556MDPIXe','2200024JqDVoS','799152blGKjq','573zeNQAK','1501902EnVFbD','1162662JDqVby','88ejEben','2736350eIbfjc'];a2_0x3cd6=function(){return _0x3dc66b;};return a2_0x3cd6();}export{fetchModelList}from'../core/api-client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x30081a,_0x30715b){const _0x32d512=a3_0x1b64,_0x194fca=_0x30081a();while(!![]){try{const _0x18ce31=-parseInt(_0x32d512(0x17a))/0x1+-parseInt(_0x32d512(0x182))/0x2*(parseInt(_0x32d512(0x18e))/0x3)+parseInt(_0x32d512(0x171))/0x4+-parseInt(_0x32d512(0x186))/0x5+-parseInt(_0x32d512(0x19a))/0x6*(parseInt(_0x32d512(0x187))/0x7)+-parseInt(_0x32d512(0x1a5))/0x8*(-parseInt(_0x32d512(0x17d))/0x9)+parseInt(_0x32d512(0x197))/0xa*(parseInt(_0x32d512(0x17c))/0xb);if(_0x18ce31===_0x30715b)break;else _0x194fca['push'](_0x194fca['shift']());}catch(_0x4f817b){_0x194fca['push'](_0x194fca['shift']());}}}(a3_0x2c98,0x53266));import a3_0x7f910b from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x196442 from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';import{generateSdkConfigFile}from'../api/generate-sdk-config-file.js';function a3_0x2c98(){const _0x18a62f=['119rVkPtK','typescript','LOVRABET_RUNTIME_DOMAIN','includes','none','modelProfile','map','363xOJXis','.ts','key','default','path','refreshed','-client','missing','api.ts.tpl','6740driOqv','replace','format','204810wqNtFB','resolve','created','alias','datasetCode','name','LOVRABET','client','api','\x20config\x20set\x20app\x20<value>`','overwritten','16NJPNDa','action','success','CONFIG_NAMES.DEFAULT','-api','allowEmptyModelReplacement','1628664YeFvAJ','stringify','utf8',',\x20...LOVRABET_SDK_CONFIG\x20}','length','join','../..','preserved','replaceApiContent','415045bUVLRn',',\x20env:\x20','28083flVpdx','289134bfiTSx','templates/generate-api','init-api','toUpperCase','defaultName','9972MXbqhX','test','basename','API\x20scaffold\x20written.','1264560zDGnTn'];a3_0x2c98=function(){return _0x18a62f;};return a3_0x2c98();}function a3_0x1b64(_0x1aa8e3,_0xcf07a2){_0x1aa8e3=_0x1aa8e3-0x171;const _0x2c98cd=a3_0x2c98();let _0x1b643a=_0x2c98cd[_0x1aa8e3];return _0x1b643a;}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(_0x1df2c6,_0x456f0d){const _0xac74cf=a3_0x1b64;if(!_0x456f0d)return _0x1df2c6?'preserved':'missing';return _0x1df2c6?_0xac74cf(0x1a4):_0xac74cf(0x19c);}export async function generateApiFile(_0x440db5,_0x3dbbf8,_0x2be3fe,_0x77f799,_0x3e876f,_0x4590f1,_0xe31d15,_0x1af06f={},_0x1006ad={}){const _0x239dcb=a3_0x1b64;if(!_0x2be3fe)throw new Error('Please\x20configure\x20app\x20code\x20first\x20via\x20`'+CLI_BIN_NAME+_0x239dcb(0x1a3));const _0xe78a10=_0x77f799&&!_0xe31d15,_0x38da6c=!!_0x1006ad['modelProfile'],_0x532a2=_0x38da6c||_0xe78a10,_0x3cf8f1=_0xe31d15||_0x2be3fe,_0x4bd5ff=_0x38da6c||_0xe78a10?_0x239dcb(0x191):_0x3cf8f1,_0x1a692c=_0x38da6c||_0xe78a10?_0x239dcb(0x1a8):JSON[_0x239dcb(0x172)](_0x3cf8f1),_0x47ce45=!isProduction(_0x3e876f),_0x11387d=_0x47ce45?_0x239dcb(0x17b)+JSON[_0x239dcb(0x172)](_0x3e876f):'',_0x23eaf8='{\x20apiConfigName:\x20'+_0x1a692c+_0x11387d+_0x239dcb(0x174),_0x136444=_0x38da6c?'':_0x3dbbf8,_0x1e7d3a=_0x136444?_0x136444+_0x239dcb(0x1a9):_0x239dcb(0x1a2),_0x29c6f8=_0x136444?_0x136444+_0x239dcb(0x194):_0x239dcb(0x1a1),_0x5d0d8a=_0x136444&&!/^app-[a-f0-9]+$/i[_0x239dcb(0x183)](_0x136444)?_0x136444[_0x239dcb(0x198)](/-/g,'_')[_0x239dcb(0x180)]():_0x239dcb(0x1a0),_0x3f752d=/^\d/[_0x239dcb(0x183)](_0x5d0d8a)?'APP_'+_0x5d0d8a:_0x5d0d8a,_0x55ff06=_0x440db5[_0x239dcb(0x18d)](_0x47ffa1=>({'datasetCode':_0x47ffa1[_0x239dcb(0x19e)],'tableName':_0x47ffa1['tableName'],'name':_0x47ffa1[_0x239dcb(0x19f)]||'','alias':_0x47ffa1[_0x239dcb(0x19d)]||_0x47ffa1[_0x239dcb(0x190)]})),_0x280e12=fileURLToPath(import.meta.url),_0x474cdd=a3_0x196442[_0x239dcb(0x19b)](a3_0x196442['dirname'](_0x280e12),_0x239dcb(0x177)),_0x4bdb41=a3_0x196442[_0x239dcb(0x176)](_0x474cdd,_0x239dcb(0x17e)),_0x20bcc7=a3_0x196442[_0x239dcb(0x176)](_0x4bdb41,_0x239dcb(0x196)),_0x14a70d=a3_0x196442[_0x239dcb(0x176)](_0x4bdb41,'client.ts.tpl'),_0x3fcbf4=_0x4590f1;mkdirSync(_0x3fcbf4,{'recursive':!![]});const _0x29d17b=_0x38da6c?{}:_0x1af06f,_0x47633a=await generateSdkConfigFile(_0x3fcbf4,_0x29d17b,_0x136444),_0x34251f=a3_0x196442[_0x239dcb(0x184)](_0x47633a,_0x239dcb(0x18f)),_0x407702=a3_0x196442[_0x239dcb(0x176)](_0x3fcbf4,_0x1e7d3a+_0x239dcb(0x18f)),_0x3825ee=a3_0x196442['join'](_0x3fcbf4,_0x29c6f8+_0x239dcb(0x18f)),_0x149865=_0x1006ad['overwriteTypescript']===!![],_0x279496=existsSync(_0x407702),_0x3667aa=existsSync(_0x3825ee),_0x5d04a0=_0x1006ad['scaffoldMode']??(_0x149865?_0x239dcb(0x198):_0x239dcb(0x195)),_0x2962c7=_0x5d04a0==='replace'||_0x5d04a0===_0x239dcb(0x195)&&!_0x279496,_0x2ed6bc=_0x5d04a0==='replace'||_0x5d04a0===_0x239dcb(0x195)&&!_0x3667aa,_0x2423cb=_0x1006ad['modelProfile']?updateModelRegistry({'outputDir':_0x3fcbf4,'profileName':_0x1006ad[_0x239dcb(0x18c)][_0x239dcb(0x19f)],'defaultProfile':_0x1006ad[_0x239dcb(0x18c)][_0x239dcb(0x181)],'appCode':_0x2be3fe,'runtimeDomain':_0x1006ad[_0x239dcb(0x18c)]['runtimeDomain'],'models':_0x55ff06,'allowEmptyReplacement':_0x1006ad[_0x239dcb(0x1aa)]===!![]}):undefined,_0x5f304b=_0x2423cb?a3_0x196442[_0x239dcb(0x176)](_0x3fcbf4,MODEL_RUNTIME_FILE_NAME):undefined,_0x430206=_0x5f304b?existsSync(_0x5f304b):![],_0x59d833=_0x38da6c&&_0x5d04a0!==_0x239dcb(0x18b)?await renderModelRegistryScaffold(_0x3fcbf4):undefined;_0x5f304b&&_0x59d833&&writeFileSync(_0x5f304b,_0x59d833['modelRuntime'],_0x239dcb(0x173));const _0x4401b9=_0x55ff06[0x0]?.['alias'];if(_0x2962c7){const _0x596ed8=_0x59d833?.[_0x239dcb(0x1a2)]??readFileSync(_0x20bcc7,_0x239dcb(0x173)),_0x1cf8e7=_0x38da6c?_0x596ed8:TemplateReplacer[_0x239dcb(0x179)](_0x596ed8,_0x2be3fe,_0x55ff06,_0x4401b9,_0x1e7d3a,_0x1a692c,undefined,_0x3f752d);writeFileSync(_0x407702,await a3_0x7f910b[_0x239dcb(0x199)](_0x1cf8e7,{'parser':_0x239dcb(0x188)}),{'encoding':'utf8'});}if(_0x2ed6bc){const _0x1d7c5a=_0x59d833?.[_0x239dcb(0x1a1)]??readFileSync(_0x14a70d,_0x239dcb(0x173)),_0x5dd70c=_0x38da6c?_0x1d7c5a:TemplateReplacer[_0x239dcb(0x179)](_0x1d7c5a,_0x2be3fe,_0x55ff06,_0x4401b9,_0x1e7d3a,_0x1a692c,_0x23eaf8,_0x3f752d,_0x34251f);writeFileSync(_0x3825ee,await a3_0x7f910b[_0x239dcb(0x199)](_0x5dd70c,{'parser':'typescript'}),{'encoding':_0x239dcb(0x173)});}const _0x5196fe=_0x55ff06[_0x239dcb(0x175)],_0x57cde6={'api':{'path':_0x407702,'action':fileAction(_0x279496,_0x2962c7)},'client':{'path':_0x3825ee,'action':fileAction(_0x3667aa,_0x2ed6bc)},'sdkConfig':{'path':_0x47633a,'action':_0x239dcb(0x193)},..._0x2423cb?{'modelRegistry':{'path':_0x2423cb[_0x239dcb(0x192)],'action':_0x2423cb['existed']?_0x239dcb(0x193):_0x239dcb(0x19c)},'modelRuntime':{'path':_0x5f304b,'action':_0x59d833?_0x430206?_0x239dcb(0x193):_0x239dcb(0x19c):_0x430206?_0x239dcb(0x178):'missing'}}:{}},_0x2da770=existsSync(_0x407702)&&readFileSync(_0x407702,_0x239dcb(0x173))[_0x239dcb(0x18a)](MODEL_REGISTRY_FILE_NAME[_0x239dcb(0x198)](_0x239dcb(0x18f),'')),_0x58ab51=existsSync(_0x3825ee)&&readFileSync(_0x3825ee,'utf8')['includes'](_0x239dcb(0x189)),_0x223ef0=_0x38da6c?!_0x2da770||!_0x58ab51||!existsSync(_0x5f304b):![],_0x1fa70d=_0x38da6c?_0x223ef0:_0x57cde6[_0x239dcb(0x1a2)][_0x239dcb(0x1a6)]===_0x239dcb(0x178)||_0x57cde6[_0x239dcb(0x1a1)]['action']===_0x239dcb(0x178);return logger[_0x239dcb(0x1a7)](_0x239dcb(0x17f),_0x1fa70d?a3_0x196442[_0x239dcb(0x184)](_0x47633a)+'\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.':_0x38da6c?'Model\x20facts\x20refreshed.':_0x239dcb(0x185),undefined,{'apiFile':_0x407702,'clientFile':_0x3825ee,'sdkConfig':_0x47633a,'modelCount':_0x5196fe,'configName':_0x4bd5ff,'isDefaultConfig':_0x532a2,'needsAgentMerge':_0x1fa70d,'needsProjectUpgrade':_0x223ef0,'files':_0x57cde6}),{'appCode':_0x2be3fe,'modelCount':_0x5196fe,'models':_0x55ff06,'apiFilePath':_0x407702,'clientFilePath':_0x3825ee,'sdkConfigPath':_0x47633a,'modelRegistryPath':_0x2423cb?.[_0x239dcb(0x192)],'modelRuntimePath':_0x5f304b,'modelProfile':_0x1006ad[_0x239dcb(0x18c)]?.[_0x239dcb(0x19f)],'configName':_0x4bd5ff,'isDefaultConfig':_0x532a2,'sdkRouting':_0x29d17b,'files':_0x57cde6,'needsAgentMerge':_0x1fa70d,'needsProjectUpgrade':_0x223ef0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x101644=a4_0x35f5;function a4_0x35f5(_0x4a9da0,_0x36803){_0x4a9da0=_0x4a9da0-0x108;const _0x48eb9f=a4_0x48eb();let _0x35f527=_0x48eb9f[_0x4a9da0];return _0x35f527;}(function(_0x1baf9d,_0x25afa2){const _0x124d45=a4_0x35f5,_0x441b7b=_0x1baf9d();while(!![]){try{const _0x522a0e=-parseInt(_0x124d45(0x112))/0x1+-parseInt(_0x124d45(0x113))/0x2+-parseInt(_0x124d45(0x111))/0x3+-parseInt(_0x124d45(0x11d))/0x4*(parseInt(_0x124d45(0x10d))/0x5)+-parseInt(_0x124d45(0x118))/0x6*(-parseInt(_0x124d45(0x115))/0x7)+parseInt(_0x124d45(0x11b))/0x8+parseInt(_0x124d45(0x10e))/0x9;if(_0x522a0e===_0x25afa2)break;else _0x441b7b['push'](_0x441b7b['shift']());}catch(_0x36fc29){_0x441b7b['push'](_0x441b7b['shift']());}}}(a4_0x48eb,0x92470));import{mkdirSync,writeFileSync}from'node:fs';import a4_0x3ee6f4 from'node:path';import a4_0xd9aaf from'prettier';export const SDK_CONFIG_FILE_NAME=a4_0x101644(0x114);export function getSdkConfigFileName(_0x209dee=''){return _0x209dee?_0x209dee+'-sdk-config.ts':SDK_CONFIG_FILE_NAME;}function a4_0x48eb(){const _0x462092=['6299744thxeZV','push','76wbUfeX','typescript','format','stringify','join','/**\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','199795bHEyYu','22201722tMGLkS','\x20as\x20const;\x0a','runtimeDomain','3093840tFxIxF','693512pYXpde','2025940eZfniI','sdk-config.ts','1964221FxpQOx',',\x0a}','utf8','18yULEnf','{\x0a\x20\x20','length'];a4_0x48eb=function(){return _0x462092;};return a4_0x48eb();}export async function generateSdkConfigFile(_0x5ae630,_0x447ce7={},_0x5d97f6=''){const _0xb4202a=a4_0x101644,_0x49f5be=[];_0x447ce7[_0xb4202a(0x110)]&&_0x49f5be[_0xb4202a(0x11c)]('runtimeDomain:\x20'+JSON[_0xb4202a(0x10a)](_0x447ce7[_0xb4202a(0x110)]));const _0x33f3ea=_0x49f5be[_0xb4202a(0x11a)]>0x0?_0xb4202a(0x119)+_0x49f5be[_0xb4202a(0x10b)](',\x0a\x20\x20')+_0xb4202a(0x116):'{}',_0x39ac7d=_0xb4202a(0x10c)+_0x33f3ea+_0xb4202a(0x10f);mkdirSync(_0x5ae630,{'recursive':!![]});const _0x361ed3=a4_0x3ee6f4['join'](_0x5ae630,getSdkConfigFileName(_0x5d97f6));return writeFileSync(_0x361ed3,await a4_0xd9aaf[_0xb4202a(0x109)](_0x39ac7d,{'parser':_0xb4202a(0x108)}),_0xb4202a(0x117)),_0x361ed3;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x42c64f,_0x42eaf3){const _0x1231f7=a5_0x8f73,_0x565d8c=_0x42c64f();while(!![]){try{const _0xd43abc=-parseInt(_0x1231f7(0x10d))/0x1*(parseInt(_0x1231f7(0x10b))/0x2)+-parseInt(_0x1231f7(0x117))/0x3*(-parseInt(_0x1231f7(0x10f))/0x4)+-parseInt(_0x1231f7(0x115))/0x5*(-parseInt(_0x1231f7(0x113))/0x6)+-parseInt(_0x1231f7(0x104))/0x7+-parseInt(_0x1231f7(0x10a))/0x8+-parseInt(_0x1231f7(0x101))/0x9*(-parseInt(_0x1231f7(0x107))/0xa)+parseInt(_0x1231f7(0xff))/0xb;if(_0xd43abc===_0x42eaf3)break;else _0x565d8c['push'](_0x565d8c['shift']());}catch(_0xe6b1b6){_0x565d8c['push'](_0x565d8c['shift']());}}}(a5_0x4af0,0xaef2c));export function parseLegacyApiModels(_0x3d99ec){const _0x95e652=a5_0x8f73,_0x47a207=[],_0x1432b4=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x161a9f;while((_0x161a9f=_0x1432b4[_0x95e652(0x106)](_0x3d99ec))!==null){_0x47a207[_0x95e652(0x103)]({'datasetCode':_0x161a9f[0x1],'tableName':_0x161a9f[0x2],'name':_0x161a9f[0x3],'alias':_0x161a9f[0x4]});}return _0x47a207;}function a5_0x8f73(_0x5597e7,_0x17fba2){_0x5597e7=_0x5597e7-0xfd;const _0x4af04d=a5_0x4af0();let _0x8f7346=_0x4af04d[_0x5597e7];return _0x8f7346;}export function parseLegacyApiAppCode(_0x3501eb){const _0x3fb419=a5_0x8f73;return _0x3501eb[_0x3fb419(0x110)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function stripComments(_0x2d0972){const _0x1e4da7=a5_0x8f73;return _0x2d0972[_0x1e4da7(0x100)](/\/\*[\s\S]*?\*\//g,'')[_0x1e4da7(0x100)](/\/\/.*$/gm,'');}export function isLegacyGeneratedApiScaffold(_0x1753d2){const _0x3b2732=a5_0x8f73;if(!_0x1753d2[_0x3b2732(0x10c)]('Generated\x20by\x20Rabetbase\x20CLI'))return![];const _0x144515=stripComments(_0x1753d2),_0x516a1e=[..._0x144515[_0x3b2732(0xfd)](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)][_0x3b2732(0x112)](_0x5b880b=>_0x5b880b[0x1]);if(_0x516a1e['length']!==0x1||_0x516a1e[0x0]!=='@lovrabet/sdk')return![];const _0x527d90=[..._0x144515[_0x3b2732(0xfd)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)]['map'](_0x1c4dc3=>_0x1c4dc3[0x1]);if(_0x527d90[_0x3b2732(0x116)]!==0x2||!_0x527d90[_0x3b2732(0x109)](_0x1ece23=>_0x1ece23[_0x3b2732(0x111)](_0x3b2732(0x10e)))||!_0x527d90[_0x3b2732(0x109)](_0x43ab2b=>_0x43ab2b['endsWith'](_0x3b2732(0x102))))return![];const _0x1ec119=[..._0x144515[_0x3b2732(0xfd)](/^([A-Za-z_$][\w$]*)\s*\(/gm)][_0x3b2732(0x112)](_0x5a20b3=>_0x5a20b3[0x1]);return _0x1ec119[_0x3b2732(0x116)]===0x1&&_0x1ec119[0x0]===_0x3b2732(0x105);}export function isLegacyGeneratedClientScaffold(_0x98ac74){const _0x56ce86=a5_0x8f73;if(!_0x98ac74[_0x56ce86(0x10c)](_0x56ce86(0xfe)))return![];const _0x5074b7=stripComments(_0x98ac74),_0x2b4453=[..._0x5074b7[_0x56ce86(0xfd)](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)][_0x56ce86(0x112)](_0x3b2c2e=>_0x3b2c2e[0x1]);if(_0x2b4453[_0x56ce86(0x109)](_0x4e69e1=>_0x4e69e1!==_0x56ce86(0x108)&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/['test'](_0x4e69e1??'')))return![];const _0xbf7df6=[..._0x5074b7[_0x56ce86(0xfd)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x56ce86(0x112)](_0x530327=>_0x530327[0x1]);return _0xbf7df6[_0x56ce86(0x116)]===0x1&&_0xbf7df6[0x0]===_0x56ce86(0x114);}function a5_0x4af0(){const _0x562d95=['5icBUUF','length','745251arHHhd','matchAll','Generated\x20by\x20Rabetbase\x20CLI','17765143TiwbNV','replace','18KsdSPh','MODELS_CONFIG','push','8643964jGeKuQ','registerModels','exec','415010EnipzD','@lovrabet/sdk','some','5306480LwePmr','104234PMXEUd','includes','8FvXsXF','APP_CODE','8tlejtn','match','endsWith','map','5021022Pvefqt','lovrabetClient'];a5_0x4af0=function(){return _0x562d95;};return a5_0x4af0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x582b9d=a6_0x5bfd;function a6_0x2ffb(){const _0x4ce8c8=['name','NOT-SET','filter','1900212VWvabB','isArray','3912795bowzeR','find','includes','200112bqsrEV','utf8','profileName','slice','now','length','object','models','datasetCodes','value','string','appCode','152645OYwvHk','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','test','set','map','\x22\x20maps\x20to\x20table\x20\x22','7363070SPJfCm','join','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','trim','keys','4253403cCYoqy','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','datasetCode','\x22\x20maps\x20to\x20alias\x20\x22','29453nmOwio','alias','parse','tableName','stringify','.tmp','indexOf','every','/*\x20rabetbase-model-registry:end\x20*/','profiles','fromEntries','allowEmptyReplacement','model-runtime.ts','Table\x20\x22','8OzvlPz','/*\x20rabetbase-model-registry:v2\x20*/','\x22\x20in\x20the\x20registry\x20but\x20\x22','\x20model(s)\x20in\x20profile\x20\x22','get','replace','defaultProfile','66spGgZb','lovrabet-model-registry/v2','\x22\x20with\x20an\x20empty\x20result.\x20','runtimeDomain','74yARdQb','outputDir','split','\x22\x20in\x20profile\x20\x22','/*\x20rabetbase-model-registry:start\x20*/','Model\x20alias\x20\x22','flatMap','key','protocol','Refusing\x20to\x20replace\x20'];a6_0x2ffb=function(){return _0x4ce8c8;};return a6_0x2ffb();}(function(_0x1e5657,_0x58e00a){const _0x5dc69d=a6_0x5bfd,_0x2542c1=_0x1e5657();while(!![]){try{const _0x2d92d6=parseInt(_0x5dc69d(0xbf))/0x1*(parseInt(_0x5dc69d(0x92))/0x2)+-parseInt(_0x5dc69d(0x8e))/0x3*(parseInt(_0x5dc69d(0xa4))/0x4)+parseInt(_0x5dc69d(0xb0))/0x5+-parseInt(_0x5dc69d(0x9f))/0x6+parseInt(_0x5dc69d(0xbb))/0x7+parseInt(_0x5dc69d(0x87))/0x8*(-parseInt(_0x5dc69d(0xa1))/0x9)+parseInt(_0x5dc69d(0xb6))/0xa;if(_0x2d92d6===_0x58e00a)break;else _0x2542c1['push'](_0x2542c1['shift']());}catch(_0x39b4f0){_0x2542c1['push'](_0x2542c1['shift']());}}}(a6_0x2ffb,0x95739));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x7c1b93 from'node:path';export const MODEL_REGISTRY_FILE_NAME='models.generated.ts';export const MODEL_RUNTIME_FILE_NAME=a6_0x582b9d(0x85);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x582b9d(0x88);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x582b9d(0x8f),REGISTRY_START=a6_0x582b9d(0x96),REGISTRY_END=a6_0x582b9d(0xc7);function emptyRegistry(_0x1feb7f){return{'defaultProfile':_0x1feb7f,'profiles':{},'models':[]};}function extractRegistryJson(_0x48ee6b){const _0x29b435=a6_0x582b9d,_0x44ca59=_0x48ee6b['indexOf'](REGISTRY_START),_0x322646=_0x48ee6b[_0x29b435(0xc5)](REGISTRY_END);if(_0x44ca59<0x0||_0x322646<=_0x44ca59)return undefined;return _0x48ee6b[_0x29b435(0xa7)](_0x44ca59+REGISTRY_START[_0x29b435(0xa9)],_0x322646)[_0x29b435(0xb9)]()[_0x29b435(0x8c)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x29b435(0x8c)](/;$/,'');}function migrateLegacyRegistry(_0x375fc0){const _0x31945f=a6_0x582b9d,_0x1acbb1=emptyRegistry(_0x375fc0[_0x31945f(0x8d)]);for(const [_0xfb69f7,_0x573ecd]of Object['entries'](_0x375fc0['profiles'])){_0x1acbb1['profiles'][_0xfb69f7]={'appCode':_0x573ecd['appCode'],'runtimeDomain':_0x573ecd[_0x31945f(0x91)]},mergeProfileModels(_0x1acbb1,_0xfb69f7,_0x573ecd[_0x31945f(0xab)]);}return _0x1acbb1;}function a6_0x5bfd(_0x335ce5,_0x16174b){_0x335ce5=_0x335ce5-0x82;const _0x2ffb75=a6_0x2ffb();let _0x5bfd80=_0x2ffb75[_0x335ce5];return _0x5bfd80;}function generatedObjectLiteralToJson(_0x4b528f){const _0xe967a8=a6_0x582b9d;let _0x426e4d='',_0x24a45e,_0x2b31cb=![],_0x58558c;for(let _0xf47ce3=0x0;_0xf47ce3<_0x4b528f[_0xe967a8(0xa9)];_0xf47ce3++){const _0x28f32f=_0x4b528f[_0xf47ce3];if(_0x24a45e){_0x426e4d+=_0x28f32f;if(_0x2b31cb)_0x2b31cb=![];else{if(_0x28f32f==='\x5c')_0x2b31cb=!![];else{if(_0x28f32f===_0x24a45e)_0x24a45e=undefined;}}continue;}if(_0x28f32f==='\x22'){_0x24a45e=_0x28f32f,_0x426e4d+=_0x28f32f,_0x58558c=_0xe967a8(0xad);continue;}if(_0x28f32f===','){let _0x475d05=_0xf47ce3+0x1;while(/\s/[_0xe967a8(0xb2)](_0x4b528f[_0x475d05]??''))_0x475d05++;if(_0x4b528f[_0x475d05]==='}'||_0x4b528f[_0x475d05]===']')continue;_0x426e4d+=_0x28f32f,_0x58558c=',';continue;}if(_0x28f32f==='{'||_0x28f32f==='['){_0x426e4d+=_0x28f32f,_0x58558c=_0x28f32f;continue;}if(_0x28f32f==='}'||_0x28f32f===']'){_0x426e4d+=_0x28f32f,_0x58558c=_0x28f32f;continue;}if((_0x58558c==='{'||_0x58558c===',')&&/[A-Za-z_$]/[_0xe967a8(0xb2)](_0x28f32f)){let _0x3bb3cc=_0xf47ce3+0x1;while(/[A-Za-z0-9_$]/['test'](_0x4b528f[_0x3bb3cc]??''))_0x3bb3cc++;let _0x1aecbe=_0x3bb3cc;while(/\s/[_0xe967a8(0xb2)](_0x4b528f[_0x1aecbe]??''))_0x1aecbe++;if(_0x4b528f[_0x1aecbe]===':'){_0x426e4d+=JSON['stringify'](_0x4b528f[_0xe967a8(0xa7)](_0xf47ce3,_0x3bb3cc)),_0xf47ce3=_0x3bb3cc-0x1,_0x58558c=_0xe967a8(0x99);continue;}}_0x426e4d+=_0x28f32f;if(!/\s/[_0xe967a8(0xb2)](_0x28f32f)&&_0x28f32f!==':')_0x58558c='value';}return _0x426e4d;}function parseGeneratedRegistryJson(_0x58cb0b){const _0x1ad763=a6_0x582b9d;try{return JSON[_0x1ad763(0xc1)](_0x58cb0b);}catch{return JSON[_0x1ad763(0xc1)](generatedObjectLiteralToJson(_0x58cb0b));}}function normalizeModelEntries(_0x5dc124,_0x2ec3a1){const _0x4d1090=a6_0x582b9d,_0x1f8b67=Object[_0x4d1090(0xba)](_0x5dc124),_0x44ce3e=[];for(const _0x2f72ef of _0x2ec3a1){if(!_0x2f72ef||typeof _0x2f72ef!==_0x4d1090(0xaa)||Array['isArray'](_0x2f72ef))return undefined;const _0x2233ed=_0x2f72ef;if(typeof _0x2233ed[_0x4d1090(0xc0)]!==_0x4d1090(0xae)||typeof _0x2233ed[_0x4d1090(0xc2)]!==_0x4d1090(0xae)||typeof _0x2233ed['name']!=='string')return undefined;let _0x1a4260;if(typeof _0x2233ed['datasetCode']===_0x4d1090(0xae)&&_0x2233ed[_0x4d1090(0xac)]===undefined)_0x1a4260=Object[_0x4d1090(0x83)](_0x1f8b67[_0x4d1090(0xb4)](_0xf7b2e1=>[_0xf7b2e1,_0x2233ed['datasetCode']]));else{if(_0x2233ed[_0x4d1090(0xbd)]===undefined&&_0x2233ed[_0x4d1090(0xac)]&&typeof _0x2233ed[_0x4d1090(0xac)]===_0x4d1090(0xaa)&&!Array[_0x4d1090(0xa0)](_0x2233ed[_0x4d1090(0xac)])&&Object['values'](_0x2233ed[_0x4d1090(0xac)])[_0x4d1090(0xc6)](_0x8ecda5=>typeof _0x8ecda5===_0x4d1090(0xae)))_0x1a4260={..._0x2233ed['datasetCodes']};else return undefined;}_0x44ce3e['push']({'alias':_0x2233ed['alias'],'tableName':_0x2233ed[_0x4d1090(0xc2)],'name':_0x2233ed['name'],'datasetCodes':_0x1a4260});}return _0x44ce3e;}export function parseModelRegistry(_0x13b84d){const _0x544775=a6_0x582b9d,_0x5668d7=extractRegistryJson(_0x13b84d);if(!_0x5668d7)return undefined;try{const _0x470908=parseGeneratedRegistryJson(_0x5668d7);if(typeof _0x470908['defaultProfile']!==_0x544775(0xae)||!_0x470908[_0x544775(0x82)]||typeof _0x470908[_0x544775(0x82)]!==_0x544775(0xaa))return undefined;if(_0x470908[_0x544775(0x9a)]==='lovrabet-model-registry/v1')return migrateLegacyRegistry(_0x470908);if(!(_0x470908[_0x544775(0x9a)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x470908['protocol']===undefined&&_0x13b84d[_0x544775(0xa3)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x544775(0xa0)](_0x470908[_0x544775(0xab)]))return undefined;const _0x1cd6f3=_0x470908['profiles'],_0x3c4687=normalizeModelEntries(_0x1cd6f3,_0x470908[_0x544775(0xab)]);if(!_0x3c4687)return undefined;return{'defaultProfile':_0x470908[_0x544775(0x8d)],'profiles':_0x1cd6f3,'models':_0x3c4687};}catch{return undefined;}}export function readModelRegistry(_0x472268){const _0xd0b14f=a6_0x582b9d;if(!existsSync(_0x472268))return undefined;try{return parseModelRegistry(readFileSync(_0x472268,_0xd0b14f(0xa5)));}catch{return undefined;}}function registrySource(_0x2a113c){const _0x1eb562=a6_0x582b9d,_0x482083=Object['keys'](_0x2a113c['profiles']),_0x3b75cd=_0x2a113c[_0x1eb562(0xab)]['map'](_0x106434=>{const _0x230a19=_0x1eb562,_0x535e66=_0x482083[_0x230a19(0xb4)](_0x5be72b=>_0x106434[_0x230a19(0xac)][_0x5be72b]),_0x28f194=_0x535e66[0x0],_0x4cfd85=_0x28f194!==undefined&&_0x535e66[_0x230a19(0xc6)](_0x5ac62a=>_0x5ac62a===_0x28f194),_0x46969f={'alias':_0x106434[_0x230a19(0xc0)],'tableName':_0x106434['tableName'],'name':_0x106434['name']};return _0x4cfd85?{..._0x46969f,'datasetCode':_0x28f194}:{..._0x46969f,'datasetCodes':_0x106434[_0x230a19(0xac)]};}),_0x497f4b=JSON[_0x1eb562(0xc3)]({'defaultProfile':_0x2a113c['defaultProfile'],'profiles':_0x2a113c['profiles'],'models':_0x3b75cd},null,0x2)[_0x1eb562(0x94)]('\x0a')[_0x1eb562(0xb4)](_0x1883e3=>'\x20\x20'+_0x1883e3)[_0x1eb562(0xb7)]('\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+'\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20'+REGISTRY_START+'\x0a'+_0x497f4b+_0x1eb562(0xb1)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x5446b0,_0x35cb77,_0x27ca67){const _0xdb8959=a6_0x582b9d,_0x3de3d6=_0x27ca67['map'](_0x3c7c4c=>({..._0x3c7c4c,'alias':_0x3c7c4c[_0xdb8959(0xc0)]||_0x3c7c4c[_0xdb8959(0xc2)]})),_0x2d54c1=new Map(),_0x39ca1a=new Map();for(const _0x5e4756 of _0x3de3d6){const _0x381b1c=_0x2d54c1[_0xdb8959(0x8b)](_0x5e4756[_0xdb8959(0xc0)]);if(_0x381b1c&&_0x381b1c!==_0x5e4756[_0xdb8959(0xc2)])throw new Error(_0xdb8959(0x97)+_0x5e4756['alias']+'\x22\x20maps\x20to\x20both\x20\x22'+_0x381b1c+'\x22\x20and\x20\x22'+_0x5e4756[_0xdb8959(0xc2)]+_0xdb8959(0x95)+_0x35cb77+'\x22.');const _0x35c6dd=_0x39ca1a[_0xdb8959(0x8b)](_0x5e4756[_0xdb8959(0xc2)]);if(_0x35c6dd&&_0x35c6dd!==_0x5e4756[_0xdb8959(0xc0)])throw new Error('Table\x20\x22'+_0x5e4756[_0xdb8959(0xc2)]+'\x22\x20maps\x20to\x20both\x20aliases\x20\x22'+_0x35c6dd+'\x22\x20and\x20\x22'+_0x5e4756[_0xdb8959(0xc0)]+_0xdb8959(0x95)+_0x35cb77+'\x22.');_0x2d54c1[_0xdb8959(0xb3)](_0x5e4756['alias'],_0x5e4756[_0xdb8959(0xc2)]),_0x39ca1a[_0xdb8959(0xb3)](_0x5e4756['tableName'],_0x5e4756['alias']);const _0x37f1b8=_0x5446b0['models'][_0xdb8959(0xa2)](_0x2f4007=>_0x2f4007[_0xdb8959(0xc0)]===_0x5e4756[_0xdb8959(0xc0)]);if(_0x37f1b8&&_0x37f1b8[_0xdb8959(0xc2)]!==_0x5e4756[_0xdb8959(0xc2)])throw new Error(_0xdb8959(0x97)+_0x5e4756[_0xdb8959(0xc0)]+_0xdb8959(0xb5)+_0x37f1b8[_0xdb8959(0xc2)]+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x5e4756[_0xdb8959(0xc2)]+'\x22\x20in\x20profile\x20\x22'+_0x35cb77+'\x22.');const _0xa77ad9=_0x5446b0[_0xdb8959(0xab)][_0xdb8959(0xa2)](_0x3f74b0=>_0x3f74b0[_0xdb8959(0xc2)]===_0x5e4756[_0xdb8959(0xc2)]);if(_0xa77ad9&&_0xa77ad9[_0xdb8959(0xc0)]!==_0x5e4756[_0xdb8959(0xc0)])throw new Error(_0xdb8959(0x86)+_0x5e4756['tableName']+_0xdb8959(0xbe)+_0xa77ad9[_0xdb8959(0xc0)]+_0xdb8959(0x89)+_0x5e4756['alias']+_0xdb8959(0x95)+_0x35cb77+'\x22.');}for(const _0x472302 of _0x5446b0[_0xdb8959(0xab)]){delete _0x472302['datasetCodes'][_0x35cb77];}for(const _0x1e0383 of _0x3de3d6){let _0x5ad51f=_0x5446b0[_0xdb8959(0xab)][_0xdb8959(0xa2)](_0x71a3a3=>_0x71a3a3[_0xdb8959(0xc0)]===_0x1e0383[_0xdb8959(0xc0)]);!_0x5ad51f&&(_0x5ad51f={'alias':_0x1e0383[_0xdb8959(0xc0)],'tableName':_0x1e0383[_0xdb8959(0xc2)],'name':_0x1e0383['name'],'datasetCodes':{}},_0x5446b0[_0xdb8959(0xab)]['push'](_0x5ad51f)),(_0x35cb77===_0x5446b0[_0xdb8959(0x8d)]||!_0x5ad51f[_0xdb8959(0xac)][_0x5446b0[_0xdb8959(0x8d)]])&&(_0x5ad51f[_0xdb8959(0xc0)]=_0x1e0383[_0xdb8959(0xc0)],_0x5ad51f[_0xdb8959(0xc2)]=_0x1e0383['tableName'],_0x5ad51f[_0xdb8959(0x9c)]=_0x1e0383[_0xdb8959(0x9c)]),_0x5ad51f[_0xdb8959(0xac)][_0x35cb77]=_0x1e0383[_0xdb8959(0xbd)];}_0x5446b0[_0xdb8959(0xab)]=_0x5446b0[_0xdb8959(0xab)][_0xdb8959(0x9e)](_0x2688d2=>Object[_0xdb8959(0xba)](_0x2688d2['datasetCodes'])['length']>0x0);}function removeUnboundProfiles(_0x49df8c){const _0x13493d=a6_0x582b9d,_0x3ab44a=Object['entries'](_0x49df8c[_0x13493d(0x82)])[_0x13493d(0x9e)](([,_0x3465fa])=>_0x3465fa[_0x13493d(0xaf)]===_0x13493d(0x9d))['map'](([_0x8bc492])=>_0x8bc492);if(_0x3ab44a[_0x13493d(0xa9)]===0x0)return;for(const _0x4633e5 of _0x3ab44a){delete _0x49df8c['profiles'][_0x4633e5];for(const _0x88c2fd of _0x49df8c[_0x13493d(0xab)]){delete _0x88c2fd[_0x13493d(0xac)][_0x4633e5];}}_0x49df8c['models']=_0x49df8c[_0x13493d(0xab)][_0x13493d(0x9e)](_0x138740=>Object['keys'](_0x138740[_0x13493d(0xac)])['length']>0x0);}export function getProfileModels(_0x23ed46,_0x3401d2){const _0x9920a8=a6_0x582b9d;return _0x23ed46[_0x9920a8(0xab)][_0x9920a8(0x98)](_0x4d6d3b=>{const _0xbf89b8=_0x9920a8,_0x38f392=_0x4d6d3b[_0xbf89b8(0xac)][_0x3401d2];return _0x38f392?[{'datasetCode':_0x38f392,'tableName':_0x4d6d3b[_0xbf89b8(0xc2)],'name':_0x4d6d3b[_0xbf89b8(0x9c)],'alias':_0x4d6d3b['alias']}]:[];});}export function updateModelRegistry(_0x4a4151){const _0x59f998=a6_0x582b9d,_0x8edd32=a6_0x7c1b93['join'](_0x4a4151[_0x59f998(0x93)],MODEL_REGISTRY_FILE_NAME),_0x1c06b1=existsSync(_0x8edd32),_0x21f02a=readModelRegistry(_0x8edd32);if(_0x1c06b1&&!_0x21f02a)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x59f998(0xb8));const _0x14aa36=_0x21f02a??emptyRegistry(_0x4a4151[_0x59f998(0x8d)]);if(_0x4a4151[_0x59f998(0xaf)]!=='NOT-SET')removeUnboundProfiles(_0x14aa36);const _0x32f304=_0x21f02a?getProfileModels(_0x21f02a,_0x4a4151[_0x59f998(0xa6)])['length']:0x0;if(_0x32f304>0x0&&_0x4a4151['models'][_0x59f998(0xa9)]===0x0&&!_0x4a4151[_0x59f998(0x84)])throw new Error(_0x59f998(0x9b)+_0x32f304+_0x59f998(0x8a)+_0x4a4151[_0x59f998(0xa6)]+_0x59f998(0x90)+_0x59f998(0xbc));_0x14aa36[_0x59f998(0x8d)]=_0x4a4151[_0x59f998(0x8d)],_0x14aa36['profiles'][_0x4a4151[_0x59f998(0xa6)]]={'appCode':_0x4a4151['appCode'],'runtimeDomain':_0x4a4151[_0x59f998(0x91)]},mergeProfileModels(_0x14aa36,_0x4a4151[_0x59f998(0xa6)],_0x4a4151[_0x59f998(0xab)]),mkdirSync(_0x4a4151['outputDir'],{'recursive':!![]});const _0x5c8958=_0x8edd32+'.'+process['pid']+'.'+Date[_0x59f998(0xa8)]()+_0x59f998(0xc4);try{writeFileSync(_0x5c8958,registrySource(_0x14aa36),{'encoding':_0x59f998(0xa5),'mode':0x1a4}),renameSync(_0x5c8958,_0x8edd32);}catch(_0x22721f){try{unlinkSync(_0x5c8958);}catch{}throw _0x22721f;}return{'path':_0x8edd32,'registry':_0x14aa36,'existed':_0x1c06b1};}
|
|
1
|
+
const a6_0x547e7d=a6_0x2de4;(function(_0x237f85,_0x344b44){const _0x5f2b1d=a6_0x2de4,_0x34dbb6=_0x237f85();while(!![]){try{const _0x44f8af=-parseInt(_0x5f2b1d(0x94))/0x1*(parseInt(_0x5f2b1d(0xa7))/0x2)+parseInt(_0x5f2b1d(0xbc))/0x3*(-parseInt(_0x5f2b1d(0xd1))/0x4)+parseInt(_0x5f2b1d(0xa5))/0x5+parseInt(_0x5f2b1d(0xae))/0x6*(parseInt(_0x5f2b1d(0xb6))/0x7)+-parseInt(_0x5f2b1d(0x9e))/0x8*(-parseInt(_0x5f2b1d(0xd2))/0x9)+-parseInt(_0x5f2b1d(0xb3))/0xa*(parseInt(_0x5f2b1d(0xab))/0xb)+-parseInt(_0x5f2b1d(0x90))/0xc;if(_0x44f8af===_0x344b44)break;else _0x34dbb6['push'](_0x34dbb6['shift']());}catch(_0x25706a){_0x34dbb6['push'](_0x34dbb6['shift']());}}}(a6_0x58e7,0x24a36));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x2b8a08 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x547e7d(0xd6);export const MODEL_RUNTIME_FILE_NAME=a6_0x547e7d(0xc8);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x547e7d(0xbb);function a6_0x58e7(){const _0xa24736=['find','length','isArray','outputDir','/*\x20rabetbase-model-registry:v2\x20*/','15ZUeGpa','get','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','\x22\x20maps\x20to\x20both\x20\x22','alias','appCode','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','keys','\x22\x20maps\x20to\x20table\x20\x22','values','name','parse','model-runtime.ts','tableName','Model\x20alias\x20\x22','datasetCode','join','utf8','every','\x20model(s)\x20in\x20profile\x20\x22','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','38524SkgLBb','549hElUUN','models','string','map','models.generated.ts','Refusing\x20to\x20replace\x20','\x22\x20maps\x20to\x20alias\x20\x22','value','entries','191484BfzARX','profiles','\x22\x20and\x20\x22','pid','1coCtwD','replace','lovrabet-model-registry/v2','profileName','protocol','indexOf','filter','Table\x20\x22','push','now','13528CwZHoc','defaultProfile','/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a','slice','split','datasetCodes','runtimeDomain','924010oidPpF','set','83250alralJ','key','\x22\x20in\x20the\x20registry\x20but\x20\x22','stringify','1768547lcKWQo','fromEntries','test','14562JzlTyw','\x22\x20in\x20profile\x20\x22','NOT-SET','includes','.tmp','10JpSOIW','/*\x20rabetbase-model-registry:start\x20*/','trim','371ApOqVu'];a6_0x58e7=function(){return _0xa24736;};return a6_0x58e7();}const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x547e7d(0x96),REGISTRY_START=a6_0x547e7d(0xb4),REGISTRY_END='/*\x20rabetbase-model-registry:end\x20*/';function emptyRegistry(_0x45fd8d){return{'defaultProfile':_0x45fd8d,'profiles':{},'models':[]};}function extractRegistryJson(_0x51f539){const _0x3546ad=a6_0x547e7d,_0x52bb6b=_0x51f539[_0x3546ad(0x99)](REGISTRY_START),_0x113d64=_0x51f539[_0x3546ad(0x99)](REGISTRY_END);if(_0x52bb6b<0x0||_0x113d64<=_0x52bb6b)return undefined;return _0x51f539[_0x3546ad(0xa1)](_0x52bb6b+REGISTRY_START[_0x3546ad(0xb8)],_0x113d64)[_0x3546ad(0xb5)]()[_0x3546ad(0x95)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x3546ad(0x95)](/;$/,'');}function migrateLegacyRegistry(_0x28e16a){const _0x363a89=a6_0x547e7d,_0x22f58e=emptyRegistry(_0x28e16a['defaultProfile']);for(const [_0x54b2fd,_0x59299d]of Object[_0x363a89(0xda)](_0x28e16a[_0x363a89(0x91)])){_0x22f58e['profiles'][_0x54b2fd]={'appCode':_0x59299d[_0x363a89(0xc1)],'runtimeDomain':_0x59299d['runtimeDomain']},mergeProfileModels(_0x22f58e,_0x54b2fd,_0x59299d[_0x363a89(0xd3)]);}return _0x22f58e;}function generatedObjectLiteralToJson(_0xf12c1b){const _0x4d094e=a6_0x547e7d;let _0x43625c='',_0x5ed684,_0x190a0c=![],_0x94c3b;for(let _0x1b8aec=0x0;_0x1b8aec<_0xf12c1b['length'];_0x1b8aec++){const _0x130147=_0xf12c1b[_0x1b8aec];if(_0x5ed684){_0x43625c+=_0x130147;if(_0x190a0c)_0x190a0c=![];else{if(_0x130147==='\x5c')_0x190a0c=!![];else{if(_0x130147===_0x5ed684)_0x5ed684=undefined;}}continue;}if(_0x130147==='\x22'){_0x5ed684=_0x130147,_0x43625c+=_0x130147,_0x94c3b=_0x4d094e(0xd9);continue;}if(_0x130147===','){let _0x37b0bf=_0x1b8aec+0x1;while(/\s/[_0x4d094e(0xad)](_0xf12c1b[_0x37b0bf]??''))_0x37b0bf++;if(_0xf12c1b[_0x37b0bf]==='}'||_0xf12c1b[_0x37b0bf]===']')continue;_0x43625c+=_0x130147,_0x94c3b=',';continue;}if(_0x130147==='{'||_0x130147==='['){_0x43625c+=_0x130147,_0x94c3b=_0x130147;continue;}if(_0x130147==='}'||_0x130147===']'){_0x43625c+=_0x130147,_0x94c3b=_0x130147;continue;}if((_0x94c3b==='{'||_0x94c3b===',')&&/[A-Za-z_$]/[_0x4d094e(0xad)](_0x130147)){let _0x18e56b=_0x1b8aec+0x1;while(/[A-Za-z0-9_$]/[_0x4d094e(0xad)](_0xf12c1b[_0x18e56b]??''))_0x18e56b++;let _0x4cab0d=_0x18e56b;while(/\s/[_0x4d094e(0xad)](_0xf12c1b[_0x4cab0d]??''))_0x4cab0d++;if(_0xf12c1b[_0x4cab0d]===':'){_0x43625c+=JSON[_0x4d094e(0xaa)](_0xf12c1b[_0x4d094e(0xa1)](_0x1b8aec,_0x18e56b)),_0x1b8aec=_0x18e56b-0x1,_0x94c3b=_0x4d094e(0xa8);continue;}}_0x43625c+=_0x130147;if(!/\s/['test'](_0x130147)&&_0x130147!==':')_0x94c3b=_0x4d094e(0xd9);}return _0x43625c;}function parseGeneratedRegistryJson(_0x590bdb){const _0x728910=a6_0x547e7d;try{return JSON[_0x728910(0xc7)](_0x590bdb);}catch{return JSON[_0x728910(0xc7)](generatedObjectLiteralToJson(_0x590bdb));}}function normalizeModelEntries(_0x580730,_0x1e7e4c){const _0x2aec10=a6_0x547e7d,_0x31d96b=Object[_0x2aec10(0xc3)](_0x580730),_0x3fb193=[];for(const _0x3f5bdd of _0x1e7e4c){if(!_0x3f5bdd||typeof _0x3f5bdd!=='object'||Array[_0x2aec10(0xb9)](_0x3f5bdd))return undefined;const _0x2b2a2b=_0x3f5bdd;if(typeof _0x2b2a2b['alias']!=='string'||typeof _0x2b2a2b[_0x2aec10(0xc9)]!==_0x2aec10(0xd4)||typeof _0x2b2a2b[_0x2aec10(0xc6)]!==_0x2aec10(0xd4))return undefined;let _0x3388a8;if(typeof _0x2b2a2b[_0x2aec10(0xcb)]==='string'&&_0x2b2a2b[_0x2aec10(0xa3)]===undefined)_0x3388a8=Object[_0x2aec10(0xac)](_0x31d96b[_0x2aec10(0xd5)](_0x1d82a2=>[_0x1d82a2,_0x2b2a2b[_0x2aec10(0xcb)]]));else{if(_0x2b2a2b['datasetCode']===undefined&&_0x2b2a2b[_0x2aec10(0xa3)]&&typeof _0x2b2a2b[_0x2aec10(0xa3)]==='object'&&!Array[_0x2aec10(0xb9)](_0x2b2a2b[_0x2aec10(0xa3)])&&Object[_0x2aec10(0xc5)](_0x2b2a2b[_0x2aec10(0xa3)])[_0x2aec10(0xce)](_0x1c036d=>typeof _0x1c036d===_0x2aec10(0xd4)))_0x3388a8={..._0x2b2a2b[_0x2aec10(0xa3)]};else return undefined;}_0x3fb193[_0x2aec10(0x9c)]({'alias':_0x2b2a2b[_0x2aec10(0xc0)],'tableName':_0x2b2a2b[_0x2aec10(0xc9)],'name':_0x2b2a2b[_0x2aec10(0xc6)],'datasetCodes':_0x3388a8});}return _0x3fb193;}function a6_0x2de4(_0x2a51da,_0x1a12ee){_0x2a51da=_0x2a51da-0x90;const _0x58e710=a6_0x58e7();let _0x2de4eb=_0x58e710[_0x2a51da];return _0x2de4eb;}export function parseModelRegistry(_0x1743f4){const _0x11561c=a6_0x547e7d,_0x200a06=extractRegistryJson(_0x1743f4);if(!_0x200a06)return undefined;try{const _0x21d27c=parseGeneratedRegistryJson(_0x200a06);if(typeof _0x21d27c['defaultProfile']!=='string'||!_0x21d27c[_0x11561c(0x91)]||typeof _0x21d27c[_0x11561c(0x91)]!=='object')return undefined;if(_0x21d27c[_0x11561c(0x98)]==='lovrabet-model-registry/v1')return migrateLegacyRegistry(_0x21d27c);if(!(_0x21d27c[_0x11561c(0x98)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x21d27c[_0x11561c(0x98)]===undefined&&_0x1743f4[_0x11561c(0xb1)](MODEL_REGISTRY_VERSION_MARKER))||!Array['isArray'](_0x21d27c[_0x11561c(0xd3)]))return undefined;const _0xadf629=_0x21d27c['profiles'],_0x5410bd=normalizeModelEntries(_0xadf629,_0x21d27c[_0x11561c(0xd3)]);if(!_0x5410bd)return undefined;return{'defaultProfile':_0x21d27c['defaultProfile'],'profiles':_0xadf629,'models':_0x5410bd};}catch{return undefined;}}export function readModelRegistry(_0x247027){const _0x5c1652=a6_0x547e7d;if(!existsSync(_0x247027))return undefined;try{return parseModelRegistry(readFileSync(_0x247027,_0x5c1652(0xcd)));}catch{return undefined;}}function registrySource(_0x1ec7e9){const _0x2121f2=a6_0x547e7d,_0x5e2883=Object[_0x2121f2(0xc3)](_0x1ec7e9['profiles']),_0x1b50a4=_0x1ec7e9['models'][_0x2121f2(0xd5)](_0x54e6a2=>{const _0x26a624=_0x2121f2,_0xefa805=_0x5e2883['map'](_0x3b443e=>_0x54e6a2['datasetCodes'][_0x3b443e]),_0x280aff=_0xefa805[0x0],_0x1202fd=_0x280aff!==undefined&&_0xefa805['every'](_0x456c1c=>_0x456c1c===_0x280aff),_0x5d1b70={'alias':_0x54e6a2[_0x26a624(0xc0)],'tableName':_0x54e6a2[_0x26a624(0xc9)],'name':_0x54e6a2[_0x26a624(0xc6)]};return _0x1202fd?{..._0x5d1b70,'datasetCode':_0x280aff}:{..._0x5d1b70,'datasetCodes':_0x54e6a2[_0x26a624(0xa3)]};}),_0x5ac005=JSON[_0x2121f2(0xaa)]({'defaultProfile':_0x1ec7e9['defaultProfile'],'profiles':_0x1ec7e9[_0x2121f2(0x91)],'models':_0x1b50a4},null,0x2)[_0x2121f2(0xa2)]('\x0a')[_0x2121f2(0xd5)](_0x357546=>'\x20\x20'+_0x357546)['join']('\x0a');return _0x2121f2(0xa0)+MODEL_REGISTRY_VERSION_MARKER+_0x2121f2(0xbe)+REGISTRY_START+'\x0a'+_0x5ac005+_0x2121f2(0xd0)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x45f958,_0x3d9420,_0x5157de){const _0x243050=a6_0x547e7d,_0x45ce3c=_0x5157de[_0x243050(0xd5)](_0xdbd9f0=>({..._0xdbd9f0,'alias':_0xdbd9f0[_0x243050(0xc0)]||_0xdbd9f0[_0x243050(0xc9)]})),_0x131815=new Map(),_0xc7e717=new Map();for(const _0x4a801a of _0x45ce3c){const _0x5b6bb2=_0x131815[_0x243050(0xbd)](_0x4a801a['alias']);if(_0x5b6bb2&&_0x5b6bb2!==_0x4a801a[_0x243050(0xc9)])throw new Error('Model\x20alias\x20\x22'+_0x4a801a['alias']+_0x243050(0xbf)+_0x5b6bb2+'\x22\x20and\x20\x22'+_0x4a801a['tableName']+_0x243050(0xaf)+_0x3d9420+'\x22.');const _0x3c520b=_0xc7e717[_0x243050(0xbd)](_0x4a801a[_0x243050(0xc9)]);if(_0x3c520b&&_0x3c520b!==_0x4a801a[_0x243050(0xc0)])throw new Error(_0x243050(0x9b)+_0x4a801a[_0x243050(0xc9)]+'\x22\x20maps\x20to\x20both\x20aliases\x20\x22'+_0x3c520b+_0x243050(0x92)+_0x4a801a[_0x243050(0xc0)]+_0x243050(0xaf)+_0x3d9420+'\x22.');_0x131815[_0x243050(0xa6)](_0x4a801a[_0x243050(0xc0)],_0x4a801a['tableName']),_0xc7e717['set'](_0x4a801a['tableName'],_0x4a801a[_0x243050(0xc0)]);const _0x17f246=_0x45f958['models']['find'](_0xddd9e0=>_0xddd9e0[_0x243050(0xc0)]===_0x4a801a['alias']);if(_0x17f246&&_0x17f246[_0x243050(0xc9)]!==_0x4a801a[_0x243050(0xc9)])throw new Error(_0x243050(0xca)+_0x4a801a[_0x243050(0xc0)]+_0x243050(0xc4)+_0x17f246[_0x243050(0xc9)]+_0x243050(0xa9)+_0x4a801a[_0x243050(0xc9)]+_0x243050(0xaf)+_0x3d9420+'\x22.');const _0x4f3815=_0x45f958[_0x243050(0xd3)][_0x243050(0xb7)](_0x13ce0b=>_0x13ce0b[_0x243050(0xc9)]===_0x4a801a[_0x243050(0xc9)]);if(_0x4f3815&&_0x4f3815[_0x243050(0xc0)]!==_0x4a801a[_0x243050(0xc0)])throw new Error(_0x243050(0x9b)+_0x4a801a[_0x243050(0xc9)]+_0x243050(0xd8)+_0x4f3815[_0x243050(0xc0)]+_0x243050(0xa9)+_0x4a801a['alias']+_0x243050(0xaf)+_0x3d9420+'\x22.');}for(const _0x33f587 of _0x45f958[_0x243050(0xd3)]){delete _0x33f587[_0x243050(0xa3)][_0x3d9420];}for(const _0xb3b687 of _0x45ce3c){let _0x353a74=_0x45f958[_0x243050(0xd3)][_0x243050(0xb7)](_0x97079=>_0x97079['alias']===_0xb3b687['alias']);!_0x353a74&&(_0x353a74={'alias':_0xb3b687[_0x243050(0xc0)],'tableName':_0xb3b687['tableName'],'name':_0xb3b687[_0x243050(0xc6)],'datasetCodes':{}},_0x45f958[_0x243050(0xd3)][_0x243050(0x9c)](_0x353a74)),(_0x3d9420===_0x45f958[_0x243050(0x9f)]||!_0x353a74['datasetCodes'][_0x45f958['defaultProfile']])&&(_0x353a74[_0x243050(0xc0)]=_0xb3b687[_0x243050(0xc0)],_0x353a74[_0x243050(0xc9)]=_0xb3b687[_0x243050(0xc9)],_0x353a74[_0x243050(0xc6)]=_0xb3b687['name']),_0x353a74[_0x243050(0xa3)][_0x3d9420]=_0xb3b687['datasetCode'];}_0x45f958[_0x243050(0xd3)]=_0x45f958[_0x243050(0xd3)]['filter'](_0xa72791=>Object[_0x243050(0xc3)](_0xa72791[_0x243050(0xa3)])[_0x243050(0xb8)]>0x0);}function removeUnboundProfiles(_0x1acf55){const _0x4fe4dc=a6_0x547e7d,_0x248a6d=Object[_0x4fe4dc(0xda)](_0x1acf55[_0x4fe4dc(0x91)])[_0x4fe4dc(0x9a)](([,_0x1d132a])=>_0x1d132a[_0x4fe4dc(0xc1)]==='NOT-SET')[_0x4fe4dc(0xd5)](([_0x5d8a1d])=>_0x5d8a1d);if(_0x248a6d['length']===0x0)return;for(const _0x2f91bc of _0x248a6d){delete _0x1acf55[_0x4fe4dc(0x91)][_0x2f91bc];for(const _0x4ea0b3 of _0x1acf55[_0x4fe4dc(0xd3)]){delete _0x4ea0b3[_0x4fe4dc(0xa3)][_0x2f91bc];}}_0x1acf55[_0x4fe4dc(0xd3)]=_0x1acf55[_0x4fe4dc(0xd3)][_0x4fe4dc(0x9a)](_0x2ae1dc=>Object[_0x4fe4dc(0xc3)](_0x2ae1dc[_0x4fe4dc(0xa3)])[_0x4fe4dc(0xb8)]>0x0);}export function getProfileModels(_0x23321f,_0x7a8083){const _0x321f0a=a6_0x547e7d;return _0x23321f[_0x321f0a(0xd3)]['flatMap'](_0x48f10f=>{const _0x2b4e38=_0x321f0a,_0x4fe276=_0x48f10f[_0x2b4e38(0xa3)][_0x7a8083];return _0x4fe276?[{'datasetCode':_0x4fe276,'tableName':_0x48f10f[_0x2b4e38(0xc9)],'name':_0x48f10f[_0x2b4e38(0xc6)],'alias':_0x48f10f['alias']}]:[];});}export function updateModelRegistry(_0x3d683f){const _0x48c1d6=a6_0x547e7d,_0x491260=a6_0x2b8a08[_0x48c1d6(0xcc)](_0x3d683f['outputDir'],MODEL_REGISTRY_FILE_NAME),_0x415014=existsSync(_0x491260),_0x4c8b05=readModelRegistry(_0x491260);if(_0x415014&&!_0x4c8b05)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x48c1d6(0xc2));const _0x188a23=_0x4c8b05??emptyRegistry(_0x3d683f[_0x48c1d6(0x9f)]);if(_0x3d683f[_0x48c1d6(0xc1)]!==_0x48c1d6(0xb0))removeUnboundProfiles(_0x188a23);const _0x8050ec=_0x4c8b05?getProfileModels(_0x4c8b05,_0x3d683f[_0x48c1d6(0x97)])[_0x48c1d6(0xb8)]:0x0;if(_0x8050ec>0x0&&_0x3d683f[_0x48c1d6(0xd3)]['length']===0x0&&!_0x3d683f['allowEmptyReplacement'])throw new Error(_0x48c1d6(0xd7)+_0x8050ec+_0x48c1d6(0xcf)+_0x3d683f[_0x48c1d6(0x97)]+'\x22\x20with\x20an\x20empty\x20result.\x20'+'Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.');_0x188a23[_0x48c1d6(0x9f)]=_0x3d683f[_0x48c1d6(0x9f)],_0x188a23[_0x48c1d6(0x91)][_0x3d683f['profileName']]={'appCode':_0x3d683f[_0x48c1d6(0xc1)],'runtimeDomain':_0x3d683f[_0x48c1d6(0xa4)]},mergeProfileModels(_0x188a23,_0x3d683f[_0x48c1d6(0x97)],_0x3d683f[_0x48c1d6(0xd3)]),mkdirSync(_0x3d683f[_0x48c1d6(0xba)],{'recursive':!![]});const _0xae3339=_0x491260+'.'+process[_0x48c1d6(0x93)]+'.'+Date[_0x48c1d6(0x9d)]()+_0x48c1d6(0xb2);try{writeFileSync(_0xae3339,registrySource(_0x188a23),{'encoding':'utf8','mode':0x1a4}),renameSync(_0xae3339,_0x491260);}catch(_0x516827){try{unlinkSync(_0xae3339);}catch{}throw _0x516827;}return{'path':_0x491260,'registry':_0x188a23,'existed':_0x415014};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a7_0x40dc46=a7_0x4c85;(function(_0x19a866,_0x2dd23d){const _0x172f9a=a7_0x4c85,_0x792f7b=_0x19a866();while(!![]){try{const _0x4ce097=-parseInt(_0x172f9a(0xc2))/0x1+-parseInt(_0x172f9a(0xb0))/0x2*(-parseInt(_0x172f9a(0xb2))/0x3)+parseInt(_0x172f9a(0xb1))/0x4+-parseInt(_0x172f9a(0xba))/0x5*(-parseInt(_0x172f9a(0xb7))/0x6)+-parseInt(_0x172f9a(0xbf))/0x7+-parseInt(_0x172f9a(0xb9))/0x8*(-parseInt(_0x172f9a(0xbc))/0x9)+parseInt(_0x172f9a(0xab))/0xa;if(_0x4ce097===_0x2dd23d)break;else _0x792f7b['push'](_0x792f7b['shift']());}catch(_0x4d4d31){_0x792f7b['push'](_0x792f7b['shift']());}}}(a7_0x3ad1,0xb1b1e));import{readFileSync}from'node:fs';import a7_0x405adc from'node:path';import{fileURLToPath}from'node:url';function a7_0x4c85(_0x19bd26,_0x571d03){_0x19bd26=_0x19bd26-0xab;const _0x3ad16f=a7_0x3ad1();let _0x4c854f=_0x3ad16f[_0x19bd26];return _0x4c854f;}import a7_0x91e36 from'prettier';import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function a7_0x3ad1(){const _0x1b1e53=['1534078pYgpgH','2456260oXiCTt','3SizvBv','profile-api.ts.tpl','{ProjectRoutingImport}','startsWith','../../templates/generate-api','3026262jnKHCG','all','15672Fvwmuu','5KGlTXO','join','9myhmLV','replace','dirname','6335868yYBHCp','typescript','utf8','302044rCmBKf','475660knqZfI','profile-client.ts.tpl','format','cwd','resolve'];a7_0x3ad1=function(){return _0x1b1e53;};return a7_0x3ad1();}function relativeImport(_0xeb2744,_0x266ceb){const _0x2b892e=a7_0x4c85;let _0x31ac40=a7_0x405adc['relative'](_0xeb2744,_0x266ceb)[_0x2b892e(0xbd)](/\\/g,'/');if(!_0x31ac40[_0x2b892e(0xb5)]('.'))_0x31ac40='./'+_0x31ac40;return _0x31ac40;}export async function renderModelRegistryScaffold(_0x2b7b72,_0x25c7f9=process[a7_0x40dc46(0xae)]()){const _0x1fbad4=a7_0x40dc46,_0x19fa9d=fileURLToPath(import.meta.url),_0x477a10=a7_0x405adc[_0x1fbad4(0xaf)](a7_0x405adc[_0x1fbad4(0xbe)](_0x19fa9d),_0x1fbad4(0xb6)),_0x298683=relativeImport(a7_0x405adc[_0x1fbad4(0xaf)](_0x2b7b72),a7_0x405adc[_0x1fbad4(0xaf)](_0x25c7f9,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x5be3df=readFileSync(a7_0x405adc[_0x1fbad4(0xbb)](_0x477a10,_0x1fbad4(0xb3)),_0x1fbad4(0xc1))['replace'](_0x1fbad4(0xb4),_0x298683),[_0x3ce480,_0x32da09,_0x53a224]=await Promise[_0x1fbad4(0xb8)]([a7_0x91e36[_0x1fbad4(0xad)](_0x5be3df,{'parser':_0x1fbad4(0xc0)}),a7_0x91e36[_0x1fbad4(0xad)](readFileSync(a7_0x405adc[_0x1fbad4(0xbb)](_0x477a10,_0x1fbad4(0xac)),_0x1fbad4(0xc1)),{'parser':_0x1fbad4(0xc0)}),a7_0x91e36[_0x1fbad4(0xad)](readFileSync(a7_0x405adc['join'](_0x477a10,'model-runtime.ts.tpl'),_0x1fbad4(0xc1)),{'parser':_0x1fbad4(0xc0)})]);return{'api':_0x3ce480,'client':_0x32da09,'modelRuntime':_0x53a224};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x49bd78,_0x86f15d){const _0x4ec9b4=a8_0x1ec2,_0xb388f1=_0x49bd78();while(!![]){try{const _0x529602=-parseInt(_0x4ec9b4(0x1d1))/0x1+parseInt(_0x4ec9b4(0x1e2))/0x2*(-parseInt(_0x4ec9b4(0x1db))/0x3)+-parseInt(_0x4ec9b4(0x1c3))/0x4*(parseInt(_0x4ec9b4(0x1e4))/0x5)+parseInt(_0x4ec9b4(0x1d3))/0x6+-parseInt(_0x4ec9b4(0x1c4))/0x7*(parseInt(_0x4ec9b4(0x1de))/0x8)+-parseInt(_0x4ec9b4(0x1cf))/0x9+-parseInt(_0x4ec9b4(0x1cb))/0xa*(-parseInt(_0x4ec9b4(0x1cd))/0xb);if(_0x529602===_0x86f15d)break;else _0xb388f1['push'](_0xb388f1['shift']());}catch(_0x311444){_0xb388f1['push'](_0xb388f1['shift']());}}}(a8_0x28a0,0x69f7f));import{existsSync}from'node:fs';function a8_0x1ec2(_0x1cb430,_0x2390f9){_0x1cb430=_0x1cb430-0x1c3;const _0x28a0a4=a8_0x28a0();let _0x1ec2c8=_0x28a0a4[_0x1cb430];return _0x1ec2c8;}import a8_0xc67341 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';function a8_0x28a0(){const _0x4fe89c=['length','1090245VbqdFW','8cBIFyq','7HmNBlw','entries','Model\x20profile\x20\x22','profiles','Run\x20`','AppCode\x20\x22','appcode','120kodDwz','object','1061522pLeFgj','api.ts','4623507gHwujK','-api.ts','36952hKRPUv','Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.','4248306imgjDc','resolve','cwd','join','validation','\x22\x20is\x20missing\x20from\x20','defaultProfile','appCode','693276RASCdv','apps','map','1713304xdoFMm','\x20api\x20pull\x20--app\x20','defaultApp','\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20','2ZZLOpb'];a8_0x28a0=function(){return _0x4fe89c;};return a8_0x28a0();}import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveApiModelSource(_0x542ce1,_0x5f3a02,_0x578bb9){const _0x5bdc08=a8_0x1ec2,_0x3dc759=a8_0xc67341[_0x5bdc08(0x1d4)](process[_0x5bdc08(0x1d5)](),_0x542ce1),_0x3bb32a=a8_0xc67341[_0x5bdc08(0x1d4)](_0x3dc759,_0x5bdc08(0x1ce)),_0x5b5367=a8_0xc67341[_0x5bdc08(0x1d4)](_0x3dc759,MODEL_REGISTRY_FILE_NAME),_0x172f9c=readModelRegistry(_0x5b5367);if(_0x172f9c){const _0x4aed2d=_0x5f3a02?Object['entries'](_0x172f9c[_0x5bdc08(0x1c7)])['filter'](([,_0x3d5319])=>_0x3d5319[_0x5bdc08(0x1da)]===_0x5f3a02):[];if(_0x578bb9){if(_0x172f9c[_0x5bdc08(0x1c7)][_0x578bb9])return{'filePath':_0x5b5367,'profileName':_0x578bb9};if(_0x4aed2d[_0x5bdc08(0x1e3)]>0x0)throw CliErrors[_0x5bdc08(0x1d7)](_0x5bdc08(0x1c6)+_0x578bb9+_0x5bdc08(0x1d8)+MODEL_REGISTRY_FILE_NAME+'.',_0x5bdc08(0x1c8)+CLI_BIN_NAME+_0x5bdc08(0x1df)+_0x578bb9+'`\x20first.');}else{if(_0x4aed2d[_0x5bdc08(0x1e3)]===0x1)return{'filePath':_0x5b5367,'profileName':_0x4aed2d[0x0][0x0]};if(_0x4aed2d['length']>0x1)throw new Error(_0x5bdc08(0x1c9)+_0x5f3a02+_0x5bdc08(0x1e1)+_0x4aed2d[_0x5bdc08(0x1dd)](([_0x57480e])=>_0x57480e)[_0x5bdc08(0x1d6)](',\x20')+'.\x20'+_0x5bdc08(0x1d2));if(_0x172f9c[_0x5bdc08(0x1c7)][_0x172f9c[_0x5bdc08(0x1d9)]]&&!_0x5f3a02)return{'filePath':_0x5b5367,'profileName':_0x172f9c[_0x5bdc08(0x1d9)]};}}if(!_0x5f3a02&&!_0x578bb9)return{'filePath':_0x3bb32a};const _0x2b90c9=readRawConfig(),_0x2dc19a=_0x2b90c9[_0x5bdc08(0x1dc)]&&typeof _0x2b90c9[_0x5bdc08(0x1dc)]===_0x5bdc08(0x1cc)?_0x2b90c9[_0x5bdc08(0x1dc)]:{},_0xfbf4b9=_0x578bb9&&_0x2dc19a[_0x578bb9]?[_0x578bb9,_0x2dc19a[_0x578bb9]]:Object[_0x5bdc08(0x1c5)](_0x2dc19a)['find'](([,_0x4e6469])=>_0x4e6469?.[_0x5bdc08(0x1ca)]===_0x5f3a02);if(!_0xfbf4b9)return{'filePath':_0x3bb32a};const [_0x2b7d91,_0x1e9d50]=_0xfbf4b9,_0x4bb23c=typeof _0x2b90c9['defaultApp']==='string'?_0x2b90c9[_0x5bdc08(0x1e0)]:undefined;if(_0x1e9d50?.['apiDir'])return{'filePath':_0x3bb32a};if(_0x4bb23c&&_0x2b7d91!==_0x4bb23c){const _0x1b6214=a8_0xc67341[_0x5bdc08(0x1d4)](_0x3dc759,_0x2b7d91+_0x5bdc08(0x1d0));if(existsSync(_0x1b6214))return{'filePath':_0x1b6214};}return{'filePath':_0x3bb32a};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ff0de,_0x4e1d96){const _0x12801e=a9_0x69a1,_0x2534db=_0x2ff0de();while(!![]){try{const _0x3dd332=parseInt(_0x12801e(0x168))/0x1*(-parseInt(_0x12801e(0x179))/0x2)+parseInt(_0x12801e(0x177))/0x3+parseInt(_0x12801e(0x16e))/0x4+parseInt(_0x12801e(0x178))/0x5+parseInt(_0x12801e(0x16d))/0x6+-parseInt(_0x12801e(0x176))/0x7*(parseInt(_0x12801e(0x16b))/0x8)+parseInt(_0x12801e(0x171))/0x9*(-parseInt(_0x12801e(0x167))/0xa);if(_0x3dd332===_0x4e1d96)break;else _0x2534db['push'](_0x2534db['shift']());}catch(_0x4981bb){_0x2534db['push'](_0x2534db['shift']());}}}(a9_0x3723,0x436ad));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a9_0x3723(){const _0x33d339=['890pxFRyC','3291vmLPbg','No\x20valid\x20session.\x20Login\x20now?','Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','8zAnVGJ','!\x20Login\x20failed.','2654502EoboFo','1083752MwExMN','*\x20Login\x20successful!','nonInteractive','57906yWzBlS','Run\x20`','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','autoYes','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','635047mTqQiM','881349kTcXmD','797145yQGrOl','138wTFQgU','validation','log','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.'];a9_0x3723=function(){return _0x33d339;};return a9_0x3723();}import{CliErrors}from'../errors.js';function a9_0x69a1(_0x34feaf,_0x508bae){_0x34feaf=_0x34feaf-0x164;const _0x3723e0=a9_0x3723();let _0x69a17=_0x3723e0[_0x34feaf];return _0x69a17;}import{confirm}from'@inquirer/prompts';import a9_0x5e3e72 from'ora';export async function runAuthServer(_0x5e3898){const _0x3a7023=a9_0x69a1,_0x202ae4=await getIsSessionValid();if(_0x202ae4){console[_0x3a7023(0x165)](_0x3a7023(0x175));return;}if(_0x5e3898?.[_0x3a7023(0x170)]&&!_0x5e3898[_0x3a7023(0x174)])throw CliErrors[_0x3a7023(0x164)](_0x3a7023(0x16a),_0x3a7023(0x172)+CLI_BIN_NAME+'\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.');const _0x1e02f3=_0x5e3898?.['autoYes']?!![]:await confirm({'message':_0x3a7023(0x169),'default':!![]});if(!_0x1e02f3)return;if(_0x5e3898?.[_0x3a7023(0x170)]){console[_0x3a7023(0x165)](_0x3a7023(0x173));const _0x26bf38=await authServer({'silent':![],'openBrowser':![]});_0x26bf38?console[_0x3a7023(0x165)](_0x3a7023(0x16f)):console[_0x3a7023(0x165)](_0x3a7023(0x16c));return;}const _0x5e532e=a9_0x5e3e72(_0x3a7023(0x166))['start'](),_0xeb185e=await authServer({'silent':!![],'openBrowser':!![]});_0x5e532e['stop'](),_0xeb185e?console[_0x3a7023(0x165)]('*\x20Login\x20successful!'):console[_0x3a7023(0x165)](_0x3a7023(0x16c));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x50953f=a10_0x3310;(function(_0x122ef1,_0xca461){const _0xb97561=a10_0x3310,_0x35de83=_0x122ef1();while(!![]){try{const _0x5cfb01=parseInt(_0xb97561(0x171))/0x1+-parseInt(_0xb97561(0x184))/0x2+-parseInt(_0xb97561(0x183))/0x3*(parseInt(_0xb97561(0x165))/0x4)+-parseInt(_0xb97561(0x169))/0x5+parseInt(_0xb97561(0x17f))/0x6*(parseInt(_0xb97561(0x180))/0x7)+-parseInt(_0xb97561(0x162))/0x8*(parseInt(_0xb97561(0x16e))/0x9)+parseInt(_0xb97561(0x177))/0xa;if(_0x5cfb01===_0xca461)break;else _0x35de83['push'](_0x35de83['shift']());}catch(_0x58861a){_0x35de83['push'](_0x35de83['shift']());}}}(a10_0xcd50,0x3afec));import{writeFileSync}from'node:fs';import a10_0x281984 from'node:http';import a10_0x227be4 from'node:https';import{getUserDomain}from'../constant/domain.js';import{getOfficialRoutingCdn,getOfficialRoutingProfile}from'../constant/routing-profile.js';import{getProjectDomainRoutingManifest}from'../config/project-domain-routing.js';function a10_0xcd50(){const _0x4b6a75=['987JVzwaJ','📍\x20Login\x20URL:','darwin','740373SftTCN','389642ixAdai','port','utf-8','close','timeoutMs','127.0.0.1','openBrowser','certificateUrl','then','writeHead','/api/auth/get-session','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','16febSMw','Auth\x20server\x20error:','session','4EyHbbH','cookie','catch','user','1748590tOJDJF','log','💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','end','227781fYfVYZ','listen','win32','44424AGGOhn','xdg-open\x20\x22','error','local','platform','silent','8241430UGHInL','text/html;\x20charset=utf-8','createServer','origin','/cert/lovrabet-dev.json','isAuth','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','json','9150gkoIHO'];a10_0xcd50=function(){return _0x4b6a75;};return a10_0xcd50();}function a10_0x3310(_0x2581f3,_0x4e01e2){_0x2581f3=_0x2581f3-0x158;const _0xcd5051=a10_0xcd50();let _0x331035=_0xcd5051[_0x2581f3];return _0x331035;}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(_0x407d76){const _0x577e81=a10_0x3310;if(!_0x407d76)return getProjectDomainRoutingManifest()[_0x577e81(0x174)];const _0x4fd89d=getOfficialRoutingProfile(_0x407d76),_0xd47d60=getOfficialRoutingCdn(_0x407d76);return{'origin':_0x4fd89d[_0x577e81(0x174)][_0x577e81(0x17a)],'certificateUrl':_0xd47d60['lovrabet']+_0x577e81(0x17b)};}function withPort(_0x501501,_0x525e91){const _0x26db4e=a10_0x3310,_0x23b40e=new URL(_0x501501);return _0x23b40e[_0x26db4e(0x185)]=String(_0x525e91),_0x23b40e[_0x26db4e(0x17a)];}export async function authServer(_0x5b3653){const _0x5532af=a10_0x3310,_0x4b35f0=_0x5b3653?.[_0x5532af(0x176)]||![],_0x3cca96=_0x5b3653?.[_0x5532af(0x15c)]??!![],_0x13e910=_0x5b3653?.[_0x5532af(0x15a)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x46f395=resolveAuthCallbackRouting(),_0x2260b1=_0x46f395['certificateUrl']?await(await fetch(_0x46f395[_0x5532af(0x15d)]))[_0x5532af(0x17e)]():undefined;return new Promise(async(_0x4c564f,_0x3d8de4)=>{const _0x52750e=_0x5532af;let _0x566905=0x0,_0x50bccf=![],_0x200b03;const _0x1894f6=async(_0x5a1549,_0x2d7b27)=>{const _0x230737=a10_0x3310,_0x361929=getUserDomain(),_0x476276=_0x5a1549['headers'][_0x230737(0x166)]||'',_0x21acda=await fetch(_0x361929+_0x230737(0x160),{'headers':{'cookie':_0x476276}})['then'](_0x209589=>_0x209589[_0x230737(0x17e)]()),_0xc9a60c=_0x21acda&&_0x21acda[_0x230737(0x164)]&&_0x21acda[_0x230737(0x168)];if(_0xc9a60c){writeFileSync(cookieFile,_0x476276,_0x230737(0x158));const _0x33a565=buildLoginSuccessHtml();_0x2d7b27[_0x230737(0x15f)](0xc8,{'Content-Type':_0x230737(0x178)}),_0x2d7b27[_0x230737(0x16d)](_0x33a565),_0x42960a(!![]);}else{const _0x49d23f=encodeURIComponent(withPort(_0x46f395['origin'],_0x566905));_0x2d7b27[_0x230737(0x15f)](0x12e,{'location':_0x361929+'/sign-in?redirect='+_0x49d23f}),_0x2d7b27[_0x230737(0x16d)]();return;}},_0x5218e0=_0x2260b1?a10_0x227be4[_0x52750e(0x179)](_0x2260b1,_0x1894f6):a10_0x281984[_0x52750e(0x179)](_0x1894f6);function _0x42960a(_0x530e7d){const _0x10d59f=_0x52750e;if(_0x50bccf)return;_0x50bccf=!![],_0x200b03&&clearTimeout(_0x200b03),_0x5218e0[_0x10d59f(0x159)](),_0x4c564f(_0x530e7d);}_0x5218e0[_0x52750e(0x16f)](0x0,_0x52750e(0x15b),()=>{const _0xdcbf8c=_0x52750e,_0x2ca899=_0x5218e0['address']();_0x566905=typeof _0x2ca899==='object'&&_0x2ca899?_0x2ca899[_0xdcbf8c(0x185)]:Number(_0x2ca899);const _0x3e6725=withPort(_0x46f395[_0xdcbf8c(0x17a)],_0x566905);_0x200b03=setTimeout(()=>{!_0x4b35f0&&console['log']('!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.'),_0x42960a(![]);},_0x13e910);!_0x4b35f0&&(console[_0xdcbf8c(0x16a)]('🔐\x20Starting\x20login\x20service...'),console[_0xdcbf8c(0x16a)](_0xdcbf8c(0x181),_0x3e6725),_0x3cca96?(console[_0xdcbf8c(0x16a)]('🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...'),console[_0xdcbf8c(0x16a)](''),console['log']('💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.')):console[_0xdcbf8c(0x16a)](_0xdcbf8c(0x16b)),console[_0xdcbf8c(0x16a)](''));if(!_0x3cca96)return;openInBrowser(_0x3e6725)[_0xdcbf8c(0x15e)](_0x2bab61=>{const _0xa523d0=_0xdcbf8c;!_0x4b35f0&&(_0x2bab61?console['log'](_0xa523d0(0x161)):(console[_0xa523d0(0x16a)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0xa523d0(0x16a)](_0xa523d0(0x17d),_0x3e6725)),console['log'](''));})[_0xdcbf8c(0x167)](()=>{const _0x42b114=_0xdcbf8c;!_0x4b35f0&&(console['log'](_0x42b114(0x16c)),console[_0x42b114(0x16a)](_0x42b114(0x17d),_0x3e6725),console[_0x42b114(0x16a)](''));});}),_0x5218e0['on']('error',_0x4b6b14=>{const _0xbddce=_0x52750e;if(_0x50bccf)return;_0x50bccf=!![],_0x200b03&&clearTimeout(_0x200b03),!_0x4b35f0&&console[_0xbddce(0x173)](_0xbddce(0x163),_0x4b6b14),_0x5218e0[_0xbddce(0x159)](),_0x3d8de4(_0x4b6b14);});});}function openInBrowser(_0x207083){return new Promise(_0x3ac62a=>{const _0x550e2=a10_0x3310,_0x7c83a6=process[_0x550e2(0x175)];let _0x524454;if(_0x7c83a6===_0x550e2(0x170))_0x524454='cmd\x20/c\x20start\x20\x22\x22\x20\x22'+_0x207083+'\x22';else _0x7c83a6===_0x550e2(0x182)?_0x524454='open\x20\x22'+_0x207083+'\x22':_0x524454=_0x550e2(0x172)+_0x207083+'\x22';exec(_0x524454,_0x2b811f=>{_0x2b811f?_0x3ac62a(![]):_0x3ac62a(!![]);});});}if(import.meta.main){const isAuth=await authServer();console['log'](a10_0x50953f(0x17c),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a11_0x27e5(_0x4b5b4d,_0x5aba35){_0x4b5b4d=_0x4b5b4d-0x17e;const _0x1f1144=a11_0x1f11();let _0x27e5d7=_0x1f1144[_0x4b5b4d];return _0x27e5d7;}const a11_0x59123f=a11_0x27e5;(function(_0x1c5d24,_0x17abd1){const _0x502348=a11_0x27e5,_0x1b2c43=_0x1c5d24();while(!![]){try{const _0x2b7738=-parseInt(_0x502348(0x17e))/0x1+-parseInt(_0x502348(0x17f))/0x2+parseInt(_0x502348(0x187))/0x3*(parseInt(_0x502348(0x188))/0x4)+parseInt(_0x502348(0x183))/0x5*(parseInt(_0x502348(0x180))/0x6)+parseInt(_0x502348(0x185))/0x7*(parseInt(_0x502348(0x182))/0x8)+parseInt(_0x502348(0x186))/0x9+-parseInt(_0x502348(0x184))/0xa;if(_0x2b7738===_0x17abd1)break;else _0x1b2c43['push'](_0x1b2c43['shift']());}catch(_0x5e10b0){_0x1b2c43['push'](_0x1b2c43['shift']());}}}(a11_0x1f11,0x7c06a));import{mkdirSync}from'node:fs';function a11_0x1f11(){const _0xe92fa3=['269356iMnBRw','708064XZrMxi','491886VXupCQ','78EtgHQb','cookie','410216biMBOu','383340GwqRco','12924190CaQBSw','70LUwxMY','3326175meZOzJ','39KkQNPj'];a11_0x1f11=function(){return _0xe92fa3;};return a11_0x1f11();}import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),'.lovrabet');export const cookieFile=join(configDir,a11_0x59123f(0x181));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x281f01,_0x2b4e91){var _0x357f2c=a12_0x4337,_0x1249f7=_0x281f01();while(!![]){try{var _0x4b231b=-parseInt(_0x357f2c(0x75))/0x1*(parseInt(_0x357f2c(0x76))/0x2)+parseInt(_0x357f2c(0x74))/0x3*(parseInt(_0x357f2c(0x77))/0x4)+parseInt(_0x357f2c(0x7e))/0x5+parseInt(_0x357f2c(0x7b))/0x6*(-parseInt(_0x357f2c(0x7a))/0x7)+-parseInt(_0x357f2c(0x79))/0x8*(parseInt(_0x357f2c(0x73))/0x9)+-parseInt(_0x357f2c(0x78))/0xa+parseInt(_0x357f2c(0x72))/0xb*(parseInt(_0x357f2c(0x7c))/0xc);if(_0x4b231b===_0x2b4e91)break;else _0x1249f7['push'](_0x1249f7['shift']());}catch(_0x7d91be){_0x1249f7['push'](_0x1249f7['shift']());}}}(a12_0x49a9,0x8d369));import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';function a12_0x49a9(){var _0x5a708d=['24681ZOnOQm','64387WYEvZd','8LZKCYA','184AvNjcC','6550330XVWxnX','479584OChsmu','8120JFfene','5568cwLIWp','3497652VeENXq','utf-8','5456805yXmRiR','55fACoyK','54eHnMtX'];a12_0x49a9=function(){return _0x5a708d;};return a12_0x49a9();}function a12_0x4337(_0x107ae4,_0x29f7f0){_0x107ae4=_0x107ae4-0x72;var _0x49a973=a12_0x49a9();var _0x4337a6=_0x49a973[_0x107ae4];return _0x4337a6;}export function getCookie(){var _0x2b8433=a12_0x4337;try{return readFileSync(cookieFile,_0x2b8433(0x7d));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3d4e42,_0x373a09){const _0x36aa5f=a13_0x4570,_0x436b1f=_0x3d4e42();while(!![]){try{const _0x2346ea=parseInt(_0x36aa5f(0x1ef))/0x1*(parseInt(_0x36aa5f(0x1fa))/0x2)+parseInt(_0x36aa5f(0x1f4))/0x3*(-parseInt(_0x36aa5f(0x1f0))/0x4)+parseInt(_0x36aa5f(0x1f9))/0x5+-parseInt(_0x36aa5f(0x1f1))/0x6*(-parseInt(_0x36aa5f(0x1f3))/0x7)+-parseInt(_0x36aa5f(0x1f5))/0x8+-parseInt(_0x36aa5f(0x1fb))/0x9+parseInt(_0x36aa5f(0x1f2))/0xa;if(_0x2346ea===_0x373a09)break;else _0x436b1f['push'](_0x436b1f['shift']());}catch(_0x10390f){_0x436b1f['push'](_0x436b1f['shift']());}}}(a13_0x3d96,0x64b03));import{existsSync,readFileSync}from'node:fs';function a13_0x3d96(){const _0x1e25fe=['1133VQffck','528100LrZSAf','89202BKELNK','1924100UONkxe','161NuKkGw','3XfUxLR','1593672TXuUvG','session','utf-8','/api/auth/get-session','459910xtWmnj','778akTzZd','2910753elBtKi'];a13_0x3d96=function(){return _0x1e25fe;};return a13_0x3d96();}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a13_0x4570(_0x28bdeb,_0x181cef){_0x28bdeb=_0x28bdeb-0x1ef;const _0x3d9608=a13_0x3d96();let _0x457020=_0x3d9608[_0x28bdeb];return _0x457020;}export async function getSessionUserInfo(_0x1413d1){const _0x145b54=a13_0x4570;try{if(_0x1413d1===undefined){if(!existsSync(cookieFile))return null;_0x1413d1=readFileSync(cookieFile,_0x145b54(0x1f7));}if(!_0x1413d1)return null;const _0x5b046c=await fetch(getUserDomain()+_0x145b54(0x1f8),{'headers':{'cookie':_0x1413d1}});if(!_0x5b046c['ok'])return null;const _0x3dacf1=await _0x5b046c['json']();if(!_0x3dacf1[_0x145b54(0x1f6)]||!_0x3dacf1['user'])return null;return _0x3dacf1;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a14_0x6746(){const _0x197807=['9113330tRqASv','1253589zshbcd','6152iykGWZ','1041498zOecZg','24fYbPUK','utf-8','307657cqNdeM','530VWTAdA','then','28671599jgHHBT','37188ZVwfca','16lysZxG','json','session','83AVdoEn'];a14_0x6746=function(){return _0x197807;};return a14_0x6746();}function a14_0x4a12(_0x156d9a,_0x595116){_0x156d9a=_0x156d9a-0x9e;const _0x6746a8=a14_0x6746();let _0x4a1246=_0x6746a8[_0x156d9a];return _0x4a1246;}(function(_0x3b8341,_0x5380b0){const _0x5d19b5=a14_0x4a12,_0x103512=_0x3b8341();while(!![]){try{const _0x1253b6=parseInt(_0x5d19b5(0xa3))/0x1*(parseInt(_0x5d19b5(0xa6))/0x2)+-parseInt(_0x5d19b5(0xa5))/0x3+-parseInt(_0x5d19b5(0x9f))/0x4*(parseInt(_0x5d19b5(0xab))/0x5)+parseInt(_0x5d19b5(0xa8))/0x6*(-parseInt(_0x5d19b5(0xaa))/0x7)+-parseInt(_0x5d19b5(0xa0))/0x8*(-parseInt(_0x5d19b5(0xa7))/0x9)+-parseInt(_0x5d19b5(0xa4))/0xa+parseInt(_0x5d19b5(0x9e))/0xb;if(_0x1253b6===_0x5380b0)break;else _0x103512['push'](_0x103512['shift']());}catch(_0x2e7e33){_0x103512['push'](_0x103512['shift']());}}}(a14_0x6746,0x9329b));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x5bce90=a14_0x4a12;try{if(!existsSync(cookieFile))return![];const _0x2bdd16=readFileSync(cookieFile,_0x5bce90(0xa9)),_0x456674=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x2bdd16}})[_0x5bce90(0xac)](_0x535723=>_0x535723[_0x5bce90(0xa1)]());return _0x456674&&_0x456674[_0x5bce90(0xa2)]&&_0x456674['user'];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5824eb,_0x44a4ec){const _0x4239dc=a15_0x4119,_0x76ea7c=_0x5824eb();while(!![]){try{const _0x4b94d8=-parseInt(_0x4239dc(0x1d0))/0x1*(parseInt(_0x4239dc(0x1d4))/0x2)+-parseInt(_0x4239dc(0x1d2))/0x3+parseInt(_0x4239dc(0x1d6))/0x4+parseInt(_0x4239dc(0x1d8))/0x5+parseInt(_0x4239dc(0x1d1))/0x6+parseInt(_0x4239dc(0x1d7))/0x7+parseInt(_0x4239dc(0x1d3))/0x8*(-parseInt(_0x4239dc(0x1cf))/0x9);if(_0x4b94d8===_0x44a4ec)break;else _0x76ea7c['push'](_0x76ea7c['shift']());}catch(_0x179571){_0x76ea7c['push'](_0x76ea7c['shift']());}}}(a15_0x443c,0xa670c));function a15_0x4119(_0x23c1b6,_0x3835b5){_0x23c1b6=_0x23c1b6-0x1cf;const _0x443c8c=a15_0x443c();let _0x41198b=_0x443c8c[_0x23c1b6];return _0x41198b;}export function buildLoginSuccessHtml(){const _0x827d27=a15_0x4119,_0x217663='Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.';return _0x827d27(0x1d5)+_0x217663+'</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>';}function a15_0x443c(){const _0x211dc3=['1100nWlzru','<!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>','4817588kYFxsy','1792343CwWXNG','2563855Avjykb','2117313TWLxJJ','1758PkWxdx','3317694teZAZg','1926807wLtcCd','8DeOthv'];a15_0x443c=function(){return _0x211dc3;};return a15_0x443c();}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a16_0xc6db(){var _0x57574e=['7ujvPnt','1707090wyVbPx','3777876gCKtQR','2318072CHhbNx','2199850hBHXgB','9EGfABM','397925CZvBly','log','✓\x20Logged\x20out','153084OqfhCR','378208GfOjxb'];a16_0xc6db=function(){return _0x57574e;};return a16_0xc6db();}function a16_0x5876(_0x1f8ee3,_0x3b540e){_0x1f8ee3=_0x1f8ee3-0x10a;var _0xc6db47=a16_0xc6db();var _0x587668=_0xc6db47[_0x1f8ee3];return _0x587668;}(function(_0x5bc903,_0x5073bb){var _0x13346b=a16_0x5876,_0x16edda=_0x5bc903();while(!![]){try{var _0xadbfb5=parseInt(_0x13346b(0x10a))/0x1+-parseInt(_0x13346b(0x10d))/0x2*(parseInt(_0x13346b(0x114))/0x3)+parseInt(_0x13346b(0x10e))/0x4+-parseInt(_0x13346b(0x113))/0x5+parseInt(_0x13346b(0x110))/0x6+parseInt(_0x13346b(0x10f))/0x7*(-parseInt(_0x13346b(0x112))/0x8)+parseInt(_0x13346b(0x111))/0x9;if(_0xadbfb5===_0x5073bb)break;else _0x16edda['push'](_0x16edda['shift']());}catch(_0x1f8f25){_0x16edda['push'](_0x16edda['shift']());}}}(a16_0xc6db,0x39f59));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function logout(){var _0x1b71b1=a16_0x5876;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x1b71b1(0x10b)](_0x1b71b1(0x10c))):console[_0x1b71b1(0x10b)]('!\x20Not\x20logged\x20in');}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x28060e=a17_0x18aa;(function(_0x65a939,_0x55dc71){const _0xfa7db3=a17_0x18aa,_0x35f33d=_0x65a939();while(!![]){try{const _0x32a1fc=-parseInt(_0xfa7db3(0xe7))/0x1*(-parseInt(_0xfa7db3(0xe5))/0x2)+-parseInt(_0xfa7db3(0xed))/0x3*(-parseInt(_0xfa7db3(0xeb))/0x4)+parseInt(_0xfa7db3(0xea))/0x5*(parseInt(_0xfa7db3(0xe4))/0x6)+parseInt(_0xfa7db3(0xf0))/0x7*(-parseInt(_0xfa7db3(0xe6))/0x8)+parseInt(_0xfa7db3(0xe3))/0x9*(parseInt(_0xfa7db3(0xef))/0xa)+parseInt(_0xfa7db3(0xec))/0xb*(parseInt(_0xfa7db3(0xe8))/0xc)+-parseInt(_0xfa7db3(0xee))/0xd;if(_0x32a1fc===_0x55dc71)break;else _0x35f33d['push'](_0x35f33d['shift']());}catch(_0x24ff1f){_0x35f33d['push'](_0x35f33d['shift']());}}}(a17_0x8db2,0x425ff));function a17_0x8db2(){const _0x343068=['252816drkiPc','12934428VDRfSU','10270tVHgEH','39256KkijKF','3213pzvxRO','4434hrHJcq','180oKqDrm','384oFiYqh','3156jthWDJ','2224740iXpUOJ','boolean','2455FTDZLT','16CFrPNN','11LQArfK'];a17_0x8db2=function(){return _0x343068;};return a17_0x8db2();}function a17_0x18aa(_0x5b8d40,_0x2957e1){_0x5b8d40=_0x5b8d40-0xe3;const _0x8db24b=a17_0x8db2();let _0x18aa03=_0x8db24b[_0x5b8d40];return _0x18aa03;}export const dynamicCliFlags={'enableBffSave':{'type':a17_0x28060e(0xe9)}};
|