@lovrabet/rabetbase-cli 2.5.9-beta.1 → 2.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/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 +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a0_0x41c124=a0_0x60fa;(function(_0x799a6,_0x5a826a){const _0x2e4a55=a0_0x60fa,_0x51ac78=_0x799a6();while(!![]){try{const _0x4f081a=-parseInt(_0x2e4a55(0x1cc))/0x1*(-parseInt(_0x2e4a55(0x1ca))/0x2)+-parseInt(_0x2e4a55(0x1d1))/0x3*(-parseInt(_0x2e4a55(0x1d5))/0x4)+-parseInt(_0x2e4a55(0x1c4))/0x5+parseInt(_0x2e4a55(0x1c9))/0x6+-parseInt(_0x2e4a55(0x1c8))/0x7*(-parseInt(_0x2e4a55(0x1c6))/0x8)+-parseInt(_0x2e4a55(0x1c1))/0x9+parseInt(_0x2e4a55(0x1bd))/0xa*(-parseInt(_0x2e4a55(0x1c0))/0xb);if(_0x4f081a===_0x5a826a)break;else _0x51ac78['push'](_0x51ac78['shift']());}catch(_0x35951b){_0x51ac78['push'](_0x51ac78['shift']());}}}(a0_0x2271,0x205d0));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x31c53d from'node:path';import{fetchDatasetDoc}from'../core/api-client.js';import{logger}from'../utils/logger.js';function a0_0x2271(){const _0x186d25=['185870hnKtci','utf8','datasetCode','253byhUWo','10044XhpuWU','Failed\x20to\x20generate\x20docs:\x20','log','621505QiLrCh','./docs','13288numxBG','.md\x20-\x20','812VVUdON','1382358XTSIXB','2NxpOQi','error','6421vMWinp','name','Generated\x20docs\x20successfully:\x20','Waiting\x203\x20seconds...\x0a','.md','191991glNNQG','push','message','api-doc','16XvGrrI'];a0_0x2271=function(){return _0x186d25;};return a0_0x2271();}export{fetchDatasetDoc}from'../core/api-client.js';function a0_0x60fa(_0x20c4c2,_0x5c1332){_0x20c4c2=_0x20c4c2-0x1bd;const _0x2271fb=a0_0x2271();let _0x60fa4d=_0x2271fb[_0x20c4c2];return _0x60fa4d;}function delay(_0x232d01){return new Promise(_0x566fda=>setTimeout(_0x566fda,_0x232d01));}export async function generateDatasetDocs(_0x4f149d,_0x5d2c24,_0x3e3f1e,_0xb542be=a0_0x41c124(0x1c5),_0x5494db,_0x529a70){const _0x1d8b60=a0_0x41c124;mkdirSync(_0xb542be,{'recursive':!![]});const _0x553995=[],_0x406b0c=_0x4f149d['length'];console[_0x1d8b60(0x1c3)]('\x0a'+_0x406b0c+'\x20datasets\x20to\x20generate\x20docs\x20for\x0a');for(let _0x8bd40e=0x0;_0x8bd40e<_0x4f149d['length'];_0x8bd40e++){const _0x40988f=_0x4f149d[_0x8bd40e],_0x1f39bc=_0x8bd40e+0x1,_0x2aa474=_0x40988f['tableName'];try{console[_0x1d8b60(0x1c3)]('['+_0x1f39bc+'/'+_0x406b0c+']\x20Generating:\x20'+_0x2aa474+'.md\x20('+_0x40988f[_0x1d8b60(0x1cd)]+')');if(_0x5494db)_0x5494db(_0x1f39bc,_0x406b0c,_0x2aa474);const _0x2f460d=await fetchDatasetDoc({'appCode':_0x5d2c24,'cookie':_0x3e3f1e,'datasetCode':_0x40988f[_0x1d8b60(0x1bf)],'datasetId':_0x40988f['id'],'enableAI':![],'extraParams':_0x529a70}),_0x331bea=a0_0x31c53d['join'](_0xb542be,_0x2aa474+'.md');writeFileSync(_0x331bea,_0x2f460d,{'encoding':_0x1d8b60(0x1be)}),console[_0x1d8b60(0x1c3)]('✓\x20Generated:\x20'+_0x2aa474+_0x1d8b60(0x1d0)),logger['success'](_0x1d8b60(0x1d4),_0x1d8b60(0x1ce)+_0x2aa474,undefined,{'datasetCode':_0x40988f[_0x1d8b60(0x1bf)],'datasetName':_0x40988f[_0x1d8b60(0x1cd)],'filePath':_0x331bea,'progress':_0x1f39bc+'/'+_0x406b0c}),_0x553995['push']({'datasetCode':_0x40988f[_0x1d8b60(0x1bf)],'datasetName':_0x40988f[_0x1d8b60(0x1cd)],'filePath':_0x331bea,'success':!![]});if(_0x1f39bc<_0x406b0c)await delay(0x1388);}catch(_0x2aacc8){const _0x17a894=_0x2aacc8 instanceof Error?_0x2aacc8[_0x1d8b60(0x1d3)]:String(_0x2aacc8);console[_0x1d8b60(0x1c3)]('✗\x20Failed:\x20'+_0x2aa474+_0x1d8b60(0x1c7)+_0x17a894),logger[_0x1d8b60(0x1cb)](_0x1d8b60(0x1d4),_0x1d8b60(0x1c2)+_0x40988f[_0x1d8b60(0x1bf)],{'datasetCode':_0x40988f['datasetCode'],'datasetName':_0x40988f[_0x1d8b60(0x1cd)],'error':_0x17a894,'progress':_0x1f39bc+'/'+_0x406b0c}),_0x553995[_0x1d8b60(0x1d2)]({'datasetCode':_0x40988f[_0x1d8b60(0x1bf)],'datasetName':_0x40988f[_0x1d8b60(0x1cd)],'filePath':'','success':![],'error':_0x17a894}),_0x1f39bc<_0x406b0c&&(console[_0x1d8b60(0x1c3)](_0x1d8b60(0x1cf)),await delay(0xbb8));}}return _0x553995;}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x11e372=a1_0x1401;(function(_0x539e54,_0x428a72){const _0x112cb8=a1_0x1401,_0x1a065f=_0x539e54();while(!![]){try{const _0x576eb7=-parseInt(_0x112cb8(0xa1))/0x1*(parseInt(_0x112cb8(0xaf))/0x2)+parseInt(_0x112cb8(0xa7))/0x3+parseInt(_0x112cb8(0x98))/0x4+-parseInt(_0x112cb8(0xb2))/0x5*(parseInt(_0x112cb8(0xb0))/0x6)+-parseInt(_0x112cb8(0x9b))/0x7*(-parseInt(_0x112cb8(0x9c))/0x8)+-parseInt(_0x112cb8(0xb6))/0x9+parseInt(_0x112cb8(0x9e))/0xa*(parseInt(_0x112cb8(0xb1))/0xb);if(_0x576eb7===_0x428a72)break;else _0x1a065f['push'](_0x1a065f['shift']());}catch(_0x2ddfac){_0x1a065f['push'](_0x1a065f['shift']());}}}(a1_0x3466,0xaece3));import a1_0x2c032d from'node:path';import{CliErrors}from'../errors.js';export function normalizeApiDir(_0xe9a518,_0x237761=process['cwd']()){const _0x28204d=a1_0x1401;return a1_0x2c032d[_0x28204d(0xaa)](_0x237761,_0xe9a518);}function a1_0x3466(){const _0x553041=['validation','resolve','name','filter','app','Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.','24162oznzQt','1495182Ppjieb','8547528nHsUVp','25sbjJxb','.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.','Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20','size','8513289MzpZko','normalizedApiDir','apiGroup','set','flatMap','4853184SuxwQG','join','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','1057KwJYmV','24392kXHwWQ','push','20qjOQaY','values','cwd','28XpRmus','API\x20group\x20\x22','map','\x22\x20resolves\x20to\x20multiple\x20API\x20directories.','get','outputDir','55158GfMKEo','some'];a1_0x3466=function(){return _0x553041;};return a1_0x3466();}function normalizedApiGroup(_0xffea35){const _0x4f77a8=_0xffea35?.['trim']();return _0x4f77a8||undefined;}export function resolveApiProfileLayouts(_0x46bcb3,_0x1fc61f,_0x24620c=process[a1_0x11e372(0xa0)]()){const _0xff112c=a1_0x11e372,_0x5e11c9=_0x46bcb3[_0xff112c(0xa3)](_0x120ab1=>{const _0x396504=_0x1fc61f(_0x120ab1);return{'app':_0x120ab1,'outputDir':_0x396504,'normalizedApiDir':normalizeApiDir(_0x396504,_0x24620c),'apiGroup':normalizedApiGroup(_0x120ab1['apiGroup'])};}),_0x4190c1=new Map();for(const _0x28cf2c of _0x5e11c9){if(!_0x28cf2c[_0xff112c(0xb8)])continue;const _0x5836ed=_0x4190c1[_0xff112c(0xa5)](_0x28cf2c[_0xff112c(0xb8)])??new Set();_0x5836ed['add'](_0x28cf2c['normalizedApiDir']),_0x4190c1['set'](_0x28cf2c['apiGroup'],_0x5836ed);}for(const [_0x1b39db,_0x2ab357]of _0x4190c1){if(_0x2ab357[_0xff112c(0xb5)]>0x1)throw CliErrors[_0xff112c(0xa9)](_0xff112c(0xa2)+_0x1b39db+_0xff112c(0xa4),_0xff112c(0xae));}const _0x3f3204=new Map();for(const _0x420e16 of _0x5e11c9){const _0x1199ca=_0x3f3204['get'](_0x420e16['normalizedApiDir'])??[];_0x1199ca[_0xff112c(0x9d)](_0x420e16),_0x3f3204[_0xff112c(0xb9)](_0x420e16[_0xff112c(0xb7)],_0x1199ca);}for(const _0x1c34f5 of _0x3f3204[_0xff112c(0x9f)]()){const _0x12164b=new Set(_0x1c34f5[_0xff112c(0xba)](_0x42bcf1=>_0x42bcf1[_0xff112c(0xb8)]?[_0x42bcf1['apiGroup']]:[]));if(_0x12164b[_0xff112c(0xb5)]===0x0)continue;if(_0x12164b[_0xff112c(0xb5)]>0x1||_0x1c34f5[_0xff112c(0xa8)](_0x16852c=>!_0x16852c[_0xff112c(0xb8)])){const _0x370a47=_0x1c34f5[_0xff112c(0xa3)](_0x557dd8=>_0x557dd8[_0xff112c(0xad)][_0xff112c(0xab)])[_0xff112c(0x99)](',\x20');throw CliErrors['validation']('API\x20directory\x20\x22'+_0x1c34f5[0x0][_0xff112c(0xa6)]+_0xff112c(0x9a),_0xff112c(0xb4)+_0x370a47+_0xff112c(0xb3));}}return _0x5e11c9;}function a1_0x1401(_0x4c31f0,_0x47f166){_0x4c31f0=_0x4c31f0-0x98;const _0x34665b=a1_0x3466();let _0x1401d2=_0x34665b[_0x4c31f0];return _0x1401d2;}export function getRegistryGroup(_0x372b69,_0x2d5409){const _0x37d675=a1_0x11e372;if(_0x2d5409['apiGroup'])return _0x372b69[_0x37d675(0xac)](_0x42de6e=>_0x42de6e[_0x37d675(0xb8)]===_0x2d5409[_0x37d675(0xb8)]);const _0x3442a8=_0x372b69[_0x37d675(0xac)](_0x464cfc=>_0x464cfc['normalizedApiDir']===_0x2d5409[_0x37d675(0xb7)]);return _0x3442a8['length']===0x1?_0x3442a8:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1826ba,_0x32e083){var _0x57b613=a2_0x3339,_0x25eea0=_0x1826ba();while(!![]){try{var _0x3fbb93=-parseInt(_0x57b613(0x104))/0x1+parseInt(_0x57b613(0xfe))/0x2*(-parseInt(_0x57b613(0x109))/0x3)+parseInt(_0x57b613(0xff))/0x4*(-parseInt(_0x57b613(0x106))/0x5)+-parseInt(_0x57b613(0x101))/0x6+-parseInt(_0x57b613(0x100))/0x7*(-parseInt(_0x57b613(0x108))/0x8)+-parseInt(_0x57b613(0x107))/0x9*(-parseInt(_0x57b613(0x102))/0xa)+-parseInt(_0x57b613(0x105))/0xb*(-parseInt(_0x57b613(0x103))/0xc);if(_0x3fbb93===_0x32e083)break;else _0x25eea0['push'](_0x25eea0['shift']());}catch(_0x2898ed){_0x25eea0['push'](_0x25eea0['shift']());}}}(a2_0x5cd3,0xb66f7));export{fetchModelList}from'../core/api-client.js';function a2_0x3339(_0x478a67,_0x39d466){_0x478a67=_0x478a67-0xfe;var _0x5cd3b8=a2_0x5cd3();var _0x333966=_0x5cd3b8[_0x478a67];return _0x333966;}function a2_0x5cd3(){var _0x5ab8ff=['24cYjNYO','21opepEJ','229102ifcZqC','74956ohkrXv','1502858JpZMSi','22656jXTgkG','11165740DQUNzO','92424CvtbMJ','1165510ZokgTb','2706njAYSK','250VVqmVM','9HBPakJ'];a2_0x5cd3=function(){return _0x5ab8ff;};return a2_0x5cd3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x571328,_0x529e60){const _0x130f91=a3_0x5f5a,_0x1b6a6a=_0x571328();while(!![]){try{const _0x53c866=-parseInt(_0x130f91(0xaa))/0x1*(parseInt(_0x130f91(0xbe))/0x2)+parseInt(_0x130f91(0xa4))/0x3*(-parseInt(_0x130f91(0x8b))/0x4)+parseInt(_0x130f91(0xc1))/0x5+parseInt(_0x130f91(0x90))/0x6*(-parseInt(_0x130f91(0x8f))/0x7)+-parseInt(_0x130f91(0x9b))/0x8*(-parseInt(_0x130f91(0x8d))/0x9)+-parseInt(_0x130f91(0x9e))/0xa+parseInt(_0x130f91(0x8e))/0xb;if(_0x53c866===_0x529e60)break;else _0x1b6a6a['push'](_0x1b6a6a['shift']());}catch(_0x1677cb){_0x1b6a6a['push'](_0x1b6a6a['shift']());}}}(a3_0x1300,0xdc4de));function a3_0x1300(){const _0x902bef=['defaultName','\x20config\x20set\x20app\x20<value>`','client','.ts','format','templates/generate-api','test','resolve',',\x20env:\x20','existed','default','stringify','path','datasetCode','missing','action','API\x20scaffold\x20written.','modelRuntime','1923092UsoZkD','preserved','LOVRABET','4484100XUhxyx','utf8','overwriteTypescript','includes','{\x20apiConfigName:\x20','key','refreshed','created','4716dxBxwV','none','4784436gkeQLU','41670860KyDfDy','193886jvCjHj','138pFcbQY','CONFIG_NAMES.DEFAULT','init-api','LOVRABET_RUNTIME_DOMAIN','../..','basename','map','name','Model\x20facts\x20refreshed.','replaceApiContent','tableName','8bxktWy','alias','success','15449710gIidIz','join','client.ts.tpl','api','-api',',\x20...LOVRABET_SDK_CONFIG\x20}','2979CxABlD','-client','typescript','replace','allowEmptyModelReplacement','modelProfile','1wpDXkA','overwritten'];a3_0x1300=function(){return _0x902bef;};return a3_0x1300();}import a3_0x3507b8 from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x1e6c4f from'node:path';import{fileURLToPath}from'node:url';function a3_0x5f5a(_0x230272,_0x3ad5a3){_0x230272=_0x230272-0x8a;const _0x13009d=a3_0x1300();let _0x5f5add=_0x13009d[_0x230272];return _0x5f5add;}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(_0x2727b6,_0x3e1224){const _0x3ad8e4=a3_0x5f5a;if(!_0x3e1224)return _0x2727b6?_0x3ad8e4(0xbf):_0x3ad8e4(0xba);return _0x2727b6?_0x3ad8e4(0xab):'created';}export async function generateApiFile(_0xf0761,_0xdb246e,_0x1253a0,_0x4d1fbd,_0x118d6c,_0x2d28d3,_0x44dbe0,_0x17dade={},_0xc293cc={}){const _0x3a1d2f=a3_0x5f5a;if(!_0x1253a0)throw new Error('Please\x20configure\x20app\x20code\x20first\x20via\x20`'+CLI_BIN_NAME+_0x3a1d2f(0xad));const _0x4f90ef=_0x4d1fbd&&!_0x44dbe0,_0x244803=!!_0xc293cc[_0x3a1d2f(0xa9)],_0x124e78=_0x244803||_0x4f90ef,_0x18eaca=_0x44dbe0||_0x1253a0,_0x252f90=_0x244803||_0x4f90ef?_0x3a1d2f(0xb6):_0x18eaca,_0x32de45=_0x244803||_0x4f90ef?_0x3a1d2f(0x91):JSON[_0x3a1d2f(0xb7)](_0x18eaca),_0x3583b2=!isProduction(_0x118d6c),_0x15bdd6=_0x3583b2?_0x3a1d2f(0xb4)+JSON[_0x3a1d2f(0xb7)](_0x118d6c):'',_0x3612bf=_0x3a1d2f(0xc5)+_0x32de45+_0x15bdd6+_0x3a1d2f(0xa3),_0x4d084a=_0x244803?'':_0xdb246e,_0x3ee1e8=_0x4d084a?_0x4d084a+_0x3a1d2f(0xa2):'api',_0x263b0f=_0x4d084a?_0x4d084a+_0x3a1d2f(0xa5):_0x3a1d2f(0xae),_0x4f42dd=_0x4d084a&&!/^app-[a-f0-9]+$/i[_0x3a1d2f(0xb2)](_0x4d084a)?_0x4d084a[_0x3a1d2f(0xa7)](/-/g,'_')['toUpperCase']():_0x3a1d2f(0xc0),_0x39a20b=/^\d/['test'](_0x4f42dd)?'APP_'+_0x4f42dd:_0x4f42dd,_0x4452bd=_0xf0761[_0x3a1d2f(0x96)](_0x3e09fb=>({'datasetCode':_0x3e09fb[_0x3a1d2f(0xb9)],'tableName':_0x3e09fb[_0x3a1d2f(0x9a)],'name':_0x3e09fb[_0x3a1d2f(0x97)]||'','alias':_0x3e09fb['alias']||_0x3e09fb[_0x3a1d2f(0xc6)]})),_0x2b59fb=fileURLToPath(import.meta.url),_0x4af092=a3_0x1e6c4f[_0x3a1d2f(0xb3)](a3_0x1e6c4f['dirname'](_0x2b59fb),_0x3a1d2f(0x94)),_0x3ee8fb=a3_0x1e6c4f['join'](_0x4af092,_0x3a1d2f(0xb1)),_0x1b6c4e=a3_0x1e6c4f[_0x3a1d2f(0x9f)](_0x3ee8fb,'api.ts.tpl'),_0x4cac8e=a3_0x1e6c4f['join'](_0x3ee8fb,_0x3a1d2f(0xa0)),_0x410af2=_0x2d28d3;mkdirSync(_0x410af2,{'recursive':!![]});const _0x467f62=_0x244803?{}:_0x17dade,_0x182331=await generateSdkConfigFile(_0x410af2,_0x467f62,_0x4d084a),_0x2c802b=a3_0x1e6c4f['basename'](_0x182331,_0x3a1d2f(0xaf)),_0x48f864=a3_0x1e6c4f['join'](_0x410af2,_0x3ee1e8+_0x3a1d2f(0xaf)),_0x14f2bf=a3_0x1e6c4f[_0x3a1d2f(0x9f)](_0x410af2,_0x263b0f+_0x3a1d2f(0xaf)),_0x366a1d=_0xc293cc[_0x3a1d2f(0xc3)]===!![],_0x27984f=existsSync(_0x48f864),_0x2b4782=existsSync(_0x14f2bf),_0x53e3b8=_0xc293cc['scaffoldMode']??(_0x366a1d?_0x3a1d2f(0xa7):_0x3a1d2f(0xba)),_0x558c09=_0x53e3b8===_0x3a1d2f(0xa7)||_0x53e3b8===_0x3a1d2f(0xba)&&!_0x27984f,_0x3f05a5=_0x53e3b8==='replace'||_0x53e3b8===_0x3a1d2f(0xba)&&!_0x2b4782,_0x55bf76=_0xc293cc[_0x3a1d2f(0xa9)]?updateModelRegistry({'outputDir':_0x410af2,'profileName':_0xc293cc[_0x3a1d2f(0xa9)]['name'],'defaultProfile':_0xc293cc[_0x3a1d2f(0xa9)][_0x3a1d2f(0xac)],'appCode':_0x1253a0,'runtimeDomain':_0xc293cc[_0x3a1d2f(0xa9)]['runtimeDomain'],'models':_0x4452bd,'allowEmptyReplacement':_0xc293cc[_0x3a1d2f(0xa8)]===!![]}):undefined,_0x2559fc=_0x55bf76?a3_0x1e6c4f['join'](_0x410af2,MODEL_RUNTIME_FILE_NAME):undefined,_0x44bf3f=_0x2559fc?existsSync(_0x2559fc):![],_0x1593dd=_0x244803&&_0x53e3b8!==_0x3a1d2f(0x8c)?await renderModelRegistryScaffold(_0x410af2):undefined;_0x2559fc&&_0x1593dd&&writeFileSync(_0x2559fc,_0x1593dd[_0x3a1d2f(0xbd)],'utf8');const _0x37f39a=_0x4452bd[0x0]?.[_0x3a1d2f(0x9c)];if(_0x558c09){const _0x546af2=_0x1593dd?.[_0x3a1d2f(0xa1)]??readFileSync(_0x1b6c4e,'utf8'),_0x14297f=_0x244803?_0x546af2:TemplateReplacer[_0x3a1d2f(0x99)](_0x546af2,_0x1253a0,_0x4452bd,_0x37f39a,_0x3ee1e8,_0x32de45,undefined,_0x39a20b);writeFileSync(_0x48f864,await a3_0x3507b8[_0x3a1d2f(0xb0)](_0x14297f,{'parser':_0x3a1d2f(0xa6)}),{'encoding':_0x3a1d2f(0xc2)});}if(_0x3f05a5){const _0x2bb2a7=_0x1593dd?.['client']??readFileSync(_0x4cac8e,'utf8'),_0x35b6a3=_0x244803?_0x2bb2a7:TemplateReplacer[_0x3a1d2f(0x99)](_0x2bb2a7,_0x1253a0,_0x4452bd,_0x37f39a,_0x3ee1e8,_0x32de45,_0x3612bf,_0x39a20b,_0x2c802b);writeFileSync(_0x14f2bf,await a3_0x3507b8[_0x3a1d2f(0xb0)](_0x35b6a3,{'parser':'typescript'}),{'encoding':_0x3a1d2f(0xc2)});}const _0x406b4e=_0x4452bd['length'],_0x25ad16={'api':{'path':_0x48f864,'action':fileAction(_0x27984f,_0x558c09)},'client':{'path':_0x14f2bf,'action':fileAction(_0x2b4782,_0x3f05a5)},'sdkConfig':{'path':_0x182331,'action':_0x3a1d2f(0xc7)},..._0x55bf76?{'modelRegistry':{'path':_0x55bf76['path'],'action':_0x55bf76[_0x3a1d2f(0xb5)]?_0x3a1d2f(0xc7):_0x3a1d2f(0x8a)},'modelRuntime':{'path':_0x2559fc,'action':_0x1593dd?_0x44bf3f?'refreshed':_0x3a1d2f(0x8a):_0x44bf3f?_0x3a1d2f(0xbf):_0x3a1d2f(0xba)}}:{}},_0x288ae6=existsSync(_0x48f864)&&readFileSync(_0x48f864,_0x3a1d2f(0xc2))[_0x3a1d2f(0xc4)](MODEL_REGISTRY_FILE_NAME[_0x3a1d2f(0xa7)]('.ts','')),_0x4050c0=existsSync(_0x14f2bf)&&readFileSync(_0x14f2bf,_0x3a1d2f(0xc2))['includes'](_0x3a1d2f(0x93)),_0x59396d=_0x244803?!_0x288ae6||!_0x4050c0||!existsSync(_0x2559fc):![],_0x35778f=_0x244803?_0x59396d:_0x25ad16[_0x3a1d2f(0xa1)]['action']===_0x3a1d2f(0xbf)||_0x25ad16[_0x3a1d2f(0xae)][_0x3a1d2f(0xbb)]===_0x3a1d2f(0xbf);return logger[_0x3a1d2f(0x9d)](_0x3a1d2f(0x92),_0x35778f?a3_0x1e6c4f[_0x3a1d2f(0x95)](_0x182331)+'\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.':_0x244803?_0x3a1d2f(0x98):_0x3a1d2f(0xbc),undefined,{'apiFile':_0x48f864,'clientFile':_0x14f2bf,'sdkConfig':_0x182331,'modelCount':_0x406b4e,'configName':_0x252f90,'isDefaultConfig':_0x124e78,'needsAgentMerge':_0x35778f,'needsProjectUpgrade':_0x59396d,'files':_0x25ad16}),{'appCode':_0x1253a0,'modelCount':_0x406b4e,'models':_0x4452bd,'apiFilePath':_0x48f864,'clientFilePath':_0x14f2bf,'sdkConfigPath':_0x182331,'modelRegistryPath':_0x55bf76?.[_0x3a1d2f(0xb8)],'modelRuntimePath':_0x2559fc,'modelProfile':_0xc293cc[_0x3a1d2f(0xa9)]?.[_0x3a1d2f(0x97)],'configName':_0x252f90,'isDefaultConfig':_0x124e78,'sdkRouting':_0x467f62,'files':_0x25ad16,'needsAgentMerge':_0x35778f,'needsProjectUpgrade':_0x59396d};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a4_0x456b(_0x4f3095,_0x4cfb01){_0x4f3095=_0x4f3095-0x1e5;const _0x2dbf42=a4_0x2dbf();let _0x456b12=_0x2dbf42[_0x4f3095];return _0x456b12;}const a4_0x10844f=a4_0x456b;function a4_0x2dbf(){const _0x3e52aa=['5737lEUkaL',',\x0a}','2070184TJrEMu','push','-sdk-config.ts','40DjixAD','2338105QbnbqJ','246306sPcJxb','utf8','907375AXmOOo','56487MLyEQr','24sDxOxG','length','\x20as\x20const;\x0a','format','runtimeDomain:\x20','join','1653170RVctlr','18YtbXYl','runtimeDomain',',\x0a\x20\x20','sdk-config.ts','/**\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','36kPWdBP'];a4_0x2dbf=function(){return _0x3e52aa;};return a4_0x2dbf();}(function(_0x16a1a6,_0x5b09d3){const _0x2118ec=a4_0x456b,_0x32da5a=_0x16a1a6();while(!![]){try{const _0x5b40ea=parseInt(_0x2118ec(0x1f9))/0x1*(-parseInt(_0x2118ec(0x1ec))/0x2)+parseInt(_0x2118ec(0x1eb))/0x3*(parseInt(_0x2118ec(0x1f8))/0x4)+-parseInt(_0x2118ec(0x1e6))/0x5*(-parseInt(_0x2118ec(0x1e8))/0x6)+parseInt(_0x2118ec(0x1ea))/0x7+-parseInt(_0x2118ec(0x1fb))/0x8+parseInt(_0x2118ec(0x1f3))/0x9*(-parseInt(_0x2118ec(0x1f2))/0xa)+parseInt(_0x2118ec(0x1e7))/0xb;if(_0x5b40ea===_0x5b09d3)break;else _0x32da5a['push'](_0x32da5a['shift']());}catch(_0x456d25){_0x32da5a['push'](_0x32da5a['shift']());}}}(a4_0x2dbf,0x2c626));import{mkdirSync,writeFileSync}from'node:fs';import a4_0x385757 from'node:path';import a4_0x41a235 from'prettier';export const SDK_CONFIG_FILE_NAME=a4_0x10844f(0x1f6);export function getSdkConfigFileName(_0x5f0108=''){const _0xbba8a0=a4_0x10844f;return _0x5f0108?_0x5f0108+_0xbba8a0(0x1e5):SDK_CONFIG_FILE_NAME;}export async function generateSdkConfigFile(_0x444577,_0x33acc3={},_0xdbcb01=''){const _0x2c4e37=a4_0x10844f,_0x1723b1=[];_0x33acc3[_0x2c4e37(0x1f4)]&&_0x1723b1[_0x2c4e37(0x1fc)](_0x2c4e37(0x1f0)+JSON['stringify'](_0x33acc3['runtimeDomain']));const _0x27b44c=_0x1723b1[_0x2c4e37(0x1ed)]>0x0?'{\x0a\x20\x20'+_0x1723b1[_0x2c4e37(0x1f1)](_0x2c4e37(0x1f5))+_0x2c4e37(0x1fa):'{}',_0x529ce6=_0x2c4e37(0x1f7)+_0x27b44c+_0x2c4e37(0x1ee);mkdirSync(_0x444577,{'recursive':!![]});const _0x337d6a=a4_0x385757[_0x2c4e37(0x1f1)](_0x444577,getSdkConfigFileName(_0xdbcb01));return writeFileSync(_0x337d6a,await a4_0x41a235[_0x2c4e37(0x1ef)](_0x529ce6,{'parser':'typescript'}),_0x2c4e37(0x1e9)),_0x337d6a;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2e6c60,_0x13b859){const _0x5e09dd=a5_0xfe70,_0x656338=_0x2e6c60();while(!![]){try{const _0x419636=parseInt(_0x5e09dd(0x129))/0x1+parseInt(_0x5e09dd(0x133))/0x2*(-parseInt(_0x5e09dd(0x12f))/0x3)+parseInt(_0x5e09dd(0x126))/0x4*(parseInt(_0x5e09dd(0x137))/0x5)+-parseInt(_0x5e09dd(0x12a))/0x6*(parseInt(_0x5e09dd(0x135))/0x7)+parseInt(_0x5e09dd(0x13b))/0x8+-parseInt(_0x5e09dd(0x13a))/0x9+parseInt(_0x5e09dd(0x130))/0xa*(parseInt(_0x5e09dd(0x12e))/0xb);if(_0x419636===_0x13b859)break;else _0x656338['push'](_0x656338['shift']());}catch(_0x3a14d1){_0x656338['push'](_0x656338['shift']());}}}(a5_0x59aa,0x4d855));export function parseLegacyApiModels(_0x1a3f17){const _0x2092f9=a5_0xfe70,_0x19229d=[],_0x4dd4b3=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0xe97b66;while((_0xe97b66=_0x4dd4b3[_0x2092f9(0x138)](_0x1a3f17))!==null){_0x19229d[_0x2092f9(0x13f)]({'datasetCode':_0xe97b66[0x1],'tableName':_0xe97b66[0x2],'name':_0xe97b66[0x3],'alias':_0xe97b66[0x4]});}return _0x19229d;}function a5_0x59aa(){const _0x18c2c2=['replace','some','lovrabetClient','push','1268pWJsJv','length','APP_CODE','486872vsjuKv','4560ZmiceL','endsWith','Generated\x20by\x20Rabetbase\x20CLI','matchAll','1285207FKArcS','38826BNmVdN','40rAjnpI','map','registerModels','62eTTLCb','MODELS_CONFIG','2758rtKCFY','@lovrabet/sdk','4300xhkFDY','exec','match','5135715FqMjae','2895696wPaQYq'];a5_0x59aa=function(){return _0x18c2c2;};return a5_0x59aa();}export function parseLegacyApiAppCode(_0x4d1714){const _0x30f115=a5_0xfe70;return _0x4d1714[_0x30f115(0x139)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function stripComments(_0x2c0157){const _0x5f2e15=a5_0xfe70;return _0x2c0157[_0x5f2e15(0x13c)](/\/\*[\s\S]*?\*\//g,'')[_0x5f2e15(0x13c)](/\/\/.*$/gm,'');}function a5_0xfe70(_0x2caff1,_0x27813c){_0x2caff1=_0x2caff1-0x126;const _0x59aa79=a5_0x59aa();let _0xfe7006=_0x59aa79[_0x2caff1];return _0xfe7006;}export function isLegacyGeneratedApiScaffold(_0x33945d){const _0x5c238d=a5_0xfe70;if(!_0x33945d['includes'](_0x5c238d(0x12c)))return![];const _0x2484d8=stripComments(_0x33945d),_0x26eb5a=[..._0x2484d8['matchAll'](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)][_0x5c238d(0x131)](_0x5e1afe=>_0x5e1afe[0x1]);if(_0x26eb5a[_0x5c238d(0x127)]!==0x1||_0x26eb5a[0x0]!==_0x5c238d(0x136))return![];const _0x3fe76e=[..._0x2484d8['matchAll'](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x5c238d(0x131)](_0x1eac7c=>_0x1eac7c[0x1]);if(_0x3fe76e[_0x5c238d(0x127)]!==0x2||!_0x3fe76e[_0x5c238d(0x13d)](_0x5d4d42=>_0x5d4d42[_0x5c238d(0x12b)](_0x5c238d(0x128)))||!_0x3fe76e['some'](_0x1b765d=>_0x1b765d['endsWith'](_0x5c238d(0x134))))return![];const _0x129586=[..._0x2484d8[_0x5c238d(0x12d)](/^([A-Za-z_$][\w$]*)\s*\(/gm)]['map'](_0x43d079=>_0x43d079[0x1]);return _0x129586[_0x5c238d(0x127)]===0x1&&_0x129586[0x0]===_0x5c238d(0x132);}export function isLegacyGeneratedClientScaffold(_0x357530){const _0x56e442=a5_0xfe70;if(!_0x357530['includes'](_0x56e442(0x12c)))return![];const _0x49293e=stripComments(_0x357530),_0x426a7a=[..._0x49293e[_0x56e442(0x12d)](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)][_0x56e442(0x131)](_0x4a82da=>_0x4a82da[0x1]);if(_0x426a7a[_0x56e442(0x13d)](_0x3fd096=>_0x3fd096!=='@lovrabet/sdk'&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/['test'](_0x3fd096??'')))return![];const _0x14c2b9=[..._0x49293e['matchAll'](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x56e442(0x131)](_0x2fd2ed=>_0x2fd2ed[0x1]);return _0x14c2b9[_0x56e442(0x127)]===0x1&&_0x14c2b9[0x0]===_0x56e442(0x13e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a6_0x3f55(){const _0x3c6fa4=['/*\x20rabetbase-model-registry:v2\x20*/','6398VGYJiP','Model\x20alias\x20\x22','profiles','find','\x22\x20and\x20\x22','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','alias','test','210Uovgem','outputDir','allowEmptyReplacement','261vNogJJ','4848BdlhGy','join','entries','\x22\x20in\x20profile\x20\x22','indexOf','slice','object','defaultProfile','lovrabet-model-registry/v2','profileName','486370nNEZcQ','appCode','/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a','\x22\x20in\x20the\x20registry\x20but\x20\x22','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','value','length','split','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','3jTSgGY','3723668zjnoZu','filter','flatMap','models','models.generated.ts','23160tzqKds','set','875EgqtHN','protocol','replace','.tmp','trim','every','stringify','35542xqRMig','fromEntries','datasetCode','parse','\x22\x20maps\x20to\x20both\x20\x22','datasetCodes','isArray','keys','map','tableName','246851IQGkAz','get','runtimeDomain','name','string','utf8','push','NOT-SET','34XWNzKA','444jamPjP','52770bgPfPM'];a6_0x3f55=function(){return _0x3c6fa4;};return a6_0x3f55();}const a6_0x3ec527=a6_0x40f6;(function(_0xe5f129,_0x2d0b77){const _0x5073dc=a6_0x40f6,_0x5d0d75=_0xe5f129();while(!![]){try{const _0x1bcf5c=parseInt(_0x5073dc(0x113))/0x1*(-parseInt(_0x5073dc(0x103))/0x2)+-parseInt(_0x5073dc(0x126))/0x3*(parseInt(_0x5073dc(0x127))/0x4)+-parseInt(_0x5073dc(0x105))/0x5*(-parseInt(_0x5073dc(0x10f))/0x6)+parseInt(_0x5073dc(0x12e))/0x7*(parseInt(_0x5073dc(0x12c))/0x8)+parseInt(_0x5073dc(0x112))/0x9*(parseInt(_0x5073dc(0x11d))/0xa)+-parseInt(_0x5073dc(0xfb))/0xb*(-parseInt(_0x5073dc(0x104))/0xc)+-parseInt(_0x5073dc(0xf1))/0xd*(parseInt(_0x5073dc(0x107))/0xe);if(_0x1bcf5c===_0x2d0b77)break;else _0x5d0d75['push'](_0x5d0d75['shift']());}catch(_0x492960){_0x5d0d75['push'](_0x5d0d75['shift']());}}}(a6_0x3f55,0xad2a4));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0xffc5aa from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x3ec527(0x12b);export const MODEL_RUNTIME_FILE_NAME='model-runtime.ts';export const MODEL_REGISTRY_VERSION_MARKER=a6_0x3ec527(0x106);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x3ec527(0x11b),REGISTRY_START='/*\x20rabetbase-model-registry:start\x20*/',REGISTRY_END='/*\x20rabetbase-model-registry:end\x20*/';function emptyRegistry(_0x5f0ea7){return{'defaultProfile':_0x5f0ea7,'profiles':{},'models':[]};}function extractRegistryJson(_0x163047){const _0x144740=a6_0x3ec527,_0x277ecd=_0x163047[_0x144740(0x117)](REGISTRY_START),_0x591842=_0x163047['indexOf'](REGISTRY_END);if(_0x277ecd<0x0||_0x591842<=_0x277ecd)return undefined;return _0x163047[_0x144740(0x118)](_0x277ecd+REGISTRY_START['length'],_0x591842)[_0x144740(0xee)]()[_0x144740(0x130)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x144740(0x130)](/;$/,'');}function migrateLegacyRegistry(_0x48c2b0){const _0x43643b=a6_0x3ec527,_0xd0e0a8=emptyRegistry(_0x48c2b0[_0x43643b(0x11a)]);for(const [_0x24d43a,_0x429e66]of Object[_0x43643b(0x115)](_0x48c2b0[_0x43643b(0x109)])){_0xd0e0a8[_0x43643b(0x109)][_0x24d43a]={'appCode':_0x429e66['appCode'],'runtimeDomain':_0x429e66['runtimeDomain']},mergeProfileModels(_0xd0e0a8,_0x24d43a,_0x429e66['models']);}return _0xd0e0a8;}function a6_0x40f6(_0x30c426,_0x40fd35){_0x30c426=_0x30c426-0xee;const _0x3f55b0=a6_0x3f55();let _0x40f612=_0x3f55b0[_0x30c426];return _0x40f612;}function generatedObjectLiteralToJson(_0x5e3844){const _0x7a3e01=a6_0x3ec527;let _0x3a1839='',_0x133694,_0x229077=![],_0x3b17c3;for(let _0x4db474=0x0;_0x4db474<_0x5e3844[_0x7a3e01(0x123)];_0x4db474++){const _0x4ef3dd=_0x5e3844[_0x4db474];if(_0x133694){_0x3a1839+=_0x4ef3dd;if(_0x229077)_0x229077=![];else{if(_0x4ef3dd==='\x5c')_0x229077=!![];else{if(_0x4ef3dd===_0x133694)_0x133694=undefined;}}continue;}if(_0x4ef3dd==='\x22'){_0x133694=_0x4ef3dd,_0x3a1839+=_0x4ef3dd,_0x3b17c3=_0x7a3e01(0x122);continue;}if(_0x4ef3dd===','){let _0x24ae51=_0x4db474+0x1;while(/\s/[_0x7a3e01(0x10e)](_0x5e3844[_0x24ae51]??''))_0x24ae51++;if(_0x5e3844[_0x24ae51]==='}'||_0x5e3844[_0x24ae51]===']')continue;_0x3a1839+=_0x4ef3dd,_0x3b17c3=',';continue;}if(_0x4ef3dd==='{'||_0x4ef3dd==='['){_0x3a1839+=_0x4ef3dd,_0x3b17c3=_0x4ef3dd;continue;}if(_0x4ef3dd==='}'||_0x4ef3dd===']'){_0x3a1839+=_0x4ef3dd,_0x3b17c3=_0x4ef3dd;continue;}if((_0x3b17c3==='{'||_0x3b17c3===',')&&/[A-Za-z_$]/[_0x7a3e01(0x10e)](_0x4ef3dd)){let _0x256369=_0x4db474+0x1;while(/[A-Za-z0-9_$]/[_0x7a3e01(0x10e)](_0x5e3844[_0x256369]??''))_0x256369++;let _0x2ce8bf=_0x256369;while(/\s/[_0x7a3e01(0x10e)](_0x5e3844[_0x2ce8bf]??''))_0x2ce8bf++;if(_0x5e3844[_0x2ce8bf]===':'){_0x3a1839+=JSON[_0x7a3e01(0xf0)](_0x5e3844[_0x7a3e01(0x118)](_0x4db474,_0x256369)),_0x4db474=_0x256369-0x1,_0x3b17c3='key';continue;}}_0x3a1839+=_0x4ef3dd;if(!/\s/[_0x7a3e01(0x10e)](_0x4ef3dd)&&_0x4ef3dd!==':')_0x3b17c3='value';}return _0x3a1839;}function parseGeneratedRegistryJson(_0x207ce8){const _0x349027=a6_0x3ec527;try{return JSON[_0x349027(0xf4)](_0x207ce8);}catch{return JSON[_0x349027(0xf4)](generatedObjectLiteralToJson(_0x207ce8));}}function normalizeModelEntries(_0x451c53,_0x4ca9ae){const _0x2d4c25=a6_0x3ec527,_0x1655fd=Object[_0x2d4c25(0xf8)](_0x451c53),_0x1572c7=[];for(const _0x18e2de of _0x4ca9ae){if(!_0x18e2de||typeof _0x18e2de!=='object'||Array['isArray'](_0x18e2de))return undefined;const _0x4d3378=_0x18e2de;if(typeof _0x4d3378[_0x2d4c25(0x10d)]!=='string'||typeof _0x4d3378[_0x2d4c25(0xfa)]!==_0x2d4c25(0xff)||typeof _0x4d3378[_0x2d4c25(0xfe)]!==_0x2d4c25(0xff))return undefined;let _0x4cc205;if(typeof _0x4d3378[_0x2d4c25(0xf3)]===_0x2d4c25(0xff)&&_0x4d3378['datasetCodes']===undefined)_0x4cc205=Object[_0x2d4c25(0xf2)](_0x1655fd['map'](_0x135c7d=>[_0x135c7d,_0x4d3378[_0x2d4c25(0xf3)]]));else{if(_0x4d3378[_0x2d4c25(0xf3)]===undefined&&_0x4d3378[_0x2d4c25(0xf6)]&&typeof _0x4d3378['datasetCodes']===_0x2d4c25(0x119)&&!Array['isArray'](_0x4d3378[_0x2d4c25(0xf6)])&&Object['values'](_0x4d3378[_0x2d4c25(0xf6)])[_0x2d4c25(0xef)](_0x323ba9=>typeof _0x323ba9===_0x2d4c25(0xff)))_0x4cc205={..._0x4d3378[_0x2d4c25(0xf6)]};else return undefined;}_0x1572c7[_0x2d4c25(0x101)]({'alias':_0x4d3378[_0x2d4c25(0x10d)],'tableName':_0x4d3378[_0x2d4c25(0xfa)],'name':_0x4d3378[_0x2d4c25(0xfe)],'datasetCodes':_0x4cc205});}return _0x1572c7;}export function parseModelRegistry(_0x401db2){const _0x4b404f=a6_0x3ec527,_0x256c65=extractRegistryJson(_0x401db2);if(!_0x256c65)return undefined;try{const _0x4656ce=parseGeneratedRegistryJson(_0x256c65);if(typeof _0x4656ce[_0x4b404f(0x11a)]!==_0x4b404f(0xff)||!_0x4656ce[_0x4b404f(0x109)]||typeof _0x4656ce[_0x4b404f(0x109)]!==_0x4b404f(0x119))return undefined;if(_0x4656ce[_0x4b404f(0x12f)]==='lovrabet-model-registry/v1')return migrateLegacyRegistry(_0x4656ce);if(!(_0x4656ce['protocol']===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x4656ce['protocol']===undefined&&_0x401db2['includes'](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x4b404f(0xf7)](_0x4656ce[_0x4b404f(0x12a)]))return undefined;const _0x292b4f=_0x4656ce[_0x4b404f(0x109)],_0x37e55d=normalizeModelEntries(_0x292b4f,_0x4656ce[_0x4b404f(0x12a)]);if(!_0x37e55d)return undefined;return{'defaultProfile':_0x4656ce[_0x4b404f(0x11a)],'profiles':_0x292b4f,'models':_0x37e55d};}catch{return undefined;}}export function readModelRegistry(_0x52abc9){if(!existsSync(_0x52abc9))return undefined;try{return parseModelRegistry(readFileSync(_0x52abc9,'utf8'));}catch{return undefined;}}function registrySource(_0x2f20e6){const _0xbcd43c=a6_0x3ec527,_0x326cfc=Object['keys'](_0x2f20e6[_0xbcd43c(0x109)]),_0x48b96a=_0x2f20e6[_0xbcd43c(0x12a)][_0xbcd43c(0xf9)](_0x10d3ae=>{const _0x165a54=_0xbcd43c,_0x4d05c9=_0x326cfc[_0x165a54(0xf9)](_0xc33756=>_0x10d3ae[_0x165a54(0xf6)][_0xc33756]),_0xe81e4=_0x4d05c9[0x0],_0xe46335=_0xe81e4!==undefined&&_0x4d05c9['every'](_0x39d653=>_0x39d653===_0xe81e4),_0x4b5ac2={'alias':_0x10d3ae[_0x165a54(0x10d)],'tableName':_0x10d3ae['tableName'],'name':_0x10d3ae[_0x165a54(0xfe)]};return _0xe46335?{..._0x4b5ac2,'datasetCode':_0xe81e4}:{..._0x4b5ac2,'datasetCodes':_0x10d3ae[_0x165a54(0xf6)]};}),_0x543f1c=JSON['stringify']({'defaultProfile':_0x2f20e6[_0xbcd43c(0x11a)],'profiles':_0x2f20e6[_0xbcd43c(0x109)],'models':_0x48b96a},null,0x2)[_0xbcd43c(0x124)]('\x0a')['map'](_0x29a0ed=>'\x20\x20'+_0x29a0ed)[_0xbcd43c(0x114)]('\x0a');return _0xbcd43c(0x11f)+MODEL_REGISTRY_VERSION_MARKER+_0xbcd43c(0x121)+REGISTRY_START+'\x0a'+_0x543f1c+'\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a'+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x3fe06c,_0x3270ad,_0x30b633){const _0x588327=a6_0x3ec527,_0xbb1f72=_0x30b633[_0x588327(0xf9)](_0xdf178a=>({..._0xdf178a,'alias':_0xdf178a[_0x588327(0x10d)]||_0xdf178a['tableName']})),_0x37ea0e=new Map(),_0x241997=new Map();for(const _0x17fce5 of _0xbb1f72){const _0x31ea67=_0x37ea0e[_0x588327(0xfc)](_0x17fce5[_0x588327(0x10d)]);if(_0x31ea67&&_0x31ea67!==_0x17fce5[_0x588327(0xfa)])throw new Error(_0x588327(0x108)+_0x17fce5[_0x588327(0x10d)]+_0x588327(0xf5)+_0x31ea67+_0x588327(0x10b)+_0x17fce5[_0x588327(0xfa)]+_0x588327(0x116)+_0x3270ad+'\x22.');const _0x39b896=_0x241997[_0x588327(0xfc)](_0x17fce5['tableName']);if(_0x39b896&&_0x39b896!==_0x17fce5['alias'])throw new Error('Table\x20\x22'+_0x17fce5[_0x588327(0xfa)]+_0x588327(0x125)+_0x39b896+_0x588327(0x10b)+_0x17fce5['alias']+_0x588327(0x116)+_0x3270ad+'\x22.');_0x37ea0e[_0x588327(0x12d)](_0x17fce5[_0x588327(0x10d)],_0x17fce5[_0x588327(0xfa)]),_0x241997[_0x588327(0x12d)](_0x17fce5[_0x588327(0xfa)],_0x17fce5[_0x588327(0x10d)]);const _0x1cd4ff=_0x3fe06c['models'][_0x588327(0x10a)](_0x3b48c7=>_0x3b48c7[_0x588327(0x10d)]===_0x17fce5[_0x588327(0x10d)]);if(_0x1cd4ff&&_0x1cd4ff['tableName']!==_0x17fce5['tableName'])throw new Error(_0x588327(0x108)+_0x17fce5[_0x588327(0x10d)]+'\x22\x20maps\x20to\x20table\x20\x22'+_0x1cd4ff[_0x588327(0xfa)]+_0x588327(0x120)+_0x17fce5[_0x588327(0xfa)]+_0x588327(0x116)+_0x3270ad+'\x22.');const _0x327a0a=_0x3fe06c[_0x588327(0x12a)][_0x588327(0x10a)](_0x59674e=>_0x59674e[_0x588327(0xfa)]===_0x17fce5['tableName']);if(_0x327a0a&&_0x327a0a[_0x588327(0x10d)]!==_0x17fce5[_0x588327(0x10d)])throw new Error('Table\x20\x22'+_0x17fce5[_0x588327(0xfa)]+'\x22\x20maps\x20to\x20alias\x20\x22'+_0x327a0a['alias']+_0x588327(0x120)+_0x17fce5['alias']+_0x588327(0x116)+_0x3270ad+'\x22.');}for(const _0x45c04c of _0x3fe06c['models']){delete _0x45c04c[_0x588327(0xf6)][_0x3270ad];}for(const _0x1a723a of _0xbb1f72){let _0x4d3e80=_0x3fe06c['models'][_0x588327(0x10a)](_0x359dfb=>_0x359dfb['alias']===_0x1a723a[_0x588327(0x10d)]);!_0x4d3e80&&(_0x4d3e80={'alias':_0x1a723a[_0x588327(0x10d)],'tableName':_0x1a723a[_0x588327(0xfa)],'name':_0x1a723a['name'],'datasetCodes':{}},_0x3fe06c[_0x588327(0x12a)][_0x588327(0x101)](_0x4d3e80)),(_0x3270ad===_0x3fe06c[_0x588327(0x11a)]||!_0x4d3e80[_0x588327(0xf6)][_0x3fe06c['defaultProfile']])&&(_0x4d3e80[_0x588327(0x10d)]=_0x1a723a['alias'],_0x4d3e80[_0x588327(0xfa)]=_0x1a723a['tableName'],_0x4d3e80[_0x588327(0xfe)]=_0x1a723a[_0x588327(0xfe)]),_0x4d3e80[_0x588327(0xf6)][_0x3270ad]=_0x1a723a['datasetCode'];}_0x3fe06c[_0x588327(0x12a)]=_0x3fe06c[_0x588327(0x12a)][_0x588327(0x128)](_0xe33f25=>Object[_0x588327(0xf8)](_0xe33f25['datasetCodes'])['length']>0x0);}function removeUnboundProfiles(_0x1061d2){const _0x38f9f0=a6_0x3ec527,_0x8dc340=Object['entries'](_0x1061d2['profiles'])[_0x38f9f0(0x128)](([,_0x25faf7])=>_0x25faf7['appCode']===_0x38f9f0(0x102))[_0x38f9f0(0xf9)](([_0x3f6fed])=>_0x3f6fed);if(_0x8dc340[_0x38f9f0(0x123)]===0x0)return;for(const _0x1287f0 of _0x8dc340){delete _0x1061d2[_0x38f9f0(0x109)][_0x1287f0];for(const _0xb9f515 of _0x1061d2[_0x38f9f0(0x12a)]){delete _0xb9f515[_0x38f9f0(0xf6)][_0x1287f0];}}_0x1061d2[_0x38f9f0(0x12a)]=_0x1061d2[_0x38f9f0(0x12a)][_0x38f9f0(0x128)](_0x5987c8=>Object[_0x38f9f0(0xf8)](_0x5987c8['datasetCodes'])['length']>0x0);}export function getProfileModels(_0x241bb8,_0x3f103d){const _0x1f44e0=a6_0x3ec527;return _0x241bb8[_0x1f44e0(0x12a)][_0x1f44e0(0x129)](_0x6e9d29=>{const _0x4a9526=_0x1f44e0,_0x21a9a9=_0x6e9d29['datasetCodes'][_0x3f103d];return _0x21a9a9?[{'datasetCode':_0x21a9a9,'tableName':_0x6e9d29['tableName'],'name':_0x6e9d29['name'],'alias':_0x6e9d29[_0x4a9526(0x10d)]}]:[];});}export function updateModelRegistry(_0x104e71){const _0xa5c0bb=a6_0x3ec527,_0x4556f2=a6_0xffc5aa['join'](_0x104e71['outputDir'],MODEL_REGISTRY_FILE_NAME),_0xf4944b=existsSync(_0x4556f2),_0x43745f=readModelRegistry(_0x4556f2);if(_0xf4944b&&!_0x43745f)throw new Error(MODEL_REGISTRY_FILE_NAME+_0xa5c0bb(0x10c));const _0x520387=_0x43745f??emptyRegistry(_0x104e71['defaultProfile']);if(_0x104e71['appCode']!=='NOT-SET')removeUnboundProfiles(_0x520387);const _0x3fa8de=_0x43745f?getProfileModels(_0x43745f,_0x104e71[_0xa5c0bb(0x11c)])['length']:0x0;if(_0x3fa8de>0x0&&_0x104e71[_0xa5c0bb(0x12a)]['length']===0x0&&!_0x104e71[_0xa5c0bb(0x111)])throw new Error('Refusing\x20to\x20replace\x20'+_0x3fa8de+'\x20model(s)\x20in\x20profile\x20\x22'+_0x104e71[_0xa5c0bb(0x11c)]+'\x22\x20with\x20an\x20empty\x20result.\x20'+'Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.');_0x520387[_0xa5c0bb(0x11a)]=_0x104e71[_0xa5c0bb(0x11a)],_0x520387['profiles'][_0x104e71[_0xa5c0bb(0x11c)]]={'appCode':_0x104e71[_0xa5c0bb(0x11e)],'runtimeDomain':_0x104e71[_0xa5c0bb(0xfd)]},mergeProfileModels(_0x520387,_0x104e71['profileName'],_0x104e71[_0xa5c0bb(0x12a)]),mkdirSync(_0x104e71[_0xa5c0bb(0x110)],{'recursive':!![]});const _0x4ea2b0=_0x4556f2+'.'+process['pid']+'.'+Date['now']()+_0xa5c0bb(0x131);try{writeFileSync(_0x4ea2b0,registrySource(_0x520387),{'encoding':_0xa5c0bb(0x100),'mode':0x1a4}),renameSync(_0x4ea2b0,_0x4556f2);}catch(_0x32cca3){try{unlinkSync(_0x4ea2b0);}catch{}throw _0x32cca3;}return{'path':_0x4556f2,'registry':_0x520387,'existed':_0xf4944b};}
|
|
1
|
+
const a6_0x1dede4=a6_0x30f3;(function(_0x45f58a,_0x5d0377){const _0x5d0347=a6_0x30f3,_0x560a36=_0x45f58a();while(!![]){try{const _0x29cde6=-parseInt(_0x5d0347(0xce))/0x1*(parseInt(_0x5d0347(0xf1))/0x2)+parseInt(_0x5d0347(0x110))/0x3+parseInt(_0x5d0347(0xe0))/0x4*(parseInt(_0x5d0347(0x10d))/0x5)+parseInt(_0x5d0347(0xed))/0x6*(parseInt(_0x5d0347(0xde))/0x7)+parseInt(_0x5d0347(0xf3))/0x8+-parseInt(_0x5d0347(0x113))/0x9*(parseInt(_0x5d0347(0xf2))/0xa)+parseInt(_0x5d0347(0x102))/0xb;if(_0x29cde6===_0x5d0377)break;else _0x560a36['push'](_0x560a36['shift']());}catch(_0x3f0a2a){_0x560a36['push'](_0x560a36['shift']());}}}(a6_0x759b,0x7038b));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x888dd6 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x1dede4(0x101);export const MODEL_RUNTIME_FILE_NAME=a6_0x1dede4(0xe7);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x1dede4(0xe1);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x1dede4(0xd1),REGISTRY_START=a6_0x1dede4(0xf6),REGISTRY_END=a6_0x1dede4(0x114);function emptyRegistry(_0x3b55a9){return{'defaultProfile':_0x3b55a9,'profiles':{},'models':[]};}function extractRegistryJson(_0x1dcc84){const _0x5f4a07=a6_0x1dede4,_0x5c371e=_0x1dcc84[_0x5f4a07(0x100)](REGISTRY_START),_0x1f6def=_0x1dcc84[_0x5f4a07(0x100)](REGISTRY_END);if(_0x5c371e<0x0||_0x1f6def<=_0x5c371e)return undefined;return _0x1dcc84[_0x5f4a07(0xcd)](_0x5c371e+REGISTRY_START[_0x5f4a07(0xdc)],_0x1f6def)[_0x5f4a07(0xeb)]()['replace'](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x5f4a07(0xd9)](/;$/,'');}function migrateLegacyRegistry(_0x59323a){const _0x277cbe=a6_0x1dede4,_0xb410d3=emptyRegistry(_0x59323a['defaultProfile']);for(const [_0x1122da,_0x5a412b]of Object[_0x277cbe(0xe9)](_0x59323a[_0x277cbe(0xd4)])){_0xb410d3[_0x277cbe(0xd4)][_0x1122da]={'appCode':_0x5a412b[_0x277cbe(0xe5)],'runtimeDomain':_0x5a412b['runtimeDomain']},mergeProfileModels(_0xb410d3,_0x1122da,_0x5a412b[_0x277cbe(0xe2)]);}return _0xb410d3;}function generatedObjectLiteralToJson(_0x86554a){const _0x400782=a6_0x1dede4;let _0x4a4ae1='',_0x266d5b,_0x2c6ff2=![],_0x55750f;for(let _0x42fbc1=0x0;_0x42fbc1<_0x86554a[_0x400782(0xdc)];_0x42fbc1++){const _0x41aa5b=_0x86554a[_0x42fbc1];if(_0x266d5b){_0x4a4ae1+=_0x41aa5b;if(_0x2c6ff2)_0x2c6ff2=![];else{if(_0x41aa5b==='\x5c')_0x2c6ff2=!![];else{if(_0x41aa5b===_0x266d5b)_0x266d5b=undefined;}}continue;}if(_0x41aa5b==='\x22'){_0x266d5b=_0x41aa5b,_0x4a4ae1+=_0x41aa5b,_0x55750f=_0x400782(0xd6);continue;}if(_0x41aa5b===','){let _0x38993a=_0x42fbc1+0x1;while(/\s/['test'](_0x86554a[_0x38993a]??''))_0x38993a++;if(_0x86554a[_0x38993a]==='}'||_0x86554a[_0x38993a]===']')continue;_0x4a4ae1+=_0x41aa5b,_0x55750f=',';continue;}if(_0x41aa5b==='{'||_0x41aa5b==='['){_0x4a4ae1+=_0x41aa5b,_0x55750f=_0x41aa5b;continue;}if(_0x41aa5b==='}'||_0x41aa5b===']'){_0x4a4ae1+=_0x41aa5b,_0x55750f=_0x41aa5b;continue;}if((_0x55750f==='{'||_0x55750f===',')&&/[A-Za-z_$]/['test'](_0x41aa5b)){let _0x25a399=_0x42fbc1+0x1;while(/[A-Za-z0-9_$]/[_0x400782(0xf9)](_0x86554a[_0x25a399]??''))_0x25a399++;let _0x2794ee=_0x25a399;while(/\s/[_0x400782(0xf9)](_0x86554a[_0x2794ee]??''))_0x2794ee++;if(_0x86554a[_0x2794ee]===':'){_0x4a4ae1+=JSON[_0x400782(0xff)](_0x86554a[_0x400782(0xcd)](_0x42fbc1,_0x25a399)),_0x42fbc1=_0x25a399-0x1,_0x55750f=_0x400782(0xcc);continue;}}_0x4a4ae1+=_0x41aa5b;if(!/\s/[_0x400782(0xf9)](_0x41aa5b)&&_0x41aa5b!==':')_0x55750f=_0x400782(0xd6);}return _0x4a4ae1;}function parseGeneratedRegistryJson(_0x21946e){const _0x5f27b7=a6_0x1dede4;try{return JSON['parse'](_0x21946e);}catch{return JSON[_0x5f27b7(0xf0)](generatedObjectLiteralToJson(_0x21946e));}}function normalizeModelEntries(_0x45a664,_0x3b04dd){const _0x2be487=a6_0x1dede4,_0x4a3ce4=Object[_0x2be487(0x10a)](_0x45a664),_0x1fb829=[];for(const _0x33ead2 of _0x3b04dd){if(!_0x33ead2||typeof _0x33ead2!=='object'||Array[_0x2be487(0x105)](_0x33ead2))return undefined;const _0xddf49=_0x33ead2;if(typeof _0xddf49[_0x2be487(0x111)]!=='string'||typeof _0xddf49[_0x2be487(0x115)]!==_0x2be487(0xd3)||typeof _0xddf49['name']!==_0x2be487(0xd3))return undefined;let _0x2ca334;if(typeof _0xddf49[_0x2be487(0xd0)]===_0x2be487(0xd3)&&_0xddf49[_0x2be487(0xf4)]===undefined)_0x2ca334=Object[_0x2be487(0xe8)](_0x4a3ce4[_0x2be487(0x108)](_0x20bd2e=>[_0x20bd2e,_0xddf49[_0x2be487(0xd0)]]));else{if(_0xddf49[_0x2be487(0xd0)]===undefined&&_0xddf49[_0x2be487(0xf4)]&&typeof _0xddf49[_0x2be487(0xf4)]==='object'&&!Array[_0x2be487(0x105)](_0xddf49['datasetCodes'])&&Object[_0x2be487(0xf8)](_0xddf49['datasetCodes'])[_0x2be487(0xd7)](_0x3da762=>typeof _0x3da762===_0x2be487(0xd3)))_0x2ca334={..._0xddf49[_0x2be487(0xf4)]};else return undefined;}_0x1fb829[_0x2be487(0x10e)]({'alias':_0xddf49['alias'],'tableName':_0xddf49[_0x2be487(0x115)],'name':_0xddf49[_0x2be487(0x10f)],'datasetCodes':_0x2ca334});}return _0x1fb829;}export function parseModelRegistry(_0x291f3d){const _0x160cf0=a6_0x1dede4,_0x595088=extractRegistryJson(_0x291f3d);if(!_0x595088)return undefined;try{const _0x41f495=parseGeneratedRegistryJson(_0x595088);if(typeof _0x41f495['defaultProfile']!==_0x160cf0(0xd3)||!_0x41f495[_0x160cf0(0xd4)]||typeof _0x41f495[_0x160cf0(0xd4)]!==_0x160cf0(0xee))return undefined;if(_0x41f495[_0x160cf0(0x106)]==='lovrabet-model-registry/v1')return migrateLegacyRegistry(_0x41f495);if(!(_0x41f495[_0x160cf0(0x106)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x41f495[_0x160cf0(0x106)]===undefined&&_0x291f3d[_0x160cf0(0x103)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x160cf0(0x105)](_0x41f495[_0x160cf0(0xe2)]))return undefined;const _0x1ba0ce=_0x41f495[_0x160cf0(0xd4)],_0xcca8ab=normalizeModelEntries(_0x1ba0ce,_0x41f495[_0x160cf0(0xe2)]);if(!_0xcca8ab)return undefined;return{'defaultProfile':_0x41f495[_0x160cf0(0x107)],'profiles':_0x1ba0ce,'models':_0xcca8ab};}catch{return undefined;}}export function readModelRegistry(_0x22cf29){const _0x8ccf74=a6_0x1dede4;if(!existsSync(_0x22cf29))return undefined;try{return parseModelRegistry(readFileSync(_0x22cf29,_0x8ccf74(0xfe)));}catch{return undefined;}}function a6_0x30f3(_0x3f05bc,_0x19e1c8){_0x3f05bc=_0x3f05bc-0xca;const _0x759b33=a6_0x759b();let _0x30f330=_0x759b33[_0x3f05bc];return _0x30f330;}function a6_0x759b(){const _0x2a8eb8=['\x22\x20maps\x20to\x20table\x20\x22','string','profiles','\x22\x20with\x20an\x20empty\x20result.\x20','value','every','flatMap','replace','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','\x22\x20maps\x20to\x20alias\x20\x22','length','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','77drPzFD','\x22\x20in\x20the\x20registry\x20but\x20\x22','1076NRlCXU','/*\x20rabetbase-model-registry:v2\x20*/','models','find','\x20model(s)\x20in\x20profile\x20\x22','appCode','allowEmptyReplacement','model-runtime.ts','fromEntries','entries','Refusing\x20to\x20replace\x20','trim','outputDir','215574hDBlXU','object','filter','parse','2190jWyUTR','3176360LNELrH','1535600wLYKsU','datasetCodes','Table\x20\x22','/*\x20rabetbase-model-registry:start\x20*/','Model\x20alias\x20\x22','values','test','\x22\x20maps\x20to\x20both\x20\x22','join','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','/**\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','utf8','stringify','indexOf','models.generated.ts','1207701qeBkTG','includes','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','isArray','protocol','defaultProfile','map','set','keys','\x22\x20and\x20\x22','pid','13145sHdyzT','push','name','290787wjgqLS','alias','NOT-SET','9FrqDUB','/*\x20rabetbase-model-registry:end\x20*/','tableName','split','\x22\x20in\x20profile\x20\x22','key','slice','661SspnQG','get','datasetCode','lovrabet-model-registry/v2'];a6_0x759b=function(){return _0x2a8eb8;};return a6_0x759b();}function registrySource(_0x35975c){const _0x70f54c=a6_0x1dede4,_0x4dd15e=Object[_0x70f54c(0x10a)](_0x35975c[_0x70f54c(0xd4)]),_0x1bf6dc=_0x35975c[_0x70f54c(0xe2)][_0x70f54c(0x108)](_0x5608d1=>{const _0x28561d=_0x70f54c,_0x262a0b=_0x4dd15e[_0x28561d(0x108)](_0x4f2d3e=>_0x5608d1[_0x28561d(0xf4)][_0x4f2d3e]),_0x972a19=_0x262a0b[0x0],_0x9f88f6=_0x972a19!==undefined&&_0x262a0b[_0x28561d(0xd7)](_0x1a0ebc=>_0x1a0ebc===_0x972a19),_0x162422={'alias':_0x5608d1[_0x28561d(0x111)],'tableName':_0x5608d1['tableName'],'name':_0x5608d1['name']};return _0x9f88f6?{..._0x162422,'datasetCode':_0x972a19}:{..._0x162422,'datasetCodes':_0x5608d1[_0x28561d(0xf4)]};}),_0x8dd5ab=JSON[_0x70f54c(0xff)]({'defaultProfile':_0x35975c['defaultProfile'],'profiles':_0x35975c[_0x70f54c(0xd4)],'models':_0x1bf6dc},null,0x2)[_0x70f54c(0xca)]('\x0a')[_0x70f54c(0x108)](_0x5c8ea0=>'\x20\x20'+_0x5c8ea0)[_0x70f54c(0xfb)]('\x0a');return _0x70f54c(0xfd)+MODEL_REGISTRY_VERSION_MARKER+'\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20'+REGISTRY_START+'\x0a'+_0x8dd5ab+_0x70f54c(0xdd)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x48216b,_0x10930f,_0x28a987){const _0x3d1115=a6_0x1dede4,_0x1a9c95=_0x28a987[_0x3d1115(0x108)](_0x3a88ef=>({..._0x3a88ef,'alias':_0x3a88ef['alias']||_0x3a88ef[_0x3d1115(0x115)]})),_0x26fa48=new Map(),_0x436775=new Map();for(const _0x305afc of _0x1a9c95){const _0x43a211=_0x26fa48[_0x3d1115(0xcf)](_0x305afc['alias']);if(_0x43a211&&_0x43a211!==_0x305afc[_0x3d1115(0x115)])throw new Error(_0x3d1115(0xf7)+_0x305afc['alias']+_0x3d1115(0xfa)+_0x43a211+_0x3d1115(0x10b)+_0x305afc[_0x3d1115(0x115)]+_0x3d1115(0xcb)+_0x10930f+'\x22.');const _0x542193=_0x436775[_0x3d1115(0xcf)](_0x305afc[_0x3d1115(0x115)]);if(_0x542193&&_0x542193!==_0x305afc[_0x3d1115(0x111)])throw new Error(_0x3d1115(0xf5)+_0x305afc[_0x3d1115(0x115)]+_0x3d1115(0xfc)+_0x542193+_0x3d1115(0x10b)+_0x305afc[_0x3d1115(0x111)]+_0x3d1115(0xcb)+_0x10930f+'\x22.');_0x26fa48[_0x3d1115(0x109)](_0x305afc[_0x3d1115(0x111)],_0x305afc[_0x3d1115(0x115)]),_0x436775[_0x3d1115(0x109)](_0x305afc[_0x3d1115(0x115)],_0x305afc['alias']);const _0x4bc5bc=_0x48216b[_0x3d1115(0xe2)][_0x3d1115(0xe3)](_0x1f0fbd=>_0x1f0fbd[_0x3d1115(0x111)]===_0x305afc[_0x3d1115(0x111)]);if(_0x4bc5bc&&_0x4bc5bc[_0x3d1115(0x115)]!==_0x305afc[_0x3d1115(0x115)])throw new Error(_0x3d1115(0xf7)+_0x305afc['alias']+_0x3d1115(0xd2)+_0x4bc5bc[_0x3d1115(0x115)]+_0x3d1115(0xdf)+_0x305afc[_0x3d1115(0x115)]+_0x3d1115(0xcb)+_0x10930f+'\x22.');const _0x107985=_0x48216b['models'][_0x3d1115(0xe3)](_0x1dde6e=>_0x1dde6e['tableName']===_0x305afc[_0x3d1115(0x115)]);if(_0x107985&&_0x107985[_0x3d1115(0x111)]!==_0x305afc[_0x3d1115(0x111)])throw new Error(_0x3d1115(0xf5)+_0x305afc[_0x3d1115(0x115)]+_0x3d1115(0xdb)+_0x107985[_0x3d1115(0x111)]+_0x3d1115(0xdf)+_0x305afc[_0x3d1115(0x111)]+'\x22\x20in\x20profile\x20\x22'+_0x10930f+'\x22.');}for(const _0x3bc9a4 of _0x48216b[_0x3d1115(0xe2)]){delete _0x3bc9a4[_0x3d1115(0xf4)][_0x10930f];}for(const _0x5e1198 of _0x1a9c95){let _0x338ff4=_0x48216b[_0x3d1115(0xe2)][_0x3d1115(0xe3)](_0x47aabd=>_0x47aabd[_0x3d1115(0x111)]===_0x5e1198['alias']);!_0x338ff4&&(_0x338ff4={'alias':_0x5e1198[_0x3d1115(0x111)],'tableName':_0x5e1198['tableName'],'name':_0x5e1198[_0x3d1115(0x10f)],'datasetCodes':{}},_0x48216b[_0x3d1115(0xe2)]['push'](_0x338ff4)),(_0x10930f===_0x48216b['defaultProfile']||!_0x338ff4[_0x3d1115(0xf4)][_0x48216b[_0x3d1115(0x107)]])&&(_0x338ff4[_0x3d1115(0x111)]=_0x5e1198[_0x3d1115(0x111)],_0x338ff4[_0x3d1115(0x115)]=_0x5e1198[_0x3d1115(0x115)],_0x338ff4[_0x3d1115(0x10f)]=_0x5e1198[_0x3d1115(0x10f)]),_0x338ff4[_0x3d1115(0xf4)][_0x10930f]=_0x5e1198[_0x3d1115(0xd0)];}_0x48216b[_0x3d1115(0xe2)]=_0x48216b[_0x3d1115(0xe2)][_0x3d1115(0xef)](_0x48dcbf=>Object['keys'](_0x48dcbf[_0x3d1115(0xf4)])[_0x3d1115(0xdc)]>0x0);}function removeUnboundProfiles(_0x288bbb){const _0xf32844=a6_0x1dede4,_0x379601=Object[_0xf32844(0xe9)](_0x288bbb[_0xf32844(0xd4)])[_0xf32844(0xef)](([,_0x22af7f])=>_0x22af7f['appCode']===_0xf32844(0x112))[_0xf32844(0x108)](([_0x4bc934])=>_0x4bc934);if(_0x379601[_0xf32844(0xdc)]===0x0)return;for(const _0x12f64f of _0x379601){delete _0x288bbb['profiles'][_0x12f64f];for(const _0x522215 of _0x288bbb['models']){delete _0x522215[_0xf32844(0xf4)][_0x12f64f];}}_0x288bbb[_0xf32844(0xe2)]=_0x288bbb[_0xf32844(0xe2)][_0xf32844(0xef)](_0x2bc55d=>Object[_0xf32844(0x10a)](_0x2bc55d[_0xf32844(0xf4)])[_0xf32844(0xdc)]>0x0);}export function getProfileModels(_0x3a7085,_0x15cd71){const _0x5dde34=a6_0x1dede4;return _0x3a7085[_0x5dde34(0xe2)][_0x5dde34(0xd8)](_0x3ea936=>{const _0x18fd30=_0x5dde34,_0x8567cc=_0x3ea936[_0x18fd30(0xf4)][_0x15cd71];return _0x8567cc?[{'datasetCode':_0x8567cc,'tableName':_0x3ea936['tableName'],'name':_0x3ea936[_0x18fd30(0x10f)],'alias':_0x3ea936[_0x18fd30(0x111)]}]:[];});}export function updateModelRegistry(_0x1f1c3c){const _0x3d6b05=a6_0x1dede4,_0x293d12=a6_0x888dd6[_0x3d6b05(0xfb)](_0x1f1c3c[_0x3d6b05(0xec)],MODEL_REGISTRY_FILE_NAME),_0x4ae16d=existsSync(_0x293d12),_0x5cf1d3=readModelRegistry(_0x293d12);if(_0x4ae16d&&!_0x5cf1d3)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x3d6b05(0x104));const _0x236763=_0x5cf1d3??emptyRegistry(_0x1f1c3c[_0x3d6b05(0x107)]);if(_0x1f1c3c[_0x3d6b05(0xe5)]!==_0x3d6b05(0x112))removeUnboundProfiles(_0x236763);const _0x43d8cf=_0x5cf1d3?getProfileModels(_0x5cf1d3,_0x1f1c3c['profileName'])[_0x3d6b05(0xdc)]:0x0;if(_0x43d8cf>0x0&&_0x1f1c3c[_0x3d6b05(0xe2)][_0x3d6b05(0xdc)]===0x0&&!_0x1f1c3c[_0x3d6b05(0xe6)])throw new Error(_0x3d6b05(0xea)+_0x43d8cf+_0x3d6b05(0xe4)+_0x1f1c3c['profileName']+_0x3d6b05(0xd5)+_0x3d6b05(0xda));_0x236763[_0x3d6b05(0x107)]=_0x1f1c3c[_0x3d6b05(0x107)],_0x236763[_0x3d6b05(0xd4)][_0x1f1c3c['profileName']]={'appCode':_0x1f1c3c[_0x3d6b05(0xe5)],'runtimeDomain':_0x1f1c3c['runtimeDomain']},mergeProfileModels(_0x236763,_0x1f1c3c['profileName'],_0x1f1c3c[_0x3d6b05(0xe2)]),mkdirSync(_0x1f1c3c[_0x3d6b05(0xec)],{'recursive':!![]});const _0x50ec0e=_0x293d12+'.'+process[_0x3d6b05(0x10c)]+'.'+Date['now']()+'.tmp';try{writeFileSync(_0x50ec0e,registrySource(_0x236763),{'encoding':'utf8','mode':0x1a4}),renameSync(_0x50ec0e,_0x293d12);}catch(_0x2a9133){try{unlinkSync(_0x50ec0e);}catch{}throw _0x2a9133;}return{'path':_0x293d12,'registry':_0x236763,'existed':_0x4ae16d};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a7_0x203257=a7_0x27f9;function a7_0x27f9(_0x2f3757,_0x59e340){_0x2f3757=_0x2f3757-0xae;const _0xe0f01=a7_0xe0f0();let _0x27f9b1=_0xe0f01[_0x2f3757];return _0x27f9b1;}(function(_0x22d036,_0x2249d0){const _0xb1f322=a7_0x27f9,_0x536010=_0x22d036();while(!![]){try{const _0x1d8cf9=parseInt(_0xb1f322(0xc0))/0x1+-parseInt(_0xb1f322(0xb4))/0x2+parseInt(_0xb1f322(0xb6))/0x3+parseInt(_0xb1f322(0xaf))/0x4*(-parseInt(_0xb1f322(0xba))/0x5)+-parseInt(_0xb1f322(0xb8))/0x6*(-parseInt(_0xb1f322(0xbd))/0x7)+-parseInt(_0xb1f322(0xb3))/0x8+parseInt(_0xb1f322(0xc2))/0x9;if(_0x1d8cf9===_0x2249d0)break;else _0x536010['push'](_0x536010['shift']());}catch(_0x11ad13){_0x536010['push'](_0x536010['shift']());}}}(a7_0xe0f0,0x46aa5));import{readFileSync}from'node:fs';import a7_0x46072 from'node:path';import{fileURLToPath}from'node:url';import a7_0x4ac3c6 from'prettier';function a7_0xe0f0(){const _0x496d21=['dirname','cwd','1447600zDMsoM','300104KXiRuW','../../templates/generate-api','194199OIUzcf','profile-api.ts.tpl','6JOJBXT','typescript','985nypEFx','join','{ProjectRoutingImport}','1325429JZzQUu','format','utf8','415266xcotUP','profile-client.ts.tpl','568746ckOfJp','model-runtime.ts.tpl','all','startsWith','2276FUihJX','resolve'];a7_0xe0f0=function(){return _0x496d21;};return a7_0xe0f0();}import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function relativeImport(_0x51883,_0x2ce6c8){const _0x160e62=a7_0x27f9;let _0x100765=a7_0x46072['relative'](_0x51883,_0x2ce6c8)['replace'](/\\/g,'/');if(!_0x100765[_0x160e62(0xae)]('.'))_0x100765='./'+_0x100765;return _0x100765;}export async function renderModelRegistryScaffold(_0x4fbb40,_0x58b806=process[a7_0x203257(0xb2)]()){const _0x4c4a26=a7_0x203257,_0x3e3c9c=fileURLToPath(import.meta.url),_0x32a61c=a7_0x46072['resolve'](a7_0x46072[_0x4c4a26(0xb1)](_0x3e3c9c),_0x4c4a26(0xb5)),_0xcfd13a=relativeImport(a7_0x46072['resolve'](_0x4fbb40),a7_0x46072[_0x4c4a26(0xb0)](_0x58b806,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x260529=readFileSync(a7_0x46072[_0x4c4a26(0xbb)](_0x32a61c,_0x4c4a26(0xb7)),_0x4c4a26(0xbf))['replace'](_0x4c4a26(0xbc),_0xcfd13a),[_0x1ec9d5,_0x5b3284,_0x309fd1]=await Promise[_0x4c4a26(0xc4)]([a7_0x4ac3c6[_0x4c4a26(0xbe)](_0x260529,{'parser':_0x4c4a26(0xb9)}),a7_0x4ac3c6[_0x4c4a26(0xbe)](readFileSync(a7_0x46072[_0x4c4a26(0xbb)](_0x32a61c,_0x4c4a26(0xc1)),_0x4c4a26(0xbf)),{'parser':_0x4c4a26(0xb9)}),a7_0x4ac3c6[_0x4c4a26(0xbe)](readFileSync(a7_0x46072['join'](_0x32a61c,_0x4c4a26(0xc3)),'utf8'),{'parser':_0x4c4a26(0xb9)})]);return{'api':_0x1ec9d5,'client':_0x5b3284,'modelRuntime':_0x309fd1};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1fedd0,_0x18f5a6){const _0x34c558=a8_0x13e8,_0xde9a5f=_0x1fedd0();while(!![]){try{const _0x380bf0=-parseInt(_0x34c558(0xec))/0x1+-parseInt(_0x34c558(0xf4))/0x2+parseInt(_0x34c558(0xda))/0x3*(-parseInt(_0x34c558(0xdf))/0x4)+-parseInt(_0x34c558(0xf1))/0x5*(-parseInt(_0x34c558(0xe8))/0x6)+-parseInt(_0x34c558(0xe9))/0x7+parseInt(_0x34c558(0xe4))/0x8+parseInt(_0x34c558(0xf7))/0x9;if(_0x380bf0===_0x18f5a6)break;else _0xde9a5f['push'](_0xde9a5f['shift']());}catch(_0x19100e){_0xde9a5f['push'](_0xde9a5f['shift']());}}}(a8_0x3f52,0x7afc0));function a8_0x13e8(_0x277a04,_0x4cb83e){_0x277a04=_0x277a04-0xd9;const _0x3f52b7=a8_0x3f52();let _0x13e884=_0x3f52b7[_0x277a04];return _0x13e884;}import{existsSync}from'node:fs';import a8_0x105e01 from'node:path';function a8_0x3f52(){const _0x56ba31=['`\x20first.','11367360AniXTO','profiles','validation','apps','cwd','entries','465357KtkFnz','\x20api\x20pull\x20--app\x20','\x22\x20is\x20missing\x20from\x20','length','find','4aWmaXz','apiDir','-api.ts','join','Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.','4787504sbcOAL','appcode','api.ts','AppCode\x20\x22','684QQuwNC','4926313ExLwdR','defaultProfile','string','133075rbzrak','resolve','appCode','map','Run\x20`','19590MqUeSh','filter','\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20','1624866cumQHE','defaultApp'];a8_0x3f52=function(){return _0x56ba31;};return a8_0x3f52();}import{readRawConfig}from'../context/config-loader.js';import{MODEL_REGISTRY_FILE_NAME,readModelRegistry}from'../api/model-registry-file.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveApiModelSource(_0x343b8a,_0xb1df9d,_0x231314){const _0x438ae4=a8_0x13e8,_0x584408=a8_0x105e01[_0x438ae4(0xed)](process[_0x438ae4(0xfb)](),_0x343b8a),_0x2a289f=a8_0x105e01[_0x438ae4(0xed)](_0x584408,_0x438ae4(0xe6)),_0xca92d7=a8_0x105e01['resolve'](_0x584408,MODEL_REGISTRY_FILE_NAME),_0x3da51a=readModelRegistry(_0xca92d7);if(_0x3da51a){const _0x363c3b=_0xb1df9d?Object[_0x438ae4(0xd9)](_0x3da51a[_0x438ae4(0xf8)])[_0x438ae4(0xf2)](([,_0x589c0f])=>_0x589c0f[_0x438ae4(0xee)]===_0xb1df9d):[];if(_0x231314){if(_0x3da51a[_0x438ae4(0xf8)][_0x231314])return{'filePath':_0xca92d7,'profileName':_0x231314};if(_0x363c3b[_0x438ae4(0xdd)]>0x0)throw CliErrors[_0x438ae4(0xf9)]('Model\x20profile\x20\x22'+_0x231314+_0x438ae4(0xdc)+MODEL_REGISTRY_FILE_NAME+'.',_0x438ae4(0xf0)+CLI_BIN_NAME+_0x438ae4(0xdb)+_0x231314+_0x438ae4(0xf6));}else{if(_0x363c3b[_0x438ae4(0xdd)]===0x1)return{'filePath':_0xca92d7,'profileName':_0x363c3b[0x0][0x0]};if(_0x363c3b[_0x438ae4(0xdd)]>0x1)throw new Error(_0x438ae4(0xe7)+_0xb1df9d+_0x438ae4(0xf3)+_0x363c3b[_0x438ae4(0xef)](([_0x14cd37])=>_0x14cd37)[_0x438ae4(0xe2)](',\x20')+'.\x20'+_0x438ae4(0xe3));if(_0x3da51a[_0x438ae4(0xf8)][_0x3da51a[_0x438ae4(0xea)]]&&!_0xb1df9d)return{'filePath':_0xca92d7,'profileName':_0x3da51a['defaultProfile']};}}if(!_0xb1df9d&&!_0x231314)return{'filePath':_0x2a289f};const _0x4bd73e=readRawConfig(),_0x4a9a41=_0x4bd73e[_0x438ae4(0xfa)]&&typeof _0x4bd73e['apps']==='object'?_0x4bd73e[_0x438ae4(0xfa)]:{},_0x443ebd=_0x231314&&_0x4a9a41[_0x231314]?[_0x231314,_0x4a9a41[_0x231314]]:Object[_0x438ae4(0xd9)](_0x4a9a41)[_0x438ae4(0xde)](([,_0x1f73f0])=>_0x1f73f0?.[_0x438ae4(0xe5)]===_0xb1df9d);if(!_0x443ebd)return{'filePath':_0x2a289f};const [_0x5ee825,_0x2afd8c]=_0x443ebd,_0x175cc9=typeof _0x4bd73e[_0x438ae4(0xf5)]===_0x438ae4(0xeb)?_0x4bd73e[_0x438ae4(0xf5)]:undefined;if(_0x2afd8c?.[_0x438ae4(0xe0)])return{'filePath':_0x2a289f};if(_0x175cc9&&_0x5ee825!==_0x175cc9){const _0x474074=a8_0x105e01[_0x438ae4(0xed)](_0x584408,_0x5ee825+_0x438ae4(0xe1));if(existsSync(_0x474074))return{'filePath':_0x474074};}return{'filePath':_0x2a289f};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x596e58,_0x40154a){const _0x593c7b=a9_0x4f6e,_0x47913=_0x596e58();while(!![]){try{const _0x55e682=-parseInt(_0x593c7b(0xef))/0x1+parseInt(_0x593c7b(0xf6))/0x2*(-parseInt(_0x593c7b(0xf5))/0x3)+parseInt(_0x593c7b(0xfe))/0x4+-parseInt(_0x593c7b(0x103))/0x5*(-parseInt(_0x593c7b(0xfc))/0x6)+-parseInt(_0x593c7b(0x100))/0x7+-parseInt(_0x593c7b(0xfd))/0x8+parseInt(_0x593c7b(0xf4))/0x9;if(_0x55e682===_0x40154a)break;else _0x47913['push'](_0x47913['shift']());}catch(_0x57da4b){_0x47913['push'](_0x47913['shift']());}}}(a9_0x1155,0x7ee06));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a9_0x4f6e(_0x4ff43f,_0x7f2a0d){_0x4ff43f=_0x4ff43f-0xed;const _0x115533=a9_0x1155();let _0x4f6e29=_0x115533[_0x4ff43f];return _0x4f6e29;}import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';function a9_0x1155(){const _0x252b04=['start','stop','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','2958wEwQzv','7107008URYdGk','2060384rpNdAk','Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','4359943DWdoib','validation','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','1945wCNMkY','Run\x20`','No\x20valid\x20session.\x20Login\x20now?','800381YpwVew','autoYes','nonInteractive','*\x20Login\x20successful!','!\x20Login\x20failed.','21332655rZMwHP','184407QQvQqQ','8WJrKzK','log'];a9_0x1155=function(){return _0x252b04;};return a9_0x1155();}import a9_0x5a1bc3 from'ora';export async function runAuthServer(_0x22cdab){const _0x193f14=a9_0x4f6e,_0x1e8eab=await getIsSessionValid();if(_0x1e8eab){console['log'](_0x193f14(0x102));return;}if(_0x22cdab?.[_0x193f14(0xf1)]&&!_0x22cdab[_0x193f14(0xf0)])throw CliErrors[_0x193f14(0x101)](_0x193f14(0xff),_0x193f14(0xed)+CLI_BIN_NAME+_0x193f14(0xfb));const _0x531e89=_0x22cdab?.[_0x193f14(0xf0)]?!![]:await confirm({'message':_0x193f14(0xee),'default':!![]});if(!_0x531e89)return;if(_0x22cdab?.['nonInteractive']){console['log'](_0x193f14(0xfa));const _0x156f06=await authServer({'silent':![],'openBrowser':![]});_0x156f06?console[_0x193f14(0xf7)](_0x193f14(0xf2)):console[_0x193f14(0xf7)](_0x193f14(0xf3));return;}const _0x9aa9e4=a9_0x5a1bc3('Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.')[_0x193f14(0xf8)](),_0x35cc5b=await authServer({'silent':!![],'openBrowser':!![]});_0x9aa9e4[_0x193f14(0xf9)](),_0x35cc5b?console[_0x193f14(0xf7)](_0x193f14(0xf2)):console['log'](_0x193f14(0xf3));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x5d0453=a10_0x19d7;(function(_0x563255,_0xb28010){const _0xe99e42=a10_0x19d7,_0x3d4f05=_0x563255();while(!![]){try{const _0x5e99ac=-parseInt(_0xe99e42(0x19a))/0x1+parseInt(_0xe99e42(0x19f))/0x2+-parseInt(_0xe99e42(0x1a6))/0x3+parseInt(_0xe99e42(0x1ab))/0x4*(-parseInt(_0xe99e42(0x1c4))/0x5)+-parseInt(_0xe99e42(0x1ad))/0x6*(parseInt(_0xe99e42(0x19b))/0x7)+parseInt(_0xe99e42(0x1b4))/0x8*(-parseInt(_0xe99e42(0x1b6))/0x9)+-parseInt(_0xe99e42(0x1c6))/0xa*(-parseInt(_0xe99e42(0x1ae))/0xb);if(_0x5e99ac===_0xb28010)break;else _0x3d4f05['push'](_0x3d4f05['shift']());}catch(_0x4211a1){_0x3d4f05['push'](_0x3d4f05['shift']());}}}(a10_0x9b77,0xe6b11));import{writeFileSync}from'node:fs';import a10_0x1d5f9a from'node:http';import a10_0x550a3b 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_0x19d7(_0x22bd6d,_0x8f18d4){_0x22bd6d=_0x22bd6d-0x19a;const _0x9b776f=a10_0x9b77();let _0x19d788=_0x9b776f[_0x22bd6d];return _0x19d788;}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(_0x37e498){const _0x39ec16=a10_0x19d7;if(!_0x37e498)return getProjectDomainRoutingManifest()['local'];const _0x254de9=getOfficialRoutingProfile(_0x37e498),_0x113c8d=getOfficialRoutingCdn(_0x37e498);return{'origin':_0x254de9[_0x39ec16(0x1ac)]['origin'],'certificateUrl':_0x113c8d[_0x39ec16(0x1bd)]+_0x39ec16(0x1b5)};}function withPort(_0x2e69a0,_0x5d7874){const _0x6a6606=a10_0x19d7,_0x1c4399=new URL(_0x2e69a0);return _0x1c4399[_0x6a6606(0x19d)]=String(_0x5d7874),_0x1c4399['origin'];}export async function authServer(_0x18e971){const _0x3a94b2=a10_0x19d7,_0x11f609=_0x18e971?.[_0x3a94b2(0x19c)]||![],_0x7e6328=_0x18e971?.[_0x3a94b2(0x1b7)]??!![],_0x2958e5=_0x18e971?.[_0x3a94b2(0x1a4)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x1adfdb=resolveAuthCallbackRouting(),_0x157b23=_0x1adfdb['certificateUrl']?await(await fetch(_0x1adfdb[_0x3a94b2(0x1c7)]))['json']():undefined;return new Promise(async(_0x380d4e,_0x39bcc9)=>{const _0x4cf7d2=_0x3a94b2;let _0x4363fc=0x0,_0x34255f=![],_0x5cbec4;const _0xb2039=async(_0x21aa67,_0x500ea2)=>{const _0x21c3dc=a10_0x19d7,_0x282bf2=getUserDomain(),_0x53ab19=_0x21aa67[_0x21c3dc(0x1bb)][_0x21c3dc(0x1a0)]||'',_0x228da1=await fetch(_0x282bf2+'/api/auth/get-session',{'headers':{'cookie':_0x53ab19}})[_0x21c3dc(0x1bf)](_0x5504d5=>_0x5504d5[_0x21c3dc(0x1b9)]()),_0x276c63=_0x228da1&&_0x228da1['session']&&_0x228da1['user'];if(_0x276c63){writeFileSync(cookieFile,_0x53ab19,_0x21c3dc(0x1c2));const _0x45e6bb=buildLoginSuccessHtml();_0x500ea2['writeHead'](0xc8,{'Content-Type':_0x21c3dc(0x1a5)}),_0x500ea2[_0x21c3dc(0x1a2)](_0x45e6bb),_0x3d8918(!![]);}else{const _0x1e1c86=encodeURIComponent(withPort(_0x1adfdb['origin'],_0x4363fc));_0x500ea2[_0x21c3dc(0x1a9)](0x12e,{'location':_0x282bf2+_0x21c3dc(0x1b1)+_0x1e1c86}),_0x500ea2[_0x21c3dc(0x1a2)]();return;}},_0x446614=_0x157b23?a10_0x550a3b[_0x4cf7d2(0x19e)](_0x157b23,_0xb2039):a10_0x1d5f9a[_0x4cf7d2(0x19e)](_0xb2039);function _0x3d8918(_0x232731){const _0x21d55e=_0x4cf7d2;if(_0x34255f)return;_0x34255f=!![],_0x5cbec4&&clearTimeout(_0x5cbec4),_0x446614[_0x21d55e(0x1c5)](),_0x380d4e(_0x232731);}_0x446614[_0x4cf7d2(0x1af)](0x0,_0x4cf7d2(0x1c3),()=>{const _0x2a9e02=_0x4cf7d2,_0x4c5280=_0x446614[_0x2a9e02(0x1c8)]();_0x4363fc=typeof _0x4c5280===_0x2a9e02(0x1bc)&&_0x4c5280?_0x4c5280[_0x2a9e02(0x19d)]:Number(_0x4c5280);const _0x34d3be=withPort(_0x1adfdb[_0x2a9e02(0x1b8)],_0x4363fc);_0x5cbec4=setTimeout(()=>{const _0x2a20c7=_0x2a9e02;!_0x11f609&&console[_0x2a20c7(0x1a1)]('!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.'),_0x3d8918(![]);},_0x2958e5);!_0x11f609&&(console[_0x2a9e02(0x1a1)]('🔐\x20Starting\x20login\x20service...'),console[_0x2a9e02(0x1a1)]('📍\x20Login\x20URL:',_0x34d3be),_0x7e6328?(console[_0x2a9e02(0x1a1)]('🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...'),console['log'](''),console['log']('💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.')):console['log']('💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.'),console[_0x2a9e02(0x1a1)](''));if(!_0x7e6328)return;openInBrowser(_0x34d3be)[_0x2a9e02(0x1bf)](_0x5e6459=>{const _0x785c9a=_0x2a9e02;!_0x11f609&&(_0x5e6459?console[_0x785c9a(0x1a1)](_0x785c9a(0x1a3)):(console[_0x785c9a(0x1a1)](_0x785c9a(0x1aa)),console['log'](_0x785c9a(0x1b0),_0x34d3be)),console[_0x785c9a(0x1a1)](''));})[_0x2a9e02(0x1c1)](()=>{const _0x53089f=_0x2a9e02;!_0x11f609&&(console['log']('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console['log'](_0x53089f(0x1b0),_0x34d3be),console[_0x53089f(0x1a1)](''));});}),_0x446614['on'](_0x4cf7d2(0x1b3),_0x1e4515=>{const _0x90e562=_0x4cf7d2;if(_0x34255f)return;_0x34255f=!![],_0x5cbec4&&clearTimeout(_0x5cbec4),!_0x11f609&&console['error']('Auth\x20server\x20error:',_0x1e4515),_0x446614[_0x90e562(0x1c5)](),_0x39bcc9(_0x1e4515);});});}function openInBrowser(_0x5416e5){return new Promise(_0x4c9473=>{const _0x32a2a1=a10_0x19d7,_0x4657e9=process[_0x32a2a1(0x1a7)];let _0x56903d;if(_0x4657e9==='win32')_0x56903d=_0x32a2a1(0x1c0)+_0x5416e5+'\x22';else _0x4657e9===_0x32a2a1(0x1a8)?_0x56903d=_0x32a2a1(0x1ba)+_0x5416e5+'\x22':_0x56903d=_0x32a2a1(0x1be)+_0x5416e5+'\x22';exec(_0x56903d,_0x1666ed=>{_0x1666ed?_0x4c9473(![]):_0x4c9473(!![]);});});}function a10_0x9b77(){const _0xb9d15f=['781956KnZkFH','88522ntgGAN','silent','port','createServer','3739806xmRrMA','cookie','log','end','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','timeoutMs','text/html;\x20charset=utf-8','2376444Odabed','platform','darwin','writeHead','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','5040536VQckig','local','498tczAKW','1159103eLmSKU','listen','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','/sign-in?redirect=','isAuth','error','103432KPrBXJ','/cert/lovrabet-dev.json','801IiWUhs','openBrowser','origin','json','open\x20\x22','headers','object','lovrabet','xdg-open\x20\x22','then','cmd\x20/c\x20start\x20\x22\x22\x20\x22','catch','utf-8','127.0.0.1','5zTEGcv','close','390HONrhr','certificateUrl','address'];a10_0x9b77=function(){return _0xb9d15f;};return a10_0x9b77();}if(import.meta.main){const isAuth=await authServer();console[a10_0x5d0453(0x1a1)](a10_0x5d0453(0x1b2),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a11_0x3857(_0x49e76a,_0x103e4a){_0x49e76a=_0x49e76a-0x1ca;const _0x2307b2=a11_0x2307();let _0x3857d6=_0x2307b2[_0x49e76a];return _0x3857d6;}const a11_0x2fa2e9=a11_0x3857;(function(_0x357f33,_0x279287){const _0x262ab9=a11_0x3857,_0x59e38a=_0x357f33();while(!![]){try{const _0x34180d=parseInt(_0x262ab9(0x1cd))/0x1*(-parseInt(_0x262ab9(0x1d5))/0x2)+-parseInt(_0x262ab9(0x1d3))/0x3+parseInt(_0x262ab9(0x1cc))/0x4+parseInt(_0x262ab9(0x1ca))/0x5*(parseInt(_0x262ab9(0x1d0))/0x6)+parseInt(_0x262ab9(0x1cf))/0x7*(-parseInt(_0x262ab9(0x1cb))/0x8)+-parseInt(_0x262ab9(0x1d4))/0x9*(-parseInt(_0x262ab9(0x1d1))/0xa)+parseInt(_0x262ab9(0x1d6))/0xb;if(_0x34180d===_0x279287)break;else _0x59e38a['push'](_0x59e38a['shift']());}catch(_0x9fdf94){_0x59e38a['push'](_0x59e38a['shift']());}}}(a11_0x2307,0x2dbba));function a11_0x2307(){const _0x52828b=['152GWwTdK','1088676YuOCqe','94271yNdQuT','.lovrabet','66773MbOPaQ','54KestOK','5690MtVUGU','cookie','754560TzmBVp','684ezPKti','4TgSLjQ','5288118ZlJrav','6930LADuff'];a11_0x2307=function(){return _0x52828b;};return a11_0x2307();}import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a11_0x2fa2e9(0x1ce));export const cookieFile=join(configDir,a11_0x2fa2e9(0x1d2));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4b16f4,_0x1f5d21){var _0x35a2d5=a12_0x55d1,_0x458a59=_0x4b16f4();while(!![]){try{var _0x47ed43=-parseInt(_0x35a2d5(0x90))/0x1+parseInt(_0x35a2d5(0x94))/0x2*(-parseInt(_0x35a2d5(0x93))/0x3)+parseInt(_0x35a2d5(0x8a))/0x4+-parseInt(_0x35a2d5(0x8b))/0x5+-parseInt(_0x35a2d5(0x8e))/0x6*(parseInt(_0x35a2d5(0x91))/0x7)+-parseInt(_0x35a2d5(0x8d))/0x8*(-parseInt(_0x35a2d5(0x8c))/0x9)+-parseInt(_0x35a2d5(0x8f))/0xa*(-parseInt(_0x35a2d5(0x92))/0xb);if(_0x47ed43===_0x1f5d21)break;else _0x458a59['push'](_0x458a59['shift']());}catch(_0x57912a){_0x458a59['push'](_0x458a59['shift']());}}}(a12_0x54b7,0x8b89c));import{readFileSync}from'node:fs';function a12_0x54b7(){var _0xebaa0b=['921452wtSQdh','3817UqKjzu','57264xcxPBT','42icSbaV','2886172qxbAbb','3140075AaholP','3905118hlbtjb','16DLmZao','6dgnczb','32210OBIuFq','974987RuxSIi'];a12_0x54b7=function(){return _0xebaa0b;};return a12_0x54b7();}function a12_0x55d1(_0x130c97,_0x5a4806){_0x130c97=_0x130c97-0x8a;var _0x54b793=a12_0x54b7();var _0x55d1d4=_0x54b793[_0x130c97];return _0x55d1d4;}import{cookieFile}from'../auth/constant.js';export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a13_0x4e34(){const _0x2ce723=['json','user','20945672SrXKZz','647792bbCVat','20TmJLHA','3SPeQpM','/api/auth/get-session','3836rqdSnK','12094NoRjpH','4331196JtUrMf','3202172klAaYz','151mLrlIW','7391005lBhBJv','4998kHUEhc','utf-8'];a13_0x4e34=function(){return _0x2ce723;};return a13_0x4e34();}(function(_0x45d19d,_0x20c3e4){const _0x1156b8=a13_0xa401,_0x847423=_0x45d19d();while(!![]){try{const _0x24d709=parseInt(_0x1156b8(0x10a))/0x1*(-parseInt(_0x1156b8(0x107))/0x2)+-parseInt(_0x1156b8(0x104))/0x3*(-parseInt(_0x1156b8(0x109))/0x4)+-parseInt(_0x1156b8(0x10b))/0x5+parseInt(_0x1156b8(0x10c))/0x6*(-parseInt(_0x1156b8(0x106))/0x7)+parseInt(_0x1156b8(0x102))/0x8+-parseInt(_0x1156b8(0x108))/0x9*(-parseInt(_0x1156b8(0x103))/0xa)+parseInt(_0x1156b8(0x101))/0xb;if(_0x24d709===_0x20c3e4)break;else _0x847423['push'](_0x847423['shift']());}catch(_0x5aac02){_0x847423['push'](_0x847423['shift']());}}}(a13_0x4e34,0xdbd17));function a13_0xa401(_0x5cfbd6,_0x50d5f2){_0x5cfbd6=_0x5cfbd6-0x101;const _0x4e347c=a13_0x4e34();let _0xa40198=_0x4e347c[_0x5cfbd6];return _0xa40198;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0x410c66=a13_0xa401;try{if(!existsSync(cookieFile))return null;const _0x3e3ebf=readFileSync(cookieFile,_0x410c66(0x10d)),_0x580a19=await fetch(getUserDomain()+_0x410c66(0x105),{'headers':{'cookie':_0x3e3ebf}});if(!_0x580a19['ok'])return null;const _0xb85310=await _0x580a19[_0x410c66(0x10e)]();if(!_0xb85310['session']||!_0xb85310[_0x410c66(0x10f)])return null;return _0xb85310;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x37579c,_0x36a7fc){const _0x5d54cd=a14_0xb9fb,_0x299238=_0x37579c();while(!![]){try{const _0x2b8c80=parseInt(_0x5d54cd(0x106))/0x1*(-parseInt(_0x5d54cd(0x109))/0x2)+parseInt(_0x5d54cd(0x100))/0x3*(-parseInt(_0x5d54cd(0x101))/0x4)+-parseInt(_0x5d54cd(0xff))/0x5+parseInt(_0x5d54cd(0x102))/0x6+-parseInt(_0x5d54cd(0x10a))/0x7*(-parseInt(_0x5d54cd(0x104))/0x8)+parseInt(_0x5d54cd(0x107))/0x9+parseInt(_0x5d54cd(0xfd))/0xa;if(_0x2b8c80===_0x36a7fc)break;else _0x299238['push'](_0x299238['shift']());}catch(_0x54a562){_0x299238['push'](_0x299238['shift']());}}}(a14_0xe26a,0xf0a8a));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a14_0xb9fb(_0x190bb6,_0xa59400){_0x190bb6=_0x190bb6-0xfd;const _0xe26ae7=a14_0xe26a();let _0xb9fb50=_0xe26ae7[_0x190bb6];return _0xb9fb50;}import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x5df38a=a14_0xb9fb;try{if(!existsSync(cookieFile))return![];const _0x4db491=readFileSync(cookieFile,_0x5df38a(0xfe)),_0x3b9278=await fetch(getUserDomain()+_0x5df38a(0x105),{'headers':{'cookie':_0x4db491}})['then'](_0x395978=>_0x395978[_0x5df38a(0x103)]());return _0x3b9278&&_0x3b9278[_0x5df38a(0x108)]&&_0x3b9278['user'];}catch{}return![];}function a14_0xe26a(){const _0x3fbf0d=['9893jBBacJ','4774680JzdZLX','session','302oNtWBQ','8533GrokSW','26250250pkSZOU','utf-8','4417360fBlbUA','1160820WEOTwc','16XRqrzy','6925806LAjImL','json','3944kUJjuy','/api/auth/get-session'];a14_0xe26a=function(){return _0x3fbf0d;};return a14_0xe26a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x44a0a7,_0x4d79b4){const _0x3c9c7e=a15_0x1a8d,_0x1d784e=_0x44a0a7();while(!![]){try{const _0x363dcd=parseInt(_0x3c9c7e(0x106))/0x1*(parseInt(_0x3c9c7e(0x10d))/0x2)+parseInt(_0x3c9c7e(0x10a))/0x3+-parseInt(_0x3c9c7e(0x108))/0x4+parseInt(_0x3c9c7e(0x104))/0x5*(-parseInt(_0x3c9c7e(0x10b))/0x6)+-parseInt(_0x3c9c7e(0x107))/0x7*(parseInt(_0x3c9c7e(0x105))/0x8)+parseInt(_0x3c9c7e(0x10c))/0x9+-parseInt(_0x3c9c7e(0x109))/0xa*(-parseInt(_0x3c9c7e(0x103))/0xb);if(_0x363dcd===_0x4d79b4)break;else _0x1d784e['push'](_0x1d784e['shift']());}catch(_0x14096c){_0x1d784e['push'](_0x1d784e['shift']());}}}(a15_0x3d7a,0xf3c77));function a15_0x1a8d(_0x5b6e0d,_0x3f97c2){_0x5b6e0d=_0x5b6e0d-0x103;const _0x3d7ab4=a15_0x3d7a();let _0x1a8dbd=_0x3d7ab4[_0x5b6e0d];return _0x1a8dbd;}export function buildLoginSuccessHtml(){const _0x342d56='Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.';return'<!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>'+_0x342d56+'</div>\x0a\x20\x20\x20\x20<p\x20class=\x22cli-hint\x22>Rabetbase\x20CLI\x20·\x20session\x20saved\x20locally</p>\x0a\x20\x20</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>';}function a15_0x3d7a(){const _0x4af6d8=['5431580anEFlu','5450FnfYmW','4668906CyzuoX','232914CvbNmy','13162473jMmCKW','7274sYisLy','35189kneaoH','240fEfGOM','832qkETCL','264gjTCfk','101143kZunVA'];a15_0x3d7a=function(){return _0x4af6d8;};return a15_0x3d7a();}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ffc1d,_0x489a2c){var _0x10ed33=a16_0x4523,_0x3a0af8=_0x3ffc1d();while(!![]){try{var _0x54ecd2=-parseInt(_0x10ed33(0xa1))/0x1+-parseInt(_0x10ed33(0x9c))/0x2*(parseInt(_0x10ed33(0x98))/0x3)+-parseInt(_0x10ed33(0x97))/0x4+-parseInt(_0x10ed33(0xa0))/0x5+parseInt(_0x10ed33(0x9d))/0x6*(parseInt(_0x10ed33(0x9e))/0x7)+parseInt(_0x10ed33(0x9f))/0x8*(parseInt(_0x10ed33(0x9b))/0x9)+parseInt(_0x10ed33(0x99))/0xa;if(_0x54ecd2===_0x489a2c)break;else _0x3a0af8['push'](_0x3a0af8['shift']());}catch(_0x2fdf81){_0x3a0af8['push'](_0x3a0af8['shift']());}}}(a16_0x5a08,0x347ae));function a16_0x4523(_0x2bb4de,_0x577757){_0x2bb4de=_0x2bb4de-0x96;var _0x5a08fa=a16_0x5a08();var _0x4523d4=_0x5a08fa[_0x2bb4de];return _0x4523d4;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function logout(){var _0x44b4de=a16_0x4523;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x44b4de(0x9a)]('✓\x20Logged\x20out')):console[_0x44b4de(0x9a)](_0x44b4de(0x96));}function a16_0x5a08(){var _0x27c3fd=['1849250aqbgpT','406449VWhqvW','!\x20Not\x20logged\x20in','1347892xSAibi','78lCJSox','10302570vcOvPN','log','153UXsYiL','26518jMQXAB','1188060xHiaHo','14nuJZJx','116088rtNLNx'];a16_0x5a08=function(){return _0x27c3fd;};return a16_0x5a08();}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0xf3978b=a17_0x543a;function a17_0x543a(_0x55093f,_0x3923eb){_0x55093f=_0x55093f-0x134;const _0x27c569=a17_0x27c5();let _0x543ab3=_0x27c569[_0x55093f];return _0x543ab3;}(function(_0x538f48,_0x112e6d){const _0x8d80d7=a17_0x543a,_0x495f02=_0x538f48();while(!![]){try{const _0x52ace9=parseInt(_0x8d80d7(0x135))/0x1+parseInt(_0x8d80d7(0x137))/0x2*(parseInt(_0x8d80d7(0x138))/0x3)+-parseInt(_0x8d80d7(0x136))/0x4+-parseInt(_0x8d80d7(0x13f))/0x5*(parseInt(_0x8d80d7(0x13a))/0x6)+-parseInt(_0x8d80d7(0x134))/0x7*(-parseInt(_0x8d80d7(0x13b))/0x8)+parseInt(_0x8d80d7(0x139))/0x9*(-parseInt(_0x8d80d7(0x13c))/0xa)+-parseInt(_0x8d80d7(0x13d))/0xb;if(_0x52ace9===_0x112e6d)break;else _0x495f02['push'](_0x495f02['shift']());}catch(_0x5c41c0){_0x495f02['push'](_0x495f02['shift']());}}}(a17_0x27c5,0xcb98b));export const dynamicCliFlags={'enableBffSave':{'type':a17_0xf3978b(0x13e)}};function a17_0x27c5(){const _0x3a9e84=['10ofNXzt','6545770SzKaQN','boolean','935080REGYRV','161RhzZRJ','1516107MyHdms','4585060ZMhTLB','338762VbjmzX','21hiowib','3394845jHXuuL','6JmfgGE','152248sbyktJ'];a17_0x27c5=function(){return _0x3a9e84;};return a17_0x27c5();}
|