@netlify/plugin-nextjs 5.11.6 → 5.12.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/dist/index.js +26 -0
- package/dist/run/handlers/tags-handler.cjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31,14 +31,24 @@ import {
|
|
|
31
31
|
verifyNetlifyFormsWorkaround,
|
|
32
32
|
verifyPublishDir
|
|
33
33
|
} from "./build/verification.js";
|
|
34
|
+
var skipPlugin = process.env.NETLIFY_NEXT_PLUGIN_SKIP === "true" || process.env.NETLIFY_NEXT_PLUGIN_SKIP === "1";
|
|
35
|
+
var skipText = "Skipping Next.js plugin due to NETLIFY_NEXT_PLUGIN_SKIP environment variable.";
|
|
34
36
|
var tracer = wrapTracer(trace.getTracer("Next.js runtime"));
|
|
35
37
|
var onPreDev = async (options) => {
|
|
38
|
+
if (skipPlugin) {
|
|
39
|
+
console.warn(skipText);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
36
42
|
await tracer.withActiveSpan("onPreDev", async () => {
|
|
37
43
|
const context = new PluginContext(options);
|
|
38
44
|
await rm(context.blobDir, { recursive: true, force: true });
|
|
39
45
|
});
|
|
40
46
|
};
|
|
41
47
|
var onPreBuild = async (options) => {
|
|
48
|
+
if (skipPlugin) {
|
|
49
|
+
console.warn(skipText);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
42
52
|
await tracer.withActiveSpan("onPreBuild", async () => {
|
|
43
53
|
process.env.NEXT_PRIVATE_STANDALONE = "true";
|
|
44
54
|
const ctx = new PluginContext(options);
|
|
@@ -51,6 +61,10 @@ var onPreBuild = async (options) => {
|
|
|
51
61
|
});
|
|
52
62
|
};
|
|
53
63
|
var onBuild = async (options) => {
|
|
64
|
+
if (skipPlugin) {
|
|
65
|
+
console.warn(skipText);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
54
68
|
await tracer.withActiveSpan("onBuild", async (span) => {
|
|
55
69
|
const ctx = new PluginContext(options);
|
|
56
70
|
verifyPublishDir(ctx);
|
|
@@ -75,11 +89,19 @@ var onBuild = async (options) => {
|
|
|
75
89
|
});
|
|
76
90
|
};
|
|
77
91
|
var onPostBuild = async (options) => {
|
|
92
|
+
if (skipPlugin) {
|
|
93
|
+
console.warn(skipText);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
78
96
|
await tracer.withActiveSpan("onPostBuild", async () => {
|
|
79
97
|
await publishStaticDir(new PluginContext(options));
|
|
80
98
|
});
|
|
81
99
|
};
|
|
82
100
|
var onSuccess = async () => {
|
|
101
|
+
if (skipPlugin) {
|
|
102
|
+
console.warn(skipText);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
83
105
|
await tracer.withActiveSpan("onSuccess", async () => {
|
|
84
106
|
const prewarm = [process.env.DEPLOY_URL, process.env.DEPLOY_PRIME_URL, process.env.URL].filter(
|
|
85
107
|
// If running locally then the deploy ID is a placeholder value. Filtering for `https://0--` removes it.
|
|
@@ -89,6 +111,10 @@ var onSuccess = async () => {
|
|
|
89
111
|
});
|
|
90
112
|
};
|
|
91
113
|
var onEnd = async (options) => {
|
|
114
|
+
if (skipPlugin) {
|
|
115
|
+
console.warn(skipText);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
92
118
|
await tracer.withActiveSpan("onEnd", async () => {
|
|
93
119
|
await unpublishStaticDir(new PluginContext(options));
|
|
94
120
|
});
|
|
@@ -86,7 +86,7 @@ var pipeline = (0, import_util.promisify)(import_stream.pipeline);
|
|
|
86
86
|
|
|
87
87
|
// package.json
|
|
88
88
|
var name = "@netlify/plugin-nextjs";
|
|
89
|
-
var version = "5.
|
|
89
|
+
var version = "5.12.0";
|
|
90
90
|
|
|
91
91
|
// src/run/handlers/tags-handler.cts
|
|
92
92
|
var import_storage = require("../storage/storage.cjs");
|