zcw-shared 1.7.0 → 1.8.0
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 +512 -512
- package/assets/logo-colorful.svg +18 -18
- package/assets/logo-name.svg +7 -7
- package/assets/logo-transparent.svg +14 -14
- package/assets/logo.svg +8 -8
- package/dist/constants/softwareConfigs.d.ts +14 -0
- package/dist/constants/softwareConfigs.js +156 -0
- package/dist/constants/softwareConfigs.js.map +1 -0
- package/dist/functions/ag-grid/generateLicense.d.ts +3 -0
- package/dist/functions/ag-grid/generateLicense.js +12 -0
- package/dist/functions/ag-grid/generateLicense.js.map +1 -0
- package/dist/functions/altool/createAltoolClient.d.ts +21 -0
- package/dist/functions/altool/createAltoolClient.js +53 -0
- package/dist/functions/altool/createAltoolClient.js.map +1 -0
- package/dist/functions/altool/getAltoolAuth.d.ts +2 -0
- package/dist/functions/altool/getAltoolAuth.js +8 -0
- package/dist/functions/altool/getAltoolAuth.js.map +1 -0
- package/dist/functions/altool/getAppInfo.d.ts +13 -0
- package/dist/functions/altool/getAppInfo.js +39 -0
- package/dist/functions/altool/getAppInfo.js.map +1 -0
- package/dist/functions/altool/index.d.ts +10 -0
- package/dist/functions/altool/index.js +6 -0
- package/dist/functions/altool/index.js.map +1 -0
- package/dist/functions/altool/isApiKeyAuth.d.ts +2 -0
- package/dist/functions/altool/isApiKeyAuth.js +4 -0
- package/dist/functions/altool/isApiKeyAuth.js.map +1 -0
- package/dist/functions/altool/isCredentialsAuth.d.ts +2 -0
- package/dist/functions/altool/isCredentialsAuth.js +4 -0
- package/dist/functions/altool/isCredentialsAuth.js.map +1 -0
- package/dist/functions/altool/parseAppInfoOutput.d.ts +2 -0
- package/dist/functions/altool/parseAppInfoOutput.js +55 -0
- package/dist/functions/altool/parseAppInfoOutput.js.map +1 -0
- package/dist/functions/altool/parseValidationOutput.d.ts +6 -0
- package/dist/functions/altool/parseValidationOutput.js +21 -0
- package/dist/functions/altool/parseValidationOutput.js.map +1 -0
- package/dist/functions/altool/types.d.ts +26 -0
- package/dist/functions/altool/types.js +7 -0
- package/dist/functions/altool/types.js.map +1 -0
- package/dist/functions/altool/uploadApp.d.ts +6 -0
- package/dist/functions/altool/uploadApp.js +36 -0
- package/dist/functions/altool/uploadApp.js.map +1 -0
- package/dist/functions/altool/validateApp.d.ts +17 -0
- package/dist/functions/altool/validateApp.js +40 -0
- package/dist/functions/altool/validateApp.js.map +1 -0
- package/dist/functions/android/buildProject.d.ts +2 -1
- package/dist/functions/android/buildProject.js +32 -6
- package/dist/functions/android/buildProject.js.map +1 -1
- package/dist/functions/android/modifyGradle.js +10 -10
- package/dist/functions/base64/strToBase64.d.ts +2 -0
- package/dist/functions/base64/strToBase64.js +6 -0
- package/dist/functions/base64/strToBase64.js.map +1 -0
- package/dist/functions/color-converter/COLOR_PATTERNS.d.ts +2 -0
- package/dist/functions/color-converter/COLOR_PATTERNS.js +9 -0
- package/dist/functions/color-converter/COLOR_PATTERNS.js.map +1 -0
- package/dist/functions/color-converter/colorPatterns.d.ts +4 -0
- package/dist/functions/color-converter/colorPatterns.js +41 -0
- package/dist/functions/color-converter/colorPatterns.js.map +1 -0
- package/dist/functions/color-converter/convertColor.d.ts +6 -0
- package/dist/functions/color-converter/convertColor.js +12 -0
- package/dist/functions/color-converter/convertColor.js.map +1 -0
- package/dist/functions/color-converter/createColorReference.d.ts +2 -0
- package/dist/functions/color-converter/createColorReference.js +12 -0
- package/dist/functions/color-converter/createColorReference.js.map +1 -0
- package/dist/functions/color-converter/detectColorFormat.d.ts +2 -0
- package/dist/functions/color-converter/detectColorFormat.js +19 -0
- package/dist/functions/color-converter/detectColorFormat.js.map +1 -0
- package/dist/functions/color-converter/extractColors.d.ts +3 -0
- package/dist/functions/color-converter/extractColors.js +16 -0
- package/dist/functions/color-converter/extractColors.js.map +1 -0
- package/dist/functions/color-converter/extractColorsFromLine.d.ts +2 -0
- package/dist/functions/color-converter/extractColorsFromLine.js +18 -0
- package/dist/functions/color-converter/extractColorsFromLine.js.map +1 -0
- package/dist/functions/color-converter/extractColorsGeneric.d.ts +2 -0
- package/dist/functions/color-converter/extractColorsGeneric.js +12 -0
- package/dist/functions/color-converter/extractColorsGeneric.js.map +1 -0
- package/dist/functions/color-converter/extractCssVariableReferences.d.ts +2 -0
- package/dist/functions/color-converter/extractCssVariableReferences.js +15 -0
- package/dist/functions/color-converter/extractCssVariableReferences.js.map +1 -0
- package/dist/functions/color-converter/extractThirdPartyVariableReferences.d.ts +2 -0
- package/dist/functions/color-converter/extractThirdPartyVariableReferences.js +15 -0
- package/dist/functions/color-converter/extractThirdPartyVariableReferences.js.map +1 -0
- package/dist/functions/color-converter/formatColorOutput.d.ts +5 -0
- package/dist/functions/color-converter/formatColorOutput.js +48 -0
- package/dist/functions/color-converter/formatColorOutput.js.map +1 -0
- package/dist/functions/color-converter/getColorPatterns.d.ts +2 -0
- package/dist/functions/color-converter/getColorPatterns.js +11 -0
- package/dist/functions/color-converter/getColorPatterns.js.map +1 -0
- package/dist/functions/color-converter/getNamedColorMap.d.ts +2 -0
- package/dist/functions/color-converter/getNamedColorMap.js +19 -0
- package/dist/functions/color-converter/getNamedColorMap.js.map +1 -0
- package/dist/functions/color-converter/hexToRgb.d.ts +2 -0
- package/dist/functions/color-converter/hexToRgb.js +42 -0
- package/dist/functions/color-converter/hexToRgb.js.map +1 -0
- package/dist/functions/color-converter/hslToRgb.d.ts +2 -0
- package/dist/functions/color-converter/hslToRgb.js +78 -0
- package/dist/functions/color-converter/hslToRgb.js.map +1 -0
- package/dist/functions/color-converter/hslToRgbInternal.d.ts +2 -0
- package/dist/functions/color-converter/hslToRgbInternal.js +24 -0
- package/dist/functions/color-converter/hslToRgbInternal.js.map +1 -0
- package/dist/functions/color-converter/hueToRgb.d.ts +1 -0
- package/dist/functions/color-converter/hueToRgb.js +14 -0
- package/dist/functions/color-converter/hueToRgb.js.map +1 -0
- package/dist/functions/color-converter/isColorValue.d.ts +2 -0
- package/dist/functions/color-converter/isColorValue.js +79 -0
- package/dist/functions/color-converter/isColorValue.js.map +1 -0
- package/dist/functions/color-converter/isValidColorValue.d.ts +1 -0
- package/dist/functions/color-converter/isValidColorValue.js +4 -0
- package/dist/functions/color-converter/isValidColorValue.js.map +1 -0
- package/dist/functions/color-converter/isValidHslColor.d.ts +2 -0
- package/dist/functions/color-converter/isValidHslColor.js +14 -0
- package/dist/functions/color-converter/isValidHslColor.js.map +1 -0
- package/dist/functions/color-converter/isValidRgbColor.d.ts +2 -0
- package/dist/functions/color-converter/isValidRgbColor.js +14 -0
- package/dist/functions/color-converter/isValidRgbColor.js.map +1 -0
- package/dist/functions/color-converter/normalizeColor.d.ts +1 -0
- package/dist/functions/color-converter/normalizeColor.js +49 -0
- package/dist/functions/color-converter/normalizeColor.js.map +1 -0
- package/dist/functions/color-converter/normalizeColorInput.d.ts +6 -0
- package/dist/functions/color-converter/normalizeColorInput.js +94 -0
- package/dist/functions/color-converter/normalizeColorInput.js.map +1 -0
- package/dist/functions/color-converter/parseColorString.d.ts +12 -0
- package/dist/functions/color-converter/parseColorString.js +89 -0
- package/dist/functions/color-converter/parseColorString.js.map +1 -0
- package/dist/functions/color-converter/parseCssVariables.d.ts +2 -0
- package/dist/functions/color-converter/parseCssVariables.js +19 -0
- package/dist/functions/color-converter/parseCssVariables.js.map +1 -0
- package/dist/functions/color-converter/parseHexColor.d.ts +6 -0
- package/dist/functions/color-converter/parseHexColor.js +42 -0
- package/dist/functions/color-converter/parseHexColor.js.map +1 -0
- package/dist/functions/color-converter/rgbToHex.d.ts +2 -0
- package/dist/functions/color-converter/rgbToHex.js +65 -0
- package/dist/functions/color-converter/rgbToHex.js.map +1 -0
- package/dist/functions/color-converter/rgbToHslInternal.d.ts +2 -0
- package/dist/functions/color-converter/rgbToHslInternal.js +31 -0
- package/dist/functions/color-converter/rgbToHslInternal.js.map +1 -0
- package/dist/functions/color-converter/standardizeColor.d.ts +1 -0
- package/dist/functions/color-converter/standardizeColor.js +147 -0
- package/dist/functions/color-converter/standardizeColor.js.map +1 -0
- package/dist/functions/desensitize/desensitizeName.d.ts +1 -0
- package/dist/functions/desensitize/desensitizeName.js +8 -0
- package/dist/functions/desensitize/desensitizeName.js.map +1 -0
- package/dist/functions/desensitize/desensitizePhone.d.ts +1 -0
- package/dist/functions/desensitize/desensitizePhone.js +8 -0
- package/dist/functions/desensitize/desensitizePhone.js.map +1 -0
- package/dist/functions/dom/getViewportSize.d.ts +5 -0
- package/dist/functions/dom/getViewportSize.js +7 -0
- package/dist/functions/dom/getViewportSize.js.map +1 -0
- package/dist/functions/software/buildPathExecutables.d.ts +1 -0
- package/dist/functions/software/buildPathExecutables.js +14 -0
- package/dist/functions/software/buildPathExecutables.js.map +1 -0
- package/dist/functions/software/buildSoftwarePaths.d.ts +2 -0
- package/dist/functions/software/buildSoftwarePaths.js +22 -0
- package/dist/functions/software/buildSoftwarePaths.js.map +1 -0
- package/dist/functions/software/createConfigGenerator.d.ts +8 -0
- package/dist/functions/software/createConfigGenerator.js +13 -0
- package/dist/functions/software/createConfigGenerator.js.map +1 -0
- package/dist/functions/software/detectPlatform.d.ts +2 -0
- package/dist/functions/software/detectPlatform.js +9 -0
- package/dist/functions/software/detectPlatform.js.map +1 -0
- package/dist/functions/software/find.d.ts +2 -0
- package/dist/functions/software/find.js +12 -0
- package/dist/functions/software/find.js.map +1 -0
- package/dist/functions/software/findSoftware.js.map +1 -1
- package/dist/functions/software/findSoftwareWithGenerator.d.ts +3 -0
- package/dist/functions/software/findSoftwareWithGenerator.js +8 -0
- package/dist/functions/software/findSoftwareWithGenerator.js.map +1 -0
- package/dist/functions/software/getConfigGenerator.d.ts +2 -0
- package/dist/functions/software/getConfigGenerator.js +10 -0
- package/dist/functions/software/getConfigGenerator.js.map +1 -0
- package/dist/functions/software/getEnvironmentSoftwarePath.d.ts +1 -0
- package/dist/functions/software/getEnvironmentSoftwarePath.js +8 -0
- package/dist/functions/software/getEnvironmentSoftwarePath.js.map +1 -0
- package/dist/functions/software/getSupportedSoftware.d.ts +1 -0
- package/dist/functions/software/getSupportedSoftware.js +5 -0
- package/dist/functions/software/getSupportedSoftware.js.map +1 -0
- package/dist/functions/software/parseEnvironmentPaths.d.ts +1 -0
- package/dist/functions/software/parseEnvironmentPaths.js +11 -0
- package/dist/functions/software/parseEnvironmentPaths.js.map +1 -0
- package/dist/functions/software/softwareConfigs.d.ts +2 -0
- package/dist/functions/software/softwareConfigs.js +148 -0
- package/dist/functions/software/softwareConfigs.js.map +1 -0
- package/dist/functions/software/softwareNameMap.d.ts +1 -0
- package/dist/functions/software/softwareNameMap.js +9 -0
- package/dist/functions/software/softwareNameMap.js.map +1 -0
- package/dist/functions/software/types.d.ts +11 -0
- package/dist/functions/software/types.js +2 -0
- package/dist/functions/software/types.js.map +1 -0
- package/dist/functions/string/base64.d.ts +2 -0
- package/dist/functions/string/base64.js +6 -0
- package/dist/functions/string/base64.js.map +1 -0
- package/dist/functions/string/camelCase.d.ts +1 -0
- package/dist/functions/string/camelCase.js +8 -0
- package/dist/functions/string/camelCase.js.map +1 -0
- package/dist/functions/string/capitalize.d.ts +1 -0
- package/dist/functions/string/capitalize.js +6 -0
- package/dist/functions/string/capitalize.js.map +1 -0
- package/dist/functions/string/caseConverter.d.ts +19 -0
- package/dist/functions/string/caseConverter.js +94 -0
- package/dist/functions/string/caseConverter.js.map +1 -0
- package/dist/functions/string/desensitize.d.ts +13 -0
- package/dist/functions/string/desensitize.js +107 -0
- package/dist/functions/string/desensitize.js.map +1 -0
- package/dist/functions/string/escape.d.ts +1 -0
- package/dist/functions/string/escape.js +13 -0
- package/dist/functions/string/escape.js.map +1 -0
- package/dist/functions/string/htmlEscape.d.ts +20 -0
- package/dist/functions/string/htmlEscape.js +80 -0
- package/dist/functions/string/htmlEscape.js.map +1 -0
- package/dist/functions/string/kebabCase.d.ts +1 -0
- package/dist/functions/string/kebabCase.js +10 -0
- package/dist/functions/string/kebabCase.js.map +1 -0
- package/dist/functions/string/levenshtein.d.ts +1 -0
- package/dist/functions/string/levenshtein.js +27 -0
- package/dist/functions/string/levenshtein.js.map +1 -0
- package/dist/functions/string/mask.d.ts +1 -0
- package/dist/functions/string/mask.js +40 -0
- package/dist/functions/string/mask.js.map +1 -0
- package/dist/functions/string/normalize.d.ts +8 -0
- package/dist/functions/string/normalize.js +37 -0
- package/dist/functions/string/normalize.js.map +1 -0
- package/dist/functions/string/pad.d.ts +13 -0
- package/dist/functions/string/pad.js +50 -0
- package/dist/functions/string/pad.js.map +1 -0
- package/dist/functions/string/padEnd.d.ts +1 -0
- package/dist/functions/string/padEnd.js +8 -0
- package/dist/functions/string/padEnd.js.map +1 -0
- package/dist/functions/string/padStart.d.ts +1 -0
- package/dist/functions/string/padStart.js +8 -0
- package/dist/functions/string/padStart.js.map +1 -0
- package/dist/functions/string/palindrome.d.ts +3 -0
- package/dist/functions/string/palindrome.js +15 -0
- package/dist/functions/string/palindrome.js.map +1 -0
- package/dist/functions/string/pascalCase.d.ts +1 -0
- package/dist/functions/string/pascalCase.js +8 -0
- package/dist/functions/string/pascalCase.js.map +1 -0
- package/dist/functions/string/similarity.d.ts +1 -0
- package/dist/functions/string/similarity.js +13 -0
- package/dist/functions/string/similarity.js.map +1 -0
- package/dist/functions/string/snakeCase.d.ts +1 -0
- package/dist/functions/string/snakeCase.js +10 -0
- package/dist/functions/string/snakeCase.js.map +1 -0
- package/dist/functions/string/template.d.ts +4 -0
- package/dist/functions/string/template.js +21 -0
- package/dist/functions/string/template.js.map +1 -0
- package/dist/functions/string/unescape.d.ts +1 -0
- package/dist/functions/string/unescape.js +13 -0
- package/dist/functions/string/unescape.js.map +1 -0
- package/dist/functions/string/wordCount.d.ts +5 -0
- package/dist/functions/string/wordCount.js +11 -0
- package/dist/functions/string/wordCount.js.map +1 -0
- package/dist/functions/tencent-cloud/getSecret.d.ts +6 -0
- package/dist/functions/tencent-cloud/getSecret.js +18 -0
- package/dist/functions/tencent-cloud/getSecret.js.map +1 -0
- package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.d.ts +13 -0
- package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.js +175 -0
- package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.js.map +1 -0
- package/dist/functions/uniapp/app-plus/androidProjectStrategy.d.ts +19 -0
- package/dist/functions/uniapp/app-plus/androidProjectStrategy.js +55 -0
- package/dist/functions/uniapp/app-plus/androidProjectStrategy.js.map +1 -0
- package/dist/functions/uniapp/app-plus/buildAndroidApp.d.ts +2 -2
- package/dist/functions/uniapp/app-plus/buildAndroidApp.js +1 -0
- package/dist/functions/uniapp/app-plus/buildAndroidApp.js.map +1 -1
- package/dist/functions/uniapp/app-plus/buildAndroidProject.d.ts +3 -0
- package/dist/functions/uniapp/app-plus/buildAndroidProject.js +60 -0
- package/dist/functions/uniapp/app-plus/buildAndroidProject.js.map +1 -0
- package/dist/functions/uniapp/app-plus/configureAndroidManifest.d.ts +5 -0
- package/dist/functions/uniapp/app-plus/configureAndroidManifest.js +51 -0
- package/dist/functions/uniapp/app-plus/configureAndroidManifest.js.map +1 -0
- package/dist/functions/uniapp/app-plus/configureAndroidProject.d.ts +3 -0
- package/dist/functions/uniapp/app-plus/configureAndroidProject.js +63 -0
- package/dist/functions/uniapp/app-plus/configureAndroidProject.js.map +1 -0
- package/dist/functions/uniapp/app-plus/configureBuildGradle.d.ts +9 -0
- package/dist/functions/uniapp/app-plus/configureBuildGradle.js +57 -0
- package/dist/functions/uniapp/app-plus/configureBuildGradle.js.map +1 -0
- package/dist/functions/uniapp/app-plus/configureDcloudControl.d.ts +5 -0
- package/dist/functions/uniapp/app-plus/configureDcloudControl.js +34 -0
- package/dist/functions/uniapp/app-plus/configureDcloudControl.js.map +1 -0
- package/dist/functions/uniapp/app-plus/configureStrings.d.ts +5 -0
- package/dist/functions/uniapp/app-plus/configureStrings.js +42 -0
- package/dist/functions/uniapp/app-plus/configureStrings.js.map +1 -0
- package/dist/functions/uniapp/app-plus/copyAppResources.d.ts +8 -0
- package/dist/functions/uniapp/app-plus/copyAppResources.js +25 -0
- package/dist/functions/uniapp/app-plus/copyAppResources.js.map +1 -0
- package/dist/functions/uniapp/app-plus/copyDirectory.d.ts +2 -0
- package/dist/functions/uniapp/app-plus/copyDirectory.js +18 -0
- package/dist/functions/uniapp/app-plus/copyDirectory.js.map +1 -0
- package/dist/functions/uniapp/app-plus/generateUniAppResources.d.ts +2 -0
- package/dist/functions/uniapp/app-plus/generateUniAppResources.js +35 -0
- package/dist/functions/uniapp/app-plus/generateUniAppResources.js.map +1 -0
- package/dist/functions/uniapp/app-plus/parseManifest.d.ts +14 -0
- package/dist/functions/uniapp/app-plus/parseManifest.js +44 -0
- package/dist/functions/uniapp/app-plus/parseManifest.js.map +1 -0
- package/dist/functions/uniapp/app-plus/validateOptions.d.ts +3 -0
- package/dist/functions/uniapp/app-plus/validateOptions.js +10 -0
- package/dist/functions/uniapp/app-plus/validateOptions.js.map +1 -0
- package/dist/functions/uniapp/waitForPages.d.ts +3 -0
- package/dist/functions/uniapp/waitForPages.js +20 -0
- package/dist/functions/uniapp/waitForPages.js.map +1 -0
- package/dist/functions/utils/compose.d.ts +1 -0
- package/dist/functions/utils/compose.js +10 -0
- package/dist/functions/utils/compose.js.map +1 -0
- package/dist/functions/utils/cond.d.ts +1 -0
- package/dist/functions/utils/cond.js +15 -0
- package/dist/functions/utils/cond.js.map +1 -0
- package/dist/functions/utils/curry.d.ts +1 -0
- package/dist/functions/utils/curry.js +13 -0
- package/dist/functions/utils/curry.js.map +1 -0
- package/dist/functions/utils/debounce.d.ts +1 -0
- package/dist/functions/utils/debounce.js +13 -0
- package/dist/functions/utils/debounce.js.map +1 -0
- package/dist/functions/utils/evolve.d.ts +3 -0
- package/dist/functions/utils/evolve.js +15 -0
- package/dist/functions/utils/evolve.js.map +1 -0
- package/dist/functions/utils/flow.d.ts +1 -0
- package/dist/functions/utils/flow.js +14 -0
- package/dist/functions/utils/flow.js.map +1 -0
- package/dist/functions/utils/generateExports.js +1 -1
- package/dist/functions/utils/generateExports.js.map +1 -1
- package/dist/functions/utils/isType.d.ts +11 -0
- package/dist/functions/utils/isType.js +30 -0
- package/dist/functions/utils/isType.js.map +1 -0
- package/dist/functions/utils/memoize.d.ts +1 -0
- package/dist/functions/utils/memoize.js +13 -0
- package/dist/functions/utils/memoize.js.map +1 -0
- package/dist/functions/utils/once.d.ts +1 -0
- package/dist/functions/utils/once.js +13 -0
- package/dist/functions/utils/once.js.map +1 -0
- package/dist/functions/utils/partial.d.ts +1 -0
- package/dist/functions/utils/partial.js +13 -0
- package/dist/functions/utils/partial.js.map +1 -0
- package/dist/functions/utils/pipe.d.ts +1 -0
- package/dist/functions/utils/pipe.js +10 -0
- package/dist/functions/utils/pipe.js.map +1 -0
- package/dist/functions/utils/retryWithBackoff.d.ts +9 -0
- package/dist/functions/utils/retryWithBackoff.js +30 -0
- package/dist/functions/utils/retryWithBackoff.js.map +1 -0
- package/dist/functions/utils/tap.d.ts +1 -0
- package/dist/functions/utils/tap.js +14 -0
- package/dist/functions/utils/tap.js.map +1 -0
- package/dist/functions/utils/throttle.d.ts +1 -0
- package/dist/functions/utils/throttle.js +11 -0
- package/dist/functions/utils/throttle.js.map +1 -0
- package/dist/functions/utils/until.d.ts +1 -0
- package/dist/functions/utils/until.js +10 -0
- package/dist/functions/utils/until.js.map +1 -0
- package/dist/functions/utils/validate.d.ts +8 -0
- package/dist/functions/utils/validate.js +45 -0
- package/dist/functions/utils/validate.js.map +1 -0
- package/dist/functions/utils/walk.d.ts +11 -0
- package/dist/functions/utils/walk.js +27 -0
- package/dist/functions/utils/walk.js.map +1 -0
- package/dist/functions/vue/checkVueType.d.ts +8 -0
- package/dist/functions/vue/checkVueType.js +29 -0
- package/dist/functions/vue/checkVueType.js.map +1 -0
- package/dist/functions/vue/deduplicateColors.d.ts +2 -0
- package/dist/functions/vue/deduplicateColors.js +13 -0
- package/dist/functions/vue/deduplicateColors.js.map +1 -0
- package/dist/functions/vue/dynamicMount.d.ts +15 -0
- package/dist/functions/vue/dynamicMount.js +25 -0
- package/dist/functions/vue/dynamicMount.js.map +1 -0
- package/dist/functions/vue/filterSections.js +11 -0
- package/dist/functions/vue/filterSections.js.map +1 -0
- package/dist/functions/vue/isVNode.d.ts +2 -0
- package/dist/functions/vue/isVNode.js +6 -0
- package/dist/functions/vue/isVNode.js.map +1 -0
- package/dist/functions/vue/isVueComponent.d.ts +2 -0
- package/dist/functions/vue/isVueComponent.js +6 -0
- package/dist/functions/vue/isVueComponent.js.map +1 -0
- package/dist/functions/vue/parseVueFile.js +53 -0
- package/dist/functions/vue/parseVueFile.js.map +1 -0
- package/dist/functions/vue/processVueFile.d.ts +3 -0
- package/dist/functions/vue/processVueFile.js +26 -0
- package/dist/functions/vue/processVueFile.js.map +1 -0
- package/dist/functions/vue/saveVueSection.d.ts +2 -0
- package/dist/functions/vue/saveVueSection.js +11 -0
- package/dist/functions/vue/saveVueSection.js.map +1 -0
- package/dist/functions/wechat/miniapp/downloadFile.d.ts +2 -0
- package/dist/functions/wechat/miniapp/downloadFile.js +39 -0
- package/dist/functions/wechat/miniapp/downloadFile.js.map +1 -0
- package/dist/hooks/useAi.d.ts +27 -0
- package/dist/hooks/useAi.js +163 -0
- package/dist/hooks/useAi.js.map +1 -0
- package/dist/hooks/useCache.d.ts +18 -0
- package/dist/hooks/useCache.js +82 -0
- package/dist/hooks/useCache.js.map +1 -0
- package/dist/hooks/useFetch.d.ts +3 -0
- package/dist/hooks/useFetch.js +154 -0
- package/dist/hooks/useFetch.js.map +1 -0
- package/dist/hooks/usePluginSystem.d.ts +11 -0
- package/dist/hooks/usePluginSystem.js +34 -0
- package/dist/hooks/usePluginSystem.js.map +1 -0
- package/dist/hooks/useRequest.d.ts +3 -0
- package/dist/hooks/useRequest.js +139 -0
- package/dist/hooks/useRequest.js.map +1 -0
- package/dist/hooks/useStorageWithIndexedDB.d.ts +2 -1
- package/dist/hooks/useStorageWithIndexedDB.js +1 -1
- package/dist/hooks/useStorageWithIndexedDB.js.map +1 -1
- package/dist/hooks/useWASM.d.ts +4 -0
- package/dist/hooks/useWASM.js +263 -0
- package/dist/hooks/useWASM.js.map +1 -0
- package/dist/hooks/useWorkerFunction.js +27 -27
- package/package.json +1 -1
- package/references/arraybuffer.d.ts +108 -108
- package/references/blob.d.ts +36 -36
- package/references/browser.d.ts +69 -69
- package/references/chrome.extension.d.ts +82 -82
- package/references/console.d.ts +24 -24
- package/references/crypto-js.d.ts +57 -57
- package/references/dom.d.ts +40 -40
- package/references/encoding.d.ts +23 -23
- package/references/fetch.d.ts +123 -123
- package/references/indexeddb.d.ts +48 -48
- package/references/json5.d.ts +21 -21
- package/references/location.d.ts +15 -15
- package/references/node.d.ts +121 -115
- package/references/sharp.d.ts +18 -18
- package/references/storage.d.ts +17 -17
- package/references/timer.d.ts +44 -44
- package/references/uniapp.d.ts +50 -50
- package/references/url.d.ts +55 -55
- package/references/vue.d.ts +85 -85
- package/references/webassembly.d.ts +100 -100
- package/references/wechat.d.ts +48 -48
- package/references/worker.d.ts +152 -152
- package/references/xml.d.ts +87 -88
- package/types/android-build.d.ts +60 -60
- package/types/color.d.ts +72 -72
- package/types/geometry.d.ts +28 -28
- package/types/platform.d.ts +3 -3
- package/types/software.d.ts +14 -14
- package/types/storage.d.ts +50 -50
- package/types/uniapp-android-build.d.ts +48 -48
- package/types/vue.d.ts +29 -29
- package/types/worker.d.ts +177 -177
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UniApp Android 离线打包相关类型定义
|
|
3
|
-
*
|
|
4
|
-
* @description
|
|
5
|
-
* 定义 UniApp Android 离线打包功能使用的接口和类型
|
|
6
|
-
*
|
|
7
|
-
* @since 1.0.0
|
|
8
|
-
* @author Assistant
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import type { ChildProcess, FileSystem, Path, Process } from '../references/node.d'
|
|
12
|
-
import type { XMLParser, XMLSerializer, XMLParserConstructor, XMLSerializerConstructor } from '../references/xml.d'
|
|
13
|
-
import type { JSON5Parser } from '../references/json5.d'
|
|
14
|
-
import type { AndroidBuildOptions, AndroidBuildResult } from './android-build.d'
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* UniApp Android 构建选项
|
|
18
|
-
*/
|
|
19
|
-
export interface UniAppAndroidBuildOptions extends AndroidBuildOptions {
|
|
20
|
-
/** UniApp 工程路径 */
|
|
21
|
-
uniappProjectPath: string
|
|
22
|
-
/** Android 应用包名 */
|
|
23
|
-
applicationId?: string
|
|
24
|
-
/** UniApp 应用密钥 */
|
|
25
|
-
appkey?: string
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* UniApp Android 构建结果
|
|
30
|
-
*/
|
|
31
|
-
export interface UniAppAndroidBuildResult extends AndroidBuildResult {
|
|
32
|
-
// 可以添加 UniApp 特有的结果属性
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* 系统依赖接口
|
|
37
|
-
* 用于依赖注入,确保函数的环境无关性
|
|
38
|
-
*/
|
|
39
|
-
export interface
|
|
40
|
-
childProcess: ChildProcess
|
|
41
|
-
fs: FileSystem
|
|
42
|
-
path: Path
|
|
43
|
-
process: Process
|
|
44
|
-
setTimeout: (callback: () => void, delay: number) => any
|
|
45
|
-
require: (id: string) => any
|
|
46
|
-
json5: JSON5Parser
|
|
47
|
-
xmlParser: XMLParserConstructor
|
|
48
|
-
xmlSerializer: XMLSerializerConstructor
|
|
1
|
+
/**
|
|
2
|
+
* UniApp Android 离线打包相关类型定义
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* 定义 UniApp Android 离线打包功能使用的接口和类型
|
|
6
|
+
*
|
|
7
|
+
* @since 1.0.0
|
|
8
|
+
* @author Assistant
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type { ChildProcess, FileSystem, Path, Process } from '../references/node.d'
|
|
12
|
+
import type { XMLParser, XMLSerializer, XMLParserConstructor, XMLSerializerConstructor } from '../references/xml.d'
|
|
13
|
+
import type { JSON5Parser } from '../references/json5.d'
|
|
14
|
+
import type { AndroidBuildOptions, AndroidBuildResult } from './android-build.d'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* UniApp Android 构建选项
|
|
18
|
+
*/
|
|
19
|
+
export interface UniAppAndroidBuildOptions extends AndroidBuildOptions {
|
|
20
|
+
/** UniApp 工程路径 */
|
|
21
|
+
uniappProjectPath: string
|
|
22
|
+
/** Android 应用包名 */
|
|
23
|
+
applicationId?: string
|
|
24
|
+
/** UniApp 应用密钥 */
|
|
25
|
+
appkey?: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* UniApp Android 构建结果
|
|
30
|
+
*/
|
|
31
|
+
export interface UniAppAndroidBuildResult extends AndroidBuildResult {
|
|
32
|
+
// 可以添加 UniApp 特有的结果属性
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* UniApp 系统依赖接口
|
|
37
|
+
* 用于依赖注入,确保函数的环境无关性
|
|
38
|
+
*/
|
|
39
|
+
export interface UniAppSystemDependencies {
|
|
40
|
+
childProcess: ChildProcess
|
|
41
|
+
fs: FileSystem
|
|
42
|
+
path: Path
|
|
43
|
+
process: Process
|
|
44
|
+
setTimeout: (callback: () => void, delay: number) => any
|
|
45
|
+
require: (id: string) => any
|
|
46
|
+
json5: JSON5Parser
|
|
47
|
+
xmlParser: XMLParserConstructor
|
|
48
|
+
xmlSerializer: XMLSerializerConstructor
|
|
49
49
|
}
|
package/types/vue.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import type { ColorReference, ColorExtractionOptions } from './color.d'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Vue文件section类型
|
|
5
|
-
*/
|
|
6
|
-
export type VueSectionType = 'template' | 'script' | 'style'
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Vue文件section信息
|
|
10
|
-
*/
|
|
11
|
-
export interface VueSection {
|
|
12
|
-
/** section类型 */
|
|
13
|
-
type: VueSectionType
|
|
14
|
-
/** section内容 */
|
|
15
|
-
content: string
|
|
16
|
-
/** 起始行号 */
|
|
17
|
-
startLine: number
|
|
18
|
-
/** 结束行号 */
|
|
19
|
-
endLine: number
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Vue文件处理选项
|
|
24
|
-
*/
|
|
25
|
-
export interface VueProcessingOptions extends ColorExtractionOptions {
|
|
26
|
-
/** 是否只处理特定的section类型 */
|
|
27
|
-
includeSections?: VueSectionType[]
|
|
28
|
-
/** 是否排除特定的section类型 */
|
|
29
|
-
excludeSections?: VueSectionType[]
|
|
1
|
+
import type { ColorReference, ColorExtractionOptions } from './color.d'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Vue文件section类型
|
|
5
|
+
*/
|
|
6
|
+
export type VueSectionType = 'template' | 'script' | 'style'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Vue文件section信息
|
|
10
|
+
*/
|
|
11
|
+
export interface VueSection {
|
|
12
|
+
/** section类型 */
|
|
13
|
+
type: VueSectionType
|
|
14
|
+
/** section内容 */
|
|
15
|
+
content: string
|
|
16
|
+
/** 起始行号 */
|
|
17
|
+
startLine: number
|
|
18
|
+
/** 结束行号 */
|
|
19
|
+
endLine: number
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Vue文件处理选项
|
|
24
|
+
*/
|
|
25
|
+
export interface VueProcessingOptions extends ColorExtractionOptions {
|
|
26
|
+
/** 是否只处理特定的section类型 */
|
|
27
|
+
includeSections?: VueSectionType[]
|
|
28
|
+
/** 是否排除特定的section类型 */
|
|
29
|
+
excludeSections?: VueSectionType[]
|
|
30
30
|
}
|
package/types/worker.d.ts
CHANGED
|
@@ -1,178 +1,178 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Worker 相关的应用层类型定义
|
|
3
|
-
*
|
|
4
|
-
* @description
|
|
5
|
-
* 定义 Worker hooks 使用的接口和类型,不包含环境相关的类型
|
|
6
|
-
* 环境相关的类型请从 references/worker.d 导入
|
|
7
|
-
*
|
|
8
|
-
* @since 1.0.0
|
|
9
|
-
* @author Assistant
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import type { Timeout } from '../../references/node.d'
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* 响应式值接口
|
|
16
|
-
*/
|
|
17
|
-
export interface ReactiveValue<T> {
|
|
18
|
-
value: T
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Worker消息接口
|
|
23
|
-
*/
|
|
24
|
-
export interface WorkerMessage {
|
|
25
|
-
/** 消息ID */
|
|
26
|
-
id?: number
|
|
27
|
-
/** 消息数据 */
|
|
28
|
-
data: any
|
|
29
|
-
/** 错误信息 */
|
|
30
|
-
error?: string
|
|
31
|
-
/** 消息类型 */
|
|
32
|
-
type?: string
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Web Worker配置选项
|
|
37
|
-
*/
|
|
38
|
-
export interface WebWorkerOptions {
|
|
39
|
-
/** Worker脚本URL */
|
|
40
|
-
scriptURL: string
|
|
41
|
-
/** 最大重试次数 */
|
|
42
|
-
maxRetries?: number
|
|
43
|
-
/** 消息超时时间(毫秒) */
|
|
44
|
-
timeout?: number
|
|
45
|
-
/** 是否自动重启 */
|
|
46
|
-
autoRestart?: boolean
|
|
47
|
-
/** 是否支持Transferable对象 */
|
|
48
|
-
transferable?: boolean
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Web Worker结果接口
|
|
53
|
-
*/
|
|
54
|
-
export interface WebWorkerResult<T> {
|
|
55
|
-
/** 操作是否成功 */
|
|
56
|
-
success: boolean
|
|
57
|
-
/** 返回数据 */
|
|
58
|
-
data: T | null
|
|
59
|
-
/** 错误信息 */
|
|
60
|
-
error: Error | null
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Worker任务接口
|
|
65
|
-
*/
|
|
66
|
-
export interface WorkerTask {
|
|
67
|
-
/** 任务数据 */
|
|
68
|
-
data: any
|
|
69
|
-
/** 任务优先级 */
|
|
70
|
-
priority?: 'low' | 'normal' | 'high'
|
|
71
|
-
/** Transferable对象 */
|
|
72
|
-
transfer?: Transferable[]
|
|
73
|
-
/** 任务类型 */
|
|
74
|
-
type?: string
|
|
75
|
-
/** 任务ID */
|
|
76
|
-
id?: string
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Worker池配置选项
|
|
81
|
-
*/
|
|
82
|
-
export interface WorkerPoolOptions {
|
|
83
|
-
/** Worker脚本URL */
|
|
84
|
-
scriptURL: string
|
|
85
|
-
/** 池大小 */
|
|
86
|
-
poolSize?: number
|
|
87
|
-
/** 最大队列大小 */
|
|
88
|
-
maxQueueSize?: number
|
|
89
|
-
/** 任务超时时间(毫秒) */
|
|
90
|
-
taskTimeout?: number
|
|
91
|
-
/** 是否自动扩展 */
|
|
92
|
-
autoScale?: boolean
|
|
93
|
-
/** 最小池大小 */
|
|
94
|
-
minPoolSize?: number
|
|
95
|
-
/** 最大池大小 */
|
|
96
|
-
maxPoolSize?: number
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Worker池结果接口
|
|
101
|
-
*/
|
|
102
|
-
export interface WorkerPoolResult<T> {
|
|
103
|
-
/** 操作是否成功 */
|
|
104
|
-
success: boolean
|
|
105
|
-
/** 返回数据 */
|
|
106
|
-
data: T | null
|
|
107
|
-
/** 错误信息 */
|
|
108
|
-
error: Error | null
|
|
109
|
-
/** 执行的Worker ID */
|
|
110
|
-
workerId: number
|
|
111
|
-
/** 执行时间(毫秒) */
|
|
112
|
-
executionTime: number
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Worker池统计信息
|
|
117
|
-
*/
|
|
118
|
-
export interface WorkerPoolStats {
|
|
119
|
-
/** 池大小 */
|
|
120
|
-
poolSize: number
|
|
121
|
-
/** 忙碌的Worker数量 */
|
|
122
|
-
busyWorkers: number
|
|
123
|
-
/** 空闲的Worker数量 */
|
|
124
|
-
idleWorkers: number
|
|
125
|
-
/** 队列大小 */
|
|
126
|
-
queueSize: number
|
|
127
|
-
/** 活动任务数量 */
|
|
128
|
-
activeTasks: number
|
|
129
|
-
/** 已处理的总任务数 */
|
|
130
|
-
totalTasksProcessed: number
|
|
131
|
-
/** 是否准备就绪 */
|
|
132
|
-
isReady: boolean
|
|
133
|
-
/** 是否正在加载 */
|
|
134
|
-
isLoading: boolean
|
|
135
|
-
/** 错误状态 */
|
|
136
|
-
error: Error | null
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Worker函数类型
|
|
141
|
-
*/
|
|
142
|
-
export type WorkerFunction<T extends any[], R> = (...args: T) => R | Promise<R>
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Worker函数配置选项
|
|
146
|
-
*/
|
|
147
|
-
export interface WorkerFunctionOptions {
|
|
148
|
-
/** 执行超时时间(毫秒) */
|
|
149
|
-
timeout?: number
|
|
150
|
-
/** 最大重试次数 */
|
|
151
|
-
maxRetries?: number
|
|
152
|
-
/** 是否自动重启Worker */
|
|
153
|
-
autoRestart?: boolean
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Worker函数执行结果
|
|
158
|
-
*/
|
|
159
|
-
export interface WorkerFunctionResult<R> {
|
|
160
|
-
/** 是否执行成功 */
|
|
161
|
-
success: boolean
|
|
162
|
-
/** 执行结果数据 */
|
|
163
|
-
data?: R
|
|
164
|
-
/** 错误信息 */
|
|
165
|
-
error?: Error
|
|
166
|
-
/** 执行时间(毫秒) */
|
|
167
|
-
executionTime: number
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Worker状态类型
|
|
172
|
-
*/
|
|
173
|
-
export type WorkerStatus = 'idle' | 'loading' | 'ready' | 'busy' | 'error' | 'terminated'
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* 任务优先级类型
|
|
177
|
-
*/
|
|
1
|
+
/**
|
|
2
|
+
* Worker 相关的应用层类型定义
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* 定义 Worker hooks 使用的接口和类型,不包含环境相关的类型
|
|
6
|
+
* 环境相关的类型请从 references/worker.d 导入
|
|
7
|
+
*
|
|
8
|
+
* @since 1.0.0
|
|
9
|
+
* @author Assistant
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type { Timeout } from '../../references/node.d'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 响应式值接口
|
|
16
|
+
*/
|
|
17
|
+
export interface ReactiveValue<T> {
|
|
18
|
+
value: T
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Worker消息接口
|
|
23
|
+
*/
|
|
24
|
+
export interface WorkerMessage {
|
|
25
|
+
/** 消息ID */
|
|
26
|
+
id?: number
|
|
27
|
+
/** 消息数据 */
|
|
28
|
+
data: any
|
|
29
|
+
/** 错误信息 */
|
|
30
|
+
error?: string
|
|
31
|
+
/** 消息类型 */
|
|
32
|
+
type?: string
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Web Worker配置选项
|
|
37
|
+
*/
|
|
38
|
+
export interface WebWorkerOptions {
|
|
39
|
+
/** Worker脚本URL */
|
|
40
|
+
scriptURL: string
|
|
41
|
+
/** 最大重试次数 */
|
|
42
|
+
maxRetries?: number
|
|
43
|
+
/** 消息超时时间(毫秒) */
|
|
44
|
+
timeout?: number
|
|
45
|
+
/** 是否自动重启 */
|
|
46
|
+
autoRestart?: boolean
|
|
47
|
+
/** 是否支持Transferable对象 */
|
|
48
|
+
transferable?: boolean
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Web Worker结果接口
|
|
53
|
+
*/
|
|
54
|
+
export interface WebWorkerResult<T> {
|
|
55
|
+
/** 操作是否成功 */
|
|
56
|
+
success: boolean
|
|
57
|
+
/** 返回数据 */
|
|
58
|
+
data: T | null
|
|
59
|
+
/** 错误信息 */
|
|
60
|
+
error: Error | null
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Worker任务接口
|
|
65
|
+
*/
|
|
66
|
+
export interface WorkerTask {
|
|
67
|
+
/** 任务数据 */
|
|
68
|
+
data: any
|
|
69
|
+
/** 任务优先级 */
|
|
70
|
+
priority?: 'low' | 'normal' | 'high'
|
|
71
|
+
/** Transferable对象 */
|
|
72
|
+
transfer?: Transferable[]
|
|
73
|
+
/** 任务类型 */
|
|
74
|
+
type?: string
|
|
75
|
+
/** 任务ID */
|
|
76
|
+
id?: string
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Worker池配置选项
|
|
81
|
+
*/
|
|
82
|
+
export interface WorkerPoolOptions {
|
|
83
|
+
/** Worker脚本URL */
|
|
84
|
+
scriptURL: string
|
|
85
|
+
/** 池大小 */
|
|
86
|
+
poolSize?: number
|
|
87
|
+
/** 最大队列大小 */
|
|
88
|
+
maxQueueSize?: number
|
|
89
|
+
/** 任务超时时间(毫秒) */
|
|
90
|
+
taskTimeout?: number
|
|
91
|
+
/** 是否自动扩展 */
|
|
92
|
+
autoScale?: boolean
|
|
93
|
+
/** 最小池大小 */
|
|
94
|
+
minPoolSize?: number
|
|
95
|
+
/** 最大池大小 */
|
|
96
|
+
maxPoolSize?: number
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Worker池结果接口
|
|
101
|
+
*/
|
|
102
|
+
export interface WorkerPoolResult<T> {
|
|
103
|
+
/** 操作是否成功 */
|
|
104
|
+
success: boolean
|
|
105
|
+
/** 返回数据 */
|
|
106
|
+
data: T | null
|
|
107
|
+
/** 错误信息 */
|
|
108
|
+
error: Error | null
|
|
109
|
+
/** 执行的Worker ID */
|
|
110
|
+
workerId: number
|
|
111
|
+
/** 执行时间(毫秒) */
|
|
112
|
+
executionTime: number
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Worker池统计信息
|
|
117
|
+
*/
|
|
118
|
+
export interface WorkerPoolStats {
|
|
119
|
+
/** 池大小 */
|
|
120
|
+
poolSize: number
|
|
121
|
+
/** 忙碌的Worker数量 */
|
|
122
|
+
busyWorkers: number
|
|
123
|
+
/** 空闲的Worker数量 */
|
|
124
|
+
idleWorkers: number
|
|
125
|
+
/** 队列大小 */
|
|
126
|
+
queueSize: number
|
|
127
|
+
/** 活动任务数量 */
|
|
128
|
+
activeTasks: number
|
|
129
|
+
/** 已处理的总任务数 */
|
|
130
|
+
totalTasksProcessed: number
|
|
131
|
+
/** 是否准备就绪 */
|
|
132
|
+
isReady: boolean
|
|
133
|
+
/** 是否正在加载 */
|
|
134
|
+
isLoading: boolean
|
|
135
|
+
/** 错误状态 */
|
|
136
|
+
error: Error | null
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Worker函数类型
|
|
141
|
+
*/
|
|
142
|
+
export type WorkerFunction<T extends any[], R> = (...args: T) => R | Promise<R>
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Worker函数配置选项
|
|
146
|
+
*/
|
|
147
|
+
export interface WorkerFunctionOptions {
|
|
148
|
+
/** 执行超时时间(毫秒) */
|
|
149
|
+
timeout?: number
|
|
150
|
+
/** 最大重试次数 */
|
|
151
|
+
maxRetries?: number
|
|
152
|
+
/** 是否自动重启Worker */
|
|
153
|
+
autoRestart?: boolean
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Worker函数执行结果
|
|
158
|
+
*/
|
|
159
|
+
export interface WorkerFunctionResult<R> {
|
|
160
|
+
/** 是否执行成功 */
|
|
161
|
+
success: boolean
|
|
162
|
+
/** 执行结果数据 */
|
|
163
|
+
data?: R
|
|
164
|
+
/** 错误信息 */
|
|
165
|
+
error?: Error
|
|
166
|
+
/** 执行时间(毫秒) */
|
|
167
|
+
executionTime: number
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Worker状态类型
|
|
172
|
+
*/
|
|
173
|
+
export type WorkerStatus = 'idle' | 'loading' | 'ready' | 'busy' | 'error' | 'terminated'
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* 任务优先级类型
|
|
177
|
+
*/
|
|
178
178
|
export type TaskPriority = 'low' | 'normal' | 'high'
|