docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped

This commit is contained in:
TanTan committed 2026-11-13 09:27:07 +08:00
1 parent fa9c73363d
commit 2a69b23b47
18210 files changed
+5101211 -16

No files matched your search

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_3H","2":"_I _QQ","257":"S _tD"},C:{"1":"_kR","2":"_KP"},D:{"1":"_2H","2":"_7 _3D H","257":"S _tD"},E:{"1":"_bE","2":"_KI"},F:{"1":"_TL _0K","2":"_4B _JF _O","257":"_3K _DG VC"},G:{"1":"_TD","132":"_rJ"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_rF","2":"_ZH","257":"_jP"},Q:{"2":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:4,C:"CSS3 image-orientation",D:true};
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/observe-element-rect.ts"],
"sourcesContent": ["type Measurable = { getBoundingClientRect(): DOMRect };\n\n/**\n * Observes an element's rectangle on screen (getBoundingClientRect)\n * This is useful to track elements on the screen and attach other elements\n * that might be in different layers, etc.\n */\nfunction observeElementRect(\n /** The element whose rect to observe */\n elementToObserve: Measurable,\n /** The callback which will be called when the rect changes */\n callback: CallbackFn\n) {\n const observedData = observedElements.get(elementToObserve);\n\n if (observedData === undefined) {\n // add the element to the map of observed elements with its first callback\n // because this is the first time this element is observed\n observedElements.set(elementToObserve, { rect: {} as DOMRect, callbacks: [callback] });\n\n if (observedElements.size === 1) {\n // start the internal loop once at least 1 element is observed\n rafId = requestAnimationFrame(runLoop);\n }\n } else {\n // only add a callback for this element as it's already observed\n observedData.callbacks.push(callback);\n callback(elementToObserve.getBoundingClientRect());\n }\n\n return () => {\n const observedData = observedElements.get(elementToObserve);\n if (observedData === undefined) return;\n\n // start by removing the callback\n const index = observedData.callbacks.indexOf(callback);\n if (index > -1) {\n observedData.callbacks.splice(index, 1);\n }\n\n if (observedData.callbacks.length === 0) {\n // stop observing this element because there are no\n // callbacks registered for it anymore\n observedElements.delete(elementToObserve);\n\n if (observedElements.size === 0) {\n // stop the internal loop once no elements are observed anymore\n cancelAnimationFrame(rafId);\n }\n }\n };\n}\n\n// ========================================================================\n// module internals\n\ntype CallbackFn = (rect: DOMRect) => void;\n\ntype ObservedData = {\n rect: DOMRect;\n callbacks: Array<CallbackFn>;\n};\n\nlet rafId: number;\nconst observedElements: Map<Measurable, ObservedData> = new Map();\n\nfunction runLoop() {\n const changedRectsData: Array<ObservedData> = [];\n\n // process all DOM reads first (getBoundingClientRect)\n observedElements.forEach((data, element) => {\n const newRect = element.getBoundingClientRect();\n\n // gather all the data for elements whose rects have changed\n if (!rectEquals(data.rect, newRect)) {\n data.rect = newRect;\n changedRectsData.push(data);\n }\n });\n\n // group DOM writes here after the DOM reads (getBoundingClientRect)\n // as DOM writes will most likely happen with the callbacks\n changedRectsData.forEach((data) => {\n data.callbacks.forEach((callback) => callback(data.rect));\n });\n\n rafId = requestAnimationFrame(runLoop);\n}\n// ========================================================================\n\n/**\n * Returns whether 2 rects are equal in values\n */\nfunction rectEquals(rect1: DOMRect, rect2: DOMRect) {\n return (\n rect1.width === rect2.width &&\n rect1.height === rect2.height &&\n rect1.top === rect2.top &&\n rect1.right === rect2.right &&\n rect1.bottom === rect2.bottom &&\n rect1.left === rect2.left\n );\n}\n\nexport { observeElementRect };\nexport type { Measurable };\n"],
"mappings": ";AAOA,SAAS,mBAEP,kBAEA,UACA;AACA,QAAM,eAAe,iBAAiB,IAAI,gBAAgB;AAE1D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AAM,WAAW,MAAM,UACvB,MAAM,SAAS,MAAM;AAEzB;",
"names": ["observedData"]
}
@@ -0,0 +1,84 @@
import type * as z3 from 'zod/v3';
import type * as z4 from 'zod/v4/core';
export type AnySchema = z3.ZodTypeAny | z4.$ZodType;
export type AnyObjectSchema = z3.AnyZodObject | z4.$ZodObject | AnySchema;
export type ZodRawShapeCompat = Record<string, AnySchema>;
export interface ZodV3Internal {
_def?: {
typeName?: string;
value?: unknown;
values?: unknown[];
shape?: Record<string, AnySchema> | (() => Record<string, AnySchema>);
description?: string;
};
shape?: Record<string, AnySchema> | (() => Record<string, AnySchema>);
value?: unknown;
}
export interface ZodV4Internal {
_zod?: {
def?: {
type?: string;
value?: unknown;
values?: unknown[];
shape?: Record<string, AnySchema> | (() => Record<string, AnySchema>);
};
};
value?: unknown;
}
export type SchemaOutput<S> = S extends z3.ZodTypeAny ? z3.infer<S> : S extends z4.$ZodType ? z4.output<S> : never;
export type SchemaInput<S> = S extends z3.ZodTypeAny ? z3.input<S> : S extends z4.$ZodType ? z4.input<S> : never;
/**
* Infers the output type from a ZodRawShapeCompat (raw shape object).
* Maps over each key in the shape and infers the output type from each schema.
*/
export type ShapeOutput<Shape extends ZodRawShapeCompat> = {
[K in keyof Shape]: SchemaOutput<Shape[K]>;
};
export declare function isZ4Schema(s: AnySchema): s is z4.$ZodType;
export declare function objectFromShape(shape: ZodRawShapeCompat): AnyObjectSchema;
export declare function safeParse<S extends AnySchema>(schema: S, data: unknown): {
success: true;
data: SchemaOutput<S>;
} | {
success: false;
error: unknown;
};
export declare function safeParseAsync<S extends AnySchema>(schema: S, data: unknown): Promise<{
success: true;
data: SchemaOutput<S>;
} | {
success: false;
error: unknown;
}>;
export declare function getObjectShape(schema: AnyObjectSchema | undefined): Record<string, AnySchema> | undefined;
/**
* Normalizes a schema to an object schema. Handles both:
* - Already-constructed object schemas (v3 or v4)
* - Raw shapes that need to be wrapped into object schemas
*/
export declare function normalizeObjectSchema(schema: AnySchema | ZodRawShapeCompat | undefined): AnyObjectSchema | undefined;
/**
* Safely extracts an error message from a parse result error.
* Zod errors can have different structures, so we handle various cases.
*/
export declare function getParseErrorMessage(error: unknown): string;
/**
* Gets the description from a schema, if available.
* Works with both Zod v3 and v4.
*
* Both versions expose a `.description` getter that returns the description
* from their respective internal storage (v3: _def, v4: globalRegistry).
*/
export declare function getSchemaDescription(schema: AnySchema): string | undefined;
/**
* Checks if a schema is optional.
* Works with both Zod v3 and v4.
*/
export declare function isSchemaOptional(schema: AnySchema): boolean;
/**
* Gets the literal value from a schema, if it's a literal schema.
* Works with both Zod v3 and v4.
* Returns undefined if the schema is not a literal or the value cannot be determined.
*/
export declare function getLiteralValue(schema: AnySchema): unknown;
//# sourceMappingURL=zod-compat.d.ts.map
@@ -0,0 +1,423 @@
flf2a$ 4 4 10 63 13 0 24511 0
Author: Marcin `stforek` Glinski
Date: 2003/6/15 20:02:23
Version: 1.0
-------------------------------------------------
* 2003-06-15 Changed: CDPQRSY6%@
Added: $/=\|_{}
* 2003-06-09 Added: A-Z 0-9 !@%^&*()-+[]()`'":;~?<>
---------------------------------------------------
This font has been created using JavE's FIGlet font
export assistant. [http://www.jave.de]
$ #
$ #
$ #
$ ##
_ #
/ \ #
\_/ #
(_) ##
___ #
|// #
#
##
##
#
#
##
||_ #
/'__/ #
`._`. #
\_||/ ##
_ _ #
[// | #
/ / #
|_//] ##
__, #
(_ /_ #
/`X\/ |#
`\_/\| |##
_ #
`.\ #
#
##
_ #
/ | #
( ( #
\_| ##
_ #
| \ #
) ) #
|_/ ##
#
//\ #
`\//' #
##
_ #
_| |_ #
|_ _| #
|_| ##
#
#
_, #
[_/ ##
#
__ #
|__| #
##
#
#
__ #
\/ ##
_ #
/ | #
/ / #
|_/ ##
__ #
/ \ #
| // | #
\__/ ##
__ #
/ | #
`7 | #
|_| ##
___ #
(_ | #
/ / #
|___| ##
__ #
|__`. #
|_ | #
|__.' ##
_ _ #
| || | #
`._ _| #
|_| ##
___ #
| __| #
`._`. #
!__.' ##
___ #
/ __| #
| ,_ \ #
\___/ ##
___ #
|_ | #
/ / #
|_/ ##
___ #
/ _ \ #
) _ ( #
\___/ ##
___ #
/ _ \ #
\__ / #
/_/ ##
_ #
\| #
\| #
##
_ #
\| #
_] #
##
__ #
/ / #
< < #
`\_\ ##
____ #
)___/ #
/___( #
##
__ #
\ \ #
> > #
/_/ ##
____ #
\_ | #
/_( #
(_) ##
_ #
/.-.\ #
( \_(l_,#
`---'` ##
__ #
/ \ #
| /\ | #
|_||_| ##
__ #
| \ #
| -< #
|__/ ##
___ #
/ _/ #
| \__ #
\__/ ##
__ #
| _\ #
| v | #
|__/ ##
___ #
| __| #
| _| #
|___| ##
___ #
| __| #
| _| #
|_| ##
__ #
/ _] #
| [/\ #
\__/ ##
_ _ #
| || | #
| >< | #
|_||_| ##
_ #
| | #
| | #
|_| ##
__ #
|_ \ #
_\ | #
/___| ##
_ __ #
| |/ / #
| < #
|_|\_\ ##
_ #
| | #
| |_ #
|___| ##
__ __ #
| V | #
| \_/ | #
|_| |_| ##
__ _ #
| \| | #
| | ' | #
|_|\__| ##
__ #
/__\ #
| \/ | #
\__/ ##
___ #
| _,\ #
| v_/ #
|_| ##
__ #
/__\ #
| \/ | #
\_V_\ ##
___ #
| _ \ #
| v / #
|_|_\ ##
__ #
/' _/ #
`._`. #
|___/ ##
_____ #
|_ _| #
| | #
|_| ##
_ _ #
| || | #
| \/ | #
\__/ ##
_ _ #
| \ / | #
`\ V /' #
\_/ ##
_ _ #
| | | | #
| 'V' | #
!_/ \_! ##
__ __ #
\ \_/ / #
> , < #
/_/ \_\ ##
__ __#
\ `v' /#
`. .' #
!_! ##
___ #
|_ | #
/ / #
|___| ##
___ #
| __| #
| |_ #
|___| ##
_ #
| \ #
\ \ #
\_| ##
___ #
|_ | #
_| | #
|___| ##
/\ #
|/\| #
#
##
#
#
____ #
|____| ##
`#
#
#
##
__ #
/ \ #
| /\ | #
|_||_| ##
__ #
| \ #
| -< #
|__/ ##
___ #
/ _/ #
| \__ #
\__/ ##
__ #
| _\ #
| v | #
|__/ ##
___ #
| __| #
| _| #
|___| ##
___ #
| __| #
| _| #
|_| ##
__ #
/ _] #
| [/\ #
\__/ ##
_ _ #
| || | #
| >< | #
|_||_| ##
_ #
| | #
| | #
|_| ##
__ #
|_ \ #
_\ | #
/___| ##
_ __ #
| |/ / #
| < #
|_|\_\ ##
_ #
| | #
| |_ #
|___| ##
__ __ #
| V | #
| \_/ | #
|_| |_| ##
__ _ #
| \| | #
| | ' | #
|_|\__| ##
__ #
/__\ #
| \/ | #
\__/ ##
___ #
| _,\ #
| v_/ #
|_| ##
__ #
/__\ #
| \/ | #
\_V_\ ##
___ #
| _ \ #
| v / #
|_|_\ ##
__ #
/' _/ #
`._`. #
|___/ ##
_____ #
|_ _| #
| | #
|_| ##
_ _ #
| || | #
| \/ | #
\__/ ##
_ _ #
| \ / | #
`\ V /' #
\_/ ##
_ _ #
| | | | #
| 'V' | #
!_/ \_! ##
__ __ #
\ \_/ / #
> , < #
/_/ \_\ ##
__ __#
\ `v' /#
`. .' #
!_! ##
___ #
|_ | #
/ / #
|___| ##
_ #
/ | #
{ { #
\_| ##
_ #
| | #
| | #
|_| ##
_ #
| \ #
} } #
|_/ ##
_ #
./ \_/| #
|/`\_/ #
##
__ #
/ \ #
| /\ | #
|_||_| ##
__ #
/__\ #
| \/ | #
\__/ ##
_ _ #
| || | #
| \/ | #
\__/ ##
__ #
/ \ #
| /\ | #
|_||_| ##
__ #
/__\ #
| \/ | #
\__/ ##
_ _ #
| || | #
| \/ | #
\__/ ##
ß#
#
#
##
@@ -0,0 +1 @@
module.exports={C:{"100":0.0099,"115":0.02969,"120":0.03959,"121":0.08908,"126":0.0099,"140":0.14352,"154":1.27684,"155":3.54348,"156":1.19766,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 122 123 124 125 127 128 129 130 131 132 133 134 135 136 137 138 139 141 142 143 144 145 146 147 148 149 150 151 152 153 157 158 159 160 3.5 3.6"},D:{"78":0.04949,"87":0.13857,"91":0.02969,"103":0.53449,"104":0.0198,"105":0.10888,"106":0.0099,"109":0.04949,"111":0.02969,"112":0.0099,"116":0.0198,"118":0.20291,"119":0.06929,"120":0.15342,"122":0.0099,"124":0.0198,"128":0.0198,"131":0.0099,"132":0.0099,"133":0.02969,"134":0.05939,"135":0.03959,"136":0.02969,"137":0.07918,"138":0.13857,"139":0.06929,"140":0.03959,"141":0.09898,"142":0.17322,"143":0.12867,"144":0.02969,"146":0.07918,"147":0.03959,"148":0.0198,"149":0.18311,"150":0.86608,"151":4.01859,"152":13.89679,"153":5.27563,"154":0.65327,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 83 84 85 86 88 89 90 92 93 94 95 96 97 98 99 100 101 102 107 108 110 113 114 115 117 121 123 125 126 127 129 130 145 155 156 157"},F:{"134":0.0198,"135":0.41077,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 131 132 133 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"15":0.0099,"16":0.0099,"17":0.05939,"84":0.0099,"119":0.05939,"120":0.04949,"123":0.0099,"136":0.0099,"138":0.03959,"140":0.0198,"141":0.0099,"143":0.0099,"145":0.03959,"147":0.04949,"148":0.03959,"149":0.06929,"150":0.17322,"151":0.45531,"152":3.58308,"153":4.21655,"154":0.97495,_:"12 13 14 18 79 80 81 83 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 121 122 124 125 126 127 128 129 130 131 132 133 134 135 137 139 142 144 146"},E:{"27":0.06929,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 12.1 13.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.5 17.0 17.2 17.3 17.5 18.0 18.3 18.4 26.0 26.1 26.4 27.1 27.2 TP","11.1":0.05939,"15.6":0.33158,"16.4":0.0198,"16.6":0.05939,"17.1":0.07918,"17.4":0.0198,"17.6":0.18311,"18.1":0.02969,"18.2":0.0099,"18.5-18.7":0.02969,"26.2":0.0198,"26.3":0.04949,"26.5":0.05939,"26.6":1.13827},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00085,"5.0-5.1":0.00085,"6.0-6.1":0,"7.0-7.1":0.00171,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00854,"11.0-11.2":0.00085,"11.3-11.4":0.00171,"12.0-12.1":0,"12.2-12.5":0.02219,"13.0-13.1":0,"13.2":0.00427,"13.3":0,"13.4-13.7":0.00085,"14.0-14.4":0.00341,"14.5-14.8":0.00512,"15.0-15.1":0.00512,"15.2-15.3":0.00341,"15.4":0.00427,"15.5":0.00512,"15.6-15.8":0.11097,"16.0":0.00854,"16.1":0.01537,"16.2":0.00854,"16.3":0.01878,"16.4":0.00427,"16.5":0.00683,"16.6-16.7":0.15451,"17.0":0.00598,"17.1":0.00854,"17.2":0.00854,"17.3":0.0128,"17.4":0.01793,"17.5":0.035,"17.6-17.7":0.09048,"18.0":0.01878,"18.1":0.03756,"18.2":0.05122,"18.3":0.08878,"18.4":0.05549,"18.5-18.7":1.14641,"26.0":0.05549,"26.1":0.05634,"26.2":0.14682,"26.3":0.15877,"26.4":0.11609,"26.5":0.77765,"26.6":4.79819,"27.0":0.36791,"27.1":0,"27.2":0.00939},P:{"21":0.03416,"27":0.00488,"28":0.00976,"29":0.02928,"30":0.93212,_:"4 20 22 23 24 25 26 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0"},I:{"0":0.02019,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":1.38903,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":40.82368},R:{_:"0"},M:{"0":0.18184},Q:{_:"14.9"},O:{"0":0.0101},H:{all:0}};
@@ -0,0 +1 @@
{"version":3,"file":"battery-medium.js","sources":["../../../src/icons/battery-medium.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BatteryMedium\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iMTAiIHg9IjIiIHk9IjciIHJ4PSIyIiByeT0iMiIgLz4KICA8bGluZSB4MT0iMjIiIHgyPSIyMiIgeTE9IjExIiB5Mj0iMTMiIC8+CiAgPGxpbmUgeDE9IjYiIHgyPSI2IiB5MT0iMTEiIHkyPSIxMyIgLz4KICA8bGluZSB4MT0iMTAiIHgyPSIxMCIgeTE9IjExIiB5Mj0iMTMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/battery-medium\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst BatteryMedium = createLucideIcon('BatteryMedium', [\n ['rect', { width: '16', height: '10', x: '2', y: '7', rx: '2', ry: '2', key: '1w10f2' }],\n ['line', { x1: '22', x2: '22', y1: '11', y2: '13', key: '4dh1rd' }],\n ['line', { x1: '6', x2: '6', y1: '11', y2: '13', key: '1wd6dw' }],\n ['line', { x1: '10', x2: '10', y1: '11', y2: '13', key: 'haxvl5' }],\n]);\n\nexport default BatteryMedium;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB,iBAAiB,eAAiB,CAAA,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA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CAAA,CAAK,UAAU,CAAA;AACpE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
const e=globalThis.process?.env||Object.create(null),t=globalThis.process||{env:e},n=t!==void 0&&t.env&&t.env.NODE_ENV||void 0,r=[[`claude`,[`CLAUDECODE`,`CLAUDE_CODE`]],[`replit`,[`REPL_ID`]],[`gemini`,[`GEMINI_CLI`]],[`codex`,[`CODEX_SANDBOX`,`CODEX_THREAD_ID`]],[`opencode`,[`OPENCODE`]],[`pi`,[i(`PATH`,/\.pi[\\/]agent/)]],[`auggie`,[`AUGMENT_AGENT`]],[`goose`,[`GOOSE_PROVIDER`]],[`devin`,[i(`EDITOR`,/devin/)]],[`cursor`,[`CURSOR_AGENT`]],[`kiro`,[i(`TERM_PROGRAM`,/kiro/)]]];function i(t,n){return()=>{let r=e[t];return r?n.test(r):!1}}function a(){let t=e.AI_AGENT;if(t)return{name:t.toLowerCase()};for(let[t,n]of r)for(let r of n)if(typeof r==`string`?e[r]:r())return{name:t};return{}}const o=a(),s=o.name,c=!!o.name,l=[[`APPVEYOR`],[`AWS_AMPLIFY`,`AWS_APP_ID`,{ci:!0}],[`AZURE_PIPELINES`,`SYSTEM_TEAMFOUNDATIONCOLLECTIONURI`],[`AZURE_STATIC`,`INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN`],[`APPCIRCLE`,`AC_APPCIRCLE`],[`BAMBOO`,`bamboo_planKey`],[`BITBUCKET`,`BITBUCKET_COMMIT`],[`BITRISE`,`BITRISE_IO`],[`BUDDY`,`BUDDY_WORKSPACE_ID`],[`BUILDKITE`],[`CIRCLE`,`CIRCLECI`],[`CIRRUS`,`CIRRUS_CI`],[`CLOUDFLARE_PAGES`,`CF_PAGES`,{ci:!0}],[`CLOUDFLARE_WORKERS`,`WORKERS_CI`,{ci:!0}],[`GOOGLE_CLOUDRUN`,`K_SERVICE`],[`GOOGLE_CLOUDRUN_JOB`,`CLOUD_RUN_JOB`],[`CODEBUILD`,`CODEBUILD_BUILD_ARN`],[`CODEFRESH`,`CF_BUILD_ID`],[`DRONE`],[`DRONE`,`DRONE_BUILD_EVENT`],[`DSARI`],[`GITHUB_ACTIONS`],[`GITLAB`,`GITLAB_CI`],[`GITLAB`,`CI_MERGE_REQUEST_ID`],[`GOCD`,`GO_PIPELINE_LABEL`],[`LAYERCI`],[`JENKINS`,`JENKINS_URL`],[`HUDSON`,`HUDSON_URL`],[`MAGNUM`],[`NETLIFY`],[`NETLIFY`,`NETLIFY_LOCAL`,{ci:!1}],[`NEVERCODE`],[`RENDER`],[`SAIL`,`SAILCI`],[`SEMAPHORE`],[`SCREWDRIVER`],[`SHIPPABLE`],[`SOLANO`,`TDDIUM`],[`STRIDER`],[`TEAMCITY`,`TEAMCITY_VERSION`],[`TRAVIS`],[`VERCEL`,`NOW_BUILDER`],[`VERCEL`,`VERCEL`,{ci:!1}],[`VERCEL`,`VERCEL_ENV`,{ci:!1}],[`APPCENTER`,`APPCENTER_BUILD_ID`],[`CODESANDBOX`,`CODESANDBOX_SSE`,{ci:!1}],[`CODESANDBOX`,`CODESANDBOX_HOST`,{ci:!1}],[`STACKBLITZ`],[`STORMKIT`],[`CLEAVR`],[`ZEABUR`],[`CODESPHERE`,`CODESPHERE_APP_ID`,{ci:!0}],[`RAILWAY`,`RAILWAY_PROJECT_ID`],[`RAILWAY`,`RAILWAY_SERVICE_ID`],[`DENO-DEPLOY`,`DENO_DEPLOY`],[`DENO-DEPLOY`,`DENO_DEPLOYMENT_ID`],[`FIREBASE_APP_HOSTING`,`FIREBASE_APP_HOSTING`,{ci:!0}],[`EDGEONE_PAGES`,`EO_PAGES_CI`,{ci:!0}]];function u(){for(let t of l)if(e[t[1]||t[0]])return{name:t[0].toLowerCase(),...t[2]};return e.SHELL===`/bin/jsh`&&t.versions?.webcontainer?{name:`stackblitz`,ci:!1}:{name:``,ci:!1}}const d=u(),f=d.name,p=t.platform||``,m=!!e.CI||d.ci!==!1,h=!!t.stdout?.isTTY,g=typeof window<`u`,_=!!e.DEBUG,v=n===`test`||!!e.TEST,y=n===`production`||e.MODE===`production`,b=n===`dev`||n===`development`||e.MODE===`development`,x=!!e.MINIMAL||m||v||!h,S=/^win/i.test(p),C=/^linux/i.test(p),w=/^darwin/i.test(p),T=!e.NO_COLOR&&(!!e.FORCE_COLOR||(h||S)&&e.TERM!==`dumb`||m),E=(t.versions?.node||``).replace(/^v/,``)||null,D=Number(E?.split(`.`)[0])||null,O=!!t?.versions?.node,k=`Bun`in globalThis,A=`Deno`in globalThis,j=`fastly`in globalThis,M=`Netlify`in globalThis,N=`EdgeRuntime`in globalThis,P=globalThis.navigator?.userAgent===`Cloudflare-Workers`,F=[[M,`netlify`],[N,`edge-light`],[P,`workerd`],[j,`fastly`],[A,`deno`],[k,`bun`],[O,`node`]];function I(){let e=F.find(e=>e[0]);if(e)return{name:e[1]}}const L=I(),R=L?.name||``;export{s as agent,o as agentInfo,a as detectAgent,u as detectProvider,e as env,h as hasTTY,g as hasWindow,c as isAgent,k as isBun,m as isCI,T as isColorSupported,_ as isDebug,A as isDeno,b as isDevelopment,N as isEdgeLight,j as isFastly,C as isLinux,w as isMacOS,x as isMinimal,M as isNetlify,O as isNode,y as isProduction,v as isTest,S as isWindows,P as isWorkerd,n as nodeENV,D as nodeMajorVersion,E as nodeVersion,p as platform,t as process,f as provider,d as providerInfo,R as runtime,L as runtimeInfo};
@@ -0,0 +1,92 @@
{
"name": "eventsource-parser",
"version": "3.1.0",
"description": "Streaming, source-agnostic EventSource/Server-Sent Events parser",
"keywords": [
"eventsource",
"server-sent-events",
"sse"
],
"homepage": "https://github.com/rexxars/eventsource-parser#readme",
"bugs": {
"url": "https://github.com/rexxars/eventsource-parser/issues"
},
"license": "MIT",
"author": "Espen Hovlandsdal <espen@hovlandsdal.com>",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/rexxars/eventsource-parser.git"
},
"files": [
"dist",
"!dist/stats.html",
"!dist/index.min.js",
"src",
"stream.js"
],
"type": "module",
"sideEffects": false,
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"source": "./src/index.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs",
"default": "./dist/index.js"
},
"./stream": {
"source": "./src/stream.ts",
"import": "./dist/stream.js",
"require": "./dist/stream.cjs",
"default": "./dist/stream.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "pkg-utils build && pkg-utils --strict",
"clean": "rimraf dist coverage",
"check": "npm run clean && npm run format && npm run lint && npm run build && vitest run",
"format": "oxfmt",
"format:check": "oxfmt --check",
"bench": "node --expose-gc --experimental-strip-types --no-warnings=ExperimentalWarning bench/parse.bench.ts",
"bundle-size": "node --experimental-strip-types --no-warnings=ExperimentalWarning scripts/bundle-size.ts",
"knip": "knip",
"lint": "oxlint && tsc --noEmit",
"posttest": "npm run lint",
"prebuild": "npm run clean",
"prepublishOnly": "npm run build",
"test": "npm run test:node",
"test:bun": "bun test",
"test:deno": "deno run --allow-write --allow-net --allow-run --allow-sys --allow-ffi --allow-env --allow-read npm:vitest",
"test:node": "vitest --reporter=verbose"
},
"devDependencies": {
"@sanity/pkg-utils": "^10.4.18",
"@sanity/semantic-release-preset": "^6.0.0",
"@sanity/tsconfig": "^2.1.0",
"@types/node": "^20.19.0",
"eventsource-encoder": "^1.0.2",
"knip": "^6.7.0",
"mitata": "^1.0.34",
"oxfmt": "^0.47.0",
"oxlint": "^1.62.0",
"rimraf": "^6.1.3",
"rollup-plugin-visualizer": "^6.0.3",
"semantic-release": "^25.0.3",
"terser": "^5.46.2",
"typescript": "^5.9.3",
"vitest": "^4.1.5"
},
"browserslist": [
"node >= 18",
"chrome >= 71",
"safari >= 14.1",
"firefox >= 105",
"edge >= 79"
],
"engines": {
"node": ">=18.0.0"
}
}
@@ -0,0 +1,31 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_middleware_serve_static_index = require("../../middleware/serve-static/index.js");
let node_fs_promises = require("node:fs/promises");
let node_path = require("node:path");
//#region src/adapter/bun/serve-static.ts
/**
* @deprecated `hono/bun` will be removed in v5. Install `@hono/bun` and import from there instead.
*/
const serveStatic = (options = {}) => {
return async function serveStatic(c, next) {
const getContent = async (path) => {
const file = Bun.file(path);
return await file.exists() ? file : null;
};
const isDir = async (path) => {
let isDir;
try {
isDir = (await (0, node_fs_promises.stat)(path)).isDirectory();
} catch {}
return isDir;
};
return require_middleware_serve_static_index.serveStatic({
...options,
getContent,
join: node_path.join,
isDir
})(c, next);
};
};
//#endregion
exports.serveStatic = serveStatic;
@@ -0,0 +1,39 @@
import utils from '../../../../scoring/utils.mjs';
import { ALPHA_INVERTED, ALL_LOWER_INVERTED, START_UPPER, END_UPPER, ALL_UPPER_INVERTED, ONE_UPPER, ONE_LOWER } from '../../../../data/const.mjs';
const getVariations = cleanedWord => {
const wordArray = cleanedWord.split('');
const upperCaseCount = wordArray.filter(char => char.match(ONE_UPPER)).length;
const lowerCaseCount = wordArray.filter(char => char.match(ONE_LOWER)).length;
let variations = 0;
const variationLength = Math.min(upperCaseCount, lowerCaseCount);
for (let i = 1; i <= variationLength; i += 1) {
variations += utils.nCk(upperCaseCount + lowerCaseCount, i);
}
return variations;
};
var uppercaseVariant = word => {
// clean words of non alpha characters to remove the reward effekt to capitalize the first letter https://github.com/dropbox/zxcvbn/issues/232
const cleanedWord = word.replace(ALPHA_INVERTED, '');
if (cleanedWord.match(ALL_LOWER_INVERTED) || cleanedWord.toLowerCase() === cleanedWord) {
return 1;
}
// a capitalized word is the most common capitalization scheme,
// so it only doubles the search space (uncapitalized + capitalized).
// all caps and end-capitalized are common enough too, underestimate as 2x factor to be safe.
const commonCases = [START_UPPER, END_UPPER, ALL_UPPER_INVERTED];
const commonCasesLength = commonCases.length;
for (let i = 0; i < commonCasesLength; i += 1) {
const regex = commonCases[i];
if (cleanedWord.match(regex)) {
return 2;
}
}
// otherwise calculate the number of ways to capitalize U+L uppercase+lowercase letters
// with U uppercase letters or less. or, if there's more uppercase than lower (for eg. PASSwORD),
// the number of ways to lowercase U+L letters with L lowercase letters or less.
return getVariations(cleanedWord);
};
export { uppercaseVariant as default };
//# sourceMappingURL=uppercase.mjs.map
@@ -0,0 +1 @@
"use strict";const json5=require("./json5.cjs"),jsonc=require("./shared/confbox.6b479c78.cjs"),yaml=require("./yaml.cjs"),toml=require("./toml.cjs");require("./shared/confbox.3768c7e9.cjs"),exports.parseJSON5=json5.parseJSON5,exports.stringifyJSON5=json5.stringifyJSON5,exports.parseJSON=jsonc.parseJSON,exports.parseJSONC=jsonc.parseJSONC,exports.stringifyJSON=jsonc.stringifyJSON,exports.stringifyJSONC=jsonc.stringifyJSONC,exports.parseYAML=yaml.parseYAML,exports.stringifyYAML=yaml.stringifyYAML,exports.parseTOML=toml.parseTOML,exports.stringifyTOML=toml.stringifyTOML;
@@ -0,0 +1,31 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Dog = createLucideIcon("Dog", [
["path", { d: "M11.25 16.25h1.5L12 17z", key: "w7jh35" }],
["path", { d: "M16 14v.5", key: "1lajdz" }],
[
"path",
{
d: "M4.42 11.247A13.152 13.152 0 0 0 4 14.556C4 18.728 7.582 21 12 21s8-2.272 8-6.444a11.702 11.702 0 0 0-.493-3.309",
key: "u7s9ue"
}
],
["path", { d: "M8 14v.5", key: "1nzgdb" }],
[
"path",
{
d: "M8.5 8.5c-.384 1.05-1.083 2.028-2.344 2.5-1.931.722-3.576-.297-3.656-1-.113-.994 1.177-6.53 4-7 1.923-.321 3.651.845 3.651 2.235A7.497 7.497 0 0 1 14 5.277c0-1.39 1.844-2.598 3.767-2.277 2.823.47 4.113 6.006 4 7-.08.703-1.725 1.722-3.656 1-1.261-.472-1.855-1.45-2.239-2.5",
key: "v8hric"
}
]
]);
export { Dog as default };
//# sourceMappingURL=dog.js.map
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const GitCommitHorizontal = createLucideIcon("GitCommitHorizontal", [
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }],
["line", { x1: "3", x2: "9", y1: "12", y2: "12", key: "1dyftd" }],
["line", { x1: "15", x2: "21", y1: "12", y2: "12", key: "oup4p8" }]
]);
export { GitCommitHorizontal as default };
//# sourceMappingURL=git-commit-horizontal.js.map
@@ -0,0 +1,56 @@
// Side-effect-only: installs the post-processor on `globalConfig`. Listed in `package.json`'s `sideEffects`, and nothing else references it, so apps that never import it drop the compiler.
//
// Usage:
//
// import "zod/compile";
// import * as z from "zod";
// // every schema constructed below this is compiled on first parse
//
// Module evaluation order matters: schemas constructed in modules that evaluate before this import will not be compiled. Place this import in the app entry point, before any module that constructs schemas at top level.
//
// Failure handling: if the compiler refuses a schema (async refinement, unsupported feature, etc.) the shim permanently restores the runtime `_zod.run` for that schema. The schema continues to work via the regular runtime parser — no observable difference to the caller.
import { compile } from "./v4/core/compile.js";
import * as core from "./v4/core/index.js";
let compiling = false;
core.globalConfig.postProcessor = (inst: any) => {
if (compiling) return;
const originalRun = inst._zod?.run;
if (typeof originalRun !== "function") return;
const shim = (payload: any, ctx: any): any => {
// Bypass the fast path for any non-forward / non-sync / check-skipping call. The runtime owns those contracts.
if (ctx?.async || ctx?.direction === "backward" || ctx?.skipChecks) {
return originalRun(payload, ctx);
}
compiling = true;
try {
// Respect the jitless config: it exists precisely so CSP/no-eval environments never reach `new Function`. Global mode must not bypass it (explicit z.compile calls remain an explicit opt-in).
if (core.globalConfig.jitless) {
inst._zod.run = originalRun;
return originalRun(payload, ctx);
}
// Strict: the shim owns its own fallback below, and a non-strict compile would hand back `inst` — whose run is this shim — and reinstall it on itself.
const compiled = compile(inst, { strict: true });
// Only the run wrapper. Copying the compiled parse/safeParse closures would make their fallback re-enter this instance and run user callbacks a third time.
inst._zod.run = compiled._zod.run;
inst._zod.bag.fallbackRun = compiled._zod.bag.fallbackRun;
inst._zod.bag.validator = compiled._zod.bag.validator;
} catch {
// Permanent fallback for unsupported schemas.
inst._zod.run = originalRun;
} finally {
compiling = false;
}
return inst._zod.run(payload, ctx);
};
// Expose the pre-shim runtime so `compile()` invoked elsewhere can unwrap past the shim and capture the source-of-truth runtime. Without this, a user calling `z.compile(s)` after global mode is enabled would capture the shim itself, which would feed the wrapper into itself on fallback.
(shim as any).__originalRun = originalRun;
inst._zod.run = shim;
};
@@ -0,0 +1,27 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _getIdentifierNames = require('./util/getIdentifierNames'); var _getIdentifierNames2 = _interopRequireDefault(_getIdentifierNames);
class NameManager {
__init() {this.usedNames = new Set()}
constructor(code, tokens) {;NameManager.prototype.__init.call(this);
this.usedNames = new Set(_getIdentifierNames2.default.call(void 0, code, tokens));
}
claimFreeName(name) {
const newName = this.findFreeName(name);
this.usedNames.add(newName);
return newName;
}
findFreeName(name) {
if (!this.usedNames.has(name)) {
return name;
}
let suffixNum = 2;
while (this.usedNames.has(name + String(suffixNum))) {
suffixNum++;
}
return name + String(suffixNum);
}
} exports.default = NameManager;
@@ -0,0 +1,57 @@
import type { SerovalNode } from 'seroval';
import { createPlugin } from 'seroval';
type DOMExceptionNode = {
name: SerovalNode;
message: SerovalNode;
};
const DOMExceptionPlugin = /* @__PURE__ */ createPlugin<
DOMException,
DOMExceptionNode
>({
tag: 'seroval-plugins/web/DOMException',
test(value) {
if (typeof DOMException === 'undefined') {
return false;
}
return value instanceof DOMException;
},
parse: {
sync(value, ctx) {
return {
name: ctx.parse(value.name),
message: ctx.parse(value.message),
};
},
async async(value, ctx) {
return {
name: await ctx.parse(value.name),
message: await ctx.parse(value.message),
};
},
stream(value, ctx) {
return {
name: ctx.parse(value.name),
message: ctx.parse(value.message),
};
},
},
serialize(node, ctx) {
return (
'new DOMException(' +
ctx.serialize(node.message) +
',' +
ctx.serialize(node.name) +
')'
);
},
deserialize(node, ctx) {
return new DOMException(
ctx.deserialize(node.message) as string,
ctx.deserialize(node.name) as string,
);
},
});
export default DOMExceptionPlugin;
@@ -0,0 +1 @@
{"version":3,"file":"ferris-wheel.js","sources":["../../../src/icons/ferris-wheel.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FerrisWheel\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIyIiAvPgogIDxwYXRoIGQ9Ik0xMiAydjQiIC8+CiAgPHBhdGggZD0ibTYuOCAxNS0zLjUgMiIgLz4KICA8cGF0aCBkPSJtMjAuNyA3LTMuNSAyIiAvPgogIDxwYXRoIGQ9Ik02LjggOSAzLjMgNyIgLz4KICA8cGF0aCBkPSJtMjAuNyAxNy0zLjUtMiIgLz4KICA8cGF0aCBkPSJtOSAyMiAzLTggMyA4IiAvPgogIDxwYXRoIGQ9Ik04IDIyaDgiIC8+CiAgPHBhdGggZD0iTTE4IDE4LjdhOSA5IDAgMSAwLTEyIDAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/ferris-wheel\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FerrisWheel = createLucideIcon('FerrisWheel', [\n ['circle', { cx: '12', cy: '12', r: '2', key: '1c9p78' }],\n ['path', { d: 'M12 2v4', key: '3427ic' }],\n ['path', { d: 'm6.8 15-3.5 2', key: 'hjy98k' }],\n ['path', { d: 'm20.7 7-3.5 2', key: 'f08gto' }],\n ['path', { d: 'M6.8 9 3.3 7', key: '1aevh4' }],\n ['path', { d: 'm20.7 17-3.5-2', key: '1liqo3' }],\n ['path', { d: 'm9 22 3-8 3 8', key: 'wees03' }],\n ['path', { d: 'M8 22h8', key: 'rmew8v' }],\n ['path', { d: 'M18 18.7a9 9 0 1 0-12 0', key: 'dhzg4g' }],\n]);\n\nexport default FerrisWheel;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAClD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,CAAA,CAAA,CAAA,CAA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A,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,15 @@
import { ReactRef, RefObject } from './types';
/**
* Create a _lense_ on Ref, making it possible to transform ref value
* @param {ReactRef} ref
* @param {Function} transformer. 👉 Ref would be __NOT updated__ on `transformer` update.
* @returns {RefObject}
*
* @see https://github.com/theKashey/use-callback-ref#usetransformref-to-replace-reactuseimperativehandle
* @example
*
* const ResizableWithRef = forwardRef((props, ref) =>
* <Resizable {...props} ref={useTransformRef(ref, i => i ? i.resizable : null)}/>
* );
*/
export declare function useTransformRef<T, K>(ref: ReactRef<K>, transformer: (original: T | null) => K): RefObject<T>;
@@ -0,0 +1,151 @@
# find-up [![Build Status](https://travis-ci.com/sindresorhus/find-up.svg?branch=master)](https://travis-ci.com/github/sindresorhus/find-up)
> Find a file or directory by walking up parent directories
## Install
```
$ npm install find-up
```
## Usage
```
/
└── Users
└── sindresorhus
├── unicorn.png
└── foo
└── bar
├── baz
└── example.js
```
`example.js`
```js
const path = require('path');
const findUp = require('find-up');
(async () => {
console.log(await findUp('unicorn.png'));
//=> '/Users/sindresorhus/unicorn.png'
console.log(await findUp(['rainbow.png', 'unicorn.png']));
//=> '/Users/sindresorhus/unicorn.png'
console.log(await findUp(async directory => {
const hasUnicorns = await findUp.exists(path.join(directory, 'unicorn.png'));
return hasUnicorns && directory;
}, {type: 'directory'}));
//=> '/Users/sindresorhus'
})();
```
## API
### findUp(name, options?)
### findUp(matcher, options?)
Returns a `Promise` for either the path or `undefined` if it couldn't be found.
### findUp([...name], options?)
Returns a `Promise` for either the first path found (by respecting the order of the array) or `undefined` if none could be found.
### findUp.sync(name, options?)
### findUp.sync(matcher, options?)
Returns a path or `undefined` if it couldn't be found.
### findUp.sync([...name], options?)
Returns the first path found (by respecting the order of the array) or `undefined` if none could be found.
#### name
Type: `string`
Name of the file or directory to find.
#### matcher
Type: `Function`
A function that will be called with each directory until it returns a `string` with the path, which stops the search, or the root directory has been reached and nothing was found. Useful if you want to match files with certain patterns, set of permissions, or other advanced use-cases.
When using async mode, the `matcher` may optionally be an async or promise-returning function that returns the path.
#### options
Type: `object`
##### cwd
Type: `string`\
Default: `process.cwd()`
Directory to start from.
##### type
Type: `string`\
Default: `'file'`\
Values: `'file'` `'directory'`
The type of paths that can match.
##### allowSymlinks
Type: `boolean`\
Default: `true`
Allow symbolic links to match if they point to the chosen path type.
### findUp.exists(path)
Returns a `Promise<boolean>` of whether the path exists.
### findUp.sync.exists(path)
Returns a `boolean` of whether the path exists.
#### path
Type: `string`
Path to a file or directory.
### findUp.stop
A [`Symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) that can be returned by a `matcher` function to stop the search and cause `findUp` to immediately return `undefined`. Useful as a performance optimization in case the current working directory is deeply nested in the filesystem.
```js
const path = require('path');
const findUp = require('find-up');
(async () => {
await findUp(directory => {
return path.basename(directory) === 'work' ? findUp.stop : 'logo.png';
});
})();
```
## Related
- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module
- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file
- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package
- [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module like `require.resolve()` but from a given path
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-find-up?utm_source=npm-find-up&utm_medium=referral&utm_campaign=readme">Get professional support for 'find-up' with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
@@ -0,0 +1,26 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2022_array = void 0;
const base_config_1 = require("./base-config");
exports.es2022_array = {
libs: [],
variables: [
['Array', base_config_1.TYPE],
['ReadonlyArray', base_config_1.TYPE],
['Int8Array', base_config_1.TYPE],
['Uint8Array', base_config_1.TYPE],
['Uint8ClampedArray', base_config_1.TYPE],
['Int16Array', base_config_1.TYPE],
['Uint16Array', base_config_1.TYPE],
['Int32Array', base_config_1.TYPE],
['Uint32Array', base_config_1.TYPE],
['Float32Array', base_config_1.TYPE],
['Float64Array', base_config_1.TYPE],
['BigInt64Array', base_config_1.TYPE],
['BigUint64Array', base_config_1.TYPE],
],
};
@@ -0,0 +1,99 @@
import { $ as ContentBlockSchema, $n as ServerTasksCapabilitySchema, $t as ListTasksResultSchema, A as StoredOAuthTokens, An as RequestMetaSchema, Ar as ToolUseContentSchema, At as InitializeRequestSchema, B as CancelTaskRequestSchema, Bn as ResourceUpdatedNotificationSchema, Bt as JSONRPCResultResponseSchema, C as OpenIdProviderDiscoveryMetadata, Cn as PromptReferenceSchema, Cr as TitledSingleSelectEnumSchemaSchema, Ct as GetTaskRequestSchema, D as OptionalSafeUrlSchema, Dn as ReadResourceResultSchema, Dr as ToolListChangedNotificationSchema, Dt as ImageContentSchema, E as OpenIdProviderMetadataSchema, En as ReadResourceRequestSchema, Er as ToolExecutionSchema, Et as IconsSchema, F as BlobResourceContentsSchema, Fn as ResourceRequestParamsSchema, Fr as JSONArray, Ft as JSONRPCErrorResponseSchema, G as ClientNotificationSchema, Gn as RootsListChangedNotificationSchema, Gt as ListPromptsResultSchema, H as CancelledNotificationParamsSchema, Hn as ResultSchema, Ht as LegacyTitledEnumSchemaSchema, I as BooleanSchemaSchema, In as ResourceSchema, Ir as JSONObject, It as JSONRPCMessageSchema, J as ClientTasksCapabilitySchema, Jn as SamplingMessageSchema, Jt as ListResourcesRequestSchema, K as ClientRequestSchema, Kn as SamplingContentSchema, Kt as ListResourceTemplatesRequestSchema, L as CallToolRequestParamsSchema, Ln as ResourceTemplateReferenceSchema, Lr as JSONValue, Lt as JSONRPCNotificationSchema, M as AudioContentSchema, Mn as ResourceContentsSchema, Mr as UnsubscribeRequestSchema, Mt as InitializedNotificationSchema, N as BaseMetadataSchema, Nn as ResourceLinkSchema, Nr as UntitledMultiSelectEnumSchemaSchema, Nt as JSONArraySchema, O as SafeUrlSchema, On as RelatedTaskMetadataSchema, Or as ToolResultContentSchema, Ot as ImplementationSchema, P as BaseRequestParamsSchema, Pn as ResourceListChangedNotificationSchema, Pr as UntitledSingleSelectEnumSchemaSchema, Pt as JSONObjectSchema, Q as CompleteResultSchema, Qn as ServerResultSchema, Qt as ListTasksRequestSchema, R as CallToolRequestSchema, Rn as ResourceTemplateSchema, Rt as JSONRPCRequestSchema, S as OAuthTokensSchema, Sn as PromptMessageSchema, Sr as TitledMultiSelectEnumSchemaSchema, St as GetTaskPayloadResultSchema, T as OpenIdProviderMetadata, Tn as ReadResourceRequestParamsSchema, Tr as ToolChoiceSchema, Tt as IconSchema, U as CancelledNotificationSchema, Un as RoleSchema, Ut as ListChangedOptionsBaseSchema, V as CancelTaskResultSchema, Vn as ResultMetaObjectSchema, Vt as JSONValueSchema, W as ClientCapabilitiesSchema, Wn as RootSchema, Wt as ListPromptsRequestSchema, X as CompleteRequestParamsSchema, Xn as ServerNotificationSchema, Xt as ListRootsRequestSchema, Y as CompatibilityCallToolResultSchema, Yn as ServerCapabilitiesSchema, Yt as ListResourcesResultSchema, Z as CompleteRequestSchema, Zn as ServerRequestSchema, Zt as ListRootsResultSchema, _ as OAuthProtectedResourceMetadata, _n as ProgressNotificationSchema, _r as TaskStatusNotificationParamsSchema, _t as EnumSchemaSchema, a as OAuthClientInformationFull, an as ModelHintSchema, ar as SubscribeRequestSchema, at as CursorSchema, b as OAuthTokenRevocationRequestSchema, bn as PromptArgumentSchema, br as TextContentSchema, bt as GetPromptResultSchema, c as OAuthClientInformationSchema, cn as NotificationSchema, cr as SubscriptionsAcknowledgedNotificationSchema, ct as ElicitRequestFormParamsSchema, d as OAuthClientRegistrationError, dn as PaginatedRequestParamsSchema, dr as SubscriptionsListenResultMetaSchema, dt as ElicitRequestURLParamsSchema, en as ListToolsRequestSchema, er as SetLevelRequestParamsSchema, et as CreateMessageRequestParamsSchema, f as OAuthClientRegistrationErrorSchema, fn as PaginatedRequestSchema, fr as SubscriptionsListenResultSchema, ft as ElicitResultSchema, g as OAuthMetadataSchema, gn as ProgressNotificationParamsSchema, gr as TaskSchema, gt as EmptyResultSchema, h as OAuthMetadata, hn as PrimitiveSchemaDefinitionSchema, hr as TaskMetadataSchema, ht as EmbeddedResourceSchema, i as OAuthClientInformation, in as LoggingMessageNotificationSchema, ir as SubscribeRequestParamsSchema, it as CreateTaskResultSchema, j as AnnotationsSchema, jn as RequestSchema, jr as UnsubscribeRequestParamsSchema, jt as InitializeResultSchema, k as StoredOAuthClientInformation, kn as RequestIdSchema, kr as ToolSchema, kt as InitializeRequestParamsSchema, l as OAuthClientMetadata, ln as NotificationsParamsSchema, lr as SubscriptionsListenRequestParamsSchema, lt as ElicitRequestParamsSchema, m as OAuthErrorResponseSchema, mn as PingRequestSchema, mr as TaskCreationParamsSchema, mt as ElicitationCompleteNotificationSchema, n as IdJagTokenExchangeResponse, nn as LoggingLevelSchema, nr as SingleSelectEnumSchemaSchema, nt as CreateMessageResultSchema, o as OAuthClientInformationFullSchema, on as ModelPreferencesSchema, or as SubscriptionFilterSchema, ot as DiscoverRequestSchema, p as OAuthErrorResponse, pn as PaginatedResultSchema, pr as TaskAugmentedRequestParamsSchema, pt as ElicitationCompleteNotiLine truncated
//#region src/constants.d.ts
declare const LATEST_PROTOCOL_VERSION = "2025-11-25";
declare const DEFAULT_NEGOTIATED_PROTOCOL_VERSION = "2025-03-26";
declare const SUPPORTED_PROTOCOL_VERSIONS: string[];
/**
* `_meta` key associating a message with a 2025-11-25 task.
*
* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
*/
declare const RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
/**
* `_meta` key carrying the MCP protocol version governing a request.
*
* For the HTTP transport, the value must match the `MCP-Protocol-Version` header.
*/
declare const PROTOCOL_VERSION_META_KEY = "io.modelcontextprotocol/protocolVersion";
/**
* `_meta` key identifying the client software making a request.
*
* Clients SHOULD include it on every request; the value is self-reported and
* intended for display, logging, and debugging — servers should not rely on
* it for behavior or security decisions.
*/
declare const CLIENT_INFO_META_KEY = "io.modelcontextprotocol/clientInfo";
/**
* `_meta` key identifying the server software producing a response.
*
* Servers SHOULD include it on every response; the value is self-reported and
* intended for display, logging, and debugging — clients should not rely on
* it for behavior or security decisions.
*/
declare const SERVER_INFO_META_KEY = "io.modelcontextprotocol/serverInfo";
/**
* `_meta` key carrying the client's capabilities for a request.
*
* Capabilities are declared per request rather than once at initialization;
* servers must not infer capabilities from prior requests.
*/
declare const CLIENT_CAPABILITIES_META_KEY = "io.modelcontextprotocol/clientCapabilities";
/**
* `_meta` key carrying the JSON-RPC ID of the `subscriptions/listen` request
* that opened the stream a notification was delivered on.
*
* Stamped by the server on every notification delivered via a
* `subscriptions/listen` stream (including the leading
* `notifications/subscriptions/acknowledged`); on stdio, where all messages
* share one channel, clients use it to correlate notifications with their
* originating subscription. The value is the listen request's JSON-RPC ID
* verbatim.
*/
declare const SUBSCRIPTION_ID_META_KEY = "io.modelcontextprotocol/subscriptionId";
/**
* `_meta` key carrying the desired log level for a request.
*
* When absent, the server must not send `notifications/message` notifications
* for the request.
*
* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
* in the specification for at least twelve months.
*/
declare const LOG_LEVEL_META_KEY = "io.modelcontextprotocol/logLevel";
/**
* `_meta` key carrying W3C Trace Context for distributed tracing (SEP-414).
*
* When present, the value MUST follow the W3C `traceparent` header format,
* e.g. `00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01`.
*
* @see https://www.w3.org/TR/trace-context/#traceparent-header
*/
declare const TRACEPARENT_META_KEY = "traceparent";
/**
* `_meta` key carrying vendor-specific trace state for distributed tracing (SEP-414).
*
* When present, the value MUST follow the W3C `tracestate` header format,
* e.g. `vendor1=value1,vendor2=value2`.
*
* @see https://www.w3.org/TR/trace-context/#tracestate-header
*/
declare const TRACESTATE_META_KEY = "tracestate";
/**
* `_meta` key carrying cross-cutting propagation values for distributed tracing (SEP-414).
*
* When present, the value MUST follow the W3C Baggage header format,
* e.g. `userId=alice,serverRegion=us-east-1`.
*
* @see https://www.w3.org/TR/baggage/
*/
declare const BAGGAGE_META_KEY = "baggage";
declare const JSONRPC_VERSION = "2.0";
declare const PARSE_ERROR = -32700;
declare const INVALID_REQUEST = -32600;
declare const METHOD_NOT_FOUND = -32601;
declare const INVALID_PARAMS = -32602;
declare const INTERNAL_ERROR = -32603;
//#endregion
export { AnnotationsSchema, AudioContentSchema, AuthorizationServerMetadata, BAGGAGE_META_KEY, BaseMetadataSchema, BaseRequestParamsSchema, BlobResourceContentsSchema, BooleanSchemaSchema, CLIENT_CAPABILITIES_META_KEY, CLIENT_INFO_META_KEY, CallToolRequestParamsSchema, CallToolRequestSchema, CallToolResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, CancelledNotificationParamsSchema, CancelledNotificationSchema, ClientCapabilitiesSchema, ClientNotificationSchema, ClientRequestSchema, ClientResultSchema, ClientTasksCapabilitySchema, CompatibilityCallToolResultSchema, CompleteRequestParamsSchema, CompleteRequestSchema, CompleteResultSchema, ContentBlockSchema, CreateMessageRequestParamsSchema, CreateMessageRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, CreateTaskResultSchema, CursorSchema, DEFAULT_NEGOTIATED_PROTOCOL_VERSION, DiscoverRequestSchema, DiscoverResultSchema, ElicitRequestFormParamsSchema, ElicitRequestParamsSchema, ElicitRequestSchema, ElicitRequestURLParamsSchema, ElicitResultSchema, ElicitationCompleteNotificationParamsSchema, ElicitationCompleteNotificationSchema, EmbeddedResourceSchema, EmptyResultSchema, EnumSchemaSchema, GetPromptRequestParamsSchema, GetPromptRequestSchema, GetPromptResultSchema, GetTaskPayloadRequestSchema, GetTaskPayloadResultSchema, GetTaskRequestSchema, GetTaskResultSchema, INTERNAL_ERROR, INVALID_PARAMS, INVALID_REQUEST, IconSchema, IconsSchema, IdJagTokenExchangeResponse, IdJagTokenExchangeResponseSchema, ImageContentSchema, ImplementationSchema, InitializeRequestParamsSchema, InitializeRequestSchema, InitializeResultSchema, InitializedNotificationSchema, type JSONArray, JSONArraySchema, type JSONObject, JSONObjectSchema, JSONRPCErrorResponseSchema, JSONRPCMessageSchema, JSONRPCNotificationSchema, JSONRPCRequestSchema, JSONRPCResponseSchema, JSONRPCResultResponseSchema, JSONRPC_VERSION, type JSONValue, JSONValueSchema, LATEST_PROTOCOL_VERSION, LOG_LEVEL_META_KEY, LegacyTitledEnumSchemaSchema, ListChangedOptionsBaseSchema, ListPromptsRequestSchema, ListPromptsResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListRootsRequestSchema, ListRootsResultSchema, ListTasksRequestSchema, ListTasksResultSchema, ListToolsRequestSchema, ListToolsResultSchema, LoggingLevelSchema, LoggingMessageNotificationParamsSchema, LoggingMessageNotificationSchema, METHOD_NOT_FOUND, ModelHintSchema, ModelPreferencesSchema, MultiSelectEnumSchemaSchema, NotificationSchema, NotificationsParamsSchema, NumberSchemaSchema, OAuthClientInformation, OAuthClientInformationFull, OAuthClientInformationFullSchema, OAuthClientInformationMixed, OAuthClientInformationSchema, OAuthClientMetadata, OAuthClientMetadataSchema, OAuthClientRegistrationError, OAuthClientRegistrationErrorSchema, OAuthErrorResponse, OAuthErrorResponseSchema, OAuthMetadata, OAuthMetadataSchema, OAuthProtectedResourceMetadata, OAuthProtectedResourceMetadataSchema, OAuthTokenRevocationRequest, OAuthTokenRevocationRequestSchema, OAuthTokens, OAuthTokensSchema, OpenIdProviderDiscoveryMetadata, OpenIdProviderDiscoveryMetadataSchema, OpenIdProviderMetadata, OpenIdProviderMetadataSchema, OptionalSafeUrlSchema, PARSE_ERROR, PROTOCOL_VERSION_META_KEY, PaginatedRequestParamsSchema, PaginatedRequestSchema, PaginatedResultSchema, PingRequestSchema, PrimitiveSchemaDefinitionSchema, ProgressNotificationParamsSchema, ProgressNotificationSchema, ProgressSchema, ProgressTokenSchema, PromptArgumentSchema, PromptListChangedNotificationSchema, PromptMessageSchema, PromptReferenceSchema, PromptSchema, RELATED_TASK_META_KEY, ReadResourceRequestParamsSchema, ReadResourceRequestSchema, ReadResourceResultSchema, RelatedTaskMetadataSchema, RequestIdSchema, RequestMetaSchema, RequestSchema, ResourceContentsSchema, ResourceLinkSchema, ResourceListChangedNotificationSchema, ResourceRequestParamsSchema, ResourceSchema, ResourceTemplateReferenceSchema, ResourceTemplateSchema, ResourceUpdatedNotificationParamsSchema, ResourceUpdatedNotificationSchema, ResultMetaObjectSchema, ResultSchema, RoleSchema, RootSchema, RootsListChangedNotificationSchema, SERVER_INFO_META_KEY, SUBSCRIPTION_ID_META_KEY, SUPPORTED_PROTOCOL_VERSIONS, SafeUrlSchema, SamplingContentSchema, SamplingMessageContentBlockSchema, SamplingMessageSchema, ServerCapabilitiesSchema, ServerNotificationSchema, ServerRequestSchema, ServerResultSchema, ServerTasksCapabilitySchema, SetLevelRequestParamsSchema, SetLevelRequestSchema, SingleSelectEnumSchemaSchema, StoredOAuthClientInformation, StoredOAuthTokens, StringSchemaSchema, SubscribeRequestParamsSchema, SubscribeRequestSchema, SubscriptionFilterSchema, SubscriptionsAcknowledgedNotificationParamsSchema, SubscriptionsAcknowledgedNotificationSchema, SubscriptionsListenRequestParamsSchema, SubscriptionsListenRequestSchema, SubscriptionsListenResultMetaSchema, SubscriptionsListenResultSchema, TRACEPARENT_META_KEY, TRACESTATE_META_KEYLine truncated
//# sourceMappingURL=internal.d.mts.map
@@ -0,0 +1,15 @@
import SemVer = require("../classes/semver");
import semver = require("../index");
/**
* The reverse of compare.
*
* Sorts in descending order when passed to `Array.sort()`.
*/
declare function rcompare(
v1: string | SemVer,
v2: string | SemVer,
optionsOrLoose?: boolean | semver.Options,
): 1 | 0 | -1;
export = rcompare;
@@ -0,0 +1 @@
{"version":3,"file":"keys-position.mjs","sources":["../../../../src/render/utils/keys-position.ts"],"sourcesContent":["import { transformPropOrder } from \"./keys-transform\"\n\nexport const positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n ...transformPropOrder,\n])\n"],"names":[],"mappings":";;AAEO,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;IAClC,OAAO;IACP,QAAQ;IACR,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;AACR,IAAA,GAAG,kBAAkB;AACxB,CAAA;;;;"}
@@ -0,0 +1,222 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// src/typingsInstaller/nodeTypingsInstaller.ts
var import_child_process = require("child_process");
var fs = __toESM(require("fs"));
var path = __toESM(require("path"));
// src/typescript/typescript.ts
var typescript_exports = {};
__reExport(typescript_exports, require("./typescript.js"));
// src/typingsInstaller/nodeTypingsInstaller.ts
var FileLog = class {
constructor(logFile) {
this.logFile = logFile;
this.isEnabled = () => {
return typeof this.logFile === "string";
};
this.writeLine = (text) => {
if (typeof this.logFile !== "string") return;
try {
fs.appendFileSync(this.logFile, `[${typescript_exports.server.nowString()}] ${text}${typescript_exports.sys.newLine}`);
} catch {
this.logFile = void 0;
}
};
}
};
function getDefaultNPMLocation(processName, validateDefaultNpmLocation2, host) {
if (path.basename(processName).indexOf("node") === 0) {
const npmPath = path.join(path.dirname(process.argv[0]), "npm");
if (!validateDefaultNpmLocation2) {
return npmPath;
}
if (host.fileExists(npmPath)) {
return `"${npmPath}"`;
}
}
return "npm";
}
function loadTypesRegistryFile(typesRegistryFilePath, host, log2) {
if (!host.fileExists(typesRegistryFilePath)) {
if (log2.isEnabled()) {
log2.writeLine(`Types registry file '${typesRegistryFilePath}' does not exist`);
}
return /* @__PURE__ */ new Map();
}
try {
const content = JSON.parse(host.readFile(typesRegistryFilePath));
return new Map(Object.entries(content.entries));
} catch (e) {
if (log2.isEnabled()) {
log2.writeLine(`Error when loading types registry file '${typesRegistryFilePath}': ${e.message}, ${e.stack}`);
}
return /* @__PURE__ */ new Map();
}
}
var typesRegistryPackageName = "types-registry";
function getTypesRegistryFileLocation(globalTypingsCacheLocation2) {
return (0, typescript_exports.combinePaths)((0, typescript_exports.normalizeSlashes)(globalTypingsCacheLocation2), `node_modules/${typesRegistryPackageName}/index.json`);
}
var NodeTypingsInstaller = class extends typescript_exports.server.typingsInstaller.TypingsInstaller {
constructor(globalTypingsCacheLocation2, typingSafeListLocation2, typesMapLocation2, npmLocation2, validateDefaultNpmLocation2, throttleLimit, log2) {
const libDirectory = (0, typescript_exports.getDirectoryPath)((0, typescript_exports.normalizePath)(typescript_exports.sys.getExecutingFilePath()));
super(
typescript_exports.sys,
globalTypingsCacheLocation2,
typingSafeListLocation2 ? (0, typescript_exports.toPath)(typingSafeListLocation2, "", (0, typescript_exports.createGetCanonicalFileName)(typescript_exports.sys.useCaseSensitiveFileNames)) : (0, typescript_exports.toPath)("typingSafeList.json", libDirectory, (0, typescript_exports.createGetCanonicalFileName)(typescript_exports.sys.useCaseSensitiveFileNames)),
typesMapLocation2 ? (0, typescript_exports.toPath)(typesMapLocation2, "", (0, typescript_exports.createGetCanonicalFileName)(typescript_exports.sys.useCaseSensitiveFileNames)) : (0, typescript_exports.toPath)("typesMap.json", libDirectory, (0, typescript_exports.createGetCanonicalFileName)(typescript_exports.sys.useCaseSensitiveFileNames)),
throttleLimit,
log2
);
this.npmPath = npmLocation2 !== void 0 ? npmLocation2 : getDefaultNPMLocation(process.argv[0], validateDefaultNpmLocation2, this.installTypingHost);
if (this.npmPath.includes(" ") && this.npmPath[0] !== `"`) {
this.npmPath = `"${this.npmPath}"`;
}
if (this.log.isEnabled()) {
this.log.writeLine(`Process id: ${process.pid}`);
this.log.writeLine(`NPM location: ${this.npmPath} (explicit '${typescript_exports.server.Arguments.NpmLocation}' ${npmLocation2 === void 0 ? "not " : ""} provided)`);
this.log.writeLine(`validateDefaultNpmLocation: ${validateDefaultNpmLocation2}`);
}
this.ensurePackageDirectoryExists(globalTypingsCacheLocation2);
try {
if (this.log.isEnabled()) {
this.log.writeLine(`Updating ${typesRegistryPackageName} npm package...`);
}
this.execSyncAndLog(`${this.npmPath} install --ignore-scripts ${typesRegistryPackageName}@${this.latestDistTag}`, { cwd: globalTypingsCacheLocation2 });
if (this.log.isEnabled()) {
this.log.writeLine(`Updated ${typesRegistryPackageName} npm package`);
}
} catch (e) {
if (this.log.isEnabled()) {
this.log.writeLine(`Error updating ${typesRegistryPackageName} package: ${e.message}`);
}
this.delayedInitializationError = {
kind: "event::initializationFailed",
message: e.message,
stack: e.stack
};
}
this.typesRegistry = loadTypesRegistryFile(getTypesRegistryFileLocation(globalTypingsCacheLocation2), this.installTypingHost, this.log);
}
handleRequest(req) {
if (this.delayedInitializationError) {
this.sendResponse(this.delayedInitializationError);
this.delayedInitializationError = void 0;
}
super.handleRequest(req);
}
sendResponse(response) {
if (this.log.isEnabled()) {
this.log.writeLine(`Sending response:${typescript_exports.server.stringifyIndented(response)}`);
}
process.send(response);
if (this.log.isEnabled()) {
this.log.writeLine(`Response has been sent.`);
}
}
installWorker(requestId, packageNames, cwd, onRequestCompleted) {
if (this.log.isEnabled()) {
this.log.writeLine(`#${requestId} with cwd: ${cwd} arguments: ${JSON.stringify(packageNames)}`);
}
const start = Date.now();
const hasError = typescript_exports.server.typingsInstaller.installNpmPackages(this.npmPath, typescript_exports.version, packageNames, (command) => this.execSyncAndLog(command, { cwd }));
if (this.log.isEnabled()) {
this.log.writeLine(`npm install #${requestId} took: ${Date.now() - start} ms`);
}
onRequestCompleted(!hasError);
}
/** Returns 'true' in case of error. */
execSyncAndLog(command, options) {
if (this.log.isEnabled()) {
this.log.writeLine(`Exec: ${command}`);
}
try {
const stdout = (0, import_child_process.execSync)(command, { ...options, encoding: "utf-8" });
if (this.log.isEnabled()) {
this.log.writeLine(` Succeeded. stdout:${indent(typescript_exports.sys.newLine, stdout)}`);
}
return false;
} catch (error) {
const { stdout, stderr } = error;
this.log.writeLine(` Failed. stdout:${indent(typescript_exports.sys.newLine, stdout)}${typescript_exports.sys.newLine} stderr:${indent(typescript_exports.sys.newLine, stderr)}`);
return true;
}
}
};
var logFilePath = typescript_exports.server.findArgument(typescript_exports.server.Arguments.LogFile);
var globalTypingsCacheLocation = typescript_exports.server.findArgument(typescript_exports.server.Arguments.GlobalCacheLocation);
var typingSafeListLocation = typescript_exports.server.findArgument(typescript_exports.server.Arguments.TypingSafeListLocation);
var typesMapLocation = typescript_exports.server.findArgument(typescript_exports.server.Arguments.TypesMapLocation);
var npmLocation = typescript_exports.server.findArgument(typescript_exports.server.Arguments.NpmLocation);
var validateDefaultNpmLocation = typescript_exports.server.hasArgument(typescript_exports.server.Arguments.ValidateDefaultNpmLocation);
var log = new FileLog(logFilePath);
if (log.isEnabled()) {
process.on("uncaughtException", (e) => {
log.writeLine(`Unhandled exception: ${e} at ${e.stack}`);
});
}
process.on("disconnect", () => {
if (log.isEnabled()) {
log.writeLine(`Parent process has exited, shutting down...`);
}
process.exit(0);
});
var installer;
process.on("message", (req) => {
installer ?? (installer = new NodeTypingsInstaller(
globalTypingsCacheLocation,
typingSafeListLocation,
typesMapLocation,
npmLocation,
validateDefaultNpmLocation,
/*throttleLimit*/
5,
log
));
installer.handleRequest(req);
});
function indent(newline, str) {
return str && str.length ? `${newline} ` + str.replace(/\r?\n/, `${newline} `) : "";
}
//# sourceMappingURL=_typingsInstaller.js.map
@@ -0,0 +1,16 @@
import State from "../tokenizer/state";
export declare let isJSXEnabled: boolean;
export declare let isTypeScriptEnabled: boolean;
export declare let isFlowEnabled: boolean;
export declare let state: State;
export declare let input: string;
export declare let nextContextId: number;
export declare function getNextContextId(): number;
export declare function augmentError(error: any): any;
export declare class Loc {
line: number;
column: number;
constructor(line: number, column: number);
}
export declare function locationForIndex(pos: number): Loc;
export declare function initParser(inputCode: string, isJSXEnabledArg: boolean, isTypeScriptEnabledArg: boolean, isFlowEnabledArg: boolean): void;
@@ -0,0 +1,11 @@
type PathConditionsMap = {
[condition: string]: PathConditions | null;
};
type PathOrMap = string | PathConditionsMap;
type PathConditions = PathOrMap | readonly PathOrMap[];
declare const resolveExports: (exports: PathConditions, request: string, conditions: readonly string[]) => string[];
declare const resolveImports: (imports: PathConditionsMap, request: string, conditions: readonly string[]) => string[];
export { PathConditions, PathConditionsMap, resolveExports, resolveImports };
@@ -0,0 +1 @@
module.exports={C:{"4":0.02846,"59":0.00474,"115":0.07116,"120":0.5503,"121":1.10535,"123":0.01423,"124":0.01898,"125":0.00949,"128":0.00474,"136":0.00949,"140":0.04744,"141":0.00474,"142":0.00474,"143":0.00474,"146":0.00474,"147":0.00474,"148":0.00474,"150":0.01898,"151":0.00949,"152":0.01898,"153":0.02372,"154":0.12334,"155":0.38426,"156":0.38901,"157":0.01423,_:"2 3 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 122 126 127 129 130 131 132 133 134 135 137 138 139 144 145 149 158 159 160 3.5 3.6"},D:{"49":0.00474,"55":0.00474,"70":0.00474,"79":0.00949,"87":0.00474,"96":0.00949,"101":0.00474,"103":0.24669,"104":0.23246,"105":0.23246,"106":0.23246,"107":0.23246,"108":0.23246,"109":0.81597,"110":0.23246,"111":0.26092,"112":0.23246,"114":0.00474,"116":0.48389,"117":0.23246,"118":0.89187,"119":1.09586,"120":1.35678,"121":0.01423,"122":0.03795,"123":0.01898,"124":0.25143,"125":0.01423,"126":0.01423,"127":0.00949,"128":0.0427,"129":0.00949,"130":0.01898,"131":0.50761,"132":0.01423,"133":0.64044,"134":0.20399,"135":0.20399,"136":0.21348,"137":0.25143,"138":0.28464,"139":0.22771,"140":0.24194,"141":0.24194,"142":0.74006,"143":0.03321,"144":0.12809,"145":0.25143,"146":0.36054,"147":0.06167,"148":0.25143,"149":0.32734,"150":0.3558,"151":2.96974,"152":8.98988,"153":7.94146,"154":1.87388,"155":0.02372,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 56 57 58 59 60 61 62 63 64 65 66 67 68 69 71 72 73 74 75 76 77 78 80 81 83 84 85 86 88 89 90 91 92 93 94 95 97 98 99 100 102 113 115 156 157"},F:{"95":0.01423,"105":0.00949,"106":0.01423,"107":0.00949,"133":0.00474,"134":0.26092,"135":1.02945,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 99 100 101 102 103 104 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.01423,"109":0.01423,"119":0.54556,"120":0.5503,"122":0.01423,"132":0.00474,"138":0.00474,"139":0.00474,"140":0.00949,"141":0.00474,"142":0.00474,"143":0.00949,"144":0.00949,"145":0.01898,"146":0.00949,"147":0.01898,"148":0.01898,"149":0.01898,"150":0.0759,"151":0.16604,"152":1.6177,"153":1.86914,"154":0.48389,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 121 123 124 125 126 127 128 129 130 131 133 134 135 136 137"},E:{"27":0.06167,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 16.5 17.0 17.2 17.3 17.4 18.0 18.1 18.2 18.4 26.0 27.1 27.2 TP","14.1":0.00474,"15.6":0.00949,"16.6":0.01898,"17.1":0.01423,"17.5":0.00474,"17.6":0.02372,"18.3":0.00474,"18.5-18.7":0.00474,"26.1":0.00474,"26.2":0.01423,"26.3":0.01423,"26.4":0.01423,"26.5":0.07116,"26.6":0.28938},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0,"6.0-6.1":0,"7.0-7.1":0,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00129,"11.0-11.2":0.00065,"11.3-11.4":0.01035,"12.0-12.1":0,"12.2-12.5":0.00517,"13.0-13.1":0,"13.2":0.00453,"13.3":0,"13.4-13.7":0,"14.0-14.4":0,"14.5-14.8":0,"15.0-15.1":0.00065,"15.2-15.3":0,"15.4":0,"15.5":0.00129,"15.6-15.8":0.04591,"16.0":0.00259,"16.1":0.00582,"16.2":0.00194,"16.3":0.01487,"16.4":0.00065,"16.5":0.00129,"16.6-16.7":0.11768,"17.0":0.00194,"17.1":0.00323,"17.2":0.00194,"17.3":0.00388,"17.4":0.00711,"17.5":0.01811,"17.6-17.7":0.04138,"18.0":0.01035,"18.1":0.02069,"18.2":0.02586,"18.3":0.05302,"18.4":0.0291,"18.5-18.7":0.70351,"26.0":0.03168,"26.1":0.03944,"26.2":0.08729,"26.3":0.1151,"26.4":0.06531,"26.5":0.62463,"26.6":3.8454,"27.0":0.44358,"27.1":0,"27.2":0.0097},P:{"26":0.04952,"27":0.01981,"28":0.04952,"29":0.06933,"30":1.37679,_:"4 20 21 22 23 24 25 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.05943},I:{"0":0.01576,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":0.19451,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":44.78718},R:{_:"0"},M:{"0":0.16822},Q:{_:"14.9"},O:{"0":0.01577},H:{all:0}};
@@ -0,0 +1 @@
module.exports={C:{"50":0.00445,"84":0.00445,"93":0.00445,"102":0.00445,"115":0.0889,"120":0.42228,"121":0.87122,"127":0.00889,"128":0.00445,"138":0.06223,"140":0.01334,"143":0.00445,"145":0.00445,"147":0.01778,"149":0.00445,"150":0.04001,"151":0.00889,"152":0.01778,"153":0.03112,"154":0.19114,"155":0.48451,"156":0.47117,"157":0.01778,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 85 86 87 88 89 90 91 92 94 95 96 97 98 99 100 101 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 122 123 124 125 126 129 130 131 132 133 134 135 136 137 139 141 142 144 146 148 158 159 160 3.5","3.6":0.00445},D:{"49":0.00445,"50":0.00445,"63":0.00445,"64":0.00445,"65":0.00445,"66":0.00445,"68":0.00445,"69":0.00889,"71":0.00445,"72":0.00889,"73":0.00445,"74":0.00445,"75":0.00889,"79":0.00445,"80":0.00445,"81":0.00889,"83":0.01334,"86":0.00889,"87":0.01778,"91":0.00445,"92":0.05779,"93":0.00445,"95":0.00445,"98":0.04445,"100":0.00445,"101":0.12891,"103":0.11113,"104":0.10224,"105":0.11557,"106":0.10668,"107":0.10224,"108":0.10224,"109":1.05791,"110":0.11113,"111":0.11113,"112":0.11113,"113":0.00889,"114":0.0489,"115":0.00445,"116":0.20892,"117":0.10668,"118":1.99136,"119":0.96457,"120":1.0668,"122":0.00889,"123":0.00445,"124":0.11113,"125":0.00445,"126":0.01334,"127":0.00445,"128":0.00445,"129":0.00445,"131":0.21336,"132":0.02667,"133":0.61786,"134":0.48451,"135":0.45339,"136":0.47117,"137":0.48451,"138":0.55563,"139":0.50673,"140":0.53785,"141":0.5334,"142":1.70244,"143":0.00889,"144":0.64453,"145":0.01778,"146":0.33782,"147":0.02667,"148":0.16447,"149":0.16891,"150":0.34227,"151":12.25042,"152":2.70256,"153":2.04026,"154":0.48451,"155":0.00445,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 51 52 53 54 55 56 57 58 59 60 61 62 67 70 76 77 78 84 85 88 89 90 94 96 97 99 102 121 130 156 157"},F:{"42":0.00445,"79":0.00445,"95":0.01334,"101":0.00445,"131":0.00445,"133":0.01334,"134":0.20003,"135":0.66231,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 99 100 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.00445,"84":0.00445,"92":0.02223,"100":0.00889,"109":0.00445,"119":0.41339,"120":0.45339,"122":0.02223,"138":0.00445,"144":0.00889,"146":0.00445,"147":0.02223,"148":0.03556,"149":0.01778,"150":0.02223,"151":0.21336,"152":0.83122,"153":0.93345,"154":0.23114,_:"12 13 14 15 16 17 79 80 81 83 85 86 87 88 89 90 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 121 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 139 140 141 142 143 145"},E:{"5":0.00445,"27":0.01778,_:"4 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 12.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 16.5 17.0 17.2 17.3 17.5 18.0 18.1 18.2 18.4 18.5-18.7 26.0 26.1 26.2 26.4 27.1 27.2 TP","11.1":0.00445,"13.1":0.00445,"15.6":0.00445,"16.6":0.04001,"17.1":0.00445,"17.4":0.00445,"17.6":0.02223,"18.3":0.00445,"26.3":0.00445,"26.5":0.01334,"26.6":0.02667},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00026,"5.0-5.1":0.00026,"6.0-6.1":0,"7.0-7.1":0.00052,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00259,"11.0-11.2":0.00026,"11.3-11.4":0.00052,"12.0-12.1":0,"12.2-12.5":0.00673,"13.0-13.1":0,"13.2":0.00129,"13.3":0,"13.4-13.7":0.00026,"14.0-14.4":0.00104,"14.5-14.8":0.00155,"15.0-15.1":0.00155,"15.2-15.3":0.00104,"15.4":0.00129,"15.5":0.00155,"15.6-15.8":0.03365,"16.0":0.00259,"16.1":0.00466,"16.2":0.00259,"16.3":0.00569,"16.4":0.00129,"16.5":0.00207,"16.6-16.7":0.04685,"17.0":0.00181,"17.1":0.00259,"17.2":0.00259,"17.3":0.00388,"17.4":0.00544,"17.5":0.01061,"17.6-17.7":0.02744,"18.0":0.00569,"18.1":0.01139,"18.2":0.01553,"18.3":0.02692,"18.4":0.01683,"18.5-18.7":0.34765,"26.0":0.01683,"26.1":0.01708,"26.2":0.04452,"26.3":0.04815,"26.4":0.03521,"26.5":0.23582,"26.6":1.45507,"27.0":0.11157,"27.1":0,"27.2":0.00285},P:{"26":0.0091,"27":0.01819,"28":0.08188,"29":0.05458,"30":0.44577,_:"4 20 21 22 23 24 25 6.2-6.4 7.2-7.4 8.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","5.0-5.4":0.0091,"9.2":0.0091},I:{"0":0.0111,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},K:{"0":1.79427,_:"10 11 12 11.1 11.5 12.1"},A:{"8":0.00445,"9":0.00445,_:"6 7 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":53.96774},R:{_:"0"},M:{"0":0.19443},Q:{"14.9":0.00556},O:{"0":0.14443},H:{all:0}};
@@ -0,0 +1,7 @@
import type { TSESLint } from '@typescript-eslint/utils';
export type MessageIds = 'preferIndexSignature' | 'preferIndexSignatureSuggestion' | 'preferRecord';
export type Options = ['index-signature' | 'record'];
declare const _default: TSESLint.RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, TSESLint.RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1,52 @@
import express from 'express';
import { hostHeaderValidation, localhostHostValidation } from './middleware/hostHeaderValidation.js';
/**
* Creates an Express application pre-configured for MCP servers.
*
* When the host is '127.0.0.1', 'localhost', or '::1' (the default is '127.0.0.1'),
* DNS rebinding protection middleware is automatically applied to protect against
* DNS rebinding attacks on localhost servers.
*
* @param options - Configuration options
* @returns A configured Express application
*
* @example
* ```typescript
* // Basic usage - defaults to 127.0.0.1 with DNS rebinding protection
* const app = createMcpExpressApp();
*
* // Custom host - DNS rebinding protection only applied for localhost hosts
* const app = createMcpExpressApp({ host: '0.0.0.0' }); // No automatic DNS rebinding protection
* const app = createMcpExpressApp({ host: 'localhost' }); // DNS rebinding protection enabled
*
* // Custom allowed hosts for non-localhost binding
* const app = createMcpExpressApp({ host: '0.0.0.0', allowedHosts: ['myapp.local', 'localhost'] });
* ```
*/
export function createMcpExpressApp(options = {}) {
const { host = '127.0.0.1', allowedHosts } = options;
const app = express();
// If allowedHosts is explicitly provided, use that for validation
if (allowedHosts) {
app.use(hostHeaderValidation(allowedHosts));
}
else {
// Apply DNS rebinding protection automatically for localhost hosts
const localhostHosts = ['127.0.0.1', 'localhost', '::1'];
if (localhostHosts.includes(host)) {
app.use(localhostHostValidation());
}
else if (host === '0.0.0.0' || host === '::') {
// Warn when binding to all interfaces without DNS rebinding protection
// eslint-disable-next-line no-console
console.warn(`Warning: Server is binding to ${host} without DNS rebinding protection. ` +
'Consider using the allowedHosts option to restrict allowed hosts, ' +
'or use authentication to protect your server.');
}
}
// The JSON body parser runs after the Host header validation, so a request
// with a disallowed Host is answered 403 without its body being read.
app.use(express.json());
return app;
}
//# sourceMappingURL=express.js.map
@@ -0,0 +1 @@
{"version":3,"file":"elicitationUrlExample.js","sourceRoot":"","sources":["../../../../src/examples/client/elicitationUrlExample.ts"],"names":[],"mappings":";AAAA,iEAAiE;AACjE,EAAE;AACF,mEAAmE;AACnE,gDAAgD;AAChD,uFAAuF;AACvF,oCAAoC;;AAEpC,oDAA+C;AAC/C,sEAA+E;AAC/E,iDAAgD;AAChD,6CAcwB;AACxB,oEAA+D;AAE/D,iFAA6E;AAC7E,kDAAyD;AACzD,yCAAyC;AAEzC,2CAA2C;AAC3C,MAAM,mBAAmB,GAAG,IAAI,CAAC,CAAC,6CAA6C;AAC/E,MAAM,kBAAkB,GAAG,oBAAoB,mBAAmB,WAAW,CAAC;AAC9E,IAAI,aAAa,GAA4C,SAAS,CAAC;AAEvE,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;AACtC,MAAM,cAAc,GAAwB;IACxC,WAAW,EAAE,wBAAwB;IACrC,aAAa,EAA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J,sBAAsB,GAAG,OAAO,CAAC;YACrC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,wBAAwB,GAAG,IAAI,CAAC;QAChC,YAAY,CAAC,KAAK,EAAE,CAAC,CAAC,yCAAyC;QAE/D,kCAAkC;QAClC,OAAO,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACjC,MAAM,MAAM,GAAG,gBAAgB,CAAC,KAAK,EAAG,CAAC;YACzC,OAAO,CAAC,Line truncated
@@ -0,0 +1 @@
{"version":3,"file":"parallelToolCallsClient.js","sourceRoot":"","sources":["../../../../src/examples/client/parallelToolCallsClient.ts"],"names":[],"mappings":";;AAAA,oDAA+C;AAC/C,sEAA+E;AAC/E,6CAMwB;AAExB;;;;;;GAMG;AAEH,+BAA+B;AAC/B,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,MAAM,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,2BAA2B,CAAC;AAEzD,KAAK,UAAU,IAAI;IACf,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,4BAA4B,SAAS,EAAE,CAAC,CAAC;IAErD,IAAI,MAAc,CAAC;IACnB,IAAI,SAAwC,CAAC;IAE7C,IAAI,CAAC;QACD,+CAA+C;QAC/C,MAAM,GAAG,IAAI,iBAAM,CAAC;YAChB,IAAI,EAAE,4BAA4B;YAClC,OAAO,EAAE,OAAO;SACnB,CAAC,CAAC;QAEH,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;YACrB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;QAC1C,CAAC,CAAC;QAEF,wBAAwB;QACxB,SAAS,GAAG,IAAI,iDAA6B,CAAC,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC,CA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EACZ,UAAS,YAAiB,KACzB,OASF,CAAA"}
@@ -0,0 +1 @@
{"version":3,"file":"remove-formatting.js","sources":["../../../src/icons/remove-formatting.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name RemoveFormatting\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCA3VjRoMTZ2MyIgLz4KICA8cGF0aCBkPSJNNSAyMGg2IiAvPgogIDxwYXRoIGQ9Ik0xMyA0IDggMjAiIC8+CiAgPHBhdGggZD0ibTE1IDE1IDUgNSIgLz4KICA8cGF0aCBkPSJtMjAgMTUtNSA1IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/remove-formatting\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst RemoveFormatting = createLucideIcon('RemoveFormatting', [\n ['path', { d: 'M4 7V4h16v3', key: '9msm58' }],\n ['path', { d: 'M5 20h6', key: '1h6pxn' }],\n ['path', { d: 'M13 4 8 20', key: 'kqq6aj' }],\n ['path', { d: 'm15 15 5 5', key: 'me55sn' }],\n ['path', { d: 'm20 15-5 5', key: '11p7ol' }],\n]);\n\nexport default RemoveFormatting;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,214 @@
import cjs from "./sass.node.js";
export const compile = cjs.compile;
export const compileAsync = cjs.compileAsync;
export const compileString = cjs.compileString;
export const compileStringAsync = cjs.compileStringAsync;
export const initCompiler = cjs.initCompiler;
export const initAsyncCompiler = cjs.initAsyncCompiler;
export const Compiler = cjs.Compiler;
export const AsyncCompiler = cjs.AsyncCompiler;
export const Logger = cjs.Logger;
export const SassArgumentList = cjs.SassArgumentList;
export const SassBoolean = cjs.SassBoolean;
export const SassCalculation = cjs.SassCalculation;
export const CalculationOperation = cjs.CalculationOperation;
export const CalculationInterpolation = cjs.CalculationInterpolation;
export const SassColor = cjs.SassColor;
export const SassFunction = cjs.SassFunction;
export const SassList = cjs.SassList;
export const SassMap = cjs.SassMap;
export const SassMixin = cjs.SassMixin;
export const SassNumber = cjs.SassNumber;
export const SassString = cjs.SassString;
export const Value = cjs.Value;
export const CustomFunction = cjs.CustomFunction;
export const ListSeparator = cjs.ListSeparator;
export const sassFalse = cjs.sassFalse;
export const sassNull = cjs.sassNull;
export const sassTrue = cjs.sassTrue;
export const Exception = cjs.Exception;
export const PromiseOr = cjs.PromiseOr;
export const info = cjs.info;
export const render = cjs.render;
export const renderSync = cjs.renderSync;
export const TRUE = cjs.TRUE;
export const FALSE = cjs.FALSE;
export const NULL = cjs.NULL;
export const types = cjs.types;
export const NodePackageImporter = cjs.NodePackageImporter;
export const deprecations = cjs.deprecations;
export const Version = cjs.Version;
export const parser_ = cjs.parser_;
let printedDefaultExportDeprecation = false;
function defaultExportDeprecation() {
if (printedDefaultExportDeprecation) return;
printedDefaultExportDeprecation = true;
console.error(
"`import sass from 'sass'` is deprecated.\n" +
"Please use `import * as sass from 'sass'` instead.");
}
export default {
get compile() {
defaultExportDeprecation();
return cjs.compile;
},
get compileAsync() {
defaultExportDeprecation();
return cjs.compileAsync;
},
get compileString() {
defaultExportDeprecation();
return cjs.compileString;
},
get compileStringAsync() {
defaultExportDeprecation();
return cjs.compileStringAsync;
},
get initCompiler() {
defaultExportDeprecation();
return cjs.initCompiler;
},
get initAsyncCompiler() {
defaultExportDeprecation();
return cjs.initAsyncCompiler;
},
get Compiler() {
defaultExportDeprecation();
return cjs.Compiler;
},
get AsyncCompiler() {
defaultExportDeprecation();
return cjs.AsyncCompiler;
},
get Logger() {
defaultExportDeprecation();
return cjs.Logger;
},
get SassArgumentList() {
defaultExportDeprecation();
return cjs.SassArgumentList;
},
get SassBoolean() {
defaultExportDeprecation();
return cjs.SassBoolean;
},
get SassCalculation() {
defaultExportDeprecation();
return cjs.SassCalculation;
},
get CalculationOperation() {
defaultExportDeprecation();
return cjs.CalculationOperation;
},
get CalculationInterpolation() {
defaultExportDeprecation();
return cjs.CalculationInterpolation;
},
get SassColor() {
defaultExportDeprecation();
return cjs.SassColor;
},
get SassFunction() {
defaultExportDeprecation();
return cjs.SassFunction;
},
get SassList() {
defaultExportDeprecation();
return cjs.SassList;
},
get SassMap() {
defaultExportDeprecation();
return cjs.SassMap;
},
get SassMixin() {
defaultExportDeprecation();
return cjs.SassMixin;
},
get SassNumber() {
defaultExportDeprecation();
return cjs.SassNumber;
},
get SassString() {
defaultExportDeprecation();
return cjs.SassString;
},
get Value() {
defaultExportDeprecation();
return cjs.Value;
},
get CustomFunction() {
defaultExportDeprecation();
return cjs.CustomFunction;
},
get ListSeparator() {
defaultExportDeprecation();
return cjs.ListSeparator;
},
get sassFalse() {
defaultExportDeprecation();
return cjs.sassFalse;
},
get sassNull() {
defaultExportDeprecation();
return cjs.sassNull;
},
get sassTrue() {
defaultExportDeprecation();
return cjs.sassTrue;
},
get Exception() {
defaultExportDeprecation();
return cjs.Exception;
},
get PromiseOr() {
defaultExportDeprecation();
return cjs.PromiseOr;
},
get info() {
defaultExportDeprecation();
return cjs.info;
},
get render() {
defaultExportDeprecation();
return cjs.render;
},
get renderSync() {
defaultExportDeprecation();
return cjs.renderSync;
},
get TRUE() {
defaultExportDeprecation();
return cjs.TRUE;
},
get FALSE() {
defaultExportDeprecation();
return cjs.FALSE;
},
get NULL() {
defaultExportDeprecation();
return cjs.NULL;
},
get types() {
defaultExportDeprecation();
return cjs.types;
},
get NodePackageImporter() {
defaultExportDeprecation();
return cjs.NodePackageImporter;
},
get deprecations() {
defaultExportDeprecation();
return cjs.deprecations;
},
get Version() {
defaultExportDeprecation();
return cjs.Version;
},
get parser_() {
defaultExportDeprecation();
return cjs.parser_;
},
};
@@ -0,0 +1,56 @@
import { LRUCache } from './lru-cache.cjs';
/** Join path segments, cleaning duplicate slashes between parts. */
export declare function joinPaths(paths: Array<string | undefined>): string;
/** Remove repeated slashes from a path string. */
export declare function cleanPath(path: string): string;
/** Trim leading slashes (except preserving root '/'). */
export declare function trimPathLeft(path: string): string;
/** Trim trailing slashes (except preserving root '/'). */
export declare function trimPathRight(path: string): string;
/** Trim both leading and trailing slashes. */
export declare function trimPath(path: string): string;
/** Remove a trailing slash from value when appropriate for comparisons. */
export declare function removeTrailingSlash(value: string, basepath: string): string;
/**
* Compare two pathnames for exact equality after normalizing trailing slashes
* relative to the provided `basepath`.
*/
export declare function exactPathTest(pathName1: string, pathName2: string, basepath: string): boolean;
interface ResolvePathOptions {
base: string;
to: string;
trailingSlash?: 'always' | 'never' | 'preserve';
cache?: LRUCache<string, string>;
}
/**
* Resolve a destination path against a base, honoring trailing-slash policy
* and supporting relative segments (`.`/`..`) and absolute `to` values.
*/
export declare function resolvePath({ base, to, trailingSlash, cache, }: ResolvePathOptions): string;
/**
* Create a pre-compiled decode config from allowed characters.
* This should be called once at router initialization.
*/
export declare function compileDecodeCharMap(pathParamsAllowedCharacters: ReadonlyArray<string>): (encoded: string) => string;
interface InterpolatePathOptions {
path?: string;
params: Record<string, unknown>;
/**
* A function that decodes a path parameter value.
* Obtained from `compileDecodeCharMap(pathParamsAllowedCharacters)`.
*/
decoder?: (encoded: string) => string;
}
type InterPolatePathResult = {
interpolatedPath: string;
usedParams: Record<string, unknown>;
isMissingParams: boolean;
};
/**
* Interpolate params and wildcards into a route path template.
*
* - Encodes params safely (configurable allowed characters)
* - Supports `{-$optional}` segments, `{prefix{$id}suffix}` and `{$}` wildcards
*/
export declare function interpolatePath({ path, params, decoder, ...rest }: InterpolatePathOptions): InterPolatePathResult;
export {};
@@ -0,0 +1,2 @@
import type { JSONSchema } from '@typescript-eslint/utils';
export declare const SCHEMA: JSONSchema.JSONSchema4;
@@ -0,0 +1 @@
{"version":3,"file":"align-vertical-justify-center.js","sources":["../../../src/icons/align-vertical-justify-center.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name AlignVerticalJustifyCenter\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTQiIGhlaWdodD0iNiIgeD0iNSIgeT0iMTYiIHJ4PSIyIiAvPgogIDxyZWN0IHdpZHRoPSIxMCIgaGVpZ2h0PSI2IiB4PSI3IiB5PSIyIiByeD0iMiIgLz4KICA8cGF0aCBkPSJNMiAxMmgyMCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/align-vertical-justify-center\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst AlignVerticalJustifyCenter = createLucideIcon('AlignVerticalJustifyCenter', [\n ['rect', { width: '14', height: '6', x: '5', y: '16', rx: '2', key: '1i8z2d' }],\n ['rect', { width: '10', height: '6', x: '7', y: '2', rx: '2', key: 'ypihtt' }],\n ['path', { d: 'M2 12h20', key: '9i4pu4' }],\n]);\n\nexport default AlignVerticalJustifyCenter;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA6B,iBAAiB,4BAA8B,CAAA,CAAA,CAAA;AAAA,CAAA,CAChF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,4 @@
# @floating-ui/core
This is the platform-agnostic core of Floating UI, exposing the main
`computePosition` function but no platform interface logic.
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Beaker = createLucideIcon("Beaker", [
["path", { d: "M4.5 3h15", key: "c7n0jr" }],
["path", { d: "M6 3v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V3", key: "m1uhx7" }],
["path", { d: "M6 14h12", key: "4cwo0f" }]
]);
export { Beaker as default };
//# sourceMappingURL=beaker.js.map
@@ -0,0 +1 @@
{"version":3,"file":"mediaType.d.ts","sourceRoot":"","sources":["../../../src/shared/mediaType.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAiBtF;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAM5E"}
@@ -0,0 +1,14 @@
'use strict';
/** @type {import('.')} */
var $defineProperty = Object.defineProperty || false;
if ($defineProperty) {
try {
$defineProperty({}, 'a', { value: 1 });
} catch (e) {
// IE 8 has a broken defineProperty
$defineProperty = false;
}
}
module.exports = $defineProperty;
@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Fingerprint = createLucideIcon("Fingerprint", [
["path", { d: "M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4", key: "1nerag" }],
["path", { d: "M14 13.12c0 2.38 0 6.38-1 8.88", key: "o46ks0" }],
["path", { d: "M17.29 21.02c.12-.6.43-2.3.5-3.02", key: "ptglia" }],
["path", { d: "M2 12a10 10 0 0 1 18-6", key: "ydlgp0" }],
["path", { d: "M2 16h.01", key: "1gqxmh" }],
["path", { d: "M21.8 16c.2-2 .131-5.354 0-6", key: "drycrb" }],
["path", { d: "M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2", key: "1tidbn" }],
["path", { d: "M8.65 22c.21-.66.45-1.32.57-2", key: "13wd9y" }],
["path", { d: "M9 6.8a6 6 0 0 1 9 5.2v2", key: "1fr1j5" }]
]);
export { Fingerprint as default };
//# sourceMappingURL=fingerprint.js.map
@@ -0,0 +1,30 @@
import * as schemas from "./schemas.js";
type AnyZod = schemas.$ZodType;
type Kind = schemas.$ZodTypeDef["type"];
/** The concrete schema class for a `def.type`, or `$ZodType` for kinds with no dedicated class. */
type SchemaOfKind<K extends Kind> = [Extract<schemas.$ZodTypes, {
_zod: {
def: {
type: K;
};
};
}>] extends [never] ? AnyZod : Extract<schemas.$ZodTypes, {
_zod: {
def: {
type: K;
};
};
}>;
export type VisitFn = (node: AnyZod, rewritten: boolean) => AnyZod;
export type VisitHandlers = {
[K in Kind]?: (node: SchemaOfKind<K>, rewritten: boolean) => AnyZod;
};
/**
* @internal Bottom-up rewrite of a schema tree. Unhandled kinds and unchanged branches keep their
* identity. Returns `$ZodType`: a visitor can swap in a schema of any type, so callers declare
* their own return type. `rewritten` tells a handler whether the traversal replaced anything
* below the node it is looking at.
*/
export declare function visit(schema: schemas.SomeType, fn: VisitFn): AnyZod;
export declare function visit(schema: schemas.SomeType, handlers: VisitHandlers): AnyZod;
export {};
@@ -0,0 +1 @@
{"version":3,"file":"scoring.mjs","sources":["../../../src/matcher/dictionary/scoring.ts"],"sourcesContent":[null],"names":["rank","reversed","l33t","subs","token","dictionaryName","baseGuesses","uppercaseVariations","uppercaseVariant","l33tVariations","l33tVariant","reversedVariations","calculation"],"mappings":";;;AAYA,wBAAe,CAAC;EACdA,IAAI;EACJC,QAAQ;EACRC,IAAI;EACJC,IAAI;EACJC,KAAK;AACLC,EAAAA;AAAc,CACiB,KAAsB;AACrD,EAAA,MAAMC,WAAW,GAAGN,IAAI,CAAA;AACxB,EAAA,MAAMO,mBAAmB,GAAGC,gBAAgB,CAACJ,KAAK,CAAC;EACnD,MAAMK,cAAc,GAAGC,WAAW,CAAC;IAAER,IAAI;IAAEC,IAAI;AAAEC,IAAAA;AAAK,GAAE,CAAC;AACzD,EAAA,MAAMO,kBAAkB,GAAIV,QAAQ,IAAI,CAAC,IAAK,CAAC;AAC/C,EAAA,IAAIW,WAAW;EACf,IAAIP,cAAc,KAAK,UAAU,EAAE;AACjC;AACA;AACAO,IAAAA,WAAW,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC;AAC1B,EAAA,CAAC,MAAM;AACLA,IAAAA,WAAW,GACTN,WAAW,GAAGC,mBAAmB,GAAGE,cAAc,GAAGE,kBAAkB;AAC3E,EAAA;EACA,OAAO;IACLL,WAAW;IACXC,mBAAmB;IACnBE,cAAc;AACdG,IAAAA;GACD;AACH,CAAC;;;;"}
@@ -0,0 +1,40 @@
{
"name": "motion-dom",
"version": "12.38.0",
"author": "Matt Perry",
"license": "MIT",
"repository": "https://github.com/motiondivision/motion",
"main": "./dist/cjs/index.js",
"types": "./dist/index.d.ts",
"module": "./dist/es/index.mjs",
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/cjs/index.js",
"import": "./dist/es/index.mjs",
"default": "./dist/cjs/index.js"
}
},
"dependencies": {
"motion-utils": "^12.36.0"
},
"scripts": {
"clean": "rm -rf types dist lib",
"build": "yarn clean && tsc -p . && rollup -c && node ./scripts/check-bundle.js",
"dev": "concurrently -c blue,red -n tsc,rollup --kill-others \"tsc --watch -p . --preserveWatchOutput\" \"rollup --config --watch --no-watch.clearScreen\"",
"test": "jest --config jest.config.json --max-workers=2",
"measure": "rollup -c ./rollup.size.config.mjs"
},
"bundlesize": [
{
"path": "./dist/size-rollup-style-effect.js",
"maxSize": "2.9 kB"
},
{
"path": "./dist/size-rollup-motion-value.js",
"maxSize": "1.8 kB"
}
],
"gitHead": "0bfc9fe015f7170c538ca70ba4677ec59d83ee76"
}
@@ -0,0 +1 @@
{"version":3,"file":"underline.js","sources":["../../../src/icons/underline.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Underline\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNiA0djZhNiA2IDAgMCAwIDEyIDBWNCIgLz4KICA8bGluZSB4MT0iNCIgeDI9IjIwIiB5MT0iMjAiIHkyPSIyMCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/underline\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Underline = createLucideIcon('Underline', [\n ['path', { d: 'M6 4v6a6 6 0 0 0 12 0V4', key: '9kb039' }],\n ['line', { x1: '4', x2: '20', y1: '20', y2: '20', key: 'nun2al' }],\n]);\n\nexport default Underline;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACxD,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,134 @@
/**
* The type of error that occurred.
* @public
*/
export declare type ErrorType =
| "invalid-retry"
| "unknown-field"
| "max-buffer-size-exceeded";
/**
* A parsed EventSource message event
*
* @public
*/
export declare interface EventSourceMessage {
/**
* The event type sent from the server. Note that this differs from the browser `EventSource`
* implementation in that browsers will default this to `message`, whereas this parser will
* leave this as `undefined` if not explicitly declared.
*/
event?: string | undefined;
/**
* ID of the message, if any was provided by the server. Can be used by clients to keep the
* last received message ID in sync when reconnecting.
*/
id?: string | undefined;
/**
* The data received for this message
*/
data: string;
}
/**
* A TransformStream that ingests a stream of strings and produces a stream of `EventSourceMessage`.
*
* @example Basic usage
* ```
* const eventStream =
* response.body
* .pipeThrough(new TextDecoderStream())
* .pipeThrough(new EventSourceParserStream())
* ```
*
* @example Terminate stream on parsing errors
* ```
* const eventStream =
* response.body
* .pipeThrough(new TextDecoderStream())
* .pipeThrough(new EventSourceParserStream({onError: 'terminate'}))
* ```
*
* @public
*/
export declare class EventSourceParserStream extends TransformStream<
string,
EventSourceMessage
> {
constructor({ onError, onRetry, onComment, maxBufferSize }?: StreamOptions);
}
/**
* Error thrown when encountering an issue during parsing.
*
* @public
*/
export declare class ParseError extends Error {
/**
* The type of error that occurred.
*/
type: ErrorType;
/**
* In the case of an unknown field encountered in the stream, this will be the field name.
*/
field?: string | undefined;
/**
* In the case of an unknown field encountered in the stream, this will be the value of the field.
*/
value?: string | undefined;
/**
* The line that caused the error, if available.
*/
line?: string | undefined;
constructor(
message: string,
options: {
type: ErrorType;
field?: string;
value?: string;
line?: string;
},
);
}
/**
* Options for the EventSourceParserStream.
*
* @public
*/
export declare interface StreamOptions {
/**
* Behavior when a parsing error occurs.
*
* - A custom function can be provided to handle the error.
* - `'terminate'` will error the stream and stop parsing.
* - Any other value will ignore the error and continue parsing.
*
* @defaultValue `undefined`
*/
onError?: ("terminate" | ((error: Error) => void)) | undefined;
/**
* Callback for when a reconnection interval is sent from the server.
*
* @param retry - The number of milliseconds to wait before reconnecting.
*/
onRetry?: ((retry: number) => void) | undefined;
/**
* Callback for when a comment is encountered in the stream.
*
* @param comment - The comment encountered in the stream.
*/
onComment?: ((comment: string) => void) | undefined;
/**
* Maximum number of characters the parser is allowed to buffer across calls to `feed()`.
* See {@link ParserConfig.maxBufferSize} for details.
*
* When the limit is exceeded, the stream is always errored (regardless of the `onError`
* setting) since the underlying parser is unrecoverable without a `reset()`.
*
* @defaultValue `undefined` (unbounded)
*/
maxBufferSize?: number | undefined;
}
export {};
@@ -0,0 +1,31 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Ship = createLucideIcon("Ship", [
["path", { d: "M12 10.189V14", key: "1p8cqu" }],
["path", { d: "M12 2v3", key: "qbqxhf" }],
["path", { d: "M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6", key: "qpkstq" }],
[
"path",
{
d: "M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76",
key: "7tigtc"
}
],
[
"path",
{
d: "M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",
key: "1924j5"
}
]
]);
export { Ship as default };
//# sourceMappingURL=ship.js.map
@@ -0,0 +1,38 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Fish = createLucideIcon("Fish", [
[
"path",
{
d: "M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.53-8.5-6Z",
key: "15baut"
}
],
["path", { d: "M18 12v.5", key: "18hhni" }],
["path", { d: "M16 17.93a9.77 9.77 0 0 1 0-11.86", key: "16dt7o" }],
[
"path",
{
d: "M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33",
key: "l9di03"
}
],
[
"path",
{ d: "M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4", key: "1kjonw" }
],
[
"path",
{ d: "m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98", key: "1zlm23" }
]
]);
export { Fish as default };
//# sourceMappingURL=fish.js.map
@@ -0,0 +1,73 @@
import type * as core from "../core/index.js";
import { visit } from "../core/visit.js";
import * as schemas from "./schemas.js";
/** Mini counterpart of `classic/deep-partial.ts`'s `DeepPartial`. */
// biome-ignore format: preserve vertical layout for readability.
export type DeepPartial<T extends core.SomeType> =
T extends schemas.ZodMiniObject<infer Shape, infer Config>
? schemas.ZodMiniObject<
{ -readonly [K in keyof Shape]: schemas.ZodMiniOptional<DeepPartial<Shape[K]>> },
Config
>
: T extends schemas.ZodMiniDiscriminatedUnion<infer Options, any>
? schemas.ZodMiniUnion<
{ -readonly [I in keyof Options]: Options[I] extends core.SomeType ? DeepPartial<Options[I]> : Options[I] }
>
: T extends schemas.ZodMiniUnion<infer Options>
? schemas.ZodMiniUnion<
{ -readonly [I in keyof Options]: Options[I] extends core.SomeType ? DeepPartial<Options[I]> : Options[I] }
>
: T extends schemas.ZodMiniArray<infer El>
? schemas.ZodMiniArray<DeepPartial<El>>
: T extends schemas.ZodMiniTuple<infer Items, infer Rest>
? schemas.ZodMiniTuple<
{ -readonly [K in keyof Items]: Items[K] extends core.SomeType ? DeepPartial<Items[K]> : Items[K] },
Rest extends core.SomeType ? DeepPartial<Rest> : Rest
>
: T extends schemas.ZodMiniIntersection<infer A, infer B>
? schemas.ZodMiniIntersection<DeepPartial<A>, DeepPartial<B>>
: T extends schemas.ZodMiniRecord<infer K, infer V>
? schemas.ZodMiniRecord<K, DeepPartial<V>>
: T extends schemas.ZodMiniMap<infer K, infer V>
? schemas.ZodMiniMap<K, DeepPartial<V>>
: T extends schemas.ZodMiniSet<infer El>
? schemas.ZodMiniSet<DeepPartial<El>>
: T extends schemas.ZodMiniOptional<infer Inner>
? schemas.ZodMiniOptional<DeepPartial<Inner>>
: T extends schemas.ZodMiniNullable<infer Inner>
? schemas.ZodMiniNullable<DeepPartial<Inner>>
: T extends schemas.ZodMiniDefault<infer Inner>
? schemas.ZodMiniDefault<DeepPartial<Inner>>
: T extends schemas.ZodMiniPrefault<infer Inner>
? schemas.ZodMiniPrefault<DeepPartial<Inner>>
: T extends schemas.ZodMiniNonOptional<infer Inner>
? schemas.ZodMiniNonOptional<DeepPartial<Inner>>
: T extends schemas.ZodMiniCatch<infer Inner>
? schemas.ZodMiniCatch<DeepPartial<Inner>>
: T extends schemas.ZodMiniReadonly<infer Inner>
? schemas.ZodMiniReadonly<DeepPartial<Inner>>
: T extends schemas.ZodMiniSuccess<infer Inner>
? schemas.ZodMiniSuccess<DeepPartial<Inner>>
: T extends schemas.ZodMiniPromise<infer Inner>
? schemas.ZodMiniPromise<DeepPartial<Inner>>
// Must precede ZodMiniPipe, which it extends structurally.
: T extends schemas.ZodMiniCodec<infer A, infer B>
? schemas.ZodMiniCodec<DeepPartial<A>, DeepPartial<B>>
: T extends schemas.ZodMiniPipe<infer A, infer B>
? schemas.ZodMiniPipe<DeepPartial<A>, DeepPartial<B>>
: T extends schemas.ZodMiniLazy<infer Inner>
? schemas.ZodMiniLazy<DeepPartial<Inner>>
: T;
/** See `classic/deep-partial.ts`. Mini variant uses `mini.partial(...)`. */
export function deepPartial<T extends core.SomeType>(schema: T): DeepPartial<T> {
return visit(schema, {
object: (s) => schemas.partial(s as schemas.ZodMiniObject),
// See `classic/deep-partial.ts`.
union: (s) => {
const def = s._zod.def as core.$ZodDiscriminatedUnionDef;
return def.discriminator === undefined ? s : schemas.union(def.options as schemas.ZodMiniType[]);
},
}) as unknown as DeepPartial<T>;
}
@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Hammer = createLucideIcon("Hammer", [
["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
["path", { d: "m18 15 4-4", key: "16gjal" }],
[
"path",
{
d: "m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",
key: "b7pghm"
}
]
]);
export { Hammer as default };
//# sourceMappingURL=hammer.js.map
@@ -0,0 +1,27 @@
import getIdentifierNames from "./util/getIdentifierNames";
export default class NameManager {
__init() {this.usedNames = new Set()}
constructor(code, tokens) {;NameManager.prototype.__init.call(this);
this.usedNames = new Set(getIdentifierNames(code, tokens));
}
claimFreeName(name) {
const newName = this.findFreeName(name);
this.usedNames.add(newName);
return newName;
}
findFreeName(name) {
if (!this.usedNames.has(name)) {
return name;
}
let suffixNum = 2;
while (this.usedNames.has(name + String(suffixNum))) {
suffixNum++;
}
return name + String(suffixNum);
}
}
@@ -0,0 +1,44 @@
**💛 You can help the author become a full-time open-source maintainer by [sponsoring him on GitHub](https://github.com/sponsors/egoist).**
---
# load-tsconfig
[![npm version](https://badgen.net/npm/v/load-tsconfig)](https://npm.im/load-tsconfig) [![npm downloads](https://badgen.net/npm/dm/load-tsconfig)](https://npm.im/load-tsconfig)
> Load `tsconfig.json`, light-weight and dependency-free.
## Install
```bash
npm i load-tsconfig
```
## Usage
```ts
import { loadTsConfig } from "load-tsconfig"
const loaded = loadTsConfig(".")
// loaded is null when no tsconfig is found, or:
// loaded.path -> the path to the tsconfig file
// loaded.data -> the merged tsconfig
// loaded.files -> all discovered tsconfig files (via "extends")
```
By default it loads `./tsconfig.json`, but you can use a custom filename:
```ts
loadTsConfig(".", "tsconfig.build.json")
```
Full type documentation: https://paka.dev/npm/load-tsconfig
## Sponsors
[![sponsors](https://sponsors-images.egoist.sh/sponsors.svg)](https://github.com/sponsors/egoist)
## License
MIT &copy; [EGOIST](https://github.com/sponsors/egoist)
@@ -0,0 +1,62 @@
/**
* @fileoverview Applies default rule options
* @author JoshuaKGoldberg
*/
"use strict";
/**
* Check if the variable contains an object strictly rejecting arrays
* @param {unknown} value an object
* @returns {boolean} Whether value is an object
*/
function isObjectNotArray(value) {
return typeof value === "object" && value !== null && !Array.isArray(value);
}
/**
* Deeply merges second on top of first, creating a new {} object if needed.
* @param {T} first Base, default value.
* @param {U} second User-specified value.
* @returns {T | U | (T & U)} Merged equivalent of second on top of first.
*/
function deepMergeObjects(first, second) {
if (second === void 0) {
return first;
}
if (!isObjectNotArray(first) || !isObjectNotArray(second)) {
return second;
}
const result = { ...first, ...second };
for (const key of Object.keys(second)) {
if (Object.prototype.propertyIsEnumerable.call(first, key)) {
result[key] = deepMergeObjects(first[key], second[key]);
}
}
return result;
}
/**
* Deeply merges second on top of first, creating a new [] array if needed.
* @param {T[]} first Base, default values.
* @param {U[]} second User-specified values.
* @returns {(T | U | (T & U))[]} Merged equivalent of second on top of first.
*/
function deepMergeArrays(first, second) {
if (!first || !second) {
return second || first || [];
}
return [
...first.map((value, i) =>
deepMergeObjects(value, i < second.length ? second[i] : void 0),
),
...second.slice(first.length),
];
}
module.exports = { deepMergeArrays };
@@ -0,0 +1,26 @@
{
"name": "@types/ms",
"version": "2.1.0",
"description": "TypeScript definitions for ms",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ms",
"license": "MIT",
"contributors": [
{
"name": "Zhiyuan Wang",
"githubUsername": "danny8002",
"url": "https://github.com/danny8002"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/ms"
},
"scripts": {},
"dependencies": {},
"peerDependencies": {},
"typesPublisherContentHash": "2c8651ce1714fdc6bcbc0f262c93a790f1d127fb1c2dc8edbb583decef56fd39",
"typeScriptVersion": "5.0"
}
@@ -0,0 +1 @@
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":[null],"names":["dictionary","diceware","passwords","adjacencyGraphs","tempAdjacencyGraphs"],"mappings":";;;;;;AAAA;AAKA,MAAMA,UAAU,GAAG;AACjB,EAAA,iBAAiB,EAAEC,QAAQ;AAC3B,EAAA,kBAAkB,EAAEC;;AAGtB;AACA,MAAMC,eAAe,GAAGC;;;;;"}
@@ -0,0 +1,431 @@
'use strict'
const test = require('tape')
const fastURI = require('..')
test('parse marks malformed authority and port inputs as errors', (t) => {
const malformedCases = [
{
input: 'http://[::1]foo',
expectedError: 'URI path must start with "/" when authority is present.'
},
{
input: 'http://[::1]:80abc/path',
expectedError: 'URI path must start with "/" when authority is present.'
},
{
input: 'http://example.com:80abc/path',
expectedError: 'URI path must start with "/" when authority is present.'
},
{
input: 'http://[::1]:65536',
expectedError: 'URI port is malformed.'
}
]
t.plan(malformedCases.length)
malformedCases.forEach(({ input, expectedError }) => {
t.equal(fastURI.parse(input).error, expectedError, input)
})
})
test('normalize does not canonicalize malformed URLs into different valid URLs', (t) => {
const malformedCases = [
'http://[::1]foo',
'http://[::1]:80abc/path',
'http://example.com:80abc/path',
'http://[::1]:65536'
]
t.plan(malformedCases.length)
malformedCases.forEach((input) => {
t.equal(fastURI.normalize(input), input, input)
})
})
test('equal returns false when either side is malformed', (t) => {
const malformedPairs = [
['http://[::1]foo', 'http://[::1]/foo'],
['http://[::1]:80abc/path', 'http://[::1]/abc/path'],
['http://example.com:80abc/path', 'http://example.com/abc/path'],
['http://[::1]:65536', 'http://[::1]:65536/']
]
t.plan(malformedPairs.length)
malformedPairs.forEach(([left, right]) => {
t.equal(fastURI.equal(left, right), false, `${left} != ${right}`)
})
})
test('normalize preserves encoded authority delimiters in host', (t) => {
const cases = [
['http://trusted.com%40evil.com/', 'http://trusted.com%40evil.com/'],
['http://example.com%3A8080/', 'http://example.com%3A8080/'],
['http://example.com%2Fevil.com/path', 'http://example.com%2Fevil.com/path'],
['http://example.com%23fragment/path', 'http://example.com%23fragment/path'],
['http://example.com%3Fq=evil/path', 'http://example.com%3Fq=evil/path'],
['http://user%3Apass%40evil.com/', 'http://user%3Apass%40evil.com/'],
['http://user@trusted.com%40evil.com/', 'http://user@trusted.com%40evil.com/'],
['https://trusted.com%40evil.com/', 'https://trusted.com%40evil.com/'],
['ws://trusted.com%40evil.com/chat', 'ws://trusted.com%40evil.com/chat'],
['wss://trusted.com%40evil.com/chat', 'wss://trusted.com%40evil.com/chat']
]
t.plan(cases.length)
cases.forEach(([input, expected]) => {
t.equal(fastURI.normalize(input), expected, input)
})
})
test('parse preserves encoded authority delimiters in host', (t) => {
const cases = [
['http://trusted.com%40evil.com/', 'trusted.com%40evil.com'],
['http://example.com%3A8080/', 'example.com%3A8080'],
['http://user%3Apass%40evil.com/', 'user%3Apass%40evil.com']
]
t.plan(cases.length)
cases.forEach(([input, expectedHost]) => {
t.equal(fastURI.parse(input).host, expectedHost, input)
})
})
test('equal returns false when encoded delimiters differ from live delimiters', (t) => {
const pairs = [
['http://trusted.com%40evil.com/', 'http://trusted.com@evil.com/'],
['http://example.com%3A8080/', 'http://example.com:8080/']
]
t.plan(pairs.length)
pairs.forEach(([left, right]) => {
t.equal(fastURI.equal(left, right, {}), false, `${left} != ${right}`)
})
})
test('resolve preserves encoded authority delimiters', (t) => {
const result = fastURI.resolve('http://base.com/', '//trusted.com%40evil.com/path')
const parsed = fastURI.parse(result)
t.plan(1)
t.notEqual(parsed.host, 'evil.com', '//trusted.com%40evil.com/path')
})
test('serialize escapes authority delimiters in host field', (t) => {
const result = fastURI.serialize({ scheme: 'http', host: 'trusted.com@evil.com', path: '/' })
const parsed = fastURI.parse(result)
t.plan(1)
t.notEqual(parsed.host, 'evil.com', 'host: trusted.com@evil.com')
})
test('normalize does not double-decode %2540 into a live @', (t) => {
const input = 'http://trusted.com%2540evil.com/'
const result = fastURI.normalize(input)
const parsed = fastURI.parse(result)
t.plan(2)
t.equal(result, input, 'the encoded percent sign is preserved')
t.notEqual(parsed.host, 'trusted.com@evil.com', input)
})
test('parse canonicalises IDN / Unicode hosts to their ASCII form', (t) => {
const cases = [
{
input: 'http://127。0。0。1/',
expectedHost: '127.0.0.1',
description: 'full-width ideographic stops as octet separators'
},
{
input: 'http://example.com/',
expectedHost: 'example.com',
description: 'fullwidth e as first letter'
},
{
input: 'http://納豆.example.org/',
expectedHost: 'xn--99zt52a.example.org',
description: 'CJK label requiring punycode'
}
]
t.plan(cases.length * 2)
cases.forEach(({ input, expectedHost, description }) => {
const parsed = fastURI.parse(input)
t.notOk(parsed.error, `parse should not set error: ${description}`)
t.equal(parsed.host, expectedHost, `host canonicalised to ASCII: ${description}`)
})
})
test('resolve canonicalises the host using the final resolved scheme', (t) => {
const cases = [
{
base: 'http://trusted.example/base',
relative: '//127\u30020\u30020\u30021/private',
expected: 'http://127.0.0.1/private',
expectedHost: '127.0.0.1',
description: 'scheme-relative loopback host'
},
{
base: 'https://ex\u00ADample.com/base',
relative: 'child',
expected: 'https://example.com/child',
expectedHost: 'example.com',
description: 'host inherited from the base'
},
{
base: 'http://trusted.example/base',
relative: 'http://ex\u200Bample.com/',
expected: 'http://example.com/',
expectedHost: 'example.com',
description: 'absolute relative reference'
}
]
t.plan(cases.length * 2)
cases.forEach(({ base, relative, expected, expectedHost, description }) => {
const resolved = fastURI.resolve(base, relative)
t.equal(resolved, expected, description)
t.equal(fastURI.parse(resolved).host, expectedHost, `${description} reparses consistently`)
})
})
test('resolve applies domain canonicalisation only when the effective scheme opts in', (t) => {
const host = 'ex\u00ADample.com'
t.plan(2)
t.equal(
fastURI.resolve('uri://trusted.example/', `//${host}/`),
`uri://${host}/`,
'an unsupported scheme preserves the host'
)
t.equal(
fastURI.resolve('http://trusted.example/', `//${host}/`, { unicodeSupport: true }),
`http://${host}/`,
'unicodeSupport preserves the Unicode host'
)
})
test('resolve throws when the final scheme cannot canonicalise the host', (t) => {
const invalidHost = '\u200D.example'
const cases = [
['http://trusted.example/', `//${invalidHost}/`],
[`https://${invalidHost}/base`, 'child'],
['http://trusted.example/', `http://${invalidHost}/`],
['http://trusted.example/', `//${invalidHost}%2Etest/`]
]
t.plan(cases.length)
cases.forEach(([base, relative]) => {
t.throws(
() => fastURI.resolve(base, relative),
/Host's domain name can not be converted to ASCII/,
`${base} + ${relative}`
)
})
})
test('parse rejects a literal backslash in the authority as malformed (RFC 3986)', (t) => {
// Regression for the host-confusion bypass: a literal "\" is invalid RFC 3986
// syntax and must be flagged malformed, not silently rewritten. Otherwise "\"
// acts as a host delimiter here while Node's native URL parses a different
// host, defeating a host-based SSRF/redirect/origin allowlist.
const cases = [
'http://evil.com\\@allowed.com',
'https://169.254.169.254\\@trusted.example.com',
'http://127.0.0.1\\@public.example.com',
'https://attacker.com\\@api.internal',
'http://a\\@b',
'ws://evil.com\\@allowed.com/chat',
'wss://evil.com\\@allowed.com/chat',
'http://evil.com\\%40allowed.com',
'//evil.com\\@allowed.com'
]
t.plan(cases.length)
cases.forEach((input) => {
t.equal(
fastURI.parse(input).error,
'URI authority must not contain a literal backslash.',
input
)
})
})
test('normalize does not canonicalize a literal-backslash URI into a different valid URL', (t) => {
const cases = [
'http://evil.com\\@allowed.com',
'https://attacker.com\\@api.internal'
]
t.plan(cases.length)
cases.forEach((input) => {
t.equal(fastURI.normalize(input), input, input)
})
})
test('parse leaves percent-encoded %5C untouched as encoded data (not rejected)', (t) => {
// Only the literal "\" byte is rejected; %5C stays valid encoded data and
// does not diverge from the native URL parser, so it must not be flagged.
const input = 'http://evil.com%5C@allowed.com'
const parsed = fastURI.parse(input)
t.plan(2)
t.notOk(parsed.error, '%5C is valid encoded data, not malformed')
t.equal(parsed.host, new URL(input).hostname, '%5C host matches native URL (no divergence)')
})
test('parse does not reject a literal backslash in the query or fragment', (t) => {
// The rejection is scoped to the authority/path (the host-confusion surface);
// a backslash after "?"/"#" is normalized as encoded data as before.
const parsed = fastURI.parse('http://host.example.com/?x=\\y#z\\w')
t.plan(2)
t.notOk(parsed.error, 'backslash in query/fragment does not mark the URI malformed')
t.equal(parsed.host, 'host.example.com', 'host parsed normally')
})
test('parse rejects a malformed authority introducer (\\\\, /\\, \\/) in place of //', (t) => {
// Regression: "\\", "/\\", "\\/" after the scheme colon are not valid authority
// introducers. Node's URL treats "\\" as interchangeable with "/" on special
// schemes, so "http:\\\\evil.com/path" would be parsed as host "evil.com" by
// Node, but fast-uri must reject it as malformed to prevent SSRF/redirect bypass.
const cases = [
'http:\\\\evil.com/path',
'http:/\\evil.com/path',
'http:\\/evil.com/path',
'ws:\\\\evil.com/chat',
'wss:\\\\evil.com/chat',
'ftp:\\\\evil.com/',
'\\\\evil.com/path'
]
t.plan(cases.length)
cases.forEach((input) => {
t.equal(
fastURI.parse(input).error,
'URI authority must not contain a literal backslash.',
input
)
})
})
test('normalize does not canonicalize a malformed-authority-introducer URI', (t) => {
const cases = [
'http:\\\\evil.com/path',
'http:/\\evil.com/path'
]
t.plan(cases.length)
cases.forEach((input) => {
t.equal(fastURI.normalize(input), input, input)
})
})
test('equal returns false for malformed-authority-introducer URIs', (t) => {
const pairs = [
['http:\\\\evil.com/path', 'http://evil.com/path'],
['http:/\\evil.com/path', 'http://evil.com/path']
]
t.plan(pairs.length)
pairs.forEach(([left, right]) => {
t.equal(fastURI.equal(left, right), false, `${left} != ${right}`)
})
})
test('resolve throws on malformed authority introducer', (t) => {
// resolve() returns a plain string with no error field, so the only safe
// behavior is to throw when either component has a malformed authority.
const pairs = [
['https://allowed.com/', '\\\\evil.com/path'],
['\\\\evil.com/path', 'https://allowed.com/'],
['https://allowed.com/', 'http:/\\evil.com/path'],
['https://allowed.com/', 'http:\\/evil.com/path']
]
t.plan(pairs.length)
pairs.forEach(([base, rel]) => {
t.throws(
() => fastURI.resolve(base, rel),
/URI authority must not contain a literal backslash/,
`${base} + ${rel}`
)
})
})
test('parse rejects a whitespace-split authority introducer (TAB, LF, CR)', (t) => {
// The WHATWG URL parser removes TAB (U+0009), LF (U+000A) and CR (U+000D) from
// the input before parsing, so a stripped character wedged into the introducer
// ("/<TAB>\\", "/<TAB>/", or a leading "<TAB>//") reaches an authority in Node
// while fast-uri would otherwise fold it into the path. These must be rejected
// like the adjacent "\\", "/\\", "\\/" forms.
const cases = [
{ input: '/\t\\evil.com/path', expectedError: 'URI authority must not contain a literal backslash.' },
{ input: '/\t/evil.com/path', expectedError: 'URI authority introducer must not contain whitespace.' },
{ input: '/\n\\evil.com/path', expectedError: 'URI authority must not contain a literal backslash.' },
{ input: '/\r\\evil.com/path', expectedError: 'URI authority must not contain a literal backslash.' },
{ input: '\t//evil.com/path', expectedError: 'URI authority introducer must not contain whitespace.' },
{ input: '\t/\\evil.com/path', expectedError: 'URI authority must not contain a literal backslash.' },
{ input: 'https:/\t/evil.com/path', expectedError: 'URI authority introducer must not contain whitespace.' }
]
t.plan(cases.length)
cases.forEach(({ input, expectedError }) => {
t.equal(fastURI.parse(input).error, expectedError, JSON.stringify(input))
})
})
test('resolve throws on a whitespace-split authority introducer', (t) => {
const pairs = [
['https://allowed.com/', '/\t\\evil.com/path'],
['https://allowed.com/', '/\t/evil.com/path'],
['https://allowed.com/', '/\n\\evil.com/path'],
['/\t/evil.com/path', 'https://allowed.com/']
]
t.plan(pairs.length)
pairs.forEach(([base, rel]) => {
t.throws(
() => fastURI.resolve(base, rel),
/URI authority (must not contain a literal backslash|introducer must not contain whitespace)/,
`${JSON.stringify(base)} + ${JSON.stringify(rel)}`
)
})
})
test('parse does not reject valid authority introducer patterns', (t) => {
// No false positives: "//" introducer and scheme-less "//" must be valid.
const cases = [
'http://good.com/',
'https://good.com/',
'ws://good.com/chat',
'wss://good.com/chat',
'ftp://good.com/',
'//good.com/path',
'/absolute/path',
'relative/path'
]
t.plan(cases.length)
cases.forEach((input) => {
const parsed = fastURI.parse(input)
t.notOk(parsed.error, input)
})
})
@@ -0,0 +1,175 @@
/**
* PBKDF (RFC 2898). Can be used to create a key from password and salt.
* @module
*/
import { hmac } from './hmac.ts';
// prettier-ignore
import {
ahash, anumber,
asyncLoop, checkOpts, clean, createView, kdfInputToBytes,
type CHash,
type Hash,
type KDFInput,
type TArg,
type TRet
} from './utils.ts';
/**
* PBKDF2 options:
* * c: iterations, should probably be higher than 100_000
* * dkLen: desired length of derived key in bytes, must be `>= 1` per RFC 8018 §5.2
* * asyncTick: max time in ms for which async function can block execution
*/
export type Pbkdf2Opt = {
/** Iteration count. Higher values increase CPU cost. */
c: number;
/** Desired derived key length in bytes, must be `>= 1` per RFC 8018 §5.2. */
dkLen?: number;
/** Max scheduler block time in milliseconds for the async variant. */
asyncTick?: number;
};
// Common start and end for sync/async functions
function pbkdf2Init(
hash: TArg<CHash>,
_password: TArg<KDFInput>,
_salt: TArg<KDFInput>,
_opts: TArg<Pbkdf2Opt>
) {
ahash(hash);
const opts = checkOpts({ dkLen: 32, asyncTick: 10 }, _opts);
const { c, dkLen, asyncTick } = opts;
anumber(c, 'c');
anumber(dkLen, 'dkLen');
anumber(asyncTick, 'asyncTick');
if (c < 1) throw new Error('iterations (c) must be >= 1');
// RFC 8018 §5.2 defines `dkLen` as "a positive integer".
if (dkLen < 1) throw new Error('"dkLen" must be >= 1');
// RFC 8018 §5.2 step 1 requires rejecting oversize `dkLen`
// before allocating the destination buffer.
if (dkLen > (2 ** 32 - 1) * hash.outputLen) throw new Error('derived key too long');
const password = kdfInputToBytes(_password, 'password');
const salt = kdfInputToBytes(_salt, 'salt');
// DK = PBKDF2(PRF, Password, Salt, c, dkLen);
const DK = new Uint8Array(dkLen);
// U1 = PRF(Password, Salt + INT_32_BE(i))
const PRF = hmac.create(hash, password);
// Cache PRF(P, S || ...) prefix state so each block only appends INT_32_BE(i).
const PRFSalt = PRF._cloneInto().update(salt);
return { c, dkLen, asyncTick, DK, PRF, PRFSalt };
}
function pbkdf2Output<T extends Hash<T>>(
PRF: TArg<Hash<T>>,
PRFSalt: TArg<Hash<T>>,
DK: TArg<Uint8Array>,
prfW: TArg<Hash<T> | undefined>,
u: TArg<Uint8Array>
): TRet<Uint8Array> {
// Shared sync/async cleanup point: wipe transient PRF state
// while preserving the derived key buffer.
PRF.destroy();
PRFSalt.destroy();
if (prfW) prfW.destroy();
clean(u);
return DK as TRet<Uint8Array>;
}
/**
* PBKDF2-HMAC: RFC 8018 key derivation function.
* @param hash - hash function that would be used e.g. sha256
* @param password - password from which a derived key is generated;
* JS string inputs are UTF-8 encoded first
* @param salt - cryptographic salt; JS string inputs are UTF-8 encoded first
* @param opts - PBKDF2 work factor and output settings. `dkLen`, if provided,
* must be `>= 1` per RFC 8018 §5.2. See {@link Pbkdf2Opt}.
* @returns Derived key bytes.
* @throws If the PBKDF2 iteration count or derived-key settings are invalid. {@link Error}
* @example
* PBKDF2-HMAC: RFC 2898 key derivation function.
* ```ts
* import { pbkdf2 } from '@noble/hashes/pbkdf2.js';
* import { sha256 } from '@noble/hashes/sha2.js';
* const key = pbkdf2(sha256, 'password', 'salt', { dkLen: 32, c: Math.pow(2, 18) });
* ```
*/
export function pbkdf2(
hash: TArg<CHash>,
password: TArg<KDFInput>,
salt: TArg<KDFInput>,
opts: TArg<Pbkdf2Opt>
): TRet<Uint8Array> {
const { c, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);
let prfW: any; // Working copy
const arr = new Uint8Array(4);
const view = createView(arr);
const u = new Uint8Array(PRF.outputLen);
// DK = T1 + T2 + ⋯ + Tdklen/hlen
for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {
// Ti = F(Password, Salt, c, i)
// The last Ti view can be shorter than hLen, which applies
// RFC 8018 §5.2 step 4's T_l<0..r-1> truncation without extra copies.
const Ti = DK.subarray(pos, pos + PRF.outputLen);
view.setInt32(0, ti, false);
// F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc
// U1 = PRF(Password, Salt + INT_32_BE(i))
(prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);
Ti.set(u.subarray(0, Ti.length));
for (let ui = 1; ui < c; ui++) {
// Uc = PRF(Password, Uc−1)
PRF._cloneInto(prfW).update(u).digestInto(u);
for (let i = 0; i < Ti.length; i++) Ti[i] ^= u[i];
}
}
return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);
}
/**
* PBKDF2-HMAC: RFC 8018 key derivation function. Async version.
* @param hash - hash function that would be used e.g. sha256
* @param password - password from which a derived key is generated;
* JS string inputs are UTF-8 encoded first
* @param salt - cryptographic salt; JS string inputs are UTF-8 encoded first
* @param opts - PBKDF2 work factor and output settings. `dkLen`, if provided,
* must be `>= 1` per RFC 8018 §5.2. `asyncTick` is only a local
* scheduler-yield knob for this JS wrapper, not part of RFC 8018.
* See {@link Pbkdf2Opt}.
* @returns Promise resolving to derived key bytes.
* @throws If the PBKDF2 iteration count or derived-key settings are invalid. {@link Error}
* @example
* PBKDF2-HMAC: RFC 2898 key derivation function.
* ```ts
* import { pbkdf2Async } from '@noble/hashes/pbkdf2.js';
* import { sha256 } from '@noble/hashes/sha2.js';
* const key = await pbkdf2Async(sha256, 'password', 'salt', { dkLen: 32, c: 500_000 });
* ```
*/
export async function pbkdf2Async(
hash: TArg<CHash>,
password: TArg<KDFInput>,
salt: TArg<KDFInput>,
opts: TArg<Pbkdf2Opt>
): Promise<TRet<Uint8Array>> {
const { c, dkLen, asyncTick, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);
let prfW: any; // Working copy
const arr = new Uint8Array(4);
const view = createView(arr);
const u = new Uint8Array(PRF.outputLen);
// DK = T1 + T2 + ⋯ + Tdklen/hlen
for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {
// Ti = F(Password, Salt, c, i)
// The last Ti view can be shorter than hLen, which applies
// RFC 8018 §5.2 step 4's T_l<0..r-1> truncation without extra copies.
const Ti = DK.subarray(pos, pos + PRF.outputLen);
view.setInt32(0, ti, false);
// F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc
// U1 = PRF(Password, Salt + INT_32_BE(i))
(prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);
Ti.set(u.subarray(0, Ti.length));
await asyncLoop(c - 1, asyncTick, () => {
// Uc = PRF(Password, Uc−1)
PRF._cloneInto(prfW).update(u).digestInto(u);
for (let i = 0; i < Ti.length; i++) Ti[i] ^= u[i];
});
}
return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);
}
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const esnext_regexp: LibDefinition;
@@ -0,0 +1,5 @@
export { LoupeOptions, StringifyOptions } from './display.js';
export { DeferPromise } from './helpers.js';
export { SafeTimers } from './timers.js';
export { ArgumentsType, Arrayable, Awaitable, Constructable, DeepMerge, MergeInsertions, Nullable, ParsedStack, SerializedError, TestError } from './types.js';
import '@vitest/pretty-format';