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,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 Database = createLucideIcon("Database", [
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
]);
export { Database as default };
//# sourceMappingURL=database.js.map
@@ -0,0 +1 @@
{"version":3,"file":"image-play.js","sources":["../../../src/icons/image-play.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ImagePlay\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTEgMTYtNSA1IiAvPgogIDxwYXRoIGQ9Ik0xMSAyMUg1YTIgMiAwIDAgMS0yLTJWNWEyIDIgMCAwIDEgMi0yaDE0YTIgMiAwIDAgMSAyIDJ2Ni41IiAvPgogIDxwYXRoIGQ9Ik0xNS43NjUgMjJhLjUuNSAwIDAgMS0uNzY1LS40MjRWMTMuMzhhLjUuNSAwIDAgMSAuNzY1LS40MjRsNS44NzggMy42NzRhMSAxIDAgMCAxIDAgMS42OTZ6IiAvPgogIDxjaXJjbGUgY3g9IjkiIGN5PSI5IiByPSIyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/image-play\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 ImagePlay = createLucideIcon('ImagePlay', [\n ['path', { d: 'm11 16-5 5', key: 'j5f7ct' }],\n ['path', { d: 'M11 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6.5', key: '7s81lt' }],\n [\n 'path',\n {\n d: 'M15.765 22a.5.5 0 0 1-.765-.424V13.38a.5.5 0 0 1 .765-.424l5.878 3.674a1 1 0 0 1 0 1.696z',\n key: '1omb6s',\n },\n ],\n ['circle', { cx: '9', cy: '9', r: '2', key: 'af1f0g' }],\n]);\n\nexport default ImagePlay;\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,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA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AAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AACxD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,57 @@
{
"name": "keyv",
"version": "4.5.4",
"description": "Simple key-value storage with support for multiple backends",
"main": "src/index.js",
"scripts": {
"build": "echo 'No build step required.'",
"prepare": "yarn build",
"test": "xo && c8 ava --serial",
"test:ci": "xo && ava --serial",
"clean": "rm -rf node_modules && rm -rf ./coverage && rm -rf ./test/testdb.sqlite"
},
"xo": {
"rules": {
"unicorn/prefer-module": 0,
"unicorn/prefer-node-protocol": 0,
"@typescript-eslint/consistent-type-definitions": 0,
"unicorn/no-typeof-undefined": 0,
"unicorn/prefer-event-target": 0
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/jaredwray/keyv.git"
},
"keywords": [
"key",
"value",
"store",
"cache",
"ttl"
],
"author": "Jared Wray <me@jaredwray.com> (http://jaredwray.com)",
"license": "MIT",
"bugs": {
"url": "https://github.com/jaredwray/keyv/issues"
},
"homepage": "https://github.com/jaredwray/keyv",
"dependencies": {
"json-buffer": "3.0.1"
},
"devDependencies": {
"@keyv/test-suite": "*",
"eslint": "^8.51.0",
"eslint-plugin-promise": "^6.1.1",
"pify": "^5.0.0",
"timekeeper": "^2.3.1",
"tsd": "^0.29.0"
},
"tsd": {
"directory": "test"
},
"types": "./src/index.d.ts",
"files": [
"src"
]
}
@@ -0,0 +1,64 @@
import { Readable } from "node:stream";
import { versions } from "node:process";
//#region src/utils/stream.ts
const pr54206Applied = () => {
const [major, minor] = versions.node.split(".").map((component) => parseInt(component));
return major >= 23 || major === 22 && minor >= 7 || major === 20 && minor >= 18;
};
const useReadableToWeb = pr54206Applied();
const createStreamBody = (stream, useNativeReadableToWeb = useReadableToWeb) => {
if (useNativeReadableToWeb) return Readable.toWeb(stream);
let controller;
let settled = false;
const cleanup = () => {
stream.off("data", onData);
stream.off("error", onError);
stream.off("end", onTerminate);
stream.off("close", onTerminate);
};
const settle = (callback) => {
if (settled) return;
settled = true;
cleanup();
callback?.();
};
const onData = (chunk) => {
if (settled || !controller) return;
controller.enqueue(chunk);
if ((controller.desiredSize ?? 0) <= 0) stream.pause();
};
const onError = (error) => {
settle(() => {
controller?.error(error);
});
};
const onTerminate = () => {
settle(() => {
controller?.close();
});
};
return new ReadableStream({
start(streamController) {
controller = streamController;
stream.on("data", onData);
stream.on("error", onError);
stream.on("end", onTerminate);
stream.on("close", onTerminate);
stream.pause();
},
pull() {
if (!settled) stream.resume();
},
cancel() {
settle();
const ignoreError = () => {};
stream.on("error", ignoreError);
stream.once("close", () => stream.off("error", ignoreError));
stream.destroy();
}
});
};
//#endregion
export { createStreamBody };
@@ -0,0 +1 @@
{"version":3,"names":["_toBlock","require","ensureBlock","node","key","result","toBlock"],"sources":["../../src/converters/ensureBlock.ts"],"sourcesContent":["import toBlock from \"./toBlock.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Ensure the `key` (defaults to \"body\") of a `node` is a block.\n * Casting it to a block if it is not.\n *\n * Returns the BlockStatement\n */\nexport default function ensureBlock(\n node: t.Node,\n key: string = \"body\",\n): t.BlockStatement {\n // @ts-expect-error Fixme: key may not exist in node, consider remove key = \"body\"\n const result = toBlock(node[key], node);\n // @ts-expect-error Fixme: key may not exist in node, consider remove key = \"body\"\n node[key] = result;\n return result;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AASe,SAASC,WAAWA,CACjCC,IAAY,EACZC,GAAW,GAAG,MAAM,EACF;EAElB,MAAMC,MAAM,GAAG,IAAAC,gBAAO,EAACH,IAAI,CAACC,GAAG,CAAC,EAAED,IAAI,CAAC;EAEvCA,IAAI,CAACC,GAAG,CAAC,GAAGC,MAAM;EAClB,OAAOA,MAAM;AACf","ignoreList":[]}
@@ -0,0 +1,24 @@
"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.es2018_full = void 0;
const dom_1 = require("./dom");
const dom_asynciterable_1 = require("./dom.asynciterable");
const dom_iterable_1 = require("./dom.iterable");
const es2018_1 = require("./es2018");
const scripthost_1 = require("./scripthost");
const webworker_importscripts_1 = require("./webworker.importscripts");
exports.es2018_full = {
libs: [
es2018_1.es2018,
dom_1.dom,
webworker_importscripts_1.webworker_importscripts,
scripthost_1.scripthost,
dom_iterable_1.dom_iterable,
dom_asynciterable_1.dom_asynciterable,
],
variables: [],
};
@@ -0,0 +1,21 @@
import SourceMap from './source-map.cts';
import type { SourceMapInput, SourceMapLoader, Options } from './types.cts';
export type { SourceMapSegment, EncodedSourceMap, EncodedSourceMap as RawSourceMap, DecodedSourceMap, SourceMapInput, SourceMapLoader, LoaderContext, Options, } from './types.cts';
export type { SourceMap };
/**
* Traces through all the mappings in the root sourcemap, through the sources
* (and their sourcemaps), all the way back to the original source location.
*
* `loader` will be called every time we encounter a source file. If it returns
* a sourcemap, we will recurse into that sourcemap to continue the trace. If
* it returns a falsey value, that source file is treated as an original,
* unmodified source file.
*
* Pass `excludeContent` to exclude any self-containing source file content
* from the output sourcemap.
*
* Pass `decodedMappings` to receive a SourceMap with decoded (instead of
* VLQ encoded) mappings.
*/
export = function remapping(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader, options?: boolean | Options): SourceMap;
//# sourceMappingURL=remapping.d.ts.map
@@ -0,0 +1,22 @@
/**
* Check if value is an async function
*
* 校验是否为函数
*
* @example
* ```js
* import { isAsyncFunction } from 'is-what-type';
*
* isFunction(async () => { }); // true
* isFunction(() => { }); // true
* isFunction(function() { }); // true
* isFunction(async function() { }); // true
* isFunction(123); // false
* isFunction('string'); // false
* isFunction({}); // false
* ```
*
* @param value - The value to check
* @returns `true` if `value` is an async function, `false` otherwise
*/
export declare function isFunction<T = (...args: any[]) => any>(value: unknown): value is T;
@@ -0,0 +1 @@
{"version":3,"names":["_initializerWarningHelper","descriptor","context","Error"],"sources":["../../src/helpers/initializerWarningHelper.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport default function _initializerWarningHelper(\n descriptor: PropertyDescriptor,\n context: DecoratorContext,\n): never {\n throw new Error(\n \"Decorating class property failed. Please ensure that \" +\n \"transform-class-properties is enabled and runs after the decorators transform.\",\n );\n}\n"],"mappings":";;;;;;AAGe,SAASA,yBAAyBA,CAC/CC,UAA8B,EAC9BC,OAAyB,EAClB;EACP,MAAM,IAAIC,KAAK,CACb,uDAAuD,GACrD,gFACJ,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/index.ts", "../src/use-size.tsx"],
"sourcesContent": ["export { useSize } from './use-size';\n", "import * as React from 'react';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\n\nfunction useSize(element: HTMLElement | null) {\n const [size, setSize] = React.useState<{ width: number; height: number } | undefined>(undefined);\n\n useLayoutEffect(() => {\n if (element) {\n // provide size as early as possible\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n\n // Since we only observe the one element, we don't need to loop over the\n // array\n if (!entries.length) {\n return;\n }\n\n const entry = entries[0]!;\n let width: number;\n let height: number;\n\n if ('borderBoxSize' in entry) {\n const borderSizeEntry = entry['borderBoxSize'];\n // iron out differences between browsers\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize['inlineSize'];\n height = borderSize['blockSize'];\n } else {\n // for browsers that don't support `borderBoxSize`\n // we calculate it ourselves to get the correct border box.\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n\n setSize({ width, height });\n });\n\n resizeObserver.observe(element, { box: 'border-box' });\n\n return () => resizeObserver.unobserve(element);\n } else {\n // We only want to reset to `undefined` when the element becomes `null`,\n // not if it changes to another element.\n setSize(undefined);\n }\n }, [element]);\n\n return size;\n}\n\nexport { useSize };\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,qCAAgC;AAEhC,SAAS,QAAQ,SAA6B;AAC5C,QAAM,CAAC,MAAM,OAAO,IAAU,eAAwD,MAAS;AAE/F,sDAAgB,MAAM;AACpB,QAAI,SAAS;AAEX,cAAQ,EAAE,OAAO,QAAQ,aAAa,QAAQ,QAAQ,aAAa,CAAC;AAEpE,YAAM,iBAAiB,IAAI,eAAe,CAAC,YAAY;AACrD,YAAI,CAAC,MAAM,QAAQ,OAAO,GAAG;AAC3B;AAAA,QACF;AAIA,YAAI,CAAC,QAAQ,QAAQ;AACnB;AAAA,QACF;AAEA,cAAM,QAAQ,QAAQ,CAAC;AACvB,YAAI;AACJ,YAAI;AAEJ,YAAI,mBAAmB,OAAO;AAC5B,gBAAM,kBAAkB,MAAM,eAAe;AAE7C,gBAAM,aAAa,MAAM,QAAQ,eAAe,IAAI,gBAAgB,CAAC,IAAI;AACzE,kBAAQ,WAAW,YAAY;AAC/B,mBAAS,WAAW,WAAW;AAAA,QACjC,OAAO;AAGL,kBAAQ,QAAQ;AAChB,mBAAS,QAAQ;AAAA,QACnB;AAEA,gBAAQ,EAAE,OAAO,OAAO,CAAC;AAAA,MAC3B,CAAC;AAED,qBAAe,QAAQ,SAAS,EAAE,KAAK,aAAa,CAAC;AAErD,aAAO,MAAM,eAAe,UAAU,OAAO;AAAA,IAC/C,OAAO;AAGL,cAAQ,MAAS;AAAA,IACnB;AAAA,EACF,GAAG,CAAC,OAAO,CAAC;AAEZ,SAAO;AACT;",
"names": []
}
@@ -0,0 +1 @@
{"version":3,"file":"diamond-plus.js","sources":["../../../src/icons/diamond-plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name DiamondPlus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgOHY4IiAvPgogIDxwYXRoIGQ9Ik0yLjcgMTAuM2EyLjQxIDIuNDEgMCAwIDAgMCAzLjQxbDcuNTkgNy41OWEyLjQxIDIuNDEgMCAwIDAgMy40MSAwbDcuNTktNy41OWEyLjQxIDIuNDEgMCAwIDAgMC0zLjQxTDEzLjcgMi43MWEyLjQxIDIuNDEgMCAwIDAtMy40MSAweiIgLz4KICA8cGF0aCBkPSJNOCAxMmg4IiAvPgo8L3N2Zz4=) - https://lucide.dev/icons/diamond-plus\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 DiamondPlus = createLucideIcon('DiamondPlus', [\n ['path', { d: 'M12 8v8', key: 'napkw2' }],\n [\n 'path',\n {\n d: 'M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41L13.7 2.71a2.41 2.41 0 0 0-3.41 0z',\n key: '1ey20j',\n },\n ],\n ['path', { d: 'M8 12h8', key: '1wcyev' }],\n]);\n\nexport default DiamondPlus;\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,CAAA,CAClD,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,CACxC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,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,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,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,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;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,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;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,627 @@
export default `flf2a$ 6 6 12 63 13 0 24511 0
Author :myflix
Date : 2003/11/6 19:07:12
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
Changed 2012-05-21: Update to "!" character by patorjk
#
o O O #
o #
TS__[O] #
{======| #
./o--000' ##
_ #
| | #
|_| #
_(_)_ #
_| """ | #
"\`-0-0-' ##
_ _ #
( | ) #
V V #
_____ #
_| | #
"\`-0-0-' ##
_| | |_ #
|_ . _| #
|_ _| #
|_|_| #
_|"""""| #
"\`-0-0-' ##
||_ #
(_-< #
/ _/ #
_||__ #
_|"""""| #
"\`-0-0-' ##
_ __ #
(_)/ / #
/ /_ #
/_/(_) #
_|"""""| #
"\`-0-0-' ##
_ #
/ _|___ #
> _|_ _| #
\\_____| #
_|"""""| #
"\`-0-0-' ##
(") #
\\| #
#
_____ #
_| | #
"\`-0-0-' ##
/ / #
| | #
| | #
_\\_\\_ #
_|"""""| #
"\`-0-0-' ##
\\"\\ #
| | #
| | #
/_/__ #
_|"""""| #
"\`-0-0-' ##
_/\\_ #
> < #
\\/ #
_____ #
_| | #
"\`-0-0-' ##
_|"|_ #
|_ _| #
|_| #
_____ #
_| | #
"\`-0-0-' ##
#
_ #
( ) #
_|/__ #
_|"""""| #
"\`-0-0-' ##
#
___ #
|___| #
_____ #
_| | #
"\`-0-0-' ##
#
#
_ #
_(_)_ #
_|"""""| #
"\`-0-0-' ##
__ #
/"/ #
/ / #
_/_/_ #
_|"""""| #
"\`-0-0-' ##
__ #
/ \\ #
| () | #
_\\__/ #
_|"""""| #
"\`-0-0-' ##
_ #
/ | #
| | #
_|_|_ #
_|"""""| #
"\`-0-0-' ##
___ #
|_ ) #
/ / #
/___| #
_|"""""| #
"\`-0-0-' ##
____ #
|__ / #
|_ \\ #
|___/ #
_|"""""| #
"\`-0-0-' ##
_ _ #
| | | #
|_ _| #
_|_|_ #
_|"""""| #
"\`-0-0-' ##
___ #
| __| #
|__ \\ #
|___/ #
_|"""""| #
"\`-0-0-' ##
__ #
/ / #
/ _ \\ #
\\___/ #
_|"""""| #
"\`-0-0-' ##
____ #
|__ | #
/ / #
_/_/_ #
_|"""""| #
"\`-0-0-' ##
___ #
( _ ) #
/ _ \\ #
\\___/ #
_|"""""| #
"\`-0-0-' ##
___ #
/ _ \\ #
\\_, / #
_/_/_ #
_|"""""| #
"\`-0-0-' ##
_ #
(_) #
_ #
_(_)_ #
_|"""""| #
"\`-0-0-' ##
(_) #
_ #
( ) #
_|/__ #
_|"""""| #
"\`-0-0-' ##
__ #
/ / #
< < #
_\\_\\_ #
_|"""""| #
"\`-0-0-' ##
___ #
|___| #
|___| #
_____ #
_| | #
"\`-0-0-' ##
__ #
\\ \\ #
> > #
_/_/_ #
_|"""""| #
"\`-0-0-' ##
___ #
|__ \\ #
/_/ #
_(_)_ #
_|"""""| #
"\`-0-0-' ##
/ __ \\ #
/ / _\` | #
\\ \\__,_| #
\\____/ #
_|"""""| #
"\`-0-0-' ##
___ #
/ \\ #
| - | #
|_|_| #
_|"""""| #
"\`-0-0-' ##
___ #
| _ ) #
| _ \\ #
|___/ #
_|"""""| #
"\`-0-0-' ##
___ #
/ __| #
| (__ #
\\___| #
_|"""""| #
"\`-0-0-' ##
___ #
| \\ #
| |) | #
|___/ #
_|"""""| #
"\`-0-0-' ##
___ #
| __| #
| _| #
|___| #
_|"""""| #
"\`-0-0-' ##
___ #
| __| #
| _| #
_|_|_ #
_| """ | #
"\`-0-0-' ##
___ #
/ __| #
| (_ | #
\\___| #
_|"""""| #
"\`-0-0-' ##
_ _ #
| || | #
| __ | #
|_||_| #
_|"""""| #
"\`-0-0-' ##
___ #
|_ _| #
| | #
|___| #
_|"""""| #
"\`-0-0-' ##
_ #
_ | | #
| || | #
_\\__/ #
_|"""""| #
"\`-0-0-' ##
_ __ #
| |/ / #
| ' < #
|_|\\_\\ #
_|"""""| #
"\`-0-0-' ##
_ #
| | #
| |__ #
|____| #
_|"""""| #
"\`-0-0-' ##
__ __ #
| \\/ | #
| |\\/| | #
|_|__|_| #
_|"""""| #
"\`-0-0-' ##
_ _ #
| \\| | #
| .\` | #
|_|\\_| #
_|"""""| #
"\`-0-0-' ##
___ #
/ _ \\ #
| (_) | #
\\___/ #
_|"""""| #
"\`-0-0-' ##
___ #
| _ \\ #
| _/ #
_|_|_ #
_| """ | #
"\`-0-0-' ##
___ #
/ _ \\ #
| (_) | #
\\__\\_\\ #
_|"""""| #
"\`-0-0-' ##
___ #
| _ \\ #
| / #
|_|_\\ #
_|"""""| #
"\`-0-0-' ##
___ #
/ __| #
\\__ \\ #
|___/ #
_|"""""| #
"\`-0-0-' ##
_____ #
|_ _| #
| | #
_|_|_ #
_|"""""| #
"\`-0-0-' ##
_ _ #
| | | | #
| |_| | #
\\___/ #
_|"""""| #
"\`-0-0-' ##
__ __ #
\\ \\ / / #
\\ V / #
_\\_/_ #
_| """"| #
"\`-0-0-' ##
__ __#
\\ \\ / /#
\\ \\/\\/ / #
\\_/\\_/ #
_|"""""| #
"\`-0-0-' ##
__ __ #
\\ \\/ / #
> < #
/_/\\_\\ #
_|"""""| #
"\`-0-0-' ##
__ __ #
\\ \\ / / #
\\ V / #
_|_|_ #
_| """ | #
"\`-0-0-' ##
____ #
|_ / #
/ / #
/___| #
_|"""""| #
"\`-0-0-' ##
|""| #
| | #
| | #
|__|_ #
_|"""""| #
"\`-0-0-' ##
__ #
\\ \\ #
\\ \\ #
_\\_\\_ #
_|"""""| #
"\`-0-0-' ##
|""| #
| | #
| | #
|__|_ #
_|"""""| #
"\`-0-0-' ##
/\\ #
|/\\| #
#
_____ #
_| | #
"\`-0-0-' ##
#
#
___ #
|___| #
_|"""""| #
"\`-0-0-' ##
(") #
\\| #
#
_____ #
_| | #
"\`-0-0-' ##
#
__ _ #
/ _\` | #
\\__,_| #
_|"""""| #
"\`-0-0-' ##
_ #
| |__ #
| '_ \\ #
|_.__/ #
_|"""""| #
"\`-0-0-' ##
#
__ #
/ _| #
\\__|_ #
_|"""""| #
"\`-0-0-' ##
_ #
__| | #
/ _\` | #
\\__,_| #
_|"""""| #
"\`-0-0-' ##
#
___ #
/ -_) #
\\___| #
_|"""""| #
"\`-0-0-' ##
__ #
/ _| #
| _| #
_|_|_ #
_|"""""| #
"\`-0-0-' ##
__ _ #
/ _\` | #
\\__, | #
|___/ #
_|"""""| #
"\`-0-0-' ##
_ #
| |_ #
| ' \\ #
|_||_| #
_|"""""| #
"\`-0-0-' ##
_ #
(_) #
| | #
_|_|_ #
_|"""""| #
"\`-0-0-' ##
(_) #
| | #
_/ | #
|__/_ #
_|"""""| #
"\`-0-0-' ##
_ #
| |__ #
| / / #
|_\\_\\ #
_|"""""| #
"\`-0-0-' ##
_ #
| | #
| | #
_|_|_ #
_|"""""| #
"\`-0-0-' ##
#
_ __ #
| ' \\ #
|_|_|_| #
_|"""""| #
"\`-0-0-' ##
#
_ _ #
| ' \\ #
|_||_| #
_|"""""| #
"\`-0-0-' ##
#
___ #
/ _ \\ #
\\___/ #
_|"""""| #
"\`-0-0-' ##
_ __ #
| '_ \\ #
| .__/ #
|_|__ #
_|"""""| #
"\`-0-0-' ##
__ _ #
/ _\` | #
\\__, | #
__|_| #
_|"""""| #
"\`-0-0-' ##
#
_ _ #
| '_| #
_|_|_ #
_|"""""| #
"\`-0-0-' ##
#
___ #
(_-< #
/__/_ #
_|"""""| #
"\`-0-0-' ##
_ #
| |_ #
| _| #
_\\__| #
_|"""""| #
"\`-0-0-' ##
#
_ _ #
| +| | #
\\_,_| #
_|"""""| #
"\`-0-0-' ##
#
__ __ #
\\ V / #
_\\_/_ #
_|"""""| #
"\`-0-0-' ##
#
__ __ __ #
\\ V V / #
\\_/\\_/ #
_|"""""| #
"\`-0-0-' ##
#
__ __ #
\\ \\ / #
/_\\_\\ #
_|"""""| #
"\`-0-0-' ##
_ _ #
| || | #
\\_, | #
_|__/ #
_| """"| #
"\`-0-0-' ##
#
___ #
|_ / #
_/__| #
_|"""""| #
"\`-0-0-' ##
/"/ #
_| | #
| | #
_\\_\\_ #
_|"""""| #
"\`-0-0-' ##
|"| #
| | #
| | #
_|_|_ #
_|"""""| #
"\`-0-0-' ##
\\"\\ #
| |_ #
| | #
/_/__ #
_|"""""| #
"\`-0-0-' ##
/\\/| #
|/\\/ #
#
_____ #
_| | #
"\`-0-0-' ##
#
#
#
#
#
_ _ ##
�#
#
#
#
#
##
�#
#
#
#
#
##
�#
#
#
#
#
##
�#
#
#
#
#
##
�#
#
#
#
#
##
�#
#
#
#
#
##
`
@@ -0,0 +1,84 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
class Binding {
constructor({
identifier,
scope,
path,
kind
}) {
this.identifier = void 0;
this.scope = void 0;
this.path = void 0;
this.kind = void 0;
this.constantViolations = [];
this.constant = true;
this.referencePaths = [];
this.referenced = false;
this.references = 0;
this.identifier = identifier;
this.scope = scope;
this.path = path;
this.kind = kind;
if ((kind === "var" || kind === "hoisted") && isInitInLoop(path)) {
this.reassign(path);
}
this.clearValue();
}
deoptValue() {
this.clearValue();
this.hasDeoptedValue = true;
}
setValue(value) {
if (this.hasDeoptedValue) return;
this.hasValue = true;
this.value = value;
}
clearValue() {
this.hasDeoptedValue = false;
this.hasValue = false;
this.value = null;
}
reassign(path) {
this.constant = false;
if (this.constantViolations.includes(path)) {
return;
}
this.constantViolations.push(path);
}
reference(path) {
if (this.referencePaths.includes(path)) {
return;
}
this.referenced = true;
this.references++;
this.referencePaths.push(path);
}
dereference() {
this.references--;
this.referenced = !!this.references;
}
}
exports.default = Binding;
function isInitInLoop(path) {
const isFunctionDeclarationOrHasInit = !path.isVariableDeclarator() || path.node.init;
for (let {
parentPath,
key
} = path; parentPath; {
parentPath,
key
} = parentPath) {
if (parentPath.isFunctionParent()) return false;
if (key === "left" && parentPath.isForXStatement() || isFunctionDeclarationOrHasInit && key === "body" && parentPath.isLoop()) {
return true;
}
}
return false;
}
//# sourceMappingURL=binding.js.map
@@ -0,0 +1,112 @@
import type {
CodeKeywordDefinition,
ErrorObject,
KeywordErrorDefinition,
SchemaMap,
AnySchema,
} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {_, str} from "../../compile/codegen"
import {alwaysValidSchema} from "../../compile/util"
import {checkReportMissingProp, checkMissingProp, reportMissingProp, propertyInData} from "../code"
export type PropertyDependencies = {[K in string]?: string[]}
export interface DependenciesErrorParams {
property: string
missingProperty: string
depsCount: number
deps: string // TODO change to string[]
}
type SchemaDependencies = SchemaMap
export type DependenciesError = ErrorObject<
"dependencies",
DependenciesErrorParams,
{[K in string]?: string[] | AnySchema}
>
export const error: KeywordErrorDefinition = {
message: ({params: {property, depsCount, deps}}) => {
const property_ies = depsCount === 1 ? "property" : "properties"
return str`must have ${property_ies} ${deps} when property ${property} is present`
},
params: ({params: {property, depsCount, deps, missingProperty}}) =>
_`{property: ${property},
missingProperty: ${missingProperty},
depsCount: ${depsCount},
deps: ${deps}}`, // TODO change to reference
}
const def: CodeKeywordDefinition = {
keyword: "dependencies",
type: "object",
schemaType: "object",
error,
code(cxt: KeywordCxt) {
const [propDeps, schDeps] = splitDependencies(cxt)
validatePropertyDeps(cxt, propDeps)
validateSchemaDeps(cxt, schDeps)
},
}
function splitDependencies({schema}: KeywordCxt): [PropertyDependencies, SchemaDependencies] {
const propertyDeps: PropertyDependencies = {}
const schemaDeps: SchemaDependencies = {}
for (const key in schema) {
if (key === "__proto__") continue
const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps
deps[key] = schema[key]
}
return [propertyDeps, schemaDeps]
}
export function validatePropertyDeps(
cxt: KeywordCxt,
propertyDeps: {[K in string]?: string[]} = cxt.schema
): void {
const {gen, data, it} = cxt
if (Object.keys(propertyDeps).length === 0) return
const missing = gen.let("missing")
for (const prop in propertyDeps) {
const deps = propertyDeps[prop] as string[]
if (deps.length === 0) continue
const hasProperty = propertyInData(gen, data, prop, it.opts.ownProperties)
cxt.setParams({
property: prop,
depsCount: deps.length,
deps: deps.join(", "),
})
if (it.allErrors) {
gen.if(hasProperty, () => {
for (const depProp of deps) {
checkReportMissingProp(cxt, depProp)
}
})
} else {
gen.if(_`${hasProperty} && (${checkMissingProp(cxt, deps, missing)})`)
reportMissingProp(cxt, missing)
gen.else()
}
}
}
export function validateSchemaDeps(cxt: KeywordCxt, schemaDeps: SchemaMap = cxt.schema): void {
const {gen, data, keyword, it} = cxt
const valid = gen.name("valid")
for (const prop in schemaDeps) {
if (alwaysValidSchema(it, schemaDeps[prop] as AnySchema)) continue
gen.if(
propertyInData(gen, data, prop, it.opts.ownProperties),
() => {
const schCxt = cxt.subschema({keyword, schemaProp: prop}, valid)
cxt.mergeValidEvaluated(schCxt, valid)
},
() => gen.var(valid, true) // TODO var
)
cxt.ok(valid)
}
}
export default def
@@ -0,0 +1 @@
{"version":3,"file":"create-generator-easing.mjs","sources":["../../../../../src/animation/generators/utils/create-generator-easing.ts"],"sourcesContent":["import { millisecondsToSeconds } from \"motion-utils\"\nimport { GeneratorFactory, Transition } from \"../../types\"\nimport { calcGeneratorDuration, maxGeneratorDuration } from \"./calc-duration\"\n\n/**\n * Create a progress => progress easing function from a generator.\n */\nexport function createGeneratorEasing(\n options: Transition,\n scale = 100,\n createGenerator: GeneratorFactory\n) {\n const generator = createGenerator({ ...options, keyframes: [0, scale] })\n const duration = Math.min(\n calcGeneratorDuration(generator),\n maxGeneratorDuration\n )\n\n return {\n type: \"keyframes\",\n ease: (progress: number) => {\n return generator.next(duration * progress).value / scale\n },\n duration: millisecondsToSeconds(duration),\n }\n}\n"],"names":[],"mappings":";;;AAIA;;AAEG;AACG,SAAU,qBAAqB,CACjC,OAAmB,EACnB,KAAK,GAAG,GAAG,EACX,eAAiC,EAAA;AAEjC,IAAA,MAAM,SAAS,GAAG,eAAe,CAAC,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;AACxE,IAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CACrB,qBAAqB,CAAC,SAAS,CAAC,EAChC,oBAAoB,CACvB;IAED,OAAO;AACH,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,IAAI,EAAE,CAAC,QAAgB,KAAI;AACvB,YAAA,OAAO,SAAS,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC,KAAK,GAAG,KAAK;QAC5D,CAAC;AACD,QAAA,QAAQ,EAAE,qBAAqB,CAAC,QAAQ,CAAC;KAC5C;AACL;;;;"}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_A","2":"_Z"},B:{"1":"_J"},C:{"1":"_3L","2":"_KP","194":"_wK _8G"},D:{"1":"_Q"},E:{"1":"_nB","2":"_k"},F:{"1":"_0F","2":"_fB","16":"aD"},G:{"1":"_t","2":"_d"},H:{"2":"1D"},I:{"1":"_X","2":"_W"},J:{"1":"_B"},K:{"1":"_CB","2":"A"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:1,C:"Channel messaging",D:true};
@@ -0,0 +1,14 @@
import type * as core from "../core/index.js";
import * as schemas from "./schemas.js";
/** Distributes `.partial()` through every object in a schema type, preserving the wrappers around them. */
export type DeepPartial<T extends core.SomeType> = T extends schemas.ZodObject<infer Shape, infer Config> ? schemas.ZodObject<{
-readonly [K in keyof Shape]: schemas.ZodOptional<DeepPartial<Shape[K]>>;
}, Config> : T extends schemas.ZodDiscriminatedUnion<infer Options, any> ? schemas.ZodUnion<{
-readonly [I in keyof Options]: Options[I] extends core.SomeType ? DeepPartial<Options[I]> : Options[I];
}> : T extends schemas.ZodUnion<infer Options> ? schemas.ZodUnion<{
-readonly [I in keyof Options]: Options[I] extends core.SomeType ? DeepPartial<Options[I]> : Options[I];
}> : T extends schemas.ZodArray<infer El> ? schemas.ZodArray<DeepPartial<El>> : T extends schemas.ZodTuple<infer Items, infer Rest> ? schemas.ZodTuple<{
-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.ZodIntersection<infer A, infer B> ? schemas.ZodIntersection<DeepPartial<A>, DeepPartial<B>> : T extends schemas.ZodRecord<infer K, infer V> ? schemas.ZodRecord<K, DeepPartial<V>> : T extends schemas.ZodMap<infer K, infer V> ? schemas.ZodMap<K, DeepPartial<V>> : T extends schemas.ZodSet<infer El> ? schemas.ZodSet<DeepPartial<El>> : T extends schemas.ZodOptional<infer Inner> ? schemas.ZodOptional<DeepPartial<Inner>> : T extends schemas.ZodNullable<infer Inner> ? schemas.ZodNullable<DeepPartial<Inner>> : T extends schemas.ZodDefault<infer Inner> ? schemas.ZodDefault<DeepPartial<Inner>> : T extends schemas.ZodPrefault<infer Inner> ? schemas.ZodPrefault<DeepPartial<Inner>> : T extends schemas.ZodNonOptional<infer Inner> ? schemas.ZodNonOptional<DeepPartial<Inner>> : T extends schemas.ZodCatch<infer Inner> ? schemas.ZodCatch<DeepPartial<Inner>> : T extends schemas.ZodReadonly<infer Inner> ? schemas.ZodReadonly<DeepPartial<Inner>> : T extends schemas.ZodSuccess<infer Inner> ? schemas.ZodSuccess<DeepPartial<Inner>> : T extends schemas.ZodPromise<infer Inner> ? schemas.ZodPromise<DeepPartial<Inner>> : T extends schemas.ZodCodec<infer A, infer B> ? schemas.ZodCodec<DeepPartial<A>, DeepPartial<B>> : T extends schemas.ZodPreprocess<infer B> ? schemas.ZodPreprocess<DeepPartial<B>> : T extends schemas.ZodPipe<infer A, infer B> ? schemas.ZodPipe<DeepPartial<A>, DeepPartial<B>> : T extends schemas.ZodLazy<infer Inner> ? schemas.ZodLazy<DeepPartial<Inner>> : T;
/** Returns a copy of the schema with every nested object's properties made optional. */
export declare function deepPartial<T extends core.SomeType>(schema: T): DeepPartial<T>;
@@ -0,0 +1,251 @@
/**
* @fileoverview Disallows or enforces spaces inside computed properties.
* @author Jamund Ferguson
* @deprecated in ESLint v8.53.0
*/
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "computed-property-spacing",
url: "https://eslint.style/rules/computed-property-spacing",
},
},
],
},
type: "layout",
docs: {
description:
"Enforce consistent spacing inside computed property brackets",
recommended: false,
url: "https://eslint.org/docs/latest/rules/computed-property-spacing",
},
fixable: "whitespace",
schema: [
{
enum: ["always", "never"],
},
{
type: "object",
properties: {
enforceForClassMembers: {
type: "boolean",
default: true,
},
},
additionalProperties: false,
},
],
messages: {
unexpectedSpaceBefore:
"There should be no space before '{{tokenValue}}'.",
unexpectedSpaceAfter:
"There should be no space after '{{tokenValue}}'.",
missingSpaceBefore: "A space is required before '{{tokenValue}}'.",
missingSpaceAfter: "A space is required after '{{tokenValue}}'.",
},
},
create(context) {
const sourceCode = context.sourceCode;
const propertyNameMustBeSpaced = context.options[0] === "always"; // default is "never"
const enforceForClassMembers =
!context.options[1] || context.options[1].enforceForClassMembers;
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
/**
* Reports that there shouldn't be a space after the first token
* @param {ASTNode} node The node to report in the event of an error.
* @param {Token} token The token to use for the report.
* @param {Token} tokenAfter The token after `token`.
* @returns {void}
*/
function reportNoBeginningSpace(node, token, tokenAfter) {
context.report({
node,
loc: { start: token.loc.end, end: tokenAfter.loc.start },
messageId: "unexpectedSpaceAfter",
data: {
tokenValue: token.value,
},
fix(fixer) {
return fixer.removeRange([
token.range[1],
tokenAfter.range[0],
]);
},
});
}
/**
* Reports that there shouldn't be a space before the last token
* @param {ASTNode} node The node to report in the event of an error.
* @param {Token} token The token to use for the report.
* @param {Token} tokenBefore The token before `token`.
* @returns {void}
*/
function reportNoEndingSpace(node, token, tokenBefore) {
context.report({
node,
loc: { start: tokenBefore.loc.end, end: token.loc.start },
messageId: "unexpectedSpaceBefore",
data: {
tokenValue: token.value,
},
fix(fixer) {
return fixer.removeRange([
tokenBefore.range[1],
token.range[0],
]);
},
});
}
/**
* Reports that there should be a space after the first token
* @param {ASTNode} node The node to report in the event of an error.
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportRequiredBeginningSpace(node, token) {
context.report({
node,
loc: token.loc,
messageId: "missingSpaceAfter",
data: {
tokenValue: token.value,
},
fix(fixer) {
return fixer.insertTextAfter(token, " ");
},
});
}
/**
* Reports that there should be a space before the last token
* @param {ASTNode} node The node to report in the event of an error.
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportRequiredEndingSpace(node, token) {
context.report({
node,
loc: token.loc,
messageId: "missingSpaceBefore",
data: {
tokenValue: token.value,
},
fix(fixer) {
return fixer.insertTextBefore(token, " ");
},
});
}
/**
* Returns a function that checks the spacing of a node on the property name
* that was passed in.
* @param {string} propertyName The property on the node to check for spacing
* @returns {Function} A function that will check spacing on a node
*/
function checkSpacing(propertyName) {
return function (node) {
if (!node.computed) {
return;
}
const property = node[propertyName];
const before = sourceCode.getTokenBefore(
property,
astUtils.isOpeningBracketToken,
),
first = sourceCode.getTokenAfter(before, {
includeComments: true,
}),
after = sourceCode.getTokenAfter(
property,
astUtils.isClosingBracketToken,
),
last = sourceCode.getTokenBefore(after, {
includeComments: true,
});
if (astUtils.isTokenOnSameLine(before, first)) {
if (propertyNameMustBeSpaced) {
if (
!sourceCode.isSpaceBetween(before, first) &&
astUtils.isTokenOnSameLine(before, first)
) {
reportRequiredBeginningSpace(node, before);
}
} else {
if (sourceCode.isSpaceBetween(before, first)) {
reportNoBeginningSpace(node, before, first);
}
}
}
if (astUtils.isTokenOnSameLine(last, after)) {
if (propertyNameMustBeSpaced) {
if (
!sourceCode.isSpaceBetween(last, after) &&
astUtils.isTokenOnSameLine(last, after)
) {
reportRequiredEndingSpace(node, after);
}
} else {
if (sourceCode.isSpaceBetween(last, after)) {
reportNoEndingSpace(node, after, last);
}
}
}
};
}
//--------------------------------------------------------------------------
// Public
//--------------------------------------------------------------------------
const listeners = {
Property: checkSpacing("key"),
MemberExpression: checkSpacing("property"),
};
if (enforceForClassMembers) {
listeners.MethodDefinition = listeners.PropertyDefinition =
listeners.Property;
}
return listeners;
},
};
@@ -0,0 +1,106 @@
import { K as isSingleLine, f as createRule, g as import_ast_utils } from "../utils.js";
var multiline_ternary_default = createRule({
name: "multiline-ternary",
meta: {
type: "layout",
docs: { description: "Enforce newlines between operands of ternary expressions" },
fixable: "whitespace",
schema: [{
type: "string",
enum: [
"always",
"always-multiline",
"never"
]
}, {
type: "object",
properties: { ignoreJSX: { type: "boolean" } },
additionalProperties: false
}],
defaultOptions: ["always"],
messages: {
expectedTestCons: "Expected newline between test and consequent of ternary expression.",
expectedConsAlt: "Expected newline between consequent and alternate of ternary expression.",
unexpectedTestCons: "Unexpected newline between test and consequent of ternary expression.",
unexpectedConsAlt: "Unexpected newline between consequent and alternate of ternary expression."
}
},
create(context, [style, options = {}]) {
const multiline = style !== "never";
const allowSingleLine = style === "always-multiline";
const { ignoreJSX } = options;
const sourceCode = context.sourceCode;
return { ConditionalExpression(node) {
const questionToken = sourceCode.getTokenAfter(node.test, import_ast_utils.isNotClosingParenToken);
const colonToken = sourceCode.getTokenAfter(node.consequent, import_ast_utils.isNotClosingParenToken);
const firstTokenOfTest = sourceCode.getFirstToken(node);
const lastTokenOfTest = sourceCode.getTokenBefore(questionToken);
const firstTokenOfConsequent = sourceCode.getTokenAfter(questionToken);
const lastTokenOfConsequent = sourceCode.getTokenBefore(colonToken);
const firstTokenOfAlternate = sourceCode.getTokenAfter(colonToken);
const areTestAndConsequentOnSameLine = (0, import_ast_utils.isTokenOnSameLine)(lastTokenOfTest, firstTokenOfConsequent);
const areConsequentAndAlternateOnSameLine = (0, import_ast_utils.isTokenOnSameLine)(lastTokenOfConsequent, firstTokenOfAlternate);
const hasComments = !!sourceCode.getCommentsInside(node).length;
if (ignoreJSX) {
if (node.parent.type === "JSXElement" || node.parent.type === "JSXFragment" || node.parent.type === "JSXExpressionContainer") return null;
}
if (!multiline) {
if (!areTestAndConsequentOnSameLine) context.report({
node: node.test,
loc: {
start: firstTokenOfTest.loc.start,
end: lastTokenOfTest.loc.end
},
messageId: "unexpectedTestCons",
fix(fixer) {
if (hasComments) return null;
const fixers = [];
const areTestAndQuestionOnSameLine = (0, import_ast_utils.isTokenOnSameLine)(lastTokenOfTest, questionToken);
const areQuestionAndConsOnSameLine = (0, import_ast_utils.isTokenOnSameLine)(questionToken, firstTokenOfConsequent);
if (!areTestAndQuestionOnSameLine) fixers.push(fixer.removeRange([lastTokenOfTest.range[1], questionToken.range[0]]));
if (!areQuestionAndConsOnSameLine) fixers.push(fixer.removeRange([questionToken.range[1], firstTokenOfConsequent.range[0]]));
return fixers;
}
});
if (!areConsequentAndAlternateOnSameLine) context.report({
node: node.consequent,
loc: {
start: firstTokenOfConsequent.loc.start,
end: lastTokenOfConsequent.loc.end
},
messageId: "unexpectedConsAlt",
fix(fixer) {
if (hasComments) return null;
const fixers = [];
const areConsAndColonOnSameLine = (0, import_ast_utils.isTokenOnSameLine)(lastTokenOfConsequent, colonToken);
const areColonAndAltOnSameLine = (0, import_ast_utils.isTokenOnSameLine)(colonToken, firstTokenOfAlternate);
if (!areConsAndColonOnSameLine) fixers.push(fixer.removeRange([lastTokenOfConsequent.range[1], colonToken.range[0]]));
if (!areColonAndAltOnSameLine) fixers.push(fixer.removeRange([colonToken.range[1], firstTokenOfAlternate.range[0]]));
return fixers;
}
});
} else {
if (allowSingleLine && isSingleLine(node)) return;
if (areTestAndConsequentOnSameLine) context.report({
node: node.test,
loc: {
start: firstTokenOfTest.loc.start,
end: lastTokenOfTest.loc.end
},
messageId: "expectedTestCons",
fix: (fixer) => hasComments ? null : fixer.replaceTextRange([lastTokenOfTest.range[1], questionToken.range[0]], "\n")
});
if (areConsequentAndAlternateOnSameLine) context.report({
node: node.consequent,
loc: {
start: firstTokenOfConsequent.loc.start,
end: lastTokenOfConsequent.loc.end
},
messageId: "expectedConsAlt",
fix: (fixer) => hasComments ? null : fixer.replaceTextRange([lastTokenOfConsequent.range[1], colonToken.range[0]], "\n")
});
}
} };
}
});
export { multiline_ternary_default as t };
@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,27 @@
/*! *****************************************************************************
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.
***************************************************************************** */
interface MapConstructor {
/**
* Groups members of an iterable according to the return value of the passed callback.
* @param items An iterable.
* @param keySelector A callback which will be invoked for each item in items.
*/
groupBy<K, T>(
items: Iterable<T>,
keySelector: (item: T, index: number) => K,
): Map<K, T[]>;
}
@@ -0,0 +1 @@
{"version":3,"file":"use-instant-layout-transition.mjs","sources":["../../../src/projection/use-instant-layout-transition.ts"],"sourcesContent":["import { rootProjectionNode } from \"motion-dom\"\n\nexport function useInstantLayoutTransition(): (\n cb?: (() => void) | undefined\n) => void {\n return startTransition\n}\n\nfunction startTransition(callback?: () => void) {\n if (!rootProjectionNode.current) return\n rootProjectionNode.current.isUpdating = false\n rootProjectionNode.current.blockUpdate()\n callback && callback()\n}\n"],"names":[],"mappings":";;SAEgB,0BAA0B,GAAA;AAGtC,IAAA,OAAO,eAAe;AAC1B;AAEA,SAAS,eAAe,CAAC,QAAqB,EAAA;IAC1C,IAAI,CAAC,kBAAkB,CAAC,OAAO;QAAE;AACjC,IAAA,kBAAkB,CAAC,OAAO,CAAC,UAAU,GAAG,KAAK;AAC7C,IAAA,kBAAkB,CAAC,OAAO,CAAC,WAAW,EAAE;IACxC,QAAQ,IAAI,QAAQ,EAAE;AAC1B;;;;"}
@@ -0,0 +1,19 @@
import { inertia } from '../generators/inertia.mjs';
import { keyframes } from '../generators/keyframes.mjs';
import { spring } from '../generators/spring.mjs';
const transitionTypeMap = {
decay: inertia,
inertia,
tween: keyframes,
keyframes: keyframes,
spring,
};
function replaceTransitionType(transition) {
if (typeof transition.type === "string") {
transition.type = transitionTypeMap[transition.type];
}
}
export { replaceTransitionType };
//# sourceMappingURL=replace-transition-type.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"bearerAuth.js","sourceRoot":"","sources":["../../../../../src/server/auth/middleware/bearerAuth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AA8BlG,4EAA4E;AAC5E,SAAS,kBAAkB,CAAC,KAAU;IAClC,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC/B,OAAO,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACzE,CAAC;AAED,gIAAgI;AAChI,SAAS,YAAY,CAAC,QAAyB,EAAE,QAAa;IAC1D,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5B,OAAO,kBAAkB,CAAC,QAAQ,CAAC,KAAK,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AACzE,CAAC;AAWD;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAC9B,QAAQ,EACR,cAAc,GAAG,EAAE,EACnB,mBAAmB,EACnB,gBAAgB,EACU;IAC1B,OAAO,KAAK,EAAE,GAAG,EAAE,GAAG,EAA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AI,KAAK,YAAY,WAAW,EAAE,CAAC;gBACtC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;YACnD,CAAC;iBAAM,IAAI,KAAK,YAAY,UAAU,EAAE,CAAC;gBACrC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;YACnD,CAAC;iBAAM,CAAC;gBACJ,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC,uBAAuB,CAAC,CAAC;gBAC7D,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAAC;YACzD,CAAC;QACL,CAAC;IACL,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,21 @@
/**
* Recursively traverse up the tree to check whether the provided child node
* is the parent or a descendant of it.
*
* @param parent - Element to find
* @param child - Element to test against parent
*/
const isNodeOrChild = (parent, child) => {
if (!child) {
return false;
}
else if (parent === child) {
return true;
}
else {
return isNodeOrChild(parent, child.parentElement);
}
};
export { isNodeOrChild };
//# sourceMappingURL=is-node-or-child.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"test-tube.js","sources":["../../../src/icons/test-tube.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TestTube\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTQuNSAydjE3LjVjMCAxLjQtMS4xIDIuNS0yLjUgMi41Yy0xLjQgMC0yLjUtMS4xLTIuNS0yLjVWMiIgLz4KICA8cGF0aCBkPSJNOC41IDJoNyIgLz4KICA8cGF0aCBkPSJNMTQuNSAxNmgtNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/test-tube\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 TestTube = createLucideIcon('TestTube', [\n ['path', { d: 'M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2', key: '125lnx' }],\n ['path', { d: 'M8.5 2h7', key: 'csnxdl' }],\n ['path', { d: 'M14.5 16h-5', key: '1ox875' }],\n]);\n\nexport default TestTube;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA+D,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,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,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC5F,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,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAe,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC9C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,167 @@
declare namespace ESTree {
interface FlowTypeAnnotation extends Node {}
interface FlowBaseTypeAnnotation extends FlowTypeAnnotation {}
interface FlowLiteralTypeAnnotation extends FlowTypeAnnotation, Literal {}
interface FlowDeclaration extends Declaration {}
interface AnyTypeAnnotation extends FlowBaseTypeAnnotation {}
interface ArrayTypeAnnotation extends FlowTypeAnnotation {
elementType: FlowTypeAnnotation;
}
interface BooleanLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
interface BooleanTypeAnnotation extends FlowBaseTypeAnnotation {}
interface ClassImplements extends Node {
id: Identifier;
typeParameters?: TypeParameterInstantiation | null;
}
interface ClassProperty {
key: Expression;
value?: Expression | null;
typeAnnotation?: TypeAnnotation | null;
computed: boolean;
static: boolean;
}
interface DeclareClass extends FlowDeclaration {
id: Identifier;
typeParameters?: TypeParameterDeclaration | null;
body: ObjectTypeAnnotation;
extends: InterfaceExtends[];
}
interface DeclareFunction extends FlowDeclaration {
id: Identifier;
}
interface DeclareModule extends FlowDeclaration {
id: Literal | Identifier;
body: BlockStatement;
}
interface DeclareVariable extends FlowDeclaration {
id: Identifier;
}
interface FunctionTypeAnnotation extends FlowTypeAnnotation {
params: FunctionTypeParam[];
returnType: FlowTypeAnnotation;
rest?: FunctionTypeParam | null;
typeParameters?: TypeParameterDeclaration | null;
}
interface FunctionTypeParam {
name: Identifier;
typeAnnotation: FlowTypeAnnotation;
optional: boolean;
}
interface GenericTypeAnnotation extends FlowTypeAnnotation {
id: Identifier | QualifiedTypeIdentifier;
typeParameters?: TypeParameterInstantiation | null;
}
interface InterfaceExtends extends Node {
id: Identifier | QualifiedTypeIdentifier;
typeParameters?: TypeParameterInstantiation | null;
}
interface InterfaceDeclaration extends FlowDeclaration {
id: Identifier;
typeParameters?: TypeParameterDeclaration | null;
extends: InterfaceExtends[];
body: ObjectTypeAnnotation;
}
interface IntersectionTypeAnnotation extends FlowTypeAnnotation {
types: FlowTypeAnnotation[];
}
interface MixedTypeAnnotation extends FlowBaseTypeAnnotation {}
interface NullableTypeAnnotation extends FlowTypeAnnotation {
typeAnnotation: TypeAnnotation;
}
interface NumberLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
interface NumberTypeAnnotation extends FlowBaseTypeAnnotation {}
interface StringLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
interface StringTypeAnnotation extends FlowBaseTypeAnnotation {}
interface TupleTypeAnnotation extends FlowTypeAnnotation {
types: FlowTypeAnnotation[];
}
interface TypeofTypeAnnotation extends FlowTypeAnnotation {
argument: FlowTypeAnnotation;
}
interface TypeAlias extends FlowDeclaration {
id: Identifier;
typeParameters?: TypeParameterDeclaration | null;
right: FlowTypeAnnotation;
}
interface TypeAnnotation extends Node {
typeAnnotation: FlowTypeAnnotation;
}
interface TypeCastExpression extends Expression {
expression: Expression;
typeAnnotation: TypeAnnotation;
}
interface TypeParameterDeclaration extends Node {
params: Identifier[];
}
interface TypeParameterInstantiation extends Node {
params: FlowTypeAnnotation[];
}
interface ObjectTypeAnnotation extends FlowTypeAnnotation {
properties: ObjectTypeProperty[];
indexers: ObjectTypeIndexer[];
callProperties: ObjectTypeCallProperty[];
}
interface ObjectTypeCallProperty extends Node {
value: FunctionTypeAnnotation;
static: boolean;
}
interface ObjectTypeIndexer extends Node {
id: Identifier;
key: FlowTypeAnnotation;
value: FlowTypeAnnotation;
static: boolean;
}
interface ObjectTypeProperty extends Node {
key: Expression;
value: FlowTypeAnnotation;
optional: boolean;
static: boolean;
}
interface QualifiedTypeIdentifier extends Node {
qualification: Identifier | QualifiedTypeIdentifier;
id: Identifier;
}
interface UnionTypeAnnotation extends FlowTypeAnnotation {
types: FlowTypeAnnotation[];
}
interface VoidTypeAnnotation extends FlowBaseTypeAnnotation {}
}
@@ -0,0 +1,4 @@
export * from './eslint-utils';
export * from './helpers';
export * from './misc';
export * from './predicates';
@@ -0,0 +1,7 @@
import eslintConfigPrettier from "./index.js";
declare const eslintConfigPrettierFlat: typeof eslintConfigPrettier & {
name: "config-prettier";
};
export = eslintConfigPrettierFlat;
@@ -0,0 +1,221 @@
import { Router } from "./router.js";
import { Env, ErrorHandler, H, HandlerInterface, MergePath, MergeSchemaPath, MiddlewareHandlerInterface, NotFoundHandler, OnHandlerInterface, RouterRoute, Schema } from "./types.js";
import { Context, ExecutionContext } from "./context.js";
//#region src/hono-base.d.ts
type GetPath<E extends Env> = (request: Request, options?: {
env?: E['Bindings'];
}) => string;
export type HonoOptions<E extends Env> = {
/**
* `strict` option specifies whether to distinguish whether the last path is a directory or not.
*
* @see {@link https://hono.dev/docs/api/hono#strict-mode}
*
* @default true
*/
strict?: boolean;
/**
* `router` option specifies which router to use.
*
* @see {@link https://hono.dev/docs/api/hono#router-option}
*
* @example
* ```ts
* const app = new Hono({ router: new RegExpRouter() })
* ```
*/
router?: Router<[H, RouterRoute]>;
/**
* `getPath` can handle the host header value.
*
* @see {@link https://hono.dev/docs/api/routing#routing-with-host-header-value}
*
* @example
* ```ts
* const app = new Hono({
* getPath: (req) =>
* '/' + req.headers.get('host') + req.url.replace(/^https?:\/\/[^/]+(\/[^?]*)/, '$1'),
* })
*
* app.get('/www1.example.com/hello', () => c.text('hello www1'))
*
* // A following request will match the route:
* // new Request('http://www1.example.com/hello', {
* // headers: { host: 'www1.example.com' },
* // })
* ```
*/
getPath?: GetPath<E>;
};
type MountOptionHandler = (c: Context) => unknown;
type MountReplaceRequest = (originalRequest: Request) => Request;
type MountOptions = MountOptionHandler | {
optionHandler?: MountOptionHandler;
replaceRequest?: MountReplaceRequest | false;
};
declare class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends string = '/', CurrentPath extends string = BasePath> {
get: HandlerInterface<E, 'get', S, BasePath, CurrentPath>;
post: HandlerInterface<E, 'post', S, BasePath, CurrentPath>;
put: HandlerInterface<E, 'put', S, BasePath, CurrentPath>;
delete: HandlerInterface<E, 'delete', S, BasePath, CurrentPath>;
options: HandlerInterface<E, 'options', S, BasePath, CurrentPath>;
patch: HandlerInterface<E, 'patch', S, BasePath, CurrentPath>;
query: HandlerInterface<E, 'query', S, BasePath, CurrentPath>;
all: HandlerInterface<E, 'all', S, BasePath, CurrentPath>;
on: OnHandlerInterface<E, S, BasePath>;
use: MiddlewareHandlerInterface<E, S, BasePath>;
router: Router<[H, RouterRoute]>;
readonly getPath: GetPath<E>;
private _basePath;
routes: RouterRoute[];
constructor(options?: HonoOptions<E>);
private errorHandler;
/**
* `.route()` allows grouping other Hono instance in routes.
*
* @see {@link https://hono.dev/docs/api/routing#grouping}
*
* @param {string} path - base Path
* @param {Hono} app - other Hono instance
* @returns {Hono} routed Hono instance
*
* @example
* ```ts
* const app = new Hono()
* const app2 = new Hono()
*
* app2.get("/user", (c) => c.text("user"))
* app.route("/api", app2) // GET /api/user
* ```
*/
route<SubPath extends string, SubEnv extends Env, SubSchema extends Schema, SubBasePath extends string, SubCurrentPath extends string>(path: SubPath, app: Hono<SubEnv, SubSchema, SubBasePath, SubCurrentPath>): Hono<E, MergeSchemaPath<SubSchema, MergePath<BasePath, SubPath>> | S, BasePath, CurrentPath>;
/**
* `.basePath()` allows base paths to be specified.
*
* @see {@link https://hono.dev/docs/api/routing#base-path}
*
* @param {string} path - base Path
* @returns {Hono} changed Hono instance
*
* @example
* ```ts
* const api = new Hono().basePath('/api')
* ```
*/
basePath<SubPath extends string>(path: SubPath): Hono<E, S, MergePath<BasePath, SubPath>, MergePath<BasePath, SubPath>>;
/**
* `.onError()` handles an error and returns a customized Response.
*
* @see {@link https://hono.dev/docs/api/hono#error-handling}
*
* @param {ErrorHandler} handler - request Handler for error
* @returns {Hono} changed Hono instance
*
* @example
* ```ts
* app.onError((err, c) => {
* console.error(`${err}`)
* return c.text('Custom Error Message', 500)
* })
* ```
*/
onError: (handler: ErrorHandler<E>) => Hono<E, S, BasePath, CurrentPath>;
/**
* `.notFound()` allows you to customize a Not Found Response.
*
* @see {@link https://hono.dev/docs/api/hono#not-found}
*
* @param {NotFoundHandler} handler - request handler for not-found
* @returns {Hono} changed Hono instance
*
* @example
* ```ts
* app.notFound((c) => {
* return c.text('Custom 404 Message', 404)
* })
* ```
*/
notFound: (handler: NotFoundHandler<E>) => Hono<E, S, BasePath, CurrentPath>;
/**
* `.mount()` allows you to mount applications built with other frameworks into your Hono application.
*
* @deprecated Use `mount()` from `hono/mount` instead. `.mount()` will be removed in v5.
*
* @see {@link https://hono.dev/docs/api/hono#mount}
*
* @param {string} path - base Path
* @param {Function} applicationHandler - other Request Handler
* @param {MountOptions} [options] - options of `.mount()`
* @returns {Hono} mounted Hono instance
*
* @example
* ```ts
* import { Router as IttyRouter } from 'itty-router'
* import { Hono } from 'hono'
* // Create itty-router application
* const ittyRouter = IttyRouter()
* // GET /itty-router/hello
* ittyRouter.get('/hello', () => new Response('Hello from itty-router'))
*
* const app = new Hono()
* app.mount('/itty-router', ittyRouter.handle)
* ```
*
* @example
* ```ts
* const app = new Hono()
* // Send the request to another application without modification.
* app.mount('/app', anotherApp, {
* replaceRequest: (req) => req,
* })
* ```
*/
mount(path: string, applicationHandler: (request: Request, ...args: any) => Response | Promise<Response>, options?: MountOptions): Hono<E, S, BasePath, CurrentPath>;
/**
* `.fetch()` will be entry point of your app.
*
* @see {@link https://hono.dev/docs/api/hono#fetch}
*
* @param {Request} request - request Object of request
* @param {Env} env - env Object
* @param {ExecutionContext} executionCtx - context of execution
* @returns {Response | Promise<Response>} response of request
*
*/
fetch: (request: Request, env?: E['Bindings'] | {}, executionCtx?: ExecutionContext) => Response | Promise<Response>;
/**
* `.request()` is a useful method for testing.
* You can pass a URL or pathname to send a GET request.
* app will return a Response object.
* ```ts
* test('GET /hello is ok', async () => {
* const res = await app.request('/hello')
* expect(res.status).toBe(200)
* })
* ```
* @see https://hono.dev/docs/api/hono#request
*/
request: (input: Request | string | URL, requestInit?: RequestInit, Env?: E["Bindings"] | {}, executionCtx?: ExecutionContext) => Response | Promise<Response>;
/**
* `.fire()` automatically adds a global fetch event listener.
* This can be useful for environments that adhere to the Service Worker API, such as non-ES module Cloudflare Workers.
* @deprecated
* Use `fire` from `hono/service-worker` instead.
* ```ts
* import { Hono } from 'hono'
* import { fire } from 'hono/service-worker'
*
* const app = new Hono()
* // ...
* fire(app)
* ```
* @see https://hono.dev/docs/api/hono#fire
* @see https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API
* @see https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/
*/
fire: () => void;
}
//#endregion
export { Hono as HonoBase };
export {};
@@ -0,0 +1 @@
{"version":3,"names":["_classStaticPrivateMethodSet","TypeError"],"sources":["../../src/helpers/classStaticPrivateMethodSet.js"],"sourcesContent":["/* @minVersion 7.3.2 */\n/* @onlyBabel7 */\n\nexport default function _classStaticPrivateMethodSet() {\n throw new TypeError(\"attempted to set read only static private field\");\n}\n"],"mappings":";;;;;;AAGe,SAASA,4BAA4BA,CAAA,EAAG;EACrD,MAAM,IAAIC,SAAS,CAAC,iDAAiD,CAAC;AACxE","ignoreList":[]}
@@ -0,0 +1,95 @@
import { F as FormatOptions } from './shared/confbox.9745c98f.mjs';
/**
* Converts a [YAML](https://yaml.org/) string into an object.
*
* @NOTE This function does **not** understand multi-document sources, it throws exception on those.
*
* @NOTE Comments are not preserved after parsing.
*
* @NOTE This function does **not** support schema-specific tag resolution restrictions.
* So, the JSON schema is not as strictly defined in the YAML specification.
* It allows numbers in any notation, use `Null` and `NULL` as `null`, etc.
* The core schema also has no such restrictions. It allows binary notation for integers.
*
* @template T The type of the return value.
* @param text The YAML string to parse.
* @param options Parsing options.
* @returns The JavaScript value converted from the YAML string.
*/
declare function parseYAML<T = unknown>(text: string, options?: YAMLParseOptions): T;
/**
* Converts a JavaScript value to a [YAML](https://yaml.org/) string.
*
* @NOTE Comments are not preserved in the output.
*
* @param value
* @param options
* @returns The YAML string converted from the JavaScript value.
*/
declare function stringifyYAML(value: any, options?: YAMLStringifyOptions): string;
interface YAMLParseOptions extends FormatOptions {
/** string to be used as a file path in error/warning messages. */
filename?: string | undefined;
/** function to call on warning messages. */
onWarning?(this: null, e: YAMLException): void;
/** specifies a schema to use. */
schema?: any | undefined;
/** compatibility with JSON.parse behaviour. */
json?: boolean | undefined;
/** listener for parse events */
listener?(this: any, eventType: any, state: any): void;
}
interface YAMLStringifyOptions extends FormatOptions {
/** indentation width to use (in spaces). */
indent?: number | undefined;
/** when true, will not add an indentation level to array elements */
noArrayIndent?: boolean | undefined;
/** do not throw on invalid types (like function in the safe schema) and skip pairs and single values with such types. */
skipInvalid?: boolean | undefined;
/** specifies level of nesting, when to switch from block to flow style for collections. -1 means block style everwhere */
flowLevel?: number | undefined;
/** Each tag may have own set of styles. - "tag" => "style" map. */
styles?: {
[x: string]: any;
} | undefined;
/** specifies a schema to use. */
schema?: any | undefined;
/** if true, sort keys when dumping YAML. If a function, use the function to sort the keys. (default: false) */
sortKeys?: boolean | ((a: any, b: any) => number) | undefined;
/** set max line width. (default: 80) */
lineWidth?: number | undefined;
/** if true, don't convert duplicate objects into references (default: false) */
noRefs?: boolean | undefined;
/** if true don't try to be compatible with older yaml versions. Currently: don't quote "yes", "no" and so on, as required for YAML 1.1 (default: false) */
noCompatMode?: boolean | undefined;
/**
* if true flow sequences will be condensed, omitting the space between `key: value` or `a, b`. Eg. `'[a,b]'` or `{a:{b:c}}`.
* Can be useful when using yaml for pretty URL query params as spaces are %-encoded. (default: false).
*/
condenseFlow?: boolean | undefined;
/** strings will be quoted using this quoting style. If you specify single quotes, double quotes will still be used for non-printable characters. (default: `'`) */
quotingType?: "'" | '"' | undefined;
/** if true, all non-key strings will be quoted even if they normally don't need to. (default: false) */
forceQuotes?: boolean | undefined;
/** callback `function (key, value)` called recursively on each key/value in source object (see `replacer` docs for `JSON.stringify`). */
replacer?: ((key: string, value: any) => any) | undefined;
}
interface Mark {
buffer: string;
column: number;
line: number;
name: string;
position: number;
snippet: string;
}
declare class YAMLException extends Error {
constructor(reason?: string, mark?: Mark);
toString(compact?: boolean): string;
name: string;
reason: string;
message: string;
mark: Mark;
}
export { type YAMLParseOptions, type YAMLStringifyOptions, parseYAML, stringifyYAML };
@@ -0,0 +1,27 @@
'use strict';
var reflectGetProto = require('./Reflect.getPrototypeOf');
var originalGetProto = require('./Object.getPrototypeOf');
var getDunderProto = require('dunder-proto/get');
/** @type {import('.')} */
module.exports = reflectGetProto
? function getProto(O) {
// @ts-expect-error TS can't narrow inside a closure, for some reason
return reflectGetProto(O);
}
: originalGetProto
? function getProto(O) {
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
throw new TypeError('getProto: not an object');
}
// @ts-expect-error TS can't narrow inside a closure, for some reason
return originalGetProto(O);
}
: getDunderProto
? function getProto(O) {
// @ts-expect-error TS can't narrow inside a closure, for some reason
return getDunderProto(O);
}
: null;
@@ -0,0 +1,269 @@
import { GroupAnimation } from '../animation/GroupAnimation.mjs';
import { copyBoxInto } from '../projection/geometry/copy.mjs';
import { createBox } from '../projection/geometry/models.mjs';
import { HTMLProjectionNode } from '../projection/node/HTMLProjectionNode.mjs';
import { HTMLVisualElement } from '../render/html/HTMLVisualElement.mjs';
import { visualElementStore } from '../render/store.mjs';
import { resolveElements } from '../utils/resolve-elements.mjs';
import { frame } from '../frameloop/frame.mjs';
const layoutSelector = "[data-layout], [data-layout-id]";
const noop = () => { };
function snapshotFromTarget(projection) {
const target = projection.targetWithTransforms || projection.target;
if (!target)
return undefined;
const measuredBox = createBox();
const layoutBox = createBox();
copyBoxInto(measuredBox, target);
copyBoxInto(layoutBox, target);
return {
animationId: projection.root?.animationId ?? 0,
measuredBox,
layoutBox,
latestValues: projection.animationValues || projection.latestValues || {},
source: projection.id,
};
}
class LayoutAnimationBuilder {
constructor(scope, updateDom, defaultOptions) {
this.sharedTransitions = new Map();
this.notifyReady = noop;
this.rejectReady = noop;
this.scope = scope;
this.updateDom = updateDom;
this.defaultOptions = defaultOptions;
this.readyPromise = new Promise((resolve, reject) => {
this.notifyReady = resolve;
this.rejectReady = reject;
});
frame.postRender(() => {
this.start().then(this.notifyReady).catch(this.rejectReady);
});
}
shared(id, transition) {
this.sharedTransitions.set(id, transition);
return this;
}
then(resolve, reject) {
return this.readyPromise.then(resolve, reject);
}
async start() {
const beforeElements = collectLayoutElements(this.scope);
const beforeRecords = this.buildRecords(beforeElements);
beforeRecords.forEach(({ projection }) => {
const hasCurrentAnimation = Boolean(projection.currentAnimation);
const isSharedLayout = Boolean(projection.options.layoutId);
if (hasCurrentAnimation && isSharedLayout) {
const snapshot = snapshotFromTarget(projection);
if (snapshot) {
projection.snapshot = snapshot;
}
else if (projection.snapshot) {
projection.snapshot = undefined;
}
}
else if (projection.snapshot &&
(projection.currentAnimation || projection.isProjecting())) {
projection.snapshot = undefined;
}
projection.isPresent = true;
projection.willUpdate();
});
await this.updateDom();
const afterElements = collectLayoutElements(this.scope);
const afterRecords = this.buildRecords(afterElements);
this.handleExitingElements(beforeRecords, afterRecords);
afterRecords.forEach(({ projection }) => {
const instance = projection.instance;
const resumeFromInstance = projection.resumeFrom
?.instance;
if (!instance || !resumeFromInstance)
return;
if (!("style" in instance))
return;
const currentTransform = instance.style.transform;
const resumeFromTransform = resumeFromInstance.style.transform;
if (currentTransform &&
resumeFromTransform &&
currentTransform === resumeFromTransform) {
instance.style.transform = "";
instance.style.transformOrigin = "";
}
});
afterRecords.forEach(({ projection }) => {
projection.isPresent = true;
});
const root = getProjectionRoot(afterRecords, beforeRecords);
root?.didUpdate();
await new Promise((resolve) => {
frame.postRender(() => resolve());
});
const animations = collectAnimations(afterRecords);
const animation = new GroupAnimation(animations);
return animation;
}
buildRecords(elements) {
const records = [];
const recordMap = new Map();
for (const element of elements) {
const parentRecord = findParentRecord(element, recordMap, this.scope);
const { layout, layoutId } = readLayoutAttributes(element);
const override = layoutId
? this.sharedTransitions.get(layoutId)
: undefined;
const transition = override || this.defaultOptions;
const record = getOrCreateRecord(element, parentRecord?.projection, {
layout,
layoutId,
animationType: typeof layout === "string" ? layout : "both",
transition: transition,
});
recordMap.set(element, record);
records.push(record);
}
return records;
}
handleExitingElements(beforeRecords, afterRecords) {
const afterElementsSet = new Set(afterRecords.map((record) => record.element));
beforeRecords.forEach((record) => {
if (afterElementsSet.has(record.element))
return;
// For shared layout elements, relegate to set up resumeFrom
// so the remaining element animates from this position
if (record.projection.options.layoutId) {
record.projection.isPresent = false;
record.projection.relegate();
}
record.visualElement.unmount();
visualElementStore.delete(record.element);
});
// Clear resumeFrom on EXISTING nodes that point to unmounted projections
// This prevents crossfade animation when the source element was removed entirely
// But preserve resumeFrom for NEW nodes so they can animate from the old position
// Also preserve resumeFrom for lead nodes that were just promoted via relegate
const beforeElementsSet = new Set(beforeRecords.map((record) => record.element));
afterRecords.forEach(({ element, projection }) => {
if (beforeElementsSet.has(element) &&
projection.resumeFrom &&
!projection.resumeFrom.instance &&
!projection.isLead()) {
projection.resumeFrom = undefined;
projection.snapshot = undefined;
}
});
}
}
function parseAnimateLayoutArgs(scopeOrUpdateDom, updateDomOrOptions, options) {
// animateLayout(updateDom)
if (typeof scopeOrUpdateDom === "function") {
return {
scope: document,
updateDom: scopeOrUpdateDom,
defaultOptions: updateDomOrOptions,
};
}
// animateLayout(scope, updateDom, options?)
const elements = resolveElements(scopeOrUpdateDom);
const scope = elements[0] || document;
return {
scope,
updateDom: updateDomOrOptions,
defaultOptions: options,
};
}
function collectLayoutElements(scope) {
const elements = Array.from(scope.querySelectorAll(layoutSelector));
if (scope instanceof Element && scope.matches(layoutSelector)) {
if (!elements.includes(scope)) {
elements.unshift(scope);
}
}
return elements;
}
function readLayoutAttributes(element) {
const layoutId = element.getAttribute("data-layout-id") || undefined;
const rawLayout = element.getAttribute("data-layout");
let layout;
if (rawLayout === "" || rawLayout === "true") {
layout = true;
}
else if (rawLayout) {
layout = rawLayout;
}
return {
layout,
layoutId,
};
}
function createVisualState() {
return {
latestValues: {},
renderState: {
transform: {},
transformOrigin: {},
style: {},
vars: {},
},
};
}
function getOrCreateRecord(element, parentProjection, projectionOptions) {
const existing = visualElementStore.get(element);
const visualElement = existing ??
new HTMLVisualElement({
props: {},
presenceContext: null,
visualState: createVisualState(),
}, { allowProjection: true });
if (!existing || !visualElement.projection) {
visualElement.projection = new HTMLProjectionNode(visualElement.latestValues, parentProjection);
}
visualElement.projection.setOptions({
...projectionOptions,
visualElement,
});
if (!visualElement.current) {
visualElement.mount(element);
}
else if (!visualElement.projection.instance) {
// Mount projection if VisualElement is already mounted but projection isn't
// This happens when animate() was called before animateLayout()
visualElement.projection.mount(element);
}
if (!existing) {
visualElementStore.set(element, visualElement);
}
return {
element,
visualElement,
projection: visualElement.projection,
};
}
function findParentRecord(element, recordMap, scope) {
let parent = element.parentElement;
while (parent) {
const record = recordMap.get(parent);
if (record)
return record;
if (parent === scope)
break;
parent = parent.parentElement;
}
return undefined;
}
function getProjectionRoot(afterRecords, beforeRecords) {
const record = afterRecords[0] || beforeRecords[0];
return record?.projection.root;
}
function collectAnimations(afterRecords) {
const animations = new Set();
afterRecords.forEach((record) => {
const animation = record.projection.currentAnimation;
if (animation)
animations.add(animation);
});
return Array.from(animations);
}
export { LayoutAnimationBuilder, parseAnimateLayoutArgs };
//# sourceMappingURL=LayoutAnimationBuilder.mjs.map
@@ -0,0 +1,9 @@
/**
* @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.
*/
export { default } from './clipboard-pen.js';
//# sourceMappingURL=clipboard-edit.js.map
@@ -0,0 +1 @@
{"version":3,"file":"store.js","sources":["../../../src/icons/store.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Store\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMiA3IDQuNDEtNC40MUEyIDIgMCAwIDEgNy44MyAyaDguMzRhMiAyIDAgMCAxIDEuNDIuNTlMMjIgNyIgLz4KICA8cGF0aCBkPSJNNCAxMnY4YTIgMiAwIDAgMCAyIDJoMTJhMiAyIDAgMCAwIDItMnYtOCIgLz4KICA8cGF0aCBkPSJNMTUgMjJ2LTRhMiAyIDAgMCAwLTItMmgtMmEyIDIgMCAwIDAtMiAydjQiIC8+CiAgPHBhdGggZD0iTTIgN2gyMCIgLz4KICA8cGF0aCBkPSJNMjIgN3YzYTIgMiAwIDAgMS0yIDJhMi43IDIuNyAwIDAgMS0xLjU5LS42My43LjcgMCAwIDAtLjgyIDBBMi43IDIuNyAwIDAgMSAxNiAxMmEyLjcgMi43IDAgMCAxLTEuNTktLjYzLjcuNyAwIDAgMC0uODIgMEEyLjcgMi43IDAgMCAxIDEyIDEyYTIuNyAyLjcgMCAwIDEtMS41OS0uNjMuNy43IDAgMCAwLS44MiAwQTIuNyAyLjcgMCAwIDEgOCAxMmEyLjcgMi43IDAgMCAxLTEuNTktLjYzLjcuNyAwIDAgMC0uODIgMEEyLjcgMi43IDAgMCAxIDQgMTJhMiAyIDAgMCAxLTItMlY3IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/store\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 Store = createLucideIcon('Store', [\n ['path', { d: 'm2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7', key: 'ztvudi' }],\n ['path', { d: 'M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8', key: '1b2hhj' }],\n ['path', { d: 'M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4', key: '2ebpfo' }],\n ['path', { d: 'M2 7h20', key: '1fcdvo' }],\n [\n 'path',\n {\n d: 'M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7',\n key: '6c3vgh',\n },\n ],\n]);\n\nexport default Store;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,C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B,CAAC;IACS,OAAO,CAAC,IAAc,EAAE,MAAc;QAC9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,CAAC;YAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAClF,4CAA4C;QAC5C,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,Line truncated
@@ -0,0 +1,301 @@
/**
* @fileoverview Rule to flag use of eval() statement
* @author Nicholas C. Zakas
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Types
//------------------------------------------------------------------------------
/** @typedef {import("eslint-scope").Scope} Scope */
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const candidatesOfGlobalObject = Object.freeze([
"global",
"window",
"globalThis",
]);
/**
* Checks a given node is a MemberExpression node which has the specified name's
* property.
* @param {ASTNode} node A node to check.
* @param {string} name A name to check.
* @returns {boolean} `true` if the node is a MemberExpression node which has
* the specified name's property
*/
function isMember(node, name) {
return astUtils.isSpecificMemberAccess(node, null, name);
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
defaultOptions: [
{
allowIndirect: false,
},
],
docs: {
description: "Disallow the use of `eval()`",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-eval",
},
schema: [
{
type: "object",
properties: {
allowIndirect: { type: "boolean" },
},
additionalProperties: false,
},
],
messages: {
unexpected: "`eval` can be harmful.",
},
},
create(context) {
const [{ allowIndirect }] = context.options;
const sourceCode = context.sourceCode;
let funcInfo = null;
/**
* Pushes a `this` scope (non-arrow function, class static block, or class field initializer) information to the stack.
* Top-level scopes are handled separately.
*
* This is used in order to check whether or not `this` binding is a
* reference to the global object.
* @param {ASTNode} node A node of the scope.
* For functions, this is one of FunctionDeclaration, FunctionExpression.
* For class static blocks, this is StaticBlock.
* For class field initializers, this can be any node that is PropertyDefinition#value.
* @returns {void}
*/
function enterThisScope(node) {
const strict = sourceCode.getScope(node).isStrict;
funcInfo = {
upper: funcInfo,
node,
strict,
isTopLevelOfScript: false,
defaultThis: false,
initialized: strict,
};
}
/**
* Pops a variable scope from the stack.
* @returns {void}
*/
function exitThisScope() {
funcInfo = funcInfo.upper;
}
/**
* Reports a given node.
*
* `node` is `Identifier` or `MemberExpression`.
* The parent of `node` might be `CallExpression`.
*
* The location of the report is always `eval` `Identifier` (or possibly
* `Literal`). The type of the report is `CallExpression` if the parent is
* `CallExpression`. Otherwise, it's the given node type.
* @param {ASTNode} node A node to report.
* @returns {void}
*/
function report(node) {
const parent = node.parent;
const locationNode =
node.type === "MemberExpression" ? node.property : node;
const reportNode =
parent.type === "CallExpression" && parent.callee === node
? parent
: node;
context.report({
node: reportNode,
loc: locationNode.loc,
messageId: "unexpected",
});
}
/**
* Reports accesses of `eval` via the global object.
* @param {Scope} globalScope The global scope.
* @returns {void}
*/
function reportAccessingEvalViaGlobalObject(globalScope) {
for (let i = 0; i < candidatesOfGlobalObject.length; ++i) {
const name = candidatesOfGlobalObject[i];
const variable = astUtils.getVariableByName(globalScope, name);
if (!variable) {
continue;
}
const references = variable.references;
for (let j = 0; j < references.length; ++j) {
const identifier = references[j].identifier;
let node = identifier.parent;
// To detect code like `window.window.eval`.
while (isMember(node, name)) {
node = node.parent;
}
// Reports.
if (isMember(node, "eval")) {
report(node);
}
}
}
}
/**
* Reports all accesses of `eval` (excludes direct calls to eval).
* @param {Scope} globalScope The global scope.
* @returns {void}
*/
function reportAccessingEval(globalScope) {
const variable = astUtils.getVariableByName(globalScope, "eval");
if (!variable) {
return;
}
const references = variable.references;
for (let i = 0; i < references.length; ++i) {
const reference = references[i];
const id = reference.identifier;
if (id.name === "eval" && !astUtils.isCallee(id)) {
// Is accessing to eval (excludes direct calls to eval)
report(id);
}
}
}
if (allowIndirect) {
// Checks only direct calls to eval. It's simple!
return {
"CallExpression:exit"(node) {
const callee = node.callee;
/*
* Optional call (`eval?.("code")`) is not direct eval.
* The direct eval is only step 6.a.vi of https://tc39.es/ecma262/#sec-function-calls-runtime-semantics-evaluation
* But the optional call is https://tc39.es/ecma262/#sec-optional-chaining-chain-evaluation
*/
if (
!node.optional &&
astUtils.isSpecificId(callee, "eval")
) {
report(callee);
}
},
};
}
return {
"CallExpression:exit"(node) {
const callee = node.callee;
if (astUtils.isSpecificId(callee, "eval")) {
report(callee);
}
},
Program(node) {
const scope = sourceCode.getScope(node),
features =
context.languageOptions.parserOptions.ecmaFeatures ||
{},
strict =
scope.isStrict ||
node.sourceType === "module" ||
(features.globalReturn &&
scope.childScopes[0].isStrict),
isTopLevelOfScript =
node.sourceType !== "module" && !features.globalReturn;
funcInfo = {
upper: null,
node,
strict,
isTopLevelOfScript,
defaultThis: true,
initialized: true,
};
},
"Program:exit"(node) {
const globalScope = sourceCode.getScope(node);
exitThisScope();
reportAccessingEval(globalScope);
reportAccessingEvalViaGlobalObject(globalScope);
},
FunctionDeclaration: enterThisScope,
"FunctionDeclaration:exit": exitThisScope,
FunctionExpression: enterThisScope,
"FunctionExpression:exit": exitThisScope,
"PropertyDefinition > *.value": enterThisScope,
"PropertyDefinition > *.value:exit": exitThisScope,
StaticBlock: enterThisScope,
"StaticBlock:exit": exitThisScope,
ThisExpression(node) {
if (!isMember(node.parent, "eval")) {
return;
}
/*
* `this.eval` is found.
* Checks whether or not the value of `this` is the global object.
*/
if (!funcInfo.initialized) {
funcInfo.initialized = true;
funcInfo.defaultThis = astUtils.isDefaultThisBinding(
funcInfo.node,
sourceCode,
);
}
// `this` at the top level of scripts always refers to the global object
if (
funcInfo.isTopLevelOfScript ||
(!funcInfo.strict && funcInfo.defaultThis)
) {
// `this.eval` is possible built-in `eval`.
report(node.parent);
}
},
};
},
};
@@ -0,0 +1,12 @@
export type OptionString = 'array' | 'array-simple' | 'generic';
export type Options = [
{
default: OptionString;
readonly?: OptionString;
}
];
export type MessageIds = 'errorStringArray' | 'errorStringArrayReadonly' | 'errorStringArraySimple' | 'errorStringArraySimpleReadonly' | 'errorStringGeneric' | 'errorStringGenericSimple';
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1,263 @@
// lib/v3/isZodErrorLike.ts
function isZodErrorLike(err) {
return err instanceof Error && err.name === "ZodError" && "issues" in err && Array.isArray(err.issues);
}
// lib/v3/ValidationError.ts
var ValidationError = class extends Error {
name;
details;
constructor(message, options) {
super(message, options);
this.name = "ZodValidationError";
this.details = getIssuesFromErrorOptions(options);
}
toString() {
return this.message;
}
};
function getIssuesFromErrorOptions(options) {
if (options) {
const cause = options.cause;
if (isZodErrorLike(cause)) {
return cause.issues;
}
}
return [];
}
// lib/v3/isValidationError.ts
function isValidationError(err) {
return err instanceof ValidationError;
}
// lib/v3/isValidationErrorLike.ts
function isValidationErrorLike(err) {
return err instanceof Error && err.name === "ZodValidationError";
}
// lib/v3/fromZodIssue.ts
import * as zod2 from "zod/v3";
// lib/v3/MessageBuilder.ts
import * as zod from "zod/v3";
// lib/utils/NonEmptyArray.ts
function isNonEmptyArray(value) {
return value.length !== 0;
}
// lib/utils/stringify.ts
function stringifySymbol(symbol) {
return symbol.description ?? "";
}
// lib/utils/joinPath.ts
var identifierRegex = /[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;
function joinPath(path) {
if (path.length === 1) {
let propertyKey = path[0];
if (typeof propertyKey === "symbol") {
propertyKey = stringifySymbol(propertyKey);
}
return propertyKey.toString() || '""';
}
return path.reduce((acc, propertyKey) => {
if (typeof propertyKey === "number") {
return acc + "[" + propertyKey.toString() + "]";
}
if (typeof propertyKey === "symbol") {
propertyKey = stringifySymbol(propertyKey);
}
if (propertyKey.includes('"')) {
return acc + '["' + escapeQuotes(propertyKey) + '"]';
}
if (!identifierRegex.test(propertyKey)) {
return acc + '["' + propertyKey + '"]';
}
const separator = acc.length === 0 ? "" : ".";
return acc + separator + propertyKey;
}, "");
}
function escapeQuotes(str) {
return str.replace(/"/g, '\\"');
}
// lib/v3/config.ts
var ISSUE_SEPARATOR = "; ";
var MAX_ISSUES_IN_MESSAGE = 99;
var PREFIX = "Validation error";
var PREFIX_SEPARATOR = ": ";
var UNION_SEPARATOR = ", or ";
// lib/v3/MessageBuilder.ts
function createMessageBuilder(props = {}) {
const {
issueSeparator = ISSUE_SEPARATOR,
unionSeparator = UNION_SEPARATOR,
prefixSeparator = PREFIX_SEPARATOR,
prefix = PREFIX,
includePath = true,
maxIssuesInMessage = MAX_ISSUES_IN_MESSAGE
} = props;
return (issues) => {
const message = issues.slice(0, maxIssuesInMessage).map(
(issue) => getMessageFromZodIssue({
issue,
issueSeparator,
unionSeparator,
includePath
})
).join(issueSeparator);
return prefixMessage(message, prefix, prefixSeparator);
};
}
function getMessageFromZodIssue(props) {
const { issue, issueSeparator, unionSeparator, includePath } = props;
if (issue.code === zod.ZodIssueCode.invalid_union) {
return issue.unionErrors.reduce((acc, zodError) => {
const newIssues = zodError.issues.map(
(issue2) => getMessageFromZodIssue({
issue: issue2,
issueSeparator,
unionSeparator,
includePath
})
).join(issueSeparator);
if (!acc.includes(newIssues)) {
acc.push(newIssues);
}
return acc;
}, []).join(unionSeparator);
}
if (issue.code === zod.ZodIssueCode.invalid_arguments) {
return [
issue.message,
...issue.argumentsError.issues.map(
(issue2) => getMessageFromZodIssue({
issue: issue2,
issueSeparator,
unionSeparator,
includePath
})
)
].join(issueSeparator);
}
if (issue.code === zod.ZodIssueCode.invalid_return_type) {
return [
issue.message,
...issue.returnTypeError.issues.map(
(issue2) => getMessageFromZodIssue({
issue: issue2,
issueSeparator,
unionSeparator,
includePath
})
)
].join(issueSeparator);
}
if (includePath && isNonEmptyArray(issue.path)) {
if (issue.path.length === 1) {
const identifier = issue.path[0];
if (typeof identifier === "number") {
return `${issue.message} at index ${identifier}`;
}
}
return `${issue.message} at "${joinPath(issue.path)}"`;
}
return issue.message;
}
function prefixMessage(message, prefix, prefixSeparator) {
if (prefix !== null) {
if (message.length > 0) {
return [prefix, message].join(prefixSeparator);
}
return prefix;
}
if (message.length > 0) {
return message;
}
return PREFIX;
}
// lib/v3/fromZodIssue.ts
function fromZodIssue(issue, options = {}) {
const messageBuilder = createMessageBuilderFromOptions(options);
const message = messageBuilder([issue]);
return new ValidationError(message, { cause: new zod2.ZodError([issue]) });
}
function createMessageBuilderFromOptions(options) {
if ("messageBuilder" in options) {
return options.messageBuilder;
}
return createMessageBuilder(options);
}
// lib/v3/errorMap.ts
var errorMap = (issue, ctx) => {
const error = fromZodIssue({
...issue,
// fallback to the default error message
// when issue does not have a message
message: issue.message ?? ctx.defaultError
});
return {
message: error.message
};
};
// lib/v3/fromZodError.ts
function fromZodError(zodError, options = {}) {
if (!isZodErrorLike(zodError)) {
throw new TypeError(
`Invalid zodError param; expected instance of ZodError. Did you mean to use the "${fromError.name}" method instead?`
);
}
return fromZodErrorWithoutRuntimeCheck(zodError, options);
}
function fromZodErrorWithoutRuntimeCheck(zodError, options = {}) {
const zodIssues = zodError.errors;
let message;
if (isNonEmptyArray(zodIssues)) {
const messageBuilder = createMessageBuilderFromOptions2(options);
message = messageBuilder(zodIssues);
} else {
message = zodError.message;
}
return new ValidationError(message, { cause: zodError });
}
function createMessageBuilderFromOptions2(options) {
if ("messageBuilder" in options) {
return options.messageBuilder;
}
return createMessageBuilder(options);
}
// lib/v3/toValidationError.ts
var toValidationError = (options = {}) => (err) => {
if (isZodErrorLike(err)) {
return fromZodErrorWithoutRuntimeCheck(err, options);
}
if (err instanceof Error) {
return new ValidationError(err.message, { cause: err });
}
return new ValidationError("Unknown error");
};
// lib/v3/fromError.ts
function fromError(err, options = {}) {
return toValidationError(options)(err);
}
export {
ValidationError,
createMessageBuilder,
errorMap,
fromError,
fromZodError,
fromZodIssue,
isValidationError,
isValidationErrorLike,
isZodErrorLike,
toValidationError
};
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1,263 @@
/**
* @fileoverview Rule to disallow useless backreferences in regular expressions
* @author Milos Djermanovic
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const {
CALL,
CONSTRUCT,
ReferenceTracker,
getStringIfConstant,
} = require("@eslint-community/eslint-utils");
const { RegExpParser, visitRegExpAST } = require("@eslint-community/regexpp");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const parser = new RegExpParser();
/**
* Finds the path from the given `regexpp` AST node to the root node.
* @param {regexpp.Node} node Node.
* @returns {regexpp.Node[]} Array that starts with the given node and ends with the root node.
*/
function getPathToRoot(node) {
const path = [];
let current = node;
do {
path.push(current);
current = current.parent;
} while (current);
return path;
}
/**
* Determines whether the given `regexpp` AST node is a lookaround node.
* @param {regexpp.Node} node Node.
* @returns {boolean} `true` if it is a lookaround node.
*/
function isLookaround(node) {
return (
node.type === "Assertion" &&
(node.kind === "lookahead" || node.kind === "lookbehind")
);
}
/**
* Determines whether the given `regexpp` AST node is a negative lookaround node.
* @param {regexpp.Node} node Node.
* @returns {boolean} `true` if it is a negative lookaround node.
*/
function isNegativeLookaround(node) {
return isLookaround(node) && node.negate;
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
docs: {
description:
"Disallow useless backreferences in regular expressions",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-useless-backreference",
},
schema: [],
messages: {
nested: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} from within that group.",
forward:
"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears later in the pattern.",
backward:
"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears before in the same lookbehind.",
disjunctive:
"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in another alternative.",
intoNegativeLookaround:
"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in a negative lookaround.",
},
},
create(context) {
const sourceCode = context.sourceCode;
/**
* Checks and reports useless backreferences in the given regular expression.
* @param {ASTNode} node Node that represents regular expression. A regex literal or RegExp constructor call.
* @param {string} pattern Regular expression pattern.
* @param {string} flags Regular expression flags.
* @returns {void}
*/
function checkRegex(node, pattern, flags) {
let regExpAST;
try {
regExpAST = parser.parsePattern(pattern, 0, pattern.length, {
unicode: flags.includes("u"),
unicodeSets: flags.includes("v"),
});
} catch {
// Ignore regular expressions with syntax errors
return;
}
visitRegExpAST(regExpAST, {
onBackreferenceEnter(bref) {
const groups = [bref.resolved].flat(),
brefPath = getPathToRoot(bref);
const problems = groups.map(group => {
const groupPath = getPathToRoot(group);
if (brefPath.includes(group)) {
// group is bref's ancestor => bref is nested ('nested reference') => group hasn't matched yet when bref starts to match.
return {
messageId: "nested",
group,
};
}
// Start from the root to find the lowest common ancestor.
let i = brefPath.length - 1,
j = groupPath.length - 1;
do {
i--;
j--;
} while (brefPath[i] === groupPath[j]);
const indexOfLowestCommonAncestor = j + 1,
groupCut = groupPath.slice(
0,
indexOfLowestCommonAncestor,
),
commonPath = groupPath.slice(
indexOfLowestCommonAncestor,
),
lowestCommonLookaround =
commonPath.find(isLookaround),
isMatchingBackward =
lowestCommonLookaround &&
lowestCommonLookaround.kind === "lookbehind";
if (groupCut.at(-1).type === "Alternative") {
// group's and bref's ancestor nodes below the lowest common ancestor are sibling alternatives => they're disjunctive.
return {
messageId: "disjunctive",
group,
};
}
if (!isMatchingBackward && bref.end <= group.start) {
// bref is left, group is right ('forward reference') => group hasn't matched yet when bref starts to match.
return {
messageId: "forward",
group,
};
}
if (isMatchingBackward && group.end <= bref.start) {
// the opposite of the previous when the regex is matching backward in a lookbehind context.
return {
messageId: "backward",
group,
};
}
if (groupCut.some(isNegativeLookaround)) {
// group is in a negative lookaround which isn't bref's ancestor => group has already failed when bref starts to match.
return {
messageId: "intoNegativeLookaround",
group,
};
}
return null;
});
if (
problems.length === 0 ||
problems.some(problem => !problem)
) {
// If there are no problems or no problems with any group then do not report it.
return;
}
let problemsToReport;
// Gets problems that appear in the same disjunction.
const problemsInSameDisjunction = problems.filter(
problem => problem.messageId !== "disjunctive",
);
if (problemsInSameDisjunction.length) {
// Only report problems that appear in the same disjunction.
problemsToReport = problemsInSameDisjunction;
} else {
// If all groups appear in different disjunctions, report it.
problemsToReport = problems;
}
const [{ messageId, group }, ...other] = problemsToReport;
let otherGroups = "";
if (other.length === 1) {
otherGroups = " and another group";
} else if (other.length > 1) {
otherGroups = ` and other ${other.length} groups`;
}
context.report({
node,
messageId,
data: {
bref: bref.raw,
group: group.raw,
otherGroups,
},
});
},
});
}
return {
"Literal[regex]"(node) {
const { pattern, flags } = node.regex;
checkRegex(node, pattern, flags);
},
Program(node) {
const scope = sourceCode.getScope(node),
tracker = new ReferenceTracker(scope),
traceMap = {
RegExp: {
[CALL]: true,
[CONSTRUCT]: true,
},
};
for (const { node: refNode } of tracker.iterateGlobalReferences(
traceMap,
)) {
const [patternNode, flagsNode] = refNode.arguments,
pattern = getStringIfConstant(patternNode, scope),
flags = getStringIfConstant(flagsNode, scope);
if (typeof pattern === "string") {
checkRegex(refNode, pattern, flags || "");
}
}
},
};
},
};
@@ -0,0 +1,191 @@
#!/usr/bin/env node
// Standalone semver comparison program.
// Exits successfully and prints matching version(s) if
// any supplied version is valid and passes all tests.
'use strict'
const argv = process.argv.slice(2)
let versions = []
const range = []
let inc = null
const version = require('../package.json').version
let loose = false
let includePrerelease = false
let coerce = false
let rtl = false
let identifier
let identifierBase
const semver = require('../')
const parseOptions = require('../internal/parse-options')
let reverse = false
let options = {}
const main = () => {
if (!argv.length) {
return help()
}
while (argv.length) {
let a = argv.shift()
const indexOfEqualSign = a.indexOf('=')
if (indexOfEqualSign !== -1) {
const value = a.slice(indexOfEqualSign + 1)
a = a.slice(0, indexOfEqualSign)
argv.unshift(value)
}
switch (a) {
case '-rv': case '-rev': case '--rev': case '--reverse':
reverse = true
break
case '-l': case '--loose':
loose = true
break
case '-p': case '--include-prerelease':
includePrerelease = true
break
case '-v': case '--version':
versions.push(argv.shift())
break
case '-i': case '--inc': case '--increment':
switch (argv[0]) {
case 'major': case 'minor': case 'patch': case 'prerelease':
case 'premajor': case 'preminor': case 'prepatch':
case 'release':
inc = argv.shift()
break
default:
inc = 'patch'
break
}
break
case '--preid':
identifier = argv.shift()
break
case '-r': case '--range':
range.push(argv.shift())
break
case '-n':
identifierBase = argv.shift()
if (identifierBase === 'false') {
identifierBase = false
}
break
case '-c': case '--coerce':
coerce = true
break
case '--rtl':
rtl = true
break
case '--ltr':
rtl = false
break
case '-h': case '--help': case '-?':
return help()
default:
versions.push(a)
break
}
}
options = parseOptions({ loose, includePrerelease, rtl })
versions = versions.map((v) => {
return coerce ? (semver.coerce(v, options) || { version: v }).version : v
}).filter((v) => {
return semver.valid(v, options)
})
if (!versions.length) {
return fail()
}
if (inc && (versions.length !== 1 || range.length)) {
return failInc()
}
for (let i = 0, l = range.length; i < l; i++) {
versions = versions.filter((v) => {
return semver.satisfies(v, range[i], options)
})
if (!versions.length) {
return fail()
}
}
versions
.sort((a, b) => semver[reverse ? 'rcompare' : 'compare'](a, b, options))
.map(v => semver.clean(v, options))
.map(v => inc ? semver.inc(v, inc, options, identifier, identifierBase) : v)
.forEach(v => console.log(v))
}
const failInc = () => {
console.error('--inc can only be used on a single version with no range')
fail()
}
const fail = () => process.exit(1)
const help = () => console.log(
`SemVer ${version}
A JavaScript implementation of the https://semver.org/ specification
Copyright Isaac Z. Schlueter
Usage: semver [options] <version> [<version> [...]]
Prints valid versions sorted by SemVer precedence
Options:
-r --range <range>
Print versions that match the specified range.
-i --increment [<level>]
Increment a version by the specified level. Level can
be one of: major, minor, patch, premajor, preminor,
prepatch, prerelease, or release. Default level is 'patch'.
Only one version may be specified.
--preid <identifier>
Identifier to be used to prefix premajor, preminor,
prepatch or prerelease version increments.
-l --loose
Interpret versions and ranges loosely
-p --include-prerelease
Always include prerelease versions in range matching
-c --coerce
Coerce a string into SemVer if possible
(does not imply --loose)
--rtl
Coerce version strings right to left
--ltr
Coerce version strings left to right (default)
-n <base>
Base number to be used for the prerelease identifier.
Can be either 0 or 1, or false to omit the number altogether.
Defaults to 0.
Program exits successfully if any valid version satisfies
all supplied ranges, and prints all satisfying versions.
If no satisfying versions are found, then exits failure.
Versions are printed in ascending order, so supplying
multiple versions to the utility will just sort them.`)
main()
@@ -0,0 +1,90 @@
import { isHTMLElement } from '../../utils/is-html-element.mjs';
import { isDragActive } from '../drag/state/is-active.mjs';
import { isNodeOrChild } from '../utils/is-node-or-child.mjs';
import { isPrimaryPointer } from '../utils/is-primary-pointer.mjs';
import { setupGesture } from '../utils/setup.mjs';
import { isElementKeyboardAccessible } from './utils/is-keyboard-accessible.mjs';
import { enableKeyboardPress } from './utils/keyboard.mjs';
import { isPressing } from './utils/state.mjs';
/**
* Filter out events that are not primary pointer events, or are triggering
* while a Motion gesture is active.
*/
function isValidPressEvent(event) {
return isPrimaryPointer(event) && !isDragActive();
}
const claimedPointerDownEvents = new WeakSet();
/**
* Create a press gesture.
*
* Press is different to `"pointerdown"`, `"pointerup"` in that it
* automatically filters out secondary pointer events like right
* click and multitouch.
*
* It also adds accessibility support for keyboards, where
* an element with a press gesture will receive focus and
* trigger on Enter `"keydown"` and `"keyup"` events.
*
* This is different to a browser's `"click"` event, which does
* respond to keyboards but only for the `"click"` itself, rather
* than the press start and end/cancel. The element also needs
* to be focusable for this to work, whereas a press gesture will
* make an element focusable by default.
*
* @public
*/
function press(targetOrSelector, onPressStart, options = {}) {
const [targets, eventOptions, cancelEvents] = setupGesture(targetOrSelector, options);
const startPress = (startEvent) => {
const target = startEvent.currentTarget;
if (!isValidPressEvent(startEvent))
return;
if (claimedPointerDownEvents.has(startEvent))
return;
isPressing.add(target);
if (options.stopPropagation) {
claimedPointerDownEvents.add(startEvent);
}
const onPressEnd = onPressStart(target, startEvent);
const onPointerEnd = (endEvent, success) => {
window.removeEventListener("pointerup", onPointerUp);
window.removeEventListener("pointercancel", onPointerCancel);
if (isPressing.has(target)) {
isPressing.delete(target);
}
if (!isValidPressEvent(endEvent)) {
return;
}
if (typeof onPressEnd === "function") {
onPressEnd(endEvent, { success });
}
};
const onPointerUp = (upEvent) => {
onPointerEnd(upEvent, target === window ||
target === document ||
options.useGlobalTarget ||
isNodeOrChild(target, upEvent.target));
};
const onPointerCancel = (cancelEvent) => {
onPointerEnd(cancelEvent, false);
};
window.addEventListener("pointerup", onPointerUp, eventOptions);
window.addEventListener("pointercancel", onPointerCancel, eventOptions);
};
targets.forEach((target) => {
const pointerDownTarget = options.useGlobalTarget ? window : target;
pointerDownTarget.addEventListener("pointerdown", startPress, eventOptions);
if (isHTMLElement(target)) {
target.addEventListener("focus", (event) => enableKeyboardPress(event, eventOptions));
if (!isElementKeyboardAccessible(target) &&
!target.hasAttribute("tabindex")) {
target.tabIndex = 0;
}
}
});
return cancelEvents;
}
export { press };
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"delay.mjs","sources":["../../../src/utils/delay.ts"],"sourcesContent":["import { cancelFrame, frame } from \"../frameloop\"\nimport { time } from \"../frameloop/sync-time\"\nimport type { FrameData } from \"../frameloop/types\"\nimport { secondsToMilliseconds } from \"motion-utils\"\n\nexport type DelayedFunction = (overshoot: number) => void\n\n/**\n * Timeout defined in ms\n */\nexport function delay(callback: DelayedFunction, timeout: number) {\n const start = time.now()\n\n const checkElapsed = ({ timestamp }: FrameData) => {\n const elapsed = timestamp - start\n\n if (elapsed >= timeout) {\n cancelFrame(checkElapsed)\n callback(elapsed - timeout)\n }\n }\n\n frame.setup(checkElapsed, true)\n\n return () => cancelFrame(checkElapsed)\n}\n\nexport function delayInSeconds(callback: DelayedFunction, timeout: number) {\n return delay(callback, secondsToMilliseconds(timeout))\n}\n"],"names":[],"mappings":";;;;AAOA;;AAEG;AACG,SAAU,KAAK,CAAC,QAAyB,EAAE,OAAe,EAAA;AAC5D,IAAA,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE;AAExB,IAAA,MAAM,YAAY,GAAG,CAAC,EAAE,SAAS,EAAa,KAAI;AAC9C,QAAA,MAAM,OAAO,GAAG,SAAS,GAAG,KAAK;AAEjC,QAAA,IAAI,OAAO,IAAI,OAAO,EAAE;YACpB,WAAW,CAAC,YAAY,CAAC;AACzB,YAAA,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;QAC/B;AACJ,IAAA,CAAC;AAED,IAAA,KAAK,CAAC,KAAK,CAAC,YAAY,EAAE,IAAI,CAAC;AAE/B,IAAA,OAAO,MAAM,WAAW,CAAC,YAAY,CAAC;AAC1C;AAEM,SAAU,cAAc,CAAC,QAAyB,EAAE,OAAe,EAAA;IACrE,OAAO,KAAK,CAAC,QAAQ,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC;AAC1D;;;;"}
@@ -0,0 +1,107 @@
'use strict'
let AtRule = require('./at-rule')
let Comment = require('./comment')
let Declaration = require('./declaration')
let Input = require('./input')
let PreviousMap = require('./previous-map')
let Root = require('./root')
let Rule = require('./rule')
function hydrateInputs(json, inputs) {
if (!json.inputs) return inputs
return json.inputs.map(input => {
let inputHydrated = { ...input, __proto__: Input.prototype }
if (inputHydrated.map) {
inputHydrated.map = {
...inputHydrated.map,
__proto__: PreviousMap.prototype
}
}
return inputHydrated
})
}
function constructNode(json, inputs, children) {
let defaults = { ...json }
delete defaults.inputs
delete defaults.nodes
if (defaults.source) {
let { inputId, ...source } = defaults.source
defaults.source = source
if (inputId != null) {
defaults.source.input = inputs[inputId]
}
}
let node
if (defaults.type === 'root') {
node = new Root(defaults)
} else if (defaults.type === 'decl') {
node = new Declaration(defaults)
} else if (defaults.type === 'rule') {
node = new Rule(defaults)
} else if (defaults.type === 'comment') {
node = new Comment(defaults)
} else if (defaults.type === 'atrule') {
node = new AtRule(defaults)
} else {
throw new Error('Unknown node type: ' + json.type)
}
// Rehydrated children are attached after construction. Passing them
// through the container constructor would re-run insertion spacing
// normalization and overwrite each child's own `raws.before`.
if (children) {
node.nodes = children
for (let child of children) child.parent = node
}
return node
}
function fromJSON(json, inputs) {
if (Array.isArray(json)) return json.map(n => fromJSON(n))
// An explicit stack instead of recursive calls to survive deeply
// nested trees. Children are rehydrated before their parent node
// is constructed.
let result
let stack = [
{ childIndex: 0, children: [], inputs: hydrateInputs(json, inputs), json }
]
while (stack.length > 0) {
let frame = stack[stack.length - 1]
let jsonNodes = frame.json.nodes
if (jsonNodes && frame.childIndex < jsonNodes.length) {
let childJson = jsonNodes[frame.childIndex]
frame.childIndex += 1
stack.push({
childIndex: 0,
children: [],
inputs: hydrateInputs(childJson, frame.inputs),
json: childJson
})
continue
}
stack.pop()
let node = constructNode(
frame.json,
frame.inputs,
jsonNodes ? frame.children : undefined
)
if (stack.length > 0) {
stack[stack.length - 1].children.push(node)
} else {
result = node
}
}
return result
}
module.exports = fromJSON
fromJSON.default = fromJSON
@@ -0,0 +1,4 @@
import type Ajv from "../../core";
import { SchemaObjectMap } from "./types";
import { SchemaEnv } from "..";
export default function compileParser(this: Ajv, sch: SchemaEnv, definitions: SchemaObjectMap): SchemaEnv;
@@ -0,0 +1,507 @@
/**
* The `node:os` module provides operating system-related utility methods and
* properties. It can be accessed using:
*
* ```js
* import os from 'node:os';
* ```
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/os.js)
*/
declare module "os" {
import { NonSharedBuffer } from "buffer";
interface CpuInfo {
model: string;
speed: number;
times: {
/** The number of milliseconds the CPU has spent in user mode. */
user: number;
/** The number of milliseconds the CPU has spent in nice mode. */
nice: number;
/** The number of milliseconds the CPU has spent in sys mode. */
sys: number;
/** The number of milliseconds the CPU has spent in idle mode. */
idle: number;
/** The number of milliseconds the CPU has spent in irq mode. */
irq: number;
};
}
interface NetworkInterfaceBase {
address: string;
netmask: string;
mac: string;
internal: boolean;
cidr: string | null;
scopeid?: number;
}
interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
family: "IPv4";
}
interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
family: "IPv6";
scopeid: number;
}
interface UserInfo<T> {
username: T;
uid: number;
gid: number;
shell: T | null;
homedir: T;
}
type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
/**
* Returns the host name of the operating system as a string.
* @since v0.3.3
*/
function hostname(): string;
/**
* Returns an array containing the 1, 5, and 15 minute load averages.
*
* The load average is a measure of system activity calculated by the operating
* system and expressed as a fractional number.
*
* The load average is a Unix-specific concept. On Windows, the return value is
* always `[0, 0, 0]`.
* @since v0.3.3
*/
function loadavg(): number[];
/**
* Returns the system uptime in number of seconds.
* @since v0.3.3
*/
function uptime(): number;
/**
* Returns the amount of free system memory in bytes as an integer.
* @since v0.3.3
*/
function freemem(): number;
/**
* Returns the total amount of system memory in bytes as an integer.
* @since v0.3.3
*/
function totalmem(): number;
/**
* Returns an array of objects containing information about each logical CPU core.
* The array will be empty if no CPU information is available, such as if the `/proc` file system is unavailable.
*
* The properties included on each object include:
*
* ```js
* [
* {
* model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
* speed: 2926,
* times: {
* user: 252020,
* nice: 0,
* sys: 30340,
* idle: 1070356870,
* irq: 0,
* },
* },
* {
* model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
* speed: 2926,
* times: {
* user: 306960,
* nice: 0,
* sys: 26980,
* idle: 1071569080,
* irq: 0,
* },
* },
* {
* model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
* speed: 2926,
* times: {
* user: 248450,
* nice: 0,
* sys: 21750,
* idle: 1070919370,
* irq: 0,
* },
* },
* {
* model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
* speed: 2926,
* times: {
* user: 256880,
* nice: 0,
* sys: 19430,
* idle: 1070905480,
* irq: 20,
* },
* },
* ];
* ```
*
* `nice` values are POSIX-only. On Windows, the `nice` values of all processors
* are always 0.
*
* `os.cpus().length` should not be used to calculate the amount of parallelism
* available to an application. Use {@link availableParallelism} for this purpose.
* @since v0.3.3
*/
function cpus(): CpuInfo[];
/**
* Returns an estimate of the default amount of parallelism a program should use.
* Always returns a value greater than zero.
*
* This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism).
* @since v19.4.0, v18.14.0
*/
function availableParallelism(): number;
/**
* Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it
* returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows.
*
* See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information
* about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems.
* @since v0.3.3
*/
function type(): string;
/**
* Returns the operating system as a string.
*
* On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See
* [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
* @since v0.3.3
*/
function release(): string;
/**
* Returns an object containing network interfaces that have been assigned a
* network address.
*
* Each key on the returned object identifies a network interface. The associated
* value is an array of objects that each describe an assigned network address.
*
* The properties available on the assigned network address object include:
*
* ```json
* {
* "lo": [
* {
* "address:": "127.0.0.1",
* "netmask:": "255.0.0.0",
* "family:": "IPv4",
* "mac:": "00:00:00:00:00:00",
* "internal:": true,
* "cidr:": "127.0.0.1/8"
* },
* {
* "address:": "::1",
* "netmask:": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
* "family:": "IPv6",
* "mac:": "00:00:00:00:00:00",
* "scopeid:": 0,
* "internal:": true,
* "cidr:": "::1/128"
* }
* ],
* "eth0": [
* {
* "address:": "192.168.1.108",
* "netmask:": "255.255.255.0",
* "family:": "IPv4",
* "mac:": "01:02:03:0a:0b:0c",
* "internal:": false,
* "cidr:": "192.168.1.108/24"
* },
* {
* "address:": "fe80::a00:27ff:fe4e:66a1",
* "netmask:": "ffff:ffff:ffff:ffff::",
* "family:": "IPv6",
* "mac:": "01:02:03:0a:0b:0c",
* "scopeid:": 1,
* "internal:": false,
* "cidr:": "fe80::a00:27ff:fe4e:66a1/64"
* }
* ]
* }
* ```
* @since v0.6.0
*/
function networkInterfaces(): NodeJS.Dict<NetworkInterfaceInfo[]>;
/**
* Returns the string path of the current user's home directory.
*
* On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it
* uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory.
*
* On Windows, it uses the `USERPROFILE` environment variable if defined.
* Otherwise it uses the path to the profile directory of the current user.
* @since v2.3.0
*/
function homedir(): string;
interface UserInfoOptions {
encoding?: BufferEncoding | "buffer" | undefined;
}
interface UserInfoOptionsWithBufferEncoding extends UserInfoOptions {
encoding: "buffer";
}
interface UserInfoOptionsWithStringEncoding extends UserInfoOptions {
encoding?: BufferEncoding | undefined;
}
/**
* Returns information about the currently effective user. On POSIX platforms,
* this is typically a subset of the password file. The returned object includes
* the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and `gid` fields are `-1`, and `shell` is `null`.
*
* The value of `homedir` returned by `os.userInfo()` is provided by the operating
* system. This differs from the result of `os.homedir()`, which queries
* environment variables for the home directory before falling back to the
* operating system response.
*
* Throws a [`SystemError`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`.
* @since v6.0.0
*/
function userInfo(options?: UserInfoOptionsWithStringEncoding): UserInfo<string>;
function userInfo(options: UserInfoOptionsWithBufferEncoding): UserInfo<NonSharedBuffer>;
function userInfo(options: UserInfoOptions): UserInfo<string | NonSharedBuffer>;
type SignalConstants = {
[key in NodeJS.Signals]: number;
};
namespace constants {
const UV_UDP_REUSEADDR: number;
namespace signals {}
const signals: SignalConstants;
namespace errno {
const E2BIG: number;
const EACCES: number;
const EADDRINUSE: number;
const EADDRNOTAVAIL: number;
const EAFNOSUPPORT: number;
const EAGAIN: number;
const EALREADY: number;
const EBADF: number;
const EBADMSG: number;
const EBUSY: number;
const ECANCELED: number;
const ECHILD: number;
const ECONNABORTED: number;
const ECONNREFUSED: number;
const ECONNRESET: number;
const EDEADLK: number;
const EDESTADDRREQ: number;
const EDOM: number;
const EDQUOT: number;
const EEXIST: number;
const EFAULT: number;
const EFBIG: number;
const EHOSTUNREACH: number;
const EIDRM: number;
const EILSEQ: number;
const EINPROGRESS: number;
const EINTR: number;
const EINVAL: number;
const EIO: number;
const EISCONN: number;
const EISDIR: number;
const ELOOP: number;
const EMFILE: number;
const EMLINK: number;
const EMSGSIZE: number;
const EMULTIHOP: number;
const ENAMETOOLONG: number;
const ENETDOWN: number;
const ENETRESET: number;
const ENETUNREACH: number;
const ENFILE: number;
const ENOBUFS: number;
const ENODATA: number;
const ENODEV: number;
const ENOENT: number;
const ENOEXEC: number;
const ENOLCK: number;
const ENOLINK: number;
const ENOMEM: number;
const ENOMSG: number;
const ENOPROTOOPT: number;
const ENOSPC: number;
const ENOSR: number;
const ENOSTR: number;
const ENOSYS: number;
const ENOTCONN: number;
const ENOTDIR: number;
const ENOTEMPTY: number;
const ENOTSOCK: number;
const ENOTSUP: number;
const ENOTTY: number;
const ENXIO: number;
const EOPNOTSUPP: number;
const EOVERFLOW: number;
const EPERM: number;
const EPIPE: number;
const EPROTO: number;
const EPROTONOSUPPORT: number;
const EPROTOTYPE: number;
const ERANGE: number;
const EROFS: number;
const ESPIPE: number;
const ESRCH: number;
const ESTALE: number;
const ETIME: number;
const ETIMEDOUT: number;
const ETXTBSY: number;
const EWOULDBLOCK: number;
const EXDEV: number;
const WSAEINTR: number;
const WSAEBADF: number;
const WSAEACCES: number;
const WSAEFAULT: number;
const WSAEINVAL: number;
const WSAEMFILE: number;
const WSAEWOULDBLOCK: number;
const WSAEINPROGRESS: number;
const WSAEALREADY: number;
const WSAENOTSOCK: number;
const WSAEDESTADDRREQ: number;
const WSAEMSGSIZE: number;
const WSAEPROTOTYPE: number;
const WSAENOPROTOOPT: number;
const WSAEPROTONOSUPPORT: number;
const WSAESOCKTNOSUPPORT: number;
const WSAEOPNOTSUPP: number;
const WSAEPFNOSUPPORT: number;
const WSAEAFNOSUPPORT: number;
const WSAEADDRINUSE: number;
const WSAEADDRNOTAVAIL: number;
const WSAENETDOWN: number;
const WSAENETUNREACH: number;
const WSAENETRESET: number;
const WSAECONNABORTED: number;
const WSAECONNRESET: number;
const WSAENOBUFS: number;
const WSAEISCONN: number;
const WSAENOTCONN: number;
const WSAESHUTDOWN: number;
const WSAETOOMANYREFS: number;
const WSAETIMEDOUT: number;
const WSAECONNREFUSED: number;
const WSAELOOP: number;
const WSAENAMETOOLONG: number;
const WSAEHOSTDOWN: number;
const WSAEHOSTUNREACH: number;
const WSAENOTEMPTY: number;
const WSAEPROCLIM: number;
const WSAEUSERS: number;
const WSAEDQUOT: number;
const WSAESTALE: number;
const WSAEREMOTE: number;
const WSASYSNOTREADY: number;
const WSAVERNOTSUPPORTED: number;
const WSANOTINITIALISED: number;
const WSAEDISCON: number;
const WSAENOMORE: number;
const WSAECANCELLED: number;
const WSAEINVALIDPROCTABLE: number;
const WSAEINVALIDPROVIDER: number;
const WSAEPROVIDERFAILEDINIT: number;
const WSASYSCALLFAILURE: number;
const WSASERVICE_NOT_FOUND: number;
const WSATYPE_NOT_FOUND: number;
const WSA_E_NO_MORE: number;
const WSA_E_CANCELLED: number;
const WSAEREFUSED: number;
}
namespace dlopen {
const RTLD_LAZY: number;
const RTLD_NOW: number;
const RTLD_GLOBAL: number;
const RTLD_LOCAL: number;
const RTLD_DEEPBIND: number;
}
namespace priority {
const PRIORITY_LOW: number;
const PRIORITY_BELOW_NORMAL: number;
const PRIORITY_NORMAL: number;
const PRIORITY_ABOVE_NORMAL: number;
const PRIORITY_HIGH: number;
const PRIORITY_HIGHEST: number;
}
}
const devNull: string;
/**
* The operating system-specific end-of-line marker.
* * `\n` on POSIX
* * `\r\n` on Windows
*/
const EOL: string;
/**
* Returns the operating system CPU architecture for which the Node.js binary was
* compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`,
* `'mips'`, `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`.
*
* The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v24.x/api/process.html#processarch).
* @since v0.5.0
*/
function arch(): NodeJS.Architecture;
/**
* Returns a string identifying the kernel version.
*
* On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
* available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
* @since v13.11.0, v12.17.0
*/
function version(): string;
/**
* Returns a string identifying the operating system platform for which
* the Node.js binary was compiled. The value is set at compile time.
* Possible values are `'aix'`, `'darwin'`, `'freebsd'`, `'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`.
*
* The return value is equivalent to `process.platform`.
*
* The value `'android'` may also be returned if Node.js is built on the Android
* operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
* @since v0.5.0
*/
function platform(): NodeJS.Platform;
/**
* Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`,
* `mips`, `mips64`, `ppc64`, `ppc64le`, `s390x`, `i386`, `i686`, `x86_64`.
*
* On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
* available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
* @since v18.9.0, v16.18.0
*/
function machine(): string;
/**
* Returns the operating system's default directory for temporary files as a
* string.
* @since v0.9.9
*/
function tmpdir(): string;
/**
* Returns a string identifying the endianness of the CPU for which the Node.js
* binary was compiled.
*
* Possible values are `'BE'` for big endian and `'LE'` for little endian.
* @since v0.9.4
*/
function endianness(): "BE" | "LE";
/**
* Returns the scheduling priority for the process specified by `pid`. If `pid` is
* not provided or is `0`, the priority of the current process is returned.
* @since v10.10.0
* @param [pid=0] The process ID to retrieve scheduling priority for.
*/
function getPriority(pid?: number): number;
/**
* Attempts to set the scheduling priority for the process specified by `pid`. If `pid` is not provided or is `0`, the process ID of the current process is used.
*
* The `priority` input must be an integer between `-20` (high priority) and `19` (low priority). Due to differences between Unix priority levels and Windows
* priority classes, `priority` is mapped to one of six priority constants in `os.constants.priority`. When retrieving a process priority level, this range
* mapping may cause the return value to be slightly different on Windows. To avoid
* confusion, set `priority` to one of the priority constants.
*
* On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user
* privileges. Otherwise the set priority will be silently reduced to `PRIORITY_HIGH`.
* @since v10.10.0
* @param [pid=0] The process ID to set scheduling priority for.
* @param priority The scheduling priority to assign to the process.
*/
function setPriority(priority: number): void;
function setPriority(pid: number, priority: number): void;
}
declare module "node:os" {
export * from "os";
}
@@ -0,0 +1,530 @@
'use strict';
const zlib = require('zlib');
const bufferUtil = require('./buffer-util');
const Limiter = require('./limiter');
const { kStatusCode } = require('./constants');
const FastBuffer = Buffer[Symbol.species];
const TRAILER = Buffer.from([0x00, 0x00, 0xff, 0xff]);
const kPerMessageDeflate = Symbol('permessage-deflate');
const kTotalLength = Symbol('total-length');
const kCallback = Symbol('callback');
const kBuffers = Symbol('buffers');
const kError = Symbol('error');
//
// We limit zlib concurrency, which prevents severe memory fragmentation
// as documented in https://github.com/nodejs/node/issues/8871#issuecomment-250915913
// and https://github.com/websockets/ws/issues/1202
//
// Intentionally global; it's the global thread pool that's an issue.
//
let zlibLimiter;
/**
* permessage-deflate implementation.
*/
class PerMessageDeflate {
/**
* Creates a PerMessageDeflate instance.
*
* @param {Object} [options] Configuration options
* @param {(Boolean|Number)} [options.clientMaxWindowBits] Advertise support
* for, or request, a custom client window size
* @param {Boolean} [options.clientNoContextTakeover=false] Advertise/
* acknowledge disabling of client context takeover
* @param {Number} [options.concurrencyLimit=10] The number of concurrent
* calls to zlib
* @param {Boolean} [options.isServer=false] Create the instance in either
* server or client mode
* @param {Number} [options.maxPayload=0] The maximum allowed message length
* @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the
* use of a custom server window size
* @param {Boolean} [options.serverNoContextTakeover=false] Request/accept
* disabling of server context takeover
* @param {Number} [options.threshold=1024] Size (in bytes) below which
* messages should not be compressed if context takeover is disabled
* @param {Object} [options.zlibDeflateOptions] Options to pass to zlib on
* deflate
* @param {Object} [options.zlibInflateOptions] Options to pass to zlib on
* inflate
*/
constructor(options) {
this._options = options || {};
this._threshold =
this._options.threshold !== undefined ? this._options.threshold : 1024;
this._maxPayload = this._options.maxPayload | 0;
this._isServer = !!this._options.isServer;
this._deflate = null;
this._inflate = null;
this.params = null;
if (!zlibLimiter) {
const concurrency =
this._options.concurrencyLimit !== undefined
? this._options.concurrencyLimit
: 10;
zlibLimiter = new Limiter(concurrency);
}
}
/**
* @type {String}
*/
static get extensionName() {
return 'permessage-deflate';
}
/**
* Create an extension negotiation offer.
*
* @return {Object} Extension parameters
* @public
*/
offer() {
const params = {};
if (this._options.serverNoContextTakeover) {
params.server_no_context_takeover = true;
}
if (this._options.clientNoContextTakeover) {
params.client_no_context_takeover = true;
}
if (this._options.serverMaxWindowBits) {
params.server_max_window_bits = this._options.serverMaxWindowBits;
}
if (this._options.clientMaxWindowBits) {
params.client_max_window_bits = this._options.clientMaxWindowBits;
} else if (this._options.clientMaxWindowBits == null) {
params.client_max_window_bits = true;
}
return params;
}
/**
* Accept an extension negotiation offer/response.
*
* @param {Array} configurations The extension negotiation offers/reponse
* @return {Object} Accepted configuration
* @public
*/
accept(configurations) {
configurations = this.normalizeParams(configurations);
this.params = this._isServer
? this.acceptAsServer(configurations)
: this.acceptAsClient(configurations);
return this.params;
}
/**
* Releases all resources used by the extension.
*
* @public
*/
cleanup() {
if (this._inflate) {
this._inflate.close();
this._inflate = null;
}
if (this._deflate) {
const callback = this._deflate[kCallback];
this._deflate.close();
this._deflate = null;
if (callback) {
callback(
new Error(
'The deflate stream was closed while data was being processed'
)
);
}
}
}
/**
* Accept an extension negotiation offer.
*
* @param {Array} offers The extension negotiation offers
* @return {Object} Accepted configuration
* @private
*/
acceptAsServer(offers) {
const opts = this._options;
const accepted = offers.find((params) => {
if (
(opts.serverNoContextTakeover === false &&
params.server_no_context_takeover) ||
(params.server_max_window_bits &&
(opts.serverMaxWindowBits === false ||
(typeof opts.serverMaxWindowBits === 'number' &&
opts.serverMaxWindowBits > params.server_max_window_bits))) ||
(typeof opts.clientMaxWindowBits === 'number' &&
(typeof params.client_max_window_bits === 'number'
? opts.clientMaxWindowBits > params.client_max_window_bits
: !params.client_max_window_bits))
) {
return false;
}
return true;
});
if (!accepted) {
throw new Error('None of the extension offers can be accepted');
}
if (opts.serverNoContextTakeover) {
accepted.server_no_context_takeover = true;
}
if (opts.clientNoContextTakeover) {
accepted.client_no_context_takeover = true;
}
if (typeof opts.serverMaxWindowBits === 'number') {
accepted.server_max_window_bits = opts.serverMaxWindowBits;
}
if (typeof opts.clientMaxWindowBits === 'number') {
accepted.client_max_window_bits = opts.clientMaxWindowBits;
} else if (
accepted.client_max_window_bits === true ||
opts.clientMaxWindowBits === false
) {
delete accepted.client_max_window_bits;
}
return accepted;
}
/**
* Accept the extension negotiation response.
*
* @param {Array} response The extension negotiation response
* @return {Object} Accepted configuration
* @private
*/
acceptAsClient(response) {
const params = response[0];
if (
this._options.clientNoContextTakeover === false &&
params.client_no_context_takeover
) {
throw new Error('Unexpected parameter "client_no_context_takeover"');
}
if (!params.client_max_window_bits) {
if (typeof this._options.clientMaxWindowBits === 'number') {
params.client_max_window_bits = this._options.clientMaxWindowBits;
}
} else if (
this._options.clientMaxWindowBits === false ||
(typeof this._options.clientMaxWindowBits === 'number' &&
params.client_max_window_bits > this._options.clientMaxWindowBits)
) {
throw new Error(
'Unexpected or invalid parameter "client_max_window_bits"'
);
}
return params;
}
/**
* Normalize parameters.
*
* @param {Array} configurations The extension negotiation offers/reponse
* @return {Array} The offers/response with normalized parameters
* @private
*/
normalizeParams(configurations) {
configurations.forEach((params) => {
Object.keys(params).forEach((key) => {
let value = params[key];
if (value.length > 1) {
throw new Error(`Parameter "${key}" must have only a single value`);
}
value = value[0];
if (key === 'client_max_window_bits') {
if (value !== true) {
const num = +value;
if (!Number.isInteger(num) || num < 8 || num > 15) {
throw new TypeError(
`Invalid value for parameter "${key}": ${value}`
);
}
value = num;
} else if (!this._isServer) {
throw new TypeError(
`Invalid value for parameter "${key}": ${value}`
);
}
} else if (key === 'server_max_window_bits') {
const num = +value;
if (!Number.isInteger(num) || num < 8 || num > 15) {
throw new TypeError(
`Invalid value for parameter "${key}": ${value}`
);
}
value = num;
} else if (
key === 'client_no_context_takeover' ||
key === 'server_no_context_takeover'
) {
if (value !== true) {
throw new TypeError(
`Invalid value for parameter "${key}": ${value}`
);
}
} else {
throw new Error(`Unknown parameter "${key}"`);
}
params[key] = value;
});
});
return configurations;
}
/**
* Decompress data. Concurrency limited.
*
* @param {Buffer} data Compressed data
* @param {Boolean} fin Specifies whether or not this is the last fragment
* @param {Function} callback Callback
* @public
*/
decompress(data, fin, callback) {
zlibLimiter.add((done) => {
this._decompress(data, fin, (err, result) => {
done();
callback(err, result);
});
});
}
/**
* Compress data. Concurrency limited.
*
* @param {(Buffer|String)} data Data to compress
* @param {Boolean} fin Specifies whether or not this is the last fragment
* @param {Function} callback Callback
* @public
*/
compress(data, fin, callback) {
zlibLimiter.add((done) => {
this._compress(data, fin, (err, result) => {
done();
callback(err, result);
});
});
}
/**
* Decompress data.
*
* @param {Buffer} data Compressed data
* @param {Boolean} fin Specifies whether or not this is the last fragment
* @param {Function} callback Callback
* @private
*/
_decompress(data, fin, callback) {
const endpoint = this._isServer ? 'client' : 'server';
if (!this._inflate) {
const key = `${endpoint}_max_window_bits`;
const windowBits =
typeof this.params[key] !== 'number'
? zlib.Z_DEFAULT_WINDOWBITS
: this.params[key];
this._inflate = zlib.createInflateRaw({
...this._options.zlibInflateOptions,
windowBits
});
this._inflate[kPerMessageDeflate] = this;
this._inflate[kTotalLength] = 0;
this._inflate[kBuffers] = [];
this._inflate.on('error', inflateOnError);
this._inflate.on('data', inflateOnData);
}
this._inflate[kCallback] = callback;
this._inflate.write(data);
if (fin) this._inflate.write(TRAILER);
this._inflate.flush(() => {
const err = this._inflate[kError];
if (err) {
this._inflate.close();
this._inflate = null;
callback(err);
return;
}
const data = bufferUtil.concat(
this._inflate[kBuffers],
this._inflate[kTotalLength]
);
if (this._inflate._readableState.endEmitted) {
this._inflate.close();
this._inflate = null;
} else {
this._inflate[kTotalLength] = 0;
this._inflate[kBuffers] = [];
if (fin && this.params[`${endpoint}_no_context_takeover`]) {
this._inflate.reset();
}
}
callback(null, data);
});
}
/**
* Compress data.
*
* @param {(Buffer|String)} data Data to compress
* @param {Boolean} fin Specifies whether or not this is the last fragment
* @param {Function} callback Callback
* @private
*/
_compress(data, fin, callback) {
const endpoint = this._isServer ? 'server' : 'client';
if (!this._deflate) {
const key = `${endpoint}_max_window_bits`;
const windowBits =
typeof this.params[key] !== 'number'
? zlib.Z_DEFAULT_WINDOWBITS
: this.params[key];
this._deflate = zlib.createDeflateRaw({
...this._options.zlibDeflateOptions,
windowBits
});
this._deflate[kTotalLength] = 0;
this._deflate[kBuffers] = [];
this._deflate.on('data', deflateOnData);
}
this._deflate[kCallback] = callback;
this._deflate.write(data);
this._deflate.flush(zlib.Z_SYNC_FLUSH, () => {
if (!this._deflate) {
//
// The deflate stream was closed while data was being processed.
//
return;
}
let data = bufferUtil.concat(
this._deflate[kBuffers],
this._deflate[kTotalLength]
);
if (fin) {
data = new FastBuffer(data.buffer, data.byteOffset, data.length - 4);
}
//
// Ensure that the callback will not be called again in
// `PerMessageDeflate#cleanup()`.
//
this._deflate[kCallback] = null;
this._deflate[kTotalLength] = 0;
this._deflate[kBuffers] = [];
if (fin && this.params[`${endpoint}_no_context_takeover`]) {
this._deflate.reset();
}
callback(null, data);
});
}
}
module.exports = PerMessageDeflate;
/**
* The listener of the `zlib.DeflateRaw` stream `'data'` event.
*
* @param {Buffer} chunk A chunk of data
* @private
*/
function deflateOnData(chunk) {
this[kBuffers].push(chunk);
this[kTotalLength] += chunk.length;
}
/**
* The listener of the `zlib.InflateRaw` stream `'data'` event.
*
* @param {Buffer} chunk A chunk of data
* @private
*/
function inflateOnData(chunk) {
this[kTotalLength] += chunk.length;
if (
this[kPerMessageDeflate]._maxPayload < 1 ||
this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload
) {
this[kBuffers].push(chunk);
return;
}
this[kError] = new RangeError('Max payload size exceeded');
this[kError].code = 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH';
this[kError][kStatusCode] = 1009;
this.removeListener('data', inflateOnData);
//
// The choice to employ `zlib.reset()` over `zlib.close()` is dictated by the
// fact that in Node.js versions prior to 13.10.0, the callback for
// `zlib.flush()` is not called if `zlib.close()` is used. Utilizing
// `zlib.reset()` ensures that either the callback is invoked or an error is
// emitted.
//
this.reset();
}
/**
* The listener of the `zlib.InflateRaw` stream `'error'` event.
*
* @param {Error} err The emitted error
* @private
*/
function inflateOnError(err) {
//
// There is no need to call `Zlib#close()` as the handle is automatically
// closed when an error is emitted.
//
this[kPerMessageDeflate]._inflate = null;
if (this[kError]) {
this[kCallback](this[kError]);
return;
}
err[kStatusCode] = 1007;
this[kCallback](err);
}
@@ -0,0 +1,22 @@
/**
* @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 Volume1 = createLucideIcon("Volume1", [
[
"path",
{
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
key: "uqj9uw"
}
],
["path", { d: "M16 9a5 5 0 0 1 0 6", key: "1q6k2b" }]
]);
export { Volume1 as default };
//# sourceMappingURL=volume-1.js.map
@@ -0,0 +1 @@
module.exports={C:{"52":0.02699,"78":0.0054,"101":0.0054,"115":0.12953,"120":0.80415,"121":1.62989,"122":0.01079,"123":0.03778,"124":0.01619,"125":0.0054,"128":0.0054,"132":0.0054,"133":0.0054,"134":0.0054,"135":0.0054,"136":0.0054,"140":0.02699,"141":0.0054,"143":0.0054,"144":0.0054,"145":0.01079,"146":0.0054,"147":0.0054,"149":0.0054,"150":0.01619,"151":0.03238,"152":0.02159,"153":0.01619,"154":0.10254,"155":0.28064,"156":0.24826,"157":0.01619,_:"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 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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 126 127 129 130 131 137 138 139 142 148 158 159 160 3.5 3.6"},D:{"49":0.01079,"50":0.0054,"56":0.0054,"59":0.0054,"60":0.0054,"62":0.0054,"63":0.0054,"64":0.0054,"65":0.01079,"66":0.0054,"68":0.01079,"69":0.01079,"70":0.0054,"71":0.0054,"72":0.0054,"73":0.0054,"75":0.01079,"77":0.0054,"78":0.0054,"79":0.01079,"83":0.0054,"84":0.0054,"85":0.0054,"86":0.0054,"87":0.01079,"90":0.0054,"95":0.01079,"98":0.01619,"101":0.01079,"102":0.01079,"103":0.43176,"104":0.42097,"105":0.42636,"106":0.43176,"107":0.42097,"108":0.43176,"109":2.18579,"110":0.43176,"111":0.43176,"112":0.42636,"113":0.0054,"114":0.0054,"116":0.87431,"117":0.42097,"118":2.46643,"119":1.63529,"120":2.09943,"121":0.04318,"122":0.09715,"123":0.03778,"124":0.43716,"125":0.01079,"126":0.02699,"127":0.01079,"128":0.02159,"129":0.0054,"130":0.01079,"131":0.89051,"132":0.01079,"133":1.04162,"134":0.22128,"135":0.21588,"136":0.22667,"137":0.23747,"138":0.28064,"139":0.23207,"140":0.25366,"141":0.24287,"142":0.77717,"143":0.02159,"144":0.05937,"145":0.11873,"146":0.3562,"147":0.04857,"148":0.1835,"149":0.81495,"150":0.31842,"151":1.88895,"152":8.06852,"153":7.14563,"154":1.68386,"155":0.01619,_:"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 57 58 61 67 74 76 80 81 88 89 91 92 93 94 96 97 99 100 115 156 157"},F:{"40":0.0054,"46":0.0054,"51":0.0054,"52":0.0054,"53":0.0054,"54":0.0054,"55":0.0054,"56":0.01079,"57":0.0054,"79":0.0054,"85":0.0054,"87":0.0054,"90":0.0054,"95":0.07016,"100":0.0054,"101":0.01079,"105":0.01079,"106":0.01619,"107":0.01079,"115":0.0054,"116":0.0054,"119":0.0054,"120":0.0054,"121":0.0054,"122":0.0054,"131":0.0054,"132":0.0054,"133":0.01079,"134":0.30223,"135":1.27909,_:"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 41 42 43 44 45 47 48 49 50 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 84 86 88 89 91 92 93 94 96 97 98 99 102 103 104 108 109 110 111 112 113 114 117 118 123 124 125 126 127 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.0054,"84":0.0054,"92":0.01619,"100":0.0054,"109":0.02159,"114":0.0054,"119":0.79876,"120":0.82034,"121":0.01079,"122":0.02699,"123":0.0054,"124":0.0054,"125":0.01079,"132":0.0054,"134":0.0054,"135":0.0054,"136":0.0054,"138":0.0054,"139":0.0054,"140":0.0054,"141":0.01079,"143":0.0054,"144":0.0054,"145":0.0054,"146":0.0054,"147":0.01619,"148":0.02159,"149":0.01619,"150":0.03778,"151":0.14572,"152":1.16036,"153":1.17655,"154":0.32922,_:"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 115 116 117 118 126 127 128 129 130 131 133 137 142"},E:{"27":0.01079,_:"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 15.1 15.2-15.3 15.4 15.5 16.0 16.2 16.3 16.4 16.5 18.0 18.2 18.4 26.0 27.1 27.2 TP","11.1":0.0054,"13.1":0.0054,"14.1":0.0054,"15.6":0.01619,"16.1":0.0054,"16.6":0.01079,"17.0":0.0054,"17.1":0.0054,"17.2":0.0054,"17.3":0.0054,"17.4":0.0054,"17.5":0.0054,"17.6":0.01619,"18.1":0.0054,"18.3":0.0054,"18.5-18.7":0.0054,"26.1":0.0054,"26.2":0.0054,"26.3":0.01619,"26.4":0.0054,"26.5":0.02159,"26.6":0.09715},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00049,"5.0-5.1":0.00049,"6.0-6.1":0,"7.0-7.1":0.00097,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00487,"11.0-11.2":0.00049,"11.3-11.4":0.00097,"12.0-12.1":0,"12.2-12.5":0.01267,"13.0-13.1":0,"13.2":0.00244,"13.3":0,"13.4-13.7":0.00049,"14.0-14.4":0.00195,"14.5-14.8":0.00292,"15.0-15.1":0.00292,"15.2-15.3":0.00195,"15.4":0.00244,"15.5":0.00292,"15.6-15.8":0.06337,"16.0":0.00487,"16.1":0.00877,"16.2":0.00487,"16.3":0.01072,"16.4":0.00244,"16.5":0.0039,"16.6-16.7":0.08823,"17.0":0.00341,"17.1":0.00487,"17.2":0.00487,"17.3":0.00731,"17.4":0.01024,"17.5":0.01999,"17.6-17.7":0.05167,"18.0":0.01072,"18.1":0.02145,"18.2":0.02925,"18.3":0.0507,"18.4":0.03168,"18.5-18.7":0.65466,"26.0":0.03168,"26.1":0.03217,"26.2":0.08384,"26.3":0.09067,"26.4":0.06629,"26.5":0.44407,"26.6":2.74,"27.0":0.21009,"27.1":0,"27.2":0.00536},P:{"4":0.01778,"20":0.00889,"21":0.00889,"22":0.00889,"23":0.04446,"24":0.00889,"25":0.00889,"26":0.03557,"27":Line truncated
@@ -0,0 +1,66 @@
/**
* @fileoverview A rule to disallow modifying variables of class declarations
* @author Toru Nagashima
*/
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
docs: {
description: "Disallow reassigning class members",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-class-assign",
},
schema: [],
messages: {
class: "'{{name}}' is a class.",
},
},
create(context) {
const sourceCode = context.sourceCode;
/**
* Finds and reports references that are non initializer and writable.
* @param {Variable} variable A variable to check.
* @returns {void}
*/
function checkVariable(variable) {
astUtils
.getModifyingReferences(variable.references)
.forEach(reference => {
context.report({
node: reference.identifier,
messageId: "class",
data: { name: reference.identifier.name },
});
});
}
/**
* Finds and reports references that are non initializer and writable.
* @param {ASTNode} node A ClassDeclaration/ClassExpression node to check.
* @returns {void}
*/
function checkForClass(node) {
sourceCode.getDeclaredVariables(node).forEach(checkVariable);
}
return {
ClassDeclaration: checkForClass,
ClassExpression: checkForClass,
};
},
};
@@ -0,0 +1,417 @@
flf2a$ 4 4 32 62 8
This font is (c) Michel Eftimakis 1995 -- Version 1.5 -- 22 feb 1995
____________________________________________________________ /`____
| Michel Eftimakis | "Ascii-Artist" '\/ |
| Michel.Eftimakis@ustc.vlsi.com | Boo)- (00) ||
| Tel : (33) 92 96 27 19 | (_`'_) ||
|__ Fax : (33) 92 96 27 01 _________|____ FRANCE ___________ _!!_ ____||
|_____________________________________________________________________|
$$$@
$$$@
$$$@
---@@
@
@
@
--------@@
\/ @
v @
v @
--------@@
$@
$@
$@
-@@
. . @
* ( *@
* . * @
----------@@
/\ @
/ \/\ @
/`/ / \ @
------------@@
___ @
__( ) @
(_______) @
-----------@@
` _ ' @
- (_) -@
' ` @
---------@@
,------.@
| Hi ! |@
`-----(_@
------ @@
,------.@
| Hi ! |@
_)-----'@
------@@
_ @
oo\ @
(__)\ @
--------@@
___ @
/ _()- - - - - >@
| | !! @
-----------------@@
,----------------------------.@
| Ask for other 'efti' fonts |@
_)---------------------------'@
----------------------------@@
___ @
< - - - - -()_ \ @
!! | | @
-----------------@@
,---------------------------.@
| (c) Michel Eftimakis 1995 |@
`--------------------------(_@
--------------------------- @@
* _ * @
* (_) * @
* ( o )* *@
ooO-------Ooo-@@
@
... @
(. .) @
ooO--(_)--Ooo-@@
@
... @
(o o) @
ooO--(_)--Ooo-@@
@
... @
(- o) @
ooO--(_)--Ooo-@@
@
... @
(o -) @
ooO--(_)--Ooo-@@
@
... @
(- -) @
ooO--(_)--Ooo-@@
@
... @
(* *) @
ooO--(_)--Ooo-@@
@
... @
(x x) @
ooO--(_)--Ooo-@@
@
... @
(o O) @
ooO--(_)--Ooo-@@
@
... @
(O o) @
ooO--(_)--Ooo-@@
@
... @
( oo) @
ooO--(_)--Ooo-@@
@
" @
` ___ ' @
-ooO---Ooo-@@
@
" @
` ' @
-ooO---Ooo-@@
,---------------------------.@
| Write your message here ! |@
`--------------------------(_@
--------------------------- @@
n @
____/_\____ @
(z z) @
ooO--(_)--Ooo-@@
,---------------------------.@
| Write your message here ! |@
_)--------------------------'@
---------------------------@@
@
@
@
-._,-@@
@
@
__ @
-' `-@@
@
___ @
(o o) @
ooO--(_)--Ooo-@@
@
,,, @
(o o) @
ooO--(_)--Ooo-@@
@
ooo @
(o o) @
ooO--(_)--Ooo-@@
@
=== @
(o o) @
ooO--(_)--Ooo-@@
@
+++ @
(o o) @
ooO--(_)--Ooo-@@
@
### @
(o o) @
ooO--(_)--Ooo-@@
@
-*~*- @
(o o) @
ooO--(_)--Ooo-@@
@
*** @
(o o) @
ooO--(_)--Ooo-@@
@
||| @
(o o) @
ooO--(_)--Ooo-@@
@
-`^'- @
(o o) @
ooO--(_)--Ooo-@@
@
/777 @
(o o) @
ooO--(_)--Ooo-@@
@
_/7 @
(o o) @
ooO--(_)--Ooo-@@
@
))) @
(o o) @
ooO--(_)--Ooo-@@
@
((( @
(o o) @
ooO--(_)--Ooo-@@
@
xxx @
(o o) @
ooO--(_)--Ooo-@@
@
` ___ ' @
- (O o) - @
ooO--(_)--Ooo-@@
@
@__ @
(o o) @
ooO--(_)--Ooo-@@
_ @
((_ @
(o o) @
ooO--(_)--Ooo-@@
@
>X< @
(o o) @
ooO--(_)--Ooo-@@
@
'*` @
(o o) @
ooO--(_)--Ooo-@@
@
\-^-/ @
(o o) @
ooO--(_)--Ooo-@@
@
^^^ @
(o o) @
ooO--(_)--Ooo-@@
@
)|( @
(o o) @
ooO--(_)--Ooo-@@
@
\|/ @
(o o) @
ooO--(_)--Ooo-@@
@
&&& @
(o o) @
ooO--(_)--Ooo-@@
( @
_)_ @
(o o) @
ooO--(_)--Ooo-@@
__________ @
|Look There`. @
|__________,' @
-----||-------@@
__________ @
|Look Here|@
|__________|@
-----||-----@@
__________ @
,'Look There|@
`.__________|@
-------||-----@@
\|/ ____ \|/ @
@~/ ,. \~@ @
/_( \__/ )_\ @
----\__U_/----@@
'\/` @
(oo) @
(_`'_) @
--_!!_--@@
| @
\\\\ | //// @
( oo) | (oo ) @
ooO--(_)-OoooO-(_)--Ooo-@@
| @
|.===. @
{}o o{} @
ooO--(_)--Ooo-@@
( ( ( @
'. ___ .' @
' (> <) ' @
ooO--(_)--Ooo-@@
@
,,,,, @
/(o o)\ @
ooO--(_)--Ooo-@@
... @
o,*,(o o) @
$8(o o)(_)Ooo$ @
ooO-(_)---Ooo----@@
|"| @
_|_|_ @
(o o) @
ooO--(_)--Ooo-@@
_ @
_|_|_ @
(o o) @
ooO--(_)--Ooo-@@
@
__MMM__ @
(o o) @
ooO--(_)--Ooo-@@
___ @
.|||. @
(o o) @
ooO--(_)--Ooo-@@
. . @
. .:::. @
:(o o): . @
ooO--(_)--Ooo-@@
@
vvv @
(0~0) @
ooO--(_)--Ooo-@@
___ @
/\#/\ @
/(o o)\ @
ooO--(_)--Ooo-@@
_ _ @
o' \,=./ `o @
(o o) @
ooO--(_)--Ooo-@@
___ @
/_\ `* @
(o o) @
ooO--(_)--Ooo-@@
_ _ @
'\\-//` @
(o o) @
ooO--(_)--Ooo-@@
# ___ @
# <_*_> @
$# (o o) @
-8---(_)--Ooo-@@
# #@
#=ooO=========Ooo=#@
# \\ (o o) // #@
--------(_)--------@@
___ @
'/_\ @
(o o) @
ooO--(_)--Ooo-@@
!!! @
` _ _ ' @
- (OXO) - @
ooO--(_)--Ooo-@@
@
` _ , ' @
- (o)o) - @
-ooO'(_)--Ooo-@@
@
()_() @
(o o) @
ooO--`o'--Ooo-@@
o @
` /_\ ' @
- (o o) - @
ooO--(_)--Ooo-@@
___ @
.'_#_`. @
|[o o]| @
ooO--(_)--Ooo-@@
# # # # @
# #..# # @
$# #O #) # @
o#O-#(_#--#oo-@@
_ _ @
(_)-(_) @
(o o) @
ooO--(_)--Ooo-@@
. @
,-_-| @
([o o]) @
ooO--(_)--Ooo-@@
@
((__)) @
(00) @
nn--(o__o)--nn-@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
_ @
((__ @
(oo ) @
ooO--(_)--Ooo-@@
_ @
__)) @
( oo) @
ooO--(_)--Ooo-@@
@
` @__ @
- (.. ) @
ooO--(_)--Ooo-@@
@
__@ ' @
( ..) - @
ooO--(_)--Ooo-@@
@
_#_ @
()-() @
ooO--(_)--Ooo-@@
( o ) @
,|, @
(@ @) @
ooO--(_)--Ooo-@@
@
ccc @
(** ) @
ooO--(_)--Ooo-@@
@@ -0,0 +1,5 @@
import { AllParams, RouteById } from './routeInfo.cjs';
import { AnyRouter } from './router.cjs';
import { Expand } from './utils.cjs';
export type ResolveUseParams<TRouter extends AnyRouter, TFrom, TStrict extends boolean> = TStrict extends false ? AllParams<TRouter['routeTree']> : Expand<RouteById<TRouter['routeTree'], TFrom>['types']['allParams']>;
export type UseParamsResult<TRouter extends AnyRouter, TFrom, TStrict extends boolean, TSelected> = unknown extends TSelected ? ResolveUseParams<TRouter, TFrom, TStrict> : TSelected;
@@ -0,0 +1,60 @@
import { l as locate, n as error, s as logParseError, t as augmentCodeLocation, u as getCodeFrame } from "./shared/logs-ZGEh6uhb.mjs";
import { n as parseSync, t as parse } from "./shared/parse-D4dtlfWy.mjs";
//#region src/parse-ast-index.ts
function wrap(result, filename, sourceText) {
if (result.errors.length > 0) return normalizeParseError(filename, sourceText, result.errors);
return result.program;
}
function normalizeParseError(filename, sourceText, errors) {
let message = `Parse failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
const pos = errors[0]?.labels?.[0]?.start;
for (let i = 0; i < errors.length; i++) {
if (i >= 5) {
message += "\n...";
break;
}
const e = errors[i];
message += e.message + "\n" + e.labels.map((label) => {
const location = locate(sourceText, label.start, { offsetLine: 1 });
if (!location) return;
return getCodeFrame(sourceText, location.line, location.column);
}).filter(Boolean).join("\n");
}
const log = logParseError(message, filename, pos);
if (pos !== void 0 && filename) augmentCodeLocation(log, pos, sourceText, filename);
return error(log);
}
const defaultParserOptions = {
lang: "js",
preserveParens: false
};
/**
* Parse code synchronously and return the AST.
*
* This function is similar to Rollup's `parseAst` function.
* Prefer using {@linkcode parseSync} instead of this function as it has more information in the return value.
*
* @category Utilities
*/
function parseAst(sourceText, options, filename) {
return wrap(parseSync(filename ?? "file.js", sourceText, {
...defaultParserOptions,
...options
}), filename, sourceText);
}
/**
* Parse code asynchronously and return the AST.
*
* This function is similar to Rollup's `parseAstAsync` function.
* Prefer using {@linkcode parseAsync} instead of this function as it has more information in the return value.
*
* @category Utilities
*/
async function parseAstAsync(sourceText, options, filename) {
return wrap(await parse(filename ?? "file.js", sourceText, {
...defaultParserOptions,
...options
}), filename, sourceText);
}
//#endregion
export { parseAst, parseAstAsync };
@@ -0,0 +1,9 @@
// When writing files on Windows, translate the characters to their
// 0xf000 higher-encoded versions.
const raw = ['|', '<', '>', '?', ':'];
const win = raw.map(char => String.fromCodePoint(0xf000 + Number(char.codePointAt(0))));
const toWin = new Map(raw.map((char, i) => [char, win[i]]));
const toRaw = new Map(win.map((char, i) => [char, raw[i]]));
export const encode = (s) => raw.reduce((s, c) => s.split(c).join(toWin.get(c)), s);
export const decode = (s) => win.reduce((s, c) => s.split(c).join(toRaw.get(c)), s);
//# sourceMappingURL=winchars.js.map
@@ -0,0 +1,59 @@
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Visual Studio project reader/writer."""
from gyp import easy_xml
class Writer:
"""Visual Studio XML tool file writer."""
def __init__(self, tool_file_path, name):
"""Initializes the tool file.
Args:
tool_file_path: Path to the tool file.
name: Name of the tool file.
"""
self.tool_file_path = tool_file_path
self.name = name
self.rules_section = ["Rules"]
def AddCustomBuildRule(
self, name, cmd, description, additional_dependencies, outputs, extensions
):
"""Adds a rule to the tool file.
Args:
name: Name of the rule.
description: Description of the rule.
cmd: Command line of the rule.
additional_dependencies: other files which may trigger the rule.
outputs: outputs of the rule.
extensions: extensions handled by the rule.
"""
rule = [
"CustomBuildRule",
{
"Name": name,
"ExecutionDescription": description,
"CommandLine": cmd,
"Outputs": ";".join(outputs),
"FileExtensions": ";".join(extensions),
"AdditionalDependencies": ";".join(additional_dependencies),
},
]
self.rules_section.append(rule)
def WriteIfChanged(self):
"""Writes the tool file."""
content = [
"VisualStudioToolFile",
{"Version": "8.00", "Name": self.name},
self.rules_section,
]
easy_xml.WriteXmlIfChanged(
content, self.tool_file_path, encoding="Windows-1252"
)
@@ -0,0 +1,322 @@
export default `flf2a$ 3 2 11 0 14
threepoint by Randall Ransom 4/94 <ransom@girtab.usc.edu>
Figlet release 2.0 -- August 5, 1993
Date: 9 Apr 1994
Explanation of first line:
flf2 - "magic number" for file identification
a - should always be \`a', for now
$ - the "hardblank" -- prints as a blank, but can't be smushed
3 - height of a character
2 - height of a character, not including descenders
11 - max line length (excluding comment lines) + a fudge factor
0 - default smushmode for this font (like "-m 0" on command line)
14 - number of comment lines
$$@
$$@
$$@@
|@
.@
$@@
''@
$$@
$$@@
++@
++@
$$@@
(|~@
_|)@
$ $@@
'/@
/,@
$$@@
() @
(_X@
$ $@@
'@
$@
$@@
/@
| @
\\@@
\\ @
|@
/ @@
. ,@
-X-@
' \`@@
_|_@
! @
$ $@@
$@
,@
$@@
__@
$$@
$$@@
$@
.@
$@@
/@
/ @
$$@@
/X@
X/@
@@
'| @
.|.@
@@
'~)@
/_@
@@
'~)@
._)@
@@
|_|@
|@
@@
L~@
_)@
@@
/ @
(_)@
@@
~/@
/ @
@@
(~)@
(_)@
@@
(~)@
/ @
@@
.@
.@
$@@
.@
,@
$@@
/@
( @
\\@@
--@
--@
@@
\\ @
)@
/ @@
'~)@
! @
@@
$/~~\\@
| (|/@
$\\__ @@
/\\ @
/~~\\@
@@
|~)@
|_)@
@@
/~\`@
\\_,@
@@
|~\\@
|_/@
@@
(~@
(_@
@@
|~@
|~@
@@
/~_@
\\_/@
@@
|_|@
| |@
@@
~|~@
_|_@
@@
~|~@
L| @
@@
|/@
|\\@
@@
| @
|_@
@@
|\\/|@
| |@
@@
|\\ |@
| \\|@
@@
/~\\@
\\_/@
@@
|~)@
|~ @
@@
/~\\@
\\_X@
@@
|~)@
|~\\@
@@
(~@
_)@
@@
~|~@
| @
@@
| |@
|_|@
@@
\\ /@
\\/ @
@@
\\ /@
\\/\\/ @
@@
\\/@
/\\@
@@
\\ /@
| @
@@
~/@
/_@
@@
|~@
| @
|_@@
\\ @
\\@
@@
~|@
|@
_|@@
'\`@
$$@
$$@@
$$@
__@
$$@@
\`@
$@
$@@
$_$@
(_|@
@@
|_$@
|_)@
@@
$_@
(_@
@@
$_|@
(_|@
@@
$_$@
(/_@
@@
|\`@
~|~@
@@
$_$@
(_|@
_|@@
|_$@
| |@
@@
.@
|@
@@
.@
|@
L|@@
| @
|<@
@@
|@
|@
@@
$_ _$@
| | |@
@@
$_$@
| |@
@@
$_$@
(_)@
@@
$_$@
|_)@
| @@
$_$ @
(_| @
|/@@
$_@
| @
@@
$_@
_\\@
@@
_|_@
| @
@@
@
|_|@
@@
@
\\/@
@@
@
VV@
@@
@
><@
@@
@
\\/@
/ @@
_$@
/_@
@@
|~@
< @
|_@@
|@
|@
|@@
~| @
>@
_| @@
'\`'@
$ $@
$ $@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
`
@@ -0,0 +1,19 @@
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
const intToCharMap =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
/**
* Encode an integer in the range of 0 to 63 to a single base 64 digit.
*/
exports.encode = function (number) {
if (0 <= number && number < intToCharMap.length) {
return intToCharMap[number];
}
throw new TypeError("Must be between 0 and 63: " + number);
};
@@ -0,0 +1 @@
{"version":3,"file":"component.js","sources":["../../../src/icons/component.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Component\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUuNTM2IDExLjI5M2ExIDEgMCAwIDAgMCAxLjQxNGwyLjM3NiAyLjM3N2ExIDEgMCAwIDAgMS40MTQgMGwyLjM3Ny0yLjM3N2ExIDEgMCAwIDAgMC0xLjQxNGwtMi4zNzctMi4zNzdhMSAxIDAgMCAwLTEuNDE0IDB6IiAvPgogIDxwYXRoIGQ9Ik0yLjI5NyAxMS4yOTNhMSAxIDAgMCAwIDAgMS40MTRsMi4zNzcgMi4zNzdhMSAxIDAgMCAwIDEuNDE0IDBsMi4zNzctMi4zNzdhMSAxIDAgMCAwIDAtMS40MTRMNi4wODggOC45MTZhMSAxIDAgMCAwLTEuNDE0IDB6IiAvPgogIDxwYXRoIGQ9Ik04LjkxNiAxNy45MTJhMSAxIDAgMCAwIDAgMS40MTVsMi4zNzcgMi4zNzZhMSAxIDAgMCAwIDEuNDE0IDBsMi4zNzctMi4zNzZhMSAxIDAgMCAwIDAtMS40MTVsLTIuMzc3LTIuMzc2YTEgMSAwIDAgMC0xLjQxNCAweiIgLz4KICA8cGF0aCBkPSJNOC45MTYgNC42NzRhMSAxIDAgMCAwIDAgMS40MTRsMi4zNzcgMi4zNzZhMSAxIDAgMCAwIDEuNDE0IDBsMi4zNzctMi4zNzZhMSAxIDAgMCAwIDAtMS40MTRsLTIuMzc3LTIuMzc3YTEgMSAwIDAgMC0xLjQxNCAweiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/component\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 Component = createLucideIcon('Component', [\n [\n 'path',\n {\n d: 'M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z',\n key: '1uwlt4',\n },\n ],\n [\n 'path',\n {\n d: 'M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z',\n key: '10291m',\n },\n ],\n [\n 'path',\n {\n d: 'M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z',\n key: '1tqoq1',\n },\n ],\n [\n 'path',\n {\n d: 'M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z',\n key: '1x6lto',\n },\n ],\n]);\n\nexport default Component;\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,CAC9C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,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,CAA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CodeFormat, S as ProxifiedNewExpression, T as ProxyBase, _ as ProxifiedImportItem, a as Token, b as ProxifiedMemberExpression, c as Proxified, d as ProxifiedAwaitExpression, f as ProxifiedBinaryExpression, g as ProxifiedIdentifier, h as ProxifiedFunctionExpression, i as ParsedFileNode, k as Options, l as ProxifiedArray, m as ProxifiedFunctionCall, n as GenerateOptions, o as BinaryOperator, p as ProxifiedBlockStatement, r as Loc, s as ImportItemInput, t as ASTNode, u as ProxifiedArrowFunctionExpression, v as ProxifiedImportsMap, w as ProxifiedValue, x as ProxifiedModule, y as ProxifiedLogicalExpression } from "./types-D5FmR3uJ.js";
//#region src/code.d.ts
declare function parseModule<Exports extends object = any>(code: string, options?: Options): ProxifiedModule<Exports>;
declare function parseExpression<T>(code: string, options?: Options): Proxified<T>;
declare function generateCode(node: {
$ast: ASTNode;
} | ASTNode | ProxifiedModule<any>, options?: GenerateOptions): {
code: string;
map?: any;
};
//#endregion
//#region src/error.d.ts
interface MagicastErrorOptions {
ast?: ASTNode;
code?: string;
}
declare class MagicastError extends Error {
rawMessage: string;
options?: MagicastErrorOptions;
constructor(message: string, options?: MagicastErrorOptions);
}
//#endregion
//#region src/builders.d.ts
declare const builders: {
/**
* Create a function call node.
*/
functionCall(callee: string, ...args: any[]): Proxified;
/**
* Create a new expression node.
*/
newExpression(callee: string, ...args: any[]): Proxified;
/**
* Create a binary expression node.
*/
binaryExpression(left: any, operator: "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "&" | "|" | "^" | "in" | "instanceof" | "**", right: any): Proxified;
/**
* Create an await expression node.
*/
awaitExpression(argument: any): Proxified;
/**
* Create a proxified version of a literal value.
*/
literal(value: any): Proxified;
/**
* Parse a raw expression and return a proxified version of it.
*
* ```ts
* const obj = builders.raw("{ foo: 1 }");
* console.log(obj.foo); // 1
* ```
*/
raw(code: string): Proxified;
};
//#endregion
export { ASTNode, BinaryOperator, CodeFormatOptions, GenerateOptions, ImportItemInput, Loc, MagicastError, MagicastErrorOptions, ParsedFileNode, Proxified, ProxifiedArray, ProxifiedArrowFunctionExpression, ProxifiedAwaitExpression, ProxifiedBinaryExpression, ProxifiedBlockStatement, ProxifiedFunctionCall, ProxifiedFunctionExpression, ProxifiedIdentifier, ProxifiedImportItem, ProxifiedImportsMap, ProxifiedLogicalExpression, ProxifiedMemberExpression, ProxifiedModule, ProxifiedNewExpression, ProxifiedObject, ProxifiedValue, ProxyBase, ProxyType, Token, builders, detectCodeFormat, generateCode, parseExpression, parseModule };
@@ -0,0 +1 @@
module.exports={A:{D:{"1":"_YM _EF","2":"_cL","33":"_bG _uG _HK _aM"},L:{"1":"I"},B:{"1":"_YM _CD","2":"_I","33":"_rN _HK _aM"},C:{"2":"_vT _L","33":"_EG _uD"},M:{"33":"YC"},A:{"2":"_E"},F:{"1":"6 _WG _h","2":"_T","33":"_xD 5 _MC _VC"},K:{"2":"_D","33":"H"},E:{"1":"K _iM","2":"_ZC XD","33":"_4R _mF _xE _HT"},G:{"1":"_fK","2":"_r","33":"_JC _UI _mM"},P:{"2":"J","33":"_U"},I:{"1":"I","2":"_W","33":"_y"}},B:6,C:"width: stretch property",D:undefined};
@@ -0,0 +1,3 @@
declare function hasSymbolShams(): boolean;
export = hasSymbolShams;
@@ -0,0 +1 @@
{"version":3,"file":"scoring.mjs","sources":["../../../src/matcher/spatial/scoring.ts"],"sourcesContent":[null],"names":["calcAverageDegree","graph","average","Object","keys","forEach","key","neighbors","filter","entry","length","entries","estimatePossiblePatterns","graphEntry","token","turns","startingPosition","averageDegree","guesses","tokenLength","i","possibleTurns","Math","min","j","utils","nCk","shiftedCount","options","graphs","unShiftedCount","shiftedVariations","round"],"mappings":";;AASA,MAAMA,iBAAiB,GAAIC,KAAwB,IAAI;EACrD,IAAIC,OAAO,GAAG,CAAC;EACfC,MAAM,CAACC,IAAI,CAACH,KAAK,CAAC,CAACI,OAAO,CAAEC,GAAG,IAAI;AACjC,IAA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B,CAACgB,OAAO,CAACC,MAAM,CAAC5B,KAAK,CAAC,EAAE;IAC5Da,KAAK;AACLC,IAAAA;AACD,GAAA,CAAC;AAEF;AACA;AACA,EAAA,IAAIY,YAAY,EAAE;AAChB,IAAA,MAAMG,cAAc,GAAGhB,KAAK,CAACJ,MAAM,GAAGiB,YAAY;AAClD,IAAA,IAAIA,YAAY,KAAK,CAAC,IAAIG,cAAc,KAAK,CAAC,EAAE;AAC9CZ,MAAAA,OAAO,IAAI,CAAC;AACd,IAAA,CAAC,MAAM;MACL,IAAIa,iBAAiB,GAAG,CAAC;AACzB,MAAA,KAAK,IAAIX,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAIE,IAAI,CAACC,GAAG,CAACI,YAAY,EAAEG,cAAc,CAAC,EAAEV,CAAC,IAAI,CAAC,EAAE;QACnEW,iBAAiB,IAAIN,KAAK,CAACC,GAAG,CAC3BC,YAAuB,GAAGG,cAAc,EACzCV,CAAC,CACF;AACH,MAAA;AACAF,MAAAA,OAAO,IAAIa,iBAAiB;AAC9B,IAAA;AACF,EAAA;AACA,EAAA,OAAOT,IAAI,CAACU,KAAK,CAACd,OAAO,CAAC;AAC5B,CAAC;;;;"}
@@ -0,0 +1,108 @@
//#region src/middleware/cors/index.ts
/**
* CORS Middleware for Hono.
*
* @see {@link https://hono.dev/docs/middleware/builtin/cors}
*
* @param {CORSOptions} [options] - The options for the CORS middleware.
* @param {string | string[] | ((origin: string, c: Context) => Promise<string | undefined | null> | string | undefined | null)} [options.origin='*'] - The value of "Access-Control-Allow-Origin" CORS header.
* @param {string[] | ((origin: string, c: Context) => Promise<string[]> | string[])} [options.allowMethods=['GET', 'HEAD', 'PUT', 'POST', 'DELETE', 'PATCH', 'QUERY']] - The value of "Access-Control-Allow-Methods" CORS header.
* @param {string[]} [options.allowHeaders=[]] - The value of "Access-Control-Allow-Headers" CORS header.
* @param {number} [options.maxAge] - The value of "Access-Control-Max-Age" CORS header.
* @param {boolean} [options.credentials] - The value of "Access-Control-Allow-Credentials" CORS header.
* @param {string[]} [options.exposeHeaders=[]] - The value of "Access-Control-Expose-Headers" CORS header.
* @returns {MiddlewareHandler} The middleware handler function.
*
* @example
* ```ts
* const app = new Hono()
*
* app.use('/api/*', cors())
* app.use(
* '/api2/*',
* cors({
* origin: 'http://example.com',
* allowHeaders: ['X-Custom-Header', 'Upgrade-Insecure-Requests'],
* allowMethods: ['POST', 'GET', 'OPTIONS'],
* exposeHeaders: ['Content-Length', 'X-Kuma-Revision'],
* maxAge: 600,
* credentials: true,
* })
* )
*
* app.all('/api/abc', (c) => {
* return c.json({ success: true })
* })
* app.all('/api2/abc', (c) => {
* return c.json({ success: true })
* })
* ```
*/
const cors = (options) => {
const opts = {
origin: "*",
allowMethods: [
"GET",
"HEAD",
"PUT",
"POST",
"DELETE",
"PATCH",
"QUERY"
],
allowHeaders: [],
exposeHeaders: [],
...options
};
const exposeHeadersStr = opts.exposeHeaders?.length ? opts.exposeHeaders.join(",") : void 0;
const allowHeadersStr = opts.allowHeaders?.length ? opts.allowHeaders.join(",") : void 0;
const findAllowOrigin = ((optsOrigin) => {
if (typeof optsOrigin === "string") {
if (optsOrigin === "*") return () => optsOrigin;
else return (origin) => optsOrigin === origin ? origin : null;
} else if (typeof optsOrigin === "function") return optsOrigin;
else return (origin) => optsOrigin.includes(origin) ? origin : null;
})(opts.origin);
const findAllowMethods = ((optsAllowMethods) => {
if (typeof optsAllowMethods === "function") return async (origin, c) => (await optsAllowMethods(origin, c)).join(",");
else if (Array.isArray(optsAllowMethods)) {
const methodsStr = optsAllowMethods.join(",");
return () => methodsStr;
} else return () => "";
})(opts.allowMethods);
return async function cors(c, next) {
function set(key, value) {
c.res.headers.set(key, value);
}
const allowOrigin = await findAllowOrigin(c.req.header("origin") || "", c);
if (allowOrigin) set("Access-Control-Allow-Origin", allowOrigin);
if (opts.credentials) set("Access-Control-Allow-Credentials", "true");
if (exposeHeadersStr) set("Access-Control-Expose-Headers", exposeHeadersStr);
if (c.req.method === "OPTIONS") {
if (opts.origin !== "*") c.res.headers.append("Vary", "Origin");
if (opts.maxAge != null) set("Access-Control-Max-Age", opts.maxAge.toString());
const allowMethods = await findAllowMethods(c.req.header("origin") || "", c);
if (allowMethods) set("Access-Control-Allow-Methods", allowMethods);
let headersStr = allowHeadersStr;
if (!headersStr) {
const requestHeaders = c.req.header("Access-Control-Request-Headers");
if (requestHeaders) headersStr = requestHeaders.split(",").map((h) => h.trim()).join(",");
}
if (headersStr) {
set("Access-Control-Allow-Headers", headersStr);
c.res.headers.append("Vary", "Access-Control-Request-Headers");
}
c.res.headers.delete("Content-Length");
c.res.headers.delete("Content-Type");
return new Response(null, {
headers: c.res.headers,
status: 204,
statusText: "No Content"
});
}
await next();
if (opts.origin !== "*") c.header("Vary", "Origin", { append: true });
};
};
//#endregion
export { cors };
@@ -0,0 +1,21 @@
MIT License
Copyright (c) Arnaud Barré (https://github.com/ArnaudBarre)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,11 @@
'use strict';
var dateMatcher = options => {
return {
warning: options.translations.warnings.dates,
suggestions: [options.translations.suggestions.dates]
};
};
module.exports = dateMatcher;
//# sourceMappingURL=feedback.cjs.map
@@ -0,0 +1,155 @@
/**
* Simple interactive task client demonstrating elicitation and sampling responses.
*
* This client connects to simpleTaskInteractive.ts server and demonstrates:
* - Handling elicitation requests (y/n confirmation)
* - Handling sampling requests (returns a hardcoded haiku)
* - Using task-based tool execution with streaming
*/
import { Client } from '../../client/index.js';
import { StreamableHTTPClientTransport } from '../../client/streamableHttp.js';
import { createInterface } from 'node:readline';
import { CallToolResultSchema, ElicitRequestSchema, CreateMessageRequestSchema, ErrorCode, McpError } from '../../types.js';
// Create readline interface for user input
const readline = createInterface({
input: process.stdin,
output: process.stdout
});
function question(prompt) {
return new Promise(resolve => {
readline.question(prompt, answer => {
resolve(answer.trim());
});
});
}
function getTextContent(result) {
const textContent = result.content.find((c) => c.type === 'text');
return textContent?.text ?? '(no text)';
}
async function elicitationCallback(params) {
console.log(`\n[Elicitation] Server asks: ${params.message}`);
// Simple terminal prompt for y/n
const response = await question('Your response (y/n): ');
const confirmed = ['y', 'yes', 'true', '1'].includes(response.toLowerCase());
console.log(`[Elicitation] Responding with: confirm=${confirmed}`);
return { action: 'accept', content: { confirm: confirmed } };
}
async function samplingCallback(params) {
// Get the prompt from the first message
let prompt = 'unknown';
if (params.messages && params.messages.length > 0) {
const firstMessage = params.messages[0];
const content = firstMessage.content;
if (typeof content === 'object' && !Array.isArray(content) && content.type === 'text' && 'text' in content) {
prompt = content.text;
}
else if (Array.isArray(content)) {
const textPart = content.find(c => c.type === 'text' && 'text' in c);
if (textPart && 'text' in textPart) {
prompt = textPart.text;
}
}
}
console.log(`\n[Sampling] Server requests LLM completion for: ${prompt}`);
// Return a hardcoded haiku (in real use, call your LLM here)
const haiku = `Cherry blossoms fall
Softly on the quiet pond
Spring whispers goodbye`;
console.log('[Sampling] Responding with haiku');
return {
model: 'mock-haiku-model',
role: 'assistant',
content: { type: 'text', text: haiku }
};
}
async function run(url) {
console.log('Simple Task Interactive Client');
console.log('==============================');
console.log(`Connecting to ${url}...`);
// Create client with elicitation and sampling capabilities
const client = new Client({ name: 'simple-task-interactive-client', version: '1.0.0' }, {
capabilities: {
elicitation: { form: {} },
sampling: {}
}
});
// Set up elicitation request handler
client.setRequestHandler(ElicitRequestSchema, async (request) => {
if (request.params.mode && request.params.mode !== 'form') {
throw new McpError(ErrorCode.InvalidParams, `Unsupported elicitation mode: ${request.params.mode}`);
}
return elicitationCallback(request.params);
});
// Set up sampling request handler
client.setRequestHandler(CreateMessageRequestSchema, async (request) => {
return samplingCallback(request.params);
});
// Connect to server
const transport = new StreamableHTTPClientTransport(new URL(url));
await client.connect(transport);
console.log('Connected!\n');
// List tools
const toolsResult = await client.listTools();
console.log(`Available tools: ${toolsResult.tools.map(t => t.name).join(', ')}`);
// Demo 1: Elicitation (confirm_delete)
console.log('\n--- Demo 1: Elicitation ---');
console.log('Calling confirm_delete tool...');
const confirmStream = client.experimental.tasks.callToolStream({ name: 'confirm_delete', arguments: { filename: 'important.txt' } }, CallToolResultSchema, { task: { ttl: 60000 } });
for await (const message of confirmStream) {
switch (message.type) {
case 'taskCreated':
console.log(`Task created: ${message.task.taskId}`);
break;
case 'taskStatus':
console.log(`Task status: ${message.task.status}`);
break;
case 'result':
console.log(`Result: ${getTextContent(message.result)}`);
break;
case 'error':
console.error(`Error: ${message.error}`);
break;
}
}
// Demo 2: Sampling (write_haiku)
console.log('\n--- Demo 2: Sampling ---');
console.log('Calling write_haiku tool...');
const haikuStream = client.experimental.tasks.callToolStream({ name: 'write_haiku', arguments: { topic: 'autumn leaves' } }, CallToolResultSchema, {
task: { ttl: 60000 }
});
for await (const message of haikuStream) {
switch (message.type) {
case 'taskCreated':
console.log(`Task created: ${message.task.taskId}`);
break;
case 'taskStatus':
console.log(`Task status: ${message.task.status}`);
break;
case 'result':
console.log(`Result:\n${getTextContent(message.result)}`);
break;
case 'error':
console.error(`Error: ${message.error}`);
break;
}
}
// Cleanup
console.log('\nDemo complete. Closing connection...');
await transport.close();
readline.close();
}
// Parse command line arguments
const args = process.argv.slice(2);
let url = 'http://localhost:8000/mcp';
for (let i = 0; i < args.length; i++) {
if (args[i] === '--url' && args[i + 1]) {
url = args[i + 1];
i++;
}
}
// Run the client
run(url).catch(error => {
console.error('Error running client:', error);
process.exit(1);
});
//# sourceMappingURL=simpleTaskInteractiveClient.js.map
@@ -0,0 +1 @@
{"version":3,"file":"no.jitter.js","sourceRoot":"","sources":["../../../src/jitter/no/no.jitter.ts"],"names":[],"mappings":";;AAAA,SAAgB,QAAQ,CAAC,KAAa;IAClC,OAAO,KAAK,CAAC;AACjB,CAAC;AAFD,4BAEC"}
@@ -0,0 +1,19 @@
/**
* @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 DraftingCompass = createLucideIcon("DraftingCompass", [
["path", { d: "m12.99 6.74 1.93 3.44", key: "iwagvd" }],
["path", { d: "M19.136 12a10 10 0 0 1-14.271 0", key: "ppmlo4" }],
["path", { d: "m21 21-2.16-3.84", key: "vylbct" }],
["path", { d: "m3 21 8.02-14.26", key: "1ssaw4" }],
["circle", { cx: "12", cy: "5", r: "2", key: "f1ur92" }]
]);
export { DraftingCompass as default };
//# sourceMappingURL=drafting-compass.js.map
@@ -0,0 +1 @@
{"version":3,"file":"brick-wall.js","sources":["../../../src/icons/brick-wall.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BrickWall\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik0xMiA5djYiIC8+CiAgPHBhdGggZD0iTTE2IDE1djYiIC8+CiAgPHBhdGggZD0iTTE2IDN2NiIgLz4KICA8cGF0aCBkPSJNMyAxNWgxOCIgLz4KICA8cGF0aCBkPSJNMyA5aDE4IiAvPgogIDxwYXRoIGQ9Ik04IDE1djYiIC8+CiAgPHBhdGggZD0iTTggM3Y2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/brick-wall\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 BrickWall = createLucideIcon('BrickWall', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M12 9v6', key: '199k2o' }],\n ['path', { d: 'M16 15v6', key: '8rj2es' }],\n ['path', { d: 'M16 3v6', key: '1j6rpj' }],\n ['path', { d: 'M3 15h18', key: '5xshup' }],\n ['path', { d: 'M3 9h18', key: '1pudct' }],\n ['path', { d: 'M8 15v6', key: '1stoo3' }],\n ['path', { d: 'M8 3v6', key: 'vlvjmk' }],\n]);\n\nexport default BrickWall;\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,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA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AAA,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,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,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACzC,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,93 @@
'use strict';
var traverse = module.exports = function (schema, opts, cb) {
// Legacy support for v0.3.1 and earlier.
if (typeof opts == 'function') {
cb = opts;
opts = {};
}
cb = opts.cb || cb;
var pre = (typeof cb == 'function') ? cb : cb.pre || function() {};
var post = cb.post || function() {};
_traverse(opts, pre, post, schema, '', schema);
};
traverse.keywords = {
additionalItems: true,
items: true,
contains: true,
additionalProperties: true,
propertyNames: true,
not: true,
if: true,
then: true,
else: true
};
traverse.arrayKeywords = {
items: true,
allOf: true,
anyOf: true,
oneOf: true
};
traverse.propsKeywords = {
$defs: true,
definitions: true,
properties: true,
patternProperties: true,
dependencies: true
};
traverse.skipKeywords = {
default: true,
enum: true,
const: true,
required: true,
maximum: true,
minimum: true,
exclusiveMaximum: true,
exclusiveMinimum: true,
multipleOf: true,
maxLength: true,
minLength: true,
pattern: true,
format: true,
maxItems: true,
minItems: true,
uniqueItems: true,
maxProperties: true,
minProperties: true
};
function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
if (schema && typeof schema == 'object' && !Array.isArray(schema)) {
pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
for (var key in schema) {
var sch = schema[key];
if (Array.isArray(sch)) {
if (key in traverse.arrayKeywords) {
for (var i=0; i<sch.length; i++)
_traverse(opts, pre, post, sch[i], jsonPtr + '/' + key + '/' + i, rootSchema, jsonPtr, key, schema, i);
}
} else if (key in traverse.propsKeywords) {
if (sch && typeof sch == 'object') {
for (var prop in sch)
_traverse(opts, pre, post, sch[prop], jsonPtr + '/' + key + '/' + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
}
} else if (key in traverse.keywords || (opts.allKeys && !(key in traverse.skipKeywords))) {
_traverse(opts, pre, post, sch, jsonPtr + '/' + key, rootSchema, jsonPtr, key, schema);
}
}
post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
}
}
function escapeJsonPtr(str) {
return str.replace(/~/g, '~0').replace(/\//g, '~1');
}
@@ -0,0 +1 @@
{"version":3,"file":"fileRoute.cjs","names":[],"sources":["../../src/fileRoute.ts"],"sourcesContent":["import { createRoute } from './route'\n\nimport { useMatch } from './useMatch'\nimport { useLoaderDeps } from './useLoaderDeps'\nimport { useLoaderData } from './useLoaderData'\nimport { useSearch } from './useSearch'\nimport { useParams } from './useParams'\nimport { useNavigate } from './useNavigate'\nimport { useRouter } from './useRouter'\nimport { useRouteContext } from './useRouteContext'\nimport type { UseParamsRoute } from './useParams'\nimport type { UseMatchRoute } from './useMatch'\nimport type { UseSearchRoute } from './useSearch'\nimport type {\n AnyContext,\n AnyRoute,\n AnyRouter,\n Constrain,\n ConstrainLiteral,\n FileBaseRouteOptions,\n FileRoutesByPath,\n LazyRouteOptions,\n Register,\n RegisteredRouter,\n ResolveParams,\n Route,\n RouteById,\n RouteConstraints,\n RouteIds,\n RouteLoaderEntry,\n UpdatableRouteOptions,\n UseNavigateResult,\n} from '@tanstack/router-core'\nimport type { UseLoaderDepsRoute } from './useLoaderDeps'\nimport type { UseLoaderDataRoute } from './useLoaderData'\nimport type { UseRouteContextRoute } from './useRouteContext'\n\n/**\n * Creates a file-based Route factory for a given path.\n *\n * Used by TanStack Router's file-based routing to associate a file with a\n * route. The returned function accepts standard route options. In normal usage\n * the `path` string is inserted and maintained by the `tsr` generator.\n *\n * @param path File path literal for the route (usually auto-generated).\n * @returns A function that accepts Route options and returns a Route instance.\n * @link https://tanstack.com/router/latest/docs/framework/react/api/router/createFileRouteFunction\n */\nexport function createFileRoute<\n TFilePath extends keyof FileRoutesByPath,\n TParentRoute extends AnyRoute = FileRoutesByPath[TFilePath]['parentRoute'],\n TId extends RouteConstraints['TId'] = FileRoutesByPath[TFilePath]['id'],\n TPath extends RouteConstraints['TPath'] = FileRoutesByPath[TFilePath]['path'],\n TFullPath extends RouteConstraints['TFullPath'] =\n FileRoutesByPath[TFilePath]['fullPath'],\n>(\n path?: TFilePath,\n): FileRoute<TFilePath, TParentRoute, TId, TPath, TFullPath>['createRoute'] {\n return new FileRoute<TFilePath, TParentRoute, TId, TPath, TFullPath>(path, {\n silent: true,\n }).createRoute\n}\n\n/** \n @deprecated It's no longer recommended to use the `FileRoute` class directly.\n Instead, use `createFileRoute('/path/to/file')(options)` to create a file route.\n*/\nexport class FileRoute<\n TFilePath extends keyof FileRoutesByPath,\n TParentRoute extends AnyRoute = FileRoutesByPath[TFilePath]['parentRoute'],\n TId extends RouteConstraints['TId'] = FileRoutesByPath[TFilePath]['id'],\n TPath extends RouteConstraints['TPath'] = FileRoutesByPath[TFilePath]['path'],\n TFullPath extends RouteConstraints['TFullPath'] =\n FileRoutesByPath[TFilePath]['fullPath'],\n> {\n silent?: boolean\n\n constructor(\n public path?: TFilePath,\n _opts?: { silent: boolean },\n ) {\n this.silent = _opts?.silent\n }\n\n createRoute = <\n TRegister = Register,\n TSearchValidator = undefined,\n TParams = ResolveParams<TPath>,\n TRouteContextFn = AnyContext,\n TBeforeLoadFn = AnyContext,\n TLoaderDeps extends Record<string, any> = {},\n TLoaderFn = undefined,\n TChildren = unknown,\n TSSR = unknown,\n const TMiddlewares = unknown,\n THandlers = undefined,\n >(\n options?: FileBaseRouteOptions<\n TRegister,\n TParentRoute,\n TId,\n TPath,\n TSearchValidator,\n TParams,\n TLoaderDeps,\n TLoaderFn,\n AnyContext,\n TRouteContextFn,\n TBeforeLoadFn,\n AnyContext,\n TSSR,\n TMiddlewares,\n THandlers\n > &\n UpdatableRouteOptions<\n TParentRoute,\n TId,\n TFullPath,\n TParams,\n TSearchValidator,\n TLoaderFn,\n TLoaderDeps,\n AnyContext,\n TRouteContextFn,\n TBeforeLoadFn\n >,\n ): Route<\n TRegister,\n TParentRoute,\n TPath,\n TFullPath,\n TFilePath,\n TId,\n TSearchValidator,\n TParams,\n AnyContext,\n TRouteContextFn,\n TBeforeLoadFn,\n TLoaderDeps,\n TLoaderFn,\n TChildren,\n unknown,\n TSSR,\n TMiddlewares,\n THandlers\n > => {\n if (process.env.NODE_ENV !== 'production') {\n if (!this.silent) {\n console.warn(\n 'Warning: FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead.',\n )\n }\n }\n const route = createRoute(options as any)\n ;(route as any).isRoot = false\n return route as any\n }\n}\n\n/**\n @deprecated It's recommended not to split loaders into separate files.\n Instead, place the loader function in the main route file via `createFileRoute`.\n*/\nexport function Line truncated
@@ -0,0 +1,79 @@
#!/usr/bin/env node
import { performance } from 'node:perf_hooks'
import module from 'node:module'
if (!import.meta.url.includes('node_modules')) {
if (!process.env.DEBUG_DISABLE_SOURCE_MAP) {
// eslint-disable-next-line n/no-unsupported-features/node-builtins -- only used in dev
process.setSourceMapsEnabled(true)
}
process.on('unhandledRejection', (err) => {
throw new Error('UNHANDLED PROMISE REJECTION', { cause: err })
})
}
global.__vite_start_time = performance.now()
// check debug mode first before requiring the CLI.
const debugIndex = process.argv.findIndex((arg) => /^(?:-d|--debug)$/.test(arg))
const filterIndex = process.argv.findIndex((arg) =>
/^(?:-f|--filter)$/.test(arg),
)
const profileIndex = process.argv.indexOf('--profile')
if (debugIndex > 0) {
let value = process.argv[debugIndex + 1]
if (!value || value[0] === '-') {
value = 'vite:*'
} else {
// support debugging multiple flags with comma-separated list
value = value
.split(',')
.map((v) => `vite:${v}`)
.join(',')
}
process.env.DEBUG = `${
process.env.DEBUG ? process.env.DEBUG + ',' : ''
}${value}`
if (filterIndex > 0) {
const filter = process.argv[filterIndex + 1]
if (filter && filter[0] !== '-') {
process.env.VITE_DEBUG_FILTER = filter
}
}
}
function start() {
try {
// eslint-disable-next-line n/no-unsupported-features/node-builtins -- it is supported in Node 22.8.0+ and only called if it exists
module.enableCompileCache?.()
// flush the cache after 10s because the cache is not flushed until process end
// for dev server, the cache is never flushed unless manually flushed because the process.exit is called
// also flushing the cache in SIGINT handler seems to cause the process to hang
setTimeout(() => {
try {
// eslint-disable-next-line n/no-unsupported-features/node-builtins -- it is supported in Node 22.12.0+ and only called if it exists
module.flushCompileCache?.()
} catch {}
}, 10 * 1000).unref()
} catch {}
return import('../dist/node/cli.js')
}
if (profileIndex > 0) {
process.argv.splice(profileIndex, 1)
const next = process.argv[profileIndex]
if (next && next[0] !== '-') {
process.argv.splice(profileIndex, 1)
}
const inspector = await import('node:inspector').then((r) => r.default)
const session = (global.__vite_profile_session = new inspector.Session())
session.connect()
session.post('Profiler.enable', () => {
session.post('Profiler.start', start)
})
} else {
start()
}