build: /implement-feature community-ui --requirements 'Build the React commu...
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
rdev-worker 2026-02-24 08:22:30 +00:00
parent b4eded185f
commit a1d0d1bf1c
12337 changed files with 1998457 additions and 0 deletions

View File

@ -0,0 +1,50 @@
import type { Oas3Rule, Oas2Rule } from '../../visitors';
import type { UserContext } from '../../walk';
import type { Oas3Paths } from '../../typings/openapi';
import type { Oas2Paths } from '../../typings/swagger';
export const NoAmbiguousPaths: Oas3Rule | Oas2Rule = () => {
return {
Paths(pathMap: Oas3Paths | Oas2Paths, { report, location }: UserContext) {
const seenPaths: string[] = [];
for (const currentPath of Object.keys(pathMap)) {
const ambiguousPath = seenPaths.find((seenPath) =>
arePathsAmbiguous(seenPath, currentPath)
);
if (ambiguousPath) {
report({
message: `Paths should resolve unambiguously. Found two ambiguous paths: \`${ambiguousPath}\` and \`${currentPath}\`.`,
location: location.child([currentPath]).key(),
});
}
seenPaths.push(currentPath);
}
},
};
};
function arePathsAmbiguous(a: string, b: string) {
const partsA = a.split('/');
const partsB = b.split('/');
if (partsA.length !== partsB.length) return false;
let aVars = 0;
let bVars = 0;
let ambiguous = true;
for (let i = 0; i < partsA.length; i++) {
const aIsVar = partsA[i].match(/^{.+?}$/);
const bIsVar = partsB[i].match(/^{.+?}$/);
if (aIsVar || bIsVar) {
if (aIsVar) aVars++;
if (bIsVar) bVars++;
continue;
} else if (partsA[i] !== partsB[i]) {
ambiguous = false;
}
}
return ambiguous && aVars === bVars;
}

View File

@ -0,0 +1 @@
module.exports={C:{"48":0.03914,"60":0.00652,"78":0.00652,"91":0.00652,"113":0.00652,"115":0.10437,"120":0.00652,"128":0.03262,"136":0.00652,"139":0.00652,"140":0.62621,"143":0.03914,"144":0.06523,"145":0.97845,"146":1.75469,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 49 50 51 52 53 54 55 56 57 58 59 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 114 116 117 118 119 121 122 123 124 125 126 127 129 130 131 132 133 134 135 137 138 141 142 147 148 149 3.5 3.6"},D:{"70":0.00652,"79":0.03262,"87":0.01957,"88":0.00652,"93":0.00652,"98":0.00652,"100":0.02609,"103":0.02609,"104":0.03914,"109":0.29354,"110":0.01305,"111":0.00652,"112":0.00652,"113":0.00652,"114":0.31963,"115":0.01305,"116":0.13046,"118":0.15003,"120":0.01305,"122":0.0848,"123":0.01957,"124":0.02609,"125":0.14351,"126":0.03914,"127":0.52184,"128":0.10437,"129":0.02609,"130":0.04566,"131":0.14351,"132":0.31963,"133":0.07828,"134":0.04566,"135":0.1696,"136":0.09132,"137":0.24787,"138":0.46313,"139":0.69144,"140":0.52184,"141":1.21328,"142":15.94874,"143":17.63167,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 71 72 73 74 75 76 77 78 80 81 83 84 85 86 89 90 91 92 94 95 96 97 99 101 102 105 106 107 108 117 119 121 144 145 146"},F:{"93":0.03262,"95":0.0848,"119":0.01305,"122":0.00652,"123":0.01957,"124":1.80687,"125":0.56098,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 120 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00652,"109":0.01305,"133":0.00652,"134":0.00652,"136":0.00652,"138":0.03914,"139":0.02609,"140":0.01305,"141":0.05218,"142":1.89819,"143":5.01619,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 135 137"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 16.0","13.1":0.01305,"14.1":0.00652,"15.4":0.00652,"15.5":0.01305,"15.6":0.31963,"16.1":0.01305,"16.2":0.00652,"16.3":0.05218,"16.4":0.02609,"16.5":0.03262,"16.6":0.26744,"17.0":0.00652,"17.1":0.20874,"17.2":0.15655,"17.3":0.09132,"17.4":0.01957,"17.5":0.43052,"17.6":0.33267,"18.0":0.06523,"18.1":0.04566,"18.2":0.05218,"18.3":0.24135,"18.4":0.18264,"18.5-18.6":0.17612,"26.0":0.35877,"26.1":1.23937,"26.2":0.35224,"26.3":0.01305},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00329,"5.0-5.1":0,"6.0-6.1":0.00657,"7.0-7.1":0.00493,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.01315,"10.0-10.2":0.00164,"10.3":0.02301,"11.0-11.2":0.2827,"11.3-11.4":0.00822,"12.0-12.1":0.00657,"12.2-12.5":0.07396,"13.0-13.1":0.00164,"13.2":0.01151,"13.3":0.00329,"13.4-13.7":0.01151,"14.0-14.4":0.02301,"14.5-14.8":0.02465,"15.0-15.1":0.0263,"15.2-15.3":0.01972,"15.4":0.02137,"15.5":0.02301,"15.6-15.8":0.35666,"16.0":0.04109,"16.1":0.07889,"16.2":0.04109,"16.3":0.07396,"16.4":0.01808,"16.5":0.03123,"16.6-16.7":0.46349,"17.0":0.0263,"17.1":0.04273,"17.2":0.03123,"17.3":0.04766,"17.4":0.08054,"17.5":0.15778,"17.6-17.7":0.36487,"18.0":0.08218,"18.1":0.17093,"18.2":0.0904,"18.3":0.2942,"18.4":0.15121,"18.5-18.7":10.85748,"26.0":0.21202,"26.1":1.76356,"26.2":0.33529,"26.3":0.01479},P:{"24":0.02088,"26":0.01044,"27":0.04177,"28":0.10442,"29":3.26819,_:"4 20 21 22 23 25 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.01044},I:{"0":0.01389,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},A:{_:"6 7 8 9 10 11 5.5"},K:{"0":0.14603,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{"14.9":0.00695},O:{"0":0.00348},H:{"0":0},L:{"0":16.04315},R:{_:"0"},M:{"0":0.73365}};

View File

@ -0,0 +1,18 @@
/**
* @license lucide-react v0.395.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Plug = createLucideIcon("Plug", [
["path", { d: "M12 22v-5", key: "1ega77" }],
["path", { d: "M9 8V2", key: "14iosj" }],
["path", { d: "M15 8V2", key: "18g5xt" }],
["path", { d: "M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z", key: "osxo6l" }]
]);
export { Plug as default };
//# sourceMappingURL=plug.js.map

View File

@ -0,0 +1,39 @@
/**
Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag.
@param flag - CLI flag to look for. The `--` prefix is optional.
@param argv - CLI arguments. Default: `process.argv`.
@returns Whether the flag exists.
@example
```
// $ ts-node foo.ts -f --unicorn --foo=bar -- --rainbow
// foo.ts
import hasFlag = require('has-flag');
hasFlag('unicorn');
//=> true
hasFlag('--unicorn');
//=> true
hasFlag('f');
//=> true
hasFlag('-f');
//=> true
hasFlag('foo=bar');
//=> true
hasFlag('foo');
//=> false
hasFlag('rainbow');
//=> false
```
*/
declare function hasFlag(flag: string, argv?: string[]): boolean;
export = hasFlag;

View File

@ -0,0 +1 @@
{"version":3,"file":"default-param-last.js","sourceRoot":"","sources":["../../src/rules/default-param-last.ts"],"names":[],"mappings":";;AACA,oDAA0D;AAE1D,kCAAqC;AAErC,kBAAe,IAAA,iBAAU,EAAC;IACxB,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,uCAAuC;YACpD,eAAe,EAAE,IAAI;SACtB;QACD,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE;YACR,YAAY,EAAE,oCAAoC;SACnD;KACF;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ;;;;WAIG;QACH,SAAS,eAAe,CAAC,IAAwB;YAC/C,OAAO,CACL,CAAC,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,YAAY;gBACxC,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,iBAAiB;gBAC9C,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,UAAU;gBACvC,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,aAAa;gBAC1C,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,WAAW,CAAC;gBAC3C,IAAI,CAAC,QAAQ,CACd,CAAC;QACJ,CAAC;QAED;;;;WAIG;QACH,SAAS,YAAY,CAAC,IAAwB;YAC5C,OAAO,CAAC,CACN,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,iBAAiB;gBAC9C,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,WAAW;gBACxC,eAAe,CAAC,IAAI,CAAC,CACtB,CAAC;QACJ,CAAC;QAED,SAAS,qBAAqB,CAC5B,IAG+B;YAE/B,IAAI,iBAAiB,GAAG,KAAK,CAAC;YAC9B,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBACjD,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBAC/B,MAAM,KAAK,GACT,OAAO,CAAC,IAAI,KAAK,sBAAc,CAAC,mBAAmB;oBACjD,CAAC,CAAC,OAAO,CAAC,SAAS;oBACnB,CAAC,CAAC,OAAO,CAAC;gBAEd,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;oBACxB,iBAAiB,GAAG,IAAI,CAAC;oBACzB,SAAS;gBACX,CAAC;gBAED,IACE,iBAAiB;oBACjB,CAAC,eAAe,CAAC,KAAK,CAAC;wBACrB,KAAK,CAAC,IAAI,KAAK,sBAAc,CAAC,iBAAiB,CAAC,EAClD,CAAC;oBACD,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,CAAC;gBAC/D,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO;YACL,uBAAuB,EAAE,qBAAqB;YAC9C,mBAAmB,EAAE,qBAAqB;YAC1C,kBAAkB,EAAE,qBAAqB;SAC1C,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}

View File

@ -0,0 +1,41 @@
// packages/react/use-size/src/use-size.tsx
import * as React from "react";
import { useLayoutEffect } from "@radix-ui/react-use-layout-effect";
function useSize(element) {
const [size, setSize] = React.useState(void 0);
useLayoutEffect(() => {
if (element) {
setSize({ width: element.offsetWidth, height: element.offsetHeight });
const resizeObserver = new ResizeObserver((entries) => {
if (!Array.isArray(entries)) {
return;
}
if (!entries.length) {
return;
}
const entry = entries[0];
let width;
let height;
if ("borderBoxSize" in entry) {
const borderSizeEntry = entry["borderBoxSize"];
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
width = borderSize["inlineSize"];
height = borderSize["blockSize"];
} else {
width = element.offsetWidth;
height = element.offsetHeight;
}
setSize({ width, height });
});
resizeObserver.observe(element, { box: "border-box" });
return () => resizeObserver.unobserve(element);
} else {
setSize(void 0);
}
}, [element]);
return size;
}
export {
useSize
};
//# sourceMappingURL=index.mjs.map

View File

@ -0,0 +1,28 @@
/**
* @license lucide-react v0.395.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Cable = createLucideIcon("Cable", [
[
"path",
{
d: "M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1",
key: "10bnsj"
}
],
["path", { d: "M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9", key: "1eqmu1" }],
["path", { d: "M21 21v-2h-4", key: "14zm7j" }],
["path", { d: "M3 5h4V3", key: "z442eg" }],
[
"path",
{ d: "M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3", key: "ebdjd7" }
]
]);
export { Cable as default };
//# sourceMappingURL=cable.js.map

View File

@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return negateValue;
}
});
function negateValue(value) {
value = `${value}`;
if (value === "0") {
return "0";
}
// Flip sign of numbers
if (/^[+-]?(\d+|\d*\.\d+)(e[+-]?\d+)?(%|\w+)?$/.test(value)) {
return value.replace(/^[+-]?/, (sign)=>sign === "-" ? "" : "-");
}
// What functions we support negating numeric values for
// var() isn't inherently a numeric function but we support it anyway
// The trigonometric functions are omitted because you'll need to use calc(…) with them _anyway_
// to produce generally useful results and that will be covered already
let numericFunctions = [
"var",
"calc",
"min",
"max",
"clamp"
];
for (const fn of numericFunctions){
if (value.includes(`${fn}(`)) {
return `calc(${value} * -1)`;
}
}
}

View File

@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","132":"K D E 1C"},B:{"1":"0 1 2 3 4 5 6 7 8 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 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB I"},C:{"1":"0 1 2 3 4 5 6 7 8 EB FB GB HB IB 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 XC 7B YC 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC OC Q H R ZC 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 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB I aC PC bC 3C 4C","132":"9 2C WC J cB K D E F A B C L M G N O P dB AB BB CB DB 5C 6C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J cB K D E F A B C L M G N O P dB AB BB CB DB EB FB GB HB IB 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 XC 7B YC 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC OC 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 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB I aC PC bC"},E:{"1":"cB K D E F A B C 8C 9C AD BD dC QC RC fC SC FD TC gC hC iC jC kC GD UC lC mC nC oC pC HD VC qC rC sC tC ID uC vC wC xC yC JD","132":"J L 7C cC CD","2050":"M G DD ED eC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G N O P dB AB BB CB DB EB FB GB HB IB 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 MC NC OC Q H R ZC 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 MD ND QC zC OD RC","132":"F KD LD"},G:{"2":"cC PD 0C","4100":"fC SC jD TC gC hC iC jC kC kD UC lC mC nC oC pC lD VC qC rC sC tC mD uC vC wC xC yC","4868":"E QD RD SD TD UD VD WD XD YD ZD aD bD","6148":"cD dD eD fD gD hD iD eC"},H:{"2":"nD"},I:{"2":"WC J I oD pD qD sD tD","132":"rD 0C"},J:{"260":"D A"},K:{"1":"B C H QC zC RC","132":"A"},L:{"1":"I"},M:{"1":"PC"},N:{"1":"A B"},O:{"1":"SC"},P:{"2":"J","1028":"9 AB BB CB DB EB FB GB HB IB uD vD wD xD yD dC zD 0D 1D 2D 3D TC UC VC 4D"},Q:{"1":"5D"},R:{"1":"6D"},S:{"1":"7D 8D"}},B:4,C:"CSS background-attachment",D:true};

View File

@ -0,0 +1,35 @@
const unicode = require('../lib/unicode')
module.exports = {
isSpaceSeparator (c) {
return typeof c === 'string' && unicode.Space_Separator.test(c)
},
isIdStartChar (c) {
return typeof c === 'string' && (
(c >= 'a' && c <= 'z') ||
(c >= 'A' && c <= 'Z') ||
(c === '$') || (c === '_') ||
unicode.ID_Start.test(c)
)
},
isIdContinueChar (c) {
return typeof c === 'string' && (
(c >= 'a' && c <= 'z') ||
(c >= 'A' && c <= 'Z') ||
(c >= '0' && c <= '9') ||
(c === '$') || (c === '_') ||
(c === '\u200C') || (c === '\u200D') ||
unicode.ID_Continue.test(c)
)
},
isDigit (c) {
return typeof c === 'string' && /[0-9]/.test(c)
},
isHexDigit (c) {
return typeof c === 'string' && /[0-9A-Fa-f]/.test(c)
},
}

View File

@ -0,0 +1,61 @@
type Pathname = string
interface TestResult {
ignored: boolean
unignored: boolean
}
export interface Ignore {
/**
* Adds one or several rules to the current manager.
* @param {string[]} patterns
* @returns IgnoreBase
*/
add(patterns: string | Ignore | readonly (string | Ignore)[]): this
/**
* Filters the given array of pathnames, and returns the filtered array.
* NOTICE that each path here should be a relative path to the root of your repository.
* @param paths the array of paths to be filtered.
* @returns The filtered array of paths
*/
filter(pathnames: readonly Pathname[]): Pathname[]
/**
* Creates a filter function which could filter
* an array of paths with Array.prototype.filter.
*/
createFilter(): (pathname: Pathname) => boolean
/**
* Returns Boolean whether pathname should be ignored.
* @param {string} pathname a path to check
* @returns boolean
*/
ignores(pathname: Pathname): boolean
/**
* Returns whether pathname should be ignored or unignored
* @param {string} pathname a path to check
* @returns TestResult
*/
test(pathname: Pathname): TestResult
}
export interface Options {
ignorecase?: boolean
// For compatibility
ignoreCase?: boolean
allowRelativePaths?: boolean
}
/**
* Creates new ignore manager.
*/
declare function ignore(options?: Options): Ignore
declare namespace ignore {
export function isPathValid (pathname: string): boolean
}
export default ignore

View File

@ -0,0 +1,52 @@
{
"name": "esrecurse",
"description": "ECMAScript AST recursive visitor",
"homepage": "https://github.com/estools/esrecurse",
"main": "esrecurse.js",
"version": "4.3.0",
"engines": {
"node": ">=4.0"
},
"maintainers": [
{
"name": "Yusuke Suzuki",
"email": "utatane.tea@gmail.com",
"web": "https://github.com/Constellation"
}
],
"repository": {
"type": "git",
"url": "https://github.com/estools/esrecurse.git"
},
"dependencies": {
"estraverse": "^5.2.0"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-eslint": "^7.2.3",
"babel-preset-es2015": "^6.24.1",
"babel-register": "^6.24.1",
"chai": "^4.0.2",
"esprima": "^4.0.0",
"gulp": "^3.9.0",
"gulp-bump": "^2.7.0",
"gulp-eslint": "^4.0.0",
"gulp-filter": "^5.0.0",
"gulp-git": "^2.4.1",
"gulp-mocha": "^4.3.1",
"gulp-tag-version": "^1.2.1",
"jsdoc": "^3.3.0-alpha10",
"minimist": "^1.1.0"
},
"license": "BSD-2-Clause",
"scripts": {
"test": "gulp travis",
"unit-test": "gulp test",
"lint": "gulp lint"
},
"babel": {
"presets": [
"es2015"
]
}
}

View File

@ -0,0 +1,17 @@
/**
* @license lucide-react v0.395.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CircleArrowOutUpRight = createLucideIcon("CircleArrowOutUpRight", [
["path", { d: "M22 12A10 10 0 1 1 12 2", key: "1fm58d" }],
["path", { d: "M22 2 12 12", key: "yg2myt" }],
["path", { d: "M16 2h6v6", key: "zan5cs" }]
]);
export { CircleArrowOutUpRight as default };
//# sourceMappingURL=circle-arrow-out-up-right.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"aperture.js","sources":["../../../src/icons/aperture.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Aperture\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJtMTQuMzEgOCA1Ljc0IDkuOTQiIC8+CiAgPHBhdGggZD0iTTkuNjkgOGgxMS40OCIgLz4KICA8cGF0aCBkPSJtNy4zOCAxMiA1Ljc0LTkuOTQiIC8+CiAgPHBhdGggZD0iTTkuNjkgMTYgMy45NSA2LjA2IiAvPgogIDxwYXRoIGQ9Ik0xNC4zMSAxNkgyLjgzIiAvPgogIDxwYXRoIGQ9Im0xNi42MiAxMi01Ljc0IDkuOTQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/aperture\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Aperture = createLucideIcon('Aperture', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'm14.31 8 5.74 9.94', key: '1y6ab4' }],\n ['path', { d: 'M9.69 8h11.48', key: '1wxppr' }],\n ['path', { d: 'm7.38 12 5.74-9.94', key: '1grp0k' }],\n ['path', { d: 'M9.69 16 3.95 6.06', key: 'libnyf' }],\n ['path', { d: 'M14.31 16H2.83', key: 'x5fava' }],\n ['path', { d: 'm16.62 12-5.74 9.94', key: '1vwawt' }],\n]);\n\nexport default Aperture;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACnD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACnD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACnD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAuB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACtD,CAAC,CAAA,CAAA;;"}

View File

@ -0,0 +1,118 @@
---
description: 'Disallow `void` type outside of generic or return types.'
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
> 🛑 This file is source code, not the primary documentation location! 🛑
>
> See **https://typescript-eslint.io/rules/no-invalid-void-type** for documentation.
`void` in TypeScript refers to a function return that is meant to be ignored.
Attempting to use a `void` type outside of a return type or generic type argument is often a sign of programmer error.
`void` can also be misleading for other developers even if used correctly.
> The `void` type means cannot be mixed with any other types, other than `never`, which accepts all types.
> If you think you need this then you probably want the `undefined` type instead.
## Examples
<Tabs>
<TabItem value="❌ Incorrect">
```ts
type PossibleValues = string | number | void;
type MorePossibleValues = string | ((number & any) | (string | void));
function logSomething(thing: void) {}
function printArg<T = void>(arg: T) {}
logAndReturn<void>(undefined);
interface Interface {
lambda: () => void;
prop: void;
}
class MyClass {
private readonly propName: void;
}
```
</TabItem>
<TabItem value="✅ Correct">
```ts
type NoOp = () => void;
function noop(): void {}
let trulyUndefined = void 0;
async function promiseMeSomething(): Promise<void> {}
type stillVoid = void | never;
```
</TabItem>
</Tabs>
## Options
### `allowInGenericTypeArguments`
This option lets you control if `void` can be used as a valid value for generic type parameters.
Alternatively, you can provide an array of strings which whitelist which types may accept `void` as a generic type parameter.
Any types considered valid by this option will be considered valid as part of a union type with `void`.
This option is `true` by default.
The following patterns are considered warnings with `{ allowInGenericTypeArguments: false }`:
```ts option='{ "allowInGenericTypeArguments": false }' showPlaygroundButton
logAndReturn<void>(undefined);
let voidPromise: Promise<void> = new Promise<void>(() => {});
let voidMap: Map<string, void> = new Map<string, void>();
```
The following patterns are considered warnings with `{ allowInGenericTypeArguments: ['Ex.Mx.Tx'] }`:
```ts option='{ "allowInGenericTypeArguments": ["Ex.Mx.Tx"] }' showPlaygroundButton
logAndReturn<void>(undefined);
type NotAllowedVoid1 = Mx.Tx<void>;
type NotAllowedVoid2 = Tx<void>;
type NotAllowedVoid3 = Promise<void>;
```
The following patterns are not considered warnings with `{ allowInGenericTypeArguments: ['Ex.Mx.Tx'] }`:
```ts option='{ "allowInGenericTypeArguments": ["Ex.Mx.Tx"] }' showPlaygroundButton
type AllowedVoid = Ex.Mx.Tx<void>;
type AllowedVoidUnion = void | Ex.Mx.Tx<void>;
```
### `allowAsThisParameter`
This option allows specifying a `this` parameter of a function to be `void` when set to `true`.
This pattern can be useful to explicitly label function types that do not use a `this` argument. [See the TypeScript docs for more information](https://www.typescriptlang.org/docs/handbook/functions.html#this-parameters-in-callbacks).
This option is `false` by default.
The following patterns are considered warnings with `{ allowAsThisParameter: false }` but valid with `{ allowAsThisParameter: true }`:
```ts option='{ "allowAsThisParameter": false }' showPlaygroundButton
function doThing(this: void) {}
class Example {
static helper(this: void) {}
callback(this: void) {}
}
```
## When Not To Use It
If you don't care about if `void` is used with other types, or in invalid places, then you don't need this rule.

View File

@ -0,0 +1 @@
{"version":3,"file":"videotape.js","sources":["../../../src/icons/videotape.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Videotape\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHg9IjIiIHk9IjQiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik0yIDhoMjAiIC8+CiAgPGNpcmNsZSBjeD0iOCIgY3k9IjE0IiByPSIyIiAvPgogIDxwYXRoIGQ9Ik04IDEyaDgiIC8+CiAgPGNpcmNsZSBjeD0iMTYiIGN5PSIxNCIgcj0iMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/videotape\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Videotape = createLucideIcon('Videotape', [\n ['rect', { width: '20', height: '16', x: '2', y: '4', rx: '2', key: '18n3k1' }],\n ['path', { d: 'M2 8h20', key: 'd11cs7' }],\n ['circle', { cx: '8', cy: '14', r: '2', key: '1k2qr5' }],\n ['path', { d: 'M8 12h8', key: '1wcyev' }],\n ['circle', { cx: '16', cy: '14', r: '2', key: '14k7lr' }],\n]);\n\nexport default Videotape;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACxC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACxC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}

View File

@ -0,0 +1,235 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = applyDecs2305;
var _checkInRHS = require("./checkInRHS.js");
var _setFunctionName = require("./setFunctionName.js");
var _toPropertyKey = require("./toPropertyKey.js");
function applyDecs2305(targetClass, memberDecs, classDecs, classDecsHaveThis, instanceBrand, parentClass) {
function _bindPropCall(obj, name, before) {
return function (_this, value) {
if (before) {
before(_this);
}
return obj[name].call(_this, value);
};
}
function runInitializers(initializers, value) {
for (var i = 0; i < initializers.length; i++) {
initializers[i].call(value);
}
return value;
}
function assertCallable(fn, hint1, hint2, throwUndefined) {
if (typeof fn !== "function") {
if (throwUndefined || fn !== void 0) {
throw new TypeError(hint1 + " must " + (hint2 || "be") + " a function" + (throwUndefined ? "" : " or undefined"));
}
}
return fn;
}
function applyDec(Class, decInfo, decoratorsHaveThis, name, kind, metadata, initializers, ret, isStatic, isPrivate, isField, isAccessor, hasPrivateBrand) {
function assertInstanceIfPrivate(target) {
if (!hasPrivateBrand(target)) {
throw new TypeError("Attempted to access private element on non-instance");
}
}
var decs = decInfo[0],
decVal = decInfo[3],
_,
isClass = !ret;
if (!isClass) {
if (!decoratorsHaveThis && !Array.isArray(decs)) {
decs = [decs];
}
var desc = {},
init = [],
key = kind === 3 ? "get" : kind === 4 || isAccessor ? "set" : "value";
if (isPrivate) {
if (isField || isAccessor) {
desc = {
get: (0, _setFunctionName.default)(function () {
return decVal(this);
}, name, "get"),
set: function (value) {
decInfo[4](this, value);
}
};
} else {
desc[key] = decVal;
}
if (!isField) {
(0, _setFunctionName.default)(desc[key], name, kind === 2 ? "" : key);
}
} else if (!isField) {
desc = Object.getOwnPropertyDescriptor(Class, name);
}
}
var newValue = Class;
for (var i = decs.length - 1; i >= 0; i -= decoratorsHaveThis ? 2 : 1) {
var dec = decs[i],
decThis = decoratorsHaveThis ? decs[i - 1] : void 0;
var decoratorFinishedRef = {};
var ctx = {
kind: ["field", "accessor", "method", "getter", "setter", "class"][kind],
name: name,
metadata: metadata,
addInitializer: function (decoratorFinishedRef, initializer) {
if (decoratorFinishedRef.v) {
throw new Error("attempted to call addInitializer after decoration was finished");
}
assertCallable(initializer, "An initializer", "be", true);
initializers.push(initializer);
}.bind(null, decoratorFinishedRef)
};
try {
if (isClass) {
if (_ = assertCallable(dec.call(decThis, newValue, ctx), "class decorators", "return")) {
newValue = _;
}
} else {
ctx["static"] = isStatic;
ctx["private"] = isPrivate;
var get, set;
if (!isPrivate) {
get = function (target) {
return target[name];
};
if (kind < 2 || kind === 4) {
set = function (target, v) {
target[name] = v;
};
}
} else if (kind === 2) {
get = function (_this) {
assertInstanceIfPrivate(_this);
return desc.value;
};
} else {
if (kind < 4) {
get = _bindPropCall(desc, "get", assertInstanceIfPrivate);
}
if (kind !== 3) {
set = _bindPropCall(desc, "set", assertInstanceIfPrivate);
}
}
var access = ctx.access = {
has: isPrivate ? hasPrivateBrand.bind() : function (target) {
return name in target;
}
};
if (get) access.get = get;
if (set) access.set = set;
newValue = dec.call(decThis, isAccessor ? {
get: desc.get,
set: desc.set
} : desc[key], ctx);
if (isAccessor) {
if (typeof newValue === "object" && newValue) {
if (_ = assertCallable(newValue.get, "accessor.get")) {
desc.get = _;
}
if (_ = assertCallable(newValue.set, "accessor.set")) {
desc.set = _;
}
if (_ = assertCallable(newValue.init, "accessor.init")) {
init.push(_);
}
} else if (newValue !== void 0) {
throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
}
} else if (assertCallable(newValue, (isField ? "field" : "method") + " decorators", "return")) {
if (isField) {
init.push(newValue);
} else {
desc[key] = newValue;
}
}
}
} finally {
decoratorFinishedRef.v = true;
}
}
if (isField || isAccessor) {
ret.push(function (instance, value) {
for (var i = init.length - 1; i >= 0; i--) {
value = init[i].call(instance, value);
}
return value;
});
}
if (!isField && !isClass) {
if (isPrivate) {
if (isAccessor) {
ret.push(_bindPropCall(desc, "get"), _bindPropCall(desc, "set"));
} else {
ret.push(kind === 2 ? desc[key] : _bindPropCall.call.bind(desc[key]));
}
} else {
Object.defineProperty(Class, name, desc);
}
}
return newValue;
}
function applyMemberDecs(Class, decInfos, instanceBrand, metadata) {
var ret = [];
var protoInitializers;
var staticInitializers;
var staticBrand = function (_) {
return (0, _checkInRHS.default)(_) === Class;
};
var existingNonFields = new Map();
function pushInitializers(initializers) {
if (initializers) {
ret.push(runInitializers.bind(null, initializers));
}
}
for (var i = 0; i < decInfos.length; i++) {
var decInfo = decInfos[i];
if (!Array.isArray(decInfo)) continue;
var kind = decInfo[1];
var name = decInfo[2];
var isPrivate = decInfo.length > 3;
var decoratorsHaveThis = kind & 16;
var isStatic = !!(kind & 8);
kind &= 7;
var isField = kind === 0;
var key = name + "/" + isStatic;
if (!isField && !isPrivate) {
var existingKind = existingNonFields.get(key);
if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) {
throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
}
existingNonFields.set(key, kind > 2 ? kind : true);
}
applyDec(isStatic ? Class : Class.prototype, decInfo, decoratorsHaveThis, isPrivate ? "#" + name : (0, _toPropertyKey.default)(name), kind, metadata, isStatic ? staticInitializers = staticInitializers || [] : protoInitializers = protoInitializers || [], ret, isStatic, isPrivate, isField, kind === 1, isStatic && isPrivate ? staticBrand : instanceBrand);
}
pushInitializers(protoInitializers);
pushInitializers(staticInitializers);
return ret;
}
function defineMetadata(Class, metadata) {
return Object.defineProperty(Class, Symbol.metadata || Symbol["for"]("Symbol.metadata"), {
configurable: true,
enumerable: true,
value: metadata
});
}
if (arguments.length >= 6) {
var parentMetadata = parentClass[Symbol.metadata || Symbol["for"]("Symbol.metadata")];
}
var metadata = Object.create(parentMetadata == null ? null : parentMetadata);
var e = applyMemberDecs(targetClass, memberDecs, instanceBrand, metadata);
if (!classDecs.length) defineMetadata(targetClass, metadata);
return {
e: e,
get c() {
var initializers = [];
return classDecs.length && [defineMetadata(applyDec(targetClass, [classDecs], classDecsHaveThis, targetClass.name, 5, metadata, initializers), metadata), runInitializers.bind(null, initializers, targetClass)];
}
};
}
//# sourceMappingURL=applyDecs2305.js.map

View File

@ -0,0 +1,136 @@
// src/use-controllable-state.tsx
import * as React from "react";
import { useLayoutEffect } from "@radix-ui/react-use-layout-effect";
var useInsertionEffect = React[" useInsertionEffect ".trim().toString()] || useLayoutEffect;
function useControllableState({
prop,
defaultProp,
onChange = () => {
},
caller
}) {
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
defaultProp,
onChange
});
const isControlled = prop !== void 0;
const value = isControlled ? prop : uncontrolledProp;
if (true) {
const isControlledRef = React.useRef(prop !== void 0);
React.useEffect(() => {
const wasControlled = isControlledRef.current;
if (wasControlled !== isControlled) {
const from = wasControlled ? "controlled" : "uncontrolled";
const to = isControlled ? "controlled" : "uncontrolled";
console.warn(
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
);
}
isControlledRef.current = isControlled;
}, [isControlled, caller]);
}
const setValue = React.useCallback(
(nextValue) => {
if (isControlled) {
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
if (value2 !== prop) {
onChangeRef.current?.(value2);
}
} else {
setUncontrolledProp(nextValue);
}
},
[isControlled, prop, setUncontrolledProp, onChangeRef]
);
return [value, setValue];
}
function useUncontrolledState({
defaultProp,
onChange
}) {
const [value, setValue] = React.useState(defaultProp);
const prevValueRef = React.useRef(value);
const onChangeRef = React.useRef(onChange);
useInsertionEffect(() => {
onChangeRef.current = onChange;
}, [onChange]);
React.useEffect(() => {
if (prevValueRef.current !== value) {
onChangeRef.current?.(value);
prevValueRef.current = value;
}
}, [value, prevValueRef]);
return [value, setValue, onChangeRef];
}
function isFunction(value) {
return typeof value === "function";
}
// src/use-controllable-state-reducer.tsx
import * as React2 from "react";
import { useEffectEvent } from "@radix-ui/react-use-effect-event";
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
function useControllableStateReducer(reducer, userArgs, initialArg, init) {
const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;
const isControlled = controlledState !== void 0;
const onChange = useEffectEvent(onChangeProp);
if (true) {
const isControlledRef = React2.useRef(controlledState !== void 0);
React2.useEffect(() => {
const wasControlled = isControlledRef.current;
if (wasControlled !== isControlled) {
const from = wasControlled ? "controlled" : "uncontrolled";
const to = isControlled ? "controlled" : "uncontrolled";
console.warn(
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
);
}
isControlledRef.current = isControlled;
}, [isControlled, caller]);
}
const args = [{ ...initialArg, state: defaultProp }];
if (init) {
args.push(init);
}
const [internalState, dispatch] = React2.useReducer(
(state2, action) => {
if (action.type === SYNC_STATE) {
return { ...state2, state: action.state };
}
const next = reducer(state2, action);
if (isControlled && !Object.is(next.state, state2.state)) {
onChange(next.state);
}
return next;
},
...args
);
const uncontrolledState = internalState.state;
const prevValueRef = React2.useRef(uncontrolledState);
React2.useEffect(() => {
if (prevValueRef.current !== uncontrolledState) {
prevValueRef.current = uncontrolledState;
if (!isControlled) {
onChange(uncontrolledState);
}
}
}, [onChange, uncontrolledState, prevValueRef, isControlled]);
const state = React2.useMemo(() => {
const isControlled2 = controlledState !== void 0;
if (isControlled2) {
return { ...internalState, state: controlledState };
}
return internalState;
}, [internalState, controlledState]);
React2.useEffect(() => {
if (isControlled && !Object.is(controlledState, internalState.state)) {
dispatch({ type: SYNC_STATE, state: controlledState });
}
}, [controlledState, internalState.state, isControlled]);
return [state, dispatch];
}
export {
useControllableState,
useControllableStateReducer
};
//# sourceMappingURL=index.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"angry.js","sources":["../../../src/icons/angry.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Angry\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJNMTYgMTZzLTEuNS0yLTQtMi00IDItNCAyIiAvPgogIDxwYXRoIGQ9Ik03LjUgOCAxMCA5IiAvPgogIDxwYXRoIGQ9Im0xNCA5IDIuNS0xIiAvPgogIDxwYXRoIGQ9Ik05IDEwaC4wMSIgLz4KICA8cGF0aCBkPSJNMTUgMTBoLjAxIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/angry\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Angry = createLucideIcon('Angry', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'M16 16s-1.5-2-4-2-4 2-4 2', key: 'epbg0q' }],\n ['path', { d: 'M7.5 8 10 9', key: 'olxxln' }],\n ['path', { d: 'm14 9 2.5-1', key: '1j6cij' }],\n ['path', { d: 'M9 10h.01', key: 'qbtxuw' }],\n ['path', { d: 'M15 10h.01', key: '1qmjsl' }],\n]);\n\nexport default Angry;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CACtC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAe,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAe,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}

View File

@ -0,0 +1,37 @@
{
"name": "@nodelib/fs.stat",
"version": "2.0.5",
"description": "Get the status of a file with some features",
"license": "MIT",
"repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat",
"keywords": [
"NodeLib",
"fs",
"FileSystem",
"file system",
"stat"
],
"engines": {
"node": ">= 8"
},
"files": [
"out/**",
"!out/**/*.map",
"!out/**/*.spec.*"
],
"main": "out/index.js",
"typings": "out/index.d.ts",
"scripts": {
"clean": "rimraf {tsconfig.tsbuildinfo,out}",
"lint": "eslint \"src/**/*.ts\" --cache",
"compile": "tsc -b .",
"compile:watch": "tsc -p . --watch --sourceMap",
"test": "mocha \"out/**/*.spec.js\" -s 0",
"build": "npm run clean && npm run compile && npm run lint && npm test",
"watch": "npm run clean && npm run compile:watch"
},
"devDependencies": {
"@nodelib/fs.macchiato": "1.0.4"
},
"gitHead": "d6a7960d5281d3dd5f8e2efba49bb552d090f562"
}

View File

@ -0,0 +1,7 @@
'use strict';
const path = require('path');
const binaryExtensions = require('binary-extensions');
const extensions = new Set(binaryExtensions);
module.exports = filePath => extensions.has(path.extname(filePath).slice(1).toLowerCase());

View File

@ -0,0 +1 @@
{"version":3,"file":"split.js","sources":["../../../src/icons/split.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Split\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgM2g1djUiIC8+CiAgPHBhdGggZD0iTTggM0gzdjUiIC8+CiAgPHBhdGggZD0iTTEyIDIydi04LjNhNCA0IDAgMCAwLTEuMTcyLTIuODcyTDMgMyIgLz4KICA8cGF0aCBkPSJtMTUgOSA2LTYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/split\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Split = createLucideIcon('Split', [\n ['path', { d: 'M16 3h5v5', key: '1806ms' }],\n ['path', { d: 'M8 3H3v5', key: '15dfkv' }],\n ['path', { d: 'M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3', key: '1qrqzj' }],\n ['path', { d: 'm15 9 6-6', key: 'ko1vev' }],\n]);\n\nexport default Split;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAyC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACtE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}

View File

@ -0,0 +1,9 @@
/**
* @license lucide-react v0.395.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './square-bottom-dashed-scissors.js';
//# sourceMappingURL=scissors-square-dashed-bottom.js.map

View File

@ -0,0 +1,5 @@
'use strict'
module.exports.isClean = Symbol('isClean')
module.exports.my = Symbol('my')

View File

@ -0,0 +1,9 @@
module.exports = {
y: 1 << 0,
n: 1 << 1,
a: 1 << 2,
p: 1 << 3,
u: 1 << 4,
x: 1 << 5,
d: 1 << 6
}

View File

@ -0,0 +1,22 @@
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _node = _interopRequireDefault(require("./node"));
var _types = require("./types");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var Nesting = /*#__PURE__*/function (_Node) {
_inheritsLoose(Nesting, _Node);
function Nesting(opts) {
var _this;
_this = _Node.call(this, opts) || this;
_this.type = _types.NESTING;
_this.value = '&';
return _this;
}
return Nesting;
}(_node["default"]);
exports["default"] = Nesting;
module.exports = exports.default;

View File

@ -0,0 +1,3 @@
import type { PluginStyleguideConfig } from './types';
declare const recommendedStrict: PluginStyleguideConfig<'built-in'>;
export default recommendedStrict;

View File

@ -0,0 +1,2 @@
import type { Oas3Rule } from '../../visitors';
export declare const ValidContentExamples: Oas3Rule;

View File

@ -0,0 +1,20 @@
/**
* @license lucide-react v0.395.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const GitCompareArrows = createLucideIcon("GitCompareArrows", [
["circle", { cx: "5", cy: "6", r: "3", key: "1qnov2" }],
["path", { d: "M12 6h5a2 2 0 0 1 2 2v7", key: "1yj91y" }],
["path", { d: "m15 9-3-3 3-3", key: "1lwv8l" }],
["circle", { cx: "19", cy: "18", r: "3", key: "1qljk2" }],
["path", { d: "M12 18H7a2 2 0 0 1-2-2V9", key: "16sdep" }],
["path", { d: "m9 15 3 3-3 3", key: "1m3kbl" }]
]);
export { GitCompareArrows as default };
//# sourceMappingURL=git-compare-arrows.js.map

View File

@ -0,0 +1,44 @@
var fs = require('fs');
var path = require('path');
var flatted = require('flatted');
module.exports = {
tryParse: function (filePath, defaultValue) {
var result;
try {
result = this.readJSON(filePath);
} catch (ex) {
result = defaultValue;
}
return result;
},
/**
* Read json file synchronously using flatted
*
* @method readJSON
* @param {String} filePath Json filepath
* @returns {*} parse result
*/
readJSON: function (filePath) {
return flatted.parse(
fs.readFileSync(filePath, {
encoding: 'utf8',
})
);
},
/**
* Write json file synchronously using circular-json
*
* @method writeJSON
* @param {String} filePath Json filepath
* @param {*} data Object to serialize
*/
writeJSON: function (filePath, data) {
fs.mkdirSync(path.dirname(filePath), {
recursive: true,
});
fs.writeFileSync(filePath, flatted.stringify(data));
},
};

View File

@ -0,0 +1,89 @@
# has-flag [![Build Status](https://travis-ci.org/sindresorhus/has-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/has-flag)
> Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag
Correctly stops looking after an `--` argument terminator.
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-has-flag?utm_source=npm-has-flag&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
---
## Install
```
$ npm install has-flag
```
## Usage
```js
// foo.js
const hasFlag = require('has-flag');
hasFlag('unicorn');
//=> true
hasFlag('--unicorn');
//=> true
hasFlag('f');
//=> true
hasFlag('-f');
//=> true
hasFlag('foo=bar');
//=> true
hasFlag('foo');
//=> false
hasFlag('rainbow');
//=> false
```
```
$ node foo.js -f --unicorn --foo=bar -- --rainbow
```
## API
### hasFlag(flag, [argv])
Returns a boolean for whether the flag exists.
#### flag
Type: `string`
CLI flag to look for. The `--` prefix is optional.
#### argv
Type: `string[]`<br>
Default: `process.argv`
CLI arguments.
## Security
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)

View File

@ -0,0 +1 @@
{"name":"glob-parent","version":"5.1.2","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1771921292431,"integrity":"sha512-Ca6s7X2ZfTI6fGB3faWEyIGYcJajB9jLXcw0mcKJ0htY9zs6HW2o8jDnuqZOv4yfJt5kw4rAh0tRhzlxKM6raQ==","mode":420,"size":753},"index.js":{"checkedAt":1771921292431,"integrity":"sha512-d7dN81urIl+AgVs+2rwo/aIBVYRzVrIutDMsHVgiDEojj7sprmx818+3e8IPt8QT8WZfiDHqPJvK0Yc/zsZ1LQ==","mode":420,"size":1120},"package.json":{"checkedAt":1771921292431,"integrity":"sha512-1clKscMLzwwOqg6cKj8agX7y5kyTU2w6v4vDWsQHz6sx9174OZCudhecNKUYrsSES3vaigPFd36vERycoWZjPQ==","mode":420,"size":1105},"CHANGELOG.md":{"checkedAt":1771921292431,"integrity":"sha512-dHv9RnK7Jt8LHdXB7DJnpHZdTYF8/CqeW6Q9n201h0zoVwQha4+b/1sKvlNNMjcSC3b3D/P7CQfqcgGoPrZKZg==","mode":420,"size":4510},"README.md":{"checkedAt":1771921292432,"integrity":"sha512-mj6hcRQBOumgjqcf8pAQpY3tuJKKiqPLOH3xMiRRzjRKuQ5zgmzUTV/KtbFs3+8EI9a1tasZTG/QbJPAVDWeyw==","mode":420,"size":4646}}}

View File

@ -0,0 +1,572 @@
/*
@license
Rollup.js v4.59.0
Sun, 22 Feb 2026 07:31:53 GMT - commit ae846957f109690a866cc3e4c073613c338d3476
https://github.com/rollup/rollup
Released under the MIT License.
*/
'use strict';
const promises = require('node:fs/promises');
const path = require('node:path');
const process$1 = require('node:process');
const node_url = require('node:url');
const rollup = require('./rollup.js');
const parseAst_js = require('./parseAst.js');
const getLogFilter_js = require('../getLogFilter.js');
function batchWarnings(command) {
const silent = !!command.silent;
const logFilter = generateLogFilter(command);
let count = 0;
const deferredWarnings = new Map();
let warningOccurred = false;
const add = (warning) => {
count += 1;
warningOccurred = true;
if (silent)
return;
if (warning.code in deferredHandlers) {
rollup.getOrCreate(deferredWarnings, warning.code, rollup.getNewArray).push(warning);
}
else if (warning.code in immediateHandlers) {
immediateHandlers[warning.code](warning);
}
else {
title(warning.message);
defaultBody(warning);
}
};
return {
add,
get count() {
return count;
},
flush() {
if (count === 0 || silent)
return;
const codes = [...deferredWarnings.keys()].sort((a, b) => deferredWarnings.get(b).length - deferredWarnings.get(a).length);
for (const code of codes) {
deferredHandlers[code](deferredWarnings.get(code));
}
deferredWarnings.clear();
count = 0;
},
log(level, log) {
if (!logFilter(log))
return;
switch (level) {
case parseAst_js.LOGLEVEL_WARN: {
return add(log);
}
case parseAst_js.LOGLEVEL_DEBUG: {
if (!silent) {
rollup.stderr(rollup.bold(rollup.pc.blue(log.message)));
defaultBody(log);
}
return;
}
default: {
if (!silent) {
rollup.stderr(rollup.bold(rollup.pc.cyan(log.message)));
defaultBody(log);
}
}
}
},
get warningOccurred() {
return warningOccurred;
}
};
}
const immediateHandlers = {
MISSING_NODE_BUILTINS(warning) {
title(`Missing shims for Node.js built-ins`);
rollup.stderr(`Creating a browser bundle that depends on ${parseAst_js.printQuotedStringList(warning.ids)}. You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`);
},
UNKNOWN_OPTION(warning) {
title(`You have passed an unrecognized option`);
rollup.stderr(warning.message);
}
};
const deferredHandlers = {
CIRCULAR_DEPENDENCY(warnings) {
title(`Circular dependenc${warnings.length > 1 ? 'ies' : 'y'}`);
const displayed = warnings.length > 5 ? warnings.slice(0, 3) : warnings;
for (const warning of displayed) {
rollup.stderr(warning.ids.map(parseAst_js.relativeId).join(' -> '));
}
if (warnings.length > displayed.length) {
rollup.stderr(`...and ${warnings.length - displayed.length} more`);
}
},
EMPTY_BUNDLE(warnings) {
title(`Generated${warnings.length === 1 ? ' an' : ''} empty ${warnings.length > 1 ? 'chunks' : 'chunk'}`);
rollup.stderr(parseAst_js.printQuotedStringList(warnings.map(warning => warning.names[0])));
},
EVAL(warnings) {
title('Use of eval is strongly discouraged');
info(parseAst_js.getRollupUrl(parseAst_js.URL_AVOIDING_EVAL));
showTruncatedWarnings(warnings);
},
MISSING_EXPORT(warnings) {
title('Missing exports');
info(parseAst_js.getRollupUrl(parseAst_js.URL_NAME_IS_NOT_EXPORTED));
for (const warning of warnings) {
rollup.stderr(rollup.bold(parseAst_js.relativeId(warning.id)));
rollup.stderr(`${warning.binding} is not exported by ${parseAst_js.relativeId(warning.exporter)}`);
rollup.stderr(rollup.gray(warning.frame));
}
},
MISSING_GLOBAL_NAME(warnings) {
title(`Missing global variable ${warnings.length > 1 ? 'names' : 'name'}`);
info(parseAst_js.getRollupUrl(parseAst_js.URL_OUTPUT_GLOBALS));
rollup.stderr(`Use "output.globals" to specify browser global variable names corresponding to external modules:`);
for (const warning of warnings) {
rollup.stderr(`${rollup.bold(warning.id)} (guessing "${warning.names[0]}")`);
}
},
MIXED_EXPORTS(warnings) {
title('Mixing named and default exports');
info(parseAst_js.getRollupUrl(parseAst_js.URL_OUTPUT_EXPORTS));
rollup.stderr(rollup.bold('The following entry modules are using named and default exports together:'));
warnings.sort((a, b) => (a.id < b.id ? -1 : 1));
const displayedWarnings = warnings.length > 5 ? warnings.slice(0, 3) : warnings;
for (const warning of displayedWarnings) {
rollup.stderr(parseAst_js.relativeId(warning.id));
}
if (displayedWarnings.length < warnings.length) {
rollup.stderr(`...and ${warnings.length - displayedWarnings.length} other entry modules`);
}
rollup.stderr(`\nConsumers of your bundle will have to use chunk.default to access their default export, which may not be what you want. Use \`output.exports: "named"\` to disable this warning.`);
},
NAMESPACE_CONFLICT(warnings) {
title(`Conflicting re-exports`);
for (const warning of warnings) {
rollup.stderr(`"${rollup.bold(parseAst_js.relativeId(warning.reexporter))}" re-exports "${warning.binding}" from both "${parseAst_js.relativeId(warning.ids[0])}" and "${parseAst_js.relativeId(warning.ids[1])}" (will be ignored).`);
}
},
PLUGIN_WARNING(warnings) {
const nestedByPlugin = nest(warnings, 'plugin');
for (const { items } of nestedByPlugin) {
const nestedByMessage = nest(items, 'message');
let lastUrl = '';
for (const { key: message, items } of nestedByMessage) {
title(message);
for (const warning of items) {
if (warning.url && warning.url !== lastUrl)
info((lastUrl = warning.url));
const loc = formatLocation(warning);
if (loc) {
rollup.stderr(rollup.bold(loc));
}
if (warning.frame)
info(warning.frame);
}
}
}
},
SOURCEMAP_BROKEN(warnings) {
title(`Broken sourcemap`);
info(parseAst_js.getRollupUrl(parseAst_js.URL_SOURCEMAP_IS_LIKELY_TO_BE_INCORRECT));
const plugins = [...new Set(warnings.map(({ plugin }) => plugin).filter(Boolean))];
rollup.stderr(`Plugins that transform code (such as ${parseAst_js.printQuotedStringList(plugins)}) should generate accompanying sourcemaps.`);
},
THIS_IS_UNDEFINED(warnings) {
title('"this" has been rewritten to "undefined"');
info(parseAst_js.getRollupUrl(parseAst_js.URL_THIS_IS_UNDEFINED));
showTruncatedWarnings(warnings);
},
UNRESOLVED_IMPORT(warnings) {
title('Unresolved dependencies');
info(parseAst_js.getRollupUrl(parseAst_js.URL_TREATING_MODULE_AS_EXTERNAL_DEPENDENCY));
const dependencies = new Map();
for (const warning of warnings) {
rollup.getOrCreate(dependencies, parseAst_js.relativeId(warning.exporter), rollup.getNewArray).push(parseAst_js.relativeId(warning.id));
}
for (const [dependency, importers] of dependencies) {
rollup.stderr(`${rollup.bold(dependency)} (imported by ${parseAst_js.printQuotedStringList(importers)})`);
}
},
UNUSED_EXTERNAL_IMPORT(warnings) {
title('Unused external imports');
for (const warning of warnings) {
rollup.stderr(warning.names +
' imported from external module "' +
warning.exporter +
'" but never used in ' +
parseAst_js.printQuotedStringList(warning.ids.map(parseAst_js.relativeId)) +
'.');
}
}
};
function defaultBody(log) {
if (log.url) {
info(log.url);
}
const loc = formatLocation(log);
if (loc) {
rollup.stderr(rollup.bold(loc));
}
if (log.frame)
info(log.frame);
}
function title(string_) {
rollup.stderr(rollup.bold(rollup.yellow(`(!) ${string_}`)));
}
function info(url) {
rollup.stderr(rollup.gray(url));
}
function nest(array, property) {
const nested = [];
const lookup = new Map();
for (const item of array) {
const key = item[property];
rollup.getOrCreate(lookup, key, () => {
const items = {
items: [],
key
};
nested.push(items);
return items;
}).items.push(item);
}
return nested;
}
function showTruncatedWarnings(warnings) {
const nestedByModule = nest(warnings, 'id');
const displayedByModule = nestedByModule.length > 5 ? nestedByModule.slice(0, 3) : nestedByModule;
for (const { key: id, items } of displayedByModule) {
rollup.stderr(rollup.bold(parseAst_js.relativeId(id)));
rollup.stderr(rollup.gray(items[0].frame));
if (items.length > 1) {
rollup.stderr(`...and ${items.length - 1} other ${items.length > 2 ? 'occurrences' : 'occurrence'}`);
}
}
if (nestedByModule.length > displayedByModule.length) {
rollup.stderr(`\n...and ${nestedByModule.length - displayedByModule.length} other files`);
}
}
function generateLogFilter(command) {
const filters = rollup.ensureArray(command.filterLogs).flatMap(filter => String(filter).split(','));
if (process.env.ROLLUP_FILTER_LOGS) {
filters.push(...process.env.ROLLUP_FILTER_LOGS.split(','));
}
return getLogFilter_js.getLogFilter(filters);
}
function formatLocation(log) {
const id = log.loc?.file || log.id;
if (!id)
return null;
return log.loc ? `${id}:${log.loc.line}:${log.loc.column}` : id;
}
const stdinName = '-';
let stdinResult = null;
function stdinPlugin(argument) {
const suffix = typeof argument == 'string' && argument.length > 0 ? '.' + argument : '';
return {
load(id) {
if (id === stdinName || id.startsWith(stdinName + '.')) {
return stdinResult || (stdinResult = readStdin());
}
},
name: 'stdin',
resolveId(id) {
if (id === stdinName) {
return id + suffix;
}
}
};
}
function readStdin() {
return new Promise((resolve, reject) => {
const chunks = [];
process$1.stdin.setEncoding('utf8');
process$1.stdin
.on('data', chunk => chunks.push(chunk))
.on('end', () => {
const result = chunks.join('');
resolve(result);
})
.on('error', error => {
reject(error);
});
});
}
function waitForInputPlugin() {
return {
async buildStart(options) {
const inputSpecifiers = Array.isArray(options.input)
? options.input
: Object.keys(options.input);
let lastAwaitedSpecifier = null;
checkSpecifiers: while (true) {
for (const specifier of inputSpecifiers) {
if ((await this.resolve(specifier)) === null) {
if (lastAwaitedSpecifier !== specifier) {
rollup.stderr(`waiting for input ${rollup.bold(specifier)}...`);
lastAwaitedSpecifier = specifier;
}
await new Promise(resolve => setTimeout(resolve, 500));
continue checkSpecifiers;
}
}
break;
}
},
name: 'wait-for-input'
};
}
async function addCommandPluginsToInputOptions(inputOptions, command) {
if (command.stdin !== false) {
inputOptions.plugins.push(stdinPlugin(command.stdin));
}
if (command.waitForBundleInput === true) {
inputOptions.plugins.push(waitForInputPlugin());
}
await addPluginsFromCommandOption(command.plugin, inputOptions);
}
async function addPluginsFromCommandOption(commandPlugin, inputOptions) {
if (commandPlugin) {
const plugins = await rollup.normalizePluginOption(commandPlugin);
for (const plugin of plugins) {
if (/[={}]/.test(plugin)) {
// -p plugin=value
// -p "{transform(c,i){...}}"
await loadAndRegisterPlugin(inputOptions, plugin);
}
else {
// split out plugins joined by commas
// -p node-resolve,commonjs,buble
for (const p of plugin.split(',')) {
await loadAndRegisterPlugin(inputOptions, p);
}
}
}
}
}
async function loadAndRegisterPlugin(inputOptions, pluginText) {
let plugin = null;
let pluginArgument = undefined;
if (pluginText[0] === '{') {
// -p "{transform(c,i){...}}"
plugin = new Function('return ' + pluginText);
}
else {
const match = pluginText.match(/^([\w./:@\\^{|}-]+)(=(.*))?$/);
if (match) {
// -p plugin
// -p plugin=arg
pluginText = match[1];
pluginArgument = new Function('return ' + match[3])();
}
else {
throw new Error(`Invalid --plugin argument format: ${JSON.stringify(pluginText)}`);
}
if (!/^\.|^rollup-plugin-|[/@\\]/.test(pluginText)) {
// Try using plugin prefix variations first if applicable.
// Prefix order is significant - left has higher precedence.
for (const prefix of ['@rollup/plugin-', 'rollup-plugin-']) {
try {
plugin = await requireOrImport(prefix + pluginText);
break;
}
catch {
// if this does not work, we try requiring the actual name below
}
}
}
if (!plugin) {
try {
if (pluginText[0] == '.')
pluginText = path.resolve(pluginText);
// Windows absolute paths must be specified as file:// protocol URL
// Note that we do not have coverage for Windows-only code paths
else if (/^[A-Za-z]:\\/.test(pluginText)) {
pluginText = node_url.pathToFileURL(path.resolve(pluginText)).href;
}
plugin = await requireOrImport(pluginText);
}
catch (error) {
throw new Error(`Cannot load plugin "${pluginText}": ${error.message}.`, { cause: error });
}
}
}
// some plugins do not use `module.exports` for their entry point,
// in which case we try the named default export and the plugin name
if (typeof plugin === 'object') {
plugin = plugin.default || plugin[getCamelizedPluginBaseName(pluginText)];
}
if (!plugin) {
throw new Error(`Cannot find entry for plugin "${pluginText}". The plugin needs to export a function either as "default" or "${getCamelizedPluginBaseName(pluginText)}" for Rollup to recognize it.`);
}
inputOptions.plugins.push(typeof plugin === 'function' ? plugin.call(plugin, pluginArgument) : plugin);
}
function getCamelizedPluginBaseName(pluginText) {
return (pluginText.match(/(@rollup\/plugin-|rollup-plugin-)(.+)$/)?.[2] || pluginText)
.split(/[/\\]/)
.slice(-1)[0]
.split('.')[0]
.split('-')
.map((part, index) => (index === 0 || !part ? part : part[0].toUpperCase() + part.slice(1)))
.join('');
}
async function requireOrImport(pluginPath) {
try {
// eslint-disable-next-line @typescript-eslint/no-require-imports
return require(pluginPath);
}
catch {
return import(pluginPath);
}
}
const loadConfigFile = async (fileName, commandOptions = {}, watchMode = false) => {
const configs = await getConfigList(getDefaultFromCjs(await getConfigFileExport(fileName, commandOptions, watchMode)), commandOptions);
const warnings = batchWarnings(commandOptions);
try {
const normalizedConfigs = [];
for (const config of configs) {
const options = await rollup.mergeOptions(config, watchMode, commandOptions, warnings.log);
await addCommandPluginsToInputOptions(options, commandOptions);
normalizedConfigs.push(options);
}
return { options: normalizedConfigs, warnings };
}
catch (error_) {
warnings.flush();
throw error_;
}
};
async function getConfigFileExport(fileName, commandOptions, watchMode) {
if (commandOptions.configPlugin || commandOptions.bundleConfigAsCjs) {
try {
return await loadTranspiledConfigFile(fileName, commandOptions);
}
catch (error_) {
if (error_.message.includes('not defined in ES module scope')) {
return parseAst_js.error(parseAst_js.logCannotBundleConfigAsEsm(error_));
}
throw error_;
}
}
let cannotLoadEsm = false;
const handleWarning = (warning) => {
if (warning.message?.includes('To load an ES module') ||
warning.message?.includes('Failed to load the ES module')) {
cannotLoadEsm = true;
}
};
process$1.on('warning', handleWarning);
try {
const fileUrl = node_url.pathToFileURL(fileName);
if (watchMode) {
// We are adding the current date to allow reloads in watch mode
fileUrl.search = `?${Date.now()}`;
}
return (await import(fileUrl.href)).default;
}
catch (error_) {
if (cannotLoadEsm) {
return parseAst_js.error(parseAst_js.logCannotLoadConfigAsCjs(error_));
}
if (error_.message.includes('not defined in ES module scope')) {
return parseAst_js.error(parseAst_js.logCannotLoadConfigAsEsm(error_));
}
throw error_;
}
finally {
process$1.off('warning', handleWarning);
}
}
function getDefaultFromCjs(namespace) {
return namespace.default || namespace;
}
function getConfigImportAttributesKey(input) {
if (input === 'assert' || input === 'with')
return input;
return;
}
async function loadTranspiledConfigFile(fileName, commandOptions) {
const { bundleConfigAsCjs, configPlugin, configImportAttributesKey, silent } = commandOptions;
const warnings = batchWarnings(commandOptions);
const inputOptions = {
// Do *not* specify external callback here - instead, perform the externality check it via fallback-plugin just below this comment.
// This allows config plugin to first decide whether some import is external or not, and only then trigger the check in fallback-plugin.
// Since the check is ultra-simple during this stage of transforming the config file itself, it should be fallback instead of primary check.
// That way, e.g. importing workspace packages will work as expected - the workspace package will be bundled.
input: fileName,
onwarn: warnings.add,
plugins: [],
treeshake: false
};
await addPluginsFromCommandOption(configPlugin, inputOptions);
// Add plugin as *last* item after addPluginsFromCommandOption is complete.
// This plugin will trigger for imports not resolved by config plugin, and mark all non-relative imports as external.
inputOptions.plugins.push({
name: 'external-fallback',
resolveId: source => {
const looksLikeExternal = (source[0] !== '.' && !path.isAbsolute(source)) || source.slice(-5) === '.json';
return looksLikeExternal ? false : null;
}
});
const bundle = await rollup.rollup(inputOptions);
const { output: [{ code }] } = await bundle.generate({
exports: 'named',
format: bundleConfigAsCjs ? 'cjs' : 'es',
importAttributesKey: getConfigImportAttributesKey(configImportAttributesKey),
plugins: [
{
name: 'transpile-import-meta',
resolveImportMeta(property, { moduleId }) {
if (property === 'url') {
return `'${node_url.pathToFileURL(moduleId).href}'`;
}
if (property == 'filename') {
return `'${moduleId}'`;
}
if (property == 'dirname') {
return `'${path.dirname(moduleId)}'`;
}
if (property == null) {
return `{url:'${node_url.pathToFileURL(moduleId).href}', filename: '${moduleId}', dirname: '${path.dirname(moduleId)}'}`;
}
}
}
]
});
if (!silent && warnings.count > 0) {
rollup.stderr(rollup.bold(`loaded ${parseAst_js.relativeId(fileName)} with warnings`));
warnings.flush();
}
return loadConfigFromWrittenFile(path.join(path.dirname(fileName), `rollup.config-${Date.now()}.${bundleConfigAsCjs ? 'cjs' : 'mjs'}`), code);
}
async function loadConfigFromWrittenFile(bundledFileName, bundledCode) {
await promises.writeFile(bundledFileName, bundledCode);
try {
return (await import(node_url.pathToFileURL(bundledFileName).href)).default;
}
finally {
promises.unlink(bundledFileName).catch(error => console.warn(error?.message || error));
}
}
async function getConfigList(configFileExport, commandOptions) {
const config = await (typeof configFileExport === 'function'
? configFileExport(commandOptions)
: configFileExport);
if (Object.keys(config).length === 0) {
return parseAst_js.error(parseAst_js.logMissingConfig());
}
return Array.isArray(config) ? config : [config];
}
exports.addCommandPluginsToInputOptions = addCommandPluginsToInputOptions;
exports.batchWarnings = batchWarnings;
exports.loadConfigFile = loadConfigFile;
exports.stdinName = stdinName;
//# sourceMappingURL=loadConfigFile.js.map

View File

@ -0,0 +1,285 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.gatherLogicalOperands = gatherLogicalOperands;
const utils_1 = require("@typescript-eslint/utils");
const ts_api_utils_1 = require("ts-api-utils");
const ts = __importStar(require("typescript"));
const util_1 = require("../../util");
const NULLISH_FLAGS = ts.TypeFlags.Null | ts.TypeFlags.Undefined;
function isValidFalseBooleanCheckType(node, disallowFalseyLiteral, parserServices, options) {
const type = parserServices.getTypeAtLocation(node);
const types = (0, ts_api_utils_1.unionTypeParts)(type);
if (disallowFalseyLiteral) {
/*
```
declare const x: false | {a: string};
x && x.a;
!x || x.a;
```
We don't want to consider these two cases because the boolean expression
narrows out the non-nullish falsy cases - so converting the chain to `x?.a`
would introduce a build error
*/
if (types.some(t => (0, ts_api_utils_1.isBooleanLiteralType)(t) && t.intrinsicName === 'false') ||
types.some(t => (0, ts_api_utils_1.isStringLiteralType)(t) && t.value === '') ||
types.some(t => (0, ts_api_utils_1.isNumberLiteralType)(t) && t.value === 0) ||
types.some(t => (0, ts_api_utils_1.isBigIntLiteralType)(t) && t.value.base10Value === '0')) {
return false;
}
}
let allowedFlags = NULLISH_FLAGS | ts.TypeFlags.Object;
if (options.checkAny === true) {
allowedFlags |= ts.TypeFlags.Any;
}
if (options.checkUnknown === true) {
allowedFlags |= ts.TypeFlags.Unknown;
}
if (options.checkString === true) {
allowedFlags |= ts.TypeFlags.StringLike;
}
if (options.checkNumber === true) {
allowedFlags |= ts.TypeFlags.NumberLike;
}
if (options.checkBoolean === true) {
allowedFlags |= ts.TypeFlags.BooleanLike;
}
if (options.checkBigInt === true) {
allowedFlags |= ts.TypeFlags.BigIntLike;
}
return types.every(t => (0, util_1.isTypeFlagSet)(t, allowedFlags));
}
function gatherLogicalOperands(node, parserServices, sourceCode, options) {
const result = [];
const { operands, newlySeenLogicals } = flattenLogicalOperands(node);
for (const operand of operands) {
const areMoreOperands = operand !== operands.at(-1);
switch (operand.type) {
case utils_1.AST_NODE_TYPES.BinaryExpression: {
// check for "yoda" style logical: null != x
const { comparedExpression, comparedValue, isYoda } = (() => {
// non-yoda checks are by far the most common, so check for them first
const comparedValueRight = getComparisonValueType(operand.right);
if (comparedValueRight) {
return {
comparedExpression: operand.left,
comparedValue: comparedValueRight,
isYoda: false,
};
}
return {
comparedExpression: operand.right,
comparedValue: getComparisonValueType(operand.left),
isYoda: true,
};
})();
if (comparedValue === "UndefinedStringLiteral" /* ComparisonValueType.UndefinedStringLiteral */) {
if (comparedExpression.type === utils_1.AST_NODE_TYPES.UnaryExpression &&
comparedExpression.operator === 'typeof') {
const argument = comparedExpression.argument;
if (argument.type === utils_1.AST_NODE_TYPES.Identifier) {
const reference = sourceCode
.getScope(argument)
.references.find(ref => ref.identifier.name === argument.name);
if (!reference?.resolved?.defs.length) {
// typeof window === 'undefined'
result.push({ type: "Invalid" /* OperandValidity.Invalid */ });
continue;
}
}
// typeof x.y === 'undefined'
result.push({
type: "Valid" /* OperandValidity.Valid */,
comparedName: comparedExpression.argument,
comparisonType: operand.operator.startsWith('!')
? "NotStrictEqualUndefined" /* NullishComparisonType.NotStrictEqualUndefined */
: "StrictEqualUndefined" /* NullishComparisonType.StrictEqualUndefined */,
isYoda,
node: operand,
});
continue;
}
// y === 'undefined'
result.push({ type: "Invalid" /* OperandValidity.Invalid */ });
continue;
}
switch (operand.operator) {
case '!=':
case '==':
if (comparedValue === "Null" /* ComparisonValueType.Null */ ||
comparedValue === "Undefined" /* ComparisonValueType.Undefined */) {
// x == null, x == undefined
result.push({
type: "Valid" /* OperandValidity.Valid */,
comparedName: comparedExpression,
comparisonType: operand.operator.startsWith('!')
? "NotEqualNullOrUndefined" /* NullishComparisonType.NotEqualNullOrUndefined */
: "EqualNullOrUndefined" /* NullishComparisonType.EqualNullOrUndefined */,
isYoda,
node: operand,
});
continue;
}
// x == something :(
result.push({ type: "Invalid" /* OperandValidity.Invalid */ });
continue;
case '!==':
case '===': {
const comparedName = comparedExpression;
switch (comparedValue) {
case "Null" /* ComparisonValueType.Null */:
result.push({
type: "Valid" /* OperandValidity.Valid */,
comparedName,
comparisonType: operand.operator.startsWith('!')
? "NotStrictEqualNull" /* NullishComparisonType.NotStrictEqualNull */
: "StrictEqualNull" /* NullishComparisonType.StrictEqualNull */,
isYoda,
node: operand,
});
continue;
case "Undefined" /* ComparisonValueType.Undefined */:
result.push({
type: "Valid" /* OperandValidity.Valid */,
comparedName,
comparisonType: operand.operator.startsWith('!')
? "NotStrictEqualUndefined" /* NullishComparisonType.NotStrictEqualUndefined */
: "StrictEqualUndefined" /* NullishComparisonType.StrictEqualUndefined */,
isYoda,
node: operand,
});
continue;
default:
// x === something :(
result.push({ type: "Invalid" /* OperandValidity.Invalid */ });
continue;
}
}
}
result.push({ type: "Invalid" /* OperandValidity.Invalid */ });
continue;
}
case utils_1.AST_NODE_TYPES.UnaryExpression:
if (operand.operator === '!' &&
isValidFalseBooleanCheckType(operand.argument, areMoreOperands && node.operator === '||', parserServices, options)) {
result.push({
type: "Valid" /* OperandValidity.Valid */,
comparedName: operand.argument,
comparisonType: "NotBoolean" /* NullishComparisonType.NotBoolean */,
isYoda: false,
node: operand,
});
continue;
}
result.push({ type: "Invalid" /* OperandValidity.Invalid */ });
continue;
case utils_1.AST_NODE_TYPES.LogicalExpression:
// explicitly ignore the mixed logical expression cases
result.push({ type: "Invalid" /* OperandValidity.Invalid */ });
continue;
default:
if (isValidFalseBooleanCheckType(operand, areMoreOperands && node.operator === '&&', parserServices, options)) {
result.push({
type: "Valid" /* OperandValidity.Valid */,
comparedName: operand,
comparisonType: "Boolean" /* NullishComparisonType.Boolean */,
isYoda: false,
node: operand,
});
}
else {
result.push({ type: "Invalid" /* OperandValidity.Invalid */ });
}
continue;
}
}
return {
operands: result,
newlySeenLogicals,
};
/*
The AST is always constructed such the first element is always the deepest element.
I.e. for this code: `foo && foo.bar && foo.bar.baz && foo.bar.baz.buzz`
The AST will look like this:
{
left: {
left: {
left: foo
right: foo.bar
}
right: foo.bar.baz
}
right: foo.bar.baz.buzz
}
So given any logical expression, we can perform a depth-first traversal to get
the operands in order.
Note that this function purposely does not inspect mixed logical expressions
like `foo || foo.bar && foo.bar.baz` - separate selector
*/
function flattenLogicalOperands(node) {
const operands = [];
const newlySeenLogicals = new Set([node]);
const stack = [node.right, node.left];
let current;
while ((current = stack.pop())) {
if (current.type === utils_1.AST_NODE_TYPES.LogicalExpression &&
current.operator === node.operator) {
newlySeenLogicals.add(current);
stack.push(current.right);
stack.push(current.left);
}
else {
operands.push(current);
}
}
return {
operands,
newlySeenLogicals,
};
}
function getComparisonValueType(node) {
switch (node.type) {
case utils_1.AST_NODE_TYPES.Literal:
// eslint-disable-next-line eqeqeq -- intentional exact comparison against null
if (node.value === null && node.raw === 'null') {
return "Null" /* ComparisonValueType.Null */;
}
if (node.value === 'undefined') {
return "UndefinedStringLiteral" /* ComparisonValueType.UndefinedStringLiteral */;
}
return null;
case utils_1.AST_NODE_TYPES.Identifier:
if (node.name === 'undefined') {
return "Undefined" /* ComparisonValueType.Undefined */;
}
return null;
}
return null;
}
}
//# sourceMappingURL=gatherLogicalOperands.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"receipt-indian-rupee.js","sources":["../../../src/icons/receipt-indian-rupee.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ReceiptIndianRupee\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAydjIwbDItMSAyIDEgMi0xIDIgMSAyLTEgMiAxIDItMSAyIDFWMmwtMiAxLTItMS0yIDEtMi0xLTIgMS0yLTEtMiAxWiIgLz4KICA8cGF0aCBkPSJNOCA3aDgiIC8+CiAgPHBhdGggZD0iTTEyIDE3LjUgOCAxNWgxYTQgNCAwIDAgMCAwLTgiIC8+CiAgPHBhdGggZD0iTTggMTFoOCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/receipt-indian-rupee\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ReceiptIndianRupee = createLucideIcon('ReceiptIndianRupee', [\n [\n 'path',\n { d: 'M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z', key: 'q3az6g' },\n ],\n ['path', { d: 'M8 7h8', key: 'i86dvs' }],\n ['path', { d: 'M12 17.5 8 15h1a4 4 0 0 0 0-8', key: 'grpkl4' }],\n ['path', { d: 'M8 11h8', key: 'vwpz6n' }],\n]);\n\nexport default ReceiptIndianRupee;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqB,iBAAiB,oBAAsB,CAAA,CAAA,CAAA;AAAA,CAChE,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA2E,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAChG,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}

View File

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright 2022 Andrey Sitnik <andrey@sitnik.ru> and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1 @@
{"version":3,"names":["_importDeferProxy","init","ns","constValue","v","proxy","run","_target","p","receiver","Proxy","defineProperty","deleteProperty","get","Reflect","getOwnPropertyDescriptor","getPrototypeOf","isExtensible","has","ownKeys","preventExtensions","set","setPrototypeOf"],"sources":["../../src/helpers/importDeferProxy.ts"],"sourcesContent":["/* @minVersion 7.23.0 */\n\nexport default function _importDeferProxy<T extends object>(\n init: () => T,\n): ProxyHandler<T> {\n var ns: T | null = null;\n\n var constValue = function <V extends boolean | null>(v: V) {\n return function (): V {\n return v;\n };\n };\n\n var proxy = function (run: Function) {\n return function (_target: T, p?: string | symbol, receiver?: any) {\n if (ns === null) ns = init();\n return run(ns, p, receiver);\n };\n };\n\n return new Proxy(\n {},\n {\n defineProperty: constValue(false),\n deleteProperty: constValue(false),\n get: proxy(Reflect.get),\n getOwnPropertyDescriptor: proxy(Reflect.getOwnPropertyDescriptor),\n getPrototypeOf: constValue(null),\n isExtensible: constValue(false),\n has: proxy(Reflect.has),\n ownKeys: proxy(Reflect.ownKeys),\n preventExtensions: constValue(true),\n set: constValue(false),\n setPrototypeOf: constValue(false),\n },\n );\n}\n"],"mappings":";;;;;;AAEe,SAASA,iBAAiBA,CACvCC,IAAa,EACI;EACjB,IAAIC,EAAY,GAAG,IAAI;EAEvB,IAAIC,UAAU,GAAG,SAAAA,CAAoCC,CAAI,EAAE;IACzD,OAAO,YAAe;MACpB,OAAOA,CAAC;IACV,CAAC;EACH,CAAC;EAED,IAAIC,KAAK,GAAG,SAAAA,CAAUC,GAAa,EAAE;IACnC,OAAO,UAAUC,OAAU,EAAEC,CAAmB,EAAEC,QAAc,EAAE;MAChE,IAAIP,EAAE,KAAK,IAAI,EAAEA,EAAE,GAAGD,IAAI,CAAC,CAAC;MAC5B,OAAOK,GAAG,CAACJ,EAAE,EAAEM,CAAC,EAAEC,QAAQ,CAAC;IAC7B,CAAC;EACH,CAAC;EAED,OAAO,IAAIC,KAAK,CACd,CAAC,CAAC,EACF;IACEC,cAAc,EAAER,UAAU,CAAC,KAAK,CAAC;IACjCS,cAAc,EAAET,UAAU,CAAC,KAAK,CAAC;IACjCU,GAAG,EAAER,KAAK,CAACS,OAAO,CAACD,GAAG,CAAC;IACvBE,wBAAwB,EAAEV,KAAK,CAACS,OAAO,CAACC,wBAAwB,CAAC;IACjEC,cAAc,EAAEb,UAAU,CAAC,IAAI,CAAC;IAChCc,YAAY,EAAEd,UAAU,CAAC,KAAK,CAAC;IAC/Be,GAAG,EAAEb,KAAK,CAACS,OAAO,CAACI,GAAG,CAAC;IACvBC,OAAO,EAAEd,KAAK,CAACS,OAAO,CAACK,OAAO,CAAC;IAC/BC,iBAAiB,EAAEjB,UAAU,CAAC,IAAI,CAAC;IACnCkB,GAAG,EAAElB,UAAU,CAAC,KAAK,CAAC;IACtBmB,cAAc,EAAEnB,UAAU,CAAC,KAAK;EAClC,CACF,CAAC;AACH","ignoreList":[]}

View File

@ -0,0 +1,53 @@
{
"name": "object-hash",
"version": "3.0.0",
"description": "Generate hashes from javascript objects in node and the browser.",
"homepage": "https://github.com/puleos/object-hash",
"repository": {
"type": "git",
"url": "https://github.com/puleos/object-hash"
},
"keywords": [
"object",
"hash",
"sha1",
"md5"
],
"bugs": {
"url": "https://github.com/puleos/object-hash/issues"
},
"scripts": {
"test": "node ./node_modules/.bin/mocha test",
"prepublish": "gulp dist"
},
"author": "Scott Puleo <puleos@gmail.com>",
"files": [
"index.js",
"dist/object_hash.js"
],
"license": "MIT",
"devDependencies": {
"browserify": "^16.2.3",
"gulp": "^4.0.0",
"gulp-browserify": "^0.5.1",
"gulp-coveralls": "^0.1.4",
"gulp-exec": "^3.0.1",
"gulp-istanbul": "^1.1.3",
"gulp-jshint": "^2.0.0",
"gulp-mocha": "^5.0.0",
"gulp-rename": "^1.2.0",
"gulp-replace": "^1.0.0",
"gulp-uglify": "^3.0.0",
"jshint": "^2.8.0",
"jshint-stylish": "^2.1.0",
"karma": "^4.2.0",
"karma-chrome-launcher": "^2.2.0",
"karma-mocha": "^1.3.0",
"mocha": "^6.2.0"
},
"engines": {
"node": ">= 6"
},
"main": "./index.js",
"browser": "./dist/object_hash.js"
}

View File

@ -0,0 +1,42 @@
import type { AddedKeywordDefinition, AnySchemaObject, KeywordErrorCxt, KeywordCxtParams } from "../../types";
import type { SchemaCxt, SchemaObjCxt } from "..";
import { SubschemaArgs } from "./subschema";
import { Code, Name, CodeGen } from "../codegen";
import type { JSONType } from "../rules";
import { ErrorPaths } from "../errors";
export declare function validateFunctionCode(it: SchemaCxt): void;
export declare class KeywordCxt implements KeywordErrorCxt {
readonly gen: CodeGen;
readonly allErrors?: boolean;
readonly keyword: string;
readonly data: Name;
readonly $data?: string | false;
schema: any;
readonly schemaValue: Code | number | boolean;
readonly schemaCode: Code | number | boolean;
readonly schemaType: JSONType[];
readonly parentSchema: AnySchemaObject;
readonly errsCount?: Name;
params: KeywordCxtParams;
readonly it: SchemaObjCxt;
readonly def: AddedKeywordDefinition;
constructor(it: SchemaObjCxt, def: AddedKeywordDefinition, keyword: string);
result(condition: Code, successAction?: () => void, failAction?: () => void): void;
failResult(condition: Code, successAction?: () => void, failAction?: () => void): void;
pass(condition: Code, failAction?: () => void): void;
fail(condition?: Code): void;
fail$data(condition: Code): void;
error(append?: boolean, errorParams?: KeywordCxtParams, errorPaths?: ErrorPaths): void;
private _error;
$dataError(): void;
reset(): void;
ok(cond: Code | boolean): void;
setParams(obj: KeywordCxtParams, assign?: true): void;
block$data(valid: Name, codeBlock: () => void, $dataValid?: Code): void;
check$data(valid?: Name, $dataValid?: Code): void;
invalid$data(): Code;
subschema(appl: SubschemaArgs, valid: Name, isAllOfVariant?: boolean): SchemaCxt;
mergeEvaluated(schemaCxt: SchemaCxt, toName?: typeof Name): void;
mergeValidEvaluated(schemaCxt: SchemaCxt, valid: Name): boolean | void;
}
export declare function getData($data: string, { dataLevel, dataNames, dataPathArr }: SchemaCxt): Code | number;

View File

@ -0,0 +1 @@
{"version":3,"file":"square-terminal.js","sources":["../../../src/icons/square-terminal.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareTerminal\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNyAxMSAyLTItMi0yIiAvPgogIDxwYXRoIGQ9Ik0xMSAxM2g0IiAvPgogIDxyZWN0IHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgeD0iMyIgeT0iMyIgcng9IjIiIHJ5PSIyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/square-terminal\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst SquareTerminal = createLucideIcon('SquareTerminal', [\n ['path', { d: 'm7 11 2-2-2-2', key: '1lz0vl' }],\n ['path', { d: 'M11 13h4', key: '1p7l4v' }],\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', ry: '2', key: '1m3agn' }],\n]);\n\nexport default SquareTerminal;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA;AACzF,CAAC,CAAA,CAAA;;"}

View File

@ -0,0 +1,174 @@
/**
* @fileoverview Rule to flag statements that use != and == instead of !== and ===
* @author Nicholas C. Zakas
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Require the use of `===` and `!==`",
recommended: false,
url: "https://eslint.org/docs/latest/rules/eqeqeq"
},
schema: {
anyOf: [
{
type: "array",
items: [
{
enum: ["always"]
},
{
type: "object",
properties: {
null: {
enum: ["always", "never", "ignore"]
}
},
additionalProperties: false
}
],
additionalItems: false
},
{
type: "array",
items: [
{
enum: ["smart", "allow-null"]
}
],
additionalItems: false
}
]
},
fixable: "code",
messages: {
unexpected: "Expected '{{expectedOperator}}' and instead saw '{{actualOperator}}'."
}
},
create(context) {
const config = context.options[0] || "always";
const options = context.options[1] || {};
const sourceCode = context.sourceCode;
const nullOption = (config === "always")
? options.null || "always"
: "ignore";
const enforceRuleForNull = (nullOption === "always");
const enforceInverseRuleForNull = (nullOption === "never");
/**
* Checks if an expression is a typeof expression
* @param {ASTNode} node The node to check
* @returns {boolean} if the node is a typeof expression
*/
function isTypeOf(node) {
return node.type === "UnaryExpression" && node.operator === "typeof";
}
/**
* Checks if either operand of a binary expression is a typeof operation
* @param {ASTNode} node The node to check
* @returns {boolean} if one of the operands is typeof
* @private
*/
function isTypeOfBinary(node) {
return isTypeOf(node.left) || isTypeOf(node.right);
}
/**
* Checks if operands are literals of the same type (via typeof)
* @param {ASTNode} node The node to check
* @returns {boolean} if operands are of same type
* @private
*/
function areLiteralsAndSameType(node) {
return node.left.type === "Literal" && node.right.type === "Literal" &&
typeof node.left.value === typeof node.right.value;
}
/**
* Checks if one of the operands is a literal null
* @param {ASTNode} node The node to check
* @returns {boolean} if operands are null
* @private
*/
function isNullCheck(node) {
return astUtils.isNullLiteral(node.right) || astUtils.isNullLiteral(node.left);
}
/**
* Reports a message for this rule.
* @param {ASTNode} node The binary expression node that was checked
* @param {string} expectedOperator The operator that was expected (either '==', '!=', '===', or '!==')
* @returns {void}
* @private
*/
function report(node, expectedOperator) {
const operatorToken = sourceCode.getFirstTokenBetween(
node.left,
node.right,
token => token.value === node.operator
);
context.report({
node,
loc: operatorToken.loc,
messageId: "unexpected",
data: { expectedOperator, actualOperator: node.operator },
fix(fixer) {
// If the comparison is a `typeof` comparison or both sides are literals with the same type, then it's safe to fix.
if (isTypeOfBinary(node) || areLiteralsAndSameType(node)) {
return fixer.replaceText(operatorToken, expectedOperator);
}
return null;
}
});
}
return {
BinaryExpression(node) {
const isNull = isNullCheck(node);
if (node.operator !== "==" && node.operator !== "!=") {
if (enforceInverseRuleForNull && isNull) {
report(node, node.operator.slice(0, -1));
}
return;
}
if (config === "smart" && (isTypeOfBinary(node) ||
areLiteralsAndSameType(node) || isNull)) {
return;
}
if (!enforceRuleForNull && isNull) {
return;
}
report(node, `${node.operator}=`);
}
};
}
};

View File

@ -0,0 +1,162 @@
"use strict";
// adapted from https://github.com/eslint/eslint/blob/5bdaae205c3a0089ea338b382df59e21d5b06436/lib/rules/utils/ast-utils.js#L1668-L1787
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFunctionHeadLoc = getFunctionHeadLoc;
const utils_1 = require("@typescript-eslint/utils");
const astUtils_1 = require("./astUtils");
/**
* Gets the `(` token of the given function node.
* @param node The function node to get.
* @param sourceCode The source code object to get tokens.
* @returns `(` token.
*/
function getOpeningParenOfParams(node, sourceCode) {
// If the node is an arrow function and doesn't have parens, this returns the identifier of the first param.
if (node.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression &&
node.params.length === 1) {
const argToken = utils_1.ESLintUtils.nullThrows(sourceCode.getFirstToken(node.params[0]), utils_1.ESLintUtils.NullThrowsReasons.MissingToken('parameter', 'arrow function'));
const maybeParenToken = sourceCode.getTokenBefore(argToken);
return maybeParenToken && (0, astUtils_1.isOpeningParenToken)(maybeParenToken)
? maybeParenToken
: argToken;
}
// Otherwise, returns paren.
return node.id != null
? utils_1.ESLintUtils.nullThrows(sourceCode.getTokenAfter(node.id, astUtils_1.isOpeningParenToken), utils_1.ESLintUtils.NullThrowsReasons.MissingToken('id', 'function'))
: utils_1.ESLintUtils.nullThrows(sourceCode.getFirstToken(node, astUtils_1.isOpeningParenToken), utils_1.ESLintUtils.NullThrowsReasons.MissingToken('opening parenthesis', 'function'));
}
/**
* Gets the location of the given function node for reporting.
*
* - `function foo() {}`
* ^^^^^^^^^^^^
* - `(function foo() {})`
* ^^^^^^^^^^^^
* - `(function() {})`
* ^^^^^^^^
* - `function* foo() {}`
* ^^^^^^^^^^^^^
* - `(function* foo() {})`
* ^^^^^^^^^^^^^
* - `(function*() {})`
* ^^^^^^^^^
* - `() => {}`
* ^^
* - `async () => {}`
* ^^
* - `({ foo: function foo() {} })`
* ^^^^^^^^^^^^^^^^^
* - `({ foo: function() {} })`
* ^^^^^^^^^^^^^
* - `({ ['foo']: function() {} })`
* ^^^^^^^^^^^^^^^^^
* - `({ [foo]: function() {} })`
* ^^^^^^^^^^^^^^^
* - `({ foo() {} })`
* ^^^
* - `({ foo: function* foo() {} })`
* ^^^^^^^^^^^^^^^^^^
* - `({ foo: function*() {} })`
* ^^^^^^^^^^^^^^
* - `({ ['foo']: function*() {} })`
* ^^^^^^^^^^^^^^^^^^
* - `({ [foo]: function*() {} })`
* ^^^^^^^^^^^^^^^^
* - `({ *foo() {} })`
* ^^^^
* - `({ foo: async function foo() {} })`
* ^^^^^^^^^^^^^^^^^^^^^^^
* - `({ foo: async function() {} })`
* ^^^^^^^^^^^^^^^^^^^
* - `({ ['foo']: async function() {} })`
* ^^^^^^^^^^^^^^^^^^^^^^^
* - `({ [foo]: async function() {} })`
* ^^^^^^^^^^^^^^^^^^^^^
* - `({ async foo() {} })`
* ^^^^^^^^^
* - `({ get foo() {} })`
* ^^^^^^^
* - `({ set foo(a) {} })`
* ^^^^^^^
* - `class A { constructor() {} }`
* ^^^^^^^^^^^
* - `class A { foo() {} }`
* ^^^
* - `class A { *foo() {} }`
* ^^^^
* - `class A { async foo() {} }`
* ^^^^^^^^^
* - `class A { ['foo']() {} }`
* ^^^^^^^
* - `class A { *['foo']() {} }`
* ^^^^^^^^
* - `class A { async ['foo']() {} }`
* ^^^^^^^^^^^^^
* - `class A { [foo]() {} }`
* ^^^^^
* - `class A { *[foo]() {} }`
* ^^^^^^
* - `class A { async [foo]() {} }`
* ^^^^^^^^^^^
* - `class A { get foo() {} }`
* ^^^^^^^
* - `class A { set foo(a) {} }`
* ^^^^^^^
* - `class A { static foo() {} }`
* ^^^^^^^^^^
* - `class A { static *foo() {} }`
* ^^^^^^^^^^^
* - `class A { static async foo() {} }`
* ^^^^^^^^^^^^^^^^
* - `class A { static get foo() {} }`
* ^^^^^^^^^^^^^^
* - `class A { static set foo(a) {} }`
* ^^^^^^^^^^^^^^
* - `class A { foo = function() {} }`
* ^^^^^^^^^^^^^^
* - `class A { static foo = function() {} }`
* ^^^^^^^^^^^^^^^^^^^^^
* - `class A { foo = (a, b) => {} }`
* ^^^^^^
* @param node The function node to get.
* @param sourceCode The source code object to get tokens.
* @returns The location of the function node for reporting.
*/
function getFunctionHeadLoc(node, sourceCode) {
const parent = node.parent;
let start = null;
let end = null;
if (parent.type === utils_1.AST_NODE_TYPES.MethodDefinition ||
parent.type === utils_1.AST_NODE_TYPES.PropertyDefinition) {
// the decorator's range is included within the member
// however it's usually irrelevant to the member itself - so we don't want
// to highlight it ever.
if (parent.decorators.length > 0) {
const lastDecorator = parent.decorators[parent.decorators.length - 1];
const firstTokenAfterDecorator = utils_1.ESLintUtils.nullThrows(sourceCode.getTokenAfter(lastDecorator), utils_1.ESLintUtils.NullThrowsReasons.MissingToken('modifier or member name', 'class member'));
start = firstTokenAfterDecorator.loc.start;
}
else {
start = parent.loc.start;
}
end = getOpeningParenOfParams(node, sourceCode).loc.start;
}
else if (parent.type === utils_1.AST_NODE_TYPES.Property) {
start = parent.loc.start;
end = getOpeningParenOfParams(node, sourceCode).loc.start;
}
else if (node.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression) {
const arrowToken = utils_1.ESLintUtils.nullThrows(sourceCode.getTokenBefore(node.body, astUtils_1.isArrowToken), utils_1.ESLintUtils.NullThrowsReasons.MissingToken('arrow token', 'arrow function'));
start = arrowToken.loc.start;
end = arrowToken.loc.end;
}
else {
start = node.loc.start;
end = getOpeningParenOfParams(node, sourceCode).loc.start;
}
return {
start: { ...start },
end: { ...end },
};
}
//# sourceMappingURL=getFunctionHeadLoc.js.map

View File

@ -0,0 +1 @@
{"version":3,"names":["_deepArray","require","Plugin","constructor","plugin","options","key","externalDependencies","finalize","manipulateOptions","post","pre","visitor","parserOverride","generatorOverride","name","exports","default"],"sources":["../../src/config/plugin.ts"],"sourcesContent":["import { finalize } from \"./helpers/deep-array.ts\";\nimport type { ReadonlyDeepArray } from \"./helpers/deep-array.ts\";\nimport type { PluginObject } from \"./validation/plugins.ts\";\n\nexport default class Plugin {\n key: string | undefined | null;\n manipulateOptions?: PluginObject[\"manipulateOptions\"];\n post?: PluginObject[\"post\"];\n pre?: PluginObject[\"pre\"];\n visitor: PluginObject[\"visitor\"];\n\n parserOverride?: PluginObject[\"parserOverride\"];\n generatorOverride?: PluginObject[\"generatorOverride\"];\n\n options: object;\n\n externalDependencies: ReadonlyDeepArray<string>;\n\n constructor(\n plugin: PluginObject,\n options: object,\n key?: string,\n externalDependencies: ReadonlyDeepArray<string> = finalize([]),\n ) {\n this.key = plugin.name || key;\n\n this.manipulateOptions = plugin.manipulateOptions;\n this.post = plugin.post;\n this.pre = plugin.pre;\n this.visitor = plugin.visitor || {};\n this.parserOverride = plugin.parserOverride;\n this.generatorOverride = plugin.generatorOverride;\n\n this.options = options;\n this.externalDependencies = externalDependencies;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAIe,MAAMC,MAAM,CAAC;EAc1BC,WAAWA,CACTC,MAAoB,EACpBC,OAAe,EACfC,GAAY,EACZC,oBAA+C,GAAG,IAAAC,mBAAQ,EAAC,EAAE,CAAC,EAC9D;IAAA,KAlBFF,GAAG;IAAA,KACHG,iBAAiB;IAAA,KACjBC,IAAI;IAAA,KACJC,GAAG;IAAA,KACHC,OAAO;IAAA,KAEPC,cAAc;IAAA,KACdC,iBAAiB;IAAA,KAEjBT,OAAO;IAAA,KAEPE,oBAAoB;IAQlB,IAAI,CAACD,GAAG,GAAGF,MAAM,CAACW,IAAI,IAAIT,GAAG;IAE7B,IAAI,CAACG,iBAAiB,GAAGL,MAAM,CAACK,iBAAiB;IACjD,IAAI,CAACC,IAAI,GAAGN,MAAM,CAACM,IAAI;IACvB,IAAI,CAACC,GAAG,GAAGP,MAAM,CAACO,GAAG;IACrB,IAAI,CAACC,OAAO,GAAGR,MAAM,CAACQ,OAAO,IAAI,CAAC,CAAC;IACnC,IAAI,CAACC,cAAc,GAAGT,MAAM,CAACS,cAAc;IAC3C,IAAI,CAACC,iBAAiB,GAAGV,MAAM,CAACU,iBAAiB;IAEjD,IAAI,CAACT,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACE,oBAAoB,GAAGA,oBAAoB;EAClD;AACF;AAACS,OAAA,CAAAC,OAAA,GAAAf,MAAA;AAAA","ignoreList":[]}

View File

@ -0,0 +1,4 @@
import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment.mts';
export type Source = ReverseSegment[][];
export default function buildBySources(decoded: readonly SourceMapSegment[][], memos: unknown[]): Source[];
//# sourceMappingURL=by-source.d.ts.map

View File

@ -0,0 +1,41 @@
function stringifyNode(node, custom) {
var type = node.type
var value = node.value
var buf
var customResult
if (custom && (customResult = custom(node)) !== undefined) {
return customResult
} else if (type === 'word' || type === 'space') {
return value
} else if (type === 'string') {
buf = node.quote || ''
return buf + value + (node.unclosed ? '' : buf)
} else if (type === 'comment') {
return '/*' + value + (node.unclosed ? '' : '*/')
} else if (type === 'div') {
return (node.before || '') + value + (node.after || '')
} else if (Array.isArray(node.nodes)) {
buf = stringify(node.nodes, custom)
if (type !== 'function') {
return buf
}
return value + '(' + (node.before || '') + buf + (node.after || '') + (node.unclosed ? '' : ')')
}
return value
}
function stringify(nodes, custom) {
var result, i
if (Array.isArray(nodes)) {
result = ''
for (i = nodes.length - 1; ~i; i -= 1) {
result = stringifyNode(nodes[i], custom) + result
}
return result
}
return stringifyNode(nodes, custom)
}
module.exports = stringify

View File

@ -0,0 +1,245 @@
import { outdent } from 'outdent';
import { lintDoc } from './utils';
describe('OpenAPI Schema', () => {
it('should not report if Path object is valid ', async () => {
const source = outdent`
swagger: '2.0'
info:
title: Test
version: '1.0'
paths:
'/ping':
get:
responses:
'200':
description: example description
`;
expect(
await lintDoc(source, {
spec: 'error',
})
).toMatchInlineSnapshot(`[]`);
});
it('should not report if Path object is empty ', async () => {
const source = outdent`
swagger: '2.0'
info:
title: Test
version: '1.0'
paths: {}
`;
expect(
await lintDoc(source, {
spec: 'error',
})
).toMatchInlineSnapshot(`[]`);
});
it('should report if Path object is not present ', async () => {
const source = outdent`
swagger: '2.0'
info:
title: Test
version: '1.0'
`;
expect(
await lintDoc(source, {
spec: 'error',
})
).toMatchInlineSnapshot(`
[
{
"location": "#/",
"message": "The field \`paths\` must be present on this level.",
},
]
`);
});
it('should not report if Path object is empty ', async () => {
const source = outdent`
swagger: '2.0'
info:
title: Test
version: '1.0'
paths: {}
`;
expect(
await lintDoc(source, {
spec: 'error',
})
).toMatchInlineSnapshot(`[]`);
});
//Check: no error
it('should report if the field name is not begin with a forward slash (/) ', async () => {
const source = outdent`
swagger: '2.0'
info:
title: Test
version: '1.0'
paths:
'ping':
get:
responses:
'200':
description: example description
`;
expect(
await lintDoc(source, {
spec: 'error',
})
).toMatchInlineSnapshot(`
[
{
"location": "#/paths/ping",
"message": "Property \`ping\` is not expected here.",
},
]
`);
});
it('should report if paths are considered identical and invalid', async () => {
const source = outdent`
swagger: '2.0'
info:
title: Test
version: '1.0'
paths:
/pets/{petId}:
get:
responses:
'200':
description: example description
/pets/{name}:
get:
responses:
'200':
description: example description
`;
expect(
await lintDoc(source, {
'paths-identical': 'error',
})
).toMatchInlineSnapshot(`[]`);
});
it('should not report valid matching URLs', async () => {
const source = outdent`
swagger: '2.0'
info:
title: Test
version: '1.0'
paths:
'/pets/{petId}':
get:
responses:
'200':
description: example description
'/pets/mine':
get:
responses:
'200':
description: example description
`;
expect(
await lintDoc(source, {
spec: 'error',
})
).toMatchInlineSnapshot(`[]`);
});
it('should not report in case of ambiguous matching ', async () => {
const source = outdent`
swagger: '2.0'
info:
title: Test
version: '1.0'
paths:
'/{entity}/me':
get:
responses:
'200':
description: example description
'/books/{id}':
get:
responses:
'200':
description: example description
`;
expect(
await lintDoc(source, {
spec: 'error',
})
).toMatchInlineSnapshot(`[]`);
});
it('should not report if Path Item is empty ', async () => {
const source = outdent`
swagger: '2.0'
info:
title: Test
version: '1.0'
paths:
'/ping': {}
`;
expect(
await lintDoc(source, {
spec: 'error',
})
).toMatchInlineSnapshot(`[]`);
});
it('should not report of a valid Parameter Object', async () => {
const source = outdent`
swagger: '2.0'
info:
title: Test
version: '1.0'
paths:
/pet:
parameters:
- name: Accept-Language
in: header
description: "test"
required: false
type: string
default: en-AU
post:
tags:
- pet
summary: Add a new pet to the store
description: Add new pet to the store inventory.
operationId: addPet
responses:
'405':
description: Invalid input
`;
expect(
await lintDoc(source, {
spec: 'error',
})
).toMatchInlineSnapshot(`[]`);
});
});

View File

@ -0,0 +1 @@
{"version":3,"file":"car-taxi-front.js","sources":["../../../src/icons/car-taxi-front.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CarTaxiFront\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAgMmg0IiAvPgogIDxwYXRoIGQ9Im0yMSA4LTIgMi0xLjUtMy43QTIgMiAwIDAgMCAxNS42NDYgNUg4LjRhMiAyIDAgMCAwLTEuOTAzIDEuMjU3TDUgMTAgMyA4IiAvPgogIDxwYXRoIGQ9Ik03IDE0aC4wMSIgLz4KICA8cGF0aCBkPSJNMTcgMTRoLjAxIiAvPgogIDxyZWN0IHdpZHRoPSIxOCIgaGVpZ2h0PSI4IiB4PSIzIiB5PSIxMCIgcng9IjIiIC8+CiAgPHBhdGggZD0iTTUgMTh2MiIgLz4KICA8cGF0aCBkPSJNMTkgMTh2MiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/car-taxi-front\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CarTaxiFront = createLucideIcon('CarTaxiFront', [\n ['path', { d: 'M10 2h4', key: 'n1abiw' }],\n [\n 'path',\n { d: 'm21 8-2 2-1.5-3.7A2 2 0 0 0 15.646 5H8.4a2 2 0 0 0-1.903 1.257L5 10 3 8', key: '1imjwt' },\n ],\n ['path', { d: 'M7 14h.01', key: '1qa3f1' }],\n ['path', { d: 'M17 14h.01', key: '7oqj8z' }],\n ['rect', { width: '18', height: '8', x: '3', y: '10', rx: '2', key: 'a7itu8' }],\n ['path', { d: 'M5 18v2', key: 'ppbyun' }],\n ['path', { d: 'M19 18v2', key: 'gy7782' }],\n]);\n\nexport default CarTaxiFront;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACxC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA2E,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAChG,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

@ -0,0 +1 @@
{"version":3,"file":"music.js","sources":["../../../src/icons/music.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Music\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOSAxOFY1bDEyLTJ2MTMiIC8+CiAgPGNpcmNsZSBjeD0iNiIgY3k9IjE4IiByPSIzIiAvPgogIDxjaXJjbGUgY3g9IjE4IiBjeT0iMTYiIHI9IjMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/music\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Music = createLucideIcon('Music', [\n ['path', { d: 'M9 18V5l12-2v13', key: '1jmyc2' }],\n ['circle', { cx: '6', cy: '18', r: '3', key: 'fqmcym' }],\n ['circle', { cx: '18', cy: '16', r: '3', key: '1hluhg' }],\n]);\n\nexport default Music;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAChD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACvD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}

View File

@ -0,0 +1 @@
{"version":3,"file":"volume-2.js","sources":["../../../src/icons/volume-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Volume2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cG9seWdvbiBwb2ludHM9IjExIDUgNiA5IDIgOSAyIDE1IDYgMTUgMTEgMTkgMTEgNSIgLz4KICA8cGF0aCBkPSJNMTUuNTQgOC40NmE1IDUgMCAwIDEgMCA3LjA3IiAvPgogIDxwYXRoIGQ9Ik0xOS4wNyA0LjkzYTEwIDEwIDAgMCAxIDAgMTQuMTQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/volume-2\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Volume2 = createLucideIcon('Volume2', [\n ['polygon', { points: '11 5 6 9 2 9 2 15 6 15 11 19 11 5', key: '16drj5' }],\n ['path', { d: 'M15.54 8.46a5 5 0 0 1 0 7.07', key: 'ltjumu' }],\n ['path', { d: 'M19.07 4.93a10 10 0 0 1 0 14.14', key: '1kegas' }],\n]);\n\nexport default Volume2;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAqC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAClE,CAAC,CAAA,CAAA;;"}

View File

@ -0,0 +1,115 @@
/**
* @fileoverview disallow unnecessary concatenation of template strings
* @author Henry Zhu
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Checks whether or not a given node is a concatenation.
* @param {ASTNode} node A node to check.
* @returns {boolean} `true` if the node is a concatenation.
*/
function isConcatenation(node) {
return node.type === "BinaryExpression" && node.operator === "+";
}
/**
* Checks if the given token is a `+` token or not.
* @param {Token} token The token to check.
* @returns {boolean} `true` if the token is a `+` token.
*/
function isConcatOperatorToken(token) {
return token.value === "+" && token.type === "Punctuator";
}
/**
* Get's the right most node on the left side of a BinaryExpression with + operator.
* @param {ASTNode} node A BinaryExpression node to check.
* @returns {ASTNode} node
*/
function getLeft(node) {
let left = node.left;
while (isConcatenation(left)) {
left = left.right;
}
return left;
}
/**
* Get's the left most node on the right side of a BinaryExpression with + operator.
* @param {ASTNode} node A BinaryExpression node to check.
* @returns {ASTNode} node
*/
function getRight(node) {
let right = node.right;
while (isConcatenation(right)) {
right = right.left;
}
return right;
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Disallow unnecessary concatenation of literals or template literals",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-useless-concat"
},
schema: [],
messages: {
unexpectedConcat: "Unexpected string concatenation of literals."
}
},
create(context) {
const sourceCode = context.sourceCode;
return {
BinaryExpression(node) {
// check if not concatenation
if (node.operator !== "+") {
return;
}
// account for the `foo + "a" + "b"` case
const left = getLeft(node);
const right = getRight(node);
if (astUtils.isStringLiteral(left) &&
astUtils.isStringLiteral(right) &&
astUtils.isTokenOnSameLine(left, right)
) {
const operatorToken = sourceCode.getFirstTokenBetween(left, right, isConcatOperatorToken);
context.report({
node,
loc: operatorToken.loc,
messageId: "unexpectedConcat"
});
}
}
};
}
};

View File

@ -0,0 +1,37 @@
{
"name": "gensync",
"version": "1.0.0-beta.2",
"license": "MIT",
"description": "Allows users to use generators in order to write common functions that can be both sync or async.",
"main": "index.js",
"author": "Logan Smyth <loganfsmyth@gmail.com>",
"homepage": "https://github.com/loganfsmyth/gensync",
"repository": {
"type": "git",
"url": "https://github.com/loganfsmyth/gensync.git"
},
"scripts": {
"test": "jest"
},
"engines": {
"node": ">=6.9.0"
},
"keywords": [
"async",
"sync",
"generators",
"async-await",
"callbacks"
],
"devDependencies": {
"babel-core": "^6.26.3",
"babel-preset-env": "^1.6.1",
"eslint": "^4.19.1",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-prettier": "^2.6.0",
"flow-bin": "^0.71.0",
"jest": "^22.4.3",
"prettier": "^1.12.1"
}
}

View File

@ -0,0 +1 @@
{"name":"path-is-absolute","version":"1.0.1","requiresBuild":false,"files":{"package.json":{"checkedAt":1771921292624,"integrity":"sha512-IhelNAiFepmsncBcCbBVWAif1Lx0UBSERSv1E+8QCCWdnpWI7oJGVATNE+CTEFppMsG3erLUQwLA5Kq+AkXS5A==","mode":420,"size":733},"index.js":{"checkedAt":1771921292625,"integrity":"sha512-qBuLyosHHR1rhtuGeoMlKMX7ZVB6Gi5vw5MGrb09eV2pMqxzvie799SW9wJC8H3FhlcDPSyp2FtSDCfAHpMiwg==","mode":420,"size":611},"license":{"checkedAt":1771921292183,"integrity":"sha512-rnnnpCCaRRrva3j3sLiBcOeiIzUSasNFUiv06v4IGNpYZarhUHxdwCJO+FRUjHId+ahDcYIvNtUMvNl/qUbu6Q==","mode":420,"size":1119},"readme.md":{"checkedAt":1771921292625,"integrity":"sha512-65TCpQkvWIw4kunpD3lsF3BE+63v1D5pUd3H7bDqAtygIuAdV6Fuf+Q+h3gF2T1hDk/C5+GBaM8n00+BiNv9EA==","mode":420,"size":1153}}}

View File

@ -0,0 +1,33 @@
type Key = string | number | symbol;
/**
* SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the
* index of the `key` in the backing array.
*
* This is designed to allow synchronizing a second array with the contents of the backing array,
* like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,
* and there are never duplicates.
*/
export declare class SetArray<T extends Key = Key> {
private _indexes;
array: readonly T[];
constructor();
}
/**
* Gets the index associated with `key` in the backing array, if it is already present.
*/
export declare function get<T extends Key>(setarr: SetArray<T>, key: T): number | undefined;
/**
* Puts `key` into the backing array, if it is not already present. Returns
* the index of the `key` in the backing array.
*/
export declare function put<T extends Key>(setarr: SetArray<T>, key: T): number;
/**
* Pops the last added item out of the SetArray.
*/
export declare function pop<T extends Key>(setarr: SetArray<T>): void;
/**
* Removes the key, if it exists in the set.
*/
export declare function remove<T extends Key>(setarr: SetArray<T>, key: T): void;
export {};
//# sourceMappingURL=set-array.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"database.js","sources":["../../../src/icons/database.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Database\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8ZWxsaXBzZSBjeD0iMTIiIGN5PSI1IiByeD0iOSIgcnk9IjMiIC8+CiAgPHBhdGggZD0iTTMgNVYxOUE5IDMgMCAwIDAgMjEgMTlWNSIgLz4KICA8cGF0aCBkPSJNMyAxMkE5IDMgMCAwIDAgMjEgMTIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/database\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Database = createLucideIcon('Database', [\n ['ellipse', { cx: '12', cy: '5', rx: '9', ry: '3', key: 'msslwz' }],\n ['path', { d: 'M3 5V19A9 3 0 0 0 21 19V5', key: '1wlel7' }],\n ['path', { d: 'M3 12A9 3 0 0 0 21 12', key: 'mv7ke4' }],\n]);\n\nexport default Database;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAClE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAyB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACxD,CAAC,CAAA,CAAA;;"}

View File

@ -0,0 +1,18 @@
/**
* @license lucide-react v0.395.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CloudRainWind = createLucideIcon("CloudRainWind", [
["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242", key: "1pljnt" }],
["path", { d: "m9.2 22 3-7", key: "sb5f6j" }],
["path", { d: "m9 13-3 7", key: "500co5" }],
["path", { d: "m17 13-3 7", key: "8t2fiy" }]
]);
export { CloudRainWind as default };
//# sourceMappingURL=cloud-rain-wind.js.map

View File

@ -0,0 +1,461 @@
import * as fs from 'fs';
import * as path from 'path';
import {
isRef,
joinPointer,
escapePointer,
parseRef,
isAbsoluteUrl,
isAnchor,
isExternalValue,
} from './ref-utils';
import { isNamedType, SpecExtension } from './types';
import { readFileFromUrl, parseYaml, nextTick } from './utils';
import type { YAMLNode, LoadOptions } from 'yaml-ast-parser';
import type { NormalizedNodeType } from './types';
import type { ResolveConfig } from './config/types';
import type { OasRef } from './typings/openapi';
export type CollectedRefs = Map<string /* absoluteFilePath */, Document>;
export class Source {
constructor(public absoluteRef: string, public body: string, public mimeType?: string) {}
private _ast: YAMLNode | undefined;
private _lines: string[] | undefined;
// pass safeLoad as argument to separate it from browser bundle
getAst(safeLoad: (input: string, options?: LoadOptions | undefined) => YAMLNode) {
if (this._ast === undefined) {
this._ast = safeLoad(this.body, { filename: this.absoluteRef }) ?? undefined;
// fix ast representation of file with newlines only
if (
this._ast &&
this._ast.kind === 0 && // KIND.scalar = 0
this._ast.value === '' &&
this._ast.startPosition !== 1
) {
this._ast.startPosition = 1;
this._ast.endPosition = 1;
}
}
return this._ast;
}
getLines() {
if (this._lines === undefined) {
this._lines = this.body.split(/\r\n|[\n\r]/g);
}
return this._lines;
}
}
export class ResolveError extends Error {
constructor(public originalError: Error) {
super(originalError.message);
// Set the prototype explicitly.
Object.setPrototypeOf(this, ResolveError.prototype);
}
}
const jsYamlErrorLineColRegexp = /\((\d+):(\d+)\)$/;
export class YamlParseError extends Error {
col: number;
line: number;
constructor(public originalError: Error, public source: Source) {
super(originalError.message.split('\n')[0]);
// Set the prototype explicitly.
Object.setPrototypeOf(this, YamlParseError.prototype);
const [, line, col] = this.message.match(jsYamlErrorLineColRegexp) || [];
this.line = parseInt(line, 10);
this.col = parseInt(col, 10);
}
}
export type Document = {
source: Source;
parsed: any;
};
export function makeRefId(absoluteRef: string, pointer: string) {
return absoluteRef + '::' + pointer;
}
export function makeDocumentFromString(sourceString: string, absoluteRef: string) {
const source = new Source(absoluteRef, sourceString);
try {
return {
source,
parsed: parseYaml(sourceString, { filename: absoluteRef }),
};
} catch (e) {
throw new YamlParseError(e, source);
}
}
export class BaseResolver {
cache: Map<string, Promise<Document | ResolveError>> = new Map();
constructor(protected config: ResolveConfig = { http: { headers: [] } }) {}
getFiles() {
return new Set(Array.from(this.cache.keys()));
}
resolveExternalRef(base: string | null, ref: string): string {
if (isAbsoluteUrl(ref)) {
return ref;
}
if (base && isAbsoluteUrl(base)) {
return new URL(ref, base).href;
}
return path.resolve(base ? path.dirname(base) : process.cwd(), ref);
}
async loadExternalRef(absoluteRef: string): Promise<Source> {
try {
if (isAbsoluteUrl(absoluteRef)) {
const { body, mimeType } = await readFileFromUrl(absoluteRef, this.config.http);
return new Source(absoluteRef, body, mimeType);
} else {
if (fs.lstatSync(absoluteRef).isDirectory()) {
throw new Error(`Expected a file but received a folder at ${absoluteRef}.`);
}
const content = await fs.promises.readFile(absoluteRef, 'utf-8');
// In some cases file have \r\n line delimeters like on windows, we should skip it.
return new Source(absoluteRef, content.replace(/\r\n/g, '\n'));
}
} catch (error) {
error.message = error.message.replace(', lstat', '');
throw new ResolveError(error);
}
}
parseDocument(source: Source, isRoot: boolean = false): Document {
const ext = source.absoluteRef.substr(source.absoluteRef.lastIndexOf('.'));
if (
!['.json', '.json', '.yml', '.yaml'].includes(ext) &&
!source.mimeType?.match(/(json|yaml|openapi)/) &&
!isRoot // always parse root
) {
return { source, parsed: source.body };
}
try {
return {
source,
parsed: parseYaml(source.body, { filename: source.absoluteRef }),
};
} catch (e) {
throw new YamlParseError(e, source);
}
}
async resolveDocument(
base: string | null,
ref: string,
isRoot: boolean = false
): Promise<Document | ResolveError | YamlParseError> {
const absoluteRef = this.resolveExternalRef(base, ref);
const cachedDocument = this.cache.get(absoluteRef);
if (cachedDocument) {
return cachedDocument;
}
const doc = this.loadExternalRef(absoluteRef).then((source) => {
return this.parseDocument(source, isRoot);
});
this.cache.set(absoluteRef, doc);
return doc;
}
}
export type ResolvedRef =
| {
resolved: false;
isRemote: boolean;
nodePointer?: string;
document?: Document;
source?: Source;
error?: ResolveError | YamlParseError;
node?: any;
}
| {
resolved: true;
node: any;
document: Document;
nodePointer: string;
isRemote: boolean;
error?: undefined;
};
export type ResolvedRefMap = Map<string, ResolvedRef>;
type RefFrame = {
prev: RefFrame | null;
node: any;
};
function pushRef(head: RefFrame, node: any): RefFrame {
return {
prev: head,
node,
};
}
function hasRef(head: RefFrame | null, node: any): boolean {
while (head) {
if (head.node === node) {
return true;
}
head = head.prev;
}
return false;
}
const unknownType = { name: 'unknown', properties: {} };
const resolvableScalarType = { name: 'scalar', properties: {} };
export async function resolveDocument(opts: {
rootDocument: Document;
externalRefResolver: BaseResolver;
rootType: NormalizedNodeType;
}): Promise<ResolvedRefMap> {
const { rootDocument, externalRefResolver, rootType } = opts;
const resolvedRefMap: ResolvedRefMap = new Map();
const seenNodes = new Set<string>(); // format "${type}::${absoluteRef}${pointer}"
const resolvePromises: Array<Promise<void>> = [];
resolveRefsInParallel(rootDocument.parsed, rootDocument, '#/', rootType);
let resolved;
do {
resolved = await Promise.all(resolvePromises);
} while (resolvePromises.length !== resolved.length);
return resolvedRefMap;
function resolveRefsInParallel(
rootNode: any,
rootNodeDocument: Document,
rootNodePointer: string,
type: any
) {
const rootNodeDocAbsoluteRef = rootNodeDocument.source.absoluteRef;
const anchorRefsMap: Map<string, any> = new Map();
walk(rootNode, type, rootNodeDocAbsoluteRef + rootNodePointer);
function walk(node: any, type: NormalizedNodeType, nodeAbsoluteRef: string) {
if (typeof node !== 'object' || node === null) {
return;
}
const nodeId = `${type.name}::${nodeAbsoluteRef}`;
if (seenNodes.has(nodeId)) {
return;
}
seenNodes.add(nodeId);
const [_, anchor] = Object.entries(node).find(([key]) => key === '$anchor') || [];
if (anchor) {
anchorRefsMap.set(`#${anchor}`, node);
}
if (Array.isArray(node)) {
const itemsType = type.items;
// we continue resolving unknown types, but stop early on known scalars
if (itemsType === undefined && type !== unknownType && type !== SpecExtension) {
return;
}
const isTypeAFunction = typeof itemsType === 'function';
for (let i = 0; i < node.length; i++) {
const itemType = isTypeAFunction
? itemsType(node[i], joinPointer(nodeAbsoluteRef, i))
: itemsType;
// we continue resolving unknown types, but stop early on known scalars
if (itemType === undefined && type !== unknownType && type !== SpecExtension) {
continue;
}
walk(
node[i],
isNamedType(itemType) ? itemType : unknownType,
joinPointer(nodeAbsoluteRef, i)
);
}
return;
}
for (const propName of Object.keys(node)) {
let propValue = node[propName];
let propType = type.properties[propName];
if (propType === undefined) propType = type.additionalProperties;
if (typeof propType === 'function') propType = propType(propValue, propName);
if (propType === undefined) propType = unknownType;
if (
type.extensionsPrefix &&
propName.startsWith(type.extensionsPrefix) &&
propType === unknownType
) {
propType = SpecExtension;
}
if (!isNamedType(propType) && propType?.directResolveAs) {
propType = propType.directResolveAs;
propValue = { $ref: propValue };
}
if (propType && propType.name === undefined && propType.resolvable !== false) {
propType = resolvableScalarType;
}
if (!isNamedType(propType) || typeof propValue !== 'object') {
continue;
}
walk(propValue, propType, joinPointer(nodeAbsoluteRef, escapePointer(propName)));
}
if (isRef(node)) {
const promise = followRef(rootNodeDocument, node, {
prev: null,
node,
}).then((resolvedRef) => {
if (resolvedRef.resolved) {
resolveRefsInParallel(
resolvedRef.node,
resolvedRef.document,
resolvedRef.nodePointer!,
type
);
}
});
resolvePromises.push(promise);
}
// handle example.externalValue as reference
if (isExternalValue(node)) {
const promise = followRef(
rootNodeDocument,
{ $ref: node.externalValue },
{
prev: null,
node,
}
).then((resolvedRef) => {
if (resolvedRef.resolved) {
resolveRefsInParallel(
resolvedRef.node,
resolvedRef.document,
resolvedRef.nodePointer!,
type
);
}
});
resolvePromises.push(promise);
}
}
async function followRef(
document: Document,
ref: OasRef,
refStack: RefFrame
): Promise<ResolvedRef> {
if (hasRef(refStack.prev, ref)) {
throw new Error('Self-referencing circular pointer');
}
if (isAnchor(ref.$ref)) {
// Wait for all anchors in the document to be collected firstly.
await nextTick();
const resolvedRef: ResolvedRef = {
resolved: true,
isRemote: false,
node: anchorRefsMap.get(ref.$ref),
document,
nodePointer: ref.$ref,
};
const refId = makeRefId(document.source.absoluteRef, ref.$ref);
resolvedRefMap.set(refId, resolvedRef);
return resolvedRef;
}
const { uri, pointer } = parseRef(ref.$ref);
const isRemote = uri !== null;
let targetDoc: Document;
try {
targetDoc = isRemote
? ((await externalRefResolver.resolveDocument(
document.source.absoluteRef,
uri!
)) as Document)
: document;
} catch (error) {
const resolvedRef = {
resolved: false as const,
isRemote,
document: undefined,
error: error,
};
const refId = makeRefId(document.source.absoluteRef, ref.$ref);
resolvedRefMap.set(refId, resolvedRef);
return resolvedRef;
}
let resolvedRef: ResolvedRef = {
resolved: true,
document: targetDoc,
isRemote,
node: document.parsed,
nodePointer: '#/',
};
let target = targetDoc.parsed as any;
const segments = pointer;
for (const segment of segments) {
if (typeof target !== 'object') {
target = undefined;
break;
} else if (target[segment] !== undefined) {
target = target[segment];
resolvedRef.nodePointer = joinPointer(resolvedRef.nodePointer!, escapePointer(segment));
} else if (isRef(target)) {
resolvedRef = await followRef(targetDoc, target, pushRef(refStack, target));
targetDoc = resolvedRef.document || targetDoc;
if (typeof resolvedRef.node !== 'object') {
target = undefined;
break;
}
target = resolvedRef.node[segment];
resolvedRef.nodePointer = joinPointer(resolvedRef.nodePointer!, escapePointer(segment));
} else {
target = undefined;
break;
}
}
resolvedRef.node = target;
resolvedRef.document = targetDoc;
const refId = makeRefId(document.source.absoluteRef, ref.$ref);
if (resolvedRef.document && isRef(target)) {
resolvedRef = await followRef(resolvedRef.document, target, pushRef(refStack, target));
}
resolvedRefMap.set(refId, resolvedRef);
return { ...resolvedRef };
}
}
}

View File

@ -0,0 +1,32 @@
{
"name": "lru-cache",
"description": "A cache object that deletes the least-recently-used items.",
"version": "5.1.1",
"author": "Isaac Z. Schlueter <i@izs.me>",
"keywords": [
"mru",
"lru",
"cache"
],
"scripts": {
"test": "tap test/*.js --100 -J",
"snap": "TAP_SNAPSHOT=1 tap test/*.js -J",
"coveragerport": "tap --coverage-report=html",
"preversion": "npm test",
"postversion": "npm publish",
"postpublish": "git push origin --all; git push origin --tags"
},
"main": "index.js",
"repository": "git://github.com/isaacs/node-lru-cache.git",
"devDependencies": {
"benchmark": "^2.1.4",
"tap": "^12.1.0"
},
"license": "ISC",
"dependencies": {
"yallist": "^3.0.2"
},
"files": [
"index.js"
]
}

View File

@ -0,0 +1,16 @@
/**
* @license lucide-react v0.395.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Album = createLucideIcon("Album", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
["polyline", { points: "11 3 11 11 14 8 17 11 17 3", key: "1wcwz3" }]
]);
export { Album as default };
//# sourceMappingURL=album.js.map

View File

@ -0,0 +1,252 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.environmentVisitor = environmentVisitor;
exports.explode = explode$1;
exports.isExplodedVisitor = isExplodedVisitor;
exports.merge = merge;
exports.verify = verify$1;
var virtualTypes = require("./path/lib/virtual-types.js");
var virtualTypesValidators = require("./path/lib/virtual-types-validator.js");
var _t = require("@babel/types");
var _context = require("./path/context.js");
const {
DEPRECATED_KEYS,
DEPRECATED_ALIASES,
FLIPPED_ALIAS_KEYS,
TYPES,
__internal__deprecationWarning: deprecationWarning
} = _t;
function isVirtualType(type) {
return type in virtualTypes;
}
function isExplodedVisitor(visitor) {
return visitor == null ? void 0 : visitor._exploded;
}
function explode$1(visitor) {
if (isExplodedVisitor(visitor)) return visitor;
visitor._exploded = true;
for (const nodeType of Object.keys(visitor)) {
if (shouldIgnoreKey(nodeType)) continue;
const parts = nodeType.split("|");
if (parts.length === 1) continue;
const fns = visitor[nodeType];
delete visitor[nodeType];
for (const part of parts) {
visitor[part] = fns;
}
}
verify$1(visitor);
delete visitor.__esModule;
ensureEntranceObjects(visitor);
ensureCallbackArrays(visitor);
for (const nodeType of Object.keys(visitor)) {
if (shouldIgnoreKey(nodeType)) continue;
if (!isVirtualType(nodeType)) continue;
const fns = visitor[nodeType];
for (const type of Object.keys(fns)) {
fns[type] = wrapCheck(nodeType, fns[type]);
}
delete visitor[nodeType];
const types = virtualTypes[nodeType];
if (types !== null) {
for (const type of types) {
var _visitor$type;
(_visitor$type = visitor[type]) != null ? _visitor$type : visitor[type] = {};
mergePair(visitor[type], fns);
}
} else {
mergePair(visitor, fns);
}
}
for (const nodeType of Object.keys(visitor)) {
if (shouldIgnoreKey(nodeType)) continue;
let aliases = FLIPPED_ALIAS_KEYS[nodeType];
if (nodeType in DEPRECATED_KEYS) {
const deprecatedKey = DEPRECATED_KEYS[nodeType];
deprecationWarning(nodeType, deprecatedKey, "Visitor ");
aliases = [deprecatedKey];
} else if (nodeType in DEPRECATED_ALIASES) {
const deprecatedAlias = DEPRECATED_ALIASES[nodeType];
deprecationWarning(nodeType, deprecatedAlias, "Visitor ");
aliases = FLIPPED_ALIAS_KEYS[deprecatedAlias];
}
if (!aliases) continue;
const fns = visitor[nodeType];
delete visitor[nodeType];
for (const alias of aliases) {
const existing = visitor[alias];
if (existing) {
mergePair(existing, fns);
} else {
visitor[alias] = Object.assign({}, fns);
}
}
}
for (const nodeType of Object.keys(visitor)) {
if (shouldIgnoreKey(nodeType)) continue;
ensureCallbackArrays(visitor[nodeType]);
}
return visitor;
}
function verify$1(visitor) {
if (visitor._verified) return;
if (typeof visitor === "function") {
throw new Error("You passed `traverse()` a function when it expected a visitor object, " + "are you sure you didn't mean `{ enter: Function }`?");
}
for (const nodeType of Object.keys(visitor)) {
if (nodeType === "enter" || nodeType === "exit") {
validateVisitorMethods(nodeType, visitor[nodeType]);
}
if (shouldIgnoreKey(nodeType)) continue;
if (!TYPES.includes(nodeType)) {
throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type in @babel/traverse ${"7.29.0"}`);
}
const visitors = visitor[nodeType];
if (typeof visitors === "object") {
for (const visitorKey of Object.keys(visitors)) {
if (visitorKey === "enter" || visitorKey === "exit") {
validateVisitorMethods(`${nodeType}.${visitorKey}`, visitors[visitorKey]);
} else {
throw new Error("You passed `traverse()` a visitor object with the property " + `${nodeType} that has the invalid property ${visitorKey}`);
}
}
}
}
visitor._verified = true;
}
function validateVisitorMethods(path, val) {
const fns = [].concat(val);
for (const fn of fns) {
if (typeof fn !== "function") {
throw new TypeError(`Non-function found defined in ${path} with type ${typeof fn}`);
}
}
}
function merge(visitors, states = [], wrapper) {
const mergedVisitor = {
_verified: true,
_exploded: true
};
Object.defineProperty(mergedVisitor, "_exploded", {
enumerable: false
});
Object.defineProperty(mergedVisitor, "_verified", {
enumerable: false
});
for (let i = 0; i < visitors.length; i++) {
const visitor = explode$1(visitors[i]);
const state = states[i];
let topVisitor = visitor;
if (state || wrapper) {
topVisitor = wrapWithStateOrWrapper(topVisitor, state, wrapper);
}
mergePair(mergedVisitor, topVisitor);
for (const key of Object.keys(visitor)) {
if (shouldIgnoreKey(key)) continue;
let typeVisitor = visitor[key];
if (state || wrapper) {
typeVisitor = wrapWithStateOrWrapper(typeVisitor, state, wrapper);
}
const nodeVisitor = mergedVisitor[key] || (mergedVisitor[key] = {});
mergePair(nodeVisitor, typeVisitor);
}
}
return mergedVisitor;
}
function wrapWithStateOrWrapper(oldVisitor, state, wrapper) {
const newVisitor = {};
for (const phase of ["enter", "exit"]) {
let fns = oldVisitor[phase];
if (!Array.isArray(fns)) continue;
fns = fns.map(function (fn) {
let newFn = fn;
if (state) {
newFn = function (path) {
fn.call(state, path, state);
};
}
if (wrapper) {
newFn = wrapper(state == null ? void 0 : state.key, phase, newFn);
}
if (newFn !== fn) {
newFn.toString = () => fn.toString();
}
return newFn;
});
newVisitor[phase] = fns;
}
return newVisitor;
}
function ensureEntranceObjects(obj) {
for (const key of Object.keys(obj)) {
if (shouldIgnoreKey(key)) continue;
const fns = obj[key];
if (typeof fns === "function") {
obj[key] = {
enter: fns
};
}
}
}
function ensureCallbackArrays(obj) {
if (obj.enter && !Array.isArray(obj.enter)) obj.enter = [obj.enter];
if (obj.exit && !Array.isArray(obj.exit)) obj.exit = [obj.exit];
}
function wrapCheck(nodeType, fn) {
const fnKey = `is${nodeType}`;
const validator = virtualTypesValidators[fnKey];
const newFn = function (path) {
if (validator.call(path)) {
return fn.apply(this, arguments);
}
};
newFn.toString = () => fn.toString();
return newFn;
}
function shouldIgnoreKey(key) {
if (key.startsWith("_")) return true;
if (key === "enter" || key === "exit" || key === "shouldSkip") return true;
if (key === "denylist" || key === "noScope" || key === "skipKeys") {
return true;
}
if (key === "blacklist") {
return true;
}
return false;
}
function mergePair(dest, src) {
for (const phase of ["enter", "exit"]) {
if (!src[phase]) continue;
dest[phase] = [].concat(dest[phase] || [], src[phase]);
}
}
const _environmentVisitor = {
FunctionParent(path) {
if (path.isArrowFunctionExpression()) return;
path.skip();
if (path.isMethod()) {
if (!path.requeueComputedKeyAndDecorators) {
_context.requeueComputedKeyAndDecorators.call(path);
} else {
path.requeueComputedKeyAndDecorators();
}
}
},
Property(path) {
if (path.isObjectProperty()) return;
path.skip();
if (!path.requeueComputedKeyAndDecorators) {
_context.requeueComputedKeyAndDecorators.call(path);
} else {
path.requeueComputedKeyAndDecorators();
}
}
};
function environmentVisitor(visitor) {
return merge([_environmentVisitor, visitor]);
}
//# sourceMappingURL=visitors.js.map

View File

@ -0,0 +1,129 @@
# brace-expansion
[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
as known from sh/bash, in JavaScript.
[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)
[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion)
[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/)
[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion)
## Example
```js
var expand = require('brace-expansion');
expand('file-{a,b,c}.jpg')
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
expand('-v{,,}')
// => ['-v', '-v', '-v']
expand('file{0..2}.jpg')
// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
expand('file-{a..c}.jpg')
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
expand('file{2..0}.jpg')
// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
expand('file{0..4..2}.jpg')
// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
expand('file-{a..e..2}.jpg')
// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
expand('file{00..10..5}.jpg')
// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
expand('{{A..C},{a..c}}')
// => ['A', 'B', 'C', 'a', 'b', 'c']
expand('ppp{,config,oe{,conf}}')
// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
```
## API
```js
var expand = require('brace-expansion');
```
### var expanded = expand(str)
Return an array of all possible and valid expansions of `str`. If none are
found, `[str]` is returned.
Valid expansions are:
```js
/^(.*,)+(.+)?$/
// {a,b,...}
```
A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
```js
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
// {x..y[..incr]}
```
A numeric sequence from `x` to `y` inclusive, with optional increment.
If `x` or `y` start with a leading `0`, all the numbers will be padded
to have equal length. Negative numbers and backwards iteration work too.
```js
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
// {x..y[..incr]}
```
An alphabetic sequence from `x` to `y` inclusive, with optional increment.
`x` and `y` must be exactly one character, and if given, `incr` must be a
number.
For compatibility reasons, the string `${` is not eligible for brace expansion.
## Installation
With [npm](https://npmjs.org) do:
```bash
npm install brace-expansion
```
## Contributors
- [Julian Gruber](https://github.com/juliangruber)
- [Isaac Z. Schlueter](https://github.com/isaacs)
## Sponsors
This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
## License
(MIT)
Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,52 @@
import { RedoclyClient } from '../../index';
import { setRedoclyDomain, getRedoclyDomain, getDomains, AVAILABLE_REGIONS } from '../domains';
describe('domains', () => {
const REDOCLY_DOMAIN_US = 'redocly.com';
const TEST_DOMAIN = 'redoclyDomain.com';
const TEST_LAB_DOMAIN = 'lab.redocly.host';
const TEST_REDOC_ONLINE_DOMAIN = 'redoc.online';
afterEach(() => {
delete process.env.REDOCLY_DOMAIN;
setRedoclyDomain('');
});
it('should resolve the US domain by default', () => {
expect(getRedoclyDomain()).toBe(REDOCLY_DOMAIN_US);
});
it('should resolve the US and EU regions by default', () => {
expect(AVAILABLE_REGIONS).toStrictEqual(['us', 'eu']);
});
it('should resolve the specified domain if used with setter', () => {
setRedoclyDomain(TEST_DOMAIN);
expect(getRedoclyDomain()).toBe(TEST_DOMAIN);
});
it('should resolve the specified domain provided in environmental variable, after initializing RedoclyClient', () => {
process.env.REDOCLY_DOMAIN = TEST_DOMAIN;
const client = new RedoclyClient();
expect(getRedoclyDomain()).toBe(TEST_DOMAIN);
expect(client.domain).toBe(TEST_DOMAIN);
});
it('should return correct object when redocly domain is set to lab env', () => {
setRedoclyDomain(TEST_LAB_DOMAIN);
const domains = getDomains();
expect(domains).toEqual({ us: 'redocly.com', eu: 'eu.redocly.com', lab: 'lab.redocly.host' });
expect(getRedoclyDomain()).toBe(TEST_LAB_DOMAIN);
});
it('should return correct object when redocly domain is set to redoc.online env', () => {
setRedoclyDomain(TEST_REDOC_ONLINE_DOMAIN);
const domains = getDomains();
expect(domains).toEqual({
us: 'redocly.com',
eu: 'eu.redocly.com',
'redoc.online': 'redoc.online',
});
expect(getRedoclyDomain()).toBe(TEST_REDOC_ONLINE_DOMAIN);
});
});

View File

@ -0,0 +1,2 @@
import type { Async3Rule } from '../../visitors';
export declare const ChannelsKebabCase: Async3Rule;

View File

@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _rewriteStackTrace = require("./rewrite-stack-trace.js");
class ConfigError extends Error {
constructor(message, filename) {
super(message);
(0, _rewriteStackTrace.expectedError)(this);
if (filename) (0, _rewriteStackTrace.injectVirtualStackFrame)(this, filename);
}
}
exports.default = ConfigError;
0 && 0;
//# sourceMappingURL=config-error.js.map

View File

@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B 1C"},B:{"1":"0 1 2 3 4 5 6 7 8 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 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 6 7 8 FC GC HC IC JC KC LC MC NC OC Q H R ZC 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 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB I aC PC bC 3C 4C","2":"9 2C WC J cB K D E F A B C L M G N O P dB AB BB CB DB EB FB GB HB IB eB fB gB hB iB jB kB lB mB nB oB 5C 6C","194":"pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B XC 7B YC 8B 9B AC BC CC DC EC"},D:{"1":"0 1 2 3 4 5 6 7 8 0B 1B 2B 3B 4B 5B 6B XC 7B YC 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC OC 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 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB I aC PC bC","2":"9 J cB K D E F A B C L M G N O P dB AB BB CB DB EB FB GB HB IB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB","66":"zB"},E:{"1":"fC SC FD TC gC hC iC jC kC GD UC lC mC nC oC pC HD VC qC rC sC tC ID uC vC wC xC yC JD","2":"J cB K D E F A B C L M G 7C cC 8C 9C AD BD dC QC RC CD DD ED eC"},F:{"1":"0 1 2 3 4 5 6 7 8 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 MC NC OC Q H R ZC 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","2":"9 F B C G N O P dB AB BB CB DB EB FB GB HB IB eB fB gB hB iB jB kB lB KD LD MD ND QC zC OD RC","66":"mB nB"},G:{"1":"fC SC jD TC gC hC iC jC kC kD UC lC mC nC oC pC lD VC qC rC sC tC mD uC vC wC xC yC","2":"E cC PD 0C QD RD SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD hD iD eC"},H:{"2":"nD"},I:{"1":"I","2":"WC J oD pD qD rD 0C sD tD"},J:{"2":"D A"},K:{"1":"H","2":"A B C QC zC RC"},L:{"1":"I"},M:{"1":"PC"},N:{"2":"A B"},O:{"1":"SC"},P:{"1":"9 AB BB CB DB EB FB GB HB IB vD wD xD yD dC zD 0D 1D 2D 3D TC UC VC 4D","2":"J uD"},Q:{"1":"5D"},R:{"1":"6D"},S:{"1":"8D","194":"7D"}},B:2,C:"CSS Containment",D:true};

View File

@ -0,0 +1 @@
module.exports={C:{"5":0.11635,"59":0.00684,"115":0.06844,"128":0.02053,"135":0.00684,"136":0.00684,"138":0.00684,"139":0.00684,"140":0.05475,"141":0.01369,"142":0.00684,"143":0.01369,"144":0.02053,"145":0.4038,"146":0.62965,_:"2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 125 126 127 129 130 131 132 133 134 137 147 148 149 3.5 3.6"},D:{"39":0.00684,"40":0.00684,"41":0.00684,"42":0.00684,"43":0.00684,"44":0.00684,"45":0.00684,"46":0.00684,"47":0.00684,"48":0.00684,"49":0.00684,"50":0.00684,"51":0.00684,"52":0.00684,"53":0.00684,"54":0.00684,"55":0.01369,"56":0.00684,"57":0.00684,"58":0.00684,"59":0.00684,"60":0.00684,"66":0.02053,"69":0.11635,"75":0.00684,"79":0.02053,"86":0.00684,"87":0.01369,"99":0.1095,"102":0.00684,"103":0.33536,"104":0.33536,"105":0.32167,"106":0.32167,"107":0.32167,"108":0.32167,"109":0.86234,"110":0.32167,"111":0.43802,"112":18.38983,"114":0.00684,"116":0.65702,"117":0.32167,"119":0.05475,"120":0.60227,"121":0.00684,"122":0.1095,"123":0.00684,"124":0.34904,"125":2.18324,"126":5.57102,"127":0.02053,"128":0.11635,"129":0.02738,"130":0.02053,"131":0.71178,"132":0.15057,"133":0.67071,"134":0.04791,"135":0.05475,"136":0.05475,"137":0.0616,"138":0.14372,"139":0.21216,"140":0.10266,"141":0.21216,"142":7.17251,"143":14.80357,"144":0.01369,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 64 65 67 68 70 71 72 73 74 76 77 78 80 81 83 84 85 88 89 90 91 92 93 94 95 96 97 98 100 101 113 115 118 145 146"},F:{"93":0.02053,"95":0.00684,"114":0.00684,"119":0.00684,"122":0.00684,"123":0.01369,"124":1.75891,"125":0.55436,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 115 116 117 118 120 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00684,"109":0.02053,"130":0.00684,"131":0.00684,"132":0.00684,"133":0.00684,"134":0.00684,"135":0.00684,"136":0.00684,"137":0.00684,"138":0.00684,"139":0.00684,"140":0.01369,"141":0.0616,"142":1.00607,"143":2.87448,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 6.1 7.1 9.1 10.1 12.1 13.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 17.0 17.2 17.3 18.0 18.2 26.3","5.1":0.00684,"11.1":0.00684,"15.6":0.01369,"16.5":0.08897,"16.6":0.02053,"17.1":0.00684,"17.4":0.00684,"17.5":0.00684,"17.6":0.02738,"18.1":0.00684,"18.3":0.00684,"18.4":0.00684,"18.5-18.6":0.02738,"26.0":0.01369,"26.1":0.15057,"26.2":0.04791},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.0008,"5.0-5.1":0,"6.0-6.1":0.00159,"7.0-7.1":0.00119,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00318,"10.0-10.2":0.0004,"10.3":0.00557,"11.0-11.2":0.0684,"11.3-11.4":0.00199,"12.0-12.1":0.00159,"12.2-12.5":0.01789,"13.0-13.1":0.0004,"13.2":0.00278,"13.3":0.0008,"13.4-13.7":0.00278,"14.0-14.4":0.00557,"14.5-14.8":0.00596,"15.0-15.1":0.00636,"15.2-15.3":0.00477,"15.4":0.00517,"15.5":0.00557,"15.6-15.8":0.08629,"16.0":0.00994,"16.1":0.01909,"16.2":0.00994,"16.3":0.01789,"16.4":0.00437,"16.5":0.00756,"16.6-16.7":0.11214,"17.0":0.00636,"17.1":0.01034,"17.2":0.00756,"17.3":0.01153,"17.4":0.01949,"17.5":0.03817,"17.6-17.7":0.08828,"18.0":0.01988,"18.1":0.04136,"18.2":0.02187,"18.3":0.07118,"18.4":0.03658,"18.5-18.7":2.62692,"26.0":0.0513,"26.1":0.42668,"26.2":0.08112,"26.3":0.00358},P:{"4":0.01028,"25":0.01028,"26":0.02055,"27":0.01028,"28":0.03083,"29":0.76038,_:"20 21 22 23 24 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.0411},I:{"0":0.05357,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00004},A:{"8":0.03422,"9":0.13688,"11":0.1711,_:"6 7 10 5.5"},K:{"0":0.1294,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{_:"14.9"},O:{"0":0.00631},H:{"0":0},L:{"0":28.45906},R:{_:"0"},M:{"0":0.08206}};

View File

@ -0,0 +1,18 @@
/**
* @license lucide-react v0.395.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FileAxis3d = createLucideIcon("FileAxis3d", [
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "m8 18 4-4", key: "12zab0" }],
["path", { d: "M8 10v8h8", key: "tlaukw" }]
]);
export { FileAxis3d as default };
//# sourceMappingURL=file-axis-3d.js.map

View File

@ -0,0 +1 @@
{"version":3,"names":["_findSuggestion","require","OptionValidator","constructor","descriptor","validateTopLevelOptions","options","TopLevelOptionShape","validOptionNames","Object","keys","option","includes","Error","formatMessage","findSuggestion","validateBooleanOption","name","value","defaultValue","undefined","invariant","validateStringOption","condition","message","exports"],"sources":["../src/validator.ts"],"sourcesContent":["import { findSuggestion } from \"./find-suggestion.ts\";\n\nexport class OptionValidator {\n declare descriptor: string;\n constructor(descriptor: string) {\n this.descriptor = descriptor;\n }\n\n /**\n * Validate if the given `options` follow the name of keys defined in the `TopLevelOptionShape`\n *\n * @param {Object} options\n * @param {Object} TopLevelOptionShape\n * An object with all the valid key names that `options` should be allowed to have\n * The property values of `TopLevelOptionShape` can be arbitrary\n * @memberof OptionValidator\n */\n validateTopLevelOptions(options: object, TopLevelOptionShape: object): void {\n const validOptionNames = Object.keys(TopLevelOptionShape);\n for (const option of Object.keys(options)) {\n if (!validOptionNames.includes(option)) {\n throw new Error(\n this.formatMessage(`'${option}' is not a valid top-level option.\n- Did you mean '${findSuggestion(option, validOptionNames)}'?`),\n );\n }\n }\n }\n\n // note: we do not consider rewrite them to high order functions\n // until we have to support `validateNumberOption`.\n validateBooleanOption<T extends boolean>(\n name: string,\n value?: boolean,\n defaultValue?: T,\n ): boolean | T {\n if (value === undefined) {\n return defaultValue;\n } else {\n this.invariant(\n typeof value === \"boolean\",\n `'${name}' option must be a boolean.`,\n );\n }\n return value;\n }\n\n validateStringOption<T extends string>(\n name: string,\n value?: string,\n defaultValue?: T,\n ): string | T {\n if (value === undefined) {\n return defaultValue;\n } else {\n this.invariant(\n typeof value === \"string\",\n `'${name}' option must be a string.`,\n );\n }\n return value;\n }\n /**\n * A helper interface copied from the `invariant` npm package.\n * It throws given `message` when `condition` is not met\n *\n * @param {boolean} condition\n * @param {string} message\n * @memberof OptionValidator\n */\n invariant(condition: boolean, message: string): void {\n if (!condition) {\n throw new Error(this.formatMessage(message));\n }\n }\n\n formatMessage(message: string): string {\n return `${this.descriptor}: ${message}`;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAEO,MAAMC,eAAe,CAAC;EAE3BC,WAAWA,CAACC,UAAkB,EAAE;IAC9B,IAAI,CAACA,UAAU,GAAGA,UAAU;EAC9B;EAWAC,uBAAuBA,CAACC,OAAe,EAAEC,mBAA2B,EAAQ;IAC1E,MAAMC,gBAAgB,GAAGC,MAAM,CAACC,IAAI,CAACH,mBAAmB,CAAC;IACzD,KAAK,MAAMI,MAAM,IAAIF,MAAM,CAACC,IAAI,CAACJ,OAAO,CAAC,EAAE;MACzC,IAAI,CAACE,gBAAgB,CAACI,QAAQ,CAACD,MAAM,CAAC,EAAE;QACtC,MAAM,IAAIE,KAAK,CACb,IAAI,CAACC,aAAa,CAAC,IAAIH,MAAM;AACvC,kBAAkB,IAAAI,8BAAc,EAACJ,MAAM,EAAEH,gBAAgB,CAAC,IAAI,CACtD,CAAC;MACH;IACF;EACF;EAIAQ,qBAAqBA,CACnBC,IAAY,EACZC,KAAe,EACfC,YAAgB,EACH;IACb,IAAID,KAAK,KAAKE,SAAS,EAAE;MACvB,OAAOD,YAAY;IACrB,CAAC,MAAM;MACL,IAAI,CAACE,SAAS,CACZ,OAAOH,KAAK,KAAK,SAAS,EAC1B,IAAID,IAAI,6BACV,CAAC;IACH;IACA,OAAOC,KAAK;EACd;EAEAI,oBAAoBA,CAClBL,IAAY,EACZC,KAAc,EACdC,YAAgB,EACJ;IACZ,IAAID,KAAK,KAAKE,SAAS,EAAE;MACvB,OAAOD,YAAY;IACrB,CAAC,MAAM;MACL,IAAI,CAACE,SAAS,CACZ,OAAOH,KAAK,KAAK,QAAQ,EACzB,IAAID,IAAI,4BACV,CAAC;IACH;IACA,OAAOC,KAAK;EACd;EASAG,SAASA,CAACE,SAAkB,EAAEC,OAAe,EAAQ;IACnD,IAAI,CAACD,SAAS,EAAE;MACd,MAAM,IAAIV,KAAK,CAAC,IAAI,CAACC,aAAa,CAACU,OAAO,CAAC,CAAC;IAC9C;EACF;EAEAV,aAAaA,CAACU,OAAe,EAAU;IACrC,OAAO,GAAG,IAAI,CAACpB,UAAU,KAAKoB,OAAO,EAAE;EACzC;AACF;AAACC,OAAA,CAAAvB,eAAA,GAAAA,eAAA","ignoreList":[]}

View File

@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _classPrivateFieldSet2;
var _assertClassBrand = require("./assertClassBrand.js");
function _classPrivateFieldSet2(privateMap, receiver, value) {
privateMap.set((0, _assertClassBrand.default)(privateMap, receiver), value);
return value;
}
//# sourceMappingURL=classPrivateFieldSet2.js.map

View File

@ -0,0 +1,5 @@
{
presets: [
["env", { targets: { node: "current" }}],
],
}

View File

@ -0,0 +1,5 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

View File

@ -0,0 +1,3 @@
import type { ImplicitLibVariableOptions } from '../variable';
export declare const esnext_asynciterable: Record<string, ImplicitLibVariableOptions>;
//# sourceMappingURL=esnext.asynciterable.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"getDeclaration.js","sourceRoot":"","sources":["../src/getDeclaration.ts"],"names":[],"mappings":";;AASA,wCAUC;AAbD;;GAEG;AACH,SAAgB,cAAc,CAC5B,QAA2C,EAC3C,IAAmB;IAEnB,MAAM,MAAM,GAAG,QAAQ,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,YAAY,GAAG,MAAM,CAAC,eAAe,EAAE,CAAC;IAC9C,OAAO,YAAY,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AACnC,CAAC"}

View File

@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B 1C"},B:{"1":"0 1 2 3 4 5 6 7 8 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 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB I","2":"C L M","260":"G N O P"},C:{"1":"0 1 2 3 4 5 6 7 8 sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B XC 7B YC 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC OC Q H R ZC 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 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB I aC PC bC 3C 4C","2":"9 2C WC J cB K D E F A B C L M G N O P dB AB 5C 6C","33":"BB CB DB EB FB GB HB IB eB fB gB hB iB jB kB lB mB nB oB pB qB rB"},D:{"1":"0 1 2 3 4 5 6 7 8 4B 5B 6B XC 7B YC 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC OC 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 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB I aC PC bC","2":"9 J cB K D E F A B C L M G N O P dB AB BB","33":"CB DB EB FB GB HB IB 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"},E:{"1":"B C L M G QC RC CD DD ED eC fC SC FD TC gC hC iC jC kC GD UC lC mC nC oC pC HD VC qC rC sC tC ID uC vC wC xC yC JD","2":"J cB K D E F A 7C cC 8C 9C AD BD dC"},F:{"1":"0 1 2 3 4 5 6 7 8 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 MC NC OC Q H R ZC 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","2":"F B C G N O KD LD MD ND QC zC OD RC","33":"9 P dB AB BB CB DB EB FB GB HB IB eB fB gB hB iB jB kB lB mB nB oB pB qB"},G:{"1":"YD ZD aD bD cD dD eD fD gD hD iD eC fC SC jD TC gC hC iC jC kC kD UC lC mC nC oC pC lD VC qC rC sC tC mD uC vC wC xC yC","2":"E cC PD 0C QD RD SD TD UD VD WD XD"},H:{"2":"nD"},I:{"1":"I","2":"WC J oD pD qD rD 0C sD tD"},J:{"2":"D","130":"A"},K:{"1":"H","2":"A B C QC zC RC"},L:{"1":"I"},M:{"1":"PC"},N:{"2":"A B"},O:{"1":"SC"},P:{"1":"9 AB BB CB DB EB FB GB HB IB vD wD xD yD dC zD 0D 1D 2D 3D TC UC VC 4D","33":"J uD"},Q:{"1":"5D"},R:{"1":"6D"},S:{"1":"7D 8D"}},B:5,C:"WebRTC Peer-to-peer connections",D:true};

View File

@ -0,0 +1 @@
{"version":3,"file":"square-chevron-right.js","sources":["../../../src/icons/square-chevron-right.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareChevronRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Im0xMCA4IDQgNC00IDQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/square-chevron-right\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst SquareChevronRight = createLucideIcon('SquareChevronRight', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'm10 8 4 4-4 4', key: '1wy4r4' }],\n]);\n\nexport default SquareChevronRight;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqB,iBAAiB,oBAAsB,CAAA,CAAA,CAAA;AAAA,CAAA,CAChE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAChD,CAAC,CAAA,CAAA;;"}

View File

@ -0,0 +1,15 @@
/**
* @license lucide-react v0.395.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ChevronDown = createLucideIcon("ChevronDown", [
["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
]);
export { ChevronDown as default };
//# sourceMappingURL=chevron-down.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"inferSingleRun.js","sourceRoot":"","sources":["../../src/parseSettings/inferSingleRun.ts"],"names":[],"mappings":";;AAgBA,wCAoDC;AApED,+BAAiC;AAIjC;;;;;;;;;;;GAWG;AACH,SAAgB,cAAc,CAAC,OAAoC;IACjE,qEAAqE;IACrE,yEAAyE;IACzE,iEAAiE;IACjE,IAAI,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,CAAC;QACzC,OAAO,KAAK,CAAC;IACf,CAAC;IAED;IACE,2FAA2F;IAC3F,OAAO,EAAE,OAAO,IAAI,IAAI;QACxB,8FAA8F;QAC9F,uDAAuD;QACvD,OAAO,CAAC,QAAQ,IAAI,IAAI,EACxB,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,gHAAgH;IAChH,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,KAAK,OAAO,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,KAAK,MAAM,EAAE,CAAC;QAC/C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,8DAA8D;IAC9D,IAAI,OAAO,CAAC,gCAAgC,EAAE,CAAC;QAC7C,MAAM,sBAAsB,GAAG;YAC7B,0BAA0B,EAAE,mBAAmB;YAC/C,mCAAmC,EAAE,YAAY;SAClD,CAAC;QACF;QACE,2FAA2F;QAC3F,OAAO,CAAC,GAAG,CAAC,EAAE,KAAK,MAAM;YACzB,kGAAkG;YAClG,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACjC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAA,gBAAS,EAAC,IAAI,CAAC,CAAC,CAC1C,EACD,CAAC;YACD,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACzC,CAAC;IACH,CAAC;IAED;;;;;;OAMG;IACH,OAAO,KAAK,CAAC;AACf,CAAC"}

View File

@ -0,0 +1,20 @@
/**
* @license lucide-react v0.395.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CalendarPlus = createLucideIcon("CalendarPlus", [
["path", { d: "M8 2v4", key: "1cmpym" }],
["path", { d: "M16 2v4", key: "4m81vk" }],
["path", { d: "M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8", key: "3spt84" }],
["path", { d: "M3 10h18", key: "8toen8" }],
["path", { d: "M16 19h6", key: "xwg31i" }],
["path", { d: "M19 16v6", key: "tddt3s" }]
]);
export { CalendarPlus as default };
//# sourceMappingURL=calendar-plus.js.map

View File

@ -0,0 +1,174 @@
/**
* @fileoverview Rule to flag when the same variable is declared more then once.
* @author Ilya Volodin
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Disallow variable redeclaration",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-redeclare"
},
messages: {
redeclared: "'{{id}}' is already defined.",
redeclaredAsBuiltin: "'{{id}}' is already defined as a built-in global variable.",
redeclaredBySyntax: "'{{id}}' is already defined by a variable declaration."
},
schema: [
{
type: "object",
properties: {
builtinGlobals: { type: "boolean", default: true }
},
additionalProperties: false
}
]
},
create(context) {
const options = {
builtinGlobals: Boolean(
context.options.length === 0 ||
context.options[0].builtinGlobals
)
};
const sourceCode = context.sourceCode;
/**
* Iterate declarations of a given variable.
* @param {escope.variable} variable The variable object to iterate declarations.
* @returns {IterableIterator<{type:string,node:ASTNode,loc:SourceLocation}>} The declarations.
*/
function *iterateDeclarations(variable) {
if (options.builtinGlobals && (
variable.eslintImplicitGlobalSetting === "readonly" ||
variable.eslintImplicitGlobalSetting === "writable"
)) {
yield { type: "builtin" };
}
for (const id of variable.identifiers) {
yield { type: "syntax", node: id, loc: id.loc };
}
if (variable.eslintExplicitGlobalComments) {
for (const comment of variable.eslintExplicitGlobalComments) {
yield {
type: "comment",
node: comment,
loc: astUtils.getNameLocationInGlobalDirectiveComment(
sourceCode,
comment,
variable.name
)
};
}
}
}
/**
* Find variables in a given scope and flag redeclared ones.
* @param {Scope} scope An eslint-scope scope object.
* @returns {void}
* @private
*/
function findVariablesInScope(scope) {
for (const variable of scope.variables) {
const [
declaration,
...extraDeclarations
] = iterateDeclarations(variable);
if (extraDeclarations.length === 0) {
continue;
}
/*
* If the type of a declaration is different from the type of
* the first declaration, it shows the location of the first
* declaration.
*/
const detailMessageId = declaration.type === "builtin"
? "redeclaredAsBuiltin"
: "redeclaredBySyntax";
const data = { id: variable.name };
// Report extra declarations.
for (const { type, node, loc } of extraDeclarations) {
const messageId = type === declaration.type
? "redeclared"
: detailMessageId;
context.report({ node, loc, messageId, data });
}
}
}
/**
* Find variables in the current scope.
* @param {ASTNode} node The node of the current scope.
* @returns {void}
* @private
*/
function checkForBlock(node) {
const scope = sourceCode.getScope(node);
/*
* In ES5, some node type such as `BlockStatement` doesn't have that scope.
* `scope.block` is a different node in such a case.
*/
if (scope.block === node) {
findVariablesInScope(scope);
}
}
return {
Program(node) {
const scope = sourceCode.getScope(node);
findVariablesInScope(scope);
// Node.js or ES modules has a special scope.
if (
scope.type === "global" &&
scope.childScopes[0] &&
// The special scope's block is the Program node.
scope.block === scope.childScopes[0].block
) {
findVariablesInScope(scope.childScopes[0]);
}
},
FunctionDeclaration: checkForBlock,
FunctionExpression: checkForBlock,
ArrowFunctionExpression: checkForBlock,
StaticBlock: checkForBlock,
BlockStatement: checkForBlock,
ForStatement: checkForBlock,
ForInStatement: checkForBlock,
ForOfStatement: checkForBlock,
SwitchStatement: checkForBlock
};
}
};

View File

@ -0,0 +1,6 @@
export { productThemeOverrideSchema, productConfigOverrideSchema } from './product-override-schema';
export { rbacConfigSchema, rootRedoclyConfigSchema } from './root-config-schema';
export { redocConfigSchema } from './redoc-config-schema';
export * from './types';
export { ApigeeDevOnboardingIntegrationAuthType, AuthProviderType, DEFAULT_TEAM_CLAIM_NAME, LayoutVariant, REDOCLY_TEAMS_RBAC, REDOCLY_ROUTE_RBAC, } from './constants';
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1,599 @@
"use strict";
// parse a single path portion
Object.defineProperty(exports, "__esModule", { value: true });
exports.AST = void 0;
const brace_expressions_js_1 = require("./brace-expressions.js");
const unescape_js_1 = require("./unescape.js");
const types = new Set(['!', '?', '+', '*', '@']);
const isExtglobType = (c) => types.has(c);
// Patterns that get prepended to bind to the start of either the
// entire string, or just a single path portion, to prevent dots
// and/or traversal patterns, when needed.
// Exts don't need the ^ or / bit, because the root binds that already.
const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))';
const startNoDot = '(?!\\.)';
// characters that indicate a start of pattern needs the "no dots" bit,
// because a dot *might* be matched. ( is not in the list, because in
// the case of a child extglob, it will handle the prevention itself.
const addPatternStart = new Set(['[', '.']);
// cases where traversal is A-OK, no dot prevention needed
const justDots = new Set(['..', '.']);
const reSpecials = new Set('().*{}+?[]^$\\!');
const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
// any single thing other than /
const qmark = '[^/]';
// * => any number of characters
const star = qmark + '*?';
// use + when we need to ensure that *something* matches, because the * is
// the only thing in the path portion.
const starNoEmpty = qmark + '+?';
// remove the \ chars that we added if we end up doing a nonmagic compare
// const deslash = (s: string) => s.replace(/\\(.)/g, '$1')
class AST {
type;
#root;
#hasMagic;
#uflag = false;
#parts = [];
#parent;
#parentIndex;
#negs;
#filledNegs = false;
#options;
#toString;
// set to true if it's an extglob with no children
// (which really means one child of '')
#emptyExt = false;
constructor(type, parent, options = {}) {
this.type = type;
// extglobs are inherently magical
if (type)
this.#hasMagic = true;
this.#parent = parent;
this.#root = this.#parent ? this.#parent.#root : this;
this.#options = this.#root === this ? options : this.#root.#options;
this.#negs = this.#root === this ? [] : this.#root.#negs;
if (type === '!' && !this.#root.#filledNegs)
this.#negs.push(this);
this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
}
get hasMagic() {
/* c8 ignore start */
if (this.#hasMagic !== undefined)
return this.#hasMagic;
/* c8 ignore stop */
for (const p of this.#parts) {
if (typeof p === 'string')
continue;
if (p.type || p.hasMagic)
return (this.#hasMagic = true);
}
// note: will be undefined until we generate the regexp src and find out
return this.#hasMagic;
}
// reconstructs the pattern
toString() {
if (this.#toString !== undefined)
return this.#toString;
if (!this.type) {
return (this.#toString = this.#parts.map(p => String(p)).join(''));
}
else {
return (this.#toString =
this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');
}
}
#fillNegs() {
/* c8 ignore start */
if (this !== this.#root)
throw new Error('should only call on root');
if (this.#filledNegs)
return this;
/* c8 ignore stop */
// call toString() once to fill this out
this.toString();
this.#filledNegs = true;
let n;
while ((n = this.#negs.pop())) {
if (n.type !== '!')
continue;
// walk up the tree, appending everthing that comes AFTER parentIndex
let p = n;
let pp = p.#parent;
while (pp) {
for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {
for (const part of n.#parts) {
/* c8 ignore start */
if (typeof part === 'string') {
throw new Error('string part in extglob AST??');
}
/* c8 ignore stop */
part.copyIn(pp.#parts[i]);
}
}
p = pp;
pp = p.#parent;
}
}
return this;
}
push(...parts) {
for (const p of parts) {
if (p === '')
continue;
/* c8 ignore start */
if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {
throw new Error('invalid part: ' + p);
}
/* c8 ignore stop */
this.#parts.push(p);
}
}
toJSON() {
const ret = this.type === null
? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))
: [this.type, ...this.#parts.map(p => p.toJSON())];
if (this.isStart() && !this.type)
ret.unshift([]);
if (this.isEnd() &&
(this === this.#root ||
(this.#root.#filledNegs && this.#parent?.type === '!'))) {
ret.push({});
}
return ret;
}
isStart() {
if (this.#root === this)
return true;
// if (this.type) return !!this.#parent?.isStart()
if (!this.#parent?.isStart())
return false;
if (this.#parentIndex === 0)
return true;
// if everything AHEAD of this is a negation, then it's still the "start"
const p = this.#parent;
for (let i = 0; i < this.#parentIndex; i++) {
const pp = p.#parts[i];
if (!(pp instanceof AST && pp.type === '!')) {
return false;
}
}
return true;
}
isEnd() {
if (this.#root === this)
return true;
if (this.#parent?.type === '!')
return true;
if (!this.#parent?.isEnd())
return false;
if (!this.type)
return this.#parent?.isEnd();
// if not root, it'll always have a parent
/* c8 ignore start */
const pl = this.#parent ? this.#parent.#parts.length : 0;
/* c8 ignore stop */
return this.#parentIndex === pl - 1;
}
copyIn(part) {
if (typeof part === 'string')
this.push(part);
else
this.push(part.clone(this));
}
clone(parent) {
const c = new AST(this.type, parent);
for (const p of this.#parts) {
c.copyIn(p);
}
return c;
}
static #parseAST(str, ast, pos, opt) {
let escaping = false;
let inBrace = false;
let braceStart = -1;
let braceNeg = false;
if (ast.type === null) {
// outside of a extglob, append until we find a start
let i = pos;
let acc = '';
while (i < str.length) {
const c = str.charAt(i++);
// still accumulate escapes at this point, but we do ignore
// starts that are escaped
if (escaping || c === '\\') {
escaping = !escaping;
acc += c;
continue;
}
if (inBrace) {
if (i === braceStart + 1) {
if (c === '^' || c === '!') {
braceNeg = true;
}
}
else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
inBrace = false;
}
acc += c;
continue;
}
else if (c === '[') {
inBrace = true;
braceStart = i;
braceNeg = false;
acc += c;
continue;
}
if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {
ast.push(acc);
acc = '';
const ext = new AST(c, ast);
i = AST.#parseAST(str, ext, i, opt);
ast.push(ext);
continue;
}
acc += c;
}
ast.push(acc);
return i;
}
// some kind of extglob, pos is at the (
// find the next | or )
let i = pos + 1;
let part = new AST(null, ast);
const parts = [];
let acc = '';
while (i < str.length) {
const c = str.charAt(i++);
// still accumulate escapes at this point, but we do ignore
// starts that are escaped
if (escaping || c === '\\') {
escaping = !escaping;
acc += c;
continue;
}
if (inBrace) {
if (i === braceStart + 1) {
if (c === '^' || c === '!') {
braceNeg = true;
}
}
else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
inBrace = false;
}
acc += c;
continue;
}
else if (c === '[') {
inBrace = true;
braceStart = i;
braceNeg = false;
acc += c;
continue;
}
if (isExtglobType(c) && str.charAt(i) === '(') {
part.push(acc);
acc = '';
const ext = new AST(c, part);
part.push(ext);
i = AST.#parseAST(str, ext, i, opt);
continue;
}
if (c === '|') {
part.push(acc);
acc = '';
parts.push(part);
part = new AST(null, ast);
continue;
}
if (c === ')') {
if (acc === '' && ast.#parts.length === 0) {
ast.#emptyExt = true;
}
part.push(acc);
acc = '';
ast.push(...parts, part);
return i;
}
acc += c;
}
// unfinished extglob
// if we got here, it was a malformed extglob! not an extglob, but
// maybe something else in there.
ast.type = null;
ast.#hasMagic = undefined;
ast.#parts = [str.substring(pos - 1)];
return i;
}
static fromGlob(pattern, options = {}) {
const ast = new AST(null, undefined, options);
AST.#parseAST(pattern, ast, 0, options);
return ast;
}
// returns the regular expression if there's magic, or the unescaped
// string if not.
toMMPattern() {
// should only be called on root
/* c8 ignore start */
if (this !== this.#root)
return this.#root.toMMPattern();
/* c8 ignore stop */
const glob = this.toString();
const [re, body, hasMagic, uflag] = this.toRegExpSource();
// if we're in nocase mode, and not nocaseMagicOnly, then we do
// still need a regular expression if we have to case-insensitively
// match capital/lowercase characters.
const anyMagic = hasMagic ||
this.#hasMagic ||
(this.#options.nocase &&
!this.#options.nocaseMagicOnly &&
glob.toUpperCase() !== glob.toLowerCase());
if (!anyMagic) {
return body;
}
const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '');
return Object.assign(new RegExp(`^${re}$`, flags), {
_src: re,
_glob: glob,
});
}
get options() {
return this.#options;
}
// returns the string match, the regexp source, whether there's magic
// in the regexp (so a regular expression is required) and whether or
// not the uflag is needed for the regular expression (for posix classes)
// TODO: instead of injecting the start/end at this point, just return
// the BODY of the regexp, along with the start/end portions suitable
// for binding the start/end in either a joined full-path makeRe context
// (where we bind to (^|/), or a standalone matchPart context (where
// we bind to ^, and not /). Otherwise slashes get duped!
//
// In part-matching mode, the start is:
// - if not isStart: nothing
// - if traversal possible, but not allowed: ^(?!\.\.?$)
// - if dots allowed or not possible: ^
// - if dots possible and not allowed: ^(?!\.)
// end is:
// - if not isEnd(): nothing
// - else: $
//
// In full-path matching mode, we put the slash at the START of the
// pattern, so start is:
// - if first pattern: same as part-matching mode
// - if not isStart(): nothing
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
// - if dots allowed or not possible: /
// - if dots possible and not allowed: /(?!\.)
// end is:
// - if last pattern, same as part-matching mode
// - else nothing
//
// Always put the (?:$|/) on negated tails, though, because that has to be
// there to bind the end of the negated pattern portion, and it's easier to
// just stick it in now rather than try to inject it later in the middle of
// the pattern.
//
// We can just always return the same end, and leave it up to the caller
// to know whether it's going to be used joined or in parts.
// And, if the start is adjusted slightly, can do the same there:
// - if not isStart: nothing
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
// - if dots allowed or not possible: (?:/|^)
// - if dots possible and not allowed: (?:/|^)(?!\.)
//
// But it's better to have a simpler binding without a conditional, for
// performance, so probably better to return both start options.
//
// Then the caller just ignores the end if it's not the first pattern,
// and the start always gets applied.
//
// But that's always going to be $ if it's the ending pattern, or nothing,
// so the caller can just attach $ at the end of the pattern when building.
//
// So the todo is:
// - better detect what kind of start is needed
// - return both flavors of starting pattern
// - attach $ at the end of the pattern when creating the actual RegExp
//
// Ah, but wait, no, that all only applies to the root when the first pattern
// is not an extglob. If the first pattern IS an extglob, then we need all
// that dot prevention biz to live in the extglob portions, because eg
// +(*|.x*) can match .xy but not .yx.
//
// So, return the two flavors if it's #root and the first child is not an
// AST, otherwise leave it to the child AST to handle it, and there,
// use the (?:^|/) style of start binding.
//
// Even simplified further:
// - Since the start for a join is eg /(?!\.) and the start for a part
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
// or start or whatever) and prepend ^ or / at the Regexp construction.
toRegExpSource(allowDot) {
const dot = allowDot ?? !!this.#options.dot;
if (this.#root === this)
this.#fillNegs();
if (!this.type) {
const noEmpty = this.isStart() && this.isEnd();
const src = this.#parts
.map(p => {
const [re, _, hasMagic, uflag] = typeof p === 'string'
? AST.#parseGlob(p, this.#hasMagic, noEmpty)
: p.toRegExpSource(allowDot);
this.#hasMagic = this.#hasMagic || hasMagic;
this.#uflag = this.#uflag || uflag;
return re;
})
.join('');
let start = '';
if (this.isStart()) {
if (typeof this.#parts[0] === 'string') {
// this is the string that will match the start of the pattern,
// so we need to protect against dots and such.
// '.' and '..' cannot match unless the pattern is that exactly,
// even if it starts with . or dot:true is set.
const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]);
if (!dotTravAllowed) {
const aps = addPatternStart;
// check if we have a possibility of matching . or ..,
// and prevent that.
const needNoTrav =
// dots are allowed, and the pattern starts with [ or .
(dot && aps.has(src.charAt(0))) ||
// the pattern starts with \., and then [ or .
(src.startsWith('\\.') && aps.has(src.charAt(2))) ||
// the pattern starts with \.\., and then [ or .
(src.startsWith('\\.\\.') && aps.has(src.charAt(4)));
// no need to prevent dots if it can't match a dot, or if a
// sub-pattern will be preventing it anyway.
const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : '';
}
}
}
// append the "end of path portion" pattern to negation tails
let end = '';
if (this.isEnd() &&
this.#root.#filledNegs &&
this.#parent?.type === '!') {
end = '(?:$|\\/)';
}
const final = start + src + end;
return [
final,
(0, unescape_js_1.unescape)(src),
(this.#hasMagic = !!this.#hasMagic),
this.#uflag,
];
}
// We need to calculate the body *twice* if it's a repeat pattern
// at the start, once in nodot mode, then again in dot mode, so a
// pattern like *(?) can match 'x.y'
const repeated = this.type === '*' || this.type === '+';
// some kind of extglob
const start = this.type === '!' ? '(?:(?!(?:' : '(?:';
let body = this.#partsToRegExp(dot);
if (this.isStart() && this.isEnd() && !body && this.type !== '!') {
// invalid extglob, has to at least be *something* present, if it's
// the entire path portion.
const s = this.toString();
this.#parts = [s];
this.type = null;
this.#hasMagic = undefined;
return [s, (0, unescape_js_1.unescape)(this.toString()), false, false];
}
// XXX abstract out this map method
let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot
? ''
: this.#partsToRegExp(true);
if (bodyDotAllowed === body) {
bodyDotAllowed = '';
}
if (bodyDotAllowed) {
body = `(?:${body})(?:${bodyDotAllowed})*?`;
}
// an empty !() is exactly equivalent to a starNoEmpty
let final = '';
if (this.type === '!' && this.#emptyExt) {
final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty;
}
else {
const close = this.type === '!'
? // !() must match something,but !(x) can match ''
'))' +
(this.isStart() && !dot && !allowDot ? startNoDot : '') +
star +
')'
: this.type === '@'
? ')'
: this.type === '?'
? ')?'
: this.type === '+' && bodyDotAllowed
? ')'
: this.type === '*' && bodyDotAllowed
? `)?`
: `)${this.type}`;
final = start + body + close;
}
return [
final,
(0, unescape_js_1.unescape)(body),
(this.#hasMagic = !!this.#hasMagic),
this.#uflag,
];
}
#partsToRegExp(dot) {
return this.#parts
.map(p => {
// extglob ASTs should only contain parent ASTs
/* c8 ignore start */
if (typeof p === 'string') {
throw new Error('string type in extglob ast??');
}
/* c8 ignore stop */
// can ignore hasMagic, because extglobs are already always magic
const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);
this.#uflag = this.#uflag || uflag;
return re;
})
.filter(p => !(this.isStart() && this.isEnd()) || !!p)
.join('|');
}
static #parseGlob(glob, hasMagic, noEmpty = false) {
let escaping = false;
let re = '';
let uflag = false;
// multiple stars that aren't globstars coalesce into one *
let inStar = false;
for (let i = 0; i < glob.length; i++) {
const c = glob.charAt(i);
if (escaping) {
escaping = false;
re += (reSpecials.has(c) ? '\\' : '') + c;
inStar = false;
continue;
}
if (c === '\\') {
if (i === glob.length - 1) {
re += '\\\\';
}
else {
escaping = true;
}
continue;
}
if (c === '[') {
const [src, needUflag, consumed, magic] = (0, brace_expressions_js_1.parseClass)(glob, i);
if (consumed) {
re += src;
uflag = uflag || needUflag;
i += consumed - 1;
hasMagic = hasMagic || magic;
inStar = false;
continue;
}
}
if (c === '*') {
if (inStar)
continue;
inStar = true;
re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star;
hasMagic = true;
continue;
}
else {
inStar = false;
}
if (c === '?') {
re += qmark;
hasMagic = true;
continue;
}
re += regExpEscape(c);
}
return [re, (0, unescape_js_1.unescape)(glob), !!hasMagic, uflag];
}
}
exports.AST = AST;
//# sourceMappingURL=ast.js.map

View File

@ -0,0 +1,19 @@
/**
* @license lucide-react v0.395.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Codepen = createLucideIcon("Codepen", [
["polygon", { points: "12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2", key: "srzb37" }],
["line", { x1: "12", x2: "12", y1: "22", y2: "15.5", key: "1t73f2" }],
["polyline", { points: "22 8.5 12 15.5 2 8.5", key: "ajlxae" }],
["polyline", { points: "2 15.5 12 8.5 22 15.5", key: "susrui" }],
["line", { x1: "12", x2: "12", y1: "2", y2: "8.5", key: "2cldga" }]
]);
export { Codepen as default };
//# sourceMappingURL=codepen.js.map

View File

@ -0,0 +1,16 @@
/**
* @license lucide-react v0.395.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CloudMoon = createLucideIcon("CloudMoon", [
["path", { d: "M13 16a3 3 0 1 1 0 6H7a5 5 0 1 1 4.9-6Z", key: "p44pc9" }],
["path", { d: "M10.1 9A6 6 0 0 1 16 4a4.24 4.24 0 0 0 6 6 6 6 0 0 1-3 5.197", key: "16nha0" }]
]);
export { CloudMoon as default };
//# sourceMappingURL=cloud-moon.js.map

View File

@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.env = void 0;
var detect_node_es_1 = require("detect-node-es");
exports.env = {
isNode: detect_node_es_1.isNode,
forceCache: false,
};

View File

@ -0,0 +1 @@
{"version":3,"file":"book-open.js","sources":["../../../src/icons/book-open.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BookOpen\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiAzaDZhNCA0IDAgMCAxIDQgNHYxNGEzIDMgMCAwIDAtMy0zSDJ6IiAvPgogIDxwYXRoIGQ9Ik0yMiAzaC02YTQgNCAwIDAgMC00IDR2MTRhMyAzIDAgMCAxIDMtM2g3eiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/book-open\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst BookOpen = createLucideIcon('BookOpen', [\n ['path', { d: 'M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z', key: 'vv98re' }],\n ['path', { d: 'M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z', key: '1cyq3y' }],\n]);\n\nexport default BookOpen;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7E,CAAC,CAAA,CAAA;;"}

View File

@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B 1C"},B:{"1":"0 1 2 3 4 5 6 7 8 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 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 6 7 8 yB zB 0B 1B 2B 3B 4B 5B 6B XC 7B YC 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC OC Q H R ZC 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 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB I aC PC bC 3C 4C","16":"2C","33":"9 WC J cB K D E F A B C L M G N O P dB AB BB CB DB EB FB GB HB IB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB 5C 6C"},D:{"1":"0 1 2 3 4 5 6 7 8 BC CC DC EC FC GC HC IC JC KC LC MC NC OC 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 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB I aC PC bC","16":"J cB K D E F A B C L M","33":"9 G N O P dB AB BB CB DB EB FB GB HB IB 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 XC 7B YC 8B 9B AC"},E:{"1":"F A B C L M G BD dC QC RC CD DD ED eC fC SC FD TC gC hC iC jC kC GD UC lC mC nC oC pC HD VC qC rC sC tC ID uC vC wC xC yC JD","16":"J cB K 7C cC 8C","33":"D E 9C AD"},F:{"1":"0 1 2 3 4 5 6 7 8 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC OC Q H R ZC 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","2":"F B C KD LD MD ND QC zC OD RC","33":"9 G N O P dB AB BB CB DB EB FB GB HB IB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB"},G:{"1":"UD VD WD XD YD ZD aD bD cD dD eD fD gD hD iD eC fC SC jD TC gC hC iC jC kC kD UC lC mC nC oC pC lD VC qC rC sC tC mD uC vC wC xC yC","16":"cC PD 0C QD","33":"E RD SD TD"},H:{"2":"nD"},I:{"1":"I","16":"WC J oD pD qD rD 0C","33":"sD tD"},J:{"16":"D A"},K:{"1":"H","2":"A B C QC zC RC"},L:{"1":"I"},M:{"1":"PC"},N:{"2":"A B"},O:{"1":"SC"},P:{"1":"9 AB BB CB DB EB FB GB HB IB yD dC zD 0D 1D 2D 3D TC UC VC 4D","16":"J","33":"uD vD wD xD"},Q:{"1":"5D"},R:{"1":"6D"},S:{"1":"8D","33":"7D"}},B:5,C:"CSS :any-link selector",D:true};

View File

@ -0,0 +1 @@
{"version":3,"file":"clipboard-plus.js","sources":["../../../src/icons/clipboard-plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ClipboardPlus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI0IiB4PSI4IiB5PSIyIiByeD0iMSIgcnk9IjEiIC8+CiAgPHBhdGggZD0iTTE2IDRoMmEyIDIgMCAwIDEgMiAydjE0YTIgMiAwIDAgMS0yIDJINmEyIDIgMCAwIDEtMi0yVjZhMiAyIDAgMCAxIDItMmgyIiAvPgogIDxwYXRoIGQ9Ik05IDE0aDYiIC8+CiAgPHBhdGggZD0iTTEyIDE3di02IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/clipboard-plus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ClipboardPlus = createLucideIcon('ClipboardPlus', [\n ['rect', { width: '8', height: '4', x: '8', y: '2', rx: '1', ry: '1', key: 'tgr4d6' }],\n [\n 'path',\n {\n d: 'M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2',\n key: '116196',\n },\n ],\n ['path', { d: 'M9 14h6', key: '159ibu' }],\n ['path', { d: 'M12 17v-6', key: '1y8rbf' }],\n]);\n\nexport default ClipboardPlus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB,iBAAiB,eAAiB,CAAA,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA,CAAA;AAAA,CACrF,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}

View File

@ -0,0 +1 @@
{"name":"globals","version":"13.24.0","requiresBuild":false,"files":{"license":{"checkedAt":1771921288227,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"index.js":{"checkedAt":1771921288227,"integrity":"sha512-VhySceycwo/hJ/Ks8R38KJ5djKl0pXcuuD1p2k4/5mPZQlRB7dH8s5iBGqOLJw/hKJNqlz4jNu4Rxg1783OSLw==","mode":420,"size":58},"globals.json":{"checkedAt":1771921288228,"integrity":"sha512-tnLwU/iJEDesMgfccRDLONSNQNirzFu2x9h4EKPtER50Tebwuia6ImyBoV3MIDHJ/EFyvH570A/c0I7JCvc0tQ==","mode":420,"size":48140},"package.json":{"checkedAt":1771921288228,"integrity":"sha512-u8T68Jn4k9SJqBMuoDnm6V7iAFiW0fH/ZCKBS5OqU9s44AjG30ksNP5qVVph5HZh5pCnHgPlSxJY1pbKDg8jjA==","mode":420,"size":971},"readme.md":{"checkedAt":1771921288228,"integrity":"sha512-LEG/U8A1nBMtxsbNjhWcb6P1Hia3j8Av5fXcCN1hE2dVbGTEaT0KW9pJ9rRRgQJp8fdPXKf3kF8HyJDhUGUwWg==","mode":420,"size":1662},"index.d.ts":{"checkedAt":1771921288228,"integrity":"sha512-IA9jpeeV8r7iRyQ6TESR5TJs4C3GwlCo8uQkYm7TOtuP30TvAnfMsCM2wIfv2ktbPzjwlGAnYS4Xr4PFMbjNiA==","mode":420,"size":165}}}

View File

@ -0,0 +1,35 @@
import type { TSESTree } from '@typescript-eslint/types';
import type { DefinitionType } from './DefinitionType';
declare abstract class DefinitionBase<Type extends DefinitionType, Node extends TSESTree.Node, Parent extends TSESTree.Node | null, Name extends TSESTree.Node> {
/**
* A unique ID for this instance - primarily used to help debugging and testing
*/
readonly $id: number;
readonly type: Type;
/**
* The `Identifier` node of this definition
* @public
*/
readonly name: Name;
/**
* The enclosing node of the name.
* @public
*/
readonly node: Node;
/**
* the enclosing statement node of the identifier.
* @public
*/
readonly parent: Parent;
constructor(type: Type, name: Name, node: Node, parent: Parent);
/**
* `true` if the variable is valid in a type context, false otherwise
*/
abstract readonly isTypeDefinition: boolean;
/**
* `true` if the variable is valid in a value context, false otherwise
*/
abstract readonly isVariableDefinition: boolean;
}
export { DefinitionBase };
//# sourceMappingURL=DefinitionBase.d.ts.map

View File

@ -0,0 +1,17 @@
/**
* @license lucide-react v0.395.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const MessageSquareCode = createLucideIcon("MessageSquareCode", [
["path", { d: "M10 7.5 8 10l2 2.5", key: "xb17xw" }],
["path", { d: "m14 7.5 2 2.5-2 2.5", key: "5rap1v" }],
["path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z", key: "1lielz" }]
]);
export { MessageSquareCode as default };
//# sourceMappingURL=message-square-code.js.map

View File

@ -0,0 +1,21 @@
/**
* @license lucide-react v0.395.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const BotOff = createLucideIcon("BotOff", [
["path", { d: "M13.67 8H18a2 2 0 0 1 2 2v4.33", key: "7az073" }],
["path", { d: "M2 14h2", key: "vft8re" }],
["path", { d: "M20 14h2", key: "4cs60a" }],
["path", { d: "M22 22 2 2", key: "1r8tn9" }],
["path", { d: "M8 8H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 1.414-.586", key: "s09a7a" }],
["path", { d: "M9 13v2", key: "rq6x2g" }],
["path", { d: "M9.67 4H12v2.33", key: "110xot" }]
]);
export { BotOff as default };
//# sourceMappingURL=bot-off.js.map

Some files were not shown because too many files have changed in this diff Show More