nitro-nightly 3.0.1-20251217-124302-0d9f782c → 3.0.1-20251217-214519-a335d7df
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/_nitro.mjs +4 -4
- package/dist/types/index.d.mts +6 -0
- package/package.json +1 -1
package/dist/_nitro.mjs
CHANGED
|
@@ -1017,7 +1017,7 @@ async function scanUnprefixedPublicAssets(nitro) {
|
|
|
1017
1017
|
for (const asset of nitro.options.publicAssets) {
|
|
1018
1018
|
if (asset.baseURL && asset.baseURL !== "/" && !asset.fallthrough) continue;
|
|
1019
1019
|
if (!await isDirectory(asset.dir)) continue;
|
|
1020
|
-
const publicAssets = await glob(getIncludePatterns(nitro, asset.dir), {
|
|
1020
|
+
const publicAssets = await glob(getIncludePatterns(nitro, asset.dir, asset.ignore), {
|
|
1021
1021
|
cwd: asset.dir,
|
|
1022
1022
|
absolute: false,
|
|
1023
1023
|
dot: true
|
|
@@ -1032,7 +1032,7 @@ async function copyPublicAssets(nitro) {
|
|
|
1032
1032
|
const assetDir = asset.dir;
|
|
1033
1033
|
const dstDir = join(nitro.options.output.publicDir, asset.baseURL);
|
|
1034
1034
|
if (await isDirectory(assetDir)) {
|
|
1035
|
-
const publicAssets = await glob(getIncludePatterns(nitro, assetDir), {
|
|
1035
|
+
const publicAssets = await glob(getIncludePatterns(nitro, assetDir, asset.ignore), {
|
|
1036
1036
|
cwd: assetDir,
|
|
1037
1037
|
absolute: false,
|
|
1038
1038
|
dot: true
|
|
@@ -1047,8 +1047,8 @@ async function copyPublicAssets(nitro) {
|
|
|
1047
1047
|
if (nitro.options.compressPublicAssets) await compressPublicAssets(nitro);
|
|
1048
1048
|
nitro.logger.success("Generated public " + prettyPath(nitro.options.output.publicDir));
|
|
1049
1049
|
}
|
|
1050
|
-
function getIncludePatterns(nitro, assetDir) {
|
|
1051
|
-
return ["**", ...
|
|
1050
|
+
function getIncludePatterns(nitro, assetDir, ignorePatterns = nitro.options.ignore) {
|
|
1051
|
+
return ["**", ...(ignorePatterns || []).map((p) => {
|
|
1052
1052
|
const [_, negation, pattern] = p.match(NEGATION_RE) || [];
|
|
1053
1053
|
return (negation ? "" : "!") + (pattern.startsWith("*") ? pattern : relative(assetDir, resolve(nitro.options.rootDir, pattern)));
|
|
1054
1054
|
})].filter((p) => !PARENT_DIR_GLOB_RE.test(p));
|
package/dist/types/index.d.mts
CHANGED
|
@@ -3122,6 +3122,12 @@ interface PublicAssetDir {
|
|
|
3122
3122
|
fallthrough?: boolean;
|
|
3123
3123
|
maxAge: number;
|
|
3124
3124
|
dir: string;
|
|
3125
|
+
/**
|
|
3126
|
+
* Pass false to disable ignore patterns when scanning the directory, or
|
|
3127
|
+
* pass an array of glob patterns to ignore (which will override global
|
|
3128
|
+
* nitro.ignore patterns).
|
|
3129
|
+
*/
|
|
3130
|
+
ignore?: false | string[];
|
|
3125
3131
|
}
|
|
3126
3132
|
interface CompressOptions {
|
|
3127
3133
|
gzip?: boolean;
|
package/package.json
CHANGED