@lovrabet/rabetbase-cli 2.5.8-beta.2 → 2.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a358_0x3274fa=a358_0x56a4;(function(_0x208424,_0x556074){const _0x2a2ae0=a358_0x56a4,_0x1d5eae=_0x208424();while(!![]){try{const _0x244a08=parseInt(_0x2a2ae0(0x98))/0x1*(parseInt(_0x2a2ae0(0x8e))/0x2)+parseInt(_0x2a2ae0(0x8d))/0x3+parseInt(_0x2a2ae0(0x7c))/0x4*(parseInt(_0x2a2ae0(0x78))/0x5)+-parseInt(_0x2a2ae0(0x84))/0x6*(parseInt(_0x2a2ae0(0x91))/0x7)+-parseInt(_0x2a2ae0(0x80))/0x8*(-parseInt(_0x2a2ae0(0x85))/0x9)+-parseInt(_0x2a2ae0(0x7e))/0xa*(parseInt(_0x2a2ae0(0x75))/0xb)+-parseInt(_0x2a2ae0(0x97))/0xc*(-parseInt(_0x2a2ae0(0x89))/0xd);if(_0x244a08===_0x556074)break;else _0x1d5eae['push'](_0x1d5eae['shift']());}catch(_0x4a0d4d){_0x1d5eae['push'](_0x1d5eae['shift']());}}}(a358_0x3e5f,0xb69fb));import a358_0x72bc43 from'node:fs';function a358_0x3e5f(){const _0x456ba6=['104dBzOZt','needsUpgrade','5121150tvRJJq','utf-8','2309512daCyZi','sdk','join','minVersion','179580cyLrJX','9bRpauh','@lovrabet/sdk','node','packageName','26eIzyjK','existsSync','npm\x20install\x20','\x1b[33m','2321841tYVtAr','775050eNaNgq','dependencies','\x1b[0m','280VTVLgV','\x20\x20\x20Current\x20version:\x20','some','node_modules','latest','devDependencies','2108724MDzFil','1mZNsdh','\x1b[1m','parse','1.2.0','log','22KOidwM','package.json','stableVersion','224585DCpRIW','readFileSync','coerce','version'];a358_0x3e5f=function(){return _0x456ba6;};return a358_0x3e5f();}import a358_0x5e3338 from'node:path';import a358_0x240804 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';function a358_0x56a4(_0x2d7cc0,_0x128257){_0x2d7cc0=_0x2d7cc0-0x72;const _0x3e5f87=a358_0x3e5f();let _0x56a41c=_0x3e5f87[_0x2d7cc0];return _0x56a41c;}const FALLBACK_MIN_SDK_VERSION=a358_0x3274fa(0x73);function isNonNumericVersion(_0x4218ba){const _0x1b351d=a358_0x3274fa,_0x15e56d=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x15e56d[_0x1b351d(0x93)](_0x57eae9=>_0x57eae9['test'](_0x4218ba));}function getInstalledVersion(_0x5ea190,_0x4bd619){const _0x4db64b=a358_0x3274fa;try{const _0x35a139=a358_0x5e3338['join'](_0x5ea190,_0x4db64b(0x94),_0x4bd619,'package.json');if(a358_0x72bc43[_0x4db64b(0x8a)](_0x35a139)){const _0x340be5=JSON[_0x4db64b(0x72)](a358_0x72bc43[_0x4db64b(0x79)](_0x35a139,_0x4db64b(0x7f)));return _0x340be5[_0x4db64b(0x7b)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x36f0c7=a358_0x3274fa;try{const _0x1249fb=await getCdnConfig();return _0x1249fb?.[_0x36f0c7(0x81)]?.[_0x36f0c7(0x87)]?.[_0x36f0c7(0x77)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x568e22=a358_0x3274fa;try{const _0x32de80=await getCdnConfig();return _0x32de80?.['sdk']?.['node']?.[_0x568e22(0x88)]||_0x568e22(0x86);}catch{return'@lovrabet/sdk';}}export async function checkSdkVersion(_0x2f160a){const _0xdc709b=a358_0x3274fa,_0x562648=a358_0x5e3338[_0xdc709b(0x82)](_0x2f160a,_0xdc709b(0x76)),[_0x23e973,_0x4c92ae]=await Promise['all']([getSdkStableVersion(),getSdkPackageName()]),_0x35feb9=_0x23e973||FALLBACK_MIN_SDK_VERSION;if(!a358_0x72bc43[_0xdc709b(0x8a)](_0x562648))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x35feb9,'packageName':_0x4c92ae,'stableVersion':_0x23e973};try{const _0x2c34f9=JSON['parse'](a358_0x72bc43[_0xdc709b(0x79)](_0x562648,'utf8')),_0x359fef=_0x2c34f9[_0xdc709b(0x8f)]||{},_0x1b1117=_0x2c34f9[_0xdc709b(0x96)]||{},_0x3201c2=_0x359fef[_0x4c92ae]||_0x1b1117[_0x4c92ae];if(!_0x3201c2)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x35feb9,'packageName':_0x4c92ae,'stableVersion':_0x23e973};let _0x25bc58=getInstalledVersion(_0x2f160a,_0x4c92ae);!_0x25bc58&&(_0x25bc58=_0x3201c2);if(isNonNumericVersion(_0x3201c2))return{'installed':!![],'version':_0x25bc58,'needsUpgrade':![],'minVersion':_0x35feb9,'packageName':_0x4c92ae,'stableVersion':_0x23e973};const _0x939a13=a358_0x240804['coerce'](_0x25bc58),_0x4bd6ac=a358_0x240804['coerce'](_0x35feb9),_0x53810c=_0x939a13&&_0x4bd6ac?a358_0x240804['lt'](_0x939a13,_0x4bd6ac):![];return{'installed':!![],'version':_0x25bc58,'needsUpgrade':_0x53810c,'minVersion':_0x35feb9,'packageName':_0x4c92ae,'stableVersion':_0x23e973};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x35feb9,'packageName':_0x4c92ae,'stableVersion':_0x23e973};}}export function checkSdkVersionSync(_0x856ee8){const _0x4c4d87=a358_0x3274fa,_0x15a065=a358_0x5e3338[_0x4c4d87(0x82)](_0x856ee8,_0x4c4d87(0x76)),_0x8d7987=_0x4c4d87(0x86);if(!a358_0x72bc43['existsSync'](_0x15a065))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x8d7987,'stableVersion':null};try{const _0x3539d1=JSON['parse'](a358_0x72bc43[_0x4c4d87(0x79)](_0x15a065,'utf8')),_0x4eb8d3=_0x3539d1[_0x4c4d87(0x8f)]||{},_0x1f21f8=_0x3539d1['devDependencies']||{},_0x658074=_0x4eb8d3[_0x8d7987]||_0x1f21f8[_0x8d7987];if(!_0x658074)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x8d7987,'stableVersion':null};let _0x452eef=getInstalledVersion(_0x856ee8,_0x8d7987);!_0x452eef&&(_0x452eef=_0x658074);if(isNonNumericVersion(_0x658074))return{'installed':!![],'version':_0x452eef,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x8d7987,'stableVersion':null};const _0x21617d=a358_0x240804[_0x4c4d87(0x7a)](_0x452eef),_0x523e6b=_0x21617d?a358_0x240804['lt'](_0x21617d,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x452eef,'needsUpgrade':_0x523e6b,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x8d7987,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x8d7987,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x1bdd47){const _0x1336b1=a358_0x3274fa;if(!_0x1bdd47[_0x1336b1(0x7d)])return;const _0xa21fa0=_0x1336b1(0x8c),_0x7ff5d6=_0x1336b1(0x90),_0x4f363b=_0x1336b1(0x99),_0x25ac28=_0x1bdd47['packageName']||_0x1336b1(0x86),_0x2afd69=_0x1bdd47['stableVersion']||_0x1bdd47[_0x1336b1(0x83)],_0x1ba7e5=_0x1336b1(0x8b)+_0x25ac28+'@'+(_0x2afd69||_0x1336b1(0x95));console['log'](),console[_0x1336b1(0x74)](''+_0xa21fa0+_0x4f363b+'↪\x20SDK\x20update\x20available'+_0x7ff5d6),console[_0x1336b1(0x74)](_0xa21fa0+_0x1336b1(0x92)+_0x25ac28+'@'+_0x1bdd47['version']+_0x7ff5d6),console[_0x1336b1(0x74)](_0xa21fa0+'\x20\x20\x20Stable\x20version:\x20'+_0x2afd69+_0x7ff5d6),console[_0x1336b1(0x74)](_0xa21fa0+'\x20\x20\x20Upgrade\x20command:\x20'+_0x1ba7e5+_0x7ff5d6),console[_0x1336b1(0x74)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2e4a0c,_0x2ad96c){const _0x49f8a0=a359_0x1540,_0x5ca575=_0x2e4a0c();while(!![]){try{const _0x1eab23=-parseInt(_0x49f8a0(0x197))/0x1+-parseInt(_0x49f8a0(0x17a))/0x2+parseInt(_0x49f8a0(0x19b))/0x3*(parseInt(_0x49f8a0(0x19d))/0x4)+parseInt(_0x49f8a0(0x192))/0x5*(parseInt(_0x49f8a0(0x185))/0x6)+parseInt(_0x49f8a0(0x199))/0x7*(-parseInt(_0x49f8a0(0x178))/0x8)+parseInt(_0x49f8a0(0x181))/0x9*(parseInt(_0x49f8a0(0x18f))/0xa)+-parseInt(_0x49f8a0(0x196))/0xb*(-parseInt(_0x49f8a0(0x193))/0xc);if(_0x1eab23===_0x2ad96c)break;else _0x5ca575['push'](_0x5ca575['shift']());}catch(_0x82cd80){_0x5ca575['push'](_0x5ca575['shift']());}}}(a359_0x327e,0x89ed6));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a359_0x3e2ed6 from'semver';function a359_0x327e(){const _0x376e64=['\x1b[33m','utf-8','minimumVersionMessage','latest','3798380nfmpml','Minimum\x20supported:\x20','Upgrade\x20command:\x20','1030HahdzE','8664792HMpZeJ','\x1b[1m','log','11efOlrN','358794LGZzXS','stableVersion','75929qkOGya','version','799029rXxrub','minimumVersion','8GIDBUp','\x20\x20\x20','\x20\x20\x20Recommended\x20stable:\x20','\x20\x20\x20Upgrade\x20command:\x20','package.json','\x1b[0m','488OIYzuF','↪\x20New\x20version\x20available','113190QFlPqb','\x20\x20\x20Current\x20CLI\x20version:\x20','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','1.0.0','needsUpgrade','npm\x20install\x20-g\x20','filter','9NHyGpX','coerce','currentVersion','↪\x20Critical\x20CLI\x20upgrade\x20required','216NMqrXN','../..','belowMinimum','\x20\x20\x20Minimum\x20supported:\x20','upgradeMessage','Current\x20version:\x20'];a359_0x327e=function(){return _0x376e64;};return a359_0x327e();}import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x5c2837){const _0x478287=a359_0x1540,_0x58cb1a=_0x5c2837[_0x478287(0x198)]||_0x478287(0x18e);return _0x478287(0x17f)+NPM_PACKAGE_NAME+'@'+_0x58cb1a;}function getCurrentCliVersion(){const _0x41edaa=a359_0x1540;try{const _0x44b83b=fileURLToPath(import.meta.url),_0x408255=resolve(dirname(_0x44b83b),_0x41edaa(0x186)),_0xd61b43=resolve(_0x408255,_0x41edaa(0x1a1)),_0x1f0d06=JSON['parse'](readFileSync(_0xd61b43,_0x41edaa(0x18c)));return _0x1f0d06[_0x41edaa(0x19a)]||'1.0.0';}catch{return _0x41edaa(0x17d);}}function a359_0x1540(_0x3dcfd2,_0x3a7616){_0x3dcfd2=_0x3dcfd2-0x178;const _0x327eed=a359_0x327e();let _0x15402c=_0x327eed[_0x3dcfd2];return _0x15402c;}export async function checkCliVersion(){const _0x40add3=a359_0x1540,_0x3cc835=getCurrentCliVersion(),_0x39b56f=await getCliVersionPolicy(),_0xbb9f2=_0x39b56f?.[_0x40add3(0x198)]||null,_0x1ad163=_0x39b56f?.[_0x40add3(0x19c)]||null;let _0x58b487=![],_0x1cd820=![];const _0x549a57=a359_0x3e2ed6['coerce'](_0x3cc835);if(_0x549a57&&_0xbb9f2)try{const _0x4451b5=a359_0x3e2ed6[_0x40add3(0x182)](_0xbb9f2);if(_0x4451b5)_0x58b487=a359_0x3e2ed6['lt'](_0x549a57,_0x4451b5);}catch{}if(_0x549a57&&_0x1ad163)try{const _0x27afd7=a359_0x3e2ed6[_0x40add3(0x182)](_0x1ad163);if(_0x27afd7)_0x1cd820=a359_0x3e2ed6['lt'](_0x549a57,_0x27afd7);}catch{}return _0x1cd820&&(_0x58b487=!![]),{'currentVersion':_0x3cc835,'stableVersion':_0xbb9f2,'minimumVersion':_0x1ad163,'needsUpgrade':_0x58b487,'belowMinimum':_0x1cd820,'isPreRelease':![],'upgradeMessage':_0x39b56f?.[_0x40add3(0x189)],'minimumVersionMessage':_0x39b56f?.[_0x40add3(0x18d)]};}export function printCliUpgradeWarning(_0x1adf3c){const _0x4c6635=a359_0x1540;if(!_0x1adf3c[_0x4c6635(0x17e)]&&!_0x1adf3c[_0x4c6635(0x187)])return;const _0x53096d='\x1b[31m',_0x5cf835=_0x4c6635(0x18b),_0x243cee=_0x4c6635(0x1a2),_0x28e176=_0x4c6635(0x194),_0x428a6b=getCliUpgradeCommand(_0x1adf3c);console['log'](),_0x1adf3c[_0x4c6635(0x187)]?(console[_0x4c6635(0x195)](''+_0x53096d+_0x28e176+_0x4c6635(0x184)+_0x243cee),console[_0x4c6635(0x195)](_0x53096d+_0x4c6635(0x17b)+_0x1adf3c[_0x4c6635(0x183)]+_0x243cee),_0x1adf3c[_0x4c6635(0x19c)]&&console[_0x4c6635(0x195)](_0x53096d+_0x4c6635(0x188)+_0x1adf3c[_0x4c6635(0x19c)]+_0x243cee),_0x1adf3c[_0x4c6635(0x198)]&&_0x1adf3c[_0x4c6635(0x198)]!==_0x1adf3c[_0x4c6635(0x19c)]&&console[_0x4c6635(0x195)](_0x53096d+_0x4c6635(0x19f)+_0x1adf3c[_0x4c6635(0x198)]+_0x243cee),_0x1adf3c['minimumVersionMessage']&&console['log'](_0x53096d+'\x20\x20\x20'+_0x1adf3c[_0x4c6635(0x18d)]+_0x243cee),console[_0x4c6635(0x195)](_0x53096d+_0x4c6635(0x1a0)+_0x428a6b+_0x243cee)):(console[_0x4c6635(0x195)](''+_0x5cf835+_0x28e176+_0x4c6635(0x179)+_0x243cee),console[_0x4c6635(0x195)](_0x5cf835+_0x4c6635(0x17b)+_0x1adf3c[_0x4c6635(0x183)]+_0x243cee),console[_0x4c6635(0x195)](_0x5cf835+'\x20\x20\x20Stable\x20version:\x20'+_0x1adf3c[_0x4c6635(0x198)]+_0x243cee),_0x1adf3c[_0x4c6635(0x189)]&&console[_0x4c6635(0x195)](_0x5cf835+_0x4c6635(0x19e)+_0x1adf3c[_0x4c6635(0x189)]+_0x243cee),console[_0x4c6635(0x195)](_0x5cf835+'\x20\x20\x20Upgrade\x20command:\x20'+_0x428a6b+_0x243cee)),console['log']();}export function assertCliVersionSupported(_0x3214a4){const _0x204056=a359_0x1540;if(!_0x3214a4['belowMinimum'])return;const _0x37b0da=[_0x3214a4['minimumVersionMessage'],_0x204056(0x18a)+_0x3214a4['currentVersion'],_0x3214a4[_0x204056(0x19c)]?_0x204056(0x190)+_0x3214a4[_0x204056(0x19c)]:null,_0x204056(0x191)+getCliUpgradeCommand(_0x3214a4)][_0x204056(0x180)](Boolean)['join']('\x0a');throw CliErrors['validation'](_0x204056(0x17c),_0x37b0da);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x455578,_0x217217){const _0x3cc916=a360_0x4a92,_0x16c34a=_0x455578();while(!![]){try{const _0x4dce36=parseInt(_0x3cc916(0x191))/0x1*(parseInt(_0x3cc916(0x197))/0x2)+parseInt(_0x3cc916(0x192))/0x3+parseInt(_0x3cc916(0x18d))/0x4+parseInt(_0x3cc916(0x19d))/0x5*(-parseInt(_0x3cc916(0x199))/0x6)+-parseInt(_0x3cc916(0x19f))/0x7+-parseInt(_0x3cc916(0x19b))/0x8*(-parseInt(_0x3cc916(0x187))/0x9)+parseInt(_0x3cc916(0x18c))/0xa*(parseInt(_0x3cc916(0x186))/0xb);if(_0x4dce36===_0x217217)break;else _0x16c34a['push'](_0x16c34a['shift']());}catch(_0x3871d8){_0x16c34a['push'](_0x16c34a['shift']());}}}(a360_0x185c,0xa17c4));function a360_0x4a92(_0x491561,_0x1b5199){_0x491561=_0x491561-0x186;const _0x185c4a=a360_0x185c();let _0x4a928f=_0x185c4a[_0x491561];return _0x4a928f;}import{getCliVersionPolicyUrl,getProjectTemplateAssetBaseUrl,getProjectTemplateLegacyAssetBaseUrl}from'../constant/cdn.js';import a360_0x1bd1ca from'semver';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;export function isBetaCliVersion(_0x49fdbe){const _0x962eb9=a360_0x4a92,_0x27bf53=a360_0x1bd1ca['valid'](_0x49fdbe);return _0x27bf53?a360_0x1bd1ca[_0x962eb9(0x18e)](_0x27bf53)?.[0x0]==='beta':![];}export function resolveProjectTemplateDescriptor(_0x3dedc7,_0x4857b5){const _0x5a0a63=a360_0x4a92;if(isBetaCliVersion(_0x4857b5))return _0x3dedc7['beta']?.['projectTemplate']??_0x3dedc7[_0x5a0a63(0x19c)];return _0x3dedc7[_0x5a0a63(0x19c)];}function pickString(_0x44cdc8){const _0x4825fe=a360_0x4a92;return typeof _0x44cdc8===_0x4825fe(0x19e)&&_0x44cdc8[_0x4825fe(0x18f)]()[_0x4825fe(0x19a)]>0x0?_0x44cdc8[_0x4825fe(0x18f)]():null;}function normalizeCliVersionPolicy(_0x1d0b57){const _0x4e7ce6=a360_0x4a92;if(!_0x1d0b57||typeof _0x1d0b57!=='object')return null;const _0x4848d5=_0x1d0b57,_0x57deb1=_0x4848d5['cli']&&typeof _0x4848d5[_0x4e7ce6(0x188)]===_0x4e7ce6(0x193)?_0x4848d5[_0x4e7ce6(0x188)]:_0x4848d5,_0x27107a=pickString(_0x57deb1[_0x4e7ce6(0x195)])||pickString(_0x57deb1[_0x4e7ce6(0x190)])||pickString(_0x57deb1[_0x4e7ce6(0x1a2)]),_0xf239b7=pickString(_0x57deb1[_0x4e7ce6(0x198)])||pickString(_0x57deb1[_0x4e7ce6(0x1a1)]);if(!_0x27107a&&!_0xf239b7)return null;return{'stableVersion':_0x27107a,'minimumVersion':_0xf239b7,'upgradeMessage':pickString(_0x57deb1[_0x4e7ce6(0x18a)])||undefined,'minimumVersionMessage':pickString(_0x57deb1[_0x4e7ce6(0x196)])||undefined};}async function fetchRabetbaseCdnConfigAt(_0x626a64){const _0x44eb65=a360_0x4a92,_0x15de17=new AbortController(),_0x472b3e=setTimeout(()=>_0x15de17[_0x44eb65(0x194)](),FETCH_TIMEOUT_MS);try{const _0x526ed8=await fetch(_0x626a64,{'headers':{'Accept':_0x44eb65(0x1a0)},'signal':_0x15de17['signal']});if(!_0x526ed8['ok'])return null;const _0x1dac95=await _0x526ed8[_0x44eb65(0x18b)]();return _0x1dac95&&typeof _0x1dac95===_0x44eb65(0x193)?_0x1dac95:null;}catch{return null;}finally{clearTimeout(_0x472b3e);}}export async function fetchRabetbaseCdnConfig(){return fetchRabetbaseCdnConfigAt(getCliVersionPolicyUrl());}export async function fetchProjectTemplateCdnConfig(){const _0x4c7af0=await getRabetbaseCdnConfig();return _0x4c7af0?{'config':_0x4c7af0,'assetBaseUrl':getProjectTemplateAssetBaseUrl(),'legacyAssetBaseUrl':getProjectTemplateLegacyAssetBaseUrl()}:null;}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];export async function getRabetbaseCdnConfig(){const _0x146781=a360_0x4a92,_0x50befa=Date[_0x146781(0x189)]();if(hasCachedConfig){const _0x3e6ae1=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x50befa-cacheTime<_0x3e6ae1)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x50befa,hasCachedConfig=!![],cachedConfig;}function a360_0x185c(){const _0x1d6069=['recommendedVersion','11990SJaCyM','2092842KwKExD','cli','now','upgradeMessage','json','6350TotWrK','77960FMOjjg','prerelease','trim','latestVersion','37633uYlRnC','349311RHzSBV','object','abort','stableVersion','minimumVersionMessage','8FwqdTL','minimumVersion','129522VlbxSH','length','8WOJAcL','projectTemplate','15yhEygG','string','3394594vFcLxS','application/json','minVersion'];a360_0x185c=function(){return _0x1d6069;};return a360_0x185c();}export async function getCliVersionPolicy(){return normalizeCliVersionPolicy(await getRabetbaseCdnConfig());}export function clearCliVersionPolicyCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x32895b,_0x17edbb){const _0x5516db=a361_0x6ec8,_0x1b3cf5=_0x32895b();while(!![]){try{const _0x68ca36=-parseInt(_0x5516db(0xe4))/0x1+-parseInt(_0x5516db(0xe7))/0x2+-parseInt(_0x5516db(0xe3))/0x3+parseInt(_0x5516db(0xe9))/0x4*(parseInt(_0x5516db(0xeb))/0x5)+-parseInt(_0x5516db(0xe6))/0x6*(-parseInt(_0x5516db(0xe8))/0x7)+parseInt(_0x5516db(0xea))/0x8+parseInt(_0x5516db(0xe5))/0x9;if(_0x68ca36===_0x17edbb)break;else _0x1b3cf5['push'](_0x1b3cf5['shift']());}catch(_0x58944d){_0x1b3cf5['push'](_0x1b3cf5['shift']());}}}(a361_0x3dbf,0x4f693));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a361_0x55c8bc,getMultiAppConfigs as a361_0x584b24,getTemplateBaseUrl as a361_0xae87fd}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';function a361_0x6ec8(_0x351f3c,_0x133d2c){_0x351f3c=_0x351f3c-0xe1;const _0x3dbf06=a361_0x3dbf();let _0x6ec855=_0x3dbf06[_0x351f3c];return _0x6ec855;}export function readConfig(_0x4865ba){const _0x26082d=a361_0x6ec8,_0x51cf52=readRawConfig(_0x4865ba);return _0x51cf52[_0x26082d(0xe2)]&&typeof _0x51cf52[_0x26082d(0xe2)]===_0x26082d(0xe1)&&initEnv(_0x51cf52[_0x26082d(0xe2)]),_0x51cf52;}export function getConfigAppCode(){return a361_0x55c8bc();}export function getMultiAppConfigs(_0x3f1e2c='project'){return a361_0x584b24(_0x3f1e2c);}export function getTemplateBaseUrl(){return a361_0xae87fd();}function a361_0x3dbf(){const _0x5eb9de=['604scItFf','1080776tplhee','2815GduEEw','string','env','1307541eYHovI','6786SARPyS','6944580nQrrVo','1390182CwLtyS','911054gRevWU','7wRCPPE'];a361_0x3dbf=function(){return _0x5eb9de;};return a361_0x3dbf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x258c31,_0x16b869){const _0xba5320=a362_0x4b60,_0xb4234=_0x258c31();while(!![]){try{const _0x4d58f4=parseInt(_0xba5320(0x11c))/0x1*(parseInt(_0xba5320(0x11a))/0x2)+-parseInt(_0xba5320(0x116))/0x3*(parseInt(_0xba5320(0x119))/0x4)+parseInt(_0xba5320(0x125))/0x5*(parseInt(_0xba5320(0x11b))/0x6)+parseInt(_0xba5320(0x11f))/0x7*(parseInt(_0xba5320(0x123))/0x8)+-parseInt(_0xba5320(0x117))/0x9+-parseInt(_0xba5320(0x124))/0xa*(-parseInt(_0xba5320(0x121))/0xb)+-parseInt(_0xba5320(0x118))/0xc*(parseInt(_0xba5320(0x11d))/0xd);if(_0x4d58f4===_0x16b869)break;else _0xb4234['push'](_0xb4234['shift']());}catch(_0x451a7a){_0xb4234['push'](_0xb4234['shift']());}}}(a362_0x1dc8,0x726fc));function a362_0x4b60(_0x404db5,_0x1f952d){_0x404db5=_0x404db5-0x116;const _0x1dc8af=a362_0x1dc8();let _0x4b602d=_0x1dc8af[_0x404db5];return _0x4b602d;}function a362_0x1dc8(){const _0x3f0fed=['1EtOQqH','1131SJorvO','isFinite','77YGaqDq','object','5632SIYbCX','string','256976vzsGFq','11930uwSZxo','20prfEOR','number','66fdIKhv','4651821vXPEjg','96888vIGecs','25948UQOygB','323566eSebqO','1057218AQNKhT'];a362_0x1dc8=function(){return _0x3f0fed;};return a362_0x1dc8();}function toFiniteNumber(_0x4f1027){const _0x3db29e=a362_0x4b60;if(typeof _0x4f1027===_0x3db29e(0x126)&&Number[_0x3db29e(0x11e)](_0x4f1027))return _0x4f1027;if(typeof _0x4f1027===_0x3db29e(0x122)){const _0xcd3172=_0x4f1027['trim']();if(!_0xcd3172)return undefined;const _0x49ed6f=Number(_0xcd3172);if(Number[_0x3db29e(0x11e)](_0x49ed6f))return _0x49ed6f;}return undefined;}export function normalizeEntityWithIdResponse(_0x1490f5){const _0x447e1b=a362_0x4b60,_0x1d9dda=toFiniteNumber(_0x1490f5);if(_0x1d9dda!==undefined)return{'id':_0x1d9dda,'entity':{'id':_0x1d9dda}};if(!_0x1490f5||typeof _0x1490f5!==_0x447e1b(0x120))return{'id':undefined,'entity':{}};const _0x5a0b87={..._0x1490f5},_0x50cb75=toFiniteNumber(_0x5a0b87['id']);return _0x50cb75!==undefined&&(_0x5a0b87['id']=_0x50cb75),{'id':_0x50cb75,'entity':_0x5a0b87};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2663bd,_0x4a4e4c){const _0x565e8e=a363_0x2034,_0x1f1330=_0x2663bd();while(!![]){try{const _0x3a5195=parseInt(_0x565e8e(0x186))/0x1*(parseInt(_0x565e8e(0x17e))/0x2)+parseInt(_0x565e8e(0x180))/0x3*(parseInt(_0x565e8e(0x184))/0x4)+parseInt(_0x565e8e(0x187))/0x5*(parseInt(_0x565e8e(0x189))/0x6)+parseInt(_0x565e8e(0x17d))/0x7*(-parseInt(_0x565e8e(0x182))/0x8)+parseInt(_0x565e8e(0x185))/0x9+-parseInt(_0x565e8e(0x181))/0xa*(-parseInt(_0x565e8e(0x17c))/0xb)+-parseInt(_0x565e8e(0x188))/0xc*(parseInt(_0x565e8e(0x183))/0xd);if(_0x3a5195===_0x4a4e4c)break;else _0x1f1330['push'](_0x1f1330['shift']());}catch(_0x3faa7e){_0x1f1330['push'](_0x1f1330['shift']());}}}(a363_0x38c2,0xe428e));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x26cbe2,_0x33645b){const _0x55ce39=a363_0x2034,_0x3ba99b=statSync(_0x26cbe2);if(_0x3ba99b[_0x55ce39(0x17f)]()){!existsSync(_0x33645b)&&mkdirSync(_0x33645b,{'recursive':!![]});const _0x4a1a0e=readdirSync(_0x26cbe2);for(const _0x5eeb66 of _0x4a1a0e){await copyDir(join(_0x26cbe2,_0x5eeb66),join(_0x33645b,_0x5eeb66));}}else copyFileSync(_0x26cbe2,_0x33645b);}function a363_0x2034(_0x294dd8,_0x12a2e3){_0x294dd8=_0x294dd8-0x17c;const _0x38c219=a363_0x38c2();let _0x2034ca=_0x38c219[_0x294dd8];return _0x2034ca;}function a363_0x38c2(){const _0x1af8cd=['99948kEkYZq','7524138kCQUUG','33NeqJbM','11206839TkFCUR','190knciuV','isDirectory','21yXCISb','2539630BHNAIS','8oZwnki','4836XPqROs','679324CMINVN','9295812IUBChJ','14698SlFIGL','5mtDWZm'];a363_0x38c2=function(){return _0x1af8cd;};return a363_0x38c2();}export function ensureDir(_0x1f69d3){!existsSync(_0x1f69d3)&&mkdirSync(_0x1f69d3,{'recursive':!![]});}export function pathExists(_0x1dc7d0){return existsSync(_0x1dc7d0);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a364_0x416b9e=a364_0x2046;(function(_0x520835,_0x45a006){const _0x608e39=a364_0x2046,_0x1d77df=_0x520835();while(!![]){try{const _0x49d34f=-parseInt(_0x608e39(0x1ab))/0x1*(-parseInt(_0x608e39(0x1b9))/0x2)+-parseInt(_0x608e39(0x1a1))/0x3*(-parseInt(_0x608e39(0x1a0))/0x4)+-parseInt(_0x608e39(0x19d))/0x5*(-parseInt(_0x608e39(0x19f))/0x6)+-parseInt(_0x608e39(0x1a8))/0x7+-parseInt(_0x608e39(0x1b3))/0x8+parseInt(_0x608e39(0x19c))/0x9*(parseInt(_0x608e39(0x1b2))/0xa)+parseInt(_0x608e39(0x1ae))/0xb;if(_0x49d34f===_0x45a006)break;else _0x1d77df['push'](_0x1d77df['shift']());}catch(_0x566e4a){_0x1d77df['push'](_0x1d77df['shift']());}}}(a364_0x244d,0xa4c26));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 _0x195a2a=getTemplateBaseUrl();return _0x195a2a+'/skills/guides.json';}const CACHE_DIR=join(homedir(),'.lovrabet',a364_0x416b9e(0x1a9));function a364_0x2046(_0x15bdfd,_0x294e97){_0x15bdfd=_0x15bdfd-0x19a;const _0x244d9b=a364_0x244d();let _0x20465f=_0x244d9b[_0x15bdfd];return _0x20465f;}function a364_0x244d(){const _0x1068e1=['2711975xSFXBb','cache','\x0a\x0a>更新时间:','3487deXJAn','status','utf-8','4886838ECuOaU','skillTemplate','trimEnd','replace','250yqnGYE','8347320nzeuhd','statusText','content','object','join','path','76sXkUQg','push','title','CDN\x20data\x20is\x20missing\x20skillTemplate','guides','CDN\x20returned\x20invalid\x20data','103239sLGqZZ','35Bevmoo','keys','497592ovkuNo','3004JKlbCO','2643SldsVK','application/json','.md','json','lastUpdated','.lovrabet/skill/guides','extendContent'];a364_0x244d=function(){return _0x1068e1;};return a364_0x244d();}export async function fetchGuidesFromCDN(){const _0x2e0a76=a364_0x416b9e,_0x2d7783=getGuidesCdnUrl(),_0x1395e4=await fetch(_0x2d7783,{'headers':{'Accept':_0x2e0a76(0x1a2)}});if(!_0x1395e4['ok'])throw new Error('CDN\x20request\x20failed:\x20'+_0x1395e4[_0x2e0a76(0x1ac)]+'\x20'+_0x1395e4[_0x2e0a76(0x1b4)]);const _0x28da83=await _0x1395e4[_0x2e0a76(0x1a4)]();if(!_0x28da83[_0x2e0a76(0x19a)]||typeof _0x28da83[_0x2e0a76(0x19a)]!==_0x2e0a76(0x1b6))throw new Error(_0x2e0a76(0x19b));return _0x28da83;}export function writeGuidesToProject(_0x2a60a5,_0x4e67d6,_0xbdde99=a364_0x416b9e(0x1a6),_0x32e8d0){const _0x25461b=a364_0x416b9e,_0x447a32=join(_0x4e67d6,_0xbdde99);mkdirSync(_0x447a32,{'recursive':!![]});for(const [_0x6f3692,_0x10b7d5]of Object['entries'](_0x2a60a5[_0x25461b(0x19a)])){let _0x1c601a=_0x10b7d5['content'];_0x10b7d5[_0x25461b(0x1a5)]&&(_0x1c601a=appendUpdateTime(_0x1c601a,_0x10b7d5[_0x25461b(0x1a5)])),writeFileSync(join(_0x447a32,_0x6f3692+_0x25461b(0x1a3)),_0x1c601a,'utf-8');}}export function appendUpdateTime(_0x73197f,_0x474415){const _0x3fd039=a364_0x416b9e;return _0x73197f=_0x73197f[_0x3fd039(0x1b1)](/\n*>更新时间:.*$/m,''),_0x73197f[_0x3fd039(0x1b0)]()+(_0x3fd039(0x1aa)+_0x474415);}export function getSkillTemplate(_0x13fcce){const _0x1b984f=a364_0x416b9e;return _0x13fcce[_0x1b984f(0x1af)]?.[_0x1b984f(0x1b5)]||'';}export function appendExtendContents(_0x5b480e,_0x33f55e,_0x56434c){const _0x501fb8=a364_0x416b9e,_0x3e91ea=[];for(const [,_0x59904]of Object['entries'](_0x33f55e[_0x501fb8(0x19a)])){_0x59904[_0x501fb8(0x1a7)]&&_0x3e91ea[_0x501fb8(0x1ba)](_0x59904['extendContent'][_0x501fb8(0x1b0)]());}if(_0x3e91ea['length']===0x0)return _0x5b480e;return _0x5b480e['trimEnd']()+'\x0a\x0a'+_0x3e91ea[_0x501fb8(0x1b7)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0xb11c27,_0x141f7a,_0x5ae617){const _0x213b73=a364_0x416b9e,_0x5936ba=getSkillTemplate(_0xb11c27);if(!_0x5936ba)throw new Error(_0x213b73(0x1bc));const _0x38bc27=dirname(_0x141f7a);mkdirSync(_0x38bc27,{'recursive':!![]});let _0x30d94b=_0x5936ba['replace'](/\{\{IDE_NAME\}\}/g,_0x5ae617);_0x30d94b=appendExtendContents(_0x30d94b,_0xb11c27),_0xb11c27['skillTemplate'][_0x213b73(0x1a5)]&&(_0x30d94b=appendUpdateTime(_0x30d94b,_0xb11c27['skillTemplate']['lastUpdated'])),writeFileSync(_0x141f7a,_0x30d94b,_0x213b73(0x1ad));}export async function installGuides(_0x4e0a08){const _0x1f5af4=a364_0x416b9e,_0x196605=await fetchGuidesFromCDN();return writeGuidesToProject(_0x196605,_0x4e0a08),Object[_0x1f5af4(0x19e)](_0x196605[_0x1f5af4(0x19a)])['length'];}export function getGuidesSummary(_0x185053){const _0x54125f=a364_0x416b9e;return Object['entries'](_0x185053[_0x54125f(0x19a)])['map'](([_0x3dcdea,_0x5c1148])=>({'key':_0x3dcdea,'title':_0x5c1148[_0x54125f(0x1bb)],'path':_0x5c1148[_0x54125f(0x1b8)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x50b6a6,_0x43f186){const _0x43ddf9=a365_0x50a3,_0xd85db=_0x50b6a6();while(!![]){try{const _0x4582d0=parseInt(_0x43ddf9(0x1f0))/0x1+-parseInt(_0x43ddf9(0x1e5))/0x2*(parseInt(_0x43ddf9(0x1f6))/0x3)+parseInt(_0x43ddf9(0x1f8))/0x4*(-parseInt(_0x43ddf9(0x1dd))/0x5)+-parseInt(_0x43ddf9(0x1f9))/0x6*(-parseInt(_0x43ddf9(0x1db))/0x7)+parseInt(_0x43ddf9(0x1e3))/0x8*(parseInt(_0x43ddf9(0x1f7))/0x9)+parseInt(_0x43ddf9(0x1f3))/0xa*(parseInt(_0x43ddf9(0x1ed))/0xb)+parseInt(_0x43ddf9(0x1f4))/0xc*(-parseInt(_0x43ddf9(0x1de))/0xd);if(_0x4582d0===_0x43f186)break;else _0xd85db['push'](_0xd85db['shift']());}catch(_0x37ed31){_0xd85db['push'](_0xd85db['shift']());}}}(a365_0x27be,0x97998));function a365_0x27be(){const _0x51283c=['json','1089426SdOpKa','statusText','ECONNRESET','10wvhbvR','512724wdOBGp','Request\x20failed','99MKAXZg','9poUQkn','6520vZnPUr','301032vlGitD','headers','TypeError','AbortError','56RPuTCv','application/json','2180EwUQTf','273TSxzBJ','content-type','get','abort','log','8485080EDdMmC','ENOTFOUND','24328JeBDEk','includes','ms...','\x20in\x20','text','message','status','url','867614drlMUu','fetch'];a365_0x27be=function(){return _0x51283c;};return a365_0x27be();}export async function httpRequest(_0xd6b3,_0x448a44={}){const _0x502bcc=a365_0x50a3,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x448a44;let _0x23470e=null;for(let _0x548421=0x0;_0x548421<=retries;_0x548421++){try{const _0x5544f1=new AbortController(),_0x2916a8=setTimeout(()=>_0x5544f1[_0x502bcc(0x1e1)](),timeout),_0x118e65=await fetch(_0xd6b3,{'headers':headers,'signal':_0x5544f1['signal']});clearTimeout(_0x2916a8);let _0x3f9b6f;const _0x18049d=_0x118e65[_0x502bcc(0x1fa)][_0x502bcc(0x1e0)](_0x502bcc(0x1df));return _0x18049d?.[_0x502bcc(0x1e6)](_0x502bcc(0x1dc))?_0x3f9b6f=await _0x118e65[_0x502bcc(0x1ef)]():_0x3f9b6f=await _0x118e65[_0x502bcc(0x1e9)](),{'ok':_0x118e65['ok'],'status':_0x118e65[_0x502bcc(0x1eb)],'statusText':_0x118e65[_0x502bcc(0x1f1)],'data':_0x3f9b6f,'headers':_0x118e65[_0x502bcc(0x1fa)],'url':_0x118e65[_0x502bcc(0x1ec)],'text':()=>_0x118e65[_0x502bcc(0x1e9)]()};}catch(_0x3ff6b2){_0x23470e=_0x3ff6b2 instanceof Error?_0x3ff6b2:new Error(String(_0x3ff6b2));if(_0x548421===retries)break;if(shouldRetry(_0x3ff6b2)){console[_0x502bcc(0x1e2)]('*\x20Request\x20failed;\x20retry\x20'+(_0x548421+0x1)+_0x502bcc(0x1e8)+retryDelay+_0x502bcc(0x1e7)),await sleep(retryDelay);continue;}else break;}}throw _0x23470e||new Error(_0x502bcc(0x1f5));}function a365_0x50a3(_0x39ef91,_0x1e5ed8){_0x39ef91=_0x39ef91-0x1d9;const _0x27bebd=a365_0x27be();let _0x50a3b9=_0x27bebd[_0x39ef91];return _0x50a3b9;}function shouldRetry(_0x3c59ce){const _0x526553=a365_0x50a3;if(_0x3c59ce instanceof Error){if(_0x3c59ce['name']===_0x526553(0x1da))return![];if(_0x3c59ce['name']===_0x526553(0x1d9)&&_0x3c59ce[_0x526553(0x1ea)]['includes'](_0x526553(0x1ee)))return!![];if(_0x3c59ce[_0x526553(0x1ea)]['includes'](_0x526553(0x1f2)))return!![];if(_0x3c59ce[_0x526553(0x1ea)][_0x526553(0x1e6)](_0x526553(0x1e4)))return![];}return![];}function sleep(_0x5b4839){return new Promise(_0x1a8f19=>setTimeout(_0x1a8f19,_0x5b4839));}export function validateUrl(_0x2779ba){try{return new URL(_0x2779ba),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x93d84b,_0x46634e){const _0x3750ce=a366_0x2592,_0x542925=_0x93d84b();while(!![]){try{const _0x40223b=parseInt(_0x3750ce(0xeb))/0x1+parseInt(_0x3750ce(0xef))/0x2*(parseInt(_0x3750ce(0xe2))/0x3)+parseInt(_0x3750ce(0xe8))/0x4+parseInt(_0x3750ce(0xe0))/0x5+parseInt(_0x3750ce(0xe3))/0x6+-parseInt(_0x3750ce(0xee))/0x7*(parseInt(_0x3750ce(0xed))/0x8)+-parseInt(_0x3750ce(0xe5))/0x9*(parseInt(_0x3750ce(0xe6))/0xa);if(_0x40223b===_0x46634e)break;else _0x542925['push'](_0x542925['shift']());}catch(_0x54550d){_0x542925['push'](_0x542925['shift']());}}}(a366_0x5ba8,0x55cee));function a366_0x2592(_0x4ab4f2,_0x1ca6af){_0x4ab4f2=_0x4ab4f2-0xe0;const _0x5ba88f=a366_0x5ba8();let _0x25921e=_0x5ba88f[_0x4ab4f2];return _0x25921e;}function env(_0x5ba3dc){return process.env[`RABETBASE_${_0x5ba3dc}`]||process.env[`LOVRABET_${_0x5ba3dc}`]||undefined;}export function isNonInteractive(_0x5021f2){const _0x4b111f=a366_0x2592;return!!(_0x5021f2[_0x4b111f(0xe9)]||_0x5021f2['ci']||env('CI')==='true'||process.env.CI===_0x4b111f(0xe1)||!process[_0x4b111f(0xe4)]['isTTY']||!isStdinRawModeSupported());}function a366_0x5ba8(){const _0x4041f7=['isTTY','102832RGpIHU','301qwAejv','184VAjkdJ','553245CvCNPa','true','5403RNGDyI','2248926TVFpRL','stdout','18KFOiWn','1403930tpfZKA','setRawMode','1500520OlJdKn','nonInteractive','stdin','158686VRNytP'];a366_0x5ba8=function(){return _0x4041f7;};return a366_0x5ba8();}function isStdinRawModeSupported(){const _0x2f88da=a366_0x2592;if(!process['stdin'][_0x2f88da(0xec)])return![];try{const _0x3bac06=process[_0x2f88da(0xea)]['isRaw'];return process['stdin'][_0x2f88da(0xe7)](!![]),process[_0x2f88da(0xea)][_0x2f88da(0xe7)](_0x3bac06??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a367_0x688e33=a367_0x5bda;function a367_0x5bda(_0x4e606e,_0x43e551){_0x4e606e=_0x4e606e-0x16c;const _0x96b21d=a367_0x96b2();let _0x5bda60=_0x96b21d[_0x4e606e];return _0x5bda60;}(function(_0xc27d64,_0x4168d9){const _0x2ef028=a367_0x5bda,_0x521578=_0xc27d64();while(!![]){try{const _0x33b41a=-parseInt(_0x2ef028(0x184))/0x1+-parseInt(_0x2ef028(0x199))/0x2+parseInt(_0x2ef028(0x19c))/0x3*(-parseInt(_0x2ef028(0x176))/0x4)+-parseInt(_0x2ef028(0x17f))/0x5+parseInt(_0x2ef028(0x183))/0x6*(parseInt(_0x2ef028(0x172))/0x7)+parseInt(_0x2ef028(0x18e))/0x8+-parseInt(_0x2ef028(0x19f))/0x9*(-parseInt(_0x2ef028(0x18c))/0xa);if(_0x33b41a===_0x4168d9)break;else _0x521578['push'](_0x521578['shift']());}catch(_0x2632f3){_0x521578['push'](_0x521578['shift']());}}}(a367_0x96b2,0xbe7d2));import a367_0x40920b from'winston';function a367_0x96b2(){const _0x4b4f19=['trim','6517824DXLOeX','timestamp','toISOString','details','join','error','getWinstonInstance','message','format','red','split','1166158xdRAbX','clear','winstonLogger','6YHhDmg','yellow','unknown','261864XSKcHZ','filter','info','printf','level','green','dirname','logTask','existsSync','writeFileSync','utf8','Completed:\x20','errors','combine','readLogs','622468oPVCjF','.lovrabet.log','command','Failed\x20to\x20clear\x20logs:','2536108LmErTj','clearLogs','success','duration','Failed:\x20','rawCommand','logFilePath','blue','parse','2675670GeunHK','initWinstonLogger','setLogPath','readFileSync','6GgnbcJ','1345047KuZCUK','Starting:\x20','addColors','mkdirSync','log','File','now','warn','1240iGRqiN'];a367_0x96b2=function(){return _0x4b4f19;};return a367_0x96b2();}import a367_0x44e4f0 from'node:fs';import a367_0x29faa2 from'node:path';class Logger{[a367_0x688e33(0x19b)];[a367_0x688e33(0x17c)];['currentRawCommand']='';constructor(){const _0x59ad0d=a367_0x688e33;this[_0x59ad0d(0x17c)]='';}['setRawCommand'](_0x3e838a){this['currentRawCommand']=_0x3e838a;}['initWinstonLogger'](){const _0x49c9bd=a367_0x688e33,_0x40ceb1=a367_0x29faa2[_0x49c9bd(0x1a5)](this['logFilePath']);!a367_0x44e4f0[_0x49c9bd(0x1a7)](_0x40ceb1)&&a367_0x44e4f0[_0x49c9bd(0x187)](_0x40ceb1,{'recursive':!![]});const _0x131af5=a367_0x40920b[_0x49c9bd(0x196)][_0x49c9bd(0x170)](a367_0x40920b[_0x49c9bd(0x196)][_0x49c9bd(0x18f)](),a367_0x40920b[_0x49c9bd(0x196)][_0x49c9bd(0x16f)]({'stack':!![]}),a367_0x40920b[_0x49c9bd(0x196)][_0x49c9bd(0x1a2)](_0x293e38=>{const _0xf944ec=_0x49c9bd,_0x3c0ccf={'timestamp':_0x293e38['timestamp']||new Date()[_0xf944ec(0x190)](),'level':_0x293e38[_0xf944ec(0x1a3)]||_0xf944ec(0x1a1),'command':_0x293e38[_0xf944ec(0x174)]||_0xf944ec(0x19e),'rawCommand':_0x293e38[_0xf944ec(0x17b)]||this['currentRawCommand']||undefined,'message':_0x293e38[_0xf944ec(0x195)]||'','duration':_0x293e38[_0xf944ec(0x179)]||undefined,'details':_0x293e38[_0xf944ec(0x191)]||undefined};return JSON['stringify'](_0x3c0ccf);}));this[_0x49c9bd(0x19b)]=a367_0x40920b['createLogger']({'level':_0x49c9bd(0x1a1),'format':_0x131af5,'transports':[new a367_0x40920b['transports'][(_0x49c9bd(0x189))]({'filename':this[_0x49c9bd(0x17c)],'level':'info'})],'silent':![]}),a367_0x40920b[_0x49c9bd(0x186)]({'success':_0x49c9bd(0x1a4),'error':_0x49c9bd(0x197),'warn':_0x49c9bd(0x19d),'info':_0x49c9bd(0x17d)});}[a367_0x688e33(0x181)](_0x2895cf){const _0x565549=a367_0x688e33;this['logFilePath']=a367_0x29faa2[_0x565549(0x192)](_0x2895cf,_0x565549(0x173)),this[_0x565549(0x19b)]&&this[_0x565549(0x19b)][_0x565549(0x19a)](),this[_0x565549(0x180)]();}[a367_0x688e33(0x1a1)](_0x5cbc54,_0x1c908d,_0xa683bd){const _0x41dfc5=a367_0x688e33;if(!this['logFilePath']||!this[_0x41dfc5(0x19b)])return;this['winstonLogger'][_0x41dfc5(0x1a1)](_0x1c908d,{'command':_0x5cbc54,'details':_0xa683bd});}['success'](_0x4d9858,_0x243188,_0xedb487,_0x14d4f2){const _0x6c0072=a367_0x688e33;if(!this['logFilePath']||!this[_0x6c0072(0x19b)])return;this[_0x6c0072(0x19b)][_0x6c0072(0x188)](_0x6c0072(0x1a1),_0x243188,{'level':'success','command':_0x4d9858,'duration':_0xedb487,'details':_0x14d4f2});}[a367_0x688e33(0x193)](_0x168fb4,_0x16b517,_0x3224a2){const _0x11befb=a367_0x688e33;if(!this[_0x11befb(0x17c)]||!this[_0x11befb(0x19b)])return;this[_0x11befb(0x19b)]['error'](_0x16b517,{'command':_0x168fb4,'details':_0x3224a2});}['warn'](_0x22bc4e,_0x1e2667,_0x170fcd){const _0x40d5e3=a367_0x688e33;if(!this[_0x40d5e3(0x17c)]||!this[_0x40d5e3(0x19b)])return;this[_0x40d5e3(0x19b)]['warn'](_0x1e2667,{'command':_0x22bc4e,'details':_0x170fcd});}async[a367_0x688e33(0x1a6)](_0x2a497e,_0x551cd8,_0x2f8c52){const _0x19ff8a=a367_0x688e33,_0x2ae373=Date[_0x19ff8a(0x18a)]();this[_0x19ff8a(0x1a1)](_0x2a497e,_0x19ff8a(0x185)+_0x551cd8);try{const _0x34db35=await _0x2f8c52(),_0x4dfce5=Date['now']()-_0x2ae373;return this[_0x19ff8a(0x178)](_0x2a497e,_0x19ff8a(0x16e)+_0x551cd8,_0x4dfce5),_0x34db35;}catch(_0x486bd4){const _0xe5ff77=Date['now']()-_0x2ae373;this[_0x19ff8a(0x193)](_0x2a497e,_0x19ff8a(0x17a)+_0x551cd8,{'error':_0x486bd4 instanceof Error?_0x486bd4[_0x19ff8a(0x195)]:String(_0x486bd4),'duration':_0xe5ff77});throw _0x486bd4;}}[a367_0x688e33(0x171)](){const _0x1099c6=a367_0x688e33;try{if(!a367_0x44e4f0[_0x1099c6(0x1a7)](this['logFilePath']))return[];const _0x48788f=a367_0x44e4f0[_0x1099c6(0x182)](this[_0x1099c6(0x17c)],_0x1099c6(0x16d));return _0x48788f[_0x1099c6(0x198)]('\x0a')[_0x1099c6(0x1a0)](_0x6cfc95=>_0x6cfc95[_0x1099c6(0x18d)]())['map'](_0x588383=>JSON[_0x1099c6(0x17e)](_0x588383));}catch(_0x41e98d){return console['warn']('Failed\x20to\x20read\x20logs:',_0x41e98d),[];}}[a367_0x688e33(0x177)](){const _0x1edb09=a367_0x688e33;try{a367_0x44e4f0[_0x1edb09(0x1a7)](this[_0x1edb09(0x17c)])&&a367_0x44e4f0[_0x1edb09(0x16c)](this[_0x1edb09(0x17c)],'',_0x1edb09(0x16d));}catch(_0x287465){console[_0x1edb09(0x18b)](_0x1edb09(0x175),_0x287465);}}[a367_0x688e33(0x194)](){const _0xcf55f0=a367_0x688e33;return this[_0xcf55f0(0x19b)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2c6945,_0x3bf82a){const _0x410ded=a368_0x4f57,_0x29bbf3=_0x2c6945();while(!![]){try{const _0x750cbc=parseInt(_0x410ded(0x1f8))/0x1*(-parseInt(_0x410ded(0x1ed))/0x2)+-parseInt(_0x410ded(0x1fa))/0x3*(-parseInt(_0x410ded(0x1f5))/0x4)+-parseInt(_0x410ded(0x1f2))/0x5*(-parseInt(_0x410ded(0x1f1))/0x6)+parseInt(_0x410ded(0x1ec))/0x7*(-parseInt(_0x410ded(0x1f7))/0x8)+parseInt(_0x410ded(0x1ee))/0x9+parseInt(_0x410ded(0x1ef))/0xa+-parseInt(_0x410ded(0x1f0))/0xb;if(_0x750cbc===_0x3bf82a)break;else _0x29bbf3['push'](_0x29bbf3['shift']());}catch(_0x424d53){_0x29bbf3['push'](_0x29bbf3['shift']());}}}(a368_0x2f82,0xbeeb6));function a368_0x4f57(_0x44579e,_0x6cf4ae){_0x44579e=_0x44579e-0x1ea;const _0x2f8266=a368_0x2f82();let _0x4f5752=_0x2f8266[_0x44579e];return _0x4f5752;}import{CliErrors}from'../errors.js';function a368_0x2f82(){const _0x386fd=['1815NVxwxC','Invalid\x20JSON\x20for\x20--params:\x20','258228phVpQh','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','--params\x20must\x20be\x20a\x20JSON\x20object','1292403PXbGgC','1000mFGfkK','725040pJmrEi','13999780ZFqEJe','13308295HNmbLo','498zMtRtF','19565BLffrp','isArray','validation','68vdjzrY','object','16uwJaTG'];a368_0x2f82=function(){return _0x386fd;};return a368_0x2f82();}export function parseJsonParams(_0x48d322){const _0x3b6e42=a368_0x4f57;if(!_0x48d322)return undefined;let _0x2e24b8;try{_0x2e24b8=JSON['parse'](_0x48d322);}catch{throw CliErrors[_0x3b6e42(0x1f4)](_0x3b6e42(0x1f9)+_0x48d322);}if(!_0x2e24b8||typeof _0x2e24b8!==_0x3b6e42(0x1f6)||Array[_0x3b6e42(0x1f3)](_0x2e24b8))throw CliErrors[_0x3b6e42(0x1f4)](_0x3b6e42(0x1eb),_0x3b6e42(0x1ea));return _0x2e24b8;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a369_0x35ad(_0x146dcc,_0x4e96e0){_0x146dcc=_0x146dcc-0x1cf;const _0x1f9931=a369_0x1f99();let _0x35ad4f=_0x1f9931[_0x146dcc];return _0x35ad4f;}const a369_0x441832=a369_0x35ad;function a369_0x1f99(){const _0x1c77cf=['2ntCrwI','win32','126LPoBLP','4108356uRZxAi','293128eWcXVW','2883780LqLbim','.cmd','285504gViIkF','5510155jrRimB','367176kmyFQc','platform','646052lwaWAv'];a369_0x1f99=function(){return _0x1c77cf;};return a369_0x1f99();}(function(_0x4bdb30,_0x5907c9){const _0x46cfee=a369_0x35ad,_0x13f7e5=_0x4bdb30();while(!![]){try{const _0x531fb5=parseInt(_0x46cfee(0x1d3))/0x1+-parseInt(_0x46cfee(0x1cf))/0x2*(parseInt(_0x46cfee(0x1d6))/0x3)+parseInt(_0x46cfee(0x1da))/0x4+parseInt(_0x46cfee(0x1d4))/0x5+-parseInt(_0x46cfee(0x1d2))/0x6+parseInt(_0x46cfee(0x1d7))/0x7+-parseInt(_0x46cfee(0x1d8))/0x8*(parseInt(_0x46cfee(0x1d1))/0x9);if(_0x531fb5===_0x5907c9)break;else _0x13f7e5['push'](_0x13f7e5['shift']());}catch(_0x2ba5b1){_0x13f7e5['push'](_0x13f7e5['shift']());}}}(a369_0x1f99,0x60b4e));export const isWindows=process[a369_0x441832(0x1d9)]===a369_0x441832(0x1d0);export function resolveNpmBin(_0x15386f){const _0x3e8e22=a369_0x441832;return isWindows?_0x15386f+_0x3e8e22(0x1d5):_0x15386f;}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x2a4a09){return new Promise(_0xe423ce=>setTimeout(_0xe423ce,_0x2a4a09));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a371_0x59db7d=a371_0x139d;(function(_0x3faeae,_0x428ca8){const _0x58dd78=a371_0x139d,_0x2c0052=_0x3faeae();while(!![]){try{const _0x267ccc=-parseInt(_0x58dd78(0xcd))/0x1*(-parseInt(_0x58dd78(0xb8))/0x2)+parseInt(_0x58dd78(0xca))/0x3*(-parseInt(_0x58dd78(0xbf))/0x4)+parseInt(_0x58dd78(0xc9))/0x5*(-parseInt(_0x58dd78(0xd6))/0x6)+parseInt(_0x58dd78(0xd5))/0x7+parseInt(_0x58dd78(0xe8))/0x8*(parseInt(_0x58dd78(0xc2))/0x9)+-parseInt(_0x58dd78(0xbc))/0xa*(parseInt(_0x58dd78(0xbb))/0xb)+-parseInt(_0x58dd78(0xd8))/0xc*(-parseInt(_0x58dd78(0xbe))/0xd);if(_0x267ccc===_0x428ca8)break;else _0x2c0052['push'](_0x2c0052['shift']());}catch(_0x1f7a0e){_0x2c0052['push'](_0x2c0052['shift']());}}}(a371_0x5d62,0x32989));function a371_0x5d62(){const _0xb6697e=['charAt','32LsjwFJ','isFile','name','error','endsWith','replace','utf8','name:\x20\x22','readFile','getHours','.js','LOVRABET','getMonth','.ts','processFile','toDisplayTitle','\x0a\x20\x20\x20\x20{\x20','promises','.scss','formatLocalTimestamp','2yIQxNC','getMinutes','replaceContent','3401101WgoUqs','10VdjtjT','template','13pzJrqK','12pWTedu','Starting\x20template\x20content\x20replacement','join','391383VFfkEC','padStart','pop','default','.css','success','alias','11215kmrTPj','173379EWkVVW','pad','map','360566jDeevo','.jsx','sdk-config','.tsx','Template\x20content\x20replacement\x20failed','now','toComponentName','Template\x20content\x20replacement\x20completed','2585261KrfVGv','654qwNWbi','toUpperCase','365532FVfLwr','split','getDate','mkdir','info','api','tableName','extname','tableName:\x20\x22','slice','YourModel','processDirectory','alias:\x20\x22','copyFile','.tpl'];a371_0x5d62=function(){return _0xb6697e;};return a371_0x5d62();}import a371_0x1f5de7 from'node:fs';import a371_0x533bf5 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';function a371_0x139d(_0x4de511,_0x584355){_0x4de511=_0x4de511-0xb8;const _0x5d62e7=a371_0x5d62();let _0x139de3=_0x5d62e7[_0x4de511];return _0x139de3;}const CLI_VERSION=getCliVersion();export class TemplateReplacer{static['pad'](_0x4a780a){const _0xf48c49=a371_0x139d;return String(_0x4a780a)[_0xf48c49(0xc3)](0x2,'0');}static[a371_0x59db7d(0xfb)](_0x4423bc){const _0x1d12b9=a371_0x59db7d,_0x5dfd8e=_0x4423bc['getFullYear'](),_0x35e4fc=this[_0x1d12b9(0xcb)](_0x4423bc[_0x1d12b9(0xf4)]()+0x1),_0x3e98a3=this['pad'](_0x4423bc[_0x1d12b9(0xda)]()),_0x492fc1=this[_0x1d12b9(0xcb)](_0x4423bc[_0x1d12b9(0xf1)]()),_0x59429d=this[_0x1d12b9(0xcb)](_0x4423bc[_0x1d12b9(0xb9)]()),_0xc3d610=this[_0x1d12b9(0xcb)](_0x4423bc['getSeconds']());return{'createdAt':_0x5dfd8e+'-'+_0x35e4fc+'-'+_0x3e98a3+'\x20'+_0x492fc1+':'+_0x59429d+':'+_0xc3d610,'createdDate':_0x5dfd8e+'-'+_0x35e4fc+'-'+_0x3e98a3,'createdTime':_0x492fc1+':'+_0x59429d+':'+_0xc3d610};}static[a371_0x59db7d(0xd3)](_0x4eead0){const _0x354599=a371_0x59db7d,_0x1bea3c=_0x4eead0[_0x354599(0xd9)]('/')[_0x354599(0xc4)]()||_0x4eead0;return _0x1bea3c[_0x354599(0xd9)]('-')[_0x354599(0xcc)](_0x5b269c=>_0x5b269c[_0x354599(0xe7)](0x0)[_0x354599(0xd7)]()+_0x5b269c[_0x354599(0xe1)](0x1)['toLowerCase']())[_0x354599(0xc1)]('');}static['toDisplayTitle'](_0x5d3402){const _0xf1342f=a371_0x59db7d,_0x33218b=_0x5d3402[_0xf1342f(0xd9)]('/')[_0xf1342f(0xc4)]()||_0x5d3402;return _0x33218b['split']('-')[_0xf1342f(0xcc)](_0x40689b=>_0x40689b[_0xf1342f(0xe7)](0x0)[_0xf1342f(0xd7)]()+_0x40689b[_0xf1342f(0xe1)](0x1)['toLowerCase']())['join']('\x20');}static[a371_0x59db7d(0xba)](_0x125076,_0x485047,_0x38b080){const _0x8596d6=a371_0x59db7d,_0x156b6e=this[_0x8596d6(0xd3)](_0x485047),_0x46371a=this[_0x8596d6(0xf7)](_0x485047),{createdAt:_0x5b74c4,createdDate:_0x35ef52,createdTime:_0x4c0999}=this[_0x8596d6(0xfb)](new Date());let _0x10d155=_0x125076[_0x8596d6(0xed)](/\{CliVersion\}/g,CLI_VERSION)[_0x8596d6(0xed)](/\{ComponentName\}/g,_0x156b6e)[_0x8596d6(0xed)](/\{DisplayTitle\}/g,_0x46371a)[_0x8596d6(0xed)](/\{PageName\}/g,_0x485047)[_0x8596d6(0xed)](/\{TemplateName\}/g,_0x38b080)[_0x8596d6(0xed)](/\{CreatedAt\}/g,_0x5b74c4)['replace'](/\{CreatedDate\}/g,_0x35ef52)[_0x8596d6(0xed)](/\{CreatedTime\}/g,_0x4c0999);return _0x10d155;}static['replaceApiContent'](_0x1a7486,_0x57873b,_0x422411,_0x492875,_0x57e893,_0x16f5ec,_0x340613,_0xedfc61,_0x4b7507){const _0x159fb7=a371_0x59db7d,_0x33baa8=new Date(),_0x6760da=_0x33baa8['toISOString'](),_0x45af2b=_0x422411[_0x159fb7(0xcc)](_0x414233=>{const _0x5ab8e6=_0x159fb7,_0xa8dc8c=['datasetCode:\x20\x22'+_0x414233['datasetCode']+'\x22',_0x5ab8e6(0xe0)+_0x414233[_0x5ab8e6(0xde)]+'\x22',_0x5ab8e6(0xef)+_0x414233[_0x5ab8e6(0xea)]+'\x22'];return _0x414233[_0x5ab8e6(0xc8)]&&_0xa8dc8c['push'](_0x5ab8e6(0xe4)+_0x414233[_0x5ab8e6(0xc8)]+'\x22'),_0x5ab8e6(0xf8)+_0xa8dc8c[_0x5ab8e6(0xc1)](',\x20')+'\x20},';})['join'](''),_0x373c68=_0x492875||_0x422411[0x0]?.[_0x159fb7(0xc8)]||_0x159fb7(0xe2);let _0x5266e8=_0x1a7486[_0x159fb7(0xed)](/\{AppCode\}/g,_0x57873b)[_0x159fb7(0xed)](/\{ModelConfigs\}/g,_0x45af2b)[_0x159fb7(0xed)](/\{ExampleModelName\}/g,_0x373c68)[_0x159fb7(0xed)](/\{ApiFileName\}/g,_0x57e893||_0x159fb7(0xdd))[_0x159fb7(0xed)](/\{ConfigName\}/g,_0x16f5ec||_0x159fb7(0xc5))['replace'](/\{ClientConfigParam\}/g,_0x340613||'')[_0x159fb7(0xed)](/\{SdkConfigFileName\}/g,_0x4b7507||_0x159fb7(0xcf))[_0x159fb7(0xed)](/\{VarPrefix\}/g,_0xedfc61||_0x159fb7(0xf3))['replace'](/\{CreatedAt\}/g,_0x6760da);return _0x5266e8;}static async['processTemplate'](_0x249fcf,_0x521be3,_0x342557,_0x2644f7,_0x515b8b=!![]){const _0x4f8308=a371_0x59db7d,_0x5b8176=Date[_0x4f8308(0xd2)]();try{_0x515b8b&&logger[_0x4f8308(0xdc)](_0x4f8308(0xbd),_0x4f8308(0xc0),{'templatePath':_0x249fcf,'targetPath':_0x521be3,'pageName':_0x342557,'templateName':_0x2644f7});await a371_0x1f5de7[_0x4f8308(0xf9)][_0x4f8308(0xdb)](_0x521be3,{'recursive':!![]}),await this['processDirectory'](_0x249fcf,_0x521be3,_0x342557,_0x2644f7);if(_0x515b8b){const _0x190cb9=Date[_0x4f8308(0xd2)]()-_0x5b8176;logger[_0x4f8308(0xc7)]('template',_0x4f8308(0xd4),_0x190cb9,{'pageName':_0x342557,'templateName':_0x2644f7});}}catch(_0x1d9595){if(_0x515b8b){const _0x52e501=Date['now']()-_0x5b8176;logger[_0x4f8308(0xeb)](_0x4f8308(0xbd),_0x4f8308(0xd1),{'templatePath':_0x249fcf,'targetPath':_0x521be3,'pageName':_0x342557,'templateName':_0x2644f7,'error':_0x1d9595 instanceof Error?_0x1d9595['message']:String(_0x1d9595),'duration':_0x52e501});}throw _0x1d9595;}}static async[a371_0x59db7d(0xe3)](_0x5d470b,_0x2745a5,_0x32c8b8,_0x51c86e){const _0xc883b8=a371_0x59db7d,_0x26c044=await a371_0x1f5de7['promises']['readdir'](_0x5d470b,{'withFileTypes':!![]});for(const _0xd559ed of _0x26c044){const _0x3b531b=a371_0x533bf5[_0xc883b8(0xc1)](_0x5d470b,_0xd559ed[_0xc883b8(0xea)]);let _0x407a58=a371_0x533bf5['join'](_0x2745a5,_0xd559ed[_0xc883b8(0xea)]);_0xd559ed['name'][_0xc883b8(0xec)](_0xc883b8(0xe6))&&(_0x407a58=a371_0x533bf5[_0xc883b8(0xc1)](_0x2745a5,_0xd559ed[_0xc883b8(0xea)]['replace'](/\.tpl$/,'')));if(_0xd559ed['isDirectory']())await a371_0x1f5de7[_0xc883b8(0xf9)]['mkdir'](_0x407a58,{'recursive':!![]}),await this[_0xc883b8(0xe3)](_0x3b531b,_0x407a58,_0x32c8b8,_0x51c86e);else _0xd559ed[_0xc883b8(0xe9)]()&&await this[_0xc883b8(0xf6)](_0x3b531b,_0x407a58,_0x32c8b8,_0x51c86e);}}static async[a371_0x59db7d(0xf6)](_0x389f7b,_0xc48e3,_0x4a508f,_0xbd9504){const _0x1886f7=a371_0x59db7d,_0x389926=a371_0x533bf5[_0x1886f7(0xdf)](_0x389f7b)['toLowerCase']();_0x389f7b[_0x1886f7(0xec)](_0x1886f7(0xe6))&&(_0xc48e3=_0xc48e3[_0x1886f7(0xed)](/\.tpl$/,''));const _0x18692c=[_0x1886f7(0xd0),_0x1886f7(0xf5),_0x1886f7(0xce),_0x1886f7(0xf2),'.json','.md',_0x1886f7(0xc6),_0x1886f7(0xfa),_0x1886f7(0xe6)];if(_0x18692c['includes'](_0x389926)||_0x389f7b['endsWith'](_0x1886f7(0xe6))){const _0x4a669c=await a371_0x1f5de7[_0x1886f7(0xf9)][_0x1886f7(0xf0)](_0x389f7b,_0x1886f7(0xee)),_0x2e50b9=this[_0x1886f7(0xba)](_0x4a669c,_0x4a508f,_0xbd9504);await a371_0x1f5de7[_0x1886f7(0xf9)]['writeFile'](_0xc48e3,_0x2e50b9,'utf8');}else await a371_0x1f5de7[_0x1886f7(0xf9)][_0x1886f7(0xe5)](_0x389f7b,_0xc48e3);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2f9813,_0x40ae93){const _0xe1b42f=a372_0x3e51,_0x2a5bc9=_0x2f9813();while(!![]){try{const _0x13800a=-parseInt(_0xe1b42f(0x11d))/0x1+parseInt(_0xe1b42f(0x122))/0x2*(-parseInt(_0xe1b42f(0x11f))/0x3)+-parseInt(_0xe1b42f(0x11e))/0x4*(parseInt(_0xe1b42f(0x10d))/0x5)+parseInt(_0xe1b42f(0x121))/0x6+-parseInt(_0xe1b42f(0x114))/0x7*(-parseInt(_0xe1b42f(0x128))/0x8)+parseInt(_0xe1b42f(0x10b))/0x9*(parseInt(_0xe1b42f(0x127))/0xa)+-parseInt(_0xe1b42f(0x120))/0xb*(-parseInt(_0xe1b42f(0x115))/0xc);if(_0x13800a===_0x40ae93)break;else _0x2a5bc9['push'](_0x2a5bc9['shift']());}catch(_0x196f8c){_0x2a5bc9['push'](_0x2a5bc9['shift']());}}}(a372_0xa513,0x697e1));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';function a372_0x3e51(_0x182a71,_0x34eb3f){_0x182a71=_0x182a71-0x10a;const _0xa513ff=a372_0xa513();let _0x3e51bd=_0xa513ff[_0x182a71];return _0x3e51bd;}import a372_0x5e44b6 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 _0x54c19b=a372_0x3e51,_0x53ccff=process.env.RABETBASE_NO_UPDATE_NOTICE?.['trim']()[_0x54c19b(0x10e)]();return _0x53ccff==='1'||_0x53ccff===_0x54c19b(0x11c)||_0x53ccff===_0x54c19b(0x123);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x219b2c=a372_0x3e51;return join(cacheRoot(),_0x219b2c(0x111),_0x219b2c(0x10c));}async function readUpdateNoticeCache(){const _0x3f5f36=a372_0x3e51;try{const _0x1385a5=await readFile(getUpdateNoticeCachePath(),_0x3f5f36(0x113)),_0x342c26=JSON[_0x3f5f36(0x124)](_0x1385a5);if(!_0x342c26||typeof _0x342c26!=='object')return{};return _0x342c26;}catch{return{};}}async function writeUpdateNoticeCache(_0x314d87){const _0x16b698=a372_0x3e51;try{const _0xe525b3=getUpdateNoticeCachePath();await mkdir(dirname(_0xe525b3),{'recursive':!![]}),await writeFile(_0xe525b3,JSON[_0x16b698(0x10f)](_0x314d87,null,0x2)+'\x0a',_0x16b698(0x113));}catch{}}function isFreshCheck(_0x281185,_0x402d0e){return typeof _0x281185['checkedAt']==='number'&&_0x402d0e-_0x281185['checkedAt']<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x4b1b6b,_0xc57c75,_0x25767c){const _0x584463=a372_0x3e51;return _0x4b1b6b[_0x584463(0x110)]===_0xc57c75&&typeof _0x4b1b6b[_0x584463(0x11a)]===_0x584463(0x119)&&_0x25767c-_0x4b1b6b['lastNotifiedAt']<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x5c383d){const _0x5ec8c6=a372_0x3e51;return _0x5ec8c6(0x10a)+NPM_PACKAGE_NAME+_0x5ec8c6(0x126)+_0x5c383d;}function a372_0xa513(){const _0x44cfe1=['782xMPJbq','yes','parse','latest','/v/','170UQszWc','189688RCyFDJ','stableVersion','https://www.npmjs.com/package/','40122gIkJSL','update-check.json','5WJfTbr','toLowerCase','stringify','lastNotifiedVersion','rabetbase-cli',',\x20run:\x20','utf8','21ppFHuW','629412cDpCFP','checkedAt','\x20update','valid','number','lastNotifiedAt','now','true','622011vQEahN','2784428FxHlak','5484BbqArR','341YmLSCR','4152378jjIXKe'];a372_0xa513=function(){return _0x44cfe1;};return a372_0xa513();}export async function resolveLatestUpdateNotice(){const _0xf4926c=a372_0x3e51;if(isUpdateNoticeDisabled())return null;try{const _0x120561=Date[_0xf4926c(0x11b)](),_0x3e3a4a=getCliVersion(),_0x470044=await readUpdateNoticeCache();let _0x5d414b=isFreshCheck(_0x470044,_0x120561)?_0x470044[_0xf4926c(0x125)]?.['trim']():undefined;if(!_0x5d414b&&!isFreshCheck(_0x470044,_0x120561)){const _0x208c83=await getCliVersionPolicy();_0x5d414b=_0x208c83?.[_0xf4926c(0x129)]?.['trim']()||undefined,await writeUpdateNoticeCache({..._0x470044,'checkedAt':_0x120561,'latest':_0x5d414b,'failed':!_0x5d414b});}if(!_0x5d414b||!a372_0x5e44b6[_0xf4926c(0x118)](_0x3e3a4a)||!a372_0x5e44b6['valid'](_0x5d414b))return null;if(a372_0x5e44b6['gte'](_0x3e3a4a,_0x5d414b))return null;if(isRecentlyNotified(_0x470044,_0x5d414b,_0x120561))return null;const _0x139382=CLI_BIN_NAME+_0xf4926c(0x117);return await writeUpdateNoticeCache({..._0x470044,'checkedAt':isFreshCheck(_0x470044,_0x120561)?_0x470044[_0xf4926c(0x116)]:_0x120561,'latest':_0x5d414b,'failed':![],'lastNotifiedVersion':_0x5d414b,'lastNotifiedAt':_0x120561}),{'command':_0x139382,'current':_0x3e3a4a,'latest':_0x5d414b,'url':buildNpmVersionUrl(_0x5d414b),'message':CLI_BIN_NAME+'\x20'+_0x5d414b+'\x20available,\x20current\x20'+_0x3e3a4a+_0xf4926c(0x112)+_0x139382};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a373_0xdd7f(){var _0x3b6a41=['27uTuEaN','1453806RoJYSA','2863664MZlSCc','9035440wcwFJN','14lUWhDD','1787524XWgWTB','60670mIWodU','336FGiksQ','603069KopRVU','33644HMInKv'];a373_0xdd7f=function(){return _0x3b6a41;};return a373_0xdd7f();}(function(_0x3730f5,_0x5dbca7){var _0x1d2603=a373_0x1216,_0x20fa30=_0x3730f5();while(!![]){try{var _0xc05283=parseInt(_0x1d2603(0xd8))/0x1+parseInt(_0x1d2603(0xd5))/0x2+parseInt(_0x1d2603(0xd7))/0x3*(parseInt(_0x1d2603(0xd9))/0x4)+-parseInt(_0x1d2603(0xd6))/0x5+parseInt(_0x1d2603(0xdb))/0x6+parseInt(_0x1d2603(0xde))/0x7*(parseInt(_0x1d2603(0xdc))/0x8)+parseInt(_0x1d2603(0xda))/0x9*(-parseInt(_0x1d2603(0xdd))/0xa);if(_0xc05283===_0x5dbca7)break;else _0x20fa30['push'](_0x20fa30['shift']());}catch(_0x162734){_0x20fa30['push'](_0x20fa30['shift']());}}}(a373_0xdd7f,0xa4a0a));import{VERSION}from'../generated/build-info.js';function a373_0x1216(_0xee7a1c,_0xeafe9d){_0xee7a1c=_0xee7a1c-0xd5;var _0xdd7f56=a373_0xdd7f();var _0x121681=_0xdd7f56[_0xee7a1c];return _0x121681;}export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4e2e71,_0x534b71){var _0x4970ca=a374_0x76fa,_0x32cd11=_0x4e2e71();while(!![]){try{var _0x56fe8d=-parseInt(_0x4970ca(0x19f))/0x1+parseInt(_0x4970ca(0x19a))/0x2*(-parseInt(_0x4970ca(0x19e))/0x3)+-parseInt(_0x4970ca(0x1a0))/0x4*(-parseInt(_0x4970ca(0x19b))/0x5)+-parseInt(_0x4970ca(0x199))/0x6+-parseInt(_0x4970ca(0x19d))/0x7+parseInt(_0x4970ca(0x1a1))/0x8+parseInt(_0x4970ca(0x19c))/0x9;if(_0x56fe8d===_0x534b71)break;else _0x32cd11['push'](_0x32cd11['shift']());}catch(_0x2a2efb){_0x32cd11['push'](_0x32cd11['shift']());}}}(a374_0x32a0,0x2e719));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a374_0x76fa(_0x35161e,_0x12c66e){_0x35161e=_0x35161e-0x199;var _0x32a0ee=a374_0x32a0();var _0x76fa29=_0x32a0ee[_0x35161e];return _0x76fa29;}export async function withActiveCookie(_0x4c32da,_0x5bce56){setActiveCookie(_0x4c32da);try{return await _0x5bce56();}finally{clearActiveCookie();}}function a374_0x32a0(){var _0x3fece4=['1933141dsTRyS','9NSiuGM','347624qktdTh','934444IGrsQk','1969792sbppUl','282156inxkcC','80958IPhHSO','5xmUmta','4523832NchSuu'];a374_0x32a0=function(){return _0x3fece4;};return a374_0x32a0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a375_0x3f76(){var _0x268cab=['5530150BpEvjb','4113621RvnmBy','4ZSWSvj','stderr','22WcoVZL','4Vhnbjh','6921845xPjwmV','6698424kanrky','680540MfctVW','904854OaGsIn','5280530KVZjoM','8ZdxHIQ'];a375_0x3f76=function(){return _0x268cab;};return a375_0x3f76();}function a375_0x48dc(_0x170e53,_0x1eca74){_0x170e53=_0x170e53-0x132;var _0x3f7619=a375_0x3f76();var _0x48dc34=_0x3f7619[_0x170e53];return _0x48dc34;}(function(_0x2ccaa2,_0x5dbe42){var _0x144c93=a375_0x48dc,_0x13c702=_0x2ccaa2();while(!![]){try{var _0x1663f2=parseInt(_0x144c93(0x138))/0x1+parseInt(_0x144c93(0x135))/0x2*(-parseInt(_0x144c93(0x139))/0x3)+parseInt(_0x144c93(0x132))/0x4*(parseInt(_0x144c93(0x13a))/0x5)+parseInt(_0x144c93(0x137))/0x6+-parseInt(_0x144c93(0x136))/0x7+parseInt(_0x144c93(0x13b))/0x8*(parseInt(_0x144c93(0x13d))/0x9)+-parseInt(_0x144c93(0x13c))/0xa*(parseInt(_0x144c93(0x134))/0xb);if(_0x1663f2===_0x5dbe42)break;else _0x13c702['push'](_0x13c702['shift']());}catch(_0x1190be){_0x13c702['push'](_0x13c702['shift']());}}}(a375_0x3f76,0x956b2));export function writeCliSideChannelLine(_0x16a663){var _0x438fc5=a375_0x48dc;process[_0x438fc5(0x133)]['write'](_0x16a663+'\x0a');}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.5.8
|
|
3
|
+
"version": "2.5.8",
|
|
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": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rabetbase
|
|
3
|
-
version: 2.5.8
|
|
3
|
+
version: 2.5.8
|
|
4
4
|
description: "Use for Lovrabet development work through the rabetbase CLI: create or bind projects (including creating an AppCode project in the current folder), pull Dataset/API facts and maintain SDK clients, or manage datasets, Instant API access policies, database connections, pages, host frontend integration, frontend subapp resources, SQL, Backend Functions, approval flows and workflows, menus, notifications, knowledge bases and kb search, Agent Context Rules, roles, files, OCR, deployment metadata, platform issues, and 钉钉沙箱账号绑定. Trigger when the user mentions rabetbase, Lovrabet development, AppCode, Dataset, Instant API allow/deny/route policy, project creation, api pull/codegen, dblink, page, host frontend integration, subapp resource versions, SQL, BFF, creating or designing an approval flow, workflow, business process, or multi-step approval, menu, notification, knowledge base, kb search, Agent Context Rules, RULES.md, DATABASE.md, rule list/get/set, role, file/OCR, or related development workflows."
|
|
5
5
|
metadata:
|
|
6
6
|
requires:
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "rabetbase",
|
|
4
4
|
"packageName": "@lovrabet/rabetbase-cli",
|
|
5
|
-
"packageVersion": "2.5.8
|
|
6
|
-
"skillVersion": "2.5.8
|
|
5
|
+
"packageVersion": "2.5.8",
|
|
6
|
+
"skillVersion": "2.5.8",
|
|
7
7
|
"files": [
|
|
8
8
|
"SKILL.md",
|
|
9
9
|
"guides/approval-flow-development-workflow.md",
|
|
@@ -159,5 +159,5 @@
|
|
|
159
159
|
"references/rabetbase-user-account.md",
|
|
160
160
|
"references/rabetbase-workspace.md"
|
|
161
161
|
],
|
|
162
|
-
"digest": "
|
|
162
|
+
"digest": "69c712d3334cce741ea10831d667ccf5f540e4a5372d3293dd9e86cfc0990341"
|
|
163
163
|
}
|