@lovrabet/rabetbase-cli 2.5.10 โ 2.5.11-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x550143,_0xf0242e){const _0x99d1e0=a0_0x2804,_0xb66e5d=_0x550143();while(!![]){try{const _0x1c452a=parseInt(_0x99d1e0(0x93))/0x1*(-parseInt(_0x99d1e0(0x9a))/0x2)+parseInt(_0x99d1e0(0xa0))/0x3*(parseInt(_0x99d1e0(0xab))/0x4)+parseInt(_0x99d1e0(0xa1))/0x5+parseInt(_0x99d1e0(0x94))/0x6*(-parseInt(_0x99d1e0(0x9b))/0x7)+-parseInt(_0x99d1e0(0xa6))/0x8*(-parseInt(_0x99d1e0(0xaa))/0x9)+-parseInt(_0x99d1e0(0xac))/0xa+parseInt(_0x99d1e0(0xa9))/0xb;if(_0x1c452a===_0xf0242e)break;else _0xb66e5d['push'](_0xb66e5d['shift']());}catch(_0x4661c7){_0xb66e5d['push'](_0xb66e5d['shift']());}}}(a0_0x5a50,0x9b615));import{mkdirSync,writeFileSync}from'node:fs';import a0_0xccc449 from'node:path';import{fetchDatasetDoc}from'../core/api-client.js';function a0_0x2804(_0x425166,_0x5c802d){_0x425166=_0x425166-0x92;const _0x5a50b3=a0_0x5a50();let _0x28045c=_0x5a50b3[_0x425166];return _0x28045c;}import{logger}from'../utils/logger.js';export{fetchDatasetDoc}from'../core/api-client.js';function delay(_0x54fec0){return new Promise(_0x3567cd=>setTimeout(_0x3567cd,_0x54fec0));}function a0_0x5a50(){const _0x3a6e07=['.md\x20(','error','name','datasetCode','Generated\x20docs\x20successfully:\x20','utf8','70759FWbviC','12GIBeeT',']\x20Generating:\x20','push','โ\x20Failed:\x20','Waiting\x203\x20seconds...\x0a','Failed\x20to\x20generate\x20docs:\x20','6AIGops','172403EZbVTF','message','join','success','โ\x20Generated:\x20','21CwHoEe','4147645zlctom','tableName','log','.md\x20-\x20','length','8ODutbn','.md','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','1431199ngPiRe','294381MiEmtd','452596CyTVsm','8864180jhfszG','api-doc'];a0_0x5a50=function(){return _0x3a6e07;};return a0_0x5a50();}export async function generateDatasetDocs(_0x3fa8e8,_0xefdef5,_0x4d7698,_0x8d0c07='./docs',_0x224661,_0x37652e){const _0x21a385=a0_0x2804;mkdirSync(_0x8d0c07,{'recursive':!![]});const _0x5ae944=[],_0x4a4e67=_0x3fa8e8[_0x21a385(0xa5)];console[_0x21a385(0xa3)]('\x0a'+_0x4a4e67+_0x21a385(0xa8));for(let _0x456816=0x0;_0x456816<_0x3fa8e8[_0x21a385(0xa5)];_0x456816++){const _0xea248b=_0x3fa8e8[_0x456816],_0x208349=_0x456816+0x1,_0x360f44=_0xea248b[_0x21a385(0xa2)];try{console[_0x21a385(0xa3)]('['+_0x208349+'/'+_0x4a4e67+_0x21a385(0x95)+_0x360f44+_0x21a385(0xae)+_0xea248b[_0x21a385(0xb0)]+')');if(_0x224661)_0x224661(_0x208349,_0x4a4e67,_0x360f44);const _0x3240c5=await fetchDatasetDoc({'appCode':_0xefdef5,'cookie':_0x4d7698,'datasetCode':_0xea248b[_0x21a385(0xb1)],'datasetId':_0xea248b['id'],'enableAI':![],'extraParams':_0x37652e}),_0xb0f0fe=a0_0xccc449[_0x21a385(0x9d)](_0x8d0c07,_0x360f44+_0x21a385(0xa7));writeFileSync(_0xb0f0fe,_0x3240c5,{'encoding':_0x21a385(0x92)}),console[_0x21a385(0xa3)](_0x21a385(0x9f)+_0x360f44+'.md'),logger[_0x21a385(0x9e)](_0x21a385(0xad),_0x21a385(0xb2)+_0x360f44,undefined,{'datasetCode':_0xea248b[_0x21a385(0xb1)],'datasetName':_0xea248b[_0x21a385(0xb0)],'filePath':_0xb0f0fe,'progress':_0x208349+'/'+_0x4a4e67}),_0x5ae944[_0x21a385(0x96)]({'datasetCode':_0xea248b[_0x21a385(0xb1)],'datasetName':_0xea248b[_0x21a385(0xb0)],'filePath':_0xb0f0fe,'success':!![]});if(_0x208349<_0x4a4e67)await delay(0x1388);}catch(_0x5256a2){const _0x276182=_0x5256a2 instanceof Error?_0x5256a2[_0x21a385(0x9c)]:String(_0x5256a2);console[_0x21a385(0xa3)](_0x21a385(0x97)+_0x360f44+_0x21a385(0xa4)+_0x276182),logger[_0x21a385(0xaf)](_0x21a385(0xad),_0x21a385(0x99)+_0xea248b[_0x21a385(0xb1)],{'datasetCode':_0xea248b[_0x21a385(0xb1)],'datasetName':_0xea248b[_0x21a385(0xb0)],'error':_0x276182,'progress':_0x208349+'/'+_0x4a4e67}),_0x5ae944[_0x21a385(0x96)]({'datasetCode':_0xea248b[_0x21a385(0xb1)],'datasetName':_0xea248b[_0x21a385(0xb0)],'filePath':'','success':![],'error':_0x276182}),_0x208349<_0x4a4e67&&(console[_0x21a385(0xa3)](_0x21a385(0x98)),await delay(0xbb8));}}return _0x5ae944;}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x472d82=a1_0x542f;(function(_0x48f629,_0x222369){const _0x831da1=a1_0x542f,_0x2b574d=_0x48f629();while(!![]){try{const _0x1ca912=-parseInt(_0x831da1(0x87))/0x1*(parseInt(_0x831da1(0x97))/0x2)+parseInt(_0x831da1(0x88))/0x3+-parseInt(_0x831da1(0x99))/0x4+parseInt(_0x831da1(0x93))/0x5*(parseInt(_0x831da1(0x9e))/0x6)+parseInt(_0x831da1(0xa0))/0x7+parseInt(_0x831da1(0x86))/0x8+parseInt(_0x831da1(0x90))/0x9;if(_0x1ca912===_0x222369)break;else _0x2b574d['push'](_0x2b574d['shift']());}catch(_0x1c365f){_0x2b574d['push'](_0x2b574d['shift']());}}}(a1_0xcfde,0x96d06));import a1_0x2654eb from'node:path';import{CliErrors}from'../errors.js';export function normalizeApiDir(_0x2089e2,_0x477712=process[a1_0x472d82(0x96)]()){const _0x15a698=a1_0x472d82;return a1_0x2654eb[_0x15a698(0x94)](_0x477712,_0x2089e2);}function a1_0xcfde(){const _0x326e94=['257686Euxhbx','app','3368104gfCgCR','outputDir','flatMap','apiGroup','set','6gTjqWg','Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20','6252204VZkoRx','map','size','get','2162840tExOQd','9mQjwjC','485091qPASTC','Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.','push','API\x20directory\x20\x22','validation','some','filter','\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','2533734KFOMLv','\x22\x20resolves\x20to\x20multiple\x20API\x20directories.','trim','5062985GLvMOi','resolve','normalizedApiDir','cwd'];a1_0xcfde=function(){return _0x326e94;};return a1_0xcfde();}function a1_0x542f(_0x3a2711,_0x4cc58a){_0x3a2711=_0x3a2711-0x84;const _0xcfde=a1_0xcfde();let _0x542f6d=_0xcfde[_0x3a2711];return _0x542f6d;}function normalizedApiGroup(_0x57b494){const _0x478448=a1_0x472d82,_0x2f422b=_0x57b494?.[_0x478448(0x92)]();return _0x2f422b||undefined;}export function resolveApiProfileLayouts(_0x35b6cc,_0x58fcb6,_0x1f5fce=process[a1_0x472d82(0x96)]()){const _0x25ab66=a1_0x472d82,_0x10235c=_0x35b6cc[_0x25ab66(0xa1)](_0x2602e2=>{const _0x2964c4=_0x58fcb6(_0x2602e2);return{'app':_0x2602e2,'outputDir':_0x2964c4,'normalizedApiDir':normalizeApiDir(_0x2964c4,_0x1f5fce),'apiGroup':normalizedApiGroup(_0x2602e2['apiGroup'])};}),_0x73a0da=new Map();for(const _0x3f07e3 of _0x10235c){if(!_0x3f07e3['apiGroup'])continue;const _0x53c356=_0x73a0da[_0x25ab66(0x85)](_0x3f07e3[_0x25ab66(0x9c)])??new Set();_0x53c356['add'](_0x3f07e3[_0x25ab66(0x95)]),_0x73a0da['set'](_0x3f07e3[_0x25ab66(0x9c)],_0x53c356);}for(const [_0x5dbd51,_0x4603dd]of _0x73a0da){if(_0x4603dd[_0x25ab66(0x84)]>0x1)throw CliErrors[_0x25ab66(0x8c)]('API\x20group\x20\x22'+_0x5dbd51+_0x25ab66(0x91),_0x25ab66(0x89));}const _0x43c8e7=new Map();for(const _0x2fa950 of _0x10235c){const _0x10b4bc=_0x43c8e7[_0x25ab66(0x85)](_0x2fa950[_0x25ab66(0x95)])??[];_0x10b4bc[_0x25ab66(0x8a)](_0x2fa950),_0x43c8e7[_0x25ab66(0x9d)](_0x2fa950[_0x25ab66(0x95)],_0x10b4bc);}for(const _0x3967e1 of _0x43c8e7['values']()){const _0x1c4364=new Set(_0x3967e1[_0x25ab66(0x9b)](_0x54e8ca=>_0x54e8ca['apiGroup']?[_0x54e8ca[_0x25ab66(0x9c)]]:[]));if(_0x1c4364[_0x25ab66(0x84)]===0x0)continue;if(_0x1c4364[_0x25ab66(0x84)]>0x1||_0x3967e1[_0x25ab66(0x8d)](_0x147c8a=>!_0x147c8a[_0x25ab66(0x9c)])){const _0x182500=_0x3967e1[_0x25ab66(0xa1)](_0x5d055a=>_0x5d055a[_0x25ab66(0x98)]['name'])['join'](',\x20');throw CliErrors[_0x25ab66(0x8c)](_0x25ab66(0x8b)+_0x3967e1[0x0][_0x25ab66(0x9a)]+_0x25ab66(0x8f),_0x25ab66(0x9f)+_0x182500+'.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.');}}return _0x10235c;}export function getRegistryGroup(_0x8ddefe,_0x5c4dd9){const _0x36ae98=a1_0x472d82;if(_0x5c4dd9[_0x36ae98(0x9c)])return _0x8ddefe[_0x36ae98(0x8e)](_0x534e9f=>_0x534e9f['apiGroup']===_0x5c4dd9['apiGroup']);const _0x48db88=_0x8ddefe[_0x36ae98(0x8e)](_0x1e4c5f=>_0x1e4c5f['normalizedApiDir']===_0x5c4dd9['normalizedApiDir']);return _0x48db88['length']===0x1?_0x48db88:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4ae702,_0x2beb76){var _0x229a7b=a2_0x3a42,_0xf40fa0=_0x4ae702();while(!![]){try{var _0x207c8a=parseInt(_0x229a7b(0x17a))/0x1*(parseInt(_0x229a7b(0x182))/0x2)+-parseInt(_0x229a7b(0x183))/0x3+-parseInt(_0x229a7b(0x185))/0x4*(parseInt(_0x229a7b(0x17c))/0x5)+-parseInt(_0x229a7b(0x181))/0x6+-parseInt(_0x229a7b(0x17e))/0x7*(parseInt(_0x229a7b(0x180))/0x8)+-parseInt(_0x229a7b(0x17f))/0x9*(-parseInt(_0x229a7b(0x184))/0xa)+parseInt(_0x229a7b(0x17b))/0xb*(parseInt(_0x229a7b(0x17d))/0xc);if(_0x207c8a===_0x2beb76)break;else _0xf40fa0['push'](_0xf40fa0['shift']());}catch(_0x34dc69){_0xf40fa0['push'](_0xf40fa0['shift']());}}}(a2_0x2a25,0x5dc95));export{fetchModelList}from'../core/api-client.js';function a2_0x3a42(_0x3a1ca8,_0x6bb9a1){_0x3a1ca8=_0x3a1ca8-0x17a;var _0x2a250e=a2_0x2a25();var _0x3a420a=_0x2a250e[_0x3a1ca8];return _0x3a420a;}function a2_0x2a25(){var _0x197352=['8550780iKWVAh','3647cySnzl','762336ypkosQ','5432KqGKRW','3136086ELKJkF','2vEBuzS','468231chRqrj','20UdzrMw','4VKwvqh','474391iazsFs','22wGROgh','3261315ZJcUMN'];a2_0x2a25=function(){return _0x197352;};return a2_0x2a25();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ef91d,_0xaec70d){const _0x4aab91=a3_0x3df7,_0x4093ef=_0x1ef91d();while(!![]){try{const _0x54be46=parseInt(_0x4aab91(0xd4))/0x1+-parseInt(_0x4aab91(0x103))/0x2+parseInt(_0x4aab91(0x100))/0x3*(-parseInt(_0x4aab91(0xff))/0x4)+parseInt(_0x4aab91(0xe7))/0x5*(-parseInt(_0x4aab91(0xef))/0x6)+-parseInt(_0x4aab91(0xe3))/0x7*(-parseInt(_0x4aab91(0xfc))/0x8)+-parseInt(_0x4aab91(0xd6))/0x9*(-parseInt(_0x4aab91(0x109))/0xa)+-parseInt(_0x4aab91(0xe6))/0xb*(parseInt(_0x4aab91(0xdd))/0xc);if(_0x54be46===_0xaec70d)break;else _0x4093ef['push'](_0x4093ef['shift']());}catch(_0x2462b7){_0x4093ef['push'](_0x4093ef['shift']());}}}(a3_0x5101,0x51776));import a3_0xaf9aed from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x2d7b27 from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';import{generateSdkConfigFile}from'../api/generate-sdk-config-file.js';import{MODEL_REGISTRY_FILE_NAME,MODEL_RUNTIME_FILE_NAME,updateModelRegistry}from'../api/model-registry-file.js';import{renderModelRegistryScaffold}from'../api/model-registry-scaffold.js';function a3_0x5101(){const _0xf4742b=['overwriteTypescript','length','existed','preserved','\x20config\x20set\x20app\x20<value>`','replace','CONFIG_NAMES.DEFAULT','216tlEIiq','join','APP_','.ts','map','-api','basename','replaceApiContent','allowEmptyModelReplacement','API\x20scaffold\x20written.','client','action','refreshed','840Mgllfg','toUpperCase','name','574472eohQxP','12ZyCnPV','LOVRABET_RUNTIME_DOMAIN','defaultName','925550LDbKyn','overwritten','Please\x20configure\x20app\x20code\x20first\x20via\x20`','stringify','missing','none','10HLkxaj','-client','{\x20apiConfigName:\x20','created','default','alias',',\x20...LOVRABET_SDK_CONFIG\x20}','575903LocbBA','init-api','5933889AeSiiR','key','LOVRABET','runtimeDomain','format','success',',\x20env:\x20','60NpaooT','utf8','modelProfile','templates/generate-api','modelRuntime','api.ts.tpl','34202BvlYEd','api','includes','4763NeXxgt','52105dvNtzv'];a3_0x5101=function(){return _0xf4742b;};return a3_0x5101();}function a3_0x3df7(_0x207d19,_0x1f10a1){_0x207d19=_0x207d19-0xd3;const _0x5101f8=a3_0x5101();let _0x3df7df=_0x5101f8[_0x207d19];return _0x3df7df;}function fileAction(_0x1cbfae,_0xb9d44){const _0x2eec38=a3_0x3df7;if(!_0xb9d44)return _0x1cbfae?_0x2eec38(0xeb):_0x2eec38(0x107);return _0x1cbfae?_0x2eec38(0x104):_0x2eec38(0x10c);}export async function generateApiFile(_0x4d720c,_0xb56f55,_0x3311b2,_0x3a3f4e,_0x1ef1e4,_0x4239be,_0x3745fc,_0x2e5527={},_0x58046a={}){const _0x35f2cf=a3_0x3df7;if(!_0x3311b2)throw new Error(_0x35f2cf(0x105)+CLI_BIN_NAME+_0x35f2cf(0xec));const _0x564432=_0x3a3f4e&&!_0x3745fc,_0x56392d=!!_0x58046a[_0x35f2cf(0xdf)],_0x342b14=_0x56392d||_0x564432,_0x4b0bf5=_0x3745fc||_0x3311b2,_0x4cf909=_0x56392d||_0x564432?_0x35f2cf(0x10d):_0x4b0bf5,_0x1872aa=_0x56392d||_0x564432?_0x35f2cf(0xee):JSON['stringify'](_0x4b0bf5),_0x5cd45f=!isProduction(_0x1ef1e4),_0x443c98=_0x5cd45f?_0x35f2cf(0xdc)+JSON[_0x35f2cf(0x106)](_0x1ef1e4):'',_0x24d1c3=_0x35f2cf(0x10b)+_0x1872aa+_0x443c98+_0x35f2cf(0xd3),_0x999485=_0x56392d?'':_0xb56f55,_0x1637bd=_0x999485?_0x999485+_0x35f2cf(0xf4):_0x35f2cf(0xe4),_0x1a6d37=_0x999485?_0x999485+_0x35f2cf(0x10a):_0x35f2cf(0xf9),_0x544ae7=_0x999485&&!/^app-[a-f0-9]+$/i['test'](_0x999485)?_0x999485['replace'](/-/g,'_')[_0x35f2cf(0xfd)]():_0x35f2cf(0xd8),_0x537508=/^\d/['test'](_0x544ae7)?_0x35f2cf(0xf1)+_0x544ae7:_0x544ae7,_0x531378=_0x4d720c[_0x35f2cf(0xf3)](_0xbd998d=>({'datasetCode':_0xbd998d['datasetCode'],'tableName':_0xbd998d['tableName'],'name':_0xbd998d[_0x35f2cf(0xfe)]||'','alias':_0xbd998d['alias']||_0xbd998d[_0x35f2cf(0xd7)]})),_0x5cd8a8=fileURLToPath(import.meta.url),_0x4832a0=a3_0x2d7b27['resolve'](a3_0x2d7b27['dirname'](_0x5cd8a8),'../..'),_0xb1f6ae=a3_0x2d7b27[_0x35f2cf(0xf0)](_0x4832a0,_0x35f2cf(0xe0)),_0x5da74f=a3_0x2d7b27['join'](_0xb1f6ae,_0x35f2cf(0xe2)),_0x5ebc0c=a3_0x2d7b27[_0x35f2cf(0xf0)](_0xb1f6ae,'client.ts.tpl'),_0x3f758d=_0x4239be;mkdirSync(_0x3f758d,{'recursive':!![]});const _0x5dcf93=_0x56392d?{}:_0x2e5527,_0xf5d5c7=await generateSdkConfigFile(_0x3f758d,_0x5dcf93,_0x999485),_0x3af832=a3_0x2d7b27[_0x35f2cf(0xf5)](_0xf5d5c7,'.ts'),_0x419c1c=a3_0x2d7b27[_0x35f2cf(0xf0)](_0x3f758d,_0x1637bd+_0x35f2cf(0xf2)),_0x288007=a3_0x2d7b27[_0x35f2cf(0xf0)](_0x3f758d,_0x1a6d37+_0x35f2cf(0xf2)),_0x24693f=_0x58046a[_0x35f2cf(0xe8)]===!![],_0x579893=existsSync(_0x419c1c),_0xecc596=existsSync(_0x288007),_0x190c3f=_0x58046a['scaffoldMode']??(_0x24693f?_0x35f2cf(0xed):_0x35f2cf(0x107)),_0x582a8f=_0x190c3f==='replace'||_0x190c3f===_0x35f2cf(0x107)&&!_0x579893,_0x4b6769=_0x190c3f===_0x35f2cf(0xed)||_0x190c3f==='missing'&&!_0xecc596,_0x5bad91=_0x58046a['modelProfile']?updateModelRegistry({'outputDir':_0x3f758d,'profileName':_0x58046a[_0x35f2cf(0xdf)][_0x35f2cf(0xfe)],'defaultProfile':_0x58046a[_0x35f2cf(0xdf)][_0x35f2cf(0x102)],'appCode':_0x3311b2,'runtimeDomain':_0x58046a[_0x35f2cf(0xdf)][_0x35f2cf(0xd9)],'models':_0x531378,'allowEmptyReplacement':_0x58046a[_0x35f2cf(0xf7)]===!![]}):undefined,_0x5ace6a=_0x5bad91?a3_0x2d7b27[_0x35f2cf(0xf0)](_0x3f758d,MODEL_RUNTIME_FILE_NAME):undefined,_0x4f8faa=_0x5ace6a?existsSync(_0x5ace6a):![],_0x47574b=_0x56392d&&_0x190c3f!==_0x35f2cf(0x108)?await renderModelRegistryScaffold(_0x3f758d):undefined;_0x5ace6a&&_0x47574b&&writeFileSync(_0x5ace6a,_0x47574b[_0x35f2cf(0xe1)],_0x35f2cf(0xde));const _0x2006ad=_0x531378[0x0]?.[_0x35f2cf(0x10e)];if(_0x582a8f){const _0x49f9b3=_0x47574b?.[_0x35f2cf(0xe4)]??readFileSync(_0x5da74f,_0x35f2cf(0xde)),_0x1c9421=_0x56392d?_0x49f9b3:TemplateReplacer['replaceApiContent'](_0x49f9b3,_0x3311b2,_0x531378,_0x2006ad,_0x1637bd,_0x1872aa,undefined,_0x537508);writeFileSync(_0x419c1c,await a3_0xaf9aed[_0x35f2cf(0xda)](_0x1c9421,{'parser':'typescript'}),{'encoding':'utf8'});}if(_0x4b6769){const _0x350887=_0x47574b?.[_0x35f2cf(0xf9)]??readFileSync(_0x5ebc0c,_0x35f2cf(0xde)),_0x43dde6=_0x56392d?_0x350887:TemplateReplacer[_0x35f2cf(0xf6)](_0x350887,_0x3311b2,_0x531378,_0x2006ad,_0x1637bd,_0x1872aa,_0x24d1c3,_0x537508,_0x3af832);writeFileSync(_0x288007,await a3_0xaf9aed['format'](_0x43dde6,{'parser':'typescript'}),{'encoding':_0x35f2cf(0xde)});}const _0x5d037c=_0x531378[_0x35f2cf(0xe9)],_0x1337d5={'api':{'path':_0x419c1c,'action':fileAction(_0x579893,_0x582a8f)},'client':{'path':_0x288007,'action':fileAction(_0xecc596,_0x4b6769)},'sdkConfig':{'path':_0xf5d5c7,'action':_0x35f2cf(0xfb)},..._0x5bad91?{'modelRegistry':{'path':_0x5bad91['path'],'action':_0x5bad91[_0x35f2cf(0xea)]?_0x35f2cf(0xfb):_0x35f2cf(0x10c)},'modelRuntime':{'path':_0x5ace6a,'action':_0x47574b?_0x4f8faa?_0x35f2cf(0xfb):_0x35f2cf(0x10c):_0x4f8faa?_0x35f2cf(0xeb):_0x35f2cf(0x107)}}:{}},_0x47b259=existsSync(_0x419c1c)&&readFileSync(_0x419c1c,_0x35f2cf(0xde))[_0x35f2cf(0xe5)](MODEL_REGISTRY_FILE_NAME[_0x35f2cf(0xed)]('.ts','')),_0x2bad16=existsSync(_0x288007)&&readFileSync(_0x288007,_0x35f2cf(0xde))['includes'](_0x35f2cf(0x101)),_0x269834=_0x56392d?!_0x47b259||!_0x2bad16||!existsSync(_0x5ace6a):![],_0x53276a=_0x56392d?_0x269834:_0x1337d5[_0x35f2cf(0xe4)][_0x35f2cf(0xfa)]===_0x35f2cf(0xeb)||_0x1337d5['client'][_0x35f2cf(0xfa)]==='preserved';return logger[_0x35f2cf(0xdb)](_0x35f2cf(0xd5),_0x53276a?a3_0x2d7b27[_0x35f2cf(0xf5)](_0xf5d5c7)+'\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.':_0x56392d?'Model\x20facts\x20refreshed.':_0x35f2cf(0xf8),undefined,{'apiFile':_0x419c1c,'clientFile':_0x288007,'sdkConfig':_0xf5d5c7,'modelCount':_0x5d037c,'configName':_0x4cf909,'isDefaultConfig':_0x342b14,'needsAgentMerge':_0x53276a,'needsProjectUpgrade':_0x269834,'files':_0x1337d5}),{'appCode':_0x3311b2,'modelCount':_0x5d037c,'models':_0x531378,'apiFilePath':_0x419c1c,'clientFilePath':_0x288007,'sdkConfigPath':_0xf5d5c7,'modelRegistryPath':_0x5bad91?.['path'],'modelRuntimePath':_0x5ace6a,'modelProfile':_0x58046a[_0x35f2cf(0xdf)]?.[_0x35f2cf(0xfe)],'configName':_0x4cf909,'isDefaultConfig':_0x342b14,'sdkRouting':_0x5dcf93,'files':_0x1337d5,'needsAgentMerge':_0x53276a,'needsProjectUpgrade':_0x269834};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x8533c6=a4_0x574b;function a4_0x574b(_0x4216bf,_0x158e86){_0x4216bf=_0x4216bf-0xad;const _0x3afa5f=a4_0x3afa();let _0x574b41=_0x3afa5f[_0x4216bf];return _0x574b41;}function a4_0x3afa(){const _0x24d527=[',\x0a}','-sdk-config.ts','/**\x0a\x20*\x20Lovrabet\x20SDK\x20runtime\x20routing.\x0a\x20*\x20Generated\x20by\x20Rabetbase\x20CLI.\x20Do\x20not\x20add\x20credentials\x20to\x20this\x20file.\x0a\x20*/\x0aexport\x20const\x20LOVRABET_SDK_CONFIG\x20=\x20','{\x0a\x20\x20','utf8','\x20as\x20const;\x0a','21710315xsltQa','join','1640592dtazIQ','5223475qnLStP','length','stringify','5192079oRSriR','typescript','8443127toIzMy','runtimeDomain:\x20','54tCvhiZ','runtimeDomain','447807zTVkdS','6ERHNxp','1607758SDlDeG','10AOuTep',',\x0a\x20\x20','4DuxScZ','sdk-config.ts'];a4_0x3afa=function(){return _0x24d527;};return a4_0x3afa();}(function(_0x2f7206,_0x52f338){const _0x34c668=a4_0x574b,_0x373e7a=_0x2f7206();while(!![]){try{const _0x2e4ced=parseInt(_0x34c668(0xbc))/0x1+-parseInt(_0x34c668(0xbe))/0x2+parseInt(_0x34c668(0xb6))/0x3*(-parseInt(_0x34c668(0xc1))/0x4)+-parseInt(_0x34c668(0xb3))/0x5*(-parseInt(_0x34c668(0xbd))/0x6)+parseInt(_0x34c668(0xb8))/0x7+parseInt(_0x34c668(0xb2))/0x8*(-parseInt(_0x34c668(0xba))/0x9)+parseInt(_0x34c668(0xbf))/0xa*(parseInt(_0x34c668(0xb0))/0xb);if(_0x2e4ced===_0x52f338)break;else _0x373e7a['push'](_0x373e7a['shift']());}catch(_0x2296b2){_0x373e7a['push'](_0x373e7a['shift']());}}}(a4_0x3afa,0xdd830));import{mkdirSync,writeFileSync}from'node:fs';import a4_0x592a3a from'node:path';import a4_0x281114 from'prettier';export const SDK_CONFIG_FILE_NAME=a4_0x8533c6(0xc2);export function getSdkConfigFileName(_0x247325=''){const _0x25496e=a4_0x8533c6;return _0x247325?_0x247325+_0x25496e(0xc4):SDK_CONFIG_FILE_NAME;}export async function generateSdkConfigFile(_0x471104,_0x30bb3c={},_0x250063=''){const _0x4814de=a4_0x8533c6,_0x3d281e=[];_0x30bb3c[_0x4814de(0xbb)]&&_0x3d281e['push'](_0x4814de(0xb9)+JSON[_0x4814de(0xb5)](_0x30bb3c[_0x4814de(0xbb)]));const _0x13d176=_0x3d281e[_0x4814de(0xb4)]>0x0?_0x4814de(0xad)+_0x3d281e[_0x4814de(0xb1)](_0x4814de(0xc0))+_0x4814de(0xc3):'{}',_0x13d939=_0x4814de(0xc5)+_0x13d176+_0x4814de(0xaf);mkdirSync(_0x471104,{'recursive':!![]});const _0x4ebbb7=a4_0x592a3a[_0x4814de(0xb1)](_0x471104,getSdkConfigFileName(_0x250063));return writeFileSync(_0x4ebbb7,await a4_0x281114['format'](_0x13d939,{'parser':_0x4814de(0xb7)}),_0x4814de(0xae)),_0x4ebbb7;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a5_0x91ae(){const _0x2a8652=['1978350cBHZGR','2562832gPAuET','push','endsWith','10JNbxzM','includes','registerModels','match','208058SSOZBP','lovrabetClient','some','@lovrabet/sdk','map','MODELS_CONFIG','6fLOLiF','test','18655SCZjnb','816EPfoMW','4jqjESR','matchAll','length','APP_CODE','Generated\x20by\x20Rabetbase\x20CLI','1554380KNoxct','replace','17621395zmhbVg','exec','2076147XWOOfU'];a5_0x91ae=function(){return _0x2a8652;};return a5_0x91ae();}function a5_0x2767(_0x2f6307,_0x3b8260){_0x2f6307=_0x2f6307-0xd1;const _0x91aef5=a5_0x91ae();let _0x276783=_0x91aef5[_0x2f6307];return _0x276783;}(function(_0x4c2391,_0x5c0066){const _0x1ab2ed=a5_0x2767,_0x13e79a=_0x4c2391();while(!![]){try{const _0x272719=-parseInt(_0x1ab2ed(0xea))/0x1*(-parseInt(_0x1ab2ed(0xe4))/0x2)+-parseInt(_0x1ab2ed(0xdc))/0x3+-parseInt(_0x1ab2ed(0xd2))/0x4*(parseInt(_0x1ab2ed(0xd7))/0x5)+parseInt(_0x1ab2ed(0xd1))/0x6*(-parseInt(_0x1ab2ed(0xec))/0x7)+-parseInt(_0x1ab2ed(0xdd))/0x8+-parseInt(_0x1ab2ed(0xdb))/0x9+-parseInt(_0x1ab2ed(0xe0))/0xa*(-parseInt(_0x1ab2ed(0xd9))/0xb);if(_0x272719===_0x5c0066)break;else _0x13e79a['push'](_0x13e79a['shift']());}catch(_0x22dfb0){_0x13e79a['push'](_0x13e79a['shift']());}}}(a5_0x91ae,0x5392c));export function parseLegacyApiModels(_0x5a715d){const _0x5cfa21=a5_0x2767,_0x3e1128=[],_0x4755da=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x404ec0;while((_0x404ec0=_0x4755da[_0x5cfa21(0xda)](_0x5a715d))!==null){_0x3e1128[_0x5cfa21(0xde)]({'datasetCode':_0x404ec0[0x1],'tableName':_0x404ec0[0x2],'name':_0x404ec0[0x3],'alias':_0x404ec0[0x4]});}return _0x3e1128;}export function parseLegacyApiAppCode(_0x387d82){const _0x141418=a5_0x2767;return _0x387d82[_0x141418(0xe3)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function stripComments(_0x583724){const _0x4a6fc0=a5_0x2767;return _0x583724['replace'](/\/\*[\s\S]*?\*\//g,'')[_0x4a6fc0(0xd8)](/\/\/.*$/gm,'');}export function isLegacyGeneratedApiScaffold(_0x165eea){const _0x72238a=a5_0x2767;if(!_0x165eea[_0x72238a(0xe1)](_0x72238a(0xd6)))return![];const _0x4ad1fc=stripComments(_0x165eea),_0x54eb92=[..._0x4ad1fc[_0x72238a(0xd3)](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)]['map'](_0x121c47=>_0x121c47[0x1]);if(_0x54eb92[_0x72238a(0xd4)]!==0x1||_0x54eb92[0x0]!==_0x72238a(0xe7))return![];const _0x5cfd16=[..._0x4ad1fc[_0x72238a(0xd3)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)]['map'](_0x1936aa=>_0x1936aa[0x1]);if(_0x5cfd16[_0x72238a(0xd4)]!==0x2||!_0x5cfd16[_0x72238a(0xe6)](_0x204cb9=>_0x204cb9[_0x72238a(0xdf)](_0x72238a(0xd5)))||!_0x5cfd16[_0x72238a(0xe6)](_0x4c8244=>_0x4c8244[_0x72238a(0xdf)](_0x72238a(0xe9))))return![];const _0x273b85=[..._0x4ad1fc[_0x72238a(0xd3)](/^([A-Za-z_$][\w$]*)\s*\(/gm)][_0x72238a(0xe8)](_0x1ac7cd=>_0x1ac7cd[0x1]);return _0x273b85['length']===0x1&&_0x273b85[0x0]===_0x72238a(0xe2);}export function isLegacyGeneratedClientScaffold(_0x33bc73){const _0x491c76=a5_0x2767;if(!_0x33bc73[_0x491c76(0xe1)](_0x491c76(0xd6)))return![];const _0x4c1ad2=stripComments(_0x33bc73),_0x4d2f9c=[..._0x4c1ad2[_0x491c76(0xd3)](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)]['map'](_0x37c6f5=>_0x37c6f5[0x1]);if(_0x4d2f9c[_0x491c76(0xe6)](_0x453515=>_0x453515!==_0x491c76(0xe7)&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/[_0x491c76(0xeb)](_0x453515??'')))return![];const _0x143be0=[..._0x4c1ad2[_0x491c76(0xd3)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x491c76(0xe8)](_0x31de46=>_0x31de46[0x1]);return _0x143be0[_0x491c76(0xd4)]===0x1&&_0x143be0[0x0]===_0x491c76(0xe5);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x31a237=a6_0xc033;(function(_0x2e9391,_0x55be79){const _0x26f37e=a6_0xc033,_0xcc5fe9=_0x2e9391();while(!![]){try{const _0x38f64c=-parseInt(_0x26f37e(0x204))/0x1+parseInt(_0x26f37e(0x1f9))/0x2*(-parseInt(_0x26f37e(0x1d7))/0x3)+parseInt(_0x26f37e(0x1cb))/0x4+-parseInt(_0x26f37e(0x1ef))/0x5+-parseInt(_0x26f37e(0x1d9))/0x6*(-parseInt(_0x26f37e(0x1c8))/0x7)+-parseInt(_0x26f37e(0x1f0))/0x8*(parseInt(_0x26f37e(0x1e1))/0x9)+parseInt(_0x26f37e(0x1cf))/0xa*(parseInt(_0x26f37e(0x1fb))/0xb);if(_0x38f64c===_0x55be79)break;else _0xcc5fe9['push'](_0xcc5fe9['shift']());}catch(_0x5f2030){_0xcc5fe9['push'](_0xcc5fe9['shift']());}}}(a6_0x3e78,0xa5abf));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';function a6_0xc033(_0x37731d,_0x4ea24e){_0x37731d=_0x37731d-0x1bf;const _0x3e786b=a6_0x3e78();let _0xc0335=_0x3e786b[_0x37731d];return _0xc0335;}import a6_0x449bc1 from'node:path';function a6_0x3e78(){const _0x5b6bde=['Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','parse','stringify','runtimeDomain','4692AeQQJZ','push','456618ZyNuWu','\x22\x20with\x20an\x20empty\x20result.\x20','isArray','get','datasetCodes','keys','\x22\x20maps\x20to\x20table\x20\x22','object','123102BOHoZv','defaultProfile','.tmp','includes','join','allowEmptyReplacement','\x22\x20and\x20\x22','length','datasetCode','map','filter','name','lovrabet-model-registry/v1','profileName','373245ugAzfz','296QkEqXl','key','outputDir','split','models','\x22\x20maps\x20to\x20alias\x20\x22','Table\x20\x22','test','entries','1334MJOjbN','\x22\x20maps\x20to\x20both\x20\x22','11HZJMRw','profiles','models.generated.ts','/*\x20rabetbase-model-registry:v2\x20*/','tableName','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','appCode','replace','utf8','48370frtjrg','protocol','model-runtime.ts','/*\x20rabetbase-model-registry:start\x20*/','values','slice','string','value','\x20model(s)\x20in\x20profile\x20\x22','indexOf','now','trim','21YVxRkS','/*\x20rabetbase-model-registry:end\x20*/','alias','753472rgtyuk','NOT-SET','\x22\x20in\x20profile\x20\x22','fromEntries','19342070yyQBPk','set','Refusing\x20to\x20replace\x20'];a6_0x3e78=function(){return _0x5b6bde;};return a6_0x3e78();}export const MODEL_REGISTRY_FILE_NAME=a6_0x31a237(0x1fd);export const MODEL_RUNTIME_FILE_NAME=a6_0x31a237(0x206);export const MODEL_REGISTRY_VERSION_MARKER=a6_0x31a237(0x1fe);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL='lovrabet-model-registry/v2',REGISTRY_START=a6_0x31a237(0x1bf),REGISTRY_END=a6_0x31a237(0x1c9);function emptyRegistry(_0x475a38){return{'defaultProfile':_0x475a38,'profiles':{},'models':[]};}function extractRegistryJson(_0x231aeb){const _0x25c601=a6_0x31a237,_0x52c36e=_0x231aeb[_0x25c601(0x1c5)](REGISTRY_START),_0x464434=_0x231aeb[_0x25c601(0x1c5)](REGISTRY_END);if(_0x52c36e<0x0||_0x464434<=_0x52c36e)return undefined;return _0x231aeb[_0x25c601(0x1c1)](_0x52c36e+REGISTRY_START['length'],_0x464434)[_0x25c601(0x1c7)]()[_0x25c601(0x202)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x25c601(0x202)](/;$/,'');}function migrateLegacyRegistry(_0x4060d8){const _0x49d6e0=a6_0x31a237,_0x382faa=emptyRegistry(_0x4060d8[_0x49d6e0(0x1e2)]);for(const [_0x3304c3,_0x40bcda]of Object[_0x49d6e0(0x1f8)](_0x4060d8[_0x49d6e0(0x1fc)])){_0x382faa['profiles'][_0x3304c3]={'appCode':_0x40bcda[_0x49d6e0(0x201)],'runtimeDomain':_0x40bcda[_0x49d6e0(0x1d6)]},mergeProfileModels(_0x382faa,_0x3304c3,_0x40bcda[_0x49d6e0(0x1f4)]);}return _0x382faa;}function generatedObjectLiteralToJson(_0x201b3a){const _0x36fcf3=a6_0x31a237;let _0x39f415='',_0x45ed4b,_0x165919=![],_0x5d435c;for(let _0x499053=0x0;_0x499053<_0x201b3a['length'];_0x499053++){const _0x4b3069=_0x201b3a[_0x499053];if(_0x45ed4b){_0x39f415+=_0x4b3069;if(_0x165919)_0x165919=![];else{if(_0x4b3069==='\x5c')_0x165919=!![];else{if(_0x4b3069===_0x45ed4b)_0x45ed4b=undefined;}}continue;}if(_0x4b3069==='\x22'){_0x45ed4b=_0x4b3069,_0x39f415+=_0x4b3069,_0x5d435c=_0x36fcf3(0x1c3);continue;}if(_0x4b3069===','){let _0x418db2=_0x499053+0x1;while(/\s/['test'](_0x201b3a[_0x418db2]??''))_0x418db2++;if(_0x201b3a[_0x418db2]==='}'||_0x201b3a[_0x418db2]===']')continue;_0x39f415+=_0x4b3069,_0x5d435c=',';continue;}if(_0x4b3069==='{'||_0x4b3069==='['){_0x39f415+=_0x4b3069,_0x5d435c=_0x4b3069;continue;}if(_0x4b3069==='}'||_0x4b3069===']'){_0x39f415+=_0x4b3069,_0x5d435c=_0x4b3069;continue;}if((_0x5d435c==='{'||_0x5d435c===',')&&/[A-Za-z_$]/[_0x36fcf3(0x1f7)](_0x4b3069)){let _0x51c014=_0x499053+0x1;while(/[A-Za-z0-9_$]/[_0x36fcf3(0x1f7)](_0x201b3a[_0x51c014]??''))_0x51c014++;let _0x1a8867=_0x51c014;while(/\s/['test'](_0x201b3a[_0x1a8867]??''))_0x1a8867++;if(_0x201b3a[_0x1a8867]===':'){_0x39f415+=JSON[_0x36fcf3(0x1d5)](_0x201b3a[_0x36fcf3(0x1c1)](_0x499053,_0x51c014)),_0x499053=_0x51c014-0x1,_0x5d435c=_0x36fcf3(0x1f1);continue;}}_0x39f415+=_0x4b3069;if(!/\s/[_0x36fcf3(0x1f7)](_0x4b3069)&&_0x4b3069!==':')_0x5d435c=_0x36fcf3(0x1c3);}return _0x39f415;}function parseGeneratedRegistryJson(_0x22cf91){const _0xd44b0=a6_0x31a237;try{return JSON[_0xd44b0(0x1d4)](_0x22cf91);}catch{return JSON['parse'](generatedObjectLiteralToJson(_0x22cf91));}}function normalizeModelEntries(_0x2345c0,_0xe304f1){const _0x12edac=a6_0x31a237,_0x165660=Object[_0x12edac(0x1de)](_0x2345c0),_0x2b0a8a=[];for(const _0x6a6d75 of _0xe304f1){if(!_0x6a6d75||typeof _0x6a6d75!==_0x12edac(0x1e0)||Array[_0x12edac(0x1db)](_0x6a6d75))return undefined;const _0x3c1d1c=_0x6a6d75;if(typeof _0x3c1d1c[_0x12edac(0x1ca)]!==_0x12edac(0x1c2)||typeof _0x3c1d1c[_0x12edac(0x1ff)]!==_0x12edac(0x1c2)||typeof _0x3c1d1c[_0x12edac(0x1ec)]!==_0x12edac(0x1c2))return undefined;let _0x190d51;if(typeof _0x3c1d1c[_0x12edac(0x1e9)]===_0x12edac(0x1c2)&&_0x3c1d1c['datasetCodes']===undefined)_0x190d51=Object[_0x12edac(0x1ce)](_0x165660[_0x12edac(0x1ea)](_0x47b0aa=>[_0x47b0aa,_0x3c1d1c['datasetCode']]));else{if(_0x3c1d1c[_0x12edac(0x1e9)]===undefined&&_0x3c1d1c[_0x12edac(0x1dd)]&&typeof _0x3c1d1c[_0x12edac(0x1dd)]==='object'&&!Array[_0x12edac(0x1db)](_0x3c1d1c['datasetCodes'])&&Object[_0x12edac(0x1c0)](_0x3c1d1c[_0x12edac(0x1dd)])['every'](_0x984fad=>typeof _0x984fad===_0x12edac(0x1c2)))_0x190d51={..._0x3c1d1c[_0x12edac(0x1dd)]};else return undefined;}_0x2b0a8a[_0x12edac(0x1d8)]({'alias':_0x3c1d1c[_0x12edac(0x1ca)],'tableName':_0x3c1d1c[_0x12edac(0x1ff)],'name':_0x3c1d1c[_0x12edac(0x1ec)],'datasetCodes':_0x190d51});}return _0x2b0a8a;}export function parseModelRegistry(_0x63f760){const _0x2d59d5=a6_0x31a237,_0x349b5f=extractRegistryJson(_0x63f760);if(!_0x349b5f)return undefined;try{const _0x117d96=parseGeneratedRegistryJson(_0x349b5f);if(typeof _0x117d96[_0x2d59d5(0x1e2)]!==_0x2d59d5(0x1c2)||!_0x117d96['profiles']||typeof _0x117d96[_0x2d59d5(0x1fc)]!=='object')return undefined;if(_0x117d96[_0x2d59d5(0x205)]===_0x2d59d5(0x1ed))return migrateLegacyRegistry(_0x117d96);if(!(_0x117d96[_0x2d59d5(0x205)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x117d96[_0x2d59d5(0x205)]===undefined&&_0x63f760[_0x2d59d5(0x1e4)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x2d59d5(0x1db)](_0x117d96[_0x2d59d5(0x1f4)]))return undefined;const _0x172c75=_0x117d96[_0x2d59d5(0x1fc)],_0x5b2bf3=normalizeModelEntries(_0x172c75,_0x117d96[_0x2d59d5(0x1f4)]);if(!_0x5b2bf3)return undefined;return{'defaultProfile':_0x117d96[_0x2d59d5(0x1e2)],'profiles':_0x172c75,'models':_0x5b2bf3};}catch{return undefined;}}export function readModelRegistry(_0x3e389d){const _0x1af49f=a6_0x31a237;if(!existsSync(_0x3e389d))return undefined;try{return parseModelRegistry(readFileSync(_0x3e389d,_0x1af49f(0x203)));}catch{return undefined;}}function registrySource(_0x5632b9){const _0x41e819=a6_0x31a237,_0x14f8e0=Object[_0x41e819(0x1de)](_0x5632b9[_0x41e819(0x1fc)]),_0x194ce8=_0x5632b9[_0x41e819(0x1f4)][_0x41e819(0x1ea)](_0x57cb66=>{const _0x4a31ca=_0x41e819,_0x412339=_0x14f8e0[_0x4a31ca(0x1ea)](_0x2644a6=>_0x57cb66['datasetCodes'][_0x2644a6]),_0x227073=_0x412339[0x0],_0x2ed73e=_0x227073!==undefined&&_0x412339['every'](_0x4d1401=>_0x4d1401===_0x227073),_0x2b7d16={'alias':_0x57cb66[_0x4a31ca(0x1ca)],'tableName':_0x57cb66[_0x4a31ca(0x1ff)],'name':_0x57cb66[_0x4a31ca(0x1ec)]};return _0x2ed73e?{..._0x2b7d16,'datasetCode':_0x227073}:{..._0x2b7d16,'datasetCodes':_0x57cb66[_0x4a31ca(0x1dd)]};}),_0x42b5a2=JSON[_0x41e819(0x1d5)]({'defaultProfile':_0x5632b9['defaultProfile'],'profiles':_0x5632b9[_0x41e819(0x1fc)],'models':_0x194ce8},null,0x2)[_0x41e819(0x1f3)]('\x0a')['map'](_0x39fdb9=>'\x20\x20'+_0x39fdb9)['join']('\x0a');return'/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a'+MODEL_REGISTRY_VERSION_MARKER+'\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20'+REGISTRY_START+'\x0a'+_0x42b5a2+'\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a'+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x3a3e39,_0x474095,_0x137c6c){const _0x591839=a6_0x31a237,_0x5678e6=_0x137c6c[_0x591839(0x1ea)](_0x4e8e59=>({..._0x4e8e59,'alias':_0x4e8e59['alias']||_0x4e8e59[_0x591839(0x1ff)]})),_0x2b38c0=new Map(),_0x2e33a1=new Map();for(const _0x40fdf2 of _0x5678e6){const _0x4ccbb0=_0x2b38c0[_0x591839(0x1dc)](_0x40fdf2[_0x591839(0x1ca)]);if(_0x4ccbb0&&_0x4ccbb0!==_0x40fdf2[_0x591839(0x1ff)])throw new Error('Model\x20alias\x20\x22'+_0x40fdf2['alias']+_0x591839(0x1fa)+_0x4ccbb0+_0x591839(0x1e7)+_0x40fdf2[_0x591839(0x1ff)]+_0x591839(0x1cd)+_0x474095+'\x22.');const _0x4f553e=_0x2e33a1[_0x591839(0x1dc)](_0x40fdf2[_0x591839(0x1ff)]);if(_0x4f553e&&_0x4f553e!==_0x40fdf2[_0x591839(0x1ca)])throw new Error(_0x591839(0x1f6)+_0x40fdf2[_0x591839(0x1ff)]+_0x591839(0x1d3)+_0x4f553e+_0x591839(0x1e7)+_0x40fdf2['alias']+_0x591839(0x1cd)+_0x474095+'\x22.');_0x2b38c0['set'](_0x40fdf2[_0x591839(0x1ca)],_0x40fdf2[_0x591839(0x1ff)]),_0x2e33a1[_0x591839(0x1d0)](_0x40fdf2[_0x591839(0x1ff)],_0x40fdf2[_0x591839(0x1ca)]);const _0x11fccc=_0x3a3e39[_0x591839(0x1f4)]['find'](_0x2d9485=>_0x2d9485[_0x591839(0x1ca)]===_0x40fdf2[_0x591839(0x1ca)]);if(_0x11fccc&&_0x11fccc[_0x591839(0x1ff)]!==_0x40fdf2[_0x591839(0x1ff)])throw new Error('Model\x20alias\x20\x22'+_0x40fdf2[_0x591839(0x1ca)]+_0x591839(0x1df)+_0x11fccc[_0x591839(0x1ff)]+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x40fdf2['tableName']+'\x22\x20in\x20profile\x20\x22'+_0x474095+'\x22.');const _0x336096=_0x3a3e39[_0x591839(0x1f4)]['find'](_0x12e6bc=>_0x12e6bc[_0x591839(0x1ff)]===_0x40fdf2['tableName']);if(_0x336096&&_0x336096['alias']!==_0x40fdf2['alias'])throw new Error(_0x591839(0x1f6)+_0x40fdf2[_0x591839(0x1ff)]+_0x591839(0x1f5)+_0x336096['alias']+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x40fdf2[_0x591839(0x1ca)]+_0x591839(0x1cd)+_0x474095+'\x22.');}for(const _0x40505d of _0x3a3e39['models']){delete _0x40505d['datasetCodes'][_0x474095];}for(const _0x48b9ce of _0x5678e6){let _0xff5417=_0x3a3e39[_0x591839(0x1f4)]['find'](_0x3eee12=>_0x3eee12[_0x591839(0x1ca)]===_0x48b9ce[_0x591839(0x1ca)]);!_0xff5417&&(_0xff5417={'alias':_0x48b9ce[_0x591839(0x1ca)],'tableName':_0x48b9ce[_0x591839(0x1ff)],'name':_0x48b9ce[_0x591839(0x1ec)],'datasetCodes':{}},_0x3a3e39['models'][_0x591839(0x1d8)](_0xff5417)),(_0x474095===_0x3a3e39[_0x591839(0x1e2)]||!_0xff5417['datasetCodes'][_0x3a3e39[_0x591839(0x1e2)]])&&(_0xff5417[_0x591839(0x1ca)]=_0x48b9ce[_0x591839(0x1ca)],_0xff5417[_0x591839(0x1ff)]=_0x48b9ce[_0x591839(0x1ff)],_0xff5417[_0x591839(0x1ec)]=_0x48b9ce[_0x591839(0x1ec)]),_0xff5417[_0x591839(0x1dd)][_0x474095]=_0x48b9ce['datasetCode'];}_0x3a3e39[_0x591839(0x1f4)]=_0x3a3e39[_0x591839(0x1f4)]['filter'](_0x219a36=>Object[_0x591839(0x1de)](_0x219a36['datasetCodes'])[_0x591839(0x1e8)]>0x0);}function removeUnboundProfiles(_0x504043){const _0x3f24d4=a6_0x31a237,_0x3ee62f=Object[_0x3f24d4(0x1f8)](_0x504043[_0x3f24d4(0x1fc)])[_0x3f24d4(0x1eb)](([,_0x2d1fec])=>_0x2d1fec['appCode']===_0x3f24d4(0x1cc))[_0x3f24d4(0x1ea)](([_0x425177])=>_0x425177);if(_0x3ee62f[_0x3f24d4(0x1e8)]===0x0)return;for(const _0x2b6ff2 of _0x3ee62f){delete _0x504043['profiles'][_0x2b6ff2];for(const _0x23d79a of _0x504043['models']){delete _0x23d79a[_0x3f24d4(0x1dd)][_0x2b6ff2];}}_0x504043[_0x3f24d4(0x1f4)]=_0x504043[_0x3f24d4(0x1f4)][_0x3f24d4(0x1eb)](_0x574f8c=>Object[_0x3f24d4(0x1de)](_0x574f8c[_0x3f24d4(0x1dd)])[_0x3f24d4(0x1e8)]>0x0);}export function getProfileModels(_0x2a4e6d,_0x39154d){return _0x2a4e6d['models']['flatMap'](_0x2f5b98=>{const _0x22213c=a6_0xc033,_0x57c8bb=_0x2f5b98[_0x22213c(0x1dd)][_0x39154d];return _0x57c8bb?[{'datasetCode':_0x57c8bb,'tableName':_0x2f5b98[_0x22213c(0x1ff)],'name':_0x2f5b98[_0x22213c(0x1ec)],'alias':_0x2f5b98[_0x22213c(0x1ca)]}]:[];});}export function updateModelRegistry(_0x4f2f56){const _0x4285b9=a6_0x31a237,_0x2aba51=a6_0x449bc1[_0x4285b9(0x1e5)](_0x4f2f56[_0x4285b9(0x1f2)],MODEL_REGISTRY_FILE_NAME),_0x4e0b95=existsSync(_0x2aba51),_0x3384b0=readModelRegistry(_0x2aba51);if(_0x4e0b95&&!_0x3384b0)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x4285b9(0x200));const _0x652e38=_0x3384b0??emptyRegistry(_0x4f2f56['defaultProfile']);if(_0x4f2f56['appCode']!==_0x4285b9(0x1cc))removeUnboundProfiles(_0x652e38);const _0x2001cc=_0x3384b0?getProfileModels(_0x3384b0,_0x4f2f56[_0x4285b9(0x1ee)])[_0x4285b9(0x1e8)]:0x0;if(_0x2001cc>0x0&&_0x4f2f56[_0x4285b9(0x1f4)][_0x4285b9(0x1e8)]===0x0&&!_0x4f2f56[_0x4285b9(0x1e6)])throw new Error(_0x4285b9(0x1d1)+_0x2001cc+_0x4285b9(0x1c4)+_0x4f2f56['profileName']+_0x4285b9(0x1da)+_0x4285b9(0x1d2));_0x652e38[_0x4285b9(0x1e2)]=_0x4f2f56['defaultProfile'],_0x652e38[_0x4285b9(0x1fc)][_0x4f2f56[_0x4285b9(0x1ee)]]={'appCode':_0x4f2f56[_0x4285b9(0x201)],'runtimeDomain':_0x4f2f56[_0x4285b9(0x1d6)]},mergeProfileModels(_0x652e38,_0x4f2f56['profileName'],_0x4f2f56[_0x4285b9(0x1f4)]),mkdirSync(_0x4f2f56['outputDir'],{'recursive':!![]});const _0x3a0f15=_0x2aba51+'.'+process['pid']+'.'+Date[_0x4285b9(0x1c6)]()+_0x4285b9(0x1e3);try{writeFileSync(_0x3a0f15,registrySource(_0x652e38),{'encoding':_0x4285b9(0x203),'mode':0x1a4}),renameSync(_0x3a0f15,_0x2aba51);}catch(_0x1311ca){try{unlinkSync(_0x3a0f15);}catch{}throw _0x1311ca;}return{'path':_0x2aba51,'registry':_0x652e38,'existed':_0x4e0b95};}
|
|
1
|
+
const a6_0x412794=a6_0x397a;(function(_0x29ba55,_0x3b6b2f){const _0x4968c0=a6_0x397a,_0x4da6dd=_0x29ba55();while(!![]){try{const _0x30607=parseInt(_0x4968c0(0x12d))/0x1+-parseInt(_0x4968c0(0x113))/0x2+parseInt(_0x4968c0(0x14e))/0x3+parseInt(_0x4968c0(0x11c))/0x4*(-parseInt(_0x4968c0(0x107))/0x5)+-parseInt(_0x4968c0(0x122))/0x6+-parseInt(_0x4968c0(0x146))/0x7+parseInt(_0x4968c0(0x13d))/0x8;if(_0x30607===_0x3b6b2f)break;else _0x4da6dd['push'](_0x4da6dd['shift']());}catch(_0x3686b7){_0x4da6dd['push'](_0x4da6dd['shift']());}}}(a6_0x262c,0x669b1));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x27d1b8 from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0x412794(0x14c);export const MODEL_RUNTIME_FILE_NAME='model-runtime.ts';export const MODEL_REGISTRY_VERSION_MARKER=a6_0x412794(0x12e);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL=a6_0x412794(0x13a),REGISTRY_START=a6_0x412794(0x140),REGISTRY_END=a6_0x412794(0x10a);function emptyRegistry(_0x6d8743){return{'defaultProfile':_0x6d8743,'profiles':{},'models':[]};}function extractRegistryJson(_0xd2409){const _0x408281=a6_0x412794,_0x310f25=_0xd2409[_0x408281(0x110)](REGISTRY_START),_0x5999fb=_0xd2409[_0x408281(0x110)](REGISTRY_END);if(_0x310f25<0x0||_0x5999fb<=_0x310f25)return undefined;return _0xd2409[_0x408281(0x148)](_0x310f25+REGISTRY_START[_0x408281(0x132)],_0x5999fb)[_0x408281(0x145)]()['replace'](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x408281(0x12c)](/;$/,'');}function migrateLegacyRegistry(_0x3f9225){const _0x57b0d5=a6_0x412794,_0x266bbc=emptyRegistry(_0x3f9225[_0x57b0d5(0x10d)]);for(const [_0x53c2e4,_0x526107]of Object[_0x57b0d5(0x124)](_0x3f9225[_0x57b0d5(0x143)])){_0x266bbc[_0x57b0d5(0x143)][_0x53c2e4]={'appCode':_0x526107[_0x57b0d5(0x125)],'runtimeDomain':_0x526107[_0x57b0d5(0x14a)]},mergeProfileModels(_0x266bbc,_0x53c2e4,_0x526107['models']);}return _0x266bbc;}function generatedObjectLiteralToJson(_0x1c4e91){const _0x3eb8f5=a6_0x412794;let _0x137ee9='',_0x82d402,_0x5c7ca1=![],_0x2ff1be;for(let _0x50c31f=0x0;_0x50c31f<_0x1c4e91[_0x3eb8f5(0x132)];_0x50c31f++){const _0xc433ee=_0x1c4e91[_0x50c31f];if(_0x82d402){_0x137ee9+=_0xc433ee;if(_0x5c7ca1)_0x5c7ca1=![];else{if(_0xc433ee==='\x5c')_0x5c7ca1=!![];else{if(_0xc433ee===_0x82d402)_0x82d402=undefined;}}continue;}if(_0xc433ee==='\x22'){_0x82d402=_0xc433ee,_0x137ee9+=_0xc433ee,_0x2ff1be=_0x3eb8f5(0x129);continue;}if(_0xc433ee===','){let _0x3c09fa=_0x50c31f+0x1;while(/\s/[_0x3eb8f5(0x109)](_0x1c4e91[_0x3c09fa]??''))_0x3c09fa++;if(_0x1c4e91[_0x3c09fa]==='}'||_0x1c4e91[_0x3c09fa]===']')continue;_0x137ee9+=_0xc433ee,_0x2ff1be=',';continue;}if(_0xc433ee==='{'||_0xc433ee==='['){_0x137ee9+=_0xc433ee,_0x2ff1be=_0xc433ee;continue;}if(_0xc433ee==='}'||_0xc433ee===']'){_0x137ee9+=_0xc433ee,_0x2ff1be=_0xc433ee;continue;}if((_0x2ff1be==='{'||_0x2ff1be===',')&&/[A-Za-z_$]/['test'](_0xc433ee)){let _0x174ae5=_0x50c31f+0x1;while(/[A-Za-z0-9_$]/[_0x3eb8f5(0x109)](_0x1c4e91[_0x174ae5]??''))_0x174ae5++;let _0x95d515=_0x174ae5;while(/\s/['test'](_0x1c4e91[_0x95d515]??''))_0x95d515++;if(_0x1c4e91[_0x95d515]===':'){_0x137ee9+=JSON[_0x3eb8f5(0x12f)](_0x1c4e91['slice'](_0x50c31f,_0x174ae5)),_0x50c31f=_0x174ae5-0x1,_0x2ff1be=_0x3eb8f5(0x13b);continue;}}_0x137ee9+=_0xc433ee;if(!/\s/[_0x3eb8f5(0x109)](_0xc433ee)&&_0xc433ee!==':')_0x2ff1be='value';}return _0x137ee9;}function parseGeneratedRegistryJson(_0x1e3609){const _0x5f2d5e=a6_0x412794;try{return JSON[_0x5f2d5e(0x115)](_0x1e3609);}catch{return JSON['parse'](generatedObjectLiteralToJson(_0x1e3609));}}function normalizeModelEntries(_0x3c9060,_0x4ebb79){const _0x32be1c=a6_0x412794,_0xb3fbc2=Object['keys'](_0x3c9060),_0x77abf7=[];for(const _0x3c1e04 of _0x4ebb79){if(!_0x3c1e04||typeof _0x3c1e04!==_0x32be1c(0x147)||Array[_0x32be1c(0x11d)](_0x3c1e04))return undefined;const _0x3ed70f=_0x3c1e04;if(typeof _0x3ed70f[_0x32be1c(0x112)]!==_0x32be1c(0x10f)||typeof _0x3ed70f[_0x32be1c(0x14f)]!=='string'||typeof _0x3ed70f[_0x32be1c(0x119)]!==_0x32be1c(0x10f))return undefined;let _0x51b8a3;if(typeof _0x3ed70f['datasetCode']==='string'&&_0x3ed70f[_0x32be1c(0x118)]===undefined)_0x51b8a3=Object['fromEntries'](_0xb3fbc2[_0x32be1c(0x108)](_0x4a03d3=>[_0x4a03d3,_0x3ed70f['datasetCode']]));else{if(_0x3ed70f[_0x32be1c(0x139)]===undefined&&_0x3ed70f[_0x32be1c(0x118)]&&typeof _0x3ed70f[_0x32be1c(0x118)]===_0x32be1c(0x147)&&!Array[_0x32be1c(0x11d)](_0x3ed70f[_0x32be1c(0x118)])&&Object[_0x32be1c(0x137)](_0x3ed70f[_0x32be1c(0x118)])[_0x32be1c(0x133)](_0x2d87f1=>typeof _0x2d87f1==='string'))_0x51b8a3={..._0x3ed70f[_0x32be1c(0x118)]};else return undefined;}_0x77abf7['push']({'alias':_0x3ed70f[_0x32be1c(0x112)],'tableName':_0x3ed70f['tableName'],'name':_0x3ed70f[_0x32be1c(0x119)],'datasetCodes':_0x51b8a3});}return _0x77abf7;}function a6_0x262c(){const _0x3d2e48=['596829xhWzIm','tableName','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','8185tAwEFu','map','test','/*\x20rabetbase-model-registry:end\x20*/','\x22\x20maps\x20to\x20alias\x20\x22','find','defaultProfile','.tmp','string','indexOf','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','alias','1144598OJLHRe','utf8','parse','protocol','/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a','datasetCodes','name','now','profileName','740mOixTx','isArray','models','\x20model(s)\x20in\x20profile\x20\x22','Model\x20alias\x20\x22','includes','1642992hyWBtP','join','entries','appCode','lovrabet-model-registry/v1','get','set','value','filter','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','replace','482717jiKgOT','/*\x20rabetbase-model-registry:v2\x20*/','stringify','\x22\x20in\x20the\x20registry\x20but\x20\x22','pid','length','every','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','NOT-SET','\x22\x20maps\x20to\x20both\x20\x22','values','allowEmptyReplacement','datasetCode','lovrabet-model-registry/v2','key','Table\x20\x22','8130176CYxhyw','outputDir','\x22\x20and\x20\x22','/*\x20rabetbase-model-registry:start\x20*/','flatMap','\x22\x20in\x20profile\x20\x22','profiles','Refusing\x20to\x20replace\x20','trim','900781YSxutX','object','slice','\x22\x20maps\x20to\x20table\x20\x22','runtimeDomain','keys','models.generated.ts','push'];a6_0x262c=function(){return _0x3d2e48;};return a6_0x262c();}export function parseModelRegistry(_0x25e3f5){const _0x46f766=a6_0x412794,_0x38c917=extractRegistryJson(_0x25e3f5);if(!_0x38c917)return undefined;try{const _0x3602b7=parseGeneratedRegistryJson(_0x38c917);if(typeof _0x3602b7['defaultProfile']!=='string'||!_0x3602b7[_0x46f766(0x143)]||typeof _0x3602b7[_0x46f766(0x143)]!==_0x46f766(0x147))return undefined;if(_0x3602b7[_0x46f766(0x116)]===_0x46f766(0x126))return migrateLegacyRegistry(_0x3602b7);if(!(_0x3602b7[_0x46f766(0x116)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x3602b7['protocol']===undefined&&_0x25e3f5[_0x46f766(0x121)](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x46f766(0x11d)](_0x3602b7[_0x46f766(0x11e)]))return undefined;const _0x2181ce=_0x3602b7[_0x46f766(0x143)],_0x263cb9=normalizeModelEntries(_0x2181ce,_0x3602b7[_0x46f766(0x11e)]);if(!_0x263cb9)return undefined;return{'defaultProfile':_0x3602b7['defaultProfile'],'profiles':_0x2181ce,'models':_0x263cb9};}catch{return undefined;}}export function readModelRegistry(_0x1445da){const _0x342b68=a6_0x412794;if(!existsSync(_0x1445da))return undefined;try{return parseModelRegistry(readFileSync(_0x1445da,_0x342b68(0x114)));}catch{return undefined;}}function registrySource(_0x346f78){const _0x68d5d3=a6_0x412794,_0x127312=Object[_0x68d5d3(0x14b)](_0x346f78[_0x68d5d3(0x143)]),_0x55f025=_0x346f78['models'][_0x68d5d3(0x108)](_0x3e587a=>{const _0x2a214d=_0x68d5d3,_0x5e35d2=_0x127312['map'](_0x458c90=>_0x3e587a[_0x2a214d(0x118)][_0x458c90]),_0x144311=_0x5e35d2[0x0],_0x6ebda0=_0x144311!==undefined&&_0x5e35d2[_0x2a214d(0x133)](_0x4785f7=>_0x4785f7===_0x144311),_0x371bf7={'alias':_0x3e587a[_0x2a214d(0x112)],'tableName':_0x3e587a[_0x2a214d(0x14f)],'name':_0x3e587a[_0x2a214d(0x119)]};return _0x6ebda0?{..._0x371bf7,'datasetCode':_0x144311}:{..._0x371bf7,'datasetCodes':_0x3e587a[_0x2a214d(0x118)]};}),_0x4850d1=JSON[_0x68d5d3(0x12f)]({'defaultProfile':_0x346f78['defaultProfile'],'profiles':_0x346f78[_0x68d5d3(0x143)],'models':_0x55f025},null,0x2)['split']('\x0a')['map'](_0x2eeb9c=>'\x20\x20'+_0x2eeb9c)['join']('\x0a');return _0x68d5d3(0x117)+MODEL_REGISTRY_VERSION_MARKER+'\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20'+REGISTRY_START+'\x0a'+_0x4850d1+_0x68d5d3(0x134)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x32fdb5,_0x3e59d2,_0x5855f0){const _0x6c1340=a6_0x412794,_0x21afba=_0x5855f0[_0x6c1340(0x108)](_0xaac886=>({..._0xaac886,'alias':_0xaac886[_0x6c1340(0x112)]||_0xaac886[_0x6c1340(0x14f)]})),_0x418a0b=new Map(),_0x2b9bed=new Map();for(const _0x4d10bc of _0x21afba){const _0x1d62c6=_0x418a0b['get'](_0x4d10bc['alias']);if(_0x1d62c6&&_0x1d62c6!==_0x4d10bc[_0x6c1340(0x14f)])throw new Error('Model\x20alias\x20\x22'+_0x4d10bc[_0x6c1340(0x112)]+_0x6c1340(0x136)+_0x1d62c6+_0x6c1340(0x13f)+_0x4d10bc[_0x6c1340(0x14f)]+'\x22\x20in\x20profile\x20\x22'+_0x3e59d2+'\x22.');const _0x165031=_0x2b9bed[_0x6c1340(0x127)](_0x4d10bc['tableName']);if(_0x165031&&_0x165031!==_0x4d10bc['alias'])throw new Error('Table\x20\x22'+_0x4d10bc[_0x6c1340(0x14f)]+_0x6c1340(0x150)+_0x165031+_0x6c1340(0x13f)+_0x4d10bc[_0x6c1340(0x112)]+_0x6c1340(0x142)+_0x3e59d2+'\x22.');_0x418a0b[_0x6c1340(0x128)](_0x4d10bc[_0x6c1340(0x112)],_0x4d10bc[_0x6c1340(0x14f)]),_0x2b9bed[_0x6c1340(0x128)](_0x4d10bc[_0x6c1340(0x14f)],_0x4d10bc[_0x6c1340(0x112)]);const _0x2dbced=_0x32fdb5['models'][_0x6c1340(0x10c)](_0x2fd3a5=>_0x2fd3a5[_0x6c1340(0x112)]===_0x4d10bc[_0x6c1340(0x112)]);if(_0x2dbced&&_0x2dbced[_0x6c1340(0x14f)]!==_0x4d10bc[_0x6c1340(0x14f)])throw new Error(_0x6c1340(0x120)+_0x4d10bc[_0x6c1340(0x112)]+_0x6c1340(0x149)+_0x2dbced[_0x6c1340(0x14f)]+_0x6c1340(0x130)+_0x4d10bc[_0x6c1340(0x14f)]+_0x6c1340(0x142)+_0x3e59d2+'\x22.');const _0x28f7d1=_0x32fdb5[_0x6c1340(0x11e)][_0x6c1340(0x10c)](_0x1167b3=>_0x1167b3['tableName']===_0x4d10bc[_0x6c1340(0x14f)]);if(_0x28f7d1&&_0x28f7d1['alias']!==_0x4d10bc[_0x6c1340(0x112)])throw new Error(_0x6c1340(0x13c)+_0x4d10bc[_0x6c1340(0x14f)]+_0x6c1340(0x10b)+_0x28f7d1[_0x6c1340(0x112)]+_0x6c1340(0x130)+_0x4d10bc['alias']+'\x22\x20in\x20profile\x20\x22'+_0x3e59d2+'\x22.');}for(const _0x4d094f of _0x32fdb5[_0x6c1340(0x11e)]){delete _0x4d094f['datasetCodes'][_0x3e59d2];}for(const _0x4e767f of _0x21afba){let _0x4e48d7=_0x32fdb5[_0x6c1340(0x11e)][_0x6c1340(0x10c)](_0x238f2c=>_0x238f2c[_0x6c1340(0x112)]===_0x4e767f['alias']);!_0x4e48d7&&(_0x4e48d7={'alias':_0x4e767f['alias'],'tableName':_0x4e767f[_0x6c1340(0x14f)],'name':_0x4e767f[_0x6c1340(0x119)],'datasetCodes':{}},_0x32fdb5['models'][_0x6c1340(0x14d)](_0x4e48d7)),(_0x3e59d2===_0x32fdb5[_0x6c1340(0x10d)]||!_0x4e48d7['datasetCodes'][_0x32fdb5['defaultProfile']])&&(_0x4e48d7[_0x6c1340(0x112)]=_0x4e767f[_0x6c1340(0x112)],_0x4e48d7[_0x6c1340(0x14f)]=_0x4e767f[_0x6c1340(0x14f)],_0x4e48d7['name']=_0x4e767f[_0x6c1340(0x119)]),_0x4e48d7[_0x6c1340(0x118)][_0x3e59d2]=_0x4e767f[_0x6c1340(0x139)];}_0x32fdb5[_0x6c1340(0x11e)]=_0x32fdb5[_0x6c1340(0x11e)][_0x6c1340(0x12a)](_0xfa123c=>Object[_0x6c1340(0x14b)](_0xfa123c[_0x6c1340(0x118)])[_0x6c1340(0x132)]>0x0);}function a6_0x397a(_0xbebf70,_0x3f4c83){_0xbebf70=_0xbebf70-0x107;const _0x262c8d=a6_0x262c();let _0x397ae7=_0x262c8d[_0xbebf70];return _0x397ae7;}function removeUnboundProfiles(_0x40b3e6){const _0x797b20=a6_0x412794,_0x210085=Object['entries'](_0x40b3e6[_0x797b20(0x143)])[_0x797b20(0x12a)](([,_0x590933])=>_0x590933['appCode']===_0x797b20(0x135))['map'](([_0x4b31e4])=>_0x4b31e4);if(_0x210085[_0x797b20(0x132)]===0x0)return;for(const _0x2bea8c of _0x210085){delete _0x40b3e6[_0x797b20(0x143)][_0x2bea8c];for(const _0x57a494 of _0x40b3e6['models']){delete _0x57a494[_0x797b20(0x118)][_0x2bea8c];}}_0x40b3e6[_0x797b20(0x11e)]=_0x40b3e6[_0x797b20(0x11e)][_0x797b20(0x12a)](_0x5f381f=>Object[_0x797b20(0x14b)](_0x5f381f[_0x797b20(0x118)])[_0x797b20(0x132)]>0x0);}export function getProfileModels(_0x1cbcaf,_0x48ef0b){const _0xccad85=a6_0x412794;return _0x1cbcaf[_0xccad85(0x11e)][_0xccad85(0x141)](_0x4bd05b=>{const _0x10fd84=_0xccad85,_0x447ffd=_0x4bd05b[_0x10fd84(0x118)][_0x48ef0b];return _0x447ffd?[{'datasetCode':_0x447ffd,'tableName':_0x4bd05b[_0x10fd84(0x14f)],'name':_0x4bd05b['name'],'alias':_0x4bd05b['alias']}]:[];});}export function updateModelRegistry(_0x590b74){const _0x33eddc=a6_0x412794,_0xb1be8e=a6_0x27d1b8[_0x33eddc(0x123)](_0x590b74[_0x33eddc(0x13e)],MODEL_REGISTRY_FILE_NAME),_0x43218a=existsSync(_0xb1be8e),_0x182ccf=readModelRegistry(_0xb1be8e);if(_0x43218a&&!_0x182ccf)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x33eddc(0x12b));const _0x15fa0c=_0x182ccf??emptyRegistry(_0x590b74[_0x33eddc(0x10d)]);if(_0x590b74[_0x33eddc(0x125)]!==_0x33eddc(0x135))removeUnboundProfiles(_0x15fa0c);const _0x348305=_0x182ccf?getProfileModels(_0x182ccf,_0x590b74[_0x33eddc(0x11b)])[_0x33eddc(0x132)]:0x0;if(_0x348305>0x0&&_0x590b74['models'][_0x33eddc(0x132)]===0x0&&!_0x590b74[_0x33eddc(0x138)])throw new Error(_0x33eddc(0x144)+_0x348305+_0x33eddc(0x11f)+_0x590b74[_0x33eddc(0x11b)]+'\x22\x20with\x20an\x20empty\x20result.\x20'+_0x33eddc(0x111));_0x15fa0c[_0x33eddc(0x10d)]=_0x590b74[_0x33eddc(0x10d)],_0x15fa0c[_0x33eddc(0x143)][_0x590b74[_0x33eddc(0x11b)]]={'appCode':_0x590b74[_0x33eddc(0x125)],'runtimeDomain':_0x590b74['runtimeDomain']},mergeProfileModels(_0x15fa0c,_0x590b74[_0x33eddc(0x11b)],_0x590b74[_0x33eddc(0x11e)]),mkdirSync(_0x590b74[_0x33eddc(0x13e)],{'recursive':!![]});const _0x1f832e=_0xb1be8e+'.'+process[_0x33eddc(0x131)]+'.'+Date[_0x33eddc(0x11a)]()+_0x33eddc(0x10e);try{writeFileSync(_0x1f832e,registrySource(_0x15fa0c),{'encoding':_0x33eddc(0x114),'mode':0x1a4}),renameSync(_0x1f832e,_0xb1be8e);}catch(_0x17d7ac){try{unlinkSync(_0x1f832e);}catch{}throw _0x17d7ac;}return{'path':_0xb1be8e,'registry':_0x15fa0c,'existed':_0x43218a};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a7_0x835f58=a7_0x5975;(function(_0x359f03,_0x548ac9){const _0x3f6e2c=a7_0x5975,_0x358f90=_0x359f03();while(!![]){try{const _0x5a6de2=-parseInt(_0x3f6e2c(0x12f))/0x1+-parseInt(_0x3f6e2c(0x12e))/0x2*(-parseInt(_0x3f6e2c(0x11c))/0x3)+-parseInt(_0x3f6e2c(0x122))/0x4*(-parseInt(_0x3f6e2c(0x12c))/0x5)+-parseInt(_0x3f6e2c(0x120))/0x6*(parseInt(_0x3f6e2c(0x127))/0x7)+-parseInt(_0x3f6e2c(0x11d))/0x8+parseInt(_0x3f6e2c(0x11b))/0x9+parseInt(_0x3f6e2c(0x125))/0xa;if(_0x5a6de2===_0x548ac9)break;else _0x358f90['push'](_0x358f90['shift']());}catch(_0x31171b){_0x358f90['push'](_0x358f90['shift']());}}}(a7_0x18e6,0x28170));import{readFileSync}from'node:fs';import a7_0x12fb4c from'node:path';import{fileURLToPath}from'node:url';import a7_0xf5d2ea from'prettier';function a7_0x5975(_0x548d4d,_0x519470){_0x548d4d=_0x548d4d-0x119;const _0x18e6e4=a7_0x18e6();let _0x5975f0=_0x18e6e4[_0x548d4d];return _0x5975f0;}function a7_0x18e6(){const _0x5b37ca=['utf8','188ORIPyH','join','relative','3795680kCRtJk','cwd','1340738CjvmrX','profile-api.ts.tpl','typescript','resolve','startsWith','1185BTYIup','profile-client.ts.tpl','6172YyVGTR','108807mVGZXo','replace','format','435807vDuOfI','303caczuh','2290136aitgKC','{ProjectRoutingImport}','../../templates/generate-api','6fFuWgS'];a7_0x18e6=function(){return _0x5b37ca;};return a7_0x18e6();}import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function relativeImport(_0x57ebdf,_0xeaad4f){const _0x425b7d=a7_0x5975;let _0x53b79c=a7_0x12fb4c[_0x425b7d(0x124)](_0x57ebdf,_0xeaad4f)[_0x425b7d(0x119)](/\\/g,'/');if(!_0x53b79c[_0x425b7d(0x12b)]('.'))_0x53b79c='./'+_0x53b79c;return _0x53b79c;}export async function renderModelRegistryScaffold(_0x38ddeb,_0x4e3c69=process[a7_0x835f58(0x126)]()){const _0x4976eb=a7_0x835f58,_0x13f6ec=fileURLToPath(import.meta.url),_0x3e158f=a7_0x12fb4c['resolve'](a7_0x12fb4c['dirname'](_0x13f6ec),_0x4976eb(0x11f)),_0x3739a8=relativeImport(a7_0x12fb4c[_0x4976eb(0x12a)](_0x38ddeb),a7_0x12fb4c[_0x4976eb(0x12a)](_0x4e3c69,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x44e21a=readFileSync(a7_0x12fb4c[_0x4976eb(0x123)](_0x3e158f,_0x4976eb(0x128)),_0x4976eb(0x121))[_0x4976eb(0x119)](_0x4976eb(0x11e),_0x3739a8),[_0x503201,_0x3e01ba,_0x40fb9e]=await Promise['all']([a7_0xf5d2ea[_0x4976eb(0x11a)](_0x44e21a,{'parser':_0x4976eb(0x129)}),a7_0xf5d2ea[_0x4976eb(0x11a)](readFileSync(a7_0x12fb4c['join'](_0x3e158f,_0x4976eb(0x12d)),'utf8'),{'parser':_0x4976eb(0x129)}),a7_0xf5d2ea[_0x4976eb(0x11a)](readFileSync(a7_0x12fb4c['join'](_0x3e158f,'model-runtime.ts.tpl'),_0x4976eb(0x121)),{'parser':_0x4976eb(0x129)})]);return{'api':_0x503201,'client':_0x3e01ba,'modelRuntime':_0x40fb9e};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a8_0xb7cf(){const _0x4690e5=['1697898fvUwij','cwd','5yMtNuY','825124Phgdai','join','1863008skdpnv','17431000VszwyT','map','Run\x20`','1050004waENJB','defaultApp','1279593lnQgTj','object','Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.','apps','\x22\x20is\x20missing\x20from\x20','3256986smPLHA','find','-api.ts','Model\x20profile\x20\x22','resolve','appcode','`\x20first.','profiles','appCode','\x20api\x20pull\x20--app\x20','length','filter','entries','validation','defaultProfile'];a8_0xb7cf=function(){return _0x4690e5;};return a8_0xb7cf();}function a8_0x1415(_0x5e3aa4,_0x594230){_0x5e3aa4=_0x5e3aa4-0x101;const _0xb7cf86=a8_0xb7cf();let _0x1415ac=_0xb7cf86[_0x5e3aa4];return _0x1415ac;}(function(_0xd1c70e,_0x7eb0e6){const _0x3bfbe8=a8_0x1415,_0x219b96=_0xd1c70e();while(!![]){try{const _0x46d032=parseInt(_0x3bfbe8(0x119))/0x1+parseInt(_0x3bfbe8(0x116))/0x2+parseInt(_0x3bfbe8(0x102))/0x3+-parseInt(_0x3bfbe8(0x11f))/0x4+-parseInt(_0x3bfbe8(0x118))/0x5*(-parseInt(_0x3bfbe8(0x107))/0x6)+parseInt(_0x3bfbe8(0x11b))/0x7+-parseInt(_0x3bfbe8(0x11c))/0x8;if(_0x46d032===_0x7eb0e6)break;else _0x219b96['push'](_0x219b96['shift']());}catch(_0x4c65c5){_0x219b96['push'](_0x219b96['shift']());}}}(a8_0xb7cf,0x724eb));import{existsSync}from'node:fs';import a8_0x471e0f from'node:path';import{readRawConfig}from'../context/config-loader.js';import{MODEL_REGISTRY_FILE_NAME,readModelRegistry}from'../api/model-registry-file.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveApiModelSource(_0x35ba4f,_0x516625,_0x1bd15a){const _0xd953ac=a8_0x1415,_0x43e11b=a8_0x471e0f[_0xd953ac(0x10b)](process[_0xd953ac(0x117)](),_0x35ba4f),_0x172ae3=a8_0x471e0f[_0xd953ac(0x10b)](_0x43e11b,'api.ts'),_0x429440=a8_0x471e0f[_0xd953ac(0x10b)](_0x43e11b,MODEL_REGISTRY_FILE_NAME),_0xb598b8=readModelRegistry(_0x429440);if(_0xb598b8){const _0x174950=_0x516625?Object[_0xd953ac(0x113)](_0xb598b8[_0xd953ac(0x10e)])[_0xd953ac(0x112)](([,_0x50f6a8])=>_0x50f6a8[_0xd953ac(0x10f)]===_0x516625):[];if(_0x1bd15a){if(_0xb598b8[_0xd953ac(0x10e)][_0x1bd15a])return{'filePath':_0x429440,'profileName':_0x1bd15a};if(_0x174950[_0xd953ac(0x111)]>0x0)throw CliErrors[_0xd953ac(0x114)](_0xd953ac(0x10a)+_0x1bd15a+_0xd953ac(0x106)+MODEL_REGISTRY_FILE_NAME+'.',_0xd953ac(0x11e)+CLI_BIN_NAME+_0xd953ac(0x110)+_0x1bd15a+_0xd953ac(0x10d));}else{if(_0x174950[_0xd953ac(0x111)]===0x1)return{'filePath':_0x429440,'profileName':_0x174950[0x0][0x0]};if(_0x174950['length']>0x1)throw new Error('AppCode\x20\x22'+_0x516625+'\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20'+_0x174950[_0xd953ac(0x11d)](([_0x420647])=>_0x420647)[_0xd953ac(0x11a)](',\x20')+'.\x20'+_0xd953ac(0x104));if(_0xb598b8[_0xd953ac(0x10e)][_0xb598b8[_0xd953ac(0x115)]]&&!_0x516625)return{'filePath':_0x429440,'profileName':_0xb598b8[_0xd953ac(0x115)]};}}if(!_0x516625&&!_0x1bd15a)return{'filePath':_0x172ae3};const _0x192f6e=readRawConfig(),_0xff6df3=_0x192f6e[_0xd953ac(0x105)]&&typeof _0x192f6e[_0xd953ac(0x105)]===_0xd953ac(0x103)?_0x192f6e[_0xd953ac(0x105)]:{},_0xc3b8d4=_0x1bd15a&&_0xff6df3[_0x1bd15a]?[_0x1bd15a,_0xff6df3[_0x1bd15a]]:Object['entries'](_0xff6df3)[_0xd953ac(0x108)](([,_0x5126be])=>_0x5126be?.[_0xd953ac(0x10c)]===_0x516625);if(!_0xc3b8d4)return{'filePath':_0x172ae3};const [_0x3ec5ba,_0x262ce6]=_0xc3b8d4,_0xc29d1b=typeof _0x192f6e[_0xd953ac(0x101)]==='string'?_0x192f6e[_0xd953ac(0x101)]:undefined;if(_0x262ce6?.['apiDir'])return{'filePath':_0x172ae3};if(_0xc29d1b&&_0x3ec5ba!==_0xc29d1b){const _0x20e2f6=a8_0x471e0f['resolve'](_0x43e11b,_0x3ec5ba+_0xd953ac(0x109));if(existsSync(_0x20e2f6))return{'filePath':_0x20e2f6};}return{'filePath':_0x172ae3};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x44ee2e,_0x117823){const _0xa9ffe8=a9_0x14d2,_0x4c264b=_0x44ee2e();while(!![]){try{const _0x4b33cd=-parseInt(_0xa9ffe8(0x1e1))/0x1*(-parseInt(_0xa9ffe8(0x1e9))/0x2)+parseInt(_0xa9ffe8(0x1ec))/0x3*(-parseInt(_0xa9ffe8(0x1e7))/0x4)+parseInt(_0xa9ffe8(0x1e2))/0x5*(-parseInt(_0xa9ffe8(0x1e3))/0x6)+-parseInt(_0xa9ffe8(0x1eb))/0x7*(parseInt(_0xa9ffe8(0x1e4))/0x8)+parseInt(_0xa9ffe8(0x1f1))/0x9*(parseInt(_0xa9ffe8(0x1da))/0xa)+-parseInt(_0xa9ffe8(0x1ed))/0xb+parseInt(_0xa9ffe8(0x1f0))/0xc;if(_0x4b33cd===_0x117823)break;else _0x4c264b['push'](_0x4c264b['shift']());}catch(_0x4cf041){_0x4c264b['push'](_0x4c264b['shift']());}}}(a9_0x5878,0xa6eec));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a9_0x14d2(_0x36982e,_0x4f036a){_0x36982e=_0x36982e-0x1da;const _0x58783f=a9_0x5878();let _0x14d299=_0x58783f[_0x36982e];return _0x14d299;}import{CliErrors}from'../errors.js';function a9_0x5878(){const _0x10c959=['stop','13019652BMCJUq','626391CsDXCV','130PwlVkz','!\x20Login\x20failed.','โ\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','*\x20Login\x20successful!','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','No\x20valid\x20session.\x20Login\x20now?','Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.','1GVJwBN','223105azoAqc','36FAgERg','176XrRtEY','autoYes','validation','4204FZcKYC','nonInteractive','1117540XcFNrs','log','170758TZaLYe','63LtwcnM','11421377aaIzSS','start'];a9_0x5878=function(){return _0x10c959;};return a9_0x5878();}import{confirm}from'@inquirer/prompts';import a9_0x303563 from'ora';export async function runAuthServer(_0x5c936d){const _0x2a9e38=a9_0x14d2,_0x9b87e3=await getIsSessionValid();if(_0x9b87e3){console['log'](_0x2a9e38(0x1dc));return;}if(_0x5c936d?.['nonInteractive']&&!_0x5c936d[_0x2a9e38(0x1e5)])throw CliErrors[_0x2a9e38(0x1e6)]('Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.','Run\x20`'+CLI_BIN_NAME+_0x2a9e38(0x1de));const _0x1b6186=_0x5c936d?.[_0x2a9e38(0x1e5)]?!![]:await confirm({'message':_0x2a9e38(0x1df),'default':!![]});if(!_0x1b6186)return;if(_0x5c936d?.[_0x2a9e38(0x1e8)]){console[_0x2a9e38(0x1ea)](_0x2a9e38(0x1e0));const _0x567661=await authServer({'silent':![],'openBrowser':![]});_0x567661?console[_0x2a9e38(0x1ea)](_0x2a9e38(0x1dd)):console[_0x2a9e38(0x1ea)](_0x2a9e38(0x1db));return;}const _0x216362=a9_0x303563('Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.')[_0x2a9e38(0x1ee)](),_0x66eace=await authServer({'silent':!![],'openBrowser':!![]});_0x216362[_0x2a9e38(0x1ef)](),_0x66eace?console[_0x2a9e38(0x1ea)](_0x2a9e38(0x1dd)):console['log'](_0x2a9e38(0x1db));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a10_0x3e63(_0x230ddf,_0x5b50a5){_0x230ddf=_0x230ddf-0x180;const _0x260f19=a10_0x260f();let _0x3e6304=_0x260f19[_0x230ddf];return _0x3e6304;}const a10_0x3ce243=a10_0x3e63;(function(_0x1b40c9,_0x3c9b65){const _0x1c0b7f=a10_0x3e63,_0x41a3b5=_0x1b40c9();while(!![]){try{const _0x375f39=-parseInt(_0x1c0b7f(0x18f))/0x1*(-parseInt(_0x1c0b7f(0x188))/0x2)+-parseInt(_0x1c0b7f(0x1b1))/0x3+-parseInt(_0x1c0b7f(0x182))/0x4*(-parseInt(_0x1c0b7f(0x189))/0x5)+parseInt(_0x1c0b7f(0x18a))/0x6+-parseInt(_0x1c0b7f(0x19b))/0x7+-parseInt(_0x1c0b7f(0x18c))/0x8*(parseInt(_0x1c0b7f(0x19d))/0x9)+parseInt(_0x1c0b7f(0x19a))/0xa;if(_0x375f39===_0x3c9b65)break;else _0x41a3b5['push'](_0x41a3b5['shift']());}catch(_0x4aaa4e){_0x41a3b5['push'](_0x41a3b5['shift']());}}}(a10_0x260f,0x7d6ab));import{writeFileSync}from'node:fs';function a10_0x260f(){const _0x4bf1f4=['/cert/lovrabet-dev.json','๐\x20Login\x20URL:','/api/auth/get-session','then','createServer','โ
\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','listen','open\x20\x22','isAuth','โ ๏ธ\x20\x20Failed\x20to\x20open\x20browser\x20automatically','cmd\x20/c\x20start\x20\x22\x22\x20\x22','948177SMdjzb','lovrabet','Auth\x20server\x20error:','348eMgpTF','origin','local','log','silent','127.0.0.1','18922uqBqKC','27545ySfYIj','4400040ZBUVdC','๐\x20Starting\x20login\x20service...','2040DdaZqk','port','win32','65effrxJ','error','๐\x20Attempting\x20to\x20open\x20browser\x20automatically...','cookie','darwin','certificateUrl','timeoutMs','xdg-open\x20\x22','writeHead','๐ก\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','utf-8','5267020NmdqLX','3567368xxFNRm','๐ก\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','35820xWTcdg','text/html;\x20charset=utf-8','!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','close','end','headers','user','/sign-in?redirect=','platform'];a10_0x260f=function(){return _0x4bf1f4;};return a10_0x260f();}import a10_0x3f5b5f from'node:http';import a10_0x34ea3f from'node:https';import{getUserDomain}from'../constant/domain.js';import{getOfficialRoutingCdn,getOfficialRoutingProfile}from'../constant/routing-profile.js';import{getProjectDomainRoutingManifest}from'../config/project-domain-routing.js';import{exec}from'node:child_process';import{getIsSessionValid}from'../auth/is-session-valid.js';import{cookieFile}from'../auth/constant.js';import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export const AUTH_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;export function resolveAuthCallbackRouting(_0x8759df){const _0x1d318b=a10_0x3e63;if(!_0x8759df)return getProjectDomainRoutingManifest()[_0x1d318b(0x184)];const _0xa6629d=getOfficialRoutingProfile(_0x8759df),_0x570aa3=getOfficialRoutingCdn(_0x8759df);return{'origin':_0xa6629d[_0x1d318b(0x184)][_0x1d318b(0x183)],'certificateUrl':_0x570aa3[_0x1d318b(0x180)]+_0x1d318b(0x1a6)};}function withPort(_0x327c84,_0x146ac3){const _0x200156=a10_0x3e63,_0x59f260=new URL(_0x327c84);return _0x59f260['port']=String(_0x146ac3),_0x59f260[_0x200156(0x183)];}export async function authServer(_0x4228b1){const _0xc2dbaa=a10_0x3e63,_0x262a88=_0x4228b1?.[_0xc2dbaa(0x186)]||![],_0x4fcb6=_0x4228b1?.['openBrowser']??!![],_0x260202=_0x4228b1?.[_0xc2dbaa(0x195)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x4a3f60=resolveAuthCallbackRouting(),_0x3c4c6f=_0x4a3f60[_0xc2dbaa(0x194)]?await(await fetch(_0x4a3f60['certificateUrl']))['json']():undefined;return new Promise(async(_0x351f9f,_0x9170b1)=>{const _0xf7b0d0=_0xc2dbaa;let _0x5c257f=0x0,_0x517a51=![],_0x7ce04b;const _0x3eea1a=async(_0x4eda77,_0x3a0c3e)=>{const _0x5aa3b3=a10_0x3e63,_0x3e5c6c=getUserDomain(),_0x2d2c68=_0x4eda77[_0x5aa3b3(0x1a2)][_0x5aa3b3(0x192)]||'',_0x41a1dc=await fetch(_0x3e5c6c+_0x5aa3b3(0x1a8),{'headers':{'cookie':_0x2d2c68}})['then'](_0x5ab1b6=>_0x5ab1b6['json']()),_0x60f928=_0x41a1dc&&_0x41a1dc['session']&&_0x41a1dc[_0x5aa3b3(0x1a3)];if(_0x60f928){writeFileSync(cookieFile,_0x2d2c68,_0x5aa3b3(0x199));const _0x3e57c9=buildLoginSuccessHtml();_0x3a0c3e['writeHead'](0xc8,{'Content-Type':_0x5aa3b3(0x19e)}),_0x3a0c3e[_0x5aa3b3(0x1a1)](_0x3e57c9),_0x12a260(!![]);}else{const _0x3da3fa=encodeURIComponent(withPort(_0x4a3f60['origin'],_0x5c257f));_0x3a0c3e[_0x5aa3b3(0x197)](0x12e,{'location':_0x3e5c6c+_0x5aa3b3(0x1a4)+_0x3da3fa}),_0x3a0c3e[_0x5aa3b3(0x1a1)]();return;}},_0x35830e=_0x3c4c6f?a10_0x34ea3f[_0xf7b0d0(0x1aa)](_0x3c4c6f,_0x3eea1a):a10_0x3f5b5f[_0xf7b0d0(0x1aa)](_0x3eea1a);function _0x12a260(_0xd1d81e){if(_0x517a51)return;_0x517a51=!![],_0x7ce04b&&clearTimeout(_0x7ce04b),_0x35830e['close'](),_0x351f9f(_0xd1d81e);}_0x35830e[_0xf7b0d0(0x1ac)](0x0,_0xf7b0d0(0x187),()=>{const _0x341b83=_0xf7b0d0,_0x56376e=_0x35830e['address']();_0x5c257f=typeof _0x56376e==='object'&&_0x56376e?_0x56376e[_0x341b83(0x18d)]:Number(_0x56376e);const _0x78b0af=withPort(_0x4a3f60[_0x341b83(0x183)],_0x5c257f);_0x7ce04b=setTimeout(()=>{const _0x16fade=_0x341b83;!_0x262a88&&console[_0x16fade(0x185)](_0x16fade(0x19f)),_0x12a260(![]);},_0x260202);!_0x262a88&&(console[_0x341b83(0x185)](_0x341b83(0x18b)),console['log'](_0x341b83(0x1a7),_0x78b0af),_0x4fcb6?(console[_0x341b83(0x185)](_0x341b83(0x191)),console['log'](''),console[_0x341b83(0x185)](_0x341b83(0x19c))):console[_0x341b83(0x185)](_0x341b83(0x198)),console[_0x341b83(0x185)](''));if(!_0x4fcb6)return;openInBrowser(_0x78b0af)[_0x341b83(0x1a9)](_0x126b74=>{const _0x27546e=_0x341b83;!_0x262a88&&(_0x126b74?console[_0x27546e(0x185)](_0x27546e(0x1ab)):(console['log'](_0x27546e(0x1af)),console[_0x27546e(0x185)]('๐\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0x78b0af)),console[_0x27546e(0x185)](''));})['catch'](()=>{const _0x4f86bc=_0x341b83;!_0x262a88&&(console[_0x4f86bc(0x185)](_0x4f86bc(0x1af)),console['log']('๐\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0x78b0af),console[_0x4f86bc(0x185)](''));});}),_0x35830e['on']('error',_0x4edd31=>{const _0x204f74=_0xf7b0d0;if(_0x517a51)return;_0x517a51=!![],_0x7ce04b&&clearTimeout(_0x7ce04b),!_0x262a88&&console[_0x204f74(0x190)](_0x204f74(0x181),_0x4edd31),_0x35830e[_0x204f74(0x1a0)](),_0x9170b1(_0x4edd31);});});}function openInBrowser(_0x1d6ccb){return new Promise(_0x531554=>{const _0x347eda=a10_0x3e63,_0x55e3bd=process[_0x347eda(0x1a5)];let _0x5b5347;if(_0x55e3bd===_0x347eda(0x18e))_0x5b5347=_0x347eda(0x1b0)+_0x1d6ccb+'\x22';else _0x55e3bd===_0x347eda(0x193)?_0x5b5347=_0x347eda(0x1ad)+_0x1d6ccb+'\x22':_0x5b5347=_0x347eda(0x196)+_0x1d6ccb+'\x22';exec(_0x5b5347,_0x2d1c3a=>{_0x2d1c3a?_0x531554(![]):_0x531554(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a10_0x3ce243(0x185)](a10_0x3ce243(0x1ae),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a11_0x587d(_0x26a901,_0x256765){_0x26a901=_0x26a901-0x141;const _0x3ddfa8=a11_0x3ddf();let _0x587ded=_0x3ddfa8[_0x26a901];return _0x587ded;}const a11_0x5d8a29=a11_0x587d;(function(_0x542f5d,_0x4be754){const _0x4aa73c=a11_0x587d,_0x3107f5=_0x542f5d();while(!![]){try{const _0x24f973=-parseInt(_0x4aa73c(0x142))/0x1*(parseInt(_0x4aa73c(0x144))/0x2)+-parseInt(_0x4aa73c(0x14a))/0x3*(-parseInt(_0x4aa73c(0x147))/0x4)+parseInt(_0x4aa73c(0x141))/0x5*(parseInt(_0x4aa73c(0x14c))/0x6)+parseInt(_0x4aa73c(0x143))/0x7+parseInt(_0x4aa73c(0x145))/0x8+-parseInt(_0x4aa73c(0x146))/0x9*(parseInt(_0x4aa73c(0x149))/0xa)+-parseInt(_0x4aa73c(0x14b))/0xb;if(_0x24f973===_0x4be754)break;else _0x3107f5['push'](_0x3107f5['shift']());}catch(_0x8886bd){_0x3107f5['push'](_0x3107f5['shift']());}}}(a11_0x3ddf,0xf15b2));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),'.lovrabet');function a11_0x3ddf(){const _0x1c66f4=['5BJuhpW','707271bgNWbx','10322424Sijtaf','2QWRAph','10313928oTGPrf','2007eVmrBE','2848864YVSBXp','cookie','67630uRRGNZ','6sKjyWA','20613384TsuTHo','5337918IfnaeW'];a11_0x3ddf=function(){return _0x1c66f4;};return a11_0x3ddf();}export const cookieFile=join(configDir,a11_0x5d8a29(0x148));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3db9c4,_0x20a071){var _0x1edb2f=a12_0x2e3b,_0x343af6=_0x3db9c4();while(!![]){try{var _0x53e508=-parseInt(_0x1edb2f(0x14e))/0x1*(-parseInt(_0x1edb2f(0x14d))/0x2)+-parseInt(_0x1edb2f(0x150))/0x3*(-parseInt(_0x1edb2f(0x159))/0x4)+parseInt(_0x1edb2f(0x155))/0x5+-parseInt(_0x1edb2f(0x158))/0x6*(-parseInt(_0x1edb2f(0x152))/0x7)+parseInt(_0x1edb2f(0x153))/0x8*(parseInt(_0x1edb2f(0x156))/0x9)+parseInt(_0x1edb2f(0x154))/0xa*(-parseInt(_0x1edb2f(0x151))/0xb)+-parseInt(_0x1edb2f(0x157))/0xc*(parseInt(_0x1edb2f(0x14c))/0xd);if(_0x53e508===_0x20a071)break;else _0x343af6['push'](_0x343af6['shift']());}catch(_0x4338ca){_0x343af6['push'](_0x343af6['shift']());}}}(a12_0x38f2,0xa0cd5));import{readFileSync}from'node:fs';function a12_0x2e3b(_0x46c9a9,_0x324735){_0x46c9a9=_0x46c9a9-0x14c;var _0x38f27f=a12_0x38f2();var _0x2e3bb1=_0x38f27f[_0x46c9a9];return _0x2e3bb1;}import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0xa0a8bb=a12_0x2e3b;try{return readFileSync(cookieFile,_0xa0a8bb(0x14f));}catch{}return'';}function a12_0x38f2(){var _0x3d536f=['4356DKABFV','344808FlrKjM','1686myQwjq','4uOLDCX','650ApJLfs','2059726AqhDSe','1TmQxwQ','utf-8','3069609bpCssL','33nWeZZQ','11844iZnAfb','3328gLDVDh','2769990HIExLF','982400TqQWDa'];a12_0x38f2=function(){return _0x3d536f;};return a12_0x38f2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2e6723,_0x4c4a33){const _0x3f6a02=a13_0xe7c1,_0x58baec=_0x2e6723();while(!![]){try{const _0x149ba5=parseInt(_0x3f6a02(0x8e))/0x1+parseInt(_0x3f6a02(0x8d))/0x2+parseInt(_0x3f6a02(0x8f))/0x3+parseInt(_0x3f6a02(0x8b))/0x4+parseInt(_0x3f6a02(0x93))/0x5+parseInt(_0x3f6a02(0x91))/0x6*(-parseInt(_0x3f6a02(0x96))/0x7)+-parseInt(_0x3f6a02(0x94))/0x8;if(_0x149ba5===_0x4c4a33)break;else _0x58baec['push'](_0x58baec['shift']());}catch(_0x3807e4){_0x58baec['push'](_0x58baec['shift']());}}}(a13_0x3f7f,0x2d902));import{existsSync,readFileSync}from'node:fs';function a13_0xe7c1(_0x34ce6c,_0x5cdeb7){_0x34ce6c=_0x34ce6c-0x8b;const _0x3f7fdb=a13_0x3f7f();let _0xe7c19f=_0x3f7fdb[_0x34ce6c];return _0xe7c19f;}import{getUserDomain}from'../constant/domain.js';function a13_0x3f7f(){const _0x5b09f6=['86784AKzbRX','utf-8','5532SAbenJ','user','1761865ufZAqG','5725168XNgInp','json','1351iQeBsH','606516pOxzOu','/api/auth/get-session','535424cCbSXG','279576RUWsfT'];a13_0x3f7f=function(){return _0x5b09f6;};return a13_0x3f7f();}import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(_0x5e5a58){const _0x534ded=a13_0xe7c1;try{if(_0x5e5a58===undefined){if(!existsSync(cookieFile))return null;_0x5e5a58=readFileSync(cookieFile,_0x534ded(0x90));}if(!_0x5e5a58)return null;const _0x592902=await fetch(getUserDomain()+_0x534ded(0x8c),{'headers':{'cookie':_0x5e5a58}});if(!_0x592902['ok'])return null;const _0x21753f=await _0x592902[_0x534ded(0x95)]();if(!_0x21753f['session']||!_0x21753f[_0x534ded(0x92)])return null;return _0x21753f;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a14_0x52fa(){const _0x45093b=['516004fuMqaw','then','user','session','929585CQcYPJ','6548904qMrUea','171960okjLTI','2082516uhxZYG','2077272xXfUDO','2316237XrmRLc','16LMBFmk'];a14_0x52fa=function(){return _0x45093b;};return a14_0x52fa();}(function(_0x5a144c,_0x20ba45){const _0x1f10b0=a14_0x449b,_0x4002a6=_0x5a144c();while(!![]){try{const _0x2f75f8=-parseInt(_0x1f10b0(0x11b))/0x1+parseInt(_0x1f10b0(0x122))/0x2+-parseInt(_0x1f10b0(0x121))/0x3+-parseInt(_0x1f10b0(0x11a))/0x4*(parseInt(_0x1f10b0(0x11f))/0x5)+parseInt(_0x1f10b0(0x120))/0x6+-parseInt(_0x1f10b0(0x119))/0x7+parseInt(_0x1f10b0(0x118))/0x8;if(_0x2f75f8===_0x20ba45)break;else _0x4002a6['push'](_0x4002a6['shift']());}catch(_0x497f02){_0x4002a6['push'](_0x4002a6['shift']());}}}(a14_0x52fa,0xb5c46));import{existsSync,readFileSync}from'node:fs';function a14_0x449b(_0x20bae4,_0x57d609){_0x20bae4=_0x20bae4-0x118;const _0x52fa6d=a14_0x52fa();let _0x449b9b=_0x52fa6d[_0x20bae4];return _0x449b9b;}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x1d58db=a14_0x449b;try{if(!existsSync(cookieFile))return![];const _0x577111=readFileSync(cookieFile,'utf-8'),_0x2e1c6d=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x577111}})[_0x1d58db(0x11c)](_0x2e03f6=>_0x2e03f6['json']());return _0x2e1c6d&&_0x2e1c6d[_0x1d58db(0x11e)]&&_0x2e1c6d[_0x1d58db(0x11d)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x490438,_0x2d5e6b){const _0x5077e0=a15_0x16e3,_0x4dcce4=_0x490438();while(!![]){try{const _0x5eed38=-parseInt(_0x5077e0(0x77))/0x1*(parseInt(_0x5077e0(0x76))/0x2)+parseInt(_0x5077e0(0x78))/0x3+-parseInt(_0x5077e0(0x75))/0x4+-parseInt(_0x5077e0(0x7d))/0x5*(-parseInt(_0x5077e0(0x74))/0x6)+-parseInt(_0x5077e0(0x7a))/0x7+parseInt(_0x5077e0(0x73))/0x8+-parseInt(_0x5077e0(0x79))/0x9*(parseInt(_0x5077e0(0x7b))/0xa);if(_0x5eed38===_0x2d5e6b)break;else _0x4dcce4['push'](_0x4dcce4['shift']());}catch(_0xd05036){_0x4dcce4['push'](_0x4dcce4['shift']());}}}(a15_0x34f5,0x69b08));export function buildLoginSuccessHtml(){const _0x2a37fb=a15_0x16e3,_0x1cacbe=_0x2a37fb(0x7c);return'<!doctype\x20html>\x0a<html\x20lang=\x22en\x22>\x0a<head>\x0a\x20\x20<meta\x20charset=\x22utf-8\x22>\x0a\x20\x20<meta\x20name=\x22viewport\x22\x20content=\x22width=device-width,\x20initial-scale=1\x22>\x0a\x20\x20<title>Login\x20successful\x20ยท\x20Rabetbase\x20CLI</title>\x0a\x20\x20<style>\x0a\x20\x20\x20\x20:root\x20{\x0a\x20\x20\x20\x20\x20\x20--bg0:\x20#0f1419;\x0a\x20\x20\x20\x20\x20\x20--bg1:\x20#1a2332;\x0a\x20\x20\x20\x20\x20\x20--card:\x20#ffffff;\x0a\x20\x20\x20\x20\x20\x20--text:\x20#1c2128;\x0a\x20\x20\x20\x20\x20\x20--muted:\x20#5c6570;\x0a\x20\x20\x20\x20\x20\x20--accent:\x20#2563eb;\x0a\x20\x20\x20\x20\x20\x20--accent-soft:\x20#eff6ff;\x0a\x20\x20\x20\x20\x20\x20--success:\x20#059669;\x0a\x20\x20\x20\x20\x20\x20--radius:\x2016px;\x0a\x20\x20\x20\x20\x20\x20--shadow:\x200\x2025px\x2050px\x20-12px\x20rgba(15,\x2020,\x2025,\x200.35);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20*\x20{\x20box-sizing:\x20border-box;\x20}\x0a\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20min-height:\x20100vh;\x0a\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20\x20\x20padding:\x2024px;\x0a\x20\x20\x20\x20\x20\x20font-family:\x20ui-sans-serif,\x20system-ui,\x20-apple-system,\x20\x22Segoe\x20UI\x22,\x20Roboto,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22Helvetica\x20Neue\x22,\x20Arial,\x20\x22Noto\x20Sans\x22,\x20\x22PingFang\x20SC\x22,\x20\x22Microsoft\x20YaHei\x22,\x20sans-serif;\x0a\x20\x20\x20\x20\x20\x20background:\x20linear-gradient(160deg,\x20var(--bg0)\x200%,\x20var(--bg1)\x2045%,\x20#243047\x20100%);\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--text);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.card\x20{\x0a\x20\x20\x20\x20\x20\x20width:\x20100%;\x0a\x20\x20\x20\x20\x20\x20max-width:\x20420px;\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--card);\x0a\x20\x20\x20\x20\x20\x20border-radius:\x20var(--radius);\x0a\x20\x20\x20\x20\x20\x20box-shadow:\x20var(--shadow);\x0a\x20\x20\x20\x20\x20\x20padding:\x2040px\x2036px\x2032px;\x0a\x20\x20\x20\x20\x20\x20text-align:\x20center;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.icon\x20{\x0a\x20\x20\x20\x20\x20\x20width:\x2064px;\x0a\x20\x20\x20\x20\x20\x20height:\x2064px;\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x20auto\x2020px;\x0a\x20\x20\x20\x20\x20\x20border-radius:\x2050%;\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--accent-soft);\x0a\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.icon\x20svg\x20{\x20width:\x2036px;\x20height:\x2036px;\x20}\x0a\x20\x20\x20\x20h1\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x200\x2012px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x201.375rem;\x0a\x20\x20\x20\x20\x20\x20font-weight:\x20600;\x0a\x20\x20\x20\x20\x20\x20letter-spacing:\x20-0.02em;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20p.lead\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x200\x208px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.9375rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--muted);\x0a\x20\x20\x20\x20\x20\x20line-height:\x201.55;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.countdown\x20{\x0a\x20\x20\x20\x20\x20\x20display:\x20inline-flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20gap:\x206px;\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2016px;\x0a\x20\x20\x20\x20\x20\x20padding:\x208px\x2014px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.875rem;\x0a\x20\x20\x20\x20\x20\x20font-variant-numeric:\x20tabular-nums;\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--accent);\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--accent-soft);\x0a\x20\x20\x20\x20\x20\x20border-radius:\x20999px;\x0a\x20\x20\x20\x20\x20\x20font-weight:\x20500;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20#manualMsg\x20{\x0a\x20\x20\x20\x20\x20\x20display:\x20none;\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2020px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.8125rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20#b91c1c;\x0a\x20\x20\x20\x20\x20\x20line-height:\x201.45;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.cli-hint\x20{\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2028px;\x0a\x20\x20\x20\x20\x20\x20padding-top:\x2024px;\x0a\x20\x20\x20\x20\x20\x20border-top:\x201px\x20solid\x20#e8ecf0;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.75rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20#8b949e;\x0a\x20\x20\x20\x20}\x0a\x20\x20</style>\x0a</head>\x0a<body>\x0a\x20\x20<div\x20class=\x22card\x22\x20role=\x22status\x22\x20aria-live=\x22polite\x22>\x0a\x20\x20\x20\x20<div\x20class=\x22icon\x22\x20aria-hidden=\x22true\x22>\x0a\x20\x20\x20\x20\x20\x20<svg\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x2210\x22\x20stroke=\x22#059669\x22\x20stroke-width=\x222\x22\x20fill=\x22none\x22/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M8\x2012.5l2.5\x202.5L16\x209\x22\x20stroke=\x22#059669\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22/>\x0a\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<h1>Login\x20successful</h1>\x0a\x20\x20\x20\x20<p\x20class=\x22lead\x22>You\x20can\x20return\x20to\x20the\x20terminal\x20to\x20continue.\x20This\x20window\x20will\x20try\x20to\x20close\x20automatically.</p>\x0a\x20\x20\x20\x20<div\x20class=\x22countdown\x22>\x0a\x20\x20\x20\x20\x20\x20Closing\x20in\x20<span\x20id=\x22t\x22>5</span>s\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<div\x20id=\x22manualMsg\x22>'+_0x1cacbe+'</div>\x0a\x20\x20\x20\x20<p\x20class=\x22cli-hint\x22>Rabetbase\x20CLI\x20ยท\x20session\x20saved\x20locally</p>\x0a\x20\x20</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>';}function a15_0x16e3(_0x3ac92f,_0x2edba5){_0x3ac92f=_0x3ac92f-0x73;const _0x34f55a=a15_0x34f5();let _0x16e32e=_0x34f55a[_0x3ac92f];return _0x16e32e;}function a15_0x34f5(){const _0x549cad=['Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','60VIOTaO','5664160ekqqte','431064bQYaWN','2670628Xklmis','602vMswDW','940iWGgQs','1426005mRRyFY','675999VkVZJi','3582320bQEXlA','20uxzqnU'];a15_0x34f5=function(){return _0x549cad;};return a15_0x34f5();}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3bd743,_0x273dcf){var _0x22fe7f=a16_0x1a15,_0x39a609=_0x3bd743();while(!![]){try{var _0x4dcdea=parseInt(_0x22fe7f(0x110))/0x1+-parseInt(_0x22fe7f(0x109))/0x2+-parseInt(_0x22fe7f(0x113))/0x3*(parseInt(_0x22fe7f(0x111))/0x4)+parseInt(_0x22fe7f(0x106))/0x5*(parseInt(_0x22fe7f(0x10e))/0x6)+-parseInt(_0x22fe7f(0x10a))/0x7*(-parseInt(_0x22fe7f(0x114))/0x8)+parseInt(_0x22fe7f(0x112))/0x9*(parseInt(_0x22fe7f(0x108))/0xa)+-parseInt(_0x22fe7f(0x10b))/0xb*(-parseInt(_0x22fe7f(0x10d))/0xc);if(_0x4dcdea===_0x273dcf)break;else _0x39a609['push'](_0x39a609['shift']());}catch(_0x24f7c8){_0x39a609['push'](_0x39a609['shift']());}}}(a16_0x175a,0xec266));function a16_0x1a15(_0x3ecc45,_0x11629e){_0x3ecc45=_0x3ecc45-0x106;var _0x175a8a=a16_0x175a();var _0x1a15ab=_0x175a8a[_0x3ecc45];return _0x1a15ab;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function logout(){var _0x290c11=a16_0x1a15;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x290c11(0x107)](_0x290c11(0x10f))):console['log'](_0x290c11(0x10c));}function a16_0x175a(){var _0x5b0c73=['15522VFcjAK','โ\x20Logged\x20out','31531GiscRK','16Zpsmsy','9WcojSQ','921663SwDaTf','16ieEDga','2570VMbugI','log','9151750lrSUuf','588438lPNXYV','502033bcBNDe','775621zkrXjr','!\x20Not\x20logged\x20in','12dFfqtQ'];a16_0x175a=function(){return _0x5b0c73;};return a16_0x175a();}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x3206c7=a17_0x314c;function a17_0x314c(_0x1af537,_0x290225){_0x1af537=_0x1af537-0x138;const _0x1cf14f=a17_0x1cf1();let _0x314c63=_0x1cf14f[_0x1af537];return _0x314c63;}(function(_0x24df3f,_0x222151){const _0x39bbdc=a17_0x314c,_0x229c54=_0x24df3f();while(!![]){try{const _0x3ecb30=parseInt(_0x39bbdc(0x13e))/0x1+-parseInt(_0x39bbdc(0x141))/0x2+parseInt(_0x39bbdc(0x138))/0x3*(parseInt(_0x39bbdc(0x13f))/0x4)+parseInt(_0x39bbdc(0x13b))/0x5+parseInt(_0x39bbdc(0x140))/0x6+-parseInt(_0x39bbdc(0x13a))/0x7+parseInt(_0x39bbdc(0x13d))/0x8*(parseInt(_0x39bbdc(0x13c))/0x9);if(_0x3ecb30===_0x222151)break;else _0x229c54['push'](_0x229c54['shift']());}catch(_0x39d2a3){_0x229c54['push'](_0x229c54['shift']());}}}(a17_0x1cf1,0x6a0c2));export const dynamicCliFlags={'enableBffSave':{'type':a17_0x3206c7(0x139)}};function a17_0x1cf1(){const _0x1702a0=['1258614QJsCiJ','1249144BLAVHL','742557RkLGkS','boolean','104566vvSIgP','1043340AXOHQF','20259fnHpUr','752uWPtmk','196330wdPvBs','4JJaExF'];a17_0x1cf1=function(){return _0x1702a0;};return a17_0x1cf1();}
|