balm-core 6.0.0-alpha.3 → 6.0.0-alpha.4

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/index.d.cts CHANGED
@@ -418,6 +418,27 @@ declare class AssetRevisioner {
418
418
  process(files: VirtualFile[]): VirtualFile[];
419
419
  }
420
420
 
421
+ declare function shouldUseTargetPaths(config: BalmConfig): boolean;
422
+ /**
423
+ * Check whether a file is the configured PWA manifest or a `.webmanifest` file.
424
+ */
425
+ declare function isManifestFile(file: {
426
+ basename: string;
427
+ extname: string;
428
+ }, config: BalmConfig): boolean;
429
+ /**
430
+ * Rewrite relative (`../<source>/`) and root-relative (`url(/<source>/)`)
431
+ * asset URLs in compiled stylesheets from source folder names to target folder
432
+ * names when building for production or backend integration.
433
+ */
434
+ declare function rewriteCssAssetUrls(content: string, config: BalmConfig): string;
435
+ /**
436
+ * Rewrite source directory segments (e.g. `/images/`, `"styles/`) to target
437
+ * directory names in HTML and PWA manifest files.
438
+ */
439
+ declare function rewriteHtmlAssetPaths(content: string, config: BalmConfig): string;
440
+ declare function transformCssUrl(config: BalmConfig): TransformFn;
441
+
421
442
  declare function runWebpack(config: BalmConfig, customOptions?: Configuration): Promise<webpack.Stats | undefined>;
422
443
 
423
444
  declare function runRollup(config: BalmConfig, customInputOptions?: RollupOptions, customOutputOptions?: OutputOptions): Promise<void>;
@@ -604,4 +625,4 @@ declare function globalWorkspace(subPath?: string): string;
604
625
  declare const localResolve: typeof localWorkspace;
605
626
  declare const globalResolve: typeof globalWorkspace;
606
627
 
607
- export { ASSET, ASSETS_TYPES, ASSET_EXT, type AnalyticsOptions, AssetRevisioner, Balm, type BalmAssets, type BalmConfig, type BalmCustomConfig, type BalmEntry, type BalmEnv, type BalmExtras, type BalmFtp, BalmHooks, type BalmHtml, type BalmImages, type BalmPathMap, type BalmPaths, type BalmPwa, type BalmRoots, type BalmScripts, type BalmServer, type BalmStyles, type BalmWorkspaceConfig, type BalmWorkspaces, BaseTask, BundlerType, CHUNK, CacheTask, type CacheTransformOptions, CleanTask, CopyTask, type CopyTaskOptions, type CustomAnalyticsOptions, type DeepPartial, FileSystem, FtpTask, type FtpTaskOptions, FunctionTask, HtmlTask, type LessTransformOptions, LogLevel, type LooseObject, PUBLIC_URL, Pipeline, type PipelineOptions, type PostcssTransformOptions, PublishTask, type PublishTaskOptions, PwaTask, type PwaTaskOptions, RemoveTask, type RenameOptions, type ReplaceOptions, ReplaceTask, type ReplaceTaskOptions, type SassTransformOptions, ScriptTask, type ServeStaticItem, type ServeStaticOption, ServerTask, StaticTask, StyleTask, type TaskContext, TaskDAG, type TaskFn, type TaskOptions, type TemplateOption, type TransformFn, VirtualFile, type VirtualFileOptions, type WorkspacePaths, ZipTask, type ZipTaskOptions, balm, createDefaultConfig, deepMerge, balm as default, file, getWorkspaces, globalResolve, globalWorkspace, isArray, isBoolean, isFunction, isObject, isString, localResolve, localWorkspace, logger, resolveConfig, resolveDefaultEntry, runEsbuild, runRollup, runWebpack, setWorkspaces, toNamespace, transformHtmlmin, transformLess, transformPostcss, transformRename, transformReplace, transformSass, transformTerser };
628
+ export { ASSET, ASSETS_TYPES, ASSET_EXT, type AnalyticsOptions, AssetRevisioner, Balm, type BalmAssets, type BalmConfig, type BalmCustomConfig, type BalmEntry, type BalmEnv, type BalmExtras, type BalmFtp, BalmHooks, type BalmHtml, type BalmImages, type BalmPathMap, type BalmPaths, type BalmPwa, type BalmRoots, type BalmScripts, type BalmServer, type BalmStyles, type BalmWorkspaceConfig, type BalmWorkspaces, BaseTask, BundlerType, CHUNK, CacheTask, type CacheTransformOptions, CleanTask, CopyTask, type CopyTaskOptions, type CustomAnalyticsOptions, type DeepPartial, FileSystem, FtpTask, type FtpTaskOptions, FunctionTask, HtmlTask, type LessTransformOptions, LogLevel, type LooseObject, PUBLIC_URL, Pipeline, type PipelineOptions, type PostcssTransformOptions, PublishTask, type PublishTaskOptions, PwaTask, type PwaTaskOptions, RemoveTask, type RenameOptions, type ReplaceOptions, ReplaceTask, type ReplaceTaskOptions, type SassTransformOptions, ScriptTask, type ServeStaticItem, type ServeStaticOption, ServerTask, StaticTask, StyleTask, type TaskContext, TaskDAG, type TaskFn, type TaskOptions, type TemplateOption, type TransformFn, VirtualFile, type VirtualFileOptions, type WorkspacePaths, ZipTask, type ZipTaskOptions, balm, createDefaultConfig, deepMerge, balm as default, file, getWorkspaces, globalResolve, globalWorkspace, isArray, isBoolean, isFunction, isManifestFile, isObject, isString, localResolve, localWorkspace, logger, resolveConfig, resolveDefaultEntry, rewriteCssAssetUrls, rewriteHtmlAssetPaths, runEsbuild, runRollup, runWebpack, setWorkspaces, shouldUseTargetPaths, toNamespace, transformCssUrl, transformHtmlmin, transformLess, transformPostcss, transformRename, transformReplace, transformSass, transformTerser };
package/dist/index.d.ts CHANGED
@@ -418,6 +418,27 @@ declare class AssetRevisioner {
418
418
  process(files: VirtualFile[]): VirtualFile[];
419
419
  }
420
420
 
421
+ declare function shouldUseTargetPaths(config: BalmConfig): boolean;
422
+ /**
423
+ * Check whether a file is the configured PWA manifest or a `.webmanifest` file.
424
+ */
425
+ declare function isManifestFile(file: {
426
+ basename: string;
427
+ extname: string;
428
+ }, config: BalmConfig): boolean;
429
+ /**
430
+ * Rewrite relative (`../<source>/`) and root-relative (`url(/<source>/)`)
431
+ * asset URLs in compiled stylesheets from source folder names to target folder
432
+ * names when building for production or backend integration.
433
+ */
434
+ declare function rewriteCssAssetUrls(content: string, config: BalmConfig): string;
435
+ /**
436
+ * Rewrite source directory segments (e.g. `/images/`, `"styles/`) to target
437
+ * directory names in HTML and PWA manifest files.
438
+ */
439
+ declare function rewriteHtmlAssetPaths(content: string, config: BalmConfig): string;
440
+ declare function transformCssUrl(config: BalmConfig): TransformFn;
441
+
421
442
  declare function runWebpack(config: BalmConfig, customOptions?: Configuration): Promise<webpack.Stats | undefined>;
422
443
 
423
444
  declare function runRollup(config: BalmConfig, customInputOptions?: RollupOptions, customOutputOptions?: OutputOptions): Promise<void>;
@@ -604,4 +625,4 @@ declare function globalWorkspace(subPath?: string): string;
604
625
  declare const localResolve: typeof localWorkspace;
605
626
  declare const globalResolve: typeof globalWorkspace;
606
627
 
607
- export { ASSET, ASSETS_TYPES, ASSET_EXT, type AnalyticsOptions, AssetRevisioner, Balm, type BalmAssets, type BalmConfig, type BalmCustomConfig, type BalmEntry, type BalmEnv, type BalmExtras, type BalmFtp, BalmHooks, type BalmHtml, type BalmImages, type BalmPathMap, type BalmPaths, type BalmPwa, type BalmRoots, type BalmScripts, type BalmServer, type BalmStyles, type BalmWorkspaceConfig, type BalmWorkspaces, BaseTask, BundlerType, CHUNK, CacheTask, type CacheTransformOptions, CleanTask, CopyTask, type CopyTaskOptions, type CustomAnalyticsOptions, type DeepPartial, FileSystem, FtpTask, type FtpTaskOptions, FunctionTask, HtmlTask, type LessTransformOptions, LogLevel, type LooseObject, PUBLIC_URL, Pipeline, type PipelineOptions, type PostcssTransformOptions, PublishTask, type PublishTaskOptions, PwaTask, type PwaTaskOptions, RemoveTask, type RenameOptions, type ReplaceOptions, ReplaceTask, type ReplaceTaskOptions, type SassTransformOptions, ScriptTask, type ServeStaticItem, type ServeStaticOption, ServerTask, StaticTask, StyleTask, type TaskContext, TaskDAG, type TaskFn, type TaskOptions, type TemplateOption, type TransformFn, VirtualFile, type VirtualFileOptions, type WorkspacePaths, ZipTask, type ZipTaskOptions, balm, createDefaultConfig, deepMerge, balm as default, file, getWorkspaces, globalResolve, globalWorkspace, isArray, isBoolean, isFunction, isObject, isString, localResolve, localWorkspace, logger, resolveConfig, resolveDefaultEntry, runEsbuild, runRollup, runWebpack, setWorkspaces, toNamespace, transformHtmlmin, transformLess, transformPostcss, transformRename, transformReplace, transformSass, transformTerser };
628
+ export { ASSET, ASSETS_TYPES, ASSET_EXT, type AnalyticsOptions, AssetRevisioner, Balm, type BalmAssets, type BalmConfig, type BalmCustomConfig, type BalmEntry, type BalmEnv, type BalmExtras, type BalmFtp, BalmHooks, type BalmHtml, type BalmImages, type BalmPathMap, type BalmPaths, type BalmPwa, type BalmRoots, type BalmScripts, type BalmServer, type BalmStyles, type BalmWorkspaceConfig, type BalmWorkspaces, BaseTask, BundlerType, CHUNK, CacheTask, type CacheTransformOptions, CleanTask, CopyTask, type CopyTaskOptions, type CustomAnalyticsOptions, type DeepPartial, FileSystem, FtpTask, type FtpTaskOptions, FunctionTask, HtmlTask, type LessTransformOptions, LogLevel, type LooseObject, PUBLIC_URL, Pipeline, type PipelineOptions, type PostcssTransformOptions, PublishTask, type PublishTaskOptions, PwaTask, type PwaTaskOptions, RemoveTask, type RenameOptions, type ReplaceOptions, ReplaceTask, type ReplaceTaskOptions, type SassTransformOptions, ScriptTask, type ServeStaticItem, type ServeStaticOption, ServerTask, StaticTask, StyleTask, type TaskContext, TaskDAG, type TaskFn, type TaskOptions, type TemplateOption, type TransformFn, VirtualFile, type VirtualFileOptions, type WorkspacePaths, ZipTask, type ZipTaskOptions, balm, createDefaultConfig, deepMerge, balm as default, file, getWorkspaces, globalResolve, globalWorkspace, isArray, isBoolean, isFunction, isManifestFile, isObject, isString, localResolve, localWorkspace, logger, resolveConfig, resolveDefaultEntry, rewriteCssAssetUrls, rewriteHtmlAssetPaths, runEsbuild, runRollup, runWebpack, setWorkspaces, shouldUseTargetPaths, toNamespace, transformCssUrl, transformHtmlmin, transformLess, transformPostcss, transformRename, transformReplace, transformSass, transformTerser };