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,21 @@
The MIT License (MIT)
Copyright (c) 2017-present, Jon Schlinkert.
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 @@
{"version":3,"file":"table-2.js","sources":["../../../src/icons/table-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Table2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOSAzSDVhMiAyIDAgMCAwLTIgMnY0bTYtNmgxMGEyIDIgMCAwIDEgMiAydjRNOSAzdjE4bTAgMGgxMGEyIDIgMCAwIDAgMi0yVjlNOSAyMUg1YTIgMiAwIDAgMS0yLTJWOW0wIDBoMTgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/table-2\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 Table2 = createLucideIcon('Table2', [\n [\n 'path',\n {\n d: 'M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18',\n key: 'gugj83',\n },\n ],\n]);\n\nexport default Table2;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,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;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;AACF,CAAC,CAAA,CAAA;;"}
@@ -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 FolderClosed = createLucideIcon("FolderClosed", [
[
"path",
{
d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
key: "1kt360"
}
],
["path", { d: "M2 10h20", key: "1ir3d8" }]
]);
export { FolderClosed as default };
//# sourceMappingURL=folder-closed.js.map
@@ -0,0 +1,5 @@
import type { TSESLint } from '@typescript-eslint/utils';
declare const _default: TSESLint.RuleModule<"disallowedPromiseAwait" | "disallowedPromiseAwaitSuggestion" | "nonPromiseAwait" | "requiredPromiseAwait" | "requiredPromiseAwaitSuggestion", [string], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1,18 @@
import { createRequire } from 'module';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
/**
* @fileoverview Universal module importer
*/
//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const require = createRequire(__dirname + "/");
const { ModuleImporter } = require("./module-importer.cjs");
export { ModuleImporter };
@@ -0,0 +1,30 @@
/**
* @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 HeartHandshake = createLucideIcon("HeartHandshake", [
[
"path",
{
d: "M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",
key: "c3ymky"
}
],
[
"path",
{
d: "M12 5 9.04 7.96a2.17 2.17 0 0 0 0 3.08c.82.82 2.13.85 3 .07l2.07-1.9a2.82 2.82 0 0 1 3.79 0l2.96 2.66",
key: "4oyue0"
}
],
["path", { d: "m18 15-2-2", key: "60u0ii" }],
["path", { d: "m15 18-2-2", key: "6p76be" }]
]);
export { HeartHandshake as default };
//# sourceMappingURL=heart-handshake.js.map
@@ -0,0 +1 @@
export declare function describeFilePath(filePath: string, tsconfigRootDir: string): string;
@@ -0,0 +1,73 @@
import { URL } from 'node:url'
import Dispatcher from './dispatcher'
import buildConnector from './connector'
type H2ClientOptions = Omit<Dispatcher.ConnectOptions, 'origin'>
/**
* A basic H2C client, mapped on top a single TCP connection. Pipelining is disabled by default.
*/
export class H2CClient extends Dispatcher {
constructor (url: string | URL, options?: H2CClient.Options)
/** Property to get and set the pipelining factor. */
pipelining: number
/** `true` after `client.close()` has been called. */
closed: boolean
/** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
destroyed: boolean
// Override dispatcher APIs.
override connect (
options: H2ClientOptions
): Promise<Dispatcher.ConnectData>
override connect (
options: H2ClientOptions,
callback: (err: Error | null, data: Dispatcher.ConnectData) => void
): void
}
export declare namespace H2CClient {
export interface Options {
/** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */
maxHeaderSize?: number;
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */
headersTimeout?: number;
/** TODO */
connectTimeout?: number;
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */
bodyTimeout?: number;
/** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */
keepAliveTimeout?: number;
/** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */
keepAliveMaxTimeout?: number;
/** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */
keepAliveTimeoutThreshold?: number;
/** TODO */
socketPath?: string;
/** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */
pipelining?: number;
/** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
strictContentLength?: boolean;
/** TODO */
maxCachedSessions?: number;
/** TODO */
connect?: Omit<Partial<buildConnector.BuildOptions>, 'allowH2'> | buildConnector.connector;
/** TODO */
maxRequestsPerClient?: number;
/** TODO */
localAddress?: string;
/** Max response body size in bytes, -1 is disabled */
maxResponseSize?: number;
/** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
autoSelectFamily?: boolean;
/** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
autoSelectFamilyAttemptTimeout?: number;
/**
* @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame.
* @default 100
*/
maxConcurrentStreams?: number
}
}
export default H2CClient
@@ -0,0 +1,137 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "simvol", verb: "olmalıdır" },
file: { unit: "bayt", verb: "olmalıdır" },
array: { unit: "element", verb: "olmalıdır" },
set: { unit: "element", verb: "olmalıdır" },
map: { unit: "element", verb: "olmalıdır" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const FormatDictionary = {
regex: "input",
email: "email address",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO datetime",
date: "ISO date",
time: "ISO time",
duration: "ISO duration",
ipv4: "IPv4 address",
ipv6: "IPv6 address",
mac: "MAC address",
cidrv4: "IPv4 range",
cidrv6: "IPv6 range",
base64: "base64-encoded string",
base64url: "base64url-encoded string",
json_string: "JSON string",
e164: "E.164 number",
credit_card: "kredit kartı nömrəsi",
currency_code: "valyuta kodu",
iban: "IBAN",
jwt: "JWT",
template_literal: "input",
};
const TypeDictionary = {
nan: "NaN",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `Yanlış dəyər: gözlənilən instanceof ${issue.expected}, daxil olan ${received}`;
}
return `Yanlış dəyər: gözlənilən ${expected}, daxil olan ${received}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `Yanlış dəyər: gözlənilən ${util.stringifyPrimitive(issue.values[0])}`;
return `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Çox böyük: gözlənilən ${issue.origin ?? "dəyər"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "element"}`;
return `Çox böyük: gözlənilən ${issue.origin ?? "dəyər"} ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing)
return `Çox kiçik: gözlənilən ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
return `Çox kiçik: gözlənilən ${issue.origin} ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Yanlış mətn: "${_issue.prefix}" ilə başlamalıdır`;
if (_issue.format === "ends_with")
return `Yanlış mətn: "${_issue.suffix}" ilə bitməlidir`;
if (_issue.format === "includes")
return `Yanlış mətn: "${_issue.includes}" daxil olmalıdır`;
if (_issue.format === "regex")
return `Yanlış mətn: ${_issue.pattern} şablonuna uyğun olmalıdır`;
return `Yanlış ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Yanlış ədəd: ${issue.divisor} ilə bölünə bilən olmalıdır`;
case "unrecognized_keys":
return `Tanınmayan açar${issue.keys.length > 1 ? "lar" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `${issue.origin} daxilində yanlış açar`;
case "invalid_union":
return "Yanlış dəyər";
case "invalid_element":
return `${issue.origin} daxilində yanlış dəyər`;
default:
return `Yanlış dəyər`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}
module.exports = exports.default;
@@ -0,0 +1,3 @@
export declare const elementNames: Map<string, string>;
export declare const attributeNames: Map<string, string>;
//# sourceMappingURL=foreignNames.d.ts.map
@@ -0,0 +1 @@
export { validate, validateAsync, parse, safeParse, parseAsync, safeParseAsync, encode, decode, encodeAsync, decodeAsync, safeEncode, safeDecode, safeEncodeAsync, safeDecodeAsync, } from "../core/index.cjs";
@@ -0,0 +1,8 @@
{
"include": ["source/"],
"exclude": ["node_modules/"],
"extends": "@express-rate-limit/tsconfig",
"compilerOptions": {
"target": "ES2020"
}
}
@@ -0,0 +1,12 @@
"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.es2015_reflect = void 0;
const base_config_1 = require("./base-config");
exports.es2015_reflect = {
libs: [],
variables: [['Reflect', base_config_1.TYPE_VALUE]],
};
@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Delete = createLucideIcon("Delete", [
[
"path",
{
d: "M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z",
key: "1yo7s0"
}
],
["path", { d: "m12 9 6 6", key: "anjzzh" }],
["path", { d: "m18 9-6 6", key: "1fp51s" }]
]);
export { Delete as default };
//# sourceMappingURL=delete.js.map
@@ -0,0 +1,44 @@
/*! *****************************************************************************
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 SymbolConstructor {
/**
* A reference to the prototype.
*/
readonly prototype: Symbol;
/**
* Returns a new unique Symbol value.
* @param description Description of the new Symbol object.
*/
(description?: string | number): symbol;
/**
* Returns a Symbol object from the global symbol registry matching the given key if found.
* Otherwise, returns a new symbol with this key.
* @param key key to search for.
*/
for(key: string): symbol;
/**
* Returns a key from the global symbol registry matching the given Symbol if found.
* Otherwise, returns a undefined.
* @param sym Symbol to find the key for.
*/
keyFor(sym: symbol): string | undefined;
}
declare var Symbol: SymbolConstructor;
@@ -0,0 +1 @@
module.exports={C:{"34":0.00661,"66":0.00661,"72":0.00661,"112":0.00661,"115":0.03305,"120":1.11709,"121":2.25401,"123":0.00661,"124":0.03305,"125":0.01983,"127":0.00661,"130":0.01322,"131":0.00661,"133":0.00661,"134":0.00661,"135":0.00661,"136":0.00661,"137":0.00661,"140":0.01322,"142":0.01322,"143":0.01322,"147":0.00661,"148":0.00661,"150":0.03966,"151":0.00661,"152":0.00661,"153":0.01983,"154":0.10576,"155":0.37016,"156":0.35694,"157":0.01322,_:"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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 67 68 69 70 71 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 113 114 116 117 118 119 122 126 128 129 132 138 139 141 144 145 146 149 158 159 160 3.5 3.6"},D:{"60":0.00661,"62":0.00661,"63":0.00661,"64":0.00661,"66":0.00661,"67":0.00661,"68":0.00661,"69":0.00661,"70":0.02644,"71":0.00661,"72":0.00661,"74":0.00661,"76":0.00661,"79":0.00661,"81":0.00661,"86":0.00661,"87":0.00661,"91":0.00661,"92":0.05949,"101":0.00661,"103":0.28423,"104":0.28423,"105":0.2644,"106":0.29084,"107":0.27762,"108":0.25779,"109":1.52691,"110":0.28423,"111":0.29084,"112":0.29084,"114":0.00661,"116":0.60151,"117":0.29084,"118":1.54674,"119":2.36638,"120":2.52502,"121":0.00661,"122":0.0661,"123":0.01983,"124":0.31728,"126":0.0661,"127":0.01322,"128":0.10576,"129":0.00661,"130":0.01983,"131":0.57507,"132":0.03966,"133":1.05099,"134":0.55524,"135":0.55524,"136":0.54202,"137":0.58168,"138":0.68083,"139":0.53541,"140":0.60812,"141":0.68744,"142":1.97639,"143":0.04627,"144":0.31728,"145":0.09915,"146":0.1983,"147":0.05949,"148":0.54202,"149":0.49575,"150":0.37677,"151":7.62794,"152":8.44758,"153":6.78847,"154":1.53352,"155":0.01983,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 61 65 73 75 77 78 80 83 84 85 88 89 90 93 94 95 96 97 98 99 100 102 113 115 125 156 157"},F:{"46":0.00661,"53":0.00661,"54":0.00661,"55":0.00661,"56":0.00661,"67":0.00661,"73":0.00661,"80":0.00661,"91":0.01322,"95":0.01322,"99":0.00661,"101":0.00661,"105":0.01983,"106":0.02644,"107":0.01983,"115":0.00661,"116":0.00661,"118":0.00661,"120":0.00661,"121":0.00661,"131":0.00661,"133":0.03305,"134":0.18508,"135":1.2559,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 57 58 60 62 63 64 65 66 68 69 70 71 72 74 75 76 77 78 79 81 82 83 84 85 86 87 88 89 90 92 93 94 96 97 98 100 102 103 104 108 109 110 111 112 113 114 117 119 122 123 124 125 126 127 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"17":0.00661,"18":0.01322,"90":0.02644,"92":0.02644,"100":0.00661,"109":0.10576,"114":0.00661,"115":0.00661,"118":0.00661,"119":1.16997,"120":1.07082,"122":0.05288,"123":0.01322,"124":0.01322,"125":0.00661,"129":0.00661,"130":0.00661,"131":0.00661,"132":0.01322,"133":0.00661,"134":0.00661,"135":0.00661,"136":0.00661,"137":0.00661,"138":0.01322,"139":0.01322,"140":0.01983,"141":0.00661,"142":0.00661,"143":0.01322,"144":0.03305,"145":0.02644,"146":0.01983,"147":0.03966,"148":0.03966,"149":0.03305,"150":0.05288,"151":0.19169,"152":2.28045,"153":2.33994,"154":0.66761,_:"12 13 14 15 16 79 80 81 83 84 85 86 87 88 89 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 111 112 113 116 117 121 126 127 128"},E:{"4":0.00661,"5":0.00661,"14":0.00661,"27":0.05949,_:"6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 15.4 15.5 16.0 16.2 16.3 16.4 17.0 27.1 27.2 TP","13.1":0.01322,"14.1":0.03305,"15.6":0.02644,"16.1":0.00661,"16.5":0.00661,"16.6":0.05288,"17.1":0.05949,"17.2":0.09915,"17.3":0.00661,"17.4":0.01322,"17.5":0.01983,"17.6":0.07932,"18.0":0.00661,"18.1":0.00661,"18.2":0.00661,"18.3":0.08593,"18.4":0.00661,"18.5-18.7":0.01983,"26.0":0.01322,"26.1":0.00661,"26.2":0.05288,"26.3":0.05288,"26.4":0.03966,"26.5":0.20491,"26.6":0.48914},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00109,"5.0-5.1":0.00109,"6.0-6.1":0,"7.0-7.1":0.00217,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.01086,"11.0-11.2":0.00109,"11.3-11.4":0.00217,"12.0-12.1":0,"12.2-12.5":0.02824,"13.0-13.1":0,"13.2":0.00543,"13.3":0,"13.4-13.7":0.00109,"14.0-14.4":0.00434,"14.5-14.8":0.00652,"15.0-15.1":0.00652,"15.2-15.3":0.00434,"15.4":0.00543,"15.5":0.00652,"15.6-15.8":0.1412,"16.0":0.01086,"16.1":0.01955,"16.2":0.01086,"16.3":0.0239,"16.4":0.00543,"16.5":0.00869,"16.6-16.7":0.19659,"17.0":0.0076,"17.1":0.01086,"17.2":0.01086,"17.3":0.01629,"17.4":0.02281,"17.5":0.04453,"17.6-17.7":0.11513,"18.0":0.0239,"18.1":0.04779,"18.2":0.06517,"18.3":0.11296,"18.4":0.0706,"18.5-18.7":1.45871,"26.0":0.0706,"26.1":0.07169,"26.2":0.18682,"26.3":0.20203,"26.4":0.14772,"26.5":0.98949,"26.6":6.10528,"27.0":0.46813,"27.1":0,"27.2":0.01195},P:{"21":0.00926,"23":0.01852,"25":0.00926,"26":0.01852,"27":0.00926,"28":0Line truncated
@@ -0,0 +1,25 @@
/**
* @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 MapPinOff = createLucideIcon("MapPinOff", [
["path", { d: "M12.75 7.09a3 3 0 0 1 2.16 2.16", key: "1d4wjd" }],
[
"path",
{
d: "M17.072 17.072c-1.634 2.17-3.527 3.912-4.471 4.727a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 1.432-4.568",
key: "12yil7"
}
],
["path", { d: "m2 2 20 20", key: "1ooewy" }],
["path", { d: "M8.475 2.818A8 8 0 0 1 20 10c0 1.183-.31 2.377-.81 3.533", key: "lhrkcz" }],
["path", { d: "M9.13 9.13a3 3 0 0 0 3.74 3.74", key: "13wojd" }]
]);
export { MapPinOff as default };
//# sourceMappingURL=map-pin-off.js.map
@@ -0,0 +1,7 @@
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react.react-server.production.js');
} else {
module.exports = require('./cjs/react.react-server.development.js');
}
@@ -0,0 +1,4 @@
// This file is for backward compatibility with v0.5.1.
require('./register')
console.warn("'json5/require' is deprecated. Please use 'json5/register' instead.")
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/index.ts", "../src/collection-legacy.tsx", "../src/collection.tsx", "../src/ordered-dictionary.ts"],
"sourcesContent": ["'use client';\nexport { createCollection } from './collection-legacy';\nexport type { CollectionProps } from './collection-legacy';\n\nexport { createCollection as unstable_createCollection } from './collection';\nexport type { CollectionProps as unstable_CollectionProps } from './collection-legacy';\n", "import React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createSlot, type Slot } from '@radix-ui/react-slot';\n\ntype SlotProps = React.ComponentPropsWithoutRef<typeof Slot>;\ntype CollectionElement = HTMLElement;\ninterface CollectionProps extends SlotProps {\n scope: any;\n}\n\n// We have resorted to returning slots directly rather than exposing primitives that can then\n// be slotted like `<CollectionItem as={Slot}>\u2026</CollectionItem>`.\n// This is because we encountered issues with generic types that cannot be statically analysed\n// due to creating them dynamically via createCollection.\n\nfunction createCollection<ItemElement extends HTMLElement, ItemData = {}>(name: string) {\n /* -----------------------------------------------------------------------------------------------\n * CollectionProvider\n * ---------------------------------------------------------------------------------------------*/\n\n const PROVIDER_NAME = name + 'CollectionProvider';\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n\n type ContextValue = {\n collectionRef: React.RefObject<CollectionElement | null>;\n itemMap: Map<\n React.RefObject<ItemElement | null>,\n { ref: React.RefObject<ItemElement | null> } & ItemData\n >;\n };\n\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext<ContextValue>(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: new Map() }\n );\n\n const CollectionProvider: React.FC<{ children?: React.ReactNode; scope: any }> = (props) => {\n const { scope, children } = props;\n const ref = React.useRef<CollectionElement>(null);\n const itemMap = React.useRef<ContextValue['itemMap']>(new Map()).current;\n return (\n <CollectionProviderImpl scope={scope} itemMap={itemMap} collectionRef={ref}>\n {children}\n </CollectionProviderImpl>\n );\n };\n\n CollectionProvider.displayName = PROVIDER_NAME;\n\n /* -----------------------------------------------------------------------------------------------\n * CollectionSlot\n * ---------------------------------------------------------------------------------------------*/\n\n const COLLECTION_SLOT_NAME = name + 'CollectionSlot';\n\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef<CollectionElement, CollectionProps>(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return <CollectionSlotImpl ref={composedRefs}>{children}</CollectionSlotImpl>;\n }\n );\n\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n\n /* -----------------------------------------------------------------------------------------------\n * CollectionItem\n * ---------------------------------------------------------------------------------------------*/\n\n const ITEM_SLOT_NAME = name + 'CollectionItemSlot';\n const ITEM_DATA_ATTR = 'data-radix-collection-item';\n\n type CollectionItemSlotProps = ItemData & {\n children: React.ReactNode;\n scope: any;\n };\n\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef<ItemElement, CollectionItemSlotProps>(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef<ItemElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...(itemData as unknown as ItemData) });\n return () => void context.itemMap.delete(ref);\n });\n\n return (\n <CollectionItemSlotImpl {...{ [ITEM_DATA_ATTR]: '' }} ref={composedRefs}>\n {children}\n </CollectionItemSlotImpl>\n );\n }\n );\n\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n\n /* -----------------------------------------------------------------------------------------------\n * useCollection\n * ---------------------------------------------------------------------------------------------*/\n\n function useCollection(scope: any) {\n const context = useCollectionContext(name + 'CollectionConsumer', scope);\n\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectLine truncated
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,mCAAAA;AAAA;AAAA;;;ACAA,mBAAkB;AAClB,2BAAmC;AACnC,gCAAgC;AAChC,wBAAsC;AAuChC;AA1BN,SAAS,iBAAiE,MAAc;AAKtF,QAAM,gBAAgB,OAAO;AAC7B,QAAM,CAAC,yBAAyB,qBAAqB,QAAI,yCAAmB,aAAa;AAUzF,QAAM,CAAC,wBAAwB,oBAAoB,IAAI;AAAA,IACrD;AAAA,IACA,EAAE,eAAe,EAAE,SAAS,KAAK,GAAG,SAAS,oBAAI,IAAI,EAAE;AAAA,EACzD;AAEA,QAAM,qBAA2E,CAAC,UAAU;AAC1F,UAAM,EAAE,OAAO,SAAS,IAAI;AAC5B,UAAM,MAAM,aAAAC,QAAM,OAA0B,IAAI;AAChD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,EACT;AAAA,EAEA,GAAG,OAAe;AAChB,UAAM,MAAM,GAAG,KAAK,OAAO,KAAK;AAChC,QAAI,QAAQ,QAAW;AACrB,aAAO,KAAK,IAAI,GAAG;AAAA,IACrB;AAAA,EACF;AAAA,EAEA,QAAQ,OAAmC;AACzC,UAAM,MAAM,GAAG,KAAK,OAAO,KAAK;AAChC,QAAI,QAAQ,QAAW;AACrB,aAAO,CAAC,KAAK,KAAK,IAAI,GAAG,CAAE;AAAA,IAC7B;AAAA,EACF;AAAA,EAEA,QAAQ,KAAQ;AACd,WAAO,KAAK,MAAM,QAAQ,GAAG;AAAA,EAC/B;AAAA,EAEA,MAAM,OAAe;AACnB,WAAO,GAAG,KAAK,OAAO,KAAK;ALine truncated
"names": ["createCollection", "React", "import_react", "import_react_context", "import_react_compose_refs", "import_react_slot", "import_jsx_runtime", "createCollection", "React", "itemData"]
}
@@ -0,0 +1 @@
{"version":3,"file":"if.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/if.ts"],"names":[],"mappings":";;AAQA,mDAAuD;AACvD,6CAAqE;AAIrE,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,CAAC,EAAC,MAAM,EAAC,EAAE,EAAE,CAAC,IAAA,aAAG,EAAA,eAAe,MAAM,CAAC,QAAQ,UAAU;IAClE,MAAM,EAAE,CAAC,EAAC,MAAM,EAAC,EAAE,EAAE,CAAC,IAAA,WAAC,EAAA,oBAAoB,MAAM,CAAC,QAAQ,GAAG;CAC9D,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;IACjC,WAAW,EAAE,IAAI;IACjB,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,YAAY,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QACnC,IAAI,YAAY,CAAC,IAAI,KAAK,SAAS,IAAI,YAAY,CAAC,IAAI,KAAK,SAA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O,EAAE,IAAI;gBACb,aAAa,EAAE,IAAI;gBACnB,YAAY,EAAE,KAAK;gBACnB,SAAS,EAAE,KAAK;aACjB,EACD,QAAQ,CACT,CAAA;YACD,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC,CAAA;QAC5B,CAAC;QAED,SAAS,cAAc,CAAC,OAAe,EAAE,QAAe;YACtD,OAAO,GAAG,EAAE;gBACV,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,CAAC,EAAC,OAAO,EAAC,EAAE,QAAQ,CAAC,CAAA;gBACjD,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;gBAC3B,GAAG,CAAC,mBAAmB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;gBACtC,IAAI,QAAQ;oBAAE,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAA,WAAC,EAAA,GAAG,OAAO,EAAE,CAAC,CAAA;;oBAC5C,GAAG,CAAC,SAAS,CAAC,EAAC,QAAQ,EAAE,OAAO,EAAC,CAAC,CAAA;YACzC,CAAC,CAAA;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAED,SAAS,SAAS,CAAC,EAAgB,EAAE,OAAe;IAClD,MAAM,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACjC,OAAO,MAAM,KAAK,SAAS,IAAI,CAAC,IAAA,wBAAiB,EAAC,EAAE,EAAE,MAAM,CAAC,CAAA;AAC/D,CAAC;AAED,kBAAe,GAAG,CAAA"}
@@ -0,0 +1,53 @@
import { AsyncLocalStorage } from "node:async_hooks";
//#region src/middleware/context-storage/index.ts
/**
* @module
* Context Storage Middleware for Hono.
*/
const asyncLocalStorage = new AsyncLocalStorage();
/**
* Context Storage Middleware for Hono.
*
* @see {@link https://hono.dev/docs/middleware/builtin/context-storage}
*
* @returns {MiddlewareHandler} The middleware handler function.
*
* @example
* ```ts
* type Env = {
* Variables: {
* message: string
* }
* }
*
* const app = new Hono<Env>()
*
* app.use(contextStorage())
*
* app.use(async (c, next) => {
* c.set('message', 'Hono is hot!!')
* await next()
* })
*
* app.get('/', async (c) => c.text(getMessage()))
*
* const getMessage = () => {
* return getContext<Env>().var.message
* }
* ```
*/
const contextStorage = () => {
return async function contextStorage(c, next) {
await asyncLocalStorage.run(c, next);
};
};
const tryGetContext = () => {
return asyncLocalStorage.getStore();
};
const getContext = () => {
const context = tryGetContext();
if (!context) throw new Error("Context is not available");
return context;
};
//#endregion
export { contextStorage, getContext, tryGetContext };
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_A","2":"_Z"},B:{"1":"_I","516":"_K"},C:{"132":"_nC _nD _vD","164":"_zJ","516":"_IJ _LD _MB b","1028":"_H c _oN"},D:{"420":"_eL","516":"_zL"},E:{"1":"_QB","132":"F QD","164":"_RJ PD","420":"_ZC"},F:{"1":"_PQ","2":"_QD","420":"_JG tB","516":"_pO"},G:{"1":"_BB","132":"_gC","164":"_JC","420":"_r"},H:{"1":"1D"},I:{"420":"_G","516":"I"},J:{"420":"_B"},K:{"1":"_EL","2":"_A","516":"H"},L:{"516":"I"},M:{"1028":"YC"},N:{"1":"_A"},O:{"516":"bC"},P:{"420":"J","516":"_U"},Q:{"516":"JE"},R:{"516":"KE"},S:{"164":"_C"}},B:4,C:"CSS3 Multiple column layout",D:true};
@@ -0,0 +1,24 @@
/**
* @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 ZapOff = createLucideIcon("ZapOff", [
["path", { d: "M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317", key: "193nxd" }],
["path", { d: "M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773", key: "27a7lr" }],
[
"path",
{
d: "M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",
key: "1e0qe9"
}
],
["path", { d: "m2 2 20 20", key: "1ooewy" }]
]);
export { ZapOff as default };
//# sourceMappingURL=zap-off.js.map
@@ -0,0 +1,81 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SUPPORTED_TYPESCRIPT_VERSIONS = void 0;
exports.warnAboutTSVersion = warnAboutTSVersion;
const semver_1 = __importDefault(require("semver"));
const ts = __importStar(require("typescript"));
const version_1 = require("../version");
/**
* This needs to be kept in sync with package.json in the typescript-eslint monorepo
*/
exports.SUPPORTED_TYPESCRIPT_VERSIONS = '>=4.8.4 <6.1.0';
/*
* The semver package will ignore prerelease ranges, and we don't want to explicitly document every one
* List them all separately here, so we can automatically create the full string
*/
const SUPPORTED_PRERELEASE_RANGES = [];
const ACTIVE_TYPESCRIPT_VERSION = ts.version;
const isRunningSupportedTypeScriptVersion = semver_1.default.satisfies(ACTIVE_TYPESCRIPT_VERSION, [exports.SUPPORTED_TYPESCRIPT_VERSIONS, ...SUPPORTED_PRERELEASE_RANGES].join(' || '));
let warnedAboutTSVersion = false;
function warnAboutTSVersion(parseSettings, passedLoggerFn) {
if (isRunningSupportedTypeScriptVersion || warnedAboutTSVersion) {
return;
}
if (passedLoggerFn ||
// See https://github.com/typescript-eslint/typescript-eslint/issues/7896
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
(typeof process === 'undefined' ? false : process.stdout?.isTTY)) {
const border = '=============';
const versionWarning = [
border,
'\n',
'WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.',
'\n',
`* @typescript-eslint/typescript-estree version: ${version_1.version}`,
`* Supported TypeScript versions: ${exports.SUPPORTED_TYPESCRIPT_VERSIONS}`,
`* Your TypeScript version: ${ACTIVE_TYPESCRIPT_VERSION}`,
'\n',
'Please only submit bug reports when using the officially supported version.',
'\n',
border,
].join('\n');
parseSettings.log(versionWarning);
}
warnedAboutTSVersion = true;
}
@@ -0,0 +1,29 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
test("type guard", () => {
const stringToNumber = z.string().transform((arg) => arg.length);
const s1 = z.object({
stringToNumber,
});
type t1 = z.input<typeof s1>;
const data = { stringToNumber: "asdf" };
const parsed = s1.safeParse(data);
if (parsed.success) {
util.assertEqual<typeof data, t1>(true);
}
});
test("test this binding", () => {
const callback = (predicate: (val: string) => boolean) => {
return predicate("hello");
};
expect(callback((value) => z.string().safeParse(value).success)).toBe(true); // true
expect(callback((value) => z.string().safeParse(value).success)).toBe(true); // true
});
@@ -0,0 +1,138 @@
const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i
const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i
const fractionRegex = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/
const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/
const lengthUnitRegex =
/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/
const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/
// Shadow always begins with x and y offset separated by underscore optionally prepended by inset
const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/
const imageRegex =
/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/
export const isFraction = (value: string) => fractionRegex.test(value)
export const isNumber = (value: string) => !!value && !Number.isNaN(Number(value))
export const isInteger = (value: string) => !!value && Number.isInteger(Number(value))
export const isPercent = (value: string) => value.endsWith('%') && isNumber(value.slice(0, -1))
export const isTshirtSize = (value: string) => tshirtUnitRegex.test(value)
export const isAny = () => true
const isLengthOnly = (value: string) =>
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
const isNever = () => false
const isShadow = (value: string) => shadowRegex.test(value)
const isImage = (value: string) => imageRegex.test(value)
export const isAnyNonArbitrary = (value: string) =>
!isArbitraryValue(value) && !isArbitraryVariable(value)
export const isArbitrarySize = (value: string) => getIsArbitraryValue(value, isLabelSize, isNever)
export const isArbitraryValue = (value: string) => arbitraryValueRegex.test(value)
export const isArbitraryLength = (value: string) =>
getIsArbitraryValue(value, isLabelLength, isLengthOnly)
export const isArbitraryNumber = (value: string) =>
getIsArbitraryValue(value, isLabelNumber, isNumber)
export const isArbitraryWeight = (value: string) => getIsArbitraryValue(value, isLabelWeight, isAny)
export const isArbitraryFamilyName = (value: string) =>
getIsArbitraryValue(value, isLabelFamilyName, isNever)
export const isArbitraryPosition = (value: string) =>
getIsArbitraryValue(value, isLabelPosition, isNever)
export const isArbitraryImage = (value: string) => getIsArbitraryValue(value, isLabelImage, isImage)
export const isArbitraryShadow = (value: string) =>
getIsArbitraryValue(value, isLabelShadow, isShadow)
export const isArbitraryVariable = (value: string) => arbitraryVariableRegex.test(value)
export const isArbitraryVariableLength = (value: string) =>
getIsArbitraryVariable(value, isLabelLength)
export const isArbitraryVariableFamilyName = (value: string) =>
getIsArbitraryVariable(value, isLabelFamilyName)
export const isArbitraryVariablePosition = (value: string) =>
getIsArbitraryVariable(value, isLabelPosition)
export const isArbitraryVariableSize = (value: string) => getIsArbitraryVariable(value, isLabelSize)
export const isArbitraryVariableImage = (value: string) =>
getIsArbitraryVariable(value, isLabelImage)
export const isArbitraryVariableShadow = (value: string) =>
getIsArbitraryVariable(value, isLabelShadow, true)
export const isArbitraryVariableWeight = (value: string) =>
getIsArbitraryVariable(value, isLabelWeight, true)
// Helpers
const getIsArbitraryValue = (
value: string,
testLabel: (label: string) => boolean,
testValue: (value: string) => boolean,
) => {
const result = arbitraryValueRegex.exec(value)
if (result) {
if (result[1]) {
return testLabel(result[1])
}
return testValue(result[2]!)
}
return false
}
const getIsArbitraryVariable = (
value: string,
testLabel: (label: string) => boolean,
shouldMatchNoLabel = false,
) => {
const result = arbitraryVariableRegex.exec(value)
if (result) {
if (result[1]) {
return testLabel(result[1])
}
return shouldMatchNoLabel
}
return false
}
// Labels
const isLabelPosition = (label: string) => label === 'position' || label === 'percentage'
const isLabelImage = (label: string) => label === 'image' || label === 'url'
const isLabelSize = (label: string) => label === 'length' || label === 'size' || label === 'bg-size'
const isLabelLength = (label: string) => label === 'length'
const isLabelNumber = (label: string) => label === 'number'
const isLabelFamilyName = (label: string) => label === 'family-name'
const isLabelWeight = (label: string) => label === 'number' || label === 'weight'
const isLabelShadow = (label: string) => label === 'shadow'
@@ -0,0 +1,65 @@
// based on @types/postcss-load-config@2.0.1
// Type definitions for postcss-load-config 2.1
import Processor from 'postcss/lib/processor'
import { Plugin, ProcessOptions, Transformer } from 'postcss'
import { Options as ConfigOptions } from 'lilconfig'
declare function postcssrc(
ctx?: postcssrc.ConfigContext,
path?: string,
options?: ConfigOptions
): Promise<postcssrc.Result>
declare namespace postcssrc {
// In the ConfigContext, these three options can be instances of the
// appropriate class, or strings. If they are strings, postcss-load-config will
// require() them and pass the instances along.
export interface ProcessOptionsPreload {
parser?: string | ProcessOptions['parser']
stringifier?: string | ProcessOptions['stringifier']
syntax?: string | ProcessOptions['syntax']
}
// The remaining ProcessOptions, sans the three above.
export type RemainingProcessOptions = Pick<
ProcessOptions,
Exclude<keyof ProcessOptions, keyof ProcessOptionsPreload>
>
// Additional context options that postcss-load-config understands.
export interface Context {
cwd?: string
env?: string
}
// The full shape of the ConfigContext.
export type ConfigContext = Context &
ProcessOptionsPreload &
RemainingProcessOptions
// Result of postcssrc is a Promise containing the filename plus the options
// and plugins that are ready to pass on to postcss.
export type ResultPlugin = Plugin | Transformer | Processor
export interface Result {
file: string
options: ProcessOptions
plugins: ResultPlugin[]
}
export type ConfigPlugin = Transformer | Plugin | Processor
export interface Config {
parser?: string | ProcessOptions['parser'] | false
stringifier?: string | ProcessOptions['stringifier'] | false
syntax?: string | ProcessOptions['syntax'] | false
map?: string | false
from?: string
to?: string
plugins?: Array<ConfigPlugin | false> | Record<string, object | false>
}
export type ConfigFn = (ctx: ConfigContext) => Config | Promise<Config>
}
export = postcssrc
@@ -0,0 +1 @@
{"version":3,"names":["_index","require","_index2","cleanJSXElementLiteralChild","child","args","lines","value","split","lastNonEmptyLine","i","length","exec","str","line","isFirstLine","isLastLine","isLastNonEmptyLine","trimmedLine","replace","push","inherits","stringLiteral"],"sources":["../../../src/utils/react/cleanJSXElementLiteralChild.ts"],"sourcesContent":["import { stringLiteral } from \"../../builders/generated/index.ts\";\nimport type * as t from \"../../index.ts\";\nimport { inherits } from \"../../index.ts\";\n\nexport default function cleanJSXElementLiteralChild(\n child: t.JSXText,\n args: t.Node[],\n) {\n const lines = child.value.split(/\\r\\n|\\n|\\r/);\n\n let lastNonEmptyLine = 0;\n\n for (let i = 0; i < lines.length; i++) {\n if (/[^ \\t]/.exec(lines[i])) {\n lastNonEmptyLine = i;\n }\n }\n\n let str = \"\";\n\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i];\n\n const isFirstLine = i === 0;\n const isLastLine = i === lines.length - 1;\n const isLastNonEmptyLine = i === lastNonEmptyLine;\n\n // replace rendered whitespace tabs with spaces\n let trimmedLine = line.replace(/\\t/g, \" \");\n\n // trim whitespace touching a newline\n if (!isFirstLine) {\n trimmedLine = trimmedLine.replace(/^ +/, \"\");\n }\n\n // trim whitespace touching an endline\n if (!isLastLine) {\n trimmedLine = trimmedLine.replace(/ +$/, \"\");\n }\n\n if (trimmedLine) {\n if (!isLastNonEmptyLine) {\n trimmedLine += \" \";\n }\n\n str += trimmedLine;\n }\n }\n\n if (str) args.push(inherits(stringLiteral(str), child));\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAEe,SAASE,2BAA2BA,CACjDC,KAAgB,EAChBC,IAAc,EACd;EACA,MAAMC,KAAK,GAAGF,KAAK,CAACG,KAAK,CAACC,KAAK,CAAC,YAAY,CAAC;EAE7C,IAAIC,gBAAgB,GAAG,CAAC;EAExB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGJ,KAAK,CAACK,MAAM,EAAED,CAAC,EAAE,EAAE;IACrC,IAAI,QAAQ,CAACE,IAAI,CAACN,KAAK,CAACI,CAAC,CAAC,CAAC,EAAE;MAC3BD,gBAAgB,GAAGC,CAAC;IACtB;EACF;EAEA,IAAIG,GAAG,GAAG,EAAE;EAEZ,KAAK,IAAIH,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGJ,KAAK,CAACK,MAAM,EAAED,CAAC,EAAE,EAAE;IACrC,MAAMI,IAAI,GAAGR,KAAK,CAACI,CAAC,CAAC;IAErB,MAAMK,WAAW,GAAGL,CAAC,KAAK,CAAC;IAC3B,MAAMM,UAAU,GAAGN,CAAC,KAAKJ,KAAK,CAACK,MAAM,GAAG,CAAC;IACzC,MAAMM,kBAAkB,GAAGP,CAAC,KAAKD,gBAAgB;IAGjD,IAAIS,WAAW,GAAGJ,IAAI,CAACK,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;IAG1C,IAAI,CAACJ,WAAW,EAAE;MAChBG,WAAW,GAAGA,WAAW,CAACC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;IAC9C;IAGA,IAAI,CAACH,UAAU,EAAE;MACfE,WAAW,GAAGA,WAAW,CAACC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;IAC9C;IAEA,IAAID,WAAW,EAAE;MACf,IAAI,CAACD,kBAAkB,EAAE;QACvBC,WAAW,IAAI,GAAG;MACpB;MAEAL,GAAG,IAAIK,WAAW;IACpB;EACF;EAEA,IAAIL,GAAG,EAAER,IAAI,CAACe,IAAI,CAAC,IAAAC,gBAAQ,EAAC,IAAAC,oBAAa,EAACT,GAAG,CAAC,EAAET,KAAK,CAAC,CAAC;AACzD","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"names":["_index","require","isSpecifierDefault","specifier","isImportDefaultSpecifier","isIdentifier","imported","exported","name"],"sources":["../../src/validators/isSpecifierDefault.ts"],"sourcesContent":["import { isIdentifier, isImportDefaultSpecifier } from \"./generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `specifier` is a `default` import or export.\n */\nexport default function isSpecifierDefault(\n specifier: t.ModuleSpecifier,\n): boolean {\n return (\n isImportDefaultSpecifier(specifier) ||\n // @ts-expect-error todo(flow->ts): stricter type for specifier\n isIdentifier(specifier.imported || specifier.exported, {\n name: \"default\",\n })\n );\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAMe,SAASC,kBAAkBA,CACxCC,SAA4B,EACnB;EACT,OACE,IAAAC,+BAAwB,EAACD,SAAS,CAAC,IAEnC,IAAAE,mBAAY,EAACF,SAAS,CAACG,QAAQ,IAAIH,SAAS,CAACI,QAAQ,EAAE;IACrDC,IAAI,EAAE;EACR,CAAC,CAAC;AAEN","ignoreList":[]}
@@ -0,0 +1,5 @@
import * as React from 'react';
export declare type RefCallback<T> = (newValue: T | null) => void;
export declare type RefObject<T> = React.MutableRefObject<T | null>;
export declare type DefinedReactRef<T> = RefCallback<T> | RefObject<T>;
export declare type ReactRef<T> = DefinedReactRef<T> | null;
@@ -0,0 +1,627 @@
export default `flf2a$ 6 5 20 15 13
Standard by Glenn Chappell & Ian Chai 3/93 -- based on .sig of Frank Sheeran
Figlet release 2.0 -- August 5, 1993
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
6 - height of a character
5 - height of a character, not including descenders
20 - max line length (excluding comment lines) + a fudge factor
15 - default smushmode for this font (like "-m 15" on command line)
13 - number of comment lines
$@
$@
$@
$@
$@
$@@
_ @
/ \\@
/ /@
/\\_/ @
\\/ @
@@
_ _ @
( | )@
V V @
@
@
@@
_ _ @
_| || |_ @
|_ .. _|@
|_ _|@
|_||_| @
@@
_ @
| | @
/ __)@
\\__ \\@
( /@
|_| @@
_ __@
(_)/ /@
/ / @
/ /_ @
/_/(_)@
@@
___ @
( _ ) @
/ _ \\/\\@
| (_> <@
\\___/\\/@
@@
_ @
( )@
|/ @
@
@
@@
__@
/ /@
| | @
| | @
| | @
\\_\\@@
__ @
\\ \\ @
| |@
| |@
| |@
/_/ @@
@
__/\\__@
\\ /@
/_ _\\@
\\/ @
@@
@
_ @
_| |_ @
|_ _|@
|_| @
@@
@
@
@
_ @
( )@
|/ @@
@
@
_____ @
|_____|@
@
@@
@
@
@
_ @
(_)@
@@
__@
/ /@
/ / @
/ / @
/_/ @
@@
___ @
/ _ \\ @
| | | |@
| |_| |@
\\___/ @
@@
_ @
/ |@
| |@
| |@
|_|@
@@
____ @
|___ \\ @
__) |@
/ __/ @
|_____|@
@@
_____ @
|___ / @
|_ \\ @
___) |@
|____/ @
@@
_ _ @
| || | @
| || |_ @
|__ _|@
|_| @
@@
____ @
| ___| @
|___ \\ @
___) |@
|____/ @
@@
__ @
/ /_ @
| '_ \\ @
| (_) |@
\\___/ @
@@
_____ @
|___ |@
/ / @
/ / @
/_/ @
@@
___ @
( _ ) @
/ _ \\ @
| (_) |@
\\___/ @
@@
___ @
/ _ \\ @
| (_) |@
\\__, |@
/_/ @
@@
@
_ @
(_)@
_ @
(_)@
@@
@
_ @
(_)@
_ @
( )@
|/ @@
__@
/ /@
/ / @
\\ \\ @
\\_\\@
@@
@
_____ @
|_____|@
|_____|@
@
@@
__ @
\\ \\ @
\\ \\@
/ /@
/_/ @
@@
___ @
/ _ \\@
\\// /@
\\/ @
() @
@@
____ @
/ __ \\ @
/ / _\` |@
| | (_| |@
\\ \\__,_|@
\\____/ @@
_ @
/_\\ @
//_\\\\ @
/ _ \\@
\\_/ \\_/@
@@
___ @
/ __\\@
/__\\//@
/ \\/ \\@
\\_____/@
@@
___ @
/ __\\@
/ / @
/ /___ @
\\____/ @
@@
___ @
/ \\@
/ /\\ /@
/ /_// @
/___,' @
@@
__ @
/__\\@
/_\\ @
//__ @
\\__/ @
@@
___ @
/ __\\@
/ _\\ @
/ / @
\\/ @
@@
___ @
/ _ \\@
/ /_\\/@
/ /_\\\\ @
\\____/ @
@@
@
/\\ /\\@
/ /_/ /@
/ __ / @
\\/ /_/ @
@@
_____ @
\\_ \\@
/ /\\/@
/\\/ /_ @
\\____/ @
@@
__ @
\\ \\ @
\\ \\@
/\\_/ /@
\\___/ @
@@
@
/\\ /\\@
/ //_/@
/ __ \\ @
\\/ \\/ @
@@
__ @
/ / @
/ / @
/ /___ @
\\____/ @
@@
@
/\\/\\ @
/ \\ @
/ /\\/\\ \\@
\\/ \\/@
@@
__ @
/\\ \\ \\@
/ \\/ /@
/ /\\ / @
\\_\\ \\/ @
@@
___ @
/___\\@
// //@
/ \\_// @
\\___/ @
@@
___ @
/ _ \\@
/ /_)/@
/ ___/ @
\\/ @
@@
____ @
/___ \\@
// / /@
/ \\_/ / @
\\___,_\\ @
@@
__ @
/__\\ @
/ \\// @
/ _ \\ @
\\/ \\_/ @
@@
__ @
/ _\\ @
\\ \\ @
_\\ \\ @
\\__/ @
@@
_____ @
/__ \\@
/ /\\/@
/ / @
\\/ @
@@
@
/\\ /\\ @
/ / \\ \\@
\\ \\_/ /@
\\___/ @
@@
@
/\\ /\\ @
\\ \\ / / @
\\ V / @
\\_/ @
@@
__ __ @
/ / /\\ \\ \\@
\\ \\/ \\/ /@
\\ /\\ / @
\\/ \\/ @
@@
__ __@
\\ \\/ /@
\\ / @
/ \\ @
/_/\\_\\@
@@
@
/\\_/\\@
\\_ _/@
/ \\ @
\\_/ @
@@
_____@
/ _ /@
\\// / @
/ //\\@
/____/@
@@
__ @
| _|@
| | @
| | @
| | @
|__|@@
__ @
\\ \\ @
\\ \\ @
\\ \\ @
\\_\\@
@@
__ @
|_ |@
| |@
| |@
| |@
|__|@@
@
/\\ @
|/\\|@
@
@
@@
@
@
@
@
_____ @
|_____|@@
_ @
( )@
\\|@
@
@
@@
@
__ _ @
/ _\` |@
| (_| |@
\\__,_|@
@@
_ @
| |__ @
| '_ \\ @
| |_) |@
|_.__/ @
@@
@
___ @
/ __|@
| (__ @
\\___|@
@@
_ @
__| |@
/ _\` |@
| (_| |@
\\__,_|@
@@
@
___ @
/ _ \\@
| __/@
\\___|@
@@
__ @
/ _|@
| |_ @
| _|@
|_| @
@@
@
__ _ @
/ _\` |@
| (_| |@
\\__, |@
|___/ @@
_ @
| |__ @
| '_ \\ @
| | | |@
|_| |_|@
@@
_ @
(_)@
| |@
| |@
|_|@
@@
_ @
(_)@
| |@
| |@
_/ |@
|__/ @@
_ @
| | __@
| |/ /@
| < @
|_|\\_\\@
@@
_ @
| |@
| |@
| |@
|_|@
@@
@
_ __ ___ @
| '_ \` _ \\ @
| | | | | |@
|_| |_| |_|@
@@
@
_ __ @
| '_ \\ @
| | | |@
|_| |_|@
@@
@
___ @
/ _ \\ @
| (_) |@
\\___/ @
@@
@
_ __ @
| '_ \\ @
| |_) |@
| .__/ @
|_| @@
@
__ _ @
/ _\` |@
| (_| |@
\\__, |@
|_|@@
@
_ __ @
| '__|@
| | @
|_| @
@@
@
___ @
/ __|@
\\__ \\@
|___/@
@@
_ @
| |_ @
| __|@
| |_ @
\\__|@
@@
@
_ _ @
| | | |@
| |_| |@
\\__,_|@
@@
@
__ __@
\\ \\ / /@
\\ V / @
\\_/ @
@@
@
__ __@
\\ \\ /\\ / /@
\\ V V / @
\\_/\\_/ @
@@
@
__ __@
\\ \\/ /@
> < @
/_/\\_\\@
@@
@
_ _ @
| | | |@
| |_| |@
\\__, |@
|___/ @@
@
____@
|_ /@
/ / @
/___|@
@@
__@
/ /@
| | @
< < @
| | @
\\_\\@@
_ @
| |@
| |@
| |@
| |@
|_|@@
__ @
\\ \\ @
| | @
> >@
| | @
/_/ @@
@
/\\/|@
|/\\/ @
@
@
@@
_ _ @
(_)_(_)@
/ _ \\ @
| _ |@
|_| |_|@
@@
_ _ @
(_)_(_)@
/ _ \\ @
| |_| |@
\\___/ @
@@
_ _ @
(_) (_)@
| | | |@
| |_| |@
\\___/ @
@@
_ _ @
(_)_(_)@
/ _\` |@
| (_| |@
\\__,_|@
@@
_ _ @
(_)_(_)@
/ _ \\ @
| (_) |@
\\___/ @
@@
_ _ @
(_) (_)@
| | | |@
| |_| |@
\\__,_|@
@@
____ @
| __ \\@
| |/ /@
| |\\ \\@
|_||_/@
@@
`
@@ -0,0 +1 @@
{"version":3,"file":"dependentRequired.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/dependentRequired.ts"],"names":[],"mappings":";;AACA,6DAKmC;AAQnC,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,mBAAmB;IAC5B,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAL,oBAAK;IACL,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,mCAAoB,EAAC,GAAG,CAAC;CACzC,CAAA;AAED,kBAAe,GAAG,CAAA"}
@@ -0,0 +1,106 @@
import Level from "./Level.mjs";
import Logger from "./Logger.mjs";
import normalizeLevel from "./normalizeLevel.mjs";
class LogFactory {
/**
* Constructor (构造函数)
* @param config Configuration options (配置选项)
*/
constructor(config) {
this.loggers = /* @__PURE__ */ new Map();
this.LoggerClass = Logger;
this.defaultLevel = Level.INFO;
this.appenders = [];
this.configure(config);
}
/**
* Get the default log level (获取或设置默认日志级别)
*/
get level() {
return this.defaultLevel;
}
/**
* Get the default log level name (获取或设置默认日志级别名称)
*/
get levelName() {
return Level[this.defaultLevel];
}
/**
* Update the default log level (更新默认日志级别)
* @param level Log level (日志级别)
* @param updateCachedLoggers Whether to update the cached loggers (是否更新缓存的日志器)
* @returns Update level success if true (如果为 true 表示更新成功)
*/
updateLevel(level, updateCachedLoggers) {
const normalizedLevel = normalizeLevel(level);
const isValidLevel = normalizedLevel !== void 0;
if (isValidLevel) {
this.defaultLevel = normalizedLevel;
if (updateCachedLoggers !== false) {
this.loggers.forEach((logger) => {
logger.level = normalizedLevel;
});
}
}
return isValidLevel;
}
/**
* Configure the log factory (配置日志工厂)
* @param param Configuration options (配置选项)
*/
configure({
LoggerClass,
level,
appenders
} = {}) {
if (LoggerClass) {
this.LoggerClass = LoggerClass;
}
if (level) {
this.updateLevel(level, false);
}
if (appenders) {
this.appenders = appenders;
}
}
/**
* Get a logger instance (获取日志实例)
* @param name Logger name (日志名称)
*/
getLogger(name) {
let logger = this.loggers.get(name);
if (!logger) {
const { LoggerClass } = this;
logger = new LoggerClass(name, {
level: this.defaultLevel,
appenders: this.appenders
});
this.loggers.set(name, logger);
}
return logger;
}
/**
* Clear the logger cache (清除日志缓存)
* @param name Logger name (日志名称)
*/
clear(name) {
if (name) {
this.loggers.delete(name);
} else {
this.loggers.clear();
}
}
/**
* Dispose the log factory (销毁日志工厂)
*/
dispose() {
const promises = [];
this.loggers.forEach((logger) => {
promises.push(logger.dispose());
});
return Promise.allSettled(promises);
}
}
export {
LogFactory as default
};
@@ -0,0 +1,18 @@
/**
* @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 SquareDivide = createLucideIcon("SquareDivide", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }],
["line", { x1: "12", x2: "12", y1: "16", y2: "16", key: "aqc6ln" }],
["line", { x1: "12", x2: "12", y1: "8", y2: "8", key: "1mkcni" }]
]);
export { SquareDivide as default };
//# sourceMappingURL=square-divide.js.map
@@ -0,0 +1,460 @@
/**
* @fileoverview The main file for the hfs package.
* @author Nicholas C. Zakas
*/
/* global Buffer:readonly, URL */
//-----------------------------------------------------------------------------
// Types
//-----------------------------------------------------------------------------
/** @typedef {import("@humanfs/types").HfsImpl} HfsImpl */
/** @typedef {import("@humanfs/types").HfsDirectoryEntry} HfsDirectoryEntry */
/** @typedef {import("node:fs/promises")} Fsp */
/** @typedef {import("fs").Dirent} Dirent */
//-----------------------------------------------------------------------------
// Imports
//-----------------------------------------------------------------------------
import { Hfs } from "@humanfs/core";
import path from "node:path";
import { Retrier } from "@humanwhocodes/retry";
import nativeFsp from "node:fs/promises";
import { fileURLToPath } from "node:url";
//-----------------------------------------------------------------------------
// Constants
//-----------------------------------------------------------------------------
const RETRY_ERROR_CODES = new Set(["ENFILE", "EMFILE"]);
//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------
/**
* A class representing a directory entry.
* @implements {HfsDirectoryEntry}
*/
class NodeHfsDirectoryEntry {
/**
* The name of the directory entry.
* @type {string}
*/
name;
/**
* True if the entry is a file.
* @type {boolean}
*/
isFile;
/**
* True if the entry is a directory.
* @type {boolean}
*/
isDirectory;
/**
* True if the entry is a symbolic link.
* @type {boolean}
*/
isSymlink;
/**
* Creates a new instance.
* @param {Dirent} dirent The directory entry to wrap.
*/
constructor(dirent) {
this.name = dirent.name;
this.isFile = dirent.isFile();
this.isDirectory = dirent.isDirectory();
this.isSymlink = dirent.isSymbolicLink();
}
}
//-----------------------------------------------------------------------------
// Exports
//-----------------------------------------------------------------------------
/**
* A class representing the Node.js implementation of Hfs.
* @implements {HfsImpl}
*/
export class NodeHfsImpl {
/**
* The file system module to use.
* @type {Fsp}
*/
#fsp;
/**
* The retryer object used for retrying operations.
* @type {Retrier}
*/
#retrier;
/**
* Creates a new instance.
* @param {object} [options] The options for the instance.
* @param {Fsp} [options.fsp] The file system module to use.
*/
constructor({ fsp = nativeFsp } = {}) {
this.#fsp = fsp;
this.#retrier = new Retrier(error => RETRY_ERROR_CODES.has(error.code));
}
/**
* Reads a file and returns the contents as an Uint8Array.
* @param {string|URL} filePath The path to the file to read.
* @returns {Promise<Uint8Array|undefined>} A promise that resolves with the contents
* of the file or undefined if the file doesn't exist.
* @throws {Error} If the file cannot be read.
* @throws {TypeError} If the file path is not a string.
*/
bytes(filePath) {
return this.#retrier
.retry(() => this.#fsp.readFile(filePath))
.then(buffer => new Uint8Array(buffer.buffer))
.catch(error => {
if (error.code === "ENOENT") {
return undefined;
}
throw error;
});
}
/**
* Writes a value to a file. If the value is a string, UTF-8 encoding is used.
* @param {string|URL} filePath The path to the file to write.
* @param {Uint8Array} contents The contents to write to the
* file.
* @returns {Promise<void>} A promise that resolves when the file is
* written.
* @throws {TypeError} If the file path is not a string.
* @throws {Error} If the file cannot be written.
*/
async write(filePath, contents) {
const value = Buffer.from(contents);
return this.#retrier
.retry(() => this.#fsp.writeFile(filePath, value))
.catch(error => {
// the directory may not exist, so create it
if (error.code === "ENOENT") {
const dirPath = path.dirname(
filePath instanceof URL
? fileURLToPath(filePath)
: filePath,
);
return this.#fsp
.mkdir(dirPath, { recursive: true })
.then(() => this.#fsp.writeFile(filePath, value));
}
throw error;
});
}
/**
* Appends a value to a file. If the value is a string, UTF-8 encoding is used.
* @param {string|URL} filePath The path to the file to append to.
* @param {Uint8Array} contents The contents to append to the
* file.
* @returns {Promise<void>} A promise that resolves when the file is
* written.
* @throws {TypeError} If the file path is not a string.
* @throws {Error} If the file cannot be appended to.
*/
async append(filePath, contents) {
const value = Buffer.from(contents);
return this.#retrier
.retry(() => this.#fsp.appendFile(filePath, value))
.catch(error => {
// the directory may not exist, so create it
if (error.code === "ENOENT") {
const dirPath = path.dirname(
filePath instanceof URL
? fileURLToPath(filePath)
: filePath,
);
return this.#fsp
.mkdir(dirPath, { recursive: true })
.then(() => this.#fsp.appendFile(filePath, value));
}
throw error;
});
}
/**
* Checks if a file exists.
* @param {string|URL} filePath The path to the file to check.
* @returns {Promise<boolean>} A promise that resolves with true if the
* file exists or false if it does not.
* @throws {Error} If the operation fails with a code other than ENOENT.
*/
isFile(filePath) {
return this.#fsp
.stat(filePath)
.then(stat => stat.isFile())
.catch(error => {
if (error.code === "ENOENT") {
return false;
}
throw error;
});
}
/**
* Checks if a directory exists.
* @param {string|URL} dirPath The path to the directory to check.
* @returns {Promise<boolean>} A promise that resolves with true if the
* directory exists or false if it does not.
* @throws {Error} If the operation fails with a code other than ENOENT.
*/
isDirectory(dirPath) {
return this.#fsp
.stat(dirPath)
.then(stat => stat.isDirectory())
.catch(error => {
if (error.code === "ENOENT") {
return false;
}
throw error;
});
}
/**
* Creates a directory recursively.
* @param {string|URL} dirPath The path to the directory to create.
* @returns {Promise<void>} A promise that resolves when the directory is
* created.
*/
async createDirectory(dirPath) {
await this.#fsp.mkdir(dirPath, { recursive: true });
}
/**
* Deletes a file or empty directory.
* @param {string|URL} fileOrDirPath The path to the file or directory to
* delete.
* @returns {Promise<boolean>} A promise that resolves when the file or
* directory is deleted, true if the file or directory is deleted, false
* if the file or directory does not exist.
* @throws {TypeError} If the file or directory path is not a string.
* @throws {Error} If the file or directory cannot be deleted.
*/
delete(fileOrDirPath) {
return this.#fsp
.rm(fileOrDirPath)
.then(() => true)
.catch(error => {
if (error.code === "ERR_FS_EISDIR") {
return this.#fsp.rmdir(fileOrDirPath).then(() => true);
}
if (error.code === "ENOENT") {
return false;
}
throw error;
});
}
/**
* Deletes a file or directory recursively.
* @param {string|URL} fileOrDirPath The path to the file or directory to
* delete.
* @returns {Promise<boolean>} A promise that resolves when the file or
* directory is deleted, true if the file or directory is deleted, false
* if the file or directory does not exist.
* @throws {TypeError} If the file or directory path is not a string.
* @throws {Error} If the file or directory cannot be deleted.
*/
deleteAll(fileOrDirPath) {
return this.#fsp
.rm(fileOrDirPath, { recursive: true })
.then(() => true)
.catch(error => {
if (error.code === "ENOENT") {
return false;
}
throw error;
});
}
/**
* Returns a list of directory entries for the given path.
* @param {string|URL} dirPath The path to the directory to read.
* @returns {AsyncIterable<HfsDirectoryEntry>} A promise that resolves with the
* directory entries.
* @throws {TypeError} If the directory path is not a string.
* @throws {Error} If the directory cannot be read.
*/
async *list(dirPath) {
const entries = await this.#fsp.readdir(dirPath, {
withFileTypes: true,
});
for (const entry of entries) {
yield new NodeHfsDirectoryEntry(entry);
}
}
/**
* Returns the size of a file. This method handles ENOENT errors
* and returns undefined in that case.
* @param {string|URL} filePath The path to the file to read.
* @returns {Promise<number|undefined>} A promise that resolves with the size of the
* file in bytes or undefined if the file doesn't exist.
*/
size(filePath) {
return this.#fsp
.stat(filePath)
.then(stat => stat.size)
.catch(error => {
if (error.code === "ENOENT") {
return undefined;
}
throw error;
});
}
/**
* Returns the last modified date of a file or directory. This method handles ENOENT errors
* and returns undefined in that case.
* @param {string|URL} fileOrDirPath The path to the file to read.
* @returns {Promise<Date|undefined>} A promise that resolves with the last modified
* date of the file or directory, or undefined if the file doesn't exist.
*/
lastModified(fileOrDirPath) {
return this.#fsp
.stat(fileOrDirPath)
.then(stat => stat.mtime)
.catch(error => {
if (error.code === "ENOENT") {
return undefined;
}
throw error;
});
}
/**
* Copies a file from one location to another.
* @param {string|URL} source The path to the file to copy.
* @param {string|URL} destination The path to copy the file to.
* @returns {Promise<void>} A promise that resolves when the file is copied.
* @throws {Error} If the source file does not exist.
* @throws {Error} If the source file is a directory.
* @throws {Error} If the destination file is a directory.
*/
async copy(source, destination) {
const stat = await this.#fsp.lstat(source);
if (stat.isSymbolicLink()) {
const target = await this.#fsp.readlink(source);
return this.#fsp.symlink(target, destination);
}
return this.#fsp.copyFile(source, destination);
}
/**
* Copies a file or directory from one location to another.
* @param {string|URL} source The path to the file or directory to copy.
* @param {string|URL} destination The path to copy the file or directory to.
* @returns {Promise<void>} A promise that resolves when the file or directory is
* copied.
* @throws {Error} If the source file or directory does not exist.
* @throws {Error} If the destination file or directory is a directory.
*/
async copyAll(source, destination) {
// for files use copy() and exit
if (await this.isFile(source)) {
return this.copy(source, destination);
}
const sourceStr =
source instanceof URL ? fileURLToPath(source) : source;
const destinationStr =
destination instanceof URL
? fileURLToPath(destination)
: destination;
// for directories, create the destination directory and copy each entry
await this.createDirectory(destination);
for await (const entry of this.list(source)) {
const fromEntryPath = path.join(sourceStr, entry.name);
const toEntryPath = path.join(destinationStr, entry.name);
if (entry.isSymlink) {
const target = await this.#fsp.readlink(fromEntryPath);
await this.#fsp.symlink(target, toEntryPath);
} else if (entry.isDirectory) {
await this.copyAll(fromEntryPath, toEntryPath);
} else {
await this.copy(fromEntryPath, toEntryPath);
}
}
}
/**
* Moves a file from the source path to the destination path.
* @param {string|URL} source The location of the file to move.
* @param {string|URL} destination The destination of the file to move.
* @returns {Promise<void>} A promise that resolves when the move is complete.
* @throws {TypeError} If the file paths are not strings.
* @throws {Error} If the file cannot be moved.
*/
move(source, destination) {
return this.#fsp.stat(source).then(stat => {
if (stat.isDirectory()) {
throw new Error(
`EISDIR: illegal operation on a directory, move '${source}' -> '${destination}'`,
);
}
return this.#fsp.rename(source, destination);
});
}
/**
* Moves a file or directory from the source path to the destination path.
* @param {string|URL} source The location of the file or directory to move.
* @param {string|URL} destination The destination of the file or directory to move.
* @returns {Promise<void>} A promise that resolves when the move is complete.
* @throws {TypeError} If the file paths are not strings.
* @throws {Error} If the file or directory cannot be moved.
*/
async moveAll(source, destination) {
return this.#fsp.rename(source, destination);
}
}
/**
* A class representing a file system utility library.
* @implements {HfsImpl}
*/
export class NodeHfs extends Hfs {
/**
* Creates a new instance.
* @param {object} [options] The options for the instance.
* @param {Fsp} [options.fsp] The file system module to use.
*/
constructor({ fsp } = {}) {
super({ impl: new NodeHfsImpl({ fsp }) });
}
}
export const hfs = new NodeHfs();
@@ -0,0 +1,128 @@
# Copyright (c) 2016 Ben Noordhuis <info@bnoordhuis.nl>. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import os
import gyp.common
import gyp.xcode_emulation
generator_additional_non_configuration_keys = []
generator_additional_path_sections = []
generator_extra_sources_for_rules = []
generator_filelist_paths = None
generator_supports_multiple_toolsets = True
generator_wants_sorted_dependencies = False
# Lifted from make.py. The actual values don't matter much.
generator_default_variables = {
"CONFIGURATION_NAME": "$(BUILDTYPE)",
"EXECUTABLE_PREFIX": "",
"EXECUTABLE_SUFFIX": "",
"INTERMEDIATE_DIR": "$(obj).$(TOOLSET)/$(TARGET)/geni",
"PRODUCT_DIR": "$(builddir)",
"RULE_INPUT_DIRNAME": "%(INPUT_DIRNAME)s",
"RULE_INPUT_EXT": "$(suffix $<)",
"RULE_INPUT_NAME": "$(notdir $<)",
"RULE_INPUT_PATH": "$(abspath $<)",
"RULE_INPUT_ROOT": "%(INPUT_ROOT)s",
"SHARED_INTERMEDIATE_DIR": "$(obj)/gen",
"SHARED_LIB_PREFIX": "lib",
"STATIC_LIB_PREFIX": "lib",
"STATIC_LIB_SUFFIX": ".a",
}
def IsMac(params):
return gyp.common.GetFlavor(params) == "mac"
def CalculateVariables(default_variables, params):
default_variables.setdefault("OS", gyp.common.GetFlavor(params))
def AddCommandsForTarget(cwd, target, params, per_config_commands):
output_dir = params["generator_flags"].get("output_dir", "out")
for configuration_name, configuration in target["configurations"].items():
if IsMac(params):
xcode_settings = gyp.xcode_emulation.XcodeSettings(target)
cflags = xcode_settings.GetCflags(configuration_name)
cflags_c = xcode_settings.GetCflagsC(configuration_name)
cflags_cc = xcode_settings.GetCflagsCC(configuration_name)
else:
cflags = configuration.get("cflags", [])
cflags_c = configuration.get("cflags_c", [])
cflags_cc = configuration.get("cflags_cc", [])
cflags_c = cflags + cflags_c
cflags_cc = cflags + cflags_cc
defines = configuration.get("defines", [])
defines = ["-D" + s for s in defines]
# TODO(bnoordhuis) Handle generated source files.
extensions = (".c", ".cc", ".cpp", ".cxx")
sources = [s for s in target.get("sources", []) if s.endswith(extensions)]
def resolve(filename):
return os.path.abspath(os.path.join(cwd, filename))
# TODO(bnoordhuis) Handle generated header files.
include_dirs = configuration.get("include_dirs", [])
include_dirs = [s for s in include_dirs if not s.startswith("$(obj)")]
includes = ["-I" + resolve(s) for s in include_dirs]
defines = gyp.common.EncodePOSIXShellList(defines)
includes = gyp.common.EncodePOSIXShellList(includes)
cflags_c = gyp.common.EncodePOSIXShellList(cflags_c)
cflags_cc = gyp.common.EncodePOSIXShellList(cflags_cc)
commands = per_config_commands.setdefault(configuration_name, [])
for source in sources:
file = resolve(source)
isc = source.endswith(".c")
cc = "cc" if isc else "c++"
cflags = cflags_c if isc else cflags_cc
command = " ".join(
(
cc,
defines,
includes,
cflags,
"-c",
gyp.common.EncodePOSIXShellArgument(file),
)
)
commands.append({"command": command, "directory": output_dir, "file": file})
def GenerateOutput(target_list, target_dicts, data, params):
per_config_commands = {}
for qualified_target, target in target_dicts.items():
build_file, _target_name, _toolset = gyp.common.ParseQualifiedTarget(
qualified_target
)
if IsMac(params):
settings = data[build_file]
gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(settings, target)
cwd = os.path.dirname(build_file)
AddCommandsForTarget(cwd, target, params, per_config_commands)
output_dir = None
try:
# generator_output can be `None` on Windows machines, or even not
# defined in other cases
output_dir = params.get("options").generator_output
except AttributeError:
pass
output_dir = output_dir or params["generator_flags"].get("output_dir", "out")
for configuration_name, commands in per_config_commands.items():
filename = os.path.join(output_dir, configuration_name, "compile_commands.json")
gyp.common.EnsureDirExists(filename)
fp = open(filename, "w")
json.dump(commands, fp=fp, indent=0, check_circular=False)
def PerformBuild(data, configurations, params):
pass
@@ -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 SquareArrowDown = createLucideIcon("SquareArrowDown", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M12 8v8", key: "napkw2" }],
["path", { d: "m8 12 4 4 4-4", key: "k98ssh" }]
]);
export { SquareArrowDown as default };
//# sourceMappingURL=square-arrow-down.js.map
@@ -0,0 +1,267 @@
/**
* @fileoverview Rule to enforce grouped require statements for Node.JS
* @author Raphael Pigulla
* @deprecated in ESLint v7.0.0
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Node.js rules were moved out of ESLint core.",
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
deprecatedSince: "7.0.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"eslint-plugin-n now maintains deprecated Node.js-related rules.",
plugin: {
name: "eslint-plugin-n",
url: "https://github.com/eslint-community/eslint-plugin-n",
},
rule: {
name: "no-mixed-requires",
url: "https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-mixed-requires.md",
},
},
],
},
type: "suggestion",
docs: {
description:
"Disallow `require` calls to be mixed with regular variable declarations",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-mixed-requires",
},
schema: [
{
oneOf: [
{
type: "boolean",
},
{
type: "object",
properties: {
grouping: {
type: "boolean",
},
allowCall: {
type: "boolean",
},
},
additionalProperties: false,
},
],
},
],
messages: {
noMixRequire: "Do not mix 'require' and other declarations.",
noMixCoreModuleFileComputed:
"Do not mix core, module, file and computed requires.",
},
},
create(context) {
const options = context.options[0];
let grouping = false,
allowCall = false;
if (typeof options === "object") {
grouping = options.grouping;
allowCall = options.allowCall;
} else {
grouping = !!options;
}
/**
* Returns the list of built-in modules.
* @returns {string[]} An array of built-in Node.js modules.
*/
function getBuiltinModules() {
/*
* This list is generated using:
* `require("repl")._builtinLibs.concat('repl').sort()`
* This particular list is as per nodejs v0.12.2 and iojs v0.7.1
*/
return [
"assert",
"buffer",
"child_process",
"cluster",
"crypto",
"dgram",
"dns",
"domain",
"events",
"fs",
"http",
"https",
"net",
"os",
"path",
"punycode",
"querystring",
"readline",
"repl",
"smalloc",
"stream",
"string_decoder",
"tls",
"tty",
"url",
"util",
"v8",
"vm",
"zlib",
];
}
const BUILTIN_MODULES = getBuiltinModules();
const DECL_REQUIRE = "require",
DECL_UNINITIALIZED = "uninitialized",
DECL_OTHER = "other";
const REQ_CORE = "core",
REQ_FILE = "file",
REQ_MODULE = "module",
REQ_COMPUTED = "computed";
/**
* Determines the type of a declaration statement.
* @param {ASTNode} initExpression The init node of the VariableDeclarator.
* @returns {string} The type of declaration represented by the expression.
*/
function getDeclarationType(initExpression) {
if (!initExpression) {
// "var x;"
return DECL_UNINITIALIZED;
}
if (
initExpression.type === "CallExpression" &&
initExpression.callee.type === "Identifier" &&
initExpression.callee.name === "require"
) {
// "var x = require('util');"
return DECL_REQUIRE;
}
if (
allowCall &&
initExpression.type === "CallExpression" &&
initExpression.callee.type === "CallExpression"
) {
// "var x = require('diagnose')('sub-module');"
return getDeclarationType(initExpression.callee);
}
if (initExpression.type === "MemberExpression") {
// "var x = require('glob').Glob;"
return getDeclarationType(initExpression.object);
}
// "var x = 42;"
return DECL_OTHER;
}
/**
* Determines the type of module that is loaded via require.
* @param {ASTNode} initExpression The init node of the VariableDeclarator.
* @returns {string} The module type.
*/
function inferModuleType(initExpression) {
if (initExpression.type === "MemberExpression") {
// "var x = require('glob').Glob;"
return inferModuleType(initExpression.object);
}
if (initExpression.arguments.length === 0) {
// "var x = require();"
return REQ_COMPUTED;
}
const arg = initExpression.arguments[0];
if (arg.type !== "Literal" || typeof arg.value !== "string") {
// "var x = require(42);"
return REQ_COMPUTED;
}
if (BUILTIN_MODULES.includes(arg.value)) {
// "var fs = require('fs');"
return REQ_CORE;
}
if (/^\.{0,2}\//u.test(arg.value)) {
// "var utils = require('./utils');"
return REQ_FILE;
}
// "var async = require('async');"
return REQ_MODULE;
}
/**
* Check if the list of variable declarations is mixed, i.e. whether it
* contains both require and other declarations.
* @param {ASTNode} declarations The list of VariableDeclarators.
* @returns {boolean} True if the declarations are mixed, false if not.
*/
function isMixed(declarations) {
const contains = {};
declarations.forEach(declaration => {
const type = getDeclarationType(declaration.init);
contains[type] = true;
});
return !!(
contains[DECL_REQUIRE] &&
(contains[DECL_UNINITIALIZED] || contains[DECL_OTHER])
);
}
/**
* Check if all require declarations in the given list are of the same
* type.
* @param {ASTNode} declarations The list of VariableDeclarators.
* @returns {boolean} True if the declarations are grouped, false if not.
*/
function isGrouped(declarations) {
const found = {};
declarations.forEach(declaration => {
if (getDeclarationType(declaration.init) === DECL_REQUIRE) {
found[inferModuleType(declaration.init)] = true;
}
});
return Object.keys(found).length <= 1;
}
return {
VariableDeclaration(node) {
if (isMixed(node.declarations)) {
context.report({
node,
messageId: "noMixRequire",
});
} else if (grouping && !isGrouped(node.declarations)) {
context.report({
node,
messageId: "noMixCoreModuleFileComputed",
});
}
},
};
},
};
@@ -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 SeparatorHorizontal = createLucideIcon("SeparatorHorizontal", [
["line", { x1: "3", x2: "21", y1: "12", y2: "12", key: "10d38w" }],
["polyline", { points: "8 8 12 4 16 8", key: "zo8t4w" }],
["polyline", { points: "16 16 12 20 8 16", key: "1oyrid" }]
]);
export { SeparatorHorizontal as default };
//# sourceMappingURL=separator-horizontal.js.map
@@ -0,0 +1,6 @@
import * as ts from 'typescript';
import type { TSESTreeOptions } from '../parser-options';
import type { MutableParseSettings } from './index';
export declare function createParseSettings(code: string | ts.SourceFile, tsestreeOptions?: Partial<TSESTreeOptions>): MutableParseSettings;
export declare function clearTSConfigMatchCache(): void;
export declare function clearTSServerProjectService(): void;
@@ -0,0 +1 @@
{"version":3,"file":"parking-meter.js","sources":["../../../src/icons/parking-meter.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ParkingMeter\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTEgMTVoMiIgLz4KICA8cGF0aCBkPSJNMTIgMTJ2MyIgLz4KICA8cGF0aCBkPSJNMTIgMTl2MyIgLz4KICA8cGF0aCBkPSJNMTUuMjgyIDE5YTEgMSAwIDAgMCAuOTQ4LS42OGwyLjM3LTYuOTg4YTcgNyAwIDEgMC0xMy4yIDBsMi4zNyA2Ljk4OGExIDEgMCAwIDAgLjk0OC42OHoiIC8+CiAgPHBhdGggZD0iTTkgOWEzIDMgMCAxIDEgNiAwIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/parking-meter\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 ParkingMeter = createLucideIcon('ParkingMeter', [\n ['path', { d: 'M11 15h2', key: '199qp6' }],\n ['path', { d: 'M12 12v3', key: '158kv8' }],\n ['path', { d: 'M12 19v3', key: 'npa21l' }],\n [\n 'path',\n {\n d: 'M15.282 19a1 1 0 0 0 .948-.68l2.37-6.988a7 7 0 1 0-13.2 0l2.37 6.988a1 1 0 0 0 .948.68z',\n key: '1jofit',\n },\n ],\n ['path', { d: 'M9 9a3 3 0 1 1 6 0', key: 'jdoeu8' }],\n]);\n\nexport default ParkingMeter;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,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,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,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;;"}
@@ -0,0 +1,21 @@
import { ConsolaInstance, ConsolaOptions } from './core.mjs';
export { ConfirmPromptOptions, Consola, ConsolaReporter, FormatOptions, InputLogObject, LogLevel, LogLevels, LogObject, LogType, LogTypes, MultiSelectOptions, PromptOptions, SelectPromptOptions, TextPromptOptions } from './core.mjs';
/**
* Creates a new Consola instance configured specifically for browser environments.
* This function sets up default reporters and a prompt method tailored to the browser's dialogue APIs.
*
* @param {Partial<ConsolaOptions>} [options={}] - Optional configuration options.
* The options can override the default reporter and prompt behaviour. See {@link ConsolaOptions}.
* @returns {ConsolaInstance} A new Consola instance optimised for use in browser environments.
*/
declare function createConsola(options?: Partial<ConsolaOptions>): ConsolaInstance;
/**
* A standard Consola instance created with browser-specific configurations.
* This instance can be used throughout a browser-based project.
*
* @type {ConsolaInstance} consola - The default browser-configured Consola instance.
*/
declare const consola: ConsolaInstance;
export { ConsolaInstance, ConsolaOptions, consola, createConsola, consola as default };
@@ -0,0 +1,467 @@
export default `flf2a$ 4 4 16 1 57
smkeyboard.flf
Adapted for figlet by Kent Nassen, kentn@cyberspace.org, 11/22/94, based
on the idea:
From: bas@damek.kth.se (Bas Meijer)
Newsgroups: rec.arts.ascii
Subject: Talk-line: keyboard.flf
Date: 22 Nov 1994 07:26:10 -0600
Organization: Royal Institute of Technology
Lines: 41
Sender: boba@gagme.wwa.com
Approved: boba@wwa.com
Message-ID: <3asrhi$con@gagme.wwa.com>
References: <3asltp$aog@gagme.wwa.com>
Reply-To: bas@damek.kth.se
NNTP-Posting-Host: gagme.wwa.com
In article aog@gagme.wwa.com, ssfiit@cs.umb.edu (SuperStreetFighter2Turbo) writes:
>
> I have composed a new figlet font! =)
> it is called keyboard.flf. It resemble the actual keyboard, well, kinda! =)
> anyway! here is a sample! =)
> _______ _______ _______ _______ _______ _______
> |\\ /|\\ /|\\ /|\\ /|\\ /|\\ /|
> | +---+ | +---+ | +---+ | +---+ | +---+ | +---+ |
> | | | | | | | | | | | | | | | | | | |
> | |s | | |a | | |m | | |p | | |l | | |e | |
> | +---+ | +---+ | +---+ | +---+ | +---+ | +---+ |
> |/_____\\|/_____\\|/_____\\|/_____\\|/_____\\|/_____\\|
____ _________ ____ ____ ____ _________ ____ ____ ____ _________
||A ||| |||B |||I |||T ||| |||T |||O |||O ||| ||
||__|||_______|||__|||__|||__|||_______|||__|||__|||__|||_______||
|/__\\|/_______\\|/__\\|/__\\|/__\\|/_______\\|/__\\|/__\\|/__\\|/_______\\|____
||B |||I |||G ||| |||I |||F ||| |||Y |||O |||U ||| ||
||__|||__|||__|||_______|||__|||__|||_______|||__|||__|||__|||_______||
|/__\\|/__\\|/__\\|/_______\\|/__\\|/__\\|/_______\\|/__\\|/__\\|/__\\|/_______\\|
||A |||S |||K ||| |||M |||E |||! ||| |||: |||) |||Return||
||__|||__|||__|||_______|||__|||__|||__|||_______|||__|||__||| ||
|/__\\|/__\\|/__\\|/_______\\|/__\\|/__\\|/__\\|/_______\\|/__\\|/__\\|/l ||
l|_____||
Bas. |/_____\\|
email: bas@damek.kth.se ____ ____ KTH, Dept. of Mach. Design
_______ ___ ______ / \\/ \\ ____________________________
( \\/ \\/ \\ / \\ ) ) ) ) \\
| | ) \\ \\___) / \\ \\__/\\ /\\ \\ \\__/ | )
| ( | \\_ \\ ( ( ) ) )_ ( )_) \\ )_| (
| | ) _ )\\ ) \\ \\__/ / / \\/ \\ / / \\ \\ \\
(_______/_/ \\__/_____/ \\ \\/ /_______)___)___/______)__/\\___)
\\____/\\____/
tel.: +46-(0)8-790 6308 S-100 44 Stockholm, Sweden
_________ @
|| ||@
||_______||@
|/_______\\|@@
____ @
||! ||@
||__||@
|/__\\|@@
____ @
||" ||@
||__||@
|/__\\|@@
____ @
||# ||@
||__||@
|/__\\|@@
____ @
||$ ||@
||__||@
|/__\\|@@
____ @
||% ||@
||__||@
|/__\\|@@
____ @
||& ||@
||__||@
|/__\\|@@
____ @
||' ||@
||__||@
|/__\\|@@
____ @
||( ||@
||__||@
|/__\\|@@
____ @
||) ||@
||__||@
|/__\\|@@
____ @
||* ||@
||__||@
|/__\\|@@
____ @
||+ ||@
||__||@
|/__\\|@@
____ @
||, ||@
||__||@
|/__\\|@@
____ @
||- ||@
||__||@
|/__\\|@@
____ @
||. ||@
||__||@
|/__\\|@@
____ @
||/ ||@
||__||@
|/__\\|@@
____ @
||0 ||@
||__||@
|/__\\|@@
____ @
||1 ||@
||__||@
|/__\\|@@
____ @
||2 ||@
||__||@
|/__\\|@@
____ @
||3 ||@
||__||@
|/__\\|@@
____ @
||4 ||@
||__||@
|/__\\|@@
____ @
||5 ||@
||__||@
|/__\\|@@
____ @
||6 ||@
||__||@
|/__\\|@@
____ @
||7 ||@
||__||@
|/__\\|@@
____ @
||8 ||@
||__||@
|/__\\|@@
____ @
||9 ||@
||__||@
|/__\\|@@
____ @
||: ||@
||__||@
|/__\\|@@
____ @
||; ||@
||__||@
|/__\\|@@
____ @
||< ||@
||__||@
|/__\\|@@
____ @
||= ||@
||__||@
|/__\\|@@
____ @
||> ||@
||__||@
|/__\\|@@
____ @
||? ||@
||__||@
|/__\\|@@
____ @
||@ ||@
||__||@
|/__\\|@@
____ @
||A ||@
||__||@
|/__\\|@@
____ @
||B ||@
||__||@
|/__\\|@@
____ @
||C ||@
||__||@
|/__\\|@@
____ @
||D ||@
||__||@
|/__\\|@@
____ @
||E ||@
||__||@
|/__\\|@@
____ @
||F ||@
||__||@
|/__\\|@@
____ @
||G ||@
||__||@
|/__\\|@@
____ @
||H ||@
||__||@
|/__\\|@@
____ @
||I ||@
||__||@
|/__\\|@@
____ @
||J ||@
||__||@
|/__\\|@@
____ @
||K ||@
||__||@
|/__\\|@@
____ @
||L ||@
||__||@
|/__\\|@@
____ @
||M ||@
||__||@
|/__\\|@@
____ @
||N ||@
||__||@
|/__\\|@@
____ @
||O ||@
||__||@
|/__\\|@@
____ @
||P ||@
||__||@
|/__\\|@@
____ @
||Q ||@
||__||@
|/__\\|@@
____ @
||R ||@
||__||@
|/__\\|@@
____ @
||S ||@
||__||@
|/__\\|@@
____ @
||T ||@
||__||@
|/__\\|@@
____ @
||U ||@
||__||@
|/__\\|@@
____ @
||V ||@
||__||@
|/__\\|@@
____ @
||W ||@
||__||@
|/__\\|@@
____ @
||X ||@
||__||@
|/__\\|@@
____ @
||Y ||@
||__||@
|/__\\|@@
____ @
||Z ||@
||__||@
|/__\\|@@
____ @
||[ ||@
||__||@
|/__\\|@@
____ @
||\\ ||@
||__||@
|/__\\|@@
____ @
||] ||@
||__||@
|/__\\|@@
____ @
||^ ||@
||__||@
|/__\\|@@
____ @
||_ ||@
||__||@
|/__\\|@@
____ @
||\` ||@
||__||@
|/__\\|@@
____ @
||a ||@
||__||@
|/__\\|@@
____ @
||b ||@
||__||@
|/__\\|@@
____ @
||c ||@
||__||@
|/__\\|@@
____ @
||d ||@
||__||@
|/__\\|@@
____ @
||e ||@
||__||@
|/__\\|@@
____ @
||f ||@
||__||@
|/__\\|@@
____ @
||g ||@
||__||@
|/__\\|@@
____ @
||h ||@
||__||@
|/__\\|@@
____ @
||i ||@
||__||@
|/__\\|@@
____ @
||j ||@
||__||@
|/__\\|@@
____ @
||k ||@
||__||@
|/__\\|@@
____ @
||l ||@
||__||@
|/__\\|@@
____ @
||m ||@
||__||@
|/__\\|@@
____ @
||n ||@
||__||@
|/__\\|@@
____ @
||o ||@
||__||@
|/__\\|@@
____ @
||p ||@
||__||@
|/__\\|@@
____ @
||q ||@
||__||@
|/__\\|@@
____ @
||r ||@
||__||@
|/__\\|@@
____ @
||s ||@
||__||@
|/__\\|@@
____ @
||t ||@
||__||@
|/__\\|@@
____ @
||u ||@
||__||@
|/__\\|@@
____ @
||v ||@
||__||@
|/__\\|@@
____ @
||w ||@
||__||@
|/__\\|@@
____ @
||x ||@
||__||@
|/__\\|@@
____ @
||y ||@
||__||@
|/__\\|@@
____ @
||z ||@
||__||@
|/__\\|@@
____ @
||{ ||@
||__||@
|/__\\|@@
____ @
||| ||@
||__||@
|/__\\|@@
____ @
||} ||@
||__||@
|/__\\|@@
____ @
||~ ||@
||__||@
|/__\\|@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
`
@@ -0,0 +1,256 @@
# tinyexec 📟
> A minimal package for executing commands
This package was created to provide a minimal way of interacting with child
processes without having to manually deal with streams, piping, etc.
## Installing
```sh
$ npm i -S tinyexec
```
## Usage
A process can be spawned and awaited like so:
```ts
import {x} from 'tinyexec';
const result = await x('ls', ['-l']);
// result.stdout - the stdout as a string
// result.stderr - the stderr as a string
// result.exitCode - the process exit code as a number
```
You may also iterate over the lines of output via an async loop:
```ts
import {x} from 'tinyexec';
const proc = x('ls', ['-l']);
for await (const line of proc) {
// line will be from stderr/stdout in the order you'd see it in a term
}
```
### Options
Options can be passed to have finer control over spawning of the process:
```ts
await x('ls', [], {
timeout: 1000
});
```
The options object can have the following properties:
- `signal` - an `AbortSignal` to allow aborting of the execution
- `timeout` - time in milliseconds at which the process will be forceably killed
- `persist` - if `true`, the process will continue after the host exits
- `stdin` - another `Result` can be used as the input to this process
- `nodeOptions` - any valid options to node's underlying `spawn` function
- `throwOnError` - if true, non-zero exit codes will throw an error
### Piping to another process
You can pipe a process to another via the `pipe` method:
```ts
const proc1 = x('ls', ['-l']);
const proc2 = proc1.pipe('grep', ['.js']);
const result = await proc2;
console.log(result.stdout);
```
`pipe` takes the same options as a regular execution. For example, you can
pass a timeout to the pipe call:
```ts
proc1.pipe('grep', ['.js'], {
timeout: 2000
});
```
### Killing a process
You can kill the process via the `kill` method:
```ts
const proc = x('ls');
proc.kill();
// or with a signal
proc.kill('SIGHUP');
```
### Node modules/binaries
By default, node's available binaries from `node_modules` will be accessible
in your command.
For example, in a repo which has `eslint` installed:
```ts
await x('eslint', ['.']);
```
In this example, `eslint` will come from the locally installed `node_modules`.
### Using an abort signal
An abort signal can be passed to a process in order to abort it at a later
time. This will result in the process being killed and `aborted` being set
to `true`.
```ts
const aborter = new AbortController();
const proc = x('node', ['./foo.mjs'], {
signal: aborter.signal
});
// elsewhere...
aborter.abort();
await proc;
proc.aborted; // true
proc.killed; // true
```
### Using with command strings
If you need to continue supporting commands as strings (e.g. "command arg0 arg1"),
you can use [args-tokenizer](https://github.com/TrySound/args-tokenizer),
a lightweight library for parsing shell command strings into an array.
```ts
import {x} from 'tinyexec';
import {tokenizeArgs} from 'args-tokenizer';
const commandString = 'echo "Hello, World!"';
const [command, ...args] = tokenizeArgs(commandString);
const result = await x(command, args);
result.stdout; // Hello, World!
```
## API
Calling `x(command[, args])` returns an awaitable `Result` which has the
following API methods and properties available:
### `pipe(command[, args[, options]])`
Pipes the current command to another. For example:
```ts
x('ls', ['-l'])
.pipe('grep', ['js']);
```
The parameters are as follows:
- `command` - the command to execute (_without any arguments_)
- `args` - an array of arguments
- `options` - options object
### `process`
The underlying node `ChildProcess`. For example:
```ts
const proc = x('ls');
proc.process; // ChildProcess;
```
### `kill([signal])`
Kills the current process with the specified signal. By default, this will
use the `SIGTERM` signal.
For example:
```ts
const proc = x('ls');
proc.kill();
```
### `pid`
The current process ID. For example:
```ts
const proc = x('ls');
proc.pid; // number
```
### `aborted`
Whether the process has been aborted or not (via the `signal` originally
passed in the options object).
For example:
```ts
const proc = x('ls');
proc.aborted; // bool
```
### `killed`
Whether the process has been killed or not (e.g. via `kill()` or an abort
signal).
For example:
```ts
const proc = x('ls');
proc.killed; // bool
```
### `exitCode`
The exit code received when the process completed execution.
For example:
```ts
const proc = x('ls');
proc.exitCode; // number (e.g. 1)
```
## Comparison with other libraries
`tinyexec` aims to provide a lightweight layer on top of Node's own
`child_process` API.
Some clear benefits compared to other libraries are that `tinyexec` will be much lighter, have a much
smaller footprint and will have a less abstract interface (less "magic"). It
will also have equal security and cross-platform support to popular
alternatives.
There are various features other libraries include which we are unlikely
to ever implement, as they would prevent us from providing a lightweight layer.
For example, if you'd like write scripts rather than individual commands, and
prefer to use templating, we'd definitely recommend
[zx](https://github.com/google/zx). zx is a much higher level library which
does some of the same work `tinyexec` does but behind a template string
interface.
Similarly, libraries like `execa` will provide helpers for various things
like passing files as input to processes. We opt not to support features like
this since many of them are easy to do yourself (using Node's own APIs).
@@ -0,0 +1,186 @@
import { L as isHashbangComment, f as createRule, g as import_ast_utils, h as AST_TOKEN_TYPES, m as AST_NODE_TYPES, v as COMMENTS_IGNORE_PATTERN } from "../utils.js";
function getEmptyLineNums(lines) {
const emptyLines = [];
lines.forEach((line, i) => {
if (!line.trim()) emptyLines.push(i + 1);
});
return emptyLines;
}
function getCommentLineNums(comments) {
const lines = [];
comments.forEach((token) => {
const start = token.loc.start.line;
const end = token.loc.end.line;
lines.push(start, end);
});
return lines;
}
const ALLOW_TARGETS = [
"Block",
"Class",
"Object",
"Array",
"Interface",
"Type",
"Enum",
"Module"
];
const ALLOW_NODE_TYPES = {
Block: [
AST_NODE_TYPES.ClassBody,
AST_NODE_TYPES.BlockStatement,
AST_NODE_TYPES.StaticBlock,
AST_NODE_TYPES.SwitchCase,
AST_NODE_TYPES.SwitchStatement
],
Class: [AST_NODE_TYPES.ClassBody],
Object: [AST_NODE_TYPES.ObjectExpression, AST_NODE_TYPES.ObjectPattern],
Array: [AST_NODE_TYPES.ArrayExpression, AST_NODE_TYPES.ArrayPattern],
Interface: [AST_NODE_TYPES.TSInterfaceBody],
Type: [AST_NODE_TYPES.TSTypeLiteral],
Enum: [AST_NODE_TYPES.TSEnumBody, AST_NODE_TYPES.TSEnumDeclaration],
Module: [AST_NODE_TYPES.TSModuleBlock]
};
function getAllowOptionName(target, boundary) {
return `allow${target}${boundary}`;
}
var lines_around_comment_default = createRule({
name: "lines-around-comment",
meta: {
type: "layout",
docs: { description: "Require empty lines around comments" },
fixable: "whitespace",
schema: [{
type: "object",
properties: {
beforeBlockComment: { type: "boolean" },
afterBlockComment: { type: "boolean" },
beforeLineComment: { type: "boolean" },
afterLineComment: { type: "boolean" },
...Object.fromEntries(ALLOW_TARGETS.flatMap((target) => [[getAllowOptionName(target, "Start"), { type: "boolean" }], [getAllowOptionName(target, "End"), { type: "boolean" }]])),
ignorePattern: { type: "string" },
applyDefaultIgnorePatterns: { type: "boolean" },
afterHashbangComment: { type: "boolean" }
},
additionalProperties: false
}],
defaultOptions: [{ beforeBlockComment: true }],
messages: {
after: "Expected line after comment.",
before: "Expected line before comment."
}
},
create(context, [options]) {
const normalizedOptions = options;
const defaultIgnoreRegExp = COMMENTS_IGNORE_PATTERN;
const { beforeBlockComment, afterBlockComment, beforeLineComment, afterLineComment, afterHashbangComment, applyDefaultIgnorePatterns, ignorePattern = "" } = normalizedOptions;
const customIgnoreRegExp = ignorePattern ? new RegExp(ignorePattern, "u") : null;
const sourceCode = context.sourceCode;
const comments = sourceCode.getAllComments();
const lines = sourceCode.lines;
const numLines = lines.length + 1;
const commentLines = getCommentLineNums(comments);
const emptyLines = getEmptyLineNums(lines);
const commentAndEmptyLines = new Set(commentLines.concat(emptyLines));
function codeAroundComment(token) {
let currentToken = token;
do
currentToken = sourceCode.getTokenBefore(currentToken, { includeComments: true });
while (currentToken && (0, import_ast_utils.isCommentToken)(currentToken));
if (currentToken && (0, import_ast_utils.isTokenOnSameLine)(currentToken, token)) return true;
currentToken = token;
do
currentToken = sourceCode.getTokenAfter(currentToken, { includeComments: true });
while (currentToken && (0, import_ast_utils.isCommentToken)(currentToken));
if (currentToken && (0, import_ast_utils.isTokenOnSameLine)(token, currentToken)) return true;
return false;
}
function getParentNodeOfToken(token) {
const node = sourceCode.getNodeByRangeIndex(token.range[0]);
if (node && node.type === "StaticBlock") {
const openingBrace = sourceCode.getFirstToken(node, { skip: 1 });
return openingBrace && token.range[0] >= openingBrace.range[0] ? node : null;
}
return node;
}
function isCommentAtParentStart(token, nodeTypes) {
const parent = getParentNodeOfToken(token);
if (parent && (0, import_ast_utils.isNodeOfTypes)(nodeTypes)(parent)) {
let parentStartNodeOrToken = parent;
if (parent.type === "StaticBlock") parentStartNodeOrToken = sourceCode.getFirstToken(parent, { skip: 1 });
else if (parent.type === "SwitchStatement") parentStartNodeOrToken = sourceCode.getTokenAfter(parent.discriminant, { filter: import_ast_utils.isOpeningBraceToken });
return !!parentStartNodeOrToken && token.loc.start.line - parentStartNodeOrToken.loc.start.line === 1;
}
return false;
}
function isCommentAtParentEnd(token, nodeTypes) {
const parent = getParentNodeOfToken(token);
return !!parent && (0, import_ast_utils.isNodeOfTypes)(nodeTypes)(parent) && parent.loc.end.line - token.loc.end.line === 1;
}
function isCommentAtBoundary(token, target, boundary) {
return (boundary === "Start" ? isCommentAtParentStart : isCommentAtParentEnd)(token, ALLOW_NODE_TYPES[target]);
}
function isExceptionAllowed(token, boundary) {
const blockOptionName = getAllowOptionName("Block", boundary);
const classOptionName = getAllowOptionName("Class", boundary);
if (normalizedOptions[blockOptionName] && isCommentAtBoundary(token, "Block", boundary) && !(normalizedOptions[classOptionName] === false && isCommentAtBoundary(token, "Class", boundary))) return true;
return ALLOW_TARGETS.some((target) => {
if (target === "Block") return false;
const optionName = getAllowOptionName(target, boundary);
return Boolean(normalizedOptions[optionName]) && isCommentAtBoundary(token, target, boundary);
});
}
function checkForEmptyLine(token, { before, after }) {
if (applyDefaultIgnorePatterns !== false && defaultIgnoreRegExp.test(token.value)) return;
if (customIgnoreRegExp?.test(token.value)) return;
const prevLineNum = token.loc.start.line - 1;
const nextLineNum = token.loc.end.line + 1;
if (prevLineNum < 1) before = false;
if (nextLineNum >= numLines) after = false;
if (codeAroundComment(token)) return;
const exceptionStartAllowed = isExceptionAllowed(token, "Start");
const exceptionEndAllowed = isExceptionAllowed(token, "End");
const previousTokenOrComment = sourceCode.getTokenBefore(token, { includeComments: true });
const nextTokenOrComment = sourceCode.getTokenAfter(token, { includeComments: true });
if (!exceptionStartAllowed && before && !commentAndEmptyLines.has(prevLineNum) && !((0, import_ast_utils.isCommentToken)(previousTokenOrComment) && (0, import_ast_utils.isTokenOnSameLine)(previousTokenOrComment, token))) {
const lineStart = token.range[0] - token.loc.start.column;
const range = [lineStart, lineStart];
context.report({
node: token,
messageId: "before",
fix(fixer) {
return fixer.insertTextBeforeRange(range, "\n");
}
});
}
if (!exceptionEndAllowed && after && !commentAndEmptyLines.has(nextLineNum) && !((0, import_ast_utils.isCommentToken)(nextTokenOrComment) && (0, import_ast_utils.isTokenOnSameLine)(token, nextTokenOrComment))) context.report({
node: token,
messageId: "after",
fix(fixer) {
return fixer.insertTextAfter(token, "\n");
}
});
}
return { Program() {
comments.forEach((token) => {
if (token.type === AST_TOKEN_TYPES.Line) {
if (beforeLineComment || afterLineComment) checkForEmptyLine(token, {
after: afterLineComment,
before: beforeLineComment
});
} else if (token.type === AST_TOKEN_TYPES.Block) {
if (beforeBlockComment || afterBlockComment) checkForEmptyLine(token, {
after: afterBlockComment,
before: beforeBlockComment
});
} else if (isHashbangComment(token)) {
if (afterHashbangComment) checkForEmptyLine(token, {
after: afterHashbangComment,
before: false
});
}
});
} };
}
});
export { lines_around_comment_default as t };
@@ -0,0 +1 @@
{"version":3,"file":"case-sensitive.js","sources":["../../../src/icons/case-sensitive.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CaseSensitive\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMyAxNSA0LTggNCA4IiAvPgogIDxwYXRoIGQ9Ik00IDEzaDYiIC8+CiAgPGNpcmNsZSBjeD0iMTgiIGN5PSIxMiIgcj0iMyIgLz4KICA8cGF0aCBkPSJNMjEgOXY2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/case-sensitive\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 CaseSensitive = createLucideIcon('CaseSensitive', [\n ['path', { d: 'm3 15 4-8 4 8', key: '1vwr6u' }],\n ['path', { d: 'M4 13h6', key: '1r9ots' }],\n ['circle', { cx: '18', cy: '12', r: '3', key: '1kchzo' }],\n ['path', { d: 'M21 9v6', key: 'anns31' }],\n]);\n\nexport default CaseSensitive;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB,iBAAiB,eAAiB,CAAA,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,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,CAC9C,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,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,65 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.revocationHandler = revocationHandler;
const express_1 = __importDefault(require("express"));
const cors_1 = __importDefault(require("cors"));
const clientAuth_js_1 = require("../middleware/clientAuth.js");
const auth_js_1 = require("../../../shared/auth.js");
const express_rate_limit_1 = require("express-rate-limit");
const allowedMethods_js_1 = require("../middleware/allowedMethods.js");
const errors_js_1 = require("../errors.js");
function revocationHandler({ provider, rateLimit: rateLimitConfig }) {
if (!provider.revokeToken) {
throw new Error('Auth provider does not support revoking tokens');
}
// Nested router so we can configure middleware and restrict HTTP method
const router = express_1.default.Router();
// Configure CORS to allow any origin, to make accessible to web-based MCP clients
router.use((0, cors_1.default)());
router.use((0, allowedMethods_js_1.allowedMethods)(['POST']));
router.use(express_1.default.urlencoded({ extended: false }));
// Apply rate limiting unless explicitly disabled
if (rateLimitConfig !== false) {
router.use((0, express_rate_limit_1.rateLimit)({
windowMs: 15 * 60 * 1000, // 15 minutes
max: 50, // 50 requests per windowMs
standardHeaders: true,
legacyHeaders: false,
message: new errors_js_1.TooManyRequestsError('You have exceeded the rate limit for token revocation requests').toResponseObject(),
...rateLimitConfig
}));
}
// Authenticate and extract client details
router.use((0, clientAuth_js_1.authenticateClient)({ clientsStore: provider.clientsStore }));
router.post('/', async (req, res) => {
res.setHeader('Cache-Control', 'no-store');
try {
const parseResult = auth_js_1.OAuthTokenRevocationRequestSchema.safeParse(req.body);
if (!parseResult.success) {
throw new errors_js_1.InvalidRequestError(parseResult.error.message);
}
const client = req.client;
if (!client) {
// This should never happen
throw new errors_js_1.ServerError('Internal Server Error');
}
await provider.revokeToken(client, parseResult.data);
res.status(200).json({});
}
catch (error) {
if (error instanceof errors_js_1.OAuthError) {
const status = error instanceof errors_js_1.ServerError ? 500 : 400;
res.status(status).json(error.toResponseObject());
}
else {
const serverError = new errors_js_1.ServerError('Internal Server Error');
res.status(500).json(serverError.toResponseObject());
}
}
});
return router;
}
//# sourceMappingURL=revoke.js.map
@@ -0,0 +1,238 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
'use strict';
import type {ESNode} from 'hermes-estree';
import type {VisitorKeysType} from '../traverse/getVisitorKeys';
import {
arrayIsEqual,
removeFromArray,
replaceInArray,
} from './astArrayMutationHelpers';
import {getVisitorKeys, isNode} from '../traverse/getVisitorKeys';
import {SimpleTraverser} from '../traverse/SimpleTraverser';
function getParentKey(
target: ESNode,
parent: ESNode,
visitorKeys?: ?VisitorKeysType,
): $ReadOnly<
| {
type: 'single',
node: ESNode,
key: string,
}
| {
type: 'array',
node: ESNode,
key: string,
targetIndex: number,
},
> {
if (parent == null) {
throw new Error(`Expected parent node to be set on "${target.type}"`);
}
for (const key of getVisitorKeys(parent, visitorKeys)) {
if (
isNode(
// $FlowExpectedError[prop-missing]
parent[key],
)
) {
if (parent[key] === target) {
return {type: 'single', node: parent, key};
}
} else if (Array.isArray(parent[key])) {
for (let i = 0; i < parent[key].length; i += 1) {
// $FlowExpectedError[invalid-tuple-index]
const current = parent[key][i];
if (current === target) {
return {type: 'array', node: parent, key, targetIndex: i};
}
}
}
}
// this shouldn't happen ever
throw new Error(
`Expected to find the ${target.type} as a direct child of the ${parent.type}.`,
);
}
/**
* Replace a node with a new node within an AST (via the parent pointer).
*/
export function replaceNodeOnParent(
originalNode: ESNode,
originalNodeParent: ESNode,
nodeToReplaceWith: ESNode,
visitorKeys?: ?VisitorKeysType,
): void {
const replacementParent = getParentKey(
originalNode,
originalNodeParent,
visitorKeys,
);
const parent = replacementParent.node;
if (replacementParent.type === 'array') {
// $FlowExpectedError[prop-missing]
parent[replacementParent.key] = replaceInArray(
// $FlowExpectedError[prop-missing]
parent[replacementParent.key],
replacementParent.targetIndex,
[nodeToReplaceWith],
);
} else {
// $FlowExpectedError[prop-missing]
parent[replacementParent.key] = nodeToReplaceWith;
}
}
/**
* Remove a node from the AST its connected to (via the parent pointer).
*/
export function removeNodeOnParent(
originalNode: ESNode,
originalNodeParent: ESNode,
visitorKeys?: ?VisitorKeysType,
): void {
const replacementParent = getParentKey(
originalNode,
originalNodeParent,
visitorKeys,
);
const parent = replacementParent.node;
if (replacementParent.type === 'array') {
// $FlowExpectedError[prop-missing]
parent[replacementParent.key] = removeFromArray(
// $FlowExpectedError[prop-missing]
parent[replacementParent.key],
replacementParent.targetIndex,
);
} else {
// $FlowExpectedError[prop-missing]
parent[replacementParent.key] = null;
}
}
/**
* Corrects the parent pointers in direct children of the given node.
*/
export function setParentPointersInDirectChildren(
node: ESNode,
visitorKeys?: ?VisitorKeysType,
): void {
for (const key: $FlowFixMe of getVisitorKeys(node, visitorKeys)) {
if (isNode(node[key])) {
// $FlowExpectedError[cannot-write]
node[key].parent = node;
} else if (Array.isArray(node[key])) {
for (const child of node[key]) {
child.parent = node;
}
}
}
}
/**
* Traverses the entire subtree to ensure the parent pointers are set correctly.
*/
export function updateAllParentPointers(
node: ESNode,
visitorKeys?: ?VisitorKeysType,
) {
SimpleTraverser.traverse(node, {
enter(node, parent) {
// $FlowExpectedError[cannot-write]
node.parent = parent;
},
leave() {},
visitorKeys,
});
}
/**
* Clone node and add new props.
*
* This will only create a new object if the overrides actually result in a change.
*/
export function nodeWith<T: ESNode>(
node: T,
overrideProps: Partial<T>,
visitorKeys?: ?VisitorKeysType,
): T {
// Check if this will actually result in a change, maintaining referential equality is important.
const willBeUnchanged = Object.entries(overrideProps).every(
([key, value]) => {
const node_: $FlowFixMe = node;
if (Array.isArray(value)) {
return Array.isArray(node_[key])
? arrayIsEqual(node_[key], value)
: false;
}
return node_[key] === value;
},
);
if (willBeUnchanged) {
return node;
}
// Create new node.
// $FlowExpectedError[cannot-spread-interface]
const newNode: T = {
...node,
...overrideProps,
};
// Ensure parent pointers are correctly set within this nodes children.
setParentPointersInDirectChildren(newNode, visitorKeys);
return newNode;
}
/**
* Shallow clones node, providing a new reference for an existing node.
*/
export function shallowCloneNode<T: ESNode>(
node: T,
visitorKeys?: ?VisitorKeysType,
): T {
// $FlowExpectedError[cannot-spread-interface]
const newNode: T = {...node};
// Ensure parent pointers are correctly set within this nodes children.
setParentPointersInDirectChildren(newNode, visitorKeys);
return newNode;
}
/**
* Deeply clones node and its entire tree.
*/
export function deepCloneNode<T: ESNode>(
node: T,
visitorKeys?: ?VisitorKeysType,
): T {
const clone: T = JSON.parse(
JSON.stringify(node, (key, value) => {
// null out parent pointers
if (key === 'parent') {
return undefined;
}
return value;
}),
);
updateAllParentPointers(clone, visitorKeys);
return clone;
}
@@ -0,0 +1,213 @@
import type {AnySchema, EvaluatedProperties, EvaluatedItems} from "../types"
import type {SchemaCxt, SchemaObjCxt} from "."
import {_, getProperty, Code, Name, CodeGen} from "./codegen"
import {_Code} from "./codegen/code"
import type {Rule, ValidationRules} from "./rules"
// TODO refactor to use Set
export function toHash<T extends string = string>(arr: T[]): {[K in T]?: true} {
const hash: {[K in T]?: true} = {}
for (const item of arr) hash[item] = true
return hash
}
export function alwaysValidSchema(it: SchemaCxt, schema: AnySchema): boolean | void {
if (typeof schema == "boolean") return schema
if (Object.keys(schema).length === 0) return true
checkUnknownRules(it, schema)
return !schemaHasRules(schema, it.self.RULES.all)
}
export function checkUnknownRules(it: SchemaCxt, schema: AnySchema = it.schema): void {
const {opts, self} = it
if (!opts.strictSchema) return
if (typeof schema === "boolean") return
const rules = self.RULES.keywords
for (const key in schema) {
if (!rules[key]) checkStrictMode(it, `unknown keyword: "${key}"`)
}
}
export function schemaHasRules(
schema: AnySchema,
rules: {[Key in string]?: boolean | Rule}
): boolean {
if (typeof schema == "boolean") return !schema
for (const key in schema) if (rules[key]) return true
return false
}
export function schemaHasRulesButRef(schema: AnySchema, RULES: ValidationRules): boolean {
if (typeof schema == "boolean") return !schema
for (const key in schema) if (key !== "$ref" && RULES.all[key]) return true
return false
}
export function schemaRefOrVal(
{topSchemaRef, schemaPath}: SchemaObjCxt,
schema: unknown,
keyword: string,
$data?: string | false
): Code | number | boolean {
if (!$data) {
if (typeof schema == "number" || typeof schema == "boolean") return schema
if (typeof schema == "string") return _`${schema}`
}
return _`${topSchemaRef}${schemaPath}${getProperty(keyword)}`
}
export function unescapeFragment(str: string): string {
return unescapeJsonPointer(decodeURIComponent(str))
}
export function escapeFragment(str: string | number): string {
return encodeURIComponent(escapeJsonPointer(str))
}
export function escapeJsonPointer(str: string | number): string {
if (typeof str == "number") return `${str}`
return str.replace(/~/g, "~0").replace(/\//g, "~1")
}
export function unescapeJsonPointer(str: string): string {
return str.replace(/~1/g, "/").replace(/~0/g, "~")
}
export function eachItem<T>(xs: T | T[], f: (x: T) => void): void {
if (Array.isArray(xs)) {
for (const x of xs) f(x)
} else {
f(xs)
}
}
type SomeEvaluated = EvaluatedProperties | EvaluatedItems
type MergeEvaluatedFunc<T extends SomeEvaluated> = (
gen: CodeGen,
from: Name | T,
to: Name | Exclude<T, true> | undefined,
toName?: typeof Name
) => Name | T
interface MakeMergeFuncArgs<T extends SomeEvaluated> {
mergeNames: (gen: CodeGen, from: Name, to: Name) => void
mergeToName: (gen: CodeGen, from: T, to: Name) => void
mergeValues: (from: T, to: Exclude<T, true>) => T
resultToName: (gen: CodeGen, res?: T) => Name
}
function makeMergeEvaluated<T extends SomeEvaluated>({
mergeNames,
mergeToName,
mergeValues,
resultToName,
}: MakeMergeFuncArgs<T>): MergeEvaluatedFunc<T> {
return (gen, from, to, toName) => {
const res =
to === undefined
? from
: to instanceof Name
? (from instanceof Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to)
: from instanceof Name
? (mergeToName(gen, to, from), from)
: mergeValues(from, to)
return toName === Name && !(res instanceof Name) ? resultToName(gen, res) : res
}
}
interface MergeEvaluated {
props: MergeEvaluatedFunc<EvaluatedProperties>
items: MergeEvaluatedFunc<EvaluatedItems>
}
export const mergeEvaluated: MergeEvaluated = {
props: makeMergeEvaluated({
mergeNames: (gen, from, to) =>
gen.if(_`${to} !== true && ${from} !== undefined`, () => {
gen.if(
_`${from} === true`,
() => gen.assign(to, true),
() => gen.assign(to, _`${to} || {}`).code(_`Object.assign(${to}, ${from})`)
)
}),
mergeToName: (gen, from, to) =>
gen.if(_`${to} !== true`, () => {
if (from === true) {
gen.assign(to, true)
} else {
gen.assign(to, _`${to} || {}`)
setEvaluated(gen, to, from)
}
}),
mergeValues: (from, to) => (from === true ? true : {...from, ...to}),
resultToName: evaluatedPropsToName,
}),
items: makeMergeEvaluated({
mergeNames: (gen, from, to) =>
gen.if(_`${to} !== true && ${from} !== undefined`, () =>
gen.assign(to, _`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)
),
mergeToName: (gen, from, to) =>
gen.if(_`${to} !== true`, () =>
gen.assign(to, from === true ? true : _`${to} > ${from} ? ${to} : ${from}`)
),
mergeValues: (from, to) => (from === true ? true : Math.max(from, to)),
resultToName: (gen, items) => gen.var("items", items),
}),
}
export function evaluatedPropsToName(gen: CodeGen, ps?: EvaluatedProperties): Name {
if (ps === true) return gen.var("props", true)
const props = gen.var("props", _`{}`)
if (ps !== undefined) setEvaluated(gen, props, ps)
return props
}
export function setEvaluated(gen: CodeGen, props: Name, ps: {[K in string]?: true}): void {
Object.keys(ps).forEach((p) => gen.assign(_`${props}${getProperty(p)}`, true))
}
const snippets: {[S in string]?: _Code} = {}
export function useFunc(gen: CodeGen, f: {code: string}): Name {
return gen.scopeValue("func", {
ref: f,
code: snippets[f.code] || (snippets[f.code] = new _Code(f.code)),
})
}
export enum Type {
Num,
Str,
}
export function getErrorPath(
dataProp: Name | string | number,
dataPropType?: Type,
jsPropertySyntax?: boolean
): Code | string {
// let path
if (dataProp instanceof Name) {
const isNumber = dataPropType === Type.Num
return jsPropertySyntax
? isNumber
? _`"[" + ${dataProp} + "]"`
: _`"['" + ${dataProp} + "']"`
: isNumber
? _`"/" + ${dataProp}`
: _`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")` // TODO maybe use global escapePointer
}
return jsPropertySyntax ? getProperty(dataProp).toString() : "/" + escapeJsonPointer(dataProp)
}
export function checkStrictMode(
it: SchemaCxt,
msg: string,
mode: boolean | "log" = it.opts.strictSchema
): void {
if (!mode) return
msg = `strict mode: ${msg}`
if (mode === true) throw new Error(msg)
it.self.logger.warn(msg)
}
@@ -0,0 +1,115 @@
export interface NavigateOptions {
ignoreBlocker?: boolean;
}
type SubscriberHistoryAction = {
type: Exclude<HistoryAction, 'GO'>;
} | {
type: 'GO';
index: number;
};
type SubscriberArgs = {
location: HistoryLocation;
action: SubscriberHistoryAction;
};
export interface RouterHistory {
location: HistoryLocation;
length: number;
subscribers: Set<(opts: SubscriberArgs) => void>;
subscribe: (cb: (opts: SubscriberArgs) => void) => () => void;
push: (path: string, state?: any, navigateOpts?: NavigateOptions) => void;
replace: (path: string, state?: any, navigateOpts?: NavigateOptions) => void;
go: (index: number, navigateOpts?: NavigateOptions) => void;
back: (navigateOpts?: NavigateOptions) => void;
forward: (navigateOpts?: NavigateOptions) => void;
canGoBack: () => boolean;
createHref: (href: string) => string;
block: (blocker: NavigationBlocker) => () => void;
flush: () => void;
destroy: () => void;
notify: (action: SubscriberHistoryAction) => void;
_ignoreSubscribers?: boolean;
}
export interface HistoryLocation extends ParsedPath {
state: ParsedHistoryState;
}
export interface ParsedPath {
href: string;
pathname: string;
search: string;
hash: string;
}
export interface HistoryState {
}
export type ParsedHistoryState = HistoryState & {
key?: string;
__TSR_key?: string;
__TSR_index: number;
};
type ShouldAllowNavigation = any;
export type HistoryAction = 'PUSH' | 'REPLACE' | 'FORWARD' | 'BACK' | 'GO';
export type BlockerFnArgs = {
currentLocation: HistoryLocation;
nextLocation: HistoryLocation;
action: HistoryAction;
};
export type BlockerFn = (args: BlockerFnArgs) => Promise<ShouldAllowNavigation> | ShouldAllowNavigation;
export type NavigationBlocker = {
blockerFn: BlockerFn;
enableBeforeUnload?: (() => boolean) | boolean;
};
export declare function createHistory(opts: {
getLocation: () => HistoryLocation;
getLength: () => number;
pushState: (path: string, state: any) => void;
replaceState: (path: string, state: any) => void;
go: (n: number) => void;
back: (ignoreBlocker: boolean) => void;
forward: (ignoreBlocker: boolean) => void;
createHref: (path: string) => string;
flush?: () => void;
destroy?: () => void;
onBlocked?: () => void;
getBlockers?: () => Array<NavigationBlocker>;
setBlockers?: (blockers: Array<NavigationBlocker>) => void;
notifyOnIndexChange?: boolean;
}): RouterHistory;
/**
* Creates a history object that can be used to interact with the browser's
* navigation. This is a lightweight API wrapping the browser's native methods.
* It is designed to work with TanStack Router, but could be used as a standalone API as well.
* IMPORTANT: This API implements history throttling via a microtask to prevent
* excessive calls to the history API. In some browsers, calling history.pushState or
* history.replaceState in quick succession can cause the browser to ignore subsequent
* calls. This API smooths out those differences and ensures that your application
* state will *eventually* match the browser state. In most cases, this is not a problem,
* but if you need to ensure that the browser state is up to date, you can use the
* `history.flush` method to immediately flush all pending state changes to the browser URL.
* @param opts
* @param opts.getHref A function that returns the current href (path + search + hash)
* @param opts.createHref A function that takes a path and returns a href (path + search + hash)
* @returns A history instance
*/
export declare function createBrowserHistory(opts?: {
parseLocation?: () => HistoryLocation;
createHref?: (path: string) => string;
window?: any;
}): RouterHistory;
/**
* Create a hash-based history implementation.
* Useful for static hosts or environments without server URL rewriting.
* @link https://tanstack.com/router/latest/docs/framework/react/guide/history-types
*/
export declare function createHashHistory(opts?: {
window?: any;
}): RouterHistory;
/**
* Create an in-memory history implementation.
* Ideal for server rendering, tests, and non-DOM environments.
* @link https://tanstack.com/router/latest/docs/framework/react/guide/history-types
*/
export declare function createMemoryHistory(opts?: {
initialEntries: Array<string>;
initialIndex?: number;
}): RouterHistory;
export declare function parseHref(href: string, state: ParsedHistoryState | undefined): HistoryLocation;
export {};
@@ -0,0 +1,162 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProxyOAuthServerProvider = void 0;
const auth_js_1 = require("../../../shared/auth.js");
const errors_js_1 = require("../errors.js");
// `issuer` is added by a client when it stores a value; upstream responses are parsed without it.
const TokenResponseSchema = auth_js_1.OAuthTokensSchema.omit({ issuer: true });
const RegistrationResponseSchema = auth_js_1.OAuthClientInformationFullSchema.omit({ issuer: true });
/**
* Implements an OAuth server that proxies requests to another OAuth server.
*/
class ProxyOAuthServerProvider {
constructor(options) {
this.skipLocalPkceValidation = true;
this._endpoints = options.endpoints;
this._verifyAccessToken = options.verifyAccessToken;
this._getClient = options.getClient;
this._fetch = options.fetch;
if (options.endpoints?.revocationUrl) {
this.revokeToken = async (client, request) => {
const revocationUrl = this._endpoints.revocationUrl;
if (!revocationUrl) {
throw new Error('No revocation endpoint configured');
}
const params = new URLSearchParams();
params.set('token', request.token);
params.set('client_id', client.client_id);
if (client.client_secret) {
params.set('client_secret', client.client_secret);
}
if (request.token_type_hint) {
params.set('token_type_hint', request.token_type_hint);
}
const response = await (this._fetch ?? fetch)(revocationUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
body: params.toString()
});
await response.body?.cancel();
if (!response.ok) {
throw new errors_js_1.ServerError(`Token revocation failed: ${response.status}`);
}
};
}
}
get clientsStore() {
const registrationUrl = this._endpoints.registrationUrl;
return {
getClient: this._getClient,
...(registrationUrl && {
registerClient: async (client) => {
const response = await (this._fetch ?? fetch)(registrationUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(client)
});
if (!response.ok) {
await response.body?.cancel();
throw new errors_js_1.ServerError(`Client registration failed: ${response.status}`);
}
const data = await response.json();
return RegistrationResponseSchema.parse(data);
}
})
};
}
async authorize(client, params, res) {
// Start with required OAuth parameters
const targetUrl = new URL(this._endpoints.authorizationUrl);
const searchParams = new URLSearchParams({
client_id: client.client_id,
response_type: 'code',
redirect_uri: params.redirectUri,
code_challenge: params.codeChallenge,
code_challenge_method: 'S256'
});
// Add optional standard OAuth parameters
if (params.state)
searchParams.set('state', params.state);
if (params.scopes?.length)
searchParams.set('scope', params.scopes.join(' '));
if (params.resource)
searchParams.set('resource', params.resource.href);
targetUrl.search = searchParams.toString();
res.redirect(targetUrl.toString());
}
async challengeForAuthorizationCode(_client, _authorizationCode) {
// In a proxy setup, we don't store the code challenge ourselves
// Instead, we proxy the token request and let the upstream server validate it
return '';
}
async exchangeAuthorizationCode(client, authorizationCode, codeVerifier, redirectUri, resource) {
const params = new URLSearchParams({
grant_type: 'authorization_code',
client_id: client.client_id,
code: authorizationCode
});
if (client.client_secret) {
params.append('client_secret', client.client_secret);
}
if (codeVerifier) {
params.append('code_verifier', codeVerifier);
}
if (redirectUri) {
params.append('redirect_uri', redirectUri);
}
if (resource) {
params.append('resource', resource.href);
}
const response = await (this._fetch ?? fetch)(this._endpoints.tokenUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
body: params.toString()
});
if (!response.ok) {
await response.body?.cancel();
throw new errors_js_1.ServerError(`Token exchange failed: ${response.status}`);
}
const data = await response.json();
return TokenResponseSchema.parse(data);
}
async exchangeRefreshToken(client, refreshToken, scopes, resource) {
const params = new URLSearchParams({
grant_type: 'refresh_token',
client_id: client.client_id,
refresh_token: refreshToken
});
if (client.client_secret) {
params.set('client_secret', client.client_secret);
}
if (scopes?.length) {
params.set('scope', scopes.join(' '));
}
if (resource) {
params.set('resource', resource.href);
}
const response = await (this._fetch ?? fetch)(this._endpoints.tokenUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
body: params.toString()
});
if (!response.ok) {
await response.body?.cancel();
throw new errors_js_1.ServerError(`Token refresh failed: ${response.status}`);
}
const data = await response.json();
return TokenResponseSchema.parse(data);
}
async verifyAccessToken(token) {
return this._verifyAccessToken(token);
}
}
exports.ProxyOAuthServerProvider = ProxyOAuthServerProvider;
//# sourceMappingURL=proxyProvider.js.map
@@ -0,0 +1,286 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _fs = _interopRequireDefault(require("fs"));
var _path = _interopRequireDefault(require("path"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const readFileSync = fp => {
return _fs.default.readFileSync(fp, 'utf8');
};
const pathExists = fp => new Promise(resolve => {
_fs.default.access(fp, err => {
resolve(!err);
});
});
const pathExistsSync = _fs.default.existsSync;
class JoyCon {
constructor({
files,
cwd = process.cwd(),
stopDir,
packageKey,
parseJSON = JSON.parse
} = {}) {
this.options = {
files,
cwd,
stopDir,
packageKey,
parseJSON
};
this.existsCache = new Map();
this.loaders = new Set();
this.packageJsonCache = new Map();
this.loadCache = new Map();
}
addLoader(loader) {
this.loaders.add(loader);
return this;
}
removeLoader(name) {
for (const loader of this.loaders) {
if (name && loader.name === name) {
this.loaders.delete(loader);
}
}
return this;
}
async recusivelyResolve(options) {
if (options.cwd === options.stopDir || _path.default.basename(options.cwd) === 'node_modules') {
return null;
}
for (const filename of options.files) {
const file = _path.default.resolve(options.cwd, filename);
const exists = process.env.NODE_ENV !== 'test' && this.existsCache.has(file) ? this.existsCache.get(file) : await pathExists(file);
this.existsCache.set(file, exists);
if (exists) {
if (!options.packageKey || _path.default.basename(file) !== 'package.json') {
return file;
}
const data = require(file);
delete require.cache[file];
const hasPackageKey = Object.prototype.hasOwnProperty.call(data, options.packageKey);
if (hasPackageKey) {
this.packageJsonCache.set(file, data);
return file;
}
}
continue;
}
return this.recusivelyResolve(Object.assign({}, options, {
cwd: _path.default.dirname(options.cwd)
}));
}
recusivelyResolveSync(options) {
if (options.cwd === options.stopDir || _path.default.basename(options.cwd) === 'node_modules') {
return null;
}
for (const filename of options.files) {
const file = _path.default.resolve(options.cwd, filename);
const exists = process.env.NODE_ENV !== 'test' && this.existsCache.has(file) ? this.existsCache.get(file) : pathExistsSync(file);
this.existsCache.set(file, exists);
if (exists) {
if (!options.packageKey || _path.default.basename(file) !== 'package.json') {
return file;
}
const data = require(file);
delete require.cache[file];
const hasPackageKey = Object.prototype.hasOwnProperty.call(data, options.packageKey);
if (hasPackageKey) {
this.packageJsonCache.set(file, data);
return file;
}
}
continue;
}
return this.recusivelyResolveSync(Object.assign({}, options, {
cwd: _path.default.dirname(options.cwd)
}));
}
async resolve(...args) {
const options = this.normalizeOptions(args);
return this.recusivelyResolve(options);
}
resolveSync(...args) {
const options = this.normalizeOptions(args);
return this.recusivelyResolveSync(options);
}
runLoaderSync(loader, filepath) {
return loader.loadSync(filepath);
}
runLoader(loader, filepath) {
if (!loader.load) return loader.loadSync(filepath);
return loader.load(filepath);
}
async load(...args) {
const options = this.normalizeOptions(args);
const filepath = await this.recusivelyResolve(options);
if (filepath) {
const defaultLoader = {
test: /\.+/,
loadSync: filepath => {
const extname = _path.default.extname(filepath).slice(1);
if (extname === 'js' || extname === 'cjs') {
delete require.cache[filepath];
return require(filepath);
}
if (this.packageJsonCache.has(filepath)) {
return this.packageJsonCache.get(filepath)[options.packageKey];
}
const data = this.options.parseJSON(readFileSync(filepath));
return data;
}
};
const loader = this.findLoader(filepath) || defaultLoader;
let data;
if (this.loadCache.has(filepath)) {
data = this.loadCache.get(filepath);
} else {
data = await this.runLoader(loader, filepath);
this.loadCache.set(filepath, data);
}
return {
path: filepath,
data
};
}
return {};
}
loadSync(...args) {
const options = this.normalizeOptions(args);
const filepath = this.recusivelyResolveSync(options);
if (filepath) {
const defaultLoader = {
test: /\.+/,
loadSync: filepath => {
const extname = _path.default.extname(filepath).slice(1);
if (extname === 'js' || extname === 'cjs') {
delete require.cache[filepath];
return require(filepath);
}
if (this.packageJsonCache.has(filepath)) {
return this.packageJsonCache.get(filepath)[options.packageKey];
}
const data = this.options.parseJSON(readFileSync(filepath));
return data;
}
};
const loader = this.findLoader(filepath) || defaultLoader;
let data;
if (this.loadCache.has(filepath)) {
data = this.loadCache.get(filepath);
} else {
data = this.runLoaderSync(loader, filepath);
this.loadCache.set(filepath, data);
}
return {
path: filepath,
data
};
}
return {};
}
findLoader(filepath) {
for (const loader of this.loaders) {
if (loader.test && loader.test.test(filepath)) {
return loader;
}
}
return null;
}
clearCache() {
this.existsCache.clear();
this.packageJsonCache.clear();
this.loadCache.clear();
return this;
}
normalizeOptions(args) {
const options = Object.assign({}, this.options);
if (Object.prototype.toString.call(args[0]) === '[object Object]') {
Object.assign(options, args[0]);
} else {
if (args[0]) {
options.files = args[0];
}
if (args[1]) {
options.cwd = args[1];
}
if (args[2]) {
options.stopDir = args[2];
}
}
options.cwd = _path.default.resolve(options.cwd);
options.stopDir = options.stopDir ? _path.default.resolve(options.stopDir) : _path.default.parse(options.cwd).root;
if (!options.files || options.files.length === 0) {
throw new Error('[joycon] files must be an non-empty array!');
}
options.__normalized__ = true;
return options;
}
}
exports.default = JoyCon;
module.exports = JoyCon;
module.exports.default = JoyCon;
@@ -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 Scale = createLucideIcon("Scale", [
["path", { d: "m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z", key: "7g6ntu" }],
["path", { d: "m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z", key: "ijws7r" }],
["path", { d: "M7 21h10", key: "1b0cd5" }],
["path", { d: "M12 3v18", key: "108xh3" }],
["path", { d: "M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2", key: "3gwbw2" }]
]);
export { Scale as default };
//# sourceMappingURL=scale.js.map
@@ -0,0 +1,6 @@
function isFunction(value) {
return typeof value === "function";
}
export {
isFunction
};
@@ -0,0 +1,38 @@
<!-- This file is autogenerated. If you want to change this content, please do the changes in `./docs/README.md` instead. -->
<div align="center">
<br />
<a href="https://github.com/dcastil/tailwind-merge">
<img src="https://github.com/dcastil/tailwind-merge/raw/v3.5.0/assets/logo.svg" alt="tailwind-merge" height="150px" />
</a>
</div>
# tailwind-merge
Utility function to efficiently merge [Tailwind CSS](https://tailwindcss.com) classes in JS without style conflicts.
```ts
import { twMerge } from 'tailwind-merge'
twMerge('px-2 py-1 bg-red hover:bg-dark-red', 'p-3 bg-[#B91C1C]')
// → 'hover:bg-dark-red p-3 bg-[#B91C1C]'
```
- Supports Tailwind v4.0 up to v4.2 (if you use Tailwind v3, use [tailwind-merge v2.6.0](https://github.com/dcastil/tailwind-merge/tree/v2.6.0))
- Works in all modern browsers and maintained Node versions
- Fully typed
- [Check bundle size on Bundlephobia](https://bundlephobia.com/package/tailwind-merge)
## Get started
- [What is it for](https://github.com/dcastil/tailwind-merge/tree/v3.5.0/docs/what-is-it-for.md)
- [When and how to use it](https://github.com/dcastil/tailwind-merge/tree/v3.5.0/docs/when-and-how-to-use-it.md)
- [Features](https://github.com/dcastil/tailwind-merge/tree/v3.5.0/docs/features.md)
- [Limitations](https://github.com/dcastil/tailwind-merge/tree/v3.5.0/docs/limitations.md)
- [Configuration](https://github.com/dcastil/tailwind-merge/tree/v3.5.0/docs/configuration.md)
- [Recipes](https://github.com/dcastil/tailwind-merge/tree/v3.5.0/docs/recipes.md)
- [API reference](https://github.com/dcastil/tailwind-merge/tree/v3.5.0/docs/api-reference.md)
- [Writing plugins](https://github.com/dcastil/tailwind-merge/tree/v3.5.0/docs/writing-plugins.md)
- [Versioning](https://github.com/dcastil/tailwind-merge/tree/v3.5.0/docs/versioning.md)
- [Contributing](https://github.com/dcastil/tailwind-merge/tree/v3.5.0/docs/contributing.md)
- [Similar packages](https://github.com/dcastil/tailwind-merge/tree/v3.5.0/docs/similar-packages.md)
@@ -0,0 +1,12 @@
export default KEYS;
export type VisitorKeys = {
readonly [type: string]: ReadonlyArray<string>;
};
/**
* @typedef {{ readonly [type: string]: ReadonlyArray<string> }} VisitorKeys
*/
/**
* @type {VisitorKeys}
*/
declare const KEYS: VisitorKeys;
//# sourceMappingURL=visitor-keys.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"dd-droppable.js","sourceRoot":"","sources":["../src/dd-droppable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAwB,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAU1E,yBAAyB;AAEzB,MAAM,OAAO,WAAY,SAAQ,eAAe;IAI9C,YAAmB,EAAe,EAAS,SAAyB,EAAE;QACpE,KAAK,EAAE,CAAC;QADS,OAAE,GAAF,EAAE,CAAa;QAAS,WAAM,GAAN,MAAM,CAAqB;QAEpE,+GAA+G;QAC/G,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAEM,EAAE,CAAC,KAAsC,EAAE,QAAoC;QACpF,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC5B,CAAC;IAEM,GAAG,CAAC,KAAsC;QAC/C,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAEM,MAAM;QACX,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK;YAAE,OAAO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AI,MAAM,GAAkB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC;gBAClD,OAAO,CAAC,UAAU,IAAI,MAAM,EAAE;oBAC5B,UAAU,GAAG,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC;oBAC3C,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC;iBAC/B;gBACD,IAAI,UAAU,EAAE;oBACd,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;iBAC3B;aACF;SACF;IACH,CAAC;IAED,0GAA0G;IACnG,IAAI,CAAC,CAAa;QACvB,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,MAAM,EAAE,GAAG,KAAK,CAAC,SAAS,CAAY,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QAC5E,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;YACpB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAA;SACtD;QACD,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAChC,CAAC;IAED,wEAAwE;IAC9D,QAAQ,CAAC,EAAe;QAChC,OAAO,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IACjD,CAAC;IAED,gBAAgB;IACN,YAAY;QACpB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QACrC,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,QAAQ,EAAE;YAC1C,IAAI,CAAC,MAAM,GAAG,CAAC,EAAe,EAALine truncated
@@ -0,0 +1,64 @@
/**
* Experimental task capability assertion helpers.
* WARNING: These APIs are experimental and may change without notice.
*
* @experimental
*/
/**
* Asserts that task creation is supported for tools/call.
* Used by Client.assertTaskCapability and Server.assertTaskHandlerCapability.
*
* @param requests - The task requests capability object
* @param method - The method being checked
* @param entityName - 'Server' or 'Client' for error messages
* @throws Error if the capability is not supported
*
* @experimental
*/
export function assertToolsCallTaskCapability(requests, method, entityName) {
if (!requests) {
throw new Error(`${entityName} does not support task creation (required for ${method})`);
}
switch (method) {
case 'tools/call':
if (!requests.tools?.call) {
throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);
}
break;
default:
// Method doesn't support tasks, which is fine - no error
break;
}
}
/**
* Asserts that task creation is supported for sampling/createMessage or elicitation/create.
* Used by Server.assertTaskCapability and Client.assertTaskHandlerCapability.
*
* @param requests - The task requests capability object
* @param method - The method being checked
* @param entityName - 'Server' or 'Client' for error messages
* @throws Error if the capability is not supported
*
* @experimental
*/
export function assertClientRequestTaskCapability(requests, method, entityName) {
if (!requests) {
throw new Error(`${entityName} does not support task creation (required for ${method})`);
}
switch (method) {
case 'sampling/createMessage':
if (!requests.sampling?.createMessage) {
throw new Error(`${entityName} does not support task creation for sampling/createMessage (required for ${method})`);
}
break;
case 'elicitation/create':
if (!requests.elicitation?.create) {
throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);
}
break;
default:
// Method doesn't support tasks, which is fine - no error
break;
}
}
//# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
module.exports={C:{"52":0.03997,"78":0.005,"96":0.005,"103":0.005,"108":0.005,"111":0.005,"115":0.27478,"121":0.005,"123":0.01998,"124":0.005,"128":0.005,"135":0.005,"136":0.00999,"137":0.005,"139":0.03497,"140":0.18485,"141":0.005,"142":0.005,"144":0.01499,"146":0.01998,"147":0.02498,"148":0.005,"149":0.01998,"150":0.03497,"151":0.02498,"152":0.04996,"153":0.13489,"154":0.44964,"155":1.42386,"156":1.4988,"157":0.04496,_:"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 97 98 99 100 101 102 104 105 106 107 109 110 112 113 114 116 117 118 119 120 122 125 126 127 129 130 131 132 133 134 138 143 145 158 159 160 3.5 3.6"},D:{"29":0.005,"33":0.005,"49":0.005,"76":0.005,"87":0.00999,"90":0.005,"91":0.01499,"93":0.00999,"100":0.00999,"101":0.02998,"102":0.005,"103":0.02998,"104":0.00999,"105":0.005,"106":0.005,"107":0.005,"108":0.005,"109":0.30975,"110":0.00999,"111":0.005,"112":0.01998,"114":0.005,"115":0.03997,"116":0.03997,"117":0.01998,"118":0.01499,"119":0.04496,"120":0.14488,"121":0.00999,"122":0.07494,"123":0.04496,"124":0.04996,"125":0.00999,"126":0.13489,"127":0.005,"128":0.02998,"129":0.01499,"130":0.01499,"131":0.08493,"132":0.02998,"133":0.05995,"134":0.30975,"135":0.04496,"136":0.06495,"137":0.07994,"138":0.13989,"139":0.04496,"140":0.06994,"141":0.08493,"142":0.18985,"143":0.09992,"144":0.3747,"145":0.19984,"146":1.56375,"147":0.50959,"148":0.41467,"149":0.16986,"150":0.69444,"151":2.01838,"152":8.06354,"153":8.76298,"154":2.17826,"155":0.02998,_:"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 30 31 32 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 77 78 79 80 81 83 84 85 86 88 89 92 94 95 96 97 98 99 113 156 157"},F:{"68":0.005,"95":0.02498,"99":0.005,"100":0.01998,"101":0.02998,"102":0.00999,"106":0.005,"109":0.005,"131":0.005,"133":0.00999,"134":0.15488,"135":1.35392,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 103 104 105 107 108 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.005,"93":0.005,"109":0.00999,"119":0.005,"120":0.005,"122":0.005,"127":0.005,"133":0.01499,"140":0.005,"141":0.005,"142":0.005,"143":0.005,"144":0.005,"145":0.00999,"146":0.02998,"147":0.01499,"148":0.01998,"149":0.01998,"150":0.07994,"151":0.25979,"152":2.01339,"153":2.76279,"154":0.7444,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 121 123 124 125 126 128 129 130 131 132 134 135 136 137 138 139"},E:{"14":0.005,"27":0.17986,_:"4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 6.1 7.1 9.1 10.1 12.1 15.1 15.2-15.3 15.4 16.0 16.2 27.1 27.2 TP","5.1":0.005,"11.1":0.00999,"13.1":0.005,"14.1":0.005,"15.5":0.01499,"15.6":0.04996,"16.1":0.005,"16.3":0.005,"16.4":0.005,"16.5":0.01499,"16.6":0.13489,"17.0":0.005,"17.1":0.09492,"17.2":0.00999,"17.3":0.005,"17.4":0.01499,"17.5":0.01998,"17.6":0.16487,"18.0":0.005,"18.1":0.00999,"18.2":0.005,"18.3":0.01499,"18.4":0.005,"18.5-18.7":0.03497,"26.0":0.01499,"26.1":0.00999,"26.2":0.06495,"26.3":0.09992,"26.4":0.07994,"26.5":0.23981,"26.6":1.42886},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00123,"5.0-5.1":0.00123,"6.0-6.1":0,"7.0-7.1":0.00247,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.01234,"11.0-11.2":0.00123,"11.3-11.4":0.00247,"12.0-12.1":0,"12.2-12.5":0.0321,"13.0-13.1":0,"13.2":0.00617,"13.3":0,"13.4-13.7":0.00123,"14.0-14.4":0.00494,"14.5-14.8":0.00741,"15.0-15.1":0.00741,"15.2-15.3":0.00494,"15.4":0.00617,"15.5":0.00741,"15.6-15.8":0.16048,"16.0":0.01234,"16.1":0.02222,"16.2":0.01234,"16.3":0.02716,"16.4":0.00617,"16.5":0.00988,"16.6-16.7":0.22344,"17.0":0.00864,"17.1":0.01234,"17.2":0.01234,"17.3":0.01852,"17.4":0.02592,"17.5":0.05061,"17.6-17.7":0.13086,"18.0":0.02716,"18.1":0.05432,"18.2":0.07407,"18.3":0.12839,"18.4":0.08024,"18.5-18.7":1.65792,"26.0":0.08024,"26.1":0.08148,"26.2":0.21233,"26.3":0.22961,"26.4":0.16789,"26.5":1.12462,"26.6":6.93905,"27.0":0.53206,"27.1":0,"27.2":0.01358},P:{"4":0.00946,"21":0.00946,"22":0.02838,"23":0.01892,"24":0.02838,"25":0.01892,"26":0.02838,"27":0.03785,"28":0.123,"29":0.16085,"30":2.27076,_:"20 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0","7.2-7.4":0.00946,"17.0":0.00946,"18.0":0.00946,"19.0":0.00946},I:{"0":0.015,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":0.78563,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":32.Line truncated
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_ZE","2":"_x","578":"G"},C:{"1":"_AM","2":"_oL","194":"_TC 8B","1025":"9B"},D:{"1":"_qF","2":"_IC","322":"_5E"},E:{"1":"_pB","2":"_qB"},F:{"1":"_MF","2":"_rR","322":"_TF 0B"},G:{"1":"_AB","2":"_XB"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_xB","2":"_3B"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"ME","194":"LE"}},B:6,C:"WebAssembly",D:true};
@@ -0,0 +1,168 @@
'use strict'
const { log } = require('proc-log')
const { format } = require('util')
// helper to emit log messages with a predefined prefix
const withPrefix = (prefix) => log.LEVELS.reduce((acc, level) => {
acc[level] = (...args) => log[level](prefix, ...args)
return acc
}, {})
// very basic ansi color generator
const COLORS = {
wrap: (str, colors) => {
const codes = colors.filter(c => typeof c === 'number')
return `\x1b[${codes.join(';')}m${str}\x1b[0m`
},
inverse: 7,
fg: {
black: 30,
red: 31,
green: 32,
yellow: 33,
blue: 34,
magenta: 35,
cyan: 36,
white: 37
},
bg: {
black: 40,
red: 41,
green: 42,
yellow: 43,
blue: 44,
magenta: 45,
cyan: 46,
white: 47
}
}
class Logger {
#buffer = []
#paused = null
#level = null
#stream = null
// ordered from loudest to quietest
#levels = [{
id: 'silly',
display: 'sill',
style: { inverse: true }
}, {
id: 'verbose',
display: 'verb',
style: { fg: 'cyan', bg: 'black' }
}, {
id: 'info',
style: { fg: 'green' }
}, {
id: 'http',
style: { fg: 'green', bg: 'black' }
}, {
id: 'notice',
style: { fg: 'cyan', bg: 'black' }
}, {
id: 'warn',
display: 'WARN',
style: { fg: 'black', bg: 'yellow' }
}, {
id: 'error',
display: 'ERR!',
style: { fg: 'red', bg: 'black' }
}]
constructor (stream) {
process.on('log', (...args) => this.#onLog(...args))
this.#levels = new Map(this.#levels.map((level, index) => [level.id, { ...level, index }]))
this.level = 'info'
this.stream = stream
log.pause()
}
get stream () {
return this.#stream
}
set stream (stream) {
this.#stream = stream
}
get level () {
return this.#levels.get(this.#level) ?? null
}
set level (level) {
this.#level = this.#levels.get(level)?.id ?? null
}
isVisible (level) {
return this.level?.index <= this.#levels.get(level)?.index ?? -1
}
#onLog (...args) {
const [level] = args
if (level === 'pause') {
this.#paused = true
return
}
if (level === 'resume') {
this.#paused = false
this.#buffer.forEach((b) => this.#log(...b))
this.#buffer.length = 0
return
}
if (this.#paused) {
this.#buffer.push(args)
return
}
this.#log(...args)
}
#color (str, { fg, bg, inverse }) {
if (!this.#stream?.isTTY) {
return str
}
return COLORS.wrap(str, [
COLORS.fg[fg],
COLORS.bg[bg],
inverse && COLORS.inverse
])
}
#log (levelId, msgPrefix, ...args) {
if (!this.isVisible(levelId) || typeof this.#stream?.write !== 'function') {
return
}
const level = this.#levels.get(levelId)
const prefixParts = [
this.#color('gyp', { fg: 'white', bg: 'black' }),
this.#color(level.display ?? level.id, level.style)
]
if (msgPrefix) {
prefixParts.push(this.#color(msgPrefix, { fg: 'magenta' }))
}
const prefix = prefixParts.join(' ').trim() + ' '
const lines = format(...args).split(/\r?\n/).map(l => prefix + l.trim())
this.#stream.write(lines.join('\n') + '\n')
}
}
// used to suppress logs in tests
const NULL_LOGGER = !!process.env.NODE_GYP_NULL_LOGGER
module.exports = {
logger: new Logger(NULL_LOGGER ? null : process.stderr),
stdout: NULL_LOGGER ? () => {} : (...args) => console.log(...args),
withPrefix,
...log
}
@@ -0,0 +1,53 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_utils_color = require("../../utils/color.js");
const require_utils_handler = require("../../utils/handler.js");
//#region src/helper/dev/index.ts
const handlerName = (handler) => {
return handler.name || (require_utils_handler.isMiddleware(handler) ? "[middleware]" : "[handler]");
};
const inspectRoutes = (hono) => {
return hono.routes.map(({ path, method, handler }) => {
const targetHandler = require_utils_handler.findTargetHandler(handler);
return {
path,
method,
name: handlerName(targetHandler),
isMiddleware: require_utils_handler.isMiddleware(targetHandler)
};
});
};
const showRoutes = (hono, opts) => {
const colorEnabled = opts?.colorize ?? require_utils_color.getColorEnabled();
const routeData = {};
let maxMethodLength = 0;
let maxPathLength = 0;
inspectRoutes(hono).filter(({ isMiddleware }) => opts?.verbose || !isMiddleware).map((route) => {
const key = `${route.method}-${route.path}`;
(routeData[key] ||= []).push(route);
if (routeData[key].length > 1) return;
maxMethodLength = Math.max(maxMethodLength, route.method.length);
maxPathLength = Math.max(maxPathLength, route.path.length);
return {
method: route.method,
path: route.path,
routes: routeData[key]
};
}).forEach((data) => {
if (!data) return;
const { method, path, routes } = data;
const methodStr = colorEnabled ? `\x1b[32m${method}\x1b[0m` : method;
console.log(`${methodStr} ${" ".repeat(maxMethodLength - method.length)} ${path}`);
if (!opts?.verbose) return;
routes.forEach(({ name }) => {
console.log(`${" ".repeat(maxMethodLength + 3)} ${name}`);
});
});
};
const getRouterName = (app) => {
app.router.match("GET", "/");
return app.router.name;
};
//#endregion
exports.getRouterName = getRouterName;
exports.inspectRoutes = inspectRoutes;
exports.showRoutes = showRoutes;
@@ -0,0 +1,12 @@
var inspect = require('../');
var test = require('tape');
test('deep', function (t) {
t.plan(4);
var obj = [[[[[[500]]]]]];
t.equal(inspect(obj), '[ [ [ [ [ [Array] ] ] ] ] ]');
t.equal(inspect(obj, { depth: 4 }), '[ [ [ [ [Array] ] ] ] ]');
t.equal(inspect(obj, { depth: 2 }), '[ [ [Array] ] ]');
t.equal(inspect([[[{ a: 1 }]]], { depth: 3 }), '[ [ [ [Object] ] ] ]');
});
@@ -0,0 +1,71 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'related-getter-setter-pairs',
meta: {
type: 'problem',
docs: {
description: 'Enforce that `get()` types should be assignable to their equivalent `set()` type',
recommended: 'strict',
requiresTypeChecking: true,
},
messages: {
mismatch: '`get()` type should be assignable to its equivalent `set()` type.',
},
schema: [],
},
defaultOptions: [],
create(context) {
const services = (0, util_1.getParserServices)(context);
const checker = services.program.getTypeChecker();
const methodPairsStack = [];
function addPropertyNode(member, inner, kind) {
const methodPairs = methodPairsStack[methodPairsStack.length - 1];
const { name } = (0, util_1.getNameFromMember)(member, context.sourceCode);
methodPairs.set(name, {
...methodPairs.get(name),
[kind]: inner,
});
}
return {
':matches(ClassBody, TSInterfaceBody, TSTypeLiteral):exit'() {
const methodPairs = methodPairsStack[methodPairsStack.length - 1];
for (const pair of methodPairs.values()) {
if (!pair.get || !pair.set) {
continue;
}
const getter = pair.get;
const getType = services.getTypeAtLocation(getter);
const setType = services.getTypeAtLocation(pair.set.params[0]);
if (!checker.isTypeAssignableTo(getType, setType)) {
context.report({
node: getter.returnType.typeAnnotation,
messageId: 'mismatch',
});
}
}
methodPairsStack.pop();
},
':matches(MethodDefinition, TSMethodSignature)[kind=get]'(node) {
const getter = getMethodFromNode(node);
if (getter.returnType) {
addPropertyNode(node, getter, 'get');
}
},
':matches(MethodDefinition, TSMethodSignature)[kind=set]'(node) {
const setter = getMethodFromNode(node);
if (setter.params.length === 1) {
addPropertyNode(node, setter, 'set');
}
},
'ClassBody, TSInterfaceBody, TSTypeLiteral'() {
methodPairsStack.push(new Map());
},
};
},
});
function getMethodFromNode(node) {
return node.type === utils_1.AST_NODE_TYPES.TSMethodSignature ? node : node.value;
}
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/index.ts", "../src/focus-guards.tsx"],
"sourcesContent": ["'use client';\nexport {\n FocusGuards,\n //\n Root,\n //\n useFocusGuards,\n} from './focus-guards';\n", "import * as React from 'react';\n\n/** Number of components which have requested interest to have focus guards */\nlet count = 0;\n\ninterface FocusGuardsProps {\n children?: React.ReactNode;\n}\n\nfunction FocusGuards(props: FocusGuardsProps) {\n useFocusGuards();\n return props.children;\n}\n\n/**\n * Injects a pair of focus guards at the edges of the whole DOM tree\n * to ensure `focusin` & `focusout` events can be caught consistently.\n */\nfunction useFocusGuards() {\n /* eslint-disable no-restricted-globals */\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');\n document.body.insertAdjacentElement('afterbegin', edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement('beforeend', edgeGuards[1] ?? createFocusGuard());\n count++;\n\n return () => {\n if (count === 1) {\n document.querySelectorAll('[data-radix-focus-guard]').forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n /* eslint-enable no-restricted-globals */\n}\n\nfunction createFocusGuard() {\n // eslint-disable-next-line no-restricted-globals\n const element = document.createElement('span');\n element.setAttribute('data-radix-focus-guard', '');\n element.tabIndex = 0;\n element.style.outline = 'none';\n element.style.opacity = '0';\n element.style.position = 'fixed';\n element.style.pointerEvents = 'none';\n return element;\n}\n\nexport {\n FocusGuards,\n //\n FocusGuards as Root,\n //\n useFocusGuards,\n};\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AAGvB,IAAI,QAAQ;AAMZ,SAAS,YAAY,OAAyB;AAC5C,iBAAe;AACf,SAAO,MAAM;AACf;AAMA,SAAS,iBAAiB;AAExB,EAAM,gBAAU,MAAM;AACpB,UAAM,aAAa,SAAS,iBAAiB,0BAA0B;AACvE,aAAS,KAAK,sBAAsB,cAAc,WAAW,CAAC,KAAK,iBAAiB,CAAC;AACrF,aAAS,KAAK,sBAAsB,aAAa,WAAW,CAAC,KAAK,iBAAiB,CAAC;AACpF;AAEA,WAAO,MAAM;AACX,UAAI,UAAU,GAAG;AACf,iBAAS,iBAAiB,0BAA0B,EAAE,QAAQ,CAAC,SAAS,KAAK,OAAO,CAAC;AAAA,MACvF;AACA;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AAEP;AAEA,SAAS,mBAAmB;AAE1B,QAAM,UAAU,SAAS,cAAc,MAAM;AAC7C,UAAQ,aAAa,0BAA0B,EAAE;AACjD,UAAQ,WAAW;AACnB,UAAQ,MAAM,UAAU;AACxB,UAAQ,MAAM,UAAU;AACxB,UAAQ,MAAM,WAAW;AACzB,UAAQ,MAAM,gBAAgB;AAC9B,SAAO;AACT;",
"names": []
}
@@ -0,0 +1,22 @@
'use strict';
const createWebSocketStream = require('./lib/stream');
const extension = require('./lib/extension');
const PerMessageDeflate = require('./lib/permessage-deflate');
const Receiver = require('./lib/receiver');
const Sender = require('./lib/sender');
const subprotocol = require('./lib/subprotocol');
const WebSocket = require('./lib/websocket');
const WebSocketServer = require('./lib/websocket-server');
WebSocket.createWebSocketStream = createWebSocketStream;
WebSocket.extension = extension;
WebSocket.PerMessageDeflate = PerMessageDeflate;
WebSocket.Receiver = Receiver;
WebSocket.Sender = Sender;
WebSocket.Server = WebSocketServer;
WebSocket.subprotocol = subprotocol;
WebSocket.WebSocket = WebSocket;
WebSocket.WebSocketServer = WebSocketServer;
module.exports = WebSocket;
@@ -0,0 +1 @@
{"version":3,"file":"dynamicAnchor.js","sourceRoot":"","sources":["../../../lib/vocabularies/dynamic/dynamicAnchor.ts"],"names":[],"mappings":";;;AAEA,mDAA0D;AAC1D,+CAAmC;AACnC,2CAAsD;AACtD,qCAAuC;AAEvC,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,gBAAgB;IACzB,UAAU,EAAE,QAAQ;IACpB,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC;CAC9C,CAAA;AAED,SAAgB,aAAa,CAAC,GAAe,EAAE,MAAc;IAC3D,MAAM,EAAC,GAAG,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;IACrB,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAA;IAC/C,MAAM,CAAC,GAAG,IAAA,WAAC,EAAA,GAAG,eAAC,CAAC,cAAc,GAAG,IAAA,qBAAW,EAAC,MAAM,CAAC,EAAE,CAAA;IACtD,MAAM,QAAQ,GAAG,EAAE,CAAC,aAAa,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;IAC/E,GAAG,CAAC,EAAE,CAAC,IAAA,WAAC,EAAA,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAA;AACjD,CAAC;AAND,sCAMC;AAED,SAAS,YAAY,CAAC,GAAe;IACnC,MAAM,EAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAC,GAAG,GAAG,CAAC,EAAE,CAAA;IACxC,MAAM,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAC,GAAG,SAAS,CAAC,IAAI,CAAA;IACtD,MAAM,EAAC,QAAQ,EAAC,GAAG,IAAI,CAAC,IAAI,CAAA;IAC5B,MAAM,GAAG,GAAG,IAAI,mBAAS,CAAC,EAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAA;IAC5E,uBAAa,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;IAC7B,OAAO,IAAA,iBAAW,EAAC,GAAG,EAAE,GAAG,CAAC,CAAA;AAC9B,CAAC;AAED,kBAAe,GAAG,CAAA"}
@@ -0,0 +1,161 @@
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^WebSocket$" }] */
'use strict';
const WebSocket = require('./websocket');
const { Duplex } = require('stream');
/**
* Emits the `'close'` event on a stream.
*
* @param {Duplex} stream The stream.
* @private
*/
function emitClose(stream) {
stream.emit('close');
}
/**
* The listener of the `'end'` event.
*
* @private
*/
function duplexOnEnd() {
if (!this.destroyed && this._writableState.finished) {
this.destroy();
}
}
/**
* The listener of the `'error'` event.
*
* @param {Error} err The error
* @private
*/
function duplexOnError(err) {
this.removeListener('error', duplexOnError);
this.destroy();
if (this.listenerCount('error') === 0) {
// Do not suppress the throwing behavior.
this.emit('error', err);
}
}
/**
* Wraps a `WebSocket` in a duplex stream.
*
* @param {WebSocket} ws The `WebSocket` to wrap
* @param {Object} [options] The options for the `Duplex` constructor
* @return {Duplex} The duplex stream
* @public
*/
function createWebSocketStream(ws, options) {
let terminateOnDestroy = true;
const duplex = new Duplex({
...options,
autoDestroy: false,
emitClose: false,
objectMode: false,
writableObjectMode: false
});
ws.on('message', function message(msg, isBinary) {
const data =
!isBinary && duplex._readableState.objectMode ? msg.toString() : msg;
if (!duplex.push(data)) ws.pause();
});
ws.once('error', function error(err) {
if (duplex.destroyed) return;
// Prevent `ws.terminate()` from being called by `duplex._destroy()`.
//
// - If the `'error'` event is emitted before the `'open'` event, then
// `ws.terminate()` is a noop as no socket is assigned.
// - Otherwise, the error is re-emitted by the listener of the `'error'`
// event of the `Receiver` object. The listener already closes the
// connection by calling `ws.close()`. This allows a close frame to be
// sent to the other peer. If `ws.terminate()` is called right after this,
// then the close frame might not be sent.
terminateOnDestroy = false;
duplex.destroy(err);
});
ws.once('close', function close() {
if (duplex.destroyed) return;
duplex.push(null);
});
duplex._destroy = function (err, callback) {
if (ws.readyState === ws.CLOSED) {
callback(err);
process.nextTick(emitClose, duplex);
return;
}
let called = false;
ws.once('error', function error(err) {
called = true;
callback(err);
});
ws.once('close', function close() {
if (!called) callback(err);
process.nextTick(emitClose, duplex);
});
if (terminateOnDestroy) ws.terminate();
};
duplex._final = function (callback) {
if (ws.readyState === ws.CONNECTING) {
ws.once('open', function open() {
duplex._final(callback);
});
return;
}
// If the value of the `_socket` property is `null` it means that `ws` is a
// client websocket and the handshake failed. In fact, when this happens, a
// socket is never assigned to the websocket. Wait for the `'error'` event
// that will be emitted by the websocket.
if (ws._socket === null) return;
if (ws._socket._writableState.finished) {
callback();
if (duplex._readableState.endEmitted) duplex.destroy();
} else {
ws._socket.once('finish', function finish() {
// `duplex` is not destroyed here because the `'end'` event will be
// emitted on `duplex` after this `'finish'` event. The EOF signaling
// `null` chunk is, in fact, pushed when the websocket emits `'close'`.
callback();
});
ws.close();
}
};
duplex._read = function () {
if (ws.isPaused) ws.resume();
};
duplex._write = function (chunk, encoding, callback) {
if (ws.readyState === ws.CONNECTING) {
ws.once('open', function open() {
duplex._write(chunk, encoding, callback);
});
return;
}
ws.send(chunk, callback);
};
duplex.on('end', duplexOnEnd);
duplex.on('error', duplexOnError);
return duplex;
}
module.exports = createWebSocketStream;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_NI","2":"_2F"},C:{"1":"_BQ _WC","2":"_f","8":"_DR"},D:{"1":"_ZO","2":"_5","8":"_HB","132":"_XN _2B","260":"_EC oB"},E:{"1":"_1C","2":"_eR","516":"_rH _EE"},F:{"1":"_uN","2":"_1G","8":"B bD","132":"_jK","260":"C _VB aC"},G:{"1":"_sH","2":"_IO"},H:{"1":"1D"},I:{"1":"I _mN","2":"_LB","132":"J 5D"},J:{"2":"_B"},K:{"1":"_eN","2":"A","132":"B"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"ME","8":"LE"}},B:6,C:"WebP image format",D:true};
@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const util_1 = require("../../compile/util");
const def = {
keyword: "not",
schemaType: ["object", "boolean"],
trackErrors: true,
code(cxt) {
const { gen, schema, it } = cxt;
if ((0, util_1.alwaysValidSchema)(it, schema)) {
cxt.fail();
return;
}
const valid = gen.name("valid");
cxt.subschema({
keyword: "not",
compositeRule: true,
createErrors: false,
allErrors: false,
}, valid);
cxt.failResult(valid, () => cxt.reset(), () => cxt.error());
},
error: { message: "must NOT be valid" },
};
exports.default = def;
//# sourceMappingURL=not.js.map
@@ -0,0 +1,32 @@
import { escapeToBuffer, raw, resolveCallbackSync, stringBufferToString } from "../../utils/html.js";
//#region src/helper/html/index.ts
/**
* @module
* html Helper for Hono.
*/
const html = (strings, ...values) => {
const buffer = [""];
for (let i = 0, len = strings.length - 1; i < len; i++) {
buffer[0] += strings[i];
const children = Array.isArray(values[i]) ? values[i].flat(Infinity) : [values[i]];
for (let i = 0, len = children.length; i < len; i++) {
const child = children[i];
if (typeof child === "string") escapeToBuffer(child, buffer);
else if (typeof child === "number") buffer[0] += child;
else if (typeof child === "boolean" || child === null || child === void 0) continue;
else if (typeof child === "object" && child.isEscaped) {
if (child.callbacks) buffer.unshift("", child);
else {
const tmp = child.toString();
if (tmp instanceof Promise) buffer.unshift("", tmp);
else buffer[0] += tmp;
}
} else if (child instanceof Promise) buffer.unshift("", child);
else escapeToBuffer(child.toString(), buffer);
}
}
buffer[0] += strings.at(-1);
return buffer.length === 1 ? "callbacks" in buffer ? raw(resolveCallbackSync(raw(buffer[0], buffer.callbacks))) : raw(buffer[0]) : stringBufferToString(buffer, buffer.callbacks);
};
//#endregion
export { html, raw };
@@ -0,0 +1 @@
{"version":3,"file":"toggle-right.js","sources":["../../../src/icons/toggle-right.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ToggleRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMTIiIHg9IjIiIHk9IjYiIHJ4PSI2IiByeT0iNiIgLz4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjEyIiByPSIyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/toggle-right\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 ToggleRight = createLucideIcon('ToggleRight', [\n ['rect', { width: '20', height: '12', x: '2', y: '6', rx: '6', ry: '6', key: 'f2vt7d' }],\n ['circle', { cx: '16', cy: '12', r: '2', key: '4ma0v8' }],\n]);\n\nexport default ToggleRight;\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,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA,CAAA;AAAA,CACvF,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC1D,CAAC,CAAA,C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BD,0BA+BC"}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_I"},C:{"1":"_QG _jC _JR _BD RB","2":"_g _1I SB _SJ _tF _L","33":"_GQ"},D:{"1":"_AK","2":"_jJ"},E:{"2":"_R"},F:{"1":"_0J","2":"_j _BC _O"},G:{"2":"_M"},H:{"2":"1D"},I:{"1":"_X","2":"_W"},J:{"1":"A","2":"D"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"2":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:2,C:"Vibration API",D:true};
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_I"},C:{"1":"_PI","2":"_LP"},D:{"1":"_3P _zK","2":"_KO"},E:{"1":"_PD","2":"_CI"},F:{"1":"_KQ _kD","2":"_gO"},G:{"1":"_kG","2":"_AI"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"D","16":"A"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_hB","2":"_rC"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:2,C:"CSS font-variant-numeric",D:true};
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/dialog.tsx"],
"sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContext, createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { RemoveScroll } from 'react-remove-scroll';\nimport { hideOthers } from 'aria-hidden';\nimport { createSlot } from '@radix-ui/react-slot';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Dialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst DIALOG_NAME = 'Dialog';\n\ntype ScopedProps<P> = P & { __scopeDialog?: Scope };\nconst [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\n\ntype DialogContextValue = {\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n contentRef: React.RefObject<DialogContentElement | null>;\n contentId: string;\n titleId: string;\n descriptionId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal: boolean;\n};\n\nconst [DialogProvider, useDialogContext] = createDialogContext<DialogContextValue>(DIALOG_NAME);\n\ninterface DialogProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\n}\n\nconst Dialog: React.FC<DialogProps> = (props: ScopedProps<DialogProps>) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true,\n } = props;\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const contentRef = React.useRef<DialogContentElement>(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME,\n });\n\n return (\n <DialogProvider\n scope={__scopeDialog}\n triggerRef={triggerRef}\n contentRef={contentRef}\n contentId={useId()}\n titleId={useId()}\n descriptionId={useId()}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n modal={modal}\n >\n {children}\n </DialogProvider>\n );\n};\n\nDialog.displayName = DIALOG_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'DialogTrigger';\n\ntype DialogTriggerElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface DialogTriggerProps extends PrimitiveButtonProps {}\n\nconst DialogTrigger = React.forwardRef<DialogTriggerElement, DialogTriggerProps>(\n (props: ScopedProps<DialogTriggerProps>, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return (\n <Primitive.button\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n }\n);\n\nDialogTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'DialogPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createDialogContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef<typeof PortalPrimitive>;\ninterface DialogPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animationLine truncated
"mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,eAAe,0BAA0B;AAClD,SAAS,aAAa;AACtB,SAAS,4BAA4B;AACrC,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AAC3B,SAAS,UAAU,uBAAuB;AAC1C,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AAC1B,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB;AAC7B,SA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BA,IAAM,oBAA0B;AAAA,EAC9B,CAAC,OAA4C,iBAAiB;AAC5D,UAAM,EAAE,eAAe,WAAW,iBAAiB,kBAAkB,GAAG,aAAa,IAAI;AACzF,UAAM,UAAU,iBAAiB,cAAc,aAAa;AAC5D,UAAM,aAAmB,aAAuB,IAAI;AACpD,UAAM,eAAe,gBAAgB,cAAc,UAAU;AAI7D,mBAAe;AAEf,WACE,iCACE;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,SAAO;AAAA,UACP,MAAI;AAAA,UACJ,SAAS;AAAA,UACT,kBAAkB;AAAA,UAClB,oBAAoB;AAAA,UAEpB;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,IAAI,QAAQ;AAAA,cACZ,oBAAkB,QAAQ;AAAA,cAC1B,mBAAiB,QAAQ;AAAA,cACzB,cAAY,SAAS,QAAQ,IAAI;AAAA,cAChC,GAAG;AAAA,cACJ,KAAK;AAAA,cACL,WAAW,MAAM,QAAQ,aAAa,KAAK;AAAA;AAAA,UAC7C;AAAA;AAAA,MACF;AAAA,MALine truncated
"names": []
}
@@ -0,0 +1,923 @@
export default `flf2aQ 9 6 21 0 3 0 64 0
Font Author: half Cosmike, half Darth ObiKy
FIGFont created with: http://patorjk.com/figfont-editor
QQQ@
QQQ@
QQQ@
QQQ@
QQQ@
QQQ@
QQQ@
QQQ@
QQQ@@
.:@
;;;@
'[[@
$$@
""@
MM@
@
@
@@
Q:: ::Q@
Q"; ;"Q@
@
@
@
@
@
@
@@
@
:: :: @
__,;'_,;'_@
''[[''[[''@
,$" ,$" @
o88oo88oo @
,M" ,M" @
@
@@
@
.: @
,;;;. @
[[,,_\` @
\`"""Yo@
Yo_,d"@
'M' @
@
@@
@
.. .:\`@
; ; ,;\` @
^^ ,[\` @
cP ,, @
,8" 8 8@
,dP "" @
@
@@
@
:\\ @
.;;' @
([__ @
c$"" @
"Yo,oP@
"M,@
@
@@
::@
,'@
@
@
@
@
@
@
@@
.:@
,;' @
n[ @
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y8o,_ __,oo @
\`"YUMMMMMMUY" @
@
@
@@
:::. @
;;\`;; @
,[[ '[[, @
c$$$cc$$$c @
888 888 @
YMM \\"\\"\`@
@
@
@@
:::::::. @
;;;'';;' @
[[[__[[\\.@
$$""""Y$$@
_88o,,od8P@
""YUMMMP" @
@
@
@@
.,~::::: @
,;;;'\`\`\`\`' @
[[[ @
$$$ @
\`88bo,__,o, @
"YUMMMMMP"@
@
@
@@
:::::::-. @
;;, \`';,@
\`[[ [[@
$$, $$@
888_,o8P'@
MMMMP"\` @
@
@
@@
.,:::::: @
;;;;'''' @
[[cccc @
$$"""" @
888oo,__ @
""""YUMMM@
@
@
@@
.-:::::'@
;;;'''' @
[[[,,== @
\`$$$"\`\` @
888 @
"MM, @
@
@
@@
.,-:::::/ @
,;;-'\`\`\`\`' @
[[[ [[[[[[/@
"$$c. "$$ @
\`Y8bo,,,o88o@
\`'YMUP"YMM@
@
@
@@
:: .: @
,;; ;;, @
,[[[,,,[[[ @
"$$$"""$$$ @
888 "88o@
MMM YMM@
@
@
@@
:::@
;;;@
[[[@
$$$@
888@
MMM@
@
@
@@
....::::::@
;;;;;;;;;\`\`\`\`@
''\` \`[[. @
,,, \`$$ @
888boood88 @
"MMMMMMMM" @
@
@
@@
::: . @
;;; .;;,.@
[[[[[/' @
_$$$$, @
"888"88o, @
MMM "MMP"@
@
@
@@
::: @
;;; @
[[[ @
$$' @
o88oo,.__@
""""YUMMM@
@
@
@@
. : @
;;,. ;;; @
[[[[, ,[[[[, @
$$$$$$$$"$$$ @
888 Y88" 888o@
MMM M' "MMM@
@
@
@@
:::. :::.@
\`;;;;, \`;;;@
[[[[[. '[[@
$$$ "Y$c$$@
888 Y88@
MMM YM@
@
@
@@
... @
.;;;;;;;. @
,[[ \\[[,@
$$$, $$$@
"888,_ _,88P@
"YMMMMMP" @
@
@
@@
::::::::::. @
\`;;;\`\`\`.;;;@
\`]]nnn]]' @
$$$"" @
888o @
YMMMb @
@
@
@@
.::::::. @
,;;'\`\`\`';;, @
[[[ [[[\\@
"$$c cc$$$"@
"*8bo,Y88b,@
"*YP" "M"@
@
@
@@
:::::::.. @
;;;;\`\`;;;; @
[[[,/[[[' @
$$$$$$c @
888b "88bo,@
MMMM "W" @
@
@
@@
.::::::. @
;;;\` \` @
'[==/[[[[,@
''' $@
88b dP@
"YMmMY" @
@
@
@@
::::::::::::@
;;;;;;;;''''@
[[ @
$$ @
88, @
MMM @
@
@
@@
... :::@
;; ;;;@
[[' [[[@
$$ $$$@
88 .d888@
"YmmMMMM""@
@
@
@@
::: .::.@
';;, ,;;;' @
\\[[ .[[/ @
Y$c.$$" @
Y88P @
MP @
@
@
@@
.:: . .:::@
';;, ;; ;;;' @
'[[, [[, [[' @
Y$c$$$c$P @
"88"888 @
"M "M" @
@
@
@@
.,:: .:@
\`;;;, .,;; @
'[[,,[[' @
Y$$$P @
oP"\`\`"Yo, @
,m" "Mm,@
@
@
@@
.-:. ::-.@
';;. ;;;;'@
'[[,[[[' @
c$$" @
,8P"\` @
mM" @
@
@
@@
:::::::::@
'\`\`\`\`\`;;;@
.n[['@
,$$P" @
,888bo,_ @
\`""*UMM @
@
@
@@
::::@
;;' @
[[ @
$$ @
88, @
"YMM@
@
@
@@
\`:\\ @
\`;\\ @
'[n @
"$c @
"8o @
"Mm@
@
@
@@
::::@
';;@
[[@
$$@
,88@
MMP"@
@
@
@@
.:. @
;' \`;@
@
@
@
@
@
@
@@
@
@
@
@
@
@
mmmmmmm@
@
@@
\`:. @
\`;,@
@
@
@
@
@
@
@@
@
@
,ccc, @
$$$cc$$$ @
888 888@
"YUM" MP@
@
@
@@
:: @
;;; @
[[[[ccc, @
$$""""Y$$@
88o,,od8P@
"YUMMMP" @
@
@
@@
@
@
,cc[[[cc. @
$$$ @
88b ,o,@
"YUMMMMP"@
@
@
@@
:: @
;;;@
,c[[[cc,@
$$""""Y$$@
88o,,od8P@
"YUMMMP" @
@
@
@@
@
@
,cc[[[cc. @
$$$___--' @
88b ,o,@
"YUMMMMP"@
@
@
@@
.::::.@
;; \`'@
=[[,,==@
\`$$$"\`\`@
888 @
"MM, @
@
@
@@
@
@
,ccc, @
$$$cc$$$ @
888 888@
"YUM" MP@
MMM@
,c. ###@
\\M###MMU @@
:: @
;;; @
[[[[cc,,. @
$$$"""$$$ @
888 "88o@
MMM YMM@
@
@
@@
@
;;,@
@
$$$@
888@
MMM@
@
@
@@
@
;;,@
@
\`[.@
\`[[@
\`$$@
,,, /88@
888boood88@
"MMMMMMMM"@@
::: @
;;; .;;, @
[[[[[/' @
_$$$$, @
"888"88o, @
MMM "MMP"@
@
@
@@
\`::. @
;;; @
[[[ @
$$' @
\\8o @
MM;@
@
@
@@
@
@
[ccc, ,cccc, @
$$$$$$$$"$$$ @
888 Y88" 888o@
MMM M' "MMM@
@
@
@@
@
@
[ccccc, @
$$$$"$$$ @
888 Y88o@
MMM "MMM@
@
@
@@
@
@
,ccc, @
$$$"c$$$@
888 88@
"YUMMP @
@
@
@@
@
@
@
,$$$$$. @
88""""88@
MMoooMM'@
MMMP @
### @
"##b @@
@
@
,ccc, @
$$$cc$$$ @
888 888 @
"YUM" MP @
MMM @
### ,c.@
\\M###MMP @@
@
@
=,,[[==@
\`$$$"\`\`@
888 @
"MM, @
@
@
@@
@
@
,cc[[[cc. @
$$$____ @
. 88,@
"YUMMMMP"@
@
@
@@
\`:: @
;; @
=[[[[[[.@
$$ @
88, @
MMM @
@
@
@@
@
@
,c , @
$$' $$$ @
888 888@
"YUM" MP@
@
@
@@
@
@
\\[[ .[[/@
Y$c $$" @
Y88P @
MP @
@
@
@@
@
@
'[[, [[, [['@
Y$ $$$ $P @
"88"888 @
"M "M" @
@
@
@@
@
@
'[[ ,c' @
Y$$$P @
oP\`\`Yo, @
,m" "Mm,@
@
@
@@
@
@
@
\`$$$ $P@
88b 88 @
'MooMM @
MM @
##" @
m##" @@
@
@
.nnnnn[['@
,$$P" @
,888bo,_ @
\`""*UMM @
@
@
@@
.:@
;'@
[@
$"@
8 @
"M@
@
@
@@
\`:@
,;@
[[@
$$@
88@
MM@
##@
@
@@
:.@
';@
[ @
"$@
8@
M"@
@
@
@@
@
@
':.:':.@
\`;' \`;@
@
@
@
@
@@
:: ::. :: @
;;\`;; @
,[[ '[[, @
c$$$cc$$$c @
888 888,@
YMM ""\` @
@
@
@@
:: ... :: @
.;;;;;;;. @
,[[ \\[[,@
$$$, $$$@
"888,_ _,88P@
"YMMMMMP" @
@
@
@@
..:: :: ::@
;; ;;;@
[[' [[[@
$$ $$$@
88 .d888@
"YmmMMMM""@
@
@
@@
@
;; ;; @
,ccc, @
$$$cc$$$ @
888 888@
"YUM" MP@
@
@
@@
@
;; ;; @
,ccc, @
$$$"c$$$@
888 88@
"YUMMP @
@
@
@@
@
;; ;; @
,c , @
$$' $$$ @
888 888@
"YUM" MP@
@
@
@@
:::::::. @
;;;'';;' @
[[[__[[\\.@
$$""""Y$$@
88o,,od8P@
MM\`YMMP" @
@
@
@@
`
@@ -0,0 +1,232 @@
flf2a$ 2 2 8 -1 27 0 0 0
Author : David Dahlberg <D-Mail@gmx.net>
Markus Gebhard markus@jave.de
Date : 2001/9/26 19:57:04
Version: 0.2
-------------------------------------------------
This font is not pure ASCII!
It is intended to work with the characters available
for adding comments to german bank statements.
Those characters are: A..Z 0..9 $%&/`*�+-,.?^
Font designed by:
David Dahlberg <D-Mail@gmx.net>
Converted to FLF by:
Markus Gebhard <markus@jave.de>
-------------------------------------------------
This font has been created using Jave's FIGlet font export assistant
(that will be included in Jave 2.0).
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.
-------------------------------------------------
Converted this file from a text encoding of ISO 8859-1 to UTF-8
Done by Patrick Gillespie (patorjk) on 2025/08/31
$ #
$ ##
!#
##
"#
##
##
##
$#
##
%#
##
&#
##
'#
##
(#
##
)#
##
*#
##
+#
##
#
, ##
-#
##
#
. ##
/#
##
0#
##
1#
##
2#
##
3#
##
4#
##
5#
##
6#
##
7#
##
8#
##
9#
##
:#
##
;#
##
<#
##
=#
##
>#
##
?#
##
@#
##
/1 #
/´/ ##
/´1 #
/.I ##
/` #
L- ##
/`. #
/.-´ ##
/.´ #
/.. ##
/´´ #
/´ ##
/´ #
/.T ##
/ / #
/´/ ##
/ #
/ ##
´´/ #
L/ ##
/.´ #
/´. ##
/ #
/. ##
/1/1 #
/ 1 ##
/1 / #
/ 1/ ##
/´/ #
/./ ##
/´/ #
/´´ ##
/´/ #
/.X ##
/´/ #
/`. ##
/´´ #
../ ##
´/´ #
/ ##
/ / #
L/ ##
/ / #
1/ ##
/ / #
L/L/ ##
1/ #
/1 ##
L/ #
/ ##
´´/ #
/.. ##
[#
##
\#
##
]#
##
^#
##
_#
##
`#
##
/1 #
/´/ ##
/´1 #
/.I ##
/` #
L- ##
/`. #
/.-´ ##
/.´ #
/.. ##
/´´ #
/´ ##
/´ #
/.T ##
/ / #
/´/ ##
/ #
/ ##
´´/ #
L/ ##
/.´ #
/´. ##
/ #
/. ##
/1/1 #
/ 1 ##
/1 / #
/ 1/ ##
/´/ #
/./ ##
/´/ #
/´´ ##
/´/ #
/.X ##
/´/ #
/`. ##
/´´ #
../ ##
´/´ #
/ ##
/ / #
L/ ##
/ / #
1/ ##
/ / #
L/L/ ##
1/ #
/1 ##
L/ #
/ ##
´´/ #
/.. ##
{#
##
|#
##
}#
##
~#
##
/1 #
/´/ ##
/´/ #
/./ ##
/ / #
L/ ##
/1 #
/´/ ##
/´/ #
/./ ##
/ / #
L/ ##
ß#
##
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_2D","2":"C"},C:{"1":"_LN _2E","2":"_KJ _bC _L"},D:{"1":"_aE","2":"_aD yB","132":"zB _cG"},E:{"1":"_PB","2":"_UB"},F:{"1":"_BF","2":"_RS","132":"_rB _9D"},G:{"1":"_s","2":"_3"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_U","2":"J"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:6,C:"ES6 classes",D:true};