@lovrabet/rabetbase-cli 2.5.2 → 2.5.3-beta.2
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/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.d.ts +2 -1
- package/lib/api/generate-sdk-config-file.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/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.d.ts +7 -0
- package/lib/commands/bff/logs.js +1 -0
- 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.d.ts +21 -0
- package/lib/commands/dataset/batch-design.js +1 -0
- 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/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.d.ts +2 -0
- package/lib/commands/flow/create.js +1 -0
- package/lib/commands/flow/detail.d.ts +2 -0
- package/lib/commands/flow/detail.js +1 -0
- package/lib/commands/flow/index.d.ts +3 -0
- package/lib/commands/flow/index.js +1 -0
- package/lib/commands/flow/list.d.ts +2 -0
- package/lib/commands/flow/list.js +1 -0
- package/lib/commands/flow/publish.d.ts +2 -0
- package/lib/commands/flow/publish.js +1 -0
- package/lib/commands/flow/runtime-resources-shared.d.ts +40 -0
- package/lib/commands/flow/runtime-resources-shared.js +1 -0
- package/lib/commands/flow/runtime-role-list.d.ts +2 -0
- package/lib/commands/flow/runtime-role-list.js +1 -0
- package/lib/commands/flow/runtime-role-user-list.d.ts +2 -0
- package/lib/commands/flow/runtime-role-user-list.js +1 -0
- package/lib/commands/flow/runtime-user-search.d.ts +2 -0
- package/lib/commands/flow/runtime-user-search.js +1 -0
- package/lib/commands/flow/shared.d.ts +41 -0
- package/lib/commands/flow/shared.js +1 -0
- package/lib/commands/flow/update.d.ts +2 -0
- package/lib/commands/flow/update.js +1 -0
- package/lib/commands/flow/validate.d.ts +3 -0
- package/lib/commands/flow/validate.js +1 -0
- 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/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/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.d.ts +23 -0
- package/lib/config/region-config.js +1 -0
- package/lib/config/schema.d.ts +15 -0
- 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.d.ts +6 -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 +13 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +172 -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.d.ts +55 -0
- package/lib/core/bff/hook-directory.js +1 -0
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +15 -0
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.d.ts +628 -0
- package/lib/core/flow-config.js +1 -0
- 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.d.ts +6 -0
- package/lib/core/page/lr-smart-jsx.js +1 -0
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +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.d.ts +2 -8
- 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.d.ts +2 -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 +27 -8
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +137 -0
- package/skills/rabetbase/guides/backend-function.md +19 -9
- package/skills/rabetbase/guides/bff-creation-workflow.md +10 -1
- package/skills/rabetbase/guides/conflict-detection.md +2 -0
- package/skills/rabetbase/guides/page-development-workflow.md +3 -0
- package/skills/rabetbase/guides/sdk-client-generation.md +6 -5
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +290 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartJsx.md +11 -3
- package/skills/rabetbase/references/rabetbase-api-pull.md +5 -4
- package/skills/rabetbase/references/rabetbase-app-list.md +3 -0
- package/skills/rabetbase/references/rabetbase-bff-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-logs.md +47 -0
- package/skills/rabetbase/references/rabetbase-bff-pull.md +9 -3
- package/skills/rabetbase/references/rabetbase-bff-push.md +10 -2
- package/skills/rabetbase/references/rabetbase-bff-status.md +2 -0
- package/skills/rabetbase/references/rabetbase-config.md +10 -9
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +52 -2
- package/skills/rabetbase/references/rabetbase-doctor.md +2 -2
- package/skills/rabetbase/references/rabetbase-flow-commands.md +86 -0
- package/skills/rabetbase/references/rabetbase-flow-resources.md +83 -0
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +25 -0
- package/skills/rabetbase/references/rabetbase-instant-api-policy.md +103 -11
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +17 -0
- package/skills/rabetbase/references/rabetbase-page-push.md +5 -1
- package/skills/rabetbase/references/rabetbase-workspace.md +4 -2
- package/skills/rabetbase.manifest.json +9 -3
- package/templates/generate-api/client.ts.tpl +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a324_0x235f(){const _0x4abbd3=['\x20\x20\x20Current\x20version:\x20','11ekdOaA','dependencies','existsSync','39276LiZvkH','7JgKqkw','\x1b[33m','3945696XpFPpn','4075090HVvGck','join','872523UHVKAe','1634075OWprXA','some','143276OaWWEi','32fQihhR','102112jSoplh','\x1b[0m','stableVersion','coerce','packageName','\x20\x20\x20Stable\x20version:\x20','sdk','node_modules','needsUpgrade','↪\x20SDK\x20update\x20available','2irgbMm','\x1b[1m','utf8','node','@lovrabet/sdk','version','package.json','parse','30PnkdGC','devDependencies','minVersion','latest','readFileSync','log'];a324_0x235f=function(){return _0x4abbd3;};return a324_0x235f();}(function(_0x95581f,_0x2287d3){const _0x3e7494=a324_0x14a3,_0x26d18a=_0x95581f();while(!![]){try{const _0x318493=-parseInt(_0x3e7494(0xe5))/0x1*(parseInt(_0x3e7494(0x102))/0x2)+parseInt(_0x3e7494(0xed))/0x3*(parseInt(_0x3e7494(0x100))/0x4)+parseInt(_0x3e7494(0xfe))/0x5+-parseInt(_0x3e7494(0xf7))/0x6*(-parseInt(_0x3e7494(0xf8))/0x7)+-parseInt(_0x3e7494(0x101))/0x8*(-parseInt(_0x3e7494(0xfd))/0x9)+parseInt(_0x3e7494(0xfb))/0xa*(-parseInt(_0x3e7494(0xf4))/0xb)+-parseInt(_0x3e7494(0xfa))/0xc;if(_0x318493===_0x2287d3)break;else _0x26d18a['push'](_0x26d18a['shift']());}catch(_0x4062e4){_0x26d18a['push'](_0x26d18a['shift']());}}}(a324_0x235f,0x3ad0e));import a324_0xd10ef5 from'node:fs';import a324_0x99e699 from'node:path';import a324_0x349abd from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION='1.2.0';function a324_0x14a3(_0x55d510,_0x5bad04){_0x55d510=_0x55d510-0xe0;const _0x235fcd=a324_0x235f();let _0x14a390=_0x235fcd[_0x55d510];return _0x14a390;}function isNonNumericVersion(_0x331c6f){const _0x1c5620=a324_0x14a3,_0x46f9de=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x46f9de[_0x1c5620(0xff)](_0x29eaab=>_0x29eaab['test'](_0x331c6f));}function getInstalledVersion(_0x38d3c5,_0x49ba15){const _0xd7eef2=a324_0x14a3;try{const _0x47e77e=a324_0x99e699[_0xd7eef2(0xfc)](_0x38d3c5,_0xd7eef2(0xe2),_0x49ba15,_0xd7eef2(0xeb));if(a324_0xd10ef5[_0xd7eef2(0xf6)](_0x47e77e)){const _0x215221=JSON['parse'](a324_0xd10ef5[_0xd7eef2(0xf1)](_0x47e77e,'utf-8'));return _0x215221[_0xd7eef2(0xea)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x4ed88f=a324_0x14a3;try{const _0x2e6cc9=await getCdnConfig();return _0x2e6cc9?.[_0x4ed88f(0xe1)]?.[_0x4ed88f(0xe8)]?.['stableVersion']||null;}catch{return null;}}async function getSdkPackageName(){const _0x17f864=a324_0x14a3;try{const _0x4279c0=await getCdnConfig();return _0x4279c0?.['sdk']?.[_0x17f864(0xe8)]?.[_0x17f864(0x106)]||_0x17f864(0xe9);}catch{return _0x17f864(0xe9);}}export async function checkSdkVersion(_0x11e3d0){const _0x4a1c57=a324_0x14a3,_0xa7ca04=a324_0x99e699['join'](_0x11e3d0,_0x4a1c57(0xeb)),[_0x16b58e,_0x4862d5]=await Promise['all']([getSdkStableVersion(),getSdkPackageName()]),_0xbb750f=_0x16b58e||FALLBACK_MIN_SDK_VERSION;if(!a324_0xd10ef5[_0x4a1c57(0xf6)](_0xa7ca04))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xbb750f,'packageName':_0x4862d5,'stableVersion':_0x16b58e};try{const _0x162db1=JSON[_0x4a1c57(0xec)](a324_0xd10ef5[_0x4a1c57(0xf1)](_0xa7ca04,_0x4a1c57(0xe7))),_0x5f4aa9=_0x162db1[_0x4a1c57(0xf5)]||{},_0x418e6a=_0x162db1[_0x4a1c57(0xee)]||{},_0x419035=_0x5f4aa9[_0x4862d5]||_0x418e6a[_0x4862d5];if(!_0x419035)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xbb750f,'packageName':_0x4862d5,'stableVersion':_0x16b58e};let _0x1b8752=getInstalledVersion(_0x11e3d0,_0x4862d5);!_0x1b8752&&(_0x1b8752=_0x419035);if(isNonNumericVersion(_0x419035))return{'installed':!![],'version':_0x1b8752,'needsUpgrade':![],'minVersion':_0xbb750f,'packageName':_0x4862d5,'stableVersion':_0x16b58e};const _0x4db01e=a324_0x349abd[_0x4a1c57(0x105)](_0x1b8752),_0x2f6e64=a324_0x349abd[_0x4a1c57(0x105)](_0xbb750f),_0x658b8=_0x4db01e&&_0x2f6e64?a324_0x349abd['lt'](_0x4db01e,_0x2f6e64):![];return{'installed':!![],'version':_0x1b8752,'needsUpgrade':_0x658b8,'minVersion':_0xbb750f,'packageName':_0x4862d5,'stableVersion':_0x16b58e};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xbb750f,'packageName':_0x4862d5,'stableVersion':_0x16b58e};}}export function checkSdkVersionSync(_0x5b643f){const _0x1c4c02=a324_0x14a3,_0x293d33=a324_0x99e699[_0x1c4c02(0xfc)](_0x5b643f,_0x1c4c02(0xeb)),_0x508527=_0x1c4c02(0xe9);if(!a324_0xd10ef5[_0x1c4c02(0xf6)](_0x293d33))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x508527,'stableVersion':null};try{const _0x40bea8=JSON['parse'](a324_0xd10ef5[_0x1c4c02(0xf1)](_0x293d33,_0x1c4c02(0xe7))),_0x55f5c=_0x40bea8[_0x1c4c02(0xf5)]||{},_0xe1538a=_0x40bea8['devDependencies']||{},_0x2bc054=_0x55f5c[_0x508527]||_0xe1538a[_0x508527];if(!_0x2bc054)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x508527,'stableVersion':null};let _0x50e7b1=getInstalledVersion(_0x5b643f,_0x508527);!_0x50e7b1&&(_0x50e7b1=_0x2bc054);if(isNonNumericVersion(_0x2bc054))return{'installed':!![],'version':_0x50e7b1,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x508527,'stableVersion':null};const _0x144ff1=a324_0x349abd[_0x1c4c02(0x105)](_0x50e7b1),_0x22158c=_0x144ff1?a324_0x349abd['lt'](_0x144ff1,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x50e7b1,'needsUpgrade':_0x22158c,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x508527,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x508527,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x1a9b98){const _0x184a88=a324_0x14a3;if(!_0x1a9b98[_0x184a88(0xe3)])return;const _0x54973e=_0x184a88(0xf9),_0x2d7e3d=_0x184a88(0x103),_0x19396b=_0x184a88(0xe6),_0x6b8894=_0x1a9b98[_0x184a88(0x106)]||_0x184a88(0xe9),_0x309ada=_0x1a9b98[_0x184a88(0x104)]||_0x1a9b98[_0x184a88(0xef)],_0x5dbd67='npm\x20install\x20'+_0x6b8894+'@'+(_0x309ada||_0x184a88(0xf0));console[_0x184a88(0xf2)](),console[_0x184a88(0xf2)](''+_0x54973e+_0x19396b+_0x184a88(0xe4)+_0x2d7e3d),console['log'](_0x54973e+_0x184a88(0xf3)+_0x6b8894+'@'+_0x1a9b98[_0x184a88(0xea)]+_0x2d7e3d),console[_0x184a88(0xf2)](_0x54973e+_0x184a88(0xe0)+_0x309ada+_0x2d7e3d),console['log'](_0x54973e+'\x20\x20\x20Upgrade\x20command:\x20'+_0x5dbd67+_0x2d7e3d),console[_0x184a88(0xf2)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x6fd45a,_0x4a3bea){const _0x886686=a325_0x2915,_0x44d0ab=_0x6fd45a();while(!![]){try{const _0xe344ef=parseInt(_0x886686(0xb3))/0x1*(parseInt(_0x886686(0x93))/0x2)+-parseInt(_0x886686(0xab))/0x3*(parseInt(_0x886686(0xa4))/0x4)+-parseInt(_0x886686(0xaa))/0x5*(parseInt(_0x886686(0xa1))/0x6)+parseInt(_0x886686(0x8b))/0x7*(-parseInt(_0x886686(0xa2))/0x8)+parseInt(_0x886686(0xaf))/0x9+-parseInt(_0x886686(0x9f))/0xa+parseInt(_0x886686(0x9c))/0xb;if(_0xe344ef===_0x4a3bea)break;else _0x44d0ab['push'](_0x44d0ab['shift']());}catch(_0x489b43){_0x44d0ab['push'](_0x44d0ab['shift']());}}}(a325_0x5544,0x561ad));import{readFileSync}from'node:fs';function a325_0x2915(_0x52e5fe,_0x3b2a39){_0x52e5fe=_0x52e5fe-0x8b;const _0x55447d=a325_0x5544();let _0x2915c5=_0x55447d[_0x52e5fe];return _0x2915c5;}function a325_0x5544(){const _0x540bb5=['16193672vNNoHR','\x20\x20\x20','join','3023900wPLXBq','stableVersion','6idiUgv','8KchRDr','npm\x20install\x20-g\x20','4zLKcFQ','\x20\x20\x20Upgrade\x20command:\x20','utf-8','Upgrade\x20command:\x20','1.0.0','Minimum\x20supported:\x20','757035qGQSmN','1908366cTmcBv','\x20\x20\x20Minimum\x20supported:\x20','parse','↪\x20New\x20version\x20available','3649185lwCsYC','coerce','\x1b[1m','Current\x20version:\x20','125003wwBtHh','minimumVersionMessage','4795133VzivKk','validation','\x1b[33m','↪\x20Critical\x20CLI\x20upgrade\x20required','upgradeMessage','belowMinimum','log','minimumVersion','4mHwUEb','\x20\x20\x20Current\x20CLI\x20version:\x20','\x1b[31m','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','filter','\x20\x20\x20Recommended\x20stable:\x20','../..','needsUpgrade','version'];a325_0x5544=function(){return _0x540bb5;};return a325_0x5544();}import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a325_0x42b5cf from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x5418ea){const _0x59cb9e=a325_0x2915,_0xb5335c=_0x5418ea['stableVersion']||'latest';return _0x59cb9e(0xa3)+NPM_PACKAGE_NAME+'@'+_0xb5335c;}function getCurrentCliVersion(){const _0x473c94=a325_0x2915;try{const _0x22064e=fileURLToPath(import.meta.url),_0x46f3d4=resolve(dirname(_0x22064e),_0x473c94(0x99)),_0x2dea7e=resolve(_0x46f3d4,'package.json'),_0x3e1fbf=JSON[_0x473c94(0xad)](readFileSync(_0x2dea7e,_0x473c94(0xa6)));return _0x3e1fbf[_0x473c94(0x9b)]||_0x473c94(0xa8);}catch{return _0x473c94(0xa8);}}export async function checkCliVersion(){const _0x1499cc=a325_0x2915,_0x41d133=getCurrentCliVersion(),_0x53af17=await getCliVersionPolicy(),_0x165997=_0x53af17?.[_0x1499cc(0xa0)]||null,_0x40a542=_0x53af17?.[_0x1499cc(0x92)]||null;let _0x4c78e3=![],_0x153544=![];const _0x5e2b97=a325_0x42b5cf[_0x1499cc(0xb0)](_0x41d133);if(_0x5e2b97&&_0x165997)try{const _0x3351ce=a325_0x42b5cf[_0x1499cc(0xb0)](_0x165997);if(_0x3351ce)_0x4c78e3=a325_0x42b5cf['lt'](_0x5e2b97,_0x3351ce);}catch{}if(_0x5e2b97&&_0x40a542)try{const _0x19745f=a325_0x42b5cf[_0x1499cc(0xb0)](_0x40a542);if(_0x19745f)_0x153544=a325_0x42b5cf['lt'](_0x5e2b97,_0x19745f);}catch{}return _0x153544&&(_0x4c78e3=!![]),{'currentVersion':_0x41d133,'stableVersion':_0x165997,'minimumVersion':_0x40a542,'needsUpgrade':_0x4c78e3,'belowMinimum':_0x153544,'isPreRelease':![],'upgradeMessage':_0x53af17?.[_0x1499cc(0x8f)],'minimumVersionMessage':_0x53af17?.[_0x1499cc(0xb4)]};}export function printCliUpgradeWarning(_0x3ffc0d){const _0x4379b6=a325_0x2915;if(!_0x3ffc0d[_0x4379b6(0x9a)]&&!_0x3ffc0d[_0x4379b6(0x90)])return;const _0x467eed=_0x4379b6(0x95),_0x3d6c2f=_0x4379b6(0x8d),_0x200a78='\x1b[0m',_0x103d37=_0x4379b6(0xb1),_0x4a91ac=getCliUpgradeCommand(_0x3ffc0d);console[_0x4379b6(0x91)](),_0x3ffc0d['belowMinimum']?(console[_0x4379b6(0x91)](''+_0x467eed+_0x103d37+_0x4379b6(0x8e)+_0x200a78),console[_0x4379b6(0x91)](_0x467eed+_0x4379b6(0x94)+_0x3ffc0d['currentVersion']+_0x200a78),_0x3ffc0d['minimumVersion']&&console[_0x4379b6(0x91)](_0x467eed+_0x4379b6(0xac)+_0x3ffc0d['minimumVersion']+_0x200a78),_0x3ffc0d['stableVersion']&&_0x3ffc0d[_0x4379b6(0xa0)]!==_0x3ffc0d['minimumVersion']&&console[_0x4379b6(0x91)](_0x467eed+_0x4379b6(0x98)+_0x3ffc0d[_0x4379b6(0xa0)]+_0x200a78),_0x3ffc0d[_0x4379b6(0xb4)]&&console['log'](_0x467eed+_0x4379b6(0x9d)+_0x3ffc0d[_0x4379b6(0xb4)]+_0x200a78),console[_0x4379b6(0x91)](_0x467eed+_0x4379b6(0xa5)+_0x4a91ac+_0x200a78)):(console[_0x4379b6(0x91)](''+_0x3d6c2f+_0x103d37+_0x4379b6(0xae)+_0x200a78),console['log'](_0x3d6c2f+_0x4379b6(0x94)+_0x3ffc0d['currentVersion']+_0x200a78),console[_0x4379b6(0x91)](_0x3d6c2f+'\x20\x20\x20Stable\x20version:\x20'+_0x3ffc0d[_0x4379b6(0xa0)]+_0x200a78),_0x3ffc0d[_0x4379b6(0x8f)]&&console[_0x4379b6(0x91)](_0x3d6c2f+'\x20\x20\x20'+_0x3ffc0d['upgradeMessage']+_0x200a78),console[_0x4379b6(0x91)](_0x3d6c2f+_0x4379b6(0xa5)+_0x4a91ac+_0x200a78)),console[_0x4379b6(0x91)]();}export function assertCliVersionSupported(_0x32595a){const _0x5e28fe=a325_0x2915;if(!_0x32595a[_0x5e28fe(0x90)])return;const _0x445192=[_0x32595a[_0x5e28fe(0xb4)],_0x5e28fe(0xb2)+_0x32595a['currentVersion'],_0x32595a[_0x5e28fe(0x92)]?_0x5e28fe(0xa9)+_0x32595a[_0x5e28fe(0x92)]:null,_0x5e28fe(0xa7)+getCliUpgradeCommand(_0x32595a)][_0x5e28fe(0x97)](Boolean)[_0x5e28fe(0x9e)]('\x0a');throw CliErrors[_0x5e28fe(0x8c)](_0x5e28fe(0x96),_0x445192);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x248bc,_0x23b3d4){const _0x32ca47=a326_0x104e,_0x4fe00d=_0x248bc();while(!![]){try{const _0x2ab65e=-parseInt(_0x32ca47(0x129))/0x1+parseInt(_0x32ca47(0x11b))/0x2+-parseInt(_0x32ca47(0x120))/0x3+-parseInt(_0x32ca47(0x11a))/0x4+parseInt(_0x32ca47(0x11e))/0x5*(parseInt(_0x32ca47(0x124))/0x6)+parseInt(_0x32ca47(0x125))/0x7+-parseInt(_0x32ca47(0x11d))/0x8*(parseInt(_0x32ca47(0x128))/0x9);if(_0x2ab65e===_0x23b3d4)break;else _0x4fe00d['push'](_0x4fe00d['shift']());}catch(_0x1e4660){_0x4fe00d['push'](_0x4fe00d['shift']());}}}(a326_0x42fd,0x2f07b));import{CLI_VERSION_POLICY_URL}from'../constant/cdn.js';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;function pickString(_0x41aecb){const _0x226f70=a326_0x104e;return typeof _0x41aecb===_0x226f70(0x11c)&&_0x41aecb[_0x226f70(0x12e)]()[_0x226f70(0x126)]>0x0?_0x41aecb[_0x226f70(0x12e)]():null;}function normalizeCliVersionPolicy(_0x352cf4){const _0x450361=a326_0x104e;if(!_0x352cf4||typeof _0x352cf4!==_0x450361(0x12d))return null;const _0x16bbdc=_0x352cf4,_0x3e8740=_0x16bbdc['cli']&&typeof _0x16bbdc['cli']==='object'?_0x16bbdc[_0x450361(0x12a)]:_0x16bbdc,_0x497f30=pickString(_0x3e8740[_0x450361(0x127)])||pickString(_0x3e8740[_0x450361(0x11f)])||pickString(_0x3e8740[_0x450361(0x12f)]),_0x2d1517=pickString(_0x3e8740['minimumVersion'])||pickString(_0x3e8740[_0x450361(0x121)]);if(!_0x497f30&&!_0x2d1517)return null;return{'stableVersion':_0x497f30,'minimumVersion':_0x2d1517,'upgradeMessage':pickString(_0x3e8740[_0x450361(0x12b)])||undefined,'minimumVersionMessage':pickString(_0x3e8740['minimumVersionMessage'])||undefined};}export async function fetchRabetbaseCdnConfig(){const _0x5ef702=a326_0x104e,_0x57f924=new AbortController(),_0x34cec3=setTimeout(()=>_0x57f924[_0x5ef702(0x123)](),FETCH_TIMEOUT_MS);try{const _0x6f70ca=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x5ef702(0x122)},'signal':_0x57f924[_0x5ef702(0x12c)]});if(!_0x6f70ca['ok'])return null;const _0x42172a=await _0x6f70ca['json']();return _0x42172a&&typeof _0x42172a===_0x5ef702(0x12d)?_0x42172a:null;}catch{return null;}finally{clearTimeout(_0x34cec3);}}function a326_0x104e(_0x427ba1,_0x2a035d){_0x427ba1=_0x427ba1-0x119;const _0x42fd10=a326_0x42fd();let _0x104e5b=_0x42fd10[_0x427ba1];return _0x104e5b;}function a326_0x42fd(){const _0x4660f3=['length','stableVersion','18MpffNb','111998eeYPLT','cli','upgradeMessage','signal','object','trim','recommendedVersion','now','170416VAXsRR','753234fTaWns','string','278232ywVdNW','925mMYcVU','latestVersion','1048866nQmRSb','minVersion','application/json','abort','6756dWlDkw','1270430tiUxAa'];a326_0x42fd=function(){return _0x4660f3;};return a326_0x42fd();}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];export async function getRabetbaseCdnConfig(){const _0x3cabd0=a326_0x104e,_0x4c2416=Date[_0x3cabd0(0x119)]();if(hasCachedConfig){const _0xe76c6b=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x4c2416-cacheTime<_0xe76c6b)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x4c2416,hasCachedConfig=!![],cachedConfig;}export async function getCliVersionPolicy(){return normalizeCliVersionPolicy(await getRabetbaseCdnConfig());}export function clearCliVersionPolicyCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
package/lib/utils/config.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* 所有配置文件读写的底层实现统一在 context.ts 中。
|
|
5
5
|
* 本模块保留历史导出接口,供旧命令使用。
|
|
6
6
|
*/
|
|
7
|
+
import { type MultiAppConfig } from "../context.js";
|
|
7
8
|
export { getProjectConfigPath, getGlobalConfigPath } from "../context.js";
|
|
8
9
|
export { isInProject } from "../context.js";
|
|
9
10
|
export declare function readConfig(projectRoot?: string): Record<string, any> & {
|
|
@@ -13,14 +14,7 @@ export declare function readConfig(projectRoot?: string): Record<string, any> &
|
|
|
13
14
|
template_base_url?: string;
|
|
14
15
|
locale?: string;
|
|
15
16
|
};
|
|
16
|
-
export
|
|
17
|
-
name: string;
|
|
18
|
-
appcode: string;
|
|
19
|
-
isDefault: boolean;
|
|
20
|
-
env?: string;
|
|
21
|
-
apiDir?: string;
|
|
22
|
-
cookie?: string;
|
|
23
|
-
}
|
|
17
|
+
export type { MultiAppConfig } from "../context.js";
|
|
24
18
|
/**
|
|
25
19
|
* 获取配置的 AppCode
|
|
26
20
|
* 优先级:多应用 defaultApp > 项目 appcode > 项目 app > 全局 appcode > 全局 app
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a327_0x2dc36f=a327_0xb5b2;(function(_0x213323,_0xc5d841){const _0x194d51=a327_0xb5b2,_0x32c1ca=_0x213323();while(!![]){try{const _0x24f5ad=-parseInt(_0x194d51(0x92))/0x1+parseInt(_0x194d51(0x90))/0x2*(-parseInt(_0x194d51(0x8a))/0x3)+-parseInt(_0x194d51(0x8e))/0x4+-parseInt(_0x194d51(0x8b))/0x5+-parseInt(_0x194d51(0x95))/0x6+-parseInt(_0x194d51(0x91))/0x7*(parseInt(_0x194d51(0x8c))/0x8)+parseInt(_0x194d51(0x94))/0x9;if(_0x24f5ad===_0xc5d841)break;else _0x32c1ca['push'](_0x32c1ca['shift']());}catch(_0x20ae75){_0x32c1ca['push'](_0x32c1ca['shift']());}}}(a327_0x4a5f,0xa3556));import{initEnv}from'../constant/env.js';function a327_0x4a5f(){const _0x170c3a=['3971656xLgSSS','string','218PHAFCm','1306844BHLtes','99437fGwVsU','env','46303344ttrnmF','1487694zdiRnJ','28668YajdrP','3935270DuqjYu','56ElADcE','project'];a327_0x4a5f=function(){return _0x170c3a;};return a327_0x4a5f();}import{readRawConfig,getConfigAppCode as a327_0xe6217f,getMultiAppConfigs as a327_0x523c7b,getTemplateBaseUrl as a327_0xc0dcb2}from'../context.js';function a327_0xb5b2(_0x400c51,_0x1d9265){_0x400c51=_0x400c51-0x8a;const _0x4a5f59=a327_0x4a5f();let _0xb5b255=_0x4a5f59[_0x400c51];return _0xb5b255;}export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x7b462e){const _0xc3fb5=a327_0xb5b2,_0x735214=readRawConfig(_0x7b462e);return _0x735214[_0xc3fb5(0x93)]&&typeof _0x735214[_0xc3fb5(0x93)]===_0xc3fb5(0x8f)&&initEnv(_0x735214[_0xc3fb5(0x93)]),_0x735214;}export function getConfigAppCode(){return a327_0xe6217f();}export function getMultiAppConfigs(_0x5aa0c0=a327_0x2dc36f(0x8d)){return a327_0x523c7b(_0x5aa0c0);}export function getTemplateBaseUrl(){return a327_0xc0dcb2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1cb098,_0x26da96){const _0x49aded=a328_0x5373,_0x167ab0=_0x1cb098();while(!![]){try{const _0x419a6c=parseInt(_0x49aded(0x129))/0x1+parseInt(_0x49aded(0x132))/0x2*(-parseInt(_0x49aded(0x130))/0x3)+parseInt(_0x49aded(0x12c))/0x4+-parseInt(_0x49aded(0x12e))/0x5*(-parseInt(_0x49aded(0x12f))/0x6)+-parseInt(_0x49aded(0x131))/0x7*(parseInt(_0x49aded(0x12a))/0x8)+parseInt(_0x49aded(0x134))/0x9+-parseInt(_0x49aded(0x12b))/0xa*(parseInt(_0x49aded(0x137))/0xb);if(_0x419a6c===_0x26da96)break;else _0x167ab0['push'](_0x167ab0['shift']());}catch(_0xe5ecdf){_0x167ab0['push'](_0x167ab0['shift']());}}}(a328_0x2922,0xa20f3));function toFiniteNumber(_0x1dfc10){const _0x5a450=a328_0x5373;if(typeof _0x1dfc10===_0x5a450(0x135)&&Number[_0x5a450(0x136)](_0x1dfc10))return _0x1dfc10;if(typeof _0x1dfc10===_0x5a450(0x12d)){const _0x2229cc=_0x1dfc10[_0x5a450(0x128)]();if(!_0x2229cc)return undefined;const _0x2c6d47=Number(_0x2229cc);if(Number[_0x5a450(0x136)](_0x2c6d47))return _0x2c6d47;}return undefined;}function a328_0x5373(_0x5109e1,_0x116e3f){_0x5109e1=_0x5109e1-0x128;const _0x292294=a328_0x2922();let _0x537319=_0x292294[_0x5109e1];return _0x537319;}function a328_0x2922(){const _0xd57dd0=['isFinite','124883UXQdYn','trim','529035HLaIus','6704736UJvPSW','1610VgpTQg','5215688kVhvio','string','5Lqxmah','5088024wDEqKi','1194SIKbvh','7gvCYEm','2182rLxSNq','object','9746793yHQmlk','number'];a328_0x2922=function(){return _0xd57dd0;};return a328_0x2922();}export function normalizeEntityWithIdResponse(_0x4c9522){const _0x2ecddf=a328_0x5373,_0x2c7aeb=toFiniteNumber(_0x4c9522);if(_0x2c7aeb!==undefined)return{'id':_0x2c7aeb,'entity':{'id':_0x2c7aeb}};if(!_0x4c9522||typeof _0x4c9522!==_0x2ecddf(0x133))return{'id':undefined,'entity':{}};const _0x398a93={..._0x4c9522},_0x1a21d8=toFiniteNumber(_0x398a93['id']);return _0x1a21d8!==undefined&&(_0x398a93['id']=_0x1a21d8),{'id':_0x1a21d8,'entity':_0x398a93};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53665e,_0x5e8eec){const _0x445736=a329_0x4877,_0x37cbd3=_0x53665e();while(!![]){try{const _0x2704d6=parseInt(_0x445736(0x185))/0x1+-parseInt(_0x445736(0x183))/0x2+-parseInt(_0x445736(0x187))/0x3+parseInt(_0x445736(0x188))/0x4+-parseInt(_0x445736(0x186))/0x5+parseInt(_0x445736(0x18a))/0x6*(parseInt(_0x445736(0x184))/0x7)+parseInt(_0x445736(0x189))/0x8;if(_0x2704d6===_0x5e8eec)break;else _0x37cbd3['push'](_0x37cbd3['shift']());}catch(_0x110948){_0x37cbd3['push'](_0x37cbd3['shift']());}}}(a329_0x25fc,0x331f5));function a329_0x4877(_0x1effd3,_0x2dac7e){_0x1effd3=_0x1effd3-0x183;const _0x25fcc1=a329_0x25fc();let _0x4877f6=_0x25fcc1[_0x1effd3];return _0x4877f6;}function a329_0x25fc(){const _0x65307=['410055nPFRZN','854985ISSQWm','875684DEUEMx','2680336fteiaz','1219002gCViuw','773302AIRUCj','14ARvcvE','2757KTlEWE'];a329_0x25fc=function(){return _0x65307;};return a329_0x25fc();}import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x1d7bf8,_0x3dafeb){const _0x175846=statSync(_0x1d7bf8);if(_0x175846['isDirectory']()){!existsSync(_0x3dafeb)&&mkdirSync(_0x3dafeb,{'recursive':!![]});const _0x333207=readdirSync(_0x1d7bf8);for(const _0x3e989f of _0x333207){await copyDir(join(_0x1d7bf8,_0x3e989f),join(_0x3dafeb,_0x3e989f));}}else copyFileSync(_0x1d7bf8,_0x3dafeb);}export function ensureDir(_0x3d9293){!existsSync(_0x3d9293)&&mkdirSync(_0x3d9293,{'recursive':!![]});}export function pathExists(_0x57ffa2){return existsSync(_0x57ffa2);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a330_0x45d688=a330_0x37b2;(function(_0x5ad37d,_0xfe1b4d){const _0x2cf4fa=a330_0x37b2,_0x2434c8=_0x5ad37d();while(!![]){try{const _0x417b15=parseInt(_0x2cf4fa(0x156))/0x1*(parseInt(_0x2cf4fa(0x163))/0x2)+-parseInt(_0x2cf4fa(0x14e))/0x3*(-parseInt(_0x2cf4fa(0x155))/0x4)+-parseInt(_0x2cf4fa(0x16a))/0x5+parseInt(_0x2cf4fa(0x169))/0x6+-parseInt(_0x2cf4fa(0x160))/0x7*(-parseInt(_0x2cf4fa(0x167))/0x8)+-parseInt(_0x2cf4fa(0x15e))/0x9*(-parseInt(_0x2cf4fa(0x15c))/0xa)+-parseInt(_0x2cf4fa(0x15a))/0xb;if(_0x417b15===_0xfe1b4d)break;else _0x2434c8['push'](_0x2434c8['shift']());}catch(_0x40ac4e){_0x2434c8['push'](_0x2434c8['shift']());}}}(a330_0x2b14,0xe3f37));function a330_0x37b2(_0x40aae6,_0x3be1a9){_0x40aae6=_0x40aae6-0x14b;const _0x2b1431=a330_0x2b14();let _0x37b212=_0x2b1431[_0x40aae6];return _0x37b212;}import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';function a330_0x2b14(){const _0x3e5d58=['content','3800007ICsyAv','json','push','extendContent','.md','entries','.lovrabet','4IlcRJp','49uKqRPx','join','CDN\x20data\x20is\x20missing\x20skillTemplate','.lovrabet/skill/guides','51955101duxdNy','application/json','410QggdBk','lastUpdated','303849WKdemw','title','12329653qJzJKQ','path','cache','60026SpuCdM','CDN\x20request\x20failed:\x20','utf-8','length','8JlxKqs','skillTemplate','3189450yVxqXu','3787915DZYvPA','guides','trimEnd','map','\x0a\x0a>更新时间:','/skills/guides.json','statusText','object'];a330_0x2b14=function(){return _0x3e5d58;};return a330_0x2b14();}import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x2aee16=a330_0x37b2,_0x2b2c69=getTemplateBaseUrl();return _0x2b2c69+_0x2aee16(0x16f);}const CACHE_DIR=join(homedir(),a330_0x45d688(0x154),a330_0x45d688(0x162));export async function fetchGuidesFromCDN(){const _0x366087=a330_0x45d688,_0x813538=getGuidesCdnUrl(),_0x37a9ff=await fetch(_0x813538,{'headers':{'Accept':_0x366087(0x15b)}});if(!_0x37a9ff['ok'])throw new Error(_0x366087(0x164)+_0x37a9ff['status']+'\x20'+_0x37a9ff[_0x366087(0x14b)]);const _0x362af7=await _0x37a9ff[_0x366087(0x14f)]();if(!_0x362af7['guides']||typeof _0x362af7[_0x366087(0x16b)]!==_0x366087(0x14c))throw new Error('CDN\x20returned\x20invalid\x20data');return _0x362af7;}export function writeGuidesToProject(_0x20b1b8,_0x36862d,_0x33beef=a330_0x45d688(0x159),_0xe41e4c){const _0x51131a=a330_0x45d688,_0x4f2fd0=join(_0x36862d,_0x33beef);mkdirSync(_0x4f2fd0,{'recursive':!![]});for(const [_0x5e3523,_0x2560e1]of Object[_0x51131a(0x153)](_0x20b1b8[_0x51131a(0x16b)])){let _0x398e57=_0x2560e1[_0x51131a(0x14d)];_0x2560e1[_0x51131a(0x15d)]&&(_0x398e57=appendUpdateTime(_0x398e57,_0x2560e1['lastUpdated'])),writeFileSync(join(_0x4f2fd0,_0x5e3523+_0x51131a(0x152)),_0x398e57,'utf-8');}}export function appendUpdateTime(_0x5854f6,_0x1b2f66){const _0x22b848=a330_0x45d688;return _0x5854f6=_0x5854f6['replace'](/\n*>更新时间:.*$/m,''),_0x5854f6[_0x22b848(0x16c)]()+(_0x22b848(0x16e)+_0x1b2f66);}export function getSkillTemplate(_0x236d3e){const _0x156671=a330_0x45d688;return _0x236d3e[_0x156671(0x168)]?.[_0x156671(0x14d)]||'';}export function appendExtendContents(_0x5841a0,_0x35c778,_0x3f4291){const _0x4b8cd3=a330_0x45d688,_0x237abb=[];for(const [,_0x24fd20]of Object[_0x4b8cd3(0x153)](_0x35c778['guides'])){_0x24fd20[_0x4b8cd3(0x151)]&&_0x237abb[_0x4b8cd3(0x150)](_0x24fd20[_0x4b8cd3(0x151)][_0x4b8cd3(0x16c)]());}if(_0x237abb[_0x4b8cd3(0x166)]===0x0)return _0x5841a0;return _0x5841a0[_0x4b8cd3(0x16c)]()+'\x0a\x0a'+_0x237abb[_0x4b8cd3(0x157)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x2f5db9,_0x4e2559,_0x3b1195){const _0x31b62e=a330_0x45d688,_0x137596=getSkillTemplate(_0x2f5db9);if(!_0x137596)throw new Error(_0x31b62e(0x158));const _0x372b4e=dirname(_0x4e2559);mkdirSync(_0x372b4e,{'recursive':!![]});let _0x126d39=_0x137596['replace'](/\{\{IDE_NAME\}\}/g,_0x3b1195);_0x126d39=appendExtendContents(_0x126d39,_0x2f5db9),_0x2f5db9[_0x31b62e(0x168)][_0x31b62e(0x15d)]&&(_0x126d39=appendUpdateTime(_0x126d39,_0x2f5db9[_0x31b62e(0x168)][_0x31b62e(0x15d)])),writeFileSync(_0x4e2559,_0x126d39,_0x31b62e(0x165));}export async function installGuides(_0x3b5f06){const _0x4a64cf=await fetchGuidesFromCDN();return writeGuidesToProject(_0x4a64cf,_0x3b5f06),Object['keys'](_0x4a64cf['guides'])['length'];}export function getGuidesSummary(_0x5e2456){const _0x30bf1f=a330_0x45d688;return Object[_0x30bf1f(0x153)](_0x5e2456[_0x30bf1f(0x16b)])[_0x30bf1f(0x16d)](([_0x3e44ef,_0x536f1a])=>({'key':_0x3e44ef,'title':_0x536f1a[_0x30bf1f(0x15f)],'path':_0x536f1a[_0x30bf1f(0x161)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x10288b,_0x422e94){const _0x35cfda=a331_0x3d44,_0x4866dc=_0x10288b();while(!![]){try{const _0x14c5f0=parseInt(_0x35cfda(0xfb))/0x1*(-parseInt(_0x35cfda(0xf2))/0x2)+parseInt(_0x35cfda(0x101))/0x3+parseInt(_0x35cfda(0x105))/0x4*(-parseInt(_0x35cfda(0x103))/0x5)+-parseInt(_0x35cfda(0xf4))/0x6+-parseInt(_0x35cfda(0xf6))/0x7*(parseInt(_0x35cfda(0xef))/0x8)+-parseInt(_0x35cfda(0xea))/0x9*(parseInt(_0x35cfda(0xfe))/0xa)+parseInt(_0x35cfda(0xfa))/0xb*(parseInt(_0x35cfda(0xfd))/0xc);if(_0x14c5f0===_0x422e94)break;else _0x4866dc['push'](_0x4866dc['shift']());}catch(_0x50ece1){_0x4866dc['push'](_0x4866dc['shift']());}}}(a331_0x4316,0xacf2a));export async function httpRequest(_0x28bd47,_0x15d3a1={}){const _0x2a3890=a331_0x3d44,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x15d3a1;let _0x56b200=null;for(let _0x4cef6b=0x0;_0x4cef6b<=retries;_0x4cef6b++){try{const _0x23bfb5=new AbortController(),_0x227a86=setTimeout(()=>_0x23bfb5[_0x2a3890(0xf0)](),timeout),_0x13969f=await fetch(_0x28bd47,{'headers':headers,'signal':_0x23bfb5[_0x2a3890(0xf3)]});clearTimeout(_0x227a86);let _0x29615f;const _0x300d21=_0x13969f[_0x2a3890(0xec)][_0x2a3890(0x109)](_0x2a3890(0xe9));return _0x300d21?.[_0x2a3890(0x102)]('application/json')?_0x29615f=await _0x13969f[_0x2a3890(0xeb)]():_0x29615f=await _0x13969f[_0x2a3890(0x106)](),{'ok':_0x13969f['ok'],'status':_0x13969f[_0x2a3890(0xff)],'statusText':_0x13969f['statusText'],'data':_0x29615f,'headers':_0x13969f[_0x2a3890(0xec)],'url':_0x13969f[_0x2a3890(0xf5)],'text':()=>_0x13969f[_0x2a3890(0x106)]()};}catch(_0x475554){_0x56b200=_0x475554 instanceof Error?_0x475554:new Error(String(_0x475554));if(_0x4cef6b===retries)break;if(shouldRetry(_0x475554)){console[_0x2a3890(0x108)]('*\x20Request\x20failed;\x20retry\x20'+(_0x4cef6b+0x1)+_0x2a3890(0xfc)+retryDelay+_0x2a3890(0x104)),await sleep(retryDelay);continue;}else break;}}throw _0x56b200||new Error(_0x2a3890(0x100));}function shouldRetry(_0x2e750c){const _0x4a7ab6=a331_0x3d44;if(_0x2e750c instanceof Error){if(_0x2e750c['name']===_0x4a7ab6(0xf9))return![];if(_0x2e750c[_0x4a7ab6(0xf8)]===_0x4a7ab6(0x107)&&_0x2e750c[_0x4a7ab6(0xee)][_0x4a7ab6(0x102)](_0x4a7ab6(0xf1)))return!![];if(_0x2e750c[_0x4a7ab6(0xee)][_0x4a7ab6(0x102)](_0x4a7ab6(0xf7)))return!![];if(_0x2e750c[_0x4a7ab6(0xee)]['includes'](_0x4a7ab6(0xed)))return![];}return![];}function sleep(_0x364594){return new Promise(_0x5b2d66=>setTimeout(_0x5b2d66,_0x364594));}export function validateUrl(_0x475346){try{return new URL(_0x475346),!![];}catch{return![];}}function a331_0x3d44(_0x3e8bec,_0x4dfaed){_0x3e8bec=_0x3e8bec-0xe9;const _0x431669=a331_0x4316();let _0x3d44a9=_0x431669[_0x3e8bec];return _0x3d44a9;}function a331_0x4316(){const _0x55be08=['7KxkNzu','ECONNRESET','name','AbortError','11TYISSH','1tPisek','\x20in\x20','47316072vnQvBi','4878110dTNNFb','status','Request\x20failed','58422NwRJmz','includes','5XkxpdZ','ms...','1730884nXzUuO','text','TypeError','log','get','content-type','18qniovN','json','headers','ENOTFOUND','message','2750648UMkIXt','abort','fetch','904054rSJQhR','signal','6299310NusJfX','url'];a331_0x4316=function(){return _0x55be08;};return a331_0x4316();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a16af,_0x21e090){const _0x3bec36=a332_0x423f,_0x32d13c=_0x4a16af();while(!![]){try{const _0xcb45f0=-parseInt(_0x3bec36(0xf4))/0x1*(parseInt(_0x3bec36(0xf0))/0x2)+parseInt(_0x3bec36(0xf3))/0x3+parseInt(_0x3bec36(0xf7))/0x4*(-parseInt(_0x3bec36(0xfb))/0x5)+parseInt(_0x3bec36(0xfa))/0x6*(-parseInt(_0x3bec36(0xfd))/0x7)+parseInt(_0x3bec36(0xf2))/0x8*(parseInt(_0x3bec36(0xf8))/0x9)+-parseInt(_0x3bec36(0x101))/0xa*(-parseInt(_0x3bec36(0xf6))/0xb)+parseInt(_0x3bec36(0xf9))/0xc;if(_0xcb45f0===_0x21e090)break;else _0x32d13c['push'](_0x32d13c['shift']());}catch(_0x179f9e){_0x32d13c['push'](_0x32d13c['shift']());}}}(a332_0x54db,0xd7bf0));function env(_0xa94ed6){return process.env[`RABETBASE_${_0xa94ed6}`]||process.env[`LOVRABET_${_0xa94ed6}`]||undefined;}export function isNonInteractive(_0x5ea1bf){const _0x1f5723=a332_0x423f;return!!(_0x5ea1bf[_0x1f5723(0xfe)]||_0x5ea1bf['ci']||env('CI')===_0x1f5723(0x100)||process.env.CI===_0x1f5723(0x100)||!process[_0x1f5723(0xff)][_0x1f5723(0xf5)]||!isStdinRawModeSupported());}function a332_0x54db(){const _0x527949=['111357KPGjGR','5439060pfoeVp','6OXQonJ','5UixOFw','setRawMode','3797374paZBos','nonInteractive','stdout','true','3747390mOphDA','946GtlYud','stdin','792UqTHVs','513549jwJIBr','751dFXxWO','isTTY','11mXrzVU','1770812jXUsTE'];a332_0x54db=function(){return _0x527949;};return a332_0x54db();}function a332_0x423f(_0x269646,_0x2fd9e5){_0x269646=_0x269646-0xf0;const _0x54dbf9=a332_0x54db();let _0x423fc1=_0x54dbf9[_0x269646];return _0x423fc1;}function isStdinRawModeSupported(){const _0x2c4a95=a332_0x423f;if(!process[_0x2c4a95(0xf1)]['isTTY'])return![];try{const _0x31002d=process['stdin']['isRaw'];return process['stdin'][_0x2c4a95(0xfc)](!![]),process['stdin'][_0x2c4a95(0xfc)](_0x31002d??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a333_0xf46976=a333_0x38c6;(function(_0x466ea2,_0x26a2ee){const _0x3a8f9a=a333_0x38c6,_0x3d435e=_0x466ea2();while(!![]){try{const _0x4fcfe9=-parseInt(_0x3a8f9a(0xe1))/0x1*(-parseInt(_0x3a8f9a(0xf2))/0x2)+-parseInt(_0x3a8f9a(0xe7))/0x3*(-parseInt(_0x3a8f9a(0xee))/0x4)+-parseInt(_0x3a8f9a(0x100))/0x5+-parseInt(_0x3a8f9a(0xff))/0x6+-parseInt(_0x3a8f9a(0xd2))/0x7*(parseInt(_0x3a8f9a(0xe6))/0x8)+-parseInt(_0x3a8f9a(0xe0))/0x9+-parseInt(_0x3a8f9a(0xd9))/0xa*(-parseInt(_0x3a8f9a(0xde))/0xb);if(_0x4fcfe9===_0x26a2ee)break;else _0x3d435e['push'](_0x3d435e['shift']());}catch(_0x170d78){_0x3d435e['push'](_0x3d435e['shift']());}}}(a333_0x5640,0x250c3));function a333_0x38c6(_0x5bb278,_0x225dd8){_0x5bb278=_0x5bb278-0xcf;const _0x564095=a333_0x5640();let _0x38c674=_0x564095[_0x5bb278];return _0x38c674;}import a333_0x8462a6 from'winston';import a333_0x9f2aab from'node:fs';import a333_0x47e7f9 from'node:path';class Logger{[a333_0xf46976(0xdb)];[a333_0xf46976(0xf4)];['currentRawCommand']='';constructor(){this['logFilePath']='';}['setRawCommand'](_0x30d1b1){const _0x5bee34=a333_0xf46976;this[_0x5bee34(0xf1)]=_0x30d1b1;}['initWinstonLogger'](){const _0x31880f=a333_0xf46976,_0xa8543b=a333_0x47e7f9[_0x31880f(0xd4)](this[_0x31880f(0xf4)]);!a333_0x9f2aab[_0x31880f(0xd1)](_0xa8543b)&&a333_0x9f2aab[_0x31880f(0x106)](_0xa8543b,{'recursive':!![]});const _0x206896=a333_0x8462a6[_0x31880f(0xd8)][_0x31880f(0xef)](a333_0x8462a6['format'][_0x31880f(0x101)](),a333_0x8462a6[_0x31880f(0xd8)][_0x31880f(0xea)]({'stack':!![]}),a333_0x8462a6[_0x31880f(0xd8)][_0x31880f(0xe2)](_0x5265a7=>{const _0x4f616d=_0x31880f,_0xf2a1a6={'timestamp':_0x5265a7['timestamp']||new Date()[_0x4f616d(0xcf)](),'level':_0x5265a7['level']||'info','command':_0x5265a7[_0x4f616d(0xf6)]||_0x4f616d(0xe5),'rawCommand':_0x5265a7[_0x4f616d(0xf0)]||this['currentRawCommand']||undefined,'message':_0x5265a7[_0x4f616d(0x102)]||'','duration':_0x5265a7['duration']||undefined,'details':_0x5265a7[_0x4f616d(0xd0)]||undefined};return JSON['stringify'](_0xf2a1a6);}));this[_0x31880f(0xdb)]=a333_0x8462a6['createLogger']({'level':_0x31880f(0xfb),'format':_0x206896,'transports':[new a333_0x8462a6[(_0x31880f(0x103))][(_0x31880f(0x105))]({'filename':this['logFilePath'],'level':_0x31880f(0xfb)})],'silent':![]}),a333_0x8462a6[_0x31880f(0xfc)]({'success':'green','error':'red','warn':'yellow','info':_0x31880f(0xfe)});}[a333_0xf46976(0xe4)](_0x4b29c7){const _0x55fc0c=a333_0xf46976;this[_0x55fc0c(0xf4)]=a333_0x47e7f9[_0x55fc0c(0xd7)](_0x4b29c7,_0x55fc0c(0x104)),this[_0x55fc0c(0xdb)]&&this[_0x55fc0c(0xdb)]['clear'](),this[_0x55fc0c(0xdf)]();}[a333_0xf46976(0xfb)](_0x55db06,_0x5d9fe2,_0x6a2fbc){const _0x427d69=a333_0xf46976;if(!this[_0x427d69(0xf4)]||!this[_0x427d69(0xdb)])return;this[_0x427d69(0xdb)][_0x427d69(0xfb)](_0x5d9fe2,{'command':_0x55db06,'details':_0x6a2fbc});}['success'](_0x193f6c,_0x59a741,_0xeca6b8,_0x337c7a){const _0x1b2d71=a333_0xf46976;if(!this[_0x1b2d71(0xf4)]||!this[_0x1b2d71(0xdb)])return;this[_0x1b2d71(0xdb)][_0x1b2d71(0xf9)](_0x1b2d71(0xfb),_0x59a741,{'level':_0x1b2d71(0xe9),'command':_0x193f6c,'duration':_0xeca6b8,'details':_0x337c7a});}[a333_0xf46976(0xe3)](_0x5ba856,_0x112fc6,_0x3a95b7){const _0x52fe19=a333_0xf46976;if(!this[_0x52fe19(0xf4)]||!this[_0x52fe19(0xdb)])return;this[_0x52fe19(0xdb)][_0x52fe19(0xe3)](_0x112fc6,{'command':_0x5ba856,'details':_0x3a95b7});}[a333_0xf46976(0xd3)](_0x245e54,_0x38fb13,_0x48a478){const _0x7f2b2c=a333_0xf46976;if(!this[_0x7f2b2c(0xf4)]||!this[_0x7f2b2c(0xdb)])return;this[_0x7f2b2c(0xdb)]['warn'](_0x38fb13,{'command':_0x245e54,'details':_0x48a478});}async[a333_0xf46976(0xf8)](_0x4cc80b,_0x1b8b63,_0x4609bc){const _0x3431ae=a333_0xf46976,_0x4ec28d=Date[_0x3431ae(0xd6)]();this[_0x3431ae(0xfb)](_0x4cc80b,_0x3431ae(0xf7)+_0x1b8b63);try{const _0x1198fc=await _0x4609bc(),_0xce798b=Date[_0x3431ae(0xd6)]()-_0x4ec28d;return this[_0x3431ae(0xe9)](_0x4cc80b,_0x3431ae(0xed)+_0x1b8b63,_0xce798b),_0x1198fc;}catch(_0x305ad2){const _0xbee460=Date[_0x3431ae(0xd6)]()-_0x4ec28d;this[_0x3431ae(0xe3)](_0x4cc80b,_0x3431ae(0xdd)+_0x1b8b63,{'error':_0x305ad2 instanceof Error?_0x305ad2['message']:String(_0x305ad2),'duration':_0xbee460});throw _0x305ad2;}}[a333_0xf46976(0xfd)](){const _0xc5f3f1=a333_0xf46976;try{if(!a333_0x9f2aab[_0xc5f3f1(0xd1)](this[_0xc5f3f1(0xf4)]))return[];const _0x30155d=a333_0x9f2aab[_0xc5f3f1(0xe8)](this[_0xc5f3f1(0xf4)],_0xc5f3f1(0xd5));return _0x30155d[_0xc5f3f1(0xdc)]('\x0a')['filter'](_0x1d347e=>_0x1d347e[_0xc5f3f1(0xeb)]())[_0xc5f3f1(0xfa)](_0x246f95=>JSON[_0xc5f3f1(0xf3)](_0x246f95));}catch(_0x51ad9d){return console[_0xc5f3f1(0xd3)](_0xc5f3f1(0xec),_0x51ad9d),[];}}[a333_0xf46976(0xf5)](){const _0x485f46=a333_0xf46976;try{a333_0x9f2aab[_0x485f46(0xd1)](this[_0x485f46(0xf4)])&&a333_0x9f2aab[_0x485f46(0xda)](this['logFilePath'],'',_0x485f46(0xd5));}catch(_0x496819){console[_0x485f46(0xd3)]('Failed\x20to\x20clear\x20logs:',_0x496819);}}['getWinstonInstance'](){const _0x252198=a333_0xf46976;return this[_0x252198(0xdb)];}}export const logger=new Logger();function a333_0x5640(){const _0x203bf7=['11MRJsYb','initWinstonLogger','1469952AqQJMD','1253xBCHtu','printf','error','setLogPath','unknown','735432JUXeTx','824379qUYAkq','readFileSync','success','errors','trim','Failed\x20to\x20read\x20logs:','Completed:\x20','4ygIPsU','combine','rawCommand','currentRawCommand','394dFkGUS','parse','logFilePath','clearLogs','command','Starting:\x20','logTask','log','map','info','addColors','readLogs','blue','1530246elhelr','1123530eBHMdq','timestamp','message','transports','.lovrabet.log','File','mkdirSync','toISOString','details','existsSync','7XUlyAu','warn','dirname','utf8','now','join','format','3651170HoYHRz','writeFileSync','winstonLogger','split','Failed:\x20'];a333_0x5640=function(){return _0x203bf7;};return a333_0x5640();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x57dc6b,_0x448e76){const _0x1766b8=a334_0x3f6e,_0x5911e0=_0x57dc6b();while(!![]){try{const _0x272f5f=parseInt(_0x1766b8(0x12c))/0x1+parseInt(_0x1766b8(0x129))/0x2*(parseInt(_0x1766b8(0x12d))/0x3)+parseInt(_0x1766b8(0x12a))/0x4+-parseInt(_0x1766b8(0x128))/0x5+parseInt(_0x1766b8(0x124))/0x6+parseInt(_0x1766b8(0x12e))/0x7*(-parseInt(_0x1766b8(0x126))/0x8)+-parseInt(_0x1766b8(0x130))/0x9*(parseInt(_0x1766b8(0x123))/0xa);if(_0x272f5f===_0x448e76)break;else _0x5911e0['push'](_0x5911e0['shift']());}catch(_0x12f19f){_0x5911e0['push'](_0x5911e0['shift']());}}}(a334_0x16a7,0xcfadc));import{CliErrors}from'../errors.js';export function parseJsonParams(_0x6fb33c){const _0x469928=a334_0x3f6e;if(!_0x6fb33c)return undefined;let _0x511e86;try{_0x511e86=JSON['parse'](_0x6fb33c);}catch{throw CliErrors['validation'](_0x469928(0x125)+_0x6fb33c);}if(!_0x511e86||typeof _0x511e86!==_0x469928(0x127)||Array[_0x469928(0x12f)](_0x511e86))throw CliErrors['validation'](_0x469928(0x12b),'Example:\x20--params\x20\x27{\x22id\x22:123}\x27');return _0x511e86;}function a334_0x3f6e(_0x28c027,_0x109c49){_0x28c027=_0x28c027-0x123;const _0x16a769=a334_0x16a7();let _0x3f6e4e=_0x16a769[_0x28c027];return _0x3f6e4e;}function a334_0x16a7(){const _0x41b1fc=['4073934AhFhDR','Invalid\x20JSON\x20for\x20--params:\x20','104UbGHUf','object','6818430zFvvIG','1363344MuhLlI','3134844mdhubW','--params\x20must\x20be\x20a\x20JSON\x20object','1672755ZEBYWp','3xJEoLw','147819okvMRm','isArray','54MNSemX','2213780tNrOMu'];a334_0x16a7=function(){return _0x41b1fc;};return a334_0x16a7();}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a335_0x1e4d(){const _0x7ef81f=['1Axklad','1699850BgugZE','5641360xqFQZu','2792268fFEWYL','537723qzXAnN','8444504KyMOgB','13190gFyxjM','1935ienguf','4ENwsZw','50687549UAtYRE','7uhfUQk'];a335_0x1e4d=function(){return _0x7ef81f;};return a335_0x1e4d();}(function(_0x2f264b,_0x11ac36){const _0x2ec2ea=a335_0x1f76,_0x3c6c5d=_0x2f264b();while(!![]){try{const _0x1ee936=parseInt(_0x2ec2ea(0x150))/0x1*(-parseInt(_0x2ec2ea(0x151))/0x2)+-parseInt(_0x2ec2ea(0x149))/0x3*(parseInt(_0x2ec2ea(0x14d))/0x4)+-parseInt(_0x2ec2ea(0x152))/0x5+-parseInt(_0x2ec2ea(0x148))/0x6+-parseInt(_0x2ec2ea(0x14f))/0x7*(parseInt(_0x2ec2ea(0x14a))/0x8)+parseInt(_0x2ec2ea(0x14c))/0x9*(-parseInt(_0x2ec2ea(0x14b))/0xa)+parseInt(_0x2ec2ea(0x14e))/0xb;if(_0x1ee936===_0x11ac36)break;else _0x3c6c5d['push'](_0x3c6c5d['shift']());}catch(_0x2b6ae7){_0x3c6c5d['push'](_0x3c6c5d['shift']());}}}(a335_0x1e4d,0x9db6b));export const isWindows=process['platform']==='win32';function a335_0x1f76(_0x5271f1,_0x458a71){_0x5271f1=_0x5271f1-0x148;const _0x1e4d9c=a335_0x1e4d();let _0x1f76bc=_0x1e4d9c[_0x5271f1];return _0x1f76bc;}export function resolveNpmBin(_0xae31fd){return isWindows?_0xae31fd+'.cmd':_0xae31fd;}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x1b5dec){return new Promise(_0x3190d3=>setTimeout(_0x3190d3,_0x1b5dec));}
|
|
@@ -37,9 +37,10 @@ export declare class TemplateReplacer {
|
|
|
37
37
|
* - {ApiFileName}: API 配置文件名(不含扩展名)
|
|
38
38
|
* - {ConfigName}: 注册配置名称
|
|
39
39
|
* - {ClientConfigParam}: createClient 的参数
|
|
40
|
+
* - {SdkConfigFileName}: SDK 路由配置文件名(不含扩展名)
|
|
40
41
|
* - {CreatedAt}: ISO 时间戳格式
|
|
41
42
|
*/
|
|
42
|
-
static replaceApiContent(content: string, appCode: string, modelConfigs: RegisterModelConfig[], exampleModelName?: string, apiFileName?: string, configName?: string, clientConfigParam?: string, varPrefix?: string): string;
|
|
43
|
+
static replaceApiContent(content: string, appCode: string, modelConfigs: RegisterModelConfig[], exampleModelName?: string, apiFileName?: string, configName?: string, clientConfigParam?: string, varPrefix?: string, sdkConfigFileName?: string): string;
|
|
43
44
|
/**
|
|
44
45
|
* 处理整个模板目录,复制并替换内容
|
|
45
46
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a337_0x373908=a337_0x55ab;(function(_0xca1ac5,_0x1d7057){const _0x51412f=a337_0x55ab,_0x4d1cae=_0xca1ac5();while(!![]){try{const _0x1fbeba=-parseInt(_0x51412f(0xf6))/0x1*(-parseInt(_0x51412f(0xfb))/0x2)+parseInt(_0x51412f(0xde))/0x3+-parseInt(_0x51412f(0xdb))/0x4*(parseInt(_0x51412f(0xf8))/0x5)+parseInt(_0x51412f(0xd9))/0x6+-parseInt(_0x51412f(0x107))/0x7+parseInt(_0x51412f(0xda))/0x8*(-parseInt(_0x51412f(0xcf))/0x9)+parseInt(_0x51412f(0xf4))/0xa*(-parseInt(_0x51412f(0xc7))/0xb);if(_0x1fbeba===_0x1d7057)break;else _0x4d1cae['push'](_0x4d1cae['shift']());}catch(_0x38b9d4){_0x4d1cae['push'](_0x4d1cae['shift']());}}}(a337_0x4606,0x4f6b9));import a337_0x22dab1 from'node:fs';import a337_0x21dd91 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a337_0x373908(0xf5)](_0x857440){const _0x5b2af6=a337_0x373908;return String(_0x857440)[_0x5b2af6(0x104)](0x2,'0');}static[a337_0x373908(0xe7)](_0x398f2d){const _0x156660=a337_0x373908,_0x5818cb=_0x398f2d[_0x156660(0xd8)](),_0x2cde1b=this[_0x156660(0xf5)](_0x398f2d[_0x156660(0xf9)]()+0x1),_0x107896=this[_0x156660(0xf5)](_0x398f2d['getDate']()),_0x255382=this[_0x156660(0xf5)](_0x398f2d[_0x156660(0x100)]()),_0x3dacd0=this[_0x156660(0xf5)](_0x398f2d['getMinutes']()),_0x3d57d8=this[_0x156660(0xf5)](_0x398f2d['getSeconds']());return{'createdAt':_0x5818cb+'-'+_0x2cde1b+'-'+_0x107896+'\x20'+_0x255382+':'+_0x3dacd0+':'+_0x3d57d8,'createdDate':_0x5818cb+'-'+_0x2cde1b+'-'+_0x107896,'createdTime':_0x255382+':'+_0x3dacd0+':'+_0x3d57d8};}static[a337_0x373908(0xfd)](_0x173dad){const _0x142343=a337_0x373908,_0x4ee551=_0x173dad[_0x142343(0xc9)]('/')[_0x142343(0xe3)]()||_0x173dad;return _0x4ee551['split']('-')[_0x142343(0xef)](_0x463b8f=>_0x463b8f[_0x142343(0xfa)](0x0)['toUpperCase']()+_0x463b8f[_0x142343(0xfc)](0x1)['toLowerCase']())[_0x142343(0xf7)]('');}static[a337_0x373908(0x106)](_0x1eb043){const _0x3d2b2a=a337_0x373908,_0x9a473c=_0x1eb043[_0x3d2b2a(0xc9)]('/')[_0x3d2b2a(0xe3)]()||_0x1eb043;return _0x9a473c[_0x3d2b2a(0xc9)]('-')[_0x3d2b2a(0xef)](_0x445148=>_0x445148['charAt'](0x0)[_0x3d2b2a(0xec)]()+_0x445148[_0x3d2b2a(0xfc)](0x1)['toLowerCase']())['join']('\x20');}static[a337_0x373908(0x101)](_0x37a089,_0xf817d6,_0x55f330){const _0x3fbfa5=a337_0x373908,_0x18b766=this[_0x3fbfa5(0xfd)](_0xf817d6),_0x51cb13=this[_0x3fbfa5(0x106)](_0xf817d6),{createdAt:_0x3a35a5,createdDate:_0x2dd610,createdTime:_0x4dfe82}=this[_0x3fbfa5(0xe7)](new Date());let _0xa22460=_0x37a089[_0x3fbfa5(0xc6)](/\{CliVersion\}/g,CLI_VERSION)[_0x3fbfa5(0xc6)](/\{ComponentName\}/g,_0x18b766)[_0x3fbfa5(0xc6)](/\{DisplayTitle\}/g,_0x51cb13)['replace'](/\{PageName\}/g,_0xf817d6)['replace'](/\{TemplateName\}/g,_0x55f330)['replace'](/\{CreatedAt\}/g,_0x3a35a5)[_0x3fbfa5(0xc6)](/\{CreatedDate\}/g,_0x2dd610)['replace'](/\{CreatedTime\}/g,_0x4dfe82);return _0xa22460;}static[a337_0x373908(0xe5)](_0x279315,_0x1d2b49,_0x318d86,_0x56995e,_0x3c8df7,_0x2fd5e4,_0x187275,_0x5b664a,_0x4dd691){const _0x15d2d8=a337_0x373908,_0x193be2=new Date(),_0xc2a15f=_0x193be2[_0x15d2d8(0xce)](),_0x496720=_0x318d86['map'](_0x41b0ef=>{const _0x5b2b72=_0x15d2d8,_0x22a42d=[_0x5b2b72(0xdc)+_0x41b0ef[_0x5b2b72(0xcc)]+'\x22',_0x5b2b72(0xe8)+_0x41b0ef['tableName']+'\x22','name:\x20\x22'+_0x41b0ef['name']+'\x22'];return _0x41b0ef[_0x5b2b72(0xe4)]&&_0x22a42d[_0x5b2b72(0xeb)]('alias:\x20\x22'+_0x41b0ef[_0x5b2b72(0xe4)]+'\x22'),_0x5b2b72(0xd7)+_0x22a42d[_0x5b2b72(0xf7)](',\x20')+_0x5b2b72(0xd1);})[_0x15d2d8(0xf7)](''),_0x323f43=_0x56995e||_0x318d86[0x0]?.[_0x15d2d8(0xe4)]||'YourModel';let _0x182738=_0x279315[_0x15d2d8(0xc6)](/\{AppCode\}/g,_0x1d2b49)['replace'](/\{ModelConfigs\}/g,_0x496720)[_0x15d2d8(0xc6)](/\{ExampleModelName\}/g,_0x323f43)['replace'](/\{ApiFileName\}/g,_0x3c8df7||_0x15d2d8(0xd6))['replace'](/\{ConfigName\}/g,_0x2fd5e4||'default')[_0x15d2d8(0xc6)](/\{ClientConfigParam\}/g,_0x187275||'')[_0x15d2d8(0xc6)](/\{SdkConfigFileName\}/g,_0x4dd691||_0x15d2d8(0xe6))['replace'](/\{VarPrefix\}/g,_0x5b664a||'LOVRABET')[_0x15d2d8(0xc6)](/\{CreatedAt\}/g,_0xc2a15f);return _0x182738;}static async[a337_0x373908(0xd2)](_0x1b9f51,_0x1db65b,_0x4412d6,_0x361844,_0x5e4a54=!![]){const _0x5f1390=a337_0x373908,_0x29c611=Date[_0x5f1390(0xe0)]();try{_0x5e4a54&&logger[_0x5f1390(0xcb)](_0x5f1390(0xfe),_0x5f1390(0xdf),{'templatePath':_0x1b9f51,'targetPath':_0x1db65b,'pageName':_0x4412d6,'templateName':_0x361844});await a337_0x22dab1[_0x5f1390(0xf1)][_0x5f1390(0xed)](_0x1db65b,{'recursive':!![]}),await this[_0x5f1390(0xe9)](_0x1b9f51,_0x1db65b,_0x4412d6,_0x361844);if(_0x5e4a54){const _0x4a741f=Date[_0x5f1390(0xe0)]()-_0x29c611;logger['success']('template',_0x5f1390(0xcd),_0x4a741f,{'pageName':_0x4412d6,'templateName':_0x361844});}}catch(_0x2d96c1){if(_0x5e4a54){const _0xe48e60=Date[_0x5f1390(0xe0)]()-_0x29c611;logger['error'](_0x5f1390(0xfe),_0x5f1390(0xdd),{'templatePath':_0x1b9f51,'targetPath':_0x1db65b,'pageName':_0x4412d6,'templateName':_0x361844,'error':_0x2d96c1 instanceof Error?_0x2d96c1['message']:String(_0x2d96c1),'duration':_0xe48e60});}throw _0x2d96c1;}}static async['processDirectory'](_0xc19956,_0x53f2f4,_0x3c4e65,_0x4492de){const _0x40fd13=a337_0x373908,_0xe8afc7=await a337_0x22dab1['promises']['readdir'](_0xc19956,{'withFileTypes':!![]});for(const _0x12627d of _0xe8afc7){const _0x1102ba=a337_0x21dd91[_0x40fd13(0xf7)](_0xc19956,_0x12627d['name']);let _0x30d10e=a337_0x21dd91[_0x40fd13(0xf7)](_0x53f2f4,_0x12627d[_0x40fd13(0x105)]);_0x12627d[_0x40fd13(0x105)]['endsWith']('.tpl')&&(_0x30d10e=a337_0x21dd91['join'](_0x53f2f4,_0x12627d['name'][_0x40fd13(0xc6)](/\.tpl$/,'')));if(_0x12627d['isDirectory']())await a337_0x22dab1[_0x40fd13(0xf1)][_0x40fd13(0xed)](_0x30d10e,{'recursive':!![]}),await this[_0x40fd13(0xe9)](_0x1102ba,_0x30d10e,_0x3c4e65,_0x4492de);else _0x12627d[_0x40fd13(0xf2)]()&&await this['processFile'](_0x1102ba,_0x30d10e,_0x3c4e65,_0x4492de);}}static async[a337_0x373908(0xe2)](_0x5bd995,_0x2d41e3,_0x4307f1,_0x127060){const _0x14496c=a337_0x373908,_0x54e65f=a337_0x21dd91[_0x14496c(0xf3)](_0x5bd995)[_0x14496c(0xd3)]();_0x5bd995[_0x14496c(0xe1)](_0x14496c(0xd4))&&(_0x2d41e3=_0x2d41e3[_0x14496c(0xc6)](/\.tpl$/,''));const _0x26ae19=['.tsx',_0x14496c(0x102),_0x14496c(0xd5),'.js',_0x14496c(0xd0),'.md',_0x14496c(0xca),_0x14496c(0xc8),'.tpl'];if(_0x26ae19[_0x14496c(0xee)](_0x54e65f)||_0x5bd995[_0x14496c(0xe1)](_0x14496c(0xd4))){const _0x8c8332=await a337_0x22dab1[_0x14496c(0xf1)][_0x14496c(0x103)](_0x5bd995,'utf8'),_0x59c082=this[_0x14496c(0x101)](_0x8c8332,_0x4307f1,_0x127060);await a337_0x22dab1[_0x14496c(0xf1)][_0x14496c(0xff)](_0x2d41e3,_0x59c082,_0x14496c(0xf0));}else await a337_0x22dab1[_0x14496c(0xf1)][_0x14496c(0xea)](_0x5bd995,_0x2d41e3);}}function a337_0x55ab(_0x438889,_0x27ebbe){_0x438889=_0x438889-0xc6;const _0x46060d=a337_0x4606();let _0x55abb7=_0x46060d[_0x438889];return _0x55abb7;}function a337_0x4606(){const _0xe1bb68=['datasetCode','Template\x20content\x20replacement\x20completed','toISOString','156726sLDoVI','.json','\x20},','processTemplate','toLowerCase','.tpl','.jsx','api','\x0a\x20\x20\x20\x20{\x20','getFullYear','3616710BqPGgl','216ccrokY','44qSJgNd','datasetCode:\x20\x22','Template\x20content\x20replacement\x20failed','1876053EnlfXs','Starting\x20template\x20content\x20replacement','now','endsWith','processFile','pop','alias','replaceApiContent','sdk-config','formatLocalTimestamp','tableName:\x20\x22','processDirectory','copyFile','push','toUpperCase','mkdir','includes','map','utf8','promises','isFile','extname','30pMUYoB','pad','208796RJCoAe','join','122185UHYrox','getMonth','charAt','4AVTlaq','slice','toComponentName','template','writeFile','getHours','replaceContent','.ts','readFile','padStart','name','toDisplayTitle','2751833mEeGpJ','replace','690503hjtVpu','.scss','split','.css','info'];a337_0x4606=function(){return _0xe1bb68;};return a337_0x4606();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x49b1c1,_0xb943b4){const _0x461fc4=a338_0x4891,_0x499e55=_0x49b1c1();while(!![]){try{const _0x279e5f=-parseInt(_0x461fc4(0x18e))/0x1*(parseInt(_0x461fc4(0x186))/0x2)+-parseInt(_0x461fc4(0x181))/0x3+parseInt(_0x461fc4(0x197))/0x4*(-parseInt(_0x461fc4(0x193))/0x5)+parseInt(_0x461fc4(0x18c))/0x6*(parseInt(_0x461fc4(0x198))/0x7)+parseInt(_0x461fc4(0x17c))/0x8*(-parseInt(_0x461fc4(0x18a))/0x9)+parseInt(_0x461fc4(0x17f))/0xa+-parseInt(_0x461fc4(0x17a))/0xb*(-parseInt(_0x461fc4(0x192))/0xc);if(_0x279e5f===_0xb943b4)break;else _0x499e55['push'](_0x499e55['shift']());}catch(_0x5616ac){_0x499e55['push'](_0x499e55['shift']());}}}(a338_0x5013,0xc3a28));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a338_0x453738 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';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x4472a1=a338_0x4891,_0x3ef0c5=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x4472a1(0x196)]()[_0x4472a1(0x18f)]();return _0x3ef0c5==='1'||_0x3ef0c5===_0x4472a1(0x17b)||_0x3ef0c5===_0x4472a1(0x183);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x42f7d3=a338_0x4891;return join(cacheRoot(),_0x42f7d3(0x187),_0x42f7d3(0x194));}function a338_0x5013(){const _0x19a6e4=['26284KZFAjJ','rabetbase-cli','parse','now','11097OZccLU','number','6EMebRl','stableVersion','82omGkpb','toLowerCase','\x20available,\x20current\x20','stringify','24RZSFqI','2335RcHXoz','update-check.json','valid','trim','11620UmjTlG','333137lhEGqj','21032693TYwxHD','true','5808jdDHhh','utf8','latest','11001060nEiGUK','checkedAt','2523198HmvpVL','object','yes','lastNotifiedAt','https://www.npmjs.com/package/'];a338_0x5013=function(){return _0x19a6e4;};return a338_0x5013();}function a338_0x4891(_0x24133d,_0x84a23d){_0x24133d=_0x24133d-0x17a;const _0x501316=a338_0x5013();let _0x489148=_0x501316[_0x24133d];return _0x489148;}async function readUpdateNoticeCache(){const _0x5271f9=a338_0x4891;try{const _0x13b3cc=await readFile(getUpdateNoticeCachePath(),_0x5271f9(0x17d)),_0x5212a9=JSON[_0x5271f9(0x188)](_0x13b3cc);if(!_0x5212a9||typeof _0x5212a9!==_0x5271f9(0x182))return{};return _0x5212a9;}catch{return{};}}async function writeUpdateNoticeCache(_0x15e1e){const _0x518ed9=a338_0x4891;try{const _0x7997f=getUpdateNoticeCachePath();await mkdir(dirname(_0x7997f),{'recursive':!![]}),await writeFile(_0x7997f,JSON[_0x518ed9(0x191)](_0x15e1e,null,0x2)+'\x0a',_0x518ed9(0x17d));}catch{}}function isFreshCheck(_0xf66354,_0xb10d5e){const _0x33108e=a338_0x4891;return typeof _0xf66354[_0x33108e(0x180)]===_0x33108e(0x18b)&&_0xb10d5e-_0xf66354[_0x33108e(0x180)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x3e14bf,_0x34a889,_0x4588a6){const _0x87743d=a338_0x4891;return _0x3e14bf['lastNotifiedVersion']===_0x34a889&&typeof _0x3e14bf[_0x87743d(0x184)]===_0x87743d(0x18b)&&_0x4588a6-_0x3e14bf[_0x87743d(0x184)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x38cbf9){const _0x4c93fc=a338_0x4891;return _0x4c93fc(0x185)+NPM_PACKAGE_NAME+'/v/'+_0x38cbf9;}export async function resolveLatestUpdateNotice(){const _0x52c320=a338_0x4891;if(isUpdateNoticeDisabled())return null;try{const _0x9dfaaf=Date[_0x52c320(0x189)](),_0x85e2c=getCliVersion(),_0xef23b4=await readUpdateNoticeCache();let _0x3f73b0=isFreshCheck(_0xef23b4,_0x9dfaaf)?_0xef23b4[_0x52c320(0x17e)]?.[_0x52c320(0x196)]():undefined;if(!_0x3f73b0&&!isFreshCheck(_0xef23b4,_0x9dfaaf)){const _0x141b61=await getCliVersionPolicy();_0x3f73b0=_0x141b61?.[_0x52c320(0x18d)]?.[_0x52c320(0x196)]()||undefined,await writeUpdateNoticeCache({..._0xef23b4,'checkedAt':_0x9dfaaf,'latest':_0x3f73b0,'failed':!_0x3f73b0});}if(!_0x3f73b0||!a338_0x453738[_0x52c320(0x195)](_0x85e2c)||!a338_0x453738[_0x52c320(0x195)](_0x3f73b0))return null;if(a338_0x453738['gte'](_0x85e2c,_0x3f73b0))return null;if(isRecentlyNotified(_0xef23b4,_0x3f73b0,_0x9dfaaf))return null;const _0x232a54=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0xef23b4,'checkedAt':isFreshCheck(_0xef23b4,_0x9dfaaf)?_0xef23b4[_0x52c320(0x180)]:_0x9dfaaf,'latest':_0x3f73b0,'failed':![],'lastNotifiedVersion':_0x3f73b0,'lastNotifiedAt':_0x9dfaaf}),{'command':_0x232a54,'current':_0x85e2c,'latest':_0x3f73b0,'url':buildNpmVersionUrl(_0x3f73b0),'message':CLI_BIN_NAME+'\x20'+_0x3f73b0+_0x52c320(0x190)+_0x85e2c+',\x20run:\x20'+_0x232a54};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x417671,_0x121c37){var _0x458771=a339_0x5d58,_0x534744=_0x417671();while(!![]){try{var _0x24a669=-parseInt(_0x458771(0x1ac))/0x1+-parseInt(_0x458771(0x1a9))/0x2*(parseInt(_0x458771(0x1ad))/0x3)+-parseInt(_0x458771(0x1ae))/0x4+parseInt(_0x458771(0x1ab))/0x5*(-parseInt(_0x458771(0x1af))/0x6)+parseInt(_0x458771(0x1a7))/0x7+parseInt(_0x458771(0x1a8))/0x8+parseInt(_0x458771(0x1aa))/0x9;if(_0x24a669===_0x121c37)break;else _0x534744['push'](_0x534744['shift']());}catch(_0x12ee52){_0x534744['push'](_0x534744['shift']());}}}(a339_0x23fa,0x3d5b6));import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a339_0x5d58(_0x2ff359,_0x3551da){_0x2ff359=_0x2ff359-0x1a7;var _0x23fa6a=a339_0x23fa();var _0x5d58da=_0x23fa6a[_0x2ff359];return _0x5d58da;}function a339_0x23fa(){var _0x28646b=['39357OEGelP','1478944uRQXFE','1050HCkvqr','3336466hRWztp','1370760AiIXzu','72iDjCrH','6728220oZMZQZ','6680Hpooif','68425FGVGWL'];a339_0x23fa=function(){return _0x28646b;};return a339_0x23fa();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a340_0x17cf(_0x19b176,_0x4bb06c){_0x19b176=_0x19b176-0x84;var _0x6783ee=a340_0x6783();var _0x17cf32=_0x6783ee[_0x19b176];return _0x17cf32;}(function(_0x2f7e46,_0x51477e){var _0x557e14=a340_0x17cf,_0x50aa74=_0x2f7e46();while(!![]){try{var _0x31a66a=parseInt(_0x557e14(0x89))/0x1+-parseInt(_0x557e14(0x8c))/0x2*(parseInt(_0x557e14(0x8d))/0x3)+-parseInt(_0x557e14(0x8a))/0x4*(parseInt(_0x557e14(0x8b))/0x5)+-parseInt(_0x557e14(0x84))/0x6*(parseInt(_0x557e14(0x85))/0x7)+parseInt(_0x557e14(0x88))/0x8+parseInt(_0x557e14(0x86))/0x9+parseInt(_0x557e14(0x87))/0xa;if(_0x31a66a===_0x51477e)break;else _0x50aa74['push'](_0x50aa74['shift']());}catch(_0x23b570){_0x50aa74['push'](_0x50aa74['shift']());}}}(a340_0x6783,0x22df1));function a340_0x6783(){var _0x42f51b=['356139snhdfl','2495466ZsbpyF','505350MgeDVq','716144XZxeNo','250207dknrxi','8dkdmMZ','703765SmXIOx','79374tpBPWc','3EMXVGG','24SWkZor'];a340_0x6783=function(){return _0x42f51b;};return a340_0x6783();}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x1ea4e7,_0x807756){setActiveCookie(_0x1ea4e7);try{return await _0x807756();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x586290,_0x15db03){var _0x1907c9=a341_0x38b9,_0x13764f=_0x586290();while(!![]){try{var _0x2ef9dd=-parseInt(_0x1907c9(0x118))/0x1*(-parseInt(_0x1907c9(0x112))/0x2)+-parseInt(_0x1907c9(0x113))/0x3*(-parseInt(_0x1907c9(0x115))/0x4)+parseInt(_0x1907c9(0x119))/0x5+parseInt(_0x1907c9(0x116))/0x6*(parseInt(_0x1907c9(0x114))/0x7)+-parseInt(_0x1907c9(0x11c))/0x8+parseInt(_0x1907c9(0x11b))/0x9+parseInt(_0x1907c9(0x11d))/0xa*(-parseInt(_0x1907c9(0x11a))/0xb);if(_0x2ef9dd===_0x15db03)break;else _0x13764f['push'](_0x13764f['shift']());}catch(_0x541456){_0x13764f['push'](_0x13764f['shift']());}}}(a341_0xb52d,0xde67c));function a341_0x38b9(_0x5f187d,_0x5f1c1e){_0x5f187d=_0x5f187d-0x112;var _0xb52dc0=a341_0xb52d();var _0x38b9bb=_0xb52dc0[_0x5f187d];return _0x38b9bb;}export function writeCliSideChannelLine(_0x119988){var _0x262e11=a341_0x38b9;process['stderr'][_0x262e11(0x117)](_0x119988+'\x0a');}function a341_0xb52d(){var _0x5ba70b=['write','34fEbVfk','2900820eklmyH','1627076gCkkjD','8048376gJAeie','5636232UGBNbo','170KlAPiK','82828qNkmqc','193209KAWvjw','686gvRPYI','76kPvpRm','1464dlSqfJ'];a341_0xb52d=function(){return _0x5ba70b;};return a341_0xb52d();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.5.2",
|
|
3
|
+
"version": "2.5.3-beta.2",
|
|
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": [
|