zcw-shared 1.9.0 → 1.10.1
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/dist/constants/colorPatterns.d.ts +8 -0
- package/dist/constants/colorPatterns.js +9 -1
- package/dist/constants/colorPatterns.js.map +1 -1
- package/dist/functions/color/detectColorFormat.js +11 -11
- package/dist/functions/color/detectColorFormat.js.map +1 -1
- package/dist/functions/color/extractColors.d.ts +1 -0
- package/dist/functions/color/extractColors.js +13 -79
- package/dist/functions/color/extractColors.js.map +1 -1
- package/package.json +2 -1
- package/references/xpath.d.ts +60 -0
- package/types/android-build.d.ts +2 -0
- package/types/uniapp-android-build.d.ts +2 -0
- package/dist/constants/namedColors.d.ts +0 -16
- package/dist/constants/namedColors.js +0 -17
- package/dist/constants/namedColors.js.map +0 -1
- package/dist/constants/softwareConfigs.d.ts +0 -14
- package/dist/constants/softwareConfigs.js +0 -156
- package/dist/constants/softwareConfigs.js.map +0 -1
- package/dist/functions/ag-grid/generateLicense.d.ts +0 -3
- package/dist/functions/ag-grid/generateLicense.js +0 -12
- package/dist/functions/ag-grid/generateLicense.js.map +0 -1
- package/dist/functions/altool/createAltoolClient.d.ts +0 -21
- package/dist/functions/altool/createAltoolClient.js +0 -53
- package/dist/functions/altool/createAltoolClient.js.map +0 -1
- package/dist/functions/altool/getAltoolAuth.d.ts +0 -2
- package/dist/functions/altool/getAltoolAuth.js +0 -8
- package/dist/functions/altool/getAltoolAuth.js.map +0 -1
- package/dist/functions/altool/getAppInfo.d.ts +0 -13
- package/dist/functions/altool/getAppInfo.js +0 -39
- package/dist/functions/altool/getAppInfo.js.map +0 -1
- package/dist/functions/altool/index.d.ts +0 -10
- package/dist/functions/altool/index.js +0 -6
- package/dist/functions/altool/index.js.map +0 -1
- package/dist/functions/altool/isApiKeyAuth.d.ts +0 -2
- package/dist/functions/altool/isApiKeyAuth.js +0 -4
- package/dist/functions/altool/isApiKeyAuth.js.map +0 -1
- package/dist/functions/altool/isCredentialsAuth.d.ts +0 -2
- package/dist/functions/altool/isCredentialsAuth.js +0 -4
- package/dist/functions/altool/isCredentialsAuth.js.map +0 -1
- package/dist/functions/altool/parseAppInfoOutput.d.ts +0 -2
- package/dist/functions/altool/parseAppInfoOutput.js +0 -55
- package/dist/functions/altool/parseAppInfoOutput.js.map +0 -1
- package/dist/functions/altool/parseValidationOutput.d.ts +0 -6
- package/dist/functions/altool/parseValidationOutput.js +0 -21
- package/dist/functions/altool/parseValidationOutput.js.map +0 -1
- package/dist/functions/altool/types.d.ts +0 -26
- package/dist/functions/altool/types.js +0 -7
- package/dist/functions/altool/types.js.map +0 -1
- package/dist/functions/altool/uploadApp.d.ts +0 -6
- package/dist/functions/altool/uploadApp.js +0 -36
- package/dist/functions/altool/uploadApp.js.map +0 -1
- package/dist/functions/altool/validateApp.d.ts +0 -17
- package/dist/functions/altool/validateApp.js +0 -40
- package/dist/functions/altool/validateApp.js.map +0 -1
- package/dist/functions/android/buildProject.d.ts +0 -12
- package/dist/functions/android/buildProject.js +0 -123
- package/dist/functions/android/buildProject.js.map +0 -1
- package/dist/functions/android/modifyGradle.d.ts +0 -17
- package/dist/functions/android/modifyGradle.js +0 -69
- package/dist/functions/android/modifyGradle.js.map +0 -1
- package/dist/functions/android/modifyManifest.d.ts +0 -23
- package/dist/functions/android/modifyManifest.js +0 -198
- package/dist/functions/android/modifyManifest.js.map +0 -1
- package/dist/functions/android/permission.d.ts +0 -30
- package/dist/functions/android/permission.js +0 -65
- package/dist/functions/android/permission.js.map +0 -1
- package/dist/functions/base64/strToBase64.d.ts +0 -2
- package/dist/functions/base64/strToBase64.js +0 -6
- package/dist/functions/base64/strToBase64.js.map +0 -1
- package/dist/functions/color/colorValidation.d.ts +0 -11
- package/dist/functions/color/colorValidation.js +0 -35
- package/dist/functions/color/colorValidation.js.map +0 -1
- package/dist/functions/color/deduplicateColors.d.ts +0 -4
- package/dist/functions/color/deduplicateColors.js +0 -40
- package/dist/functions/color/deduplicateColors.js.map +0 -1
- package/dist/functions/color-converter/COLOR_PATTERNS.d.ts +0 -2
- package/dist/functions/color-converter/COLOR_PATTERNS.js +0 -9
- package/dist/functions/color-converter/COLOR_PATTERNS.js.map +0 -1
- package/dist/functions/color-converter/colorPatterns.d.ts +0 -4
- package/dist/functions/color-converter/colorPatterns.js +0 -41
- package/dist/functions/color-converter/colorPatterns.js.map +0 -1
- package/dist/functions/color-converter/convertColor.d.ts +0 -6
- package/dist/functions/color-converter/convertColor.js +0 -12
- package/dist/functions/color-converter/convertColor.js.map +0 -1
- package/dist/functions/color-converter/createColorReference.d.ts +0 -2
- package/dist/functions/color-converter/createColorReference.js +0 -12
- package/dist/functions/color-converter/createColorReference.js.map +0 -1
- package/dist/functions/color-converter/detectColorFormat.d.ts +0 -2
- package/dist/functions/color-converter/detectColorFormat.js +0 -19
- package/dist/functions/color-converter/detectColorFormat.js.map +0 -1
- package/dist/functions/color-converter/extractColors.d.ts +0 -3
- package/dist/functions/color-converter/extractColors.js +0 -16
- package/dist/functions/color-converter/extractColors.js.map +0 -1
- package/dist/functions/color-converter/extractColorsFromLine.d.ts +0 -2
- package/dist/functions/color-converter/extractColorsFromLine.js +0 -18
- package/dist/functions/color-converter/extractColorsFromLine.js.map +0 -1
- package/dist/functions/color-converter/extractColorsGeneric.d.ts +0 -2
- package/dist/functions/color-converter/extractColorsGeneric.js +0 -12
- package/dist/functions/color-converter/extractColorsGeneric.js.map +0 -1
- package/dist/functions/color-converter/extractCssVariableReferences.d.ts +0 -2
- package/dist/functions/color-converter/extractCssVariableReferences.js +0 -15
- package/dist/functions/color-converter/extractCssVariableReferences.js.map +0 -1
- package/dist/functions/color-converter/extractThirdPartyVariableReferences.d.ts +0 -2
- package/dist/functions/color-converter/extractThirdPartyVariableReferences.js +0 -15
- package/dist/functions/color-converter/extractThirdPartyVariableReferences.js.map +0 -1
- package/dist/functions/color-converter/formatColorOutput.d.ts +0 -5
- package/dist/functions/color-converter/formatColorOutput.js +0 -48
- package/dist/functions/color-converter/formatColorOutput.js.map +0 -1
- package/dist/functions/color-converter/getColorPatterns.d.ts +0 -2
- package/dist/functions/color-converter/getColorPatterns.js +0 -11
- package/dist/functions/color-converter/getColorPatterns.js.map +0 -1
- package/dist/functions/color-converter/getNamedColorMap.d.ts +0 -2
- package/dist/functions/color-converter/getNamedColorMap.js +0 -19
- package/dist/functions/color-converter/getNamedColorMap.js.map +0 -1
- package/dist/functions/color-converter/hexToRgb.d.ts +0 -2
- package/dist/functions/color-converter/hexToRgb.js +0 -42
- package/dist/functions/color-converter/hexToRgb.js.map +0 -1
- package/dist/functions/color-converter/hslToRgb.d.ts +0 -2
- package/dist/functions/color-converter/hslToRgb.js +0 -78
- package/dist/functions/color-converter/hslToRgb.js.map +0 -1
- package/dist/functions/color-converter/hslToRgbInternal.d.ts +0 -2
- package/dist/functions/color-converter/hslToRgbInternal.js +0 -24
- package/dist/functions/color-converter/hslToRgbInternal.js.map +0 -1
- package/dist/functions/color-converter/hueToRgb.d.ts +0 -1
- package/dist/functions/color-converter/hueToRgb.js +0 -14
- package/dist/functions/color-converter/hueToRgb.js.map +0 -1
- package/dist/functions/color-converter/isColorValue.d.ts +0 -2
- package/dist/functions/color-converter/isColorValue.js +0 -79
- package/dist/functions/color-converter/isColorValue.js.map +0 -1
- package/dist/functions/color-converter/isValidColorValue.d.ts +0 -1
- package/dist/functions/color-converter/isValidColorValue.js +0 -4
- package/dist/functions/color-converter/isValidColorValue.js.map +0 -1
- package/dist/functions/color-converter/isValidHslColor.d.ts +0 -2
- package/dist/functions/color-converter/isValidHslColor.js +0 -14
- package/dist/functions/color-converter/isValidHslColor.js.map +0 -1
- package/dist/functions/color-converter/isValidRgbColor.d.ts +0 -2
- package/dist/functions/color-converter/isValidRgbColor.js +0 -14
- package/dist/functions/color-converter/isValidRgbColor.js.map +0 -1
- package/dist/functions/color-converter/normalizeColor.d.ts +0 -1
- package/dist/functions/color-converter/normalizeColor.js +0 -49
- package/dist/functions/color-converter/normalizeColor.js.map +0 -1
- package/dist/functions/color-converter/normalizeColorInput.d.ts +0 -6
- package/dist/functions/color-converter/normalizeColorInput.js +0 -94
- package/dist/functions/color-converter/normalizeColorInput.js.map +0 -1
- package/dist/functions/color-converter/parseColorString.d.ts +0 -12
- package/dist/functions/color-converter/parseColorString.js +0 -89
- package/dist/functions/color-converter/parseColorString.js.map +0 -1
- package/dist/functions/color-converter/parseCssVariables.d.ts +0 -2
- package/dist/functions/color-converter/parseCssVariables.js +0 -19
- package/dist/functions/color-converter/parseCssVariables.js.map +0 -1
- package/dist/functions/color-converter/parseHexColor.d.ts +0 -6
- package/dist/functions/color-converter/parseHexColor.js +0 -42
- package/dist/functions/color-converter/parseHexColor.js.map +0 -1
- package/dist/functions/color-converter/rgbToHex.d.ts +0 -2
- package/dist/functions/color-converter/rgbToHex.js +0 -65
- package/dist/functions/color-converter/rgbToHex.js.map +0 -1
- package/dist/functions/color-converter/rgbToHslInternal.d.ts +0 -2
- package/dist/functions/color-converter/rgbToHslInternal.js +0 -31
- package/dist/functions/color-converter/rgbToHslInternal.js.map +0 -1
- package/dist/functions/color-converter/standardizeColor.d.ts +0 -1
- package/dist/functions/color-converter/standardizeColor.js +0 -147
- package/dist/functions/color-converter/standardizeColor.js.map +0 -1
- package/dist/functions/css/extractCssVariables.d.ts +0 -12
- package/dist/functions/css/extractCssVariables.js +0 -53
- package/dist/functions/css/extractCssVariables.js.map +0 -1
- package/dist/functions/debug/createDebugger.d.ts +0 -21
- package/dist/functions/debug/createDebugger.js +0 -89
- package/dist/functions/debug/createDebugger.js.map +0 -1
- package/dist/functions/desensitize/desensitizeName.d.ts +0 -1
- package/dist/functions/desensitize/desensitizeName.js +0 -8
- package/dist/functions/desensitize/desensitizeName.js.map +0 -1
- package/dist/functions/desensitize/desensitizePhone.d.ts +0 -1
- package/dist/functions/desensitize/desensitizePhone.js +0 -8
- package/dist/functions/desensitize/desensitizePhone.js.map +0 -1
- package/dist/functions/dom/detectOverflow.d.ts +0 -8
- package/dist/functions/dom/detectOverflow.js +0 -17
- package/dist/functions/dom/detectOverflow.js.map +0 -1
- package/dist/functions/dom/getElementRect.d.ts +0 -3
- package/dist/functions/dom/getElementRect.js +0 -14
- package/dist/functions/dom/getElementRect.js.map +0 -1
- package/dist/functions/dom/getRelativePosition.d.ts +0 -3
- package/dist/functions/dom/getRelativePosition.js +0 -14
- package/dist/functions/dom/getRelativePosition.js.map +0 -1
- package/dist/functions/dom/getViewportRect.d.ts +0 -3
- package/dist/functions/dom/getViewportRect.js +0 -15
- package/dist/functions/dom/getViewportRect.js.map +0 -1
- package/dist/functions/dom/getViewportSize.d.ts +0 -5
- package/dist/functions/dom/getViewportSize.js +0 -7
- package/dist/functions/dom/getViewportSize.js.map +0 -1
- package/dist/functions/image/generateMacIcons.d.ts +0 -6
- package/dist/functions/image/generateMacIcons.js +0 -15
- package/dist/functions/image/generateMacIcons.js.map +0 -1
- package/dist/functions/image/generateMacTrayIcon.d.ts +0 -7
- package/dist/functions/image/generateMacTrayIcon.js +0 -15
- package/dist/functions/image/generateMacTrayIcon.js.map +0 -1
- package/dist/functions/image/generatePaddedImage.d.ts +0 -3
- package/dist/functions/image/generatePaddedImage.js +0 -14
- package/dist/functions/image/generatePaddedImage.js.map +0 -1
- package/dist/functions/image/generatePwaIcons.d.ts +0 -6
- package/dist/functions/image/generatePwaIcons.js +0 -15
- package/dist/functions/image/generatePwaIcons.js.map +0 -1
- package/dist/functions/image/generateRoundedImage.d.ts +0 -3
- package/dist/functions/image/generateRoundedImage.js +0 -17
- package/dist/functions/image/generateRoundedImage.js.map +0 -1
- package/dist/functions/ipc/dispatchIpcRequest.d.ts +0 -6
- package/dist/functions/ipc/dispatchIpcRequest.js +0 -10
- package/dist/functions/ipc/dispatchIpcRequest.js.map +0 -1
- package/dist/functions/software/buildPathExecutables.d.ts +0 -1
- package/dist/functions/software/buildPathExecutables.js +0 -14
- package/dist/functions/software/buildPathExecutables.js.map +0 -1
- package/dist/functions/software/buildSoftwarePaths.d.ts +0 -2
- package/dist/functions/software/buildSoftwarePaths.js +0 -22
- package/dist/functions/software/buildSoftwarePaths.js.map +0 -1
- package/dist/functions/software/createConfigGenerator.d.ts +0 -8
- package/dist/functions/software/createConfigGenerator.js +0 -13
- package/dist/functions/software/createConfigGenerator.js.map +0 -1
- package/dist/functions/software/detectPlatform.d.ts +0 -2
- package/dist/functions/software/detectPlatform.js +0 -9
- package/dist/functions/software/detectPlatform.js.map +0 -1
- package/dist/functions/software/find.d.ts +0 -2
- package/dist/functions/software/find.js +0 -12
- package/dist/functions/software/find.js.map +0 -1
- package/dist/functions/software/findSoftware.d.ts +0 -13
- package/dist/functions/software/findSoftware.js +0 -41
- package/dist/functions/software/findSoftware.js.map +0 -1
- package/dist/functions/software/findSoftwareWithGenerator.d.ts +0 -3
- package/dist/functions/software/findSoftwareWithGenerator.js +0 -8
- package/dist/functions/software/findSoftwareWithGenerator.js.map +0 -1
- package/dist/functions/software/getConfigGenerator.d.ts +0 -2
- package/dist/functions/software/getConfigGenerator.js +0 -10
- package/dist/functions/software/getConfigGenerator.js.map +0 -1
- package/dist/functions/software/getEnvironmentSoftwarePath.d.ts +0 -1
- package/dist/functions/software/getEnvironmentSoftwarePath.js +0 -8
- package/dist/functions/software/getEnvironmentSoftwarePath.js.map +0 -1
- package/dist/functions/software/getSupportedSoftware.d.ts +0 -1
- package/dist/functions/software/getSupportedSoftware.js +0 -5
- package/dist/functions/software/getSupportedSoftware.js.map +0 -1
- package/dist/functions/software/parseEnvironmentPaths.d.ts +0 -1
- package/dist/functions/software/parseEnvironmentPaths.js +0 -11
- package/dist/functions/software/parseEnvironmentPaths.js.map +0 -1
- package/dist/functions/software/softwareConfigs.d.ts +0 -2
- package/dist/functions/software/softwareConfigs.js +0 -148
- package/dist/functions/software/softwareConfigs.js.map +0 -1
- package/dist/functions/software/softwareNameMap.d.ts +0 -1
- package/dist/functions/software/softwareNameMap.js +0 -9
- package/dist/functions/software/softwareNameMap.js.map +0 -1
- package/dist/functions/software/types.d.ts +0 -11
- package/dist/functions/software/types.js +0 -2
- package/dist/functions/software/types.js.map +0 -1
- package/dist/functions/string/base64.d.ts +0 -2
- package/dist/functions/string/base64.js +0 -6
- package/dist/functions/string/base64.js.map +0 -1
- package/dist/functions/string/camelCase.d.ts +0 -1
- package/dist/functions/string/camelCase.js +0 -8
- package/dist/functions/string/camelCase.js.map +0 -1
- package/dist/functions/string/capitalize.d.ts +0 -1
- package/dist/functions/string/capitalize.js +0 -6
- package/dist/functions/string/capitalize.js.map +0 -1
- package/dist/functions/string/caseConverter.d.ts +0 -19
- package/dist/functions/string/caseConverter.js +0 -94
- package/dist/functions/string/caseConverter.js.map +0 -1
- package/dist/functions/string/desensitize.d.ts +0 -13
- package/dist/functions/string/desensitize.js +0 -107
- package/dist/functions/string/desensitize.js.map +0 -1
- package/dist/functions/string/escape.d.ts +0 -1
- package/dist/functions/string/escape.js +0 -13
- package/dist/functions/string/escape.js.map +0 -1
- package/dist/functions/string/htmlEscape.d.ts +0 -20
- package/dist/functions/string/htmlEscape.js +0 -80
- package/dist/functions/string/htmlEscape.js.map +0 -1
- package/dist/functions/string/kebabCase.d.ts +0 -1
- package/dist/functions/string/kebabCase.js +0 -10
- package/dist/functions/string/kebabCase.js.map +0 -1
- package/dist/functions/string/levenshtein.d.ts +0 -1
- package/dist/functions/string/levenshtein.js +0 -27
- package/dist/functions/string/levenshtein.js.map +0 -1
- package/dist/functions/string/mask.d.ts +0 -1
- package/dist/functions/string/mask.js +0 -40
- package/dist/functions/string/mask.js.map +0 -1
- package/dist/functions/string/normalize.d.ts +0 -8
- package/dist/functions/string/normalize.js +0 -37
- package/dist/functions/string/normalize.js.map +0 -1
- package/dist/functions/string/pad.d.ts +0 -13
- package/dist/functions/string/pad.js +0 -50
- package/dist/functions/string/pad.js.map +0 -1
- package/dist/functions/string/padEnd.d.ts +0 -1
- package/dist/functions/string/padEnd.js +0 -8
- package/dist/functions/string/padEnd.js.map +0 -1
- package/dist/functions/string/padStart.d.ts +0 -1
- package/dist/functions/string/padStart.js +0 -8
- package/dist/functions/string/padStart.js.map +0 -1
- package/dist/functions/string/palindrome.d.ts +0 -3
- package/dist/functions/string/palindrome.js +0 -15
- package/dist/functions/string/palindrome.js.map +0 -1
- package/dist/functions/string/pascalCase.d.ts +0 -1
- package/dist/functions/string/pascalCase.js +0 -8
- package/dist/functions/string/pascalCase.js.map +0 -1
- package/dist/functions/string/similarity.d.ts +0 -1
- package/dist/functions/string/similarity.js +0 -13
- package/dist/functions/string/similarity.js.map +0 -1
- package/dist/functions/string/snakeCase.d.ts +0 -1
- package/dist/functions/string/snakeCase.js +0 -10
- package/dist/functions/string/snakeCase.js.map +0 -1
- package/dist/functions/string/template.d.ts +0 -4
- package/dist/functions/string/template.js +0 -21
- package/dist/functions/string/template.js.map +0 -1
- package/dist/functions/string/unescape.d.ts +0 -1
- package/dist/functions/string/unescape.js +0 -13
- package/dist/functions/string/unescape.js.map +0 -1
- package/dist/functions/string/wordCount.d.ts +0 -5
- package/dist/functions/string/wordCount.js +0 -11
- package/dist/functions/string/wordCount.js.map +0 -1
- package/dist/functions/tencent-cloud/getSecret.d.ts +0 -6
- package/dist/functions/tencent-cloud/getSecret.js +0 -18
- package/dist/functions/tencent-cloud/getSecret.js.map +0 -1
- package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.d.ts +0 -13
- package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.js +0 -175
- package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.js.map +0 -1
- package/dist/functions/uniapp/app-plus/androidProjectStrategy.d.ts +0 -19
- package/dist/functions/uniapp/app-plus/androidProjectStrategy.js +0 -55
- package/dist/functions/uniapp/app-plus/androidProjectStrategy.js.map +0 -1
- package/dist/functions/uniapp/app-plus/buildAndroidApp.d.ts +0 -2
- package/dist/functions/uniapp/app-plus/buildAndroidApp.js +0 -149
- package/dist/functions/uniapp/app-plus/buildAndroidApp.js.map +0 -1
- package/dist/functions/uniapp/app-plus/buildAndroidProject.d.ts +0 -3
- package/dist/functions/uniapp/app-plus/buildAndroidProject.js +0 -60
- package/dist/functions/uniapp/app-plus/buildAndroidProject.js.map +0 -1
- package/dist/functions/uniapp/app-plus/configureAndroidManifest.d.ts +0 -5
- package/dist/functions/uniapp/app-plus/configureAndroidManifest.js +0 -51
- package/dist/functions/uniapp/app-plus/configureAndroidManifest.js.map +0 -1
- package/dist/functions/uniapp/app-plus/configureAndroidProject.d.ts +0 -3
- package/dist/functions/uniapp/app-plus/configureAndroidProject.js +0 -63
- package/dist/functions/uniapp/app-plus/configureAndroidProject.js.map +0 -1
- package/dist/functions/uniapp/app-plus/configureBuildGradle.d.ts +0 -9
- package/dist/functions/uniapp/app-plus/configureBuildGradle.js +0 -57
- package/dist/functions/uniapp/app-plus/configureBuildGradle.js.map +0 -1
- package/dist/functions/uniapp/app-plus/configureDcloudControl.d.ts +0 -5
- package/dist/functions/uniapp/app-plus/configureDcloudControl.js +0 -34
- package/dist/functions/uniapp/app-plus/configureDcloudControl.js.map +0 -1
- package/dist/functions/uniapp/app-plus/configureStrings.d.ts +0 -5
- package/dist/functions/uniapp/app-plus/configureStrings.js +0 -42
- package/dist/functions/uniapp/app-plus/configureStrings.js.map +0 -1
- package/dist/functions/uniapp/app-plus/copyAppResources.d.ts +0 -8
- package/dist/functions/uniapp/app-plus/copyAppResources.js +0 -25
- package/dist/functions/uniapp/app-plus/copyAppResources.js.map +0 -1
- package/dist/functions/uniapp/app-plus/copyDirectory.d.ts +0 -2
- package/dist/functions/uniapp/app-plus/copyDirectory.js +0 -18
- package/dist/functions/uniapp/app-plus/copyDirectory.js.map +0 -1
- package/dist/functions/uniapp/app-plus/generateUniAppResources.d.ts +0 -2
- package/dist/functions/uniapp/app-plus/generateUniAppResources.js +0 -35
- package/dist/functions/uniapp/app-plus/generateUniAppResources.js.map +0 -1
- package/dist/functions/uniapp/app-plus/parseManifest.d.ts +0 -14
- package/dist/functions/uniapp/app-plus/parseManifest.js +0 -44
- package/dist/functions/uniapp/app-plus/parseManifest.js.map +0 -1
- package/dist/functions/uniapp/app-plus/validateOptions.d.ts +0 -3
- package/dist/functions/uniapp/app-plus/validateOptions.js +0 -10
- package/dist/functions/uniapp/app-plus/validateOptions.js.map +0 -1
- package/dist/functions/uniapp/build.d.ts +0 -20
- package/dist/functions/uniapp/build.js +0 -84
- package/dist/functions/uniapp/build.js.map +0 -1
- package/dist/functions/uniapp/detectAndroidProjectStructure.d.ts +0 -7
- package/dist/functions/uniapp/detectAndroidProjectStructure.js +0 -30
- package/dist/functions/uniapp/detectAndroidProjectStructure.js.map +0 -1
- package/dist/functions/uniapp/detectProjectType.d.ts +0 -16
- package/dist/functions/uniapp/detectProjectType.js +0 -68
- package/dist/functions/uniapp/detectProjectType.js.map +0 -1
- package/dist/functions/uniapp/parseManifest.d.ts +0 -12
- package/dist/functions/uniapp/parseManifest.js +0 -46
- package/dist/functions/uniapp/parseManifest.js.map +0 -1
- package/dist/functions/uniapp/waitForPages.d.ts +0 -3
- package/dist/functions/uniapp/waitForPages.js +0 -20
- package/dist/functions/uniapp/waitForPages.js.map +0 -1
- package/dist/functions/utils/compose.d.ts +0 -1
- package/dist/functions/utils/compose.js +0 -10
- package/dist/functions/utils/compose.js.map +0 -1
- package/dist/functions/utils/cond.d.ts +0 -1
- package/dist/functions/utils/cond.js +0 -15
- package/dist/functions/utils/cond.js.map +0 -1
- package/dist/functions/utils/curry.d.ts +0 -1
- package/dist/functions/utils/curry.js +0 -13
- package/dist/functions/utils/curry.js.map +0 -1
- package/dist/functions/utils/debounce.d.ts +0 -1
- package/dist/functions/utils/debounce.js +0 -13
- package/dist/functions/utils/debounce.js.map +0 -1
- package/dist/functions/utils/evolve.d.ts +0 -3
- package/dist/functions/utils/evolve.js +0 -15
- package/dist/functions/utils/evolve.js.map +0 -1
- package/dist/functions/utils/flow.d.ts +0 -1
- package/dist/functions/utils/flow.js +0 -14
- package/dist/functions/utils/flow.js.map +0 -1
- package/dist/functions/utils/generateExports.d.ts +0 -16
- package/dist/functions/utils/generateExports.js +0 -34
- package/dist/functions/utils/generateExports.js.map +0 -1
- package/dist/functions/utils/isType.d.ts +0 -11
- package/dist/functions/utils/isType.js +0 -30
- package/dist/functions/utils/isType.js.map +0 -1
- package/dist/functions/utils/memoize.d.ts +0 -1
- package/dist/functions/utils/memoize.js +0 -13
- package/dist/functions/utils/memoize.js.map +0 -1
- package/dist/functions/utils/once.d.ts +0 -1
- package/dist/functions/utils/once.js +0 -13
- package/dist/functions/utils/once.js.map +0 -1
- package/dist/functions/utils/partial.d.ts +0 -1
- package/dist/functions/utils/partial.js +0 -13
- package/dist/functions/utils/partial.js.map +0 -1
- package/dist/functions/utils/pipe.d.ts +0 -1
- package/dist/functions/utils/pipe.js +0 -10
- package/dist/functions/utils/pipe.js.map +0 -1
- package/dist/functions/utils/retryWithBackoff.d.ts +0 -9
- package/dist/functions/utils/retryWithBackoff.js +0 -30
- package/dist/functions/utils/retryWithBackoff.js.map +0 -1
- package/dist/functions/utils/tap.d.ts +0 -1
- package/dist/functions/utils/tap.js +0 -14
- package/dist/functions/utils/tap.js.map +0 -1
- package/dist/functions/utils/throttle.d.ts +0 -1
- package/dist/functions/utils/throttle.js +0 -11
- package/dist/functions/utils/throttle.js.map +0 -1
- package/dist/functions/utils/until.d.ts +0 -1
- package/dist/functions/utils/until.js +0 -10
- package/dist/functions/utils/until.js.map +0 -1
- package/dist/functions/utils/validate.d.ts +0 -8
- package/dist/functions/utils/validate.js +0 -45
- package/dist/functions/utils/validate.js.map +0 -1
- package/dist/functions/utils/walk.d.ts +0 -11
- package/dist/functions/utils/walk.js +0 -27
- package/dist/functions/utils/walk.js.map +0 -1
- package/dist/functions/vue/checkVueType.d.ts +0 -8
- package/dist/functions/vue/checkVueType.js +0 -29
- package/dist/functions/vue/checkVueType.js.map +0 -1
- package/dist/functions/vue/deduplicateColors.d.ts +0 -2
- package/dist/functions/vue/deduplicateColors.js +0 -13
- package/dist/functions/vue/deduplicateColors.js.map +0 -1
- package/dist/functions/vue/dynamicMount.d.ts +0 -15
- package/dist/functions/vue/dynamicMount.js +0 -25
- package/dist/functions/vue/dynamicMount.js.map +0 -1
- package/dist/functions/vue/filterSections.d.ts +0 -2
- package/dist/functions/vue/filterSections.js +0 -11
- package/dist/functions/vue/filterSections.js.map +0 -1
- package/dist/functions/vue/isVNode.d.ts +0 -2
- package/dist/functions/vue/isVNode.js +0 -6
- package/dist/functions/vue/isVNode.js.map +0 -1
- package/dist/functions/vue/isVueComponent.d.ts +0 -2
- package/dist/functions/vue/isVueComponent.js +0 -6
- package/dist/functions/vue/isVueComponent.js.map +0 -1
- package/dist/functions/vue/parseVueFile.d.ts +0 -2
- package/dist/functions/vue/parseVueFile.js +0 -53
- package/dist/functions/vue/parseVueFile.js.map +0 -1
- package/dist/functions/vue/processVueFile.d.ts +0 -3
- package/dist/functions/vue/processVueFile.js +0 -26
- package/dist/functions/vue/processVueFile.js.map +0 -1
- package/dist/functions/vue/saveVueSection.d.ts +0 -2
- package/dist/functions/vue/saveVueSection.js +0 -11
- package/dist/functions/vue/saveVueSection.js.map +0 -1
- package/dist/functions/wechat/miniapp/downloadFile.d.ts +0 -2
- package/dist/functions/wechat/miniapp/downloadFile.js +0 -39
- package/dist/functions/wechat/miniapp/downloadFile.js.map +0 -1
- package/dist/functions/xml/modifyXml.d.ts +0 -11
- package/dist/functions/xml/modifyXml.js +0 -46
- package/dist/functions/xml/modifyXml.js.map +0 -1
- package/dist/hooks/useAi.d.ts +0 -27
- package/dist/hooks/useAi.js +0 -163
- package/dist/hooks/useAi.js.map +0 -1
- package/dist/hooks/useAltool.d.ts +0 -39
- package/dist/hooks/useAltool.js +0 -350
- package/dist/hooks/useAltool.js.map +0 -1
- package/dist/hooks/useCache.d.ts +0 -18
- package/dist/hooks/useCache.js +0 -82
- package/dist/hooks/useCache.js.map +0 -1
- package/dist/hooks/useFetch.d.ts +0 -3
- package/dist/hooks/useFetch.js +0 -154
- package/dist/hooks/useFetch.js.map +0 -1
- package/dist/hooks/useLocalStorage.d.ts +0 -4
- package/dist/hooks/useLocalStorage.js +0 -100
- package/dist/hooks/useLocalStorage.js.map +0 -1
- package/dist/hooks/usePluginSystem.d.ts +0 -11
- package/dist/hooks/usePluginSystem.js +0 -34
- package/dist/hooks/usePluginSystem.js.map +0 -1
- package/dist/hooks/useRequest.d.ts +0 -3
- package/dist/hooks/useRequest.js +0 -139
- package/dist/hooks/useRequest.js.map +0 -1
- package/dist/hooks/useSessionStorage.d.ts +0 -4
- package/dist/hooks/useSessionStorage.js +0 -100
- package/dist/hooks/useSessionStorage.js.map +0 -1
- package/dist/hooks/useStorage.d.ts +0 -10
- package/dist/hooks/useStorage.js +0 -62
- package/dist/hooks/useStorage.js.map +0 -1
- package/dist/hooks/useStorageWithIndexedDB.d.ts +0 -4
- package/dist/hooks/useStorageWithIndexedDB.js +0 -119
- package/dist/hooks/useStorageWithIndexedDB.js.map +0 -1
- package/dist/hooks/useWASM.d.ts +0 -4
- package/dist/hooks/useWASM.js +0 -263
- package/dist/hooks/useWASM.js.map +0 -1
- package/dist/hooks/useWebWorker.d.ts +0 -25
- package/dist/hooks/useWebWorker.js +0 -209
- package/dist/hooks/useWebWorker.js.map +0 -1
- package/dist/hooks/useWorkerFunction.d.ts +0 -22
- package/dist/hooks/useWorkerFunction.js +0 -191
- package/dist/hooks/useWorkerFunction.js.map +0 -1
- package/dist/hooks/useWorkerPool.d.ts +0 -30
- package/dist/hooks/useWorkerPool.js +0 -242
- package/dist/hooks/useWorkerPool.js.map +0 -1
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { uploadApp } from './uploadApp';
|
|
2
|
-
import { validateApp } from './validateApp';
|
|
3
|
-
import { getAppInfo } from './getAppInfo';
|
|
4
|
-
import { getAltoolAuth } from './getAltoolAuth';
|
|
5
|
-
export function createAltoolClient(config) {
|
|
6
|
-
const { altoolPath, childProcess, defaultAuth, defaultOutputFormat = 'normal' } = config;
|
|
7
|
-
return {
|
|
8
|
-
async upload(file, type, auth, outputFormat = defaultOutputFormat) {
|
|
9
|
-
const options = {
|
|
10
|
-
file,
|
|
11
|
-
type,
|
|
12
|
-
auth: getAltoolAuth(auth, defaultAuth),
|
|
13
|
-
outputFormat
|
|
14
|
-
};
|
|
15
|
-
const result = await uploadApp(altoolPath, options, childProcess);
|
|
16
|
-
return typeof result === 'string' ? result : JSON.stringify(result);
|
|
17
|
-
},
|
|
18
|
-
async validate(file, type, auth, outputFormat = defaultOutputFormat) {
|
|
19
|
-
const options = {
|
|
20
|
-
file,
|
|
21
|
-
type,
|
|
22
|
-
auth: getAltoolAuth(auth, defaultAuth),
|
|
23
|
-
outputFormat
|
|
24
|
-
};
|
|
25
|
-
return validateApp(altoolPath, options, childProcess);
|
|
26
|
-
},
|
|
27
|
-
async listApps(type, auth, outputFormat = defaultOutputFormat) {
|
|
28
|
-
const options = {
|
|
29
|
-
type,
|
|
30
|
-
auth: getAltoolAuth(auth, defaultAuth),
|
|
31
|
-
outputFormat
|
|
32
|
-
};
|
|
33
|
-
return getAppInfo(altoolPath, options, childProcess);
|
|
34
|
-
},
|
|
35
|
-
async checkAvailability() {
|
|
36
|
-
const command = `"${altoolPath}" --version`;
|
|
37
|
-
return new Promise((resolve, reject) => {
|
|
38
|
-
childProcess.exec(command, (error, stdout, stderr) => {
|
|
39
|
-
const output = stdout || '';
|
|
40
|
-
const errorOutput = stderr || '';
|
|
41
|
-
if (error) {
|
|
42
|
-
const errorMessage = errorOutput || error.message;
|
|
43
|
-
reject(new Error(errorMessage));
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
resolve(output);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=createAltoolClient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createAltoolClient.js","sourceRoot":"","sources":["../../../src/functions/altool/createAltoolClient.ts"],"names":[],"mappings":"AAMA,OAAO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AC;gBACtC,YAAY;aACb,CAAA;YAED,OAAO,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,YAAY,CAAuB,CAAA;QAC5E,CAAC;QAED,KAAK,CAAC,iBAAiB;YACrB,MAAM,OAAO,GAAG,IAAI,UAAU,aAAa,CAAA;YAE3C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrC,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;oBACnD,MAAM,MAAM,GAAG,MAAM,IAAI,EAAE,CAAA;oBAC3B,MAAM,WAAW,GAAG,MAAM,IAAI,EAAE,CAAA;oBAEhC,IAAI,KAAK,EAAE,CAAC;wBACV,MAAM,YAAY,GAAG,WAAW,IAAI,KAAK,CAAC,OAAO,CAAA;wBACjD,MAAM,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAA;oBACjC,CAAC;yBAAM,CAAC;wBACN,OAAO,CAAC,MAAM,CAAC,CAAA;oBACjB,CAAC;gBACH,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getAltoolAuth.js","sourceRoot":"","sources":["../../../src/functions/altool/getAltoolAuth.ts"],"names":[],"mappings":"AAqCA,MAAM,UAAU,aAAa,CAAC,IAAiB,EAAE,WAAwB;IACvE,IAAI,IAAI;QAAE,OAAO,IAAI,CAAA;IACrB,IAAI,WAAW;QAAE,OAAO,WAAW,CAAA;IACnC,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAA;AACxC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { NodeChildProcess } from '../../../references/node.d';
|
|
2
|
-
import type { AltoolBaseOptions } from '../../../types/altool.d';
|
|
3
|
-
export interface AltoolAppInfoOptions extends AltoolBaseOptions {
|
|
4
|
-
}
|
|
5
|
-
export interface AppInfo {
|
|
6
|
-
bundleId: string;
|
|
7
|
-
name: string;
|
|
8
|
-
version: string;
|
|
9
|
-
buildNumber: string;
|
|
10
|
-
status: string;
|
|
11
|
-
uploadDate?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare function getAppInfo(altoolPath: string, options: AltoolAppInfoOptions, childProcess: NodeChildProcess): Promise<AppInfo[]>;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { isApiKeyAuth } from './isApiKeyAuth';
|
|
2
|
-
import { parseAppInfoOutput } from './parseAppInfoOutput';
|
|
3
|
-
export async function getAppInfo(altoolPath, options, childProcess) {
|
|
4
|
-
const { type, auth, outputFormat = 'normal' } = options;
|
|
5
|
-
const args = [
|
|
6
|
-
'--list-apps',
|
|
7
|
-
'--type', type,
|
|
8
|
-
'--output-format', outputFormat
|
|
9
|
-
];
|
|
10
|
-
if (isApiKeyAuth(auth)) {
|
|
11
|
-
args.push('--apiKey', auth.apiKey);
|
|
12
|
-
args.push('--apiIssuer', auth.apiIssuer);
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
args.push('--username', auth.username);
|
|
16
|
-
args.push('--password', auth.password);
|
|
17
|
-
}
|
|
18
|
-
const command = `"${altoolPath}" ${args.map(arg => `"${arg}"`).join(' ')}`;
|
|
19
|
-
return new Promise((resolve, reject) => {
|
|
20
|
-
childProcess.exec(command, (error, stdout, stderr) => {
|
|
21
|
-
const output = stdout || '';
|
|
22
|
-
const errorOutput = stderr || '';
|
|
23
|
-
if (error) {
|
|
24
|
-
const errorMessage = errorOutput || error.message;
|
|
25
|
-
reject(new Error(errorMessage));
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
try {
|
|
29
|
-
const apps = parseAppInfoOutput(output, outputFormat);
|
|
30
|
-
resolve(apps);
|
|
31
|
-
}
|
|
32
|
-
catch (parseError) {
|
|
33
|
-
reject(new Error(`Failed to parse app info: ${parseError}`));
|
|
34
|
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KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;YACnD,MAAM,MAAM,GAAG,MAAM,IAAI,EAAE,CAAA;YAC3B,MAAM,WAAW,GAAG,MAAM,IAAI,EAAE,CAAA;YAEhC,IAAI,KAAK,EAAE,CAAC;gBACV,MAAM,YAAY,GAAG,WAAW,IAAI,KAAK,CAAC,OAAO,CAAA;gBACjD,MAAM,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAA;YACjC,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC;oBACH,MAAM,IAAI,GAAG,kBAAkB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;oBACrD,OAAO,CAAC,IAAI,CAAC,CAAA;gBACf,CAAC;gBAAC,OAAO,UAAU,EAAE,CAAC;oBACpB,MAAM,CAAC,IAAI,KAAK,CAAC,6BAA6B,UAAU,EAAE,CAAC,CAAC,CAAA;gBAC9D,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type { AltoolAppType, AltoolOutputFormat, AltoolAuthCredentials, AltoolAuthApiKey, AltoolAuth, AltoolBaseOptions, AltoolCommand, AltoolBaseResult } from './types';
|
|
2
|
-
export { isApiKeyAuth, isCredentialsAuth } from './types';
|
|
3
|
-
export type { AltoolUploadOptions, AltoolUploadResult } from './uploadApp';
|
|
4
|
-
export { uploadApp } from './uploadApp';
|
|
5
|
-
export type { AltoolValidateOptions, AltoolValidateResult } from './validateApp';
|
|
6
|
-
export { validateApp } from './validateApp';
|
|
7
|
-
export type { AltoolAppInfoOptions, AppInfo, AltoolAppInfoResult } from './getAppInfo';
|
|
8
|
-
export { getAppInfo } from './getAppInfo';
|
|
9
|
-
export type { AltoolClientConfig, AltoolClient } from './createAltoolClient';
|
|
10
|
-
export { createAltoolClient } from './createAltoolClient';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { isApiKeyAuth, isCredentialsAuth } from './types';
|
|
2
|
-
export { uploadApp } from './uploadApp';
|
|
3
|
-
export { validateApp } from './validateApp';
|
|
4
|
-
export { getAppInfo } from './getAppInfo';
|
|
5
|
-
export { createAltoolClient } from './createAltoolClient';
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/functions/altool/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,YAAY,EACZ,iBAAiB,EAClB,MAAM,SAAS,CAAA;AAQhB,OAAO,EACL,SAAS,EACV,MAAM,aAAa,CAAA;AAQpB,OAAO,EACL,WAAW,EACZ,MAAM,eAAe,CAAA;AAStB,OAAO,EACL,UAAU,EACX,MAAM,cAAc,CAAA;AAQrB,OAAO,EACL,kBAAkB,EACnB,MAAM,sBAAsB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isApiKeyAuth.js","sourceRoot":"","sources":["../../../src/functions/altool/isApiKeyAuth.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,YAAY,CAAC,IAAgB;IAC3C,OAAO,QAAQ,IAAI,IAAI,IAAI,WAAW,IAAI,IAAI,CAAA;AAChD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isCredentialsAuth.js","sourceRoot":"","sources":["../../../src/functions/altool/isCredentialsAuth.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,iBAAiB,CAAC,IAAgB;IAChD,OAAO,UAAU,IAAI,IAAI,IAAI,UAAU,IAAI,IAAI,CAAA;AACjD,CAAC"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
export function parseAppInfoOutput(output, outputFormat) {
|
|
2
|
-
const apps = [];
|
|
3
|
-
if (outputFormat === 'xml') {
|
|
4
|
-
const appMatches = output.match(/<dict[^>]*>[\s\S]*?<\/dict>/g) || [];
|
|
5
|
-
for (const appMatch of appMatches) {
|
|
6
|
-
const bundleIdMatch = appMatch.match(/<key>CFBundleIdentifier<\/key>\s*<string>([^<]+)<\/string>/);
|
|
7
|
-
const nameMatch = appMatch.match(/<key>CFBundleDisplayName<\/key>\s*<string>([^<]+)<\/string>/);
|
|
8
|
-
const versionMatch = appMatch.match(/<key>CFBundleShortVersionString<\/key>\s*<string>([^<]+)<\/string>/);
|
|
9
|
-
const buildMatch = appMatch.match(/<key>CFBundleVersion<\/key>\s*<string>([^<]+)<\/string>/);
|
|
10
|
-
if (bundleIdMatch) {
|
|
11
|
-
apps.push({
|
|
12
|
-
bundleId: bundleIdMatch[1],
|
|
13
|
-
name: nameMatch?.[1] || '',
|
|
14
|
-
version: versionMatch?.[1] || '',
|
|
15
|
-
buildNumber: buildMatch?.[1] || '',
|
|
16
|
-
status: 'Unknown'
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
const lines = output.split('\n');
|
|
23
|
-
let currentApp = {};
|
|
24
|
-
for (const line of lines) {
|
|
25
|
-
const trimmedLine = line.trim();
|
|
26
|
-
if (trimmedLine.includes('Bundle ID:')) {
|
|
27
|
-
currentApp.bundleId = trimmedLine.split('Bundle ID:')[1]?.trim();
|
|
28
|
-
}
|
|
29
|
-
else if (trimmedLine.includes('Name:')) {
|
|
30
|
-
currentApp.name = trimmedLine.split('Name:')[1]?.trim();
|
|
31
|
-
}
|
|
32
|
-
else if (trimmedLine.includes('Version:')) {
|
|
33
|
-
currentApp.version = trimmedLine.split('Version:')[1]?.trim();
|
|
34
|
-
}
|
|
35
|
-
else if (trimmedLine.includes('Build:')) {
|
|
36
|
-
currentApp.buildNumber = trimmedLine.split('Build:')[1]?.trim();
|
|
37
|
-
}
|
|
38
|
-
else if (trimmedLine.includes('Status:')) {
|
|
39
|
-
currentApp.status = trimmedLine.split('Status:')[1]?.trim();
|
|
40
|
-
if (currentApp.bundleId) {
|
|
41
|
-
apps.push({
|
|
42
|
-
bundleId: currentApp.bundleId,
|
|
43
|
-
name: currentApp.name || '',
|
|
44
|
-
version: currentApp.version || '',
|
|
45
|
-
buildNumber: currentApp.buildNumber || '',
|
|
46
|
-
status: currentApp.status || 'Unknown'
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
currentApp = {};
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return apps;
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=parseAppInfoOutput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parseAppInfoOutput.js","sourceRoot":"","sources":["../../../src/functions/altool/parseAppInfoOutput.ts"],"names":[],"mappings":"AAsCA,MAAM,UAAU,kBAAkB,CAAC,MAAc,EAAE,YAAoB;IACrE,MAAM,IAAI,GAAc,EAAE,CAAA;IAE1B,IAAI,YAAY,KAAK,KAAK,EAAE,CAAC;QAE3B,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,8BAA8B,CAAC,IAAI,EAAE,CAAA;QAErE,KAAK,MAAM,QAAQ,IAAI,UAAU,EAAE,CAAC;YAClC,MAAM,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAA;YAClG,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,6DAA6D,CAAC,CAAA;YAC/F,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC,oEAAoE,CAAC,CAAA;YACzG,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAA;YAE5F,IAAI,aAAa,EAAE,CAAC;gBAClB,IAAI,CAAC,IAAI,CAAC;oBACR,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;oBAC1B,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE;oBAC1B,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE;oBAChC,WAAW,EAAE,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AAE,IAAI,EAAE,CAAA;gBAG3D,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;oBACxB,IAAI,CAAC,IAAI,CAAC;wBACR,QAAQ,EAAE,UAAU,CAAC,QAAQ;wBAC7B,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,EAAE;wBAC3B,OAAO,EAAE,UAAU,CAAC,OAAO,IAAI,EAAE;wBACjC,WAAW,EAAE,UAAU,CAAC,WAAW,IAAI,EAAE;wBACzC,MAAM,EAAE,UAAU,CAAC,MAAM,IAAI,SAAS;qBACvC,CAAC,CAAA;gBACJ,CAAC;gBAED,UAAU,GAAG,EAAE,CAAA;YACjB,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export function parseValidationOutput(output) {
|
|
2
|
-
const warnings = [];
|
|
3
|
-
const errors = [];
|
|
4
|
-
const lines = output.split('\n');
|
|
5
|
-
for (const line of lines) {
|
|
6
|
-
const trimmedLine = line.trim();
|
|
7
|
-
if (trimmedLine.includes('WARNING:') || trimmedLine.includes('Warning:')) {
|
|
8
|
-
warnings.push(trimmedLine);
|
|
9
|
-
}
|
|
10
|
-
else if (trimmedLine.includes('ERROR:') || trimmedLine.includes('Error:')) {
|
|
11
|
-
errors.push(trimmedLine);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return {
|
|
15
|
-
hasWarnings: warnings.length > 0,
|
|
16
|
-
hasErrors: errors.length > 0,
|
|
17
|
-
warnings,
|
|
18
|
-
errors
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=parseValidationOutput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parseValidationOutput.js","sourceRoot":"","sources":["../../../src/functions/altool/parseValidationOutput.ts"],"names":[],"mappings":"AAwBA,MAAM,UAAU,qBAAqB,CAAC,MAAc;IAClD,MAAM,QAAQ,GAAa,EAAE,CAAA;IAC7B,MAAM,MAAM,GAAa,EAAE,CAAA;IAE3B,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAEhC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,EAAE,CAAA;QAC/B,IAAI,WAAW,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,WAAW,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;YACzE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAC5B,CAAC;aAAM,IAAI,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC5E,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAC1B,CAAC;IACH,CAAC;IAED,OAAO;QACL,WAAW,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC;QAChC,SAAS,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC;QAC5B,QAAQ;QACR,MAAM;KACP,CAAA;AACH,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export type AltoolAppType = 'ios-app' | 'osx-app' | 'appletvos-app';
|
|
2
|
-
export type AltoolOutputFormat = 'xml' | 'normal';
|
|
3
|
-
export interface AltoolAuthCredentials {
|
|
4
|
-
username: string;
|
|
5
|
-
password: string;
|
|
6
|
-
}
|
|
7
|
-
export interface AltoolAuthApiKey {
|
|
8
|
-
apiKey: string;
|
|
9
|
-
apiIssuer: string;
|
|
10
|
-
}
|
|
11
|
-
export type AltoolAuth = AltoolAuthCredentials | AltoolAuthApiKey;
|
|
12
|
-
export interface AltoolBaseOptions {
|
|
13
|
-
type: AltoolAppType;
|
|
14
|
-
outputFormat?: AltoolOutputFormat;
|
|
15
|
-
auth: AltoolAuth;
|
|
16
|
-
}
|
|
17
|
-
export type AltoolCommand = 'upload-app' | 'validate-app' | 'list-apps';
|
|
18
|
-
export interface AltoolBaseResult {
|
|
19
|
-
success: boolean;
|
|
20
|
-
output: string;
|
|
21
|
-
error?: string;
|
|
22
|
-
exitCode: number;
|
|
23
|
-
command: string;
|
|
24
|
-
}
|
|
25
|
-
export declare function isApiKeyAuth(auth: AltoolAuth): auth is AltoolAuthApiKey;
|
|
26
|
-
export declare function isCredentialsAuth(auth: AltoolAuth): auth is AltoolAuthCredentials;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/functions/altool/types.ts"],"names":[],"mappings":"AAuEA,MAAM,UAAU,YAAY,CAAC,IAAgB;IAC3C,OAAO,QAAQ,IAAI,IAAI,IAAI,WAAW,IAAI,IAAI,CAAA;AAChD,CAAC;AAOD,MAAM,UAAU,iBAAiB,CAAC,IAAgB;IAChD,OAAO,UAAU,IAAI,IAAI,IAAI,UAAU,IAAI,IAAI,CAAA;AACjD,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { NodeChildProcess } from '../../../references/node.d';
|
|
2
|
-
import type { AltoolBaseOptions } from '../../../types/altool.d';
|
|
3
|
-
export interface AltoolUploadOptions extends AltoolBaseOptions {
|
|
4
|
-
file: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function uploadApp(altoolPath: string, options: AltoolUploadOptions, childProcess: NodeChildProcess): Promise<string>;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { isApiKeyAuth } from './isApiKeyAuth';
|
|
2
|
-
export async function uploadApp(altoolPath, options, childProcess) {
|
|
3
|
-
const { file, type, auth, outputFormat = 'normal' } = options;
|
|
4
|
-
const args = [
|
|
5
|
-
'--upload-app',
|
|
6
|
-
'--file', file,
|
|
7
|
-
'--type', type,
|
|
8
|
-
'--output-format', outputFormat
|
|
9
|
-
];
|
|
10
|
-
if (isApiKeyAuth(auth)) {
|
|
11
|
-
args.push('--apiKey', auth.apiKey);
|
|
12
|
-
args.push('--apiIssuer', auth.apiIssuer);
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
args.push('--username', auth.username);
|
|
16
|
-
args.push('--password', auth.password);
|
|
17
|
-
}
|
|
18
|
-
const command = `"${altoolPath}" ${args.map(arg => `"${arg}"`).join(' ')}`;
|
|
19
|
-
return new Promise((resolve, reject) => {
|
|
20
|
-
childProcess.exec(command, (error, stdout, stderr) => {
|
|
21
|
-
const output = stdout || '';
|
|
22
|
-
const errorOutput = stderr || '';
|
|
23
|
-
if (error) {
|
|
24
|
-
const errorMessage = errorOutput || error.message;
|
|
25
|
-
reject(new Error(`altool上传失败: ${errorMessage}`));
|
|
26
|
-
}
|
|
27
|
-
else if (errorOutput && errorOutput.includes('error')) {
|
|
28
|
-
reject(new Error(`altool上传过程中出现错误: ${errorOutput}`));
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
resolve(output);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=uploadApp.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uploadApp.js","sourceRoot":"","sources":["../../../src/functions/altool/uploadApp.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAmB7C,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,UAAkB,EAClB,OAA4B,EAC5B,YAA8B;IAE9B,MAAM,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,YAAY,GAAG,QAAQ,EACxB,GAAG,OAAO,CAAA;IAGX,MAAM,IAAI,GAAG;QACX,cAAc;QACd,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;QACd,iBAAiB,EAAE,YAAY;KAChC,CAAA;IAGD,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;QAEvB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM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seOptions } from '../../../types/altool.d';
|
|
3
|
-
export interface AltoolValidateOptions extends AltoolBaseOptions {
|
|
4
|
-
file: string;
|
|
5
|
-
}
|
|
6
|
-
export interface AltoolValidateResult {
|
|
7
|
-
hasWarnings: boolean;
|
|
8
|
-
hasErrors: boolean;
|
|
9
|
-
warnings: string[];
|
|
10
|
-
errors: string[];
|
|
11
|
-
}
|
|
12
|
-
export declare function validateApp(altoolPath: string, options: AltoolValidateOptions, childProcess: NodeChildProcess): Promise<{
|
|
13
|
-
hasWarnings: boolean;
|
|
14
|
-
hasErrors: boolean;
|
|
15
|
-
warnings: string[];
|
|
16
|
-
errors: string[];
|
|
17
|
-
}>;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { isApiKeyAuth } from './isApiKeyAuth';
|
|
2
|
-
import { parseValidationOutput } from './parseValidationOutput';
|
|
3
|
-
export async function validateApp(altoolPath, options, childProcess) {
|
|
4
|
-
const { file, type, auth, outputFormat = 'normal' } = options;
|
|
5
|
-
const args = [
|
|
6
|
-
'--validate-app',
|
|
7
|
-
'--file', file,
|
|
8
|
-
'--type', type,
|
|
9
|
-
'--output-format', outputFormat
|
|
10
|
-
];
|
|
11
|
-
if (isApiKeyAuth(auth)) {
|
|
12
|
-
args.push('--apiKey', auth.apiKey);
|
|
13
|
-
args.push('--apiIssuer', auth.apiIssuer);
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
args.push('--username', auth.username);
|
|
17
|
-
args.push('--password', auth.password);
|
|
18
|
-
}
|
|
19
|
-
const command = `"${altoolPath}" ${args.map(arg => `"${arg}"`).join(' ')}`;
|
|
20
|
-
return new Promise((resolve, reject) => {
|
|
21
|
-
childProcess.exec(command, (error, stdout, stderr) => {
|
|
22
|
-
const output = stdout || '';
|
|
23
|
-
const errorOutput = stderr || '';
|
|
24
|
-
const validationDetails = parseValidationOutput(output + errorOutput);
|
|
25
|
-
if (error) {
|
|
26
|
-
const errorMessage = errorOutput || error.message;
|
|
27
|
-
reject(new Error(errorMessage));
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
if (validationDetails.hasErrors) {
|
|
31
|
-
reject(new Error('验证失败,存在错误: ' + validationDetails.errors.join(', ')));
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
resolve(validationDetails);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=validateApp.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validateApp.js","sourceRoot":"","sources":["../../../src/functions/altool/validateApp.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAqE/D,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,UAAkB,EAClB,OAA8B,EAC9B,YAA8B;IAO9B,MAAM,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,YAAY,GAAG,QAAQ,EACxB,GAAG,OAAO,CAAA;IAGX,MAAM,IAAI,GAAG;QACX,gBAAgB;QAChB,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;QACd,iBAAiB,EAAE,YAAY;KAChC,CAAA;IAGD,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;QAEvB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QAClC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;IAC1C,CAAC;SAAM,CAAC;QAEN,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;QACtC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;IACxC,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,UAAU,KAAK,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAA;IAE1E,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;YACnD,MAAM,MAAM,GAAG,MAAM,IAAI,EAAE,CAAA;YAC3B,MAAM,WAAW,GAAG,MAAM,IAAI,EAAE,CAAA;YAGhC,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,MAAM,GAAG,WAAW,CAAC,CAAA;YAErE,IAAI,KAAK,EAAE,CAAC;gBACV,MAAM,YAAY,GAAG,WAAW,IAAI,KAAK,CAAC,OAAO,CAAA;gBACjD,MAAM,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAA;YACjC,CAAC;iBAAM,CAAC;gBAEN,IAAI,iBAAiB,CAAC,SAAS,EAAE,CAAC;oBAChC,MAAM,CAAC,IAAI,KAAK,CAAC,aAAa,GAAG,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;gBACxE,CAAC;qBAAM,CAAC;oBACN,OAAO,CAAC,iBAAiB,CAAC,CAAA;gBAC5B,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { FileSystem, Path, Process } from '../../../references/node.d';
|
|
2
|
-
import type { AndroidBuildOptions, AndroidBuildResult } from '../../../types/android-build.d';
|
|
3
|
-
export interface AndroidBuildDependencies {
|
|
4
|
-
fs: FileSystem;
|
|
5
|
-
path: Path;
|
|
6
|
-
process: Process;
|
|
7
|
-
childProcess: {
|
|
8
|
-
exec: (command: string, callback: (error: any, stdout: string, stderr: string) => void) => any;
|
|
9
|
-
};
|
|
10
|
-
setTimeout: (callback: () => void, ms: number) => any;
|
|
11
|
-
}
|
|
12
|
-
export declare function buildProject(options: AndroidBuildOptions, deps: AndroidBuildDependencies): Promise<AndroidBuildResult>;
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
export async function buildProject(options, deps) {
|
|
2
|
-
const { fs, path, process, childProcess, setTimeout } = deps;
|
|
3
|
-
const { projectPath, outputPath, clean = false, buildVariant = 'debug' } = options;
|
|
4
|
-
const logs = [];
|
|
5
|
-
try {
|
|
6
|
-
logs.push(`开始编译 Android 工程: ${projectPath}`);
|
|
7
|
-
logs.push(`构建变体: ${buildVariant}`);
|
|
8
|
-
if (!fs.existsSync(projectPath)) {
|
|
9
|
-
return {
|
|
10
|
-
success: false,
|
|
11
|
-
error: `工程路径不存在: ${projectPath}`,
|
|
12
|
-
logs
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
const buildGradlePath = path.join(projectPath, 'build.gradle');
|
|
16
|
-
if (!fs.existsSync(buildGradlePath)) {
|
|
17
|
-
return {
|
|
18
|
-
success: false,
|
|
19
|
-
error: `未找到 build.gradle 文件,不是有效的 Android 工程`,
|
|
20
|
-
logs
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
const gradlewPath = path.join(projectPath, 'gradlew');
|
|
24
|
-
const gradlewBatPath = path.join(projectPath, 'gradlew.bat');
|
|
25
|
-
const hasGradlew = fs.existsSync(gradlewPath) || fs.existsSync(gradlewBatPath);
|
|
26
|
-
if (!hasGradlew) {
|
|
27
|
-
return {
|
|
28
|
-
success: false,
|
|
29
|
-
error: `未找到 gradlew 脚本,请确保工程已正确初始化`,
|
|
30
|
-
logs
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
const gradleCommand = process.platform === 'win32' ? 'gradlew.bat' : './gradlew';
|
|
34
|
-
let buildCommand = `cd "${projectPath}" && ${gradleCommand}`;
|
|
35
|
-
if (clean) {
|
|
36
|
-
buildCommand += ' clean';
|
|
37
|
-
logs.push('执行清理构建');
|
|
38
|
-
}
|
|
39
|
-
buildCommand += ` assemble${buildVariant.charAt(0).toUpperCase() + buildVariant.slice(1)}`;
|
|
40
|
-
logs.push(`执行命令: ${buildCommand}`);
|
|
41
|
-
const result = await new Promise((resolve) => {
|
|
42
|
-
const child = childProcess.exec(buildCommand, (error, stdout, stderr) => {
|
|
43
|
-
if (error) {
|
|
44
|
-
logs.push(`构建错误: ${error.message}`);
|
|
45
|
-
if (stderr)
|
|
46
|
-
logs.push(`错误输出: ${stderr}`);
|
|
47
|
-
resolve({ success: false, error: error.message });
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
if (stdout)
|
|
51
|
-
logs.push(`构建输出: ${stdout}`);
|
|
52
|
-
if (stderr)
|
|
53
|
-
logs.push(`警告信息: ${stderr}`);
|
|
54
|
-
resolve({ success: true });
|
|
55
|
-
});
|
|
56
|
-
setTimeout(() => {
|
|
57
|
-
child.kill();
|
|
58
|
-
resolve({ success: false, error: '构建超时' });
|
|
59
|
-
}, 600000);
|
|
60
|
-
});
|
|
61
|
-
if (!result.success) {
|
|
62
|
-
return {
|
|
63
|
-
success: false,
|
|
64
|
-
error: result.error,
|
|
65
|
-
logs
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
const defaultOutputPath = path.join(projectPath, 'app', 'build', 'outputs', 'apk', buildVariant);
|
|
69
|
-
let finalOutputPath = outputPath || defaultOutputPath;
|
|
70
|
-
if (!fs.existsSync(finalOutputPath)) {
|
|
71
|
-
logs.push(`警告: 未找到默认输出目录 ${finalOutputPath}`);
|
|
72
|
-
const possibleModules = [];
|
|
73
|
-
try {
|
|
74
|
-
const projectFiles = fs.readdirSync(projectPath);
|
|
75
|
-
for (const file of projectFiles) {
|
|
76
|
-
const filePath = path.join(projectPath, file);
|
|
77
|
-
if (fs.statSync(filePath).isDirectory()) {
|
|
78
|
-
const buildGradlePath = path.join(filePath, 'build.gradle');
|
|
79
|
-
const buildGradleKtsPath = path.join(filePath, 'build.gradle.kts');
|
|
80
|
-
if (fs.existsSync(buildGradlePath) || fs.existsSync(buildGradleKtsPath)) {
|
|
81
|
-
const moduleOutputPath = path.join(filePath, 'build', 'outputs', 'apk', buildVariant);
|
|
82
|
-
if (fs.existsSync(moduleOutputPath)) {
|
|
83
|
-
possibleModules.push({ module: file, path: moduleOutputPath });
|
|
84
|
-
logs.push(`找到子模块输出: ${file} -> ${moduleOutputPath}`);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
catch (error) {
|
|
91
|
-
logs.push(`搜索子模块时出错: ${error instanceof Error ? error.message : String(error)}`);
|
|
92
|
-
}
|
|
93
|
-
if (possibleModules.length > 0) {
|
|
94
|
-
const appModule = possibleModules.find(m => m.module === 'app');
|
|
95
|
-
const selectedModule = appModule || possibleModules[0];
|
|
96
|
-
finalOutputPath = selectedModule.path;
|
|
97
|
-
logs.push(`使用子模块输出目录: ${selectedModule.module} -> ${finalOutputPath}`);
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
logs.push(`未找到任何有效的输出目录`);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
logs.push(`构建完成,输出目录: ${finalOutputPath}`);
|
|
105
|
-
}
|
|
106
|
-
logs.push(`Android 工程编译成功`);
|
|
107
|
-
return {
|
|
108
|
-
success: true,
|
|
109
|
-
outputPath: finalOutputPath,
|
|
110
|
-
logs
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
catch (error) {
|
|
114
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
115
|
-
logs.push(`编译过程中发生异常: ${errorMessage}`);
|
|
116
|
-
return {
|
|
117
|
-
success: false,
|
|
118
|
-
error: errorMessage,
|
|
119
|
-
logs
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
//# sourceMappingURL=buildProject.js.map
|
|
@@ -1 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AC3B,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,cAAc,eAAe,EAAE,CAAC,CAAA;QAC5C,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;QAC3B,OAAO;YACL,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,eAAe;YAC3B,IAAI;SACL,CAAA;IAEH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QAC3E,IAAI,CAAC,IAAI,CAAC,cAAc,YAAY,EAAE,CAAC,CAAA;QAEvC,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,YAAY;YACnB,IAAI;SACL,CAAA;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { FileSystem, Path } from '../../../references/node.d';
|
|
2
|
-
export interface GradleModificationOptions {
|
|
3
|
-
applicationId?: string;
|
|
4
|
-
versionName?: string;
|
|
5
|
-
versionCode?: number;
|
|
6
|
-
signing?: {
|
|
7
|
-
keystore: string;
|
|
8
|
-
keystorePassword: string;
|
|
9
|
-
keyAlias: string;
|
|
10
|
-
keyPassword: string;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export declare function modifyGradle(buildGradlePath: string, options: GradleModificationOptions, fs: FileSystem, path: Path): Promise<{
|
|
14
|
-
success: boolean;
|
|
15
|
-
message?: string;
|
|
16
|
-
error?: string;
|
|
17
|
-
}>;
|