@lovrabet/rabetbase-cli 2.5.4-beta.5 → 2.5.4
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 +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x12cc5c,_0x4d1838){const _0x20b1d5=a0_0x2796,_0x4353e8=_0x12cc5c();while(!![]){try{const _0x19aeb1=parseInt(_0x20b1d5(0x10c))/0x1+-parseInt(_0x20b1d5(0x115))/0x2*(parseInt(_0x20b1d5(0x108))/0x3)+parseInt(_0x20b1d5(0x106))/0x4+-parseInt(_0x20b1d5(0x118))/0x5*(parseInt(_0x20b1d5(0x107))/0x6)+-parseInt(_0x20b1d5(0x105))/0x7*(-parseInt(_0x20b1d5(0x117))/0x8)+-parseInt(_0x20b1d5(0x113))/0x9+-parseInt(_0x20b1d5(0x10b))/0xa;if(_0x19aeb1===_0x4d1838)break;else _0x4353e8['push'](_0x4353e8['shift']());}catch(_0x3a63df){_0x4353e8['push'](_0x4353e8['shift']());}}}(a0_0x5637,0x9f5dd));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x21ecdb from'node:path';import{fetchDatasetDoc}from'../core/api-client.js';import{logger}from'../utils/logger.js';export{fetchDatasetDoc}from'../core/api-client.js';function delay(_0x3a7611){return new Promise(_0x4538ec=>setTimeout(_0x4538ec,_0x3a7611));}function a0_0x2796(_0x10c0a4,_0x345c0a){_0x10c0a4=_0x10c0a4-0xff;const _0x563724=a0_0x5637();let _0x2796b1=_0x563724[_0x10c0a4];return _0x2796b1;}export async function generateDatasetDocs(_0xe67c29,_0x287509,_0x4d8770,_0x59b628='./docs',_0x5d1714,_0x39ac2c){const _0x45926e=a0_0x2796;mkdirSync(_0x59b628,{'recursive':!![]});const _0x3ac8f7=[],_0x1cdc93=_0xe67c29[_0x45926e(0x10e)];console['log']('\x0a'+_0x1cdc93+_0x45926e(0x114));for(let _0x597a0f=0x0;_0x597a0f<_0xe67c29[_0x45926e(0x10e)];_0x597a0f++){const _0x5d37ab=_0xe67c29[_0x597a0f],_0x158331=_0x597a0f+0x1,_0x1ac4fa=_0x5d37ab[_0x45926e(0x103)];try{console[_0x45926e(0x104)]('['+_0x158331+'/'+_0x1cdc93+_0x45926e(0x102)+_0x1ac4fa+_0x45926e(0x110)+_0x5d37ab[_0x45926e(0x10d)]+')');if(_0x5d1714)_0x5d1714(_0x158331,_0x1cdc93,_0x1ac4fa);const _0x4eb22f=await fetchDatasetDoc({'appCode':_0x287509,'cookie':_0x4d8770,'datasetCode':_0x5d37ab[_0x45926e(0x101)],'datasetId':_0x5d37ab['id'],'enableAI':![],'extraParams':_0x39ac2c}),_0xeeb78b=a0_0x21ecdb['join'](_0x59b628,_0x1ac4fa+'.md');writeFileSync(_0xeeb78b,_0x4eb22f,{'encoding':_0x45926e(0x116)}),console['log'](_0x45926e(0x10f)+_0x1ac4fa+_0x45926e(0x112)),logger[_0x45926e(0xff)]('api-doc','Generated\x20docs\x20successfully:\x20'+_0x1ac4fa,undefined,{'datasetCode':_0x5d37ab[_0x45926e(0x101)],'datasetName':_0x5d37ab['name'],'filePath':_0xeeb78b,'progress':_0x158331+'/'+_0x1cdc93}),_0x3ac8f7['push']({'datasetCode':_0x5d37ab['datasetCode'],'datasetName':_0x5d37ab[_0x45926e(0x10d)],'filePath':_0xeeb78b,'success':!![]});if(_0x158331<_0x1cdc93)await delay(0x1388);}catch(_0x3898f3){const _0xa429a9=_0x3898f3 instanceof Error?_0x3898f3[_0x45926e(0x109)]:String(_0x3898f3);console['log'](_0x45926e(0x111)+_0x1ac4fa+'.md\x20-\x20'+_0xa429a9),logger['error']('api-doc','Failed\x20to\x20generate\x20docs:\x20'+_0x5d37ab[_0x45926e(0x101)],{'datasetCode':_0x5d37ab[_0x45926e(0x101)],'datasetName':_0x5d37ab[_0x45926e(0x10d)],'error':_0xa429a9,'progress':_0x158331+'/'+_0x1cdc93}),_0x3ac8f7[_0x45926e(0x10a)]({'datasetCode':_0x5d37ab[_0x45926e(0x101)],'datasetName':_0x5d37ab[_0x45926e(0x10d)],'filePath':'','success':![],'error':_0xa429a9}),_0x158331<_0x1cdc93&&(console[_0x45926e(0x104)](_0x45926e(0x100)),await delay(0xbb8));}}return _0x3ac8f7;}function a0_0x5637(){const _0x2c2247=['push','984320PdOSQM','89767vLHIBT','name','length','✓\x20Generated:\x20','.md\x20(','✗\x20Failed:\x20','.md','1972323VMnqjz','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','3274niOUAz','utf8','3752nzGqDR','915XnPflk','success','Waiting\x203\x20seconds...\x0a','datasetCode',']\x20Generating:\x20','tableName','log','11032iQXuwg','3878624PpXQoC','2412gUcnuh','1383RJZYRV','message'];a0_0x5637=function(){return _0x2c2247;};return a0_0x5637();}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x4badf3=a1_0x9cb4;function a1_0x1248(){const _0x4433cf=['.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.','add','flatMap','push','2421272WJRnEn','filter','574506EvePoU','834808kVioqk','set','Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.','apiGroup','5JFekCv','name','714268KQaYpZ','API\x20directory\x20\x22','normalizedApiDir','\x22\x20resolves\x20to\x20multiple\x20API\x20directories.','16734uxxauu','length','map','1GDcAKc','validation','2828403jYEBVv','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','size','resolve','903qrXhfo','join','cwd','values','1715830zMHlxz','get','33eqdbEz','app'];a1_0x1248=function(){return _0x4433cf;};return a1_0x1248();}(function(_0x1f47be,_0x2c10df){const _0x2ab404=a1_0x9cb4,_0xbcc77a=_0x1f47be();while(!![]){try{const _0x250eb4=-parseInt(_0x2ab404(0x14d))/0x1*(-parseInt(_0x2ab404(0x146))/0x2)+-parseInt(_0x2ab404(0x13f))/0x3+-parseInt(_0x2ab404(0x140))/0x4*(-parseInt(_0x2ab404(0x144))/0x5)+-parseInt(_0x2ab404(0x14a))/0x6*(-parseInt(_0x2ab404(0x153))/0x7)+parseInt(_0x2ab404(0x13d))/0x8+-parseInt(_0x2ab404(0x14f))/0x9+parseInt(_0x2ab404(0x157))/0xa*(-parseInt(_0x2ab404(0x159))/0xb);if(_0x250eb4===_0x2c10df)break;else _0xbcc77a['push'](_0xbcc77a['shift']());}catch(_0x30852f){_0xbcc77a['push'](_0xbcc77a['shift']());}}}(a1_0x1248,0x32b8e));import a1_0x129a1b from'node:path';import{CliErrors}from'../errors.js';export function normalizeApiDir(_0x16e59e,_0x356d4a=process[a1_0x4badf3(0x155)]()){const _0x27f512=a1_0x4badf3;return a1_0x129a1b[_0x27f512(0x152)](_0x356d4a,_0x16e59e);}function normalizedApiGroup(_0x560331){const _0x150e72=_0x560331?.['trim']();return _0x150e72||undefined;}function a1_0x9cb4(_0x15a4ec,_0x556235){_0x15a4ec=_0x15a4ec-0x139;const _0x12487d=a1_0x1248();let _0x9cb43e=_0x12487d[_0x15a4ec];return _0x9cb43e;}export function resolveApiProfileLayouts(_0x5e283e,_0x566235,_0x241d3a=process[a1_0x4badf3(0x155)]()){const _0x5d7afc=a1_0x4badf3,_0x41c3ab=_0x5e283e[_0x5d7afc(0x14c)](_0x228406=>{const _0x38c168=_0x5d7afc,_0x1d2e98=_0x566235(_0x228406);return{'app':_0x228406,'outputDir':_0x1d2e98,'normalizedApiDir':normalizeApiDir(_0x1d2e98,_0x241d3a),'apiGroup':normalizedApiGroup(_0x228406[_0x38c168(0x143)])};}),_0x1544a7=new Map();for(const _0x24ebfe of _0x41c3ab){if(!_0x24ebfe[_0x5d7afc(0x143)])continue;const _0x248c24=_0x1544a7[_0x5d7afc(0x158)](_0x24ebfe[_0x5d7afc(0x143)])??new Set();_0x248c24[_0x5d7afc(0x13a)](_0x24ebfe['normalizedApiDir']),_0x1544a7[_0x5d7afc(0x141)](_0x24ebfe['apiGroup'],_0x248c24);}for(const [_0x2ef202,_0x4ddb50]of _0x1544a7){if(_0x4ddb50[_0x5d7afc(0x151)]>0x1)throw CliErrors[_0x5d7afc(0x14e)]('API\x20group\x20\x22'+_0x2ef202+_0x5d7afc(0x149),_0x5d7afc(0x142));}const _0x36c536=new Map();for(const _0x57a29e of _0x41c3ab){const _0x1d4ea5=_0x36c536[_0x5d7afc(0x158)](_0x57a29e[_0x5d7afc(0x148)])??[];_0x1d4ea5[_0x5d7afc(0x13c)](_0x57a29e),_0x36c536[_0x5d7afc(0x141)](_0x57a29e[_0x5d7afc(0x148)],_0x1d4ea5);}for(const _0x30fc5e of _0x36c536[_0x5d7afc(0x156)]()){const _0x21632d=new Set(_0x30fc5e[_0x5d7afc(0x13b)](_0x2bca0a=>_0x2bca0a[_0x5d7afc(0x143)]?[_0x2bca0a[_0x5d7afc(0x143)]]:[]));if(_0x21632d[_0x5d7afc(0x151)]===0x0)continue;if(_0x21632d['size']>0x1||_0x30fc5e['some'](_0x3d514e=>!_0x3d514e['apiGroup'])){const _0xa0130c=_0x30fc5e[_0x5d7afc(0x14c)](_0x118571=>_0x118571[_0x5d7afc(0x15a)][_0x5d7afc(0x145)])[_0x5d7afc(0x154)](',\x20');throw CliErrors[_0x5d7afc(0x14e)](_0x5d7afc(0x147)+_0x30fc5e[0x0]['outputDir']+_0x5d7afc(0x150),'Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20'+_0xa0130c+_0x5d7afc(0x139));}}return _0x41c3ab;}export function getRegistryGroup(_0x139654,_0xacd449){const _0x20a84b=a1_0x4badf3;if(_0xacd449[_0x20a84b(0x143)])return _0x139654[_0x20a84b(0x13e)](_0x5ed910=>_0x5ed910['apiGroup']===_0xacd449[_0x20a84b(0x143)]);const _0x8389bf=_0x139654[_0x20a84b(0x13e)](_0x15b17e=>_0x15b17e[_0x20a84b(0x148)]===_0xacd449['normalizedApiDir']);return _0x8389bf[_0x20a84b(0x14b)]===0x1?_0x8389bf:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a2_0x59ff(){var _0x1c20e7=['2555816CuKrDo','18Mlunsd','187leBRxv','550105CPNMIq','2922DmXKsW','428VnsVih','203GiGLpH','4YbLDJh','2084289jORgBk','219594EgzxYI','78DnOsQi','288270JGwxVg','338988EhUhYG'];a2_0x59ff=function(){return _0x1c20e7;};return a2_0x59ff();}(function(_0x3c2c8a,_0x5a00ad){var _0x504fc4=a2_0x307d,_0x27b2a9=_0x3c2c8a();while(!![]){try{var _0x4858d8=-parseInt(_0x504fc4(0x1f0))/0x1*(-parseInt(_0x504fc4(0x1f1))/0x2)+parseInt(_0x504fc4(0x1e7))/0x3*(parseInt(_0x504fc4(0x1f3))/0x4)+parseInt(_0x504fc4(0x1ef))/0x5+-parseInt(_0x504fc4(0x1e8))/0x6*(parseInt(_0x504fc4(0x1f2))/0x7)+parseInt(_0x504fc4(0x1ec))/0x8*(parseInt(_0x504fc4(0x1ed))/0x9)+parseInt(_0x504fc4(0x1ea))/0xa*(-parseInt(_0x504fc4(0x1ee))/0xb)+parseInt(_0x504fc4(0x1eb))/0xc*(parseInt(_0x504fc4(0x1e9))/0xd);if(_0x4858d8===_0x5a00ad)break;else _0x27b2a9['push'](_0x27b2a9['shift']());}catch(_0x2e009d){_0x27b2a9['push'](_0x27b2a9['shift']());}}}(a2_0x59ff,0xa7c06));function a2_0x307d(_0x560f3a,_0x37196c){_0x560f3a=_0x560f3a-0x1e7;var _0x59ffe7=a2_0x59ff();var _0x307de5=_0x59ffe7[_0x560f3a];return _0x307de5;}export{fetchModelList}from'../core/api-client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x155829,_0xabdf69){const _0x1f321b=a3_0x4256,_0x56075a=_0x155829();while(!![]){try{const _0x34e7f3=-parseInt(_0x1f321b(0x101))/0x1+parseInt(_0x1f321b(0xde))/0x2*(parseInt(_0x1f321b(0x100))/0x3)+parseInt(_0x1f321b(0x10a))/0x4*(-parseInt(_0x1f321b(0xf2))/0x5)+parseInt(_0x1f321b(0xe8))/0x6+parseInt(_0x1f321b(0xe2))/0x7*(-parseInt(_0x1f321b(0xef))/0x8)+-parseInt(_0x1f321b(0xfc))/0x9*(-parseInt(_0x1f321b(0xdb))/0xa)+parseInt(_0x1f321b(0xeb))/0xb;if(_0x34e7f3===_0xabdf69)break;else _0x56075a['push'](_0x56075a['shift']());}catch(_0x413c92){_0x56075a['push'](_0x56075a['shift']());}}}(a3_0x3cb2,0xae639));function a3_0x3cb2(){const _0x2e7701=['6748273WSADlC','-api','preserved','overwriteTypescript','api','stringify','121986ccvWai',',\x20...LOVRABET_SDK_CONFIG\x20}','templates/generate-api','7481001FjQiGI','init-api','-client','datasetCode','8dEHxBG','client','dirname','5gYrfXw','modelProfile','path','.ts','allowEmptyModelReplacement','replaceApiContent','action','includes','refreshed','created','28809IWEckI','test','defaultName','LOVRABET_RUNTIME_DOMAIN','16686wOqkSJ','225648CGJbJA','none','client.ts.tpl','typescript','resolve','join','existed','CONFIG_NAMES.DEFAULT','../..','4473356xwBEUx','tableName','basename','alias','missing','map','utf8','format','toUpperCase','replace','{\x20apiConfigName:\x20','scaffoldMode','modelRuntime','3570JBtbpR','runtimeDomain','length','424fhypsk','api.ts.tpl','API\x20scaffold\x20written.','name'];a3_0x3cb2=function(){return _0x2e7701;};return a3_0x3cb2();}import a3_0x126caa from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x2ac82b from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a3_0x4256(_0x59cc7b,_0x89c7b8){_0x59cc7b=_0x59cc7b-0xd7;const _0x3cb21d=a3_0x3cb2();let _0x42560f=_0x3cb21d[_0x59cc7b];return _0x42560f;}import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';import{generateSdkConfigFile}from'../api/generate-sdk-config-file.js';import{MODEL_REGISTRY_FILE_NAME,MODEL_RUNTIME_FILE_NAME,updateModelRegistry}from'../api/model-registry-file.js';import{renderModelRegistryScaffold}from'../api/model-registry-scaffold.js';function fileAction(_0x345ed5,_0x239dc7){const _0x4a0f6d=a3_0x4256;if(!_0x239dc7)return _0x345ed5?_0x4a0f6d(0xe4):_0x4a0f6d(0x10e);return _0x345ed5?'overwritten':'created';}export async function generateApiFile(_0x2e2d46,_0x4aef1d,_0x3a39ad,_0x40dec4,_0x177507,_0x5c1188,_0x209e33,_0x1e5f99={},_0x5002d4={}){const _0x5ef0f1=a3_0x4256;if(!_0x3a39ad)throw new Error('Please\x20configure\x20app\x20code\x20first\x20via\x20`'+CLI_BIN_NAME+'\x20config\x20set\x20app\x20<value>`');const _0x3109ab=_0x40dec4&&!_0x209e33,_0x513d8c=!!_0x5002d4[_0x5ef0f1(0xf3)],_0x562d21=_0x513d8c||_0x3109ab,_0x20e8a0=_0x209e33||_0x3a39ad,_0x2cb09c=_0x513d8c||_0x3109ab?'default':_0x20e8a0,_0x3f6534=_0x513d8c||_0x3109ab?_0x5ef0f1(0x108):JSON['stringify'](_0x20e8a0),_0x29e668=!isProduction(_0x177507),_0x3d9e63=_0x29e668?',\x20env:\x20'+JSON[_0x5ef0f1(0xe7)](_0x177507):'',_0x13d65f=_0x5ef0f1(0xd8)+_0x3f6534+_0x3d9e63+_0x5ef0f1(0xe9),_0x85d3a4=_0x513d8c?'':_0x4aef1d,_0x174443=_0x85d3a4?_0x85d3a4+_0x5ef0f1(0xe3):'api',_0x16b6ce=_0x85d3a4?_0x85d3a4+_0x5ef0f1(0xed):_0x5ef0f1(0xf0),_0x50418b=_0x85d3a4&&!/^app-[a-f0-9]+$/i[_0x5ef0f1(0xfd)](_0x85d3a4)?_0x85d3a4[_0x5ef0f1(0xd7)](/-/g,'_')[_0x5ef0f1(0x112)]():'LOVRABET',_0x12a924=/^\d/[_0x5ef0f1(0xfd)](_0x50418b)?'APP_'+_0x50418b:_0x50418b,_0x26673e=_0x2e2d46[_0x5ef0f1(0x10f)](_0x2e5aee=>({'datasetCode':_0x2e5aee[_0x5ef0f1(0xee)],'tableName':_0x2e5aee[_0x5ef0f1(0x10b)],'name':_0x2e5aee[_0x5ef0f1(0xe1)]||'','alias':_0x2e5aee[_0x5ef0f1(0x10d)]||_0x2e5aee['key']})),_0xc3610c=fileURLToPath(import.meta.url),_0x2040fb=a3_0x2ac82b[_0x5ef0f1(0x105)](a3_0x2ac82b[_0x5ef0f1(0xf1)](_0xc3610c),_0x5ef0f1(0x109)),_0x136995=a3_0x2ac82b['join'](_0x2040fb,_0x5ef0f1(0xea)),_0x3ec294=a3_0x2ac82b['join'](_0x136995,_0x5ef0f1(0xdf)),_0x29b1e3=a3_0x2ac82b[_0x5ef0f1(0x106)](_0x136995,_0x5ef0f1(0x103)),_0x6a94d0=_0x5c1188;mkdirSync(_0x6a94d0,{'recursive':!![]});const _0x33c1d0=_0x513d8c?{}:_0x1e5f99,_0x1cbe59=await generateSdkConfigFile(_0x6a94d0,_0x33c1d0,_0x85d3a4),_0x35ea4a=a3_0x2ac82b[_0x5ef0f1(0x10c)](_0x1cbe59,_0x5ef0f1(0xf5)),_0x7feac=a3_0x2ac82b[_0x5ef0f1(0x106)](_0x6a94d0,_0x174443+'.ts'),_0x3aab69=a3_0x2ac82b['join'](_0x6a94d0,_0x16b6ce+'.ts'),_0x3ab007=_0x5002d4[_0x5ef0f1(0xe5)]===!![],_0x49cb02=existsSync(_0x7feac),_0xc47d57=existsSync(_0x3aab69),_0x570a64=_0x5002d4[_0x5ef0f1(0xd9)]??(_0x3ab007?_0x5ef0f1(0xd7):_0x5ef0f1(0x10e)),_0xb382fa=_0x570a64===_0x5ef0f1(0xd7)||_0x570a64===_0x5ef0f1(0x10e)&&!_0x49cb02,_0x41da9f=_0x570a64==='replace'||_0x570a64===_0x5ef0f1(0x10e)&&!_0xc47d57,_0x3e7e36=_0x5002d4[_0x5ef0f1(0xf3)]?updateModelRegistry({'outputDir':_0x6a94d0,'profileName':_0x5002d4['modelProfile'][_0x5ef0f1(0xe1)],'defaultProfile':_0x5002d4[_0x5ef0f1(0xf3)][_0x5ef0f1(0xfe)],'appCode':_0x3a39ad,'runtimeDomain':_0x5002d4['modelProfile'][_0x5ef0f1(0xdc)],'models':_0x26673e,'allowEmptyReplacement':_0x5002d4[_0x5ef0f1(0xf6)]===!![]}):undefined,_0x5c9700=_0x3e7e36?a3_0x2ac82b[_0x5ef0f1(0x106)](_0x6a94d0,MODEL_RUNTIME_FILE_NAME):undefined,_0xc26b56=_0x5c9700?existsSync(_0x5c9700):![],_0x2f5e1d=_0x513d8c&&_0x570a64!==_0x5ef0f1(0x102)?await renderModelRegistryScaffold(_0x6a94d0):undefined;_0x5c9700&&_0x2f5e1d&&writeFileSync(_0x5c9700,_0x2f5e1d[_0x5ef0f1(0xda)],_0x5ef0f1(0x110));const _0x465cb7=_0x26673e[0x0]?.[_0x5ef0f1(0x10d)];if(_0xb382fa){const _0x9775fe=_0x2f5e1d?.[_0x5ef0f1(0xe6)]??readFileSync(_0x3ec294,_0x5ef0f1(0x110)),_0x423e1e=_0x513d8c?_0x9775fe:TemplateReplacer['replaceApiContent'](_0x9775fe,_0x3a39ad,_0x26673e,_0x465cb7,_0x174443,_0x3f6534,undefined,_0x12a924);writeFileSync(_0x7feac,await a3_0x126caa[_0x5ef0f1(0x111)](_0x423e1e,{'parser':_0x5ef0f1(0x104)}),{'encoding':'utf8'});}if(_0x41da9f){const _0x50a5fa=_0x2f5e1d?.[_0x5ef0f1(0xf0)]??readFileSync(_0x29b1e3,_0x5ef0f1(0x110)),_0x2bc9b9=_0x513d8c?_0x50a5fa:TemplateReplacer[_0x5ef0f1(0xf7)](_0x50a5fa,_0x3a39ad,_0x26673e,_0x465cb7,_0x174443,_0x3f6534,_0x13d65f,_0x12a924,_0x35ea4a);writeFileSync(_0x3aab69,await a3_0x126caa['format'](_0x2bc9b9,{'parser':_0x5ef0f1(0x104)}),{'encoding':_0x5ef0f1(0x110)});}const _0x3e3731=_0x26673e[_0x5ef0f1(0xdd)],_0x3c7086={'api':{'path':_0x7feac,'action':fileAction(_0x49cb02,_0xb382fa)},'client':{'path':_0x3aab69,'action':fileAction(_0xc47d57,_0x41da9f)},'sdkConfig':{'path':_0x1cbe59,'action':_0x5ef0f1(0xfa)},..._0x3e7e36?{'modelRegistry':{'path':_0x3e7e36['path'],'action':_0x3e7e36[_0x5ef0f1(0x107)]?_0x5ef0f1(0xfa):'created'},'modelRuntime':{'path':_0x5c9700,'action':_0x2f5e1d?_0xc26b56?'refreshed':_0x5ef0f1(0xfb):_0xc26b56?_0x5ef0f1(0xe4):_0x5ef0f1(0x10e)}}:{}},_0x5c10ff=existsSync(_0x7feac)&&readFileSync(_0x7feac,_0x5ef0f1(0x110))['includes'](MODEL_REGISTRY_FILE_NAME[_0x5ef0f1(0xd7)](_0x5ef0f1(0xf5),'')),_0x5544d8=existsSync(_0x3aab69)&&readFileSync(_0x3aab69,'utf8')[_0x5ef0f1(0xf9)](_0x5ef0f1(0xff)),_0x501774=_0x513d8c?!_0x5c10ff||!_0x5544d8||!existsSync(_0x5c9700):![],_0x542e68=_0x513d8c?_0x501774:_0x3c7086[_0x5ef0f1(0xe6)][_0x5ef0f1(0xf8)]===_0x5ef0f1(0xe4)||_0x3c7086[_0x5ef0f1(0xf0)][_0x5ef0f1(0xf8)]===_0x5ef0f1(0xe4);return logger['success'](_0x5ef0f1(0xec),_0x542e68?a3_0x2ac82b[_0x5ef0f1(0x10c)](_0x1cbe59)+'\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.':_0x513d8c?'Model\x20facts\x20refreshed.':_0x5ef0f1(0xe0),undefined,{'apiFile':_0x7feac,'clientFile':_0x3aab69,'sdkConfig':_0x1cbe59,'modelCount':_0x3e3731,'configName':_0x2cb09c,'isDefaultConfig':_0x562d21,'needsAgentMerge':_0x542e68,'needsProjectUpgrade':_0x501774,'files':_0x3c7086}),{'appCode':_0x3a39ad,'modelCount':_0x3e3731,'models':_0x26673e,'apiFilePath':_0x7feac,'clientFilePath':_0x3aab69,'sdkConfigPath':_0x1cbe59,'modelRegistryPath':_0x3e7e36?.[_0x5ef0f1(0xf4)],'modelRuntimePath':_0x5c9700,'modelProfile':_0x5002d4[_0x5ef0f1(0xf3)]?.[_0x5ef0f1(0xe1)],'configName':_0x2cb09c,'isDefaultConfig':_0x562d21,'sdkRouting':_0x33c1d0,'files':_0x3c7086,'needsAgentMerge':_0x542e68,'needsProjectUpgrade':_0x501774};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0xf80ac8=a4_0x4404;(function(_0x232c6e,_0x11af9e){const _0x4e0c57=a4_0x4404,_0x495704=_0x232c6e();while(!![]){try{const _0x25e34d=-parseInt(_0x4e0c57(0x1b1))/0x1*(-parseInt(_0x4e0c57(0x1b9))/0x2)+parseInt(_0x4e0c57(0x1b3))/0x3+-parseInt(_0x4e0c57(0x1a8))/0x4+-parseInt(_0x4e0c57(0x1af))/0x5+-parseInt(_0x4e0c57(0x1b8))/0x6+parseInt(_0x4e0c57(0x1ad))/0x7*(-parseInt(_0x4e0c57(0x1a9))/0x8)+parseInt(_0x4e0c57(0x1bc))/0x9;if(_0x25e34d===_0x11af9e)break;else _0x495704['push'](_0x495704['shift']());}catch(_0x274c35){_0x495704['push'](_0x495704['shift']());}}}(a4_0x3094,0x1a0c8));import{mkdirSync,writeFileSync}from'node:fs';function a4_0x4404(_0x559e0b,_0x269d3f){_0x559e0b=_0x559e0b-0x1a8;const _0x3094a5=a4_0x3094();let _0x4404e9=_0x3094a5[_0x559e0b];return _0x4404e9;}import a4_0x57e4d5 from'node:path';import a4_0x4a7d53 from'prettier';export const SDK_CONFIG_FILE_NAME=a4_0xf80ac8(0x1bd);export function getSdkConfigFileName(_0x2988bb=''){const _0x1f27a5=a4_0xf80ac8;return _0x2988bb?_0x2988bb+_0x1f27a5(0x1ab):SDK_CONFIG_FILE_NAME;}export async function generateSdkConfigFile(_0x4d5844,_0x19dee0={},_0x1cf438=''){const _0x1504ee=a4_0xf80ac8,_0x77fe12=[];_0x19dee0[_0x1504ee(0x1b7)]&&_0x77fe12[_0x1504ee(0x1b0)](_0x1504ee(0x1aa)+JSON[_0x1504ee(0x1ac)](_0x19dee0[_0x1504ee(0x1b7)]));const _0x520853=_0x77fe12[_0x1504ee(0x1b6)]>0x0?_0x1504ee(0x1b5)+_0x77fe12[_0x1504ee(0x1b4)](',\x0a\x20\x20')+',\x0a}':'{}',_0x24154d=_0x1504ee(0x1bb)+_0x520853+'\x20as\x20const;\x0a';mkdirSync(_0x4d5844,{'recursive':!![]});const _0x119e9e=a4_0x57e4d5[_0x1504ee(0x1b4)](_0x4d5844,getSdkConfigFileName(_0x1cf438));return writeFileSync(_0x119e9e,await a4_0x4a7d53[_0x1504ee(0x1ba)](_0x24154d,{'parser':_0x1504ee(0x1ae)}),_0x1504ee(0x1b2)),_0x119e9e;}function a4_0x3094(){const _0x3e6eb2=['utf8','625788YEfpDS','join','{\x0a\x20\x20','length','runtimeDomain','1206366eteSfq','4nqxOJw','format','/**\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','2997558YgVnwU','sdk-config.ts','246868zFSiJc','1293008avyCyv','runtimeDomain:\x20','-sdk-config.ts','stringify','7zkMhxq','typescript','310300klnnPD','push','25751cxkZuv'];a4_0x3094=function(){return _0x3e6eb2;};return a4_0x3094();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a5_0x33bc(){const _0x588d0c=['@lovrabet/sdk','lovrabetClient','push','1444490qNJJoJ','4TWsZVZ','registerModels','2377923ZgebpN','match','85puuabU','Generated\x20by\x20Rabetbase\x20CLI','map','replace','186982GDGccj','some','8752240QkoQAC','MODELS_CONFIG','6154038KXnQXi','286536siRQya','endsWith','1RJjveC','matchAll','4160394hzxgrJ','length','exec','APP_CODE','test'];a5_0x33bc=function(){return _0x588d0c;};return a5_0x33bc();}(function(_0x57fb77,_0x5b16e8){const _0x4599dc=a5_0x218f,_0xccb56b=_0x57fb77();while(!![]){try{const _0x43fcd4=parseInt(_0x4599dc(0x111))/0x1*(-parseInt(_0x4599dc(0x124))/0x2)+-parseInt(_0x4599dc(0x11e))/0x3*(-parseInt(_0x4599dc(0x11c))/0x4)+parseInt(_0x4599dc(0x120))/0x5*(parseInt(_0x4599dc(0x10f))/0x6)+-parseInt(_0x4599dc(0x113))/0x7+-parseInt(_0x4599dc(0x10c))/0x8+parseInt(_0x4599dc(0x10e))/0x9+parseInt(_0x4599dc(0x11b))/0xa;if(_0x43fcd4===_0x5b16e8)break;else _0xccb56b['push'](_0xccb56b['shift']());}catch(_0x42f6a6){_0xccb56b['push'](_0xccb56b['shift']());}}}(a5_0x33bc,0x9ee6d));export function parseLegacyApiModels(_0x4da7da){const _0x207868=a5_0x218f,_0x193844=[],_0x2c22b8=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x2895ab;while((_0x2895ab=_0x2c22b8[_0x207868(0x115)](_0x4da7da))!==null){_0x193844[_0x207868(0x11a)]({'datasetCode':_0x2895ab[0x1],'tableName':_0x2895ab[0x2],'name':_0x2895ab[0x3],'alias':_0x2895ab[0x4]});}return _0x193844;}export function parseLegacyApiAppCode(_0x2429da){const _0x4c43ea=a5_0x218f;return _0x2429da[_0x4c43ea(0x11f)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function stripComments(_0x54964e){const _0x40f13c=a5_0x218f;return _0x54964e[_0x40f13c(0x123)](/\/\*[\s\S]*?\*\//g,'')['replace'](/\/\/.*$/gm,'');}function a5_0x218f(_0x1c14a3,_0x2f21be){_0x1c14a3=_0x1c14a3-0x10b;const _0x33bcd5=a5_0x33bc();let _0x218f27=_0x33bcd5[_0x1c14a3];return _0x218f27;}export function isLegacyGeneratedApiScaffold(_0x3d5ccf){const _0x1ba018=a5_0x218f;if(!_0x3d5ccf['includes'](_0x1ba018(0x121)))return![];const _0x4b6229=stripComments(_0x3d5ccf),_0x3b9690=[..._0x4b6229['matchAll'](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)][_0x1ba018(0x122)](_0x59905c=>_0x59905c[0x1]);if(_0x3b9690['length']!==0x1||_0x3b9690[0x0]!==_0x1ba018(0x118))return![];const _0x3bc26a=[..._0x4b6229['matchAll'](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x1ba018(0x122)](_0x36db76=>_0x36db76[0x1]);if(_0x3bc26a[_0x1ba018(0x114)]!==0x2||!_0x3bc26a[_0x1ba018(0x10b)](_0x179197=>_0x179197[_0x1ba018(0x110)](_0x1ba018(0x116)))||!_0x3bc26a[_0x1ba018(0x10b)](_0x27b198=>_0x27b198[_0x1ba018(0x110)](_0x1ba018(0x10d))))return![];const _0x4fb61f=[..._0x4b6229[_0x1ba018(0x112)](/^([A-Za-z_$][\w$]*)\s*\(/gm)][_0x1ba018(0x122)](_0x44f492=>_0x44f492[0x1]);return _0x4fb61f[_0x1ba018(0x114)]===0x1&&_0x4fb61f[0x0]===_0x1ba018(0x11d);}export function isLegacyGeneratedClientScaffold(_0x1d2292){const _0x16693b=a5_0x218f;if(!_0x1d2292['includes'](_0x16693b(0x121)))return![];const _0x54083d=stripComments(_0x1d2292),_0x2d2b87=[..._0x54083d[_0x16693b(0x112)](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)][_0x16693b(0x122)](_0x1d39a4=>_0x1d39a4[0x1]);if(_0x2d2b87[_0x16693b(0x10b)](_0x34c6af=>_0x34c6af!==_0x16693b(0x118)&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/[_0x16693b(0x117)](_0x34c6af??'')))return![];const _0x41fea5=[..._0x54083d['matchAll'](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x16693b(0x122)](_0x49a98d=>_0x49a98d[0x1]);return _0x41fea5[_0x16693b(0x114)]===0x1&&_0x41fea5[0x0]===_0x16693b(0x119);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x18e8d4=a6_0xf595;(function(_0xd74635,_0x2ac25a){const _0x5e967c=a6_0xf595,_0x3a1309=_0xd74635();while(!![]){try{const _0x454006=-parseInt(_0x5e967c(0xe0))/0x1+-parseInt(_0x5e967c(0xe6))/0x2+-parseInt(_0x5e967c(0xc0))/0x3*(parseInt(_0x5e967c(0xcf))/0x4)+-parseInt(_0x5e967c(0xa4))/0x5+-parseInt(_0x5e967c(0xb9))/0x6+-parseInt(_0x5e967c(0xa5))/0x7+-parseInt(_0x5e967c(0xa2))/0x8*(-parseInt(_0x5e967c(0xd0))/0x9);if(_0x454006===_0x2ac25a)break;else _0x3a1309['push'](_0x3a1309['shift']());}catch(_0x52f164){_0x3a1309['push'](_0x3a1309['shift']());}}}(a6_0x3191,0x9af79));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x47c053 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x18e8d4(0xe4);export const MODEL_RUNTIME_FILE_NAME=a6_0x18e8d4(0xd4);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x18e8d4(0xc3);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x18e8d4(0xaa),REGISTRY_START=a6_0x18e8d4(0xdc),REGISTRY_END=a6_0x18e8d4(0xc6);function emptyRegistry(_0x4a321f){return{'defaultProfile':_0x4a321f,'profiles':{},'models':[]};}function extractRegistryJson(_0x50edf5){const _0x46827b=a6_0x18e8d4,_0x13fa80=_0x50edf5[_0x46827b(0xb2)](REGISTRY_START),_0x19ce56=_0x50edf5[_0x46827b(0xb2)](REGISTRY_END);if(_0x13fa80<0x0||_0x19ce56<=_0x13fa80)return undefined;return _0x50edf5[_0x46827b(0xda)](_0x13fa80+REGISTRY_START[_0x46827b(0xc1)],_0x19ce56)[_0x46827b(0xb3)]()['replace'](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x46827b(0xae)](/;$/,'');}function a6_0xf595(_0x1be60a,_0x1f4419){_0x1be60a=_0x1be60a-0x9f;const _0x3191bd=a6_0x3191();let _0xf595a8=_0x3191bd[_0x1be60a];return _0xf595a8;}function migrateLegacyRegistry(_0x13b4e9){const _0x3d8105=a6_0x18e8d4,_0x4ba122=emptyRegistry(_0x13b4e9[_0x3d8105(0xdd)]);for(const [_0x4ced9e,_0x5d5631]of Object[_0x3d8105(0xb6)](_0x13b4e9['profiles'])){_0x4ba122[_0x3d8105(0xab)][_0x4ced9e]={'appCode':_0x5d5631[_0x3d8105(0xa7)],'runtimeDomain':_0x5d5631['runtimeDomain']},mergeProfileModels(_0x4ba122,_0x4ced9e,_0x5d5631['models']);}return _0x4ba122;}function generatedObjectLiteralToJson(_0x4b39dd){const _0x5451ea=a6_0x18e8d4;let _0x18c1ff='',_0x2c7eb9,_0x375b85=![],_0x1f7077;for(let _0x49662a=0x0;_0x49662a<_0x4b39dd[_0x5451ea(0xc1)];_0x49662a++){const _0x34b289=_0x4b39dd[_0x49662a];if(_0x2c7eb9){_0x18c1ff+=_0x34b289;if(_0x375b85)_0x375b85=![];else{if(_0x34b289==='\x5c')_0x375b85=!![];else{if(_0x34b289===_0x2c7eb9)_0x2c7eb9=undefined;}}continue;}if(_0x34b289==='\x22'){_0x2c7eb9=_0x34b289,_0x18c1ff+=_0x34b289,_0x1f7077=_0x5451ea(0xa6);continue;}if(_0x34b289===','){let _0x574b2d=_0x49662a+0x1;while(/\s/[_0x5451ea(0xc9)](_0x4b39dd[_0x574b2d]??''))_0x574b2d++;if(_0x4b39dd[_0x574b2d]==='}'||_0x4b39dd[_0x574b2d]===']')continue;_0x18c1ff+=_0x34b289,_0x1f7077=',';continue;}if(_0x34b289==='{'||_0x34b289==='['){_0x18c1ff+=_0x34b289,_0x1f7077=_0x34b289;continue;}if(_0x34b289==='}'||_0x34b289===']'){_0x18c1ff+=_0x34b289,_0x1f7077=_0x34b289;continue;}if((_0x1f7077==='{'||_0x1f7077===',')&&/[A-Za-z_$]/[_0x5451ea(0xc9)](_0x34b289)){let _0x15ba0d=_0x49662a+0x1;while(/[A-Za-z0-9_$]/['test'](_0x4b39dd[_0x15ba0d]??''))_0x15ba0d++;let _0x5e3e2d=_0x15ba0d;while(/\s/[_0x5451ea(0xc9)](_0x4b39dd[_0x5e3e2d]??''))_0x5e3e2d++;if(_0x4b39dd[_0x5e3e2d]===':'){_0x18c1ff+=JSON[_0x5451ea(0xd9)](_0x4b39dd[_0x5451ea(0xda)](_0x49662a,_0x15ba0d)),_0x49662a=_0x15ba0d-0x1,_0x1f7077=_0x5451ea(0xe1);continue;}}_0x18c1ff+=_0x34b289;if(!/\s/[_0x5451ea(0xc9)](_0x34b289)&&_0x34b289!==':')_0x1f7077=_0x5451ea(0xa6);}return _0x18c1ff;}function parseGeneratedRegistryJson(_0x2643e8){const _0x4d102e=a6_0x18e8d4;try{return JSON[_0x4d102e(0xa0)](_0x2643e8);}catch{return JSON['parse'](generatedObjectLiteralToJson(_0x2643e8));}}function normalizeModelEntries(_0x4ad0f4,_0x468a2e){const _0x5ac7fd=a6_0x18e8d4,_0x23db29=Object['keys'](_0x4ad0f4),_0x291e25=[];for(const _0x4076d9 of _0x468a2e){if(!_0x4076d9||typeof _0x4076d9!==_0x5ac7fd(0xd5)||Array[_0x5ac7fd(0xbb)](_0x4076d9))return undefined;const _0x2fbca3=_0x4076d9;if(typeof _0x2fbca3[_0x5ac7fd(0xe5)]!==_0x5ac7fd(0xb5)||typeof _0x2fbca3[_0x5ac7fd(0xc5)]!==_0x5ac7fd(0xb5)||typeof _0x2fbca3[_0x5ac7fd(0xd8)]!==_0x5ac7fd(0xb5))return undefined;let _0x279867;if(typeof _0x2fbca3['datasetCode']===_0x5ac7fd(0xb5)&&_0x2fbca3['datasetCodes']===undefined)_0x279867=Object[_0x5ac7fd(0xc7)](_0x23db29[_0x5ac7fd(0xb7)](_0x5cf9a9=>[_0x5cf9a9,_0x2fbca3['datasetCode']]));else{if(_0x2fbca3[_0x5ac7fd(0xc4)]===undefined&&_0x2fbca3[_0x5ac7fd(0x9f)]&&typeof _0x2fbca3[_0x5ac7fd(0x9f)]==='object'&&!Array['isArray'](_0x2fbca3[_0x5ac7fd(0x9f)])&&Object[_0x5ac7fd(0xad)](_0x2fbca3[_0x5ac7fd(0x9f)])[_0x5ac7fd(0xd7)](_0x36c8eb=>typeof _0x36c8eb==='string'))_0x279867={..._0x2fbca3['datasetCodes']};else return undefined;}_0x291e25[_0x5ac7fd(0xbf)]({'alias':_0x2fbca3[_0x5ac7fd(0xe5)],'tableName':_0x2fbca3['tableName'],'name':_0x2fbca3['name'],'datasetCodes':_0x279867});}return _0x291e25;}export function parseModelRegistry(_0x127c3b){const _0x19a5ca=a6_0x18e8d4,_0x276c3a=extractRegistryJson(_0x127c3b);if(!_0x276c3a)return undefined;try{const _0x3e2cb1=parseGeneratedRegistryJson(_0x276c3a);if(typeof _0x3e2cb1[_0x19a5ca(0xdd)]!=='string'||!_0x3e2cb1[_0x19a5ca(0xab)]||typeof _0x3e2cb1[_0x19a5ca(0xab)]!==_0x19a5ca(0xd5))return undefined;if(_0x3e2cb1['protocol']===_0x19a5ca(0xb1))return migrateLegacyRegistry(_0x3e2cb1);if(!(_0x3e2cb1['protocol']===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x3e2cb1['protocol']===undefined&&_0x127c3b['includes'](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x19a5ca(0xbb)](_0x3e2cb1[_0x19a5ca(0xa1)]))return undefined;const _0x10b070=_0x3e2cb1['profiles'],_0x1ceb2c=normalizeModelEntries(_0x10b070,_0x3e2cb1[_0x19a5ca(0xa1)]);if(!_0x1ceb2c)return undefined;return{'defaultProfile':_0x3e2cb1[_0x19a5ca(0xdd)],'profiles':_0x10b070,'models':_0x1ceb2c};}catch{return undefined;}}export function readModelRegistry(_0x2fee36){const _0x713fe2=a6_0x18e8d4;if(!existsSync(_0x2fee36))return undefined;try{return parseModelRegistry(readFileSync(_0x2fee36,_0x713fe2(0xc2)));}catch{return undefined;}}function a6_0x3191(){const _0x5d9225=['join','lovrabet-model-registry/v1','indexOf','trim','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','string','entries','map','find','1340130XJAefN','\x22\x20in\x20the\x20registry\x20but\x20\x22','isArray','get','.tmp','outputDir','push','129FpgBlr','length','utf8','/*\x20rabetbase-model-registry:v2\x20*/','datasetCode','tableName','/*\x20rabetbase-model-registry:end\x20*/','fromEntries','set','test','Refusing\x20to\x20replace\x20','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','pid','\x22\x20maps\x20to\x20alias\x20\x22','\x20model(s)\x20in\x20profile\x20\x22','35260cJNFai','4023pmINcW','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','profileName','\x22\x20in\x20profile\x20\x22','model-runtime.ts','object','\x22\x20maps\x20to\x20both\x20\x22','every','name','stringify','slice','keys','/*\x20rabetbase-model-registry:start\x20*/','defaultProfile','\x22\x20maps\x20to\x20table\x20\x22','Table\x20\x22','647265YZkfhE','key','/**\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','filter','models.generated.ts','alias','1721100wboULW','datasetCodes','parse','models','79096qrLUEQ','\x22\x20and\x20\x22','3383335KUnWuf','6985034SvFLUy','value','appCode','Model\x20alias\x20\x22','NOT-SET','lovrabet-model-registry/v2','profiles','flatMap','values','replace','runtimeDomain'];a6_0x3191=function(){return _0x5d9225;};return a6_0x3191();}function registrySource(_0x4363d2){const _0x547967=a6_0x18e8d4,_0x334b29=Object[_0x547967(0xdb)](_0x4363d2['profiles']),_0x3b570e=_0x4363d2['models'][_0x547967(0xb7)](_0x46bf67=>{const _0x2bffd5=_0x547967,_0x599738=_0x334b29[_0x2bffd5(0xb7)](_0x20e50d=>_0x46bf67[_0x2bffd5(0x9f)][_0x20e50d]),_0x553334=_0x599738[0x0],_0x33561c=_0x553334!==undefined&&_0x599738[_0x2bffd5(0xd7)](_0x1f2a27=>_0x1f2a27===_0x553334),_0x5e26fa={'alias':_0x46bf67['alias'],'tableName':_0x46bf67[_0x2bffd5(0xc5)],'name':_0x46bf67['name']};return _0x33561c?{..._0x5e26fa,'datasetCode':_0x553334}:{..._0x5e26fa,'datasetCodes':_0x46bf67[_0x2bffd5(0x9f)]};}),_0x111e34=JSON['stringify']({'defaultProfile':_0x4363d2[_0x547967(0xdd)],'profiles':_0x4363d2[_0x547967(0xab)],'models':_0x3b570e},null,0x2)['split']('\x0a')[_0x547967(0xb7)](_0x2c06fd=>'\x20\x20'+_0x2c06fd)[_0x547967(0xb0)]('\x0a');return _0x547967(0xe2)+MODEL_REGISTRY_VERSION_MARKER+_0x547967(0xb4)+REGISTRY_START+'\x0a'+_0x111e34+'\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a'+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x4d5b74,_0x504c1f,_0xcea338){const _0x33a5f1=a6_0x18e8d4,_0x5e3636=_0xcea338[_0x33a5f1(0xb7)](_0x225b6f=>({..._0x225b6f,'alias':_0x225b6f[_0x33a5f1(0xe5)]||_0x225b6f[_0x33a5f1(0xc5)]})),_0x18e94a=new Map(),_0x402486=new Map();for(const _0x23fd0a of _0x5e3636){const _0x4ed13f=_0x18e94a[_0x33a5f1(0xbc)](_0x23fd0a[_0x33a5f1(0xe5)]);if(_0x4ed13f&&_0x4ed13f!==_0x23fd0a['tableName'])throw new Error('Model\x20alias\x20\x22'+_0x23fd0a[_0x33a5f1(0xe5)]+_0x33a5f1(0xd6)+_0x4ed13f+_0x33a5f1(0xa3)+_0x23fd0a[_0x33a5f1(0xc5)]+_0x33a5f1(0xd3)+_0x504c1f+'\x22.');const _0x3f5625=_0x402486[_0x33a5f1(0xbc)](_0x23fd0a[_0x33a5f1(0xc5)]);if(_0x3f5625&&_0x3f5625!==_0x23fd0a[_0x33a5f1(0xe5)])throw new Error(_0x33a5f1(0xdf)+_0x23fd0a[_0x33a5f1(0xc5)]+_0x33a5f1(0xcb)+_0x3f5625+'\x22\x20and\x20\x22'+_0x23fd0a['alias']+_0x33a5f1(0xd3)+_0x504c1f+'\x22.');_0x18e94a[_0x33a5f1(0xc8)](_0x23fd0a['alias'],_0x23fd0a[_0x33a5f1(0xc5)]),_0x402486[_0x33a5f1(0xc8)](_0x23fd0a[_0x33a5f1(0xc5)],_0x23fd0a['alias']);const _0x2a4a43=_0x4d5b74[_0x33a5f1(0xa1)][_0x33a5f1(0xb8)](_0xca3481=>_0xca3481[_0x33a5f1(0xe5)]===_0x23fd0a[_0x33a5f1(0xe5)]);if(_0x2a4a43&&_0x2a4a43[_0x33a5f1(0xc5)]!==_0x23fd0a[_0x33a5f1(0xc5)])throw new Error(_0x33a5f1(0xa8)+_0x23fd0a[_0x33a5f1(0xe5)]+_0x33a5f1(0xde)+_0x2a4a43[_0x33a5f1(0xc5)]+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x23fd0a[_0x33a5f1(0xc5)]+_0x33a5f1(0xd3)+_0x504c1f+'\x22.');const _0x47cb2e=_0x4d5b74[_0x33a5f1(0xa1)][_0x33a5f1(0xb8)](_0xbb1605=>_0xbb1605[_0x33a5f1(0xc5)]===_0x23fd0a[_0x33a5f1(0xc5)]);if(_0x47cb2e&&_0x47cb2e[_0x33a5f1(0xe5)]!==_0x23fd0a['alias'])throw new Error('Table\x20\x22'+_0x23fd0a['tableName']+_0x33a5f1(0xcd)+_0x47cb2e[_0x33a5f1(0xe5)]+_0x33a5f1(0xba)+_0x23fd0a[_0x33a5f1(0xe5)]+_0x33a5f1(0xd3)+_0x504c1f+'\x22.');}for(const _0x155e62 of _0x4d5b74[_0x33a5f1(0xa1)]){delete _0x155e62['datasetCodes'][_0x504c1f];}for(const _0x2f5588 of _0x5e3636){let _0x5e83ec=_0x4d5b74[_0x33a5f1(0xa1)][_0x33a5f1(0xb8)](_0x425daa=>_0x425daa['alias']===_0x2f5588[_0x33a5f1(0xe5)]);!_0x5e83ec&&(_0x5e83ec={'alias':_0x2f5588[_0x33a5f1(0xe5)],'tableName':_0x2f5588['tableName'],'name':_0x2f5588[_0x33a5f1(0xd8)],'datasetCodes':{}},_0x4d5b74[_0x33a5f1(0xa1)]['push'](_0x5e83ec)),(_0x504c1f===_0x4d5b74[_0x33a5f1(0xdd)]||!_0x5e83ec['datasetCodes'][_0x4d5b74['defaultProfile']])&&(_0x5e83ec[_0x33a5f1(0xe5)]=_0x2f5588[_0x33a5f1(0xe5)],_0x5e83ec[_0x33a5f1(0xc5)]=_0x2f5588[_0x33a5f1(0xc5)],_0x5e83ec[_0x33a5f1(0xd8)]=_0x2f5588[_0x33a5f1(0xd8)]),_0x5e83ec[_0x33a5f1(0x9f)][_0x504c1f]=_0x2f5588[_0x33a5f1(0xc4)];}_0x4d5b74[_0x33a5f1(0xa1)]=_0x4d5b74[_0x33a5f1(0xa1)][_0x33a5f1(0xe3)](_0x11fc53=>Object[_0x33a5f1(0xdb)](_0x11fc53[_0x33a5f1(0x9f)])[_0x33a5f1(0xc1)]>0x0);}function removeUnboundProfiles(_0x506ba7){const _0x39e658=a6_0x18e8d4,_0x1a7f42=Object[_0x39e658(0xb6)](_0x506ba7['profiles'])['filter'](([,_0x365340])=>_0x365340[_0x39e658(0xa7)]===_0x39e658(0xa9))[_0x39e658(0xb7)](([_0x1c15d2])=>_0x1c15d2);if(_0x1a7f42[_0x39e658(0xc1)]===0x0)return;for(const _0x35bd42 of _0x1a7f42){delete _0x506ba7['profiles'][_0x35bd42];for(const _0x14ec8c of _0x506ba7[_0x39e658(0xa1)]){delete _0x14ec8c[_0x39e658(0x9f)][_0x35bd42];}}_0x506ba7['models']=_0x506ba7[_0x39e658(0xa1)]['filter'](_0x1f41b6=>Object[_0x39e658(0xdb)](_0x1f41b6[_0x39e658(0x9f)])[_0x39e658(0xc1)]>0x0);}export function getProfileModels(_0x59924f,_0x4ae63f){const _0x3c0ed7=a6_0x18e8d4;return _0x59924f[_0x3c0ed7(0xa1)][_0x3c0ed7(0xac)](_0x19ae45=>{const _0x432b7c=_0x3c0ed7,_0x3acd1a=_0x19ae45[_0x432b7c(0x9f)][_0x4ae63f];return _0x3acd1a?[{'datasetCode':_0x3acd1a,'tableName':_0x19ae45[_0x432b7c(0xc5)],'name':_0x19ae45[_0x432b7c(0xd8)],'alias':_0x19ae45[_0x432b7c(0xe5)]}]:[];});}export function updateModelRegistry(_0x5d30db){const _0x3cc11a=a6_0x18e8d4,_0x15ae31=a6_0x47c053[_0x3cc11a(0xb0)](_0x5d30db['outputDir'],MODEL_REGISTRY_FILE_NAME),_0x5a1d64=existsSync(_0x15ae31),_0x16f0fe=readModelRegistry(_0x15ae31);if(_0x5a1d64&&!_0x16f0fe)throw new Error(MODEL_REGISTRY_FILE_NAME+'\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.');const _0x3fbad9=_0x16f0fe??emptyRegistry(_0x5d30db[_0x3cc11a(0xdd)]);if(_0x5d30db['appCode']!==_0x3cc11a(0xa9))removeUnboundProfiles(_0x3fbad9);const _0x420db8=_0x16f0fe?getProfileModels(_0x16f0fe,_0x5d30db[_0x3cc11a(0xd2)])['length']:0x0;if(_0x420db8>0x0&&_0x5d30db['models'][_0x3cc11a(0xc1)]===0x0&&!_0x5d30db['allowEmptyReplacement'])throw new Error(_0x3cc11a(0xca)+_0x420db8+_0x3cc11a(0xce)+_0x5d30db[_0x3cc11a(0xd2)]+'\x22\x20with\x20an\x20empty\x20result.\x20'+_0x3cc11a(0xd1));_0x3fbad9['defaultProfile']=_0x5d30db['defaultProfile'],_0x3fbad9[_0x3cc11a(0xab)][_0x5d30db[_0x3cc11a(0xd2)]]={'appCode':_0x5d30db['appCode'],'runtimeDomain':_0x5d30db[_0x3cc11a(0xaf)]},mergeProfileModels(_0x3fbad9,_0x5d30db[_0x3cc11a(0xd2)],_0x5d30db[_0x3cc11a(0xa1)]),mkdirSync(_0x5d30db[_0x3cc11a(0xbe)],{'recursive':!![]});const _0x2f2237=_0x15ae31+'.'+process[_0x3cc11a(0xcc)]+'.'+Date['now']()+_0x3cc11a(0xbd);try{writeFileSync(_0x2f2237,registrySource(_0x3fbad9),{'encoding':_0x3cc11a(0xc2),'mode':0x1a4}),renameSync(_0x2f2237,_0x15ae31);}catch(_0x32f431){try{unlinkSync(_0x2f2237);}catch{}throw _0x32f431;}return{'path':_0x15ae31,'registry':_0x3fbad9,'existed':_0x5a1d64};}
|
|
1
|
+
const a6_0x13b324=a6_0x2b6f;(function(_0x3cf20d,_0x593522){const _0x3d6262=a6_0x2b6f,_0x1cdc16=_0x3cf20d();while(!![]){try{const _0x7756a1=-parseInt(_0x3d6262(0x1d4))/0x1*(-parseInt(_0x3d6262(0x1ba))/0x2)+-parseInt(_0x3d6262(0x1de))/0x3*(-parseInt(_0x3d6262(0x1b9))/0x4)+parseInt(_0x3d6262(0x1cd))/0x5+-parseInt(_0x3d6262(0x1d1))/0x6*(-parseInt(_0x3d6262(0x1cb))/0x7)+parseInt(_0x3d6262(0x1ec))/0x8*(parseInt(_0x3d6262(0x1bf))/0x9)+parseInt(_0x3d6262(0x1b8))/0xa+parseInt(_0x3d6262(0x1b2))/0xb*(-parseInt(_0x3d6262(0x1b0))/0xc);if(_0x7756a1===_0x593522)break;else _0x1cdc16['push'](_0x1cdc16['shift']());}catch(_0x5ea840){_0x1cdc16['push'](_0x1cdc16['shift']());}}}(a6_0xf1a4,0xc3aa0));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x2ecada from'node:path';function a6_0x2b6f(_0x24f911,_0x4a1974){_0x24f911=_0x24f911-0x1a9;const _0xf1a486=a6_0xf1a4();let _0x2b6f30=_0xf1a486[_0x24f911];return _0x2b6f30;}export const MODEL_REGISTRY_FILE_NAME=a6_0x13b324(0x1b6);export const MODEL_RUNTIME_FILE_NAME=a6_0x13b324(0x1c8);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x13b324(0x1df);function a6_0xf1a4(){const _0x30664f=['parse','fromEntries','Refusing\x20to\x20replace\x20','stringify','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','defaultProfile','Model\x20alias\x20\x22','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','model-runtime.ts','runtimeDomain','key','13951UBCJDL','includes','3081515MHhEhF','utf8','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','filter','2298JvPMoV','datasetCodes','/**\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','71xelYVz','push','\x22\x20maps\x20to\x20alias\x20\x22','/*\x20rabetbase-model-registry:start\x20*/','flatMap','appCode','entries','values','keys','models','3755169qJuuBb','/*\x20rabetbase-model-registry:v2\x20*/','now','tableName','isArray','NOT-SET','outputDir','length','pid','profiles','\x22\x20and\x20\x22','Table\x20\x22','\x20model(s)\x20in\x20profile\x20\x22','replace','8LwIHwm','join','test','split','profileName','\x22\x20in\x20the\x20registry\x20but\x20\x22','\x22\x20maps\x20to\x20table\x20\x22','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','string','find','get','name','indexOf','\x22\x20in\x20profile\x20\x22','lovrabet-model-registry/v1','12756yMGnzo','protocol','47685rHgoGh','map','object','allowEmptyReplacement','models.generated.ts','alias','11466090ahOBUk','4xDNRca','35716MLglys','datasetCode','trim','/*\x20rabetbase-model-registry:end\x20*/','every','3273057ElVeyC'];a6_0xf1a4=function(){return _0x30664f;};return a6_0xf1a4();}const LEGACY_MODEL_REGISTRY_V2_PROTOCOL='lovrabet-model-registry/v2',REGISTRY_START=a6_0x13b324(0x1d7),REGISTRY_END=a6_0x13b324(0x1bd);function emptyRegistry(_0x1bf1df){return{'defaultProfile':_0x1bf1df,'profiles':{},'models':[]};}function extractRegistryJson(_0x2acc17){const _0x224416=a6_0x13b324,_0x9a0daf=_0x2acc17[_0x224416(0x1ad)](REGISTRY_START),_0x5a46c8=_0x2acc17[_0x224416(0x1ad)](REGISTRY_END);if(_0x9a0daf<0x0||_0x5a46c8<=_0x9a0daf)return undefined;return _0x2acc17['slice'](_0x9a0daf+REGISTRY_START[_0x224416(0x1e5)],_0x5a46c8)[_0x224416(0x1bc)]()[_0x224416(0x1eb)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x224416(0x1eb)](/;$/,'');}function migrateLegacyRegistry(_0x2e3445){const _0x1aa586=a6_0x13b324,_0x3fa896=emptyRegistry(_0x2e3445[_0x1aa586(0x1c5)]);for(const [_0x3d6ef4,_0x16035b]of Object[_0x1aa586(0x1da)](_0x2e3445['profiles'])){_0x3fa896['profiles'][_0x3d6ef4]={'appCode':_0x16035b[_0x1aa586(0x1d9)],'runtimeDomain':_0x16035b[_0x1aa586(0x1c9)]},mergeProfileModels(_0x3fa896,_0x3d6ef4,_0x16035b[_0x1aa586(0x1dd)]);}return _0x3fa896;}function generatedObjectLiteralToJson(_0x313841){const _0x4e96a7=a6_0x13b324;let _0x4ad6dd='',_0x5b430f,_0x8e3d45=![],_0x1aa0b7;for(let _0x2ba421=0x0;_0x2ba421<_0x313841['length'];_0x2ba421++){const _0x1c2c0f=_0x313841[_0x2ba421];if(_0x5b430f){_0x4ad6dd+=_0x1c2c0f;if(_0x8e3d45)_0x8e3d45=![];else{if(_0x1c2c0f==='\x5c')_0x8e3d45=!![];else{if(_0x1c2c0f===_0x5b430f)_0x5b430f=undefined;}}continue;}if(_0x1c2c0f==='\x22'){_0x5b430f=_0x1c2c0f,_0x4ad6dd+=_0x1c2c0f,_0x1aa0b7='value';continue;}if(_0x1c2c0f===','){let _0x3468e2=_0x2ba421+0x1;while(/\s/['test'](_0x313841[_0x3468e2]??''))_0x3468e2++;if(_0x313841[_0x3468e2]==='}'||_0x313841[_0x3468e2]===']')continue;_0x4ad6dd+=_0x1c2c0f,_0x1aa0b7=',';continue;}if(_0x1c2c0f==='{'||_0x1c2c0f==='['){_0x4ad6dd+=_0x1c2c0f,_0x1aa0b7=_0x1c2c0f;continue;}if(_0x1c2c0f==='}'||_0x1c2c0f===']'){_0x4ad6dd+=_0x1c2c0f,_0x1aa0b7=_0x1c2c0f;continue;}if((_0x1aa0b7==='{'||_0x1aa0b7===',')&&/[A-Za-z_$]/[_0x4e96a7(0x1ee)](_0x1c2c0f)){let _0x229d26=_0x2ba421+0x1;while(/[A-Za-z0-9_$]/['test'](_0x313841[_0x229d26]??''))_0x229d26++;let _0x1e1bc2=_0x229d26;while(/\s/[_0x4e96a7(0x1ee)](_0x313841[_0x1e1bc2]??''))_0x1e1bc2++;if(_0x313841[_0x1e1bc2]===':'){_0x4ad6dd+=JSON[_0x4e96a7(0x1c3)](_0x313841['slice'](_0x2ba421,_0x229d26)),_0x2ba421=_0x229d26-0x1,_0x1aa0b7=_0x4e96a7(0x1ca);continue;}}_0x4ad6dd+=_0x1c2c0f;if(!/\s/[_0x4e96a7(0x1ee)](_0x1c2c0f)&&_0x1c2c0f!==':')_0x1aa0b7='value';}return _0x4ad6dd;}function parseGeneratedRegistryJson(_0x1fbcbd){const _0x320a92=a6_0x13b324;try{return JSON[_0x320a92(0x1c0)](_0x1fbcbd);}catch{return JSON['parse'](generatedObjectLiteralToJson(_0x1fbcbd));}}function normalizeModelEntries(_0x32319b,_0xc3dc85){const _0x558800=a6_0x13b324,_0xb3c5e5=Object[_0x558800(0x1dc)](_0x32319b),_0x45f066=[];for(const _0x1c9d05 of _0xc3dc85){if(!_0x1c9d05||typeof _0x1c9d05!==_0x558800(0x1b4)||Array['isArray'](_0x1c9d05))return undefined;const _0x2c71b5=_0x1c9d05;if(typeof _0x2c71b5[_0x558800(0x1b7)]!==_0x558800(0x1a9)||typeof _0x2c71b5['tableName']!==_0x558800(0x1a9)||typeof _0x2c71b5['name']!==_0x558800(0x1a9))return undefined;let _0x52d079;if(typeof _0x2c71b5[_0x558800(0x1bb)]===_0x558800(0x1a9)&&_0x2c71b5[_0x558800(0x1d2)]===undefined)_0x52d079=Object[_0x558800(0x1c1)](_0xb3c5e5['map'](_0x125d81=>[_0x125d81,_0x2c71b5[_0x558800(0x1bb)]]));else{if(_0x2c71b5['datasetCode']===undefined&&_0x2c71b5[_0x558800(0x1d2)]&&typeof _0x2c71b5[_0x558800(0x1d2)]===_0x558800(0x1b4)&&!Array[_0x558800(0x1e2)](_0x2c71b5[_0x558800(0x1d2)])&&Object[_0x558800(0x1db)](_0x2c71b5[_0x558800(0x1d2)])[_0x558800(0x1be)](_0x2c486b=>typeof _0x2c486b==='string'))_0x52d079={..._0x2c71b5[_0x558800(0x1d2)]};else return undefined;}_0x45f066[_0x558800(0x1d5)]({'alias':_0x2c71b5[_0x558800(0x1b7)],'tableName':_0x2c71b5[_0x558800(0x1e1)],'name':_0x2c71b5[_0x558800(0x1ac)],'datasetCodes':_0x52d079});}return _0x45f066;}export function parseModelRegistry(_0x456fe4){const _0xf17611=a6_0x13b324,_0x37a3d9=extractRegistryJson(_0x456fe4);if(!_0x37a3d9)return undefined;try{const _0x7d864a=parseGeneratedRegistryJson(_0x37a3d9);if(typeof _0x7d864a['defaultProfile']!==_0xf17611(0x1a9)||!_0x7d864a['profiles']||typeof _0x7d864a[_0xf17611(0x1e7)]!==_0xf17611(0x1b4))return undefined;if(_0x7d864a[_0xf17611(0x1b1)]===_0xf17611(0x1af))return migrateLegacyRegistry(_0x7d864a);if(!(_0x7d864a[_0xf17611(0x1b1)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x7d864a[_0xf17611(0x1b1)]===undefined&&_0x456fe4[_0xf17611(0x1cc)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0xf17611(0x1e2)](_0x7d864a[_0xf17611(0x1dd)]))return undefined;const _0x53e280=_0x7d864a['profiles'],_0xe1f621=normalizeModelEntries(_0x53e280,_0x7d864a[_0xf17611(0x1dd)]);if(!_0xe1f621)return undefined;return{'defaultProfile':_0x7d864a[_0xf17611(0x1c5)],'profiles':_0x53e280,'models':_0xe1f621};}catch{return undefined;}}export function readModelRegistry(_0x21f3a9){if(!existsSync(_0x21f3a9))return undefined;try{return parseModelRegistry(readFileSync(_0x21f3a9,'utf8'));}catch{return undefined;}}function registrySource(_0x1ec6a6){const _0x3634c0=a6_0x13b324,_0x4e7d94=Object[_0x3634c0(0x1dc)](_0x1ec6a6[_0x3634c0(0x1e7)]),_0x3ca0b6=_0x1ec6a6[_0x3634c0(0x1dd)][_0x3634c0(0x1b3)](_0x4b912a=>{const _0x17fdaf=_0x3634c0,_0x245678=_0x4e7d94[_0x17fdaf(0x1b3)](_0x454cd5=>_0x4b912a[_0x17fdaf(0x1d2)][_0x454cd5]),_0xb5c717=_0x245678[0x0],_0x50c409=_0xb5c717!==undefined&&_0x245678[_0x17fdaf(0x1be)](_0x3fa270=>_0x3fa270===_0xb5c717),_0x40ee38={'alias':_0x4b912a['alias'],'tableName':_0x4b912a['tableName'],'name':_0x4b912a[_0x17fdaf(0x1ac)]};return _0x50c409?{..._0x40ee38,'datasetCode':_0xb5c717}:{..._0x40ee38,'datasetCodes':_0x4b912a[_0x17fdaf(0x1d2)]};}),_0x103146=JSON[_0x3634c0(0x1c3)]({'defaultProfile':_0x1ec6a6[_0x3634c0(0x1c5)],'profiles':_0x1ec6a6[_0x3634c0(0x1e7)],'models':_0x3ca0b6},null,0x2)[_0x3634c0(0x1ef)]('\x0a')[_0x3634c0(0x1b3)](_0x125d04=>'\x20\x20'+_0x125d04)[_0x3634c0(0x1ed)]('\x0a');return _0x3634c0(0x1d3)+MODEL_REGISTRY_VERSION_MARKER+_0x3634c0(0x1f3)+REGISTRY_START+'\x0a'+_0x103146+_0x3634c0(0x1c7)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x4739c8,_0x16f621,_0x1c634a){const _0x2f1f68=a6_0x13b324,_0x55e2ac=_0x1c634a[_0x2f1f68(0x1b3)](_0x27b43e=>({..._0x27b43e,'alias':_0x27b43e['alias']||_0x27b43e[_0x2f1f68(0x1e1)]})),_0xbb9475=new Map(),_0x3d71b2=new Map();for(const _0x50046d of _0x55e2ac){const _0x8a3951=_0xbb9475[_0x2f1f68(0x1ab)](_0x50046d[_0x2f1f68(0x1b7)]);if(_0x8a3951&&_0x8a3951!==_0x50046d[_0x2f1f68(0x1e1)])throw new Error('Model\x20alias\x20\x22'+_0x50046d[_0x2f1f68(0x1b7)]+'\x22\x20maps\x20to\x20both\x20\x22'+_0x8a3951+_0x2f1f68(0x1e8)+_0x50046d['tableName']+_0x2f1f68(0x1ae)+_0x16f621+'\x22.');const _0x2ea8dd=_0x3d71b2['get'](_0x50046d[_0x2f1f68(0x1e1)]);if(_0x2ea8dd&&_0x2ea8dd!==_0x50046d[_0x2f1f68(0x1b7)])throw new Error(_0x2f1f68(0x1e9)+_0x50046d[_0x2f1f68(0x1e1)]+_0x2f1f68(0x1f4)+_0x2ea8dd+_0x2f1f68(0x1e8)+_0x50046d[_0x2f1f68(0x1b7)]+'\x22\x20in\x20profile\x20\x22'+_0x16f621+'\x22.');_0xbb9475['set'](_0x50046d[_0x2f1f68(0x1b7)],_0x50046d[_0x2f1f68(0x1e1)]),_0x3d71b2['set'](_0x50046d[_0x2f1f68(0x1e1)],_0x50046d['alias']);const _0xe629fd=_0x4739c8['models'][_0x2f1f68(0x1aa)](_0x1fdb51=>_0x1fdb51['alias']===_0x50046d['alias']);if(_0xe629fd&&_0xe629fd['tableName']!==_0x50046d[_0x2f1f68(0x1e1)])throw new Error(_0x2f1f68(0x1c6)+_0x50046d['alias']+_0x2f1f68(0x1f2)+_0xe629fd['tableName']+_0x2f1f68(0x1f1)+_0x50046d['tableName']+_0x2f1f68(0x1ae)+_0x16f621+'\x22.');const _0x9be725=_0x4739c8[_0x2f1f68(0x1dd)][_0x2f1f68(0x1aa)](_0x4996c4=>_0x4996c4[_0x2f1f68(0x1e1)]===_0x50046d[_0x2f1f68(0x1e1)]);if(_0x9be725&&_0x9be725[_0x2f1f68(0x1b7)]!==_0x50046d[_0x2f1f68(0x1b7)])throw new Error(_0x2f1f68(0x1e9)+_0x50046d['tableName']+_0x2f1f68(0x1d6)+_0x9be725[_0x2f1f68(0x1b7)]+_0x2f1f68(0x1f1)+_0x50046d['alias']+_0x2f1f68(0x1ae)+_0x16f621+'\x22.');}for(const _0x2bef58 of _0x4739c8[_0x2f1f68(0x1dd)]){delete _0x2bef58[_0x2f1f68(0x1d2)][_0x16f621];}for(const _0x5e9410 of _0x55e2ac){let _0x1d95a6=_0x4739c8[_0x2f1f68(0x1dd)][_0x2f1f68(0x1aa)](_0x24ee61=>_0x24ee61[_0x2f1f68(0x1b7)]===_0x5e9410[_0x2f1f68(0x1b7)]);!_0x1d95a6&&(_0x1d95a6={'alias':_0x5e9410[_0x2f1f68(0x1b7)],'tableName':_0x5e9410[_0x2f1f68(0x1e1)],'name':_0x5e9410[_0x2f1f68(0x1ac)],'datasetCodes':{}},_0x4739c8[_0x2f1f68(0x1dd)][_0x2f1f68(0x1d5)](_0x1d95a6)),(_0x16f621===_0x4739c8['defaultProfile']||!_0x1d95a6[_0x2f1f68(0x1d2)][_0x4739c8[_0x2f1f68(0x1c5)]])&&(_0x1d95a6[_0x2f1f68(0x1b7)]=_0x5e9410['alias'],_0x1d95a6[_0x2f1f68(0x1e1)]=_0x5e9410['tableName'],_0x1d95a6['name']=_0x5e9410['name']),_0x1d95a6['datasetCodes'][_0x16f621]=_0x5e9410[_0x2f1f68(0x1bb)];}_0x4739c8[_0x2f1f68(0x1dd)]=_0x4739c8[_0x2f1f68(0x1dd)]['filter'](_0x3981b6=>Object[_0x2f1f68(0x1dc)](_0x3981b6[_0x2f1f68(0x1d2)])['length']>0x0);}function removeUnboundProfiles(_0xcaca3d){const _0x126bfb=a6_0x13b324,_0x3de9d4=Object[_0x126bfb(0x1da)](_0xcaca3d[_0x126bfb(0x1e7)])[_0x126bfb(0x1d0)](([,_0x1cafa8])=>_0x1cafa8[_0x126bfb(0x1d9)]==='NOT-SET')[_0x126bfb(0x1b3)](([_0x566ae8])=>_0x566ae8);if(_0x3de9d4[_0x126bfb(0x1e5)]===0x0)return;for(const _0x5c5070 of _0x3de9d4){delete _0xcaca3d[_0x126bfb(0x1e7)][_0x5c5070];for(const _0x17528c of _0xcaca3d['models']){delete _0x17528c['datasetCodes'][_0x5c5070];}}_0xcaca3d['models']=_0xcaca3d['models'][_0x126bfb(0x1d0)](_0x2f79af=>Object['keys'](_0x2f79af['datasetCodes'])[_0x126bfb(0x1e5)]>0x0);}export function getProfileModels(_0x171ee8,_0x26a59a){const _0x249119=a6_0x13b324;return _0x171ee8['models'][_0x249119(0x1d8)](_0x226671=>{const _0x1a1cc0=_0x249119,_0x2dc190=_0x226671[_0x1a1cc0(0x1d2)][_0x26a59a];return _0x2dc190?[{'datasetCode':_0x2dc190,'tableName':_0x226671['tableName'],'name':_0x226671['name'],'alias':_0x226671['alias']}]:[];});}export function updateModelRegistry(_0x4e1b30){const _0x42329a=a6_0x13b324,_0xfd5b4e=a6_0x2ecada[_0x42329a(0x1ed)](_0x4e1b30[_0x42329a(0x1e4)],MODEL_REGISTRY_FILE_NAME),_0x319993=existsSync(_0xfd5b4e),_0xa3cf92=readModelRegistry(_0xfd5b4e);if(_0x319993&&!_0xa3cf92)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x42329a(0x1cf));const _0x4dbc7c=_0xa3cf92??emptyRegistry(_0x4e1b30[_0x42329a(0x1c5)]);if(_0x4e1b30['appCode']!==_0x42329a(0x1e3))removeUnboundProfiles(_0x4dbc7c);const _0x33c8ad=_0xa3cf92?getProfileModels(_0xa3cf92,_0x4e1b30[_0x42329a(0x1f0)])[_0x42329a(0x1e5)]:0x0;if(_0x33c8ad>0x0&&_0x4e1b30['models'][_0x42329a(0x1e5)]===0x0&&!_0x4e1b30[_0x42329a(0x1b5)])throw new Error(_0x42329a(0x1c2)+_0x33c8ad+_0x42329a(0x1ea)+_0x4e1b30[_0x42329a(0x1f0)]+'\x22\x20with\x20an\x20empty\x20result.\x20'+_0x42329a(0x1c4));_0x4dbc7c[_0x42329a(0x1c5)]=_0x4e1b30[_0x42329a(0x1c5)],_0x4dbc7c[_0x42329a(0x1e7)][_0x4e1b30['profileName']]={'appCode':_0x4e1b30[_0x42329a(0x1d9)],'runtimeDomain':_0x4e1b30[_0x42329a(0x1c9)]},mergeProfileModels(_0x4dbc7c,_0x4e1b30[_0x42329a(0x1f0)],_0x4e1b30[_0x42329a(0x1dd)]),mkdirSync(_0x4e1b30[_0x42329a(0x1e4)],{'recursive':!![]});const _0x284561=_0xfd5b4e+'.'+process[_0x42329a(0x1e6)]+'.'+Date[_0x42329a(0x1e0)]()+'.tmp';try{writeFileSync(_0x284561,registrySource(_0x4dbc7c),{'encoding':_0x42329a(0x1ce),'mode':0x1a4}),renameSync(_0x284561,_0xfd5b4e);}catch(_0x29108e){try{unlinkSync(_0x284561);}catch{}throw _0x29108e;}return{'path':_0xfd5b4e,'registry':_0x4dbc7c,'existed':_0x319993};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a7_0x2ace(){const _0x11257b=['utf8','profile-api.ts.tpl','format','207VKoCzo','2018802fhLQZH','cwd','103352FzNUIs','699323Bowczb','4ehnSyQ','typescript','30290ReHKGF','854710OXmUQo','model-runtime.ts.tpl','2FtwLQc','90PMoGUo','join','resolve','143VUAaHK','all','7320831rQMvMo','799356nTgkZg','replace','117GImpny','profile-client.ts.tpl','startsWith','{ProjectRoutingImport}'];a7_0x2ace=function(){return _0x11257b;};return a7_0x2ace();}const a7_0x30f130=a7_0x15ac;(function(_0x2447f2,_0x3dd41e){const _0xfed15d=a7_0x15ac,_0x519366=_0x2447f2();while(!![]){try{const _0x12be2f=parseInt(_0xfed15d(0x1b8))/0x1*(-parseInt(_0xfed15d(0x1be))/0x2)+parseInt(_0xfed15d(0x1b5))/0x3*(parseInt(_0xfed15d(0x1b9))/0x4)+-parseInt(_0xfed15d(0x1bb))/0x5*(parseInt(_0xfed15d(0x1bf))/0x6)+parseInt(_0xfed15d(0x1c4))/0x7+parseInt(_0xfed15d(0x1b7))/0x8*(parseInt(_0xfed15d(0x1b4))/0x9)+-parseInt(_0xfed15d(0x1bc))/0xa*(parseInt(_0xfed15d(0x1c2))/0xb)+-parseInt(_0xfed15d(0x1c5))/0xc*(-parseInt(_0xfed15d(0x1c7))/0xd);if(_0x12be2f===_0x3dd41e)break;else _0x519366['push'](_0x519366['shift']());}catch(_0x38f76f){_0x519366['push'](_0x519366['shift']());}}}(a7_0x2ace,0xae579));import{readFileSync}from'node:fs';import a7_0x3b5143 from'node:path';import{fileURLToPath}from'node:url';function a7_0x15ac(_0x1a2b2c,_0x5abc08){_0x1a2b2c=_0x1a2b2c-0x1b3;const _0x2ace81=a7_0x2ace();let _0x15acb8=_0x2ace81[_0x1a2b2c];return _0x15acb8;}import a7_0x1884d0 from'prettier';import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function relativeImport(_0x3bad71,_0x5145bb){const _0x2bea1a=a7_0x15ac;let _0x3a4a1e=a7_0x3b5143['relative'](_0x3bad71,_0x5145bb)['replace'](/\\/g,'/');if(!_0x3a4a1e[_0x2bea1a(0x1c9)]('.'))_0x3a4a1e='./'+_0x3a4a1e;return _0x3a4a1e;}export async function renderModelRegistryScaffold(_0x19dd89,_0x5a1c6b=process[a7_0x30f130(0x1b6)]()){const _0x204894=a7_0x30f130,_0x483bf3=fileURLToPath(import.meta.url),_0x4acb91=a7_0x3b5143[_0x204894(0x1c1)](a7_0x3b5143['dirname'](_0x483bf3),'../../templates/generate-api'),_0x62ebdf=relativeImport(a7_0x3b5143[_0x204894(0x1c1)](_0x19dd89),a7_0x3b5143[_0x204894(0x1c1)](_0x5a1c6b,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x3162fb=readFileSync(a7_0x3b5143[_0x204894(0x1c0)](_0x4acb91,_0x204894(0x1cc)),'utf8')[_0x204894(0x1c6)](_0x204894(0x1ca),_0x62ebdf),[_0x5428f8,_0x516d8a,_0x46f88c]=await Promise[_0x204894(0x1c3)]([a7_0x1884d0[_0x204894(0x1b3)](_0x3162fb,{'parser':_0x204894(0x1ba)}),a7_0x1884d0[_0x204894(0x1b3)](readFileSync(a7_0x3b5143[_0x204894(0x1c0)](_0x4acb91,_0x204894(0x1c8)),_0x204894(0x1cb)),{'parser':_0x204894(0x1ba)}),a7_0x1884d0[_0x204894(0x1b3)](readFileSync(a7_0x3b5143[_0x204894(0x1c0)](_0x4acb91,_0x204894(0x1bd)),'utf8'),{'parser':_0x204894(0x1ba)})]);return{'api':_0x5428f8,'client':_0x516d8a,'modelRuntime':_0x46f88c};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d9aff,_0x3c3a66){const _0x36b8db=a8_0x49e0,_0x43e7fa=_0x3d9aff();while(!![]){try{const _0x2940df=parseInt(_0x36b8db(0x1f9))/0x1+parseInt(_0x36b8db(0x1e2))/0x2*(-parseInt(_0x36b8db(0x1f8))/0x3)+parseInt(_0x36b8db(0x1e6))/0x4*(-parseInt(_0x36b8db(0x1ef))/0x5)+-parseInt(_0x36b8db(0x1fc))/0x6*(-parseInt(_0x36b8db(0x1fe))/0x7)+parseInt(_0x36b8db(0x1e5))/0x8+-parseInt(_0x36b8db(0x1f5))/0x9+parseInt(_0x36b8db(0x1e9))/0xa;if(_0x2940df===_0x3c3a66)break;else _0x43e7fa['push'](_0x43e7fa['shift']());}catch(_0x1b0ac7){_0x43e7fa['push'](_0x43e7fa['shift']());}}}(a8_0x1bfc,0x4305f));function a8_0x1bfc(){const _0x50a59b=['profiles','41109ADPBqV','13100acOdEv','length','Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.','3660jSCjFk','appCode','1694SzcGkp','find','object','Model\x20profile\x20\x22','10jpHOba','\x22\x20is\x20missing\x20from\x20','Run\x20`','3156320WpsoKu','1588IKxTMp','filter','apiDir','506430JcqNvY','defaultProfile','validation','entries','join','string','3050CMsZEZ','`\x20first.','api.ts','cwd','apps','resolve','186219KfeXEy','map'];a8_0x1bfc=function(){return _0x50a59b;};return a8_0x1bfc();}import{existsSync}from'node:fs';import a8_0x2cb106 from'node:path';function a8_0x49e0(_0x566897,_0x3cffc5){_0x566897=_0x566897-0x1e2;const _0x1bfcb8=a8_0x1bfc();let _0x49e0c2=_0x1bfcb8[_0x566897];return _0x49e0c2;}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(_0x26ec81,_0x49d2d6,_0x29f893){const _0x13d938=a8_0x49e0,_0xaabefc=a8_0x2cb106[_0x13d938(0x1f4)](process[_0x13d938(0x1f2)](),_0x26ec81),_0x5762e5=a8_0x2cb106[_0x13d938(0x1f4)](_0xaabefc,_0x13d938(0x1f1)),_0x46c002=a8_0x2cb106['resolve'](_0xaabefc,MODEL_REGISTRY_FILE_NAME),_0x5d4a2e=readModelRegistry(_0x46c002);if(_0x5d4a2e){const _0x11630f=_0x49d2d6?Object[_0x13d938(0x1ec)](_0x5d4a2e[_0x13d938(0x1f7)])[_0x13d938(0x1e7)](([,_0x552f93])=>_0x552f93[_0x13d938(0x1fd)]===_0x49d2d6):[];if(_0x29f893){if(_0x5d4a2e['profiles'][_0x29f893])return{'filePath':_0x46c002,'profileName':_0x29f893};if(_0x11630f[_0x13d938(0x1fa)]>0x0)throw CliErrors[_0x13d938(0x1eb)](_0x13d938(0x201)+_0x29f893+_0x13d938(0x1e3)+MODEL_REGISTRY_FILE_NAME+'.',_0x13d938(0x1e4)+CLI_BIN_NAME+'\x20api\x20pull\x20--app\x20'+_0x29f893+_0x13d938(0x1f0));}else{if(_0x11630f[_0x13d938(0x1fa)]===0x1)return{'filePath':_0x46c002,'profileName':_0x11630f[0x0][0x0]};if(_0x11630f[_0x13d938(0x1fa)]>0x1)throw new Error('AppCode\x20\x22'+_0x49d2d6+'\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20'+_0x11630f[_0x13d938(0x1f6)](([_0x19db48])=>_0x19db48)[_0x13d938(0x1ed)](',\x20')+'.\x20'+_0x13d938(0x1fb));if(_0x5d4a2e[_0x13d938(0x1f7)][_0x5d4a2e[_0x13d938(0x1ea)]]&&!_0x49d2d6)return{'filePath':_0x46c002,'profileName':_0x5d4a2e['defaultProfile']};}}if(!_0x49d2d6&&!_0x29f893)return{'filePath':_0x5762e5};const _0x4ecec5=readRawConfig(),_0x838dc9=_0x4ecec5[_0x13d938(0x1f3)]&&typeof _0x4ecec5['apps']===_0x13d938(0x200)?_0x4ecec5['apps']:{},_0x26e22a=_0x29f893&&_0x838dc9[_0x29f893]?[_0x29f893,_0x838dc9[_0x29f893]]:Object['entries'](_0x838dc9)[_0x13d938(0x1ff)](([,_0x28f6db])=>_0x28f6db?.['appcode']===_0x49d2d6);if(!_0x26e22a)return{'filePath':_0x5762e5};const [_0x49a7ee,_0x2b38e4]=_0x26e22a,_0x4e5dbf=typeof _0x4ecec5['defaultApp']===_0x13d938(0x1ee)?_0x4ecec5['defaultApp']:undefined;if(_0x2b38e4?.[_0x13d938(0x1e8)])return{'filePath':_0x5762e5};if(_0x4e5dbf&&_0x49a7ee!==_0x4e5dbf){const _0x3bc0a3=a8_0x2cb106[_0x13d938(0x1f4)](_0xaabefc,_0x49a7ee+'-api.ts');if(existsSync(_0x3bc0a3))return{'filePath':_0x3bc0a3};}return{'filePath':_0x5762e5};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a9_0x1150(_0x10fe2c,_0xa18905){_0x10fe2c=_0x10fe2c-0xb8;const _0x2be1a5=a9_0x2be1();let _0x115080=_0x2be1a5[_0x10fe2c];return _0x115080;}function a9_0x2be1(){const _0x38316d=['66xZXDMg','1785315qGqhTd','autoYes','Run\x20`','log','530bsofug','28HGZavF','2726428eluChH','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','12inxiSw','101511JBXBIh','stop','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','32449054KRCVUE','*\x20Login\x20successful!','10952456buzkmy','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','nonInteractive','!\x20Login\x20failed.','6382ilSmHj','1843164ZAzRns','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','5PQpMtF'];a9_0x2be1=function(){return _0x38316d;};return a9_0x2be1();}(function(_0x515d9f,_0x42c04b){const _0x699a50=a9_0x1150,_0x1c482b=_0x515d9f();while(!![]){try{const _0x3d175d=parseInt(_0x699a50(0xbb))/0x1*(-parseInt(_0x699a50(0xce))/0x2)+-parseInt(_0x699a50(0xbc))/0x3+-parseInt(_0x699a50(0xc2))/0x4*(parseInt(_0x699a50(0xba))/0x5)+parseInt(_0x699a50(0xb8))/0x6*(parseInt(_0x699a50(0xc1))/0x7)+-parseInt(_0x699a50(0xca))/0x8+-parseInt(_0x699a50(0xc5))/0x9*(parseInt(_0x699a50(0xc0))/0xa)+parseInt(_0x699a50(0xc8))/0xb*(parseInt(_0x699a50(0xc4))/0xc);if(_0x3d175d===_0x42c04b)break;else _0x1c482b['push'](_0x1c482b['shift']());}catch(_0x26309d){_0x1c482b['push'](_0x1c482b['shift']());}}}(a9_0x2be1,0xb0e30));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';import a9_0x49f64b from'ora';export async function runAuthServer(_0x410cca){const _0x57acfd=a9_0x1150,_0x4c4a1e=await getIsSessionValid();if(_0x4c4a1e){console[_0x57acfd(0xbf)](_0x57acfd(0xc7));return;}if(_0x410cca?.[_0x57acfd(0xcc)]&&!_0x410cca['autoYes'])throw CliErrors['validation']('Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.',_0x57acfd(0xbe)+CLI_BIN_NAME+_0x57acfd(0xb9));const _0x36b173=_0x410cca?.[_0x57acfd(0xbd)]?!![]:await confirm({'message':'No\x20valid\x20session.\x20Login\x20now?','default':!![]});if(!_0x36b173)return;if(_0x410cca?.[_0x57acfd(0xcc)]){console[_0x57acfd(0xbf)](_0x57acfd(0xc3));const _0x4b315e=await authServer({'silent':![],'openBrowser':![]});_0x4b315e?console[_0x57acfd(0xbf)](_0x57acfd(0xc9)):console['log'](_0x57acfd(0xcd));return;}const _0x242cca=a9_0x49f64b(_0x57acfd(0xcb))['start'](),_0x4fc68c=await authServer({'silent':!![],'openBrowser':!![]});_0x242cca[_0x57acfd(0xc6)](),_0x4fc68c?console[_0x57acfd(0xbf)](_0x57acfd(0xc9)):console[_0x57acfd(0xbf)](_0x57acfd(0xcd));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x200095=a10_0x31b5;(function(_0x15cf8c,_0x26b557){const _0x50bbd0=a10_0x31b5,_0x3cfe98=_0x15cf8c();while(!![]){try{const _0x246796=parseInt(_0x50bbd0(0x8c))/0x1+parseInt(_0x50bbd0(0x81))/0x2+-parseInt(_0x50bbd0(0xac))/0x3+parseInt(_0x50bbd0(0x84))/0x4*(parseInt(_0x50bbd0(0xa0))/0x5)+parseInt(_0x50bbd0(0x9b))/0x6*(-parseInt(_0x50bbd0(0x8e))/0x7)+-parseInt(_0x50bbd0(0xa3))/0x8+-parseInt(_0x50bbd0(0x96))/0x9*(-parseInt(_0x50bbd0(0xab))/0xa);if(_0x246796===_0x26b557)break;else _0x3cfe98['push'](_0x3cfe98['shift']());}catch(_0x13e104){_0x3cfe98['push'](_0x3cfe98['shift']());}}}(a10_0x51b2,0x6506a));function a10_0x31b5(_0x29144e,_0x3de015){_0x29144e=_0x29144e-0x7d;const _0x51b2e0=a10_0x51b2();let _0x31b5d7=_0x51b2e0[_0x29144e];return _0x31b5d7;}import{writeFileSync}from'node:fs';import a10_0x1c4ddb from'node:http';import a10_0x58ea68 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';function a10_0x51b2(){const _0x17c0d4=['💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','darwin','utf-8','315GaThal','win32','timeoutMs','writeHead','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','6yfHKoP','!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','origin','certificateUrl','xdg-open\x20\x22','663915htuTPY','local','silent','6478616PruJHr','open\x20\x22','close','createServer','cmd\x20/c\x20start\x20\x22\x22\x20\x22','catch','session','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','166890MKepnk','2023839kSqLZD','address','log','🔐\x20Starting\x20login\x20service...','/sign-in?redirect=','165006vpXoiV','isAuth','openBrowser','24ZIlVxj','/api/auth/get-session','json','then','end','object','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','810227SLMmBz','lovrabet','2627107Hzpzht','/cert/lovrabet-dev.json','error','127.0.0.1','port'];a10_0x51b2=function(){return _0x17c0d4;};return a10_0x51b2();}import{exec}from'node:child_process';import{getIsSessionValid}from'../auth/is-session-valid.js';import{cookieFile}from'../auth/constant.js';import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export function resolveAuthCallbackRouting(_0xed74bd){const _0x42dbfd=a10_0x31b5;if(!_0xed74bd)return getProjectDomainRoutingManifest()[_0x42dbfd(0xa1)];const _0x1b24f1=getOfficialRoutingProfile(_0xed74bd),_0x2159a2=getOfficialRoutingCdn(_0xed74bd);return{'origin':_0x1b24f1['local'][_0x42dbfd(0x9d)],'certificateUrl':_0x2159a2[_0x42dbfd(0x8d)]+_0x42dbfd(0x8f)};}function withPort(_0x403284,_0x5203e5){const _0x140df6=a10_0x31b5,_0x14653e=new URL(_0x403284);return _0x14653e[_0x140df6(0x92)]=String(_0x5203e5),_0x14653e[_0x140df6(0x9d)];}export async function authServer(_0x2b7247){const _0x19ba8b=a10_0x31b5,_0x2d2555=_0x2b7247?.[_0x19ba8b(0xa2)]||![],_0x37d280=_0x2b7247?.[_0x19ba8b(0x83)]??!![],_0x59e6ff=_0x2b7247?.[_0x19ba8b(0x98)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x342e14=resolveAuthCallbackRouting(),_0x21b57b=_0x342e14['certificateUrl']?await(await fetch(_0x342e14[_0x19ba8b(0x9e)]))[_0x19ba8b(0x86)]():undefined;return new Promise(async(_0x1571b9,_0x183c08)=>{const _0x51fcc6=_0x19ba8b;let _0x2178d4=0x0,_0x4c57a5=![],_0x3c6f46;const _0x3b4e93=async(_0x32ac10,_0x3df894)=>{const _0x1461bb=a10_0x31b5,_0x388194=getUserDomain(),_0x9db06d=_0x32ac10['headers']['cookie']||'',_0x58f9a0=await fetch(_0x388194+_0x1461bb(0x85),{'headers':{'cookie':_0x9db06d}})[_0x1461bb(0x87)](_0x4a5789=>_0x4a5789['json']()),_0x4368a6=_0x58f9a0&&_0x58f9a0[_0x1461bb(0xa9)]&&_0x58f9a0['user'];if(_0x4368a6){writeFileSync(cookieFile,_0x9db06d,_0x1461bb(0x95));const _0x136fb4=buildLoginSuccessHtml();_0x3df894[_0x1461bb(0x99)](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x3df894['end'](_0x136fb4),_0x5a3085(!![]);}else{const _0x2c4ffc=encodeURIComponent(withPort(_0x342e14[_0x1461bb(0x9d)],_0x2178d4));_0x3df894[_0x1461bb(0x99)](0x12e,{'location':_0x388194+_0x1461bb(0x80)+_0x2c4ffc}),_0x3df894[_0x1461bb(0x88)]();return;}},_0x35830d=_0x21b57b?a10_0x58ea68['createServer'](_0x21b57b,_0x3b4e93):a10_0x1c4ddb[_0x51fcc6(0xa6)](_0x3b4e93);function _0x5a3085(_0x453af0){const _0x4a0ac1=_0x51fcc6;if(_0x4c57a5)return;_0x4c57a5=!![],_0x3c6f46&&clearTimeout(_0x3c6f46),_0x35830d[_0x4a0ac1(0xa5)](),_0x1571b9(_0x453af0);}_0x35830d['listen'](0x0,_0x51fcc6(0x91),()=>{const _0x1f427c=_0x51fcc6,_0x172b40=_0x35830d[_0x1f427c(0x7d)]();_0x2178d4=typeof _0x172b40===_0x1f427c(0x89)&&_0x172b40?_0x172b40[_0x1f427c(0x92)]:Number(_0x172b40);const _0x113c82=withPort(_0x342e14[_0x1f427c(0x9d)],_0x2178d4);_0x3c6f46=setTimeout(()=>{const _0x3a73ee=_0x1f427c;!_0x2d2555&&console[_0x3a73ee(0x7e)](_0x3a73ee(0x9c)),_0x5a3085(![]);},_0x59e6ff);!_0x2d2555&&(console[_0x1f427c(0x7e)](_0x1f427c(0x7f)),console['log']('📍\x20Login\x20URL:',_0x113c82),_0x37d280?(console['log'](_0x1f427c(0x9a)),console[_0x1f427c(0x7e)](''),console[_0x1f427c(0x7e)]('💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.')):console['log'](_0x1f427c(0x93)),console[_0x1f427c(0x7e)](''));if(!_0x37d280)return;openInBrowser(_0x113c82)[_0x1f427c(0x87)](_0x3af805=>{const _0xea2ea9=_0x1f427c;!_0x2d2555&&(_0x3af805?console[_0xea2ea9(0x7e)](_0xea2ea9(0x8b)):(console['log'](_0xea2ea9(0xaa)),console[_0xea2ea9(0x7e)](_0xea2ea9(0x8a),_0x113c82)),console[_0xea2ea9(0x7e)](''));})[_0x1f427c(0xa8)](()=>{const _0x378753=_0x1f427c;!_0x2d2555&&(console[_0x378753(0x7e)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x378753(0x7e)](_0x378753(0x8a),_0x113c82),console[_0x378753(0x7e)](''));});}),_0x35830d['on'](_0x51fcc6(0x90),_0x449a30=>{const _0x575f72=_0x51fcc6;if(_0x4c57a5)return;_0x4c57a5=!![],_0x3c6f46&&clearTimeout(_0x3c6f46),!_0x2d2555&&console[_0x575f72(0x90)]('Auth\x20server\x20error:',_0x449a30),_0x35830d[_0x575f72(0xa5)](),_0x183c08(_0x449a30);});});}function openInBrowser(_0x3046e3){return new Promise(_0x24d4c6=>{const _0x22e30a=a10_0x31b5,_0x190b02=process['platform'];let _0x4a9412;if(_0x190b02===_0x22e30a(0x97))_0x4a9412=_0x22e30a(0xa7)+_0x3046e3+'\x22';else _0x190b02===_0x22e30a(0x94)?_0x4a9412=_0x22e30a(0xa4)+_0x3046e3+'\x22':_0x4a9412=_0x22e30a(0x9f)+_0x3046e3+'\x22';exec(_0x4a9412,_0x23ded7=>{_0x23ded7?_0x24d4c6(![]):_0x24d4c6(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a10_0x200095(0x7e)](a10_0x200095(0x82),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a11_0x381eb6=a11_0x44be;function a11_0x44be(_0x8c52f4,_0x301ccd){_0x8c52f4=_0x8c52f4-0x128;const _0x221018=a11_0x2210();let _0x44be24=_0x221018[_0x8c52f4];return _0x44be24;}function a11_0x2210(){const _0x3c655b=['21820RxAcLL','1866ooZhXy','10090IoICWO','.lovrabet','2281497GPXXhW','14zeMIZK','2836884UBIyjF','cookie','656194JQwfIB','2466oUWqba','55NTPJka','1tLNdKl','2288904TYQbWn','904648fndOfR'];a11_0x2210=function(){return _0x3c655b;};return a11_0x2210();}(function(_0x70292e,_0x229970){const _0x1d8b37=a11_0x44be,_0x1a93c2=_0x70292e();while(!![]){try{const _0x5a9490=parseInt(_0x1d8b37(0x12f))/0x1*(parseInt(_0x1d8b37(0x12c))/0x2)+parseInt(_0x1d8b37(0x128))/0x3+-parseInt(_0x1d8b37(0x130))/0x4+-parseInt(_0x1d8b37(0x134))/0x5*(parseInt(_0x1d8b37(0x133))/0x6)+parseInt(_0x1d8b37(0x129))/0x7*(parseInt(_0x1d8b37(0x131))/0x8)+-parseInt(_0x1d8b37(0x12d))/0x9*(parseInt(_0x1d8b37(0x132))/0xa)+-parseInt(_0x1d8b37(0x12e))/0xb*(-parseInt(_0x1d8b37(0x12a))/0xc);if(_0x5a9490===_0x229970)break;else _0x1a93c2['push'](_0x1a93c2['shift']());}catch(_0x807b20){_0x1a93c2['push'](_0x1a93c2['shift']());}}}(a11_0x2210,0xaaadd));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a11_0x381eb6(0x135));export const cookieFile=join(configDir,a11_0x381eb6(0x12b));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a12_0xfb69(_0x405820,_0x366cfd){_0x405820=_0x405820-0x91;var _0x3d97c7=a12_0x3d97();var _0xfb693e=_0x3d97c7[_0x405820];return _0xfb693e;}(function(_0x2495a3,_0x35dc1b){var _0x45893b=a12_0xfb69,_0x33f906=_0x2495a3();while(!![]){try{var _0x2e478a=-parseInt(_0x45893b(0x95))/0x1+-parseInt(_0x45893b(0x97))/0x2*(parseInt(_0x45893b(0x9a))/0x3)+parseInt(_0x45893b(0x93))/0x4+parseInt(_0x45893b(0x96))/0x5+-parseInt(_0x45893b(0x98))/0x6+-parseInt(_0x45893b(0x91))/0x7*(-parseInt(_0x45893b(0x92))/0x8)+-parseInt(_0x45893b(0x94))/0x9*(-parseInt(_0x45893b(0x99))/0xa);if(_0x2e478a===_0x35dc1b)break;else _0x33f906['push'](_0x33f906['shift']());}catch(_0x437ecb){_0x33f906['push'](_0x33f906['shift']());}}}(a12_0x3d97,0xca895));import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';function a12_0x3d97(){var _0xde0ca8=['2142771PWEUYP','utf-8','7LZLCQY','522960WWjAOM','955616TgQASP','4592286JxhevH','725127CrKVBX','3608290FhtyBF','2irbWcP','7849374DVlwZZ','50MbNNbV'];a12_0x3d97=function(){return _0xde0ca8;};return a12_0x3d97();}export function getCookie(){var _0x29b34f=a12_0xfb69;try{return readFileSync(cookieFile,_0x29b34f(0x9b));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x56b630,_0x219f7a){const _0x59ee3a=a13_0x241a,_0x12b94f=_0x56b630();while(!![]){try{const _0x42737a=parseInt(_0x59ee3a(0xc6))/0x1*(parseInt(_0x59ee3a(0xc7))/0x2)+parseInt(_0x59ee3a(0xc9))/0x3*(parseInt(_0x59ee3a(0xc0))/0x4)+-parseInt(_0x59ee3a(0xc2))/0x5+-parseInt(_0x59ee3a(0xca))/0x6+-parseInt(_0x59ee3a(0xc5))/0x7+parseInt(_0x59ee3a(0xbd))/0x8+-parseInt(_0x59ee3a(0xc8))/0x9;if(_0x42737a===_0x219f7a)break;else _0x12b94f['push'](_0x12b94f['shift']());}catch(_0x4d11bb){_0x12b94f['push'](_0x12b94f['shift']());}}}(a13_0x21d9,0x912ce));import{existsSync,readFileSync}from'node:fs';function a13_0x21d9(){const _0x58720d=['4680780ynYMgU','1603104shFdOR','user','utf-8','3812XShcCS','session','1210215oejZVX','/api/auth/get-session','json','1029301UIcbYj','411779WqYBLX','2krauNo','244566QCAApZ','3711QKKvWB'];a13_0x21d9=function(){return _0x58720d;};return a13_0x21d9();}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a13_0x241a(_0x347799,_0x110eb7){_0x347799=_0x347799-0xbd;const _0x21d9a7=a13_0x21d9();let _0x241a17=_0x21d9a7[_0x347799];return _0x241a17;}export async function getSessionUserInfo(){const _0x35fc01=a13_0x241a;try{if(!existsSync(cookieFile))return null;const _0x201a0d=readFileSync(cookieFile,_0x35fc01(0xbf)),_0x36a972=await fetch(getUserDomain()+_0x35fc01(0xc3),{'headers':{'cookie':_0x201a0d}});if(!_0x36a972['ok'])return null;const _0x2819a1=await _0x36a972[_0x35fc01(0xc4)]();if(!_0x2819a1[_0x35fc01(0xc1)]||!_0x2819a1[_0x35fc01(0xbe)])return null;return _0x2819a1;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3837ff,_0x15e988){const _0x1523fe=a14_0x5777,_0x31d8eb=_0x3837ff();while(!![]){try{const _0x8a4791=-parseInt(_0x1523fe(0x181))/0x1*(parseInt(_0x1523fe(0x17c))/0x2)+parseInt(_0x1523fe(0x189))/0x3+-parseInt(_0x1523fe(0x184))/0x4*(-parseInt(_0x1523fe(0x187))/0x5)+-parseInt(_0x1523fe(0x182))/0x6*(-parseInt(_0x1523fe(0x17e))/0x7)+-parseInt(_0x1523fe(0x183))/0x8*(parseInt(_0x1523fe(0x17b))/0x9)+parseInt(_0x1523fe(0x180))/0xa*(-parseInt(_0x1523fe(0x17d))/0xb)+parseInt(_0x1523fe(0x17f))/0xc;if(_0x8a4791===_0x15e988)break;else _0x31d8eb['push'](_0x31d8eb['shift']());}catch(_0x5acbf0){_0x31d8eb['push'](_0x31d8eb['shift']());}}}(a14_0x59fb,0xdeef6));function a14_0x5777(_0xabb76c,_0x289fa4){_0xabb76c=_0xabb76c-0x17b;const _0x59fb08=a14_0x59fb();let _0x5777ff=_0x59fb08[_0xabb76c];return _0x5777ff;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a14_0x59fb(){const _0x4b2a4d=['11jTTMEv','1268393BdLFpw','21474396FjrLTq','6807970yhkLLX','1810219ndMucn','24SzazVO','72UXIjHZ','3732FTrPze','then','session','3950EkibEK','json','4941114CrTUoQ','1494279hVqejp','2wQwJqW'];a14_0x59fb=function(){return _0x4b2a4d;};return a14_0x59fb();}export async function getIsSessionValid(){const _0x3f370b=a14_0x5777;try{if(!existsSync(cookieFile))return![];const _0x4afd7d=readFileSync(cookieFile,'utf-8'),_0x4d1963=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x4afd7d}})[_0x3f370b(0x185)](_0xac9083=>_0xac9083[_0x3f370b(0x188)]());return _0x4d1963&&_0x4d1963[_0x3f370b(0x186)]&&_0x4d1963['user'];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a15_0x777b(){const _0x5a4aa5=['7572104HaJUjq','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','54sNZAaT','815XmTzHi','7ukGLtY','1257114DGinvI','1540570lmrNUq','2172whkvqY','<!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>','63RkNMiF','2074980IsItmh','55RbKaYW','114110rrhnMC','483704VZJkeC'];a15_0x777b=function(){return _0x5a4aa5;};return a15_0x777b();}(function(_0x234a1a,_0x588b9e){const _0x2ec1c5=a15_0x3d94,_0x1705b4=_0x234a1a();while(!![]){try{const _0x3e0252=parseInt(_0x2ec1c5(0x1a8))/0x1+-parseInt(_0x2ec1c5(0x1a7))/0x2*(-parseInt(_0x2ec1c5(0x1b2))/0x3)+-parseInt(_0x2ec1c5(0x1b0))/0x4*(-parseInt(_0x2ec1c5(0x1ac))/0x5)+parseInt(_0x2ec1c5(0x1ae))/0x6*(-parseInt(_0x2ec1c5(0x1ad))/0x7)+-parseInt(_0x2ec1c5(0x1a9))/0x8+parseInt(_0x2ec1c5(0x1ab))/0x9*(parseInt(_0x2ec1c5(0x1af))/0xa)+parseInt(_0x2ec1c5(0x1b4))/0xb*(-parseInt(_0x2ec1c5(0x1b3))/0xc);if(_0x3e0252===_0x588b9e)break;else _0x1705b4['push'](_0x1705b4['shift']());}catch(_0x1a53fb){_0x1705b4['push'](_0x1705b4['shift']());}}}(a15_0x777b,0xa4937));function a15_0x3d94(_0x14c1dd,_0x3713fd){_0x14c1dd=_0x14c1dd-0x1a7;const _0x777b2f=a15_0x777b();let _0x3d9429=_0x777b2f[_0x14c1dd];return _0x3d9429;}export function buildLoginSuccessHtml(){const _0x47b446=a15_0x3d94,_0x377aab=_0x47b446(0x1aa);return _0x47b446(0x1b1)+_0x377aab+'</div>\x0a\x20\x20\x20\x20<p\x20class=\x22cli-hint\x22>Rabetbase\x20CLI\x20·\x20session\x20saved\x20locally</p>\x0a\x20\x20</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>';}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a16_0x5517(_0x1bc8df,_0x503d54){_0x1bc8df=_0x1bc8df-0xbf;var _0x782f0d=a16_0x782f();var _0x5517c5=_0x782f0d[_0x1bc8df];return _0x5517c5;}(function(_0x22a5cc,_0x3093eb){var _0x2add60=a16_0x5517,_0x264712=_0x22a5cc();while(!![]){try{var _0x1b67ee=-parseInt(_0x2add60(0xc1))/0x1+-parseInt(_0x2add60(0xc0))/0x2*(parseInt(_0x2add60(0xc6))/0x3)+parseInt(_0x2add60(0xc2))/0x4*(parseInt(_0x2add60(0xc3))/0x5)+parseInt(_0x2add60(0xc5))/0x6+-parseInt(_0x2add60(0xca))/0x7+-parseInt(_0x2add60(0xcb))/0x8+-parseInt(_0x2add60(0xc7))/0x9*(-parseInt(_0x2add60(0xc9))/0xa);if(_0x1b67ee===_0x3093eb)break;else _0x264712['push'](_0x264712['shift']());}catch(_0x17419b){_0x264712['push'](_0x264712['shift']());}}}(a16_0x782f,0x4eca2));import{unlinkSync,existsSync}from'node:fs';function a16_0x782f(){var _0x3f3cc9=['2379881aGTtqb','2122432Bufeou','log','550uNReLd','634586zmTHbQ','948gTJdXY','5995xiGtCw','!\x20Not\x20logged\x20in','2428614VOqMMr','1242ySEELx','1809ZlPEZW','✓\x20Logged\x20out','49130mEtQBT'];a16_0x782f=function(){return _0x3f3cc9;};return a16_0x782f();}import{cookieFile}from'../auth/constant.js';export function logout(){var _0x2468a8=a16_0x5517;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x2468a8(0xbf)](_0x2468a8(0xc8))):console['log'](_0x2468a8(0xc4));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a17_0x4ffa(_0x4cd322,_0x269bab){_0x4cd322=_0x4cd322-0x17d;const _0x2f0838=a17_0x2f08();let _0x4ffafa=_0x2f0838[_0x4cd322];return _0x4ffafa;}const a17_0x332a68=a17_0x4ffa;(function(_0x2c1c69,_0x5399b4){const _0x5efe86=a17_0x4ffa,_0x541396=_0x2c1c69();while(!![]){try{const _0x5297b8=-parseInt(_0x5efe86(0x180))/0x1*(parseInt(_0x5efe86(0x184))/0x2)+-parseInt(_0x5efe86(0x188))/0x3+parseInt(_0x5efe86(0x181))/0x4*(parseInt(_0x5efe86(0x183))/0x5)+parseInt(_0x5efe86(0x182))/0x6+parseInt(_0x5efe86(0x17e))/0x7*(-parseInt(_0x5efe86(0x17f))/0x8)+parseInt(_0x5efe86(0x187))/0x9+-parseInt(_0x5efe86(0x185))/0xa*(parseInt(_0x5efe86(0x186))/0xb);if(_0x5297b8===_0x5399b4)break;else _0x541396['push'](_0x541396['shift']());}catch(_0x5510fa){_0x541396['push'](_0x541396['shift']());}}}(a17_0x2f08,0x9237d));export const dynamicCliFlags={'enableBffSave':{'type':a17_0x332a68(0x17d)}};function a17_0x2f08(){const _0x2f8a87=['3499984lEIBQF','1pnptwg','4ZEEgFO','6732804gwouwE','4024555woWlKB','451856uisdNi','3150gBdMTi','5742DtGapx','3646017LPpdJV','2716179SKlvMC','boolean','7wisAYg'];a17_0x2f08=function(){return _0x2f8a87;};return a17_0x2f08();}
|