@lovrabet/rabetbase-cli 2.5.10-beta.1 → 2.5.10-beta.2
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.d.ts +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +0 -28
- 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.d.ts +8 -0
- package/lib/core/instant-api-policy/endpoints.js +1 -0
- package/lib/core/kb-management-client.d.ts +3 -9
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +1 -4
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a0_0x8067(_0xc02a40,_0x12ec79){_0xc02a40=_0xc02a40-0x1a2;const _0x2b5b08=a0_0x2b5b();let _0x80672f=_0x2b5b08[_0xc02a40];return _0x80672f;}const a0_0x141546=a0_0x8067;(function(_0x29a5ca,_0x53edf4){const _0x12423a=a0_0x8067,_0x3964ac=_0x29a5ca();while(!![]){try{const _0x2a6d8d=parseInt(_0x12423a(0x1b9))/0x1*(parseInt(_0x12423a(0x1a8))/0x2)+parseInt(_0x12423a(0x1a3))/0x3+parseInt(_0x12423a(0x1ae))/0x4+parseInt(_0x12423a(0x1ac))/0x5+parseInt(_0x12423a(0x1ab))/0x6+-parseInt(_0x12423a(0x1b2))/0x7+-parseInt(_0x12423a(0x1af))/0x8;if(_0x2a6d8d===_0x53edf4)break;else _0x3964ac['push'](_0x3964ac['shift']());}catch(_0x28f5be){_0x3964ac['push'](_0x3964ac['shift']());}}}(a0_0x2b5b,0x4c650));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x270ecb from'node:path';import{fetchDatasetDoc}from'../core/api-client.js';import{logger}from'../utils/logger.js';export{fetchDatasetDoc}from'../core/api-client.js';function delay(_0x14406a){return new Promise(_0x529cdf=>setTimeout(_0x529cdf,_0x14406a));}function a0_0x2b5b(){const _0x543a82=['4ogAWsO','push','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','message','171165vwVLGD','.md','success','datasetCode','join','114184HtuKbS','tableName','✗\x20Failed:\x20','3701730IelsPu','469255dnDsnI','name','1604560BJrVbu','5686832OkHTUQ','log','api-doc','2615221gnFUSl','error','Failed\x20to\x20generate\x20docs:\x20','✓\x20Generated:\x20','./docs','length','Generated\x20docs\x20successfully:\x20'];a0_0x2b5b=function(){return _0x543a82;};return a0_0x2b5b();}export async function generateDatasetDocs(_0x2a3d59,_0x2c3fe8,_0xc95968,_0x4eaef0=a0_0x141546(0x1b6),_0x4f19c8,_0x10b393){const _0x47af36=a0_0x141546;mkdirSync(_0x4eaef0,{'recursive':!![]});const _0x5188a1=[],_0x5a9ac0=_0x2a3d59[_0x47af36(0x1b7)];console[_0x47af36(0x1b0)]('\x0a'+_0x5a9ac0+_0x47af36(0x1bb));for(let _0x25ab8a=0x0;_0x25ab8a<_0x2a3d59[_0x47af36(0x1b7)];_0x25ab8a++){const _0x477c20=_0x2a3d59[_0x25ab8a],_0x1a7888=_0x25ab8a+0x1,_0x370f99=_0x477c20[_0x47af36(0x1a9)];try{console[_0x47af36(0x1b0)]('['+_0x1a7888+'/'+_0x5a9ac0+']\x20Generating:\x20'+_0x370f99+'.md\x20('+_0x477c20[_0x47af36(0x1ad)]+')');if(_0x4f19c8)_0x4f19c8(_0x1a7888,_0x5a9ac0,_0x370f99);const _0x92a4a0=await fetchDatasetDoc({'appCode':_0x2c3fe8,'cookie':_0xc95968,'datasetCode':_0x477c20[_0x47af36(0x1a6)],'datasetId':_0x477c20['id'],'enableAI':![],'extraParams':_0x10b393}),_0x57f6db=a0_0x270ecb[_0x47af36(0x1a7)](_0x4eaef0,_0x370f99+_0x47af36(0x1a4));writeFileSync(_0x57f6db,_0x92a4a0,{'encoding':'utf8'}),console[_0x47af36(0x1b0)](_0x47af36(0x1b5)+_0x370f99+'.md'),logger[_0x47af36(0x1a5)]('api-doc',_0x47af36(0x1b8)+_0x370f99,undefined,{'datasetCode':_0x477c20[_0x47af36(0x1a6)],'datasetName':_0x477c20['name'],'filePath':_0x57f6db,'progress':_0x1a7888+'/'+_0x5a9ac0}),_0x5188a1[_0x47af36(0x1ba)]({'datasetCode':_0x477c20[_0x47af36(0x1a6)],'datasetName':_0x477c20[_0x47af36(0x1ad)],'filePath':_0x57f6db,'success':!![]});if(_0x1a7888<_0x5a9ac0)await delay(0x1388);}catch(_0xa80fe7){const _0xd162fc=_0xa80fe7 instanceof Error?_0xa80fe7[_0x47af36(0x1a2)]:String(_0xa80fe7);console['log'](_0x47af36(0x1aa)+_0x370f99+'.md\x20-\x20'+_0xd162fc),logger[_0x47af36(0x1b3)](_0x47af36(0x1b1),_0x47af36(0x1b4)+_0x477c20[_0x47af36(0x1a6)],{'datasetCode':_0x477c20[_0x47af36(0x1a6)],'datasetName':_0x477c20[_0x47af36(0x1ad)],'error':_0xd162fc,'progress':_0x1a7888+'/'+_0x5a9ac0}),_0x5188a1[_0x47af36(0x1ba)]({'datasetCode':_0x477c20['datasetCode'],'datasetName':_0x477c20[_0x47af36(0x1ad)],'filePath':'','success':![],'error':_0xd162fc}),_0x1a7888<_0x5a9ac0&&(console[_0x47af36(0x1b0)]('Waiting\x203\x20seconds...\x0a'),await delay(0xbb8));}}return _0x5188a1;}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x3d1f9b=a1_0x4bde;(function(_0x12fea3,_0x301c61){const _0x12d871=a1_0x4bde,_0x49b578=_0x12fea3();while(!![]){try{const _0x132de1=parseInt(_0x12d871(0xaa))/0x1+parseInt(_0x12d871(0x9a))/0x2+-parseInt(_0x12d871(0xb5))/0x3*(parseInt(_0x12d871(0xa2))/0x4)+-parseInt(_0x12d871(0xaf))/0x5+-parseInt(_0x12d871(0xb4))/0x6*(parseInt(_0x12d871(0x99))/0x7)+parseInt(_0x12d871(0xad))/0x8*(-parseInt(_0x12d871(0x97))/0x9)+parseInt(_0x12d871(0xa1))/0xa;if(_0x132de1===_0x301c61)break;else _0x49b578['push'](_0x49b578['shift']());}catch(_0x29ad0){_0x49b578['push'](_0x49b578['shift']());}}}(a1_0x5f4a,0xe383e));import a1_0x1715bd from'node:path';function a1_0x5f4a(){const _0xd7196=['apiGroup','push','API\x20directory\x20\x22','1518152gotZHq','outputDir','values','6936152iQTJiN','length','2923985wTMXHW','filter','name','normalizedApiDir','API\x20group\x20\x22','222Xgsazl','27sxymZI','map','validation','resolve','9AwGkgi','get','112273IYpvJf','3512822CBQWko','.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.','set','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','add','Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.','join','13040670MWENdS','711764NdnTHy','size','cwd','some','trim'];a1_0x5f4a=function(){return _0xd7196;};return a1_0x5f4a();}import{CliErrors}from'../errors.js';function a1_0x4bde(_0x10b693,_0x32d0f7){_0x10b693=_0x10b693-0x94;const _0x5f4a66=a1_0x5f4a();let _0x4bde99=_0x5f4a66[_0x10b693];return _0x4bde99;}export function normalizeApiDir(_0x2cc8b3,_0x2dc387=process[a1_0x3d1f9b(0xa4)]()){const _0x27ae6d=a1_0x3d1f9b;return a1_0x1715bd[_0x27ae6d(0x96)](_0x2dc387,_0x2cc8b3);}function normalizedApiGroup(_0xfbf348){const _0x8d07a3=a1_0x3d1f9b,_0x14830f=_0xfbf348?.[_0x8d07a3(0xa6)]();return _0x14830f||undefined;}export function resolveApiProfileLayouts(_0x4ece68,_0x3dfe33,_0x578235=process['cwd']()){const _0x126f00=a1_0x3d1f9b,_0x484669=_0x4ece68[_0x126f00(0x94)](_0x28d2de=>{const _0x1cd4cf=_0x126f00,_0x1b9655=_0x3dfe33(_0x28d2de);return{'app':_0x28d2de,'outputDir':_0x1b9655,'normalizedApiDir':normalizeApiDir(_0x1b9655,_0x578235),'apiGroup':normalizedApiGroup(_0x28d2de[_0x1cd4cf(0xa7)])};}),_0x185fda=new Map();for(const _0x5ce551 of _0x484669){if(!_0x5ce551[_0x126f00(0xa7)])continue;const _0xa9de8=_0x185fda['get'](_0x5ce551[_0x126f00(0xa7)])??new Set();_0xa9de8[_0x126f00(0x9e)](_0x5ce551[_0x126f00(0xb2)]),_0x185fda['set'](_0x5ce551[_0x126f00(0xa7)],_0xa9de8);}for(const [_0x583e91,_0x172b12]of _0x185fda){if(_0x172b12[_0x126f00(0xa3)]>0x1)throw CliErrors['validation'](_0x126f00(0xb3)+_0x583e91+'\x22\x20resolves\x20to\x20multiple\x20API\x20directories.',_0x126f00(0x9f));}const _0x4be1e=new Map();for(const _0x2dec40 of _0x484669){const _0xffc1e7=_0x4be1e[_0x126f00(0x98)](_0x2dec40['normalizedApiDir'])??[];_0xffc1e7[_0x126f00(0xa8)](_0x2dec40),_0x4be1e[_0x126f00(0x9c)](_0x2dec40[_0x126f00(0xb2)],_0xffc1e7);}for(const _0x517b7a of _0x4be1e[_0x126f00(0xac)]()){const _0x4b2fb6=new Set(_0x517b7a['flatMap'](_0x72c616=>_0x72c616[_0x126f00(0xa7)]?[_0x72c616[_0x126f00(0xa7)]]:[]));if(_0x4b2fb6[_0x126f00(0xa3)]===0x0)continue;if(_0x4b2fb6[_0x126f00(0xa3)]>0x1||_0x517b7a[_0x126f00(0xa5)](_0x121960=>!_0x121960[_0x126f00(0xa7)])){const _0x5ef633=_0x517b7a['map'](_0x8d0da5=>_0x8d0da5['app'][_0x126f00(0xb1)])[_0x126f00(0xa0)](',\x20');throw CliErrors[_0x126f00(0x95)](_0x126f00(0xa9)+_0x517b7a[0x0][_0x126f00(0xab)]+_0x126f00(0x9d),'Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20'+_0x5ef633+_0x126f00(0x9b));}}return _0x484669;}export function getRegistryGroup(_0x352ea7,_0x34a163){const _0x1a7eee=a1_0x3d1f9b;if(_0x34a163['apiGroup'])return _0x352ea7['filter'](_0x1b5434=>_0x1b5434[_0x1a7eee(0xa7)]===_0x34a163[_0x1a7eee(0xa7)]);const _0x24aff9=_0x352ea7[_0x1a7eee(0xb0)](_0x28cada=>_0x28cada['normalizedApiDir']===_0x34a163[_0x1a7eee(0xb2)]);return _0x24aff9[_0x1a7eee(0xae)]===0x1?_0x24aff9:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x34f329,_0x5448fe){var _0x34c228=a2_0x2e0b,_0x38f7af=_0x34f329();while(!![]){try{var _0x268954=parseInt(_0x34c228(0x14f))/0x1*(parseInt(_0x34c228(0x14c))/0x2)+-parseInt(_0x34c228(0x14b))/0x3+-parseInt(_0x34c228(0x14a))/0x4+-parseInt(_0x34c228(0x146))/0x5+-parseInt(_0x34c228(0x14e))/0x6+-parseInt(_0x34c228(0x147))/0x7*(-parseInt(_0x34c228(0x149))/0x8)+parseInt(_0x34c228(0x148))/0x9*(parseInt(_0x34c228(0x14d))/0xa);if(_0x268954===_0x5448fe)break;else _0x38f7af['push'](_0x38f7af['shift']());}catch(_0x4860d6){_0x38f7af['push'](_0x38f7af['shift']());}}}(a2_0x5d04,0x343d3));function a2_0x2e0b(_0x16da34,_0x241d55){_0x16da34=_0x16da34-0x146;var _0x5d0480=a2_0x5d04();var _0x2e0ba2=_0x5d0480[_0x16da34];return _0x2e0ba2;}export{fetchModelList}from'../core/api-client.js';function a2_0x5d04(){var _0x3c8ea0=['250201asgqGD','9SNhoWk','56VKdyJR','850276DZEUXj','798315Qwkgbp','109038Gpavpx','5861620nZMQoT','1673304zUbDXZ','3dbcjFT','141955HODZus'];a2_0x5d04=function(){return _0x3c8ea0;};return a2_0x5d04();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5f4055,_0x20a539){const _0x14078b=a3_0xa446,_0x1298f1=_0x5f4055();while(!![]){try{const _0x1c20c8=parseInt(_0x14078b(0xf1))/0x1+-parseInt(_0x14078b(0xe2))/0x2*(parseInt(_0x14078b(0x11a))/0x3)+parseInt(_0x14078b(0x108))/0x4*(-parseInt(_0x14078b(0x107))/0x5)+parseInt(_0x14078b(0xdf))/0x6*(-parseInt(_0x14078b(0xfa))/0x7)+-parseInt(_0x14078b(0xf9))/0x8+parseInt(_0x14078b(0x112))/0x9+parseInt(_0x14078b(0x119))/0xa*(parseInt(_0x14078b(0xef))/0xb);if(_0x1c20c8===_0x20a539)break;else _0x1298f1['push'](_0x1298f1['shift']());}catch(_0x467473){_0x1298f1['push'](_0x1298f1['shift']());}}}(a3_0x44c9,0xda380));import a3_0x384935 from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x1a66c1 from'node:path';import{fileURLToPath}from'node:url';function a3_0x44c9(){const _0x20965e=['13517128yNNRQu','2360183nMqdfa','resolve','allowEmptyModelReplacement','Please\x20configure\x20app\x20code\x20first\x20via\x20`','typescript','-client','existed','toUpperCase','\x20config\x20set\x20app\x20<value>`','path','APP_','utf8','replace','17530kXsxqJ','1788vZAfMX','join','API\x20scaffold\x20written.','stringify','action','tableName','modelProfile','missing','LOVRABET_RUNTIME_DOMAIN','created','6730281PqWHtg','client','success','defaultName','alias','CONFIG_NAMES.DEFAULT','replaceApiContent','646210pihdhJ','3ZRGJUK','30SMWHJE','scaffoldMode','api','1735514KJdnbU','default','client.ts.tpl','includes','name',',\x20...LOVRABET_SDK_CONFIG\x20}','.ts','none','modelRuntime','length','format','templates/generate-api','\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.','737PfGycn','test','1626833pvMaWf','refreshed','datasetCode','overwriteTypescript','../..',',\x20env:\x20','preserved','api.ts.tpl'];a3_0x44c9=function(){return _0x20965e;};return a3_0x44c9();}import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a3_0xa446(_0x5ba518,_0x23aa36){_0x5ba518=_0x5ba518-0xdf;const _0x44c990=a3_0x44c9();let _0xa44620=_0x44c990[_0x5ba518];return _0xa44620;}import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';import{generateSdkConfigFile}from'../api/generate-sdk-config-file.js';import{MODEL_REGISTRY_FILE_NAME,MODEL_RUNTIME_FILE_NAME,updateModelRegistry}from'../api/model-registry-file.js';import{renderModelRegistryScaffold}from'../api/model-registry-scaffold.js';function fileAction(_0x314ea1,_0x4df5b3){const _0x2c4dd5=a3_0xa446;if(!_0x4df5b3)return _0x314ea1?_0x2c4dd5(0xf7):'missing';return _0x314ea1?'overwritten':_0x2c4dd5(0x111);}export async function generateApiFile(_0xb2cee7,_0x201c4e,_0x2729bb,_0x23fb81,_0x48dd66,_0x2ad46c,_0x3698df,_0xeaafa9={},_0x20e5b5={}){const _0x52245f=a3_0xa446;if(!_0x2729bb)throw new Error(_0x52245f(0xfd)+CLI_BIN_NAME+_0x52245f(0x102));const _0x4505e7=_0x23fb81&&!_0x3698df,_0x588290=!!_0x20e5b5[_0x52245f(0x10e)],_0x4b3ad9=_0x588290||_0x4505e7,_0x149404=_0x3698df||_0x2729bb,_0x2f5a90=_0x588290||_0x4505e7?_0x52245f(0xe3):_0x149404,_0x424f08=_0x588290||_0x4505e7?_0x52245f(0x117):JSON['stringify'](_0x149404),_0xb099c6=!isProduction(_0x48dd66),_0x4c9f91=_0xb099c6?_0x52245f(0xf6)+JSON[_0x52245f(0x10b)](_0x48dd66):'',_0x838f76='{\x20apiConfigName:\x20'+_0x424f08+_0x4c9f91+_0x52245f(0xe7),_0x1c911e=_0x588290?'':_0x201c4e,_0x3cb474=_0x1c911e?_0x1c911e+'-api':_0x52245f(0xe1),_0x8bdc9=_0x1c911e?_0x1c911e+_0x52245f(0xff):_0x52245f(0x113),_0x226dee=_0x1c911e&&!/^app-[a-f0-9]+$/i['test'](_0x1c911e)?_0x1c911e[_0x52245f(0x106)](/-/g,'_')[_0x52245f(0x101)]():'LOVRABET',_0x26d530=/^\d/[_0x52245f(0xf0)](_0x226dee)?_0x52245f(0x104)+_0x226dee:_0x226dee,_0xf2bd91=_0xb2cee7['map'](_0xe9664f=>({'datasetCode':_0xe9664f[_0x52245f(0xf3)],'tableName':_0xe9664f[_0x52245f(0x10d)],'name':_0xe9664f[_0x52245f(0xe6)]||'','alias':_0xe9664f[_0x52245f(0x116)]||_0xe9664f['key']})),_0x18909f=fileURLToPath(import.meta.url),_0x32ed30=a3_0x1a66c1[_0x52245f(0xfb)](a3_0x1a66c1['dirname'](_0x18909f),_0x52245f(0xf5)),_0x36b324=a3_0x1a66c1['join'](_0x32ed30,_0x52245f(0xed)),_0x1af4e3=a3_0x1a66c1[_0x52245f(0x109)](_0x36b324,_0x52245f(0xf8)),_0x9dab83=a3_0x1a66c1['join'](_0x36b324,_0x52245f(0xe4)),_0x577d46=_0x2ad46c;mkdirSync(_0x577d46,{'recursive':!![]});const _0x2ebc21=_0x588290?{}:_0xeaafa9,_0x3d8a06=await generateSdkConfigFile(_0x577d46,_0x2ebc21,_0x1c911e),_0x52eb6b=a3_0x1a66c1['basename'](_0x3d8a06,_0x52245f(0xe8)),_0x456c73=a3_0x1a66c1['join'](_0x577d46,_0x3cb474+_0x52245f(0xe8)),_0x3f1893=a3_0x1a66c1[_0x52245f(0x109)](_0x577d46,_0x8bdc9+_0x52245f(0xe8)),_0x42017b=_0x20e5b5[_0x52245f(0xf4)]===!![],_0x55f5cf=existsSync(_0x456c73),_0x241fee=existsSync(_0x3f1893),_0xed0c3=_0x20e5b5[_0x52245f(0xe0)]??(_0x42017b?_0x52245f(0x106):_0x52245f(0x10f)),_0x499cab=_0xed0c3===_0x52245f(0x106)||_0xed0c3===_0x52245f(0x10f)&&!_0x55f5cf,_0x29d0f7=_0xed0c3===_0x52245f(0x106)||_0xed0c3===_0x52245f(0x10f)&&!_0x241fee,_0x41a94b=_0x20e5b5[_0x52245f(0x10e)]?updateModelRegistry({'outputDir':_0x577d46,'profileName':_0x20e5b5[_0x52245f(0x10e)][_0x52245f(0xe6)],'defaultProfile':_0x20e5b5[_0x52245f(0x10e)][_0x52245f(0x115)],'appCode':_0x2729bb,'runtimeDomain':_0x20e5b5[_0x52245f(0x10e)]['runtimeDomain'],'models':_0xf2bd91,'allowEmptyReplacement':_0x20e5b5[_0x52245f(0xfc)]===!![]}):undefined,_0x3c8bc6=_0x41a94b?a3_0x1a66c1['join'](_0x577d46,MODEL_RUNTIME_FILE_NAME):undefined,_0x9a8897=_0x3c8bc6?existsSync(_0x3c8bc6):![],_0x4eda61=_0x588290&&_0xed0c3!==_0x52245f(0xe9)?await renderModelRegistryScaffold(_0x577d46):undefined;_0x3c8bc6&&_0x4eda61&&writeFileSync(_0x3c8bc6,_0x4eda61[_0x52245f(0xea)],'utf8');const _0x29c34b=_0xf2bd91[0x0]?.[_0x52245f(0x116)];if(_0x499cab){const _0x5eeead=_0x4eda61?.[_0x52245f(0xe1)]??readFileSync(_0x1af4e3,_0x52245f(0x105)),_0x4c85cf=_0x588290?_0x5eeead:TemplateReplacer[_0x52245f(0x118)](_0x5eeead,_0x2729bb,_0xf2bd91,_0x29c34b,_0x3cb474,_0x424f08,undefined,_0x26d530);writeFileSync(_0x456c73,await a3_0x384935[_0x52245f(0xec)](_0x4c85cf,{'parser':_0x52245f(0xfe)}),{'encoding':_0x52245f(0x105)});}if(_0x29d0f7){const _0x10671f=_0x4eda61?.[_0x52245f(0x113)]??readFileSync(_0x9dab83,'utf8'),_0x36a5d5=_0x588290?_0x10671f:TemplateReplacer[_0x52245f(0x118)](_0x10671f,_0x2729bb,_0xf2bd91,_0x29c34b,_0x3cb474,_0x424f08,_0x838f76,_0x26d530,_0x52eb6b);writeFileSync(_0x3f1893,await a3_0x384935['format'](_0x36a5d5,{'parser':'typescript'}),{'encoding':'utf8'});}const _0x3dcbb2=_0xf2bd91[_0x52245f(0xeb)],_0x4548dc={'api':{'path':_0x456c73,'action':fileAction(_0x55f5cf,_0x499cab)},'client':{'path':_0x3f1893,'action':fileAction(_0x241fee,_0x29d0f7)},'sdkConfig':{'path':_0x3d8a06,'action':'refreshed'},..._0x41a94b?{'modelRegistry':{'path':_0x41a94b[_0x52245f(0x103)],'action':_0x41a94b[_0x52245f(0x100)]?_0x52245f(0xf2):_0x52245f(0x111)},'modelRuntime':{'path':_0x3c8bc6,'action':_0x4eda61?_0x9a8897?'refreshed':_0x52245f(0x111):_0x9a8897?_0x52245f(0xf7):_0x52245f(0x10f)}}:{}},_0xfea0b0=existsSync(_0x456c73)&&readFileSync(_0x456c73,_0x52245f(0x105))[_0x52245f(0xe5)](MODEL_REGISTRY_FILE_NAME[_0x52245f(0x106)](_0x52245f(0xe8),'')),_0x2bf97e=existsSync(_0x3f1893)&&readFileSync(_0x3f1893,_0x52245f(0x105))[_0x52245f(0xe5)](_0x52245f(0x110)),_0xaee925=_0x588290?!_0xfea0b0||!_0x2bf97e||!existsSync(_0x3c8bc6):![],_0xe0a04c=_0x588290?_0xaee925:_0x4548dc[_0x52245f(0xe1)][_0x52245f(0x10c)]==='preserved'||_0x4548dc[_0x52245f(0x113)][_0x52245f(0x10c)]==='preserved';return logger[_0x52245f(0x114)]('init-api',_0xe0a04c?a3_0x1a66c1['basename'](_0x3d8a06)+_0x52245f(0xee):_0x588290?'Model\x20facts\x20refreshed.':_0x52245f(0x10a),undefined,{'apiFile':_0x456c73,'clientFile':_0x3f1893,'sdkConfig':_0x3d8a06,'modelCount':_0x3dcbb2,'configName':_0x2f5a90,'isDefaultConfig':_0x4b3ad9,'needsAgentMerge':_0xe0a04c,'needsProjectUpgrade':_0xaee925,'files':_0x4548dc}),{'appCode':_0x2729bb,'modelCount':_0x3dcbb2,'models':_0xf2bd91,'apiFilePath':_0x456c73,'clientFilePath':_0x3f1893,'sdkConfigPath':_0x3d8a06,'modelRegistryPath':_0x41a94b?.[_0x52245f(0x103)],'modelRuntimePath':_0x3c8bc6,'modelProfile':_0x20e5b5[_0x52245f(0x10e)]?.[_0x52245f(0xe6)],'configName':_0x2f5a90,'isDefaultConfig':_0x4b3ad9,'sdkRouting':_0x2ebc21,'files':_0x4548dc,'needsAgentMerge':_0xe0a04c,'needsProjectUpgrade':_0xaee925};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2fc398,_0x9ff17c){const _0x8d77b5=a4_0x59d7,_0x469dd7=_0x2fc398();while(!![]){try{const _0x233e9c=-parseInt(_0x8d77b5(0x15f))/0x1+parseInt(_0x8d77b5(0x167))/0x2+-parseInt(_0x8d77b5(0x165))/0x3+parseInt(_0x8d77b5(0x159))/0x4+parseInt(_0x8d77b5(0x157))/0x5*(-parseInt(_0x8d77b5(0x163))/0x6)+-parseInt(_0x8d77b5(0x15c))/0x7+parseInt(_0x8d77b5(0x169))/0x8;if(_0x233e9c===_0x9ff17c)break;else _0x469dd7['push'](_0x469dd7['shift']());}catch(_0x45ed82){_0x469dd7['push'](_0x469dd7['shift']());}}}(a4_0x2a24,0xce310));function a4_0x2a24(){const _0x5a2e86=['\x20as\x20const;\x0a','-sdk-config.ts','5909792JRttqc','join','length','114162kKjULp','push',',\x0a}','stringify','6oHEuGf','format','1864407DnutLU','{\x0a\x20\x20','367446OJAxwq','runtimeDomain','18757112CBiZOg',',\x0a\x20\x20','utf8','runtimeDomain:\x20','5356255yjbfaP','/**\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','3869344PISKWK'];a4_0x2a24=function(){return _0x5a2e86;};return a4_0x2a24();}import{mkdirSync,writeFileSync}from'node:fs';function a4_0x59d7(_0x4797cb,_0x873c7e){_0x4797cb=_0x4797cb-0x155;const _0x2a24ee=a4_0x2a24();let _0x59d7d5=_0x2a24ee[_0x4797cb];return _0x59d7d5;}import a4_0x263aa1 from'node:path';import a4_0x5c39c6 from'prettier';export const SDK_CONFIG_FILE_NAME='sdk-config.ts';export function getSdkConfigFileName(_0x4680e5=''){const _0x187953=a4_0x59d7;return _0x4680e5?_0x4680e5+_0x187953(0x15b):SDK_CONFIG_FILE_NAME;}export async function generateSdkConfigFile(_0x16bb34,_0x34be97={},_0x212eac=''){const _0x476556=a4_0x59d7,_0x5c39fa=[];_0x34be97[_0x476556(0x168)]&&_0x5c39fa[_0x476556(0x160)](_0x476556(0x156)+JSON[_0x476556(0x162)](_0x34be97['runtimeDomain']));const _0x96a780=_0x5c39fa[_0x476556(0x15e)]>0x0?_0x476556(0x166)+_0x5c39fa[_0x476556(0x15d)](_0x476556(0x16a))+_0x476556(0x161):'{}',_0x2a59d2=_0x476556(0x158)+_0x96a780+_0x476556(0x15a);mkdirSync(_0x16bb34,{'recursive':!![]});const _0x4ff9db=a4_0x263aa1[_0x476556(0x15d)](_0x16bb34,getSdkConfigFileName(_0x212eac));return writeFileSync(_0x4ff9db,await a4_0x5c39c6[_0x476556(0x164)](_0x2a59d2,{'parser':'typescript'}),_0x476556(0x155)),_0x4ff9db;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x25d40a,_0x4af624){const _0x39ea8f=a5_0x46da,_0x5eea93=_0x25d40a();while(!![]){try{const _0x3d21ae=parseInt(_0x39ea8f(0xae))/0x1*(-parseInt(_0x39ea8f(0xa8))/0x2)+-parseInt(_0x39ea8f(0xb0))/0x3+-parseInt(_0x39ea8f(0xab))/0x4*(parseInt(_0x39ea8f(0xa4))/0x5)+-parseInt(_0x39ea8f(0xa1))/0x6*(-parseInt(_0x39ea8f(0xa3))/0x7)+-parseInt(_0x39ea8f(0x9e))/0x8+parseInt(_0x39ea8f(0xa7))/0x9+parseInt(_0x39ea8f(0xad))/0xa;if(_0x3d21ae===_0x4af624)break;else _0x5eea93['push'](_0x5eea93['shift']());}catch(_0x4b1989){_0x5eea93['push'](_0x5eea93['shift']());}}}(a5_0xfc5e,0x3a7f9));export function parseLegacyApiModels(_0x3b3351){const _0xb2b007=a5_0x46da,_0x25fb22=[],_0x13acc2=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x937eca;while((_0x937eca=_0x13acc2[_0xb2b007(0xaf)](_0x3b3351))!==null){_0x25fb22['push']({'datasetCode':_0x937eca[0x1],'tableName':_0x937eca[0x2],'name':_0x937eca[0x3],'alias':_0x937eca[0x4]});}return _0x25fb22;}export function parseLegacyApiAppCode(_0x54ef5d){return _0x54ef5d['match'](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function stripComments(_0xe868f4){const _0x51b99b=a5_0x46da;return _0xe868f4[_0x51b99b(0x9f)](/\/\*[\s\S]*?\*\//g,'')[_0x51b99b(0x9f)](/\/\/.*$/gm,'');}function a5_0xfc5e(){const _0x2ebb19=['4XCzmLS','matchAll','4072560YgYHCi','821CoiEmx','exec','159033cNLttZ','length','MODELS_CONFIG','APP_CODE','map','lovrabetClient','597472hYXjqC','replace','Generated\x20by\x20Rabetbase\x20CLI','62742ZEsmAn','registerModels','7qIokaQ','508855cOFDOp','endsWith','@lovrabet/sdk','2760237bcuHvl','622xKrCGU','includes','some'];a5_0xfc5e=function(){return _0x2ebb19;};return a5_0xfc5e();}export function isLegacyGeneratedApiScaffold(_0x1332d1){const _0x497a36=a5_0x46da;if(!_0x1332d1['includes'](_0x497a36(0xa0)))return![];const _0x2bdf38=stripComments(_0x1332d1),_0x39152d=[..._0x2bdf38['matchAll'](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)][_0x497a36(0x9c)](_0x261384=>_0x261384[0x1]);if(_0x39152d['length']!==0x1||_0x39152d[0x0]!==_0x497a36(0xa6))return![];const _0x1d326e=[..._0x2bdf38[_0x497a36(0xac)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x497a36(0x9c)](_0x3c44d4=>_0x3c44d4[0x1]);if(_0x1d326e['length']!==0x2||!_0x1d326e['some'](_0x285cba=>_0x285cba['endsWith'](_0x497a36(0x9b)))||!_0x1d326e['some'](_0x13839d=>_0x13839d[_0x497a36(0xa5)](_0x497a36(0xb2))))return![];const _0x124498=[..._0x2bdf38[_0x497a36(0xac)](/^([A-Za-z_$][\w$]*)\s*\(/gm)]['map'](_0x1594ea=>_0x1594ea[0x1]);return _0x124498['length']===0x1&&_0x124498[0x0]===_0x497a36(0xa2);}function a5_0x46da(_0x22c8a9,_0x106025){_0x22c8a9=_0x22c8a9-0x9b;const _0xfc5ef6=a5_0xfc5e();let _0x46da64=_0xfc5ef6[_0x22c8a9];return _0x46da64;}export function isLegacyGeneratedClientScaffold(_0x16ee69){const _0x1d5340=a5_0x46da;if(!_0x16ee69[_0x1d5340(0xa9)](_0x1d5340(0xa0)))return![];const _0x13a332=stripComments(_0x16ee69),_0x5188cf=[..._0x13a332['matchAll'](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)]['map'](_0x7f443a=>_0x7f443a[0x1]);if(_0x5188cf[_0x1d5340(0xaa)](_0x3567a0=>_0x3567a0!==_0x1d5340(0xa6)&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/['test'](_0x3567a0??'')))return![];const _0x58dc30=[..._0x13a332['matchAll'](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x1d5340(0x9c)](_0x245b77=>_0x245b77[0x1]);return _0x58dc30[_0x1d5340(0xb1)]===0x1&&_0x58dc30[0x0]===_0x1d5340(0x9d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x906e4c=a6_0x4b21;(function(_0x2f50f6,_0x578d14){const _0x3a2d34=a6_0x4b21,_0x2081d1=_0x2f50f6();while(!![]){try{const _0x44cfd8=parseInt(_0x3a2d34(0x10d))/0x1*(parseInt(_0x3a2d34(0x100))/0x2)+-parseInt(_0x3a2d34(0xed))/0x3*(-parseInt(_0x3a2d34(0x112))/0x4)+parseInt(_0x3a2d34(0x103))/0x5+-parseInt(_0x3a2d34(0xf5))/0x6*(parseInt(_0x3a2d34(0x10e))/0x7)+parseInt(_0x3a2d34(0x102))/0x8+-parseInt(_0x3a2d34(0xfe))/0x9*(parseInt(_0x3a2d34(0x119))/0xa)+parseInt(_0x3a2d34(0x121))/0xb;if(_0x44cfd8===_0x578d14)break;else _0x2081d1['push'](_0x2081d1['shift']());}catch(_0x43a04b){_0x2081d1['push'](_0x2081d1['shift']());}}}(a6_0x3ab9,0x5f5a4));function a6_0x4b21(_0x49a64c,_0x24da0b){_0x49a64c=_0x49a64c-0xdd;const _0x3ab98a=a6_0x3ab9();let _0x4b210f=_0x3ab98a[_0x49a64c];return _0x4b210f;}import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x282403 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x906e4c(0xf8);export const MODEL_RUNTIME_FILE_NAME=a6_0x906e4c(0xe2);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x906e4c(0x124);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x906e4c(0x10a),REGISTRY_START='/*\x20rabetbase-model-registry:start\x20*/',REGISTRY_END=a6_0x906e4c(0x114);function emptyRegistry(_0x1b5026){return{'defaultProfile':_0x1b5026,'profiles':{},'models':[]};}function extractRegistryJson(_0x36b031){const _0x4b853c=a6_0x906e4c,_0x418e83=_0x36b031['indexOf'](REGISTRY_START),_0x5b31b4=_0x36b031['indexOf'](REGISTRY_END);if(_0x418e83<0x0||_0x5b31b4<=_0x418e83)return undefined;return _0x36b031[_0x4b853c(0xff)](_0x418e83+REGISTRY_START[_0x4b853c(0xf0)],_0x5b31b4)[_0x4b853c(0x110)]()[_0x4b853c(0xe0)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x4b853c(0xe0)](/;$/,'');}function a6_0x3ab9(){const _0x2f8fc9=['protocol','isArray','set','11046CvTpXh','profileName','models','models.generated.ts','alias','\x22\x20and\x20\x22','map','includes','find','45UYOyNi','slice','4282rNvrbB','Model\x20alias\x20\x22','2001136nXVzLh','3086885oedRdw','runtimeDomain','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','datasetCodes','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','value','NOT-SET','lovrabet-model-registry/v2','outputDir','test','232soxaMt','2429jvjxFj','Table\x20\x22','trim','push','109964XwhWAA','get','/*\x20rabetbase-model-registry:end\x20*/','profiles','defaultProfile','\x22\x20in\x20the\x20registry\x20but\x20\x22','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','1249370gMhDdq','keys','stringify','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','every','utf8','pid','\x22\x20maps\x20to\x20both\x20\x22','1676290tKDfkz','key','\x20model(s)\x20in\x20profile\x20\x22','/*\x20rabetbase-model-registry:v2\x20*/','flatMap','\x22\x20in\x20profile\x20\x22','tableName','entries','fromEntries','replace','object','model-runtime.ts','filter','values','string','parse','join','datasetCode','name','now','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','.tmp','15LrAMVl','/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a','\x22\x20maps\x20to\x20table\x20\x22','length','appCode'];a6_0x3ab9=function(){return _0x2f8fc9;};return a6_0x3ab9();}function migrateLegacyRegistry(_0x24274f){const _0x4e9238=a6_0x906e4c,_0xcbc52d=emptyRegistry(_0x24274f[_0x4e9238(0x116)]);for(const [_0x57499f,_0x54ae58]of Object[_0x4e9238(0xde)](_0x24274f[_0x4e9238(0x115)])){_0xcbc52d[_0x4e9238(0x115)][_0x57499f]={'appCode':_0x54ae58['appCode'],'runtimeDomain':_0x54ae58['runtimeDomain']},mergeProfileModels(_0xcbc52d,_0x57499f,_0x54ae58[_0x4e9238(0xf7)]);}return _0xcbc52d;}function generatedObjectLiteralToJson(_0x29fa13){const _0x31e3bb=a6_0x906e4c;let _0x277afe='',_0x5bce76,_0x5ccac5=![],_0x17199e;for(let _0x23e760=0x0;_0x23e760<_0x29fa13['length'];_0x23e760++){const _0x24c2a5=_0x29fa13[_0x23e760];if(_0x5bce76){_0x277afe+=_0x24c2a5;if(_0x5ccac5)_0x5ccac5=![];else{if(_0x24c2a5==='\x5c')_0x5ccac5=!![];else{if(_0x24c2a5===_0x5bce76)_0x5bce76=undefined;}}continue;}if(_0x24c2a5==='\x22'){_0x5bce76=_0x24c2a5,_0x277afe+=_0x24c2a5,_0x17199e=_0x31e3bb(0x108);continue;}if(_0x24c2a5===','){let _0x4fa34e=_0x23e760+0x1;while(/\s/['test'](_0x29fa13[_0x4fa34e]??''))_0x4fa34e++;if(_0x29fa13[_0x4fa34e]==='}'||_0x29fa13[_0x4fa34e]===']')continue;_0x277afe+=_0x24c2a5,_0x17199e=',';continue;}if(_0x24c2a5==='{'||_0x24c2a5==='['){_0x277afe+=_0x24c2a5,_0x17199e=_0x24c2a5;continue;}if(_0x24c2a5==='}'||_0x24c2a5===']'){_0x277afe+=_0x24c2a5,_0x17199e=_0x24c2a5;continue;}if((_0x17199e==='{'||_0x17199e===',')&&/[A-Za-z_$]/[_0x31e3bb(0x10c)](_0x24c2a5)){let _0x3b364a=_0x23e760+0x1;while(/[A-Za-z0-9_$]/[_0x31e3bb(0x10c)](_0x29fa13[_0x3b364a]??''))_0x3b364a++;let _0x5a7e4d=_0x3b364a;while(/\s/[_0x31e3bb(0x10c)](_0x29fa13[_0x5a7e4d]??''))_0x5a7e4d++;if(_0x29fa13[_0x5a7e4d]===':'){_0x277afe+=JSON[_0x31e3bb(0x11b)](_0x29fa13[_0x31e3bb(0xff)](_0x23e760,_0x3b364a)),_0x23e760=_0x3b364a-0x1,_0x17199e=_0x31e3bb(0x122);continue;}}_0x277afe+=_0x24c2a5;if(!/\s/[_0x31e3bb(0x10c)](_0x24c2a5)&&_0x24c2a5!==':')_0x17199e=_0x31e3bb(0x108);}return _0x277afe;}function parseGeneratedRegistryJson(_0x2f44a8){const _0x7dcd0=a6_0x906e4c;try{return JSON[_0x7dcd0(0xe6)](_0x2f44a8);}catch{return JSON[_0x7dcd0(0xe6)](generatedObjectLiteralToJson(_0x2f44a8));}}function normalizeModelEntries(_0x5704f2,_0x2ea7fa){const _0x543c3c=a6_0x906e4c,_0x212c70=Object['keys'](_0x5704f2),_0x5c2c2f=[];for(const _0xabf4be of _0x2ea7fa){if(!_0xabf4be||typeof _0xabf4be!=='object'||Array[_0x543c3c(0xf3)](_0xabf4be))return undefined;const _0x24b9b8=_0xabf4be;if(typeof _0x24b9b8[_0x543c3c(0xf9)]!==_0x543c3c(0xe5)||typeof _0x24b9b8['tableName']!==_0x543c3c(0xe5)||typeof _0x24b9b8[_0x543c3c(0xe9)]!==_0x543c3c(0xe5))return undefined;let _0x3681bf;if(typeof _0x24b9b8[_0x543c3c(0xe8)]===_0x543c3c(0xe5)&&_0x24b9b8[_0x543c3c(0x106)]===undefined)_0x3681bf=Object[_0x543c3c(0xdf)](_0x212c70['map'](_0x573865=>[_0x573865,_0x24b9b8[_0x543c3c(0xe8)]]));else{if(_0x24b9b8['datasetCode']===undefined&&_0x24b9b8[_0x543c3c(0x106)]&&typeof _0x24b9b8['datasetCodes']===_0x543c3c(0xe1)&&!Array[_0x543c3c(0xf3)](_0x24b9b8[_0x543c3c(0x106)])&&Object[_0x543c3c(0xe4)](_0x24b9b8[_0x543c3c(0x106)])[_0x543c3c(0x11d)](_0x2f2ae0=>typeof _0x2f2ae0===_0x543c3c(0xe5)))_0x3681bf={..._0x24b9b8[_0x543c3c(0x106)]};else return undefined;}_0x5c2c2f[_0x543c3c(0x111)]({'alias':_0x24b9b8[_0x543c3c(0xf9)],'tableName':_0x24b9b8[_0x543c3c(0xdd)],'name':_0x24b9b8[_0x543c3c(0xe9)],'datasetCodes':_0x3681bf});}return _0x5c2c2f;}export function parseModelRegistry(_0x1135b0){const _0x3d8085=a6_0x906e4c,_0x422276=extractRegistryJson(_0x1135b0);if(!_0x422276)return undefined;try{const _0xbee4bd=parseGeneratedRegistryJson(_0x422276);if(typeof _0xbee4bd[_0x3d8085(0x116)]!==_0x3d8085(0xe5)||!_0xbee4bd[_0x3d8085(0x115)]||typeof _0xbee4bd[_0x3d8085(0x115)]!=='object')return undefined;if(_0xbee4bd[_0x3d8085(0xf2)]==='lovrabet-model-registry/v1')return migrateLegacyRegistry(_0xbee4bd);if(!(_0xbee4bd[_0x3d8085(0xf2)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0xbee4bd[_0x3d8085(0xf2)]===undefined&&_0x1135b0[_0x3d8085(0xfc)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x3d8085(0xf3)](_0xbee4bd[_0x3d8085(0xf7)]))return undefined;const _0x2bd65c=_0xbee4bd['profiles'],_0x3bd051=normalizeModelEntries(_0x2bd65c,_0xbee4bd[_0x3d8085(0xf7)]);if(!_0x3bd051)return undefined;return{'defaultProfile':_0xbee4bd['defaultProfile'],'profiles':_0x2bd65c,'models':_0x3bd051};}catch{return undefined;}}export function readModelRegistry(_0x1a2cf9){if(!existsSync(_0x1a2cf9))return undefined;try{return parseModelRegistry(readFileSync(_0x1a2cf9,'utf8'));}catch{return undefined;}}function registrySource(_0x30b90c){const _0x229ddb=a6_0x906e4c,_0x3443f2=Object['keys'](_0x30b90c[_0x229ddb(0x115)]),_0x4bbb7a=_0x30b90c[_0x229ddb(0xf7)][_0x229ddb(0xfb)](_0x42dbc0=>{const _0x4f6990=_0x229ddb,_0x4c9091=_0x3443f2[_0x4f6990(0xfb)](_0x4a85b5=>_0x42dbc0['datasetCodes'][_0x4a85b5]),_0x31cadb=_0x4c9091[0x0],_0x443d5b=_0x31cadb!==undefined&&_0x4c9091[_0x4f6990(0x11d)](_0x3ee07f=>_0x3ee07f===_0x31cadb),_0x174660={'alias':_0x42dbc0[_0x4f6990(0xf9)],'tableName':_0x42dbc0[_0x4f6990(0xdd)],'name':_0x42dbc0['name']};return _0x443d5b?{..._0x174660,'datasetCode':_0x31cadb}:{..._0x174660,'datasetCodes':_0x42dbc0['datasetCodes']};}),_0x13d790=JSON['stringify']({'defaultProfile':_0x30b90c[_0x229ddb(0x116)],'profiles':_0x30b90c[_0x229ddb(0x115)],'models':_0x4bbb7a},null,0x2)['split']('\x0a')[_0x229ddb(0xfb)](_0x3e7a5a=>'\x20\x20'+_0x3e7a5a)[_0x229ddb(0xe7)]('\x0a');return _0x229ddb(0xee)+MODEL_REGISTRY_VERSION_MARKER+_0x229ddb(0x105)+REGISTRY_START+'\x0a'+_0x13d790+_0x229ddb(0x118)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x31f068,_0xfcf0fc,_0xdd4dd5){const _0x210876=a6_0x906e4c,_0x1e6314=_0xdd4dd5[_0x210876(0xfb)](_0x220ad9=>({..._0x220ad9,'alias':_0x220ad9[_0x210876(0xf9)]||_0x220ad9[_0x210876(0xdd)]})),_0x1808b0=new Map(),_0xcffb35=new Map();for(const _0xc92d52 of _0x1e6314){const _0x297d51=_0x1808b0[_0x210876(0x113)](_0xc92d52[_0x210876(0xf9)]);if(_0x297d51&&_0x297d51!==_0xc92d52[_0x210876(0xdd)])throw new Error(_0x210876(0x101)+_0xc92d52[_0x210876(0xf9)]+_0x210876(0x120)+_0x297d51+_0x210876(0xfa)+_0xc92d52[_0x210876(0xdd)]+_0x210876(0x126)+_0xfcf0fc+'\x22.');const _0x5bfefe=_0xcffb35[_0x210876(0x113)](_0xc92d52[_0x210876(0xdd)]);if(_0x5bfefe&&_0x5bfefe!==_0xc92d52['alias'])throw new Error('Table\x20\x22'+_0xc92d52[_0x210876(0xdd)]+_0x210876(0x11c)+_0x5bfefe+_0x210876(0xfa)+_0xc92d52['alias']+_0x210876(0x126)+_0xfcf0fc+'\x22.');_0x1808b0[_0x210876(0xf4)](_0xc92d52['alias'],_0xc92d52[_0x210876(0xdd)]),_0xcffb35['set'](_0xc92d52[_0x210876(0xdd)],_0xc92d52['alias']);const _0xe5fba9=_0x31f068[_0x210876(0xf7)][_0x210876(0xfd)](_0x3dfce0=>_0x3dfce0['alias']===_0xc92d52[_0x210876(0xf9)]);if(_0xe5fba9&&_0xe5fba9['tableName']!==_0xc92d52[_0x210876(0xdd)])throw new Error(_0x210876(0x101)+_0xc92d52[_0x210876(0xf9)]+_0x210876(0xef)+_0xe5fba9['tableName']+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0xc92d52['tableName']+'\x22\x20in\x20profile\x20\x22'+_0xfcf0fc+'\x22.');const _0x1d1906=_0x31f068[_0x210876(0xf7)][_0x210876(0xfd)](_0x48fe40=>_0x48fe40[_0x210876(0xdd)]===_0xc92d52[_0x210876(0xdd)]);if(_0x1d1906&&_0x1d1906['alias']!==_0xc92d52[_0x210876(0xf9)])throw new Error(_0x210876(0x10f)+_0xc92d52[_0x210876(0xdd)]+'\x22\x20maps\x20to\x20alias\x20\x22'+_0x1d1906[_0x210876(0xf9)]+_0x210876(0x117)+_0xc92d52[_0x210876(0xf9)]+'\x22\x20in\x20profile\x20\x22'+_0xfcf0fc+'\x22.');}for(const _0x1d383a of _0x31f068['models']){delete _0x1d383a['datasetCodes'][_0xfcf0fc];}for(const _0x38419a of _0x1e6314){let _0x4acc26=_0x31f068[_0x210876(0xf7)]['find'](_0x49d8de=>_0x49d8de['alias']===_0x38419a[_0x210876(0xf9)]);!_0x4acc26&&(_0x4acc26={'alias':_0x38419a[_0x210876(0xf9)],'tableName':_0x38419a[_0x210876(0xdd)],'name':_0x38419a[_0x210876(0xe9)],'datasetCodes':{}},_0x31f068[_0x210876(0xf7)][_0x210876(0x111)](_0x4acc26)),(_0xfcf0fc===_0x31f068['defaultProfile']||!_0x4acc26[_0x210876(0x106)][_0x31f068[_0x210876(0x116)]])&&(_0x4acc26['alias']=_0x38419a[_0x210876(0xf9)],_0x4acc26[_0x210876(0xdd)]=_0x38419a[_0x210876(0xdd)],_0x4acc26[_0x210876(0xe9)]=_0x38419a[_0x210876(0xe9)]),_0x4acc26[_0x210876(0x106)][_0xfcf0fc]=_0x38419a[_0x210876(0xe8)];}_0x31f068[_0x210876(0xf7)]=_0x31f068[_0x210876(0xf7)][_0x210876(0xe3)](_0x2352c9=>Object[_0x210876(0x11a)](_0x2352c9[_0x210876(0x106)])[_0x210876(0xf0)]>0x0);}function removeUnboundProfiles(_0x3f8c3d){const _0x21e308=a6_0x906e4c,_0x134a12=Object[_0x21e308(0xde)](_0x3f8c3d['profiles'])[_0x21e308(0xe3)](([,_0x1f28b0])=>_0x1f28b0['appCode']===_0x21e308(0x109))['map'](([_0x898491])=>_0x898491);if(_0x134a12['length']===0x0)return;for(const _0x2d4290 of _0x134a12){delete _0x3f8c3d[_0x21e308(0x115)][_0x2d4290];for(const _0x2f524d of _0x3f8c3d[_0x21e308(0xf7)]){delete _0x2f524d['datasetCodes'][_0x2d4290];}}_0x3f8c3d[_0x21e308(0xf7)]=_0x3f8c3d[_0x21e308(0xf7)][_0x21e308(0xe3)](_0x56e0dd=>Object[_0x21e308(0x11a)](_0x56e0dd[_0x21e308(0x106)])[_0x21e308(0xf0)]>0x0);}export function getProfileModels(_0x5c1eaf,_0x18ac09){const _0x35b805=a6_0x906e4c;return _0x5c1eaf[_0x35b805(0xf7)][_0x35b805(0x125)](_0x169132=>{const _0x484919=_0x35b805,_0x22b601=_0x169132[_0x484919(0x106)][_0x18ac09];return _0x22b601?[{'datasetCode':_0x22b601,'tableName':_0x169132[_0x484919(0xdd)],'name':_0x169132['name'],'alias':_0x169132[_0x484919(0xf9)]}]:[];});}export function updateModelRegistry(_0xd534b){const _0x3ad5ae=a6_0x906e4c,_0x1fee9a=a6_0x282403[_0x3ad5ae(0xe7)](_0xd534b['outputDir'],MODEL_REGISTRY_FILE_NAME),_0x3730fb=existsSync(_0x1fee9a),_0x2ae67d=readModelRegistry(_0x1fee9a);if(_0x3730fb&&!_0x2ae67d)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x3ad5ae(0x107));const _0x4f4609=_0x2ae67d??emptyRegistry(_0xd534b[_0x3ad5ae(0x116)]);if(_0xd534b['appCode']!==_0x3ad5ae(0x109))removeUnboundProfiles(_0x4f4609);const _0x120ae1=_0x2ae67d?getProfileModels(_0x2ae67d,_0xd534b['profileName'])['length']:0x0;if(_0x120ae1>0x0&&_0xd534b[_0x3ad5ae(0xf7)][_0x3ad5ae(0xf0)]===0x0&&!_0xd534b['allowEmptyReplacement'])throw new Error('Refusing\x20to\x20replace\x20'+_0x120ae1+_0x3ad5ae(0x123)+_0xd534b[_0x3ad5ae(0xf6)]+'\x22\x20with\x20an\x20empty\x20result.\x20'+_0x3ad5ae(0xeb));_0x4f4609[_0x3ad5ae(0x116)]=_0xd534b[_0x3ad5ae(0x116)],_0x4f4609[_0x3ad5ae(0x115)][_0xd534b[_0x3ad5ae(0xf6)]]={'appCode':_0xd534b[_0x3ad5ae(0xf1)],'runtimeDomain':_0xd534b[_0x3ad5ae(0x104)]},mergeProfileModels(_0x4f4609,_0xd534b[_0x3ad5ae(0xf6)],_0xd534b[_0x3ad5ae(0xf7)]),mkdirSync(_0xd534b[_0x3ad5ae(0x10b)],{'recursive':!![]});const _0xd56509=_0x1fee9a+'.'+process[_0x3ad5ae(0x11f)]+'.'+Date[_0x3ad5ae(0xea)]()+_0x3ad5ae(0xec);try{writeFileSync(_0xd56509,registrySource(_0x4f4609),{'encoding':_0x3ad5ae(0x11e),'mode':0x1a4}),renameSync(_0xd56509,_0x1fee9a);}catch(_0x2c8acc){try{unlinkSync(_0xd56509);}catch{}throw _0x2c8acc;}return{'path':_0x1fee9a,'registry':_0x4f4609,'existed':_0x3730fb};}
|
|
1
|
+
const a6_0x4f47ba=a6_0x2f19;function a6_0x1246(){const _0x366a96=['398HoOqsP','.tmp','flatMap','72owZlmI','values','replace','\x22\x20with\x20an\x20empty\x20result.\x20','outputDir','\x22\x20maps\x20to\x20alias\x20\x22','/*\x20rabetbase-model-registry:v2\x20*/','defaultProfile','filter','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','tableName','\x22\x20maps\x20to\x20table\x20\x22','6FOOTkN','name','alias','keys','string','now','isArray','\x22\x20maps\x20to\x20both\x20\x22','includes','value','\x20model(s)\x20in\x20profile\x20\x22','find','models.generated.ts','parse','560907fADnea','protocol','/*\x20rabetbase-model-registry:end\x20*/','join','models','split','key','indexOf','push','trim','allowEmptyReplacement','1103682EsAxUF','lovrabet-model-registry/v2','set','NOT-SET','datasetCodes','stringify','test','get','entries','Table\x20\x22','\x22\x20and\x20\x22','datasetCode','runtimeDomain','length','/**\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','3396400YjQBvp','\x22\x20in\x20profile\x20\x22','every','utf8','\x22\x20in\x20the\x20registry\x20but\x20\x22','225GcPZvo','4135920HISCbF','profiles','977890asmrRJ','lovrabet-model-registry/v1','appCode','3469795KFLwWM','Refusing\x20to\x20replace\x20','slice','object','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','55nGxirH','Model\x20alias\x20\x22','profileName','pid','map','/*\x20rabetbase-model-registry:start\x20*/'];a6_0x1246=function(){return _0x366a96;};return a6_0x1246();}(function(_0x455a63,_0x5aa9f1){const _0x345409=a6_0x2f19,_0x3dcbd6=_0x455a63();while(!![]){try{const _0x51826e=-parseInt(_0x345409(0x20d))/0x1+parseInt(_0x345409(0x232))/0x2*(-parseInt(_0x345409(0x221))/0x3)+parseInt(_0x345409(0x21c))/0x4+parseInt(_0x345409(0x222))/0x5+parseInt(_0x345409(0x1f4))/0x6*(parseInt(_0x345409(0x227))/0x7)+-parseInt(_0x345409(0x235))/0x8*(parseInt(_0x345409(0x202))/0x9)+parseInt(_0x345409(0x224))/0xa*(parseInt(_0x345409(0x22c))/0xb);if(_0x51826e===_0x5aa9f1)break;else _0x3dcbd6['push'](_0x3dcbd6['shift']());}catch(_0x39809b){_0x3dcbd6['push'](_0x3dcbd6['shift']());}}}(a6_0x1246,0xef998));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x4515b0 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x4f47ba(0x200);export const MODEL_RUNTIME_FILE_NAME='model-runtime.ts';export const MODEL_REGISTRY_VERSION_MARKER=a6_0x4f47ba(0x23b);function a6_0x2f19(_0x24fec6,_0x3ca975){_0x24fec6=_0x24fec6-0x1f2;const _0x12467d=a6_0x1246();let _0x2f197b=_0x12467d[_0x24fec6];return _0x2f197b;}const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x4f47ba(0x20e),REGISTRY_START=a6_0x4f47ba(0x231),REGISTRY_END=a6_0x4f47ba(0x204);function emptyRegistry(_0x3fce6e){return{'defaultProfile':_0x3fce6e,'profiles':{},'models':[]};}function extractRegistryJson(_0x4cfa8b){const _0x44b7a9=a6_0x4f47ba,_0x1ad7d6=_0x4cfa8b[_0x44b7a9(0x209)](REGISTRY_START),_0x250cf4=_0x4cfa8b['indexOf'](REGISTRY_END);if(_0x1ad7d6<0x0||_0x250cf4<=_0x1ad7d6)return undefined;return _0x4cfa8b[_0x44b7a9(0x229)](_0x1ad7d6+REGISTRY_START[_0x44b7a9(0x21a)],_0x250cf4)[_0x44b7a9(0x20b)]()[_0x44b7a9(0x237)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x44b7a9(0x237)](/;$/,'');}function migrateLegacyRegistry(_0x15ca1f){const _0x43a912=a6_0x4f47ba,_0x210dea=emptyRegistry(_0x15ca1f[_0x43a912(0x23c)]);for(const [_0x29c55f,_0xbfb995]of Object[_0x43a912(0x215)](_0x15ca1f['profiles'])){_0x210dea[_0x43a912(0x223)][_0x29c55f]={'appCode':_0xbfb995[_0x43a912(0x226)],'runtimeDomain':_0xbfb995[_0x43a912(0x219)]},mergeProfileModels(_0x210dea,_0x29c55f,_0xbfb995['models']);}return _0x210dea;}function generatedObjectLiteralToJson(_0x17213e){const _0x13c3da=a6_0x4f47ba;let _0x2cd54c='',_0x3defa5,_0x55b53f=![],_0x335050;for(let _0x308060=0x0;_0x308060<_0x17213e['length'];_0x308060++){const _0x20368a=_0x17213e[_0x308060];if(_0x3defa5){_0x2cd54c+=_0x20368a;if(_0x55b53f)_0x55b53f=![];else{if(_0x20368a==='\x5c')_0x55b53f=!![];else{if(_0x20368a===_0x3defa5)_0x3defa5=undefined;}}continue;}if(_0x20368a==='\x22'){_0x3defa5=_0x20368a,_0x2cd54c+=_0x20368a,_0x335050='value';continue;}if(_0x20368a===','){let _0x3f3865=_0x308060+0x1;while(/\s/[_0x13c3da(0x213)](_0x17213e[_0x3f3865]??''))_0x3f3865++;if(_0x17213e[_0x3f3865]==='}'||_0x17213e[_0x3f3865]===']')continue;_0x2cd54c+=_0x20368a,_0x335050=',';continue;}if(_0x20368a==='{'||_0x20368a==='['){_0x2cd54c+=_0x20368a,_0x335050=_0x20368a;continue;}if(_0x20368a==='}'||_0x20368a===']'){_0x2cd54c+=_0x20368a,_0x335050=_0x20368a;continue;}if((_0x335050==='{'||_0x335050===',')&&/[A-Za-z_$]/[_0x13c3da(0x213)](_0x20368a)){let _0x53d46c=_0x308060+0x1;while(/[A-Za-z0-9_$]/[_0x13c3da(0x213)](_0x17213e[_0x53d46c]??''))_0x53d46c++;let _0x2cee54=_0x53d46c;while(/\s/[_0x13c3da(0x213)](_0x17213e[_0x2cee54]??''))_0x2cee54++;if(_0x17213e[_0x2cee54]===':'){_0x2cd54c+=JSON['stringify'](_0x17213e['slice'](_0x308060,_0x53d46c)),_0x308060=_0x53d46c-0x1,_0x335050=_0x13c3da(0x208);continue;}}_0x2cd54c+=_0x20368a;if(!/\s/[_0x13c3da(0x213)](_0x20368a)&&_0x20368a!==':')_0x335050=_0x13c3da(0x1fd);}return _0x2cd54c;}function parseGeneratedRegistryJson(_0x89d9f2){const _0x22f7ea=a6_0x4f47ba;try{return JSON[_0x22f7ea(0x201)](_0x89d9f2);}catch{return JSON[_0x22f7ea(0x201)](generatedObjectLiteralToJson(_0x89d9f2));}}function normalizeModelEntries(_0x1b4538,_0x4a2a91){const _0x5e9853=a6_0x4f47ba,_0x3e8542=Object['keys'](_0x1b4538),_0x5be098=[];for(const _0x329e26 of _0x4a2a91){if(!_0x329e26||typeof _0x329e26!==_0x5e9853(0x22a)||Array['isArray'](_0x329e26))return undefined;const _0x1076cd=_0x329e26;if(typeof _0x1076cd['alias']!=='string'||typeof _0x1076cd['tableName']!==_0x5e9853(0x1f8)||typeof _0x1076cd[_0x5e9853(0x1f5)]!=='string')return undefined;let _0x5b6fc9;if(typeof _0x1076cd['datasetCode']==='string'&&_0x1076cd[_0x5e9853(0x211)]===undefined)_0x5b6fc9=Object['fromEntries'](_0x3e8542[_0x5e9853(0x230)](_0x3bd6b8=>[_0x3bd6b8,_0x1076cd['datasetCode']]));else{if(_0x1076cd[_0x5e9853(0x218)]===undefined&&_0x1076cd[_0x5e9853(0x211)]&&typeof _0x1076cd[_0x5e9853(0x211)]===_0x5e9853(0x22a)&&!Array['isArray'](_0x1076cd[_0x5e9853(0x211)])&&Object[_0x5e9853(0x236)](_0x1076cd['datasetCodes'])['every'](_0x56009a=>typeof _0x56009a===_0x5e9853(0x1f8)))_0x5b6fc9={..._0x1076cd[_0x5e9853(0x211)]};else return undefined;}_0x5be098['push']({'alias':_0x1076cd[_0x5e9853(0x1f6)],'tableName':_0x1076cd[_0x5e9853(0x1f2)],'name':_0x1076cd[_0x5e9853(0x1f5)],'datasetCodes':_0x5b6fc9});}return _0x5be098;}export function parseModelRegistry(_0x3c367a){const _0x5d24e1=a6_0x4f47ba,_0x361b71=extractRegistryJson(_0x3c367a);if(!_0x361b71)return undefined;try{const _0x46fa04=parseGeneratedRegistryJson(_0x361b71);if(typeof _0x46fa04[_0x5d24e1(0x23c)]!==_0x5d24e1(0x1f8)||!_0x46fa04[_0x5d24e1(0x223)]||typeof _0x46fa04[_0x5d24e1(0x223)]!=='object')return undefined;if(_0x46fa04[_0x5d24e1(0x203)]===_0x5d24e1(0x225))return migrateLegacyRegistry(_0x46fa04);if(!(_0x46fa04['protocol']===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x46fa04[_0x5d24e1(0x203)]===undefined&&_0x3c367a[_0x5d24e1(0x1fc)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x5d24e1(0x1fa)](_0x46fa04['models']))return undefined;const _0x36c922=_0x46fa04[_0x5d24e1(0x223)],_0x30f0b9=normalizeModelEntries(_0x36c922,_0x46fa04[_0x5d24e1(0x206)]);if(!_0x30f0b9)return undefined;return{'defaultProfile':_0x46fa04[_0x5d24e1(0x23c)],'profiles':_0x36c922,'models':_0x30f0b9};}catch{return undefined;}}export function readModelRegistry(_0x485ba4){const _0x44cc8c=a6_0x4f47ba;if(!existsSync(_0x485ba4))return undefined;try{return parseModelRegistry(readFileSync(_0x485ba4,_0x44cc8c(0x21f)));}catch{return undefined;}}function registrySource(_0x570a27){const _0x2db170=a6_0x4f47ba,_0x3d7e4d=Object[_0x2db170(0x1f7)](_0x570a27['profiles']),_0x35e226=_0x570a27[_0x2db170(0x206)][_0x2db170(0x230)](_0x3b6c73=>{const _0x5ea206=_0x2db170,_0x402569=_0x3d7e4d['map'](_0x38eec2=>_0x3b6c73[_0x5ea206(0x211)][_0x38eec2]),_0x279870=_0x402569[0x0],_0x2de3f6=_0x279870!==undefined&&_0x402569[_0x5ea206(0x21e)](_0x47abf7=>_0x47abf7===_0x279870),_0x12f813={'alias':_0x3b6c73['alias'],'tableName':_0x3b6c73['tableName'],'name':_0x3b6c73[_0x5ea206(0x1f5)]};return _0x2de3f6?{..._0x12f813,'datasetCode':_0x279870}:{..._0x12f813,'datasetCodes':_0x3b6c73[_0x5ea206(0x211)]};}),_0xfc3b3=JSON[_0x2db170(0x212)]({'defaultProfile':_0x570a27[_0x2db170(0x23c)],'profiles':_0x570a27[_0x2db170(0x223)],'models':_0x35e226},null,0x2)[_0x2db170(0x207)]('\x0a')['map'](_0xc99076=>'\x20\x20'+_0xc99076)[_0x2db170(0x205)]('\x0a');return _0x2db170(0x21b)+MODEL_REGISTRY_VERSION_MARKER+_0x2db170(0x23e)+REGISTRY_START+'\x0a'+_0xfc3b3+_0x2db170(0x22b)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x55ea3d,_0x4ffd8a,_0x242505){const _0x2f0883=a6_0x4f47ba,_0x9a77c2=_0x242505[_0x2f0883(0x230)](_0x1e6b0c=>({..._0x1e6b0c,'alias':_0x1e6b0c[_0x2f0883(0x1f6)]||_0x1e6b0c[_0x2f0883(0x1f2)]})),_0x1ebe99=new Map(),_0x1c43d8=new Map();for(const _0xf46755 of _0x9a77c2){const _0x2978e9=_0x1ebe99[_0x2f0883(0x214)](_0xf46755[_0x2f0883(0x1f6)]);if(_0x2978e9&&_0x2978e9!==_0xf46755['tableName'])throw new Error(_0x2f0883(0x22d)+_0xf46755['alias']+_0x2f0883(0x1fb)+_0x2978e9+_0x2f0883(0x217)+_0xf46755[_0x2f0883(0x1f2)]+_0x2f0883(0x21d)+_0x4ffd8a+'\x22.');const _0x40fc26=_0x1c43d8[_0x2f0883(0x214)](_0xf46755[_0x2f0883(0x1f2)]);if(_0x40fc26&&_0x40fc26!==_0xf46755[_0x2f0883(0x1f6)])throw new Error(_0x2f0883(0x216)+_0xf46755[_0x2f0883(0x1f2)]+'\x22\x20maps\x20to\x20both\x20aliases\x20\x22'+_0x40fc26+'\x22\x20and\x20\x22'+_0xf46755[_0x2f0883(0x1f6)]+_0x2f0883(0x21d)+_0x4ffd8a+'\x22.');_0x1ebe99[_0x2f0883(0x20f)](_0xf46755[_0x2f0883(0x1f6)],_0xf46755[_0x2f0883(0x1f2)]),_0x1c43d8['set'](_0xf46755['tableName'],_0xf46755[_0x2f0883(0x1f6)]);const _0x51962c=_0x55ea3d[_0x2f0883(0x206)][_0x2f0883(0x1ff)](_0x6e50f2=>_0x6e50f2['alias']===_0xf46755[_0x2f0883(0x1f6)]);if(_0x51962c&&_0x51962c[_0x2f0883(0x1f2)]!==_0xf46755[_0x2f0883(0x1f2)])throw new Error('Model\x20alias\x20\x22'+_0xf46755['alias']+_0x2f0883(0x1f3)+_0x51962c[_0x2f0883(0x1f2)]+_0x2f0883(0x220)+_0xf46755[_0x2f0883(0x1f2)]+_0x2f0883(0x21d)+_0x4ffd8a+'\x22.');const _0x29827d=_0x55ea3d[_0x2f0883(0x206)][_0x2f0883(0x1ff)](_0x6a886=>_0x6a886['tableName']===_0xf46755['tableName']);if(_0x29827d&&_0x29827d[_0x2f0883(0x1f6)]!==_0xf46755[_0x2f0883(0x1f6)])throw new Error(_0x2f0883(0x216)+_0xf46755[_0x2f0883(0x1f2)]+_0x2f0883(0x23a)+_0x29827d[_0x2f0883(0x1f6)]+_0x2f0883(0x220)+_0xf46755[_0x2f0883(0x1f6)]+_0x2f0883(0x21d)+_0x4ffd8a+'\x22.');}for(const _0x20f8f8 of _0x55ea3d[_0x2f0883(0x206)]){delete _0x20f8f8['datasetCodes'][_0x4ffd8a];}for(const _0xdc0fc5 of _0x9a77c2){let _0x2a35f5=_0x55ea3d[_0x2f0883(0x206)][_0x2f0883(0x1ff)](_0x178167=>_0x178167[_0x2f0883(0x1f6)]===_0xdc0fc5[_0x2f0883(0x1f6)]);!_0x2a35f5&&(_0x2a35f5={'alias':_0xdc0fc5['alias'],'tableName':_0xdc0fc5['tableName'],'name':_0xdc0fc5[_0x2f0883(0x1f5)],'datasetCodes':{}},_0x55ea3d[_0x2f0883(0x206)][_0x2f0883(0x20a)](_0x2a35f5)),(_0x4ffd8a===_0x55ea3d[_0x2f0883(0x23c)]||!_0x2a35f5[_0x2f0883(0x211)][_0x55ea3d['defaultProfile']])&&(_0x2a35f5['alias']=_0xdc0fc5[_0x2f0883(0x1f6)],_0x2a35f5[_0x2f0883(0x1f2)]=_0xdc0fc5[_0x2f0883(0x1f2)],_0x2a35f5[_0x2f0883(0x1f5)]=_0xdc0fc5[_0x2f0883(0x1f5)]),_0x2a35f5[_0x2f0883(0x211)][_0x4ffd8a]=_0xdc0fc5['datasetCode'];}_0x55ea3d[_0x2f0883(0x206)]=_0x55ea3d[_0x2f0883(0x206)][_0x2f0883(0x23d)](_0x4a78ff=>Object['keys'](_0x4a78ff[_0x2f0883(0x211)])[_0x2f0883(0x21a)]>0x0);}function removeUnboundProfiles(_0x25b6be){const _0x4c0cbe=a6_0x4f47ba,_0x121e10=Object[_0x4c0cbe(0x215)](_0x25b6be[_0x4c0cbe(0x223)])[_0x4c0cbe(0x23d)](([,_0x539a4b])=>_0x539a4b[_0x4c0cbe(0x226)]===_0x4c0cbe(0x210))[_0x4c0cbe(0x230)](([_0x551434])=>_0x551434);if(_0x121e10[_0x4c0cbe(0x21a)]===0x0)return;for(const _0x1e510e of _0x121e10){delete _0x25b6be[_0x4c0cbe(0x223)][_0x1e510e];for(const _0x435406 of _0x25b6be[_0x4c0cbe(0x206)]){delete _0x435406['datasetCodes'][_0x1e510e];}}_0x25b6be['models']=_0x25b6be[_0x4c0cbe(0x206)][_0x4c0cbe(0x23d)](_0x3a30c1=>Object[_0x4c0cbe(0x1f7)](_0x3a30c1[_0x4c0cbe(0x211)])[_0x4c0cbe(0x21a)]>0x0);}export function getProfileModels(_0x4adb17,_0x2e8cd2){const _0x47e484=a6_0x4f47ba;return _0x4adb17[_0x47e484(0x206)][_0x47e484(0x234)](_0x3ddc0f=>{const _0x43fbf7=_0x47e484,_0x3b001b=_0x3ddc0f[_0x43fbf7(0x211)][_0x2e8cd2];return _0x3b001b?[{'datasetCode':_0x3b001b,'tableName':_0x3ddc0f[_0x43fbf7(0x1f2)],'name':_0x3ddc0f[_0x43fbf7(0x1f5)],'alias':_0x3ddc0f[_0x43fbf7(0x1f6)]}]:[];});}export function updateModelRegistry(_0x291c95){const _0x5b2d58=a6_0x4f47ba,_0x5e1138=a6_0x4515b0[_0x5b2d58(0x205)](_0x291c95[_0x5b2d58(0x239)],MODEL_REGISTRY_FILE_NAME),_0x2aec6e=existsSync(_0x5e1138),_0x2c5970=readModelRegistry(_0x5e1138);if(_0x2aec6e&&!_0x2c5970)throw new Error(MODEL_REGISTRY_FILE_NAME+'\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.');const _0x440275=_0x2c5970??emptyRegistry(_0x291c95[_0x5b2d58(0x23c)]);if(_0x291c95[_0x5b2d58(0x226)]!==_0x5b2d58(0x210))removeUnboundProfiles(_0x440275);const _0x3be304=_0x2c5970?getProfileModels(_0x2c5970,_0x291c95['profileName'])[_0x5b2d58(0x21a)]:0x0;if(_0x3be304>0x0&&_0x291c95[_0x5b2d58(0x206)][_0x5b2d58(0x21a)]===0x0&&!_0x291c95[_0x5b2d58(0x20c)])throw new Error(_0x5b2d58(0x228)+_0x3be304+_0x5b2d58(0x1fe)+_0x291c95[_0x5b2d58(0x22e)]+_0x5b2d58(0x238)+'Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.');_0x440275['defaultProfile']=_0x291c95[_0x5b2d58(0x23c)],_0x440275[_0x5b2d58(0x223)][_0x291c95[_0x5b2d58(0x22e)]]={'appCode':_0x291c95[_0x5b2d58(0x226)],'runtimeDomain':_0x291c95[_0x5b2d58(0x219)]},mergeProfileModels(_0x440275,_0x291c95[_0x5b2d58(0x22e)],_0x291c95[_0x5b2d58(0x206)]),mkdirSync(_0x291c95['outputDir'],{'recursive':!![]});const _0x309eac=_0x5e1138+'.'+process[_0x5b2d58(0x22f)]+'.'+Date[_0x5b2d58(0x1f9)]()+_0x5b2d58(0x233);try{writeFileSync(_0x309eac,registrySource(_0x440275),{'encoding':'utf8','mode':0x1a4}),renameSync(_0x309eac,_0x5e1138);}catch(_0x17aff5){try{unlinkSync(_0x309eac);}catch{}throw _0x17aff5;}return{'path':_0x5e1138,'registry':_0x440275,'existed':_0x2aec6e};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a7_0x154b66=a7_0x40c8;(function(_0x1ed925,_0x30d523){const _0x563e04=a7_0x40c8,_0x41be20=_0x1ed925();while(!![]){try{const _0x286727=parseInt(_0x563e04(0x1a2))/0x1+parseInt(_0x563e04(0x1b3))/0x2*(parseInt(_0x563e04(0x1ac))/0x3)+-parseInt(_0x563e04(0x1a6))/0x4*(parseInt(_0x563e04(0x1a5))/0x5)+-parseInt(_0x563e04(0x1b2))/0x6+-parseInt(_0x563e04(0x1b1))/0x7+parseInt(_0x563e04(0x19f))/0x8+-parseInt(_0x563e04(0x1ae))/0x9*(-parseInt(_0x563e04(0x1ad))/0xa);if(_0x286727===_0x30d523)break;else _0x41be20['push'](_0x41be20['shift']());}catch(_0x15a00c){_0x41be20['push'](_0x41be20['shift']());}}}(a7_0x5eb7,0xb6935));import{readFileSync}from'node:fs';import a7_0x2b4ddb from'node:path';function a7_0x5eb7(){const _0x1471fc=['join','cwd','6606103ZCmIZp','6619956RQmtGl','2kkpaTS','dirname','utf8','6314928BGxIQD','typescript','resolve','541499PBNZsU','{ProjectRoutingImport}','all','245vsLaAs','46532ubkwTq','replace','../../templates/generate-api','format','model-runtime.ts.tpl','startsWith','1316709GGDgwT','4230pjIQtc','33939qnVsWZ'];a7_0x5eb7=function(){return _0x1471fc;};return a7_0x5eb7();}import{fileURLToPath}from'node:url';import a7_0x52e25f from'prettier';import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function a7_0x40c8(_0xd465b8,_0x255fc1){_0xd465b8=_0xd465b8-0x19f;const _0x5eb792=a7_0x5eb7();let _0x40c89b=_0x5eb792[_0xd465b8];return _0x40c89b;}function relativeImport(_0x3b9eeb,_0x5c779e){const _0x424798=a7_0x40c8;let _0x205239=a7_0x2b4ddb['relative'](_0x3b9eeb,_0x5c779e)[_0x424798(0x1a7)](/\\/g,'/');if(!_0x205239[_0x424798(0x1ab)]('.'))_0x205239='./'+_0x205239;return _0x205239;}export async function renderModelRegistryScaffold(_0x2e7bb2,_0x26f3a3=process[a7_0x154b66(0x1b0)]()){const _0x231827=a7_0x154b66,_0x5c2b37=fileURLToPath(import.meta.url),_0x1095e7=a7_0x2b4ddb[_0x231827(0x1a1)](a7_0x2b4ddb[_0x231827(0x1b4)](_0x5c2b37),_0x231827(0x1a8)),_0x85ae63=relativeImport(a7_0x2b4ddb[_0x231827(0x1a1)](_0x2e7bb2),a7_0x2b4ddb[_0x231827(0x1a1)](_0x26f3a3,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x17f841=readFileSync(a7_0x2b4ddb[_0x231827(0x1af)](_0x1095e7,'profile-api.ts.tpl'),_0x231827(0x1b5))[_0x231827(0x1a7)](_0x231827(0x1a3),_0x85ae63),[_0x256069,_0x435669,_0x1b5c15]=await Promise[_0x231827(0x1a4)]([a7_0x52e25f['format'](_0x17f841,{'parser':_0x231827(0x1a0)}),a7_0x52e25f[_0x231827(0x1a9)](readFileSync(a7_0x2b4ddb[_0x231827(0x1af)](_0x1095e7,'profile-client.ts.tpl'),_0x231827(0x1b5)),{'parser':'typescript'}),a7_0x52e25f[_0x231827(0x1a9)](readFileSync(a7_0x2b4ddb[_0x231827(0x1af)](_0x1095e7,_0x231827(0x1aa)),'utf8'),{'parser':_0x231827(0x1a0)})]);return{'api':_0x256069,'client':_0x435669,'modelRuntime':_0x1b5c15};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4164cc,_0x128e8e){const _0x225d05=a8_0x9313,_0xf08b55=_0x4164cc();while(!![]){try{const _0x46a701=parseInt(_0x225d05(0x133))/0x1*(parseInt(_0x225d05(0x150))/0x2)+-parseInt(_0x225d05(0x146))/0x3*(parseInt(_0x225d05(0x142))/0x4)+parseInt(_0x225d05(0x145))/0x5*(-parseInt(_0x225d05(0x13a))/0x6)+parseInt(_0x225d05(0x13c))/0x7*(-parseInt(_0x225d05(0x136))/0x8)+-parseInt(_0x225d05(0x14c))/0x9*(parseInt(_0x225d05(0x147))/0xa)+parseInt(_0x225d05(0x144))/0xb*(parseInt(_0x225d05(0x13b))/0xc)+parseInt(_0x225d05(0x149))/0xd*(parseInt(_0x225d05(0x13e))/0xe);if(_0x46a701===_0x128e8e)break;else _0xf08b55['push'](_0xf08b55['shift']());}catch(_0x5a4a90){_0xf08b55['push'](_0xf08b55['shift']());}}}(a8_0x687e,0x4a3ce));import{existsSync}from'node:fs';function a8_0x9313(_0x472e87,_0x8331a8){_0x472e87=_0x472e87-0x133;const _0x687e57=a8_0x687e();let _0x9313b5=_0x687e57[_0x472e87];return _0x9313b5;}import a8_0x26b551 from'node:path';import{readRawConfig}from'../context/config-loader.js';import{MODEL_REGISTRY_FILE_NAME,readModelRegistry}from'../api/model-registry-file.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveApiModelSource(_0x72a7db,_0x3a9851,_0x14ab35){const _0x842775=a8_0x9313,_0x4e0d18=a8_0x26b551[_0x842775(0x153)](process['cwd'](),_0x72a7db),_0x599c98=a8_0x26b551[_0x842775(0x153)](_0x4e0d18,'api.ts'),_0x30a5b7=a8_0x26b551[_0x842775(0x153)](_0x4e0d18,MODEL_REGISTRY_FILE_NAME),_0x5f1867=readModelRegistry(_0x30a5b7);if(_0x5f1867){const _0x14fdd2=_0x3a9851?Object['entries'](_0x5f1867['profiles'])['filter'](([,_0x53b43c])=>_0x53b43c[_0x842775(0x139)]===_0x3a9851):[];if(_0x14ab35){if(_0x5f1867[_0x842775(0x154)][_0x14ab35])return{'filePath':_0x30a5b7,'profileName':_0x14ab35};if(_0x14fdd2['length']>0x0)throw CliErrors[_0x842775(0x135)]('Model\x20profile\x20\x22'+_0x14ab35+_0x842775(0x140)+MODEL_REGISTRY_FILE_NAME+'.',_0x842775(0x14a)+CLI_BIN_NAME+_0x842775(0x151)+_0x14ab35+_0x842775(0x14f));}else{if(_0x14fdd2[_0x842775(0x13d)]===0x1)return{'filePath':_0x30a5b7,'profileName':_0x14fdd2[0x0][0x0]};if(_0x14fdd2[_0x842775(0x13d)]>0x1)throw new Error('AppCode\x20\x22'+_0x3a9851+_0x842775(0x143)+_0x14fdd2['map'](([_0x1bc894])=>_0x1bc894)[_0x842775(0x141)](',\x20')+'.\x20'+_0x842775(0x134));if(_0x5f1867[_0x842775(0x154)][_0x5f1867[_0x842775(0x137)]]&&!_0x3a9851)return{'filePath':_0x30a5b7,'profileName':_0x5f1867[_0x842775(0x137)]};}}if(!_0x3a9851&&!_0x14ab35)return{'filePath':_0x599c98};const _0x467dfb=readRawConfig(),_0x51737e=_0x467dfb[_0x842775(0x14d)]&&typeof _0x467dfb[_0x842775(0x14d)]==='object'?_0x467dfb[_0x842775(0x14d)]:{},_0x2b0440=_0x14ab35&&_0x51737e[_0x14ab35]?[_0x14ab35,_0x51737e[_0x14ab35]]:Object[_0x842775(0x13f)](_0x51737e)[_0x842775(0x14b)](([,_0xea6203])=>_0xea6203?.[_0x842775(0x152)]===_0x3a9851);if(!_0x2b0440)return{'filePath':_0x599c98};const [_0x42237b,_0x9f8ca0]=_0x2b0440,_0x132349=typeof _0x467dfb['defaultApp']==='string'?_0x467dfb[_0x842775(0x138)]:undefined;if(_0x9f8ca0?.[_0x842775(0x148)])return{'filePath':_0x599c98};if(_0x132349&&_0x42237b!==_0x132349){const _0x599ead=a8_0x26b551[_0x842775(0x153)](_0x4e0d18,_0x42237b+_0x842775(0x14e));if(existsSync(_0x599ead))return{'filePath':_0x599ead};}return{'filePath':_0x599c98};}function a8_0x687e(){const _0x24adca=['110Fnjpcp','apiDir','117qQqkmP','Run\x20`','find','132219TvHDte','apps','-api.ts','`\x20first.','600628OETrvh','\x20api\x20pull\x20--app\x20','appcode','resolve','profiles','1LMwaYd','Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.','validation','3820496wbXUNb','defaultProfile','defaultApp','appCode','1588308cOgOoD','12CthTaJ','7DyiBlW','length','1287986ZDxcfM','entries','\x22\x20is\x20missing\x20from\x20','join','596qnbxip','\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20','5704083srPfwn','10VQcAVR','3507eBQqBC'];a8_0x687e=function(){return _0x24adca;};return a8_0x687e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a9_0x16a2(){const _0x578447=['Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','*\x20Login\x20successful!','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','autoYes','No\x20valid\x20session.\x20Login\x20now?','log','325003aKdtiD','3653560iWuzIv','1901120XeoaNV','validation','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','325334bQusYR','2533392WBUdWa','2972412Piephw','526029evLyZO','48WLGouG','16ugzajV','stop','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','nonInteractive','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','start','44uaOyYT','9YWkOvx'];a9_0x16a2=function(){return _0x578447;};return a9_0x16a2();}(function(_0x43a746,_0x586cad){const _0x23da66=a9_0x4d8e,_0x3650f4=_0x43a746();while(!![]){try{const _0x35a010=-parseInt(_0x23da66(0xd0))/0x1*(parseInt(_0x23da66(0xc4))/0x2)+-parseInt(_0x23da66(0xc7))/0x3+parseInt(_0x23da66(0xc9))/0x4*(parseInt(_0x23da66(0xd9))/0x5)+-parseInt(_0x23da66(0xc6))/0x6+parseInt(_0x23da66(0xd7))/0x7*(-parseInt(_0x23da66(0xc8))/0x8)+parseInt(_0x23da66(0xc5))/0x9+-parseInt(_0x23da66(0xd8))/0xa*(-parseInt(_0x23da66(0xcf))/0xb);if(_0x35a010===_0x586cad)break;else _0x3650f4['push'](_0x3650f4['shift']());}catch(_0x2bbe82){_0x3650f4['push'](_0x3650f4['shift']());}}}(a9_0x16a2,0xcfa36));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a9_0x4d8e(_0x467da8,_0x297bdd){_0x467da8=_0x467da8-0xc3;const _0x16a2ad=a9_0x16a2();let _0x4d8e89=_0x16a2ad[_0x467da8];return _0x4d8e89;}import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';import a9_0x39c82f from'ora';export async function runAuthServer(_0x31b44f){const _0x3b311e=a9_0x4d8e,_0x2433ac=await getIsSessionValid();if(_0x2433ac){console[_0x3b311e(0xd6)](_0x3b311e(0xcb));return;}if(_0x31b44f?.[_0x3b311e(0xcc)]&&!_0x31b44f[_0x3b311e(0xd4)])throw CliErrors[_0x3b311e(0xda)](_0x3b311e(0xd1),'Run\x20`'+CLI_BIN_NAME+_0x3b311e(0xd3));const _0x6a3411=_0x31b44f?.['autoYes']?!![]:await confirm({'message':_0x3b311e(0xd5),'default':!![]});if(!_0x6a3411)return;if(_0x31b44f?.[_0x3b311e(0xcc)]){console['log'](_0x3b311e(0xcd));const _0x3ce6ba=await authServer({'silent':![],'openBrowser':![]});_0x3ce6ba?console['log'](_0x3b311e(0xd2)):console[_0x3b311e(0xd6)]('!\x20Login\x20failed.');return;}const _0x313d04=a9_0x39c82f(_0x3b311e(0xc3))[_0x3b311e(0xce)](),_0x37b136=await authServer({'silent':!![],'openBrowser':!![]});_0x313d04[_0x3b311e(0xca)](),_0x37b136?console[_0x3b311e(0xd6)](_0x3b311e(0xd2)):console[_0x3b311e(0xd6)]('!\x20Login\x20failed.');}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x3cf610=a10_0xa091;(function(_0x20bb13,_0x2d0242){const _0x3c7388=a10_0xa091,_0x17250f=_0x20bb13();while(!![]){try{const _0x2e80a2=-parseInt(_0x3c7388(0xf2))/0x1+parseInt(_0x3c7388(0x100))/0x2+-parseInt(_0x3c7388(0xfc))/0x3*(parseInt(_0x3c7388(0x110))/0x4)+parseInt(_0x3c7388(0xfe))/0x5+parseInt(_0x3c7388(0x11a))/0x6*(parseInt(_0x3c7388(0x106))/0x7)+-parseInt(_0x3c7388(0x104))/0x8*(-parseInt(_0x3c7388(0x108))/0x9)+parseInt(_0x3c7388(0x119))/0xa*(parseInt(_0x3c7388(0xfd))/0xb);if(_0x2e80a2===_0x2d0242)break;else _0x17250f['push'](_0x17250f['shift']());}catch(_0x18875f){_0x17250f['push'](_0x17250f['shift']());}}}(a10_0xbc73,0xa2d0a));import{writeFileSync}from'node:fs';import a10_0x46e7f3 from'node:http';import a10_0x5b4786 from'node:https';import{getUserDomain}from'../constant/domain.js';import{getOfficialRoutingCdn,getOfficialRoutingProfile}from'../constant/routing-profile.js';import{getProjectDomainRoutingManifest}from'../config/project-domain-routing.js';import{exec}from'node:child_process';import{getIsSessionValid}from'../auth/is-session-valid.js';import{cookieFile}from'../auth/constant.js';import{buildLoginSuccessHtml}from'../auth/login-success-html.js';function a10_0xbc73(){const _0xc1a9c=['!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','2347776FuJVPf','text/html;\x20charset=utf-8','open\x20\x22','createServer','address','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','utf-8','cmd\x20/c\x20start\x20\x22\x22\x20\x22','84femMBv','listen','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','📍\x20Login\x20URL:','log','timeoutMs','cookie','object','openBrowser','310LWamMz','84PIKBTf','lovrabet','win32','platform','silent','json','port','local','127.0.0.1','close','xdg-open\x20\x22','isAuth','1307182kJitnS','origin','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','end','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','🔐\x20Starting\x20login\x20service...','session','💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','/sign-in?redirect=','catch','162879TMNJBM','213917nteLsc','3433115GPMCmm','then','1737918YSNeuM','writeHead','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','certificateUrl','24RTMdaj','darwin','86597bDcNQc'];a10_0xbc73=function(){return _0xc1a9c;};return a10_0xbc73();}function a10_0xa091(_0x160ba8,_0x466d7c){_0x160ba8=_0x160ba8-0xf2;const _0xbc7379=a10_0xbc73();let _0xa09188=_0xbc7379[_0x160ba8];return _0xa09188;}export const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export function resolveAuthCallbackRouting(_0x9ff232){const _0x55c652=a10_0xa091;if(!_0x9ff232)return getProjectDomainRoutingManifest()[_0x55c652(0x121)];const _0x2717fa=getOfficialRoutingProfile(_0x9ff232),_0x5f314d=getOfficialRoutingCdn(_0x9ff232);return{'origin':_0x2717fa[_0x55c652(0x121)][_0x55c652(0xf3)],'certificateUrl':_0x5f314d[_0x55c652(0x11b)]+'/cert/lovrabet-dev.json'};}function withPort(_0x5077ff,_0x390727){const _0x5581d3=a10_0xa091,_0x29c09f=new URL(_0x5077ff);return _0x29c09f[_0x5581d3(0x120)]=String(_0x390727),_0x29c09f[_0x5581d3(0xf3)];}export async function authServer(_0x384a23){const _0x481748=a10_0xa091,_0x5351fa=_0x384a23?.[_0x481748(0x11e)]||![],_0x5734dc=_0x384a23?.[_0x481748(0x118)]??!![],_0x513b03=_0x384a23?.[_0x481748(0x115)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x486010=resolveAuthCallbackRouting(),_0x231a4e=_0x486010['certificateUrl']?await(await fetch(_0x486010[_0x481748(0x103)]))[_0x481748(0x11f)]():undefined;return new Promise(async(_0x2511fc,_0x3b71fd)=>{const _0x445ce4=_0x481748;let _0x984442=0x0,_0x5ef27b=![],_0x4aa1a4;const _0x724549=async(_0x3f81d2,_0x5def65)=>{const _0x222fff=a10_0xa091,_0x1df0eb=getUserDomain(),_0x5b66ab=_0x3f81d2['headers'][_0x222fff(0x116)]||'',_0x549cb5=await fetch(_0x1df0eb+'/api/auth/get-session',{'headers':{'cookie':_0x5b66ab}})['then'](_0x5a8510=>_0x5a8510[_0x222fff(0x11f)]()),_0x40cb2e=_0x549cb5&&_0x549cb5[_0x222fff(0xf8)]&&_0x549cb5['user'];if(_0x40cb2e){writeFileSync(cookieFile,_0x5b66ab,_0x222fff(0x10e));const _0x32882f=buildLoginSuccessHtml();_0x5def65['writeHead'](0xc8,{'Content-Type':_0x222fff(0x109)}),_0x5def65[_0x222fff(0xf5)](_0x32882f),_0x499932(!![]);}else{const _0x5cbeb1=encodeURIComponent(withPort(_0x486010['origin'],_0x984442));_0x5def65[_0x222fff(0x101)](0x12e,{'location':_0x1df0eb+_0x222fff(0xfa)+_0x5cbeb1}),_0x5def65['end']();return;}},_0x5f4010=_0x231a4e?a10_0x5b4786[_0x445ce4(0x10b)](_0x231a4e,_0x724549):a10_0x46e7f3[_0x445ce4(0x10b)](_0x724549);function _0x499932(_0x91a2a9){const _0x11c51a=_0x445ce4;if(_0x5ef27b)return;_0x5ef27b=!![],_0x4aa1a4&&clearTimeout(_0x4aa1a4),_0x5f4010[_0x11c51a(0x123)](),_0x2511fc(_0x91a2a9);}_0x5f4010[_0x445ce4(0x111)](0x0,_0x445ce4(0x122),()=>{const _0x2f6492=_0x445ce4,_0x3b5670=_0x5f4010[_0x2f6492(0x10c)]();_0x984442=typeof _0x3b5670===_0x2f6492(0x117)&&_0x3b5670?_0x3b5670[_0x2f6492(0x120)]:Number(_0x3b5670);const _0x2177ba=withPort(_0x486010['origin'],_0x984442);_0x4aa1a4=setTimeout(()=>{const _0x4457e4=_0x2f6492;!_0x5351fa&&console[_0x4457e4(0x114)](_0x4457e4(0x107)),_0x499932(![]);},_0x513b03);!_0x5351fa&&(console['log'](_0x2f6492(0xf7)),console[_0x2f6492(0x114)](_0x2f6492(0x113),_0x2177ba),_0x5734dc?(console[_0x2f6492(0x114)](_0x2f6492(0x112)),console[_0x2f6492(0x114)](''),console[_0x2f6492(0x114)](_0x2f6492(0xf6))):console[_0x2f6492(0x114)](_0x2f6492(0xf9)),console[_0x2f6492(0x114)](''));if(!_0x5734dc)return;openInBrowser(_0x2177ba)[_0x2f6492(0xff)](_0x79aac4=>{const _0x9d603=_0x2f6492;!_0x5351fa&&(_0x79aac4?console['log'](_0x9d603(0x102)):(console[_0x9d603(0x114)](_0x9d603(0x10d)),console[_0x9d603(0x114)](_0x9d603(0xf4),_0x2177ba)),console['log'](''));})[_0x2f6492(0xfb)](()=>{const _0x94f834=_0x2f6492;!_0x5351fa&&(console[_0x94f834(0x114)](_0x94f834(0x10d)),console[_0x94f834(0x114)]('🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0x2177ba),console[_0x94f834(0x114)](''));});}),_0x5f4010['on']('error',_0x545e47=>{const _0x223102=_0x445ce4;if(_0x5ef27b)return;_0x5ef27b=!![],_0x4aa1a4&&clearTimeout(_0x4aa1a4),!_0x5351fa&&console['error']('Auth\x20server\x20error:',_0x545e47),_0x5f4010[_0x223102(0x123)](),_0x3b71fd(_0x545e47);});});}function openInBrowser(_0x26118d){return new Promise(_0xe01a87=>{const _0x2381e4=a10_0xa091,_0x4b312a=process[_0x2381e4(0x11d)];let _0x159757;if(_0x4b312a===_0x2381e4(0x11c))_0x159757=_0x2381e4(0x10f)+_0x26118d+'\x22';else _0x4b312a===_0x2381e4(0x105)?_0x159757=_0x2381e4(0x10a)+_0x26118d+'\x22':_0x159757=_0x2381e4(0x124)+_0x26118d+'\x22';exec(_0x159757,_0x46ffe6=>{_0x46ffe6?_0xe01a87(![]):_0xe01a87(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a10_0x3cf610(0x114)](a10_0x3cf610(0x125),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a11_0x508b40=a11_0xce60;(function(_0x43d983,_0x568b3c){const _0x5be637=a11_0xce60,_0x55e414=_0x43d983();while(!![]){try{const _0x412279=-parseInt(_0x5be637(0x1cb))/0x1+parseInt(_0x5be637(0x1c7))/0x2*(parseInt(_0x5be637(0x1c2))/0x3)+-parseInt(_0x5be637(0x1c5))/0x4*(-parseInt(_0x5be637(0x1c8))/0x5)+parseInt(_0x5be637(0x1ca))/0x6+-parseInt(_0x5be637(0x1bf))/0x7*(parseInt(_0x5be637(0x1c0))/0x8)+-parseInt(_0x5be637(0x1c6))/0x9*(-parseInt(_0x5be637(0x1c9))/0xa)+-parseInt(_0x5be637(0x1c3))/0xb;if(_0x412279===_0x568b3c)break;else _0x55e414['push'](_0x55e414['shift']());}catch(_0x2730b4){_0x55e414['push'](_0x55e414['shift']());}}}(a11_0x5e9d,0xa8a21));function a11_0xce60(_0x2882ca,_0x28e3af){_0x2882ca=_0x2882ca-0x1bf;const _0x5e9dd2=a11_0x5e9d();let _0xce6057=_0x5e9dd2[_0x2882ca];return _0xce6057;}import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a11_0x5e9d(){const _0x395280=['2MSXUlh','460835vAlRmI','22130JCfrDZ','7512768kgiTRG','287625JkxPhX','7mhQigh','6974936TLlIde','cookie','3820467zbVAie','16013954waMWbW','.lovrabet','4wjkyUT','2799xfQmJI'];a11_0x5e9d=function(){return _0x395280;};return a11_0x5e9d();}import{join}from'node:path';export const configDir=join(homedir(),a11_0x508b40(0x1c4));export const cookieFile=join(configDir,a11_0x508b40(0x1c1));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a12_0x318a(){var _0x218f9c=['265487hWxNxf','1460vfUQHF','31422NlJfMc','139023EFislW','190460AtYTra','397128uMfeQM','292485SSOUKU','utf-8','42680YgyLBd','9zNePsk','49EnkSbk','64OErESS'];a12_0x318a=function(){return _0x218f9c;};return a12_0x318a();}function a12_0x452f(_0x28a462,_0x1496d2){_0x28a462=_0x28a462-0x172;var _0x318a60=a12_0x318a();var _0x452fb3=_0x318a60[_0x28a462];return _0x452fb3;}(function(_0x3e6a0b,_0x51de9e){var _0x56516b=a12_0x452f,_0x3b30d7=_0x3e6a0b();while(!![]){try{var _0x1efb1f=parseInt(_0x56516b(0x172))/0x1+parseInt(_0x56516b(0x177))/0x2+-parseInt(_0x56516b(0x17b))/0x3*(-parseInt(_0x56516b(0x176))/0x4)+-parseInt(_0x56516b(0x178))/0x5+parseInt(_0x56516b(0x174))/0x6*(parseInt(_0x56516b(0x17c))/0x7)+parseInt(_0x56516b(0x17d))/0x8*(parseInt(_0x56516b(0x175))/0x9)+parseInt(_0x56516b(0x173))/0xa*(-parseInt(_0x56516b(0x17a))/0xb);if(_0x1efb1f===_0x51de9e)break;else _0x3b30d7['push'](_0x3b30d7['shift']());}catch(_0x59e8ef){_0x3b30d7['push'](_0x3b30d7['shift']());}}}(a12_0x318a,0x22b4a));import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0x52686d=a12_0x452f;try{return readFileSync(cookieFile,_0x52686d(0x179));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a13_0xd862(){const _0x341c5e=['1198056WviZew','762846VKaMaC','7784685hLwyPC','1143489lCubyw','15LnvOQR','/api/auth/get-session','834094sNQinO','1197ymMgnk','session','2806892hDCpFV','utf-8','27592njyNMY'];a13_0xd862=function(){return _0x341c5e;};return a13_0xd862();}(function(_0x342923,_0x8eb9c2){const _0x394338=a13_0x2383,_0x5d038b=_0x342923();while(!![]){try{const _0xa520db=-parseInt(_0x394338(0x8d))/0x1+parseInt(_0x394338(0x86))/0x2+parseInt(_0x394338(0x8f))/0x3+parseInt(_0x394338(0x89))/0x4+parseInt(_0x394338(0x90))/0x5*(-parseInt(_0x394338(0x8c))/0x6)+-parseInt(_0x394338(0x87))/0x7*(parseInt(_0x394338(0x8b))/0x8)+parseInt(_0x394338(0x8e))/0x9;if(_0xa520db===_0x8eb9c2)break;else _0x5d038b['push'](_0x5d038b['shift']());}catch(_0x140142){_0x5d038b['push'](_0x5d038b['shift']());}}}(a13_0xd862,0x64e3d));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a13_0x2383(_0x393eaa,_0x31962e){_0x393eaa=_0x393eaa-0x85;const _0xd86216=a13_0xd862();let _0x23835c=_0xd86216[_0x393eaa];return _0x23835c;}export async function getSessionUserInfo(){const _0x44156e=a13_0x2383;try{if(!existsSync(cookieFile))return null;const _0x2a0498=readFileSync(cookieFile,_0x44156e(0x8a)),_0xd17bae=await fetch(getUserDomain()+_0x44156e(0x85),{'headers':{'cookie':_0x2a0498}});if(!_0xd17bae['ok'])return null;const _0x58a582=await _0xd17bae['json']();if(!_0x58a582[_0x44156e(0x88)]||!_0x58a582['user'])return null;return _0x58a582;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4731e3,_0xea606b){const _0x2c1014=a14_0xe7f2,_0x387bf2=_0x4731e3();while(!![]){try{const _0x1d8542=parseInt(_0x2c1014(0xb3))/0x1*(-parseInt(_0x2c1014(0xbc))/0x2)+-parseInt(_0x2c1014(0xbd))/0x3*(parseInt(_0x2c1014(0xb0))/0x4)+-parseInt(_0x2c1014(0xb4))/0x5+parseInt(_0x2c1014(0xb2))/0x6+-parseInt(_0x2c1014(0xba))/0x7+parseInt(_0x2c1014(0xb7))/0x8*(parseInt(_0x2c1014(0xb8))/0x9)+parseInt(_0x2c1014(0xb9))/0xa;if(_0x1d8542===_0xea606b)break;else _0x387bf2['push'](_0x387bf2['shift']());}catch(_0x1026eb){_0x387bf2['push'](_0x387bf2['shift']());}}}(a14_0xc716,0x9b502));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a14_0xe7f2(_0x2dc16a,_0x1d79b7){_0x2dc16a=_0x2dc16a-0xb0;const _0xc716f7=a14_0xc716();let _0xe7f2d=_0xc716f7[_0x2dc16a];return _0xe7f2d;}import{cookieFile}from'../auth/constant.js';function a14_0xc716(){const _0x6e85d=['2627760QhfyNh','4BlJsXs','3468500rbrSed','user','session','3503224hBYzoZ','18vmSrps','9705580uMNlVH','2553040NFdSBv','json','60774OoVyKw','1404582teGFLD','/api/auth/get-session','4BmghDT','then'];a14_0xc716=function(){return _0x6e85d;};return a14_0xc716();}export async function getIsSessionValid(){const _0xfe44ee=a14_0xe7f2;try{if(!existsSync(cookieFile))return![];const _0x2b0ec3=readFileSync(cookieFile,'utf-8'),_0x286e68=await fetch(getUserDomain()+_0xfe44ee(0xbe),{'headers':{'cookie':_0x2b0ec3}})[_0xfe44ee(0xb1)](_0x10f958=>_0x10f958[_0xfe44ee(0xbb)]());return _0x286e68&&_0x286e68[_0xfe44ee(0xb6)]&&_0x286e68[_0xfe44ee(0xb5)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a15_0x4ce6(_0x335465,_0x28095c){_0x335465=_0x335465-0xe4;const _0x2cb24d=a15_0x2cb2();let _0x4ce627=_0x2cb24d[_0x335465];return _0x4ce627;}function a15_0x2cb2(){const _0x4b54b6=['</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>','886428zLZdiC','30euDktU','1355410WFlqfI','2681860BTiTcg','<!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>','184766XHqCYw','12154788uXsFtf','8wJizOo','3469648XTYTrc','5166gmzEHo'];a15_0x2cb2=function(){return _0x4b54b6;};return a15_0x2cb2();}(function(_0x464c12,_0x4b4ec0){const _0x76bdde=a15_0x4ce6,_0x415d0c=_0x464c12();while(!![]){try{const _0x308a05=-parseInt(_0x76bdde(0xea))/0x1+-parseInt(_0x76bdde(0xe7))/0x2+parseInt(_0x76bdde(0xe5))/0x3+-parseInt(_0x76bdde(0xed))/0x4+parseInt(_0x76bdde(0xe8))/0x5+parseInt(_0x76bdde(0xe6))/0x6*(-parseInt(_0x76bdde(0xee))/0x7)+parseInt(_0x76bdde(0xec))/0x8*(parseInt(_0x76bdde(0xeb))/0x9);if(_0x308a05===_0x4b4ec0)break;else _0x415d0c['push'](_0x415d0c['shift']());}catch(_0x1c693f){_0x415d0c['push'](_0x415d0c['shift']());}}}(a15_0x2cb2,0x6d927));export function buildLoginSuccessHtml(){const _0x4e8261=a15_0x4ce6,_0x3ad626='Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.';return _0x4e8261(0xe9)+_0x3ad626+_0x4e8261(0xe4);}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xd77270,_0x34fa07){var _0x22ff51=a16_0x6d7d,_0x1d7315=_0xd77270();while(!![]){try{var _0xace0c2=-parseInt(_0x22ff51(0x162))/0x1+parseInt(_0x22ff51(0x164))/0x2+parseInt(_0x22ff51(0x15c))/0x3+-parseInt(_0x22ff51(0x15a))/0x4*(parseInt(_0x22ff51(0x165))/0x5)+parseInt(_0x22ff51(0x160))/0x6*(parseInt(_0x22ff51(0x15f))/0x7)+parseInt(_0x22ff51(0x15d))/0x8+-parseInt(_0x22ff51(0x15b))/0x9;if(_0xace0c2===_0x34fa07)break;else _0x1d7315['push'](_0x1d7315['shift']());}catch(_0x1538f7){_0x1d7315['push'](_0x1d7315['shift']());}}}(a16_0x52ce,0x7f88f));function a16_0x6d7d(_0x1b68f2,_0x2c102a){_0x1b68f2=_0x1b68f2-0x15a;var _0x52cea2=a16_0x52ce();var _0x6d7d5e=_0x52cea2[_0x1b68f2];return _0x6d7d5e;}function a16_0x52ce(){var _0x240d1c=['!\x20Not\x20logged\x20in','14gsbDcN','260826AgBiJO','✓\x20Logged\x20out','305475zZGkIx','log','1801630SdSiYQ','350zwBDKW','22312OXUvRX','8051661fugQZX','1997961fnHOfm','3673624THGPVI'];a16_0x52ce=function(){return _0x240d1c;};return a16_0x52ce();}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function logout(){var _0x3a714c=a16_0x6d7d;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x3a714c(0x163)](_0x3a714c(0x161))):console['log'](_0x3a714c(0x15e));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a17_0x367aab=a17_0x2661;function a17_0x2661(_0x1a3d2c,_0x32de4e){_0x1a3d2c=_0x1a3d2c-0x109;const _0xecc849=a17_0xecc8();let _0x26613e=_0xecc849[_0x1a3d2c];return _0x26613e;}(function(_0x21b2d2,_0x14f9d0){const _0x2983d0=a17_0x2661,_0x11b232=_0x21b2d2();while(!![]){try{const _0x48a6ba=parseInt(_0x2983d0(0x110))/0x1*(parseInt(_0x2983d0(0x114))/0x2)+parseInt(_0x2983d0(0x111))/0x3+parseInt(_0x2983d0(0x10a))/0x4*(parseInt(_0x2983d0(0x109))/0x5)+parseInt(_0x2983d0(0x112))/0x6*(-parseInt(_0x2983d0(0x10b))/0x7)+parseInt(_0x2983d0(0x10c))/0x8*(-parseInt(_0x2983d0(0x10d))/0x9)+-parseInt(_0x2983d0(0x113))/0xa*(parseInt(_0x2983d0(0x10e))/0xb)+parseInt(_0x2983d0(0x10f))/0xc;if(_0x48a6ba===_0x14f9d0)break;else _0x11b232['push'](_0x11b232['shift']());}catch(_0x506963){_0x11b232['push'](_0x11b232['shift']());}}}(a17_0xecc8,0x53b8a));export const dynamicCliFlags={'enableBffSave':{'type':a17_0x367aab(0x115)}};function a17_0xecc8(){const _0xeee9ce=['10fGjKdf','58324FDgLUp','boolean','1685NhtMPu','6916KmNMpz','21zLPAPb','328jKXdGC','8217JJcGlk','6390659mFXPmq','5899584iQQvRf','1ldNutr','1624473OvSYSe','1367268hVcRBJ'];a17_0xecc8=function(){return _0xeee9ce;};return a17_0xecc8();}
|