@lovrabet/rabetbase-cli 2.5.5-beta.3 โ 2.5.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.d.ts +40 -0
- package/lib/commands/db/cross-db-analysis-shared.js +1 -0
- package/lib/commands/db/cross-db-analyze-latest.d.ts +2 -0
- package/lib/commands/db/cross-db-analyze-latest.js +1 -0
- package/lib/commands/db/cross-db-analyze-start.d.ts +2 -0
- package/lib/commands/db/cross-db-analyze-start.js +1 -0
- package/lib/commands/db/cross-db-analyze-status.d.ts +2 -0
- package/lib/commands/db/cross-db-analyze-status.js +1 -0
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +7 -0
- 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.d.ts +17 -0
- package/lib/core/cross-db-analysis.js +1 -0
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +6 -4
- package/skills/rabetbase/guides/database-connection-workflow.md +12 -3
- package/skills/rabetbase/guides/independent-deployment.md +10 -2
- package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +2 -0
- package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -0
- package/skills/rabetbase/references/rabetbase-db-cross-analyze.md +78 -0
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +4 -3
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x3538cb=a0_0x4931;(function(_0x20a760,_0xc233fa){const _0x153e2f=a0_0x4931,_0x5cef86=_0x20a760();while(!![]){try{const _0x1598c1=-parseInt(_0x153e2f(0x163))/0x1+parseInt(_0x153e2f(0x15d))/0x2+-parseInt(_0x153e2f(0x15b))/0x3+-parseInt(_0x153e2f(0x16c))/0x4+-parseInt(_0x153e2f(0x15e))/0x5+-parseInt(_0x153e2f(0x161))/0x6*(-parseInt(_0x153e2f(0x170))/0x7)+parseInt(_0x153e2f(0x167))/0x8;if(_0x1598c1===_0xc233fa)break;else _0x5cef86['push'](_0x5cef86['shift']());}catch(_0x2c48e6){_0x5cef86['push'](_0x5cef86['shift']());}}}(a0_0x5f13,0x26aa3));function a0_0x5f13(){const _0x390ada=['utf8','error','Waiting\x203\x20seconds...\x0a','length','357702ggClHy','success','501444FTzNgW','100250ijuTPg','โ\x20Failed:\x20',']\x20Generating:\x20','6yKxRHv','api-doc','11181XrjAUC','join','log','Generated\x20docs\x20successfully:\x20','169768DbOyrZ','โ\x20Generated:\x20','tableName','name','.md\x20(','1084064ioSZQb','push','.md\x20-\x20','message','2155363aJSmJn','datasetCode','./docs','.md'];a0_0x5f13=function(){return _0x390ada;};return a0_0x5f13();}function a0_0x4931(_0x21301b,_0xbb4bac){_0x21301b=_0x21301b-0x159;const _0x5f1393=a0_0x5f13();let _0x49316d=_0x5f1393[_0x21301b];return _0x49316d;}import{mkdirSync,writeFileSync}from'node:fs';import a0_0x34a6b7 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(_0x3aeb6a){return new Promise(_0x54ca55=>setTimeout(_0x54ca55,_0x3aeb6a));}export async function generateDatasetDocs(_0x2efa79,_0x473316,_0x4551fd,_0x738d38=a0_0x3538cb(0x172),_0x173617,_0x13e255){const _0x3b9a3e=a0_0x3538cb;mkdirSync(_0x738d38,{'recursive':!![]});const _0x46e4c9=[],_0xbf92eb=_0x2efa79[_0x3b9a3e(0x15a)];console[_0x3b9a3e(0x165)]('\x0a'+_0xbf92eb+'\x20datasets\x20to\x20generate\x20docs\x20for\x0a');for(let _0x6c6511=0x0;_0x6c6511<_0x2efa79[_0x3b9a3e(0x15a)];_0x6c6511++){const _0x3c28d9=_0x2efa79[_0x6c6511],_0x4c0332=_0x6c6511+0x1,_0x1a178e=_0x3c28d9[_0x3b9a3e(0x169)];try{console[_0x3b9a3e(0x165)]('['+_0x4c0332+'/'+_0xbf92eb+_0x3b9a3e(0x160)+_0x1a178e+_0x3b9a3e(0x16b)+_0x3c28d9[_0x3b9a3e(0x16a)]+')');if(_0x173617)_0x173617(_0x4c0332,_0xbf92eb,_0x1a178e);const _0x1c2456=await fetchDatasetDoc({'appCode':_0x473316,'cookie':_0x4551fd,'datasetCode':_0x3c28d9[_0x3b9a3e(0x171)],'datasetId':_0x3c28d9['id'],'enableAI':![],'extraParams':_0x13e255}),_0x1c9fab=a0_0x34a6b7[_0x3b9a3e(0x164)](_0x738d38,_0x1a178e+_0x3b9a3e(0x173));writeFileSync(_0x1c9fab,_0x1c2456,{'encoding':_0x3b9a3e(0x174)}),console['log'](_0x3b9a3e(0x168)+_0x1a178e+_0x3b9a3e(0x173)),logger[_0x3b9a3e(0x15c)]('api-doc',_0x3b9a3e(0x166)+_0x1a178e,undefined,{'datasetCode':_0x3c28d9[_0x3b9a3e(0x171)],'datasetName':_0x3c28d9[_0x3b9a3e(0x16a)],'filePath':_0x1c9fab,'progress':_0x4c0332+'/'+_0xbf92eb}),_0x46e4c9[_0x3b9a3e(0x16d)]({'datasetCode':_0x3c28d9[_0x3b9a3e(0x171)],'datasetName':_0x3c28d9[_0x3b9a3e(0x16a)],'filePath':_0x1c9fab,'success':!![]});if(_0x4c0332<_0xbf92eb)await delay(0x1388);}catch(_0xb53119){const _0x2d594b=_0xb53119 instanceof Error?_0xb53119[_0x3b9a3e(0x16f)]:String(_0xb53119);console[_0x3b9a3e(0x165)](_0x3b9a3e(0x15f)+_0x1a178e+_0x3b9a3e(0x16e)+_0x2d594b),logger[_0x3b9a3e(0x175)](_0x3b9a3e(0x162),'Failed\x20to\x20generate\x20docs:\x20'+_0x3c28d9[_0x3b9a3e(0x171)],{'datasetCode':_0x3c28d9[_0x3b9a3e(0x171)],'datasetName':_0x3c28d9[_0x3b9a3e(0x16a)],'error':_0x2d594b,'progress':_0x4c0332+'/'+_0xbf92eb}),_0x46e4c9[_0x3b9a3e(0x16d)]({'datasetCode':_0x3c28d9[_0x3b9a3e(0x171)],'datasetName':_0x3c28d9[_0x3b9a3e(0x16a)],'filePath':'','success':![],'error':_0x2d594b}),_0x4c0332<_0xbf92eb&&(console[_0x3b9a3e(0x165)](_0x3b9a3e(0x159)),await delay(0xbb8));}}return _0x46e4c9;}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x212c2d=a1_0x41df;function a1_0x41df(_0x586d24,_0xa80a2d){_0x586d24=_0x586d24-0x77;const _0x3f5ca6=a1_0x3f5c();let _0x41df49=_0x3f5ca6[_0x586d24];return _0x41df49;}(function(_0x40ec3c,_0x202aaf){const _0x4f08c5=a1_0x41df,_0x1c22b2=_0x40ec3c();while(!![]){try{const _0x3702a9=-parseInt(_0x4f08c5(0x98))/0x1+-parseInt(_0x4f08c5(0x91))/0x2+-parseInt(_0x4f08c5(0x79))/0x3+parseInt(_0x4f08c5(0x9a))/0x4+parseInt(_0x4f08c5(0x94))/0x5*(parseInt(_0x4f08c5(0x87))/0x6)+-parseInt(_0x4f08c5(0x88))/0x7*(-parseInt(_0x4f08c5(0x8c))/0x8)+-parseInt(_0x4f08c5(0x7e))/0x9*(-parseInt(_0x4f08c5(0x8b))/0xa);if(_0x3702a9===_0x202aaf)break;else _0x1c22b2['push'](_0x1c22b2['shift']());}catch(_0x3426){_0x1c22b2['push'](_0x1c22b2['shift']());}}}(a1_0x3f5c,0x76d84));function a1_0x3f5c(){const _0x232574=['some','.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.','API\x20group\x20\x22','outputDir','apiGroup','add','filter','7818rZflfs','7xnDxBg','map','\x22\x20resolves\x20to\x20multiple\x20API\x20directories.','10mMSPLL','1955768EbUwUc','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','join','resolve','API\x20directory\x20\x22','968776aaauLR','cwd','flatMap','1965riebYB','trim','size','set','223522BudJxq','validation','882984WWHaVY','app','Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.','347607qerXsM','values','normalizedApiDir','Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20','get','2999439EsgHbp','push'];a1_0x3f5c=function(){return _0x232574;};return a1_0x3f5c();}import a1_0x59e530 from'node:path';import{CliErrors}from'../errors.js';export function normalizeApiDir(_0x5f11da,_0x2bcde3=process[a1_0x212c2d(0x92)]()){const _0x563eaa=a1_0x212c2d;return a1_0x59e530[_0x563eaa(0x8f)](_0x2bcde3,_0x5f11da);}function normalizedApiGroup(_0x267257){const _0x10a503=a1_0x212c2d,_0x30a1dd=_0x267257?.[_0x10a503(0x95)]();return _0x30a1dd||undefined;}export function resolveApiProfileLayouts(_0x4935e9,_0x6c455f,_0x52b9a9=process[a1_0x212c2d(0x92)]()){const _0x7c110f=a1_0x212c2d,_0x19ac00=_0x4935e9['map'](_0x152548=>{const _0x3b72a1=_0x6c455f(_0x152548);return{'app':_0x152548,'outputDir':_0x3b72a1,'normalizedApiDir':normalizeApiDir(_0x3b72a1,_0x52b9a9),'apiGroup':normalizedApiGroup(_0x152548['apiGroup'])};}),_0xb24559=new Map();for(const _0x458610 of _0x19ac00){if(!_0x458610[_0x7c110f(0x84)])continue;const _0x4204e5=_0xb24559[_0x7c110f(0x7d)](_0x458610[_0x7c110f(0x84)])??new Set();_0x4204e5[_0x7c110f(0x85)](_0x458610['normalizedApiDir']),_0xb24559[_0x7c110f(0x97)](_0x458610['apiGroup'],_0x4204e5);}for(const [_0xd17c17,_0x28809f]of _0xb24559){if(_0x28809f[_0x7c110f(0x96)]>0x1)throw CliErrors[_0x7c110f(0x99)](_0x7c110f(0x82)+_0xd17c17+_0x7c110f(0x8a),_0x7c110f(0x78));}const _0x4b67b3=new Map();for(const _0x239373 of _0x19ac00){const _0x1472ee=_0x4b67b3['get'](_0x239373['normalizedApiDir'])??[];_0x1472ee[_0x7c110f(0x7f)](_0x239373),_0x4b67b3[_0x7c110f(0x97)](_0x239373['normalizedApiDir'],_0x1472ee);}for(const _0x9c7319 of _0x4b67b3[_0x7c110f(0x7a)]()){const _0x208faa=new Set(_0x9c7319[_0x7c110f(0x93)](_0x1f7269=>_0x1f7269[_0x7c110f(0x84)]?[_0x1f7269[_0x7c110f(0x84)]]:[]));if(_0x208faa[_0x7c110f(0x96)]===0x0)continue;if(_0x208faa['size']>0x1||_0x9c7319[_0x7c110f(0x80)](_0x4181db=>!_0x4181db[_0x7c110f(0x84)])){const _0x499b72=_0x9c7319[_0x7c110f(0x89)](_0x7c7477=>_0x7c7477[_0x7c110f(0x77)]['name'])[_0x7c110f(0x8e)](',\x20');throw CliErrors[_0x7c110f(0x99)](_0x7c110f(0x90)+_0x9c7319[0x0][_0x7c110f(0x83)]+_0x7c110f(0x8d),_0x7c110f(0x7c)+_0x499b72+_0x7c110f(0x81));}}return _0x19ac00;}export function getRegistryGroup(_0x479239,_0x5c024f){const _0x14e893=a1_0x212c2d;if(_0x5c024f['apiGroup'])return _0x479239[_0x14e893(0x86)](_0xa717d1=>_0xa717d1[_0x14e893(0x84)]===_0x5c024f[_0x14e893(0x84)]);const _0x5399b6=_0x479239[_0x14e893(0x86)](_0x39c331=>_0x39c331[_0x14e893(0x7b)]===_0x5c024f[_0x14e893(0x7b)]);return _0x5399b6['length']===0x1?_0x5399b6:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a2_0x1a57(_0x365a26,_0x5367d3){_0x365a26=_0x365a26-0x198;var _0x447a1a=a2_0x447a();var _0x1a5760=_0x447a1a[_0x365a26];return _0x1a5760;}(function(_0x58212f,_0x100047){var _0x2042ee=a2_0x1a57,_0x3f874d=_0x58212f();while(!![]){try{var _0x1b4370=parseInt(_0x2042ee(0x1a1))/0x1+parseInt(_0x2042ee(0x19b))/0x2*(parseInt(_0x2042ee(0x19c))/0x3)+parseInt(_0x2042ee(0x198))/0x4+parseInt(_0x2042ee(0x19d))/0x5*(-parseInt(_0x2042ee(0x199))/0x6)+-parseInt(_0x2042ee(0x19f))/0x7*(parseInt(_0x2042ee(0x1a0))/0x8)+-parseInt(_0x2042ee(0x1a3))/0x9*(-parseInt(_0x2042ee(0x19e))/0xa)+-parseInt(_0x2042ee(0x19a))/0xb*(parseInt(_0x2042ee(0x1a2))/0xc);if(_0x1b4370===_0x100047)break;else _0x3f874d['push'](_0x3f874d['shift']());}catch(_0x5072e3){_0x3f874d['push'](_0x3f874d['shift']());}}}(a2_0x447a,0xd1c7d));export{fetchModelList}from'../core/api-client.js';function a2_0x447a(){var _0x17955b=['2554659WURxCu','4101908hUcvKZ','388398MriWBX','788403WDIoYF','2WsCFhJ','3661989OQPfXW','125KEWpWM','20hsFwPH','210889PneTHm','120mmRIkc','258995bcpAeF','24aypdti'];a2_0x447a=function(){return _0x17955b;};return a2_0x447a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x51d064,_0x45ad1e){const _0x1f4fa3=a3_0x3c07,_0x44878f=_0x51d064();while(!![]){try{const _0x3fd826=-parseInt(_0x1f4fa3(0x83))/0x1*(-parseInt(_0x1f4fa3(0x9d))/0x2)+parseInt(_0x1f4fa3(0x92))/0x3+-parseInt(_0x1f4fa3(0xb7))/0x4*(parseInt(_0x1f4fa3(0x90))/0x5)+parseInt(_0x1f4fa3(0xa1))/0x6*(parseInt(_0x1f4fa3(0x82))/0x7)+parseInt(_0x1f4fa3(0x9e))/0x8+-parseInt(_0x1f4fa3(0xa8))/0x9*(parseInt(_0x1f4fa3(0xab))/0xa)+-parseInt(_0x1f4fa3(0xa0))/0xb;if(_0x3fd826===_0x45ad1e)break;else _0x44878f['push'](_0x44878f['shift']());}catch(_0x11a108){_0x44878f['push'](_0x44878f['shift']());}}}(a3_0xeb3e,0xa4ff2));function a3_0x3c07(_0x464f1e,_0x2a744e){_0x464f1e=_0x464f1e-0x7b;const _0xeb3e8b=a3_0xeb3e();let _0x3c07bb=_0xeb3e8b[_0x464f1e];return _0x3c07bb;}import a3_0x5cbb88 from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x4c4ee5 from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';import{generateSdkConfigFile}from'../api/generate-sdk-config-file.js';import{MODEL_REGISTRY_FILE_NAME,MODEL_RUNTIME_FILE_NAME,updateModelRegistry}from'../api/model-registry-file.js';import{renderModelRegistryScaffold}from'../api/model-registry-scaffold.js';function fileAction(_0x56ee09,_0x5e620b){const _0x485378=a3_0x3c07;if(!_0x5e620b)return _0x56ee09?'preserved':_0x485378(0xa4);return _0x56ee09?'overwritten':'created';}export async function generateApiFile(_0x41f6ba,_0x30e846,_0x217c43,_0x1ee011,_0xa6538f,_0x2698ac,_0x37797a,_0x1b6129={},_0x306686={}){const _0x8ced44=a3_0x3c07;if(!_0x217c43)throw new Error(_0x8ced44(0x80)+CLI_BIN_NAME+'\x20config\x20set\x20app\x20<value>`');const _0x519092=_0x1ee011&&!_0x37797a,_0x7362bc=!!_0x306686[_0x8ced44(0xaf)],_0x480431=_0x7362bc||_0x519092,_0x2c6522=_0x37797a||_0x217c43,_0x15657b=_0x7362bc||_0x519092?_0x8ced44(0x97):_0x2c6522,_0x5eaed0=_0x7362bc||_0x519092?_0x8ced44(0x8b):JSON[_0x8ced44(0x7f)](_0x2c6522),_0x365948=!isProduction(_0xa6538f),_0x2b195a=_0x365948?_0x8ced44(0x98)+JSON[_0x8ced44(0x7f)](_0xa6538f):'',_0x1e6167='{\x20apiConfigName:\x20'+_0x5eaed0+_0x2b195a+_0x8ced44(0xa9),_0x18d653=_0x7362bc?'':_0x30e846,_0x2f5c05=_0x18d653?_0x18d653+_0x8ced44(0x89):_0x8ced44(0x8f),_0x3acb6f=_0x18d653?_0x18d653+_0x8ced44(0x8c):'client',_0x579ea5=_0x18d653&&!/^app-[a-f0-9]+$/i[_0x8ced44(0xa5)](_0x18d653)?_0x18d653[_0x8ced44(0x9f)](/-/g,'_')[_0x8ced44(0x7c)]():_0x8ced44(0x93),_0x3737e3=/^\d/['test'](_0x579ea5)?_0x8ced44(0xb1)+_0x579ea5:_0x579ea5,_0x555e4d=_0x41f6ba[_0x8ced44(0xa7)](_0x197727=>({'datasetCode':_0x197727[_0x8ced44(0x7e)],'tableName':_0x197727[_0x8ced44(0xac)],'name':_0x197727[_0x8ced44(0x94)]||'','alias':_0x197727[_0x8ced44(0x9a)]||_0x197727[_0x8ced44(0xa3)]})),_0x4085e2=fileURLToPath(import.meta.url),_0x5f1167=a3_0x4c4ee5[_0x8ced44(0xb4)](a3_0x4c4ee5[_0x8ced44(0xb3)](_0x4085e2),_0x8ced44(0x99)),_0x3164d4=a3_0x4c4ee5[_0x8ced44(0x87)](_0x5f1167,_0x8ced44(0xad)),_0x5aa792=a3_0x4c4ee5[_0x8ced44(0x87)](_0x3164d4,_0x8ced44(0x7d)),_0x20df0d=a3_0x4c4ee5[_0x8ced44(0x87)](_0x3164d4,'client.ts.tpl'),_0x5936d6=_0x2698ac;mkdirSync(_0x5936d6,{'recursive':!![]});const _0x117bf7=_0x7362bc?{}:_0x1b6129,_0x124d16=await generateSdkConfigFile(_0x5936d6,_0x117bf7,_0x18d653),_0x184500=a3_0x4c4ee5[_0x8ced44(0x7b)](_0x124d16,'.ts'),_0x13493e=a3_0x4c4ee5[_0x8ced44(0x87)](_0x5936d6,_0x2f5c05+_0x8ced44(0x85)),_0x775e40=a3_0x4c4ee5[_0x8ced44(0x87)](_0x5936d6,_0x3acb6f+_0x8ced44(0x85)),_0xc78f17=_0x306686['overwriteTypescript']===!![],_0x3f1823=existsSync(_0x13493e),_0x213370=existsSync(_0x775e40),_0x599fd2=_0x306686['scaffoldMode']??(_0xc78f17?_0x8ced44(0x9f):_0x8ced44(0xa4)),_0x14bb11=_0x599fd2===_0x8ced44(0x9f)||_0x599fd2===_0x8ced44(0xa4)&&!_0x3f1823,_0x3fae6d=_0x599fd2===_0x8ced44(0x9f)||_0x599fd2===_0x8ced44(0xa4)&&!_0x213370,_0x33978c=_0x306686[_0x8ced44(0xaf)]?updateModelRegistry({'outputDir':_0x5936d6,'profileName':_0x306686[_0x8ced44(0xaf)]['name'],'defaultProfile':_0x306686[_0x8ced44(0xaf)][_0x8ced44(0xae)],'appCode':_0x217c43,'runtimeDomain':_0x306686[_0x8ced44(0xaf)]['runtimeDomain'],'models':_0x555e4d,'allowEmptyReplacement':_0x306686[_0x8ced44(0x9c)]===!![]}):undefined,_0x322635=_0x33978c?a3_0x4c4ee5['join'](_0x5936d6,MODEL_RUNTIME_FILE_NAME):undefined,_0x4139ce=_0x322635?existsSync(_0x322635):![],_0x5d00e0=_0x7362bc&&_0x599fd2!=='none'?await renderModelRegistryScaffold(_0x5936d6):undefined;_0x322635&&_0x5d00e0&&writeFileSync(_0x322635,_0x5d00e0[_0x8ced44(0xa6)],_0x8ced44(0x9b));const _0x450111=_0x555e4d[0x0]?.[_0x8ced44(0x9a)];if(_0x14bb11){const _0x1f21cb=_0x5d00e0?.[_0x8ced44(0x8f)]??readFileSync(_0x5aa792,_0x8ced44(0x9b)),_0x1f9a74=_0x7362bc?_0x1f21cb:TemplateReplacer['replaceApiContent'](_0x1f21cb,_0x217c43,_0x555e4d,_0x450111,_0x2f5c05,_0x5eaed0,undefined,_0x3737e3);writeFileSync(_0x13493e,await a3_0x5cbb88[_0x8ced44(0x86)](_0x1f9a74,{'parser':'typescript'}),{'encoding':'utf8'});}if(_0x3fae6d){const _0x2378ad=_0x5d00e0?.[_0x8ced44(0x91)]??readFileSync(_0x20df0d,_0x8ced44(0x9b)),_0x135810=_0x7362bc?_0x2378ad:TemplateReplacer[_0x8ced44(0x96)](_0x2378ad,_0x217c43,_0x555e4d,_0x450111,_0x2f5c05,_0x5eaed0,_0x1e6167,_0x3737e3,_0x184500);writeFileSync(_0x775e40,await a3_0x5cbb88[_0x8ced44(0x86)](_0x135810,{'parser':_0x8ced44(0x95)}),{'encoding':_0x8ced44(0x9b)});}const _0x24ebed=_0x555e4d['length'],_0x333743={'api':{'path':_0x13493e,'action':fileAction(_0x3f1823,_0x14bb11)},'client':{'path':_0x775e40,'action':fileAction(_0x213370,_0x3fae6d)},'sdkConfig':{'path':_0x124d16,'action':'refreshed'},..._0x33978c?{'modelRegistry':{'path':_0x33978c[_0x8ced44(0x8e)],'action':_0x33978c[_0x8ced44(0x81)]?'refreshed':'created'},'modelRuntime':{'path':_0x322635,'action':_0x5d00e0?_0x4139ce?'refreshed':_0x8ced44(0xb2):_0x4139ce?_0x8ced44(0x84):_0x8ced44(0xa4)}}:{}},_0x213d00=existsSync(_0x13493e)&&readFileSync(_0x13493e,_0x8ced44(0x9b))[_0x8ced44(0xb0)](MODEL_REGISTRY_FILE_NAME[_0x8ced44(0x9f)](_0x8ced44(0x85),'')),_0x20f762=existsSync(_0x775e40)&&readFileSync(_0x775e40,_0x8ced44(0x9b))['includes'](_0x8ced44(0x8a)),_0x1b22fd=_0x7362bc?!_0x213d00||!_0x20f762||!existsSync(_0x322635):![],_0x194d1a=_0x7362bc?_0x1b22fd:_0x333743[_0x8ced44(0x8f)][_0x8ced44(0x88)]===_0x8ced44(0x84)||_0x333743[_0x8ced44(0x91)]['action']===_0x8ced44(0x84);return logger[_0x8ced44(0xb5)](_0x8ced44(0xb6),_0x194d1a?a3_0x4c4ee5['basename'](_0x124d16)+_0x8ced44(0xaa):_0x7362bc?_0x8ced44(0xa2):_0x8ced44(0x8d),undefined,{'apiFile':_0x13493e,'clientFile':_0x775e40,'sdkConfig':_0x124d16,'modelCount':_0x24ebed,'configName':_0x15657b,'isDefaultConfig':_0x480431,'needsAgentMerge':_0x194d1a,'needsProjectUpgrade':_0x1b22fd,'files':_0x333743}),{'appCode':_0x217c43,'modelCount':_0x24ebed,'models':_0x555e4d,'apiFilePath':_0x13493e,'clientFilePath':_0x775e40,'sdkConfigPath':_0x124d16,'modelRegistryPath':_0x33978c?.['path'],'modelRuntimePath':_0x322635,'modelProfile':_0x306686[_0x8ced44(0xaf)]?.[_0x8ced44(0x94)],'configName':_0x15657b,'isDefaultConfig':_0x480431,'sdkRouting':_0x117bf7,'files':_0x333743,'needsAgentMerge':_0x194d1a,'needsProjectUpgrade':_0x1b22fd};}function a3_0xeb3e(){const _0x120b67=['271299RqPYMc','preserved','.ts','format','join','action','-api','LOVRABET_RUNTIME_DOMAIN','CONFIG_NAMES.DEFAULT','-client','API\x20scaffold\x20written.','path','api','4596370bHHkaI','client','2323770exWLII','LOVRABET','name','typescript','replaceApiContent','default',',\x20env:\x20','../..','alias','utf8','allowEmptyModelReplacement','2KftcKO','5883248UJxZus','replace','1808532Zocuvm','1912284zNSIZL','Model\x20facts\x20refreshed.','key','missing','test','modelRuntime','map','1760265sXTcNY',',\x20...LOVRABET_SDK_CONFIG\x20}','\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.','50lUyGII','tableName','templates/generate-api','defaultName','modelProfile','includes','APP_','created','dirname','resolve','success','init-api','4NAVKeN','basename','toUpperCase','api.ts.tpl','datasetCode','stringify','Please\x20configure\x20app\x20code\x20first\x20via\x20`','existed','21NxdsQT'];a3_0xeb3e=function(){return _0x120b67;};return a3_0xeb3e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0xa8df32=a4_0x12d1;function a4_0x12d1(_0x2a0018,_0x1f724e){_0x2a0018=_0x2a0018-0x1f3;const _0x4ad775=a4_0x4ad7();let _0x12d1b3=_0x4ad775[_0x2a0018];return _0x12d1b3;}(function(_0x105e25,_0x1aa84c){const _0x4e9a38=a4_0x12d1,_0x597dd6=_0x105e25();while(!![]){try{const _0x1579ed=-parseInt(_0x4e9a38(0x201))/0x1+-parseInt(_0x4e9a38(0x1fb))/0x2*(parseInt(_0x4e9a38(0x20b))/0x3)+parseInt(_0x4e9a38(0x209))/0x4+parseInt(_0x4e9a38(0x200))/0x5+-parseInt(_0x4e9a38(0x203))/0x6+-parseInt(_0x4e9a38(0x1ff))/0x7*(parseInt(_0x4e9a38(0x205))/0x8)+parseInt(_0x4e9a38(0x1f9))/0x9*(parseInt(_0x4e9a38(0x208))/0xa);if(_0x1579ed===_0x1aa84c)break;else _0x597dd6['push'](_0x597dd6['shift']());}catch(_0x5be862){_0x597dd6['push'](_0x597dd6['shift']());}}}(a4_0x4ad7,0x8e092));import{mkdirSync,writeFileSync}from'node:fs';import a4_0x25bac2 from'node:path';import a4_0x1e54f9 from'prettier';export const SDK_CONFIG_FILE_NAME=a4_0xa8df32(0x202);function a4_0x4ad7(){const _0x122743=['6507186HsEOuQ','4244460aXENxQ','969076WWDJgB','sdk-config.ts','403524DWTxyc','runtimeDomain','8mKuCQK','\x20as\x20const;\x0a',',\x0a\x20\x20','1428720aaqiqW','4506932nPDIWb','join','51lnjOTy','-sdk-config.ts','runtimeDomain:\x20','length','utf8','format','stringify','108sLjLpG','{\x0a\x20\x20','134398JKVocB','typescript','push',',\x0a}'];a4_0x4ad7=function(){return _0x122743;};return a4_0x4ad7();}export function getSdkConfigFileName(_0x1ae9b8=''){const _0x2bc839=a4_0xa8df32;return _0x1ae9b8?_0x1ae9b8+_0x2bc839(0x1f3):SDK_CONFIG_FILE_NAME;}export async function generateSdkConfigFile(_0x89a5e6,_0x73bbcc={},_0x4965da=''){const _0x1e8eb3=a4_0xa8df32,_0x3f9b93=[];_0x73bbcc[_0x1e8eb3(0x204)]&&_0x3f9b93[_0x1e8eb3(0x1fd)](_0x1e8eb3(0x1f4)+JSON[_0x1e8eb3(0x1f8)](_0x73bbcc[_0x1e8eb3(0x204)]));const _0x2290f5=_0x3f9b93[_0x1e8eb3(0x1f5)]>0x0?_0x1e8eb3(0x1fa)+_0x3f9b93[_0x1e8eb3(0x20a)](_0x1e8eb3(0x207))+_0x1e8eb3(0x1fe):'{}',_0x36fc6d='/**\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'+_0x2290f5+_0x1e8eb3(0x206);mkdirSync(_0x89a5e6,{'recursive':!![]});const _0x4c7ec5=a4_0x25bac2['join'](_0x89a5e6,getSdkConfigFileName(_0x4965da));return writeFileSync(_0x4c7ec5,await a4_0x1e54f9[_0x1e8eb3(0x1f7)](_0x36fc6d,{'parser':_0x1e8eb3(0x1fc)}),_0x1e8eb3(0x1f6)),_0x4c7ec5;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a5_0x31fa(_0x3e3220,_0x563e78){_0x3e3220=_0x3e3220-0x18d;const _0x471ef1=a5_0x471e();let _0x31fa94=_0x471ef1[_0x3e3220];return _0x31fa94;}(function(_0x550210,_0x2dda71){const _0x37f3fc=a5_0x31fa,_0x249934=_0x550210();while(!![]){try{const _0x1de253=-parseInt(_0x37f3fc(0x195))/0x1+parseInt(_0x37f3fc(0x19a))/0x2*(-parseInt(_0x37f3fc(0x191))/0x3)+-parseInt(_0x37f3fc(0x18e))/0x4*(-parseInt(_0x37f3fc(0x1a4))/0x5)+parseInt(_0x37f3fc(0x1a3))/0x6*(parseInt(_0x37f3fc(0x19d))/0x7)+-parseInt(_0x37f3fc(0x19f))/0x8*(parseInt(_0x37f3fc(0x19c))/0x9)+parseInt(_0x37f3fc(0x193))/0xa*(-parseInt(_0x37f3fc(0x18d))/0xb)+parseInt(_0x37f3fc(0x19e))/0xc*(parseInt(_0x37f3fc(0x1a0))/0xd);if(_0x1de253===_0x2dda71)break;else _0x249934['push'](_0x249934['shift']());}catch(_0x1aed0f){_0x249934['push'](_0x249934['shift']());}}}(a5_0x471e,0x8ad88));function a5_0x471e(){const _0x3aa08d=['11HJBVCl','1422712EypXUG','Generated\x20by\x20Rabetbase\x20CLI','replace','3mlfSUb','APP_CODE','3121840purmpn','@lovrabet/sdk','175847TjocCT','some','length','test','push','1951622JjghJK','match','9hSaqla','3796009ggyKOo','14920332WHLeKw','870176ANrjSx','13nDaUyK','MODELS_CONFIG','includes','6lxTAni','5smJsOL','matchAll','lovrabetClient','map'];a5_0x471e=function(){return _0x3aa08d;};return a5_0x471e();}export function parseLegacyApiModels(_0x404535){const _0x280257=a5_0x31fa,_0x180d0f=[],_0xefd35=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x34978f;while((_0x34978f=_0xefd35['exec'](_0x404535))!==null){_0x180d0f[_0x280257(0x199)]({'datasetCode':_0x34978f[0x1],'tableName':_0x34978f[0x2],'name':_0x34978f[0x3],'alias':_0x34978f[0x4]});}return _0x180d0f;}export function parseLegacyApiAppCode(_0x95ce70){const _0xe3b630=a5_0x31fa;return _0x95ce70[_0xe3b630(0x19b)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function stripComments(_0x25e7b3){const _0x35bb48=a5_0x31fa;return _0x25e7b3[_0x35bb48(0x190)](/\/\*[\s\S]*?\*\//g,'')[_0x35bb48(0x190)](/\/\/.*$/gm,'');}export function isLegacyGeneratedApiScaffold(_0x17882d){const _0x1a454d=a5_0x31fa;if(!_0x17882d[_0x1a454d(0x1a2)]('Generated\x20by\x20Rabetbase\x20CLI'))return![];const _0x396fa5=stripComments(_0x17882d),_0x54d476=[..._0x396fa5[_0x1a454d(0x1a5)](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)][_0x1a454d(0x1a7)](_0x3069f4=>_0x3069f4[0x1]);if(_0x54d476[_0x1a454d(0x197)]!==0x1||_0x54d476[0x0]!==_0x1a454d(0x194))return![];const _0x4d6386=[..._0x396fa5[_0x1a454d(0x1a5)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)]['map'](_0x471ded=>_0x471ded[0x1]);if(_0x4d6386['length']!==0x2||!_0x4d6386[_0x1a454d(0x196)](_0x52dd81=>_0x52dd81['endsWith'](_0x1a454d(0x192)))||!_0x4d6386[_0x1a454d(0x196)](_0x5d94bb=>_0x5d94bb['endsWith'](_0x1a454d(0x1a1))))return![];const _0x33f8d1=[..._0x396fa5[_0x1a454d(0x1a5)](/^([A-Za-z_$][\w$]*)\s*\(/gm)]['map'](_0x3ccbca=>_0x3ccbca[0x1]);return _0x33f8d1['length']===0x1&&_0x33f8d1[0x0]==='registerModels';}export function isLegacyGeneratedClientScaffold(_0x22fa24){const _0x132d6c=a5_0x31fa;if(!_0x22fa24['includes'](_0x132d6c(0x18f)))return![];const _0x387de5=stripComments(_0x22fa24),_0x5ec9ee=[..._0x387de5[_0x132d6c(0x1a5)](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)][_0x132d6c(0x1a7)](_0x4197c0=>_0x4197c0[0x1]);if(_0x5ec9ee[_0x132d6c(0x196)](_0x52d6cb=>_0x52d6cb!==_0x132d6c(0x194)&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/[_0x132d6c(0x198)](_0x52d6cb??'')))return![];const _0x392b64=[..._0x387de5[_0x132d6c(0x1a5)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x132d6c(0x1a7)](_0x1e18c5=>_0x1e18c5[0x1]);return _0x392b64[_0x132d6c(0x197)]===0x1&&_0x392b64[0x0]===_0x132d6c(0x1a6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x3eb05c=a6_0x4460;(function(_0x429819,_0x43e739){const _0x2b8aa0=a6_0x4460,_0x4b0081=_0x429819();while(!![]){try{const _0x2cc59a=-parseInt(_0x2b8aa0(0x192))/0x1+parseInt(_0x2b8aa0(0x19c))/0x2+-parseInt(_0x2b8aa0(0x179))/0x3*(parseInt(_0x2b8aa0(0x191))/0x4)+-parseInt(_0x2b8aa0(0x177))/0x5*(-parseInt(_0x2b8aa0(0x178))/0x6)+-parseInt(_0x2b8aa0(0x19f))/0x7+parseInt(_0x2b8aa0(0x1b9))/0x8*(parseInt(_0x2b8aa0(0x176))/0x9)+parseInt(_0x2b8aa0(0x1b7))/0xa;if(_0x2cc59a===_0x43e739)break;else _0x4b0081['push'](_0x4b0081['shift']());}catch(_0x3a9077){_0x4b0081['push'](_0x4b0081['shift']());}}}(a6_0x20b0,0x2e806));function a6_0x20b0(){const _0x27ae50=['pid','1084503GftItq','isArray','entries','Table\x20\x22','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','/*\x20rabetbase-model-registry:v2\x20*/','push','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','\x22\x20maps\x20to\x20alias\x20\x22','values','replace','\x22\x20and\x20\x22','\x22\x20in\x20profile\x20\x22','lovrabet-model-registry/v1','length','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','profileName','datasetCodes','.tmp','join','name','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','now','fromEntries','6004640qaidvf','split','2096vtWwzQ','test','models.generated.ts','\x22\x20with\x20an\x20empty\x20result.\x20','map','filter','1710hcFDxc','10XHBLET','4626dwwhNA','3426UvNIFt','tableName','datasetCode','\x22\x20maps\x20to\x20both\x20\x22','runtimeDomain','defaultProfile','/*\x20rabetbase-model-registry:start\x20*/','get','NOT-SET','Refusing\x20to\x20replace\x20','indexOf','keys','parse','flatMap','key','object','outputDir','models','\x22\x20maps\x20to\x20table\x20\x22','slice','profiles','Model\x20alias\x20\x22','every','appCode','572nzqFMM','350654KjcqzD','utf8','string','protocol','value','alias','stringify','set','find','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','415146ZTdyWx','\x20model(s)\x20in\x20profile\x20\x22'];a6_0x20b0=function(){return _0x27ae50;};return a6_0x20b0();}import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x5074d0 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x3eb05c(0x172);export const MODEL_RUNTIME_FILE_NAME='model-runtime.ts';export const MODEL_REGISTRY_VERSION_MARKER=a6_0x3eb05c(0x1a4);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL='lovrabet-model-registry/v2',REGISTRY_START=a6_0x3eb05c(0x17f),REGISTRY_END='/*\x20rabetbase-model-registry:end\x20*/';function emptyRegistry(_0x40ef46){return{'defaultProfile':_0x40ef46,'profiles':{},'models':[]};}function extractRegistryJson(_0x304e29){const _0x3d97b1=a6_0x3eb05c,_0x53c504=_0x304e29['indexOf'](REGISTRY_START),_0x55ee38=_0x304e29[_0x3d97b1(0x183)](REGISTRY_END);if(_0x53c504<0x0||_0x55ee38<=_0x53c504)return undefined;return _0x304e29[_0x3d97b1(0x18c)](_0x53c504+REGISTRY_START[_0x3d97b1(0x1ad)],_0x55ee38)['trim']()['replace'](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x3d97b1(0x1a9)](/;$/,'');}function migrateLegacyRegistry(_0x132c73){const _0x591656=a6_0x3eb05c,_0x19aa20=emptyRegistry(_0x132c73['defaultProfile']);for(const [_0xdc0233,_0x3492c1]of Object[_0x591656(0x1a1)](_0x132c73['profiles'])){_0x19aa20['profiles'][_0xdc0233]={'appCode':_0x3492c1[_0x591656(0x190)],'runtimeDomain':_0x3492c1[_0x591656(0x17d)]},mergeProfileModels(_0x19aa20,_0xdc0233,_0x3492c1[_0x591656(0x18a)]);}return _0x19aa20;}function generatedObjectLiteralToJson(_0x4151fc){const _0x361465=a6_0x3eb05c;let _0x4defbc='',_0x4fc2c1,_0x32a6ce=![],_0x4c908f;for(let _0x27bef4=0x0;_0x27bef4<_0x4151fc[_0x361465(0x1ad)];_0x27bef4++){const _0x268078=_0x4151fc[_0x27bef4];if(_0x4fc2c1){_0x4defbc+=_0x268078;if(_0x32a6ce)_0x32a6ce=![];else{if(_0x268078==='\x5c')_0x32a6ce=!![];else{if(_0x268078===_0x4fc2c1)_0x4fc2c1=undefined;}}continue;}if(_0x268078==='\x22'){_0x4fc2c1=_0x268078,_0x4defbc+=_0x268078,_0x4c908f=_0x361465(0x196);continue;}if(_0x268078===','){let _0xe164f6=_0x27bef4+0x1;while(/\s/[_0x361465(0x171)](_0x4151fc[_0xe164f6]??''))_0xe164f6++;if(_0x4151fc[_0xe164f6]==='}'||_0x4151fc[_0xe164f6]===']')continue;_0x4defbc+=_0x268078,_0x4c908f=',';continue;}if(_0x268078==='{'||_0x268078==='['){_0x4defbc+=_0x268078,_0x4c908f=_0x268078;continue;}if(_0x268078==='}'||_0x268078===']'){_0x4defbc+=_0x268078,_0x4c908f=_0x268078;continue;}if((_0x4c908f==='{'||_0x4c908f===',')&&/[A-Za-z_$]/[_0x361465(0x171)](_0x268078)){let _0x5b8e14=_0x27bef4+0x1;while(/[A-Za-z0-9_$]/['test'](_0x4151fc[_0x5b8e14]??''))_0x5b8e14++;let _0x2cdba4=_0x5b8e14;while(/\s/[_0x361465(0x171)](_0x4151fc[_0x2cdba4]??''))_0x2cdba4++;if(_0x4151fc[_0x2cdba4]===':'){_0x4defbc+=JSON[_0x361465(0x198)](_0x4151fc[_0x361465(0x18c)](_0x27bef4,_0x5b8e14)),_0x27bef4=_0x5b8e14-0x1,_0x4c908f=_0x361465(0x187);continue;}}_0x4defbc+=_0x268078;if(!/\s/[_0x361465(0x171)](_0x268078)&&_0x268078!==':')_0x4c908f=_0x361465(0x196);}return _0x4defbc;}function parseGeneratedRegistryJson(_0x1927cc){const _0xd00c9e=a6_0x3eb05c;try{return JSON['parse'](_0x1927cc);}catch{return JSON[_0xd00c9e(0x185)](generatedObjectLiteralToJson(_0x1927cc));}}function normalizeModelEntries(_0xcf7741,_0x2ece73){const _0x28b1f9=a6_0x3eb05c,_0x487ee0=Object[_0x28b1f9(0x184)](_0xcf7741),_0x4a9617=[];for(const _0x583527 of _0x2ece73){if(!_0x583527||typeof _0x583527!==_0x28b1f9(0x188)||Array[_0x28b1f9(0x1a0)](_0x583527))return undefined;const _0x120ba0=_0x583527;if(typeof _0x120ba0['alias']!==_0x28b1f9(0x194)||typeof _0x120ba0['tableName']!==_0x28b1f9(0x194)||typeof _0x120ba0[_0x28b1f9(0x1b3)]!=='string')return undefined;let _0x2b4a35;if(typeof _0x120ba0[_0x28b1f9(0x17b)]==='string'&&_0x120ba0[_0x28b1f9(0x1b0)]===undefined)_0x2b4a35=Object[_0x28b1f9(0x1b6)](_0x487ee0[_0x28b1f9(0x174)](_0x2566dc=>[_0x2566dc,_0x120ba0[_0x28b1f9(0x17b)]]));else{if(_0x120ba0[_0x28b1f9(0x17b)]===undefined&&_0x120ba0['datasetCodes']&&typeof _0x120ba0['datasetCodes']==='object'&&!Array[_0x28b1f9(0x1a0)](_0x120ba0[_0x28b1f9(0x1b0)])&&Object[_0x28b1f9(0x1a8)](_0x120ba0[_0x28b1f9(0x1b0)])[_0x28b1f9(0x18f)](_0x22a56e=>typeof _0x22a56e===_0x28b1f9(0x194)))_0x2b4a35={..._0x120ba0[_0x28b1f9(0x1b0)]};else return undefined;}_0x4a9617[_0x28b1f9(0x1a5)]({'alias':_0x120ba0[_0x28b1f9(0x197)],'tableName':_0x120ba0[_0x28b1f9(0x17a)],'name':_0x120ba0[_0x28b1f9(0x1b3)],'datasetCodes':_0x2b4a35});}return _0x4a9617;}function a6_0x4460(_0x20532c,_0x33a97e){_0x20532c=_0x20532c-0x171;const _0x20b0c9=a6_0x20b0();let _0x446050=_0x20b0c9[_0x20532c];return _0x446050;}export function parseModelRegistry(_0x175891){const _0x1b8986=a6_0x3eb05c,_0x2feafe=extractRegistryJson(_0x175891);if(!_0x2feafe)return undefined;try{const _0x16d3ec=parseGeneratedRegistryJson(_0x2feafe);if(typeof _0x16d3ec[_0x1b8986(0x17e)]!==_0x1b8986(0x194)||!_0x16d3ec[_0x1b8986(0x18d)]||typeof _0x16d3ec[_0x1b8986(0x18d)]!==_0x1b8986(0x188))return undefined;if(_0x16d3ec['protocol']===_0x1b8986(0x1ac))return migrateLegacyRegistry(_0x16d3ec);if(!(_0x16d3ec[_0x1b8986(0x195)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x16d3ec['protocol']===undefined&&_0x175891['includes'](MODEL_REGISTRY_VERSION_MARKER))||!Array['isArray'](_0x16d3ec[_0x1b8986(0x18a)]))return undefined;const _0x5745a4=_0x16d3ec[_0x1b8986(0x18d)],_0x45e3e0=normalizeModelEntries(_0x5745a4,_0x16d3ec[_0x1b8986(0x18a)]);if(!_0x45e3e0)return undefined;return{'defaultProfile':_0x16d3ec[_0x1b8986(0x17e)],'profiles':_0x5745a4,'models':_0x45e3e0};}catch{return undefined;}}export function readModelRegistry(_0x22c8d9){if(!existsSync(_0x22c8d9))return undefined;try{return parseModelRegistry(readFileSync(_0x22c8d9,'utf8'));}catch{return undefined;}}function registrySource(_0x832eb4){const _0x19adc2=a6_0x3eb05c,_0x1ccf6d=Object[_0x19adc2(0x184)](_0x832eb4['profiles']),_0x7cd4ec=_0x832eb4['models']['map'](_0x5b84da=>{const _0x1e43bd=_0x19adc2,_0x1d625d=_0x1ccf6d[_0x1e43bd(0x174)](_0x2b7acb=>_0x5b84da[_0x1e43bd(0x1b0)][_0x2b7acb]),_0x4909dc=_0x1d625d[0x0],_0xf65233=_0x4909dc!==undefined&&_0x1d625d[_0x1e43bd(0x18f)](_0xc89191=>_0xc89191===_0x4909dc),_0x3c98c3={'alias':_0x5b84da[_0x1e43bd(0x197)],'tableName':_0x5b84da[_0x1e43bd(0x17a)],'name':_0x5b84da[_0x1e43bd(0x1b3)]};return _0xf65233?{..._0x3c98c3,'datasetCode':_0x4909dc}:{..._0x3c98c3,'datasetCodes':_0x5b84da[_0x1e43bd(0x1b0)]};}),_0x33d2a6=JSON['stringify']({'defaultProfile':_0x832eb4[_0x19adc2(0x17e)],'profiles':_0x832eb4['profiles'],'models':_0x7cd4ec},null,0x2)[_0x19adc2(0x1b8)]('\x0a')[_0x19adc2(0x174)](_0xc59896=>'\x20\x20'+_0xc59896)[_0x19adc2(0x1b2)]('\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+_0x19adc2(0x19b)+REGISTRY_START+'\x0a'+_0x33d2a6+_0x19adc2(0x1ae)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x451c75,_0x20433f,_0x5d5b89){const _0x11d5a6=a6_0x3eb05c,_0x3f1940=_0x5d5b89[_0x11d5a6(0x174)](_0x373434=>({..._0x373434,'alias':_0x373434[_0x11d5a6(0x197)]||_0x373434['tableName']})),_0x257d88=new Map(),_0x2ca01b=new Map();for(const _0x10a50c of _0x3f1940){const _0x2deb8c=_0x257d88[_0x11d5a6(0x180)](_0x10a50c['alias']);if(_0x2deb8c&&_0x2deb8c!==_0x10a50c[_0x11d5a6(0x17a)])throw new Error(_0x11d5a6(0x18e)+_0x10a50c[_0x11d5a6(0x197)]+_0x11d5a6(0x17c)+_0x2deb8c+_0x11d5a6(0x1aa)+_0x10a50c[_0x11d5a6(0x17a)]+_0x11d5a6(0x1ab)+_0x20433f+'\x22.');const _0x19a147=_0x2ca01b[_0x11d5a6(0x180)](_0x10a50c['tableName']);if(_0x19a147&&_0x19a147!==_0x10a50c[_0x11d5a6(0x197)])throw new Error('Table\x20\x22'+_0x10a50c['tableName']+_0x11d5a6(0x1b4)+_0x19a147+_0x11d5a6(0x1aa)+_0x10a50c[_0x11d5a6(0x197)]+_0x11d5a6(0x1ab)+_0x20433f+'\x22.');_0x257d88[_0x11d5a6(0x199)](_0x10a50c['alias'],_0x10a50c['tableName']),_0x2ca01b[_0x11d5a6(0x199)](_0x10a50c[_0x11d5a6(0x17a)],_0x10a50c[_0x11d5a6(0x197)]);const _0x39b343=_0x451c75[_0x11d5a6(0x18a)][_0x11d5a6(0x19a)](_0x4b3d6b=>_0x4b3d6b['alias']===_0x10a50c['alias']);if(_0x39b343&&_0x39b343['tableName']!==_0x10a50c[_0x11d5a6(0x17a)])throw new Error(_0x11d5a6(0x18e)+_0x10a50c[_0x11d5a6(0x197)]+_0x11d5a6(0x18b)+_0x39b343[_0x11d5a6(0x17a)]+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x10a50c[_0x11d5a6(0x17a)]+_0x11d5a6(0x1ab)+_0x20433f+'\x22.');const _0x166ecd=_0x451c75['models'][_0x11d5a6(0x19a)](_0x5292d3=>_0x5292d3[_0x11d5a6(0x17a)]===_0x10a50c[_0x11d5a6(0x17a)]);if(_0x166ecd&&_0x166ecd[_0x11d5a6(0x197)]!==_0x10a50c['alias'])throw new Error(_0x11d5a6(0x1a2)+_0x10a50c[_0x11d5a6(0x17a)]+_0x11d5a6(0x1a7)+_0x166ecd['alias']+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x10a50c['alias']+'\x22\x20in\x20profile\x20\x22'+_0x20433f+'\x22.');}for(const _0x19b824 of _0x451c75[_0x11d5a6(0x18a)]){delete _0x19b824[_0x11d5a6(0x1b0)][_0x20433f];}for(const _0x9ef8b6 of _0x3f1940){let _0x2bf0f8=_0x451c75['models']['find'](_0x2d6a25=>_0x2d6a25[_0x11d5a6(0x197)]===_0x9ef8b6[_0x11d5a6(0x197)]);!_0x2bf0f8&&(_0x2bf0f8={'alias':_0x9ef8b6[_0x11d5a6(0x197)],'tableName':_0x9ef8b6[_0x11d5a6(0x17a)],'name':_0x9ef8b6[_0x11d5a6(0x1b3)],'datasetCodes':{}},_0x451c75[_0x11d5a6(0x18a)][_0x11d5a6(0x1a5)](_0x2bf0f8)),(_0x20433f===_0x451c75['defaultProfile']||!_0x2bf0f8['datasetCodes'][_0x451c75[_0x11d5a6(0x17e)]])&&(_0x2bf0f8['alias']=_0x9ef8b6['alias'],_0x2bf0f8[_0x11d5a6(0x17a)]=_0x9ef8b6[_0x11d5a6(0x17a)],_0x2bf0f8['name']=_0x9ef8b6[_0x11d5a6(0x1b3)]),_0x2bf0f8[_0x11d5a6(0x1b0)][_0x20433f]=_0x9ef8b6['datasetCode'];}_0x451c75[_0x11d5a6(0x18a)]=_0x451c75[_0x11d5a6(0x18a)][_0x11d5a6(0x175)](_0x396239=>Object[_0x11d5a6(0x184)](_0x396239[_0x11d5a6(0x1b0)])[_0x11d5a6(0x1ad)]>0x0);}function removeUnboundProfiles(_0x24892a){const _0x45dcec=a6_0x3eb05c,_0x2f7c3f=Object[_0x45dcec(0x1a1)](_0x24892a[_0x45dcec(0x18d)])[_0x45dcec(0x175)](([,_0x2bed93])=>_0x2bed93[_0x45dcec(0x190)]===_0x45dcec(0x181))[_0x45dcec(0x174)](([_0x40fe36])=>_0x40fe36);if(_0x2f7c3f[_0x45dcec(0x1ad)]===0x0)return;for(const _0x59de95 of _0x2f7c3f){delete _0x24892a['profiles'][_0x59de95];for(const _0x4c90dd of _0x24892a[_0x45dcec(0x18a)]){delete _0x4c90dd[_0x45dcec(0x1b0)][_0x59de95];}}_0x24892a[_0x45dcec(0x18a)]=_0x24892a[_0x45dcec(0x18a)][_0x45dcec(0x175)](_0x9d6e5e=>Object['keys'](_0x9d6e5e[_0x45dcec(0x1b0)])[_0x45dcec(0x1ad)]>0x0);}export function getProfileModels(_0x3712fe,_0x482d83){const _0x5420f1=a6_0x3eb05c;return _0x3712fe[_0x5420f1(0x18a)][_0x5420f1(0x186)](_0x183b0d=>{const _0x1f58cf=_0x5420f1,_0x258c76=_0x183b0d[_0x1f58cf(0x1b0)][_0x482d83];return _0x258c76?[{'datasetCode':_0x258c76,'tableName':_0x183b0d[_0x1f58cf(0x17a)],'name':_0x183b0d['name'],'alias':_0x183b0d[_0x1f58cf(0x197)]}]:[];});}export function updateModelRegistry(_0x4d6d6c){const _0x525417=a6_0x3eb05c,_0x191684=a6_0x5074d0[_0x525417(0x1b2)](_0x4d6d6c[_0x525417(0x189)],MODEL_REGISTRY_FILE_NAME),_0x3ab49c=existsSync(_0x191684),_0x417f40=readModelRegistry(_0x191684);if(_0x3ab49c&&!_0x417f40)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x525417(0x1a6));const _0x53eb0c=_0x417f40??emptyRegistry(_0x4d6d6c['defaultProfile']);if(_0x4d6d6c['appCode']!==_0x525417(0x181))removeUnboundProfiles(_0x53eb0c);const _0x249a1c=_0x417f40?getProfileModels(_0x417f40,_0x4d6d6c[_0x525417(0x1af)])['length']:0x0;if(_0x249a1c>0x0&&_0x4d6d6c[_0x525417(0x18a)][_0x525417(0x1ad)]===0x0&&!_0x4d6d6c['allowEmptyReplacement'])throw new Error(_0x525417(0x182)+_0x249a1c+_0x525417(0x19d)+_0x4d6d6c[_0x525417(0x1af)]+_0x525417(0x173)+_0x525417(0x1a3));_0x53eb0c[_0x525417(0x17e)]=_0x4d6d6c[_0x525417(0x17e)],_0x53eb0c['profiles'][_0x4d6d6c[_0x525417(0x1af)]]={'appCode':_0x4d6d6c['appCode'],'runtimeDomain':_0x4d6d6c[_0x525417(0x17d)]},mergeProfileModels(_0x53eb0c,_0x4d6d6c[_0x525417(0x1af)],_0x4d6d6c[_0x525417(0x18a)]),mkdirSync(_0x4d6d6c[_0x525417(0x189)],{'recursive':!![]});const _0x11f12f=_0x191684+'.'+process[_0x525417(0x19e)]+'.'+Date[_0x525417(0x1b5)]()+_0x525417(0x1b1);try{writeFileSync(_0x11f12f,registrySource(_0x53eb0c),{'encoding':_0x525417(0x193),'mode':0x1a4}),renameSync(_0x11f12f,_0x191684);}catch(_0x457e70){try{unlinkSync(_0x11f12f);}catch{}throw _0x457e70;}return{'path':_0x191684,'registry':_0x53eb0c,'existed':_0x3ab49c};}
|
|
1
|
+
const a6_0xd43591=a6_0x2265;(function(_0x118047,_0x3219eb){const _0x4b0c64=a6_0x2265,_0x69a457=_0x118047();while(!![]){try{const _0x362db2=parseInt(_0x4b0c64(0xec))/0x1*(parseInt(_0x4b0c64(0x10b))/0x2)+parseInt(_0x4b0c64(0xfa))/0x3*(parseInt(_0x4b0c64(0x115))/0x4)+parseInt(_0x4b0c64(0x11b))/0x5*(parseInt(_0x4b0c64(0x102))/0x6)+-parseInt(_0x4b0c64(0xdc))/0x7*(-parseInt(_0x4b0c64(0xe0))/0x8)+parseInt(_0x4b0c64(0x119))/0x9+parseInt(_0x4b0c64(0x11c))/0xa+-parseInt(_0x4b0c64(0xe7))/0xb;if(_0x362db2===_0x3219eb)break;else _0x69a457['push'](_0x69a457['shift']());}catch(_0x189f10){_0x69a457['push'](_0x69a457['shift']());}}}(a6_0x5438,0x91e77));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x43a414 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0xd43591(0xdd);export const MODEL_RUNTIME_FILE_NAME=a6_0xd43591(0xde);export const MODEL_REGISTRY_VERSION_MARKER='/*\x20rabetbase-model-registry:v2\x20*/';const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0xd43591(0xf3),REGISTRY_START=a6_0xd43591(0x100),REGISTRY_END=a6_0xd43591(0x10f);function emptyRegistry(_0x3cf1bf){return{'defaultProfile':_0x3cf1bf,'profiles':{},'models':[]};}function a6_0x2265(_0x33046d,_0x506db3){_0x33046d=_0x33046d-0xd5;const _0x54382d=a6_0x5438();let _0x226572=_0x54382d[_0x33046d];return _0x226572;}function extractRegistryJson(_0x44d36a){const _0x57e921=a6_0xd43591,_0x389128=_0x44d36a[_0x57e921(0xe6)](REGISTRY_START),_0x21ab28=_0x44d36a['indexOf'](REGISTRY_END);if(_0x389128<0x0||_0x21ab28<=_0x389128)return undefined;return _0x44d36a['slice'](_0x389128+REGISTRY_START[_0x57e921(0xe8)],_0x21ab28)['trim']()[_0x57e921(0xee)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x57e921(0xee)](/;$/,'');}function migrateLegacyRegistry(_0x2bf852){const _0x29fdef=a6_0xd43591,_0x231719=emptyRegistry(_0x2bf852[_0x29fdef(0xe3)]);for(const [_0x2bbe68,_0xee9c8b]of Object[_0x29fdef(0xd9)](_0x2bf852[_0x29fdef(0xe9)])){_0x231719[_0x29fdef(0xe9)][_0x2bbe68]={'appCode':_0xee9c8b[_0x29fdef(0x10d)],'runtimeDomain':_0xee9c8b['runtimeDomain']},mergeProfileModels(_0x231719,_0x2bbe68,_0xee9c8b[_0x29fdef(0xf5)]);}return _0x231719;}function generatedObjectLiteralToJson(_0x3e5f88){const _0x4e0f90=a6_0xd43591;let _0x35f087='',_0x2b9abc,_0x4fb8a3=![],_0x97e37d;for(let _0x560635=0x0;_0x560635<_0x3e5f88['length'];_0x560635++){const _0x357b4c=_0x3e5f88[_0x560635];if(_0x2b9abc){_0x35f087+=_0x357b4c;if(_0x4fb8a3)_0x4fb8a3=![];else{if(_0x357b4c==='\x5c')_0x4fb8a3=!![];else{if(_0x357b4c===_0x2b9abc)_0x2b9abc=undefined;}}continue;}if(_0x357b4c==='\x22'){_0x2b9abc=_0x357b4c,_0x35f087+=_0x357b4c,_0x97e37d=_0x4e0f90(0x114);continue;}if(_0x357b4c===','){let _0x1ac2bb=_0x560635+0x1;while(/\s/[_0x4e0f90(0x10c)](_0x3e5f88[_0x1ac2bb]??''))_0x1ac2bb++;if(_0x3e5f88[_0x1ac2bb]==='}'||_0x3e5f88[_0x1ac2bb]===']')continue;_0x35f087+=_0x357b4c,_0x97e37d=',';continue;}if(_0x357b4c==='{'||_0x357b4c==='['){_0x35f087+=_0x357b4c,_0x97e37d=_0x357b4c;continue;}if(_0x357b4c==='}'||_0x357b4c===']'){_0x35f087+=_0x357b4c,_0x97e37d=_0x357b4c;continue;}if((_0x97e37d==='{'||_0x97e37d===',')&&/[A-Za-z_$]/['test'](_0x357b4c)){let _0x497d16=_0x560635+0x1;while(/[A-Za-z0-9_$]/['test'](_0x3e5f88[_0x497d16]??''))_0x497d16++;let _0x140547=_0x497d16;while(/\s/[_0x4e0f90(0x10c)](_0x3e5f88[_0x140547]??''))_0x140547++;if(_0x3e5f88[_0x140547]===':'){_0x35f087+=JSON[_0x4e0f90(0xd5)](_0x3e5f88['slice'](_0x560635,_0x497d16)),_0x560635=_0x497d16-0x1,_0x97e37d=_0x4e0f90(0xfb);continue;}}_0x35f087+=_0x357b4c;if(!/\s/['test'](_0x357b4c)&&_0x357b4c!==':')_0x97e37d=_0x4e0f90(0x114);}return _0x35f087;}function parseGeneratedRegistryJson(_0x433a8c){const _0x88edf2=a6_0xd43591;try{return JSON[_0x88edf2(0xd8)](_0x433a8c);}catch{return JSON['parse'](generatedObjectLiteralToJson(_0x433a8c));}}function normalizeModelEntries(_0xdd336,_0x32f271){const _0x37d534=a6_0xd43591,_0x2ed45f=Object[_0x37d534(0xf8)](_0xdd336),_0x49854f=[];for(const _0x18a2c4 of _0x32f271){if(!_0x18a2c4||typeof _0x18a2c4!==_0x37d534(0x103)||Array[_0x37d534(0x105)](_0x18a2c4))return undefined;const _0x30400f=_0x18a2c4;if(typeof _0x30400f[_0x37d534(0xf1)]!==_0x37d534(0x116)||typeof _0x30400f['tableName']!==_0x37d534(0x116)||typeof _0x30400f['name']!=='string')return undefined;let _0x11d290;if(typeof _0x30400f['datasetCode']==='string'&&_0x30400f[_0x37d534(0xfd)]===undefined)_0x11d290=Object[_0x37d534(0x104)](_0x2ed45f['map'](_0x252094=>[_0x252094,_0x30400f[_0x37d534(0x112)]]));else{if(_0x30400f['datasetCode']===undefined&&_0x30400f[_0x37d534(0xfd)]&&typeof _0x30400f[_0x37d534(0xfd)]===_0x37d534(0x103)&&!Array['isArray'](_0x30400f['datasetCodes'])&&Object[_0x37d534(0xe4)](_0x30400f[_0x37d534(0xfd)])['every'](_0x3ebbc7=>typeof _0x3ebbc7===_0x37d534(0x116)))_0x11d290={..._0x30400f[_0x37d534(0xfd)]};else return undefined;}_0x49854f[_0x37d534(0x10a)]({'alias':_0x30400f[_0x37d534(0xf1)],'tableName':_0x30400f[_0x37d534(0xfc)],'name':_0x30400f[_0x37d534(0x108)],'datasetCodes':_0x11d290});}return _0x49854f;}export function parseModelRegistry(_0x126465){const _0x5ecb67=a6_0xd43591,_0x2b3114=extractRegistryJson(_0x126465);if(!_0x2b3114)return undefined;try{const _0x2d5b95=parseGeneratedRegistryJson(_0x2b3114);if(typeof _0x2d5b95[_0x5ecb67(0xe3)]!==_0x5ecb67(0x116)||!_0x2d5b95['profiles']||typeof _0x2d5b95[_0x5ecb67(0xe9)]!=='object')return undefined;if(_0x2d5b95[_0x5ecb67(0xea)]===_0x5ecb67(0x11d))return migrateLegacyRegistry(_0x2d5b95);if(!(_0x2d5b95['protocol']===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x2d5b95[_0x5ecb67(0xea)]===undefined&&_0x126465['includes'](MODEL_REGISTRY_VERSION_MARKER))||!Array['isArray'](_0x2d5b95[_0x5ecb67(0xf5)]))return undefined;const _0x5c40f1=_0x2d5b95[_0x5ecb67(0xe9)],_0x4e3ed9=normalizeModelEntries(_0x5c40f1,_0x2d5b95[_0x5ecb67(0xf5)]);if(!_0x4e3ed9)return undefined;return{'defaultProfile':_0x2d5b95['defaultProfile'],'profiles':_0x5c40f1,'models':_0x4e3ed9};}catch{return undefined;}}export function readModelRegistry(_0x305279){const _0x3074a0=a6_0xd43591;if(!existsSync(_0x305279))return undefined;try{return parseModelRegistry(readFileSync(_0x305279,_0x3074a0(0x106)));}catch{return undefined;}}function registrySource(_0x1154fb){const _0x234fe6=a6_0xd43591,_0x2f452b=Object[_0x234fe6(0xf8)](_0x1154fb[_0x234fe6(0xe9)]),_0x269fd3=_0x1154fb[_0x234fe6(0xf5)][_0x234fe6(0xf9)](_0x3b3ea4=>{const _0x3b7bd7=_0x234fe6,_0x5119c3=_0x2f452b['map'](_0x55aa08=>_0x3b3ea4['datasetCodes'][_0x55aa08]),_0x50bc2f=_0x5119c3[0x0],_0x4cbce7=_0x50bc2f!==undefined&&_0x5119c3[_0x3b7bd7(0x118)](_0x2241df=>_0x2241df===_0x50bc2f),_0x42370b={'alias':_0x3b3ea4[_0x3b7bd7(0xf1)],'tableName':_0x3b3ea4[_0x3b7bd7(0xfc)],'name':_0x3b3ea4[_0x3b7bd7(0x108)]};return _0x4cbce7?{..._0x42370b,'datasetCode':_0x50bc2f}:{..._0x42370b,'datasetCodes':_0x3b3ea4[_0x3b7bd7(0xfd)]};}),_0x44fca2=JSON['stringify']({'defaultProfile':_0x1154fb[_0x234fe6(0xe3)],'profiles':_0x1154fb[_0x234fe6(0xe9)],'models':_0x269fd3},null,0x2)[_0x234fe6(0xef)]('\x0a')[_0x234fe6(0xf9)](_0x31dd63=>'\x20\x20'+_0x31dd63)[_0x234fe6(0x111)]('\x0a');return _0x234fe6(0xda)+MODEL_REGISTRY_VERSION_MARKER+_0x234fe6(0x101)+REGISTRY_START+'\x0a'+_0x44fca2+'\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a'+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x24e3b9,_0x5588dd,_0xa97fc9){const _0x5f31fb=a6_0xd43591,_0x1fcc22=_0xa97fc9['map'](_0x3dd0ff=>({..._0x3dd0ff,'alias':_0x3dd0ff[_0x5f31fb(0xf1)]||_0x3dd0ff['tableName']})),_0x2691a3=new Map(),_0x213356=new Map();for(const _0x1bb206 of _0x1fcc22){const _0x1dcbb5=_0x2691a3[_0x5f31fb(0x110)](_0x1bb206[_0x5f31fb(0xf1)]);if(_0x1dcbb5&&_0x1dcbb5!==_0x1bb206[_0x5f31fb(0xfc)])throw new Error(_0x5f31fb(0xff)+_0x1bb206[_0x5f31fb(0xf1)]+'\x22\x20maps\x20to\x20both\x20\x22'+_0x1dcbb5+_0x5f31fb(0xdf)+_0x1bb206[_0x5f31fb(0xfc)]+'\x22\x20in\x20profile\x20\x22'+_0x5588dd+'\x22.');const _0x1a7781=_0x213356[_0x5f31fb(0x110)](_0x1bb206[_0x5f31fb(0xfc)]);if(_0x1a7781&&_0x1a7781!==_0x1bb206[_0x5f31fb(0xf1)])throw new Error('Table\x20\x22'+_0x1bb206[_0x5f31fb(0xfc)]+_0x5f31fb(0xe1)+_0x1a7781+_0x5f31fb(0xdf)+_0x1bb206['alias']+'\x22\x20in\x20profile\x20\x22'+_0x5588dd+'\x22.');_0x2691a3[_0x5f31fb(0x10e)](_0x1bb206[_0x5f31fb(0xf1)],_0x1bb206[_0x5f31fb(0xfc)]),_0x213356[_0x5f31fb(0x10e)](_0x1bb206[_0x5f31fb(0xfc)],_0x1bb206[_0x5f31fb(0xf1)]);const _0x5ce2ad=_0x24e3b9[_0x5f31fb(0xf5)][_0x5f31fb(0xe2)](_0x55ad9d=>_0x55ad9d[_0x5f31fb(0xf1)]===_0x1bb206[_0x5f31fb(0xf1)]);if(_0x5ce2ad&&_0x5ce2ad['tableName']!==_0x1bb206[_0x5f31fb(0xfc)])throw new Error(_0x5f31fb(0xff)+_0x1bb206[_0x5f31fb(0xf1)]+_0x5f31fb(0xf2)+_0x5ce2ad[_0x5f31fb(0xfc)]+_0x5f31fb(0x117)+_0x1bb206[_0x5f31fb(0xfc)]+_0x5f31fb(0xeb)+_0x5588dd+'\x22.');const _0x1a4447=_0x24e3b9[_0x5f31fb(0xf5)][_0x5f31fb(0xe2)](_0x32ad53=>_0x32ad53[_0x5f31fb(0xfc)]===_0x1bb206[_0x5f31fb(0xfc)]);if(_0x1a4447&&_0x1a4447['alias']!==_0x1bb206[_0x5f31fb(0xf1)])throw new Error(_0x5f31fb(0x107)+_0x1bb206[_0x5f31fb(0xfc)]+_0x5f31fb(0xf4)+_0x1a4447['alias']+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x1bb206['alias']+_0x5f31fb(0xeb)+_0x5588dd+'\x22.');}for(const _0x2bc187 of _0x24e3b9[_0x5f31fb(0xf5)]){delete _0x2bc187[_0x5f31fb(0xfd)][_0x5588dd];}for(const _0x44b820 of _0x1fcc22){let _0x22fa2a=_0x24e3b9['models'][_0x5f31fb(0xe2)](_0x32a2fb=>_0x32a2fb['alias']===_0x44b820[_0x5f31fb(0xf1)]);!_0x22fa2a&&(_0x22fa2a={'alias':_0x44b820[_0x5f31fb(0xf1)],'tableName':_0x44b820['tableName'],'name':_0x44b820[_0x5f31fb(0x108)],'datasetCodes':{}},_0x24e3b9[_0x5f31fb(0xf5)][_0x5f31fb(0x10a)](_0x22fa2a)),(_0x5588dd===_0x24e3b9['defaultProfile']||!_0x22fa2a[_0x5f31fb(0xfd)][_0x24e3b9[_0x5f31fb(0xe3)]])&&(_0x22fa2a[_0x5f31fb(0xf1)]=_0x44b820['alias'],_0x22fa2a[_0x5f31fb(0xfc)]=_0x44b820['tableName'],_0x22fa2a['name']=_0x44b820[_0x5f31fb(0x108)]),_0x22fa2a['datasetCodes'][_0x5588dd]=_0x44b820[_0x5f31fb(0x112)];}_0x24e3b9[_0x5f31fb(0xf5)]=_0x24e3b9[_0x5f31fb(0xf5)][_0x5f31fb(0x11a)](_0x2a38e3=>Object[_0x5f31fb(0xf8)](_0x2a38e3['datasetCodes'])[_0x5f31fb(0xe8)]>0x0);}function removeUnboundProfiles(_0x2b14df){const _0x345c64=a6_0xd43591,_0x57bdc1=Object[_0x345c64(0xd9)](_0x2b14df['profiles'])[_0x345c64(0x11a)](([,_0x29d8c3])=>_0x29d8c3[_0x345c64(0x10d)]==='NOT-SET')[_0x345c64(0xf9)](([_0x16ea06])=>_0x16ea06);if(_0x57bdc1['length']===0x0)return;for(const _0x44e9ba of _0x57bdc1){delete _0x2b14df[_0x345c64(0xe9)][_0x44e9ba];for(const _0x3e1fc6 of _0x2b14df[_0x345c64(0xf5)]){delete _0x3e1fc6[_0x345c64(0xfd)][_0x44e9ba];}}_0x2b14df['models']=_0x2b14df[_0x345c64(0xf5)][_0x345c64(0x11a)](_0x372fcb=>Object[_0x345c64(0xf8)](_0x372fcb[_0x345c64(0xfd)])[_0x345c64(0xe8)]>0x0);}export function getProfileModels(_0x1ced1f,_0x48e388){const _0x5974a7=a6_0xd43591;return _0x1ced1f[_0x5974a7(0xf5)][_0x5974a7(0xf0)](_0x5cd269=>{const _0x1860cd=_0x5974a7,_0x117573=_0x5cd269[_0x1860cd(0xfd)][_0x48e388];return _0x117573?[{'datasetCode':_0x117573,'tableName':_0x5cd269['tableName'],'name':_0x5cd269[_0x1860cd(0x108)],'alias':_0x5cd269[_0x1860cd(0xf1)]}]:[];});}function a6_0x5438(){const _0x142fa4=['\x22\x20with\x20an\x20empty\x20result.\x20','Model\x20alias\x20\x22','/*\x20rabetbase-model-registry:start\x20*/','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','238908MIRkVS','object','fromEntries','isArray','utf8','Table\x20\x22','name','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','push','181266LLVpJp','test','appCode','set','/*\x20rabetbase-model-registry:end\x20*/','get','join','datasetCode','outputDir','value','1053724SvvcPn','string','\x22\x20in\x20the\x20registry\x20but\x20\x22','every','2737233wgcLAI','filter','55CbZtSo','4248200xhtJed','lovrabet-model-registry/v1','stringify','NOT-SET','allowEmptyReplacement','parse','entries','/**\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','\x20model(s)\x20in\x20profile\x20\x22','90559FNcIiv','models.generated.ts','model-runtime.ts','\x22\x20and\x20\x22','32eAKIfs','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','find','defaultProfile','values','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','indexOf','25494733oGmJtB','length','profiles','protocol','\x22\x20in\x20profile\x20\x22','10YVxPPT','profileName','replace','split','flatMap','alias','\x22\x20maps\x20to\x20table\x20\x22','lovrabet-model-registry/v2','\x22\x20maps\x20to\x20alias\x20\x22','models','.tmp','Refusing\x20to\x20replace\x20','keys','map','9ipJoAe','key','tableName','datasetCodes'];a6_0x5438=function(){return _0x142fa4;};return a6_0x5438();}export function updateModelRegistry(_0x439f3a){const _0x1258fd=a6_0xd43591,_0x3dd240=a6_0x43a414[_0x1258fd(0x111)](_0x439f3a[_0x1258fd(0x113)],MODEL_REGISTRY_FILE_NAME),_0x5ddf29=existsSync(_0x3dd240),_0x12cf19=readModelRegistry(_0x3dd240);if(_0x5ddf29&&!_0x12cf19)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x1258fd(0xe5));const _0x9b7dcf=_0x12cf19??emptyRegistry(_0x439f3a[_0x1258fd(0xe3)]);if(_0x439f3a['appCode']!==_0x1258fd(0xd6))removeUnboundProfiles(_0x9b7dcf);const _0x3f308e=_0x12cf19?getProfileModels(_0x12cf19,_0x439f3a[_0x1258fd(0xed)])[_0x1258fd(0xe8)]:0x0;if(_0x3f308e>0x0&&_0x439f3a['models'][_0x1258fd(0xe8)]===0x0&&!_0x439f3a[_0x1258fd(0xd7)])throw new Error(_0x1258fd(0xf7)+_0x3f308e+_0x1258fd(0xdb)+_0x439f3a[_0x1258fd(0xed)]+_0x1258fd(0xfe)+_0x1258fd(0x109));_0x9b7dcf[_0x1258fd(0xe3)]=_0x439f3a[_0x1258fd(0xe3)],_0x9b7dcf[_0x1258fd(0xe9)][_0x439f3a[_0x1258fd(0xed)]]={'appCode':_0x439f3a[_0x1258fd(0x10d)],'runtimeDomain':_0x439f3a['runtimeDomain']},mergeProfileModels(_0x9b7dcf,_0x439f3a[_0x1258fd(0xed)],_0x439f3a[_0x1258fd(0xf5)]),mkdirSync(_0x439f3a['outputDir'],{'recursive':!![]});const _0x5354e3=_0x3dd240+'.'+process['pid']+'.'+Date['now']()+_0x1258fd(0xf6);try{writeFileSync(_0x5354e3,registrySource(_0x9b7dcf),{'encoding':_0x1258fd(0x106),'mode':0x1a4}),renameSync(_0x5354e3,_0x3dd240);}catch(_0x33cc92){try{unlinkSync(_0x5354e3);}catch{}throw _0x33cc92;}return{'path':_0x3dd240,'registry':_0x9b7dcf,'existed':_0x5ddf29};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1663bc,_0x1a82d4){const _0x2fcebe=a7_0x4e50,_0x260ab1=_0x1663bc();while(!![]){try{const _0x58a959=parseInt(_0x2fcebe(0x80))/0x1+-parseInt(_0x2fcebe(0x85))/0x2*(parseInt(_0x2fcebe(0x86))/0x3)+-parseInt(_0x2fcebe(0x7f))/0x4*(parseInt(_0x2fcebe(0x7a))/0x5)+-parseInt(_0x2fcebe(0x76))/0x6*(-parseInt(_0x2fcebe(0x84))/0x7)+parseInt(_0x2fcebe(0x88))/0x8*(-parseInt(_0x2fcebe(0x82))/0x9)+-parseInt(_0x2fcebe(0x8b))/0xa+parseInt(_0x2fcebe(0x81))/0xb*(parseInt(_0x2fcebe(0x8a))/0xc);if(_0x58a959===_0x1a82d4)break;else _0x260ab1['push'](_0x260ab1['shift']());}catch(_0x5d6dcb){_0x260ab1['push'](_0x260ab1['shift']());}}}(a7_0x1bb0,0x6cc32));import{readFileSync}from'node:fs';import a7_0x2e63aa from'node:path';import{fileURLToPath}from'node:url';import a7_0x1217d8 from'prettier';function a7_0x4e50(_0x161699,_0x27a30d){_0x161699=_0x161699-0x74;const _0x1bb05f=a7_0x1bb0();let _0x4e5056=_0x1bb05f[_0x161699];return _0x4e5056;}import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function relativeImport(_0x2eb801,_0x489112){const _0x294e96=a7_0x4e50;let _0x3222e2=a7_0x2e63aa[_0x294e96(0x75)](_0x2eb801,_0x489112)['replace'](/\\/g,'/');if(!_0x3222e2['startsWith']('.'))_0x3222e2='./'+_0x3222e2;return _0x3222e2;}function a7_0x1bb0(){const _0x10149e=['5038ePcddg','717CINxDd','replace','1558928ymmSUn','join','3518292hOGVLA','8532640KtmrIv','utf8','{ProjectRoutingImport}','relative','2226570sdBklD','all','../../templates/generate-api','typescript','49745mERZgu','format','dirname','model-runtime.ts.tpl','profile-api.ts.tpl','224IVSXXX','815755WLLQoP','55BsQxmF','9EiEwZq','profile-client.ts.tpl','7LPYyEb'];a7_0x1bb0=function(){return _0x10149e;};return a7_0x1bb0();}export async function renderModelRegistryScaffold(_0xeb21c2,_0xa4ee6e=process['cwd']()){const _0x2513c6=a7_0x4e50,_0xe4b744=fileURLToPath(import.meta.url),_0x572130=a7_0x2e63aa['resolve'](a7_0x2e63aa[_0x2513c6(0x7c)](_0xe4b744),_0x2513c6(0x78)),_0x54b8dc=relativeImport(a7_0x2e63aa['resolve'](_0xeb21c2),a7_0x2e63aa['resolve'](_0xa4ee6e,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x2ba59e=readFileSync(a7_0x2e63aa[_0x2513c6(0x89)](_0x572130,_0x2513c6(0x7e)),_0x2513c6(0x8c))[_0x2513c6(0x87)](_0x2513c6(0x74),_0x54b8dc),[_0xd4d4ca,_0x1922ba,_0x2ae1e8]=await Promise[_0x2513c6(0x77)]([a7_0x1217d8[_0x2513c6(0x7b)](_0x2ba59e,{'parser':_0x2513c6(0x79)}),a7_0x1217d8[_0x2513c6(0x7b)](readFileSync(a7_0x2e63aa[_0x2513c6(0x89)](_0x572130,_0x2513c6(0x83)),_0x2513c6(0x8c)),{'parser':_0x2513c6(0x79)}),a7_0x1217d8['format'](readFileSync(a7_0x2e63aa[_0x2513c6(0x89)](_0x572130,_0x2513c6(0x7d)),_0x2513c6(0x8c)),{'parser':'typescript'})]);return{'api':_0xd4d4ca,'client':_0x1922ba,'modelRuntime':_0x2ae1e8};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a8_0x12ad(_0x3efec9,_0x134f36){_0x3efec9=_0x3efec9-0xa5;const _0x2ff6e1=a8_0x2ff6();let _0x12ada2=_0x2ff6e1[_0x3efec9];return _0x12ada2;}(function(_0x1faf42,_0x18c0b6){const _0x5af98f=a8_0x12ad,_0x24f75c=_0x1faf42();while(!![]){try{const _0x1a569c=parseInt(_0x5af98f(0xb0))/0x1+-parseInt(_0x5af98f(0xb3))/0x2*(-parseInt(_0x5af98f(0xb9))/0x3)+parseInt(_0x5af98f(0xb1))/0x4+-parseInt(_0x5af98f(0xa9))/0x5+-parseInt(_0x5af98f(0xbe))/0x6+-parseInt(_0x5af98f(0xc4))/0x7+parseInt(_0x5af98f(0xb7))/0x8*(parseInt(_0x5af98f(0xad))/0x9);if(_0x1a569c===_0x18c0b6)break;else _0x24f75c['push'](_0x24f75c['shift']());}catch(_0x34f6c4){_0x24f75c['push'](_0x24f75c['shift']());}}}(a8_0x2ff6,0xf3bae));import{existsSync}from'node:fs';import a8_0x45ec7e from'node:path';import{readRawConfig}from'../context/config-loader.js';import{MODEL_REGISTRY_FILE_NAME,readModelRegistry}from'../api/model-registry-file.js';function a8_0x2ff6(){const _0x1b5312=['map','resolve','1939720inWLng','filter','1713NMfaQW','cwd','\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20','-api.ts','apiDir','5332116qMbFBM','`\x20first.','api.ts','profiles','Run\x20`','AppCode\x20\x22','13532736sjwpFn','entries','validation','appcode','length','\x22\x20is\x20missing\x20from\x20','5079505MPDSRP','string','defaultApp','defaultProfile','45PkaqDu','object','\x20api\x20pull\x20--app\x20','728223iEwIrw','4198248SyMPYc','Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.','6466whsZKQ','apps'];a8_0x2ff6=function(){return _0x1b5312;};return a8_0x2ff6();}import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveApiModelSource(_0x33177f,_0xd88679,_0x41d0c7){const _0x484aa0=a8_0x12ad,_0x31d72a=a8_0x45ec7e[_0x484aa0(0xb6)](process[_0x484aa0(0xba)](),_0x33177f),_0x43a0b8=a8_0x45ec7e['resolve'](_0x31d72a,_0x484aa0(0xc0)),_0x589b93=a8_0x45ec7e['resolve'](_0x31d72a,MODEL_REGISTRY_FILE_NAME),_0x24f1ed=readModelRegistry(_0x589b93);if(_0x24f1ed){const _0x2d7363=_0xd88679?Object[_0x484aa0(0xc5)](_0x24f1ed[_0x484aa0(0xc1)])[_0x484aa0(0xb8)](([,_0x113954])=>_0x113954['appCode']===_0xd88679):[];if(_0x41d0c7){if(_0x24f1ed[_0x484aa0(0xc1)][_0x41d0c7])return{'filePath':_0x589b93,'profileName':_0x41d0c7};if(_0x2d7363[_0x484aa0(0xa7)]>0x0)throw CliErrors[_0x484aa0(0xa5)]('Model\x20profile\x20\x22'+_0x41d0c7+_0x484aa0(0xa8)+MODEL_REGISTRY_FILE_NAME+'.',_0x484aa0(0xc2)+CLI_BIN_NAME+_0x484aa0(0xaf)+_0x41d0c7+_0x484aa0(0xbf));}else{if(_0x2d7363[_0x484aa0(0xa7)]===0x1)return{'filePath':_0x589b93,'profileName':_0x2d7363[0x0][0x0]};if(_0x2d7363[_0x484aa0(0xa7)]>0x1)throw new Error(_0x484aa0(0xc3)+_0xd88679+_0x484aa0(0xbb)+_0x2d7363[_0x484aa0(0xb5)](([_0x3565ed])=>_0x3565ed)['join'](',\x20')+'.\x20'+_0x484aa0(0xb2));if(_0x24f1ed[_0x484aa0(0xc1)][_0x24f1ed[_0x484aa0(0xac)]]&&!_0xd88679)return{'filePath':_0x589b93,'profileName':_0x24f1ed[_0x484aa0(0xac)]};}}if(!_0xd88679&&!_0x41d0c7)return{'filePath':_0x43a0b8};const _0x4907ff=readRawConfig(),_0x4b00d8=_0x4907ff[_0x484aa0(0xb4)]&&typeof _0x4907ff['apps']===_0x484aa0(0xae)?_0x4907ff[_0x484aa0(0xb4)]:{},_0x95fab7=_0x41d0c7&&_0x4b00d8[_0x41d0c7]?[_0x41d0c7,_0x4b00d8[_0x41d0c7]]:Object['entries'](_0x4b00d8)['find'](([,_0x43f087])=>_0x43f087?.[_0x484aa0(0xa6)]===_0xd88679);if(!_0x95fab7)return{'filePath':_0x43a0b8};const [_0x2a4280,_0x41f6f8]=_0x95fab7,_0x2cf552=typeof _0x4907ff[_0x484aa0(0xab)]===_0x484aa0(0xaa)?_0x4907ff[_0x484aa0(0xab)]:undefined;if(_0x41f6f8?.[_0x484aa0(0xbd)])return{'filePath':_0x43a0b8};if(_0x2cf552&&_0x2a4280!==_0x2cf552){const _0x15e59a=a8_0x45ec7e[_0x484aa0(0xb6)](_0x31d72a,_0x2a4280+_0x484aa0(0xbc));if(existsSync(_0x15e59a))return{'filePath':_0x15e59a};}return{'filePath':_0x43a0b8};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x23762d,_0x29738a){const _0xec7cc7=a9_0xdb78,_0x5a88b0=_0x23762d();while(!![]){try{const _0x2c54e9=parseInt(_0xec7cc7(0x1d0))/0x1+-parseInt(_0xec7cc7(0x1c2))/0x2+-parseInt(_0xec7cc7(0x1cc))/0x3*(parseInt(_0xec7cc7(0x1c7))/0x4)+parseInt(_0xec7cc7(0x1bf))/0x5+-parseInt(_0xec7cc7(0x1d6))/0x6*(-parseInt(_0xec7cc7(0x1c8))/0x7)+-parseInt(_0xec7cc7(0x1d2))/0x8+-parseInt(_0xec7cc7(0x1c5))/0x9*(-parseInt(_0xec7cc7(0x1c6))/0xa);if(_0x2c54e9===_0x29738a)break;else _0x5a88b0['push'](_0x5a88b0['shift']());}catch(_0x2c0a6b){_0x5a88b0['push'](_0x5a88b0['shift']());}}}(a9_0x325b,0x3adb7));import{getIsSessionValid}from'../auth/is-session-valid.js';function a9_0xdb78(_0x4e3460,_0x253799){_0x4e3460=_0x4e3460-0x1bf;const _0x325b15=a9_0x325b();let _0xdb78ee=_0x325b15[_0x4e3460];return _0xdb78ee;}import{authServer}from'../auth/auth-server.js';function a9_0x325b(){const _0xf6d8bd=['Run\x20`','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','109315NnQlKU','!\x20Login\x20failed.','3556880hLsooi','log','No\x20valid\x20session.\x20Login\x20now?','*\x20Login\x20successful!','1150752kwVeap','1034205WULXQZ','Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','start','507726oxaHSO','nonInteractive','stop','178677AdMHEi','230nwwAfs','100060afodKn','7MabNhq','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','validation','3dfjwNA','autoYes'];a9_0x325b=function(){return _0xf6d8bd;};return a9_0x325b();}import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';import a9_0x3f33c7 from'ora';export async function runAuthServer(_0x370107){const _0x445923=a9_0xdb78,_0x3ab310=await getIsSessionValid();if(_0x3ab310){console[_0x445923(0x1d3)]('โ\x20Valid\x20session\x20detected,\x20no\x20login\x20required.');return;}if(_0x370107?.[_0x445923(0x1c3)]&&!_0x370107[_0x445923(0x1cd)])throw CliErrors[_0x445923(0x1cb)](_0x445923(0x1c0),_0x445923(0x1ce)+CLI_BIN_NAME+_0x445923(0x1c9));const _0x555947=_0x370107?.[_0x445923(0x1cd)]?!![]:await confirm({'message':_0x445923(0x1d4),'default':!![]});if(!_0x555947)return;if(_0x370107?.['nonInteractive']){console[_0x445923(0x1d3)](_0x445923(0x1ca));const _0x5e991e=await authServer({'silent':![],'openBrowser':![]});_0x5e991e?console['log'](_0x445923(0x1d5)):console[_0x445923(0x1d3)](_0x445923(0x1d1));return;}const _0x26c805=a9_0x3f33c7(_0x445923(0x1cf))[_0x445923(0x1c1)](),_0x339f37=await authServer({'silent':!![],'openBrowser':!![]});_0x26c805[_0x445923(0x1c4)](),_0x339f37?console[_0x445923(0x1d3)](_0x445923(0x1d5)):console[_0x445923(0x1d3)](_0x445923(0x1d1));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x3b32ee=a10_0x2f25;(function(_0x5b5f13,_0x5a64d5){const _0x3d66a9=a10_0x2f25,_0x335e30=_0x5b5f13();while(!![]){try{const _0x36f100=-parseInt(_0x3d66a9(0x128))/0x1*(parseInt(_0x3d66a9(0x12e))/0x2)+-parseInt(_0x3d66a9(0x14c))/0x3+parseInt(_0x3d66a9(0x134))/0x4+parseInt(_0x3d66a9(0x14b))/0x5*(parseInt(_0x3d66a9(0x120))/0x6)+parseInt(_0x3d66a9(0x126))/0x7+parseInt(_0x3d66a9(0x127))/0x8*(parseInt(_0x3d66a9(0x12f))/0x9)+-parseInt(_0x3d66a9(0x13b))/0xa;if(_0x36f100===_0x5a64d5)break;else _0x335e30['push'](_0x335e30['shift']());}catch(_0x2b52f1){_0x335e30['push'](_0x335e30['shift']());}}}(a10_0x22fd,0xb12a7));import{writeFileSync}from'node:fs';import a10_0x5d1e1a from'node:http';import a10_0x4cbd06 from'node:https';import{getUserDomain}from'../constant/domain.js';import{getOfficialRoutingCdn,getOfficialRoutingProfile}from'../constant/routing-profile.js';import{getProjectDomainRoutingManifest}from'../config/project-domain-routing.js';import{exec}from'node:child_process';import{getIsSessionValid}from'../auth/is-session-valid.js';function a10_0x2f25(_0x50999c,_0xc13005){_0x50999c=_0x50999c-0x120;const _0x22fda8=a10_0x22fd();let _0x2f25a1=_0x22fda8[_0x50999c];return _0x2f25a1;}import{cookieFile}from'../auth/constant.js';import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export function resolveAuthCallbackRouting(_0x34b7a9){const _0x3453be=a10_0x2f25;if(!_0x34b7a9)return getProjectDomainRoutingManifest()[_0x3453be(0x153)];const _0x5b1f01=getOfficialRoutingProfile(_0x34b7a9),_0x5bb457=getOfficialRoutingCdn(_0x34b7a9);return{'origin':_0x5b1f01[_0x3453be(0x153)][_0x3453be(0x149)],'certificateUrl':_0x5bb457[_0x3453be(0x12b)]+_0x3453be(0x12c)};}function withPort(_0x550efb,_0x416c1d){const _0x5e7d66=a10_0x2f25,_0x407c2c=new URL(_0x550efb);return _0x407c2c[_0x5e7d66(0x13f)]=String(_0x416c1d),_0x407c2c[_0x5e7d66(0x149)];}function a10_0x22fd(){const _0x227edb=['text/html;\x20charset=utf-8','local','silent','352482WbQPSm','user','win32','session','utf-8','json','8660603fLFyzg','8WbEeLS','475606cCjasa','writeHead','end','lovrabet','/cert/lovrabet-dev.json','timeoutMs','4GWABxG','4652685MyFhlD','then','darwin','๐\x20Login\x20URL:','cmd\x20/c\x20start\x20\x22\x22\x20\x22','4326700MdHcAO','๐\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','headers','xdg-open\x20\x22','โ ๏ธ\x20\x20Failed\x20to\x20open\x20browser\x20automatically','log','open\x20\x22','15420770DhuCHv','openBrowser','๐ก\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','port','listen','cookie','๐\x20Starting\x20login\x20service...','close','/sign-in?redirect=','certificateUrl','catch','error','๐ก\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','origin','createServer','95vSgWyH','2199306HEOdKl','127.0.0.1','/api/auth/get-session','platform','address','Auth\x20server\x20error:'];a10_0x22fd=function(){return _0x227edb;};return a10_0x22fd();}export async function authServer(_0x2ff187){const _0x40204f=a10_0x2f25,_0x111101=_0x2ff187?.[_0x40204f(0x154)]||![],_0x4e30bd=_0x2ff187?.[_0x40204f(0x13c)]??!![],_0x33f13=_0x2ff187?.[_0x40204f(0x12d)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x19b985=resolveAuthCallbackRouting(),_0x5883e3=_0x19b985[_0x40204f(0x145)]?await(await fetch(_0x19b985['certificateUrl']))[_0x40204f(0x125)]():undefined;return new Promise(async(_0x545d98,_0x13c9ee)=>{const _0x24caf6=_0x40204f;let _0x2b51a7=0x0,_0x109d51=![],_0x464bbf;const _0x251bef=async(_0x100e64,_0x13e6d7)=>{const _0xcfd69f=a10_0x2f25,_0x50e4ab=getUserDomain(),_0x228e27=_0x100e64[_0xcfd69f(0x136)][_0xcfd69f(0x141)]||'',_0x3792d1=await fetch(_0x50e4ab+_0xcfd69f(0x14e),{'headers':{'cookie':_0x228e27}})[_0xcfd69f(0x130)](_0x5cbf84=>_0x5cbf84[_0xcfd69f(0x125)]()),_0x30cc89=_0x3792d1&&_0x3792d1[_0xcfd69f(0x123)]&&_0x3792d1[_0xcfd69f(0x121)];if(_0x30cc89){writeFileSync(cookieFile,_0x228e27,_0xcfd69f(0x124));const _0x3f3d88=buildLoginSuccessHtml();_0x13e6d7[_0xcfd69f(0x129)](0xc8,{'Content-Type':_0xcfd69f(0x152)}),_0x13e6d7[_0xcfd69f(0x12a)](_0x3f3d88),_0x11661e(!![]);}else{const _0x4aaddb=encodeURIComponent(withPort(_0x19b985[_0xcfd69f(0x149)],_0x2b51a7));_0x13e6d7[_0xcfd69f(0x129)](0x12e,{'location':_0x50e4ab+_0xcfd69f(0x144)+_0x4aaddb}),_0x13e6d7[_0xcfd69f(0x12a)]();return;}},_0x1bc1ea=_0x5883e3?a10_0x4cbd06[_0x24caf6(0x14a)](_0x5883e3,_0x251bef):a10_0x5d1e1a[_0x24caf6(0x14a)](_0x251bef);function _0x11661e(_0x13823b){const _0x33a4a5=_0x24caf6;if(_0x109d51)return;_0x109d51=!![],_0x464bbf&&clearTimeout(_0x464bbf),_0x1bc1ea[_0x33a4a5(0x143)](),_0x545d98(_0x13823b);}_0x1bc1ea[_0x24caf6(0x140)](0x0,_0x24caf6(0x14d),()=>{const _0x2c0206=_0x24caf6,_0x52abb7=_0x1bc1ea[_0x2c0206(0x150)]();_0x2b51a7=typeof _0x52abb7==='object'&&_0x52abb7?_0x52abb7[_0x2c0206(0x13f)]:Number(_0x52abb7);const _0x1e5186=withPort(_0x19b985[_0x2c0206(0x149)],_0x2b51a7);_0x464bbf=setTimeout(()=>{const _0x1427eb=_0x2c0206;!_0x111101&&console['log'](_0x1427eb(0x13e)),_0x11661e(![]);},_0x33f13);!_0x111101&&(console[_0x2c0206(0x139)](_0x2c0206(0x142)),console[_0x2c0206(0x139)](_0x2c0206(0x132),_0x1e5186),_0x4e30bd?(console[_0x2c0206(0x139)]('๐\x20Attempting\x20to\x20open\x20browser\x20automatically...'),console['log'](''),console['log'](_0x2c0206(0x13d))):console[_0x2c0206(0x139)](_0x2c0206(0x148)),console[_0x2c0206(0x139)](''));if(!_0x4e30bd)return;openInBrowser(_0x1e5186)[_0x2c0206(0x130)](_0x428e23=>{const _0x405aaf=_0x2c0206;!_0x111101&&(_0x428e23?console[_0x405aaf(0x139)]('โ
\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.'):(console[_0x405aaf(0x139)](_0x405aaf(0x138)),console[_0x405aaf(0x139)](_0x405aaf(0x135),_0x1e5186)),console[_0x405aaf(0x139)](''));})[_0x2c0206(0x146)](()=>{const _0x1bc95b=_0x2c0206;!_0x111101&&(console['log'](_0x1bc95b(0x138)),console[_0x1bc95b(0x139)]('๐\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0x1e5186),console[_0x1bc95b(0x139)](''));});}),_0x1bc1ea['on'](_0x24caf6(0x147),_0x58e9ed=>{const _0x327b95=_0x24caf6;if(_0x109d51)return;_0x109d51=!![],_0x464bbf&&clearTimeout(_0x464bbf),!_0x111101&&console[_0x327b95(0x147)](_0x327b95(0x151),_0x58e9ed),_0x1bc1ea[_0x327b95(0x143)](),_0x13c9ee(_0x58e9ed);});});}function openInBrowser(_0x11a34f){return new Promise(_0x19e331=>{const _0x4a5a87=a10_0x2f25,_0x28e847=process[_0x4a5a87(0x14f)];let _0xe27548;if(_0x28e847===_0x4a5a87(0x122))_0xe27548=_0x4a5a87(0x133)+_0x11a34f+'\x22';else _0x28e847===_0x4a5a87(0x131)?_0xe27548=_0x4a5a87(0x13a)+_0x11a34f+'\x22':_0xe27548=_0x4a5a87(0x137)+_0x11a34f+'\x22';exec(_0xe27548,_0x9e112e=>{_0x9e112e?_0x19e331(![]):_0x19e331(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a10_0x3b32ee(0x139)]('isAuth',isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a11_0xa889a7=a11_0x1e97;(function(_0x36d14c,_0x44a28a){const _0x17020c=a11_0x1e97,_0x5d9181=_0x36d14c();while(!![]){try{const _0x1ab14e=parseInt(_0x17020c(0xcc))/0x1*(parseInt(_0x17020c(0xd6))/0x2)+parseInt(_0x17020c(0xcd))/0x3*(parseInt(_0x17020c(0xd5))/0x4)+-parseInt(_0x17020c(0xce))/0x5+-parseInt(_0x17020c(0xd0))/0x6+-parseInt(_0x17020c(0xd3))/0x7*(-parseInt(_0x17020c(0xd4))/0x8)+parseInt(_0x17020c(0xd1))/0x9*(parseInt(_0x17020c(0xcb))/0xa)+-parseInt(_0x17020c(0xcf))/0xb;if(_0x1ab14e===_0x44a28a)break;else _0x5d9181['push'](_0x5d9181['shift']());}catch(_0x21527f){_0x5d9181['push'](_0x5d9181['shift']());}}}(a11_0x9082,0x96451));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';function a11_0x9082(){const _0x3b6e69=['47773rMyuVT','3BonPWc','6091045AVkZUl','9426329gJDXWo','5607990ckeELC','80532puAFAW','cookie','14WMIKTV','4905552uOrNOL','1871948OosHah','46mbsoSg','.lovrabet','930DskHDp'];a11_0x9082=function(){return _0x3b6e69;};return a11_0x9082();}export const configDir=join(homedir(),a11_0xa889a7(0xd7));export const cookieFile=join(configDir,a11_0xa889a7(0xd2));function a11_0x1e97(_0x5ed59a,_0x446149){_0x5ed59a=_0x5ed59a-0xcb;const _0x90823d=a11_0x9082();let _0x1e97ca=_0x90823d[_0x5ed59a];return _0x1e97ca;}mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2b47fa,_0x5e128d){var _0x20756f=a12_0x4e64,_0x8e37b3=_0x2b47fa();while(!![]){try{var _0x59a719=parseInt(_0x20756f(0x10b))/0x1+parseInt(_0x20756f(0x112))/0x2+-parseInt(_0x20756f(0x110))/0x3+-parseInt(_0x20756f(0x10e))/0x4+parseInt(_0x20756f(0x111))/0x5*(-parseInt(_0x20756f(0x115))/0x6)+-parseInt(_0x20756f(0x10d))/0x7*(parseInt(_0x20756f(0x10c))/0x8)+-parseInt(_0x20756f(0x10f))/0x9*(-parseInt(_0x20756f(0x113))/0xa);if(_0x59a719===_0x5e128d)break;else _0x8e37b3['push'](_0x8e37b3['shift']());}catch(_0x2b93fd){_0x8e37b3['push'](_0x8e37b3['shift']());}}}(a12_0x2e0e,0x8d1cb));import{readFileSync}from'node:fs';function a12_0x4e64(_0x43fe94,_0x444136){_0x43fe94=_0x43fe94-0x10b;var _0x2e0e3b=a12_0x2e0e();var _0x4e6404=_0x2e0e3b[_0x43fe94];return _0x4e6404;}import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0x2d91ee=a12_0x4e64;try{return readFileSync(cookieFile,_0x2d91ee(0x114));}catch{}return'';}function a12_0x2e0e(){var _0x233d9a=['17188540WGnWJG','utf-8','220434MwKlXM','1087830UFpWdO','8GpYHxr','2515891KodsQU','2923992ohFpZc','9QYbCjH','2372370FbDUjt','55hBrUSh','113282vxSNbJ'];a12_0x2e0e=function(){return _0x233d9a;};return a12_0x2e0e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1116e2,_0x155aae){const _0x2f3aff=a13_0x5ac6,_0x1bbd69=_0x1116e2();while(!![]){try{const _0x5c15f9=parseInt(_0x2f3aff(0x19f))/0x1+-parseInt(_0x2f3aff(0x1a3))/0x2+parseInt(_0x2f3aff(0x19a))/0x3*(-parseInt(_0x2f3aff(0x198))/0x4)+-parseInt(_0x2f3aff(0x19d))/0x5+-parseInt(_0x2f3aff(0x19c))/0x6*(-parseInt(_0x2f3aff(0x199))/0x7)+-parseInt(_0x2f3aff(0x19b))/0x8+parseInt(_0x2f3aff(0x1a4))/0x9;if(_0x5c15f9===_0x155aae)break;else _0x1bbd69['push'](_0x1bbd69['shift']());}catch(_0x1ffa28){_0x1bbd69['push'](_0x1bbd69['shift']());}}}(a13_0x29d8,0x1a3a1));function a13_0x29d8(){const _0x200b81=['212452trEMgj','7AYitbQ','6ttdfqs','1024088kQFYCE','221082ZiLdnw','695110ZXjTBM','utf-8','27151JupYgp','/api/auth/get-session','session','json','283260aMwstf','5024844iKhPwC'];a13_0x29d8=function(){return _0x200b81;};return a13_0x29d8();}function a13_0x5ac6(_0x1bdd6f,_0x3b96fd){_0x1bdd6f=_0x1bdd6f-0x198;const _0x29d89d=a13_0x29d8();let _0x5ac631=_0x29d89d[_0x1bdd6f];return _0x5ac631;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0x275c91=a13_0x5ac6;try{if(!existsSync(cookieFile))return null;const _0x1f8265=readFileSync(cookieFile,_0x275c91(0x19e)),_0x106a82=await fetch(getUserDomain()+_0x275c91(0x1a0),{'headers':{'cookie':_0x1f8265}});if(!_0x106a82['ok'])return null;const _0x281c53=await _0x106a82[_0x275c91(0x1a2)]();if(!_0x281c53[_0x275c91(0x1a1)]||!_0x281c53['user'])return null;return _0x281c53;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a14_0x38ab(){const _0x599545=['json','utf-8','864760kqWzTp','1414773DLrrxz','281683isXeza','/api/auth/get-session','760560ZJGWWP','2EUqPLI','232VvudpE','1059220timduJ','3689bXhcRy','271044BVZywW','user'];a14_0x38ab=function(){return _0x599545;};return a14_0x38ab();}(function(_0x48a765,_0x31ab16){const _0x56f9f6=a14_0x3449,_0x41ad26=_0x48a765();while(!![]){try{const _0x19fc34=-parseInt(_0x56f9f6(0x157))/0x1*(-parseInt(_0x56f9f6(0x15a))/0x2)+-parseInt(_0x56f9f6(0x15e))/0x3+-parseInt(_0x56f9f6(0x15c))/0x4+parseInt(_0x56f9f6(0x155))/0x5+-parseInt(_0x56f9f6(0x159))/0x6+parseInt(_0x56f9f6(0x15d))/0x7*(parseInt(_0x56f9f6(0x15b))/0x8)+parseInt(_0x56f9f6(0x156))/0x9;if(_0x19fc34===_0x31ab16)break;else _0x41ad26['push'](_0x41ad26['shift']());}catch(_0x4e230e){_0x41ad26['push'](_0x41ad26['shift']());}}}(a14_0x38ab,0x23732));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a14_0x3449(_0x4ba89e,_0x3da29c){_0x4ba89e=_0x4ba89e-0x155;const _0x38ab5d=a14_0x38ab();let _0x344949=_0x38ab5d[_0x4ba89e];return _0x344949;}export async function getIsSessionValid(){const _0x5b4bd5=a14_0x3449;try{if(!existsSync(cookieFile))return![];const _0x32394d=readFileSync(cookieFile,_0x5b4bd5(0x161)),_0x5323db=await fetch(getUserDomain()+_0x5b4bd5(0x158),{'headers':{'cookie':_0x32394d}})['then'](_0x1c5cc6=>_0x1c5cc6[_0x5b4bd5(0x160)]());return _0x5323db&&_0x5323db['session']&&_0x5323db[_0x5b4bd5(0x15f)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a15_0x3ff2(){const _0x51f1c0=['636982jmtEaG','43374dSSRyp','320rCHyvn','10860280ulPJNf','<!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>','1017KEVUDP','1XJztWj','1407wTKxEh','37631594lQauox','136008AaDfye','27628etVNeP','394398rcWtAP'];a15_0x3ff2=function(){return _0x51f1c0;};return a15_0x3ff2();}(function(_0x3dd875,_0x5b8e44){const _0x2a5ca1=a15_0x2d2e,_0x75e32e=_0x3dd875();while(!![]){try{const _0x4ed2e6=parseInt(_0x2a5ca1(0xc1))/0x1*(-parseInt(_0x2a5ca1(0xbb))/0x2)+-parseInt(_0x2a5ca1(0xba))/0x3+parseInt(_0x2a5ca1(0xc5))/0x4*(-parseInt(_0x2a5ca1(0xbd))/0x5)+parseInt(_0x2a5ca1(0xbc))/0x6*(parseInt(_0x2a5ca1(0xc2))/0x7)+-parseInt(_0x2a5ca1(0xc4))/0x8*(parseInt(_0x2a5ca1(0xc0))/0x9)+-parseInt(_0x2a5ca1(0xbe))/0xa+parseInt(_0x2a5ca1(0xc3))/0xb;if(_0x4ed2e6===_0x5b8e44)break;else _0x75e32e['push'](_0x75e32e['shift']());}catch(_0x1318b4){_0x75e32e['push'](_0x75e32e['shift']());}}}(a15_0x3ff2,0xee059));function a15_0x2d2e(_0x2125c5,_0x4ed8b3){_0x2125c5=_0x2125c5-0xba;const _0x3ff2e6=a15_0x3ff2();let _0x2d2e65=_0x3ff2e6[_0x2125c5];return _0x2d2e65;}export function buildLoginSuccessHtml(){const _0x4335cb=a15_0x2d2e,_0x21f785='Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.';return _0x4335cb(0xbf)+_0x21f785+'</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>';}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a16_0x15c9(_0x5a8ad8,_0x1ee9ad){_0x5a8ad8=_0x5a8ad8-0x1da;var _0x476cc3=a16_0x476c();var _0x15c9d2=_0x476cc3[_0x5a8ad8];return _0x15c9d2;}(function(_0x2938f6,_0x54aedd){var _0x4cba15=a16_0x15c9,_0x17f69a=_0x2938f6();while(!![]){try{var _0x433017=-parseInt(_0x4cba15(0x1db))/0x1+-parseInt(_0x4cba15(0x1e4))/0x2+parseInt(_0x4cba15(0x1e1))/0x3+parseInt(_0x4cba15(0x1dc))/0x4+-parseInt(_0x4cba15(0x1e0))/0x5*(parseInt(_0x4cba15(0x1dd))/0x6)+-parseInt(_0x4cba15(0x1e3))/0x7+parseInt(_0x4cba15(0x1e5))/0x8*(parseInt(_0x4cba15(0x1e2))/0x9);if(_0x433017===_0x54aedd)break;else _0x17f69a['push'](_0x17f69a['shift']());}catch(_0x12f5e1){_0x17f69a['push'](_0x17f69a['shift']());}}}(a16_0x476c,0x72985));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function logout(){var _0x436df2=a16_0x15c9;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x436df2(0x1da)](_0x436df2(0x1df))):console[_0x436df2(0x1da)](_0x436df2(0x1de));}function a16_0x476c(){var _0x56c13e=['!\x20Not\x20logged\x20in','โ\x20Logged\x20out','151975XUpUbf','766866MBYGDb','90eSxvfg','1903916cevmxh','200854aNthgg','543768YSBjsO','log','302693zjXXgs','2295588CDYNuI','72BOdsQr'];a16_0x476c=function(){return _0x56c13e;};return a16_0x476c();}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a17_0x52ee(){const _0x26bc61=['12198008NWCyXj','32094DHXaMn','1706ILOCZz','460VaHQcP','5256132GsyRBU','27446859lHvwKh','7RRiOoR','8118LEIFob','2320iYnwVu','1713072rxQuwc','1937LKnxcw'];a17_0x52ee=function(){return _0x26bc61;};return a17_0x52ee();}function a17_0x15d6(_0x1a49ce,_0x39d13e){_0x1a49ce=_0x1a49ce-0x88;const _0x52eecb=a17_0x52ee();let _0x15d6b7=_0x52eecb[_0x1a49ce];return _0x15d6b7;}(function(_0x582a9d,_0xfaa6af){const _0x53948f=a17_0x15d6,_0x69a8bc=_0x582a9d();while(!![]){try{const _0x1319ba=-parseInt(_0x53948f(0x8b))/0x1*(parseInt(_0x53948f(0x8e))/0x2)+parseInt(_0x53948f(0x8a))/0x3+parseInt(_0x53948f(0x90))/0x4+-parseInt(_0x53948f(0x8f))/0x5*(parseInt(_0x53948f(0x8d))/0x6)+-parseInt(_0x53948f(0x92))/0x7*(parseInt(_0x53948f(0x8c))/0x8)+-parseInt(_0x53948f(0x88))/0x9*(-parseInt(_0x53948f(0x89))/0xa)+parseInt(_0x53948f(0x91))/0xb;if(_0x1319ba===_0xfaa6af)break;else _0x69a8bc['push'](_0x69a8bc['shift']());}catch(_0x402ebc){_0x69a8bc['push'](_0x69a8bc['shift']());}}}(a17_0x52ee,0xe0b32));export const dynamicCliFlags={'enableBffSave':{'type':'boolean'}};
|