@lovrabet/rabetbase-cli 2.5.4 → 2.5.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/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/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/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/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-page-generation/SKILL.md +35 -0
- package/skills/rabetbase-page-generation/references/component-baseline.md +18 -0
- package/skills/rabetbase-page-generation/references/generation.md +77 -0
- package/skills/rabetbase-page-generation/templates/onepage/build.mjs +63 -0
- package/skills/rabetbase-page-generation/templates/onepage/create/README.md +20 -0
- package/skills/rabetbase-page-generation/templates/onepage/create/index.jsx +4 -0
- package/skills/rabetbase-page-generation/templates/onepage/create/preview.png +0 -0
- package/skills/rabetbase-page-generation/templates/onepage/detail/README.md +20 -0
- package/skills/rabetbase-page-generation/templates/onepage/detail/index.jsx +194 -0
- package/skills/rabetbase-page-generation/templates/onepage/detail/preview.png +0 -0
- package/skills/rabetbase-page-generation/templates/onepage/list/README.md +20 -0
- package/skills/rabetbase-page-generation/templates/onepage/list/index.jsx +717 -0
- package/skills/rabetbase-page-generation/templates/onepage/list/preview.png +0 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/editor.jsx +395 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/model.js +141 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/page.css +377 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/record-layout.jsx +90 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/responsive.jsx +70 -0
- package/skills/rabetbase-page-generation/templates/onepage/update/README.md +21 -0
- package/skills/rabetbase-page-generation/templates/onepage/update/index.jsx +4 -0
- package/skills/rabetbase-page-generation/templates/onepage/update/preview.png +0 -0
- package/skills/rabetbase.manifest.json +3 -3
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a0_0x21c472=a0_0x3144;(function(_0x19ea05,_0x233a4f){const _0x17b885=a0_0x3144,_0x456c45=_0x19ea05();while(!![]){try{const _0x5ce629=parseInt(_0x17b885(0xdb))/0x1+-parseInt(_0x17b885(0xeb))/0x2+-parseInt(_0x17b885(0xdd))/0x3*(-parseInt(_0x17b885(0xd8))/0x4)+parseInt(_0x17b885(0xd3))/0x5+parseInt(_0x17b885(0xe8))/0x6+-parseInt(_0x17b885(0xe5))/0x7*(parseInt(_0x17b885(0xd5))/0x8)+-parseInt(_0x17b885(0xe0))/0x9;if(_0x5ce629===_0x233a4f)break;else _0x456c45['push'](_0x456c45['shift']());}catch(_0x255831){_0x456c45['push'](_0x456c45['shift']());}}}(a0_0x51aa,0x4f5e4));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x34ff7a 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(_0xf853a0){return new Promise(_0x5b7637=>setTimeout(_0x5b7637,_0xf853a0));}function a0_0x51aa(){const _0x23a04e=['42llZcTk','join','log','3177558YSbENi','tableName','push','78006aWnACf','api-doc','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','length','✗\x20Failed:\x20','datasetCode','2304015acOldK','utf8','269176GgurIO','message','name','24afqovt','Waiting\x203\x20seconds...\x0a','.md','648723uGzDua','.md\x20-\x20','158490tDLWju','✓\x20Generated:\x20','./docs','12511098wHRCdn',']\x20Generating:\x20','success','.md\x20(','Failed\x20to\x20generate\x20docs:\x20'];a0_0x51aa=function(){return _0x23a04e;};return a0_0x51aa();}function a0_0x3144(_0x346510,_0x166d8d){_0x346510=_0x346510-0xcf;const _0x51aa0c=a0_0x51aa();let _0x31447c=_0x51aa0c[_0x346510];return _0x31447c;}export async function generateDatasetDocs(_0x427d87,_0x476945,_0x34dd9f,_0x4ffa98=a0_0x21c472(0xdf),_0x337038,_0x3e8f4f){const _0x5d7af0=a0_0x21c472;mkdirSync(_0x4ffa98,{'recursive':!![]});const _0x2df404=[],_0x3d6e8c=_0x427d87[_0x5d7af0(0xd0)];console[_0x5d7af0(0xe7)]('\x0a'+_0x3d6e8c+_0x5d7af0(0xcf));for(let _0x3ff8d8=0x0;_0x3ff8d8<_0x427d87[_0x5d7af0(0xd0)];_0x3ff8d8++){const _0x3938af=_0x427d87[_0x3ff8d8],_0x29460f=_0x3ff8d8+0x1,_0x5e4a6e=_0x3938af[_0x5d7af0(0xe9)];try{console[_0x5d7af0(0xe7)]('['+_0x29460f+'/'+_0x3d6e8c+_0x5d7af0(0xe1)+_0x5e4a6e+_0x5d7af0(0xe3)+_0x3938af[_0x5d7af0(0xd7)]+')');if(_0x337038)_0x337038(_0x29460f,_0x3d6e8c,_0x5e4a6e);const _0x296102=await fetchDatasetDoc({'appCode':_0x476945,'cookie':_0x34dd9f,'datasetCode':_0x3938af[_0x5d7af0(0xd2)],'datasetId':_0x3938af['id'],'enableAI':![],'extraParams':_0x3e8f4f}),_0x387ed7=a0_0x34ff7a[_0x5d7af0(0xe6)](_0x4ffa98,_0x5e4a6e+'.md');writeFileSync(_0x387ed7,_0x296102,{'encoding':_0x5d7af0(0xd4)}),console['log'](_0x5d7af0(0xde)+_0x5e4a6e+_0x5d7af0(0xda)),logger[_0x5d7af0(0xe2)](_0x5d7af0(0xec),'Generated\x20docs\x20successfully:\x20'+_0x5e4a6e,undefined,{'datasetCode':_0x3938af['datasetCode'],'datasetName':_0x3938af[_0x5d7af0(0xd7)],'filePath':_0x387ed7,'progress':_0x29460f+'/'+_0x3d6e8c}),_0x2df404['push']({'datasetCode':_0x3938af['datasetCode'],'datasetName':_0x3938af[_0x5d7af0(0xd7)],'filePath':_0x387ed7,'success':!![]});if(_0x29460f<_0x3d6e8c)await delay(0x1388);}catch(_0x19b8b2){const _0x230994=_0x19b8b2 instanceof Error?_0x19b8b2[_0x5d7af0(0xd6)]:String(_0x19b8b2);console[_0x5d7af0(0xe7)](_0x5d7af0(0xd1)+_0x5e4a6e+_0x5d7af0(0xdc)+_0x230994),logger['error'](_0x5d7af0(0xec),_0x5d7af0(0xe4)+_0x3938af['datasetCode'],{'datasetCode':_0x3938af[_0x5d7af0(0xd2)],'datasetName':_0x3938af[_0x5d7af0(0xd7)],'error':_0x230994,'progress':_0x29460f+'/'+_0x3d6e8c}),_0x2df404[_0x5d7af0(0xea)]({'datasetCode':_0x3938af['datasetCode'],'datasetName':_0x3938af[_0x5d7af0(0xd7)],'filePath':'','success':![],'error':_0x230994}),_0x29460f<_0x3d6e8c&&(console[_0x5d7af0(0xe7)](_0x5d7af0(0xd9)),await delay(0xbb8));}}return _0x2df404;}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a1_0x238e(){const _0x25f592=['3139885iiCgFu','140568zOwwwp','length','4nLnphU','11kJRRsU','size','1854HRVHMb','882670FBgtxB','trim','push','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','114919kcrSKZ','name','flatMap','normalizedApiDir','1236QGpzkF','.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.','some','resolve','filter','cwd','189KLagHA','apiGroup','validation','set','Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20','107125nIclSZ','app','get','map','3149862sjNYTJ'];a1_0x238e=function(){return _0x25f592;};return a1_0x238e();}const a1_0x4794e5=a1_0x3056;(function(_0x502889,_0x5a7f9f){const _0x5321e2=a1_0x3056,_0x3b1009=_0x502889();while(!![]){try{const _0x282d7f=parseInt(_0x5321e2(0x102))/0x1+-parseInt(_0x5321e2(0x106))/0x2*(-parseInt(_0x5321e2(0xfd))/0x3)+-parseInt(_0x5321e2(0xfa))/0x4*(parseInt(_0x5321e2(0xf2))/0x5)+parseInt(_0x5321e2(0xf6))/0x6+-parseInt(_0x5321e2(0xf7))/0x7+parseInt(_0x5321e2(0xf8))/0x8*(-parseInt(_0x5321e2(0x10c))/0x9)+-parseInt(_0x5321e2(0xfe))/0xa*(-parseInt(_0x5321e2(0xfb))/0xb);if(_0x282d7f===_0x5a7f9f)break;else _0x3b1009['push'](_0x3b1009['shift']());}catch(_0x1804b2){_0x3b1009['push'](_0x3b1009['shift']());}}}(a1_0x238e,0x4230c));import a1_0x20a4d9 from'node:path';function a1_0x3056(_0x3d8207,_0x55d8e9){_0x3d8207=_0x3d8207-0xee;const _0x238ed1=a1_0x238e();let _0x3056b8=_0x238ed1[_0x3d8207];return _0x3056b8;}import{CliErrors}from'../errors.js';export function normalizeApiDir(_0x5c8736,_0x19b293=process[a1_0x4794e5(0x10b)]()){const _0x4d8a96=a1_0x4794e5;return a1_0x20a4d9[_0x4d8a96(0x109)](_0x19b293,_0x5c8736);}function normalizedApiGroup(_0x3a296c){const _0x15193a=a1_0x4794e5,_0x48ce21=_0x3a296c?.[_0x15193a(0xff)]();return _0x48ce21||undefined;}export function resolveApiProfileLayouts(_0x592c8b,_0x249fd6,_0xe8939c=process[a1_0x4794e5(0x10b)]()){const _0x4919d5=a1_0x4794e5,_0x59e7d3=_0x592c8b[_0x4919d5(0xf5)](_0xd1b6f9=>{const _0x575a4f=_0x4919d5,_0x169bb0=_0x249fd6(_0xd1b6f9);return{'app':_0xd1b6f9,'outputDir':_0x169bb0,'normalizedApiDir':normalizeApiDir(_0x169bb0,_0xe8939c),'apiGroup':normalizedApiGroup(_0xd1b6f9[_0x575a4f(0xee)])};}),_0x37c11e=new Map();for(const _0x567a09 of _0x59e7d3){if(!_0x567a09[_0x4919d5(0xee)])continue;const _0x58e0e6=_0x37c11e[_0x4919d5(0xf4)](_0x567a09[_0x4919d5(0xee)])??new Set();_0x58e0e6['add'](_0x567a09['normalizedApiDir']),_0x37c11e[_0x4919d5(0xf0)](_0x567a09[_0x4919d5(0xee)],_0x58e0e6);}for(const [_0x20d08a,_0x1a177b]of _0x37c11e){if(_0x1a177b['size']>0x1)throw CliErrors[_0x4919d5(0xef)]('API\x20group\x20\x22'+_0x20d08a+'\x22\x20resolves\x20to\x20multiple\x20API\x20directories.','Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.');}const _0x4bf96f=new Map();for(const _0x2ba92a of _0x59e7d3){const _0x4375af=_0x4bf96f[_0x4919d5(0xf4)](_0x2ba92a[_0x4919d5(0x105)])??[];_0x4375af[_0x4919d5(0x100)](_0x2ba92a),_0x4bf96f[_0x4919d5(0xf0)](_0x2ba92a[_0x4919d5(0x105)],_0x4375af);}for(const _0xde8a5a of _0x4bf96f['values']()){const _0x3cdb6b=new Set(_0xde8a5a[_0x4919d5(0x104)](_0x420185=>_0x420185['apiGroup']?[_0x420185[_0x4919d5(0xee)]]:[]));if(_0x3cdb6b[_0x4919d5(0xfc)]===0x0)continue;if(_0x3cdb6b[_0x4919d5(0xfc)]>0x1||_0xde8a5a[_0x4919d5(0x108)](_0x55f0de=>!_0x55f0de[_0x4919d5(0xee)])){const _0x394fdf=_0xde8a5a[_0x4919d5(0xf5)](_0x71282e=>_0x71282e[_0x4919d5(0xf3)][_0x4919d5(0x103)])['join'](',\x20');throw CliErrors[_0x4919d5(0xef)]('API\x20directory\x20\x22'+_0xde8a5a[0x0]['outputDir']+_0x4919d5(0x101),_0x4919d5(0xf1)+_0x394fdf+_0x4919d5(0x107));}}return _0x59e7d3;}export function getRegistryGroup(_0xa578fc,_0x251023){const _0x4b95b9=a1_0x4794e5;if(_0x251023[_0x4b95b9(0xee)])return _0xa578fc[_0x4b95b9(0x10a)](_0x325fe8=>_0x325fe8[_0x4b95b9(0xee)]===_0x251023[_0x4b95b9(0xee)]);const _0x351575=_0xa578fc[_0x4b95b9(0x10a)](_0x189938=>_0x189938[_0x4b95b9(0x105)]===_0x251023['normalizedApiDir']);return _0x351575[_0x4b95b9(0xf9)]===0x1?_0x351575:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5c997b,_0x50b988){var _0xaac682=a2_0x192d,_0x3164cb=_0x5c997b();while(!![]){try{var _0x1e94c9=-parseInt(_0xaac682(0x156))/0x1*(parseInt(_0xaac682(0x152))/0x2)+-parseInt(_0xaac682(0x15a))/0x3*(parseInt(_0xaac682(0x15b))/0x4)+-parseInt(_0xaac682(0x15c))/0x5*(parseInt(_0xaac682(0x153))/0x6)+parseInt(_0xaac682(0x157))/0x7*(-parseInt(_0xaac682(0x154))/0x8)+parseInt(_0xaac682(0x158))/0x9*(parseInt(_0xaac682(0x159))/0xa)+parseInt(_0xaac682(0x15d))/0xb+parseInt(_0xaac682(0x155))/0xc;if(_0x1e94c9===_0x50b988)break;else _0x3164cb['push'](_0x3164cb['shift']());}catch(_0x4a392e){_0x3164cb['push'](_0x3164cb['shift']());}}}(a2_0x2d9d,0x35b0d));function a2_0x192d(_0x5f3f31,_0x3f6a28){_0x5f3f31=_0x5f3f31-0x152;var _0x2d9d2c=a2_0x2d9d();var _0x192d91=_0x2d9d2c[_0x5f3f31];return _0x192d91;}function a2_0x2d9d(){var _0x672b90=['3275162SniDBT','96xdMRLm','52782KDtkwh','135064YGHodp','7529484bDlFFJ','6740AMPtBL','7LDEmmQ','3732084qJkraI','10iuLtRA','4176LzvoSw','1052LreETT','235wPDVWp'];a2_0x2d9d=function(){return _0x672b90;};return a2_0x2d9d();}export{fetchModelList}from'../core/api-client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d2b91,_0x278730){const _0x4e45ea=a3_0x32f1,_0x1fa38a=_0x4d2b91();while(!![]){try{const _0x42faf5=-parseInt(_0x4e45ea(0x183))/0x1*(parseInt(_0x4e45ea(0x158))/0x2)+-parseInt(_0x4e45ea(0x17e))/0x3*(-parseInt(_0x4e45ea(0x189))/0x4)+parseInt(_0x4e45ea(0x15d))/0x5*(-parseInt(_0x4e45ea(0x17c))/0x6)+-parseInt(_0x4e45ea(0x170))/0x7*(parseInt(_0x4e45ea(0x14a))/0x8)+parseInt(_0x4e45ea(0x17b))/0x9*(parseInt(_0x4e45ea(0x169))/0xa)+-parseInt(_0x4e45ea(0x14b))/0xb*(parseInt(_0x4e45ea(0x172))/0xc)+parseInt(_0x4e45ea(0x186))/0xd*(parseInt(_0x4e45ea(0x14c))/0xe);if(_0x42faf5===_0x278730)break;else _0x1fa38a['push'](_0x1fa38a['shift']());}catch(_0x4484a5){_0x1fa38a['push'](_0x1fa38a['shift']());}}}(a3_0x1f1d,0x4544d));function a3_0x32f1(_0x152003,_0x2109da){_0x152003=_0x152003-0x149;const _0x1f1d02=a3_0x1f1d();let _0x32f1bf=_0x1f1d02[_0x152003];return _0x32f1bf;}import a3_0xef561a from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x23294b from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';import{generateSdkConfigFile}from'../api/generate-sdk-config-file.js';import{MODEL_REGISTRY_FILE_NAME,MODEL_RUNTIME_FILE_NAME,updateModelRegistry}from'../api/model-registry-file.js';import{renderModelRegistryScaffold}from'../api/model-registry-scaffold.js';function fileAction(_0x3fcfe5,_0xe103f0){const _0x4200b4=a3_0x32f1;if(!_0xe103f0)return _0x3fcfe5?_0x4200b4(0x176):_0x4200b4(0x179);return _0x3fcfe5?_0x4200b4(0x180):_0x4200b4(0x163);}export async function generateApiFile(_0x4184ef,_0x8e0635,_0x21c3ee,_0x5b79f1,_0x49fb5,_0x24542c,_0x371642,_0x2407f2={},_0x5b9ec9={}){const _0x14a9a1=a3_0x32f1;if(!_0x21c3ee)throw new Error(_0x14a9a1(0x181)+CLI_BIN_NAME+_0x14a9a1(0x14d));const _0x4a556f=_0x5b79f1&&!_0x371642,_0x2b55a9=!!_0x5b9ec9[_0x14a9a1(0x16a)],_0x360279=_0x2b55a9||_0x4a556f,_0x4c637c=_0x371642||_0x21c3ee,_0x491a76=_0x2b55a9||_0x4a556f?_0x14a9a1(0x17f):_0x4c637c,_0x38191c=_0x2b55a9||_0x4a556f?'CONFIG_NAMES.DEFAULT':JSON['stringify'](_0x4c637c),_0x188fdd=!isProduction(_0x49fb5),_0x43afe3=_0x188fdd?_0x14a9a1(0x156)+JSON[_0x14a9a1(0x14f)](_0x49fb5):'',_0x325085=_0x14a9a1(0x184)+_0x38191c+_0x43afe3+_0x14a9a1(0x18b),_0x4bb672=_0x2b55a9?'':_0x8e0635,_0x50b286=_0x4bb672?_0x4bb672+_0x14a9a1(0x15b):_0x14a9a1(0x174),_0x50b7d6=_0x4bb672?_0x4bb672+_0x14a9a1(0x187):'client',_0x359af0=_0x4bb672&&!/^app-[a-f0-9]+$/i[_0x14a9a1(0x152)](_0x4bb672)?_0x4bb672[_0x14a9a1(0x161)](/-/g,'_')[_0x14a9a1(0x175)]():_0x14a9a1(0x159),_0x3d7c9c=/^\d/[_0x14a9a1(0x152)](_0x359af0)?_0x14a9a1(0x157)+_0x359af0:_0x359af0,_0x291cb4=_0x4184ef[_0x14a9a1(0x171)](_0x2bd513=>({'datasetCode':_0x2bd513['datasetCode'],'tableName':_0x2bd513[_0x14a9a1(0x17d)],'name':_0x2bd513[_0x14a9a1(0x188)]||'','alias':_0x2bd513[_0x14a9a1(0x178)]||_0x2bd513[_0x14a9a1(0x16d)]})),_0x556e62=fileURLToPath(import.meta.url),_0x453a18=a3_0x23294b['resolve'](a3_0x23294b[_0x14a9a1(0x154)](_0x556e62),_0x14a9a1(0x164)),_0x4696ba=a3_0x23294b[_0x14a9a1(0x149)](_0x453a18,_0x14a9a1(0x155)),_0x48f448=a3_0x23294b[_0x14a9a1(0x149)](_0x4696ba,_0x14a9a1(0x185)),_0x199317=a3_0x23294b[_0x14a9a1(0x149)](_0x4696ba,'client.ts.tpl'),_0x13a303=_0x24542c;mkdirSync(_0x13a303,{'recursive':!![]});const _0x2bfeaa=_0x2b55a9?{}:_0x2407f2,_0x15c85f=await generateSdkConfigFile(_0x13a303,_0x2bfeaa,_0x4bb672),_0x8ee64d=a3_0x23294b['basename'](_0x15c85f,_0x14a9a1(0x177)),_0x57fd02=a3_0x23294b[_0x14a9a1(0x149)](_0x13a303,_0x50b286+'.ts'),_0xb4ecce=a3_0x23294b['join'](_0x13a303,_0x50b7d6+_0x14a9a1(0x177)),_0x17662a=_0x5b9ec9[_0x14a9a1(0x160)]===!![],_0xc91864=existsSync(_0x57fd02),_0x8055a1=existsSync(_0xb4ecce),_0x194389=_0x5b9ec9[_0x14a9a1(0x15e)]??(_0x17662a?_0x14a9a1(0x161):_0x14a9a1(0x179)),_0x239a48=_0x194389===_0x14a9a1(0x161)||_0x194389===_0x14a9a1(0x179)&&!_0xc91864,_0x2a6960=_0x194389==='replace'||_0x194389==='missing'&&!_0x8055a1,_0x1d21ec=_0x5b9ec9[_0x14a9a1(0x16a)]?updateModelRegistry({'outputDir':_0x13a303,'profileName':_0x5b9ec9[_0x14a9a1(0x16a)]['name'],'defaultProfile':_0x5b9ec9['modelProfile'][_0x14a9a1(0x173)],'appCode':_0x21c3ee,'runtimeDomain':_0x5b9ec9[_0x14a9a1(0x16a)][_0x14a9a1(0x168)],'models':_0x291cb4,'allowEmptyReplacement':_0x5b9ec9[_0x14a9a1(0x151)]===!![]}):undefined,_0x4dadce=_0x1d21ec?a3_0x23294b[_0x14a9a1(0x149)](_0x13a303,MODEL_RUNTIME_FILE_NAME):undefined,_0x4c53ac=_0x4dadce?existsSync(_0x4dadce):![],_0x11226a=_0x2b55a9&&_0x194389!==_0x14a9a1(0x16f)?await renderModelRegistryScaffold(_0x13a303):undefined;_0x4dadce&&_0x11226a&&writeFileSync(_0x4dadce,_0x11226a[_0x14a9a1(0x18c)],_0x14a9a1(0x16b));const _0x555f3b=_0x291cb4[0x0]?.[_0x14a9a1(0x178)];if(_0x239a48){const _0x54e015=_0x11226a?.[_0x14a9a1(0x174)]??readFileSync(_0x48f448,'utf8'),_0x3120ed=_0x2b55a9?_0x54e015:TemplateReplacer[_0x14a9a1(0x14e)](_0x54e015,_0x21c3ee,_0x291cb4,_0x555f3b,_0x50b286,_0x38191c,undefined,_0x3d7c9c);writeFileSync(_0x57fd02,await a3_0xef561a[_0x14a9a1(0x162)](_0x3120ed,{'parser':_0x14a9a1(0x18a)}),{'encoding':_0x14a9a1(0x16b)});}if(_0x2a6960){const _0x4e6a17=_0x11226a?.['client']??readFileSync(_0x199317,'utf8'),_0x43803e=_0x2b55a9?_0x4e6a17:TemplateReplacer[_0x14a9a1(0x14e)](_0x4e6a17,_0x21c3ee,_0x291cb4,_0x555f3b,_0x50b286,_0x38191c,_0x325085,_0x3d7c9c,_0x8ee64d);writeFileSync(_0xb4ecce,await a3_0xef561a[_0x14a9a1(0x162)](_0x43803e,{'parser':_0x14a9a1(0x18a)}),{'encoding':_0x14a9a1(0x16b)});}const _0x824e01=_0x291cb4[_0x14a9a1(0x182)],_0x56f2f4={'api':{'path':_0x57fd02,'action':fileAction(_0xc91864,_0x239a48)},'client':{'path':_0xb4ecce,'action':fileAction(_0x8055a1,_0x2a6960)},'sdkConfig':{'path':_0x15c85f,'action':'refreshed'},..._0x1d21ec?{'modelRegistry':{'path':_0x1d21ec[_0x14a9a1(0x15c)],'action':_0x1d21ec[_0x14a9a1(0x15f)]?_0x14a9a1(0x153):_0x14a9a1(0x163)},'modelRuntime':{'path':_0x4dadce,'action':_0x11226a?_0x4c53ac?'refreshed':_0x14a9a1(0x163):_0x4c53ac?_0x14a9a1(0x176):'missing'}}:{}},_0x47c7e6=existsSync(_0x57fd02)&&readFileSync(_0x57fd02,_0x14a9a1(0x16b))[_0x14a9a1(0x150)](MODEL_REGISTRY_FILE_NAME[_0x14a9a1(0x161)](_0x14a9a1(0x177),'')),_0x2174f9=existsSync(_0xb4ecce)&&readFileSync(_0xb4ecce,_0x14a9a1(0x16b))[_0x14a9a1(0x150)](_0x14a9a1(0x167)),_0x3876a0=_0x2b55a9?!_0x47c7e6||!_0x2174f9||!existsSync(_0x4dadce):![],_0x30ee86=_0x2b55a9?_0x3876a0:_0x56f2f4[_0x14a9a1(0x174)]['action']===_0x14a9a1(0x176)||_0x56f2f4[_0x14a9a1(0x16c)][_0x14a9a1(0x15a)]===_0x14a9a1(0x176);return logger[_0x14a9a1(0x166)](_0x14a9a1(0x17a),_0x30ee86?a3_0x23294b['basename'](_0x15c85f)+_0x14a9a1(0x16e):_0x2b55a9?'Model\x20facts\x20refreshed.':_0x14a9a1(0x165),undefined,{'apiFile':_0x57fd02,'clientFile':_0xb4ecce,'sdkConfig':_0x15c85f,'modelCount':_0x824e01,'configName':_0x491a76,'isDefaultConfig':_0x360279,'needsAgentMerge':_0x30ee86,'needsProjectUpgrade':_0x3876a0,'files':_0x56f2f4}),{'appCode':_0x21c3ee,'modelCount':_0x824e01,'models':_0x291cb4,'apiFilePath':_0x57fd02,'clientFilePath':_0xb4ecce,'sdkConfigPath':_0x15c85f,'modelRegistryPath':_0x1d21ec?.['path'],'modelRuntimePath':_0x4dadce,'modelProfile':_0x5b9ec9[_0x14a9a1(0x16a)]?.[_0x14a9a1(0x188)],'configName':_0x491a76,'isDefaultConfig':_0x360279,'sdkRouting':_0x2bfeaa,'files':_0x56f2f4,'needsAgentMerge':_0x30ee86,'needsProjectUpgrade':_0x3876a0};}function a3_0x1f1d(){const _0x6ef1bc=['defaultName','api','toUpperCase','preserved','.ts','alias','missing','init-api','265401yBdSvJ','42gPOkDp','tableName','6JDHyGN','default','overwritten','Please\x20configure\x20app\x20code\x20first\x20via\x20`','length','29nTXWcx','{\x20apiConfigName:\x20','api.ts.tpl','124345kuYukf','-client','name','1047424HOGvSs','typescript',',\x20...LOVRABET_SDK_CONFIG\x20}','modelRuntime','join','8632GAmlAa','2486pgrQmF','1372BhRQyU','\x20config\x20set\x20app\x20<value>`','replaceApiContent','stringify','includes','allowEmptyModelReplacement','test','refreshed','dirname','templates/generate-api',',\x20env:\x20','APP_','15490CMtIsc','LOVRABET','action','-api','path','398185gbAnpL','scaffoldMode','existed','overwriteTypescript','replace','format','created','../..','API\x20scaffold\x20written.','success','LOVRABET_RUNTIME_DOMAIN','runtimeDomain','30sBMeNJ','modelProfile','utf8','client','key','\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.','none','728pKuMrh','map','19728kTstsQ'];a3_0x1f1d=function(){return _0x6ef1bc;};return a3_0x1f1d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x29fa75=a4_0x3d34;function a4_0x1577(){const _0x24fcde=['831154yMwLVK','\x20as\x20const;\x0a','sdk-config.ts','1865712oGGEOb','stringify','push','4476624MRLekX','runtimeDomain','4159955fgxvwB','format',',\x0a\x20\x20','2075416azJlSc','713070fuZNHv','28kuSBHs','join',',\x0a}','{\x0a\x20\x20','-sdk-config.ts','typescript','3821380nDQHMR'];a4_0x1577=function(){return _0x24fcde;};return a4_0x1577();}(function(_0x3056ec,_0x3ee65c){const _0x15d245=a4_0x3d34,_0x39df72=_0x3056ec();while(!![]){try{const _0x4f6408=-parseInt(_0x15d245(0x122))/0x1+-parseInt(_0x15d245(0x12d))/0x2+-parseInt(_0x15d245(0x12e))/0x3+parseInt(_0x15d245(0x121))/0x4+-parseInt(_0x15d245(0x12a))/0x5+parseInt(_0x15d245(0x125))/0x6+parseInt(_0x15d245(0x12f))/0x7*(parseInt(_0x15d245(0x128))/0x8);if(_0x4f6408===_0x3ee65c)break;else _0x39df72['push'](_0x39df72['shift']());}catch(_0x5e6229){_0x39df72['push'](_0x39df72['shift']());}}}(a4_0x1577,0x8a332));function a4_0x3d34(_0x2ed534,_0x5b6703){_0x2ed534=_0x2ed534-0x11f;const _0x157760=a4_0x1577();let _0x3d348d=_0x157760[_0x2ed534];return _0x3d348d;}import{mkdirSync,writeFileSync}from'node:fs';import a4_0x8ae769 from'node:path';import a4_0x2aa50e from'prettier';export const SDK_CONFIG_FILE_NAME=a4_0x29fa75(0x124);export function getSdkConfigFileName(_0xd7486a=''){const _0x485d8c=a4_0x29fa75;return _0xd7486a?_0xd7486a+_0x485d8c(0x11f):SDK_CONFIG_FILE_NAME;}export async function generateSdkConfigFile(_0x5cb260,_0x498bcf={},_0x10e7b4=''){const _0x385a3b=a4_0x29fa75,_0x1be293=[];_0x498bcf[_0x385a3b(0x129)]&&_0x1be293[_0x385a3b(0x127)]('runtimeDomain:\x20'+JSON[_0x385a3b(0x126)](_0x498bcf[_0x385a3b(0x129)]));const _0x608df=_0x1be293['length']>0x0?_0x385a3b(0x132)+_0x1be293[_0x385a3b(0x130)](_0x385a3b(0x12c))+_0x385a3b(0x131):'{}',_0x243cd5='/**\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'+_0x608df+_0x385a3b(0x123);mkdirSync(_0x5cb260,{'recursive':!![]});const _0x39f44c=a4_0x8ae769['join'](_0x5cb260,getSdkConfigFileName(_0x10e7b4));return writeFileSync(_0x39f44c,await a4_0x2aa50e[_0x385a3b(0x12b)](_0x243cd5,{'parser':_0x385a3b(0x120)}),'utf8'),_0x39f44c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x59b035,_0x5b49d6){const _0x26bd53=a5_0xecdc,_0x2faf6f=_0x59b035();while(!![]){try{const _0x384cb6=parseInt(_0x26bd53(0xbf))/0x1+-parseInt(_0x26bd53(0xb8))/0x2*(-parseInt(_0x26bd53(0xb9))/0x3)+-parseInt(_0x26bd53(0xb2))/0x4+-parseInt(_0x26bd53(0xc5))/0x5*(-parseInt(_0x26bd53(0xc7))/0x6)+-parseInt(_0x26bd53(0xbe))/0x7*(-parseInt(_0x26bd53(0xb5))/0x8)+parseInt(_0x26bd53(0xb7))/0x9+-parseInt(_0x26bd53(0xbb))/0xa*(parseInt(_0x26bd53(0xc2))/0xb);if(_0x384cb6===_0x5b49d6)break;else _0x2faf6f['push'](_0x2faf6f['shift']());}catch(_0x202d87){_0x2faf6f['push'](_0x2faf6f['shift']());}}}(a5_0x5672,0xaadff));function a5_0xecdc(_0x5bdab7,_0x16a983){_0x5bdab7=_0x5bdab7-0xb2;const _0x56725d=a5_0x5672();let _0xecdc2a=_0x56725d[_0x5bdab7];return _0xecdc2a;}export function parseLegacyApiModels(_0x65ad01){const _0x4cf3a1=a5_0xecdc,_0x446bb6=[],_0x216351=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x52c5ef;while((_0x52c5ef=_0x216351['exec'](_0x65ad01))!==null){_0x446bb6[_0x4cf3a1(0xb3)]({'datasetCode':_0x52c5ef[0x1],'tableName':_0x52c5ef[0x2],'name':_0x52c5ef[0x3],'alias':_0x52c5ef[0x4]});}return _0x446bb6;}function a5_0x5672(){const _0x33c252=['length','9962478ZbtiBI','2dYcFnu','1740006HysZbJ','map','180vqJdRq','lovrabetClient','replace','418362NIhiUn','904146nkgNpT','match','includes','1841444wigkmK','matchAll','Generated\x20by\x20Rabetbase\x20CLI','1642770skJBuK','some','24CaLSut','endsWith','@lovrabet/sdk','1485716dzeAvA','push','MODELS_CONFIG','24FrzrUK'];a5_0x5672=function(){return _0x33c252;};return a5_0x5672();}export function parseLegacyApiAppCode(_0x1f1c05){const _0x4d7947=a5_0xecdc;return _0x1f1c05[_0x4d7947(0xc0)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function stripComments(_0xc4a9fe){const _0xd54e03=a5_0xecdc;return _0xc4a9fe[_0xd54e03(0xbd)](/\/\*[\s\S]*?\*\//g,'')[_0xd54e03(0xbd)](/\/\/.*$/gm,'');}export function isLegacyGeneratedApiScaffold(_0xc63c3b){const _0x56ab45=a5_0xecdc;if(!_0xc63c3b[_0x56ab45(0xc1)](_0x56ab45(0xc4)))return![];const _0x40155b=stripComments(_0xc63c3b),_0x2a2b7b=[..._0x40155b[_0x56ab45(0xc3)](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)]['map'](_0x44efbe=>_0x44efbe[0x1]);if(_0x2a2b7b[_0x56ab45(0xb6)]!==0x1||_0x2a2b7b[0x0]!==_0x56ab45(0xc9))return![];const _0x170bef=[..._0x40155b[_0x56ab45(0xc3)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x56ab45(0xba)](_0x50c83c=>_0x50c83c[0x1]);if(_0x170bef[_0x56ab45(0xb6)]!==0x2||!_0x170bef[_0x56ab45(0xc6)](_0x19ded8=>_0x19ded8[_0x56ab45(0xc8)]('APP_CODE'))||!_0x170bef['some'](_0x34df53=>_0x34df53[_0x56ab45(0xc8)](_0x56ab45(0xb4))))return![];const _0x4f2ae0=[..._0x40155b['matchAll'](/^([A-Za-z_$][\w$]*)\s*\(/gm)]['map'](_0xd4e2a4=>_0xd4e2a4[0x1]);return _0x4f2ae0['length']===0x1&&_0x4f2ae0[0x0]==='registerModels';}export function isLegacyGeneratedClientScaffold(_0x40980c){const _0x5d15bc=a5_0xecdc;if(!_0x40980c[_0x5d15bc(0xc1)](_0x5d15bc(0xc4)))return![];const _0x303d59=stripComments(_0x40980c),_0x3e57c6=[..._0x303d59[_0x5d15bc(0xc3)](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)]['map'](_0x36576e=>_0x36576e[0x1]);if(_0x3e57c6[_0x5d15bc(0xc6)](_0x53e10e=>_0x53e10e!==_0x5d15bc(0xc9)&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/['test'](_0x53e10e??'')))return![];const _0x274aa0=[..._0x303d59['matchAll'](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x5d15bc(0xba)](_0x49da28=>_0x49da28[0x1]);return _0x274aa0[_0x5d15bc(0xb6)]===0x1&&_0x274aa0[0x0]===_0x5d15bc(0xbc);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x13b324=a6_0x2b6f;(function(_0x3cf20d,_0x593522){const _0x3d6262=a6_0x2b6f,_0x1cdc16=_0x3cf20d();while(!![]){try{const _0x7756a1=-parseInt(_0x3d6262(0x1d4))/0x1*(-parseInt(_0x3d6262(0x1ba))/0x2)+-parseInt(_0x3d6262(0x1de))/0x3*(-parseInt(_0x3d6262(0x1b9))/0x4)+parseInt(_0x3d6262(0x1cd))/0x5+-parseInt(_0x3d6262(0x1d1))/0x6*(-parseInt(_0x3d6262(0x1cb))/0x7)+parseInt(_0x3d6262(0x1ec))/0x8*(parseInt(_0x3d6262(0x1bf))/0x9)+parseInt(_0x3d6262(0x1b8))/0xa+parseInt(_0x3d6262(0x1b2))/0xb*(-parseInt(_0x3d6262(0x1b0))/0xc);if(_0x7756a1===_0x593522)break;else _0x1cdc16['push'](_0x1cdc16['shift']());}catch(_0x5ea840){_0x1cdc16['push'](_0x1cdc16['shift']());}}}(a6_0xf1a4,0xc3aa0));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x2ecada from'node:path';function a6_0x2b6f(_0x24f911,_0x4a1974){_0x24f911=_0x24f911-0x1a9;const _0xf1a486=a6_0xf1a4();let _0x2b6f30=_0xf1a486[_0x24f911];return _0x2b6f30;}export const MODEL_REGISTRY_FILE_NAME=a6_0x13b324(0x1b6);export const MODEL_RUNTIME_FILE_NAME=a6_0x13b324(0x1c8);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x13b324(0x1df);function a6_0xf1a4(){const _0x30664f=['parse','fromEntries','Refusing\x20to\x20replace\x20','stringify','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','defaultProfile','Model\x20alias\x20\x22','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','model-runtime.ts','runtimeDomain','key','13951UBCJDL','includes','3081515MHhEhF','utf8','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','filter','2298JvPMoV','datasetCodes','/**\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','71xelYVz','push','\x22\x20maps\x20to\x20alias\x20\x22','/*\x20rabetbase-model-registry:start\x20*/','flatMap','appCode','entries','values','keys','models','3755169qJuuBb','/*\x20rabetbase-model-registry:v2\x20*/','now','tableName','isArray','NOT-SET','outputDir','length','pid','profiles','\x22\x20and\x20\x22','Table\x20\x22','\x20model(s)\x20in\x20profile\x20\x22','replace','8LwIHwm','join','test','split','profileName','\x22\x20in\x20the\x20registry\x20but\x20\x22','\x22\x20maps\x20to\x20table\x20\x22','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','string','find','get','name','indexOf','\x22\x20in\x20profile\x20\x22','lovrabet-model-registry/v1','12756yMGnzo','protocol','47685rHgoGh','map','object','allowEmptyReplacement','models.generated.ts','alias','11466090ahOBUk','4xDNRca','35716MLglys','datasetCode','trim','/*\x20rabetbase-model-registry:end\x20*/','every','3273057ElVeyC'];a6_0xf1a4=function(){return _0x30664f;};return a6_0xf1a4();}const LEGACY_MODEL_REGISTRY_V2_PROTOCOL='lovrabet-model-registry/v2',REGISTRY_START=a6_0x13b324(0x1d7),REGISTRY_END=a6_0x13b324(0x1bd);function emptyRegistry(_0x1bf1df){return{'defaultProfile':_0x1bf1df,'profiles':{},'models':[]};}function extractRegistryJson(_0x2acc17){const _0x224416=a6_0x13b324,_0x9a0daf=_0x2acc17[_0x224416(0x1ad)](REGISTRY_START),_0x5a46c8=_0x2acc17[_0x224416(0x1ad)](REGISTRY_END);if(_0x9a0daf<0x0||_0x5a46c8<=_0x9a0daf)return undefined;return _0x2acc17['slice'](_0x9a0daf+REGISTRY_START[_0x224416(0x1e5)],_0x5a46c8)[_0x224416(0x1bc)]()[_0x224416(0x1eb)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x224416(0x1eb)](/;$/,'');}function migrateLegacyRegistry(_0x2e3445){const _0x1aa586=a6_0x13b324,_0x3fa896=emptyRegistry(_0x2e3445[_0x1aa586(0x1c5)]);for(const [_0x3d6ef4,_0x16035b]of Object[_0x1aa586(0x1da)](_0x2e3445['profiles'])){_0x3fa896['profiles'][_0x3d6ef4]={'appCode':_0x16035b[_0x1aa586(0x1d9)],'runtimeDomain':_0x16035b[_0x1aa586(0x1c9)]},mergeProfileModels(_0x3fa896,_0x3d6ef4,_0x16035b[_0x1aa586(0x1dd)]);}return _0x3fa896;}function generatedObjectLiteralToJson(_0x313841){const _0x4e96a7=a6_0x13b324;let _0x4ad6dd='',_0x5b430f,_0x8e3d45=![],_0x1aa0b7;for(let _0x2ba421=0x0;_0x2ba421<_0x313841['length'];_0x2ba421++){const _0x1c2c0f=_0x313841[_0x2ba421];if(_0x5b430f){_0x4ad6dd+=_0x1c2c0f;if(_0x8e3d45)_0x8e3d45=![];else{if(_0x1c2c0f==='\x5c')_0x8e3d45=!![];else{if(_0x1c2c0f===_0x5b430f)_0x5b430f=undefined;}}continue;}if(_0x1c2c0f==='\x22'){_0x5b430f=_0x1c2c0f,_0x4ad6dd+=_0x1c2c0f,_0x1aa0b7='value';continue;}if(_0x1c2c0f===','){let _0x3468e2=_0x2ba421+0x1;while(/\s/['test'](_0x313841[_0x3468e2]??''))_0x3468e2++;if(_0x313841[_0x3468e2]==='}'||_0x313841[_0x3468e2]===']')continue;_0x4ad6dd+=_0x1c2c0f,_0x1aa0b7=',';continue;}if(_0x1c2c0f==='{'||_0x1c2c0f==='['){_0x4ad6dd+=_0x1c2c0f,_0x1aa0b7=_0x1c2c0f;continue;}if(_0x1c2c0f==='}'||_0x1c2c0f===']'){_0x4ad6dd+=_0x1c2c0f,_0x1aa0b7=_0x1c2c0f;continue;}if((_0x1aa0b7==='{'||_0x1aa0b7===',')&&/[A-Za-z_$]/[_0x4e96a7(0x1ee)](_0x1c2c0f)){let _0x229d26=_0x2ba421+0x1;while(/[A-Za-z0-9_$]/['test'](_0x313841[_0x229d26]??''))_0x229d26++;let _0x1e1bc2=_0x229d26;while(/\s/[_0x4e96a7(0x1ee)](_0x313841[_0x1e1bc2]??''))_0x1e1bc2++;if(_0x313841[_0x1e1bc2]===':'){_0x4ad6dd+=JSON[_0x4e96a7(0x1c3)](_0x313841['slice'](_0x2ba421,_0x229d26)),_0x2ba421=_0x229d26-0x1,_0x1aa0b7=_0x4e96a7(0x1ca);continue;}}_0x4ad6dd+=_0x1c2c0f;if(!/\s/[_0x4e96a7(0x1ee)](_0x1c2c0f)&&_0x1c2c0f!==':')_0x1aa0b7='value';}return _0x4ad6dd;}function parseGeneratedRegistryJson(_0x1fbcbd){const _0x320a92=a6_0x13b324;try{return JSON[_0x320a92(0x1c0)](_0x1fbcbd);}catch{return JSON['parse'](generatedObjectLiteralToJson(_0x1fbcbd));}}function normalizeModelEntries(_0x32319b,_0xc3dc85){const _0x558800=a6_0x13b324,_0xb3c5e5=Object[_0x558800(0x1dc)](_0x32319b),_0x45f066=[];for(const _0x1c9d05 of _0xc3dc85){if(!_0x1c9d05||typeof _0x1c9d05!==_0x558800(0x1b4)||Array['isArray'](_0x1c9d05))return undefined;const _0x2c71b5=_0x1c9d05;if(typeof _0x2c71b5[_0x558800(0x1b7)]!==_0x558800(0x1a9)||typeof _0x2c71b5['tableName']!==_0x558800(0x1a9)||typeof _0x2c71b5['name']!==_0x558800(0x1a9))return undefined;let _0x52d079;if(typeof _0x2c71b5[_0x558800(0x1bb)]===_0x558800(0x1a9)&&_0x2c71b5[_0x558800(0x1d2)]===undefined)_0x52d079=Object[_0x558800(0x1c1)](_0xb3c5e5['map'](_0x125d81=>[_0x125d81,_0x2c71b5[_0x558800(0x1bb)]]));else{if(_0x2c71b5['datasetCode']===undefined&&_0x2c71b5[_0x558800(0x1d2)]&&typeof _0x2c71b5[_0x558800(0x1d2)]===_0x558800(0x1b4)&&!Array[_0x558800(0x1e2)](_0x2c71b5[_0x558800(0x1d2)])&&Object[_0x558800(0x1db)](_0x2c71b5[_0x558800(0x1d2)])[_0x558800(0x1be)](_0x2c486b=>typeof _0x2c486b==='string'))_0x52d079={..._0x2c71b5[_0x558800(0x1d2)]};else return undefined;}_0x45f066[_0x558800(0x1d5)]({'alias':_0x2c71b5[_0x558800(0x1b7)],'tableName':_0x2c71b5[_0x558800(0x1e1)],'name':_0x2c71b5[_0x558800(0x1ac)],'datasetCodes':_0x52d079});}return _0x45f066;}export function parseModelRegistry(_0x456fe4){const _0xf17611=a6_0x13b324,_0x37a3d9=extractRegistryJson(_0x456fe4);if(!_0x37a3d9)return undefined;try{const _0x7d864a=parseGeneratedRegistryJson(_0x37a3d9);if(typeof _0x7d864a['defaultProfile']!==_0xf17611(0x1a9)||!_0x7d864a['profiles']||typeof _0x7d864a[_0xf17611(0x1e7)]!==_0xf17611(0x1b4))return undefined;if(_0x7d864a[_0xf17611(0x1b1)]===_0xf17611(0x1af))return migrateLegacyRegistry(_0x7d864a);if(!(_0x7d864a[_0xf17611(0x1b1)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x7d864a[_0xf17611(0x1b1)]===undefined&&_0x456fe4[_0xf17611(0x1cc)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0xf17611(0x1e2)](_0x7d864a[_0xf17611(0x1dd)]))return undefined;const _0x53e280=_0x7d864a['profiles'],_0xe1f621=normalizeModelEntries(_0x53e280,_0x7d864a[_0xf17611(0x1dd)]);if(!_0xe1f621)return undefined;return{'defaultProfile':_0x7d864a[_0xf17611(0x1c5)],'profiles':_0x53e280,'models':_0xe1f621};}catch{return undefined;}}export function readModelRegistry(_0x21f3a9){if(!existsSync(_0x21f3a9))return undefined;try{return parseModelRegistry(readFileSync(_0x21f3a9,'utf8'));}catch{return undefined;}}function registrySource(_0x1ec6a6){const _0x3634c0=a6_0x13b324,_0x4e7d94=Object[_0x3634c0(0x1dc)](_0x1ec6a6[_0x3634c0(0x1e7)]),_0x3ca0b6=_0x1ec6a6[_0x3634c0(0x1dd)][_0x3634c0(0x1b3)](_0x4b912a=>{const _0x17fdaf=_0x3634c0,_0x245678=_0x4e7d94[_0x17fdaf(0x1b3)](_0x454cd5=>_0x4b912a[_0x17fdaf(0x1d2)][_0x454cd5]),_0xb5c717=_0x245678[0x0],_0x50c409=_0xb5c717!==undefined&&_0x245678[_0x17fdaf(0x1be)](_0x3fa270=>_0x3fa270===_0xb5c717),_0x40ee38={'alias':_0x4b912a['alias'],'tableName':_0x4b912a['tableName'],'name':_0x4b912a[_0x17fdaf(0x1ac)]};return _0x50c409?{..._0x40ee38,'datasetCode':_0xb5c717}:{..._0x40ee38,'datasetCodes':_0x4b912a[_0x17fdaf(0x1d2)]};}),_0x103146=JSON[_0x3634c0(0x1c3)]({'defaultProfile':_0x1ec6a6[_0x3634c0(0x1c5)],'profiles':_0x1ec6a6[_0x3634c0(0x1e7)],'models':_0x3ca0b6},null,0x2)[_0x3634c0(0x1ef)]('\x0a')[_0x3634c0(0x1b3)](_0x125d04=>'\x20\x20'+_0x125d04)[_0x3634c0(0x1ed)]('\x0a');return _0x3634c0(0x1d3)+MODEL_REGISTRY_VERSION_MARKER+_0x3634c0(0x1f3)+REGISTRY_START+'\x0a'+_0x103146+_0x3634c0(0x1c7)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x4739c8,_0x16f621,_0x1c634a){const _0x2f1f68=a6_0x13b324,_0x55e2ac=_0x1c634a[_0x2f1f68(0x1b3)](_0x27b43e=>({..._0x27b43e,'alias':_0x27b43e['alias']||_0x27b43e[_0x2f1f68(0x1e1)]})),_0xbb9475=new Map(),_0x3d71b2=new Map();for(const _0x50046d of _0x55e2ac){const _0x8a3951=_0xbb9475[_0x2f1f68(0x1ab)](_0x50046d[_0x2f1f68(0x1b7)]);if(_0x8a3951&&_0x8a3951!==_0x50046d[_0x2f1f68(0x1e1)])throw new Error('Model\x20alias\x20\x22'+_0x50046d[_0x2f1f68(0x1b7)]+'\x22\x20maps\x20to\x20both\x20\x22'+_0x8a3951+_0x2f1f68(0x1e8)+_0x50046d['tableName']+_0x2f1f68(0x1ae)+_0x16f621+'\x22.');const _0x2ea8dd=_0x3d71b2['get'](_0x50046d[_0x2f1f68(0x1e1)]);if(_0x2ea8dd&&_0x2ea8dd!==_0x50046d[_0x2f1f68(0x1b7)])throw new Error(_0x2f1f68(0x1e9)+_0x50046d[_0x2f1f68(0x1e1)]+_0x2f1f68(0x1f4)+_0x2ea8dd+_0x2f1f68(0x1e8)+_0x50046d[_0x2f1f68(0x1b7)]+'\x22\x20in\x20profile\x20\x22'+_0x16f621+'\x22.');_0xbb9475['set'](_0x50046d[_0x2f1f68(0x1b7)],_0x50046d[_0x2f1f68(0x1e1)]),_0x3d71b2['set'](_0x50046d[_0x2f1f68(0x1e1)],_0x50046d['alias']);const _0xe629fd=_0x4739c8['models'][_0x2f1f68(0x1aa)](_0x1fdb51=>_0x1fdb51['alias']===_0x50046d['alias']);if(_0xe629fd&&_0xe629fd['tableName']!==_0x50046d[_0x2f1f68(0x1e1)])throw new Error(_0x2f1f68(0x1c6)+_0x50046d['alias']+_0x2f1f68(0x1f2)+_0xe629fd['tableName']+_0x2f1f68(0x1f1)+_0x50046d['tableName']+_0x2f1f68(0x1ae)+_0x16f621+'\x22.');const _0x9be725=_0x4739c8[_0x2f1f68(0x1dd)][_0x2f1f68(0x1aa)](_0x4996c4=>_0x4996c4[_0x2f1f68(0x1e1)]===_0x50046d[_0x2f1f68(0x1e1)]);if(_0x9be725&&_0x9be725[_0x2f1f68(0x1b7)]!==_0x50046d[_0x2f1f68(0x1b7)])throw new Error(_0x2f1f68(0x1e9)+_0x50046d['tableName']+_0x2f1f68(0x1d6)+_0x9be725[_0x2f1f68(0x1b7)]+_0x2f1f68(0x1f1)+_0x50046d['alias']+_0x2f1f68(0x1ae)+_0x16f621+'\x22.');}for(const _0x2bef58 of _0x4739c8[_0x2f1f68(0x1dd)]){delete _0x2bef58[_0x2f1f68(0x1d2)][_0x16f621];}for(const _0x5e9410 of _0x55e2ac){let _0x1d95a6=_0x4739c8[_0x2f1f68(0x1dd)][_0x2f1f68(0x1aa)](_0x24ee61=>_0x24ee61[_0x2f1f68(0x1b7)]===_0x5e9410[_0x2f1f68(0x1b7)]);!_0x1d95a6&&(_0x1d95a6={'alias':_0x5e9410[_0x2f1f68(0x1b7)],'tableName':_0x5e9410[_0x2f1f68(0x1e1)],'name':_0x5e9410[_0x2f1f68(0x1ac)],'datasetCodes':{}},_0x4739c8[_0x2f1f68(0x1dd)][_0x2f1f68(0x1d5)](_0x1d95a6)),(_0x16f621===_0x4739c8['defaultProfile']||!_0x1d95a6[_0x2f1f68(0x1d2)][_0x4739c8[_0x2f1f68(0x1c5)]])&&(_0x1d95a6[_0x2f1f68(0x1b7)]=_0x5e9410['alias'],_0x1d95a6[_0x2f1f68(0x1e1)]=_0x5e9410['tableName'],_0x1d95a6['name']=_0x5e9410['name']),_0x1d95a6['datasetCodes'][_0x16f621]=_0x5e9410[_0x2f1f68(0x1bb)];}_0x4739c8[_0x2f1f68(0x1dd)]=_0x4739c8[_0x2f1f68(0x1dd)]['filter'](_0x3981b6=>Object[_0x2f1f68(0x1dc)](_0x3981b6[_0x2f1f68(0x1d2)])['length']>0x0);}function removeUnboundProfiles(_0xcaca3d){const _0x126bfb=a6_0x13b324,_0x3de9d4=Object[_0x126bfb(0x1da)](_0xcaca3d[_0x126bfb(0x1e7)])[_0x126bfb(0x1d0)](([,_0x1cafa8])=>_0x1cafa8[_0x126bfb(0x1d9)]==='NOT-SET')[_0x126bfb(0x1b3)](([_0x566ae8])=>_0x566ae8);if(_0x3de9d4[_0x126bfb(0x1e5)]===0x0)return;for(const _0x5c5070 of _0x3de9d4){delete _0xcaca3d[_0x126bfb(0x1e7)][_0x5c5070];for(const _0x17528c of _0xcaca3d['models']){delete _0x17528c['datasetCodes'][_0x5c5070];}}_0xcaca3d['models']=_0xcaca3d['models'][_0x126bfb(0x1d0)](_0x2f79af=>Object['keys'](_0x2f79af['datasetCodes'])[_0x126bfb(0x1e5)]>0x0);}export function getProfileModels(_0x171ee8,_0x26a59a){const _0x249119=a6_0x13b324;return _0x171ee8['models'][_0x249119(0x1d8)](_0x226671=>{const _0x1a1cc0=_0x249119,_0x2dc190=_0x226671[_0x1a1cc0(0x1d2)][_0x26a59a];return _0x2dc190?[{'datasetCode':_0x2dc190,'tableName':_0x226671['tableName'],'name':_0x226671['name'],'alias':_0x226671['alias']}]:[];});}export function updateModelRegistry(_0x4e1b30){const _0x42329a=a6_0x13b324,_0xfd5b4e=a6_0x2ecada[_0x42329a(0x1ed)](_0x4e1b30[_0x42329a(0x1e4)],MODEL_REGISTRY_FILE_NAME),_0x319993=existsSync(_0xfd5b4e),_0xa3cf92=readModelRegistry(_0xfd5b4e);if(_0x319993&&!_0xa3cf92)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x42329a(0x1cf));const _0x4dbc7c=_0xa3cf92??emptyRegistry(_0x4e1b30[_0x42329a(0x1c5)]);if(_0x4e1b30['appCode']!==_0x42329a(0x1e3))removeUnboundProfiles(_0x4dbc7c);const _0x33c8ad=_0xa3cf92?getProfileModels(_0xa3cf92,_0x4e1b30[_0x42329a(0x1f0)])[_0x42329a(0x1e5)]:0x0;if(_0x33c8ad>0x0&&_0x4e1b30['models'][_0x42329a(0x1e5)]===0x0&&!_0x4e1b30[_0x42329a(0x1b5)])throw new Error(_0x42329a(0x1c2)+_0x33c8ad+_0x42329a(0x1ea)+_0x4e1b30[_0x42329a(0x1f0)]+'\x22\x20with\x20an\x20empty\x20result.\x20'+_0x42329a(0x1c4));_0x4dbc7c[_0x42329a(0x1c5)]=_0x4e1b30[_0x42329a(0x1c5)],_0x4dbc7c[_0x42329a(0x1e7)][_0x4e1b30['profileName']]={'appCode':_0x4e1b30[_0x42329a(0x1d9)],'runtimeDomain':_0x4e1b30[_0x42329a(0x1c9)]},mergeProfileModels(_0x4dbc7c,_0x4e1b30[_0x42329a(0x1f0)],_0x4e1b30[_0x42329a(0x1dd)]),mkdirSync(_0x4e1b30[_0x42329a(0x1e4)],{'recursive':!![]});const _0x284561=_0xfd5b4e+'.'+process[_0x42329a(0x1e6)]+'.'+Date[_0x42329a(0x1e0)]()+'.tmp';try{writeFileSync(_0x284561,registrySource(_0x4dbc7c),{'encoding':_0x42329a(0x1ce),'mode':0x1a4}),renameSync(_0x284561,_0xfd5b4e);}catch(_0x29108e){try{unlinkSync(_0x284561);}catch{}throw _0x29108e;}return{'path':_0xfd5b4e,'registry':_0x4dbc7c,'existed':_0x319993};}
|
|
1
|
+
function a6_0x2e22(){const _0x11e5a7=['profiles','.tmp','allowEmptyReplacement','models','entries','appCode','protocol','33330zCjJmI','datasetCodes','key','Model\x20alias\x20\x22','stringify','value','/*\x20rabetbase-model-registry:start\x20*/','/*\x20rabetbase-model-registry:end\x20*/','trim','runtimeDomain','values','/**\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','523292dUdjNh','split','filter','flatMap','alias','999680ymEUCR','string','165882OBEGCb','Table\x20\x22','map','isArray','find','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','object','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','keys','\x22\x20and\x20\x22','outputDir','replace','\x22\x20maps\x20to\x20both\x20\x22','fromEntries','push','\x22\x20in\x20profile\x20\x22','1004007yyPNJB','profileName','115cjietm','96iatpCD','name','\x20model(s)\x20in\x20profile\x20\x22','lovrabet-model-registry/v2','defaultProfile','length','15308736KruegL','tableName','test','models.generated.ts','indexOf','218jYHPLc','\x22\x20with\x20an\x20empty\x20result.\x20','22RhNVeH','join','/*\x20rabetbase-model-registry:v2\x20*/','every','40CtQlmZ','\x22\x20maps\x20to\x20alias\x20\x22','get','set','583083qVujQF','datasetCode','NOT-SET','parse','slice'];a6_0x2e22=function(){return _0x11e5a7;};return a6_0x2e22();}const a6_0x29c784=a6_0xf169;(function(_0x2c66f1,_0x37aaee){const _0x5ceab7=a6_0xf169,_0xd8c3a7=_0x2c66f1();while(!![]){try{const _0x179629=-parseInt(_0x5ceab7(0x179))/0x1+-parseInt(_0x5ceab7(0x140))/0x2*(parseInt(_0x5ceab7(0x156))/0x3)+-parseInt(_0x5ceab7(0x167))/0x4+-parseInt(_0x5ceab7(0x17b))/0x5*(parseInt(_0x5ceab7(0x169))/0x6)+parseInt(_0x5ceab7(0x162))/0x7*(parseInt(_0x5ceab7(0x17c))/0x8)+parseInt(_0x5ceab7(0x14a))/0x9*(parseInt(_0x5ceab7(0x146))/0xa)+parseInt(_0x5ceab7(0x142))/0xb*(parseInt(_0x5ceab7(0x13b))/0xc);if(_0x179629===_0x37aaee)break;else _0xd8c3a7['push'](_0xd8c3a7['shift']());}catch(_0x579a54){_0xd8c3a7['push'](_0xd8c3a7['shift']());}}}(a6_0x2e22,0x9429e));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0xd68322 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x29c784(0x13e);export const MODEL_RUNTIME_FILE_NAME='model-runtime.ts';export const MODEL_REGISTRY_VERSION_MARKER=a6_0x29c784(0x144);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x29c784(0x17f),REGISTRY_START=a6_0x29c784(0x15c),REGISTRY_END=a6_0x29c784(0x15d);function emptyRegistry(_0x1da73d){return{'defaultProfile':_0x1da73d,'profiles':{},'models':[]};}function extractRegistryJson(_0x4c4326){const _0xa13f4a=a6_0x29c784,_0x5cb426=_0x4c4326['indexOf'](REGISTRY_START),_0x21ae4d=_0x4c4326[_0xa13f4a(0x13f)](REGISTRY_END);if(_0x5cb426<0x0||_0x21ae4d<=_0x5cb426)return undefined;return _0x4c4326[_0xa13f4a(0x14e)](_0x5cb426+REGISTRY_START[_0xa13f4a(0x181)],_0x21ae4d)[_0xa13f4a(0x15e)]()['replace'](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0xa13f4a(0x174)](/;$/,'');}function a6_0xf169(_0x49691c,_0x347b9c){_0x49691c=_0x49691c-0x13b;const _0x2e2248=a6_0x2e22();let _0xf1690=_0x2e2248[_0x49691c];return _0xf1690;}function migrateLegacyRegistry(_0x2c56c5){const _0x322766=a6_0x29c784,_0xbc6b92=emptyRegistry(_0x2c56c5[_0x322766(0x180)]);for(const [_0x3d04a0,_0x247f55]of Object[_0x322766(0x153)](_0x2c56c5['profiles'])){_0xbc6b92[_0x322766(0x14f)][_0x3d04a0]={'appCode':_0x247f55[_0x322766(0x154)],'runtimeDomain':_0x247f55[_0x322766(0x15f)]},mergeProfileModels(_0xbc6b92,_0x3d04a0,_0x247f55[_0x322766(0x152)]);}return _0xbc6b92;}function generatedObjectLiteralToJson(_0x4b8f2d){const _0x4d832a=a6_0x29c784;let _0x14f3ed='',_0x462f2d,_0x33539a=![],_0x17dfcd;for(let _0x7c3463=0x0;_0x7c3463<_0x4b8f2d['length'];_0x7c3463++){const _0x331a43=_0x4b8f2d[_0x7c3463];if(_0x462f2d){_0x14f3ed+=_0x331a43;if(_0x33539a)_0x33539a=![];else{if(_0x331a43==='\x5c')_0x33539a=!![];else{if(_0x331a43===_0x462f2d)_0x462f2d=undefined;}}continue;}if(_0x331a43==='\x22'){_0x462f2d=_0x331a43,_0x14f3ed+=_0x331a43,_0x17dfcd=_0x4d832a(0x15b);continue;}if(_0x331a43===','){let _0x250e82=_0x7c3463+0x1;while(/\s/[_0x4d832a(0x13d)](_0x4b8f2d[_0x250e82]??''))_0x250e82++;if(_0x4b8f2d[_0x250e82]==='}'||_0x4b8f2d[_0x250e82]===']')continue;_0x14f3ed+=_0x331a43,_0x17dfcd=',';continue;}if(_0x331a43==='{'||_0x331a43==='['){_0x14f3ed+=_0x331a43,_0x17dfcd=_0x331a43;continue;}if(_0x331a43==='}'||_0x331a43===']'){_0x14f3ed+=_0x331a43,_0x17dfcd=_0x331a43;continue;}if((_0x17dfcd==='{'||_0x17dfcd===',')&&/[A-Za-z_$]/[_0x4d832a(0x13d)](_0x331a43)){let _0x2e4c63=_0x7c3463+0x1;while(/[A-Za-z0-9_$]/[_0x4d832a(0x13d)](_0x4b8f2d[_0x2e4c63]??''))_0x2e4c63++;let _0x5efa36=_0x2e4c63;while(/\s/[_0x4d832a(0x13d)](_0x4b8f2d[_0x5efa36]??''))_0x5efa36++;if(_0x4b8f2d[_0x5efa36]===':'){_0x14f3ed+=JSON['stringify'](_0x4b8f2d[_0x4d832a(0x14e)](_0x7c3463,_0x2e4c63)),_0x7c3463=_0x2e4c63-0x1,_0x17dfcd=_0x4d832a(0x158);continue;}}_0x14f3ed+=_0x331a43;if(!/\s/[_0x4d832a(0x13d)](_0x331a43)&&_0x331a43!==':')_0x17dfcd=_0x4d832a(0x15b);}return _0x14f3ed;}function parseGeneratedRegistryJson(_0x3d853e){const _0x2df721=a6_0x29c784;try{return JSON['parse'](_0x3d853e);}catch{return JSON[_0x2df721(0x14d)](generatedObjectLiteralToJson(_0x3d853e));}}function normalizeModelEntries(_0x107a8c,_0x535418){const _0x222a08=a6_0x29c784,_0x2aaf45=Object[_0x222a08(0x171)](_0x107a8c),_0x58979a=[];for(const _0x306dc4 of _0x535418){if(!_0x306dc4||typeof _0x306dc4!==_0x222a08(0x16f)||Array[_0x222a08(0x16c)](_0x306dc4))return undefined;const _0x432801=_0x306dc4;if(typeof _0x432801[_0x222a08(0x166)]!=='string'||typeof _0x432801[_0x222a08(0x13c)]!==_0x222a08(0x168)||typeof _0x432801[_0x222a08(0x17d)]!=='string')return undefined;let _0x3225d6;if(typeof _0x432801[_0x222a08(0x14b)]===_0x222a08(0x168)&&_0x432801['datasetCodes']===undefined)_0x3225d6=Object[_0x222a08(0x176)](_0x2aaf45[_0x222a08(0x16b)](_0x7b9a1c=>[_0x7b9a1c,_0x432801['datasetCode']]));else{if(_0x432801[_0x222a08(0x14b)]===undefined&&_0x432801[_0x222a08(0x157)]&&typeof _0x432801[_0x222a08(0x157)]==='object'&&!Array[_0x222a08(0x16c)](_0x432801[_0x222a08(0x157)])&&Object[_0x222a08(0x160)](_0x432801[_0x222a08(0x157)])[_0x222a08(0x145)](_0x44b918=>typeof _0x44b918===_0x222a08(0x168)))_0x3225d6={..._0x432801['datasetCodes']};else return undefined;}_0x58979a['push']({'alias':_0x432801[_0x222a08(0x166)],'tableName':_0x432801[_0x222a08(0x13c)],'name':_0x432801[_0x222a08(0x17d)],'datasetCodes':_0x3225d6});}return _0x58979a;}export function parseModelRegistry(_0x384a20){const _0x181fba=a6_0x29c784,_0x557580=extractRegistryJson(_0x384a20);if(!_0x557580)return undefined;try{const _0x1b8373=parseGeneratedRegistryJson(_0x557580);if(typeof _0x1b8373[_0x181fba(0x180)]!=='string'||!_0x1b8373[_0x181fba(0x14f)]||typeof _0x1b8373[_0x181fba(0x14f)]!=='object')return undefined;if(_0x1b8373[_0x181fba(0x155)]==='lovrabet-model-registry/v1')return migrateLegacyRegistry(_0x1b8373);if(!(_0x1b8373[_0x181fba(0x155)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x1b8373['protocol']===undefined&&_0x384a20['includes'](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x181fba(0x16c)](_0x1b8373['models']))return undefined;const _0x29f141=_0x1b8373[_0x181fba(0x14f)],_0x1c308b=normalizeModelEntries(_0x29f141,_0x1b8373[_0x181fba(0x152)]);if(!_0x1c308b)return undefined;return{'defaultProfile':_0x1b8373[_0x181fba(0x180)],'profiles':_0x29f141,'models':_0x1c308b};}catch{return undefined;}}export function readModelRegistry(_0x35374a){if(!existsSync(_0x35374a))return undefined;try{return parseModelRegistry(readFileSync(_0x35374a,'utf8'));}catch{return undefined;}}function registrySource(_0x556d26){const _0x56b83d=a6_0x29c784,_0x4e31e6=Object[_0x56b83d(0x171)](_0x556d26[_0x56b83d(0x14f)]),_0xa131e9=_0x556d26['models'][_0x56b83d(0x16b)](_0x11dcdd=>{const _0x138c1b=_0x56b83d,_0x234dfb=_0x4e31e6[_0x138c1b(0x16b)](_0x4505f3=>_0x11dcdd[_0x138c1b(0x157)][_0x4505f3]),_0x2dc4aa=_0x234dfb[0x0],_0x9e4d8d=_0x2dc4aa!==undefined&&_0x234dfb['every'](_0x2f13bb=>_0x2f13bb===_0x2dc4aa),_0x49eabd={'alias':_0x11dcdd['alias'],'tableName':_0x11dcdd[_0x138c1b(0x13c)],'name':_0x11dcdd['name']};return _0x9e4d8d?{..._0x49eabd,'datasetCode':_0x2dc4aa}:{..._0x49eabd,'datasetCodes':_0x11dcdd[_0x138c1b(0x157)]};}),_0x367ea5=JSON[_0x56b83d(0x15a)]({'defaultProfile':_0x556d26['defaultProfile'],'profiles':_0x556d26[_0x56b83d(0x14f)],'models':_0xa131e9},null,0x2)[_0x56b83d(0x163)]('\x0a')[_0x56b83d(0x16b)](_0x7f2452=>'\x20\x20'+_0x7f2452)[_0x56b83d(0x143)]('\x0a');return _0x56b83d(0x161)+MODEL_REGISTRY_VERSION_MARKER+_0x56b83d(0x170)+REGISTRY_START+'\x0a'+_0x367ea5+'\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a'+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x200f6f,_0x3aba2b,_0x5f4e01){const _0x5a2cb2=a6_0x29c784,_0x2b9408=_0x5f4e01[_0x5a2cb2(0x16b)](_0x44d130=>({..._0x44d130,'alias':_0x44d130['alias']||_0x44d130['tableName']})),_0x4311c6=new Map(),_0x2a785d=new Map();for(const _0x22356d of _0x2b9408){const _0x5efd42=_0x4311c6[_0x5a2cb2(0x148)](_0x22356d['alias']);if(_0x5efd42&&_0x5efd42!==_0x22356d[_0x5a2cb2(0x13c)])throw new Error(_0x5a2cb2(0x159)+_0x22356d[_0x5a2cb2(0x166)]+_0x5a2cb2(0x175)+_0x5efd42+_0x5a2cb2(0x172)+_0x22356d['tableName']+'\x22\x20in\x20profile\x20\x22'+_0x3aba2b+'\x22.');const _0x213e9e=_0x2a785d[_0x5a2cb2(0x148)](_0x22356d[_0x5a2cb2(0x13c)]);if(_0x213e9e&&_0x213e9e!==_0x22356d[_0x5a2cb2(0x166)])throw new Error(_0x5a2cb2(0x16a)+_0x22356d['tableName']+'\x22\x20maps\x20to\x20both\x20aliases\x20\x22'+_0x213e9e+_0x5a2cb2(0x172)+_0x22356d[_0x5a2cb2(0x166)]+_0x5a2cb2(0x178)+_0x3aba2b+'\x22.');_0x4311c6[_0x5a2cb2(0x149)](_0x22356d[_0x5a2cb2(0x166)],_0x22356d['tableName']),_0x2a785d[_0x5a2cb2(0x149)](_0x22356d[_0x5a2cb2(0x13c)],_0x22356d[_0x5a2cb2(0x166)]);const _0x1f83f5=_0x200f6f[_0x5a2cb2(0x152)][_0x5a2cb2(0x16d)](_0x1a2ec8=>_0x1a2ec8['alias']===_0x22356d[_0x5a2cb2(0x166)]);if(_0x1f83f5&&_0x1f83f5[_0x5a2cb2(0x13c)]!==_0x22356d[_0x5a2cb2(0x13c)])throw new Error(_0x5a2cb2(0x159)+_0x22356d[_0x5a2cb2(0x166)]+'\x22\x20maps\x20to\x20table\x20\x22'+_0x1f83f5[_0x5a2cb2(0x13c)]+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x22356d[_0x5a2cb2(0x13c)]+'\x22\x20in\x20profile\x20\x22'+_0x3aba2b+'\x22.');const _0x35f838=_0x200f6f[_0x5a2cb2(0x152)][_0x5a2cb2(0x16d)](_0x341b0e=>_0x341b0e['tableName']===_0x22356d[_0x5a2cb2(0x13c)]);if(_0x35f838&&_0x35f838[_0x5a2cb2(0x166)]!==_0x22356d[_0x5a2cb2(0x166)])throw new Error('Table\x20\x22'+_0x22356d['tableName']+_0x5a2cb2(0x147)+_0x35f838[_0x5a2cb2(0x166)]+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x22356d[_0x5a2cb2(0x166)]+_0x5a2cb2(0x178)+_0x3aba2b+'\x22.');}for(const _0x23b12b of _0x200f6f[_0x5a2cb2(0x152)]){delete _0x23b12b[_0x5a2cb2(0x157)][_0x3aba2b];}for(const _0x19b1c8 of _0x2b9408){let _0x406c2d=_0x200f6f[_0x5a2cb2(0x152)][_0x5a2cb2(0x16d)](_0x477312=>_0x477312[_0x5a2cb2(0x166)]===_0x19b1c8[_0x5a2cb2(0x166)]);!_0x406c2d&&(_0x406c2d={'alias':_0x19b1c8[_0x5a2cb2(0x166)],'tableName':_0x19b1c8[_0x5a2cb2(0x13c)],'name':_0x19b1c8[_0x5a2cb2(0x17d)],'datasetCodes':{}},_0x200f6f[_0x5a2cb2(0x152)][_0x5a2cb2(0x177)](_0x406c2d)),(_0x3aba2b===_0x200f6f[_0x5a2cb2(0x180)]||!_0x406c2d['datasetCodes'][_0x200f6f['defaultProfile']])&&(_0x406c2d[_0x5a2cb2(0x166)]=_0x19b1c8[_0x5a2cb2(0x166)],_0x406c2d[_0x5a2cb2(0x13c)]=_0x19b1c8[_0x5a2cb2(0x13c)],_0x406c2d[_0x5a2cb2(0x17d)]=_0x19b1c8[_0x5a2cb2(0x17d)]),_0x406c2d[_0x5a2cb2(0x157)][_0x3aba2b]=_0x19b1c8[_0x5a2cb2(0x14b)];}_0x200f6f['models']=_0x200f6f['models'][_0x5a2cb2(0x164)](_0x5d59fa=>Object[_0x5a2cb2(0x171)](_0x5d59fa[_0x5a2cb2(0x157)])[_0x5a2cb2(0x181)]>0x0);}function removeUnboundProfiles(_0x386a9b){const _0x29dd28=a6_0x29c784,_0x24ee44=Object[_0x29dd28(0x153)](_0x386a9b[_0x29dd28(0x14f)])['filter'](([,_0x1bbe66])=>_0x1bbe66[_0x29dd28(0x154)]===_0x29dd28(0x14c))['map'](([_0x4addba])=>_0x4addba);if(_0x24ee44[_0x29dd28(0x181)]===0x0)return;for(const _0x5b6f3e of _0x24ee44){delete _0x386a9b['profiles'][_0x5b6f3e];for(const _0x2737d2 of _0x386a9b[_0x29dd28(0x152)]){delete _0x2737d2[_0x29dd28(0x157)][_0x5b6f3e];}}_0x386a9b['models']=_0x386a9b[_0x29dd28(0x152)][_0x29dd28(0x164)](_0xbd0074=>Object[_0x29dd28(0x171)](_0xbd0074[_0x29dd28(0x157)])[_0x29dd28(0x181)]>0x0);}export function getProfileModels(_0x291448,_0x47a9f5){const _0x46bfae=a6_0x29c784;return _0x291448[_0x46bfae(0x152)][_0x46bfae(0x165)](_0x26b5e4=>{const _0x893b4=_0x46bfae,_0x2d471f=_0x26b5e4[_0x893b4(0x157)][_0x47a9f5];return _0x2d471f?[{'datasetCode':_0x2d471f,'tableName':_0x26b5e4[_0x893b4(0x13c)],'name':_0x26b5e4[_0x893b4(0x17d)],'alias':_0x26b5e4[_0x893b4(0x166)]}]:[];});}export function updateModelRegistry(_0x2da855){const _0x209f1b=a6_0x29c784,_0x247825=a6_0xd68322[_0x209f1b(0x143)](_0x2da855[_0x209f1b(0x173)],MODEL_REGISTRY_FILE_NAME),_0x1eb0c7=existsSync(_0x247825),_0x6cfde3=readModelRegistry(_0x247825);if(_0x1eb0c7&&!_0x6cfde3)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x209f1b(0x16e));const _0x40e58a=_0x6cfde3??emptyRegistry(_0x2da855[_0x209f1b(0x180)]);if(_0x2da855[_0x209f1b(0x154)]!==_0x209f1b(0x14c))removeUnboundProfiles(_0x40e58a);const _0x90f057=_0x6cfde3?getProfileModels(_0x6cfde3,_0x2da855[_0x209f1b(0x17a)])[_0x209f1b(0x181)]:0x0;if(_0x90f057>0x0&&_0x2da855[_0x209f1b(0x152)][_0x209f1b(0x181)]===0x0&&!_0x2da855[_0x209f1b(0x151)])throw new Error('Refusing\x20to\x20replace\x20'+_0x90f057+_0x209f1b(0x17e)+_0x2da855[_0x209f1b(0x17a)]+_0x209f1b(0x141)+'Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.');_0x40e58a['defaultProfile']=_0x2da855[_0x209f1b(0x180)],_0x40e58a[_0x209f1b(0x14f)][_0x2da855[_0x209f1b(0x17a)]]={'appCode':_0x2da855['appCode'],'runtimeDomain':_0x2da855['runtimeDomain']},mergeProfileModels(_0x40e58a,_0x2da855['profileName'],_0x2da855[_0x209f1b(0x152)]),mkdirSync(_0x2da855['outputDir'],{'recursive':!![]});const _0x3e00b6=_0x247825+'.'+process['pid']+'.'+Date['now']()+_0x209f1b(0x150);try{writeFileSync(_0x3e00b6,registrySource(_0x40e58a),{'encoding':'utf8','mode':0x1a4}),renameSync(_0x3e00b6,_0x247825);}catch(_0x948e3a){try{unlinkSync(_0x3e00b6);}catch{}throw _0x948e3a;}return{'path':_0x247825,'registry':_0x40e58a,'existed':_0x1eb0c7};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a7_0x4af22f=a7_0x2ed3;(function(_0x13c8cf,_0x1ca7af){const _0x3bf2fa=a7_0x2ed3,_0x1c061e=_0x13c8cf();while(!![]){try{const _0x4b389e=-parseInt(_0x3bf2fa(0x14e))/0x1*(-parseInt(_0x3bf2fa(0x146))/0x2)+-parseInt(_0x3bf2fa(0x156))/0x3+parseInt(_0x3bf2fa(0x151))/0x4+-parseInt(_0x3bf2fa(0x149))/0x5*(-parseInt(_0x3bf2fa(0x14f))/0x6)+-parseInt(_0x3bf2fa(0x154))/0x7*(parseInt(_0x3bf2fa(0x155))/0x8)+-parseInt(_0x3bf2fa(0x143))/0x9*(parseInt(_0x3bf2fa(0x13d))/0xa)+parseInt(_0x3bf2fa(0x144))/0xb*(parseInt(_0x3bf2fa(0x142))/0xc);if(_0x4b389e===_0x1ca7af)break;else _0x1c061e['push'](_0x1c061e['shift']());}catch(_0x86bc53){_0x1c061e['push'](_0x1c061e['shift']());}}}(a7_0x4a5d,0xbae5b));import{readFileSync}from'node:fs';import a7_0x4f1b28 from'node:path';function a7_0x4a5d(){const _0x41b0fa=['../../templates/generate-api','905955iMqPny','{ProjectRoutingImport}','dirname','utf8','all','154693bOJXpd','12XgNadg','join','5734008ncFhNR','resolve','cwd','595McyCAc','66016CeymOF','3574368tnKyKS','30nOXNpE','format','profile-client.ts.tpl','startsWith','typescript','372qsvjnA','1268127hcHquN','401159runGWq','replace','2KKvAQy','model-runtime.ts.tpl'];a7_0x4a5d=function(){return _0x41b0fa;};return a7_0x4a5d();}import{fileURLToPath}from'node:url';function a7_0x2ed3(_0x196b51,_0xb5ec76){_0x196b51=_0x196b51-0x13d;const _0x4a5d68=a7_0x4a5d();let _0x2ed382=_0x4a5d68[_0x196b51];return _0x2ed382;}import a7_0xeb0f8c from'prettier';import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function relativeImport(_0x5ccc06,_0xb6509c){const _0x1677a9=a7_0x2ed3;let _0x31ae0d=a7_0x4f1b28['relative'](_0x5ccc06,_0xb6509c)[_0x1677a9(0x145)](/\\/g,'/');if(!_0x31ae0d[_0x1677a9(0x140)]('.'))_0x31ae0d='./'+_0x31ae0d;return _0x31ae0d;}export async function renderModelRegistryScaffold(_0x407da7,_0x4afa27=process[a7_0x4af22f(0x153)]()){const _0x1cd6d9=a7_0x4af22f,_0x4e65fa=fileURLToPath(import.meta.url),_0x38e56d=a7_0x4f1b28['resolve'](a7_0x4f1b28[_0x1cd6d9(0x14b)](_0x4e65fa),_0x1cd6d9(0x148)),_0x3969ca=relativeImport(a7_0x4f1b28['resolve'](_0x407da7),a7_0x4f1b28[_0x1cd6d9(0x152)](_0x4afa27,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x2d1bf6=readFileSync(a7_0x4f1b28['join'](_0x38e56d,'profile-api.ts.tpl'),_0x1cd6d9(0x14c))['replace'](_0x1cd6d9(0x14a),_0x3969ca),[_0x41824a,_0x5b0bd8,_0x50871e]=await Promise[_0x1cd6d9(0x14d)]([a7_0xeb0f8c[_0x1cd6d9(0x13e)](_0x2d1bf6,{'parser':_0x1cd6d9(0x141)}),a7_0xeb0f8c[_0x1cd6d9(0x13e)](readFileSync(a7_0x4f1b28[_0x1cd6d9(0x150)](_0x38e56d,_0x1cd6d9(0x13f)),'utf8'),{'parser':_0x1cd6d9(0x141)}),a7_0xeb0f8c[_0x1cd6d9(0x13e)](readFileSync(a7_0x4f1b28[_0x1cd6d9(0x150)](_0x38e56d,_0x1cd6d9(0x147)),_0x1cd6d9(0x14c)),{'parser':_0x1cd6d9(0x141)})]);return{'api':_0x41824a,'client':_0x5b0bd8,'modelRuntime':_0x50871e};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x27811a,_0xb90926){const _0x5e2def=a8_0x4628,_0x5b0f0b=_0x27811a();while(!![]){try{const _0x4f6447=-parseInt(_0x5e2def(0xb1))/0x1*(parseInt(_0x5e2def(0xa8))/0x2)+parseInt(_0x5e2def(0x99))/0x3*(parseInt(_0x5e2def(0xa9))/0x4)+parseInt(_0x5e2def(0xb2))/0x5*(parseInt(_0x5e2def(0x9e))/0x6)+-parseInt(_0x5e2def(0xa3))/0x7+parseInt(_0x5e2def(0xa5))/0x8*(-parseInt(_0x5e2def(0xa4))/0x9)+parseInt(_0x5e2def(0xaa))/0xa*(parseInt(_0x5e2def(0xac))/0xb)+-parseInt(_0x5e2def(0xa2))/0xc*(-parseInt(_0x5e2def(0xb3))/0xd);if(_0x4f6447===_0xb90926)break;else _0x5b0f0b['push'](_0x5b0f0b['shift']());}catch(_0x1b107f){_0x5b0f0b['push'](_0x5b0f0b['shift']());}}}(a8_0x5319,0x93c58));function a8_0x5319(){const _0x2483cb=['api.ts','length','apiDir','`\x20first.','147486DOKAUP','-api.ts','defaultApp','profiles','3776484REzqQm','1195950rWlgmQ','9164961TGveOQ','8yxDkxY','resolve','map','2rYgpyk','4TjfqBM','10RRFiFr','appCode','11533346lkTZZr','cwd','\x20api\x20pull\x20--app\x20','\x22\x20is\x20missing\x20from\x20','defaultProfile','402899VPbSfb','35Aqkixa','13UfcSee','apps','\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20','validation','entries','find','1986270NZKUoG'];a8_0x5319=function(){return _0x2483cb;};return a8_0x5319();}import{existsSync}from'node:fs';import a8_0xed807f from'node:path';import{readRawConfig}from'../context/config-loader.js';function a8_0x4628(_0xf72f71,_0x187fd2){_0xf72f71=_0xf72f71-0x97;const _0x5319c4=a8_0x5319();let _0x4628ea=_0x5319c4[_0xf72f71];return _0x4628ea;}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(_0x3a7c59,_0x591784,_0x385c47){const _0x35b1d8=a8_0x4628,_0x29ac81=a8_0xed807f[_0x35b1d8(0xa6)](process[_0x35b1d8(0xad)](),_0x3a7c59),_0x2fee3a=a8_0xed807f[_0x35b1d8(0xa6)](_0x29ac81,_0x35b1d8(0x9a)),_0x3a02fc=a8_0xed807f['resolve'](_0x29ac81,MODEL_REGISTRY_FILE_NAME),_0x41979c=readModelRegistry(_0x3a02fc);if(_0x41979c){const _0xd12fd9=_0x591784?Object[_0x35b1d8(0x97)](_0x41979c['profiles'])['filter'](([,_0x3bfc90])=>_0x3bfc90[_0x35b1d8(0xab)]===_0x591784):[];if(_0x385c47){if(_0x41979c[_0x35b1d8(0xa1)][_0x385c47])return{'filePath':_0x3a02fc,'profileName':_0x385c47};if(_0xd12fd9['length']>0x0)throw CliErrors[_0x35b1d8(0xb6)]('Model\x20profile\x20\x22'+_0x385c47+_0x35b1d8(0xaf)+MODEL_REGISTRY_FILE_NAME+'.','Run\x20`'+CLI_BIN_NAME+_0x35b1d8(0xae)+_0x385c47+_0x35b1d8(0x9d));}else{if(_0xd12fd9[_0x35b1d8(0x9b)]===0x1)return{'filePath':_0x3a02fc,'profileName':_0xd12fd9[0x0][0x0]};if(_0xd12fd9[_0x35b1d8(0x9b)]>0x1)throw new Error('AppCode\x20\x22'+_0x591784+_0x35b1d8(0xb5)+_0xd12fd9[_0x35b1d8(0xa7)](([_0x5c4bb1])=>_0x5c4bb1)['join'](',\x20')+'.\x20'+'Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.');if(_0x41979c[_0x35b1d8(0xa1)][_0x41979c[_0x35b1d8(0xb0)]]&&!_0x591784)return{'filePath':_0x3a02fc,'profileName':_0x41979c[_0x35b1d8(0xb0)]};}}if(!_0x591784&&!_0x385c47)return{'filePath':_0x2fee3a};const _0x5e33d9=readRawConfig(),_0x2b9e63=_0x5e33d9[_0x35b1d8(0xb4)]&&typeof _0x5e33d9[_0x35b1d8(0xb4)]==='object'?_0x5e33d9[_0x35b1d8(0xb4)]:{},_0x40ba5d=_0x385c47&&_0x2b9e63[_0x385c47]?[_0x385c47,_0x2b9e63[_0x385c47]]:Object['entries'](_0x2b9e63)[_0x35b1d8(0x98)](([,_0x4f95fe])=>_0x4f95fe?.['appcode']===_0x591784);if(!_0x40ba5d)return{'filePath':_0x2fee3a};const [_0xef4c3d,_0x31e99e]=_0x40ba5d,_0x41d89c=typeof _0x5e33d9['defaultApp']==='string'?_0x5e33d9[_0x35b1d8(0xa0)]:undefined;if(_0x31e99e?.[_0x35b1d8(0x9c)])return{'filePath':_0x2fee3a};if(_0x41d89c&&_0xef4c3d!==_0x41d89c){const _0x3f24f2=a8_0xed807f[_0x35b1d8(0xa6)](_0x29ac81,_0xef4c3d+_0x35b1d8(0x9f));if(existsSync(_0x3f24f2))return{'filePath':_0x3f24f2};}return{'filePath':_0x2fee3a};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2d303c,_0x1ca796){const _0x1ca7cc=a9_0x2d03,_0xbfba6d=_0x2d303c();while(!![]){try{const _0x595e7d=-parseInt(_0x1ca7cc(0x7b))/0x1*(parseInt(_0x1ca7cc(0x83))/0x2)+-parseInt(_0x1ca7cc(0x71))/0x3+-parseInt(_0x1ca7cc(0x73))/0x4+parseInt(_0x1ca7cc(0x80))/0x5*(-parseInt(_0x1ca7cc(0x7c))/0x6)+parseInt(_0x1ca7cc(0x7d))/0x7+-parseInt(_0x1ca7cc(0x79))/0x8*(-parseInt(_0x1ca7cc(0x70))/0x9)+parseInt(_0x1ca7cc(0x7f))/0xa*(parseInt(_0x1ca7cc(0x81))/0xb);if(_0x595e7d===_0x1ca796)break;else _0xbfba6d['push'](_0xbfba6d['shift']());}catch(_0x3b5742){_0xbfba6d['push'](_0xbfba6d['shift']());}}}(a9_0x4b2b,0x695b0));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';function a9_0x2d03(_0x236965,_0x551910){_0x236965=_0x236965-0x6d;const _0x4b2be6=a9_0x4b2b();let _0x2d03b2=_0x4b2be6[_0x236965];return _0x2d03b2;}import{confirm}from'@inquirer/prompts';function a9_0x4b2b(){const _0x28a4a5=['start','No\x20valid\x20session.\x20Login\x20now?','validation','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','18EwJRQi','1206321InwWKd','*\x20Login\x20successful!','3339864cDJsGO','nonInteractive','!\x20Login\x20failed.','log','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','stop','903472cBxhYK','autoYes','1xgNIBt','376254OJhmwe','5063002IUhgxu','Run\x20`','362410nsXAzD','40wsEYYH','473LtEllh','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','674472cXSxZr'];a9_0x4b2b=function(){return _0x28a4a5;};return a9_0x4b2b();}import a9_0x132539 from'ora';export async function runAuthServer(_0xbe5045){const _0x323246=a9_0x2d03,_0x5ae0d0=await getIsSessionValid();if(_0x5ae0d0){console[_0x323246(0x76)](_0x323246(0x77));return;}if(_0xbe5045?.[_0x323246(0x74)]&&!_0xbe5045['autoYes'])throw CliErrors[_0x323246(0x6d)]('Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.',_0x323246(0x7e)+CLI_BIN_NAME+_0x323246(0x6f));const _0x27ca31=_0xbe5045?.[_0x323246(0x7a)]?!![]:await confirm({'message':_0x323246(0x85),'default':!![]});if(!_0x27ca31)return;if(_0xbe5045?.['nonInteractive']){console[_0x323246(0x76)](_0x323246(0x6e));const _0x5ede36=await authServer({'silent':![],'openBrowser':![]});_0x5ede36?console[_0x323246(0x76)](_0x323246(0x72)):console[_0x323246(0x76)]('!\x20Login\x20failed.');return;}const _0x5ed4ff=a9_0x132539(_0x323246(0x82))[_0x323246(0x84)](),_0x5660ab=await authServer({'silent':!![],'openBrowser':!![]});_0x5ed4ff[_0x323246(0x78)](),_0x5660ab?console['log'](_0x323246(0x72)):console[_0x323246(0x76)](_0x323246(0x75));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x489499=a10_0x446d;(function(_0x3dc208,_0x535963){const _0x4609c6=a10_0x446d,_0xf76952=_0x3dc208();while(!![]){try{const _0xfa537=parseInt(_0x4609c6(0x81))/0x1+-parseInt(_0x4609c6(0x7d))/0x2+parseInt(_0x4609c6(0x66))/0x3+-parseInt(_0x4609c6(0x69))/0x4+parseInt(_0x4609c6(0x7b))/0x5+parseInt(_0x4609c6(0x7c))/0x6+-parseInt(_0x4609c6(0x89))/0x7;if(_0xfa537===_0x535963)break;else _0xf76952['push'](_0xf76952['shift']());}catch(_0x3a9048){_0xf76952['push'](_0xf76952['shift']());}}}(a10_0x3839,0x8bc3e));import{writeFileSync}from'node:fs';import a10_0x44fb3b from'node:http';import a10_0x51c32a 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';function a10_0x3839(){const _0x3fa8ee=['6284076fdpjXu','272144LlpstV','127.0.0.1','cookie','close','395498WzvVgC','📍\x20Login\x20URL:','origin','/sign-in?redirect=','error','user','listen','xdg-open\x20\x22','7746669DzXzql','then','🔐\x20Starting\x20login\x20service...','!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','platform','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','object','Auth\x20server\x20error:','port','openBrowser','239247MMRPod','utf-8','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','1048320ghLzQL','end','json','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','open\x20\x22','local','silent','log','isAuth','catch','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','lovrabet','cmd\x20/c\x20start\x20\x22\x22\x20\x22','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','createServer','win32','/api/auth/get-session','writeHead','2773520RWXbOs'];a10_0x3839=function(){return _0x3fa8ee;};return a10_0x3839();}import{getIsSessionValid}from'../auth/is-session-valid.js';import{cookieFile}from'../auth/constant.js';import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export function resolveAuthCallbackRouting(_0xf223c3){const _0x41e8d6=a10_0x446d;if(!_0xf223c3)return getProjectDomainRoutingManifest()[_0x41e8d6(0x6e)];const _0x15ee7a=getOfficialRoutingProfile(_0xf223c3),_0x254caf=getOfficialRoutingCdn(_0xf223c3);return{'origin':_0x15ee7a[_0x41e8d6(0x6e)]['origin'],'certificateUrl':_0x254caf[_0x41e8d6(0x74)]+'/cert/lovrabet-dev.json'};}function withPort(_0x3f836a,_0x2b63ad){const _0x38c553=a10_0x446d,_0x13953a=new URL(_0x3f836a);return _0x13953a[_0x38c553(0x91)]=String(_0x2b63ad),_0x13953a['origin'];}export async function authServer(_0x4e48a7){const _0x43748d=a10_0x446d,_0x4fe9ba=_0x4e48a7?.[_0x43748d(0x6f)]||![],_0x1cddbd=_0x4e48a7?.[_0x43748d(0x92)]??!![],_0x48c514=_0x4e48a7?.['timeoutMs']??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x11a4b9=resolveAuthCallbackRouting(),_0x442709=_0x11a4b9['certificateUrl']?await(await fetch(_0x11a4b9['certificateUrl']))[_0x43748d(0x6b)]():undefined;return new Promise(async(_0x429ca8,_0x29b483)=>{const _0x5ef3b1=_0x43748d;let _0x442fc7=0x0,_0x495272=![],_0x23e97f;const _0x294e2d=async(_0x1b2971,_0x2f4e17)=>{const _0x3e0d66=a10_0x446d,_0x198919=getUserDomain(),_0xd3f716=_0x1b2971['headers'][_0x3e0d66(0x7f)]||'',_0x42baed=await fetch(_0x198919+_0x3e0d66(0x79),{'headers':{'cookie':_0xd3f716}})[_0x3e0d66(0x8a)](_0x497c00=>_0x497c00[_0x3e0d66(0x6b)]()),_0x32bfad=_0x42baed&&_0x42baed['session']&&_0x42baed[_0x3e0d66(0x86)];if(_0x32bfad){writeFileSync(cookieFile,_0xd3f716,_0x3e0d66(0x67));const _0x4345d6=buildLoginSuccessHtml();_0x2f4e17[_0x3e0d66(0x7a)](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x2f4e17[_0x3e0d66(0x6a)](_0x4345d6),_0x3bdf37(!![]);}else{const _0x4d8a1a=encodeURIComponent(withPort(_0x11a4b9[_0x3e0d66(0x83)],_0x442fc7));_0x2f4e17[_0x3e0d66(0x7a)](0x12e,{'location':_0x198919+_0x3e0d66(0x84)+_0x4d8a1a}),_0x2f4e17[_0x3e0d66(0x6a)]();return;}},_0x2cb7e1=_0x442709?a10_0x51c32a[_0x5ef3b1(0x77)](_0x442709,_0x294e2d):a10_0x44fb3b[_0x5ef3b1(0x77)](_0x294e2d);function _0x3bdf37(_0x51fa7d){const _0x53936e=_0x5ef3b1;if(_0x495272)return;_0x495272=!![],_0x23e97f&&clearTimeout(_0x23e97f),_0x2cb7e1[_0x53936e(0x80)](),_0x429ca8(_0x51fa7d);}_0x2cb7e1[_0x5ef3b1(0x87)](0x0,_0x5ef3b1(0x7e),()=>{const _0x5a113b=_0x5ef3b1,_0x338354=_0x2cb7e1['address']();_0x442fc7=typeof _0x338354===_0x5a113b(0x8f)&&_0x338354?_0x338354[_0x5a113b(0x91)]:Number(_0x338354);const _0x41a19d=withPort(_0x11a4b9[_0x5a113b(0x83)],_0x442fc7);_0x23e97f=setTimeout(()=>{const _0x24736c=_0x5a113b;!_0x4fe9ba&&console[_0x24736c(0x70)](_0x24736c(0x8c)),_0x3bdf37(![]);},_0x48c514);!_0x4fe9ba&&(console['log'](_0x5a113b(0x8b)),console[_0x5a113b(0x70)](_0x5a113b(0x82),_0x41a19d),_0x1cddbd?(console['log'](_0x5a113b(0x76)),console[_0x5a113b(0x70)](''),console[_0x5a113b(0x70)](_0x5a113b(0x68))):console[_0x5a113b(0x70)]('💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.'),console[_0x5a113b(0x70)](''));if(!_0x1cddbd)return;openInBrowser(_0x41a19d)[_0x5a113b(0x8a)](_0x2e4bd7=>{const _0x180391=_0x5a113b;!_0x4fe9ba&&(_0x2e4bd7?console[_0x180391(0x70)](_0x180391(0x6c)):(console['log']('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x180391(0x70)](_0x180391(0x8e),_0x41a19d)),console[_0x180391(0x70)](''));})[_0x5a113b(0x72)](()=>{const _0xcaf809=_0x5a113b;!_0x4fe9ba&&(console[_0xcaf809(0x70)](_0xcaf809(0x73)),console[_0xcaf809(0x70)](_0xcaf809(0x8e),_0x41a19d),console[_0xcaf809(0x70)](''));});}),_0x2cb7e1['on'](_0x5ef3b1(0x85),_0xfcb632=>{const _0x51e7b0=_0x5ef3b1;if(_0x495272)return;_0x495272=!![],_0x23e97f&&clearTimeout(_0x23e97f),!_0x4fe9ba&&console[_0x51e7b0(0x85)](_0x51e7b0(0x90),_0xfcb632),_0x2cb7e1[_0x51e7b0(0x80)](),_0x29b483(_0xfcb632);});});}function a10_0x446d(_0x3cc491,_0x40aff4){_0x3cc491=_0x3cc491-0x66;const _0x38396e=a10_0x3839();let _0x446daf=_0x38396e[_0x3cc491];return _0x446daf;}function openInBrowser(_0x25e40f){return new Promise(_0x15f447=>{const _0x475420=a10_0x446d,_0x403098=process[_0x475420(0x8d)];let _0x1282ea;if(_0x403098===_0x475420(0x78))_0x1282ea=_0x475420(0x75)+_0x25e40f+'\x22';else _0x403098==='darwin'?_0x1282ea=_0x475420(0x6d)+_0x25e40f+'\x22':_0x1282ea=_0x475420(0x88)+_0x25e40f+'\x22';exec(_0x1282ea,_0x5c324d=>{_0x5c324d?_0x15f447(![]):_0x15f447(!![]);});});}if(import.meta.main){const isAuth=await authServer();console['log'](a10_0x489499(0x71),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a11_0x3dbe(){const _0x41e4b8=['282ioXpXE','82805nVjADY','602408lPjbda','2403153ZhGLHc','1225736JHdQLo','cookie','2638528ZJSNlW','2fsmNoZ','1495186qWecFg','50sUAyUW','1685055GqRYsa','.lovrabet'];a11_0x3dbe=function(){return _0x41e4b8;};return a11_0x3dbe();}const a11_0x136607=a11_0x2848;function a11_0x2848(_0x1d66e5,_0x3f229f){_0x1d66e5=_0x1d66e5-0x1c4;const _0x3dbe22=a11_0x3dbe();let _0x28488b=_0x3dbe22[_0x1d66e5];return _0x28488b;}(function(_0x2ec125,_0x3d4ef5){const _0x305962=a11_0x2848,_0x2993e1=_0x2ec125();while(!![]){try{const _0x5a5748=parseInt(_0x305962(0x1c5))/0x1+-parseInt(_0x305962(0x1ca))/0x2*(parseInt(_0x305962(0x1cd))/0x3)+-parseInt(_0x305962(0x1c7))/0x4+parseInt(_0x305962(0x1c4))/0x5*(-parseInt(_0x305962(0x1cf))/0x6)+-parseInt(_0x305962(0x1cb))/0x7+parseInt(_0x305962(0x1c9))/0x8+-parseInt(_0x305962(0x1c6))/0x9*(-parseInt(_0x305962(0x1cc))/0xa);if(_0x5a5748===_0x3d4ef5)break;else _0x2993e1['push'](_0x2993e1['shift']());}catch(_0x102e48){_0x2993e1['push'](_0x2993e1['shift']());}}}(a11_0x3dbe,0x636b9));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a11_0x136607(0x1ce));export const cookieFile=join(configDir,a11_0x136607(0x1c8));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a12_0x21f0(){var _0x561712=['4525119DlJjyW','33gcsNli','37965glxBba','1092594kkqyzc','454171gBjLOa','7sJgorc','5474139fnzfCM','8CCoGlP','40664ufZWWd','116nzFNLn','4405690XnYiWh','utf-8'];a12_0x21f0=function(){return _0x561712;};return a12_0x21f0();}(function(_0x376a1b,_0x17f4ad){var _0x58addd=a12_0xd2cf,_0x229777=_0x376a1b();while(!![]){try{var _0x43b234=parseInt(_0x58addd(0x1d8))/0x1+-parseInt(_0x58addd(0x1dc))/0x2*(-parseInt(_0x58addd(0x1d5))/0x3)+-parseInt(_0x58addd(0x1dd))/0x4*(-parseInt(_0x58addd(0x1d6))/0x5)+-parseInt(_0x58addd(0x1d7))/0x6*(parseInt(_0x58addd(0x1d9))/0x7)+-parseInt(_0x58addd(0x1db))/0x8*(parseInt(_0x58addd(0x1e0))/0x9)+-parseInt(_0x58addd(0x1de))/0xa+parseInt(_0x58addd(0x1da))/0xb;if(_0x43b234===_0x17f4ad)break;else _0x229777['push'](_0x229777['shift']());}catch(_0x327a48){_0x229777['push'](_0x229777['shift']());}}}(a12_0x21f0,0x41f82));function a12_0xd2cf(_0xeba6f,_0x31b7a0){_0xeba6f=_0xeba6f-0x1d5;var _0x21f08f=a12_0x21f0();var _0xd2cfaf=_0x21f08f[_0xeba6f];return _0xd2cfaf;}import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0x49458e=a12_0xd2cf;try{return readFileSync(cookieFile,_0x49458e(0x1df));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4199cb,_0x4e95e3){const _0x98e596=a13_0xd563,_0x7616e6=_0x4199cb();while(!![]){try{const _0x1f2fb8=-parseInt(_0x98e596(0x17f))/0x1*(parseInt(_0x98e596(0x17c))/0x2)+parseInt(_0x98e596(0x17e))/0x3+-parseInt(_0x98e596(0x186))/0x4*(-parseInt(_0x98e596(0x181))/0x5)+-parseInt(_0x98e596(0x182))/0x6*(-parseInt(_0x98e596(0x183))/0x7)+parseInt(_0x98e596(0x188))/0x8+-parseInt(_0x98e596(0x187))/0x9+parseInt(_0x98e596(0x185))/0xa;if(_0x1f2fb8===_0x4e95e3)break;else _0x7616e6['push'](_0x7616e6['shift']());}catch(_0x1ff4e3){_0x7616e6['push'](_0x7616e6['shift']());}}}(a13_0x4e7d,0x50777));function a13_0xd563(_0x521b11,_0x2d7122){_0x521b11=_0x521b11-0x17c;const _0x4e7d2a=a13_0x4e7d();let _0xd563b1=_0x4e7d2a[_0x521b11];return _0xd563b1;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a13_0x4e7d(){const _0x23076f=['2tiDQIr','json','548736INaggA','366074GmrsMe','utf-8','25agfZBO','6ybULqT','2161537BndsYE','/api/auth/get-session','1352830wzVwTA','339188YzNJJb','5408442aHYBtV','1965056utUMJW','session'];a13_0x4e7d=function(){return _0x23076f;};return a13_0x4e7d();}import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0xa27ac7=a13_0xd563;try{if(!existsSync(cookieFile))return null;const _0x1b096f=readFileSync(cookieFile,_0xa27ac7(0x180)),_0x36df2f=await fetch(getUserDomain()+_0xa27ac7(0x184),{'headers':{'cookie':_0x1b096f}});if(!_0x36df2f['ok'])return null;const _0x2c230d=await _0x36df2f[_0xa27ac7(0x17d)]();if(!_0x2c230d[_0xa27ac7(0x189)]||!_0x2c230d['user'])return null;return _0x2c230d;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5b7ff7,_0x325844){const _0x14184c=a14_0x6300,_0x5a52d8=_0x5b7ff7();while(!![]){try{const _0x33e6c3=parseInt(_0x14184c(0x6b))/0x1*(-parseInt(_0x14184c(0x75))/0x2)+-parseInt(_0x14184c(0x70))/0x3*(-parseInt(_0x14184c(0x78))/0x4)+parseInt(_0x14184c(0x6e))/0x5*(-parseInt(_0x14184c(0x6a))/0x6)+parseInt(_0x14184c(0x76))/0x7+parseInt(_0x14184c(0x6d))/0x8+parseInt(_0x14184c(0x77))/0x9*(parseInt(_0x14184c(0x72))/0xa)+parseInt(_0x14184c(0x6f))/0xb;if(_0x33e6c3===_0x325844)break;else _0x5a52d8['push'](_0x5a52d8['shift']());}catch(_0xfe67f8){_0x5a52d8['push'](_0x5a52d8['shift']());}}}(a14_0x20fb,0x361ab));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x287003=a14_0x6300;try{if(!existsSync(cookieFile))return![];const _0x4947c6=readFileSync(cookieFile,_0x287003(0x79)),_0x27711d=await fetch(getUserDomain()+_0x287003(0x73),{'headers':{'cookie':_0x4947c6}})[_0x287003(0x71)](_0x240023=>_0x240023['json']());return _0x27711d&&_0x27711d[_0x287003(0x74)]&&_0x27711d[_0x287003(0x6c)];}catch{}return![];}function a14_0x6300(_0x5bab13,_0x2d0056){_0x5bab13=_0x5bab13-0x6a;const _0x20fbf6=a14_0x20fb();let _0x630010=_0x20fbf6[_0x5bab13];return _0x630010;}function a14_0x20fb(){const _0x2016ae=['330477LPdlFT','1032957AyLmil','11884zVANuN','utf-8','30FdYEBR','1IweXZR','user','2221944SkdkpY','400635CuaYQs','4141676RCeojy','12JdYXTf','then','30fFksuo','/api/auth/get-session','session','870854EtRFWH'];a14_0x20fb=function(){return _0x2016ae;};return a14_0x20fb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x32944a,_0x2e28af){const _0x4ba808=a15_0x4f4f,_0x2ce8ad=_0x32944a();while(!![]){try{const _0x1a43d3=-parseInt(_0x4ba808(0x171))/0x1+-parseInt(_0x4ba808(0x16d))/0x2*(parseInt(_0x4ba808(0x172))/0x3)+parseInt(_0x4ba808(0x16f))/0x4+parseInt(_0x4ba808(0x176))/0x5+parseInt(_0x4ba808(0x170))/0x6+parseInt(_0x4ba808(0x175))/0x7*(parseInt(_0x4ba808(0x16e))/0x8)+parseInt(_0x4ba808(0x173))/0x9*(-parseInt(_0x4ba808(0x16c))/0xa);if(_0x1a43d3===_0x2e28af)break;else _0x2ce8ad['push'](_0x2ce8ad['shift']());}catch(_0x822b87){_0x2ce8ad['push'](_0x2ce8ad['shift']());}}}(a15_0x5cdb,0x7ac77));function a15_0x4f4f(_0xc29a58,_0x3e4f51){_0xc29a58=_0xc29a58-0x16c;const _0x5cdb6c=a15_0x5cdb();let _0x4f4f1f=_0x5cdb6c[_0xc29a58];return _0x4f4f1f;}function a15_0x5cdb(){const _0x50c027=['9dfkmpx','</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>','7fRAKXq','919205pcjpJt','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','<!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>','4859310RVGogk','204DrIKSP','6684784uNfkcr','3990452DaQzft','2449380mIQRFg','859332uksgku','16974enjCMu'];a15_0x5cdb=function(){return _0x50c027;};return a15_0x5cdb();}export function buildLoginSuccessHtml(){const _0x383b33=a15_0x4f4f,_0x486386=_0x383b33(0x177);return _0x383b33(0x178)+_0x486386+_0x383b33(0x174);}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5242bc,_0x38d4c4){var _0x14e902=a16_0x1603,_0x27deb9=_0x5242bc();while(!![]){try{var _0x4604fb=parseInt(_0x14e902(0x1a6))/0x1*(-parseInt(_0x14e902(0x19e))/0x2)+parseInt(_0x14e902(0x1a3))/0x3+parseInt(_0x14e902(0x1a7))/0x4+parseInt(_0x14e902(0x1a8))/0x5+-parseInt(_0x14e902(0x1a5))/0x6*(parseInt(_0x14e902(0x19f))/0x7)+parseInt(_0x14e902(0x19d))/0x8*(-parseInt(_0x14e902(0x1a2))/0x9)+parseInt(_0x14e902(0x1a0))/0xa;if(_0x4604fb===_0x38d4c4)break;else _0x27deb9['push'](_0x27deb9['shift']());}catch(_0x1466f9){_0x27deb9['push'](_0x27deb9['shift']());}}}(a16_0x5c4d,0xc2256));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function logout(){var _0x151d7a=a16_0x1603;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x151d7a(0x1a4)]('✓\x20Logged\x20out')):console[_0x151d7a(0x1a4)](_0x151d7a(0x1a1));}function a16_0x1603(_0x1c35d5,_0x2d511f){_0x1c35d5=_0x1c35d5-0x19d;var _0x5c4d1f=a16_0x5c4d();var _0x160398=_0x5c4d1f[_0x1c35d5];return _0x160398;}function a16_0x5c4d(){var _0x38dcf0=['247821RKgIeV','4848130ERTqIw','!\x20Not\x20logged\x20in','2434455grcspV','4425090EuigFD','log','6ULdYQw','76865cVUMgN','387552nIzSHD','617170CxUFbM','24JbnQui','14tWnXiG'];a16_0x5c4d=function(){return _0x38dcf0;};return a16_0x5c4d();}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a17_0x4e46c1=a17_0x4aaa;(function(_0x595cd1,_0x469157){const _0x9a5316=a17_0x4aaa,_0x144de1=_0x595cd1();while(!![]){try{const _0x1b84f9=parseInt(_0x9a5316(0x9f))/0x1+parseInt(_0x9a5316(0xa1))/0x2+-parseInt(_0x9a5316(0xa0))/0x3*(parseInt(_0x9a5316(0xa3))/0x4)+-parseInt(_0x9a5316(0xa8))/0x5*(parseInt(_0x9a5316(0xaa))/0x6)+-parseInt(_0x9a5316(0xa4))/0x7+-parseInt(_0x9a5316(0xa7))/0x8*(-parseInt(_0x9a5316(0xa6))/0x9)+parseInt(_0x9a5316(0xa9))/0xa*(parseInt(_0x9a5316(0xa5))/0xb);if(_0x1b84f9===_0x469157)break;else _0x144de1['push'](_0x144de1['shift']());}catch(_0x4731b6){_0x144de1['push'](_0x144de1['shift']());}}}(a17_0x17f2,0x4568a));function a17_0x17f2(){const _0x4e1f13=['707510jIetRP','boolean','3396KiJznj','1588160YYqgxd','986865JYGIwp','270ICxiYY','73552ioCpJO','124150Ifmjph','20xvAGZO','42tDsAWO','277560MiGFMu','1419VbHttT'];a17_0x17f2=function(){return _0x4e1f13;};return a17_0x17f2();}function a17_0x4aaa(_0x9d4981,_0x1513ea){_0x9d4981=_0x9d4981-0x9f;const _0x17f2e6=a17_0x17f2();let _0x4aaa73=_0x17f2e6[_0x9d4981];return _0x4aaa73;}export const dynamicCliFlags={'enableBffSave':{'type':a17_0x4e46c1(0xa2)}};
|