@lovrabet/rabetbase-cli 2.5.10-beta.4 โ 2.5.10-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +4 -4
- 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
|
-
(function(
|
|
1
|
+
const a0_0x36e20b=a0_0x59b8;(function(_0x44718a,_0x3f97bb){const _0x3213da=a0_0x59b8,_0x185d67=_0x44718a();while(!![]){try{const _0x4a63ba=parseInt(_0x3213da(0x108))/0x1*(-parseInt(_0x3213da(0x10f))/0x2)+parseInt(_0x3213da(0x10d))/0x3+parseInt(_0x3213da(0x110))/0x4*(parseInt(_0x3213da(0x11d))/0x5)+-parseInt(_0x3213da(0x113))/0x6*(-parseInt(_0x3213da(0x10c))/0x7)+parseInt(_0x3213da(0x10e))/0x8+parseInt(_0x3213da(0x107))/0x9*(parseInt(_0x3213da(0x11a))/0xa)+-parseInt(_0x3213da(0x119))/0xb;if(_0x4a63ba===_0x3f97bb)break;else _0x185d67['push'](_0x185d67['shift']());}catch(_0x26e22c){_0x185d67['push'](_0x185d67['shift']());}}}(a0_0x427b,0xcad97));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x39eede from'node:path';import{fetchDatasetDoc}from'../core/api-client.js';function a0_0x427b(){const _0x3f7ed0=['.md\x20(','tableName','datasetCode','38922532EeGjrn','15445510AcSiBS','push','length','45HsJRse','name','Generated\x20docs\x20successfully:\x20','log','Waiting\x203\x20seconds...\x0a','./docs','api-doc','join','9iTYWaL','1GQBktr','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','.md','success','14mrHpGy','1494849TfJWyi','6276392yxHmgR','1671028cXuZYp','690896MwMZlM','message','โ\x20Generated:\x20','2468694lPSJiu','.md\x20-\x20','โ\x20Failed:\x20'];a0_0x427b=function(){return _0x3f7ed0;};return a0_0x427b();}import{logger}from'../utils/logger.js';export{fetchDatasetDoc}from'../core/api-client.js';function a0_0x59b8(_0x11823b,_0x3982f6){_0x11823b=_0x11823b-0x107;const _0x427bd6=a0_0x427b();let _0x59b89f=_0x427bd6[_0x11823b];return _0x59b89f;}function delay(_0x22b831){return new Promise(_0x5d97ee=>setTimeout(_0x5d97ee,_0x22b831));}export async function generateDatasetDocs(_0x2ab3e6,_0x4f4a8c,_0x3b71a3,_0x48f6c3=a0_0x36e20b(0x122),_0x563ac2,_0x450554){const _0x35f6ca=a0_0x36e20b;mkdirSync(_0x48f6c3,{'recursive':!![]});const _0x4eefaa=[],_0x4cc354=_0x2ab3e6[_0x35f6ca(0x11c)];console['log']('\x0a'+_0x4cc354+_0x35f6ca(0x109));for(let _0x34e1fb=0x0;_0x34e1fb<_0x2ab3e6['length'];_0x34e1fb++){const _0x112921=_0x2ab3e6[_0x34e1fb],_0x5a28c8=_0x34e1fb+0x1,_0x511242=_0x112921[_0x35f6ca(0x117)];try{console[_0x35f6ca(0x120)]('['+_0x5a28c8+'/'+_0x4cc354+']\x20Generating:\x20'+_0x511242+_0x35f6ca(0x116)+_0x112921['name']+')');if(_0x563ac2)_0x563ac2(_0x5a28c8,_0x4cc354,_0x511242);const _0x29a385=await fetchDatasetDoc({'appCode':_0x4f4a8c,'cookie':_0x3b71a3,'datasetCode':_0x112921[_0x35f6ca(0x118)],'datasetId':_0x112921['id'],'enableAI':![],'extraParams':_0x450554}),_0x5589fc=a0_0x39eede[_0x35f6ca(0x124)](_0x48f6c3,_0x511242+_0x35f6ca(0x10a));writeFileSync(_0x5589fc,_0x29a385,{'encoding':'utf8'}),console[_0x35f6ca(0x120)](_0x35f6ca(0x112)+_0x511242+_0x35f6ca(0x10a)),logger[_0x35f6ca(0x10b)](_0x35f6ca(0x123),_0x35f6ca(0x11f)+_0x511242,undefined,{'datasetCode':_0x112921[_0x35f6ca(0x118)],'datasetName':_0x112921[_0x35f6ca(0x11e)],'filePath':_0x5589fc,'progress':_0x5a28c8+'/'+_0x4cc354}),_0x4eefaa[_0x35f6ca(0x11b)]({'datasetCode':_0x112921['datasetCode'],'datasetName':_0x112921['name'],'filePath':_0x5589fc,'success':!![]});if(_0x5a28c8<_0x4cc354)await delay(0x1388);}catch(_0x9be195){const _0x4ea8f1=_0x9be195 instanceof Error?_0x9be195[_0x35f6ca(0x111)]:String(_0x9be195);console[_0x35f6ca(0x120)](_0x35f6ca(0x115)+_0x511242+_0x35f6ca(0x114)+_0x4ea8f1),logger['error']('api-doc','Failed\x20to\x20generate\x20docs:\x20'+_0x112921[_0x35f6ca(0x118)],{'datasetCode':_0x112921['datasetCode'],'datasetName':_0x112921['name'],'error':_0x4ea8f1,'progress':_0x5a28c8+'/'+_0x4cc354}),_0x4eefaa[_0x35f6ca(0x11b)]({'datasetCode':_0x112921[_0x35f6ca(0x118)],'datasetName':_0x112921[_0x35f6ca(0x11e)],'filePath':'','success':![],'error':_0x4ea8f1}),_0x5a28c8<_0x4cc354&&(console[_0x35f6ca(0x120)](_0x35f6ca(0x121)),await delay(0xbb8));}}return _0x4eefaa;}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5e6bad,_0x4cca7d){const _0x3a7da7=a1_0x4320,_0x109675=_0x5e6bad();while(!![]){try{const _0x46f817=-parseInt(_0x3a7da7(0x1ee))/0x1*(-parseInt(_0x3a7da7(0x1f6))/0x2)+parseInt(_0x3a7da7(0x1f5))/0x3*(-parseInt(_0x3a7da7(0x1e6))/0x4)+-parseInt(_0x3a7da7(0x1f9))/0x5+parseInt(_0x3a7da7(0x1de))/0x6+parseInt(_0x3a7da7(0x1f0))/0x7*(-parseInt(_0x3a7da7(0x1ed))/0x8)+parseInt(_0x3a7da7(0x1db))/0x9*(-parseInt(_0x3a7da7(0x1fb))/0xa)+parseInt(_0x3a7da7(0x1eb))/0xb;if(_0x46f817===_0x4cca7d)break;else _0x109675['push'](_0x109675['shift']());}catch(_0x4c8e86){_0x109675['push'](_0x109675['shift']());}}}(a1_0x31c2,0x2320d));import a1_0x2ddd61 from'node:path';import{CliErrors}from'../errors.js';function a1_0x4320(_0x5566f3,_0x311157){_0x5566f3=_0x5566f3-0x1db;const _0x31c2dc=a1_0x31c2();let _0x4320fe=_0x31c2dc[_0x5566f3];return _0x4320fe;}export function normalizeApiDir(_0x298a16,_0x5ca007=process['cwd']()){const _0x1b3396=a1_0x4320;return a1_0x2ddd61[_0x1b3396(0x1ec)](_0x5ca007,_0x298a16);}function normalizedApiGroup(_0x23d72e){const _0x3ed680=a1_0x4320,_0x593c8a=_0x23d72e?.[_0x3ed680(0x1dc)]();return _0x593c8a||undefined;}function a1_0x31c2(){const _0x5d4fae=['outputDir','5483258Abyhjc','resolve','8UmJBzx','26kuqicE','set','1862273UFauvP','filter','validation','values','\x22\x20resolves\x20to\x20multiple\x20API\x20directories.','26259RgLJUs','13582oXjjnX','API\x20group\x20\x22','.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.','656045ANTTJI','get','79410faGdte','9gemivY','trim','flatMap','872238ryysYS','apiGroup','add','join','app','name','some','size','124sLMLVf','normalizedApiDir','map','push'];a1_0x31c2=function(){return _0x5d4fae;};return a1_0x31c2();}export function resolveApiProfileLayouts(_0x2d43f9,_0x3f708e,_0x3ffa7e=process['cwd']()){const _0x1b3c79=a1_0x4320,_0x134abb=_0x2d43f9[_0x1b3c79(0x1e8)](_0x5a233c=>{const _0x21d8ad=_0x3f708e(_0x5a233c);return{'app':_0x5a233c,'outputDir':_0x21d8ad,'normalizedApiDir':normalizeApiDir(_0x21d8ad,_0x3ffa7e),'apiGroup':normalizedApiGroup(_0x5a233c['apiGroup'])};}),_0x23ca8e=new Map();for(const _0x57034b of _0x134abb){if(!_0x57034b[_0x1b3c79(0x1df)])continue;const _0x7ddfb8=_0x23ca8e[_0x1b3c79(0x1fa)](_0x57034b['apiGroup'])??new Set();_0x7ddfb8[_0x1b3c79(0x1e0)](_0x57034b[_0x1b3c79(0x1e7)]),_0x23ca8e[_0x1b3c79(0x1ef)](_0x57034b[_0x1b3c79(0x1df)],_0x7ddfb8);}for(const [_0x535986,_0x412033]of _0x23ca8e){if(_0x412033[_0x1b3c79(0x1e5)]>0x1)throw CliErrors[_0x1b3c79(0x1f2)](_0x1b3c79(0x1f7)+_0x535986+_0x1b3c79(0x1f4),'Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.');}const _0x23e7ee=new Map();for(const _0x50105b of _0x134abb){const _0x3316b1=_0x23e7ee[_0x1b3c79(0x1fa)](_0x50105b[_0x1b3c79(0x1e7)])??[];_0x3316b1[_0x1b3c79(0x1e9)](_0x50105b),_0x23e7ee['set'](_0x50105b[_0x1b3c79(0x1e7)],_0x3316b1);}for(const _0x212f18 of _0x23e7ee[_0x1b3c79(0x1f3)]()){const _0x501dae=new Set(_0x212f18[_0x1b3c79(0x1dd)](_0x1b27b4=>_0x1b27b4[_0x1b3c79(0x1df)]?[_0x1b27b4[_0x1b3c79(0x1df)]]:[]));if(_0x501dae['size']===0x0)continue;if(_0x501dae[_0x1b3c79(0x1e5)]>0x1||_0x212f18[_0x1b3c79(0x1e4)](_0xab894f=>!_0xab894f[_0x1b3c79(0x1df)])){const _0x36593b=_0x212f18[_0x1b3c79(0x1e8)](_0x3aae9c=>_0x3aae9c[_0x1b3c79(0x1e2)][_0x1b3c79(0x1e3)])[_0x1b3c79(0x1e1)](',\x20');throw CliErrors[_0x1b3c79(0x1f2)]('API\x20directory\x20\x22'+_0x212f18[0x0][_0x1b3c79(0x1ea)]+'\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20'+_0x36593b+_0x1b3c79(0x1f8));}}return _0x134abb;}export function getRegistryGroup(_0x41f252,_0x5b7403){const _0x48c10a=a1_0x4320;if(_0x5b7403[_0x48c10a(0x1df)])return _0x41f252['filter'](_0x8bfba0=>_0x8bfba0['apiGroup']===_0x5b7403[_0x48c10a(0x1df)]);const _0xc951c=_0x41f252[_0x48c10a(0x1f1)](_0x3e6134=>_0x3e6134[_0x48c10a(0x1e7)]===_0x5b7403['normalizedApiDir']);return _0xc951c['length']===0x1?_0xc951c:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x52f784,_0x38b0e3){var _0x6ade31=a2_0x3179,_0x5e823f=_0x52f784();while(!![]){try{var _0x33009c=parseInt(_0x6ade31(0x1d8))/0x1+-parseInt(_0x6ade31(0x1d7))/0x2+-parseInt(_0x6ade31(0x1d1))/0x3+-parseInt(_0x6ade31(0x1d9))/0x4*(-parseInt(_0x6ade31(0x1d2))/0x5)+parseInt(_0x6ade31(0x1da))/0x6*(-parseInt(_0x6ade31(0x1d3))/0x7)+parseInt(_0x6ade31(0x1d4))/0x8*(-parseInt(_0x6ade31(0x1d6))/0x9)+parseInt(_0x6ade31(0x1d5))/0xa;if(_0x33009c===_0x38b0e3)break;else _0x5e823f['push'](_0x5e823f['shift']());}catch(_0x32d650){_0x5e823f['push'](_0x5e823f['shift']());}}}(a2_0x15ba,0x416e9));function a2_0x15ba(){var _0x25d59e=['4842QpWQlh','28150scmIXb','59711DRIwXQ','192144auUBHm','6OAmKwZ','276swLQrd','30mAGEWH','2616593orcsgC','3272huYteT','5280900Qintpm'];a2_0x15ba=function(){return _0x25d59e;};return a2_0x15ba();}function a2_0x3179(_0x1a0973,_0x3f79ff){_0x1a0973=_0x1a0973-0x1d1;var _0x15ba4d=a2_0x15ba();var _0x3179b0=_0x15ba4d[_0x1a0973];return _0x3179b0;}export{fetchModelList}from'../core/api-client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3af45f,_0x655192){const _0x2f2d4e=a3_0x4c8e,_0x51407a=_0x3af45f();while(!![]){try{const _0x47d41a=parseInt(_0x2f2d4e(0xdf))/0x1+-parseInt(_0x2f2d4e(0x102))/0x2+-parseInt(_0x2f2d4e(0xda))/0x3+-parseInt(_0x2f2d4e(0xd3))/0x4+-parseInt(_0x2f2d4e(0xe0))/0x5+-parseInt(_0x2f2d4e(0xfa))/0x6+-parseInt(_0x2f2d4e(0xec))/0x7*(-parseInt(_0x2f2d4e(0xe9))/0x8);if(_0x47d41a===_0x655192)break;else _0x51407a['push'](_0x51407a['shift']());}catch(_0x4c8a3a){_0x51407a['push'](_0x51407a['shift']());}}}(a3_0x14ac,0xb8fc8));import a3_0x1f90df from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x3a14c7 from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';function a3_0x14ac(){const _0x54f5e1=['path','1951756fvhAwm','default','client.ts.tpl','scaffoldMode','refreshed',',\x20env:\x20','3677996HYJmNB','overwritten','action','.ts','existed','tableName','name','3655458AUgVMF','LOVRABET','alias','replace','modelRuntime','1043775YSrNwK','3834255EUIjYP','CONFIG_NAMES.DEFAULT','\x20config\x20set\x20app\x20<value>`','overwriteTypescript','replaceApiContent','includes','created','-client','runtimeDomain','403816MYWZCW','Please\x20configure\x20app\x20code\x20first\x20via\x20`','Model\x20facts\x20refreshed.','581xPdrNY','test','resolve','missing','basename','modelProfile','API\x20scaffold\x20written.','map','api','typescript','format','templates/generate-api','join','../..','3569688euOxiy','client','datasetCode','utf8','toUpperCase','preserved','stringify'];a3_0x14ac=function(){return _0x54f5e1;};return a3_0x14ac();}import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';function a3_0x4c8e(_0x8c3f41,_0x3ee0ad){_0x8c3f41=_0x8c3f41-0xd0;const _0x14acb7=a3_0x14ac();let _0x4c8e89=_0x14acb7[_0x8c3f41];return _0x4c8e89;}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(_0x4280bd,_0x697039){const _0x9a9447=a3_0x4c8e;if(!_0x697039)return _0x4280bd?_0x9a9447(0xff):_0x9a9447(0xef);return _0x4280bd?_0x9a9447(0xd4):'created';}export async function generateApiFile(_0x46a9db,_0x474ae8,_0x1d80b7,_0x5bd26c,_0x373da5,_0x16d717,_0x359375,_0x10cbd0={},_0x3a1bbe={}){const _0x48395c=a3_0x4c8e;if(!_0x1d80b7)throw new Error(_0x48395c(0xea)+CLI_BIN_NAME+_0x48395c(0xe2));const _0x4ba9c9=_0x5bd26c&&!_0x359375,_0xa4c331=!!_0x3a1bbe['modelProfile'],_0x5c2e7c=_0xa4c331||_0x4ba9c9,_0x487a4f=_0x359375||_0x1d80b7,_0x52dcd8=_0xa4c331||_0x4ba9c9?_0x48395c(0x103):_0x487a4f,_0x5e6748=_0xa4c331||_0x4ba9c9?_0x48395c(0xe1):JSON[_0x48395c(0x100)](_0x487a4f),_0x486944=!isProduction(_0x373da5),_0x42172c=_0x486944?_0x48395c(0xd2)+JSON[_0x48395c(0x100)](_0x373da5):'',_0x4098ba='{\x20apiConfigName:\x20'+_0x5e6748+_0x42172c+',\x20...LOVRABET_SDK_CONFIG\x20}',_0x5753cd=_0xa4c331?'':_0x474ae8,_0x36f0ec=_0x5753cd?_0x5753cd+'-api':_0x48395c(0xf4),_0x27c164=_0x5753cd?_0x5753cd+_0x48395c(0xe7):_0x48395c(0xfb),_0x1c010e=_0x5753cd&&!/^app-[a-f0-9]+$/i[_0x48395c(0xed)](_0x5753cd)?_0x5753cd[_0x48395c(0xdd)](/-/g,'_')[_0x48395c(0xfe)]():_0x48395c(0xdb),_0x54864e=/^\d/[_0x48395c(0xed)](_0x1c010e)?'APP_'+_0x1c010e:_0x1c010e,_0x6bd770=_0x46a9db[_0x48395c(0xf3)](_0x358f6c=>({'datasetCode':_0x358f6c[_0x48395c(0xfc)],'tableName':_0x358f6c[_0x48395c(0xd8)],'name':_0x358f6c['name']||'','alias':_0x358f6c[_0x48395c(0xdc)]||_0x358f6c['key']})),_0xdabdd9=fileURLToPath(import.meta.url),_0x41c5eb=a3_0x3a14c7[_0x48395c(0xee)](a3_0x3a14c7['dirname'](_0xdabdd9),_0x48395c(0xf9)),_0x26cb01=a3_0x3a14c7[_0x48395c(0xf8)](_0x41c5eb,_0x48395c(0xf7)),_0x4fb319=a3_0x3a14c7[_0x48395c(0xf8)](_0x26cb01,'api.ts.tpl'),_0x548b5f=a3_0x3a14c7[_0x48395c(0xf8)](_0x26cb01,_0x48395c(0x104)),_0x2826df=_0x16d717;mkdirSync(_0x2826df,{'recursive':!![]});const _0x569c8e=_0xa4c331?{}:_0x10cbd0,_0x4f5030=await generateSdkConfigFile(_0x2826df,_0x569c8e,_0x5753cd),_0x7ef23=a3_0x3a14c7[_0x48395c(0xf0)](_0x4f5030,_0x48395c(0xd6)),_0x446ffb=a3_0x3a14c7[_0x48395c(0xf8)](_0x2826df,_0x36f0ec+'.ts'),_0x24850d=a3_0x3a14c7['join'](_0x2826df,_0x27c164+'.ts'),_0x4b0142=_0x3a1bbe[_0x48395c(0xe3)]===!![],_0xcc664c=existsSync(_0x446ffb),_0x2b6ac1=existsSync(_0x24850d),_0x3812e4=_0x3a1bbe[_0x48395c(0xd0)]??(_0x4b0142?'replace':'missing'),_0x8604d5=_0x3812e4===_0x48395c(0xdd)||_0x3812e4==='missing'&&!_0xcc664c,_0x2d5c44=_0x3812e4===_0x48395c(0xdd)||_0x3812e4===_0x48395c(0xef)&&!_0x2b6ac1,_0x17b7fd=_0x3a1bbe['modelProfile']?updateModelRegistry({'outputDir':_0x2826df,'profileName':_0x3a1bbe[_0x48395c(0xf1)][_0x48395c(0xd9)],'defaultProfile':_0x3a1bbe[_0x48395c(0xf1)]['defaultName'],'appCode':_0x1d80b7,'runtimeDomain':_0x3a1bbe[_0x48395c(0xf1)][_0x48395c(0xe8)],'models':_0x6bd770,'allowEmptyReplacement':_0x3a1bbe['allowEmptyModelReplacement']===!![]}):undefined,_0x3a8f2e=_0x17b7fd?a3_0x3a14c7[_0x48395c(0xf8)](_0x2826df,MODEL_RUNTIME_FILE_NAME):undefined,_0xb2757f=_0x3a8f2e?existsSync(_0x3a8f2e):![],_0x5f15e7=_0xa4c331&&_0x3812e4!=='none'?await renderModelRegistryScaffold(_0x2826df):undefined;_0x3a8f2e&&_0x5f15e7&&writeFileSync(_0x3a8f2e,_0x5f15e7[_0x48395c(0xde)],_0x48395c(0xfd));const _0x471070=_0x6bd770[0x0]?.[_0x48395c(0xdc)];if(_0x8604d5){const _0x51e317=_0x5f15e7?.[_0x48395c(0xf4)]??readFileSync(_0x4fb319,_0x48395c(0xfd)),_0x3ff765=_0xa4c331?_0x51e317:TemplateReplacer[_0x48395c(0xe4)](_0x51e317,_0x1d80b7,_0x6bd770,_0x471070,_0x36f0ec,_0x5e6748,undefined,_0x54864e);writeFileSync(_0x446ffb,await a3_0x1f90df[_0x48395c(0xf6)](_0x3ff765,{'parser':_0x48395c(0xf5)}),{'encoding':_0x48395c(0xfd)});}if(_0x2d5c44){const _0x1b236a=_0x5f15e7?.[_0x48395c(0xfb)]??readFileSync(_0x548b5f,_0x48395c(0xfd)),_0xacc912=_0xa4c331?_0x1b236a:TemplateReplacer[_0x48395c(0xe4)](_0x1b236a,_0x1d80b7,_0x6bd770,_0x471070,_0x36f0ec,_0x5e6748,_0x4098ba,_0x54864e,_0x7ef23);writeFileSync(_0x24850d,await a3_0x1f90df[_0x48395c(0xf6)](_0xacc912,{'parser':_0x48395c(0xf5)}),{'encoding':_0x48395c(0xfd)});}const _0x32fd23=_0x6bd770['length'],_0x53613c={'api':{'path':_0x446ffb,'action':fileAction(_0xcc664c,_0x8604d5)},'client':{'path':_0x24850d,'action':fileAction(_0x2b6ac1,_0x2d5c44)},'sdkConfig':{'path':_0x4f5030,'action':_0x48395c(0xd1)},..._0x17b7fd?{'modelRegistry':{'path':_0x17b7fd[_0x48395c(0x101)],'action':_0x17b7fd[_0x48395c(0xd7)]?_0x48395c(0xd1):_0x48395c(0xe6)},'modelRuntime':{'path':_0x3a8f2e,'action':_0x5f15e7?_0xb2757f?_0x48395c(0xd1):_0x48395c(0xe6):_0xb2757f?_0x48395c(0xff):_0x48395c(0xef)}}:{}},_0x5e3c99=existsSync(_0x446ffb)&&readFileSync(_0x446ffb,_0x48395c(0xfd))[_0x48395c(0xe5)](MODEL_REGISTRY_FILE_NAME[_0x48395c(0xdd)](_0x48395c(0xd6),'')),_0x2c1821=existsSync(_0x24850d)&&readFileSync(_0x24850d,_0x48395c(0xfd))[_0x48395c(0xe5)]('LOVRABET_RUNTIME_DOMAIN'),_0x3f50d=_0xa4c331?!_0x5e3c99||!_0x2c1821||!existsSync(_0x3a8f2e):![],_0x37d380=_0xa4c331?_0x3f50d:_0x53613c[_0x48395c(0xf4)][_0x48395c(0xd5)]===_0x48395c(0xff)||_0x53613c[_0x48395c(0xfb)][_0x48395c(0xd5)]===_0x48395c(0xff);return logger['success']('init-api',_0x37d380?a3_0x3a14c7[_0x48395c(0xf0)](_0x4f5030)+'\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.':_0xa4c331?_0x48395c(0xeb):_0x48395c(0xf2),undefined,{'apiFile':_0x446ffb,'clientFile':_0x24850d,'sdkConfig':_0x4f5030,'modelCount':_0x32fd23,'configName':_0x52dcd8,'isDefaultConfig':_0x5c2e7c,'needsAgentMerge':_0x37d380,'needsProjectUpgrade':_0x3f50d,'files':_0x53613c}),{'appCode':_0x1d80b7,'modelCount':_0x32fd23,'models':_0x6bd770,'apiFilePath':_0x446ffb,'clientFilePath':_0x24850d,'sdkConfigPath':_0x4f5030,'modelRegistryPath':_0x17b7fd?.['path'],'modelRuntimePath':_0x3a8f2e,'modelProfile':_0x3a1bbe['modelProfile']?.[_0x48395c(0xd9)],'configName':_0x52dcd8,'isDefaultConfig':_0x5c2e7c,'sdkRouting':_0x569c8e,'files':_0x53613c,'needsAgentMerge':_0x37d380,'needsProjectUpgrade':_0x3f50d};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x3f8bb3=a4_0x31ff;function a4_0x1c4f(){const _0x383c3d=['-sdk-config.ts','54oQaSgS','sdk-config.ts','49999rPvftX','205314vhKeuo',',\x0a\x20\x20','join','push','format','259848BmVcUm','stringify',',\x0a}','utf8','length','\x20as\x20const;\x0a','536930QJKkPl','50930CzrbrS','132rcybuZ','669828cNXPSy','runtimeDomain','1738982mQbhRD','8YXiGfD'];a4_0x1c4f=function(){return _0x383c3d;};return a4_0x1c4f();}function a4_0x31ff(_0x4e2345,_0x3937d4){_0x4e2345=_0x4e2345-0xb3;const _0x1c4fc4=a4_0x1c4f();let _0x31fff9=_0x1c4fc4[_0x4e2345];return _0x31fff9;}(function(_0x43cc41,_0x3e5be1){const _0x544079=a4_0x31ff,_0x4f818c=_0x43cc41();while(!![]){try{const _0x338363=parseInt(_0x544079(0xb4))/0x1+parseInt(_0x544079(0xb5))/0x2+-parseInt(_0x544079(0xc3))/0x3+-parseInt(_0x544079(0xba))/0x4+-parseInt(_0x544079(0xc1))/0x5*(-parseInt(_0x544079(0xc2))/0x6)+-parseInt(_0x544079(0xc5))/0x7*(parseInt(_0x544079(0xc6))/0x8)+-parseInt(_0x544079(0xc8))/0x9*(-parseInt(_0x544079(0xc0))/0xa);if(_0x338363===_0x3e5be1)break;else _0x4f818c['push'](_0x4f818c['shift']());}catch(_0x26369f){_0x4f818c['push'](_0x4f818c['shift']());}}}(a4_0x1c4f,0x279c2));import{mkdirSync,writeFileSync}from'node:fs';import a4_0x2dbe0d from'node:path';import a4_0x1b4cf5 from'prettier';export const SDK_CONFIG_FILE_NAME=a4_0x3f8bb3(0xb3);export function getSdkConfigFileName(_0x7f065b=''){const _0x32cf53=a4_0x3f8bb3;return _0x7f065b?_0x7f065b+_0x32cf53(0xc7):SDK_CONFIG_FILE_NAME;}export async function generateSdkConfigFile(_0xa1336b,_0x17617a={},_0x35f30f=''){const _0x4b38b9=a4_0x3f8bb3,_0x12bc3d=[];_0x17617a[_0x4b38b9(0xc4)]&&_0x12bc3d[_0x4b38b9(0xb8)]('runtimeDomain:\x20'+JSON[_0x4b38b9(0xbb)](_0x17617a[_0x4b38b9(0xc4)]));const _0xd94b1d=_0x12bc3d[_0x4b38b9(0xbe)]>0x0?'{\x0a\x20\x20'+_0x12bc3d[_0x4b38b9(0xb7)](_0x4b38b9(0xb6))+_0x4b38b9(0xbc):'{}',_0x25f0d1='/**\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'+_0xd94b1d+_0x4b38b9(0xbf);mkdirSync(_0xa1336b,{'recursive':!![]});const _0x45c9c2=a4_0x2dbe0d[_0x4b38b9(0xb7)](_0xa1336b,getSdkConfigFileName(_0x35f30f));return writeFileSync(_0x45c9c2,await a4_0x1b4cf5[_0x4b38b9(0xb9)](_0x25f0d1,{'parser':'typescript'}),_0x4b38b9(0xbd)),_0x45c9c2;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d6831,_0x1637b0){const _0x164f87=a5_0x5777,_0x1ae438=_0x4d6831();while(!![]){try{const _0x463108=-parseInt(_0x164f87(0xaf))/0x1+-parseInt(_0x164f87(0xb3))/0x2+parseInt(_0x164f87(0xa4))/0x3+parseInt(_0x164f87(0xb2))/0x4*(-parseInt(_0x164f87(0xb4))/0x5)+-parseInt(_0x164f87(0xac))/0x6*(-parseInt(_0x164f87(0xa1))/0x7)+-parseInt(_0x164f87(0xae))/0x8+parseInt(_0x164f87(0xa2))/0x9;if(_0x463108===_0x1637b0)break;else _0x1ae438['push'](_0x1ae438['shift']());}catch(_0x33e72d){_0x1ae438['push'](_0x1ae438['shift']());}}}(a5_0x2ed3,0x6aae3));function a5_0x5777(_0x124e29,_0xba89d5){_0x124e29=_0x124e29-0x9e;const _0x2ed37a=a5_0x2ed3();let _0x577756=_0x2ed37a[_0x124e29];return _0x577756;}export function parseLegacyApiModels(_0x161ee7){const _0x41b1b7=a5_0x5777,_0x1e0699=[],_0x3b4872=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x5289e9;while((_0x5289e9=_0x3b4872[_0x41b1b7(0xa7)](_0x161ee7))!==null){_0x1e0699['push']({'datasetCode':_0x5289e9[0x1],'tableName':_0x5289e9[0x2],'name':_0x5289e9[0x3],'alias':_0x5289e9[0x4]});}return _0x1e0699;}export function parseLegacyApiAppCode(_0x232fac){const _0x4db266=a5_0x5777;return _0x232fac[_0x4db266(0xa3)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function stripComments(_0x44403e){const _0x45e917=a5_0x5777;return _0x44403e[_0x45e917(0xb1)](/\/\*[\s\S]*?\*\//g,'')[_0x45e917(0xb1)](/\/\/.*$/gm,'');}function a5_0x2ed3(){const _0x1a173a=['includes','endsWith','some','@lovrabet/sdk','1585422VKSvrB','matchAll','879528WXGZsq','806598NVXiFT','test','replace','1492fHTGWy','32662ehKjXU','9540jpUphr','Generated\x20by\x20Rabetbase\x20CLI','length','APP_CODE','7AkFTNp','12341133LzrfjG','match','1338129FQkwSU','MODELS_CONFIG','map','exec'];a5_0x2ed3=function(){return _0x1a173a;};return a5_0x2ed3();}export function isLegacyGeneratedApiScaffold(_0xc82ac8){const _0x44abf7=a5_0x5777;if(!_0xc82ac8['includes']('Generated\x20by\x20Rabetbase\x20CLI'))return![];const _0x2d8ecf=stripComments(_0xc82ac8),_0x4625ed=[..._0x2d8ecf[_0x44abf7(0xad)](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)][_0x44abf7(0xa6)](_0x2af5e6=>_0x2af5e6[0x1]);if(_0x4625ed[_0x44abf7(0x9f)]!==0x1||_0x4625ed[0x0]!=='@lovrabet/sdk')return![];const _0x1f1919=[..._0x2d8ecf[_0x44abf7(0xad)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x44abf7(0xa6)](_0x5c0878=>_0x5c0878[0x1]);if(_0x1f1919[_0x44abf7(0x9f)]!==0x2||!_0x1f1919[_0x44abf7(0xaa)](_0x289fdf=>_0x289fdf['endsWith'](_0x44abf7(0xa0)))||!_0x1f1919[_0x44abf7(0xaa)](_0x3f528e=>_0x3f528e[_0x44abf7(0xa9)](_0x44abf7(0xa5))))return![];const _0x34e0b1=[..._0x2d8ecf['matchAll'](/^([A-Za-z_$][\w$]*)\s*\(/gm)][_0x44abf7(0xa6)](_0x2d830d=>_0x2d830d[0x1]);return _0x34e0b1[_0x44abf7(0x9f)]===0x1&&_0x34e0b1[0x0]==='registerModels';}export function isLegacyGeneratedClientScaffold(_0x24d478){const _0x1c021e=a5_0x5777;if(!_0x24d478[_0x1c021e(0xa8)](_0x1c021e(0x9e)))return![];const _0x4493d0=stripComments(_0x24d478),_0x28d832=[..._0x4493d0['matchAll'](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)][_0x1c021e(0xa6)](_0x57120b=>_0x57120b[0x1]);if(_0x28d832[_0x1c021e(0xaa)](_0x206d6d=>_0x206d6d!==_0x1c021e(0xab)&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/[_0x1c021e(0xb0)](_0x206d6d??'')))return![];const _0x1d4e18=[..._0x4493d0[_0x1c021e(0xad)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x1c021e(0xa6)](_0x572b62=>_0x572b62[0x1]);return _0x1d4e18[_0x1c021e(0x9f)]===0x1&&_0x1d4e18[0x0]==='lovrabetClient';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x841126=a6_0x1961;(function(_0x2e2b3b,_0x5f39b3){const _0x19909c=a6_0x1961,_0x25dc97=_0x2e2b3b();while(!![]){try{const _0x349978=parseInt(_0x19909c(0xcd))/0x1*(-parseInt(_0x19909c(0xa3))/0x2)+parseInt(_0x19909c(0xb3))/0x3*(-parseInt(_0x19909c(0xd2))/0x4)+parseInt(_0x19909c(0xa7))/0x5*(parseInt(_0x19909c(0xcf))/0x6)+parseInt(_0x19909c(0xc1))/0x7*(parseInt(_0x19909c(0xda))/0x8)+-parseInt(_0x19909c(0x9d))/0x9+parseInt(_0x19909c(0x99))/0xa+-parseInt(_0x19909c(0xa9))/0xb*(-parseInt(_0x19909c(0xc7))/0xc);if(_0x349978===_0x5f39b3)break;else _0x25dc97['push'](_0x25dc97['shift']());}catch(_0x20412a){_0x25dc97['push'](_0x25dc97['shift']());}}}(a6_0x1e19,0xc0aab));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x29040a from'node:path';export const MODEL_REGISTRY_FILE_NAME='models.generated.ts';export const MODEL_RUNTIME_FILE_NAME=a6_0x841126(0xa1);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x841126(0xd0);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL='lovrabet-model-registry/v2',REGISTRY_START='/*\x20rabetbase-model-registry:start\x20*/',REGISTRY_END=a6_0x841126(0xbb);function emptyRegistry(_0xc9327e){return{'defaultProfile':_0xc9327e,'profiles':{},'models':[]};}function extractRegistryJson(_0x37589f){const _0x35787e=a6_0x841126,_0x5453b4=_0x37589f[_0x35787e(0xaf)](REGISTRY_START),_0x434b34=_0x37589f[_0x35787e(0xaf)](REGISTRY_END);if(_0x5453b4<0x0||_0x434b34<=_0x5453b4)return undefined;return _0x37589f[_0x35787e(0x9a)](_0x5453b4+REGISTRY_START[_0x35787e(0xdb)],_0x434b34)[_0x35787e(0xca)]()[_0x35787e(0xc5)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x35787e(0xc5)](/;$/,'');}function a6_0x1e19(){const _0x179f6e=['filter','pid','8133yvcKXy','appCode','join','get','key','\x22\x20and\x20\x22','Model\x20alias\x20\x22','\x22\x20in\x20profile\x20\x22','/*\x20rabetbase-model-registry:end\x20*/','test','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','tableName','parse','string','365372JXyyZv','find','entries','values','replace','set','13048212HspwmK','flatMap','NOT-SET','trim','defaultProfile','name','56779EgJVZs','datasetCode','6610374cRpiMP','/*\x20rabetbase-model-registry:v2\x20*/','outputDir','1748WoiJlV','includes','keys','Refusing\x20to\x20replace\x20','push','object','\x20model(s)\x20in\x20profile\x20\x22','split','152paJoym','length','profiles','profileName','map','/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a','\x22\x20maps\x20to\x20alias\x20\x22','allowEmptyReplacement','6081060topuwk','slice','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','\x22\x20maps\x20to\x20both\x20\x22','13780305kIJjJD','protocol','lovrabet-model-registry/v1','isArray','model-runtime.ts','utf8','10NmprzZ','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','every','\x22\x20in\x20the\x20registry\x20but\x20\x22','5btIgPi','models','11wZcvEy','\x22\x20maps\x20to\x20table\x20\x22','.tmp','alias','datasetCodes','stringify','indexOf','runtimeDomain'];a6_0x1e19=function(){return _0x179f6e;};return a6_0x1e19();}function migrateLegacyRegistry(_0x1de601){const _0x34217a=a6_0x841126,_0x2d7abe=emptyRegistry(_0x1de601[_0x34217a(0xcb)]);for(const [_0x1a9455,_0x4379b6]of Object[_0x34217a(0xc3)](_0x1de601[_0x34217a(0x93)])){_0x2d7abe[_0x34217a(0x93)][_0x1a9455]={'appCode':_0x4379b6['appCode'],'runtimeDomain':_0x4379b6[_0x34217a(0xb0)]},mergeProfileModels(_0x2d7abe,_0x1a9455,_0x4379b6[_0x34217a(0xa8)]);}return _0x2d7abe;}function a6_0x1961(_0x5747ea,_0x2e6f23){_0x5747ea=_0x5747ea-0x93;const _0x1e1973=a6_0x1e19();let _0x196173=_0x1e1973[_0x5747ea];return _0x196173;}function generatedObjectLiteralToJson(_0x28fe82){const _0x4785f9=a6_0x841126;let _0x1ceab0='',_0xe21aaa,_0x1d415e=![],_0x43e974;for(let _0x5cdb08=0x0;_0x5cdb08<_0x28fe82['length'];_0x5cdb08++){const _0x345021=_0x28fe82[_0x5cdb08];if(_0xe21aaa){_0x1ceab0+=_0x345021;if(_0x1d415e)_0x1d415e=![];else{if(_0x345021==='\x5c')_0x1d415e=!![];else{if(_0x345021===_0xe21aaa)_0xe21aaa=undefined;}}continue;}if(_0x345021==='\x22'){_0xe21aaa=_0x345021,_0x1ceab0+=_0x345021,_0x43e974='value';continue;}if(_0x345021===','){let _0x47bab3=_0x5cdb08+0x1;while(/\s/[_0x4785f9(0xbc)](_0x28fe82[_0x47bab3]??''))_0x47bab3++;if(_0x28fe82[_0x47bab3]==='}'||_0x28fe82[_0x47bab3]===']')continue;_0x1ceab0+=_0x345021,_0x43e974=',';continue;}if(_0x345021==='{'||_0x345021==='['){_0x1ceab0+=_0x345021,_0x43e974=_0x345021;continue;}if(_0x345021==='}'||_0x345021===']'){_0x1ceab0+=_0x345021,_0x43e974=_0x345021;continue;}if((_0x43e974==='{'||_0x43e974===',')&&/[A-Za-z_$]/['test'](_0x345021)){let _0x751aa2=_0x5cdb08+0x1;while(/[A-Za-z0-9_$]/[_0x4785f9(0xbc)](_0x28fe82[_0x751aa2]??''))_0x751aa2++;let _0x549a42=_0x751aa2;while(/\s/[_0x4785f9(0xbc)](_0x28fe82[_0x549a42]??''))_0x549a42++;if(_0x28fe82[_0x549a42]===':'){_0x1ceab0+=JSON[_0x4785f9(0xae)](_0x28fe82[_0x4785f9(0x9a)](_0x5cdb08,_0x751aa2)),_0x5cdb08=_0x751aa2-0x1,_0x43e974=_0x4785f9(0xb7);continue;}}_0x1ceab0+=_0x345021;if(!/\s/['test'](_0x345021)&&_0x345021!==':')_0x43e974='value';}return _0x1ceab0;}function parseGeneratedRegistryJson(_0x457543){const _0x3e4d82=a6_0x841126;try{return JSON[_0x3e4d82(0xbf)](_0x457543);}catch{return JSON[_0x3e4d82(0xbf)](generatedObjectLiteralToJson(_0x457543));}}function normalizeModelEntries(_0x507e59,_0x556fd7){const _0x76a7fe=a6_0x841126,_0x1ca994=Object[_0x76a7fe(0xd4)](_0x507e59),_0x5cc03d=[];for(const _0x258a01 of _0x556fd7){if(!_0x258a01||typeof _0x258a01!==_0x76a7fe(0xd7)||Array[_0x76a7fe(0xa0)](_0x258a01))return undefined;const _0x2f5f31=_0x258a01;if(typeof _0x2f5f31['alias']!==_0x76a7fe(0xc0)||typeof _0x2f5f31[_0x76a7fe(0xbe)]!==_0x76a7fe(0xc0)||typeof _0x2f5f31[_0x76a7fe(0xcc)]!=='string')return undefined;let _0x4a47cd;if(typeof _0x2f5f31['datasetCode']===_0x76a7fe(0xc0)&&_0x2f5f31[_0x76a7fe(0xad)]===undefined)_0x4a47cd=Object['fromEntries'](_0x1ca994[_0x76a7fe(0x95)](_0x2e0a67=>[_0x2e0a67,_0x2f5f31['datasetCode']]));else{if(_0x2f5f31[_0x76a7fe(0xce)]===undefined&&_0x2f5f31['datasetCodes']&&typeof _0x2f5f31[_0x76a7fe(0xad)]===_0x76a7fe(0xd7)&&!Array['isArray'](_0x2f5f31[_0x76a7fe(0xad)])&&Object[_0x76a7fe(0xc4)](_0x2f5f31[_0x76a7fe(0xad)])[_0x76a7fe(0xa5)](_0xf02d55=>typeof _0xf02d55===_0x76a7fe(0xc0)))_0x4a47cd={..._0x2f5f31[_0x76a7fe(0xad)]};else return undefined;}_0x5cc03d[_0x76a7fe(0xd6)]({'alias':_0x2f5f31[_0x76a7fe(0xac)],'tableName':_0x2f5f31['tableName'],'name':_0x2f5f31[_0x76a7fe(0xcc)],'datasetCodes':_0x4a47cd});}return _0x5cc03d;}export function parseModelRegistry(_0x11b70a){const _0x44b4da=a6_0x841126,_0x35a116=extractRegistryJson(_0x11b70a);if(!_0x35a116)return undefined;try{const _0xa7ebda=parseGeneratedRegistryJson(_0x35a116);if(typeof _0xa7ebda[_0x44b4da(0xcb)]!==_0x44b4da(0xc0)||!_0xa7ebda['profiles']||typeof _0xa7ebda[_0x44b4da(0x93)]!==_0x44b4da(0xd7))return undefined;if(_0xa7ebda['protocol']===_0x44b4da(0x9f))return migrateLegacyRegistry(_0xa7ebda);if(!(_0xa7ebda['protocol']===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0xa7ebda[_0x44b4da(0x9e)]===undefined&&_0x11b70a[_0x44b4da(0xd3)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x44b4da(0xa0)](_0xa7ebda[_0x44b4da(0xa8)]))return undefined;const _0x194f90=_0xa7ebda[_0x44b4da(0x93)],_0x28ac36=normalizeModelEntries(_0x194f90,_0xa7ebda[_0x44b4da(0xa8)]);if(!_0x28ac36)return undefined;return{'defaultProfile':_0xa7ebda['defaultProfile'],'profiles':_0x194f90,'models':_0x28ac36};}catch{return undefined;}}export function readModelRegistry(_0x51ee74){const _0x49d7a6=a6_0x841126;if(!existsSync(_0x51ee74))return undefined;try{return parseModelRegistry(readFileSync(_0x51ee74,_0x49d7a6(0xa2)));}catch{return undefined;}}function registrySource(_0x317571){const _0x2e5aba=a6_0x841126,_0xca39db=Object[_0x2e5aba(0xd4)](_0x317571[_0x2e5aba(0x93)]),_0x16c38f=_0x317571[_0x2e5aba(0xa8)][_0x2e5aba(0x95)](_0x1fda9a=>{const _0x17b1ad=_0x2e5aba,_0x54c35c=_0xca39db['map'](_0x46b526=>_0x1fda9a[_0x17b1ad(0xad)][_0x46b526]),_0x5e4a5b=_0x54c35c[0x0],_0x2f2148=_0x5e4a5b!==undefined&&_0x54c35c['every'](_0x185b8b=>_0x185b8b===_0x5e4a5b),_0x5d40a8={'alias':_0x1fda9a[_0x17b1ad(0xac)],'tableName':_0x1fda9a['tableName'],'name':_0x1fda9a[_0x17b1ad(0xcc)]};return _0x2f2148?{..._0x5d40a8,'datasetCode':_0x5e4a5b}:{..._0x5d40a8,'datasetCodes':_0x1fda9a['datasetCodes']};}),_0x1903c1=JSON['stringify']({'defaultProfile':_0x317571['defaultProfile'],'profiles':_0x317571[_0x2e5aba(0x93)],'models':_0x16c38f},null,0x2)[_0x2e5aba(0xd9)]('\x0a')[_0x2e5aba(0x95)](_0x1edb6b=>'\x20\x20'+_0x1edb6b)['join']('\x0a');return _0x2e5aba(0x96)+MODEL_REGISTRY_VERSION_MARKER+_0x2e5aba(0xbd)+REGISTRY_START+'\x0a'+_0x1903c1+'\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a'+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x5c7184,_0x47c034,_0x115967){const _0x4e2826=a6_0x841126,_0x321f9b=_0x115967['map'](_0x39c22f=>({..._0x39c22f,'alias':_0x39c22f['alias']||_0x39c22f[_0x4e2826(0xbe)]})),_0x3b6f49=new Map(),_0x4b4316=new Map();for(const _0x5c5adf of _0x321f9b){const _0x39308a=_0x3b6f49[_0x4e2826(0xb6)](_0x5c5adf[_0x4e2826(0xac)]);if(_0x39308a&&_0x39308a!==_0x5c5adf[_0x4e2826(0xbe)])throw new Error(_0x4e2826(0xb9)+_0x5c5adf[_0x4e2826(0xac)]+_0x4e2826(0x9c)+_0x39308a+_0x4e2826(0xb8)+_0x5c5adf[_0x4e2826(0xbe)]+_0x4e2826(0xba)+_0x47c034+'\x22.');const _0x19c3c3=_0x4b4316[_0x4e2826(0xb6)](_0x5c5adf[_0x4e2826(0xbe)]);if(_0x19c3c3&&_0x19c3c3!==_0x5c5adf[_0x4e2826(0xac)])throw new Error('Table\x20\x22'+_0x5c5adf[_0x4e2826(0xbe)]+'\x22\x20maps\x20to\x20both\x20aliases\x20\x22'+_0x19c3c3+_0x4e2826(0xb8)+_0x5c5adf[_0x4e2826(0xac)]+_0x4e2826(0xba)+_0x47c034+'\x22.');_0x3b6f49[_0x4e2826(0xc6)](_0x5c5adf[_0x4e2826(0xac)],_0x5c5adf[_0x4e2826(0xbe)]),_0x4b4316[_0x4e2826(0xc6)](_0x5c5adf[_0x4e2826(0xbe)],_0x5c5adf[_0x4e2826(0xac)]);const _0x13ab7d=_0x5c7184[_0x4e2826(0xa8)][_0x4e2826(0xc2)](_0x2f9d04=>_0x2f9d04[_0x4e2826(0xac)]===_0x5c5adf[_0x4e2826(0xac)]);if(_0x13ab7d&&_0x13ab7d[_0x4e2826(0xbe)]!==_0x5c5adf[_0x4e2826(0xbe)])throw new Error(_0x4e2826(0xb9)+_0x5c5adf[_0x4e2826(0xac)]+_0x4e2826(0xaa)+_0x13ab7d[_0x4e2826(0xbe)]+_0x4e2826(0xa6)+_0x5c5adf[_0x4e2826(0xbe)]+_0x4e2826(0xba)+_0x47c034+'\x22.');const _0x95d99f=_0x5c7184[_0x4e2826(0xa8)][_0x4e2826(0xc2)](_0x2ed432=>_0x2ed432[_0x4e2826(0xbe)]===_0x5c5adf[_0x4e2826(0xbe)]);if(_0x95d99f&&_0x95d99f[_0x4e2826(0xac)]!==_0x5c5adf[_0x4e2826(0xac)])throw new Error('Table\x20\x22'+_0x5c5adf[_0x4e2826(0xbe)]+_0x4e2826(0x97)+_0x95d99f[_0x4e2826(0xac)]+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x5c5adf[_0x4e2826(0xac)]+_0x4e2826(0xba)+_0x47c034+'\x22.');}for(const _0x94e2e8 of _0x5c7184[_0x4e2826(0xa8)]){delete _0x94e2e8['datasetCodes'][_0x47c034];}for(const _0x502545 of _0x321f9b){let _0x384f1c=_0x5c7184[_0x4e2826(0xa8)][_0x4e2826(0xc2)](_0x99f054=>_0x99f054[_0x4e2826(0xac)]===_0x502545['alias']);!_0x384f1c&&(_0x384f1c={'alias':_0x502545[_0x4e2826(0xac)],'tableName':_0x502545[_0x4e2826(0xbe)],'name':_0x502545[_0x4e2826(0xcc)],'datasetCodes':{}},_0x5c7184[_0x4e2826(0xa8)][_0x4e2826(0xd6)](_0x384f1c)),(_0x47c034===_0x5c7184[_0x4e2826(0xcb)]||!_0x384f1c[_0x4e2826(0xad)][_0x5c7184[_0x4e2826(0xcb)]])&&(_0x384f1c[_0x4e2826(0xac)]=_0x502545[_0x4e2826(0xac)],_0x384f1c[_0x4e2826(0xbe)]=_0x502545[_0x4e2826(0xbe)],_0x384f1c[_0x4e2826(0xcc)]=_0x502545[_0x4e2826(0xcc)]),_0x384f1c['datasetCodes'][_0x47c034]=_0x502545['datasetCode'];}_0x5c7184[_0x4e2826(0xa8)]=_0x5c7184[_0x4e2826(0xa8)][_0x4e2826(0xb1)](_0xed58cc=>Object[_0x4e2826(0xd4)](_0xed58cc[_0x4e2826(0xad)])[_0x4e2826(0xdb)]>0x0);}function removeUnboundProfiles(_0xfd63f7){const _0x5089f5=a6_0x841126,_0xc513e7=Object['entries'](_0xfd63f7[_0x5089f5(0x93)])[_0x5089f5(0xb1)](([,_0x5ea024])=>_0x5ea024[_0x5089f5(0xb4)]===_0x5089f5(0xc9))[_0x5089f5(0x95)](([_0x669e86])=>_0x669e86);if(_0xc513e7[_0x5089f5(0xdb)]===0x0)return;for(const _0x32779c of _0xc513e7){delete _0xfd63f7[_0x5089f5(0x93)][_0x32779c];for(const _0x4e4989 of _0xfd63f7[_0x5089f5(0xa8)]){delete _0x4e4989['datasetCodes'][_0x32779c];}}_0xfd63f7['models']=_0xfd63f7[_0x5089f5(0xa8)][_0x5089f5(0xb1)](_0x4e3177=>Object[_0x5089f5(0xd4)](_0x4e3177[_0x5089f5(0xad)])[_0x5089f5(0xdb)]>0x0);}export function getProfileModels(_0x2ef337,_0x43b212){const _0x44aacc=a6_0x841126;return _0x2ef337[_0x44aacc(0xa8)][_0x44aacc(0xc8)](_0x3e6ec5=>{const _0x29b4ef=_0x44aacc,_0x9864a3=_0x3e6ec5[_0x29b4ef(0xad)][_0x43b212];return _0x9864a3?[{'datasetCode':_0x9864a3,'tableName':_0x3e6ec5[_0x29b4ef(0xbe)],'name':_0x3e6ec5[_0x29b4ef(0xcc)],'alias':_0x3e6ec5['alias']}]:[];});}export function updateModelRegistry(_0x3cf9cb){const _0xbf9c36=a6_0x841126,_0x1bffd3=a6_0x29040a[_0xbf9c36(0xb5)](_0x3cf9cb[_0xbf9c36(0xd1)],MODEL_REGISTRY_FILE_NAME),_0xff7d09=existsSync(_0x1bffd3),_0x4b7274=readModelRegistry(_0x1bffd3);if(_0xff7d09&&!_0x4b7274)throw new Error(MODEL_REGISTRY_FILE_NAME+_0xbf9c36(0x9b));const _0x57562b=_0x4b7274??emptyRegistry(_0x3cf9cb[_0xbf9c36(0xcb)]);if(_0x3cf9cb[_0xbf9c36(0xb4)]!==_0xbf9c36(0xc9))removeUnboundProfiles(_0x57562b);const _0x1b55dd=_0x4b7274?getProfileModels(_0x4b7274,_0x3cf9cb[_0xbf9c36(0x94)])[_0xbf9c36(0xdb)]:0x0;if(_0x1b55dd>0x0&&_0x3cf9cb[_0xbf9c36(0xa8)][_0xbf9c36(0xdb)]===0x0&&!_0x3cf9cb[_0xbf9c36(0x98)])throw new Error(_0xbf9c36(0xd5)+_0x1b55dd+_0xbf9c36(0xd8)+_0x3cf9cb['profileName']+'\x22\x20with\x20an\x20empty\x20result.\x20'+_0xbf9c36(0xa4));_0x57562b[_0xbf9c36(0xcb)]=_0x3cf9cb[_0xbf9c36(0xcb)],_0x57562b[_0xbf9c36(0x93)][_0x3cf9cb[_0xbf9c36(0x94)]]={'appCode':_0x3cf9cb[_0xbf9c36(0xb4)],'runtimeDomain':_0x3cf9cb['runtimeDomain']},mergeProfileModels(_0x57562b,_0x3cf9cb[_0xbf9c36(0x94)],_0x3cf9cb[_0xbf9c36(0xa8)]),mkdirSync(_0x3cf9cb[_0xbf9c36(0xd1)],{'recursive':!![]});const _0x15f3bc=_0x1bffd3+'.'+process[_0xbf9c36(0xb2)]+'.'+Date['now']()+_0xbf9c36(0xab);try{writeFileSync(_0x15f3bc,registrySource(_0x57562b),{'encoding':_0xbf9c36(0xa2),'mode':0x1a4}),renameSync(_0x15f3bc,_0x1bffd3);}catch(_0x478535){try{unlinkSync(_0x15f3bc);}catch{}throw _0x478535;}return{'path':_0x1bffd3,'registry':_0x57562b,'existed':_0xff7d09};}
|
|
1
|
+
function a6_0x253f(){const _0x393fab=['profiles','alias','datasetCode','/*\x20rabetbase-model-registry:v2\x20*/','500222yriHkN','set','object','defaultProfile','2005pqnWNl','profileName','/*\x20rabetbase-model-registry:start\x20*/','get','\x22\x20with\x20an\x20empty\x20result.\x20','entries','NOT-SET','values','parse','stringify','fromEntries','find','now','flatMap','13602xkRRiC','9147000Dhaoka','outputDir','pid','.tmp','\x22\x20in\x20profile\x20\x22','allowEmptyReplacement','Model\x20alias\x20\x22','lovrabet-model-registry/v1','3296060YnGDhW','protocol','6317549OLqgGn','filter','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','/*\x20rabetbase-model-registry:end\x20*/','\x22\x20in\x20the\x20registry\x20but\x20\x22','tableName','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','runtimeDomain','split','utf8','\x22\x20and\x20\x22','map','models.generated.ts','\x22\x20maps\x20to\x20both\x20\x22','join','string','keys','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','datasetCodes','appCode','\x22\x20maps\x20to\x20alias\x20\x22','models','22dhbBQK','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','test','slice','name','205575RdBJOY','replace','1203714RoatXM','isArray','value','length'];a6_0x253f=function(){return _0x393fab;};return a6_0x253f();}const a6_0xe12390=a6_0x13ea;(function(_0x1dc2f3,_0x29cdf4){const _0x2075d9=a6_0x13ea,_0x22a550=_0x1dc2f3();while(!![]){try{const _0x382396=-parseInt(_0x2075d9(0xa4))/0x1+parseInt(_0x2075d9(0x94))/0x2*(-parseInt(_0x2075d9(0x9a))/0x3)+parseInt(_0x2075d9(0xbf))/0x4+-parseInt(_0x2075d9(0xa8))/0x5*(-parseInt(_0x2075d9(0xb6))/0x6)+-parseInt(_0x2075d9(0xc1))/0x7+parseInt(_0x2075d9(0xb7))/0x8+-parseInt(_0x2075d9(0x9c))/0x9;if(_0x382396===_0x29cdf4)break;else _0x22a550['push'](_0x22a550['shift']());}catch(_0x29d9d4){_0x22a550['push'](_0x22a550['shift']());}}}(a6_0x253f,0x8f1df));function a6_0x13ea(_0x2ada11,_0x25896f){_0x2ada11=_0x2ada11-0x8e;const _0x253f47=a6_0x253f();let _0x13eac1=_0x253f47[_0x2ada11];return _0x13eac1;}import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x22d2cf from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0xe12390(0xcd);export const MODEL_RUNTIME_FILE_NAME='model-runtime.ts';export const MODEL_REGISTRY_VERSION_MARKER=a6_0xe12390(0xa3);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL='lovrabet-model-registry/v2',REGISTRY_START=a6_0xe12390(0xaa),REGISTRY_END=a6_0xe12390(0xc4);function emptyRegistry(_0x4d555c){return{'defaultProfile':_0x4d555c,'profiles':{},'models':[]};}function extractRegistryJson(_0x462cc5){const _0x26f84d=a6_0xe12390,_0x3f6c43=_0x462cc5['indexOf'](REGISTRY_START),_0x4e0147=_0x462cc5['indexOf'](REGISTRY_END);if(_0x3f6c43<0x0||_0x4e0147<=_0x3f6c43)return undefined;return _0x462cc5[_0x26f84d(0x98)](_0x3f6c43+REGISTRY_START[_0x26f84d(0x9f)],_0x4e0147)['trim']()[_0x26f84d(0x9b)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x26f84d(0x9b)](/;$/,'');}function migrateLegacyRegistry(_0x4d152f){const _0x427920=a6_0xe12390,_0x2d44c7=emptyRegistry(_0x4d152f[_0x427920(0xa7)]);for(const [_0x35bf8d,_0x3dc7a2]of Object[_0x427920(0xad)](_0x4d152f[_0x427920(0xa0)])){_0x2d44c7[_0x427920(0xa0)][_0x35bf8d]={'appCode':_0x3dc7a2['appCode'],'runtimeDomain':_0x3dc7a2[_0x427920(0xc8)]},mergeProfileModels(_0x2d44c7,_0x35bf8d,_0x3dc7a2[_0x427920(0x93)]);}return _0x2d44c7;}function generatedObjectLiteralToJson(_0x49179c){const _0x251649=a6_0xe12390;let _0x1571e4='',_0x358cc1,_0x108578=![],_0x36d79b;for(let _0x100707=0x0;_0x100707<_0x49179c[_0x251649(0x9f)];_0x100707++){const _0x2a398a=_0x49179c[_0x100707];if(_0x358cc1){_0x1571e4+=_0x2a398a;if(_0x108578)_0x108578=![];else{if(_0x2a398a==='\x5c')_0x108578=!![];else{if(_0x2a398a===_0x358cc1)_0x358cc1=undefined;}}continue;}if(_0x2a398a==='\x22'){_0x358cc1=_0x2a398a,_0x1571e4+=_0x2a398a,_0x36d79b='value';continue;}if(_0x2a398a===','){let _0x47af64=_0x100707+0x1;while(/\s/[_0x251649(0x97)](_0x49179c[_0x47af64]??''))_0x47af64++;if(_0x49179c[_0x47af64]==='}'||_0x49179c[_0x47af64]===']')continue;_0x1571e4+=_0x2a398a,_0x36d79b=',';continue;}if(_0x2a398a==='{'||_0x2a398a==='['){_0x1571e4+=_0x2a398a,_0x36d79b=_0x2a398a;continue;}if(_0x2a398a==='}'||_0x2a398a===']'){_0x1571e4+=_0x2a398a,_0x36d79b=_0x2a398a;continue;}if((_0x36d79b==='{'||_0x36d79b===',')&&/[A-Za-z_$]/['test'](_0x2a398a)){let _0x42f217=_0x100707+0x1;while(/[A-Za-z0-9_$]/[_0x251649(0x97)](_0x49179c[_0x42f217]??''))_0x42f217++;let _0x10c49f=_0x42f217;while(/\s/[_0x251649(0x97)](_0x49179c[_0x10c49f]??''))_0x10c49f++;if(_0x49179c[_0x10c49f]===':'){_0x1571e4+=JSON[_0x251649(0xb1)](_0x49179c[_0x251649(0x98)](_0x100707,_0x42f217)),_0x100707=_0x42f217-0x1,_0x36d79b='key';continue;}}_0x1571e4+=_0x2a398a;if(!/\s/[_0x251649(0x97)](_0x2a398a)&&_0x2a398a!==':')_0x36d79b=_0x251649(0x9e);}return _0x1571e4;}function parseGeneratedRegistryJson(_0x32d855){const _0x12d16a=a6_0xe12390;try{return JSON[_0x12d16a(0xb0)](_0x32d855);}catch{return JSON[_0x12d16a(0xb0)](generatedObjectLiteralToJson(_0x32d855));}}function normalizeModelEntries(_0x573f3c,_0x4c2b73){const _0x343d74=a6_0xe12390,_0x5d92fc=Object[_0x343d74(0x8e)](_0x573f3c),_0x380d75=[];for(const _0x44942f of _0x4c2b73){if(!_0x44942f||typeof _0x44942f!==_0x343d74(0xa6)||Array[_0x343d74(0x9d)](_0x44942f))return undefined;const _0x3f1bb2=_0x44942f;if(typeof _0x3f1bb2[_0x343d74(0xa1)]!=='string'||typeof _0x3f1bb2['tableName']!==_0x343d74(0xd0)||typeof _0x3f1bb2['name']!==_0x343d74(0xd0))return undefined;let _0x167612;if(typeof _0x3f1bb2[_0x343d74(0xa2)]===_0x343d74(0xd0)&&_0x3f1bb2[_0x343d74(0x90)]===undefined)_0x167612=Object[_0x343d74(0xb2)](_0x5d92fc[_0x343d74(0xcc)](_0x44f7b8=>[_0x44f7b8,_0x3f1bb2[_0x343d74(0xa2)]]));else{if(_0x3f1bb2['datasetCode']===undefined&&_0x3f1bb2['datasetCodes']&&typeof _0x3f1bb2[_0x343d74(0x90)]===_0x343d74(0xa6)&&!Array['isArray'](_0x3f1bb2[_0x343d74(0x90)])&&Object[_0x343d74(0xaf)](_0x3f1bb2['datasetCodes'])['every'](_0x16ae0b=>typeof _0x16ae0b===_0x343d74(0xd0)))_0x167612={..._0x3f1bb2['datasetCodes']};else return undefined;}_0x380d75['push']({'alias':_0x3f1bb2['alias'],'tableName':_0x3f1bb2[_0x343d74(0xc6)],'name':_0x3f1bb2[_0x343d74(0x99)],'datasetCodes':_0x167612});}return _0x380d75;}export function parseModelRegistry(_0x3b6f0e){const _0x34e0f6=a6_0xe12390,_0x4ef26d=extractRegistryJson(_0x3b6f0e);if(!_0x4ef26d)return undefined;try{const _0x36a2ad=parseGeneratedRegistryJson(_0x4ef26d);if(typeof _0x36a2ad['defaultProfile']!==_0x34e0f6(0xd0)||!_0x36a2ad[_0x34e0f6(0xa0)]||typeof _0x36a2ad[_0x34e0f6(0xa0)]!=='object')return undefined;if(_0x36a2ad[_0x34e0f6(0xc0)]===_0x34e0f6(0xbe))return migrateLegacyRegistry(_0x36a2ad);if(!(_0x36a2ad[_0x34e0f6(0xc0)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x36a2ad[_0x34e0f6(0xc0)]===undefined&&_0x3b6f0e['includes'](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x34e0f6(0x9d)](_0x36a2ad[_0x34e0f6(0x93)]))return undefined;const _0x2d0c07=_0x36a2ad[_0x34e0f6(0xa0)],_0x1147a6=normalizeModelEntries(_0x2d0c07,_0x36a2ad[_0x34e0f6(0x93)]);if(!_0x1147a6)return undefined;return{'defaultProfile':_0x36a2ad[_0x34e0f6(0xa7)],'profiles':_0x2d0c07,'models':_0x1147a6};}catch{return undefined;}}export function readModelRegistry(_0x5d2948){const _0x980595=a6_0xe12390;if(!existsSync(_0x5d2948))return undefined;try{return parseModelRegistry(readFileSync(_0x5d2948,_0x980595(0xca)));}catch{return undefined;}}function registrySource(_0x2a9da5){const _0x4451e5=a6_0xe12390,_0xe04aad=Object['keys'](_0x2a9da5[_0x4451e5(0xa0)]),_0x1a044c=_0x2a9da5[_0x4451e5(0x93)][_0x4451e5(0xcc)](_0x556a7f=>{const _0x41d211=_0x4451e5,_0x4f5368=_0xe04aad[_0x41d211(0xcc)](_0x1f0ded=>_0x556a7f['datasetCodes'][_0x1f0ded]),_0xde3f07=_0x4f5368[0x0],_0x4a859d=_0xde3f07!==undefined&&_0x4f5368['every'](_0x1d3d68=>_0x1d3d68===_0xde3f07),_0x114461={'alias':_0x556a7f[_0x41d211(0xa1)],'tableName':_0x556a7f[_0x41d211(0xc6)],'name':_0x556a7f[_0x41d211(0x99)]};return _0x4a859d?{..._0x114461,'datasetCode':_0xde3f07}:{..._0x114461,'datasetCodes':_0x556a7f[_0x41d211(0x90)]};}),_0x3242db=JSON[_0x4451e5(0xb1)]({'defaultProfile':_0x2a9da5[_0x4451e5(0xa7)],'profiles':_0x2a9da5['profiles'],'models':_0x1a044c},null,0x2)[_0x4451e5(0xc9)]('\x0a')[_0x4451e5(0xcc)](_0x5c83dc=>'\x20\x20'+_0x5c83dc)[_0x4451e5(0xcf)]('\x0a');return'/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a'+MODEL_REGISTRY_VERSION_MARKER+_0x4451e5(0x95)+REGISTRY_START+'\x0a'+_0x3242db+_0x4451e5(0x8f)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x36017d,_0x336da2,_0x51796b){const _0x154f11=a6_0xe12390,_0x34bc33=_0x51796b[_0x154f11(0xcc)](_0x40b64c=>({..._0x40b64c,'alias':_0x40b64c[_0x154f11(0xa1)]||_0x40b64c['tableName']})),_0x43b8b8=new Map(),_0xf0d512=new Map();for(const _0x49ecbb of _0x34bc33){const _0x21a332=_0x43b8b8[_0x154f11(0xab)](_0x49ecbb[_0x154f11(0xa1)]);if(_0x21a332&&_0x21a332!==_0x49ecbb[_0x154f11(0xc6)])throw new Error(_0x154f11(0xbd)+_0x49ecbb[_0x154f11(0xa1)]+_0x154f11(0xce)+_0x21a332+_0x154f11(0xcb)+_0x49ecbb[_0x154f11(0xc6)]+'\x22\x20in\x20profile\x20\x22'+_0x336da2+'\x22.');const _0x32ad10=_0xf0d512[_0x154f11(0xab)](_0x49ecbb[_0x154f11(0xc6)]);if(_0x32ad10&&_0x32ad10!==_0x49ecbb[_0x154f11(0xa1)])throw new Error('Table\x20\x22'+_0x49ecbb['tableName']+_0x154f11(0xc3)+_0x32ad10+_0x154f11(0xcb)+_0x49ecbb[_0x154f11(0xa1)]+_0x154f11(0xbb)+_0x336da2+'\x22.');_0x43b8b8[_0x154f11(0xa5)](_0x49ecbb[_0x154f11(0xa1)],_0x49ecbb['tableName']),_0xf0d512[_0x154f11(0xa5)](_0x49ecbb[_0x154f11(0xc6)],_0x49ecbb[_0x154f11(0xa1)]);const _0x3825cd=_0x36017d[_0x154f11(0x93)]['find'](_0x2c6c33=>_0x2c6c33[_0x154f11(0xa1)]===_0x49ecbb[_0x154f11(0xa1)]);if(_0x3825cd&&_0x3825cd[_0x154f11(0xc6)]!==_0x49ecbb[_0x154f11(0xc6)])throw new Error(_0x154f11(0xbd)+_0x49ecbb['alias']+'\x22\x20maps\x20to\x20table\x20\x22'+_0x3825cd['tableName']+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x49ecbb[_0x154f11(0xc6)]+'\x22\x20in\x20profile\x20\x22'+_0x336da2+'\x22.');const _0x26a0ef=_0x36017d[_0x154f11(0x93)][_0x154f11(0xb3)](_0x50df00=>_0x50df00[_0x154f11(0xc6)]===_0x49ecbb[_0x154f11(0xc6)]);if(_0x26a0ef&&_0x26a0ef[_0x154f11(0xa1)]!==_0x49ecbb['alias'])throw new Error('Table\x20\x22'+_0x49ecbb[_0x154f11(0xc6)]+_0x154f11(0x92)+_0x26a0ef[_0x154f11(0xa1)]+_0x154f11(0xc5)+_0x49ecbb[_0x154f11(0xa1)]+_0x154f11(0xbb)+_0x336da2+'\x22.');}for(const _0x5acc9f of _0x36017d[_0x154f11(0x93)]){delete _0x5acc9f['datasetCodes'][_0x336da2];}for(const _0x4413cf of _0x34bc33){let _0x4b72a7=_0x36017d[_0x154f11(0x93)]['find'](_0x24723b=>_0x24723b[_0x154f11(0xa1)]===_0x4413cf['alias']);!_0x4b72a7&&(_0x4b72a7={'alias':_0x4413cf[_0x154f11(0xa1)],'tableName':_0x4413cf[_0x154f11(0xc6)],'name':_0x4413cf[_0x154f11(0x99)],'datasetCodes':{}},_0x36017d[_0x154f11(0x93)]['push'](_0x4b72a7)),(_0x336da2===_0x36017d[_0x154f11(0xa7)]||!_0x4b72a7[_0x154f11(0x90)][_0x36017d[_0x154f11(0xa7)]])&&(_0x4b72a7['alias']=_0x4413cf[_0x154f11(0xa1)],_0x4b72a7['tableName']=_0x4413cf[_0x154f11(0xc6)],_0x4b72a7[_0x154f11(0x99)]=_0x4413cf[_0x154f11(0x99)]),_0x4b72a7[_0x154f11(0x90)][_0x336da2]=_0x4413cf[_0x154f11(0xa2)];}_0x36017d['models']=_0x36017d[_0x154f11(0x93)][_0x154f11(0xc2)](_0x55fa2f=>Object[_0x154f11(0x8e)](_0x55fa2f[_0x154f11(0x90)])[_0x154f11(0x9f)]>0x0);}function removeUnboundProfiles(_0x34cd01){const _0xc41751=a6_0xe12390,_0xa32250=Object[_0xc41751(0xad)](_0x34cd01[_0xc41751(0xa0)])[_0xc41751(0xc2)](([,_0x5753d6])=>_0x5753d6[_0xc41751(0x91)]===_0xc41751(0xae))[_0xc41751(0xcc)](([_0x4c34a6])=>_0x4c34a6);if(_0xa32250[_0xc41751(0x9f)]===0x0)return;for(const _0x5e787 of _0xa32250){delete _0x34cd01[_0xc41751(0xa0)][_0x5e787];for(const _0x34184c of _0x34cd01[_0xc41751(0x93)]){delete _0x34184c[_0xc41751(0x90)][_0x5e787];}}_0x34cd01[_0xc41751(0x93)]=_0x34cd01[_0xc41751(0x93)][_0xc41751(0xc2)](_0x10d1e6=>Object['keys'](_0x10d1e6[_0xc41751(0x90)])[_0xc41751(0x9f)]>0x0);}export function getProfileModels(_0x54a084,_0x18ee24){const _0x25a365=a6_0xe12390;return _0x54a084[_0x25a365(0x93)][_0x25a365(0xb5)](_0x44bc77=>{const _0x3935b5=_0x25a365,_0x57931f=_0x44bc77[_0x3935b5(0x90)][_0x18ee24];return _0x57931f?[{'datasetCode':_0x57931f,'tableName':_0x44bc77[_0x3935b5(0xc6)],'name':_0x44bc77[_0x3935b5(0x99)],'alias':_0x44bc77[_0x3935b5(0xa1)]}]:[];});}export function updateModelRegistry(_0x2b2582){const _0x9e78be=a6_0xe12390,_0x122db4=a6_0x22d2cf[_0x9e78be(0xcf)](_0x2b2582[_0x9e78be(0xb8)],MODEL_REGISTRY_FILE_NAME),_0x107e26=existsSync(_0x122db4),_0x16c4f9=readModelRegistry(_0x122db4);if(_0x107e26&&!_0x16c4f9)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x9e78be(0x96));const _0x32d1f1=_0x16c4f9??emptyRegistry(_0x2b2582[_0x9e78be(0xa7)]);if(_0x2b2582[_0x9e78be(0x91)]!=='NOT-SET')removeUnboundProfiles(_0x32d1f1);const _0x3adbc9=_0x16c4f9?getProfileModels(_0x16c4f9,_0x2b2582[_0x9e78be(0xa9)])['length']:0x0;if(_0x3adbc9>0x0&&_0x2b2582['models']['length']===0x0&&!_0x2b2582[_0x9e78be(0xbc)])throw new Error('Refusing\x20to\x20replace\x20'+_0x3adbc9+'\x20model(s)\x20in\x20profile\x20\x22'+_0x2b2582[_0x9e78be(0xa9)]+_0x9e78be(0xac)+_0x9e78be(0xc7));_0x32d1f1[_0x9e78be(0xa7)]=_0x2b2582['defaultProfile'],_0x32d1f1[_0x9e78be(0xa0)][_0x2b2582[_0x9e78be(0xa9)]]={'appCode':_0x2b2582[_0x9e78be(0x91)],'runtimeDomain':_0x2b2582[_0x9e78be(0xc8)]},mergeProfileModels(_0x32d1f1,_0x2b2582[_0x9e78be(0xa9)],_0x2b2582[_0x9e78be(0x93)]),mkdirSync(_0x2b2582[_0x9e78be(0xb8)],{'recursive':!![]});const _0x4b3098=_0x122db4+'.'+process[_0x9e78be(0xb9)]+'.'+Date[_0x9e78be(0xb4)]()+_0x9e78be(0xba);try{writeFileSync(_0x4b3098,registrySource(_0x32d1f1),{'encoding':_0x9e78be(0xca),'mode':0x1a4}),renameSync(_0x4b3098,_0x122db4);}catch(_0x310b0c){try{unlinkSync(_0x4b3098);}catch{}throw _0x310b0c;}return{'path':_0x122db4,'registry':_0x32d1f1,'existed':_0x107e26};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a7_0x128896=a7_0x23c9;function a7_0x36ed(){const _0x41777a=['cwd','5696200cEwMwz','23653dWCpJa','18iiABeQ','426bTQpke','44HuTLxY','relative','utf8','972688ESMCAp','2386788hrjUCT','typescript','join','resolve','75786XYcUAg','{ProjectRoutingImport}','95110EQxJzX','197283yXijPi','format','model-runtime.ts.tpl','startsWith','../../templates/generate-api','profile-api.ts.tpl'];a7_0x36ed=function(){return _0x41777a;};return a7_0x36ed();}function a7_0x23c9(_0x4896ee,_0x282c14){_0x4896ee=_0x4896ee-0x14e;const _0x36edc3=a7_0x36ed();let _0x23c925=_0x36edc3[_0x4896ee];return _0x23c925;}(function(_0xff56dc,_0x2cb7e6){const _0x11e91d=a7_0x23c9,_0x1879a3=_0xff56dc();while(!![]){try{const _0x25869f=-parseInt(_0x11e91d(0x162))/0x1+parseInt(_0x11e91d(0x157))/0x2*(parseInt(_0x11e91d(0x15f))/0x3)+-parseInt(_0x11e91d(0x15b))/0x4+parseInt(_0x11e91d(0x161))/0x5+-parseInt(_0x11e91d(0x156))/0x6*(-parseInt(_0x11e91d(0x154))/0x7)+parseInt(_0x11e91d(0x15a))/0x8*(-parseInt(_0x11e91d(0x155))/0x9)+parseInt(_0x11e91d(0x153))/0xa;if(_0x25869f===_0x2cb7e6)break;else _0x1879a3['push'](_0x1879a3['shift']());}catch(_0x33469c){_0x1879a3['push'](_0x1879a3['shift']());}}}(a7_0x36ed,0x54c1b));import{readFileSync}from'node:fs';import a7_0x211fd4 from'node:path';import{fileURLToPath}from'node:url';import a7_0x5e92a7 from'prettier';import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function relativeImport(_0x5d63c1,_0x3e6d08){const _0x452669=a7_0x23c9;let _0x47510e=a7_0x211fd4[_0x452669(0x158)](_0x5d63c1,_0x3e6d08)['replace'](/\\/g,'/');if(!_0x47510e[_0x452669(0x14f)]('.'))_0x47510e='./'+_0x47510e;return _0x47510e;}export async function renderModelRegistryScaffold(_0x4ce144,_0x4b9ece=process[a7_0x128896(0x152)]()){const _0x403c18=a7_0x128896,_0x3217c5=fileURLToPath(import.meta.url),_0x28f473=a7_0x211fd4[_0x403c18(0x15e)](a7_0x211fd4['dirname'](_0x3217c5),_0x403c18(0x150)),_0x42110a=relativeImport(a7_0x211fd4[_0x403c18(0x15e)](_0x4ce144),a7_0x211fd4[_0x403c18(0x15e)](_0x4b9ece,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x54270d=readFileSync(a7_0x211fd4[_0x403c18(0x15d)](_0x28f473,_0x403c18(0x151)),_0x403c18(0x159))['replace'](_0x403c18(0x160),_0x42110a),[_0x499129,_0x203f6d,_0x7e4668]=await Promise['all']([a7_0x5e92a7['format'](_0x54270d,{'parser':_0x403c18(0x15c)}),a7_0x5e92a7[_0x403c18(0x163)](readFileSync(a7_0x211fd4[_0x403c18(0x15d)](_0x28f473,'profile-client.ts.tpl'),_0x403c18(0x159)),{'parser':_0x403c18(0x15c)}),a7_0x5e92a7[_0x403c18(0x163)](readFileSync(a7_0x211fd4[_0x403c18(0x15d)](_0x28f473,_0x403c18(0x14e)),_0x403c18(0x159)),{'parser':_0x403c18(0x15c)})]);return{'api':_0x499129,'client':_0x203f6d,'modelRuntime':_0x7e4668};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x13f450,_0x185d37){const _0x33bca0=a8_0x50ab,_0x129a84=_0x13f450();while(!![]){try{const _0x51ff42=-parseInt(_0x33bca0(0x105))/0x1*(parseInt(_0x33bca0(0x11c))/0x2)+parseInt(_0x33bca0(0x10f))/0x3*(-parseInt(_0x33bca0(0x10d))/0x4)+parseInt(_0x33bca0(0x10b))/0x5*(parseInt(_0x33bca0(0x117))/0x6)+parseInt(_0x33bca0(0x10a))/0x7+parseInt(_0x33bca0(0x107))/0x8*(parseInt(_0x33bca0(0x112))/0x9)+-parseInt(_0x33bca0(0x126))/0xa*(parseInt(_0x33bca0(0x119))/0xb)+parseInt(_0x33bca0(0x122))/0xc;if(_0x51ff42===_0x185d37)break;else _0x129a84['push'](_0x129a84['shift']());}catch(_0x173ba8){_0x129a84['push'](_0x129a84['shift']());}}}(a8_0x3963,0x6a909));import{existsSync}from'node:fs';import a8_0x3cafc3 from'node:path';import{readRawConfig}from'../context/config-loader.js';import{MODEL_REGISTRY_FILE_NAME,readModelRegistry}from'../api/model-registry-file.js';import{CliErrors}from'../errors.js';function a8_0x3963(){const _0x1a4311=['\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20','610jTDqsF','join','`\x20first.','345631XgXbEz','appcode','728392UeOSPy','\x22\x20is\x20missing\x20from\x20','find','411796QnvLLO','170YgUPUS','string','583892HjdzWR','defaultProfile','9jDNoKf','entries','object','63PNUqfW','validation','filter','cwd','apps','132186mGXPea','profiles','2222KYXAKa','resolve','Model\x20profile\x20\x22','4aJFdrr','-api.ts','length','AppCode\x20\x22','Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.','defaultApp','1593204tugXrY','\x20api\x20pull\x20--app\x20','Run\x20`'];a8_0x3963=function(){return _0x1a4311;};return a8_0x3963();}function a8_0x50ab(_0x1cf378,_0x4a16c1){_0x1cf378=_0x1cf378-0x105;const _0x396320=a8_0x3963();let _0x50ab7d=_0x396320[_0x1cf378];return _0x50ab7d;}import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveApiModelSource(_0x4d0dd3,_0x431401,_0x38f192){const _0x5b6aa6=a8_0x50ab,_0x508e99=a8_0x3cafc3['resolve'](process[_0x5b6aa6(0x115)](),_0x4d0dd3),_0x76e672=a8_0x3cafc3[_0x5b6aa6(0x11a)](_0x508e99,'api.ts'),_0xd409f8=a8_0x3cafc3[_0x5b6aa6(0x11a)](_0x508e99,MODEL_REGISTRY_FILE_NAME),_0x425432=readModelRegistry(_0xd409f8);if(_0x425432){const _0x44ed30=_0x431401?Object[_0x5b6aa6(0x110)](_0x425432['profiles'])[_0x5b6aa6(0x114)](([,_0x484383])=>_0x484383['appCode']===_0x431401):[];if(_0x38f192){if(_0x425432[_0x5b6aa6(0x118)][_0x38f192])return{'filePath':_0xd409f8,'profileName':_0x38f192};if(_0x44ed30[_0x5b6aa6(0x11e)]>0x0)throw CliErrors[_0x5b6aa6(0x113)](_0x5b6aa6(0x11b)+_0x38f192+_0x5b6aa6(0x108)+MODEL_REGISTRY_FILE_NAME+'.',_0x5b6aa6(0x124)+CLI_BIN_NAME+_0x5b6aa6(0x123)+_0x38f192+_0x5b6aa6(0x128));}else{if(_0x44ed30['length']===0x1)return{'filePath':_0xd409f8,'profileName':_0x44ed30[0x0][0x0]};if(_0x44ed30[_0x5b6aa6(0x11e)]>0x1)throw new Error(_0x5b6aa6(0x11f)+_0x431401+_0x5b6aa6(0x125)+_0x44ed30['map'](([_0x20ff47])=>_0x20ff47)[_0x5b6aa6(0x127)](',\x20')+'.\x20'+_0x5b6aa6(0x120));if(_0x425432[_0x5b6aa6(0x118)][_0x425432[_0x5b6aa6(0x10e)]]&&!_0x431401)return{'filePath':_0xd409f8,'profileName':_0x425432[_0x5b6aa6(0x10e)]};}}if(!_0x431401&&!_0x38f192)return{'filePath':_0x76e672};const _0x5c16fc=readRawConfig(),_0x202774=_0x5c16fc[_0x5b6aa6(0x116)]&&typeof _0x5c16fc[_0x5b6aa6(0x116)]===_0x5b6aa6(0x111)?_0x5c16fc['apps']:{},_0x22a415=_0x38f192&&_0x202774[_0x38f192]?[_0x38f192,_0x202774[_0x38f192]]:Object[_0x5b6aa6(0x110)](_0x202774)[_0x5b6aa6(0x109)](([,_0x40855c])=>_0x40855c?.[_0x5b6aa6(0x106)]===_0x431401);if(!_0x22a415)return{'filePath':_0x76e672};const [_0x3838bf,_0x18660c]=_0x22a415,_0x2c2f1f=typeof _0x5c16fc[_0x5b6aa6(0x121)]===_0x5b6aa6(0x10c)?_0x5c16fc[_0x5b6aa6(0x121)]:undefined;if(_0x18660c?.['apiDir'])return{'filePath':_0x76e672};if(_0x2c2f1f&&_0x3838bf!==_0x2c2f1f){const _0x25923e=a8_0x3cafc3[_0x5b6aa6(0x11a)](_0x508e99,_0x3838bf+_0x5b6aa6(0x11d));if(existsSync(_0x25923e))return{'filePath':_0x25923e};}return{'filePath':_0x76e672};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x11fbe0,_0x201571){const _0x37f3ff=a9_0x19b5,_0x47d5c2=_0x11fbe0();while(!![]){try{const _0x530c7c=parseInt(_0x37f3ff(0xdf))/0x1+-parseInt(_0x37f3ff(0xe9))/0x2+parseInt(_0x37f3ff(0xe3))/0x3*(parseInt(_0x37f3ff(0xe1))/0x4)+parseInt(_0x37f3ff(0xec))/0x5+parseInt(_0x37f3ff(0xed))/0x6*(-parseInt(_0x37f3ff(0xea))/0x7)+parseInt(_0x37f3ff(0xe2))/0x8*(parseInt(_0x37f3ff(0xdc))/0x9)+-parseInt(_0x37f3ff(0xe4))/0xa;if(_0x530c7c===_0x201571)break;else _0x47d5c2['push'](_0x47d5c2['shift']());}catch(_0x182a09){_0x47d5c2['push'](_0x47d5c2['shift']());}}}(a9_0x12e4,0x4ed09));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';function a9_0x19b5(_0x56d9c8,_0x3236f1){_0x56d9c8=_0x56d9c8-0xdc;const _0x12e4cc=a9_0x12e4();let _0x19b510=_0x12e4cc[_0x56d9c8];return _0x19b510;}import{confirm}from'@inquirer/prompts';import a9_0x59c5f5 from'ora';export async function runAuthServer(_0x313de2){const _0x16078a=a9_0x19b5,_0x4ca02b=await getIsSessionValid();if(_0x4ca02b){console[_0x16078a(0xe0)](_0x16078a(0xe6));return;}if(_0x313de2?.[_0x16078a(0xf0)]&&!_0x313de2[_0x16078a(0xde)])throw CliErrors[_0x16078a(0xee)]('Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.',_0x16078a(0xe7)+CLI_BIN_NAME+_0x16078a(0xef));const _0x371961=_0x313de2?.['autoYes']?!![]:await confirm({'message':_0x16078a(0xeb),'default':!![]});if(!_0x371961)return;if(_0x313de2?.[_0x16078a(0xf0)]){console[_0x16078a(0xe0)](_0x16078a(0xf1));const _0x5d01de=await authServer({'silent':![],'openBrowser':![]});_0x5d01de?console[_0x16078a(0xe0)](_0x16078a(0xe8)):console[_0x16078a(0xe0)]('!\x20Login\x20failed.');return;}const _0x172e82=a9_0x59c5f5(_0x16078a(0xdd))[_0x16078a(0xf2)](),_0x40586f=await authServer({'silent':!![],'openBrowser':!![]});_0x172e82['stop'](),_0x40586f?console['log'](_0x16078a(0xe8)):console[_0x16078a(0xe0)](_0x16078a(0xe5));}function a9_0x12e4(){const _0x1d7359=['Run\x20`','*\x20Login\x20successful!','235826fWnMGZ','344939jsJlYK','No\x20valid\x20session.\x20Login\x20now?','2370920yVzwKP','24yipkoo','validation','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','nonInteractive','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','start','1743507hoUmRW','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','autoYes','107857uFkUwm','log','226444fwdXlA','16zghtFb','15wYDClX','6146960MWbJOM','!\x20Login\x20failed.','โ\x20Valid\x20session\x20detected,\x20no\x20login\x20required.'];a9_0x12e4=function(){return _0x1d7359;};return a9_0x12e4();}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a10_0x156826=a10_0xab95;(function(_0x35f851,_0xb309f6){const _0x8c3d8d=a10_0xab95,_0x4486f0=_0x35f851();while(!![]){try{const _0x5d2a75=parseInt(_0x8c3d8d(0x169))/0x1*(parseInt(_0x8c3d8d(0x173))/0x2)+parseInt(_0x8c3d8d(0x17d))/0x3+parseInt(_0x8c3d8d(0x178))/0x4+parseInt(_0x8c3d8d(0x18d))/0x5*(parseInt(_0x8c3d8d(0x189))/0x6)+-parseInt(_0x8c3d8d(0x168))/0x7+-parseInt(_0x8c3d8d(0x166))/0x8*(-parseInt(_0x8c3d8d(0x180))/0x9)+-parseInt(_0x8c3d8d(0x16a))/0xa*(parseInt(_0x8c3d8d(0x185))/0xb);if(_0x5d2a75===_0xb309f6)break;else _0x4486f0['push'](_0x4486f0['shift']());}catch(_0x435882){_0x4486f0['push'](_0x4486f0['shift']());}}}(a10_0x58cd,0xb7eb7));function a10_0xab95(_0x2b258b,_0x4b03b4){_0x2b258b=_0x2b258b-0x163;const _0x58cdfa=a10_0x58cd();let _0xab95f8=_0x58cdfa[_0x2b258b];return _0xab95f8;}import{writeFileSync}from'node:fs';function a10_0x58cd(){const _0x1270be=['Auth\x20server\x20error:','3452967WgMEsH','open\x20\x22','๐\x20Attempting\x20to\x20open\x20browser\x20automatically...','72ogkxzO','error','โ
\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','log','local','6743wigxcu','listen','end','object','316566zdBdpT','json','cookie','origin','125wjLvjE','lovrabet','timeoutMs','/api/auth/get-session','/cert/lovrabet-dev.json','silent','๐ก\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','close','headers','win32','254032lLsJDo','createServer','9942800PsfXjy','12917UVRCJV','27110kExmvT','/sign-in?redirect=','โ ๏ธ\x20\x20Failed\x20to\x20open\x20browser\x20automatically','xdg-open\x20\x22','!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','๐\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','catch','openBrowser','address','12XNPMTK','port','utf-8','session','isAuth','4136120akdQCv','writeHead','user','127.0.0.1'];a10_0x58cd=function(){return _0x1270be;};return a10_0x58cd();}import a10_0x122fcb from'node:http';import a10_0x25ca78 from'node:https';import{getUserDomain}from'../constant/domain.js';import{getOfficialRoutingCdn,getOfficialRoutingProfile}from'../constant/routing-profile.js';import{getProjectDomainRoutingManifest}from'../config/project-domain-routing.js';import{exec}from'node:child_process';import{getIsSessionValid}from'../auth/is-session-valid.js';import{cookieFile}from'../auth/constant.js';import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export function resolveAuthCallbackRouting(_0x206f85){const _0x48a73e=a10_0xab95;if(!_0x206f85)return getProjectDomainRoutingManifest()['local'];const _0x59900f=getOfficialRoutingProfile(_0x206f85),_0x541a65=getOfficialRoutingCdn(_0x206f85);return{'origin':_0x59900f[_0x48a73e(0x184)][_0x48a73e(0x18c)],'certificateUrl':_0x541a65[_0x48a73e(0x18e)]+_0x48a73e(0x191)};}function withPort(_0x34635a,_0x1d254b){const _0x122516=a10_0xab95,_0x4b9874=new URL(_0x34635a);return _0x4b9874[_0x122516(0x174)]=String(_0x1d254b),_0x4b9874[_0x122516(0x18c)];}export async function authServer(_0x2e787e){const _0x4fccc4=a10_0xab95,_0x1e0fe3=_0x2e787e?.[_0x4fccc4(0x192)]||![],_0x483a3b=_0x2e787e?.[_0x4fccc4(0x171)]??!![],_0x3e5478=_0x2e787e?.[_0x4fccc4(0x18f)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x3e918f=resolveAuthCallbackRouting(),_0x115ec7=_0x3e918f['certificateUrl']?await(await fetch(_0x3e918f['certificateUrl']))[_0x4fccc4(0x18a)]():undefined;return new Promise(async(_0x6491d,_0xe40295)=>{const _0x5c9071=_0x4fccc4;let _0x57c242=0x0,_0x1f5246=![],_0x275e60;const _0x2ace66=async(_0x126fea,_0x432c26)=>{const _0x4acbaf=a10_0xab95,_0x4ba364=getUserDomain(),_0x8756c1=_0x126fea[_0x4acbaf(0x164)][_0x4acbaf(0x18b)]||'',_0x270687=await fetch(_0x4ba364+_0x4acbaf(0x190),{'headers':{'cookie':_0x8756c1}})['then'](_0x4e7dcd=>_0x4e7dcd[_0x4acbaf(0x18a)]()),_0x25825e=_0x270687&&_0x270687[_0x4acbaf(0x176)]&&_0x270687[_0x4acbaf(0x17a)];if(_0x25825e){writeFileSync(cookieFile,_0x8756c1,_0x4acbaf(0x175));const _0x1d60ca=buildLoginSuccessHtml();_0x432c26[_0x4acbaf(0x179)](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x432c26['end'](_0x1d60ca),_0x51daf4(!![]);}else{const _0x51711a=encodeURIComponent(withPort(_0x3e918f[_0x4acbaf(0x18c)],_0x57c242));_0x432c26[_0x4acbaf(0x179)](0x12e,{'location':_0x4ba364+_0x4acbaf(0x16b)+_0x51711a}),_0x432c26[_0x4acbaf(0x187)]();return;}},_0x1436a=_0x115ec7?a10_0x25ca78['createServer'](_0x115ec7,_0x2ace66):a10_0x122fcb[_0x5c9071(0x167)](_0x2ace66);function _0x51daf4(_0x62846f){const _0x769dcb=_0x5c9071;if(_0x1f5246)return;_0x1f5246=!![],_0x275e60&&clearTimeout(_0x275e60),_0x1436a[_0x769dcb(0x163)](),_0x6491d(_0x62846f);}_0x1436a[_0x5c9071(0x186)](0x0,_0x5c9071(0x17b),()=>{const _0x238451=_0x5c9071,_0x263a5b=_0x1436a[_0x238451(0x172)]();_0x57c242=typeof _0x263a5b===_0x238451(0x188)&&_0x263a5b?_0x263a5b['port']:Number(_0x263a5b);const _0x2906b7=withPort(_0x3e918f[_0x238451(0x18c)],_0x57c242);_0x275e60=setTimeout(()=>{const _0x56650a=_0x238451;!_0x1e0fe3&&console[_0x56650a(0x183)](_0x56650a(0x16e)),_0x51daf4(![]);},_0x3e5478);!_0x1e0fe3&&(console['log']('๐\x20Starting\x20login\x20service...'),console['log']('๐\x20Login\x20URL:',_0x2906b7),_0x483a3b?(console['log'](_0x238451(0x17f)),console[_0x238451(0x183)](''),console[_0x238451(0x183)](_0x238451(0x193))):console['log']('๐ก\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.'),console[_0x238451(0x183)](''));if(!_0x483a3b)return;openInBrowser(_0x2906b7)['then'](_0x47ec7a=>{const _0x1b6f12=_0x238451;!_0x1e0fe3&&(_0x47ec7a?console[_0x1b6f12(0x183)](_0x1b6f12(0x182)):(console[_0x1b6f12(0x183)]('โ ๏ธ\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x1b6f12(0x183)](_0x1b6f12(0x16f),_0x2906b7)),console['log'](''));})[_0x238451(0x170)](()=>{const _0x15ca41=_0x238451;!_0x1e0fe3&&(console[_0x15ca41(0x183)](_0x15ca41(0x16c)),console[_0x15ca41(0x183)](_0x15ca41(0x16f),_0x2906b7),console[_0x15ca41(0x183)](''));});}),_0x1436a['on'](_0x5c9071(0x181),_0x2ae612=>{const _0x148d28=_0x5c9071;if(_0x1f5246)return;_0x1f5246=!![],_0x275e60&&clearTimeout(_0x275e60),!_0x1e0fe3&&console[_0x148d28(0x181)](_0x148d28(0x17c),_0x2ae612),_0x1436a[_0x148d28(0x163)](),_0xe40295(_0x2ae612);});});}function openInBrowser(_0x2c4e9a){return new Promise(_0x16c470=>{const _0x4310a4=a10_0xab95,_0x3dc342=process['platform'];let _0x239cee;if(_0x3dc342===_0x4310a4(0x165))_0x239cee='cmd\x20/c\x20start\x20\x22\x22\x20\x22'+_0x2c4e9a+'\x22';else _0x3dc342==='darwin'?_0x239cee=_0x4310a4(0x17e)+_0x2c4e9a+'\x22':_0x239cee=_0x4310a4(0x16d)+_0x2c4e9a+'\x22';exec(_0x239cee,_0x57c618=>{_0x57c618?_0x16c470(![]):_0x16c470(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a10_0x156826(0x183)](a10_0x156826(0x177),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a11_0x33971e=a11_0x580c;function a11_0x580c(_0x522d70,_0x12a598){_0x522d70=_0x522d70-0x8e;const _0x3e9998=a11_0x3e99();let _0x580cd3=_0x3e9998[_0x522d70];return _0x580cd3;}(function(_0x1b3fd1,_0x40e898){const _0x1fc3bf=a11_0x580c,_0x53d3f7=_0x1b3fd1();while(!![]){try{const _0x329346=-parseInt(_0x1fc3bf(0x96))/0x1*(parseInt(_0x1fc3bf(0x94))/0x2)+parseInt(_0x1fc3bf(0x8f))/0x3+parseInt(_0x1fc3bf(0x91))/0x4+parseInt(_0x1fc3bf(0x8e))/0x5+-parseInt(_0x1fc3bf(0x98))/0x6*(parseInt(_0x1fc3bf(0x97))/0x7)+parseInt(_0x1fc3bf(0x93))/0x8+-parseInt(_0x1fc3bf(0x95))/0x9;if(_0x329346===_0x40e898)break;else _0x53d3f7['push'](_0x53d3f7['shift']());}catch(_0x506df4){_0x53d3f7['push'](_0x53d3f7['shift']());}}}(a11_0x3e99,0x2b72f));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';function a11_0x3e99(){const _0x5235dd=['54QMoSYi','928115MQvodf','679005xwVmdH','.lovrabet','118444LnLcmW','cookie','2739488MIFbFj','3346LxqZvi','4375188YYJAfF','10suKrkL','80248suTWuL'];a11_0x3e99=function(){return _0x5235dd;};return a11_0x3e99();}export const configDir=join(homedir(),a11_0x33971e(0x90));export const cookieFile=join(configDir,a11_0x33971e(0x92));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x459556,_0x3971af){var _0x188cd7=a12_0x4fe1,_0x126298=_0x459556();while(!![]){try{var _0x281cde=parseInt(_0x188cd7(0x1c8))/0x1+-parseInt(_0x188cd7(0x1c2))/0x2+parseInt(_0x188cd7(0x1c9))/0x3+parseInt(_0x188cd7(0x1c3))/0x4+-parseInt(_0x188cd7(0x1c5))/0x5*(parseInt(_0x188cd7(0x1cb))/0x6)+-parseInt(_0x188cd7(0x1c7))/0x7*(-parseInt(_0x188cd7(0x1ca))/0x8)+-parseInt(_0x188cd7(0x1c1))/0x9*(parseInt(_0x188cd7(0x1c6))/0xa);if(_0x281cde===_0x3971af)break;else _0x126298['push'](_0x126298['shift']());}catch(_0x20757c){_0x126298['push'](_0x126298['shift']());}}}(a12_0x4818,0xf1139));function a12_0x4fe1(_0xceafe6,_0x1e6d94){_0xceafe6=_0xceafe6-0x1c1;var _0x481891=a12_0x4818();var _0x4fe192=_0x481891[_0xceafe6];return _0x4fe192;}import{readFileSync}from'node:fs';function a12_0x4818(){var _0x40b2b4=['2272029wgdhjm','5554064pOlxLW','1013466dRzQcW','873YXsfOT','658562GEdnsu','6887740cvNSAO','utf-8','30wpywGU','150170VjNeOR','7MpaBAx','613309hbnIEy'];a12_0x4818=function(){return _0x40b2b4;};return a12_0x4818();}import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0x366cb9=a12_0x4fe1;try{return readFileSync(cookieFile,_0x366cb9(0x1c4));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x20dce7,_0x31d49e){const _0x563f01=a13_0x4dd9,_0x15e94f=_0x20dce7();while(!![]){try{const _0x424ad7=-parseInt(_0x563f01(0xd4))/0x1*(parseInt(_0x563f01(0xd7))/0x2)+-parseInt(_0x563f01(0xd6))/0x3+-parseInt(_0x563f01(0xdb))/0x4+parseInt(_0x563f01(0xd8))/0x5+-parseInt(_0x563f01(0xd3))/0x6+-parseInt(_0x563f01(0xde))/0x7*(parseInt(_0x563f01(0xdd))/0x8)+-parseInt(_0x563f01(0xda))/0x9*(-parseInt(_0x563f01(0xd5))/0xa);if(_0x424ad7===_0x31d49e)break;else _0x15e94f['push'](_0x15e94f['shift']());}catch(_0x19614e){_0x15e94f['push'](_0x15e94f['shift']());}}}(a13_0x3d46,0x7e736));function a13_0x4dd9(_0x315d2b,_0x68c230){_0x315d2b=_0x315d2b-0xd2;const _0x3d4644=a13_0x3d46();let _0x4dd931=_0x3d4644[_0x315d2b];return _0x4dd931;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a13_0x3d46(){const _0x3048e8=['2514246tqwqZL','1757912BldRFi','4711735JvsxGY','/api/auth/get-session','374769tgIREh','796916oIQCWx','user','42344kAcjRg','581LMxGIm','session','655368eQhEyn','1XLNFOu','490TrLSMn'];a13_0x3d46=function(){return _0x3048e8;};return a13_0x3d46();}import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(_0x550fc8){const _0x450095=a13_0x4dd9;try{if(_0x550fc8===undefined){if(!existsSync(cookieFile))return null;_0x550fc8=readFileSync(cookieFile,'utf-8');}if(!_0x550fc8)return null;const _0x245c85=await fetch(getUserDomain()+_0x450095(0xd9),{'headers':{'cookie':_0x550fc8}});if(!_0x245c85['ok'])return null;const _0x309c8c=await _0x245c85['json']();if(!_0x309c8c[_0x450095(0xd2)]||!_0x309c8c[_0x450095(0xdc)])return null;return _0x309c8c;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x22acac,_0x4152a8){const _0x2eaf13=a14_0x4c7c,_0x5e0822=_0x22acac();while(!![]){try{const _0x303f2b=parseInt(_0x2eaf13(0xd3))/0x1+-parseInt(_0x2eaf13(0xd1))/0x2*(parseInt(_0x2eaf13(0xd2))/0x3)+-parseInt(_0x2eaf13(0xcd))/0x4+parseInt(_0x2eaf13(0xc9))/0x5+parseInt(_0x2eaf13(0xca))/0x6+parseInt(_0x2eaf13(0xd6))/0x7*(-parseInt(_0x2eaf13(0xd5))/0x8)+-parseInt(_0x2eaf13(0xd7))/0x9*(parseInt(_0x2eaf13(0xd4))/0xa);if(_0x303f2b===_0x4152a8)break;else _0x5e0822['push'](_0x5e0822['shift']());}catch(_0xd57384){_0x5e0822['push'](_0x5e0822['shift']());}}}(a14_0x1dcc,0x1c7c4));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a14_0x4c7c(_0x3f9925,_0x4eda0a){_0x3f9925=_0x3f9925-0xc8;const _0x1dcc72=a14_0x1dcc();let _0x4c7c2d=_0x1dcc72[_0x3f9925];return _0x4c7c2d;}import{cookieFile}from'../auth/constant.js';function a14_0x1dcc(){const _0x3d2791=['utf-8','893584fLLaDu','/api/auth/get-session','user','session','289304omnUJn','3CbbXeA','141073YwtzkY','40910wkpKIM','16VFwjZD','232792FmfSww','18TRoxxH','then','1132195RaPGiO','1151436PCtcgb','json'];a14_0x1dcc=function(){return _0x3d2791;};return a14_0x1dcc();}export async function getIsSessionValid(){const _0x318ba3=a14_0x4c7c;try{if(!existsSync(cookieFile))return![];const _0x369845=readFileSync(cookieFile,_0x318ba3(0xcc)),_0x22e190=await fetch(getUserDomain()+_0x318ba3(0xce),{'headers':{'cookie':_0x369845}})[_0x318ba3(0xc8)](_0x31d092=>_0x31d092[_0x318ba3(0xcb)]());return _0x22e190&&_0x22e190[_0x318ba3(0xd0)]&&_0x22e190[_0x318ba3(0xcf)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a15_0x50e2(_0x2826cc,_0x53e4c4){_0x2826cc=_0x2826cc-0xe1;const _0x2ffad6=a15_0x2ffa();let _0x50e2ce=_0x2ffad6[_0x2826cc];return _0x50e2ce;}(function(_0x30796e,_0x5d6095){const _0x3c4b1f=a15_0x50e2,_0x23453f=_0x30796e();while(!![]){try{const _0x1d67d0=parseInt(_0x3c4b1f(0xe2))/0x1+parseInt(_0x3c4b1f(0xe1))/0x2*(-parseInt(_0x3c4b1f(0xe8))/0x3)+parseInt(_0x3c4b1f(0xee))/0x4*(parseInt(_0x3c4b1f(0xeb))/0x5)+parseInt(_0x3c4b1f(0xe3))/0x6*(-parseInt(_0x3c4b1f(0xea))/0x7)+-parseInt(_0x3c4b1f(0xe9))/0x8+parseInt(_0x3c4b1f(0xe5))/0x9*(parseInt(_0x3c4b1f(0xec))/0xa)+-parseInt(_0x3c4b1f(0xe6))/0xb*(parseInt(_0x3c4b1f(0xe4))/0xc);if(_0x1d67d0===_0x5d6095)break;else _0x23453f['push'](_0x23453f['shift']());}catch(_0x1854eb){_0x23453f['push'](_0x23453f['shift']());}}}(a15_0x2ffa,0xf26a6));export function buildLoginSuccessHtml(){const _0x3e9099=a15_0x50e2,_0x1e12e5='Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.';return _0x3e9099(0xed)+_0x1e12e5+_0x3e9099(0xe7);}function a15_0x2ffa(){const _0x5acfa1=['296jPrKkk','22634OCjXEk','799995gLwljO','25908cmYzNS','36QFAIvJ','9nXxrvh','1775818OJwaBS','</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>','63LWMigP','3520424lbwwXR','1120vALCcF','13850VZQuNv','18408630lIfGDW','<!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>'];a15_0x2ffa=function(){return _0x5acfa1;};return a15_0x2ffa();}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a16_0x3e21(){var _0xbf5fa0=['1910860Zlyemk','!\x20Not\x20logged\x20in','1650084fnWAsT','11yKtEuO','11825150FJSfHf','2066239kJlcus','27894084gpiuUH','873YDuBag','log','8OSHznN','18KOByeq','77016UrMTwB','236077SWLYTN','6JKEYnW'];a16_0x3e21=function(){return _0xbf5fa0;};return a16_0x3e21();}(function(_0x4f6c62,_0x40f169){var _0x5e7dc6=a16_0x5225,_0x43faed=_0x4f6c62();while(!![]){try{var _0x3c0c0d=parseInt(_0x5e7dc6(0x18b))/0x1*(-parseInt(_0x5e7dc6(0x196))/0x2)+parseInt(_0x5e7dc6(0x18c))/0x3*(parseInt(_0x5e7dc6(0x18f))/0x4)+-parseInt(_0x5e7dc6(0x18d))/0x5+-parseInt(_0x5e7dc6(0x189))/0x6*(-parseInt(_0x5e7dc6(0x192))/0x7)+-parseInt(_0x5e7dc6(0x18a))/0x8*(parseInt(_0x5e7dc6(0x194))/0x9)+-parseInt(_0x5e7dc6(0x191))/0xa*(parseInt(_0x5e7dc6(0x190))/0xb)+parseInt(_0x5e7dc6(0x193))/0xc;if(_0x3c0c0d===_0x40f169)break;else _0x43faed['push'](_0x43faed['shift']());}catch(_0x124243){_0x43faed['push'](_0x43faed['shift']());}}}(a16_0x3e21,0x9098a));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';function a16_0x5225(_0x115da9,_0x1a8911){_0x115da9=_0x115da9-0x189;var _0x3e2174=a16_0x3e21();var _0x5225a5=_0x3e2174[_0x115da9];return _0x5225a5;}export function logout(){var _0x25c74b=a16_0x5225;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x25c74b(0x195)]('โ\x20Logged\x20out')):console[_0x25c74b(0x195)](_0x25c74b(0x18e));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a17_0x64cc(_0xd7c4ed,_0x36cdd7){_0xd7c4ed=_0xd7c4ed-0xb7;const _0x2c77f8=a17_0x2c77();let _0x64cc95=_0x2c77f8[_0xd7c4ed];return _0x64cc95;}(function(_0x24e8f3,_0x3f977f){const _0x4550d2=a17_0x64cc,_0xb33b77=_0x24e8f3();while(!![]){try{const _0x4f0873=parseInt(_0x4550d2(0xb9))/0x1*(parseInt(_0x4550d2(0xbb))/0x2)+parseInt(_0x4550d2(0xb8))/0x3+parseInt(_0x4550d2(0xbd))/0x4+-parseInt(_0x4550d2(0xbf))/0x5+-parseInt(_0x4550d2(0xba))/0x6+-parseInt(_0x4550d2(0xbc))/0x7+parseInt(_0x4550d2(0xb7))/0x8*(parseInt(_0x4550d2(0xbe))/0x9);if(_0x4f0873===_0x3f977f)break;else _0xb33b77['push'](_0xb33b77['shift']());}catch(_0x4595d1){_0xb33b77['push'](_0xb33b77['shift']());}}}(a17_0x2c77,0xcd2e4));export const dynamicCliFlags={'enableBffSave':{'type':'boolean'}};function a17_0x2c77(){const _0x3394e6=['7847142oddIGd','8pmMNCU','4344613habJmr','1366696xYAgfD','1528866vJknok','6206555lXaOkY','72AjXUbU','2131221elolCT','357325yYZWJy'];a17_0x2c77=function(){return _0x3394e6;};return a17_0x2c77();}
|