docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run

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,24 @@
import { GetConnInfo } from "../../helper/conninfo/types.js";
//#region src/adapter/cloudflare-pages/conninfo.d.ts
/**
* Get connection information from Cloudflare Pages
* @param c - Context
* @returns Connection information including remote address
* @example
* ```ts
* import { Hono } from 'hono'
* import { handle, getConnInfo } from 'hono/cloudflare-pages'
*
* const app = new Hono()
*
* app.get('/', (c) => {
* const info = getConnInfo(c)
* return c.text(`Your IP: ${info.remote.address}`)
* })
*
* export const onRequest = handle(app)
* ```
* @deprecated `hono/cloudflare-pages` will be removed in v5. Cloudflare recommends Workers with static assets; use `hono` on Workers instead.
*/
export declare const getConnInfo: GetConnInfo;
//#endregion
@@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
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,43 @@
{
"name": "negotiator",
"description": "HTTP content negotiation",
"version": "1.0.0",
"contributors": [
"Douglas Christopher Wilson <doug@somethingdoug.com>",
"Federico Romero <federico.romero@outboxlabs.com>",
"Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)"
],
"license": "MIT",
"keywords": [
"http",
"content negotiation",
"accept",
"accept-language",
"accept-encoding",
"accept-charset"
],
"repository": "jshttp/negotiator",
"devDependencies": {
"eslint": "7.32.0",
"eslint-plugin-markdown": "2.2.1",
"mocha": "9.1.3",
"nyc": "15.1.0"
},
"files": [
"lib/",
"HISTORY.md",
"LICENSE",
"index.js",
"README.md"
],
"engines": {
"node": ">= 0.6"
},
"scripts": {
"lint": "eslint .",
"test": "mocha --reporter spec --check-leaks --bail test/",
"test:debug": "mocha --reporter spec --check-leaks --inspect --inspect-brk test/",
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test"
}
}
@@ -0,0 +1,84 @@
import type {
AnyRouter,
Constrain,
InferFrom,
InferMaskFrom,
InferMaskTo,
InferSelected,
InferShouldThrow,
InferStrict,
InferTo,
RegisteredRouter,
} from '@tanstack/router-core'
import type { LinkComponentProps } from './link'
import type { UseParamsOptions } from './useParams'
import type { UseSearchOptions } from './useSearch'
export type ValidateLinkOptions<
TRouter extends AnyRouter = RegisteredRouter,
TOptions = unknown,
TDefaultFrom extends string = string,
TComp = 'a',
> = Constrain<
TOptions,
LinkComponentProps<
TComp,
TRouter,
InferFrom<TOptions, TDefaultFrom>,
InferTo<TOptions>,
InferMaskFrom<TOptions>,
InferMaskTo<TOptions>
>
>
/**
* @private
*/
export type InferStructuralSharing<TOptions> = TOptions extends {
structuralSharing: infer TStructuralSharing
}
? TStructuralSharing
: unknown
export type ValidateUseSearchOptions<
TOptions,
TRouter extends AnyRouter = RegisteredRouter,
> = Constrain<
TOptions,
UseSearchOptions<
TRouter,
InferFrom<TOptions>,
InferStrict<TOptions>,
InferShouldThrow<TOptions>,
InferSelected<TOptions>,
InferStructuralSharing<TOptions>
>
>
export type ValidateUseParamsOptions<
TOptions,
TRouter extends AnyRouter = RegisteredRouter,
> = Constrain<
TOptions,
UseParamsOptions<
TRouter,
InferFrom<TOptions>,
InferStrict<TOptions>,
InferShouldThrow<TOptions>,
InferSelected<TOptions>,
InferSelected<TOptions>
>
>
export type ValidateLinkOptionsArray<
TRouter extends AnyRouter = RegisteredRouter,
TOptions extends ReadonlyArray<any> = ReadonlyArray<unknown>,
TDefaultFrom extends string = string,
TComp = 'a',
> = {
[K in keyof TOptions]: ValidateLinkOptions<
TRouter,
TOptions[K],
TDefaultFrom,
TComp
>
}
@@ -0,0 +1 @@
module.exports={C:{_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 3.5 3.6"},D:{"151":43.47761,"152":4.34954,"153":36.9533,"154":2.17477,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 155 156 157"},F:{_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 131 132 133 134 135 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154"},E:{_:"4 5 6 7 8 9 10 11 12 13 14 15 27 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 14.1 15.1 15.2-15.3 15.4 15.5 15.6 16.0 16.1 16.2 16.3 16.4 16.5 16.6 17.0 17.1 17.2 17.3 17.4 17.5 17.6 18.0 18.1 18.2 18.3 18.4 18.5-18.7 26.0 26.1 26.2 26.3 26.4 26.5 26.6 27.1 27.2 TP"},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00022,"5.0-5.1":0.00022,"6.0-6.1":0,"7.0-7.1":0.00043,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00217,"11.0-11.2":0.00022,"11.3-11.4":0.00043,"12.0-12.1":0,"12.2-12.5":0.00565,"13.0-13.1":0,"13.2":0.00109,"13.3":0,"13.4-13.7":0.00022,"14.0-14.4":0.00087,"14.5-14.8":0.0013,"15.0-15.1":0.0013,"15.2-15.3":0.00087,"15.4":0.00109,"15.5":0.0013,"15.6-15.8":0.02826,"16.0":0.00217,"16.1":0.00391,"16.2":0.00217,"16.3":0.00478,"16.4":0.00109,"16.5":0.00174,"16.6-16.7":0.03935,"17.0":0.00152,"17.1":0.00217,"17.2":0.00217,"17.3":0.00326,"17.4":0.00457,"17.5":0.00891,"17.6-17.7":0.02304,"18.0":0.00478,"18.1":0.00957,"18.2":0.01304,"18.3":0.02261,"18.4":0.01413,"18.5-18.7":0.29197,"26.0":0.01413,"26.1":0.01435,"26.2":0.03739,"26.3":0.04044,"26.4":0.02957,"26.5":0.19805,"26.6":1.22201,"27.0":0.0937,"27.1":0,"27.2":0.00239},P:{_:"4 20 21 22 23 24 25 26 27 28 29 30 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0"},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},K:{"0":0,_:"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":10.87077},R:{_:"0"},M:{_:"0"},Q:{_:"14.9"},O:{_:"0"},H:{all:0}};
@@ -0,0 +1,41 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// packages/react/use-layout-effect/src/index.ts
var index_exports = {};
__export(index_exports, {
useLayoutEffect: () => useLayoutEffect2
});
module.exports = __toCommonJS(index_exports);
// packages/react/use-layout-effect/src/use-layout-effect.tsx
var React = __toESM(require("react"));
var useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {
};
//# sourceMappingURL=index.js.map
@@ -0,0 +1,342 @@
import { decodeBase64, encodeBase64 } from "../../utils/encode.js";
import { pipeline } from "node:stream/promises";
//#region src/adapter/aws-lambda/handler.ts
function sanitizeHeaderValue(value) {
if (!/[^\x00-\x7F]/.test(value)) return value;
return encodeURIComponent(value);
}
const getRequestContext = (event) => {
return event.requestContext;
};
async function* readWebStream(reader) {
let readResult = await reader.read();
while (!readResult.done) {
yield readResult.value;
readResult = await reader.read();
}
}
const streamToNodeStream = (reader, writer) => pipeline(readWebStream(reader), writer);
/**
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
const streamHandle = (app) => {
return awslambda.streamifyResponse(async (event, responseStream, context) => {
const processor = getProcessor(event);
try {
const req = processor.createRequest(event);
const requestContext = getRequestContext(event);
const res = await app.fetch(req, {
event,
requestContext,
context
});
const headers = {};
const cookies = [];
res.headers.forEach((value, name) => {
if (name === "set-cookie") cookies.push(value);
else headers[name] = value;
});
const httpResponseMetadata = {
statusCode: res.status,
headers,
cookies
};
responseStream = awslambda.HttpResponseStream.from(responseStream, httpResponseMetadata);
if (res.body) await streamToNodeStream(res.body.getReader(), responseStream);
else responseStream.write("");
} catch (error) {
console.error("Error processing request:", error);
responseStream.write("Internal Server Error");
} finally {
responseStream.end();
}
});
};
/**
* Converts a Hono application to an AWS Lambda handler.
*
* Accepts events from API Gateway (v1 and v2), Application Load Balancer (ALB),
* and Lambda Function URLs.
*
* @param app - The Hono application instance
* @param options - Optional configuration
* @param options.isContentTypeBinary - A function to determine if the content type is binary.
* If not provided, the default function will be used.
* @returns Lambda handler function
*
* @example
* ```js
* import { Hono } from 'hono'
* import { handle } from 'hono/aws-lambda'
*
* const app = new Hono()
*
* app.get('/', (c) => c.text('Hello from Lambda'))
* app.get('/json', (c) => c.json({ message: 'Hello JSON' }))
*
* export const handler = handle(app)
* ```
*
* @example
* ```js
* // With custom binary content type detection
* import { handle, defaultIsContentTypeBinary } from 'hono/aws-lambda'
* export const handler = handle(app, {
* isContentTypeBinary: (contentType) => {
* if (defaultIsContentTypeBinary(contentType)) {
* // default logic same as prior to v4.8.4
* return true
* }
* return contentType.startsWith('image/') || contentType === 'application/pdf'
* }
* })
* ```
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
const handle = (app, { isContentTypeBinary } = { isContentTypeBinary: void 0 }) => {
return async (event, lambdaContext) => {
const processor = getProcessor(event);
let req, requestContext;
try {
req = processor.createRequest(event);
requestContext = getRequestContext(event);
} catch (error) {
console.error("Error processing request:", error);
const errorResponse = error instanceof TypeError ? new Response("Invalid request", { status: 400 }) : new Response("Internal Server Error", { status: 500 });
return processor.createResult(event, errorResponse, { isContentTypeBinary });
}
const res = await app.fetch(req, {
event,
requestContext,
lambdaContext
});
return processor.createResult(event, res, { isContentTypeBinary });
};
};
/**
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
var EventProcessor = class {
getHeaderValue(headers, key) {
return headers ? Array.isArray(headers[key]) ? headers[key][0] : headers[key] : void 0;
}
getDomainName(event) {
if (event.requestContext && "domainName" in event.requestContext) return event.requestContext.domainName;
const hostFromHeaders = this.getHeaderValue(event.headers, "host");
if (hostFromHeaders) return hostFromHeaders;
const multiValueHeaders = "multiValueHeaders" in event ? event.multiValueHeaders : {};
return this.getHeaderValue(multiValueHeaders, "host");
}
createRequest(event) {
const queryString = this.getQueryString(event);
const urlPath = `https://${this.getDomainName(event)}${this.getPath(event)}`;
const url = queryString ? `${urlPath}?${queryString}` : urlPath;
const headers = this.getHeaders(event);
const requestInit = {
headers,
method: this.getMethod(event)
};
if (event.body) {
const body = event.isBase64Encoded ? decodeBase64(event.body) : new TextEncoder().encode(event.body);
requestInit.body = body;
headers.set("content-length", body.length.toString());
}
return new Request(url, requestInit);
}
async createResult(event, res, options) {
const contentType = res.headers.get("content-type");
const isContentTypeBinary = options.isContentTypeBinary ?? defaultIsContentTypeBinary;
let isBase64Encoded = contentType && isContentTypeBinary(contentType) ? true : false;
if (!isBase64Encoded) {
const contentEncoding = res.headers.get("content-encoding");
isBase64Encoded = isContentEncodingBinary(contentEncoding);
}
const result = {
body: isBase64Encoded ? encodeBase64(await res.arrayBuffer()) : await res.text(),
statusCode: res.status,
isBase64Encoded,
..."multiValueHeaders" in event && event.multiValueHeaders ? { multiValueHeaders: {} } : { headers: {} }
};
this.setCookies(event, res, result);
if (result.multiValueHeaders) res.headers.forEach((value, key) => {
result.multiValueHeaders[key] = [value];
});
else res.headers.forEach((value, key) => {
result.headers[key] = value;
});
return result;
}
setCookies(_event, res, result) {
if (res.headers.has("set-cookie")) {
const cookies = res.headers.getSetCookie ? res.headers.getSetCookie() : Array.from(res.headers.entries()).filter(([k]) => k === "set-cookie").map(([, v]) => v);
if (Array.isArray(cookies)) {
this.setCookiesToResult(result, cookies);
res.headers.delete("set-cookie");
}
}
}
};
/**
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
var EventV2Processor = class extends EventProcessor {
getPath(event) {
return event.rawPath;
}
getMethod(event) {
return event.requestContext.http.method;
}
getQueryString(event) {
return event.rawQueryString;
}
getCookies(event, headers) {
if (Array.isArray(event.cookies)) headers.set("Cookie", event.cookies.join("; "));
}
setCookiesToResult(result, cookies) {
result.cookies = cookies;
}
getHeaders(event) {
const headers = new Headers();
this.getCookies(event, headers);
if (event.headers) {
for (const [k, v] of Object.entries(event.headers)) if (v) headers.set(k, v);
}
return headers;
}
};
const v2Processor = new EventV2Processor();
/**
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
var EventV1Processor = class extends EventProcessor {
getPath(event) {
return event.path;
}
getMethod(event) {
return event.httpMethod;
}
getQueryString(event) {
if (event.multiValueQueryStringParameters) return Object.entries(event.multiValueQueryStringParameters || {}).filter(([, value]) => value).map(([key, values]) => values.map((value) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`).join("&")).join("&");
else return Object.entries(event.queryStringParameters || {}).filter(([, value]) => value !== void 0).map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value || "")}`).join("&");
}
getCookies(_event, _headers) {}
getHeaders(event) {
const headers = new Headers();
this.getCookies(event, headers);
if (event.multiValueHeaders) {
for (const [k, values] of Object.entries(event.multiValueHeaders)) if (values) values.forEach((v) => headers.append(k, sanitizeHeaderValue(v)));
}
if (event.headers) {
for (const [k, v] of Object.entries(event.headers)) if (v && !headers.has(k)) headers.set(k, sanitizeHeaderValue(v));
}
return headers;
}
setCookiesToResult(result, cookies) {
result.multiValueHeaders = { "set-cookie": cookies };
}
};
const v1Processor = new EventV1Processor();
/**
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
var ALBProcessor = class extends EventProcessor {
getHeaders(event) {
const headers = new Headers();
if (event.multiValueHeaders) {
for (const [key, values] of Object.entries(event.multiValueHeaders)) if (values && Array.isArray(values)) {
const sanitizedValue = sanitizeHeaderValue(values.join("; "));
headers.set(key, sanitizedValue);
}
} else for (const [key, value] of Object.entries(event.headers ?? {})) if (value) headers.set(key, sanitizeHeaderValue(value));
return headers;
}
getPath(event) {
return event.path;
}
getMethod(event) {
return event.httpMethod;
}
getQueryString(event) {
if (event.multiValueQueryStringParameters) return Object.entries(event.multiValueQueryStringParameters || {}).filter(([, value]) => value).map(([key, value]) => `${key}=${value.join(`&${key}=`)}`).join("&");
else return Object.entries(event.queryStringParameters || {}).filter(([, value]) => value !== void 0).map(([key, value]) => `${key}=${value}`).join("&");
}
getCookies(event, headers) {
let cookie;
if (event.multiValueHeaders) cookie = event.multiValueHeaders["cookie"]?.join("; ");
else cookie = event.headers ? event.headers["cookie"] : void 0;
if (cookie) headers.append("Cookie", cookie);
}
setCookiesToResult(result, cookies) {
if (result.multiValueHeaders) result.multiValueHeaders["set-cookie"] = cookies;
else result.headers["set-cookie"] = cookies[0];
}
};
const albProcessor = new ALBProcessor();
/**
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
var LatticeV2Processor = class extends EventProcessor {
getPath(event) {
return event.path;
}
getMethod(event) {
return event.method;
}
getQueryString() {
return "";
}
getHeaders(event) {
const headers = new Headers();
if (event.headers) {
for (const [k, values] of Object.entries(event.headers)) if (values) values.forEach((v) => headers.append(k, sanitizeHeaderValue(v)));
}
return headers;
}
getCookies() {}
setCookiesToResult(result, cookies) {
result.headers = {
...result.headers,
"set-cookie": cookies
};
}
};
const latticeV2Processor = new LatticeV2Processor();
/**
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
const getProcessor = (event) => {
if (isProxyEventALB(event)) return albProcessor;
if (isProxyEventV2(event)) return v2Processor;
if (isLatticeEventV2(event)) return latticeV2Processor;
return v1Processor;
};
const isProxyEventALB = (event) => {
if (event.requestContext) return Object.hasOwn(event.requestContext, "elb");
return false;
};
const isProxyEventV2 = (event) => {
return Object.hasOwn(event, "rawPath") && Object.hasOwn(event.requestContext ?? {}, "http");
};
const isLatticeEventV2 = (event) => {
if (event.requestContext) return Object.hasOwn(event.requestContext, "serviceArn");
return false;
};
/**
* Check if the given content type is binary.
* This is a default function and may be overwritten by the user via `isContentTypeBinary` option in handler().
* @param contentType The content type to check.
* @returns True if the content type is binary, false otherwise.
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
const defaultIsContentTypeBinary = (contentType) => {
if (/^application\/vnd\.(?:apple\.installer|mozilla\.xul)\+xml\s*(?:;|$)/i.test(contentType)) return true;
return !/^text\/(?:plain|html|css|javascript|csv)|(?:\/|\+)(?:json|xml)\s*(?:;|$)/i.test(contentType);
};
/**
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
const isContentEncodingBinary = (contentEncoding) => {
return !!contentEncoding && !/^identity$/i.test(contentEncoding);
};
//#endregion
export { ALBProcessor, EventProcessor, EventV1Processor, EventV2Processor, LatticeV2Processor, defaultIsContentTypeBinary, getProcessor, handle, isContentEncodingBinary, streamHandle };
@@ -0,0 +1 @@
{"version":3,"file":"create.mjs","sources":["../../../../../src/render/components/m/create.ts"],"sourcesContent":["import { createMotionComponent, MotionComponentOptions } from \"../../../motion\"\nimport { DOMMotionComponents } from \"../../dom/types\"\n\nexport function createMinimalMotionComponent<\n Props,\n TagName extends keyof DOMMotionComponents | string = \"div\"\n>(\n Component: TagName | string | React.ComponentType<Props>,\n options?: MotionComponentOptions\n) {\n return createMotionComponent(Component, options)\n}\n"],"names":[],"mappings":";;AAGM,SAAU,4BAA4B,CAIxC,SAAwD,EACxD,OAAgC,EAAA;AAEhC,IAAA,OAAO,qBAAqB,CAAC,SAAS,EAAE,OAAO,CAAC;AACpD;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"panel-left-dashed.js","sources":["../../../src/icons/panel-left-dashed.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PanelLeftDashed\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik05IDE0djEiIC8+CiAgPHBhdGggZD0iTTkgMTl2MiIgLz4KICA8cGF0aCBkPSJNOSAzdjIiIC8+CiAgPHBhdGggZD0iTTkgOXYxIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/panel-left-dashed\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 PanelLeftDashed = createLucideIcon('PanelLeftDashed', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M9 14v1', key: 'askpd8' }],\n ['path', { d: 'M9 19v2', key: '16tejx' }],\n ['path', { d: 'M9 3v2', key: '1noubl' }],\n ['path', { d: 'M9 9v1', key: '19ebxg' }],\n]);\n\nexport default PanelLeftDashed;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACzC,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,8 @@
module.exports = {
fs: require('./fs'),
dns: require('./dns'),
zlib: require('./zlib'),
crypto: require('./crypto'),
readline: require('./readline'),
child_process: require('./child_process')
}
@@ -0,0 +1,20 @@
import { Observer, Subscription } from './types.js';
export declare class Store<T> {
private atom;
constructor(getValue: (prev?: NoInfer<T>) => T);
constructor(initialValue: T);
setState(updater: (prev: T) => T): void;
get state(): T;
get(): T;
subscribe(observerOrFn: Observer<T> | ((value: T) => void)): Subscription;
}
export declare class ReadonlyStore<T> implements Omit<Store<T>, 'setState'> {
private atom;
constructor(getValue: (prev?: NoInfer<T>) => T);
constructor(initialValue: T);
get state(): T;
get(): T;
subscribe(observerOrFn: Observer<T> | ((value: T) => void)): Subscription;
}
export declare function createStore<T>(getValue: (prev?: NoInfer<T>) => T): ReadonlyStore<T>;
export declare function createStore<T>(initialValue: T): Store<T>;
@@ -0,0 +1 @@
module.exports={C:{"72":0.0032,"109":0.0032,"112":0.00961,"115":0.03202,"120":0.05764,"121":0.12488,"123":0.00961,"124":0.0064,"127":0.00961,"130":0.0032,"134":0.0032,"135":0.0032,"136":0.0032,"137":0.0032,"139":0.0032,"140":0.02882,"141":0.0032,"142":0.0064,"143":0.0064,"144":0.0032,"146":0.00961,"147":0.0032,"148":0.0032,"149":0.0032,"150":0.01601,"151":0.02882,"152":0.04483,"153":0.02562,"154":0.21774,"155":0.41306,"156":0.45789,"157":0.01601,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 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 110 111 113 114 116 117 118 119 122 125 126 128 129 131 132 133 138 145 158 159 160 3.5 3.6"},D:{"49":0.0032,"50":0.0032,"51":0.0032,"63":0.0032,"64":0.01601,"65":0.0064,"68":0.0064,"69":0.01281,"70":0.02241,"71":0.0032,"72":0.0032,"73":0.0032,"74":0.0064,"75":0.0032,"76":0.00961,"78":0.0032,"79":0.01601,"80":0.0064,"81":0.0032,"86":0.0064,"87":0.0032,"88":0.0064,"90":0.02241,"91":0.0064,"92":0.0032,"93":0.02241,"94":0.0032,"95":0.0064,"96":0.0032,"98":0.01281,"99":0.0032,"101":0.07044,"102":0.0032,"103":0.03842,"104":0.06724,"105":0.01281,"106":0.02562,"107":0.01281,"108":0.01601,"109":0.18572,"110":0.01921,"111":0.02882,"112":0.01601,"113":0.0064,"114":0.01281,"116":0.04803,"117":0.01601,"118":0.28498,"119":0.13769,"120":0.1601,"121":0.01601,"122":0.01921,"123":0.00961,"124":0.03202,"125":0.01921,"126":0.00961,"127":0.01281,"128":0.01281,"129":0.0032,"130":0.02241,"131":0.08005,"132":0.0064,"133":0.09286,"134":0.07685,"135":0.08005,"136":0.08325,"137":0.09286,"138":0.1601,"139":0.08005,"140":0.08325,"141":0.08325,"142":0.27537,"143":0.03842,"144":0.04163,"145":0.03842,"146":0.10246,"147":0.06084,"148":0.13769,"149":0.08966,"150":0.317,"151":1.77711,"152":5.77321,"153":4.58526,"154":0.88375,"155":0.01601,"156":0.0032,_:"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 52 53 54 55 56 57 58 59 60 61 62 66 67 77 83 84 85 89 97 100 115 157"},F:{"42":0.0032,"62":0.0032,"64":0.0032,"79":0.0032,"90":0.0032,"92":0.0032,"95":0.02241,"100":0.01281,"101":0.08005,"102":0.0064,"105":0.0032,"106":0.0064,"113":0.0032,"114":0.0032,"116":0.0032,"120":0.0032,"121":0.0032,"131":0.0032,"132":0.0032,"133":0.01921,"134":0.1633,"135":0.86134,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 63 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 84 85 86 87 88 89 91 93 94 96 97 98 99 103 104 107 108 109 110 111 112 115 117 118 119 122 123 124 125 126 127 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"14":0.0032,"15":0.0032,"16":0.0064,"17":0.0032,"18":0.02882,"89":0.0064,"90":0.00961,"91":0.01281,"92":0.07685,"100":0.01601,"109":0.01601,"110":0.0032,"111":0.0032,"112":0.0032,"114":0.0064,"119":0.05764,"120":0.06084,"122":0.01601,"124":0.0032,"127":0.0032,"131":0.0064,"133":0.0032,"136":0.0032,"137":0.0032,"138":0.00961,"139":0.0032,"140":0.01921,"141":0.0064,"142":0.0064,"143":0.00961,"144":0.00961,"145":0.03522,"146":0.02882,"147":0.01601,"148":0.03202,"149":0.03842,"150":0.07685,"151":0.30419,"152":1.80593,"153":1.93401,"154":0.40345,_:"12 13 79 80 81 83 84 85 86 87 88 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 113 115 116 117 118 121 123 125 126 128 129 130 132 134 135"},E:{"11":0.0032,"27":0.06404,_:"4 5 6 7 8 9 10 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 12.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.4 17.0 17.4 17.5 18.0 18.2 27.1 TP","11.1":0.0032,"13.1":0.0032,"14.1":0.0064,"15.6":0.02241,"16.3":0.0032,"16.5":0.0032,"16.6":0.06404,"17.1":0.00961,"17.2":0.0032,"17.3":0.0032,"17.6":0.04163,"18.1":0.02241,"18.3":0.0064,"18.4":0.0032,"18.5-18.7":0.00961,"26.0":0.0064,"26.1":0.0032,"26.2":0.02241,"26.3":0.0064,"26.4":0.00961,"26.5":0.08325,"26.6":0.28818,"27.2":0.0032},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00039,"5.0-5.1":0.00039,"6.0-6.1":0,"7.0-7.1":0.00079,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00395,"11.0-11.2":0.00039,"11.3-11.4":0.00079,"12.0-12.1":0,"12.2-12.5":0.01027,"13.0-13.1":0,"13.2":0.00197,"13.3":0,"13.4-13.7":0.00039,"14.0-14.4":0.00158,"14.5-14.8":0.00237,"15.0-15.1":0.00237,"15.2-15.3":0.00158,"15.4":0.00197,"15.5":0.00237,"15.6-15.8":0.05135,"16.0":0.00395,"16.1":0.00711,"16.2":0.00395,"16.3":0.00869,"16.4":0.00197,"16.5":0.00316,"16.6-16.7":0.07149,"17.0":0.00276,"17.1":0.00395,"17.2":0.00395,"17.3":0.00592,"17.4":0.00829,"17.5":0.01619,"17.6-17.7":0.04187,"18.0":0.00869,"18.1":0.01738,"18.2":0.0237,"18.3":0.04108,"18.4":0.02567,"18.5-18.7":0.53044,"26.0":0.02567,"26.1":0.02607,"26.2":0.06793,"26.3":0.07346,"26.4":0.05372,"26.5":0.35981,"26.6":2.22009,"27.0":0.17023,"27.1":0,"27.2":0.00434},P:{"21":0.01856,"24":0.00928,"25":0.00928,"26":0.01Line truncated
@@ -0,0 +1,518 @@
flf2a$ 5 5 11 -1 7 0 0 0
Font Author: ?
More Info:
https://web.archive.org/web/20120819044459/http://www.roysac.com/thedrawfonts-tdf.asp
FIGFont created with: http://patorjk.com/figfont-editor
$ $@
$ $@
$ $@
$ $@
$ $@@
▄▄ @
██▌@
▐█·@
.▀ @
▀ @@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
▀ @@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
▄▄▄· @
▐█ ▀█ @
▄█▀▀█ @
▐█ ▪▐▌@
▀ ▀ @@
▄▄▄▄· @
▐█ ▀█▪@
▐█▀▀█▄@
██▄▪▐█@
·▀▀▀▀ @@
▄▄· @
▐█ ▌▪@
██ ▄▄@
▐███▌@
·▀▀▀ @@
·▄▄▄▄ @
██▪ ██ @
▐█· ▐█▌@
██. ██ @
▀▀▀▀▀• @@
▄▄▄ .@
▀▄.▀·@
▐▀▀▪▄@
▐█▄▄▌@
▀▀▀ @@
·▄▄▄@
▐▄▄·@
██▪ @
██▌.@
▀▀▀ @@
▄▄ • @
▐█ ▀ ▪@
▄█ ▀█▄@
▐█▄▪▐█@
·▀▀▀▀ @@
▄ .▄@
██▪▐█@
██▀▐█@
██▌▐▀@
▀▀▀ ·@@
▪ @
██ @
▐█·@
▐█▌@
▀▀▀@@
▐▄▄▄@
·██@
▪▄ ██@
▐▌▐█▌@
▀▀▀•@@
▄ •▄ @
█▌▄▌▪@
▐▀▀▄·@
▐█.█▌@
·▀ ▀@@
▄▄▌ @
██• @
██▪ @
▐█▌▐▌@
.▀▀▀ @@
• ▌ ▄ ·. @
·██ ▐███▪@
▐█ ▌▐▌▐█·@
██ ██▌▐█▌@
▀▀ █▪▀▀▀@@
▐ ▄ @
•█▌▐█@
▐█▐▐▌@
██▐█▌@
▀▀ █▪@@
@
▪ @
▄█▀▄ @
▐█▌.▐▌@
▀█▄▀▪@@
▄▄▄·@
▐█ ▄█@
██▀·@
▐█▪·•@
.▀ @@
.▄▄▄ @
▐▀•▀█ @
█▌·.█▌@
▐█▪▄█·@
·▀▀█. @@
▄▄▄ @
▀▄ █·@
▐▀▀▄ @
▐█•█▌@
.▀ ▀@@
.▄▄ · @
▐█ ▀. @
▄▀▀▀█▄@
▐█▄▪▐█@
▀▀▀▀ @@
▄▄▄▄▄@
•██ @
▐█.▪@
▐█▌·@
▀▀▀ @@
▄• ▄▌@
█▪██▌@
█▌▐█▌@
▐█▄█▌@
▀▀▀ @@
▌ ▐·@
▪█·█▌@
▐█▐█•@
███ @
. ▀ @@
▄▄▌ ▐ ▄▌@
██· █▌▐█@
██▪▐█▐▐▌@
▐█▌██▐█▌@
▀▀▀▀ ▀▪@@
▐▄• ▄ @
█▌█▌▪@
·██· @
▪▐█·█▌@
•▀▀ ▀▀@@
▄· ▄▌@
▐█▪██▌@
▐█▌▐█▪@
▐█▀·.@
▀ • @@
·▄▄▄▄•@
▪▀·.█▌@
▄█▀▀▀•@
█▌▪▄█▀@
·▀▀▀ •@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
▄▄▄· @
▐█ ▀█ @
▄█▀▀█ @
▐█ ▪▐▌@
▀ ▀ @@
▄▄▄▄· @
▐█ ▀█▪@
▐█▀▀█▄@
██▄▪▐█@
·▀▀▀▀ @@
▄▄· @
▐█ ▌▪@
██ ▄▄@
▐███▌@
·▀▀▀ @@
·▄▄▄▄ @
██▪ ██ @
▐█· ▐█▌@
██. ██ @
▀▀▀▀▀• @@
▄▄▄ .@
▀▄.▀·@
▐▀▀▪▄@
▐█▄▄▌@
▀▀▀ @@
·▄▄▄@
▐▄▄·@
██▪ @
██▌.@
▀▀▀ @@
▄▄ • @
▐█ ▀ ▪@
▄█ ▀█▄@
▐█▄▪▐█@
·▀▀▀▀ @@
▄ .▄@
██▪▐█@
██▀▐█@
██▌▐▀@
▀▀▀ ·@@
▪ @
██ @
▐█·@
▐█▌@
▀▀▀@@
▐▄▄▄@
·██@
▪▄ ██@
▐▌▐█▌@
▀▀▀•@@
▄ •▄ @
█▌▄▌▪@
▐▀▀▄·@
▐█.█▌@
·▀ ▀@@
▄▄▌ @
██• @
██▪ @
▐█▌▐▌@
.▀▀▀ @@
• ▌ ▄ ·. @
·██ ▐███▪@
▐█ ▌▐▌▐█·@
██ ██▌▐█▌@
▀▀ █▪▀▀▀@@
▐ ▄ @
•█▌▐█@
▐█▐▐▌@
██▐█▌@
▀▀ █▪@@
@
▪ @
▄█▀▄ @
▐█▌.▐▌@
▀█▄▀▪@@
▄▄▄·@
▐█ ▄█@
██▀·@
▐█▪·•@
.▀ @@
.▄▄▄ @
▐▀•▀█ @
█▌·.█▌@
▐█▪▄█·@
·▀▀█. @@
▄▄▄ @
▀▄ █·@
▐▀▀▄ @
▐█•█▌@
.▀ ▀@@
.▄▄ · @
▐█ ▀. @
▄▀▀▀█▄@
▐█▄▪▐█@
▀▀▀▀ @@
▄▄▄▄▄@
•██ @
▐█.▪@
▐█▌·@
▀▀▀ @@
▄• ▄▌@
█▪██▌@
█▌▐█▌@
▐█▄█▌@
▀▀▀ @@
▌ ▐·@
▪█·█▌@
▐█▐█•@
███ @
. ▀ @@
▄▄▌ ▐ ▄▌@
██· █▌▐█@
██▪▐█▐▐▌@
▐█▌██▐█▌@
▀▀▀▀ ▀▪@@
▐▄• ▄ @
█▌█▌▪@
·██· @
▪▐█·█▌@
•▀▀ ▀▀@@
▄· ▄▌@
▐█▪██▌@
▐█▌▐█▪@
▐█▀·.@
▀ • @@
·▄▄▄▄•@
▪▀·.█▌@
▄█▀▀▀•@
█▌▪▄█▀@
·▀▀▀ •@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@@ -0,0 +1,547 @@
export default `flf2a$ 5 4 12 -1 36 0 3903 0
Author : Aaron Nolan
Email : speed_racer420@hotmail.com
Date : 2005/4/7 10:39:30
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
(english)
(comments): I put in an "�, �, and �" for all you germans out there,
the "�" was a little too difficult. This is of course the FILTER font
inspired from the band logo, have fun. And don't poke an eye out.
(deutsch)
(kommentar): Ich habe auch "�, �, und �" dazu gemacht, f�r Ihr Deutschen
da drausen, das scharfe S (�) war ein bisschen zu schwierig. Dies ist
natr�rlich
die FILTER schriftart (figlet-font), inspiriert von dem Bandlogo, viel Spa�.
Und, das Auge nicht damit auspfl�cken!
Permission is hereby given to modify this font, as long as the
modifier's, and the original author's name name is placed on a comment line.
Also check out the Malicious (industrial electronic darkwave ebm synthpop)
band here:
http://themalicious.dmusic.com/
http://themalicious.shim.net/
http://groups.yahoo.com/group/themalicious
http://www.audiostreet.net/themalicious
http://www.roilnoise.com/Industrialterror.htm
thanks.
$ #
$ #
$ #
$ #
$ ##
d88 #
d88. #
\`'d8 #
YP #
##
88b 88b #
\`8p \`8p #
#
#
##
##
#
#
#
##
$#
#
#
#
##
%#
#
#
#
##
&#
#
#
#
##
'#
#
#
#
##
(#
#
#
#
##
)#
#
#
#
##
*#
#
#
#
##
888 #
ooo888ooo #
888888888 #
888 #
##
,#
#
#
#
##
#
______ #
XXXXXX #
#
##
.#
#
#
#
##
/#
#
#
#
##
0#
#
#
#
##
1#
#
#
#
##
2#
#
#
#
##
3#
#
#
#
##
4#
#
#
#
##
5#
#
#
#
##
6#
#
#
#
##
7#
#
#
#
##
8#
#
#
#
##
9#
#
#
#
##
#
d8p #
#
d8p #
##
#
d8p #
#
,d #
##
<#
#
#
#
##
#
oooooo #
oooooo #
#
##
>#
#
#
#
##
?#
#
#
#
##
@#
#
#
#
##
,8b. #
88'8o #
88PPY8. #
8b \`Y' #
##
d88PPPo #
888ooo8 #
888 8 #
888PPPP #
##
doooooo #
d88 #
d88 #
d888888 #
##
88PPP. #
88 8 #
88 8 #
88oop' #
##
,d8PPPP #
d88ooo #
,88' #
88bdPPP #
##
o8boooo #
88booop #
88b #
88P #
##
888PPP8b #
d88 \` #
d8b PPY8 #
Y8PPPPPP #
##
888 888 #
88888888 #
88P 888 #
88P 888 #
##
8888 #
8888 #
8888 #
8888 #
##
d8p #
88p #
88P #
88888' #
##
888 ,dP #
888o8P' #
888 Y8L #
888 \`8p #
##
888 #
888 #
888 #
888PPPPP #
##
d88b_o8b #
d88 8'8b #
d88 8b #
Y88 8P #
##
888 ,d8 #
888_dPY8 #
8888' 88 #
Y8P Y8 #
##
88888888 #
888 888 #
888 888 #
888oo888 #
##
8888PPPp, #
8888 8 #
8888PPPP' #
888P #
_ _ ##
88888888 #
88b Y8 #
888 Yb,8, #
888oopY88 #
##
,dbPPPp #
d88ooP' #
,88' P' #
88 do #
##
88888888 #
88ooooPp #
d8 #
8888888P #
##
888888888 #
'88d #
'888 #
'88p #
##
888 888 #
888 888 #
888 888 #
888PP888 #
##
d88 88 #
d88 88 #
d88_o8P' #
Y88P' #
##
8d8 d88 #
888,o.d88 #
888P\`Y8b8 #
88P YP8 #
##
88b d88 #
88od88 #
d8PY8d #
Y88 Y8P #
##
888 88 #
888ooo88 #
88 #
PPPPPP8P #
##
PPPPP88p' #
,dP' #
,dP' #
YPPPPPPP #
##
[#
#
#
#
##
\\#
#
#
#
##
]#
#
#
#
##
^#
#
#
#
##
_#
#
#
#
##
\`#
#
#
#
##
,8b. #
88'8o #
88PPY8. #
8b \`Y' #
##
d88PPPo #
888ooo8 #
888 8 #
888PPPP #
##
doooooo #
d88 #
d88 #
d888888 #
##
88PPP. #
88 8 #
88 8 #
88oop' #
##
,d8PPPP #
d88ooo #
,88' #
88bdPPP #
##
o8boooo #
88booop #
88b #
88P #
##
888PPP8b #
d88 \` #
d8b PPY8 #
Y8PPPPPP #
##
888 888 #
88888888 #
88P 888 #
88P 888 #
##
8888 #
8888 #
8888 #
8888 #
##
d8p #
88p #
88P #
88888' #
##
888 ,dP #
888o8P' #
888 Y8L #
888 \`8p #
##
888 #
888 #
888 #
888PPPPP #
##
d88b_o8b #
d88 8'8b #
d88 8b #
Y88 8P #
##
888 ,d8 #
888_dPY8 #
8888' 88 #
Y8P Y8 #
##
88888888 #
888 888 #
888 888 #
888oo888 #
##
8888PPPp, #
8888 8 #
8888PPPP' #
888P #
_ _ ##
88888888 #
88b Y8 #
888 Yb,8, #
888oopY88 #
##
,dbPPPp #
d88ooP' #
,88' P' #
88 do #
##
88888888 #
88ooooPp #
d8 #
8888888P #
##
888888888 #
'88d #
'888 #
'88p #
##
888 888 #
888 888 #
888 888 #
888PP888 #
##
d88 88 #
d88 88 #
d88_o8P' #
Y88P' #
##
8d8 d88 #
888,o.d88 #
888P\`Y8b8 #
88P YP8 #
##
88b d88 #
88od88 #
d8PY8d #
Y88 Y8P #
##
888 88 #
888ooo88 #
88 #
PPPPPP8P #
##
PPPPP88p'#
,dP' #
,dP' #
YPPPPPPP #
##
{#
#
#
#
##
|#
#
#
#
##
}#
#
#
#
##
~#
#
#
#
##
,8b. #
88'8o #
88PPY8. #
8b \`Y' #
##
88888888 #
888 888 #
888 888 #
888oo888 #
##
888 888 #
888 888 #
888 888 #
888PP888 #
##
a a #
dPPP8 #
.oood #
8ppp8 #
##
o o #
poooop #
88 88 #
YPPP8P #
##
u u #
d8 d8 #
d8 d8 #
YPPP8P #
##
�#
#
#
#
##`
@@ -0,0 +1,192 @@
# Mocking Request
<!--type=misc-->
Undici has its own mocking [utility](../api/MockAgent.md). It allow us to intercept undici HTTP requests and return mocked values instead. It can be useful for testing purposes.
Example:
```js
// bank.mjs
import { request } from 'undici'
export async function bankTransfer(recipient, amount) {
const { body } = await request('http://localhost:3000/bank-transfer',
{
method: 'POST',
headers: {
'X-TOKEN-SECRET': 'SuperSecretToken',
},
body: JSON.stringify({
recipient,
amount
})
}
)
return await body.json()
}
```
And this is what the test file looks like:
```js
// index.test.mjs
import { strict as assert } from 'node:assert'
import { MockAgent, setGlobalDispatcher, } from 'undici'
import { bankTransfer } from './bank.mjs'
const mockAgent = new MockAgent();
setGlobalDispatcher(mockAgent);
// Provide the base url to the request
const mockPool = mockAgent.get('http://localhost:3000');
// intercept the request
mockPool.intercept({
path: '/bank-transfer',
method: 'POST',
headers: {
'X-TOKEN-SECRET': 'SuperSecretToken',
},
body: JSON.stringify({
recipient: '1234567890',
amount: '100'
})
}).reply(200, {
message: 'transaction processed'
})
const success = await bankTransfer('1234567890', '100')
assert.deepEqual(success, { message: 'transaction processed' })
// if you dont want to check whether the body or the headers contain the same value
// just remove it from interceptor
mockPool.intercept({
path: '/bank-transfer',
method: 'POST',
}).reply(400, {
message: 'bank account not found'
})
const badRequest = await bankTransfer('1234567890', '100')
assert.deepEqual(badRequest, { message: 'bank account not found' })
```
Explore other MockAgent functionality [here](../api/MockAgent.md)
## Access agent call history
Using a MockAgent also allows you to make assertions on the configuration used to make your request in your application.
Here is an example :
```js
// index.test.mjs
import { strict as assert } from 'node:assert'
import { MockAgent, setGlobalDispatcher, fetch } from 'undici'
import { app } from './app.mjs'
// given an application server running on http://localhost:3000
await app.start()
// enable call history at instantiation
const mockAgent = new MockAgent({ enableCallHistory: true })
// or after instantiation
mockAgent.enableCallHistory()
setGlobalDispatcher(mockAgent)
// this call is made (not intercepted)
await fetch(`http://localhost:3000/endpoint?query='hello'`, {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ data: '' })
})
// access to the call history of the MockAgent (which register every call made intercepted or not)
assert.ok(mockAgent.getCallHistory()?.calls().length === 1)
assert.strictEqual(mockAgent.getCallHistory()?.firstCall()?.fullUrl, `http://localhost:3000/endpoint?query='hello'`)
assert.strictEqual(mockAgent.getCallHistory()?.firstCall()?.body, JSON.stringify({ data: '' }))
assert.deepStrictEqual(mockAgent.getCallHistory()?.firstCall()?.searchParams, { query: 'hello' })
assert.strictEqual(mockAgent.getCallHistory()?.firstCall()?.port, '3000')
assert.strictEqual(mockAgent.getCallHistory()?.firstCall()?.host, 'localhost:3000')
assert.strictEqual(mockAgent.getCallHistory()?.firstCall()?.method, 'POST')
assert.strictEqual(mockAgent.getCallHistory()?.firstCall()?.path, '/endpoint')
assert.deepStrictEqual(mockAgent.getCallHistory()?.firstCall()?.headers, { 'content-type': 'application/json' })
// clear all call history logs
mockAgent.clearCallHistory()
assert.ok(mockAgent.getCallHistory()?.calls().length === 0)
```
Calling `mockAgent.close()` will automatically clear and delete every call history for you.
Explore other MockAgent functionality [here](../api/MockAgent.md)
Explore other MockCallHistory functionality [here](../api/MockCallHistory.md)
Explore other MockCallHistoryLog functionality [here](../api/MockCallHistoryLog.md)
## Debug Mock Value
When the interceptor and the request options are not the same, undici will automatically make a real HTTP request. To prevent real requests from being made, use `mockAgent.disableNetConnect()`:
```js
const mockAgent = new MockAgent();
setGlobalDispatcher(mockAgent);
mockAgent.disableNetConnect()
// Provide the base url to the request
const mockPool = mockAgent.get('http://localhost:3000');
mockPool.intercept({
path: '/bank-transfer',
method: 'POST',
}).reply(200, {
message: 'transaction processed'
})
const badRequest = await bankTransfer('1234567890', '100')
// Will throw an error
// MockNotMatchedError: Mock dispatch not matched for path '/bank-transfer':
// subsequent request to origin http://localhost:3000 was not allowed (net.connect disabled)
```
## Reply with data based on request
If the mocked response needs to be dynamically derived from the request parameters, you can provide a function instead of an object to `reply`:
```js
mockPool.intercept({
path: '/bank-transfer',
method: 'POST',
headers: {
'X-TOKEN-SECRET': 'SuperSecretToken',
},
body: JSON.stringify({
recipient: '1234567890',
amount: '100'
})
}).reply(200, (opts) => {
// do something with opts
return { message: 'transaction processed' }
})
```
in this case opts will be
```js
{
method: 'POST',
headers: { 'X-TOKEN-SECRET': 'SuperSecretToken' },
body: '{"recipient":"1234567890","amount":"100"}',
origin: 'http://localhost:3000',
path: '/bank-transfer'
}
```
@@ -0,0 +1,49 @@
import { warnOnce } from 'motion-utils';
import { updateScrollInfo } from './info.mjs';
import { resolveOffsets } from './offsets/index.mjs';
function measure(container, target = container, info) {
/**
* Find inset of target within scrollable container
*/
info.x.targetOffset = 0;
info.y.targetOffset = 0;
if (target !== container) {
let node = target;
while (node && node !== container) {
info.x.targetOffset += node.offsetLeft;
info.y.targetOffset += node.offsetTop;
node = node.offsetParent;
}
}
info.x.targetLength =
target === container ? target.scrollWidth : target.clientWidth;
info.y.targetLength =
target === container ? target.scrollHeight : target.clientHeight;
info.x.containerLength = container.clientWidth;
info.y.containerLength = container.clientHeight;
/**
* In development mode ensure scroll containers aren't position: static as this makes
* it difficult to measure their relative positions.
*/
if (process.env.NODE_ENV !== "production") {
if (container && target && target !== container) {
warnOnce(getComputedStyle(container).position !== "static", "Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.");
}
}
}
function createOnScrollHandler(element, onScroll, info, options = {}) {
return {
measure: (time) => {
measure(element, options.target, info);
updateScrollInfo(element, info, time);
if (options.offset || options.target) {
resolveOffsets(element, info, options);
}
},
notify: () => onScroll(info),
};
}
export { createOnScrollHandler };
//# sourceMappingURL=on-scroll-handler.mjs.map
@@ -0,0 +1,12 @@
const require_useMatch = require("./useMatch.cjs");
//#region src/useRouteContext.ts
function useRouteContext(opts) {
return require_useMatch.useMatch({
...opts,
select: (match) => opts.select ? opts.select(match.context) : match.context
});
}
//#endregion
exports.useRouteContext = useRouteContext;
//# sourceMappingURL=useRouteContext.cjs.map
@@ -0,0 +1,86 @@
import { f as createRule } from "../utils.js";
var yield_star_spacing_default = createRule({
name: "yield-star-spacing",
meta: {
type: "layout",
docs: { description: "Require or disallow spacing around the `*` in `yield*` expressions" },
fixable: "whitespace",
schema: [{ oneOf: [{
type: "string",
enum: [
"before",
"after",
"both",
"neither"
]
}, {
type: "object",
properties: {
before: { type: "boolean" },
after: { type: "boolean" }
},
additionalProperties: false
}] }],
defaultOptions: ["after"],
messages: {
missingBefore: "Missing space before *.",
missingAfter: "Missing space after *.",
unexpectedBefore: "Unexpected space before *.",
unexpectedAfter: "Unexpected space after *."
}
},
create(context, [options]) {
const sourceCode = context.sourceCode;
const mode = (() => {
if (typeof options === "string") return {
before: {
before: true,
after: false
},
after: {
before: false,
after: true
},
both: {
before: true,
after: true
},
neither: {
before: false,
after: false
}
}[options];
return options;
})();
function checkSpacing(side, leftToken, rightToken) {
if (sourceCode.isSpaceBetween(leftToken, rightToken) !== mode[side]) {
const after = leftToken.value === "*";
const spaceRequired = mode[side];
const node = after ? leftToken : rightToken;
const messageId = spaceRequired ? side === "before" ? "missingBefore" : "missingAfter" : side === "before" ? "unexpectedBefore" : "unexpectedAfter";
context.report({
node,
messageId,
fix(fixer) {
if (spaceRequired) {
if (after) return fixer.insertTextAfter(node, " ");
return fixer.insertTextBefore(node, " ");
}
return fixer.removeRange([leftToken.range[1], rightToken.range[0]]);
}
});
}
}
function checkExpression(node) {
if (!("delegate" in node && node.delegate)) return;
const tokens = sourceCode.getFirstTokens(node, 3);
const yieldToken = tokens[0];
const starToken = tokens[1];
const nextToken = tokens[2];
checkSpacing("before", yieldToken, starToken);
checkSpacing("after", starToken, nextToken);
}
return { YieldExpression: checkExpression };
}
});
export { yield_star_spacing_default as t };
@@ -0,0 +1 @@
{"version":3,"file":"circle-dot-dashed.js","sources":["../../../src/icons/circle-dot-dashed.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CircleDotDashed\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAuMSAyLjE4YTkuOTMgOS45MyAwIDAgMSAzLjggMCIgLz4KICA8cGF0aCBkPSJNMTcuNiAzLjcxYTkuOTUgOS45NSAwIDAgMSAyLjY5IDIuNyIgLz4KICA8cGF0aCBkPSJNMjEuODIgMTAuMWE5LjkzIDkuOTMgMCAwIDEgMCAzLjgiIC8+CiAgPHBhdGggZD0iTTIwLjI5IDE3LjZhOS45NSA5Ljk1IDAgMCAxLTIuNyAyLjY5IiAvPgogIDxwYXRoIGQ9Ik0xMy45IDIxLjgyYTkuOTQgOS45NCAwIDAgMS0zLjggMCIgLz4KICA8cGF0aCBkPSJNNi40IDIwLjI5YTkuOTUgOS45NSAwIDAgMS0yLjY5LTIuNyIgLz4KICA8cGF0aCBkPSJNMi4xOCAxMy45YTkuOTMgOS45MyAwIDAgMSAwLTMuOCIgLz4KICA8cGF0aCBkPSJNMy43MSA2LjRhOS45NSA5Ljk1IDAgMCAxIDIuNy0yLjY5IiAvPgogIDxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/circle-dot-dashed\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 CircleDotDashed = createLucideIcon('CircleDotDashed', [\n ['path', { d: 'M10.1 2.18a9.93 9.93 0 0 1 3.8 0', key: '1qdqn0' }],\n ['path', { d: 'M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7', key: '1bq7p6' }],\n ['path', { d: 'M21.82 10.1a9.93 9.93 0 0 1 0 3.8', key: '1rlaqf' }],\n ['path', { d: 'M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69', key: '1xk03u' }],\n ['path', { d: 'M13.9 21.82a9.94 9.94 0 0 1-3.8 0', key: 'l7re25' }],\n ['path', { d: 'M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7', key: '1v18p6' }],\n ['path', { d: 'M2.18 13.9a9.93 9.93 0 0 1 0-3.8', key: 'xdo6bj' }],\n ['path', { d: 'M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69', key: '1jjmaz' }],\n ['circle', { cx: '12', cy: '12', r: '1', key: '41hilf' }],\n]);\n\nexport default CircleDotDashed;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACjE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAuC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACpE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAqC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAClE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAwC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACrE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAqC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAClE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAuC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACpE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACjE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACnE,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,Line truncated
@@ -0,0 +1,559 @@
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
// A simple implementation of make-array
function makeArray(subject) {
return Array.isArray(subject) ? subject : [subject];
}
var EMPTY = '';
var SPACE = ' ';
var ESCAPE = '\\';
var REGEX_TEST_BLANK_LINE = /^\s+$/;
var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/;
var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/;
var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/;
var REGEX_SPLITALL_CRLF = /\r?\n/g;
// /foo,
// ./foo,
// ../foo,
// .
// ..
var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/;
var SLASH = '/';
// Do not use ternary expression here, since "istanbul ignore next" is buggy
var TMP_KEY_IGNORE = 'node-ignore';
/* istanbul ignore else */
if (typeof Symbol !== 'undefined') {
TMP_KEY_IGNORE = Symbol["for"]('node-ignore');
}
var KEY_IGNORE = TMP_KEY_IGNORE;
var define = function define(object, key, value) {
return Object.defineProperty(object, key, {
value: value
});
};
var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g;
var RETURN_FALSE = function RETURN_FALSE() {
return false;
};
// Sanitize the range of a regular expression
// The cases are complicated, see test cases for details
var sanitizeRange = function sanitizeRange(range) {
return range.replace(REGEX_REGEXP_RANGE, function (match, from, to) {
return from.charCodeAt(0) <= to.charCodeAt(0) ? match
// Invalid range (out of order) which is ok for gitignore rules but
// fatal for JavaScript regular expression, so eliminate it.
: EMPTY;
});
};
// See fixtures #59
var cleanRangeBackSlash = function cleanRangeBackSlash(slashes) {
var length = slashes.length;
return slashes.slice(0, length - length % 2);
};
// > If the pattern ends with a slash,
// > it is removed for the purpose of the following description,
// > but it would only find a match with a directory.
// > In other words, foo/ will match a directory foo and paths underneath it,
// > but will not match a regular file or a symbolic link foo
// > (this is consistent with the way how pathspec works in general in Git).
// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`'
// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call
// you could use option `mark: true` with `glob`
// '`foo/`' should not continue with the '`..`'
var REPLACERS = [[
// remove BOM
// TODO:
// Other similar zero-width characters?
/^\uFEFF/, function () {
return EMPTY;
}],
// > Trailing spaces are ignored unless they are quoted with backslash ("\")
[
// (a\ ) -> (a )
// (a ) -> (a)
// (a ) -> (a)
// (a \ ) -> (a )
/((?:\\\\)*?)(\\?\s+)$/, function (_, m1, m2) {
return m1 + (m2.indexOf('\\') === 0 ? SPACE : EMPTY);
}],
// replace (\ ) with ' '
// (\ ) -> ' '
// (\\ ) -> '\\ '
// (\\\ ) -> '\\ '
[/(\\+?)\s/g, function (_, m1) {
var length = m1.length;
return m1.slice(0, length - length % 2) + SPACE;
}],
// Escape metacharacters
// which is written down by users but means special for regular expressions.
// > There are 12 characters with special meanings:
// > - the backslash \,
// > - the caret ^,
// > - the dollar sign $,
// > - the period or dot .,
// > - the vertical bar or pipe symbol |,
// > - the question mark ?,
// > - the asterisk or star *,
// > - the plus sign +,
// > - the opening parenthesis (,
// > - the closing parenthesis ),
// > - and the opening square bracket [,
// > - the opening curly brace {,
// > These special characters are often called "metacharacters".
[/[\\$.|*+(){^]/g, function (match) {
return "\\".concat(match);
}], [
// > a question mark (?) matches a single character
/(?!\\)\?/g, function () {
return '[^/]';
}],
// leading slash
[
// > A leading slash matches the beginning of the pathname.
// > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".
// A leading slash matches the beginning of the pathname
/^\//, function () {
return '^';
}],
// replace special metacharacter slash after the leading slash
[/\//g, function () {
return '\\/';
}], [
// > A leading "**" followed by a slash means match in all directories.
// > For example, "**/foo" matches file or directory "foo" anywhere,
// > the same as pattern "foo".
// > "**/foo/bar" matches file or directory "bar" anywhere that is directly
// > under directory "foo".
// Notice that the '*'s have been replaced as '\\*'
/^\^*\\\*\\\*\\\//,
// '**/foo' <-> 'foo'
function () {
return '^(?:.*\\/)?';
}],
// starting
[
// there will be no leading '/'
// (which has been replaced by section "leading slash")
// If starts with '**', adding a '^' to the regular expression also works
/^(?=[^^])/, function startingReplacer() {
// If has a slash `/` at the beginning or middle
return !/\/(?!$)/.test(this)
// > Prior to 2.22.1
// > If the pattern does not contain a slash /,
// > Git treats it as a shell glob pattern
// Actually, if there is only a trailing slash,
// git also treats it as a shell glob pattern
// After 2.22.1 (compatible but clearer)
// > If there is a separator at the beginning or middle (or both)
// > of the pattern, then the pattern is relative to the directory
// > level of the particular .gitignore file itself.
// > Otherwise the pattern may also match at any level below
// > the .gitignore level.
? '(?:^|\\/)'
// > Otherwise, Git treats the pattern as a shell glob suitable for
// > consumption by fnmatch(3)
: '^';
}],
// two globstars
[
// Use lookahead assertions so that we could match more than one `'/**'`
/\\\/\\\*\\\*(?=\\\/|$)/g,
// Zero, one or several directories
// should not use '*', or it will be replaced by the next replacer
// Check if it is not the last `'/**'`
function (_, index, str) {
return index + 6 < str.length
// case: /**/
// > A slash followed by two consecutive asterisks then a slash matches
// > zero or more directories.
// > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on.
// '/**/'
? '(?:\\/[^\\/]+)*'
// case: /**
// > A trailing `"/**"` matches everything inside.
// #21: everything inside but it should not include the current folder
: '\\/.+';
}],
// normal intermediate wildcards
[
// Never replace escaped '*'
// ignore rule '\*' will match the path '*'
// 'abc.*/' -> go
// 'abc.*' -> skip this rule,
// coz trailing single wildcard will be handed by [trailing wildcard]
/(^|[^\\]+)(\\\*)+(?=.+)/g,
// '*.js' matches '.js'
// '*.js' doesn't match 'abc'
function (_, p1, p2) {
// 1.
// > An asterisk "*" matches anything except a slash.
// 2.
// > Other consecutive asterisks are considered regular asterisks
// > and will match according to the previous rules.
var unescaped = p2.replace(/\\\*/g, '[^\\/]*');
return p1 + unescaped;
}], [
// unescape, revert step 3 except for back slash
// For example, if a user escape a '\\*',
// after step 3, the result will be '\\\\\\*'
/\\\\\\(?=[$.|*+(){^])/g, function () {
return ESCAPE;
}], [
// '\\\\' -> '\\'
/\\\\/g, function () {
return ESCAPE;
}], [
// > The range notation, e.g. [a-zA-Z],
// > can be used to match one of the characters in a range.
// `\` is escaped by step 3
/(\\)?\[([^\]/]*?)(\\*)($|\])/g, function (match, leadEscape, range, endEscape, close) {
return leadEscape === ESCAPE
// '\\[bar]' -> '\\\\[bar\\]'
? "\\[".concat(range).concat(cleanRangeBackSlash(endEscape)).concat(close) : close === ']' ? endEscape.length % 2 === 0
// A normal case, and it is a range notation
// '[bar]'
// '[bar\\\\]'
? "[".concat(sanitizeRange(range)).concat(endEscape, "]") // Invalid range notaton
// '[bar\\]' -> '[bar\\\\]'
: '[]' : '[]';
}],
// ending
[
// 'js' will not match 'js.'
// 'ab' will not match 'abc'
/(?:[^*])$/,
// WTF!
// https://git-scm.com/docs/gitignore
// changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)
// which re-fixes #24, #38
// > If there is a separator at the end of the pattern then the pattern
// > will only match directories, otherwise the pattern can match both
// > files and directories.
// 'js*' will not match 'a.js'
// 'js/' will not match 'a.js'
// 'js' will match 'a.js' and 'a.js/'
function (match) {
return /\/$/.test(match)
// foo/ will not match 'foo'
? "".concat(match, "$") // foo matches 'foo' and 'foo/'
: "".concat(match, "(?=$|\\/$)");
}],
// trailing wildcard
[/(\^|\\\/)?\\\*$/, function (_, p1) {
var prefix = p1
// '\^':
// '/*' does not match EMPTY
// '/*' does not match everything
// '\\\/':
// 'abc/*' does not match 'abc/'
? "".concat(p1, "[^/]+") // 'a*' matches 'a'
// 'a*' matches 'aa'
: '[^/]*';
return "".concat(prefix, "(?=$|\\/$)");
}]];
// A simple cache, because an ignore rule only has only one certain meaning
var regexCache = Object.create(null);
// @param {pattern}
var makeRegex = function makeRegex(pattern, ignoreCase) {
var source = regexCache[pattern];
if (!source) {
source = REPLACERS.reduce(function (prev, _ref) {
var _ref2 = _slicedToArray(_ref, 2),
matcher = _ref2[0],
replacer = _ref2[1];
return prev.replace(matcher, replacer.bind(pattern));
}, pattern);
regexCache[pattern] = source;
}
return ignoreCase ? new RegExp(source, 'i') : new RegExp(source);
};
var isString = function isString(subject) {
return typeof subject === 'string';
};
// > A blank line matches no files, so it can serve as a separator for readability.
var checkPattern = function checkPattern(pattern) {
return pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern)
// > A line starting with # serves as a comment.
&& pattern.indexOf('#') !== 0;
};
var splitPattern = function splitPattern(pattern) {
return pattern.split(REGEX_SPLITALL_CRLF);
};
var IgnoreRule = /*#__PURE__*/_createClass(function IgnoreRule(origin, pattern, negative, regex) {
_classCallCheck(this, IgnoreRule);
this.origin = origin;
this.pattern = pattern;
this.negative = negative;
this.regex = regex;
});
var createRule = function createRule(pattern, ignoreCase) {
var origin = pattern;
var negative = false;
// > An optional prefix "!" which negates the pattern;
if (pattern.indexOf('!') === 0) {
negative = true;
pattern = pattern.substr(1);
}
pattern = pattern
// > Put a backslash ("\") in front of the first "!" for patterns that
// > begin with a literal "!", for example, `"\!important!.txt"`.
.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!')
// > Put a backslash ("\") in front of the first hash for patterns that
// > begin with a hash.
.replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#');
var regex = makeRegex(pattern, ignoreCase);
return new IgnoreRule(origin, pattern, negative, regex);
};
var throwError = function throwError(message, Ctor) {
throw new Ctor(message);
};
var checkPath = function checkPath(path, originalPath, doThrow) {
if (!isString(path)) {
return doThrow("path must be a string, but got `".concat(originalPath, "`"), TypeError);
}
// We don't know if we should ignore EMPTY, so throw
if (!path) {
return doThrow("path must not be empty", TypeError);
}
// Check if it is a relative path
if (checkPath.isNotRelative(path)) {
var r = '`path.relative()`d';
return doThrow("path should be a ".concat(r, " string, but got \"").concat(originalPath, "\""), RangeError);
}
return true;
};
var isNotRelative = function isNotRelative(path) {
return REGEX_TEST_INVALID_PATH.test(path);
};
checkPath.isNotRelative = isNotRelative;
checkPath.convert = function (p) {
return p;
};
var Ignore = /*#__PURE__*/function () {
function Ignore() {
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
_ref3$ignorecase = _ref3.ignorecase,
ignorecase = _ref3$ignorecase === void 0 ? true : _ref3$ignorecase,
_ref3$ignoreCase = _ref3.ignoreCase,
ignoreCase = _ref3$ignoreCase === void 0 ? ignorecase : _ref3$ignoreCase,
_ref3$allowRelativePa = _ref3.allowRelativePaths,
allowRelativePaths = _ref3$allowRelativePa === void 0 ? false : _ref3$allowRelativePa;
_classCallCheck(this, Ignore);
define(this, KEY_IGNORE, true);
this._rules = [];
this._ignoreCase = ignoreCase;
this._allowRelativePaths = allowRelativePaths;
this._initCache();
}
_createClass(Ignore, [{
key: "_initCache",
value: function _initCache() {
this._ignoreCache = Object.create(null);
this._testCache = Object.create(null);
}
}, {
key: "_addPattern",
value: function _addPattern(pattern) {
// #32
if (pattern && pattern[KEY_IGNORE]) {
this._rules = this._rules.concat(pattern._rules);
this._added = true;
return;
}
if (checkPattern(pattern)) {
var rule = createRule(pattern, this._ignoreCase);
this._added = true;
this._rules.push(rule);
}
}
// @param {Array<string> | string | Ignore} pattern
}, {
key: "add",
value: function add(pattern) {
this._added = false;
makeArray(isString(pattern) ? splitPattern(pattern) : pattern).forEach(this._addPattern, this);
// Some rules have just added to the ignore,
// making the behavior changed.
if (this._added) {
this._initCache();
}
return this;
}
// legacy
}, {
key: "addPattern",
value: function addPattern(pattern) {
return this.add(pattern);
}
// | ignored : unignored
// negative | 0:0 | 0:1 | 1:0 | 1:1
// -------- | ------- | ------- | ------- | --------
// 0 | TEST | TEST | SKIP | X
// 1 | TESTIF | SKIP | TEST | X
// - SKIP: always skip
// - TEST: always test
// - TESTIF: only test if checkUnignored
// - X: that never happen
// @param {boolean} whether should check if the path is unignored,
// setting `checkUnignored` to `false` could reduce additional
// path matching.
// @returns {TestResult} true if a file is ignored
}, {
key: "_testOne",
value: function _testOne(path, checkUnignored) {
var ignored = false;
var unignored = false;
this._rules.forEach(function (rule) {
var negative = rule.negative;
if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
return;
}
var matched = rule.regex.test(path);
if (matched) {
ignored = !negative;
unignored = negative;
}
});
return {
ignored: ignored,
unignored: unignored
};
}
// @returns {TestResult}
}, {
key: "_test",
value: function _test(originalPath, cache, checkUnignored, slices) {
var path = originalPath
// Supports nullable path
&& checkPath.convert(originalPath);
checkPath(path, originalPath, this._allowRelativePaths ? RETURN_FALSE : throwError);
return this._t(path, cache, checkUnignored, slices);
}
}, {
key: "_t",
value: function _t(path, cache, checkUnignored, slices) {
if (path in cache) {
return cache[path];
}
if (!slices) {
// path/to/a.js
// ['path', 'to', 'a.js']
slices = path.split(SLASH);
}
slices.pop();
// If the path has no parent directory, just test it
if (!slices.length) {
return cache[path] = this._testOne(path, checkUnignored);
}
var parent = this._t(slices.join(SLASH) + SLASH, cache, checkUnignored, slices);
// If the path contains a parent directory, check the parent first
return cache[path] = parent.ignored
// > It is not possible to re-include a file if a parent directory of
// > that file is excluded.
? parent : this._testOne(path, checkUnignored);
}
}, {
key: "ignores",
value: function ignores(path) {
return this._test(path, this._ignoreCache, false).ignored;
}
}, {
key: "createFilter",
value: function createFilter() {
var _this = this;
return function (path) {
return !_this.ignores(path);
};
}
}, {
key: "filter",
value: function filter(paths) {
return makeArray(paths).filter(this.createFilter());
}
// @returns {TestResult}
}, {
key: "test",
value: function test(path) {
return this._test(path, this._testCache, true);
}
}]);
return Ignore;
}();
var factory = function factory(options) {
return new Ignore(options);
};
var isPathValid = function isPathValid(path) {
return checkPath(path && checkPath.convert(path), path, RETURN_FALSE);
};
factory.isPathValid = isPathValid;
// Fixes typescript
factory["default"] = factory;
module.exports = factory;
// Windows
// --------------------------------------------------------------
/* istanbul ignore if */
if (
// Detect `process` so that it can run in browsers.
typeof process !== 'undefined' && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === 'win32')) {
/* eslint no-control-regex: "off" */
var makePosix = function makePosix(str) {
return /^\\\\\?\\/.test(str) || /[\0-\x1F"<>\|]+/.test(str) ? str : str.replace(/\\/g, '/');
};
checkPath.convert = makePosix;
// 'C:\\foo' <- 'C:\\foo' has been converted to 'C:/'
// 'd:\\foo'
var REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
checkPath.isNotRelative = function (path) {
return REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) || isNotRelative(path);
};
}
@@ -0,0 +1,132 @@
#include <sys/stat.h>
#include "WasmBackend.hh"
#define CONVERT_TIME(ts) ((uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec)
void WasmBackend::start() {
notifyStarted();
}
void WasmBackend::subscribe(WatcherRef watcher) {
// Build a full directory tree recursively, and watch each directory.
std::shared_ptr<DirTree> tree = getTree(watcher);
for (auto it = tree->entries.begin(); it != tree->entries.end(); it++) {
if (it->second.isDir) {
watchDir(watcher, it->second.path, tree);
}
}
}
void WasmBackend::watchDir(WatcherRef watcher, std::string path, std::shared_ptr<DirTree> tree) {
int wd = wasm_backend_add_watch(path.c_str(), (void *)this);
std::shared_ptr<WasmSubscription> sub = std::make_shared<WasmSubscription>();
sub->tree = tree;
sub->path = path;
sub->watcher = watcher;
mSubscriptions.emplace(wd, sub);
}
extern "C" void wasm_backend_event_handler(void *backend, int wd, int type, char *filename) {
WasmBackend *b = (WasmBackend *)(backend);
b->handleEvent(wd, type, filename);
}
void WasmBackend::handleEvent(int wd, int type, char *filename) {
// Find the subscriptions for this watch descriptor
auto range = mSubscriptions.equal_range(wd);
std::unordered_set<std::shared_ptr<WasmSubscription>> set;
for (auto it = range.first; it != range.second; it++) {
set.insert(it->second);
}
for (auto it = set.begin(); it != set.end(); it++) {
if (handleSubscription(type, filename, *it)) {
(*it)->watcher->notify();
}
}
}
bool WasmBackend::handleSubscription(int type, char *filename, std::shared_ptr<WasmSubscription> sub) {
// Build full path and check if its in our ignore list.
WatcherRef watcher = sub->watcher;
std::string path = std::string(sub->path);
if (filename[0] != '\0') {
path += "/" + std::string(filename);
}
if (watcher->isIgnored(path)) {
return false;
}
if (type == 1) {
struct stat st;
stat(path.c_str(), &st);
sub->tree->update(path, CONVERT_TIME(st.st_mtim));
watcher->mEvents.update(path);
} else if (type == 2) {
// Determine if this is a create or delete depending on if the file exists or not.
struct stat st;
if (lstat(path.c_str(), &st)) {
// If the entry being deleted/moved is a directory, remove it from the list of subscriptions
DirEntry *entry = sub->tree->find(path);
if (!entry) {
return false;
}
if (entry->isDir) {
std::string pathStart = path + DIR_SEP;
for (auto it = mSubscriptions.begin(); it != mSubscriptions.end();) {
if (it->second->path == path || it->second->path.rfind(pathStart, 0) == 0) {
wasm_backend_remove_watch(it->first);
it = mSubscriptions.erase(it);
} else {
++it;
}
}
// Remove all sub-entries
for (auto it = sub->tree->entries.begin(); it != sub->tree->entries.end();) {
if (it->first.rfind(pathStart, 0) == 0) {
watcher->mEvents.remove(it->first);
it = sub->tree->entries.erase(it);
} else {
it++;
}
}
}
watcher->mEvents.remove(path);
sub->tree->remove(path);
} else if (sub->tree->find(path)) {
sub->tree->update(path, CONVERT_TIME(st.st_mtim));
watcher->mEvents.update(path);
} else {
watcher->mEvents.create(path);
// If this is a create, check if it's a directory and start watching if it is.
DirEntry *entry = sub->tree->add(path, CONVERT_TIME(st.st_mtim), S_ISDIR(st.st_mode));
if (entry->isDir) {
watchDir(watcher, path, sub->tree);
}
}
}
return true;
}
void WasmBackend::unsubscribe(WatcherRef watcher) {
// Find any subscriptions pointing to this watcher, and remove them.
for (auto it = mSubscriptions.begin(); it != mSubscriptions.end();) {
if (it->second->watcher.get() == watcher.get()) {
if (mSubscriptions.count(it->first) == 1) {
wasm_backend_remove_watch(it->first);
}
it = mSubscriptions.erase(it);
} else {
it++;
}
}
}
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2020: LibDefinition;
@@ -0,0 +1,885 @@
flf2a$ 5 4 10 62 8
This font is (c) Michel Eftimakis 1995 -- Version 2.0 -- 27 jan 1995
____________________________________________________________ /`____
| Michel Eftimakis | "Ascii-Artist" '\/ |
| Michel.Eftimakis@ustc.vlsi.com | Boo)- (00) ||
| Tel : (33) 92 96 27 19 | (_`'_) ||
|__ Fax : (33) 92 96 27 01 _________|____ FRANCE ___________ _!!_ ____||
|_____________________________________________________________________|
$@
$@
$@
$@
$@@
||@
L|@
@
()@
@@
@
[][]@
$ @
$ @
@@
@
_||_||_@
|| || @
-L|-L|-@
@@
|L @
/ _|@
\_ \@
|__/@
L| @@
@
()/7@
// @
//()@
@@
_ @
(o) @
/oV7@
\_n\@
@@
_@
//@
$@
$@
@@
_@
//@
||$@
||$@
\\@@
_ @
\\ @
$||@
$||@
// @@
. ,@
x @
' `@
$ @
@@
@
_||_ @
|_ _|@
L| @
@@
@
@
@
()$@
V @@
@
@
__ @
|__|@
@@
@
@
@
()$@
@@
_@
//@
// @
// @
@@
_ @
/ \ @
| 0 |@
\_/ @
@@
_ @
/o|@
$||@
$L|@
@@
__ @
[o )@
/( @
/__|@
@@
___@
|_ /@
__)\@
\__/@
@@
. @
/| @
/o| @
L___|@
@@
__ @
| _/@
\_ \@
|__/@
@@
_ @
// @
/o \@
\__/@
@@
____@
|__ /@
// @
// @
@@
__ @
(o )@
/o \@
\__/@
@@
__ @
/o \@
\_ /@
// @
@@
@
@
()@
()@
@@
@
@
()@
()@
V @@
_@
//@
<<$@
\\@
@@
@
___ @
|___|@
|___|@
@@
_ @
\\ @
$>>@
// @
@@
__ @
|o )@
// @
$ @
() @@
__ @
/_ \@
((o_/@
$\__7@
@@
_ @
/ \ @
| o |@
|_n_|@
@@
___ @
| o )@
| o \@
|___/@
@@
__ @
/ _|@
( (_ @
\__|@
@@
__ @
| \ @
| o )@
|__/ @
@@
___ @
| __|@
| _| @
|___|@
@@
___ @
| __|@
| _| @
|_| @
@@
__ @
/ _|@
( |_n@
\__/@
@@
_ _ @
| U |@
| |@
|_n_|@
@@
_ @
| |@
| |@
|_|@
@@
_ @
| |@
n_| |@
\__/ @
@@
_ _@
| |//@
| ( @
|_|\\@
@@
_ @
| | @
| |_ @
|___|@
@@
_ _ @
| \_/ |@
| \_/ |@
|_| |_|@
@@
_ _ @
| \| |@
| \\ |@
|_|\_|@
@@
_ @
/ \ @
( o )@
\_/ @
@@
___ @
| o \@
| _/@
|_| @
@@
_ @
/ \ @
( o )@
\_,7@
@@
___ @
| o \@
| /@
|_|\\@
@@
__ @
/ _|@
\_ \@
|__/@
@@
___ @
|_ _|@
| | @
|_| @
@@
_ _ @
| | |@
| U |@
|___|@
@@
_ _ @
| | |@
| V |@
\_/ @
@@
_ _ _ @
| | | |@
| V V |@
\_n_/ @
@@
__ __@
\ V /@
) ( @
/_n_\@
@@
__ __@
\ V /@
\ / @
|_| @
@@
___ @
|_ / @
/(_ @
/___|@
@@
__ @
| _|@
| |$@
| |$@
|__|@@
_ @
\\ @
\\ @
\\@
@@
__ @
|_ |@
$| |@
$| |@
|__|@@
_ @
/n\@
$ @
$ @
@@
@
@
@
___ @
|___|@@
_ @
\\@
$@
$@
@@
@
_ @
/o\ @
\_,]@
@@
@
|| @
|o\@
|_/@
@@
@
_@
//@
\\@
@@
@
||@
/o|@
\_|@
@@
@
_ @
/o\@
\( @
@@
__ @
/ _|@
| ] @
L| @
@@
@
_ @
/o\@
\_/@
_)@@
@
|| @
| \@
Ln|@
@@
@
()@
||@
L|@
@@
@
()@
||@
||@
//@@
@
|| @
|/7@
L|\@
@@
@
||@
||@
L|@
@@
@
_ _ @
|/ \ \@
L_n_n|@
@@
@
_ @
|/ \@
L_n|@
@@
@
_ @
/o\@
\_/@
@@
@
_ @
/o\@
|_/@
L| @@
@
_ @
/o\@
\_|@
L|@@
@
_ @
/_|@
L|$@
@@
@
_ @
(c'@
\_)@
@@
@
|| @
| ]@
L| @
@@
@
@
|U|@
\_/@
@@
@
@
\V7@
V @
@@
@
@
\VV7@
VV @
@@
@
@
\V7@
/n\@
@@
@
__ @
\ V7@
)/ @
// @@
@
__ @
|_ / @
/__|@
@@
_@
//@
/|$@
\|$@
\\@@
_ @
| |@
| |@
| |@
|_|@@
_ @
\\ @
$|\@
$|/@
// @@
_ @
//V7@
$ @
$ @
@@
()_()@
/ \ @
| o |@
|_n_|@
@@
()_()@
/ \ @
( o )@
\_/ @
@@
()_()@
| | |@
| U |@
|___|@
@@
@
O_O @
/o\ @
\_,]@
@@
@
O_O@
/o\@
\_/@
@@
@
O O@
|U|@
\_/@
@@
__ @
|o )@
|o \@
||_/@
L| @@
160
$@
$@
$@
$@
$@@
161
()@
@
||@
||@
L|@@
165
__ __@
\_V_/@
[___]@
|_| @
@@
166
||@
L|@
@
||@
L|@@
168
@
()()@
$$ @
$$ @
@@
183
_ @
(_)@
$ @
$ @
@@
192
\\ @
/ \ @
| o |@
|_n_|@
@@
193
// @
/ \ @
| o |@
|_n_|@
@@
194
/^\ @
/ \ @
| o |@
|_n_|@
@@
195
/\/ @
/ \ @
| o |@
|_n_|@
@@
196
()_()@
/ \ @
| o |@
|_n_|@
@@
197
(o) @
/ \ @
| o |@
|_n_|@
@@
198
____ @
/ __|@
| o _| @
|_n___|@
@@
199
__ @
/ _|@
( (_ @
\__|@
_) @@
200
\\_ @
| __|@
| _| @
|___|@
@@
201
//_ @
| __|@
| _| @
|___|@
@@
202
/^\ @
| __|@
| _| @
|___|@
@@
203
()_()@
| __|@
| _| @
|___|@
@@
204
\\@
| |@
| |@
|_|@
@@
205
//@
| |@
| |@
|_|@
@@
206
/^\@
| |@
| |@
|_|@
@@
207
()_()@
| | @
| | @
|_| @
@@
209
_/\/ @
| \| |@
| \\ |@
|_|\_|@
@@
210
\\ @
/ \ @
( o )@
\_/ @
@@
211
// @
/ \ @
( o )@
\_/ @
@@
212
/^\ @
/ \ @
( o )@
\_/ @
@@
213
/\/ @
/ \ @
( o )@
\_/ @
@@
214
()_()@
/ \ @
( o )@
\_/ @
@@
217
_\\ @
| | |@
| U |@
|___|@
@@
218
//_ @
| | |@
| U |@
|___|@
@@
219
/^\ @
| | |@
| U |@
|___|@
@@
220
()_()@
| | |@
| U |@
|___|@
@@
223
__ @
|o )@
|o \@
||_/@
L| @@
224
_ @
`` @
/o\ @
\_,]@
@@
225
_ @
'' @
/o\ @
\_,]@
@@
226
@
^ @
/o\ @
\_,]@
@@
227
@
~ @
/o\ @
\_,]@
@@
228
@
O_O @
/o\ @
\_,]@
@@
229
@
O @
/o\ @
\_,]@
@@
230
@
_ _ @
/oYo\@
\_,( @
@@
231
@
_@
//@
\\@
Z@@
232
_ @
``@
/o\@
\( @
@@
233
_@
''@
/o\@
\( @
@@
234
@
^ @
/o\@
\( @
@@
235
@
O_O@
/o\@
\( @
@@
236
_ @
``@
||@
L|@
@@
237
_@
''@
||@
L|@
@@
238
@
'`@
||@
L|@
@@
239
@
OO@
||@
L|@
@@
241
@
~ @
|/ \@
L_n|@
@@
242
_ @
``@
/o\@
\_/@
@@
243
_@
''@
/o\@
\_/@
@@
244
@
^ @
/o\@
\_/@
@@
245
@
~ @
/o\@
\_/@
@@
246
@
O_O@
/o\@
\_/@
@@
249
_ @
``@
|U|@
\_/@
@@
250
_@
''@
|U|@
\_/@
@@
251
@
^ @
|U|@
\_/@
@@
252
@
O O@
|U|@
\_/@
@@
253
_ @
_'' @
\ V7@
)/ @
// @@
255
@
_O O@
\ V7@
)/ @
// @@
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _callSuper;
var _getPrototypeOf = require("./getPrototypeOf.js");
var _isNativeReflectConstruct = require("./isNativeReflectConstruct.js");
var _possibleConstructorReturn = require("./possibleConstructorReturn.js");
function _callSuper(_this, derived, args) {
derived = (0, _getPrototypeOf.default)(derived);
return (0, _possibleConstructorReturn.default)(_this, (0, _isNativeReflectConstruct.default)() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf.default)(_this).constructor) : derived.apply(_this, args));
}
//# sourceMappingURL=callSuper.js.map
@@ -0,0 +1,40 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/router.ts
/**
* @module
* This module provides types definitions and variables for the routers.
*/
/**
* Constant representing all HTTP methods in uppercase.
*/
const METHOD_NAME_ALL = "ALL";
/**
* Constant representing all HTTP methods in lowercase.
*/
const METHOD_NAME_ALL_LOWERCASE = "all";
/**
* Array of supported HTTP methods.
*/
const METHODS = [
"get",
"post",
"put",
"delete",
"options",
"patch",
"query"
];
/**
* Error message indicating that a route cannot be added because the matcher is already built.
*/
const MESSAGE_MATCHER_IS_ALREADY_BUILT = "Can not add a route since the matcher is already built.";
/**
* Error class representing an unsupported path error.
*/
var UnsupportedPathError = class extends Error {};
//#endregion
exports.MESSAGE_MATCHER_IS_ALREADY_BUILT = MESSAGE_MATCHER_IS_ALREADY_BUILT;
exports.METHODS = METHODS;
exports.METHOD_NAME_ALL = METHOD_NAME_ALL;
exports.METHOD_NAME_ALL_LOWERCASE = METHOD_NAME_ALL_LOWERCASE;
exports.UnsupportedPathError = UnsupportedPathError;
@@ -0,0 +1 @@
{"version":3,"file":"dom.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,13 @@
# `react-context`
## Installation
```sh
$ yarn add @radix-ui/react-context
# or
$ npm install @radix-ui/react-context
```
## Usage
This is an internal utility, not intended for public usage.
@@ -0,0 +1,3 @@
These files are compiled dot templates from dot folder.
Do NOT edit them directly, edit the templates and run `npm run build` from main ajv folder.
@@ -0,0 +1 @@
{"version":3,"names":["_defineProperty","require","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread2","target","i","arguments","length","source","forEach","key","defineProperty","getOwnPropertyDescriptors","defineProperties"],"sources":["../../src/helpers/objectSpread2.ts"],"sourcesContent":["/* @minVersion 7.5.0 */\n\nimport defineProperty from \"./defineProperty.ts\";\n\n// This function is different to \"Reflect.ownKeys\". The enumerableOnly\n// filters on symbol properties only. Returned string properties are always\n// enumerable. It is good to use in objectSpread.\n\nfunction ownKeys(\n object: object,\n enumerableOnly?: boolean | undefined,\n): (string | symbol)[] {\n var keys: (string | symbol)[] = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n // sym already comes from `Object.getOwnPropertySymbols`, so getOwnPropertyDescriptor should always be defined\n return Object.getOwnPropertyDescriptor(object, sym)!.enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\n\ntype Intersection<R extends any[]> = R extends [infer H, ...infer S]\n ? H & Intersection<S>\n : unknown;\n\nexport default function _objectSpread2<T extends object, U extends unknown[]>(\n target: T,\n ...sources: U\n): T & Intersection<U>;\nexport default function _objectSpread2(target: object) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(\n target,\n key,\n // key already comes from ownKeys, so getOwnPropertyDescriptor should always be defined\n Object.getOwnPropertyDescriptor(source, key)!,\n );\n });\n }\n }\n return target;\n}\n"],"mappings":";;;;;;AAEA,IAAAA,eAAA,GAAAC,OAAA;AAMA,SAASC,OAAOA,CACdC,MAAc,EACdC,cAAoC,EACf;EACrB,IAAIC,IAAyB,GAAGC,MAAM,CAACD,IAAI,CAACF,MAAM,CAAC;EACnD,IAAIG,MAAM,CAACC,qBAAqB,EAAE;IAChC,IAAIC,OAAO,GAAGF,MAAM,CAACC,qBAAqB,CAACJ,MAAM,CAAC;IAClD,IAAIC,cAAc,EAAE;MAClBI,OAAO,GAAGA,OAAO,CAACC,MAAM,CAAC,UAAUC,GAAG,EAAE;QAEtC,OAAOJ,MAAM,CAACK,wBAAwB,CAACR,MAAM,EAAEO,GAAG,CAAC,CAAEE,UAAU;MACjE,CAAC,CAAC;IACJ;IACAP,IAAI,CAACQ,IAAI,CAACC,KAAK,CAACT,IAAI,EAAEG,OAAO,CAAC;EAChC;EACA,OAAOH,IAAI;AACb;AAUe,SAASU,cAAcA,CAACC,MAAc,EAAE;EACrD,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGC,SAAS,CAACC,MAAM,EAAEF,CAAC,EAAE,EAAE;IACzC,IAAIG,MAAM,GAAGF,SAAS,CAACD,CAAC,CAAC,IAAI,IAAI,GAAGC,SAAS,CAACD,CAAC,CAAC,GAAG,CAAC,CAAC;IACrD,IAAIA,CAAC,GAAG,CAAC,EAAE;MACTf,OAAO,CAACI,MAAM,CAACc,MAAM,CAAC,EAAE,IAAI,CAAC,CAACC,OAAO,CAAC,UAAUC,GAAG,EAAE;QACnD,IAAAC,uBAAc,EAACP,MAAM,EAAEM,GAAG,EAAEF,MAAM,CAACE,GAAG,CAAC,CAAC;MAC1C,CAAC,CAAC;IACJ,CAAC,MAAM,IAAIhB,MAAM,CAACkB,yBAAyB,EAAE;MAC3ClB,MAAM,CAACmB,gBAAgB,CAACT,MAAM,EAAEV,MAAM,CAACkB,yBAAyB,CAACJ,MAAM,CAAC,CAAC;IAC3E,CAAC,MAAM;MACLlB,OAAO,CAACI,MAAM,CAACc,MAAM,CAAC,CAAC,CAACC,OAAO,CAAC,UAAUC,GAAG,EAAE;QAC7ChB,MAAM,CAACiB,cAAc,CACnBP,MAAM,EACNM,GAAG,EAEHhB,MAAM,CAACK,wBAAwB,CAACS,MAAM,EAAEE,GAAG,CAC7C,CAAC;MACH,CAAC,CAAC;IACJ;EACF;EACA,OAAON,MAAM;AACf","ignoreList":[]}
@@ -0,0 +1 @@
.grid-stack{position:relative}.grid-stack-rtl{direction:ltr}.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack-placeholder>.placeholder-content{background-color:rgba(0,0,0,.1);margin:0;position:absolute;width:auto;z-index:0!important}.grid-stack>.grid-stack-item{position:absolute;padding:0;top:0;width:var(--gs-column-width);height:var(--gs-cell-height)}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item.size-to-content:not(.size-to-content-max)>.grid-stack-item-content{overflow-y:hidden}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item{right:0}.grid-stack>.grid-stack-item>.grid-stack-item-content,.grid-stack>.grid-stack-placeholder>.placeholder-content{top:var(--gs-item-margin-top);right:var(--gs-item-margin-right);bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se,.grid-stack-item>.ui-resizable-sw{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="%23666" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 20 20"><path d="m10 3 2 2H8l2-2v14l-2-2h4l-2 2"/></svg>');background-repeat:no-repeat;background-position:center}.grid-stack-item>.ui-resizable-ne{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-se{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:var(--gs-item-margin-top);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:var(--gs-item-margin-top);left:25px;right:25px}.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:var(--gs-item-margin-top);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px;right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:var(--gs-item-margin-bottom);right:25px}.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px;left:var(--gs-item-margin-left)}.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack-item.ui-draggable-dragging{will-change:left,right,top}.grid-stack-item.ui-resizable-resizing{will-change:width,height}.ui-draggable-dragging,.ui-resizable-resizing{z-index:10000}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px rgba(0,0,0,.2);opacity:.8}.grid-stack-animate,.grid-stack-animate .grid-stack-item{transition:left .3s,right .3s,top .3s,height .3s,width .3s}.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack-animate .grid-stack-item.ui-resizable-resizing{transition:left 0s,right 0s,top 0s,height 0s,width 0s}.grid-stack>.grid-stack-item[gs-y="0"]{top:0}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item[gs-x="0"]{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item[gs-x="0"]{right:0}
@@ -0,0 +1 @@
{"version":3,"file":"link-2.js","sources":["../../../src/icons/link-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Link2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOSAxN0g3QTUgNSAwIDAgMSA3IDdoMiIgLz4KICA8cGF0aCBkPSJNMTUgN2gyYTUgNSAwIDEgMSAwIDEwaC0yIiAvPgogIDxsaW5lIHgxPSI4IiB4Mj0iMTYiIHkxPSIxMiIgeTI9IjEyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/link-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 Link2 = createLucideIcon('Link2', [\n ['path', { d: 'M9 17H7A5 5 0 0 1 7 7h2', key: '8i5ue5' }],\n ['path', { d: 'M15 7h2a5 5 0 1 1 0 10h-2', key: '1b9ql8' }],\n ['line', { x1: '8', x2: '16', y1: '12', y2: '12', key: '1jonct' }],\n]);\n\nexport default Link2;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC1D,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,238 @@
import process from 'node:process';
import fs from 'node:fs/promises';
import path, { resolve } from 'node:path';
import { existsSync } from 'node:fs';
import { x } from 'tinyexec';
const AGENTS = [
"npm",
"yarn",
"yarn@berry",
"pnpm",
"pnpm@6",
"bun",
"deno"
];
const LOCKS = {
"bun.lock": "bun",
"bun.lockb": "bun",
"deno.lock": "deno",
"pnpm-lock.yaml": "pnpm",
"pnpm-workspace.yaml": "pnpm",
"yarn.lock": "yarn",
"package-lock.json": "npm",
"npm-shrinkwrap.json": "npm"
};
const INSTALL_METADATA = {
"node_modules/.deno/": "deno",
"node_modules/.pnpm/": "pnpm",
"node_modules/.yarn-state.yml": "yarn",
// yarn v2+ (node-modules)
"node_modules/.yarn_integrity": "yarn",
// yarn v1
"node_modules/.package-lock.json": "npm",
".pnp.cjs": "yarn",
// yarn v3+ (pnp)
".pnp.js": "yarn",
// yarn v2 (pnp)
"bun.lock": "bun",
"bun.lockb": "bun"
};
async function pathExists(path2, type) {
try {
const stat = await fs.stat(path2);
return type === "file" ? stat.isFile() : stat.isDirectory();
} catch {
return false;
}
}
function* lookup(cwd = process.cwd()) {
let directory = path.resolve(cwd);
const { root } = path.parse(directory);
while (directory && directory !== root) {
yield directory;
directory = path.dirname(directory);
}
}
async function parsePackageJson(filepath, onUnknown) {
return !filepath || !pathExists(filepath, "file") ? null : await handlePackageManager(filepath, onUnknown);
}
async function detect(options = {}) {
const {
cwd,
strategies = ["lockfile", "packageManager-field", "devEngines-field"],
onUnknown
} = options;
let stopDir;
if (typeof options.stopDir === "string") {
const resolved = path.resolve(options.stopDir);
stopDir = (dir) => dir === resolved;
} else {
stopDir = options.stopDir;
}
for (const directory of lookup(cwd)) {
for (const strategy of strategies) {
switch (strategy) {
case "lockfile": {
for (const lock of Object.keys(LOCKS)) {
if (await pathExists(path.join(directory, lock), "file")) {
const name = LOCKS[lock];
const result = await parsePackageJson(path.join(directory, "package.json"), onUnknown);
if (result)
return result;
else
return { name, agent: name };
}
}
break;
}
case "packageManager-field":
case "devEngines-field": {
const result = await parsePackageJson(path.join(directory, "package.json"), onUnknown);
if (result)
return result;
break;
}
case "install-metadata": {
for (const metadata of Object.keys(INSTALL_METADATA)) {
const fileOrDir = metadata.endsWith("/") ? "dir" : "file";
if (await pathExists(path.join(directory, metadata), fileOrDir)) {
const name = INSTALL_METADATA[metadata];
const agent = name === "yarn" ? isMetadataYarnClassic(metadata) ? "yarn" : "yarn@berry" : name;
return { name, agent };
}
}
break;
}
}
}
if (stopDir?.(directory))
break;
}
return null;
}
function getNameAndVer(pkg) {
const handelVer = (version) => version?.match(/\d+(\.\d+){0,2}/)?.[0] ?? version;
if (typeof pkg.packageManager === "string") {
const [name, ver] = pkg.packageManager.replace(/^\^/, "").split("@");
return { name, ver: handelVer(ver) };
}
if (typeof pkg.devEngines?.packageManager?.name === "string") {
return {
name: pkg.devEngines.packageManager.name,
ver: handelVer(pkg.devEngines.packageManager.version)
};
}
return void 0;
}
async function handlePackageManager(filepath, onUnknown) {
try {
const pkg = JSON.parse(await fs.readFile(filepath, "utf8"));
let agent;
const nameAndVer = getNameAndVer(pkg);
if (nameAndVer) {
const name = nameAndVer.name;
const ver = nameAndVer.ver;
let version = ver;
if (name === "yarn" && ver && Number.parseInt(ver) > 1) {
agent = "yarn@berry";
version = "berry";
return { name, agent, version };
} else if (name === "pnpm" && ver && Number.parseInt(ver) < 7) {
agent = "pnpm@6";
return { name, agent, version };
} else if (AGENTS.includes(name)) {
agent = name;
return { name, agent, version };
} else {
return onUnknown?.(pkg.packageManager) ?? null;
}
}
} catch {
}
return null;
}
function isMetadataYarnClassic(metadataPath) {
return metadataPath.endsWith(".yarn_integrity");
}
// src/detect.ts
async function detectPackageManager(cwd = process.cwd()) {
const result = await detect({
cwd,
onUnknown(packageManager) {
console.warn("[@antfu/install-pkg] Unknown packageManager:", packageManager);
return void 0;
}
});
return result?.agent || null;
}
async function installPackage(names, options = {}) {
const detectedAgent = options.packageManager || await detectPackageManager(options.cwd) || "npm";
const [agent] = detectedAgent.split("@");
if (!Array.isArray(names))
names = [names];
const args = (typeof options.additionalArgs === "function" ? options.additionalArgs(agent, detectedAgent) : options.additionalArgs) || [];
if (options.preferOffline) {
if (detectedAgent === "yarn@berry")
args.unshift("--cached");
else
args.unshift("--prefer-offline");
}
if (agent === "pnpm") {
args.unshift(
/**
* Prevent pnpm from removing installed devDeps while `NODE_ENV` is `production`
* @see https://pnpm.io/cli/install#--prod--p
*/
"--prod=false"
);
if (existsSync(resolve(options.cwd ?? process.cwd(), "pnpm-workspace.yaml"))) {
args.unshift("-w");
}
}
return x(
agent,
[
agent === "yarn" ? "add" : "install",
options.dev ? "-D" : "",
...args,
...names
].filter(Boolean),
{
nodeOptions: {
stdio: options.silent ? "ignore" : "inherit",
cwd: options.cwd
},
throwOnError: true
}
);
}
async function uninstallPackage(names, options = {}) {
const detectedAgent = options.packageManager || await detectPackageManager(options.cwd) || "npm";
const [agent] = detectedAgent.split("@");
if (!Array.isArray(names))
names = [names];
const args = options.additionalArgs || [];
if (agent === "pnpm" && existsSync(resolve(options.cwd ?? process.cwd(), "pnpm-workspace.yaml")))
args.unshift("-w");
return x(
agent,
[
agent === "yarn" ? "remove" : "uninstall",
options.dev ? "-D" : "",
...args,
...names
].filter(Boolean),
{
nodeOptions: {
stdio: options.silent ? "ignore" : "inherit",
cwd: options.cwd
},
throwOnError: true
}
);
}
export { detectPackageManager, installPackage, uninstallPackage };
@@ -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 BadgeIndianRupee = createLucideIcon("BadgeIndianRupee", [
[
"path",
{
d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",
key: "3c2336"
}
],
["path", { d: "M8 8h8", key: "1bis0t" }],
["path", { d: "M8 12h8", key: "1wcyev" }],
["path", { d: "m13 17-5-1h1a4 4 0 0 0 0-8", key: "nu2bwa" }]
]);
export { BadgeIndianRupee as default };
//# sourceMappingURL=badge-indian-rupee.js.map
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _interopRequireDefault;
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
//# sourceMappingURL=interopRequireDefault.js.map
@@ -0,0 +1 @@
{"version":3,"names":["tsRewriteRelativeImportExtensions","path","preserveJsx","test","replace","m","tsx","d","ext","cm","toLowerCase"],"sources":["../../src/helpers/tsRewriteRelativeImportExtensions.ts"],"sourcesContent":["/* @minVersion 7.27.0 */\n\n// https://github.com/microsoft/TypeScript/blob/71716a2868c87248af5020e33a84a2178d41a2d6/src/compiler/factory/emitHelpers.ts#L1451\nexport default function tsRewriteRelativeImportExtensions(\n path: unknown,\n preserveJsx?: boolean,\n) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(\n /\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+)?)\\.([cm]?)ts$/i,\n function (m, tsx, d, ext, cm) {\n return tsx\n ? preserveJsx\n ? \".jsx\"\n : \".js\"\n : d && (!ext || !cm)\n ? m\n : d + ext + \".\" + cm.toLowerCase() + \"js\";\n },\n );\n }\n return path;\n}\n"],"mappings":";;;;;;AAGe,SAASA,iCAAiCA,CACvDC,IAAa,EACbC,WAAqB,EACrB;EACA,IAAI,OAAOD,IAAI,KAAK,QAAQ,IAAI,UAAU,CAACE,IAAI,CAACF,IAAI,CAAC,EAAE;IACrD,OAAOA,IAAI,CAACG,OAAO,CACjB,iDAAiD,EACjD,UAAUC,CAAC,EAAEC,GAAG,EAAEC,CAAC,EAAEC,GAAG,EAAEC,EAAE,EAAE;MAC5B,OAAOH,GAAG,GACNJ,WAAW,GACT,MAAM,GACN,KAAK,GACPK,CAAC,KAAK,CAACC,GAAG,IAAI,CAACC,EAAE,CAAC,GAChBJ,CAAC,GACDE,CAAC,GAAGC,GAAG,GAAG,GAAG,GAAGC,EAAE,CAACC,WAAW,CAAC,CAAC,GAAG,IAAI;IAC/C,CACF,CAAC;EACH;EACA,OAAOT,IAAI;AACb","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"names":["_semver","require","_targets","prettifyVersion","version","major","minor","patch","semver","parse","parts","push","join","prettifyTargets","targets","Object","keys","reduce","results","target","value","unreleasedLabel","unreleasedLabels"],"sources":["../src/pretty.ts"],"sourcesContent":["import semver from \"semver\";\nimport { unreleasedLabels } from \"./targets.ts\";\nimport type { Targets, Target } from \"./types.ts\";\n\nexport function prettifyVersion(version: string) {\n if (typeof version !== \"string\") {\n return version;\n }\n\n const { major, minor, patch } = semver.parse(version);\n\n const parts = [major];\n\n if (minor || patch) {\n parts.push(minor);\n }\n\n if (patch) {\n parts.push(patch);\n }\n\n return parts.join(\".\");\n}\n\nexport function prettifyTargets(targets: Targets): Targets {\n return Object.keys(targets).reduce((results, target: Target) => {\n let value = targets[target];\n\n const unreleasedLabel =\n // @ts-expect-error undefined is strictly compared with string later\n unreleasedLabels[target];\n if (typeof value === \"string\" && unreleasedLabel !== value) {\n value = prettifyVersion(value);\n }\n\n results[target] = value;\n return results;\n }, {} as Targets);\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAGO,SAASE,eAAeA,CAACC,OAAe,EAAE;EAC/C,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;IAC/B,OAAOA,OAAO;EAChB;EAEA,MAAM;IAAEC,KAAK;IAAEC,KAAK;IAAEC;EAAM,CAAC,GAAGC,OAAM,CAACC,KAAK,CAACL,OAAO,CAAC;EAErD,MAAMM,KAAK,GAAG,CAACL,KAAK,CAAC;EAErB,IAAIC,KAAK,IAAIC,KAAK,EAAE;IAClBG,KAAK,CAACC,IAAI,CAACL,KAAK,CAAC;EACnB;EAEA,IAAIC,KAAK,EAAE;IACTG,KAAK,CAACC,IAAI,CAACJ,KAAK,CAAC;EACnB;EAEA,OAAOG,KAAK,CAACE,IAAI,CAAC,GAAG,CAAC;AACxB;AAEO,SAASC,eAAeA,CAACC,OAAgB,EAAW;EACzD,OAAOC,MAAM,CAACC,IAAI,CAACF,OAAO,CAAC,CAACG,MAAM,CAAC,CAACC,OAAO,EAAEC,MAAc,KAAK;IAC9D,IAAIC,KAAK,GAAGN,OAAO,CAACK,MAAM,CAAC;IAE3B,MAAME,eAAe,GAEnBC,yBAAgB,CAACH,MAAM,CAAC;IAC1B,IAAI,OAAOC,KAAK,KAAK,QAAQ,IAAIC,eAAe,KAAKD,KAAK,EAAE;MAC1DA,KAAK,GAAGjB,eAAe,CAACiB,KAAK,CAAC;IAChC;IAEAF,OAAO,CAACC,MAAM,CAAC,GAAGC,KAAK;IACvB,OAAOF,OAAO;EAChB,CAAC,EAAE,CAAC,CAAY,CAAC;AACnB","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"plane.js","sources":["../../../src/icons/plane.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Plane\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTcuOCAxOS4yIDE2IDExbDMuNS0zLjVDMjEgNiAyMS41IDQgMjEgM2MtMS0uNS0zIDAtNC41IDEuNUwxMyA4IDQuOCA2LjJjLS41LS4xLS45LjEtMS4xLjVsLS4zLjVjLS4yLjUtLjEgMSAuMyAxLjNMOSAxMmwtMiAzSDRsLTEgMSAzIDIgMiAzIDEtMXYtM2wzLTIgMy41IDUuM2MuMy40LjguNSAxLjMuM2wuNS0uMmMuNC0uMy42LS43LjUtMS4yeiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/plane\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 Plane = createLucideIcon('Plane', [\n [\n 'path',\n {\n d: 'M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z',\n key: '1v9wt8',\n },\n ],\n]);\n\nexport default Plane;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CACtC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,8 @@
/**
* Infers the `tsconfigRootDir` from the current call stack, using the V8 API.
*
* See https://v8.dev/docs/stack-trace-api
*
* This API is implemented in Deno and Bun as well.
*/
export declare function getTSConfigRootDirFromStack(): string | undefined;
@@ -0,0 +1,26 @@
'use strict';
var inspect = require('../');
var test = require('tape');
test('quoteStyle option', function (t) {
t['throws'](function () { inspect(null, { quoteStyle: false }); }, 'false is not a valid value');
t['throws'](function () { inspect(null, { quoteStyle: true }); }, 'true is not a valid value');
t['throws'](function () { inspect(null, { quoteStyle: '' }); }, '"" is not a valid value');
t['throws'](function () { inspect(null, { quoteStyle: {} }); }, '{} is not a valid value');
t['throws'](function () { inspect(null, { quoteStyle: [] }); }, '[] is not a valid value');
t['throws'](function () { inspect(null, { quoteStyle: 42 }); }, '42 is not a valid value');
t['throws'](function () { inspect(null, { quoteStyle: NaN }); }, 'NaN is not a valid value');
t['throws'](function () { inspect(null, { quoteStyle: function () {} }); }, 'a function is not a valid value');
t.equal(inspect('"', { quoteStyle: 'single' }), '\'"\'', 'double quote, quoteStyle: "single"');
t.equal(inspect('"', { quoteStyle: 'double' }), '"\\""', 'double quote, quoteStyle: "double"');
t.equal(inspect('\'', { quoteStyle: 'single' }), '\'\\\'\'', 'single quote, quoteStyle: "single"');
t.equal(inspect('\'', { quoteStyle: 'double' }), '"\'"', 'single quote, quoteStyle: "double"');
t.equal(inspect('`', { quoteStyle: 'single' }), '\'`\'', 'backtick, quoteStyle: "single"');
t.equal(inspect('`', { quoteStyle: 'double' }), '"`"', 'backtick, quoteStyle: "double"');
t.end();
});
@@ -0,0 +1 @@
{"version":3,"file":"fire-extinguisher.js","sources":["../../../src/icons/fire-extinguisher.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FireExtinguisher\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgNi41VjNhMSAxIDAgMCAwLTEtMWgtMmExIDEgMCAwIDAtMSAxdjMuNSIgLz4KICA8cGF0aCBkPSJNOSAxOGg4IiAvPgogIDxwYXRoIGQ9Ik0xOCAzaC0zIiAvPgogIDxwYXRoIGQ9Ik0xMSAzYTYgNiAwIDAgMC02IDZ2MTEiIC8+CiAgPHBhdGggZD0iTTUgMTNoNCIgLz4KICA8cGF0aCBkPSJNMTcgMTBhNCA0IDAgMCAwLTggMHYxMGEyIDIgMCAwIDAgMiAyaDRhMiAyIDAgMCAwIDItMloiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/fire-extinguisher\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 FireExtinguisher = createLucideIcon('FireExtinguisher', [\n ['path', { d: 'M15 6.5V3a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v3.5', key: 'sqyvz' }],\n ['path', { d: 'M9 18h8', key: 'i7pszb' }],\n ['path', { d: 'M18 3h-3', key: '7idoqj' }],\n ['path', { d: 'M11 3a6 6 0 0 0-6 6v11', key: '1v5je3' }],\n ['path', { d: 'M5 13h4', key: 'svpcxo' }],\n ['path', { d: 'M17 10a4 4 0 0 0-8 0v10a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2Z', key: 'vsjego' }],\n]);\n\nexport default FireExtinguisher;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmB,iBAAiB,kBAAoB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,SAAS,CAAA,CAAA;AAAA,CAAA,CAC5E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACzF,CAAC,CAAA,CAAA;;"}
@@ -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 FileUp = createLucideIcon("FileUp", [
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "M12 12v6", key: "3ahymv" }],
["path", { d: "m15 15-3-3-3 3", key: "15xj92" }]
]);
export { FileUp as default };
//# sourceMappingURL=file-up.js.map
@@ -0,0 +1 @@
{"version":3,"file":"file-plus.js","sources":["../../../src/icons/file-plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FilePlus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgMkg2YTIgMiAwIDAgMC0yIDJ2MTZhMiAyIDAgMCAwIDIgMmgxMmEyIDIgMCAwIDAgMi0yVjdaIiAvPgogIDxwYXRoIGQ9Ik0xNCAydjRhMiAyIDAgMCAwIDIgMmg0IiAvPgogIDxwYXRoIGQ9Ik05IDE1aDYiIC8+CiAgPHBhdGggZD0iTTEyIDE4di02IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/file-plus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FilePlus = createLucideIcon('FilePlus', [\n ['path', { d: 'M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z', key: '1rqfz7' }],\n ['path', { d: 'M14 2v4a2 2 0 0 0 2 2h4', key: 'tnqrlb' }],\n ['path', { d: 'M9 15h6', key: 'cctwl0' }],\n ['path', { d: 'M12 18v-6', key: '17g6i2' }],\n]);\n\nexport default FilePlus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sources":["../../../../src/effects/svg/index.ts"],"sourcesContent":["import { frame } from \"../../frameloop\"\nimport { MotionValue } from \"../../value\"\nimport { addAttrValue } from \"../attr\"\nimport { MotionValueState } from \"../MotionValueState\"\nimport { addStyleValue } from \"../style\"\nimport { createSelectorEffect } from \"../utils/create-dom-effect\"\nimport { createEffect } from \"../utils/create-effect\"\n\nfunction addSVGPathValue(\n element: SVGElement,\n state: MotionValueState,\n key: string,\n value: MotionValue\n) {\n frame.render(() => element.setAttribute(\"pathLength\", \"1\"))\n\n if (key === \"pathOffset\") {\n return state.set(key, value, () => {\n // Use unitless value to avoid Safari zoom bug\n const offset = state.latest[key]\n element.setAttribute(\"stroke-dashoffset\", `${-offset}`)\n })\n } else {\n if (!state.get(\"stroke-dasharray\")) {\n state.set(\"stroke-dasharray\", new MotionValue(\"1 1\"), () => {\n const { pathLength = 1, pathSpacing } = state.latest\n\n // Use unitless values to avoid Safari zoom bug\n element.setAttribute(\n \"stroke-dasharray\",\n `${pathLength} ${pathSpacing ?? 1 - Number(pathLength)}`\n )\n })\n }\n\n return state.set(key, value, undefined, state.get(\"stroke-dasharray\"))\n }\n}\n\nconst addSVGValue = (\n element: SVGElement,\n state: MotionValueState,\n key: string,\n value: MotionValue\n) => {\n if (key.startsWith(\"path\")) {\n return addSVGPathValue(element, state, key, value)\n } else if (key.startsWith(\"attr\")) {\n return addAttrValue(element, state, convertAttrKey(key), value)\n }\n\n const handler = key in element.style ? addStyleValue : addAttrValue\n return handler(element, state, key, value)\n}\n\nexport const svgEffect = /*@__PURE__*/ createSelectorEffect(\n /*@__PURE__*/ createEffect(addSVGValue)\n)\n\nfunction convertAttrKey(key: string) {\n return key.replace(/^attr([A-Z])/, (_, firstChar) =>\n firstChar.toLowerCase()\n )\n}\n"],"names":[],"mappings":";;;;;;;AAQA,SAAS,eAAe,CACpB,OAAmB,EACnB,KAAuB,EACvB,GAAW,EACX,KAAkB,EAAA;AAElB,IAAA,KAAK,CAAC,MAAM,CAAC,MAAM,OAAO,CAAC,YAAY,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;AAE3D,IAAA,IAAI,GAAG,KAAK,YAAY,EAAE;QACtB,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,MAAK;;YAE9B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;YAChC,OAAO,CAAC,YAAY,CAAC,mBAAmB,EAAE,GAAG,CAAC,MAAM,CAAA,CAAE,CAAC;AAC3D,QAAA,CAAC,CAAC;IACN;SAAO;QACH,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,EAAE;AAChC,YAAA,KAAK,CAAC,GAAG,CAAC,kBAAkB,EAAE,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE,MAAK;gBACvD,MAAM,EAAE,UAAU,GAAG,CAAC,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC,MAAM;;AAGpD,gBAAA,OAAO,CAAC,YAAY,CAChB,kBAAkB,EAClB,CAAA,EAAG,UAAU,CAAA,CAAA,EAAI,WAAW,IAAI,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA,CAAE,CAC3D;AACL,YAAA,CAAC,CAAC;QACN;AAEA,QAAA,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAC1E;AACJ;AAEA,MAAM,WAAW,GAAG,CAChB,OAAmB,EACnB,KAAuB,EACvB,GAAW,EACX,KAAkB,KAClB;AACA,IAAA,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;QACxB,OAAO,eAAe,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC;IACtD;AAAO,SAAA,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;AAC/B,QAAA,OAAO,YAAY,CAAC,OAAO,EAAE,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC;IACnE;AAEA,IAAA,MAAM,OAAO,GAAG,GAAG,IAAI,OAAO,CAAC,KAAK,GAAG,aAAa,GAAG,YAAY;IACnE,OAAO,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC;AAC9C,CAAC;AAEM,MAAM,SAAS,iBAAiB,oBAAoB;AACvD,cAAc,YAAY,CAAC,WAAW,CAAC;AAG3C,SAAS,cAAc,CAAC,GAAW,EAAA;AAC/B,IAAA,OAAO,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,SAAS,KAC5C,SAAS,CAAC,WAAW,EAAE,CAC1B;AACL;;;;"}
@@ -0,0 +1,402 @@
"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;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-deprecated',
meta: {
type: 'problem',
docs: {
description: 'Disallow using code marked as `@deprecated`',
recommended: 'strict',
requiresTypeChecking: true,
},
messages: {
deprecated: `\`{{name}}\` is deprecated.`,
deprecatedWithReason: `\`{{name}}\` is deprecated. {{reason}}`,
},
schema: [
{
type: 'object',
additionalProperties: false,
properties: {
allow: {
...util_1.typeOrValueSpecifiersSchema,
description: 'Type specifiers that can be allowed.',
},
},
},
],
},
defaultOptions: [
{
allow: [],
},
],
create(context, [options]) {
const { jsDocParsingMode } = context.languageOptions.parserOptions;
const allow = options.allow;
if (jsDocParsingMode === 'none' || jsDocParsingMode === 'type-info') {
throw new Error(`Cannot be used with jsDocParsingMode: '${jsDocParsingMode}'.`);
}
const services = (0, util_1.getParserServices)(context);
const checker = services.program.getTypeChecker();
// Deprecated jsdoc tags can be added on some symbol alias, e.g.
//
// export { /** @deprecated */ foo }
//
// When we import foo, its symbol is an alias of the exported foo (the one
// with the deprecated tag), which is itself an alias of the original foo.
// Therefore, we carefully go through the chain of aliases and check each
// immediate alias for deprecated tags
function searchForDeprecationInAliasesChain(symbol, checkDeprecationsOfAliasedSymbol) {
if (!symbol || !tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.Alias)) {
return checkDeprecationsOfAliasedSymbol
? getJsDocDeprecation(symbol)
: undefined;
}
const targetSymbol = checker.getAliasedSymbol(symbol);
while (tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.Alias)) {
const reason = getJsDocDeprecation(symbol);
if (reason != null) {
return reason;
}
const immediateAliasedSymbol = symbol.getDeclarations() && checker.getImmediateAliasedSymbol(symbol);
if (!immediateAliasedSymbol) {
break;
}
symbol = immediateAliasedSymbol;
if (checkDeprecationsOfAliasedSymbol && symbol === targetSymbol) {
return getJsDocDeprecation(symbol);
}
}
return undefined;
}
function isDeclaration(node) {
const { parent } = node;
switch (parent.type) {
case utils_1.AST_NODE_TYPES.ArrayPattern:
return parent.elements.includes(node);
case utils_1.AST_NODE_TYPES.ClassExpression:
case utils_1.AST_NODE_TYPES.ClassDeclaration:
case utils_1.AST_NODE_TYPES.VariableDeclarator:
case utils_1.AST_NODE_TYPES.TSEnumMember:
return parent.id === node;
case utils_1.AST_NODE_TYPES.MethodDefinition:
case utils_1.AST_NODE_TYPES.PropertyDefinition:
case utils_1.AST_NODE_TYPES.AccessorProperty:
return parent.key === node;
case utils_1.AST_NODE_TYPES.Property:
// foo in "const { foo } = bar" will be processed twice, as parent.key
// and parent.value. The second is treated as a declaration.
if (parent.shorthand && parent.value === node) {
return parent.parent.type === utils_1.AST_NODE_TYPES.ObjectPattern;
}
if (parent.value === node) {
return false;
}
return parent.parent.type === utils_1.AST_NODE_TYPES.ObjectExpression;
case utils_1.AST_NODE_TYPES.AssignmentPattern:
// foo in "const { foo = "" } = bar" will be processed twice, as parent.parent.key
// and parent.left. The second is treated as a declaration.
return parent.left === node;
case utils_1.AST_NODE_TYPES.ArrowFunctionExpression:
case utils_1.AST_NODE_TYPES.FunctionDeclaration:
case utils_1.AST_NODE_TYPES.FunctionExpression:
case utils_1.AST_NODE_TYPES.TSDeclareFunction:
case utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression:
case utils_1.AST_NODE_TYPES.TSEnumDeclaration:
case utils_1.AST_NODE_TYPES.TSInterfaceDeclaration:
case utils_1.AST_NODE_TYPES.TSMethodSignature:
case utils_1.AST_NODE_TYPES.TSModuleDeclaration:
case utils_1.AST_NODE_TYPES.TSParameterProperty:
case utils_1.AST_NODE_TYPES.TSPropertySignature:
case utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration:
case utils_1.AST_NODE_TYPES.TSTypeParameter:
return true;
// treat `export import Bar = Foo;` (and `import Foo = require('...')`) as declarations
case utils_1.AST_NODE_TYPES.TSImportEqualsDeclaration:
return parent.id === node;
default:
return false;
}
}
function isInsideImport(node) {
let current = node;
while (true) {
switch (current.type) {
case utils_1.AST_NODE_TYPES.ImportDeclaration:
return true;
case utils_1.AST_NODE_TYPES.ArrowFunctionExpression:
case utils_1.AST_NODE_TYPES.ExportAllDeclaration:
case utils_1.AST_NODE_TYPES.ExportNamedDeclaration:
case utils_1.AST_NODE_TYPES.BlockStatement:
case utils_1.AST_NODE_TYPES.ClassDeclaration:
case utils_1.AST_NODE_TYPES.TSInterfaceDeclaration:
case utils_1.AST_NODE_TYPES.FunctionDeclaration:
case utils_1.AST_NODE_TYPES.FunctionExpression:
case utils_1.AST_NODE_TYPES.Program:
case utils_1.AST_NODE_TYPES.TSUnionType:
case utils_1.AST_NODE_TYPES.VariableDeclarator:
return false;
default:
current = current.parent;
}
}
}
function getJsDocDeprecation(symbol) {
let jsDocTags;
try {
jsDocTags = symbol?.getJsDocTags(checker);
}
catch {
// workaround for https://github.com/microsoft/TypeScript/issues/60024
return;
}
const tag = jsDocTags?.find(tag => tag.name === 'deprecated');
if (!tag) {
return undefined;
}
const displayParts = tag.text;
return displayParts ? ts.displayPartsToString(displayParts) : '';
}
function isNodeCalleeOfParent(node) {
switch (node.parent?.type) {
case utils_1.AST_NODE_TYPES.NewExpression:
case utils_1.AST_NODE_TYPES.CallExpression:
return node.parent.callee === node;
case utils_1.AST_NODE_TYPES.TaggedTemplateExpression:
return node.parent.tag === node;
case utils_1.AST_NODE_TYPES.JSXOpeningElement:
return node.parent.name === node;
default:
return false;
}
}
function getCallLikeNode(node) {
let callee = node;
while (callee.parent?.type === utils_1.AST_NODE_TYPES.MemberExpression &&
callee.parent.property === callee) {
callee = callee.parent;
}
return isNodeCalleeOfParent(callee) ? callee : undefined;
}
function getCallLikeDeprecation(node) {
const tsNode = services.esTreeNodeToTSNodeMap.get(node.parent);
// If the node is a direct function call, we look for its signature.
const signature = (0, util_1.nullThrows)(checker.getResolvedSignature(tsNode), 'Expected call like node to have signature');
const symbol = services.getSymbolAtLocation(node);
const aliasedSymbol = symbol != null && tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.Alias)
? checker.getAliasedSymbol(symbol)
: symbol;
const symbolDeclarationKind = aliasedSymbol?.declarations?.[0].kind;
// Properties with function-like types have "deprecated" jsdoc
// on their symbols, not on their signatures:
//
// interface Props {
// /** @deprecated */
// property: () => 'foo'
// ^symbol^ ^signature^
// }
if (symbolDeclarationKind !== ts.SyntaxKind.MethodDeclaration &&
symbolDeclarationKind !== ts.SyntaxKind.FunctionDeclaration &&
symbolDeclarationKind !== ts.SyntaxKind.MethodSignature) {
return (searchForDeprecationInAliasesChain(symbol, true) ??
getJsDocDeprecation(signature) ??
getJsDocDeprecation(aliasedSymbol));
}
return (searchForDeprecationInAliasesChain(symbol,
// Here we're working with a function declaration or method.
// Both can have 1 or more overloads, each overload creates one
// ts.Declaration which is placed in symbol.declarations.
//
// Imagine the following code:
//
// function foo(): void
// /** @deprecated Some Reason */
// function foo(arg: string): void
// function foo(arg?: string): void {}
//
// foo() // <- foo is our symbol
//
// If we call getJsDocDeprecation(checker.getAliasedSymbol(symbol)),
// we get 'Some Reason', but after all, we are calling foo with
// a signature that is not deprecated!
// It works this way because symbol.getJsDocTags returns tags from
// all symbol declarations combined into one array. And AFAIK there is
// no publicly exported TS function that can tell us if a particular
// declaration is deprecated or not.
//
// So, in case of function and method declarations, we don't check original
// aliased symbol, but rely on the getJsDocDeprecation(signature) call below.
false) ?? getJsDocDeprecation(signature));
}
function getJSXAttributeDeprecation(openingElement, propertyName) {
const contextualType = (0, util_1.nullThrows)(services.getContextualType(openingElement.name), 'Expected JSX opening element name to have contextualType');
const symbol = contextualType.getProperty(propertyName);
return getJsDocDeprecation(symbol);
}
function getDeprecationReason(node) {
const callLikeNode = getCallLikeNode(node);
if (callLikeNode) {
return getCallLikeDeprecation(callLikeNode);
}
if (node.parent.type === utils_1.AST_NODE_TYPES.JSXAttribute &&
node.type !== utils_1.AST_NODE_TYPES.Super) {
return getJSXAttributeDeprecation(node.parent.parent, node.name);
}
if (node.parent.type === utils_1.AST_NODE_TYPES.Property &&
node.type !== utils_1.AST_NODE_TYPES.Super) {
const property = services
.getTypeAtLocation(node.parent.parent)
.getProperty(node.name);
const propertySymbol = services.getSymbolAtLocation(node);
const valueSymbol = checker.getShorthandAssignmentValueSymbol(propertySymbol?.valueDeclaration);
return (searchForDeprecationInAliasesChain(propertySymbol, true) ??
getJsDocDeprecation(property) ??
getJsDocDeprecation(propertySymbol) ??
getJsDocDeprecation(valueSymbol));
}
return searchForDeprecationInAliasesChain(services.getSymbolAtLocation(node), true);
}
function checkIdentifier(node) {
if (isDeclaration(node) || isInsideImport(node)) {
return;
}
const reason = getDeprecationReason(node);
if (reason == null) {
return;
}
const type = services.getTypeAtLocation(node);
if ((0, util_1.typeMatchesSomeSpecifier)(type, allow, services.program) ||
(0, util_1.valueMatchesSomeSpecifier)(node, allow, services.program, type)) {
return;
}
const name = getReportedNodeName(node);
context.report({
...(reason
? {
messageId: 'deprecatedWithReason',
data: { name, reason },
}
: {
messageId: 'deprecated',
data: { name },
}),
node,
});
}
function checkMemberExpression(node) {
if (!node.computed) {
return;
}
const propertyType = services.getTypeAtLocation(node.property);
if (propertyType.isLiteral()) {
const objectType = services.getTypeAtLocation(node.object);
const propertyName = propertyType.isStringLiteral()
? propertyType.value
: String(propertyType.value);
const property = objectType.getProperty(propertyName);
const reason = getJsDocDeprecation(property);
if (reason == null) {
return;
}
if ((0, util_1.typeMatchesSomeSpecifier)(objectType, allow, services.program)) {
return;
}
context.report({
...(reason
? {
messageId: 'deprecatedWithReason',
data: { name: propertyName, reason },
}
: {
messageId: 'deprecated',
data: { name: propertyName },
}),
node: node.property,
});
}
}
return {
Identifier(node) {
const { parent } = node;
if (parent.type === utils_1.AST_NODE_TYPES.ExportNamedDeclaration ||
parent.type === utils_1.AST_NODE_TYPES.ExportAllDeclaration) {
return;
}
// Computed identifier expressions are handled by checkMemberExpression
if (parent.type === utils_1.AST_NODE_TYPES.MemberExpression &&
parent.computed &&
parent.property === node) {
return;
}
if (parent.type === utils_1.AST_NODE_TYPES.ExportSpecifier) {
// only deal with the alias (exported) side, not the local binding
if (parent.exported !== node) {
return;
}
const symbol = services.getSymbolAtLocation(node);
const aliasDeprecation = getJsDocDeprecation(symbol);
if (aliasDeprecation != null) {
return;
}
}
// whether it's a plain identifier or the exported alias
checkIdentifier(node);
},
JSXIdentifier(node) {
if (node.parent.type !== utils_1.AST_NODE_TYPES.JSXClosingElement) {
checkIdentifier(node);
}
},
MemberExpression: checkMemberExpression,
PrivateIdentifier: checkIdentifier,
Super: checkIdentifier,
};
},
});
function getReportedNodeName(node) {
if (node.type === utils_1.AST_NODE_TYPES.Super) {
return 'super';
}
if (node.type === utils_1.AST_NODE_TYPES.PrivateIdentifier) {
return `#${node.name}`;
}
return node.name;
}
@@ -0,0 +1 @@
{"version":3,"file":"asterisk.js","sources":["../../../src/icons/asterisk.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Asterisk\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgNnYxMiIgLz4KICA8cGF0aCBkPSJNMTcuMTk2IDkgNi44MDQgMTUiIC8+CiAgPHBhdGggZD0ibTYuODA0IDkgMTAuMzkyIDYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/asterisk\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 Asterisk = createLucideIcon('Asterisk', [\n ['path', { d: 'M12 6v12', key: '1vza4d' }],\n ['path', { d: 'M17.196 9 6.804 15', key: '1ah31z' }],\n ['path', { d: 'm6.804 9 10.392 6', key: '1b6pxd' }],\n]);\n\nexport default Asterisk;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACnD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAqB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACpD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,23 @@
'use strict';
const fs = require('fs');
const {promisify} = require('util');
const pAccess = promisify(fs.access);
module.exports = async path => {
try {
await pAccess(path);
return true;
} catch (_) {
return false;
}
};
module.exports.sync = path => {
try {
fs.accessSync(path);
return true;
} catch (_) {
return false;
}
};
@@ -0,0 +1,40 @@
import { promises, existsSync } from 'node:fs';
import { isAbsolute, resolve, dirname, join, basename } from 'pathe';
class NodeSnapshotEnvironment {
constructor(options = {}) {
this.options = options;
}
getVersion() {
return "1";
}
getHeader() {
return `// Snapshot v${this.getVersion()}`;
}
async resolveRawPath(testPath, rawPath) {
return isAbsolute(rawPath) ? rawPath : resolve(dirname(testPath), rawPath);
}
async resolvePath(filepath) {
return join(join(dirname(filepath), this.options.snapshotsDirName ?? "__snapshots__"), `${basename(filepath)}.snap`);
}
async prepareDirectory(dirPath) {
await promises.mkdir(dirPath, { recursive: true });
}
async saveSnapshotFile(filepath, snapshot) {
await promises.mkdir(dirname(filepath), { recursive: true });
await promises.writeFile(filepath, snapshot, "utf-8");
}
async readSnapshotFile(filepath) {
if (!existsSync(filepath)) {
return null;
}
return promises.readFile(filepath, "utf-8");
}
async removeSnapshotFile(filepath) {
if (existsSync(filepath)) {
await promises.unlink(filepath);
}
}
}
export { NodeSnapshotEnvironment };
@@ -0,0 +1,9 @@
import { noJitter } from './no.jitter';
describe(`Testing ${noJitter.name}`, () => {
it(`when calling #noJitter with a delay,
it returns the same delay`, () => {
const delay = 100;
expect(noJitter(delay)).toBe(delay);
})
})
@@ -0,0 +1,36 @@
/**
* 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
* @noformat
*/
'use strict';
import type {ESNode} from 'hermes-estree';
import type {VisitorKeys as VisitorKeysType} from '../generated/ESTreeVisitorKeys';
import FlowVisitorKeys from '../generated/ESTreeVisitorKeys';
export function isNode(thing: mixed) /*: implies thing is {+[string]: mixed} */ {
return (
typeof thing === 'object' && thing != null && typeof thing.type === 'string'
);
}
export type {VisitorKeysType};
export function getVisitorKeys<T: ESNode>(
node: T,
visitorKeys?: ?VisitorKeysType,
): $ReadOnlyArray<$Keys<T>> {
const keys = (visitorKeys ?? FlowVisitorKeys)[node.type];
if (keys == null) {
throw new Error(`No visitor keys found for node type "${node.type}".`);
}
// $FlowExpectedError[prop-missing]
return keys;
}
@@ -0,0 +1,217 @@
import * as eslint from 'eslint';
import { Rule, AST } from 'eslint';
import * as estree from 'estree';
declare const READ: unique symbol;
declare const CALL: unique symbol;
declare const CONSTRUCT: unique symbol;
declare const ESM: unique symbol;
declare class ReferenceTracker {
constructor(globalScope: Scope$2, options?: {
mode?: "legacy" | "strict" | undefined;
globalObjectNames?: string[] | undefined;
} | undefined);
private variableStack;
private globalScope;
private mode;
private globalObjectNames;
iterateGlobalReferences<T>(traceMap: TraceMap$2<T>): IterableIterator<TrackedReferences$2<T>>;
iterateCjsReferences<T_1>(traceMap: TraceMap$2<T_1>): IterableIterator<TrackedReferences$2<T_1>>;
iterateEsmReferences<T_2>(traceMap: TraceMap$2<T_2>): IterableIterator<TrackedReferences$2<T_2>>;
iteratePropertyReferences<T_3>(node: Expression, traceMap: TraceMap$2<T_3>): IterableIterator<TrackedReferences$2<T_3>>;
private _iterateVariableReferences;
private _iteratePropertyReferences;
private _iterateLhsReferences;
private _iterateImportReferences;
}
declare namespace ReferenceTracker {
export { READ };
export { CALL };
export { CONSTRUCT };
export { ESM };
}
type Scope$2 = eslint.Scope.Scope;
type Expression = estree.Expression;
type TraceMap$2<T> = TraceMap$1<T>;
type TrackedReferences$2<T> = TrackedReferences$1<T>;
type StaticValue$2 = StaticValueProvided$1 | StaticValueOptional$1;
type StaticValueProvided$1 = {
optional?: undefined;
value: unknown;
};
type StaticValueOptional$1 = {
optional?: true;
value: undefined;
};
type ReferenceTrackerOptions$1 = {
globalObjectNames?: string[];
mode?: "legacy" | "strict";
};
type TraceMap$1<T = unknown> = {
[i: string]: TraceMapObject<T>;
};
type TraceMapObject<T> = {
[i: string]: TraceMapObject<T>;
[CALL]?: T;
[CONSTRUCT]?: T;
[READ]?: T;
[ESM]?: boolean;
};
type TrackedReferences$1<T> = {
info: T;
node: Rule.Node;
path: string[];
type: typeof CALL | typeof CONSTRUCT | typeof READ;
};
type HasSideEffectOptions$1 = {
considerGetters?: boolean;
considerImplicitTypeConversion?: boolean;
};
type PunctuatorToken<Value extends string> = AST.Token & {
type: "Punctuator";
value: Value;
};
type ArrowToken$1 = PunctuatorToken<"=>">;
type CommaToken$1 = PunctuatorToken<",">;
type SemicolonToken$1 = PunctuatorToken<";">;
type ColonToken$1 = PunctuatorToken<":">;
type OpeningParenToken$1 = PunctuatorToken<"(">;
type ClosingParenToken$1 = PunctuatorToken<")">;
type OpeningBracketToken$1 = PunctuatorToken<"[">;
type ClosingBracketToken$1 = PunctuatorToken<"]">;
type OpeningBraceToken$1 = PunctuatorToken<"{">;
type ClosingBraceToken$1 = PunctuatorToken<"}">;
declare function findVariable(initialScope: Scope$1, nameOrNode: string | Identifier): Variable | null;
type Scope$1 = eslint.Scope.Scope;
type Variable = eslint.Scope.Variable;
type Identifier = estree.Identifier;
declare function getFunctionHeadLocation(node: FunctionNode$1, sourceCode: SourceCode$2): SourceLocation | null;
type SourceCode$2 = eslint.SourceCode;
type FunctionNode$1 = estree.Function;
type SourceLocation = estree.SourceLocation;
declare function getFunctionNameWithKind(node: FunctionNode, sourceCode?: eslint.SourceCode | undefined): string;
type FunctionNode = estree.Function;
declare function getInnermostScope(initialScope: Scope, node: Node$4): Scope;
type Scope = eslint.Scope.Scope;
type Node$4 = estree.Node;
declare function getPropertyName(node: MemberExpression | MethodDefinition | Property | PropertyDefinition, initialScope?: eslint.Scope.Scope | undefined): string | null | undefined;
type MemberExpression = estree.MemberExpression;
type MethodDefinition = estree.MethodDefinition;
type Property = estree.Property;
type PropertyDefinition = estree.PropertyDefinition;
declare function getStaticValue(node: Node$3, initialScope?: eslint.Scope.Scope | null | undefined): StaticValue$1 | null;
type StaticValue$1 = StaticValue$2;
type Node$3 = estree.Node;
declare function getStringIfConstant(node: Node$2, initialScope?: eslint.Scope.Scope | null | undefined): string | null;
type Node$2 = estree.Node;
declare function hasSideEffect(node: Node$1, sourceCode: SourceCode$1, options?: HasSideEffectOptions$1 | undefined): boolean;
type Node$1 = estree.Node;
type SourceCode$1 = eslint.SourceCode;
declare function isArrowToken(token: CommentOrToken): token is ArrowToken$1;
declare function isCommaToken(token: CommentOrToken): token is CommaToken$1;
declare function isSemicolonToken(token: CommentOrToken): token is SemicolonToken$1;
declare function isColonToken(token: CommentOrToken): token is ColonToken$1;
declare function isOpeningParenToken(token: CommentOrToken): token is OpeningParenToken$1;
declare function isClosingParenToken(token: CommentOrToken): token is ClosingParenToken$1;
declare function isOpeningBracketToken(token: CommentOrToken): token is OpeningBracketToken$1;
declare function isClosingBracketToken(token: CommentOrToken): token is ClosingBracketToken$1;
declare function isOpeningBraceToken(token: CommentOrToken): token is OpeningBraceToken$1;
declare function isClosingBraceToken(token: CommentOrToken): token is ClosingBraceToken$1;
declare function isCommentToken(token: CommentOrToken): token is estree.Comment;
declare function isNotArrowToken(arg0: CommentOrToken): boolean;
declare function isNotCommaToken(arg0: CommentOrToken): boolean;
declare function isNotSemicolonToken(arg0: CommentOrToken): boolean;
declare function isNotColonToken(arg0: CommentOrToken): boolean;
declare function isNotOpeningParenToken(arg0: CommentOrToken): boolean;
declare function isNotClosingParenToken(arg0: CommentOrToken): boolean;
declare function isNotOpeningBracketToken(arg0: CommentOrToken): boolean;
declare function isNotClosingBracketToken(arg0: CommentOrToken): boolean;
declare function isNotOpeningBraceToken(arg0: CommentOrToken): boolean;
declare function isNotClosingBraceToken(arg0: CommentOrToken): boolean;
declare function isNotCommentToken(arg0: CommentOrToken): boolean;
type Token = eslint.AST.Token;
type Comment = estree.Comment;
type CommentOrToken = Comment | Token;
declare function isParenthesized(timesOrNode: Node | number, nodeOrSourceCode: Node | SourceCode, optionalSourceCode?: eslint.SourceCode | undefined): boolean;
type Node = estree.Node;
type SourceCode = eslint.SourceCode;
declare class PatternMatcher {
constructor(pattern: RegExp, options?: {
escaped?: boolean | undefined;
} | undefined);
execAll(str: string): IterableIterator<RegExpExecArray>;
test(str: string): boolean;
[Symbol.replace](str: string, replacer: string | ((...strs: string[]) => string)): string;
}
declare namespace _default {
export { CALL };
export { CONSTRUCT };
export { ESM };
export { findVariable };
export { getFunctionHeadLocation };
export { getFunctionNameWithKind };
export { getInnermostScope };
export { getPropertyName };
export { getStaticValue };
export { getStringIfConstant };
export { hasSideEffect };
export { isArrowToken };
export { isClosingBraceToken };
export { isClosingBracketToken };
export { isClosingParenToken };
export { isColonToken };
export { isCommaToken };
export { isCommentToken };
export { isNotArrowToken };
export { isNotClosingBraceToken };
export { isNotClosingBracketToken };
export { isNotClosingParenToken };
export { isNotColonToken };
export { isNotCommaToken };
export { isNotCommentToken };
export { isNotOpeningBraceToken };
export { isNotOpeningBracketToken };
export { isNotOpeningParenToken };
export { isNotSemicolonToken };
export { isOpeningBraceToken };
export { isOpeningBracketToken };
export { isOpeningParenToken };
export { isParenthesized };
export { isSemicolonToken };
export { PatternMatcher };
export { READ };
export { ReferenceTracker };
}
type StaticValue = StaticValue$2;
type StaticValueOptional = StaticValueOptional$1;
type StaticValueProvided = StaticValueProvided$1;
type ReferenceTrackerOptions = ReferenceTrackerOptions$1;
type TraceMap<T> = TraceMap$1<T>;
type TrackedReferences<T> = TrackedReferences$1<T>;
type HasSideEffectOptions = HasSideEffectOptions$1;
type ArrowToken = ArrowToken$1;
type CommaToken = CommaToken$1;
type SemicolonToken = SemicolonToken$1;
type ColonToken = ColonToken$1;
type OpeningParenToken = OpeningParenToken$1;
type ClosingParenToken = ClosingParenToken$1;
type OpeningBracketToken = OpeningBracketToken$1;
type ClosingBracketToken = ClosingBracketToken$1;
type OpeningBraceToken = OpeningBraceToken$1;
type ClosingBraceToken = ClosingBraceToken$1;
export { ArrowToken, CALL, CONSTRUCT, ClosingBraceToken, ClosingBracketToken, ClosingParenToken, ColonToken, CommaToken, ESM, HasSideEffectOptions, OpeningBraceToken, OpeningBracketToken, OpeningParenToken, PatternMatcher, READ, ReferenceTracker, ReferenceTrackerOptions, SemicolonToken, StaticValue, StaticValueOptional, StaticValueProvided, TraceMap, TrackedReferences, _default as default, findVariable, getFunctionHeadLocation, getFunctionNameWithKind, getInnermostScope, getPropertyName, getStaticValue, getStringIfConstant, hasSideEffect, isArrowToken, isClosingBraceToken, isClosingBracketToken, isClosingParenToken, isColonToken, isCommaToken, isCommentToken, isNotArrowToken, isNotClosingBraceToken, isNotClosingBracketToken, isNotClosingParenToken, isNotColonToken, isNotCommaToken, isNotCommentToken, isNotOpeningBraceToken, isNotOpeningBracketToken, isNotOpeningParenToken, isNotSemicolonToken, isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, isParenthesized, isSemicolonToken };
@@ -0,0 +1,37 @@
import { DateInput } from './types';
/**
* Parses a date from various input types.
* 从各种输入类型中解析日期。
*
* @param input - The input to parse, which can be a string, number, Date, or array of numbers.
* (要解析的输入,可以是字符串、数字、Date 对象或数字数组。)
* @param format - An optional format string that specifies the format of the input string if the input is a string.
* Or A boolean indicating whether the date should be in UTC.
* (可选的格式字符串,指定输入字符串的格式,如果输入是字符串。 或者是布尔值,表示日期是否应为 UTC。)
* @returns A Date object representing the parsed date. (表示解析后日期的 Date 对象。)
* @example
* ```ts
* // 从字符串中解析日期
* const result = parse('20231001123456', 'YYYYMMDDHHmmss');
* console.log(result); // 输出: 2023-10-01T12:34:56.000Z
*
* // 从 ISO 8601 字符串中解析日期
* const isoResult = parse('2023-10-01T12:34:56Z');
* console.log(isoResult); // 输出: 2023-10-01T12:34:56.000Z
*
* // 从数字数组中解析日期
* const arrayResult = parse([2023, 9, 1, 12, 34, 56]);
* console.log(arrayResult); // 输出: 2023-10-01T12:34:56.000Z
*
* // 从数字中解析日期
* const numberResult = parse(1696119296000);
* console.log(numberResult); // 输出: 2023-10-01T12:34:56.000Z
*
* // 从 Date 对象中解析日期
* const dateResult = parse(new Date('2023-10-01T12:34:56Z'));
* console.log(dateResult); // 输出: 2023-10-01T12:34:56.000Z
* ```
*/
export default function parse(input: DateInput | {
isValid: () => any;
}, format?: string): Date;
@@ -0,0 +1 @@
{"version":3,"file":"mouse-pointer-ban.js","sources":["../../../src/icons/mouse-pointer-ban.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MousePointerBan\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMi4wMzQgMi42ODFhLjQ5OC40OTggMCAwIDEgLjY0Ny0uNjQ3bDkgMy41YS41LjUgMCAwIDEtLjAzMy45NDRMOC4yMDQgNy41NDVhMSAxIDAgMCAwLS42Ni42NmwtMS4wNjYgMy40NDNhLjUuNSAwIDAgMS0uOTQ0LjAzM3oiIC8+CiAgPGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iNiIgLz4KICA8cGF0aCBkPSJtMTEuOCAxMS44IDguNCA4LjQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/mouse-pointer-ban\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 MousePointerBan = createLucideIcon('MousePointerBan', [\n [\n 'path',\n {\n d: 'M2.034 2.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.944L8.204 7.545a1 1 0 0 0-.66.66l-1.066 3.443a.5.5 0 0 1-.944.033z',\n key: '11pp1i',\n },\n ],\n ['circle', { cx: '16', cy: '16', r: '6', key: 'qoo3c4' }],\n ['path', { d: 'm11.8 11.8 8.4 8.4', key: 'oogvdj' }],\n]);\n\nexport default MousePointerBan;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAC1D,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACrD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"simpleStreamableHttp.js","sourceRoot":"","sources":["../../../../src/examples/client/simpleStreamableHttp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAEH,qBAAqB,EAErB,oBAAoB,EAEpB,uBAAuB,EAEvB,qBAAqB,EAErB,yBAAyB,EACzB,gCAAgC,EAChC,qCAAqC,EACrC,mBAAmB,EAInB,wBAAwB,EACxB,qBAAqB,EACrB,SAAS,EACT,QAAQ,EACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,2CAA2C;AAC3C,MAAM,QAAQ,GAAG,eAAe,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC,KAAK;IACpB,MAAM,EAAE,OAAO,CAAC,MAAM;CACzB,CAAC,CAAC;AAEH,0DAA0D;AAC1D,IAAI,iBAAiB,GAAG,CAAC,CAAC;AAE1B,uDAAuD;AACvD,IAAI,MAAM,GAAkB,IAAI,CAAC;AACjC,IAAI,SAAS,GAAyC,IAAI,CAAC;AAC3D,IAAI,SAAS,GAAG,2BAA2B,CAAC;AAC5C,IAAI,4BAA4B,GAAuB,SAAS,CAAC;AACjE,IAAI,SAAS,GAAuB,SAAS,CAAC;AAE9C,KAAK,UAAU,IAAI;IACf,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;IACtC,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;IAErC,sDAAsD;IACtD,MAAM,OAAO,EAAE,CAAC;IAEhB,wCAAwC;IACxC,SAAS,EAAE,CAAC;IACZ,WAAW,EAAE,CAAC;AAClB,CAAC;AAED,SAAS,SAAS;IACd,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;IACrC,OAAO,CAAC,GAAG,CAAC,2FAA2F,CAAC,CAAC;IACzG,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;IACrE,OAAO,CAAC,GAAG,CAAC,8DAA8D,CAAC,CAAC;IAC5E,OAAO,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;IACtE,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;IACnE,OAAO,CAAC,GAAG,CAAC,yEAAyE,CAAC,CAAC;IACvF,OAAO,CAAC,GAAG,CAAC,0HAA0H,CAAC,CAAC;IACxI,OAAO,CAAC,GAAG,CAAC,oDAAoD,CAAC,CAAC;IAClE,OAAO,CAAC,GAAG,CAAC,6EAA6E,CAAC,CAAC;IAC3F,OAAO,CAAC,GAAG,CAAC,iHAAiH,CAAC,CAAC;IAC/H,OAAO,CAAC,GAAG,CAAC,uGAAuG,CAAC,CAAC;IACrH,OAAO,CAAC,GAAG,CAAC,yEAAyE,CAAC,CAAC;IACvF,OAAO,CAAC,GAAG,CAAC,yGAAyG,CAAC,CAAC;IACvH,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;IACrE,OAAO,CAAC,GAAG,CAAC,0EAA0E,CAAC,CAAC;IACxF,OAAO,CAAC,GAAG,CAAC,yDAAyD,CAAC,CAAC;IACvE,OAAO,CAAC,GAAG,CAAC,gEAAgE,CAAC,CAAC;IAC9E,OAAO,CAAC,GAAG,CAAC,+CAA+C,CAAC,CAAC;IAC7D,OAAO,CAAC,GAAG,CAAC,iDAAiD,CAAC,CAAC;AACnE,CAAC;AAED,SAAS,WAAW;IAChB,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAC,KAAK,EAAC,EAAE;QACpC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACvC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC;QAEvC,IAAI,CAAC;YACD,QAAQ,OAAO,EAAE,CAAC;gBACd,KAAK,SAAS;oBACV,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;oBACvB,MAAM;gBAEV,KAAK,YAAY;oBACb,MAAM,UAAU,EAAE,CAAC;oBACnB,MAAM;gBAEV,KAAK,mBAAmB;oBACpB,MAAM,gBAAgB,EAAE,CAAC;oBACzB,MAAM;gBAEV,KAAK,WAAW;oBACZ,MAAM,SAAS,EAAE,CAAC;oBAClB,MAAM;gBAEV,KAAK,YAAY;oBACb,MAAM,SAAS,EAAE,CAAC;oBAClB,MAAM;gBAEV,KAAK,WAAW;oBACZ,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;wBAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;oBAClD,CAAC;yBAAM,CAAC;wBACJ,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;wBACzB,IAAI,QAAQ,GAAG,EAAE,CAAC;wBAClB,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;4BAClB,IAAI,CAAC;gCACD,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;4BACnD,CAAC;4BAAC,MAAM,CAAC;gCACL,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;4BAC7D,CAAC;wBACL,CAAC;wBACD,MAAM,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;oBACvC,CAAC;oBACD,MAAM;gBAEV,KAAK,OAAO;oBACR,MAAM,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC;oBAC3C,MAAM;gBAEV,KAAK,aAAa;oBACd,MAAM,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC;oBAChD,MAAM;gBAEV,KAAK,cAAc;oBACf,MAAM,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC;oBAChD,MAAM;gBAEV,KAAK,mBAAmB,CAAC,CAAC,CAAC;oBACvB,MAAM,uBAAuB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC;oBACpD,MAAM;gBACV,CAAC;gBAED,KAAK,qBAAqB,CAAC,CAAC,CAAC;oBACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;oBACxD,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;oBACnD,MAAM,kBAAkB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;oBAC1C,MAAM;gBACV,CAAC;gBAED,KAAK,0CAA0C,CAAC,CAAC,CAAC;oBAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;oBACxD,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;oBACnD,MAAM,oCAAoC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;oBAC5D,MAAM;gBACV,CAAC;gBAED,KAAK,gBAAgB;oBACjB,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;wBAClB,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;oBACvD,CAAC;yBAAM,CAAC;wBACJ,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;wBACzB,IAAI,QAAQ,GAAG,EAAE,CAAC;wBAClB,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;4BAClB,IAAI,CAAC;gCACD,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;4BACnD,CAAC;4BAAC,MAAM,CAAC;gCACL,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;4BAC7D,CAAC;wBACL,CAAC;wBACD,MAAM,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;oBAC3C,CAAC;oBACD,MAAM;gBAEV,KAAK,cAAc;oBACf,MAAM,WAAW,EAAE,CAAC;oBACpB,MAAM;gBAEV,KAAK,YAAY;oBACb,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;wBAClB,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;oBACnD,CAAC;yBAAM,CAAC;wBACJ,MAAM,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;wBAC3BLine truncated
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './user-round-check.js';
//# sourceMappingURL=user-check-2.js.map
@@ -0,0 +1 @@
{"version":3,"file":"scoring.cjs","sources":["../../../src/matcher/bruteforce/scoring.ts"],"sourcesContent":[null],"names":["token","guesses","BRUTEFORCE_CARDINALITY","length","Number","POSITIVE_INFINITY","MAX_VALUE","minGuesses","MIN_SUBMATCH_GUESSES_SINGLE_CHAR","MIN_SUBMATCH_GUESSES_MULTI_CHAR","Math","max"],"mappings":";;;;AAOA,wBAAe,CAAC;AAAEA,EAAAA;AAAK,CAAkC,KAAI;AAC3D,EAAA,IAAIC,OAAO,GAAGC,6BAAsB,IAAIF,KAAK,CAACG,MAAM;AACpD,EAAA,IAAIF,OAAO,KAAKG,MAAM,CAACC,iBAAiB,EAAE;IACxCJ,OAAO,GAAGG,MAAM,CAACE,SAAS;AAC5B,EAAA;AACA,EAAA,IAAIC,UAAU;AACd;AACA;AACA,EAAA,IAAIP,KAAK,CAACG,MAAM,KAAK,CAAC,EAAE;IACtBI,UAAU,GAAGC,uCAAgC,GAAG,CAAC;AACnD,EAAA,CAAC,MAAM;IACLD,UAAU,GAAGE,sCAA+B,GAAG,CAAC;AAClD,EAAA;AAEA,EAAA,OAAOC,IAAI,CAACC,GAAG,CAACV,OAAO,EAAEM,UAAU,CAAC;AACtC,CAAC;;;;"}
@@ -0,0 +1,9 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_utils_jwt_jwa = require("../../utils/jwt/jwa.js");
const require_middleware_jwt_jwt = require("./jwt.js");
exports.AlgorithmTypes = require_utils_jwt_jwa.AlgorithmTypes;
exports.decode = require_middleware_jwt_jwt.decode;
exports.jwt = require_middleware_jwt_jwt.jwt;
exports.sign = require_middleware_jwt_jwt.sign;
exports.verify = require_middleware_jwt_jwt.verify;
exports.verifyWithJwks = require_middleware_jwt_jwt.verifyWithJwks;
@@ -0,0 +1,273 @@
/**
* @fileoverview Rule to flag creation of function inside a loop
* @author Ilya Volodin
*/
"use strict";
//------------------------------------------------------------------------------
// Types
//------------------------------------------------------------------------------
/** @typedef {import("eslint-scope").Reference} Reference */
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const CONSTANT_BINDINGS = new Set(["const", "using", "await using"]);
/**
* Identifies is a node is a FunctionExpression which is part of an IIFE
* @param {ASTNode} node Node to test
* @returns {boolean} True if it's an IIFE
*/
function isIIFE(node) {
return (
(node.type === "FunctionExpression" ||
node.type === "ArrowFunctionExpression") &&
node.parent &&
node.parent.type === "CallExpression" &&
node.parent.callee === node
);
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
dialects: ["typescript", "javascript"],
language: "javascript",
docs: {
description:
"Disallow function declarations that contain unsafe references inside loop statements",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-loop-func",
},
schema: [],
messages: {
unsafeRefs:
"Function declared in a loop contains unsafe references to variable(s) {{ varNames }}.",
},
},
create(context) {
const SKIPPED_IIFE_NODES = new Set();
const sourceCode = context.sourceCode;
/**
* Gets the containing loop node of a specified node.
*
* We don't need to check nested functions, so this ignores those, with the exception of IIFE.
* `Scope.through` contains references of nested functions.
* @param {ASTNode} node An AST node to get.
* @returns {ASTNode|null} The containing loop node of the specified node, or
* `null`.
*/
function getContainingLoopNode(node) {
for (
let currentNode = node;
currentNode.parent;
currentNode = currentNode.parent
) {
const parent = currentNode.parent;
switch (parent.type) {
case "WhileStatement":
case "DoWhileStatement":
return parent;
case "ForStatement":
// `init` is outside of the loop.
if (parent.init !== currentNode) {
return parent;
}
break;
case "ForInStatement":
case "ForOfStatement":
// `right` is outside of the loop.
if (parent.right !== currentNode) {
return parent;
}
break;
case "ArrowFunctionExpression":
case "FunctionExpression":
case "FunctionDeclaration":
// We need to check nested functions only in case of IIFE.
if (SKIPPED_IIFE_NODES.has(parent)) {
break;
}
return null;
default:
break;
}
}
return null;
}
/**
* Gets the containing loop node of a given node.
* If the loop was nested, this returns the most outer loop.
* @param {ASTNode} node A node to get. This is a loop node.
* @param {ASTNode|null} excludedNode A node that the result node should not
* include.
* @returns {ASTNode} The most outer loop node.
*/
function getTopLoopNode(node, excludedNode) {
const border = excludedNode ? excludedNode.range[1] : 0;
let retv = node;
let containingLoopNode = node;
while (
containingLoopNode &&
containingLoopNode.range[0] >= border
) {
retv = containingLoopNode;
containingLoopNode = getContainingLoopNode(containingLoopNode);
}
return retv;
}
/**
* Checks whether a given reference which refers to an upper scope's variable is
* safe or not.
* @param {ASTNode} loopNode A containing loop node.
* @param {Reference} reference A reference to check.
* @returns {boolean} `true` if the reference is safe or not.
*/
function isSafe(loopNode, reference) {
const variable = reference.resolved;
const definition = variable && variable.defs[0];
const declaration = definition && definition.parent;
const kind =
declaration && declaration.type === "VariableDeclaration"
? declaration.kind
: "";
// Constant variables are safe.
if (CONSTANT_BINDINGS.has(kind)) {
return true;
}
/*
* Variables which are declared by `let` in the loop is safe.
* It's a different instance from the next loop step's.
*/
if (
kind === "let" &&
declaration.range[0] > loopNode.range[0] &&
declaration.range[1] < loopNode.range[1]
) {
return true;
}
/*
* WriteReferences which exist after this border are unsafe because those
* can modify the variable.
*/
const border = getTopLoopNode(
loopNode,
kind === "let" ? declaration : null,
).range[0];
/**
* Checks whether a given reference is safe or not.
* The reference is every reference of the upper scope's variable we are
* looking now.
*
* It's safe if the reference matches one of the following condition.
* - is readonly.
* - doesn't exist inside a local function and after the border.
* @param {Reference} upperRef A reference to check.
* @returns {boolean} `true` if the reference is safe.
*/
function isSafeReference(upperRef) {
const id = upperRef.identifier;
return (
!upperRef.isWrite() ||
(variable.scope.variableScope ===
upperRef.from.variableScope &&
id.range[0] < border)
);
}
return (
Boolean(variable) && variable.references.every(isSafeReference)
);
}
/**
* Reports functions which match the following condition:
*
* - has a loop node in ancestors.
* - has any references which refers to an unsafe variable.
* @param {ASTNode} node The AST node to check.
* @returns {void}
*/
function checkForLoops(node) {
const loopNode = getContainingLoopNode(node);
if (!loopNode) {
return;
}
const references = sourceCode.getScope(node).through;
// Check if the function is not asynchronous or a generator function
if (!(node.async || node.generator)) {
if (isIIFE(node)) {
const isFunctionExpression =
node.type === "FunctionExpression";
// Check if the function is referenced elsewhere in the code
const isFunctionReferenced =
isFunctionExpression && node.id
? references.some(
r => r.identifier.name === node.id.name,
)
: false;
if (!isFunctionReferenced) {
SKIPPED_IIFE_NODES.add(node);
return;
}
}
}
const unsafeRefs = [
...new Set(
references
.filter(r => r.resolved && !isSafe(loopNode, r))
.map(r => r.identifier.name),
),
];
if (unsafeRefs.length > 0) {
context.report({
node,
messageId: "unsafeRefs",
data: { varNames: `'${unsafeRefs.join("', '")}'` },
});
}
}
return {
ArrowFunctionExpression: checkForLoops,
FunctionExpression: checkForLoops,
FunctionDeclaration: checkForLoops,
};
},
};
@@ -0,0 +1,22 @@
//#region src/jsx/intrinsic-element/common.ts
const deDupeKeyMap = {
title: [],
script: ["src"],
style: ["data-href"],
link: ["href"],
meta: [
"name",
"httpEquiv",
"charset",
"itemProp"
]
};
const domRenderers = {};
const dataPrecedenceAttr = "data-precedence";
const isStylesheetLinkWithPrecedence = (props) => props.rel === "stylesheet" && "precedence" in props;
const shouldDeDupeByKey = (tagName, supportSort) => {
if (tagName === "link") return supportSort;
return deDupeKeyMap[tagName].length > 0;
};
//#endregion
export { dataPrecedenceAttr, deDupeKeyMap, domRenderers, isStylesheetLinkWithPrecedence, shouldDeDupeByKey };
@@ -0,0 +1,12 @@
import type { Diagnostic, Program, SourceFile } from 'typescript';
export interface SemanticOrSyntacticError extends Diagnostic {
message: string;
}
/**
* By default, diagnostics from the TypeScript compiler contain all errors - regardless of whether
* they are related to generic ECMAScript standards, or TypeScript-specific constructs.
*
* Therefore, we filter out all diagnostics, except for the ones we explicitly want to consider when
* the user opts in to throwing errors on semantic issues.
*/
export declare function getFirstSemanticOrSyntacticError(program: Program, ast: SourceFile): SemanticOrSyntacticError | undefined;
@@ -0,0 +1,73 @@
<p align="center">
<a href="https://github.com/lucide-icons/lucide">
<img src="https://lucide.dev/package-logos/lucide-react.svg" alt="Lucide icon library for React applications." width="540">
</a>
</p>
<p align="center">
Lucide icon library for React applications.
</p>
<div align="center">
[![npm](https://img.shields.io/npm/v/lucide-react?color=blue)](https://www.npmjs.com/package/lucide-react)
![NPM Downloads](https://img.shields.io/npm/dw/lucide-react)
[![GitHub](https://img.shields.io/github/license/lucide-icons/lucide)](https://lucide.dev/license)
</div>
<p align="center">
<a href="https://lucide.dev/guide/">About</a>
·
<a href="https://lucide.dev/icons/">Icons</a>
·
<a href="https://lucide.dev/guide/packages/lucide-react">Documentation</a>
·
<a href="https://lucide.dev/license">License</a>
</p>
# Lucide React
Implementation of the lucide icon library for React applications.
## Installation
```sh
pnpm add lucide-react
```
```sh
npm install lucide-react
```
```sh
yarn add lucide-react
```
```sh
bun add lucide-react
```
## Documentation
For full documentation, visit [lucide.dev](https://lucide.dev/guide/packages/lucide-react)
## Community
Join the [Discord server](https://discord.gg/EH6nSts) to chat with the maintainers and other users.
## License
Lucide is licensed under the ISC license. See [LICENSE](https://lucide.dev/license).
## Sponsors
<a href="https://vercel.com?utm_source=lucide&utm_campaign=oss">
<img src="https://lucide.dev/vercel.svg" alt="Powered by Vercel" width="200" />
</a>
<a href="https://www.digitalocean.com/?refcode=b0877a2caebd&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge"><img src="https://lucide.dev/digitalocean.svg" width="200" alt="DigitalOcean Referral Badge" /></a>
### Awesome backers 🍺
<a href="https://www.scipress.io?utm_source=lucide"><img src="https://lucide.dev/sponsors/scipress.svg" width="180" alt="Scipress sponsor badge" /></a>
<a href="https://github.com/pdfme/pdfme"><img src="https://lucide.dev/sponsors/pdfme.svg" width="180" alt="pdfme sponsor badge" /></a>
@@ -0,0 +1,42 @@
Browser-friendly inheritance fully compatible with standard node.js
[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).
This package exports standard `inherits` from node.js `util` module in
node environment, but also provides alternative browser-friendly
implementation through [browser
field](https://gist.github.com/shtylman/4339901). Alternative
implementation is a literal copy of standard one located in standalone
module to avoid requiring of `util`. It also has a shim for old
browsers with no `Object.create` support.
While keeping you sure you are using standard `inherits`
implementation in node.js environment, it allows bundlers such as
[browserify](https://github.com/substack/node-browserify) to not
include full `util` package to your client code if all you need is
just `inherits` function. It worth, because browser shim for `util`
package is large and `inherits` is often the single function you need
from it.
It's recommended to use this package instead of
`require('util').inherits` for any code that has chances to be used
not only in node.js but in browser too.
## usage
```js
var inherits = require('inherits');
// then use exactly as the standard one
```
## note on version ~1.0
Version ~1.0 had completely different motivation and is not compatible
neither with 2.0 nor with standard node.js `inherits`.
If you are using version ~1.0 and planning to switch to ~2.0, be
careful:
* new version uses `super_` instead of `super` for referencing
superclass
* new version overwrites current prototype while old one preserves any
existing fields on it
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"2":"_J"},C:{"2":"_S"},D:{"2":"_Q"},E:{"2":"_R"},F:{"2":"_c"},G:{"2":"_M"},H:{"2":"1D"},I:{"2":"_P"},J:{"2":"_B"},K:{"2":"_N"},L:{"2":"I"},M:{"2":"YC"},N:{"2":"_A"},O:{"2":"bC"},P:{"2":"_F"},Q:{"2":"JE"},R:{"2":"KE"},S:{"2":"_C"}},B:7,C:"Decorators",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sources":["../../../../src/effects/attr/index.ts"],"sourcesContent":["import { camelToDash } from \"../../render/dom/utils/camel-to-dash\"\nimport { MotionValue } from \"../../value\"\nimport { MotionValueState } from \"../MotionValueState\"\nimport { createSelectorEffect } from \"../utils/create-dom-effect\"\nimport { createEffect } from \"../utils/create-effect\"\n\nfunction canSetAsProperty(element: HTMLElement | SVGElement, name: string) {\n if (!(name in element)) return false\n\n const descriptor =\n Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element), name) ||\n Object.getOwnPropertyDescriptor(element, name)\n\n // Check if it has a setter\n return descriptor && typeof descriptor.set === \"function\"\n}\n\nexport const addAttrValue = (\n element: HTMLElement | SVGElement,\n state: MotionValueState,\n key: string,\n value: MotionValue\n) => {\n const isProp = canSetAsProperty(element, key)\n const name = isProp\n ? key\n : key.startsWith(\"data\") || key.startsWith(\"aria\")\n ? camelToDash(key)\n : key\n\n /**\n * Set attribute directly via property if available\n */\n const render = isProp\n ? () => {\n ;(element as any)[name] = state.latest[key]\n }\n : () => {\n const v = state.latest[key]\n if (v === null || v === undefined) {\n element.removeAttribute(name)\n } else {\n element.setAttribute(name, String(v))\n }\n }\n\n return state.set(key, value, render)\n}\n\nexport const attrEffect = /*@__PURE__*/ createSelectorEffect(\n /*@__PURE__*/ createEffect(addAttrValue)\n)\n"],"names":[],"mappings":";;;;AAMA,SAAS,gBAAgB,CAAC,OAAiC,EAAE,IAAY,EAAA;AACrE,IAAA,IAAI,EAAE,IAAI,IAAI,OAAO,CAAC;AAAE,QAAA,OAAO,KAAK;AAEpC,IAAA,MAAM,UAAU,GACZ,MAAM,CAAC,wBAAwB,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC;AACrE,QAAA,MAAM,CAAC,wBAAwB,CAAC,OAAO,EAAE,IAAI,CAAC;;IAGlD,OAAO,UAAU,IAAI,OAAO,UAAU,CAAC,GAAG,KAAK,UAAU;AAC7D;AAEO,MAAM,YAAY,GAAG,CACxB,OAAiC,EACjC,KAAuB,EACvB,GAAW,EACX,KAAkB,KAClB;IACA,MAAM,MAAM,GAAG,gBAAgB,CAAC,OAAO,EAAE,GAAG,CAAC;IAC7C,MAAM,IAAI,GAAG;AACT,UAAE;AACF,UAAE,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM;AACjD,cAAE,WAAW,CAAC,GAAG;cACf,GAAG;AAET;;AAEG;IACH,MAAM,MAAM,GAAG;UACT,MAAK;YACC,OAAe,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;QAC/C;UACA,MAAK;YACD,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;YAC3B,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,EAAE;AAC/B,gBAAA,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC;YACjC;iBAAO;gBACH,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;YACzC;AACJ,QAAA,CAAC;IAEP,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC;AACxC;AAEO,MAAM,UAAU,iBAAiB,oBAAoB;AACxD,cAAc,YAAY,CAAC,YAAY,CAAC;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"book-check.js","sources":["../../../src/icons/book-check.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BookCheck\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAxOS41di0xNUEyLjUgMi41IDAgMCAxIDYuNSAySDE5YTEgMSAwIDAgMSAxIDF2MThhMSAxIDAgMCAxLTEgMUg2LjVhMSAxIDAgMCAxIDAtNUgyMCIgLz4KICA8cGF0aCBkPSJtOSA5LjUgMiAyIDQtNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/book-check\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 BookCheck = createLucideIcon('BookCheck', [\n [\n 'path',\n {\n d: 'M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20',\n key: 'k3hazp',\n },\n ],\n ['path', { d: 'm9 9.5 2 2 4-4', key: '1dth82' }],\n]);\n\nexport default BookCheck;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAC9C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"names":["_core","require","isInType","path","parent","type","parentPath","exportKind","isStatement","isExpression","rewriteLiveReferences","programPath","metadata","wrapReference","imported","Map","exported","requeueInParent","requeue","source","data","localName","importName","imports","set","importsNamespace","local","exportMeta","get","push","names","rewriteBindingInitVisitorState","scope","traverse","rewriteBindingInitVisitor","rewriteReferencesVisitorState","seen","WeakSet","buildImportReference","identNode","meta","referenced","wrap","_wrapReference","namespace","t","identifier","name","_wrapReference2","interop","computed","stringSpecifiers","has","memberExpression","stringLiteral","rewriteReferencesVisitor","Scope","skip","ClassDeclaration","id","node","Error","exportNames","length","statement","expressionStatement","buildBindingExportAssignmentExpression","_blockHoist","insertAfter","VariableDeclaration","isVar","kind","decl","init","isIdentifier","isArrowFunctionExpression","isFunctionExpression","isClassExpression","buildUndefinedNode","Object","keys","getOuterBindingIdentifiers","localExpr","exportsObjectName","exportName","currentScope","hasOwnBinding","rename","reduce","expr","assignmentExpression","buildImportThrow","template","expression","ast","ReferencedIdentifier","add","importData","buildCodeFrameError","localBinding","getBinding","rootBinding","ref","loc","isCallExpression","callee","isOptionalCallExpression","isTaggedTemplateExpression","tag","isMemberExpression","replaceWith","sequenceExpression","numericLiteral","isJSXIdentifier","object","property","jsxMemberExpression","jsxIdentifier","UpdateExpression","arg","update","exportedNames","operator","prefix","cloneNode","generateDeclaredUidIdentifier","AssignmentExpression","exit","left","assignment","right","newExpr","logicalExpression","slice","binaryExpression","ids","programScopeIds","filter","find","items","forEach","isExpressionStatement","ForXStatement","programScope","isVariableDeclaration","didTransformExport","importConstViolationName","loopBodyScope","ensureBlock","bodyPath","newLoopId","generateUidIdentifierBasedOnNode","variableDeclaration","variableDeclarator","registerDeclaration","unshiftContainer"],"sources":["../src/rewrite-live-references.ts"],"sourcesContent":["import { template, types as t } from \"@babel/core\";\nimport type { NodePath, Visitor, Scope } from \"@babel/core\";\n\nimport type { ModuleMetadata } from \"./normalize-and-load-metadata.ts\";\n\ninterface RewriteReferencesVisitorState {\n exported: Map<any, any>;\n metadata: ModuleMetadata;\n requeueInParent: (path: NodePath) => void;\n scope: Scope;\n imported: Map<any, any>;\n buildImportReference: (\n [source, importName, localName]: readonly [string, string, string],\n identNode: t.Identifier | t.CallExpression | t.JSXIdentifier,\n ) => any;\n seen: WeakSet<object>;\n}\n\ninterface RewriteBindingInitVisitorState {\n exported: Map<any, any>;\n metadata: ModuleMetadata;\n requeueInParent: (path: NodePath) => void;\n scope: Scope;\n}\n\nfunction isInType(path: NodePath) {\n do {\n switch (path.parent.type) {\n case \"TSTypeAnnotation\":\n case \"TSTypeAliasDeclaration\":\n case \"TSTypeReference\":\n case \"TypeAnnotation\":\n case \"TypeAlias\":\n return true;\n case \"ExportSpecifier\":\n return (\n (\n path.parentPath.parent as\n | t.ExportDefaultDeclaration\n | t.ExportNamedDeclaration\n ).exportKind === \"type\"\n );\n default:\n if (path.parentPath.isStatement() || path.parentPath.isExpression()) {\n return false;\n }\n }\n } while ((path = path.parentPath));\n}\n\nexport default function rewriteLiveReferences(\n programPath: NodePath<t.Program>,\n metadata: ModuleMetadata,\n wrapReference: (ref: t.Expression, payload: unknown) => null | t.Expression,\n) {\n const imported = new Map();\n const exported = new Map();\n const requeueInParent = (path: NodePath) => {\n // Manually re-queue `exports.default =` expressions so that the ES3\n // transform has an opportunity to convert them. Ideally this would\n // happen automatically from the replaceWith above. See #4140 for\n // more info.\n programPath.requeue(path);\n };\n\n for (const [source, data] of metadata.source) {\n for (const [localName, importName] of data.imports) {\n imported.set(localName, [source, importName, null]);\n }\n for (const localName of data.importsNamespace) {\n imported.set(localName, [source, null, localName]);\n }\n }\n\n for (const [local, data] of metadata.local) {\n let exportMeta = exported.get(local);\n if (!exportMeta) {\n exportMeta = [];\n exported.set(local, exportMeta);\n }\n\n exportMeta.push(...data.names);\n }\n\n // Rewrite initialization of bindings to update exports.\n const rewriteBindingInitVisitorState: RewriteBindingLine truncated
@@ -0,0 +1 @@
{"version":3,"file":"square-user.js","sources":["../../../src/icons/square-user.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareUser\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxjaXJjbGUgY3g9IjEyIiBjeT0iMTAiIHI9IjMiIC8+CiAgPHBhdGggZD0iTTcgMjF2LTJhMiAyIDAgMCAxIDItMmg2YTIgMiAwIDAgMSAyIDJ2MiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/square-user\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 SquareUser = createLucideIcon('SquareUser', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['circle', { cx: '12', cy: '10', r: '3', key: 'ilqhr7' }],\n ['path', { d: 'M7 21v-2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2', key: '1m6ac2' }],\n]);\n\nexport default SquareUser;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC9E,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,CAA4C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3E,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,116 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "karakter", verb: "olmalı" },
file: { unit: "bayt", verb: "olmalı" },
array: { unit: "öğe", verb: "olmalı" },
set: { unit: "öğe", verb: "olmalı" },
map: { unit: "öğe", verb: "olmalı" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const FormatDictionary: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "girdi",
email: "e-posta adresi",
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 tarih ve saat",
date: "ISO tarih",
time: "ISO saat",
duration: "ISO süre",
ipv4: "IPv4 adresi",
ipv6: "IPv6 adresi",
mac: "MAC adresi",
cidrv4: "IPv4 aralığı",
cidrv6: "IPv6 aralığı",
base64: "base64 ile şifrelenmiş metin",
base64url: "base64url ile şifrelenmiş metin",
json_string: "JSON dizesi",
e164: "E.164 sayısı",
credit_card: "kredi kartı numarası",
currency_code: "para birimi kodu",
iban: "IBAN",
jwt: "JWT",
template_literal: "Şablon dizesi",
};
const TypeDictionary: {
[k in errors.$ZodInvalidTypeExpected | (string & {})]?: string;
} = {
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 `Geçersiz değer: beklenen instanceof ${issue.expected}, alınan ${received}`;
}
return `Geçersiz değer: beklenen ${expected}, alınan ${received}`;
}
case "invalid_value":
if (issue.values.length === 1) return `Geçersiz değer: beklenen ${util.stringifyPrimitive(issue.values[0])}`;
return `Geçersiz seçenek: aşağıdakilerden biri olmalı: ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Çok büyük: beklenen ${issue.origin ?? "değer"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "öğe"}`;
return `Çok büyük: beklenen ${issue.origin ?? "değer"} ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) return `Çok küçük: beklenen ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
return `Çok küçük: beklenen ${issue.origin} ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `Geçersiz metin: "${_issue.prefix}" ile başlamalı`;
if (_issue.format === "ends_with") return `Geçersiz metin: "${_issue.suffix}" ile bitmeli`;
if (_issue.format === "includes") return `Geçersiz metin: "${_issue.includes}" içermeli`;
if (_issue.format === "regex") return `Geçersiz metin: ${_issue.pattern} desenine uymalı`;
return `Geçersiz ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Geçersiz sayı: ${issue.divisor} ile tam bölünebilmeli`;
case "unrecognized_keys":
return `Tanınmayan anahtar${issue.keys.length > 1 ? "lar" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `${issue.origin} içinde geçersiz anahtar`;
case "invalid_union":
return "Geçersiz değer";
case "invalid_element":
return `${issue.origin} içinde geçersiz değer`;
default:
return `Geçersiz değer`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,30 @@
"use strict";
module.exports = function ({ key, objectKey }) {
// special case for parsers
const isParser =
objectKey === "parser" && (key === "parse" || key === "parseForESLint");
const parserMessage = `
This typically happens when you're using a custom parser that does not
provide a "meta" property, which is how ESLint determines the serialized
representation. Please open an issue with the maintainer of the custom parser
and share this link:
https://eslint.org/docs/latest/extend/custom-parsers#meta-data-in-custom-parsers
`.trim();
return `
The requested operation requires ESLint to serialize configuration data,
but the configuration key "${objectKey}.${key}" contains a function value,
which cannot be serialized.
${
isParser
? parserMessage
: "Please double-check your configuration for errors."
}
If you still have problems, please stop by https://eslint.org/chat/help to chat
with the team.
`.trimStart();
};
@@ -0,0 +1,143 @@
'use strict';
class CleanPasswords {
constructor({
substr,
limit,
trieRoot
}) {
this.buffer = [];
this.finalPasswords = [];
this.substr = substr;
this.limit = limit;
this.trieRoot = trieRoot;
}
getAllPossibleSubsAtIndex(index) {
const nodes = [];
let cur = this.trieRoot;
for (let i = index; i < this.substr.length; i += 1) {
const character = this.substr.charAt(i);
cur = cur.getChild(character);
if (!cur) {
break;
}
nodes.push(cur);
}
return nodes;
}
// eslint-disable-next-line complexity,max-statements
helper({
onlyFullSub,
isFullSub,
index,
subIndex,
changes,
lastSubLetter,
consecutiveSubCount
}) {
if (this.finalPasswords.length >= this.limit) {
return;
}
if (index === this.substr.length) {
if (onlyFullSub === isFullSub) {
this.finalPasswords.push({
password: this.buffer.join(''),
changes,
isFullSubstitution: onlyFullSub
});
}
return;
}
// first, exhaust all possible substitutions at this index
const nodes = [...this.getAllPossibleSubsAtIndex(index)];
let hasSubs = false;
// iterate backward to get wider substitutions first
for (let i = index + nodes.length - 1; i >= index; i -= 1) {
const cur = nodes[i - index];
const sub = cur.parents.join('');
if (cur.isTerminal()) {
// Skip if this would be a 4th or more consecutive substitution of the same letter
// this should work in all language as there shouldn't be the same letter more than four times in a row
// So we can ignore the rest to save calculation time
if (lastSubLetter === sub && consecutiveSubCount >= 3) {
continue;
}
hasSubs = true;
const letters = cur.subs;
for (const letter of letters) {
this.buffer.push(letter);
const newSubs = changes.concat({
i: subIndex,
letter,
substitution: sub
});
// recursively build the rest of the string
this.helper({
onlyFullSub,
isFullSub,
index: index + sub.length,
subIndex: subIndex + letter.length,
changes: newSubs,
lastSubLetter: sub,
consecutiveSubCount: lastSubLetter === sub ? consecutiveSubCount + 1 : 1
});
// backtrack by ignoring the added postfix
this.buffer.pop();
if (this.finalPasswords.length >= this.limit) {
return;
}
}
}
}
// next, generate all combos without doing a substitution at this index
// if a partial substitution is requested or there are no substitutions at this index
if (!onlyFullSub || !hasSubs) {
const firstChar = this.substr.charAt(index);
this.buffer.push(firstChar);
this.helper({
onlyFullSub,
isFullSub: isFullSub && !hasSubs,
index: index + 1,
subIndex: subIndex + 1,
changes,
lastSubLetter,
consecutiveSubCount
});
this.buffer.pop();
}
}
getAll() {
// only full substitution
this.helper({
onlyFullSub: true,
isFullSub: true,
index: 0,
subIndex: 0,
changes: [],
lastSubLetter: undefined,
consecutiveSubCount: 0
});
// only partial substitution
this.helper({
onlyFullSub: false,
isFullSub: true,
index: 0,
subIndex: 0,
changes: [],
lastSubLetter: undefined,
consecutiveSubCount: 0
});
return this.finalPasswords;
}
}
const getCleanPasswords = (password, limit, trieRoot) => {
const helper = new CleanPasswords({
substr: password,
limit,
trieRoot
});
return helper.getAll();
};
module.exports = getCleanPasswords;
//# sourceMappingURL=getCleanPasswords.cjs.map
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const SquareArrowDownLeft = createLucideIcon("SquareArrowDownLeft", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "m16 8-8 8", key: "166keh" }],
["path", { d: "M16 16H8V8", key: "1w2ppm" }]
]);
export { SquareArrowDownLeft as default };
//# sourceMappingURL=square-arrow-down-left.js.map
@@ -0,0 +1,10 @@
export type MessageIds = 'preferReadonly';
export type Options = [
{
onlyInlineLambdas?: boolean;
}
];
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferReadonly", Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1,17 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_jsx_dom_intrinsic_element_components = require("./intrinsic-element/components.js");
//#region src/jsx/dom/jsx-dev-runtime.ts
const jsxDEV = (tag, props, key) => {
if (typeof tag === "string" && require_jsx_dom_intrinsic_element_components.components_exports[tag]) tag = require_jsx_dom_intrinsic_element_components.components_exports[tag];
return {
tag,
type: tag,
props,
key,
ref: props.ref
};
};
const Fragment = (props) => jsxDEV("", props, void 0);
//#endregion
exports.Fragment = Fragment;
exports.jsxDEV = jsxDEV;
@@ -0,0 +1,70 @@
import { routePath } from "../../helper/route/index.js";
//#region src/middleware/mount/index.ts
const defaultReplaceRequest = (c) => {
const pathPrefix = routePath(c).replace(/\/\*$/, "");
const url = new URL(c.req.raw.url);
url.pathname = c.req.path.slice(pathPrefix.length) || "/";
return new Request(url, c.req.raw);
};
const defaultGetOptions = (c) => {
let executionContext = void 0;
try {
executionContext = c.executionCtx;
} catch {}
return [c.env, executionContext];
};
/**
* `mount()` allows you to mount applications built with other frameworks into your Hono application.
*
* @see {@link https://hono.dev/docs/api/hono#mount}
*
* @param {Function} applicationHandler - other Request Handler
* @param {MountOptions} [options] - options of `mount()`
* @returns {MiddlewareHandler} handler to register with `app.all()`
*
* @example
* ```ts
* import { Router as IttyRouter } from 'itty-router'
* import { Hono } from 'hono'
* import { mount } from 'hono/mount'
* // Create itty-router application
* const ittyRouter = IttyRouter()
* // GET /itty-router/hello
* ittyRouter.get('/hello', () => new Response('Hello from itty-router'))
*
* const app = new Hono()
* app.all('/itty-router/*', mount(ittyRouter.handle))
* ```
*
* @example
* ```ts
* const app = new Hono()
* // Send the request to another application without modification.
* app.all('/app/*', mount(anotherApp, {
* replaceRequest: (req) => req,
* }))
* ```
*/
const mount = (applicationHandler, options) => {
let replaceRequest;
let optionHandler;
if (options) {
if (typeof options === "function") optionHandler = options;
else {
optionHandler = options.optionHandler;
if (options.replaceRequest === false) replaceRequest = (request) => request;
else replaceRequest = options.replaceRequest;
}
}
const getOptions = optionHandler ? (c) => {
const options = optionHandler(c);
return Array.isArray(options) ? options : [options];
} : defaultGetOptions;
return async (c, next) => {
const res = await applicationHandler(replaceRequest ? replaceRequest(c.req.raw) : defaultReplaceRequest(c), ...getOptions(c));
if (res) return res;
await next();
};
};
//#endregion
export { mount };
@@ -0,0 +1,474 @@
<div align="center">
<img width="100" height="100" title="Load Options" src="http://michael-ciniawsky.github.io/postcss-load-options/logo.svg">
<a href="https://github.com/postcss/postcss">
<img width="110" height="110" title="PostCSS" src="http://postcss.github.io/postcss/logo.svg" hspace="10">
</a>
<img width="100" height="100" title="Load Plugins" src="http://michael-ciniawsky.github.io/postcss-load-plugins/logo.svg">
<h1>Load Config</h1>
</div>
<h2 align="center">Install</h2>
```bash
npm i -D postcss-load-config
```
<h2 align="center">Usage</h2>
```bash
npm i -S|-D postcss-plugin
```
Install all required PostCSS plugins and save them to your **package.json** `dependencies`/`devDependencies`
Then create a PostCSS config file by choosing one of the following formats
### `package.json`
Create a **`postcss`** section in your project's **`package.json`**
```
Project (Root)
|– client
|– public
|
|- package.json
```
```json
{
"postcss": {
"parser": "sugarss",
"map": false,
"plugins": {
"postcss-plugin": {}
}
}
}
```
### `.postcssrc`
Create a **`.postcssrc`** file in JSON or YAML format
> ℹ️ It's recommended to use an extension (e.g **`.postcssrc.json`** or **`.postcssrc.yml`**) instead of `.postcssrc`
```
Project (Root)
|– client
|– public
|
|- (.postcssrc|.postcssrc.json|.postcssrc.yml)
|- package.json
```
**`.postcssrc.json`**
```json
{
"parser": "sugarss",
"map": false,
"plugins": {
"postcss-plugin": {}
}
}
```
**`.postcssrc.yml`**
```yaml
parser: sugarss
map: false
plugins:
postcss-plugin: {}
```
> [!NOTE]
> For YAML configs, you must have [yaml](https://www.npmjs.com/package/yaml) installed as a peer dependency.
### `.postcssrc.js` or `postcss.config.js`
You may need some logic within your config.
In this case create JS/TS file named:
- `.postcssrc.js`
- `.postcssrc.mjs`
- `.postcssrc.cjs`
- `.postcssrc.ts`
- `.postcssrc.mts`
- `.postcssrc.cts`
- `postcss.config.js`
- `postcss.config.mjs`
- `postcss.config.cjs`
- `postcss.config.ts`
- `postcss.config.mts`
- `postcss.config.cts`
> [!NOTE]
> For TypeScript configs, you must have [tsx](https://www.npmjs.com/package/tsx) or [jiti](https://www.npmjs.com/package/jiti) installed as a peer dependency.
```
Project (Root)
|– client
|– public
|- (.postcssrc|postcss.config).(js|mjs|cjs|ts|mts|cts)
|- package.json
```
You can export the config as an `{Object}`
**.postcssrc.js**
```js
module.exports = {
parser: 'sugarss',
map: false,
plugins: {
'postcss-plugin': {}
}
}
```
Or export a `{Function}` that returns the config (more about the `ctx` param below)
**.postcssrc.js**
```js
module.exports = (ctx) => ({
parser: ctx.parser ? 'sugarss' : false,
map: ctx.env === 'development' ? ctx.map : false,
plugins: {
'postcss-plugin': ctx.options.plugin
}
})
```
Plugins can be loaded either using an `{Object}` or an `{Array}`
#### `{Object}`
**.postcssrc.js**
```js
module.exports = ({ env }) => ({
...options,
plugins: {
'postcss-plugin': env === 'production' ? {} : false
}
})
```
> ℹ️ When using an `{Object}`, the key can be a Node.js module name, a path to a JavaScript file that is relative to the directory of the PostCSS config file, or an absolute path to a JavaScript file.
#### `{Array}`
**.postcssrc.js**
```js
module.exports = ({ env }) => ({
...options,
plugins: [
env === 'production' ? require('postcss-plugin')() : false
]
})
```
> :warning: When using an `{Array}`, make sure to `require()` each plugin
<h2 align="center">Options</h2>
|Name|Type|Default|Description|
|:--:|:--:|:-----:|:----------|
|[**`to`**](#to)|`{String}`|`undefined`|Destination File Path|
|[**`map`**](#map)|`{String\|Object}`|`false`|Enable/Disable Source Maps|
|[**`from`**](#from)|`{String}`|`undefined`|Source File Path|
|[**`parser`**](#parser)|`{String\|Function}`|`false`|Custom PostCSS Parser|
|[**`syntax`**](#syntax)|`{String\|Function}`|`false`|Custom PostCSS Syntax|
|[**`stringifier`**](#stringifier)|`{String\|Function}`|`false`|Custom PostCSS Stringifier|
### `parser`
**.postcssrc.js**
```js
module.exports = {
parser: 'sugarss'
}
```
### `syntax`
**.postcssrc.js**
```js
module.exports = {
syntax: 'postcss-scss'
}
```
### `stringifier`
**.postcssrc.js**
```js
module.exports = {
stringifier: 'midas'
}
```
### [**`map`**](https://github.com/postcss/postcss/blob/master/docs/source-maps.md)
**.postcssrc.js**
```js
module.exports = {
map: 'inline'
}
```
> :warning: In most cases `options.from` && `options.to` are set by the third-party which integrates this package (CLI, gulp, webpack). It's unlikely one needs to set/use `options.from` && `options.to` within a config file. Unless you're a third-party plugin author using this module and its Node API directly **dont't set `options.from` && `options.to` yourself**
### `to`
```js
module.exports = {
to: 'path/to/dest.css'
}
```
### `from`
```js
module.exports = {
from: 'path/to/src.css'
}
```
<h2 align="center">Plugins</h2>
### `{} || null`
The plugin will be loaded with defaults
```js
'postcss-plugin': {} || null
```
**.postcssrc.js**
```js
module.exports = {
plugins: {
'postcss-plugin': {} || null
}
}
```
> :warning: `{}` must be an **empty** `{Object}` literal
### `{Object}`
The plugin will be loaded with given options
```js
'postcss-plugin': { option: '', option: '' }
```
**.postcssrc.js**
```js
module.exports = {
plugins: {
'postcss-plugin': { option: '', option: '' }
}
}
```
### `false`
The plugin will not be loaded
```js
'postcss-plugin': false
```
**.postcssrc.js**
```js
module.exports = {
plugins: {
'postcss-plugin': false
}
}
```
### `Ordering`
Plugin **execution order** is determined by declaration in the plugins section (**top-down**)
```js
{
plugins: {
'postcss-plugin': {}, // [0]
'postcss-plugin': {}, // [1]
'postcss-plugin': {} // [2]
}
}
```
<h2 align="center">Context</h2>
When using a `{Function}` (`postcss.config.js` or `.postcssrc.js`), it's possible to pass context to `postcss-load-config`, which will be evaluated while loading your config. By default `ctx.env (process.env.NODE_ENV)` and `ctx.cwd (process.cwd())` are available on the `ctx` `{Object}`
> ℹ️ Most third-party integrations add additional properties to the `ctx` (e.g `postcss-loader`). Check the specific module's README for more information about what is available on the respective `ctx`
<h2 align="center">Examples</h2>
**postcss.config.js**
```js
module.exports = (ctx) => ({
parser: ctx.parser ? 'sugarss' : false,
map: ctx.env === 'development' ? ctx.map : false,
plugins: {
'postcss-import': {},
'postcss-nested': {},
cssnano: ctx.env === 'production' ? {} : false
}
})
```
<div align="center">
<img width="80" height="80" src="https://worldvectorlogo.com/logos/nodejs-icon.svg">
</div>
```json
"scripts": {
"build": "NODE_ENV=production node postcss",
"start": "NODE_ENV=development node postcss"
}
```
```js
const { readFileSync } = require('fs')
const postcss = require('postcss')
const postcssrc = require('postcss-load-config')
const css = readFileSync('index.css', 'utf8')
const ctx = { parser: true, map: 'inline' }
postcssrc(ctx).then(({ plugins, options }) => {
postcss(plugins)
.process(css, options)
.then((result) => console.log(result.css))
})
```
<div align="center">
<img width="80" height="80" halign="10" src="https://worldvectorlogo.com/logos/gulp.svg">
</div>
```json
"scripts": {
"build": "NODE_ENV=production gulp",
"start": "NODE_ENV=development gulp"
}
```
```js
const { task, src, dest, series, watch } = require('gulp')
const postcss = require('gulp-postcssrc')
const css = () => {
src('src/*.css')
.pipe(postcss())
.pipe(dest('dest'))
})
task('watch', () => {
watch(['src/*.css', 'postcss.config.js'], css)
})
task('default', series(css, 'watch'))
```
<div align="center">
<img width="80" height="80" src="https://cdn.rawgit.com/webpack/media/e7485eb2/logo/icon.svg">
</div>
```json
"scripts": {
"build": "NODE_ENV=production webpack",
"start": "NODE_ENV=development webpack-dev-server"
}
```
**webpack.config.js**
```js
module.exports = (env) => ({
module: {
rules: [
{
test: /\.css$/,
use: [
'style-loader',
'css-loader',
'postcss-loader'
]
}
]
}
})
```
<h2 align="center">Maintainers</h2>
<table>
<tbody>
<tr>
<td align="center">
<img width="150" height="150"
src="https://github.com/michael-ciniawsky.png?v=3&s=150">
<br />
<a href="https://github.com/michael-ciniawsky">Michael Ciniawsky</a>
</td>
<td align="center">
<img width="150" height="150"
src="https://github.com/ertrzyiks.png?v=3&s=150">
<br />
<a href="https://github.com/ertrzyiks">Mateusz Derks</a>
</td>
</tr>
<tbody>
</table>
<h2 align="center">Contributors</h2>
<table>
<tbody>
<tr>
<td align="center">
<img width="150" height="150"
src="https://github.com/sparty02.png?v=3&s=150">
<br />
<a href="https://github.com/sparty02">Ryan Dunckel</a>
</td>
<td align="center">
<img width="150" height="150"
src="https://github.com/pcgilday.png?v=3&s=150">
<br />
<a href="https://github.com/pcgilday">Patrick Gilday</a>
</td>
<td align="center">
<img width="150" height="150"
src="https://github.com/daltones.png?v=3&s=150">
<br />
<a href="https://github.com/daltones">Dalton Santos</a>
</td>
<td align="center">
<img width="150" height="150"
src="https://github.com/fwouts.png?v=3&s=150">
<br />
<a href="https://github.com/fwouts">François Wouts</a>
</td>
</tr>
<tbody>
</table
## Security Contact
To report a security vulnerability, please use the [Tidelift security contact].
Tidelift will coordinate the fix and disclosure.
[Tidelift security contact]: https://tidelift.com/security
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_I"},C:{"1":"_wO","2":"_o _fG _L","132":"_xD _UJ _4E _VC"},D:{"1":"_TL _uH","2":"_ER","66":"UC VC"},E:{"1":"_QE","2":"_KI","322":"_rH RD _xK","580":"_yP _qE"},F:{"1":"_8F","2":"_1F","66":"_sB"},G:{"1":"_AD","2":"_rJ","322":"_nI _XG","580":"_gP xD _qE"},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":"_cJ","2":"_rO"},Q:{"1":"JE"},R:{"1":"KE"},S:{"2":"LE","132":"ME"}},B:1,C:"Lazy loading via attribute for images & iframes",D:true};