@lovrabet/rabetbase-cli 2.5.11-beta.1 โ 2.5.12-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/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.d.ts +1 -0
- 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.d.ts +2 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.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
|
+
(function(_0x1c674c,_0x528eb7){const _0x52994a=a0_0x2546,_0x495a4d=_0x1c674c();while(!![]){try{const _0x3ecbde=-parseInt(_0x52994a(0xb3))/0x1*(-parseInt(_0x52994a(0xbd))/0x2)+parseInt(_0x52994a(0xbc))/0x3+-parseInt(_0x52994a(0xc3))/0x4+parseInt(_0x52994a(0xb6))/0x5*(parseInt(_0x52994a(0xb4))/0x6)+-parseInt(_0x52994a(0xad))/0x7+parseInt(_0x52994a(0xb2))/0x8+-parseInt(_0x52994a(0xc4))/0x9;if(_0x3ecbde===_0x528eb7)break;else _0x495a4d['push'](_0x495a4d['shift']());}catch(_0x50e7a0){_0x495a4d['push'](_0x495a4d['shift']());}}}(a0_0x2e50,0x1df5a));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x4f26de from'node:path';function a0_0x2e50(){const _0x120cf2=['634984ArEEBe','243539ZyHMzJ','6YOtlKU','.md\x20-\x20','645790JpdQpT','join','success','log','length','Failed\x20to\x20generate\x20docs:\x20','679800zaqUVL','2naTZni','name','tableName','utf8',']\x20Generating:\x20','Waiting\x203\x20seconds...\x0a','504760RRlYGj','1786716zPhMwq','datasetCode','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','message','1618694dUKJtu','.md','api-doc','.md\x20(','โ\x20Failed:\x20'];a0_0x2e50=function(){return _0x120cf2;};return a0_0x2e50();}import{fetchDatasetDoc}from'../core/api-client.js';import{logger}from'../utils/logger.js';export{fetchDatasetDoc}from'../core/api-client.js';function delay(_0x1b935f){return new Promise(_0x385a82=>setTimeout(_0x385a82,_0x1b935f));}function a0_0x2546(_0x325166,_0x27055a){_0x325166=_0x325166-0xad;const _0x2e50cf=a0_0x2e50();let _0x25462c=_0x2e50cf[_0x325166];return _0x25462c;}export async function generateDatasetDocs(_0x18382a,_0x3c85fe,_0x4e4ba1,_0x1a08d4='./docs',_0xaf6484,_0x4a0fa5){const _0x53d24c=a0_0x2546;mkdirSync(_0x1a08d4,{'recursive':!![]});const _0x4a2654=[],_0x4f3a16=_0x18382a[_0x53d24c(0xba)];console['log']('\x0a'+_0x4f3a16+_0x53d24c(0xc6));for(let _0x273ded=0x0;_0x273ded<_0x18382a[_0x53d24c(0xba)];_0x273ded++){const _0x17714e=_0x18382a[_0x273ded],_0x53cd46=_0x273ded+0x1,_0x1718ab=_0x17714e[_0x53d24c(0xbf)];try{console[_0x53d24c(0xb9)]('['+_0x53cd46+'/'+_0x4f3a16+_0x53d24c(0xc1)+_0x1718ab+_0x53d24c(0xb0)+_0x17714e[_0x53d24c(0xbe)]+')');if(_0xaf6484)_0xaf6484(_0x53cd46,_0x4f3a16,_0x1718ab);const _0x1de4d3=await fetchDatasetDoc({'appCode':_0x3c85fe,'cookie':_0x4e4ba1,'datasetCode':_0x17714e[_0x53d24c(0xc5)],'datasetId':_0x17714e['id'],'enableAI':![],'extraParams':_0x4a0fa5}),_0x530cf5=a0_0x4f26de[_0x53d24c(0xb7)](_0x1a08d4,_0x1718ab+_0x53d24c(0xae));writeFileSync(_0x530cf5,_0x1de4d3,{'encoding':_0x53d24c(0xc0)}),console[_0x53d24c(0xb9)]('โ\x20Generated:\x20'+_0x1718ab+_0x53d24c(0xae)),logger[_0x53d24c(0xb8)](_0x53d24c(0xaf),'Generated\x20docs\x20successfully:\x20'+_0x1718ab,undefined,{'datasetCode':_0x17714e['datasetCode'],'datasetName':_0x17714e[_0x53d24c(0xbe)],'filePath':_0x530cf5,'progress':_0x53cd46+'/'+_0x4f3a16}),_0x4a2654['push']({'datasetCode':_0x17714e['datasetCode'],'datasetName':_0x17714e[_0x53d24c(0xbe)],'filePath':_0x530cf5,'success':!![]});if(_0x53cd46<_0x4f3a16)await delay(0x1388);}catch(_0x291d8f){const _0x15a224=_0x291d8f instanceof Error?_0x291d8f[_0x53d24c(0xc7)]:String(_0x291d8f);console['log'](_0x53d24c(0xb1)+_0x1718ab+_0x53d24c(0xb5)+_0x15a224),logger['error'](_0x53d24c(0xaf),_0x53d24c(0xbb)+_0x17714e['datasetCode'],{'datasetCode':_0x17714e[_0x53d24c(0xc5)],'datasetName':_0x17714e[_0x53d24c(0xbe)],'error':_0x15a224,'progress':_0x53cd46+'/'+_0x4f3a16}),_0x4a2654['push']({'datasetCode':_0x17714e[_0x53d24c(0xc5)],'datasetName':_0x17714e[_0x53d24c(0xbe)],'filePath':'','success':![],'error':_0x15a224}),_0x53cd46<_0x4f3a16&&(console['log'](_0x53d24c(0xc2)),await delay(0xbb8));}}return _0x4a2654;}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x408aaf,_0x288b75){const _0x25d733=a1_0x1d2b,_0x309861=_0x408aaf();while(!![]){try{const _0x164acb=-parseInt(_0x25d733(0xf3))/0x1+-parseInt(_0x25d733(0x108))/0x2*(-parseInt(_0x25d733(0x101))/0x3)+parseInt(_0x25d733(0x109))/0x4+-parseInt(_0x25d733(0xfb))/0x5*(-parseInt(_0x25d733(0x100))/0x6)+parseInt(_0x25d733(0xea))/0x7*(-parseInt(_0x25d733(0xf5))/0x8)+parseInt(_0x25d733(0xf0))/0x9*(parseInt(_0x25d733(0x102))/0xa)+-parseInt(_0x25d733(0xf4))/0xb*(-parseInt(_0x25d733(0xec))/0xc);if(_0x164acb===_0x288b75)break;else _0x309861['push'](_0x309861['shift']());}catch(_0x16cee1){_0x309861['push'](_0x309861['shift']());}}}(a1_0x2915,0x6e7b9));import a1_0x283277 from'node:path';import{CliErrors}from'../errors.js';export function normalizeApiDir(_0xd795f2,_0xaa8d83=process['cwd']()){const _0x1774ed=a1_0x1d2b;return a1_0x283277[_0x1774ed(0xee)](_0xaa8d83,_0xd795f2);}function normalizedApiGroup(_0x53bc8f){const _0xe81ccd=a1_0x1d2b,_0x38796d=_0x53bc8f?.[_0xe81ccd(0xff)]();return _0x38796d||undefined;}function a1_0x1d2b(_0x4896a0,_0x3d61f8){_0x4896a0=_0x4896a0-0xea;const _0x291515=a1_0x2915();let _0x1d2bb2=_0x291515[_0x4896a0];return _0x1d2bb2;}export function resolveApiProfileLayouts(_0x25e6e4,_0x3c7f6b,_0x59f46d=process['cwd']()){const _0x5d0b74=a1_0x1d2b,_0x53b86d=_0x25e6e4[_0x5d0b74(0x10b)](_0x37a2f9=>{const _0x4b7990=_0x5d0b74,_0x56b29e=_0x3c7f6b(_0x37a2f9);return{'app':_0x37a2f9,'outputDir':_0x56b29e,'normalizedApiDir':normalizeApiDir(_0x56b29e,_0x59f46d),'apiGroup':normalizedApiGroup(_0x37a2f9[_0x4b7990(0x103)])};}),_0x5406d0=new Map();for(const _0x1cd2bf of _0x53b86d){if(!_0x1cd2bf[_0x5d0b74(0x103)])continue;const _0x489614=_0x5406d0[_0x5d0b74(0x105)](_0x1cd2bf[_0x5d0b74(0x103)])??new Set();_0x489614[_0x5d0b74(0x10a)](_0x1cd2bf['normalizedApiDir']),_0x5406d0[_0x5d0b74(0xf9)](_0x1cd2bf['apiGroup'],_0x489614);}for(const [_0x2c2737,_0xfec7b3]of _0x5406d0){if(_0xfec7b3[_0x5d0b74(0xeb)]>0x1)throw CliErrors[_0x5d0b74(0xf1)](_0x5d0b74(0xf2)+_0x2c2737+'\x22\x20resolves\x20to\x20multiple\x20API\x20directories.',_0x5d0b74(0xfc));}const _0x1a24ed=new Map();for(const _0x5a3c85 of _0x53b86d){const _0x21093a=_0x1a24ed[_0x5d0b74(0x105)](_0x5a3c85[_0x5d0b74(0xf6)])??[];_0x21093a['push'](_0x5a3c85),_0x1a24ed[_0x5d0b74(0xf9)](_0x5a3c85['normalizedApiDir'],_0x21093a);}for(const _0x30b182 of _0x1a24ed['values']()){const _0x3f33ff=new Set(_0x30b182[_0x5d0b74(0xf8)](_0x391201=>_0x391201[_0x5d0b74(0x103)]?[_0x391201[_0x5d0b74(0x103)]]:[]));if(_0x3f33ff[_0x5d0b74(0xeb)]===0x0)continue;if(_0x3f33ff['size']>0x1||_0x30b182[_0x5d0b74(0xfd)](_0xb8bc2=>!_0xb8bc2[_0x5d0b74(0x103)])){const _0x1b3e05=_0x30b182['map'](_0x4dca2c=>_0x4dca2c[_0x5d0b74(0xed)][_0x5d0b74(0xf7)])[_0x5d0b74(0xfa)](',\x20');throw CliErrors[_0x5d0b74(0xf1)]('API\x20directory\x20\x22'+_0x30b182[0x0][_0x5d0b74(0xfe)]+_0x5d0b74(0xef),'Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20'+_0x1b3e05+_0x5d0b74(0x104));}}return _0x53b86d;}function a1_0x2915(){const _0x715c41=['91sFwoQb','size','12ecqKTJ','app','resolve','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','9oRBIXX','validation','API\x20group\x20\x22','523929YWZDNX','3000866EgyECL','472712EfYuDE','normalizedApiDir','name','flatMap','set','join','10EySdsl','Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.','some','outputDir','trim','137382yPDKZY','72lYJAVz','4032830yVEUwk','apiGroup','.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.','get','length','filter','42694paTmSd','2041648EHUCpT','add','map'];a1_0x2915=function(){return _0x715c41;};return a1_0x2915();}export function getRegistryGroup(_0x29ce32,_0x38186e){const _0x10ad2b=a1_0x1d2b;if(_0x38186e[_0x10ad2b(0x103)])return _0x29ce32[_0x10ad2b(0x107)](_0x107286=>_0x107286[_0x10ad2b(0x103)]===_0x38186e[_0x10ad2b(0x103)]);const _0xc1761=_0x29ce32[_0x10ad2b(0x107)](_0x3e6f16=>_0x3e6f16['normalizedApiDir']===_0x38186e['normalizedApiDir']);return _0xc1761[_0x10ad2b(0x106)]===0x1?_0xc1761:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a2_0x6a49(_0x34dbdb,_0x18cbb6){_0x34dbdb=_0x34dbdb-0x7c;var _0x7c33b7=a2_0x7c33();var _0x6a4959=_0x7c33b7[_0x34dbdb];return _0x6a4959;}(function(_0x361ddc,_0x1df86f){var _0x1d3851=a2_0x6a49,_0x4209d1=_0x361ddc();while(!![]){try{var _0xefac5f=-parseInt(_0x1d3851(0x86))/0x1*(-parseInt(_0x1d3851(0x7e))/0x2)+parseInt(_0x1d3851(0x7c))/0x3*(parseInt(_0x1d3851(0x7f))/0x4)+-parseInt(_0x1d3851(0x7d))/0x5+-parseInt(_0x1d3851(0x83))/0x6*(parseInt(_0x1d3851(0x82))/0x7)+-parseInt(_0x1d3851(0x85))/0x8+parseInt(_0x1d3851(0x81))/0x9*(-parseInt(_0x1d3851(0x84))/0xa)+parseInt(_0x1d3851(0x80))/0xb;if(_0xefac5f===_0x1df86f)break;else _0x4209d1['push'](_0x4209d1['shift']());}catch(_0x337edd){_0x4209d1['push'](_0x4209d1['shift']());}}}(a2_0x7c33,0xcf738));export{fetchModelList}from'../core/api-client.js';function a2_0x7c33(){var _0x57b1e0=['18891lijsOg','4806669ZhncpG','12cPWMPE','8090TNUNcQ','1078824hsmAkL','89xTGhrh','4458WiIiQn','6439870AfzZex','22648KAXLXt','512DvzCxE','45605208HfLLWQ'];a2_0x7c33=function(){return _0x57b1e0;};return a2_0x7c33();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1fb998,_0x52e65a){const _0x1c5823=a3_0x349b,_0x3682e2=_0x1fb998();while(!![]){try{const _0x2172b1=-parseInt(_0x1c5823(0xb8))/0x1*(-parseInt(_0x1c5823(0xb4))/0x2)+-parseInt(_0x1c5823(0xe0))/0x3*(parseInt(_0x1c5823(0xd1))/0x4)+-parseInt(_0x1c5823(0xe7))/0x5+-parseInt(_0x1c5823(0xe2))/0x6*(parseInt(_0x1c5823(0xc5))/0x7)+parseInt(_0x1c5823(0xdc))/0x8+-parseInt(_0x1c5823(0xad))/0x9+parseInt(_0x1c5823(0xba))/0xa;if(_0x2172b1===_0x52e65a)break;else _0x3682e2['push'](_0x3682e2['shift']());}catch(_0x52ae2f){_0x3682e2['push'](_0x3682e2['shift']());}}}(a3_0x24f7,0x63ac4));import a3_0x23c28b from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';function a3_0x24f7(){const _0x1312f2=['modelRuntime','\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.','modelProfile','159606Lhmntn','length','2406IJczGf','path','test','scaffoldMode','action','1209260cFilXD','join','tableName','datasetCode','overwritten','missing','1205298wioBOM','success','preserved','typescript','runtimeDomain','default','includes','428wLElBx','key','replace','.ts','3736MnXGxp','api','4372190FzPCaO','CONFIG_NAMES.DEFAULT','toUpperCase','replaceApiContent','Please\x20configure\x20app\x20code\x20first\x20via\x20`',',\x20env:\x20','LOVRABET','LOVRABET_RUNTIME_DOMAIN','templates/generate-api','init-api','none','1449nGBSYR','-client','refreshed','name','defaultName',',\x20...LOVRABET_SDK_CONFIG\x20}','Model\x20facts\x20refreshed.','basename','map','format','{\x20apiConfigName:\x20','allowEmptyModelReplacement','48mlmGtE','../..','overwriteTypescript','created','utf8','stringify','API\x20scaffold\x20written.','resolve','client','dirname','alias','2149936VxCmjf'];a3_0x24f7=function(){return _0x1312f2;};return a3_0x24f7();}import a3_0x58e79c from'node:path';import{fileURLToPath}from'node:url';function a3_0x349b(_0x32bb77,_0x50422c){_0x32bb77=_0x32bb77-0xad;const _0x24f71f=a3_0x24f7();let _0x349bd8=_0x24f71f[_0x32bb77];return _0x349bd8;}import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';import{generateSdkConfigFile}from'../api/generate-sdk-config-file.js';import{MODEL_REGISTRY_FILE_NAME,MODEL_RUNTIME_FILE_NAME,updateModelRegistry}from'../api/model-registry-file.js';import{renderModelRegistryScaffold}from'../api/model-registry-scaffold.js';function fileAction(_0x326899,_0xb42992){const _0x31e092=a3_0x349b;if(!_0xb42992)return _0x326899?_0x31e092(0xaf):_0x31e092(0xec);return _0x326899?_0x31e092(0xeb):_0x31e092(0xd4);}export async function generateApiFile(_0x7a1e08,_0x2f7161,_0x5f5366,_0x1793a6,_0x21a052,_0x2e5d4d,_0x392fd5,_0x3b3e0a={},_0x3ea991={}){const _0x53eb52=a3_0x349b;if(!_0x5f5366)throw new Error(_0x53eb52(0xbe)+CLI_BIN_NAME+'\x20config\x20set\x20app\x20<value>`');const _0x46e62a=_0x1793a6&&!_0x392fd5,_0x36b182=!!_0x3ea991['modelProfile'],_0x2eb3e5=_0x36b182||_0x46e62a,_0x11355b=_0x392fd5||_0x5f5366,_0x2b8d73=_0x36b182||_0x46e62a?_0x53eb52(0xb2):_0x11355b,_0x36443c=_0x36b182||_0x46e62a?_0x53eb52(0xbb):JSON[_0x53eb52(0xd6)](_0x11355b),_0x1bae1a=!isProduction(_0x21a052),_0x25e14e=_0x1bae1a?_0x53eb52(0xbf)+JSON['stringify'](_0x21a052):'',_0x1d763c=_0x53eb52(0xcf)+_0x36443c+_0x25e14e+_0x53eb52(0xca),_0x4d6ca4=_0x36b182?'':_0x2f7161,_0x2162c7=_0x4d6ca4?_0x4d6ca4+'-api':_0x53eb52(0xb9),_0x28e821=_0x4d6ca4?_0x4d6ca4+_0x53eb52(0xc6):_0x53eb52(0xd9),_0x27fa8e=_0x4d6ca4&&!/^app-[a-f0-9]+$/i[_0x53eb52(0xe4)](_0x4d6ca4)?_0x4d6ca4['replace'](/-/g,'_')[_0x53eb52(0xbc)]():_0x53eb52(0xc0),_0x5607f1=/^\d/[_0x53eb52(0xe4)](_0x27fa8e)?'APP_'+_0x27fa8e:_0x27fa8e,_0x1242b1=_0x7a1e08[_0x53eb52(0xcd)](_0x2d2ec8=>({'datasetCode':_0x2d2ec8[_0x53eb52(0xea)],'tableName':_0x2d2ec8[_0x53eb52(0xe9)],'name':_0x2d2ec8['name']||'','alias':_0x2d2ec8[_0x53eb52(0xdb)]||_0x2d2ec8[_0x53eb52(0xb5)]})),_0x2779f5=fileURLToPath(import.meta.url),_0xffcaf6=a3_0x58e79c[_0x53eb52(0xd8)](a3_0x58e79c[_0x53eb52(0xda)](_0x2779f5),_0x53eb52(0xd2)),_0x1be91f=a3_0x58e79c[_0x53eb52(0xe8)](_0xffcaf6,_0x53eb52(0xc2)),_0x44aad4=a3_0x58e79c['join'](_0x1be91f,'api.ts.tpl'),_0x499cc2=a3_0x58e79c[_0x53eb52(0xe8)](_0x1be91f,'client.ts.tpl'),_0x59c1d7=_0x2e5d4d;mkdirSync(_0x59c1d7,{'recursive':!![]});const _0x39b150=_0x36b182?{}:_0x3b3e0a,_0x5495ae=await generateSdkConfigFile(_0x59c1d7,_0x39b150,_0x4d6ca4),_0x44143f=a3_0x58e79c[_0x53eb52(0xcc)](_0x5495ae,'.ts'),_0x3abc51=a3_0x58e79c[_0x53eb52(0xe8)](_0x59c1d7,_0x2162c7+'.ts'),_0x5568b2=a3_0x58e79c[_0x53eb52(0xe8)](_0x59c1d7,_0x28e821+_0x53eb52(0xb7)),_0x3ad0dc=_0x3ea991[_0x53eb52(0xd3)]===!![],_0x107d65=existsSync(_0x3abc51),_0x5e880b=existsSync(_0x5568b2),_0xb4fd83=_0x3ea991[_0x53eb52(0xe5)]??(_0x3ad0dc?_0x53eb52(0xb6):'missing'),_0xa7ec0a=_0xb4fd83===_0x53eb52(0xb6)||_0xb4fd83===_0x53eb52(0xec)&&!_0x107d65,_0x225987=_0xb4fd83===_0x53eb52(0xb6)||_0xb4fd83===_0x53eb52(0xec)&&!_0x5e880b,_0x1feb96=_0x3ea991['modelProfile']?updateModelRegistry({'outputDir':_0x59c1d7,'profileName':_0x3ea991[_0x53eb52(0xdf)][_0x53eb52(0xc8)],'defaultProfile':_0x3ea991[_0x53eb52(0xdf)][_0x53eb52(0xc9)],'appCode':_0x5f5366,'runtimeDomain':_0x3ea991[_0x53eb52(0xdf)][_0x53eb52(0xb1)],'models':_0x1242b1,'allowEmptyReplacement':_0x3ea991[_0x53eb52(0xd0)]===!![]}):undefined,_0x410f46=_0x1feb96?a3_0x58e79c[_0x53eb52(0xe8)](_0x59c1d7,MODEL_RUNTIME_FILE_NAME):undefined,_0x16c86b=_0x410f46?existsSync(_0x410f46):![],_0x2a206e=_0x36b182&&_0xb4fd83!==_0x53eb52(0xc4)?await renderModelRegistryScaffold(_0x59c1d7):undefined;_0x410f46&&_0x2a206e&&writeFileSync(_0x410f46,_0x2a206e[_0x53eb52(0xdd)],'utf8');const _0x1b917f=_0x1242b1[0x0]?.[_0x53eb52(0xdb)];if(_0xa7ec0a){const _0x477340=_0x2a206e?.[_0x53eb52(0xb9)]??readFileSync(_0x44aad4,'utf8'),_0x2dc5fa=_0x36b182?_0x477340:TemplateReplacer[_0x53eb52(0xbd)](_0x477340,_0x5f5366,_0x1242b1,_0x1b917f,_0x2162c7,_0x36443c,undefined,_0x5607f1);writeFileSync(_0x3abc51,await a3_0x23c28b[_0x53eb52(0xce)](_0x2dc5fa,{'parser':_0x53eb52(0xb0)}),{'encoding':'utf8'});}if(_0x225987){const _0x8b9cab=_0x2a206e?.[_0x53eb52(0xd9)]??readFileSync(_0x499cc2,_0x53eb52(0xd5)),_0x560e8b=_0x36b182?_0x8b9cab:TemplateReplacer[_0x53eb52(0xbd)](_0x8b9cab,_0x5f5366,_0x1242b1,_0x1b917f,_0x2162c7,_0x36443c,_0x1d763c,_0x5607f1,_0x44143f);writeFileSync(_0x5568b2,await a3_0x23c28b[_0x53eb52(0xce)](_0x560e8b,{'parser':_0x53eb52(0xb0)}),{'encoding':_0x53eb52(0xd5)});}const _0x5b7068=_0x1242b1[_0x53eb52(0xe1)],_0x206cf9={'api':{'path':_0x3abc51,'action':fileAction(_0x107d65,_0xa7ec0a)},'client':{'path':_0x5568b2,'action':fileAction(_0x5e880b,_0x225987)},'sdkConfig':{'path':_0x5495ae,'action':_0x53eb52(0xc7)},..._0x1feb96?{'modelRegistry':{'path':_0x1feb96[_0x53eb52(0xe3)],'action':_0x1feb96['existed']?_0x53eb52(0xc7):_0x53eb52(0xd4)},'modelRuntime':{'path':_0x410f46,'action':_0x2a206e?_0x16c86b?'refreshed':_0x53eb52(0xd4):_0x16c86b?'preserved':'missing'}}:{}},_0x97cbfe=existsSync(_0x3abc51)&&readFileSync(_0x3abc51,_0x53eb52(0xd5))[_0x53eb52(0xb3)](MODEL_REGISTRY_FILE_NAME[_0x53eb52(0xb6)]('.ts','')),_0x36ed29=existsSync(_0x5568b2)&&readFileSync(_0x5568b2,_0x53eb52(0xd5))[_0x53eb52(0xb3)](_0x53eb52(0xc1)),_0x49357a=_0x36b182?!_0x97cbfe||!_0x36ed29||!existsSync(_0x410f46):![],_0xcc029c=_0x36b182?_0x49357a:_0x206cf9[_0x53eb52(0xb9)][_0x53eb52(0xe6)]==='preserved'||_0x206cf9[_0x53eb52(0xd9)]['action']==='preserved';return logger[_0x53eb52(0xae)](_0x53eb52(0xc3),_0xcc029c?a3_0x58e79c['basename'](_0x5495ae)+_0x53eb52(0xde):_0x36b182?_0x53eb52(0xcb):_0x53eb52(0xd7),undefined,{'apiFile':_0x3abc51,'clientFile':_0x5568b2,'sdkConfig':_0x5495ae,'modelCount':_0x5b7068,'configName':_0x2b8d73,'isDefaultConfig':_0x2eb3e5,'needsAgentMerge':_0xcc029c,'needsProjectUpgrade':_0x49357a,'files':_0x206cf9}),{'appCode':_0x5f5366,'modelCount':_0x5b7068,'models':_0x1242b1,'apiFilePath':_0x3abc51,'clientFilePath':_0x5568b2,'sdkConfigPath':_0x5495ae,'modelRegistryPath':_0x1feb96?.[_0x53eb52(0xe3)],'modelRuntimePath':_0x410f46,'modelProfile':_0x3ea991[_0x53eb52(0xdf)]?.[_0x53eb52(0xc8)],'configName':_0x2b8d73,'isDefaultConfig':_0x2eb3e5,'sdkRouting':_0x39b150,'files':_0x206cf9,'needsAgentMerge':_0xcc029c,'needsProjectUpgrade':_0x49357a};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a4_0x2f62(){const _0xbb42a9=['runtimeDomain','length',',\x0a}','2fWbelZ','4315926Ygbqpu','-sdk-config.ts','76174AkkJiM','typescript','join','{\x0a\x20\x20','412597kavlWR','sdk-config.ts','format','2195838fvpyOl','\x20as\x20const;\x0a','270ujYMLY','156oBRWNt','242640SGLMre','35400qjgCvc','2431NcYKFq','utf8','runtimeDomain:\x20','/**\x0a\x20*\x20Lovrabet\x20SDK\x20runtime\x20routing.\x0a\x20*\x20Generated\x20by\x20Rabetbase\x20CLI.\x20Do\x20not\x20add\x20credentials\x20to\x20this\x20file.\x0a\x20*/\x0aexport\x20const\x20LOVRABET_SDK_CONFIG\x20=\x20','472QJIEMt','stringify'];a4_0x2f62=function(){return _0xbb42a9;};return a4_0x2f62();}const a4_0x162222=a4_0x34a3;function a4_0x34a3(_0x21115d,_0x37c1cb){_0x21115d=_0x21115d-0x1dd;const _0x2f62aa=a4_0x2f62();let _0x34a3e1=_0x2f62aa[_0x21115d];return _0x34a3e1;}(function(_0x37e9e5,_0x51a877){const _0x412266=a4_0x34a3,_0xe452ab=_0x37e9e5();while(!![]){try{const _0x71f7f3=parseInt(_0x412266(0x1f3))/0x1*(-parseInt(_0x412266(0x1ec))/0x2)+parseInt(_0x412266(0x1e0))/0x3*(-parseInt(_0x412266(0x1e2))/0x4)+parseInt(_0x412266(0x1e1))/0x5+parseInt(_0x412266(0x1ed))/0x6+-parseInt(_0x412266(0x1ef))/0x7*(-parseInt(_0x412266(0x1e7))/0x8)+parseInt(_0x412266(0x1dd))/0x9+-parseInt(_0x412266(0x1df))/0xa*(-parseInt(_0x412266(0x1e3))/0xb);if(_0x71f7f3===_0x51a877)break;else _0xe452ab['push'](_0xe452ab['shift']());}catch(_0x3655dc){_0xe452ab['push'](_0xe452ab['shift']());}}}(a4_0x2f62,0xc025f));import{mkdirSync,writeFileSync}from'node:fs';import a4_0x28a729 from'node:path';import a4_0x23a2e8 from'prettier';export const SDK_CONFIG_FILE_NAME=a4_0x162222(0x1f4);export function getSdkConfigFileName(_0x3c7b09=''){const _0x31af59=a4_0x162222;return _0x3c7b09?_0x3c7b09+_0x31af59(0x1ee):SDK_CONFIG_FILE_NAME;}export async function generateSdkConfigFile(_0x3428e6,_0x3e57c3={},_0x4d3550=''){const _0x4764fd=a4_0x162222,_0x44a54=[];_0x3e57c3[_0x4764fd(0x1e9)]&&_0x44a54['push'](_0x4764fd(0x1e5)+JSON[_0x4764fd(0x1e8)](_0x3e57c3[_0x4764fd(0x1e9)]));const _0x1954f3=_0x44a54[_0x4764fd(0x1ea)]>0x0?_0x4764fd(0x1f2)+_0x44a54[_0x4764fd(0x1f1)](',\x0a\x20\x20')+_0x4764fd(0x1eb):'{}',_0x2c55b1=_0x4764fd(0x1e6)+_0x1954f3+_0x4764fd(0x1de);mkdirSync(_0x3428e6,{'recursive':!![]});const _0x58150c=a4_0x28a729[_0x4764fd(0x1f1)](_0x3428e6,getSdkConfigFileName(_0x4d3550));return writeFileSync(_0x58150c,await a4_0x23a2e8[_0x4764fd(0x1f5)](_0x2c55b1,{'parser':_0x4764fd(0x1f0)}),_0x4764fd(0x1e4)),_0x58150c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x376085,_0x7c43bd){const _0x1f696a=a5_0xca39,_0xb263fc=_0x376085();while(!![]){try{const _0x1b29d8=parseInt(_0x1f696a(0x15d))/0x1+-parseInt(_0x1f696a(0x14e))/0x2*(-parseInt(_0x1f696a(0x14a))/0x3)+-parseInt(_0x1f696a(0x15f))/0x4*(parseInt(_0x1f696a(0x14c))/0x5)+-parseInt(_0x1f696a(0x15e))/0x6+parseInt(_0x1f696a(0x14f))/0x7+parseInt(_0x1f696a(0x159))/0x8+parseInt(_0x1f696a(0x157))/0x9*(parseInt(_0x1f696a(0x150))/0xa);if(_0x1b29d8===_0x7c43bd)break;else _0xb263fc['push'](_0xb263fc['shift']());}catch(_0x55d190){_0xb263fc['push'](_0xb263fc['shift']());}}}(a5_0x5495,0x4c688));function a5_0xca39(_0x330ee8,_0x581827){_0x330ee8=_0x330ee8-0x14a;const _0x5495d8=a5_0x5495();let _0xca3998=_0x5495d8[_0x330ee8];return _0xca3998;}function a5_0x5495(){const _0x2b7a2e=['some','endsWith','6QenIRn','@lovrabet/sdk','165XDnGlw','matchAll','227578RRyhuX','591122XLvXMS','1171610aTbWGe','match','MODELS_CONFIG','push','lovrabetClient','APP_CODE','length','9mQRegR','Generated\x20by\x20Rabetbase\x20CLI','3365536aJVCkj','exec','includes','map','131448fWZdeE','1926786anSJyw','42088KXqCmt','registerModels'];a5_0x5495=function(){return _0x2b7a2e;};return a5_0x5495();}export function parseLegacyApiModels(_0x4d901a){const _0x48194e=a5_0xca39,_0x189377=[],_0x433346=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x3002ec;while((_0x3002ec=_0x433346[_0x48194e(0x15a)](_0x4d901a))!==null){_0x189377[_0x48194e(0x153)]({'datasetCode':_0x3002ec[0x1],'tableName':_0x3002ec[0x2],'name':_0x3002ec[0x3],'alias':_0x3002ec[0x4]});}return _0x189377;}export function parseLegacyApiAppCode(_0x5350b3){const _0x2f5804=a5_0xca39;return _0x5350b3[_0x2f5804(0x151)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function stripComments(_0x3e187d){return _0x3e187d['replace'](/\/\*[\s\S]*?\*\//g,'')['replace'](/\/\/.*$/gm,'');}export function isLegacyGeneratedApiScaffold(_0x1cb373){const _0x4f3c46=a5_0xca39;if(!_0x1cb373[_0x4f3c46(0x15b)](_0x4f3c46(0x158)))return![];const _0x20e110=stripComments(_0x1cb373),_0x5c53bb=[..._0x20e110['matchAll'](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)][_0x4f3c46(0x15c)](_0x37ee2d=>_0x37ee2d[0x1]);if(_0x5c53bb['length']!==0x1||_0x5c53bb[0x0]!==_0x4f3c46(0x14b))return![];const _0x2b3916=[..._0x20e110[_0x4f3c46(0x14d)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x4f3c46(0x15c)](_0x39ed75=>_0x39ed75[0x1]);if(_0x2b3916[_0x4f3c46(0x156)]!==0x2||!_0x2b3916[_0x4f3c46(0x161)](_0x365f9e=>_0x365f9e[_0x4f3c46(0x162)](_0x4f3c46(0x155)))||!_0x2b3916['some'](_0x23a1d6=>_0x23a1d6[_0x4f3c46(0x162)](_0x4f3c46(0x152))))return![];const _0x9d794b=[..._0x20e110[_0x4f3c46(0x14d)](/^([A-Za-z_$][\w$]*)\s*\(/gm)][_0x4f3c46(0x15c)](_0x25c480=>_0x25c480[0x1]);return _0x9d794b[_0x4f3c46(0x156)]===0x1&&_0x9d794b[0x0]===_0x4f3c46(0x160);}export function isLegacyGeneratedClientScaffold(_0x2b8180){const _0x5eea48=a5_0xca39;if(!_0x2b8180[_0x5eea48(0x15b)](_0x5eea48(0x158)))return![];const _0x4383a5=stripComments(_0x2b8180),_0x53eab8=[..._0x4383a5['matchAll'](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)]['map'](_0x5d2a8c=>_0x5d2a8c[0x1]);if(_0x53eab8['some'](_0x2085c1=>_0x2085c1!==_0x5eea48(0x14b)&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/['test'](_0x2085c1??'')))return![];const _0x196aed=[..._0x4383a5[_0x5eea48(0x14d)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x5eea48(0x15c)](_0x458168=>_0x458168[0x1]);return _0x196aed['length']===0x1&&_0x196aed[0x0]===_0x5eea48(0x154);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x412794=a6_0x397a;(function(_0x29ba55,_0x3b6b2f){const _0x4968c0=a6_0x397a,_0x4da6dd=_0x29ba55();while(!![]){try{const _0x30607=parseInt(_0x4968c0(0x12d))/0x1+-parseInt(_0x4968c0(0x113))/0x2+parseInt(_0x4968c0(0x14e))/0x3+parseInt(_0x4968c0(0x11c))/0x4*(-parseInt(_0x4968c0(0x107))/0x5)+-parseInt(_0x4968c0(0x122))/0x6+-parseInt(_0x4968c0(0x146))/0x7+parseInt(_0x4968c0(0x13d))/0x8;if(_0x30607===_0x3b6b2f)break;else _0x4da6dd['push'](_0x4da6dd['shift']());}catch(_0x3686b7){_0x4da6dd['push'](_0x4da6dd['shift']());}}}(a6_0x262c,0x669b1));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x27d1b8 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x412794(0x14c);export const MODEL_RUNTIME_FILE_NAME='model-runtime.ts';export const MODEL_REGISTRY_VERSION_MARKER=a6_0x412794(0x12e);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x412794(0x13a),REGISTRY_START=a6_0x412794(0x140),REGISTRY_END=a6_0x412794(0x10a);function emptyRegistry(_0x6d8743){return{'defaultProfile':_0x6d8743,'profiles':{},'models':[]};}function extractRegistryJson(_0xd2409){const _0x408281=a6_0x412794,_0x310f25=_0xd2409[_0x408281(0x110)](REGISTRY_START),_0x5999fb=_0xd2409[_0x408281(0x110)](REGISTRY_END);if(_0x310f25<0x0||_0x5999fb<=_0x310f25)return undefined;return _0xd2409[_0x408281(0x148)](_0x310f25+REGISTRY_START[_0x408281(0x132)],_0x5999fb)[_0x408281(0x145)]()['replace'](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x408281(0x12c)](/;$/,'');}function migrateLegacyRegistry(_0x3f9225){const _0x57b0d5=a6_0x412794,_0x266bbc=emptyRegistry(_0x3f9225[_0x57b0d5(0x10d)]);for(const [_0x53c2e4,_0x526107]of Object[_0x57b0d5(0x124)](_0x3f9225[_0x57b0d5(0x143)])){_0x266bbc[_0x57b0d5(0x143)][_0x53c2e4]={'appCode':_0x526107[_0x57b0d5(0x125)],'runtimeDomain':_0x526107[_0x57b0d5(0x14a)]},mergeProfileModels(_0x266bbc,_0x53c2e4,_0x526107['models']);}return _0x266bbc;}function generatedObjectLiteralToJson(_0x1c4e91){const _0x3eb8f5=a6_0x412794;let _0x137ee9='',_0x82d402,_0x5c7ca1=![],_0x2ff1be;for(let _0x50c31f=0x0;_0x50c31f<_0x1c4e91[_0x3eb8f5(0x132)];_0x50c31f++){const _0xc433ee=_0x1c4e91[_0x50c31f];if(_0x82d402){_0x137ee9+=_0xc433ee;if(_0x5c7ca1)_0x5c7ca1=![];else{if(_0xc433ee==='\x5c')_0x5c7ca1=!![];else{if(_0xc433ee===_0x82d402)_0x82d402=undefined;}}continue;}if(_0xc433ee==='\x22'){_0x82d402=_0xc433ee,_0x137ee9+=_0xc433ee,_0x2ff1be=_0x3eb8f5(0x129);continue;}if(_0xc433ee===','){let _0x3c09fa=_0x50c31f+0x1;while(/\s/[_0x3eb8f5(0x109)](_0x1c4e91[_0x3c09fa]??''))_0x3c09fa++;if(_0x1c4e91[_0x3c09fa]==='}'||_0x1c4e91[_0x3c09fa]===']')continue;_0x137ee9+=_0xc433ee,_0x2ff1be=',';continue;}if(_0xc433ee==='{'||_0xc433ee==='['){_0x137ee9+=_0xc433ee,_0x2ff1be=_0xc433ee;continue;}if(_0xc433ee==='}'||_0xc433ee===']'){_0x137ee9+=_0xc433ee,_0x2ff1be=_0xc433ee;continue;}if((_0x2ff1be==='{'||_0x2ff1be===',')&&/[A-Za-z_$]/['test'](_0xc433ee)){let _0x174ae5=_0x50c31f+0x1;while(/[A-Za-z0-9_$]/[_0x3eb8f5(0x109)](_0x1c4e91[_0x174ae5]??''))_0x174ae5++;let _0x95d515=_0x174ae5;while(/\s/['test'](_0x1c4e91[_0x95d515]??''))_0x95d515++;if(_0x1c4e91[_0x95d515]===':'){_0x137ee9+=JSON[_0x3eb8f5(0x12f)](_0x1c4e91['slice'](_0x50c31f,_0x174ae5)),_0x50c31f=_0x174ae5-0x1,_0x2ff1be=_0x3eb8f5(0x13b);continue;}}_0x137ee9+=_0xc433ee;if(!/\s/[_0x3eb8f5(0x109)](_0xc433ee)&&_0xc433ee!==':')_0x2ff1be='value';}return _0x137ee9;}function parseGeneratedRegistryJson(_0x1e3609){const _0x5f2d5e=a6_0x412794;try{return JSON[_0x5f2d5e(0x115)](_0x1e3609);}catch{return JSON['parse'](generatedObjectLiteralToJson(_0x1e3609));}}function normalizeModelEntries(_0x3c9060,_0x4ebb79){const _0x32be1c=a6_0x412794,_0xb3fbc2=Object['keys'](_0x3c9060),_0x77abf7=[];for(const _0x3c1e04 of _0x4ebb79){if(!_0x3c1e04||typeof _0x3c1e04!==_0x32be1c(0x147)||Array[_0x32be1c(0x11d)](_0x3c1e04))return undefined;const _0x3ed70f=_0x3c1e04;if(typeof _0x3ed70f[_0x32be1c(0x112)]!==_0x32be1c(0x10f)||typeof _0x3ed70f[_0x32be1c(0x14f)]!=='string'||typeof _0x3ed70f[_0x32be1c(0x119)]!==_0x32be1c(0x10f))return undefined;let _0x51b8a3;if(typeof _0x3ed70f['datasetCode']==='string'&&_0x3ed70f[_0x32be1c(0x118)]===undefined)_0x51b8a3=Object['fromEntries'](_0xb3fbc2[_0x32be1c(0x108)](_0x4a03d3=>[_0x4a03d3,_0x3ed70f['datasetCode']]));else{if(_0x3ed70f[_0x32be1c(0x139)]===undefined&&_0x3ed70f[_0x32be1c(0x118)]&&typeof _0x3ed70f[_0x32be1c(0x118)]===_0x32be1c(0x147)&&!Array[_0x32be1c(0x11d)](_0x3ed70f[_0x32be1c(0x118)])&&Object[_0x32be1c(0x137)](_0x3ed70f[_0x32be1c(0x118)])[_0x32be1c(0x133)](_0x2d87f1=>typeof _0x2d87f1==='string'))_0x51b8a3={..._0x3ed70f[_0x32be1c(0x118)]};else return undefined;}_0x77abf7['push']({'alias':_0x3ed70f[_0x32be1c(0x112)],'tableName':_0x3ed70f['tableName'],'name':_0x3ed70f[_0x32be1c(0x119)],'datasetCodes':_0x51b8a3});}return _0x77abf7;}function a6_0x262c(){const _0x3d2e48=['596829xhWzIm','tableName','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','8185tAwEFu','map','test','/*\x20rabetbase-model-registry:end\x20*/','\x22\x20maps\x20to\x20alias\x20\x22','find','defaultProfile','.tmp','string','indexOf','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','alias','1144598OJLHRe','utf8','parse','protocol','/**\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','datasetCodes','name','now','profileName','740mOixTx','isArray','models','\x20model(s)\x20in\x20profile\x20\x22','Model\x20alias\x20\x22','includes','1642992hyWBtP','join','entries','appCode','lovrabet-model-registry/v1','get','set','value','filter','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','replace','482717jiKgOT','/*\x20rabetbase-model-registry:v2\x20*/','stringify','\x22\x20in\x20the\x20registry\x20but\x20\x22','pid','length','every','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','NOT-SET','\x22\x20maps\x20to\x20both\x20\x22','values','allowEmptyReplacement','datasetCode','lovrabet-model-registry/v2','key','Table\x20\x22','8130176CYxhyw','outputDir','\x22\x20and\x20\x22','/*\x20rabetbase-model-registry:start\x20*/','flatMap','\x22\x20in\x20profile\x20\x22','profiles','Refusing\x20to\x20replace\x20','trim','900781YSxutX','object','slice','\x22\x20maps\x20to\x20table\x20\x22','runtimeDomain','keys','models.generated.ts','push'];a6_0x262c=function(){return _0x3d2e48;};return a6_0x262c();}export function parseModelRegistry(_0x25e3f5){const _0x46f766=a6_0x412794,_0x38c917=extractRegistryJson(_0x25e3f5);if(!_0x38c917)return undefined;try{const _0x3602b7=parseGeneratedRegistryJson(_0x38c917);if(typeof _0x3602b7['defaultProfile']!=='string'||!_0x3602b7[_0x46f766(0x143)]||typeof _0x3602b7[_0x46f766(0x143)]!==_0x46f766(0x147))return undefined;if(_0x3602b7[_0x46f766(0x116)]===_0x46f766(0x126))return migrateLegacyRegistry(_0x3602b7);if(!(_0x3602b7[_0x46f766(0x116)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x3602b7['protocol']===undefined&&_0x25e3f5[_0x46f766(0x121)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x46f766(0x11d)](_0x3602b7[_0x46f766(0x11e)]))return undefined;const _0x2181ce=_0x3602b7[_0x46f766(0x143)],_0x263cb9=normalizeModelEntries(_0x2181ce,_0x3602b7[_0x46f766(0x11e)]);if(!_0x263cb9)return undefined;return{'defaultProfile':_0x3602b7['defaultProfile'],'profiles':_0x2181ce,'models':_0x263cb9};}catch{return undefined;}}export function readModelRegistry(_0x1445da){const _0x342b68=a6_0x412794;if(!existsSync(_0x1445da))return undefined;try{return parseModelRegistry(readFileSync(_0x1445da,_0x342b68(0x114)));}catch{return undefined;}}function registrySource(_0x346f78){const _0x68d5d3=a6_0x412794,_0x127312=Object[_0x68d5d3(0x14b)](_0x346f78[_0x68d5d3(0x143)]),_0x55f025=_0x346f78['models'][_0x68d5d3(0x108)](_0x3e587a=>{const _0x2a214d=_0x68d5d3,_0x5e35d2=_0x127312['map'](_0x458c90=>_0x3e587a[_0x2a214d(0x118)][_0x458c90]),_0x144311=_0x5e35d2[0x0],_0x6ebda0=_0x144311!==undefined&&_0x5e35d2[_0x2a214d(0x133)](_0x4785f7=>_0x4785f7===_0x144311),_0x371bf7={'alias':_0x3e587a[_0x2a214d(0x112)],'tableName':_0x3e587a[_0x2a214d(0x14f)],'name':_0x3e587a[_0x2a214d(0x119)]};return _0x6ebda0?{..._0x371bf7,'datasetCode':_0x144311}:{..._0x371bf7,'datasetCodes':_0x3e587a[_0x2a214d(0x118)]};}),_0x4850d1=JSON[_0x68d5d3(0x12f)]({'defaultProfile':_0x346f78['defaultProfile'],'profiles':_0x346f78[_0x68d5d3(0x143)],'models':_0x55f025},null,0x2)['split']('\x0a')['map'](_0x2eeb9c=>'\x20\x20'+_0x2eeb9c)['join']('\x0a');return _0x68d5d3(0x117)+MODEL_REGISTRY_VERSION_MARKER+'\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20'+REGISTRY_START+'\x0a'+_0x4850d1+_0x68d5d3(0x134)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x32fdb5,_0x3e59d2,_0x5855f0){const _0x6c1340=a6_0x412794,_0x21afba=_0x5855f0[_0x6c1340(0x108)](_0xaac886=>({..._0xaac886,'alias':_0xaac886[_0x6c1340(0x112)]||_0xaac886[_0x6c1340(0x14f)]})),_0x418a0b=new Map(),_0x2b9bed=new Map();for(const _0x4d10bc of _0x21afba){const _0x1d62c6=_0x418a0b['get'](_0x4d10bc['alias']);if(_0x1d62c6&&_0x1d62c6!==_0x4d10bc[_0x6c1340(0x14f)])throw new Error('Model\x20alias\x20\x22'+_0x4d10bc[_0x6c1340(0x112)]+_0x6c1340(0x136)+_0x1d62c6+_0x6c1340(0x13f)+_0x4d10bc[_0x6c1340(0x14f)]+'\x22\x20in\x20profile\x20\x22'+_0x3e59d2+'\x22.');const _0x165031=_0x2b9bed[_0x6c1340(0x127)](_0x4d10bc['tableName']);if(_0x165031&&_0x165031!==_0x4d10bc['alias'])throw new Error('Table\x20\x22'+_0x4d10bc[_0x6c1340(0x14f)]+_0x6c1340(0x150)+_0x165031+_0x6c1340(0x13f)+_0x4d10bc[_0x6c1340(0x112)]+_0x6c1340(0x142)+_0x3e59d2+'\x22.');_0x418a0b[_0x6c1340(0x128)](_0x4d10bc[_0x6c1340(0x112)],_0x4d10bc[_0x6c1340(0x14f)]),_0x2b9bed[_0x6c1340(0x128)](_0x4d10bc[_0x6c1340(0x14f)],_0x4d10bc[_0x6c1340(0x112)]);const _0x2dbced=_0x32fdb5['models'][_0x6c1340(0x10c)](_0x2fd3a5=>_0x2fd3a5[_0x6c1340(0x112)]===_0x4d10bc[_0x6c1340(0x112)]);if(_0x2dbced&&_0x2dbced[_0x6c1340(0x14f)]!==_0x4d10bc[_0x6c1340(0x14f)])throw new Error(_0x6c1340(0x120)+_0x4d10bc[_0x6c1340(0x112)]+_0x6c1340(0x149)+_0x2dbced[_0x6c1340(0x14f)]+_0x6c1340(0x130)+_0x4d10bc[_0x6c1340(0x14f)]+_0x6c1340(0x142)+_0x3e59d2+'\x22.');const _0x28f7d1=_0x32fdb5[_0x6c1340(0x11e)][_0x6c1340(0x10c)](_0x1167b3=>_0x1167b3['tableName']===_0x4d10bc[_0x6c1340(0x14f)]);if(_0x28f7d1&&_0x28f7d1['alias']!==_0x4d10bc[_0x6c1340(0x112)])throw new Error(_0x6c1340(0x13c)+_0x4d10bc[_0x6c1340(0x14f)]+_0x6c1340(0x10b)+_0x28f7d1[_0x6c1340(0x112)]+_0x6c1340(0x130)+_0x4d10bc['alias']+'\x22\x20in\x20profile\x20\x22'+_0x3e59d2+'\x22.');}for(const _0x4d094f of _0x32fdb5[_0x6c1340(0x11e)]){delete _0x4d094f['datasetCodes'][_0x3e59d2];}for(const _0x4e767f of _0x21afba){let _0x4e48d7=_0x32fdb5[_0x6c1340(0x11e)][_0x6c1340(0x10c)](_0x238f2c=>_0x238f2c[_0x6c1340(0x112)]===_0x4e767f['alias']);!_0x4e48d7&&(_0x4e48d7={'alias':_0x4e767f['alias'],'tableName':_0x4e767f[_0x6c1340(0x14f)],'name':_0x4e767f[_0x6c1340(0x119)],'datasetCodes':{}},_0x32fdb5['models'][_0x6c1340(0x14d)](_0x4e48d7)),(_0x3e59d2===_0x32fdb5[_0x6c1340(0x10d)]||!_0x4e48d7['datasetCodes'][_0x32fdb5['defaultProfile']])&&(_0x4e48d7[_0x6c1340(0x112)]=_0x4e767f[_0x6c1340(0x112)],_0x4e48d7[_0x6c1340(0x14f)]=_0x4e767f[_0x6c1340(0x14f)],_0x4e48d7['name']=_0x4e767f[_0x6c1340(0x119)]),_0x4e48d7[_0x6c1340(0x118)][_0x3e59d2]=_0x4e767f[_0x6c1340(0x139)];}_0x32fdb5[_0x6c1340(0x11e)]=_0x32fdb5[_0x6c1340(0x11e)][_0x6c1340(0x12a)](_0xfa123c=>Object[_0x6c1340(0x14b)](_0xfa123c[_0x6c1340(0x118)])[_0x6c1340(0x132)]>0x0);}function a6_0x397a(_0xbebf70,_0x3f4c83){_0xbebf70=_0xbebf70-0x107;const _0x262c8d=a6_0x262c();let _0x397ae7=_0x262c8d[_0xbebf70];return _0x397ae7;}function removeUnboundProfiles(_0x40b3e6){const _0x797b20=a6_0x412794,_0x210085=Object['entries'](_0x40b3e6[_0x797b20(0x143)])[_0x797b20(0x12a)](([,_0x590933])=>_0x590933['appCode']===_0x797b20(0x135))['map'](([_0x4b31e4])=>_0x4b31e4);if(_0x210085[_0x797b20(0x132)]===0x0)return;for(const _0x2bea8c of _0x210085){delete _0x40b3e6[_0x797b20(0x143)][_0x2bea8c];for(const _0x57a494 of _0x40b3e6['models']){delete _0x57a494[_0x797b20(0x118)][_0x2bea8c];}}_0x40b3e6[_0x797b20(0x11e)]=_0x40b3e6[_0x797b20(0x11e)][_0x797b20(0x12a)](_0x5f381f=>Object[_0x797b20(0x14b)](_0x5f381f[_0x797b20(0x118)])[_0x797b20(0x132)]>0x0);}export function getProfileModels(_0x1cbcaf,_0x48ef0b){const _0xccad85=a6_0x412794;return _0x1cbcaf[_0xccad85(0x11e)][_0xccad85(0x141)](_0x4bd05b=>{const _0x10fd84=_0xccad85,_0x447ffd=_0x4bd05b[_0x10fd84(0x118)][_0x48ef0b];return _0x447ffd?[{'datasetCode':_0x447ffd,'tableName':_0x4bd05b[_0x10fd84(0x14f)],'name':_0x4bd05b['name'],'alias':_0x4bd05b['alias']}]:[];});}export function updateModelRegistry(_0x590b74){const _0x33eddc=a6_0x412794,_0xb1be8e=a6_0x27d1b8[_0x33eddc(0x123)](_0x590b74[_0x33eddc(0x13e)],MODEL_REGISTRY_FILE_NAME),_0x43218a=existsSync(_0xb1be8e),_0x182ccf=readModelRegistry(_0xb1be8e);if(_0x43218a&&!_0x182ccf)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x33eddc(0x12b));const _0x15fa0c=_0x182ccf??emptyRegistry(_0x590b74[_0x33eddc(0x10d)]);if(_0x590b74[_0x33eddc(0x125)]!==_0x33eddc(0x135))removeUnboundProfiles(_0x15fa0c);const _0x348305=_0x182ccf?getProfileModels(_0x182ccf,_0x590b74[_0x33eddc(0x11b)])[_0x33eddc(0x132)]:0x0;if(_0x348305>0x0&&_0x590b74['models'][_0x33eddc(0x132)]===0x0&&!_0x590b74[_0x33eddc(0x138)])throw new Error(_0x33eddc(0x144)+_0x348305+_0x33eddc(0x11f)+_0x590b74[_0x33eddc(0x11b)]+'\x22\x20with\x20an\x20empty\x20result.\x20'+_0x33eddc(0x111));_0x15fa0c[_0x33eddc(0x10d)]=_0x590b74[_0x33eddc(0x10d)],_0x15fa0c[_0x33eddc(0x143)][_0x590b74[_0x33eddc(0x11b)]]={'appCode':_0x590b74[_0x33eddc(0x125)],'runtimeDomain':_0x590b74['runtimeDomain']},mergeProfileModels(_0x15fa0c,_0x590b74[_0x33eddc(0x11b)],_0x590b74[_0x33eddc(0x11e)]),mkdirSync(_0x590b74[_0x33eddc(0x13e)],{'recursive':!![]});const _0x1f832e=_0xb1be8e+'.'+process[_0x33eddc(0x131)]+'.'+Date[_0x33eddc(0x11a)]()+_0x33eddc(0x10e);try{writeFileSync(_0x1f832e,registrySource(_0x15fa0c),{'encoding':_0x33eddc(0x114),'mode':0x1a4}),renameSync(_0x1f832e,_0xb1be8e);}catch(_0x17d7ac){try{unlinkSync(_0x1f832e);}catch{}throw _0x17d7ac;}return{'path':_0xb1be8e,'registry':_0x15fa0c,'existed':_0x43218a};}
|
|
1
|
+
function a6_0x2a7c(_0x333193,_0x3b6566){_0x333193=_0x333193-0xf4;const _0x3fe998=a6_0x3fe9();let _0x2a7cf9=_0x3fe998[_0x333193];return _0x2a7cf9;}const a6_0x1d4e3e=a6_0x2a7c;(function(_0x4ca7f0,_0x47842e){const _0x2e31e6=a6_0x2a7c,_0x274482=_0x4ca7f0();while(!![]){try{const _0x241670=parseInt(_0x2e31e6(0x127))/0x1+-parseInt(_0x2e31e6(0x113))/0x2*(parseInt(_0x2e31e6(0x126))/0x3)+parseInt(_0x2e31e6(0x119))/0x4+parseInt(_0x2e31e6(0xf5))/0x5*(-parseInt(_0x2e31e6(0xf8))/0x6)+parseInt(_0x2e31e6(0x117))/0x7+-parseInt(_0x2e31e6(0x13a))/0x8+parseInt(_0x2e31e6(0x129))/0x9;if(_0x241670===_0x47842e)break;else _0x274482['push'](_0x274482['shift']());}catch(_0x172e6b){_0x274482['push'](_0x274482['shift']());}}}(a6_0x3fe9,0x5715c));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x2fc4e4 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x1d4e3e(0xfd);export const MODEL_RUNTIME_FILE_NAME=a6_0x1d4e3e(0x12c);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x1d4e3e(0x116);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x1d4e3e(0x114),REGISTRY_START='/*\x20rabetbase-model-registry:start\x20*/',REGISTRY_END='/*\x20rabetbase-model-registry:end\x20*/';function emptyRegistry(_0x101bfb){return{'defaultProfile':_0x101bfb,'profiles':{},'models':[]};}function extractRegistryJson(_0x16063f){const _0x1a1e02=a6_0x1d4e3e,_0x22eda0=_0x16063f[_0x1a1e02(0xff)](REGISTRY_START),_0x53f14=_0x16063f[_0x1a1e02(0xff)](REGISTRY_END);if(_0x22eda0<0x0||_0x53f14<=_0x22eda0)return undefined;return _0x16063f['slice'](_0x22eda0+REGISTRY_START[_0x1a1e02(0x112)],_0x53f14)['trim']()['replace'](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x1a1e02(0x118)](/;$/,'');}function migrateLegacyRegistry(_0x46466e){const _0x5364ee=a6_0x1d4e3e,_0x156dfe=emptyRegistry(_0x46466e['defaultProfile']);for(const [_0x2161bf,_0x56a8d9]of Object['entries'](_0x46466e[_0x5364ee(0x109)])){_0x156dfe[_0x5364ee(0x109)][_0x2161bf]={'appCode':_0x56a8d9[_0x5364ee(0xfa)],'runtimeDomain':_0x56a8d9[_0x5364ee(0xf4)]},mergeProfileModels(_0x156dfe,_0x2161bf,_0x56a8d9[_0x5364ee(0x12b)]);}return _0x156dfe;}function generatedObjectLiteralToJson(_0x573504){const _0x3f0a6c=a6_0x1d4e3e;let _0x5d0b80='',_0x48ea43,_0x2ce058=![],_0x4dc907;for(let _0x1d4b7f=0x0;_0x1d4b7f<_0x573504[_0x3f0a6c(0x112)];_0x1d4b7f++){const _0x327a54=_0x573504[_0x1d4b7f];if(_0x48ea43){_0x5d0b80+=_0x327a54;if(_0x2ce058)_0x2ce058=![];else{if(_0x327a54==='\x5c')_0x2ce058=!![];else{if(_0x327a54===_0x48ea43)_0x48ea43=undefined;}}continue;}if(_0x327a54==='\x22'){_0x48ea43=_0x327a54,_0x5d0b80+=_0x327a54,_0x4dc907=_0x3f0a6c(0xfc);continue;}if(_0x327a54===','){let _0x33dcf0=_0x1d4b7f+0x1;while(/\s/[_0x3f0a6c(0x136)](_0x573504[_0x33dcf0]??''))_0x33dcf0++;if(_0x573504[_0x33dcf0]==='}'||_0x573504[_0x33dcf0]===']')continue;_0x5d0b80+=_0x327a54,_0x4dc907=',';continue;}if(_0x327a54==='{'||_0x327a54==='['){_0x5d0b80+=_0x327a54,_0x4dc907=_0x327a54;continue;}if(_0x327a54==='}'||_0x327a54===']'){_0x5d0b80+=_0x327a54,_0x4dc907=_0x327a54;continue;}if((_0x4dc907==='{'||_0x4dc907===',')&&/[A-Za-z_$]/[_0x3f0a6c(0x136)](_0x327a54)){let _0x740670=_0x1d4b7f+0x1;while(/[A-Za-z0-9_$]/['test'](_0x573504[_0x740670]??''))_0x740670++;let _0x10ea5d=_0x740670;while(/\s/['test'](_0x573504[_0x10ea5d]??''))_0x10ea5d++;if(_0x573504[_0x10ea5d]===':'){_0x5d0b80+=JSON[_0x3f0a6c(0x12f)](_0x573504[_0x3f0a6c(0xf9)](_0x1d4b7f,_0x740670)),_0x1d4b7f=_0x740670-0x1,_0x4dc907=_0x3f0a6c(0xf6);continue;}}_0x5d0b80+=_0x327a54;if(!/\s/[_0x3f0a6c(0x136)](_0x327a54)&&_0x327a54!==':')_0x4dc907=_0x3f0a6c(0xfc);}return _0x5d0b80;}function parseGeneratedRegistryJson(_0x44d175){const _0x7c6e3c=a6_0x1d4e3e;try{return JSON[_0x7c6e3c(0x122)](_0x44d175);}catch{return JSON[_0x7c6e3c(0x122)](generatedObjectLiteralToJson(_0x44d175));}}function normalizeModelEntries(_0x515ef2,_0x591e7c){const _0x70aa85=a6_0x1d4e3e,_0x16a782=Object[_0x70aa85(0xfb)](_0x515ef2),_0x1377ba=[];for(const _0x80e2f7 of _0x591e7c){if(!_0x80e2f7||typeof _0x80e2f7!=='object'||Array[_0x70aa85(0x103)](_0x80e2f7))return undefined;const _0x3255dc=_0x80e2f7;if(typeof _0x3255dc[_0x70aa85(0x131)]!==_0x70aa85(0x11d)||typeof _0x3255dc[_0x70aa85(0x111)]!==_0x70aa85(0x11d)||typeof _0x3255dc[_0x70aa85(0xfe)]!=='string')return undefined;let _0x4ba9cd;if(typeof _0x3255dc[_0x70aa85(0x12d)]===_0x70aa85(0x11d)&&_0x3255dc['datasetCodes']===undefined)_0x4ba9cd=Object['fromEntries'](_0x16a782[_0x70aa85(0x10f)](_0x42b482=>[_0x42b482,_0x3255dc[_0x70aa85(0x12d)]]));else{if(_0x3255dc['datasetCode']===undefined&&_0x3255dc[_0x70aa85(0x107)]&&typeof _0x3255dc[_0x70aa85(0x107)]==='object'&&!Array['isArray'](_0x3255dc[_0x70aa85(0x107)])&&Object[_0x70aa85(0x12a)](_0x3255dc[_0x70aa85(0x107)])[_0x70aa85(0x11f)](_0x24f8f5=>typeof _0x24f8f5===_0x70aa85(0x11d)))_0x4ba9cd={..._0x3255dc['datasetCodes']};else return undefined;}_0x1377ba[_0x70aa85(0x105)]({'alias':_0x3255dc[_0x70aa85(0x131)],'tableName':_0x3255dc[_0x70aa85(0x111)],'name':_0x3255dc[_0x70aa85(0xfe)],'datasetCodes':_0x4ba9cd});}return _0x1377ba;}function a6_0x3fe9(){const _0x425d24=['protocol','19512vGvBUo','slice','appCode','keys','value','models.generated.ts','name','indexOf','now','.tmp','lovrabet-model-registry/v1','isArray','\x22\x20maps\x20to\x20both\x20\x22','push','entries','datasetCodes','object','profiles','\x22\x20in\x20the\x20registry\x20but\x20\x22','allowEmptyReplacement','\x22\x20and\x20\x22','join','\x22\x20in\x20profile\x20\x22','map','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','tableName','length','22952ijNnUB','lovrabet-model-registry/v2','get','/*\x20rabetbase-model-registry:v2\x20*/','1108128DVcyWy','replace','922608XENcvS','NOT-SET','\x22\x20maps\x20to\x20alias\x20\x22','defaultProfile','string','profileName','every','/**\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','includes','parse','pid','find','filter','45qLDzcT','705492eAnbXP','split','7069311fXdYXO','values','models','model-runtime.ts','datasetCode','utf8','stringify','outputDir','alias','Model\x20alias\x20\x22','Table\x20\x22','\x20model(s)\x20in\x20profile\x20\x22','\x22\x20with\x20an\x20empty\x20result.\x20','test','Refusing\x20to\x20replace\x20','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','5137208igdprS','runtimeDomain','1090ndYMEC','key'];a6_0x3fe9=function(){return _0x425d24;};return a6_0x3fe9();}export function parseModelRegistry(_0x56192c){const _0x715480=a6_0x1d4e3e,_0x5371e3=extractRegistryJson(_0x56192c);if(!_0x5371e3)return undefined;try{const _0x3bf15c=parseGeneratedRegistryJson(_0x5371e3);if(typeof _0x3bf15c[_0x715480(0x11c)]!==_0x715480(0x11d)||!_0x3bf15c['profiles']||typeof _0x3bf15c[_0x715480(0x109)]!==_0x715480(0x108))return undefined;if(_0x3bf15c[_0x715480(0xf7)]===_0x715480(0x102))return migrateLegacyRegistry(_0x3bf15c);if(!(_0x3bf15c[_0x715480(0xf7)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x3bf15c[_0x715480(0xf7)]===undefined&&_0x56192c[_0x715480(0x121)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x715480(0x103)](_0x3bf15c[_0x715480(0x12b)]))return undefined;const _0x3841fc=_0x3bf15c[_0x715480(0x109)],_0xda29f8=normalizeModelEntries(_0x3841fc,_0x3bf15c[_0x715480(0x12b)]);if(!_0xda29f8)return undefined;return{'defaultProfile':_0x3bf15c[_0x715480(0x11c)],'profiles':_0x3841fc,'models':_0xda29f8};}catch{return undefined;}}export function readModelRegistry(_0x443199){if(!existsSync(_0x443199))return undefined;try{return parseModelRegistry(readFileSync(_0x443199,'utf8'));}catch{return undefined;}}function registrySource(_0xbf156b){const _0xa57a4=a6_0x1d4e3e,_0x40f674=Object[_0xa57a4(0xfb)](_0xbf156b[_0xa57a4(0x109)]),_0x545612=_0xbf156b[_0xa57a4(0x12b)]['map'](_0xfb3ff0=>{const _0x1ca71a=_0xa57a4,_0x5e8727=_0x40f674['map'](_0x49271d=>_0xfb3ff0[_0x1ca71a(0x107)][_0x49271d]),_0x220f44=_0x5e8727[0x0],_0x784e71=_0x220f44!==undefined&&_0x5e8727[_0x1ca71a(0x11f)](_0x228549=>_0x228549===_0x220f44),_0x2dba99={'alias':_0xfb3ff0[_0x1ca71a(0x131)],'tableName':_0xfb3ff0[_0x1ca71a(0x111)],'name':_0xfb3ff0[_0x1ca71a(0xfe)]};return _0x784e71?{..._0x2dba99,'datasetCode':_0x220f44}:{..._0x2dba99,'datasetCodes':_0xfb3ff0[_0x1ca71a(0x107)]};}),_0x33c8e2=JSON[_0xa57a4(0x12f)]({'defaultProfile':_0xbf156b[_0xa57a4(0x11c)],'profiles':_0xbf156b[_0xa57a4(0x109)],'models':_0x545612},null,0x2)[_0xa57a4(0x128)]('\x0a')[_0xa57a4(0x10f)](_0x1bb397=>'\x20\x20'+_0x1bb397)[_0xa57a4(0x10d)]('\x0a');return _0xa57a4(0x120)+MODEL_REGISTRY_VERSION_MARKER+_0xa57a4(0x110)+REGISTRY_START+'\x0a'+_0x33c8e2+'\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a'+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x4f9e77,_0x1493f7,_0x19906d){const _0x4ed611=a6_0x1d4e3e,_0x4298cd=_0x19906d['map'](_0x8685a8=>({..._0x8685a8,'alias':_0x8685a8['alias']||_0x8685a8[_0x4ed611(0x111)]})),_0x5bc44e=new Map(),_0x26efb0=new Map();for(const _0x32e3f6 of _0x4298cd){const _0x2a543c=_0x5bc44e[_0x4ed611(0x115)](_0x32e3f6[_0x4ed611(0x131)]);if(_0x2a543c&&_0x2a543c!==_0x32e3f6[_0x4ed611(0x111)])throw new Error('Model\x20alias\x20\x22'+_0x32e3f6[_0x4ed611(0x131)]+_0x4ed611(0x104)+_0x2a543c+'\x22\x20and\x20\x22'+_0x32e3f6[_0x4ed611(0x111)]+_0x4ed611(0x10e)+_0x1493f7+'\x22.');const _0x444dfd=_0x26efb0[_0x4ed611(0x115)](_0x32e3f6[_0x4ed611(0x111)]);if(_0x444dfd&&_0x444dfd!==_0x32e3f6[_0x4ed611(0x131)])throw new Error(_0x4ed611(0x133)+_0x32e3f6[_0x4ed611(0x111)]+'\x22\x20maps\x20to\x20both\x20aliases\x20\x22'+_0x444dfd+_0x4ed611(0x10c)+_0x32e3f6[_0x4ed611(0x131)]+_0x4ed611(0x10e)+_0x1493f7+'\x22.');_0x5bc44e['set'](_0x32e3f6[_0x4ed611(0x131)],_0x32e3f6[_0x4ed611(0x111)]),_0x26efb0['set'](_0x32e3f6['tableName'],_0x32e3f6['alias']);const _0x123a49=_0x4f9e77['models'][_0x4ed611(0x124)](_0x2a2fc1=>_0x2a2fc1[_0x4ed611(0x131)]===_0x32e3f6['alias']);if(_0x123a49&&_0x123a49[_0x4ed611(0x111)]!==_0x32e3f6['tableName'])throw new Error(_0x4ed611(0x132)+_0x32e3f6[_0x4ed611(0x131)]+'\x22\x20maps\x20to\x20table\x20\x22'+_0x123a49['tableName']+_0x4ed611(0x10a)+_0x32e3f6['tableName']+_0x4ed611(0x10e)+_0x1493f7+'\x22.');const _0x478d4b=_0x4f9e77[_0x4ed611(0x12b)][_0x4ed611(0x124)](_0x59057c=>_0x59057c[_0x4ed611(0x111)]===_0x32e3f6['tableName']);if(_0x478d4b&&_0x478d4b[_0x4ed611(0x131)]!==_0x32e3f6[_0x4ed611(0x131)])throw new Error(_0x4ed611(0x133)+_0x32e3f6['tableName']+_0x4ed611(0x11b)+_0x478d4b[_0x4ed611(0x131)]+_0x4ed611(0x10a)+_0x32e3f6[_0x4ed611(0x131)]+_0x4ed611(0x10e)+_0x1493f7+'\x22.');}for(const _0x36633a of _0x4f9e77[_0x4ed611(0x12b)]){delete _0x36633a[_0x4ed611(0x107)][_0x1493f7];}for(const _0x866b53 of _0x4298cd){let _0x32279a=_0x4f9e77[_0x4ed611(0x12b)]['find'](_0x5e164f=>_0x5e164f[_0x4ed611(0x131)]===_0x866b53[_0x4ed611(0x131)]);!_0x32279a&&(_0x32279a={'alias':_0x866b53[_0x4ed611(0x131)],'tableName':_0x866b53[_0x4ed611(0x111)],'name':_0x866b53[_0x4ed611(0xfe)],'datasetCodes':{}},_0x4f9e77[_0x4ed611(0x12b)]['push'](_0x32279a)),(_0x1493f7===_0x4f9e77[_0x4ed611(0x11c)]||!_0x32279a[_0x4ed611(0x107)][_0x4f9e77[_0x4ed611(0x11c)]])&&(_0x32279a['alias']=_0x866b53[_0x4ed611(0x131)],_0x32279a[_0x4ed611(0x111)]=_0x866b53[_0x4ed611(0x111)],_0x32279a['name']=_0x866b53[_0x4ed611(0xfe)]),_0x32279a[_0x4ed611(0x107)][_0x1493f7]=_0x866b53[_0x4ed611(0x12d)];}_0x4f9e77['models']=_0x4f9e77[_0x4ed611(0x12b)][_0x4ed611(0x125)](_0x55f0b3=>Object[_0x4ed611(0xfb)](_0x55f0b3[_0x4ed611(0x107)])[_0x4ed611(0x112)]>0x0);}function removeUnboundProfiles(_0x18c02f){const _0x4b11e4=a6_0x1d4e3e,_0x452f06=Object[_0x4b11e4(0x106)](_0x18c02f[_0x4b11e4(0x109)])[_0x4b11e4(0x125)](([,_0xec1feb])=>_0xec1feb['appCode']===_0x4b11e4(0x11a))['map'](([_0x470e4d])=>_0x470e4d);if(_0x452f06[_0x4b11e4(0x112)]===0x0)return;for(const _0x51e89e of _0x452f06){delete _0x18c02f[_0x4b11e4(0x109)][_0x51e89e];for(const _0x3c8569 of _0x18c02f['models']){delete _0x3c8569[_0x4b11e4(0x107)][_0x51e89e];}}_0x18c02f[_0x4b11e4(0x12b)]=_0x18c02f['models'][_0x4b11e4(0x125)](_0x4c125e=>Object['keys'](_0x4c125e[_0x4b11e4(0x107)])['length']>0x0);}export function getProfileModels(_0xfc8d53,_0x28162d){const _0x52b137=a6_0x1d4e3e;return _0xfc8d53[_0x52b137(0x12b)]['flatMap'](_0x2b3b8f=>{const _0x1dd298=_0x52b137,_0x4bc949=_0x2b3b8f[_0x1dd298(0x107)][_0x28162d];return _0x4bc949?[{'datasetCode':_0x4bc949,'tableName':_0x2b3b8f[_0x1dd298(0x111)],'name':_0x2b3b8f['name'],'alias':_0x2b3b8f[_0x1dd298(0x131)]}]:[];});}export function updateModelRegistry(_0x3d1c3d){const _0x369c4f=a6_0x1d4e3e,_0x435514=a6_0x2fc4e4[_0x369c4f(0x10d)](_0x3d1c3d[_0x369c4f(0x130)],MODEL_REGISTRY_FILE_NAME),_0x1f096d=existsSync(_0x435514),_0x551eeb=readModelRegistry(_0x435514);if(_0x1f096d&&!_0x551eeb)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x369c4f(0x138));const _0x4743a1=_0x551eeb??emptyRegistry(_0x3d1c3d[_0x369c4f(0x11c)]);if(_0x3d1c3d[_0x369c4f(0xfa)]!==_0x369c4f(0x11a))removeUnboundProfiles(_0x4743a1);const _0x3b279c=_0x551eeb?getProfileModels(_0x551eeb,_0x3d1c3d[_0x369c4f(0x11e)])[_0x369c4f(0x112)]:0x0;if(_0x3b279c>0x0&&_0x3d1c3d[_0x369c4f(0x12b)][_0x369c4f(0x112)]===0x0&&!_0x3d1c3d[_0x369c4f(0x10b)])throw new Error(_0x369c4f(0x137)+_0x3b279c+_0x369c4f(0x134)+_0x3d1c3d[_0x369c4f(0x11e)]+_0x369c4f(0x135)+_0x369c4f(0x139));_0x4743a1['defaultProfile']=_0x3d1c3d[_0x369c4f(0x11c)],_0x4743a1[_0x369c4f(0x109)][_0x3d1c3d[_0x369c4f(0x11e)]]={'appCode':_0x3d1c3d[_0x369c4f(0xfa)],'runtimeDomain':_0x3d1c3d[_0x369c4f(0xf4)]},mergeProfileModels(_0x4743a1,_0x3d1c3d[_0x369c4f(0x11e)],_0x3d1c3d[_0x369c4f(0x12b)]),mkdirSync(_0x3d1c3d['outputDir'],{'recursive':!![]});const _0xc1c732=_0x435514+'.'+process[_0x369c4f(0x123)]+'.'+Date[_0x369c4f(0x100)]()+_0x369c4f(0x101);try{writeFileSync(_0xc1c732,registrySource(_0x4743a1),{'encoding':_0x369c4f(0x12e),'mode':0x1a4}),renameSync(_0xc1c732,_0x435514);}catch(_0x10e8f2){try{unlinkSync(_0xc1c732);}catch{}throw _0x10e8f2;}return{'path':_0x435514,'registry':_0x4743a1,'existed':_0x1f096d};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a7_0x39cba3=a7_0x5717;(function(_0x26ffdd,_0x26897b){const _0x5aa147=a7_0x5717,_0x3c4a97=_0x26ffdd();while(!![]){try{const _0x532640=parseInt(_0x5aa147(0x1e0))/0x1+-parseInt(_0x5aa147(0x1e4))/0x2+parseInt(_0x5aa147(0x1d9))/0x3*(parseInt(_0x5aa147(0x1db))/0x4)+-parseInt(_0x5aa147(0x1d6))/0x5*(-parseInt(_0x5aa147(0x1df))/0x6)+parseInt(_0x5aa147(0x1e5))/0x7+parseInt(_0x5aa147(0x1e9))/0x8*(-parseInt(_0x5aa147(0x1da))/0x9)+parseInt(_0x5aa147(0x1e6))/0xa*(-parseInt(_0x5aa147(0x1d8))/0xb);if(_0x532640===_0x26897b)break;else _0x3c4a97['push'](_0x3c4a97['shift']());}catch(_0x344671){_0x3c4a97['push'](_0x3c4a97['shift']());}}}(a7_0x1038,0xe53ba));import{readFileSync}from'node:fs';import a7_0x3036b7 from'node:path';import{fileURLToPath}from'node:url';import a7_0x540abd from'prettier';import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function relativeImport(_0x1eaa95,_0x152f8f){const _0x34783a=a7_0x5717;let _0x274966=a7_0x3036b7[_0x34783a(0x1dc)](_0x1eaa95,_0x152f8f)[_0x34783a(0x1d5)](/\\/g,'/');if(!_0x274966[_0x34783a(0x1e2)]('.'))_0x274966='./'+_0x274966;return _0x274966;}function a7_0x5717(_0x337cc6,_0x418a91){_0x337cc6=_0x337cc6-0x1d1;const _0x10387c=a7_0x1038();let _0x5717bb=_0x10387c[_0x337cc6];return _0x5717bb;}function a7_0x1038(){const _0x49e49f=['696585CSbMPs','format','startsWith','model-runtime.ts.tpl','1450700KLbQvc','3374140OJNCko','40vJXXDD','cwd','dirname','72CcHCCw','join','typescript','{ProjectRoutingImport}','utf8','resolve','replace','205cIEixd','../../templates/generate-api','1036981uksAQp','3HIDtzU','756513gFSTOk','2312668EZAIsI','relative','all','profile-api.ts.tpl','152358QitFio'];a7_0x1038=function(){return _0x49e49f;};return a7_0x1038();}export async function renderModelRegistryScaffold(_0x33f5b9,_0x5f37e1=process[a7_0x39cba3(0x1e7)]()){const _0x27a386=a7_0x39cba3,_0x2ce11d=fileURLToPath(import.meta.url),_0x5e9e84=a7_0x3036b7[_0x27a386(0x1d4)](a7_0x3036b7[_0x27a386(0x1e8)](_0x2ce11d),_0x27a386(0x1d7)),_0x5ce1d7=relativeImport(a7_0x3036b7[_0x27a386(0x1d4)](_0x33f5b9),a7_0x3036b7[_0x27a386(0x1d4)](_0x5f37e1,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x4db9a5=readFileSync(a7_0x3036b7[_0x27a386(0x1ea)](_0x5e9e84,_0x27a386(0x1de)),_0x27a386(0x1d3))[_0x27a386(0x1d5)](_0x27a386(0x1d2),_0x5ce1d7),[_0x575b63,_0x201765,_0x46d069]=await Promise[_0x27a386(0x1dd)]([a7_0x540abd['format'](_0x4db9a5,{'parser':_0x27a386(0x1d1)}),a7_0x540abd[_0x27a386(0x1e1)](readFileSync(a7_0x3036b7['join'](_0x5e9e84,'profile-client.ts.tpl'),_0x27a386(0x1d3)),{'parser':_0x27a386(0x1d1)}),a7_0x540abd[_0x27a386(0x1e1)](readFileSync(a7_0x3036b7[_0x27a386(0x1ea)](_0x5e9e84,_0x27a386(0x1e3)),_0x27a386(0x1d3)),{'parser':'typescript'})]);return{'api':_0x575b63,'client':_0x201765,'modelRuntime':_0x46d069};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a8_0x8ec9(_0x5c6c22,_0x14f01b){_0x5c6c22=_0x5c6c22-0x98;const _0x15b838=a8_0x15b8();let _0x8ec9a9=_0x15b838[_0x5c6c22];return _0x8ec9a9;}(function(_0x3e5108,_0xd9e5f){const _0x43a4de=a8_0x8ec9,_0x56b9fc=_0x3e5108();while(!![]){try{const _0x263e56=parseInt(_0x43a4de(0xae))/0x1+-parseInt(_0x43a4de(0xac))/0x2+-parseInt(_0x43a4de(0x98))/0x3*(-parseInt(_0x43a4de(0xb6))/0x4)+-parseInt(_0x43a4de(0xb8))/0x5+parseInt(_0x43a4de(0x9d))/0x6*(-parseInt(_0x43a4de(0xa3))/0x7)+parseInt(_0x43a4de(0x99))/0x8*(-parseInt(_0x43a4de(0xa9))/0x9)+parseInt(_0x43a4de(0xb3))/0xa;if(_0x263e56===_0xd9e5f)break;else _0x56b9fc['push'](_0x56b9fc['shift']());}catch(_0x555cda){_0x56b9fc['push'](_0x56b9fc['shift']());}}}(a8_0x15b8,0xb6c9f));import{existsSync}from'node:fs';import a8_0x3df366 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_0x15b8(){const _0x3f33de=['78777XxnYfl','defaultApp','map','appCode','filter','36710660KIdMhs','entries','api.ts','2313540ZrmcKM','`\x20first.','5419515hvhsBV','3FDCjlY','8JJCgkT','length','\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20','resolve','5176434OWKiXT','apiDir','profiles','find','Model\x20profile\x20\x22','defaultProfile','7miMSCD','Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.','-api.ts','Run\x20`','join','apps','2384874MRZbnc','validation','cwd','2735794fqNAnZ','appcode'];a8_0x15b8=function(){return _0x3f33de;};return a8_0x15b8();}import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveApiModelSource(_0x289fbf,_0x6d3c52,_0x363b8a){const _0x3309c9=a8_0x8ec9,_0x3f3187=a8_0x3df366[_0x3309c9(0x9c)](process[_0x3309c9(0xab)](),_0x289fbf),_0x171b5a=a8_0x3df366[_0x3309c9(0x9c)](_0x3f3187,_0x3309c9(0xb5)),_0x1e11da=a8_0x3df366[_0x3309c9(0x9c)](_0x3f3187,MODEL_REGISTRY_FILE_NAME),_0x4dc426=readModelRegistry(_0x1e11da);if(_0x4dc426){const _0x42abb4=_0x6d3c52?Object[_0x3309c9(0xb4)](_0x4dc426[_0x3309c9(0x9f)])[_0x3309c9(0xb2)](([,_0x262039])=>_0x262039[_0x3309c9(0xb1)]===_0x6d3c52):[];if(_0x363b8a){if(_0x4dc426['profiles'][_0x363b8a])return{'filePath':_0x1e11da,'profileName':_0x363b8a};if(_0x42abb4['length']>0x0)throw CliErrors[_0x3309c9(0xaa)](_0x3309c9(0xa1)+_0x363b8a+'\x22\x20is\x20missing\x20from\x20'+MODEL_REGISTRY_FILE_NAME+'.',_0x3309c9(0xa6)+CLI_BIN_NAME+'\x20api\x20pull\x20--app\x20'+_0x363b8a+_0x3309c9(0xb7));}else{if(_0x42abb4['length']===0x1)return{'filePath':_0x1e11da,'profileName':_0x42abb4[0x0][0x0]};if(_0x42abb4[_0x3309c9(0x9a)]>0x1)throw new Error('AppCode\x20\x22'+_0x6d3c52+_0x3309c9(0x9b)+_0x42abb4[_0x3309c9(0xb0)](([_0x4b0a43])=>_0x4b0a43)[_0x3309c9(0xa7)](',\x20')+'.\x20'+_0x3309c9(0xa4));if(_0x4dc426[_0x3309c9(0x9f)][_0x4dc426[_0x3309c9(0xa2)]]&&!_0x6d3c52)return{'filePath':_0x1e11da,'profileName':_0x4dc426[_0x3309c9(0xa2)]};}}if(!_0x6d3c52&&!_0x363b8a)return{'filePath':_0x171b5a};const _0x579a41=readRawConfig(),_0x3f725c=_0x579a41[_0x3309c9(0xa8)]&&typeof _0x579a41[_0x3309c9(0xa8)]==='object'?_0x579a41['apps']:{},_0x4a9869=_0x363b8a&&_0x3f725c[_0x363b8a]?[_0x363b8a,_0x3f725c[_0x363b8a]]:Object[_0x3309c9(0xb4)](_0x3f725c)[_0x3309c9(0xa0)](([,_0x3b6e44])=>_0x3b6e44?.[_0x3309c9(0xad)]===_0x6d3c52);if(!_0x4a9869)return{'filePath':_0x171b5a};const [_0xb5cecb,_0x3ae698]=_0x4a9869,_0x9a602c=typeof _0x579a41[_0x3309c9(0xaf)]==='string'?_0x579a41[_0x3309c9(0xaf)]:undefined;if(_0x3ae698?.[_0x3309c9(0x9e)])return{'filePath':_0x171b5a};if(_0x9a602c&&_0xb5cecb!==_0x9a602c){const _0x48a373=a8_0x3df366[_0x3309c9(0x9c)](_0x3f3187,_0xb5cecb+_0x3309c9(0xa5));if(existsSync(_0x48a373))return{'filePath':_0x48a373};}return{'filePath':_0x171b5a};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ba1d7,_0x4135b5){const _0x35212e=a9_0x35da,_0x135d2e=_0x2ba1d7();while(!![]){try{const _0x3ef272=parseInt(_0x35212e(0x134))/0x1*(-parseInt(_0x35212e(0x136))/0x2)+-parseInt(_0x35212e(0x13a))/0x3+parseInt(_0x35212e(0x13b))/0x4*(-parseInt(_0x35212e(0x12c))/0x5)+-parseInt(_0x35212e(0x128))/0x6+-parseInt(_0x35212e(0x13c))/0x7+parseInt(_0x35212e(0x127))/0x8+-parseInt(_0x35212e(0x12a))/0x9*(-parseInt(_0x35212e(0x12f))/0xa);if(_0x3ef272===_0x4135b5)break;else _0x135d2e['push'](_0x135d2e['shift']());}catch(_0x40d9df){_0x135d2e['push'](_0x135d2e['shift']());}}}(a9_0x5aad,0xdf0d6));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a9_0x5aad(){const _0x2af052=['Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','51093TwHMEA','autoYes','30MyjTzC','Run\x20`','Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','10050nRvoIg','*\x20Login\x20successful!','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','nonInteractive','โ\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','327527YSqKZx','validation','6UvCOOt','log','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','start','4351608GabWhg','1200236gTsNVs','7509719Vbeztc','6030104qLWjgj','1435428lUfuTA'];a9_0x5aad=function(){return _0x2af052;};return a9_0x5aad();}import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';import a9_0x2dd3a7 from'ora';function a9_0x35da(_0x23d57c,_0x5ea710){_0x23d57c=_0x23d57c-0x127;const _0x5aad47=a9_0x5aad();let _0x35da9d=_0x5aad47[_0x23d57c];return _0x35da9d;}export async function runAuthServer(_0x15e43b){const _0x3445e0=a9_0x35da,_0x27824e=await getIsSessionValid();if(_0x27824e){console[_0x3445e0(0x137)](_0x3445e0(0x133));return;}if(_0x15e43b?.[_0x3445e0(0x132)]&&!_0x15e43b['autoYes'])throw CliErrors[_0x3445e0(0x135)](_0x3445e0(0x12e),_0x3445e0(0x12d)+CLI_BIN_NAME+_0x3445e0(0x131));const _0x145f78=_0x15e43b?.[_0x3445e0(0x12b)]?!![]:await confirm({'message':'No\x20valid\x20session.\x20Login\x20now?','default':!![]});if(!_0x145f78)return;if(_0x15e43b?.[_0x3445e0(0x132)]){console[_0x3445e0(0x137)](_0x3445e0(0x129));const _0x71058c=await authServer({'silent':![],'openBrowser':![]});_0x71058c?console['log'](_0x3445e0(0x130)):console[_0x3445e0(0x137)]('!\x20Login\x20failed.');return;}const _0x2a1f4d=a9_0x2dd3a7(_0x3445e0(0x138))[_0x3445e0(0x139)](),_0x53c92=await authServer({'silent':!![],'openBrowser':!![]});_0x2a1f4d['stop'](),_0x53c92?console[_0x3445e0(0x137)](_0x3445e0(0x130)):console[_0x3445e0(0x137)]('!\x20Login\x20failed.');}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a10_0x5d9166=a10_0x309d;(function(_0x141693,_0x58cb8b){const _0x5dc8b3=a10_0x309d,_0x1e16bf=_0x141693();while(!![]){try{const _0x315a8f=parseInt(_0x5dc8b3(0x16b))/0x1*(parseInt(_0x5dc8b3(0x160))/0x2)+-parseInt(_0x5dc8b3(0x165))/0x3*(-parseInt(_0x5dc8b3(0x171))/0x4)+parseInt(_0x5dc8b3(0x17b))/0x5*(parseInt(_0x5dc8b3(0x162))/0x6)+-parseInt(_0x5dc8b3(0x169))/0x7*(-parseInt(_0x5dc8b3(0x155))/0x8)+-parseInt(_0x5dc8b3(0x153))/0x9+-parseInt(_0x5dc8b3(0x157))/0xa+parseInt(_0x5dc8b3(0x15e))/0xb*(-parseInt(_0x5dc8b3(0x168))/0xc);if(_0x315a8f===_0x58cb8b)break;else _0x1e16bf['push'](_0x1e16bf['shift']());}catch(_0x462f49){_0x1e16bf['push'](_0x1e16bf['shift']());}}}(a10_0x1396,0xc8100));import{writeFileSync}from'node:fs';import a10_0x5e275f from'node:http';import a10_0xd61aab 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';function a10_0x309d(_0x435250,_0x27d394){_0x435250=_0x435250-0x14e;const _0x13962f=a10_0x1396();let _0x309d41=_0x13962f[_0x435250];return _0x309d41;}export const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export function resolveAuthCallbackRouting(_0x1827d4){const _0x5d12f4=a10_0x309d;if(!_0x1827d4)return getProjectDomainRoutingManifest()[_0x5d12f4(0x17c)];const _0x452f80=getOfficialRoutingProfile(_0x1827d4),_0x30ea92=getOfficialRoutingCdn(_0x1827d4);return{'origin':_0x452f80[_0x5d12f4(0x17c)][_0x5d12f4(0x15d)],'certificateUrl':_0x30ea92[_0x5d12f4(0x172)]+_0x5d12f4(0x14e)};}function withPort(_0x1b6bb0,_0x592081){const _0x559fcd=a10_0x309d,_0x4764e7=new URL(_0x1b6bb0);return _0x4764e7[_0x559fcd(0x17d)]=String(_0x592081),_0x4764e7[_0x559fcd(0x15d)];}function a10_0x1396(){const _0x4e8096=['/cert/lovrabet-dev.json','๐ก\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','object','cmd\x20/c\x20start\x20\x22\x22\x20\x22','win32','8041239DvztHC','utf-8','5592TtnUCY','log','7764110tzRSyb','๐\x20Login\x20URL:','127.0.0.1','platform','json','headers','origin','1254vNvhqh','๐\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','38hriUax','user','114Gnrhft','โ ๏ธ\x20\x20Failed\x20to\x20open\x20browser\x20automatically','๐\x20Starting\x20login\x20service...','6MSEDao','silent','error','124956TKaXUY','8358zuXBpS','address','61933dQNnYY','then','createServer','/sign-in?redirect=','session','end','463948qbQQqo','lovrabet','certificateUrl','๐ก\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','โ
\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','close','darwin','catch','Auth\x20server\x20error:','/api/auth/get-session','377135evuGon','local','port','openBrowser','writeHead'];a10_0x1396=function(){return _0x4e8096;};return a10_0x1396();}export async function authServer(_0x21555){const _0x4061f3=a10_0x309d,_0x1793ab=_0x21555?.[_0x4061f3(0x166)]||![],_0x540a3a=_0x21555?.[_0x4061f3(0x17e)]??!![],_0x18233f=_0x21555?.['timeoutMs']??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0xa32a13=resolveAuthCallbackRouting(),_0x17b92b=_0xa32a13['certificateUrl']?await(await fetch(_0xa32a13[_0x4061f3(0x173)]))[_0x4061f3(0x15b)]():undefined;return new Promise(async(_0x28c9cd,_0xf08abf)=>{const _0x436415=_0x4061f3;let _0x14d088=0x0,_0x4ac2bf=![],_0x507e6e;const _0x48b88a=async(_0xdb3d0a,_0x57685b)=>{const _0x1420da=a10_0x309d,_0xed3a33=getUserDomain(),_0x22f07d=_0xdb3d0a[_0x1420da(0x15c)]['cookie']||'',_0x454bed=await fetch(_0xed3a33+_0x1420da(0x17a),{'headers':{'cookie':_0x22f07d}})[_0x1420da(0x16c)](_0x290b65=>_0x290b65[_0x1420da(0x15b)]()),_0x54c50f=_0x454bed&&_0x454bed[_0x1420da(0x16f)]&&_0x454bed[_0x1420da(0x161)];if(_0x54c50f){writeFileSync(cookieFile,_0x22f07d,_0x1420da(0x154));const _0x123da7=buildLoginSuccessHtml();_0x57685b[_0x1420da(0x17f)](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x57685b['end'](_0x123da7),_0x1c311d(!![]);}else{const _0x4b43fd=encodeURIComponent(withPort(_0xa32a13[_0x1420da(0x15d)],_0x14d088));_0x57685b[_0x1420da(0x17f)](0x12e,{'location':_0xed3a33+_0x1420da(0x16e)+_0x4b43fd}),_0x57685b[_0x1420da(0x170)]();return;}},_0x62561d=_0x17b92b?a10_0xd61aab[_0x436415(0x16d)](_0x17b92b,_0x48b88a):a10_0x5e275f[_0x436415(0x16d)](_0x48b88a);function _0x1c311d(_0x1a274d){const _0x3382e0=_0x436415;if(_0x4ac2bf)return;_0x4ac2bf=!![],_0x507e6e&&clearTimeout(_0x507e6e),_0x62561d[_0x3382e0(0x176)](),_0x28c9cd(_0x1a274d);}_0x62561d['listen'](0x0,_0x436415(0x159),()=>{const _0x3423d0=_0x436415,_0x5007cd=_0x62561d[_0x3423d0(0x16a)]();_0x14d088=typeof _0x5007cd===_0x3423d0(0x150)&&_0x5007cd?_0x5007cd['port']:Number(_0x5007cd);const _0x476b60=withPort(_0xa32a13['origin'],_0x14d088);_0x507e6e=setTimeout(()=>{const _0x3baa0=_0x3423d0;!_0x1793ab&&console[_0x3baa0(0x156)]('!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.'),_0x1c311d(![]);},_0x18233f);!_0x1793ab&&(console[_0x3423d0(0x156)](_0x3423d0(0x164)),console[_0x3423d0(0x156)](_0x3423d0(0x158),_0x476b60),_0x540a3a?(console[_0x3423d0(0x156)]('๐\x20Attempting\x20to\x20open\x20browser\x20automatically...'),console[_0x3423d0(0x156)](''),console[_0x3423d0(0x156)](_0x3423d0(0x14f))):console['log'](_0x3423d0(0x174)),console[_0x3423d0(0x156)](''));if(!_0x540a3a)return;openInBrowser(_0x476b60)[_0x3423d0(0x16c)](_0x5484a0=>{const _0x82fcf0=_0x3423d0;!_0x1793ab&&(_0x5484a0?console[_0x82fcf0(0x156)](_0x82fcf0(0x175)):(console['log'](_0x82fcf0(0x163)),console[_0x82fcf0(0x156)]('๐\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0x476b60)),console[_0x82fcf0(0x156)](''));})[_0x3423d0(0x178)](()=>{const _0x138364=_0x3423d0;!_0x1793ab&&(console[_0x138364(0x156)](_0x138364(0x163)),console[_0x138364(0x156)](_0x138364(0x15f),_0x476b60),console[_0x138364(0x156)](''));});}),_0x62561d['on'](_0x436415(0x167),_0x375be7=>{const _0x1794b8=_0x436415;if(_0x4ac2bf)return;_0x4ac2bf=!![],_0x507e6e&&clearTimeout(_0x507e6e),!_0x1793ab&&console[_0x1794b8(0x167)](_0x1794b8(0x179),_0x375be7),_0x62561d[_0x1794b8(0x176)](),_0xf08abf(_0x375be7);});});}function openInBrowser(_0x2050ca){return new Promise(_0x126033=>{const _0x556f4e=a10_0x309d,_0x55e07f=process[_0x556f4e(0x15a)];let _0x2cbaf0;if(_0x55e07f===_0x556f4e(0x152))_0x2cbaf0=_0x556f4e(0x151)+_0x2050ca+'\x22';else _0x55e07f===_0x556f4e(0x177)?_0x2cbaf0='open\x20\x22'+_0x2050ca+'\x22':_0x2cbaf0='xdg-open\x20\x22'+_0x2050ca+'\x22';exec(_0x2cbaf0,_0x494d96=>{_0x494d96?_0x126033(![]):_0x126033(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a10_0x5d9166(0x156)]('isAuth',isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a11_0x3790(){const _0x3d25dc=['10SKnpSx','908162VFWpbX','9926433pSCQxd','18jCvzbb','.lovrabet','cookie','1829168aKLSmA','3779730CZFNXp','775624QRdHqJ','1935619gEoBIJ','9HvnSdL','1787128EEMOGc'];a11_0x3790=function(){return _0x3d25dc;};return a11_0x3790();}const a11_0x3b3931=a11_0x3e35;(function(_0x463e4e,_0x4a8948){const _0x571dc0=a11_0x3e35,_0x3894cd=_0x463e4e();while(!![]){try{const _0x3933e4=parseInt(_0x571dc0(0xcf))/0x1+parseInt(_0x571dc0(0xc8))/0x2+-parseInt(_0x571dc0(0xcc))/0x3*(parseInt(_0x571dc0(0xca))/0x4)+-parseInt(_0x571dc0(0xc9))/0x5+-parseInt(_0x571dc0(0xc5))/0x6*(parseInt(_0x571dc0(0xcb))/0x7)+-parseInt(_0x571dc0(0xcd))/0x8+parseInt(_0x571dc0(0xd0))/0x9*(parseInt(_0x571dc0(0xce))/0xa);if(_0x3933e4===_0x4a8948)break;else _0x3894cd['push'](_0x3894cd['shift']());}catch(_0x10b0ee){_0x3894cd['push'](_0x3894cd['shift']());}}}(a11_0x3790,0x82a25));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';function a11_0x3e35(_0x476e74,_0x56b43b){_0x476e74=_0x476e74-0xc5;const _0x379058=a11_0x3790();let _0x3e35db=_0x379058[_0x476e74];return _0x3e35db;}export const configDir=join(homedir(),a11_0x3b3931(0xc6));export const cookieFile=join(configDir,a11_0x3b3931(0xc7));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4b7443,_0x4dda4f){var _0x3ddc95=a12_0x2042,_0x1324dc=_0x4b7443();while(!![]){try{var _0x22c90c=-parseInt(_0x3ddc95(0xd3))/0x1+parseInt(_0x3ddc95(0xce))/0x2*(-parseInt(_0x3ddc95(0xd6))/0x3)+parseInt(_0x3ddc95(0xd8))/0x4+parseInt(_0x3ddc95(0xcd))/0x5*(-parseInt(_0x3ddc95(0xd2))/0x6)+parseInt(_0x3ddc95(0xd0))/0x7*(-parseInt(_0x3ddc95(0xcf))/0x8)+-parseInt(_0x3ddc95(0xcc))/0x9*(-parseInt(_0x3ddc95(0xd1))/0xa)+parseInt(_0x3ddc95(0xd5))/0xb*(parseInt(_0x3ddc95(0xd4))/0xc);if(_0x22c90c===_0x4dda4f)break;else _0x1324dc['push'](_0x1324dc['shift']());}catch(_0x2b7b96){_0x1324dc['push'](_0x1324dc['shift']());}}}(a12_0x4608,0xa158c));import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';function a12_0x2042(_0x6ebed8,_0x43d960){_0x6ebed8=_0x6ebed8-0xcc;var _0x460897=a12_0x4608();var _0x20429e=_0x460897[_0x6ebed8];return _0x20429e;}function a12_0x4608(){var _0x2c322f=['815900wtVoom','27JcSlMq','7920wpzSXs','2YlOznL','624280OZTSYC','49rYIoRI','461900uDQFeV','4614rfanVM','752793cSIRnc','132348aEfEGP','3014hroqMC','559443lVrcXs','utf-8'];a12_0x4608=function(){return _0x2c322f;};return a12_0x4608();}export function getCookie(){var _0x24cb2d=a12_0x2042;try{return readFileSync(cookieFile,_0x24cb2d(0xd7));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a13_0x4a43(){const _0x1ba09f=['1418DgtUiF','session','10591PkktND','89WXAygP','132507wdzrvl','821464nvJOYq','1290447NxxoSt','json','user','utf-8','390gcMeGo','328490qTJNxQ','1230680uoDMnV','642vVAjeN','/api/auth/get-session'];a13_0x4a43=function(){return _0x1ba09f;};return a13_0x4a43();}(function(_0x19e6d0,_0x36d805){const _0x1190e7=a13_0x3ce7,_0x57b72d=_0x19e6d0();while(!![]){try{const _0x295c33=parseInt(_0x1190e7(0x18e))/0x1*(parseInt(_0x1190e7(0x18b))/0x2)+parseInt(_0x1190e7(0x191))/0x3+parseInt(_0x1190e7(0x188))/0x4+-parseInt(_0x1190e7(0x196))/0x5+-parseInt(_0x1190e7(0x189))/0x6*(-parseInt(_0x1190e7(0x18d))/0x7)+-parseInt(_0x1190e7(0x190))/0x8+parseInt(_0x1190e7(0x18f))/0x9*(-parseInt(_0x1190e7(0x195))/0xa);if(_0x295c33===_0x36d805)break;else _0x57b72d['push'](_0x57b72d['shift']());}catch(_0x1a0ecb){_0x57b72d['push'](_0x57b72d['shift']());}}}(a13_0x4a43,0x35c49));function a13_0x3ce7(_0x484ef3,_0x3330d9){_0x484ef3=_0x484ef3-0x188;const _0x4a43ba=a13_0x4a43();let _0x3ce7ea=_0x4a43ba[_0x484ef3];return _0x3ce7ea;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(_0x3dc019){const _0x18da69=a13_0x3ce7;try{if(_0x3dc019===undefined){if(!existsSync(cookieFile))return null;_0x3dc019=readFileSync(cookieFile,_0x18da69(0x194));}if(!_0x3dc019)return null;const _0x576ca2=await fetch(getUserDomain()+_0x18da69(0x18a),{'headers':{'cookie':_0x3dc019}});if(!_0x576ca2['ok'])return null;const _0x2b105e=await _0x576ca2[_0x18da69(0x192)]();if(!_0x2b105e[_0x18da69(0x18c)]||!_0x2b105e[_0x18da69(0x193)])return null;return _0x2b105e;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5913a9,_0x2ef3eb){const _0x157f92=a14_0x5d26,_0x5b1f9f=_0x5913a9();while(!![]){try{const _0x4ac433=parseInt(_0x157f92(0xa0))/0x1+-parseInt(_0x157f92(0xa8))/0x2*(parseInt(_0x157f92(0xab))/0x3)+parseInt(_0x157f92(0xa2))/0x4*(-parseInt(_0x157f92(0xa3))/0x5)+-parseInt(_0x157f92(0xa6))/0x6*(parseInt(_0x157f92(0xa5))/0x7)+-parseInt(_0x157f92(0xa7))/0x8+parseInt(_0x157f92(0xaa))/0x9+parseInt(_0x157f92(0xac))/0xa;if(_0x4ac433===_0x2ef3eb)break;else _0x5b1f9f['push'](_0x5b1f9f['shift']());}catch(_0x5c4d79){_0x5b1f9f['push'](_0x5b1f9f['shift']());}}}(a14_0x3957,0x98dea));function a14_0x3957(){const _0x5cabb5=['4624884ildbkD','5JnuRVG','/api/auth/get-session','436982UiyxqS','60uKXeIh','7199456tnWOKK','90512kUMnGs','utf-8','11141181oXIeaP','9BEilNZ','21217320IPHcju','82694hPWwOz','user'];a14_0x3957=function(){return _0x5cabb5;};return a14_0x3957();}function a14_0x5d26(_0x19e941,_0x11395c){_0x19e941=_0x19e941-0xa0;const _0x3957ff=a14_0x3957();let _0x5d261d=_0x3957ff[_0x19e941];return _0x5d261d;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x13b30d=a14_0x5d26;try{if(!existsSync(cookieFile))return![];const _0x384124=readFileSync(cookieFile,_0x13b30d(0xa9)),_0x219476=await fetch(getUserDomain()+_0x13b30d(0xa4),{'headers':{'cookie':_0x384124}})['then'](_0x501bc0=>_0x501bc0['json']());return _0x219476&&_0x219476['session']&&_0x219476[_0x13b30d(0xa1)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x144213,_0x140d10){const _0x3eefcc=a15_0x3a76,_0x18b3b4=_0x144213();while(!![]){try{const _0x5aa247=parseInt(_0x3eefcc(0x74))/0x1*(-parseInt(_0x3eefcc(0x7b))/0x2)+parseInt(_0x3eefcc(0x7d))/0x3*(-parseInt(_0x3eefcc(0x75))/0x4)+-parseInt(_0x3eefcc(0x76))/0x5+parseInt(_0x3eefcc(0x7c))/0x6*(-parseInt(_0x3eefcc(0x78))/0x7)+-parseInt(_0x3eefcc(0x7f))/0x8+-parseInt(_0x3eefcc(0x7e))/0x9*(-parseInt(_0x3eefcc(0x77))/0xa)+parseInt(_0x3eefcc(0x79))/0xb;if(_0x5aa247===_0x140d10)break;else _0x18b3b4['push'](_0x18b3b4['shift']());}catch(_0x31b9ef){_0x18b3b4['push'](_0x18b3b4['shift']());}}}(a15_0x3528,0x49025));function a15_0x3528(){const _0x3b08fe=['252aiDgol','23876831mFCoaS','<!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>','16ovUXrz','54354JyWDor','15tXjVho','69336tFhNxb','4201784LvtsPD','2852zVKUuF','430932fyaepP','2524860gIZwUd','60gGJGPO'];a15_0x3528=function(){return _0x3b08fe;};return a15_0x3528();}function a15_0x3a76(_0x29fe5b,_0x1b753d){_0x29fe5b=_0x29fe5b-0x74;const _0x3528af=a15_0x3528();let _0x3a7664=_0x3528af[_0x29fe5b];return _0x3a7664;}export function buildLoginSuccessHtml(){const _0x3ba2e1=a15_0x3a76,_0x4c1915='Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.';return _0x3ba2e1(0x7a)+_0x4c1915+'</div>\x0a\x20\x20\x20\x20<p\x20class=\x22cli-hint\x22>Rabetbase\x20CLI\x20ยท\x20session\x20saved\x20locally</p>\x0a\x20\x20</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>';}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x27cdef,_0x1793be){var _0xa18b86=a16_0x4cc7,_0x518322=_0x27cdef();while(!![]){try{var _0x48fdc8=-parseInt(_0xa18b86(0x105))/0x1+-parseInt(_0xa18b86(0x109))/0x2+parseInt(_0xa18b86(0x106))/0x3*(-parseInt(_0xa18b86(0x10d))/0x4)+parseInt(_0xa18b86(0x10a))/0x5+parseInt(_0xa18b86(0x104))/0x6+-parseInt(_0xa18b86(0x10c))/0x7*(parseInt(_0xa18b86(0x107))/0x8)+parseInt(_0xa18b86(0x108))/0x9;if(_0x48fdc8===_0x1793be)break;else _0x518322['push'](_0x518322['shift']());}catch(_0x12cfaf){_0x518322['push'](_0x518322['shift']());}}}(a16_0x525c,0x4aa41));function a16_0x4cc7(_0x45d107,_0x34ed35){_0x45d107=_0x45d107-0x104;var _0x525ce0=a16_0x525c();var _0x4cc70e=_0x525ce0[_0x45d107];return _0x4cc70e;}import{unlinkSync,existsSync}from'node:fs';function a16_0x525c(){var _0x2563b6=['8gzsfzl','4414383lracRt','528790cvfiGl','2921005tTaASy','log','663607eeIbZm','692cVhhos','3496656ooRrgw','517827sZoEMf','8232XJLQmd'];a16_0x525c=function(){return _0x2563b6;};return a16_0x525c();}import{cookieFile}from'../auth/constant.js';export function logout(){var _0x65cb4c=a16_0x4cc7;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x65cb4c(0x10b)]('โ\x20Logged\x20out')):console[_0x65cb4c(0x10b)]('!\x20Not\x20logged\x20in');}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a17_0xb68d(_0x2965c5,_0x4b56d3){_0x2965c5=_0x2965c5-0x187;const _0x581179=a17_0x5811();let _0xb68d71=_0x581179[_0x2965c5];return _0xb68d71;}(function(_0x2d9951,_0x2e4743){const _0x574fd5=a17_0xb68d,_0x1b514c=_0x2d9951();while(!![]){try{const _0xe36709=-parseInt(_0x574fd5(0x18b))/0x1+parseInt(_0x574fd5(0x191))/0x2+parseInt(_0x574fd5(0x18e))/0x3*(-parseInt(_0x574fd5(0x189))/0x4)+parseInt(_0x574fd5(0x18f))/0x5*(parseInt(_0x574fd5(0x18d))/0x6)+-parseInt(_0x574fd5(0x192))/0x7*(-parseInt(_0x574fd5(0x18c))/0x8)+parseInt(_0x574fd5(0x190))/0x9*(parseInt(_0x574fd5(0x18a))/0xa)+parseInt(_0x574fd5(0x187))/0xb*(-parseInt(_0x574fd5(0x188))/0xc);if(_0xe36709===_0x2e4743)break;else _0x1b514c['push'](_0x1b514c['shift']());}catch(_0x32e9ce){_0x1b514c['push'](_0x1b514c['shift']());}}}(a17_0x5811,0x1d829));export const dynamicCliFlags={'enableBffSave':{'type':'boolean'}};function a17_0x5811(){const _0x1ed5fe=['52386GFEKjT','396426vEXwEG','80YGXLGP','156429qFAXVV','272848YVZEWe','56IdIjWD','113014UZcwsx','156RFpQQH','4nRfBMH','70cTvgwJ','109546NXZuYv','98336rAVqJI'];a17_0x5811=function(){return _0x1ed5fe;};return a17_0x5811();}
|