@lovrabet/rabetbase-cli 2.5.10 → 2.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a0_0x5276(_0x52449c,_0x923438){_0x52449c=_0x52449c-0x133;const _0x1895b4=a0_0x1895();let _0x527604=_0x1895b4[_0x52449c];return _0x527604;}function a0_0x1895(){const _0x5ecf0c=['761100AihXFz','3446600CUbYax','datasetCode','9KSuxMZ','tableName','log','1285HEPaCI','Failed\x20to\x20generate\x20docs:\x20','654739mSfEfZ','.md\x20-\x20','911097gOltsj','1037596MIOnUl','message','success','api-doc','13638lBNxWg','length','✗\x20Failed:\x20','76972fPpKbJ','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','.md',']\x20Generating:\x20','name'];a0_0x1895=function(){return _0x5ecf0c;};return a0_0x1895();}(function(_0x1a7d75,_0x1cd5b0){const _0x5a3104=a0_0x5276,_0x919557=_0x1a7d75();while(!![]){try{const _0x3eaf8b=parseInt(_0x5a3104(0x145))/0x1+-parseInt(_0x5a3104(0x13d))/0x2+parseInt(_0x5a3104(0x147))/0x3+-parseInt(_0x5a3104(0x148))/0x4+parseInt(_0x5a3104(0x143))/0x5*(parseInt(_0x5a3104(0x135))/0x6)+-parseInt(_0x5a3104(0x138))/0x7+parseInt(_0x5a3104(0x13e))/0x8*(-parseInt(_0x5a3104(0x140))/0x9);if(_0x3eaf8b===_0x1cd5b0)break;else _0x919557['push'](_0x919557['shift']());}catch(_0x183bbd){_0x919557['push'](_0x919557['shift']());}}}(a0_0x1895,0x7081d));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x3d26cc 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(_0x3e5760){return new Promise(_0x540038=>setTimeout(_0x540038,_0x3e5760));}export async function generateDatasetDocs(_0x59b9cf,_0x2d6ede,_0x17332b,_0x4675c1='./docs',_0x4faf17,_0x562046){const _0x1639a2=a0_0x5276;mkdirSync(_0x4675c1,{'recursive':!![]});const _0x3c400=[],_0x1fb0e9=_0x59b9cf[_0x1639a2(0x136)];console['log']('\x0a'+_0x1fb0e9+_0x1639a2(0x139));for(let _0x39acc2=0x0;_0x39acc2<_0x59b9cf[_0x1639a2(0x136)];_0x39acc2++){const _0x3c962e=_0x59b9cf[_0x39acc2],_0xe1dfaf=_0x39acc2+0x1,_0x5281d7=_0x3c962e[_0x1639a2(0x141)];try{console['log']('['+_0xe1dfaf+'/'+_0x1fb0e9+_0x1639a2(0x13b)+_0x5281d7+'.md\x20('+_0x3c962e[_0x1639a2(0x13c)]+')');if(_0x4faf17)_0x4faf17(_0xe1dfaf,_0x1fb0e9,_0x5281d7);const _0x29de96=await fetchDatasetDoc({'appCode':_0x2d6ede,'cookie':_0x17332b,'datasetCode':_0x3c962e[_0x1639a2(0x13f)],'datasetId':_0x3c962e['id'],'enableAI':![],'extraParams':_0x562046}),_0x383796=a0_0x3d26cc['join'](_0x4675c1,_0x5281d7+_0x1639a2(0x13a));writeFileSync(_0x383796,_0x29de96,{'encoding':'utf8'}),console['log']('✓\x20Generated:\x20'+_0x5281d7+_0x1639a2(0x13a)),logger[_0x1639a2(0x133)](_0x1639a2(0x134),'Generated\x20docs\x20successfully:\x20'+_0x5281d7,undefined,{'datasetCode':_0x3c962e[_0x1639a2(0x13f)],'datasetName':_0x3c962e[_0x1639a2(0x13c)],'filePath':_0x383796,'progress':_0xe1dfaf+'/'+_0x1fb0e9}),_0x3c400['push']({'datasetCode':_0x3c962e['datasetCode'],'datasetName':_0x3c962e[_0x1639a2(0x13c)],'filePath':_0x383796,'success':!![]});if(_0xe1dfaf<_0x1fb0e9)await delay(0x1388);}catch(_0x4cbaa5){const _0x48f5b6=_0x4cbaa5 instanceof Error?_0x4cbaa5[_0x1639a2(0x149)]:String(_0x4cbaa5);console[_0x1639a2(0x142)](_0x1639a2(0x137)+_0x5281d7+_0x1639a2(0x146)+_0x48f5b6),logger['error'](_0x1639a2(0x134),_0x1639a2(0x144)+_0x3c962e[_0x1639a2(0x13f)],{'datasetCode':_0x3c962e[_0x1639a2(0x13f)],'datasetName':_0x3c962e[_0x1639a2(0x13c)],'error':_0x48f5b6,'progress':_0xe1dfaf+'/'+_0x1fb0e9}),_0x3c400['push']({'datasetCode':_0x3c962e[_0x1639a2(0x13f)],'datasetName':_0x3c962e[_0x1639a2(0x13c)],'filePath':'','success':![],'error':_0x48f5b6}),_0xe1dfaf<_0x1fb0e9&&(console[_0x1639a2(0x142)]('Waiting\x203\x20seconds...\x0a'),await delay(0xbb8));}}return _0x3c400;}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x30cdd5=a1_0x1512;(function(_0x1edf40,_0x8a6790){const _0xf0ae7=a1_0x1512,_0x49fc3a=_0x1edf40();while(!![]){try{const _0x257c56=parseInt(_0xf0ae7(0x1ce))/0x1+parseInt(_0xf0ae7(0x1ca))/0x2+parseInt(_0xf0ae7(0x1c5))/0x3*(parseInt(_0xf0ae7(0x1c4))/0x4)+-parseInt(_0xf0ae7(0x1c6))/0x5*(parseInt(_0xf0ae7(0x1d8))/0x6)+parseInt(_0xf0ae7(0x1c9))/0x7*(-parseInt(_0xf0ae7(0x1d5))/0x8)+-parseInt(_0xf0ae7(0x1db))/0x9+parseInt(_0xf0ae7(0x1dc))/0xa;if(_0x257c56===_0x8a6790)break;else _0x49fc3a['push'](_0x49fc3a['shift']());}catch(_0x1b0f5c){_0x49fc3a['push'](_0x49fc3a['shift']());}}}(a1_0x4036,0x7436e));import a1_0x308ac0 from'node:path';function a1_0x1512(_0x861e84,_0x3bf36d){_0x861e84=_0x861e84-0x1c1;const _0x403675=a1_0x4036();let _0x15127f=_0x403675[_0x861e84];return _0x15127f;}import{CliErrors}from'../errors.js';export function normalizeApiDir(_0x53b20b,_0xfe3919=process[a1_0x30cdd5(0x1dd)]()){return a1_0x308ac0['resolve'](_0xfe3919,_0x53b20b);}function normalizedApiGroup(_0x3e3033){const _0x4dfdab=a1_0x30cdd5,_0x4bde88=_0x3e3033?.[_0x4dfdab(0x1c1)]();return _0x4bde88||undefined;}export function resolveApiProfileLayouts(_0x4d5db3,_0x35b34a,_0x4a5cb7=process[a1_0x30cdd5(0x1dd)]()){const _0x1659ea=a1_0x30cdd5,_0x4b894e=_0x4d5db3[_0x1659ea(0x1d6)](_0x18fea9=>{const _0x217430=_0x1659ea,_0x2b46c5=_0x35b34a(_0x18fea9);return{'app':_0x18fea9,'outputDir':_0x2b46c5,'normalizedApiDir':normalizeApiDir(_0x2b46c5,_0x4a5cb7),'apiGroup':normalizedApiGroup(_0x18fea9[_0x217430(0x1d3)])};}),_0x279745=new Map();for(const _0x368724 of _0x4b894e){if(!_0x368724[_0x1659ea(0x1d3)])continue;const _0x5b5391=_0x279745['get'](_0x368724[_0x1659ea(0x1d3)])??new Set();_0x5b5391['add'](_0x368724[_0x1659ea(0x1d1)]),_0x279745['set'](_0x368724['apiGroup'],_0x5b5391);}for(const [_0x1a81ed,_0x566a2d]of _0x279745){if(_0x566a2d[_0x1659ea(0x1d2)]>0x1)throw CliErrors[_0x1659ea(0x1cd)]('API\x20group\x20\x22'+_0x1a81ed+_0x1659ea(0x1c2),'Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.');}const _0x556eb1=new Map();for(const _0x19d61c of _0x4b894e){const _0x1cdc53=_0x556eb1['get'](_0x19d61c['normalizedApiDir'])??[];_0x1cdc53[_0x1659ea(0x1c8)](_0x19d61c),_0x556eb1[_0x1659ea(0x1d0)](_0x19d61c[_0x1659ea(0x1d1)],_0x1cdc53);}for(const _0x1f4ce4 of _0x556eb1[_0x1659ea(0x1c7)]()){const _0x50307b=new Set(_0x1f4ce4[_0x1659ea(0x1d7)](_0x534af8=>_0x534af8['apiGroup']?[_0x534af8[_0x1659ea(0x1d3)]]:[]));if(_0x50307b[_0x1659ea(0x1d2)]===0x0)continue;if(_0x50307b[_0x1659ea(0x1d2)]>0x1||_0x1f4ce4['some'](_0x253541=>!_0x253541['apiGroup'])){const _0x4e6d94=_0x1f4ce4[_0x1659ea(0x1d6)](_0x42219d=>_0x42219d[_0x1659ea(0x1c3)]['name'])[_0x1659ea(0x1d9)](',\x20');throw CliErrors[_0x1659ea(0x1cd)](_0x1659ea(0x1cf)+_0x1f4ce4[0x0]['outputDir']+_0x1659ea(0x1cc),_0x1659ea(0x1cb)+_0x4e6d94+_0x1659ea(0x1d4));}}return _0x4b894e;}export function getRegistryGroup(_0x27874b,_0x37b668){const _0x59536c=a1_0x30cdd5;if(_0x37b668[_0x59536c(0x1d3)])return _0x27874b[_0x59536c(0x1da)](_0x19e33b=>_0x19e33b['apiGroup']===_0x37b668['apiGroup']);const _0x9bc08e=_0x27874b[_0x59536c(0x1da)](_0x1d841c=>_0x1d841c[_0x59536c(0x1d1)]===_0x37b668['normalizedApiDir']);return _0x9bc08e['length']===0x1?_0x9bc08e:undefined;}function a1_0x4036(){const _0x516fb0=['cwd','trim','\x22\x20resolves\x20to\x20multiple\x20API\x20directories.','app','1198492ugTGTI','6AtYmUF','2390lcPcaT','values','push','847sBTNIB','381778JyAdxf','Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','validation','210239ukVeNG','API\x20directory\x20\x22','set','normalizedApiDir','size','apiGroup','.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.','56880DJXoHb','map','flatMap','5526LvBepF','join','filter','701127TFiJWX','8540910VeIkZT'];a1_0x4036=function(){return _0x516fb0;};return a1_0x4036();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a2_0x4477(_0x5ed7d1,_0x412a30){_0x5ed7d1=_0x5ed7d1-0x1f2;var _0x490470=a2_0x4904();var _0x447777=_0x490470[_0x5ed7d1];return _0x447777;}(function(_0x384894,_0x409c09){var _0x5855c6=a2_0x4477,_0x44b8e3=_0x384894();while(!![]){try{var _0x2f20f5=-parseInt(_0x5855c6(0x1f3))/0x1*(parseInt(_0x5855c6(0x1f6))/0x2)+parseInt(_0x5855c6(0x1f7))/0x3+-parseInt(_0x5855c6(0x1fb))/0x4+parseInt(_0x5855c6(0x1f4))/0x5*(parseInt(_0x5855c6(0x1f5))/0x6)+-parseInt(_0x5855c6(0x1fc))/0x7+-parseInt(_0x5855c6(0x1fa))/0x8*(-parseInt(_0x5855c6(0x1f2))/0x9)+parseInt(_0x5855c6(0x1f9))/0xa*(parseInt(_0x5855c6(0x1f8))/0xb);if(_0x2f20f5===_0x409c09)break;else _0x44b8e3['push'](_0x44b8e3['shift']());}catch(_0x520bff){_0x44b8e3['push'](_0x44b8e3['shift']());}}}(a2_0x4904,0xa1144));function a2_0x4904(){var _0x467dbf=['53610iIOTvu','222FHOcIZ','672356rJCutY','1907814eUGIox','1210VEIilA','69670JqkFku','8zCkemn','4055008DIjAqV','2707565kzyvcA','5377347xONfFF','1ozJSWZ'];a2_0x4904=function(){return _0x467dbf;};return a2_0x4904();}export{fetchModelList}from'../core/api-client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5ba1b1,_0x41111f){const _0x285155=a3_0x55f8,_0x1ddbef=_0x5ba1b1();while(!![]){try{const _0x516922=parseInt(_0x285155(0x168))/0x1*(-parseInt(_0x285155(0x16b))/0x2)+-parseInt(_0x285155(0x146))/0x3*(-parseInt(_0x285155(0x167))/0x4)+parseInt(_0x285155(0x166))/0x5*(-parseInt(_0x285155(0x15e))/0x6)+parseInt(_0x285155(0x164))/0x7+-parseInt(_0x285155(0x173))/0x8+parseInt(_0x285155(0x172))/0x9*(-parseInt(_0x285155(0x15c))/0xa)+parseInt(_0x285155(0x178))/0xb;if(_0x516922===_0x41111f)break;else _0x1ddbef['push'](_0x1ddbef['shift']());}catch(_0x5626bb){_0x1ddbef['push'](_0x1ddbef['shift']());}}}(a3_0x2746,0xb8bbd));import a3_0x3b0c22 from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x53a6ae from'node:path';import{fileURLToPath}from'node:url';function a3_0x2746(){const _0x36fd46=['created','includes','resolve','default','5178267JldSTA','2357192gdJmBX','init-api','api.ts.tpl','existed','stringify','12020217iVtdqc','\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.','dirname','toUpperCase','-client','defaultName','LOVRABET_RUNTIME_DOMAIN','replaceApiContent','missing','client','success','replace','39LrwlUy','typescript','.ts','join','api','refreshed','-api',',\x20env:\x20','preserved','format','map','runtimeDomain','LOVRABET','basename','modelRuntime','client.ts.tpl','none','CONFIG_NAMES.DEFAULT','overwriteTypescript','\x20config\x20set\x20app\x20<value>`','modelProfile','utf8','10HdXAuz','{\x20apiConfigName:\x20','37794YYWuxH','datasetCode','../..','tableName','name','APP_','1512700pejiKV','alias','685quAJEB','388912MkzyDD','1zmktkG','allowEmptyModelReplacement','templates/generate-api','166334FYMskB','Model\x20facts\x20refreshed.','action'];a3_0x2746=function(){return _0x36fd46;};return a3_0x2746();}import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';function a3_0x55f8(_0x2fd295,_0x4b7379){_0x2fd295=_0x2fd295-0x13c;const _0x27464d=a3_0x2746();let _0x55f892=_0x27464d[_0x2fd295];return _0x55f892;}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(_0x2c26f3,_0x55bda1){const _0x51bc1c=a3_0x55f8;if(!_0x55bda1)return _0x2c26f3?_0x51bc1c(0x14e):_0x51bc1c(0x142);return _0x2c26f3?'overwritten':'created';}export async function generateApiFile(_0x5d9bf6,_0x2d1f06,_0x54f194,_0x4e2d7d,_0x67e03d,_0x27c510,_0x3b3a88,_0x3ecd9a={},_0x51acbd={}){const _0x5be78f=a3_0x55f8;if(!_0x54f194)throw new Error('Please\x20configure\x20app\x20code\x20first\x20via\x20`'+CLI_BIN_NAME+_0x5be78f(0x159));const _0x4c6ede=_0x4e2d7d&&!_0x3b3a88,_0x5d006a=!!_0x51acbd['modelProfile'],_0x577eb3=_0x5d006a||_0x4c6ede,_0x553b45=_0x3b3a88||_0x54f194,_0x3f6268=_0x5d006a||_0x4c6ede?_0x5be78f(0x171):_0x553b45,_0x551609=_0x5d006a||_0x4c6ede?_0x5be78f(0x157):JSON['stringify'](_0x553b45),_0x536856=!isProduction(_0x67e03d),_0x29055f=_0x536856?_0x5be78f(0x14d)+JSON[_0x5be78f(0x177)](_0x67e03d):'',_0x3dca4a=_0x5be78f(0x15d)+_0x551609+_0x29055f+',\x20...LOVRABET_SDK_CONFIG\x20}',_0x486912=_0x5d006a?'':_0x2d1f06,_0x270b84=_0x486912?_0x486912+_0x5be78f(0x14c):_0x5be78f(0x14a),_0x1b871f=_0x486912?_0x486912+_0x5be78f(0x13e):_0x5be78f(0x143),_0x1406bc=_0x486912&&!/^app-[a-f0-9]+$/i['test'](_0x486912)?_0x486912[_0x5be78f(0x145)](/-/g,'_')[_0x5be78f(0x13d)]():_0x5be78f(0x152),_0x133b16=/^\d/['test'](_0x1406bc)?_0x5be78f(0x163)+_0x1406bc:_0x1406bc,_0x3a4f1d=_0x5d9bf6[_0x5be78f(0x150)](_0x690b95=>({'datasetCode':_0x690b95[_0x5be78f(0x15f)],'tableName':_0x690b95[_0x5be78f(0x161)],'name':_0x690b95[_0x5be78f(0x162)]||'','alias':_0x690b95[_0x5be78f(0x165)]||_0x690b95['key']})),_0x456e67=fileURLToPath(import.meta.url),_0x33c594=a3_0x53a6ae[_0x5be78f(0x170)](a3_0x53a6ae[_0x5be78f(0x13c)](_0x456e67),_0x5be78f(0x160)),_0x12d73d=a3_0x53a6ae['join'](_0x33c594,_0x5be78f(0x16a)),_0x50f128=a3_0x53a6ae[_0x5be78f(0x149)](_0x12d73d,_0x5be78f(0x175)),_0x4bb468=a3_0x53a6ae['join'](_0x12d73d,_0x5be78f(0x155)),_0x2dea83=_0x27c510;mkdirSync(_0x2dea83,{'recursive':!![]});const _0x4fded9=_0x5d006a?{}:_0x3ecd9a,_0x189ed2=await generateSdkConfigFile(_0x2dea83,_0x4fded9,_0x486912),_0x3dad91=a3_0x53a6ae[_0x5be78f(0x153)](_0x189ed2,'.ts'),_0x2a6332=a3_0x53a6ae[_0x5be78f(0x149)](_0x2dea83,_0x270b84+_0x5be78f(0x148)),_0x4723e8=a3_0x53a6ae[_0x5be78f(0x149)](_0x2dea83,_0x1b871f+_0x5be78f(0x148)),_0x525d18=_0x51acbd[_0x5be78f(0x158)]===!![],_0x39cd13=existsSync(_0x2a6332),_0xc7dca7=existsSync(_0x4723e8),_0x38380c=_0x51acbd['scaffoldMode']??(_0x525d18?'replace':_0x5be78f(0x142)),_0x2a14d9=_0x38380c===_0x5be78f(0x145)||_0x38380c==='missing'&&!_0x39cd13,_0x466520=_0x38380c===_0x5be78f(0x145)||_0x38380c===_0x5be78f(0x142)&&!_0xc7dca7,_0x27dba0=_0x51acbd[_0x5be78f(0x15a)]?updateModelRegistry({'outputDir':_0x2dea83,'profileName':_0x51acbd[_0x5be78f(0x15a)][_0x5be78f(0x162)],'defaultProfile':_0x51acbd['modelProfile'][_0x5be78f(0x13f)],'appCode':_0x54f194,'runtimeDomain':_0x51acbd[_0x5be78f(0x15a)][_0x5be78f(0x151)],'models':_0x3a4f1d,'allowEmptyReplacement':_0x51acbd[_0x5be78f(0x169)]===!![]}):undefined,_0x36a284=_0x27dba0?a3_0x53a6ae['join'](_0x2dea83,MODEL_RUNTIME_FILE_NAME):undefined,_0x5010b9=_0x36a284?existsSync(_0x36a284):![],_0x3a6423=_0x5d006a&&_0x38380c!==_0x5be78f(0x156)?await renderModelRegistryScaffold(_0x2dea83):undefined;_0x36a284&&_0x3a6423&&writeFileSync(_0x36a284,_0x3a6423[_0x5be78f(0x154)],_0x5be78f(0x15b));const _0x43ec1d=_0x3a4f1d[0x0]?.['alias'];if(_0x2a14d9){const _0x58901f=_0x3a6423?.[_0x5be78f(0x14a)]??readFileSync(_0x50f128,'utf8'),_0x279250=_0x5d006a?_0x58901f:TemplateReplacer[_0x5be78f(0x141)](_0x58901f,_0x54f194,_0x3a4f1d,_0x43ec1d,_0x270b84,_0x551609,undefined,_0x133b16);writeFileSync(_0x2a6332,await a3_0x3b0c22[_0x5be78f(0x14f)](_0x279250,{'parser':_0x5be78f(0x147)}),{'encoding':_0x5be78f(0x15b)});}if(_0x466520){const _0x940c19=_0x3a6423?.[_0x5be78f(0x143)]??readFileSync(_0x4bb468,'utf8'),_0x29d692=_0x5d006a?_0x940c19:TemplateReplacer[_0x5be78f(0x141)](_0x940c19,_0x54f194,_0x3a4f1d,_0x43ec1d,_0x270b84,_0x551609,_0x3dca4a,_0x133b16,_0x3dad91);writeFileSync(_0x4723e8,await a3_0x3b0c22[_0x5be78f(0x14f)](_0x29d692,{'parser':_0x5be78f(0x147)}),{'encoding':_0x5be78f(0x15b)});}const _0x1d3dab=_0x3a4f1d['length'],_0x280fbd={'api':{'path':_0x2a6332,'action':fileAction(_0x39cd13,_0x2a14d9)},'client':{'path':_0x4723e8,'action':fileAction(_0xc7dca7,_0x466520)},'sdkConfig':{'path':_0x189ed2,'action':_0x5be78f(0x14b)},..._0x27dba0?{'modelRegistry':{'path':_0x27dba0['path'],'action':_0x27dba0[_0x5be78f(0x176)]?'refreshed':_0x5be78f(0x16e)},'modelRuntime':{'path':_0x36a284,'action':_0x3a6423?_0x5010b9?_0x5be78f(0x14b):_0x5be78f(0x16e):_0x5010b9?_0x5be78f(0x14e):_0x5be78f(0x142)}}:{}},_0x4f4f83=existsSync(_0x2a6332)&&readFileSync(_0x2a6332,_0x5be78f(0x15b))[_0x5be78f(0x16f)](MODEL_REGISTRY_FILE_NAME[_0x5be78f(0x145)](_0x5be78f(0x148),'')),_0x15a101=existsSync(_0x4723e8)&&readFileSync(_0x4723e8,_0x5be78f(0x15b))['includes'](_0x5be78f(0x140)),_0x8b7f84=_0x5d006a?!_0x4f4f83||!_0x15a101||!existsSync(_0x36a284):![],_0x375297=_0x5d006a?_0x8b7f84:_0x280fbd[_0x5be78f(0x14a)][_0x5be78f(0x16d)]===_0x5be78f(0x14e)||_0x280fbd[_0x5be78f(0x143)][_0x5be78f(0x16d)]===_0x5be78f(0x14e);return logger[_0x5be78f(0x144)](_0x5be78f(0x174),_0x375297?a3_0x53a6ae[_0x5be78f(0x153)](_0x189ed2)+_0x5be78f(0x179):_0x5d006a?_0x5be78f(0x16c):'API\x20scaffold\x20written.',undefined,{'apiFile':_0x2a6332,'clientFile':_0x4723e8,'sdkConfig':_0x189ed2,'modelCount':_0x1d3dab,'configName':_0x3f6268,'isDefaultConfig':_0x577eb3,'needsAgentMerge':_0x375297,'needsProjectUpgrade':_0x8b7f84,'files':_0x280fbd}),{'appCode':_0x54f194,'modelCount':_0x1d3dab,'models':_0x3a4f1d,'apiFilePath':_0x2a6332,'clientFilePath':_0x4723e8,'sdkConfigPath':_0x189ed2,'modelRegistryPath':_0x27dba0?.['path'],'modelRuntimePath':_0x36a284,'modelProfile':_0x51acbd[_0x5be78f(0x15a)]?.['name'],'configName':_0x3f6268,'isDefaultConfig':_0x577eb3,'sdkRouting':_0x4fded9,'files':_0x280fbd,'needsAgentMerge':_0x375297,'needsProjectUpgrade':_0x8b7f84};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x4a36c7=a4_0x35b3;(function(_0x5a9799,_0x46cf48){const _0x5a51c4=a4_0x35b3,_0x5ecc4d=_0x5a9799();while(!![]){try{const _0x67603d=parseInt(_0x5a51c4(0x12c))/0x1*(parseInt(_0x5a51c4(0x120))/0x2)+parseInt(_0x5a51c4(0x12f))/0x3+parseInt(_0x5a51c4(0x12e))/0x4+-parseInt(_0x5a51c4(0x11b))/0x5*(parseInt(_0x5a51c4(0x126))/0x6)+-parseInt(_0x5a51c4(0x11e))/0x7+parseInt(_0x5a51c4(0x124))/0x8*(-parseInt(_0x5a51c4(0x128))/0x9)+-parseInt(_0x5a51c4(0x125))/0xa*(-parseInt(_0x5a51c4(0x129))/0xb);if(_0x67603d===_0x46cf48)break;else _0x5ecc4d['push'](_0x5ecc4d['shift']());}catch(_0x3ac6e4){_0x5ecc4d['push'](_0x5ecc4d['shift']());}}}(a4_0xd1cb,0xc78d8));import{mkdirSync,writeFileSync}from'node:fs';function a4_0xd1cb(){const _0x4df542=['4433128FIhTLC','{\x0a\x20\x20','2MyTTjt',',\x0a}','runtimeDomain:\x20','/**\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','216kQcmIg','20AjWrnO','1147668EatLrr',',\x0a\x20\x20','342639roqjXM','11147510xlxzvF','length','sdk-config.ts','239398JEeMcO','-sdk-config.ts','922012sspxoL','519438nxlCTu','utf8','push','typescript','5XSjNEA','runtimeDomain','join'];a4_0xd1cb=function(){return _0x4df542;};return a4_0xd1cb();}import a4_0x590f82 from'node:path';function a4_0x35b3(_0x20e384,_0x15620f){_0x20e384=_0x20e384-0x11b;const _0xd1cbef=a4_0xd1cb();let _0x35b3e6=_0xd1cbef[_0x20e384];return _0x35b3e6;}import a4_0x45f750 from'prettier';export const SDK_CONFIG_FILE_NAME=a4_0x4a36c7(0x12b);export function getSdkConfigFileName(_0x42a912=''){const _0xe40119=a4_0x4a36c7;return _0x42a912?_0x42a912+_0xe40119(0x12d):SDK_CONFIG_FILE_NAME;}export async function generateSdkConfigFile(_0x323a07,_0x2fe527={},_0x133838=''){const _0x14a6fe=a4_0x4a36c7,_0x2fe0e6=[];_0x2fe527[_0x14a6fe(0x11c)]&&_0x2fe0e6[_0x14a6fe(0x131)](_0x14a6fe(0x122)+JSON['stringify'](_0x2fe527[_0x14a6fe(0x11c)]));const _0x5101b4=_0x2fe0e6[_0x14a6fe(0x12a)]>0x0?_0x14a6fe(0x11f)+_0x2fe0e6[_0x14a6fe(0x11d)](_0x14a6fe(0x127))+_0x14a6fe(0x121):'{}',_0x1ed63a=_0x14a6fe(0x123)+_0x5101b4+'\x20as\x20const;\x0a';mkdirSync(_0x323a07,{'recursive':!![]});const _0xc2fe3=a4_0x590f82[_0x14a6fe(0x11d)](_0x323a07,getSdkConfigFileName(_0x133838));return writeFileSync(_0xc2fe3,await a4_0x45f750['format'](_0x1ed63a,{'parser':_0x14a6fe(0x132)}),_0x14a6fe(0x130)),_0xc2fe3;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a5_0x4107(_0x28c12a,_0x2818b1){_0x28c12a=_0x28c12a-0x178;const _0x5d6607=a5_0x5d66();let _0x41078d=_0x5d6607[_0x28c12a];return _0x41078d;}(function(_0x13707e,_0x4eda57){const _0x350117=a5_0x4107,_0xca0812=_0x13707e();while(!![]){try{const _0x42ab55=-parseInt(_0x350117(0x184))/0x1+-parseInt(_0x350117(0x18b))/0x2*(parseInt(_0x350117(0x189))/0x3)+parseInt(_0x350117(0x182))/0x4*(-parseInt(_0x350117(0x187))/0x5)+-parseInt(_0x350117(0x188))/0x6+-parseInt(_0x350117(0x17f))/0x7*(parseInt(_0x350117(0x18e))/0x8)+-parseInt(_0x350117(0x191))/0x9+parseInt(_0x350117(0x181))/0xa;if(_0x42ab55===_0x4eda57)break;else _0xca0812['push'](_0xca0812['shift']());}catch(_0x2971a4){_0xca0812['push'](_0xca0812['shift']());}}}(a5_0x5d66,0xaefc7));export function parseLegacyApiModels(_0x46bf7){const _0xd3a6a9=a5_0x4107,_0x488ac7=[],_0x1cef1d=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0xceed5e;while((_0xceed5e=_0x1cef1d[_0xd3a6a9(0x190)](_0x46bf7))!==null){_0x488ac7[_0xd3a6a9(0x18f)]({'datasetCode':_0xceed5e[0x1],'tableName':_0xceed5e[0x2],'name':_0xceed5e[0x3],'alias':_0xceed5e[0x4]});}return _0x488ac7;}function a5_0x5d66(){const _0x4ee8a4=['@lovrabet/sdk','826TUUnzK','registerModels','length','32lKePSe','push','exec','10986912qxCMCF','map','lovrabetClient','includes','replace','match','APP_CODE','matchAll','164899vUjfZJ','some','36396430YrzkNZ','1612abXvlS','Generated\x20by\x20Rabetbase\x20CLI','101241YZuAPr','endsWith','test','2810AXstMX','3252876ljtghG','5361nPoXbL'];a5_0x5d66=function(){return _0x4ee8a4;};return a5_0x5d66();}export function parseLegacyApiAppCode(_0x41bde3){const _0x1a78ad=a5_0x4107;return _0x41bde3[_0x1a78ad(0x17c)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function stripComments(_0xae287b){const _0x5239d7=a5_0x4107;return _0xae287b[_0x5239d7(0x17b)](/\/\*[\s\S]*?\*\//g,'')[_0x5239d7(0x17b)](/\/\/.*$/gm,'');}export function isLegacyGeneratedApiScaffold(_0x4102e5){const _0x523210=a5_0x4107;if(!_0x4102e5[_0x523210(0x17a)](_0x523210(0x183)))return![];const _0x3ead57=stripComments(_0x4102e5),_0x2d7b02=[..._0x3ead57[_0x523210(0x17e)](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)][_0x523210(0x178)](_0x490152=>_0x490152[0x1]);if(_0x2d7b02[_0x523210(0x18d)]!==0x1||_0x2d7b02[0x0]!==_0x523210(0x18a))return![];const _0x2c524e=[..._0x3ead57['matchAll'](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x523210(0x178)](_0x301dd9=>_0x301dd9[0x1]);if(_0x2c524e['length']!==0x2||!_0x2c524e[_0x523210(0x180)](_0x2c6853=>_0x2c6853[_0x523210(0x185)](_0x523210(0x17d)))||!_0x2c524e[_0x523210(0x180)](_0xa64c34=>_0xa64c34[_0x523210(0x185)]('MODELS_CONFIG')))return![];const _0x558941=[..._0x3ead57['matchAll'](/^([A-Za-z_$][\w$]*)\s*\(/gm)][_0x523210(0x178)](_0xc73e8d=>_0xc73e8d[0x1]);return _0x558941[_0x523210(0x18d)]===0x1&&_0x558941[0x0]===_0x523210(0x18c);}export function isLegacyGeneratedClientScaffold(_0x38185a){const _0x1ec9b0=a5_0x4107;if(!_0x38185a[_0x1ec9b0(0x17a)]('Generated\x20by\x20Rabetbase\x20CLI'))return![];const _0x29c1cb=stripComments(_0x38185a),_0x3d1e8c=[..._0x29c1cb['matchAll'](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)]['map'](_0x139d8f=>_0x139d8f[0x1]);if(_0x3d1e8c['some'](_0x10e9e9=>_0x10e9e9!=='@lovrabet/sdk'&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/[_0x1ec9b0(0x186)](_0x10e9e9??'')))return![];const _0x47af3a=[..._0x29c1cb['matchAll'](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x1ec9b0(0x178)](_0x276910=>_0x276910[0x1]);return _0x47af3a['length']===0x1&&_0x47af3a[0x0]===_0x1ec9b0(0x179);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x31a237=a6_0xc033;(function(_0x2e9391,_0x55be79){const _0x26f37e=a6_0xc033,_0xcc5fe9=_0x2e9391();while(!![]){try{const _0x38f64c=-parseInt(_0x26f37e(0x204))/0x1+parseInt(_0x26f37e(0x1f9))/0x2*(-parseInt(_0x26f37e(0x1d7))/0x3)+parseInt(_0x26f37e(0x1cb))/0x4+-parseInt(_0x26f37e(0x1ef))/0x5+-parseInt(_0x26f37e(0x1d9))/0x6*(-parseInt(_0x26f37e(0x1c8))/0x7)+-parseInt(_0x26f37e(0x1f0))/0x8*(parseInt(_0x26f37e(0x1e1))/0x9)+parseInt(_0x26f37e(0x1cf))/0xa*(parseInt(_0x26f37e(0x1fb))/0xb);if(_0x38f64c===_0x55be79)break;else _0xcc5fe9['push'](_0xcc5fe9['shift']());}catch(_0x5f2030){_0xcc5fe9['push'](_0xcc5fe9['shift']());}}}(a6_0x3e78,0xa5abf));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';function a6_0xc033(_0x37731d,_0x4ea24e){_0x37731d=_0x37731d-0x1bf;const _0x3e786b=a6_0x3e78();let _0xc0335=_0x3e786b[_0x37731d];return _0xc0335;}import a6_0x449bc1 from'node:path';function a6_0x3e78(){const _0x5b6bde=['Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','parse','stringify','runtimeDomain','4692AeQQJZ','push','456618ZyNuWu','\x22\x20with\x20an\x20empty\x20result.\x20','isArray','get','datasetCodes','keys','\x22\x20maps\x20to\x20table\x20\x22','object','123102BOHoZv','defaultProfile','.tmp','includes','join','allowEmptyReplacement','\x22\x20and\x20\x22','length','datasetCode','map','filter','name','lovrabet-model-registry/v1','profileName','373245ugAzfz','296QkEqXl','key','outputDir','split','models','\x22\x20maps\x20to\x20alias\x20\x22','Table\x20\x22','test','entries','1334MJOjbN','\x22\x20maps\x20to\x20both\x20\x22','11HZJMRw','profiles','models.generated.ts','/*\x20rabetbase-model-registry:v2\x20*/','tableName','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','appCode','replace','utf8','48370frtjrg','protocol','model-runtime.ts','/*\x20rabetbase-model-registry:start\x20*/','values','slice','string','value','\x20model(s)\x20in\x20profile\x20\x22','indexOf','now','trim','21YVxRkS','/*\x20rabetbase-model-registry:end\x20*/','alias','753472rgtyuk','NOT-SET','\x22\x20in\x20profile\x20\x22','fromEntries','19342070yyQBPk','set','Refusing\x20to\x20replace\x20'];a6_0x3e78=function(){return _0x5b6bde;};return a6_0x3e78();}export const MODEL_REGISTRY_FILE_NAME=a6_0x31a237(0x1fd);export const MODEL_RUNTIME_FILE_NAME=a6_0x31a237(0x206);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x31a237(0x1fe);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL='lovrabet-model-registry/v2',REGISTRY_START=a6_0x31a237(0x1bf),REGISTRY_END=a6_0x31a237(0x1c9);function emptyRegistry(_0x475a38){return{'defaultProfile':_0x475a38,'profiles':{},'models':[]};}function extractRegistryJson(_0x231aeb){const _0x25c601=a6_0x31a237,_0x52c36e=_0x231aeb[_0x25c601(0x1c5)](REGISTRY_START),_0x464434=_0x231aeb[_0x25c601(0x1c5)](REGISTRY_END);if(_0x52c36e<0x0||_0x464434<=_0x52c36e)return undefined;return _0x231aeb[_0x25c601(0x1c1)](_0x52c36e+REGISTRY_START['length'],_0x464434)[_0x25c601(0x1c7)]()[_0x25c601(0x202)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x25c601(0x202)](/;$/,'');}function migrateLegacyRegistry(_0x4060d8){const _0x49d6e0=a6_0x31a237,_0x382faa=emptyRegistry(_0x4060d8[_0x49d6e0(0x1e2)]);for(const [_0x3304c3,_0x40bcda]of Object[_0x49d6e0(0x1f8)](_0x4060d8[_0x49d6e0(0x1fc)])){_0x382faa['profiles'][_0x3304c3]={'appCode':_0x40bcda[_0x49d6e0(0x201)],'runtimeDomain':_0x40bcda[_0x49d6e0(0x1d6)]},mergeProfileModels(_0x382faa,_0x3304c3,_0x40bcda[_0x49d6e0(0x1f4)]);}return _0x382faa;}function generatedObjectLiteralToJson(_0x201b3a){const _0x36fcf3=a6_0x31a237;let _0x39f415='',_0x45ed4b,_0x165919=![],_0x5d435c;for(let _0x499053=0x0;_0x499053<_0x201b3a['length'];_0x499053++){const _0x4b3069=_0x201b3a[_0x499053];if(_0x45ed4b){_0x39f415+=_0x4b3069;if(_0x165919)_0x165919=![];else{if(_0x4b3069==='\x5c')_0x165919=!![];else{if(_0x4b3069===_0x45ed4b)_0x45ed4b=undefined;}}continue;}if(_0x4b3069==='\x22'){_0x45ed4b=_0x4b3069,_0x39f415+=_0x4b3069,_0x5d435c=_0x36fcf3(0x1c3);continue;}if(_0x4b3069===','){let _0x418db2=_0x499053+0x1;while(/\s/['test'](_0x201b3a[_0x418db2]??''))_0x418db2++;if(_0x201b3a[_0x418db2]==='}'||_0x201b3a[_0x418db2]===']')continue;_0x39f415+=_0x4b3069,_0x5d435c=',';continue;}if(_0x4b3069==='{'||_0x4b3069==='['){_0x39f415+=_0x4b3069,_0x5d435c=_0x4b3069;continue;}if(_0x4b3069==='}'||_0x4b3069===']'){_0x39f415+=_0x4b3069,_0x5d435c=_0x4b3069;continue;}if((_0x5d435c==='{'||_0x5d435c===',')&&/[A-Za-z_$]/[_0x36fcf3(0x1f7)](_0x4b3069)){let _0x51c014=_0x499053+0x1;while(/[A-Za-z0-9_$]/[_0x36fcf3(0x1f7)](_0x201b3a[_0x51c014]??''))_0x51c014++;let _0x1a8867=_0x51c014;while(/\s/['test'](_0x201b3a[_0x1a8867]??''))_0x1a8867++;if(_0x201b3a[_0x1a8867]===':'){_0x39f415+=JSON[_0x36fcf3(0x1d5)](_0x201b3a[_0x36fcf3(0x1c1)](_0x499053,_0x51c014)),_0x499053=_0x51c014-0x1,_0x5d435c=_0x36fcf3(0x1f1);continue;}}_0x39f415+=_0x4b3069;if(!/\s/[_0x36fcf3(0x1f7)](_0x4b3069)&&_0x4b3069!==':')_0x5d435c=_0x36fcf3(0x1c3);}return _0x39f415;}function parseGeneratedRegistryJson(_0x22cf91){const _0xd44b0=a6_0x31a237;try{return JSON[_0xd44b0(0x1d4)](_0x22cf91);}catch{return JSON['parse'](generatedObjectLiteralToJson(_0x22cf91));}}function normalizeModelEntries(_0x2345c0,_0xe304f1){const _0x12edac=a6_0x31a237,_0x165660=Object[_0x12edac(0x1de)](_0x2345c0),_0x2b0a8a=[];for(const _0x6a6d75 of _0xe304f1){if(!_0x6a6d75||typeof _0x6a6d75!==_0x12edac(0x1e0)||Array[_0x12edac(0x1db)](_0x6a6d75))return undefined;const _0x3c1d1c=_0x6a6d75;if(typeof _0x3c1d1c[_0x12edac(0x1ca)]!==_0x12edac(0x1c2)||typeof _0x3c1d1c[_0x12edac(0x1ff)]!==_0x12edac(0x1c2)||typeof _0x3c1d1c[_0x12edac(0x1ec)]!==_0x12edac(0x1c2))return undefined;let _0x190d51;if(typeof _0x3c1d1c[_0x12edac(0x1e9)]===_0x12edac(0x1c2)&&_0x3c1d1c['datasetCodes']===undefined)_0x190d51=Object[_0x12edac(0x1ce)](_0x165660[_0x12edac(0x1ea)](_0x47b0aa=>[_0x47b0aa,_0x3c1d1c['datasetCode']]));else{if(_0x3c1d1c[_0x12edac(0x1e9)]===undefined&&_0x3c1d1c[_0x12edac(0x1dd)]&&typeof _0x3c1d1c[_0x12edac(0x1dd)]==='object'&&!Array[_0x12edac(0x1db)](_0x3c1d1c['datasetCodes'])&&Object[_0x12edac(0x1c0)](_0x3c1d1c[_0x12edac(0x1dd)])['every'](_0x984fad=>typeof _0x984fad===_0x12edac(0x1c2)))_0x190d51={..._0x3c1d1c[_0x12edac(0x1dd)]};else return undefined;}_0x2b0a8a[_0x12edac(0x1d8)]({'alias':_0x3c1d1c[_0x12edac(0x1ca)],'tableName':_0x3c1d1c[_0x12edac(0x1ff)],'name':_0x3c1d1c[_0x12edac(0x1ec)],'datasetCodes':_0x190d51});}return _0x2b0a8a;}export function parseModelRegistry(_0x63f760){const _0x2d59d5=a6_0x31a237,_0x349b5f=extractRegistryJson(_0x63f760);if(!_0x349b5f)return undefined;try{const _0x117d96=parseGeneratedRegistryJson(_0x349b5f);if(typeof _0x117d96[_0x2d59d5(0x1e2)]!==_0x2d59d5(0x1c2)||!_0x117d96['profiles']||typeof _0x117d96[_0x2d59d5(0x1fc)]!=='object')return undefined;if(_0x117d96[_0x2d59d5(0x205)]===_0x2d59d5(0x1ed))return migrateLegacyRegistry(_0x117d96);if(!(_0x117d96[_0x2d59d5(0x205)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x117d96[_0x2d59d5(0x205)]===undefined&&_0x63f760[_0x2d59d5(0x1e4)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x2d59d5(0x1db)](_0x117d96[_0x2d59d5(0x1f4)]))return undefined;const _0x172c75=_0x117d96[_0x2d59d5(0x1fc)],_0x5b2bf3=normalizeModelEntries(_0x172c75,_0x117d96[_0x2d59d5(0x1f4)]);if(!_0x5b2bf3)return undefined;return{'defaultProfile':_0x117d96[_0x2d59d5(0x1e2)],'profiles':_0x172c75,'models':_0x5b2bf3};}catch{return undefined;}}export function readModelRegistry(_0x3e389d){const _0x1af49f=a6_0x31a237;if(!existsSync(_0x3e389d))return undefined;try{return parseModelRegistry(readFileSync(_0x3e389d,_0x1af49f(0x203)));}catch{return undefined;}}function registrySource(_0x5632b9){const _0x41e819=a6_0x31a237,_0x14f8e0=Object[_0x41e819(0x1de)](_0x5632b9[_0x41e819(0x1fc)]),_0x194ce8=_0x5632b9[_0x41e819(0x1f4)][_0x41e819(0x1ea)](_0x57cb66=>{const _0x4a31ca=_0x41e819,_0x412339=_0x14f8e0[_0x4a31ca(0x1ea)](_0x2644a6=>_0x57cb66['datasetCodes'][_0x2644a6]),_0x227073=_0x412339[0x0],_0x2ed73e=_0x227073!==undefined&&_0x412339['every'](_0x4d1401=>_0x4d1401===_0x227073),_0x2b7d16={'alias':_0x57cb66[_0x4a31ca(0x1ca)],'tableName':_0x57cb66[_0x4a31ca(0x1ff)],'name':_0x57cb66[_0x4a31ca(0x1ec)]};return _0x2ed73e?{..._0x2b7d16,'datasetCode':_0x227073}:{..._0x2b7d16,'datasetCodes':_0x57cb66[_0x4a31ca(0x1dd)]};}),_0x42b5a2=JSON[_0x41e819(0x1d5)]({'defaultProfile':_0x5632b9['defaultProfile'],'profiles':_0x5632b9[_0x41e819(0x1fc)],'models':_0x194ce8},null,0x2)[_0x41e819(0x1f3)]('\x0a')['map'](_0x39fdb9=>'\x20\x20'+_0x39fdb9)['join']('\x0a');return'/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a'+MODEL_REGISTRY_VERSION_MARKER+'\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20'+REGISTRY_START+'\x0a'+_0x42b5a2+'\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a'+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x3a3e39,_0x474095,_0x137c6c){const _0x591839=a6_0x31a237,_0x5678e6=_0x137c6c[_0x591839(0x1ea)](_0x4e8e59=>({..._0x4e8e59,'alias':_0x4e8e59['alias']||_0x4e8e59[_0x591839(0x1ff)]})),_0x2b38c0=new Map(),_0x2e33a1=new Map();for(const _0x40fdf2 of _0x5678e6){const _0x4ccbb0=_0x2b38c0[_0x591839(0x1dc)](_0x40fdf2[_0x591839(0x1ca)]);if(_0x4ccbb0&&_0x4ccbb0!==_0x40fdf2[_0x591839(0x1ff)])throw new Error('Model\x20alias\x20\x22'+_0x40fdf2['alias']+_0x591839(0x1fa)+_0x4ccbb0+_0x591839(0x1e7)+_0x40fdf2[_0x591839(0x1ff)]+_0x591839(0x1cd)+_0x474095+'\x22.');const _0x4f553e=_0x2e33a1[_0x591839(0x1dc)](_0x40fdf2[_0x591839(0x1ff)]);if(_0x4f553e&&_0x4f553e!==_0x40fdf2[_0x591839(0x1ca)])throw new Error(_0x591839(0x1f6)+_0x40fdf2[_0x591839(0x1ff)]+_0x591839(0x1d3)+_0x4f553e+_0x591839(0x1e7)+_0x40fdf2['alias']+_0x591839(0x1cd)+_0x474095+'\x22.');_0x2b38c0['set'](_0x40fdf2[_0x591839(0x1ca)],_0x40fdf2[_0x591839(0x1ff)]),_0x2e33a1[_0x591839(0x1d0)](_0x40fdf2[_0x591839(0x1ff)],_0x40fdf2[_0x591839(0x1ca)]);const _0x11fccc=_0x3a3e39[_0x591839(0x1f4)]['find'](_0x2d9485=>_0x2d9485[_0x591839(0x1ca)]===_0x40fdf2[_0x591839(0x1ca)]);if(_0x11fccc&&_0x11fccc[_0x591839(0x1ff)]!==_0x40fdf2[_0x591839(0x1ff)])throw new Error('Model\x20alias\x20\x22'+_0x40fdf2[_0x591839(0x1ca)]+_0x591839(0x1df)+_0x11fccc[_0x591839(0x1ff)]+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x40fdf2['tableName']+'\x22\x20in\x20profile\x20\x22'+_0x474095+'\x22.');const _0x336096=_0x3a3e39[_0x591839(0x1f4)]['find'](_0x12e6bc=>_0x12e6bc[_0x591839(0x1ff)]===_0x40fdf2['tableName']);if(_0x336096&&_0x336096['alias']!==_0x40fdf2['alias'])throw new Error(_0x591839(0x1f6)+_0x40fdf2[_0x591839(0x1ff)]+_0x591839(0x1f5)+_0x336096['alias']+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x40fdf2[_0x591839(0x1ca)]+_0x591839(0x1cd)+_0x474095+'\x22.');}for(const _0x40505d of _0x3a3e39['models']){delete _0x40505d['datasetCodes'][_0x474095];}for(const _0x48b9ce of _0x5678e6){let _0xff5417=_0x3a3e39[_0x591839(0x1f4)]['find'](_0x3eee12=>_0x3eee12[_0x591839(0x1ca)]===_0x48b9ce[_0x591839(0x1ca)]);!_0xff5417&&(_0xff5417={'alias':_0x48b9ce[_0x591839(0x1ca)],'tableName':_0x48b9ce[_0x591839(0x1ff)],'name':_0x48b9ce[_0x591839(0x1ec)],'datasetCodes':{}},_0x3a3e39['models'][_0x591839(0x1d8)](_0xff5417)),(_0x474095===_0x3a3e39[_0x591839(0x1e2)]||!_0xff5417['datasetCodes'][_0x3a3e39[_0x591839(0x1e2)]])&&(_0xff5417[_0x591839(0x1ca)]=_0x48b9ce[_0x591839(0x1ca)],_0xff5417[_0x591839(0x1ff)]=_0x48b9ce[_0x591839(0x1ff)],_0xff5417[_0x591839(0x1ec)]=_0x48b9ce[_0x591839(0x1ec)]),_0xff5417[_0x591839(0x1dd)][_0x474095]=_0x48b9ce['datasetCode'];}_0x3a3e39[_0x591839(0x1f4)]=_0x3a3e39[_0x591839(0x1f4)]['filter'](_0x219a36=>Object[_0x591839(0x1de)](_0x219a36['datasetCodes'])[_0x591839(0x1e8)]>0x0);}function removeUnboundProfiles(_0x504043){const _0x3f24d4=a6_0x31a237,_0x3ee62f=Object[_0x3f24d4(0x1f8)](_0x504043[_0x3f24d4(0x1fc)])[_0x3f24d4(0x1eb)](([,_0x2d1fec])=>_0x2d1fec['appCode']===_0x3f24d4(0x1cc))[_0x3f24d4(0x1ea)](([_0x425177])=>_0x425177);if(_0x3ee62f[_0x3f24d4(0x1e8)]===0x0)return;for(const _0x2b6ff2 of _0x3ee62f){delete _0x504043['profiles'][_0x2b6ff2];for(const _0x23d79a of _0x504043['models']){delete _0x23d79a[_0x3f24d4(0x1dd)][_0x2b6ff2];}}_0x504043[_0x3f24d4(0x1f4)]=_0x504043[_0x3f24d4(0x1f4)][_0x3f24d4(0x1eb)](_0x574f8c=>Object[_0x3f24d4(0x1de)](_0x574f8c[_0x3f24d4(0x1dd)])[_0x3f24d4(0x1e8)]>0x0);}export function getProfileModels(_0x2a4e6d,_0x39154d){return _0x2a4e6d['models']['flatMap'](_0x2f5b98=>{const _0x22213c=a6_0xc033,_0x57c8bb=_0x2f5b98[_0x22213c(0x1dd)][_0x39154d];return _0x57c8bb?[{'datasetCode':_0x57c8bb,'tableName':_0x2f5b98[_0x22213c(0x1ff)],'name':_0x2f5b98[_0x22213c(0x1ec)],'alias':_0x2f5b98[_0x22213c(0x1ca)]}]:[];});}export function updateModelRegistry(_0x4f2f56){const _0x4285b9=a6_0x31a237,_0x2aba51=a6_0x449bc1[_0x4285b9(0x1e5)](_0x4f2f56[_0x4285b9(0x1f2)],MODEL_REGISTRY_FILE_NAME),_0x4e0b95=existsSync(_0x2aba51),_0x3384b0=readModelRegistry(_0x2aba51);if(_0x4e0b95&&!_0x3384b0)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x4285b9(0x200));const _0x652e38=_0x3384b0??emptyRegistry(_0x4f2f56['defaultProfile']);if(_0x4f2f56['appCode']!==_0x4285b9(0x1cc))removeUnboundProfiles(_0x652e38);const _0x2001cc=_0x3384b0?getProfileModels(_0x3384b0,_0x4f2f56[_0x4285b9(0x1ee)])[_0x4285b9(0x1e8)]:0x0;if(_0x2001cc>0x0&&_0x4f2f56[_0x4285b9(0x1f4)][_0x4285b9(0x1e8)]===0x0&&!_0x4f2f56[_0x4285b9(0x1e6)])throw new Error(_0x4285b9(0x1d1)+_0x2001cc+_0x4285b9(0x1c4)+_0x4f2f56['profileName']+_0x4285b9(0x1da)+_0x4285b9(0x1d2));_0x652e38[_0x4285b9(0x1e2)]=_0x4f2f56['defaultProfile'],_0x652e38[_0x4285b9(0x1fc)][_0x4f2f56[_0x4285b9(0x1ee)]]={'appCode':_0x4f2f56[_0x4285b9(0x201)],'runtimeDomain':_0x4f2f56[_0x4285b9(0x1d6)]},mergeProfileModels(_0x652e38,_0x4f2f56['profileName'],_0x4f2f56[_0x4285b9(0x1f4)]),mkdirSync(_0x4f2f56['outputDir'],{'recursive':!![]});const _0x3a0f15=_0x2aba51+'.'+process['pid']+'.'+Date[_0x4285b9(0x1c6)]()+_0x4285b9(0x1e3);try{writeFileSync(_0x3a0f15,registrySource(_0x652e38),{'encoding':_0x4285b9(0x203),'mode':0x1a4}),renameSync(_0x3a0f15,_0x2aba51);}catch(_0x1311ca){try{unlinkSync(_0x3a0f15);}catch{}throw _0x1311ca;}return{'path':_0x2aba51,'registry':_0x652e38,'existed':_0x4e0b95};}
|
|
1
|
+
const a6_0x582b9d=a6_0x5bfd;function a6_0x2ffb(){const _0x4ce8c8=['name','NOT-SET','filter','1900212VWvabB','isArray','3912795bowzeR','find','includes','200112bqsrEV','utf8','profileName','slice','now','length','object','models','datasetCodes','value','string','appCode','152645OYwvHk','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','test','set','map','\x22\x20maps\x20to\x20table\x20\x22','7363070SPJfCm','join','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','trim','keys','4253403cCYoqy','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','datasetCode','\x22\x20maps\x20to\x20alias\x20\x22','29453nmOwio','alias','parse','tableName','stringify','.tmp','indexOf','every','/*\x20rabetbase-model-registry:end\x20*/','profiles','fromEntries','allowEmptyReplacement','model-runtime.ts','Table\x20\x22','8OzvlPz','/*\x20rabetbase-model-registry:v2\x20*/','\x22\x20in\x20the\x20registry\x20but\x20\x22','\x20model(s)\x20in\x20profile\x20\x22','get','replace','defaultProfile','66spGgZb','lovrabet-model-registry/v2','\x22\x20with\x20an\x20empty\x20result.\x20','runtimeDomain','74yARdQb','outputDir','split','\x22\x20in\x20profile\x20\x22','/*\x20rabetbase-model-registry:start\x20*/','Model\x20alias\x20\x22','flatMap','key','protocol','Refusing\x20to\x20replace\x20'];a6_0x2ffb=function(){return _0x4ce8c8;};return a6_0x2ffb();}(function(_0x1e5657,_0x58e00a){const _0x5dc69d=a6_0x5bfd,_0x2542c1=_0x1e5657();while(!![]){try{const _0x2d92d6=parseInt(_0x5dc69d(0xbf))/0x1*(parseInt(_0x5dc69d(0x92))/0x2)+-parseInt(_0x5dc69d(0x8e))/0x3*(parseInt(_0x5dc69d(0xa4))/0x4)+parseInt(_0x5dc69d(0xb0))/0x5+-parseInt(_0x5dc69d(0x9f))/0x6+parseInt(_0x5dc69d(0xbb))/0x7+parseInt(_0x5dc69d(0x87))/0x8*(-parseInt(_0x5dc69d(0xa1))/0x9)+parseInt(_0x5dc69d(0xb6))/0xa;if(_0x2d92d6===_0x58e00a)break;else _0x2542c1['push'](_0x2542c1['shift']());}catch(_0x39b4f0){_0x2542c1['push'](_0x2542c1['shift']());}}}(a6_0x2ffb,0x95739));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x7c1b93 from'node:path';export const MODEL_REGISTRY_FILE_NAME='models.generated.ts';export const MODEL_RUNTIME_FILE_NAME=a6_0x582b9d(0x85);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x582b9d(0x88);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x582b9d(0x8f),REGISTRY_START=a6_0x582b9d(0x96),REGISTRY_END=a6_0x582b9d(0xc7);function emptyRegistry(_0x1feb7f){return{'defaultProfile':_0x1feb7f,'profiles':{},'models':[]};}function extractRegistryJson(_0x48ee6b){const _0x29b435=a6_0x582b9d,_0x44ca59=_0x48ee6b['indexOf'](REGISTRY_START),_0x322646=_0x48ee6b[_0x29b435(0xc5)](REGISTRY_END);if(_0x44ca59<0x0||_0x322646<=_0x44ca59)return undefined;return _0x48ee6b[_0x29b435(0xa7)](_0x44ca59+REGISTRY_START[_0x29b435(0xa9)],_0x322646)[_0x29b435(0xb9)]()[_0x29b435(0x8c)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x29b435(0x8c)](/;$/,'');}function migrateLegacyRegistry(_0x375fc0){const _0x31945f=a6_0x582b9d,_0x1acbb1=emptyRegistry(_0x375fc0[_0x31945f(0x8d)]);for(const [_0xfb69f7,_0x573ecd]of Object['entries'](_0x375fc0['profiles'])){_0x1acbb1['profiles'][_0xfb69f7]={'appCode':_0x573ecd['appCode'],'runtimeDomain':_0x573ecd[_0x31945f(0x91)]},mergeProfileModels(_0x1acbb1,_0xfb69f7,_0x573ecd[_0x31945f(0xab)]);}return _0x1acbb1;}function a6_0x5bfd(_0x335ce5,_0x16174b){_0x335ce5=_0x335ce5-0x82;const _0x2ffb75=a6_0x2ffb();let _0x5bfd80=_0x2ffb75[_0x335ce5];return _0x5bfd80;}function generatedObjectLiteralToJson(_0x4b528f){const _0xe967a8=a6_0x582b9d;let _0x426e4d='',_0x24a45e,_0x2b31cb=![],_0x58558c;for(let _0xf47ce3=0x0;_0xf47ce3<_0x4b528f[_0xe967a8(0xa9)];_0xf47ce3++){const _0x28f32f=_0x4b528f[_0xf47ce3];if(_0x24a45e){_0x426e4d+=_0x28f32f;if(_0x2b31cb)_0x2b31cb=![];else{if(_0x28f32f==='\x5c')_0x2b31cb=!![];else{if(_0x28f32f===_0x24a45e)_0x24a45e=undefined;}}continue;}if(_0x28f32f==='\x22'){_0x24a45e=_0x28f32f,_0x426e4d+=_0x28f32f,_0x58558c=_0xe967a8(0xad);continue;}if(_0x28f32f===','){let _0x475d05=_0xf47ce3+0x1;while(/\s/[_0xe967a8(0xb2)](_0x4b528f[_0x475d05]??''))_0x475d05++;if(_0x4b528f[_0x475d05]==='}'||_0x4b528f[_0x475d05]===']')continue;_0x426e4d+=_0x28f32f,_0x58558c=',';continue;}if(_0x28f32f==='{'||_0x28f32f==='['){_0x426e4d+=_0x28f32f,_0x58558c=_0x28f32f;continue;}if(_0x28f32f==='}'||_0x28f32f===']'){_0x426e4d+=_0x28f32f,_0x58558c=_0x28f32f;continue;}if((_0x58558c==='{'||_0x58558c===',')&&/[A-Za-z_$]/[_0xe967a8(0xb2)](_0x28f32f)){let _0x3bb3cc=_0xf47ce3+0x1;while(/[A-Za-z0-9_$]/['test'](_0x4b528f[_0x3bb3cc]??''))_0x3bb3cc++;let _0x1aecbe=_0x3bb3cc;while(/\s/[_0xe967a8(0xb2)](_0x4b528f[_0x1aecbe]??''))_0x1aecbe++;if(_0x4b528f[_0x1aecbe]===':'){_0x426e4d+=JSON['stringify'](_0x4b528f[_0xe967a8(0xa7)](_0xf47ce3,_0x3bb3cc)),_0xf47ce3=_0x3bb3cc-0x1,_0x58558c=_0xe967a8(0x99);continue;}}_0x426e4d+=_0x28f32f;if(!/\s/[_0xe967a8(0xb2)](_0x28f32f)&&_0x28f32f!==':')_0x58558c='value';}return _0x426e4d;}function parseGeneratedRegistryJson(_0x58cb0b){const _0x1ad763=a6_0x582b9d;try{return JSON[_0x1ad763(0xc1)](_0x58cb0b);}catch{return JSON[_0x1ad763(0xc1)](generatedObjectLiteralToJson(_0x58cb0b));}}function normalizeModelEntries(_0x5dc124,_0x2ec3a1){const _0x4d1090=a6_0x582b9d,_0x1f8b67=Object[_0x4d1090(0xba)](_0x5dc124),_0x44ce3e=[];for(const _0x2f72ef of _0x2ec3a1){if(!_0x2f72ef||typeof _0x2f72ef!==_0x4d1090(0xaa)||Array['isArray'](_0x2f72ef))return undefined;const _0x2233ed=_0x2f72ef;if(typeof _0x2233ed[_0x4d1090(0xc0)]!==_0x4d1090(0xae)||typeof _0x2233ed[_0x4d1090(0xc2)]!==_0x4d1090(0xae)||typeof _0x2233ed['name']!=='string')return undefined;let _0x1a4260;if(typeof _0x2233ed['datasetCode']===_0x4d1090(0xae)&&_0x2233ed[_0x4d1090(0xac)]===undefined)_0x1a4260=Object[_0x4d1090(0x83)](_0x1f8b67[_0x4d1090(0xb4)](_0xf7b2e1=>[_0xf7b2e1,_0x2233ed['datasetCode']]));else{if(_0x2233ed[_0x4d1090(0xbd)]===undefined&&_0x2233ed[_0x4d1090(0xac)]&&typeof _0x2233ed[_0x4d1090(0xac)]===_0x4d1090(0xaa)&&!Array[_0x4d1090(0xa0)](_0x2233ed[_0x4d1090(0xac)])&&Object['values'](_0x2233ed[_0x4d1090(0xac)])[_0x4d1090(0xc6)](_0x8ecda5=>typeof _0x8ecda5===_0x4d1090(0xae)))_0x1a4260={..._0x2233ed['datasetCodes']};else return undefined;}_0x44ce3e['push']({'alias':_0x2233ed['alias'],'tableName':_0x2233ed[_0x4d1090(0xc2)],'name':_0x2233ed['name'],'datasetCodes':_0x1a4260});}return _0x44ce3e;}export function parseModelRegistry(_0x13b84d){const _0x544775=a6_0x582b9d,_0x5668d7=extractRegistryJson(_0x13b84d);if(!_0x5668d7)return undefined;try{const _0x470908=parseGeneratedRegistryJson(_0x5668d7);if(typeof _0x470908['defaultProfile']!==_0x544775(0xae)||!_0x470908[_0x544775(0x82)]||typeof _0x470908[_0x544775(0x82)]!==_0x544775(0xaa))return undefined;if(_0x470908[_0x544775(0x9a)]==='lovrabet-model-registry/v1')return migrateLegacyRegistry(_0x470908);if(!(_0x470908[_0x544775(0x9a)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x470908['protocol']===undefined&&_0x13b84d[_0x544775(0xa3)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x544775(0xa0)](_0x470908[_0x544775(0xab)]))return undefined;const _0x1cd6f3=_0x470908['profiles'],_0x3c4687=normalizeModelEntries(_0x1cd6f3,_0x470908[_0x544775(0xab)]);if(!_0x3c4687)return undefined;return{'defaultProfile':_0x470908[_0x544775(0x8d)],'profiles':_0x1cd6f3,'models':_0x3c4687};}catch{return undefined;}}export function readModelRegistry(_0x472268){const _0xd0b14f=a6_0x582b9d;if(!existsSync(_0x472268))return undefined;try{return parseModelRegistry(readFileSync(_0x472268,_0xd0b14f(0xa5)));}catch{return undefined;}}function registrySource(_0x2a113c){const _0x1eb562=a6_0x582b9d,_0x482083=Object['keys'](_0x2a113c['profiles']),_0x3b75cd=_0x2a113c[_0x1eb562(0xab)]['map'](_0x106434=>{const _0x230a19=_0x1eb562,_0x535e66=_0x482083[_0x230a19(0xb4)](_0x5be72b=>_0x106434[_0x230a19(0xac)][_0x5be72b]),_0x28f194=_0x535e66[0x0],_0x4cfd85=_0x28f194!==undefined&&_0x535e66[_0x230a19(0xc6)](_0x5ac62a=>_0x5ac62a===_0x28f194),_0x46969f={'alias':_0x106434[_0x230a19(0xc0)],'tableName':_0x106434['tableName'],'name':_0x106434['name']};return _0x4cfd85?{..._0x46969f,'datasetCode':_0x28f194}:{..._0x46969f,'datasetCodes':_0x106434[_0x230a19(0xac)]};}),_0x497f4b=JSON[_0x1eb562(0xc3)]({'defaultProfile':_0x2a113c['defaultProfile'],'profiles':_0x2a113c['profiles'],'models':_0x3b75cd},null,0x2)[_0x1eb562(0x94)]('\x0a')[_0x1eb562(0xb4)](_0x1883e3=>'\x20\x20'+_0x1883e3)[_0x1eb562(0xb7)]('\x0a');return'/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a'+MODEL_REGISTRY_VERSION_MARKER+'\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20'+REGISTRY_START+'\x0a'+_0x497f4b+_0x1eb562(0xb1)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x5446b0,_0x35cb77,_0x27ca67){const _0xdb8959=a6_0x582b9d,_0x3de3d6=_0x27ca67['map'](_0x3c7c4c=>({..._0x3c7c4c,'alias':_0x3c7c4c[_0xdb8959(0xc0)]||_0x3c7c4c[_0xdb8959(0xc2)]})),_0x2d54c1=new Map(),_0x39ca1a=new Map();for(const _0x5e4756 of _0x3de3d6){const _0x381b1c=_0x2d54c1[_0xdb8959(0x8b)](_0x5e4756[_0xdb8959(0xc0)]);if(_0x381b1c&&_0x381b1c!==_0x5e4756[_0xdb8959(0xc2)])throw new Error(_0xdb8959(0x97)+_0x5e4756['alias']+'\x22\x20maps\x20to\x20both\x20\x22'+_0x381b1c+'\x22\x20and\x20\x22'+_0x5e4756[_0xdb8959(0xc2)]+_0xdb8959(0x95)+_0x35cb77+'\x22.');const _0x35c6dd=_0x39ca1a[_0xdb8959(0x8b)](_0x5e4756[_0xdb8959(0xc2)]);if(_0x35c6dd&&_0x35c6dd!==_0x5e4756[_0xdb8959(0xc0)])throw new Error('Table\x20\x22'+_0x5e4756[_0xdb8959(0xc2)]+'\x22\x20maps\x20to\x20both\x20aliases\x20\x22'+_0x35c6dd+'\x22\x20and\x20\x22'+_0x5e4756[_0xdb8959(0xc0)]+_0xdb8959(0x95)+_0x35cb77+'\x22.');_0x2d54c1[_0xdb8959(0xb3)](_0x5e4756['alias'],_0x5e4756[_0xdb8959(0xc2)]),_0x39ca1a[_0xdb8959(0xb3)](_0x5e4756['tableName'],_0x5e4756['alias']);const _0x37f1b8=_0x5446b0['models'][_0xdb8959(0xa2)](_0x2f4007=>_0x2f4007[_0xdb8959(0xc0)]===_0x5e4756[_0xdb8959(0xc0)]);if(_0x37f1b8&&_0x37f1b8[_0xdb8959(0xc2)]!==_0x5e4756[_0xdb8959(0xc2)])throw new Error(_0xdb8959(0x97)+_0x5e4756[_0xdb8959(0xc0)]+_0xdb8959(0xb5)+_0x37f1b8[_0xdb8959(0xc2)]+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x5e4756[_0xdb8959(0xc2)]+'\x22\x20in\x20profile\x20\x22'+_0x35cb77+'\x22.');const _0xa77ad9=_0x5446b0[_0xdb8959(0xab)][_0xdb8959(0xa2)](_0x3f74b0=>_0x3f74b0[_0xdb8959(0xc2)]===_0x5e4756[_0xdb8959(0xc2)]);if(_0xa77ad9&&_0xa77ad9[_0xdb8959(0xc0)]!==_0x5e4756[_0xdb8959(0xc0)])throw new Error(_0xdb8959(0x86)+_0x5e4756['tableName']+_0xdb8959(0xbe)+_0xa77ad9[_0xdb8959(0xc0)]+_0xdb8959(0x89)+_0x5e4756['alias']+_0xdb8959(0x95)+_0x35cb77+'\x22.');}for(const _0x472302 of _0x5446b0[_0xdb8959(0xab)]){delete _0x472302['datasetCodes'][_0x35cb77];}for(const _0x1e0383 of _0x3de3d6){let _0x5ad51f=_0x5446b0[_0xdb8959(0xab)][_0xdb8959(0xa2)](_0x71a3a3=>_0x71a3a3[_0xdb8959(0xc0)]===_0x1e0383[_0xdb8959(0xc0)]);!_0x5ad51f&&(_0x5ad51f={'alias':_0x1e0383[_0xdb8959(0xc0)],'tableName':_0x1e0383[_0xdb8959(0xc2)],'name':_0x1e0383['name'],'datasetCodes':{}},_0x5446b0[_0xdb8959(0xab)]['push'](_0x5ad51f)),(_0x35cb77===_0x5446b0[_0xdb8959(0x8d)]||!_0x5ad51f[_0xdb8959(0xac)][_0x5446b0[_0xdb8959(0x8d)]])&&(_0x5ad51f[_0xdb8959(0xc0)]=_0x1e0383[_0xdb8959(0xc0)],_0x5ad51f[_0xdb8959(0xc2)]=_0x1e0383['tableName'],_0x5ad51f[_0xdb8959(0x9c)]=_0x1e0383[_0xdb8959(0x9c)]),_0x5ad51f[_0xdb8959(0xac)][_0x35cb77]=_0x1e0383[_0xdb8959(0xbd)];}_0x5446b0[_0xdb8959(0xab)]=_0x5446b0[_0xdb8959(0xab)][_0xdb8959(0x9e)](_0x2688d2=>Object[_0xdb8959(0xba)](_0x2688d2['datasetCodes'])['length']>0x0);}function removeUnboundProfiles(_0x49df8c){const _0x13493d=a6_0x582b9d,_0x3ab44a=Object['entries'](_0x49df8c[_0x13493d(0x82)])[_0x13493d(0x9e)](([,_0x3465fa])=>_0x3465fa[_0x13493d(0xaf)]===_0x13493d(0x9d))['map'](([_0x8bc492])=>_0x8bc492);if(_0x3ab44a[_0x13493d(0xa9)]===0x0)return;for(const _0x4633e5 of _0x3ab44a){delete _0x49df8c['profiles'][_0x4633e5];for(const _0x88c2fd of _0x49df8c[_0x13493d(0xab)]){delete _0x88c2fd[_0x13493d(0xac)][_0x4633e5];}}_0x49df8c['models']=_0x49df8c[_0x13493d(0xab)][_0x13493d(0x9e)](_0x138740=>Object['keys'](_0x138740[_0x13493d(0xac)])['length']>0x0);}export function getProfileModels(_0x23ed46,_0x3401d2){const _0x9920a8=a6_0x582b9d;return _0x23ed46[_0x9920a8(0xab)][_0x9920a8(0x98)](_0x4d6d3b=>{const _0xbf89b8=_0x9920a8,_0x38f392=_0x4d6d3b[_0xbf89b8(0xac)][_0x3401d2];return _0x38f392?[{'datasetCode':_0x38f392,'tableName':_0x4d6d3b[_0xbf89b8(0xc2)],'name':_0x4d6d3b[_0xbf89b8(0x9c)],'alias':_0x4d6d3b['alias']}]:[];});}export function updateModelRegistry(_0x4a4151){const _0x59f998=a6_0x582b9d,_0x8edd32=a6_0x7c1b93['join'](_0x4a4151[_0x59f998(0x93)],MODEL_REGISTRY_FILE_NAME),_0x1c06b1=existsSync(_0x8edd32),_0x21f02a=readModelRegistry(_0x8edd32);if(_0x1c06b1&&!_0x21f02a)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x59f998(0xb8));const _0x14aa36=_0x21f02a??emptyRegistry(_0x4a4151[_0x59f998(0x8d)]);if(_0x4a4151[_0x59f998(0xaf)]!=='NOT-SET')removeUnboundProfiles(_0x14aa36);const _0x32f304=_0x21f02a?getProfileModels(_0x21f02a,_0x4a4151[_0x59f998(0xa6)])['length']:0x0;if(_0x32f304>0x0&&_0x4a4151['models'][_0x59f998(0xa9)]===0x0&&!_0x4a4151[_0x59f998(0x84)])throw new Error(_0x59f998(0x9b)+_0x32f304+_0x59f998(0x8a)+_0x4a4151[_0x59f998(0xa6)]+_0x59f998(0x90)+_0x59f998(0xbc));_0x14aa36[_0x59f998(0x8d)]=_0x4a4151[_0x59f998(0x8d)],_0x14aa36['profiles'][_0x4a4151[_0x59f998(0xa6)]]={'appCode':_0x4a4151['appCode'],'runtimeDomain':_0x4a4151[_0x59f998(0x91)]},mergeProfileModels(_0x14aa36,_0x4a4151[_0x59f998(0xa6)],_0x4a4151[_0x59f998(0xab)]),mkdirSync(_0x4a4151['outputDir'],{'recursive':!![]});const _0x5c8958=_0x8edd32+'.'+process['pid']+'.'+Date[_0x59f998(0xa8)]()+_0x59f998(0xc4);try{writeFileSync(_0x5c8958,registrySource(_0x14aa36),{'encoding':_0x59f998(0xa5),'mode':0x1a4}),renameSync(_0x5c8958,_0x8edd32);}catch(_0x22721f){try{unlinkSync(_0x5c8958);}catch{}throw _0x22721f;}return{'path':_0x8edd32,'registry':_0x14aa36,'existed':_0x1c06b1};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a7_0x4315(_0x544385,_0x1c3dc1){_0x544385=_0x544385-0x1e2;const _0x4a5cc3=a7_0x4a5c();let _0x4315f2=_0x4a5cc3[_0x544385];return _0x4315f2;}const a7_0x40420e=a7_0x4315;(function(_0x1882ee,_0x2e4d15){const _0x224721=a7_0x4315,_0x49ace2=_0x1882ee();while(!![]){try{const _0x4ce67f=-parseInt(_0x224721(0x1e9))/0x1*(parseInt(_0x224721(0x1f3))/0x2)+parseInt(_0x224721(0x1f5))/0x3*(-parseInt(_0x224721(0x1fb))/0x4)+parseInt(_0x224721(0x1fa))/0x5*(parseInt(_0x224721(0x1ea))/0x6)+-parseInt(_0x224721(0x1f4))/0x7+parseInt(_0x224721(0x1f8))/0x8*(parseInt(_0x224721(0x1ee))/0x9)+-parseInt(_0x224721(0x1f2))/0xa*(parseInt(_0x224721(0x1f0))/0xb)+parseInt(_0x224721(0x1f7))/0xc*(parseInt(_0x224721(0x1e2))/0xd);if(_0x4ce67f===_0x2e4d15)break;else _0x49ace2['push'](_0x49ace2['shift']());}catch(_0x270356){_0x49ace2['push'](_0x49ace2['shift']());}}}(a7_0x4a5c,0x39473));import{readFileSync}from'node:fs';import a7_0x5e7bf7 from'node:path';import{fileURLToPath}from'node:url';import a7_0x2f6ece from'prettier';import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function relativeImport(_0x594ebc,_0x277edc){const _0x1e4dd7=a7_0x4315;let _0x539ecd=a7_0x5e7bf7['relative'](_0x594ebc,_0x277edc)[_0x1e4dd7(0x1f6)](/\\/g,'/');if(!_0x539ecd[_0x1e4dd7(0x1f1)]('.'))_0x539ecd='./'+_0x539ecd;return _0x539ecd;}export async function renderModelRegistryScaffold(_0x4b7ac9,_0x176324=process[a7_0x40420e(0x1e7)]()){const _0x248cea=a7_0x40420e,_0x1d6a2f=fileURLToPath(import.meta.url),_0x51b6d1=a7_0x5e7bf7[_0x248cea(0x1ef)](a7_0x5e7bf7[_0x248cea(0x1ec)](_0x1d6a2f),_0x248cea(0x1ed)),_0x5f2806=relativeImport(a7_0x5e7bf7[_0x248cea(0x1ef)](_0x4b7ac9),a7_0x5e7bf7[_0x248cea(0x1ef)](_0x176324,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x5c7ba3=readFileSync(a7_0x5e7bf7[_0x248cea(0x1e4)](_0x51b6d1,_0x248cea(0x1e5)),_0x248cea(0x1fc))['replace'](_0x248cea(0x1e8),_0x5f2806),[_0x4e6e56,_0x54667d,_0xa921e2]=await Promise[_0x248cea(0x1f9)]([a7_0x2f6ece[_0x248cea(0x1eb)](_0x5c7ba3,{'parser':_0x248cea(0x1e6)}),a7_0x2f6ece[_0x248cea(0x1eb)](readFileSync(a7_0x5e7bf7[_0x248cea(0x1e4)](_0x51b6d1,_0x248cea(0x1e3)),'utf8'),{'parser':_0x248cea(0x1e6)}),a7_0x2f6ece[_0x248cea(0x1eb)](readFileSync(a7_0x5e7bf7[_0x248cea(0x1e4)](_0x51b6d1,_0x248cea(0x1fd)),_0x248cea(0x1fc)),{'parser':'typescript'})]);return{'api':_0x4e6e56,'client':_0x54667d,'modelRuntime':_0xa921e2};}function a7_0x4a5c(){const _0x3ccec0=['2522HXBKCv','profile-client.ts.tpl','join','profile-api.ts.tpl','typescript','cwd','{ProjectRoutingImport}','219973BslYEW','12ALvFYy','format','dirname','../../templates/generate-api','369PhUezT','resolve','1604735tdvnRY','startsWith','10NPWtKw','2tUYgmX','3284274QeUOcw','15Wbcvjf','replace','44196AcVBZY','17624RDsTqy','all','807665VWkxYB','46592vmNqLb','utf8','model-runtime.ts.tpl'];a7_0x4a5c=function(){return _0x3ccec0;};return a7_0x4a5c();}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x17b145,_0x56f188){const _0x21955e=a8_0xa5d9,_0x3c250d=_0x17b145();while(!![]){try{const _0x8084f3=-parseInt(_0x21955e(0xbc))/0x1+-parseInt(_0x21955e(0xc6))/0x2+-parseInt(_0x21955e(0xc0))/0x3*(parseInt(_0x21955e(0xc7))/0x4)+parseInt(_0x21955e(0xc1))/0x5*(-parseInt(_0x21955e(0xcd))/0x6)+parseInt(_0x21955e(0xc3))/0x7+parseInt(_0x21955e(0xce))/0x8*(parseInt(_0x21955e(0xb3))/0x9)+parseInt(_0x21955e(0xca))/0xa;if(_0x8084f3===_0x56f188)break;else _0x3c250d['push'](_0x3c250d['shift']());}catch(_0x585492){_0x3c250d['push'](_0x3c250d['shift']());}}}(a8_0x1aa9,0x37e18));function a8_0xa5d9(_0x1eeb64,_0x282b0b){_0x1eeb64=_0x1eeb64-0xab;const _0x1aa941=a8_0x1aa9();let _0xa5d95d=_0x1aa941[_0x1eeb64];return _0xa5d95d;}import{existsSync}from'node:fs';import a8_0x2945ac from'node:path';import{readRawConfig}from'../context/config-loader.js';function a8_0x1aa9(){const _0x457ae1=['appcode','4586600IUCPuG','defaultProfile','\x22\x20is\x20missing\x20from\x20','928320norlrY','3646408SVlaja','AppCode\x20\x22','string','apiDir','defaultApp','find','`\x20first.','-api.ts','length','9FTnIBc','object','apps','\x20api\x20pull\x20--app\x20','validation','join','Run\x20`','cwd','map','36152VlOkGG','resolve','appCode','entries','81ngeEQx','5DqyIGD','profiles','810754BbwNJq','\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20','Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.','819286zaJJDf','29760RnFgOs','Model\x20profile\x20\x22'];a8_0x1aa9=function(){return _0x457ae1;};return a8_0x1aa9();}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(_0x1c2bd1,_0x21b0d0,_0x59fe9e){const _0x4dcd8f=a8_0xa5d9,_0x40085a=a8_0x2945ac[_0x4dcd8f(0xbd)](process[_0x4dcd8f(0xba)](),_0x1c2bd1),_0x43a03e=a8_0x2945ac['resolve'](_0x40085a,'api.ts'),_0x4eb6a9=a8_0x2945ac[_0x4dcd8f(0xbd)](_0x40085a,MODEL_REGISTRY_FILE_NAME),_0x39e194=readModelRegistry(_0x4eb6a9);if(_0x39e194){const _0x51102d=_0x21b0d0?Object[_0x4dcd8f(0xbf)](_0x39e194[_0x4dcd8f(0xc2)])['filter'](([,_0x4ab25b])=>_0x4ab25b[_0x4dcd8f(0xbe)]===_0x21b0d0):[];if(_0x59fe9e){if(_0x39e194['profiles'][_0x59fe9e])return{'filePath':_0x4eb6a9,'profileName':_0x59fe9e};if(_0x51102d['length']>0x0)throw CliErrors[_0x4dcd8f(0xb7)](_0x4dcd8f(0xc8)+_0x59fe9e+_0x4dcd8f(0xcc)+MODEL_REGISTRY_FILE_NAME+'.',_0x4dcd8f(0xb9)+CLI_BIN_NAME+_0x4dcd8f(0xb6)+_0x59fe9e+_0x4dcd8f(0xb0));}else{if(_0x51102d[_0x4dcd8f(0xb2)]===0x1)return{'filePath':_0x4eb6a9,'profileName':_0x51102d[0x0][0x0]};if(_0x51102d[_0x4dcd8f(0xb2)]>0x1)throw new Error(_0x4dcd8f(0xab)+_0x21b0d0+_0x4dcd8f(0xc4)+_0x51102d[_0x4dcd8f(0xbb)](([_0x1dbe09])=>_0x1dbe09)[_0x4dcd8f(0xb8)](',\x20')+'.\x20'+_0x4dcd8f(0xc5));if(_0x39e194[_0x4dcd8f(0xc2)][_0x39e194[_0x4dcd8f(0xcb)]]&&!_0x21b0d0)return{'filePath':_0x4eb6a9,'profileName':_0x39e194['defaultProfile']};}}if(!_0x21b0d0&&!_0x59fe9e)return{'filePath':_0x43a03e};const _0x3dfd64=readRawConfig(),_0x53bb6a=_0x3dfd64[_0x4dcd8f(0xb5)]&&typeof _0x3dfd64[_0x4dcd8f(0xb5)]===_0x4dcd8f(0xb4)?_0x3dfd64[_0x4dcd8f(0xb5)]:{},_0x38306e=_0x59fe9e&&_0x53bb6a[_0x59fe9e]?[_0x59fe9e,_0x53bb6a[_0x59fe9e]]:Object[_0x4dcd8f(0xbf)](_0x53bb6a)[_0x4dcd8f(0xaf)](([,_0x13d87e])=>_0x13d87e?.[_0x4dcd8f(0xc9)]===_0x21b0d0);if(!_0x38306e)return{'filePath':_0x43a03e};const [_0x292287,_0x23fb60]=_0x38306e,_0x91bb2c=typeof _0x3dfd64[_0x4dcd8f(0xae)]===_0x4dcd8f(0xac)?_0x3dfd64['defaultApp']:undefined;if(_0x23fb60?.[_0x4dcd8f(0xad)])return{'filePath':_0x43a03e};if(_0x91bb2c&&_0x292287!==_0x91bb2c){const _0x42ab46=a8_0x2945ac[_0x4dcd8f(0xbd)](_0x40085a,_0x292287+_0x4dcd8f(0xb1));if(existsSync(_0x42ab46))return{'filePath':_0x42ab46};}return{'filePath':_0x43a03e};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3dcbbf,_0x2094cc){const _0x3ed616=a9_0x1193,_0x123221=_0x3dcbbf();while(!![]){try{const _0x2ca7fa=-parseInt(_0x3ed616(0xa0))/0x1*(parseInt(_0x3ed616(0x97))/0x2)+parseInt(_0x3ed616(0x90))/0x3+parseInt(_0x3ed616(0x9b))/0x4+parseInt(_0x3ed616(0x8d))/0x5+-parseInt(_0x3ed616(0x9a))/0x6*(parseInt(_0x3ed616(0x8c))/0x7)+-parseInt(_0x3ed616(0x95))/0x8*(parseInt(_0x3ed616(0x9c))/0x9)+parseInt(_0x3ed616(0x96))/0xa*(parseInt(_0x3ed616(0x9d))/0xb);if(_0x2ca7fa===_0x2094cc)break;else _0x123221['push'](_0x123221['shift']());}catch(_0x350cb3){_0x123221['push'](_0x123221['shift']());}}}(a9_0x3db4,0x92ea5));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a9_0x1193(_0x8f7597,_0x57cb83){_0x8f7597=_0x8f7597-0x8b;const _0x3db4c2=a9_0x3db4();let _0x11932b=_0x3db4c2[_0x8f7597];return _0x11932b;}import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';import a9_0x587e03 from'ora';export async function runAuthServer(_0x4b2b4e){const _0x4a2bb7=a9_0x1193,_0x18f529=await getIsSessionValid();if(_0x18f529){console[_0x4a2bb7(0x8f)]('√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.');return;}if(_0x4b2b4e?.[_0x4a2bb7(0x93)]&&!_0x4b2b4e['autoYes'])throw CliErrors[_0x4a2bb7(0x91)]('Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.',_0x4a2bb7(0x92)+CLI_BIN_NAME+_0x4a2bb7(0x9f));const _0x388e2f=_0x4b2b4e?.[_0x4a2bb7(0x8e)]?!![]:await confirm({'message':'No\x20valid\x20session.\x20Login\x20now?','default':!![]});if(!_0x388e2f)return;if(_0x4b2b4e?.[_0x4a2bb7(0x93)]){console[_0x4a2bb7(0x8f)](_0x4a2bb7(0x98));const _0x51ef9a=await authServer({'silent':![],'openBrowser':![]});_0x51ef9a?console[_0x4a2bb7(0x8f)](_0x4a2bb7(0x94)):console['log'](_0x4a2bb7(0x9e));return;}const _0x3d9fc0=a9_0x587e03(_0x4a2bb7(0x8b))['start'](),_0x309095=await authServer({'silent':!![],'openBrowser':!![]});_0x3d9fc0[_0x4a2bb7(0x99)](),_0x309095?console[_0x4a2bb7(0x8f)](_0x4a2bb7(0x94)):console[_0x4a2bb7(0x8f)](_0x4a2bb7(0x9e));}function a9_0x3db4(){const _0x755af0=['Run\x20`','nonInteractive','*\x20Login\x20successful!','314168GLLWlQ','110BhzNEi','460420XQXUDt','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','stop','132EOwUTk','3471276qoLJaA','261mbwrWX','502337YyhehR','!\x20Login\x20failed.','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','1RjFTuY','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','161553CUcvxW','3338765tbIreZ','autoYes','log','1321989KLgwaK','validation'];a9_0x3db4=function(){return _0x755af0;};return a9_0x3db4();}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x23e91f=a10_0x7fb0;(function(_0x5edaca,_0x3b3bd5){const _0x54c24b=a10_0x7fb0,_0x3b3087=_0x5edaca();while(!![]){try{const _0x3947da=parseInt(_0x54c24b(0x11b))/0x1+parseInt(_0x54c24b(0x10d))/0x2*(-parseInt(_0x54c24b(0x127))/0x3)+parseInt(_0x54c24b(0x113))/0x4*(-parseInt(_0x54c24b(0x10c))/0x5)+-parseInt(_0x54c24b(0x10a))/0x6+-parseInt(_0x54c24b(0x12d))/0x7+parseInt(_0x54c24b(0x131))/0x8+-parseInt(_0x54c24b(0x11a))/0x9*(-parseInt(_0x54c24b(0x126))/0xa);if(_0x3947da===_0x3b3bd5)break;else _0x3b3087['push'](_0x3b3087['shift']());}catch(_0x1bb427){_0x3b3087['push'](_0x3b3087['shift']());}}}(a10_0x5682,0xd2ac6));import{writeFileSync}from'node:fs';import a10_0x145391 from'node:http';import a10_0x3613cc from'node:https';import{getUserDomain}from'../constant/domain.js';import{getOfficialRoutingCdn,getOfficialRoutingProfile}from'../constant/routing-profile.js';function a10_0x7fb0(_0x3df6a2,_0x881ecd){_0x3df6a2=_0x3df6a2-0x106;const _0x5682cd=a10_0x5682();let _0x7fb033=_0x5682cd[_0x3df6a2];return _0x7fb033;}import{getProjectDomainRoutingManifest}from'../config/project-domain-routing.js';import{exec}from'node:child_process';import{getIsSessionValid}from'../auth/is-session-valid.js';import{cookieFile}from'../auth/constant.js';function a10_0x5682(){const _0xf5c88f=['json','9569455JbbvDv','text/html;\x20charset=utf-8','then','!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','10585936ttzEMG','close','port','cmd\x20/c\x20start\x20\x22\x22\x20\x22','🔐\x20Starting\x20login\x20service...','💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','/api/auth/get-session','catch','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','listen','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','8960790qbVBEC','silent','2433495NnClMA','105200dTYTsz','/cert/lovrabet-dev.json','lovrabet','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','/sign-in?redirect=','end','4gBwLdM','createServer','log','📍\x20Login\x20URL:','error','openBrowser','local','108TCRLAg','1028309upTlCD','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','certificateUrl','isAuth','cookie','utf-8','Auth\x20server\x20error:','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','open\x20\x22','headers','timeoutMs','2600830ImaAZJ','72vNUzNG','xdg-open\x20\x22','origin','127.0.0.1','address'];a10_0x5682=function(){return _0xf5c88f;};return a10_0x5682();}import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export function resolveAuthCallbackRouting(_0x2008c1){const _0x31bee4=a10_0x7fb0;if(!_0x2008c1)return getProjectDomainRoutingManifest()['local'];const _0x152c24=getOfficialRoutingProfile(_0x2008c1),_0x5f255d=getOfficialRoutingCdn(_0x2008c1);return{'origin':_0x152c24[_0x31bee4(0x119)][_0x31bee4(0x129)],'certificateUrl':_0x5f255d[_0x31bee4(0x10f)]+_0x31bee4(0x10e)};}function withPort(_0x4697ad,_0x53b44e){const _0x18018d=a10_0x7fb0,_0x475c22=new URL(_0x4697ad);return _0x475c22['port']=String(_0x53b44e),_0x475c22[_0x18018d(0x129)];}export async function authServer(_0x3f3c18){const _0x486462=a10_0x7fb0,_0x1656b0=_0x3f3c18?.[_0x486462(0x10b)]||![],_0x104d79=_0x3f3c18?.[_0x486462(0x118)]??!![],_0x57d2dd=_0x3f3c18?.[_0x486462(0x125)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x4830bf=resolveAuthCallbackRouting(),_0x22f84b=_0x4830bf[_0x486462(0x11d)]?await(await fetch(_0x4830bf[_0x486462(0x11d)]))[_0x486462(0x12c)]():undefined;return new Promise(async(_0x4a289e,_0x21aaf4)=>{const _0x27e785=_0x486462;let _0x14d3cf=0x0,_0x33c969=![],_0x923d65;const _0x1cbec2=async(_0x28347a,_0x193e50)=>{const _0x1a00e2=a10_0x7fb0,_0x17d9d6=getUserDomain(),_0x5bfa9e=_0x28347a[_0x1a00e2(0x124)][_0x1a00e2(0x11f)]||'',_0x278870=await fetch(_0x17d9d6+_0x1a00e2(0x137),{'headers':{'cookie':_0x5bfa9e}})[_0x1a00e2(0x12f)](_0x22dfd9=>_0x22dfd9[_0x1a00e2(0x12c)]()),_0x4bd7c3=_0x278870&&_0x278870['session']&&_0x278870['user'];if(_0x4bd7c3){writeFileSync(cookieFile,_0x5bfa9e,_0x1a00e2(0x120));const _0x334bb4=buildLoginSuccessHtml();_0x193e50['writeHead'](0xc8,{'Content-Type':_0x1a00e2(0x12e)}),_0x193e50[_0x1a00e2(0x112)](_0x334bb4),_0x44bec3(!![]);}else{const _0x2900b6=encodeURIComponent(withPort(_0x4830bf['origin'],_0x14d3cf));_0x193e50['writeHead'](0x12e,{'location':_0x17d9d6+_0x1a00e2(0x111)+_0x2900b6}),_0x193e50['end']();return;}},_0x23c3b8=_0x22f84b?a10_0x3613cc[_0x27e785(0x114)](_0x22f84b,_0x1cbec2):a10_0x145391[_0x27e785(0x114)](_0x1cbec2);function _0x44bec3(_0x5b2cc9){if(_0x33c969)return;_0x33c969=!![],_0x923d65&&clearTimeout(_0x923d65),_0x23c3b8['close'](),_0x4a289e(_0x5b2cc9);}_0x23c3b8[_0x27e785(0x108)](0x0,_0x27e785(0x12a),()=>{const _0x5a0117=_0x27e785,_0x5c6a30=_0x23c3b8[_0x5a0117(0x12b)]();_0x14d3cf=typeof _0x5c6a30==='object'&&_0x5c6a30?_0x5c6a30[_0x5a0117(0x133)]:Number(_0x5c6a30);const _0x136fbc=withPort(_0x4830bf[_0x5a0117(0x129)],_0x14d3cf);_0x923d65=setTimeout(()=>{const _0x233529=_0x5a0117;!_0x1656b0&&console[_0x233529(0x115)](_0x233529(0x130)),_0x44bec3(![]);},_0x57d2dd);!_0x1656b0&&(console[_0x5a0117(0x115)](_0x5a0117(0x135)),console[_0x5a0117(0x115)](_0x5a0117(0x116),_0x136fbc),_0x104d79?(console['log'](_0x5a0117(0x122)),console[_0x5a0117(0x115)](''),console[_0x5a0117(0x115)](_0x5a0117(0x110))):console[_0x5a0117(0x115)](_0x5a0117(0x136)),console[_0x5a0117(0x115)](''));if(!_0x104d79)return;openInBrowser(_0x136fbc)[_0x5a0117(0x12f)](_0x50d2dd=>{const _0xe29b18=_0x5a0117;!_0x1656b0&&(_0x50d2dd?console[_0xe29b18(0x115)](_0xe29b18(0x107)):(console[_0xe29b18(0x115)](_0xe29b18(0x109)),console[_0xe29b18(0x115)](_0xe29b18(0x11c),_0x136fbc)),console[_0xe29b18(0x115)](''));})[_0x5a0117(0x106)](()=>{const _0xad5528=_0x5a0117;!_0x1656b0&&(console[_0xad5528(0x115)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0xad5528(0x115)](_0xad5528(0x11c),_0x136fbc),console[_0xad5528(0x115)](''));});}),_0x23c3b8['on'](_0x27e785(0x117),_0x3de6b7=>{const _0x34231a=_0x27e785;if(_0x33c969)return;_0x33c969=!![],_0x923d65&&clearTimeout(_0x923d65),!_0x1656b0&&console[_0x34231a(0x117)](_0x34231a(0x121),_0x3de6b7),_0x23c3b8[_0x34231a(0x132)](),_0x21aaf4(_0x3de6b7);});});}function openInBrowser(_0x5d6959){return new Promise(_0x4fcb17=>{const _0x552774=a10_0x7fb0,_0x11f4cc=process['platform'];let _0x1ee2e9;if(_0x11f4cc==='win32')_0x1ee2e9=_0x552774(0x134)+_0x5d6959+'\x22';else _0x11f4cc==='darwin'?_0x1ee2e9=_0x552774(0x123)+_0x5d6959+'\x22':_0x1ee2e9=_0x552774(0x128)+_0x5d6959+'\x22';exec(_0x1ee2e9,_0x411c82=>{_0x411c82?_0x4fcb17(![]):_0x4fcb17(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a10_0x23e91f(0x115)](a10_0x23e91f(0x11e),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a11_0x4a46cc=a11_0x2506;(function(_0x233d2f,_0x5ba72f){const _0x28bcce=a11_0x2506,_0x35a766=_0x233d2f();while(!![]){try{const _0x478f32=parseInt(_0x28bcce(0xa0))/0x1+-parseInt(_0x28bcce(0xa2))/0x2+-parseInt(_0x28bcce(0x98))/0x3+-parseInt(_0x28bcce(0x9e))/0x4*(-parseInt(_0x28bcce(0x9a))/0x5)+-parseInt(_0x28bcce(0xa3))/0x6+parseInt(_0x28bcce(0x9f))/0x7*(parseInt(_0x28bcce(0x9c))/0x8)+parseInt(_0x28bcce(0x9b))/0x9*(parseInt(_0x28bcce(0xa1))/0xa);if(_0x478f32===_0x5ba72f)break;else _0x35a766['push'](_0x35a766['shift']());}catch(_0x929306){_0x35a766['push'](_0x35a766['shift']());}}}(a11_0x222f,0xc3cf3));import{mkdirSync}from'node:fs';function a11_0x222f(){const _0x554abf=['573088RtXTcQ','cookie','180424ZggURa','28HoFMlf','53087CiJqLp','32740vnACoQ','1450102RWZhdU','1778172GqnnGq','1545279LahfGS','.lovrabet','100oGsMeR','3015nMbniu'];a11_0x222f=function(){return _0x554abf;};return a11_0x222f();}function a11_0x2506(_0x28c4df,_0x447574){_0x28c4df=_0x28c4df-0x98;const _0x222f4c=a11_0x222f();let _0x2506c5=_0x222f4c[_0x28c4df];return _0x2506c5;}import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a11_0x4a46cc(0x99));export const cookieFile=join(configDir,a11_0x4a46cc(0x9d));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a12_0x39ab(_0x28c5e3,_0x157b18){_0x28c5e3=_0x28c5e3-0x12e;var _0x566b4d=a12_0x566b();var _0x39ab8c=_0x566b4d[_0x28c5e3];return _0x39ab8c;}(function(_0x4ff826,_0x469867){var _0x5f3eb5=a12_0x39ab,_0xdb288a=_0x4ff826();while(!![]){try{var _0x489dd1=-parseInt(_0x5f3eb5(0x139))/0x1+parseInt(_0x5f3eb5(0x137))/0x2+-parseInt(_0x5f3eb5(0x136))/0x3+parseInt(_0x5f3eb5(0x135))/0x4*(parseInt(_0x5f3eb5(0x133))/0x5)+-parseInt(_0x5f3eb5(0x138))/0x6*(parseInt(_0x5f3eb5(0x131))/0x7)+parseInt(_0x5f3eb5(0x12f))/0x8*(parseInt(_0x5f3eb5(0x12e))/0x9)+parseInt(_0x5f3eb5(0x130))/0xa*(parseInt(_0x5f3eb5(0x134))/0xb);if(_0x489dd1===_0x469867)break;else _0xdb288a['push'](_0xdb288a['shift']());}catch(_0x5dde45){_0xdb288a['push'](_0xdb288a['shift']());}}}(a12_0x566b,0x6aeb0));function a12_0x566b(){var _0x20614b=['5prpemd','11BiLfJe','55484kUvvAy','2077938gFhFog','1194818NvpySx','6rSZbWp','744548RYlauw','367065cVAuqI','168ivvwVh','4649180rooFyZ','402871AypdoY','utf-8'];a12_0x566b=function(){return _0x20614b;};return a12_0x566b();}import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0x540ba2=a12_0x39ab;try{return readFileSync(cookieFile,_0x540ba2(0x132));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a13_0x1a59(_0x5e8178,_0x5ec19e){_0x5e8178=_0x5e8178-0x1d2;const _0x6e317=a13_0x6e31();let _0x1a592a=_0x6e317[_0x5e8178];return _0x1a592a;}(function(_0x9d5e0,_0x8d18c3){const _0x1f7061=a13_0x1a59,_0x58d64a=_0x9d5e0();while(!![]){try{const _0x1f3342=parseInt(_0x1f7061(0x1d9))/0x1+-parseInt(_0x1f7061(0x1dd))/0x2+parseInt(_0x1f7061(0x1d3))/0x3*(parseInt(_0x1f7061(0x1d8))/0x4)+parseInt(_0x1f7061(0x1d6))/0x5*(-parseInt(_0x1f7061(0x1da))/0x6)+parseInt(_0x1f7061(0x1df))/0x7*(parseInt(_0x1f7061(0x1de))/0x8)+parseInt(_0x1f7061(0x1d2))/0x9*(parseInt(_0x1f7061(0x1e0))/0xa)+-parseInt(_0x1f7061(0x1d5))/0xb;if(_0x1f3342===_0x8d18c3)break;else _0x58d64a['push'](_0x58d64a['shift']());}catch(_0x145311){_0x58d64a['push'](_0x58d64a['shift']());}}}(a13_0x6e31,0xb7ccc));function a13_0x6e31(){const _0x1429f8=['json','9BWCnWb','3ekCzeq','utf-8','7853395lEpbgn','3122085DamxRe','session','730960LyWVwD','160235Eegnip','6EAEHZI','/api/auth/get-session','user','1230716VbXBdm','399624AKPSeY','154mgRMyb','12646230eqRdKl'];a13_0x6e31=function(){return _0x1429f8;};return a13_0x6e31();}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(_0x1150e7){const _0x445a4b=a13_0x1a59;try{if(_0x1150e7===undefined){if(!existsSync(cookieFile))return null;_0x1150e7=readFileSync(cookieFile,_0x445a4b(0x1d4));}if(!_0x1150e7)return null;const _0x1c235d=await fetch(getUserDomain()+_0x445a4b(0x1db),{'headers':{'cookie':_0x1150e7}});if(!_0x1c235d['ok'])return null;const _0x1e48c1=await _0x1c235d[_0x445a4b(0x1e1)]();if(!_0x1e48c1[_0x445a4b(0x1d7)]||!_0x1e48c1[_0x445a4b(0x1dc)])return null;return _0x1e48c1;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a14_0x4490(){const _0x11edd6=['7010339Wqapdt','19413783sRsDLG','session','8412EwPzkN','518496wjUTFX','utf-8','38436kSYXhA','json','24425sLUBFo','1140GMBIWD','8006344GYImXF','24oXArph','/api/auth/get-session'];a14_0x4490=function(){return _0x11edd6;};return a14_0x4490();}(function(_0x30dc56,_0x854972){const _0x3ac17c=a14_0x5455,_0x4b7b2f=_0x30dc56();while(!![]){try{const _0x523996=parseInt(_0x3ac17c(0x105))/0x1+-parseInt(_0x3ac17c(0x103))/0x2+-parseInt(_0x3ac17c(0x102))/0x3*(-parseInt(_0x3ac17c(0xfd))/0x4)+-parseInt(_0x3ac17c(0xfa))/0x5*(-parseInt(_0x3ac17c(0xfb))/0x6)+parseInt(_0x3ac17c(0xff))/0x7+parseInt(_0x3ac17c(0xfc))/0x8+-parseInt(_0x3ac17c(0x100))/0x9;if(_0x523996===_0x854972)break;else _0x4b7b2f['push'](_0x4b7b2f['shift']());}catch(_0xbf7810){_0x4b7b2f['push'](_0x4b7b2f['shift']());}}}(a14_0x4490,0x8b001));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a14_0x5455(_0x299851,_0x3a87f4){_0x299851=_0x299851-0xf9;const _0x4490b0=a14_0x4490();let _0x545596=_0x4490b0[_0x299851];return _0x545596;}export async function getIsSessionValid(){const _0x8dfae4=a14_0x5455;try{if(!existsSync(cookieFile))return![];const _0x4dd040=readFileSync(cookieFile,_0x8dfae4(0x104)),_0x25de84=await fetch(getUserDomain()+_0x8dfae4(0xfe),{'headers':{'cookie':_0x4dd040}})['then'](_0x5d961b=>_0x5d961b[_0x8dfae4(0xf9)]());return _0x25de84&&_0x25de84[_0x8dfae4(0x101)]&&_0x25de84['user'];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x50f298,_0x293ac2){const _0x4b2c64=a15_0x3420,_0x3ae656=_0x50f298();while(!![]){try{const _0x1ddc64=parseInt(_0x4b2c64(0x72))/0x1+-parseInt(_0x4b2c64(0x77))/0x2+-parseInt(_0x4b2c64(0x76))/0x3+parseInt(_0x4b2c64(0x6f))/0x4*(-parseInt(_0x4b2c64(0x6d))/0x5)+parseInt(_0x4b2c64(0x6e))/0x6*(parseInt(_0x4b2c64(0x74))/0x7)+-parseInt(_0x4b2c64(0x75))/0x8*(parseInt(_0x4b2c64(0x6c))/0x9)+parseInt(_0x4b2c64(0x73))/0xa*(parseInt(_0x4b2c64(0x6a))/0xb);if(_0x1ddc64===_0x293ac2)break;else _0x3ae656['push'](_0x3ae656['shift']());}catch(_0x5d8dee){_0x3ae656['push'](_0x3ae656['shift']());}}}(a15_0x15d5,0xebc20));export function buildLoginSuccessHtml(){const _0x407731=a15_0x3420,_0x2fe8b2=_0x407731(0x71);return _0x407731(0x70)+_0x2fe8b2+_0x407731(0x6b);}function a15_0x3420(_0x54887b,_0x4aa2d9){_0x54887b=_0x54887b-0x6a;const _0x15d556=a15_0x15d5();let _0x3420c7=_0x15d556[_0x54887b];return _0x3420c7;}function a15_0x15d5(){const _0x380a5b=['77697DZfArh','5DogGUw','3416382EjliDI','387052hyfifp','<!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>','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','975715oKKMzt','10TRXihD','7qeleoT','1352iqWmdo','5499402fclGuW','3747794OXfvZe','51516553sAMvQF','</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>'];a15_0x15d5=function(){return _0x380a5b;};return a15_0x15d5();}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a16_0xb494(){var _0x5b5f23=['297HdJIuY','1238032KrQiJa','570805LVQZSy','385450jLZgZT','!\x20Not\x20logged\x20in','7wbXyhl','3284640zSUTXg','3993564SVVnxp','1AzlTlC','✓\x20Logged\x20out','2917808TKOixX','856818gnMOQw'];a16_0xb494=function(){return _0x5b5f23;};return a16_0xb494();}function a16_0x5bd9(_0x467669,_0x4c7574){_0x467669=_0x467669-0x10f;var _0xb49436=a16_0xb494();var _0x5bd9b4=_0xb49436[_0x467669];return _0x5bd9b4;}(function(_0x54b9e7,_0x399eb1){var _0x380c67=a16_0x5bd9,_0x33b0cb=_0x54b9e7();while(!![]){try{var _0x507516=-parseInt(_0x380c67(0x119))/0x1*(parseInt(_0x380c67(0x112))/0x2)+-parseInt(_0x380c67(0x110))/0x3+-parseInt(_0x380c67(0x117))/0x4+-parseInt(_0x380c67(0x113))/0x5+parseInt(_0x380c67(0x118))/0x6+-parseInt(_0x380c67(0x116))/0x7*(-parseInt(_0x380c67(0x10f))/0x8)+parseInt(_0x380c67(0x111))/0x9*(parseInt(_0x380c67(0x114))/0xa);if(_0x507516===_0x399eb1)break;else _0x33b0cb['push'](_0x33b0cb['shift']());}catch(_0x2bfa2a){_0x33b0cb['push'](_0x33b0cb['shift']());}}}(a16_0xb494,0x70e1a));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function logout(){var _0x9402b7=a16_0x5bd9;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x9402b7(0x11a))):console['log'](_0x9402b7(0x115));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x387eaa=a17_0x5ed6;(function(_0x482a50,_0x10db08){const _0x280f33=a17_0x5ed6,_0x29402e=_0x482a50();while(!![]){try{const _0x59aeae=parseInt(_0x280f33(0x168))/0x1*(-parseInt(_0x280f33(0x163))/0x2)+-parseInt(_0x280f33(0x165))/0x3+-parseInt(_0x280f33(0x167))/0x4*(parseInt(_0x280f33(0x16c))/0x5)+-parseInt(_0x280f33(0x164))/0x6+-parseInt(_0x280f33(0x166))/0x7+parseInt(_0x280f33(0x169))/0x8+parseInt(_0x280f33(0x16b))/0x9;if(_0x59aeae===_0x10db08)break;else _0x29402e['push'](_0x29402e['shift']());}catch(_0x5eb4bb){_0x29402e['push'](_0x29402e['shift']());}}}(a17_0x3437,0x7aa48));export const dynamicCliFlags={'enableBffSave':{'type':a17_0x387eaa(0x16a)}};function a17_0x5ed6(_0x2d4b4e,_0x426e01){_0x2d4b4e=_0x2d4b4e-0x163;const _0x343749=a17_0x3437();let _0x5ed66a=_0x343749[_0x2d4b4e];return _0x5ed66a;}function a17_0x3437(){const _0x1a11ce=['70kkmEBQ','21748ceqYJH','1954410wUcURP','574872HPSGDX','5430355fttlsq','173744qYZwpu','34qcBVDq','5359928iyTzTv','boolean','18929673nsUTcU'];a17_0x3437=function(){return _0x1a11ce;};return a17_0x3437();}
|