@lovrabet/rabetbase-cli 2.5.10-beta.5 → 2.5.10
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
|
-
const
|
|
1
|
+
const a0_0x12ee01=a0_0x5711;function a0_0x88d4(){const _0x167e9a=['✓\x20Generated:\x20','16tQHuvu','80090JdMaqE','Generated\x20docs\x20successfully:\x20','success','5138200rglBUb','join','28Tqvjdw','api-doc','utf8','✗\x20Failed:\x20','./docs','.md','name','200808TejOAQ','tableName','error',']\x20Generating:\x20','log','length','5167620hTQlZS','4QeSbPl','push','3858618hAzqgq','11PLcAEK','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','message','11504286JpckJu','Failed\x20to\x20generate\x20docs:\x20','Waiting\x203\x20seconds...\x0a','datasetCode','4765000pImSCd'];a0_0x88d4=function(){return _0x167e9a;};return a0_0x88d4();}(function(_0x5b7830,_0x222e5d){const _0x221a45=a0_0x5711,_0x2983d8=_0x5b7830();while(!![]){try{const _0x2eb27a=-parseInt(_0x221a45(0x132))/0x1*(-parseInt(_0x221a45(0x131))/0x2)+-parseInt(_0x221a45(0x147))/0x3*(-parseInt(_0x221a45(0x145))/0x4)+-parseInt(_0x221a45(0x144))/0x5+parseInt(_0x221a45(0x13e))/0x6*(-parseInt(_0x221a45(0x137))/0x7)+-parseInt(_0x221a45(0x135))/0x8+parseInt(_0x221a45(0x12b))/0x9+parseInt(_0x221a45(0x12f))/0xa*(-parseInt(_0x221a45(0x148))/0xb);if(_0x2eb27a===_0x222e5d)break;else _0x2983d8['push'](_0x2983d8['shift']());}catch(_0x1c6da0){_0x2983d8['push'](_0x2983d8['shift']());}}}(a0_0x88d4,0xe05e1));import{mkdirSync,writeFileSync}from'node:fs';function a0_0x5711(_0x5b7253,_0x1e7d9b){_0x5b7253=_0x5b7253-0x12b;const _0x88d4d8=a0_0x88d4();let _0x5711d2=_0x88d4d8[_0x5b7253];return _0x5711d2;}import a0_0x4b5801 from'node:path';import{fetchDatasetDoc}from'../core/api-client.js';import{logger}from'../utils/logger.js';export{fetchDatasetDoc}from'../core/api-client.js';function delay(_0x2e5d72){return new Promise(_0x444f8b=>setTimeout(_0x444f8b,_0x2e5d72));}export async function generateDatasetDocs(_0x2f0c80,_0x27329f,_0x70be03,_0x4e4ca2=a0_0x12ee01(0x13b),_0x5a4147,_0x9074e7){const _0x32a958=a0_0x12ee01;mkdirSync(_0x4e4ca2,{'recursive':!![]});const _0x1b6958=[],_0x54e809=_0x2f0c80[_0x32a958(0x143)];console[_0x32a958(0x142)]('\x0a'+_0x54e809+_0x32a958(0x149));for(let _0x1e9410=0x0;_0x1e9410<_0x2f0c80[_0x32a958(0x143)];_0x1e9410++){const _0x3dde5e=_0x2f0c80[_0x1e9410],_0xd679f7=_0x1e9410+0x1,_0x46f6a1=_0x3dde5e[_0x32a958(0x13f)];try{console['log']('['+_0xd679f7+'/'+_0x54e809+_0x32a958(0x141)+_0x46f6a1+'.md\x20('+_0x3dde5e[_0x32a958(0x13d)]+')');if(_0x5a4147)_0x5a4147(_0xd679f7,_0x54e809,_0x46f6a1);const _0x43e956=await fetchDatasetDoc({'appCode':_0x27329f,'cookie':_0x70be03,'datasetCode':_0x3dde5e[_0x32a958(0x12e)],'datasetId':_0x3dde5e['id'],'enableAI':![],'extraParams':_0x9074e7}),_0x487cf9=a0_0x4b5801[_0x32a958(0x136)](_0x4e4ca2,_0x46f6a1+_0x32a958(0x13c));writeFileSync(_0x487cf9,_0x43e956,{'encoding':_0x32a958(0x139)}),console[_0x32a958(0x142)](_0x32a958(0x130)+_0x46f6a1+_0x32a958(0x13c)),logger[_0x32a958(0x134)](_0x32a958(0x138),_0x32a958(0x133)+_0x46f6a1,undefined,{'datasetCode':_0x3dde5e[_0x32a958(0x12e)],'datasetName':_0x3dde5e[_0x32a958(0x13d)],'filePath':_0x487cf9,'progress':_0xd679f7+'/'+_0x54e809}),_0x1b6958['push']({'datasetCode':_0x3dde5e[_0x32a958(0x12e)],'datasetName':_0x3dde5e[_0x32a958(0x13d)],'filePath':_0x487cf9,'success':!![]});if(_0xd679f7<_0x54e809)await delay(0x1388);}catch(_0x4cb744){const _0x36b550=_0x4cb744 instanceof Error?_0x4cb744[_0x32a958(0x14a)]:String(_0x4cb744);console[_0x32a958(0x142)](_0x32a958(0x13a)+_0x46f6a1+'.md\x20-\x20'+_0x36b550),logger[_0x32a958(0x140)](_0x32a958(0x138),_0x32a958(0x12c)+_0x3dde5e['datasetCode'],{'datasetCode':_0x3dde5e[_0x32a958(0x12e)],'datasetName':_0x3dde5e[_0x32a958(0x13d)],'error':_0x36b550,'progress':_0xd679f7+'/'+_0x54e809}),_0x1b6958[_0x32a958(0x146)]({'datasetCode':_0x3dde5e[_0x32a958(0x12e)],'datasetName':_0x3dde5e[_0x32a958(0x13d)],'filePath':'','success':![],'error':_0x36b550}),_0xd679f7<_0x54e809&&(console[_0x32a958(0x142)](_0x32a958(0x12d)),await delay(0xbb8));}}return _0x1b6958;}
|
package/lib/api/api-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a1_0x1ea9c6=a1_0x1702;(function(_0x416ca6,_0x2e2e59){const _0x4c8b4d=a1_0x1702,_0x47f31f=_0x416ca6();while(!![]){try{const _0x458fa6=parseInt(_0x4c8b4d(0x1f7))/0x1+parseInt(_0x4c8b4d(0x1fd))/0x2+parseInt(_0x4c8b4d(0x1e6))/0x3*(-parseInt(_0x4c8b4d(0x1fe))/0x4)+parseInt(_0x4c8b4d(0x1ef))/0x5*(parseInt(_0x4c8b4d(0x1f1))/0x6)+-parseInt(_0x4c8b4d(0x1fa))/0x7+parseInt(_0x4c8b4d(0x1f3))/0x8+-parseInt(_0x4c8b4d(0x1f4))/0x9;if(_0x458fa6===_0x2e2e59)break;else _0x47f31f['push'](_0x47f31f['shift']());}catch(_0x2c8778){_0x47f31f['push'](_0x47f31f['shift']());}}}(a1_0x3f63,0xdd133));import a1_0x2b1871 from'node:path';import{CliErrors}from'../errors.js';function a1_0x1702(_0x235595,_0x28a91a){_0x235595=_0x235595-0x1e4;const _0x3f63cb=a1_0x3f63();let _0x17026f=_0x3f63cb[_0x235595];return _0x17026f;}function a1_0x3f63(){const _0x29def1=['trim','push','API\x20directory\x20\x22','87KfzgNY','add','app','apiGroup','name','join','size','set','filter','6376490CTOYPg','values','6zVeorX','outputDir','12061896yZfWfa','7511805RJOTNg','cwd','some','1685326uVtQib','map','flatMap','12536195Dwngsw','Profiles\x20in\x20the\x20same\x20API\x20group\x20must\x20use\x20the\x20same\x20apiDir.','normalizedApiDir','45706oQpFON','132436CemsfX','\x22\x20resolves\x20to\x20multiple\x20API\x20directories.','validation'];a1_0x3f63=function(){return _0x29def1;};return a1_0x3f63();}export function normalizeApiDir(_0x4661ea,_0xe4eaa7=process[a1_0x1ea9c6(0x1f5)]()){return a1_0x2b1871['resolve'](_0xe4eaa7,_0x4661ea);}function normalizedApiGroup(_0x32b2a0){const _0x37931c=a1_0x1ea9c6,_0x575737=_0x32b2a0?.[_0x37931c(0x201)]();return _0x575737||undefined;}export function resolveApiProfileLayouts(_0x272a07,_0x3a3fc2,_0x5e6965=process[a1_0x1ea9c6(0x1f5)]()){const _0x32226a=a1_0x1ea9c6,_0x3be638=_0x272a07[_0x32226a(0x1f8)](_0x581e08=>{const _0x4a326d=_0x32226a,_0x1f8006=_0x3a3fc2(_0x581e08);return{'app':_0x581e08,'outputDir':_0x1f8006,'normalizedApiDir':normalizeApiDir(_0x1f8006,_0x5e6965),'apiGroup':normalizedApiGroup(_0x581e08[_0x4a326d(0x1e9)])};}),_0x492210=new Map();for(const _0x10a6e0 of _0x3be638){if(!_0x10a6e0['apiGroup'])continue;const _0x513f38=_0x492210['get'](_0x10a6e0[_0x32226a(0x1e9)])??new Set();_0x513f38[_0x32226a(0x1e7)](_0x10a6e0['normalizedApiDir']),_0x492210['set'](_0x10a6e0[_0x32226a(0x1e9)],_0x513f38);}for(const [_0x3bf92f,_0x75e543]of _0x492210){if(_0x75e543['size']>0x1)throw CliErrors[_0x32226a(0x200)]('API\x20group\x20\x22'+_0x3bf92f+_0x32226a(0x1ff),_0x32226a(0x1fb));}const _0x586d00=new Map();for(const _0x338255 of _0x3be638){const _0x2e5d52=_0x586d00['get'](_0x338255['normalizedApiDir'])??[];_0x2e5d52[_0x32226a(0x1e4)](_0x338255),_0x586d00[_0x32226a(0x1ed)](_0x338255[_0x32226a(0x1fc)],_0x2e5d52);}for(const _0x49db9d of _0x586d00[_0x32226a(0x1f0)]()){const _0x48713f=new Set(_0x49db9d[_0x32226a(0x1f9)](_0x11fb34=>_0x11fb34[_0x32226a(0x1e9)]?[_0x11fb34['apiGroup']]:[]));if(_0x48713f[_0x32226a(0x1ec)]===0x0)continue;if(_0x48713f[_0x32226a(0x1ec)]>0x1||_0x49db9d[_0x32226a(0x1f6)](_0x2a996b=>!_0x2a996b[_0x32226a(0x1e9)])){const _0xf13cd5=_0x49db9d[_0x32226a(0x1f8)](_0x3a12b0=>_0x3a12b0[_0x32226a(0x1e8)][_0x32226a(0x1ea)])[_0x32226a(0x1eb)](',\x20');throw CliErrors[_0x32226a(0x200)](_0x32226a(0x1e5)+_0x49db9d[0x0][_0x32226a(0x1f2)]+'\x22\x20is\x20assigned\x20to\x20incompatible\x20API\x20groups.','Profiles\x20sharing\x20one\x20apiDir\x20must\x20use\x20the\x20same\x20explicit\x20apiGroup.\x20Conflicting\x20profiles:\x20'+_0xf13cd5+'.\x20Use\x20a\x20different\x20apiDir\x20for\x20a\x20separate\x20API.');}}return _0x3be638;}export function getRegistryGroup(_0x443b77,_0x100e49){const _0x983901=a1_0x1ea9c6;if(_0x100e49[_0x983901(0x1e9)])return _0x443b77[_0x983901(0x1ee)](_0x5d7d95=>_0x5d7d95['apiGroup']===_0x100e49[_0x983901(0x1e9)]);const _0x594705=_0x443b77['filter'](_0xec9301=>_0xec9301[_0x983901(0x1fc)]===_0x100e49['normalizedApiDir']);return _0x594705['length']===0x1?_0x594705:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a2_0x3c98(){var _0x1d0696=['870mcTdov','4507945EnObBW','6azjNAj','8aKxLJK','306726GGLcaa','44ACHkJU','3811416wTERMF','1474716UgLADo','7851354IzAKfm','5pyzxMW','1494jvVaCh','5975952xvEQWe'];a2_0x3c98=function(){return _0x1d0696;};return a2_0x3c98();}(function(_0x2816fb,_0x52fd12){var _0x5ee0ff=a2_0x3494,_0xe967a4=_0x2816fb();while(!![]){try{var _0x385e28=parseInt(_0x5ee0ff(0x110))/0x1*(-parseInt(_0x5ee0ff(0x10b))/0x2)+-parseInt(_0x5ee0ff(0x109))/0x3*(-parseInt(_0x5ee0ff(0x10e))/0x4)+parseInt(_0x5ee0ff(0x108))/0x5+parseInt(_0x5ee0ff(0x10d))/0x6+parseInt(_0x5ee0ff(0x10f))/0x7*(parseInt(_0x5ee0ff(0x10a))/0x8)+-parseInt(_0x5ee0ff(0x111))/0x9*(-parseInt(_0x5ee0ff(0x107))/0xa)+parseInt(_0x5ee0ff(0x10c))/0xb*(-parseInt(_0x5ee0ff(0x112))/0xc);if(_0x385e28===_0x52fd12)break;else _0xe967a4['push'](_0xe967a4['shift']());}catch(_0x581e48){_0xe967a4['push'](_0xe967a4['shift']());}}}(a2_0x3c98,0x9f0b8));function a2_0x3494(_0x6c8570,_0x521279){_0x6c8570=_0x6c8570-0x107;var _0x3c98fe=a2_0x3c98();var _0x34946=_0x3c98fe[_0x6c8570];return _0x34946;}export{fetchModelList}from'../core/api-client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4fbe9b,_0x48fa42){const _0xb8bb66=a3_0x90b3,_0x32d0a0=_0x4fbe9b();while(!![]){try{const _0x336bfe=parseInt(_0xb8bb66(0x21e))/0x1+-parseInt(_0xb8bb66(0x21f))/0x2+parseInt(_0xb8bb66(0x206))/0x3*(-parseInt(_0xb8bb66(0x220))/0x4)+-parseInt(_0xb8bb66(0x21c))/0x5+-parseInt(_0xb8bb66(0x210))/0x6+-parseInt(_0xb8bb66(0x21a))/0x7+parseInt(_0xb8bb66(0x1f1))/0x8*(parseInt(_0xb8bb66(0x211))/0x9);if(_0x336bfe===_0x48fa42)break;else _0x32d0a0['push'](_0x32d0a0['shift']());}catch(_0x363fee){_0x32d0a0['push'](_0x32d0a0['shift']());}}}(a3_0x1d61,0xc2f23));import a3_0x31d445 from'prettier';import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x24bce3 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';function a3_0x90b3(_0x3b2336,_0x432e0e){_0x3b2336=_0x3b2336-0x1f1;const _0x1d616e=a3_0x1d61();let _0x90b3=_0x1d616e[_0x3b2336];return _0x90b3;}function a3_0x1d61(){const _0x811ab0=['utf8','\x20refreshed;\x20existing\x20TypeScript\x20left\x20unchanged.','replace','CONFIG_NAMES.DEFAULT','modelProfile','runtimeDomain','path','refreshed','api','templates/generate-api','-client','action','datasetCode','93muIJkj','LOVRABET_RUNTIME_DOMAIN','resolve','replaceApiContent','basename','missing','format','overwriteTypescript','client.ts.tpl','existed','3473406nQrWOe','423QfYxjI','Please\x20configure\x20app\x20code\x20first\x20via\x20`','.ts','modelRuntime','created','join','client','preserved','stringify','877065pVvrSo','key','5638050EnYGEb','api.ts.tpl','1465576IHagyg','2666028HgMcGU','95204xzPrdd','scaffoldMode','name','-api','LOVRABET','length','\x20config\x20set\x20app\x20<value>`','test','550736RlvjZt','alias','Model\x20facts\x20refreshed.','toUpperCase',',\x20...LOVRABET_SDK_CONFIG\x20}','defaultName','default','../..'];a3_0x1d61=function(){return _0x811ab0;};return a3_0x1d61();}import{MODEL_REGISTRY_FILE_NAME,MODEL_RUNTIME_FILE_NAME,updateModelRegistry}from'../api/model-registry-file.js';import{renderModelRegistryScaffold}from'../api/model-registry-scaffold.js';function fileAction(_0x2fab7d,_0x578cb0){const _0x868d4b=a3_0x90b3;if(!_0x578cb0)return _0x2fab7d?_0x868d4b(0x218):_0x868d4b(0x20b);return _0x2fab7d?'overwritten':_0x868d4b(0x215);}export async function generateApiFile(_0x3b4c2b,_0x62ca08,_0x34a487,_0x17df61,_0x15b66a,_0x440402,_0x59dcd0,_0x4a9fcd={},_0x42778a={}){const _0x4691e4=a3_0x90b3;if(!_0x34a487)throw new Error(_0x4691e4(0x212)+CLI_BIN_NAME+_0x4691e4(0x226));const _0x1d2b14=_0x17df61&&!_0x59dcd0,_0x18fafc=!!_0x42778a['modelProfile'],_0x372cea=_0x18fafc||_0x1d2b14,_0x53d19e=_0x59dcd0||_0x34a487,_0x5f1a5e=_0x18fafc||_0x1d2b14?_0x4691e4(0x1f7):_0x53d19e,_0x28fe12=_0x18fafc||_0x1d2b14?_0x4691e4(0x1fc):JSON[_0x4691e4(0x219)](_0x53d19e),_0x3edb8c=!isProduction(_0x15b66a),_0x5e1367=_0x3edb8c?',\x20env:\x20'+JSON['stringify'](_0x15b66a):'',_0x489e6b='{\x20apiConfigName:\x20'+_0x28fe12+_0x5e1367+_0x4691e4(0x1f5),_0x526879=_0x18fafc?'':_0x62ca08,_0x27e4cf=_0x526879?_0x526879+_0x4691e4(0x223):_0x4691e4(0x201),_0xf52dfe=_0x526879?_0x526879+_0x4691e4(0x203):_0x4691e4(0x217),_0x5ec878=_0x526879&&!/^app-[a-f0-9]+$/i['test'](_0x526879)?_0x526879['replace'](/-/g,'_')[_0x4691e4(0x1f4)]():_0x4691e4(0x224),_0x2234db=/^\d/[_0x4691e4(0x227)](_0x5ec878)?'APP_'+_0x5ec878:_0x5ec878,_0x50908b=_0x3b4c2b['map'](_0x5e7f0a=>({'datasetCode':_0x5e7f0a[_0x4691e4(0x205)],'tableName':_0x5e7f0a['tableName'],'name':_0x5e7f0a[_0x4691e4(0x222)]||'','alias':_0x5e7f0a[_0x4691e4(0x1f2)]||_0x5e7f0a[_0x4691e4(0x21b)]})),_0x4653b7=fileURLToPath(import.meta.url),_0x2e4f04=a3_0x24bce3[_0x4691e4(0x208)](a3_0x24bce3['dirname'](_0x4653b7),_0x4691e4(0x1f8)),_0x22ac6b=a3_0x24bce3[_0x4691e4(0x216)](_0x2e4f04,_0x4691e4(0x202)),_0x31efcb=a3_0x24bce3[_0x4691e4(0x216)](_0x22ac6b,_0x4691e4(0x21d)),_0x4c5ca4=a3_0x24bce3[_0x4691e4(0x216)](_0x22ac6b,_0x4691e4(0x20e)),_0x2b8fb4=_0x440402;mkdirSync(_0x2b8fb4,{'recursive':!![]});const _0x4e582=_0x18fafc?{}:_0x4a9fcd,_0x4203a8=await generateSdkConfigFile(_0x2b8fb4,_0x4e582,_0x526879),_0x531a56=a3_0x24bce3[_0x4691e4(0x20a)](_0x4203a8,_0x4691e4(0x213)),_0x317a9e=a3_0x24bce3[_0x4691e4(0x216)](_0x2b8fb4,_0x27e4cf+_0x4691e4(0x213)),_0x5d3ecb=a3_0x24bce3[_0x4691e4(0x216)](_0x2b8fb4,_0xf52dfe+_0x4691e4(0x213)),_0x5ca9f6=_0x42778a[_0x4691e4(0x20d)]===!![],_0x7f59bd=existsSync(_0x317a9e),_0x159d55=existsSync(_0x5d3ecb),_0x1aaa2c=_0x42778a[_0x4691e4(0x221)]??(_0x5ca9f6?_0x4691e4(0x1fb):_0x4691e4(0x20b)),_0x3332b2=_0x1aaa2c===_0x4691e4(0x1fb)||_0x1aaa2c===_0x4691e4(0x20b)&&!_0x7f59bd,_0x3fab1b=_0x1aaa2c==='replace'||_0x1aaa2c===_0x4691e4(0x20b)&&!_0x159d55,_0x365cc6=_0x42778a[_0x4691e4(0x1fd)]?updateModelRegistry({'outputDir':_0x2b8fb4,'profileName':_0x42778a[_0x4691e4(0x1fd)][_0x4691e4(0x222)],'defaultProfile':_0x42778a[_0x4691e4(0x1fd)][_0x4691e4(0x1f6)],'appCode':_0x34a487,'runtimeDomain':_0x42778a['modelProfile'][_0x4691e4(0x1fe)],'models':_0x50908b,'allowEmptyReplacement':_0x42778a['allowEmptyModelReplacement']===!![]}):undefined,_0x275887=_0x365cc6?a3_0x24bce3[_0x4691e4(0x216)](_0x2b8fb4,MODEL_RUNTIME_FILE_NAME):undefined,_0x359182=_0x275887?existsSync(_0x275887):![],_0x36a81d=_0x18fafc&&_0x1aaa2c!=='none'?await renderModelRegistryScaffold(_0x2b8fb4):undefined;_0x275887&&_0x36a81d&&writeFileSync(_0x275887,_0x36a81d[_0x4691e4(0x214)],_0x4691e4(0x1f9));const _0x2b7744=_0x50908b[0x0]?.[_0x4691e4(0x1f2)];if(_0x3332b2){const _0x382327=_0x36a81d?.[_0x4691e4(0x201)]??readFileSync(_0x31efcb,_0x4691e4(0x1f9)),_0x4b0c7f=_0x18fafc?_0x382327:TemplateReplacer[_0x4691e4(0x209)](_0x382327,_0x34a487,_0x50908b,_0x2b7744,_0x27e4cf,_0x28fe12,undefined,_0x2234db);writeFileSync(_0x317a9e,await a3_0x31d445['format'](_0x4b0c7f,{'parser':'typescript'}),{'encoding':'utf8'});}if(_0x3fab1b){const _0x57eef6=_0x36a81d?.[_0x4691e4(0x217)]??readFileSync(_0x4c5ca4,_0x4691e4(0x1f9)),_0x5877ea=_0x18fafc?_0x57eef6:TemplateReplacer[_0x4691e4(0x209)](_0x57eef6,_0x34a487,_0x50908b,_0x2b7744,_0x27e4cf,_0x28fe12,_0x489e6b,_0x2234db,_0x531a56);writeFileSync(_0x5d3ecb,await a3_0x31d445[_0x4691e4(0x20c)](_0x5877ea,{'parser':'typescript'}),{'encoding':'utf8'});}const _0x17f93a=_0x50908b[_0x4691e4(0x225)],_0x125bf3={'api':{'path':_0x317a9e,'action':fileAction(_0x7f59bd,_0x3332b2)},'client':{'path':_0x5d3ecb,'action':fileAction(_0x159d55,_0x3fab1b)},'sdkConfig':{'path':_0x4203a8,'action':_0x4691e4(0x200)},..._0x365cc6?{'modelRegistry':{'path':_0x365cc6[_0x4691e4(0x1ff)],'action':_0x365cc6[_0x4691e4(0x20f)]?_0x4691e4(0x200):_0x4691e4(0x215)},'modelRuntime':{'path':_0x275887,'action':_0x36a81d?_0x359182?'refreshed':'created':_0x359182?_0x4691e4(0x218):_0x4691e4(0x20b)}}:{}},_0x33bfe1=existsSync(_0x317a9e)&&readFileSync(_0x317a9e,_0x4691e4(0x1f9))['includes'](MODEL_REGISTRY_FILE_NAME['replace'](_0x4691e4(0x213),'')),_0x535096=existsSync(_0x5d3ecb)&&readFileSync(_0x5d3ecb,'utf8')['includes'](_0x4691e4(0x207)),_0x1cfd1c=_0x18fafc?!_0x33bfe1||!_0x535096||!existsSync(_0x275887):![],_0x7235f5=_0x18fafc?_0x1cfd1c:_0x125bf3['api'][_0x4691e4(0x204)]===_0x4691e4(0x218)||_0x125bf3[_0x4691e4(0x217)][_0x4691e4(0x204)]===_0x4691e4(0x218);return logger['success']('init-api',_0x7235f5?a3_0x24bce3['basename'](_0x4203a8)+_0x4691e4(0x1fa):_0x18fafc?_0x4691e4(0x1f3):'API\x20scaffold\x20written.',undefined,{'apiFile':_0x317a9e,'clientFile':_0x5d3ecb,'sdkConfig':_0x4203a8,'modelCount':_0x17f93a,'configName':_0x5f1a5e,'isDefaultConfig':_0x372cea,'needsAgentMerge':_0x7235f5,'needsProjectUpgrade':_0x1cfd1c,'files':_0x125bf3}),{'appCode':_0x34a487,'modelCount':_0x17f93a,'models':_0x50908b,'apiFilePath':_0x317a9e,'clientFilePath':_0x5d3ecb,'sdkConfigPath':_0x4203a8,'modelRegistryPath':_0x365cc6?.[_0x4691e4(0x1ff)],'modelRuntimePath':_0x275887,'modelProfile':_0x42778a['modelProfile']?.[_0x4691e4(0x222)],'configName':_0x5f1a5e,'isDefaultConfig':_0x372cea,'sdkRouting':_0x4e582,'files':_0x125bf3,'needsAgentMerge':_0x7235f5,'needsProjectUpgrade':_0x1cfd1c};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x1b0097=a4_0x3f86;function a4_0x3f86(_0x23464e,_0x2cddd6){_0x23464e=_0x23464e-0x1c2;const _0x31e58b=a4_0x31e5();let _0x3f864f=_0x31e58b[_0x23464e];return _0x3f864f;}function a4_0x31e5(){const _0x43b2f9=['3247986FlyEIU','8aoDEHF','stringify','\x20as\x20const;\x0a','-sdk-config.ts','1049074jKkVjJ','sdk-config.ts',',\x0a}','runtimeDomain:\x20','utf8','/**\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','runtimeDomain','3079161zijZul','join','length','273135lBHfcS','typescript','3619984KqWUhL','5uLrZSX','5022378MNnnsG','2568843wYHQkP','format'];a4_0x31e5=function(){return _0x43b2f9;};return a4_0x31e5();}(function(_0x4ae70a,_0x54e636){const _0x575ccd=a4_0x3f86,_0x3ae0a8=_0x4ae70a();while(!![]){try{const _0x5c660a=parseInt(_0x575ccd(0x1d0))/0x1+-parseInt(_0x575ccd(0x1c6))/0x2+parseInt(_0x575ccd(0x1d5))/0x3+-parseInt(_0x575ccd(0x1d2))/0x4+-parseInt(_0x575ccd(0x1d3))/0x5*(-parseInt(_0x575ccd(0x1d4))/0x6)+parseInt(_0x575ccd(0x1d7))/0x7+parseInt(_0x575ccd(0x1c2))/0x8*(-parseInt(_0x575ccd(0x1cd))/0x9);if(_0x5c660a===_0x54e636)break;else _0x3ae0a8['push'](_0x3ae0a8['shift']());}catch(_0x668453){_0x3ae0a8['push'](_0x3ae0a8['shift']());}}}(a4_0x31e5,0xa0d7f));import{mkdirSync,writeFileSync}from'node:fs';import a4_0x4fcce3 from'node:path';import a4_0x357eff from'prettier';export const SDK_CONFIG_FILE_NAME=a4_0x1b0097(0x1c7);export function getSdkConfigFileName(_0x3abbcb=''){const _0x173684=a4_0x1b0097;return _0x3abbcb?_0x3abbcb+_0x173684(0x1c5):SDK_CONFIG_FILE_NAME;}export async function generateSdkConfigFile(_0x395f38,_0x459991={},_0x3f4825=''){const _0x2e8156=a4_0x1b0097,_0x2513d2=[];_0x459991['runtimeDomain']&&_0x2513d2['push'](_0x2e8156(0x1c9)+JSON[_0x2e8156(0x1c3)](_0x459991[_0x2e8156(0x1cc)]));const _0x121df6=_0x2513d2[_0x2e8156(0x1cf)]>0x0?'{\x0a\x20\x20'+_0x2513d2['join'](',\x0a\x20\x20')+_0x2e8156(0x1c8):'{}',_0x1e3ad1=_0x2e8156(0x1cb)+_0x121df6+_0x2e8156(0x1c4);mkdirSync(_0x395f38,{'recursive':!![]});const _0x2363f4=a4_0x4fcce3[_0x2e8156(0x1ce)](_0x395f38,getSdkConfigFileName(_0x3f4825));return writeFileSync(_0x2363f4,await a4_0x357eff[_0x2e8156(0x1d6)](_0x1e3ad1,{'parser':_0x2e8156(0x1d1)}),_0x2e8156(0x1ca)),_0x2363f4;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1dbbcb,_0x16b8ac){const _0x5ca1fc=a5_0x41fe,_0x296fd5=_0x1dbbcb();while(!![]){try{const _0x15b3ea=parseInt(_0x5ca1fc(0x1f7))/0x1*(parseInt(_0x5ca1fc(0x1f6))/0x2)+parseInt(_0x5ca1fc(0x1eb))/0x3*(-parseInt(_0x5ca1fc(0x1f2))/0x4)+-parseInt(_0x5ca1fc(0x1f1))/0x5*(-parseInt(_0x5ca1fc(0x1e8))/0x6)+parseInt(_0x5ca1fc(0x1e9))/0x7*(parseInt(_0x5ca1fc(0x1e5))/0x8)+-parseInt(_0x5ca1fc(0x1f3))/0x9+parseInt(_0x5ca1fc(0x1ef))/0xa+-parseInt(_0x5ca1fc(0x1e1))/0xb;if(_0x15b3ea===_0x16b8ac)break;else _0x296fd5['push'](_0x296fd5['shift']());}catch(_0x18648e){_0x296fd5['push'](_0x296fd5['shift']());}}}(a5_0x54e9,0xa6736));export function parseLegacyApiModels(_0x5b9878){const _0x576645=a5_0x41fe,_0x53220f=[],_0x12d871=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x124365;while((_0x124365=_0x12d871['exec'](_0x5b9878))!==null){_0x53220f[_0x576645(0x1f4)]({'datasetCode':_0x124365[0x1],'tableName':_0x124365[0x2],'name':_0x124365[0x3],'alias':_0x124365[0x4]});}return _0x53220f;}export function parseLegacyApiAppCode(_0x468494){const _0x128790=a5_0x41fe;return _0x468494[_0x128790(0x1e6)](/export\s+const\s+[A-Z0-9_]*APP_CODE(?:\s*:\s*string)?\s*=\s*["']([^"']+)["']/)?.[0x1];}function a5_0x54e9(){const _0x226558=['1402IsDKuv','1231ovjaXN','Generated\x20by\x20Rabetbase\x20CLI','map','17063970CkRfGW','some','APP_CODE','length','152nBgGJh','match','matchAll','6hTVzqK','303828BbzxWo','endsWith','175506uftFQu','includes','replace','@lovrabet/sdk','8170410AqNcUR','MODELS_CONFIG','2222245MxJewy','12aJRIIF','4864851HvJjaB','push','test'];a5_0x54e9=function(){return _0x226558;};return a5_0x54e9();}function a5_0x41fe(_0x283843,_0x49928d){_0x283843=_0x283843-0x1df;const _0x54e98f=a5_0x54e9();let _0x41fe5e=_0x54e98f[_0x283843];return _0x41fe5e;}function stripComments(_0x252285){const _0xc13870=a5_0x41fe;return _0x252285['replace'](/\/\*[\s\S]*?\*\//g,'')[_0xc13870(0x1ed)](/\/\/.*$/gm,'');}export function isLegacyGeneratedApiScaffold(_0x3d4fd7){const _0x121338=a5_0x41fe;if(!_0x3d4fd7[_0x121338(0x1ec)](_0x121338(0x1df)))return![];const _0xe068e3=stripComments(_0x3d4fd7),_0x4afe9e=[..._0xe068e3['matchAll'](/^import[\s\S]*?from\s+["']([^"']+)["'];?$/gm)]['map'](_0x2d592e=>_0x2d592e[0x1]);if(_0x4afe9e['length']!==0x1||_0x4afe9e[0x0]!==_0x121338(0x1ee))return![];const _0x366893=[..._0xe068e3[_0x121338(0x1e7)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x121338(0x1e0)](_0x2fa6df=>_0x2fa6df[0x1]);if(_0x366893[_0x121338(0x1e4)]!==0x2||!_0x366893[_0x121338(0x1e2)](_0x5a6c0a=>_0x5a6c0a[_0x121338(0x1ea)](_0x121338(0x1e3)))||!_0x366893['some'](_0x47c9d2=>_0x47c9d2[_0x121338(0x1ea)](_0x121338(0x1f0))))return![];const _0x24043f=[..._0xe068e3[_0x121338(0x1e7)](/^([A-Za-z_$][\w$]*)\s*\(/gm)][_0x121338(0x1e0)](_0x122b88=>_0x122b88[0x1]);return _0x24043f[_0x121338(0x1e4)]===0x1&&_0x24043f[0x0]==='registerModels';}export function isLegacyGeneratedClientScaffold(_0x5693f1){const _0x2a615e=a5_0x41fe;if(!_0x5693f1['includes'](_0x2a615e(0x1df)))return![];const _0x27e0c7=stripComments(_0x5693f1),_0x37043b=[..._0x27e0c7[_0x2a615e(0x1e7)](/^(?:import[\s\S]*?from\s+|import\s+)["']([^"']+)["'];?$/gm)][_0x2a615e(0x1e0)](_0x1f4a8b=>_0x1f4a8b[0x1]);if(_0x37043b[_0x2a615e(0x1e2)](_0x302292=>_0x302292!==_0x2a615e(0x1ee)&&!/^\.\/(?:[\w-]+-)?(?:api|sdk-config)$/[_0x2a615e(0x1f5)](_0x302292??'')))return![];const _0x3dc481=[..._0x27e0c7[_0x2a615e(0x1e7)](/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)/gm)][_0x2a615e(0x1e0)](_0x430367=>_0x430367[0x1]);return _0x3dc481[_0x2a615e(0x1e4)]===0x1&&_0x3dc481[0x0]==='lovrabetClient';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a6_0x253f(){const _0x393fab=['profiles','alias','datasetCode','/*\x20rabetbase-model-registry:v2\x20*/','500222yriHkN','set','object','defaultProfile','2005pqnWNl','profileName','/*\x20rabetbase-model-registry:start\x20*/','get','\x22\x20with\x20an\x20empty\x20result.\x20','entries','NOT-SET','values','parse','stringify','fromEntries','find','now','flatMap','13602xkRRiC','9147000Dhaoka','outputDir','pid','.tmp','\x22\x20in\x20profile\x20\x22','allowEmptyReplacement','Model\x20alias\x20\x22','lovrabet-model-registry/v1','3296060YnGDhW','protocol','6317549OLqgGn','filter','\x22\x20maps\x20to\x20both\x20aliases\x20\x22','/*\x20rabetbase-model-registry:end\x20*/','\x22\x20in\x20the\x20registry\x20but\x20\x22','tableName','Verify\x20the\x20selected\x20app\x20and\x20login,\x20or\x20rerun\x20with\x20--force\x20--yes\x20if\x20the\x20profile\x20is\x20intentionally\x20empty.','runtimeDomain','split','utf8','\x22\x20and\x20\x22','map','models.generated.ts','\x22\x20maps\x20to\x20both\x20\x22','join','string','keys','\x20as\x20const\x20satisfies\x20LovrabetModelRegistry;\x0a','datasetCodes','appCode','\x22\x20maps\x20to\x20alias\x20\x22','models','22dhbBQK','\x0aexport\x20const\x20LOVRABET_MODEL_REGISTRY\x20=\x0a\x20\x20','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','test','slice','name','205575RdBJOY','replace','1203714RoatXM','isArray','value','length'];a6_0x253f=function(){return _0x393fab;};return a6_0x253f();}const a6_0xe12390=a6_0x13ea;(function(_0x1dc2f3,_0x29cdf4){const _0x2075d9=a6_0x13ea,_0x22a550=_0x1dc2f3();while(!![]){try{const _0x382396=-parseInt(_0x2075d9(0xa4))/0x1+parseInt(_0x2075d9(0x94))/0x2*(-parseInt(_0x2075d9(0x9a))/0x3)+parseInt(_0x2075d9(0xbf))/0x4+-parseInt(_0x2075d9(0xa8))/0x5*(-parseInt(_0x2075d9(0xb6))/0x6)+-parseInt(_0x2075d9(0xc1))/0x7+parseInt(_0x2075d9(0xb7))/0x8+-parseInt(_0x2075d9(0x9c))/0x9;if(_0x382396===_0x29cdf4)break;else _0x22a550['push'](_0x22a550['shift']());}catch(_0x29d9d4){_0x22a550['push'](_0x22a550['shift']());}}}(a6_0x253f,0x8f1df));function a6_0x13ea(_0x2ada11,_0x25896f){_0x2ada11=_0x2ada11-0x8e;const _0x253f47=a6_0x253f();let _0x13eac1=_0x253f47[_0x2ada11];return _0x13eac1;}import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import a6_0x22d2cf from'node:path';export const MODEL_REGISTRY_FILE_NAME=a6_0xe12390(0xcd);export const MODEL_RUNTIME_FILE_NAME='model-runtime.ts';export const MODEL_REGISTRY_VERSION_MARKER=a6_0xe12390(0xa3);const LEGACY_MODEL_REGISTRY_V2_PROTOCOL='lovrabet-model-registry/v2',REGISTRY_START=a6_0xe12390(0xaa),REGISTRY_END=a6_0xe12390(0xc4);function emptyRegistry(_0x4d555c){return{'defaultProfile':_0x4d555c,'profiles':{},'models':[]};}function extractRegistryJson(_0x462cc5){const _0x26f84d=a6_0xe12390,_0x3f6c43=_0x462cc5['indexOf'](REGISTRY_START),_0x4e0147=_0x462cc5['indexOf'](REGISTRY_END);if(_0x3f6c43<0x0||_0x4e0147<=_0x3f6c43)return undefined;return _0x462cc5[_0x26f84d(0x98)](_0x3f6c43+REGISTRY_START[_0x26f84d(0x9f)],_0x4e0147)['trim']()[_0x26f84d(0x9b)](/\s+as const satisfies LovrabetModelRegistry;?$/,'')[_0x26f84d(0x9b)](/;$/,'');}function migrateLegacyRegistry(_0x4d152f){const _0x427920=a6_0xe12390,_0x2d44c7=emptyRegistry(_0x4d152f[_0x427920(0xa7)]);for(const [_0x35bf8d,_0x3dc7a2]of Object[_0x427920(0xad)](_0x4d152f[_0x427920(0xa0)])){_0x2d44c7[_0x427920(0xa0)][_0x35bf8d]={'appCode':_0x3dc7a2['appCode'],'runtimeDomain':_0x3dc7a2[_0x427920(0xc8)]},mergeProfileModels(_0x2d44c7,_0x35bf8d,_0x3dc7a2[_0x427920(0x93)]);}return _0x2d44c7;}function generatedObjectLiteralToJson(_0x49179c){const _0x251649=a6_0xe12390;let _0x1571e4='',_0x358cc1,_0x108578=![],_0x36d79b;for(let _0x100707=0x0;_0x100707<_0x49179c[_0x251649(0x9f)];_0x100707++){const _0x2a398a=_0x49179c[_0x100707];if(_0x358cc1){_0x1571e4+=_0x2a398a;if(_0x108578)_0x108578=![];else{if(_0x2a398a==='\x5c')_0x108578=!![];else{if(_0x2a398a===_0x358cc1)_0x358cc1=undefined;}}continue;}if(_0x2a398a==='\x22'){_0x358cc1=_0x2a398a,_0x1571e4+=_0x2a398a,_0x36d79b='value';continue;}if(_0x2a398a===','){let _0x47af64=_0x100707+0x1;while(/\s/[_0x251649(0x97)](_0x49179c[_0x47af64]??''))_0x47af64++;if(_0x49179c[_0x47af64]==='}'||_0x49179c[_0x47af64]===']')continue;_0x1571e4+=_0x2a398a,_0x36d79b=',';continue;}if(_0x2a398a==='{'||_0x2a398a==='['){_0x1571e4+=_0x2a398a,_0x36d79b=_0x2a398a;continue;}if(_0x2a398a==='}'||_0x2a398a===']'){_0x1571e4+=_0x2a398a,_0x36d79b=_0x2a398a;continue;}if((_0x36d79b==='{'||_0x36d79b===',')&&/[A-Za-z_$]/['test'](_0x2a398a)){let _0x42f217=_0x100707+0x1;while(/[A-Za-z0-9_$]/[_0x251649(0x97)](_0x49179c[_0x42f217]??''))_0x42f217++;let _0x10c49f=_0x42f217;while(/\s/[_0x251649(0x97)](_0x49179c[_0x10c49f]??''))_0x10c49f++;if(_0x49179c[_0x10c49f]===':'){_0x1571e4+=JSON[_0x251649(0xb1)](_0x49179c[_0x251649(0x98)](_0x100707,_0x42f217)),_0x100707=_0x42f217-0x1,_0x36d79b='key';continue;}}_0x1571e4+=_0x2a398a;if(!/\s/[_0x251649(0x97)](_0x2a398a)&&_0x2a398a!==':')_0x36d79b=_0x251649(0x9e);}return _0x1571e4;}function parseGeneratedRegistryJson(_0x32d855){const _0x12d16a=a6_0xe12390;try{return JSON[_0x12d16a(0xb0)](_0x32d855);}catch{return JSON[_0x12d16a(0xb0)](generatedObjectLiteralToJson(_0x32d855));}}function normalizeModelEntries(_0x573f3c,_0x4c2b73){const _0x343d74=a6_0xe12390,_0x5d92fc=Object[_0x343d74(0x8e)](_0x573f3c),_0x380d75=[];for(const _0x44942f of _0x4c2b73){if(!_0x44942f||typeof _0x44942f!==_0x343d74(0xa6)||Array[_0x343d74(0x9d)](_0x44942f))return undefined;const _0x3f1bb2=_0x44942f;if(typeof _0x3f1bb2[_0x343d74(0xa1)]!=='string'||typeof _0x3f1bb2['tableName']!==_0x343d74(0xd0)||typeof _0x3f1bb2['name']!==_0x343d74(0xd0))return undefined;let _0x167612;if(typeof _0x3f1bb2[_0x343d74(0xa2)]===_0x343d74(0xd0)&&_0x3f1bb2[_0x343d74(0x90)]===undefined)_0x167612=Object[_0x343d74(0xb2)](_0x5d92fc[_0x343d74(0xcc)](_0x44f7b8=>[_0x44f7b8,_0x3f1bb2[_0x343d74(0xa2)]]));else{if(_0x3f1bb2['datasetCode']===undefined&&_0x3f1bb2['datasetCodes']&&typeof _0x3f1bb2[_0x343d74(0x90)]===_0x343d74(0xa6)&&!Array['isArray'](_0x3f1bb2[_0x343d74(0x90)])&&Object[_0x343d74(0xaf)](_0x3f1bb2['datasetCodes'])['every'](_0x16ae0b=>typeof _0x16ae0b===_0x343d74(0xd0)))_0x167612={..._0x3f1bb2['datasetCodes']};else return undefined;}_0x380d75['push']({'alias':_0x3f1bb2['alias'],'tableName':_0x3f1bb2[_0x343d74(0xc6)],'name':_0x3f1bb2[_0x343d74(0x99)],'datasetCodes':_0x167612});}return _0x380d75;}export function parseModelRegistry(_0x3b6f0e){const _0x34e0f6=a6_0xe12390,_0x4ef26d=extractRegistryJson(_0x3b6f0e);if(!_0x4ef26d)return undefined;try{const _0x36a2ad=parseGeneratedRegistryJson(_0x4ef26d);if(typeof _0x36a2ad['defaultProfile']!==_0x34e0f6(0xd0)||!_0x36a2ad[_0x34e0f6(0xa0)]||typeof _0x36a2ad[_0x34e0f6(0xa0)]!=='object')return undefined;if(_0x36a2ad[_0x34e0f6(0xc0)]===_0x34e0f6(0xbe))return migrateLegacyRegistry(_0x36a2ad);if(!(_0x36a2ad[_0x34e0f6(0xc0)]===LEGACY_MODEL_REGISTRY_V2_PROTOCOL||_0x36a2ad[_0x34e0f6(0xc0)]===undefined&&_0x3b6f0e['includes'](MODEL_REGISTRY_VERSION_MARKER))||!Array[_0x34e0f6(0x9d)](_0x36a2ad[_0x34e0f6(0x93)]))return undefined;const _0x2d0c07=_0x36a2ad[_0x34e0f6(0xa0)],_0x1147a6=normalizeModelEntries(_0x2d0c07,_0x36a2ad[_0x34e0f6(0x93)]);if(!_0x1147a6)return undefined;return{'defaultProfile':_0x36a2ad[_0x34e0f6(0xa7)],'profiles':_0x2d0c07,'models':_0x1147a6};}catch{return undefined;}}export function readModelRegistry(_0x5d2948){const _0x980595=a6_0xe12390;if(!existsSync(_0x5d2948))return undefined;try{return parseModelRegistry(readFileSync(_0x5d2948,_0x980595(0xca)));}catch{return undefined;}}function registrySource(_0x2a9da5){const _0x4451e5=a6_0xe12390,_0xe04aad=Object['keys'](_0x2a9da5[_0x4451e5(0xa0)]),_0x1a044c=_0x2a9da5[_0x4451e5(0x93)][_0x4451e5(0xcc)](_0x556a7f=>{const _0x41d211=_0x4451e5,_0x4f5368=_0xe04aad[_0x41d211(0xcc)](_0x1f0ded=>_0x556a7f['datasetCodes'][_0x1f0ded]),_0xde3f07=_0x4f5368[0x0],_0x4a859d=_0xde3f07!==undefined&&_0x4f5368['every'](_0x1d3d68=>_0x1d3d68===_0xde3f07),_0x114461={'alias':_0x556a7f[_0x41d211(0xa1)],'tableName':_0x556a7f[_0x41d211(0xc6)],'name':_0x556a7f[_0x41d211(0x99)]};return _0x4a859d?{..._0x114461,'datasetCode':_0xde3f07}:{..._0x114461,'datasetCodes':_0x556a7f[_0x41d211(0x90)]};}),_0x3242db=JSON[_0x4451e5(0xb1)]({'defaultProfile':_0x2a9da5[_0x4451e5(0xa7)],'profiles':_0x2a9da5['profiles'],'models':_0x1a044c},null,0x2)[_0x4451e5(0xc9)]('\x0a')[_0x4451e5(0xcc)](_0x5c83dc=>'\x20\x20'+_0x5c83dc)[_0x4451e5(0xcf)]('\x0a');return'/**\x0a\x20*\x20Dataset\x20model\x20facts\x20generated\x20by\x20Rabetbase\x20CLI.\x0a\x20*\x0a\x20*\x20This\x20file\x20is\x20safe\x20to\x20commit.\x20Do\x20not\x20edit\x20it\x20manually\x20and\x20never\x20add\x20credentials.\x0a\x20*/\x0a\x0aexport\x20interface\x20LovrabetModelProfile\x20{\x0a\x20\x20appCode:\x20string;\x0a\x20\x20runtimeDomain:\x20string;\x0a}\x0a\x0aexport\x20interface\x20LovrabetModelEntryMetadata\x20{\x0a\x20\x20alias:\x20string;\x0a\x20\x20tableName:\x20string;\x0a\x20\x20name:\x20string;\x0a}\x0a\x0aexport\x20type\x20LovrabetModelEntry\x20=\x20LovrabetModelEntryMetadata\x20&\x20(\x0a\x20\x20|\x20{\x20datasetCode:\x20string;\x20datasetCodes?:\x20never\x20}\x0a\x20\x20|\x20{\x20datasetCode?:\x20never;\x20datasetCodes:\x20Record<string,\x20string>\x20}\x0a);\x0a\x0aexport\x20interface\x20LovrabetModelRegistry\x20{\x0a\x20\x20defaultProfile:\x20string;\x0a\x20\x20profiles:\x20Record<string,\x20LovrabetModelProfile>;\x0a\x20\x20models:\x20LovrabetModelEntry[];\x0a}\x0a\x0a'+MODEL_REGISTRY_VERSION_MARKER+_0x4451e5(0x95)+REGISTRY_START+'\x0a'+_0x3242db+_0x4451e5(0x8f)+REGISTRY_END+'\x0a';}function mergeProfileModels(_0x36017d,_0x336da2,_0x51796b){const _0x154f11=a6_0xe12390,_0x34bc33=_0x51796b[_0x154f11(0xcc)](_0x40b64c=>({..._0x40b64c,'alias':_0x40b64c[_0x154f11(0xa1)]||_0x40b64c['tableName']})),_0x43b8b8=new Map(),_0xf0d512=new Map();for(const _0x49ecbb of _0x34bc33){const _0x21a332=_0x43b8b8[_0x154f11(0xab)](_0x49ecbb[_0x154f11(0xa1)]);if(_0x21a332&&_0x21a332!==_0x49ecbb[_0x154f11(0xc6)])throw new Error(_0x154f11(0xbd)+_0x49ecbb[_0x154f11(0xa1)]+_0x154f11(0xce)+_0x21a332+_0x154f11(0xcb)+_0x49ecbb[_0x154f11(0xc6)]+'\x22\x20in\x20profile\x20\x22'+_0x336da2+'\x22.');const _0x32ad10=_0xf0d512[_0x154f11(0xab)](_0x49ecbb[_0x154f11(0xc6)]);if(_0x32ad10&&_0x32ad10!==_0x49ecbb[_0x154f11(0xa1)])throw new Error('Table\x20\x22'+_0x49ecbb['tableName']+_0x154f11(0xc3)+_0x32ad10+_0x154f11(0xcb)+_0x49ecbb[_0x154f11(0xa1)]+_0x154f11(0xbb)+_0x336da2+'\x22.');_0x43b8b8[_0x154f11(0xa5)](_0x49ecbb[_0x154f11(0xa1)],_0x49ecbb['tableName']),_0xf0d512[_0x154f11(0xa5)](_0x49ecbb[_0x154f11(0xc6)],_0x49ecbb[_0x154f11(0xa1)]);const _0x3825cd=_0x36017d[_0x154f11(0x93)]['find'](_0x2c6c33=>_0x2c6c33[_0x154f11(0xa1)]===_0x49ecbb[_0x154f11(0xa1)]);if(_0x3825cd&&_0x3825cd[_0x154f11(0xc6)]!==_0x49ecbb[_0x154f11(0xc6)])throw new Error(_0x154f11(0xbd)+_0x49ecbb['alias']+'\x22\x20maps\x20to\x20table\x20\x22'+_0x3825cd['tableName']+'\x22\x20in\x20the\x20registry\x20but\x20\x22'+_0x49ecbb[_0x154f11(0xc6)]+'\x22\x20in\x20profile\x20\x22'+_0x336da2+'\x22.');const _0x26a0ef=_0x36017d[_0x154f11(0x93)][_0x154f11(0xb3)](_0x50df00=>_0x50df00[_0x154f11(0xc6)]===_0x49ecbb[_0x154f11(0xc6)]);if(_0x26a0ef&&_0x26a0ef[_0x154f11(0xa1)]!==_0x49ecbb['alias'])throw new Error('Table\x20\x22'+_0x49ecbb[_0x154f11(0xc6)]+_0x154f11(0x92)+_0x26a0ef[_0x154f11(0xa1)]+_0x154f11(0xc5)+_0x49ecbb[_0x154f11(0xa1)]+_0x154f11(0xbb)+_0x336da2+'\x22.');}for(const _0x5acc9f of _0x36017d[_0x154f11(0x93)]){delete _0x5acc9f['datasetCodes'][_0x336da2];}for(const _0x4413cf of _0x34bc33){let _0x4b72a7=_0x36017d[_0x154f11(0x93)]['find'](_0x24723b=>_0x24723b[_0x154f11(0xa1)]===_0x4413cf['alias']);!_0x4b72a7&&(_0x4b72a7={'alias':_0x4413cf[_0x154f11(0xa1)],'tableName':_0x4413cf[_0x154f11(0xc6)],'name':_0x4413cf[_0x154f11(0x99)],'datasetCodes':{}},_0x36017d[_0x154f11(0x93)]['push'](_0x4b72a7)),(_0x336da2===_0x36017d[_0x154f11(0xa7)]||!_0x4b72a7[_0x154f11(0x90)][_0x36017d[_0x154f11(0xa7)]])&&(_0x4b72a7['alias']=_0x4413cf[_0x154f11(0xa1)],_0x4b72a7['tableName']=_0x4413cf[_0x154f11(0xc6)],_0x4b72a7[_0x154f11(0x99)]=_0x4413cf[_0x154f11(0x99)]),_0x4b72a7[_0x154f11(0x90)][_0x336da2]=_0x4413cf[_0x154f11(0xa2)];}_0x36017d['models']=_0x36017d[_0x154f11(0x93)][_0x154f11(0xc2)](_0x55fa2f=>Object[_0x154f11(0x8e)](_0x55fa2f[_0x154f11(0x90)])[_0x154f11(0x9f)]>0x0);}function removeUnboundProfiles(_0x34cd01){const _0xc41751=a6_0xe12390,_0xa32250=Object[_0xc41751(0xad)](_0x34cd01[_0xc41751(0xa0)])[_0xc41751(0xc2)](([,_0x5753d6])=>_0x5753d6[_0xc41751(0x91)]===_0xc41751(0xae))[_0xc41751(0xcc)](([_0x4c34a6])=>_0x4c34a6);if(_0xa32250[_0xc41751(0x9f)]===0x0)return;for(const _0x5e787 of _0xa32250){delete _0x34cd01[_0xc41751(0xa0)][_0x5e787];for(const _0x34184c of _0x34cd01[_0xc41751(0x93)]){delete _0x34184c[_0xc41751(0x90)][_0x5e787];}}_0x34cd01[_0xc41751(0x93)]=_0x34cd01[_0xc41751(0x93)][_0xc41751(0xc2)](_0x10d1e6=>Object['keys'](_0x10d1e6[_0xc41751(0x90)])[_0xc41751(0x9f)]>0x0);}export function getProfileModels(_0x54a084,_0x18ee24){const _0x25a365=a6_0xe12390;return _0x54a084[_0x25a365(0x93)][_0x25a365(0xb5)](_0x44bc77=>{const _0x3935b5=_0x25a365,_0x57931f=_0x44bc77[_0x3935b5(0x90)][_0x18ee24];return _0x57931f?[{'datasetCode':_0x57931f,'tableName':_0x44bc77[_0x3935b5(0xc6)],'name':_0x44bc77[_0x3935b5(0x99)],'alias':_0x44bc77[_0x3935b5(0xa1)]}]:[];});}export function updateModelRegistry(_0x2b2582){const _0x9e78be=a6_0xe12390,_0x122db4=a6_0x22d2cf[_0x9e78be(0xcf)](_0x2b2582[_0x9e78be(0xb8)],MODEL_REGISTRY_FILE_NAME),_0x107e26=existsSync(_0x122db4),_0x16c4f9=readModelRegistry(_0x122db4);if(_0x107e26&&!_0x16c4f9)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x9e78be(0x96));const _0x32d1f1=_0x16c4f9??emptyRegistry(_0x2b2582[_0x9e78be(0xa7)]);if(_0x2b2582[_0x9e78be(0x91)]!=='NOT-SET')removeUnboundProfiles(_0x32d1f1);const _0x3adbc9=_0x16c4f9?getProfileModels(_0x16c4f9,_0x2b2582[_0x9e78be(0xa9)])['length']:0x0;if(_0x3adbc9>0x0&&_0x2b2582['models']['length']===0x0&&!_0x2b2582[_0x9e78be(0xbc)])throw new Error('Refusing\x20to\x20replace\x20'+_0x3adbc9+'\x20model(s)\x20in\x20profile\x20\x22'+_0x2b2582[_0x9e78be(0xa9)]+_0x9e78be(0xac)+_0x9e78be(0xc7));_0x32d1f1[_0x9e78be(0xa7)]=_0x2b2582['defaultProfile'],_0x32d1f1[_0x9e78be(0xa0)][_0x2b2582[_0x9e78be(0xa9)]]={'appCode':_0x2b2582[_0x9e78be(0x91)],'runtimeDomain':_0x2b2582[_0x9e78be(0xc8)]},mergeProfileModels(_0x32d1f1,_0x2b2582[_0x9e78be(0xa9)],_0x2b2582[_0x9e78be(0x93)]),mkdirSync(_0x2b2582[_0x9e78be(0xb8)],{'recursive':!![]});const _0x4b3098=_0x122db4+'.'+process[_0x9e78be(0xb9)]+'.'+Date[_0x9e78be(0xb4)]()+_0x9e78be(0xba);try{writeFileSync(_0x4b3098,registrySource(_0x32d1f1),{'encoding':_0x9e78be(0xca),'mode':0x1a4}),renameSync(_0x4b3098,_0x122db4);}catch(_0x310b0c){try{unlinkSync(_0x4b3098);}catch{}throw _0x310b0c;}return{'path':_0x122db4,'registry':_0x32d1f1,'existed':_0x107e26};}
|
|
1
|
+
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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a7_0x3d9542=a7_0x5f0d;function a7_0x4523(){const _0xea0520=['utf8','12ramdZF','1587192lYlacy','join','cwd','replace','relative','resolve','747410ApyYHU','format','3267464WjEgzA','typescript','1825428VZsjFN','1457197xyGVVX','profile-client.ts.tpl','30EDhfaW','dirname','1nxOboR','78670gmfTQZ','1076934efQnhR','9afdTKK','../../templates/generate-api','all','{ProjectRoutingImport}','startsWith'];a7_0x4523=function(){return _0xea0520;};return a7_0x4523();}(function(_0x431688,_0x5909e6){const _0x3e7fb8=a7_0x5f0d,_0x1d588a=_0x431688();while(!![]){try{const _0x135898=parseInt(_0x3e7fb8(0x15d))/0x1*(parseInt(_0x3e7fb8(0x154))/0x2)+-parseInt(_0x3e7fb8(0x146))/0x3+-parseInt(_0x3e7fb8(0x14d))/0x4*(-parseInt(_0x3e7fb8(0x145))/0x5)+parseInt(_0x3e7fb8(0x14e))/0x6+-parseInt(_0x3e7fb8(0x159))/0x7+-parseInt(_0x3e7fb8(0x156))/0x8*(parseInt(_0x3e7fb8(0x147))/0x9)+-parseInt(_0x3e7fb8(0x15b))/0xa*(-parseInt(_0x3e7fb8(0x158))/0xb);if(_0x135898===_0x5909e6)break;else _0x1d588a['push'](_0x1d588a['shift']());}catch(_0x444979){_0x1d588a['push'](_0x1d588a['shift']());}}}(a7_0x4523,0x32b55));import{readFileSync}from'node:fs';import a7_0x1769f5 from'node:path';function a7_0x5f0d(_0x4db3a0,_0x4ee5e6){_0x4db3a0=_0x4db3a0-0x145;const _0x45234b=a7_0x4523();let _0x5f0d2b=_0x45234b[_0x4db3a0];return _0x5f0d2b;}import{fileURLToPath}from'node:url';import a7_0x14337e from'prettier';import{PROJECT_DOMAIN_ROUTING_FILE_NAME}from'../config/project-domain-routing.js';function relativeImport(_0x12cf15,_0xd35966){const _0x95e1ea=a7_0x5f0d;let _0x38335f=a7_0x1769f5[_0x95e1ea(0x152)](_0x12cf15,_0xd35966)['replace'](/\\/g,'/');if(!_0x38335f[_0x95e1ea(0x14b)]('.'))_0x38335f='./'+_0x38335f;return _0x38335f;}export async function renderModelRegistryScaffold(_0x1a5243,_0x1891a2=process[a7_0x3d9542(0x150)]()){const _0x126e25=a7_0x3d9542,_0x283e34=fileURLToPath(import.meta.url),_0x1a3fd9=a7_0x1769f5[_0x126e25(0x153)](a7_0x1769f5[_0x126e25(0x15c)](_0x283e34),_0x126e25(0x148)),_0x37b5a5=relativeImport(a7_0x1769f5[_0x126e25(0x153)](_0x1a5243),a7_0x1769f5[_0x126e25(0x153)](_0x1891a2,PROJECT_DOMAIN_ROUTING_FILE_NAME)),_0x241bbf=readFileSync(a7_0x1769f5[_0x126e25(0x14f)](_0x1a3fd9,'profile-api.ts.tpl'),_0x126e25(0x14c))[_0x126e25(0x151)](_0x126e25(0x14a),_0x37b5a5),[_0x3f963a,_0x1ecdbd,_0x482a94]=await Promise[_0x126e25(0x149)]([a7_0x14337e[_0x126e25(0x155)](_0x241bbf,{'parser':'typescript'}),a7_0x14337e[_0x126e25(0x155)](readFileSync(a7_0x1769f5[_0x126e25(0x14f)](_0x1a3fd9,_0x126e25(0x15a)),'utf8'),{'parser':_0x126e25(0x157)}),a7_0x14337e[_0x126e25(0x155)](readFileSync(a7_0x1769f5[_0x126e25(0x14f)](_0x1a3fd9,'model-runtime.ts.tpl'),_0x126e25(0x14c)),{'parser':'typescript'})]);return{'api':_0x3f963a,'client':_0x1ecdbd,'modelRuntime':_0x482a94};}
|
package/lib/api/model-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5374f6,_0x4cdf77){const _0x4ed924=a8_0x3276,_0x46fd19=_0x5374f6();while(!![]){try{const _0x8843fa=-parseInt(_0x4ed924(0x8c))/0x1+parseInt(_0x4ed924(0x72))/0x2*(parseInt(_0x4ed924(0x89))/0x3)+parseInt(_0x4ed924(0x8d))/0x4*(-parseInt(_0x4ed924(0x8a))/0x5)+-parseInt(_0x4ed924(0x77))/0x6+-parseInt(_0x4ed924(0x88))/0x7+parseInt(_0x4ed924(0x7f))/0x8*(-parseInt(_0x4ed924(0x80))/0x9)+parseInt(_0x4ed924(0x82))/0xa;if(_0x8843fa===_0x4cdf77)break;else _0x46fd19['push'](_0x46fd19['shift']());}catch(_0x4a1f57){_0x46fd19['push'](_0x46fd19['shift']());}}}(a8_0x3127,0xa0e84));import{existsSync}from'node:fs';import a8_0x15b512 from'node:path';import{readRawConfig}from'../context/config-loader.js';function a8_0x3276(_0xbb42ea,_0x6c9cc8){_0xbb42ea=_0xbb42ea-0x6d;const _0x3127bf=a8_0x3127();let _0x327668=_0x3127bf[_0xbb42ea];return _0x327668;}function a8_0x3127(){const _0x1a68ab=['\x22\x20is\x20missing\x20from\x20','\x22\x20belongs\x20to\x20multiple\x20model\x20profiles:\x20','length','cwd','defaultProfile','15032JSRPsI','4149cIMkyU','appCode','45262860KLYDiZ','join','entries','-api.ts','apps','Model\x20profile\x20\x22','5649378ovoAQq','3oBtsla','645RDWYhS','map','967900ltmWbX','28724pmXSiw','apiDir','resolve','profiles','find','object','defaultApp','1162886VcoFUf','Run\x20`','\x20api\x20pull\x20--app\x20','filter','api.ts','5286786PtSTiJ','string','`\x20first.'];a8_0x3127=function(){return _0x1a68ab;};return a8_0x3127();}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(_0x433aff,_0x34e4d4,_0x2927a7){const _0x3ed09e=a8_0x3276,_0x12983a=a8_0x15b512[_0x3ed09e(0x6d)](process[_0x3ed09e(0x7d)](),_0x433aff),_0x36c779=a8_0x15b512[_0x3ed09e(0x6d)](_0x12983a,_0x3ed09e(0x76)),_0x3324a6=a8_0x15b512[_0x3ed09e(0x6d)](_0x12983a,MODEL_REGISTRY_FILE_NAME),_0x15d423=readModelRegistry(_0x3324a6);if(_0x15d423){const _0x149deb=_0x34e4d4?Object[_0x3ed09e(0x84)](_0x15d423[_0x3ed09e(0x6e)])[_0x3ed09e(0x75)](([,_0x371a5d])=>_0x371a5d[_0x3ed09e(0x81)]===_0x34e4d4):[];if(_0x2927a7){if(_0x15d423[_0x3ed09e(0x6e)][_0x2927a7])return{'filePath':_0x3324a6,'profileName':_0x2927a7};if(_0x149deb[_0x3ed09e(0x7c)]>0x0)throw CliErrors['validation'](_0x3ed09e(0x87)+_0x2927a7+_0x3ed09e(0x7a)+MODEL_REGISTRY_FILE_NAME+'.',_0x3ed09e(0x73)+CLI_BIN_NAME+_0x3ed09e(0x74)+_0x2927a7+_0x3ed09e(0x79));}else{if(_0x149deb[_0x3ed09e(0x7c)]===0x1)return{'filePath':_0x3324a6,'profileName':_0x149deb[0x0][0x0]};if(_0x149deb[_0x3ed09e(0x7c)]>0x1)throw new Error('AppCode\x20\x22'+_0x34e4d4+_0x3ed09e(0x7b)+_0x149deb[_0x3ed09e(0x8b)](([_0x45c137])=>_0x45c137)[_0x3ed09e(0x83)](',\x20')+'.\x20'+'Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.');if(_0x15d423['profiles'][_0x15d423[_0x3ed09e(0x7e)]]&&!_0x34e4d4)return{'filePath':_0x3324a6,'profileName':_0x15d423[_0x3ed09e(0x7e)]};}}if(!_0x34e4d4&&!_0x2927a7)return{'filePath':_0x36c779};const _0x5a1c4e=readRawConfig(),_0x3a4716=_0x5a1c4e[_0x3ed09e(0x86)]&&typeof _0x5a1c4e[_0x3ed09e(0x86)]===_0x3ed09e(0x70)?_0x5a1c4e[_0x3ed09e(0x86)]:{},_0x3fc886=_0x2927a7&&_0x3a4716[_0x2927a7]?[_0x2927a7,_0x3a4716[_0x2927a7]]:Object['entries'](_0x3a4716)[_0x3ed09e(0x6f)](([,_0x5d7298])=>_0x5d7298?.['appcode']===_0x34e4d4);if(!_0x3fc886)return{'filePath':_0x36c779};const [_0x1c56ab,_0x523761]=_0x3fc886,_0x1b1991=typeof _0x5a1c4e['defaultApp']===_0x3ed09e(0x78)?_0x5a1c4e[_0x3ed09e(0x71)]:undefined;if(_0x523761?.[_0x3ed09e(0x8e)])return{'filePath':_0x36c779};if(_0x1b1991&&_0x1c56ab!==_0x1b1991){const _0x47968b=a8_0x15b512[_0x3ed09e(0x6d)](_0x12983a,_0x1c56ab+_0x3ed09e(0x85));if(existsSync(_0x47968b))return{'filePath':_0x47968b};}return{'filePath':_0x36c779};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3b25c0,_0x4e9e18){const _0x1b7717=a9_0x55ac,_0x21bea5=_0x3b25c0();while(!![]){try{const _0x1d6ca5=-parseInt(_0x1b7717(0x1b3))/0x1*(-parseInt(_0x1b7717(0x1b4))/0x2)+parseInt(_0x1b7717(0x1c2))/0x3+-parseInt(_0x1b7717(0x1ba))/0x4*(-parseInt(_0x1b7717(0x1c1))/0x5)+-parseInt(_0x1b7717(0x1c5))/0x6*(parseInt(_0x1b7717(0x1c8))/0x7)+-parseInt(_0x1b7717(0x1c3))/0x8+-parseInt(_0x1b7717(0x1b2))/0x9*(parseInt(_0x1b7717(0x1be))/0xa)+parseInt(_0x1b7717(0x1c6))/0xb;if(_0x1d6ca5===_0x4e9e18)break;else _0x21bea5['push'](_0x21bea5['shift']());}catch(_0x2cc9f8){_0x21bea5['push'](_0x21bea5['shift']());}}}(a9_0x1fed,0xc6ae1));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';function a9_0x55ac(_0x4be88c,_0x224920){_0x4be88c=_0x4be88c-0x1b1;const _0x1fed8a=a9_0x1fed();let _0x55ac42=_0x1fed8a[_0x4be88c];return _0x55ac42;}import{confirm}from'@inquirer/prompts';function a9_0x1fed(){const _0x4a591c=['log','!\x20Login\x20failed.','224060zLLATt','2761449CaHbpc','11415792ZQvrlU','validation','54dtThCm','14463966FroIyT','*\x20Login\x20successful!','897911rGLBBi','start','9qGFHQd','4cbbKyt','639794CRiiaR','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','No\x20valid\x20session.\x20Login\x20now?','Run\x20`','autoYes','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','44UmqpPj','stop','nonInteractive','\x20auth\x20login\x20--yes`\x20and\x20open\x20the\x20printed\x20URL\x20in\x20your\x20browser.','6126850msyRht'];a9_0x1fed=function(){return _0x4a591c;};return a9_0x1fed();}import a9_0x103837 from'ora';export async function runAuthServer(_0x480713){const _0x2c2a17=a9_0x55ac,_0x536639=await getIsSessionValid();if(_0x536639){console['log'](_0x2c2a17(0x1b9));return;}if(_0x480713?.[_0x2c2a17(0x1bc)]&&!_0x480713[_0x2c2a17(0x1b8)])throw CliErrors[_0x2c2a17(0x1c4)]('Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.',_0x2c2a17(0x1b7)+CLI_BIN_NAME+_0x2c2a17(0x1bd));const _0x1e6e29=_0x480713?.[_0x2c2a17(0x1b8)]?!![]:await confirm({'message':_0x2c2a17(0x1b6),'default':!![]});if(!_0x1e6e29)return;if(_0x480713?.['nonInteractive']){console[_0x2c2a17(0x1bf)]('Starting\x20browser\x20login.\x20Share\x20the\x20printed\x20URL\x20with\x20the\x20user.');const _0x355ba1=await authServer({'silent':![],'openBrowser':![]});_0x355ba1?console['log'](_0x2c2a17(0x1c7)):console[_0x2c2a17(0x1bf)](_0x2c2a17(0x1c0));return;}const _0x2fe486=a9_0x103837(_0x2c2a17(0x1b5))[_0x2c2a17(0x1b1)](),_0x2db3a5=await authServer({'silent':!![],'openBrowser':!![]});_0x2fe486[_0x2c2a17(0x1bb)](),_0x2db3a5?console[_0x2c2a17(0x1bf)]('*\x20Login\x20successful!'):console['log'](_0x2c2a17(0x1c0));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x3d25ff=a10_0x2732;(function(_0x594045,_0x2ab58b){const _0x4aea98=a10_0x2732,_0x5dcc3c=_0x594045();while(!![]){try{const _0x24533f=parseInt(_0x4aea98(0x1a4))/0x1+-parseInt(_0x4aea98(0x1a8))/0x2+parseInt(_0x4aea98(0x1aa))/0x3*(-parseInt(_0x4aea98(0x199))/0x4)+parseInt(_0x4aea98(0x189))/0x5*(-parseInt(_0x4aea98(0x198))/0x6)+parseInt(_0x4aea98(0x1ab))/0x7+parseInt(_0x4aea98(0x1a5))/0x8+parseInt(_0x4aea98(0x193))/0x9*(parseInt(_0x4aea98(0x18a))/0xa);if(_0x24533f===_0x2ab58b)break;else _0x5dcc3c['push'](_0x5dcc3c['shift']());}catch(_0x28829f){_0x5dcc3c['push'](_0x5dcc3c['shift']());}}}(a10_0x5143,0x72c4a));import{writeFileSync}from'node:fs';import a10_0x3bb4b0 from'node:http';import a10_0x36c57b from'node:https';import{getUserDomain}from'../constant/domain.js';function a10_0x2732(_0x4cef15,_0x76cec0){_0x4cef15=_0x4cef15-0x17f;const _0x5143ae=a10_0x5143();let _0x273220=_0x5143ae[_0x4cef15];return _0x273220;}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(_0x157aed){const _0xf640b4=a10_0x2732;if(!_0x157aed)return getProjectDomainRoutingManifest()[_0xf640b4(0x183)];const _0x140c1c=getOfficialRoutingProfile(_0x157aed),_0x25cab2=getOfficialRoutingCdn(_0x157aed);return{'origin':_0x140c1c[_0xf640b4(0x183)]['origin'],'certificateUrl':_0x25cab2[_0xf640b4(0x1ac)]+_0xf640b4(0x18b)};}function withPort(_0x2b2c92,_0x672f75){const _0x3aed54=a10_0x2732,_0x48c574=new URL(_0x2b2c92);return _0x48c574[_0x3aed54(0x18c)]=String(_0x672f75),_0x48c574[_0x3aed54(0x192)];}function a10_0x5143(){const _0x5f05ae=['writeHead','catch','then','darwin','openBrowser','origin','102798ANtboh','silent','!\x20Login\x20URL\x20expired\x20after\x2010\x20minutes.\x20Run\x20the\x20login\x20command\x20again\x20to\x20get\x20a\x20new\x20URL.','open\x20\x22','headers','12HaPZYa','69380PdCsiD','error','🔐\x20Starting\x20login\x20service...','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','end','cookie','text/html;\x20charset=utf-8','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','log','Auth\x20server\x20error:','certificateUrl','113921RqXyCs','5945048UlCKWj','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','isAuth','1373122PrNRBE','close','51oOBSWY','5276684skGmSb','lovrabet','💡\x20Open\x20the\x20login\x20URL\x20above\x20in\x20your\x20browser\x20to\x20complete\x20authorization.','utf-8','createServer','user','json','local','win32','object','address','timeoutMs','platform','1797565RoWASm','490MzqeXi','/cert/lovrabet-dev.json','port'];a10_0x5143=function(){return _0x5f05ae;};return a10_0x5143();}export async function authServer(_0x3fcc0a){const _0x176289=a10_0x2732,_0x321f43=_0x3fcc0a?.[_0x176289(0x194)]||![],_0x5c1fa0=_0x3fcc0a?.[_0x176289(0x191)]??!![],_0x43518b=_0x3fcc0a?.[_0x176289(0x187)]??AUTH_LOGIN_TIMEOUT_MS;if(await getIsSessionValid())return!![];const _0x466ab3=resolveAuthCallbackRouting(),_0xc21338=_0x466ab3[_0x176289(0x1a3)]?await(await fetch(_0x466ab3[_0x176289(0x1a3)]))[_0x176289(0x182)]():undefined;return new Promise(async(_0x34220b,_0xca96bc)=>{const _0x383143=_0x176289;let _0x217eb2=0x0,_0x10e8a3=![],_0x1ee6d7;const _0x1585d2=async(_0x3c7c4e,_0x4b9cb3)=>{const _0x42508d=a10_0x2732,_0x45f42d=getUserDomain(),_0x401100=_0x3c7c4e[_0x42508d(0x197)][_0x42508d(0x19e)]||'',_0x2def93=await fetch(_0x45f42d+'/api/auth/get-session',{'headers':{'cookie':_0x401100}})[_0x42508d(0x18f)](_0x1bd451=>_0x1bd451[_0x42508d(0x182)]()),_0x1f6fc0=_0x2def93&&_0x2def93['session']&&_0x2def93[_0x42508d(0x181)];if(_0x1f6fc0){writeFileSync(cookieFile,_0x401100,_0x42508d(0x17f));const _0x2dfb06=buildLoginSuccessHtml();_0x4b9cb3[_0x42508d(0x18d)](0xc8,{'Content-Type':_0x42508d(0x19f)}),_0x4b9cb3[_0x42508d(0x19d)](_0x2dfb06),_0x262262(!![]);}else{const _0xab2fd8=encodeURIComponent(withPort(_0x466ab3[_0x42508d(0x192)],_0x217eb2));_0x4b9cb3[_0x42508d(0x18d)](0x12e,{'location':_0x45f42d+'/sign-in?redirect='+_0xab2fd8}),_0x4b9cb3[_0x42508d(0x19d)]();return;}},_0x266461=_0xc21338?a10_0x36c57b['createServer'](_0xc21338,_0x1585d2):a10_0x3bb4b0[_0x383143(0x180)](_0x1585d2);function _0x262262(_0x291220){const _0x1863e6=_0x383143;if(_0x10e8a3)return;_0x10e8a3=!![],_0x1ee6d7&&clearTimeout(_0x1ee6d7),_0x266461[_0x1863e6(0x1a9)](),_0x34220b(_0x291220);}_0x266461['listen'](0x0,'127.0.0.1',()=>{const _0xae4170=_0x383143,_0x1dd24d=_0x266461[_0xae4170(0x186)]();_0x217eb2=typeof _0x1dd24d===_0xae4170(0x185)&&_0x1dd24d?_0x1dd24d['port']:Number(_0x1dd24d);const _0x3f508c=withPort(_0x466ab3['origin'],_0x217eb2);_0x1ee6d7=setTimeout(()=>{const _0x5a1eae=_0xae4170;!_0x321f43&&console[_0x5a1eae(0x1a1)](_0x5a1eae(0x195)),_0x262262(![]);},_0x43518b);!_0x321f43&&(console['log'](_0xae4170(0x19b)),console[_0xae4170(0x1a1)]('📍\x20Login\x20URL:',_0x3f508c),_0x5c1fa0?(console[_0xae4170(0x1a1)](_0xae4170(0x1a6)),console[_0xae4170(0x1a1)](''),console[_0xae4170(0x1a1)]('💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.')):console[_0xae4170(0x1a1)](_0xae4170(0x1ad)),console['log'](''));if(!_0x5c1fa0)return;openInBrowser(_0x3f508c)['then'](_0x44b1bb=>{const _0x44da53=_0xae4170;!_0x321f43&&(_0x44b1bb?console[_0x44da53(0x1a1)]('✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.'):(console['log'](_0x44da53(0x19c)),console['log'](_0x44da53(0x1a0),_0x3f508c)),console[_0x44da53(0x1a1)](''));})[_0xae4170(0x18e)](()=>{const _0x43eea1=_0xae4170;!_0x321f43&&(console[_0x43eea1(0x1a1)](_0x43eea1(0x19c)),console['log'](_0x43eea1(0x1a0),_0x3f508c),console[_0x43eea1(0x1a1)](''));});}),_0x266461['on'](_0x383143(0x19a),_0x3beb32=>{const _0x56235a=_0x383143;if(_0x10e8a3)return;_0x10e8a3=!![],_0x1ee6d7&&clearTimeout(_0x1ee6d7),!_0x321f43&&console['error'](_0x56235a(0x1a2),_0x3beb32),_0x266461[_0x56235a(0x1a9)](),_0xca96bc(_0x3beb32);});});}function openInBrowser(_0x521a84){return new Promise(_0x2e29ae=>{const _0x594722=a10_0x2732,_0x57e216=process[_0x594722(0x188)];let _0x5ba854;if(_0x57e216===_0x594722(0x184))_0x5ba854='cmd\x20/c\x20start\x20\x22\x22\x20\x22'+_0x521a84+'\x22';else _0x57e216===_0x594722(0x190)?_0x5ba854=_0x594722(0x196)+_0x521a84+'\x22':_0x5ba854='xdg-open\x20\x22'+_0x521a84+'\x22';exec(_0x5ba854,_0x27047e=>{_0x27047e?_0x2e29ae(![]):_0x2e29ae(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a10_0x3d25ff(0x1a1)](a10_0x3d25ff(0x1a7),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a11_0x2974(){const _0x1cba1b=['.lovrabet','12hpAIBb','2030160ZLMSBc','2414155KrhKXg','31549923OHsTej','3047vQAJrj','cookie','9151583bowOAm','286amxRrw','4455906eHqrZx','477240YNiGCU'];a11_0x2974=function(){return _0x1cba1b;};return a11_0x2974();}const a11_0x3d360f=a11_0x5964;function a11_0x5964(_0x2419b8,_0x1d1aa3){_0x2419b8=_0x2419b8-0x19a;const _0x2974fb=a11_0x2974();let _0x596490=_0x2974fb[_0x2419b8];return _0x596490;}(function(_0x5e42ce,_0x19757b){const _0x4f0969=a11_0x5964,_0x2dd931=_0x5e42ce();while(!![]){try{const _0x12e0b3=parseInt(_0x4f0969(0x19b))/0x1*(-parseInt(_0x4f0969(0x19e))/0x2)+-parseInt(_0x4f0969(0x19f))/0x3+-parseInt(_0x4f0969(0x1a3))/0x4+parseInt(_0x4f0969(0x1a4))/0x5*(parseInt(_0x4f0969(0x1a2))/0x6)+-parseInt(_0x4f0969(0x19d))/0x7+parseInt(_0x4f0969(0x1a0))/0x8+parseInt(_0x4f0969(0x19a))/0x9;if(_0x12e0b3===_0x19757b)break;else _0x2dd931['push'](_0x2dd931['shift']());}catch(_0x259f2a){_0x2dd931['push'](_0x2dd931['shift']());}}}(a11_0x2974,0xc2134));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a11_0x3d360f(0x1a1));export const cookieFile=join(configDir,a11_0x3d360f(0x19c));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a12_0x5ce6(_0x5684d2,_0x2a2645){_0x5684d2=_0x5684d2-0x10e;var _0x1abb93=a12_0x1abb();var _0x5ce6ae=_0x1abb93[_0x5684d2];return _0x5ce6ae;}(function(_0x4620b7,_0x53fb98){var _0x828d0b=a12_0x5ce6,_0x32f9d5=_0x4620b7();while(!![]){try{var _0x3daa88=parseInt(_0x828d0b(0x113))/0x1+-parseInt(_0x828d0b(0x10e))/0x2+-parseInt(_0x828d0b(0x112))/0x3+parseInt(_0x828d0b(0x111))/0x4+parseInt(_0x828d0b(0x114))/0x5*(parseInt(_0x828d0b(0x115))/0x6)+-parseInt(_0x828d0b(0x116))/0x7*(parseInt(_0x828d0b(0x110))/0x8)+-parseInt(_0x828d0b(0x10f))/0x9;if(_0x3daa88===_0x53fb98)break;else _0x32f9d5['push'](_0x32f9d5['shift']());}catch(_0x2017c1){_0x32f9d5['push'](_0x32f9d5['shift']());}}}(a12_0x1abb,0xceb79));import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';function a12_0x1abb(){var _0x25d57d=['4839084GsgrSf','8EiTWNz','1537988rcCLXU','991710WZmqYT','721442HJsBUY','1208335Mqoabc','42wQUiGq','6202574iEQmej','utf-8','393134omrmcE'];a12_0x1abb=function(){return _0x25d57d;};return a12_0x1abb();}export function getCookie(){var _0x44f369=a12_0x5ce6;try{return readFileSync(cookieFile,_0x44f369(0x117));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x597d3c,_0x103376){const _0x250f40=a13_0x4c1e,_0x3cc148=_0x597d3c();while(!![]){try{const _0x5eecf9=-parseInt(_0x250f40(0x139))/0x1+parseInt(_0x250f40(0x138))/0x2*(parseInt(_0x250f40(0x140))/0x3)+parseInt(_0x250f40(0x13f))/0x4*(parseInt(_0x250f40(0x13d))/0x5)+parseInt(_0x250f40(0x134))/0x6+-parseInt(_0x250f40(0x13a))/0x7+-parseInt(_0x250f40(0x13b))/0x8+parseInt(_0x250f40(0x136))/0x9;if(_0x5eecf9===_0x103376)break;else _0x3cc148['push'](_0x3cc148['shift']());}catch(_0x1be3bf){_0x3cc148['push'](_0x3cc148['shift']());}}}(a13_0x2b37,0xc8737));function a13_0x2b37(){const _0xfe4e03=['1438056RLERxV','905226iauyAG','/api/auth/get-session','5983479qiEAdJ','utf-8','6RcpWAg','62983DbxblH','2753527SrJJcO','11396016lhTgLJ','session','5zmKVDF','json','1792540iACTVg'];a13_0x2b37=function(){return _0xfe4e03;};return a13_0x2b37();}function a13_0x4c1e(_0x5b0800,_0x3b4d85){_0x5b0800=_0x5b0800-0x134;const _0x2b3767=a13_0x2b37();let _0x4c1ed7=_0x2b3767[_0x5b0800];return _0x4c1ed7;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(_0x5ca710){const _0xf95de9=a13_0x4c1e;try{if(_0x5ca710===undefined){if(!existsSync(cookieFile))return null;_0x5ca710=readFileSync(cookieFile,_0xf95de9(0x137));}if(!_0x5ca710)return null;const _0x3268be=await fetch(getUserDomain()+_0xf95de9(0x135),{'headers':{'cookie':_0x5ca710}});if(!_0x3268be['ok'])return null;const _0x5c28fe=await _0x3268be[_0xf95de9(0x13e)]();if(!_0x5c28fe[_0xf95de9(0x13c)]||!_0x5c28fe['user'])return null;return _0x5c28fe;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4f8059,_0x3d8ee0){const _0x49cbe3=a14_0x300a,_0x432f2d=_0x4f8059();while(!![]){try{const _0x21eb1e=-parseInt(_0x49cbe3(0x93))/0x1+parseInt(_0x49cbe3(0x90))/0x2+-parseInt(_0x49cbe3(0x95))/0x3+parseInt(_0x49cbe3(0x97))/0x4+-parseInt(_0x49cbe3(0x98))/0x5*(parseInt(_0x49cbe3(0x99))/0x6)+-parseInt(_0x49cbe3(0x9a))/0x7*(parseInt(_0x49cbe3(0x96))/0x8)+parseInt(_0x49cbe3(0x8e))/0x9*(parseInt(_0x49cbe3(0x8d))/0xa);if(_0x21eb1e===_0x3d8ee0)break;else _0x432f2d['push'](_0x432f2d['shift']());}catch(_0x23b650){_0x432f2d['push'](_0x432f2d['shift']());}}}(a14_0x5560,0x766e0));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';function a14_0x5560(){const _0x1c7bd0=['2118iAxTAg','313285GDrCSN','12042460opUSTp','18TfcZJR','/api/auth/get-session','157426ILCEUK','user','utf-8','263806KlogZU','session','2185527giWgUs','24bKmEcX','291896JxffmU','13435TitvRZ'];a14_0x5560=function(){return _0x1c7bd0;};return a14_0x5560();}function a14_0x300a(_0x389bc9,_0xa04be2){_0x389bc9=_0x389bc9-0x8d;const _0x556098=a14_0x5560();let _0x300adf=_0x556098[_0x389bc9];return _0x300adf;}export async function getIsSessionValid(){const _0x103006=a14_0x300a;try{if(!existsSync(cookieFile))return![];const _0x5566a6=readFileSync(cookieFile,_0x103006(0x92)),_0x3ab904=await fetch(getUserDomain()+_0x103006(0x8f),{'headers':{'cookie':_0x5566a6}})['then'](_0x316d80=>_0x316d80['json']());return _0x3ab904&&_0x3ab904[_0x103006(0x94)]&&_0x3ab904[_0x103006(0x91)];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a15_0x3c34(_0x502b5a,_0x5797f5){_0x502b5a=_0x502b5a-0x1f3;const _0x2293f1=a15_0x2293();let _0x3c34f9=_0x2293f1[_0x502b5a];return _0x3c34f9;}function a15_0x2293(){const _0xfbcb36=['<!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>','12954780smcrwI','3964941lMwpTr','8NydFDZ','6412xjBYpG','190UBvabw','60672rLilzh','10372RSQkZf','10CbToLk','1263BeVHtH','13uJhjlp','454245xBTqpx','13Flvtiy','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','3694838GzKkws'];a15_0x2293=function(){return _0xfbcb36;};return a15_0x2293();}(function(_0x1fa62c,_0x51777f){const _0x410238=a15_0x3c34,_0x28e1d9=_0x1fa62c();while(!![]){try{const _0xa638cf=-parseInt(_0x410238(0x1fc))/0x1*(parseInt(_0x410238(0x1f9))/0x2)+parseInt(_0x410238(0x1fb))/0x3*(parseInt(_0x410238(0x1f6))/0x4)+parseInt(_0x410238(0x1f7))/0x5*(-parseInt(_0x410238(0x1f8))/0x6)+parseInt(_0x410238(0x200))/0x7*(-parseInt(_0x410238(0x1f5))/0x8)+-parseInt(_0x410238(0x1f4))/0x9*(parseInt(_0x410238(0x1fa))/0xa)+parseInt(_0x410238(0x1fd))/0xb+-parseInt(_0x410238(0x1f3))/0xc*(-parseInt(_0x410238(0x1fe))/0xd);if(_0xa638cf===_0x51777f)break;else _0x28e1d9['push'](_0x28e1d9['shift']());}catch(_0x2f2989){_0x28e1d9['push'](_0x28e1d9['shift']());}}}(a15_0x2293,0x5bb72));export function buildLoginSuccessHtml(){const _0x39e105=a15_0x3c34,_0x1fb474=_0x39e105(0x1ff);return _0x39e105(0x201)+_0x1fb474+'</div>\x0a\x20\x20\x20\x20<p\x20class=\x22cli-hint\x22>Rabetbase\x20CLI\x20·\x20session\x20saved\x20locally</p>\x0a\x20\x20</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>';}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a16_0x56b8(_0x45b73c,_0xf571d6){_0x45b73c=_0x45b73c-0x1f3;var _0x5c389f=a16_0x5c38();var _0x56b8f0=_0x5c389f[_0x45b73c];return _0x56b8f0;}function a16_0x5c38(){var _0x4d6e63=['124kPcEEN','2306808yWIBIQ','15058iByNrW','4129398SPowzM','✓\x20Logged\x20out','3LcHyMz','2864492sFxWMh','29157651vTOzBg','!\x20Not\x20logged\x20in','7440575iwmJVt','log','2072872TqMhij'];a16_0x5c38=function(){return _0x4d6e63;};return a16_0x5c38();}(function(_0x2b3de6,_0x1ceae8){var _0x5891ff=a16_0x56b8,_0x328e6f=_0x2b3de6();while(!![]){try{var _0xae6cd6=parseInt(_0x5891ff(0x1f7))/0x1*(-parseInt(_0x5891ff(0x1f5))/0x2)+-parseInt(_0x5891ff(0x1fa))/0x3*(parseInt(_0x5891ff(0x1fb))/0x4)+-parseInt(_0x5891ff(0x1fe))/0x5+parseInt(_0x5891ff(0x1f6))/0x6+parseInt(_0x5891ff(0x1f8))/0x7+-parseInt(_0x5891ff(0x1f4))/0x8+parseInt(_0x5891ff(0x1fc))/0x9;if(_0xae6cd6===_0x1ceae8)break;else _0x328e6f['push'](_0x328e6f['shift']());}catch(_0x32e84a){_0x328e6f['push'](_0x328e6f['shift']());}}}(a16_0x5c38,0xc781a));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function logout(){var _0x58aeb4=a16_0x56b8;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x58aeb4(0x1f3)](_0x58aeb4(0x1f9))):console[_0x58aeb4(0x1f3)](_0x58aeb4(0x1fd));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a17_0x2f799a=a17_0x4696;function a17_0x2dd4(){const _0x391297=['8HNScki','1594510kKlIrV','4krbsOE','boolean','18ePaWOs','23478202Wlkjqj','3526074wIJLHV','5OUliCf','301932qcoBdJ','9108750JOMMde','501506CTcNTu','6560703AgMmDB'];a17_0x2dd4=function(){return _0x391297;};return a17_0x2dd4();}(function(_0x509301,_0x562e74){const _0x5e8c88=a17_0x4696,_0x4dd7d6=_0x509301();while(!![]){try{const _0x5390f6=-parseInt(_0x5e8c88(0xac))/0x1*(-parseInt(_0x5e8c88(0xa8))/0x2)+-parseInt(_0x5e8c88(0xae))/0x3*(-parseInt(_0x5e8c88(0xa6))/0x4)+-parseInt(_0x5e8c88(0xa5))/0x5*(parseInt(_0x5e8c88(0xa4))/0x6)+-parseInt(_0x5e8c88(0xa7))/0x7+parseInt(_0x5e8c88(0xaa))/0x8*(-parseInt(_0x5e8c88(0xa9))/0x9)+-parseInt(_0x5e8c88(0xab))/0xa+parseInt(_0x5e8c88(0xaf))/0xb;if(_0x5390f6===_0x562e74)break;else _0x4dd7d6['push'](_0x4dd7d6['shift']());}catch(_0x520dcf){_0x4dd7d6['push'](_0x4dd7d6['shift']());}}}(a17_0x2dd4,0xc6791));function a17_0x4696(_0xe5b1f0,_0x2045c8){_0xe5b1f0=_0xe5b1f0-0xa4;const _0x2dd453=a17_0x2dd4();let _0x469669=_0x2dd453[_0xe5b1f0];return _0x469669;}export const dynamicCliFlags={'enableBffSave':{'type':a17_0x2f799a(0xad)}};
|