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,15 @@
/**
* @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 Thermometer = createLucideIcon("Thermometer", [
["path", { d: "M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z", key: "17jzev" }]
]);
export { Thermometer as default };
//# sourceMappingURL=thermometer.js.map
@@ -0,0 +1,194 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.visitorKeys = void 0;
const eslintVisitorKeys = __importStar(require("eslint-visitor-keys"));
/*
********************************** IMPORTANT NOTE ********************************
* *
* The key arrays should be sorted in the order in which you would want to visit *
* the child keys. *
* *
* DO NOT SORT THEM ALPHABETICALLY! *
* *
* They should be sorted in the order that they appear in the source code. *
* For example: *
* *
* class Foo extends Bar { prop: 1 } *
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ClassDeclaration *
* ^^^ id ^^^ superClass *
* ^^^^^^^^^^^ body *
* *
* It would be incorrect to provide the visitor keys ['body', 'id', 'superClass'] *
* because the body comes AFTER everything else in the source code. *
* Instead the correct ordering would be ['id', 'superClass', 'body']. *
* *
**********************************************************************************
*/
const SharedVisitorKeys = (() => {
const FunctionType = ['typeParameters', 'params', 'returnType'];
const AnonymousFunction = [...FunctionType, 'body'];
const AbstractPropertyDefinition = [
'decorators',
'key',
'typeAnnotation',
];
return {
AbstractPropertyDefinition: ['decorators', 'key', 'typeAnnotation'],
AnonymousFunction,
AsExpression: ['expression', 'typeAnnotation'],
ClassDeclaration: [
'decorators',
'id',
'typeParameters',
'superClass',
'superTypeArguments',
'implements',
'body',
],
Function: ['id', ...AnonymousFunction],
FunctionType,
PropertyDefinition: [...AbstractPropertyDefinition, 'value'],
};
})();
const additionalKeys = {
AccessorProperty: SharedVisitorKeys.PropertyDefinition,
ArrayPattern: ['decorators', 'elements', 'typeAnnotation'],
ArrowFunctionExpression: SharedVisitorKeys.AnonymousFunction,
AssignmentPattern: ['decorators', 'left', 'right', 'typeAnnotation'],
CallExpression: ['callee', 'typeArguments', 'arguments'],
ClassDeclaration: SharedVisitorKeys.ClassDeclaration,
ClassExpression: SharedVisitorKeys.ClassDeclaration,
Decorator: ['expression'],
ExportAllDeclaration: ['exported', 'source', 'attributes'],
ExportNamedDeclaration: ['declaration', 'specifiers', 'source', 'attributes'],
FunctionDeclaration: SharedVisitorKeys.Function,
FunctionExpression: SharedVisitorKeys.Function,
Identifier: ['decorators', 'typeAnnotation'],
ImportAttribute: ['key', 'value'],
ImportDeclaration: ['specifiers', 'source', 'attributes'],
ImportExpression: ['source', 'options'],
JSXClosingFragment: [],
JSXOpeningElement: ['name', 'typeArguments', 'attributes'],
JSXOpeningFragment: [],
JSXSpreadChild: ['expression'],
MethodDefinition: ['decorators', 'key', 'value'],
NewExpression: ['callee', 'typeArguments', 'arguments'],
ObjectPattern: ['decorators', 'properties', 'typeAnnotation'],
PropertyDefinition: SharedVisitorKeys.PropertyDefinition,
RestElement: ['decorators', 'argument', 'typeAnnotation'],
StaticBlock: ['body'],
TaggedTemplateExpression: ['tag', 'typeArguments', 'quasi'],
TSAbstractAccessorProperty: SharedVisitorKeys.AbstractPropertyDefinition,
TSAbstractKeyword: [],
TSAbstractMethodDefinition: ['key', 'value'],
TSAbstractPropertyDefinition: SharedVisitorKeys.AbstractPropertyDefinition,
TSAnyKeyword: [],
TSArrayType: ['elementType'],
TSAsExpression: SharedVisitorKeys.AsExpression,
TSAsyncKeyword: [],
TSBigIntKeyword: [],
TSBooleanKeyword: [],
TSCallSignatureDeclaration: SharedVisitorKeys.FunctionType,
TSClassImplements: ['expression', 'typeArguments'],
TSConditionalType: ['checkType', 'extendsType', 'trueType', 'falseType'],
TSConstructorType: SharedVisitorKeys.FunctionType,
TSConstructSignatureDeclaration: SharedVisitorKeys.FunctionType,
TSDeclareFunction: SharedVisitorKeys.Function,
TSDeclareKeyword: [],
TSEmptyBodyFunctionExpression: ['id', ...SharedVisitorKeys.FunctionType],
TSEnumBody: ['members'],
TSEnumDeclaration: ['id', 'body'],
TSEnumMember: ['id', 'initializer'],
TSExportAssignment: ['expression'],
TSExportKeyword: [],
TSExternalModuleReference: ['expression'],
TSFunctionType: SharedVisitorKeys.FunctionType,
TSImportEqualsDeclaration: ['id', 'moduleReference'],
TSImportType: ['source', 'options', 'qualifier', 'typeArguments'],
TSIndexedAccessType: ['objectType', 'indexType'],
TSIndexSignature: ['parameters', 'typeAnnotation'],
TSInferType: ['typeParameter'],
TSInstantiationExpression: ['expression', 'typeArguments'],
TSInterfaceBody: ['body'],
TSInterfaceDeclaration: ['id', 'typeParameters', 'extends', 'body'],
TSInterfaceHeritage: ['expression', 'typeArguments'],
TSIntersectionType: ['types'],
TSIntrinsicKeyword: [],
TSLiteralType: ['literal'],
TSMappedType: ['key', 'constraint', 'nameType', 'typeAnnotation'],
TSMethodSignature: ['key', 'typeParameters', 'params', 'returnType'],
TSModuleBlock: ['body'],
TSModuleDeclaration: ['id', 'body'],
TSNamedTupleMember: ['label', 'elementType'],
TSNamespaceExportDeclaration: ['id'],
TSNeverKeyword: [],
TSNonNullExpression: ['expression'],
TSNullKeyword: [],
TSNumberKeyword: [],
TSObjectKeyword: [],
TSOptionalType: ['typeAnnotation'],
TSParameterProperty: ['decorators', 'parameter'],
TSPrivateKeyword: [],
TSPropertySignature: ['key', 'typeAnnotation'],
TSProtectedKeyword: [],
TSPublicKeyword: [],
TSQualifiedName: ['left', 'right'],
TSReadonlyKeyword: [],
TSRestType: ['typeAnnotation'],
TSSatisfiesExpression: SharedVisitorKeys.AsExpression,
TSStaticKeyword: [],
TSStringKeyword: [],
TSSymbolKeyword: [],
TSTemplateLiteralType: ['quasis', 'types'],
TSThisType: [],
TSTupleType: ['elementTypes'],
TSTypeAliasDeclaration: ['id', 'typeParameters', 'typeAnnotation'],
TSTypeAnnotation: ['typeAnnotation'],
TSTypeAssertion: ['typeAnnotation', 'expression'],
TSTypeLiteral: ['members'],
TSTypeOperator: ['typeAnnotation'],
TSTypeParameter: ['name', 'constraint', 'default'],
TSTypeParameterDeclaration: ['params'],
TSTypeParameterInstantiation: ['params'],
TSTypePredicate: ['parameterName', 'typeAnnotation'],
TSTypeQuery: ['exprName', 'typeArguments'],
TSTypeReference: ['typeName', 'typeArguments'],
TSUndefinedKeyword: [],
TSUnionType: ['types'],
TSUnknownKeyword: [],
TSVoidKeyword: [],
};
exports.visitorKeys = eslintVisitorKeys.unionWith(additionalKeys);
@@ -0,0 +1,22 @@
import * as React from 'react';
import { stylesheetSingleton } from './singleton';
/**
* creates a hook to control style singleton
* @see {@link styleSingleton} for a safer component version
* @example
* ```tsx
* const useStyle = styleHookSingleton();
* ///
* useStyle('body { overflow: hidden}');
*/
export var styleHookSingleton = function () {
var sheet = stylesheetSingleton();
return function (styles, isDynamic) {
React.useEffect(function () {
sheet.add(styles);
return function () {
sheet.remove();
};
}, [styles && isDynamic]);
};
};
@@ -0,0 +1,582 @@
import type {
AddedKeywordDefinition,
AnySchema,
AnySchemaObject,
KeywordErrorCxt,
KeywordCxtParams,
} from "../../types"
import type {SchemaCxt, SchemaObjCxt} from ".."
import type {InstanceOptions} from "../../core"
import {boolOrEmptySchema, topBoolOrEmptySchema} from "./boolSchema"
import {coerceAndCheckDataType, getSchemaTypes} from "./dataType"
import {shouldUseGroup, shouldUseRule} from "./applicability"
import {checkDataType, checkDataTypes, reportTypeError, DataType} from "./dataType"
import {assignDefaults} from "./defaults"
import {funcKeywordCode, macroKeywordCode, validateKeywordUsage, validSchemaType} from "./keyword"
import {getSubschema, extendSubschemaData, SubschemaArgs, extendSubschemaMode} from "./subschema"
import {_, nil, str, or, not, getProperty, Block, Code, Name, CodeGen} from "../codegen"
import N from "../names"
import {resolveUrl} from "../resolve"
import {
schemaRefOrVal,
schemaHasRulesButRef,
checkUnknownRules,
checkStrictMode,
unescapeJsonPointer,
mergeEvaluated,
} from "../util"
import type {JSONType, Rule, RuleGroup} from "../rules"
import {
ErrorPaths,
reportError,
reportExtraError,
resetErrorsCount,
keyword$DataError,
} from "../errors"
// schema compilation - generates validation function, subschemaCode (below) is used for subschemas
export function validateFunctionCode(it: SchemaCxt): void {
if (isSchemaObj(it)) {
checkKeywords(it)
if (schemaCxtHasRules(it)) {
topSchemaObjCode(it)
return
}
}
validateFunction(it, () => topBoolOrEmptySchema(it))
}
function validateFunction(
{gen, validateName, schema, schemaEnv, opts}: SchemaCxt,
body: Block
): void {
if (opts.code.es5) {
gen.func(validateName, _`${N.data}, ${N.valCxt}`, schemaEnv.$async, () => {
gen.code(_`"use strict"; ${funcSourceUrl(schema, opts)}`)
destructureValCxtES5(gen, opts)
gen.code(body)
})
} else {
gen.func(validateName, _`${N.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () =>
gen.code(funcSourceUrl(schema, opts)).code(body)
)
}
}
function destructureValCxt(opts: InstanceOptions): Code {
return _`{${N.instancePath}="", ${N.parentData}, ${N.parentDataProperty}, ${N.rootData}=${
N.data
}${opts.dynamicRef ? _`, ${N.dynamicAnchors}={}` : nil}}={}`
}
function destructureValCxtES5(gen: CodeGen, opts: InstanceOptions): void {
gen.if(
N.valCxt,
() => {
gen.var(N.instancePath, _`${N.valCxt}.${N.instancePath}`)
gen.var(N.parentData, _`${N.valCxt}.${N.parentData}`)
gen.var(N.parentDataProperty, _`${N.valCxt}.${N.parentDataProperty}`)
gen.var(N.rootData, _`${N.valCxt}.${N.rootData}`)
if (opts.dynamicRef) gen.var(N.dynamicAnchors, _`${N.valCxt}.${N.dynamicAnchors}`)
},
() => {
gen.var(N.instancePath, _`""`)
gen.var(N.parentData, _`undefined`)
gen.var(N.parentDataProperty, _`undefined`)
gen.var(N.rootData, N.data)
if (opts.dynamicRef) gen.var(N.dynamicAnchors, _`{}`)
}
)
}
function topSchemaObjCode(it: SchemaObjCxt): void {
const {schema, opts, gen} = it
validateFunction(it, () => {
if (opts.$comment && schema.$comment) commentKeyword(it)
checkNoDefault(it)
gen.let(N.vErrors, null)
gen.let(N.errors, 0)
if (opts.unevaluated) resetEvaluated(it)
typeAndKeywords(it)
returnResults(it)
})
return
}
function resetEvaluated(it: SchemaObjCxt): void {
// TODO maybe some hook to execute it in the end to check whether props/items are Name, as in assignEvaluated
const {gen, validateName} = it
it.evaluated = gen.const("evaluated", _`${validateName}.evaluated`)
gen.if(_`${it.evaluated}.dynamicProps`, () => gen.assign(_`${it.evaluated}.props`, _`undefined`))
gen.if(_`${it.evaluated}.dynamicItems`, () => gen.assign(_`${it.evaluated}.items`, _`undefined`))
}
function funcSourceUrl(schema: AnySchema, opts: InstanceOptions): Code {
const schId = typeof schema == "object" && schema[opts.schemaId]
return schId && (opts.code.source || opts.code.process) ? _`/*# sourceURL=${schId} */` : nil
}
// schema compilation - this function is used recursively to generate code for sub-schemas
function subschemaCode(it: SchemaCxt, valid: Name): void {
if (isSchemaObj(it)) {
checkKeywords(it)
if (schemaCxtHasRules(it)) {
subSchemaObjCode(it, valid)
return
}
}
boolOrEmptySchema(it, valid)
}
function schemaCxtHasRules({schema, self}: SchemaCxt): boolean {
if (typeof schema == "boolean") return !schema
for (const key in schema) if (self.RULES.all[key]) return true
return false
}
function isSchemaObj(it: SchemaCxt): it is SchemaObjCxt {
return typeof it.schema != "boolean"
}
function subSchemaObjCode(it: SchemaObjCxt, valid: Name): void {
const {schema, gen, opts} = it
if (opts.$comment && schema.$comment) commentKeyword(it)
updateContext(it)
checkAsyncSchema(it)
const errsCount = gen.const("_errs", N.errors)
typeAndKeywords(it, errsCount)
// TODO var
gen.var(valid, _`${errsCount} === ${N.errors}`)
}
function checkKeywords(it: SchemaObjCxt): void {
checkUnknownRules(it)
checkRefsAndKeywords(it)
}
function typeAndKeywords(it: SchemaObjCxt, errsCount?: Name): void {
if (it.opts.jtd) return schemaKeywords(it, [], false, errsCount)
const types = getSchemaTypes(it.schema)
const checkedTypes = coerceAndCheckDataType(it, types)
schemaKeywords(it, types, !checkedTypes, errsCount)
}
function checkRefsAndKeywords(it: SchemaObjCxt): void {
const {schema, errSchemaPath, opts, self} = it
if (schema.$ref && opts.ignoreKeywordsWithRef && schemaHasRulesButRef(schema, self.RULES)) {
self.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`)
}
}
function checkNoDefault(it: SchemaObjCxt): void {
const {schema, opts} = it
if (schema.default !== undefined && opts.useDefaults && opts.strictSchema) {
checkStrictMode(it, "default is ignored in the schema root")
}
}
function updateContext(it: SchemaObjCxt): void {
const schId = it.schema[it.opts.schemaId]
if (schId) it.baseId = resolveUrl(it.opts.uriResolver, it.baseId, schId)
}
function checkAsyncSchema(it: SchemaObjCxt): void {
if (it.schema.$async && !it.schemaEnv.$async) throw new Error("async schema in sync schema")
}
function commentKeyword({gen, schemaEnv, schema, errSchemaPath, opts}: SchemaObjCxt): void {
const msg = schema.$comment
if (opts.$comment === true) {
gen.code(_`${N.self}.logger.log(${msg})`)
} else if (typeof opts.$comment == "function") {
const schemaPath = str`${errSchemaPath}/$comment`
const rootName = gen.scopeValue("root", {ref: schemaEnv.root})
gen.code(_`${N.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`)
}
}
function returnResults(it: SchemaCxt): void {
const {gen, schemaEnv, validateName, ValidationError, opts} = it
if (schemaEnv.$async) {
// TODO assign unevaluated
gen.if(
_`${N.errors} === 0`,
() => gen.return(N.data),
() => gen.throw(_`new ${ValidationError as Name}(${N.vErrors})`)
)
} else {
gen.assign(_`${validateName}.errors`, N.vErrors)
if (opts.unevaluated) assignEvaluated(it)
gen.return(_`${N.errors} === 0`)
}
}
function assignEvaluated({gen, evaluated, props, items}: SchemaCxt): void {
if (props instanceof Name) gen.assign(_`${evaluated}.props`, props)
if (items instanceof Name) gen.assign(_`${evaluated}.items`, items)
}
function schemaKeywords(
it: SchemaObjCxt,
types: JSONType[],
typeErrors: boolean,
errsCount?: Name
): void {
const {gen, schema, data, allErrors, opts, self} = it
const {RULES} = self
if (schema.$ref && (opts.ignoreKeywordsWithRef || !schemaHasRulesButRef(schema, RULES))) {
gen.block(() => keywordCode(it, "$ref", (RULES.all.$ref as Rule).definition)) // TODO typecast
return
}
if (!opts.jtd) checkStrictTypes(it, types)
gen.block(() => {
for (const group of RULES.rules) groupKeywords(group)
groupKeywords(RULES.post)
})
function groupKeywords(group: RuleGroup): void {
if (!shouldUseGroup(schema, group)) return
if (group.type) {
gen.if(checkDataType(group.type, data, opts.strictNumbers))
iterateKeywords(it, group)
if (types.length === 1 && types[0] === group.type && typeErrors) {
gen.else()
reportTypeError(it)
}
gen.endIf()
} else {
iterateKeywords(it, group)
}
// TODO make it "ok" call?
if (!allErrors) gen.if(_`${N.errors} === ${errsCount || 0}`)
}
}
function iterateKeywords(it: SchemaObjCxt, group: RuleGroup): void {
const {
gen,
schema,
opts: {useDefaults},
} = it
if (useDefaults) assignDefaults(it, group.type)
gen.block(() => {
for (const rule of group.rules) {
if (shouldUseRule(schema, rule)) {
keywordCode(it, rule.keyword, rule.definition, group.type)
}
}
})
}
function checkStrictTypes(it: SchemaObjCxt, types: JSONType[]): void {
if (it.schemaEnv.meta || !it.opts.strictTypes) return
checkContextTypes(it, types)
if (!it.opts.allowUnionTypes) checkMultipleTypes(it, types)
checkKeywordTypes(it, it.dataTypes)
}
function checkContextTypes(it: SchemaObjCxt, types: JSONType[]): void {
if (!types.length) return
if (!it.dataTypes.length) {
it.dataTypes = types
return
}
types.forEach((t) => {
if (!includesType(it.dataTypes, t)) {
strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`)
}
})
narrowSchemaTypes(it, types)
}
function checkMultipleTypes(it: SchemaObjCxt, ts: JSONType[]): void {
if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) {
strictTypesError(it, "use allowUnionTypes to allow union type keyword")
}
}
function checkKeywordTypes(it: SchemaObjCxt, ts: JSONType[]): void {
const rules = it.self.RULES.all
for (const keyword in rules) {
const rule = rules[keyword]
if (typeof rule == "object" && shouldUseRule(it.schema, rule)) {
const {type} = rule.definition
if (type.length && !type.some((t) => hasApplicableType(ts, t))) {
strictTypesError(it, `missing type "${type.join(",")}" for keyword "${keyword}"`)
}
}
}
}
function hasApplicableType(schTs: JSONType[], kwdT: JSONType): boolean {
return schTs.includes(kwdT) || (kwdT === "number" && schTs.includes("integer"))
}
function includesType(ts: JSONType[], t: JSONType): boolean {
return ts.includes(t) || (t === "integer" && ts.includes("number"))
}
function narrowSchemaTypes(it: SchemaObjCxt, withTypes: JSONType[]): void {
const ts: JSONType[] = []
for (const t of it.dataTypes) {
if (includesType(withTypes, t)) ts.push(t)
else if (withTypes.includes("integer") && t === "number") ts.push("integer")
}
it.dataTypes = ts
}
function strictTypesError(it: SchemaObjCxt, msg: string): void {
const schemaPath = it.schemaEnv.baseId + it.errSchemaPath
msg += ` at "${schemaPath}" (strictTypes)`
checkStrictMode(it, msg, it.opts.strictTypes)
}
export class KeywordCxt implements KeywordErrorCxt {
readonly gen: CodeGen
readonly allErrors?: boolean
readonly keyword: string
readonly data: Name // Name referencing the current level of the data instance
readonly $data?: string | false
schema: any // keyword value in the schema
readonly schemaValue: Code | number | boolean // Code reference to keyword schema value or primitive value
readonly schemaCode: Code | number | boolean // Code reference to resolved schema value (different if schema is $data)
readonly schemaType: JSONType[] // allowed type(s) of keyword value in the schema
readonly parentSchema: AnySchemaObject
readonly errsCount?: Name // Name reference to the number of validation errors collected before this keyword,
// requires option trackErrors in keyword definition
params: KeywordCxtParams // object to pass parameters to error messages from keyword code
readonly it: SchemaObjCxt // schema compilation context (schema is guaranteed to be an object, not boolean)
readonly def: AddedKeywordDefinition
constructor(it: SchemaObjCxt, def: AddedKeywordDefinition, keyword: string) {
validateKeywordUsage(it, def, keyword)
this.gen = it.gen
this.allErrors = it.allErrors
this.keyword = keyword
this.data = it.data
this.schema = it.schema[keyword]
this.$data = def.$data && it.opts.$data && this.schema && this.schema.$data
this.schemaValue = schemaRefOrVal(it, this.schema, keyword, this.$data)
this.schemaType = def.schemaType
this.parentSchema = it.schema
this.params = {}
this.it = it
this.def = def
if (this.$data) {
this.schemaCode = it.gen.const("vSchema", getData(this.$data, it))
} else {
this.schemaCode = this.schemaValue
if (!validSchemaType(this.schema, def.schemaType, def.allowUndefined)) {
throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`)
}
}
if ("code" in def ? def.trackErrors : def.errors !== false) {
this.errsCount = it.gen.const("_errs", N.errors)
}
}
result(condition: Code, successAction?: () => void, failAction?: () => void): void {
this.failResult(not(condition), successAction, failAction)
}
failResult(condition: Code, successAction?: () => void, failAction?: () => void): void {
this.gen.if(condition)
if (failAction) failAction()
else this.error()
if (successAction) {
this.gen.else()
successAction()
if (this.allErrors) this.gen.endIf()
} else {
if (this.allErrors) this.gen.endIf()
else this.gen.else()
}
}
pass(condition: Code, failAction?: () => void): void {
this.failResult(not(condition), undefined, failAction)
}
fail(condition?: Code): void {
if (condition === undefined) {
this.error()
if (!this.allErrors) this.gen.if(false) // this branch will be removed by gen.optimize
return
}
this.gen.if(condition)
this.error()
if (this.allErrors) this.gen.endIf()
else this.gen.else()
}
fail$data(condition: Code): void {
if (!this.$data) return this.fail(condition)
const {schemaCode} = this
this.fail(_`${schemaCode} !== undefined && (${or(this.invalid$data(), condition)})`)
}
error(append?: boolean, errorParams?: KeywordCxtParams, errorPaths?: ErrorPaths): void {
if (errorParams) {
this.setParams(errorParams)
this._error(append, errorPaths)
this.setParams({})
return
}
this._error(append, errorPaths)
}
private _error(append?: boolean, errorPaths?: ErrorPaths): void {
;(append ? reportExtraError : reportError)(this, this.def.error, errorPaths)
}
$dataError(): void {
reportError(this, this.def.$dataError || keyword$DataError)
}
reset(): void {
if (this.errsCount === undefined) throw new Error('add "trackErrors" to keyword definition')
resetErrorsCount(this.gen, this.errsCount)
}
ok(cond: Code | boolean): void {
if (!this.allErrors) this.gen.if(cond)
}
setParams(obj: KeywordCxtParams, assign?: true): void {
if (assign) Object.assign(this.params, obj)
else this.params = obj
}
block$data(valid: Name, codeBlock: () => void, $dataValid: Code = nil): void {
this.gen.block(() => {
this.check$data(valid, $dataValid)
codeBlock()
})
}
check$data(valid: Name = nil, $dataValid: Code = nil): void {
if (!this.$data) return
const {gen, schemaCode, schemaType, def} = this
gen.if(or(_`${schemaCode} === undefined`, $dataValid))
if (valid !== nil) gen.assign(valid, true)
if (schemaType.length || def.validateSchema) {
gen.elseIf(this.invalid$data())
this.$dataError()
if (valid !== nil) gen.assign(valid, false)
}
gen.else()
}
invalid$data(): Code {
const {gen, schemaCode, schemaType, def, it} = this
return or(wrong$DataType(), invalid$DataSchema())
function wrong$DataType(): Code {
if (schemaType.length) {
/* istanbul ignore if */
if (!(schemaCode instanceof Name)) throw new Error("ajv implementation error")
const st = Array.isArray(schemaType) ? schemaType : [schemaType]
return _`${checkDataTypes(st, schemaCode, it.opts.strictNumbers, DataType.Wrong)}`
}
return nil
}
function invalid$DataSchema(): Code {
if (def.validateSchema) {
const validateSchemaRef = gen.scopeValue("validate$data", {ref: def.validateSchema}) // TODO value.code for standalone
return _`!${validateSchemaRef}(${schemaCode})`
}
return nil
}
}
subschema(appl: SubschemaArgs, valid: Name): SchemaCxt {
const subschema = getSubschema(this.it, appl)
extendSubschemaData(subschema, this.it, appl)
extendSubschemaMode(subschema, appl)
const nextContext = {...this.it, ...subschema, items: undefined, props: undefined}
subschemaCode(nextContext, valid)
return nextContext
}
mergeEvaluated(schemaCxt: SchemaCxt, toName?: typeof Name): void {
const {it, gen} = this
if (!it.opts.unevaluated) return
if (it.props !== true && schemaCxt.props !== undefined) {
it.props = mergeEvaluated.props(gen, schemaCxt.props, it.props, toName)
}
if (it.items !== true && schemaCxt.items !== undefined) {
it.items = mergeEvaluated.items(gen, schemaCxt.items, it.items, toName)
}
}
mergeValidEvaluated(schemaCxt: SchemaCxt, valid: Name): boolean | void {
const {it, gen} = this
if (it.opts.unevaluated && (it.props !== true || it.items !== true)) {
gen.if(valid, () => this.mergeEvaluated(schemaCxt, Name))
return true
}
}
}
function keywordCode(
it: SchemaObjCxt,
keyword: string,
def: AddedKeywordDefinition,
ruleType?: JSONType
): void {
const cxt = new KeywordCxt(it, def, keyword)
if ("code" in def) {
def.code(cxt, ruleType)
} else if (cxt.$data && def.validate) {
funcKeywordCode(cxt, def)
} else if ("macro" in def) {
macroKeywordCode(cxt, def)
} else if (def.compile || def.validate) {
funcKeywordCode(cxt, def)
}
}
const JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/
const RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/
export function getData(
$data: string,
{dataLevel, dataNames, dataPathArr}: SchemaCxt
): Code | number {
let jsonPointer
let data: Code
if ($data === "") return N.rootData
if ($data[0] === "/") {
if (!JSON_POINTER.test($data)) throw new Error(`Invalid JSON-pointer: ${$data}`)
jsonPointer = $data
data = N.rootData
} else {
const matches = RELATIVE_JSON_POINTER.exec($data)
if (!matches) throw new Error(`Invalid JSON-pointer: ${$data}`)
const up: number = +matches[1]
jsonPointer = matches[2]
if (jsonPointer === "#") {
if (up >= dataLevel) throw new Error(errorMsg("property/index", up))
return dataPathArr[dataLevel - up]
}
if (up > dataLevel) throw new Error(errorMsg("data", up))
data = dataNames[dataLevel - up]
if (!jsonPointer) return data
}
let expr = data
const segments = jsonPointer.split("/")
for (const segment of segments) {
if (segment) {
data = _`${data}${getProperty(unescapeJsonPointer(segment))}`
expr = _`${expr} && ${data}`
}
}
return expr
function errorMsg(pointerType: string, up: number): string {
return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`
}
}
@@ -0,0 +1,33 @@
/**
* Cryptographic key export functions
*
* @module
*/
import type * as types from '../types.d.ts';
/**
* Exports a public {@link !CryptoKey} or {@link !KeyObject} to a PEM-encoded SPKI string format.
*
* This function is exported (as a named export) from the main `'jose'` module entry point as well
* as from its subpath export `'jose/key/export'`.
*
* @param key Key to export to a PEM-encoded SPKI string format.
*/
export declare function exportSPKI(key: types.CryptoKey | types.KeyObject): Promise<string>;
/**
* Exports a private {@link !CryptoKey} or {@link !KeyObject} to a PEM-encoded PKCS8 string format.
*
* This function is exported (as a named export) from the main `'jose'` module entry point as well
* as from its subpath export `'jose/key/export'`.
*
* @param key Key to export to a PEM-encoded PKCS8 string format.
*/
export declare function exportPKCS8(key: types.CryptoKey | types.KeyObject): Promise<string>;
/**
* Exports a {@link !CryptoKey}, {@link !KeyObject}, or {@link !Uint8Array} to a JWK.
*
* This function is exported (as a named export) from the main `'jose'` module entry point as well
* as from its subpath export `'jose/key/export'`.
*
* @param key Key to export as JWK.
*/
export declare function exportJWK(key: types.CryptoKey | types.KeyObject | Uint8Array): Promise<types.JWK>;
@@ -0,0 +1,70 @@
//#region src/lru-cache.ts
function createLRUCache(max) {
const cache = /* @__PURE__ */ new Map();
let oldest;
let newest;
const touch = (entry) => {
if (!entry.next) return;
if (!entry.prev) {
entry.next.prev = void 0;
oldest = entry.next;
entry.next = void 0;
if (newest) {
entry.prev = newest;
newest.next = entry;
}
} else {
entry.prev.next = entry.next;
entry.next.prev = entry.prev;
entry.next = void 0;
if (newest) {
newest.next = entry;
entry.prev = newest;
}
}
newest = entry;
};
return {
get(key) {
const entry = cache.get(key);
if (!entry) return void 0;
touch(entry);
return entry.value;
},
set(key, value) {
if (cache.size >= max && oldest) {
const toDelete = oldest;
cache.delete(toDelete.key);
if (toDelete.next) {
oldest = toDelete.next;
toDelete.next.prev = void 0;
}
if (toDelete === newest) newest = void 0;
}
const existing = cache.get(key);
if (existing) {
existing.value = value;
touch(existing);
} else {
const entry = {
key,
value,
prev: newest
};
if (newest) newest.next = entry;
newest = entry;
if (!oldest) oldest = entry;
cache.set(key, entry);
}
},
clear() {
cache.clear();
oldest = void 0;
newest = void 0;
}
};
}
//#endregion
exports.createLRUCache = createLRUCache;
//# sourceMappingURL=lru-cache.cjs.map
@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.addCandidateTSConfigRootDir = addCandidateTSConfigRootDir;
exports.clearCandidateTSConfigRootDirs = clearCandidateTSConfigRootDirs;
exports.getInferredTSConfigRootDir = getInferredTSConfigRootDir;
const candidateTSConfigRootDirs = new Set();
function addCandidateTSConfigRootDir(candidate) {
candidateTSConfigRootDirs.add(candidate);
}
function clearCandidateTSConfigRootDirs() {
candidateTSConfigRootDirs.clear();
}
function getInferredTSConfigRootDir() {
const entries = [...candidateTSConfigRootDirs];
switch (entries.length) {
case 0:
return process.cwd();
case 1:
return entries[0];
default:
throw new Error([
'No tsconfigRootDir was set, and multiple candidate TSConfigRootDirs are present:',
...entries.map(candidate => ` - ${candidate}`),
"You'll need to explicitly set tsconfigRootDir in your parser options.",
'See: https://tseslint.com/parser-tsconfigrootdir',
].join('\n'));
}
}
@@ -0,0 +1,36 @@
import { Readable, Writable } from 'node:stream';
import { JSONRPCMessage } from '../types.js';
import { Transport } from '../shared/transport.js';
/**
* Server transport for stdio: this communicates with an MCP client by reading from the current process' stdin and writing to stdout.
*
* This transport is only available in Node.js environments.
*/
export declare class StdioServerTransport implements Transport {
private _stdin;
private _stdout;
private _readBuffer;
private _started;
constructor(_stdin?: Readable, _stdout?: Writable, options?: {
/**
* Maximum size of the read buffer in bytes. If a single message exceeds
* this size the transport will emit an error and close.
*
* Defaults to 10 MB.
*/
maxBufferSize?: number;
});
onclose?: () => void;
onerror?: (error: Error) => void;
onmessage?: (message: JSONRPCMessage) => void;
_ondata: (chunk: Buffer) => void;
_onerror: (error: Error) => void;
/**
* Starts listening for messages on stdin.
*/
start(): Promise<void>;
private processReadBuffer;
close(): Promise<void>;
send(message: JSONRPCMessage): Promise<void>;
}
//# sourceMappingURL=stdio.d.ts.map
@@ -0,0 +1,31 @@
import { mixNumber } from 'motion-dom';
import { getEasingForSegment, removeItem } from 'motion-utils';
function eraseKeyframes(sequence, startTime, endTime) {
for (let i = 0; i < sequence.length; i++) {
const keyframe = sequence[i];
if (keyframe.at > startTime && keyframe.at < endTime) {
removeItem(sequence, keyframe);
// If we remove this item we have to push the pointer back one
i--;
}
}
}
function addKeyframes(sequence, keyframes, easing, offset, startTime, endTime) {
/**
* Erase every existing value between currentTime and targetTime,
* this will essentially splice this timeline into any currently
* defined ones.
*/
eraseKeyframes(sequence, startTime, endTime);
for (let i = 0; i < keyframes.length; i++) {
sequence.push({
value: keyframes[i],
at: mixNumber(startTime, endTime, offset[i]),
easing: getEasingForSegment(easing, i),
});
}
}
export { addKeyframes, eraseKeyframes };
//# sourceMappingURL=edit.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"toy-brick.js","sources":["../../../src/icons/toy-brick.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ToyBrick\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTIiIHg9IjMiIHk9IjgiIHJ4PSIxIiAvPgogIDxwYXRoIGQ9Ik0xMCA4VjVjMC0uNi0uNC0xLTEtMUg2YTEgMSAwIDAgMC0xIDF2MyIgLz4KICA8cGF0aCBkPSJNMTkgOFY1YzAtLjYtLjQtMS0xLTFoLTNhMSAxIDAgMCAwLTEgMXYzIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/toy-brick\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 ToyBrick = createLucideIcon('ToyBrick', [\n ['rect', { width: '18', height: '12', x: '3', y: '8', rx: '1', key: '158fvp' }],\n ['path', { d: 'M10 8V5c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v3', key: 's0042v' }],\n ['path', { d: 'M19 8V5c0-.6-.4-1-1-1h-3a1 1 0 0 0-1 1v3', key: '9wmeh2' }],\n]);\n\nexport default ToyBrick;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACxE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3E,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,22 @@
#include "Glob.hh"
#ifdef __wasm32__
extern "C" bool wasm_regex_match(const char *s, const char *regex);
#endif
Glob::Glob(std::string raw) {
mRaw = raw;
mHash = std::hash<std::string>()(raw);
#ifndef __wasm32__
mRegex = std::regex(raw);
#endif
}
bool Glob::isIgnored(std::string relative_path) const {
// Use native JS regex engine for wasm to reduce binary size.
#ifdef __wasm32__
return wasm_regex_match(relative_path.c_str(), mRaw.c_str());
#else
return std::regex_match(relative_path, mRegex);
#endif
}
@@ -0,0 +1 @@
{"version":3,"file":"activity.js","sources":["../../../src/icons/activity.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Activity\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjIgMTJoLTIuNDhhMiAyIDAgMCAwLTEuOTMgMS40NmwtMi4zNSA4LjM2YS4yNS4yNSAwIDAgMS0uNDggMEw5LjI0IDIuMThhLjI1LjI1IDAgMCAwLS40OCAwbC0yLjM1IDguMzZBMiAyIDAgMCAxIDQuNDkgMTJIMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/activity\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 Activity = createLucideIcon('Activity', [\n [\n 'path',\n {\n d: 'M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2',\n key: '169zse',\n },\n ],\n]);\n\nexport default Activity;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
export declare const compareVersions: (nextVersion: string, prevVersion: string) => 1 | 0 | -1;
@@ -0,0 +1 @@
{"version":3,"file":"link.cjs","names":[],"sources":["../../src/link.ts"],"sourcesContent":["import type { HistoryState, ParsedHistoryState } from '@tanstack/history'\nimport type {\n AllParams,\n CatchAllPaths,\n CurrentPath,\n FullSearchSchema,\n FullSearchSchemaInput,\n ParentPath,\n RouteByPath,\n RouteByToPath,\n RoutePaths,\n RouteToPath,\n ToPath,\n} from './routeInfo'\nimport type {\n AnyRouter,\n RegisteredRouter,\n ViewTransitionOptions,\n} from './router'\nimport type {\n ConstrainLiteral,\n Expand,\n MakeDifferenceOptional,\n NoInfer,\n NonNullableUpdater,\n Updater,\n} from './utils'\nimport type { ParsedLocation } from './location'\n\nexport type IsRequiredParams<TParams> =\n Record<never, never> extends TParams ? never : true\n\nexport interface ParsePathParamsResult<\n in out TRequired,\n in out TOptional,\n in out TRest,\n> {\n required: TRequired\n optional: TOptional\n rest: TRest\n}\n\nexport type AnyParsePathParamsResult = ParsePathParamsResult<\n string,\n string,\n string\n>\n\nexport type ParsePathParamsBoundaryStart<T extends string> =\n T extends `${infer TLeft}{-${infer TRight}`\n ? ParsePathParamsResult<\n ParsePathParams<TLeft>['required'],\n | ParsePathParams<TLeft>['optional']\n | ParsePathParams<TRight>['required']\n | ParsePathParams<TRight>['optional'],\n ParsePathParams<TRight>['rest']\n >\n : T extends `${infer TLeft}{${infer TRight}`\n ? ParsePathParamsResult<\n | ParsePathParams<TLeft>['required']\n | ParsePathParams<TRight>['required'],\n | ParsePathParams<TLeft>['optional']\n | ParsePathParams<TRight>['optional'],\n ParsePathParams<TRight>['rest']\n >\n : never\n\nexport type ParsePathParamsSymbol<T extends string> =\n T extends `${string}$${infer TRight}`\n ? TRight extends `${string}/${string}`\n ? TRight extends `${infer TParam}/${infer TRest}`\n ? TParam extends ''\n ? ParsePathParamsResult<\n ParsePathParams<TRest>['required'],\n '_splat' | ParsePathParams<TRest>['optional'],\n ParsePathParams<TRest>['rest']\n >\n : ParsePathParamsResult<\n TParam | ParsePathParams<TRest>['required'],\n ParsePathParams<TRest>['optional'],\n ParsePathParams<TRest>['rest']\n >\n : never\n : TRight extends ''\n ? ParsePathParamsResult<never, '_splat', never>\n : ParsePathParamsResult<TRight, never, never>\n : never\n\nexport type ParsePathParamsBoundaryEnd<T extends string> =\n T extends `${infer TLeft}}${infer TRight}`\n ? ParsePathParamsResult<\n | ParsePathParams<TLeft>['required']\n | ParsePathParams<TRight>['required'],\n | ParsePathParams<TLeft>['optional']\n | ParsePathParams<TRight>['optional'],\n ParsePathParams<TRight>['rest']\n >\n : never\n\nexport type ParsePathParamsEscapeStart<T extends string> =\n T extends `${infer TLeft}[${infer TRight}`\n ? ParsePathParamsResult<\n | ParsePathParams<TLeft>['required']\n | ParsePathParams<TRight>['required'],\n | ParsePathParams<TLeft>['optional']\n | ParsePathParams<TRight>['optional'],\n ParsePathParams<TRight>['rest']\n >\n : never\n\nexport type ParsePathParamsEscapeEnd<T extends string> =\n T extends `${string}]${infer TRight}` ? ParsePathParams<TRight> : never\n\nexport type ParsePathParams<T extends string> = T extends `${string}[${string}`\n ? ParsePathParamsEscapeStart<T>\n : T extends `${string}]${string}`\n ? ParsePathParamsEscapeEnd<T>\n : T extends `${string}}${string}`\n ? ParsePathParamsBoundaryEnd<T>\n : T extends `${string}{${string}`\n ? ParsePathParamsBoundaryStart<T>\n : T extends `${string}$${string}`\n ? ParsePathParamsSymbol<T>\n : never\n\nexport type AddTrailingSlash<T> = T extends `${string}/` ? T : `${T & string}/`\n\nexport type RemoveTrailingSlashes<T> = T & `${string}/` extends never\n ? T\n : T extends `${infer R}/`\n ? R\n : T\n\nexport type AddLeadingSlash<T> = T & `/${string}` extends never\n ? `/${T & string}`\n : T\n\nexport type RemoveLeadingSlashes<T> = T & `/${string}` extends never\n ? T\n : T extends `/${infer R}`\n ? R\n : T\n\ntype JoinPath<TLeft extends string, TRight extends string> = TRight extends ''\n ? TLeft\n : TLeft extends ''\n ? TRight\n : `${RemoveTrailingSlashes<TLeft>}/${RemoveLeadingSlashes<TRight>}`\n\ntype RemoveLastSegment<\n T extends string,\n TAcc extends string = '',\n> = T extends `${infer TSegment}/${infer TRest}`\n ? TRest & `${string}/${string}` extends never\n ? TRest extends ''\n ? TAcc\n : `${TAcc}${TSegment}`\n : RemoveLastSegment<TRest, `${TAcc}${TSegment}/`>\n : TAcc\n\nexport type ResolveCurrentPath<\n TFrom extends string,\n TTo extends string,\n> = TTo extends '.'\n ? Line truncated
@@ -0,0 +1,4 @@
// Not meant to be used directly
// Omitting all exports so that they don't appear in IDE autocomplete.
export {};
@@ -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 Users = createLucideIcon("Users", [
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }],
["path", { d: "M16 3.13a4 4 0 0 1 0 7.75", key: "1da9ce" }]
]);
export { Users as default };
//# sourceMappingURL=users.js.map
@@ -0,0 +1,132 @@
import { HtmlEscapedCallbackPhase, raw, resolveCallback } from "../utils/html.js";
import { DOM_RENDERER, DOM_STASH } from "./constants.js";
import { captureRenderContext, createContext, useContext } from "./context.js";
import { JSXNode, isUntrustedObject, renderChildren, renderUntrustedObject } from "./base.js";
import { buildDataStack } from "./dom/render.js";
import { Suspense as Suspense$1 } from "./dom/components.js";
import { childrenToString } from "./components.js";
//#region src/jsx/streaming.ts
/**
* @module
* This module enables JSX to supports streaming Response.
*/
/**
* Used to specify nonce for scripts generated by `Suspense` and `ErrorBoundary`.
*
* @example
* ```tsx
* <StreamingContext.Provider value={{ scriptNonce: 'test-nonce' }}>
* <Suspense fallback={<p>Loading...</p>}>
* <Content />
* </Suspense>
* </StreamingContext.Provider>
* ```
*/
const StreamingContext = createContext(null);
let suspenseCounter = 0;
const serializeBoundaryChild = (child) => typeof child === "string" || Array.isArray(child) ? renderChildren([child]) : child == null || typeof child === "boolean" ? "" : isUntrustedObject(child) ? renderUntrustedObject(child) : child.toString();
/**
* @experimental
* `Suspense` is an experimental feature.
* The API might be changed.
*/
const Suspense = async ({ children, fallback }) => {
if (!Array.isArray(children)) children = [children];
const nonce = useContext(StreamingContext)?.scriptNonce;
let resArray = [];
const stackNode = { [DOM_STASH]: [0, []] };
const popNodeStack = () => {
buildDataStack.pop();
};
try {
stackNode[DOM_STASH][0] = 0;
buildDataStack.push([[], stackNode]);
resArray = children.map(serializeBoundaryChild);
} catch (e) {
if (e instanceof Promise) {
const resume = captureRenderContext();
resArray = [e.then(() => resume(() => {
stackNode[DOM_STASH][0] = 0;
buildDataStack.push([[], stackNode]);
return childrenToString(children).finally(popNodeStack);
}))];
} else throw e;
} finally {
popNodeStack();
}
if (resArray.some((res) => res instanceof Promise)) {
const index = suspenseCounter++;
const fallbackStr = await (typeof fallback === "string" || Array.isArray(fallback) ? renderChildren([fallback]) : isUntrustedObject(fallback) ? renderUntrustedObject(fallback) : fallback.toString());
return raw(`<template id="H:${index}"></template>${fallbackStr}<!--/$-->`, [...fallbackStr.callbacks || [], ({ phase, buffer, context }) => {
if (phase === HtmlEscapedCallbackPhase.BeforeStream) return;
return Promise.all(resArray).then(async (htmlArray) => {
htmlArray = htmlArray.flat();
const content = htmlArray.join("");
if (buffer) buffer[0] = buffer[0].replace(new RegExp(`<template id="H:${index}"></template>.*?<!--/\\$-->`, "s"), () => content);
let html = buffer ? "" : `<template data-hono-target="H:${index}">${content}</template><script${nonce ? ` nonce="${nonce}"` : ""}>
((d,c,n) => {
c=d.currentScript.previousSibling
d=d.getElementById('H:${index}')
if(!d)return
do{n=d.nextSibling;n.remove()}while(n.nodeType!=8||n.nodeValue!='/$')
d.replaceWith(c.content)
})(document)
<\/script>`;
const callbacks = htmlArray.map((html) => html.callbacks || []).flat();
if (!callbacks.length) return html;
if (phase === HtmlEscapedCallbackPhase.Stream) html = await resolveCallback(html, HtmlEscapedCallbackPhase.BeforeStream, true, context);
return raw(html, callbacks);
});
}]);
} else return raw(resArray.join(""));
};
Suspense[DOM_RENDERER] = Suspense$1;
const textEncoder = new TextEncoder();
/**
* @experimental
* `renderToReadableStream()` is an experimental feature.
* The API might be changed.
*/
const renderToReadableStream = (content, onError = console.trace) => {
let cancelled = false;
return new ReadableStream({
async start(controller) {
try {
if (content instanceof JSXNode) content = content.toString();
const context = typeof content === "object" ? content : {};
const resolved = await resolveCallback(content, HtmlEscapedCallbackPhase.BeforeStream, true, context);
if (!cancelled) controller.enqueue(textEncoder.encode(resolved));
let resolvedCount = 0;
const callbacks = [];
const then = (promise) => {
callbacks.push(promise.catch((err) => {
console.log(err);
onError(err);
return "";
}).then(async (res) => {
res = await resolveCallback(res, HtmlEscapedCallbackPhase.BeforeStream, true, context);
res.callbacks?.map((c) => c({
phase: HtmlEscapedCallbackPhase.Stream,
context
})).filter(Boolean).forEach(then);
resolvedCount++;
if (!cancelled) controller.enqueue(textEncoder.encode(res));
}));
};
resolved.callbacks?.map((c) => c({
phase: HtmlEscapedCallbackPhase.Stream,
context
})).filter(Boolean).forEach(then);
while (resolvedCount !== callbacks.length) await Promise.all(callbacks);
} catch (e) {
onError(e);
}
if (!cancelled) controller.close();
},
cancel() {
cancelled = true;
}
});
};
//#endregion
export { StreamingContext, Suspense, renderToReadableStream };
@@ -0,0 +1,218 @@
import { Nt as SdkError, Pt as SdkErrorCode, f as serializeMessage, l as ReadBuffer } from "./src-WCy6ifGf.mjs";
import process from "node:process";
import { PassThrough } from "node:stream";
import spawn from "cross-spawn";
//#region src/client/stdio.ts
/**
* Environment variables to inherit by default, if an environment is not explicitly given.
*/
const DEFAULT_INHERITED_ENV_VARS = process.platform === "win32" ? [
"APPDATA",
"COMSPEC",
"HOMEDRIVE",
"HOMEPATH",
"LOCALAPPDATA",
"PATH",
"PATHEXT",
"PROCESSOR_ARCHITECTURE",
"PROGRAMDATA",
"PROGRAMFILES",
"PROGRAMFILES(X86)",
"PROGRAMW6432",
"SYSTEMDRIVE",
"SYSTEMROOT",
"TEMP",
"USERNAME",
"USERPROFILE",
"WINDIR"
] : [
"HOME",
"LOGNAME",
"PATH",
"SHELL",
"TERM",
"USER"
];
/**
* Returns a default environment object including only environment variables deemed safe to inherit.
*/
function getDefaultEnvironment() {
const env = {};
for (const key of DEFAULT_INHERITED_ENV_VARS) {
const value = process.env[key];
if (value === void 0) continue;
if (value.startsWith("()")) continue;
env[key] = value;
}
return env;
}
/**
* Client transport for stdio: this will connect to a server by spawning a process and communicating with it over stdin/stdout.
*
* This transport is only available in Node.js environments.
*/
var StdioClientTransport = class {
_process;
_readBuffer;
_serverParams;
_stderrStream = null;
onclose;
onerror;
onmessage;
constructor(server) {
this._serverParams = server;
this._readBuffer = new ReadBuffer({ maxBufferSize: server.maxBufferSize });
if (server.stderr === "pipe" || server.stderr === "overlapped") this._stderrStream = new PassThrough();
}
/**
* Starts the server process and prepares to communicate with it.
*/
async start() {
if (this._process) throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");
return new Promise((resolve, reject) => {
this._process = spawn(this._serverParams.command, this._serverParams.args ?? [], {
env: {
...getDefaultEnvironment(),
...this._serverParams.env
},
stdio: [
"pipe",
"pipe",
this._serverParams.stderr ?? "inherit"
],
shell: false,
windowsHide: process.platform === "win32",
cwd: this._serverParams.cwd
});
this._process.on("error", (error) => {
reject(error);
this.onerror?.(error);
});
this._process.on("spawn", () => {
resolve();
});
this._process.on("close", (_code) => {
this._process = void 0;
this.onclose?.();
});
this._process.stdin?.on("error", (error) => {
this.onerror?.(error);
});
this._process.stdout?.on("data", (chunk) => {
try {
this._readBuffer.append(chunk);
this.processReadBuffer();
} catch (error) {
this.onerror?.(error);
this.close().catch(() => {});
}
});
this._process.stdout?.on("error", (error) => {
this.onerror?.(error);
});
if (this._stderrStream && this._process.stderr) this._process.stderr.pipe(this._stderrStream);
});
}
/**
* The `stderr` stream of the child process, if {@linkcode StdioServerParameters.stderr} was set to `"pipe"` or `"overlapped"`.
*
* If `stderr` piping was requested, a `PassThrough` stream is returned _immediately_, allowing callers to
* attach listeners before the `start` method is invoked. This prevents loss of any early
* error output emitted by the child process.
*/
get stderr() {
if (this._stderrStream) return this._stderrStream;
return this._process?.stderr ?? null;
}
/**
* The child process pid spawned by this transport.
*
* This is only available after the transport has been started.
*/
get pid() {
return this._process?.pid ?? null;
}
processReadBuffer() {
while (true) try {
const message = this._readBuffer.readMessage();
if (message === null) break;
this.onmessage?.(message);
} catch (error) {
this.onerror?.(error);
}
}
/**
* Reap a disposable probe sibling (see the version-negotiation sibling
* flow): signal-first teardown awaiting process `exit` — never the `close`
* event, so a helper process holding the child's stdio pipes can never
* block disposal. Not part of the public transport lifecycle.
*
* @internal
*/
async _dispose() {
const proc = this._process;
this._process = void 0;
if (proc && proc.exitCode === null && proc.signalCode === null) {
const exited = new Promise((resolve) => proc.once("exit", () => resolve()));
try {
proc.stdin?.end();
} catch {}
try {
proc.kill("SIGTERM");
} catch {}
await Promise.race([exited, new Promise((resolve) => setTimeout(resolve, 1e3).unref())]);
if (proc.exitCode === null && proc.signalCode === null) try {
proc.kill("SIGKILL");
} catch {}
await exited;
}
try {
proc?.stdout?.destroy();
} catch {}
try {
proc?.stdin?.destroy();
} catch {}
try {
proc?.stderr?.destroy();
} catch {}
this._readBuffer.clear();
}
async close() {
if (this._process) {
const processToClose = this._process;
this._process = void 0;
const closePromise = new Promise((resolve) => {
processToClose.once("close", () => {
resolve();
});
});
try {
processToClose.stdin?.end();
} catch {}
await Promise.race([closePromise, new Promise((resolve) => setTimeout(resolve, 2e3).unref())]);
if (processToClose.exitCode === null) {
try {
processToClose.kill("SIGTERM");
} catch {}
await Promise.race([closePromise, new Promise((resolve) => setTimeout(resolve, 2e3).unref())]);
}
if (processToClose.exitCode === null) try {
processToClose.kill("SIGKILL");
} catch {}
}
this._readBuffer.clear();
}
send(message) {
return new Promise((resolve) => {
if (!this._process?.stdin) throw new SdkError(SdkErrorCode.NotConnected, "Not connected");
const json = serializeMessage(message);
if (this._process.stdin.write(json)) resolve();
else this._process.stdin.once("drain", resolve);
});
}
};
//#endregion
export { DEFAULT_INHERITED_ENV_VARS, StdioClientTransport, getDefaultEnvironment };
//# sourceMappingURL=stdio.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"list-check.js","sources":["../../../src/icons/list-check.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ListCheck\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTEgMThIMyIgLz4KICA8cGF0aCBkPSJtMTUgMTggMiAyIDQtNCIgLz4KICA8cGF0aCBkPSJNMTYgMTJIMyIgLz4KICA8cGF0aCBkPSJNMTYgNkgzIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/list-check\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ListCheck = createLucideIcon('ListCheck', [\n ['path', { d: 'M11 18H3', key: 'n3j2dh' }],\n ['path', { d: 'm15 18 2 2 4-4', key: '1szwhi' }],\n ['path', { d: 'M16 12H3', key: '1a2rj7' }],\n ['path', { d: 'M16 6H3', key: '1wxfjs' }],\n]);\n\nexport default ListCheck;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAA;AAAA,CAAA,CAC/C,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,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,36 @@
export declare type Token =
| { type: "StringLiteral"; value: string; closed: boolean }
| { type: "NoSubstitutionTemplate"; value: string; closed: boolean }
| { type: "TemplateHead"; value: string }
| { type: "TemplateMiddle"; value: string }
| { type: "TemplateTail"; value: string; closed: boolean }
| { type: "RegularExpressionLiteral"; value: string; closed: boolean }
| { type: "MultiLineComment"; value: string; closed: boolean }
| { type: "SingleLineComment"; value: string }
| { type: "HashbangComment"; value: string }
| { type: "IdentifierName"; value: string }
| { type: "PrivateIdentifier"; value: string }
| { type: "NumericLiteral"; value: string }
| { type: "Punctuator"; value: string }
| { type: "WhiteSpace"; value: string }
| { type: "LineTerminatorSequence"; value: string }
| { type: "Invalid"; value: string };
export declare type JSXToken =
| { type: "JSXString"; value: string; closed: boolean }
| { type: "JSXText"; value: string }
| { type: "JSXIdentifier"; value: string }
| { type: "JSXPunctuator"; value: string }
| { type: "JSXInvalid"; value: string };
declare function jsTokens(
input: string,
options: { jsx: true },
): Iterable<Token | JSXToken>;
declare function jsTokens(
input: string,
options?: { jsx?: boolean },
): Iterable<Token>;
export default jsTokens;
@@ -0,0 +1,301 @@
#! /usr/bin/env node
'use strict';
const fs = require('fs');
const path = require('path');
const args = process.argv.slice(2);
const dir = args[0];
if (!dir) {
console.log('Usage: node ' + path.basename(__filename) + ' <target-dir>');
process.exit(1);
}
const NodeApiVersion = require('../').version;
const disable = args[1];
let ConfigFileOperations;
if (disable !== '--disable' && dir !== '--disable') {
ConfigFileOperations = {
'package.json': [
[/([ ]*)"dependencies": {/g, '$1"dependencies": {\n$1 "node-addon-api": "' + NodeApiVersion + '",'],
[/[ ]*"nan": *"[^"]+"(,|)[\n\r]/g, '']
],
'binding.gyp': [
[/([ ]*)'include_dirs': \[/g, '$1\'include_dirs\': [\n$1 \'<!(node -p "require(\\\'node-addon-api\\\').include_dir")\','],
[/([ ]*)"include_dirs": \[/g, '$1"include_dirs": [\n$1 "<!(node -p \\"require(\'node-addon-api\').include_dir\\")",'],
[/[ ]*("|')<!\(node -e ("|'|\\"|\\')require\(("|'|\\"|\\')nan("|'|\\"|\\')\)("|'|\\"|\\')\)("|')(,|)[\r\n]/g, ''],
[/([ ]*)("|')target_name("|'): ("|')(.+?)("|'),/g, '$1$2target_name$2: $4$5$6,\n $2cflags!$2: [ $2-fno-exceptions$2 ],\n $2cflags_cc!$2: [ $2-fno-exceptions$2 ],\n $2xcode_settings$2: { $2GCC_ENABLE_CPP_EXCEPTIONS$2: $2YES$2,\n $2CLANG_CXX_LIBRARY$2: $2libc++$2,\n $2MACOSX_DEPLOYMENT_TARGET$2: $210.7$2,\n },\n $2msvs_settings$2: {\n $2VCCLCompilerTool$2: { $2ExceptionHandling$2: 1 },\n },']
]
};
} else {
ConfigFileOperations = {
'package.json': [
[/([ ]*)"dependencies": {/g, '$1"dependencies": {\n$1 "node-addon-api": "' + NodeApiVersion + '",'],
[/[ ]*"nan": *"[^"]+"(,|)[\n\r]/g, '']
],
'binding.gyp': [
[/([ ]*)'include_dirs': \[/g, '$1\'include_dirs\': [\n$1 \'<!(node -p "require(\\\'node-addon-api\\\').include_dir")\','],
[/([ ]*)"include_dirs": \[/g, '$1"include_dirs": [\n$1 "<!(node -p \'require(\\"node-addon-api\\").include_dir\')",'],
[/[ ]*("|')<!\(node -e ("|'|\\"|\\')require\(("|'|\\"|\\')nan("|'|\\"|\\')\)("|'|\\"|\\')\)("|')(,|)[\r\n]/g, ''],
[/([ ]*)("|')target_name("|'): ("|')(.+?)("|'),/g, '$1$2target_name$2: $4$5$6,\n $2cflags!$2: [ $2-fno-exceptions$2 ],\n $2cflags_cc!$2: [ $2-fno-exceptions$2 ],\n $2defines$2: [ $2NAPI_DISABLE_CPP_EXCEPTIONS$2 ],\n $2conditions$2: [\n [\'OS=="win"\', { $2defines$2: [ $2_HAS_EXCEPTIONS=1$2 ] }]\n ]']
]
};
}
const SourceFileOperations = [
[/Nan::SetMethod\(target,[\s]*"(.*)"[\s]*,[\s]*([^)]+)\)/g, 'exports.Set(Napi::String::New(env, "$1"), Napi::Function::New(env, $2))'],
[/v8::Local<v8::FunctionTemplate>\s+(\w+)\s*=\s*Nan::New<FunctionTemplate>\([\w\d:]+\);(?:\w+->Reset\(\1\))?\s+\1->SetClassName\(Nan::String::New\("(\w+)"\)\);/g, 'Napi::Function $1 = DefineClass(env, "$2", {'],
[/Local<FunctionTemplate>\s+(\w+)\s*=\s*Nan::New<FunctionTemplate>\([\w\d:]+\);\s+(\w+)\.Reset\((\1)\);\s+\1->SetClassName\((Nan::String::New|Nan::New<(v8::)*String>)\("(.+?)"\)\);/g, 'Napi::Function $1 = DefineClass(env, "$6", {'],
[/Local<FunctionTemplate>\s+(\w+)\s*=\s*Nan::New<FunctionTemplate>\([\w\d:]+\);(?:\w+->Reset\(\1\))?\s+\1->SetClassName\(Nan::String::New\("(\w+)"\)\);/g, 'Napi::Function $1 = DefineClass(env, "$2", {'],
[/Nan::New<v8::FunctionTemplate>\(([\w\d:]+)\)->GetFunction\(\)/g, 'Napi::Function::New(env, $1)'],
[/Nan::New<FunctionTemplate>\(([\w\d:]+)\)->GetFunction()/g, 'Napi::Function::New(env, $1);'],
[/Nan::New<v8::FunctionTemplate>\(([\w\d:]+)\)/g, 'Napi::Function::New(env, $1)'],
[/Nan::New<FunctionTemplate>\(([\w\d:]+)\)/g, 'Napi::Function::New(env, $1)'],
// FunctionTemplate to FunctionReference
[/Nan::Persistent<(v8::)*FunctionTemplate>/g, 'Napi::FunctionReference'],
[/Nan::Persistent<(v8::)*Function>/g, 'Napi::FunctionReference'],
[/v8::Local<v8::FunctionTemplate>/g, 'Napi::FunctionReference'],
[/Local<FunctionTemplate>/g, 'Napi::FunctionReference'],
[/v8::FunctionTemplate/g, 'Napi::FunctionReference'],
[/FunctionTemplate/g, 'Napi::FunctionReference'],
[/([ ]*)Nan::SetPrototypeMethod\(\w+, "(\w+)", (\w+)\);/g, '$1InstanceMethod("$2", &$3),'],
[/([ ]*)(?:\w+\.Reset\(\w+\);\s+)?\(target\)\.Set\("(\w+)",\s*Nan::GetFunction\((\w+)\)\);/gm,
'});\n\n' +
'$1constructor = Napi::Persistent($3);\n' +
'$1constructor.SuppressDestruct();\n' +
'$1target.Set("$2", $3);'],
// TODO: Other attribute combinations
[/static_cast<PropertyAttribute>\(ReadOnly\s*\|\s*DontDelete\)/gm,
'static_cast<napi_property_attributes>(napi_enumerable | napi_configurable)'],
[/([\w\d:<>]+?)::Cast\((.+?)\)/g, '$2.As<$1>()'],
[/\*Nan::Utf8String\(([^)]+)\)/g, '$1->As<Napi::String>().Utf8Value().c_str()'],
[/Nan::Utf8String +(\w+)\(([^)]+)\)/g, 'std::string $1 = $2.As<Napi::String>()'],
[/Nan::Utf8String/g, 'std::string'],
[/v8::String::Utf8Value (.+?)\((.+?)\)/g, 'Napi::String $1(env, $2)'],
[/String::Utf8Value (.+?)\((.+?)\)/g, 'Napi::String $1(env, $2)'],
[/\.length\(\)/g, '.Length()'],
[/Nan::MakeCallback\(([^,]+),[\s\\]+([^,]+),/gm, '$2.MakeCallback($1,'],
[/class\s+(\w+)\s*:\s*public\s+Nan::ObjectWrap/g, 'class $1 : public Napi::ObjectWrap<$1>'],
[/(\w+)\(([^)]*)\)\s*:\s*Nan::ObjectWrap\(\)\s*(,)?/gm, '$1($2) : Napi::ObjectWrap<$1>()$3'],
// HandleOKCallback to OnOK
[/HandleOKCallback/g, 'OnOK'],
// HandleErrorCallback to OnError
[/HandleErrorCallback/g, 'OnError'],
// ex. .As<Function>() to .As<Napi::Object>()
[/\.As<v8::(Value|Boolean|String|Number|Object|Array|Symbol|External|Function)>\(\)/g, '.As<Napi::$1>()'],
[/\.As<(Value|Boolean|String|Number|Object|Array|Symbol|External|Function)>\(\)/g, '.As<Napi::$1>()'],
// ex. Nan::New<Number>(info[0]) to Napi::Number::New(info[0])
[/Nan::New<(v8::)*Integer>\((.+?)\)/g, 'Napi::Number::New(env, $2)'],
[/Nan::New\(([0-9.]+)\)/g, 'Napi::Number::New(env, $1)'],
[/Nan::New<(v8::)*String>\("(.+?)"\)/g, 'Napi::String::New(env, "$2")'],
[/Nan::New\("(.+?)"\)/g, 'Napi::String::New(env, "$1")'],
[/Nan::New<(v8::)*(.+?)>\(\)/g, 'Napi::$2::New(env)'],
[/Nan::New<(.+?)>\(\)/g, 'Napi::$1::New(env)'],
[/Nan::New<(v8::)*(.+?)>\(/g, 'Napi::$2::New(env, '],
[/Nan::New<(.+?)>\(/g, 'Napi::$1::New(env, '],
[/Nan::NewBuffer\(/g, 'Napi::Buffer<char>::New(env, '],
// TODO: Properly handle this
[/Nan::New\(/g, 'Napi::New(env, '],
[/\.IsInt32\(\)/g, '.IsNumber()'],
[/->IsInt32\(\)/g, '.IsNumber()'],
[/(.+?)->BooleanValue\(\)/g, '$1.As<Napi::Boolean>().Value()'],
[/(.+?)->Int32Value\(\)/g, '$1.As<Napi::Number>().Int32Value()'],
[/(.+?)->Uint32Value\(\)/g, '$1.As<Napi::Number>().Uint32Value()'],
[/(.+?)->IntegerValue\(\)/g, '$1.As<Napi::Number>().Int64Value()'],
[/(.+?)->NumberValue\(\)/g, '$1.As<Napi::Number>().DoubleValue()'],
// ex. Nan::To<bool>(info[0]) to info[0].Value()
[/Nan::To<v8::(Boolean|String|Number|Object|Array|Symbol|Function)>\((.+?)\)/g, '$2.To<Napi::$1>()'],
[/Nan::To<(Boolean|String|Number|Object|Array|Symbol|Function)>\((.+?)\)/g, '$2.To<Napi::$1>()'],
// ex. Nan::To<bool>(info[0]) to info[0].As<Napi::Boolean>().Value()
[/Nan::To<bool>\((.+?)\)/g, '$1.As<Napi::Boolean>().Value()'],
// ex. Nan::To<int>(info[0]) to info[0].As<Napi::Number>().Int32Value()
[/Nan::To<int>\((.+?)\)/g, '$1.As<Napi::Number>().Int32Value()'],
// ex. Nan::To<int32_t>(info[0]) to info[0].As<Napi::Number>().Int32Value()
[/Nan::To<int32_t>\((.+?)\)/g, '$1.As<Napi::Number>().Int32Value()'],
// ex. Nan::To<uint32_t>(info[0]) to info[0].As<Napi::Number>().Uint32Value()
[/Nan::To<uint32_t>\((.+?)\)/g, '$1.As<Napi::Number>().Uint32Value()'],
// ex. Nan::To<int64_t>(info[0]) to info[0].As<Napi::Number>().Int64Value()
[/Nan::To<int64_t>\((.+?)\)/g, '$1.As<Napi::Number>().Int64Value()'],
// ex. Nan::To<float>(info[0]) to info[0].As<Napi::Number>().FloatValue()
[/Nan::To<float>\((.+?)\)/g, '$1.As<Napi::Number>().FloatValue()'],
// ex. Nan::To<double>(info[0]) to info[0].As<Napi::Number>().DoubleValue()
[/Nan::To<double>\((.+?)\)/g, '$1.As<Napi::Number>().DoubleValue()'],
[/Nan::New\((\w+)\)->HasInstance\((\w+)\)/g, '$2.InstanceOf($1.Value())'],
[/Nan::Has\(([^,]+),\s*/gm, '($1).Has('],
[/\.Has\([\s|\\]*Nan::New<(v8::)*String>\(([^)]+)\)\)/gm, '.Has($1)'],
[/\.Has\([\s|\\]*Nan::New\(([^)]+)\)\)/gm, '.Has($1)'],
[/Nan::Get\(([^,]+),\s*/gm, '($1).Get('],
[/\.Get\([\s|\\]*Nan::New<(v8::)*String>\(([^)]+)\)\)/gm, '.Get($1)'],
[/\.Get\([\s|\\]*Nan::New\(([^)]+)\)\)/gm, '.Get($1)'],
[/Nan::Set\(([^,]+),\s*/gm, '($1).Set('],
[/\.Set\([\s|\\]*Nan::New<(v8::)*String>\(([^)]+)\)\s*,/gm, '.Set($1,'],
[/\.Set\([\s|\\]*Nan::New\(([^)]+)\)\s*,/gm, '.Set($1,'],
// ex. node::Buffer::HasInstance(info[0]) to info[0].IsBuffer()
[/node::Buffer::HasInstance\((.+?)\)/g, '$1.IsBuffer()'],
// ex. node::Buffer::Length(info[0]) to info[0].Length()
[/node::Buffer::Length\((.+?)\)/g, '$1.As<Napi::Buffer<char>>().Length()'],
// ex. node::Buffer::Data(info[0]) to info[0].Data()
[/node::Buffer::Data\((.+?)\)/g, '$1.As<Napi::Buffer<char>>().Data()'],
[/Nan::CopyBuffer\(/g, 'Napi::Buffer::Copy(env, '],
// Nan::AsyncQueueWorker(worker)
[/Nan::AsyncQueueWorker\((.+)\);/g, '$1.Queue();'],
[/Nan::(Undefined|Null|True|False)\(\)/g, 'env.$1()'],
// Nan::ThrowError(error) to Napi::Error::New(env, error).ThrowAsJavaScriptException()
[/([ ]*)return Nan::Throw(\w*?)Error\((.+?)\);/g, '$1Napi::$2Error::New(env, $3).ThrowAsJavaScriptException();\n$1return env.Null();'],
[/Nan::Throw(\w*?)Error\((.+?)\);\n(\s*)return;/g, 'Napi::$1Error::New(env, $2).ThrowAsJavaScriptException();\n$3return env.Null();'],
[/Nan::Throw(\w*?)Error\((.+?)\);/g, 'Napi::$1Error::New(env, $2).ThrowAsJavaScriptException();\n'],
// Nan::RangeError(error) to Napi::RangeError::New(env, error)
[/Nan::(\w*?)Error\((.+)\)/g, 'Napi::$1Error::New(env, $2)'],
[/Nan::Set\((.+?),\n* *(.+?),\n* *(.+?),\n* *(.+?)\)/g, '$1.Set($2, $3, $4)'],
[/Nan::(Escapable)?HandleScope\s+(\w+)\s*;/g, 'Napi::$1HandleScope $2(env);'],
[/Nan::(Escapable)?HandleScope/g, 'Napi::$1HandleScope'],
[/Nan::ForceSet\(([^,]+), ?/g, '$1->DefineProperty('],
[/\.ForceSet\(Napi::String::New\(env, "(\w+)"\),\s*?/g, '.DefineProperty("$1", '],
// [ /Nan::GetPropertyNames\(([^,]+)\)/, '$1->GetPropertyNames()' ],
[/Nan::Equals\(([^,]+),/g, '$1.StrictEquals('],
[/(.+)->Set\(/g, '$1.Set('],
[/Nan::Callback/g, 'Napi::FunctionReference'],
[/Nan::Persistent<Object>/g, 'Napi::ObjectReference'],
[/Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE target/g, 'Napi::Env& env, Napi::Object& target'],
[/(\w+)\*\s+(\w+)\s*=\s*Nan::ObjectWrap::Unwrap<\w+>\(info\.This\(\)\);/g, '$1* $2 = this;'],
[/Nan::ObjectWrap::Unwrap<(\w+)>\((.*)\);/g, '$2.Unwrap<$1>();'],
[/Nan::NAN_METHOD_RETURN_TYPE/g, 'void'],
[/NAN_INLINE/g, 'inline'],
[/Nan::NAN_METHOD_ARGS_TYPE/g, 'const Napi::CallbackInfo&'],
[/NAN_METHOD\(([\w\d:]+?)\)/g, 'Napi::Value $1(const Napi::CallbackInfo& info)'],
[/static\s*NAN_GETTER\(([\w\d:]+?)\)/g, 'Napi::Value $1(const Napi::CallbackInfo& info)'],
[/NAN_GETTER\(([\w\d:]+?)\)/g, 'Napi::Value $1(const Napi::CallbackInfo& info)'],
[/static\s*NAN_SETTER\(([\w\d:]+?)\)/g, 'void $1(const Napi::CallbackInfo& info, const Napi::Value& value)'],
[/NAN_SETTER\(([\w\d:]+?)\)/g, 'void $1(const Napi::CallbackInfo& info, const Napi::Value& value)'],
[/void Init\((v8::)*Local<(v8::)*Object> exports\)/g, 'Napi::Object Init(Napi::Env env, Napi::Object exports)'],
[/NAN_MODULE_INIT\(([\w\d:]+?)\);/g, 'Napi::Object $1(Napi::Env env, Napi::Object exports);'],
[/NAN_MODULE_INIT\(([\w\d:]+?)\)/g, 'Napi::Object $1(Napi::Env env, Napi::Object exports)'],
[/::(Init(?:ialize)?)\(target\)/g, '::$1(env, target, module)'],
[/constructor_template/g, 'constructor'],
[/Nan::FunctionCallbackInfo<(v8::)?Value>[ ]*& [ ]*info\)[ ]*{\n*([ ]*)/gm, 'Napi::CallbackInfo& info) {\n$2Napi::Env env = info.Env();\n$2'],
[/Nan::FunctionCallbackInfo<(v8::)*Value>\s*&\s*info\);/g, 'Napi::CallbackInfo& info);'],
[/Nan::FunctionCallbackInfo<(v8::)*Value>\s*&/g, 'Napi::CallbackInfo&'],
[/Buffer::HasInstance\(([^)]+)\)/g, '$1.IsBuffer()'],
[/info\[(\d+)\]->/g, 'info[$1].'],
[/info\[([\w\d]+)\]->/g, 'info[$1].'],
[/info\.This\(\)->/g, 'info.This().'],
[/->Is(Object|String|Int32|Number)\(\)/g, '.Is$1()'],
[/info.GetReturnValue\(\).SetUndefined\(\)/g, 'return env.Undefined()'],
[/info\.GetReturnValue\(\)\.Set\(((\n|.)+?)\);/g, 'return $1;'],
// ex. Local<Value> to Napi::Value
[/v8::Local<v8::(Value|Boolean|String|Number|Object|Array|Symbol|External|Function)>/g, 'Napi::$1'],
[/Local<(Value|Boolean|String|Number|Object|Array|Symbol|External|Function)>/g, 'Napi::$1'],
// Declare an env in helper functions that take a Napi::Value
[/(\w+)\(Napi::Value (\w+)(,\s*[^()]+)?\)\s*{\n*([ ]*)/gm, '$1(Napi::Value $2$3) {\n$4Napi::Env env = $2.Env();\n$4'],
// delete #include <node.h> and/or <v8.h>
[/#include +(<|")(?:node|nan).h("|>)/g, '#include $1napi.h$2\n#include $1uv.h$2'],
// NODE_MODULE to NODE_API_MODULE
[/NODE_MODULE/g, 'NODE_API_MODULE'],
[/Nan::/g, 'Napi::'],
[/nan.h/g, 'napi.h'],
// delete .FromJust()
[/\.FromJust\(\)/g, ''],
// delete .ToLocalCheck()
[/\.ToLocalChecked\(\)/g, ''],
[/^.*->SetInternalFieldCount\(.*$/gm, ''],
// replace using node; and/or using v8; to using Napi;
[/using (node|v8);/g, 'using Napi;'],
[/using namespace (node|Nan|v8);/g, 'using namespace Napi;'],
// delete using v8::Local;
[/using v8::Local;\n/g, ''],
// replace using v8::XXX; with using Napi::XXX
[/using v8::([A-Za-z]+);/g, 'using Napi::$1;']
];
const paths = listFiles(dir);
paths.forEach(function (dirEntry) {
const filename = dirEntry.split('\\').pop().split('/').pop();
// Check whether the file is a source file or a config file
// then execute function accordingly
const sourcePattern = /.+\.h|.+\.cc|.+\.cpp/;
if (sourcePattern.test(filename)) {
convertFile(dirEntry, SourceFileOperations);
} else if (ConfigFileOperations[filename] != null) {
convertFile(dirEntry, ConfigFileOperations[filename]);
}
});
function listFiles (dir, filelist) {
const files = fs.readdirSync(dir);
filelist = filelist || [];
files.forEach(function (file) {
if (file === 'node_modules') {
return;
}
if (fs.statSync(path.join(dir, file)).isDirectory()) {
filelist = listFiles(path.join(dir, file), filelist);
} else {
filelist.push(path.join(dir, file));
}
});
return filelist;
}
function convert (content, operations) {
for (let i = 0; i < operations.length; i++) {
const operation = operations[i];
content = content.replace(operation[0], operation[1]);
}
return content;
}
function convertFile (fileName, operations) {
fs.readFile(fileName, 'utf-8', function (err, file) {
if (err) throw err;
file = convert(file, operations);
fs.writeFile(fileName, file, function (err) {
if (err) throw err;
});
});
}
@@ -0,0 +1 @@
{"version":3,"names":["_index","require","getNameFromLiteralId","id","isNullLiteral","isRegExpLiteral","pattern","flags","isTemplateLiteral","quasis","map","quasi","value","raw","join","undefined","String","getObjectMemberKey","node","computed","isLiteral","key","getFunctionName","parent","name","originalNode","prefix","isObjectProperty","isObjectMethod","isClassMethod","kind","isVariableDeclarator","init","isAssignmentExpression","operator","right","left","isIdentifier","isPrivateName"],"sources":["../../src/retrievers/getFunctionName.ts"],"sourcesContent":["import type * as t from \"../index.ts\";\n\nimport {\n isAssignmentExpression,\n isClassMethod,\n isIdentifier,\n isLiteral,\n isNullLiteral,\n isObjectMethod,\n isObjectProperty,\n isPrivateName,\n isRegExpLiteral,\n isTemplateLiteral,\n isVariableDeclarator,\n} from \"../validators/generated/index.ts\";\n\nfunction getNameFromLiteralId(id: t.Literal): string {\n if (isNullLiteral(id)) {\n return \"null\";\n }\n\n if (isRegExpLiteral(id)) {\n return `/${id.pattern}/${id.flags}`;\n }\n\n if (isTemplateLiteral(id)) {\n return id.quasis.map(quasi => quasi.value.raw).join(\"\");\n }\n\n if (id.value !== undefined) {\n return String(id.value);\n }\n\n return null;\n}\n\nfunction getObjectMemberKey(\n node: t.ObjectProperty | t.ObjectMethod | t.ClassProperty | t.ClassMethod,\n): t.Expression | t.PrivateName {\n if (!node.computed || isLiteral(node.key)) {\n return node.key;\n }\n}\n\ntype GetFunctionNameResult = {\n name: string;\n originalNode: t.Node;\n} | null;\n\nexport default function getFunctionName(\n node: t.ObjectMethod | t.ClassMethod,\n): GetFunctionNameResult;\nexport default function getFunctionName(\n node: t.Function | t.Class,\n parent: t.Node,\n): GetFunctionNameResult;\nexport default function getFunctionName(\n node: t.Function | t.Class,\n parent?: t.Node,\n): GetFunctionNameResult {\n if (\"id\" in node && node.id) {\n return {\n name: node.id.name,\n originalNode: node.id,\n };\n }\n\n let prefix = \"\";\n\n let id;\n if (isObjectProperty(parent, { value: node })) {\n // { foo: () => {} };\n id = getObjectMemberKey(parent);\n } else if (isObjectMethod(node) || isClassMethod(node)) {\n // { foo() {} };\n id = getObjectMemberKey(node);\n if (node.kind === \"get\") prefix = \"get \";\n else if (node.kind === \"set\") prefix = \"set \";\n } else if (isVariableDeclarator(parent, { init: node })) {\n // let foo = function () {};\n id = parent.id;\n } else if (isAssignmentExpression(parent, { operator: \"=\", right: node })) {\n // foo = function () {};\n id = parent.left;\n }\n\n if (!id) return null;\n\n const name = isLiteral(id)\n ? getNameFromLiteralId(id)\n : isIdentifier(id)\n ? id.name\n : isPrivateName(id)\n ? id.id.name\n : null;\n if (name == null) return null;\n\n return { name: prefix + name, originalNode: id };\n}\n"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AAcA,SAASC,oBAAoBA,CAACC,EAAa,EAAU;EACnD,IAAI,IAAAC,oBAAa,EAACD,EAAE,CAAC,EAAE;IACrB,OAAO,MAAM;EACf;EAEA,IAAI,IAAAE,sBAAe,EAACF,EAAE,CAAC,EAAE;IACvB,OAAO,IAAIA,EAAE,CAACG,OAAO,IAAIH,EAAE,CAACI,KAAK,EAAE;EACrC;EAEA,IAAI,IAAAC,wBAAiB,EAACL,EAAE,CAAC,EAAE;IACzB,OAAOA,EAAE,CAACM,MAAM,CAACC,GAAG,CAACC,KAAK,IAAIA,KAAK,CAACC,KAAK,CAACC,GAAG,CAAC,CAACC,IAAI,CAAC,EAAE,CAAC;EACzD;EAEA,IAAIX,EAAE,CAACS,KAAK,KAAKG,SAAS,EAAE;IAC1B,OAAOC,MAAM,CAACb,EAAE,CAACS,KAAK,CAAC;EACzB;EAEA,OAAO,IAAI;AACb;AAEA,SAASK,kBAAkBA,CACzBC,IAAyE,EAC3C;EAC9B,IAAI,CAACA,IAAI,CAACC,QAAQ,IAAI,IAAAC,gBAAS,EAACF,IAAI,CAACG,GAAG,CAAC,EAAE;IACzC,OAAOH,IAAI,CAACG,GAAG;EACjB;AACF;AAce,SAASC,eAAeA,CACrCJ,IAA0B,EAC1BK,MAAe,EACQ;EACvB,IAAI,IAAI,IAAIL,IAAI,IAAIA,IAAI,CAACf,EAAE,EAAE;IAC3B,OAAO;MACLqB,IAAI,EAAEN,IAAI,CAACf,EAAE,CAACqB,IAAI;MAClBC,YAAY,EAAEP,IAAI,CAACf;IACrB,CAAC;EACH;EAEA,IAAIuB,MAAM,GAAG,EAAE;EAEf,IAAIvB,EAAE;EACN,IAAI,IAAAwB,uBAAgB,EAACJ,MAAM,EAAE;IAAEX,KAAK,EAAEM;EAAK,CAAC,CAAC,EAAE;IAE7Cf,EAAE,GAAGc,kBAAkB,CAACM,MAAM,CAAC;EACjC,CAAC,MAAM,IAAI,IAAAK,qBAAc,EAACV,IAAI,CAAC,IAAI,IAAAW,oBAAa,EAACX,IAAI,CAAC,EAAE;IAEtDf,EAAE,GAAGc,kBAAkB,CAACC,IAAI,CAAC;IAC7B,IAAIA,IAAI,CAACY,IAAI,KAAK,KAAK,EAAEJ,MAAM,GAAG,MAAM,CAAC,KACpC,IAAIR,IAAI,CAACY,IAAI,KAAK,KAAK,EAAEJ,MAAM,GAAG,MAAM;EAC/C,CAAC,MAAM,IAAI,IAAAK,2BAAoB,EAACR,MAAM,EAAE;IAAES,IAAI,EAAEd;EAAK,CAAC,CAAC,EAAE;IAEvDf,EAAE,GAAGoB,MAAM,CAACpB,EAAE;EAChB,CAAC,MAAM,IAAI,IAAA8B,6BAAsB,EAACV,MAAM,EAAE;IAAEW,QAAQ,EAAE,GAAG;IAAEC,KAAK,EAAEjB;EAAK,CAAC,CAAC,EAAE;IAEzEf,EAAE,GAAGoB,MAAM,CAACa,IAAI;EAClB;EAEA,IAAI,CAACjC,EAAE,EAAE,OAAO,IAAI;EAEpB,MAAMqB,IAAI,GAAG,IAAAJ,gBAAS,EAACjB,EAAE,CAAC,GACtBD,oBAAoB,CAACC,EAAE,CAAC,GACxB,IAAAkC,mBAAY,EAAClC,EAAE,CAAC,GACdA,EAAE,CAACqB,IAAI,GACP,IAAAc,oBAAa,EAACnC,EAAE,CAAC,GACfA,EAAE,CAACA,EAAE,CAACqB,IAAI,GACV,IAAI;EACZ,IAAIA,IAAI,IAAI,IAAI,EAAE,OAAO,IAAI;EAE7B,OAAO;IAAEA,IAAI,EAAEE,MAAM,GAAGF,IAAI;IAAEC,YAAY,EAAEtB;EAAG,CAAC;AAClD","ignoreList":[]}
@@ -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 SquareSlash = createLucideIcon("SquareSlash", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["line", { x1: "9", x2: "15", y1: "15", y2: "9", key: "1dfufj" }]
]);
export { SquareSlash as default };
//# sourceMappingURL=square-slash.js.map
@@ -0,0 +1,110 @@
# seroval
> Stringify JS values
[![NPM](https://img.shields.io/npm/v/seroval.svg)](https://www.npmjs.com/package/seroval) [![JavaScript Style Guide](https://badgen.net/badge/code%20style/airbnb/ff5a5f?icon=airbnb)](https://github.com/airbnb/javascript)
## Install
```bash
npm install --save seroval
```
```bash
yarn add seroval
```
```bash
pnpm add seroval
```
## Usage
```js
import { serialize } from 'seroval';
const object = {
number: [Math.random(), -0, NaN, Infinity, -Infinity],
string: ['hello world', '<script>Hello World</script>'],
boolean: [true, false],
null: null,
undefined: undefined,
bigint: 9007199254740991n,
array: [,,,], // holes
regexp: /[a-z0-9]+/i,
date: new Date(),
map: new Map([['hello', 'world']]),
set: new Set(['hello', 'world']),
};
// self cyclic references
// recursive objects
object.self = object;
// recursive arrays
object.array.push(object.array);
// recursive maps
object.map.set('self', object.map);
// recursive sets
object.set.add(object.set);
// mutual cyclic references
object.array.push(object.map);
object.map.set('mutual', object.set);
object.set.add(object.array);
const result = serialize(object);
console.log(result);
```
Output (as a string):
```js
((h,j,k,m,o)=>(o={number:[0.5337763749243287,-0,0/0,1/0,-1/0],string:["hello world","\x3Cscript>Hello World\x3C/script>"],boolean:[!0,!1],null:null,undefined:void 0,bigint:9007199254740991n,array:h=[,,,,k=(j=[],new Map([["hello","world"],["mutual",m=new Set(["hello","world"])]]))],regexp:/[a-z0-9]+/i,date:new Date("2023-12-07T17:28:57.909Z"),map:k,set:m},h[3]=h,k.set("self",k),m.add(m).add(h),o.self=o,o))()
// Formatted for readability
((h, j, k, m, o) => (
(o = {
number: [0.5337763749243287, -0, 0 / 0, 1 / 0, -1 / 0],
string: ["hello world", "\x3Cscript>Hello World\x3C/script>"],
boolean: [!0, !1],
null: null,
undefined: void 0,
bigint: 9007199254740991n,
array: (h = [
,
,
,
,
(k =
((j = []),
new Map([
["hello", "world"],
["mutual", (m = new Set(["hello", "world"]))],
]))),
]),
regexp: /[a-z0-9]+/i,
date: new Date("2023-12-07T17:28:57.909Z"),
map: k,
set: m,
}),
(h[3] = h),
k.set("self", k),
m.add(m).add(h),
(o.self = o),
o
))();
```
## Docs
- [Serialization](https://github.com/lxsmnsyc/seroval/blob/main/docs/serialization.md)
- [Compatibility](https://github.com/lxsmnsyc/seroval/blob/main/docs/compatibility.md)
- [Isomorphic References](https://github.com/lxsmnsyc/seroval/blob/main/docs/isomorphic-refs.md)
## Sponsors
![Sponsors](https://github.com/lxsmnsyc/sponsors/blob/main/sponsors.svg?raw=true)
## License
MIT © [lxsmnsyc](https://github.com/lxsmnsyc)
@@ -0,0 +1,10 @@
// Generated using scripts/write-encode-map.ts
function restoreDiff(arr) {
for (let i = 1; i < arr.length; i++) {
arr[i][0] += arr[i - 1][0] + 1;
}
return arr;
}
// prettier-ignore
export default new Map(/* #__PURE__ */ restoreDiff([[9, "&Tab;"], [0, "&NewLine;"], [22, "&excl;"], [0, "&quot;"], [0, "&num;"], [0, "&dollar;"], [0, "&percnt;"], [0, "&amp;"], [0, "&apos;"], [0, "&lpar;"], [0, "&rpar;"], [0, "&ast;"], [0, "&plus;"], [0, "&comma;"], [1, "&period;"], [0, "&sol;"], [10, "&colon;"], [0, "&semi;"], [0, { v: "&lt;", n: 8402, o: "&nvlt;" }], [0, { v: "&equals;", n: 8421, o: "&bne;" }], [0, { v: "&gt;", n: 8402, o: "&nvgt;" }], [0, "&quest;"], [0, "&commat;"], [26, "&lbrack;"], [0, "&bsol;"], [0, "&rbrack;"], [0, "&Hat;"], [0, "&lowbar;"], [0, "&DiacriticalGrave;"], [5, { n: 106, o: "&fjlig;" }], [20, "&lbrace;"], [0, "&verbar;"], [0, "&rbrace;"], [34, "&nbsp;"], [0, "&iexcl;"], [0, "&cent;"], [0, "&pound;"], [0, "&curren;"], [0, "&yen;"], [0, "&brvbar;"], [0, "&sect;"], [0, "&die;"], [0, "&copy;"], [0, "&ordf;"], [0, "&laquo;"], [0, "&not;"], [0, "&shy;"], [0, "&circledR;"], [0, "&macr;"], [0, "&deg;"], [0, "&PlusMinus;"], [0, "&sup2;"], [0, "&sup3;"], [0, "&acute;"], [0, "&micro;"], [0, "&para;"], [0, "&centerdot;"], [0, "&cedil;"], [0, "&sup1;"], [0, "&ordm;"], [0, "&raquo;"], [0, "&frac14;"], [0, "&frac12;"], [0, "&frac34;"], [0, "&iquest;"], [0, "&Agrave;"], [0, "&Aacute;"], [0, "&Acirc;"], [0, "&Atilde;"], [0, "&Auml;"], [0, "&angst;"], [0, "&AElig;"], [0, "&Ccedil;"], [0, "&Egrave;"], [0, "&Eacute;"], [0, "&Ecirc;"], [0, "&Euml;"], [0, "&Igrave;"], [0, "&Iacute;"], [0, "&Icirc;"], [0, "&Iuml;"], [0, "&ETH;"], [0, "&Ntilde;"], [0, "&Ograve;"], [0, "&Oacute;"], [0, "&Ocirc;"], [0, "&Otilde;"], [0, "&Ouml;"], [0, "&times;"], [0, "&Oslash;"], [0, "&Ugrave;"], [0, "&Uacute;"], [0, "&Ucirc;"], [0, "&Uuml;"], [0, "&Yacute;"], [0, "&THORN;"], [0, "&szlig;"], [0, "&agrave;"], [0, "&aacute;"], [0, "&acirc;"], [0, "&atilde;"], [0, "&auml;"], [0, "&aring;"], [0, "&aelig;"], [0, "&ccedil;"], [0, "&egrave;"], [0, "&eacute;"], [0, "&ecirc;"], [0, "&euml;"], [0, "&igrave;"], [0, "&iacute;"], [0, "&icirc;"], [0, "&iuml;"], [0, "&eth;"], [0, "&ntilde;"], [0, "&ograve;"], [0, "&oacute;"], [0, "&ocirc;"], [0, "&otilde;"], [0, "&ouml;"], [0, "&div;"], [0, "&oslash;"], [0, "&ugrave;"], [0, "&uacute;"], [0, "&ucirc;"], [0, "&uuml;"], [0, "&yacute;"], [0, "&thorn;"], [0, "&yuml;"], [0, "&Amacr;"], [0, "&amacr;"], [0, "&Abreve;"], [0, "&abreve;"], [0, "&Aogon;"], [0, "&aogon;"], [0, "&Cacute;"], [0, "&cacute;"], [0, "&Ccirc;"], [0, "&ccirc;"], [0, "&Cdot;"], [0, "&cdot;"], [0, "&Ccaron;"], [0, "&ccaron;"], [0, "&Dcaron;"], [0, "&dcaron;"], [0, "&Dstrok;"], [0, "&dstrok;"], [0, "&Emacr;"], [0, "&emacr;"], [2, "&Edot;"], [0, "&edot;"], [0, "&Eogon;"], [0, "&eogon;"], [0, "&Ecaron;"], [0, "&ecaron;"], [0, "&Gcirc;"], [0, "&gcirc;"], [0, "&Gbreve;"], [0, "&gbreve;"], [0, "&Gdot;"], [0, "&gdot;"], [0, "&Gcedil;"], [1, "&Hcirc;"], [0, "&hcirc;"], [0, "&Hstrok;"], [0, "&hstrok;"], [0, "&Itilde;"], [0, "&itilde;"], [0, "&Imacr;"], [0, "&imacr;"], [2, "&Iogon;"], [0, "&iogon;"], [0, "&Idot;"], [0, "&imath;"], [0, "&IJlig;"], [0, "&ijlig;"], [0, "&Jcirc;"], [0, "&jcirc;"], [0, "&Kcedil;"], [0, "&kcedil;"], [0, "&kgreen;"], [0, "&Lacute;"], [0, "&lacute;"], [0, "&Lcedil;"], [0, "&lcedil;"], [0, "&Lcaron;"], [0, "&lcaron;"], [0, "&Lmidot;"], [0, "&lmidot;"], [0, "&Lstrok;"], [0, "&lstrok;"], [0, "&Nacute;"], [0, "&nacute;"], [0, "&Ncedil;"], [0, "&ncedil;"], [0, "&Ncaron;"], [0, "&ncaron;"], [0, "&napos;"], [0, "&ENG;"], [0, "&eng;"], [0, "&Omacr;"], [0, "&omacr;"], [2, "&Odblac;"], [0, "&odblac;"], [0, "&OElig;"], [0, "&oelig;"], [0, "&Racute;"], [0, "&racute;"], [0, "&Rcedil;"], [0, "&rcedil;"], [0, "&Rcaron;"], [0, "&rcaron;"], [0, "&Sacute;"], [0, "&sacute;"], [0, "&Scirc;"], [0, "&scirc;"], [0, "&Scedil;"], [0, "&scedil;"], [0, "&Scaron;"], [0, "&scaron;"], [0, "&Tcedil;"], [0, "&tcedil;"], [0, "&Tcaron;"], [0, "&tcaron;"], [0, "&Tstrok;"], [0, "&tstrok;"], [0, "&Utilde;"], [0, "&utilde;"], [0, "&Umacr;"], [0, "&umacr;"], [0, "&Ubreve;"], [0, "&ubreve;"], [0, "&Uring;"], [0, "&uring;"], [0, "&Udblac;"], [0, "&udblac;"], [0, "&Uogon;"], [0, "&uogon;"], [0, "&Wcirc;"], [0, "&wcirc;"], [0, "&Ycirc;"], [0, "&ycirc;"], [0, "&Yuml;"], [0, "&Zacute;"], [0, "&zacute;"], [0, "&Zdot;"], [0, "&zdot;"], [0, "&Zcaron;"], [0, "&zcaron;"], [19, "&fnof;"], [34, "&imped;"], [63, "&gacute;"], [65, "&jmath;"], [142, "&circ;"], [0, "&caron;"], [16, "&breve;"], [0, "&DiacriticalDot;"], [0, "&ring;"], [0, "&ogon;"], [0, "&DiacriticalTilde;"], [0, "&dblac;"], [51, "&DownBreve;"], [127, "&Alpha;"], [0, "&Beta;"], [0, "&Gamma;"], [0, "&Delta;"], [0, "&Epsilon;"], [0, "&Zeta;"], [0, "&Eta;"], [0, "&Theta;"], [0, "&Iota;"], [0, "&Kappa;"], [0, "&Lambda;"], [0, "&Mu;"], [0, "&Nu;"], [0, "&Xi;"], [0, "&Omicron;"], [0, "&Pi;"], [0, "&Rho;"], [1, "&Sigma;"], [0, "&Tau;"], [0, "&Upsilon;"], [0, "&Phi;"], [0, "&Chi;"], [0, "&Psi;"], [0, "&ohm;"], [7, "&alpha;"], [0, "&beta;"], [0, "&gamma;"], [0, "&delta;"], [0, "&epsi;"], [0, "&zeta;"], [0, "&eta;"], [0, "&theta;"], [0, "&iota;"], [0, "&kappa;"], [0, "&lambda;"], [0, "&mu;"], [0, "&nu;Line truncated
//# sourceMappingURL=encode-html.js.map
@@ -0,0 +1,422 @@
_I'm transitioning to a full-time open source career. Your support would be greatly appreciated 🙌_
<a href="https://polar.sh/tinylibs/subscriptions"><picture><source media="(prefers-color-scheme: dark)" srcset="https://polar.sh/embed/tiers.svg?org=tinylibs&darkmode"><img alt="Subscription Tiers on Polar" src="https://polar.sh/embed/tiers.svg?org=tinylibs"></picture></a>
# Tinybench 🔎
[![CI](https://github.com/tinylibs/tinybench/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/tinylibs/tinybench/actions/workflows/test.yml)
[![NPM version](https://img.shields.io/npm/v/tinybench.svg?style=flat)](https://www.npmjs.com/package/tinybench)
Benchmark your code easily with Tinybench, a simple, tiny and light-weight `7KB` (`2KB` minified and gzipped)
benchmarking library!
You can run your benchmarks in multiple JavaScript runtimes, Tinybench is
completely based on the Web APIs with proper timing using `process.hrtime` or
`performance.now`.
- Accurate and precise timing based on the environment
- `Event` and `EventTarget` compatible events
- Statistically analyzed values
- Calculated Percentiles
- Fully detailed results
- No dependencies
_In case you need more tiny libraries like tinypool or tinyspy, please consider submitting an [RFC](https://github.com/tinylibs/rfcs)_
## Installing
```bash
$ npm install -D tinybench
```
## Usage
You can start benchmarking by instantiating the `Bench` class and adding
benchmark tasks to it.
```js
import { Bench } from 'tinybench';
const bench = new Bench({ time: 100 });
bench
.add('faster task', () => {
console.log('I am faster')
})
.add('slower task', async () => {
await new Promise(r => setTimeout(r, 1)) // we wait 1ms :)
console.log('I am slower')
})
.todo('unimplemented bench')
await bench.warmup(); // make results more reliable, ref: https://github.com/tinylibs/tinybench/pull/50
await bench.run();
console.table(bench.table());
// Output:
// ┌─────────┬───────────────┬──────────┬────────────────────┬───────────┬─────────┐
// │ (index) │ Task Name │ ops/sec │ Average Time (ns) │ Margin │ Samples │
// ├─────────┼───────────────┼──────────┼────────────────────┼───────────┼─────────┤
// │ 0 │ 'faster task' │ '41,621' │ 24025.791819761525 │ '±20.50%' │ 4257 │
// │ 1 │ 'slower task' │ '828' │ 1207382.7838323202 │ '±7.07%' │ 83 │
// └─────────┴───────────────┴──────────┴────────────────────┴───────────┴─────────┘
console.table(
bench.table((task) => ({'Task name': task.name}))
);
// Output:
// ┌─────────┬───────────────────────┐
// │ (index) │ Task name │
// ├─────────┼───────────────────────┤
// │ 0 │ 'unimplemented bench' │
// └─────────┴───────────────────────┘
```
The `add` method accepts a task name and a task function, so it can benchmark
it! This method returns a reference to the Bench instance, so it's possible to
use it to create an another task for that instance.
Note that the task name should always be unique in an instance, because Tinybench stores the tasks based
on their names in a `Map`.
Also note that `tinybench` does not log any result by default. You can extract the relevant stats
from `bench.tasks` or any other API after running the benchmark, and process them however you want.
## Docs
### `Bench`
The Benchmark instance for keeping track of the benchmark tasks and controlling
them.
Options:
```ts
export type Options = {
/**
* time needed for running a benchmark task (milliseconds) @default 500
*/
time?: number;
/**
* number of times that a task should run if even the time option is finished @default 10
*/
iterations?: number;
/**
* function to get the current timestamp in milliseconds
*/
now?: () => number;
/**
* An AbortSignal for aborting the benchmark
*/
signal?: AbortSignal;
/**
* Throw if a task fails (events will not work if true)
*/
throws?: boolean;
/**
* warmup time (milliseconds) @default 100ms
*/
warmupTime?: number;
/**
* warmup iterations @default 5
*/
warmupIterations?: number;
/**
* setup function to run before each benchmark task (cycle)
*/
setup?: Hook;
/**
* teardown function to run after each benchmark task (cycle)
*/
teardown?: Hook;
};
export type Hook = (task: Task, mode: "warmup" | "run") => void | Promise<void>;
```
- `async run()`: run the added tasks that were registered using the `add` method
- `async runConcurrently(threshold: number = Infinity, mode: "bench" | "task" = "bench")`: similar to the `run` method but runs concurrently rather than sequentially. See the [Concurrency](#Concurrency) section.
- `async warmup()`: warm up the benchmark tasks
- `async warmupConcurrently(threshold: number = Infinity, mode: "bench" | "task" = "bench")`: warm up the benchmark tasks concurrently
- `reset()`: reset each task and remove its result
- `add(name: string, fn: Fn, opts?: FnOpts)`: add a benchmark task to the task map
- `Fn`: `() => any | Promise<any>`
- `FnOpts`: `{}`: a set of optional functions run during the benchmark lifecycle that can be used to set up or tear down test data or fixtures without affecting the timing of each task
- `beforeAll?: () => any | Promise<any>`: invoked once before iterations of `fn` begin
- `beforeEach?: () => any | Promise<any>`: invoked before each time `fn` is executed
- `afterEach?: () => any | Promise<any>`: invoked after each time `fn` is executed
- `afterAll?: () => any | Promise<any>`: invoked once after all iterations of `fn` have finished
- `remove(name: string)`: remove a benchmark task from the task map
- `table()`: table of the tasks results
- `get results(): (TaskResult | undefined)[]`: (getter) tasks results as an array
- `get tasks(): Task[]`: (getter) tasks as an array
- `getTask(name: string): Task | undefined`: get a task based on the name
- `todo(name: string, fn?: Fn, opts: FnOptions)`: add a benchmark todo to the todo map
- `get todos(): Task[]`: (getter) tasks todos as an array
### `Task`
A class that represents each benchmark task in Tinybench. It keeps track of the
results, name, Bench instance, the task function and the number of times the task
function has been executed.
- `constructor(bench: Bench, name: string, fn: Fn, opts: FnOptions = {})`
- `bench: Bench`
- `name: string`: task name
- `fn: Fn`: the task function
- `opts: FnOptions`: Task options
- `runs: number`: the number of times the task function has been executed
- `result?: TaskResult`: the result object
- `async run()`: run the current task and write the results in `Task.result` object
- `async warmup()`: warm up the current task
- `setResult(result: Partial<TaskResult>)`: change the result object values
- `reset()`: reset the task to make the `Task.runs` a zero-value and remove the `Task.result` object
```ts
export interface FnOptions {
/**
* An optional function that is run before iterations of this task begin
*/
beforeAll?: (this: Task) => void | Promise<void>;
/**
* An optional function that is run before each iteration of this task
*/
beforeEach?: (this: Task) => void | Promise<void>;
/**
* An optional function that is run after each iteration of this task
*/
afterEach?: (this: Task) => void | Promise<void>;
/**
* An optional function that is run after all iterations of this task end
*/
afterAll?: (this: Task) => void | Promise<void>;
}
```
## `TaskResult`
the benchmark task result object.
```ts
export type TaskResult = {
/*
* the last error that was thrown while running the task
*/
error?: unknown;
/**
* The amount of time in milliseconds to run the benchmark task (cycle).
*/
totalTime: number;
/**
* the minimum value in the samples
*/
min: number;
/**
* the maximum value in the samples
*/
max: number;
/**
* the number of operations per second
*/
hz: number;
/**
* how long each operation takes (ms)
*/
period: number;
/**
* task samples of each task iteration time (ms)
*/
samples: number[];
/**
* samples mean/average (estimate of the population mean)
*/
mean: number;
/**
* samples variance (estimate of the population variance)
*/
variance: number;
/**
* samples standard deviation (estimate of the population standard deviation)
*/
sd: number;
/**
* standard error of the mean (a.k.a. the standard deviation of the sampling distribution of the sample mean)
*/
sem: number;
/**
* degrees of freedom
*/
df: number;
/**
* critical value of the samples
*/
critical: number;
/**
* margin of error
*/
moe: number;
/**
* relative margin of error
*/
rme: number;
/**
* p75 percentile
*/
p75: number;
/**
* p99 percentile
*/
p99: number;
/**
* p995 percentile
*/
p995: number;
/**
* p999 percentile
*/
p999: number;
};
```
### `Events`
Both the `Task` and `Bench` objects extend the `EventTarget` object, so you can attach listeners to different types of events
in each class instance using the universal `addEventListener` and
`removeEventListener`.
```ts
/**
* Bench events
*/
export type BenchEvents =
| "abort" // when a signal aborts
| "complete" // when running a benchmark finishes
| "error" // when the benchmark task throws
| "reset" // when the reset function gets called
| "start" // when running the benchmarks gets started
| "warmup" // when the benchmarks start getting warmed up (before start)
| "cycle" // when running each benchmark task gets done (cycle)
| "add" // when a Task gets added to the Bench
| "remove" // when a Task gets removed of the Bench
| "todo"; // when a todo Task gets added to the Bench
/**
* task events
*/
export type TaskEvents =
| "abort"
| "complete"
| "error"
| "reset"
| "start"
| "warmup"
| "cycle";
```
For instance:
```js
// runs on each benchmark task's cycle
bench.addEventListener("cycle", (e) => {
const task = e.task!;
});
// runs only on this benchmark task's cycle
task.addEventListener("cycle", (e) => {
const task = e.task!;
});
```
### `BenchEvent`
```ts
export type BenchEvent = Event & {
task: Task | null;
};
```
### `process.hrtime`
if you want more accurate results for nodejs with `process.hrtime`, then import
the `hrtimeNow` function from the library and pass it to the `Bench` options.
```ts
import { hrtimeNow } from 'tinybench';
```
It may make your benchmarks slower, check #42.
## Concurrency
- When `mode` is set to `null` (default), concurrency is disabled.
- When `mode` is set to 'task', each task's iterations (calls of a task function) run concurrently.
- When `mode` is set to 'bench', different tasks within the bench run concurrently. Concurrent cycles.
```ts
// options way (recommended)
bench.threshold = 10 // The maximum number of concurrent tasks to run. Defaults to Infinity.
bench.concurrency = "task" // The concurrency mode to determine how tasks are run.
// await bench.warmup()
await bench.run()
// standalone method way
// await bench.warmupConcurrently(10, "task")
await bench.runConcurrently(10, "task") // with runConcurrently, mode is set to 'bench' by default
```
## Prior art
- [Benchmark.js](https://github.com/bestiejs/benchmark.js)
- [Mitata](https://github.com/evanwashere/mitata/)
- [Bema](https://github.com/prisma-labs/bema)
## Authors
| <a href="https://github.com/Aslemammad"> <img width='150' src="https://avatars.githubusercontent.com/u/37929992?v=4" /><br> Mohammad Bagher </a> |
| ------------------------------------------------------------------------------------------------------------------------------------------------ |
## Credits
| <a href="https://github.com/uzlopak"> <img width='150' src="https://avatars.githubusercontent.com/u/5059100?v=4" /><br> Uzlopak </a> | <a href="https://github.com/poyoho"> <img width='150' src="https://avatars.githubusercontent.com/u/36070057?v=4" /><br> poyoho </a> |
| ------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
## Contributing
Feel free to create issues/discussions and then PRs for the project!
## Sponsors
Your sponsorship can make a huge difference in continuing our work in open source!
<p align="center">
<a href="https://cdn.jsdelivr.net/gh/aslemammad/static/sponsors.svg">
<img src='https://cdn.jsdelivr.net/gh/aslemammad/static/sponsors.svg'/>
</a>
</p>
@@ -0,0 +1,51 @@
{
"name": "type-is",
"description": "Infer the content-type of a request.",
"version": "2.1.0",
"contributors": [
"Douglas Christopher Wilson <doug@somethingdoug.com>",
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
],
"license": "MIT",
"repository": "jshttp/type-is",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
},
"dependencies": {
"content-type": "^2.0.0",
"media-typer": "^1.1.0",
"mime-types": "^3.0.0"
},
"devDependencies": {
"eslint": "7.32.0",
"eslint-config-standard": "14.1.1",
"eslint-plugin-import": "2.31.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.2.2",
"nyc": "15.1.0"
},
"engines": {
"node": ">= 18"
},
"files": [
"LICENSE",
"HISTORY.md",
"index.js"
],
"scripts": {
"lint": "eslint .",
"test": "mocha --reporter spec --check-leaks --bail test/",
"test:debug": "mocha --reporter spec --check-leaks --inspect --inspect-brk test/",
"test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test"
},
"keywords": [
"content",
"type",
"checking"
]
}
@@ -0,0 +1,139 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.find = find;
exports.findParent = findParent;
exports.getAncestry = getAncestry;
exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom;
exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom;
exports.getFunctionParent = getFunctionParent;
exports.getStatementParent = getStatementParent;
exports.inType = inType;
exports.isAncestor = isAncestor;
exports.isDescendant = isDescendant;
var _t = require("@babel/types");
const {
VISITOR_KEYS
} = _t;
function findParent(callback) {
let path = this;
while (path = path.parentPath) {
if (callback(path)) return path;
}
return null;
}
function find(callback) {
let path = this;
do {
if (callback(path)) return path;
} while (path = path.parentPath);
return null;
}
function getFunctionParent() {
return this.findParent(p => p.isFunction());
}
function getStatementParent() {
let path = this;
do {
if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
break;
} else {
path = path.parentPath;
}
} while (path);
if (path && (path.isProgram() || path.isFile())) {
throw new Error("File/Program node, we can't possibly find a statement parent to this");
}
return path;
}
function getEarliestCommonAncestorFrom(paths) {
return this.getDeepestCommonAncestorFrom(paths, function (deepest, i, ancestries) {
let earliest;
const keys = VISITOR_KEYS[deepest.type];
for (const ancestry of ancestries) {
const path = ancestry[i + 1];
if (!earliest) {
earliest = path;
continue;
}
if (path.listKey && earliest.listKey === path.listKey) {
if (path.key < earliest.key) {
earliest = path;
continue;
}
}
const earliestKeyIndex = keys.indexOf(earliest.parentKey);
const currentKeyIndex = keys.indexOf(path.parentKey);
if (earliestKeyIndex > currentKeyIndex) {
earliest = path;
}
}
return earliest;
});
}
function getDeepestCommonAncestorFrom(paths, filter) {
if (!paths.length) {
return this;
}
if (paths.length === 1) {
return paths[0];
}
let minDepth = Infinity;
let lastCommonIndex, lastCommon;
const ancestries = paths.map(path => {
const ancestry = [];
do {
ancestry.unshift(path);
} while ((path = path.parentPath) && path !== this);
if (ancestry.length < minDepth) {
minDepth = ancestry.length;
}
return ancestry;
});
const first = ancestries[0];
depthLoop: for (let i = 0; i < minDepth; i++) {
const shouldMatch = first[i];
for (const ancestry of ancestries) {
if (ancestry[i] !== shouldMatch) {
break depthLoop;
}
}
lastCommonIndex = i;
lastCommon = shouldMatch;
}
if (lastCommon) {
if (filter) {
return filter(lastCommon, lastCommonIndex, ancestries);
} else {
return lastCommon;
}
} else {
throw new Error("Couldn't find intersection");
}
}
function getAncestry() {
let path = this;
const paths = [];
do {
paths.push(path);
} while (path = path.parentPath);
return paths;
}
function isAncestor(maybeDescendant) {
return maybeDescendant.isDescendant(this);
}
function isDescendant(maybeAncestor) {
return !!this.findParent(parent => parent === maybeAncestor);
}
function inType(...candidateTypes) {
let path = this;
while (path) {
if (candidateTypes.includes(path.node.type)) return true;
path = path.parentPath;
}
return false;
}
//# sourceMappingURL=ancestry.js.map
@@ -0,0 +1 @@
{"version":3,"file":"defaultStreamHandler.cjs","names":[],"sources":["../../../src/ssr/defaultStreamHandler.tsx"],"sourcesContent":["import { defineHandlerCallback } from '@tanstack/router-core/ssr/server'\nimport { RouterServer } from './RouterServer'\nimport { renderRouterToStream } from './renderRouterToStream'\n\nexport const defaultStreamHandler = defineHandlerCallback(\n ({ request, router, responseHeaders }) =>\n renderRouterToStream({\n request,\n router,\n responseHeaders,\n children: <RouterServer router={router} />,\n }),\n)\n"],"mappings":";;;;;AAIA,IAAa,wBAAA,+CAAA,wBACV,EAAE,SAAS,QAAQ,sBAClB,6BAAA,qBAAqB;CACnB;CACA;CACA;CACA,UAAU,iBAAA,GAAA,kBAAA,KAAC,qBAAA,cAAD,EAAsB,QAAU,CAAA;CAC3C,CAAC,CACL"}
@@ -0,0 +1 @@
{"version":3,"file":"use-spring.mjs","sources":["../../../src/value/use-spring.ts"],"sourcesContent":["\"use client\"\n\nimport { FollowValueOptions, MotionValue, SpringOptions } from \"motion-dom\"\nimport { useFollowValue } from \"./use-follow-value\"\n\ntype UseSpringOptions = SpringOptions &\n Pick<FollowValueOptions, \"skipInitialAnimation\">\n\n/**\n * Creates a `MotionValue` that, when `set`, will use a spring animation to animate to its new state.\n *\n * It can either work as a stand-alone `MotionValue` by initialising it with a value, or as a subscriber\n * to another `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useSpring(0, { stiffness: 300 })\n * const y = useSpring(x, { damping: 10 })\n * ```\n *\n * @param inputValue - `MotionValue` or number. If provided a `MotionValue`, when the input `MotionValue` changes, the created `MotionValue` will spring towards that value.\n * @param springConfig - Configuration options for the spring.\n * @returns `MotionValue`\n *\n * @public\n */\nexport function useSpring(\n source: MotionValue<string>,\n options?: UseSpringOptions\n): MotionValue<string>\nexport function useSpring(\n source: string,\n options?: UseSpringOptions\n): MotionValue<string>\nexport function useSpring(\n source: MotionValue<number>,\n options?: UseSpringOptions\n): MotionValue<number>\nexport function useSpring(\n source: number,\n options?: UseSpringOptions\n): MotionValue<number>\nexport function useSpring(\n source: MotionValue<string> | MotionValue<number> | string | number,\n options: UseSpringOptions = {}\n): MotionValue<string> | MotionValue<number> {\n return useFollowValue(source as any, { type: \"spring\", ...options })\n}\n"],"names":[],"mappings":";;;;AA+CI;AACJ;;"}
@@ -0,0 +1,141 @@
#ifndef NODE_SQLITE3_SRC_FUNCTION_H
#define NODE_SQLITE3_SRC_FUNCTION_H
// User-defined functions, aggregates, window functions and collations
// (Deliverable 06). sqlite invokes these callbacks on whatever thread is
// executing the statement — a libuv worker here — so each invocation makes
// a blocking round trip to the JS thread through a ThreadSafeFunction:
// the worker marshals the arguments into Cells and waits on a condition
// variable; the JS thread converts, runs the user's JS, marshals the
// result back and signals.
//
// The deadlock this creates on the synchronous API (the JS thread is the
// one blocked inside sqlite) is refused with an explicit error, not
// deadlocked and not silently downgraded to inline execution — see
// Database::sync_sqlite_depth and the JsScalarFunc refusal path.
#include <string>
#include <vector>
#include <sqlite3.h>
#include <napi.h>
#include <uv.h>
#include "convert.h"
#include "database.h"
namespace node_sqlite3 {
// One registered JavaScript callback: a scalar function, an
// aggregate/window function (start/step/result/inverse), or a collation
// comparator. Owned by Database::js_functions / js_collations.
struct JsFunc {
Database* db;
std::string name;
int nArg;
bool is_collation = false;
// Scalar / collation implementation.
Napi::FunctionReference fn;
// Aggregate implementation. A non-empty `inverse` makes it a window
// function (registered via sqlite3_create_window_function).
Napi::FunctionReference start;
Napi::FunctionReference step;
Napi::FunctionReference result;
Napi::FunctionReference inverse;
// Set when the registration is replaced or removed. The JS-thread
// halves check it before touching the references; calls already in
// flight see it and fail with an error instead of using freed state.
// Exclusive scheduling makes in-flight calls impossible at removal
// time; this covers calls queued behind the round trip of another.
bool dead = false;
JsFunc(Database* db_, std::string name_, int nArg_) :
db(db_), name(std::move(name_)), nArg(nArg_) {
db->Ref();
}
};
// Per-aggregate-invocation state, pointed to by sqlite's aggregate
// context. Created, mutated and freed on the JS thread only (inside the
// round trips); the worker only carries the slot pointer across.
struct AggState {
Napi::Reference<Napi::Value> acc;
bool has_acc = false;
bool failed = false;
};
// One round trip. Allocated on the worker, handed to the JS thread via
// the channel, and freed by whichever side the `fire_and_forget` flag
// names: the worker for waited calls (it resumes after the signal), the
// JS thread for fire-and-forget cleanups (the worker never touches the
// call again after a successful enqueue).
struct FuncCall {
enum Kind {
kScalar, // fn(...args) -> result
kStep, // acc = step(acc, ...args)
kFinal, // result = result(acc); aggregate over, state freed
kValue, // result = result(acc); window frame value, state kept
kInverse, // acc = inverse(acc, ...args)
kCollation, // cmp(a, b) -> sign
kProgress, // progress() -> truthy? abort the statement
kAggCleanup // free the aggregate state without touching JS state
};
JsFunc* fn;
Database* db;
Kind kind;
std::vector<Cell> args;
Cell result;
// Aggregate-context slot for the step/final/value/inverse kinds; NULL
// for scalars, collations and cleanups (cleanups carry the state
// directly in `agg`).
AggState** agg_slot = nullptr;
AggState* agg = nullptr;
bool errored = false;
std::string error;
bool fire_and_forget = false;
uv_mutex_t mutex;
uv_cond_t cond;
bool done = false;
FuncCall(JsFunc* fn_, Kind kind_) : fn(fn_), db(fn_->db), kind(kind_) {
uv_mutex_init(&mutex);
uv_cond_init(&cond);
}
};
// Registration batons. The JS layer does option parsing; these carry the
// normalized result to the exclusive handler.
struct FunctionBaton : Database::Baton {
std::string name;
int nArg;
int flags;
bool is_collation = false;
Napi::FunctionReference fn; // scalar / collation
// Aggregate halves:
Napi::FunctionReference start;
Napi::FunctionReference step;
Napi::FunctionReference result;
Napi::FunctionReference inverse;
FunctionBaton(Database* db_, Napi::Function cb_, const char* name_,
int nArg_, int flags_) :
Baton(db_, cb_), name(name_), nArg(nArg_), flags(flags_) {}
virtual ~FunctionBaton() override = default;
};
struct RemoveFunctionBaton : Database::Baton {
std::string name;
bool collation = false;
RemoveFunctionBaton(Database* db_, Napi::Function cb_, const char* name_) :
Baton(db_, cb_), name(name_) {}
virtual ~RemoveFunctionBaton() override = default;
};
} // namespace node_sqlite3
#endif
@@ -0,0 +1,6 @@
import decompress from '@zxcvbn-ts/dictionary-compression/decompress';
var wikipedia = decompress("AtheAofAandAinAwasAisAforAasAonAwithAbyAheAatAfromAhisAanAwereAareAwhichAdocAhttpsAalsoAorAhasCdAfirstAoneAtheirAitsAafterAnewAwhoAtheyBwoAherAsheAbeenAotherAwhenAtimeAduringAintoAschoolAmoreBayAyearsAoverBnlyAyearAmostAwouldCrldAcityAsomeAwhereAbetweenAlaterAthreeAstateBuchAthenAnationalAusedAmadeAknownAunderAmanyAuniversityDtedAwhileApartAseasonAteamBheseAamericanAthanAfilmAsecondAbornAsouthAbecameAstatesAwarAthroughAbeingAincludingAbothBeforeAnorthAhighBoweverApeopleAfamilyAearlyAhistoryAalbumBreaAseriesAagainstAuntilAsinceAdistrictAcountyAnameAworkAlifeAgroupAmusicAfollowingAnumberAcompanyAseveralAfourAcalledAplayedAreleasedAcareerAleagueAgameBovernmentAhouseAeachAbasedAdayAsameAwonAuseAstationAclubAinternationalAtownAlocatedApopulationAgeneralAcollegeAeastAfoundAageAmarchAendAseptemberAbeganAhomeApublicAchurchAlineAjuneAriverAmemberAsystemAplaceAcenturyAbandAjulyAyorkAjanuaryAoctoberAsongAaugustAbestAformerAbritishApartyAnamedAheldAvillageAshowAlocalAnovemberAtookAserviceAdecemberAbuiltAanotherAmajorAwithinAalongAmembersAfiveAsingleAdueAalthoughAsmallAoldAleftAfinalAlargeAincludeAbuildingAservedApresidentAreceivedAgamesAdeathAfebruaryAmainAthirdAsetAchildrenAownBrderAspeciesAparkAlawAairApublishedAroadAdiedAbookAmenAwomenAarmyAoftenAaccordingAeducationAcentralBountryAdivisionAenglishAtopAincludedAdevelopmentAfrenchAcommunityAamongAwaterAplayAsideAlistAtimesAnearAlateAformAoriginalAdifferentAcenterApowerAledAstudentsAgermanAmovedAcourtAsixAlandAcouncilAislandAu.s.ArecordAmillionAresearchAartAestablishedAawardAstreetAmilitaryAtelevisionAgivenAregionAsupportAwesternAproductionAnonApoliticalCintAcupAperiodAbusinessAtitleAstartedAvariousAelectionAusingAenglandAroleAproducedAbecomeAprogramAworksAfieldAtotalAofficeAclassAwrittenAassociationAradioAunionAlevelAchampionshipAdirectorAfewBorceAcreatedAdepartmentAfoundedAservicesAmarriedAthoughAperAn'tAsiteAopenAactAshortBocietyAversionAroyalApresentAnorthernAworkedAprofessionalAfullAreturnedAjoinedAstoryAfranceAeuropeanAcurrentlyAlanguageAsocialAcaliforniaAindiaAdesignAst.AfurtherAroundAaustraliaAwroteAsanAprojectAcontrolAsouthernArailwayAboardApopularAcontinuedAfreeAbattleAconsideredAvideoAcommonApositionAlivingAhalfAplayingArecordedCdApostAdescribedAaverageArecordsAspecialAmodernAappearedBnnouncedBreasArockBeleaseAelectedAothersAexampleAtermAopenedAsimilarAformedArouteAcensusBurrentAschoolsAoriginallyAlakeAdevelopedAraceAhimselfAforcesAadditionAinformationAuponAprovinceAmatchAeventAsongsAresultAeventsAwinAeasternAtrackAleadAteamsAscienceAhumanAconstructionAministerAgermanyAawardsBvailableAthroughoutBrainingAstyleAbodyAmuseumAaustralianAhealthAsevenBignedAchiefAeventuallyAappointedAseaAcentreAdebutAtourApointsAmediaAlightArangeAcharacterAacrossAfeaturesBamiliesAlargestAindianAnetworkAlessAperformanceBlayersAreferAeuropeAsoldAfestivalAusuallyAtakenAdespiteDignedAcommitteeAprocessAreturnAofficialAepisodeAinstituteAstageAfollowedAperformedAjapaneseApersonalAthusAartsAspaceAlowAmonthsAincludesAchinaAstudyAmiddleBagazineAleadingAjapanAgroupsAaircraftAfeaturedCderalAcivilArightsAmodelAcoachBanadianAbooksAremainedAeightAtypeAindependentAcompletedBapitalAacademyAinsteadAkingdomAorganizationAcountriesAstudiesAcompetitionAsportsBizeAaboveAsectionAfinishedAgoldAinvolvedAreportedAmanagementAsystemsAindustryAdirectedAmarketAfourthAmovementAtechnologyAbankAgroundAcampaignAbaseAlowerAsentAratherAaddedAprovidedAcoastAgrandAhistoricAvalleyAconferenceAbridgeAwinningAapproximatelyAfilmsAchineseAawardedAdegreeArussianAshowsAnativeAfemaleAreplacedAmunicipalityAsquareBtudioAmedicalAdataAafricanAsuccessfulAmidAbayAattackApreviousAoperationsAspanishAtheatreAstudentArepublicAbeginningAprovideAshipAprimaryAownedAwritingAtournamentAcultureAintroducedAtexasArelatedAnaturalApartsAgovernorAreachedAirelandAunitsAseniorAdecidedAitalianAwhoseAhigherAafricaAstandardAincomeAprofessorBlacedAregionalAlosAbuildingsAchampionshipsAactiveAnovelAenergyAgenerallyAinterestAviaAeconomicApreviouslyAstatedAitselfAchannelAbelowAoperationAleaderAtraditionalEeAstructureAlimitedArunsApriorAregularAfamousAsaintAnavyAforeignAlistedAartistAcatholicAairportAresultsAparliamentAcollectionAunitAofficerAgoalAattendedAcommandAstaffAcommissionAlivedBocationAplaysAcommercialAplacesAfoundationAsignificantAolderAmedalAselfBcoredAcompaniesAhighwayAactivitiesAprogramsAwideAmusicalAnotableAlibraryAnumerousAparisAtowardsAindividualAallowedAplantBropertyAannualAcontractAwhomAhighestAinitiallyArequiredAearlierAassemblyBrtistsAruralAseatApracticeAdefeatedAendedAsovietAlengthAspentAmanagerApressAassociatedButhorAissuesAadditionalAcharactersAzealandApolicyAengineAtownshipAnotedAhistoricalAcompleteAfinancialAreligiousAmissionAcontainsAnineArecentCpresentedApennsylvaniaAadministrationAopeningAsecretaryAlinesAreportAexecutiveAyouthAclosedAtheoryAwriterAitalyAangelesBppearanceAfeatureAqueenAlaunchedBegalAtermsAenteredAissueAeditionAsingerAgreekAmajorityAbackgroundAsourceAantiAculturalBomplexBhangesArecordingAsLine truncated
export { wikipedia as default };
//# sourceMappingURL=wikipedia.json.mjs.map
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_V","2":"_b"},B:{"1":"_J"},C:{"1":"_S"},D:{"1":"_Q"},E:{"1":"_DB","16":"_e"},F:{"1":"_0F","16":"_1G"},G:{"1":"_eB","16":"lC"},H:{"2":"1D"},I:{"1":"_P"},J:{"1":"_B"},K:{"1":"_N"},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:"Selection controls for input & textarea",D:true};
@@ -0,0 +1,3 @@
declare var implementation: string;
export = implementation;
@@ -0,0 +1,23 @@
//#region src/utils/color.d.ts
/**
* @module
* Color utility.
*/
/**
* Get whether color change on terminal is enabled or disabled.
* If `NO_COLOR` environment variable is set, this function returns `false`.
* Unlike getColorEnabledAsync(), this cannot check Cloudflare environment variables.
* @see {@link https://no-color.org/}
*
* @returns {boolean}
*/
export declare function getColorEnabled(): boolean;
/**
* Get whether color change on terminal is enabled or disabled.
* If `NO_COLOR` environment variable is set, this function returns `false`.
* @see {@link https://no-color.org/}
*
* @returns {boolean}
*/
export declare function getColorEnabledAsync(): Promise<boolean>;
//#endregion
@@ -0,0 +1,39 @@
"use strict";
/**
* Experimental task features for MCP SDK.
* WARNING: These APIs are experimental and may change without notice.
*
* @experimental
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.toArrayAsync = exports.takeResult = void 0;
// Re-export spec types for convenience
__exportStar(require("./types.js"), exports);
// SDK implementation interfaces
__exportStar(require("./interfaces.js"), exports);
// Assertion helpers
__exportStar(require("./helpers.js"), exports);
// Wrapper classes
__exportStar(require("./client.js"), exports);
__exportStar(require("./server.js"), exports);
__exportStar(require("./mcp-server.js"), exports);
// Store implementations
__exportStar(require("./stores/in-memory.js"), exports);
var responseMessage_js_1 = require("../../shared/responseMessage.js");
Object.defineProperty(exports, "takeResult", { enumerable: true, get: function () { return responseMessage_js_1.takeResult; } });
Object.defineProperty(exports, "toArrayAsync", { enumerable: true, get: function () { return responseMessage_js_1.toArrayAsync; } });
//# sourceMappingURL=index.js.map
@@ -0,0 +1,118 @@
import type {
CodeKeywordDefinition,
AddedKeywordDefinition,
ErrorObject,
KeywordErrorDefinition,
AnySchema,
} from "../../types"
import {allSchemaProperties, usePattern, isOwnProperty} from "../code"
import {_, nil, or, not, Code, Name} from "../../compile/codegen"
import N from "../../compile/names"
import type {SubschemaArgs} from "../../compile/validate/subschema"
import {alwaysValidSchema, schemaRefOrVal, Type} from "../../compile/util"
export type AdditionalPropertiesError = ErrorObject<
"additionalProperties",
{additionalProperty: string},
AnySchema
>
const error: KeywordErrorDefinition = {
message: "must NOT have additional properties",
params: ({params}) => _`{additionalProperty: ${params.additionalProperty}}`,
}
const def: CodeKeywordDefinition & AddedKeywordDefinition = {
keyword: "additionalProperties",
type: ["object"],
schemaType: ["boolean", "object"],
allowUndefined: true,
trackErrors: true,
error,
code(cxt) {
const {gen, schema, parentSchema, data, errsCount, it} = cxt
/* istanbul ignore if */
if (!errsCount) throw new Error("ajv implementation error")
const {allErrors, opts} = it
it.props = true
if (opts.removeAdditional !== "all" && alwaysValidSchema(it, schema)) return
const props = allSchemaProperties(parentSchema.properties)
const patProps = allSchemaProperties(parentSchema.patternProperties)
checkAdditionalProperties()
cxt.ok(_`${errsCount} === ${N.errors}`)
function checkAdditionalProperties(): void {
gen.forIn("key", data, (key: Name) => {
if (!props.length && !patProps.length) additionalPropertyCode(key)
else gen.if(isAdditional(key), () => additionalPropertyCode(key))
})
}
function isAdditional(key: Name): Code {
let definedProp: Code
if (props.length > 8) {
// TODO maybe an option instead of hard-coded 8?
const propsSchema = schemaRefOrVal(it, parentSchema.properties, "properties")
definedProp = isOwnProperty(gen, propsSchema as Code, key)
} else if (props.length) {
definedProp = or(...props.map((p) => _`${key} === ${p}`))
} else {
definedProp = nil
}
if (patProps.length) {
definedProp = or(definedProp, ...patProps.map((p) => _`${usePattern(cxt, p)}.test(${key})`))
}
return not(definedProp)
}
function deleteAdditional(key: Name): void {
gen.code(_`delete ${data}[${key}]`)
}
function additionalPropertyCode(key: Name): void {
if (opts.removeAdditional === "all" || (opts.removeAdditional && schema === false)) {
deleteAdditional(key)
return
}
if (schema === false) {
cxt.setParams({additionalProperty: key})
cxt.error()
if (!allErrors) gen.break()
return
}
if (typeof schema == "object" && !alwaysValidSchema(it, schema)) {
const valid = gen.name("valid")
if (opts.removeAdditional === "failing") {
applyAdditionalSchema(key, valid, false)
gen.if(not(valid), () => {
cxt.reset()
deleteAdditional(key)
})
} else {
applyAdditionalSchema(key, valid)
if (!allErrors) gen.if(not(valid), () => gen.break())
}
}
}
function applyAdditionalSchema(key: Name, valid: Name, errors?: false): void {
const subschema: SubschemaArgs = {
keyword: "additionalProperties",
dataProp: key,
dataPropType: Type.Str,
}
if (errors === false) {
Object.assign(subschema, {
compositeRule: true,
createErrors: false,
allErrors: false,
})
}
cxt.subschema(subschema, valid)
}
},
}
export default def
@@ -0,0 +1,4 @@
import { Constrain } from './utils.js';
export interface OptionalStructuralSharing<TStructuralSharing, TConstraint> {
readonly structuralSharing?: Constrain<TStructuralSharing, TConstraint> | undefined;
}
@@ -0,0 +1 @@
{"version":3,"file":"index.cjs","sources":["../../src/index.tsx"],"sourcesContent":["import * as React from 'react'\nimport { flushSync } from 'react-dom'\nimport {\n Virtualizer,\n elementScroll,\n observeElementOffset,\n observeElementRect,\n observeWindowOffset,\n observeWindowRect,\n windowScroll,\n} from '@tanstack/virtual-core'\nimport type { PartialKeys, VirtualizerOptions } from '@tanstack/virtual-core'\n\nexport * from '@tanstack/virtual-core'\n\nconst useIsomorphicLayoutEffect =\n typeof document !== 'undefined' ? React.useLayoutEffect : React.useEffect\n\nexport type ReactVirtualizer<\n TScrollElement extends Element | Window,\n TItemElement extends Element,\n> = Virtualizer<TScrollElement, TItemElement> & {\n /**\n * Ref callback for the inner size container element. Only meaningful when\n * `directDomUpdates: true` — the virtualizer writes the container's\n * main-axis size (`height` or `width`) directly to skip React re-renders.\n */\n containerRef: (node: HTMLElement | null) => void\n}\n\nexport type ReactVirtualizerOptions<\n TScrollElement extends Element | Window,\n TItemElement extends Element,\n> = VirtualizerOptions<TScrollElement, TItemElement> & {\n useFlushSync?: boolean\n /**\n * Skip React re-renders for scroll-only updates. The virtualizer writes\n * item positions (`top`/`left`) and the container size (`height`/`width`)\n * directly to the DOM, and only re-renders when the visible index range\n * or `isScrolling` changes.\n *\n * Requirements when enabled:\n * - Item elements must be `position: absolute`; in `'transform'` mode they\n * must also be anchored with `top: 0` / `left: 0`.\n * - Item elements must NOT set the main-axis position in their style — the\n * virtualizer owns `top` / `left` in `'position'` mode and `transform` in\n * `'transform'` mode.\n * - The inner size container must receive `virtualizer.containerRef` and\n * must NOT set `height` / `width` in its style.\n * - For multi-lane layouts (grids / masonry), the cross-axis position\n * (e.g. `left: ${(item.lane * 100) / lanes}%`) is stable per item and\n * must still be set in your JSX — only the main axis is automated.\n *\n * This flag is intended to be set once at mount. Toggling it (or\n * `directDomUpdatesMode`) at runtime can leave stale inline styles on\n * items and the container.\n */\n directDomUpdates?: boolean\n /**\n * How `directDomUpdates` positions item elements.\n * - `'transform'` (default): writes `transform: translate3d(...)`.\n * Promotes items to their own compositor layer — usually smoother on long\n * lists, but creates a stacking context and can interfere with\n * `position: fixed` descendants. Item elements must still be anchored with\n * `position: absolute`, `top: 0`, and `left: 0`.\n * - `'position'`: writes `top` / `left`. Item elements must be\n * `position: absolute`.\n */\n directDomUpdatesMode?: 'position' | 'transform'\n}\n\nfunction useVirtualizerBase<\n TScrollElement extends Element | Window,\n TItemElement extends Element,\n>({\n useFlushSync = true,\n directDomUpdates = false,\n directDomUpdatesMode = 'transform',\n ...options\n}: ReactVirtualizerOptions<TScrollElement, TItemElement>): ReactVirtualizer<\n TScrollElement,\n TItemElement\n> {\n const rerender = React.useReducer((x: number) => x + 1, 0)[1]\n\n // Mutable across renders so the onChange closure captured by setOptions\n // always reads the latest values without us having to re-create it.\n const directRef = React.useRef({\n enabled: directDomUpdates,\n mode: directDomUpdatesMode,\n container: null as HTMLElement | null,\n lastSize: null as number | null,\n // Keyed by the element itself so a remounted node (same key, new DOM\n // node — e.g. when `enabled` is toggled off then on) is treated as fresh\n // and gets its style written.\n lastPositions: new WeakMap<HTMLElement, number>(),\n prevRange: null as {\n startIndex: number\n endIndex: number\n isScrolling: boolean\n } | null,\n })\n directRef.current.enabled = directDomUpdates\n directRef.current.mode = directDomUpdatesMode\n\n // Writes container size + item positions to the DOM. Idempotent — guarded\n // by lastSize / lastPositions. Called from onChange (covers scroll-driven\n // updates) and from a layout effect (covers post-render commits when refs\n // have just registered new items in elementsCache).\n const applyDirectStyles = (\n instance: Virtualizer<TScrollElement, TItemElement>,\n ) => {\n const state = directRef.current\n if (!state.enabled || !state.container) return\n\n const totalSize = instance.getTotalSize()\n if (totalSize !== state.lastSize) {\n state.lastSize = totalSize\n const sizeAxis = instance.options.horizontal ? 'width' : 'height'\n state.container.style[sizeAxis] = `${totalSize}px`\n }\n\n const horizontal =Line truncated
@@ -0,0 +1,460 @@
export default `tlf2a 3 3 8 -1 24 0 0 0
===============================================================================
This is "Future Thin" (Future Thin.flf), based on "Future" (future.tlf) by Sam Hocevar. This variant uses light box drawing characters for a thinner look.
2006/10/01 -- Sam Hocevar <sam@hocevar.net>
font creation
still missing: # % ( ) * / < > \\ ^ ~
2006/10/02 -- Sam Hocevar <sam@hocevar.net>
added Unicode block and line glyphs
added: % ( ) * / \\ ~
fixed: & 2 5 X
2026/02/19 -- John Goodliff <johng.io>
replaced heavy box drawings with light box drawings
This font is free software. It comes without any warranty, to the extent
permitted by applicable law. You can redistribute it and/or modify it under
the terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
details.
Missing characters: # < > ^
This font is part of TOIlet’s official distribution. More information
on the TOIlet website at http://caca.zoy.org/wiki/toilet
===============================================================================
@
@
@@
╷!
╵!
╵!!
╷╷"
"
""
@
@
#@@
┌┬┐$
└┼┐$
└┴┘$$
┌┐╷%
┌─┘%
╵└┘%%
┌┐ &
│╶┼╴&
└─┘ &&
╷'
'
''
┌╴(
│ (
└╴((
╶┐)
│)
╶┘))
╷ ╷*
╶┼╴*
╵ ╵**
╷ +
╶┼╴+
╵ ++
,
,
┘,,
-
╶─╴-
--
.
.
╵..
╷/
┌┘/
╵ //
┌─┐0
│││0
└─┘00
╶┐ 1
│ 1
╶┴╴11
┌─┐2
┌─┘2
└─╴22
┌─┐3
╶─┤3
└─┘33
╷ ╷4
└─┤4
╵44
┌─╴5
└─┐5
└─┘55
┌─┐6
├─┐6
└─┘66
┌─┐7
│7
╵77
┌─┐8
├─┤8
└─┘88
┌─┐9
└─┤9
└─┘99
:
╵:
╵::
;
╵;
┘;;
@
@
<@@
=
╶─╴=
╶─╴==
@
@
>@@
┌─┐?
╶┘?
╵ ??
┌─┐@
│├┘@
└─╴@@
┌─┐A
├─┤A
╵ ╵AA
┌┐ B
├┴┐B
└─┘BB
┌─╴C
│ C
└─╴CC
╶┬┐D
││D
╶┴┘DD
┌─╴E
├╴ E
└─╴EE
┌─╴F
├╴ F
╵ FF
┌─╴G
│╶┐G
└─┘GG
╷ ╷H
├─┤H
╵ ╵HH
╷I
│I
╵II
┌┐J
│J
└─┘JJ
╷┌ K
├┴┐K
╵ ╵KK
╷ L
│ L
└─╴LL
┌┬┐M
│││M
╵ ╵MM
┌┐╷N
│└┤N
╵ ╵NN
┌─┐O
│ │O
└─┘OO
┌─┐P
├─┘P
╵ PP
┌─┐Q
│┐│Q
└┴┘QQ
┌─┐R
├┬┘R
╵└╴RR
┌─┐S
└─┐S
└─┘SS
╶┬╴T
│ T
╵ TT
╷ ╷U
│ │U
└─┘UU
╷ ╷V
│┌┘V
└┘ VV
╷ ╷W
│╷│W
└┴┘WW
╷ ╷X
┌┼┘X
╵ ╵XX
╷ ╷Y
└┬┘Y
╵ YY
╶─┐Z
┌─┘Z
└─╴ZZ
┌─ [
│ [
└─ [[
╷ \\
└┐\\
╵\\\\
─┐]
│]
─┘]]
@
@
^@@
_
_
╶─╴__
┐\`
\`
\`\`
┌─┐a
├─┤a
╵ ╵aa
┌┐ b
├┴┐b
└─┘bb
┌─╴c
│ c
└─╴cc
╶┬┐d
││d
╶┴┘dd
┌─╴e
├╴ e
└─╴ee
┌─╴f
├╴ f
╵ ff
┌─╴g
│╶┐g
└─┘gg
╷ ╷h
├─┤h
╵ ╵hh
╷i
│i
╵ii
┌┐j
│j
└─┘jj
╷┌ k
├┴┐k
╵ ╵kk
╷ l
│ l
└─╴ll
┌┬┐m
│││m
╵ ╵mm
┌┐╷n
│└┤n
╵ ╵nn
┌─┐o
│ │o
└─┘oo
┌─┐p
├─┘p
╵ pp
┌─┐q
│┐│q
└┴┘qq
┌─┐r
├┬┘r
╵└╴rr
┌─┐s
└─┐s
└─┘ss
╶┬╴t
│ t
╵ tt
╷ ╷u
│ │u
└─┘uu
╷ ╷v
│┌┘v
└┘ vv
╷ ╷w
│╷│w
└┴┘ww
╷ ╷x
┌┼┘x
╵ ╵xx
╷ ╷y
└┬┘y
╵ yy
╶─┐z
┌─┘z
└─╴zz
┌╴{
╶┤ {
└╴{{
╷|
│|
╵||
╶┐ }
├╴}
╶┘ }}
~
┌─┘~
~~
┌─┐┌─╴Ä
├─┤├╴ Ä
╵ ╵└─╴ÄÄ
┌─┐┌─╴Ö
│ │├╴ Ö
└─┘└─╴ÖÖ
╷ ╷┌─╴Ü
│ │├╴ Ü
└─┘└─╴ÜÜ
┌─┐┌─╴ä
├─┤├╴ ä
╵ ╵└─╴ää
┌─┐┌─╴ö
│ │├╴ ö
└─┘└─╴öö
╷ ╷┌─╴ü
│ │├╴ ü
└─┘└─╴üü
┌─┐┌─┐ß
└─┐└─┐ß
└─┘└─┘ßß
0x2500 ─ BOX DRAWINGS LIGHT HORIZONTAL
@
───@
@@
0x2501 ━ BOX DRAWINGS HEAVY HORIZONTAL
@
■■■@
@@
0x2502 │ BOX DRAWINGS LIGHT VERTICAL
│ @
│ @
│@@
0x2503 ┃ BOX DRAWINGS HEAVY VERTICAL
█ @
█ @
█@@
0x250C ┌ BOX DRAWINGS LIGHT DOWN AND RIGHT
@
┌─@
│ @@
0x250F ┏ BOX DRAWINGS HEAVY DOWN AND RIGHT
@
▄■@
█ @@
0x2510 ┐ BOX DRAWINGS LIGHT DOWN AND LEFT
@
─┐ @
│@@
0x2513 ┓ BOX DRAWINGS HEAVY DOWN AND LEFT
@
■▄ @
█@@
0x2514 └ BOX DRAWINGS LIGHT UP AND RIGHT
│ @
└─@
@@
0x2517 ┗ BOX DRAWINGS HEAVY UP AND RIGHT
█ @
▀■@
@@
0x2518 ┘ BOX DRAWINGS LIGHT UP AND LEFT
│ @
─┘ @
@@
0x251B ┛ BOX DRAWINGS HEAVY UP AND LEFT
█ @
■▀ @
@@
0x251c ├ BOX DRAWINGS LIGHT VERTICAL AND RIGHT
│ @
├─@
│ @@
0x2523 ┣ BOX DRAWINGS HEAVY VERTICAL AND RIGHT
█ @
█■@
█ @@
0x2524 ┤ BOX DRAWINGS LIGHT VERTICAL AND LEFT
│ @
─┤ @
│@@
0x252B ┫ BOX DRAWINGS HEAVY VERTICAL AND LEFT
█ @
■█ @
█@@
0x252c ┬ BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
@
─┬─@
│ @@
0x2533 ┳ BOX DRAWINGS HEAVY DOWN AND HORIZONTAL
@
■▄■@
█ @@
0x2534 ┴ BOX DRAWINGS LIGHT UP AND HORIZONTAL
│ @
─┴─@
@@
0x253B ┻ BOX DRAWINGS HEAVY UP AND HORIZONTAL
█ @
■▀■@
@@
0x253c ┼ BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
│ @
─┼─@
│ @@
0x254B ╋ BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL
█ @
■█■@
█ @@
0x2578 ╸ BOX DRAWINGS HEAVY LEFT
@
■■ @
@@
0x2579 ╹ BOX DRAWINGS HEAVY UP
█ @
▀ @
@@
0x257A ╺ BOX DRAWINGS HEAVY RIGHT
@
■■@
@@
0x257B ╻ BOX DRAWINGS HEAVY DOWN
@
▄ @
█@@
0x2580 ▀ UPPER HALF BLOCK
███@
▀▀▀@
@@
0x2584 ▄ LOWER HALF BLOCK
@
▄▄▄@
███@
0x2588 █ FULL BLOCK
███@
███@
███@@
0x25A0 ■ BLACK SQUARE
▄▄▄@
███@
▀▀▀@@
0x5350 卐 CJK UNIFIED IDEOGRAPH-5350
╷┌╴@
└┼┐@
╶┘╵@@
0x534D 卍 CJK UNIFIED IDEOGRAPH-534D
╶┐╷@
┌┼┘@
╵└╴@@
`
@@ -0,0 +1 @@
{"version":3,"file":"shower-head.js","sources":["../../../src/icons/shower-head.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ShowerHead\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNCA0IDIuNSAyLjUiIC8+CiAgPHBhdGggZD0iTTEzLjUgNi41YTQuOTUgNC45NSAwIDAgMC03IDciIC8+CiAgPHBhdGggZD0iTTE1IDUgNSAxNSIgLz4KICA8cGF0aCBkPSJNMTQgMTd2LjAxIiAvPgogIDxwYXRoIGQ9Ik0xMCAxNnYuMDEiIC8+CiAgPHBhdGggZD0iTTEzIDEzdi4wMSIgLz4KICA8cGF0aCBkPSJNMTYgMTB2LjAxIiAvPgogIDxwYXRoIGQ9Ik0xMSAyMHYuMDEiIC8+CiAgPHBhdGggZD0iTTE3IDE0di4wMSIgLz4KICA8cGF0aCBkPSJNMjAgMTF2LjAxIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/shower-head\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 ShowerHead = createLucideIcon('ShowerHead', [\n ['path', { d: 'm4 4 2.5 2.5', key: 'uv2vmf' }],\n ['path', { d: 'M13.5 6.5a4.95 4.95 0 0 0-7 7', key: 'frdkwv' }],\n ['path', { d: 'M15 5 5 15', key: '1ag8rq' }],\n ['path', { d: 'M14 17v.01', key: 'eokfpp' }],\n ['path', { d: 'M10 16v.01', key: '14uyyl' }],\n ['path', { d: 'M13 13v.01', key: '1v1k97' }],\n ['path', { d: 'M16 10v.01', key: '5169yg' }],\n ['path', { d: 'M11 20v.01', key: 'cj92p8' }],\n ['path', { d: 'M17 14v.01', key: '11cswd' }],\n ['path', { d: 'M20 11v.01', key: '19e0od' }],\n]);\n\nexport default ShowerHead;\n"],"names":[],"mappings":"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"}
@@ -0,0 +1,14 @@
import { resolveTransition } from './resolve-transition.mjs';
function getValueTransition(transition, key) {
const valueTransition = transition?.[key] ??
transition?.["default"] ??
transition;
if (valueTransition !== transition) {
return resolveTransition(valueTransition, transition);
}
return valueTransition;
}
export { getValueTransition };
//# sourceMappingURL=get-value-transition.mjs.map
@@ -0,0 +1,73 @@
{
"name": "cross-spawn",
"version": "7.0.6",
"description": "Cross platform child_process#spawn and child_process#spawnSync",
"keywords": [
"spawn",
"spawnSync",
"windows",
"cross-platform",
"path-ext",
"shebang",
"cmd",
"execute"
],
"author": "André Cruz <andre@moxy.studio>",
"homepage": "https://github.com/moxystudio/node-cross-spawn",
"repository": {
"type": "git",
"url": "git@github.com:moxystudio/node-cross-spawn.git"
},
"license": "MIT",
"main": "index.js",
"files": [
"lib"
],
"scripts": {
"lint": "eslint .",
"test": "jest --env node --coverage",
"prerelease": "npm t && npm run lint",
"release": "standard-version",
"postrelease": "git push --follow-tags origin HEAD && npm publish"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.js": [
"eslint --fix",
"git add"
]
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"dependencies": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
"which": "^2.0.1"
},
"devDependencies": {
"@commitlint/cli": "^8.1.0",
"@commitlint/config-conventional": "^8.1.0",
"babel-core": "^6.26.3",
"babel-jest": "^24.9.0",
"babel-preset-moxy": "^3.1.0",
"eslint": "^5.16.0",
"eslint-config-moxy": "^7.1.0",
"husky": "^3.0.5",
"jest": "^24.9.0",
"lint-staged": "^9.2.5",
"mkdirp": "^0.5.1",
"rimraf": "^3.0.0",
"standard-version": "^9.5.0"
},
"engines": {
"node": ">= 8"
}
}
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2019_full: LibDefinition;
@@ -0,0 +1 @@
{"version":3,"file":"binary-search.d.ts","sourceRoot":"","sources":["../src/binary-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG5E,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,IAAI,KAAK,SAAQ,CAAC;AAEzB;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GACX,MAAM,CAmBR;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAED,wBAAgB,aAAa,IAAI,SAAS,CAMzC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,MAAM,GACV,MAAM,CAsBR"}
@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Network = createLucideIcon("Network", [
["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
["path", { d: "M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3", key: "1jsf9p" }],
["path", { d: "M12 12V8", key: "2874zd" }]
]);
export { Network as default };
//# sourceMappingURL=network.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"132":"_E"},B:{"132":"_J"},C:{"132":"_S"},D:{"132":"_H _5 _GC","388":"_fC _nE"},E:{"132":"_R"},F:{"132":"_c"},G:{"132":"_M"},H:{"132":"1D"},I:{"132":"_P"},J:{"132":"_B"},K:{"132":"_N"},L:{"132":"I"},M:{"132":"YC"},N:{"132":"_A"},O:{"132":"bC"},P:{"132":"_F"},Q:{"132":"JE"},R:{"132":"KE"},S:{"132":"_C"}},B:6,C:"DNSSEC and DANE",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"sun-medium.js","sources":["../../../src/icons/sun-medium.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SunMedium\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSI0IiAvPgogIDxwYXRoIGQ9Ik0xMiAzdjEiIC8+CiAgPHBhdGggZD0iTTEyIDIwdjEiIC8+CiAgPHBhdGggZD0iTTMgMTJoMSIgLz4KICA8cGF0aCBkPSJNMjAgMTJoMSIgLz4KICA8cGF0aCBkPSJtMTguMzY0IDUuNjM2LS43MDcuNzA3IiAvPgogIDxwYXRoIGQ9Im02LjM0MyAxNy42NTctLjcwNy43MDciIC8+CiAgPHBhdGggZD0ibTUuNjM2IDUuNjM2LjcwNy43MDciIC8+CiAgPHBhdGggZD0ibTE3LjY1NyAxNy42NTcuNzA3LjcwNyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/sun-medium\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst SunMedium = createLucideIcon('SunMedium', [\n ['circle', { cx: '12', cy: '12', r: '4', key: '4exip2' }],\n ['path', { d: 'M12 3v1', key: '1asbbs' }],\n ['path', { d: 'M12 20v1', key: '1wcdkc' }],\n ['path', { d: 'M3 12h1', key: 'lp3yf2' }],\n ['path', { d: 'M20 12h1', key: '1vloll' }],\n ['path', { d: 'm18.364 5.636-.707.707', key: '1hakh0' }],\n ['path', { d: 'm6.343 17.657-.707.707', key: '18m9nf' }],\n ['path', { d: 'm5.636 5.636.707.707', key: '1xv1c5' }],\n ['path', { d: 'm17.657 17.657.707.707', key: 'vl76zb' }],\n]);\n\nexport default SunMedium;\n"],"names":[],"mappings":"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"}
@@ -0,0 +1 @@
{"version":3,"file":"matching.mjs","sources":["../../../src/matcher/date/matching.ts"],"sourcesContent":[null],"names":["MatchDate","MatcherBaseClass","match","password","matches","getMatchesWithoutSeparator","getMatchesWithSeparator","filteredMatches","filterNoise","sorted","maybeDateWithSeparator","i","Math","abs","length","j","token","slice","regexMatch","exec","dmy","mapIntegersToDayMonthYear","parseInt","push","pattern","separator","year","month","day","maybeDateNoSeparator","metric","candidate","REFERENCE_YEAR","candidates","index","splittedDates","DATE_SPLITS","forEach","k","l","bestCandidate","minDistance","distance","filter","isSubmatch","matchesLength","o","otherMatch","integers","over12","over31","under1","len1","int","DATE_MIN_YEAR","DATE_MAX_YEAR","getDayMonth","possibleYearSplits","possibleYearSplitsLength","y","rest","dm","mapIntegersToDayMonth","twoToFourDigitYear","temp","reverse","data"],"mappings":"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 truncated
@@ -0,0 +1,21 @@
/**
* @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 RadioTower = createLucideIcon("RadioTower", [
["path", { d: "M4.9 16.1C1 12.2 1 5.8 4.9 1.9", key: "s0qx1y" }],
["path", { d: "M7.8 4.7a6.14 6.14 0 0 0-.8 7.5", key: "1idnkw" }],
["circle", { cx: "12", cy: "9", r: "2", key: "1092wv" }],
["path", { d: "M16.2 4.8c2 2 2.26 5.11.8 7.47", key: "ojru2q" }],
["path", { d: "M19.1 1.9a9.96 9.96 0 0 1 0 14.1", key: "rhi7fg" }],
["path", { d: "M9.5 18h5", key: "mfy3pd" }],
["path", { d: "m8 22 4-11 4 11", key: "25yftu" }]
]);
export { RadioTower as default };
//# sourceMappingURL=radio-tower.js.map
@@ -0,0 +1,38 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const ensureType = require("./ensureType.js");
const getType = require("./getType.js");
const isAbsoluteURL = require("./isAbsoluteURL.js");
const isArrayLike = require("./isArrayLike.js");
const isAsyncFunction = require("./isAsyncFunction.js");
const isESModule = require("./isESModule.js");
const isError = require("./isError.js");
const isFunction = require("./isFunction.js");
const isIterable = require("./isIterable.js");
const isLeapYear = require("./isLeapYear.js");
const isLength = require("./isLength.js");
const isNil = require("./isNil.js");
const isNumber = require("./isNumber.js");
const isObject = require("./isObject.js");
const isPlainObject = require("./isPlainObject.js");
const isPromiseLike = require("./isPromiseLike.js");
const isValidDate = require("./isValidDate.js");
const isWhat = require("./isWhat.js");
exports.ensureType = ensureType.ensureType;
exports.getType = getType.getType;
exports.isAbsoluteURL = isAbsoluteURL.isAbsoluteURL;
exports.isArrayLike = isArrayLike.isArrayLike;
exports.isAsyncFunction = isAsyncFunction.isAsyncFunction;
exports.isESModule = isESModule.isESModule;
exports.isError = isError.isError;
exports.isFunction = isFunction.isFunction;
exports.isIterable = isIterable.isIterable;
exports.isLeapYear = isLeapYear.isLeapYear;
exports.isLength = isLength.isLength;
exports.isNil = isNil.isNil;
exports.isNumber = isNumber.isNumber;
exports.isObject = isObject.isObject;
exports.isPlainObject = isPlainObject.isPlainObject;
exports.isPromiseLike = isPromiseLike.isPromiseLike;
exports.isValidDate = isValidDate.isValidDate;
exports.isWhat = isWhat.isWhat;
@@ -0,0 +1,41 @@
import { useState, useEffect } from 'react';
import { env } from './env';
var cache = new WeakMap();
var NO_OPTIONS = {};
export function useSidecar(importer, effect) {
var options = (effect && effect.options) || NO_OPTIONS;
if (env.isNode && !options.ssr) {
return [null, null];
}
// eslint-disable-next-line react-hooks/rules-of-hooks
return useRealSidecar(importer, effect);
}
function useRealSidecar(importer, effect) {
var options = (effect && effect.options) || NO_OPTIONS;
var couldUseCache = env.forceCache || (env.isNode && !!options.ssr) || !options.async;
var _a = useState(couldUseCache ? function () { return cache.get(importer); } : undefined), Car = _a[0], setCar = _a[1];
var _b = useState(null), error = _b[0], setError = _b[1];
useEffect(function () {
if (!Car) {
importer().then(function (car) {
var resolved = effect ? effect.read() : car.default || car;
if (!resolved) {
console.error('Sidecar error: with importer', importer);
var error_1;
if (effect) {
console.error('Sidecar error: with medium', effect);
error_1 = new Error('Sidecar medium was not found');
}
else {
error_1 = new Error('Sidecar was not found in exports');
}
setError(function () { return error_1; });
throw error_1;
}
cache.set(importer, resolved);
setCar(function () { return resolved; });
}, function (e) { return setError(function () { return e; }); });
}
}, []);
return [Car, error];
}
@@ -0,0 +1,221 @@
import { HistoryState, ParsedHistoryState } from '@tanstack/history';
import { AllParams, CatchAllPaths, CurrentPath, FullSearchSchema, FullSearchSchemaInput, ParentPath, RouteByPath, RouteByToPath, RoutePaths, RouteToPath, ToPath } from './routeInfo.js';
import { AnyRouter, RegisteredRouter, ViewTransitionOptions } from './router.js';
import { ConstrainLiteral, Expand, MakeDifferenceOptional, NoInfer, NonNullableUpdater, Updater } from './utils.js';
import { ParsedLocation } from './location.js';
export type IsRequiredParams<TParams> = Record<never, never> extends TParams ? never : true;
export interface ParsePathParamsResult<in out TRequired, in out TOptional, in out TRest> {
required: TRequired;
optional: TOptional;
rest: TRest;
}
export type AnyParsePathParamsResult = ParsePathParamsResult<string, string, string>;
export type ParsePathParamsBoundaryStart<T extends string> = T extends `${infer TLeft}{-${infer TRight}` ? ParsePathParamsResult<ParsePathParams<TLeft>['required'], ParsePathParams<TLeft>['optional'] | ParsePathParams<TRight>['required'] | ParsePathParams<TRight>['optional'], ParsePathParams<TRight>['rest']> : T extends `${infer TLeft}{${infer TRight}` ? ParsePathParamsResult<ParsePathParams<TLeft>['required'] | ParsePathParams<TRight>['required'], ParsePathParams<TLeft>['optional'] | ParsePathParams<TRight>['optional'], ParsePathParams<TRight>['rest']> : never;
export type ParsePathParamsSymbol<T extends string> = T extends `${string}$${infer TRight}` ? TRight extends `${string}/${string}` ? TRight extends `${infer TParam}/${infer TRest}` ? TParam extends '' ? ParsePathParamsResult<ParsePathParams<TRest>['required'], '_splat' | ParsePathParams<TRest>['optional'], ParsePathParams<TRest>['rest']> : ParsePathParamsResult<TParam | ParsePathParams<TRest>['required'], ParsePathParams<TRest>['optional'], ParsePathParams<TRest>['rest']> : never : TRight extends '' ? ParsePathParamsResult<never, '_splat', never> : ParsePathParamsResult<TRight, never, never> : never;
export type ParsePathParamsBoundaryEnd<T extends string> = T extends `${infer TLeft}}${infer TRight}` ? ParsePathParamsResult<ParsePathParams<TLeft>['required'] | ParsePathParams<TRight>['required'], ParsePathParams<TLeft>['optional'] | ParsePathParams<TRight>['optional'], ParsePathParams<TRight>['rest']> : never;
export type ParsePathParamsEscapeStart<T extends string> = T extends `${infer TLeft}[${infer TRight}` ? ParsePathParamsResult<ParsePathParams<TLeft>['required'] | ParsePathParams<TRight>['required'], ParsePathParams<TLeft>['optional'] | ParsePathParams<TRight>['optional'], ParsePathParams<TRight>['rest']> : never;
export type ParsePathParamsEscapeEnd<T extends string> = T extends `${string}]${infer TRight}` ? ParsePathParams<TRight> : never;
export type ParsePathParams<T extends string> = T extends `${string}[${string}` ? ParsePathParamsEscapeStart<T> : T extends `${string}]${string}` ? ParsePathParamsEscapeEnd<T> : T extends `${string}}${string}` ? ParsePathParamsBoundaryEnd<T> : T extends `${string}{${string}` ? ParsePathParamsBoundaryStart<T> : T extends `${string}$${string}` ? ParsePathParamsSymbol<T> : never;
export type AddTrailingSlash<T> = T extends `${string}/` ? T : `${T & string}/`;
export type RemoveTrailingSlashes<T> = T & `${string}/` extends never ? T : T extends `${infer R}/` ? R : T;
export type AddLeadingSlash<T> = T & `/${string}` extends never ? `/${T & string}` : T;
export type RemoveLeadingSlashes<T> = T & `/${string}` extends never ? T : T extends `/${infer R}` ? R : T;
type JoinPath<TLeft extends string, TRight extends string> = TRight extends '' ? TLeft : TLeft extends '' ? TRight : `${RemoveTrailingSlashes<TLeft>}/${RemoveLeadingSlashes<TRight>}`;
type RemoveLastSegment<T extends string, TAcc extends string = ''> = T extends `${infer TSegment}/${infer TRest}` ? TRest & `${string}/${string}` extends never ? TRest extends '' ? TAcc : `${TAcc}${TSegment}` : RemoveLastSegment<TRest, `${TAcc}${TSegment}/`> : TAcc;
export type ResolveCurrentPath<TFrom extends string, TTo extends string> = TTo extends '.' ? TFrom : TTo extends './' ? AddTrailingSlash<TFrom> : TTo & `./${string}` extends never ? never : TTo extends `./${infer TRest}` ? AddLeadingSlash<JoinPath<TFrom, TRest>> : never;
export type ResolveParentPath<TFrom extends string, TTo extends string> = TTo extends '../' | '..' ? TFrom extends '' | '/' ? never : AddLeadingSlash<RemoveLastSegment<TFrom>> : TTo & `../${string}` extends never ? AddLeadingSlash<JoinPath<TFrom, TTo>> : TFrom extends '' | '/' ? never : TTo extends `../${infer ToRest}` ? ResolveParentPath<RemoveLastSegment<TFrom>, ToRest> : AddLeadingSlash<JoinPath<TFrom, TTo>>;
export type ResolveRelativePath<TFrom, TTo = '.'> = string extends TFrom ? TTo : string extends TTo ? TFrom : undefined extends TTo ? TFrom : TTo extends string ? TFrom extends string ? TTo extends `/${string}` ? TTo : TTo extends `..${string}` ? ResolveParentPath<TFrom, TTo> : TTo extends `.${string}` ? ResolveCurrentPath<TFrom, TTo> : AddLeadingSlash<JoinPath<TFrom, TTo>> : never : never;
export type FindDescendantToPaths<TRouter extends AnyRouter, TPrefix extends string> = `${TPrefix}/${string}` & RouteToPath<TRouter>;
export type InferDescendantToPaths<TRouter extends AnyRouter, TPrefix extends string, TPaths = FindDescendantToPaths<TRouter, TPrefix>> = TPaths extends `${TPrefix}/` ? never : TPaths extends `${TPrefix}/${infer TRest}` ? TRest : never;
export type RelativeToPath<TRouter extends AnyRouter, TTo extends string, TResolvedPath extends string> = (TResolvedPath & RouteToPath<TRouter> extends never ? never : ToPath<TRouter, TTo>) | `${RemoveTrailingSlashes<TTo>}/${InferDescendantToPaths<TRouter, RemoveTrailingSlashes<TResolvedPath>>}`;
export type RelativeToParentPath<TRouter extends AnyRouter, TFrom extends string, TTo extends string, TResolvedPath extends string = ResolveRelativePath<TFrom, TTo>> = RelativeToPath<TRouter, TTo, TResolvedPath> | (TTo extends `${string}..` | `${string}../` ? TResolvedPath extends '/' | '' ? never : FindDescendantToPaths<TRouter, RemoveTrailingSlashes<TResolvedPath>> extends never ? never : `${RemoveTrailingSlashes<TTo>}/${ParentPath<TRouter>}` : never);
export type RelativeToCurrentPath<TRouter extends AnyRouter, TFrom extends string, TTo extends string, TResolvedPath extends string = ResolveRelativePath<TFrom, TTo>> = RelativeToPath<TRouter, TTo, TResolvedPath> | CurrentPath<TRouter>;
export type AbsoluteToPath<TRouter extends AnyRouter, TFrom extends string> = (string extends TFrom ? CurrentPath<TRouter> : TFrom extends `/` ? never : CurrentPath<TRouter>) | (string extends TFrom ? ParentPath<TRouter> : TFrom extends `/` ? never : ParentPath<TRouter>) | RouteToPath<TRouter> | (TFrom extends '/' ? never : string extends TFrom ? never : InferDescendantToPaths<TRouter, RemoveTrailingSlashes<TFrom>>);
export type RelativeToPathAutoComplete<TRouter extends AnyRouter, TFrom extends string, TTo extends string> = string extends TTo ? string : string extends TFrom ? AbsoluteToPath<TRouter, TFrom> : TTo & `..${string}` extends never ? TTo & `.${string}` extends never ? AbsoluteToPath<TRouter, TFrom> : RelativeToCurrentPath<TRouter, TFrom, TTo> : RelativeToParentPath<TRouter, TFrom, TTo>;
export type NavigateOptions<TRouter extends AnyRouter = RegisteredRouter, TFrom extends string = string, TTo extends string | undefined = '.', TMaskFrom extends string = TFrom, TMaskTo extends string = '.'> = ToOptions<TRouter, TFrom, TTo, TMaskFrom, TMaskTo> & NavigateOptionProps;
/**
* The NavigateOptions type is used to describe the options that can be used when describing a navigation action in TanStack Router.
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType)
*/
export interface NavigateOptionProps {
/**
* If set to `true`, the router will scroll the element with an id matching the hash into view with default `ScrollIntoViewOptions`.
* If set to `false`, the router will not scroll the element with an id matching the hash into view.
* If set to `ScrollIntoViewOptions`, the router will scroll the element with an id matching the hash into view with the provided options.
* @default true
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType#hashscrollintoview)
* @see [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)
*/
hashScrollIntoView?: boolean | ScrollIntoViewOptions;
/**
* `replace` is a boolean that determines whether the navigation should replace the current history entry or push a new one.
* @default false
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType#replace)
*/
replace?: boolean;
/**
* Defaults to `true` so that the scroll position will be reset to 0,0 after the location is committed to the browser history.
* If `false`, the scroll position will not be reset to 0,0 after the location is committed to history.
* @default true
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType#resetscroll)
*/
resetScroll?: boolean;
/** @deprecated All navigations now use startTransition under the hood */
startTransition?: boolean;
/**
* If set to `true`, the router will wrap the resulting navigation in a `document.startViewTransition()` call.
* If `ViewTransitionOptions`, route navigations will be called using `document.startViewTransition({update, types})`
* where `types` will be the strings array passed with `ViewTransitionOptions["types"]`.
* If the browser does not support viewTransition types, the navigation will fall back to normal `document.startTransition()`, same as if `true` was passed.
*
* If the browser does not support this api, this option will be ignored.
* @default false
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType#viewtransition)
* @see [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Document/startViewTransition)
* @see [Google](https://developer.chrome.com/docs/web-platform/view-transitions/same-document#view-transition-types)
*/
viewTransition?: boolean | ViewTransitionOptions;
/**
* If `true`, navigation will ignore any blockers that might prevent it.
* @default false
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType#ignoreblocker)
*/
ignoreBlocker?: boolean;
/**
* If `true`, navigation to a route inside of router will trigger a full page load instead of the traditional SPA navigation.
* @default false
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType#reloaddocument)
*/
reloadDocument?: boolean;
/**
* This can be used instead of `to` to navigate to a fully built href, e.g. pointing to an external target.
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType#href)
*/
href?: string;
}
export type ToOptions<TRouter extends AnyRouter = RegisteredRouter, TFrom extends string = string, TTo extends string | undefined = '.', TMaskFrom extends string = TFrom, TMaskTo extends string = '.'> = ToSubOptions<TRouter, TFrom, TTo> & MaskOptions<TRouter, TMaskFrom, TMaskTo>;
export interface MaskOptions<in out TRouter extends AnyRouter, in out TMaskFrom extends string, in out TMaskTo extends string> {
_fromLocation?: ParsedLocation;
mask?: ToMaskOptions<TRouter, TMaskFrom, TMaskTo>;
}
export type ToMaskOptions<TRouter extends AnyRouter = RegisteredRouter, TMaskFrom extends string = string, TMaskTo extends string = '.'> = ToSubOptions<TRouter, TMaskFrom, TMaskTo> & {
unmaskOnReload?: boolean;
};
export type ToSubOptions<TRouter extends AnyRouter = RegisteredRouter, TFrom extends string = string, TTo extends string | undefined = '.'> = ToSubOptionsProps<TRouter, TFrom, TTo> & SearchParamOptions<TRouter, TFrom, TTo> & PathParamOptions<TRouter, TFrom, TTo>;
export interface RequiredToOptions<in out TRouter extends AnyRouter, in out TFrom extends string, in out TTo extends string | undefined> {
/**
* The internal route path to navigate to. This should be a relative or absolute path within your application.
* For external URLs, use the `href` property instead.
* @example "/dashboard" or "../profile"
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType#href)
*/
to: ToPathOption<TRouter, TFrom, TTo> & {};
}
export interface OptionalToOptions<in out TRouter extends AnyRouter, in out TFrom extends string, in out TTo extends string | undefined> {
/**
* The internal route path to navigate to. This should be a relative or absolute path within your application.
* For external URLs, use the `href` property instead.
* @example "/dashboard" or "../profile"
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType#href)
*/
to?: ToPathOption<TRouter, TFrom, TTo> & {};
}
export type MakeToRequired<TRouter extends AnyRouter, TFrom extends string, TTo extends string | undefined> = string extends TFrom ? string extends TTo ? OptionalToOptions<TRouter, TFrom, TTo> : TTo & CatchAllPaths<TRouter> extends never ? RequiredToOptions<TRouter, TFrom, TTo> : OptionalToOptions<TRouter, TFrom, TTo> : OptionalToOptions<TRouter, TFrom, TTo>;
export type ToSubOptionsProps<TRouter extends AnyRouter = RegisteredRouter, TFrom extends RoutePaths<TRouter['routeTree']> | string = string, TTo extends string | undefined = '.'> = MakeToRequired<TRouter, TFrom, TTo> & {
hash?: true | Updater<string>;
state?: true | NonNullableUpdater<ParsedHistoryState, HistoryState>;
from?: FromPathOption<TRouter, TFrom> & {};
unsafeRelative?: 'path';
};
export type ParamsReducerFn<in out TRouter extends AnyRouter, in out TParamVariant extends ParamVariant, in out TFrom, in out TTo> = (current: Expand<ResolveFromParams<TRouter, TParamVariant, TFrom>>) => Expand<ResolveRelativeToParams<TRouter, TParamVariant, TFrom, TTo>>;
type ParamsReducer<TRouter extends AnyRouter, TParamVariant extends ParamVariant, TFrom, TTo> = Expand<ResolveRelativeToParams<TRouter, TParamVariant, TFrom, TTo>> | (ParamsReducerFn<TRouter, TParamVariant, TFrom, TTo> & {});
type ParamVariant = 'PATH' | 'SEARCH';
export type ResolveRoute<TRouter extends AnyRouter, TFrom, TTo, TPath = ResolveRelativePath<TFrom, TTo>> = TPath extends string ? TFrom extends TPath ? RouteByPath<TRouter['routeTree'], TPath> : RouteByToPath<TRouter, TPath> : never;
type ResolveFromParamType<TParamVariant extends ParamVariant> = TParamVariant extends 'PATH' ? 'allParams' : 'fullSearchSchema';
type ResolveFromAllParams<TRouter extends AnyRouter, TParamVariant extends ParamVariant> = TParamVariant extends 'PATH' ? AllParams<TRouter['routeTree']> : FullSearchSchema<TRouter['routeTree']>;
type ResolveFromParams<TRouter extends AnyRouter, TParamVariant extends ParamVariant, TFrom> = string extends TFrom ? ResolveFromAllParams<TRouter, TParamVariant> : RouteByPath<TRouter['routeTree'], TFrom>['types'][ResolveFromParamType<TParamVariant>];
type ResolveToParamType<TParamVariant extends ParamVariant> = TParamVariant extends 'PATH' ? 'allParams' : 'fullSearchSchemaInput';
type ResolveAllToParams<TRouter extends AnyRouter, TParamVariant extends ParamVariant> = TParamVariant extends 'PATH' ? AllParams<TRouter['routeTree']> : FullSearchSchemaInput<TRouter['routeTree']>;
export type ResolveToParams<TRouter extends AnyRouter, TParamVariant extends ParamVariant, TFrom, TTo> = ResolveRelativePath<TFrom, TTo> extends infer TPath ? undefined extends TPath ? never : string extends TPath ? ResolveAllToParams<TRouter, TParamVariant> : TPath extends CatchAllPaths<TRouter> ? ResolveAllToParams<TRouter, TParamVariant> : ResolveRoute<TRouter, TFrom, TTo>['types'][ResolveToParamType<TParamVariant>] : never;
type ResolveRelativeToParams<TRouter extends AnyRouter, TParamVariant extends ParamVariant, TFrom, TTo, TToParams = ResolveToParams<TRouter, TParamVariant, TFrom, TTo>> = TParamVariant extends 'SEARCH' ? TToParams : string extends TFrom ? TToParams : MakeDifferenceOptional<ResolveFromParams<TRouter, TParamVariant, TFrom>, TToParams>;
export interface MakeOptionalSearchParams<in out TRouter extends AnyRouter, in out TFrom, in out TTo> {
search?: true | (ParamsReducer<TRouter, 'SEARCH', TFrom, TTo> & {});
}
export interface MakeOptionalPathParams<in out TRouter extends AnyRouter, in out TFrom, in out TTo> {
params?: true | (ParamsReducer<TRouter, 'PATH', TFrom, TTo> & {});
}
type MakeRequiredParamsReducer<TRouter extends AnyRouter, TParamVariant extends ParamVariant, TFrom, TTo> = (string extends TFrom ? never : ResolveFromParams<TRouter, TParamVariant, TFrom> extends ResolveRelativeToParams<TRouter, TParamVariant, TFrom, TTo> ? true : never) | (ParamsReducer<TRouter, TParamVariant, TFrom, TTo> & {});
export interface MakeRequiredPathParams<in out TRouter extends AnyRouter, in out TFrom, in out TTo> {
params: MakeRequiredParamsReducer<TRouter, 'PATH', TFrom, TTo> & {};
}
export interface MakeRequiredSearchParams<in out TRouter extends AnyRouter, in out TFrom, in out TTo> {
search: MakeRequiredParamsReducer<TRouter, 'SEARCH', TFrom, TTo> & {};
}
export type IsRequired<TRouter extends AnyRouter, TParamVariant extends ParamVariant, TFrom, TTo> = ResolveRelativePath<TFrom, TTo> extends infer TPath ? undefined extends TPath ? never : TPath extends CatchAllPaths<TRouter> ? never : IsRequiredParams<ResolveRelativeToParams<TRouter, TParamVariant, TFrom, TTo>> : never;
export type SearchParamOptions<TRouter extends AnyRouter, TFrom, TTo> = IsRequired<TRouter, 'SEARCH', TFrom, TTo> extends never ? MakeOptionalSearchParams<TRouter, TFrom, TTo> : MakeRequiredSearchParams<TRouter, TFrom, TTo>;
export type PathParamOptions<TRouter extends AnyRouter, TFrom, TTo> = IsRequired<TRouter, 'PATH', TFrom, TTo> extends never ? MakeOptionalPathParams<TRouter, TFrom, TTo> : MakeRequiredPathParams<TRouter, TFrom, TTo>;
export type ToPathOption<TRouter extends AnyRouter = AnyRouter, TFrom extends string = string, TTo extends string | undefined = string> = ConstrainLiteral<TTo, RelativeToPathAutoComplete<TRouter, NoInfer<TFrom> extends string ? NoInfer<TFrom> : '', NoInfer<TTo> & string>>;
export type FromPathOption<TRouter extends AnyRouter, TFrom> = ConstrainLiteral<TFrom, RoutePaths<TRouter['routeTree']>>;
/**
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/navigation#active-options)
*/
export interface ActiveOptions {
/**
* If true, the link will be active if the current route matches the `to` route path exactly (no children routes)
* @default false
*/
exact?: boolean;
/**
* If true, the link will only be active if the current URL hash matches the `hash` prop
* @default false
*/
includeHash?: boolean;
/**
* If true, the link will only be active if the current URL search params inclusively match the `search` prop
* @default true
*/
includeSearch?: boolean;
/**
* This modifies the `includeSearch` behavior.
* If true, properties in `search` that are explicitly `undefined` must NOT be present in the current URL search params for the link to be active.
* @default false
*/
explicitUndefined?: boolean;
}
export interface LinkOptionsProps {
/**
* The standard anchor tag target attribute
*/
target?: HTMLAnchorElement['target'];
/**
* Configurable options to determine if the link should be considered active or not
* @default {exact:true,includeHash:true}
*/
activeOptions?: ActiveOptions;
/**
* The preloading strategy for this link
* - `false` - No preloading
* - `'intent'` - Preload the linked route on hover and cache it for this many milliseconds in hopes that the user will eventually navigate there.
* - `'viewport'` - Preload the linked route when it enters the viewport
*/
preload?: false | 'intent' | 'viewport' | 'render';
/**
* When a preload strategy is set, this delays the preload by this many milliseconds.
* If the user exits the link before this delay, the preload will be cancelled.
*/
preloadDelay?: number;
/**
* Control whether the link should be disabled or not
* If set to `true`, the link will be rendered without an `href` attribute
* @default false
*/
disabled?: boolean;
/**
* When the preload strategy is set to `intent`, this controls the proximity of the link to the cursor before it is preloaded.
* If the user exits this proximity before this delay, the preload will be cancelled.
*/
preloadIntentProximity?: number;
}
export type LinkOptions<TRouter extends AnyRouter = RegisteredRouter, TFrom extends string = string, TTo extends string | undefined = '.', TMaskFrom extends string = TFrom, TMaskTo extends string = '.'> = NavigateOptions<TRouter, TFrom, TTo, TMaskFrom, TMaskTo> & LinkOptionsProps;
export declare const preloadWarning = "Error preloading route! \u261D\uFE0F";
export {};
@@ -0,0 +1 @@
{"version":3,"file":"square-minus.js","sources":["../../../src/icons/square-minus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareMinus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik04IDEyaDgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/square-minus\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 SquareMinus = createLucideIcon('SquareMinus', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M8 12h8', key: '1wcyev' }],\n]);\n\nexport default SquareMinus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"decode-data-xml.js","sourceRoot":"","sources":["../../../src/generated/decode-data-xml.ts"],"names":[],"mappings":";AAAA,8CAA8C;;;AAEjC,QAAA,aAAa,GAAgC,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,166 @@
// A path exclusive reservation system
// reserve([list, of, paths], fn)
// When the fn is first in line for all its paths, it
// is called with a cb that clears the reservation.
//
// Used by async unpack to avoid clobbering paths in use,
// while still allowing maximal safe parallelization.
import { join } from 'node:path';
import { normalizeUnicode } from './normalize-unicode.js';
import { stripTrailingSlashes } from './strip-trailing-slashes.js';
const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
const isWindows = platform === 'win32';
// return a set of parent dirs for a given path
// '/a/b/c/d' -> ['/', '/a', '/a/b', '/a/b/c', '/a/b/c/d']
const getDirs = (path) => {
const dirs = path
.split('/')
.slice(0, -1)
.reduce((set, path) => {
const s = set.at(-1);
if (s !== undefined) {
path = join(s, path);
}
set.push(path || '/');
return set;
}, []);
return dirs;
};
export class PathReservations {
// path => [function or Set]
// A Set object means a directory reservation
// A fn is a direct reservation on that path
#queues = new Map();
// fn => {paths:[path,...], dirs:[path, ...]}
#reservations = new Map();
// functions currently running
#running = new Set();
reserve(paths, fn) {
paths =
isWindows ?
['win32 parallelization disabled']
: paths.map(p => {
// don't need normPath, because we skip this entirely for windows
return stripTrailingSlashes(join(normalizeUnicode(p)));
});
const dirs = new Set(paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b)));
this.#reservations.set(fn, { dirs, paths });
for (const p of paths) {
const q = this.#queues.get(p);
if (!q) {
this.#queues.set(p, [fn]);
}
else {
q.push(fn);
}
}
for (const dir of dirs) {
const q = this.#queues.get(dir);
if (!q) {
this.#queues.set(dir, [new Set([fn])]);
}
else {
const l = q.at(-1);
if (l instanceof Set) {
l.add(fn);
}
else {
q.push(new Set([fn]));
}
}
}
return this.#run(fn);
}
// return the queues for each path the function cares about
// fn => {paths, dirs}
#getQueues(fn) {
const res = this.#reservations.get(fn);
/* c8 ignore start */
if (!res) {
throw new Error('function does not have any path reservations');
}
/* c8 ignore stop */
return {
paths: res.paths.map((path) => this.#queues.get(path)),
dirs: [...res.dirs].map(path => this.#queues.get(path)),
};
}
// check if fn is first in line for all its paths, and is
// included in the first set for all its dir queues
check(fn) {
const { paths, dirs } = this.#getQueues(fn);
return (paths.every(q => q && q[0] === fn) &&
dirs.every(q => q && q[0] instanceof Set && q[0].has(fn)));
}
// run the function if it's first in line and not already running
#run(fn) {
if (this.#running.has(fn) || !this.check(fn)) {
return false;
}
this.#running.add(fn);
fn(() => this.#clear(fn));
return true;
}
#clear(fn) {
if (!this.#running.has(fn)) {
return false;
}
const res = this.#reservations.get(fn);
/* c8 ignore start */
if (!res) {
throw new Error('invalid reservation');
}
/* c8 ignore stop */
const { paths, dirs } = res;
const next = new Set();
for (const path of paths) {
const q = this.#queues.get(path);
/* c8 ignore start */
if (!q || q?.[0] !== fn) {
continue;
}
/* c8 ignore stop */
const q0 = q[1];
if (!q0) {
this.#queues.delete(path);
continue;
}
q.shift();
if (typeof q0 === 'function') {
next.add(q0);
}
else {
for (const f of q0) {
next.add(f);
}
}
}
for (const dir of dirs) {
const q = this.#queues.get(dir);
const q0 = q?.[0];
/* c8 ignore next - type safety only */
if (!q || !(q0 instanceof Set))
continue;
if (q0.size === 1 && q.length === 1) {
this.#queues.delete(dir);
continue;
}
else if (q0.size === 1) {
q.shift();
// next one must be a function,
// or else the Set would've been reused
const n = q[0];
if (typeof n === 'function') {
next.add(n);
}
}
else {
q0.delete(fn);
}
}
this.#running.delete(fn);
next.forEach(fn => this.#run(fn));
return true;
}
}
//# sourceMappingURL=path-reservations.js.map
@@ -0,0 +1,93 @@
# p-locate [![Build Status](https://travis-ci.com/sindresorhus/p-locate.svg?branch=master)](https://travis-ci.com/github/sindresorhus/p-locate)
> Get the first fulfilled promise that satisfies the provided testing function
Think of it like an async version of [`Array#find`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find).
## Install
```
$ npm install p-locate
```
## Usage
Here we find the first file that exists on disk, in array order.
```js
const pathExists = require('path-exists');
const pLocate = require('p-locate');
const files = [
'unicorn.png',
'rainbow.png', // Only this one actually exists on disk
'pony.png'
];
(async () => {
const foundPath = await pLocate(files, file => pathExists(file));
console.log(foundPath);
//=> 'rainbow'
})();
```
*The above is just an example. Use [`locate-path`](https://github.com/sindresorhus/locate-path) if you need this.*
## API
### pLocate(input, tester, options?)
Returns a `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`.
#### input
Type: `Iterable<Promise | unknown>`
An iterable of promises/values to test.
#### tester(element)
Type: `Function`
This function will receive resolved values from `input` and is expected to return a `Promise<boolean>` or `boolean`.
#### options
Type: `object`
##### concurrency
Type: `number`\
Default: `Infinity`\
Minimum: `1`
Number of concurrently pending promises returned by `tester`.
##### preserveOrder
Type: `boolean`\
Default: `true`
Preserve `input` order when searching.
Disable this to improve performance if you don't care about the order.
## Related
- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently
- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently
- [p-any](https://github.com/sindresorhus/p-any) - Wait for any promise to be fulfilled
- [More…](https://github.com/sindresorhus/promise-fun)
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-p-locate?utm_source=npm-p-locate&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
@@ -0,0 +1,162 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isBindingIdentifier = isBindingIdentifier;
exports.isBlockScoped = isBlockScoped;
exports.isExpression = isExpression;
exports.isFlow = isFlow;
exports.isForAwaitStatement = isForAwaitStatement;
exports.isGenerated = isGenerated;
exports.isPure = isPure;
exports.isReferenced = isReferenced;
exports.isReferencedIdentifier = isReferencedIdentifier;
exports.isReferencedMemberExpression = isReferencedMemberExpression;
exports.isRestProperty = isRestProperty;
exports.isScope = isScope;
exports.isSpreadProperty = isSpreadProperty;
exports.isStatement = isStatement;
exports.isUser = isUser;
exports.isVar = isVar;
var _t = require("@babel/types");
const {
isBinding,
isBlockScoped: nodeIsBlockScoped,
isExportDeclaration,
isExpression: nodeIsExpression,
isFlow: nodeIsFlow,
isForStatement,
isForXStatement,
isIdentifier,
isImportDeclaration,
isImportSpecifier,
isJSXIdentifier,
isJSXMemberExpression,
isMemberExpression,
isRestElement: nodeIsRestElement,
isReferenced: nodeIsReferenced,
isScope: nodeIsScope,
isStatement: nodeIsStatement,
isVar: nodeIsVar,
isVariableDeclaration,
react,
isForOfStatement
} = _t;
const {
isCompatTag
} = react;
function isReferencedIdentifier(opts) {
const {
node,
parent
} = this;
if (isIdentifier(node, opts)) {
return nodeIsReferenced(node, parent, this.parentPath.parent);
} else if (isJSXIdentifier(node, opts)) {
if (!isJSXMemberExpression(parent) && isCompatTag(node.name)) return false;
return nodeIsReferenced(node, parent, this.parentPath.parent);
} else {
return false;
}
}
function isReferencedMemberExpression() {
const {
node,
parent
} = this;
return isMemberExpression(node) && nodeIsReferenced(node, parent);
}
function isBindingIdentifier() {
const {
node,
parent
} = this;
const grandparent = this.parentPath.parent;
return isIdentifier(node) && isBinding(node, parent, grandparent);
}
function isStatement() {
const {
node,
parent
} = this;
if (nodeIsStatement(node)) {
if (isVariableDeclaration(node)) {
if (isForXStatement(parent, {
left: node
})) return false;
if (isForStatement(parent, {
init: node
})) return false;
}
return true;
} else {
return false;
}
}
function isExpression() {
if (this.isIdentifier()) {
return this.isReferencedIdentifier();
} else {
return nodeIsExpression(this.node);
}
}
function isScope() {
return nodeIsScope(this.node, this.parent);
}
function isReferenced() {
return nodeIsReferenced(this.node, this.parent);
}
function isBlockScoped() {
return nodeIsBlockScoped(this.node);
}
function isVar() {
return nodeIsVar(this.node);
}
function isUser() {
var _this$node;
return !!((_this$node = this.node) != null && _this$node.loc);
}
function isGenerated() {
return !this.isUser();
}
function isPure(constantsOnly) {
return this.scope.isPure(this.node, constantsOnly);
}
function isFlow() {
const {
node
} = this;
if (nodeIsFlow(node)) {
return true;
} else if (isImportDeclaration(node)) {
return node.importKind === "type" || node.importKind === "typeof";
} else if (isExportDeclaration(node)) {
return node.exportKind === "type";
} else if (isImportSpecifier(node)) {
return node.importKind === "type" || node.importKind === "typeof";
} else {
return false;
}
}
function isRestProperty() {
var _this$parentPath;
return nodeIsRestElement(this.node) && ((_this$parentPath = this.parentPath) == null ? void 0 : _this$parentPath.isObjectPattern());
}
function isSpreadProperty() {
var _this$parentPath2;
return nodeIsRestElement(this.node) && ((_this$parentPath2 = this.parentPath) == null ? void 0 : _this$parentPath2.isObjectExpression());
}
function isForAwaitStatement() {
return isForOfStatement(this.node, {
await: true
});
}
exports.isExistentialTypeParam = function isExistentialTypeParam() {
throw new Error("`path.isExistentialTypeParam` has been renamed to `path.isExistsTypeAnnotation()` in Babel 7.");
};
exports.isNumericLiteralTypeAnnotation = function isNumericLiteralTypeAnnotation() {
throw new Error("`path.isNumericLiteralTypeAnnotation()` has been renamed to `path.isNumberLiteralTypeAnnotation()` in Babel 7.");
};
//# sourceMappingURL=virtual-types-validator.js.map
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class ValidationError extends Error {
constructor(errors) {
super("validation failed");
this.errors = errors;
this.ajv = this.validation = true;
}
}
exports.default = ValidationError;
//# sourceMappingURL=validation_error.js.map
@@ -0,0 +1,9 @@
# Subresource Integrity
based on Editor’s Draft, 12 June 2025
This module provides support for Subresource Integrity (SRI) in the context of web fetch operations. SRI is a security feature that allows clients to verify that fetched resources are delivered without unexpected manipulation.
## Links
- [Subresource Integrity](https://w3c.github.io/webappsec-subresource-integrity/)
@@ -0,0 +1,14 @@
import {Value} from './index';
/**
* Sass's [mixin type](https://sass-lang.com/documentation/values/mixins).
*
* @category Custom Function
*/
export class SassMixin extends Value {
/**
* It is not possible to construct a Sass mixin outside of Sass. Attempting to
* construct one will throw an exception.
*/
constructor();
}
@@ -0,0 +1,173 @@
/**
* @fileoverview Worker thread for multithread linting.
* @author Francesco Trotta
*/
"use strict";
const hrtimeBigint = process.hrtime.bigint;
const startTime = hrtimeBigint();
// eslint-disable-next-line n/no-unsupported-features/node-builtins -- enable V8's code cache if supported
require("node:module").enableCompileCache?.();
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const { parentPort, threadId, workerData } = require("node:worker_threads");
const {
createConfigLoader,
createDebug,
createDefaultConfigs,
createLinter,
createLintResultCache,
getCacheFile,
lintFile,
loadOptionsFromModule,
processOptions,
} = require("./eslint-helpers");
const { WarningService } = require("../services/warning-service");
const timing = require("../linter/timing");
const depsLoadedTime = hrtimeBigint();
//------------------------------------------------------------------------------
// Typedefs
//------------------------------------------------------------------------------
/** @typedef {import("../types").ESLint.LintResult} LintResult */
/** @typedef {import("../types").ESLint.Options} ESLintOptions */
/** @typedef {LintResult & { index?: number; }} IndexedLintResult */
/** @typedef {IndexedLintResult[] & { netLintingDuration: bigint; timings?: Record<string, number>; }} WorkerLintResults */
/**
* @typedef {Object} WorkerData - Data passed to the worker thread.
* @property {ESLintOptions | string} eslintOptionsOrURL - The unprocessed ESLint options or the URL of the options module.
* @property {Uint32Array<SharedArrayBuffer>} filePathIndexArray - Shared counter used to track the next file to lint.
* @property {string[]} filePaths - File paths to lint.
*/
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const debug = createDebug(`eslint:worker:thread-${threadId}`);
//------------------------------------------------------------------------------
// Main
//------------------------------------------------------------------------------
/*
* Prevent timing module from printing profiling output from worker threads.
* The main thread is responsible for displaying any aggregated timings.
*/
timing.disableDisplay();
debug("Dependencies loaded in %t", depsLoadedTime - startTime);
(async () => {
/** @type {WorkerData} */
const { eslintOptionsOrURL, filePathIndexArray, filePaths } = workerData;
const eslintOptions =
typeof eslintOptionsOrURL === "object"
? eslintOptionsOrURL
: await loadOptionsFromModule(eslintOptionsOrURL);
const processedESLintOptions = processOptions(eslintOptions);
const warningService = new WarningService();
// These warnings are always emitted by the controlling thread.
warningService.emitEmptyConfigWarning =
warningService.emitInactiveFlagWarning = () => {};
const linter = createLinter(processedESLintOptions, warningService);
const cacheFilePath = getCacheFile(
processedESLintOptions.cacheLocation,
processedESLintOptions.cwd,
);
const lintResultCache = createLintResultCache(
processedESLintOptions,
cacheFilePath,
);
const defaultConfigs = createDefaultConfigs(eslintOptions.plugins);
const configLoader = createConfigLoader(
processedESLintOptions,
defaultConfigs,
linter,
warningService,
);
/** @type {WorkerLintResults} */
const indexedResults = [];
let loadConfigTotalDuration = 0n;
const readFileCounter = { duration: 0n };
const lintingStartTime = hrtimeBigint();
debug(
"Linting started %t after dependencies loaded",
lintingStartTime - depsLoadedTime,
);
for (;;) {
const fileLintingStartTime = hrtimeBigint();
// It seems hard to produce an arithmetic overflow under realistic conditions here.
const index = Atomics.add(filePathIndexArray, 0, 1);
const filePath = filePaths[index];
if (!filePath) {
break;
}
const loadConfigEnterTime = hrtimeBigint();
const configs = await configLoader.loadConfigArrayForFile(filePath);
const loadConfigExitTime = hrtimeBigint();
const loadConfigDuration = loadConfigExitTime - loadConfigEnterTime;
debug(
'Config array for file "%s" loaded in %t',
filePath,
loadConfigDuration,
);
loadConfigTotalDuration += loadConfigDuration;
/** @type {IndexedLintResult} */
const result = await lintFile(
filePath,
configs,
processedESLintOptions,
linter,
lintResultCache,
readFileCounter,
);
if (result) {
result.index = index;
indexedResults.push(result);
}
const fileLintingEndTime = hrtimeBigint();
debug(
'File "%s" processed in %t',
filePath,
fileLintingEndTime - fileLintingStartTime,
);
}
const lintingDuration = hrtimeBigint() - lintingStartTime;
/*
* The net linting duration is the total linting time minus the time spent loading configs and reading files.
* It captures the processing time dedicated to computation-intensive tasks that are highly parallelizable and not repeated across threads.
*/
indexedResults.netLintingDuration =
lintingDuration - loadConfigTotalDuration - readFileCounter.duration;
if (timing.enabled) {
indexedResults.timings = timing.getData();
}
parentPort.postMessage(indexedResults);
})();
@@ -0,0 +1,17 @@
import type { TSESLint } from '@typescript-eslint/utils';
export type DirectiveConfig = boolean | 'allow-with-description' | {
descriptionFormat: string;
};
export interface OptionsShape {
minimumDescriptionLength?: number;
'ts-check'?: DirectiveConfig;
'ts-expect-error'?: DirectiveConfig;
'ts-ignore'?: DirectiveConfig;
'ts-nocheck'?: DirectiveConfig;
}
export type Options = [OptionsShape];
export type MessageIds = 'replaceTsIgnoreWithTsExpectError' | 'tsDirectiveComment' | 'tsDirectiveCommentDescriptionNotMatchPattern' | 'tsDirectiveCommentRequiresDescription' | 'tsIgnoreInsteadOfExpectError';
declare const _default: TSESLint.RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, TSESLint.RuleListener> & {
name: string;
};
export default _default;
@@ -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 Clock10 = createLucideIcon("Clock10", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["polyline", { points: "12 6 12 12 8 10", key: "atfzqc" }]
]);
export { Clock10 as default };
//# sourceMappingURL=clock-10.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 ArrowUpRight = createLucideIcon("ArrowUpRight", [
["path", { d: "M7 7h10v10", key: "1tivn9" }],
["path", { d: "M7 17 17 7", key: "1vkiza" }]
]);
export { ArrowUpRight as default };
//# sourceMappingURL=arrow-up-right.js.map
@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const BookUser = createLucideIcon("BookUser", [
["path", { d: "M15 13a3 3 0 1 0-6 0", key: "10j68g" }],
[
"path",
{
d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",
key: "k3hazp"
}
],
["circle", { cx: "12", cy: "8", r: "2", key: "1822b1" }]
]);
export { BookUser as default };
//# sourceMappingURL=book-user.js.map
@@ -0,0 +1,11 @@
MIT License
Copyright (c) Jonathan Ong <me@jongleberry.com>
Copyright (c) Douglas Christopher Wilson <doug@somethingdoug.com>
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.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.