@lovrabet/rabetbase-cli 2.5.5-beta.2 โ 2.5.5-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.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-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +3 -3
- package/skills/rabetbase/guides/independent-deployment.md +11 -1
- package/skills/rabetbase/references/rabetbase-config.md +16 -19
- package/skills/rabetbase/references/rabetbase-menu-visibility-update.md +5 -4
- package/skills/rabetbase/references/rabetbase-workspace.md +3 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x36cc89=a0_0x2de4;(function(_0x5c00a1,_0x4c863f){const _0x82bf58=a0_0x2de4,_0x7a7e55=_0x5c00a1();while(!![]){try{const _0x14fc51=parseInt(_0x82bf58(0xef))/0x1*(-parseInt(_0x82bf58(0xe7))/0x2)+parseInt(_0x82bf58(0xe9))/0x3*(parseInt(_0x82bf58(0xdf))/0x4)+-parseInt(_0x82bf58(0xf2))/0x5*(-parseInt(_0x82bf58(0xe6))/0x6)+parseInt(_0x82bf58(0xd6))/0x7*(parseInt(_0x82bf58(0xe8))/0x8)+-parseInt(_0x82bf58(0xf6))/0x9+-parseInt(_0x82bf58(0xe0))/0xa+-parseInt(_0x82bf58(0xe4))/0xb;if(_0x14fc51===_0x4c863f)break;else _0x7a7e55['push'](_0x7a7e55['shift']());}catch(_0x49c7e7){_0x7a7e55['push'](_0x7a7e55['shift']());}}}(a0_0x2a86,0x9a4d3));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x3256a3 from'node:path';function a0_0x2a86(){const _0x3a68bf=['.md\x20(','5hifaGm','Failed\x20to\x20generate\x20docs:\x20','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','name','4528134EgtrAC','7pcqtVU','.md\x20-\x20','log','datasetCode','error','./docs','success','join','message','4058264rydyuU','2269260qOoaoR','Generated\x20docs\x20successfully:\x20','.md','Waiting\x203\x20seconds...\x0a','2459644bftxaq','โ\x20Generated:\x20','1931334JKsMXY','4heFXBJ','4080784MijGeE','3fvwyNL','length','utf8','push',']\x20Generating:\x20','โ\x20Failed:\x20','130439ArmPNp','api-doc'];a0_0x2a86=function(){return _0x3a68bf;};return a0_0x2a86();}import{fetchDatasetDoc}from'../core/api-client.js';import{logger}from'../utils/logger.js';function a0_0x2de4(_0xa11306,_0x43110a){_0xa11306=_0xa11306-0xd6;const _0x2a86f1=a0_0x2a86();let _0x2de47f=_0x2a86f1[_0xa11306];return _0x2de47f;}export{fetchDatasetDoc}from'../core/api-client.js';function delay(_0x4eaa8a){return new Promise(_0x2bbb79=>setTimeout(_0x2bbb79,_0x4eaa8a));}export async function generateDatasetDocs(_0x28461c,_0x26e470,_0x504936,_0x22bf62=a0_0x36cc89(0xdb),_0x5b36a3,_0x203e03){const _0x22ac52=a0_0x36cc89;mkdirSync(_0x22bf62,{'recursive':!![]});const _0x5581e9=[],_0x484510=_0x28461c['length'];console['log']('\x0a'+_0x484510+_0x22ac52(0xf4));for(let _0x171fad=0x0;_0x171fad<_0x28461c[_0x22ac52(0xea)];_0x171fad++){const _0x442237=_0x28461c[_0x171fad],_0x34d2a9=_0x171fad+0x1,_0x3957ec=_0x442237['tableName'];try{console['log']('['+_0x34d2a9+'/'+_0x484510+_0x22ac52(0xed)+_0x3957ec+_0x22ac52(0xf1)+_0x442237['name']+')');if(_0x5b36a3)_0x5b36a3(_0x34d2a9,_0x484510,_0x3957ec);const _0x281049=await fetchDatasetDoc({'appCode':_0x26e470,'cookie':_0x504936,'datasetCode':_0x442237['datasetCode'],'datasetId':_0x442237['id'],'enableAI':![],'extraParams':_0x203e03}),_0x19fabe=a0_0x3256a3[_0x22ac52(0xdd)](_0x22bf62,_0x3957ec+_0x22ac52(0xe2));writeFileSync(_0x19fabe,_0x281049,{'encoding':_0x22ac52(0xeb)}),console[_0x22ac52(0xd8)](_0x22ac52(0xe5)+_0x3957ec+_0x22ac52(0xe2)),logger[_0x22ac52(0xdc)](_0x22ac52(0xf0),_0x22ac52(0xe1)+_0x3957ec,undefined,{'datasetCode':_0x442237[_0x22ac52(0xd9)],'datasetName':_0x442237[_0x22ac52(0xf5)],'filePath':_0x19fabe,'progress':_0x34d2a9+'/'+_0x484510}),_0x5581e9[_0x22ac52(0xec)]({'datasetCode':_0x442237[_0x22ac52(0xd9)],'datasetName':_0x442237['name'],'filePath':_0x19fabe,'success':!![]});if(_0x34d2a9<_0x484510)await delay(0x1388);}catch(_0xb5a94c){const _0x418825=_0xb5a94c instanceof Error?_0xb5a94c[_0x22ac52(0xde)]:String(_0xb5a94c);console[_0x22ac52(0xd8)](_0x22ac52(0xee)+_0x3957ec+_0x22ac52(0xd7)+_0x418825),logger[_0x22ac52(0xda)](_0x22ac52(0xf0),_0x22ac52(0xf3)+_0x442237[_0x22ac52(0xd9)],{'datasetCode':_0x442237[_0x22ac52(0xd9)],'datasetName':_0x442237[_0x22ac52(0xf5)],'error':_0x418825,'progress':_0x34d2a9+'/'+_0x484510}),_0x5581e9[_0x22ac52(0xec)]({'datasetCode':_0x442237[_0x22ac52(0xd9)],'datasetName':_0x442237[_0x22ac52(0xf5)],'filePath':'','success':![],'error':_0x418825}),_0x34d2a9<_0x484510&&(console[_0x22ac52(0xd8)](_0x22ac52(0xe3)),await delay(0xbb8));}}return _0x5581e9;}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a1_0x26ba8b=a1_0x4f59;(function(_0x20a166,_0x1caac4){const _0x5ea3bb=a1_0x4f59,_0x2fdd28=_0x20a166();while(!![]){try{const _0x4d080e=parseInt(_0x5ea3bb(0x125))/0x1*(parseInt(_0x5ea3bb(0x11d))/0x2)+-parseInt(_0x5ea3bb(0x11c))/0x3*(-parseInt(_0x5ea3bb(0x135))/0x4)+-parseInt(_0x5ea3bb(0x124))/0x5*(parseInt(_0x5ea3bb(0x139))/0x6)+parseInt(_0x5ea3bb(0x133))/0x7+-parseInt(_0x5ea3bb(0x12a))/0x8*(-parseInt(_0x5ea3bb(0x126))/0x9)+-parseInt(_0x5ea3bb(0x119))/0xa*(-parseInt(_0x5ea3bb(0x136))/0xb)+-parseInt(_0x5ea3bb(0x134))/0xc;if(_0x4d080e===_0x1caac4)break;else _0x2fdd28['push'](_0x2fdd28['shift']());}catch(_0x4a9457){_0x2fdd28['push'](_0x2fdd28['shift']());}}}(a1_0x49ec,0xb209e));function a1_0x4f59(_0x58a4b0,_0x1e1e4c){_0x58a4b0=_0x58a4b0-0x116;const _0x49ecb2=a1_0x49ec();let _0x4f594c=_0x49ecb2[_0x58a4b0];return _0x4f594c;}import a1_0x1c06e6 from'node:path';import{CliErrors}from'../errors.js';export function normalizeApiDir(_0x2d189e,_0x4f6c59=process['cwd']()){const _0x3d5084=a1_0x4f59;return a1_0x1c06e6[_0x3d5084(0x137)](_0x4f6c59,_0x2d189e);}function a1_0x49ec(){const _0x3c8d5d=['145468PFnaAg','1177OArlGV','resolve','length','138rMfsOc','flatMap','filter','map','87290TGHQoC','size','cwd','54iklJya','1456042Srpkdv','app','get','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','name','.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.','set','259820jjfIFP','1bNXACh','2010123NyirzR','validation','trim','\x22\x20resolves\x20to\x20multiple\x20API\x20directories.','24taJmEX','Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.','outputDir','some','apiGroup','add','normalizedApiDir','join','Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20','1701490sVuJff','15663876NoeFwQ'];a1_0x49ec=function(){return _0x3c8d5d;};return a1_0x49ec();}function normalizedApiGroup(_0x38d384){const _0x5db991=a1_0x4f59,_0x48795c=_0x38d384?.[_0x5db991(0x128)]();return _0x48795c||undefined;}export function resolveApiProfileLayouts(_0xf86422,_0x2f9306,_0x214937=process[a1_0x26ba8b(0x11b)]()){const _0x32316a=a1_0x26ba8b,_0x4123c0=_0xf86422[_0x32316a(0x118)](_0x379cc1=>{const _0xf5eb3f=_0x32316a,_0x59a5e8=_0x2f9306(_0x379cc1);return{'app':_0x379cc1,'outputDir':_0x59a5e8,'normalizedApiDir':normalizeApiDir(_0x59a5e8,_0x214937),'apiGroup':normalizedApiGroup(_0x379cc1[_0xf5eb3f(0x12e)])};}),_0x111ef9=new Map();for(const _0x283a23 of _0x4123c0){if(!_0x283a23[_0x32316a(0x12e)])continue;const _0x3efbe6=_0x111ef9[_0x32316a(0x11f)](_0x283a23['apiGroup'])??new Set();_0x3efbe6[_0x32316a(0x12f)](_0x283a23[_0x32316a(0x130)]),_0x111ef9[_0x32316a(0x123)](_0x283a23[_0x32316a(0x12e)],_0x3efbe6);}for(const [_0x1b1fe7,_0x58e824]of _0x111ef9){if(_0x58e824[_0x32316a(0x11a)]>0x1)throw CliErrors[_0x32316a(0x127)]('API\x20group\x20\x22'+_0x1b1fe7+_0x32316a(0x129),_0x32316a(0x12b));}const _0x10f204=new Map();for(const _0x5e9dc5 of _0x4123c0){const _0x138421=_0x10f204[_0x32316a(0x11f)](_0x5e9dc5[_0x32316a(0x130)])??[];_0x138421['push'](_0x5e9dc5),_0x10f204[_0x32316a(0x123)](_0x5e9dc5[_0x32316a(0x130)],_0x138421);}for(const _0x3f1291 of _0x10f204['values']()){const _0x5570db=new Set(_0x3f1291[_0x32316a(0x116)](_0x47ca65=>_0x47ca65[_0x32316a(0x12e)]?[_0x47ca65[_0x32316a(0x12e)]]:[]));if(_0x5570db[_0x32316a(0x11a)]===0x0)continue;if(_0x5570db[_0x32316a(0x11a)]>0x1||_0x3f1291[_0x32316a(0x12d)](_0x2cb934=>!_0x2cb934[_0x32316a(0x12e)])){const _0x4dd3ce=_0x3f1291[_0x32316a(0x118)](_0x2ff889=>_0x2ff889[_0x32316a(0x11e)][_0x32316a(0x121)])[_0x32316a(0x131)](',\x20');throw CliErrors[_0x32316a(0x127)]('API\x20directory\x20\x22'+_0x3f1291[0x0][_0x32316a(0x12c)]+_0x32316a(0x120),_0x32316a(0x132)+_0x4dd3ce+_0x32316a(0x122));}}return _0x4123c0;}export function getRegistryGroup(_0x168746,_0x3e7fe2){const _0x52f7cb=a1_0x26ba8b;if(_0x3e7fe2[_0x52f7cb(0x12e)])return _0x168746[_0x52f7cb(0x117)](_0x2c305d=>_0x2c305d[_0x52f7cb(0x12e)]===_0x3e7fe2[_0x52f7cb(0x12e)]);const _0x2dc9d2=_0x168746[_0x52f7cb(0x117)](_0x5c729b=>_0x5c729b[_0x52f7cb(0x130)]===_0x3e7fe2[_0x52f7cb(0x130)]);return _0x2dc9d2[_0x52f7cb(0x138)]===0x1?_0x2dc9d2:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a2_0x10d9(){var _0x347287=['6fJJBNC','10LPwuZC','1599899fTrHhM','667005soqNfp','504714ciSfJw','1006930VTvPQz','45MEcAHe','999296OnrWpD','721388vNHSQg','912658zAgXwC'];a2_0x10d9=function(){return _0x347287;};return a2_0x10d9();}(function(_0x5b9086,_0x13de77){var _0x171d06=a2_0x4cec,_0x2096e3=_0x5b9086();while(!![]){try{var _0x49c1a9=-parseInt(_0x171d06(0x1e9))/0x1+parseInt(_0x171d06(0x1e5))/0x2*(parseInt(_0x171d06(0x1e6))/0x3)+parseInt(_0x171d06(0x1e4))/0x4*(-parseInt(_0x171d06(0x1e7))/0x5)+parseInt(_0x171d06(0x1ea))/0x6+parseInt(_0x171d06(0x1e8))/0x7+parseInt(_0x171d06(0x1e3))/0x8+parseInt(_0x171d06(0x1e2))/0x9*(parseInt(_0x171d06(0x1e1))/0xa);if(_0x49c1a9===_0x13de77)break;else _0x2096e3['push'](_0x2096e3['shift']());}catch(_0x4e9516){_0x2096e3['push'](_0x2096e3['shift']());}}}(a2_0x10d9,0xc9a9c));function a2_0x4cec(_0x1313a5,_0x280dce){_0x1313a5=_0x1313a5-0x1e1;var _0x10d920=a2_0x10d9();var _0x4cecfa=_0x10d920[_0x1313a5];return _0x4cecfa;}export{fetchModelList}from'../core/api-client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a3_0xeb0f(_0x5ab879,_0x3221f2){_0x5ab879=_0x5ab879-0x1ab;const _0x53f894=a3_0x53f8();let _0xeb0f3a=_0x53f894[_0x5ab879];return _0xeb0f3a;}(function(_0x26d7b9,_0x39a0d7){const _0x411627=a3_0xeb0f,_0x324eb4=_0x26d7b9();while(!![]){try{const _0x469bf7=-parseInt(_0x411627(0x1b7))/0x1+-parseInt(_0x411627(0x1b0))/0x2+parseInt(_0x411627(0x1b9))/0x3+-parseInt(_0x411627(0x1b5))/0x4+parseInt(_0x411627(0x1ce))/0x5*(parseInt(_0x411627(0x1bf))/0x6)+-parseInt(_0x411627(0x1d2))/0x7+-parseInt(_0x411627(0x1b8))/0x8*(-parseInt(_0x411627(0x1be))/0x9);if(_0x469bf7===_0x39a0d7)break;else _0x324eb4['push'](_0x324eb4['shift']());}catch(_0x3019a4){_0x324eb4['push'](_0x324eb4['shift']());}}}(a3_0x53f8,0x343b3));import a3_0x116c45 from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x58b62b from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';import{generateSdkConfigFile}from'../api/generate-sdk-config-file.js';import{MODEL_REGISTRY_FILE_NAME,MODEL_RUNTIME_FILE_NAME,updateModelRegistry}from'../api/model-registry-file.js';function a3_0x53f8(){const _0x496edb=['replace','1643572Lkphoa','init-api','api.ts.tpl','client','format','allowEmptyModelReplacement','LOVRABET','CONFIG_NAMES.DEFAULT','tableName','Please\x20configure\x20app\x20code\x20first\x20via\x20`','typescript','api','basename','utf8','none','missing','includes','dirname','553982sNEACD','key','preserved','APP_','API\x20scaffold\x20written.','929220BqYHjJ','\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.','323054UqosHD','8KTPhgo','698001YzARjq','stringify','modelRuntime','map','success','9083871yiUvnb','78198nILynw','modelProfile','path','test','../..','name','alias','action','LOVRABET_RUNTIME_DOMAIN','resolve','defaultName','.ts','-client','join','\x20config\x20set\x20app\x20<value>`','15TatpfH','datasetCode','created'];a3_0x53f8=function(){return _0x496edb;};return a3_0x53f8();}import{renderModelRegistryScaffold}from'../api/model-registry-scaffold.js';function fileAction(_0x59d21c,_0x18f773){const _0x3c8190=a3_0xeb0f;if(!_0x18f773)return _0x59d21c?_0x3c8190(0x1b2):'missing';return _0x59d21c?'overwritten':_0x3c8190(0x1d0);}export async function generateApiFile(_0x550cd6,_0x2d49d3,_0xfec181,_0x133d8e,_0x382110,_0x444ae2,_0x23a1b8,_0xf6c5f0={},_0x5cc17c={}){const _0x177971=a3_0xeb0f;if(!_0xfec181)throw new Error(_0x177971(0x1db)+CLI_BIN_NAME+_0x177971(0x1cd));const _0x50424a=_0x133d8e&&!_0x23a1b8,_0x32bba2=!!_0x5cc17c[_0x177971(0x1c0)],_0x43bb1a=_0x32bba2||_0x50424a,_0x391cbb=_0x23a1b8||_0xfec181,_0x213ba2=_0x32bba2||_0x50424a?'default':_0x391cbb,_0x3f2753=_0x32bba2||_0x50424a?_0x177971(0x1d9):JSON[_0x177971(0x1ba)](_0x391cbb),_0x5d9a60=!isProduction(_0x382110),_0x37bb28=_0x5d9a60?',\x20env:\x20'+JSON['stringify'](_0x382110):'',_0xa46e0c='{\x20apiConfigName:\x20'+_0x3f2753+_0x37bb28+',\x20...LOVRABET_SDK_CONFIG\x20}',_0xd79c21=_0x32bba2?'':_0x2d49d3,_0x59fdf2=_0xd79c21?_0xd79c21+'-api':_0x177971(0x1dd),_0x6864d1=_0xd79c21?_0xd79c21+_0x177971(0x1cb):_0x177971(0x1d5),_0x39dad0=_0xd79c21&&!/^app-[a-f0-9]+$/i[_0x177971(0x1c2)](_0xd79c21)?_0xd79c21[_0x177971(0x1d1)](/-/g,'_')['toUpperCase']():_0x177971(0x1d8),_0x20ee3a=/^\d/[_0x177971(0x1c2)](_0x39dad0)?_0x177971(0x1b3)+_0x39dad0:_0x39dad0,_0x31ec30=_0x550cd6[_0x177971(0x1bc)](_0xbc4126=>({'datasetCode':_0xbc4126[_0x177971(0x1cf)],'tableName':_0xbc4126[_0x177971(0x1da)],'name':_0xbc4126[_0x177971(0x1c4)]||'','alias':_0xbc4126[_0x177971(0x1c5)]||_0xbc4126[_0x177971(0x1b1)]})),_0x477b98=fileURLToPath(import.meta.url),_0x7a48f5=a3_0x58b62b[_0x177971(0x1c8)](a3_0x58b62b[_0x177971(0x1af)](_0x477b98),_0x177971(0x1c3)),_0xc980f5=a3_0x58b62b['join'](_0x7a48f5,'templates/generate-api'),_0x9982c9=a3_0x58b62b[_0x177971(0x1cc)](_0xc980f5,_0x177971(0x1d4)),_0x56b174=a3_0x58b62b[_0x177971(0x1cc)](_0xc980f5,'client.ts.tpl'),_0xd29395=_0x444ae2;mkdirSync(_0xd29395,{'recursive':!![]});const _0x5baf81=_0x32bba2?{}:_0xf6c5f0,_0x4556ee=await generateSdkConfigFile(_0xd29395,_0x5baf81,_0xd79c21),_0x2cdc5e=a3_0x58b62b[_0x177971(0x1de)](_0x4556ee,_0x177971(0x1ca)),_0x3e3d27=a3_0x58b62b[_0x177971(0x1cc)](_0xd29395,_0x59fdf2+_0x177971(0x1ca)),_0x4e0cde=a3_0x58b62b[_0x177971(0x1cc)](_0xd29395,_0x6864d1+_0x177971(0x1ca)),_0x3b07b2=_0x5cc17c['overwriteTypescript']===!![],_0x1fc897=existsSync(_0x3e3d27),_0x3fc379=existsSync(_0x4e0cde),_0x52f79e=_0x5cc17c['scaffoldMode']??(_0x3b07b2?_0x177971(0x1d1):_0x177971(0x1ad)),_0x12bb05=_0x52f79e===_0x177971(0x1d1)||_0x52f79e===_0x177971(0x1ad)&&!_0x1fc897,_0x5d4f7c=_0x52f79e===_0x177971(0x1d1)||_0x52f79e===_0x177971(0x1ad)&&!_0x3fc379,_0x24c96e=_0x5cc17c['modelProfile']?updateModelRegistry({'outputDir':_0xd29395,'profileName':_0x5cc17c[_0x177971(0x1c0)]['name'],'defaultProfile':_0x5cc17c[_0x177971(0x1c0)][_0x177971(0x1c9)],'appCode':_0xfec181,'runtimeDomain':_0x5cc17c['modelProfile']['runtimeDomain'],'models':_0x31ec30,'allowEmptyReplacement':_0x5cc17c[_0x177971(0x1d7)]===!![]}):undefined,_0x15bd85=_0x24c96e?a3_0x58b62b[_0x177971(0x1cc)](_0xd29395,MODEL_RUNTIME_FILE_NAME):undefined,_0x3ad4cb=_0x15bd85?existsSync(_0x15bd85):![],_0x570637=_0x32bba2&&_0x52f79e!==_0x177971(0x1ac)?await renderModelRegistryScaffold(_0xd29395):undefined;_0x15bd85&&_0x570637&&writeFileSync(_0x15bd85,_0x570637[_0x177971(0x1bb)],_0x177971(0x1ab));const _0x324fb0=_0x31ec30[0x0]?.[_0x177971(0x1c5)];if(_0x12bb05){const _0x5aa408=_0x570637?.[_0x177971(0x1dd)]??readFileSync(_0x9982c9,'utf8'),_0x291df9=_0x32bba2?_0x5aa408:TemplateReplacer['replaceApiContent'](_0x5aa408,_0xfec181,_0x31ec30,_0x324fb0,_0x59fdf2,_0x3f2753,undefined,_0x20ee3a);writeFileSync(_0x3e3d27,await a3_0x116c45[_0x177971(0x1d6)](_0x291df9,{'parser':_0x177971(0x1dc)}),{'encoding':_0x177971(0x1ab)});}if(_0x5d4f7c){const _0x8f194f=_0x570637?.['client']??readFileSync(_0x56b174,_0x177971(0x1ab)),_0x190adb=_0x32bba2?_0x8f194f:TemplateReplacer['replaceApiContent'](_0x8f194f,_0xfec181,_0x31ec30,_0x324fb0,_0x59fdf2,_0x3f2753,_0xa46e0c,_0x20ee3a,_0x2cdc5e);writeFileSync(_0x4e0cde,await a3_0x116c45[_0x177971(0x1d6)](_0x190adb,{'parser':_0x177971(0x1dc)}),{'encoding':_0x177971(0x1ab)});}const _0x35bfc3=_0x31ec30['length'],_0x42a170={'api':{'path':_0x3e3d27,'action':fileAction(_0x1fc897,_0x12bb05)},'client':{'path':_0x4e0cde,'action':fileAction(_0x3fc379,_0x5d4f7c)},'sdkConfig':{'path':_0x4556ee,'action':'refreshed'},..._0x24c96e?{'modelRegistry':{'path':_0x24c96e[_0x177971(0x1c1)],'action':_0x24c96e['existed']?'refreshed':'created'},'modelRuntime':{'path':_0x15bd85,'action':_0x570637?_0x3ad4cb?'refreshed':_0x177971(0x1d0):_0x3ad4cb?_0x177971(0x1b2):_0x177971(0x1ad)}}:{}},_0x50cc1b=existsSync(_0x3e3d27)&&readFileSync(_0x3e3d27,_0x177971(0x1ab))[_0x177971(0x1ae)](MODEL_REGISTRY_FILE_NAME['replace'](_0x177971(0x1ca),'')),_0x44eabc=existsSync(_0x4e0cde)&&readFileSync(_0x4e0cde,'utf8')['includes'](_0x177971(0x1c7)),_0x6f6d97=_0x32bba2?!_0x50cc1b||!_0x44eabc||!existsSync(_0x15bd85):![],_0x51745a=_0x32bba2?_0x6f6d97:_0x42a170[_0x177971(0x1dd)][_0x177971(0x1c6)]===_0x177971(0x1b2)||_0x42a170[_0x177971(0x1d5)][_0x177971(0x1c6)]==='preserved';return logger[_0x177971(0x1bd)](_0x177971(0x1d3),_0x51745a?a3_0x58b62b[_0x177971(0x1de)](_0x4556ee)+_0x177971(0x1b6):_0x32bba2?'Model\x20facts\x20refreshed.':_0x177971(0x1b4),undefined,{'apiFile':_0x3e3d27,'clientFile':_0x4e0cde,'sdkConfig':_0x4556ee,'modelCount':_0x35bfc3,'configName':_0x213ba2,'isDefaultConfig':_0x43bb1a,'needsAgentMerge':_0x51745a,'needsProjectUpgrade':_0x6f6d97,'files':_0x42a170}),{'appCode':_0xfec181,'modelCount':_0x35bfc3,'models':_0x31ec30,'apiFilePath':_0x3e3d27,'clientFilePath':_0x4e0cde,'sdkConfigPath':_0x4556ee,'modelRegistryPath':_0x24c96e?.[_0x177971(0x1c1)],'modelRuntimePath':_0x15bd85,'modelProfile':_0x5cc17c[_0x177971(0x1c0)]?.[_0x177971(0x1c4)],'configName':_0x213ba2,'isDefaultConfig':_0x43bb1a,'sdkRouting':_0x5baf81,'files':_0x42a170,'needsAgentMerge':_0x51745a,'needsProjectUpgrade':_0x6f6d97};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a4_0x289b89=a4_0x5c9a;(function(_0x5c13c0,_0x6d06e7){const _0x1030bc=a4_0x5c9a,_0x13edcc=_0x5c13c0();while(!![]){try{const _0x299bcf=-parseInt(_0x1030bc(0x1d1))/0x1+parseInt(_0x1030bc(0x1cd))/0x2*(parseInt(_0x1030bc(0x1c4))/0x3)+-parseInt(_0x1030bc(0x1c5))/0x4+-parseInt(_0x1030bc(0x1cb))/0x5+parseInt(_0x1030bc(0x1c8))/0x6+-parseInt(_0x1030bc(0x1c0))/0x7+-parseInt(_0x1030bc(0x1c9))/0x8*(-parseInt(_0x1030bc(0x1d5))/0x9);if(_0x299bcf===_0x6d06e7)break;else _0x13edcc['push'](_0x13edcc['shift']());}catch(_0x10bf98){_0x13edcc['push'](_0x13edcc['shift']());}}}(a4_0x27cb,0xb31be));import{mkdirSync,writeFileSync}from'node:fs';import a4_0x137f9d from'node:path';function a4_0x5c9a(_0x46fc3d,_0x53c8b7){_0x46fc3d=_0x46fc3d-0x1bf;const _0x27cb12=a4_0x27cb();let _0x5c9a87=_0x27cb12[_0x46fc3d];return _0x5c9a87;}function a4_0x27cb(){const _0x54b71d=['6910254UiQltS','21816rMqBUO','/**\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','5740330EUbLQU','runtimeDomain:\x20','54122ZXYaRz','stringify','-sdk-config.ts','\x20as\x20const;\x0a','355296lUQJlQ','runtimeDomain','join','sdk-config.ts','6183TNvjOf',',\x0a}','5399128RwBeQz',',\x0a\x20\x20','length','utf8','147gpfCnX','5371404OmfRgh','format','push'];a4_0x27cb=function(){return _0x54b71d;};return a4_0x27cb();}import a4_0x199000 from'prettier';export const SDK_CONFIG_FILE_NAME=a4_0x289b89(0x1d4);export function getSdkConfigFileName(_0x56a953=''){const _0x563479=a4_0x289b89;return _0x56a953?_0x56a953+_0x563479(0x1cf):SDK_CONFIG_FILE_NAME;}export async function generateSdkConfigFile(_0x4fd8ce,_0x585816={},_0x4bb75e=''){const _0x53b086=a4_0x289b89,_0x32b54d=[];_0x585816[_0x53b086(0x1d2)]&&_0x32b54d[_0x53b086(0x1c7)](_0x53b086(0x1cc)+JSON[_0x53b086(0x1ce)](_0x585816['runtimeDomain']));const _0x688884=_0x32b54d[_0x53b086(0x1c2)]>0x0?'{\x0a\x20\x20'+_0x32b54d[_0x53b086(0x1d3)](_0x53b086(0x1c1))+_0x53b086(0x1bf):'{}',_0x1bd715=_0x53b086(0x1ca)+_0x688884+_0x53b086(0x1d0);mkdirSync(_0x4fd8ce,{'recursive':!![]});const _0x16cecd=a4_0x137f9d[_0x53b086(0x1d3)](_0x4fd8ce,getSdkConfigFileName(_0x4bb75e));return writeFileSync(_0x16cecd,await a4_0x199000[_0x53b086(0x1c6)](_0x1bd715,{'parser':'typescript'}),_0x53b086(0x1c3)),_0x16cecd;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2e55df,_0x3a187c){const _0xc1ba61=a5_0x325f,_0x4a172e=_0x2e55df();while(!![]){try{const _0x4b12ee=-parseInt(_0xc1ba61(0xe5))/0x1+-parseInt(_0xc1ba61(0xe4))/0x2*(parseInt(_0xc1ba61(0xe1))/0x3)+parseInt(_0xc1ba61(0xd2))/0x4*(-parseInt(_0xc1ba61(0xd8))/0x5)+parseInt(_0xc1ba61(0xd5))/0x6+-parseInt(_0xc1ba61(0xe3))/0x7+parseInt(_0xc1ba61(0xcd))/0x8*(-parseInt(_0xc1ba61(0xdf))/0x9)+-parseInt(_0xc1ba61(0xdc))/0xa*(-parseInt(_0xc1ba61(0xda))/0xb);if(_0x4b12ee===_0x3a187c)break;else _0x4a172e['push'](_0x4a172e['shift']());}catch(_0x402675){_0x4a172e['push'](_0x4a172e['shift']());}}}(a5_0x631f,0x1ad21));export function parseLegacyApiModels(_0xdc5496){const _0x1f7f62=a5_0x325f,_0x512fde=[],_0xc91c9a=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x566dcf;while((_0x566dcf=_0xc91c9a[_0x1f7f62(0xd7)](_0xdc5496))!==null){_0x512fde[_0x1f7f62(0xde)]({'datasetCode':_0x566dcf[0x1],'tableName':_0x566dcf[0x2],'name':_0x566dcf[0x3],'alias':_0x566dcf[0x4]});}return _0x512fde;}export function parseLegacyApiAppCode(_0x1888f5){const _0x4d788f=a5_0x325f;return _0x1888f5[_0x4d788f(0xe7)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function a5_0x325f(_0x1b928f,_0xd04eeb){_0x1b928f=_0x1b928f-0xcd;const _0x631f2=a5_0x631f();let _0x325f31=_0x631f2[_0x1b928f];return _0x325f31;}function stripComments(_0x2727ac){const _0x224dc3=a5_0x325f;return _0x2727ac['replace'](/\/\*[\s\S]*?\*\//g,'')[_0x224dc3(0xce)](/\/\/.*$/gm,'');}export function isLegacyGeneratedApiScaffold(_0x5818bf){const _0x1aa71a=a5_0x325f;if(!_0x5818bf[_0x1aa71a(0xd0)](_0x1aa71a(0xd1)))return![];const _0x4f9c08=stripComments(_0x5818bf),_0x2a8671=[..._0x4f9c08[_0x1aa71a(0xe6)](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)][_0x1aa71a(0xd6)](_0x1994cf=>_0x1994cf[0x1]);if(_0x2a8671[_0x1aa71a(0xdb)]!==0x1||_0x2a8671[0x0]!==_0x1aa71a(0xe8))return![];const _0x3239ad=[..._0x4f9c08[_0x1aa71a(0xe6)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x1aa71a(0xd6)](_0x772877=>_0x772877[0x1]);if(_0x3239ad[_0x1aa71a(0xdb)]!==0x2||!_0x3239ad[_0x1aa71a(0xd3)](_0x2d5bee=>_0x2d5bee[_0x1aa71a(0xcf)](_0x1aa71a(0xd4)))||!_0x3239ad[_0x1aa71a(0xd3)](_0x149759=>_0x149759['endsWith'](_0x1aa71a(0xdd))))return![];const _0xfbf327=[..._0x4f9c08['matchAll'](/^([A-Za-z_$][\w$]*)\s*\(/gm)][_0x1aa71a(0xd6)](_0x42725c=>_0x42725c[0x1]);return _0xfbf327['length']===0x1&&_0xfbf327[0x0]===_0x1aa71a(0xd9);}function a5_0x631f(){const _0x168892=['test','136710uAPDny','1694GssmyB','49998nRTLMh','matchAll','match','@lovrabet/sdk','381320khmyiw','replace','endsWith','includes','Generated\x20by\x20Rabetbase\x20CLI','38560hItSDS','some','APP_CODE','774708RMVbha','map','exec','95zZUYha','registerModels','3054546FMdyaw','length','20DPMqhY','MODELS_CONFIG','push','36pwpvAw','lovrabetClient','465yPEsHn'];a5_0x631f=function(){return _0x168892;};return a5_0x631f();}export function isLegacyGeneratedClientScaffold(_0x515bdb){const _0x5214af=a5_0x325f;if(!_0x515bdb['includes'](_0x5214af(0xd1)))return![];const _0x23df0a=stripComments(_0x515bdb),_0x4ab056=[..._0x23df0a[_0x5214af(0xe6)](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)][_0x5214af(0xd6)](_0x355d0f=>_0x355d0f[0x1]);if(_0x4ab056['some'](_0x204bf6=>_0x204bf6!==_0x5214af(0xe8)&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/[_0x5214af(0xe2)](_0x204bf6??'')))return![];const _0x29cfb0=[..._0x23df0a['matchAll'](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x5214af(0xd6)](_0x4e84ed=>_0x4e84ed[0x1]);return _0x29cfb0['length']===0x1&&_0x29cfb0[0x0]===_0x5214af(0xe0);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x3fdcdf=a6_0x148d;(function(_0x1df1a6,_0x355d06){const _0xac8667=a6_0x148d,_0x192646=_0x1df1a6();while(!![]){try{const _0x7d1e65=-parseInt(_0xac8667(0x171))/0x1+-parseInt(_0xac8667(0x186))/0x2+parseInt(_0xac8667(0x190))/0x3+parseInt(_0xac8667(0x16c))/0x4+parseInt(_0xac8667(0x195))/0x5+parseInt(_0xac8667(0x1a0))/0x6*(-parseInt(_0xac8667(0x197))/0x7)+parseInt(_0xac8667(0x19d))/0x8*(parseInt(_0xac8667(0x187))/0x9);if(_0x7d1e65===_0x355d06)break;else _0x192646['push'](_0x192646['shift']());}catch(_0x3a878e){_0x192646['push'](_0x192646['shift']());}}}(a6_0x7c3a,0x93090));function a6_0x148d(_0x435d42,_0x89cdb4){_0x435d42=_0x435d42-0x169;const _0x7c3afd=a6_0x7c3a();let _0x148d16=_0x7c3afd[_0x435d42];return _0x148d16;}import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x2accac from'node:path';export const MODEL_REGISTRY_FILE_NAME='models.generated.ts';export const MODEL_RUNTIME_FILE_NAME=a6_0x3fdcdf(0x183);export const MODEL_REGISTRY_VERSION_MARKER='/*\x20rabetbase-model-registry:v2\x20*/';const LEGACY_MODEL_REGISTRY_V2_PROTOCOL='lovrabet-model-registry/v2',REGISTRY_START=a6_0x3fdcdf(0x173),REGISTRY_END=a6_0x3fdcdf(0x191);function emptyRegistry(_0x4641bd){return{'defaultProfile':_0x4641bd,'profiles':{},'models':[]};}function extractRegistryJson(_0x50d99b){const _0x866b48=a6_0x3fdcdf,_0x2b3c4f=_0x50d99b[_0x866b48(0x1ab)](REGISTRY_START),_0x50a657=_0x50d99b[_0x866b48(0x1ab)](REGISTRY_END);if(_0x2b3c4f<0x0||_0x50a657<=_0x2b3c4f)return undefined;return _0x50d99b[_0x866b48(0x189)](_0x2b3c4f+REGISTRY_START[_0x866b48(0x1a3)],_0x50a657)[_0x866b48(0x1a5)]()[_0x866b48(0x18c)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x866b48(0x18c)](/;$/,'');}function migrateLegacyRegistry(_0x236a5f){const _0x3f2d53=a6_0x3fdcdf,_0xd3c046=emptyRegistry(_0x236a5f[_0x3f2d53(0x1a6)]);for(const [_0x300326,_0x5a11ac]of Object[_0x3f2d53(0x17a)](_0x236a5f[_0x3f2d53(0x19f)])){_0xd3c046['profiles'][_0x300326]={'appCode':_0x5a11ac[_0x3f2d53(0x172)],'runtimeDomain':_0x5a11ac[_0x3f2d53(0x185)]},mergeProfileModels(_0xd3c046,_0x300326,_0x5a11ac['models']);}return _0xd3c046;}function generatedObjectLiteralToJson(_0xf500e8){const _0x378fbe=a6_0x3fdcdf;let _0x402530='',_0x27e932,_0x50daef=![],_0x500a5e;for(let _0x36ecfe=0x0;_0x36ecfe<_0xf500e8[_0x378fbe(0x1a3)];_0x36ecfe++){const _0x5d97c6=_0xf500e8[_0x36ecfe];if(_0x27e932){_0x402530+=_0x5d97c6;if(_0x50daef)_0x50daef=![];else{if(_0x5d97c6==='\x5c')_0x50daef=!![];else{if(_0x5d97c6===_0x27e932)_0x27e932=undefined;}}continue;}if(_0x5d97c6==='\x22'){_0x27e932=_0x5d97c6,_0x402530+=_0x5d97c6,_0x500a5e=_0x378fbe(0x18a);continue;}if(_0x5d97c6===','){let _0x596f86=_0x36ecfe+0x1;while(/\s/[_0x378fbe(0x196)](_0xf500e8[_0x596f86]??''))_0x596f86++;if(_0xf500e8[_0x596f86]==='}'||_0xf500e8[_0x596f86]===']')continue;_0x402530+=_0x5d97c6,_0x500a5e=',';continue;}if(_0x5d97c6==='{'||_0x5d97c6==='['){_0x402530+=_0x5d97c6,_0x500a5e=_0x5d97c6;continue;}if(_0x5d97c6==='}'||_0x5d97c6===']'){_0x402530+=_0x5d97c6,_0x500a5e=_0x5d97c6;continue;}if((_0x500a5e==='{'||_0x500a5e===',')&&/[A-Za-z_$]/['test'](_0x5d97c6)){let _0x56a74e=_0x36ecfe+0x1;while(/[A-Za-z0-9_$]/[_0x378fbe(0x196)](_0xf500e8[_0x56a74e]??''))_0x56a74e++;let _0x48be22=_0x56a74e;while(/\s/[_0x378fbe(0x196)](_0xf500e8[_0x48be22]??''))_0x48be22++;if(_0xf500e8[_0x48be22]===':'){_0x402530+=JSON['stringify'](_0xf500e8[_0x378fbe(0x189)](_0x36ecfe,_0x56a74e)),_0x36ecfe=_0x56a74e-0x1,_0x500a5e=_0x378fbe(0x193);continue;}}_0x402530+=_0x5d97c6;if(!/\s/['test'](_0x5d97c6)&&_0x5d97c6!==':')_0x500a5e=_0x378fbe(0x18a);}return _0x402530;}function parseGeneratedRegistryJson(_0xa2b4a7){const _0x400db2=a6_0x3fdcdf;try{return JSON[_0x400db2(0x194)](_0xa2b4a7);}catch{return JSON[_0x400db2(0x194)](generatedObjectLiteralToJson(_0xa2b4a7));}}function normalizeModelEntries(_0x4f12f9,_0x504418){const _0x1d0655=a6_0x3fdcdf,_0x2f7b8a=Object[_0x1d0655(0x1a2)](_0x4f12f9),_0x42167b=[];for(const _0x504d0d of _0x504418){if(!_0x504d0d||typeof _0x504d0d!==_0x1d0655(0x17c)||Array[_0x1d0655(0x17e)](_0x504d0d))return undefined;const _0x36ca94=_0x504d0d;if(typeof _0x36ca94[_0x1d0655(0x179)]!==_0x1d0655(0x1a4)||typeof _0x36ca94[_0x1d0655(0x192)]!==_0x1d0655(0x1a4)||typeof _0x36ca94[_0x1d0655(0x19e)]!==_0x1d0655(0x1a4))return undefined;let _0x2fccad;if(typeof _0x36ca94[_0x1d0655(0x18f)]===_0x1d0655(0x1a4)&&_0x36ca94[_0x1d0655(0x170)]===undefined)_0x2fccad=Object[_0x1d0655(0x19c)](_0x2f7b8a['map'](_0x556870=>[_0x556870,_0x36ca94[_0x1d0655(0x18f)]]));else{if(_0x36ca94[_0x1d0655(0x18f)]===undefined&&_0x36ca94[_0x1d0655(0x170)]&&typeof _0x36ca94[_0x1d0655(0x170)]===_0x1d0655(0x17c)&&!Array[_0x1d0655(0x17e)](_0x36ca94[_0x1d0655(0x170)])&&Object['values'](_0x36ca94[_0x1d0655(0x170)])[_0x1d0655(0x181)](_0x57b2d9=>typeof _0x57b2d9==='string'))_0x2fccad={..._0x36ca94[_0x1d0655(0x170)]};else return undefined;}_0x42167b['push']({'alias':_0x36ca94[_0x1d0655(0x179)],'tableName':_0x36ca94[_0x1d0655(0x192)],'name':_0x36ca94['name'],'datasetCodes':_0x2fccad});}return _0x42167b;}export function parseModelRegistry(_0x43faf1){const _0x40b5c1=a6_0x3fdcdf,_0x3bd928=extractRegistryJson(_0x43faf1);if(!_0x3bd928)return undefined;try{const _0x132cda=parseGeneratedRegistryJson(_0x3bd928);if(typeof _0x132cda[_0x40b5c1(0x1a6)]!==_0x40b5c1(0x1a4)||!_0x132cda['profiles']||typeof _0x132cda[_0x40b5c1(0x19f)]!==_0x40b5c1(0x17c))return undefined;if(_0x132cda[_0x40b5c1(0x176)]==='lovrabet-model-registry/v1')return migrateLegacyRegistry(_0x132cda);if(!(_0x132cda[_0x40b5c1(0x176)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x132cda[_0x40b5c1(0x176)]===undefined&&_0x43faf1['includes'](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x40b5c1(0x17e)](_0x132cda[_0x40b5c1(0x178)]))return undefined;const _0x7e7270=_0x132cda[_0x40b5c1(0x19f)],_0x4f7c69=normalizeModelEntries(_0x7e7270,_0x132cda[_0x40b5c1(0x178)]);if(!_0x4f7c69)return undefined;return{'defaultProfile':_0x132cda['defaultProfile'],'profiles':_0x7e7270,'models':_0x4f7c69};}catch{return undefined;}}export function readModelRegistry(_0x17c3b8){const _0x268c2d=a6_0x3fdcdf;if(!existsSync(_0x17c3b8))return undefined;try{return parseModelRegistry(readFileSync(_0x17c3b8,_0x268c2d(0x1ad)));}catch{return undefined;}}function registrySource(_0x1a3b9e){const _0x278a64=a6_0x3fdcdf,_0x2bc7da=Object[_0x278a64(0x1a2)](_0x1a3b9e[_0x278a64(0x19f)]),_0x2ecf6e=_0x1a3b9e[_0x278a64(0x178)]['map'](_0x29c7a4=>{const _0x384963=_0x278a64,_0x2f2772=_0x2bc7da[_0x384963(0x1a7)](_0x5d54c5=>_0x29c7a4[_0x384963(0x170)][_0x5d54c5]),_0x2b7833=_0x2f2772[0x0],_0x1aff02=_0x2b7833!==undefined&&_0x2f2772[_0x384963(0x181)](_0x3dba97=>_0x3dba97===_0x2b7833),_0x5a46b9={'alias':_0x29c7a4[_0x384963(0x179)],'tableName':_0x29c7a4['tableName'],'name':_0x29c7a4[_0x384963(0x19e)]};return _0x1aff02?{..._0x5a46b9,'datasetCode':_0x2b7833}:{..._0x5a46b9,'datasetCodes':_0x29c7a4[_0x384963(0x170)]};}),_0x1c14d9=JSON['stringify']({'defaultProfile':_0x1a3b9e[_0x278a64(0x1a6)],'profiles':_0x1a3b9e['profiles'],'models':_0x2ecf6e},null,0x2)[_0x278a64(0x1a9)]('\x0a')['map'](_0x510345=>'\x20\x20'+_0x510345)[_0x278a64(0x18b)]('\x0a');return _0x278a64(0x1a8)+MODEL_REGISTRY_VERSION_MARKER+'\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20'+REGISTRY_START+'\x0a'+_0x1c14d9+'\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a'+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x4f474c,_0x1fe6e1,_0x4e7b1d){const _0x4e2fd8=a6_0x3fdcdf,_0x5d5772=_0x4e7b1d[_0x4e2fd8(0x1a7)](_0x263003=>({..._0x263003,'alias':_0x263003['alias']||_0x263003[_0x4e2fd8(0x192)]})),_0x2c4862=new Map(),_0x4714c5=new Map();for(const _0x2a17ae of _0x5d5772){const _0x126e89=_0x2c4862[_0x4e2fd8(0x182)](_0x2a17ae['alias']);if(_0x126e89&&_0x126e89!==_0x2a17ae[_0x4e2fd8(0x192)])throw new Error('Model\x20alias\x20\x22'+_0x2a17ae[_0x4e2fd8(0x179)]+_0x4e2fd8(0x16e)+_0x126e89+_0x4e2fd8(0x175)+_0x2a17ae[_0x4e2fd8(0x192)]+'\x22\x20in\x20profile\x20\x22'+_0x1fe6e1+'\x22.');const _0x333743=_0x4714c5[_0x4e2fd8(0x182)](_0x2a17ae[_0x4e2fd8(0x192)]);if(_0x333743&&_0x333743!==_0x2a17ae[_0x4e2fd8(0x179)])throw new Error(_0x4e2fd8(0x17d)+_0x2a17ae[_0x4e2fd8(0x192)]+_0x4e2fd8(0x18e)+_0x333743+'\x22\x20and\x20\x22'+_0x2a17ae[_0x4e2fd8(0x179)]+'\x22\x20in\x20profile\x20\x22'+_0x1fe6e1+'\x22.');_0x2c4862[_0x4e2fd8(0x17b)](_0x2a17ae['alias'],_0x2a17ae[_0x4e2fd8(0x192)]),_0x4714c5[_0x4e2fd8(0x17b)](_0x2a17ae[_0x4e2fd8(0x192)],_0x2a17ae['alias']);const _0x36fe2e=_0x4f474c['models'][_0x4e2fd8(0x188)](_0x2e99fc=>_0x2e99fc[_0x4e2fd8(0x179)]===_0x2a17ae['alias']);if(_0x36fe2e&&_0x36fe2e['tableName']!==_0x2a17ae[_0x4e2fd8(0x192)])throw new Error(_0x4e2fd8(0x180)+_0x2a17ae[_0x4e2fd8(0x179)]+_0x4e2fd8(0x16f)+_0x36fe2e[_0x4e2fd8(0x192)]+_0x4e2fd8(0x16d)+_0x2a17ae['tableName']+_0x4e2fd8(0x17f)+_0x1fe6e1+'\x22.');const _0x56a6c8=_0x4f474c['models'][_0x4e2fd8(0x188)](_0x2d6879=>_0x2d6879[_0x4e2fd8(0x192)]===_0x2a17ae[_0x4e2fd8(0x192)]);if(_0x56a6c8&&_0x56a6c8[_0x4e2fd8(0x179)]!==_0x2a17ae[_0x4e2fd8(0x179)])throw new Error(_0x4e2fd8(0x17d)+_0x2a17ae[_0x4e2fd8(0x192)]+_0x4e2fd8(0x177)+_0x56a6c8[_0x4e2fd8(0x179)]+_0x4e2fd8(0x16d)+_0x2a17ae[_0x4e2fd8(0x179)]+_0x4e2fd8(0x17f)+_0x1fe6e1+'\x22.');}for(const _0x3618ba of _0x4f474c[_0x4e2fd8(0x178)]){delete _0x3618ba['datasetCodes'][_0x1fe6e1];}for(const _0x3c051f of _0x5d5772){let _0x122594=_0x4f474c[_0x4e2fd8(0x178)][_0x4e2fd8(0x188)](_0x4c59e7=>_0x4c59e7['alias']===_0x3c051f[_0x4e2fd8(0x179)]);!_0x122594&&(_0x122594={'alias':_0x3c051f[_0x4e2fd8(0x179)],'tableName':_0x3c051f[_0x4e2fd8(0x192)],'name':_0x3c051f['name'],'datasetCodes':{}},_0x4f474c[_0x4e2fd8(0x178)][_0x4e2fd8(0x1aa)](_0x122594)),(_0x1fe6e1===_0x4f474c[_0x4e2fd8(0x1a6)]||!_0x122594[_0x4e2fd8(0x170)][_0x4f474c[_0x4e2fd8(0x1a6)]])&&(_0x122594['alias']=_0x3c051f['alias'],_0x122594[_0x4e2fd8(0x192)]=_0x3c051f['tableName'],_0x122594[_0x4e2fd8(0x19e)]=_0x3c051f[_0x4e2fd8(0x19e)]),_0x122594['datasetCodes'][_0x1fe6e1]=_0x3c051f[_0x4e2fd8(0x18f)];}_0x4f474c[_0x4e2fd8(0x178)]=_0x4f474c[_0x4e2fd8(0x178)][_0x4e2fd8(0x169)](_0x3dadb0=>Object[_0x4e2fd8(0x1a2)](_0x3dadb0['datasetCodes'])[_0x4e2fd8(0x1a3)]>0x0);}function removeUnboundProfiles(_0x2126ef){const _0x2f9ec9=a6_0x3fdcdf,_0x320062=Object['entries'](_0x2126ef['profiles'])[_0x2f9ec9(0x169)](([,_0xb2de77])=>_0xb2de77[_0x2f9ec9(0x172)]===_0x2f9ec9(0x19b))[_0x2f9ec9(0x1a7)](([_0x3c646c])=>_0x3c646c);if(_0x320062[_0x2f9ec9(0x1a3)]===0x0)return;for(const _0x305bdb of _0x320062){delete _0x2126ef['profiles'][_0x305bdb];for(const _0xfcf226 of _0x2126ef[_0x2f9ec9(0x178)]){delete _0xfcf226['datasetCodes'][_0x305bdb];}}_0x2126ef[_0x2f9ec9(0x178)]=_0x2126ef[_0x2f9ec9(0x178)][_0x2f9ec9(0x169)](_0x3aa7db=>Object[_0x2f9ec9(0x1a2)](_0x3aa7db[_0x2f9ec9(0x170)])['length']>0x0);}export function getProfileModels(_0x28d16c,_0x457497){const _0x42fa3d=a6_0x3fdcdf;return _0x28d16c[_0x42fa3d(0x178)][_0x42fa3d(0x1a1)](_0xfd2f4f=>{const _0xb2bcb1=_0x42fa3d,_0x4be9c8=_0xfd2f4f[_0xb2bcb1(0x170)][_0x457497];return _0x4be9c8?[{'datasetCode':_0x4be9c8,'tableName':_0xfd2f4f[_0xb2bcb1(0x192)],'name':_0xfd2f4f[_0xb2bcb1(0x19e)],'alias':_0xfd2f4f[_0xb2bcb1(0x179)]}]:[];});}function a6_0x7c3a(){const _0xf52479=['\x22\x20maps\x20to\x20table\x20\x22','datasetCodes','1054785blEDCx','appCode','/*\x20rabetbase-model-registry:start\x20*/','allowEmptyReplacement','\x22\x20and\x20\x22','protocol','\x22\x20maps\x20to\x20alias\x20\x22','models','alias','entries','set','object','Table\x20\x22','isArray','\x22\x20in\x20profile\x20\x22','Model\x20alias\x20\x22','every','get','model-runtime.ts','Refusing\x20to\x20replace\x20','runtimeDomain','1435082oGKDSB','9580068tySpKQ','find','slice','value','join','replace','\x20model(s)\x20in\x20profile\x20\x22','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','datasetCode','1714902yBZtUC','/*\x20rabetbase-model-registry:end\x20*/','tableName','key','parse','697280rNahPO','test','21ZZItKi','outputDir','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','profileName','NOT-SET','fromEntries','8mJAohX','name','profiles','35610oNKNQN','flatMap','keys','length','string','trim','defaultProfile','map','/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a','split','push','indexOf','.tmp','utf8','filter','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','\x22\x20with\x20an\x20empty\x20result.\x20','2467380bnmWmR','\x22\x20in\x20the\x20registry\x20but\x20\x22','\x22\x20maps\x20to\x20both\x20\x22'];a6_0x7c3a=function(){return _0xf52479;};return a6_0x7c3a();}export function updateModelRegistry(_0x2ff9a4){const _0x52dcbe=a6_0x3fdcdf,_0x2fc487=a6_0x2accac[_0x52dcbe(0x18b)](_0x2ff9a4[_0x52dcbe(0x198)],MODEL_REGISTRY_FILE_NAME),_0x5959b3=existsSync(_0x2fc487),_0x504f76=readModelRegistry(_0x2fc487);if(_0x5959b3&&!_0x504f76)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x52dcbe(0x199));const _0x49403c=_0x504f76??emptyRegistry(_0x2ff9a4[_0x52dcbe(0x1a6)]);if(_0x2ff9a4['appCode']!==_0x52dcbe(0x19b))removeUnboundProfiles(_0x49403c);const _0x7f4c0=_0x504f76?getProfileModels(_0x504f76,_0x2ff9a4[_0x52dcbe(0x19a)])[_0x52dcbe(0x1a3)]:0x0;if(_0x7f4c0>0x0&&_0x2ff9a4['models'][_0x52dcbe(0x1a3)]===0x0&&!_0x2ff9a4[_0x52dcbe(0x174)])throw new Error(_0x52dcbe(0x184)+_0x7f4c0+_0x52dcbe(0x18d)+_0x2ff9a4[_0x52dcbe(0x19a)]+_0x52dcbe(0x16b)+_0x52dcbe(0x16a));_0x49403c['defaultProfile']=_0x2ff9a4[_0x52dcbe(0x1a6)],_0x49403c[_0x52dcbe(0x19f)][_0x2ff9a4[_0x52dcbe(0x19a)]]={'appCode':_0x2ff9a4[_0x52dcbe(0x172)],'runtimeDomain':_0x2ff9a4[_0x52dcbe(0x185)]},mergeProfileModels(_0x49403c,_0x2ff9a4[_0x52dcbe(0x19a)],_0x2ff9a4[_0x52dcbe(0x178)]),mkdirSync(_0x2ff9a4[_0x52dcbe(0x198)],{'recursive':!![]});const _0x5b0003=_0x2fc487+'.'+process['pid']+'.'+Date['now']()+_0x52dcbe(0x1ac);try{writeFileSync(_0x5b0003,registrySource(_0x49403c),{'encoding':_0x52dcbe(0x1ad),'mode':0x1a4}),renameSync(_0x5b0003,_0x2fc487);}catch(_0x34ff51){try{unlinkSync(_0x5b0003);}catch{}throw _0x34ff51;}return{'path':_0x2fc487,'registry':_0x49403c,'existed':_0x5959b3};}
|
|
1
|
+
const a6_0x3eb05c=a6_0x4460;(function(_0x429819,_0x43e739){const _0x2b8aa0=a6_0x4460,_0x4b0081=_0x429819();while(!![]){try{const _0x2cc59a=-parseInt(_0x2b8aa0(0x192))/0x1+parseInt(_0x2b8aa0(0x19c))/0x2+-parseInt(_0x2b8aa0(0x179))/0x3*(parseInt(_0x2b8aa0(0x191))/0x4)+-parseInt(_0x2b8aa0(0x177))/0x5*(-parseInt(_0x2b8aa0(0x178))/0x6)+-parseInt(_0x2b8aa0(0x19f))/0x7+parseInt(_0x2b8aa0(0x1b9))/0x8*(parseInt(_0x2b8aa0(0x176))/0x9)+parseInt(_0x2b8aa0(0x1b7))/0xa;if(_0x2cc59a===_0x43e739)break;else _0x4b0081['push'](_0x4b0081['shift']());}catch(_0x3a9077){_0x4b0081['push'](_0x4b0081['shift']());}}}(a6_0x20b0,0x2e806));function a6_0x20b0(){const _0x27ae50=['pid','1084503GftItq','isArray','entries','Table\x20\x22','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','/*\x20rabetbase-model-registry:v2\x20*/','push','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','\x22\x20maps\x20to\x20alias\x20\x22','values','replace','\x22\x20and\x20\x22','\x22\x20in\x20profile\x20\x22','lovrabet-model-registry/v1','length','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','profileName','datasetCodes','.tmp','join','name','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','now','fromEntries','6004640qaidvf','split','2096vtWwzQ','test','models.generated.ts','\x22\x20with\x20an\x20empty\x20result.\x20','map','filter','1710hcFDxc','10XHBLET','4626dwwhNA','3426UvNIFt','tableName','datasetCode','\x22\x20maps\x20to\x20both\x20\x22','runtimeDomain','defaultProfile','/*\x20rabetbase-model-registry:start\x20*/','get','NOT-SET','Refusing\x20to\x20replace\x20','indexOf','keys','parse','flatMap','key','object','outputDir','models','\x22\x20maps\x20to\x20table\x20\x22','slice','profiles','Model\x20alias\x20\x22','every','appCode','572nzqFMM','350654KjcqzD','utf8','string','protocol','value','alias','stringify','set','find','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','415146ZTdyWx','\x20model(s)\x20in\x20profile\x20\x22'];a6_0x20b0=function(){return _0x27ae50;};return a6_0x20b0();}import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x5074d0 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x3eb05c(0x172);export const MODEL_RUNTIME_FILE_NAME='model-runtime.ts';export const MODEL_REGISTRY_VERSION_MARKER=a6_0x3eb05c(0x1a4);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL='lovrabet-model-registry/v2',REGISTRY_START=a6_0x3eb05c(0x17f),REGISTRY_END='/*\x20rabetbase-model-registry:end\x20*/';function emptyRegistry(_0x40ef46){return{'defaultProfile':_0x40ef46,'profiles':{},'models':[]};}function extractRegistryJson(_0x304e29){const _0x3d97b1=a6_0x3eb05c,_0x53c504=_0x304e29['indexOf'](REGISTRY_START),_0x55ee38=_0x304e29[_0x3d97b1(0x183)](REGISTRY_END);if(_0x53c504<0x0||_0x55ee38<=_0x53c504)return undefined;return _0x304e29[_0x3d97b1(0x18c)](_0x53c504+REGISTRY_START[_0x3d97b1(0x1ad)],_0x55ee38)['trim']()['replace'](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x3d97b1(0x1a9)](/;$/,'');}function migrateLegacyRegistry(_0x132c73){const _0x591656=a6_0x3eb05c,_0x19aa20=emptyRegistry(_0x132c73['defaultProfile']);for(const [_0xdc0233,_0x3492c1]of Object[_0x591656(0x1a1)](_0x132c73['profiles'])){_0x19aa20['profiles'][_0xdc0233]={'appCode':_0x3492c1[_0x591656(0x190)],'runtimeDomain':_0x3492c1[_0x591656(0x17d)]},mergeProfileModels(_0x19aa20,_0xdc0233,_0x3492c1[_0x591656(0x18a)]);}return _0x19aa20;}function generatedObjectLiteralToJson(_0x4151fc){const _0x361465=a6_0x3eb05c;let _0x4defbc='',_0x4fc2c1,_0x32a6ce=![],_0x4c908f;for(let _0x27bef4=0x0;_0x27bef4<_0x4151fc[_0x361465(0x1ad)];_0x27bef4++){const _0x268078=_0x4151fc[_0x27bef4];if(_0x4fc2c1){_0x4defbc+=_0x268078;if(_0x32a6ce)_0x32a6ce=![];else{if(_0x268078==='\x5c')_0x32a6ce=!![];else{if(_0x268078===_0x4fc2c1)_0x4fc2c1=undefined;}}continue;}if(_0x268078==='\x22'){_0x4fc2c1=_0x268078,_0x4defbc+=_0x268078,_0x4c908f=_0x361465(0x196);continue;}if(_0x268078===','){let _0xe164f6=_0x27bef4+0x1;while(/\s/[_0x361465(0x171)](_0x4151fc[_0xe164f6]??''))_0xe164f6++;if(_0x4151fc[_0xe164f6]==='}'||_0x4151fc[_0xe164f6]===']')continue;_0x4defbc+=_0x268078,_0x4c908f=',';continue;}if(_0x268078==='{'||_0x268078==='['){_0x4defbc+=_0x268078,_0x4c908f=_0x268078;continue;}if(_0x268078==='}'||_0x268078===']'){_0x4defbc+=_0x268078,_0x4c908f=_0x268078;continue;}if((_0x4c908f==='{'||_0x4c908f===',')&&/[A-Za-z_$]/[_0x361465(0x171)](_0x268078)){let _0x5b8e14=_0x27bef4+0x1;while(/[A-Za-z0-9_$]/['test'](_0x4151fc[_0x5b8e14]??''))_0x5b8e14++;let _0x2cdba4=_0x5b8e14;while(/\s/[_0x361465(0x171)](_0x4151fc[_0x2cdba4]??''))_0x2cdba4++;if(_0x4151fc[_0x2cdba4]===':'){_0x4defbc+=JSON[_0x361465(0x198)](_0x4151fc[_0x361465(0x18c)](_0x27bef4,_0x5b8e14)),_0x27bef4=_0x5b8e14-0x1,_0x4c908f=_0x361465(0x187);continue;}}_0x4defbc+=_0x268078;if(!/\s/[_0x361465(0x171)](_0x268078)&&_0x268078!==':')_0x4c908f=_0x361465(0x196);}return _0x4defbc;}function parseGeneratedRegistryJson(_0x1927cc){const _0xd00c9e=a6_0x3eb05c;try{return JSON['parse'](_0x1927cc);}catch{return JSON[_0xd00c9e(0x185)](generatedObjectLiteralToJson(_0x1927cc));}}function normalizeModelEntries(_0xcf7741,_0x2ece73){const _0x28b1f9=a6_0x3eb05c,_0x487ee0=Object[_0x28b1f9(0x184)](_0xcf7741),_0x4a9617=[];for(const _0x583527 of _0x2ece73){if(!_0x583527||typeof _0x583527!==_0x28b1f9(0x188)||Array[_0x28b1f9(0x1a0)](_0x583527))return undefined;const _0x120ba0=_0x583527;if(typeof _0x120ba0['alias']!==_0x28b1f9(0x194)||typeof _0x120ba0['tableName']!==_0x28b1f9(0x194)||typeof _0x120ba0[_0x28b1f9(0x1b3)]!=='string')return undefined;let _0x2b4a35;if(typeof _0x120ba0[_0x28b1f9(0x17b)]==='string'&&_0x120ba0[_0x28b1f9(0x1b0)]===undefined)_0x2b4a35=Object[_0x28b1f9(0x1b6)](_0x487ee0[_0x28b1f9(0x174)](_0x2566dc=>[_0x2566dc,_0x120ba0[_0x28b1f9(0x17b)]]));else{if(_0x120ba0[_0x28b1f9(0x17b)]===undefined&&_0x120ba0['datasetCodes']&&typeof _0x120ba0['datasetCodes']==='object'&&!Array[_0x28b1f9(0x1a0)](_0x120ba0[_0x28b1f9(0x1b0)])&&Object[_0x28b1f9(0x1a8)](_0x120ba0[_0x28b1f9(0x1b0)])[_0x28b1f9(0x18f)](_0x22a56e=>typeof _0x22a56e===_0x28b1f9(0x194)))_0x2b4a35={..._0x120ba0[_0x28b1f9(0x1b0)]};else return undefined;}_0x4a9617[_0x28b1f9(0x1a5)]({'alias':_0x120ba0[_0x28b1f9(0x197)],'tableName':_0x120ba0[_0x28b1f9(0x17a)],'name':_0x120ba0[_0x28b1f9(0x1b3)],'datasetCodes':_0x2b4a35});}return _0x4a9617;}function a6_0x4460(_0x20532c,_0x33a97e){_0x20532c=_0x20532c-0x171;const _0x20b0c9=a6_0x20b0();let _0x446050=_0x20b0c9[_0x20532c];return _0x446050;}export function parseModelRegistry(_0x175891){const _0x1b8986=a6_0x3eb05c,_0x2feafe=extractRegistryJson(_0x175891);if(!_0x2feafe)return undefined;try{const _0x16d3ec=parseGeneratedRegistryJson(_0x2feafe);if(typeof _0x16d3ec[_0x1b8986(0x17e)]!==_0x1b8986(0x194)||!_0x16d3ec[_0x1b8986(0x18d)]||typeof _0x16d3ec[_0x1b8986(0x18d)]!==_0x1b8986(0x188))return undefined;if(_0x16d3ec['protocol']===_0x1b8986(0x1ac))return migrateLegacyRegistry(_0x16d3ec);if(!(_0x16d3ec[_0x1b8986(0x195)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x16d3ec['protocol']===undefined&&_0x175891['includes'](MODEL_REGISTRY_VERSION_MARKER))||!Array['isArray'](_0x16d3ec[_0x1b8986(0x18a)]))return undefined;const _0x5745a4=_0x16d3ec[_0x1b8986(0x18d)],_0x45e3e0=normalizeModelEntries(_0x5745a4,_0x16d3ec[_0x1b8986(0x18a)]);if(!_0x45e3e0)return undefined;return{'defaultProfile':_0x16d3ec[_0x1b8986(0x17e)],'profiles':_0x5745a4,'models':_0x45e3e0};}catch{return undefined;}}export function readModelRegistry(_0x22c8d9){if(!existsSync(_0x22c8d9))return undefined;try{return parseModelRegistry(readFileSync(_0x22c8d9,'utf8'));}catch{return undefined;}}function registrySource(_0x832eb4){const _0x19adc2=a6_0x3eb05c,_0x1ccf6d=Object[_0x19adc2(0x184)](_0x832eb4['profiles']),_0x7cd4ec=_0x832eb4['models']['map'](_0x5b84da=>{const _0x1e43bd=_0x19adc2,_0x1d625d=_0x1ccf6d[_0x1e43bd(0x174)](_0x2b7acb=>_0x5b84da[_0x1e43bd(0x1b0)][_0x2b7acb]),_0x4909dc=_0x1d625d[0x0],_0xf65233=_0x4909dc!==undefined&&_0x1d625d[_0x1e43bd(0x18f)](_0xc89191=>_0xc89191===_0x4909dc),_0x3c98c3={'alias':_0x5b84da[_0x1e43bd(0x197)],'tableName':_0x5b84da[_0x1e43bd(0x17a)],'name':_0x5b84da[_0x1e43bd(0x1b3)]};return _0xf65233?{..._0x3c98c3,'datasetCode':_0x4909dc}:{..._0x3c98c3,'datasetCodes':_0x5b84da[_0x1e43bd(0x1b0)]};}),_0x33d2a6=JSON['stringify']({'defaultProfile':_0x832eb4[_0x19adc2(0x17e)],'profiles':_0x832eb4['profiles'],'models':_0x7cd4ec},null,0x2)[_0x19adc2(0x1b8)]('\x0a')[_0x19adc2(0x174)](_0xc59896=>'\x20\x20'+_0xc59896)[_0x19adc2(0x1b2)]('\x0a');return'/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a'+MODEL_REGISTRY_VERSION_MARKER+_0x19adc2(0x19b)+REGISTRY_START+'\x0a'+_0x33d2a6+_0x19adc2(0x1ae)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x451c75,_0x20433f,_0x5d5b89){const _0x11d5a6=a6_0x3eb05c,_0x3f1940=_0x5d5b89[_0x11d5a6(0x174)](_0x373434=>({..._0x373434,'alias':_0x373434[_0x11d5a6(0x197)]||_0x373434['tableName']})),_0x257d88=new Map(),_0x2ca01b=new Map();for(const _0x10a50c of _0x3f1940){const _0x2deb8c=_0x257d88[_0x11d5a6(0x180)](_0x10a50c['alias']);if(_0x2deb8c&&_0x2deb8c!==_0x10a50c[_0x11d5a6(0x17a)])throw new Error(_0x11d5a6(0x18e)+_0x10a50c[_0x11d5a6(0x197)]+_0x11d5a6(0x17c)+_0x2deb8c+_0x11d5a6(0x1aa)+_0x10a50c[_0x11d5a6(0x17a)]+_0x11d5a6(0x1ab)+_0x20433f+'\x22.');const _0x19a147=_0x2ca01b[_0x11d5a6(0x180)](_0x10a50c['tableName']);if(_0x19a147&&_0x19a147!==_0x10a50c[_0x11d5a6(0x197)])throw new Error('Table\x20\x22'+_0x10a50c['tableName']+_0x11d5a6(0x1b4)+_0x19a147+_0x11d5a6(0x1aa)+_0x10a50c[_0x11d5a6(0x197)]+_0x11d5a6(0x1ab)+_0x20433f+'\x22.');_0x257d88[_0x11d5a6(0x199)](_0x10a50c['alias'],_0x10a50c['tableName']),_0x2ca01b[_0x11d5a6(0x199)](_0x10a50c[_0x11d5a6(0x17a)],_0x10a50c[_0x11d5a6(0x197)]);const _0x39b343=_0x451c75[_0x11d5a6(0x18a)][_0x11d5a6(0x19a)](_0x4b3d6b=>_0x4b3d6b['alias']===_0x10a50c['alias']);if(_0x39b343&&_0x39b343['tableName']!==_0x10a50c[_0x11d5a6(0x17a)])throw new Error(_0x11d5a6(0x18e)+_0x10a50c[_0x11d5a6(0x197)]+_0x11d5a6(0x18b)+_0x39b343[_0x11d5a6(0x17a)]+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x10a50c[_0x11d5a6(0x17a)]+_0x11d5a6(0x1ab)+_0x20433f+'\x22.');const _0x166ecd=_0x451c75['models'][_0x11d5a6(0x19a)](_0x5292d3=>_0x5292d3[_0x11d5a6(0x17a)]===_0x10a50c[_0x11d5a6(0x17a)]);if(_0x166ecd&&_0x166ecd[_0x11d5a6(0x197)]!==_0x10a50c['alias'])throw new Error(_0x11d5a6(0x1a2)+_0x10a50c[_0x11d5a6(0x17a)]+_0x11d5a6(0x1a7)+_0x166ecd['alias']+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x10a50c['alias']+'\x22\x20in\x20profile\x20\x22'+_0x20433f+'\x22.');}for(const _0x19b824 of _0x451c75[_0x11d5a6(0x18a)]){delete _0x19b824[_0x11d5a6(0x1b0)][_0x20433f];}for(const _0x9ef8b6 of _0x3f1940){let _0x2bf0f8=_0x451c75['models']['find'](_0x2d6a25=>_0x2d6a25[_0x11d5a6(0x197)]===_0x9ef8b6[_0x11d5a6(0x197)]);!_0x2bf0f8&&(_0x2bf0f8={'alias':_0x9ef8b6[_0x11d5a6(0x197)],'tableName':_0x9ef8b6[_0x11d5a6(0x17a)],'name':_0x9ef8b6[_0x11d5a6(0x1b3)],'datasetCodes':{}},_0x451c75[_0x11d5a6(0x18a)][_0x11d5a6(0x1a5)](_0x2bf0f8)),(_0x20433f===_0x451c75['defaultProfile']||!_0x2bf0f8['datasetCodes'][_0x451c75[_0x11d5a6(0x17e)]])&&(_0x2bf0f8['alias']=_0x9ef8b6['alias'],_0x2bf0f8[_0x11d5a6(0x17a)]=_0x9ef8b6[_0x11d5a6(0x17a)],_0x2bf0f8['name']=_0x9ef8b6[_0x11d5a6(0x1b3)]),_0x2bf0f8[_0x11d5a6(0x1b0)][_0x20433f]=_0x9ef8b6['datasetCode'];}_0x451c75[_0x11d5a6(0x18a)]=_0x451c75[_0x11d5a6(0x18a)][_0x11d5a6(0x175)](_0x396239=>Object[_0x11d5a6(0x184)](_0x396239[_0x11d5a6(0x1b0)])[_0x11d5a6(0x1ad)]>0x0);}function removeUnboundProfiles(_0x24892a){const _0x45dcec=a6_0x3eb05c,_0x2f7c3f=Object[_0x45dcec(0x1a1)](_0x24892a[_0x45dcec(0x18d)])[_0x45dcec(0x175)](([,_0x2bed93])=>_0x2bed93[_0x45dcec(0x190)]===_0x45dcec(0x181))[_0x45dcec(0x174)](([_0x40fe36])=>_0x40fe36);if(_0x2f7c3f[_0x45dcec(0x1ad)]===0x0)return;for(const _0x59de95 of _0x2f7c3f){delete _0x24892a['profiles'][_0x59de95];for(const _0x4c90dd of _0x24892a[_0x45dcec(0x18a)]){delete _0x4c90dd[_0x45dcec(0x1b0)][_0x59de95];}}_0x24892a[_0x45dcec(0x18a)]=_0x24892a[_0x45dcec(0x18a)][_0x45dcec(0x175)](_0x9d6e5e=>Object['keys'](_0x9d6e5e[_0x45dcec(0x1b0)])[_0x45dcec(0x1ad)]>0x0);}export function getProfileModels(_0x3712fe,_0x482d83){const _0x5420f1=a6_0x3eb05c;return _0x3712fe[_0x5420f1(0x18a)][_0x5420f1(0x186)](_0x183b0d=>{const _0x1f58cf=_0x5420f1,_0x258c76=_0x183b0d[_0x1f58cf(0x1b0)][_0x482d83];return _0x258c76?[{'datasetCode':_0x258c76,'tableName':_0x183b0d[_0x1f58cf(0x17a)],'name':_0x183b0d['name'],'alias':_0x183b0d[_0x1f58cf(0x197)]}]:[];});}export function updateModelRegistry(_0x4d6d6c){const _0x525417=a6_0x3eb05c,_0x191684=a6_0x5074d0[_0x525417(0x1b2)](_0x4d6d6c[_0x525417(0x189)],MODEL_REGISTRY_FILE_NAME),_0x3ab49c=existsSync(_0x191684),_0x417f40=readModelRegistry(_0x191684);if(_0x3ab49c&&!_0x417f40)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x525417(0x1a6));const _0x53eb0c=_0x417f40??emptyRegistry(_0x4d6d6c['defaultProfile']);if(_0x4d6d6c['appCode']!==_0x525417(0x181))removeUnboundProfiles(_0x53eb0c);const _0x249a1c=_0x417f40?getProfileModels(_0x417f40,_0x4d6d6c[_0x525417(0x1af)])['length']:0x0;if(_0x249a1c>0x0&&_0x4d6d6c[_0x525417(0x18a)][_0x525417(0x1ad)]===0x0&&!_0x4d6d6c['allowEmptyReplacement'])throw new Error(_0x525417(0x182)+_0x249a1c+_0x525417(0x19d)+_0x4d6d6c[_0x525417(0x1af)]+_0x525417(0x173)+_0x525417(0x1a3));_0x53eb0c[_0x525417(0x17e)]=_0x4d6d6c[_0x525417(0x17e)],_0x53eb0c['profiles'][_0x4d6d6c[_0x525417(0x1af)]]={'appCode':_0x4d6d6c['appCode'],'runtimeDomain':_0x4d6d6c[_0x525417(0x17d)]},mergeProfileModels(_0x53eb0c,_0x4d6d6c[_0x525417(0x1af)],_0x4d6d6c[_0x525417(0x18a)]),mkdirSync(_0x4d6d6c[_0x525417(0x189)],{'recursive':!![]});const _0x11f12f=_0x191684+'.'+process[_0x525417(0x19e)]+'.'+Date[_0x525417(0x1b5)]()+_0x525417(0x1b1);try{writeFileSync(_0x11f12f,registrySource(_0x53eb0c),{'encoding':_0x525417(0x193),'mode':0x1a4}),renameSync(_0x11f12f,_0x191684);}catch(_0x457e70){try{unlinkSync(_0x11f12f);}catch{}throw _0x457e70;}return{'path':_0x191684,'registry':_0x53eb0c,'existed':_0x3ab49c};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a7_0x25fcf2=a7_0x2d47;(function(_0x361dd6,_0x59aa76){const _0x5d2c85=a7_0x2d47,_0x2dfd22=_0x361dd6();while(!![]){try{const _0x7af7d4=parseInt(_0x5d2c85(0x163))/0x1+parseInt(_0x5d2c85(0x157))/0x2*(parseInt(_0x5d2c85(0x15c))/0x3)+parseInt(_0x5d2c85(0x15d))/0x4+parseInt(_0x5d2c85(0x165))/0x5+-parseInt(_0x5d2c85(0x159))/0x6*(-parseInt(_0x5d2c85(0x160))/0x7)+-parseInt(_0x5d2c85(0x166))/0x8*(-parseInt(_0x5d2c85(0x15b))/0x9)+parseInt(_0x5d2c85(0x151))/0xa*(-parseInt(_0x5d2c85(0x15a))/0xb);if(_0x7af7d4===_0x59aa76)break;else _0x2dfd22['push'](_0x2dfd22['shift']());}catch(_0x3a052c){_0x2dfd22['push'](_0x2dfd22['shift']());}}}(a7_0x5efa,0x219cc));function a7_0x5efa(){const _0x319b4b=['{ProjectRoutingImport}','33646HYRXCj','replace','121560RsAJFA','11YcGUmy','314451gFyiWu','9QgBDAF','983924OTgcvw','format','typescript','7mVCVjw','relative','join','54350NfqmSq','profile-client.ts.tpl','41560bTimgc','8rUiQIM','cwd','utf8','resolve','2766350nFdIdN','startsWith','../../templates/generate-api','all','model-runtime.ts.tpl'];a7_0x5efa=function(){return _0x319b4b;};return a7_0x5efa();}import{readFileSync}from'node:fs';import a7_0x53d7ac from'node:path';import{fileURLToPath}from'node:url';import a7_0x5f3cb6 from'prettier';import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function a7_0x2d47(_0x370fdc,_0x179bfd){_0x370fdc=_0x370fdc-0x151;const _0x5efa3f=a7_0x5efa();let _0x2d4788=_0x5efa3f[_0x370fdc];return _0x2d4788;}function relativeImport(_0x53ce5c,_0x1aeceb){const _0x3b680b=a7_0x2d47;let _0x2d0bf5=a7_0x53d7ac[_0x3b680b(0x161)](_0x53ce5c,_0x1aeceb)[_0x3b680b(0x158)](/\\/g,'/');if(!_0x2d0bf5[_0x3b680b(0x152)]('.'))_0x2d0bf5='./'+_0x2d0bf5;return _0x2d0bf5;}export async function renderModelRegistryScaffold(_0x2eb88b,_0x454de4=process[a7_0x25fcf2(0x167)]()){const _0x5658c0=a7_0x25fcf2,_0x957a2b=fileURLToPath(import.meta.url),_0x47745a=a7_0x53d7ac[_0x5658c0(0x169)](a7_0x53d7ac['dirname'](_0x957a2b),_0x5658c0(0x153)),_0x55522d=relativeImport(a7_0x53d7ac['resolve'](_0x2eb88b),a7_0x53d7ac['resolve'](_0x454de4,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x47108e=readFileSync(a7_0x53d7ac['join'](_0x47745a,'profile-api.ts.tpl'),_0x5658c0(0x168))[_0x5658c0(0x158)](_0x5658c0(0x156),_0x55522d),[_0x12a2ca,_0x519ced,_0xaaded8]=await Promise[_0x5658c0(0x154)]([a7_0x5f3cb6['format'](_0x47108e,{'parser':_0x5658c0(0x15f)}),a7_0x5f3cb6[_0x5658c0(0x15e)](readFileSync(a7_0x53d7ac[_0x5658c0(0x162)](_0x47745a,_0x5658c0(0x164)),'utf8'),{'parser':_0x5658c0(0x15f)}),a7_0x5f3cb6[_0x5658c0(0x15e)](readFileSync(a7_0x53d7ac['join'](_0x47745a,_0x5658c0(0x155)),_0x5658c0(0x168)),{'parser':'typescript'})]);return{'api':_0x12a2ca,'client':_0x519ced,'modelRuntime':_0xaaded8};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x15c013,_0x3670c7){const _0x553e12=a8_0xc8a1,_0x2016ff=_0x15c013();while(!![]){try{const _0x91cbc6=parseInt(_0x553e12(0xb2))/0x1*(-parseInt(_0x553e12(0xc0))/0x2)+parseInt(_0x553e12(0xcb))/0x3+parseInt(_0x553e12(0xbf))/0x4*(-parseInt(_0x553e12(0xb6))/0x5)+-parseInt(_0x553e12(0xb5))/0x6+parseInt(_0x553e12(0xc3))/0x7+parseInt(_0x553e12(0xb9))/0x8*(parseInt(_0x553e12(0xce))/0x9)+-parseInt(_0x553e12(0xb7))/0xa*(-parseInt(_0x553e12(0xbb))/0xb);if(_0x91cbc6===_0x3670c7)break;else _0x2016ff['push'](_0x2016ff['shift']());}catch(_0x279321){_0x2016ff['push'](_0x2016ff['shift']());}}}(a8_0x37d6,0xe3328));function a8_0x37d6(){const _0x4502fe=['defaultApp','join','27WjZheL','apps','resolve','appcode','Run\x20`','profiles','31jRfwUl','api.ts','AppCode\x20\x22','9847938cGwuxm','2107830OGzkRe','13960yotXtJ','Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.','135816QeJiOV','\x20api\x20pull\x20--app\x20','19811qmKjjW','find','Model\x20profile\x20\x22','appCode','4KYeUlm','55922xWUsOB','filter','apiDir','5503778ovyaLi','defaultProfile','entries','cwd','\x22\x20is\x20missing\x20from\x20','validation','-api.ts','length','1526697FfvgLA'];a8_0x37d6=function(){return _0x4502fe;};return a8_0x37d6();}function a8_0xc8a1(_0x13c10f,_0x2b052e){_0x13c10f=_0x13c10f-0xaf;const _0x37d645=a8_0x37d6();let _0xc8a1ad=_0x37d645[_0x13c10f];return _0xc8a1ad;}import{existsSync}from'node:fs';import a8_0x2c8ab4 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';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveApiModelSource(_0x2426ce,_0x138c58,_0x4b9860){const _0x316570=a8_0xc8a1,_0x2a78c2=a8_0x2c8ab4[_0x316570(0xd0)](process[_0x316570(0xc6)](),_0x2426ce),_0x215c04=a8_0x2c8ab4['resolve'](_0x2a78c2,_0x316570(0xb3)),_0x2a61a7=a8_0x2c8ab4[_0x316570(0xd0)](_0x2a78c2,MODEL_REGISTRY_FILE_NAME),_0x84fd57=readModelRegistry(_0x2a61a7);if(_0x84fd57){const _0x16f287=_0x138c58?Object['entries'](_0x84fd57['profiles'])[_0x316570(0xc1)](([,_0x1dc82a])=>_0x1dc82a[_0x316570(0xbe)]===_0x138c58):[];if(_0x4b9860){if(_0x84fd57['profiles'][_0x4b9860])return{'filePath':_0x2a61a7,'profileName':_0x4b9860};if(_0x16f287[_0x316570(0xca)]>0x0)throw CliErrors[_0x316570(0xc8)](_0x316570(0xbd)+_0x4b9860+_0x316570(0xc7)+MODEL_REGISTRY_FILE_NAME+'.',_0x316570(0xb0)+CLI_BIN_NAME+_0x316570(0xba)+_0x4b9860+'`\x20first.');}else{if(_0x16f287['length']===0x1)return{'filePath':_0x2a61a7,'profileName':_0x16f287[0x0][0x0]};if(_0x16f287[_0x316570(0xca)]>0x1)throw new Error(_0x316570(0xb4)+_0x138c58+'\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20'+_0x16f287['map'](([_0x34afda])=>_0x34afda)[_0x316570(0xcd)](',\x20')+'.\x20'+_0x316570(0xb8));if(_0x84fd57[_0x316570(0xb1)][_0x84fd57[_0x316570(0xc4)]]&&!_0x138c58)return{'filePath':_0x2a61a7,'profileName':_0x84fd57[_0x316570(0xc4)]};}}if(!_0x138c58&&!_0x4b9860)return{'filePath':_0x215c04};const _0x401129=readRawConfig(),_0x8aadd3=_0x401129[_0x316570(0xcf)]&&typeof _0x401129[_0x316570(0xcf)]==='object'?_0x401129[_0x316570(0xcf)]:{},_0x16b99a=_0x4b9860&&_0x8aadd3[_0x4b9860]?[_0x4b9860,_0x8aadd3[_0x4b9860]]:Object[_0x316570(0xc5)](_0x8aadd3)[_0x316570(0xbc)](([,_0x3239a9])=>_0x3239a9?.[_0x316570(0xaf)]===_0x138c58);if(!_0x16b99a)return{'filePath':_0x215c04};const [_0x4660af,_0x15cb32]=_0x16b99a,_0x21ca59=typeof _0x401129[_0x316570(0xcc)]==='string'?_0x401129[_0x316570(0xcc)]:undefined;if(_0x15cb32?.[_0x316570(0xc2)])return{'filePath':_0x215c04};if(_0x21ca59&&_0x4660af!==_0x21ca59){const _0x268024=a8_0x2c8ab4[_0x316570(0xd0)](_0x2a78c2,_0x4660af+_0x316570(0xc9));if(existsSync(_0x268024))return{'filePath':_0x268024};}return{'filePath':_0x215c04};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a9_0x4d2a(_0x3656fe,_0x3a7fcf){_0x3656fe=_0x3656fe-0x1d3;const _0x4b5fab=a9_0x4b5f();let _0x4d2a08=_0x4b5fab[_0x3656fe];return _0x4d2a08;}(function(_0x295444,_0x2f0a6c){const _0x5f3a7a=a9_0x4d2a,_0x1a7751=_0x295444();while(!![]){try{const _0x4d2494=-parseInt(_0x5f3a7a(0x1e5))/0x1*(parseInt(_0x5f3a7a(0x1d9))/0x2)+-parseInt(_0x5f3a7a(0x1de))/0x3*(-parseInt(_0x5f3a7a(0x1e3))/0x4)+parseInt(_0x5f3a7a(0x1e7))/0x5+parseInt(_0x5f3a7a(0x1dc))/0x6+parseInt(_0x5f3a7a(0x1df))/0x7*(-parseInt(_0x5f3a7a(0x1d6))/0x8)+-parseInt(_0x5f3a7a(0x1d7))/0x9+-parseInt(_0x5f3a7a(0x1dd))/0xa;if(_0x4d2494===_0x2f0a6c)break;else _0x1a7751['push'](_0x1a7751['shift']());}catch(_0x39428f){_0x1a7751['push'](_0x1a7751['shift']());}}}(a9_0x4b5f,0xc37fb));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a9_0x4b5f(){const _0x2d3211=['27MMIDRX','213584HVpHlE','autoYes','!\x20Login\x20failed.','log','640372CCCnXL','No\x20valid\x20session.\x20Login\x20now?','244704igdLtS','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','893325pVzRNh','stop','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','nonInteractive','56gXobIH','9943731pXELXg','*\x20Login\x20successful!','2qdnBsG','start','โ\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','8563470GVndNR','6828370jYnYqw'];a9_0x4b5f=function(){return _0x2d3211;};return a9_0x4b5f();}import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';import a9_0x3f84a2 from'ora';export async function runAuthServer(_0x4f8168){const _0x2fcde8=a9_0x4d2a,_0x554019=await getIsSessionValid();if(_0x554019){console[_0x2fcde8(0x1e2)](_0x2fcde8(0x1db));return;}if(_0x4f8168?.['nonInteractive']&&!_0x4f8168['autoYes'])throw CliErrors['validation']('Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','Run\x20`'+CLI_BIN_NAME+_0x2fcde8(0x1d4));const _0x104f20=_0x4f8168?.[_0x2fcde8(0x1e0)]?!![]:await confirm({'message':_0x2fcde8(0x1e4),'default':!![]});if(!_0x104f20)return;if(_0x4f8168?.[_0x2fcde8(0x1d5)]){console[_0x2fcde8(0x1e2)]('Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.');const _0x58d370=await authServer({'silent':![],'openBrowser':![]});_0x58d370?console[_0x2fcde8(0x1e2)](_0x2fcde8(0x1d8)):console[_0x2fcde8(0x1e2)](_0x2fcde8(0x1e1));return;}const _0x4679b7=a9_0x3f84a2(_0x2fcde8(0x1e6))[_0x2fcde8(0x1da)](),_0x5b60a4=await authServer({'silent':!![],'openBrowser':!![]});_0x4679b7[_0x2fcde8(0x1d3)](),_0x5b60a4?console[_0x2fcde8(0x1e2)]('*\x20Login\x20successful!'):console[_0x2fcde8(0x1e2)](_0x2fcde8(0x1e1));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x24d0db=a10_0x3130;function a10_0x2a3d(){const _0x322a91=['certificateUrl','cmd\x20/c\x20start\x20\x22\x22\x20\x22','address','127.0.0.1','platform','๐\x20Login\x20URL:','โ
\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','612582KyyeqY','object','port','๐\x20Starting\x20login\x20service...','2258436TcRPAu','origin','1729245kzwktJ','lovrabet','๐\x20Attempting\x20to\x20open\x20browser\x20automatically...','๐ก\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','catch','timeoutMs','session','log','end','json','openBrowser','text/html;\x20charset=utf-8','100nmzQsI','โ ๏ธ\x20\x20Failed\x20to\x20open\x20browser\x20automatically','xdg-open\x20\x22','isAuth','24139656hJqMFA','!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','user','open\x20\x22','headers','local','578648DUtnxN','silent','8PHXLIJ','error','/sign-in?redirect=','close','createServer','/api/auth/get-session','335590yqIvnP','3810040SWOrVW','then','/cert/lovrabet-dev.json','writeHead','cookie'];a10_0x2a3d=function(){return _0x322a91;};return a10_0x2a3d();}(function(_0x39bea5,_0x444811){const _0x4ef12b=a10_0x3130,_0x4ede7b=_0x39bea5();while(!![]){try{const _0x9da993=-parseInt(_0x4ef12b(0xe9))/0x1+parseInt(_0x4ef12b(0xeb))/0x2*(parseInt(_0x4ef12b(0xfe))/0x3)+-parseInt(_0x4ef12b(0xdf))/0x4*(parseInt(_0x4ef12b(0xf1))/0x5)+parseInt(_0x4ef12b(0x102))/0x6+-parseInt(_0x4ef12b(0x104))/0x7+-parseInt(_0x4ef12b(0xf2))/0x8+parseInt(_0x4ef12b(0xe3))/0x9;if(_0x9da993===_0x444811)break;else _0x4ede7b['push'](_0x4ede7b['shift']());}catch(_0x189e8b){_0x4ede7b['push'](_0x4ede7b['shift']());}}}(a10_0x2a3d,0xda9f6));import{writeFileSync}from'node:fs';import a10_0x328cff from'node:http';import a10_0x1d7bb0 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';function a10_0x3130(_0xa822b6,_0x4c075c){_0xa822b6=_0xa822b6-0xda;const _0x2a3d20=a10_0x2a3d();let _0x313053=_0x2a3d20[_0xa822b6];return _0x313053;}import{getIsSessionValid}from'../auth/is-session-valid.js';import{cookieFile}from'../auth/constant.js';import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export function resolveAuthCallbackRouting(_0x1fc5eb){const _0x1ffb4e=a10_0x3130;if(!_0x1fc5eb)return getProjectDomainRoutingManifest()['local'];const _0x512945=getOfficialRoutingProfile(_0x1fc5eb),_0x379fc3=getOfficialRoutingCdn(_0x1fc5eb);return{'origin':_0x512945[_0x1ffb4e(0xe8)][_0x1ffb4e(0x103)],'certificateUrl':_0x379fc3[_0x1ffb4e(0x105)]+_0x1ffb4e(0xf4)};}function withPort(_0x5b8aa6,_0x64073d){const _0x45d277=a10_0x3130,_0x15c215=new URL(_0x5b8aa6);return _0x15c215[_0x45d277(0x100)]=String(_0x64073d),_0x15c215[_0x45d277(0x103)];}export async function authServer(_0x33de1f){const _0x1ad8e1=a10_0x3130,_0x347cfc=_0x33de1f?.[_0x1ad8e1(0xea)]||![],_0x2969d1=_0x33de1f?.[_0x1ad8e1(0xdd)]??!![],_0x22a1ab=_0x33de1f?.[_0x1ad8e1(0x109)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x164a42=resolveAuthCallbackRouting(),_0x2049df=_0x164a42['certificateUrl']?await(await fetch(_0x164a42[_0x1ad8e1(0xf7)]))[_0x1ad8e1(0xdc)]():undefined;return new Promise(async(_0x558cc3,_0x2d08a5)=>{const _0x4efd04=_0x1ad8e1;let _0x1414d7=0x0,_0x45f38a=![],_0x70b602;const _0x2a4e8e=async(_0x12332d,_0x2a40c4)=>{const _0x2520cb=a10_0x3130,_0x2823c0=getUserDomain(),_0x28b54f=_0x12332d[_0x2520cb(0xe7)][_0x2520cb(0xf6)]||'',_0x2a54fd=await fetch(_0x2823c0+_0x2520cb(0xf0),{'headers':{'cookie':_0x28b54f}})[_0x2520cb(0xf3)](_0x19e1d8=>_0x19e1d8[_0x2520cb(0xdc)]()),_0x90c8e7=_0x2a54fd&&_0x2a54fd[_0x2520cb(0x10a)]&&_0x2a54fd[_0x2520cb(0xe5)];if(_0x90c8e7){writeFileSync(cookieFile,_0x28b54f,'utf-8');const _0x487225=buildLoginSuccessHtml();_0x2a40c4[_0x2520cb(0xf5)](0xc8,{'Content-Type':_0x2520cb(0xde)}),_0x2a40c4[_0x2520cb(0xdb)](_0x487225),_0x14814e(!![]);}else{const _0x7e5b88=encodeURIComponent(withPort(_0x164a42['origin'],_0x1414d7));_0x2a40c4['writeHead'](0x12e,{'location':_0x2823c0+_0x2520cb(0xed)+_0x7e5b88}),_0x2a40c4['end']();return;}},_0x2dc4f3=_0x2049df?a10_0x1d7bb0[_0x4efd04(0xef)](_0x2049df,_0x2a4e8e):a10_0x328cff[_0x4efd04(0xef)](_0x2a4e8e);function _0x14814e(_0xc6d935){const _0x202d6f=_0x4efd04;if(_0x45f38a)return;_0x45f38a=!![],_0x70b602&&clearTimeout(_0x70b602),_0x2dc4f3[_0x202d6f(0xee)](),_0x558cc3(_0xc6d935);}_0x2dc4f3['listen'](0x0,_0x4efd04(0xfa),()=>{const _0x34827e=_0x4efd04,_0x308402=_0x2dc4f3[_0x34827e(0xf9)]();_0x1414d7=typeof _0x308402===_0x34827e(0xff)&&_0x308402?_0x308402[_0x34827e(0x100)]:Number(_0x308402);const _0x4e1cf1=withPort(_0x164a42[_0x34827e(0x103)],_0x1414d7);_0x70b602=setTimeout(()=>{const _0x1214fb=_0x34827e;!_0x347cfc&&console['log'](_0x1214fb(0xe4)),_0x14814e(![]);},_0x22a1ab);!_0x347cfc&&(console[_0x34827e(0xda)](_0x34827e(0x101)),console[_0x34827e(0xda)](_0x34827e(0xfc),_0x4e1cf1),_0x2969d1?(console[_0x34827e(0xda)](_0x34827e(0x106)),console[_0x34827e(0xda)](''),console[_0x34827e(0xda)](_0x34827e(0x107))):console[_0x34827e(0xda)]('๐ก\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.'),console[_0x34827e(0xda)](''));if(!_0x2969d1)return;openInBrowser(_0x4e1cf1)[_0x34827e(0xf3)](_0x486a58=>{const _0x1c7868=_0x34827e;!_0x347cfc&&(_0x486a58?console[_0x1c7868(0xda)](_0x1c7868(0xfd)):(console[_0x1c7868(0xda)]('โ ๏ธ\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console['log']('๐\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0x4e1cf1)),console[_0x1c7868(0xda)](''));})[_0x34827e(0x108)](()=>{const _0x5ae5a5=_0x34827e;!_0x347cfc&&(console[_0x5ae5a5(0xda)](_0x5ae5a5(0xe0)),console[_0x5ae5a5(0xda)]('๐\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0x4e1cf1),console[_0x5ae5a5(0xda)](''));});}),_0x2dc4f3['on'](_0x4efd04(0xec),_0xef982e=>{const _0x3e385b=_0x4efd04;if(_0x45f38a)return;_0x45f38a=!![],_0x70b602&&clearTimeout(_0x70b602),!_0x347cfc&&console[_0x3e385b(0xec)]('Auth\x20server\x20error:',_0xef982e),_0x2dc4f3[_0x3e385b(0xee)](),_0x2d08a5(_0xef982e);});});}function openInBrowser(_0x888734){return new Promise(_0x4d89aa=>{const _0x113fa5=a10_0x3130,_0x1f9ed0=process[_0x113fa5(0xfb)];let _0x5071fc;if(_0x1f9ed0==='win32')_0x5071fc=_0x113fa5(0xf8)+_0x888734+'\x22';else _0x1f9ed0==='darwin'?_0x5071fc=_0x113fa5(0xe6)+_0x888734+'\x22':_0x5071fc=_0x113fa5(0xe1)+_0x888734+'\x22';exec(_0x5071fc,_0x42b5e6=>{_0x42b5e6?_0x4d89aa(![]):_0x4d89aa(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a10_0x24d0db(0xda)](a10_0x24d0db(0xe2),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x256618,_0x45d81e){const _0x106da2=a11_0x4f43,_0x51fab4=_0x256618();while(!![]){try{const _0x42a9f3=-parseInt(_0x106da2(0x194))/0x1+parseInt(_0x106da2(0x196))/0x2*(parseInt(_0x106da2(0x193))/0x3)+-parseInt(_0x106da2(0x197))/0x4*(-parseInt(_0x106da2(0x199))/0x5)+-parseInt(_0x106da2(0x190))/0x6*(parseInt(_0x106da2(0x19a))/0x7)+parseInt(_0x106da2(0x192))/0x8*(-parseInt(_0x106da2(0x191))/0x9)+parseInt(_0x106da2(0x195))/0xa+parseInt(_0x106da2(0x198))/0xb;if(_0x42a9f3===_0x45d81e)break;else _0x51fab4['push'](_0x51fab4['shift']());}catch(_0x3c0e1e){_0x51fab4['push'](_0x51fab4['shift']());}}}(a11_0x4327,0xdbdc0));function a11_0x4327(){const _0x270193=['10176040rNXAjJ','269132AzvNuE','4xtKJKM','9792387BqLOpu','4025270nvZyjH','1246700hjJGml','12VJXfuv','984483xTPiOI','8stFisB','9taLflX','1750442jQahUs'];a11_0x4327=function(){return _0x270193;};return a11_0x4327();}import{mkdirSync}from'node:fs';function a11_0x4f43(_0x2a3002,_0x826b22){_0x2a3002=_0x2a3002-0x190;const _0x43272e=a11_0x4327();let _0x4f4341=_0x43272e[_0x2a3002];return _0x4f4341;}import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),'.lovrabet');export const cookieFile=join(configDir,'cookie');mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a12_0x32fa(){var _0x211986=['903236DMFecJ','utf-8','2603070HITkXg','99928ANgWNl','1bwZJda','7zeuDcm','10MWEXMS','5055369qGTrSZ','3nmqmed','1719400lUpDjW','4015722xwjOKm','1665297HnuvSb'];a12_0x32fa=function(){return _0x211986;};return a12_0x32fa();}(function(_0x2023b1,_0x4dce0f){var _0x13f7c6=a12_0x5572,_0x2c1d54=_0x2023b1();while(!![]){try{var _0x1ee2d1=-parseInt(_0x13f7c6(0x164))/0x1*(-parseInt(_0x13f7c6(0x160))/0x2)+parseInt(_0x13f7c6(0x15c))/0x3*(parseInt(_0x13f7c6(0x15d))/0x4)+-parseInt(_0x13f7c6(0x162))/0x5+parseInt(_0x13f7c6(0x15e))/0x6*(parseInt(_0x13f7c6(0x165))/0x7)+parseInt(_0x13f7c6(0x163))/0x8+parseInt(_0x13f7c6(0x15f))/0x9*(-parseInt(_0x13f7c6(0x15a))/0xa)+-parseInt(_0x13f7c6(0x15b))/0xb;if(_0x1ee2d1===_0x4dce0f)break;else _0x2c1d54['push'](_0x2c1d54['shift']());}catch(_0x52fd14){_0x2c1d54['push'](_0x2c1d54['shift']());}}}(a12_0x32fa,0x612c4));import{readFileSync}from'node:fs';function a12_0x5572(_0x1de433,_0x30bfda){_0x1de433=_0x1de433-0x15a;var _0x32fa74=a12_0x32fa();var _0x557257=_0x32fa74[_0x1de433];return _0x557257;}import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0xbd3e8d=a12_0x5572;try{return readFileSync(cookieFile,_0xbd3e8d(0x161));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ed025,_0x4eb7a2){const _0x2d3807=a13_0x19f9,_0x234fa4=_0x1ed025();while(!![]){try{const _0x15e2ce=parseInt(_0x2d3807(0x1df))/0x1+-parseInt(_0x2d3807(0x1d5))/0x2+-parseInt(_0x2d3807(0x1d9))/0x3*(-parseInt(_0x2d3807(0x1dd))/0x4)+-parseInt(_0x2d3807(0x1d6))/0x5*(-parseInt(_0x2d3807(0x1d4))/0x6)+-parseInt(_0x2d3807(0x1dc))/0x7+-parseInt(_0x2d3807(0x1da))/0x8*(-parseInt(_0x2d3807(0x1d2))/0x9)+-parseInt(_0x2d3807(0x1db))/0xa;if(_0x15e2ce===_0x4eb7a2)break;else _0x234fa4['push'](_0x234fa4['shift']());}catch(_0x1ef977){_0x234fa4['push'](_0x234fa4['shift']());}}}(a13_0x4443,0xb814e));function a13_0x19f9(_0x3334d8,_0x36a02b){_0x3334d8=_0x3334d8-0x1d1;const _0x44436c=a13_0x4443();let _0x19f9ad=_0x44436c[_0x3334d8];return _0x19f9ad;}function a13_0x4443(){const _0x49323d=['908Xtixwi','user','172159efoBfv','session','9lWeUsw','/api/auth/get-session','327792qaosTp','1204660wzKEtK','115exqGUv','utf-8','json','16476wNNPWY','6791720BGMEOw','8161060SsrfZf','9463370juJfFZ'];a13_0x4443=function(){return _0x49323d;};return a13_0x4443();}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0x114e13=a13_0x19f9;try{if(!existsSync(cookieFile))return null;const _0x3c0a1a=readFileSync(cookieFile,_0x114e13(0x1d7)),_0x107ec7=await fetch(getUserDomain()+_0x114e13(0x1d3),{'headers':{'cookie':_0x3c0a1a}});if(!_0x107ec7['ok'])return null;const _0x4d8e6f=await _0x107ec7[_0x114e13(0x1d8)]();if(!_0x4d8e6f[_0x114e13(0x1d1)]||!_0x4d8e6f[_0x114e13(0x1de)])return null;return _0x4d8e6f;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x427f6c,_0x63913e){const _0x32d002=a14_0x1b6d,_0x3d7191=_0x427f6c();while(!![]){try{const _0x5f5209=parseInt(_0x32d002(0x89))/0x1+parseInt(_0x32d002(0x87))/0x2*(parseInt(_0x32d002(0x8b))/0x3)+parseInt(_0x32d002(0x83))/0x4*(parseInt(_0x32d002(0x8f))/0x5)+-parseInt(_0x32d002(0x8e))/0x6+-parseInt(_0x32d002(0x80))/0x7*(-parseInt(_0x32d002(0x81))/0x8)+-parseInt(_0x32d002(0x8a))/0x9+-parseInt(_0x32d002(0x85))/0xa*(parseInt(_0x32d002(0x82))/0xb);if(_0x5f5209===_0x63913e)break;else _0x3d7191['push'](_0x3d7191['shift']());}catch(_0x377c5e){_0x3d7191['push'](_0x3d7191['shift']());}}}(a14_0x4b6e,0x5b047));function a14_0x4b6e(){const _0x390450=['55aGbhMr','40VTwbYR','/api/auth/get-session','1555670sKeXVc','user','16FtPHyW','then','730838MwDKSf','2766591eiDttH','110733tSypVS','session','utf-8','2762052CYBjNl','139960IaalFh','4286359CGzmyu','8NQJLwU'];a14_0x4b6e=function(){return _0x390450;};return a14_0x4b6e();}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a14_0x1b6d(_0x6b950b,_0x26d04f){_0x6b950b=_0x6b950b-0x80;const _0x4b6e47=a14_0x4b6e();let _0x1b6dbd=_0x4b6e47[_0x6b950b];return _0x1b6dbd;}export async function getIsSessionValid(){const _0x3d6064=a14_0x1b6d;try{if(!existsSync(cookieFile))return![];const _0x23da5a=readFileSync(cookieFile,_0x3d6064(0x8d)),_0x309368=await fetch(getUserDomain()+_0x3d6064(0x84),{'headers':{'cookie':_0x23da5a}})[_0x3d6064(0x88)](_0x220203=>_0x220203['json']());return _0x309368&&_0x309368[_0x3d6064(0x8c)]&&_0x309368[_0x3d6064(0x86)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x478437,_0x5a8f52){const _0x129633=a15_0x9cab,_0x3bfc93=_0x478437();while(!![]){try{const _0x79e62=parseInt(_0x129633(0xe9))/0x1+-parseInt(_0x129633(0xec))/0x2+-parseInt(_0x129633(0xea))/0x3+-parseInt(_0x129633(0xeb))/0x4*(-parseInt(_0x129633(0xe5))/0x5)+parseInt(_0x129633(0xe6))/0x6+-parseInt(_0x129633(0xee))/0x7+parseInt(_0x129633(0xed))/0x8*(parseInt(_0x129633(0xe8))/0x9);if(_0x79e62===_0x5a8f52)break;else _0x3bfc93['push'](_0x3bfc93['shift']());}catch(_0xf688d1){_0x3bfc93['push'](_0x3bfc93['shift']());}}}(a15_0x1968,0xde56c));function a15_0x9cab(_0x1ba93b,_0x54b306){_0x1ba93b=_0x1ba93b-0xe5;const _0x196840=a15_0x1968();let _0x9cab46=_0x196840[_0x1ba93b];return _0x9cab46;}function a15_0x1968(){const _0x512ec7=['3663990sHFqWl','4SLLrOh','1870814ySQBoC','8JQjGSb','2357089xVaIRA','6125605AbLQKs','9479382BDmBcT','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','3278376bDvlWC','234882AfsarO'];a15_0x1968=function(){return _0x512ec7;};return a15_0x1968();}export function buildLoginSuccessHtml(){const _0x1f63f7=a15_0x9cab,_0x6b480=_0x1f63f7(0xe7);return'<!doctype\x20html>\x0a<html\x20lang=\x22en\x22>\x0a<head>\x0a\x20\x20<meta\x20charset=\x22utf-8\x22>\x0a\x20\x20<meta\x20name=\x22viewport\x22\x20content=\x22width=device-width,\x20initial-scale=1\x22>\x0a\x20\x20<title>Login\x20successful\x20ยท\x20Rabetbase\x20CLI</title>\x0a\x20\x20<style>\x0a\x20\x20\x20\x20:root\x20{\x0a\x20\x20\x20\x20\x20\x20--bg0:\x20#0f1419;\x0a\x20\x20\x20\x20\x20\x20--bg1:\x20#1a2332;\x0a\x20\x20\x20\x20\x20\x20--card:\x20#ffffff;\x0a\x20\x20\x20\x20\x20\x20--text:\x20#1c2128;\x0a\x20\x20\x20\x20\x20\x20--muted:\x20#5c6570;\x0a\x20\x20\x20\x20\x20\x20--accent:\x20#2563eb;\x0a\x20\x20\x20\x20\x20\x20--accent-soft:\x20#eff6ff;\x0a\x20\x20\x20\x20\x20\x20--success:\x20#059669;\x0a\x20\x20\x20\x20\x20\x20--radius:\x2016px;\x0a\x20\x20\x20\x20\x20\x20--shadow:\x200\x2025px\x2050px\x20-12px\x20rgba(15,\x2020,\x2025,\x200.35);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20*\x20{\x20box-sizing:\x20border-box;\x20}\x0a\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20min-height:\x20100vh;\x0a\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20\x20\x20padding:\x2024px;\x0a\x20\x20\x20\x20\x20\x20font-family:\x20ui-sans-serif,\x20system-ui,\x20-apple-system,\x20\x22Segoe\x20UI\x22,\x20Roboto,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22Helvetica\x20Neue\x22,\x20Arial,\x20\x22Noto\x20Sans\x22,\x20\x22PingFang\x20SC\x22,\x20\x22Microsoft\x20YaHei\x22,\x20sans-serif;\x0a\x20\x20\x20\x20\x20\x20background:\x20linear-gradient(160deg,\x20var(--bg0)\x200%,\x20var(--bg1)\x2045%,\x20#243047\x20100%);\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--text);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.card\x20{\x0a\x20\x20\x20\x20\x20\x20width:\x20100%;\x0a\x20\x20\x20\x20\x20\x20max-width:\x20420px;\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--card);\x0a\x20\x20\x20\x20\x20\x20border-radius:\x20var(--radius);\x0a\x20\x20\x20\x20\x20\x20box-shadow:\x20var(--shadow);\x0a\x20\x20\x20\x20\x20\x20padding:\x2040px\x2036px\x2032px;\x0a\x20\x20\x20\x20\x20\x20text-align:\x20center;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.icon\x20{\x0a\x20\x20\x20\x20\x20\x20width:\x2064px;\x0a\x20\x20\x20\x20\x20\x20height:\x2064px;\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x20auto\x2020px;\x0a\x20\x20\x20\x20\x20\x20border-radius:\x2050%;\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--accent-soft);\x0a\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.icon\x20svg\x20{\x20width:\x2036px;\x20height:\x2036px;\x20}\x0a\x20\x20\x20\x20h1\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x200\x2012px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x201.375rem;\x0a\x20\x20\x20\x20\x20\x20font-weight:\x20600;\x0a\x20\x20\x20\x20\x20\x20letter-spacing:\x20-0.02em;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20p.lead\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x200\x208px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.9375rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--muted);\x0a\x20\x20\x20\x20\x20\x20line-height:\x201.55;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.countdown\x20{\x0a\x20\x20\x20\x20\x20\x20display:\x20inline-flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20gap:\x206px;\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2016px;\x0a\x20\x20\x20\x20\x20\x20padding:\x208px\x2014px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.875rem;\x0a\x20\x20\x20\x20\x20\x20font-variant-numeric:\x20tabular-nums;\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--accent);\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--accent-soft);\x0a\x20\x20\x20\x20\x20\x20border-radius:\x20999px;\x0a\x20\x20\x20\x20\x20\x20font-weight:\x20500;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20#manualMsg\x20{\x0a\x20\x20\x20\x20\x20\x20display:\x20none;\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2020px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.8125rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20#b91c1c;\x0a\x20\x20\x20\x20\x20\x20line-height:\x201.45;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.cli-hint\x20{\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2028px;\x0a\x20\x20\x20\x20\x20\x20padding-top:\x2024px;\x0a\x20\x20\x20\x20\x20\x20border-top:\x201px\x20solid\x20#e8ecf0;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.75rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20#8b949e;\x0a\x20\x20\x20\x20}\x0a\x20\x20</style>\x0a</head>\x0a<body>\x0a\x20\x20<div\x20class=\x22card\x22\x20role=\x22status\x22\x20aria-live=\x22polite\x22>\x0a\x20\x20\x20\x20<div\x20class=\x22icon\x22\x20aria-hidden=\x22true\x22>\x0a\x20\x20\x20\x20\x20\x20<svg\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x2210\x22\x20stroke=\x22#059669\x22\x20stroke-width=\x222\x22\x20fill=\x22none\x22/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M8\x2012.5l2.5\x202.5L16\x209\x22\x20stroke=\x22#059669\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22/>\x0a\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<h1>Login\x20successful</h1>\x0a\x20\x20\x20\x20<p\x20class=\x22lead\x22>You\x20can\x20return\x20to\x20the\x20terminal\x20to\x20continue.\x20This\x20window\x20will\x20try\x20to\x20close\x20automatically.</p>\x0a\x20\x20\x20\x20<div\x20class=\x22countdown\x22>\x0a\x20\x20\x20\x20\x20\x20Closing\x20in\x20<span\x20id=\x22t\x22>5</span>s\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<div\x20id=\x22manualMsg\x22>'+_0x6b480+'</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(_0x221187,_0x5303d1){var _0x5df497=a16_0x3765,_0x8f3415=_0x221187();while(!![]){try{var _0x305f43=-parseInt(_0x5df497(0x10b))/0x1*(parseInt(_0x5df497(0x111))/0x2)+parseInt(_0x5df497(0x109))/0x3+-parseInt(_0x5df497(0x10a))/0x4*(parseInt(_0x5df497(0x10c))/0x5)+-parseInt(_0x5df497(0x110))/0x6*(-parseInt(_0x5df497(0x105))/0x7)+-parseInt(_0x5df497(0x106))/0x8+parseInt(_0x5df497(0x10f))/0x9+-parseInt(_0x5df497(0x107))/0xa*(-parseInt(_0x5df497(0x108))/0xb);if(_0x305f43===_0x5303d1)break;else _0x8f3415['push'](_0x8f3415['shift']());}catch(_0x3086e8){_0x8f3415['push'](_0x8f3415['shift']());}}}(a16_0x589a,0x532b5));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function logout(){var _0x356e89=a16_0x3765;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x356e89(0x10d)](_0x356e89(0x10e))):console[_0x356e89(0x10d)](_0x356e89(0x112));}function a16_0x3765(_0x62f18c,_0x2763c9){_0x62f18c=_0x62f18c-0x105;var _0x589a0f=a16_0x589a();var _0x376549=_0x589a0f[_0x62f18c];return _0x376549;}function a16_0x589a(){var _0x5d890a=['670UoGtND','log','โ\x20Logged\x20out','2453148EzUMQa','746094HVJhpD','7550ySDjbQ','!\x20Not\x20logged\x20in','35qRFuhI','1321232gbRlHr','680990pVNpeJ','33pVTtAn','322152cdUebI','11548GlZIat','83jkoljC'];a16_0x589a=function(){return _0x5d890a;};return a16_0x589a();}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a17_0x5e9cf6=a17_0x5c64;(function(_0x1cc2e1,_0x58194b){const _0x18d625=a17_0x5c64,_0x4221fb=_0x1cc2e1();while(!![]){try{const _0x179e07=-parseInt(_0x18d625(0x158))/0x1*(-parseInt(_0x18d625(0x155))/0x2)+parseInt(_0x18d625(0x153))/0x3+-parseInt(_0x18d625(0x156))/0x4*(-parseInt(_0x18d625(0x15d))/0x5)+-parseInt(_0x18d625(0x15a))/0x6+parseInt(_0x18d625(0x154))/0x7*(-parseInt(_0x18d625(0x15c))/0x8)+parseInt(_0x18d625(0x15e))/0x9+parseInt(_0x18d625(0x15b))/0xa*(-parseInt(_0x18d625(0x157))/0xb);if(_0x179e07===_0x58194b)break;else _0x4221fb['push'](_0x4221fb['shift']());}catch(_0x2cb44f){_0x4221fb['push'](_0x4221fb['shift']());}}}(a17_0x5df5,0x70564));function a17_0x5c64(_0xa8a137,_0x174037){_0xa8a137=_0xa8a137-0x153;const _0x5df523=a17_0x5df5();let _0x5c6485=_0x5df523[_0xa8a137];return _0x5c6485;}export const dynamicCliFlags={'enableBffSave':{'type':a17_0x5e9cf6(0x159)}};function a17_0x5df5(){const _0x55f5a5=['1253182skoWuI','4CRcomg','2380WnjDar','128942JOvtFX','19595DZvIPJ','boolean','4015752mjiykt','40REKSPE','32Sotkwb','5410LrVUhC','4005081XjepPq','2293281slcGff'];a17_0x5df5=function(){return _0x55f5a5;};return a17_0x5df5();}
|