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,6 @@
import * as uri from "fast-uri";
type URI = typeof uri & {
code: string;
};
declare const _default: URI;
export default _default;
@@ -0,0 +1 @@
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../lib/vocabularies/metadata.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAe;IAC5C,OAAO;IACP,aAAa;IACb,SAAS;IACT,YAAY;IACZ,UAAU;IACV,WAAW;IACX,UAAU;CACX,CAAA;AAEY,QAAA,iBAAiB,GAAe;IAC3C,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;CAChB,CAAA"}
@@ -0,0 +1,27 @@
type VisitorKeys$1 = {
readonly [type: string]: readonly string[];
};
/**
* @typedef {{ readonly [type: string]: ReadonlyArray<string> }} VisitorKeys
*/
/**
* @type {VisitorKeys}
*/
declare const KEYS: VisitorKeys$1;
/**
* Get visitor keys of a given node.
* @param {object} node The AST node to get keys.
* @returns {readonly string[]} Visitor keys of the node.
*/
declare function getKeys(node: object): readonly string[];
/**
* Make the union set with `KEYS` and given keys.
* @param {VisitorKeys} additionalKeys The additional keys.
* @returns {VisitorKeys} The union set.
*/
declare function unionWith(additionalKeys: VisitorKeys): VisitorKeys;
type VisitorKeys = VisitorKeys$1;
export { KEYS, VisitorKeys, getKeys, unionWith };
@@ -0,0 +1,455 @@
import { expect, expectTypeOf, test } from "vitest";
import { z } from "zod/v4";
test("basic defaults", () => {
expect(z.string().default("default").parse(undefined)).toBe("default");
});
test("default with optional", () => {
const schema = z.string().optional().default("default");
expect(schema.parse(undefined)).toBe("default");
expect(schema.unwrap().parse(undefined)).toBe(undefined);
});
test("default with transform", () => {
const stringWithDefault = z
.string()
.transform((val) => val.toUpperCase())
.default("default");
expect(stringWithDefault.parse(undefined)).toBe("default");
expect(stringWithDefault).toBeInstanceOf(z.ZodDefault);
expect(stringWithDefault.unwrap()).toBeInstanceOf(z.ZodPipe);
expect(stringWithDefault.unwrap().in).toBeInstanceOf(z.ZodString);
expect(stringWithDefault.unwrap().out).toBeInstanceOf(z.ZodTransform);
type inp = z.input<typeof stringWithDefault>;
expectTypeOf<inp>().toEqualTypeOf<string | undefined>();
type out = z.output<typeof stringWithDefault>;
expectTypeOf<out>().toEqualTypeOf<string>();
});
test("default on existing optional", () => {
const stringWithDefault = z.string().optional().default("asdf");
expect(stringWithDefault.parse(undefined)).toBe("asdf");
expect(stringWithDefault).toBeInstanceOf(z.ZodDefault);
expect(stringWithDefault.unwrap()).toBeInstanceOf(z.ZodOptional);
expect(stringWithDefault.unwrap().unwrap()).toBeInstanceOf(z.ZodString);
type inp = z.input<typeof stringWithDefault>;
expectTypeOf<inp>().toEqualTypeOf<string | undefined>();
type out = z.output<typeof stringWithDefault>;
expectTypeOf<out>().toEqualTypeOf<string>();
});
test("optional on default", () => {
const stringWithDefault = z.string().default("asdf").optional();
type inp = z.input<typeof stringWithDefault>;
expectTypeOf<inp>().toEqualTypeOf<string | undefined>();
type out = z.output<typeof stringWithDefault>;
expectTypeOf<out>().toEqualTypeOf<string | undefined>();
expect(stringWithDefault.parse(undefined)).toBe("asdf");
});
// test("complex chain example", () => {
// const complex = z
// .string()
// .default("asdf")
// .transform((val) => val.toUpperCase())
// .default("qwer")
// .unwrap()
// .optional()
// .default("asdfasdf");
// expect(complex.parse(undefined)).toBe("asdfasdf");
// });
test("removeDefault", () => {
const stringWithRemovedDefault = z.string().default("asdf").removeDefault();
type out = z.output<typeof stringWithRemovedDefault>;
expectTypeOf<out>().toEqualTypeOf<string>();
});
test("apply default at output", () => {
const schema = z
.string()
.transform((_) => (Math.random() > 0 ? undefined : _))
.default("asdf");
expect(schema.parse("")).toEqual("asdf");
});
test("nested", () => {
const inner = z.string().default("asdf");
const outer = z.object({ inner }).default({
inner: "qwer",
});
type input = z.input<typeof outer>;
expectTypeOf<input>().toEqualTypeOf<{ inner?: string | undefined } | undefined>();
type out = z.output<typeof outer>;
expectTypeOf<out>().toEqualTypeOf<{ inner: string }>();
expect(outer.parse(undefined)).toEqual({ inner: "qwer" });
expect(outer.parse({})).toEqual({ inner: "asdf" });
expect(outer.parse({ inner: undefined })).toEqual({ inner: "asdf" });
});
test("chained defaults", () => {
const stringWithDefault = z.string().default("inner").default("outer");
const result = stringWithDefault.parse(undefined);
expect(result).toEqual("outer");
});
test("object optionality", () => {
const schema = z.object({
hi: z.string().default("hi"),
});
type schemaInput = z.input<typeof schema>;
type schemaOutput = z.output<typeof schema>;
expectTypeOf<schemaInput>().toEqualTypeOf<{ hi?: string | undefined }>();
expectTypeOf<schemaOutput>().toEqualTypeOf<{ hi: string }>();
expect(schema.parse({})).toEqual({
hi: "hi",
});
});
test("nested prefault/default", () => {
const a = z
.string()
.default("a")
.refine((val) => val.startsWith("a"));
const b = z
.string()
.refine((val) => val.startsWith("b"))
.default("b");
const c = z
.string()
.prefault("c")
.refine((val) => val.startsWith("c"));
const d = z
.string()
.refine((val) => val.startsWith("d"))
.prefault("d");
const obj = z.object({
a,
b,
c,
d,
});
expect(obj.safeParse({ a: "a1", b: "b1", c: "c1", d: "d1" })).toMatchInlineSnapshot(`
{
"data": {
"a": "a1",
"b": "b1",
"c": "c1",
"d": "d1",
},
"success": true,
}
`);
expect(obj.safeParse({ a: "f", b: "f", c: "f", d: "f" })).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "custom",
"path": [
"a"
],
"message": "Invalid input"
},
{
"code": "custom",
"path": [
"b"
],
"message": "Invalid input"
},
{
"code": "custom",
"path": [
"c"
],
"message": "Invalid input"
},
{
"code": "custom",
"path": [
"d"
],
"message": "Invalid input"
}
]],
"success": false,
}
`);
expect(obj.safeParse({})).toMatchInlineSnapshot(`
{
"data": {
"a": "a",
"b": "b",
"c": "c",
"d": "d",
},
"success": true,
}
`);
expect(obj.safeParse({ a: undefined, b: undefined, c: undefined, d: undefined })).toMatchInlineSnapshot(`
{
"data": {
"a": "a",
"b": "b",
"c": "c",
"d": "d",
},
"success": true,
}
`);
const obj2 = z.object({
a: a.optional(),
b: b.optional(),
c: c.optional(),
d: d.optional(),
});
expect(obj2.safeParse({ a: undefined, b: undefined, c: undefined, d: undefined })).toMatchInlineSnapshot(`
{
"data": {
"a": "a",
"b": "b",
"c": "c",
"d": "d",
},
"success": true,
}
`);
expect(a.parse(undefined)).toBe("a");
expect(b.parse(undefined)).toBe("b");
expect(c.parse(undefined)).toBe("c");
expect(d.parse(undefined)).toBe("d");
});
test("failing default", () => {
const a = z
.string()
.default("z")
.refine((val) => val.startsWith("a"));
const b = z
.string()
.refine((val) => val.startsWith("b"))
.default("z");
const c = z
.string()
.prefault("z")
.refine((val) => val.startsWith("c"));
const d = z
.string()
.refine((val) => val.startsWith("d"))
.prefault("z");
const obj = z.object({
a,
b,
c,
d,
});
expect(
obj.safeParse({
a: undefined,
b: undefined,
c: undefined,
d: undefined,
}).error!.issues
).toMatchInlineSnapshot(`
[
{
"code": "custom",
"message": "Invalid input",
"path": [
"a",
],
},
{
"code": "custom",
"message": "Invalid input",
"path": [
"c",
],
},
{
"code": "custom",
"message": "Invalid input",
"path": [
"d",
],
},
]
`);
});
test("partial should not clobber defaults", () => {
const objWithDefaults = z.object({
a: z.string().default("defaultA"),
b: z.string().default("defaultB"),
c: z.string().default("defaultC"),
});
const objPartialWithOneRequired = objWithDefaults.partial(); //.required({ a: true });
const test = objPartialWithOneRequired.parse({});
expect(test).toMatchInlineSnapshot(`
{
"a": "defaultA",
"b": "defaultB",
"c": "defaultC",
}
`);
});
test("defaulted object schema returns shallow clone", () => {
const schema = z
.object({
a: z.string(),
})
.default({ a: "x" });
const result1 = schema.parse(undefined);
const result2 = schema.parse(undefined);
expect(result1).not.toBe(result2);
expect(result1).toEqual(result2);
});
test("defaulted array schema returns shallow clone", () => {
const schema = z.array(z.string()).default(["x"]);
const result1 = schema.parse(undefined);
const result2 = schema.parse(undefined);
expect(result1).not.toBe(result2);
expect(result1).toEqual(result2);
});
test("defaulted Map schema returns shallow clone", () => {
const schema = z.map(z.string(), z.number()).default(new Map([["a", 1]]));
const result1 = schema.parse(undefined);
const result2 = schema.parse(undefined);
expect(result1).not.toBe(result2);
expect(result1).toEqual(result2);
});
test("defaulted Set schema returns shallow clone", () => {
const schema = z.set(z.string()).default(new Set(["x"]));
const result1 = schema.parse(undefined);
const result2 = schema.parse(undefined);
expect(result1).not.toBe(result2);
expect(result1).toEqual(result2);
});
test("mutations on defaulted Map do not affect subsequent parses", () => {
const schema = z.map(z.string(), z.number()).default(new Map());
const result1 = schema.parse(undefined);
const result2 = schema.parse(undefined);
result1.set("key1", 1);
result2.set("key2", 2);
expect(result1.size).toBe(1);
expect(result1.get("key1")).toBe(1);
expect(result1.has("key2")).toBe(false);
expect(result2.size).toBe(1);
expect(result2.get("key2")).toBe(2);
expect(result2.has("key1")).toBe(false);
});
test("mutations on defaulted Set do not affect subsequent parses", () => {
const schema = z.set(z.string()).default(new Set());
const result1 = schema.parse(undefined);
const result2 = schema.parse(undefined);
result1.add("item1");
result2.add("item2");
expect(result1.size).toBe(1);
expect(result1.has("item1")).toBe(true);
expect(result1.has("item2")).toBe(false);
expect(result2.size).toBe(1);
expect(result2.has("item2")).toBe(true);
expect(result2.has("item1")).toBe(false);
});
test("direction-aware defaults", () => {
const schema = z.string().default("hello");
// Forward direction (regular parse): defaults should be applied
expect(schema.parse(undefined)).toBe("hello");
expect(schema.parse("hello")).toBe("hello");
// Reverse direction (encode): defaults should NOT be applied, undefined should fail validation
expect(() => z.encode(schema, undefined as any)).toThrow();
// But valid values should still work in reverse
expect(z.safeEncode(schema, "world")).toMatchInlineSnapshot(`
{
"data": "world",
"success": true,
}
`);
expect(z.safeEncode(schema, undefined as any)).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"expected": "string",
"code": "invalid_type",
"path": [],
"message": "Invalid input: expected string, received undefined"
}
]],
"success": false,
}
`);
});
test("default factory runs once per parse inside a container", () => {
let calls = 0;
const schema = z.object({
a: z.string().default(() => {
calls++;
return "d";
}),
});
expect(schema.parse({})).toEqual({ a: "d" });
expect(calls).toBe(1);
// the key is present, so the factory has nothing to produce
expect(schema.parse({ a: "given" })).toEqual({ a: "given" });
expect(calls).toBe(1);
});
test("prefault factory runs once per parse inside a container", () => {
let calls = 0;
const schema = z.object({
a: z.string().prefault(() => {
calls++;
return "d";
}),
});
expect(schema.parse({})).toEqual({ a: "d" });
expect(calls).toBe(1);
});
test("default factory does not run at compile time", () => {
let calls = 0;
const compiled = z.compile(
z.object({
a: z.string().default(() => {
calls++;
return "d";
}),
})
);
expect(calls).toBe(0);
expect(compiled.parse({})).toEqual({ a: "d" });
expect(calls).toBe(1);
});
@@ -0,0 +1,205 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.setupAuthServer = exports.DemoInMemoryAuthProvider = exports.DemoInMemoryClientsStore = void 0;
const node_crypto_1 = require("node:crypto");
const express_1 = __importDefault(require("express"));
const router_js_1 = require("../../server/auth/router.js");
const auth_utils_js_1 = require("../../shared/auth-utils.js");
const errors_js_1 = require("../../server/auth/errors.js");
class DemoInMemoryClientsStore {
constructor() {
this.clients = new Map();
}
async getClient(clientId) {
return this.clients.get(clientId);
}
async registerClient(clientMetadata) {
this.clients.set(clientMetadata.client_id, clientMetadata);
return clientMetadata;
}
}
exports.DemoInMemoryClientsStore = DemoInMemoryClientsStore;
/**
* 🚨 DEMO ONLY - NOT FOR PRODUCTION
*
* This example demonstrates MCP OAuth flow but lacks some of the features required for production use,
* for example:
* - Persistent token storage
* - Rate limiting
*/
class DemoInMemoryAuthProvider {
constructor(validateResource) {
this.validateResource = validateResource;
this.clientsStore = new DemoInMemoryClientsStore();
this.codes = new Map();
this.tokens = new Map();
}
async authorize(client, params, res) {
const code = (0, node_crypto_1.randomUUID)();
const searchParams = new URLSearchParams({
code
});
if (params.state !== undefined) {
searchParams.set('state', params.state);
}
this.codes.set(code, {
client,
params
});
// Simulate a user login
// Set a secure HTTP-only session cookie with authorization info
if (res.cookie) {
const authCookieData = {
userId: 'demo_user',
name: 'Demo User',
timestamp: Date.now()
};
res.cookie('demo_session', JSON.stringify(authCookieData), {
httpOnly: true,
secure: false, // In production, this should be true
sameSite: 'lax',
maxAge: 24 * 60 * 60 * 1000, // 24 hours - for demo purposes
path: '/' // Available to all routes
});
}
if (!client.redirect_uris.includes(params.redirectUri)) {
throw new errors_js_1.InvalidRequestError('Unregistered redirect_uri');
}
const targetUrl = new URL(params.redirectUri);
targetUrl.search = searchParams.toString();
res.redirect(targetUrl.toString());
}
async challengeForAuthorizationCode(client, authorizationCode) {
// Store the challenge with the code data
const codeData = this.codes.get(authorizationCode);
if (!codeData) {
throw new Error('Invalid authorization code');
}
return codeData.params.codeChallenge;
}
async exchangeAuthorizationCode(client, authorizationCode,
// Note: code verifier is checked in token.ts by default
// it's unused here for that reason.
_codeVerifier) {
const codeData = this.codes.get(authorizationCode);
if (!codeData) {
throw new Error('Invalid authorization code');
}
if (codeData.client.client_id !== client.client_id) {
throw new Error(`Authorization code was not issued to this client, ${codeData.client.client_id} != ${client.client_id}`);
}
if (this.validateResource && !this.validateResource(codeData.params.resource)) {
throw new Error(`Invalid resource: ${codeData.params.resource}`);
}
this.codes.delete(authorizationCode);
const token = (0, node_crypto_1.randomUUID)();
const tokenData = {
token,
clientId: client.client_id,
scopes: codeData.params.scopes || [],
expiresAt: Date.now() + 3600000, // 1 hour
resource: codeData.params.resource,
type: 'access'
};
this.tokens.set(token, tokenData);
return {
access_token: token,
token_type: 'bearer',
expires_in: 3600,
scope: (codeData.params.scopes || []).join(' ')
};
}
async exchangeRefreshToken(_client, _refreshToken, _scopes, _resource) {
throw new Error('Not implemented for example demo');
}
async verifyAccessToken(token) {
const tokenData = this.tokens.get(token);
if (!tokenData || !tokenData.expiresAt || tokenData.expiresAt < Date.now()) {
throw new Error('Invalid or expired token');
}
return {
token,
clientId: tokenData.clientId,
scopes: tokenData.scopes,
expiresAt: Math.floor(tokenData.expiresAt / 1000),
resource: tokenData.resource
};
}
}
exports.DemoInMemoryAuthProvider = DemoInMemoryAuthProvider;
const setupAuthServer = ({ authServerUrl, mcpServerUrl, strictResource }) => {
// Create separate auth server app
// NOTE: This is a separate app on a separate port to illustrate
// how to separate an OAuth Authorization Server from a Resource
// server in the SDK. The SDK is not intended to be provide a standalone
// authorization server.
const validateResource = strictResource
? (resource) => {
if (!resource)
return false;
const expectedResource = (0, auth_utils_js_1.resourceUrlFromServerUrl)(mcpServerUrl);
return resource.toString() === expectedResource.toString();
}
: undefined;
const provider = new DemoInMemoryAuthProvider(validateResource);
const authApp = (0, express_1.default)();
authApp.use(express_1.default.json());
// For introspection requests
authApp.use(express_1.default.urlencoded());
// Add OAuth routes to the auth server
// NOTE: this will also add a protected resource metadata route,
// but it won't be used, so leave it.
authApp.use((0, router_js_1.mcpAuthRouter)({
provider,
issuerUrl: authServerUrl,
scopesSupported: ['mcp:tools']
}));
authApp.post('/introspect', async (req, res) => {
try {
const { token } = req.body;
if (!token) {
res.status(400).json({ error: 'Token is required' });
return;
}
const tokenInfo = await provider.verifyAccessToken(token);
res.json({
active: true,
client_id: tokenInfo.clientId,
scope: tokenInfo.scopes.join(' '),
exp: tokenInfo.expiresAt,
aud: tokenInfo.resource
});
return;
}
catch (error) {
res.status(401).json({
active: false,
error: 'Unauthorized',
error_description: `Invalid token: ${error}`
});
}
});
const auth_port = authServerUrl.port;
// Start the auth server
authApp.listen(auth_port, error => {
if (error) {
console.error('Failed to start server:', error);
process.exit(1);
}
console.log(`OAuth Authorization Server listening on port ${auth_port}`);
});
// Note: we could fetch this from the server, but then we end up
// with some top level async which gets annoying.
const oauthMetadata = (0, router_js_1.createOAuthMetadata)({
provider,
issuerUrl: authServerUrl,
scopesSupported: ['mcp:tools']
});
oauthMetadata.introspection_endpoint = new URL('/introspect', authServerUrl).href;
return oauthMetadata;
};
exports.setupAuthServer = setupAuthServer;
//# sourceMappingURL=demoInMemoryOAuthProvider.js.map
@@ -0,0 +1,2 @@
declare const _default: "# Manual Setup\n\nTo set up TanStack Router manually in a React project, follow the steps below. This gives you a bare minimum setup to get going with TanStack Router using both file-based route generation and code-based route configuration:\n\n## Using File-Based Route Generation\n\n#### Install TanStack Router, Vite Plugin, and the Router Devtools\n\nInstall the necessary core dependencies:\n\n<!-- ::start:tabs variant=\"package-managers\" -->\n\nreact: @tanstack/react-router @tanstack/react-router-devtools\nsolid: @tanstack/solid-router @tanstack/solid-router-devtools\n\n<!-- ::end:tabs -->\n\nInstall the necessary development dependencies:\n\n<!-- ::start:tabs variant=\"package-managers\" mode=\"dev-install\" -->\n\nreact: @tanstack/router-plugin\nsolid: @tanstack/router-plugin\n\n<!-- ::end:tabs -->\n\n#### Configure the Vite Plugin\n\n```tsx\n// vite.config.ts\nimport { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport { tanstackRouter } from '@tanstack/router-plugin/vite'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n plugins: [\n // Please make sure that '@tanstack/router-plugin' is passed before '@vitejs/plugin-react'\n tanstackRouter({\n target: 'react',\n autoCodeSplitting: true,\n }),\n react(),\n // ...,\n ],\n})\n```\n\n> [!TIP]\n> If you are not using Vite, or any of the supported bundlers, you can check out the [TanStack Router CLI](./with-router-cli) guide for more info.\n\nCreate the following files:\n\n- `src/routes/__root.tsx` (with two '`_`' characters)\n- `src/routes/index.tsx`\n- `src/routes/about.tsx`\n- `src/main.tsx`\n\n<!-- ::start:framework -->\n\n# React\n\n<!-- ::start:tabs variant=\"files\" -->\n\n```tsx title=\"src/routes/__root.tsx\"\nimport { createRootRoute, Link, Outlet } from '@tanstack/react-router'\nimport { TanStackRouterDevtools } from '@tanstack/react-router-devtools'\n\nconst RootLayout = () => (\n <>\n <div className=\"p-2 flex gap-2\">\n <Link to=\"/\" className=\"[&.active]:font-bold\">\n Home\n </Link>{' '}\n <Link to=\"/about\" className=\"[&.active]:font-bold\">\n About\n </Link>\n </div>\n <hr />\n <Outlet />\n <TanStackRouterDevtools />\n </>\n)\n\nexport const Route = createRootRoute({ component: RootLayout })\n```\n\n```tsx title=\"src/routes/index.tsx\"\nimport { createFileRoute } from '@tanstack/react-router'\n\nexport const Route = createFileRoute('/')({\n component: Index,\n})\n\nfunction Index() {\n return (\n <div className=\"p-2\">\n <h3>Welcome Home!</h3>\n </div>\n )\n}\n```\n\n```tsx title=\"src/routes/about.tsx\"\nimport { createFileRoute } from '@tanstack/react-router'\n\nexport const Route = createFileRoute('/about')({\n component: About,\n})\n\nfunction About() {\n return <div className=\"p-2\">Hello from About!</div>\n}\n```\n\n```tsx title=\"src/main.tsx\"\nimport { StrictMode } from 'react'\nimport ReactDOM from 'react-dom/client'\nimport { RouterProvider, createRouter } from '@tanstack/react-router'\n\n// Import the generated route tree\nimport { routeTree } from './routeTree.gen'\n\n// Create a new router instance\nconst router = createRouter({ routeTree })\n\n// Register the router instance for type safety\ndeclare module '@tanstack/react-router' {\n interface Register {\n router: typeof router\n }\n}\n\n// Render the app\nconst rootElement = document.getElementById('root')!\nif (!rootElement.innerHTML) {\n const root = ReactDOM.createRoot(rootElement)\n root.render(\n <StrictMode>\n <RouterProvider router={router} />\n </StrictMode>,\n )\n}\n```\n\n<!-- ::end:tabs -->\n\n# Solid\n\n<!-- ::start:tabs variant=\"files\" -->\n\n```tsx title=\"src/routes/__root.tsx\"\nimport { createRootRoute, Link, Outlet } from '@tanstack/solid-router'\nimport { TanStackRouterDevtools } from '@tanstack/solid-router-devtools'\n\nconst RootLayout = () => (\n <>\n <div class=\"p-2 flex gap-2\">\n <Link to=\"/\" class=\"[&.active]:font-bold\">\n Home\n </Link>{' '}\n <Link to=\"/about\" class=\"[&.active]:font-bold\">\n About\n </Link>\n </div>\n <hr />\n <Outlet />\n <TanStackRouterDevtools />\n </>\n)\n\nexport const Route = createRootRoute({ component: RootLayout })\n```\n\n```tsx title=\"src/routes/index.tsx\"\nimport { createFileRoute } from '@tanstack/solid-router'\n\nexport const Route = createFileRoute('/')({\n component: Index,\n})\n\nfunction Index() {\n return (\n <div class=\"p-2\">\n <h3>Welcome Home!</h3>\n </div>\n )\n}\n```\n\n```tsx title=\"src/routes/about.tsx\"\nimport { createFileRoute } from '@tanstack/solid-router'\n\nexport const Route = createFileRoute('/about')({\n component: About,\n})\n\nfunction About() {\n return <div class=\"p-2\">Hello from About!</div>\n}\n```\n\n```tsx title=\"src/main.tsx\"\n/* @refresh reload */\nimport { render } from 'solid-js/web'\nimport { RouterProvider, Line truncated
export default _default;
@@ -0,0 +1,11 @@
'use strict';
var stringify = require('./stringify');
var parse = require('./parse');
var formats = require('./formats');
module.exports = {
formats: formats,
parse: parse,
stringify: stringify
};
@@ -0,0 +1 @@
{"version":3,"file":"readable-stream.d.ts","sourceRoot":"","sources":["../../../web/readable-stream.ts"],"names":[],"mappings":"AAqFA,QAAA,MAAM,oBAAoB,KA6CxB,CAAC;AAEH,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1 @@
{"version":3,"names":["_defineEnumerableProperties","obj","descs","key","desc","configurable","enumerable","writable","Object","defineProperty","getOwnPropertySymbols","objectSymbols","i","length","sym"],"sources":["../../src/helpers/defineEnumerableProperties.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n/* @onlyBabel7 */\nexport default function _defineEnumerableProperties<T>(\n obj: T,\n descs: Record<string | symbol, PropertyDescriptor>,\n): T {\n // eslint-disable-next-line guard-for-in\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n\n // Symbols are not enumerated over by for-in loops. If native\n // Symbols are available, fetch all of the descs object's own\n // symbol properties and define them on our target object too.\n if (Object.getOwnPropertySymbols) {\n var objectSymbols = Object.getOwnPropertySymbols(descs);\n for (var i = 0; i < objectSymbols.length; i++) {\n var sym = objectSymbols[i];\n desc = descs[sym];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, sym, desc);\n }\n }\n return obj;\n}\n"],"mappings":";;;;;;AAEe,SAASA,2BAA2BA,CACjDC,GAAM,EACNC,KAAkD,EAC/C;EAEH,KAAK,IAAIC,GAAG,IAAID,KAAK,EAAE;IACrB,IAAIE,IAAI,GAAGF,KAAK,CAACC,GAAG,CAAC;IACrBC,IAAI,CAACC,YAAY,GAAGD,IAAI,CAACE,UAAU,GAAG,IAAI;IAC1C,IAAI,OAAO,IAAIF,IAAI,EAAEA,IAAI,CAACG,QAAQ,GAAG,IAAI;IACzCC,MAAM,CAACC,cAAc,CAACR,GAAG,EAAEE,GAAG,EAAEC,IAAI,CAAC;EACvC;EAKA,IAAII,MAAM,CAACE,qBAAqB,EAAE;IAChC,IAAIC,aAAa,GAAGH,MAAM,CAACE,qBAAqB,CAACR,KAAK,CAAC;IACvD,KAAK,IAAIU,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,aAAa,CAACE,MAAM,EAAED,CAAC,EAAE,EAAE;MAC7C,IAAIE,GAAG,GAAGH,aAAa,CAACC,CAAC,CAAC;MAC1BR,IAAI,GAAGF,KAAK,CAACY,GAAG,CAAC;MACjBV,IAAI,CAACC,YAAY,GAAGD,IAAI,CAACE,UAAU,GAAG,IAAI;MAC1C,IAAI,OAAO,IAAIF,IAAI,EAAEA,IAAI,CAACG,QAAQ,GAAG,IAAI;MACzCC,MAAM,CAACC,cAAc,CAACR,GAAG,EAAEa,GAAG,EAAEV,IAAI,CAAC;IACvC;EACF;EACA,OAAOH,GAAG;AACZ","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"pill.js","sources":["../../../src/icons/pill.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Pill\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTAuNSAyMC41IDEwLTEwYTQuOTUgNC45NSAwIDEgMC03LTdsLTEwIDEwYTQuOTUgNC45NSAwIDEgMCA3IDdaIiAvPgogIDxwYXRoIGQ9Im04LjUgOC41IDcgNyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/pill\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 Pill = createLucideIcon('Pill', [\n [\n 'path',\n { d: 'm10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z', key: 'wa1lgi' },\n ],\n ['path', { d: 'm8.5 8.5 7 7', key: 'rvfmvr' }],\n]);\n\nexport default Pill;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CACpC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoE,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CACzF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC/C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,20 @@
/**
* @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 MicOff = createLucideIcon("MicOff", [
["line", { x1: "2", x2: "22", y1: "2", y2: "22", key: "a6p6uj" }],
["path", { d: "M18.89 13.23A7.12 7.12 0 0 0 19 12v-2", key: "80xlxr" }],
["path", { d: "M5 10v2a7 7 0 0 0 12 5", key: "p2k8kg" }],
["path", { d: "M15 9.34V5a3 3 0 0 0-5.68-1.33", key: "1gzdoj" }],
["path", { d: "M9 9v3a3 3 0 0 0 5.12 2.12", key: "r2i35w" }],
["line", { x1: "12", x2: "12", y1: "19", y2: "22", key: "x3vr5v" }]
]);
export { MicOff as default };
//# sourceMappingURL=mic-off.js.map
@@ -0,0 +1,342 @@
#include <string>
#include <fstream>
#include <stdlib.h>
#include <algorithm>
#include "../DirTree.hh"
#include "../Event.hh"
#include "./BSER.hh"
#include "./WatchmanBackend.hh"
#ifdef _WIN32
#include "../windows/win_utils.hh"
#define S_ISDIR(mode) ((mode & _S_IFDIR) == _S_IFDIR)
#define popen _popen
#define pclose _pclose
#else
#include <sys/stat.h>
#define normalizePath(dir) dir
#endif
template<typename T>
BSER readBSER(T &&do_read) {
std::stringstream oss;
char buffer[256];
size_t r;
int64_t len = -1;
do {
// Start by reading a minimal amount of data in order to decode the length.
// After that, attempt to read the remaining length, up to the buffer size.
r = do_read(buffer, len == -1 ? 20 : (len < 256 ? len : 256));
oss << std::string(buffer, r);
if (len == -1) {
uint64_t l = BSER::decodeLength(oss);
len = l + oss.tellg();
}
len -= r;
} while (len > 0);
return BSER(oss);
}
std::string getSockPath() {
auto var = getenv("WATCHMAN_SOCK");
if (var && *var) {
return std::string(var);
}
#ifdef _WIN32
FILE *fp = popen("watchman --output-encoding=bser get-sockname", "r");
#else
FILE *fp = popen("watchman --output-encoding=bser get-sockname 2>/dev/null", "r");
#endif
if (fp == NULL || errno == ECHILD) {
throw std::runtime_error("Failed to execute watchman");
}
BSER b = readBSER([fp] (char *buf, size_t len) {
return fread(buf, sizeof(char), len, fp);
});
pclose(fp);
auto objValue = b.objectValue();
auto foundSockname = objValue.find("sockname");
if (foundSockname == objValue.end()) {
throw std::runtime_error("sockname not found");
}
return foundSockname->second.stringValue();
}
std::unique_ptr<IPC> watchmanConnect() {
std::string path = getSockPath();
return std::unique_ptr<IPC>(new IPC(path));
}
BSER watchmanRead(IPC *ipc) {
return readBSER([ipc] (char *buf, size_t len) {
return ipc->read(buf, len);
});
}
BSER::Object WatchmanBackend::watchmanRequest(BSER b) {
std::string cmd = b.encode();
mIPC->write(cmd);
mRequestSignal.notify();
mResponseSignal.wait();
mResponseSignal.reset();
if (!mError.empty()) {
std::runtime_error err = std::runtime_error(mError);
mError = std::string();
throw err;
}
return mResponse;
}
void WatchmanBackend::watchmanWatch(std::string dir) {
std::vector<BSER> cmd;
cmd.push_back("watch");
cmd.push_back(normalizePath(dir));
watchmanRequest(cmd);
}
bool WatchmanBackend::checkAvailable() {
try {
watchmanConnect();
return true;
} catch (std::exception&) {
return false;
}
}
void handleFiles(WatcherRef watcher, BSER::Object obj) {
auto found = obj.find("files");
if (found == obj.end()) {
throw WatcherError("Error reading changes from watchman", watcher);
}
auto files = found->second.arrayValue();
for (auto it = files.begin(); it != files.end(); it++) {
auto file = it->objectValue();
auto name = file.find("name")->second.stringValue();
#ifdef _WIN32
std::replace(name.begin(), name.end(), '/', '\\');
#endif
auto mode = file.find("mode")->second.intValue();
auto isNew = file.find("new")->second.boolValue();
auto exists = file.find("exists")->second.boolValue();
auto path = watcher->mDir + DIR_SEP + name;
if (watcher->isIgnored(path)) {
continue;
}
if (isNew && exists) {
watcher->mEvents.create(path);
} else if (exists && !S_ISDIR(mode)) {
watcher->mEvents.update(path);
} else if (!isNew && !exists) {
watcher->mEvents.remove(path);
}
}
}
void WatchmanBackend::handleSubscription(BSER::Object obj) {
std::unique_lock<std::mutex> lock(mMutex);
auto subscription = obj.find("subscription")->second.stringValue();
auto it = mSubscriptions.find(subscription);
if (it == mSubscriptions.end()) {
return;
}
auto watcher = it->second;
try {
handleFiles(watcher, obj);
watcher->notify();
} catch (WatcherError &err) {
handleWatcherError(err);
}
}
void WatchmanBackend::start() {
mIPC = watchmanConnect();
notifyStarted();
while (true) {
// If there are no subscriptions we are reading, wait for a request.
if (mSubscriptions.size() == 0) {
mRequestSignal.wait();
mRequestSignal.reset();
}
// Break out of loop if we are stopped.
if (mStopped) {
break;
}
// Attempt to read from the socket.
// If there is an error and we are stopped, break.
BSER b;
try {
b = watchmanRead(&*mIPC);
} catch (std::exception &err) {
if (mStopped) {
break;
} else if (mResponseSignal.isWaiting()) {
mError = err.what();
mResponseSignal.notify();
} else {
// Throwing causes the backend to be destroyed, but we never reach the code below to notify the signal
mEndedSignal.notify();
throw;
}
}
auto obj = b.objectValue();
auto error = obj.find("error");
if (error != obj.end()) {
mError = error->second.stringValue();
mResponseSignal.notify();
continue;
}
// If this message is for a subscription, handle it, otherwise notify the request.
auto subscription = obj.find("subscription");
if (subscription != obj.end()) {
handleSubscription(obj);
} else {
mResponse = obj;
mResponseSignal.notify();
}
}
mEndedSignal.notify();
}
WatchmanBackend::~WatchmanBackend() {
// Mark the watcher as stopped, close the socket, and trigger the lock.
// This will cause the read loop to be broken and the thread to exit.
mStopped = true;
mIPC.reset();
mRequestSignal.notify();
// If not ended yet, wait.
mEndedSignal.wait();
}
std::string WatchmanBackend::clock(WatcherRef watcher) {
BSER::Array cmd;
cmd.push_back("clock");
cmd.push_back(normalizePath(watcher->mDir));
BSER::Object obj = watchmanRequest(cmd);
auto found = obj.find("clock");
if (found == obj.end()) {
throw WatcherError("Error reading clock from watchman", watcher);
}
return found->second.stringValue();
}
void WatchmanBackend::writeSnapshot(WatcherRef watcher, std::string *snapshotPath) {
std::unique_lock<std::mutex> lock(mMutex);
watchmanWatch(watcher->mDir);
std::ofstream ofs(*snapshotPath);
ofs << clock(watcher);
}
void WatchmanBackend::getEventsSince(WatcherRef watcher, std::string *snapshotPath) {
std::unique_lock<std::mutex> lock(mMutex);
std::ifstream ifs(*snapshotPath);
if (ifs.fail()) {
return;
}
watchmanWatch(watcher->mDir);
std::string clock;
ifs >> clock;
BSER::Array cmd;
cmd.push_back("since");
cmd.push_back(normalizePath(watcher->mDir));
cmd.push_back(clock);
BSER::Object obj = watchmanRequest(cmd);
handleFiles(watcher, obj);
}
std::string getId(WatcherRef watcher) {
std::ostringstream id;
id << "parcel-";
id << static_cast<void*>(watcher.get());
return id.str();
}
// This function is called by Backend::watch which takes a lock on mMutex
void WatchmanBackend::subscribe(WatcherRef watcher) {
watchmanWatch(watcher->mDir);
std::string id = getId(watcher);
BSER::Array cmd;
cmd.push_back("subscribe");
cmd.push_back(normalizePath(watcher->mDir));
cmd.push_back(id);
BSER::Array fields;
fields.push_back("name");
fields.push_back("mode");
fields.push_back("exists");
fields.push_back("new");
BSER::Object opts;
opts.emplace("fields", fields);
opts.emplace("since", clock(watcher));
if (watcher->mIgnorePaths.size() > 0) {
BSER::Array ignore;
BSER::Array anyOf;
anyOf.push_back("anyof");
for (auto it = watcher->mIgnorePaths.begin(); it != watcher->mIgnorePaths.end(); it++) {
std::string pathStart = watcher->mDir + DIR_SEP;
if (it->rfind(pathStart, 0) == 0) {
auto relative = it->substr(pathStart.size());
BSER::Array dirname;
dirname.push_back("dirname");
dirname.push_back(relative);
anyOf.push_back(dirname);
}
}
ignore.push_back("not");
ignore.push_back(anyOf);
opts.emplace("expression", ignore);
}
cmd.push_back(opts);
watchmanRequest(cmd);
mSubscriptions.emplace(id, watcher);
mRequestSignal.notify();
}
// This function is called by Backend::unwatch which takes a lock on mMutex
void WatchmanBackend::unsubscribe(WatcherRef watcher) {
std::string id = getId(watcher);
auto erased = mSubscriptions.erase(id);
if (erased) {
BSER::Array cmd;
cmd.push_back("unsubscribe");
cmd.push_back(normalizePath(watcher->mDir));
cmd.push_back(id);
watchmanRequest(cmd);
}
}
@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.escape = void 0;
/**
* Escape all magic characters in a glob pattern.
*
* If the {@link MinimatchOptions.windowsPathsNoEscape}
* option is used, then characters are escaped by wrapping in `[]`, because
* a magic character wrapped in a character class can only be satisfied by
* that exact character. In this mode, `\` is _not_ escaped, because it is
* not interpreted as a magic character, but instead as a path separator.
*
* If the {@link MinimatchOptions.magicalBraces} option is used,
* then braces (`{` and `}`) will be escaped.
*/
const escape = (s, { windowsPathsNoEscape = false, magicalBraces = false, } = {}) => {
// don't need to escape +@! because we escape the parens
// that make those magic, and escaping ! as [!] isn't valid,
// because [!]] is a valid glob class meaning not ']'.
if (magicalBraces) {
return windowsPathsNoEscape ?
s.replace(/[?*()[\]{}]/g, '[$&]')
: s.replace(/[?*()[\]\\{}]/g, '\\$&');
}
return windowsPathsNoEscape ?
s.replace(/[?*()[\]]/g, '[$&]')
: s.replace(/[?*()[\]\\]/g, '\\$&');
};
exports.escape = escape;
//# sourceMappingURL=escape.js.map
@@ -0,0 +1,15 @@
"use client";
import { useContext, useMemo } from 'react';
import { MotionContext } from './index.mjs';
import { getCurrentTreeVariants } from './utils.mjs';
function useCreateMotionContext(props) {
const { initial, animate } = getCurrentTreeVariants(props, useContext(MotionContext));
return useMemo(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);
}
function variantLabelsAsDependency(prop) {
return Array.isArray(prop) ? prop.join(" ") : prop;
}
export { useCreateMotionContext };
//# sourceMappingURL=create.mjs.map
@@ -0,0 +1,43 @@
{
"name": "yocto-queue",
"version": "0.1.0",
"description": "Tiny queue data structure",
"license": "MIT",
"repository": "sindresorhus/yocto-queue",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"engines": {
"node": ">=10"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"queue",
"data",
"structure",
"algorithm",
"queues",
"queuing",
"list",
"array",
"linkedlist",
"fifo",
"enqueue",
"dequeue",
"data-structure"
],
"devDependencies": {
"ava": "^2.4.0",
"tsd": "^0.13.1",
"xo": "^0.35.0"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"folder-x.js","sources":["../../../src/icons/folder-x.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FolderX\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjAgMjBhMiAyIDAgMCAwIDItMlY4YTIgMiAwIDAgMC0yLTJoLTcuOWEyIDIgMCAwIDEtMS42OS0uOUw5LjYgMy45QTIgMiAwIDAgMCA3LjkzIDNINGEyIDIgMCAwIDAtMiAydjEzYTIgMiAwIDAgMCAyIDJaIiAvPgogIDxwYXRoIGQ9Im05LjUgMTAuNSA1IDUiIC8+CiAgPHBhdGggZD0ibTE0LjUgMTAuNS01IDUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/folder-x\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 FolderX = createLucideIcon('FolderX', [\n [\n 'path',\n {\n d: 'M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z',\n key: '1kt360',\n },\n ],\n ['path', { d: 'm9.5 10.5 5 5', key: 'ra9qjz' }],\n ['path', { d: 'm14.5 10.5-5 5', key: 'l2rkpq' }],\n]);\n\nexport default FolderX;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,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,CAA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AA,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,79 @@
{
"name": "source-map",
"description": "Generates and consumes source maps",
"version": "0.7.6",
"homepage": "https://github.com/mozilla/source-map",
"author": "Nick Fitzgerald <nfitzgerald@mozilla.com>",
"contributors": [
"Tobias Koppers <tobias.koppers@googlemail.com>",
"Duncan Beevers <duncan@dweebd.com>",
"Stephen Crane <scrane@mozilla.com>",
"Ryan Seddon <seddon.ryan@gmail.com>",
"Miles Elam <miles.elam@deem.com>",
"Mihai Bazon <mihai.bazon@gmail.com>",
"Michael Ficarra <github.public.email@michael.ficarra.me>",
"Todd Wolfson <todd@twolfson.com>",
"Alexander Solovyov <alexander@solovyov.net>",
"Felix Gnass <fgnass@gmail.com>",
"Conrad Irwin <conrad.irwin@gmail.com>",
"usrbincc <usrbincc@yahoo.com>",
"David Glasser <glasser@davidglasser.net>",
"Chase Douglas <chase@newrelic.com>",
"Evan Wallace <evan.exe@gmail.com>",
"Heather Arthur <fayearthur@gmail.com>",
"Hugh Kennedy <hughskennedy@gmail.com>",
"David Glasser <glasser@davidglasser.net>",
"Simon Lydell <simon.lydell@gmail.com>",
"Jmeas Smith <jellyes2@gmail.com>",
"Michael Z Goddard <mzgoddard@gmail.com>",
"azu <azu@users.noreply.github.com>",
"John Gozde <john@gozde.ca>",
"Adam Kirkton <akirkton@truefitinnovation.com>",
"Chris Montgomery <christopher.montgomery@dowjones.com>",
"J. Ryan Stinnett <jryans@gmail.com>",
"Jack Herrington <jherrington@walmartlabs.com>",
"Chris Truter <jeffpalentine@gmail.com>",
"Daniel Espeset <daniel@danielespeset.com>",
"Jamie Wong <jamie.lf.wong@gmail.com>",
"Eddy Bruël <ejpbruel@mozilla.com>",
"Hawken Rives <hawkrives@gmail.com>",
"Gilad Peleg <giladp007@gmail.com>",
"djchie <djchie.dev@gmail.com>",
"Gary Ye <garysye@gmail.com>",
"Nicolas Lalevée <nicolas.lalevee@hibnet.org>"
],
"repository": {
"type": "git",
"url": "http://github.com/mozilla/source-map.git"
},
"main": "./source-map.js",
"types": "./source-map.d.ts",
"browser": {
"./lib/read-wasm.js": "./lib/read-wasm-browser.js"
},
"files": [
"source-map.js",
"source-map.d.ts",
"lib/"
],
"engines": {
"node": ">= 12"
},
"license": "BSD-3-Clause",
"scripts": {
"lint": "eslint --fix *.js lib/ test/ --ignore-pattern 'test/source-map-tests/**'",
"test": "git submodule update --init --recursive; node test/run-tests.js",
"coverage": "c8 --reporter=text --reporter=html npm test",
"prettier": "prettier --write .",
"clean": "rm -rf coverage",
"toc": "doctoc --github --notitle README.md CONTRIBUTING.md"
},
"devDependencies": {
"c8": "^7.12.0",
"doctoc": "^2.2.1",
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.5.0",
"prettier": "^2.7.1"
},
"dependencies": {}
}
@@ -0,0 +1,288 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.SHOULD_STOP = exports.SHOULD_SKIP = exports.REMOVED = void 0;
var virtualTypes = require("./lib/virtual-types.js");
var _debug = require("debug");
var _index = require("../index.js");
var _index2 = require("../scope/index.js");
var _t = require("@babel/types");
var t = _t;
var cache = require("../cache.js");
var _generator = require("@babel/generator");
var NodePath_ancestry = require("./ancestry.js");
var NodePath_inference = require("./inference/index.js");
var NodePath_replacement = require("./replacement.js");
var NodePath_evaluation = require("./evaluation.js");
var NodePath_conversion = require("./conversion.js");
var NodePath_introspection = require("./introspection.js");
var _context = require("./context.js");
var NodePath_context = _context;
var NodePath_removal = require("./removal.js");
var NodePath_modification = require("./modification.js");
var NodePath_family = require("./family.js");
var NodePath_comments = require("./comments.js");
var NodePath_virtual_types_validator = require("./lib/virtual-types-validator.js");
const {
validate
} = _t;
const debug = _debug("babel");
const REMOVED = exports.REMOVED = 1 << 0;
const SHOULD_STOP = exports.SHOULD_STOP = 1 << 1;
const SHOULD_SKIP = exports.SHOULD_SKIP = 1 << 2;
const NodePath_Final = exports.default = class NodePath {
constructor(hub, parent) {
this.contexts = [];
this.state = null;
this._traverseFlags = 0;
this.skipKeys = null;
this.parentPath = null;
this.container = null;
this.listKey = null;
this.key = null;
this.node = null;
this.type = null;
this._store = null;
this.parent = parent;
this.hub = hub;
this.data = null;
this.context = null;
this.scope = null;
}
get removed() {
return (this._traverseFlags & 1) > 0;
}
set removed(v) {
if (v) this._traverseFlags |= 1;else this._traverseFlags &= -2;
}
get shouldStop() {
return (this._traverseFlags & 2) > 0;
}
set shouldStop(v) {
if (v) this._traverseFlags |= 2;else this._traverseFlags &= -3;
}
get shouldSkip() {
return (this._traverseFlags & 4) > 0;
}
set shouldSkip(v) {
if (v) this._traverseFlags |= 4;else this._traverseFlags &= -5;
}
static get({
hub,
parentPath,
parent,
container,
listKey,
key
}) {
if (!hub && parentPath) {
hub = parentPath.hub;
}
if (!parent) {
throw new Error("To get a node path the parent needs to exist");
}
const targetNode = container[key];
const paths = cache.getOrCreateCachedPaths(parent, parentPath);
let path = paths.get(targetNode);
if (!path) {
path = new NodePath(hub, parent);
if (targetNode) paths.set(targetNode, path);
}
_context.setup.call(path, parentPath, container, listKey, key);
return path;
}
getScope(scope) {
return this.isScope() ? new _index2.default(this) : scope;
}
setData(key, val) {
if (this.data == null) {
this.data = Object.create(null);
}
return this.data[key] = val;
}
getData(key, def) {
if (this.data == null) {
this.data = Object.create(null);
}
let val = this.data[key];
if (val === undefined && def !== undefined) val = this.data[key] = def;
return val;
}
hasNode() {
return this.node != null;
}
buildCodeFrameError(msg, Error = SyntaxError) {
return this.hub.buildError(this.node, msg, Error);
}
traverse(visitor, state) {
(0, _index.default)(this.node, visitor, this.scope, state, this);
}
set(key, node) {
validate(this.node, key, node);
this.node[key] = node;
}
getPathLocation() {
const parts = [];
let path = this;
do {
let key = path.key;
if (path.inList) key = `${path.listKey}[${key}]`;
parts.unshift(key);
} while (path = path.parentPath);
return parts.join(".");
}
debug(message) {
if (!debug.enabled) return;
debug(`${this.getPathLocation()} ${this.type}: ${message}`);
}
toString() {
return (0, _generator.default)(this.node).code;
}
get inList() {
return !!this.listKey;
}
set inList(inList) {
if (!inList) {
this.listKey = null;
}
}
get parentKey() {
return this.listKey || this.key;
}
};
const methods = {
findParent: NodePath_ancestry.findParent,
find: NodePath_ancestry.find,
getFunctionParent: NodePath_ancestry.getFunctionParent,
getStatementParent: NodePath_ancestry.getStatementParent,
getEarliestCommonAncestorFrom: NodePath_ancestry.getEarliestCommonAncestorFrom,
getDeepestCommonAncestorFrom: NodePath_ancestry.getDeepestCommonAncestorFrom,
getAncestry: NodePath_ancestry.getAncestry,
isAncestor: NodePath_ancestry.isAncestor,
isDescendant: NodePath_ancestry.isDescendant,
inType: NodePath_ancestry.inType,
getTypeAnnotation: NodePath_inference.getTypeAnnotation,
isBaseType: NodePath_inference.isBaseType,
couldBeBaseType: NodePath_inference.couldBeBaseType,
baseTypeStrictlyMatches: NodePath_inference.baseTypeStrictlyMatches,
isGenericType: NodePath_inference.isGenericType,
replaceWithMultiple: NodePath_replacement.replaceWithMultiple,
replaceWithSourceString: NodePath_replacement.replaceWithSourceString,
replaceWith: NodePath_replacement.replaceWith,
replaceExpressionWithStatements: NodePath_replacement.replaceExpressionWithStatements,
replaceInline: NodePath_replacement.replaceInline,
evaluateTruthy: NodePath_evaluation.evaluateTruthy,
evaluate: NodePath_evaluation.evaluate,
toComputedKey: NodePath_conversion.toComputedKey,
ensureBlock: NodePath_conversion.ensureBlock,
unwrapFunctionEnvironment: NodePath_conversion.unwrapFunctionEnvironment,
arrowFunctionToExpression: NodePath_conversion.arrowFunctionToExpression,
splitExportDeclaration: NodePath_conversion.splitExportDeclaration,
ensureFunctionName: NodePath_conversion.ensureFunctionName,
matchesPattern: NodePath_introspection.matchesPattern,
isStatic: NodePath_introspection.isStatic,
isNodeType: NodePath_introspection.isNodeType,
canHaveVariableDeclarationOrExpression: NodePath_introspection.canHaveVariableDeclarationOrExpression,
canSwapBetweenExpressionAndStatement: NodePath_introspection.canSwapBetweenExpressionAndStatement,
isCompletionRecord: NodePath_introspection.isCompletionRecord,
isStatementOrBlock: NodePath_introspection.isStatementOrBlock,
referencesImport: NodePath_introspection.referencesImport,
getSource: NodePath_introspection.getSource,
willIMaybeExecuteBefore: NodePath_introspection.willIMaybeExecuteBefore,
_guessExecutionStatusRelativeTo: NodePath_introspection._guessExecutionStatusRelativeTo,
resolve: NodePath_introspection.resolve,
isConstantExpression: NodePath_introspection.isConstantExpression,
isInStrictMode: NodePath_introspection.isInStrictMode,
isDenylisted: NodePath_context.isDenylisted,
visit: NodePath_context.visit,
skip: NodePath_context.skip,
skipKey: NodePath_context.skipKey,
stop: NodePath_context.stop,
setContext: NodePath_context.setContext,
requeue: NodePath_context.requeue,
requeueComputedKeyAndDecorators: NodePath_context.requeueComputedKeyAndDecorators,
remove: NodePath_removal.remove,
insertBefore: NodePath_modification.insertBefore,
insertAfter: NodePath_modification.insertAfter,
unshiftContainer: NodePath_modification.unshiftContainer,
pushContainer: NodePath_modification.pushContainer,
getOpposite: NodePath_family.getOpposite,
getCompletionRecords: NodePath_family.getCompletionRecords,
getSibling: NodePath_family.getSibling,
getPrevSibling: NodePath_family.getPrevSibling,
getNextSibling: NodePath_family.getNextSibling,
getAllNextSiblings: NodePath_family.getAllNextSiblings,
getAllPrevSiblings: NodePath_family.getAllPrevSiblings,
get: NodePath_family.get,
getAssignmentIdentifiers: NodePath_family.getAssignmentIdentifiers,
getBindingIdentifiers: NodePath_family.getBindingIdentifiers,
getOuterBindingIdentifiers: NodePath_family.getOuterBindingIdentifiers,
getBindingIdentifierPaths: NodePath_family.getBindingIdentifierPaths,
getOuterBindingIdentifierPaths: NodePath_family.getOuterBindingIdentifierPaths,
shareCommentsWithSiblings: NodePath_comments.shareCommentsWithSiblings,
addComment: NodePath_comments.addComment,
addComments: NodePath_comments.addComments
};
Object.assign(NodePath_Final.prototype, methods);
NodePath_Final.prototype.arrowFunctionToShadowed = NodePath_conversion[String("arrowFunctionToShadowed")];
Object.assign(NodePath_Final.prototype, {
has: NodePath_introspection[String("has")],
is: NodePath_introspection[String("is")],
isnt: NodePath_introspection[String("isnt")],
equals: NodePath_introspection[String("equals")],
hoist: NodePath_modification[String("hoist")],
updateSiblingKeys: NodePath_modification.updateSiblingKeys,
call: NodePath_context.call,
isBlacklisted: NodePath_context[String("isBlacklisted")],
setScope: NodePath_context.setScope,
resync: NodePath_context.resync,
popContext: NodePath_context.popContext,
pushContext: NodePath_context.pushContext,
setup: NodePath_context.setup,
setKey: NodePath_context.setKey
});
NodePath_Final.prototype._guessExecutionStatusRelativeToDifferentFunctions = NodePath_introspection._guessExecutionStatusRelativeTo;
NodePath_Final.prototype._guessExecutionStatusRelativeToDifferentFunctions = NodePath_introspection._guessExecutionStatusRelativeTo;
Object.assign(NodePath_Final.prototype, {
_getTypeAnnotation: NodePath_inference._getTypeAnnotation,
_replaceWith: NodePath_replacement._replaceWith,
_resolve: NodePath_introspection._resolve,
_call: NodePath_context._call,
_resyncParent: NodePath_context._resyncParent,
_resyncKey: NodePath_context._resyncKey,
_resyncList: NodePath_context._resyncList,
_resyncRemoved: NodePath_context._resyncRemoved,
_getQueueContexts: NodePath_context._getQueueContexts,
_removeFromScope: NodePath_removal._removeFromScope,
_callRemovalHooks: NodePath_removal._callRemovalHooks,
_remove: NodePath_removal._remove,
_markRemoved: NodePath_removal._markRemoved,
_assertUnremoved: NodePath_removal._assertUnremoved,
_containerInsert: NodePath_modification._containerInsert,
_containerInsertBefore: NodePath_modification._containerInsertBefore,
_containerInsertAfter: NodePath_modification._containerInsertAfter,
_verifyNodeList: NodePath_modification._verifyNodeList,
_getKey: NodePath_family._getKey,
_getPattern: NodePath_family._getPattern
});
for (const type of t.TYPES) {
const typeKey = `is${type}`;
const fn = t[typeKey];
NodePath_Final.prototype[typeKey] = function (opts) {
return fn(this.node, opts);
};
NodePath_Final.prototype[`assert${type}`] = function (opts) {
if (!fn(this.node, opts)) {
throw new TypeError(`Expected node path of type ${type}`);
}
};
}
Object.assign(NodePath_Final.prototype, NodePath_virtual_types_validator);
for (const type of Object.keys(virtualTypes)) {
if (type.startsWith("_")) continue;
if (!t.TYPES.includes(type)) t.TYPES.push(type);
}
//# sourceMappingURL=index.js.map
@@ -0,0 +1,695 @@
/**
* @fileoverview Object to handle access and retrieval of tokens.
* @author Brandon Mills
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const { isCommentToken } = require("@eslint-community/eslint-utils");
const assert = require("../../../../shared/assert");
const cursors = require("./cursors");
const ForwardTokenCursor = require("./forward-token-cursor");
const PaddedTokenCursor = require("./padded-token-cursor");
const utils = require("./utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const TOKENS = Symbol("tokens");
const COMMENTS = Symbol("comments");
const INDEX_MAP = Symbol("indexMap");
/**
* Creates the map from locations to indices in `tokens`.
*
* The first/last location of tokens is mapped to the index of the token.
* The first/last location of comments is mapped to the index of the next token of each comment.
* @param {Token[]} tokens The array of tokens.
* @param {Comment[]} comments The array of comments.
* @returns {Object} The map from locations to indices in `tokens`.
* @private
*/
function createIndexMap(tokens, comments) {
const map = Object.create(null);
let tokenIndex = 0;
let commentIndex = 0;
let nextStart;
let range;
while (tokenIndex < tokens.length || commentIndex < comments.length) {
nextStart =
commentIndex < comments.length
? comments[commentIndex].range[0]
: Number.MAX_SAFE_INTEGER;
while (
tokenIndex < tokens.length &&
(range = tokens[tokenIndex].range)[0] < nextStart
) {
map[range[0]] = tokenIndex;
map[range[1] - 1] = tokenIndex;
tokenIndex += 1;
}
nextStart =
tokenIndex < tokens.length
? tokens[tokenIndex].range[0]
: Number.MAX_SAFE_INTEGER;
while (
commentIndex < comments.length &&
(range = comments[commentIndex].range)[0] < nextStart
) {
map[range[0]] = tokenIndex;
map[range[1] - 1] = tokenIndex;
commentIndex += 1;
}
}
return map;
}
/**
* Creates the cursor iterates tokens with options.
* @param {CursorFactory} factory The cursor factory to initialize cursor.
* @param {Token[]} tokens The array of tokens.
* @param {Comment[]} comments The array of comments.
* @param {Object} indexMap The map from locations to indices in `tokens`.
* @param {number} startLoc The start location of the iteration range.
* @param {number} endLoc The end location of the iteration range.
* @param {number|Function|Object} [opts=0] The option object. If this is a number then it's `opts.skip`. If this is a function then it's `opts.filter`.
* @param {boolean} [opts.includeComments=false] The flag to iterate comments as well.
* @param {Function|null} [opts.filter=null] The predicate function to choose tokens.
* @param {number} [opts.skip=0] The count of tokens the cursor skips.
* @returns {Cursor} The created cursor.
* @private
*/
function createCursorWithSkip(
factory,
tokens,
comments,
indexMap,
startLoc,
endLoc,
opts,
) {
let includeComments = false;
let skip = 0;
let filter = null;
if (typeof opts === "number") {
skip = opts | 0;
} else if (typeof opts === "function") {
filter = opts;
} else if (opts) {
includeComments = !!opts.includeComments;
skip = opts.skip | 0;
filter = opts.filter || null;
}
assert(skip >= 0, "options.skip should be zero or a positive integer.");
assert(
!filter || typeof filter === "function",
"options.filter should be a function.",
);
return factory.createCursor(
tokens,
comments,
indexMap,
startLoc,
endLoc,
includeComments,
filter,
skip,
-1,
);
}
/**
* Creates the cursor iterates tokens with options.
* @param {CursorFactory} factory The cursor factory to initialize cursor.
* @param {Token[]} tokens The array of tokens.
* @param {Comment[]} comments The array of comments.
* @param {Object} indexMap The map from locations to indices in `tokens`.
* @param {number} startLoc The start location of the iteration range.
* @param {number} endLoc The end location of the iteration range.
* @param {number|Function|Object} [opts=0] The option object. If this is a number then it's `opts.count`. If this is a function then it's `opts.filter`.
* @param {boolean} [opts.includeComments] The flag to iterate comments as well.
* @param {Function|null} [opts.filter=null] The predicate function to choose tokens.
* @param {number} [opts.count=0] The maximum count of tokens the cursor iterates. Zero is no iteration for backward compatibility.
* @returns {Cursor} The created cursor.
* @private
*/
function createCursorWithCount(
factory,
tokens,
comments,
indexMap,
startLoc,
endLoc,
opts,
) {
let includeComments = false;
let count = 0;
let countExists = false;
let filter = null;
if (typeof opts === "number") {
count = opts | 0;
countExists = true;
} else if (typeof opts === "function") {
filter = opts;
} else if (opts) {
includeComments = !!opts.includeComments;
count = opts.count | 0;
countExists = typeof opts.count === "number";
filter = opts.filter || null;
}
assert(count >= 0, "options.count should be zero or a positive integer.");
assert(
!filter || typeof filter === "function",
"options.filter should be a function.",
);
return factory.createCursor(
tokens,
comments,
indexMap,
startLoc,
endLoc,
includeComments,
filter,
0,
countExists ? count : -1,
);
}
/**
* Creates the cursor iterates tokens with options.
* This is overload function of the below.
* @param {Token[]} tokens The array of tokens.
* @param {Comment[]} comments The array of comments.
* @param {Object} indexMap The map from locations to indices in `tokens`.
* @param {number} startLoc The start location of the iteration range.
* @param {number} endLoc The end location of the iteration range.
* @param {Function|Object} opts The option object. If this is a function then it's `opts.filter`.
* @param {boolean} [opts.includeComments] The flag to iterate comments as well.
* @param {Function|null} [opts.filter=null] The predicate function to choose tokens.
* @param {number} [opts.count=0] The maximum count of tokens the cursor iterates. Zero is no iteration for backward compatibility.
* @returns {Cursor} The created cursor.
* @private
*/
/**
* Creates the cursor iterates tokens with options.
* @param {Token[]} tokens The array of tokens.
* @param {Comment[]} comments The array of comments.
* @param {Object} indexMap The map from locations to indices in `tokens`.
* @param {number} startLoc The start location of the iteration range.
* @param {number} endLoc The end location of the iteration range.
* @param {number} [beforeCount=0] The number of tokens before the node to retrieve.
* @param {boolean} [afterCount=0] The number of tokens after the node to retrieve.
* @returns {Cursor} The created cursor.
* @private
*/
function createCursorWithPadding(
tokens,
comments,
indexMap,
startLoc,
endLoc,
beforeCount,
afterCount,
) {
if (
typeof beforeCount === "undefined" &&
typeof afterCount === "undefined"
) {
return new ForwardTokenCursor(
tokens,
comments,
indexMap,
startLoc,
endLoc,
);
}
if (typeof beforeCount === "number" || typeof beforeCount === "undefined") {
return new PaddedTokenCursor(
tokens,
comments,
indexMap,
startLoc,
endLoc,
beforeCount | 0,
afterCount | 0,
);
}
return createCursorWithCount(
cursors.forward,
tokens,
comments,
indexMap,
startLoc,
endLoc,
beforeCount,
);
}
/**
* Gets comment tokens that are adjacent to the current cursor position.
* @param {Cursor} cursor A cursor instance.
* @returns {Array} An array of comment tokens adjacent to the current cursor position.
* @private
*/
function getAdjacentCommentTokensFromCursor(cursor) {
const tokens = [];
let currentToken = cursor.getOneToken();
while (currentToken && isCommentToken(currentToken)) {
tokens.push(currentToken);
currentToken = cursor.getOneToken();
}
return tokens;
}
//------------------------------------------------------------------------------
// Exports
//------------------------------------------------------------------------------
/**
* The token store.
*
* This class provides methods to get tokens by locations as fast as possible.
* The methods are a part of public API, so we should be careful if it changes this class.
*
* People can get tokens in O(1) by the hash map which is mapping from the location of tokens/comments to tokens.
* Also people can get a mix of tokens and comments in O(log k), the k is the number of comments.
* Assuming that comments to be much fewer than tokens, this does not make hash map from token's locations to comments to reduce memory cost.
* This uses binary-searching instead for comments.
*/
module.exports = class TokenStore {
/**
* Initializes this token store.
* @param {Token[]} tokens The array of tokens.
* @param {Comment[]} comments The array of comments.
*/
constructor(tokens, comments) {
this[TOKENS] = tokens;
this[COMMENTS] = comments;
this[INDEX_MAP] = createIndexMap(tokens, comments);
}
//--------------------------------------------------------------------------
// Gets single token.
//--------------------------------------------------------------------------
/**
* Gets the token starting at the specified index.
* @param {number} offset Index of the start of the token's range.
* @param {Object} [options=0] The option object.
* @param {boolean} [options.includeComments=false] The flag to iterate comments as well.
* @returns {Token|null} The token starting at index, or null if no such token.
*/
getTokenByRangeStart(offset, options) {
const includeComments = options && options.includeComments;
const token = cursors.forward
.createBaseCursor(
this[TOKENS],
this[COMMENTS],
this[INDEX_MAP],
offset,
-1,
includeComments,
)
.getOneToken();
if (token && token.range[0] === offset) {
return token;
}
return null;
}
/**
* Gets the first token of the given node.
* @param {ASTNode} node The AST node.
* @param {number|Function|Object} [options=0] The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`.
* @param {boolean} [options.includeComments=false] The flag to iterate comments as well.
* @param {Function|null} [options.filter=null] The predicate function to choose tokens.
* @param {number} [options.skip=0] The count of tokens the cursor skips.
* @returns {Token|null} An object representing the token.
*/
getFirstToken(node, options) {
return createCursorWithSkip(
cursors.forward,
this[TOKENS],
this[COMMENTS],
this[INDEX_MAP],
node.range[0],
node.range[1],
options,
).getOneToken();
}
/**
* Gets the last token of the given node.
* @param {ASTNode} node The AST node.
* @param {number|Function|Object} [options=0] The option object. Same options as getFirstToken()
* @returns {Token|null} An object representing the token.
*/
getLastToken(node, options) {
return createCursorWithSkip(
cursors.backward,
this[TOKENS],
this[COMMENTS],
this[INDEX_MAP],
node.range[0],
node.range[1],
options,
).getOneToken();
}
/**
* Gets the token that precedes a given node or token.
* @param {ASTNode|Token|Comment} node The AST node or token.
* @param {number|Function|Object} [options=0] The option object. Same options as getFirstToken()
* @returns {Token|null} An object representing the token.
*/
getTokenBefore(node, options) {
return createCursorWithSkip(
cursors.backward,
this[TOKENS],
this[COMMENTS],
this[INDEX_MAP],
-1,
node.range[0],
options,
).getOneToken();
}
/**
* Gets the token that follows a given node or token.
* @param {ASTNode|Token|Comment} node The AST node or token.
* @param {number|Function|Object} [options=0] The option object. Same options as getFirstToken()
* @returns {Token|null} An object representing the token.
*/
getTokenAfter(node, options) {
return createCursorWithSkip(
cursors.forward,
this[TOKENS],
this[COMMENTS],
this[INDEX_MAP],
node.range[1],
-1,
options,
).getOneToken();
}
/**
* Gets the first token between two non-overlapping nodes.
* @param {ASTNode|Token|Comment} left Node before the desired token range.
* @param {ASTNode|Token|Comment} right Node after the desired token range.
* @param {number|Function|Object} [options=0] The option object. Same options as getFirstToken()
* @returns {Token|null} An object representing the token.
*/
getFirstTokenBetween(left, right, options) {
return createCursorWithSkip(
cursors.forward,
this[TOKENS],
this[COMMENTS],
this[INDEX_MAP],
left.range[1],
right.range[0],
options,
).getOneToken();
}
/**
* Gets the last token between two non-overlapping nodes.
* @param {ASTNode|Token|Comment} left Node before the desired token range.
* @param {ASTNode|Token|Comment} right Node after the desired token range.
* @param {number|Function|Object} [options=0] The option object. Same options as getFirstToken()
* @returns {Token|null} An object representing the token.
*/
getLastTokenBetween(left, right, options) {
return createCursorWithSkip(
cursors.backward,
this[TOKENS],
this[COMMENTS],
this[INDEX_MAP],
left.range[1],
right.range[0],
options,
).getOneToken();
}
//--------------------------------------------------------------------------
// Gets multiple tokens.
//--------------------------------------------------------------------------
/**
* Gets the first `count` tokens of the given node.
* @param {ASTNode} node The AST node.
* @param {number|Function|Object} [options=0] The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`.
* @param {boolean} [options.includeComments=false] The flag to iterate comments as well.
* @param {Function|null} [options.filter=null] The predicate function to choose tokens.
* @param {number} [options.count=0] The maximum count of tokens the cursor iterates.
* @returns {Token[]} Tokens.
*/
getFirstTokens(node, options) {
return createCursorWithCount(
cursors.forward,
this[TOKENS],
this[COMMENTS],
this[INDEX_MAP],
node.range[0],
node.range[1],
options,
).getAllTokens();
}
/**
* Gets the last `count` tokens of the given node.
* @param {ASTNode} node The AST node.
* @param {number|Function|Object} [options=0] The option object. Same options as getFirstTokens()
* @returns {Token[]} Tokens.
*/
getLastTokens(node, options) {
return createCursorWithCount(
cursors.backward,
this[TOKENS],
this[COMMENTS],
this[INDEX_MAP],
node.range[0],
node.range[1],
options,
)
.getAllTokens()
.reverse();
}
/**
* Gets the `count` tokens that precedes a given node or token.
* @param {ASTNode|Token|Comment} node The AST node or token.
* @param {number|Function|Object} [options=0] The option object. Same options as getFirstTokens()
* @returns {Token[]} Tokens.
*/
getTokensBefore(node, options) {
return createCursorWithCount(
cursors.backward,
this[TOKENS],
this[COMMENTS],
this[INDEX_MAP],
-1,
node.range[0],
options,
)
.getAllTokens()
.reverse();
}
/**
* Gets the `count` tokens that follows a given node or token.
* @param {ASTNode|Token|Comment} node The AST node or token.
* @param {number|Function|Object} [options=0] The option object. Same options as getFirstTokens()
* @returns {Token[]} Tokens.
*/
getTokensAfter(node, options) {
return createCursorWithCount(
cursors.forward,
this[TOKENS],
this[COMMENTS],
this[INDEX_MAP],
node.range[1],
-1,
options,
).getAllTokens();
}
/**
* Gets the first `count` tokens between two non-overlapping nodes.
* @param {ASTNode|Token|Comment} left Node before the desired token range.
* @param {ASTNode|Token|Comment} right Node after the desired token range.
* @param {number|Function|Object} [options=0] The option object. Same options as getFirstTokens()
* @returns {Token[]} Tokens between left and right.
*/
getFirstTokensBetween(left, right, options) {
return createCursorWithCount(
cursors.forward,
this[TOKENS],
this[COMMENTS],
this[INDEX_MAP],
left.range[1],
right.range[0],
options,
).getAllTokens();
}
/**
* Gets the last `count` tokens between two non-overlapping nodes.
* @param {ASTNode|Token|Comment} left Node before the desired token range.
* @param {ASTNode|Token|Comment} right Node after the desired token range.
* @param {number|Function|Object} [options=0] The option object. Same options as getFirstTokens()
* @returns {Token[]} Tokens between left and right.
*/
getLastTokensBetween(left, right, options) {
return createCursorWithCount(
cursors.backward,
this[TOKENS],
this[COMMENTS],
this[INDEX_MAP],
left.range[1],
right.range[0],
options,
)
.getAllTokens()
.reverse();
}
/**
* Gets all tokens that are related to the given node.
* @param {ASTNode} node The AST node.
* @param {Function|Object} options The option object. If this is a function then it's `options.filter`.
* @param {boolean} [options.includeComments=false] The flag to iterate comments as well.
* @param {Function|null} [options.filter=null] The predicate function to choose tokens.
* @param {number} [options.count=0] The maximum count of tokens the cursor iterates.
* @returns {Token[]} Array of objects representing tokens.
*/
/**
* Gets all tokens that are related to the given node.
* @param {ASTNode} node The AST node.
* @param {number} [beforeCount=0] The number of tokens before the node to retrieve.
* @param {number} [afterCount=0] The number of tokens after the node to retrieve.
* @returns {Token[]} Array of objects representing tokens.
*/
getTokens(node, beforeCount, afterCount) {
return createCursorWithPadding(
this[TOKENS],
this[COMMENTS],
this[INDEX_MAP],
node.range[0],
node.range[1],
beforeCount,
afterCount,
).getAllTokens();
}
/**
* Gets all of the tokens between two non-overlapping nodes.
* @param {ASTNode|Token|Comment} left Node before the desired token range.
* @param {ASTNode|Token|Comment} right Node after the desired token range.
* @param {Function|Object} options The option object. If this is a function then it's `options.filter`.
* @param {boolean} [options.includeComments=false] The flag to iterate comments as well.
* @param {Function|null} [options.filter=null] The predicate function to choose tokens.
* @param {number} [options.count=0] The maximum count of tokens the cursor iterates.
* @returns {Token[]} Tokens between left and right.
*/
/**
* Gets all of the tokens between two non-overlapping nodes.
* @param {ASTNode|Token|Comment} left Node before the desired token range.
* @param {ASTNode|Token|Comment} right Node after the desired token range.
* @param {number} [padding=0] Number of extra tokens on either side of center.
* @returns {Token[]} Tokens between left and right.
*/
getTokensBetween(left, right, padding) {
return createCursorWithPadding(
this[TOKENS],
this[COMMENTS],
this[INDEX_MAP],
left.range[1],
right.range[0],
padding,
padding,
).getAllTokens();
}
//--------------------------------------------------------------------------
// Others.
//--------------------------------------------------------------------------
/**
* Checks whether any comments exist or not between the given 2 nodes.
* @param {ASTNode} left The node to check.
* @param {ASTNode} right The node to check.
* @returns {boolean} `true` if one or more comments exist.
*/
commentsExistBetween(left, right) {
const index = utils.search(this[COMMENTS], left.range[1]);
return (
index < this[COMMENTS].length &&
this[COMMENTS][index].range[1] <= right.range[0]
);
}
/**
* Gets all comment tokens directly before the given node or token.
* @param {ASTNode|token} nodeOrToken The AST node or token to check for adjacent comment tokens.
* @returns {Array} An array of comments in occurrence order.
*/
getCommentsBefore(nodeOrToken) {
const cursor = createCursorWithCount(
cursors.backward,
this[TOKENS],
this[COMMENTS],
this[INDEX_MAP],
-1,
nodeOrToken.range[0],
{ includeComments: true },
);
return getAdjacentCommentTokensFromCursor(cursor).reverse();
}
/**
* Gets all comment tokens directly after the given node or token.
* @param {ASTNode|token} nodeOrToken The AST node or token to check for adjacent comment tokens.
* @returns {Array} An array of comments in occurrence order.
*/
getCommentsAfter(nodeOrToken) {
const cursor = createCursorWithCount(
cursors.forward,
this[TOKENS],
this[COMMENTS],
this[INDEX_MAP],
nodeOrToken.range[1],
-1,
{ includeComments: true },
);
return getAdjacentCommentTokensFromCursor(cursor);
}
/**
* Gets all comment tokens inside the given node.
* @param {ASTNode} node The AST node to get the comments for.
* @returns {Array} An array of comments in occurrence order.
*/
getCommentsInside(node) {
return this.getTokens(node, {
includeComments: true,
filter: isCommentToken,
});
}
};
@@ -0,0 +1 @@
{"version":3,"names":["_setPrototypeOf","require","_inheritsLoose","subClass","superClass","prototype","Object","create","constructor","setPrototypeOf"],"sources":["../../src/helpers/inheritsLoose.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nimport setPrototypeOf from \"./setPrototypeOf.ts\";\n\nexport default function _inheritsLoose(\n subClass: Function,\n superClass: Function,\n) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}\n"],"mappings":";;;;;;AAEA,IAAAA,eAAA,GAAAC,OAAA;AAEe,SAASC,cAAcA,CACpCC,QAAkB,EAClBC,UAAoB,EACpB;EACAD,QAAQ,CAACE,SAAS,GAAGC,MAAM,CAACC,MAAM,CAACH,UAAU,CAACC,SAAS,CAAC;EACxDF,QAAQ,CAACE,SAAS,CAACG,WAAW,GAAGL,QAAQ;EACzC,IAAAM,uBAAc,EAACN,QAAQ,EAAEC,UAAU,CAAC;AACtC","ignoreList":[]}
@@ -0,0 +1,54 @@
{
"name": "http-errors",
"description": "Create HTTP error objects",
"version": "2.0.1",
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",
"contributors": [
"Alan Plum <me@pluma.io>",
"Douglas Christopher Wilson <doug@somethingdoug.com>"
],
"license": "MIT",
"repository": "jshttp/http-errors",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
},
"dependencies": {
"depd": "~2.0.0",
"inherits": "~2.0.4",
"setprototypeof": "~1.2.0",
"statuses": "~2.0.2",
"toidentifier": "~1.0.1"
},
"devDependencies": {
"eslint": "7.32.0",
"eslint-config-standard": "14.1.1",
"eslint-plugin-import": "2.32.0",
"eslint-plugin-markdown": "2.2.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "5.2.0",
"eslint-plugin-standard": "4.1.0",
"mocha": "9.1.3",
"nyc": "15.1.0"
},
"engines": {
"node": ">= 0.8"
},
"scripts": {
"lint": "eslint . && node ./scripts/lint-readme-list.js",
"test": "mocha --reporter spec",
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test",
"version": "node scripts/version-history.js && git add HISTORY.md"
},
"keywords": [
"http",
"error"
],
"files": [
"index.js",
"HISTORY.md",
"LICENSE",
"README.md"
]
}
@@ -0,0 +1,188 @@
/**
* @fileoverview Rule to define spacing before/after arrow function's arrow.
* @author Jxck
* @deprecated in ESLint v8.53.0
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "arrow-spacing",
url: "https://eslint.style/rules/arrow-spacing",
},
},
],
},
type: "layout",
docs: {
description:
"Enforce consistent spacing before and after the arrow in arrow functions",
recommended: false,
url: "https://eslint.org/docs/latest/rules/arrow-spacing",
},
fixable: "whitespace",
schema: [
{
type: "object",
properties: {
before: {
type: "boolean",
default: true,
},
after: {
type: "boolean",
default: true,
},
},
additionalProperties: false,
},
],
messages: {
expectedBefore: "Missing space before =>.",
unexpectedBefore: "Unexpected space before =>.",
expectedAfter: "Missing space after =>.",
unexpectedAfter: "Unexpected space after =>.",
},
},
create(context) {
// merge rules with default
const rule = Object.assign({}, context.options[0]);
rule.before = rule.before !== false;
rule.after = rule.after !== false;
const sourceCode = context.sourceCode;
/**
* Get tokens of arrow(`=>`) and before/after arrow.
* @param {ASTNode} node The arrow function node.
* @returns {Object} Tokens of arrow and before/after arrow.
*/
function getTokens(node) {
const arrow = sourceCode.getTokenBefore(
node.body,
astUtils.isArrowToken,
);
return {
before: sourceCode.getTokenBefore(arrow),
arrow,
after: sourceCode.getTokenAfter(arrow),
};
}
/**
* Count spaces before/after arrow(`=>`) token.
* @param {Object} tokens Tokens before/after arrow.
* @returns {Object} count of space before/after arrow.
*/
function countSpaces(tokens) {
const before = tokens.arrow.range[0] - tokens.before.range[1];
const after = tokens.after.range[0] - tokens.arrow.range[1];
return { before, after };
}
/**
* Determines whether space(s) before after arrow(`=>`) is satisfy rule.
* if before/after value is `true`, there should be space(s).
* if before/after value is `false`, there should be no space.
* @param {ASTNode} node The arrow function node.
* @returns {void}
*/
function spaces(node) {
const tokens = getTokens(node);
const countSpace = countSpaces(tokens);
if (rule.before) {
// should be space(s) before arrow
if (countSpace.before === 0) {
context.report({
node: tokens.before,
messageId: "expectedBefore",
fix(fixer) {
return fixer.insertTextBefore(tokens.arrow, " ");
},
});
}
} else {
// should be no space before arrow
if (countSpace.before > 0) {
context.report({
node: tokens.before,
messageId: "unexpectedBefore",
fix(fixer) {
return fixer.removeRange([
tokens.before.range[1],
tokens.arrow.range[0],
]);
},
});
}
}
if (rule.after) {
// should be space(s) after arrow
if (countSpace.after === 0) {
context.report({
node: tokens.after,
messageId: "expectedAfter",
fix(fixer) {
return fixer.insertTextAfter(tokens.arrow, " ");
},
});
}
} else {
// should be no space after arrow
if (countSpace.after > 0) {
context.report({
node: tokens.after,
messageId: "unexpectedAfter",
fix(fixer) {
return fixer.removeRange([
tokens.arrow.range[1],
tokens.after.range[0],
]);
},
});
}
}
}
return {
ArrowFunctionExpression: spaces,
};
},
};
@@ -0,0 +1,633 @@
export default `flf2a$ 6 5 18 -1 19
usaflag.flf -- 11/6/94
Figlet conversion by Kent Nassen (kentn@cyberspace.org) based on the
font design by:
Article 2688 of rec.arts.ascii:
Path: news.itd.umich.edu!caen!spool.mu.edu!howland.reston.ans.net!news.sprintlink.net!sashimi.wwa.com!not-for-mail
From: dissel@nunic.nu.edu (David S. Issel)
Newsgroups: rec.arts.ascii,alt.ascii-art
Subject: Line: USA FLAG font
Date: 6 Nov 1994 15:48:01 -0600
Organization: National University
Lines: 72
Sender: boba@wwa.com
Approved: boba@wwa.com
Message-ID: <39jiuh$k12@gagme.wwa.com>
NNTP-Posting-Host: gagme.wwa.com
Xref: news.itd.umich.edu rec.arts.ascii:2688 alt.ascii-art:15738
--------------
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
$===@
$===@
$===@
$ @
$===@
$ @@
$== == @
$ == ==@
$ $@
$ $@
$ $@
$ $@@
$ === === @
$=========@
$ === === @
$=========@
$ === === @
$ @@
$ =H=H= @
$==H H @
$ ===== @
$ H H==@
$ =H=H= @
$ @@
$ == ==@
$ ===@
$ === @
$=== @
$== == @
$ @@
$:::== @
$::: == @
$ ===== ==@
$=== === @
$ ===== ==@
$ @@
$ ==@
$== @
$ $@
$ $@
$ $@
$ $@@
$ ===@
$=== @
$=== @
$=== @
$ ===@
$ @@
$=== @
$ ===@
$ ===@
$ ===@
$=== @
$ @@
$ ::: === @
$ ::==== @
$==========@
$ ====== @
$ === === @
$ @@
$ === @
$ === @
$=======@
$ === @
$ === @
$ @@
$ @
$ @
$ @
$ ==@
$ ==@
$== @@
$ $@
$ $@
$========@
$ $@
$ $@
$ $@@
$ $@
$ $@
$ $@
$ $@
$==@
$ $@@
$ ===@
$ === @
$ === @
$ === @
$=== @
$ @@
$:::==== @
$::: ===@
$=== ===@
$=== ===@
$ ====== @
$ @@
$:::@
$:::@
$===@
$===@
$===@
$ @@
$:::==== @
$:: ===@
$ ==== @
$ === @
$========@
$ @@
$:::=== @
$ ===@
$ ===== @
$ ===@
$====== @
$ @@
$::: ===@
$::: ===@
$========@
$ ===@
$ ===@
$ @@
$:::====@
$::: @
$====== @
$ ===@
$====== @
$ @@
$:::==== @
$::: @
$======= @
$=== ===@
$ ====== @
$ @@
$:::=====@
$ ===@
$ === @
$ ==== @
$=== @
$ @@
$:::==== @
$::: ===@
$ ====== @
$=== ===@
$ ====== @
$ @@
$:::==== @
$::: ===@
$ =======@
$ ===@
$ ===== @
$ @@
$ $@
$==@
$ $@
$==@
$ $@
$ $@@
$ $@
$ ==@
$ $@
$ ==@
$ ==@
$==$@@
$ ===@
$ === @
$=== @
$ === @
$ ===@
$ @@
$ $@
$========@
$ $@
$========@
$ $@
$ $@@
$=== @
$ === @
$ ===@
$ === @
$=== @
$ @@
$ ====== @
$== ===@
$ ==== @
$ "" @
$ == @
$ @@
$ ======= @
$=== ===@
$=== =====@
$=== @
$ ======= @
$ @@
$:::==== @
$::: ===@
$========@
$=== ===@
$=== ===@
$ @@
$:::==== @
$::: ===@
$======= @
$=== ===@
$======= @
$ @@
$:::=====@
$::: @
$=== @
$=== @
$ =======@
$ @@
$:::==== @
$::: ===@
$=== ===@
$=== ===@
$======= @
$ @@
$:::=====@
$::: @
$====== @
$=== @
$========@
$ @@
$:::=====@
$::: @
$====== @
$=== @
$=== @
$ @@
$:::===== @
$::: @
$=== =====@
$=== ===@
$ ======= @
$ @@
$::: ===@
$::: ===@
$========@
$=== ===@
$=== ===@
$ @@
$:::@
$:::@
$===@
$===@
$===@
$ @@
$ :::@
$ :::@
$ ===@
$== ===@
$====== @
$ @@
$::: ===@
$::: === @
$====== @
$=== === @
$=== ===@
$ @@
$::: @
$::: @
$=== @
$=== @
$========@
$ @@
$:::======= @
$::: === ===@
$=== === ===@
$=== ===@
$=== ===@
$ @@
$:::= ===@
$:::=====@
$========@
$=== ====@
$=== ===@
$ @@
$:::==== @
$::: ===@
$=== ===@
$=== ===@
$ ====== @
$ @@
$:::==== @
$::: ===@
$======= @
$=== @
$=== @
$ @@
$:::==== @
$::: === @
$=== ==== @
$======== @
$ ==== ===@
$ @@
$:::==== @
$::: ===@
$======= @
$=== === @
$=== ===@
$ @@
$:::=== @
$::: @
$ ===== @
$ ===@
$====== @
$ @@
$:::====@
$:::====@
$ === @
$ === @
$ === @
$ @@
$::: ===@
$::: ===@
$=== ===@
$=== ===@
$ ====== @
$ @@
$::: ===@
$::: ===@
$=== ===@
$ ====== @
$ == @
$ @@
$::: === ===@
$::: === ===@
$=== === ===@
$ =========== @
$ ==== ==== @
$ @@
$::: ===@
$::: ===@
$ ====== @
$ ====== @
$=== ===@
$ @@
$::: ===@
$::: ===@
$ ===== @
$ === @
$ === @
$ @@
$:::=====@
$ ===@
$ === @
$ === @
$========@
$ @@
$=====@
$=== @
$=== @
$=== @
$=====@
$ @@
$=== @
$ === @
$ === @
$ === @
$ ===@
$ @@
$=====@
$ ===@
$ ===@
$ ===@
$=====@
$ @@
$ ==== $@
$=== ===@
$ $@
$ $@
$ $@
$ $@@
$ $@
$ $@
$ $@
$ $@
$ $@
$========@@
$== @
$ ==@
$ $@
$ $@
$ $@
$ $@@
$:::==== @
$::: ===@
$========@
$=== ===@
$=== ===@
$ @@
$:::==== @
$::: ===@
$======= @
$=== ===@
$======= @
$ @@
$:::=====@
$::: @
$=== @
$=== @
$ =======@
$ @@
$:::==== @
$::: ===@
$=== ===@
$=== ===@
$======= @
$ @@
$:::=====@
$::: @
$====== @
$=== @
$========@
$ @@
$:::=====@
$::: @
$====== @
$=== @
$=== @
$ @@
$:::===== @
$::: @
$=== =====@
$=== ===@
$ ======= @
$ @@
$::: ===@
$::: ===@
$========@
$=== ===@
$=== ===@
$ @@
$:::@
$:::@
$===@
$===@
$===@
$ @@
$ :::@
$ :::@
$ ===@
$== ===@
$====== @
$ @@
$::: ===@
$::: === @
$====== @
$=== === @
$=== ===@
$ @@
$::: @
$::: @
$=== @
$=== @
$========@
$ @@
$:::======= @
$::: === ===@
$=== === ===@
$=== ===@
$=== ===@
$ @@
$:::= ===@
$:::=====@
$========@
$=== ====@
$=== ===@
$ @@
$:::==== @
$::: ===@
$=== ===@
$=== ===@
$ ====== @
$ @@
$:::==== @
$::: ===@
$======= @
$=== @
$=== @
$ @@
$:::==== @
$::: === @
$=== ==== @
$======== @
$ ==== ===@
$ @@
$:::==== @
$::: ===@
$======= @
$=== === @
$=== ===@
$ @@
$:::=== @
$::: @
$ ===== @
$ ===@
$====== @
$ @@
$:::====@
$:::====@
$ === @
$ === @
$ === @
$ @@
$::: ===@
$::: ===@
$=== ===@
$=== ===@
$ ====== @
$ @@
$::: ===@
$::: ===@
$=== ===@
$ ====== @
$ == @
$ @@
$::: === ===@
$::: === ===@
$=== === ===@
$ =========== @
$ ==== ==== @
$ @@
$::: ===@
$::: ===@
$ ====== @
$ ====== @
$=== ===@
$ @@
$::: ===@
$::: ===@
$ ===== @
$ === @
$ === @
$ @@
$:::=====@
$ ===@
$ === @
$ === @
$========@
$ @@
$ ===@
$ ===@
$=== @
$ ===@
$ ===@
$ @@
$===@
$===@
$===@
$===@
$===@
$ @@
$=== @
$=== @
$ ===@
$=== @
$=== @
$ @@
$=== ==@
$= ===$@
$ $@
$ $@
$ $@
$ $@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
`
@@ -0,0 +1,41 @@
import { DOM_ERROR_HANDLER } from "../constants.js";
import { setInternalTagFlag } from "./utils.js";
import { globalContexts } from "../context.js";
//#region src/jsx/dom/context.ts
const createContextProviderFunction = (values) => ({ value, children }) => {
if (!children) return;
const props = { children: [{
tag: setInternalTagFlag(() => {
values.push(value);
}),
props: {}
}] };
if (Array.isArray(children)) props.children.push(...children.flat());
else props.children.push(children);
props.children.push({
tag: setInternalTagFlag(() => {
values.pop();
}),
props: {}
});
const res = {
tag: "",
props,
type: ""
};
res[DOM_ERROR_HANDLER] = (err) => {
values.pop();
throw err;
};
return res;
};
const createContext = (defaultValue) => {
const values = [defaultValue];
const context = createContextProviderFunction(values);
context.values = values;
context.Provider = context;
globalContexts.push(context);
return context;
};
//#endregion
export { createContext, createContextProviderFunction };
@@ -0,0 +1,6 @@
/**
* Listens for when the escape key is down
*/
declare function useEscapeKeydown(onEscapeKeyDownProp?: (event: KeyboardEvent) => void, ownerDocument?: Document): void;
export { useEscapeKeydown };
@@ -0,0 +1,22 @@
function addUniqueItem(arr, item) {
if (arr.indexOf(item) === -1)
arr.push(item);
}
function removeItem(arr, item) {
const index = arr.indexOf(item);
if (index > -1)
arr.splice(index, 1);
}
// Adapted from array-move
function moveItem([...arr], fromIndex, toIndex) {
const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;
if (startIndex >= 0 && startIndex < arr.length) {
const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;
const [item] = arr.splice(fromIndex, 1);
arr.splice(endIndex, 0, item);
}
return arr;
}
export { addUniqueItem, moveItem, removeItem };
//# sourceMappingURL=array.mjs.map
@@ -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 Sword = createLucideIcon("Sword", [
["polyline", { points: "14.5 17.5 3 6 3 3 6 3 17.5 14.5", key: "1hfsw2" }],
["line", { x1: "13", x2: "19", y1: "19", y2: "13", key: "1vrmhu" }],
["line", { x1: "16", x2: "20", y1: "16", y2: "20", key: "1bron3" }],
["line", { x1: "19", x2: "21", y1: "21", y2: "19", key: "13pww6" }]
]);
export { Sword as default };
//# sourceMappingURL=sword.js.map
@@ -0,0 +1,16 @@
/**
* @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 Plus = createLucideIcon("Plus", [
["path", { d: "M5 12h14", key: "1ays0h" }],
["path", { d: "M12 5v14", key: "s699le" }]
]);
export { Plus as default };
//# sourceMappingURL=plus.js.map
@@ -0,0 +1,22 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Donut = createLucideIcon("Donut", [
[
"path",
{
d: "M20.5 10a2.5 2.5 0 0 1-2.4-3H18a2.95 2.95 0 0 1-2.6-4.4 10 10 0 1 0 6.3 7.1c-.3.2-.8.3-1.2.3",
key: "19sr3x"
}
],
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
]);
export { Donut as default };
//# sourceMappingURL=donut.js.map
@@ -0,0 +1,37 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/**
* @template T
* @typedef {() => T} FunctionReturning
*/
/**
* @template T
* @param {FunctionReturning<T>} fn memorized function
* @returns {FunctionReturning<T>} new function
*/
const memoize = (fn) => {
let cache = false;
/** @type {T | undefined} */
let result;
return () => {
if (cache) {
return /** @type {T} */ (result);
}
result = fn();
cache = true;
// Allow to clean up memory for fn
// and all dependent resources
/** @type {FunctionReturning<T> | undefined} */
(fn) = undefined;
return /** @type {T} */ (result);
};
};
module.exports = memoize;
@@ -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 Percent = createLucideIcon("Percent", [
["line", { x1: "19", x2: "5", y1: "5", y2: "19", key: "1x9vlm" }],
["circle", { cx: "6.5", cy: "6.5", r: "2.5", key: "4mh3h7" }],
["circle", { cx: "17.5", cy: "17.5", r: "2.5", key: "1mdrzq" }]
]);
export { Percent as default };
//# sourceMappingURL=percent.js.map
@@ -0,0 +1,38 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/utils/crypto.ts
const sha256 = async (data) => {
return await createHash(data, {
name: "SHA-256",
alias: "sha256"
});
};
const sha1 = async (data) => {
return await createHash(data, {
name: "SHA-1",
alias: "sha1"
});
};
const md5 = async (data) => {
return await createHash(data, {
name: "MD5",
alias: "md5"
});
};
const createHash = async (data, algorithm) => {
let sourceBuffer;
if (ArrayBuffer.isView(data) || data instanceof ArrayBuffer) sourceBuffer = data;
else {
if (typeof data === "object") data = JSON.stringify(data);
sourceBuffer = new TextEncoder().encode(String(data));
}
if (crypto && crypto.subtle) {
const buffer = await crypto.subtle.digest({ name: algorithm.name }, sourceBuffer);
return Array.prototype.map.call(new Uint8Array(buffer), (x) => ("00" + x.toString(16)).slice(-2)).join("");
}
return null;
};
//#endregion
exports.createHash = createHash;
exports.md5 = md5;
exports.sha1 = sha1;
exports.sha256 = sha256;
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/index.ts"],"names":[],"mappings":";;AACA,+BAA8B;AAC9B,iCAAgD;AAChD,iCAAgD;AAChD,yCAAqD;AACrD,6CAA2D;AAC3D,6DAAqD;AACrD,mDAAoE;AACpE,qCAA+C;AAC/C,mCAA2B;AAC3B,yCAAiC;AAEjC,MAAM,aAAa,GAAe;IAChC,aAAa;IACb,aAAU;IACV,cAAW;IACX,cAAW;IACX,kBAAQ;IACR,oBAAU;IACV,4BAAkB;IAClB,uBAAa;IACb,gBAAM;IACN,eAAK;IACL,kBAAQ;IACR,EAAC,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,SAAS,EAAC;IACxD,EAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAC;CAC7C,CAAA;AAED,kBAAe,aAAa,CAAA"}
@@ -0,0 +1 @@
{"version":3,"file":"buffer.mjs","sources":["../../../src/stats/buffer.ts"],"sourcesContent":["import type { StatsRecording } from \"./types\"\n\nexport type InactiveStatsBuffer = {\n value: null\n addProjectionMetrics: null\n}\n\nexport type ActiveStatsBuffer = {\n value: StatsRecording\n addProjectionMetrics: (metrics: {\n nodes: number\n calculatedTargetDeltas: number\n calculatedProjections: number\n }) => void\n}\n\nexport const statsBuffer: InactiveStatsBuffer | ActiveStatsBuffer = {\n value: null,\n addProjectionMetrics: null,\n}\n"],"names":[],"mappings":"AAgBO,MAAM,WAAW,GAA4C;AAChE,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,oBAAoB,EAAE,IAAI;;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"server-cog.js","sources":["../../../src/icons/server-cog.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ServerCog\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIzIiAvPgogIDxwYXRoIGQ9Ik00LjUgMTBINGEyIDIgMCAwIDEtMi0yVjRhMiAyIDAgMCAxIDItMmgxNmEyIDIgMCAwIDEgMiAydjRhMiAyIDAgMCAxLTIgMmgtLjUiIC8+CiAgPHBhdGggZD0iTTQuNSAxNEg0YTIgMiAwIDAgMC0yIDJ2NGEyIDIgMCAwIDAgMiAyaDE2YTIgMiAwIDAgMCAyLTJ2LTRhMiAyIDAgMCAwLTItMmgtLjUiIC8+CiAgPHBhdGggZD0iTTYgNmguMDEiIC8+CiAgPHBhdGggZD0iTTYgMThoLjAxIiAvPgogIDxwYXRoIGQ9Im0xNS43IDEzLjQtLjktLjMiIC8+CiAgPHBhdGggZD0ibTkuMiAxMC45LS45LS4zIiAvPgogIDxwYXRoIGQ9Im0xMC42IDE1LjcuMy0uOSIgLz4KICA8cGF0aCBkPSJtMTMuNiAxNS43LS40LTEiIC8+CiAgPHBhdGggZD0ibTEwLjggOS4zLS40LTEiIC8+CiAgPHBhdGggZD0ibTguMyAxMy42IDEtLjQiIC8+CiAgPHBhdGggZD0ibTE0LjcgMTAuOCAxLS40IiAvPgogIDxwYXRoIGQ9Im0xMy40IDguMy0uMy45IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/server-cog\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 ServerCog = createLucideIcon('ServerCog', [\n ['circle', { cx: '12', cy: '12', r: '3', key: '1v7zrd' }],\n [\n 'path',\n {\n d: 'M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5',\n key: 'tn8das',\n },\n ],\n [\n 'path',\n {\n d: 'M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5',\n key: '1g2pve',\n },\n ],\n ['path', { d: 'M6 6h.01', key: '1utrut' }],\n ['path', { d: 'M6 18h.01', key: 'uhywen' }],\n ['path', { d: 'm15.7 13.4-.9-.3', key: '1jwmzr' }],\n ['path', { d: 'm9.2 10.9-.9-.3', key: 'qapnim' }],\n ['path', { d: 'm10.6 15.7.3-.9', key: 'quwk0k' }],\n ['path', { d: 'm13.6 15.7-.4-1', key: 'cb9xp7' }],\n ['path', { d: 'm10.8 9.3-.4-1', key: '1uaiz5' }],\n ['path', { d: 'm8.3 13.6 1-.4', key: 's6srou' }],\n ['path', { d: 'm14.7 10.8 1-.4', key: '4d31cq' }],\n ['path', { d: 'm13.4 8.3-.3.9', key: '1bm987' }],\n]);\n\nexport default ServerCog;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,C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A;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoB,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,CACjD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmBLine truncated
@@ -0,0 +1,2 @@
import * as ts from 'typescript';
export declare function isTypeBrandedLiteralLike(type: ts.Type): boolean;
@@ -0,0 +1,3 @@
import { $ as EmbeddedResourceSchema, $n as TaskMetadataSchema, $t as PrimitiveSchemaDefinitionSchema, A as ClientRequestSchema, An as SamplingContentSchema, Ar as PARSE_ERROR, At as ListResourceTemplatesRequestSchema, B as CreateMessageResultSchema, Bn as SingleSelectEnumSchemaSchema, Bt as LoggingLevelSchema, C as CallToolResultSchema, Cn as ResourceUpdatedNotificationParamsSchema, Cr as INTERNAL_ERROR, Ct as JSONRPCResponseSchema, D as CancelledNotificationSchema, Dn as RoleSchema, Dr as LATEST_PROTOCOL_VERSION, Dt as ListChangedOptionsBaseSchema, E as CancelledNotificationParamsSchema, En as ResultSchema, Er as JSONRPC_VERSION, Et as LegacyTitledEnumSchemaSchema, F as CompleteRequestSchema, Fn as ServerRequestSchema, Fr as SUPPORTED_PROTOCOL_VERSIONS, Ft as ListRootsResultSchema, G as DiscoverResultSchema, Gn as SubscriptionsAcknowledgedNotificationParamsSchema, Gt as MultiSelectEnumSchemaSchema, H as CreateTaskResultSchema, Hn as SubscribeRequestParamsSchema, Ht as LoggingMessageNotificationSchema, I as CompleteResultSchema, In as ServerResultSchema, Ir as TRACEPARENT_META_KEY, It as ListTasksRequestSchema, J as ElicitRequestSchema, Jn as SubscriptionsListenRequestSchema, Jt as NumberSchemaSchema, K as ElicitRequestFormParamsSchema, Kn as SubscriptionsAcknowledgedNotificationSchema, Kt as NotificationSchema, L as ContentBlockSchema, Ln as ServerTasksCapabilitySchema, Lr as TRACESTATE_META_KEY, Lt as ListTasksResultSchema, M as ClientTasksCapabilitySchema, Mn as SamplingMessageSchema, Mr as RELATED_TASK_META_KEY, Mt as ListResourcesRequestSchema, N as CompatibilityCallToolResultSchema, Nn as ServerCapabilitiesSchema, Nr as SERVER_INFO_META_KEY, Nt as ListResourcesResultSchema, O as ClientCapabilitiesSchema, On as RootSchema, Or as LOG_LEVEL_META_KEY, Ot as ListPromptsRequestSchema, P as CompleteRequestParamsSchema, Pn as ServerNotificationSchema, Pr as SUBSCRIPTION_ID_META_KEY, Pt as ListRootsRequestSchema, Q as ElicitationCompleteNotificationSchema, Qn as TaskCreationParamsSchema, Qt as PingRequestSchema, R as CreateMessageRequestParamsSchema, Rn as SetLevelRequestParamsSchema, Rt as ListToolsRequestSchema, S as CallToolRequestSchema, Sn as ResourceTemplateSchema, Sr as DEFAULT_NEGOTIATED_PROTOCOL_VERSION, St as JSONRPCRequestSchema, T as CancelTaskResultSchema, Tn as ResultMetaObjectSchema, Tr as INVALID_REQUEST, Tt as JSONValueSchema, U as CursorSchema, Un as SubscribeRequestSchema, Ut as ModelHintSchema, V as CreateMessageResultWithToolsSchema, Vn as StringSchemaSchema, Vt as LoggingMessageNotificationParamsSchema, W as DiscoverRequestSchema, Wn as SubscriptionFilterSchema, Wt as ModelPreferencesSchema, X as ElicitResultSchema, Xn as SubscriptionsListenResultSchema, Xt as PaginatedRequestSchema, Y as ElicitRequestURLParamsSchema, Yn as SubscriptionsListenResultMetaSchema, Yt as PaginatedRequestParamsSchema, Z as ElicitationCompleteNotificationParamsSchema, Zn as TaskAugmentedRequestParamsSchema, Zt as PaginatedResultSchema, _ as BaseMetadataSchema, _n as ResourceLinkSchema, _r as UntitledMultiSelectEnumSchemaSchema, _t as JSONArraySchema, a as OAuthClientRegistrationErrorSchema, an as PromptListChangedNotificationSchema, ar as TextResourceContentsSchema, at as GetTaskPayloadRequestSchema, b as BooleanSchemaSchema, bn as ResourceSchema, br as CLIENT_CAPABILITIES_META_KEY, bt as JSONRPCMessageSchema, c as OAuthProtectedResourceMetadataSchema, cn as PromptSchema, cr as ToolAnnotationsSchema, ct as GetTaskResultSchema, d as OpenIdProviderDiscoveryMetadataSchema, dn as ReadResourceResultSchema, dr as ToolListChangedNotificationSchema, dt as ImageContentSchema, en as ProgressNotificationParamsSchema, er as TaskSchema, et as EmptyResultSchema, f as OpenIdProviderMetadataSchema, fn as RelatedTaskMetadataSchema, fr as ToolResultContentSchema, ft as ImplementationSchema, g as AudioContentSchema, gn as ResourceContentsSchema, gr as UnsubscribeRequestSchema, gt as InitializedNotificationSchema, h as AnnotationsSchema, hn as RequestSchema, hr as UnsubscribeRequestParamsSchema, ht as InitializeResultSchema, i as OAuthClientMetadataSchema, in as PromptArgumentSchema, ir as TextContentSchema, it as GetPromptResultSchema, j as ClientResultSchema, jn as SamplingMessageContentBlockSchema, jr as PROTOCOL_VERSION_META_KEY, jt as ListResourceTemplatesResultSchema, k as ClientNotificationSchema, kn as RootsListChangedNotificationSchema, kr as METHOD_NOT_FOUND, kt as ListPromptsResultSchema, l as OAuthTokenRevocationRequestSchema, ln as ReadResourceRequestParamsSchema, lr as ToolChoiceSchema, lt as IconSchema, m as SafeUrlSchema, mn as RequestMetaSchema, mr as ToolUseContentSchema, mt as InitializeRequestSchema, n as OAuthClientInformationFullSchema, nn as ProgressSchema, nr as TaskStatusNotificationSchema, nt as GetPromptRequestParamsSchema, o as OAuthErrorResponseSchema, on as PromptMessageSchema, or as TitledMultiSelectEnumSchemaSchema, ot as GetTaskPayloadResultSchema, p as OptionalSafeUrlSchema, pn as RequestIdSchemaLine truncated
export { AnnotationsSchema, AudioContentSchema, BAGGAGE_META_KEY, BaseMetadataSchema, BaseRequestParamsSchema, BlobResourceContentsSchema, BooleanSchemaSchema, CLIENT_CAPABILITIES_META_KEY, CLIENT_INFO_META_KEY, CallToolRequestParamsSchema, CallToolRequestSchema, CallToolResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, CancelledNotificationParamsSchema, CancelledNotificationSchema, ClientCapabilitiesSchema, ClientNotificationSchema, ClientRequestSchema, ClientResultSchema, ClientTasksCapabilitySchema, CompatibilityCallToolResultSchema, CompleteRequestParamsSchema, CompleteRequestSchema, CompleteResultSchema, ContentBlockSchema, CreateMessageRequestParamsSchema, CreateMessageRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, CreateTaskResultSchema, CursorSchema, DEFAULT_NEGOTIATED_PROTOCOL_VERSION, DiscoverRequestSchema, DiscoverResultSchema, ElicitRequestFormParamsSchema, ElicitRequestParamsSchema, ElicitRequestSchema, ElicitRequestURLParamsSchema, ElicitResultSchema, ElicitationCompleteNotificationParamsSchema, ElicitationCompleteNotificationSchema, EmbeddedResourceSchema, EmptyResultSchema, EnumSchemaSchema, GetPromptRequestParamsSchema, GetPromptRequestSchema, GetPromptResultSchema, GetTaskPayloadRequestSchema, GetTaskPayloadResultSchema, GetTaskRequestSchema, GetTaskResultSchema, INTERNAL_ERROR, INVALID_PARAMS, INVALID_REQUEST, IconSchema, IconsSchema, IdJagTokenExchangeResponseSchema, ImageContentSchema, ImplementationSchema, InitializeRequestParamsSchema, InitializeRequestSchema, InitializeResultSchema, InitializedNotificationSchema, JSONArraySchema, JSONObjectSchema, JSONRPCErrorResponseSchema, JSONRPCMessageSchema, JSONRPCNotificationSchema, JSONRPCRequestSchema, JSONRPCResponseSchema, JSONRPCResultResponseSchema, JSONRPC_VERSION, JSONValueSchema, LATEST_PROTOCOL_VERSION, LOG_LEVEL_META_KEY, LegacyTitledEnumSchemaSchema, ListChangedOptionsBaseSchema, ListPromptsRequestSchema, ListPromptsResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListRootsRequestSchema, ListRootsResultSchema, ListTasksRequestSchema, ListTasksResultSchema, ListToolsRequestSchema, ListToolsResultSchema, LoggingLevelSchema, LoggingMessageNotificationParamsSchema, LoggingMessageNotificationSchema, METHOD_NOT_FOUND, ModelHintSchema, ModelPreferencesSchema, MultiSelectEnumSchemaSchema, NotificationSchema, NotificationsParamsSchema, NumberSchemaSchema, OAuthClientInformationFullSchema, OAuthClientInformationSchema, OAuthClientMetadataSchema, OAuthClientRegistrationErrorSchema, OAuthErrorResponseSchema, OAuthMetadataSchema, OAuthProtectedResourceMetadataSchema, OAuthTokenRevocationRequestSchema, OAuthTokensSchema, OpenIdProviderDiscoveryMetadataSchema, OpenIdProviderMetadataSchema, OptionalSafeUrlSchema, PARSE_ERROR, PROTOCOL_VERSION_META_KEY, PaginatedRequestParamsSchema, PaginatedRequestSchema, PaginatedResultSchema, PingRequestSchema, PrimitiveSchemaDefinitionSchema, ProgressNotificationParamsSchema, ProgressNotificationSchema, ProgressSchema, ProgressTokenSchema, PromptArgumentSchema, PromptListChangedNotificationSchema, PromptMessageSchema, PromptReferenceSchema, PromptSchema, RELATED_TASK_META_KEY, ReadResourceRequestParamsSchema, ReadResourceRequestSchema, ReadResourceResultSchema, RelatedTaskMetadataSchema, RequestIdSchema, RequestMetaSchema, RequestSchema, ResourceContentsSchema, ResourceLinkSchema, ResourceListChangedNotificationSchema, ResourceRequestParamsSchema, ResourceSchema, ResourceTemplateReferenceSchema, ResourceTemplateSchema, ResourceUpdatedNotificationParamsSchema, ResourceUpdatedNotificationSchema, ResultMetaObjectSchema, ResultSchema, RoleSchema, RootSchema, RootsListChangedNotificationSchema, SERVER_INFO_META_KEY, SUBSCRIPTION_ID_META_KEY, SUPPORTED_PROTOCOL_VERSIONS, SafeUrlSchema, SamplingContentSchema, SamplingMessageContentBlockSchema, SamplingMessageSchema, ServerCapabilitiesSchema, ServerNotificationSchema, ServerRequestSchema, ServerResultSchema, ServerTasksCapabilitySchema, SetLevelRequestParamsSchema, SetLevelRequestSchema, SingleSelectEnumSchemaSchema, StringSchemaSchema, SubscribeRequestParamsSchema, SubscribeRequestSchema, SubscriptionFilterSchema, SubscriptionsAcknowledgedNotificationParamsSchema, SubscriptionsAcknowledgedNotificationSchema, SubscriptionsListenRequestParamsSchema, SubscriptionsListenRequestSchema, SubscriptionsListenResultMetaSchema, SubscriptionsListenResultSchema, TRACEPARENT_META_KEY, TRACESTATE_META_KEY, TaskAugmentedRequestParamsSchema, TaskCreationParamsSchema, TaskMetadataSchema, TaskSchema, TaskStatusNotificationParamsSchema, TaskStatusNotificationSchema, TaskStatusSchema, TextContentSchema, TextResourceContentsSchema, TitledMultiSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema, ToolAnnotationsSchema, ToolChoiceSchema, ToolExecutionSchema, ToolListChangedNotificationSchema, ToolResultContentSchema, ToolSchema, ToolUseContentSchema, ULine truncated
@@ -0,0 +1,414 @@
export default `flf2a$ 4 3 10 0 4
straight.flf Version 2
by: Bas Meijer meijer@info.win.tue.nl bas@damek.kth.se
fixed by: Ryan Youck youck@cs.uregina.ca
Disclaimer: most capitals have been designed by someone else
$$@
$$@
$$@
$$@@
@
| @
. @
@@
// @
$$ @
@
@@
@
_|_|_ @
-|-|- @
@@
||_ @
(||$ @
_||) @
|| @@
@
0/ @
/0 @
@@
@
()/ @
(X @
@@
/ @
$ @
$ @
@@
$/ @
($ @
$\\ @
@@
\\$ @
$) @
/$ @
@@
$ $@
$\\/$@
$/\\$@
$ $@@
$ $@
$_|_$@
$ | $@
$ $@@
$@
$$@
,$@
$@@
$ $@
$__$@
$ $@
$ $@@
$@
$ $@
. $@
$@@
@
$/ @
/$ @
@@
$ __ @
$/ \\ @
$\\__/ @
$ @@
$ @
$/| @
$ | @
$ @@
$__ @
$ _) @
$/__ @
$ @@
$__ @
$ _) @
$__) @
$ @@
$ @
$|__| @
$ | @
$ @@
$ __ @
$|_ @
$__) @
$ @@
$ __ @
$/__ @
$\\__) @
$ @@
$___ @
$ / @
$ / @
$ @@
$ __ @
$(__) @
$(__) @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@@
@
$ $ @
\\)/ @
@@
@
$$ @
)( @
@@
@
$$ @
\\/ @
/ @@
@
_ @
/_ @
@@
( @
< @
( @
@@
| @
| @
| @
@@
) @
> @
) @
@@
@
/\\/ @
@
@@
o o @
/\\ @
/--\\ @
@@
o__o @
/ \\ @
\\__/ @
@@
o o @
/ \\ @
\\__/ @
@@
@
-_- @
(_| @
@@
@
-_- @
(_) @
@@
@
- - @
|_| @
@@
__ @
|__) @
|__) @
| @@
`
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2025_intl: LibDefinition;
@@ -0,0 +1,489 @@
"use strict";
const promisify = require("util.promisify");
const gensync = require("../");
const TEST_ERROR = new Error("TEST_ERROR");
const DID_ERROR = new Error("DID_ERROR");
const doSuccess = gensync({
sync: () => 42,
async: () => Promise.resolve(42),
});
const doError = gensync({
sync: () => {
throw DID_ERROR;
},
async: () => Promise.reject(DID_ERROR),
});
function throwTestError() {
throw TEST_ERROR;
}
async function expectResult(
fn,
arg,
{ error, value, expectSync = false, syncErrback = expectSync }
) {
if (!expectSync) {
expect(() => fn.sync(arg)).toThrow(TEST_ERROR);
} else if (error) {
expect(() => fn.sync(arg)).toThrow(error);
} else {
expect(fn.sync(arg)).toBe(value);
}
if (error) {
await expect(fn.async(arg)).rejects.toBe(error);
} else {
await expect(fn.async(arg)).resolves.toBe(value);
}
await new Promise((resolve, reject) => {
let sync = true;
fn.errback(arg, (err, val) => {
try {
expect(err).toBe(error);
expect(val).toBe(value);
expect(sync).toBe(syncErrback);
resolve();
} catch (e) {
reject(e);
}
});
sync = false;
});
}
describe("gensync({})", () => {
describe("option validation", () => {
test("disallow async and errback handler together", () => {
try {
gensync({
sync: throwTestError,
async: throwTestError,
errback: throwTestError,
});
throwTestError();
} catch (err) {
expect(err.message).toMatch(
/Expected one of either opts.async or opts.errback, but got _both_\./
);
expect(err.code).toBe("GENSYNC_OPTIONS_ERROR");
}
});
test("disallow missing sync handler", () => {
try {
gensync({
async: throwTestError,
});
throwTestError();
} catch (err) {
expect(err.message).toMatch(/Expected opts.sync to be a function./);
expect(err.code).toBe("GENSYNC_OPTIONS_ERROR");
}
});
test("errback callback required", () => {
const fn = gensync({
sync: throwTestError,
async: throwTestError,
});
try {
fn.errback();
throwTestError();
} catch (err) {
expect(err.message).toMatch(/function called without callback/);
expect(err.code).toBe("GENSYNC_ERRBACK_NO_CALLBACK");
}
});
});
describe("generator function metadata", () => {
test("automatic naming", () => {
expect(
gensync({
sync: function readFileSync() {},
async: () => {},
}).name
).toBe("readFile");
expect(
gensync({
sync: function readFile() {},
async: () => {},
}).name
).toBe("readFile");
expect(
gensync({
sync: function readFileAsync() {},
async: () => {},
}).name
).toBe("readFileAsync");
expect(
gensync({
sync: () => {},
async: function readFileSync() {},
}).name
).toBe("readFileSync");
expect(
gensync({
sync: () => {},
async: function readFile() {},
}).name
).toBe("readFile");
expect(
gensync({
sync: () => {},
async: function readFileAsync() {},
}).name
).toBe("readFile");
expect(
gensync({
sync: () => {},
errback: function readFileSync() {},
}).name
).toBe("readFileSync");
expect(
gensync({
sync: () => {},
errback: function readFile() {},
}).name
).toBe("readFile");
expect(
gensync({
sync: () => {},
errback: function readFileAsync() {},
}).name
).toBe("readFileAsync");
});
test("explicit naming", () => {
expect(
gensync({
name: "readFile",
sync: () => {},
async: () => {},
}).name
).toBe("readFile");
});
test("default arity", () => {
expect(
gensync({
sync: function(a, b, c, d, e, f, g) {
throwTestError();
},
async: throwTestError,
}).length
).toBe(7);
});
test("explicit arity", () => {
expect(
gensync({
arity: 3,
sync: throwTestError,
async: throwTestError,
}).length
).toBe(3);
});
});
describe("'sync' handler", async () => {
test("success", async () => {
const fn = gensync({
sync: (...args) => JSON.stringify(args),
});
await expectResult(fn, 42, { value: "[42]", expectSync: true });
});
test("failure", async () => {
const fn = gensync({
sync: (...args) => {
throw JSON.stringify(args);
},
});
await expectResult(fn, 42, { error: "[42]", expectSync: true });
});
});
describe("'async' handler", async () => {
test("success", async () => {
const fn = gensync({
sync: throwTestError,
async: (...args) => Promise.resolve(JSON.stringify(args)),
});
await expectResult(fn, 42, { value: "[42]" });
});
test("failure", async () => {
const fn = gensync({
sync: throwTestError,
async: (...args) => Promise.reject(JSON.stringify(args)),
});
await expectResult(fn, 42, { error: "[42]" });
});
});
describe("'errback' sync handler", async () => {
test("success", async () => {
const fn = gensync({
sync: throwTestError,
errback: (...args) => args.pop()(null, JSON.stringify(args)),
});
await expectResult(fn, 42, { value: "[42]", syncErrback: true });
});
test("failure", async () => {
const fn = gensync({
sync: throwTestError,
errback: (...args) => args.pop()(JSON.stringify(args)),
});
await expectResult(fn, 42, { error: "[42]", syncErrback: true });
});
});
describe("'errback' async handler", async () => {
test("success", async () => {
const fn = gensync({
sync: throwTestError,
errback: (...args) =>
process.nextTick(() => args.pop()(null, JSON.stringify(args))),
});
await expectResult(fn, 42, { value: "[42]" });
});
test("failure", async () => {
const fn = gensync({
sync: throwTestError,
errback: (...args) =>
process.nextTick(() => args.pop()(JSON.stringify(args))),
});
await expectResult(fn, 42, { error: "[42]" });
});
});
});
describe("gensync(function* () {})", () => {
test("sync throw before body", async () => {
const fn = gensync(function*(arg = throwTestError()) {});
await expectResult(fn, undefined, {
error: TEST_ERROR,
syncErrback: true,
});
});
test("sync throw inside body", async () => {
const fn = gensync(function*() {
throwTestError();
});
await expectResult(fn, undefined, {
error: TEST_ERROR,
syncErrback: true,
});
});
test("async throw inside body", async () => {
const fn = gensync(function*() {
const val = yield* doSuccess();
throwTestError();
});
await expectResult(fn, undefined, {
error: TEST_ERROR,
});
});
test("error inside body", async () => {
const fn = gensync(function*() {
yield* doError();
});
await expectResult(fn, undefined, {
error: DID_ERROR,
expectSync: true,
syncErrback: false,
});
});
test("successful return value", async () => {
const fn = gensync(function*() {
const value = yield* doSuccess();
expect(value).toBe(42);
return 84;
});
await expectResult(fn, undefined, {
value: 84,
expectSync: true,
syncErrback: false,
});
});
test("successful final value", async () => {
const fn = gensync(function*() {
return 42;
});
await expectResult(fn, undefined, {
value: 42,
expectSync: true,
});
});
test("yield unexpected object", async () => {
const fn = gensync(function*() {
yield {};
});
try {
await fn.async();
throwTestError();
} catch (err) {
expect(err.message).toMatch(
/Got unexpected yielded value in gensync generator/
);
expect(err.code).toBe("GENSYNC_EXPECTED_START");
}
});
test("yield suspend yield", async () => {
const fn = gensync(function*() {
yield Symbol.for("gensync:v1:start");
// Should be "yield*" for no error.
yield {};
});
try {
await fn.async();
throwTestError();
} catch (err) {
expect(err.message).toMatch(/Expected GENSYNC_SUSPEND, got {}/);
expect(err.code).toBe("GENSYNC_EXPECTED_SUSPEND");
}
});
test("yield suspend return", async () => {
const fn = gensync(function*() {
yield Symbol.for("gensync:v1:start");
// Should be "yield*" for no error.
return {};
});
try {
await fn.async();
throwTestError();
} catch (err) {
expect(err.message).toMatch(/Unexpected generator completion/);
expect(err.code).toBe("GENSYNC_EXPECTED_SUSPEND");
}
});
});
describe("gensync.all()", () => {
test("success", async () => {
const fn = gensync(function*() {
const result = yield* gensync.all([doSuccess(), doSuccess()]);
expect(result).toEqual([42, 42]);
});
await expectResult(fn, undefined, {
value: undefined,
expectSync: true,
syncErrback: false,
});
});
test("error first", async () => {
const fn = gensync(function*() {
yield* gensync.all([doError(), doSuccess()]);
});
await expectResult(fn, undefined, {
error: DID_ERROR,
expectSync: true,
syncErrback: false,
});
});
test("error last", async () => {
const fn = gensync(function*() {
yield* gensync.all([doSuccess(), doError()]);
});
await expectResult(fn, undefined, {
error: DID_ERROR,
expectSync: true,
syncErrback: false,
});
});
test("empty list", async () => {
const fn = gensync(function*() {
yield* gensync.all([]);
});
await expectResult(fn, undefined, {
value: undefined,
expectSync: true,
syncErrback: false,
});
});
});
describe("gensync.race()", () => {
test("success", async () => {
const fn = gensync(function*() {
const result = yield* gensync.race([doSuccess(), doError()]);
expect(result).toEqual(42);
});
await expectResult(fn, undefined, {
value: undefined,
expectSync: true,
syncErrback: false,
});
});
test("error", async () => {
const fn = gensync(function*() {
yield* gensync.race([doError(), doSuccess()]);
});
await expectResult(fn, undefined, {
error: DID_ERROR,
expectSync: true,
syncErrback: false,
});
});
});
@@ -0,0 +1,3 @@
declare function hasNativeSymbols(): boolean;
export = hasNativeSymbols;
@@ -0,0 +1 @@
{"version":3,"file":"mailbox.js","sources":["../../../src/icons/mailbox.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Mailbox\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjIgMTdhMiAyIDAgMCAxLTIgMkg0YTIgMiAwIDAgMS0yLTJWOS41QzIgNyA0IDUgNi41IDVIMThjMi4yIDAgNCAxLjggNCA0djhaIiAvPgogIDxwb2x5bGluZSBwb2ludHM9IjE1LDkgMTgsOSAxOCwxMSIgLz4KICA8cGF0aCBkPSJNNi41IDVDOSA1IDExIDcgMTEgOS41VjE3YTIgMiAwIDAgMS0yIDIiIC8+CiAgPGxpbmUgeDE9IjYiIHgyPSI3IiB5MT0iMTAiIHkyPSIxMCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/mailbox\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 Mailbox = createLucideIcon('Mailbox', [\n [\n 'path',\n {\n d: 'M22 17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9.5C2 7 4 5 6.5 5H18c2.2 0 4 1.8 4 4v8Z',\n key: '1lbycx',\n },\n ],\n ['polyline', { points: '15,9 18,9 18,11', key: '1pm9c0' }],\n ['path', { d: 'M6.5 5C9 5 11 7 11 9.5V17a2 2 0 0 1-2 2', key: '15i455' }],\n ['line', { x1: '6', x2: '7', y1: '10', y2: '10', key: '1e2scm' }],\n]);\n\nexport default Mailbox;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,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;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,C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","16":"_lN"},G:{"1":"_t","2":"_d"},H:{"1":"1D"},I:{"1":"_PE","2":"_n","16":"fC"},J:{"1":"A","2":"D"},K:{"1":"_CB","16":"A"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:1,C:"Attributes for form submission",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"circle-slashed.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) EGOIST <0x142857@gmail.com> (https://github.com/egoist)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1 @@
{"version":3,"file":"pack.d.ts","sourceRoot":"","sources":["../../src/pack.ts"],"names":[],"mappings":"AASA,OAAW,EAAE,KAAK,KAAK,EAAE,MAAM,IAAI,CAAA;AACnC,OAAO,EACL,UAAU,EACV,cAAc,EACd,aAAa,EACd,MAAM,kBAAkB,CAAA;AAEzB,qBAAa,OAAO;IAClB,IAAI,EAAE,MAAM,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E;IAM3C,CAAC,OAAO,CAAC;IA+BT,IAAI,CAAC,OAAO,CAAC,wBAEZ;IAED,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,OAAO;IAmBtB,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,OAAO;IA2DzB,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,OAAO,GAAG,UAAU;IAmBpC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,OAAO;IAYpB,CAAC,OAAO,CAAC;IAOT,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,OAAO;IAgCnB,KAAK;IAML,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,IAAI,GAAE,QAAa,GAAG,IAAI;CAGvE;AAED,qBAAa,QAAS,SAAQ,IAAI;IAChC,IAAI,EAAE,IAAI,CAAO;gBACL,GAAG,EAAE,UAAU;IAM3B,KAAK;IACL,MAAM;IAEN,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,OAAO;IAKnB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,OAAO;IAKtB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,OAAO;CA0BpB"}
@@ -0,0 +1,3 @@
import * as ts from 'typescript';
export declare function getScriptKind(filePath: string, jsx: boolean): ts.ScriptKind;
export declare function getLanguageVariant(scriptKind: ts.ScriptKind): ts.LanguageVariant;
@@ -0,0 +1 @@
{"version":3,"file":"square-parking-off.js","sources":["../../../src/icons/square-parking-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareParkingOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMy42IDMuNkEyIDIgMCAwIDEgNSAzaDE0YTIgMiAwIDAgMSAyIDJ2MTRhMiAyIDAgMCAxLS41OSAxLjQxIiAvPgogIDxwYXRoIGQ9Ik0zIDguN1YxOWEyIDIgMCAwIDAgMiAyaDEwLjMiIC8+CiAgPHBhdGggZD0ibTIgMiAyMCAyMCIgLz4KICA8cGF0aCBkPSJNMTMgMTNhMyAzIDAgMSAwIDAtNkg5djIiIC8+CiAgPHBhdGggZD0iTTkgMTd2LTIuMyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/square-parking-off\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 SquareParkingOff = createLucideIcon('SquareParkingOff', [\n ['path', { d: 'M3.6 3.6A2 2 0 0 1 5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-.59 1.41', key: '9l1ft6' }],\n ['path', { d: 'M3 8.7V19a2 2 0 0 0 2 2h10.3', key: '17knke' }],\n ['path', { d: 'm2 2 20 20', key: '1ooewy' }],\n ['path', { d: 'M13 13a3 3 0 1 0 0-6H9v2', key: 'uoagbd' }],\n ['path', { d: 'M9 17v-2.3', key: '1jxgo2' }],\n]);\n\nexport default SquareParkingOff;\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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AA,CAAA,CAAA,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,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"calendar-check-2.js","sources":["../../../src/icons/calendar-check-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CalendarCheck2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOCAydjQiIC8+CiAgPHBhdGggZD0iTTE2IDJ2NCIgLz4KICA8cGF0aCBkPSJNMjEgMTRWNmEyIDIgMCAwIDAtMi0ySDVhMiAyIDAgMCAwLTIgMnYxNGEyIDIgMCAwIDAgMiAyaDgiIC8+CiAgPHBhdGggZD0iTTMgMTBoMTgiIC8+CiAgPHBhdGggZD0ibTE2IDIwIDIgMiA0LTQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/calendar-check-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 CalendarCheck2 = createLucideIcon('CalendarCheck2', [\n ['path', { d: 'M8 2v4', key: '1cmpym' }],\n ['path', { d: 'M16 2v4', key: '4m81vk' }],\n ['path', { d: 'M21 14V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8', key: 'bce9hv' }],\n ['path', { d: 'M3 10h18', key: '8toen8' }],\n ['path', { d: 'm16 20 2 2 4-4', key: '13tcca' }],\n]);\n\nexport default CalendarCheck2;\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,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,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,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,CAA6D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC1F,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,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,48 @@
const BROWSER_MAPPING = {
and_chr: 'chrome',
and_ff: 'firefox',
ie_mob: 'ie',
op_mob: 'opera',
and_qq: null,
and_uc: null,
baidu: null,
bb: null,
kaios: null,
op_mini: null,
};
function browserslistToTargets(browserslist) {
let targets = {};
for (let browser of browserslist) {
let [name, v] = browser.split(' ');
if (BROWSER_MAPPING[name] === null) {
continue;
}
let version = parseVersion(v);
if (version == null) {
continue;
}
if (targets[name] == null || version < targets[name]) {
targets[name] = version;
}
}
return targets;
}
function parseVersion(version) {
let [major, minor = 0, patch = 0] = version
.split('-')[0]
.split('.')
.map(v => parseInt(v, 10));
if (isNaN(major) || isNaN(minor) || isNaN(patch)) {
return null;
}
return (major << 16) | (minor << 8) | patch;
}
module.exports = browserslistToTargets;
@@ -0,0 +1,9 @@
/**
* Type-checked examples for {@link AppBridge `AppBridge`}.
*
* These examples are included in the API documentation via `@includeCode` tags.
* Each function's region markers define the code snippet that appears in the docs.
*
* @module
*/
export {};
@@ -0,0 +1,35 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/middleware/request-id/request-id.ts
/**
* Request ID Middleware for Hono.
*
* @param {object} options - Options for Request ID middleware.
* @param {number} [options.limitLength=255] - The maximum length of request id.
* @param {string} [options.headerName=X-Request-Id] - The header name used in request id.
* @param {generator} [options.generator=() => crypto.randomUUID()] - The request id generation function.
*
* @returns {MiddlewareHandler} The middleware handler function.
*
* @example
* ```ts
* type Variables = RequestIdVariables
* const app = new Hono<{Variables: Variables}>()
*
* app.use(requestId())
* app.get('/', (c) => {
* console.log(c.get('requestId')) // Debug
* return c.text('Hello World!')
* })
* ```
*/
const requestId = ({ limitLength = 255, headerName = "X-Request-Id", generator = () => crypto.randomUUID() } = {}) => {
return async function requestId(c, next) {
let reqId = headerName ? c.req.header(headerName) : void 0;
if (!reqId || reqId.length > limitLength || /[^\w\-=]/.test(reqId)) reqId = generator(c);
c.set("requestId", reqId);
if (headerName) c.header(headerName, reqId);
await next();
};
};
//#endregion
exports.requestId = requestId;
@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2014 Jonathan Ong me@jongleberry.com
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,15 @@
import { getMixer } from './complex.mjs';
import { mixNumber } from './number.mjs';
function mix(from, to, p) {
if (typeof from === "number" &&
typeof to === "number" &&
typeof p === "number") {
return mixNumber(from, to, p);
}
const mixer = getMixer(from);
return mixer(from, to);
}
export { mix };
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"decode-data-xml.js","sourceRoot":"","sources":["../../../src/generated/decode-data-xml.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C,MAAM,CAAC,MAAM,aAAa,GAAgB,eAAe,CAAC,IAAI,WAAW;AACrE,kBAAkB;AAClB,eAAe,CAAC,uFAAuF;KAClG,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACnC,CAAC"}
@@ -0,0 +1,70 @@
{
"name": "readdirp",
"description": "Recursive version of fs.readdir with small RAM & CPU footprint.",
"version": "4.1.2",
"homepage": "https://github.com/paulmillr/readdirp",
"repository": {
"type": "git",
"url": "git://github.com/paulmillr/readdirp.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/paulmillr/readdirp/issues"
},
"author": "Thorsten Lorenz <thlorenz@gmx.de> (thlorenz.com)",
"contributors": [
"Thorsten Lorenz <thlorenz@gmx.de> (thlorenz.com)",
"Paul Miller (https://paulmillr.com)"
],
"engines": {
"node": ">= 14.18.0"
},
"files": [
"index.js",
"index.d.ts",
"index.d.ts.map",
"index.js.map",
"esm"
],
"main": "./index.js",
"module": "./esm/index.js",
"types": "./index.d.ts",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./index.js"
}
},
"sideEffects": false,
"keywords": [
"recursive",
"fs",
"stream",
"streams",
"readdir",
"filesystem",
"find",
"filter"
],
"scripts": {
"build": "tsc && tsc -p tsconfig.cjs.json",
"lint": "prettier --check index.ts test/index.test.js",
"format": "prettier --write index.ts test/index.test.js",
"test": "node test/index.test.js",
"test:coverage": "c8 node test/index.test.js"
},
"devDependencies": {
"@paulmillr/jsbt": "0.3.1",
"@types/node": "20.14.8",
"c8": "10.1.3",
"chai": "4.3.4",
"chai-subset": "1.6.0",
"micro-should": "0.5.0",
"prettier": "3.1.1",
"typescript": "5.5.2"
},
"funding": {
"type": "individual",
"url": "https://paulmillr.com/funding/"
}
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_aB","1028":"_AC"},C:{"1":"_HN _p","2":"_zC _SE _L","132":"DC","578":"_PG _WB _fE"},D:{"1":"_zL","2":"_eL"},E:{"1":"_PC","2":"_qB","322":"B"},F:{"1":"_pO","2":"_qO"},G:{"1":"_NC","2":"_XB","322":"mD"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_U","2":"J"},Q:{"1":"JE"},R:{"1":"KE"},S:{"2":"_C"}},B:4,C:"Resource Hints: preload",D:true};
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _OverloadYield;
function _OverloadYield(value, kind) {
this.v = value;
this.k = kind;
}
//# sourceMappingURL=OverloadYield.js.map
@@ -0,0 +1 @@
{"version":3,"file":"alert-circle.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_LC","2":"FD","8":"_gD"},B:{"1":"_J"},C:{"1":"_tC","4":"_g"},D:{"1":"_Q"},E:{"1":"_DB","2":"_e"},F:{"1":"_dD","2":"_fB"},G:{"1":"_M"},H:{"2":"1D"},I:{"1":"_P"},J:{"1":"_B"},K:{"1":"_CB","2":"A"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:1,C:"Web Storage - name/value pairs",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"useStore.js","sources":["../../src/useStore.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector'\nimport type { AnyAtom } from '@tanstack/store'\n\ntype SyncExternalStoreSubscribe = Parameters<\n typeof useSyncExternalStoreWithSelector\n>[0]\n\nfunction defaultCompare<T>(a: T, b: T) {\n return a === b\n}\n\nexport function useStore<TAtom extends AnyAtom | undefined, T>(\n atom: TAtom,\n selector: (\n snapshot: TAtom extends { get: () => infer TSnapshot }\n ? TSnapshot\n : undefined,\n ) => T,\n compare: (a: T, b: T) => boolean = defaultCompare,\n): T {\n const subscribe: SyncExternalStoreSubscribe = useCallback(\n (handleStoreChange) => {\n if (!atom) {\n return () => {}\n }\n const { unsubscribe } = atom.subscribe(handleStoreChange)\n return unsubscribe\n },\n [atom],\n )\n\n const boundGetSnapshot = useCallback(() => atom?.get(), [atom])\n\n const selectedSnapshot = useSyncExternalStoreWithSelector(\n subscribe,\n boundGetSnapshot,\n boundGetSnapshot,\n selector,\n compare,\n )\n\n return selectedSnapshot\n}\n"],"names":[],"mappings":";;AAQA,SAAS,eAAkB,GAAM,GAAM;AACrC,SAAO,MAAM;AACf;AAEO,SAAS,SACd,MACA,UAKA,UAAmC,gBAChC;AACH,QAAM,YAAwC;AAAA,IAC5C,CAAC,sBAAsB;AACrB,UAAI,CAAC,MAAM;AACT,eAAO,MAAM;AAAA,QAAC;AAAA,MAChB;AACA,YAAM,EAAE,YAAA,IAAgB,KAAK,UAAU,iBAAiB;AACxD,aAAO;AAAA,IACT;AAAA,IACA,CAAC,IAAI;AAAA,EAAA;AAGP,QAAM,mBAAmB,YAAY,MAAM,MAAM,OAAO,CAAC,IAAI,CAAC;AAE9D,QAAM,mBAAmB;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAGF,SAAO;AACT;"}
@@ -0,0 +1,30 @@
import { expect, test } from "vitest";
import * as z from "zod/mini";
import { util as zc } from "zod/v4/core";
// checks no longer write metadata into the bag at attach time; the converter folds the checks itself, so the derived values are asserted through it
test("min/max", () => {
const a = z.number().check(z.minimum(5), z.minimum(6), z.minimum(7), z.maximum(10), z.maximum(11), z.maximum(12));
expect(z.toJSONSchema(a)).toMatchObject({ minimum: 7, maximum: 10 });
expect(a._zod.bag).toEqual({});
});
test("multipleOf", () => {
const b = z.number().check(z.multipleOf(5));
expect(z.toJSONSchema(b)).toMatchObject({ multipleOf: 5 });
});
test("int32 format", () => {
const d = z.int32();
expect(z.toJSONSchema(d)).toMatchObject({
type: "integer",
minimum: zc.NUMBER_FORMAT_RANGES.int32[0],
maximum: zc.NUMBER_FORMAT_RANGES.int32[1],
});
});
test("array size", () => {
const e = z.array(z.string()).check(z.length(5));
expect(z.toJSONSchema(e)).toMatchObject({ minItems: 5, maxItems: 5 });
});
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014-2017, Jon Schlinkert.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,3 @@
import * as z4 from "./classic/external.js";
export * from "./classic/index.js";
export { z4 as default };
@@ -0,0 +1,20 @@
/**
* @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 Angry = createLucideIcon("Angry", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "M16 16s-1.5-2-4-2-4 2-4 2", key: "epbg0q" }],
["path", { d: "M7.5 8 10 9", key: "olxxln" }],
["path", { d: "m14 9 2.5-1", key: "1j6cij" }],
["path", { d: "M9 10h.01", key: "qbtxuw" }],
["path", { d: "M15 10h.01", key: "1qmjsl" }]
]);
export { Angry as default };
//# sourceMappingURL=angry.js.map
@@ -0,0 +1,108 @@
// Based on https://github.com/octet-stream/form-data/blob/2d0f0dc371517444ce1f22cdde13f51995d0953a/lib/FormData.ts (MIT)
/// <reference types="node" />
import { File } from 'node:buffer'
import { SpecIterableIterator } from './fetch'
/**
* A `string` or `File` that represents a single value from a set of `FormData` key-value pairs.
*/
declare type FormDataEntryValue = string | File
/**
* Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using fetch().
*/
export declare class FormData {
/**
* Appends a new value onto an existing key inside a FormData object,
* or adds the key if it does not already exist.
*
* The difference between `set()` and `append()` is that if the specified key already exists, `set()` will overwrite all existing values with the new one, whereas `append()` will append the new value onto the end of the existing set of values.
*
* @param name The name of the field whose data is contained in `value`.
* @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string.
* @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename.
*/
append (name: string, value: unknown, fileName?: string): void
/**
* Set a new value for an existing key inside FormData,
* or add the new field if it does not already exist.
*
* @param name The name of the field whose data is contained in `value`.
* @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string.
* @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename.
*
*/
set (name: string, value: unknown, fileName?: string): void
/**
* Returns the first value associated with a given key from within a `FormData` object.
* If you expect multiple values and want all of them, use the `getAll()` method instead.
*
* @param {string} name A name of the value you want to retrieve.
*
* @returns A `FormDataEntryValue` containing the value. If the key doesn't exist, the method returns null.
*/
get (name: string): FormDataEntryValue | null
/**
* Returns all the values associated with a given key from within a `FormData` object.
*
* @param {string} name A name of the value you want to retrieve.
*
* @returns An array of `FormDataEntryValue` whose key matches the value passed in the `name` parameter. If the key doesn't exist, the method returns an empty list.
*/
getAll (name: string): FormDataEntryValue[]
/**
* Returns a boolean stating whether a `FormData` object contains a certain key.
*
* @param name A string representing the name of the key you want to test for.
*
* @return A boolean value.
*/
has (name: string): boolean
/**
* Deletes a key and its value(s) from a `FormData` object.
*
* @param name The name of the key you want to delete.
*/
delete (name: string): void
/**
* Executes given callback function for each field of the FormData instance
*/
forEach: (
callbackfn: (value: FormDataEntryValue, key: string, iterable: FormData) => void,
thisArg?: unknown
) => void
/**
* Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all keys contained in this `FormData` object.
* Each key is a `string`.
*/
keys: () => SpecIterableIterator<string>
/**
* Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all values contained in this object `FormData` object.
* Each value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue).
*/
values: () => SpecIterableIterator<FormDataEntryValue>
/**
* Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through the `FormData` key/value pairs.
* The key of each pair is a string; the value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue).
*/
entries: () => SpecIterableIterator<[string, FormDataEntryValue]>
/**
* An alias for FormData#entries()
*/
[Symbol.iterator]: () => SpecIterableIterator<[string, FormDataEntryValue]>
readonly [Symbol.toStringTag]: string
}
@@ -0,0 +1 @@
{"version":3,"file":"utils.js","sources":["../../../../../shared/src/utils.ts"],"sourcesContent":["import { CamelToPascal } from './utility-types';\n\n/**\n * Converts string to kebab case\n *\n * @param {string} string\n * @returns {string} A kebabized string\n */\nexport const toKebabCase = (string: string) =>\n string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Converts string to camel case\n *\n * @param {string} string\n * @returns {string} A camelized string\n */\nexport const toCamelCase = <T extends string>(string: T) =>\n string.replace(/^([A-Z])|[\\s-_]+(\\w)/g, (match, p1, p2) =>\n p2 ? p2.toUpperCase() : p1.toLowerCase(),\n );\n\n/**\n * Converts string to pascal case\n *\n * @param {string} string\n * @returns {string} A pascalized string\n */\nexport const toPascalCase = <T extends string>(string: T): CamelToPascal<T> => {\n const camelCase = toCamelCase(string);\n\n return (camelCase.charAt(0).toUpperCase() + camelCase.slice(1)) as CamelToPascal<T>;\n};\n\n/**\n * Merges classes into a single string\n *\n * @param {array} classes\n * @returns {string} A string of classes\n */\nexport const mergeClasses = <ClassType = string | undefined | null>(...classes: ClassType[]) =>\n classes\n .filter((className, index, array) => {\n return (\n Boolean(className) &&\n (className as string).trim() !== '' &&\n array.indexOf(className) === index\n );\n })\n .join(' ')\n .trim();\n"],"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AAA,CAAA,CAAA;;"}
@@ -0,0 +1,626 @@
flf2a$ 6 6 12 63 13 0 24511 0
Author :myflix
Date : 2003/11/6 19:07:12
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
Changed 2012-05-21: Update to "!" character by patorjk
#
o O O #
o #
TS__[O] #
{======| #
./o--000' ##
_ #
| | #
|_| #
_(_)_ #
_| """ | #
"`-0-0-' ##
_ _ #
( | ) #
V V #
_____ #
_| | #
"`-0-0-' ##
_| | |_ #
|_ . _| #
|_ _| #
|_|_| #
_|"""""| #
"`-0-0-' ##
||_ #
(_-< #
/ _/ #
_||__ #
_|"""""| #
"`-0-0-' ##
_ __ #
(_)/ / #
/ /_ #
/_/(_) #
_|"""""| #
"`-0-0-' ##
_ #
/ _|___ #
> _|_ _| #
\_____| #
_|"""""| #
"`-0-0-' ##
(") #
\| #
#
_____ #
_| | #
"`-0-0-' ##
/ / #
| | #
| | #
_\_\_ #
_|"""""| #
"`-0-0-' ##
\"\ #
| | #
| | #
/_/__ #
_|"""""| #
"`-0-0-' ##
_/\_ #
> < #
\/ #
_____ #
_| | #
"`-0-0-' ##
_|"|_ #
|_ _| #
|_| #
_____ #
_| | #
"`-0-0-' ##
#
_ #
( ) #
_|/__ #
_|"""""| #
"`-0-0-' ##
#
___ #
|___| #
_____ #
_| | #
"`-0-0-' ##
#
#
_ #
_(_)_ #
_|"""""| #
"`-0-0-' ##
__ #
/"/ #
/ / #
_/_/_ #
_|"""""| #
"`-0-0-' ##
__ #
/ \ #
| () | #
_\__/ #
_|"""""| #
"`-0-0-' ##
_ #
/ | #
| | #
_|_|_ #
_|"""""| #
"`-0-0-' ##
___ #
|_ ) #
/ / #
/___| #
_|"""""| #
"`-0-0-' ##
____ #
|__ / #
|_ \ #
|___/ #
_|"""""| #
"`-0-0-' ##
_ _ #
| | | #
|_ _| #
_|_|_ #
_|"""""| #
"`-0-0-' ##
___ #
| __| #
|__ \ #
|___/ #
_|"""""| #
"`-0-0-' ##
__ #
/ / #
/ _ \ #
\___/ #
_|"""""| #
"`-0-0-' ##
____ #
|__ | #
/ / #
_/_/_ #
_|"""""| #
"`-0-0-' ##
___ #
( _ ) #
/ _ \ #
\___/ #
_|"""""| #
"`-0-0-' ##
___ #
/ _ \ #
\_, / #
_/_/_ #
_|"""""| #
"`-0-0-' ##
_ #
(_) #
_ #
_(_)_ #
_|"""""| #
"`-0-0-' ##
(_) #
_ #
( ) #
_|/__ #
_|"""""| #
"`-0-0-' ##
__ #
/ / #
< < #
_\_\_ #
_|"""""| #
"`-0-0-' ##
___ #
|___| #
|___| #
_____ #
_| | #
"`-0-0-' ##
__ #
\ \ #
> > #
_/_/_ #
_|"""""| #
"`-0-0-' ##
___ #
|__ \ #
/_/ #
_(_)_ #
_|"""""| #
"`-0-0-' ##
/ __ \ #
/ / _` | #
\ \__,_| #
\____/ #
_|"""""| #
"`-0-0-' ##
___ #
/ \ #
| - | #
|_|_| #
_|"""""| #
"`-0-0-' ##
___ #
| _ ) #
| _ \ #
|___/ #
_|"""""| #
"`-0-0-' ##
___ #
/ __| #
| (__ #
\___| #
_|"""""| #
"`-0-0-' ##
___ #
| \ #
| |) | #
|___/ #
_|"""""| #
"`-0-0-' ##
___ #
| __| #
| _| #
|___| #
_|"""""| #
"`-0-0-' ##
___ #
| __| #
| _| #
_|_|_ #
_| """ | #
"`-0-0-' ##
___ #
/ __| #
| (_ | #
\___| #
_|"""""| #
"`-0-0-' ##
_ _ #
| || | #
| __ | #
|_||_| #
_|"""""| #
"`-0-0-' ##
___ #
|_ _| #
| | #
|___| #
_|"""""| #
"`-0-0-' ##
_ #
_ | | #
| || | #
_\__/ #
_|"""""| #
"`-0-0-' ##
_ __ #
| |/ / #
| ' < #
|_|\_\ #
_|"""""| #
"`-0-0-' ##
_ #
| | #
| |__ #
|____| #
_|"""""| #
"`-0-0-' ##
__ __ #
| \/ | #
| |\/| | #
|_|__|_| #
_|"""""| #
"`-0-0-' ##
_ _ #
| \| | #
| .` | #
|_|\_| #
_|"""""| #
"`-0-0-' ##
___ #
/ _ \ #
| (_) | #
\___/ #
_|"""""| #
"`-0-0-' ##
___ #
| _ \ #
| _/ #
_|_|_ #
_| """ | #
"`-0-0-' ##
___ #
/ _ \ #
| (_) | #
\__\_\ #
_|"""""| #
"`-0-0-' ##
___ #
| _ \ #
| / #
|_|_\ #
_|"""""| #
"`-0-0-' ##
___ #
/ __| #
\__ \ #
|___/ #
_|"""""| #
"`-0-0-' ##
_____ #
|_ _| #
| | #
_|_|_ #
_|"""""| #
"`-0-0-' ##
_ _ #
| | | | #
| |_| | #
\___/ #
_|"""""| #
"`-0-0-' ##
__ __ #
\ \ / / #
\ V / #
_\_/_ #
_| """"| #
"`-0-0-' ##
__ __#
\ \ / /#
\ \/\/ / #
\_/\_/ #
_|"""""| #
"`-0-0-' ##
__ __ #
\ \/ / #
> < #
/_/\_\ #
_|"""""| #
"`-0-0-' ##
__ __ #
\ \ / / #
\ V / #
_|_|_ #
_| """ | #
"`-0-0-' ##
____ #
|_ / #
/ / #
/___| #
_|"""""| #
"`-0-0-' ##
|""| #
| | #
| | #
|__|_ #
_|"""""| #
"`-0-0-' ##
__ #
\ \ #
\ \ #
_\_\_ #
_|"""""| #
"`-0-0-' ##
|""| #
| | #
| | #
|__|_ #
_|"""""| #
"`-0-0-' ##
/\ #
|/\| #
#
_____ #
_| | #
"`-0-0-' ##
#
#
___ #
|___| #
_|"""""| #
"`-0-0-' ##
(") #
\| #
#
_____ #
_| | #
"`-0-0-' ##
#
__ _ #
/ _` | #
\__,_| #
_|"""""| #
"`-0-0-' ##
_ #
| |__ #
| '_ \ #
|_.__/ #
_|"""""| #
"`-0-0-' ##
#
__ #
/ _| #
\__|_ #
_|"""""| #
"`-0-0-' ##
_ #
__| | #
/ _` | #
\__,_| #
_|"""""| #
"`-0-0-' ##
#
___ #
/ -_) #
\___| #
_|"""""| #
"`-0-0-' ##
__ #
/ _| #
| _| #
_|_|_ #
_|"""""| #
"`-0-0-' ##
__ _ #
/ _` | #
\__, | #
|___/ #
_|"""""| #
"`-0-0-' ##
_ #
| |_ #
| ' \ #
|_||_| #
_|"""""| #
"`-0-0-' ##
_ #
(_) #
| | #
_|_|_ #
_|"""""| #
"`-0-0-' ##
(_) #
| | #
_/ | #
|__/_ #
_|"""""| #
"`-0-0-' ##
_ #
| |__ #
| / / #
|_\_\ #
_|"""""| #
"`-0-0-' ##
_ #
| | #
| | #
_|_|_ #
_|"""""| #
"`-0-0-' ##
#
_ __ #
| ' \ #
|_|_|_| #
_|"""""| #
"`-0-0-' ##
#
_ _ #
| ' \ #
|_||_| #
_|"""""| #
"`-0-0-' ##
#
___ #
/ _ \ #
\___/ #
_|"""""| #
"`-0-0-' ##
_ __ #
| '_ \ #
| .__/ #
|_|__ #
_|"""""| #
"`-0-0-' ##
__ _ #
/ _` | #
\__, | #
__|_| #
_|"""""| #
"`-0-0-' ##
#
_ _ #
| '_| #
_|_|_ #
_|"""""| #
"`-0-0-' ##
#
___ #
(_-< #
/__/_ #
_|"""""| #
"`-0-0-' ##
_ #
| |_ #
| _| #
_\__| #
_|"""""| #
"`-0-0-' ##
#
_ _ #
| +| | #
\_,_| #
_|"""""| #
"`-0-0-' ##
#
__ __ #
\ V / #
_\_/_ #
_|"""""| #
"`-0-0-' ##
#
__ __ __ #
\ V V / #
\_/\_/ #
_|"""""| #
"`-0-0-' ##
#
__ __ #
\ \ / #
/_\_\ #
_|"""""| #
"`-0-0-' ##
_ _ #
| || | #
\_, | #
_|__/ #
_| """"| #
"`-0-0-' ##
#
___ #
|_ / #
_/__| #
_|"""""| #
"`-0-0-' ##
/"/ #
_| | #
| | #
_\_\_ #
_|"""""| #
"`-0-0-' ##
|"| #
| | #
| | #
_|_|_ #
_|"""""| #
"`-0-0-' ##
\"\ #
| |_ #
| | #
/_/__ #
_|"""""| #
"`-0-0-' ##
/\/| #
|/\/ #
#
_____ #
_| | #
"`-0-0-' ##
#
#
#
#
#
_ _ ##
Ö#
#
#
#
#
##
Ü#
#
#
#
#
##
ä#
#
#
#
#
##
ö#
#
#
#
#
##
ü#
#
#
#
#
##
ß#
#
#
#
#
##