added fonts
This commit is contained in:
1 parent
4134e3a234
commit
142d2986b6
9079 files changed
+1498421
-2
No files matched your search
+21
@@ -0,0 +1,21 @@
|
||||
import type { RouteHas } from '../../../lib/load-custom-routes';
|
||||
export type MiddlewareConfigInput = {
|
||||
/**
|
||||
* The matcher for the middleware.
|
||||
*/
|
||||
matcher?: string | Array<{
|
||||
locale?: false;
|
||||
has?: RouteHas[];
|
||||
missing?: RouteHas[];
|
||||
source: string;
|
||||
} | string>;
|
||||
/**
|
||||
* The regions that the middleware should run in.
|
||||
*/
|
||||
regions?: string | string[];
|
||||
/**
|
||||
* A glob, or an array of globs, ignoring dynamic code evaluation for specific
|
||||
* files. The globs are relative to your application root folder.
|
||||
*/
|
||||
unstable_allowDynamic?: string | string[];
|
||||
};
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
MiddlewareConfigInputSchema: null,
|
||||
MiddlewareConfigInputSchemaKeys: null,
|
||||
SourceSchema: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
MiddlewareConfigInputSchema: function() {
|
||||
return MiddlewareConfigInputSchema;
|
||||
},
|
||||
MiddlewareConfigInputSchemaKeys: function() {
|
||||
return MiddlewareConfigInputSchemaKeys;
|
||||
},
|
||||
SourceSchema: function() {
|
||||
return SourceSchema;
|
||||
}
|
||||
});
|
||||
const _picomatch = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/picomatch"));
|
||||
const _zod = require("next/dist/compiled/zod");
|
||||
const _trytoparsepath = require("../../../lib/try-to-parse-path");
|
||||
function _interop_require_default(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
const RouteHasSchema = _zod.z.discriminatedUnion('type', [
|
||||
_zod.z.object({
|
||||
type: _zod.z.enum([
|
||||
'header',
|
||||
'query',
|
||||
'cookie'
|
||||
]),
|
||||
key: _zod.z.string({
|
||||
required_error: 'key is required when type is header, query or cookie'
|
||||
}),
|
||||
value: _zod.z.string({
|
||||
invalid_type_error: 'value must be a string'
|
||||
}).optional()
|
||||
}).strict(),
|
||||
_zod.z.object({
|
||||
type: _zod.z.literal('host'),
|
||||
value: _zod.z.string({
|
||||
required_error: 'host must have a value'
|
||||
})
|
||||
}).strict()
|
||||
]);
|
||||
const SourceSchema = _zod.z.string({
|
||||
required_error: 'source is required'
|
||||
}).max(4096, 'exceeds max built length of 4096 for route').superRefine((val, ctx)=>{
|
||||
if (!val.startsWith('/')) {
|
||||
return ctx.addIssue({
|
||||
code: _zod.z.ZodIssueCode.custom,
|
||||
message: `source must start with /`
|
||||
});
|
||||
}
|
||||
const { error, regexStr } = (0, _trytoparsepath.tryToParsePath)(val);
|
||||
if (error || !regexStr) {
|
||||
ctx.addIssue({
|
||||
code: _zod.z.ZodIssueCode.custom,
|
||||
message: `Invalid source '${val}': ${error.message}`
|
||||
});
|
||||
}
|
||||
});
|
||||
const MiddlewareMatcherInputSchema = _zod.z.object({
|
||||
locale: _zod.z.union([
|
||||
_zod.z.literal(false),
|
||||
_zod.z.undefined()
|
||||
]).optional(),
|
||||
has: _zod.z.array(RouteHasSchema).optional(),
|
||||
missing: _zod.z.array(RouteHasSchema).optional(),
|
||||
source: SourceSchema
|
||||
}).strict();
|
||||
const MiddlewareConfigMatcherInputSchema = _zod.z.union([
|
||||
SourceSchema,
|
||||
_zod.z.array(_zod.z.union([
|
||||
SourceSchema,
|
||||
MiddlewareMatcherInputSchema
|
||||
], {
|
||||
invalid_type_error: 'must be an array of strings or middleware matchers'
|
||||
}))
|
||||
]);
|
||||
const GlobSchema = _zod.z.string().superRefine((val, ctx)=>{
|
||||
try {
|
||||
(0, _picomatch.default)(val);
|
||||
} catch (err) {
|
||||
ctx.addIssue({
|
||||
code: _zod.z.ZodIssueCode.custom,
|
||||
message: `Invalid glob pattern '${val}': ${err.message}`
|
||||
});
|
||||
}
|
||||
});
|
||||
const MiddlewareConfigInputSchema = _zod.z.object({
|
||||
/**
|
||||
* The matcher for the middleware.
|
||||
*/ matcher: MiddlewareConfigMatcherInputSchema.optional(),
|
||||
/**
|
||||
* The regions that the middleware should run in.
|
||||
*/ regions: _zod.z.union([
|
||||
_zod.z.string(),
|
||||
_zod.z.array(_zod.z.string())
|
||||
]).optional(),
|
||||
/**
|
||||
* A glob, or an array of globs, ignoring dynamic code evaluation for specific
|
||||
* files. The globs are relative to your application root folder.
|
||||
*/ unstable_allowDynamic: _zod.z.union([
|
||||
GlobSchema,
|
||||
_zod.z.array(GlobSchema)
|
||||
]).optional()
|
||||
});
|
||||
const MiddlewareConfigInputSchemaKeys = MiddlewareConfigInputSchema.keyof().options;
|
||||
|
||||
//# sourceMappingURL=middleware-config.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/build/segment-config/middleware/middleware-config.ts"],"sourcesContent":["import picomatch from 'next/dist/compiled/picomatch'\nimport { z } from 'next/dist/compiled/zod'\nimport { tryToParsePath } from '../../../lib/try-to-parse-path'\nimport type { RouteHas } from '../../../lib/load-custom-routes'\n\nconst RouteHasSchema = z.discriminatedUnion('type', [\n z\n .object({\n type: z.enum(['header', 'query', 'cookie']),\n key: z.string({\n required_error: 'key is required when type is header, query or cookie',\n }),\n value: z\n .string({\n invalid_type_error: 'value must be a string',\n })\n .optional(),\n })\n .strict(),\n z\n .object({\n type: z.literal('host'),\n value: z.string({\n required_error: 'host must have a value',\n }),\n })\n .strict(),\n])\n\n/**\n * @internal - required to exclude zod types from the build\n */\nexport const SourceSchema = z\n .string({\n required_error: 'source is required',\n })\n .max(4096, 'exceeds max built length of 4096 for route')\n .superRefine((val, ctx) => {\n if (!val.startsWith('/')) {\n return ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `source must start with /`,\n })\n }\n\n const { error, regexStr } = tryToParsePath(val)\n\n if (error || !regexStr) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `Invalid source '${val}': ${error.message}`,\n })\n }\n })\n\nconst MiddlewareMatcherInputSchema = z\n .object({\n locale: z.union([z.literal(false), z.undefined()]).optional(),\n has: z.array(RouteHasSchema).optional(),\n missing: z.array(RouteHasSchema).optional(),\n source: SourceSchema,\n })\n .strict()\n\nconst MiddlewareConfigMatcherInputSchema = z.union([\n SourceSchema,\n z.array(\n z.union([SourceSchema, MiddlewareMatcherInputSchema], {\n invalid_type_error: 'must be an array of strings or middleware matchers',\n })\n ),\n])\n\n/**\n * @internal - required to exclude zod types from the build\n */\nexport type MiddlewareConfigMatcherInput = z.infer<\n typeof MiddlewareConfigMatcherInputSchema\n>\n\nconst GlobSchema = z.string().superRefine((val, ctx) => {\n try {\n picomatch(val)\n } catch (err: any) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `Invalid glob pattern '${val}': ${err.message}`,\n })\n }\n})\n\n/**\n * @internal - required to exclude zod types from the build\n */\nexport const MiddlewareConfigInputSchema = z.object({\n /**\n * The matcher for the middleware.\n */\n matcher: MiddlewareConfigMatcherInputSchema.optional(),\n\n /**\n * The regions that the middleware should run in.\n */\n regions: z.union([z.string(), z.array(z.string())]).optional(),\n\n /**\n * A glob, or an array of globs, ignoring dynamic code evaluation for specific\n * files. The globs are relative to your application root folder.\n */\n unstable_allowDynamic: z.union([GlobSchema, z.array(GlobSchema)]).optional(),\n})\n\nexport type MiddlewareConfigInput = {\n /**\n * The matcher for the middleware.\n */\n matcher?:\n | string\n | Array<\n | {\n locale?: false\n has?: RouteHas[]\n missing?: RouteHas[]\n source: string\n }\n | string\n >\n\n /**\n * The regions that the middleware should run in.\n */\n regions?: string | string[]\n\n /**\n * A glob, or an array of globs, ignoring dynamic code evaluation for specific\n * files. The globs are relative to your application root folder.\n */\n unstable_allowDynamic?: string | string[]\n}\n\n/**\n * The keys of the configuration for a middleware.\n *\n * @internal - required to exclude zod types from the build\n */\nexport const MiddlewareConfigInputSchemaKeys =\n MiddlewareConfigInputSchema.keyof().options\n"],"names":["MiddlewareConfigInputSchema","MiddlewareConfigInputSchemaKeys","SourceSchema","RouteHasSchema","z","discriminatedUnion","object","type","enum","key","string","required_error","value","invalid_type_error","optional","strict","literal","max","superRefine","val","ctx","startsWith","addIssue","code","ZodIssueCode","custom","message","error","regexStr","tryToParsePath","MiddlewareMatcherInputSchema","locale","union","undefined","has","array","missing","source","MiddlewareConfigMatcherInputSchema","GlobSchema","picomatch","err","matcher","regions","unstable_allowDynamic","keyof","options"],"mappings":";;;;;;;;;;;;;;;;IA8FaA,2BAA2B;eAA3BA;;IAmDAC,+BAA+B;eAA/BA;;IAjHAC,YAAY;eAAZA;;;kEAhCS;qBACJ;gCACa;;;;;;AAG/B,MAAMC,iBAAiBC,MAAC,CAACC,kBAAkB,CAAC,QAAQ;IAClDD,MAAC,CACEE,MAAM,CAAC;QACNC,MAAMH,MAAC,CAACI,IAAI,CAAC;YAAC;YAAU;YAAS;SAAS;QAC1CC,KAAKL,MAAC,CAACM,MAAM,CAAC;YACZC,gBAAgB;QAClB;QACAC,OAAOR,MAAC,CACLM,MAAM,CAAC;YACNG,oBAAoB;QACtB,GACCC,QAAQ;IACb,GACCC,MAAM;IACTX,MAAC,CACEE,MAAM,CAAC;QACNC,MAAMH,MAAC,CAACY,Line truncated
|
||||
Reference in new issue
Block a user