@netlify/plugin-nextjs 5.10.7 → 5.11.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/build/advanced-api-routes.js +1 -1
- package/dist/build/cache.js +1 -1
- package/dist/build/content/prerendered.js +5 -9
- package/dist/build/content/server.js +22 -15
- package/dist/build/content/static.js +4 -8
- package/dist/build/functions/edge.js +2 -2
- package/dist/build/functions/server.js +4 -8
- package/dist/build/image-cdn.js +1 -1
- package/dist/build/plugin-context.js +2 -2
- package/dist/build/templates/handler-monorepo.tmpl.js +0 -5
- package/dist/build/templates/handler.tmpl.js +0 -4
- package/dist/build/verification.js +3 -3
- package/dist/esm-chunks/{chunk-OEQOKJGE.js → chunk-6BT4RYQJ.js} +1 -12
- package/dist/esm-chunks/chunk-FKDTZJRV.js +832 -0
- package/dist/esm-chunks/{chunk-APO262HE.js → chunk-PFLHY2KD.js} +1 -1
- package/dist/esm-chunks/{chunk-NFOLXH6F.js → chunk-YUXQHOYO.js} +1 -1
- package/dist/index.js +3 -7
- package/dist/run/config.js +3 -3
- package/dist/run/constants.js +3 -3
- package/dist/run/handlers/cache.cjs +24 -234
- package/dist/run/handlers/request-context.cjs +63 -88
- package/dist/run/handlers/server.js +9 -6
- package/dist/run/handlers/tags-handler.cjs +192 -0
- package/dist/run/handlers/tracer.cjs +4 -4
- package/dist/run/handlers/use-cache-handler.js +1553 -0
- package/dist/run/headers.js +1 -1
- package/dist/run/revalidate.js +1 -1
- package/dist/shared/blobkey.js +1 -1
- package/package.json +1 -1
- package/dist/esm-chunks/chunk-5QSXBV7L.js +0 -89
- package/dist/esm-chunks/chunk-GNGHTHMQ.js +0 -1624
- package/dist/esm-chunks/package-SGSU42JZ.js +0 -148
- package/dist/run/handlers/tracing.js +0 -68968
package/dist/run/headers.js
CHANGED
package/dist/run/revalidate.js
CHANGED
package/dist/shared/blobkey.js
CHANGED
package/package.json
CHANGED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
var require = await (async () => {
|
|
3
|
-
var { createRequire } = await import("node:module");
|
|
4
|
-
return createRequire(import.meta.url);
|
|
5
|
-
})();
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
SpanStatusCode,
|
|
9
|
-
context,
|
|
10
|
-
init_esm
|
|
11
|
-
} from "./chunk-GNGHTHMQ.js";
|
|
12
|
-
|
|
13
|
-
// node_modules/@opentelemetry/api/build/esm/experimental/trace/SugaredTracer.js
|
|
14
|
-
init_esm();
|
|
15
|
-
var defaultOnException = function(e, span) {
|
|
16
|
-
span.recordException(e);
|
|
17
|
-
span.setStatus({
|
|
18
|
-
code: SpanStatusCode.ERROR
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
function wrapTracer(tracer) {
|
|
22
|
-
return new SugaredTracer(tracer);
|
|
23
|
-
}
|
|
24
|
-
var SugaredTracer = (
|
|
25
|
-
/** @class */
|
|
26
|
-
function() {
|
|
27
|
-
function SugaredTracer2(tracer) {
|
|
28
|
-
this._tracer = tracer;
|
|
29
|
-
this.startSpan = tracer.startSpan.bind(this._tracer);
|
|
30
|
-
this.startActiveSpan = tracer.startActiveSpan.bind(this._tracer);
|
|
31
|
-
}
|
|
32
|
-
SugaredTracer2.prototype.withActiveSpan = function(name, arg2, arg3, arg4) {
|
|
33
|
-
var _a = massageParams(arg2, arg3, arg4), opts = _a.opts, ctx = _a.ctx, fn = _a.fn;
|
|
34
|
-
return this._tracer.startActiveSpan(name, opts, ctx, function(span) {
|
|
35
|
-
return handleFn(span, opts, fn);
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
SugaredTracer2.prototype.withSpan = function(name, arg2, arg3, arg4) {
|
|
39
|
-
var _a = massageParams(arg2, arg3, arg4), opts = _a.opts, ctx = _a.ctx, fn = _a.fn;
|
|
40
|
-
var span = this._tracer.startSpan(name, opts, ctx);
|
|
41
|
-
return handleFn(span, opts, fn);
|
|
42
|
-
};
|
|
43
|
-
return SugaredTracer2;
|
|
44
|
-
}()
|
|
45
|
-
);
|
|
46
|
-
function massageParams(arg, arg2, arg3) {
|
|
47
|
-
var opts;
|
|
48
|
-
var ctx;
|
|
49
|
-
var fn;
|
|
50
|
-
if (!arg2 && !arg3) {
|
|
51
|
-
fn = arg;
|
|
52
|
-
} else if (!arg3) {
|
|
53
|
-
opts = arg;
|
|
54
|
-
fn = arg2;
|
|
55
|
-
} else {
|
|
56
|
-
opts = arg;
|
|
57
|
-
ctx = arg2;
|
|
58
|
-
fn = arg3;
|
|
59
|
-
}
|
|
60
|
-
opts = opts !== null && opts !== void 0 ? opts : {};
|
|
61
|
-
ctx = ctx !== null && ctx !== void 0 ? ctx : context.active();
|
|
62
|
-
return { opts, ctx, fn };
|
|
63
|
-
}
|
|
64
|
-
function handleFn(span, opts, fn) {
|
|
65
|
-
var _a;
|
|
66
|
-
var onException = (_a = opts.onException) !== null && _a !== void 0 ? _a : defaultOnException;
|
|
67
|
-
var errorHandler = function(e) {
|
|
68
|
-
onException(e, span);
|
|
69
|
-
span.end();
|
|
70
|
-
throw e;
|
|
71
|
-
};
|
|
72
|
-
try {
|
|
73
|
-
var ret = fn(span);
|
|
74
|
-
if (typeof (ret === null || ret === void 0 ? void 0 : ret.then) === "function") {
|
|
75
|
-
return ret.then(function(val) {
|
|
76
|
-
span.end();
|
|
77
|
-
return val;
|
|
78
|
-
}, errorHandler);
|
|
79
|
-
}
|
|
80
|
-
span.end();
|
|
81
|
-
return ret;
|
|
82
|
-
} catch (e) {
|
|
83
|
-
throw errorHandler(e);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export {
|
|
88
|
-
wrapTracer
|
|
89
|
-
};
|