@lovrabet/rabetbase-cli 2.3.16-beta.2 → 2.3.16-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/README.md +1 -1
- 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/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/get.js +1 -1
- package/lib/commands/config/index.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/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.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.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/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/init/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/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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.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/react/create.js +1 -0
- package/lib/commands/page/react/detail.js +1 -0
- package/lib/commands/page/react/list.js +1 -0
- package/lib/commands/page/react/publish.js +1 -0
- package/lib/commands/page/react/shared.js +1 -0
- package/lib/commands/page/react/syntax.js +1 -0
- package/lib/commands/page/react/template.js +1 -0
- package/lib/commands/page/react/update.js +1 -0
- 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/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.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/non-interactive.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/create.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/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.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/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.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.js +1 -1
- package/lib/help.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/copy-directory.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/rules-cdn.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/templates/projects/sub-app-react-demo/CHANGELOG.md +1 -1
- package/templates/projects/sub-app-react-demo/README.md +1 -1
- package/templates/projects/sub-app-react-demo/docs/quick-start.md +1 -1
- package/templates/projects/sub-app-react-demo/src/pages/index.tsx +1 -1
- package/lib/commands/project/init.js +0 -1
- package/lib/commands/sql/save.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xb15287,_0x2a3042){const _0x57fefe=a247_0x21d9,_0xee65cf=_0xb15287();while(!![]){try{const _0x45241a=-parseInt(_0x57fefe(0x7d))/0x1*(parseInt(_0x57fefe(0x86))/0x2)+parseInt(_0x57fefe(0x80))/0x3*(parseInt(_0x57fefe(0x7a))/0x4)+-parseInt(_0x57fefe(0x84))/0x5*(parseInt(_0x57fefe(0x83))/0x6)+parseInt(_0x57fefe(0x7e))/0x7*(parseInt(_0x57fefe(0x85))/0x8)+-parseInt(_0x57fefe(0x87))/0x9*(-parseInt(_0x57fefe(0x81))/0xa)+parseInt(_0x57fefe(0x7b))/0xb*(-parseInt(_0x57fefe(0x7f))/0xc)+parseInt(_0x57fefe(0x7c))/0xd;if(_0x45241a===_0x2a3042)break;else _0xee65cf['push'](_0xee65cf['shift']());}catch(_0x5079cf){_0xee65cf['push'](_0xee65cf['shift']());}}}(a247_0x422f,0xa468b));function a247_0x422f(){const _0xe0fcd3=['27pWWhml','43240dbKdQz','../commands/registry.js','1345188OpYzNd','15juiUCG','24WuiSMg','2137090NILfJl','2061YnMmFq','156248WNSSfI','42361CLfLhH','16712475MqsoTG','1xCclha','348187TEPuGt','1128dHwIaH'];a247_0x422f=function(){return _0xe0fcd3;};return a247_0x422f();}import{buildSchemaPayload as a247_0x3b97c2}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';function a247_0x21d9(_0x1091b7,_0x4634a6){_0x1091b7=_0x1091b7-0x7a;const _0x422fe8=a247_0x422f();let _0x21d9db=_0x422fe8[_0x1091b7];return _0x21d9db;}import{getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x5a237b=a247_0x21d9,{serviceRegistry:_0x14257c,findDefinition:_0x558455}=await import(_0x5a237b(0x82));return a247_0x3b97c2({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':process.env.GIT_COMMIT??'','globalFlags':GLOBAL_FLAGS,'serviceRegistry':_0x14257c,'buildAllFlags':buildAllFlags,'findDefinition':_0x558455});}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a248_0x1f68(_0x1f98ec,_0x5407ab){_0x1f98ec=_0x1f98ec-0x1d0;var _0x1b75bd=a248_0x1b75();var _0x1f68ca=_0x1b75bd[_0x1f98ec];return _0x1f68ca;}(function(_0x127594,_0x421485){var _0x51673e=a248_0x1f68,_0x14a956=_0x127594();while(!![]){try{var _0x576f8c=parseInt(_0x51673e(0x1d3))/0x1+parseInt(_0x51673e(0x1d8))/0x2*(-parseInt(_0x51673e(0x1d7))/0x3)+-parseInt(_0x51673e(0x1d0))/0x4+-parseInt(_0x51673e(0x1d6))/0x5*(parseInt(_0x51673e(0x1d5))/0x6)+parseInt(_0x51673e(0x1d2))/0x7+parseInt(_0x51673e(0x1d1))/0x8+parseInt(_0x51673e(0x1d4))/0x9;if(_0x576f8c===_0x421485)break;else _0x14a956['push'](_0x14a956['shift']());}catch(_0x444bf1){_0x14a956['push'](_0x14a956['shift']());}}}(a248_0x1b75,0x5a651));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat,commandAllowsOptionalAuth,commandRequiresAuth,formatDeprecatedCommandMessage,resolveCommandAuthMode}from'@lovrabet/cli-framework';function a248_0x1b75(){var _0x15874c=['2594915SdOGUP','42rhQEKF','76064tsujUV','1156084QPAqHj','4582888qujEoV','2467206eMOBVk','137581gKrtFW','5830281kTgbsr','6WhPoYs'];a248_0x1b75=function(){return _0x15874c;};return a248_0x1b75();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a249_0x46182f=a249_0x3697;(function(_0x795194,_0x13f5ea){const _0x43380c=a249_0x3697,_0x2e5370=_0x795194();while(!![]){try{const _0x15400c=parseInt(_0x43380c(0xd3))/0x1*(-parseInt(_0x43380c(0xd2))/0x2)+parseInt(_0x43380c(0xd0))/0x3+parseInt(_0x43380c(0xc9))/0x4*(parseInt(_0x43380c(0xd5))/0x5)+-parseInt(_0x43380c(0xcd))/0x6*(parseInt(_0x43380c(0xcb))/0x7)+-parseInt(_0x43380c(0xd1))/0x8*(parseInt(_0x43380c(0xcf))/0x9)+parseInt(_0x43380c(0xcc))/0xa*(-parseInt(_0x43380c(0xc7))/0xb)+parseInt(_0x43380c(0xc8))/0xc;if(_0x15400c===_0x13f5ea)break;else _0x2e5370['push'](_0x2e5370['shift']());}catch(_0x3a9364){_0x2e5370['push'](_0x2e5370['shift']());}}}(a249_0x53e3,0xad103));function a249_0x3697(_0xedf9af,_0x318d4c){_0xedf9af=_0xedf9af-0xc7;const _0x53e398=a249_0x53e3();let _0x36973d=_0x53e398[_0xedf9af];return _0x36973d;}export const VERSION=a249_0x46182f(0xca);export const GIT_TAG=a249_0x46182f(0xce);function a249_0x53e3(){const _0x38c395=['2.3.16-beta.3','439425ATUKfi','130UHmaGZ','102rqqdDN','v2.3.16-beta.3','117KMEwRP','2126178XchENU','757672UNIjGA','152594pPxXIg','8kBkzAv','19e4c96','10deTnrO','41074JZATuY','27464316NuEjUi','1337516tSLthv'];a249_0x53e3=function(){return _0x38c395;};return a249_0x53e3();}export const GIT_COMMIT=a249_0x46182f(0xd4);export const BUILD_TIME='2026-08-10T11:33:38.793Z';
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x48294f,_0x7fd83e){var _0x50cbf9=a250_0x2dfb,_0x1493d0=_0x48294f();while(!![]){try{var _0x340453=parseInt(_0x50cbf9(0x90))/0x1*(-parseInt(_0x50cbf9(0x92))/0x2)+-parseInt(_0x50cbf9(0x8e))/0x3+parseInt(_0x50cbf9(0x8c))/0x4+-parseInt(_0x50cbf9(0x9a))/0x5+-parseInt(_0x50cbf9(0x91))/0x6*(parseInt(_0x50cbf9(0x8d))/0x7)+-parseInt(_0x50cbf9(0x95))/0x8*(parseInt(_0x50cbf9(0x99))/0x9)+parseInt(_0x50cbf9(0x94))/0xa;if(_0x340453===_0x7fd83e)break;else _0x1493d0['push'](_0x1493d0['shift']());}catch(_0x1e73b1){_0x1493d0['push'](_0x1493d0['shift']());}}}(a250_0x55bf,0xcf091));import a250_0x594b34 from'chalk';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a250_0x2dfb(_0x2812f7,_0xa0b095){_0x2812f7=_0x2812f7-0x8b;var _0x55bf49=a250_0x55bf();var _0x2dfb8a=_0x55bf49[_0x2812f7];return _0x2dfb8a;}export function showHelp(){var _0x54db93=a250_0x2dfb;console[_0x54db93(0x98)](),console[_0x54db93(0x98)](a250_0x594b34['green'][_0x54db93(0x8f)]('\x20\x20'+CLI_DISPLAY_NAME)),console[_0x54db93(0x98)](),console['log'](_0x54db93(0x96)+a250_0x594b34[_0x54db93(0x93)][_0x54db93(0x8f)](CLI_BIN_NAME+_0x54db93(0x97))+_0x54db93(0x8b)),console[_0x54db93(0x98)]();}function a250_0x55bf(){var _0x27763e=['\x20\x20Use\x20','\x20--help','log','81ZdZQls','7026885zwHJgj','\x20to\x20view\x20available\x20commands.','5911120WshaMW','124628LYwCLc','2165124ZVLAit','bold','9ydxWxD','480EIFfbT','32102EWOjCO','green','39100760HOGlfc','750200iahZjM'];a250_0x55bf=function(){return _0x27763e;};return a250_0x55bf();}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x44f0fe,_0x116fd9){const _0x1906e6=a251_0x2bfd,_0x346a55=_0x44f0fe();while(!![]){try{const _0x343d72=parseInt(_0x1906e6(0x1f3))/0x1+parseInt(_0x1906e6(0x1ef))/0x2+-parseInt(_0x1906e6(0x1f6))/0x3+-parseInt(_0x1906e6(0x1da))/0x4+-parseInt(_0x1906e6(0x1e0))/0x5*(parseInt(_0x1906e6(0x1e2))/0x6)+parseInt(_0x1906e6(0x1ea))/0x7*(parseInt(_0x1906e6(0x1e5))/0x8)+parseInt(_0x1906e6(0x1e9))/0x9*(parseInt(_0x1906e6(0x1ec))/0xa);if(_0x343d72===_0x116fd9)break;else _0x346a55['push'](_0x346a55['shift']());}catch(_0xc26dc4){_0x346a55['push'](_0x346a55['shift']());}}}(a251_0x3bf3,0xc7ceb));import{logger}from'../utils/logger.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../skills/npx-skills-add.js';export function camelCaseFlagsToKebab(_0x4875b6){const _0x588d8f=a251_0x2bfd,_0xd48ce7=[];for(const [_0x175915,_0x1bf05d]of Object[_0x588d8f(0x1dd)](_0x4875b6)){if(_0x1bf05d===!![]){const _0x2101a7=_0x175915[_0x588d8f(0x1f1)](/([A-Z])/g,'-$1')[_0x588d8f(0x1ed)]();_0xd48ce7[_0x588d8f(0x1dc)](_0x2101a7);}}return _0xd48ce7;}export function parseDynamicFlags(){const _0x3ca84e=a251_0x2bfd,_0x29c995=[];for(let _0xde2bac=0x3;_0xde2bac<process[_0x3ca84e(0x1e8)][_0x3ca84e(0x1ee)];_0xde2bac++){const _0x5e8069=process['argv'][_0xde2bac];if(_0x5e8069&&_0x5e8069['startsWith']('--')){const _0x346050=_0x5e8069['slice'](0x2);_0x346050&&!_0x346050[_0x3ca84e(0x1f5)]('=')&&_0x29c995['push'](_0x346050);}}return _0x29c995;}export function getAllProvidedFlags(_0x6fdb1c){const _0x12f789=a251_0x2bfd,_0x4a6ea9=camelCaseFlagsToKebab(_0x6fdb1c),_0x2ea854=parseDynamicFlags(),_0x2c4692=new Set([..._0x4a6ea9,..._0x2ea854]);return Array[_0x12f789(0x1f4)](_0x2c4692);}export function normalizeLegacyBffSaveFlags(_0x456081){const _0x136c6f=a251_0x2bfd,_0x55522d=new Set(_0x456081);return _0x55522d[_0x136c6f(0x1db)](_0x136c6f(0x1e4))&&_0x55522d['add']('enable-bff-save'),Array[_0x136c6f(0x1f4)](_0x55522d);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;function a251_0x2bfd(_0x9a1bc,_0x44a719){_0x9a1bc=_0x9a1bc-0x1da;const _0x3bf32c=a251_0x3bf3();let _0x2bfd85=_0x3bf32c[_0x9a1bc];return _0x2bfd85;}export async function skillsCommand(_0x4a8997,_0x3a1f2f,_0x5cbe50){const _0x4a2b54=a251_0x2bfd;logger[_0x4a2b54(0x1eb)](process['cwd']());if(_0x5cbe50?.['help']||_0x4a8997===_0x4a2b54(0x1de)){showHelp();return;}console[_0x4a2b54(0x1df)](_0x4a2b54(0x1e1)+(_0x4a8997||'(empty)')),console['log'](_0x4a2b54(0x1e3)),console[_0x4a2b54(0x1e6)]('\x20\x20'+CLI_BIN_NAME+'\x20cli-skill\x20install\x20\x20\x20\x20\x20\x20\x20#\x20Install\x20CLI\x20Built-in\x20Skill'),console[_0x4a2b54(0x1e6)](''),console['log'](_0x4a2b54(0x1e7)+SKILLS_INSTALL_COMMAND_LINE),logger[_0x4a2b54(0x1df)]('skill',_0x4a2b54(0x1f0)+_0x4a8997),process['exit'](0x1);}function showHelp(){const _0xbbba70=a251_0x2bfd;console['log'](_0xbbba70(0x1f2)+CLI_BIN_NAME+'\x20cli-skill\x20install\x0a\x0aEquivalent\x20command:\x20'+SKILLS_INSTALL_COMMAND_LINE+'\x0a\x0aNote:\x20npx\x20skills\x20selects\x20the\x20agent\x20and\x20writes\x20files;\x20guides\x20live\x20under\x20skills/rabetbase/guides/.\x0a');}function a251_0x3bf3(){const _0x3439b6=['\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20','5866VfybwQ','from','includes','4910157xubnJM','3558360qiiuCV','has','push','entries','--help','error','9385VZRyLS','Error:\x20Unsupported\x20command:\x20','2982wnSmyY','\x0aAvailable\x20commands:','dangerously-bff-save','8neEuVu','log','Equivalent\x20command:\x20','argv','45WUqsCR','3268727wneOzG','setLogPath','4378470EYxfNv','toLowerCase','length','3231054KASZOM','不支持的命令:\x20','replace'];a251_0x3bf3=function(){return _0x3439b6;};return a251_0x3bf3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a252_0x1f4d51=a252_0x3eb1;(function(_0x23e424,_0x25554a){const _0x2503a3=a252_0x3eb1,_0x56488d=_0x23e424();while(!![]){try{const _0x254921=parseInt(_0x2503a3(0x79))/0x1*(parseInt(_0x2503a3(0x97))/0x2)+-parseInt(_0x2503a3(0x6a))/0x3*(parseInt(_0x2503a3(0x65))/0x4)+parseInt(_0x2503a3(0x87))/0x5*(parseInt(_0x2503a3(0x94))/0x6)+parseInt(_0x2503a3(0x72))/0x7+-parseInt(_0x2503a3(0x7e))/0x8*(-parseInt(_0x2503a3(0x86))/0x9)+-parseInt(_0x2503a3(0x8e))/0xa+-parseInt(_0x2503a3(0x67))/0xb;if(_0x254921===_0x25554a)break;else _0x56488d['push'](_0x56488d['shift']());}catch(_0x3d971c){_0x56488d['push'](_0x56488d['shift']());}}}(a252_0x5305,0x2bba9));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';export const NPX_FLAG_YES='-y';export const SKILLS_FLAG_GLOBAL='-g';export const SKILLS_FLAG_YES='-y';export const NPX_SKILLS_CLI=a252_0x1f4d51(0x8d);export const NPX_SKILLS_SUBCOMMAND_ADD=a252_0x1f4d51(0x83);function a252_0x3eb1(_0x9c972e,_0x782987){_0x9c972e=_0x9c972e-0x64;const _0x5305ce=a252_0x5305();let _0x3eb108=_0x5305ce[_0x9c972e];return _0x3eb108;}export const NPX_SKILLS_FLAG_SKILL=a252_0x1f4d51(0x73);export const RABETBASE_SKILL_SOURCE=a252_0x1f4d51(0x89);export const LEGACY_RABETBASE_SKILL_SOURCE='lovrabet/lovrabet-skill';export const DEFAULT_RABETBASE_SKILL_NAME=a252_0x1f4d51(0x6f);export const RABETBASE_GLOBAL_SKILL_NAME=a252_0x1f4d51(0x84);export const RABETBASE_SKILL_GIT_SOURCE=a252_0x1f4d51(0x99);export function resolveGlobalSkillName(_0x465623){const _0x5c7aef=a252_0x1f4d51;switch(_0x465623[_0x5c7aef(0x81)]()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x123249){const _0x48a834=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x123249&&_0x48a834['push'](NPX_SKILLS_FLAG_SKILL,_0x123249),_0x48a834;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a252_0x1f4d51(0x96),...buildNpxSkillsAddArgv()][a252_0x1f4d51(0x8b)]('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a252_0x1f4d51(0x96),NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a252_0x1f4d51(0x8b)]('\x20');const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x200b6f,_0x59c905,_0x191f2f){return{'ok':![],'status':_0x59c905,'code':_0x200b6f,'error':'['+_0x200b6f+']\x20'+_0x191f2f};}function spawnOptions(_0x4e1215,_0x4c5ba5){return{'cwd':_0x4e1215,'stdio':_0x4c5ba5,'env':process.env,'shell':![],..._0x4c5ba5==='pipe'?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeSpawnResult(_0x4d2e4c,_0x31e2ca,_0x315b61,_0x4c4b32){const _0x3f7c67=a252_0x1f4d51,_0x170e5a=[_0x4d2e4c['stdout']?_0x4d2e4c[_0x3f7c67(0x82)]['toString']():'',_0x4d2e4c[_0x3f7c67(0x6d)]?_0x4d2e4c[_0x3f7c67(0x6d)][_0x3f7c67(0x76)]():''][_0x3f7c67(0x66)](Boolean)[_0x3f7c67(0x8b)]('\x0a')['trim']();_0x4c4b32!==_0x3f7c67(0x92)&&_0x170e5a&&console[_0x3f7c67(0x6e)](_0x170e5a);if(_0x4d2e4c[_0x3f7c67(0x91)]){const _0x2df805=_0x4d2e4c[_0x3f7c67(0x91)],_0x3380dd=_0x2df805[_0x3f7c67(0x9b)]===_0x3f7c67(0x85)?_0x3f7c67(0x98):_0x2df805[_0x3f7c67(0x9b)]==='EPERM'||_0x2df805['code']===_0x3f7c67(0x9a)?_0x3f7c67(0x7b):_0x3f7c67(0x77);return failure(_0x3380dd,_0x4d2e4c[_0x3f7c67(0x8c)],_0x2df805[_0x3f7c67(0x74)]);}if(_0x4d2e4c[_0x3f7c67(0x75)])return failure(_0x3f7c67(0x7a),_0x4d2e4c[_0x3f7c67(0x8c)],_0x3f7c67(0x70)+_0x4d2e4c[_0x3f7c67(0x75)]);if(_0x4d2e4c[_0x3f7c67(0x8c)]!==0x0)return failure(_0x3f7c67(0x8f),_0x4d2e4c[_0x3f7c67(0x8c)],_0x170e5a||'exit\x20'+(_0x4d2e4c[_0x3f7c67(0x8c)]??_0x3f7c67(0x6b)));const _0x4e18ee=_0x170e5a['match'](/Failed to install\s+(\d+)/i);if(_0x4e18ee&&Number(_0x4e18ee[0x1])>0x0)return failure('INSTALL_PARTIAL',0x0,_0x3f7c67(0x88)+_0x4e18ee[0x1]+_0x3f7c67(0x78)+(_0x170e5a?':\x0a'+_0x170e5a:''));if(_0x31e2ca){const _0x52843d=resolveInstalledSkill(_0x31e2ca,_0x315b61);if(_0x52843d[_0x3f7c67(0x71)]===_0x3f7c67(0x90))return failure('SKILL_NOT_INSTALLED',0x0,'Skill\x20\x22'+_0x31e2ca+_0x3f7c67(0x80)+_0x52843d['checked'][_0x3f7c67(0x8b)](',\x20')+')');_0x52843d[_0x3f7c67(0x71)]===_0x3f7c67(0x7d)&&console[_0x3f7c67(0x95)](_0x3f7c67(0x68)+_0x31e2ca+'\x22\x20install\x20state:\x20'+_0x52843d[_0x3f7c67(0x6c)]);}return{'ok':!![],'status':0x0};}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x5c8792,_0x996285){const _0x3bf923=a252_0x1f4d51;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x41f152=_0x996285?.[_0x3bf923(0x64)]??_0x3bf923(0x7f),_0x3e58ff=resolveNpmBin(_0x3bf923(0x96)),_0x36fd88=buildNpxSkillsAddArgv(_0x996285?.['skill']),_0x4150aa=[_0x3bf923(0x96),..._0x36fd88][_0x3bf923(0x8b)]('\x20');console[_0x3bf923(0x6e)]('*\x20'+_0x4150aa);const _0x496dbe=spawnSync(_0x3e58ff,_0x36fd88,spawnOptions(_0x5c8792,_0x41f152));return normalizeSpawnResult(_0x496dbe,undefined,undefined,_0x41f152);}export function runNpxSkillsRemove(_0x19930e,_0xfe8b55,_0x23137b=LEGACY_RABETBASE_SKILL_SOURCE){const _0x3de8e7=a252_0x1f4d51;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x494e58=_0xfe8b55?.[_0x3de8e7(0x64)]??'inherit',_0x329cdf=resolveNpmBin(_0x3de8e7(0x96)),_0xcfcca6=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0x3de8e7(0x69),_0x23137b,NPX_SKILLS_FLAG_SKILL,_0xfe8b55?.[_0x3de8e7(0x8a)]??DEFAULT_RABETBASE_SKILL_NAME,..._0xfe8b55?.[_0x3de8e7(0x93)]?['-y']:[]],_0x397cd3=[_0x329cdf,..._0xcfcca6][_0x3de8e7(0x8b)]('\x20');console[_0x3de8e7(0x6e)]('*\x20'+_0x397cd3);const _0x40e5c1=spawnSync(_0x329cdf,_0xcfcca6,spawnOptions(_0x19930e,_0x494e58));return normalizeSpawnResult(_0x40e5c1,undefined,undefined,_0x494e58);}function a252_0x5305(){const _0x1e284d=['1434601pYoqXS','--skill','message','signal','toString','SPAWN_FAILED','\x20failed\x20target(s)','1WqFplX','CHILD_TERMINATED','PERMISSION_DENIED','presence','unverifiable','1437944NHZtKH','inherit','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','trim','stdout','add','rabetbase','ENOENT','9KGZiQQ','57470WiFgZM','Installer\x20reported\x20','lovrabet/rabetbase','skill','join','status','skills','253840sFztwy','CHILD_EXIT_NONZERO','absent','error','pipe','yes','54yUTGHT','warn','npx','221596xcADap','NPX_NOT_FOUND','git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git','EACCES','code','stdio','352lsJfhM','filter','2876115JYhnur','!\x20Could\x20not\x20verify\x20\x22','remove','4533lBOqer','unknown','reason','stderr','log','Lovrabet','npx\x20terminated\x20by\x20signal\x20','state'];a252_0x5305=function(){return _0x1e284d;};return a252_0x5305();}export function runNpxSkillsAddGlobal(_0x107d37,_0x546722,_0x56bdfb){const _0x31a9fd=a252_0x1f4d51;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x3dc0a6=resolveNpmBin(_0x31a9fd(0x96)),_0xe24ec0=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x546722,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x36cc5d=['npx',NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x546722,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x31a9fd(0x8b)]('\x20');console['log']('*\x20'+_0x36cc5d);const _0x4ea70e=spawnSync(_0x3dc0a6,_0xe24ec0,spawnOptions(_0x107d37,_0x31a9fd(0x92)));return normalizeSpawnResult(_0x4ea70e,resolveGlobalSkillName(_0x546722),_0x56bdfb?.[_0x31a9fd(0x7c)],_0x56bdfb?.[_0x31a9fd(0x64)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a253_0x27d891=a253_0x4e98;function a253_0xd13a(){const _0x29fd18=['version','recorded','394DDxYRC','\x20is\x20unreadable:\x20','object','message','3130302zJzSsN','not-recorded','1004427oEatzu','reason','parse','\x20has\x20no\x20skills\x20map','13429110IGIZGl','home','\x20records\x20\x22','unusable','present','unverifiable','28mpxEpU','.agents','3IChzEI','.claude','kind','globalSkillsDirs','includes','join','4291932nveHFm','lockFile','number','768176xLzEKs','9511VZGDTD','8746605NSCnvI','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','.skill-lock.json','skills'];a253_0xd13a=function(){return _0x29fd18;};return a253_0xd13a();}(function(_0x588a72,_0x20f79e){const _0x20184=a253_0x4e98,_0x129e91=_0x588a72();while(!![]){try{const _0x464be6=-parseInt(_0x20184(0x1e6))/0x1*(parseInt(_0x20184(0x1ca))/0x2)+-parseInt(_0x20184(0x1dc))/0x3*(parseInt(_0x20184(0x1e2))/0x4)+parseInt(_0x20184(0x1e7))/0x5+parseInt(_0x20184(0x1ce))/0x6+-parseInt(_0x20184(0x1da))/0x7*(-parseInt(_0x20184(0x1e5))/0x8)+-parseInt(_0x20184(0x1d0))/0x9+parseInt(_0x20184(0x1d4))/0xa;if(_0x464be6===_0x20f79e)break;else _0x129e91['push'](_0x129e91['shift']());}catch(_0x50f360){_0x129e91['push'](_0x129e91['shift']());}}}(a253_0xd13a,0xe5708));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a253_0x27d891(0x1db),a253_0x27d891(0x1c6));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a253_0x27d891(0x1db),'skills'),join(a253_0x27d891(0x1dd),a253_0x27d891(0x1c7))];function a253_0x4e98(_0x5cab0e,_0x103c71){_0x5cab0e=_0x5cab0e-0x1c5;const _0xd13a12=a253_0xd13a();let _0x4e9844=_0xd13a12[_0x5cab0e];return _0x4e9844;}const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x21f6e4,_0x48180b){const _0x11ad05=a253_0x27d891;if(!existsSync(_0x21f6e4))return{'kind':'not-recorded'};let _0x57835d;try{_0x57835d=JSON[_0x11ad05(0x1d2)](readFileSync(_0x21f6e4,'utf8'));}catch(_0x53ba2f){return{'kind':_0x11ad05(0x1d7),'reason':_0x21f6e4+_0x11ad05(0x1cb)+_0x53ba2f[_0x11ad05(0x1cd)]};}const _0x1bc304=_0x57835d;if(typeof _0x1bc304?.[_0x11ad05(0x1c8)]!==_0x11ad05(0x1e4)||!SUPPORTED_LOCK_VERSIONS[_0x11ad05(0x1e0)](_0x1bc304[_0x11ad05(0x1c8)]))return{'kind':_0x11ad05(0x1d7),'reason':_0x21f6e4+'\x20uses\x20unsupported\x20version\x20'+String(_0x1bc304?.['version'])};if(!_0x1bc304[_0x11ad05(0x1c7)]||typeof _0x1bc304[_0x11ad05(0x1c7)]!==_0x11ad05(0x1cc))return{'kind':'unusable','reason':_0x21f6e4+_0x11ad05(0x1d3)};return _0x1bc304[_0x11ad05(0x1c7)][_0x48180b]?{'kind':_0x11ad05(0x1c9)}:{'kind':_0x11ad05(0x1cf)};}export function resolveInstalledSkill(_0x42540a,_0x1ace51){const _0x46beb8=a253_0x27d891,_0x4219b9=_0x1ace51?.[_0x46beb8(0x1d5)]??homedir(),_0x2fb1fe=_0x1ace51?.[_0x46beb8(0x1df)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS['map'](_0x563080=>join(_0x4219b9,_0x563080)),_0x1ebfac=_0x1ace51?.[_0x46beb8(0x1e3)]??join(_0x4219b9,SKILL_LOCK_RELATIVE_PATH),_0x2610ba=_0x2fb1fe['map'](_0x56cc18=>join(_0x56cc18,_0x42540a,'SKILL.md')),_0xfabcfa=_0x2610ba['find'](_0x21c24f=>existsSync(_0x21c24f));if(_0xfabcfa)return{'state':_0x46beb8(0x1d8),'path':_0xfabcfa};const _0x1ce80d=readLockLookup(_0x1ebfac,_0x42540a);if(_0x1ce80d[_0x46beb8(0x1de)]===_0x46beb8(0x1d7))return{'state':_0x46beb8(0x1d9),'reason':_0x1ce80d[_0x46beb8(0x1d1)]};if(_0x1ce80d[_0x46beb8(0x1de)]===_0x46beb8(0x1c9))return{'state':'unverifiable','reason':_0x1ebfac+_0x46beb8(0x1d6)+_0x42540a+_0x46beb8(0x1c5)+('('+_0x2610ba[_0x46beb8(0x1e1)](',\x20')+')')};return{'state':'absent','checked':_0x2610ba};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x112067,_0x55e772){const _0x14a748=a254_0x158b,_0x434657=_0x112067();while(!![]){try{const _0xe5df55=parseInt(_0x14a748(0xbf))/0x1*(-parseInt(_0x14a748(0xc5))/0x2)+-parseInt(_0x14a748(0xc9))/0x3*(-parseInt(_0x14a748(0xbd))/0x4)+-parseInt(_0x14a748(0xce))/0x5*(parseInt(_0x14a748(0xc8))/0x6)+-parseInt(_0x14a748(0xcb))/0x7*(parseInt(_0x14a748(0xbe))/0x8)+-parseInt(_0x14a748(0xca))/0x9*(-parseInt(_0x14a748(0xcc))/0xa)+-parseInt(_0x14a748(0xc4))/0xb+parseInt(_0x14a748(0xcf))/0xc*(parseInt(_0x14a748(0xc1))/0xd);if(_0xe5df55===_0x55e772)break;else _0x434657['push'](_0x434657['shift']());}catch(_0xb1c387){_0x434657['push'](_0x434657['shift']());}}}(a254_0x2c2f,0x8118c));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 a254_0x2c2f(){const _0x510707=['stringify','durationMs','40OnkBAx','4072jMDJPe','1AxOEMU','flags','178529KYIHQR','service','[REDACTED]','2940806QuqdHM','1435468HWwCAJ','message','rabetbase.command','6414xDoItQ','135627LwBNGi','81IbmcJM','4424ygZMqF','1075630upAiIP','command','4095gmLGOc','1128OQCzTw','error','entries'];a254_0x2c2f=function(){return _0x510707;};return a254_0x2c2f();}function a254_0x158b(_0x10c5c2,_0x133973){_0x10c5c2=_0x10c5c2-0xbb;const _0x2c2f25=a254_0x2c2f();let _0x158b6f=_0x2c2f25[_0x10c5c2];return _0x158b6f;}function isSensitiveKey(_0x11c446){return SENSITIVE_PATTERNS['some'](_0x9f8818=>_0x9f8818['test'](_0x11c446));}function sanitizeFlags(_0x3bfdb0){const _0x1a8917=a254_0x158b,_0x23aead={};for(const [_0xc08e88,_0x4f10c2]of Object[_0x1a8917(0xd1)](_0x3bfdb0)){isSensitiveKey(_0xc08e88)?_0x23aead[_0xc08e88]=_0x4f10c2!=null&&_0x4f10c2!==''?_0x1a8917(0xc3):_0x4f10c2:_0x23aead[_0xc08e88]=_0x4f10c2;}return _0x23aead;}export async function reportCommandTrace(_0x4a6c7e){const _0x3ce45a=a254_0x158b;try{const _0x2e843d=sanitizeFlags(_0x4a6c7e[_0x3ce45a(0xc0)]);await sendCliTraceLog({'spanName':_0x3ce45a(0xc7),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x4a6c7e[_0x3ce45a(0xc2)],'command.name':_0x4a6c7e[_0x3ce45a(0xcd)],'command.flags':JSON[_0x3ce45a(0xbb)](_0x2e843d),..._0x4a6c7e['durationMs']!=null?{'command.duration_ms':_0x4a6c7e[_0x3ce45a(0xbc)]}:{},..._0x4a6c7e['error']?{'command.error':_0x4a6c7e[_0x3ce45a(0xd0)]instanceof Error?_0x4a6c7e[_0x3ce45a(0xd0)][_0x3ce45a(0xc6)]:String(_0x4a6c7e[_0x3ce45a(0xd0)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a255_0x5609(){var _0x1f2499=['233129fGMsNl','1125024EgolzQ','2276316UQTksr','536TrNflo','3256130wvOUGP','1019476BsUAhB','cli.help','error','55eNUBLi','service','3WYzcSK','68814Hstwko','Failed\x20to\x20report\x20CLI\x20help\x20trace:','40419mTbFXu'];a255_0x5609=function(){return _0x1f2499;};return a255_0x5609();}function a255_0x22a1(_0x2eaa10,_0x350999){_0x2eaa10=_0x2eaa10-0x1b6;var _0x560939=a255_0x5609();var _0x22a1f3=_0x560939[_0x2eaa10];return _0x22a1f3;}(function(_0x4e795,_0x2cfa49){var _0xc830bc=a255_0x22a1,_0x51aba5=_0x4e795();while(!![]){try{var _0x4f164f=parseInt(_0xc830bc(0x1bb))/0x1+parseInt(_0xc830bc(0x1c0))/0x2*(parseInt(_0xc830bc(0x1b7))/0x3)+-parseInt(_0xc830bc(0x1bc))/0x4+-parseInt(_0xc830bc(0x1c3))/0x5*(-parseInt(_0xc830bc(0x1b8))/0x6)+-parseInt(_0xc830bc(0x1bd))/0x7+parseInt(_0xc830bc(0x1be))/0x8*(-parseInt(_0xc830bc(0x1ba))/0x9)+parseInt(_0xc830bc(0x1bf))/0xa;if(_0x4f164f===_0x2cfa49)break;else _0x51aba5['push'](_0x51aba5['shift']());}catch(_0x3730da){_0x51aba5['push'](_0x51aba5['shift']());}}}(a255_0x5609,0x46242));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x2dc845,_0x4217d9){var _0xe2bb1a=a255_0x22a1;try{await sendCliTraceLog({'spanName':_0xe2bb1a(0x1c1),'logData':{'rabetbase.help.kind':_0x2dc845,..._0x4217d9?.['service']&&{'rabetbase.help.service':_0x4217d9[_0xe2bb1a(0x1b6)]}}});}catch(_0x16f30a){console[_0xe2bb1a(0x1c2)](_0xe2bb1a(0x1b9),_0x16f30a);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a256_0x2ca2(_0x1a6e4c,_0x178964){_0x1a6e4c=_0x1a6e4c-0x146;const _0x180bbc=a256_0x180b();let _0x2ca2be=_0x180bbc[_0x1a6e4c];return _0x2ca2be;}(function(_0x20a786,_0x5665cf){const _0x1ac9ff=a256_0x2ca2,_0x3ecd98=_0x20a786();while(!![]){try{const _0x44e59d=parseInt(_0x1ac9ff(0x148))/0x1+-parseInt(_0x1ac9ff(0x149))/0x2+parseInt(_0x1ac9ff(0x14c))/0x3*(-parseInt(_0x1ac9ff(0x147))/0x4)+parseInt(_0x1ac9ff(0x150))/0x5+parseInt(_0x1ac9ff(0x14b))/0x6+parseInt(_0x1ac9ff(0x14e))/0x7*(parseInt(_0x1ac9ff(0x14a))/0x8)+-parseInt(_0x1ac9ff(0x14d))/0x9;if(_0x44e59d===_0x5665cf)break;else _0x3ecd98['push'](_0x3ecd98['shift']());}catch(_0x4149d2){_0x3ecd98['push'](_0x3ecd98['shift']());}}}(a256_0x180b,0x83b5a));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 a256_0x180b(){const _0x29639f=['213072egYFzq','4198596PLMLGL','3iGpvmG','1138950sMbNXS','14hEbSQD','tenant_code','2066080fZBjMS','email','user','daily','username','nickname','tenant','1602892NNdsGH','864325Divxpq','1927640syzTfk'];a256_0x180b=function(){return _0x29639f;};return a256_0x180b();}import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x139e94=a256_0x2ca2,_0x52e179=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x354c0d=_0x52e179?.[_0x139e94(0x152)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!=='unknown'?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x139e94(0x153):'production')}),setUserContext({'id':_0x354c0d?.['id'],'username':_0x354c0d?.[_0x139e94(0x154)],'nickname':_0x354c0d?.[_0x139e94(0x155)],'email':_0x354c0d?.[_0x139e94(0x151)],'tenantCode':_0x354c0d?.[_0x139e94(0x146)]?.[_0x139e94(0x14f)],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x52e179;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a257_0x521e(_0x32641c,_0x1d70e2){_0x32641c=_0x32641c-0x151;const _0x314215=a257_0x3142();let _0x521ece=_0x314215[_0x32641c];return _0x521ece;}(function(_0x5d563a,_0x2aafe0){const _0x5793ca=a257_0x521e,_0x25442c=_0x5d563a();while(!![]){try{const _0x23d158=parseInt(_0x5793ca(0x152))/0x1+-parseInt(_0x5793ca(0x15e))/0x2*(-parseInt(_0x5793ca(0x157))/0x3)+parseInt(_0x5793ca(0x155))/0x4+-parseInt(_0x5793ca(0x158))/0x5*(-parseInt(_0x5793ca(0x154))/0x6)+parseInt(_0x5793ca(0x151))/0x7+parseInt(_0x5793ca(0x156))/0x8*(parseInt(_0x5793ca(0x153))/0x9)+-parseInt(_0x5793ca(0x15c))/0xa*(parseInt(_0x5793ca(0x159))/0xb);if(_0x23d158===_0x2aafe0)break;else _0x25442c['push'](_0x25442c['shift']());}catch(_0x75dae4){_0x25442c['push'](_0x25442c['shift']());}}}(a257_0x3142,0xdcc96));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;}export function registerOtelShutdownOnExit(){const _0x163625=a257_0x521e;process[_0x163625(0x15a)](_0x163625(0x15d),()=>{void flushOtelNodeIfUsed();});const _0x2b9981=()=>{const _0x5776bc=_0x163625;void flushOtelNodeIfUsed()[_0x5776bc(0x15b)](()=>process['exit'](0x0));};process['once'](_0x163625(0x15f),_0x2b9981),process[_0x163625(0x15a)]('SIGTERM',_0x2b9981);}export async function exitWithOtelShutdown(_0x8b4e85){await flushOtelNodeIfUsed(),process['exit'](_0x8b4e85);}function a257_0x3142(){const _0x3acb91=['beforeExit','273044bZEcEN','SIGINT','3663492vhZVdA','430732GguRqX','144DEAmTD','18czVvZD','6126368ANXsWm','902160RLCSVE','6ZZlbSa','1666735VklLtz','7513qgxPsY','once','then','68210DuDzoo'];a257_0x3142=function(){return _0x3acb91;};return a257_0x3142();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a258_0x3f62f8=a258_0x257d;function a258_0x31ba(){const _0x43e267=['914200MLqABA','6lOdAEw','2Fircbq','439330vJCtDT','logData','version','8unwxRP','1282809kcoGbR','90LsSFlk','traceName','rabetbase-cli','12rdhkzN','spanName','952095cmbGbg','traceparent','7783153pBBFJm','6248555ccMCGK','313843GNzIhN'];a258_0x31ba=function(){return _0x43e267;};return a258_0x31ba();}(function(_0x3460cf,_0x158342){const _0x364c9f=a258_0x257d,_0x181d00=_0x3460cf();while(!![]){try{const _0x26fa11=parseInt(_0x364c9f(0x19a))/0x1*(parseInt(_0x364c9f(0x19d))/0x2)+parseInt(_0x364c9f(0x1a8))/0x3*(-parseInt(_0x364c9f(0x1a1))/0x4)+parseInt(_0x364c9f(0x1ab))/0x5*(parseInt(_0x364c9f(0x19c))/0x6)+-parseInt(_0x364c9f(0x1aa))/0x7+parseInt(_0x364c9f(0x19b))/0x8*(parseInt(_0x364c9f(0x1a3))/0x9)+-parseInt(_0x364c9f(0x19e))/0xa+parseInt(_0x364c9f(0x1a2))/0xb*(-parseInt(_0x364c9f(0x1a6))/0xc);if(_0x26fa11===_0x158342)break;else _0x181d00['push'](_0x181d00['shift']());}catch(_0x2410fa){_0x181d00['push'](_0x181d00['shift']());}}}(a258_0x31ba,0xc31a7));import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';function a258_0x257d(_0x5b17bf,_0xe333a8){_0x5b17bf=_0x5b17bf-0x19a;const _0x31ba41=a258_0x31ba();let _0x257d78=_0x31ba41[_0x5b17bf];return _0x257d78;}const DEFAULT_TRACE_NAME=a258_0x3f62f8(0x1a5);export async function sendCliTraceLog(_0x36490b){const _0xf5b780=a258_0x3f62f8;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x36490b[_0xf5b780(0x1a4)]??DEFAULT_TRACE_NAME,'version':_0x36490b[_0xf5b780(0x1a0)]??getCliVersion(),'spanName':_0x36490b[_0xf5b780(0x1a7)],'eventType':'manual','logData':_0x36490b[_0xf5b780(0x19f)],..._0x36490b[_0xf5b780(0x1a9)]&&{'traceparent':_0x36490b[_0xf5b780(0x1a9)]}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a259_0x4327c1=a259_0x7650;function a259_0x7650(_0x5567c1,_0x5b92c1){_0x5567c1=_0x5567c1-0x122;const _0x31892e=a259_0x3189();let _0x76500e=_0x31892e[_0x5567c1];return _0x76500e;}(function(_0x1ce5de,_0x2fe20f){const _0x2101dc=a259_0x7650,_0x5cd074=_0x1ce5de();while(!![]){try{const _0x41b565=-parseInt(_0x2101dc(0x12c))/0x1+-parseInt(_0x2101dc(0x12b))/0x2*(parseInt(_0x2101dc(0x125))/0x3)+-parseInt(_0x2101dc(0x12f))/0x4+-parseInt(_0x2101dc(0x12a))/0x5+parseInt(_0x2101dc(0x12e))/0x6*(-parseInt(_0x2101dc(0x127))/0x7)+parseInt(_0x2101dc(0x128))/0x8+parseInt(_0x2101dc(0x124))/0x9;if(_0x41b565===_0x2fe20f)break;else _0x5cd074['push'](_0x5cd074['shift']());}catch(_0x304f61){_0x5cd074['push'](_0x5cd074['shift']());}}}(a259_0x3189,0x5af95));function a259_0x3189(){const _0x495e44=['originalBytes','2061095NWJQRy','112006xRRxvW','577639TGxvBC','join','12pPFcYo','487712hlZxeX','redactionCount','sanitize','description','platform-issue-log-collect','17975322esPtSv','9CmQbWi','truncated','1891862aTrvZx','1565584ptznfn'];a259_0x3189=function(){return _0x495e44;};return a259_0x3189();}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export const PLATFORM_ISSUE_TRACE_NAME=a259_0x4327c1(0x123);export const PLATFORM_ISSUE_SPAN_NAME='issue.log.collect';export async function sendPlatformIssueCollectLog(_0x3b20ed){const _0x109d1c=a259_0x4327c1;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x3b20ed['title'],'issue.description':_0x3b20ed[_0x109d1c(0x122)],..._0x3b20ed[_0x109d1c(0x131)]?{'issue.description_original_bytes':_0x3b20ed['sanitize'][_0x109d1c(0x129)],'issue.description_truncated':_0x3b20ed['sanitize'][_0x109d1c(0x126)],'issue.description_redactions':_0x3b20ed[_0x109d1c(0x131)][_0x109d1c(0x130)],'issue.description_redaction_kinds':_0x3b20ed[_0x109d1c(0x131)]['redactionKinds'][_0x109d1c(0x12d)](',')}:{}}});}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a261_0x4ad43f=a261_0x5962;function a261_0x5962(_0x302e8a,_0x56e998){_0x302e8a=_0x302e8a-0x1b5;const _0x1101bc=a261_0x1101();let _0x596290=_0x1101bc[_0x302e8a];return _0x596290;}(function(_0x88032d,_0x86cc20){const _0x396944=a261_0x5962,_0x4b57b2=_0x88032d();while(!![]){try{const _0x55797f=parseInt(_0x396944(0x1ce))/0x1+parseInt(_0x396944(0x1d7))/0x2+-parseInt(_0x396944(0x1e7))/0x3+parseInt(_0x396944(0x1ed))/0x4+-parseInt(_0x396944(0x1e5))/0x5+parseInt(_0x396944(0x1cd))/0x6*(-parseInt(_0x396944(0x1eb))/0x7)+-parseInt(_0x396944(0x1e3))/0x8;if(_0x55797f===_0x86cc20)break;else _0x4b57b2['push'](_0x4b57b2['shift']());}catch(_0x38be12){_0x4b57b2['push'](_0x4b57b2['shift']());}}}(a261_0x1101,0x89dc0));export const CORE_IDE_CONFIGS={'cursor':{'name':a261_0x4ad43f(0x1b7),'description':a261_0x4ad43f(0x1c6),'folders':[a261_0x4ad43f(0x1d9),a261_0x4ad43f(0x1ba)],'files':[{'type':a261_0x4ad43f(0x1de),'path':a261_0x4ad43f(0x1d8),'template':a261_0x4ad43f(0x1dd)}]},'windsurf':{'name':a261_0x4ad43f(0x1ec),'description':a261_0x4ad43f(0x1ca),'folders':['.windsurf'],'files':[{'type':a261_0x4ad43f(0x1de),'path':a261_0x4ad43f(0x1c9),'template':'SKILL.md.tpl'}]},'claude':{'name':a261_0x4ad43f(0x1ee),'description':a261_0x4ad43f(0x1ee),'folders':[a261_0x4ad43f(0x1bb)],'files':[{'type':a261_0x4ad43f(0x1de),'path':a261_0x4ad43f(0x1cb),'template':a261_0x4ad43f(0x1dd)}]},'cline':{'name':a261_0x4ad43f(0x1da),'description':a261_0x4ad43f(0x1e2),'folders':[a261_0x4ad43f(0x1b9)],'files':[{'type':a261_0x4ad43f(0x1de),'path':a261_0x4ad43f(0x1cc),'template':a261_0x4ad43f(0x1dd)}]},'codex':{'name':a261_0x4ad43f(0x1e4),'description':a261_0x4ad43f(0x1bd),'folders':[a261_0x4ad43f(0x1dc)],'files':[{'type':a261_0x4ad43f(0x1de),'path':a261_0x4ad43f(0x1d2),'template':a261_0x4ad43f(0x1dd)}]},'opencode':{'name':a261_0x4ad43f(0x1c2),'description':a261_0x4ad43f(0x1be),'folders':[a261_0x4ad43f(0x1c5)],'files':[{'type':a261_0x4ad43f(0x1de),'path':a261_0x4ad43f(0x1b8),'template':'SKILL.md.tpl'}]},'qoder':{'name':a261_0x4ad43f(0x1c3),'description':'Qoder\x20IDE','folders':[a261_0x4ad43f(0x1d0)],'files':[{'type':a261_0x4ad43f(0x1de),'path':a261_0x4ad43f(0x1d3),'template':a261_0x4ad43f(0x1dd)},{'type':a261_0x4ad43f(0x1de),'path':a261_0x4ad43f(0x1e9),'template':a261_0x4ad43f(0x1dd)}]},'codebuddy':{'name':a261_0x4ad43f(0x1d4),'description':a261_0x4ad43f(0x1db),'folders':[a261_0x4ad43f(0x1c4)],'files':[{'type':a261_0x4ad43f(0x1de),'path':'.codebuddy/skills/lovrabet/SKILL.md','template':a261_0x4ad43f(0x1dd)}]},'trae':{'name':a261_0x4ad43f(0x1d5),'description':a261_0x4ad43f(0x1b6),'folders':['.trae'],'files':[{'type':a261_0x4ad43f(0x1de),'path':a261_0x4ad43f(0x1c1),'template':a261_0x4ad43f(0x1dd)}]}};function a261_0x1101(){const _0x365604=['qoder','Trae\x20IDE','Cursor','.opencode/skills/lovrabet/SKILL.md','.cline','.cursor','.claude','antigravity','Codex\x20IDE','OpenCode\x20IDE','其他\x20(通用模板)','windsurf','.trae/skills/lovrabet/SKILL.md','OpenCode','Qoder','.codebuddy','.opencode','Cursor\x20IDE','Antigravity\x20IDE','opencode','.windsurf/workflows/rabetbase.md','Windsurf\x20IDE','.claude/skills/lovrabet/SKILL.md','.cline/skills/lovrabet/SKILL.md','594474ZDgOZg','1032809XqlgPE','.agent','.qoder','.agent/skills/lovrabet/SKILL.md','.codex/skills/lovrabet/SKILL.md','.qoder/rules/rabetbase.md','CodeBuddy','Trae','codex','2251374IBxAea','.cursor/skills/rabetbase.md','.cursorrules','Cline','CodeBuddy\x20IDE','.codex','SKILL.md.tpl','file','Antigravity','trae','cursor','Cline\x20IDE','7049544dLtbJK','Codex','1387865XrCIAZ','cline','640536UBdoqX','codebuddy','.qoder/skills/lovrabet/SKILL.md','claude','28ljUfYr','Windsurf','699080MojvsY','Claude\x20Code'];a261_0x1101=function(){return _0x365604;};return a261_0x1101();}export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a261_0x4ad43f(0x1bf),'description':'通用模板\x20-\x20兜底方案','folders':[a261_0x4ad43f(0x1cf)],'files':[{'type':a261_0x4ad43f(0x1de),'path':a261_0x4ad43f(0x1d1),'template':a261_0x4ad43f(0x1dd)}]},'antigravity':{'name':a261_0x4ad43f(0x1df),'description':a261_0x4ad43f(0x1c7),'folders':[a261_0x4ad43f(0x1cf)],'files':[{'type':a261_0x4ad43f(0x1de),'path':'.agent/skills/lovrabet/SKILL.md','template':'SKILL.md.tpl'}]}};export const CORE_IDE_LIST=[a261_0x4ad43f(0x1ea),a261_0x4ad43f(0x1e6),a261_0x4ad43f(0x1e8),'codex',a261_0x4ad43f(0x1e1),a261_0x4ad43f(0x1c8),a261_0x4ad43f(0x1b5),a261_0x4ad43f(0x1e0),a261_0x4ad43f(0x1c0)];export const IDE_LIST=[a261_0x4ad43f(0x1bc),a261_0x4ad43f(0x1ea),a261_0x4ad43f(0x1e6),a261_0x4ad43f(0x1e8),a261_0x4ad43f(0x1d6),'cursor',a261_0x4ad43f(0x1c8),'qoder',a261_0x4ad43f(0x1e0),a261_0x4ad43f(0x1c0),'agent'];export const ALL_CORE_IDES=[a261_0x4ad43f(0x1e1),a261_0x4ad43f(0x1c0),a261_0x4ad43f(0x1ea),'cline',a261_0x4ad43f(0x1d6),'opencode','qoder','codebuddy',a261_0x4ad43f(0x1e0)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a262_0x55de(_0x54a24b,_0x3d56be){_0x54a24b=_0x54a24b-0x1c5;const _0x2ffcce=a262_0x2ffc();let _0x55de4d=_0x2ffcce[_0x54a24b];return _0x55de4d;}function a262_0x2ffc(){const _0x2e9e8d=['7274480oraArx','1859790yHAsVW','3711104IVUiqX','14fFPQsi','3lbZbtb','219278cdWJUV','1866006SmZNYo','686161uaMecv','2489650AruDIg'];a262_0x2ffc=function(){return _0x2e9e8d;};return a262_0x2ffc();}(function(_0x75af1b,_0x4dff19){const _0xe91de1=a262_0x55de,_0x51ff2c=_0x75af1b();while(!![]){try{const _0x2a73cb=parseInt(_0xe91de1(0x1c9))/0x1+parseInt(_0xe91de1(0x1c7))/0x2*(parseInt(_0xe91de1(0x1c6))/0x3)+parseInt(_0xe91de1(0x1cd))/0x4+-parseInt(_0xe91de1(0x1ca))/0x5+-parseInt(_0xe91de1(0x1cc))/0x6*(-parseInt(_0xe91de1(0x1c5))/0x7)+-parseInt(_0xe91de1(0x1cb))/0x8+-parseInt(_0xe91de1(0x1c8))/0x9;if(_0x2a73cb===_0x4dff19)break;else _0x51ff2c['push'](_0x51ff2c['shift']());}catch(_0x4da229){_0x51ff2c['push'](_0x51ff2c['shift']());}}}(a262_0x2ffc,0xb1f64));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x205475,_0x12c9c7){const _0x36c4db=a263_0x1d1b,_0x464b79=_0x205475();while(!![]){try{const _0x10d74d=-parseInt(_0x36c4db(0x19b))/0x1*(parseInt(_0x36c4db(0x198))/0x2)+-parseInt(_0x36c4db(0x1a8))/0x3*(parseInt(_0x36c4db(0x1a9))/0x4)+-parseInt(_0x36c4db(0x1a6))/0x5+-parseInt(_0x36c4db(0x1a2))/0x6*(-parseInt(_0x36c4db(0x1aa))/0x7)+-parseInt(_0x36c4db(0x1a3))/0x8*(-parseInt(_0x36c4db(0x1a5))/0x9)+parseInt(_0x36c4db(0x1a4))/0xa*(-parseInt(_0x36c4db(0x1a7))/0xb)+parseInt(_0x36c4db(0x19f))/0xc;if(_0x10d74d===_0x12c9c7)break;else _0x464b79['push'](_0x464b79['shift']());}catch(_0x27752a){_0x464b79['push'](_0x464b79['shift']());}}}(a263_0x400e,0x760a9));import{getTemplateBaseUrl}from'../utils/config.js';function a263_0x1d1b(_0x417625,_0xa6a4c2){_0x417625=_0x417625-0x197;const _0x400e11=a263_0x400e();let _0x1d1bda=_0x400e11[_0x417625];return _0x1d1bda;}export async function fetchCdnConfig(){const _0x11ee7e=a263_0x1d1b,_0x1ac1a1=getTemplateBaseUrl(),_0x543648=[_0x1ac1a1+_0x11ee7e(0x19e),_0x1ac1a1+_0x11ee7e(0x1a1)];for(const _0x4c3595 of _0x543648){try{const _0x2b0d09=await fetch(_0x4c3595,{'headers':{'Accept':_0x11ee7e(0x19d)}});if(!_0x2b0d09['ok'])continue;const _0x2ea541=await _0x2b0d09[_0x11ee7e(0x1a0)]();if(!_0x2ea541['cli']?.[_0x11ee7e(0x199)]||!_0x2ea541[_0x11ee7e(0x197)]?.[_0x11ee7e(0x19c)]?.['stableVersion'])continue;return _0x2ea541;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];function a263_0x400e(){const _0x349154=['3610JDFVsg','9YRjWBn','2880730bsouHv','15213EXsyoS','1125714BzlxuW','4WDAipF','21NrRqwj','sdk','8KIMfAv','stableVersion','now','191885tlbZfy','node','application/json','/config.json','26401932talazu','json','/config/index.json','443148mjleBL','2239592uviJXg'];a263_0x400e=function(){return _0x349154;};return a263_0x400e();}export async function getCdnConfig(){const _0x5d74e5=a263_0x1d1b,_0x23d99a=Date[_0x5d74e5(0x19a)]();if(hasCachedConfig){const _0x3a69ec=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x23d99a-cacheTime<_0x3a69ec)return cachedConfig;}const _0x6c5377=await fetchCdnConfig();return cachedConfig=_0x6c5377,cacheTime=_0x23d99a,hasCachedConfig=!![],_0x6c5377;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a264_0x2652c0=a264_0x1691;(function(_0x9519c1,_0x38189e){const _0x44e405=a264_0x1691,_0x238daf=_0x9519c1();while(!![]){try{const _0x4621c4=-parseInt(_0x44e405(0x1cf))/0x1*(-parseInt(_0x44e405(0x1d1))/0x2)+-parseInt(_0x44e405(0x1dc))/0x3+-parseInt(_0x44e405(0x1bb))/0x4+parseInt(_0x44e405(0x1d7))/0x5+parseInt(_0x44e405(0x1d6))/0x6*(parseInt(_0x44e405(0x1cb))/0x7)+parseInt(_0x44e405(0x1d4))/0x8+-parseInt(_0x44e405(0x1d2))/0x9;if(_0x4621c4===_0x38189e)break;else _0x238daf['push'](_0x238daf['shift']());}catch(_0x3ec59c){_0x238daf['push'](_0x238daf['shift']());}}}(a264_0x29d3,0xe8a99));function a264_0x29d3(){const _0x370a5c=['951894glaKLz','utf8','log','3559364IMnhYy','minVersion','node','parse','\x20\x20\x20Stable\x20version:\x20','\x20\x20\x20Upgrade\x20command:\x20','version','readFileSync','npm\x20install\x20','stableVersion','@lovrabet/sdk','devDependencies','needsUpgrade','coerce','1.2.0','\x1b[33m','1180571Jsvnvn','\x20\x20\x20Current\x20version:\x20','package.json','all','194802TFJfvF','utf-8','2XxQAEw','4630941GXmsxZ','join','5884416ColRlw','packageName','36QFrJgu','3662005GgnBis','sdk','\x1b[0m','latest','↪\x20SDK\x20update\x20available'];a264_0x29d3=function(){return _0x370a5c;};return a264_0x29d3();}import a264_0x414a28 from'node:fs';import a264_0x18e893 from'node:path';import a264_0x2f88b1 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a264_0x2652c0(0x1c9);function isNonNumericVersion(_0x50fe78){const _0x22f731=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x22f731['some'](_0x4667e5=>_0x4667e5['test'](_0x50fe78));}function getInstalledVersion(_0x600a8,_0x2d5bc9){const _0x577027=a264_0x2652c0;try{const _0x596743=a264_0x18e893['join'](_0x600a8,'node_modules',_0x2d5bc9,_0x577027(0x1cd));if(a264_0x414a28['existsSync'](_0x596743)){const _0x1f6ea3=JSON[_0x577027(0x1be)](a264_0x414a28['readFileSync'](_0x596743,_0x577027(0x1d0)));return _0x1f6ea3[_0x577027(0x1c1)]||null;}}catch{}return null;}function a264_0x1691(_0x2e3af8,_0x2a529c){_0x2e3af8=_0x2e3af8-0x1b9;const _0x29d340=a264_0x29d3();let _0x169134=_0x29d340[_0x2e3af8];return _0x169134;}async function getSdkStableVersion(){const _0x11c13b=a264_0x2652c0;try{const _0x499bb2=await getCdnConfig();return _0x499bb2?.['sdk']?.[_0x11c13b(0x1bd)]?.[_0x11c13b(0x1c4)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x191fd5=a264_0x2652c0;try{const _0x42b6b2=await getCdnConfig();return _0x42b6b2?.[_0x191fd5(0x1d8)]?.[_0x191fd5(0x1bd)]?.[_0x191fd5(0x1d5)]||_0x191fd5(0x1c5);}catch{return _0x191fd5(0x1c5);}}export async function checkSdkVersion(_0x2c7010){const _0x369f1a=a264_0x2652c0,_0x4f9a62=a264_0x18e893[_0x369f1a(0x1d3)](_0x2c7010,_0x369f1a(0x1cd)),[_0x22b707,_0x4d5b76]=await Promise[_0x369f1a(0x1ce)]([getSdkStableVersion(),getSdkPackageName()]),_0x1decb8=_0x22b707||FALLBACK_MIN_SDK_VERSION;if(!a264_0x414a28['existsSync'](_0x4f9a62))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x1decb8,'packageName':_0x4d5b76,'stableVersion':_0x22b707};try{const _0x4e76d4=JSON[_0x369f1a(0x1be)](a264_0x414a28['readFileSync'](_0x4f9a62,'utf8')),_0x5306b4=_0x4e76d4['dependencies']||{},_0x5597de=_0x4e76d4['devDependencies']||{},_0x1b08ee=_0x5306b4[_0x4d5b76]||_0x5597de[_0x4d5b76];if(!_0x1b08ee)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x1decb8,'packageName':_0x4d5b76,'stableVersion':_0x22b707};let _0x47a6d5=getInstalledVersion(_0x2c7010,_0x4d5b76);!_0x47a6d5&&(_0x47a6d5=_0x1b08ee);if(isNonNumericVersion(_0x1b08ee))return{'installed':!![],'version':_0x47a6d5,'needsUpgrade':![],'minVersion':_0x1decb8,'packageName':_0x4d5b76,'stableVersion':_0x22b707};const _0x5cae55=a264_0x2f88b1[_0x369f1a(0x1c8)](_0x47a6d5),_0x89d842=a264_0x2f88b1[_0x369f1a(0x1c8)](_0x1decb8),_0x531904=_0x5cae55&&_0x89d842?a264_0x2f88b1['lt'](_0x5cae55,_0x89d842):![];return{'installed':!![],'version':_0x47a6d5,'needsUpgrade':_0x531904,'minVersion':_0x1decb8,'packageName':_0x4d5b76,'stableVersion':_0x22b707};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x1decb8,'packageName':_0x4d5b76,'stableVersion':_0x22b707};}}export function checkSdkVersionSync(_0xd152ad){const _0x30516a=a264_0x2652c0,_0x44c679=a264_0x18e893[_0x30516a(0x1d3)](_0xd152ad,_0x30516a(0x1cd)),_0x30df3c=_0x30516a(0x1c5);if(!a264_0x414a28['existsSync'](_0x44c679))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x30df3c,'stableVersion':null};try{const _0x1cdfc9=JSON[_0x30516a(0x1be)](a264_0x414a28[_0x30516a(0x1c2)](_0x44c679,_0x30516a(0x1b9))),_0x1a0b13=_0x1cdfc9['dependencies']||{},_0x1ff419=_0x1cdfc9[_0x30516a(0x1c6)]||{},_0x2200d6=_0x1a0b13[_0x30df3c]||_0x1ff419[_0x30df3c];if(!_0x2200d6)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x30df3c,'stableVersion':null};let _0x491403=getInstalledVersion(_0xd152ad,_0x30df3c);!_0x491403&&(_0x491403=_0x2200d6);if(isNonNumericVersion(_0x2200d6))return{'installed':!![],'version':_0x491403,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x30df3c,'stableVersion':null};const _0x3ad599=a264_0x2f88b1[_0x30516a(0x1c8)](_0x491403),_0x3ef346=_0x3ad599?a264_0x2f88b1['lt'](_0x3ad599,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x491403,'needsUpgrade':_0x3ef346,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x30df3c,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x30df3c,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x2ba119){const _0xc1b90=a264_0x2652c0;if(!_0x2ba119[_0xc1b90(0x1c7)])return;const _0x8a81bf=_0xc1b90(0x1ca),_0x28e03a=_0xc1b90(0x1d9),_0x44ff5e='\x1b[1m',_0x5e35fd=_0x2ba119['packageName']||_0xc1b90(0x1c5),_0x237195=_0x2ba119[_0xc1b90(0x1c4)]||_0x2ba119[_0xc1b90(0x1bc)],_0xf0a112=_0xc1b90(0x1c3)+_0x5e35fd+'@'+(_0x237195||_0xc1b90(0x1da));console[_0xc1b90(0x1ba)](),console[_0xc1b90(0x1ba)](''+_0x8a81bf+_0x44ff5e+_0xc1b90(0x1db)+_0x28e03a),console[_0xc1b90(0x1ba)](_0x8a81bf+_0xc1b90(0x1cc)+_0x5e35fd+'@'+_0x2ba119[_0xc1b90(0x1c1)]+_0x28e03a),console[_0xc1b90(0x1ba)](_0x8a81bf+_0xc1b90(0x1bf)+_0x237195+_0x28e03a),console[_0xc1b90(0x1ba)](_0x8a81bf+_0xc1b90(0x1c0)+_0xf0a112+_0x28e03a),console['log']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xac792,_0x26977d){const _0x255bbc=a265_0x5470,_0x475631=_0xac792();while(!![]){try{const _0x2a6c55=parseInt(_0x255bbc(0x1b7))/0x1+parseInt(_0x255bbc(0x1a2))/0x2+-parseInt(_0x255bbc(0x1b2))/0x3*(-parseInt(_0x255bbc(0x1b6))/0x4)+parseInt(_0x255bbc(0x1a8))/0x5+parseInt(_0x255bbc(0x1c1))/0x6+-parseInt(_0x255bbc(0x1c6))/0x7+parseInt(_0x255bbc(0x1b9))/0x8*(-parseInt(_0x255bbc(0x1bc))/0x9);if(_0x2a6c55===_0x26977d)break;else _0x475631['push'](_0x475631['shift']());}catch(_0x56f5e6){_0x475631['push'](_0x475631['shift']());}}}(a265_0x454c,0x3c2db));function a265_0x454c(){const _0xff6dcc=['version','\x20\x20\x20Recommended\x20stable:\x20','utf-8','\x20\x20\x20Stable\x20version:\x20','2699235xtJVoD','npm\x20install\x20-g\x20','89802rbdTje','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','package.json','filter','\x20\x20\x20','belowMinimum','542945QxcGzx','minimumVersionMessage','\x1b[33m','\x1b[1m','stableVersion','\x20\x20\x20Upgrade\x20command:\x20','\x20\x20\x20Current\x20CLI\x20version:\x20','coerce','Minimum\x20supported:\x20','needsUpgrade','15GuwIRd','Upgrade\x20command:\x20','upgradeMessage','minimumVersion','46212vZydzU','252245hQQLKK','latest','7640Wcphuh','log','1.0.0','1611UAopDN','currentVersion','↪\x20Critical\x20CLI\x20upgrade\x20required','validation','join','2037246oGIeEs'];a265_0x454c=function(){return _0xff6dcc;};return a265_0x454c();}import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a265_0x3dd90a 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(_0x15dd42){const _0x5937fc=a265_0x5470,_0x335c47=_0x15dd42[_0x5937fc(0x1ac)]||_0x5937fc(0x1b8);return _0x5937fc(0x1a1)+NPM_PACKAGE_NAME+'@'+_0x335c47;}function getCurrentCliVersion(){const _0x137f55=a265_0x5470;try{const _0x2057fd=fileURLToPath(import.meta.url),_0x732956=resolve(dirname(_0x2057fd),'../..'),_0x524d61=resolve(_0x732956,_0x137f55(0x1a4)),_0x39f679=JSON['parse'](readFileSync(_0x524d61,_0x137f55(0x1c4)));return _0x39f679[_0x137f55(0x1c2)]||_0x137f55(0x1bb);}catch{return _0x137f55(0x1bb);}}export async function checkCliVersion(){const _0x43a70f=a265_0x5470,_0x54974e=getCurrentCliVersion(),_0x3427f2=await getCliVersionPolicy(),_0x1ce17a=_0x3427f2?.[_0x43a70f(0x1ac)]||null,_0x497765=_0x3427f2?.['minimumVersion']||null;let _0x148f57=![],_0x595542=![];const _0x262847=a265_0x3dd90a['coerce'](_0x54974e);if(_0x262847&&_0x1ce17a)try{const _0x56a433=a265_0x3dd90a[_0x43a70f(0x1af)](_0x1ce17a);if(_0x56a433)_0x148f57=a265_0x3dd90a['lt'](_0x262847,_0x56a433);}catch{}if(_0x262847&&_0x497765)try{const _0x357c93=a265_0x3dd90a[_0x43a70f(0x1af)](_0x497765);if(_0x357c93)_0x595542=a265_0x3dd90a['lt'](_0x262847,_0x357c93);}catch{}return _0x595542&&(_0x148f57=!![]),{'currentVersion':_0x54974e,'stableVersion':_0x1ce17a,'minimumVersion':_0x497765,'needsUpgrade':_0x148f57,'belowMinimum':_0x595542,'isPreRelease':![],'upgradeMessage':_0x3427f2?.[_0x43a70f(0x1b4)],'minimumVersionMessage':_0x3427f2?.[_0x43a70f(0x1a9)]};}export function printCliUpgradeWarning(_0x19b61b){const _0x51efe4=a265_0x5470;if(!_0x19b61b[_0x51efe4(0x1b1)]&&!_0x19b61b[_0x51efe4(0x1a7)])return;const _0x2e7ff8='\x1b[31m',_0x207299=_0x51efe4(0x1aa),_0x3ffb14='\x1b[0m',_0x4e0c4f=_0x51efe4(0x1ab),_0x4f22c9=getCliUpgradeCommand(_0x19b61b);console['log'](),_0x19b61b[_0x51efe4(0x1a7)]?(console[_0x51efe4(0x1ba)](''+_0x2e7ff8+_0x4e0c4f+_0x51efe4(0x1be)+_0x3ffb14),console[_0x51efe4(0x1ba)](_0x2e7ff8+_0x51efe4(0x1ae)+_0x19b61b[_0x51efe4(0x1bd)]+_0x3ffb14),_0x19b61b[_0x51efe4(0x1b5)]&&console[_0x51efe4(0x1ba)](_0x2e7ff8+'\x20\x20\x20Minimum\x20supported:\x20'+_0x19b61b['minimumVersion']+_0x3ffb14),_0x19b61b[_0x51efe4(0x1ac)]&&_0x19b61b[_0x51efe4(0x1ac)]!==_0x19b61b[_0x51efe4(0x1b5)]&&console[_0x51efe4(0x1ba)](_0x2e7ff8+_0x51efe4(0x1c3)+_0x19b61b[_0x51efe4(0x1ac)]+_0x3ffb14),_0x19b61b['minimumVersionMessage']&&console[_0x51efe4(0x1ba)](_0x2e7ff8+'\x20\x20\x20'+_0x19b61b[_0x51efe4(0x1a9)]+_0x3ffb14),console[_0x51efe4(0x1ba)](_0x2e7ff8+_0x51efe4(0x1ad)+_0x4f22c9+_0x3ffb14)):(console[_0x51efe4(0x1ba)](''+_0x207299+_0x4e0c4f+'↪\x20New\x20version\x20available'+_0x3ffb14),console[_0x51efe4(0x1ba)](_0x207299+_0x51efe4(0x1ae)+_0x19b61b[_0x51efe4(0x1bd)]+_0x3ffb14),console[_0x51efe4(0x1ba)](_0x207299+_0x51efe4(0x1c5)+_0x19b61b[_0x51efe4(0x1ac)]+_0x3ffb14),_0x19b61b['upgradeMessage']&&console[_0x51efe4(0x1ba)](_0x207299+_0x51efe4(0x1a6)+_0x19b61b[_0x51efe4(0x1b4)]+_0x3ffb14),console[_0x51efe4(0x1ba)](_0x207299+'\x20\x20\x20Upgrade\x20command:\x20'+_0x4f22c9+_0x3ffb14)),console[_0x51efe4(0x1ba)]();}function a265_0x5470(_0x1d76b2,_0x2e541e){_0x1d76b2=_0x1d76b2-0x1a1;const _0x454cfc=a265_0x454c();let _0x54702c=_0x454cfc[_0x1d76b2];return _0x54702c;}export function assertCliVersionSupported(_0x69d023){const _0x1a9510=a265_0x5470;if(!_0x69d023['belowMinimum'])return;const _0x5d249d=[_0x69d023['minimumVersionMessage'],'Current\x20version:\x20'+_0x69d023[_0x1a9510(0x1bd)],_0x69d023[_0x1a9510(0x1b5)]?_0x1a9510(0x1b0)+_0x69d023['minimumVersion']:null,_0x1a9510(0x1b3)+getCliUpgradeCommand(_0x69d023)][_0x1a9510(0x1a5)](Boolean)[_0x1a9510(0x1c0)]('\x0a');throw CliErrors[_0x1a9510(0x1bf)](_0x1a9510(0x1a3),_0x5d249d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4416b5,_0x4f0262){const _0x5e2e6d=a266_0x2065,_0x91029b=_0x4416b5();while(!![]){try{const _0x1abec0=parseInt(_0x5e2e6d(0x90))/0x1*(-parseInt(_0x5e2e6d(0x8b))/0x2)+-parseInt(_0x5e2e6d(0x8f))/0x3*(-parseInt(_0x5e2e6d(0x98))/0x4)+-parseInt(_0x5e2e6d(0x99))/0x5*(-parseInt(_0x5e2e6d(0xa1))/0x6)+-parseInt(_0x5e2e6d(0x8a))/0x7*(parseInt(_0x5e2e6d(0x94))/0x8)+parseInt(_0x5e2e6d(0x88))/0x9*(-parseInt(_0x5e2e6d(0xa2))/0xa)+parseInt(_0x5e2e6d(0x92))/0xb*(-parseInt(_0x5e2e6d(0x96))/0xc)+-parseInt(_0x5e2e6d(0x97))/0xd*(-parseInt(_0x5e2e6d(0x85))/0xe);if(_0x1abec0===_0x4f0262)break;else _0x91029b['push'](_0x91029b['shift']());}catch(_0x2f93df){_0x91029b['push'](_0x91029b['shift']());}}}(a266_0x16fa,0x9e454));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(_0x2a02e4){const _0x54f7d0=a266_0x2065;return typeof _0x2a02e4===_0x54f7d0(0x86)&&_0x2a02e4[_0x54f7d0(0x93)]()[_0x54f7d0(0x8e)]>0x0?_0x2a02e4[_0x54f7d0(0x93)]():null;}function a266_0x16fa(){const _0x2fa133=['820780KTZuRW','recommendedVersion','42DILugW','string','upgradeMessage','45unFDFx','minimumVersionMessage','4781EcCPnA','142oyNiIz','json','minVersion','length','60TkqOuu','17403keAFQT','latestVersion','11MRsSFm','trim','3864LEmblc','object','1326036zNpfun','4316117sRShDI','122816FuQxZG','20xPjwPf','signal','minimumVersion','abort','now','stableVersion','cli','application/json','1686846IaKdTZ'];a266_0x16fa=function(){return _0x2fa133;};return a266_0x16fa();}function a266_0x2065(_0x3af6a8,_0x4d876a){_0x3af6a8=_0x3af6a8-0x84;const _0x16faef=a266_0x16fa();let _0x20652b=_0x16faef[_0x3af6a8];return _0x20652b;}function normalizeCliVersionPolicy(_0x15bd3d){const _0x3dccab=a266_0x2065;if(!_0x15bd3d||typeof _0x15bd3d!==_0x3dccab(0x95))return null;const _0x239864=_0x15bd3d,_0x5d3e9c=_0x239864['cli']&&typeof _0x239864[_0x3dccab(0x9f)]===_0x3dccab(0x95)?_0x239864[_0x3dccab(0x9f)]:_0x239864,_0x3746dd=pickString(_0x5d3e9c[_0x3dccab(0x9e)])||pickString(_0x5d3e9c[_0x3dccab(0x91)])||pickString(_0x5d3e9c[_0x3dccab(0x84)]),_0x31c3e8=pickString(_0x5d3e9c[_0x3dccab(0x9b)])||pickString(_0x5d3e9c[_0x3dccab(0x8d)]);if(!_0x3746dd&&!_0x31c3e8)return null;return{'stableVersion':_0x3746dd,'minimumVersion':_0x31c3e8,'upgradeMessage':pickString(_0x5d3e9c[_0x3dccab(0x87)])||undefined,'minimumVersionMessage':pickString(_0x5d3e9c[_0x3dccab(0x89)])||undefined};}export async function fetchCliVersionPolicy(){const _0x5a2852=a266_0x2065,_0xb60c66=new AbortController(),_0x23ecc7=setTimeout(()=>_0xb60c66[_0x5a2852(0x9c)](),FETCH_TIMEOUT_MS);try{const _0x2537d2=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x5a2852(0xa0)},'signal':_0xb60c66[_0x5a2852(0x9a)]});if(!_0x2537d2['ok'])return null;const _0x3cae63=await _0x2537d2[_0x5a2852(0x8c)]();return normalizeCliVersionPolicy(_0x3cae63);}catch{return null;}finally{clearTimeout(_0x23ecc7);}}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];export async function getCliVersionPolicy(){const _0x513bfa=a266_0x2065,_0x46e47d=Date[_0x513bfa(0x9d)]();if(hasCachedPolicy){const _0x1e0af0=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x46e47d-cacheTime<_0x1e0af0)return cachedPolicy;}const _0x54333b=await fetchCliVersionPolicy();return cachedPolicy=_0x54333b,cacheTime=_0x46e47d,hasCachedPolicy=!![],_0x54333b;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a267_0x408339=a267_0x1eaf;(function(_0x5be388,_0x362b99){const _0x12d551=a267_0x1eaf,_0x4371fe=_0x5be388();while(!![]){try{const _0x47ac9f=parseInt(_0x12d551(0xad))/0x1+-parseInt(_0x12d551(0xb5))/0x2*(-parseInt(_0x12d551(0xae))/0x3)+parseInt(_0x12d551(0xb2))/0x4+parseInt(_0x12d551(0xb0))/0x5*(-parseInt(_0x12d551(0xb1))/0x6)+-parseInt(_0x12d551(0xb7))/0x7*(-parseInt(_0x12d551(0xb6))/0x8)+parseInt(_0x12d551(0xb3))/0x9+-parseInt(_0x12d551(0xac))/0xa*(parseInt(_0x12d551(0xb9))/0xb);if(_0x47ac9f===_0x362b99)break;else _0x4371fe['push'](_0x4371fe['shift']());}catch(_0x4272ef){_0x4371fe['push'](_0x4371fe['shift']());}}}(a267_0x3af7,0x3db57));function a267_0x3af7(){const _0x3a8d61=['project','414805ihcaDV','6oCwoUd','577848pXIrqf','766710ZnrLMa','env','2TQxCEW','24KkDEJU','973021hzAbSa','string','114983EkqLFV','680SJEOGS','371562EjdEXu','84903mAoVrq'];a267_0x3af7=function(){return _0x3a8d61;};return a267_0x3af7();}import{initEnv}from'../constant/env.js';function a267_0x1eaf(_0x1b84da,_0x2c3cb5){_0x1b84da=_0x1b84da-0xac;const _0x3af79c=a267_0x3af7();let _0x1eaf7b=_0x3af79c[_0x1b84da];return _0x1eaf7b;}import{readRawConfig,getConfigAppCode as a267_0x2252d4,getMultiAppConfigs as a267_0xdc36ec,getTemplateBaseUrl as a267_0x31e011}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x41b214){const _0x2ce03e=a267_0x1eaf,_0x3a58bd=readRawConfig(_0x41b214);return _0x3a58bd[_0x2ce03e(0xb4)]&&typeof _0x3a58bd[_0x2ce03e(0xb4)]===_0x2ce03e(0xb8)&&initEnv(_0x3a58bd['env']),_0x3a58bd;}export function getConfigAppCode(){return a267_0x2252d4();}export function getMultiAppConfigs(_0xb79e1b=a267_0x408339(0xaf)){return a267_0xdc36ec(_0xb79e1b);}export function getTemplateBaseUrl(){return a267_0x31e011();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a268_0x5c96(){const _0xefe483=['65ZxHbQB','36060KBMgHP','8xogjkC','631752PRaojD','error','join','105GlrwSj','4654704JXKHQM','copyFileSync','926676crfkob','name','1244tuLBJt','7IDUWvT','复制目录时出错:','4678731nWvNuY','2833650zpmIdn','isDirectory','329QpxWav','110wVMbti'];a268_0x5c96=function(){return _0xefe483;};return a268_0x5c96();}(function(_0x266f3e,_0x2803ad){const _0xfc3427=a268_0xd5e1,_0x163126=_0x266f3e();while(!![]){try{const _0x3b8317=-parseInt(_0xfc3427(0x19d))/0x1*(-parseInt(_0xfc3427(0x1aa))/0x2)+-parseInt(_0xfc3427(0x1a8))/0x3+-parseInt(_0xfc3427(0x1a0))/0x4*(-parseInt(_0xfc3427(0x1a5))/0x5)+-parseInt(_0xfc3427(0x19b))/0x6*(parseInt(_0xfc3427(0x1ab))/0x7)+-parseInt(_0xfc3427(0x1a1))/0x8*(parseInt(_0xfc3427(0x1ad))/0x9)+parseInt(_0xfc3427(0x19e))/0xa*(-parseInt(_0xfc3427(0x1a2))/0xb)+parseInt(_0xfc3427(0x1a6))/0xc*(parseInt(_0xfc3427(0x19f))/0xd);if(_0x3b8317===_0x2803ad)break;else _0x163126['push'](_0x163126['shift']());}catch(_0x321b90){_0x163126['push'](_0x163126['shift']());}}}(a268_0x5c96,0x61cfb));import a268_0x11c2fc from'node:path';function a268_0xd5e1(_0x773ea4,_0x1bdb93){_0x773ea4=_0x773ea4-0x19b;const _0x5c960b=a268_0x5c96();let _0xd5e185=_0x5c960b[_0x773ea4];return _0xd5e185;}import a268_0x46cb77 from'node:fs';export async function copyDirectory(_0x374000,_0x59ee3a){const _0x2c1662=a268_0xd5e1;try{const _0x49cb6a=a268_0x46cb77['readdirSync'](_0x374000,{'withFileTypes':!![]});a268_0x46cb77['mkdirSync'](_0x59ee3a,{'recursive':!![]});for(const _0x36a985 of _0x49cb6a){const _0x586922=a268_0x11c2fc['join'](_0x374000,_0x36a985[_0x2c1662(0x1a9)]),_0x2e8eae=a268_0x11c2fc[_0x2c1662(0x1a4)](_0x59ee3a,_0x36a985[_0x2c1662(0x1a9)]);_0x36a985[_0x2c1662(0x19c)]()?await copyDirectory(_0x586922,_0x2e8eae):a268_0x46cb77[_0x2c1662(0x1a7)](_0x586922,_0x2e8eae);}}catch(_0x218769){console[_0x2c1662(0x1a3)](_0x2c1662(0x1ac),_0x218769);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x7e0ec5,_0x314f1e){const _0x4a5b03=a269_0x5528,_0x24f5b5=_0x7e0ec5();while(!![]){try{const _0x5101a0=parseInt(_0x4a5b03(0x14a))/0x1*(-parseInt(_0x4a5b03(0x14e))/0x2)+-parseInt(_0x4a5b03(0x14d))/0x3+parseInt(_0x4a5b03(0x153))/0x4*(-parseInt(_0x4a5b03(0x14b))/0x5)+-parseInt(_0x4a5b03(0x154))/0x6*(-parseInt(_0x4a5b03(0x155))/0x7)+-parseInt(_0x4a5b03(0x14c))/0x8*(-parseInt(_0x4a5b03(0x151))/0x9)+parseInt(_0x4a5b03(0x148))/0xa*(parseInt(_0x4a5b03(0x152))/0xb)+parseInt(_0x4a5b03(0x147))/0xc;if(_0x5101a0===_0x314f1e)break;else _0x24f5b5['push'](_0x24f5b5['shift']());}catch(_0x3f5547){_0x24f5b5['push'](_0x24f5b5['shift']());}}}(a269_0x2e1c,0x5fb46));function a269_0x5528(_0x263d84,_0x2b3f0f){_0x263d84=_0x263d84-0x146;const _0x2e1cbc=a269_0x2e1c();let _0x5528c3=_0x2e1cbc[_0x263d84];return _0x5528c3;}function toFiniteNumber(_0xfaa9a1){const _0x248947=a269_0x5528;if(typeof _0xfaa9a1===_0x248947(0x14f)&&Number[_0x248947(0x150)](_0xfaa9a1))return _0xfaa9a1;if(typeof _0xfaa9a1===_0x248947(0x146)){const _0x1f426c=_0xfaa9a1[_0x248947(0x149)]();if(!_0x1f426c)return undefined;const _0x134817=Number(_0x1f426c);if(Number[_0x248947(0x150)](_0x134817))return _0x134817;}return undefined;}export function normalizeEntityWithIdResponse(_0x583ead){const _0x2c9f5b=toFiniteNumber(_0x583ead);if(_0x2c9f5b!==undefined)return{'id':_0x2c9f5b,'entity':{'id':_0x2c9f5b}};if(!_0x583ead||typeof _0x583ead!=='object')return{'id':undefined,'entity':{}};const _0x54d59e={..._0x583ead},_0x3e3e4a=toFiniteNumber(_0x54d59e['id']);return _0x3e3e4a!==undefined&&(_0x54d59e['id']=_0x3e3e4a),{'id':_0x3e3e4a,'entity':_0x54d59e};}function a269_0x2e1c(){const _0x2f5ebf=['number','isFinite','3684159TbqqMJ','22owaHoM','10596FmjcLZ','27528EqkEKP','315GEZIVR','string','5602896ewiHCh','2359830LQmrao','trim','4Btxwqd','130tUQSyz','8bdFaiT','2227623hbyuPT','175632kUEkIZ'];a269_0x2e1c=function(){return _0x2f5ebf;};return a269_0x2e1c();}
|