UNPKG

vsix-utils

Version:

utilities for working with VSIX packages

46 lines (43 loc) 2.54 kB
export { C as CollectOptions, b as ContentTypeResult, E as ExtensionDependenciesOptions, a as ExtensionDependency, I as InferredBaseUrls, c as TransformFilesOptions, n as TransformMarkdownOptions, T as TransformedFiles, V as VsixFile, d as VsixInMemoryFile, e as VsixLocalFile, f as collect, h as getContentTypesForFiles, g as getExtensionDependencies, i as getExtensionPackageManager, l as inferBaseUrls, j as isInMemoryFile, k as isLocalFile, t as transformFiles, m as transformMarkdown } from './files-BaC4caRh.cjs'; export { ManifestAsset, ManifestAssetType, ProjectManifest, VsixManifestOptions, createVsixManifest, getManifestTags, isWebKind, readProjectManifest, transformExtensionKind } from './manifest.cjs'; import { PackageManager, Manifest } from './types.cjs'; export { PackageManagerWithAuto } from './types.cjs'; export { ALLOWED_SPONSOR_PROTOCOLS, EXTENSION_NAME_REGEX, EXTENSION_PRICING, GITHUB_BADGE_URL_REGEX, ManifestValidation, VALID_EXTENSION_KINDS, VSCODE_ENGINE_COMPATIBILITY_REGEX, validateProjectManifest, validateVSCodeTypesCompatability } from './validation.cjs'; export { RawVsixPackage, ReadVsixOptions, WriteVsixOptions, readVsix, writeVsix } from './zip.cjs'; import 'node:buffer'; interface PrepublishOptions { /** * The current working directory. */ cwd: string; /** * The package manager to use. */ packageManager: Exclude<PackageManager, "auto">; /** * The manifest of the extension. */ manifest: Manifest; /** * Whether the extension is a pre-release. */ preRelease: boolean; } /** * Executes the publish related scripts in a VS Code extension package.json. * * The function will run the following scripts in order if they exist: * - `vscode:prepublish` * - `vscode:prepublish:release` (only if not a pre-release) * - `vscode:prepublish:prerelease` (only if pre-release) * * @param {PrepublishOptions} options - The options for the prepublish command * @param {string} options.cwd - The current working directory * @param {Exclude<PackageManager, "auto">} options.packageManager - The package manager to use (npm, yarn, pnpm) * @param {Manifest} options.manifest - The package.json manifest object * @param {boolean} options.preRelease - Whether this is a pre-release build * * @returns {Promise<void>} A promise that resolves when all scripts have been executed */ declare function prepublish(options: PrepublishOptions): Promise<void>; export { Manifest, PackageManager, type PrepublishOptions, prepublish };