@lovrabet/rabetbase-cli 2.5.0-beta.2 → 2.5.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/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/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/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/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-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/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.d.ts +13 -0
- package/lib/commands/db/table-diff-shared.js +1 -0
- 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/doctor.js +1 -1
- package/lib/commands/file/index.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/template.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/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/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/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/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.d.ts +1 -7
- 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/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.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/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/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.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/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 +6 -6
- package/skills/rabetbase/guides/custom-page-workflow.md +1 -1
- package/skills/rabetbase/guides/database-connection-workflow.md +9 -9
- package/skills/rabetbase/references/rabetbase-config.md +2 -3
- package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
- package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +4 -3
- package/skills/rabetbase/references/rabetbase-db-diff.md +7 -22
- package/skills/rabetbase/references/rabetbase-db-tables.md +14 -2
- package/skills/rabetbase/references/rabetbase-page-custom-list.md +5 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a268_0x2cc3(_0x4560f4,_0x5756ab){_0x4560f4=_0x4560f4-0x116;const _0x6fb54c=a268_0x6fb5();let _0x2cc30b=_0x6fb54c[_0x4560f4];return _0x2cc30b;}(function(_0x3fc718,_0x2e8a16){const _0x280fe3=a268_0x2cc3,_0x573644=_0x3fc718();while(!![]){try{const _0x28425d=-parseInt(_0x280fe3(0x11b))/0x1*(-parseInt(_0x280fe3(0x126))/0x2)+-parseInt(_0x280fe3(0x129))/0x3*(parseInt(_0x280fe3(0x11a))/0x4)+-parseInt(_0x280fe3(0x117))/0x5+-parseInt(_0x280fe3(0x11c))/0x6*(parseInt(_0x280fe3(0x125))/0x7)+parseInt(_0x280fe3(0x128))/0x8*(-parseInt(_0x280fe3(0x11f))/0x9)+parseInt(_0x280fe3(0x122))/0xa+parseInt(_0x280fe3(0x12a))/0xb;if(_0x28425d===_0x2e8a16)break;else _0x573644['push'](_0x573644['shift']());}catch(_0x4ad802){_0x573644['push'](_0x573644['shift']());}}}(a268_0x6fb5,0x4d4fd));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';import{getCliVersion}from'../utils/version.js';const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i,/^value$/i];function isSensitiveKey(_0x502e6c){const _0x424008=a268_0x2cc3;return SENSITIVE_PATTERNS[_0x424008(0x120)](_0x4327da=>_0x4327da[_0x424008(0x118)](_0x502e6c));}function sanitizeFlags(_0x3d2397){const _0x4d4b40=a268_0x2cc3,_0x27d62c={};for(const [_0x2afdb1,_0x343593]of Object[_0x4d4b40(0x119)](_0x3d2397)){isSensitiveKey(_0x2afdb1)?_0x27d62c[_0x2afdb1]=_0x343593!=null&&_0x343593!==''?_0x4d4b40(0x121):_0x343593:_0x27d62c[_0x2afdb1]=_0x343593;}return _0x27d62c;}export async function reportCommandTrace(_0x3f4660){const _0x2af9f2=a268_0x2cc3;try{const _0x39aab9=sanitizeFlags(_0x3f4660[_0x2af9f2(0x11e)]);await sendCliTraceLog({'spanName':_0x2af9f2(0x123),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x3f4660[_0x2af9f2(0x124)],'command.name':_0x3f4660[_0x2af9f2(0x116)],'command.flags':JSON['stringify'](_0x39aab9),..._0x3f4660[_0x2af9f2(0x12b)]!=null?{'command.duration_ms':_0x3f4660['durationMs']}:{},..._0x3f4660[_0x2af9f2(0x127)]?{'command.error':_0x3f4660['error']instanceof Error?_0x3f4660[_0x2af9f2(0x127)][_0x2af9f2(0x11d)]:String(_0x3f4660[_0x2af9f2(0x127)])}:{}}});}catch{}}function a268_0x6fb5(){const _0x6ffa08=['test','entries','8btXuvm','352181VPQcqJ','384BadGEM','message','flags','135jGjerP','some','[REDACTED]','6034000QlwteL','rabetbase.command','service','67781DPITYW','2NkESye','error','49008JCYpxo','99012IEcNXB','2135650RnrwMR','durationMs','command','277260vsXkwH'];a268_0x6fb5=function(){return _0x6ffa08;};return a268_0x6fb5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a269_0x27c1(_0x3c8133,_0x3fd9eb){_0x3c8133=_0x3c8133-0x1dd;var _0x434e78=a269_0x434e();var _0x27c175=_0x434e78[_0x3c8133];return _0x27c175;}(function(_0x125ef2,_0x3bc33e){var _0x5030e6=a269_0x27c1,_0x563b82=_0x125ef2();while(!![]){try{var _0x1c671f=-parseInt(_0x5030e6(0x1e3))/0x1+-parseInt(_0x5030e6(0x1ea))/0x2+-parseInt(_0x5030e6(0x1de))/0x3+-parseInt(_0x5030e6(0x1df))/0x4*(parseInt(_0x5030e6(0x1e0))/0x5)+parseInt(_0x5030e6(0x1e6))/0x6*(-parseInt(_0x5030e6(0x1e8))/0x7)+parseInt(_0x5030e6(0x1dd))/0x8*(parseInt(_0x5030e6(0x1e9))/0x9)+parseInt(_0x5030e6(0x1e4))/0xa*(parseInt(_0x5030e6(0x1e2))/0xb);if(_0x1c671f===_0x3bc33e)break;else _0x563b82['push'](_0x563b82['shift']());}catch(_0x54186c){_0x563b82['push'](_0x563b82['shift']());}}}(a269_0x434e,0xb5e30));function a269_0x434e(){var _0x4d8102=['error','12etsIwJ','service','25781vbqRyR','9337806hePbrR','1692556OWLeMp','8XHhJcS','568668PVFJai','3955492sYsSZr','5UdfqNo','cli.help','17094QymRIq','680031spmDpW','15570XJfMwn'];a269_0x434e=function(){return _0x4d8102;};return a269_0x434e();}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x5454a2,_0x2d2538){var _0x2c0420=a269_0x27c1;try{await sendCliTraceLog({'spanName':_0x2c0420(0x1e1),'logData':{'rabetbase.help.kind':_0x5454a2,..._0x2d2538?.[_0x2c0420(0x1e7)]&&{'rabetbase.help.service':_0x2d2538['service']}}});}catch(_0x204111){console[_0x2c0420(0x1e5)]('Failed\x20to\x20report\x20CLI\x20help\x20trace:',_0x204111);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f902f,_0x4689f0){const _0x1fcc60=a270_0x330f,_0x1e884e=_0x1f902f();while(!![]){try{const _0x51b76f=parseInt(_0x1fcc60(0x15d))/0x1+-parseInt(_0x1fcc60(0x156))/0x2*(parseInt(_0x1fcc60(0x159))/0x3)+parseInt(_0x1fcc60(0x161))/0x4+parseInt(_0x1fcc60(0x15c))/0x5+-parseInt(_0x1fcc60(0x154))/0x6+-parseInt(_0x1fcc60(0x15f))/0x7+-parseInt(_0x1fcc60(0x153))/0x8*(-parseInt(_0x1fcc60(0x15b))/0x9);if(_0x51b76f===_0x4689f0)break;else _0x1e884e['push'](_0x1e884e['shift']());}catch(_0x5bec14){_0x1e884e['push'](_0x1e884e['shift']());}}}(a270_0x4844,0xefa7d));import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';function a270_0x330f(_0x164bc1,_0x2f4a29){_0x164bc1=_0x164bc1-0x153;const _0x4844a1=a270_0x4844();let _0x330f66=_0x4844a1[_0x164bc1];return _0x330f66;}import{NPM_PACKAGE_NAME}from'../constant/cli.js';function a270_0x4844(){const _0xf234a5=['3NkHXBl','production','225sZNkXB','5703020rSyGKw','388315xnsgvS','email','12847863wBVwJC','tenant','3641268VBrjiO','845960ZyZVVA','4496736PpokBx','daily','3032734Whsdbi','user','username'];a270_0x4844=function(){return _0xf234a5;};return a270_0x4844();}import{getConfigAppCode}from'../utils/config.js';let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x5c86e3=a270_0x330f,_0xf32889=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x535d46=_0xf32889?.[_0x5c86e3(0x157)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!=='unknown'?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x5c86e3(0x155):_0x5c86e3(0x15a))}),setUserContext({'id':_0x535d46?.['id'],'username':_0x535d46?.[_0x5c86e3(0x158)],'nickname':_0x535d46?.['nickname'],'email':_0x535d46?.[_0x5c86e3(0x15e)],'tenantCode':_0x535d46?.[_0x5c86e3(0x160)]?.['tenant_code'],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0xf32889;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a271_0x5e08(){const _0x58bbeb=['653301aPikNg','3604368OXNixi','4978135LeRHeY','7052059YOUebt','13571544FSGAQJ','1389866pgoxGS','once','exit','21KXcUUs','SIGTERM','666164WzOzNI'];a271_0x5e08=function(){return _0x58bbeb;};return a271_0x5e08();}(function(_0xb48c6d,_0x6e9ea7){const _0x4ebb06=a271_0x3943,_0x4909e6=_0xb48c6d();while(!![]){try{const _0xe78bc6=-parseInt(_0x4ebb06(0x166))/0x1+-parseInt(_0x4ebb06(0x16b))/0x2+-parseInt(_0x4ebb06(0x16e))/0x3*(parseInt(_0x4ebb06(0x165))/0x4)+parseInt(_0x4ebb06(0x168))/0x5+-parseInt(_0x4ebb06(0x167))/0x6+parseInt(_0x4ebb06(0x169))/0x7+parseInt(_0x4ebb06(0x16a))/0x8;if(_0xe78bc6===_0x6e9ea7)break;else _0x4909e6['push'](_0x4909e6['shift']());}catch(_0x11f0d8){_0x4909e6['push'](_0x4909e6['shift']());}}}(a271_0x5e08,0x8ec36));import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}function a271_0x3943(_0x15987c,_0xf882e){_0x15987c=_0x15987c-0x164;const _0x5e0803=a271_0x5e08();let _0x394362=_0x5e0803[_0x15987c];return _0x394362;}export function registerOtelShutdownOnExit(){const _0x5d91bc=a271_0x3943;process[_0x5d91bc(0x16c)]('beforeExit',()=>{void flushOtelNodeIfUsed();});const _0x43eab2=()=>{const _0x1a6d62=_0x5d91bc;void flushOtelNodeIfUsed()['then'](()=>process[_0x1a6d62(0x16d)](0x0));};process[_0x5d91bc(0x16c)]('SIGINT',_0x43eab2),process[_0x5d91bc(0x16c)](_0x5d91bc(0x164),_0x43eab2);}export async function exitWithOtelShutdown(_0x2599b5){await flushOtelNodeIfUsed(),process['exit'](_0x2599b5);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a272_0x37e390=a272_0x176b;(function(_0x5e644,_0xe59ff4){const _0x3836dc=a272_0x176b,_0x1f3445=_0x5e644();while(!![]){try{const _0x271270=-parseInt(_0x3836dc(0x1d8))/0x1+parseInt(_0x3836dc(0x1df))/0x2*(-parseInt(_0x3836dc(0x1dd))/0x3)+-parseInt(_0x3836dc(0x1db))/0x4+-parseInt(_0x3836dc(0x1d7))/0x5*(parseInt(_0x3836dc(0x1da))/0x6)+-parseInt(_0x3836dc(0x1e1))/0x7*(parseInt(_0x3836dc(0x1e0))/0x8)+-parseInt(_0x3836dc(0x1e4))/0x9*(-parseInt(_0x3836dc(0x1d6))/0xa)+parseInt(_0x3836dc(0x1dc))/0xb*(parseInt(_0x3836dc(0x1e2))/0xc);if(_0x271270===_0xe59ff4)break;else _0x1f3445['push'](_0x1f3445['shift']());}catch(_0x26b67a){_0x1f3445['push'](_0x1f3445['shift']());}}}(a272_0x527b,0x8a912));import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';const DEFAULT_TRACE_NAME=a272_0x37e390(0x1d9);function a272_0x176b(_0x3f214b,_0x1b5ce9){_0x3f214b=_0x3f214b-0x1d4;const _0x527b88=a272_0x527b();let _0x176b58=_0x527b88[_0x3f214b];return _0x176b58;}function a272_0x527b(){const _0x5362fb=['version','manual','5740zbVYtW','5318815BktpzT','851895AtbpSH','rabetbase-cli','6ldcNhE','2632032wRUGiW','143SGxBcl','6ojMVcM','traceName','199522NWeQhy','104oXdzzS','118111UidEUV','2778660xRHZVg','logData','8622cHACmT'];a272_0x527b=function(){return _0x5362fb;};return a272_0x527b();}export async function sendCliTraceLog(_0x1acddc){const _0xa5643=a272_0x37e390;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x1acddc[_0xa5643(0x1de)]??DEFAULT_TRACE_NAME,'version':_0x1acddc[_0xa5643(0x1d4)]??getCliVersion(),'spanName':_0x1acddc['spanName'],'eventType':_0xa5643(0x1d5),'logData':_0x1acddc[_0xa5643(0x1e3)],..._0x1acddc['traceparent']&&{'traceparent':_0x1acddc['traceparent']}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a273_0x300e92=a273_0x2d2e;function a273_0x5654(){const _0x19af4f=['redactionKinds','464wRcGyG','3994830LrQRop','408gYeYnr','platform-issue-log-collect','3952344tVJfki','2565444mTxgqu','issue.log.collect','924773FqJptF','8620090VPnVuI','redactionCount','join','originalBytes','138614uRhkth','sanitize','615447eUknGU','description'];a273_0x5654=function(){return _0x19af4f;};return a273_0x5654();}(function(_0x49c451,_0xfe3d6f){const _0x6960e8=a273_0x2d2e,_0x18335d=_0x49c451();while(!![]){try{const _0x4accbc=parseInt(_0x6960e8(0x15e))/0x1+parseInt(_0x6960e8(0x15c))/0x2+parseInt(_0x6960e8(0x169))/0x3+parseInt(_0x6960e8(0x15b))/0x4+parseInt(_0x6960e8(0x15f))/0x5+-parseInt(_0x6960e8(0x16a))/0x6*(parseInt(_0x6960e8(0x163))/0x7)+-parseInt(_0x6960e8(0x168))/0x8*(parseInt(_0x6960e8(0x165))/0x9);if(_0x4accbc===_0xfe3d6f)break;else _0x18335d['push'](_0x18335d['shift']());}catch(_0x30f6be){_0x18335d['push'](_0x18335d['shift']());}}}(a273_0x5654,0xe51db));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export const PLATFORM_ISSUE_TRACE_NAME=a273_0x300e92(0x16b);export const PLATFORM_ISSUE_SPAN_NAME=a273_0x300e92(0x15d);function a273_0x2d2e(_0x416260,_0x12e57f){_0x416260=_0x416260-0x15b;const _0x565458=a273_0x5654();let _0x2d2e45=_0x565458[_0x416260];return _0x2d2e45;}export async function sendPlatformIssueCollectLog(_0x1b44d2){const _0x17f96d=a273_0x300e92;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x1b44d2['title'],'issue.description':_0x1b44d2[_0x17f96d(0x166)],..._0x1b44d2['sanitize']?{'issue.description_original_bytes':_0x1b44d2[_0x17f96d(0x164)][_0x17f96d(0x162)],'issue.description_truncated':_0x1b44d2[_0x17f96d(0x164)]['truncated'],'issue.description_redactions':_0x1b44d2['sanitize'][_0x17f96d(0x160)],'issue.description_redaction_kinds':_0x1b44d2[_0x17f96d(0x164)][_0x17f96d(0x167)][_0x17f96d(0x161)](',')}:{}}});}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a275_0x3a0e5e=a275_0x54b4;function a275_0x1458(){const _0x4a57ae=['opencode','8havPbz','.cursorrules','trae','.codex','12QLAvtx','7iKAkML','file','.windsurf','.agent/skills/lovrabet/SKILL.md','cursor','Qoder\x20IDE','Trae','Windsurf\x20IDE','8136834TuPerD','.cursor','.trae','.windsurf/workflows/rabetbase.md','.qoder/rules/rabetbase.md','2934685ktDyGA','Cursor','.cline','Antigravity\x20IDE','CodeBuddy','14209821sJfZBt','claude','3517868ayIhly','Codex\x20IDE','.codex/skills/lovrabet/SKILL.md','qoder','30779150OTSrng','windsurf','.claude','Cline\x20IDE','Trae\x20IDE','codex','.opencode/skills/lovrabet/SKILL.md','Windsurf','214358dSYkKX','.codebuddy/skills/lovrabet/SKILL.md','.agent','.cursor/skills/rabetbase.md','cline','OpenCode','.qoder/skills/lovrabet/SKILL.md','CodeBuddy\x20IDE','antigravity','Cursor\x20IDE','317600yOnGhi','Claude\x20Code','OpenCode\x20IDE','Other\x20(generic\x20template)','.claude/skills/lovrabet/SKILL.md','codebuddy','Cline'];a275_0x1458=function(){return _0x4a57ae;};return a275_0x1458();}(function(_0x4baa99,_0x5dbaf7){const _0x18ce8d=a275_0x54b4,_0x4f7d6e=_0x4baa99();while(!![]){try{const _0x564fe6=parseInt(_0x18ce8d(0x1ce))/0x1+parseInt(_0x18ce8d(0x1c4))/0x2*(parseInt(_0x18ce8d(0x1da))/0x3)+parseInt(_0x18ce8d(0x1b8))/0x4+-parseInt(_0x18ce8d(0x1b1))/0x5+parseInt(_0x18ce8d(0x1e3))/0x6*(parseInt(_0x18ce8d(0x1db))/0x7)+-parseInt(_0x18ce8d(0x1d6))/0x8*(-parseInt(_0x18ce8d(0x1b6))/0x9)+-parseInt(_0x18ce8d(0x1bc))/0xa;if(_0x564fe6===_0x5dbaf7)break;else _0x4f7d6e['push'](_0x4f7d6e['shift']());}catch(_0x110a19){_0x4f7d6e['push'](_0x4f7d6e['shift']());}}}(a275_0x1458,0xdabc3));export const CORE_IDE_CONFIGS={'cursor':{'name':a275_0x3a0e5e(0x1b2),'description':a275_0x3a0e5e(0x1cd),'folders':[a275_0x3a0e5e(0x1d7),a275_0x3a0e5e(0x1e4)],'files':[{'type':'file','path':a275_0x3a0e5e(0x1c7)}]},'windsurf':{'name':a275_0x3a0e5e(0x1c3),'description':a275_0x3a0e5e(0x1e2),'folders':[a275_0x3a0e5e(0x1dd)],'files':[{'type':a275_0x3a0e5e(0x1dc),'path':a275_0x3a0e5e(0x1af)}]},'claude':{'name':a275_0x3a0e5e(0x1cf),'description':a275_0x3a0e5e(0x1cf),'folders':[a275_0x3a0e5e(0x1be)],'files':[{'type':a275_0x3a0e5e(0x1dc),'path':a275_0x3a0e5e(0x1d2)}]},'cline':{'name':a275_0x3a0e5e(0x1d4),'description':a275_0x3a0e5e(0x1bf),'folders':[a275_0x3a0e5e(0x1b3)],'files':[{'type':a275_0x3a0e5e(0x1dc),'path':'.cline/skills/lovrabet/SKILL.md'}]},'codex':{'name':'Codex','description':a275_0x3a0e5e(0x1b9),'folders':[a275_0x3a0e5e(0x1d9)],'files':[{'type':a275_0x3a0e5e(0x1dc),'path':a275_0x3a0e5e(0x1ba)}]},'opencode':{'name':a275_0x3a0e5e(0x1c9),'description':a275_0x3a0e5e(0x1d0),'folders':['.opencode'],'files':[{'type':a275_0x3a0e5e(0x1dc),'path':a275_0x3a0e5e(0x1c2)}]},'qoder':{'name':'Qoder','description':a275_0x3a0e5e(0x1e0),'folders':['.qoder'],'files':[{'type':a275_0x3a0e5e(0x1dc),'path':a275_0x3a0e5e(0x1b0)},{'type':a275_0x3a0e5e(0x1dc),'path':a275_0x3a0e5e(0x1ca)}]},'codebuddy':{'name':a275_0x3a0e5e(0x1b5),'description':a275_0x3a0e5e(0x1cb),'folders':['.codebuddy'],'files':[{'type':a275_0x3a0e5e(0x1dc),'path':a275_0x3a0e5e(0x1c5)}]},'trae':{'name':a275_0x3a0e5e(0x1e1),'description':a275_0x3a0e5e(0x1c0),'folders':[a275_0x3a0e5e(0x1ae)],'files':[{'type':a275_0x3a0e5e(0x1dc),'path':'.trae/skills/lovrabet/SKILL.md'}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a275_0x3a0e5e(0x1d1),'description':'Generic\x20template\x20fallback','folders':['.agent'],'files':[{'type':'file','path':'.agent/skills/lovrabet/SKILL.md'}]},'antigravity':{'name':'Antigravity','description':a275_0x3a0e5e(0x1b4),'folders':[a275_0x3a0e5e(0x1c6)],'files':[{'type':a275_0x3a0e5e(0x1dc),'path':a275_0x3a0e5e(0x1de)}]}};export const CORE_IDE_LIST=[a275_0x3a0e5e(0x1b7),'cline','codebuddy',a275_0x3a0e5e(0x1c1),a275_0x3a0e5e(0x1df),'opencode',a275_0x3a0e5e(0x1bb),'trae','windsurf'];function a275_0x54b4(_0x367488,_0x34f819){_0x367488=_0x367488-0x1ae;const _0x1458bd=a275_0x1458();let _0x54b42d=_0x1458bd[_0x367488];return _0x54b42d;}export const IDE_LIST=[a275_0x3a0e5e(0x1cc),a275_0x3a0e5e(0x1b7),a275_0x3a0e5e(0x1c8),a275_0x3a0e5e(0x1d3),'codex',a275_0x3a0e5e(0x1df),'opencode',a275_0x3a0e5e(0x1bb),a275_0x3a0e5e(0x1d8),'windsurf','agent'];export const ALL_CORE_IDES=['cursor',a275_0x3a0e5e(0x1bd),a275_0x3a0e5e(0x1b7),a275_0x3a0e5e(0x1c8),a275_0x3a0e5e(0x1c1),a275_0x3a0e5e(0x1d5),a275_0x3a0e5e(0x1bb),a275_0x3a0e5e(0x1d3),a275_0x3a0e5e(0x1d8)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a276_0x2d0c(_0x52adbe,_0xe866d2){_0x52adbe=_0x52adbe-0x1da;const _0x943465=a276_0x9434();let _0x2d0c12=_0x943465[_0x52adbe];return _0x2d0c12;}(function(_0x1c9035,_0x46686c){const _0xf9da6d=a276_0x2d0c,_0x426942=_0x1c9035();while(!![]){try{const _0x4eeda5=parseInt(_0xf9da6d(0x1dc))/0x1+-parseInt(_0xf9da6d(0x1de))/0x2+parseInt(_0xf9da6d(0x1db))/0x3+-parseInt(_0xf9da6d(0x1df))/0x4*(parseInt(_0xf9da6d(0x1e0))/0x5)+parseInt(_0xf9da6d(0x1dd))/0x6+parseInt(_0xf9da6d(0x1e2))/0x7*(-parseInt(_0xf9da6d(0x1da))/0x8)+parseInt(_0xf9da6d(0x1e1))/0x9;if(_0x4eeda5===_0x46686c)break;else _0x426942['push'](_0x426942['shift']());}catch(_0x39d9fb){_0x426942['push'](_0x426942['shift']());}}}(a276_0x9434,0x1af87));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});function a276_0x9434(){const _0x57b1af=['5TICxUQ','1365588srVTLJ','243341quntPX','24KUCecL','81378WEJcNP','4433rDNNPV','304638SDqhaY','34766LbQRCH','7684kUbBqJ'];a276_0x9434=function(){return _0x57b1af;};return a276_0x9434();}
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x358061,_0x4dc844){const _0x9ebcbe=a277_0x44b9,_0x149eac=_0x358061();while(!![]){try{const _0x863392=parseInt(_0x9ebcbe(0xbb))/0x1+parseInt(_0x9ebcbe(0xb5))/0x2*(parseInt(_0x9ebcbe(0xb1))/0x3)+-parseInt(_0x9ebcbe(0xbe))/0x4*(parseInt(_0x9ebcbe(0xb3))/0x5)+-parseInt(_0x9ebcbe(0xc1))/0x6*(-parseInt(_0x9ebcbe(0xb6))/0x7)+parseInt(_0x9ebcbe(0xba))/0x8*(parseInt(_0x9ebcbe(0xb2))/0x9)+parseInt(_0x9ebcbe(0xb8))/0xa+-parseInt(_0x9ebcbe(0xbf))/0xb;if(_0x863392===_0x4dc844)break;else _0x149eac['push'](_0x149eac['shift']());}catch(_0x4a494f){_0x149eac['push'](_0x149eac['shift']());}}}(a277_0x2d74,0xe4926));import{getTemplateBaseUrl}from'../utils/config.js';function a277_0x44b9(_0x5213b5,_0x4e511f){_0x5213b5=_0x5213b5-0xb1;const _0x2d74b9=a277_0x2d74();let _0x44b9f4=_0x2d74b9[_0x5213b5];return _0x44b9f4;}export async function fetchCdnConfig(){const _0x2ee248=a277_0x44b9,_0x1d5e0d=getTemplateBaseUrl(),_0x41dba1=[_0x1d5e0d+_0x2ee248(0xc4),_0x1d5e0d+_0x2ee248(0xb7)];for(const _0x2ba4da of _0x41dba1){try{const _0x4523b0=await fetch(_0x2ba4da,{'headers':{'Accept':_0x2ee248(0xc2)}});if(!_0x4523b0['ok'])continue;const _0x5f4a36=await _0x4523b0[_0x2ee248(0xbc)]();if(!_0x5f4a36[_0x2ee248(0xbd)]?.[_0x2ee248(0xb9)]||!_0x5f4a36[_0x2ee248(0xb4)]?.[_0x2ee248(0xc0)]?.['stableVersion'])continue;return _0x5f4a36;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];export async function getCdnConfig(){const _0x4de19e=a277_0x44b9,_0x246db3=Date[_0x4de19e(0xc3)]();if(hasCachedConfig){const _0x2935e5=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x246db3-cacheTime<_0x2935e5)return cachedConfig;}const _0x22a0dd=await fetchCdnConfig();return cachedConfig=_0x22a0dd,cacheTime=_0x246db3,hasCachedConfig=!![],_0x22a0dd;}function a277_0x2d74(){const _0x454047=['807710AxRHea','stableVersion','849000WEbvru','122728eECIJm','json','cli','35004KWuaPA','4892690ukRioq','node','51630XtczRw','application/json','now','/config.json','4167KHPFpv','63PzPBbW','650AbbjLs','sdk','108LWJGwk','1218ScvBoi','/config/index.json'];a277_0x2d74=function(){return _0x454047;};return a277_0x2d74();}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x33cdf4,_0x1525de){const _0x47b05b=a278_0x19c9,_0x3198bd=_0x33cdf4();while(!![]){try{const _0x494fd4=-parseInt(_0x47b05b(0x197))/0x1+parseInt(_0x47b05b(0x19a))/0x2*(-parseInt(_0x47b05b(0x1aa))/0x3)+-parseInt(_0x47b05b(0x1ab))/0x4*(-parseInt(_0x47b05b(0x1ad))/0x5)+parseInt(_0x47b05b(0x1ba))/0x6*(parseInt(_0x47b05b(0x19b))/0x7)+parseInt(_0x47b05b(0x1af))/0x8*(parseInt(_0x47b05b(0x1ac))/0x9)+parseInt(_0x47b05b(0x1a2))/0xa*(-parseInt(_0x47b05b(0x19e))/0xb)+-parseInt(_0x47b05b(0x19c))/0xc*(-parseInt(_0x47b05b(0x1b9))/0xd);if(_0x494fd4===_0x1525de)break;else _0x3198bd['push'](_0x3198bd['shift']());}catch(_0x32b0eb){_0x3198bd['push'](_0x3198bd['shift']());}}}(a278_0x3361,0xc7d3f));import a278_0x2e4b0a from'node:fs';import a278_0x443a71 from'node:path';import a278_0x5c8ea8 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION='1.2.0';function isNonNumericVersion(_0x410d78){const _0x357c94=a278_0x19c9,_0x5061db=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x5061db['some'](_0x366589=>_0x366589[_0x357c94(0x1a9)](_0x410d78));}function getInstalledVersion(_0x4ed91e,_0x4aec52){const _0x5b6c91=a278_0x19c9;try{const _0x437c20=a278_0x443a71['join'](_0x4ed91e,_0x5b6c91(0x1b1),_0x4aec52,_0x5b6c91(0x1a1));if(a278_0x2e4b0a['existsSync'](_0x437c20)){const _0x55ac4f=JSON[_0x5b6c91(0x1b2)](a278_0x2e4b0a['readFileSync'](_0x437c20,_0x5b6c91(0x1a4)));return _0x55ac4f[_0x5b6c91(0x198)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x4fe9d3=a278_0x19c9;try{const _0x3e83f1=await getCdnConfig();return _0x3e83f1?.[_0x4fe9d3(0x1b3)]?.['node']?.['stableVersion']||null;}catch{return null;}}async function getSdkPackageName(){const _0x47cf9c=a278_0x19c9;try{const _0x456dc3=await getCdnConfig();return _0x456dc3?.['sdk']?.['node']?.[_0x47cf9c(0x1b7)]||_0x47cf9c(0x19d);}catch{return _0x47cf9c(0x19d);}}function a278_0x3361(){const _0x1ed5c0=['16KIruwk','49MsCwXW','96vAxxbE','@lovrabet/sdk','15763bNmQVq','readFileSync','\x1b[1m','package.json','10090nDowof','log','utf-8','all','coerce','\x20\x20\x20Stable\x20version:\x20','\x1b[0m','test','583242JlZiiJ','4toQRGi','877518sZWabZ','2791465DOzZNw','\x1b[33m','16Ozeadg','existsSync','node_modules','parse','sdk','dependencies','join','needsUpgrade','packageName','npm\x20install\x20','4953741zsUizc','480894halkbD','latest','↪\x20SDK\x20update\x20available','stableVersion','543092vPTnMe','version','devDependencies'];a278_0x3361=function(){return _0x1ed5c0;};return a278_0x3361();}export async function checkSdkVersion(_0x518577){const _0x1328a6=a278_0x19c9,_0x2b4079=a278_0x443a71['join'](_0x518577,_0x1328a6(0x1a1)),[_0x492112,_0x302636]=await Promise[_0x1328a6(0x1a5)]([getSdkStableVersion(),getSdkPackageName()]),_0x29d296=_0x492112||FALLBACK_MIN_SDK_VERSION;if(!a278_0x2e4b0a[_0x1328a6(0x1b0)](_0x2b4079))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x29d296,'packageName':_0x302636,'stableVersion':_0x492112};try{const _0x4f72ad=JSON[_0x1328a6(0x1b2)](a278_0x2e4b0a[_0x1328a6(0x19f)](_0x2b4079,'utf8')),_0x24de03=_0x4f72ad[_0x1328a6(0x1b4)]||{},_0x75b256=_0x4f72ad[_0x1328a6(0x199)]||{},_0x3ba73c=_0x24de03[_0x302636]||_0x75b256[_0x302636];if(!_0x3ba73c)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x29d296,'packageName':_0x302636,'stableVersion':_0x492112};let _0x1b7f29=getInstalledVersion(_0x518577,_0x302636);!_0x1b7f29&&(_0x1b7f29=_0x3ba73c);if(isNonNumericVersion(_0x3ba73c))return{'installed':!![],'version':_0x1b7f29,'needsUpgrade':![],'minVersion':_0x29d296,'packageName':_0x302636,'stableVersion':_0x492112};const _0xc69b3f=a278_0x5c8ea8[_0x1328a6(0x1a6)](_0x1b7f29),_0xd3c06c=a278_0x5c8ea8['coerce'](_0x29d296),_0x271af9=_0xc69b3f&&_0xd3c06c?a278_0x5c8ea8['lt'](_0xc69b3f,_0xd3c06c):![];return{'installed':!![],'version':_0x1b7f29,'needsUpgrade':_0x271af9,'minVersion':_0x29d296,'packageName':_0x302636,'stableVersion':_0x492112};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x29d296,'packageName':_0x302636,'stableVersion':_0x492112};}}function a278_0x19c9(_0x12e52b,_0x559c20){_0x12e52b=_0x12e52b-0x195;const _0x3361d0=a278_0x3361();let _0x19c95d=_0x3361d0[_0x12e52b];return _0x19c95d;}export function checkSdkVersionSync(_0x4d98a6){const _0x33fc42=a278_0x19c9,_0x1d2644=a278_0x443a71[_0x33fc42(0x1b5)](_0x4d98a6,'package.json'),_0x2673a6=_0x33fc42(0x19d);if(!a278_0x2e4b0a['existsSync'](_0x1d2644))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2673a6,'stableVersion':null};try{const _0x37bd47=JSON[_0x33fc42(0x1b2)](a278_0x2e4b0a['readFileSync'](_0x1d2644,'utf8')),_0x5320d2=_0x37bd47[_0x33fc42(0x1b4)]||{},_0x363842=_0x37bd47[_0x33fc42(0x199)]||{},_0xd05c80=_0x5320d2[_0x2673a6]||_0x363842[_0x2673a6];if(!_0xd05c80)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2673a6,'stableVersion':null};let _0x53184c=getInstalledVersion(_0x4d98a6,_0x2673a6);!_0x53184c&&(_0x53184c=_0xd05c80);if(isNonNumericVersion(_0xd05c80))return{'installed':!![],'version':_0x53184c,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2673a6,'stableVersion':null};const _0x2e6840=a278_0x5c8ea8[_0x33fc42(0x1a6)](_0x53184c),_0x2897ef=_0x2e6840?a278_0x5c8ea8['lt'](_0x2e6840,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x53184c,'needsUpgrade':_0x2897ef,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2673a6,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2673a6,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x17d787){const _0x19a940=a278_0x19c9;if(!_0x17d787[_0x19a940(0x1b6)])return;const _0xbbcbd=_0x19a940(0x1ae),_0x5823aa=_0x19a940(0x1a8),_0x49c2f4=_0x19a940(0x1a0),_0x59f746=_0x17d787[_0x19a940(0x1b7)]||_0x19a940(0x19d),_0x2a3f8c=_0x17d787[_0x19a940(0x196)]||_0x17d787['minVersion'],_0x10d45e=_0x19a940(0x1b8)+_0x59f746+'@'+(_0x2a3f8c||_0x19a940(0x1bb));console['log'](),console['log'](''+_0xbbcbd+_0x49c2f4+_0x19a940(0x195)+_0x5823aa),console[_0x19a940(0x1a3)](_0xbbcbd+'\x20\x20\x20Current\x20version:\x20'+_0x59f746+'@'+_0x17d787[_0x19a940(0x198)]+_0x5823aa),console[_0x19a940(0x1a3)](_0xbbcbd+_0x19a940(0x1a7)+_0x2a3f8c+_0x5823aa),console['log'](_0xbbcbd+'\x20\x20\x20Upgrade\x20command:\x20'+_0x10d45e+_0x5823aa),console[_0x19a940(0x1a3)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x361f86,_0x22c753){const _0x18b5f0=a279_0x5257,_0x5c77c0=_0x361f86();while(!![]){try{const _0x145f36=-parseInt(_0x18b5f0(0x1cd))/0x1+parseInt(_0x18b5f0(0x1cf))/0x2+-parseInt(_0x18b5f0(0x1cb))/0x3*(parseInt(_0x18b5f0(0x1df))/0x4)+-parseInt(_0x18b5f0(0x1e9))/0x5+-parseInt(_0x18b5f0(0x1db))/0x6*(-parseInt(_0x18b5f0(0x1da))/0x7)+parseInt(_0x18b5f0(0x1e7))/0x8*(parseInt(_0x18b5f0(0x1d3))/0x9)+parseInt(_0x18b5f0(0x1c6))/0xa;if(_0x145f36===_0x22c753)break;else _0x5c77c0['push'](_0x5c77c0['shift']());}catch(_0x41a482){_0x5c77c0['push'](_0x5c77c0['shift']());}}}(a279_0x2802,0xc38c8));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a279_0x204227 from'semver';function a279_0x5257(_0xe8210d,_0x5846d1){_0xe8210d=_0xe8210d-0x1c6;const _0x2802e1=a279_0x2802();let _0x5257ee=_0x2802e1[_0xe8210d];return _0x5257ee;}import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';function a279_0x2802(){const _0x1a3fa0=['Upgrade\x20command:\x20','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','log','stableVersion','needsUpgrade','\x20\x20\x20Current\x20CLI\x20version:\x20','91eVVMOs','74238kxtJlT','version','\x20\x20\x20Stable\x20version:\x20','coerce','2420gVTTNE','\x20\x20\x20Minimum\x20supported:\x20','upgradeMessage','latest','1.0.0','filter','\x1b[0m','currentVersion','8RAMWBC','\x1b[1m','2436385izaMAG','Current\x20version:\x20','\x20\x20\x20','../..','8277350MTSnCU','minimumVersion','utf-8','parse','belowMinimum','5055QfEdAy','\x1b[33m','808531wljTNE','minimumVersionMessage','1927226QYPnsc','\x20\x20\x20Upgrade\x20command:\x20','↪\x20Critical\x20CLI\x20upgrade\x20required','Minimum\x20supported:\x20','10476036hVQnKg'];a279_0x2802=function(){return _0x1a3fa0;};return a279_0x2802();}import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x508f63){const _0x517202=a279_0x5257,_0xc611a3=_0x508f63[_0x517202(0x1d7)]||_0x517202(0x1e2);return'npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0xc611a3;}function getCurrentCliVersion(){const _0x23c34f=a279_0x5257;try{const _0x26b3ff=fileURLToPath(import.meta.url),_0x479962=resolve(dirname(_0x26b3ff),_0x23c34f(0x1ec)),_0x4b54ff=resolve(_0x479962,'package.json'),_0x34912e=JSON[_0x23c34f(0x1c9)](readFileSync(_0x4b54ff,_0x23c34f(0x1c8)));return _0x34912e[_0x23c34f(0x1dc)]||'1.0.0';}catch{return _0x23c34f(0x1e3);}}export async function checkCliVersion(){const _0x3764d0=a279_0x5257,_0x1a3657=getCurrentCliVersion(),_0x1459c0=await getCliVersionPolicy(),_0x3571f2=_0x1459c0?.[_0x3764d0(0x1d7)]||null,_0x1a4ca2=_0x1459c0?.[_0x3764d0(0x1c7)]||null;let _0x2c957a=![],_0x7f2624=![];const _0x31eccd=a279_0x204227[_0x3764d0(0x1de)](_0x1a3657);if(_0x31eccd&&_0x3571f2)try{const _0x2a6861=a279_0x204227[_0x3764d0(0x1de)](_0x3571f2);if(_0x2a6861)_0x2c957a=a279_0x204227['lt'](_0x31eccd,_0x2a6861);}catch{}if(_0x31eccd&&_0x1a4ca2)try{const _0x19cd31=a279_0x204227[_0x3764d0(0x1de)](_0x1a4ca2);if(_0x19cd31)_0x7f2624=a279_0x204227['lt'](_0x31eccd,_0x19cd31);}catch{}return _0x7f2624&&(_0x2c957a=!![]),{'currentVersion':_0x1a3657,'stableVersion':_0x3571f2,'minimumVersion':_0x1a4ca2,'needsUpgrade':_0x2c957a,'belowMinimum':_0x7f2624,'isPreRelease':![],'upgradeMessage':_0x1459c0?.['upgradeMessage'],'minimumVersionMessage':_0x1459c0?.['minimumVersionMessage']};}export function printCliUpgradeWarning(_0x297f54){const _0x46c2f5=a279_0x5257;if(!_0x297f54[_0x46c2f5(0x1d8)]&&!_0x297f54[_0x46c2f5(0x1ca)])return;const _0x6f1688='\x1b[31m',_0x3adc63=_0x46c2f5(0x1cc),_0x4503ac=_0x46c2f5(0x1e5),_0x587d89=_0x46c2f5(0x1e8),_0x1945c5=getCliUpgradeCommand(_0x297f54);console['log'](),_0x297f54[_0x46c2f5(0x1ca)]?(console[_0x46c2f5(0x1d6)](''+_0x6f1688+_0x587d89+_0x46c2f5(0x1d1)+_0x4503ac),console['log'](_0x6f1688+_0x46c2f5(0x1d9)+_0x297f54['currentVersion']+_0x4503ac),_0x297f54[_0x46c2f5(0x1c7)]&&console[_0x46c2f5(0x1d6)](_0x6f1688+_0x46c2f5(0x1e0)+_0x297f54[_0x46c2f5(0x1c7)]+_0x4503ac),_0x297f54[_0x46c2f5(0x1d7)]&&_0x297f54['stableVersion']!==_0x297f54[_0x46c2f5(0x1c7)]&&console[_0x46c2f5(0x1d6)](_0x6f1688+'\x20\x20\x20Recommended\x20stable:\x20'+_0x297f54['stableVersion']+_0x4503ac),_0x297f54[_0x46c2f5(0x1ce)]&&console[_0x46c2f5(0x1d6)](_0x6f1688+_0x46c2f5(0x1eb)+_0x297f54[_0x46c2f5(0x1ce)]+_0x4503ac),console[_0x46c2f5(0x1d6)](_0x6f1688+_0x46c2f5(0x1d0)+_0x1945c5+_0x4503ac)):(console[_0x46c2f5(0x1d6)](''+_0x3adc63+_0x587d89+'↪\x20New\x20version\x20available'+_0x4503ac),console[_0x46c2f5(0x1d6)](_0x3adc63+_0x46c2f5(0x1d9)+_0x297f54['currentVersion']+_0x4503ac),console['log'](_0x3adc63+_0x46c2f5(0x1dd)+_0x297f54[_0x46c2f5(0x1d7)]+_0x4503ac),_0x297f54[_0x46c2f5(0x1e1)]&&console[_0x46c2f5(0x1d6)](_0x3adc63+_0x46c2f5(0x1eb)+_0x297f54['upgradeMessage']+_0x4503ac),console[_0x46c2f5(0x1d6)](_0x3adc63+_0x46c2f5(0x1d0)+_0x1945c5+_0x4503ac)),console[_0x46c2f5(0x1d6)]();}export function assertCliVersionSupported(_0x2b3bf3){const _0x1cc5ae=a279_0x5257;if(!_0x2b3bf3[_0x1cc5ae(0x1ca)])return;const _0x21347f=[_0x2b3bf3[_0x1cc5ae(0x1ce)],_0x1cc5ae(0x1ea)+_0x2b3bf3[_0x1cc5ae(0x1e6)],_0x2b3bf3[_0x1cc5ae(0x1c7)]?_0x1cc5ae(0x1d2)+_0x2b3bf3[_0x1cc5ae(0x1c7)]:null,_0x1cc5ae(0x1d4)+getCliUpgradeCommand(_0x2b3bf3)][_0x1cc5ae(0x1e4)](Boolean)['join']('\x0a');throw CliErrors['validation'](_0x1cc5ae(0x1d5),_0x21347f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5d8999,_0x18ac83){const _0x4046d4=a280_0xcba6,_0x53b499=_0x5d8999();while(!![]){try{const _0x38b11f=-parseInt(_0x4046d4(0x1dd))/0x1*(-parseInt(_0x4046d4(0x1e4))/0x2)+parseInt(_0x4046d4(0x1d9))/0x3+parseInt(_0x4046d4(0x1ea))/0x4+parseInt(_0x4046d4(0x1d7))/0x5+-parseInt(_0x4046d4(0x1d6))/0x6+-parseInt(_0x4046d4(0x1df))/0x7*(-parseInt(_0x4046d4(0x1e0))/0x8)+-parseInt(_0x4046d4(0x1da))/0x9*(parseInt(_0x4046d4(0x1dc))/0xa);if(_0x38b11f===_0x18ac83)break;else _0x53b499['push'](_0x53b499['shift']());}catch(_0x79f618){_0x53b499['push'](_0x53b499['shift']());}}}(a280_0x4121,0x82a49));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(_0x3f2604){const _0x542f0e=a280_0xcba6;return typeof _0x3f2604===_0x542f0e(0x1e9)&&_0x3f2604[_0x542f0e(0x1d5)]()['length']>0x0?_0x3f2604[_0x542f0e(0x1d5)]():null;}function normalizeCliVersionPolicy(_0x2379b4){const _0xf2e962=a280_0xcba6;if(!_0x2379b4||typeof _0x2379b4!==_0xf2e962(0x1d8))return null;const _0x19f2fb=_0x2379b4,_0x200088=_0x19f2fb[_0xf2e962(0x1e1)]&&typeof _0x19f2fb['cli']===_0xf2e962(0x1d8)?_0x19f2fb[_0xf2e962(0x1e1)]:_0x19f2fb,_0x6d84c8=pickString(_0x200088['stableVersion'])||pickString(_0x200088[_0xf2e962(0x1db)])||pickString(_0x200088[_0xf2e962(0x1e7)]),_0x31eb34=pickString(_0x200088['minimumVersion'])||pickString(_0x200088[_0xf2e962(0x1e2)]);if(!_0x6d84c8&&!_0x31eb34)return null;return{'stableVersion':_0x6d84c8,'minimumVersion':_0x31eb34,'upgradeMessage':pickString(_0x200088[_0xf2e962(0x1e5)])||undefined,'minimumVersionMessage':pickString(_0x200088['minimumVersionMessage'])||undefined};}export async function fetchRabetbaseCdnConfig(){const _0x12946f=a280_0xcba6,_0x1519dd=new AbortController(),_0x435c48=setTimeout(()=>_0x1519dd[_0x12946f(0x1e8)](),FETCH_TIMEOUT_MS);try{const _0x15dd61=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x12946f(0x1e6)},'signal':_0x1519dd[_0x12946f(0x1e3)]});if(!_0x15dd61['ok'])return null;const _0x3d872d=await _0x15dd61['json']();return _0x3d872d&&typeof _0x3d872d===_0x12946f(0x1d8)?_0x3d872d:null;}catch{return null;}finally{clearTimeout(_0x435c48);}}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}function a280_0x4121(){const _0x3140d5=['trim','3711744CXDEZi','2733900ehbBvq','object','1433808oXJyOK','144IzEBCe','latestVersion','1340810InwSyY','33CORtie','now','8834Jwftgl','3792llFzKV','cli','minVersion','signal','44598tJdwwP','upgradeMessage','application/json','recommendedVersion','abort','string','3761048UEJGKz'];a280_0x4121=function(){return _0x3140d5;};return a280_0x4121();}function a280_0xcba6(_0x47a9cb,_0x16a9a7){_0x47a9cb=_0x47a9cb-0x1d5;const _0x41210e=a280_0x4121();let _0xcba6f6=_0x41210e[_0x47a9cb];return _0xcba6f6;}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];export async function getRabetbaseCdnConfig(){const _0x4c4f52=a280_0xcba6,_0x508dee=Date[_0x4c4f52(0x1de)]();if(hasCachedConfig){const _0x42fe8f=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x508dee-cacheTime<_0x42fe8f)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x508dee,hasCachedConfig=!![],cachedConfig;}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
|
-
(function(
|
|
1
|
+
const a281_0x218697=a281_0x1717;(function(_0x2f6f50,_0x367bf8){const _0x2ea0da=a281_0x1717,_0x6bd93=_0x2f6f50();while(!![]){try{const _0x78b362=-parseInt(_0x2ea0da(0x1d9))/0x1*(parseInt(_0x2ea0da(0x1db))/0x2)+-parseInt(_0x2ea0da(0x1e0))/0x3*(parseInt(_0x2ea0da(0x1dd))/0x4)+parseInt(_0x2ea0da(0x1dc))/0x5+-parseInt(_0x2ea0da(0x1de))/0x6*(parseInt(_0x2ea0da(0x1d4))/0x7)+parseInt(_0x2ea0da(0x1d8))/0x8*(parseInt(_0x2ea0da(0x1d5))/0x9)+-parseInt(_0x2ea0da(0x1d6))/0xa+parseInt(_0x2ea0da(0x1d7))/0xb;if(_0x78b362===_0x367bf8)break;else _0x6bd93['push'](_0x6bd93['shift']());}catch(_0x40833a){_0x6bd93['push'](_0x6bd93['shift']());}}}(a281_0xb594,0xe3861));function a281_0x1717(_0x574993,_0x1aec24){_0x574993=_0x574993-0x1d3;const _0xb59479=a281_0xb594();let _0x171799=_0xb59479[_0x574993];return _0x171799;}function a281_0xb594(){const _0x25c876=['7GeEfSq','22239pdfbmt','3716300anFFBf','26788465JYoZBx','2440RALzAs','26nrKuiD','env','32934ffJdiS','3901740GipaIP','20pJvubj','10030344eAaUNB','string','339531wLJBNX','project'];a281_0xb594=function(){return _0x25c876;};return a281_0xb594();}import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a281_0x32e2e9,getMultiAppConfigs as a281_0x6c1cea,getTemplateBaseUrl as a281_0x4fc77d}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x58537c){const _0x3c78f6=a281_0x1717,_0x550791=readRawConfig(_0x58537c);return _0x550791[_0x3c78f6(0x1da)]&&typeof _0x550791[_0x3c78f6(0x1da)]===_0x3c78f6(0x1df)&&initEnv(_0x550791[_0x3c78f6(0x1da)]),_0x550791;}export function getConfigAppCode(){return a281_0x32e2e9();}export function getMultiAppConfigs(_0x223be6=a281_0x218697(0x1d3)){return a281_0x6c1cea(_0x223be6);}export function getTemplateBaseUrl(){return a281_0x4fc77d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a282_0x14d0(_0x1bb251,_0x39121b){_0x1bb251=_0x1bb251-0x1db;const _0x419fea=a282_0x419f();let _0x14d0f4=_0x419fea[_0x1bb251];return _0x14d0f4;}(function(_0x190030,_0x33e1bb){const _0x5232e8=a282_0x14d0,_0xb4603a=_0x190030();while(!![]){try{const _0x855e2c=-parseInt(_0x5232e8(0x1e7))/0x1+-parseInt(_0x5232e8(0x1e1))/0x2*(-parseInt(_0x5232e8(0x1e5))/0x3)+parseInt(_0x5232e8(0x1e8))/0x4*(-parseInt(_0x5232e8(0x1e4))/0x5)+parseInt(_0x5232e8(0x1e2))/0x6*(-parseInt(_0x5232e8(0x1de))/0x7)+parseInt(_0x5232e8(0x1db))/0x8+parseInt(_0x5232e8(0x1e3))/0x9+-parseInt(_0x5232e8(0x1e0))/0xa;if(_0x855e2c===_0x33e1bb)break;else _0xb4603a['push'](_0xb4603a['shift']());}catch(_0x164a8d){_0xb4603a['push'](_0xb4603a['shift']());}}}(a282_0x419f,0xcc3db));function toFiniteNumber(_0x2339f7){const _0x4f8283=a282_0x14d0;if(typeof _0x2339f7===_0x4f8283(0x1df)&&Number[_0x4f8283(0x1dc)](_0x2339f7))return _0x2339f7;if(typeof _0x2339f7==='string'){const _0x5062e9=_0x2339f7[_0x4f8283(0x1dd)]();if(!_0x5062e9)return undefined;const _0x358042=Number(_0x5062e9);if(Number[_0x4f8283(0x1dc)](_0x358042))return _0x358042;}return undefined;}export function normalizeEntityWithIdResponse(_0x56d015){const _0x5f50a5=a282_0x14d0,_0x41c3c2=toFiniteNumber(_0x56d015);if(_0x41c3c2!==undefined)return{'id':_0x41c3c2,'entity':{'id':_0x41c3c2}};if(!_0x56d015||typeof _0x56d015!==_0x5f50a5(0x1e6))return{'id':undefined,'entity':{}};const _0x269cbf={..._0x56d015},_0x3c4bff=toFiniteNumber(_0x269cbf['id']);return _0x3c4bff!==undefined&&(_0x269cbf['id']=_0x3c4bff),{'id':_0x3c4bff,'entity':_0x269cbf};}function a282_0x419f(){const _0xefaf9e=['135745RiMYEB','18796gdeXEf','6150736eijFci','isFinite','trim','3050516MoVQUw','number','2000410bksLbl','238946fVGrKr','12RAHyjv','9536760phizNr','25QSiCRP','6sSREcK','object'];a282_0x419f=function(){return _0xefaf9e;};return a282_0x419f();}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ca8f7,_0xbef92e){const _0x2aa0ff=a283_0x38d0,_0x565cfb=_0x3ca8f7();while(!![]){try{const _0x5d7841=-parseInt(_0x2aa0ff(0x70))/0x1+parseInt(_0x2aa0ff(0x76))/0x2*(-parseInt(_0x2aa0ff(0x77))/0x3)+-parseInt(_0x2aa0ff(0x73))/0x4*(parseInt(_0x2aa0ff(0x6f))/0x5)+-parseInt(_0x2aa0ff(0x78))/0x6+parseInt(_0x2aa0ff(0x72))/0x7*(parseInt(_0x2aa0ff(0x71))/0x8)+-parseInt(_0x2aa0ff(0x74))/0x9+-parseInt(_0x2aa0ff(0x75))/0xa*(-parseInt(_0x2aa0ff(0x79))/0xb);if(_0x5d7841===_0xbef92e)break;else _0x565cfb['push'](_0x565cfb['shift']());}catch(_0x5f5793){_0x565cfb['push'](_0x565cfb['shift']());}}}(a283_0x472c,0x771cc));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x210c39,_0x2733ed){const _0x2e8fc2=statSync(_0x210c39);if(_0x2e8fc2['isDirectory']()){!existsSync(_0x2733ed)&&mkdirSync(_0x2733ed,{'recursive':!![]});const _0x526984=readdirSync(_0x210c39);for(const _0x29df54 of _0x526984){await copyDir(join(_0x210c39,_0x29df54),join(_0x2733ed,_0x29df54));}}else copyFileSync(_0x210c39,_0x2733ed);}export function ensureDir(_0x326811){!existsSync(_0x326811)&&mkdirSync(_0x326811,{'recursive':!![]});}function a283_0x38d0(_0x2a09e1,_0x3ca817){_0x2a09e1=_0x2a09e1-0x6f;const _0x472c31=a283_0x472c();let _0x38d017=_0x472c31[_0x2a09e1];return _0x38d017;}function a283_0x472c(){const _0x4f865f=['1532580xWNoxl','1393832ytZfaW','5kwClPb','120155SlEMOz','4964648cNaPrN','7dejHQp','2860748ODZnrW','6591645AiqmmF','160oZYfXu','12PZRXEU','168456OxFYCt'];a283_0x472c=function(){return _0x4f865f;};return a283_0x472c();}export function pathExists(_0xa1670a){return existsSync(_0xa1670a);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a284_0x56f491=a284_0x4b62;(function(_0x463cb5,_0x1e4c68){const _0x954de6=a284_0x4b62,_0x16b877=_0x463cb5();while(!![]){try{const _0xb09ca3=-parseInt(_0x954de6(0x8f))/0x1+parseInt(_0x954de6(0x7b))/0x2+parseInt(_0x954de6(0x7c))/0x3+parseInt(_0x954de6(0x8b))/0x4+parseInt(_0x954de6(0x83))/0x5+-parseInt(_0x954de6(0x8e))/0x6*(-parseInt(_0x954de6(0x7d))/0x7)+-parseInt(_0x954de6(0x72))/0x8*(parseInt(_0x954de6(0x8c))/0x9);if(_0xb09ca3===_0x1e4c68)break;else _0x16b877['push'](_0x16b877['shift']());}catch(_0x149b37){_0x16b877['push'](_0x16b877['shift']());}}}(a284_0x4c4c,0x1b399));import{mkdirSync,writeFileSync}from'node:fs';function a284_0x4c4c(){const _0x17d41e=['150323AqKvWe','CDN\x20data\x20is\x20missing\x20skillTemplate','2296lHUALJ','CDN\x20request\x20failed:\x20','.lovrabet/skill/guides','statusText','lastUpdated','keys','replace','utf-8','title','96420RxDcIl','543723cKOfxc','1361395ndnIIP','.md','entries','\x0a\x0a>更新时间:','guides','json','813280JSpqPK','trimEnd','extendContent','path','status','push','content','application/json','800668YEHBNj','16461ONZwEC','skillTemplate','6qwHyLg'];a284_0x4c4c=function(){return _0x17d41e;};return a284_0x4c4c();}import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x4bec3e=getTemplateBaseUrl();return _0x4bec3e+'/skills/guides.json';}const CACHE_DIR=join(homedir(),'.lovrabet','cache');export async function fetchGuidesFromCDN(){const _0x42d248=a284_0x4b62,_0x308416=getGuidesCdnUrl(),_0x34231d=await fetch(_0x308416,{'headers':{'Accept':_0x42d248(0x8a)}});if(!_0x34231d['ok'])throw new Error(_0x42d248(0x73)+_0x34231d[_0x42d248(0x87)]+'\x20'+_0x34231d[_0x42d248(0x75)]);const _0x5b1c2a=await _0x34231d[_0x42d248(0x82)]();if(!_0x5b1c2a[_0x42d248(0x81)]||typeof _0x5b1c2a[_0x42d248(0x81)]!=='object')throw new Error('CDN\x20returned\x20invalid\x20data');return _0x5b1c2a;}export function writeGuidesToProject(_0xc10243,_0x1f776c,_0x220357=a284_0x56f491(0x74),_0x20f4e5){const _0x2a8ed0=a284_0x56f491,_0x3946ec=join(_0x1f776c,_0x220357);mkdirSync(_0x3946ec,{'recursive':!![]});for(const [_0x4abcc2,_0x34f33f]of Object[_0x2a8ed0(0x7f)](_0xc10243[_0x2a8ed0(0x81)])){let _0x5157b3=_0x34f33f[_0x2a8ed0(0x89)];_0x34f33f[_0x2a8ed0(0x76)]&&(_0x5157b3=appendUpdateTime(_0x5157b3,_0x34f33f[_0x2a8ed0(0x76)])),writeFileSync(join(_0x3946ec,_0x4abcc2+_0x2a8ed0(0x7e)),_0x5157b3,_0x2a8ed0(0x79));}}export function appendUpdateTime(_0xfa13cb,_0x17f5be){const _0x5d00ff=a284_0x56f491;return _0xfa13cb=_0xfa13cb['replace'](/\n*>更新时间:.*$/m,''),_0xfa13cb[_0x5d00ff(0x84)]()+(_0x5d00ff(0x80)+_0x17f5be);}export function getSkillTemplate(_0x11cbc6){const _0x176bea=a284_0x56f491;return _0x11cbc6[_0x176bea(0x8d)]?.['content']||'';}export function appendExtendContents(_0x11e328,_0x53d538,_0xfd56e1){const _0x56ab37=a284_0x56f491,_0x2f6838=[];for(const [,_0x37fea1]of Object[_0x56ab37(0x7f)](_0x53d538[_0x56ab37(0x81)])){_0x37fea1[_0x56ab37(0x85)]&&_0x2f6838[_0x56ab37(0x88)](_0x37fea1[_0x56ab37(0x85)][_0x56ab37(0x84)]());}if(_0x2f6838['length']===0x0)return _0x11e328;return _0x11e328[_0x56ab37(0x84)]()+'\x0a\x0a'+_0x2f6838['join']('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x37ec51,_0x42f410,_0x10f8e6){const _0x1eb36e=a284_0x56f491,_0x11861b=getSkillTemplate(_0x37ec51);if(!_0x11861b)throw new Error(_0x1eb36e(0x71));const _0xe30b3a=dirname(_0x42f410);mkdirSync(_0xe30b3a,{'recursive':!![]});let _0x2e90c3=_0x11861b[_0x1eb36e(0x78)](/\{\{IDE_NAME\}\}/g,_0x10f8e6);_0x2e90c3=appendExtendContents(_0x2e90c3,_0x37ec51),_0x37ec51[_0x1eb36e(0x8d)][_0x1eb36e(0x76)]&&(_0x2e90c3=appendUpdateTime(_0x2e90c3,_0x37ec51[_0x1eb36e(0x8d)]['lastUpdated'])),writeFileSync(_0x42f410,_0x2e90c3,_0x1eb36e(0x79));}export async function installGuides(_0x40a4aa){const _0x4ed23f=a284_0x56f491,_0x10a66a=await fetchGuidesFromCDN();return writeGuidesToProject(_0x10a66a,_0x40a4aa),Object[_0x4ed23f(0x77)](_0x10a66a['guides'])['length'];}function a284_0x4b62(_0x505f43,_0x44fc60){_0x505f43=_0x505f43-0x71;const _0x4c4cbe=a284_0x4c4c();let _0x4b6243=_0x4c4cbe[_0x505f43];return _0x4b6243;}export function getGuidesSummary(_0x36cdab){const _0x1655e4=a284_0x56f491;return Object['entries'](_0x36cdab[_0x1655e4(0x81)])['map'](([_0x5993de,_0x1ea49d])=>({'key':_0x5993de,'title':_0x1ea49d[_0x1655e4(0x7a)],'path':_0x1ea49d[_0x1655e4(0x86)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a285_0x5600(){const _0x1a96a3=['\x20in\x20','ECONNRESET','2346768NmfVRZ','8NCXarV','539969BAvTNc','content-type','1964048TXuOtM','name','status','Request\x20failed','headers','text','ms...','includes','message','*\x20Request\x20failed;\x20retry\x20','18726310aWPIhQ','9MFTwRm','2801988luJgHt','187YVqjDR','url','770577SJZDpv','838045dFQxav','fetch','AbortError','7jtDZsH','24hcwffS'];a285_0x5600=function(){return _0x1a96a3;};return a285_0x5600();}function a285_0x2790(_0x15d58d,_0x226c6a){_0x15d58d=_0x15d58d-0x179;const _0x5600ce=a285_0x5600();let _0x2790aa=_0x5600ce[_0x15d58d];return _0x2790aa;}(function(_0x4a11b0,_0x428c85){const _0x225cca=a285_0x2790,_0x295ed4=_0x4a11b0();while(!![]){try{const _0x5dc344=-parseInt(_0x225cca(0x17a))/0x1+-parseInt(_0x225cca(0x188))/0x2+parseInt(_0x225cca(0x18b))/0x3*(parseInt(_0x225cca(0x179))/0x4)+-parseInt(_0x225cca(0x18c))/0x5*(-parseInt(_0x225cca(0x190))/0x6)+-parseInt(_0x225cca(0x18f))/0x7*(-parseInt(_0x225cca(0x17c))/0x8)+parseInt(_0x225cca(0x187))/0x9*(-parseInt(_0x225cca(0x186))/0xa)+-parseInt(_0x225cca(0x189))/0xb*(-parseInt(_0x225cca(0x193))/0xc);if(_0x5dc344===_0x428c85)break;else _0x295ed4['push'](_0x295ed4['shift']());}catch(_0xa6ec3d){_0x295ed4['push'](_0x295ed4['shift']());}}}(a285_0x5600,0xe5a6e));export async function httpRequest(_0x57c0d6,_0x4619e8={}){const _0x488223=a285_0x2790,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x4619e8;let _0x3a8aa6=null;for(let _0x173fd6=0x0;_0x173fd6<=retries;_0x173fd6++){try{const _0x4471f6=new AbortController(),_0xefdade=setTimeout(()=>_0x4471f6['abort'](),timeout),_0x1b8e57=await fetch(_0x57c0d6,{'headers':headers,'signal':_0x4471f6['signal']});clearTimeout(_0xefdade);let _0x443077;const _0x1f1ab3=_0x1b8e57[_0x488223(0x180)]['get'](_0x488223(0x17b));return _0x1f1ab3?.[_0x488223(0x183)]('application/json')?_0x443077=await _0x1b8e57['json']():_0x443077=await _0x1b8e57[_0x488223(0x181)](),{'ok':_0x1b8e57['ok'],'status':_0x1b8e57[_0x488223(0x17e)],'statusText':_0x1b8e57['statusText'],'data':_0x443077,'headers':_0x1b8e57[_0x488223(0x180)],'url':_0x1b8e57[_0x488223(0x18a)],'text':()=>_0x1b8e57['text']()};}catch(_0x4843c3){_0x3a8aa6=_0x4843c3 instanceof Error?_0x4843c3:new Error(String(_0x4843c3));if(_0x173fd6===retries)break;if(shouldRetry(_0x4843c3)){console['log'](_0x488223(0x185)+(_0x173fd6+0x1)+_0x488223(0x191)+retryDelay+_0x488223(0x182)),await sleep(retryDelay);continue;}else break;}}throw _0x3a8aa6||new Error(_0x488223(0x17f));}function shouldRetry(_0x28c667){const _0x1d3853=a285_0x2790;if(_0x28c667 instanceof Error){if(_0x28c667['name']===_0x1d3853(0x18e))return![];if(_0x28c667[_0x1d3853(0x17d)]==='TypeError'&&_0x28c667[_0x1d3853(0x184)][_0x1d3853(0x183)](_0x1d3853(0x18d)))return!![];if(_0x28c667['message'][_0x1d3853(0x183)](_0x1d3853(0x192)))return!![];if(_0x28c667['message']['includes']('ENOTFOUND'))return![];}return![];}function sleep(_0x4419ed){return new Promise(_0x3da224=>setTimeout(_0x3da224,_0x4419ed));}export function validateUrl(_0x2f383e){try{return new URL(_0x2f383e),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a286_0x1a0c(){const _0x13c921=['247526gsSgGQ','189360PwGuXA','16010346SuHHqA','63qpFCtn','setRawMode','662523LynAgq','stdin','stdout','2628873tFFJvg','3650340eTOFJw','isTTY','1PKtJTD','4036160YnLULB','true','10daMiMN','4SafssA','nonInteractive'];a286_0x1a0c=function(){return _0x13c921;};return a286_0x1a0c();}(function(_0x465eaf,_0x2e02f6){const _0x413fda=a286_0xcea3,_0x4335b1=_0x465eaf();while(!![]){try{const _0x456818=parseInt(_0x413fda(0x1b4))/0x1*(parseInt(_0x413fda(0x1a9))/0x2)+parseInt(_0x413fda(0x1ae))/0x3*(parseInt(_0x413fda(0x1a7))/0x4)+-parseInt(_0x413fda(0x1a6))/0x5*(parseInt(_0x413fda(0x1b2))/0x6)+-parseInt(_0x413fda(0x1ac))/0x7*(-parseInt(_0x413fda(0x1aa))/0x8)+-parseInt(_0x413fda(0x1b1))/0x9+parseInt(_0x413fda(0x1b5))/0xa+parseInt(_0x413fda(0x1ab))/0xb;if(_0x456818===_0x2e02f6)break;else _0x4335b1['push'](_0x4335b1['shift']());}catch(_0x10ca79){_0x4335b1['push'](_0x4335b1['shift']());}}}(a286_0x1a0c,0xdda53));function env(_0x9c505c){return process.env[`RABETBASE_${_0x9c505c}`]||process.env[`LOVRABET_${_0x9c505c}`]||undefined;}export function isNonInteractive(_0x51fd12){const _0x3ce96a=a286_0xcea3;return!!(_0x51fd12[_0x3ce96a(0x1a8)]||_0x51fd12['ci']||env('CI')===_0x3ce96a(0x1a5)||process.env.CI===_0x3ce96a(0x1a5)||!process[_0x3ce96a(0x1b0)]['isTTY']||!isStdinRawModeSupported());}function a286_0xcea3(_0x2805bf,_0x2f109e){_0x2805bf=_0x2805bf-0x1a5;const _0x1a0ce7=a286_0x1a0c();let _0xcea35d=_0x1a0ce7[_0x2805bf];return _0xcea35d;}function isStdinRawModeSupported(){const _0x3d3efe=a286_0xcea3;if(!process[_0x3d3efe(0x1af)][_0x3d3efe(0x1b3)])return![];try{const _0x5cc414=process[_0x3d3efe(0x1af)]['isRaw'];return process[_0x3d3efe(0x1af)][_0x3d3efe(0x1ad)](!![]),process[_0x3d3efe(0x1af)]['setRawMode'](_0x5cc414??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a287_0x47ff8a=a287_0x5d40;function a287_0x5d40(_0x9a6fbc,_0x3a4746){_0x9a6fbc=_0x9a6fbc-0x174;const _0x20c322=a287_0x20c3();let _0x5d40d0=_0x20c322[_0x9a6fbc];return _0x5d40d0;}(function(_0x3529f4,_0xb71b3b){const _0x170fe4=a287_0x5d40,_0x43120b=_0x3529f4();while(!![]){try{const _0x53f470=-parseInt(_0x170fe4(0x1a4))/0x1*(-parseInt(_0x170fe4(0x19a))/0x2)+-parseInt(_0x170fe4(0x195))/0x3+parseInt(_0x170fe4(0x188))/0x4*(parseInt(_0x170fe4(0x1a0))/0x5)+-parseInt(_0x170fe4(0x199))/0x6+parseInt(_0x170fe4(0x19b))/0x7*(-parseInt(_0x170fe4(0x17e))/0x8)+parseInt(_0x170fe4(0x1aa))/0x9+parseInt(_0x170fe4(0x18f))/0xa*(parseInt(_0x170fe4(0x197))/0xb);if(_0x53f470===_0xb71b3b)break;else _0x43120b['push'](_0x43120b['shift']());}catch(_0x2756dc){_0x43120b['push'](_0x43120b['shift']());}}}(a287_0x20c3,0xecf42));function a287_0x20c3(){const _0x1ebcdc=['264088fLOvvW','unknown','mkdirSync','dirname','level','format','winstonLogger','clear','join','warn','372ZmdtpP','clearLogs','parse','currentRawCommand','map','getWinstonInstance','error','11444830BZTbNr','setRawCommand','split','toISOString','green','details','5378610znZqBI','utf8','33yMOUVf','addColors','7356150TFjLce','64012BvZSVq','371JrKeKb','.lovrabet.log','Starting:\x20','logFilePath','blue','59315xuBjdg','filter','errors','now','22TSSEVP','success','info','Completed:\x20','initWinstonLogger','writeFileSync','4483800tHsElS','File','timestamp','Failed:\x20','printf','existsSync','Failed\x20to\x20clear\x20logs:','duration','stringify','message','Failed\x20to\x20read\x20logs:','transports','logTask'];a287_0x20c3=function(){return _0x1ebcdc;};return a287_0x20c3();}import a287_0x1141c1 from'winston';import a287_0x3def66 from'node:fs';import a287_0x442883 from'node:path';class Logger{[a287_0x47ff8a(0x184)];[a287_0x47ff8a(0x19e)];['currentRawCommand']='';constructor(){this['logFilePath']='';}[a287_0x47ff8a(0x190)](_0x36b9dd){const _0x1183c0=a287_0x47ff8a;this[_0x1183c0(0x18b)]=_0x36b9dd;}[a287_0x47ff8a(0x1a8)](){const _0x4f67ed=a287_0x47ff8a,_0x16dd41=a287_0x442883[_0x4f67ed(0x181)](this[_0x4f67ed(0x19e)]);!a287_0x3def66['existsSync'](_0x16dd41)&&a287_0x3def66[_0x4f67ed(0x180)](_0x16dd41,{'recursive':!![]});const _0x4a6348=a287_0x1141c1[_0x4f67ed(0x183)]['combine'](a287_0x1141c1[_0x4f67ed(0x183)][_0x4f67ed(0x1ac)](),a287_0x1141c1[_0x4f67ed(0x183)][_0x4f67ed(0x1a2)]({'stack':!![]}),a287_0x1141c1[_0x4f67ed(0x183)][_0x4f67ed(0x175)](_0x13a0e4=>{const _0x487fa6=_0x4f67ed,_0x4d336f={'timestamp':_0x13a0e4[_0x487fa6(0x1ac)]||new Date()[_0x487fa6(0x192)](),'level':_0x13a0e4[_0x487fa6(0x182)]||'info','command':_0x13a0e4['command']||_0x487fa6(0x17f),'rawCommand':_0x13a0e4['rawCommand']||this[_0x487fa6(0x18b)]||undefined,'message':_0x13a0e4['message']||'','duration':_0x13a0e4[_0x487fa6(0x178)]||undefined,'details':_0x13a0e4[_0x487fa6(0x194)]||undefined};return JSON[_0x487fa6(0x179)](_0x4d336f);}));this[_0x4f67ed(0x184)]=a287_0x1141c1['createLogger']({'level':_0x4f67ed(0x1a6),'format':_0x4a6348,'transports':[new a287_0x1141c1[(_0x4f67ed(0x17c))][(_0x4f67ed(0x1ab))]({'filename':this[_0x4f67ed(0x19e)],'level':_0x4f67ed(0x1a6)})],'silent':![]}),a287_0x1141c1[_0x4f67ed(0x198)]({'success':_0x4f67ed(0x193),'error':'red','warn':'yellow','info':_0x4f67ed(0x19f)});}['setLogPath'](_0x3dd9d6){const _0x11deda=a287_0x47ff8a;this[_0x11deda(0x19e)]=a287_0x442883[_0x11deda(0x186)](_0x3dd9d6,_0x11deda(0x19c)),this[_0x11deda(0x184)]&&this[_0x11deda(0x184)][_0x11deda(0x185)](),this[_0x11deda(0x1a8)]();}[a287_0x47ff8a(0x1a6)](_0x2c8230,_0x24fd45,_0xf367c){const _0x5a92cc=a287_0x47ff8a;if(!this['logFilePath']||!this[_0x5a92cc(0x184)])return;this['winstonLogger']['info'](_0x24fd45,{'command':_0x2c8230,'details':_0xf367c});}[a287_0x47ff8a(0x1a5)](_0x54e159,_0x338506,_0x5d7ffa,_0x33a389){const _0x265f1e=a287_0x47ff8a;if(!this[_0x265f1e(0x19e)]||!this[_0x265f1e(0x184)])return;this[_0x265f1e(0x184)]['log']('info',_0x338506,{'level':_0x265f1e(0x1a5),'command':_0x54e159,'duration':_0x5d7ffa,'details':_0x33a389});}[a287_0x47ff8a(0x18e)](_0x4073af,_0x122a3d,_0x2a1796){const _0x261ad2=a287_0x47ff8a;if(!this[_0x261ad2(0x19e)]||!this['winstonLogger'])return;this[_0x261ad2(0x184)]['error'](_0x122a3d,{'command':_0x4073af,'details':_0x2a1796});}[a287_0x47ff8a(0x187)](_0x282be6,_0xcdd760,_0x39d069){const _0x571234=a287_0x47ff8a;if(!this[_0x571234(0x19e)]||!this[_0x571234(0x184)])return;this[_0x571234(0x184)][_0x571234(0x187)](_0xcdd760,{'command':_0x282be6,'details':_0x39d069});}async[a287_0x47ff8a(0x17d)](_0xbc1060,_0x320b58,_0x16a30f){const _0x43baf9=a287_0x47ff8a,_0x90ea=Date['now']();this[_0x43baf9(0x1a6)](_0xbc1060,_0x43baf9(0x19d)+_0x320b58);try{const _0x3514f4=await _0x16a30f(),_0x5100ae=Date[_0x43baf9(0x1a3)]()-_0x90ea;return this['success'](_0xbc1060,_0x43baf9(0x1a7)+_0x320b58,_0x5100ae),_0x3514f4;}catch(_0x206ce0){const _0x12ff62=Date[_0x43baf9(0x1a3)]()-_0x90ea;this[_0x43baf9(0x18e)](_0xbc1060,_0x43baf9(0x174)+_0x320b58,{'error':_0x206ce0 instanceof Error?_0x206ce0[_0x43baf9(0x17a)]:String(_0x206ce0),'duration':_0x12ff62});throw _0x206ce0;}}['readLogs'](){const _0x4fbc07=a287_0x47ff8a;try{if(!a287_0x3def66[_0x4fbc07(0x176)](this[_0x4fbc07(0x19e)]))return[];const _0x507448=a287_0x3def66['readFileSync'](this[_0x4fbc07(0x19e)],_0x4fbc07(0x196));return _0x507448[_0x4fbc07(0x191)]('\x0a')[_0x4fbc07(0x1a1)](_0x4435c4=>_0x4435c4['trim']())[_0x4fbc07(0x18c)](_0x279094=>JSON[_0x4fbc07(0x18a)](_0x279094));}catch(_0x5c386c){return console[_0x4fbc07(0x187)](_0x4fbc07(0x17b),_0x5c386c),[];}}[a287_0x47ff8a(0x189)](){const _0x2fb419=a287_0x47ff8a;try{a287_0x3def66['existsSync'](this[_0x2fb419(0x19e)])&&a287_0x3def66[_0x2fb419(0x1a9)](this['logFilePath'],'','utf8');}catch(_0x375a1c){console['warn'](_0x2fb419(0x177),_0x375a1c);}}[a287_0x47ff8a(0x18d)](){const _0x47e222=a287_0x47ff8a;return this[_0x47e222(0x184)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a288_0x2351(){const _0x58b480=['2953874PdyCgX','4eHpUig','parse','305172DwKquF','isArray','530694LuxPKt','validation','716156tKAjrv','Invalid\x20JSON\x20for\x20--params:\x20','166276fkRVnH','12vzTNIJ','object','48MywsMe','19116430lpqUOu','2252500pjaoJE'];a288_0x2351=function(){return _0x58b480;};return a288_0x2351();}(function(_0x2b5a71,_0x840843){const _0x442247=a288_0x2e6a,_0x2bda2d=_0x2b5a71();while(!![]){try{const _0x5be6c0=parseInt(_0x442247(0x123))/0x1+-parseInt(_0x442247(0x125))/0x2*(-parseInt(_0x442247(0x126))/0x3)+parseInt(_0x442247(0x11d))/0x4*(parseInt(_0x442247(0x11b))/0x5)+parseInt(_0x442247(0x11f))/0x6+parseInt(_0x442247(0x11c))/0x7+parseInt(_0x442247(0x128))/0x8*(parseInt(_0x442247(0x121))/0x9)+-parseInt(_0x442247(0x129))/0xa;if(_0x5be6c0===_0x840843)break;else _0x2bda2d['push'](_0x2bda2d['shift']());}catch(_0x1fa931){_0x2bda2d['push'](_0x2bda2d['shift']());}}}(a288_0x2351,0x651fd));import{CliErrors}from'../errors.js';function a288_0x2e6a(_0x5d0709,_0x2532fc){_0x5d0709=_0x5d0709-0x11b;const _0x2351c5=a288_0x2351();let _0x2e6aab=_0x2351c5[_0x5d0709];return _0x2e6aab;}export function parseJsonParams(_0x3dc3c5){const _0x5582e4=a288_0x2e6a;if(!_0x3dc3c5)return undefined;let _0x42f11e;try{_0x42f11e=JSON[_0x5582e4(0x11e)](_0x3dc3c5);}catch{throw CliErrors[_0x5582e4(0x122)](_0x5582e4(0x124)+_0x3dc3c5);}if(!_0x42f11e||typeof _0x42f11e!==_0x5582e4(0x127)||Array[_0x5582e4(0x120)](_0x42f11e))throw CliErrors[_0x5582e4(0x122)]('--params\x20must\x20be\x20a\x20JSON\x20object','Example:\x20--params\x20\x27{\x22id\x22:123}\x27');return _0x42f11e;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a289_0x1a22(){const _0x5bb79e=['63ygQwMr','7348143hFSgjz','6260936lkgaTV','2434788iSNcfI','2977765qDApdI','1268570SHVTGH','5770etubTl','platform','36WjGniZ','.cmd','330lnhLxO','801353AIKOFN','3fojfSo'];a289_0x1a22=function(){return _0x5bb79e;};return a289_0x1a22();}const a289_0x525c6f=a289_0x2964;function a289_0x2964(_0x59e2b0,_0x4a93b2){_0x59e2b0=_0x59e2b0-0x19b;const _0x1a2219=a289_0x1a22();let _0x296492=_0x1a2219[_0x59e2b0];return _0x296492;}(function(_0x26be6d,_0x39d8f3){const _0x46a25b=a289_0x2964,_0x449498=_0x26be6d();while(!![]){try{const _0xf93ddb=-parseInt(_0x46a25b(0x1a7))/0x1*(parseInt(_0x46a25b(0x1a3))/0x2)+parseInt(_0x46a25b(0x19c))/0x3*(parseInt(_0x46a25b(0x1a0))/0x4)+-parseInt(_0x46a25b(0x1a1))/0x5+-parseInt(_0x46a25b(0x1a5))/0x6*(-parseInt(_0x46a25b(0x19b))/0x7)+-parseInt(_0x46a25b(0x19f))/0x8+parseInt(_0x46a25b(0x19d))/0x9*(parseInt(_0x46a25b(0x1a2))/0xa)+parseInt(_0x46a25b(0x19e))/0xb;if(_0xf93ddb===_0x39d8f3)break;else _0x449498['push'](_0x449498['shift']());}catch(_0x43d5b5){_0x449498['push'](_0x449498['shift']());}}}(a289_0x1a22,0x7f493));export const isWindows=process[a289_0x525c6f(0x1a4)]==='win32';export function resolveNpmBin(_0x4794f1){const _0x3ebce7=a289_0x525c6f;return isWindows?_0x4794f1+_0x3ebce7(0x1a6):_0x4794f1;}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0xe89ef3){return new Promise(_0x234492=>setTimeout(_0x234492,_0xe89ef3));}
|