docs: 仓库链接指向本镜像仓库
Build NapCat Artifacts / Type Check & Test (push) Waiting to run

This commit is contained in:
TanTan committed 2026-11-13 09:25:58 +08:00
1 parent f954252a34
commit e311ca3275
35554 files changed
+6229626 -4

No files matched your search

@@ -0,0 +1 @@
{"version":3,"file":"BasePlanParams.d.ts","sourceRoot":"","sources":["../../../../src/planning/models/BasePlanParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,WAAW,cAAc;IAC7B,eAAe,EAAE,eAAe,GAAG,SAAS,CAAC;IAC7C,UAAU,EAAE,oBAAoB,CAAC;IACjC,cAAc,EAAE,iBAAiB,EAAE,CAAC;CACrC"}
@@ -0,0 +1,8 @@
var $568f95594049d56e$exports = {};
$568f95594049d56e$exports = {
"breadcrumbs": `Miez de p\xe2ine`
};
export {$568f95594049d56e$exports as default};
//# sourceMappingURL=ro-RO.module.js.map
@@ -0,0 +1,6 @@
"use client";
import { createContext } from 'react';
const ReorderContext = createContext(null);
export { ReorderContext };
@@ -0,0 +1,951 @@
export default `flf2a$ 9 7 13 15 30
NTGreek by Bruce Jakeway--based on Standard by Glenn Chappell & Ian Chai
Questions and comments regarding ntgreek.flf to pbjakeway@neumann.uwaterloo.ca
For figlet release 2.0
Date: 1994 Apr 2
Explanation of first line:
flf2 - "magic number" for file identification
a - should always be \`a', for now
$ - the "hardblank" -- prints as a blank, but can't be smushed
9 - height of a character
7 - height of a character, not including descenders
13 - max line length (excluding comment lines) + a fudge factor
15 - default smushmode for this font (like "-m 15" on command line)
30 - number of comment lines
Greek keyboard maps:
All keys map to those in standard except:
alpha = A,a lambda = L,l phi = F,f rough breathing = (
beta = B,b mu = M,m chi = C,c smooth breathing = )
gamma = G,g nu = N,n psi = Y,y acute accent = '
delta = D,d xi = X,x omega = w,w grave accent = \`
epsilon = E,e omicron = O,o script theta = J diaresis = ^
zeta = Z,z pi = P,p script phi = j
eta = H,h rho = R,r final sigma = V
theta = Q,q sigma = S,s omega bar = v
iota = I,i tau = T,t raised period = :
kappa = K,k upsilon = U,u iota subscript = _
$@
$@
$@
$@
$@
$@
$@
$@
$@@
@
_ @
| |@
| |@
|_|@
_ @
(_)@
@
@@
@
_ _ @
( )( )@
V V @
@
@
$ @
@
@@
@
_ _ @
_| |_| |_ @
(_ _ _)@
_| |_| |_ @
(_ _ _)@
|_| |_| @
@
@@
_ @
_| |_ @
/ _) @
( (| |_ @
\\_ \\ @
_| |) )@
(_ _/ @
|_| @
@@
@
_ __@
(_) / /@
/ / @
/ / @
/ / _ @
/_/ (_)@
@
@@
@
___ @
/ \\ @
\\ O / @
/ _ \\/\\@
( (_> <@
\\___/\\/@
@
@@
@
@
//@
// @
@
@
@
@
@@
@
@
@
((@
@
@
@
@
@@
@
@
@
))@
@
@
@
@
@@
@
@
__/\\__@
\\ /@
/_ _\\@
\\/ @
@
@
@@
@
@
_ @
_| |_ @
(_ _)@
|_| @
@
@
@@
@
@
$ @
@
@
_ @
( )@
|/ @
@@
@
@
@
_____ @
(_____)@
@
$ @
@
@@
@
@
$ @
@
@
_ @
(_)@
@
@@
@
__@
/ /@
/ / @
/ / @
/ / @
/_/ @
@
@@
@
___ @
/ _ \\ @
| | | |@
| | | |@
| |_| |@
\\___/ @
@
@@
@
_ @
/ |@
- |@
| |@
| |@
|_|@
@
@@
@
____ @
(___ \\ @
__) )@
/ __/ @
| |___ @
|_____)@
@
@@
@
_____ @
(__ / @
/ / @
(__ \\ @
___) )@
(____/ @
@
@@
@
_ @
/ | @
/ o |_ @
/__ _)@
| | @
|_| @
@
@@
@
____ @
| __) @
| |__ @
|___ \\ @
___) )@
(____/ @
@
@@
@
__ @
/ / @
/ /_ @
| '_ \\ @
| (_) )@
\\___/ @
@
@@
@
_____ @
(___ )@
_/ / @
( _) @
/ / @
/_/ @
@
@@
@
___ @
/ \\ @
\\ O / @
/ _ \\ @
( (_) )@
\\___/ @
@
@@
@
___ @
/ _ \\ @
( (_) |@
\\__, |@
/ / @
/_/ @
@
@@
@
@
$ @
_ @
(_)@
@
$ @
@
@@
@
@
@
_ @
(_)@
_ @
( )@
|/ @
@@
@
__@
/ /@
/ / @
< < @
\\ \\ @
\\_\\@
@
@@
@
@
_____ @
(_____)@
_____ @
(_____)@
@
@
@@
@
__ @
\\ \\ @
\\ \\ @
> >@
/ / @
/_/ @
@
@@
@
___ @
(__ \\@
/ /@
|_| @
_ @
(_) @
@
@@
@
_____ @
/ ___ \\ @
/ / | |@
( ( () | |@
\\ \\____/_@
\\______/@
@
@@
@
___ @
/ _ \\ @
| |_| |@
| _ |@
| | | |@
|_| |_|@
@
@@
@
____ @
| _ \\ @
| |_) )@
| _ ( @
| |_) )@
|____/ @
@
@@
@
__ __@
\\ \\ / /@
\\ v / @
> < @
/ ^ \\ @
/_/ \\_\\@
@
@@
@
@
/\\ @
/ \\ @
/ /\\ \\ @
/ /__\\ \\ @
/________\\@
@
@@
@
_____ @
| ___)@
| |_ @
| _) @
| |___ @
|_____)@
@
@@
@
_ @
_| |_ @
/ \\ @
( (| |) )@
\\_ _/ @
|_| @
@
@@
@
_____ @
| ___)@
| |$ @
| |$ @
| | @
|_| @
@
@@
@
_ _ @
| | | |@
| |_| |@
| _ |@
| | | |@
|_| |_|@
@
@@
@
___ @
( )@
| | @
| | @
| | @
(___)@
@
@@
@
___ @
/ _ \\ @
( (_| |_ @
_ \\ _ _)@
| |___| | @
\\_____/ @
@
@@
@
_ __@
| | / /@
| |/ / @
| < @
| |\\ \\ @
|_| \\_\\@
@
@@
@
@
/\\ @
/ \\ @
/ /\\ \\ @
/ / \\ \\ @
/_/ \\_\\@
@
@@
@
__ __ @
| \\ / |@
| v |@
| |\\_/| |@
| | | |@
|_| |_|@
@
@@
@
_ _ @
| \\ | |@
| \\| |@
| |@
| |\\ |@
|_| \\_|@
@
@@
@
___ @
/ _ \\ @
| | | |@
| | | |@
| |_| |@
\\___/ @
@
@@
@
_______ @
( _ )@
| | | | @
| | | | @
| | | | @
|_| |_| @
@
@@
@
____ @
/ __ \\ @
| |__| |@
| __ |@
| |__| |@
\\____/ @
@
@@
@
____ @
| _ \\ @
| |_) )@
| __/ @
| | @
|_| @
@
@@
@
______ @
\\ ___)@
\\ \\ @
> > @
/ /__ @
/_____)@
@
@@
@
_____ @
(_ _)@
| | @
| | @
| | @
|_| @
@
@@
@
__ __ @
(_ \\ / _)@
\\ v / @
| | @
| | @
|_| @
@
@@
@
@
@
____ @
/ ___)@
( (__ @
\\__ \\ @
_) )@
(__/ @@
@
____ @
/ __ \\ @
| | | | @
| | | | @
_\\ \\/ /_ @
(___||___)@
@
@@
@
_____ @
(_____)@
___ @
(___) @
_____ @
(_____)@
@
@@
@
_ _ _ @
| || || |@
| \\| |/ |@
\\_ _/ @
| | @
|_| @
@
@@
@
______@
(___ /@
/ / @
/ / @
/ /__ @
/_____)@
@
@@
___ @
| _)@
| | @
| | @
| | @
| | @
| |_ @
|___)@
@@
@
__ @
\\ \\ @
\\ \\ @
\\ \\ @
\\ \\ @
\\_\\@
@
@@
___ @
(_ |@
| |@
| |@
| |@
| |@
_| |@
(___|@
@@
@
_ _ @
(_) (_)@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
||@@
@
@
\\\\ @
\\\\@
@
@
@
@
@@
@
@
@
__ __@
/ \\/ /@
( () < @
\\__/\\_\\@
@
@@
@
___ @
/ _ \\ @
| |_) )@
| _ < @
| |_) )@
| __/ @
| | @
|_| @@
@
@
@
__ __@
\\ \\ / /@
\\ v / @
> < @
/ ^ \\ @
/_/ \\_\\@@
@
__ @
/ _) @
\\ \\ @
/ _ \\ @
( (_) )@
\\___/ @
@
@@
@
@
@
___ @
/ __)@
> _) @
\\___)@
@
@@
@
_ @
| | @
_| |_ @
/ \\ @
( (| |) )@
\\_ _/ @
| | @
|_| @@
@
@
@
_ _ @
( \\ / )@
\\ v / @
| | @
| | @
|_| @@
@
@
@
_ __ @
| '_ \\ @
| | | |@
|_| | |@
| |@
|_|@@
@
@
@
_ @
| | @
| | @
\\_)@
@
@@
@
@
@
_ __ @
| | / \\ @
| || || )@
\\_ _/ @
| | @
|_| @@
@
@
@
_ __@
| |/ /@
| < @
|_|\\_\\@
@
@@
@
__ @
\\ \\ @
\\ \\ @
> \\ @
/ ^ \\ @
/_/ \\_\\@
@
@@
@
@
@
_ _ @
| | | |@
| |_| |@
| ._,_|@
| | @
|_| @@
@
@
@
_ __@
| |/ /@
| / / @
|__/ @
@
@@
@
@
@
___ @
/ _ \\ @
( (_) )@
\\___/ @
@
@@
@
@
@
______ @
( __ )@
| || | @
|_||_| @
@
@@
@
___ @
/ _ \\ @
| |_| |@
| _ |@
| |_| |@
\\___/ @
@
@@
@
@
@
___ @
/ _ \\ @
| |_) )@
| __/ @
| | @
|_| @@
@
@
@
____ @
/ ._)@
( () ) @
\\__/ @
@
@@
@
@
@
___ @
( )@
| | @
\\_)@
@
@@
@
@
@
_ _ @
| | | |@
| |_| |@
\\___/ @
@
@@
@
@
@
_________ @
( _____ )@
| |_/ \\_| |@
\\___^___/ @
@
@@
@
@
@
__ __ @
/ / _ \\ \\ @
| |_/ \\_| |@
\\___^___/ @
@
@@
__ @
\\ \\__ @
> __) @
( (_ @
> _) @
( (__ @
\\__ \\ @
) )@
(_/ @@
@
@
@
_ _ _ @
| || || |@
| \\| |/ |@
\\_ _/ @
| | @
|_| @@
@
_____ @
\\__ ) @
/ / @
/ / @
| |__ @
\\__ \\ @
) )@
(_/ @@
__@
/ /@
| | @
| | @
< < @
| | @
| | @
\\_\\@
@@
_ @
| |@
| |@
| |@
| |@
| |@
| |@
|_|@
@@
__ @
\\ \\ @
| | @
| | @
> >@
| | @
| | @
/_/ @
@@
@
/\\/|@
|/\\/ @
@
@
@
@
@
@@
_ _ @
(_)_(_)@
/ _ \\ @
| |_| |@
| _ |@
| | | |@
|_| |_|@
@
@@
_ _ @
(_)_(_)@
/ _ \\ @
| | | |@
| | | |@
| |_| |@
\\___/ @
@
@@
_ _ @
(_) (_)@
| | | |@
| | | |@
| | | |@
| |_| |@
\\___/ @
@
@@
@
@
_ _ @
(_)_(_)@
/ _\` |@
( (_| |@
\\__,_|@
@
@@
@
@
_ _ @
(_)_(_)@
/ _ \\ @
( (_) )@
\\___/ @
@
@@
@
@
_ _ @
(_) (_)@
| | | |@
| |_| |@
\\__,_|@
@
@@
@
___ @
/ _ \\ @
| | ) )@
| |< < @
| | ) )@
| ||_/ @
|_| @
@@
`
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.containsMessageType = void 0;
const message_type_contract_1 = require("./message-type-contract");
/**
* Check if the provided object is a proto message.
*
* Note that this is an experimental feature - it is here to stay, but
* implementation details may change without notice.
*/
function containsMessageType(msg) {
return msg[message_type_contract_1.MESSAGE_TYPE] != null;
}
exports.containsMessageType = containsMessageType;
@@ -0,0 +1,27 @@
ESQuery is a library for querying the AST output by Esprima for patterns of syntax using a CSS style selector system. Check out the demo:
[demo](https://estools.github.io/esquery/)
The following selectors are supported:
* AST node type: `ForStatement`
* [wildcard](http://dev.w3.org/csswg/selectors4/#universal-selector): `*`
* [attribute existence](http://dev.w3.org/csswg/selectors4/#attribute-selectors): `[attr]`
* [attribute value](http://dev.w3.org/csswg/selectors4/#attribute-selectors): `[attr="foo"]` or `[attr=123]`
* attribute regex: `[attr=/foo.*/]` or (with flags) `[attr=/foo.*/is]`
* attribute conditions: `[attr!="foo"]`, `[attr>2]`, `[attr<3]`, `[attr>=2]`, or `[attr<=3]`
* nested attribute: `[attr.level2="foo"]`
* field: `FunctionDeclaration > Identifier.id`
* [First](http://dev.w3.org/csswg/selectors4/#the-first-child-pseudo) or [last](http://dev.w3.org/csswg/selectors4/#the-last-child-pseudo) child: `:first-child` or `:last-child`
* [nth-child](http://dev.w3.org/csswg/selectors4/#the-nth-child-pseudo) (no ax+b support): `:nth-child(2)`
* [nth-last-child](http://dev.w3.org/csswg/selectors4/#the-nth-last-child-pseudo) (no ax+b support): `:nth-last-child(1)`
* [descendant](http://dev.w3.org/csswg/selectors4/#descendant-combinators): `ancestor descendant`
* [child](http://dev.w3.org/csswg/selectors4/#child-combinators): `parent > child`
* [following sibling](http://dev.w3.org/csswg/selectors4/#general-sibling-combinators): `node ~ sibling`
* [adjacent sibling](http://dev.w3.org/csswg/selectors4/#adjacent-sibling-combinators): `node + adjacent`
* [negation](http://dev.w3.org/csswg/selectors4/#negation-pseudo): `:not(ForStatement)`
* [has](https://drafts.csswg.org/selectors-4/#has-pseudo): `:has(ForStatement)`, `:has(> ForStatement)`
* [matches-any](http://dev.w3.org/csswg/selectors4/#matches): `:matches([attr] > :first-child, :last-child)`
* [subject indicator](http://dev.w3.org/csswg/selectors4/#subject): `!IfStatement > [name="foo"]`
* class of AST node: `:statement`, `:expression`, `:declaration`, `:function`, or `:pattern`
[![Build Status](https://travis-ci.org/estools/esquery.png?branch=master)](https://travis-ci.org/estools/esquery)
@@ -0,0 +1 @@
{"mappings":"AAAA;;;;;;;;;;CAUC,GAED;;CAEC,GACM,SAAS,0CAAM,GAAG,SAAgB;IACvC,OAAO,CAAC,GAAG;QACT,KAAK,IAAI,YAAY,UACnB,IAAI,OAAO,aAAa,YACtB,YAAY;IAGlB;AACF","sources":["packages/@react-aria/utils/src/chain.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Calls all functions in the order they were chained with the same arguments.\n */\nexport function chain(...callbacks: any[]): (...args: any[]) => void {\n return (...args: any[]) => {\n for (let callback of callbacks) {\n if (typeof callback === 'function') {\n callback(...args);\n }\n }\n };\n}\n"],"names":[],"version":3,"file":"chain.module.js.map"}
@@ -0,0 +1 @@
{"version":3,"file":"resolveInstanceBindingNodeAsyncFromConstructorParams.spec.d.ts","sourceRoot":"","sources":["../../../../src/resolution/actions/resolveInstanceBindingNodeAsyncFromConstructorParams.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
{"name":"tailwindcss","version":"3.4.18","requiresBuild":false,"files":{"stubs/.gitignore":{"checkedAt":1794532105022,"integrity":"sha512-ar32FAThSefkgFH5IZUsgHBchwneYe7LeCm6URFov6cbxZKYgnWTP/d0T6v756ZR1qHh5YwXvvt/tQvRMyEEgA==","mode":420,"size":3},"types/generated/.gitkeep":{"checkedAt":1794532105022,"integrity":"sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==","mode":420,"size":0},"lib/css/LICENSE":{"checkedAt":1794532105022,"integrity":"sha512-uRJDX/XuYzNYaIy/i4fSpM9xkRAdWa1J5Hg1SpYRf9PFXWrPQS17D2XzNkm1iKVfCnhTxllw5heLLbC4mKAmkQ==","mode":420,"size":1226},"lib/value-parser/LICENSE":{"checkedAt":1794532105023,"integrity":"sha512-XKa66wOLW8mnxzbgny39djP+oLGiQF8EVa8Ca3siBEhFmK/8GVQvkzCMnnLbTtuw6aVV8Gs6Kbc8a2gp3WXKKA==","mode":420,"size":1074},"LICENSE":{"checkedAt":1794532105023,"integrity":"sha512-9X+sI7UOelzzysUtes9vKamnAYfathdWUsIyS1QlQ5lSXr/i62gEli2uj9/sd5mFKW+aAmOdaTEAhqFEG5CWIA==","mode":420,"size":1071},"src/css/LICENSE":{"checkedAt":1794532105022,"integrity":"sha512-uRJDX/XuYzNYaIy/i4fSpM9xkRAdWa1J5Hg1SpYRf9PFXWrPQS17D2XzNkm1iKVfCnhTxllw5heLLbC4mKAmkQ==","mode":420,"size":1226},"src/value-parser/LICENSE":{"checkedAt":1794532105023,"integrity":"sha512-XKa66wOLW8mnxzbgny39djP+oLGiQF8EVa8Ca3siBEhFmK/8GVQvkzCMnnLbTtuw6aVV8Gs6Kbc8a2gp3WXKKA==","mode":420,"size":1074},"stubs/postcss.config.cjs":{"checkedAt":1794532105023,"integrity":"sha512-ZzY0j20zcCT8Gd5DWoGE7LXSUdq7/CqTsp/DcLgDd0i9VIGxG2ge0Y8mWN/t7fWavn2ThYvUsb+qi5q72cPlfA==","mode":420,"size":82},"stubs/tailwind.config.cjs":{"checkedAt":1794532105023,"integrity":"sha512-t+abudGW23MYGGUP0/jk8IJL1ps4ocCtxCJDjwW6Lcl8MQxzoTKkhY72N+R02MIPE/DodwYIWMvtTvMuorvarw==","mode":420,"size":72},"base.css":{"checkedAt":1794532105023,"integrity":"sha512-06VN0LgwpSBMBDcZPlVscF39CFJHwZ63qHWKFSPFXoHFlLZ8GB0WN8wSs1Pm3/tOeNZK6gGXjbHEOnD6ZWdJLA==","mode":420,"size":16},"components.css":{"checkedAt":1794532105023,"integrity":"sha512-N2ijjQXdXzDc4PMblM07ORqNsTzr1mFH+1VaJnle9OIceUd1f60gnCoqhyhHg9KGL039w+vc/qYf6+s2vBqjCA==","mode":420,"size":22},"lib/css/preflight.css":{"checkedAt":1794532105024,"integrity":"sha512-m4RFGBGHuy4ute4wkU2KX/hxQOrx9ved7ls5xxjUTVg5OdiRX0qxkI12gwd2xiLL4OcFiH1jdBsfyoDBM9VHCA==","mode":420,"size":7805},"src/css/preflight.css":{"checkedAt":1794532105024,"integrity":"sha512-m4RFGBGHuy4ute4wkU2KX/hxQOrx9ved7ls5xxjUTVg5OdiRX0qxkI12gwd2xiLL4OcFiH1jdBsfyoDBM9VHCA==","mode":420,"size":7805},"screens.css":{"checkedAt":1794532105024,"integrity":"sha512-9TQ0cQA+mJCIp2V5yCM++/XhPe1shlfY5yTdzbGaUKh8oLuhm6abMVgHYC7jmWD0UiKbam3xJlp4qgHVS9eN1A==","mode":420,"size":19},"tailwind.css":{"checkedAt":1794532105024,"integrity":"sha512-Aa9K/CB1+RzO++VAUpEzdt05ynJSKVQDQU/i4PoPiT22kg9asH8t1L65CO8hc2M4JfFNeyEdFuhxhPlo5YALNQ==","mode":420,"size":61},"utilities.css":{"checkedAt":1794532105024,"integrity":"sha512-4ljbED4svCUiDpk+4DuL2hRE5Ib1SnYw503s+xXLkjJyoScVSoZ+Q6+QSn6w5BhYb65CG0iZb3wZIyuEpakr6A==","mode":420,"size":21},"variants.css":{"checkedAt":1794532105024,"integrity":"sha512-CLRRwvc6hcBzSyz1N19o2CP0/3UvUObEt71NVRY3Mk0TraAjjHwQvjeM5dPQHCSgdzNe2SxGDZhT7y6fdwZtmw==","mode":420,"size":20},"lib/util/applyImportantSelector.js":{"checkedAt":1794532105024,"integrity":"sha512-cLg8Ok8N7BRRNup20ktVzpVsg4cWZxvS9vnPezj/CMOZo5NapU0ptPij7tn+mU8MEn3R5IHCdfGOhqzfMJ6Mfg==","mode":420,"size":1381},"src/util/applyImportantSelector.js":{"checkedAt":1794532105024,"integrity":"sha512-a/wKoSJURzvbqvgjlmbWxx9vkExzx6oMlPk/RfXrBKeauUKe1EdMbVdwVk5BjqVwbUdVFdJZWYXLSGdPem3EXg==","mode":420,"size":774},"lib/util/bigSign.js":{"checkedAt":1794532105025,"integrity":"sha512-6UyMtPo2wVO1gkUoZs4q79dKKI2h9wedZoMmNDrJMofLDQo6IEMAolipkHp7oGwooDW+abgfThhzTJKysUkbuA==","mode":420,"size":289},"src/util/bigSign.js":{"checkedAt":1794532105025,"integrity":"sha512-5gA180QpVa6uCN7VhOkM6fmOz5DrcQLdR/gg7H5jlYdgh8L3LoCRAqpOQZORp2d1dmD5ycmqSx0yrkSZpPw2Bw==","mode":420,"size":98},"lib/util/buildMediaQuery.js":{"checkedAt":1794532105025,"integrity":"sha512-DzfAlT3fN+qJGDsBLd16l97zIZ2wT4sRKkhPe0dlDVTSxCcL1D5aGe43CPd6eu6CDMVQlu4DrT0Mpvu5ZJUuWA==","mode":420,"size":780},"src/util/buildMediaQuery.js":{"checkedAt":1794532105025,"integrity":"sha512-Oa5XG+MMxbOpRPgvomjxTRngmPDzUfkd14zU/BAXSCob56OHFrZ9C8K2Coq6c/E5u8HDZxforsxfMgYuQy9xRQ==","mode":420,"size":560},"lib/lib/cacheInvalidation.js":{"checkedAt":1794532105025,"integrity":"sha512-whVRNQXC1tWjylLdmwXV+S0exd5/2alFWVhH8a5WaV1xNMTmIIWNpiu4qGylnqOsFZOYPVb8UqpdOL7YpP+P1Q==","mode":420,"size":3030},"src/lib/cacheInvalidation.js":{"checkedAt":1794532105025,"integrity":"sha512-/djRhF/iApO85j1pgLrZci7YnpTFyWEOdXw3ZGlFMAIp9XSGW7MxGtNZ+rhGzb7xyFqg0K7gWWFWVB9g+eFL9A==","mode":420,"size":1386},"lib/cli-peer-dependencies.js":{"checkedAt":1794532105025,"integrity":"sha512-Cm16Vj5Wo1qQz5IZFguInrYgC9UmWApgK1zSmJW627CLxhxJ5ZekUerYVTXkXjL7/mFMqX2JonWL/JTPJn235w==","mode":420,"size":793},"src/cli-peer-dependencies.js":{"checkedAt":1794532105025,"integrity":"sha512-/UN4VNDnknlc7WXbPWxY+tybTx4g2AO5x4iWRcv8Bes+CRfpg6rRE0hK1wzZJQZHte4y1/fnCoKz0gl3jonJLine truncated
@@ -0,0 +1,228 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const util_1 = require("../util");
const getForStatementHeadLoc_1 = require("../util/getForStatementHeadLoc");
const isPromiseAggregatorMethod_1 = require("../util/isPromiseAggregatorMethod");
exports.default = (0, util_1.createRule)({
name: 'await-thenable',
meta: {
type: 'problem',
docs: {
description: 'Disallow awaiting a value that is not a Thenable',
recommended: 'recommended',
requiresTypeChecking: true,
},
hasSuggestions: true,
messages: {
await: 'Unexpected `await` of a non-Promise (non-"Thenable") value.',
awaitUsingOfNonAsyncDisposable: 'Unexpected `await using` of a value that is not async disposable.',
convertToOrdinaryFor: 'Convert to an ordinary `for...of` loop.',
forAwaitOfNonAsyncIterable: 'Unexpected `for await...of` of a value that is not async iterable.',
invalidPromiseAggregatorInput: 'Unexpected iterable of non-Promise (non-"Thenable") values passed to promise aggregator.',
removeAwait: 'Remove unnecessary `await`.',
},
schema: [],
},
defaultOptions: [],
create(context) {
const services = (0, util_1.getParserServices)(context);
const checker = services.program.getTypeChecker();
return {
AwaitExpression(node) {
const awaitArgumentEsNode = node.argument;
const awaitArgumentType = services.getTypeAtLocation(awaitArgumentEsNode);
const awaitArgumentTsNode = services.esTreeNodeToTSNodeMap.get(awaitArgumentEsNode);
const certainty = (0, util_1.needsToBeAwaited)(checker, awaitArgumentTsNode, awaitArgumentType);
if (certainty === util_1.Awaitable.Never) {
context.report({
node,
messageId: 'await',
suggest: [
{
messageId: 'removeAwait',
fix(fixer) {
const awaitKeyword = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(node, util_1.isAwaitKeyword), util_1.NullThrowsReasons.MissingToken('await', 'await expression'));
return fixer.remove(awaitKeyword);
},
},
],
});
}
},
CallExpression(node) {
if (!(0, isPromiseAggregatorMethod_1.isPromiseAggregatorMethod)(context, services, node)) {
return;
}
const argument = node.arguments.at(0);
if (argument == null) {
return;
}
if (argument.type === utils_1.TSESTree.AST_NODE_TYPES.ArrayExpression) {
for (const element of argument.elements) {
if (element == null) {
continue;
}
const type = (0, util_1.getConstrainedTypeAtLocation)(services, element);
const tsNode = services.esTreeNodeToTSNodeMap.get(element);
if (isAlwaysNonAwaitableType(type, tsNode, checker)) {
context.report({
node: element,
messageId: 'invalidPromiseAggregatorInput',
});
}
}
return;
}
const type = (0, util_1.getConstrainedTypeAtLocation)(services, argument);
if (isInvalidPromiseAggregatorInput(checker, services.esTreeNodeToTSNodeMap.get(argument), type)) {
context.report({
node: argument,
messageId: 'invalidPromiseAggregatorInput',
});
}
},
'ForOfStatement[await=true]'(node) {
const type = services.getTypeAtLocation(node.right);
if ((0, util_1.isTypeAnyType)(type)) {
return;
}
const hasAsyncIteratorSymbol = tsutils
.unionConstituents(type)
.some(typePart => tsutils.getWellKnownSymbolPropertyOfType(typePart, 'asyncIterator', checker) != null);
if (!hasAsyncIteratorSymbol) {
context.report({
loc: (0, getForStatementHeadLoc_1.getForStatementHeadLoc)(context.sourceCode, node),
messageId: 'forAwaitOfNonAsyncIterable',
suggest: [
// Note that this suggestion causes broken code for sync iterables
// of promises, since the loop variable is not awaited.
{
messageId: 'convertToOrdinaryFor',
fix(fixer) {
const awaitToken = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(node, util_1.isAwaitKeyword), util_1.NullThrowsReasons.MissingToken('await', 'for await loop'));
return fixer.remove(awaitToken);
},
},
],
});
}
},
'VariableDeclaration[kind="await using"]'(node) {
for (const declarator of node.declarations) {
const init = declarator.init;
if (init == null) {
continue;
}
const type = services.getTypeAtLocation(init);
if ((0, util_1.isTypeAnyType)(type)) {
continue;
}
const hasAsyncDisposeSymbol = tsutils
.unionConstituents(type)
.some(typePart => tsutils.getWellKnownSymbolPropertyOfType(typePart, 'asyncDispose', checker) != null);
if (!hasAsyncDisposeSymbol) {
context.report({
node: init,
messageId: 'awaitUsingOfNonAsyncDisposable',
// let the user figure out what to do if there's
// await using a = b, c = d, e = f;
// it's rare and not worth the complexity to handle.
...(0, util_1.getFixOrSuggest)({
fixOrSuggest: node.declarations.length === 1 ? 'suggest' : 'none',
suggestion: {
messageId: 'removeAwait',
fix(fixer) {
const awaitToken = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(node, util_1.isAwaitKeyword), util_1.NullThrowsReasons.MissingToken('await', 'await using'));
return fixer.remove(awaitToken);
},
},
}),
});
}
}
},
};
},
});
function isInvalidPromiseAggregatorInput(checker, node, type) {
// non array/tuple/iterable types already show up as a type error
if (!isIterable(type, checker)) {
return false;
}
for (const part of tsutils.unionConstituents(type)) {
const valueTypes = getValueTypesOfArrayLike(part, checker);
if (valueTypes != null) {
for (const typeArgument of valueTypes) {
if (containsNonAwaitableType(typeArgument, node, checker)) {
return true;
}
}
}
}
return false;
}
function getValueTypesOfArrayLike(type, checker) {
if (checker.isTupleType(type)) {
return checker.getTypeArguments(type);
}
if (checker.isArrayLikeType(type)) {
return [
(0, util_1.nullThrows)(type.getNumberIndexType(), 'number index type should exist on an array-like'),
];
}
// `Iterable<...>`
if (tsutils.isTypeReference(type)) {
return checker.getTypeArguments(type).slice(0, 1);
}
return null;
}
function isAlwaysNonAwaitableType(type, node, checker) {
return tsutils
.unionConstituents(type)
.every(typeArgumentPart => (0, util_1.needsToBeAwaited)(checker, node, typeArgumentPart) === util_1.Awaitable.Never);
}
function containsNonAwaitableType(type, node, checker) {
return tsutils
.unionConstituents(type)
.some(typeArgumentPart => (0, util_1.needsToBeAwaited)(checker, node, typeArgumentPart) === util_1.Awaitable.Never);
}
function isIterable(type, checker) {
return tsutils
.unionConstituents(type)
.every(part => !!tsutils.getWellKnownSymbolPropertyOfType(part, 'iterator', checker));
}
@@ -0,0 +1 @@
!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_duration=s()}(this,(function(){"use strict";var t,s,n=1e3,i=6e4,e=36e5,r=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,d=2628e6,a=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:u,months:d,days:r,hours:e,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},c=function(t){return t instanceof g},f=function(t,s,n){return new g(t,n,s.$l)},m=function(t){return s.p(t)+"s"},l=function(t){return t<0},$=function(t){return l(t)?Math.ceil(t):Math.floor(t)},y=function(t){return Math.abs(t)},v=function(t,s){return t?l(t)?{negative:!0,format:""+y(t)+s}:{negative:!1,format:""+t+s}:{negative:!1,format:""}},g=function(){function l(t,s,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),s)return f(t*h[m(s)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach((function(s){i.$d[m(s)]=t[s]})),this.calMilliseconds(),this;if("string"==typeof t){var e=t.match(a);if(e){var r=e.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var y=l.prototype;return y.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(s,n){return s+(t.$d[n]||0)*h[n]}),0)},y.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=$(t/u),t%=u,this.$d.months=$(t/d),t%=d,this.$d.days=$(t/r),t%=r,this.$d.hours=$(t/e),t%=e,this.$d.minutes=$(t/i),t%=i,this.$d.seconds=$(t/n),t%=n,this.$d.milliseconds=t},y.toISOString=function(){var t=v(this.$d.years,"Y"),s=v(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=v(n,"D"),e=v(this.$d.hours,"H"),r=v(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var u=v(o,"S"),d=t.negative||s.negative||i.negative||e.negative||r.negative||u.negative,a=e.format||r.format||u.format?"T":"",h=(d?"-":"")+"P"+t.format+s.format+i.format+a+e.format+r.format+u.format;return"P"===h||"-P"===h?"P0D":h},y.toJSON=function(){return this.toISOString()},y.format=function(t){var n=t||"YYYY-MM-DDTHH:mm:ss",i={Y:this.$d.years,YY:s.s(this.$d.years,2,"0"),YYYY:s.s(this.$d.years,4,"0"),M:this.$d.months,MM:s.s(this.$d.months,2,"0"),D:this.$d.days,DD:s.s(this.$d.days,2,"0"),H:this.$d.hours,HH:s.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,"0"),SSS:s.s(this.$d.milliseconds,3,"0")};return n.replace(o,(function(t,s){return s||String(i[t])}))},y.as=function(t){return this.$ms/h[m(t)]},y.get=function(t){var s=this.$ms,n=m(t);return"milliseconds"===n?s%=1e3:s="weeks"===n?$(s/h[n]):this.$d[n],s||0},y.add=function(t,s,n){var i;return i=s?t*h[m(s)]:c(t)?t.$ms:f(t,this).$ms,f(this.$ms+i*(n?-1:1),this)},y.subtract=function(t,s){return this.add(t,s,!0)},y.locale=function(t){var s=this.clone();return s.$l=t,s},y.clone=function(){return f(this.$ms,this)},y.humanize=function(s){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!s)},y.valueOf=function(){return this.asMilliseconds()},y.milliseconds=function(){return this.get("milliseconds")},y.asMilliseconds=function(){return this.as("milliseconds")},y.seconds=function(){return this.get("seconds")},y.asSeconds=function(){return this.as("seconds")},y.minutes=function(){return this.get("minutes")},y.asMinutes=function(){return this.as("minutes")},y.hours=function(){return this.get("hours")},y.asHours=function(){return this.as("hours")},y.days=function(){return this.get("days")},y.asDays=function(){return this.as("days")},y.weeks=function(){return this.get("weeks")},y.asWeeks=function(){return this.as("weeks")},y.months=function(){return this.get("months")},y.asMonths=function(){return this.as("months")},y.years=function(){return this.get("years")},y.asYears=function(){return this.as("years")},l}(),p=function(t,s,n){return t.add(s.years()*n,"y").add(s.months()*n,"M").add(s.days()*n,"d").add(s.hours()*n,"h").add(s.minutes()*n,"m").add(s.seconds()*n,"s").add(s.milliseconds()*n,"ms")};return function(n,i,e){t=e,s=e().$utils(),e.duration=function(t,s){var n=e.locale();return f(t,{$l:n},s)},e.isDuration=c;var r=i.prototype.add,o=i.prototype.subtract;i.prototype.add=function(t,s){return c(t)?p(this,t,1):r.bind(this)(t,s)},i.prototype.subtract=function(t,s){return c(t)?p(this,t,-1):o.bind(this)(t,s)}}}));
@@ -0,0 +1,28 @@
import baseMerge from './_baseMerge.js';
import isObject from './isObject.js';
/**
* Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
* objects into destination objects that are passed thru.
*
* @private
* @param {*} objValue The destination value.
* @param {*} srcValue The source value.
* @param {string} key The key of the property to merge.
* @param {Object} object The parent object of `objValue`.
* @param {Object} source The parent object of `srcValue`.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
* @returns {*} Returns the value to assign.
*/
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
if (isObject(objValue) && isObject(srcValue)) {
// Recursively merge objects and arrays (susceptible to call stack limits).
stack.set(srcValue, objValue);
baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
stack['delete'](srcValue);
}
return objValue;
}
export default customDefaultsMerge;
@@ -0,0 +1,53 @@
'use strict';
// These testcases are specific to one uncommon behavior in path module. Few
// of the functions in path module, treat '' strings as current working
// directory. This test makes sure that the behavior is intact between commits.
// See: https://github.com/nodejs/node/pull/2106
var tape = require('tape');
var path = require('../');
var pwd = process.cwd();
tape('path.join zero-length', function (t) {
// join will internally ignore all the zero-length strings and it will return
// '.' if the joined string is a zero-length string.
t.strictEqual(path.posix.join(''), '.');
t.strictEqual(path.posix.join('', ''), '.');
if (path.win32) t.strictEqual(path.win32.join(''), '.');
if (path.win32) t.strictEqual(path.win32.join('', ''), '.');
t.strictEqual(path.join(pwd), pwd);
t.strictEqual(path.join(pwd, ''), pwd);
t.end();
});
tape('path.normalize zero-length', function (t) {
// normalize will return '.' if the input is a zero-length string
t.strictEqual(path.posix.normalize(''), '.');
if (path.win32) t.strictEqual(path.win32.normalize(''), '.');
t.strictEqual(path.normalize(pwd), pwd);
t.end();
});
tape('path.isAbsolute zero-length', function (t) {
// Since '' is not a valid path in any of the common environments, return false
t.strictEqual(path.posix.isAbsolute(''), false);
if (path.win32) t.strictEqual(path.win32.isAbsolute(''), false);
t.end();
});
tape('path.resolve zero-length', function (t) {
// resolve, internally ignores all the zero-length strings and returns the
// current working directory
t.strictEqual(path.resolve(''), pwd);
t.strictEqual(path.resolve('', ''), pwd);
t.end();
});
tape('path.relative zero-length', function (t) {
// relative, internally calls resolve. So, '' is actually the current directory
t.strictEqual(path.relative('', pwd), '');
t.strictEqual(path.relative(pwd, ''), '');
t.strictEqual(path.relative(pwd, pwd), '');
t.end();
});
@@ -0,0 +1,9 @@
import { COSECRV } from '../../cose.js';
import type { Uint8Array_ } from '../../../types/index.js';
/**
* In WebAuthn, EC2 signatures are wrapped in ASN.1 structure so we need to peel r and s apart.
*
* See https://www.w3.org/TR/webauthn-2/#sctn-signature-attestation-types
*/
export declare function unwrapEC2Signature(signature: Uint8Array_, crv: COSECRV): Uint8Array_;
//# sourceMappingURL=unwrapEC2Signature.d.ts.map
@@ -0,0 +1,4 @@
import { ContainerBlot } from 'parchment';
class Container extends ContainerBlot {}
export default Container;
//# sourceMappingURL=container.js.map
@@ -0,0 +1,22 @@
import type * as TSESLint from '../ts-eslint';
import type { ParserServices, ParserServicesWithTypeInformation } from '../ts-estree';
/**
* Try to retrieve type-aware parser service from context.
* This **_will_** throw if it is not available.
*/
export declare function getParserServices<MessageIds extends string, Options extends readonly unknown[]>(context: Readonly<TSESLint.RuleContext<MessageIds, Options>>): ParserServicesWithTypeInformation;
/**
* Try to retrieve type-aware parser service from context.
* This **_will_** throw if it is not available.
*/
export declare function getParserServices<MessageIds extends string, Options extends readonly unknown[]>(context: Readonly<TSESLint.RuleContext<MessageIds, Options>>, allowWithoutFullTypeInformation: false): ParserServicesWithTypeInformation;
/**
* Try to retrieve type-aware parser service from context.
* This **_will not_** throw if it is not available.
*/
export declare function getParserServices<MessageIds extends string, Options extends readonly unknown[]>(context: Readonly<TSESLint.RuleContext<MessageIds, Options>>, allowWithoutFullTypeInformation: true): ParserServices;
/**
* Try to retrieve type-aware parser service from context.
* This may or may not throw if it is not available, depending on if `allowWithoutFullTypeInformation` is `true`
*/
export declare function getParserServices<MessageIds extends string, Options extends readonly unknown[]>(context: Readonly<TSESLint.RuleContext<MessageIds, Options>>, allowWithoutFullTypeInformation: boolean): ParserServices;
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
if (typeof Reflect === "undefined" || !Reflect.getMetadata) {
throw new Error(`tsyringe requires a reflect polyfill. Please add 'import "reflect-metadata"' to the top of your entry point.`);
}
var types_1 = require("./types");
Object.defineProperty(exports, "Lifecycle", { enumerable: true, get: function () { return types_1.Lifecycle; } });
tslib_1.__exportStar(require("./decorators"), exports);
tslib_1.__exportStar(require("./factories"), exports);
tslib_1.__exportStar(require("./providers"), exports);
var lazy_helpers_1 = require("./lazy-helpers");
Object.defineProperty(exports, "delay", { enumerable: true, get: function () { return lazy_helpers_1.delay; } });
var dependency_container_1 = require("./dependency-container");
Object.defineProperty(exports, "container", { enumerable: true, get: function () { return dependency_container_1.instance; } });
@@ -0,0 +1 @@
{"name":"string.prototype.matchall","version":"4.0.12","requiresBuild":false,"files":{".editorconfig":{"checkedAt":1794532098784,"integrity":"sha512-gD3iQtgC7ZgFS97pyZqR0FPjMNyRAfat8dipbSL28iiJ6B1MP5dDeDYeEnP5sYMTz8whQIk3E5vltk2kcyJJEQ==","mode":420,"size":286},".eslintrc":{"checkedAt":1794532098785,"integrity":"sha512-RBiI+uFQA6GUgVTb9iF4X0x3IqkIu4dENgjGmLvR8i97soNb2eh8xWFPxPYssjN2xwg3GZi54TMNbGHIYyt/Ww==","mode":420,"size":973},".nycrc":{"checkedAt":1794532098785,"integrity":"sha512-2vm1RFz8Ajl/OYrfoCWPJIm3Bpnf7Gyn5bha/lZx/cq+We3uMy9xj15XeP6x4wF3jf/pO7KMHAkU9mllm605xg==","mode":420,"size":139},"LICENSE":{"checkedAt":1794532098785,"integrity":"sha512-CWRd82wre8E2D9wfNTwrOCxhLsdU7obtQTc4poEGt1uTk93MEI2QW01sXILetqMRgoYp4EIKQZNHNCQrALOFjw==","mode":420,"size":1082},"auto.js":{"checkedAt":1794532096427,"integrity":"sha512-8Q3Im5cACiIFrMmxvLnJnA8SXOjAd1kh/R0UIDVnErDD1WUlJIDrNfaOcIB6rtjAXNhq/OdL1374JM/QcAJ1VQ==","mode":420,"size":36},"implementation.js":{"checkedAt":1794532098785,"integrity":"sha512-Fkc97Dicjn7CjoOyEzw/RwqjYN2/smOV7YDrqhNg4EUG+xENRIYXWDXAyxKHR8iQEYkxMRc3V6nE11QxT/a0gQ==","mode":420,"size":1995},"index.js":{"checkedAt":1794532098785,"integrity":"sha512-JYx+Jxjs79wh6r/+ym3AZ+EtXM1a2ZB0jo+o2dvmnYm2N//QxDHCpUWcxe0ggQLFyE1g8bzCzzfqyy16Sh51hQ==","mode":420,"size":398},"test/index.js":{"checkedAt":1794532098785,"integrity":"sha512-9hoSrWTPgHT/T6QFLtaR9MCam2eoChGtkhqZlD3v1gqH8ErfJRBlkYajfpt0VQ1CbXvmWOcNnOkBkodPvPf43w==","mode":420,"size":261},"polyfill-regexp-matchall.js":{"checkedAt":1794532098785,"integrity":"sha512-bhIITidj5SQ3qpEJgjWXbTsL5QB20fbgBQabY6U8mjEkMd7Mm83ZpGg4e45QLRJbNcdcBNB6vRIeX46EmW2QHw==","mode":420,"size":358},"polyfill.js":{"checkedAt":1794532098785,"integrity":"sha512-zEJEeIwNgAX9aujy2f76CWIsKnHDV3GAU+eQVAri5gPOEl0ZSQpCDKk4EWZR4/ZUM9felygosMun76AvbDwDdg==","mode":420,"size":271},"regexp-matchall.js":{"checkedAt":1794532098785,"integrity":"sha512-4gmY0E0DMWKtOJcYYYe6uZP09shfrCDrdis+vl9hsoMGvFoKAh5jrTsEzNUlE8xUKcOOSRaax7ST8KcnMP2aJg==","mode":420,"size":2162},"shim.js":{"checkedAt":1794532098786,"integrity":"sha512-7DFz6fGY9IfjmsZnMe0K7CXJ24XvlaZYIun0JILXJeCV+eQHZx/pFSlCjNmCKg9nI6Rvl65tA3gS1ptSqccn2Q==","mode":420,"size":1321},"test/shimmed.js":{"checkedAt":1794532098786,"integrity":"sha512-hKnsm7/SVaLmlEU15D/6AZXGtBohfZQzwCDFyr3jgi4+ND6qlwK+ESW9W8NgVqOigGSvidUr9LrTosNI0CmBeg==","mode":420,"size":2436},"test/tests.js":{"checkedAt":1794532098786,"integrity":"sha512-aq6ln3F+2EsHMy8TU4Jbhp+9DIX7HsxFOKXVto4Vai1M639ZoQLpvCtN3EReVQyC7o+2MgA8eEG83BjhHrqmdw==","mode":420,"size":8729},"package.json":{"checkedAt":1794532098786,"integrity":"sha512-+KWFEkRxzdwK8nNfGAVO6goAsy+s00E7UO/nSvRvV/yKUybkpYpKtZSdJsOoOKTXnz9Ac3ACF0Eq1tjjDtVItQ==","mode":420,"size":2628},"CHANGELOG.md":{"checkedAt":1794532098786,"integrity":"sha512-W8fbgXoTm/tGtISgJUfH1QdAOlJNRYh+jB7dY9EN+NCOQdb63iDJN0XCbM4OoPY2G6XfvsBOGMTGV6PG4MJPIw==","mode":420,"size":12893},"README.md":{"checkedAt":1794532098786,"integrity":"sha512-2BeoyyNsHmJ4RWZxVmEPVIr7RcrJGm/LVN77X8hKVydaJNIRNz91BW3Tq+JBtci7YuiqLnFNR5piieGUbX1ldw==","mode":420,"size":3255},".github/FUNDING.yml":{"checkedAt":1794532098786,"integrity":"sha512-ixFht8jUSp3ABvon9CBqTeedFx0qBxUOdw02G9ZuN3mMk9zikP9ejDQf4rFODU8Z2k1Ck4wq4ZAw/NNszhY9cA==","mode":420,"size":596}}}
@@ -0,0 +1,201 @@
"use strict";
/**
* Copyright (c) 2012-2015, Christopher Jeffrey, Peter Sunde (MIT License)
* Copyright (c) 2016, Daniel Imms (MIT License).
* Copyright (c) 2018, Microsoft Corporation (MIT License).
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.WindowsTerminal = void 0;
var terminal_1 = require("./terminal");
var windowsPtyAgent_1 = require("./windowsPtyAgent");
var utils_1 = require("./utils");
var DEFAULT_FILE = 'cmd.exe';
var DEFAULT_NAME = 'Windows Shell';
var WindowsTerminal = /** @class */ (function (_super) {
__extends(WindowsTerminal, _super);
function WindowsTerminal(file, args, opt) {
var _this = _super.call(this, opt) || this;
_this._checkType('args', args, 'string', true);
// Initialize arguments
args = args || [];
file = file || DEFAULT_FILE;
opt = opt || {};
opt.env = opt.env || process.env;
if (opt.encoding) {
console.warn('Setting encoding on Windows is not supported');
}
var env = utils_1.assign({}, opt.env);
_this._cols = opt.cols || terminal_1.DEFAULT_COLS;
_this._rows = opt.rows || terminal_1.DEFAULT_ROWS;
var cwd = opt.cwd || process.cwd();
var name = opt.name || env.TERM || DEFAULT_NAME;
var parsedEnv = _this._parseEnv(env);
// If the terminal is ready
_this._isReady = false;
// Functions that need to run after `ready` event is emitted.
_this._deferreds = [];
// Create new termal.
_this._agent = new windowsPtyAgent_1.WindowsPtyAgent(file, args, parsedEnv, cwd, _this._cols, _this._rows, false, opt.useConpty, opt.useConptyDll, opt.conptyInheritCursor);
_this._socket = _this._agent.outSocket;
// Not available until `ready` event emitted.
_this._pid = _this._agent.innerPid;
_this._fd = _this._agent.fd;
_this._pty = _this._agent.pty;
// The forked windows terminal is not available until `ready` event is
// emitted.
_this._socket.on('ready_datapipe', function () {
// These events needs to be forwarded.
['connect', 'data', 'end', 'timeout', 'drain'].forEach(function (event) {
_this._socket.on(event, function () {
// Wait until the first data event is fired then we can run deferreds.
if (!_this._isReady && event === 'data') {
// Terminal is now ready and we can avoid having to defer method
// calls.
_this._isReady = true;
// Execute all deferred methods
_this._deferreds.forEach(function (fn) {
// NB! In order to ensure that `this` has all its references
// updated any variable that need to be available in `this` before
// the deferred is run has to be declared above this forEach
// statement.
fn.run();
});
// Reset
_this._deferreds = [];
}
});
});
// Shutdown if `error` event is emitted.
_this._socket.on('error', function (err) {
// Close terminal session.
_this._close();
// EIO, happens when someone closes our child process: the only process
// in the terminal.
// node < 0.6.14: errno 5
// node >= 0.6.14: read EIO
if (err.code) {
if (~err.code.indexOf('errno 5') || ~err.code.indexOf('EIO'))
return;
}
// Throw anything else.
if (_this.listeners('error').length < 2) {
throw err;
}
});
// Cleanup after the socket is closed.
_this._socket.on('close', function () {
_this.emit('exit', _this._agent.exitCode);
_this._close();
});
});
_this._file = file;
_this._name = name;
_this._readable = true;
_this._writable = true;
_this._forwardEvents();
return _this;
}
WindowsTerminal.prototype._write = function (data) {
this._defer(this._doWrite, data);
};
WindowsTerminal.prototype._doWrite = function (data) {
this._agent.inSocket.write(data);
};
/**
* openpty
*/
WindowsTerminal.open = function (options) {
throw new Error('open() not supported on windows, use Fork() instead.');
};
/**
* TTY
*/
WindowsTerminal.prototype.resize = function (cols, rows) {
var _this = this;
if (cols <= 0 || rows <= 0 || isNaN(cols) || isNaN(rows) || cols === Infinity || rows === Infinity) {
throw new Error('resizing must be done using positive cols and rows');
}
this._deferNoArgs(function () {
_this._agent.resize(cols, rows);
_this._cols = cols;
_this._rows = rows;
});
};
WindowsTerminal.prototype.clear = function () {
var _this = this;
this._deferNoArgs(function () {
_this._agent.clear();
});
};
WindowsTerminal.prototype.destroy = function () {
var _this = this;
this._deferNoArgs(function () {
_this.kill();
});
};
WindowsTerminal.prototype.kill = function (signal) {
var _this = this;
this._deferNoArgs(function () {
if (signal) {
throw new Error('Signals not supported on windows.');
}
_this._close();
_this._agent.kill();
});
};
WindowsTerminal.prototype._deferNoArgs = function (deferredFn) {
var _this = this;
// If the terminal is ready, execute.
if (this._isReady) {
deferredFn.call(this);
return;
}
// Queue until terminal is ready.
this._deferreds.push({
run: function () { return deferredFn.call(_this); }
});
};
WindowsTerminal.prototype._defer = function (deferredFn, arg) {
var _this = this;
// If the terminal is ready, execute.
if (this._isReady) {
deferredFn.call(this, arg);
return;
}
// Queue until terminal is ready.
this._deferreds.push({
run: function () { return deferredFn.call(_this, arg); }
});
};
Object.defineProperty(WindowsTerminal.prototype, "process", {
get: function () { return this._name; },
enumerable: false,
configurable: true
});
Object.defineProperty(WindowsTerminal.prototype, "master", {
get: function () { throw new Error('master is not supported on Windows'); },
enumerable: false,
configurable: true
});
Object.defineProperty(WindowsTerminal.prototype, "slave", {
get: function () { throw new Error('slave is not supported on Windows'); },
enumerable: false,
configurable: true
});
return WindowsTerminal;
}(terminal_1.Terminal));
exports.WindowsTerminal = WindowsTerminal;
//# sourceMappingURL=windowsTerminal.js.map
@@ -0,0 +1,805 @@
import type {
Action,
ConfigureStoreOptions,
Dispatch,
Middleware,
PayloadAction,
Reducer,
Store,
StoreEnhancer,
ThunkAction,
ThunkDispatch,
ThunkMiddleware,
UnknownAction,
} from '@reduxjs/toolkit'
import {
Tuple,
applyMiddleware,
combineReducers,
configureStore,
createSlice,
} from '@reduxjs/toolkit'
import { thunk } from 'redux-thunk'
const _anyMiddleware: any = () => () => () => {}
describe('type tests', () => {
test('configureStore() requires a valid reducer or reducer map.', () => {
configureStore({
reducer: (state, action) => 0,
})
configureStore({
reducer: {
counter1: () => 0,
counter2: () => 1,
},
})
// @ts-expect-error
configureStore({ reducer: 'not a reducer' })
// @ts-expect-error
configureStore({ reducer: { a: 'not a reducer' } })
// @ts-expect-error
configureStore({})
})
test('configureStore() infers the store state type.', () => {
const reducer: Reducer<number> = () => 0
const store = configureStore({ reducer })
expectTypeOf(store).toMatchTypeOf<Store<number, UnknownAction>>()
expectTypeOf(store).not.toMatchTypeOf<Store<string, UnknownAction>>()
})
test('configureStore() infers the store action type.', () => {
const reducer: Reducer<number, PayloadAction<number>> = () => 0
const store = configureStore({ reducer })
expectTypeOf(store).toMatchTypeOf<Store<number, PayloadAction<number>>>()
expectTypeOf(store).not.toMatchTypeOf<
Store<number, PayloadAction<string>>
>()
})
test('configureStore() accepts Tuple for middleware, but not plain array.', () => {
const middleware: Middleware = (store) => (next) => next
configureStore({
reducer: () => 0,
middleware: () => new Tuple(middleware),
})
configureStore({
reducer: () => 0,
// @ts-expect-error
middleware: () => [middleware],
})
configureStore({
reducer: () => 0,
// @ts-expect-error
middleware: () => new Tuple('not middleware'),
})
})
test('configureStore() accepts devTools flag.', () => {
configureStore({
reducer: () => 0,
devTools: true,
})
configureStore({
reducer: () => 0,
// @ts-expect-error
devTools: 'true',
})
})
test('configureStore() accepts devTools EnhancerOptions.', () => {
configureStore({
reducer: () => 0,
devTools: { name: 'myApp' },
})
configureStore({
reducer: () => 0,
// @ts-expect-error
devTools: { appName: 'myApp' },
})
})
test('configureStore() accepts preloadedState.', () => {
configureStore({
reducer: () => 0,
preloadedState: 0,
})
configureStore({
// @ts-expect-error
reducer: (_: number) => 0,
preloadedState: 'non-matching state type',
})
})
test('nullable state is preserved', () => {
const store = configureStore({
reducer: (): string | null => null,
})
expectTypeOf(store.getState()).toEqualTypeOf<string | null>()
})
test('configureStore() accepts store Tuple for enhancers, but not plain array', () => {
const enhancer = applyMiddleware(() => (next) => next)
const store = configureStore({
reducer: () => 0,
enhancers: () => new Tuple(enhancer),
})
const store2 = configureStore({
reducer: () => 0,
// @ts-expect-error
enhancers: () => [enhancer],
})
expectTypeOf(store.dispatch).toMatchTypeOf<
Dispatch & ThunkDispatch<number, undefined, UnknownAction>
>()
configureStore({
reducer: () => 0,
// @ts-expect-error
enhancers: () => new Tuple('not a store enhancer'),
})
const somePropertyStoreEnhancer: StoreEnhancer<{
someProperty: string
}> = (next) => {
return (reducer, preloadedState) => {
return {
...next(reducer, preloadedState),
someProperty: 'some value',
}
}
}
const anotherPropertyStoreEnhancer: StoreEnhancer<{
anotherProperty: number
}> = (next) => {
return (reducer, preloadedState) => {
return {
...next(reducer, preloadedState),
anotherProperty: 123,
}
}
}
const store3 = configureStore({
reducer: () => 0,
enhancers: () =>
new Tuple(somePropertyStoreEnhancer, anotherPropertyStoreEnhancer),
})
expectTypeOf(store3.dispatch).toEqualTypeOf<Dispatch>()
expectTypeOf(store3.someProperty).toBeString()
expectTypeOf(store3.anotherProperty).toBeNumber()
const storeWithCallback = configureStore({
reducer: () => 0,
enhancers: (getDefaultEnhancers) =>
getDefaultEnhancers()
.prepend(anotherPropertyStoreEnhancer)
.concat(somePropertyStoreEnhancer),
})
expectTypeOf(store3.dispatch).toMatchTypeOf<
Dispatch & ThunkDispatch<number, undefined, UnknownAction>
>()
expectTypeOf(store3.someProperty).toBeString()
expectTypeOf(store3.anotherProperty).toBeNumber()
const someStateExtendingEnhancer: StoreEnhancer<
{},
{ someProperty: string }
> =
(next) =>
(...args) => {
const store = next(...args)
const getState = () => ({
...store.getState(),
someProperty: 'some value',
})
return {
...store,
getState,
} as any
}
const anotherStateExtendingEnhancer: StoreEnhancer<
{},
{ anotherProperty: number }
> =
(next) =>
(...args) => {
const store = next(...args)
const getState = () => ({
...store.getState(),
anotherProperty: 123,
})
return {
...store,
getState,
} as any
}
const store4 = configureStore({
reducer: () => ({ aProperty: 0 }),
enhancers: () =>
new Tuple(someStateExtendingEnhancer, anotherStateExtendingEnhancer),
})
const state = store4.getState()
expectTypeOf(state.aProperty).toBeNumber()
expectTypeOf(state.someProperty).toBeString()
expectTypeOf(state.anotherProperty).toBeNumber()
const storeWithCallback2 = configureStore({
reducer: () => ({ aProperty: 0 }),
enhancers: (gDE) =>
gDE().concat(someStateExtendingEnhancer, anotherStateExtendingEnhancer),
})
const stateWithCallback = storeWithCallback2.getState()
expectTypeOf(stateWithCallback.aProperty).toBeNumber()
expectTypeOf(stateWithCallback.someProperty).toBeString()
expectTypeOf(stateWithCallback.anotherProperty).toBeNumber()
})
test('Preloaded state typings', () => {
const counterReducer1: Reducer<number> = () => 0
const counterReducer2: Reducer<number> = () => 0
test('partial preloaded state', () => {
const store = configureStore({
reducer: {
counter1: counterReducer1,
counter2: counterReducer2,
},
preloadedState: {
counter1: 0,
},
})
expectTypeOf(store.getState().counter1).toBeNumber()
expectTypeOf(store.getState().counter2).toBeNumber()
})
test('empty preloaded state', () => {
const store = configureStore({
reducer: {
counter1: counterReducer1,
counter2: counterReducer2,
},
preloadedState: {},
})
expectTypeOf(store.getState().counter1).toBeNumber()
expectTypeOf(store.getState().counter2).toBeNumber()
})
test('excess properties in preloaded state', () => {
const store = configureStore({
reducer: {
// @ts-expect-error
counter1: counterReducer1,
counter2: counterReducer2,
},
preloadedState: {
counter1: 0,
counter3: 5,
},
})
expectTypeOf(store.getState().counter1).toBeNumber()
expectTypeOf(store.getState().counter2).toBeNumber()
})
test('mismatching properties in preloaded state', () => {
const store = configureStore({
reducer: {
// @ts-expect-error
counter1: counterReducer1,
counter2: counterReducer2,
},
preloadedState: {
counter3: 5,
},
})
expectTypeOf(store.getState().counter1).toBeNumber()
expectTypeOf(store.getState().counter2).toBeNumber()
})
test('string preloaded state when expecting object', () => {
const store = configureStore({
reducer: {
// @ts-expect-error
counter1: counterReducer1,
counter2: counterReducer2,
},
preloadedState: 'test',
})
expectTypeOf(store.getState().counter1).toBeNumber()
expectTypeOf(store.getState().counter2).toBeNumber()
})
test('nested combineReducers allows partial', () => {
const store = configureStore({
reducer: {
group1: combineReducers({
counter1: counterReducer1,
counter2: counterReducer2,
}),
group2: combineReducers({
counter1: counterReducer1,
counter2: counterReducer2,
}),
},
preloadedState: {
group1: {
counter1: 5,
},
},
})
expectTypeOf(store.getState().group1.counter1).toBeNumber()
expectTypeOf(store.getState().group1.counter2).toBeNumber()
expectTypeOf(store.getState().group2.counter1).toBeNumber()
expectTypeOf(store.getState().group2.counter2).toBeNumber()
})
test('non-nested combineReducers does not allow partial', () => {
interface GroupState {
counter1: number
counter2: number
}
const initialState = { counter1: 0, counter2: 0 }
const group1Reducer: Reducer<GroupState> = (state = initialState) => state
const group2Reducer: Reducer<GroupState> = (state = initialState) => state
const store = configureStore({
reducer: {
// @ts-expect-error
group1: group1Reducer,
group2: group2Reducer,
},
preloadedState: {
group1: {
counter1: 5,
},
},
})
expectTypeOf(store.getState().group1.counter1).toBeNumber()
expectTypeOf(store.getState().group1.counter2).toBeNumber()
expectTypeOf(store.getState().group2.counter1).toBeNumber()
expectTypeOf(store.getState().group2.counter2).toBeNumber()
})
})
test('Dispatch typings', () => {
type StateA = number
const reducerA = () => 0
const thunkA = () => {
return (() => {}) as any as ThunkAction<Promise<'A'>, StateA, any, any>
}
type StateB = string
const thunkB = () => {
return (dispatch: Dispatch, getState: () => StateB) => {}
}
test('by default, dispatching Thunks is possible', () => {
const store = configureStore({
reducer: reducerA,
})
store.dispatch(thunkA())
// @ts-expect-error
store.dispatch(thunkB())
const res = store.dispatch((dispatch, getState) => {
return 42
})
const action = store.dispatch({ type: 'foo' })
})
test('return type of thunks and actions is inferred correctly', () => {
const slice = createSlice({
name: 'counter',
initialState: {
value: 0,
},
reducers: {
incrementByAmount: (state, action: PayloadAction<number>) => {
state.value += action.payload
},
},
})
const store = configureStore({
reducer: {
counter: slice.reducer,
},
})
const action = slice.actions.incrementByAmount(2)
const dispatchResult = store.dispatch(action)
expectTypeOf(dispatchResult).toMatchTypeOf<{
type: string
payload: number
}>()
const promiseResult = store.dispatch(async (dispatch) => {
return 42
})
expectTypeOf(promiseResult).toEqualTypeOf<Promise<number>>()
const store2 = configureStore({
reducer: {
counter: slice.reducer,
},
middleware: (gDM) =>
gDM({
thunk: {
extraArgument: 42,
},
}),
})
const dispatchResult2 = store2.dispatch(action)
expectTypeOf(dispatchResult2).toMatchTypeOf<{
type: string
payload: number
}>()
})
test('removing the Thunk Middleware', () => {
const store = configureStore({
reducer: reducerA,
middleware: () => new Tuple(),
})
expectTypeOf(store.dispatch).parameter(0).not.toMatchTypeOf(thunkA())
expectTypeOf(store.dispatch).parameter(0).not.toMatchTypeOf(thunkB())
})
test('adding the thunk middleware by hand', () => {
const store = configureStore({
reducer: reducerA,
middleware: () => new Tuple(thunk as ThunkMiddleware<StateA>),
})
store.dispatch(thunkA())
// @ts-expect-error
store.dispatch(thunkB())
})
test('custom middleware', () => {
const store = configureStore({
reducer: reducerA,
middleware: () =>
new Tuple(0 as unknown as Middleware<(a: StateA) => boolean, StateA>),
})
expectTypeOf(store.dispatch(5)).toBeBoolean()
expectTypeOf(store.dispatch(5)).not.toBeString()
})
test('multiple custom middleware', () => {
const middleware = [] as any as Tuple<
[
Middleware<(a: 'a') => 'A', StateA>,
Middleware<(b: 'b') => 'B', StateA>,
ThunkMiddleware<StateA>,
]
>
const store = configureStore({
reducer: reducerA,
middleware: () => middleware,
})
expectTypeOf(store.dispatch('a')).toEqualTypeOf<'A'>()
expectTypeOf(store.dispatch('b')).toEqualTypeOf<'B'>()
expectTypeOf(store.dispatch(thunkA())).toEqualTypeOf<Promise<'A'>>()
})
test('Accepts thunk with `unknown`, `undefined` or `null` ThunkAction extraArgument per default', () => {
const store = configureStore({ reducer: {} })
// undefined is the default value for the ThunkMiddleware extraArgument
store.dispatch(function () {} as ThunkAction<
void,
{},
undefined,
UnknownAction
>)
// `null` for the `extra` generic was previously documented in the RTK "Advanced Tutorial", but
// is a bad pattern and users should use `unknown` instead
// @ts-expect-error
store.dispatch(function () {} as ThunkAction<
void,
{},
null,
UnknownAction
>)
// unknown is the best way to type a ThunkAction if you do not care
// about the value of the extraArgument, as it will always work with every
// ThunkMiddleware, no matter the actual extraArgument type
store.dispatch(function () {} as ThunkAction<
void,
{},
unknown,
UnknownAction
>)
// @ts-expect-error
store.dispatch(function () {} as ThunkAction<
void,
{},
boolean,
UnknownAction
>)
})
test('custom middleware and getDefaultMiddleware', () => {
const store = configureStore({
reducer: reducerA,
middleware: (gDM) =>
gDM().prepend((() => {}) as any as Middleware<
(a: 'a') => 'A',
StateA
>),
})
expectTypeOf(store.dispatch('a')).toEqualTypeOf<'A'>()
expectTypeOf(store.dispatch(thunkA())).toEqualTypeOf<Promise<'A'>>()
expectTypeOf(store.dispatch).parameter(0).not.toMatchTypeOf(thunkB())
})
test('custom middleware and getDefaultMiddleware, using prepend', () => {
const otherMiddleware: Middleware<(a: 'a') => 'A', StateA> =
_anyMiddleware
const store = configureStore({
reducer: reducerA,
middleware: (gDM) => {
const concatenated = gDM().prepend(otherMiddleware)
expectTypeOf(concatenated).toMatchTypeOf<
ReadonlyArray<
typeof otherMiddleware | ThunkMiddleware | Middleware<{}>
>
>()
return concatenated
},
})
expectTypeOf(store.dispatch('a')).toEqualTypeOf<'A'>()
expectTypeOf(store.dispatch(thunkA())).toEqualTypeOf<Promise<'A'>>()
expectTypeOf(store.dispatch).parameter(0).not.toMatchTypeOf(thunkB())
})
test('custom middleware and getDefaultMiddleware, using concat', () => {
const otherMiddleware: Middleware<(a: 'a') => 'A', StateA> =
_anyMiddleware
const store = configureStore({
reducer: reducerA,
middleware: (gDM) => {
const concatenated = gDM().concat(otherMiddleware)
expectTypeOf(concatenated).toMatchTypeOf<
ReadonlyArray<
typeof otherMiddleware | ThunkMiddleware | Middleware<{}>
>
>()
return concatenated
},
})
expectTypeOf(store.dispatch('a')).toEqualTypeOf<'A'>()
expectTypeOf(store.dispatch(thunkA())).toEqualTypeOf<Promise<'A'>>()
expectTypeOf(store.dispatch).parameter(0).not.toMatchTypeOf(thunkB())
})
test('middlewareBuilder notation, getDefaultMiddleware (unconfigured)', () => {
const store = configureStore({
reducer: reducerA,
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware().prepend((() => {}) as any as Middleware<
(a: 'a') => 'A',
StateA
>),
})
expectTypeOf(store.dispatch('a')).toEqualTypeOf<'A'>()
expectTypeOf(store.dispatch(thunkA())).toEqualTypeOf<Promise<'A'>>()
expectTypeOf(store.dispatch).parameter(0).not.toMatchTypeOf(thunkB())
})
test('middlewareBuilder notation, getDefaultMiddleware, concat & prepend', () => {
const otherMiddleware: Middleware<(a: 'a') => 'A', StateA> =
_anyMiddleware
const otherMiddleware2: Middleware<(a: 'b') => 'B', StateA> =
_anyMiddleware
const store = configureStore({
reducer: reducerA,
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware()
.concat(otherMiddleware)
.prepend(otherMiddleware2),
})
expectTypeOf(store.dispatch('a')).toEqualTypeOf<'A'>()
expectTypeOf(store.dispatch(thunkA())).toEqualTypeOf<Promise<'A'>>()
expectTypeOf(store.dispatch('b')).toEqualTypeOf<'B'>()
expectTypeOf(store.dispatch).parameter(0).not.toMatchTypeOf(thunkB())
})
test('middlewareBuilder notation, getDefaultMiddleware (thunk: false)', () => {
const store = configureStore({
reducer: reducerA,
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware({ thunk: false }).prepend(
(() => {}) as any as Middleware<(a: 'a') => 'A', StateA>,
),
})
expectTypeOf(store.dispatch('a')).toEqualTypeOf<'A'>()
expectTypeOf(store.dispatch).parameter(0).not.toMatchTypeOf(thunkA())
})
test("badly typed middleware won't make `dispatch` `any`", () => {
const store = configureStore({
reducer: reducerA,
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware().concat(_anyMiddleware as Middleware<any>),
})
expectTypeOf(store.dispatch).not.toBeAny()
})
test("decorated `configureStore` won't make `dispatch` `never`", () => {
const someSlice = createSlice({
name: 'something',
initialState: null as any,
reducers: {
set(state) {
return state
},
},
})
function configureMyStore<S>(
options: Omit<ConfigureStoreOptions<S>, 'reducer'>,
) {
return configureStore({
...options,
reducer: someSlice.reducer,
})
}
const store = configureMyStore({})
expectTypeOf(store.dispatch).toBeFunction()
})
interface CounterState {
value: number
}
const counterSlice = createSlice({
name: 'counter',
initialState: { value: 0 } as CounterState,
reducers: {
increment(state) {
state.value += 1
},
decrement(state) {
state.value -= 1
},
// Use the PayloadAction type to declare the contents of `action.payload`
incrementByAmount: (state, action: PayloadAction<number>) => {
state.value += action.payload
},
},
})
type Unsubscribe = () => void
// A fake middleware that tells TS that an unsubscribe callback is being returned for a given action
// This is the same signature that the "listener" middleware uses
const dummyMiddleware: Middleware<
{
(action: Action<'actionListenerMiddleware/add'>): Unsubscribe
},
CounterState
> = (storeApi) => (next) => (action) => {}
const store = configureStore({
reducer: counterSlice.reducer,
middleware: (gDM) => gDM().prepend(dummyMiddleware),
})
// Order matters here! We need the listener type to come first, otherwise
// the thunk middleware type kicks in and TS thinks a plain action is being returned
expectTypeOf(store.dispatch).toEqualTypeOf<
((action: Action<'actionListenerMiddleware/add'>) => Unsubscribe) &
ThunkDispatch<CounterState, undefined, UnknownAction> &
Dispatch<UnknownAction>
>()
const unsubscribe = store.dispatch({
type: 'actionListenerMiddleware/add',
} as const)
expectTypeOf(unsubscribe).toEqualTypeOf<Unsubscribe>()
})
})
@@ -0,0 +1,271 @@
const isWin = process.platform === 'win32';
const SEP = isWin ? `\\\\+` : `\\/`;
const SEP_ESC = isWin ? `\\\\` : `/`;
const GLOBSTAR = `((?:[^/]*(?:/|$))*)`;
const WILDCARD = `([^/]*)`;
const GLOBSTAR_SEGMENT = `((?:[^${SEP_ESC}]*(?:${SEP_ESC}|$))*)`;
const WILDCARD_SEGMENT = `([^${SEP_ESC}]*)`;
/**
* Convert any glob pattern to a JavaScript Regexp object
* @param {String} glob Glob pattern to convert
* @param {Object} opts Configuration object
* @param {Boolean} [opts.extended=false] Support advanced ext globbing
* @param {Boolean} [opts.globstar=false] Support globstar
* @param {Boolean} [opts.strict=true] be laissez faire about mutiple slashes
* @param {Boolean} [opts.filepath=''] Parse as filepath for extra path related features
* @param {String} [opts.flags=''] RegExp globs
* @returns {Object} converted object with string, segments and RegExp object
*/
function globrex(glob, {extended = false, globstar = false, strict = false, filepath = false, flags = ''} = {}) {
let regex = '';
let segment = '';
let path = { regex: '', segments: [] };
// If we are doing extended matching, this boolean is true when we are inside
// a group (eg {*.html,*.js}), and false otherwise.
let inGroup = false;
let inRange = false;
// extglob stack. Keep track of scope
const ext = [];
// Helper function to build string and segments
function add(str, {split, last, only}={}) {
if (only !== 'path') regex += str;
if (filepath && only !== 'regex') {
path.regex += (str === '\\/' ? SEP : str);
if (split) {
if (last) segment += str;
if (segment !== '') {
if (!flags.includes('g')) segment = `^${segment}$`; // change it 'includes'
path.segments.push(new RegExp(segment, flags));
}
segment = '';
} else {
segment += str;
}
}
}
let c, n;
for (let i = 0; i < glob.length; i++) {
c = glob[i];
n = glob[i + 1];
if (['\\', '$', '^', '.', '='].includes(c)) {
add(`\\${c}`);
continue;
}
if (c === '/') {
add(`\\${c}`, {split: true});
if (n === '/' && !strict) regex += '?';
continue;
}
if (c === '(') {
if (ext.length) {
add(c);
continue;
}
add(`\\${c}`);
continue;
}
if (c === ')') {
if (ext.length) {
add(c);
let type = ext.pop();
if (type === '@') {
add('{1}');
} else if (type === '!') {
add('([^\/]*)');
} else {
add(type);
}
continue;
}
add(`\\${c}`);
continue;
}
if (c === '|') {
if (ext.length) {
add(c);
continue;
}
add(`\\${c}`);
continue;
}
if (c === '+') {
if (n === '(' && extended) {
ext.push(c);
continue;
}
add(`\\${c}`);
continue;
}
if (c === '@' && extended) {
if (n === '(') {
ext.push(c);
continue;
}
}
if (c === '!') {
if (extended) {
if (inRange) {
add('^');
continue
}
if (n === '(') {
ext.push(c);
add('(?!');
i++;
continue;
}
add(`\\${c}`);
continue;
}
add(`\\${c}`);
continue;
}
if (c === '?') {
if (extended) {
if (n === '(') {
ext.push(c);
} else {
add('.');
}
continue;
}
add(`\\${c}`);
continue;
}
if (c === '[') {
if (inRange && n === ':') {
i++; // skip [
let value = '';
while(glob[++i] !== ':') value += glob[i];
if (value === 'alnum') add('(\\w|\\d)');
else if (value === 'space') add('\\s');
else if (value === 'digit') add('\\d');
i++; // skip last ]
continue;
}
if (extended) {
inRange = true;
add(c);
continue;
}
add(`\\${c}`);
continue;
}
if (c === ']') {
if (extended) {
inRange = false;
add(c);
continue;
}
add(`\\${c}`);
continue;
}
if (c === '{') {
if (extended) {
inGroup = true;
add('(');
continue;
}
add(`\\${c}`);
continue;
}
if (c === '}') {
if (extended) {
inGroup = false;
add(')');
continue;
}
add(`\\${c}`);
continue;
}
if (c === ',') {
if (inGroup) {
add('|');
continue;
}
add(`\\${c}`);
continue;
}
if (c === '*') {
if (n === '(' && extended) {
ext.push(c);
continue;
}
// Move over all consecutive "*"'s.
// Also store the previous and next characters
let prevChar = glob[i - 1];
let starCount = 1;
while (glob[i + 1] === '*') {
starCount++;
i++;
}
let nextChar = glob[i + 1];
if (!globstar) {
// globstar is disabled, so treat any number of "*" as one
add('.*');
} else {
// globstar is enabled, so determine if this is a globstar segment
let isGlobstar =
starCount > 1 && // multiple "*"'s
(prevChar === '/' || prevChar === undefined) && // from the start of the segment
(nextChar === '/' || nextChar === undefined); // to the end of the segment
if (isGlobstar) {
// it's a globstar, so match zero or more path segments
add(GLOBSTAR, {only:'regex'});
add(GLOBSTAR_SEGMENT, {only:'path', last:true, split:true});
i++; // move over the "/"
} else {
// it's not a globstar, so only match one path segment
add(WILDCARD, {only:'regex'});
add(WILDCARD_SEGMENT, {only:'path'});
}
}
continue;
}
add(c);
}
// When regexp 'g' flag is specified don't
// constrain the regular expression with ^ & $
if (!flags.includes('g')) {
regex = `^${regex}$`;
segment = `^${segment}$`;
if (filepath) path.regex = `^${path.regex}$`;
}
const result = {regex: new RegExp(regex, flags)};
// Push the last segment
if (filepath) {
path.segments.push(new RegExp(segment, flags));
path.regex = new RegExp(path.regex, flags);
path.globstar = new RegExp(!flags.includes('g') ? `^${GLOBSTAR_SEGMENT}$` : GLOBSTAR_SEGMENT, flags);
result.path = path;
}
return result;
}
module.exports = globrex;
@@ -0,0 +1,97 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/components/user.ts
var user_exports = {};
__export(user_exports, {
user: () => user
});
module.exports = __toCommonJS(user_exports);
// src/utils/tv.ts
var import_tailwind_variants = require("tailwind-variants");
// src/utils/tw-merge-config.ts
var COMMON_UNITS = ["small", "medium", "large"];
var twMergeConfig = {
theme: {
opacity: ["disabled"],
spacing: ["divider"],
borderWidth: COMMON_UNITS,
borderRadius: COMMON_UNITS
},
classGroups: {
shadow: [{ shadow: COMMON_UNITS }],
"font-size": [{ text: ["tiny", ...COMMON_UNITS] }],
"bg-image": [
"bg-stripe-gradient-default",
"bg-stripe-gradient-primary",
"bg-stripe-gradient-secondary",
"bg-stripe-gradient-success",
"bg-stripe-gradient-warning",
"bg-stripe-gradient-danger"
]
}
};
// src/utils/tv.ts
var tv = (options, config) => {
var _a, _b, _c;
return (0, import_tailwind_variants.tv)(options, {
...config,
twMerge: (_a = config == null ? void 0 : config.twMerge) != null ? _a : true,
twMergeConfig: {
...config == null ? void 0 : config.twMergeConfig,
theme: {
...(_b = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _b.theme,
...twMergeConfig.theme
},
classGroups: {
...(_c = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _c.classGroups,
...twMergeConfig.classGroups
}
}
});
};
// src/utils/classes.ts
var dataFocusVisibleClasses = [
"outline-none",
"data-[focus-visible=true]:z-10",
"data-[focus-visible=true]:outline-2",
"data-[focus-visible=true]:outline-focus",
"data-[focus-visible=true]:outline-offset-2"
];
// src/components/user.ts
var user = tv({
slots: {
base: [
"inline-flex items-center justify-center gap-2 rounded-small outline-none",
...dataFocusVisibleClasses
],
wrapper: "inline-flex flex-col items-start",
name: "text-small text-inherit",
description: "text-tiny text-foreground-400"
}
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
user
});
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,oBAAoB,CAAC,6JAAwB,CAAC;AAClE","sources":["packages/@react-aria/menu/intl/ja-JP.json"],"sourcesContent":["{\n \"longPressMessage\": \"長押しまたは Alt+下矢印キーでメニューを開く\"\n}\n"],"names":[],"version":3,"file":"ja-JP.main.js.map"}
@@ -0,0 +1,66 @@
'use strict';
var YAMLException = require('./exception');
var TYPE_CONSTRUCTOR_OPTIONS = [
'kind',
'multi',
'resolve',
'construct',
'instanceOf',
'predicate',
'represent',
'representName',
'defaultStyle',
'styleAliases'
];
var YAML_NODE_KINDS = [
'scalar',
'sequence',
'mapping'
];
function compileStyleAliases(map) {
var result = {};
if (map !== null) {
Object.keys(map).forEach(function (style) {
map[style].forEach(function (alias) {
result[String(alias)] = style;
});
});
}
return result;
}
function Type(tag, options) {
options = options || {};
Object.keys(options).forEach(function (name) {
if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
}
});
// TODO: Add tag format check.
this.options = options; // keep original options in case user wants to extend this type later
this.tag = tag;
this.kind = options['kind'] || null;
this.resolve = options['resolve'] || function () { return true; };
this.construct = options['construct'] || function (data) { return data; };
this.instanceOf = options['instanceOf'] || null;
this.predicate = options['predicate'] || null;
this.represent = options['represent'] || null;
this.representName = options['representName'] || null;
this.defaultStyle = options['defaultStyle'] || null;
this.multi = options['multi'] || false;
this.styleAliases = compileStyleAliases(options['styleAliases'] || null);
if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
}
}
module.exports = Type;
@@ -0,0 +1,14 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es7 = void 0;
const es2015_1 = require("./es2015");
const es2016_array_include_1 = require("./es2016.array.include");
const es2016_intl_1 = require("./es2016.intl");
exports.es7 = {
libs: [es2015_1.es2015, es2016_array_include_1.es2016_array_include, es2016_intl_1.es2016_intl],
variables: [],
};
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,aAAa,CAAC,QAAQ,CAAC;IACzC,iBAAiB,CAAC,OAAS,CAAC,sBAAmB,EAAE,KAAK,UAAU,CAAC,mBAAmB,CAAC;IACrF,cAAc,CAAC,OAAS,GAAG,KAAK,KAAK,CAAC,OAAO,CAAC;IAC9C,cAAc,CAAC,QAAQ,CAAC;IACxB,kBAAkB,CAAC,OAAS,CAAC,sBAAmB,EAAE,KAAK,UAAU,CAAC,mBAAmB,CAAC;IACtF,sBAAsB,CAAC,sDAA0C,CAAC;IAClE,UAAU,CAAC,OAAO,CAAC;IACnB,aAAa,CAAC,YAAY,CAAC;IAC3B,YAAY,CAAC,gBAAgB,CAAC;AAChC","sources":["packages/@react-aria/table/intl/sv-SE.json"],"sourcesContent":["{\n \"ascending\": \"stigande\",\n \"ascendingSort\": \"sorterat på kolumn {columnName} i stigande ordning\",\n \"columnSize\": \"{value} pixlar\",\n \"descending\": \"fallande\",\n \"descendingSort\": \"sorterat på kolumn {columnName} i fallande ordning\",\n \"resizerDescription\": \"Tryck på Retur för att börja ändra storlek\",\n \"select\": \"Markera\",\n \"selectAll\": \"Markera allt\",\n \"sortable\": \"sorterbar kolumn\"\n}\n"],"names":[],"version":3,"file":"sv-SE.main.js.map"}
@@ -0,0 +1,3 @@
# @react-types/form
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.
@@ -0,0 +1,2 @@
import 'reflect-metadata';
//# sourceMappingURL=inject.int.spec.d.ts.map
@@ -0,0 +1,123 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/button-group.tsx
var button_group_exports = {};
__export(button_group_exports, {
default: () => button_group_default
});
module.exports = __toCommonJS(button_group_exports);
var import_system2 = require("@heroui/system");
// src/button-group-context.ts
var import_react_utils = require("@heroui/react-utils");
var [ButtonGroupProvider, useButtonGroupContext] = (0, import_react_utils.createContext)({
name: "ButtonGroupContext",
strict: false
});
// src/use-button-group.ts
var import_theme = require("@heroui/theme");
var import_system = require("@heroui/system");
var import_react_utils2 = require("@heroui/react-utils");
var import_react = require("react");
var import_shared_utils = require("@heroui/shared-utils");
function useButtonGroup(originalProps) {
var _a, _b;
const globalContext = (0, import_system.useProviderContext)();
const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.buttonGroup.variantKeys);
const {
ref,
as,
children,
color = "default",
size = "md",
variant = "solid",
radius,
isDisabled = false,
isIconOnly = false,
disableRipple = (_a = globalContext == null ? void 0 : globalContext.disableRipple) != null ? _a : false,
disableAnimation = (_b = globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false,
className,
...otherProps
} = props;
const Component = as || "div";
const domRef = (0, import_react_utils2.useDOMRef)(ref);
const classNames = (0, import_react.useMemo)(
() => (0, import_theme.buttonGroup)({
...variantProps,
className
}),
[(0, import_shared_utils.objectToDeps)(variantProps), className]
);
const context = (0, import_react.useMemo)(
() => ({
size,
color,
variant,
radius,
isIconOnly,
isDisabled,
disableAnimation,
disableRipple,
fullWidth: !!(originalProps == null ? void 0 : originalProps.fullWidth)
}),
[
size,
color,
variant,
radius,
isDisabled,
isIconOnly,
disableAnimation,
disableRipple,
originalProps == null ? void 0 : originalProps.fullWidth
]
);
const getButtonGroupProps = (0, import_react.useCallback)(
() => ({
role: "group",
...otherProps
}),
[otherProps]
);
return {
Component,
children,
domRef,
context,
classNames,
getButtonGroupProps
};
}
// src/button-group.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var ButtonGroup = (0, import_system2.forwardRef)((props, ref) => {
const { Component, domRef, context, children, classNames, getButtonGroupProps } = useButtonGroup({
...props,
ref
});
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonGroupProvider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ref: domRef, className: classNames, ...getButtonGroupProps(), children }) });
});
ButtonGroup.displayName = "HeroUI.ButtonGroup";
var button_group_default = ButtonGroup;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {});
@@ -0,0 +1,4 @@
<svg viewbox="0 0 18 18">
<polygon class="ql-fill ql-stroke" points="6 10 4 12 2 10 6 10"></polygon>
<path class="ql-stroke" d="M8.09,13.91A4.6,4.6,0,0,0,9,14,5,5,0,1,0,4,9"></path>
</svg>

After

Width:  |  Height:  |  Size: 192 B

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=cloneResolvedValueBinding.spec.d.ts.map
@@ -0,0 +1,11 @@
/**
* @import {Options, State} from 'mdast-util-to-markdown'
*/
/**
* @param {State} state
* @returns {Exclude<Options['listItemIndent'], null | undefined>}
*/
export function checkListItemIndent(state: State): Exclude<Options["listItemIndent"], null | undefined>;
import type { State } from 'mdast-util-to-markdown';
import type { Options } from 'mdast-util-to-markdown';
//# sourceMappingURL=check-list-item-indent.d.ts.map
@@ -0,0 +1,30 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.3.0] - 2021-12-13
### Added
- Updated to include support for Unicode 14
## [1.2.0] - 2021-01-29
### Updated
- Refactored to increase speed
## [1.1.0] - 2020-09-14
### Added
- Updated to include support for Unicode 13
## [1.0.0] - 2020-09-13
- Forked from work by @JLHwung on original `Grapheme-Splitter` library: https://github.com/JLHwung/grapheme-splitter/tree/next
- Converted to Typescript
- Added development and build tooling
@@ -0,0 +1,117 @@
/**
* @typedef CoreOptions
* @property {ReadonlyArray<string>} [subset=[]]
* Whether to only escape the given subset of characters.
* @property {boolean} [escapeOnly=false]
* Whether to only escape possibly dangerous characters.
* Those characters are `"`, `&`, `'`, `<`, `>`, and `` ` ``.
*
* @typedef FormatOptions
* @property {(code: number, next: number, options: CoreWithFormatOptions) => string} format
* Format strategy.
*
* @typedef {CoreOptions & FormatOptions & import('./util/format-smart.js').FormatSmartOptions} CoreWithFormatOptions
*/
const defaultSubsetRegex = /["&'<>`]/g
const surrogatePairsRegex = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g
const controlCharactersRegex =
// eslint-disable-next-line no-control-regex, unicorn/no-hex-escape
/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g
const regexEscapeRegex = /[|\\{}()[\]^$+*?.]/g
/** @type {WeakMap<ReadonlyArray<string>, RegExp>} */
const subsetToRegexCache = new WeakMap()
/**
* Encode certain characters in `value`.
*
* @param {string} value
* @param {CoreWithFormatOptions} options
* @returns {string}
*/
export function core(value, options) {
value = value.replace(
options.subset
? charactersToExpressionCached(options.subset)
: defaultSubsetRegex,
basic
)
if (options.subset || options.escapeOnly) {
return value
}
return (
value
// Surrogate pairs.
.replace(surrogatePairsRegex, surrogate)
// BMP control characters (C0 except for LF, CR, SP; DEL; and some more
// non-ASCII ones).
.replace(controlCharactersRegex, basic)
)
/**
* @param {string} pair
* @param {number} index
* @param {string} all
*/
function surrogate(pair, index, all) {
return options.format(
(pair.charCodeAt(0) - 0xd800) * 0x400 +
pair.charCodeAt(1) -
0xdc00 +
0x10000,
all.charCodeAt(index + 2),
options
)
}
/**
* @param {string} character
* @param {number} index
* @param {string} all
*/
function basic(character, index, all) {
return options.format(
character.charCodeAt(0),
all.charCodeAt(index + 1),
options
)
}
}
/**
* A wrapper function that caches the result of `charactersToExpression` with a WeakMap.
* This can improve performance when tooling calls `charactersToExpression` repeatedly
* with the same subset.
*
* @param {ReadonlyArray<string>} subset
* @returns {RegExp}
*/
function charactersToExpressionCached(subset) {
let cached = subsetToRegexCache.get(subset)
if (!cached) {
cached = charactersToExpression(subset)
subsetToRegexCache.set(subset, cached)
}
return cached
}
/**
* @param {ReadonlyArray<string>} subset
* @returns {RegExp}
*/
function charactersToExpression(subset) {
/** @type {Array<string>} */
const groups = []
let index = -1
while (++index < subset.length) {
groups.push(subset[index].replace(regexEscapeRegex, '\\$&'))
}
return new RegExp('(?:' + groups.join('|') + ')', 'g')
}
@@ -0,0 +1,84 @@
'use strict';
/* eslint no-invalid-this: 1 */
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
var toStr = Object.prototype.toString;
var max = Math.max;
var funcType = '[object Function]';
var concatty = function concatty(a, b) {
var arr = [];
for (var i = 0; i < a.length; i += 1) {
arr[i] = a[i];
}
for (var j = 0; j < b.length; j += 1) {
arr[j + a.length] = b[j];
}
return arr;
};
var slicy = function slicy(arrLike, offset) {
var arr = [];
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
arr[j] = arrLike[i];
}
return arr;
};
var joiny = function (arr, joiner) {
var str = '';
for (var i = 0; i < arr.length; i += 1) {
str += arr[i];
if (i + 1 < arr.length) {
str += joiner;
}
}
return str;
};
module.exports = function bind(that) {
var target = this;
if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
throw new TypeError(ERROR_MESSAGE + target);
}
var args = slicy(arguments, 1);
var bound;
var binder = function () {
if (this instanceof bound) {
var result = target.apply(
this,
concatty(args, arguments)
);
if (Object(result) === result) {
return result;
}
return this;
}
return target.apply(
that,
concatty(args, arguments)
);
};
var boundLength = max(0, target.length - args.length);
var boundArgs = [];
for (var i = 0; i < boundLength; i++) {
boundArgs[i] = '$' + i;
}
bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
if (target.prototype) {
var Empty = function Empty() {};
Empty.prototype = target.prototype;
bound.prototype = new Empty();
Empty.prototype = null;
}
return bound;
};
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","2":"K D E wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","257":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB","289":"TC 0C 1C","292":"xC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","33":"J"},E:{"1":"ZB D E F A B C L M G 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","33":"J 2C ZC","129":"K 3C 4C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z HD ID NC uC JD OC","2":"F FD GD"},G:{"1":"E KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","33":"ZC"},H:{"2":"hD"},I:{"1":"TC J I jD kD lD vC mD nD","33":"iD"},J:{"1":"D A"},K:{"1":"B C H NC uC OC","2":"A"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"2D","257":"1D"}},B:4,C:"CSS3 Border-radius (rounded corners)",D:true};
@@ -0,0 +1,164 @@
'use strict';
exports.__esModule = true;
/** @typedef {import('estree').Node} Node */
/** @typedef {{ arguments: import('estree').CallExpression['arguments'], callee: Node }} Call */
/** @typedef {import('estree').ImportDeclaration | import('estree').ExportNamedDeclaration | import('estree').ExportAllDeclaration} Declaration */
/**
* Returns an object of node visitors that will call
* 'visitor' with every discovered module path.
*
* @type {(import('./moduleVisitor').default)}
*/
exports.default = function visitModules(visitor, options) {
const ignore = options && options.ignore;
const amd = !!(options && options.amd);
const commonjs = !!(options && options.commonjs);
// if esmodule is not explicitly disabled, it is assumed to be enabled
const esmodule = !!Object.assign({ esmodule: true }, options).esmodule;
const ignoreRegExps = ignore == null ? [] : ignore.map((p) => new RegExp(p));
/** @type {(source: undefined | null | import('estree').Literal, importer: Parameters<typeof visitor>[1]) => void} */
function checkSourceValue(source, importer) {
if (source == null) { return; } //?
// handle ignore
if (ignoreRegExps.some((re) => re.test(String(source.value)))) { return; }
// fire visitor
visitor(source, importer);
}
// for import-y declarations
/** @type {(node: Declaration) => void} */
function checkSource(node) {
checkSourceValue(node.source, node);
}
// for esmodule dynamic `import()` calls
/** @type {(node: import('estree').ImportExpression | import('estree').CallExpression) => void} */
function checkImportCall(node) {
/** @type {import('estree').Expression | import('estree').Literal | import('estree').CallExpression['arguments'][0]} */
let modulePath;
// refs https://github.com/estree/estree/blob/HEAD/es2020.md#importexpression
if (node.type === 'ImportExpression') {
modulePath = node.source;
} else if (node.type === 'CallExpression') {
// @ts-expect-error this structure is from an older version of eslint
if (node.callee.type !== 'Import') { return; }
if (node.arguments.length !== 1) { return; }
modulePath = node.arguments[0];
} else {
throw new TypeError('this should be unreachable');
}
if (modulePath.type !== 'Literal') { return; }
if (typeof modulePath.value !== 'string') { return; }
checkSourceValue(modulePath, node);
}
// for CommonJS `require` calls
// adapted from @mctep: https://git.io/v4rAu
/** @type {(call: Call) => void} */
function checkCommon(call) {
if (call.callee.type !== 'Identifier') { return; }
if (call.callee.name !== 'require') { return; }
if (call.arguments.length !== 1) { return; }
const modulePath = call.arguments[0];
if (modulePath.type !== 'Literal') { return; }
if (typeof modulePath.value !== 'string') { return; }
checkSourceValue(modulePath, call);
}
/** @type {(call: Call) => void} */
function checkAMD(call) {
if (call.callee.type !== 'Identifier') { return; }
if (call.callee.name !== 'require' && call.callee.name !== 'define') { return; }
if (call.arguments.length !== 2) { return; }
const modules = call.arguments[0];
if (modules.type !== 'ArrayExpression') { return; }
for (const element of modules.elements) {
if (!element) { continue; }
if (element.type !== 'Literal') { continue; }
if (typeof element.value !== 'string') { continue; }
if (
element.value === 'require'
|| element.value === 'exports'
) {
continue; // magic modules: https://github.com/requirejs/requirejs/wiki/Differences-between-the-simplified-CommonJS-wrapper-and-standard-AMD-define#magic-modules
}
checkSourceValue(element, element);
}
}
const visitors = {};
if (esmodule) {
Object.assign(visitors, {
ImportDeclaration: checkSource,
ExportNamedDeclaration: checkSource,
ExportAllDeclaration: checkSource,
CallExpression: checkImportCall,
ImportExpression: checkImportCall,
});
}
if (commonjs || amd) {
const currentCallExpression = visitors.CallExpression;
visitors.CallExpression = /** @type {(call: Call) => void} */ function (call) {
if (currentCallExpression) { currentCallExpression(call); }
if (commonjs) { checkCommon(call); }
if (amd) { checkAMD(call); }
};
}
return visitors;
};
/**
* make an options schema for the module visitor, optionally adding extra fields.
* @type {import('./moduleVisitor').makeOptionsSchema}
*/
function makeOptionsSchema(additionalProperties) {
/** @type {import('./moduleVisitor').Schema} */
const base = {
type: 'object',
properties: {
commonjs: { type: 'boolean' },
amd: { type: 'boolean' },
esmodule: { type: 'boolean' },
ignore: {
type: 'array',
minItems: 1,
items: { type: 'string' },
uniqueItems: true,
},
},
additionalProperties: false,
};
if (additionalProperties) {
for (const key in additionalProperties) {
// @ts-expect-error TS always has trouble with arbitrary object assignment/mutation
base.properties[key] = additionalProperties[key];
}
}
return base;
}
exports.makeOptionsSchema = makeOptionsSchema;
/**
* json schema object for options parameter. can be used to build rule options schema object.
*/
exports.optionsSchema = makeOptionsSchema();
@@ -0,0 +1 @@
var e={};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,r,s,i){if("function"!=typeof r)throw new TypeError("The listener must be a function");var c=new o(r,s||e,i),f=n?n+t:t;return e._events[f]?e._events[f].fn?e._events[f]=[e._events[f],c]:e._events[f].push(c):(e._events[f]=c,e._eventsCount++),e}function i(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function c(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),c.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},c.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,s=r.length,i=new Array(s);o<s;o++)i[o]=r[o].fn;return i},c.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},c.prototype.emit=function(e,t,r,o,s,i){var c=n?n+e:e;if(!this._events[c])return!1;var f,a,u=this._events[c],v=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),v){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,o),!0;case 5:return u.fn.call(u.context,t,r,o,s),!0;case 6:return u.fn.call(u.context,t,r,o,s,i),!0}for(a=1,f=new Array(v-1);a<v;a++)f[a-1]=arguments[a];u.fn.apply(u.context,f)}else{var l,p=u.length;for(a=0;a<p;a++)switch(u[a].once&&this.removeListener(e,u[a].fn,void 0,!0),v){case 1:u[a].fn.call(u[a].context);break;case 2:u[a].fn.call(u[a].context,t);break;case 3:u[a].fn.call(u[a].context,t,r);break;case 4:u[a].fn.call(u[a].context,t,r,o);break;default:if(!f)for(l=1,f=new Array(v-1);l<v;l++)f[l-1]=arguments[l];u[a].fn.apply(u[a].context,f)}}return!0},c.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,r,o){var s=n?n+e:e;if(!this._events[s])return this;if(!t)return i(this,s),this;var c=this._events[s];if(c.fn)c.fn!==t||o&&!c.once||r&&c.context!==r||i(this,s);else{for(var f=0,a=[],u=c.length;f<u;f++)(c[f].fn!==t||o&&!c[f].once||r&&c[f].context!==r)&&a.push(c[f]);a.length?this._events[s]=1===a.length?a[0]:a:i(this,s)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&i(this,t)):(this._events=new r,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,e.exports=c}({get exports(){return e},set exports(t){e=t}});var t=e;export{t as EventEmitter,t as default};//# sourceMappingURL=eventemitter3.esm.min.js.map
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=curryLazyBuildPlanServiceNodeFromResolvedValueElementMetadata.spec.d.ts.map
@@ -0,0 +1,6 @@
import { Kind } from '../symbols/index.mjs';
import { CreateType } from '../create/type.mjs';
/** `[JavaScript]` Creates a AsyncIterator type */
export function AsyncIterator(items, options) {
return CreateType({ [Kind]: 'AsyncIterator', type: 'AsyncIterator', items }, options);
}
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=no-object-type-as-default-prop.d.ts.map
@@ -0,0 +1,268 @@
/**
* @file Mac glyf命名表
* @author mengke01(kekee000@gmail.com)
*
* see:
* http://www.microsoft.com/typography/otspec/WGL4.htm
*/
export default {
0: '.notdef',
1: '.null',
2: 'nonmarkingreturn',
3: 'space',
4: 'exclam',
5: 'quotedbl',
6: 'numbersign',
7: 'dollar',
8: 'percent',
9: 'ampersand',
10: 'quotesingle',
11: 'parenleft',
12: 'parenright',
13: 'asterisk',
14: 'plus',
15: 'comma',
16: 'hyphen',
17: 'period',
18: 'slash',
19: 'zero',
20: 'one',
21: 'two',
22: 'three',
23: 'four',
24: 'five',
25: 'six',
26: 'seven',
27: 'eight',
28: 'nine',
29: 'colon',
30: 'semicolon',
31: 'less',
32: 'equal',
33: 'greater',
34: 'question',
35: 'at',
36: 'A',
37: 'B',
38: 'C',
39: 'D',
40: 'E',
41: 'F',
42: 'G',
43: 'H',
44: 'I',
45: 'J',
46: 'K',
47: 'L',
48: 'M',
49: 'N',
50: 'O',
51: 'P',
52: 'Q',
53: 'R',
54: 'S',
55: 'T',
56: 'U',
57: 'V',
58: 'W',
59: 'X',
60: 'Y',
61: 'Z',
62: 'bracketleft',
63: 'backslash',
64: 'bracketright',
65: 'asciicircum',
66: 'underscore',
67: 'grave',
68: 'a',
69: 'b',
70: 'c',
71: 'd',
72: 'e',
73: 'f',
74: 'g',
75: 'h',
76: 'i',
77: 'j',
78: 'k',
79: 'l',
80: 'm',
81: 'n',
82: 'o',
83: 'p',
84: 'q',
85: 'r',
86: 's',
87: 't',
88: 'u',
89: 'v',
90: 'w',
91: 'x',
92: 'y',
93: 'z',
94: 'braceleft',
95: 'bar',
96: 'braceright',
97: 'asciitilde',
98: 'Adieresis',
99: 'Aring',
100: 'Ccedilla',
101: 'Eacute',
102: 'Ntilde',
103: 'Odieresis',
104: 'Udieresis',
105: 'aacute',
106: 'agrave',
107: 'acircumflex',
108: 'adieresis',
109: 'atilde',
110: 'aring',
111: 'ccedilla',
112: 'eacute',
113: 'egrave',
114: 'ecircumflex',
115: 'edieresis',
116: 'iacute',
117: 'igrave',
118: 'icircumflex',
119: 'idieresis',
120: 'ntilde',
121: 'oacute',
122: 'ograve',
123: 'ocircumflex',
124: 'odieresis',
125: 'otilde',
126: 'uacute',
127: 'ugrave',
128: 'ucircumflex',
129: 'udieresis',
130: 'dagger',
131: 'degree',
132: 'cent',
133: 'sterling',
134: 'section',
135: 'bullet',
136: 'paragraph',
137: 'germandbls',
138: 'registered',
139: 'copyright',
140: 'trademark',
141: 'acute',
142: 'dieresis',
143: 'notequal',
144: 'AE',
145: 'Oslash',
146: 'infinity',
147: 'plusminus',
148: 'lessequal',
149: 'greaterequal',
150: 'yen',
151: 'mu',
152: 'partialdiff',
153: 'summation',
154: 'product',
155: 'pi',
156: 'integral',
157: 'ordfeminine',
158: 'ordmasculine',
159: 'Omega',
160: 'ae',
161: 'oslash',
162: 'questiondown',
163: 'exclamdown',
164: 'logicalnot',
165: 'radical',
166: 'florin',
167: 'approxequal',
168: 'Delta',
169: 'guillemotleft',
170: 'guillemotright',
171: 'ellipsis',
172: 'nonbreakingspace',
173: 'Agrave',
174: 'Atilde',
175: 'Otilde',
176: 'OE',
177: 'oe',
178: 'endash',
179: 'emdash',
180: 'quotedblleft',
181: 'quotedblright',
182: 'quoteleft',
183: 'quoteright',
184: 'divide',
185: 'lozenge',
186: 'ydieresis',
187: 'Ydieresis',
188: 'fraction',
189: 'currency',
190: 'guilsinglleft',
191: 'guilsinglright',
192: 'fi',
193: 'fl',
194: 'daggerdbl',
195: 'periodcentered',
196: 'quotesinglbase',
197: 'quotedblbase',
198: 'perthousand',
199: 'Acircumflex',
200: 'Ecircumflex',
201: 'Aacute',
202: 'Edieresis',
203: 'Egrave',
204: 'Iacute',
205: 'Icircumflex',
206: 'Idieresis',
207: 'Igrave',
208: 'Oacute',
209: 'Ocircumflex',
210: 'apple',
211: 'Ograve',
212: 'Uacute',
213: 'Ucircumflex',
214: 'Ugrave',
215: 'dotlessi',
216: 'circumflex',
217: 'tilde',
218: 'macron',
219: 'breve',
220: 'dotaccent',
221: 'ring',
222: 'cedilla',
223: 'hungarumlaut',
224: 'ogonek',
225: 'caron',
226: 'Lslash',
227: 'lslash',
228: 'Scaron',
229: 'scaron',
230: 'Zcaron',
231: 'zcaron',
232: 'brokenbar',
233: 'Eth',
234: 'eth',
235: 'Yacute',
236: 'yacute',
237: 'Thorn',
238: 'thorn',
239: 'minus',
240: 'multiply',
241: 'onesuperior',
242: 'twosuperior',
243: 'threesuperior',
244: 'onehalf',
245: 'onequarter',
246: 'threequarters',
247: 'franc',
248: 'Gbreve',
249: 'gbreve',
250: 'Idotaccent',
251: 'Scedilla',
252: 'scedilla',
253: 'Cacute',
254: 'cacute',
255: 'Ccaron',
256: 'ccaron',
257: 'dcroat'
};
@@ -0,0 +1,24 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {useLocale} from './context';
import {useMemo} from 'react';
/**
* Provides localized list formatting for the current locale. Automatically updates when the locale changes,
* and handles caching of the list formatter for performance.
* @param options - Formatting options.
*/
export function useListFormatter(options: Intl.ListFormatOptions = {}): Intl.ListFormat {
let {locale} = useLocale();
return useMemo(() => new Intl.ListFormat(locale, options), [locale, options]);
}
@@ -0,0 +1,72 @@
# import/default
💼 This rule is enabled in the following configs: ❗ `errors`, ☑️ `recommended`.
<!-- end auto-generated rule header -->
If a default import is requested, this rule will report if there is no default
export in the imported module.
For [ES7], reports if a default is named and exported but is not found in the
referenced module.
Note: for packages, the plugin will find exported names
from [`jsnext:main`], if present in `package.json`.
Redux's npm module includes this key, and thereby is lintable, for example.
A module path that is [ignored] or not [unambiguously an ES module] will not be reported when imported.
[ignored]: ../README.md#importignore
[unambiguously an ES module]: https://github.com/bmeck/UnambiguousJavaScriptGrammar
## Rule Details
Given:
```js
// ./foo.js
export default function () { return 42 }
// ./bar.js
export function bar() { return null }
// ./baz.js
module.exports = function () { /* ... */ }
// node_modules/some-module/index.js
exports.sharedFunction = function shared() { /* ... */ }
```
The following is considered valid:
```js
import foo from './foo'
// assuming 'node_modules' are ignored (true by default)
import someModule from 'some-module'
```
...and the following cases are reported:
```js
import bar from './bar' // no default export found in ./bar
import baz from './baz' // no default export found in ./baz
```
## When Not To Use It
If you are using CommonJS and/or modifying the exported namespace of any module at
runtime, you will likely see false positives with this rule.
This rule currently does not interpret `module.exports = ...` as a `default` export,
either, so such a situation will be reported in the importing module.
## Further Reading
- Lee Byron's [ES7] export proposal
- [`import/ignore`] setting
- [`jsnext:main`] (Rollup)
[ES7]: https://github.com/leebyron/ecmascript-more-export-from
[`import/ignore`]: ../../README.md#importignore
[`jsnext:main`]: https://github.com/rollup/rollup/wiki/jsnext:main
@@ -0,0 +1,59 @@
var baseFindIndex = require('./_baseFindIndex'),
baseIteratee = require('./_baseIteratee'),
toInteger = require('./toInteger');
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max,
nativeMin = Math.min;
/**
* This method is like `_.findIndex` except that it iterates over elements
* of `collection` from right to left.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param {number} [fromIndex=array.length-1] The index to search from.
* @returns {number} Returns the index of the found element, else `-1`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': true },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': false }
* ];
*
* _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
* // => 2
*
* // The `_.matches` iteratee shorthand.
* _.findLastIndex(users, { 'user': 'barney', 'active': true });
* // => 0
*
* // The `_.matchesProperty` iteratee shorthand.
* _.findLastIndex(users, ['active', false]);
* // => 2
*
* // The `_.property` iteratee shorthand.
* _.findLastIndex(users, 'active');
* // => 0
*/
function findLastIndex(array, predicate, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = length - 1;
if (fromIndex !== undefined) {
index = toInteger(fromIndex);
index = fromIndex < 0
? nativeMax(length + index, 0)
: nativeMin(index, length - 1);
}
return baseFindIndex(array, baseIteratee(predicate, 3), index, true);
}
module.exports = findLastIndex;
@@ -0,0 +1,45 @@
export declare const enum Action {
ReduceFlag = 65536,
ValueMask = 65535,
ReduceDepthShift = 19,
RepeatFlag = 131072,
GotoFlag = 131072,
StayFlag = 262144
}
export declare const enum StateFlag {
Skipped = 1,
Accepting = 2
}
export declare const enum Specialize {
Specialize = 0,
Extend = 1
}
export declare const enum Term {
Err = 0
}
export declare const enum Seq {
End = 65535,
Done = 0,
Next = 1,
Other = 2
}
export declare const enum ParseState {
Flags = 0,
Actions = 1,
Skip = 2,
TokenizerMask = 3,
DefaultReduce = 4,
ForcedReduce = 5,
Size = 6
}
export declare const enum Encode {
BigValCode = 126,
BigVal = 65535,
Start = 32,
Gap1 = 34,
Gap2 = 92,
Base = 46
}
export declare const enum File {
Version = 14
}
@@ -0,0 +1,25 @@
import Client from './client'
import Dispatcher from './dispatcher'
import MockAgent from './mock-agent'
import { MockInterceptor, Interceptable } from './mock-interceptor'
export default MockClient
/** MockClient extends the Client API and allows one to mock requests. */
declare class MockClient extends Client implements Interceptable {
constructor(origin: string, options: MockClient.Options);
/** Intercepts any matching requests that use the same origin as this mock client. */
intercept(options: MockInterceptor.Options): MockInterceptor;
/** Dispatches a mocked request. */
dispatch(options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandlers): boolean;
/** Closes the mock client and gracefully waits for enqueued requests to complete. */
close(): Promise<void>;
}
declare namespace MockClient {
/** MockClient options. */
export interface Options extends Client.Options {
/** The agent to associate this MockClient with. */
agent: MockAgent;
}
}
@@ -0,0 +1,27 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
var _react = require("react");
var _utils = require("../utils");
var _isDev = _interopRequireDefault(require("../utils/isDev"));
var useMount = function useMount(fn) {
if (_isDev["default"]) {
if (!(0, _utils.isFunction)(fn)) {
console.error("useMount: parameter `fn` expected to be a function, but got \"".concat((0, _typeof2["default"])(fn), "\"."));
}
}
(0, _react.useEffect)(function () {
var result = fn === null || fn === void 0 ? void 0 : fn();
// If fn returns a Promise, don't return it as cleanup function
if (result && (0, _typeof2["default"])(result) === 'object' && typeof result.then === 'function') {
return;
}
return result;
}, []);
};
var _default = exports["default"] = useMount;
@@ -0,0 +1,7 @@
import { a as addObject, b as addNumber } from "./addObject-CJjLNrjF.mjs";
function add(date, num, unit) {
return typeof num === "object" && num !== null ? addObject(date, num, 1) : addNumber(date, num, unit);
}
export {
add as default
};
@@ -0,0 +1,6 @@
import React from 'react';
interface Props {
children: React.ReactNode;
}
export declare function NullifiedContextProvider({ children }: Props): JSX.Element;
export {};
@@ -0,0 +1 @@
{"name":"ms","version":"2.1.3","requiresBuild":false,"files":{"index.js":{"checkedAt":1794532088766,"integrity":"sha512-UbRQiaU6I8EuKOuIk5bi+nG5UIW6paw01x/7YlExvy/sOumO/q5TdlbiDqJX9E4Im868mtVM9nLN6FIQLkPhUw==","mode":420,"size":3024},"package.json":{"checkedAt":1794532088766,"integrity":"sha512-nhbFaJtXJ19O1iTGlU8SKZcG4jcqYPYXNCGADaXt+e1S5S/SsHmPgmzdut5soZpuaplpYMZpfMLaDd7LNkCVIA==","mode":420,"size":732},"license.md":{"checkedAt":1794532088767,"integrity":"sha512-mVNuznPC94j6dMQr+rwETTlmgS/7mp0wu5GDNxmZu0BnsmwbNtQHOERKN8NB/VubXoM8nUCIS5nTkUflqePz3g==","mode":420,"size":1079},"readme.md":{"checkedAt":1794532088767,"integrity":"sha512-pZwjuJVu0TxBUDXwmxnqA9TJtnWe9x0EJzWHH0Y1L0RCh7DD3VX1ZN3l2XzXZeTBZo11c4fAtYicWFixDCa/LQ==","mode":420,"size":1886}}}
@@ -0,0 +1 @@
{"name":"@react-types/shared","version":"3.26.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532106728,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"package.json":{"checkedAt":1794532106728,"integrity":"sha512-S5GYOhQ3DKNo+ghjxt2bXXcVeI3hiN/4x1ECgpS2M79AB6vT5VZ04Qr9jH/ptnT4b4tIdPV988HGkXZ0tVNu2g==","mode":420,"size":463},"README.md":{"checkedAt":1794532106728,"integrity":"sha512-Yq3Al5d1x2xKJI3eLMc3KlMwzPDNJQjKHjaT3RZhL9CkGTZmVHZZygcKnf7nspuZ0aU6lsG0XDq6f54obWDZeg==","mode":420,"size":137},"src/collections.d.ts":{"checkedAt":1794532106728,"integrity":"sha512-mu6V+xPw37DebvTDxhDr5iUwIQ5V38IzPm2QWbPcqE/9mtrw5tzGregI7QriAG8I8KBw6AgB8yN6LghP/BBDTg==","mode":420,"size":8151},"src/dna.d.ts":{"checkedAt":1794532106728,"integrity":"sha512-WLYTUY4PA1qQqaf6GBuHN55Mmw81BsSQwWtbK135jhPmAjvBW138nLzZhxWwtoI9gv3TPflPscSX4fL9kP6JQQ==","mode":420,"size":9757},"src/dnd.d.ts":{"checkedAt":1794532106728,"integrity":"sha512-+gxrRE1p8b4jEiT4UZfiL6V2aoWdPjbC314TxN7cB8u38dTNP172R1ySq+WE7XKeJq/8Lu2bjB/Me2gpagPJzQ==","mode":420,"size":9380},"src/dom.d.ts":{"checkedAt":1794532106729,"integrity":"sha512-9bVR8Hls8yNRynfiZlYmZyYGAeQgnhvslWSIiOfxnTXegeQncVFfVDAQLkIV6duAnmvbz6jZE9OjBcTsLLgpUA==","mode":420,"size":8923},"src/events.d.ts":{"checkedAt":1794532106729,"integrity":"sha512-m1yyMNUp77Jtivns43gsDJ/4e9buldZSMFf8OjEVg9hpiJWwF3AEV+MEep0bE6vnhL50nQW5fQ15zAiBxMo+bA==","mode":420,"size":6410},"src/index.d.ts":{"checkedAt":1794532106729,"integrity":"sha512-2DM/gwOJwcIDomjrsfsZIlbP0gRS2vzELvePvDmel3pDNCkACjsVUZ5dAjMBRkMh53H2jDS7fzK2wpbg483pPQ==","mode":420,"size":989},"src/inputs.d.ts":{"checkedAt":1794532106729,"integrity":"sha512-k8pqjsW0y/F/Rh8j2epognVYhNmudOgDYOd+gUuFCGXXQGS0eY5/bad39JU3QGiAH5Inp15HQGsWUxL2ALUAkg==","mode":420,"size":4120},"src/key.d.ts":{"checkedAt":1794532106729,"integrity":"sha512-y61vQkmu5Ijf8JRNpxJIXHvtrRz46mbYuuXDfcSdRhTdOjGuTaUaClrQiXW7JNqkxQUwFvT6wPCwYG/PuvEhGA==","mode":420,"size":656},"src/labelable.d.ts":{"checkedAt":1794532106729,"integrity":"sha512-iGRzSFxLUekiyTZJbkiUTtzqfu2NexkBLOEMhlzdBlUn+DPrIiQRGdNXMTA8F7rp51fWTxz/aeATwqyazHRH3w==","mode":420,"size":1580},"src/locale.d.ts":{"checkedAt":1794532106729,"integrity":"sha512-AAzJPLNQwqE9hPMCA1iqjyuEhag9oR3zp0erYqQvjUuG1cDErRHKbiqycGPQYK9pPpxtkhmm1bgby6J4iTI2vQ==","mode":420,"size":660},"src/orientation.d.ts":{"checkedAt":1794532106729,"integrity":"sha512-tGsSjmQQgfrkdkRXNsQHx7a01AXo2c6j0SObn9r2Z1ql00Jb0ei3w6Z0MrGf1BvQsRUsjo15J7fnz49u96AypQ==","mode":420,"size":674},"src/refs.d.ts":{"checkedAt":1794532106729,"integrity":"sha512-ZXF1/Z/UsvF9C1KyMdNqXr+ckQfO+4G3TLLtpt+BpzYpdXWqQT6ERgM1xjEkK3dLKqtob/399xiZ71yAgxKYNw==","mode":420,"size":1393},"src/removable.d.ts":{"checkedAt":1794532106729,"integrity":"sha512-8O8e0tolLqbDeuXQZjJTyKOPpTosAUmCYJSh/4Euc0bZpG3EIiiTbV2qBS/TEuFSYBkusZvLN/qO2PwmMUwc/A==","mode":420,"size":775},"src/selection.d.ts":{"checkedAt":1794532106729,"integrity":"sha512-IKZKlJWQxvX9KmD6FbSQfSxFe//yZH1TiEyEArW0tTBveuUBG13PtxqJ3fLc3YuINl520vI4CHcEFVbgQBoMhQ==","mode":420,"size":2138},"src/style.d.ts":{"checkedAt":1794532106729,"integrity":"sha512-M2DvRK9HU8onude7I7krlx58pJi6rP7B52iqg5VqHz7heSBtRNM42ctlfmXLrm26W8Av04VqrNQjTtynF6QskQ==","mode":420,"size":18819}}}
@@ -0,0 +1,14 @@
module.exports = {
"ascending": `stigande`,
"ascendingSort": (args)=>`sorterat p\xe5 kolumn ${args.columnName} i stigande ordning`,
"columnSize": (args)=>`${args.value} pixlar`,
"descending": `fallande`,
"descendingSort": (args)=>`sorterat p\xe5 kolumn ${args.columnName} i fallande ordning`,
"resizerDescription": `Tryck p\xe5 Retur f\xf6r att b\xf6rja \xe4ndra storlek`,
"select": `Markera`,
"selectAll": `Markera allt`,
"sortable": `sorterbar kolumn`
};
//# sourceMappingURL=sv-SE.main.js.map
@@ -0,0 +1,204 @@
{
"name": "vite",
"version": "6.4.1",
"type": "module",
"license": "MIT",
"author": "Evan You",
"description": "Native-ESM powered web dev build tool",
"bin": {
"vite": "bin/vite.js"
},
"keywords": [
"frontend",
"framework",
"hmr",
"dev-server",
"build-tool",
"vite"
],
"main": "./dist/node/index.js",
"types": "./dist/node/index.d.ts",
"exports": {
".": {
"module-sync": "./dist/node/index.js",
"import": "./dist/node/index.js",
"require": "./index.cjs"
},
"./client": {
"types": "./client.d.ts"
},
"./module-runner": "./dist/node/module-runner.js",
"./dist/client/*": "./dist/client/*",
"./types/*": {
"types": "./types/*"
},
"./types/internal/*": null,
"./package.json": "./package.json"
},
"typesVersions": {
"*": {
"module-runner": [
"dist/node/module-runner.d.ts"
]
}
},
"imports": {
"#module-sync-enabled": {
"module-sync": "./misc/true.js",
"default": "./misc/false.js"
}
},
"files": [
"bin",
"dist",
"misc/**/*.js",
"client.d.ts",
"index.cjs",
"index.d.cts",
"types"
],
"engines": {
"node": "^18.0.0 || ^20.0.0 || >=22.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vitejs/vite.git",
"directory": "packages/vite"
},
"bugs": {
"url": "https://github.com/vitejs/vite/issues"
},
"homepage": "https://vite.dev",
"funding": "https://github.com/vitejs/vite?sponsor=1",
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
"dependencies": {
"esbuild": "^0.25.0",
"fdir": "^6.4.4",
"picomatch": "^4.0.2",
"postcss": "^8.5.3",
"rollup": "^4.34.9",
"tinyglobby": "^0.2.13"
},
"optionalDependencies": {
"fsevents": "~2.3.3"
},
"devDependencies": {
"@ampproject/remapping": "^2.3.0",
"@babel/parser": "^7.27.0",
"@jridgewell/trace-mapping": "^0.3.25",
"@polka/compression": "^1.0.0-next.25",
"@rollup/plugin-alias": "^5.1.1",
"@rollup/plugin-commonjs": "^28.0.3",
"@rollup/plugin-dynamic-import-vars": "2.1.4",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "16.0.1",
"@rollup/pluginutils": "^5.1.4",
"@types/escape-html": "^1.0.4",
"@types/pnpapi": "^0.0.5",
"artichokie": "^0.3.1",
"cac": "^6.7.14",
"chokidar": "^3.6.0",
"connect": "^3.7.0",
"convert-source-map": "^2.0.0",
"cors": "^2.8.5",
"cross-spawn": "^7.0.6",
"debug": "^4.4.0",
"dep-types": "link:./src/types",
"dotenv": "^16.5.0",
"dotenv-expand": "^12.0.2",
"es-module-lexer": "^1.6.0",
"escape-html": "^1.0.3",
"estree-walker": "^3.0.3",
"etag": "^1.8.1",
"http-proxy": "^1.18.1",
"launch-editor-middleware": "^2.10.0",
"lightningcss": "^1.29.3",
"magic-string": "^0.30.17",
"mlly": "^1.7.4",
"mrmime": "^2.0.1",
"nanoid": "^5.1.5",
"open": "^10.1.1",
"parse5": "^7.2.1",
"pathe": "^2.0.3",
"periscopic": "^4.0.2",
"picocolors": "^1.1.1",
"postcss-import": "^16.1.0",
"postcss-load-config": "^6.0.1",
"postcss-modules": "^6.0.1",
"resolve.exports": "^2.0.3",
"rollup-plugin-dts": "^6.2.1",
"rollup-plugin-esbuild": "^6.2.1",
"rollup-plugin-license": "^3.6.0",
"sass": "^1.86.3",
"sass-embedded": "^1.86.3",
"sirv": "^3.0.2",
"source-map-support": "^0.5.21",
"strip-literal": "^3.0.0",
"terser": "^5.39.0",
"tsconfck": "^3.1.5",
"tslib": "^2.8.1",
"types": "link:./types",
"ufo": "^1.6.1",
"ws": "^8.18.1"
},
"peerDependencies": {
"@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
"jiti": ">=1.21.0",
"less": "*",
"lightningcss": "^1.21.0",
"sass": "*",
"sass-embedded": "*",
"stylus": "*",
"sugarss": "*",
"terser": "^5.16.0",
"tsx": "^4.8.1",
"yaml": "^2.4.2"
},
"peerDependenciesMeta": {
"@types/node": {
"optional": true
},
"jiti": {
"optional": true
},
"sass": {
"optional": true
},
"sass-embedded": {
"optional": true
},
"stylus": {
"optional": true
},
"less": {
"optional": true
},
"sugarss": {
"optional": true
},
"lightningcss": {
"optional": true
},
"terser": {
"optional": true
},
"tsx": {
"optional": true
},
"yaml": {
"optional": true
}
},
"scripts": {
"dev": "tsx scripts/dev.ts",
"build": "premove dist && pnpm build-bundle && pnpm build-types",
"build-bundle": "rollup --config rollup.config.ts --configPlugin esbuild",
"build-types": "pnpm build-types-temp && pnpm build-types-roll && pnpm build-types-check",
"build-types-temp": "tsc --emitDeclarationOnly --outDir temp -p src/node/tsconfig.build.json",
"build-types-roll": "rollup --config rollup.dts.config.ts --configPlugin esbuild && premove temp",
"build-types-check": "tsc --project tsconfig.check.json",
"typecheck": "tsc --noEmit && tsc --noEmit -p src/node",
"lint": "eslint --cache --ext .ts src/**",
"format": "prettier --write --cache --parser typescript \"src/**/*.ts\""
}
}
@@ -0,0 +1,6 @@
/**
* For Node.js, simply re-export the core `util.deprecate` function.
*/
module.exports = require('util').deprecate;
@@ -0,0 +1,56 @@
'use strict';
var $defineProperty = require('../');
var test = require('tape');
var gOPD = require('gopd');
test('defineProperty: supported', { skip: !$defineProperty }, function (t) {
t.plan(4);
t.equal(typeof $defineProperty, 'function', 'defineProperty is supported');
if ($defineProperty && gOPD) { // this `if` check is just to shut TS up
/** @type {{ a: number, b?: number, c?: number }} */
var o = { a: 1 };
$defineProperty(o, 'b', { enumerable: true, value: 2 });
t.deepEqual(
gOPD(o, 'b'),
{
configurable: false,
enumerable: true,
value: 2,
writable: false
},
'property descriptor is as expected'
);
$defineProperty(o, 'c', { enumerable: false, value: 3, writable: true });
t.deepEqual(
gOPD(o, 'c'),
{
configurable: false,
enumerable: false,
value: 3,
writable: true
},
'property descriptor is as expected'
);
}
t.equal($defineProperty, Object.defineProperty, 'defineProperty is Object.defineProperty');
t.end();
});
test('defineProperty: not supported', { skip: !!$defineProperty }, function (t) {
t.notOk($defineProperty, 'defineProperty is not supported');
t.match(
typeof $defineProperty,
/^(?:undefined|boolean)$/,
'`typeof defineProperty` is `undefined` or `boolean`'
);
t.end();
});
@@ -0,0 +1,69 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/bulk/delete-document.tsx
var delete_document_exports = {};
__export(delete_document_exports, {
DeleteDocumentBulkIcon: () => DeleteDocumentBulkIcon
});
module.exports = __toCommonJS(delete_document_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var DeleteDocumentBulkIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
d: "M21.07 5.23c-1.61-.16-3.22-.28-4.84-.37v-.01l-.22-1.3c-.15-.92-.37-2.3-2.71-2.3h-2.62c-2.33 0-2.55 1.32-2.71 2.29l-.21 1.28c-.93.06-1.86.12-2.79.21l-2.04.2c-.42.04-.72.41-.68.82.04.41.4.71.82.67l2.04-.2c5.24-.52 10.52-.32 15.82.21h.08c.38 0 .71-.29.75-.68a.766.766 0 0 0-.69-.82Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
d: "M19.23 8.14c-.24-.25-.57-.39-.91-.39H5.68c-.34 0-.68.14-.91.39-.23.25-.36.59-.34.94l.62 10.26c.11 1.52.25 3.42 3.74 3.42h6.42c3.49 0 3.63-1.89 3.74-3.42l.62-10.25c.02-.36-.11-.7-.34-.95Z",
fill: "currentColor",
opacity: 0.399
}
),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
clipRule: "evenodd",
d: "M9.58 17a.75.75 0 0 1 .75-.75h3.33a.75.75 0 0 1 0 1.5h-3.33a.75.75 0 0 1-.75-.75ZM8.75 13a.75.75 0 0 1 .75-.75h5a.75.75 0 0 1 0 1.5h-5a.75.75 0 0 1-.75-.75Z",
fill: "currentColor",
fillRule: "evenodd"
}
)
]
}
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
DeleteDocumentBulkIcon
});
@@ -0,0 +1,173 @@
import { Convert } from "pvtsutils";
export class IpConverter {
static isIPv4(ip) {
return /^(\d{1,3}\.){3}\d{1,3}$/.test(ip);
}
static parseIPv4(ip) {
const parts = ip.split(".");
if (parts.length !== 4) {
throw new Error("Invalid IPv4 address");
}
return parts.map((part) => {
const num = parseInt(part, 10);
if (isNaN(num) || num < 0 || num > 255) {
throw new Error("Invalid IPv4 address part");
}
return num;
});
}
static parseIPv6(ip) {
const expandedIP = this.expandIPv6(ip);
const parts = expandedIP.split(":");
if (parts.length !== 8) {
throw new Error("Invalid IPv6 address");
}
return parts.reduce((bytes, part) => {
const num = parseInt(part, 16);
if (isNaN(num) || num < 0 || num > 0xffff) {
throw new Error("Invalid IPv6 address part");
}
bytes.push((num >> 8) & 0xff);
bytes.push(num & 0xff);
return bytes;
}, []);
}
static expandIPv6(ip) {
if (!ip.includes("::")) {
return ip;
}
const parts = ip.split("::");
if (parts.length > 2) {
throw new Error("Invalid IPv6 address");
}
const left = parts[0] ? parts[0].split(":") : [];
const right = parts[1] ? parts[1].split(":") : [];
const missing = 8 - (left.length + right.length);
if (missing < 0) {
throw new Error("Invalid IPv6 address");
}
return [...left, ...Array(missing).fill("0"), ...right].join(":");
}
static formatIPv6(bytes) {
const parts = [];
for (let i = 0; i < 16; i += 2) {
parts.push(((bytes[i] << 8) | bytes[i + 1]).toString(16));
}
return this.compressIPv6(parts.join(":"));
}
static compressIPv6(ip) {
const parts = ip.split(":");
let longestZeroStart = -1;
let longestZeroLength = 0;
let currentZeroStart = -1;
let currentZeroLength = 0;
for (let i = 0; i < parts.length; i++) {
if (parts[i] === "0") {
if (currentZeroStart === -1) {
currentZeroStart = i;
}
currentZeroLength++;
}
else {
if (currentZeroLength > longestZeroLength) {
longestZeroStart = currentZeroStart;
longestZeroLength = currentZeroLength;
}
currentZeroStart = -1;
currentZeroLength = 0;
}
}
if (currentZeroLength > longestZeroLength) {
longestZeroStart = currentZeroStart;
longestZeroLength = currentZeroLength;
}
if (longestZeroLength > 1) {
const before = parts.slice(0, longestZeroStart).join(":");
const after = parts.slice(longestZeroStart + longestZeroLength).join(":");
return `${before}::${after}`;
}
return ip;
}
static parseCIDR(text) {
const [addr, prefixStr] = text.split("/");
const prefix = parseInt(prefixStr, 10);
if (this.isIPv4(addr)) {
if (prefix < 0 || prefix > 32) {
throw new Error("Invalid IPv4 prefix length");
}
return [this.parseIPv4(addr), prefix];
}
else {
if (prefix < 0 || prefix > 128) {
throw new Error("Invalid IPv6 prefix length");
}
return [this.parseIPv6(addr), prefix];
}
}
static decodeIP(value) {
if (value.length === 64 && parseInt(value, 16) === 0) {
return "::/0";
}
if (value.length !== 16) {
return value;
}
const mask = parseInt(value.slice(8), 16)
.toString(2)
.split("")
.reduce((a, k) => a + +k, 0);
let ip = value.slice(0, 8).replace(/(.{2})/g, (match) => `${parseInt(match, 16)}.`);
ip = ip.slice(0, -1);
return `${ip}/${mask}`;
}
static toString(buf) {
const uint8 = new Uint8Array(buf);
if (uint8.length === 4) {
return Array.from(uint8).join(".");
}
if (uint8.length === 16) {
return this.formatIPv6(uint8);
}
if (uint8.length === 8 || uint8.length === 32) {
const half = uint8.length / 2;
const addrBytes = uint8.slice(0, half);
const maskBytes = uint8.slice(half);
const isAllZeros = uint8.every((byte) => byte === 0);
if (isAllZeros) {
return uint8.length === 8 ? "0.0.0.0/0" : "::/0";
}
const prefixLen = maskBytes.reduce((a, b) => a + (b.toString(2).match(/1/g) || []).length, 0);
if (uint8.length === 8) {
const addrStr = Array.from(addrBytes).join(".");
return `${addrStr}/${prefixLen}`;
}
else {
const addrStr = this.formatIPv6(addrBytes);
return `${addrStr}/${prefixLen}`;
}
}
return this.decodeIP(Convert.ToHex(buf));
}
static fromString(text) {
if (text.includes("/")) {
const [addr, prefix] = this.parseCIDR(text);
const maskBytes = new Uint8Array(addr.length);
let bitsLeft = prefix;
for (let i = 0; i < maskBytes.length; i++) {
if (bitsLeft >= 8) {
maskBytes[i] = 0xff;
bitsLeft -= 8;
}
else if (bitsLeft > 0) {
maskBytes[i] = 0xff << (8 - bitsLeft);
bitsLeft = 0;
}
}
const out = new Uint8Array(addr.length * 2);
out.set(addr, 0);
out.set(maskBytes, addr.length);
return out.buffer;
}
const bytes = this.isIPv4(text) ? this.parseIPv4(text) : this.parseIPv6(text);
return new Uint8Array(bytes).buffer;
}
}
@@ -0,0 +1,44 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/info-filled.tsx
var info_filled_exports = {};
__export(info_filled_exports, {
InfoFilledIcon: () => InfoFilledIcon
});
module.exports = __toCommonJS(info_filled_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var InfoFilledIcon = (props) => {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"svg",
{
fill: "none",
height: "24",
viewBox: "0 0 24 24",
width: "24",
xmlns: "http://www.w3.org/2000/svg",
...props,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 22C17.51 22 22 17.51 22 12C22 6.49 17.51 2 12 2C6.49 2 2 6.49 2 12C2 17.51 6.49 22 12 22ZM12.75 16C12.75 16.41 12.41 16.75 12 16.75C11.59 16.75 11.25 16.41 11.25 16L11.25 11C11.25 10.59 11.59 10.25 12 10.25C12.41 10.25 12.75 10.59 12.75 11L12.75 16ZM11.08 7.62C11.13 7.49 11.2 7.39 11.29 7.29C11.39 7.2 11.5 7.13 11.62 7.08C11.74 7.03 11.87 7 12 7C12.13 7 12.26 7.03 12.38 7.08C12.5 7.13 12.61 7.2 12.71 7.29C12.8 7.39 12.87 7.49 12.92 7.62C12.97 7.74 13 7.87 13 8C13 8.13 12.97 8.26 12.92 8.38C12.87 8.5 12.8 8.61 12.71 8.71C12.61 8.8 12.5 8.87 12.38 8.92C12.14 9.02 11.86 9.02 11.62 8.92C11.5 8.87 11.39 8.8 11.29 8.71C11.2 8.61 11.13 8.5 11.08 8.38C11.03 8.26 11 8.13 11 8C11 7.87 11.03 7.74 11.08 7.62Z" })
}
);
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
InfoFilledIcon
});
@@ -0,0 +1 @@
{"name":"@vitest/ui","version":"4.0.9","requiresBuild":false,"files":{"dist/client/assets/index-VPnwgb7M.css":{"checkedAt":1794532091393,"integrity":"sha512-XYOAwCaK3BcmX8NyyKqq4zNuil/TyIQy7Et/oRJDMe/i8qoGDffZhzG0VsVSOZqov4AQSIOhXwTHl/aetz2A4Q==","mode":420,"size":76810},"dist/client/index.html":{"checkedAt":1794532091393,"integrity":"sha512-eNwm4JK6TBW4q37SK+8iGfLdhxlDaehQMq81LTZskxv2vDVKK9/F1OZe9fudXSB6545hbS3yJHBHgIXYfcrp8A==","mode":420,"size":1208},"dist/client/favicon.ico":{"checkedAt":1794532091393,"integrity":"sha512-KrxK2djFmeOlo4G5v/MluQd5Fy5yqOPfl6OqD3f84nKgsERiAc0Z1OJ74ZLkwP+11MvPXwxJ+Hnzst6JbwClTA==","mode":420,"size":814},"dist/client/assets/index-zBMt7UWw.js":{"checkedAt":1794532091394,"integrity":"sha512-zxx4/aT7ViVQvEjNdKEn1zX1z5xf4KInXt6atZz2JB7x3iF0in3aSv6xQOgt5hhztnIFw3DL5yr85JJZVQeoog==","mode":420,"size":651305},"dist/index.js":{"checkedAt":1794532091395,"integrity":"sha512-xVh8D6DUDJhnop398y/GzJ2IYKsKOImt7HNOu3baDzE80Zx71GVtDbf1oHm+A8HMB3ZPtztXtV8CtXmlc3zRkA==","mode":420,"size":4190},"dist/reporter.js":{"checkedAt":1794532091395,"integrity":"sha512-ObNenwtEdJfyWY8TD8t9XZuoasmkZZkfkJPYaNKMI9Ht/Fm+HA8ernGiMBaaoCiOpxYaDmUp56SDJpJoQq0flQ==","mode":420,"size":23384},"package.json":{"checkedAt":1794532091395,"integrity":"sha512-wUltpjymG4+OoLeUherOJ/tVSutLZAFjJZCHAAvgGoWhgoO6G9ytkm0x7zAMqNHCDpwu4GVfTCGDssuK5mdYkw==","mode":420,"size":2553},"README.md":{"checkedAt":1794532091396,"integrity":"sha512-EJxMLPYKtbIT/TD/VP5m1jNhRrlfOROBRm1ArCeFLbcc8B0ZH6vsyqqjO3ghUsciT6zpgbqBEr8aBZ6fQwbcSA==","mode":420,"size":862},"dist/client/bg.png":{"checkedAt":1794532091396,"integrity":"sha512-HQP0pEo8IiHLlIvoJ7KyKQ8K12gthWLhmwpsG8v+2Ie66Hr05f7IztFKkDMEJFWXrOQzmCvT/E1SQd3gkrCp4Q==","mode":420,"size":190939},"dist/client/favicon.svg":{"checkedAt":1794532091397,"integrity":"sha512-P64yrdjg4vrBXJ8y3lfQKKPCJLW73iKURZI1AQnhLiBit9vP/fUpOsZ8RtZXi3zjCOvUBaAbWc+RyEBZdjviqQ==","mode":420,"size":2381},"dist/index.d.ts":{"checkedAt":1794532091397,"integrity":"sha512-gPuIVHxHqNKc53Q7HVXqgDgt3XyfOFOWrc8qWJIOB1FuH7N8iFnad41a1gc4xrIMaxTMkDOowE7zfrkSu4zu5g==","mode":420,"size":152},"reporter.d.ts":{"checkedAt":1794532091397,"integrity":"sha512-cC2cdgZhHTS1BhHFW/IC2t8OQlwci0DPZWJukSclw6UxwxZZXXlveYGgO/P131UIOGEhvFboXw45vgJpN+6wtg==","mode":420,"size":102},"shim.d.ts":{"checkedAt":1794532091397,"integrity":"sha512-9BzMCP9kunuxtlrws32boUkEI061wAWbCqBN+egkgp0kUuNvGzZyIkuBPFgFrbRJr/+kroiyeJxWKFZPUrimTQ==","mode":420,"size":40},"LICENSE":{"checkedAt":1794532091397,"integrity":"sha512-AxPiQHDnFTOwiy0HEsivy5bYN2wjcRKtw2lWjpeXevVq5EsAeGD6UzkfgwyM9B8ElYup7flAhvpi12SE1jQcGA==","mode":420,"size":1102}}}
@@ -0,0 +1,203 @@
/**
* GitHub 镜像配置模块
* 提供统一的镜像源管理,支持复杂网络环境
*
* 镜像源测试时间: 2026-01-03
* 测试通过: 55/61 完全可用
*/
/**
* GitHub 文件加速镜像
* 用于加速 release assets 下载
* 按延迟排序,优先使用快速镜像
*
* 测试时间: 2026-01-03
* 镜像支持 301/302 重定向
* 懒加载测速:首次使用时自动测速,缓存 30 分钟
*/
export declare const GITHUB_FILE_MIRRORS: string[];
/**
* GitHub API 镜像
* 用于访问 GitHub API(作为备选方案)
* 注:优先使用非 API 方法,减少对 API 的依赖
*
* 经测试,大部分代理镜像不支持 API 转发
* 建议使用 getLatestReleaseTag 等方法避免 API 调用
*/
export declare const GITHUB_API_MIRRORS: string[];
/**
* GitHub Raw 镜像
* 用于访问 raw.githubusercontent.com
* 注:大多数通用代理也支持 raw 文件加速
*/
export declare const GITHUB_RAW_MIRRORS: string[];
/**
* Nightly.link 镜像
* 用于访问 GitHub Actions artifacts
* 优先使用官方服务,出现问题时可切换镜像
*/
export declare const NIGHTLY_LINK_MIRRORS: string[];
export interface MirrorConfig {
/** 文件下载镜像(用于 release assets) */
fileMirrors: string[];
/** API 镜像 */
apiMirrors: string[];
/** Raw 文件镜像 */
rawMirrors: string[];
/** Nightly.link 镜像(用于 Actions artifacts) */
nightlyLinkMirrors: string[];
/** 超时时间(毫秒) */
timeout: number;
/** 是否启用镜像 */
enabled: boolean;
/** 自定义镜像(优先使用) */
customMirror?: string;
}
/**
* 懒加载获取快速镜像列表
* 第一次调用时会进行测速,后续使用缓存
*/
export declare function getFastMirrors(forceRefresh?: boolean): Promise<string[]>;
/**
* 清除镜像缓存,强制下次重新测速
*/
export declare function clearMirrorCache(): void;
/**
* 获取缓存状态
*/
export declare function getMirrorCacheStatus(): {
cached: boolean;
count: number;
age: number;
};
/**
* 获取当前镜像配置
*/
export declare function getMirrorConfig(): MirrorConfig;
/**
* 更新镜像配置
*/
export declare function setMirrorConfig(config: Partial<MirrorConfig>): void;
/**
* 重置为默认配置
*/
export declare function resetMirrorConfig(): void;
/**
* 设置自定义镜像(优先级最高)
*/
export declare function setCustomMirror(mirror: string): void;
/**
* 构建镜像 URL
* @param originalUrl 原始 URL
* @param mirror 镜像前缀
*/
export declare function buildMirrorUrl(originalUrl: string, mirror: string): string;
/**
* 测试 URL 是否可用(HTTP GET)
* @param url 要测试的 URL
* @param timeout 超时时间
*/
export declare function testUrl(url: string, timeout?: number): Promise<boolean>;
/**
* 测试 URL 是否可用(HTTP HEAD,更快)
* 验证:状态码、Content-Type、Content-Length
*/
export declare function testUrlHead(url: string, timeout?: number): Promise<boolean>;
/**
* 详细验证 URL 响应
* 返回验证结果和详细信息
*/
export interface UrlValidationResult {
valid: boolean;
statusCode?: number;
contentType?: string;
contentLength?: number;
error?: string;
}
export declare function validateUrl(url: string, timeout?: number): Promise<UrlValidationResult>;
/**
* 查找可用的下载 URL
* 使用懒加载的快速镜像列表
* @param originalUrl 原始 GitHub URL
* @param options 选项
*/
export declare function findAvailableDownloadUrl(originalUrl: string, options?: {
mirrors?: string[];
timeout?: number;
customMirror?: string;
testMethod?: 'head' | 'get';
/** 是否使用详细验证(验证 Content-Type 和 Content-Length) */
validateContent?: boolean;
/** 期望的最小文件大小(字节),用于验证 */
minFileSize?: number;
/** 是否使用懒加载的快速镜像列表 */
useFastMirrors?: boolean;
}): Promise<string>;
/**
* 从 tags 列表中获取最新的 release tag
* 不依赖 GitHub API
*/
export declare function getLatestReleaseTag(owner: string, repo: string, mirror?: string): Promise<string>;
/**
* 直接构建 GitHub release 下载 URL
* 不需要调用 API,直接基于 tag 和 asset 名称构建
*/
export declare function buildReleaseDownloadUrl(owner: string, repo: string, tag: string, assetName: string): string;
/**
* 获取 GitHub release 信息(优先使用非 API 方法)
*
* 策略:
* 1. 先通过 git refs 获取 tags
* 2. 直接构建下载 URL,不依赖 API
* 3. 仅当需要 changelog 时才使用 API
*/
export declare function getGitHubRelease(owner: string, repo: string, tag?: string, options?: {
/** 需要获取的 asset 名称列表 */
assetNames?: string[];
/** 是否需要获取 changelog(需要调用 API) */
fetchChangelog?: boolean;
/** 指定镜像 */
mirror?: string;
}): Promise<{
tag_name: string;
assets: Array<{
name: string;
browser_download_url: string;
}>;
body?: string;
}>;
/**
* 获取所有 GitHub tags(带缓存)
* 优化:并行请求多个镜像,使用第一个成功返回的结果
*/
export declare function getAllGitHubTags(owner: string, repo: string, mirror?: string): Promise<{
tags: string[];
mirror: string;
}>;
export interface ActionArtifact {
id: number;
name: string;
size_in_bytes: number;
created_at: string;
expires_at: string;
archive_download_url: string;
workflow_run_id?: number;
head_sha?: string;
workflow_title?: string;
}
/**
* 清除 artifacts 缓存
*/
export declare function clearArtifactsCache(): void;
/**
* 获取 GitHub Action 最新运行的 artifacts
* 用于下载 nightly/dev 版本
*
* 策略:
* 1. 检查缓存(10分钟有效)
* 2. 优先尝试从 nightly.link 获取(无需认证,更稳定)
* 3. 这里的实现已经完全移除了对 GitHub API 的依赖,直接解析 HTML
*/
export declare function getLatestActionArtifacts(owner: string, repo: string, workflow?: string, branch?: string, maxRuns?: number, mirror?: string): Promise<{
artifacts: ActionArtifact[];
mirror: string;
}>;
@@ -0,0 +1,181 @@
/**
* **The `node:wasi` module does not currently provide the**
* **comprehensive file system security properties provided by some WASI runtimes.**
* **Full support for secure file system sandboxing may or may not be implemented in**
* **future. In the mean time, do not rely on it to run untrusted code.**
*
* The WASI API provides an implementation of the [WebAssembly System Interface](https://wasi.dev/) specification. WASI gives WebAssembly applications access to the underlying
* operating system via a collection of POSIX-like functions.
*
* ```js
* import { readFile } from 'node:fs/promises';
* import { WASI } from 'node:wasi';
* import { argv, env } from 'node:process';
*
* const wasi = new WASI({
* version: 'preview1',
* args: argv,
* env,
* preopens: {
* '/local': '/some/real/path/that/wasm/can/access',
* },
* });
*
* const wasm = await WebAssembly.compile(
* await readFile(new URL('./demo.wasm', import.meta.url)),
* );
* const instance = await WebAssembly.instantiate(wasm, wasi.getImportObject());
*
* wasi.start(instance);
* ```
*
* To run the above example, create a new WebAssembly text format file named `demo.wat`:
*
* ```text
* (module
* ;; Import the required fd_write WASI function which will write the given io vectors to stdout
* ;; The function signature for fd_write is:
* ;; (File Descriptor, *iovs, iovs_len, nwritten) -> Returns number of bytes written
* (import "wasi_snapshot_preview1" "fd_write" (func $fd_write (param i32 i32 i32 i32) (result i32)))
*
* (memory 1)
* (export "memory" (memory 0))
*
* ;; Write 'hello world\n' to memory at an offset of 8 bytes
* ;; Note the trailing newline which is required for the text to appear
* (data (i32.const 8) "hello world\n")
*
* (func $main (export "_start")
* ;; Creating a new io vector within linear memory
* (i32.store (i32.const 0) (i32.const 8)) ;; iov.iov_base - This is a pointer to the start of the 'hello world\n' string
* (i32.store (i32.const 4) (i32.const 12)) ;; iov.iov_len - The length of the 'hello world\n' string
*
* (call $fd_write
* (i32.const 1) ;; file_descriptor - 1 for stdout
* (i32.const 0) ;; *iovs - The pointer to the iov array, which is stored at memory location 0
* (i32.const 1) ;; iovs_len - We're printing 1 string stored in an iov - so one.
* (i32.const 20) ;; nwritten - A place in memory to store the number of bytes written
* )
* drop ;; Discard the number of bytes written from the top of the stack
* )
* )
* ```
*
* Use [wabt](https://github.com/WebAssembly/wabt) to compile `.wat` to `.wasm`
*
* ```bash
* wat2wasm demo.wat
* ```
* @experimental
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/wasi.js)
*/
declare module "wasi" {
interface WASIOptions {
/**
* An array of strings that the WebAssembly application will
* see as command line arguments. The first argument is the virtual path to the
* WASI command itself.
* @default []
*/
args?: readonly string[] | undefined;
/**
* An object similar to `process.env` that the WebAssembly
* application will see as its environment.
* @default {}
*/
env?: object | undefined;
/**
* This object represents the WebAssembly application's
* sandbox directory structure. The string keys of `preopens` are treated as
* directories within the sandbox. The corresponding values in `preopens` are
* the real paths to those directories on the host machine.
*/
preopens?: NodeJS.Dict<string> | undefined;
/**
* By default, when WASI applications call `__wasi_proc_exit()`
* `wasi.start()` will return with the exit code specified rather than terminatng the process.
* Setting this option to `false` will cause the Node.js process to exit with
* the specified exit code instead.
* @default true
*/
returnOnExit?: boolean | undefined;
/**
* The file descriptor used as standard input in the WebAssembly application.
* @default 0
*/
stdin?: number | undefined;
/**
* The file descriptor used as standard output in the WebAssembly application.
* @default 1
*/
stdout?: number | undefined;
/**
* The file descriptor used as standard error in the WebAssembly application.
* @default 2
*/
stderr?: number | undefined;
/**
* The version of WASI requested.
* Currently the only supported versions are `'unstable'` and `'preview1'`. This option is mandatory.
* @since v19.8.0
*/
version: "unstable" | "preview1";
}
/**
* The `WASI` class provides the WASI system call API and additional convenience
* methods for working with WASI-based applications. Each `WASI` instance
* represents a distinct environment.
* @since v13.3.0, v12.16.0
*/
class WASI {
constructor(options?: WASIOptions);
/**
* Return an import object that can be passed to `WebAssembly.instantiate()` if no other WASM imports are needed beyond those provided by WASI.
*
* If version `unstable` was passed into the constructor it will return:
*
* ```js
* { wasi_unstable: wasi.wasiImport }
* ```
*
* If version `preview1` was passed into the constructor or no version was specified it will return:
*
* ```js
* { wasi_snapshot_preview1: wasi.wasiImport }
* ```
* @since v19.8.0
*/
getImportObject(): object;
/**
* Attempt to begin execution of `instance` as a WASI command by invoking its `_start()` export. If `instance` does not contain a `_start()` export, or if `instance` contains an `_initialize()`
* export, then an exception is thrown.
*
* `start()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named `memory`. If
* `instance` does not have a `memory` export an exception is thrown.
*
* If `start()` is called more than once, an exception is thrown.
* @since v13.3.0, v12.16.0
*/
start(instance: object): number; // TODO: avoid DOM dependency until WASM moved to own lib.
/**
* Attempt to initialize `instance` as a WASI reactor by invoking its `_initialize()` export, if it is present. If `instance` contains a `_start()` export, then an exception is thrown.
*
* `initialize()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named `memory`.
* If `instance` does not have a `memory` export an exception is thrown.
*
* If `initialize()` is called more than once, an exception is thrown.
* @since v14.6.0, v12.19.0
*/
initialize(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
/**
* `wasiImport` is an object that implements the WASI system call API. This object
* should be passed as the `wasi_snapshot_preview1` import during the instantiation
* of a [`WebAssembly.Instance`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance).
* @since v13.3.0, v12.16.0
*/
readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
}
}
declare module "node:wasi" {
export * from "wasi";
}
@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils = require("../../utils");
class EntryTransformer {
constructor(_settings) {
this._settings = _settings;
}
getTransformer() {
return (entry) => this._transform(entry);
}
_transform(entry) {
let filepath = entry.path;
if (this._settings.absolute) {
filepath = utils.path.makeAbsolute(this._settings.cwd, filepath);
filepath = utils.path.unixify(filepath);
}
if (this._settings.markDirectories && entry.dirent.isDirectory()) {
filepath += '/';
}
if (!this._settings.objectMode) {
return filepath;
}
return Object.assign(Object.assign({}, entry), { path: filepath });
}
}
exports.default = EntryTransformer;
@@ -0,0 +1,42 @@
{
"name": "@react-stately/grid",
"version": "3.11.6",
"description": "Spectrum UI components in React",
"license": "Apache-2.0",
"main": "dist/main.js",
"module": "dist/module.js",
"exports": {
"source": "./src/index.ts",
"types": [
"./dist/types.d.ts",
"./src/index.ts"
],
"import": "./dist/import.mjs",
"require": "./dist/main.js"
},
"types": "dist/types.d.ts",
"source": "src/index.ts",
"files": [
"dist",
"src"
],
"sideEffects": false,
"repository": {
"type": "git",
"url": "https://github.com/adobe/react-spectrum"
},
"dependencies": {
"@react-stately/collections": "^3.12.8",
"@react-stately/selection": "^3.20.6",
"@react-types/grid": "^3.3.6",
"@react-types/shared": "^3.32.1",
"@swc/helpers": "^0.5.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
},
"publishConfig": {
"access": "public"
},
"gitHead": "0bda51183baa23306342af32a82012ea0fe0f2dc"
}
@@ -0,0 +1 @@
{"version":3,"names":["_classApplyDescriptorSet","require","_assertClassBrand","_classCheckPrivateStaticFieldDescriptor","_classStaticPrivateFieldSpecSet","receiver","classConstructor","descriptor","value","assertClassBrand","classCheckPrivateStaticFieldDescriptor","classApplyDescriptorSet"],"sources":["../../src/helpers/classStaticPrivateFieldSpecSet.js"],"sourcesContent":["/* @minVersion 7.0.2 */\n/* @onlyBabel7 */\n\nimport classApplyDescriptorSet from \"classApplyDescriptorSet\";\nimport assertClassBrand from \"assertClassBrand\";\nimport classCheckPrivateStaticFieldDescriptor from \"classCheckPrivateStaticFieldDescriptor\";\nexport default function _classStaticPrivateFieldSpecSet(\n receiver,\n classConstructor,\n descriptor,\n value,\n) {\n assertClassBrand(classConstructor, receiver);\n classCheckPrivateStaticFieldDescriptor(descriptor, \"set\");\n classApplyDescriptorSet(receiver, descriptor, value);\n return value;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,wBAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,uCAAA,GAAAF,OAAA;AACe,SAASG,+BAA+BA,CACrDC,QAAQ,EACRC,gBAAgB,EAChBC,UAAU,EACVC,KAAK,EACL;EACAC,iBAAgB,CAACH,gBAAgB,EAAED,QAAQ,CAAC;EAC5CK,uCAAsC,CAACH,UAAU,EAAE,KAAK,CAAC;EACzDI,wBAAuB,CAACN,QAAQ,EAAEE,UAAU,EAAEC,KAAK,CAAC;EACpD,OAAOA,KAAK;AACd","ignoreList":[]}
@@ -0,0 +1,85 @@
'use strict';
var utils = require('../utils.js');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
var switchColonSpacing = utils.createRule({
name: "switch-colon-spacing",
package: "js",
meta: {
type: "layout",
docs: {
description: "Enforce spacing around colons of switch statements"
},
schema: [
{
type: "object",
properties: {
before: { type: "boolean", default: false },
after: { type: "boolean", default: true }
},
additionalProperties: false
}
],
fixable: "whitespace",
messages: {
expectedBefore: "Expected space(s) before this colon.",
expectedAfter: "Expected space(s) after this colon.",
unexpectedBefore: "Unexpected space(s) before this colon.",
unexpectedAfter: "Unexpected space(s) after this colon."
}
},
create(context) {
const sourceCode = context.sourceCode;
const options = context.options[0] || {};
const beforeSpacing = options.before === true;
const afterSpacing = options.after !== false;
function isValidSpacing(left, right, expected) {
return utils.isClosingBraceToken(right) || !utils.isTokenOnSameLine(left, right) || sourceCode.isSpaceBetweenTokens(left, right) === expected;
}
function commentsExistBetween(left, right) {
return sourceCode.getFirstTokenBetween(
left,
right,
{
includeComments: true,
filter: utils.isCommentToken
}
) !== null;
}
function fix(fixer, left, right, spacing) {
if (commentsExistBetween(left, right))
return null;
if (spacing)
return fixer.insertTextAfter(left, " ");
return fixer.removeRange([left.range[1], right.range[0]]);
}
return {
SwitchCase(node) {
const colonToken = utils.getSwitchCaseColonToken(node, sourceCode);
const beforeToken = sourceCode.getTokenBefore(colonToken);
const afterToken = sourceCode.getTokenAfter(colonToken);
if (!isValidSpacing(beforeToken, colonToken, beforeSpacing)) {
context.report({
node,
loc: colonToken.loc,
messageId: beforeSpacing ? "expectedBefore" : "unexpectedBefore",
fix: (fixer) => fix(fixer, beforeToken, colonToken, beforeSpacing)
});
}
if (!isValidSpacing(colonToken, afterToken, afterSpacing)) {
context.report({
node,
loc: colonToken.loc,
messageId: afterSpacing ? "expectedAfter" : "unexpectedAfter",
fix: (fixer) => fix(fixer, colonToken, afterToken, afterSpacing)
});
}
}
};
}
});
module.exports = switchColonSpacing;
@@ -0,0 +1,38 @@
import { ensureType } from "./ensureType.mjs";
import { getType } from "./getType.mjs";
import { isAbsoluteURL } from "./isAbsoluteURL.mjs";
import { isArrayLike } from "./isArrayLike.mjs";
import { isAsyncFunction } from "./isAsyncFunction.mjs";
import { isESModule } from "./isESModule.mjs";
import { isError } from "./isError.mjs";
import { isFunction } from "./isFunction.mjs";
import { isIterable } from "./isIterable.mjs";
import { isLeapYear } from "./isLeapYear.mjs";
import { isLength } from "./isLength.mjs";
import { isNil } from "./isNil.mjs";
import { isNumber } from "./isNumber.mjs";
import { isObject } from "./isObject.mjs";
import { isPlainObject } from "./isPlainObject.mjs";
import { isPromiseLike } from "./isPromiseLike.mjs";
import { isValidDate } from "./isValidDate.mjs";
import { isWhat } from "./isWhat.mjs";
export {
ensureType,
getType,
isAbsoluteURL,
isArrayLike,
isAsyncFunction,
isESModule,
isError,
isFunction,
isIterable,
isLeapYear,
isLength,
isNil,
isNumber,
isObject,
isPlainObject,
isPromiseLike,
isValidDate,
isWhat
};
@@ -0,0 +1,95 @@
Description
===========
streamsearch is a module for [node.js](http://nodejs.org/) that allows searching a stream using the Boyer-Moore-Horspool algorithm.
This module is based heavily on the Streaming Boyer-Moore-Horspool C++ implementation by Hongli Lai [here](https://github.com/FooBarWidget/boyer-moore-horspool).
Requirements
============
* [node.js](http://nodejs.org/) -- v10.0.0 or newer
Installation
============
npm install streamsearch
Example
=======
```js
const { inspect } = require('util');
const StreamSearch = require('streamsearch');
const needle = Buffer.from('\r\n');
const ss = new StreamSearch(needle, (isMatch, data, start, end) => {
if (data)
console.log('data: ' + inspect(data.toString('latin1', start, end)));
if (isMatch)
console.log('match!');
});
const chunks = [
'foo',
' bar',
'\r',
'\n',
'baz, hello\r',
'\n world.',
'\r\n Node.JS rules!!\r\n\r\n',
];
for (const chunk of chunks)
ss.push(Buffer.from(chunk));
// output:
//
// data: 'foo'
// data: ' bar'
// match!
// data: 'baz, hello'
// match!
// data: ' world.'
// match!
// data: ' Node.JS rules!!'
// match!
// data: ''
// match!
```
API
===
Properties
----------
* **maxMatches** - < _integer_ > - The maximum number of matches. Defaults to `Infinity`.
* **matches** - < _integer_ > - The current match count.
Functions
---------
* **(constructor)**(< _mixed_ >needle, < _function_ >callback) - Creates and returns a new instance for searching for a _Buffer_ or _string_ `needle`. `callback` is called any time there is non-matching data and/or there is a needle match. `callback` will be called with the following arguments:
1. `isMatch` - _boolean_ - Indicates whether a match has been found
2. `data` - _mixed_ - If set, this contains data that did not match the needle.
3. `start` - _integer_ - The index in `data` where the non-matching data begins (inclusive).
4. `end` - _integer_ - The index in `data` where the non-matching data ends (exclusive).
5. `isSafeData` - _boolean_ - Indicates if it is safe to store a reference to `data` (e.g. as-is or via `data.slice()`) or not, as in some cases `data` may point to a Buffer whose contents change over time.
* **destroy**() - _(void)_ - Emits any last remaining unmatched data that may still be buffered and then resets internal state.
* **push**(< _Buffer_ >chunk) - _integer_ - Processes `chunk`, searching for a match. The return value is the last processed index in `chunk` + 1.
* **reset**() - _(void)_ - Resets internal state. Useful for when you wish to start searching a new/different stream for example.
@@ -0,0 +1,25 @@
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
// https://262.ecma-international.org/6.0/#sec-createdataproperty
module.exports = function CreateDataProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': true,
'[[Value]]': V,
'[[Writable]]': true
};
return OrdinaryDefineOwnProperty(O, P, newDesc);
};
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAUD,IAAI,uCAAiB,OAAO,aAAa,eAAe,OAAO,cAAc;AAEtE,SAAS;IACd,IAAI,QAAQ,CAAA,GAAA,4BAAO;IACnB,IAAI,CAAC,MAAM,QAAQ,GAAG,CAAA,GAAA,qBAAO,EAAE,IAAM,QAAQ;YAAC,OAAO;YAAG,QAAQ;QAAC,IAAI;IAErE,CAAA,GAAA,sBAAQ,EAAE;QACR,wFAAwF;QACxF,IAAI,WAAW;YACb,QAAQ,CAAA;gBACN,IAAI,UAAU;gBACd,IAAI,QAAQ,KAAK,KAAK,KAAK,KAAK,IAAI,QAAQ,MAAM,KAAK,KAAK,MAAM,EAChE,OAAO;gBAET,OAAO;YACT;QACF;QAEA,IAAI,CAAC,sCACH,OAAO,gBAAgB,CAAC,UAAU;aAElC,qCAAe,gBAAgB,CAAC,UAAU;QAG5C,OAAO;YACL,IAAI,CAAC,sCACH,OAAO,mBAAmB,CAAC,UAAU;iBAErC,qCAAe,mBAAmB,CAAC,UAAU;QAEjD;IACF,GAAG,EAAE;IAEL,OAAO;AACT;AAEA,SAAS;IACP,OAAO;QACL,OAAO,AAAC,yCAAkB,iDAAA,2DAAA,qCAAgB,KAAK,KAAK,OAAO,UAAU;QACrE,QAAQ,AAAC,yCAAkB,iDAAA,2DAAA,qCAAgB,MAAM,KAAK,OAAO,WAAW;IAC1E;AACF","sources":["packages/@react-aria/utils/src/useViewportSize.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useEffect, useState} from 'react';\nimport {useIsSSR} from '@react-aria/ssr';\n\ninterface ViewportSize {\n width: number,\n height: number\n}\n\nlet visualViewport = typeof document !== 'undefined' && window.visualViewport;\n\nexport function useViewportSize(): ViewportSize {\n let isSSR = useIsSSR();\n let [size, setSize] = useState(() => isSSR ? {width: 0, height: 0} : getViewportSize());\n\n useEffect(() => {\n // Use visualViewport api to track available height even on iOS virtual keyboard opening\n let onResize = () => {\n setSize(size => {\n let newSize = getViewportSize();\n if (newSize.width === size.width && newSize.height === size.height) {\n return size;\n }\n return newSize;\n });\n };\n\n if (!visualViewport) {\n window.addEventListener('resize', onResize);\n } else {\n visualViewport.addEventListener('resize', onResize);\n }\n\n return () => {\n if (!visualViewport) {\n window.removeEventListener('resize', onResize);\n } else {\n visualViewport.removeEventListener('resize', onResize);\n }\n };\n }, []);\n\n return size;\n}\n\nfunction getViewportSize(): ViewportSize {\n return {\n width: (visualViewport && visualViewport?.width) || window.innerWidth,\n height: (visualViewport && visualViewport?.height) || window.innerHeight\n };\n}\n"],"names":[],"version":3,"file":"useViewportSize.main.js.map"}
@@ -0,0 +1,16 @@
type Values = 'always' | 'in-intersections' | 'in-unions' | 'in-unions-and-intersections' | 'never';
export type Options = [
{
allowAliases?: Values;
allowCallbacks?: 'always' | 'never';
allowConditionalTypes?: 'always' | 'never';
allowConstructors?: 'always' | 'never';
allowGenerics?: 'always' | 'never';
allowLiterals?: Values;
allowMappedTypes?: Values;
allowTupleTypes?: Values;
}
];
export type MessageIds = 'noCompositionAlias' | 'noTypeAlias';
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1,17 @@
var $9dd86690a5c2b2c5$exports = {};
$9dd86690a5c2b2c5$exports = {
"deselectedItem": (args)=>`Vienums ${args.item} nav atlas\u{12B}ts.`,
"longPressToSelect": `Ilgi turiet nospiestu. lai iesl\u{113}gtu atlases re\u{17E}\u{12B}mu.`,
"select": `Atlas\u{12B}t`,
"selectedAll": `Atlas\u{12B}ti visi vienumi.`,
"selectedCount": (args, formatter)=>`${formatter.plural(args.count, {
"=0": `Nav atlas\u{12B}ts neviens vienums`,
one: ()=>`Atlas\u{12B}to vienumu skaits: ${formatter.number(args.count)}`,
other: ()=>`Atlas\u{12B}to vienumu skaits: ${formatter.number(args.count)}`
})}.`,
"selectedItem": (args)=>`Atlas\u{12B}ts vienums ${args.item}.`
};
export {$9dd86690a5c2b2c5$exports as default};
//# sourceMappingURL=lv-LV.module.js.map
@@ -0,0 +1 @@
{"version":3,"file":"decode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,eAGN,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAoBxE,oBAAY,YAAY;IACpB,YAAY,QAAwB;IACpC,aAAa,QAAwB;IACrC,UAAU,MAAwB;CACrC;AAuCD,oBAAY,YAAY;IACpB,8DAA8D;IAC9D,MAAM,IAAI;IACV,uDAAuD;IACvD,MAAM,IAAI;IACV,oEAAoE;IACpE,SAAS,IAAI;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,uCAAuC,IAAI,IAAI,CAAC;IAChD,0CAA0C,CACtC,kBAAkB,EAAE,MAAM,GAC3B,IAAI,CAAC;IACR,iCAAiC,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACzD;AAED;;GAEG;AACH,qBAAa,aAAa;IAElB,wCAAwC;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B;;;;;;;;OAQG;IACH,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,gDAAgD;IAChD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;;IAbxB,wCAAwC;IACvB,UAAU,EAAE,WAAW;IACxC;;;;;;;;OAQG;IACc,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI;IACtE,gDAAgD;IAC/B,MAAM,CAAC,iCAAqB;IAGjD,wCAAwC;IACxC,OAAO,CAAC,KAAK,CAAkC;IAC/C,6DAA6D;IAC7D,OAAO,CAAC,QAAQ,CAAK;IACrB;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAK;IAEnB,4CAA4C;IAC5C,OAAO,CAAC,SAAS,CAAK;IACtB,6DAA6D;IAC7D,OAAO,CAAC,MAAM,CAAK;IACnB,kDAAkD;IAClD,OAAO,CAAC,UAAU,CAAuB;IAEzC,+CAA+C;IAC/C,WAAW,CAAC,UAAU,EAAE,YAAY,GAAG,IAAI;IAS3C;;;;;;;;;;OAUG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IA8B1C;;;;;;;;OAQG;IACH,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,kBAAkB;IAe1B;;;;;;;;OAQG;IACH,OAAO,CAAC,eAAe;IAkBvB;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;IAkB3B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,iBAAiB;IA6BzB;;;;;;;;OAQG;IACH,OAAO,CAAC,gBAAgB;IAsDxB;;;;OAIG;IACH,OAAO,CAAC,4BAA4B;IAYpC;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;IAqB3B;;;;;;OAMG;IACH,GAAG,IAAI,MAAM;CA6BhB;AAoDD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC3B,UAAU,EAAE,WAAW,EACvB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GACb,MAAM,CAsCR;AAKD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,eAAsB,GAAG,MAAM,CAE1E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C"}
@@ -0,0 +1,122 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _assert = require("assert");
var _t = require("@babel/types");
const {
callExpression,
cloneNode,
expressionStatement,
identifier,
importDeclaration,
importDefaultSpecifier,
importNamespaceSpecifier,
importSpecifier,
memberExpression,
stringLiteral,
variableDeclaration,
variableDeclarator
} = _t;
class ImportBuilder {
constructor(importedSource, scope, hub) {
this._statements = [];
this._resultName = null;
this._importedSource = void 0;
this._scope = scope;
this._hub = hub;
this._importedSource = importedSource;
}
done() {
return {
statements: this._statements,
resultName: this._resultName
};
}
import() {
this._statements.push(importDeclaration([], stringLiteral(this._importedSource)));
return this;
}
require() {
this._statements.push(expressionStatement(callExpression(identifier("require"), [stringLiteral(this._importedSource)])));
return this;
}
namespace(name = "namespace") {
const local = this._scope.generateUidIdentifier(name);
const statement = this._statements[this._statements.length - 1];
_assert(statement.type === "ImportDeclaration");
_assert(statement.specifiers.length === 0);
statement.specifiers = [importNamespaceSpecifier(local)];
this._resultName = cloneNode(local);
return this;
}
default(name) {
const id = this._scope.generateUidIdentifier(name);
const statement = this._statements[this._statements.length - 1];
_assert(statement.type === "ImportDeclaration");
_assert(statement.specifiers.length === 0);
statement.specifiers = [importDefaultSpecifier(id)];
this._resultName = cloneNode(id);
return this;
}
named(name, importName) {
if (importName === "default") return this.default(name);
const id = this._scope.generateUidIdentifier(name);
const statement = this._statements[this._statements.length - 1];
_assert(statement.type === "ImportDeclaration");
_assert(statement.specifiers.length === 0);
statement.specifiers = [importSpecifier(id, identifier(importName))];
this._resultName = cloneNode(id);
return this;
}
var(name) {
const id = this._scope.generateUidIdentifier(name);
let statement = this._statements[this._statements.length - 1];
if (statement.type !== "ExpressionStatement") {
_assert(this._resultName);
statement = expressionStatement(this._resultName);
this._statements.push(statement);
}
this._statements[this._statements.length - 1] = variableDeclaration("var", [variableDeclarator(id, statement.expression)]);
this._resultName = cloneNode(id);
return this;
}
defaultInterop() {
return this._interop(this._hub.addHelper("interopRequireDefault"));
}
wildcardInterop() {
return this._interop(this._hub.addHelper("interopRequireWildcard"));
}
_interop(callee) {
const statement = this._statements[this._statements.length - 1];
if (statement.type === "ExpressionStatement") {
statement.expression = callExpression(callee, [statement.expression]);
} else if (statement.type === "VariableDeclaration") {
_assert(statement.declarations.length === 1);
statement.declarations[0].init = callExpression(callee, [statement.declarations[0].init]);
} else {
_assert.fail("Unexpected type.");
}
return this;
}
prop(name) {
const statement = this._statements[this._statements.length - 1];
if (statement.type === "ExpressionStatement") {
statement.expression = memberExpression(statement.expression, identifier(name));
} else if (statement.type === "VariableDeclaration") {
_assert(statement.declarations.length === 1);
statement.declarations[0].init = memberExpression(statement.declarations[0].init, identifier(name));
} else {
_assert.fail("Unexpected type:" + statement.type);
}
return this;
}
read(name) {
this._resultName = memberExpression(this._resultName, identifier(name));
}
}
exports.default = ImportBuilder;
//# sourceMappingURL=import-builder.js.map
@@ -0,0 +1,6 @@
import { BaseResolvedValueElementMetadata } from './BaseResolvedValueElementMetadata';
import { ResolvedValueElementMetadataKind } from './ResolvedValueElementMetadataKind';
export interface MultipleInjectionResolvedValueElementMetadata extends BaseResolvedValueElementMetadata<ResolvedValueElementMetadataKind.multipleInjection> {
chained: boolean;
}
//# sourceMappingURL=MultipleInjectionResolvedValueElementMetadata.d.ts.map
@@ -0,0 +1 @@
{"name":"optionator","version":"0.9.4","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532095148,"integrity":"sha512-FkymZYtx329CmIaO3HdzaHZ6WrL5BZj/NGLWVaM6TuNvsbYcBnTjOd6Yzvi6lJfLVAW0oJGhl8mK9EKILopYDg==","mode":420,"size":1054},"lib/help.js":{"checkedAt":1794532095149,"integrity":"sha512-mFytVcjWuDpvfKGCCv6C4O9Rk2cg3ZLVN2j3rMCPB+NaIjtWeBYAZ6FJar/whYnBObKG6z4g/QBtq3eLMgAdqw==","mode":420,"size":11144},"lib/index.js":{"checkedAt":1794532095149,"integrity":"sha512-WEetV9XF+nlwW1Pf65VVPaKYRl5l50z1kkxer6fdB9cnKnXGVTNjpPRS11mzIVYZ2gt6SV56usI+0cDVlmKaIw==","mode":420,"size":18530},"lib/util.js":{"checkedAt":1794532095149,"integrity":"sha512-OAKEnGU3ZohE5QL9AhG3lnc5R6rWdZvib1TmeVwp6p3ibqBKnWZO0z3TUHp0KNDmAsPOSRS+sAmEWvVB1Kj/fg==","mode":420,"size":1498},"package.json":{"checkedAt":1794532095149,"integrity":"sha512-sCgMYs8I9gCLPv893hi1CnRYZIPuzd1omzarQKUjY+uV3+1q2031yII2rZV7CkH5jPJd0r3QBqvWcLFoHECGbw==","mode":420,"size":889},"CHANGELOG.md":{"checkedAt":1794532095149,"integrity":"sha512-CDxFr8nXMvuH9zPcFMwKyOhgctJ4nbNuKYfGRn7Vuyj8CnFZeT2UGMdUdYQCCoK1bbH6a7UBAoEwV2zhOFsAsg==","mode":420,"size":1995},"README.md":{"checkedAt":1794532095149,"integrity":"sha512-/K6HkRnR6VmhrQd2BSVLv9IsJL6rf6FykWVTmdY8FhwTdnRuWg1K+UEV3SwOpGXb19jgVQ+eu5iAkXbyDWaKVw==","mode":420,"size":15047}}}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_await_value.cjs",
"module": "../../esm/_await_value.js"
}
@@ -0,0 +1,12 @@
import type { TSchema, SchemaOptions } from '../schema/index.mjs';
import type { TProperties } from '../object/index.mjs';
import { type TMappedResult } from '../mapped/index.mjs';
import { type TIndexPropertyKeys } from './indexed-property-keys.mjs';
import { type TIndex } from './index.mjs';
type TFromProperties<Type extends TSchema, Properties extends TProperties> = ({
[K2 in keyof Properties]: TIndex<Type, TIndexPropertyKeys<Properties[K2]>>;
});
type TFromMappedResult<Type extends TSchema, MappedResult extends TMappedResult> = (TFromProperties<Type, MappedResult['properties']>);
export type TIndexFromMappedResult<Type extends TSchema, MappedResult extends TMappedResult, Properties extends TProperties = TFromMappedResult<Type, MappedResult>> = (TMappedResult<Properties>);
export declare function IndexFromMappedResult<Type extends TSchema, MappedResult extends TMappedResult, Properties extends TProperties = TFromMappedResult<Type, MappedResult>>(type: Type, mappedResult: MappedResult, options?: SchemaOptions): TMappedResult<Properties>;
export {};
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC J ZB K D E 0C 1C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"1":"K D E F A B C L M G 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","16":"J ZB 2C ZC 3C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GD HD ID NC uC JD OC","16":"F FD"},G:{"1":"E ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD","16":"vC LD MD"},H:{"2":"hD"},I:{"1":"I lD vC mD nD","2":"TC J iD jD kD"},J:{"1":"A","2":"D"},K:{"1":"A B C H NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"B","2":"A"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:7,C:"Document.execCommand()",D:true};
@@ -0,0 +1,6 @@
{
"private": true,
"types": "../dist/mini.d.ts",
"main": "../dist/cjs/mini.js",
"module": "../dist/es/mini.mjs"
}
@@ -0,0 +1,3 @@
import type { ParserServicesWithTypeInformation, TSESTree } from '@typescript-eslint/utils';
import type { RuleContext } from '@typescript-eslint/utils/ts-eslint';
export declare function isPromiseAggregatorMethod(context: RuleContext<string, unknown[]>, services: ParserServicesWithTypeInformation, node: TSESTree.CallExpression): boolean;
@@ -0,0 +1,28 @@
import {
twMergeConfig
} from "./chunk-GIXI35A3.mjs";
// src/utils/tv.ts
import { tv as tvBase } from "tailwind-variants";
var tv = (options, config) => {
var _a, _b, _c;
return tvBase(options, {
...config,
twMerge: (_a = config == null ? void 0 : config.twMerge) != null ? _a : true,
twMergeConfig: {
...config == null ? void 0 : config.twMergeConfig,
theme: {
...(_b = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _b.theme,
...twMergeConfig.theme
},
classGroups: {
...(_c = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _c.classGroups,
...twMergeConfig.classGroups
}
}
});
};
export {
tv
};
@@ -0,0 +1,15 @@
var metaMap = require('./_metaMap'),
noop = require('./noop');
/**
* Gets metadata for `func`.
*
* @private
* @param {Function} func The function to query.
* @returns {*} Returns the metadata for `func`.
*/
var getData = !metaMap ? noop : function(func) {
return metaMap.get(func);
};
module.exports = getData;
@@ -0,0 +1 @@
{"name":"eslint-visitor-keys","version":"1.3.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532092613,"integrity":"sha512-LK/hBSxf9yMQL2r6cNQN5Ts9V9Xiex+3PSnzFyHRHv276wJR1mZGB/cHFulPafZdeg3B465HZdPiLCPHDjjmiw==","mode":420,"size":11337},"lib/index.js":{"checkedAt":1794532118339,"integrity":"sha512-q/BOr/qMLhufj9/O4eDEh7LATpbUDVaybYNZp6Jijen1HaIiPDyxOoHD3LuBwXWzXTvUosrtPGpZQOoeoG6ANw==","mode":420,"size":2195},"package.json":{"checkedAt":1794532118339,"integrity":"sha512-Gnrlm8LKfwLfOICPZbBAi7OO4+uIGCWFya4RuKCdkyu7ZuKH2TWW7LvTOGYAYIDfFTuXSKevYjnPlrHlpfUJmw==","mode":420,"size":1247},"lib/visitor-keys.json":{"checkedAt":1794532118339,"integrity":"sha512-/DeQMrpMUP/LLl4S+PeXlL2M1jYoCU8rugpmlaMbVXvvltC3m7dK1Z+ZFodmXPgNJG8WT/PKi5wVUS05OeuKTA==","mode":420,"size":4905},"CHANGELOG.md":{"checkedAt":1794532118340,"integrity":"sha512-paZe4MTy8WzpA32z1qysZnaHNkQS2qP64rN/RGTy2udb8n8HKKvds6uzMTOnoUAq68p0XVjq62p7rXCi01as3w==","mode":420,"size":1262},"README.md":{"checkedAt":1794532118340,"integrity":"sha512-ZSr/M4bszSe7YdImzQNGqhYU7S++EZtmG+3slo7HaHJCAl7Q/3vhpgSoiVWoydq4xGJkOhX8YjuIdWkZfqVkRw==","mode":420,"size":2770}}}
@@ -0,0 +1,14 @@
/*!
Copyright 2013 Lovell Fuller and others.
SPDX-License-Identifier: Apache-2.0
*/
try {
const { useGlobalLibvips } = require('../lib/libvips');
if (useGlobalLibvips() || process.env.npm_config_build_from_source) {
process.exit(1);
}
} catch (err) {
const summary = err.message.split(/\n/).slice(0, 1);
console.log(`sharp: skipping install check: ${summary}`);
}
@@ -0,0 +1,7 @@
export interface Options {
ignoreTypeImports?: boolean;
max?: number;
}
export type MessageId = 'max';
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"max", [(Options | undefined)?], import("../utils/create-rule.ts").ImportXPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1,35 @@
"use strict"
const {
definePrototypeMethodHandler,
} = require("../util/define-prototype-method-handler")
module.exports = {
meta: {
docs: {
description: "disallow the `String.prototype.substr` method.",
category: "legacy",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-string-prototype-substr.html",
},
fixable: null,
messages: {
forbidden: "Annex B feature '{{name}}' method is forbidden.",
},
schema: [
{
type: "object",
properties: {
aggressive: { type: "boolean" },
},
additionalProperties: false,
},
],
type: "problem",
},
create(context) {
return definePrototypeMethodHandler(context, {
String: ["substr"],
})
},
}
@@ -0,0 +1,92 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _types = require('../parser/tokenizer/types');
/**
* Determine information about this named import or named export specifier.
*
* This syntax is the `a` from statements like these:
* import {A} from "./foo";
* export {A};
* export {A} from "./foo";
*
* As it turns out, we can exactly characterize the syntax meaning by simply
* counting the number of tokens, which can be from 1 to 4:
* {A}
* {type A}
* {A as B}
* {type A as B}
*
* In the type case, we never actually need the names in practice, so don't get
* them.
*
* TODO: There's some redundancy with the type detection here and the isType
* flag that's already present on tokens in TS mode. This function could
* potentially be simplified and/or pushed to the call sites to avoid the object
* allocation.
*/
function getImportExportSpecifierInfo(
tokens,
index = tokens.currentIndex(),
) {
let endIndex = index + 1;
if (isSpecifierEnd(tokens, endIndex)) {
// import {A}
const name = tokens.identifierNameAtIndex(index);
return {
isType: false,
leftName: name,
rightName: name,
endIndex,
};
}
endIndex++;
if (isSpecifierEnd(tokens, endIndex)) {
// import {type A}
return {
isType: true,
leftName: null,
rightName: null,
endIndex,
};
}
endIndex++;
if (isSpecifierEnd(tokens, endIndex)) {
// import {A as B}
return {
isType: false,
leftName: tokens.identifierNameAtIndex(index),
rightName: tokens.identifierNameAtIndex(index + 2),
endIndex,
};
}
endIndex++;
if (isSpecifierEnd(tokens, endIndex)) {
// import {type A as B}
return {
isType: true,
leftName: null,
rightName: null,
endIndex,
};
}
throw new Error(`Unexpected import/export specifier at ${index}`);
} exports.default = getImportExportSpecifierInfo;
function isSpecifierEnd(tokens, index) {
const token = tokens.tokens[index];
return token.type === _types.TokenType.braceR || token.type === _types.TokenType.comma;
}
@@ -0,0 +1 @@
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-stately/overlays/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useOverlayTriggerState} from './useOverlayTriggerState';\n\nexport type {OverlayTriggerProps} from '@react-types/overlays';\nexport type {OverlayTriggerState} from './useOverlayTriggerState';\n"],"names":[],"version":3,"file":"main.js.map"}
@@ -0,0 +1,75 @@
{
"name": "tailwind-merge",
"version": "1.14.0",
"description": "Merge Tailwind CSS classes without style conflicts",
"keywords": [
"tailwindcss",
"tailwind",
"css",
"classes",
"className",
"classList",
"merge",
"conflict",
"override"
],
"homepage": "https://github.com/dcastil/tailwind-merge",
"bugs": {
"url": "https://github.com/dcastil/tailwind-merge/issues"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/dcastil"
},
"license": "MIT",
"author": "Dany Castillo",
"files": [
"dist",
"src"
],
"source": "src/index.ts",
"exports": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/tailwind-merge.mjs",
"default": "./dist/tailwind-merge.mjs"
},
"module": "dist/tailwind-merge.mjs",
"main": "dist/index.js",
"types": "./dist/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/dcastil/tailwind-merge.git"
},
"sideEffects": false,
"scripts": {
"build": "dts build",
"test": "dts test",
"test:watch": "dts test --watch",
"test:exports": "node scripts/test-built-package-exports.cjs && node scripts/test-built-package-exports.mjs",
"lint": "eslint --max-warnings 0 '**'",
"size": "size-limit",
"preversion": "if [ -n \"$DANYS_MACHINE\" ]; then git checkout main && git pull; fi",
"version": "zx scripts/update-readme.mjs",
"postversion": "if [ -n \"$DANYS_MACHINE\" ]; then git push --follow-tags && open https://github.com/dcastil/tailwind-merge/releases; fi"
},
"devDependencies": {
"@size-limit/preset-small-lib": "^8.2.6",
"@types/jest": "^29.5.2",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"dts-cli": "^2.0.3",
"eslint": "^8.44.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.2",
"globby": "^11.1.0",
"prettier": "^2.8.8",
"size-limit": "^8.2.6",
"ts-jest": "^29.1.1",
"typescript": "^5.1.6",
"zx": "^7.2.2"
},
"publishConfig": {
"provenance": true
}
}
@@ -0,0 +1,68 @@
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CreateDataProperty = require('./CreateDataProperty');
var EnumerableOwnProperties = require('./EnumerableOwnProperties');
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToLength = require('./ToLength');
var ToString = require('./ToString');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/8.0/#sec-internalizejsonproperty
// note: `reviver` was implicitly closed-over until ES2020, where it becomes a third argument
module.exports = function InternalizeJSONProperty(holder, name, reviver) {
if (!isObject(holder)) {
throw new $TypeError('Assertion failed: `holder` is not an Object');
}
if (typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` is not a String');
}
if (typeof reviver !== 'function') {
throw new $TypeError('Assertion failed: `reviver` is not a Function');
}
var val = Get(holder, name); // step 1
if (isObject(val)) { // step 2
var isArray = IsArray(val); // step 2.a
if (isArray) { // step 2.b
var I = 0; // step 2.b.i
var len = ToLength(Get(val, 'length')); // step 2.b.ii
while (I < len) { // step 2.b.iii
var newElement = InternalizeJSONProperty(val, ToString(I), reviver); // step 2.b.iv.1
if (typeof newElement === 'undefined') { // step 2.b.iii.2
delete val[ToString(I)]; // step 2.b.iii.2.a
} else { // step 2.b.iii.3
CreateDataProperty(val, ToString(I), newElement); // step 2.b.iii.3.a
}
I += 1; // step 2.b.iii.4
}
} else { // step 2.c
var keys = EnumerableOwnProperties(val, 'key'); // step 2.c.i
forEach(keys, function (P) { // step 2.c.ii
// eslint-disable-next-line no-shadow
var newElement = InternalizeJSONProperty(val, P, reviver); // step 2.c.ii.1
if (typeof newElement === 'undefined') { // step 2.c.ii.2
delete val[P]; // step 2.c.ii.2.a
} else { // step 2.c.ii.3
CreateDataProperty(val, P, newElement); // step 2.c.ii.3.a
}
});
}
}
return Call(reviver, holder, [name, val]); // step 3
};
@@ -0,0 +1,33 @@
/* c8 ignore start */
// duplicated from transform-file so we do not have to import anything here
type TransformFile = {
(filename: string, callback: (error: Error, file: null) => void): void;
(
filename: string,
opts: any,
callback: (error: Error, file: null) => void,
): void;
};
export const transformFile: TransformFile = function transformFile(
filename,
opts,
callback?: (error: Error, file: null) => void,
) {
if (typeof opts === "function") {
callback = opts;
}
callback(new Error("Transforming files is not supported in browsers"), null);
};
export function transformFileSync(): never {
throw new Error("Transforming files is not supported in browsers");
}
export function transformFileAsync() {
return Promise.reject(
new Error("Transforming files is not supported in browsers"),
);
}
@@ -0,0 +1,28 @@
import Agent from './agent'
import buildConnector from './connector';
import Dispatcher from './dispatcher'
import { IncomingHttpHeaders } from './header'
export default ProxyAgent
declare class ProxyAgent extends Dispatcher {
constructor(options: ProxyAgent.Options | string)
dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean;
close(): Promise<void>;
}
declare namespace ProxyAgent {
export interface Options extends Agent.Options {
uri: string;
/**
* @deprecated use opts.token
*/
auth?: string;
token?: string;
headers?: IncomingHttpHeaders;
requestTls?: buildConnector.BuildOptions;
proxyTls?: buildConnector.BuildOptions;
clientFactory?(origin: URL, opts: object): Dispatcher;
}
}
@@ -0,0 +1 @@
{"version":3,"names":["_newArrowCheck","innerThis","boundThis","TypeError"],"sources":["../../src/helpers/newArrowCheck.js"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nexport default function _newArrowCheck(innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError(\"Cannot instantiate an arrow function\");\n }\n}\n"],"mappings":";;;;;;AAEe,SAASA,cAAcA,CAACC,SAAS,EAAEC,SAAS,EAAE;EAC3D,IAAID,SAAS,KAAKC,SAAS,EAAE;IAC3B,MAAM,IAAIC,SAAS,CAAC,sCAAsC,CAAC;EAC7D;AACF","ignoreList":[]}
@@ -0,0 +1,14 @@
import setPrototypeOf from "./setPrototypeOf.js";
function _inherits(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
writable: !0,
configurable: !0
}
}), Object.defineProperty(t, "prototype", {
writable: !1
}), e && setPrototypeOf(t, e);
}
export { _inherits as default };
@@ -0,0 +1,69 @@
{
"name": "@jridgewell/resolve-uri",
"version": "3.1.2",
"description": "Resolve a URI relative to an optional base URI",
"keywords": [
"resolve",
"uri",
"url",
"path"
],
"author": "Justin Ridgewell <justin@ridgewell.name>",
"license": "MIT",
"repository": "https://github.com/jridgewell/resolve-uri",
"main": "dist/resolve-uri.umd.js",
"module": "dist/resolve-uri.mjs",
"types": "dist/types/resolve-uri.d.ts",
"exports": {
".": [
{
"types": "./dist/types/resolve-uri.d.ts",
"browser": "./dist/resolve-uri.umd.js",
"require": "./dist/resolve-uri.umd.js",
"import": "./dist/resolve-uri.mjs"
},
"./dist/resolve-uri.umd.js"
],
"./package.json": "./package.json"
},
"files": [
"dist"
],
"engines": {
"node": ">=6.0.0"
},
"scripts": {
"prebuild": "rm -rf dist",
"build": "run-s -n build:*",
"build:rollup": "rollup -c rollup.config.js",
"build:ts": "tsc --project tsconfig.build.json",
"lint": "run-s -n lint:*",
"lint:prettier": "npm run test:lint:prettier -- --write",
"lint:ts": "npm run test:lint:ts -- --fix",
"pretest": "run-s build:rollup",
"test": "run-s -n test:lint test:only",
"test:debug": "mocha --inspect-brk",
"test:lint": "run-s -n test:lint:*",
"test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
"test:lint:ts": "eslint '{src,test}/**/*.ts'",
"test:only": "mocha",
"test:coverage": "c8 mocha",
"test:watch": "mocha --watch",
"prepublishOnly": "npm run preversion",
"preversion": "run-s test build"
},
"devDependencies": {
"@jridgewell/resolve-uri-latest": "npm:@jridgewell/resolve-uri@*",
"@rollup/plugin-typescript": "8.3.0",
"@typescript-eslint/eslint-plugin": "5.10.0",
"@typescript-eslint/parser": "5.10.0",
"c8": "7.11.0",
"eslint": "8.7.0",
"eslint-config-prettier": "8.3.0",
"mocha": "9.2.0",
"npm-run-all": "4.1.5",
"prettier": "2.5.1",
"rollup": "2.66.0",
"typescript": "4.5.5"
}
}
@@ -0,0 +1,98 @@
{{# def.definitions }}
{{# def.errors }}
{{# def.setupKeyword }}
{{# def.setupNextLevel }}
{{## def.validateItems:startFrom:
for (var {{=$idx}} = {{=startFrom}}; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) {
{{
$it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
var $passData = $data + '[' + $idx + ']';
$it.dataPathArr[$dataNxt] = $idx;
}}
{{# def.generateSubschemaCode }}
{{# def.optimizeValidate }}
{{? $breakOnError }}
if (!{{=$nextValid}}) break;
{{?}}
}
#}}
{{
var $idx = 'i' + $lvl
, $dataNxt = $it.dataLevel = it.dataLevel + 1
, $nextData = 'data' + $dataNxt
, $currentBaseId = it.baseId;
}}
var {{=$errs}} = errors;
var {{=$valid}};
{{? Array.isArray($schema) }}
{{ /* 'items' is an array of schemas */}}
{{ var $additionalItems = it.schema.additionalItems; }}
{{? $additionalItems === false }}
{{=$valid}} = {{=$data}}.length <= {{= $schema.length }};
{{
var $currErrSchemaPath = $errSchemaPath;
$errSchemaPath = it.errSchemaPath + '/additionalItems';
}}
{{# def.checkError:'additionalItems' }}
{{ $errSchemaPath = $currErrSchemaPath; }}
{{# def.elseIfValid}}
{{?}}
{{~ $schema:$sch:$i }}
{{? {{# def.nonEmptySchema:$sch }} }}
{{=$nextValid}} = true;
if ({{=$data}}.length > {{=$i}}) {
{{
var $passData = $data + '[' + $i + ']';
$it.schema = $sch;
$it.schemaPath = $schemaPath + '[' + $i + ']';
$it.errSchemaPath = $errSchemaPath + '/' + $i;
$it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);
$it.dataPathArr[$dataNxt] = $i;
}}
{{# def.generateSubschemaCode }}
{{# def.optimizeValidate }}
}
{{# def.ifResultValid }}
{{?}}
{{~}}
{{? typeof $additionalItems == 'object' && {{# def.nonEmptySchema:$additionalItems }} }}
{{
$it.schema = $additionalItems;
$it.schemaPath = it.schemaPath + '.additionalItems';
$it.errSchemaPath = it.errSchemaPath + '/additionalItems';
}}
{{=$nextValid}} = true;
if ({{=$data}}.length > {{= $schema.length }}) {
{{# def.validateItems: $schema.length }}
}
{{# def.ifResultValid }}
{{?}}
{{?? {{# def.nonEmptySchema:$schema }} }}
{{ /* 'items' is a single schema */}}
{{
$it.schema = $schema;
$it.schemaPath = $schemaPath;
$it.errSchemaPath = $errSchemaPath;
}}
{{# def.validateItems: 0 }}
{{?}}
{{? $breakOnError }}
{{= $closingBraces }}
if ({{=$errs}} == errors) {
{{?}}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more