@lovrabet/rabetbase-cli 2.5.1-beta.2 → 2.5.1-beta.3
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.d.ts +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-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync.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/deployment-sync.js +1 -1
- package/lib/config/domain-config.d.ts +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-routing.js +1 -1
- package/lib/config/schema.d.ts +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.d.ts +2 -0
- 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.d.ts +0 -16
- 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/kb-search-client.d.ts +30 -0
- package/lib/core/kb-search-client.js +1 -0
- 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.d.ts +1 -0
- 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 +2 -2
- package/skills/rabetbase/references/rabetbase-config.md +4 -1
- package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
- package/skills/rabetbase/references/rabetbase-init.md +2 -0
- package/skills/rabetbase/references/rabetbase-kb.md +7 -7
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5ec4eb,_0x474d02){const _0x35fcde=a277_0x4a5d,_0x2b3c31=_0x5ec4eb();while(!![]){try{const _0x2db9d0=-parseInt(_0x35fcde(0x1f4))/0x1*(-parseInt(_0x35fcde(0x1fa))/0x2)+parseInt(_0x35fcde(0x1fd))/0x3*(parseInt(_0x35fcde(0x1f9))/0x4)+-parseInt(_0x35fcde(0x201))/0x5+parseInt(_0x35fcde(0x1ff))/0x6*(parseInt(_0x35fcde(0x1f5))/0x7)+parseInt(_0x35fcde(0x1f6))/0x8*(parseInt(_0x35fcde(0x1fb))/0x9)+-parseInt(_0x35fcde(0x1ed))/0xa+-parseInt(_0x35fcde(0x1fc))/0xb*(-parseInt(_0x35fcde(0x1fe))/0xc);if(_0x2db9d0===_0x474d02)break;else _0x2b3c31['push'](_0x2b3c31['shift']());}catch(_0x2d412c){_0x2b3c31['push'](_0x2b3c31['shift']());}}}(a277_0x92d5,0x89392));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a277_0x4a5d(_0x99b4c5,_0x46a708){_0x99b4c5=_0x99b4c5-0x1ec;const _0x92d5a4=a277_0x92d5();let _0x4a5d61=_0x92d5a4[_0x99b4c5];return _0x4a5d61;}import{getCliVersion}from'../utils/version.js';function a277_0x92d5(){const _0x7ef4af=['11pnDHZD','66393IEtaOd','9905316uigJMx','6cfFPzS','entries','4319590GNtxCZ','stringify','3498690zoXdkE','durationMs','rabetbase.command','command','[REDACTED]','test','flags','635VbOKCk','3575999MYSRGv','24qUZIUm','error','message','44ZvNlxt','302hftgbQ','300681RYFXSA'];a277_0x92d5=function(){return _0x7ef4af;};return a277_0x92d5();}const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i,/^value$/i];function isSensitiveKey(_0x5855d8){const _0x3d0caa=a277_0x4a5d;return SENSITIVE_PATTERNS['some'](_0xa662f2=>_0xa662f2[_0x3d0caa(0x1f2)](_0x5855d8));}function sanitizeFlags(_0x599ee0){const _0x21933a=a277_0x4a5d,_0x136d3f={};for(const [_0x29b1d8,_0x34af41]of Object[_0x21933a(0x200)](_0x599ee0)){isSensitiveKey(_0x29b1d8)?_0x136d3f[_0x29b1d8]=_0x34af41!=null&&_0x34af41!==''?_0x21933a(0x1f1):_0x34af41:_0x136d3f[_0x29b1d8]=_0x34af41;}return _0x136d3f;}export async function reportCommandTrace(_0x21ddb4){const _0x23e366=a277_0x4a5d;try{const _0xd21bea=sanitizeFlags(_0x21ddb4[_0x23e366(0x1f3)]);await sendCliTraceLog({'spanName':_0x23e366(0x1ef),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x21ddb4['service'],'command.name':_0x21ddb4[_0x23e366(0x1f0)],'command.flags':JSON[_0x23e366(0x1ec)](_0xd21bea),..._0x21ddb4[_0x23e366(0x1ee)]!=null?{'command.duration_ms':_0x21ddb4[_0x23e366(0x1ee)]}:{},..._0x21ddb4['error']?{'command.error':_0x21ddb4[_0x23e366(0x1f7)]instanceof Error?_0x21ddb4[_0x23e366(0x1f7)][_0x23e366(0x1f8)]:String(_0x21ddb4[_0x23e366(0x1f7)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a278_0x3077(){var _0x1ed9b4=['135DlymMM','service','error','335QMGubI','7505289cAChqp','81058QEgAac','6344107KyDerq','1232616vluIKu','9404htYiEO','cli.help','3490602WojllG','1792129UNBbkB'];a278_0x3077=function(){return _0x1ed9b4;};return a278_0x3077();}(function(_0x157a15,_0x465f42){var _0x3b51e3=a278_0x244d,_0xe6f5a5=_0x157a15();while(!![]){try{var _0x2fb6d1=parseInt(_0x3b51e3(0xc2))/0x1+parseInt(_0x3b51e3(0xc8))/0x2*(parseInt(_0x3b51e3(0xc3))/0x3)+-parseInt(_0x3b51e3(0xbf))/0x4*(parseInt(_0x3b51e3(0xc6))/0x5)+-parseInt(_0x3b51e3(0xc1))/0x6+-parseInt(_0x3b51e3(0xbd))/0x7+-parseInt(_0x3b51e3(0xbe))/0x8+-parseInt(_0x3b51e3(0xc7))/0x9;if(_0x2fb6d1===_0x465f42)break;else _0xe6f5a5['push'](_0xe6f5a5['shift']());}catch(_0x226a26){_0xe6f5a5['push'](_0xe6f5a5['shift']());}}}(a278_0x3077,0xefd4f));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a278_0x244d(_0x3f18f1,_0x5833bc){_0x3f18f1=_0x3f18f1-0xbd;var _0x307759=a278_0x3077();var _0x244d47=_0x307759[_0x3f18f1];return _0x244d47;}export async function reportCliHelpTrace(_0x17d654,_0x3de4b4){var _0xb1aa4e=a278_0x244d;try{await sendCliTraceLog({'spanName':_0xb1aa4e(0xc0),'logData':{'rabetbase.help.kind':_0x17d654,..._0x3de4b4?.[_0xb1aa4e(0xc4)]&&{'rabetbase.help.service':_0x3de4b4[_0xb1aa4e(0xc4)]}}});}catch(_0x1552b5){console[_0xb1aa4e(0xc5)]('Failed\x20to\x20report\x20CLI\x20help\x20trace:',_0x1552b5);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x247330,_0x9622cf){const _0x5689dc=a279_0x3628,_0x3b7b5f=_0x247330();while(!![]){try{const _0xbcd825=-parseInt(_0x5689dc(0x1ec))/0x1+parseInt(_0x5689dc(0x1e1))/0x2*(-parseInt(_0x5689dc(0x1e2))/0x3)+-parseInt(_0x5689dc(0x1eb))/0x4*(-parseInt(_0x5689dc(0x1e3))/0x5)+-parseInt(_0x5689dc(0x1ef))/0x6*(-parseInt(_0x5689dc(0x1e8))/0x7)+-parseInt(_0x5689dc(0x1e6))/0x8+-parseInt(_0x5689dc(0x1ed))/0x9+parseInt(_0x5689dc(0x1ee))/0xa;if(_0xbcd825===_0x9622cf)break;else _0x3b7b5f['push'](_0x3b7b5f['shift']());}catch(_0x3127cf){_0x3b7b5f['push'](_0x3b7b5f['shift']());}}}(a279_0x5076,0xd5a28));function a279_0x3628(_0x3f0bf,_0x21f284){_0x3f0bf=_0x3f0bf-0x1de;const _0x5076a4=a279_0x5076();let _0x36286f=_0x5076a4[_0x3f0bf];return _0x36286f;}function a279_0x5076(){const _0x2b01bb=['user','tenant_code','unknown','12440vDtnaf','435KLtxLS','525BNVHjp','username','production','12176280VWRmBP','nickname','7014ciCoEo','daily','email','33564udOiNX','637598euZSvm','3770244RfqRFF','20105200cXZHIy','8766MpEaqT'];a279_0x5076=function(){return _0x2b01bb;};return a279_0x5076();}import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x149a64=a279_0x3628,_0x43cd06=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x41332b=_0x43cd06?.[_0x149a64(0x1de)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0x149a64(0x1e0)?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x149a64(0x1e9):_0x149a64(0x1e5))}),setUserContext({'id':_0x41332b?.['id'],'username':_0x41332b?.[_0x149a64(0x1e4)],'nickname':_0x41332b?.[_0x149a64(0x1e7)],'email':_0x41332b?.[_0x149a64(0x1ea)],'tenantCode':_0x41332b?.['tenant']?.[_0x149a64(0x1df)],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x43cd06;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a280_0x4b4b(){const _0x2731b0=['151938nHZSnm','51iEukqA','12004iMpyhl','3942CJhWOR','30lSArbD','SIGINT','79570BxFcjr','1563032fhjBDR','SIGTERM','once','beforeExit','9070KSYezp','1205302zNgCqZ','130414cOSTpr','then'];a280_0x4b4b=function(){return _0x2731b0;};return a280_0x4b4b();}(function(_0x441f55,_0x2725d6){const _0x338390=a280_0x1db5,_0x26b09a=_0x441f55();while(!![]){try{const _0x41e334=-parseInt(_0x338390(0xb4))/0x1+-parseInt(_0x338390(0xb2))/0x2+-parseInt(_0x338390(0xb5))/0x3*(-parseInt(_0x338390(0xb6))/0x4)+-parseInt(_0x338390(0xba))/0x5*(parseInt(_0x338390(0xb8))/0x6)+parseInt(_0x338390(0xb1))/0x7+-parseInt(_0x338390(0xbb))/0x8+-parseInt(_0x338390(0xb7))/0x9*(-parseInt(_0x338390(0xb0))/0xa);if(_0x41e334===_0x2725d6)break;else _0x26b09a['push'](_0x26b09a['shift']());}catch(_0x2be420){_0x26b09a['push'](_0x26b09a['shift']());}}}(a280_0x4b4b,0x1f577));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 a280_0x1db5(_0x2db6b5,_0x5337a3){_0x2db6b5=_0x2db6b5-0xad;const _0x4b4b68=a280_0x4b4b();let _0x1db58a=_0x4b4b68[_0x2db6b5];return _0x1db58a;}export function registerOtelShutdownOnExit(){const _0x1258e5=a280_0x1db5;process[_0x1258e5(0xae)](_0x1258e5(0xaf),()=>{void flushOtelNodeIfUsed();});const _0x3f6b68=()=>{const _0x3f97f8=_0x1258e5;void flushOtelNodeIfUsed()[_0x3f97f8(0xb3)](()=>process['exit'](0x0));};process[_0x1258e5(0xae)](_0x1258e5(0xb9),_0x3f6b68),process[_0x1258e5(0xae)](_0x1258e5(0xad),_0x3f6b68);}export async function exitWithOtelShutdown(_0x3920ed){await flushOtelNodeIfUsed(),process['exit'](_0x3920ed);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a281_0x401109=a281_0x3df9;function a281_0x4c93(){const _0x1b822f=['804800hhcAMI','traceName','7232625eXzYel','2727636PlFWYB','1432852AKLOLm','164452VJJVvh','548301mDnFEc','traceparent','spanName','35GHdwrd','rabetbase-cli','40bmFkyB','6079626UIfAgB','version','manual'];a281_0x4c93=function(){return _0x1b822f;};return a281_0x4c93();}function a281_0x3df9(_0x58e70d,_0x3f992a){_0x58e70d=_0x58e70d-0x15c;const _0x4c932e=a281_0x4c93();let _0x3df9cd=_0x4c932e[_0x58e70d];return _0x3df9cd;}(function(_0xfc96be,_0x183fc8){const _0x494ba3=a281_0x3df9,_0x221cb8=_0xfc96be();while(!![]){try{const _0x399aa7=-parseInt(_0x494ba3(0x164))/0x1+-parseInt(_0x494ba3(0x168))/0x2+-parseInt(_0x494ba3(0x16a))/0x3+-parseInt(_0x494ba3(0x169))/0x4*(parseInt(_0x494ba3(0x15e))/0x5)+-parseInt(_0x494ba3(0x167))/0x6+-parseInt(_0x494ba3(0x161))/0x7+-parseInt(_0x494ba3(0x160))/0x8*(-parseInt(_0x494ba3(0x166))/0x9);if(_0x399aa7===_0x183fc8)break;else _0x221cb8['push'](_0x221cb8['shift']());}catch(_0x217742){_0x221cb8['push'](_0x221cb8['shift']());}}}(a281_0x4c93,0xabaf1));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=a281_0x401109(0x15f);export async function sendCliTraceLog(_0x236ac2){const _0x33ec53=a281_0x401109;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x236ac2[_0x33ec53(0x165)]??DEFAULT_TRACE_NAME,'version':_0x236ac2[_0x33ec53(0x162)]??getCliVersion(),'spanName':_0x236ac2[_0x33ec53(0x15d)],'eventType':_0x33ec53(0x163),'logData':_0x236ac2['logData'],..._0x236ac2[_0x33ec53(0x15c)]&&{'traceparent':_0x236ac2[_0x33ec53(0x15c)]}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a282_0x126efa=a282_0x5b59;(function(_0x1aeed6,_0x117427){const _0x184742=a282_0x5b59,_0x39f44e=_0x1aeed6();while(!![]){try{const _0x29a5cd=parseInt(_0x184742(0x1d2))/0x1*(-parseInt(_0x184742(0x1ca))/0x2)+-parseInt(_0x184742(0x1c2))/0x3*(parseInt(_0x184742(0x1cc))/0x4)+parseInt(_0x184742(0x1cf))/0x5*(-parseInt(_0x184742(0x1bf))/0x6)+parseInt(_0x184742(0x1c6))/0x7*(parseInt(_0x184742(0x1c4))/0x8)+-parseInt(_0x184742(0x1d0))/0x9*(parseInt(_0x184742(0x1c3))/0xa)+-parseInt(_0x184742(0x1d3))/0xb*(parseInt(_0x184742(0x1d4))/0xc)+-parseInt(_0x184742(0x1cb))/0xd*(-parseInt(_0x184742(0x1ce))/0xe);if(_0x29a5cd===_0x117427)break;else _0x39f44e['push'](_0x39f44e['shift']());}catch(_0xcfab35){_0x39f44e['push'](_0x39f44e['shift']());}}}(a282_0x1536,0xb836e));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export const PLATFORM_ISSUE_TRACE_NAME=a282_0x126efa(0x1d5);function a282_0x5b59(_0x3426b4,_0x21f528){_0x3426b4=_0x3426b4-0x1bf;const _0x1536c4=a282_0x1536();let _0x5b5920=_0x1536c4[_0x3426b4];return _0x5b5920;}function a282_0x1536(){const _0x334163=['truncated','28rOedsi','title','issue.log.collect','description','4PpjpZA','13lzxLOA','28vOvLwH','redactionKinds','59085726WCdDZn','135265JJjMJb','369wPxiWR','originalBytes','497990qmmuTi','9487654jZUNjW','12ScZSJs','platform-issue-log-collect','312XhVTsg','join','sanitize','317703hFSUek','203140iUYvZq','2747128VLxgQa'];a282_0x1536=function(){return _0x334163;};return a282_0x1536();}export const PLATFORM_ISSUE_SPAN_NAME=a282_0x126efa(0x1c8);export async function sendPlatformIssueCollectLog(_0x19e95c){const _0xb7bbf0=a282_0x126efa;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x19e95c[_0xb7bbf0(0x1c7)],'issue.description':_0x19e95c[_0xb7bbf0(0x1c9)],..._0x19e95c['sanitize']?{'issue.description_original_bytes':_0x19e95c[_0xb7bbf0(0x1c1)][_0xb7bbf0(0x1d1)],'issue.description_truncated':_0x19e95c['sanitize'][_0xb7bbf0(0x1c5)],'issue.description_redactions':_0x19e95c[_0xb7bbf0(0x1c1)]['redactionCount'],'issue.description_redaction_kinds':_0x19e95c[_0xb7bbf0(0x1c1)][_0xb7bbf0(0x1cd)][_0xb7bbf0(0x1c0)](',')}:{}}});}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a284_0x2afc(_0x353d67,_0x5ada77){_0x353d67=_0x353d67-0x126;const _0x35ca0e=a284_0x35ca();let _0x2afc2f=_0x35ca0e[_0x353d67];return _0x2afc2f;}const a284_0x63f467=a284_0x2afc;(function(_0x8280db,_0x416269){const _0x50a984=a284_0x2afc,_0x58a19c=_0x8280db();while(!![]){try{const _0x44bd31=parseInt(_0x50a984(0x147))/0x1+-parseInt(_0x50a984(0x126))/0x2+-parseInt(_0x50a984(0x146))/0x3*(parseInt(_0x50a984(0x130))/0x4)+parseInt(_0x50a984(0x12c))/0x5+parseInt(_0x50a984(0x132))/0x6+-parseInt(_0x50a984(0x134))/0x7*(parseInt(_0x50a984(0x127))/0x8)+-parseInt(_0x50a984(0x148))/0x9*(parseInt(_0x50a984(0x144))/0xa);if(_0x44bd31===_0x416269)break;else _0x58a19c['push'](_0x58a19c['shift']());}catch(_0x158f06){_0x58a19c['push'](_0x58a19c['shift']());}}}(a284_0x35ca,0xd1b39));export const CORE_IDE_CONFIGS={'cursor':{'name':a284_0x63f467(0x158),'description':a284_0x63f467(0x139),'folders':[a284_0x63f467(0x12b),a284_0x63f467(0x153)],'files':[{'type':a284_0x63f467(0x138),'path':a284_0x63f467(0x128)}]},'windsurf':{'name':a284_0x63f467(0x13f),'description':a284_0x63f467(0x131),'folders':[a284_0x63f467(0x133)],'files':[{'type':'file','path':a284_0x63f467(0x155)}]},'claude':{'name':a284_0x63f467(0x14b),'description':a284_0x63f467(0x14b),'folders':[a284_0x63f467(0x14e)],'files':[{'type':a284_0x63f467(0x138),'path':'.claude/skills/lovrabet/SKILL.md'}]},'cline':{'name':a284_0x63f467(0x150),'description':a284_0x63f467(0x142),'folders':[a284_0x63f467(0x15a)],'files':[{'type':a284_0x63f467(0x138),'path':a284_0x63f467(0x145)}]},'codex':{'name':'Codex','description':'Codex\x20IDE','folders':[a284_0x63f467(0x135)],'files':[{'type':'file','path':a284_0x63f467(0x140)}]},'opencode':{'name':a284_0x63f467(0x154),'description':a284_0x63f467(0x136),'folders':['.opencode'],'files':[{'type':a284_0x63f467(0x138),'path':a284_0x63f467(0x12a)}]},'qoder':{'name':a284_0x63f467(0x14c),'description':a284_0x63f467(0x151),'folders':['.qoder'],'files':[{'type':a284_0x63f467(0x138),'path':a284_0x63f467(0x13a)},{'type':'file','path':'.qoder/skills/lovrabet/SKILL.md'}]},'codebuddy':{'name':'CodeBuddy','description':'CodeBuddy\x20IDE','folders':[a284_0x63f467(0x149)],'files':[{'type':'file','path':a284_0x63f467(0x13e)}]},'trae':{'name':a284_0x63f467(0x12d),'description':'Trae\x20IDE','folders':[a284_0x63f467(0x137)],'files':[{'type':a284_0x63f467(0x138),'path':a284_0x63f467(0x13c)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a284_0x63f467(0x14f),'description':a284_0x63f467(0x141),'folders':[a284_0x63f467(0x143)],'files':[{'type':'file','path':a284_0x63f467(0x14a)}]},'antigravity':{'name':'Antigravity','description':'Antigravity\x20IDE','folders':[a284_0x63f467(0x143)],'files':[{'type':a284_0x63f467(0x138),'path':a284_0x63f467(0x14a)}]}};function a284_0x35ca(){const _0x5db262=['Trae','cursor','windsurf','20NhqeWN','Windsurf\x20IDE','8058240cqwcdh','.windsurf','3381bpRZSD','.codex','OpenCode\x20IDE','.trae','file','Cursor\x20IDE','.qoder/rules/rabetbase.md','codex','.trae/skills/lovrabet/SKILL.md','opencode','.codebuddy/skills/lovrabet/SKILL.md','Windsurf','.codex/skills/lovrabet/SKILL.md','Generic\x20template\x20fallback','Cline\x20IDE','.agent','19521530bjfXtw','.cline/skills/lovrabet/SKILL.md','20238HgsKDx','976264ZBfnAE','9TQPuyA','.codebuddy','.agent/skills/lovrabet/SKILL.md','Claude\x20Code','Qoder','trae','.claude','Other\x20(generic\x20template)','Cline','Qoder\x20IDE','qoder','.cursor','OpenCode','.windsurf/workflows/rabetbase.md','codebuddy','agent','Cursor','claude','.cline','778726gYjXUD','8992CZYDNI','.cursor/skills/rabetbase.md','cline','.opencode/skills/lovrabet/SKILL.md','.cursorrules','7288855jDurNj'];a284_0x35ca=function(){return _0x5db262;};return a284_0x35ca();}export const CORE_IDE_LIST=[a284_0x63f467(0x159),a284_0x63f467(0x129),a284_0x63f467(0x156),'codex',a284_0x63f467(0x12e),a284_0x63f467(0x13d),'qoder',a284_0x63f467(0x14d),a284_0x63f467(0x12f)];export const IDE_LIST=['antigravity',a284_0x63f467(0x159),'cline',a284_0x63f467(0x156),a284_0x63f467(0x13b),a284_0x63f467(0x12e),a284_0x63f467(0x13d),a284_0x63f467(0x152),'trae',a284_0x63f467(0x12f),a284_0x63f467(0x157)];export const ALL_CORE_IDES=[a284_0x63f467(0x12e),'windsurf',a284_0x63f467(0x159),a284_0x63f467(0x129),a284_0x63f467(0x13b),a284_0x63f467(0x13d),a284_0x63f467(0x152),a284_0x63f467(0x156),'trae'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x25d7e9,_0x3e06c8){const _0x4ad837=a285_0x2f92,_0x2895c6=_0x25d7e9();while(!![]){try{const _0x594a6d=-parseInt(_0x4ad837(0x177))/0x1+-parseInt(_0x4ad837(0x175))/0x2*(parseInt(_0x4ad837(0x171))/0x3)+-parseInt(_0x4ad837(0x170))/0x4+parseInt(_0x4ad837(0x176))/0x5*(parseInt(_0x4ad837(0x16e))/0x6)+parseInt(_0x4ad837(0x174))/0x7+parseInt(_0x4ad837(0x173))/0x8+parseInt(_0x4ad837(0x16f))/0x9*(parseInt(_0x4ad837(0x172))/0xa);if(_0x594a6d===_0x3e06c8)break;else _0x2895c6['push'](_0x2895c6['shift']());}catch(_0x5c1a8e){_0x2895c6['push'](_0x2895c6['shift']());}}}(a285_0x55f4,0x4bf08));function a285_0x2f92(_0x119911,_0x236d54){_0x119911=_0x119911-0x16e;const _0x55f4d5=a285_0x55f4();let _0x2f9208=_0x55f4d5[_0x119911];return _0x2f9208;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a285_0x55f4(){const _0x4c147b=['29901XOZthp','20oucBhB','2043016vPQtGZ','3898783nXWdmM','16XkBmRj','697195TEOZww','447763KtASek','6oshpHS','82278NZSuQP','526088whjGjb'];a285_0x55f4=function(){return _0x4c147b;};return a285_0x55f4();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a286_0x1451(){const _0xe3c0ab=['now','cli','/config.json','390685WHYarg','stableVersion','93322ecywkJ','9LdVweM','4QgLjcG','381924vWiznA','/config/index.json','node','181299GqAIBw','81692ATxQei','391447HeUGKj','sdk','json','application/json','1644632JlJPyu'];a286_0x1451=function(){return _0xe3c0ab;};return a286_0x1451();}(function(_0x3c809c,_0xc2a9c2){const _0x23f34e=a286_0x2431,_0x599ec1=_0x3c809c();while(!![]){try{const _0x34ce71=parseInt(_0x23f34e(0xe8))/0x1+-parseInt(_0x23f34e(0xf3))/0x2+parseInt(_0x23f34e(0xe7))/0x3*(parseInt(_0x23f34e(0xf5))/0x4)+-parseInt(_0x23f34e(0xf1))/0x5+-parseInt(_0x23f34e(0xf6))/0x6+-parseInt(_0x23f34e(0xe9))/0x7+-parseInt(_0x23f34e(0xed))/0x8*(-parseInt(_0x23f34e(0xf4))/0x9);if(_0x34ce71===_0xc2a9c2)break;else _0x599ec1['push'](_0x599ec1['shift']());}catch(_0x512879){_0x599ec1['push'](_0x599ec1['shift']());}}}(a286_0x1451,0x193a3));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0xc0c09=a286_0x2431,_0x3134a6=getTemplateBaseUrl(),_0x537fc9=[_0x3134a6+_0xc0c09(0xf0),_0x3134a6+_0xc0c09(0xf7)];for(const _0x1f4721 of _0x537fc9){try{const _0x3ddccc=await fetch(_0x1f4721,{'headers':{'Accept':_0xc0c09(0xec)}});if(!_0x3ddccc['ok'])continue;const _0x4a4f23=await _0x3ddccc[_0xc0c09(0xeb)]();if(!_0x4a4f23[_0xc0c09(0xef)]?.[_0xc0c09(0xf2)]||!_0x4a4f23[_0xc0c09(0xea)]?.[_0xc0c09(0xe6)]?.['stableVersion'])continue;return _0x4a4f23;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];function a286_0x2431(_0x56a165,_0x2e5876){_0x56a165=_0x56a165-0xe6;const _0x145181=a286_0x1451();let _0x24317d=_0x145181[_0x56a165];return _0x24317d;}export async function getCdnConfig(){const _0x2e84b0=a286_0x2431,_0x479298=Date[_0x2e84b0(0xee)]();if(hasCachedConfig){const _0x320b50=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x479298-cacheTime<_0x320b50)return cachedConfig;}const _0x2e387f=await fetchCdnConfig();return cachedConfig=_0x2e387f,cacheTime=_0x479298,hasCachedConfig=!![],_0x2e387f;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a287_0x2e4f1c=a287_0x54d6;(function(_0x9864c7,_0x5f5b3c){const _0x4c246a=a287_0x54d6,_0x51a804=_0x9864c7();while(!![]){try{const _0x521416=parseInt(_0x4c246a(0x1fc))/0x1+parseInt(_0x4c246a(0x203))/0x2+parseInt(_0x4c246a(0x20a))/0x3+-parseInt(_0x4c246a(0x202))/0x4+parseInt(_0x4c246a(0x1f1))/0x5*(-parseInt(_0x4c246a(0x1fb))/0x6)+-parseInt(_0x4c246a(0x1ff))/0x7+parseInt(_0x4c246a(0x207))/0x8;if(_0x521416===_0x5f5b3c)break;else _0x51a804['push'](_0x51a804['shift']());}catch(_0x5ef3f3){_0x51a804['push'](_0x51a804['shift']());}}}(a287_0x3a9d,0xcd248));import a287_0x34260b from'node:fs';import a287_0x183595 from'node:path';import a287_0x4e4cc7 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a287_0x2e4f1c(0x1f0);function isNonNumericVersion(_0x35ac28){const _0x31e323=a287_0x2e4f1c,_0x2644b1=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x2644b1['some'](_0x279300=>_0x279300[_0x31e323(0x20f)](_0x35ac28));}function getInstalledVersion(_0x27dc27,_0x337f1a){const _0x5893ea=a287_0x2e4f1c;try{const _0x3e36a8=a287_0x183595['join'](_0x27dc27,_0x5893ea(0x1fe),_0x337f1a,_0x5893ea(0x209));if(a287_0x34260b[_0x5893ea(0x1f9)](_0x3e36a8)){const _0xcccb0=JSON[_0x5893ea(0x1f6)](a287_0x34260b[_0x5893ea(0x208)](_0x3e36a8,'utf-8'));return _0xcccb0['version']||null;}}catch{}return null;}function a287_0x54d6(_0x3f7482,_0x2c96f3){_0x3f7482=_0x3f7482-0x1ef;const _0x3a9d9d=a287_0x3a9d();let _0x54d67b=_0x3a9d9d[_0x3f7482];return _0x54d67b;}function a287_0x3a9d(){const _0x48a5ff=['1549267KFoAKP','coerce','node_modules','8557199KlrCzr','@lovrabet/sdk','latest','5736488PAtDOQ','1292362RtWjQm','stableVersion','log','node','8651048SItgLL','readFileSync','package.json','2676339OeVOmU','npm\x20install\x20','sdk','\x1b[33m','utf8','test','\x1b[1m','minVersion','packageName','1.2.0','15HyHzxq','needsUpgrade','version','dependencies','devDependencies','parse','join','\x20\x20\x20Stable\x20version:\x20','existsSync','↪\x20SDK\x20update\x20available','1344198yDdszT'];a287_0x3a9d=function(){return _0x48a5ff;};return a287_0x3a9d();}async function getSdkStableVersion(){const _0x3584fb=a287_0x2e4f1c;try{const _0x2e6696=await getCdnConfig();return _0x2e6696?.[_0x3584fb(0x20c)]?.['node']?.[_0x3584fb(0x204)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x6f332a=a287_0x2e4f1c;try{const _0x1ee317=await getCdnConfig();return _0x1ee317?.[_0x6f332a(0x20c)]?.[_0x6f332a(0x206)]?.[_0x6f332a(0x1ef)]||_0x6f332a(0x200);}catch{return _0x6f332a(0x200);}}export async function checkSdkVersion(_0x5db37a){const _0x143301=a287_0x2e4f1c,_0x20625b=a287_0x183595[_0x143301(0x1f7)](_0x5db37a,'package.json'),[_0x9c693b,_0x4c7d3d]=await Promise['all']([getSdkStableVersion(),getSdkPackageName()]),_0x37ad5b=_0x9c693b||FALLBACK_MIN_SDK_VERSION;if(!a287_0x34260b[_0x143301(0x1f9)](_0x20625b))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x37ad5b,'packageName':_0x4c7d3d,'stableVersion':_0x9c693b};try{const _0x6b6397=JSON[_0x143301(0x1f6)](a287_0x34260b[_0x143301(0x208)](_0x20625b,_0x143301(0x20e))),_0x20afed=_0x6b6397[_0x143301(0x1f4)]||{},_0x3b2f57=_0x6b6397[_0x143301(0x1f5)]||{},_0x3c7f77=_0x20afed[_0x4c7d3d]||_0x3b2f57[_0x4c7d3d];if(!_0x3c7f77)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x37ad5b,'packageName':_0x4c7d3d,'stableVersion':_0x9c693b};let _0x2527b5=getInstalledVersion(_0x5db37a,_0x4c7d3d);!_0x2527b5&&(_0x2527b5=_0x3c7f77);if(isNonNumericVersion(_0x3c7f77))return{'installed':!![],'version':_0x2527b5,'needsUpgrade':![],'minVersion':_0x37ad5b,'packageName':_0x4c7d3d,'stableVersion':_0x9c693b};const _0x3f1a08=a287_0x4e4cc7['coerce'](_0x2527b5),_0x4c3a93=a287_0x4e4cc7[_0x143301(0x1fd)](_0x37ad5b),_0x313d99=_0x3f1a08&&_0x4c3a93?a287_0x4e4cc7['lt'](_0x3f1a08,_0x4c3a93):![];return{'installed':!![],'version':_0x2527b5,'needsUpgrade':_0x313d99,'minVersion':_0x37ad5b,'packageName':_0x4c7d3d,'stableVersion':_0x9c693b};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x37ad5b,'packageName':_0x4c7d3d,'stableVersion':_0x9c693b};}}export function checkSdkVersionSync(_0xa8a857){const _0x14e9f3=a287_0x2e4f1c,_0x20324f=a287_0x183595[_0x14e9f3(0x1f7)](_0xa8a857,_0x14e9f3(0x209)),_0x27b0a4=_0x14e9f3(0x200);if(!a287_0x34260b[_0x14e9f3(0x1f9)](_0x20324f))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x27b0a4,'stableVersion':null};try{const _0x2a6c45=JSON[_0x14e9f3(0x1f6)](a287_0x34260b[_0x14e9f3(0x208)](_0x20324f,'utf8')),_0x1d301e=_0x2a6c45['dependencies']||{},_0x19befe=_0x2a6c45[_0x14e9f3(0x1f5)]||{},_0x32be55=_0x1d301e[_0x27b0a4]||_0x19befe[_0x27b0a4];if(!_0x32be55)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x27b0a4,'stableVersion':null};let _0x4785b7=getInstalledVersion(_0xa8a857,_0x27b0a4);!_0x4785b7&&(_0x4785b7=_0x32be55);if(isNonNumericVersion(_0x32be55))return{'installed':!![],'version':_0x4785b7,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x27b0a4,'stableVersion':null};const _0x37226d=a287_0x4e4cc7[_0x14e9f3(0x1fd)](_0x4785b7),_0x594cb8=_0x37226d?a287_0x4e4cc7['lt'](_0x37226d,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x4785b7,'needsUpgrade':_0x594cb8,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x27b0a4,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x27b0a4,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x5471aa){const _0x48be67=a287_0x2e4f1c;if(!_0x5471aa[_0x48be67(0x1f2)])return;const _0x569841=_0x48be67(0x20d),_0xc1953e='\x1b[0m',_0x361ef8=_0x48be67(0x210),_0x2c0502=_0x5471aa[_0x48be67(0x1ef)]||_0x48be67(0x200),_0x5d928f=_0x5471aa[_0x48be67(0x204)]||_0x5471aa[_0x48be67(0x211)],_0xd26389=_0x48be67(0x20b)+_0x2c0502+'@'+(_0x5d928f||_0x48be67(0x201));console[_0x48be67(0x205)](),console[_0x48be67(0x205)](''+_0x569841+_0x361ef8+_0x48be67(0x1fa)+_0xc1953e),console[_0x48be67(0x205)](_0x569841+'\x20\x20\x20Current\x20version:\x20'+_0x2c0502+'@'+_0x5471aa[_0x48be67(0x1f3)]+_0xc1953e),console[_0x48be67(0x205)](_0x569841+_0x48be67(0x1f8)+_0x5d928f+_0xc1953e),console[_0x48be67(0x205)](_0x569841+'\x20\x20\x20Upgrade\x20command:\x20'+_0xd26389+_0xc1953e),console[_0x48be67(0x205)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2b78db,_0x29a2c3){const _0x4de4a8=a288_0x145c,_0x584651=_0x2b78db();while(!![]){try{const _0x59d6e5=parseInt(_0x4de4a8(0x1d8))/0x1*(parseInt(_0x4de4a8(0x1d5))/0x2)+parseInt(_0x4de4a8(0x1bb))/0x3+-parseInt(_0x4de4a8(0x1ce))/0x4+parseInt(_0x4de4a8(0x1ba))/0x5+-parseInt(_0x4de4a8(0x1b9))/0x6+parseInt(_0x4de4a8(0x1bf))/0x7*(-parseInt(_0x4de4a8(0x1bc))/0x8)+parseInt(_0x4de4a8(0x1d6))/0x9;if(_0x59d6e5===_0x29a2c3)break;else _0x584651['push'](_0x584651['shift']());}catch(_0x3e3c82){_0x584651['push'](_0x584651['shift']());}}}(a288_0x4f85,0x4e061));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a288_0x3ee7f9 from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x272ff1){const _0x237dc0=a288_0x145c,_0x152e7e=_0x272ff1['stableVersion']||'latest';return _0x237dc0(0x1c0)+NPM_PACKAGE_NAME+'@'+_0x152e7e;}function getCurrentCliVersion(){const _0x4303f2=a288_0x145c;try{const _0x217426=fileURLToPath(import.meta.url),_0x59dcae=resolve(dirname(_0x217426),'../..'),_0x26772e=resolve(_0x59dcae,_0x4303f2(0x1d4)),_0x537cf9=JSON[_0x4303f2(0x1c8)](readFileSync(_0x26772e,_0x4303f2(0x1c2)));return _0x537cf9[_0x4303f2(0x1d0)]||_0x4303f2(0x1c6);}catch{return _0x4303f2(0x1c6);}}export async function checkCliVersion(){const _0x2e75e2=a288_0x145c,_0x39071b=getCurrentCliVersion(),_0x397533=await getCliVersionPolicy(),_0x50473f=_0x397533?.['stableVersion']||null,_0x5aa11c=_0x397533?.['minimumVersion']||null;let _0x1bc356=![],_0x9911b5=![];const _0x355e94=a288_0x3ee7f9[_0x2e75e2(0x1bd)](_0x39071b);if(_0x355e94&&_0x50473f)try{const _0x2b1e02=a288_0x3ee7f9[_0x2e75e2(0x1bd)](_0x50473f);if(_0x2b1e02)_0x1bc356=a288_0x3ee7f9['lt'](_0x355e94,_0x2b1e02);}catch{}if(_0x355e94&&_0x5aa11c)try{const _0x26536b=a288_0x3ee7f9[_0x2e75e2(0x1bd)](_0x5aa11c);if(_0x26536b)_0x9911b5=a288_0x3ee7f9['lt'](_0x355e94,_0x26536b);}catch{}return _0x9911b5&&(_0x1bc356=!![]),{'currentVersion':_0x39071b,'stableVersion':_0x50473f,'minimumVersion':_0x5aa11c,'needsUpgrade':_0x1bc356,'belowMinimum':_0x9911b5,'isPreRelease':![],'upgradeMessage':_0x397533?.[_0x2e75e2(0x1c9)],'minimumVersionMessage':_0x397533?.[_0x2e75e2(0x1d3)]};}export function printCliUpgradeWarning(_0x4bd5c0){const _0x509d68=a288_0x145c;if(!_0x4bd5c0['needsUpgrade']&&!_0x4bd5c0[_0x509d68(0x1da)])return;const _0x4ae185=_0x509d68(0x1c3),_0x5bcab7='\x1b[33m',_0x5091e2=_0x509d68(0x1cc),_0x4c12cf=_0x509d68(0x1c4),_0x3fc319=getCliUpgradeCommand(_0x4bd5c0);console[_0x509d68(0x1db)](),_0x4bd5c0[_0x509d68(0x1da)]?(console[_0x509d68(0x1db)](''+_0x4ae185+_0x4c12cf+'↪\x20Critical\x20CLI\x20upgrade\x20required'+_0x5091e2),console[_0x509d68(0x1db)](_0x4ae185+_0x509d68(0x1dc)+_0x4bd5c0['currentVersion']+_0x5091e2),_0x4bd5c0[_0x509d68(0x1be)]&&console['log'](_0x4ae185+_0x509d68(0x1d2)+_0x4bd5c0['minimumVersion']+_0x5091e2),_0x4bd5c0['stableVersion']&&_0x4bd5c0[_0x509d68(0x1cd)]!==_0x4bd5c0[_0x509d68(0x1be)]&&console[_0x509d68(0x1db)](_0x4ae185+'\x20\x20\x20Recommended\x20stable:\x20'+_0x4bd5c0['stableVersion']+_0x5091e2),_0x4bd5c0[_0x509d68(0x1d3)]&&console[_0x509d68(0x1db)](_0x4ae185+_0x509d68(0x1d1)+_0x4bd5c0['minimumVersionMessage']+_0x5091e2),console[_0x509d68(0x1db)](_0x4ae185+'\x20\x20\x20Upgrade\x20command:\x20'+_0x3fc319+_0x5091e2)):(console[_0x509d68(0x1db)](''+_0x5bcab7+_0x4c12cf+_0x509d68(0x1cf)+_0x5091e2),console[_0x509d68(0x1db)](_0x5bcab7+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x4bd5c0[_0x509d68(0x1ca)]+_0x5091e2),console[_0x509d68(0x1db)](_0x5bcab7+_0x509d68(0x1d7)+_0x4bd5c0[_0x509d68(0x1cd)]+_0x5091e2),_0x4bd5c0['upgradeMessage']&&console[_0x509d68(0x1db)](_0x5bcab7+_0x509d68(0x1d1)+_0x4bd5c0['upgradeMessage']+_0x5091e2),console['log'](_0x5bcab7+'\x20\x20\x20Upgrade\x20command:\x20'+_0x3fc319+_0x5091e2)),console['log']();}export function assertCliVersionSupported(_0x277180){const _0x224bb7=a288_0x145c;if(!_0x277180[_0x224bb7(0x1da)])return;const _0x806bf=[_0x277180[_0x224bb7(0x1d3)],_0x224bb7(0x1c5)+_0x277180[_0x224bb7(0x1ca)],_0x277180[_0x224bb7(0x1be)]?_0x224bb7(0x1d9)+_0x277180[_0x224bb7(0x1be)]:null,_0x224bb7(0x1c1)+getCliUpgradeCommand(_0x277180)][_0x224bb7(0x1c7)](Boolean)[_0x224bb7(0x1dd)]('\x0a');throw CliErrors[_0x224bb7(0x1cb)]('Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.',_0x806bf);}function a288_0x145c(_0x30ad61,_0x27c3b9){_0x30ad61=_0x30ad61-0x1b9;const _0x4f858a=a288_0x4f85();let _0x145c32=_0x4f858a[_0x30ad61];return _0x145c32;}function a288_0x4f85(){const _0x5ac81d=['\x20\x20\x20','\x20\x20\x20Minimum\x20supported:\x20','minimumVersionMessage','package.json','576932koLhHw','729270QFBHud','\x20\x20\x20Stable\x20version:\x20','1rxutJO','Minimum\x20supported:\x20','belowMinimum','log','\x20\x20\x20Current\x20CLI\x20version:\x20','join','211920gHmIoD','1567990HANyjx','749166LzNcur','8Agdfau','coerce','minimumVersion','79877tmamgQ','npm\x20install\x20-g\x20','Upgrade\x20command:\x20','utf-8','\x1b[31m','\x1b[1m','Current\x20version:\x20','1.0.0','filter','parse','upgradeMessage','currentVersion','validation','\x1b[0m','stableVersion','2266000SMHXBe','↪\x20New\x20version\x20available','version'];a288_0x4f85=function(){return _0x5ac81d;};return a288_0x4f85();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x524769,_0x1f47a8){const _0x2058a3=a289_0x38e2,_0xd5e56c=_0x524769();while(!![]){try{const _0x166e28=parseInt(_0x2058a3(0x10c))/0x1+-parseInt(_0x2058a3(0x118))/0x2+-parseInt(_0x2058a3(0x109))/0x3*(parseInt(_0x2058a3(0x111))/0x4)+parseInt(_0x2058a3(0x114))/0x5+parseInt(_0x2058a3(0x11c))/0x6*(-parseInt(_0x2058a3(0x11f))/0x7)+parseInt(_0x2058a3(0x11a))/0x8+-parseInt(_0x2058a3(0x115))/0x9*(parseInt(_0x2058a3(0x112))/0xa);if(_0x166e28===_0x1f47a8)break;else _0xd5e56c['push'](_0xd5e56c['shift']());}catch(_0x5b9533){_0xd5e56c['push'](_0xd5e56c['shift']());}}}(a289_0x16f7,0xf24f2));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(_0x2cbad2){const _0x33b386=a289_0x38e2;return typeof _0x2cbad2===_0x33b386(0x10d)&&_0x2cbad2[_0x33b386(0x113)]()[_0x33b386(0x10e)]>0x0?_0x2cbad2[_0x33b386(0x113)]():null;}function normalizeCliVersionPolicy(_0x5a22ca){const _0x234920=a289_0x38e2;if(!_0x5a22ca||typeof _0x5a22ca!==_0x234920(0x11e))return null;const _0x735d02=_0x5a22ca,_0x19fc74=_0x735d02[_0x234920(0x11d)]&&typeof _0x735d02['cli']===_0x234920(0x11e)?_0x735d02['cli']:_0x735d02,_0x2e261=pickString(_0x19fc74['stableVersion'])||pickString(_0x19fc74[_0x234920(0x10b)])||pickString(_0x19fc74[_0x234920(0x120)]),_0x17a4ee=pickString(_0x19fc74[_0x234920(0x10f)])||pickString(_0x19fc74[_0x234920(0x116)]);if(!_0x2e261&&!_0x17a4ee)return null;return{'stableVersion':_0x2e261,'minimumVersion':_0x17a4ee,'upgradeMessage':pickString(_0x19fc74[_0x234920(0x117)])||undefined,'minimumVersionMessage':pickString(_0x19fc74[_0x234920(0x11b)])||undefined};}export async function fetchRabetbaseCdnConfig(){const _0x40554=a289_0x38e2,_0x512e10=new AbortController(),_0x456779=setTimeout(()=>_0x512e10[_0x40554(0x110)](),FETCH_TIMEOUT_MS);try{const _0x540901=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x40554(0x10a)},'signal':_0x512e10[_0x40554(0x108)]});if(!_0x540901['ok'])return null;const _0x240c21=await _0x540901['json']();return _0x240c21&&typeof _0x240c21===_0x40554(0x11e)?_0x240c21:null;}catch{return null;}finally{clearTimeout(_0x456779);}}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];export async function getRabetbaseCdnConfig(){const _0x5e43dc=a289_0x38e2,_0x54e031=Date[_0x5e43dc(0x119)]();if(hasCachedConfig){const _0x2af114=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x54e031-cacheTime<_0x2af114)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x54e031,hasCachedConfig=!![],cachedConfig;}export async function getCliVersionPolicy(){return normalizeCliVersionPolicy(await getRabetbaseCdnConfig());}function a289_0x16f7(){const _0x3a9570=['minimumVersion','abort','4164436ZDesua','60EtnmMd','trim','8978555VVKXwO','1436967uMIjAO','minVersion','upgradeMessage','812760XMlBEn','now','7366328OCmMcW','minimumVersionMessage','6imDJZU','cli','object','8853901jLrkqw','recommendedVersion','signal','3cqkCUv','application/json','latestVersion','1946306FTVoBa','string','length'];a289_0x16f7=function(){return _0x3a9570;};return a289_0x16f7();}function a289_0x38e2(_0x41f9be,_0x354ef9){_0x41f9be=_0x41f9be-0x108;const _0x16f700=a289_0x16f7();let _0x38e2d1=_0x16f700[_0x41f9be];return _0x38e2d1;}export function clearCliVersionPolicyCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a290_0x4724(){const _0x59ed2f=['1265675kDeBwE','string','3087117AKvjxN','12KkIZoV','113939qHmVel','env','11206266JivjYF','3xiyTfn','3061836iYFbbP','856lDTTpe','1010934ClbQpA','50AxTZpg','410531SeRhnF','8WsneLu'];a290_0x4724=function(){return _0x59ed2f;};return a290_0x4724();}(function(_0x346232,_0x4a1e8c){const _0x1b9516=a290_0x231c,_0x384ff0=_0x346232();while(!![]){try{const _0x3ac7d1=parseInt(_0x1b9516(0x1b3))/0x1*(parseInt(_0x1b9516(0x1b4))/0x2)+-parseInt(_0x1b9516(0x1ae))/0x3*(parseInt(_0x1b9516(0x1af))/0x4)+parseInt(_0x1b9516(0x1b5))/0x5+parseInt(_0x1b9516(0x1bb))/0x6+parseInt(_0x1b9516(0x1b9))/0x7*(-parseInt(_0x1b9516(0x1b0))/0x8)+-parseInt(_0x1b9516(0x1b1))/0x9*(parseInt(_0x1b9516(0x1b2))/0xa)+-parseInt(_0x1b9516(0x1b7))/0xb*(-parseInt(_0x1b9516(0x1b8))/0xc);if(_0x3ac7d1===_0x4a1e8c)break;else _0x384ff0['push'](_0x384ff0['shift']());}catch(_0x5d9723){_0x384ff0['push'](_0x384ff0['shift']());}}}(a290_0x4724,0xee029));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a290_0x112ca9,getMultiAppConfigs as a290_0x70082c,getTemplateBaseUrl as a290_0x147825}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';function a290_0x231c(_0x4061f1,_0x56f73e){_0x4061f1=_0x4061f1-0x1ae;const _0x4724fb=a290_0x4724();let _0x231c1f=_0x4724fb[_0x4061f1];return _0x231c1f;}export{isInProject}from'../context.js';export function readConfig(_0x1cfb47){const _0x4e1a28=a290_0x231c,_0x38f0d1=readRawConfig(_0x1cfb47);return _0x38f0d1[_0x4e1a28(0x1ba)]&&typeof _0x38f0d1[_0x4e1a28(0x1ba)]===_0x4e1a28(0x1b6)&&initEnv(_0x38f0d1[_0x4e1a28(0x1ba)]),_0x38f0d1;}export function getConfigAppCode(){return a290_0x112ca9();}export function getMultiAppConfigs(_0x46a4d5='project'){return a290_0x70082c(_0x46a4d5);}export function getTemplateBaseUrl(){return a290_0x147825();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a291_0x2e19(_0x5c7f22,_0x517454){_0x5c7f22=_0x5c7f22-0x1af;const _0x3137b4=a291_0x3137();let _0x2e197d=_0x3137b4[_0x5c7f22];return _0x2e197d;}function a291_0x3137(){const _0x4933f2=['12Idihxv','355838xwonUf','11uMhTJH','isFinite','6028730tfrdAl','171895XCoLGS','32ZFKDGy','347767flLEPF','235840cweTxK','string','31205vQlwkk','3aXlbCs','number','2042172SfXhLL'];a291_0x3137=function(){return _0x4933f2;};return a291_0x3137();}(function(_0x43ac9b,_0x3da4a1){const _0x37afdc=a291_0x2e19,_0x22321d=_0x43ac9b();while(!![]){try{const _0x59533e=parseInt(_0x37afdc(0x1af))/0x1+-parseInt(_0x37afdc(0x1b9))/0x2*(-parseInt(_0x37afdc(0x1b5))/0x3)+-parseInt(_0x37afdc(0x1b2))/0x4+parseInt(_0x37afdc(0x1b4))/0x5*(parseInt(_0x37afdc(0x1b8))/0x6)+parseInt(_0x37afdc(0x1b1))/0x7*(parseInt(_0x37afdc(0x1b0))/0x8)+parseInt(_0x37afdc(0x1b7))/0x9+-parseInt(_0x37afdc(0x1bc))/0xa*(parseInt(_0x37afdc(0x1ba))/0xb);if(_0x59533e===_0x3da4a1)break;else _0x22321d['push'](_0x22321d['shift']());}catch(_0x9f7739){_0x22321d['push'](_0x22321d['shift']());}}}(a291_0x3137,0x1ec8f));function toFiniteNumber(_0x5dc08b){const _0x55bb02=a291_0x2e19;if(typeof _0x5dc08b===_0x55bb02(0x1b6)&&Number[_0x55bb02(0x1bb)](_0x5dc08b))return _0x5dc08b;if(typeof _0x5dc08b===_0x55bb02(0x1b3)){const _0x4cd7d5=_0x5dc08b['trim']();if(!_0x4cd7d5)return undefined;const _0x2e9fd7=Number(_0x4cd7d5);if(Number['isFinite'](_0x2e9fd7))return _0x2e9fd7;}return undefined;}export function normalizeEntityWithIdResponse(_0x47a9d1){const _0x4ebe7b=toFiniteNumber(_0x47a9d1);if(_0x4ebe7b!==undefined)return{'id':_0x4ebe7b,'entity':{'id':_0x4ebe7b}};if(!_0x47a9d1||typeof _0x47a9d1!=='object')return{'id':undefined,'entity':{}};const _0x5cc864={..._0x47a9d1},_0x2b7990=toFiniteNumber(_0x5cc864['id']);return _0x2b7990!==undefined&&(_0x5cc864['id']=_0x2b7990),{'id':_0x2b7990,'entity':_0x5cc864};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2ad2a9,_0x47a90e){const _0x36596d=a292_0xb0b1,_0x55c4de=_0x2ad2a9();while(!![]){try{const _0x150fa2=parseInt(_0x36596d(0xb0))/0x1*(parseInt(_0x36596d(0xa9))/0x2)+-parseInt(_0x36596d(0xab))/0x3+parseInt(_0x36596d(0xaa))/0x4+-parseInt(_0x36596d(0xaf))/0x5*(parseInt(_0x36596d(0xb2))/0x6)+-parseInt(_0x36596d(0xac))/0x7*(-parseInt(_0x36596d(0xae))/0x8)+parseInt(_0x36596d(0xa8))/0x9+-parseInt(_0x36596d(0xad))/0xa*(parseInt(_0x36596d(0xb1))/0xb);if(_0x150fa2===_0x47a90e)break;else _0x55c4de['push'](_0x55c4de['shift']());}catch(_0xf53ac3){_0x55c4de['push'](_0x55c4de['shift']());}}}(a292_0x3e13,0x77efd));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';function a292_0xb0b1(_0x3afb06,_0x570710){_0x3afb06=_0x3afb06-0xa7;const _0x3e13c2=a292_0x3e13();let _0xb0b127=_0x3e13c2[_0x3afb06];return _0xb0b127;}import{join}from'node:path';function a292_0x3e13(){const _0x26ad21=['4iDPeJE','2960124MgvCnW','2013957aNpQic','49jTvKIK','3034690YAHACO','624968pvupPT','32265pecGet','75077PDXxoJ','11KYOCrC','150FfsCfN','isDirectory','1713078FvMOxt'];a292_0x3e13=function(){return _0x26ad21;};return a292_0x3e13();}export async function copyDir(_0x537e84,_0x50e8cd){const _0x2a6a73=a292_0xb0b1,_0x5a9a1b=statSync(_0x537e84);if(_0x5a9a1b[_0x2a6a73(0xa7)]()){!existsSync(_0x50e8cd)&&mkdirSync(_0x50e8cd,{'recursive':!![]});const _0x252f4d=readdirSync(_0x537e84);for(const _0x595887 of _0x252f4d){await copyDir(join(_0x537e84,_0x595887),join(_0x50e8cd,_0x595887));}}else copyFileSync(_0x537e84,_0x50e8cd);}export function ensureDir(_0x294c5c){!existsSync(_0x294c5c)&&mkdirSync(_0x294c5c,{'recursive':!![]});}export function pathExists(_0x579cab){return existsSync(_0x579cab);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a293_0x826507=a293_0x26c2;function a293_0x4678(){const _0xfa3ec8=['application/json','skillTemplate','/skills/guides.json','.lovrabet','join','171rToove','CDN\x20request\x20failed:\x20','720yFtvhN','26fXoFkA','2589220PPyBqQ','entries','json','guides','statusText','lastUpdated','length','748ZkSSKC','21699ebVGhr','\x0a\x0a>更新时间:','11Ibgvdw','replace','content','10cCNOls','1698424lXqszv','object','124CmjWFe','289272DgSljf','keys','title','CDN\x20data\x20is\x20missing\x20skillTemplate','628164RgSyvE','21261nJbOkR','utf-8','path','extendContent'];a293_0x4678=function(){return _0xfa3ec8;};return a293_0x4678();}(function(_0x21ca7,_0x37c245){const _0x3cc89c=a293_0x26c2,_0x44c289=_0x21ca7();while(!![]){try{const _0x50ecfb=parseInt(_0x3cc89c(0xab))/0x1*(-parseInt(_0x3cc89c(0xb6))/0x2)+parseInt(_0x3cc89c(0xc5))/0x3*(parseInt(_0x3cc89c(0xbf))/0x4)+-parseInt(_0x3cc89c(0xbc))/0x5*(parseInt(_0x3cc89c(0xc4))/0x6)+-parseInt(_0x3cc89c(0xbd))/0x7+-parseInt(_0x3cc89c(0xad))/0x8*(-parseInt(_0x3cc89c(0xb7))/0x9)+-parseInt(_0x3cc89c(0xaf))/0xa*(-parseInt(_0x3cc89c(0xb9))/0xb)+parseInt(_0x3cc89c(0xc0))/0xc*(-parseInt(_0x3cc89c(0xae))/0xd);if(_0x50ecfb===_0x37c245)break;else _0x44c289['push'](_0x44c289['shift']());}catch(_0x37f37c){_0x44c289['push'](_0x44c289['shift']());}}}(a293_0x4678,0x2015f));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 _0x18d917=a293_0x26c2,_0x12b2cc=getTemplateBaseUrl();return _0x12b2cc+_0x18d917(0xcb);}const CACHE_DIR=join(homedir(),a293_0x826507(0xcc),'cache');export async function fetchGuidesFromCDN(){const _0xa6f005=a293_0x826507,_0x25ab61=getGuidesCdnUrl(),_0x7aa521=await fetch(_0x25ab61,{'headers':{'Accept':_0xa6f005(0xc9)}});if(!_0x7aa521['ok'])throw new Error(_0xa6f005(0xac)+_0x7aa521['status']+'\x20'+_0x7aa521[_0xa6f005(0xb3)]);const _0x2e3c0c=await _0x7aa521[_0xa6f005(0xb1)]();if(!_0x2e3c0c['guides']||typeof _0x2e3c0c[_0xa6f005(0xb2)]!==_0xa6f005(0xbe))throw new Error('CDN\x20returned\x20invalid\x20data');return _0x2e3c0c;}export function writeGuidesToProject(_0x3954bf,_0x247b55,_0x39f1e9='.lovrabet/skill/guides',_0x21c7af){const _0x53599d=a293_0x826507,_0xbcf08=join(_0x247b55,_0x39f1e9);mkdirSync(_0xbcf08,{'recursive':!![]});for(const [_0x2de608,_0xf3c8db]of Object[_0x53599d(0xb0)](_0x3954bf[_0x53599d(0xb2)])){let _0x5b50cf=_0xf3c8db[_0x53599d(0xbb)];_0xf3c8db[_0x53599d(0xb4)]&&(_0x5b50cf=appendUpdateTime(_0x5b50cf,_0xf3c8db['lastUpdated'])),writeFileSync(join(_0xbcf08,_0x2de608+'.md'),_0x5b50cf,_0x53599d(0xc6));}}export function appendUpdateTime(_0xe7eecd,_0x5f10fd){const _0xebe285=a293_0x826507;return _0xe7eecd=_0xe7eecd[_0xebe285(0xba)](/\n*>更新时间:.*$/m,''),_0xe7eecd['trimEnd']()+(_0xebe285(0xb8)+_0x5f10fd);}export function getSkillTemplate(_0x583ca6){const _0x3b2ea5=a293_0x826507;return _0x583ca6[_0x3b2ea5(0xca)]?.[_0x3b2ea5(0xbb)]||'';}export function appendExtendContents(_0xa08f5a,_0x546356,_0x4981da){const _0x45c8e6=a293_0x826507,_0x4910a6=[];for(const [,_0x1b957c]of Object[_0x45c8e6(0xb0)](_0x546356[_0x45c8e6(0xb2)])){_0x1b957c[_0x45c8e6(0xc8)]&&_0x4910a6['push'](_0x1b957c[_0x45c8e6(0xc8)]['trimEnd']());}if(_0x4910a6[_0x45c8e6(0xb5)]===0x0)return _0xa08f5a;return _0xa08f5a['trimEnd']()+'\x0a\x0a'+_0x4910a6[_0x45c8e6(0xcd)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x2f3808,_0x5f1947,_0x523998){const _0x53ec3d=a293_0x826507,_0x1a1c19=getSkillTemplate(_0x2f3808);if(!_0x1a1c19)throw new Error(_0x53ec3d(0xc3));const _0x22cac4=dirname(_0x5f1947);mkdirSync(_0x22cac4,{'recursive':!![]});let _0x26e219=_0x1a1c19[_0x53ec3d(0xba)](/\{\{IDE_NAME\}\}/g,_0x523998);_0x26e219=appendExtendContents(_0x26e219,_0x2f3808),_0x2f3808[_0x53ec3d(0xca)][_0x53ec3d(0xb4)]&&(_0x26e219=appendUpdateTime(_0x26e219,_0x2f3808['skillTemplate'][_0x53ec3d(0xb4)])),writeFileSync(_0x5f1947,_0x26e219,'utf-8');}function a293_0x26c2(_0xca7e8e,_0x5f16d3){_0xca7e8e=_0xca7e8e-0xab;const _0x46782c=a293_0x4678();let _0x26c2e1=_0x46782c[_0xca7e8e];return _0x26c2e1;}export async function installGuides(_0x1a5556){const _0xf03c07=a293_0x826507,_0x45a263=await fetchGuidesFromCDN();return writeGuidesToProject(_0x45a263,_0x1a5556),Object[_0xf03c07(0xc1)](_0x45a263[_0xf03c07(0xb2)])[_0xf03c07(0xb5)];}export function getGuidesSummary(_0x2c02de){const _0x569078=a293_0x826507;return Object[_0x569078(0xb0)](_0x2c02de[_0x569078(0xb2)])['map'](([_0x22ad27,_0x585552])=>({'key':_0x22ad27,'title':_0x585552[_0x569078(0xc2)],'path':_0x585552[_0x569078(0xc7)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x260eb1,_0x235bb0){const _0x35f484=a294_0x5ed4,_0x52eb10=_0x260eb1();while(!![]){try{const _0x3e8aa9=-parseInt(_0x35f484(0x155))/0x1*(parseInt(_0x35f484(0x143))/0x2)+parseInt(_0x35f484(0x157))/0x3*(-parseInt(_0x35f484(0x158))/0x4)+-parseInt(_0x35f484(0x149))/0x5*(-parseInt(_0x35f484(0x145))/0x6)+parseInt(_0x35f484(0x13c))/0x7+-parseInt(_0x35f484(0x140))/0x8*(parseInt(_0x35f484(0x151))/0x9)+parseInt(_0x35f484(0x147))/0xa*(parseInt(_0x35f484(0x13e))/0xb)+parseInt(_0x35f484(0x14c))/0xc;if(_0x3e8aa9===_0x235bb0)break;else _0x52eb10['push'](_0x52eb10['shift']());}catch(_0x21c6fe){_0x52eb10['push'](_0x52eb10['shift']());}}}(a294_0x4d6a,0xe7607));function a294_0x5ed4(_0x5ef9dd,_0x31787f){_0x5ef9dd=_0x5ef9dd-0x13a;const _0x4d6aef=a294_0x4d6a();let _0x5ed415=_0x4d6aef[_0x5ef9dd];return _0x5ed415;}export async function httpRequest(_0x303a13,_0x10dabf={}){const _0x49573a=a294_0x5ed4,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x10dabf;let _0x45bb9d=null;for(let _0x31a040=0x0;_0x31a040<=retries;_0x31a040++){try{const _0x2cbafc=new AbortController(),_0x433800=setTimeout(()=>_0x2cbafc['abort'](),timeout),_0x2ad535=await fetch(_0x303a13,{'headers':headers,'signal':_0x2cbafc[_0x49573a(0x14a)]});clearTimeout(_0x433800);let _0x5e4484;const _0x21be14=_0x2ad535[_0x49573a(0x14d)][_0x49573a(0x14e)]('content-type');return _0x21be14?.['includes'](_0x49573a(0x150))?_0x5e4484=await _0x2ad535[_0x49573a(0x14f)]():_0x5e4484=await _0x2ad535['text'](),{'ok':_0x2ad535['ok'],'status':_0x2ad535[_0x49573a(0x141)],'statusText':_0x2ad535[_0x49573a(0x142)],'data':_0x5e4484,'headers':_0x2ad535[_0x49573a(0x14d)],'url':_0x2ad535[_0x49573a(0x156)],'text':()=>_0x2ad535['text']()};}catch(_0x15e33d){_0x45bb9d=_0x15e33d instanceof Error?_0x15e33d:new Error(String(_0x15e33d));if(_0x31a040===retries)break;if(shouldRetry(_0x15e33d)){console[_0x49573a(0x144)](_0x49573a(0x152)+(_0x31a040+0x1)+_0x49573a(0x13d)+retryDelay+_0x49573a(0x153)),await sleep(retryDelay);continue;}else break;}}throw _0x45bb9d||new Error('Request\x20failed');}function a294_0x4d6a(){const _0x4f4187=['headers','get','json','application/json','153fBMoFL','*\x20Request\x20failed;\x20retry\x20','ms...','message','6azFsXg','url','543eFeRZF','4356RtpjvJ','AbortError','includes','12141360IjKuRH','\x20in\x20','11rTyjkn','name','845048HKZzSu','status','statusText','414292kNLGsa','log','86202eeqEtD','ECONNRESET','2002270uiWztE','fetch','325kKfBoP','signal','ENOTFOUND','15778428eCxNdx'];a294_0x4d6a=function(){return _0x4f4187;};return a294_0x4d6a();}function shouldRetry(_0x22e434){const _0xef120c=a294_0x5ed4;if(_0x22e434 instanceof Error){if(_0x22e434[_0xef120c(0x13f)]===_0xef120c(0x13a))return![];if(_0x22e434['name']==='TypeError'&&_0x22e434[_0xef120c(0x154)][_0xef120c(0x13b)](_0xef120c(0x148)))return!![];if(_0x22e434[_0xef120c(0x154)]['includes'](_0xef120c(0x146)))return!![];if(_0x22e434['message']['includes'](_0xef120c(0x14b)))return![];}return![];}function sleep(_0x58397c){return new Promise(_0x25065e=>setTimeout(_0x25065e,_0x58397c));}export function validateUrl(_0x5b218d){try{return new URL(_0x5b218d),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4b7c71,_0x29ec0f){const _0x1c62a4=a295_0x531e,_0x4bf978=_0x4b7c71();while(!![]){try{const _0x12dbc2=parseInt(_0x1c62a4(0x1d6))/0x1*(parseInt(_0x1c62a4(0x1ce))/0x2)+-parseInt(_0x1c62a4(0x1d4))/0x3*(-parseInt(_0x1c62a4(0x1cf))/0x4)+-parseInt(_0x1c62a4(0x1d5))/0x5+parseInt(_0x1c62a4(0x1d7))/0x6*(parseInt(_0x1c62a4(0x1d9))/0x7)+parseInt(_0x1c62a4(0x1cb))/0x8+parseInt(_0x1c62a4(0x1cc))/0x9*(parseInt(_0x1c62a4(0x1d1))/0xa)+-parseInt(_0x1c62a4(0x1d8))/0xb;if(_0x12dbc2===_0x29ec0f)break;else _0x4bf978['push'](_0x4bf978['shift']());}catch(_0x53d18f){_0x4bf978['push'](_0x4bf978['shift']());}}}(a295_0x3c0f,0x189ba));function env(_0x369d29){return process.env[`RABETBASE_${_0x369d29}`]||process.env[`LOVRABET_${_0x369d29}`]||undefined;}export function isNonInteractive(_0x14d85){const _0x40ab61=a295_0x531e;return!!(_0x14d85[_0x40ab61(0x1cd)]||_0x14d85['ci']||env('CI')===_0x40ab61(0x1c9)||process.env.CI==='true'||!process[_0x40ab61(0x1ca)]['isTTY']||!isStdinRawModeSupported());}function a295_0x3c0f(){const _0x4b0814=['stdout','845472graEtg','706194ByQxKq','nonInteractive','3056MFYNmu','6008uhwRUE','isRaw','10ovooJK','stdin','setRawMode','9ntcPIO','398605hmdAAz','44XnMJZx','64116XwkePB','1064195NFaFVl','14kDdAMe','true'];a295_0x3c0f=function(){return _0x4b0814;};return a295_0x3c0f();}function a295_0x531e(_0x16549b,_0x9cddaf){_0x16549b=_0x16549b-0x1c9;const _0x3c0fc0=a295_0x3c0f();let _0x531eb4=_0x3c0fc0[_0x16549b];return _0x531eb4;}function isStdinRawModeSupported(){const _0x42a675=a295_0x531e;if(!process[_0x42a675(0x1d2)]['isTTY'])return![];try{const _0x30d648=process[_0x42a675(0x1d2)][_0x42a675(0x1d0)];return process[_0x42a675(0x1d2)][_0x42a675(0x1d3)](!![]),process['stdin'][_0x42a675(0x1d3)](_0x30d648??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a296_0x5330(_0x334c3a,_0x39118b){_0x334c3a=_0x334c3a-0x11d;const _0x362c29=a296_0x362c();let _0x53305a=_0x362c29[_0x334c3a];return _0x53305a;}const a296_0x1b7c83=a296_0x5330;(function(_0x9874e,_0x8d1c7a){const _0x3a8c9b=a296_0x5330,_0x1bd49c=_0x9874e();while(!![]){try{const _0x390c44=parseInt(_0x3a8c9b(0x120))/0x1*(parseInt(_0x3a8c9b(0x14c))/0x2)+parseInt(_0x3a8c9b(0x12e))/0x3*(-parseInt(_0x3a8c9b(0x152))/0x4)+parseInt(_0x3a8c9b(0x133))/0x5+-parseInt(_0x3a8c9b(0x123))/0x6*(parseInt(_0x3a8c9b(0x131))/0x7)+-parseInt(_0x3a8c9b(0x12d))/0x8*(-parseInt(_0x3a8c9b(0x150))/0x9)+-parseInt(_0x3a8c9b(0x14a))/0xa*(parseInt(_0x3a8c9b(0x11f))/0xb)+parseInt(_0x3a8c9b(0x140))/0xc;if(_0x390c44===_0x8d1c7a)break;else _0x1bd49c['push'](_0x1bd49c['shift']());}catch(_0x531c0a){_0x1bd49c['push'](_0x1bd49c['shift']());}}}(a296_0x362c,0x895db));import a296_0x3a9f7d from'winston';function a296_0x362c(){const _0xf8de5f=['360xaJNZV','readLogs','12GzrFBS','message','parse','details','success','utf8','1355398IaWGYN','170082SflxqF','clear','timestamp','6kWyYEW','red','currentRawCommand','green','Starting:\x20','setLogPath','format','logTask','now','addColors','34088pCNjVY','1035417oQOSaO','filter','printf','2662898BXzdqx','clearLogs','1317320EuRrbi','unknown','.lovrabet.log','duration','info','error','errors','writeFileSync','warn','File','createLogger','rawCommand','Failed\x20to\x20read\x20logs:','17972568HSnZFL','existsSync','map','winstonLogger','logFilePath','setRawCommand','command','combine','Completed:\x20','blue','10nzcwnX','stringify','2upCcXz','initWinstonLogger','getWinstonInstance','split'];a296_0x362c=function(){return _0xf8de5f;};return a296_0x362c();}import a296_0x491a44 from'node:fs';import a296_0xd00696 from'node:path';class Logger{[a296_0x1b7c83(0x143)];[a296_0x1b7c83(0x144)];[a296_0x1b7c83(0x125)]='';constructor(){this['logFilePath']='';}[a296_0x1b7c83(0x145)](_0x55b01b){const _0x4b93d5=a296_0x1b7c83;this[_0x4b93d5(0x125)]=_0x55b01b;}[a296_0x1b7c83(0x14d)](){const _0x5de846=a296_0x1b7c83,_0x332948=a296_0xd00696['dirname'](this[_0x5de846(0x144)]);!a296_0x491a44[_0x5de846(0x141)](_0x332948)&&a296_0x491a44['mkdirSync'](_0x332948,{'recursive':!![]});const _0x3fc5d5=a296_0x3a9f7d[_0x5de846(0x129)][_0x5de846(0x147)](a296_0x3a9f7d[_0x5de846(0x129)][_0x5de846(0x122)](),a296_0x3a9f7d[_0x5de846(0x129)][_0x5de846(0x139)]({'stack':!![]}),a296_0x3a9f7d[_0x5de846(0x129)][_0x5de846(0x130)](_0x435723=>{const _0x32b78e=_0x5de846,_0x599118={'timestamp':_0x435723[_0x32b78e(0x122)]||new Date()['toISOString'](),'level':_0x435723['level']||'info','command':_0x435723[_0x32b78e(0x146)]||_0x32b78e(0x134),'rawCommand':_0x435723[_0x32b78e(0x13e)]||this[_0x32b78e(0x125)]||undefined,'message':_0x435723[_0x32b78e(0x153)]||'','duration':_0x435723[_0x32b78e(0x136)]||undefined,'details':_0x435723[_0x32b78e(0x155)]||undefined};return JSON[_0x32b78e(0x14b)](_0x599118);}));this[_0x5de846(0x143)]=a296_0x3a9f7d[_0x5de846(0x13d)]({'level':'info','format':_0x3fc5d5,'transports':[new a296_0x3a9f7d['transports'][(_0x5de846(0x13c))]({'filename':this['logFilePath'],'level':'info'})],'silent':![]}),a296_0x3a9f7d[_0x5de846(0x12c)]({'success':_0x5de846(0x126),'error':_0x5de846(0x124),'warn':'yellow','info':_0x5de846(0x149)});}[a296_0x1b7c83(0x128)](_0x3c25e9){const _0x572609=a296_0x1b7c83;this[_0x572609(0x144)]=a296_0xd00696['join'](_0x3c25e9,_0x572609(0x135)),this[_0x572609(0x143)]&&this[_0x572609(0x143)][_0x572609(0x121)](),this['initWinstonLogger']();}[a296_0x1b7c83(0x137)](_0x4a3550,_0x1e1caa,_0x33ab01){const _0x1b3bf6=a296_0x1b7c83;if(!this[_0x1b3bf6(0x144)]||!this['winstonLogger'])return;this[_0x1b3bf6(0x143)][_0x1b3bf6(0x137)](_0x1e1caa,{'command':_0x4a3550,'details':_0x33ab01});}[a296_0x1b7c83(0x11d)](_0x2ad04e,_0x214719,_0x334fd7,_0x1bf39d){const _0x44c23c=a296_0x1b7c83;if(!this[_0x44c23c(0x144)]||!this[_0x44c23c(0x143)])return;this[_0x44c23c(0x143)]['log'](_0x44c23c(0x137),_0x214719,{'level':_0x44c23c(0x11d),'command':_0x2ad04e,'duration':_0x334fd7,'details':_0x1bf39d});}[a296_0x1b7c83(0x138)](_0xa5b380,_0x4bebfb,_0x22a65e){const _0x17fde5=a296_0x1b7c83;if(!this[_0x17fde5(0x144)]||!this['winstonLogger'])return;this[_0x17fde5(0x143)][_0x17fde5(0x138)](_0x4bebfb,{'command':_0xa5b380,'details':_0x22a65e});}[a296_0x1b7c83(0x13b)](_0x4676de,_0x5e0c18,_0x31c11a){const _0x17d148=a296_0x1b7c83;if(!this[_0x17d148(0x144)]||!this[_0x17d148(0x143)])return;this[_0x17d148(0x143)]['warn'](_0x5e0c18,{'command':_0x4676de,'details':_0x31c11a});}async[a296_0x1b7c83(0x12a)](_0x5aa8e4,_0x396869,_0x606a31){const _0x5d199c=a296_0x1b7c83,_0x24e260=Date[_0x5d199c(0x12b)]();this[_0x5d199c(0x137)](_0x5aa8e4,_0x5d199c(0x127)+_0x396869);try{const _0x596b8a=await _0x606a31(),_0x17dee8=Date[_0x5d199c(0x12b)]()-_0x24e260;return this[_0x5d199c(0x11d)](_0x5aa8e4,_0x5d199c(0x148)+_0x396869,_0x17dee8),_0x596b8a;}catch(_0x8b0f19){const _0x1c3507=Date[_0x5d199c(0x12b)]()-_0x24e260;this['error'](_0x5aa8e4,'Failed:\x20'+_0x396869,{'error':_0x8b0f19 instanceof Error?_0x8b0f19[_0x5d199c(0x153)]:String(_0x8b0f19),'duration':_0x1c3507});throw _0x8b0f19;}}[a296_0x1b7c83(0x151)](){const _0x35d7d3=a296_0x1b7c83;try{if(!a296_0x491a44['existsSync'](this['logFilePath']))return[];const _0x4bc722=a296_0x491a44['readFileSync'](this[_0x35d7d3(0x144)],_0x35d7d3(0x11e));return _0x4bc722[_0x35d7d3(0x14f)]('\x0a')[_0x35d7d3(0x12f)](_0x277fcf=>_0x277fcf['trim']())[_0x35d7d3(0x142)](_0x32ecde=>JSON[_0x35d7d3(0x154)](_0x32ecde));}catch(_0x52aec2){return console['warn'](_0x35d7d3(0x13f),_0x52aec2),[];}}[a296_0x1b7c83(0x132)](){const _0x2e7e98=a296_0x1b7c83;try{a296_0x491a44[_0x2e7e98(0x141)](this['logFilePath'])&&a296_0x491a44[_0x2e7e98(0x13a)](this['logFilePath'],'',_0x2e7e98(0x11e));}catch(_0x4eb0e8){console[_0x2e7e98(0x13b)]('Failed\x20to\x20clear\x20logs:',_0x4eb0e8);}}[a296_0x1b7c83(0x14e)](){const _0x33e86a=a296_0x1b7c83;return this[_0x33e86a(0x143)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xe70e9f,_0x12c96c){const _0x3083d6=a297_0x387d,_0x2ddff0=_0xe70e9f();while(!![]){try{const _0x5308b6=-parseInt(_0x3083d6(0xa2))/0x1+parseInt(_0x3083d6(0x9d))/0x2+parseInt(_0x3083d6(0xa3))/0x3+-parseInt(_0x3083d6(0xa1))/0x4+parseInt(_0x3083d6(0xa0))/0x5*(parseInt(_0x3083d6(0x9f))/0x6)+-parseInt(_0x3083d6(0x9c))/0x7+parseInt(_0x3083d6(0xa7))/0x8;if(_0x5308b6===_0x12c96c)break;else _0x2ddff0['push'](_0x2ddff0['shift']());}catch(_0x2f37ac){_0x2ddff0['push'](_0x2ddff0['shift']());}}}(a297_0x8c29,0x390d2));function a297_0x8c29(){const _0x3cdfba=['914808BczvPQ','458380nalTCO','663210RXdLsC','validation','object','--params\x20must\x20be\x20a\x20JSON\x20object','1518680rRBVaE','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','270417pCrFyL','450072cJzFmU','Invalid\x20JSON\x20for\x20--params:\x20','1940724JYKFbi','5tflPQb'];a297_0x8c29=function(){return _0x3cdfba;};return a297_0x8c29();}function a297_0x387d(_0xed5013,_0x293791){_0xed5013=_0xed5013-0x9c;const _0x8c29d9=a297_0x8c29();let _0x387dd8=_0x8c29d9[_0xed5013];return _0x387dd8;}import{CliErrors}from'../errors.js';export function parseJsonParams(_0x36bf81){const _0x1dfad9=a297_0x387d;if(!_0x36bf81)return undefined;let _0x59241c;try{_0x59241c=JSON['parse'](_0x36bf81);}catch{throw CliErrors[_0x1dfad9(0xa4)](_0x1dfad9(0x9e)+_0x36bf81);}if(!_0x59241c||typeof _0x59241c!==_0x1dfad9(0xa5)||Array['isArray'](_0x59241c))throw CliErrors[_0x1dfad9(0xa4)](_0x1dfad9(0xa6),_0x1dfad9(0xa8));return _0x59241c;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a298_0x5d6b8e=a298_0x58a5;(function(_0x22a8b1,_0xb21fe6){const _0x3294b6=a298_0x58a5,_0x47de0f=_0x22a8b1();while(!![]){try{const _0x4dad09=-parseInt(_0x3294b6(0x16b))/0x1*(parseInt(_0x3294b6(0x168))/0x2)+-parseInt(_0x3294b6(0x16c))/0x3+-parseInt(_0x3294b6(0x169))/0x4+parseInt(_0x3294b6(0x16e))/0x5+parseInt(_0x3294b6(0x16a))/0x6+parseInt(_0x3294b6(0x170))/0x7+-parseInt(_0x3294b6(0x16d))/0x8;if(_0x4dad09===_0xb21fe6)break;else _0x47de0f['push'](_0x47de0f['shift']());}catch(_0x3ef094){_0x47de0f['push'](_0x47de0f['shift']());}}}(a298_0x170a,0x27805));export const isWindows=process['platform']===a298_0x5d6b8e(0x16f);function a298_0x58a5(_0x22ec1e,_0x38a810){_0x22ec1e=_0x22ec1e-0x168;const _0x170ab4=a298_0x170a();let _0x58a556=_0x170ab4[_0x22ec1e];return _0x58a556;}function a298_0x170a(){const _0xce9da9=['1RJtZbb','714957GactQF','1728448fYkdzh','1583485jWvSoE','win32','1585836ywsXPp','22510FOgalX','521216rWsuYz','1286916DTObbN'];a298_0x170a=function(){return _0xce9da9;};return a298_0x170a();}export function resolveNpmBin(_0x41963d){return isWindows?_0x41963d+'.cmd':_0x41963d;}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x4c7ea0){return new Promise(_0x216e60=>setTimeout(_0x216e60,_0x4c7ea0));}
|