@lovrabet/rabetbase-cli 2.5.3-beta.2 → 2.5.3-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.d.ts +22 -0
- package/lib/api/api-group.js +1 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +18 -2
- 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.d.ts +11 -0
- package/lib/api/legacy-api-file.js +1 -0
- package/lib/api/model-registry-file.d.ts +36 -0
- package/lib/api/model-registry-file.js +1 -0
- package/lib/api/model-registry-scaffold.d.ts +7 -0
- package/lib/api/model-registry-scaffold.js +1 -0
- package/lib/api/model-source.d.ts +6 -0
- package/lib/api/model-source.js +1 -0
- 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/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.d.ts +7 -0
- 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.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-create.js +1 -0
- package/lib/commands/dataset/cross-relation-delete.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-delete.js +1 -0
- package/lib/commands/dataset/cross-relation-list.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-list.js +1 -0
- package/lib/commands/dataset/cross-relation-shared.d.ts +190 -0
- package/lib/commands/dataset/cross-relation-shared.js +1 -0
- package/lib/commands/dataset/cross-relation-update.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-update.js +1 -0
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.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/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.d.ts +28 -0
- package/lib/commands/project/api-architecture-upgrade.js +1 -0
- 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.d.ts +30 -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/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.d.ts +5 -3
- 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.d.ts +2 -0
- 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.d.ts +2 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +13 -17
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +6 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.d.ts +41 -0
- package/lib/core/cross-db-relation.js +1 -0
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.d.ts +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +0 -10
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +11 -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.d.ts +19 -0
- 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 +6 -1
- package/skills/rabetbase/SKILL.md +16 -10
- package/skills/rabetbase/guides/backend-function.md +5 -1
- package/skills/rabetbase/guides/bff-creation-workflow.md +3 -1
- package/skills/rabetbase/guides/cross-database-bff.md +70 -0
- package/skills/rabetbase/guides/data-api-guidelines.md +35 -33
- package/skills/rabetbase/guides/sdk-client-generation.md +112 -61
- package/skills/rabetbase/guides/sql-creation-workflow.md +2 -0
- package/skills/rabetbase/guides/typescript-sdk.md +9 -0
- package/skills/rabetbase/references/rabetbase-api-pull.md +30 -19
- package/skills/rabetbase/references/rabetbase-app-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-config.md +2 -1
- package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +64 -0
- package/skills/rabetbase/references/rabetbase-project-create.md +3 -3
- package/skills/rabetbase/references/rabetbase-project-upgrade.md +24 -13
- package/skills/rabetbase.manifest.json +5 -3
- package/templates/README.md +46 -6
- package/templates/generate-api/model-runtime.ts.tpl +101 -0
- package/templates/generate-api/profile-api.ts.tpl +21 -0
- package/templates/generate-api/profile-client.ts.tpl +14 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a336_0x88f986=a336_0x5297;(function(_0x5e7b73,_0x1e68c5){const _0x5702d8=a336_0x5297,_0xa50a28=_0x5e7b73();while(!![]){try{const _0x27d86a=-parseInt(_0x5702d8(0x1aa))/0x1*(-parseInt(_0x5702d8(0x199))/0x2)+-parseInt(_0x5702d8(0x1a7))/0x3*(-parseInt(_0x5702d8(0x1b3))/0x4)+-parseInt(_0x5702d8(0x1a9))/0x5*(-parseInt(_0x5702d8(0x19b))/0x6)+-parseInt(_0x5702d8(0x1a5))/0x7+-parseInt(_0x5702d8(0x196))/0x8+-parseInt(_0x5702d8(0x1b6))/0x9*(parseInt(_0x5702d8(0x1a0))/0xa)+parseInt(_0x5702d8(0x1b7))/0xb;if(_0x27d86a===_0x1e68c5)break;else _0xa50a28['push'](_0xa50a28['shift']());}catch(_0xb65116){_0xa50a28['push'](_0xa50a28['shift']());}}}(a336_0x4da2,0x3ab07));import a336_0x24c5af from'node:fs';function a336_0x5297(_0x3b5a34,_0x5ca07e){_0x3b5a34=_0x3b5a34-0x192;const _0x4da2e0=a336_0x4da2();let _0x529790=_0x4da2e0[_0x3b5a34];return _0x529790;}import a336_0x3fd6a0 from'node:path';import a336_0x3e8cff from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a336_0x88f986(0x1af);function isNonNumericVersion(_0x4b256e){const _0x57ea90=a336_0x88f986,_0x416531=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x416531['some'](_0x48a51d=>_0x48a51d[_0x57ea90(0x1b1)](_0x4b256e));}function getInstalledVersion(_0x63cd56,_0x197175){const _0x635611=a336_0x88f986;try{const _0x5ae9e5=a336_0x3fd6a0['join'](_0x63cd56,'node_modules',_0x197175,_0x635611(0x19f));if(a336_0x24c5af['existsSync'](_0x5ae9e5)){const _0x78e409=JSON[_0x635611(0x197)](a336_0x24c5af[_0x635611(0x1b5)](_0x5ae9e5,_0x635611(0x194)));return _0x78e409[_0x635611(0x19a)]||null;}}catch{}return null;}function a336_0x4da2(){const _0x2929cd=['1019210IWfdea','19667gMlvIE','\x20\x20\x20Stable\x20version:\x20','latest','minVersion','join','1.2.0','dependencies','test','packageName','24760wcDjIM','@lovrabet/sdk','readFileSync','3043197PyPyGJ','4137177yYowxT','stableVersion','\x1b[1m','utf-8','all','2601720VkRTyr','parse','utf8','6jICbFL','version','6huMiAZ','existsSync','log','\x20\x20\x20Upgrade\x20command:\x20','package.json','10YRlLLP','devDependencies','sdk','↪\x20SDK\x20update\x20available','npm\x20install\x20','529627gydoES','coerce','165YRCeQK','\x1b[33m'];a336_0x4da2=function(){return _0x2929cd;};return a336_0x4da2();}async function getSdkStableVersion(){const _0x492bf8=a336_0x88f986;try{const _0x103628=await getCdnConfig();return _0x103628?.[_0x492bf8(0x1a2)]?.['node']?.[_0x492bf8(0x192)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x118046=a336_0x88f986;try{const _0x37913a=await getCdnConfig();return _0x37913a?.[_0x118046(0x1a2)]?.['node']?.[_0x118046(0x1b2)]||_0x118046(0x1b4);}catch{return _0x118046(0x1b4);}}export async function checkSdkVersion(_0x3fa16b){const _0x4b594c=a336_0x88f986,_0x596f82=a336_0x3fd6a0[_0x4b594c(0x1ae)](_0x3fa16b,_0x4b594c(0x19f)),[_0xc8461d,_0x2a768a]=await Promise[_0x4b594c(0x195)]([getSdkStableVersion(),getSdkPackageName()]),_0x181fd3=_0xc8461d||FALLBACK_MIN_SDK_VERSION;if(!a336_0x24c5af['existsSync'](_0x596f82))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x181fd3,'packageName':_0x2a768a,'stableVersion':_0xc8461d};try{const _0x12f41b=JSON[_0x4b594c(0x197)](a336_0x24c5af[_0x4b594c(0x1b5)](_0x596f82,'utf8')),_0x4ce496=_0x12f41b[_0x4b594c(0x1b0)]||{},_0x59a96c=_0x12f41b[_0x4b594c(0x1a1)]||{},_0x49b784=_0x4ce496[_0x2a768a]||_0x59a96c[_0x2a768a];if(!_0x49b784)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x181fd3,'packageName':_0x2a768a,'stableVersion':_0xc8461d};let _0x53282d=getInstalledVersion(_0x3fa16b,_0x2a768a);!_0x53282d&&(_0x53282d=_0x49b784);if(isNonNumericVersion(_0x49b784))return{'installed':!![],'version':_0x53282d,'needsUpgrade':![],'minVersion':_0x181fd3,'packageName':_0x2a768a,'stableVersion':_0xc8461d};const _0x1ddeea=a336_0x3e8cff[_0x4b594c(0x1a6)](_0x53282d),_0x482cbf=a336_0x3e8cff[_0x4b594c(0x1a6)](_0x181fd3),_0x250d35=_0x1ddeea&&_0x482cbf?a336_0x3e8cff['lt'](_0x1ddeea,_0x482cbf):![];return{'installed':!![],'version':_0x53282d,'needsUpgrade':_0x250d35,'minVersion':_0x181fd3,'packageName':_0x2a768a,'stableVersion':_0xc8461d};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x181fd3,'packageName':_0x2a768a,'stableVersion':_0xc8461d};}}export function checkSdkVersionSync(_0x444099){const _0x34d20f=a336_0x88f986,_0x25c065=a336_0x3fd6a0[_0x34d20f(0x1ae)](_0x444099,'package.json'),_0xf6ead1='@lovrabet/sdk';if(!a336_0x24c5af[_0x34d20f(0x19c)](_0x25c065))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0xf6ead1,'stableVersion':null};try{const _0x1e0263=JSON[_0x34d20f(0x197)](a336_0x24c5af['readFileSync'](_0x25c065,_0x34d20f(0x198))),_0x23aa9a=_0x1e0263[_0x34d20f(0x1b0)]||{},_0x556755=_0x1e0263[_0x34d20f(0x1a1)]||{},_0x45f40c=_0x23aa9a[_0xf6ead1]||_0x556755[_0xf6ead1];if(!_0x45f40c)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0xf6ead1,'stableVersion':null};let _0x1a915d=getInstalledVersion(_0x444099,_0xf6ead1);!_0x1a915d&&(_0x1a915d=_0x45f40c);if(isNonNumericVersion(_0x45f40c))return{'installed':!![],'version':_0x1a915d,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0xf6ead1,'stableVersion':null};const _0x59e807=a336_0x3e8cff[_0x34d20f(0x1a6)](_0x1a915d),_0x3b9621=_0x59e807?a336_0x3e8cff['lt'](_0x59e807,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x1a915d,'needsUpgrade':_0x3b9621,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0xf6ead1,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0xf6ead1,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x5b1010){const _0x4ad110=a336_0x88f986;if(!_0x5b1010['needsUpgrade'])return;const _0xaedb7=_0x4ad110(0x1a8),_0x684c15='\x1b[0m',_0x3deac5=_0x4ad110(0x193),_0xc79158=_0x5b1010['packageName']||_0x4ad110(0x1b4),_0x4f329d=_0x5b1010[_0x4ad110(0x192)]||_0x5b1010[_0x4ad110(0x1ad)],_0x56e051=_0x4ad110(0x1a4)+_0xc79158+'@'+(_0x4f329d||_0x4ad110(0x1ac));console[_0x4ad110(0x19d)](),console[_0x4ad110(0x19d)](''+_0xaedb7+_0x3deac5+_0x4ad110(0x1a3)+_0x684c15),console[_0x4ad110(0x19d)](_0xaedb7+'\x20\x20\x20Current\x20version:\x20'+_0xc79158+'@'+_0x5b1010[_0x4ad110(0x19a)]+_0x684c15),console[_0x4ad110(0x19d)](_0xaedb7+_0x4ad110(0x1ab)+_0x4f329d+_0x684c15),console[_0x4ad110(0x19d)](_0xaedb7+_0x4ad110(0x19e)+_0x56e051+_0x684c15),console[_0x4ad110(0x19d)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x20b444,_0x18cab6){const _0x29e0cb=a337_0x427c,_0x1f9613=_0x20b444();while(!![]){try{const _0x59914b=parseInt(_0x29e0cb(0x6b))/0x1+-parseInt(_0x29e0cb(0x79))/0x2*(parseInt(_0x29e0cb(0x89))/0x3)+parseInt(_0x29e0cb(0x6f))/0x4+-parseInt(_0x29e0cb(0x91))/0x5*(parseInt(_0x29e0cb(0x83))/0x6)+parseInt(_0x29e0cb(0x73))/0x7+-parseInt(_0x29e0cb(0x81))/0x8*(parseInt(_0x29e0cb(0x94))/0x9)+parseInt(_0x29e0cb(0x7d))/0xa;if(_0x59914b===_0x18cab6)break;else _0x1f9613['push'](_0x1f9613['shift']());}catch(_0x3ca0d0){_0x1f9613['push'](_0x1f9613['shift']());}}}(a337_0x16ac,0x85fc6));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a337_0xd6bf3f from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';function a337_0x427c(_0x50e4e6,_0x457b96){_0x50e4e6=_0x50e4e6-0x6b;const _0x16ac01=a337_0x16ac();let _0x427cb8=_0x16ac01[_0x50e4e6];return _0x427cb8;}import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x2d3d61){const _0x37a0a2=a337_0x427c,_0x1211b9=_0x2d3d61['stableVersion']||_0x37a0a2(0x8b);return _0x37a0a2(0x8f)+NPM_PACKAGE_NAME+'@'+_0x1211b9;}function getCurrentCliVersion(){const _0x4bbf0a=a337_0x427c;try{const _0x529d1b=fileURLToPath(import.meta.url),_0x48e477=resolve(dirname(_0x529d1b),_0x4bbf0a(0x93)),_0x1a2ba3=resolve(_0x48e477,_0x4bbf0a(0x7c)),_0x4e6177=JSON[_0x4bbf0a(0x7f)](readFileSync(_0x1a2ba3,_0x4bbf0a(0x84)));return _0x4e6177[_0x4bbf0a(0x76)]||_0x4bbf0a(0x90);}catch{return _0x4bbf0a(0x90);}}function a337_0x16ac(){const _0x4e780e=['parse','\x20\x20\x20Recommended\x20stable:\x20','1220536kiwXzD','Current\x20version:\x20','6BmLuQl','utf-8','\x1b[33m','filter','\x20\x20\x20Upgrade\x20command:\x20','↪\x20Critical\x20CLI\x20upgrade\x20required','398946FLbuFf','upgradeMessage','latest','coerce','\x20\x20\x20Current\x20CLI\x20version:\x20','currentVersion','npm\x20install\x20-g\x20','1.0.0','4049255whIZWy','minimumVersion','../..','18hdtKdB','492826WrFPoD','belowMinimum','log','Minimum\x20supported:\x20','3281696dldXou','\x1b[31m','needsUpgrade','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','4328429kAoWEa','\x20\x20\x20Stable\x20version:\x20','\x1b[0m','version','validation','\x1b[1m','10KvHaSB','stableVersion','minimumVersionMessage','package.json','3971040BtXIAj','\x20\x20\x20'];a337_0x16ac=function(){return _0x4e780e;};return a337_0x16ac();}export async function checkCliVersion(){const _0x1f4b29=a337_0x427c,_0x100b3e=getCurrentCliVersion(),_0x50e71b=await getCliVersionPolicy(),_0x158041=_0x50e71b?.[_0x1f4b29(0x7a)]||null,_0x59b1c1=_0x50e71b?.[_0x1f4b29(0x92)]||null;let _0x11c871=![],_0x1cb18e=![];const _0x2decc9=a337_0xd6bf3f[_0x1f4b29(0x8c)](_0x100b3e);if(_0x2decc9&&_0x158041)try{const _0x1db2f0=a337_0xd6bf3f['coerce'](_0x158041);if(_0x1db2f0)_0x11c871=a337_0xd6bf3f['lt'](_0x2decc9,_0x1db2f0);}catch{}if(_0x2decc9&&_0x59b1c1)try{const _0x8e6266=a337_0xd6bf3f['coerce'](_0x59b1c1);if(_0x8e6266)_0x1cb18e=a337_0xd6bf3f['lt'](_0x2decc9,_0x8e6266);}catch{}return _0x1cb18e&&(_0x11c871=!![]),{'currentVersion':_0x100b3e,'stableVersion':_0x158041,'minimumVersion':_0x59b1c1,'needsUpgrade':_0x11c871,'belowMinimum':_0x1cb18e,'isPreRelease':![],'upgradeMessage':_0x50e71b?.[_0x1f4b29(0x8a)],'minimumVersionMessage':_0x50e71b?.[_0x1f4b29(0x7b)]};}export function printCliUpgradeWarning(_0x4e6bcb){const _0x5d2f91=a337_0x427c;if(!_0x4e6bcb[_0x5d2f91(0x71)]&&!_0x4e6bcb[_0x5d2f91(0x6c)])return;const _0x553552=_0x5d2f91(0x70),_0x73cba0=_0x5d2f91(0x85),_0x51209e=_0x5d2f91(0x75),_0x2be3af=_0x5d2f91(0x78),_0xae04d2=getCliUpgradeCommand(_0x4e6bcb);console[_0x5d2f91(0x6d)](),_0x4e6bcb['belowMinimum']?(console[_0x5d2f91(0x6d)](''+_0x553552+_0x2be3af+_0x5d2f91(0x88)+_0x51209e),console[_0x5d2f91(0x6d)](_0x553552+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x4e6bcb['currentVersion']+_0x51209e),_0x4e6bcb[_0x5d2f91(0x92)]&&console[_0x5d2f91(0x6d)](_0x553552+'\x20\x20\x20Minimum\x20supported:\x20'+_0x4e6bcb['minimumVersion']+_0x51209e),_0x4e6bcb[_0x5d2f91(0x7a)]&&_0x4e6bcb['stableVersion']!==_0x4e6bcb[_0x5d2f91(0x92)]&&console[_0x5d2f91(0x6d)](_0x553552+_0x5d2f91(0x80)+_0x4e6bcb['stableVersion']+_0x51209e),_0x4e6bcb['minimumVersionMessage']&&console['log'](_0x553552+_0x5d2f91(0x7e)+_0x4e6bcb[_0x5d2f91(0x7b)]+_0x51209e),console[_0x5d2f91(0x6d)](_0x553552+'\x20\x20\x20Upgrade\x20command:\x20'+_0xae04d2+_0x51209e)):(console[_0x5d2f91(0x6d)](''+_0x73cba0+_0x2be3af+'↪\x20New\x20version\x20available'+_0x51209e),console[_0x5d2f91(0x6d)](_0x73cba0+_0x5d2f91(0x8d)+_0x4e6bcb[_0x5d2f91(0x8e)]+_0x51209e),console[_0x5d2f91(0x6d)](_0x73cba0+_0x5d2f91(0x74)+_0x4e6bcb['stableVersion']+_0x51209e),_0x4e6bcb['upgradeMessage']&&console[_0x5d2f91(0x6d)](_0x73cba0+_0x5d2f91(0x7e)+_0x4e6bcb[_0x5d2f91(0x8a)]+_0x51209e),console['log'](_0x73cba0+_0x5d2f91(0x87)+_0xae04d2+_0x51209e)),console[_0x5d2f91(0x6d)]();}export function assertCliVersionSupported(_0x3ebe86){const _0x22858d=a337_0x427c;if(!_0x3ebe86[_0x22858d(0x6c)])return;const _0x3b741e=[_0x3ebe86[_0x22858d(0x7b)],_0x22858d(0x82)+_0x3ebe86['currentVersion'],_0x3ebe86[_0x22858d(0x92)]?_0x22858d(0x6e)+_0x3ebe86[_0x22858d(0x92)]:null,'Upgrade\x20command:\x20'+getCliUpgradeCommand(_0x3ebe86)][_0x22858d(0x86)](Boolean)['join']('\x0a');throw CliErrors[_0x22858d(0x77)](_0x22858d(0x72),_0x3b741e);}
|
|
@@ -7,15 +7,34 @@ export interface CliVersionPolicy {
|
|
|
7
7
|
export interface ProjectTemplateCdnDescriptor {
|
|
8
8
|
version: string;
|
|
9
9
|
name: string;
|
|
10
|
+
url?: string;
|
|
10
11
|
sha256: string;
|
|
11
12
|
size: number;
|
|
12
13
|
}
|
|
13
14
|
export interface RabetbaseCdnConfig {
|
|
15
|
+
schemaVersion?: number;
|
|
14
16
|
cli?: Record<string, unknown>;
|
|
15
17
|
projectTemplate?: ProjectTemplateCdnDescriptor;
|
|
18
|
+
beta?: {
|
|
19
|
+
projectTemplate?: ProjectTemplateCdnDescriptor;
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
};
|
|
16
22
|
[key: string]: unknown;
|
|
17
23
|
}
|
|
24
|
+
export interface ProjectTemplateCdnConfigResolution {
|
|
25
|
+
config: RabetbaseCdnConfig;
|
|
26
|
+
assetBaseUrl: string;
|
|
27
|
+
legacyAssetBaseUrl: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function isBetaCliVersion(version: string): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Resolve the project template channel without changing the legacy contract:
|
|
32
|
+
* stable releases keep reading the top-level descriptor, while beta releases
|
|
33
|
+
* may override it under `beta.projectTemplate`.
|
|
34
|
+
*/
|
|
35
|
+
export declare function resolveProjectTemplateDescriptor(config: RabetbaseCdnConfig, cliVersion: string): ProjectTemplateCdnDescriptor | undefined;
|
|
18
36
|
export declare function fetchRabetbaseCdnConfig(): Promise<RabetbaseCdnConfig | null>;
|
|
37
|
+
export declare function fetchProjectTemplateCdnConfig(): Promise<ProjectTemplateCdnConfigResolution | null>;
|
|
19
38
|
export declare function fetchCliVersionPolicy(): Promise<CliVersionPolicy | null>;
|
|
20
39
|
export declare function getRabetbaseCdnConfig(): Promise<RabetbaseCdnConfig | null>;
|
|
21
40
|
export declare function getCliVersionPolicy(): Promise<CliVersionPolicy | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a77bc,_0x1b72d3){const _0x17a9c6=a338_0x209a,_0x1c5305=_0x5a77bc();while(!![]){try{const _0x1d4f44=parseInt(_0x17a9c6(0x95))/0x1+-parseInt(_0x17a9c6(0xa3))/0x2*(-parseInt(_0x17a9c6(0xa6))/0x3)+parseInt(_0x17a9c6(0x94))/0x4*(-parseInt(_0x17a9c6(0x91))/0x5)+parseInt(_0x17a9c6(0x8f))/0x6+-parseInt(_0x17a9c6(0xa5))/0x7*(-parseInt(_0x17a9c6(0x8e))/0x8)+parseInt(_0x17a9c6(0x99))/0x9+-parseInt(_0x17a9c6(0x9c))/0xa;if(_0x1d4f44===_0x1b72d3)break;else _0x1c5305['push'](_0x1c5305['shift']());}catch(_0x2f6619){_0x1c5305['push'](_0x1c5305['shift']());}}}(a338_0x4df7,0x2293c));import{getCliVersionPolicyUrl,getProjectTemplateAssetBaseUrl,getProjectTemplateLegacyAssetBaseUrl}from'../constant/cdn.js';import a338_0x1b3d57 from'semver';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;export function isBetaCliVersion(_0x96d024){const _0x1cddf2=a338_0x209a,_0x136fe2=a338_0x1b3d57[_0x1cddf2(0x98)](_0x96d024);return _0x136fe2?a338_0x1b3d57[_0x1cddf2(0xa2)](_0x136fe2)?.[0x0]==='beta':![];}function a338_0x209a(_0x5f17c0,_0x1d27ee){_0x5f17c0=_0x5f17c0-0x8e;const _0x4df7e0=a338_0x4df7();let _0x209aae=_0x4df7e0[_0x5f17c0];return _0x209aae;}export function resolveProjectTemplateDescriptor(_0x3ed25b,_0x1e25c9){const _0x5151d3=a338_0x209a;if(isBetaCliVersion(_0x1e25c9))return _0x3ed25b[_0x5151d3(0xa1)]?.['projectTemplate']??_0x3ed25b[_0x5151d3(0x9d)];return _0x3ed25b[_0x5151d3(0x9d)];}function pickString(_0x3e3be3){const _0x56bde9=a338_0x209a;return typeof _0x3e3be3==='string'&&_0x3e3be3[_0x56bde9(0xa7)]()[_0x56bde9(0x9e)]>0x0?_0x3e3be3['trim']():null;}function normalizeCliVersionPolicy(_0x1479ae){const _0x3c426=a338_0x209a;if(!_0x1479ae||typeof _0x1479ae!=='object')return null;const _0x2fda7e=_0x1479ae,_0x3a676e=_0x2fda7e[_0x3c426(0x97)]&&typeof _0x2fda7e[_0x3c426(0x97)]===_0x3c426(0xa9)?_0x2fda7e[_0x3c426(0x97)]:_0x2fda7e,_0x46c10d=pickString(_0x3a676e[_0x3c426(0x9a)])||pickString(_0x3a676e[_0x3c426(0x96)])||pickString(_0x3a676e[_0x3c426(0x90)]),_0x927664=pickString(_0x3a676e[_0x3c426(0xa8)])||pickString(_0x3a676e['minVersion']);if(!_0x46c10d&&!_0x927664)return null;return{'stableVersion':_0x46c10d,'minimumVersion':_0x927664,'upgradeMessage':pickString(_0x3a676e[_0x3c426(0x9f)])||undefined,'minimumVersionMessage':pickString(_0x3a676e[_0x3c426(0xa4)])||undefined};}async function fetchRabetbaseCdnConfigAt(_0x43c35d){const _0x116cc9=a338_0x209a,_0x52bb6a=new AbortController(),_0x42f3ff=setTimeout(()=>_0x52bb6a[_0x116cc9(0xa0)](),FETCH_TIMEOUT_MS);try{const _0x4f68f5=await fetch(_0x43c35d,{'headers':{'Accept':'application/json'},'signal':_0x52bb6a[_0x116cc9(0x9b)]});if(!_0x4f68f5['ok'])return null;const _0xce1b53=await _0x4f68f5[_0x116cc9(0x92)]();return _0xce1b53&&typeof _0xce1b53===_0x116cc9(0xa9)?_0xce1b53:null;}catch{return null;}finally{clearTimeout(_0x42f3ff);}}export async function fetchRabetbaseCdnConfig(){return fetchRabetbaseCdnConfigAt(getCliVersionPolicyUrl());}export async function fetchProjectTemplateCdnConfig(){const _0x5b8038=await getRabetbaseCdnConfig();return _0x5b8038?{'config':_0x5b8038,'assetBaseUrl':getProjectTemplateAssetBaseUrl(),'legacyAssetBaseUrl':getProjectTemplateLegacyAssetBaseUrl()}:null;}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];export async function getRabetbaseCdnConfig(){const _0x16e433=a338_0x209a,_0x2ad6da=Date[_0x16e433(0x93)]();if(hasCachedConfig){const _0x137a7a=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x2ad6da-cacheTime<_0x137a7a)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x2ad6da,hasCachedConfig=!![],cachedConfig;}export async function getCliVersionPolicy(){return normalizeCliVersionPolicy(await getRabetbaseCdnConfig());}function a338_0x4df7(){const _0x21916=['prerelease','522VmuggE','minimumVersionMessage','183162wtdOIV','1905eXSdcc','trim','minimumVersion','object','64ROOnHs','694212zxkvkq','recommendedVersion','185nXINHt','json','now','15076nRawBT','188011bNBghE','latestVersion','cli','valid','1144827ttmAhA','stableVersion','signal','5248980AlUPIN','projectTemplate','length','upgradeMessage','abort','beta'];a338_0x4df7=function(){return _0x21916;};return a338_0x4df7();}export function clearCliVersionPolicyCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a339_0x195dd7=a339_0x4a05;(function(_0x522a60,_0x404164){const _0xfbfa72=a339_0x4a05,_0x167c57=_0x522a60();while(!![]){try{const _0x334945=-parseInt(_0xfbfa72(0xb6))/0x1+parseInt(_0xfbfa72(0xb5))/0x2*(parseInt(_0xfbfa72(0xb7))/0x3)+-parseInt(_0xfbfa72(0xbc))/0x4+parseInt(_0xfbfa72(0xc0))/0x5+parseInt(_0xfbfa72(0xb8))/0x6*(-parseInt(_0xfbfa72(0xba))/0x7)+-parseInt(_0xfbfa72(0xbe))/0x8+parseInt(_0xfbfa72(0xb9))/0x9;if(_0x334945===_0x404164)break;else _0x167c57['push'](_0x167c57['shift']());}catch(_0x43151d){_0x167c57['push'](_0x167c57['shift']());}}}(a339_0x4aab,0xec2da));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a339_0x24e5eb,getMultiAppConfigs as a339_0x4c211d,getTemplateBaseUrl as a339_0x2db2d7}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x22c7b2){const _0x446685=a339_0x4a05,_0x27049c=readRawConfig(_0x22c7b2);return _0x27049c[_0x446685(0xbd)]&&typeof _0x27049c['env']===_0x446685(0xbb)&&initEnv(_0x27049c[_0x446685(0xbd)]),_0x27049c;}export function getConfigAppCode(){return a339_0x24e5eb();}function a339_0x4a05(_0x14140f,_0x5ea2e9){_0x14140f=_0x14140f-0xb5;const _0x4aab6a=a339_0x4aab();let _0x4a05a4=_0x4aab6a[_0x14140f];return _0x4a05a4;}function a339_0x4aab(){const _0x55cf25=['env','1572328TTPcsZ','project','2927120lmJZJs','41828pcDNrO','1508282xzsKSj','264ClTBIp','486786sqmxBr','4929408jHGCBI','7iHqXCJ','string','880912acmahf'];a339_0x4aab=function(){return _0x55cf25;};return a339_0x4aab();}export function getMultiAppConfigs(_0x5661f6=a339_0x195dd7(0xbf)){return a339_0x4c211d(_0x5661f6);}export function getTemplateBaseUrl(){return a339_0x2db2d7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a340_0x112d(_0x5b20da,_0x285c2b){_0x5b20da=_0x5b20da-0xcd;const _0x50628f=a340_0x5062();let _0x112d6c=_0x50628f[_0x5b20da];return _0x112d6c;}(function(_0x41e3a9,_0x458292){const _0x5a28c7=a340_0x112d,_0x109865=_0x41e3a9();while(!![]){try{const _0x3a52b2=-parseInt(_0x5a28c7(0xd3))/0x1*(-parseInt(_0x5a28c7(0xd2))/0x2)+parseInt(_0x5a28c7(0xcf))/0x3+-parseInt(_0x5a28c7(0xd6))/0x4+parseInt(_0x5a28c7(0xd1))/0x5+-parseInt(_0x5a28c7(0xda))/0x6*(parseInt(_0x5a28c7(0xd8))/0x7)+parseInt(_0x5a28c7(0xd7))/0x8+parseInt(_0x5a28c7(0xd4))/0x9*(-parseInt(_0x5a28c7(0xce))/0xa);if(_0x3a52b2===_0x458292)break;else _0x109865['push'](_0x109865['shift']());}catch(_0x325b99){_0x109865['push'](_0x109865['shift']());}}}(a340_0x5062,0x89e2f));function toFiniteNumber(_0x29cde5){const _0x1da4ab=a340_0x112d;if(typeof _0x29cde5===_0x1da4ab(0xd9)&&Number[_0x1da4ab(0xcd)](_0x29cde5))return _0x29cde5;if(typeof _0x29cde5===_0x1da4ab(0xd5)){const _0x49dc9f=_0x29cde5[_0x1da4ab(0xd0)]();if(!_0x49dc9f)return undefined;const _0x1048e5=Number(_0x49dc9f);if(Number[_0x1da4ab(0xcd)](_0x1048e5))return _0x1048e5;}return undefined;}export function normalizeEntityWithIdResponse(_0x504b24){const _0x3dcb0f=toFiniteNumber(_0x504b24);if(_0x3dcb0f!==undefined)return{'id':_0x3dcb0f,'entity':{'id':_0x3dcb0f}};if(!_0x504b24||typeof _0x504b24!=='object')return{'id':undefined,'entity':{}};const _0x46800b={..._0x504b24},_0x23eb83=toFiniteNumber(_0x46800b['id']);return _0x23eb83!==undefined&&(_0x46800b['id']=_0x23eb83),{'id':_0x23eb83,'entity':_0x46800b};}function a340_0x5062(){const _0x3e9953=['5090WunCmP','397698aOitCX','trim','5633485LasHRb','14XBNmDh','144510UfFWpP','14616rabFvj','string','3323748zrtexY','6687712AqBaRJ','6191227LaaAyx','number','6lzedlr','isFinite'];a340_0x5062=function(){return _0x3e9953;};return a340_0x5062();}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x39d66a,_0xebca41){const _0xa936b4=a341_0x16f4,_0x528680=_0x39d66a();while(!![]){try{const _0x22c5a5=parseInt(_0xa936b4(0x19c))/0x1+parseInt(_0xa936b4(0x19f))/0x2+-parseInt(_0xa936b4(0x1a0))/0x3+-parseInt(_0xa936b4(0x19e))/0x4+-parseInt(_0xa936b4(0x19b))/0x5*(parseInt(_0xa936b4(0x1a2))/0x6)+parseInt(_0xa936b4(0x19d))/0x7+-parseInt(_0xa936b4(0x1a3))/0x8*(-parseInt(_0xa936b4(0x1a4))/0x9);if(_0x22c5a5===_0xebca41)break;else _0x528680['push'](_0x528680['shift']());}catch(_0x270ac3){_0x528680['push'](_0x528680['shift']());}}}(a341_0x192e,0x67321));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a341_0x16f4(_0x5c40c1,_0x55eda){_0x5c40c1=_0x5c40c1-0x19b;const _0x192e03=a341_0x192e();let _0x16f44f=_0x192e03[_0x5c40c1];return _0x16f44f;}export async function copyDir(_0x576436,_0x18b4a2){const _0x1a2004=a341_0x16f4,_0x2308b4=statSync(_0x576436);if(_0x2308b4[_0x1a2004(0x1a1)]()){!existsSync(_0x18b4a2)&&mkdirSync(_0x18b4a2,{'recursive':!![]});const _0x44e883=readdirSync(_0x576436);for(const _0x13d6d6 of _0x44e883){await copyDir(join(_0x576436,_0x13d6d6),join(_0x18b4a2,_0x13d6d6));}}else copyFileSync(_0x576436,_0x18b4a2);}export function ensureDir(_0x5deb59){!existsSync(_0x5deb59)&&mkdirSync(_0x5deb59,{'recursive':!![]});}function a341_0x192e(){const _0x106dae=['24rMktyA','4827411CpCztD','9095RSnvor','328842JTYQxo','371175hyCYNJ','2854160YWeKXM','167744nADOvj','682254pwGaoN','isDirectory','2346UhdUdG'];a341_0x192e=function(){return _0x106dae;};return a341_0x192e();}export function pathExists(_0x5c2260){return existsSync(_0x5c2260);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a342_0x5c7d4d=a342_0x4da6;(function(_0x1a08d4,_0x1e0999){const _0x3ea3f8=a342_0x4da6,_0x51d6dc=_0x1a08d4();while(!![]){try{const _0x453626=-parseInt(_0x3ea3f8(0x1d5))/0x1*(-parseInt(_0x3ea3f8(0x1e8))/0x2)+-parseInt(_0x3ea3f8(0x1f3))/0x3*(parseInt(_0x3ea3f8(0x1dd))/0x4)+-parseInt(_0x3ea3f8(0x1db))/0x5*(parseInt(_0x3ea3f8(0x1ed))/0x6)+-parseInt(_0x3ea3f8(0x1e4))/0x7*(-parseInt(_0x3ea3f8(0x1d6))/0x8)+parseInt(_0x3ea3f8(0x1e6))/0x9+parseInt(_0x3ea3f8(0x1f6))/0xa+-parseInt(_0x3ea3f8(0x1ef))/0xb;if(_0x453626===_0x1e0999)break;else _0x51d6dc['push'](_0x51d6dc['shift']());}catch(_0x2a69d0){_0x51d6dc['push'](_0x51d6dc['shift']());}}}(a342_0x2025,0x94578));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x53a6e8=a342_0x4da6,_0x33c226=getTemplateBaseUrl();return _0x33c226+_0x53a6e8(0x1fa);}const CACHE_DIR=join(homedir(),a342_0x5c7d4d(0x1d8),a342_0x5c7d4d(0x1de));export async function fetchGuidesFromCDN(){const _0x1ea9b4=a342_0x5c7d4d,_0x3b730c=getGuidesCdnUrl(),_0x154133=await fetch(_0x3b730c,{'headers':{'Accept':_0x1ea9b4(0x1d9)}});if(!_0x154133['ok'])throw new Error(_0x1ea9b4(0x1dc)+_0x154133[_0x1ea9b4(0x1e5)]+'\x20'+_0x154133[_0x1ea9b4(0x1f4)]);const _0x137b19=await _0x154133[_0x1ea9b4(0x1e1)]();if(!_0x137b19['guides']||typeof _0x137b19[_0x1ea9b4(0x1ec)]!==_0x1ea9b4(0x1e2))throw new Error(_0x1ea9b4(0x1d7));return _0x137b19;}export function writeGuidesToProject(_0x51c69b,_0x35c92b,_0x433f2d=a342_0x5c7d4d(0x1ea),_0x383984){const _0x488376=a342_0x5c7d4d,_0x204f70=join(_0x35c92b,_0x433f2d);mkdirSync(_0x204f70,{'recursive':!![]});for(const [_0x28cdc2,_0xcb43eb]of Object[_0x488376(0x1e9)](_0x51c69b['guides'])){let _0x3bdb84=_0xcb43eb[_0x488376(0x1e3)];_0xcb43eb[_0x488376(0x1ee)]&&(_0x3bdb84=appendUpdateTime(_0x3bdb84,_0xcb43eb[_0x488376(0x1ee)])),writeFileSync(join(_0x204f70,_0x28cdc2+_0x488376(0x1d4)),_0x3bdb84,_0x488376(0x1f2));}}export function appendUpdateTime(_0x1335cf,_0x41f26f){const _0x467a2a=a342_0x5c7d4d;return _0x1335cf=_0x1335cf[_0x467a2a(0x1eb)](/\n*>更新时间:.*$/m,''),_0x1335cf[_0x467a2a(0x1f8)]()+(_0x467a2a(0x1f7)+_0x41f26f);}export function getSkillTemplate(_0x5ac229){const _0x1208db=a342_0x5c7d4d;return _0x5ac229[_0x1208db(0x1e7)]?.[_0x1208db(0x1e3)]||'';}export function appendExtendContents(_0x164418,_0x54c6e5,_0x49712c){const _0x15c910=a342_0x5c7d4d,_0x1b8a29=[];for(const [,_0x4743c7]of Object[_0x15c910(0x1e9)](_0x54c6e5[_0x15c910(0x1ec)])){_0x4743c7['extendContent']&&_0x1b8a29[_0x15c910(0x1f5)](_0x4743c7[_0x15c910(0x1da)][_0x15c910(0x1f8)]());}if(_0x1b8a29['length']===0x0)return _0x164418;return _0x164418[_0x15c910(0x1f8)]()+'\x0a\x0a'+_0x1b8a29[_0x15c910(0x1f1)]('\x0a\x0a')+'\x0a';}function a342_0x4da6(_0x5464a4,_0x49f039){_0x5464a4=_0x5464a4-0x1d4;const _0x20251d=a342_0x2025();let _0x4da685=_0x20251d[_0x5464a4];return _0x4da685;}export function writeSkillFile(_0x15f7d7,_0x114dc5,_0x37865a){const _0x183a71=a342_0x5c7d4d,_0x575aa2=getSkillTemplate(_0x15f7d7);if(!_0x575aa2)throw new Error(_0x183a71(0x1f9));const _0x121fa6=dirname(_0x114dc5);mkdirSync(_0x121fa6,{'recursive':!![]});let _0x18a6a8=_0x575aa2[_0x183a71(0x1eb)](/\{\{IDE_NAME\}\}/g,_0x37865a);_0x18a6a8=appendExtendContents(_0x18a6a8,_0x15f7d7),_0x15f7d7['skillTemplate']['lastUpdated']&&(_0x18a6a8=appendUpdateTime(_0x18a6a8,_0x15f7d7[_0x183a71(0x1e7)]['lastUpdated'])),writeFileSync(_0x114dc5,_0x18a6a8,'utf-8');}function a342_0x2025(){const _0x4a63ec=['application/json','extendContent','20vNJTMw','CDN\x20request\x20failed:\x20','412JeUqto','cache','path','length','json','object','content','7TXjSai','status','8187093WBFmdH','skillTemplate','2099186PfTpRs','entries','.lovrabet/skill/guides','replace','guides','789708BeFYll','lastUpdated','9806709mDAklY','keys','join','utf-8','30309LEGdBk','statusText','push','4736810YknVWb','\x0a\x0a>更新时间:','trimEnd','CDN\x20data\x20is\x20missing\x20skillTemplate','/skills/guides.json','map','.md','1xyLdXN','5066056BiONOW','CDN\x20returned\x20invalid\x20data','.lovrabet'];a342_0x2025=function(){return _0x4a63ec;};return a342_0x2025();}export async function installGuides(_0x437bff){const _0x475263=a342_0x5c7d4d,_0xaa4ff5=await fetchGuidesFromCDN();return writeGuidesToProject(_0xaa4ff5,_0x437bff),Object[_0x475263(0x1f0)](_0xaa4ff5[_0x475263(0x1ec)])[_0x475263(0x1e0)];}export function getGuidesSummary(_0x2e9a36){const _0x510919=a342_0x5c7d4d;return Object[_0x510919(0x1e9)](_0x2e9a36['guides'])[_0x510919(0x1fb)](([_0x2645d5,_0x499e7d])=>({'key':_0x2645d5,'title':_0x499e7d['title'],'path':_0x499e7d[_0x510919(0x1df)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2e9d2b,_0x274061){const _0x53adc9=a343_0x4848,_0x48aa31=_0x2e9d2b();while(!![]){try{const _0x1d5eb1=parseInt(_0x53adc9(0x16a))/0x1+-parseInt(_0x53adc9(0x169))/0x2*(parseInt(_0x53adc9(0x166))/0x3)+-parseInt(_0x53adc9(0x158))/0x4*(-parseInt(_0x53adc9(0x167))/0x5)+parseInt(_0x53adc9(0x15b))/0x6+-parseInt(_0x53adc9(0x162))/0x7*(-parseInt(_0x53adc9(0x15e))/0x8)+parseInt(_0x53adc9(0x153))/0x9+-parseInt(_0x53adc9(0x16b))/0xa;if(_0x1d5eb1===_0x274061)break;else _0x48aa31['push'](_0x48aa31['shift']());}catch(_0x44c18e){_0x48aa31['push'](_0x48aa31['shift']());}}}(a343_0x1b1e,0xc52f5));function a343_0x4848(_0x4354d9,_0x15f9c4){_0x4354d9=_0x4354d9-0x14e;const _0x1b1e72=a343_0x1b1e();let _0x4848ad=_0x1b1e72[_0x4354d9];return _0x4848ad;}function a343_0x1b1e(){const _0x3b9ebb=['application/json','Request\x20failed','TypeError','ECONNRESET','url','3197394QyqaGe','AbortError','\x20in\x20','content-type','statusText','5438564mInrOQ','headers','signal','8274012SdGJSR','fetch','ENOTFOUND','256VfXUeu','message','name','abort','32956UOnQfP','ms...','text','includes','76824ZiNacs','5cRFiWd','log','34IBNjLK','316970NVcolt','23185300EoIYfl'];a343_0x1b1e=function(){return _0x3b9ebb;};return a343_0x1b1e();}export async function httpRequest(_0x3a918e,_0x507fc2={}){const _0x3ea54f=a343_0x4848,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x507fc2;let _0x5aacf4=null;for(let _0x4b4221=0x0;_0x4b4221<=retries;_0x4b4221++){try{const _0x341189=new AbortController(),_0x44ae5e=setTimeout(()=>_0x341189[_0x3ea54f(0x161)](),timeout),_0x5bf984=await fetch(_0x3a918e,{'headers':headers,'signal':_0x341189[_0x3ea54f(0x15a)]});clearTimeout(_0x44ae5e);let _0x2eb8e4;const _0x2ee075=_0x5bf984[_0x3ea54f(0x159)]['get'](_0x3ea54f(0x156));return _0x2ee075?.[_0x3ea54f(0x165)](_0x3ea54f(0x14e))?_0x2eb8e4=await _0x5bf984['json']():_0x2eb8e4=await _0x5bf984[_0x3ea54f(0x164)](),{'ok':_0x5bf984['ok'],'status':_0x5bf984['status'],'statusText':_0x5bf984[_0x3ea54f(0x157)],'data':_0x2eb8e4,'headers':_0x5bf984[_0x3ea54f(0x159)],'url':_0x5bf984[_0x3ea54f(0x152)],'text':()=>_0x5bf984[_0x3ea54f(0x164)]()};}catch(_0x565d13){_0x5aacf4=_0x565d13 instanceof Error?_0x565d13:new Error(String(_0x565d13));if(_0x4b4221===retries)break;if(shouldRetry(_0x565d13)){console[_0x3ea54f(0x168)]('*\x20Request\x20failed;\x20retry\x20'+(_0x4b4221+0x1)+_0x3ea54f(0x155)+retryDelay+_0x3ea54f(0x163)),await sleep(retryDelay);continue;}else break;}}throw _0x5aacf4||new Error(_0x3ea54f(0x14f));}function shouldRetry(_0x19e760){const _0x3ec9dc=a343_0x4848;if(_0x19e760 instanceof Error){if(_0x19e760[_0x3ec9dc(0x160)]===_0x3ec9dc(0x154))return![];if(_0x19e760['name']===_0x3ec9dc(0x150)&&_0x19e760['message'][_0x3ec9dc(0x165)](_0x3ec9dc(0x15c)))return!![];if(_0x19e760['message'][_0x3ec9dc(0x165)](_0x3ec9dc(0x151)))return!![];if(_0x19e760[_0x3ec9dc(0x15f)][_0x3ec9dc(0x165)](_0x3ec9dc(0x15d)))return![];}return![];}function sleep(_0xe3de83){return new Promise(_0x5596ba=>setTimeout(_0x5596ba,_0xe3de83));}export function validateUrl(_0x307b4d){try{return new URL(_0x307b4d),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x19599c,_0x4145c9){const _0x548c8f=a344_0x57f4,_0x302228=_0x19599c();while(!![]){try{const _0x4d8c00=-parseInt(_0x548c8f(0x12a))/0x1+-parseInt(_0x548c8f(0x122))/0x2+parseInt(_0x548c8f(0x130))/0x3*(parseInt(_0x548c8f(0x123))/0x4)+parseInt(_0x548c8f(0x12d))/0x5*(-parseInt(_0x548c8f(0x126))/0x6)+parseInt(_0x548c8f(0x129))/0x7*(-parseInt(_0x548c8f(0x124))/0x8)+-parseInt(_0x548c8f(0x12e))/0x9*(-parseInt(_0x548c8f(0x120))/0xa)+-parseInt(_0x548c8f(0x121))/0xb*(-parseInt(_0x548c8f(0x12c))/0xc);if(_0x4d8c00===_0x4145c9)break;else _0x302228['push'](_0x302228['shift']());}catch(_0x21dc33){_0x302228['push'](_0x302228['shift']());}}}(a344_0x1e67,0x8474d));function a344_0x1e67(){const _0x593c59=['true','4454628WfOpsx','5mcgBkR','93429FSKRGr','stdin','472893WlCDvb','isRaw','940yGtHgG','66deaLXQ','1313474UYzqNQ','8SKiuFD','1432KvflYd','setRawMode','6204570qcCSVG','stdout','isTTY','19579vGsFEx','784354wBRATt'];a344_0x1e67=function(){return _0x593c59;};return a344_0x1e67();}function env(_0x5692c9){return process.env[`RABETBASE_${_0x5692c9}`]||process.env[`LOVRABET_${_0x5692c9}`]||undefined;}export function isNonInteractive(_0x214760){const _0x145c96=a344_0x57f4;return!!(_0x214760['nonInteractive']||_0x214760['ci']||env('CI')===_0x145c96(0x12b)||process.env.CI===_0x145c96(0x12b)||!process[_0x145c96(0x127)][_0x145c96(0x128)]||!isStdinRawModeSupported());}function a344_0x57f4(_0x5e3599,_0x5b98ad){_0x5e3599=_0x5e3599-0x11f;const _0x1e6717=a344_0x1e67();let _0x57f4da=_0x1e6717[_0x5e3599];return _0x57f4da;}function isStdinRawModeSupported(){const _0x54310d=a344_0x57f4;if(!process['stdin'][_0x54310d(0x128)])return![];try{const _0xe49f4f=process[_0x54310d(0x12f)][_0x54310d(0x11f)];return process['stdin']['setRawMode'](!![]),process['stdin'][_0x54310d(0x125)](_0xe49f4f??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a345_0x30a971=a345_0x573f;(function(_0xb55676,_0x3fc97b){const _0x40cffc=a345_0x573f,_0x7f079b=_0xb55676();while(!![]){try{const _0x568af1=parseInt(_0x40cffc(0x1ee))/0x1+parseInt(_0x40cffc(0x20c))/0x2*(-parseInt(_0x40cffc(0x208))/0x3)+-parseInt(_0x40cffc(0x1fe))/0x4+-parseInt(_0x40cffc(0x20b))/0x5+-parseInt(_0x40cffc(0x212))/0x6*(parseInt(_0x40cffc(0x217))/0x7)+-parseInt(_0x40cffc(0x214))/0x8+parseInt(_0x40cffc(0x210))/0x9;if(_0x568af1===_0x3fc97b)break;else _0x7f079b['push'](_0x7f079b['shift']());}catch(_0x205814){_0x7f079b['push'](_0x7f079b['shift']());}}}(a345_0x4501,0x4630c));function a345_0x4501(){const _0x3d1408=['setLogPath','Completed:\x20','createLogger','transports','blue','toISOString','stringify','command','red','114799kFDikt','unknown','initWinstonLogger','currentRawCommand','clear','trim','dirname','errors','success','File','parse','format','details','error','rawCommand','warn','305212UwrzDh','Failed:\x20','existsSync','timestamp','winstonLogger','logFilePath','logTask','message','Starting:\x20','info','1223724zgamIq','Failed\x20to\x20read\x20logs:','filter','2362080zVUvsz','2dHbGLt','getWinstonInstance','duration','Failed\x20to\x20clear\x20logs:','14531211SXSovC','mkdirSync','49902TzKNUm','yellow','89456thurMY','printf','clearLogs','399ZMJmWG','writeFileSync','combine','now','utf8','readLogs','split'];a345_0x4501=function(){return _0x3d1408;};return a345_0x4501();}import a345_0x3f169d from'winston';import a345_0x209e01 from'node:fs';import a345_0x1823a6 from'node:path';function a345_0x573f(_0x155bf2,_0x2641f7){_0x155bf2=_0x155bf2-0x1df;const _0x450199=a345_0x4501();let _0x573f17=_0x450199[_0x155bf2];return _0x573f17;}class Logger{[a345_0x30a971(0x202)];[a345_0x30a971(0x203)];['currentRawCommand']='';constructor(){const _0x3c082f=a345_0x30a971;this[_0x3c082f(0x203)]='';}['setRawCommand'](_0x2be72b){const _0x4c7d69=a345_0x30a971;this[_0x4c7d69(0x1f1)]=_0x2be72b;}[a345_0x30a971(0x1f0)](){const _0x1413fb=a345_0x30a971,_0x4180a3=a345_0x1823a6[_0x1413fb(0x1f4)](this[_0x1413fb(0x203)]);!a345_0x209e01[_0x1413fb(0x200)](_0x4180a3)&&a345_0x209e01[_0x1413fb(0x211)](_0x4180a3,{'recursive':!![]});const _0x22dd49=a345_0x3f169d[_0x1413fb(0x1f9)][_0x1413fb(0x1e0)](a345_0x3f169d[_0x1413fb(0x1f9)][_0x1413fb(0x201)](),a345_0x3f169d['format'][_0x1413fb(0x1f5)]({'stack':!![]}),a345_0x3f169d[_0x1413fb(0x1f9)][_0x1413fb(0x215)](_0x5657e8=>{const _0x226cc6=_0x1413fb,_0x51e2a1={'timestamp':_0x5657e8[_0x226cc6(0x201)]||new Date()[_0x226cc6(0x1ea)](),'level':_0x5657e8['level']||_0x226cc6(0x207),'command':_0x5657e8[_0x226cc6(0x1ec)]||_0x226cc6(0x1ef),'rawCommand':_0x5657e8[_0x226cc6(0x1fc)]||this[_0x226cc6(0x1f1)]||undefined,'message':_0x5657e8['message']||'','duration':_0x5657e8[_0x226cc6(0x20e)]||undefined,'details':_0x5657e8[_0x226cc6(0x1fa)]||undefined};return JSON[_0x226cc6(0x1eb)](_0x51e2a1);}));this[_0x1413fb(0x202)]=a345_0x3f169d[_0x1413fb(0x1e7)]({'level':_0x1413fb(0x207),'format':_0x22dd49,'transports':[new a345_0x3f169d[(_0x1413fb(0x1e8))][(_0x1413fb(0x1f7))]({'filename':this[_0x1413fb(0x203)],'level':'info'})],'silent':![]}),a345_0x3f169d['addColors']({'success':'green','error':_0x1413fb(0x1ed),'warn':_0x1413fb(0x213),'info':_0x1413fb(0x1e9)});}[a345_0x30a971(0x1e5)](_0x7e9f00){const _0x27ac3b=a345_0x30a971;this[_0x27ac3b(0x203)]=a345_0x1823a6['join'](_0x7e9f00,'.lovrabet.log'),this[_0x27ac3b(0x202)]&&this[_0x27ac3b(0x202)][_0x27ac3b(0x1f2)](),this[_0x27ac3b(0x1f0)]();}['info'](_0xf010e6,_0x3d45ad,_0x4dc91b){const _0x1a9516=a345_0x30a971;if(!this[_0x1a9516(0x203)]||!this['winstonLogger'])return;this[_0x1a9516(0x202)][_0x1a9516(0x207)](_0x3d45ad,{'command':_0xf010e6,'details':_0x4dc91b});}[a345_0x30a971(0x1f6)](_0x40e388,_0x2eef94,_0x1b36df,_0x5ca618){const _0x56319d=a345_0x30a971;if(!this['logFilePath']||!this[_0x56319d(0x202)])return;this[_0x56319d(0x202)]['log'](_0x56319d(0x207),_0x2eef94,{'level':_0x56319d(0x1f6),'command':_0x40e388,'duration':_0x1b36df,'details':_0x5ca618});}['error'](_0x18d754,_0x169b6c,_0x5a90f3){if(!this['logFilePath']||!this['winstonLogger'])return;this['winstonLogger']['error'](_0x169b6c,{'command':_0x18d754,'details':_0x5a90f3});}['warn'](_0x1bb115,_0x15eae0,_0x2d40d2){const _0x5385df=a345_0x30a971;if(!this[_0x5385df(0x203)]||!this[_0x5385df(0x202)])return;this[_0x5385df(0x202)][_0x5385df(0x1fd)](_0x15eae0,{'command':_0x1bb115,'details':_0x2d40d2});}async[a345_0x30a971(0x204)](_0x3fc379,_0x4bd4ce,_0x2cf2e2){const _0x201b35=a345_0x30a971,_0x17d6a2=Date[_0x201b35(0x1e1)]();this[_0x201b35(0x207)](_0x3fc379,_0x201b35(0x206)+_0x4bd4ce);try{const _0x567713=await _0x2cf2e2(),_0x17794d=Date[_0x201b35(0x1e1)]()-_0x17d6a2;return this[_0x201b35(0x1f6)](_0x3fc379,_0x201b35(0x1e6)+_0x4bd4ce,_0x17794d),_0x567713;}catch(_0x37a373){const _0x19bd8b=Date['now']()-_0x17d6a2;this[_0x201b35(0x1fb)](_0x3fc379,_0x201b35(0x1ff)+_0x4bd4ce,{'error':_0x37a373 instanceof Error?_0x37a373[_0x201b35(0x205)]:String(_0x37a373),'duration':_0x19bd8b});throw _0x37a373;}}[a345_0x30a971(0x1e3)](){const _0x288990=a345_0x30a971;try{if(!a345_0x209e01['existsSync'](this[_0x288990(0x203)]))return[];const _0x1bbf8a=a345_0x209e01['readFileSync'](this[_0x288990(0x203)],_0x288990(0x1e2));return _0x1bbf8a[_0x288990(0x1e4)]('\x0a')[_0x288990(0x20a)](_0x40d02f=>_0x40d02f[_0x288990(0x1f3)]())['map'](_0x4eafb4=>JSON[_0x288990(0x1f8)](_0x4eafb4));}catch(_0x296fd3){return console['warn'](_0x288990(0x209),_0x296fd3),[];}}[a345_0x30a971(0x216)](){const _0x564e5e=a345_0x30a971;try{a345_0x209e01[_0x564e5e(0x200)](this[_0x564e5e(0x203)])&&a345_0x209e01[_0x564e5e(0x1df)](this['logFilePath'],'',_0x564e5e(0x1e2));}catch(_0x370206){console[_0x564e5e(0x1fd)](_0x564e5e(0x20f),_0x370206);}}[a345_0x30a971(0x20d)](){return this['winstonLogger'];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x45b770,_0x59d1e3){const _0x4ea76f=a346_0x3831,_0x284fef=_0x45b770();while(!![]){try{const _0x4d64b2=parseInt(_0x4ea76f(0x151))/0x1+-parseInt(_0x4ea76f(0x158))/0x2*(-parseInt(_0x4ea76f(0x155))/0x3)+-parseInt(_0x4ea76f(0x152))/0x4*(parseInt(_0x4ea76f(0x14b))/0x5)+parseInt(_0x4ea76f(0x157))/0x6+-parseInt(_0x4ea76f(0x14d))/0x7*(-parseInt(_0x4ea76f(0x14e))/0x8)+parseInt(_0x4ea76f(0x14f))/0x9+-parseInt(_0x4ea76f(0x154))/0xa*(parseInt(_0x4ea76f(0x14c))/0xb);if(_0x4d64b2===_0x59d1e3)break;else _0x284fef['push'](_0x284fef['shift']());}catch(_0x577d5e){_0x284fef['push'](_0x284fef['shift']());}}}(a346_0x1352,0xcba44));function a346_0x1352(){const _0x4f2da6=['184JGoRxj','6292305WRDsRr','Invalid\x20JSON\x20for\x20--params:\x20','222600hdTSJN','36TtieNo','isArray','3102370jHtdSs','24DjZxTL','validation','2349888hcscZT','347570xpZtVU','925105doZbxY','11cGrJcH','32221xinyLn'];a346_0x1352=function(){return _0x4f2da6;};return a346_0x1352();}function a346_0x3831(_0x529c34,_0x58d78a){_0x529c34=_0x529c34-0x14b;const _0x13522a=a346_0x1352();let _0x3831ac=_0x13522a[_0x529c34];return _0x3831ac;}import{CliErrors}from'../errors.js';export function parseJsonParams(_0x55c752){const _0x17a5c1=a346_0x3831;if(!_0x55c752)return undefined;let _0x3425f1;try{_0x3425f1=JSON['parse'](_0x55c752);}catch{throw CliErrors[_0x17a5c1(0x156)](_0x17a5c1(0x150)+_0x55c752);}if(!_0x3425f1||typeof _0x3425f1!=='object'||Array[_0x17a5c1(0x153)](_0x3425f1))throw CliErrors[_0x17a5c1(0x156)]('--params\x20must\x20be\x20a\x20JSON\x20object','Example:\x20--params\x20\x27{\x22id\x22:123}\x27');return _0x3425f1;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a347_0x32bd(_0x1004b1,_0x11f5a9){_0x1004b1=_0x1004b1-0x162;const _0x5b046c=a347_0x5b04();let _0x32bdc2=_0x5b046c[_0x1004b1];return _0x32bdc2;}const a347_0x3c19d1=a347_0x32bd;(function(_0x1abcd8,_0x380c1b){const _0x46b7bc=a347_0x32bd,_0x244065=_0x1abcd8();while(!![]){try{const _0x3deb2b=-parseInt(_0x46b7bc(0x16a))/0x1*(parseInt(_0x46b7bc(0x167))/0x2)+parseInt(_0x46b7bc(0x166))/0x3*(-parseInt(_0x46b7bc(0x16b))/0x4)+-parseInt(_0x46b7bc(0x16e))/0x5+parseInt(_0x46b7bc(0x16c))/0x6+-parseInt(_0x46b7bc(0x169))/0x7+-parseInt(_0x46b7bc(0x165))/0x8*(-parseInt(_0x46b7bc(0x164))/0x9)+parseInt(_0x46b7bc(0x162))/0xa*(parseInt(_0x46b7bc(0x168))/0xb);if(_0x3deb2b===_0x380c1b)break;else _0x244065['push'](_0x244065['shift']());}catch(_0x4eada4){_0x244065['push'](_0x244065['shift']());}}}(a347_0x5b04,0x60831));export const isWindows=process[a347_0x3c19d1(0x163)]===a347_0x3c19d1(0x16d);export function resolveNpmBin(_0x394de4){const _0x2e0cdd=a347_0x3c19d1;return isWindows?_0x394de4+_0x2e0cdd(0x16f):_0x394de4;}function a347_0x5b04(){const _0x3d6870=['33MkynSs','1906dDxpSU','11fVxHdo','97146BmrclF','263CWyzgD','96752JdjSET','4726038MdiuZb','win32','2149600AflGQl','.cmd','1530430eZqIWV','platform','18ORhVKt','1660408NnbNnp'];a347_0x5b04=function(){return _0x3d6870;};return a347_0x5b04();}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x5d33ca){return new Promise(_0x53fe3e=>setTimeout(_0x53fe3e,_0x5d33ca));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a349_0x49c115=a349_0x3452;function a349_0x1142(){const _0x23a768=['.ts','tableName:\x20\x22','sdk-config','error','.jsx','processTemplate','19323MGFQaG','Starting\x20template\x20content\x20replacement','32523UtvTzE','processDirectory','50HIlAQs','toLowerCase','\x20},','processFile','toComponentName','push','getSeconds','datasetCode:\x20\x22','getFullYear','padStart','slice','utf8','copyFile','.tsx','pop','.tpl','getMonth','238zGjzce','toISOString','endsWith','includes','template','join','.scss','readdir','alias:\x20\x22','tableName','.json','928350GIddYR','extname','now','25hSGBVt','name:\x20\x22','map','pad','isFile','split','5416012uZFjcB','replace','replaceContent','4540KCLUBu','promises','message','getMinutes','name','default','datasetCode','success','54732909kQEutc','api','mkdir','433544DxqFbM','formatLocalTimestamp','toDisplayTitle','737306RpHjTF','.js','.md','alias','toUpperCase'];a349_0x1142=function(){return _0x23a768;};return a349_0x1142();}(function(_0x274559,_0x3f91c5){const _0x440157=a349_0x3452,_0x20f762=_0x274559();while(!![]){try{const _0x2d844f=parseInt(_0x440157(0x186))/0x1+parseInt(_0x440157(0x195))/0x2*(parseInt(_0x440157(0x193))/0x3)+parseInt(_0x440157(0x175))/0x4+-parseInt(_0x440157(0x16f))/0x5*(-parseInt(_0x440157(0x16c))/0x6)+parseInt(_0x440157(0x1a6))/0x7*(parseInt(_0x440157(0x183))/0x8)+parseInt(_0x440157(0x191))/0x9*(parseInt(_0x440157(0x178))/0xa)+-parseInt(_0x440157(0x180))/0xb;if(_0x2d844f===_0x3f91c5)break;else _0x20f762['push'](_0x20f762['shift']());}catch(_0x5e9c24){_0x20f762['push'](_0x20f762['shift']());}}}(a349_0x1142,0xeea84));import a349_0x3e5597 from'node:fs';import a349_0x5e2125 from'node:path';import{logger}from'../utils/logger.js';function a349_0x3452(_0x25b581,_0x167692){_0x25b581=_0x25b581-0x163;const _0x1142fd=a349_0x1142();let _0x34520e=_0x1142fd[_0x25b581];return _0x34520e;}import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static['pad'](_0x9f822e){const _0x2e026f=a349_0x3452;return String(_0x9f822e)[_0x2e026f(0x19e)](0x2,'0');}static[a349_0x49c115(0x184)](_0x26492a){const _0x3c75f7=a349_0x49c115,_0x1dbfff=_0x26492a[_0x3c75f7(0x19d)](),_0x3b4ae6=this[_0x3c75f7(0x172)](_0x26492a[_0x3c75f7(0x1a5)]()+0x1),_0x442d0e=this[_0x3c75f7(0x172)](_0x26492a['getDate']()),_0x597dab=this['pad'](_0x26492a['getHours']()),_0x12bf2d=this[_0x3c75f7(0x172)](_0x26492a[_0x3c75f7(0x17b)]()),_0xc49f4e=this[_0x3c75f7(0x172)](_0x26492a[_0x3c75f7(0x19b)]());return{'createdAt':_0x1dbfff+'-'+_0x3b4ae6+'-'+_0x442d0e+'\x20'+_0x597dab+':'+_0x12bf2d+':'+_0xc49f4e,'createdDate':_0x1dbfff+'-'+_0x3b4ae6+'-'+_0x442d0e,'createdTime':_0x597dab+':'+_0x12bf2d+':'+_0xc49f4e};}static[a349_0x49c115(0x199)](_0x160140){const _0x529a98=a349_0x49c115,_0x5d57c5=_0x160140[_0x529a98(0x174)]('/')['pop']()||_0x160140;return _0x5d57c5['split']('-')[_0x529a98(0x171)](_0x7b57db=>_0x7b57db['charAt'](0x0)[_0x529a98(0x18a)]()+_0x7b57db[_0x529a98(0x19f)](0x1)[_0x529a98(0x196)]())[_0x529a98(0x166)]('');}static['toDisplayTitle'](_0x119f37){const _0x5c8af0=a349_0x49c115,_0x198ee3=_0x119f37[_0x5c8af0(0x174)]('/')[_0x5c8af0(0x1a3)]()||_0x119f37;return _0x198ee3['split']('-')['map'](_0x1618ee=>_0x1618ee['charAt'](0x0)[_0x5c8af0(0x18a)]()+_0x1618ee['slice'](0x1)['toLowerCase']())[_0x5c8af0(0x166)]('\x20');}static[a349_0x49c115(0x177)](_0xd03a00,_0x2aff80,_0x1e6050){const _0x1694ce=a349_0x49c115,_0xeeeaaa=this[_0x1694ce(0x199)](_0x2aff80),_0x5cc93f=this[_0x1694ce(0x185)](_0x2aff80),{createdAt:_0x4eeda9,createdDate:_0x28bb64,createdTime:_0x44a619}=this['formatLocalTimestamp'](new Date());let _0x391159=_0xd03a00[_0x1694ce(0x176)](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0xeeeaaa)[_0x1694ce(0x176)](/\{DisplayTitle\}/g,_0x5cc93f)[_0x1694ce(0x176)](/\{PageName\}/g,_0x2aff80)[_0x1694ce(0x176)](/\{TemplateName\}/g,_0x1e6050)[_0x1694ce(0x176)](/\{CreatedAt\}/g,_0x4eeda9)[_0x1694ce(0x176)](/\{CreatedDate\}/g,_0x28bb64)[_0x1694ce(0x176)](/\{CreatedTime\}/g,_0x44a619);return _0x391159;}static['replaceApiContent'](_0x594a8f,_0x2fbd9f,_0x26773f,_0x28cc1e,_0x4859b6,_0x2bfc68,_0x9b94c3,_0xfecae1,_0x353b2e){const _0xf36e23=a349_0x49c115,_0x38da57=new Date(),_0xaa9685=_0x38da57[_0xf36e23(0x1a7)](),_0x1f0167=_0x26773f[_0xf36e23(0x171)](_0x330a22=>{const _0x36a8dc=_0xf36e23,_0xa47a1=[_0x36a8dc(0x19c)+_0x330a22[_0x36a8dc(0x17e)]+'\x22',_0x36a8dc(0x18c)+_0x330a22[_0x36a8dc(0x16a)]+'\x22',_0x36a8dc(0x170)+_0x330a22['name']+'\x22'];return _0x330a22['alias']&&_0xa47a1[_0x36a8dc(0x19a)](_0x36a8dc(0x169)+_0x330a22[_0x36a8dc(0x189)]+'\x22'),'\x0a\x20\x20\x20\x20{\x20'+_0xa47a1[_0x36a8dc(0x166)](',\x20')+_0x36a8dc(0x197);})[_0xf36e23(0x166)](''),_0x2b03c8=_0x28cc1e||_0x26773f[0x0]?.[_0xf36e23(0x189)]||'YourModel';let _0x50ef1f=_0x594a8f['replace'](/\{AppCode\}/g,_0x2fbd9f)['replace'](/\{ModelConfigs\}/g,_0x1f0167)[_0xf36e23(0x176)](/\{ExampleModelName\}/g,_0x2b03c8)[_0xf36e23(0x176)](/\{ApiFileName\}/g,_0x4859b6||_0xf36e23(0x181))[_0xf36e23(0x176)](/\{ConfigName\}/g,_0x2bfc68||_0xf36e23(0x17d))['replace'](/\{ClientConfigParam\}/g,_0x9b94c3||'')[_0xf36e23(0x176)](/\{SdkConfigFileName\}/g,_0x353b2e||_0xf36e23(0x18d))[_0xf36e23(0x176)](/\{VarPrefix\}/g,_0xfecae1||'LOVRABET')[_0xf36e23(0x176)](/\{CreatedAt\}/g,_0xaa9685);return _0x50ef1f;}static async[a349_0x49c115(0x190)](_0x5a86b3,_0x54782d,_0x5812b2,_0x119379,_0x19e8ab=!![]){const _0x3a333a=a349_0x49c115,_0x4ea8b0=Date[_0x3a333a(0x16e)]();try{_0x19e8ab&&logger['info'](_0x3a333a(0x165),_0x3a333a(0x192),{'templatePath':_0x5a86b3,'targetPath':_0x54782d,'pageName':_0x5812b2,'templateName':_0x119379});await a349_0x3e5597[_0x3a333a(0x179)][_0x3a333a(0x182)](_0x54782d,{'recursive':!![]}),await this[_0x3a333a(0x194)](_0x5a86b3,_0x54782d,_0x5812b2,_0x119379);if(_0x19e8ab){const _0x2ba921=Date['now']()-_0x4ea8b0;logger[_0x3a333a(0x17f)](_0x3a333a(0x165),'Template\x20content\x20replacement\x20completed',_0x2ba921,{'pageName':_0x5812b2,'templateName':_0x119379});}}catch(_0x4538a1){if(_0x19e8ab){const _0x501cbf=Date['now']()-_0x4ea8b0;logger[_0x3a333a(0x18e)](_0x3a333a(0x165),'Template\x20content\x20replacement\x20failed',{'templatePath':_0x5a86b3,'targetPath':_0x54782d,'pageName':_0x5812b2,'templateName':_0x119379,'error':_0x4538a1 instanceof Error?_0x4538a1[_0x3a333a(0x17a)]:String(_0x4538a1),'duration':_0x501cbf});}throw _0x4538a1;}}static async[a349_0x49c115(0x194)](_0x403e87,_0x88ab93,_0x488143,_0x388f5c){const _0x3c50e1=a349_0x49c115,_0x3dbcb3=await a349_0x3e5597[_0x3c50e1(0x179)][_0x3c50e1(0x168)](_0x403e87,{'withFileTypes':!![]});for(const _0x2f5e5e of _0x3dbcb3){const _0x406b7=a349_0x5e2125[_0x3c50e1(0x166)](_0x403e87,_0x2f5e5e[_0x3c50e1(0x17c)]);let _0x2fa837=a349_0x5e2125[_0x3c50e1(0x166)](_0x88ab93,_0x2f5e5e['name']);_0x2f5e5e['name'][_0x3c50e1(0x163)](_0x3c50e1(0x1a4))&&(_0x2fa837=a349_0x5e2125[_0x3c50e1(0x166)](_0x88ab93,_0x2f5e5e[_0x3c50e1(0x17c)][_0x3c50e1(0x176)](/\.tpl$/,'')));if(_0x2f5e5e['isDirectory']())await a349_0x3e5597[_0x3c50e1(0x179)]['mkdir'](_0x2fa837,{'recursive':!![]}),await this[_0x3c50e1(0x194)](_0x406b7,_0x2fa837,_0x488143,_0x388f5c);else _0x2f5e5e[_0x3c50e1(0x173)]()&&await this[_0x3c50e1(0x198)](_0x406b7,_0x2fa837,_0x488143,_0x388f5c);}}static async[a349_0x49c115(0x198)](_0x5f4f59,_0x20c892,_0x57cfc2,_0x54e5e3){const _0x2cedd0=a349_0x49c115,_0x4f4c4f=a349_0x5e2125[_0x2cedd0(0x16d)](_0x5f4f59)[_0x2cedd0(0x196)]();_0x5f4f59['endsWith'](_0x2cedd0(0x1a4))&&(_0x20c892=_0x20c892[_0x2cedd0(0x176)](/\.tpl$/,''));const _0x46b81a=[_0x2cedd0(0x1a2),_0x2cedd0(0x18b),_0x2cedd0(0x18f),_0x2cedd0(0x187),_0x2cedd0(0x16b),_0x2cedd0(0x188),'.css',_0x2cedd0(0x167),_0x2cedd0(0x1a4)];if(_0x46b81a[_0x2cedd0(0x164)](_0x4f4c4f)||_0x5f4f59[_0x2cedd0(0x163)](_0x2cedd0(0x1a4))){const _0x44e60c=await a349_0x3e5597[_0x2cedd0(0x179)]['readFile'](_0x5f4f59,'utf8'),_0x2eef7d=this['replaceContent'](_0x44e60c,_0x57cfc2,_0x54e5e3);await a349_0x3e5597[_0x2cedd0(0x179)]['writeFile'](_0x20c892,_0x2eef7d,_0x2cedd0(0x1a0));}else await a349_0x3e5597[_0x2cedd0(0x179)][_0x2cedd0(0x1a1)](_0x5f4f59,_0x20c892);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x399b6c,_0x31f98a){const _0x42bc00=a350_0x3360,_0x5d8278=_0x399b6c();while(!![]){try{const _0x3e56b9=-parseInt(_0x42bc00(0x8c))/0x1+parseInt(_0x42bc00(0x95))/0x2+-parseInt(_0x42bc00(0x8e))/0x3*(parseInt(_0x42bc00(0x9b))/0x4)+-parseInt(_0x42bc00(0x96))/0x5*(-parseInt(_0x42bc00(0x89))/0x6)+parseInt(_0x42bc00(0x94))/0x7*(-parseInt(_0x42bc00(0x92))/0x8)+parseInt(_0x42bc00(0x9c))/0x9+parseInt(_0x42bc00(0x8b))/0xa*(-parseInt(_0x42bc00(0x83))/0xb);if(_0x3e56b9===_0x31f98a)break;else _0x5d8278['push'](_0x5d8278['shift']());}catch(_0xca3789){_0x5d8278['push'](_0x5d8278['shift']());}}}(a350_0x35d9,0x5029a));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';function a350_0x3360(_0x2c63f5,_0xa13714){_0x2c63f5=_0x2c63f5-0x80;const _0x35d9da=a350_0x35d9();let _0x33607e=_0x35d9da[_0x2c63f5];return _0x33607e;}import a350_0x2f7d5e from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';function a350_0x35d9(){const _0xadb853=['yes','parse','toLowerCase','299152LsMDts','trim','84xaZbFs','1270646JiTDGx','13385oeeLoJ','lastNotifiedAt','\x20update','number','lastNotifiedVersion','12LsWplM','130464UVelas','stableVersion','update-check.json','true',',\x20run:\x20','55MUZjOl','latest','checkedAt','valid','gte','\x20available,\x20current\x20','1206IOdTbt','https://www.npmjs.com/package/','553870bITmGN','114378kYZbLd','utf8','19509aKQpXu'];a350_0x35d9=function(){return _0xadb853;};return a350_0x35d9();}const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x1f4638=a350_0x3360,_0x203f1c=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x1f4638(0x93)]()[_0x1f4638(0x91)]();return _0x203f1c==='1'||_0x203f1c===_0x1f4638(0x81)||_0x203f1c===_0x1f4638(0x8f);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x426873=a350_0x3360;return join(cacheRoot(),'rabetbase-cli',_0x426873(0x80));}async function readUpdateNoticeCache(){const _0x3843e1=a350_0x3360;try{const _0x230878=await readFile(getUpdateNoticeCachePath(),_0x3843e1(0x8d)),_0x2e5a61=JSON[_0x3843e1(0x90)](_0x230878);if(!_0x2e5a61||typeof _0x2e5a61!=='object')return{};return _0x2e5a61;}catch{return{};}}async function writeUpdateNoticeCache(_0x16e36f){try{const _0x29ba51=getUpdateNoticeCachePath();await mkdir(dirname(_0x29ba51),{'recursive':!![]}),await writeFile(_0x29ba51,JSON['stringify'](_0x16e36f,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x24e3b1,_0x253c5f){const _0x4b073a=a350_0x3360;return typeof _0x24e3b1[_0x4b073a(0x85)]===_0x4b073a(0x99)&&_0x253c5f-_0x24e3b1[_0x4b073a(0x85)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x133c9e,_0x172aa5,_0x407064){const _0x9e2b89=a350_0x3360;return _0x133c9e[_0x9e2b89(0x9a)]===_0x172aa5&&typeof _0x133c9e[_0x9e2b89(0x97)]===_0x9e2b89(0x99)&&_0x407064-_0x133c9e[_0x9e2b89(0x97)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x4b2048){const _0x13c83d=a350_0x3360;return _0x13c83d(0x8a)+NPM_PACKAGE_NAME+'/v/'+_0x4b2048;}export async function resolveLatestUpdateNotice(){const _0x4b7015=a350_0x3360;if(isUpdateNoticeDisabled())return null;try{const _0x57f1e6=Date['now'](),_0x44efbf=getCliVersion(),_0x4fd2f5=await readUpdateNoticeCache();let _0x3f7934=isFreshCheck(_0x4fd2f5,_0x57f1e6)?_0x4fd2f5[_0x4b7015(0x84)]?.[_0x4b7015(0x93)]():undefined;if(!_0x3f7934&&!isFreshCheck(_0x4fd2f5,_0x57f1e6)){const _0x2096df=await getCliVersionPolicy();_0x3f7934=_0x2096df?.[_0x4b7015(0x9d)]?.[_0x4b7015(0x93)]()||undefined,await writeUpdateNoticeCache({..._0x4fd2f5,'checkedAt':_0x57f1e6,'latest':_0x3f7934,'failed':!_0x3f7934});}if(!_0x3f7934||!a350_0x2f7d5e['valid'](_0x44efbf)||!a350_0x2f7d5e[_0x4b7015(0x86)](_0x3f7934))return null;if(a350_0x2f7d5e[_0x4b7015(0x87)](_0x44efbf,_0x3f7934))return null;if(isRecentlyNotified(_0x4fd2f5,_0x3f7934,_0x57f1e6))return null;const _0x163b00=CLI_BIN_NAME+_0x4b7015(0x98);return await writeUpdateNoticeCache({..._0x4fd2f5,'checkedAt':isFreshCheck(_0x4fd2f5,_0x57f1e6)?_0x4fd2f5[_0x4b7015(0x85)]:_0x57f1e6,'latest':_0x3f7934,'failed':![],'lastNotifiedVersion':_0x3f7934,'lastNotifiedAt':_0x57f1e6}),{'command':_0x163b00,'current':_0x44efbf,'latest':_0x3f7934,'url':buildNpmVersionUrl(_0x3f7934),'message':CLI_BIN_NAME+'\x20'+_0x3f7934+_0x4b7015(0x88)+_0x44efbf+_0x4b7015(0x82)+_0x163b00};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4e2143,_0x29548b){var _0x588231=a351_0x4ab6,_0x103042=_0x4e2143();while(!![]){try{var _0x1b6fd8=parseInt(_0x588231(0x18e))/0x1+-parseInt(_0x588231(0x195))/0x2+-parseInt(_0x588231(0x194))/0x3*(parseInt(_0x588231(0x192))/0x4)+parseInt(_0x588231(0x190))/0x5*(parseInt(_0x588231(0x18d))/0x6)+parseInt(_0x588231(0x191))/0x7*(-parseInt(_0x588231(0x196))/0x8)+-parseInt(_0x588231(0x193))/0x9+-parseInt(_0x588231(0x18f))/0xa*(-parseInt(_0x588231(0x18c))/0xb);if(_0x1b6fd8===_0x29548b)break;else _0x103042['push'](_0x103042['shift']());}catch(_0x8f492c){_0x103042['push'](_0x103042['shift']());}}}(a351_0x5e80,0x9e75f));import{VERSION}from'../generated/build-info.js';function a351_0x5e80(){var _0x5ae819=['1045118Bqcfnn','130400JbidlE','1449155ImQFba','364MmBcty','2021672jgZykN','10868373oWNoFk','6evHalj','239652xNlYts','138352kYbLCi','1419orfDYX','24uLvkHQ'];a351_0x5e80=function(){return _0x5ae819;};return a351_0x5e80();}function a351_0x4ab6(_0x78f1cc,_0x259eee){_0x78f1cc=_0x78f1cc-0x18c;var _0x5e80f0=a351_0x5e80();var _0x4ab678=_0x5e80f0[_0x78f1cc];return _0x4ab678;}export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x31b0b9,_0x3c54e4){var _0x372bb7=a352_0xaef1,_0x503218=_0x31b0b9();while(!![]){try{var _0x3facac=parseInt(_0x372bb7(0x199))/0x1*(parseInt(_0x372bb7(0x194))/0x2)+parseInt(_0x372bb7(0x196))/0x3*(-parseInt(_0x372bb7(0x19b))/0x4)+-parseInt(_0x372bb7(0x19c))/0x5*(parseInt(_0x372bb7(0x197))/0x6)+-parseInt(_0x372bb7(0x193))/0x7+parseInt(_0x372bb7(0x195))/0x8+-parseInt(_0x372bb7(0x198))/0x9*(parseInt(_0x372bb7(0x19d))/0xa)+parseInt(_0x372bb7(0x19a))/0xb;if(_0x3facac===_0x3c54e4)break;else _0x503218['push'](_0x503218['shift']());}catch(_0x595f2f){_0x503218['push'](_0x503218['shift']());}}}(a352_0x3846,0xee3e4));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x37b60c,_0x19f54f){setActiveCookie(_0x37b60c);try{return await _0x19f54f();}finally{clearActiveCookie();}}function a352_0xaef1(_0x1cf5f9,_0x3b556d){_0x1cf5f9=_0x1cf5f9-0x193;var _0x38462a=a352_0x3846();var _0xaef182=_0x38462a[_0x1cf5f9];return _0xaef182;}function a352_0x3846(){var _0x3f8488=['6iuiKzW','4149qirYKZ','743359jGsvjW','47232559nBnRVm','4sNhGSh','6797815ZivIyW','10410xqCGeX','10066665ugOyuV','2RjOViA','1047912QwyoJt','2744442KCLJyV'];a352_0x3846=function(){return _0x3f8488;};return a352_0x3846();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4f529f,_0x48e8c1){var _0x41aec4=a353_0x1a80,_0x960577=_0x4f529f();while(!![]){try{var _0x1b64b5=-parseInt(_0x41aec4(0x1d5))/0x1*(-parseInt(_0x41aec4(0x1c9))/0x2)+parseInt(_0x41aec4(0x1d1))/0x3*(-parseInt(_0x41aec4(0x1cc))/0x4)+parseInt(_0x41aec4(0x1d4))/0x5*(-parseInt(_0x41aec4(0x1ce))/0x6)+-parseInt(_0x41aec4(0x1cb))/0x7*(-parseInt(_0x41aec4(0x1ca))/0x8)+parseInt(_0x41aec4(0x1cd))/0x9*(parseInt(_0x41aec4(0x1cf))/0xa)+parseInt(_0x41aec4(0x1d0))/0xb*(-parseInt(_0x41aec4(0x1c8))/0xc)+parseInt(_0x41aec4(0x1c7))/0xd*(parseInt(_0x41aec4(0x1d2))/0xe);if(_0x1b64b5===_0x48e8c1)break;else _0x960577['push'](_0x960577['shift']());}catch(_0x14f96b){_0x960577['push'](_0x960577['shift']());}}}(a353_0xdb11,0xa957b));function a353_0xdb11(){var _0x27e95e=['4331817AXDLrp','3908MngsOc','26982nEGMnt','90876AdqaQn','2990BJRFKY','11jNRgNL','2697DcMjeh','4485502IDGQot','write','80qivdLI','7519zfDJUF','13evstwf','14990520iGRzQu','162iRjFvq','16bhWEJF'];a353_0xdb11=function(){return _0x27e95e;};return a353_0xdb11();}function a353_0x1a80(_0x1505f0,_0x5cbf8e){_0x1505f0=_0x1505f0-0x1c7;var _0xdb11c3=a353_0xdb11();var _0x1a8007=_0xdb11c3[_0x1505f0];return _0x1a8007;}export function writeCliSideChannelLine(_0x164c07){var _0xd350ce=a353_0x1a80;process['stderr'][_0xd350ce(0x1d3)](_0x164c07+'\x0a');}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.5.3-beta.
|
|
3
|
+
"version": "2.5.3-beta.4",
|
|
4
4
|
"description": "Developer CLI for Lovrabet apps, datasets, pages, SQL, Backend Function, database connections, skills, and AI agent workflows.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"keywords": [
|
|
@@ -44,6 +44,11 @@
|
|
|
44
44
|
"build:dev": "node scripts/clean-build-output.mjs && tsc && tsc-alias",
|
|
45
45
|
"start": "tsc --watch",
|
|
46
46
|
"sync:cdn": "node scripts/sync-cdn-assets.js",
|
|
47
|
+
"sync:cdn:beta": "node scripts/sync-cdn-assets.js --beta",
|
|
48
|
+
"sync:cdn:all": "node scripts/sync-cdn-assets.js --all",
|
|
49
|
+
"check:cdn": "node scripts/sync-cdn-assets.js --check",
|
|
50
|
+
"check:cdn:beta": "node scripts/sync-cdn-assets.js --beta --check",
|
|
51
|
+
"check:cdn:all": "node scripts/sync-cdn-assets.js --all --check",
|
|
47
52
|
"verify:bundled-jq": "node scripts/verify-bundled-jq.mjs",
|
|
48
53
|
"regression:release-smoke": "node scripts/regression-release-smoke.mjs",
|
|
49
54
|
"release:summary:prepare": "node scripts/release-summary-preparation.mjs",
|