WIP: bootstrap and partial real Solana watcher implementation
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
'use strict';
|
||||
|
||||
// do not edit .js files directly - edit src/index.jst
|
||||
|
||||
|
||||
var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';
|
||||
|
||||
|
||||
module.exports = function equal(a, b) {
|
||||
if (a === b) return true;
|
||||
|
||||
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
||||
if (a.constructor !== b.constructor) return false;
|
||||
|
||||
var length, i, keys;
|
||||
if (Array.isArray(a)) {
|
||||
length = a.length;
|
||||
if (length != b.length) return false;
|
||||
for (i = length; i-- !== 0;)
|
||||
if (!equal(a[i], b[i])) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if ((a instanceof Map) && (b instanceof Map)) {
|
||||
if (a.size !== b.size) return false;
|
||||
for (i of a.entries())
|
||||
if (!b.has(i[0])) return false;
|
||||
for (i of a.entries())
|
||||
if (!equal(i[1], b.get(i[0]))) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((a instanceof Set) && (b instanceof Set)) {
|
||||
if (a.size !== b.size) return false;
|
||||
for (i of a.entries())
|
||||
if (!b.has(i[0])) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
||||
length = a.length;
|
||||
if (length != b.length) return false;
|
||||
for (i = length; i-- !== 0;)
|
||||
if (a[i] !== b[i]) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
||||
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
||||
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
||||
|
||||
keys = Object.keys(a);
|
||||
length = keys.length;
|
||||
if (length !== Object.keys(b).length) return false;
|
||||
|
||||
for (i = length; i-- !== 0;)
|
||||
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
||||
|
||||
for (i = length; i-- !== 0;) {
|
||||
var key = keys[i];
|
||||
|
||||
if (key === '_owner' && a.$$typeof) {
|
||||
// React-specific: avoid traversing React elements' _owner.
|
||||
// _owner contains circular references
|
||||
// and is not needed when comparing the actual elements (and not their owners)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!equal(a[key], b[key])) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// true if both NaN, false otherwise
|
||||
return a!==a && b!==b;
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "optionator",
|
||||
"version": "0.9.4",
|
||||
"author": "George Zahariev <z@georgezahariev.com>",
|
||||
"description": "option parsing and help generation",
|
||||
"homepage": "https://github.com/gkz/optionator",
|
||||
"keywords": [
|
||||
"options",
|
||||
"flags",
|
||||
"option parsing",
|
||||
"cli"
|
||||
],
|
||||
"files": [
|
||||
"lib",
|
||||
"README.md",
|
||||
"LICENSE"
|
||||
],
|
||||
"main": "./lib/",
|
||||
"bugs": "https://github.com/gkz/optionator/issues",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/gkz/optionator.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "make test"
|
||||
},
|
||||
"dependencies": {
|
||||
"prelude-ls": "^1.2.1",
|
||||
"deep-is": "^0.1.3",
|
||||
"word-wrap": "^1.2.5",
|
||||
"type-check": "^0.4.0",
|
||||
"levn": "^0.4.1",
|
||||
"fast-levenshtein": "^2.0.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"livescript": "^1.6.0",
|
||||
"mocha": "^10.4.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"name": "es-module-lexer",
|
||||
"version": "2.3.1",
|
||||
"description": "Lexes ES modules returning their import/export metadata",
|
||||
"main": "dist/lexer.cjs",
|
||||
"module": "dist/lexer.js",
|
||||
"types": "types/lexer.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./types/lexer.d.ts",
|
||||
"module": "./dist/lexer.js",
|
||||
"import": "./dist/lexer.js",
|
||||
"require": "./dist/lexer.cjs"
|
||||
},
|
||||
"./js": {
|
||||
"types": "./types/lexer.d.ts",
|
||||
"default": "./dist/lexer.asm.js"
|
||||
},
|
||||
"./minimal": {
|
||||
"types": "./types/lexer.minimal.d.ts",
|
||||
"module": "./dist/lexer.minimal.js",
|
||||
"import": "./dist/lexer.minimal.js",
|
||||
"require": "./dist/lexer.minimal.cjs"
|
||||
},
|
||||
"./minimal/js": {
|
||||
"types": "./types/lexer.minimal.d.ts",
|
||||
"default": "./dist/lexer.minimal.asm.js"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm install -g chomp ; chomp build",
|
||||
"test": "npm install -g chomp ; chomp test"
|
||||
},
|
||||
"author": "Guy Bedford",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.29.7",
|
||||
"@babel/core": "^7.29.7",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.29.7",
|
||||
"@swc/cli": "^0.8.1",
|
||||
"@swc/core": "^1.15.41",
|
||||
"@types/node": "^25.9.3",
|
||||
"kleur": "^4.1.5",
|
||||
"mocha": "^11.7.6",
|
||||
"terser": "^5.48.0",
|
||||
"typescript": "^6.0.3"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"types",
|
||||
"lexer.js"
|
||||
],
|
||||
"type": "module",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/guybedford/es-module-lexer.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/guybedford/es-module-lexer/issues"
|
||||
},
|
||||
"homepage": "https://github.com/guybedford/es-module-lexer#readme",
|
||||
"directories": {
|
||||
"lib": "lib",
|
||||
"test": "test"
|
||||
},
|
||||
"keywords": []
|
||||
}
|
||||
@@ -0,0 +1,239 @@
|
||||
import type { CompletionItemKind } from "#enums/completionItemKind";
|
||||
import type { ModuleKind } from "#enums/moduleKind";
|
||||
import type { __String, Path } from "../ast/index.ts";
|
||||
import type { CompilerOptions } from "./compilerOptions.ts";
|
||||
export type { CompilerOptions } from "./compilerOptions.ts";
|
||||
/**
|
||||
* A document identifier that can be either a file name (path string) or a document URI object.
|
||||
*
|
||||
* @example
|
||||
* // Using a file name
|
||||
* project.program.getSourceFile("/path/to/file.ts");
|
||||
*
|
||||
* // Using a URI
|
||||
* project.program.getSourceFile({ uri: "file:///path/to/file.ts" });
|
||||
*/
|
||||
export type DocumentIdentifier = string | {
|
||||
uri: string;
|
||||
};
|
||||
/**
|
||||
* A position within a document, combining a document identifier with an offset.
|
||||
*/
|
||||
export interface DocumentPosition {
|
||||
/** The document containing the position */
|
||||
document: DocumentIdentifier;
|
||||
/** The character offset within the document */
|
||||
position: number;
|
||||
}
|
||||
/**
|
||||
* Resolves a DocumentIdentifier to a file name.
|
||||
* If the identifier contains a URI, it is converted to a file name.
|
||||
*/
|
||||
export declare function resolveFileName(identifier: DocumentIdentifier): string;
|
||||
/**
|
||||
* Resolves a DocumentIdentifier to a document URI.
|
||||
* If the identifier contains a file name, it is converted to a URI.
|
||||
*/
|
||||
export declare function resolveDocumentURI(identifier: DocumentIdentifier): string;
|
||||
/**
|
||||
* Response from the initialize method.
|
||||
*/
|
||||
export interface InitializeResponse {
|
||||
/** Whether the host file system is case-sensitive */
|
||||
useCaseSensitiveFileNames: boolean;
|
||||
/** The server's current working directory */
|
||||
currentDirectory: string;
|
||||
}
|
||||
export interface ConfigResponse {
|
||||
options: Record<string, unknown>;
|
||||
fileNames: string[];
|
||||
}
|
||||
export interface LSPUpdateSnapshotParams {
|
||||
/**
|
||||
* @deprecated Use {@link openProjects} instead.
|
||||
* Path to a tsconfig.json file to open in the new snapshot.
|
||||
*/
|
||||
openProject?: string;
|
||||
/**
|
||||
* tsconfig.json files to open/load in the new snapshot. Opens are ref-counted
|
||||
* and persist across snapshots until closed via {@link closeProjects}.
|
||||
*/
|
||||
openProjects?: DocumentIdentifier[];
|
||||
/**
|
||||
* tsconfig.json files to release in the new snapshot. A project is only unloaded
|
||||
* once every API client that opened it closes it.
|
||||
*/
|
||||
closeProjects?: DocumentIdentifier[];
|
||||
/**
|
||||
* Files to keep open for the API client, mirroring LSP's `textDocument/didOpen`.
|
||||
* For each file, ancestor directories are searched for a tsconfig that contains it;
|
||||
* if one is found, that configured project is loaded and becomes the file's default
|
||||
* project. Otherwise the file is loaded into the inferred project (e.g. a d.ts in
|
||||
* node_modules that is not part of any project's import graph). Opens persist across
|
||||
* subsequent snapshots until the file is closed via {@link closeFiles}.
|
||||
* After calling updateSnapshot with openFiles, getDefaultProjectForFile returns the
|
||||
* resolved configured or inferred project.
|
||||
*/
|
||||
openFiles?: DocumentIdentifier[];
|
||||
/**
|
||||
* Files to release in the new snapshot. A file is only fully closed once every
|
||||
* API client that opened it closes it.
|
||||
*/
|
||||
closeFiles?: DocumentIdentifier[];
|
||||
}
|
||||
export interface FileChangeSummary {
|
||||
changed?: DocumentIdentifier[];
|
||||
created?: DocumentIdentifier[];
|
||||
deleted?: DocumentIdentifier[];
|
||||
}
|
||||
export type FileChanges = FileChangeSummary | {
|
||||
invalidateAll: true;
|
||||
};
|
||||
/**
|
||||
* Parameters for updateSnapshot.
|
||||
*/
|
||||
export interface UpdateSnapshotParams extends LSPUpdateSnapshotParams {
|
||||
fileChanges?: FileChanges;
|
||||
}
|
||||
/**
|
||||
* Builds the wire request for updateSnapshot, applying the deprecated `openProject`
|
||||
* compatibility shim: a single `openProject` is folded into `openProjects` and is
|
||||
* never sent on the wire.
|
||||
*/
|
||||
export declare function toUpdateSnapshotRequest(params?: UpdateSnapshotParams): UpdateSnapshotParams;
|
||||
/**
|
||||
* Changes to source files within a single project.
|
||||
*/
|
||||
export interface ProjectFileChanges {
|
||||
/** Source file paths whose content changed */
|
||||
changedFiles?: string[];
|
||||
/** Source file paths removed from the project's program */
|
||||
deletedFiles?: string[];
|
||||
}
|
||||
/**
|
||||
* Changes between two consecutive snapshots, reported per-project.
|
||||
*/
|
||||
export interface SnapshotChanges {
|
||||
/** Project handles mapped to their file changes. Projects not listed are unchanged. */
|
||||
changedProjects?: Record<string, ProjectFileChanges>;
|
||||
/** Project handles that were removed from the snapshot */
|
||||
removedProjects?: string[];
|
||||
}
|
||||
/**
|
||||
* Response from updateSnapshot.
|
||||
*/
|
||||
export interface UpdateSnapshotResponse {
|
||||
/** Handle for the newly created snapshot */
|
||||
snapshot: number;
|
||||
/** List of projects in the snapshot */
|
||||
projects: ProjectResponse[];
|
||||
/** Changes from the previous snapshot (absent for the first snapshot) */
|
||||
changes?: SnapshotChanges;
|
||||
}
|
||||
export interface ProjectResponse {
|
||||
id: Path;
|
||||
configFileName: string;
|
||||
compilerOptions: CompilerOptions;
|
||||
rootFiles: string[];
|
||||
}
|
||||
export interface SourceFileResponse {
|
||||
/** Base64-encoded binary AST data */
|
||||
data: string;
|
||||
}
|
||||
export interface SourceFileMetadata {
|
||||
isDefaultLibrary: boolean;
|
||||
isFromExternalLibrary: boolean;
|
||||
packageJsonType: string;
|
||||
packageJsonDirectory: string;
|
||||
impliedNodeFormat: ModuleKind;
|
||||
}
|
||||
export interface SymbolResponse {
|
||||
id: number;
|
||||
/**
|
||||
* The project the symbol was first observed in. Used as the default project for
|
||||
* follow-up lookups that need a project context (e.g. members/exports), since symbols
|
||||
* are shared snapshot-wide and such lookups can vary by project.
|
||||
*/
|
||||
project: Path;
|
||||
name: __String;
|
||||
flags: number;
|
||||
checkFlags: number;
|
||||
declarations?: string[];
|
||||
valueDeclaration?: string;
|
||||
parent?: number;
|
||||
exportSymbol?: number;
|
||||
}
|
||||
export interface TypeResponse {
|
||||
id: number;
|
||||
flags: number;
|
||||
objectFlags?: number;
|
||||
/** Literal value. BigInt literals are encoded as a decimal string (e.g. "-123") since JSON cannot represent bigint. Absent values are serialized as null. */
|
||||
value?: string | number | boolean | null;
|
||||
freshType?: number;
|
||||
regularType?: number;
|
||||
target?: number;
|
||||
typeParameters?: number[];
|
||||
outerTypeParameters?: number[];
|
||||
localTypeParameters?: number[];
|
||||
elementFlags?: number[];
|
||||
fixedLength?: number;
|
||||
readonly?: boolean;
|
||||
objectType?: number;
|
||||
indexType?: number;
|
||||
checkType?: number;
|
||||
extendsType?: number;
|
||||
baseType?: number;
|
||||
substConstraint?: number;
|
||||
texts?: string[];
|
||||
intrinsicName?: string;
|
||||
isThisType?: boolean;
|
||||
aliasTypeArguments?: number[];
|
||||
aliasSymbol?: number;
|
||||
symbol?: number;
|
||||
}
|
||||
export interface SignatureResponse {
|
||||
id: number;
|
||||
flags: number;
|
||||
declaration?: string;
|
||||
typeParameters?: number[];
|
||||
parameters?: number[];
|
||||
thisParameter?: number;
|
||||
target?: number;
|
||||
}
|
||||
export interface TypePredicateResponse {
|
||||
kind: number;
|
||||
parameterIndex: number;
|
||||
parameterName?: string;
|
||||
type?: TypeResponse;
|
||||
}
|
||||
export interface IndexInfoResponse {
|
||||
keyType: TypeResponse;
|
||||
valueType: TypeResponse;
|
||||
isReadonly?: boolean;
|
||||
declaration?: string;
|
||||
}
|
||||
export interface ProfileParams {
|
||||
dir: string;
|
||||
}
|
||||
export interface ProfileResult {
|
||||
file: string;
|
||||
}
|
||||
export interface CompletionEntryLabelDetailsResponse {
|
||||
detail?: string;
|
||||
description?: string;
|
||||
}
|
||||
export interface CompletionEntryResponse {
|
||||
name: string;
|
||||
kind?: CompletionItemKind;
|
||||
sortText?: string;
|
||||
insertText?: string;
|
||||
filterText?: string;
|
||||
detail?: string;
|
||||
labelDetails?: CompletionEntryLabelDetailsResponse;
|
||||
symbol?: SymbolResponse;
|
||||
}
|
||||
export interface CompletionInfoResponse {
|
||||
isIncomplete: boolean;
|
||||
entries: CompletionEntryResponse[];
|
||||
}
|
||||
//# sourceMappingURL=proto.d.ts.map
|
||||
@@ -0,0 +1,66 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const inverted = Symbol('inverted');
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const expectNull = Symbol('expectNull');
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const expectUndefined = Symbol('expectUndefined');
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const expectNumber = Symbol('expectNumber');
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const expectString = Symbol('expectString');
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const expectBoolean = Symbol('expectBoolean');
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const expectVoid = Symbol('expectVoid');
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const expectFunction = Symbol('expectFunction');
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const expectObject = Symbol('expectObject');
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const expectArray = Symbol('expectArray');
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const expectSymbol = Symbol('expectSymbol');
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const expectAny = Symbol('expectAny');
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const expectUnknown = Symbol('expectUnknown');
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const expectNever = Symbol('expectNever');
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const expectNullable = Symbol('expectNullable');
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const expectBigInt = Symbol('expectBigInt');
|
||||
@@ -0,0 +1,20 @@
|
||||
// Vitest resolves "vitest/browser" as a virtual module instead
|
||||
|
||||
// fake exports for static analysis
|
||||
export const page = null
|
||||
export const server = null
|
||||
export const userEvent = null
|
||||
export const cdp = null
|
||||
export const commands = null
|
||||
export const locators = null
|
||||
export const utils = null
|
||||
|
||||
const pool = globalThis.__vitest_worker__?.ctx?.pool
|
||||
|
||||
throw new Error(
|
||||
// eslint-disable-next-line prefer-template
|
||||
'vitest/browser can be imported only inside the Browser Mode. '
|
||||
+ (pool
|
||||
? `Your test is running in ${pool} pool. Make sure your regular tests are excluded from the "test.include" glob pattern.`
|
||||
: 'Instead, it was imported outside of Vitest.'),
|
||||
)
|
||||
@@ -0,0 +1,87 @@
|
||||
// @ts-ignore TS6133
|
||||
import { test } from "vitest";
|
||||
|
||||
import * as z from "zod/v3";
|
||||
import { util } from "../helpers/util.js";
|
||||
|
||||
test("first party switch", () => {
|
||||
const myType = z.string() as z.ZodFirstPartySchemaTypes;
|
||||
const def = myType._def;
|
||||
|
||||
switch (def.typeName) {
|
||||
case z.ZodFirstPartyTypeKind.ZodString:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodNumber:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodNaN:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodBigInt:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodBoolean:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodDate:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodUndefined:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodNull:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodAny:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodUnknown:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodNever:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodVoid:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodArray:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodObject:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodUnion:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodDiscriminatedUnion:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodIntersection:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodTuple:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodRecord:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodMap:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodSet:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodFunction:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodLazy:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodLiteral:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodEnum:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodEffects:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodNativeEnum:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodOptional:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodNullable:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodDefault:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodCatch:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodPromise:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodBranded:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodPipeline:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodSymbol:
|
||||
break;
|
||||
case z.ZodFirstPartyTypeKind.ZodReadonly:
|
||||
break;
|
||||
default:
|
||||
util.assertNever(def);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,44 @@
|
||||
export {};
|
||||
|
||||
import * as promises from "node:timers/promises";
|
||||
|
||||
// Note: The timer function definitions allow a single void-accepting argument
|
||||
// to be optional in arguments lists. This allows usage such as
|
||||
// `new Promise(resolve => setTimeout(resolve, ms))` (#54258)
|
||||
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
||||
type MakeVoidParameterOptional<TArgs extends any[]> = [void] extends TArgs ? Partial<TArgs> : TArgs;
|
||||
|
||||
declare global {
|
||||
function setImmediate<TArgs extends any[]>(
|
||||
callback: (...args: TArgs) => void,
|
||||
...args: MakeVoidParameterOptional<TArgs>
|
||||
): NodeJS.Immediate;
|
||||
namespace setImmediate {
|
||||
import __promisify__ = promises.setImmediate;
|
||||
export { __promisify__ };
|
||||
}
|
||||
|
||||
function setInterval<TArgs extends any[]>(
|
||||
callback: (...args: TArgs) => void,
|
||||
delay?: number,
|
||||
...args: MakeVoidParameterOptional<TArgs>
|
||||
): NodeJS.Timeout;
|
||||
|
||||
function setTimeout<TArgs extends any[]>(
|
||||
callback: (...args: TArgs) => void,
|
||||
delay?: number,
|
||||
...args: MakeVoidParameterOptional<TArgs>
|
||||
): NodeJS.Timeout;
|
||||
namespace setTimeout {
|
||||
import __promisify__ = promises.setTimeout;
|
||||
export { __promisify__ };
|
||||
}
|
||||
|
||||
function clearImmediate(immediate: NodeJS.Immediate | undefined): void;
|
||||
|
||||
function clearInterval(timeout: NodeJS.Timeout | string | number | undefined): void;
|
||||
|
||||
function clearTimeout(timeout: NodeJS.Timeout | string | number | undefined): void;
|
||||
|
||||
function queueMicrotask(callback: () => void): void;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import getPrototypeOf from "./getPrototypeOf.js";
|
||||
function _superPropBase(t, o) {
|
||||
for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t)););
|
||||
return t;
|
||||
}
|
||||
export { _superPropBase as default };
|
||||
@@ -0,0 +1,5 @@
|
||||
const file3 = require("./file3.js")
|
||||
|
||||
module.exports = function () {
|
||||
file3()
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
import type { LibDefinition } from '../variable';
|
||||
export declare const esnext_decorators: LibDefinition;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"json-rpc-error.d.ts","sourceRoot":"","sources":["../../src/json-rpc-error.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAUtC,KAAK,gBAAgB,GAAG,MAAM,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC;AAE5D;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IACzC,QAAQ,EACF,CAAC;QACG,IAAI,EACE,MAAM,GACN;YAEI,MAAM,EAAE,OAAO,CAAC;YAChB,OAAO,EAAE,MAAM,CAAC;YAChB,KAAK,EAAE,MAAM,CAAC;SACjB,GAED,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,QAAQ,GAAG,aAAa,GAAG,QAAQ,GAAG,YAAY,CAAC,CAAC;QACtG,UAAU,EAAE,OAAO,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;KAClB,GAAG,IAAI,CAAC,EAAE,GACX,IAAI,CAAC;IACX,GAAG,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAE7B,iBAAiB,CAAC,EACZ;QACI,KAAK,EAAE,MAAM,CAAC;QACd,YAAY,EAAE,CACR;YAEI,QAAQ,EAAE,MAAM,EAAE,CAAC;YACnB,IAAI,EAAE,MAAM,CAAC;YACb,cAAc,EAAE,MAAM,CAAC;YACvB,WAAW,CAAC,EAAE,MAAM,CAAC;SACxB,GACD;YAEI,MAAM,EAAE,OAAO,CAAC;YAChB,OAAO,EAAE,MAAM,CAAC;YAChB,SAAS,EAAE,MAAM,CAAC;YAClB,WAAW,CAAC,EAAE,MAAM,CAAC;SACxB,GACD;YAEI,QAAQ,EAAE,MAAM,EAAE,CAAC;YACnB,IAAI,EAAE,MAAM,CAAC;YACb,SAAS,EAAE,MAAM,CAAC;YAClB,WAAW,CAAC,EAAE,MAAM,CAAC;SACxB,CACN,EAAE,CAAC;KACP,EAAE,GACH,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACtB,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,UAAU,EAAE;QACR,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACzB,SAAS,EAAE,MAAM,CAAC;KACrB,GAAG,IAAI,CAAC;IACT,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,wBAAgB,8BAA8B,CAAC,qBAAqB,EAAE,OAAO,GAAG,WAAW,CAsD1F"}
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016-2025 Matteo Collina, David Mark Clements and the Pino contributors listed at <https://github.com/pinojs/pino#the-team> and in the README file.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,77 @@
|
||||
# flat-cache
|
||||
|
||||
> A stupidly simple key/value storage using files to persist the data
|
||||
|
||||
[](https://npmjs.org/package/flat-cache)
|
||||
[](https://github.com/jaredwray/flat-cache/actions/workflows/tests.yaml)
|
||||
[](https://codecov.io/github/jaredwray/flat-cache)
|
||||
[](https://npmjs.com/package/flat-cache)
|
||||
|
||||
## install
|
||||
|
||||
```bash
|
||||
npm i --save flat-cache
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const flatCache = require('flat-cache');
|
||||
// loads the cache, if one does not exists for the given
|
||||
// Id a new one will be prepared to be created
|
||||
const cache = flatCache.load('cacheId');
|
||||
|
||||
// sets a key on the cache
|
||||
cache.setKey('key', { foo: 'var' });
|
||||
|
||||
// get a key from the cache
|
||||
cache.getKey('key'); // { foo: 'var' }
|
||||
|
||||
// fetch the entire persisted object
|
||||
cache.all(); // { 'key': { foo: 'var' } }
|
||||
|
||||
// remove a key
|
||||
cache.removeKey('key'); // removes a key from the cache
|
||||
|
||||
// save it to disk
|
||||
cache.save(); // very important, if you don't save no changes will be persisted.
|
||||
// cache.save( true /* noPrune */) // can be used to prevent the removal of non visited keys
|
||||
|
||||
// loads the cache from a given directory, if one does
|
||||
// not exists for the given Id a new one will be prepared to be created
|
||||
const cache = flatCache.load('cacheId', path.resolve('./path/to/folder'));
|
||||
|
||||
// The following methods are useful to clear the cache
|
||||
// delete a given cache
|
||||
flatCache.clearCacheById('cacheId'); // removes the cacheId document if one exists.
|
||||
|
||||
// delete all cache
|
||||
flatCache.clearAll(); // remove the cache directory
|
||||
```
|
||||
|
||||
## Motivation for this module
|
||||
|
||||
I needed a super simple and dumb **in-memory cache** with optional disk persistance in order to make
|
||||
a script that will beutify files with `esformatter` only execute on the files that were changed since the last run.
|
||||
To make that possible we need to store the `fileSize` and `modificationTime` of the files. So a simple `key/value`
|
||||
storage was needed and Bam! this module was born.
|
||||
|
||||
## Important notes
|
||||
|
||||
- If no directory is especified when the `load` method is called, a folder named `.cache` will be created
|
||||
inside the module directory when `cache.save` is called. If you're committing your `node_modules` to any vcs, you
|
||||
might want to ignore the default `.cache` folder, or specify a custom directory.
|
||||
- The values set on the keys of the cache should be `stringify-able` ones, meaning no circular references
|
||||
- All the changes to the cache state are done to memory
|
||||
- I could have used a timer or `Object.observe` to deliver the changes to disk, but I wanted to keep this module
|
||||
intentionally dumb and simple
|
||||
- Non visited keys are removed when `cache.save()` is called. If this is not desired, you can pass `true` to the save call
|
||||
like: `cache.save( true /* noPrune */ )`.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
## Changelog
|
||||
|
||||
[changelog](./changelog.md)
|
||||
@@ -0,0 +1,10 @@
|
||||
import { M as ModuleMockerServerInterceptor } from './chunk-interceptor-native.js';
|
||||
import { registerModuleMocker } from './register.js';
|
||||
import './chunk-mocker.js';
|
||||
import './chunk-helpers.js';
|
||||
import './index.js';
|
||||
import './chunk-registry.js';
|
||||
import './chunk-pathe.M-eThtNZ.js';
|
||||
import '@vitest/spy';
|
||||
|
||||
registerModuleMocker(() => new ModuleMockerServerInterceptor());
|
||||
@@ -0,0 +1,48 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 'v*'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '*.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '*.md'
|
||||
|
||||
# This allows a subsequently queued workflow run to interrupt previous runs
|
||||
concurrency:
|
||||
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: ${{ matrix.node-version }} ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: read
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macOS-latest, windows-latest, ubuntu-latest]
|
||||
node-version: [18, 20, 22, 24]
|
||||
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Node ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm i --ignore-scripts
|
||||
|
||||
- name: Run tests
|
||||
run: npm run test
|
||||
@@ -0,0 +1,9 @@
|
||||
The MIT License
|
||||
|
||||
Copyright © 2017, [Ian Storm Taylor](https://ianstormtaylor.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
* Deprecated module: moved from curves/abstract/utils.js to curves/utils.js
|
||||
* @module
|
||||
*/
|
||||
import * as u from '../utils.ts';
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export type Hex = u.Hex;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export type PrivKey = u.PrivKey;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export type CHash = u.CHash;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export type FHash = u.FHash;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const abytes: typeof u.abytes;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const anumber: typeof u.anumber;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const bytesToHex: typeof u.bytesToHex;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const bytesToUtf8: typeof u.bytesToUtf8;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const concatBytes: typeof u.concatBytes;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const hexToBytes: typeof u.hexToBytes;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const isBytes: typeof u.isBytes;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const randomBytes: typeof u.randomBytes;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const utf8ToBytes: typeof u.utf8ToBytes;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const abool: typeof u.abool;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const numberToHexUnpadded: typeof u.numberToHexUnpadded;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const hexToNumber: typeof u.hexToNumber;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const bytesToNumberBE: typeof u.bytesToNumberBE;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const bytesToNumberLE: typeof u.bytesToNumberLE;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const numberToBytesBE: typeof u.numberToBytesBE;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const numberToBytesLE: typeof u.numberToBytesLE;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const numberToVarBytesBE: typeof u.numberToVarBytesBE;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const ensureBytes: typeof u.ensureBytes;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const equalBytes: typeof u.equalBytes;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const copyBytes: typeof u.copyBytes;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const asciiToBytes: typeof u.asciiToBytes;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const inRange: typeof u.inRange;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const aInRange: typeof u.aInRange;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const bitLen: typeof u.bitLen;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const bitGet: typeof u.bitGet;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const bitSet: typeof u.bitSet;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const bitMask: typeof u.bitMask;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const createHmacDrbg: typeof u.createHmacDrbg;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const notImplemented: typeof u.notImplemented;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const memoized: typeof u.memoized;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const validateObject: typeof u.validateObject;
|
||||
/** @deprecated moved to `@noble/curves/utils.js` */
|
||||
export declare const isHash: typeof u.isHash;
|
||||
//# sourceMappingURL=utils.d.ts.map
|
||||
@@ -0,0 +1,10 @@
|
||||
var isNativeReflectConstruct = require("./isNativeReflectConstruct.js");
|
||||
var setPrototypeOf = require("./setPrototypeOf.js");
|
||||
function _construct(t, e, r) {
|
||||
if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
|
||||
var o = [null];
|
||||
o.push.apply(o, e);
|
||||
var p = new (t.bind.apply(t, o))();
|
||||
return r && setPrototypeOf(p, r.prototype), p;
|
||||
}
|
||||
module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Shared utilities for the TypeScript API client.
|
||||
*/
|
||||
import type { FileSystem } from "./fs.ts";
|
||||
export interface ClientSocketOptions {
|
||||
/** Path to the Unix domain socket or Windows named pipe for API communication */
|
||||
pipe: string;
|
||||
}
|
||||
export interface ClientSpawnOptions {
|
||||
/** Path to the tsgo executable. Defaults to the bundled tsgo binary. */
|
||||
tsserverPath?: string;
|
||||
/** Current working directory */
|
||||
cwd?: string;
|
||||
/** Virtual filesystem callbacks */
|
||||
fs?: FileSystem;
|
||||
/**
|
||||
* When true, collect timing information for each request. The client
|
||||
* measures round-trip latency and bytes sent/received, and the server
|
||||
* measures its own per-request processing time; both are combined (along
|
||||
* with an estimated transport overhead) in the snapshot returned by
|
||||
* {@link API.getTimingInfo}.
|
||||
*/
|
||||
collectTiming?: boolean;
|
||||
}
|
||||
export type ClientOptions = ClientSocketOptions | ClientSpawnOptions;
|
||||
export declare function isSpawnOptions(options: ClientOptions): options is ClientSpawnOptions;
|
||||
export declare function resolveExePath(options: ClientSpawnOptions): string;
|
||||
export interface LSPConnectionOptions extends ClientSocketOptions {
|
||||
}
|
||||
export interface APIOptions extends ClientSpawnOptions {
|
||||
}
|
||||
//# sourceMappingURL=options.d.ts.map
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"name": "magic-string",
|
||||
"version": "0.30.21",
|
||||
"type": "commonjs",
|
||||
"description": "Modify strings, generate sourcemaps",
|
||||
"keywords": [
|
||||
"string",
|
||||
"string manipulation",
|
||||
"sourcemap",
|
||||
"templating",
|
||||
"transpilation"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Rich-Harris/magic-string.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": "Rich Harris",
|
||||
"main": "./dist/magic-string.cjs.js",
|
||||
"module": "./dist/magic-string.es.mjs",
|
||||
"sideEffects": false,
|
||||
"jsnext:main": "./dist/magic-string.es.mjs",
|
||||
"types": "./dist/magic-string.cjs.d.ts",
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": {
|
||||
"import": "./dist/magic-string.es.mjs",
|
||||
"require": "./dist/magic-string.cjs.js"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist/*",
|
||||
"index.d.ts",
|
||||
"README.md"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.38.0",
|
||||
"@rollup/plugin-node-resolve": "^16.0.3",
|
||||
"@rollup/plugin-replace": "^6.0.2",
|
||||
"benchmark": "^2.1.4",
|
||||
"bumpp": "^10.3.1",
|
||||
"conventional-changelog-cli": "^5.0.0",
|
||||
"eslint": "^9.38.0",
|
||||
"prettier": "^3.6.2",
|
||||
"publint": "^0.3.15",
|
||||
"rollup": "^4.52.5",
|
||||
"source-map-js": "^1.2.1",
|
||||
"source-map-support": "^0.5.21",
|
||||
"vitest": "^4.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jridgewell/sourcemap-codec": "^1.5.5"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
||||
"format": "prettier --single-quote --print-width 100 --use-tabs --write .",
|
||||
"lint": "eslint src test && publint",
|
||||
"lint:fix": "eslint src test --fix",
|
||||
"release": "bumpp -x \"pnpm run changelog\" --all",
|
||||
"pretest": "pnpm run build",
|
||||
"test": "vitest run",
|
||||
"test:dev": "vitest",
|
||||
"bench": "pnpm run build && node benchmark/index.mjs",
|
||||
"watch": "rollup -cw"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,3 @@
|
||||
var why = require('./')
|
||||
|
||||
require('siginfo')(why, true)
|
||||
@@ -0,0 +1,21 @@
|
||||
import { _ as _get_prototype_of } from "./_get_prototype_of.js";
|
||||
import { _ as _is_native_reflect_construct } from "./_is_native_reflect_construct.js";
|
||||
import { _ as _possible_constructor_return } from "./_possible_constructor_return.js";
|
||||
|
||||
function _create_super(Derived) {
|
||||
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
||||
|
||||
return function _createSuperInternal() {
|
||||
var Super = _get_prototype_of(Derived), result;
|
||||
|
||||
if (hasNativeReflectConstruct) {
|
||||
var NewTarget = _get_prototype_of(this).constructor;
|
||||
result = Reflect.construct(Super, arguments, NewTarget);
|
||||
} else {
|
||||
result = Super.apply(this, arguments);
|
||||
}
|
||||
|
||||
return _possible_constructor_return(this, result);
|
||||
};
|
||||
}
|
||||
export { _create_super as _ };
|
||||
Reference in New Issue
Block a user