WIP: bootstrap and partial real Solana watcher implementation
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"main": "../../cjs/_await_async_generator.cjs",
|
||||
"module": "../../esm/_await_async_generator.js"
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,18 @@
|
||||
export namespace util {
|
||||
/**
|
||||
* Retrieves a header name and returns its lowercase value.
|
||||
* @param value Header name
|
||||
*/
|
||||
export function headerNameToString (value: string | Buffer): string
|
||||
|
||||
/**
|
||||
* Receives a header object and returns the parsed value.
|
||||
* @param headers Header object
|
||||
* @param obj Object to specify a proxy object. Used to assign parsed values.
|
||||
* @returns If `obj` is specified, it is equivalent to `obj`.
|
||||
*/
|
||||
export function parseHeaders (
|
||||
headers: (Buffer | string | (Buffer | string)[])[],
|
||||
obj?: Record<string, string | string[]>
|
||||
): Record<string, string | string[]>
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
import { DeepBrandOptions, DeepBrandOptionsDefaults, StrictEqualUsingBranding } from './branding';
|
||||
import type { And, Extends, ExtendsExcludingAnyOrNever, IsAny, IsNever, IsUnknown, Not, OptionalKeys, StrictEqualUsingTSInternalIdenticalToOperator, UsefulKeys } from './utils';
|
||||
/**
|
||||
* Determines the printable type representation for a given type.
|
||||
*/
|
||||
export type PrintType<T> = IsUnknown<T> extends true ? 'unknown' : IsNever<T> extends true ? 'never' : IsAny<T> extends true ? never : boolean extends T ? 'boolean' : T extends boolean ? `literal boolean: ${T}` : string extends T ? 'string' : T extends string ? `literal string: ${T}` : number extends T ? 'number' : T extends number ? `literal number: ${T}` : bigint extends T ? 'bigint' : T extends bigint ? `literal bigint: ${T}` : T extends null ? 'null' : T extends undefined ? 'undefined' : T extends (...args: any[]) => any ? 'function' : '...';
|
||||
/**
|
||||
* Helper for showing end-user a hint why their type assertion is failing.
|
||||
* This swaps "leaf" types with a literal message about what the actual and
|
||||
* expected types are. Needs to check for `Not<IsAny<Actual>>` because
|
||||
* otherwise `LeafTypeOf<Actual>` returns `never`, which extends everything 🤔
|
||||
*/
|
||||
export type MismatchInfo<Actual, Expected, Options extends DeepBrandOptions = DeepBrandOptionsDefaults> = And<[Extends<PrintType<Actual>, '...'>, Not<IsAny<Actual>>]> extends true ? And<[Extends<any[], Actual>, Extends<any[], Expected>]> extends true ? Array<MismatchInfo<Extract<Actual, any[]>[number], Extract<Expected, any[]>[number], Options>> : Optionalify<{
|
||||
[K in UsefulKeys<Actual> | UsefulKeys<Expected>]: MismatchInfo<K extends keyof Actual ? Actual[K] : never, K extends keyof Expected ? Expected[K] : never, Options>;
|
||||
}, OptionalKeys<Expected>> : StrictEqualUsingBranding<Actual, Expected, Options> extends true ? Actual : `Expected: ${PrintType<Expected>}, Actual: ${PrintType<Exclude<Actual, Expected>>}`;
|
||||
/**
|
||||
* Helper for making some keys of a type optional. Only useful so far for `MismatchInfo` - it makes sure we
|
||||
* don't get bogus errors about optional properties mismatching, when actually it's something else that's wrong.
|
||||
*
|
||||
* - Note: this helper is a no-op if there are no optional keys in the type.
|
||||
*/
|
||||
export type Optionalify<T, TOptionalKeys> = [TOptionalKeys] extends [never] ? T : ({
|
||||
[K in Exclude<keyof T, TOptionalKeys>]: T[K];
|
||||
} & {
|
||||
[K in Extract<keyof T, TOptionalKeys>]?: T[K];
|
||||
}) extends infer X ? {
|
||||
[K in keyof X]: X[K];
|
||||
} : never;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const inverted: unique symbol;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
type Inverted<T> = {
|
||||
[inverted]: T;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectNull: unique symbol;
|
||||
export type ExpectNull<T> = {
|
||||
[expectNull]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, null>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectUndefined: unique symbol;
|
||||
export type ExpectUndefined<T> = {
|
||||
[expectUndefined]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, undefined>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectNumber: unique symbol;
|
||||
export type ExpectNumber<T> = {
|
||||
[expectNumber]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, number>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectString: unique symbol;
|
||||
export type ExpectString<T> = {
|
||||
[expectString]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, string>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectBoolean: unique symbol;
|
||||
export type ExpectBoolean<T> = {
|
||||
[expectBoolean]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, boolean>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectVoid: unique symbol;
|
||||
export type ExpectVoid<T> = {
|
||||
[expectVoid]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, void>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectFunction: unique symbol;
|
||||
export type ExpectFunction<T> = {
|
||||
[expectFunction]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, (...args: any[]) => any>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectObject: unique symbol;
|
||||
export type ExpectObject<T> = {
|
||||
[expectObject]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, object>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectArray: unique symbol;
|
||||
export type ExpectArray<T> = {
|
||||
[expectArray]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, any[]>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectSymbol: unique symbol;
|
||||
export type ExpectSymbol<T> = {
|
||||
[expectSymbol]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, symbol>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectAny: unique symbol;
|
||||
export type ExpectAny<T> = {
|
||||
[expectAny]: T;
|
||||
result: IsAny<T>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectUnknown: unique symbol;
|
||||
export type ExpectUnknown<T> = {
|
||||
[expectUnknown]: T;
|
||||
result: IsUnknown<T>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectNever: unique symbol;
|
||||
export type ExpectNever<T> = {
|
||||
[expectNever]: T;
|
||||
result: IsNever<T>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectNullable: unique symbol;
|
||||
export type ExpectNullable<T> = {
|
||||
[expectNullable]: T;
|
||||
result: Not<StrictEqualUsingTSInternalIdenticalToOperator<T, NonNullable<T>>>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectBigInt: unique symbol;
|
||||
export type ExpectBigInt<T> = {
|
||||
[expectBigInt]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, bigint>;
|
||||
};
|
||||
/**
|
||||
* Checks if the result of an expecter matches the specified options, and
|
||||
* resolves to a fairly readable error message if not.
|
||||
*/
|
||||
export type Scolder<Expecter extends {
|
||||
result: boolean;
|
||||
}, Options extends {
|
||||
positive: boolean;
|
||||
}> = Expecter['result'] extends Options['positive'] ? () => true : Options['positive'] extends true ? Expecter : Inverted<Expecter>;
|
||||
export {};
|
||||
@@ -0,0 +1,35 @@
|
||||
'use strict'
|
||||
|
||||
const { test } = require('node:test')
|
||||
const assert = require('node:assert')
|
||||
const { readFile } = require('fs/promises')
|
||||
const { join } = require('path')
|
||||
const { file } = require('./helper')
|
||||
const ThreadStream = require('..')
|
||||
|
||||
// This test verifies that TypeScript files can be loaded via ts-node
|
||||
// when native type stripping is not enabled in the worker thread.
|
||||
// Unlike ts.test.ts which passes --experimental-strip-types via execArgv,
|
||||
// this test does NOT pass that flag, so the worker will fall back to ts-node.
|
||||
test('typescript module with ts-node fallback', async function (t) {
|
||||
const dest = file()
|
||||
const stream = new ThreadStream({
|
||||
filename: join(__dirname, 'ts', 'to-file.ts'),
|
||||
workerData: { dest },
|
||||
sync: false
|
||||
})
|
||||
|
||||
t.after(() => stream.end())
|
||||
|
||||
assert.ok(stream.write('hello world\n'))
|
||||
assert.ok(stream.write('something else\n'))
|
||||
|
||||
stream.end()
|
||||
|
||||
await new Promise((resolve) => {
|
||||
stream.on('close', resolve)
|
||||
})
|
||||
|
||||
const data = await readFile(dest, 'utf8')
|
||||
assert.strictEqual(data, 'hello world\nsomething else\n')
|
||||
})
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"brace-expressions.d.ts","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AAgCA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,OAAO;CAClB,CAAA;AAQD,eAAO,MAAM,UAAU,GACrB,MAAM,MAAM,EACZ,UAAU,MAAM,KACf,gBA2HF,CAAA"}
|
||||
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
// THIS CODE WAS AUTOMATICALLY GENERATED
|
||||
// DO NOT EDIT THIS CODE BY HAND
|
||||
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
|
||||
// npx nx generate-lib repo
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.es2017_arraybuffer = void 0;
|
||||
const base_config_1 = require("./base-config");
|
||||
exports.es2017_arraybuffer = {
|
||||
libs: [],
|
||||
variables: [['ArrayBufferConstructor', base_config_1.TYPE]],
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
var _typeof = require("./typeof.js")["default"];
|
||||
function toPrimitive(t, r) {
|
||||
if ("object" != _typeof(t) || !t) return t;
|
||||
var e = t[Symbol.toPrimitive];
|
||||
if (void 0 !== e) {
|
||||
var i = e.call(t, r || "default");
|
||||
if ("object" != _typeof(i)) return i;
|
||||
throw new TypeError("@@toPrimitive must return a primitive value.");
|
||||
}
|
||||
return ("string" === r ? String : Number)(t);
|
||||
}
|
||||
module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
@@ -0,0 +1,40 @@
|
||||
'use strict'
|
||||
|
||||
const Benchmark = require('benchmark')
|
||||
const sjson = require('..')
|
||||
|
||||
const internals = {
|
||||
text: '{ "a": 5, "b": 6, "proto": { "x": 7 }, "c": { "d": 0, "e": "text", "\\u005f\\u005fproto": { "y": 8 }, "f": { "g": 2 } } }',
|
||||
suspectRx: /"(?:_|\\u005f)(?:_|\\u005f)(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006f)(?:t|\\u0074)(?:o|\\u006f)(?:_|\\u005f)(?:_|\\u005f)"/
|
||||
}
|
||||
|
||||
const suite = new Benchmark.Suite()
|
||||
|
||||
suite
|
||||
.add('JSON.parse', () => {
|
||||
JSON.parse(internals.text)
|
||||
})
|
||||
.add('secure-json-parse parse', () => {
|
||||
sjson.parse(internals.text)
|
||||
})
|
||||
.add('secure-json-parse safeParse', () => {
|
||||
sjson.safeParse(internals.text)
|
||||
})
|
||||
.add('reviver', () => {
|
||||
JSON.parse(internals.text, internals.reviver)
|
||||
})
|
||||
.on('cycle', (event) => {
|
||||
console.log(String(event.target))
|
||||
})
|
||||
.on('complete', function () {
|
||||
console.log('Fastest is ' + this.filter('fastest').map('name'))
|
||||
})
|
||||
.run({ async: true })
|
||||
|
||||
internals.reviver = function (key, value) {
|
||||
if (key.match(internals.suspectRx)) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
return value
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"scriptKind.d.ts","sourceRoot":"","sources":["../../src/enums/scriptKind.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,UAAU,EAAE,GAAG,CAAC"}
|
||||
@@ -0,0 +1,3 @@
|
||||
const { version } = require("../package.json");
|
||||
exports.version = version;
|
||||
exports.versionMajorMinor = "7.0";
|
||||
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
|
||||
function _array_like_to_array(arr, len) {
|
||||
if (len == null || len > arr.length) len = arr.length;
|
||||
|
||||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
||||
|
||||
return arr2;
|
||||
}
|
||||
exports._ = _array_like_to_array;
|
||||
@@ -0,0 +1,116 @@
|
||||
import type { $ZodStringFormats } from "../core/checks.js";
|
||||
import type * as errors from "../core/errors.js";
|
||||
import * as util from "../core/util.js";
|
||||
|
||||
const error: () => errors.$ZodErrorMap = () => {
|
||||
const Sizable: Record<string, { unit: string; verb: string }> = {
|
||||
string: { unit: "字符", verb: "包含" },
|
||||
file: { unit: "字节", verb: "包含" },
|
||||
array: { unit: "项", verb: "包含" },
|
||||
set: { unit: "项", verb: "包含" },
|
||||
};
|
||||
|
||||
function getSizing(origin: string): { unit: string; verb: string } | null {
|
||||
return Sizable[origin] ?? null;
|
||||
}
|
||||
|
||||
const FormatDictionary: {
|
||||
[k in $ZodStringFormats | (string & {})]?: string;
|
||||
} = {
|
||||
regex: "输入",
|
||||
email: "电子邮件",
|
||||
url: "URL",
|
||||
emoji: "表情符号",
|
||||
uuid: "UUID",
|
||||
uuidv4: "UUIDv4",
|
||||
uuidv6: "UUIDv6",
|
||||
nanoid: "nanoid",
|
||||
guid: "GUID",
|
||||
cuid: "cuid",
|
||||
cuid2: "cuid2",
|
||||
ulid: "ULID",
|
||||
xid: "XID",
|
||||
ksuid: "KSUID",
|
||||
datetime: "ISO日期时间",
|
||||
date: "ISO日期",
|
||||
time: "ISO时间",
|
||||
duration: "ISO时长",
|
||||
ipv4: "IPv4地址",
|
||||
ipv6: "IPv6地址",
|
||||
cidrv4: "IPv4网段",
|
||||
cidrv6: "IPv6网段",
|
||||
base64: "base64编码字符串",
|
||||
base64url: "base64url编码字符串",
|
||||
json_string: "JSON字符串",
|
||||
e164: "E.164号码",
|
||||
jwt: "JWT",
|
||||
template_literal: "输入",
|
||||
};
|
||||
|
||||
const TypeDictionary: {
|
||||
[k in errors.$ZodInvalidTypeExpected | (string & {})]?: string;
|
||||
} = {
|
||||
nan: "NaN",
|
||||
number: "数字",
|
||||
array: "数组",
|
||||
null: "空值(null)",
|
||||
};
|
||||
|
||||
return (issue) => {
|
||||
switch (issue.code) {
|
||||
case "invalid_type": {
|
||||
const expected = TypeDictionary[issue.expected] ?? issue.expected;
|
||||
const receivedType = util.parsedType(issue.input);
|
||||
const received = TypeDictionary[receivedType] ?? receivedType;
|
||||
if (/^[A-Z]/.test(issue.expected)) {
|
||||
return `无效输入:期望 instanceof ${issue.expected},实际接收 ${received}`;
|
||||
}
|
||||
return `无效输入:期望 ${expected},实际接收 ${received}`;
|
||||
}
|
||||
case "invalid_value":
|
||||
if (issue.values.length === 1) return `无效输入:期望 ${util.stringifyPrimitive(issue.values[0])}`;
|
||||
return `无效选项:期望以下之一 ${util.joinValues(issue.values, "|")}`;
|
||||
case "too_big": {
|
||||
const adj = issue.inclusive ? "<=" : "<";
|
||||
const sizing = getSizing(issue.origin);
|
||||
if (sizing)
|
||||
return `数值过大:期望 ${issue.origin ?? "值"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "个元素"}`;
|
||||
return `数值过大:期望 ${issue.origin ?? "值"} ${adj}${issue.maximum.toString()}`;
|
||||
}
|
||||
case "too_small": {
|
||||
const adj = issue.inclusive ? ">=" : ">";
|
||||
const sizing = getSizing(issue.origin);
|
||||
if (sizing) {
|
||||
return `数值过小:期望 ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
|
||||
}
|
||||
return `数值过小:期望 ${issue.origin} ${adj}${issue.minimum.toString()}`;
|
||||
}
|
||||
case "invalid_format": {
|
||||
const _issue = issue as errors.$ZodStringFormatIssues;
|
||||
if (_issue.format === "starts_with") return `无效字符串:必须以 "${_issue.prefix}" 开头`;
|
||||
if (_issue.format === "ends_with") return `无效字符串:必须以 "${_issue.suffix}" 结尾`;
|
||||
if (_issue.format === "includes") return `无效字符串:必须包含 "${_issue.includes}"`;
|
||||
if (_issue.format === "regex") return `无效字符串:必须满足正则表达式 ${_issue.pattern}`;
|
||||
return `无效${FormatDictionary[_issue.format] ?? issue.format}`;
|
||||
}
|
||||
case "not_multiple_of":
|
||||
return `无效数字:必须是 ${issue.divisor} 的倍数`;
|
||||
case "unrecognized_keys":
|
||||
return `出现未知的键(key): ${util.joinValues(issue.keys, ", ")}`;
|
||||
case "invalid_key":
|
||||
return `${issue.origin} 中的键(key)无效`;
|
||||
case "invalid_union":
|
||||
return "无效输入";
|
||||
case "invalid_element":
|
||||
return `${issue.origin} 中包含无效值(value)`;
|
||||
default:
|
||||
return `无效输入`;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
export default function (): { localeError: errors.$ZodErrorMap } {
|
||||
return {
|
||||
localeError: error(),
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// ESM wrapper for pg
|
||||
import pg from '../lib/index.js'
|
||||
|
||||
// Re-export all the properties
|
||||
export const Client = pg.Client
|
||||
export const Pool = pg.Pool
|
||||
export const Connection = pg.Connection
|
||||
export const types = pg.types
|
||||
export const Query = pg.Query
|
||||
export const DatabaseError = pg.DatabaseError
|
||||
export const escapeIdentifier = pg.escapeIdentifier
|
||||
export const escapeLiteral = pg.escapeLiteral
|
||||
export const Result = pg.Result
|
||||
export const TypeOverrides = pg.TypeOverrides
|
||||
|
||||
// Also export the defaults
|
||||
export const defaults = pg.defaults
|
||||
|
||||
// Re-export the default
|
||||
export default pg
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"tower.d.ts","sourceRoot":"","sources":["../src/abstract/tower.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAO/E,MAAM,MAAM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d,UAAU,CAAC,EAAE,EAAE,CAAC;IAChB,cAAc,EAAE,WAAW,CAAC;IAC5B,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,CAAC;IAC5B,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,CAAC;IAC7B,qBAAqB,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,IAAI,CAAC;CAC5C,CAAC;AAosBF,wBAAgB,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG;IAC1C,EAAE,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC/E,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,OAAO,CAAC;CACf,CAMA"}
|
||||
@@ -0,0 +1,7 @@
|
||||
var classApplyDescriptorSet = require("./classApplyDescriptorSet.js");
|
||||
var assertClassBrand = require("./assertClassBrand.js");
|
||||
var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js");
|
||||
function _classStaticPrivateFieldSpecSet(s, t, r, e) {
|
||||
return assertClassBrand(t, s), classCheckPrivateStaticFieldDescriptor(r, "set"), classApplyDescriptorSet(s, r, e), e;
|
||||
}
|
||||
module.exports = _classStaticPrivateFieldSpecSet, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
@@ -0,0 +1 @@
|
||||
export { _ as default } from "../esm/_define_enumerable_properties.js";
|
||||
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* A set of common reasons for calling nullThrows
|
||||
*/
|
||||
export declare const NullThrowsReasons: {
|
||||
readonly MissingParent: 'Expected node to have a parent.';
|
||||
readonly MissingToken: (token: string, thing: string) => string;
|
||||
};
|
||||
/**
|
||||
* Assert that a value must not be null or undefined.
|
||||
* This is a nice explicit alternative to the non-null assertion operator.
|
||||
*/
|
||||
export declare function nullThrows<T>(value: T, message: string): NonNullable<T>;
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,374 @@
|
||||
/**
|
||||
* @fileoverview Rule to enforce line breaks after each array element
|
||||
* @author Jan Peer Stöcklmair <https://github.com/JPeer264>
|
||||
* @deprecated in ESLint v8.53.0
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
const astUtils = require("./utils/ast-utils");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Rule Definition
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** @type {import('../types').Rule.RuleModule} */
|
||||
module.exports = {
|
||||
meta: {
|
||||
deprecated: {
|
||||
message: "Formatting rules are being moved out of ESLint core.",
|
||||
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
|
||||
deprecatedSince: "8.53.0",
|
||||
availableUntil: "11.0.0",
|
||||
replacedBy: [
|
||||
{
|
||||
message:
|
||||
"ESLint Stylistic now maintains deprecated stylistic core rules.",
|
||||
url: "https://eslint.style/guide/migration",
|
||||
plugin: {
|
||||
name: "@stylistic/eslint-plugin",
|
||||
url: "https://eslint.style",
|
||||
},
|
||||
rule: {
|
||||
name: "array-element-newline",
|
||||
url: "https://eslint.style/rules/array-element-newline",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
type: "layout",
|
||||
|
||||
docs: {
|
||||
description: "Enforce line breaks after each array element",
|
||||
recommended: false,
|
||||
url: "https://eslint.org/docs/latest/rules/array-element-newline",
|
||||
},
|
||||
|
||||
fixable: "whitespace",
|
||||
|
||||
schema: {
|
||||
definitions: {
|
||||
basicConfig: {
|
||||
oneOf: [
|
||||
{
|
||||
enum: ["always", "never", "consistent"],
|
||||
},
|
||||
{
|
||||
type: "object",
|
||||
properties: {
|
||||
multiline: {
|
||||
type: "boolean",
|
||||
},
|
||||
minItems: {
|
||||
type: ["integer", "null"],
|
||||
minimum: 0,
|
||||
},
|
||||
},
|
||||
additionalProperties: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
type: "array",
|
||||
items: [
|
||||
{
|
||||
oneOf: [
|
||||
{
|
||||
$ref: "#/definitions/basicConfig",
|
||||
},
|
||||
{
|
||||
type: "object",
|
||||
properties: {
|
||||
ArrayExpression: {
|
||||
$ref: "#/definitions/basicConfig",
|
||||
},
|
||||
ArrayPattern: {
|
||||
$ref: "#/definitions/basicConfig",
|
||||
},
|
||||
},
|
||||
additionalProperties: false,
|
||||
minProperties: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
messages: {
|
||||
unexpectedLineBreak: "There should be no linebreak here.",
|
||||
missingLineBreak: "There should be a linebreak after this element.",
|
||||
},
|
||||
},
|
||||
|
||||
create(context) {
|
||||
const sourceCode = context.sourceCode;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Helpers
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Normalizes a given option value.
|
||||
* @param {string|Object|undefined} providedOption An option value to parse.
|
||||
* @returns {{multiline: boolean, minItems: number}} Normalized option object.
|
||||
*/
|
||||
function normalizeOptionValue(providedOption) {
|
||||
let consistent = false;
|
||||
let multiline = false;
|
||||
let minItems;
|
||||
|
||||
const option = providedOption || "always";
|
||||
|
||||
if (!option || option === "always" || option.minItems === 0) {
|
||||
minItems = 0;
|
||||
} else if (option === "never") {
|
||||
minItems = Number.POSITIVE_INFINITY;
|
||||
} else if (option === "consistent") {
|
||||
consistent = true;
|
||||
minItems = Number.POSITIVE_INFINITY;
|
||||
} else {
|
||||
multiline = Boolean(option.multiline);
|
||||
minItems = option.minItems || Number.POSITIVE_INFINITY;
|
||||
}
|
||||
|
||||
return { consistent, multiline, minItems };
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes a given option value.
|
||||
* @param {string|Object|undefined} options An option value to parse.
|
||||
* @returns {{ArrayExpression: {multiline: boolean, minItems: number}, ArrayPattern: {multiline: boolean, minItems: number}}} Normalized option object.
|
||||
*/
|
||||
function normalizeOptions(options) {
|
||||
if (options && (options.ArrayExpression || options.ArrayPattern)) {
|
||||
let expressionOptions, patternOptions;
|
||||
|
||||
if (options.ArrayExpression) {
|
||||
expressionOptions = normalizeOptionValue(
|
||||
options.ArrayExpression,
|
||||
);
|
||||
}
|
||||
|
||||
if (options.ArrayPattern) {
|
||||
patternOptions = normalizeOptionValue(options.ArrayPattern);
|
||||
}
|
||||
|
||||
return {
|
||||
ArrayExpression: expressionOptions,
|
||||
ArrayPattern: patternOptions,
|
||||
};
|
||||
}
|
||||
|
||||
const value = normalizeOptionValue(options);
|
||||
|
||||
return { ArrayExpression: value, ArrayPattern: value };
|
||||
}
|
||||
|
||||
/**
|
||||
* Reports that there shouldn't be a line break after the first token
|
||||
* @param {Token} token The token to use for the report.
|
||||
* @returns {void}
|
||||
*/
|
||||
function reportNoLineBreak(token) {
|
||||
const tokenBefore = sourceCode.getTokenBefore(token, {
|
||||
includeComments: true,
|
||||
});
|
||||
|
||||
context.report({
|
||||
loc: {
|
||||
start: tokenBefore.loc.end,
|
||||
end: token.loc.start,
|
||||
},
|
||||
messageId: "unexpectedLineBreak",
|
||||
fix(fixer) {
|
||||
if (astUtils.isCommentToken(tokenBefore)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!astUtils.isTokenOnSameLine(tokenBefore, token)) {
|
||||
return fixer.replaceTextRange(
|
||||
[tokenBefore.range[1], token.range[0]],
|
||||
" ",
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* This will check if the comma is on the same line as the next element
|
||||
* Following array:
|
||||
* [
|
||||
* 1
|
||||
* , 2
|
||||
* , 3
|
||||
* ]
|
||||
*
|
||||
* will be fixed to:
|
||||
* [
|
||||
* 1, 2, 3
|
||||
* ]
|
||||
*/
|
||||
const twoTokensBefore = sourceCode.getTokenBefore(
|
||||
tokenBefore,
|
||||
{ includeComments: true },
|
||||
);
|
||||
|
||||
if (astUtils.isCommentToken(twoTokensBefore)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return fixer.replaceTextRange(
|
||||
[twoTokensBefore.range[1], tokenBefore.range[0]],
|
||||
"",
|
||||
);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reports that there should be a line break after the first token
|
||||
* @param {Token} token The token to use for the report.
|
||||
* @returns {void}
|
||||
*/
|
||||
function reportRequiredLineBreak(token) {
|
||||
const tokenBefore = sourceCode.getTokenBefore(token, {
|
||||
includeComments: true,
|
||||
});
|
||||
|
||||
context.report({
|
||||
loc: {
|
||||
start: tokenBefore.loc.end,
|
||||
end: token.loc.start,
|
||||
},
|
||||
messageId: "missingLineBreak",
|
||||
fix(fixer) {
|
||||
return fixer.replaceTextRange(
|
||||
[tokenBefore.range[1], token.range[0]],
|
||||
"\n",
|
||||
);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reports a given node if it violated this rule.
|
||||
* @param {ASTNode} node A node to check. This is an ObjectExpression node or an ObjectPattern node.
|
||||
* @returns {void}
|
||||
*/
|
||||
function check(node) {
|
||||
const elements = node.elements;
|
||||
const normalizedOptions = normalizeOptions(context.options[0]);
|
||||
const options = normalizedOptions[node.type];
|
||||
|
||||
if (!options) {
|
||||
return;
|
||||
}
|
||||
|
||||
let elementBreak = false;
|
||||
|
||||
/*
|
||||
* MULTILINE: true
|
||||
* loop through every element and check
|
||||
* if at least one element has linebreaks inside
|
||||
* this ensures that following is not valid (due to elements are on the same line):
|
||||
*
|
||||
* [
|
||||
* 1,
|
||||
* 2,
|
||||
* 3
|
||||
* ]
|
||||
*/
|
||||
if (options.multiline) {
|
||||
elementBreak = elements
|
||||
.filter(element => element !== null)
|
||||
.some(
|
||||
element =>
|
||||
element.loc.start.line !== element.loc.end.line,
|
||||
);
|
||||
}
|
||||
|
||||
let linebreaksCount = 0;
|
||||
|
||||
for (let i = 0; i < node.elements.length; i++) {
|
||||
const element = node.elements[i];
|
||||
|
||||
const previousElement = elements[i - 1];
|
||||
|
||||
if (i === 0 || element === null || previousElement === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const commaToken = sourceCode.getFirstTokenBetween(
|
||||
previousElement,
|
||||
element,
|
||||
astUtils.isCommaToken,
|
||||
);
|
||||
const lastTokenOfPreviousElement =
|
||||
sourceCode.getTokenBefore(commaToken);
|
||||
const firstTokenOfCurrentElement =
|
||||
sourceCode.getTokenAfter(commaToken);
|
||||
|
||||
if (
|
||||
!astUtils.isTokenOnSameLine(
|
||||
lastTokenOfPreviousElement,
|
||||
firstTokenOfCurrentElement,
|
||||
)
|
||||
) {
|
||||
linebreaksCount++;
|
||||
}
|
||||
}
|
||||
|
||||
const needsLinebreaks =
|
||||
elements.length >= options.minItems ||
|
||||
(options.multiline && elementBreak) ||
|
||||
(options.consistent &&
|
||||
linebreaksCount > 0 &&
|
||||
linebreaksCount < node.elements.length);
|
||||
|
||||
elements.forEach((element, i) => {
|
||||
const previousElement = elements[i - 1];
|
||||
|
||||
if (i === 0 || element === null || previousElement === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
const commaToken = sourceCode.getFirstTokenBetween(
|
||||
previousElement,
|
||||
element,
|
||||
astUtils.isCommaToken,
|
||||
);
|
||||
const lastTokenOfPreviousElement =
|
||||
sourceCode.getTokenBefore(commaToken);
|
||||
const firstTokenOfCurrentElement =
|
||||
sourceCode.getTokenAfter(commaToken);
|
||||
|
||||
if (needsLinebreaks) {
|
||||
if (
|
||||
astUtils.isTokenOnSameLine(
|
||||
lastTokenOfPreviousElement,
|
||||
firstTokenOfCurrentElement,
|
||||
)
|
||||
) {
|
||||
reportRequiredLineBreak(firstTokenOfCurrentElement);
|
||||
}
|
||||
} else {
|
||||
if (
|
||||
!astUtils.isTokenOnSameLine(
|
||||
lastTokenOfPreviousElement,
|
||||
firstTokenOfCurrentElement,
|
||||
)
|
||||
) {
|
||||
reportNoLineBreak(firstTokenOfCurrentElement);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Public
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
return {
|
||||
ArrayPattern: check,
|
||||
ArrayExpression: check,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,4 @@
|
||||
import * as z from "./external.cjs";
|
||||
export * from "./external.cjs";
|
||||
export { z };
|
||||
export default z;
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"keys-while": {
|
||||
"name": "keys-while",
|
||||
"browser": "IE 9.0.0 (Windows 7 0.0.0)",
|
||||
"suite": "iter",
|
||||
"hz": 25471.56659459879,
|
||||
"success": true,
|
||||
"fastest": true,
|
||||
"rme": 0.013725500697529026,
|
||||
"rhz": 1,
|
||||
"sampleSize": 160
|
||||
},
|
||||
"keys-for": {
|
||||
"name": "keys-for",
|
||||
"browser": "IE 9.0.0 (Windows 7 0.0.0)",
|
||||
"suite": "iter",
|
||||
"hz": 23176.549771364575,
|
||||
"success": true,
|
||||
"fastest": false,
|
||||
"rme": 0.017528369032824627,
|
||||
"rhz": 0.9098988743110575,
|
||||
"sampleSize": 171
|
||||
},
|
||||
"incr-for": {
|
||||
"name": "incr-for",
|
||||
"browser": "IE 9.0.0 (Windows 7 0.0.0)",
|
||||
"suite": "iter",
|
||||
"hz": 11476.374922658983,
|
||||
"success": true,
|
||||
"fastest": false,
|
||||
"rme": 0.02058629668256995,
|
||||
"rhz": 0.45055630481293335,
|
||||
"sampleSize": 163
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
import { createRequire } from 'node:module';
|
||||
import { performance } from 'node:perf_hooks';
|
||||
import timers from 'node:timers';
|
||||
import timersPromises from 'node:timers/promises';
|
||||
import util from 'node:util';
|
||||
import { startTests, collectTests } from '@vitest/runner';
|
||||
import { KNOWN_ASSET_TYPES } from '@vitest/utils/constants';
|
||||
import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment, d as detectAsyncLeaks } from '../chunks/index.DXx9Dtk7.js';
|
||||
import { s as setupCommonEnv, b as startCoverageInsideWorker, c as stopCoverageInsideWorker } from '../chunks/setup-common.DYx3LtFI.js';
|
||||
import { i as index } from '../chunks/index.DdgEv5B1.js';
|
||||
import { c as closeInspector } from '../chunks/inspector.CvyFGlXm.js';
|
||||
import { g as getWorkerState } from '../chunks/utils.BX5Fg8C4.js';
|
||||
import { g as globalExpect } from '../chunks/test.DNmyFkvJ.js';
|
||||
import '@vitest/expect';
|
||||
import 'node:async_hooks';
|
||||
import '../chunks/rpc.MzXet3jl.js';
|
||||
import '@vitest/utils/timers';
|
||||
import '../chunks/index.Chj8NDwU.js';
|
||||
import '../chunks/coverage.CTzCuANN.js';
|
||||
import '@vitest/snapshot';
|
||||
import '../chunks/benchmark.CX_oY03V.js';
|
||||
import '@vitest/runner/utils';
|
||||
import '@vitest/utils/helpers';
|
||||
import '../chunks/evaluatedModules.Dg1zASAC.js';
|
||||
import 'pathe';
|
||||
import 'vite/module-runner';
|
||||
import 'expect-type';
|
||||
import 'node:url';
|
||||
import '@vitest/utils/error';
|
||||
import '@vitest/spy';
|
||||
import '@vitest/utils/offset';
|
||||
import '@vitest/utils/source-map';
|
||||
import '../chunks/_commonjsHelpers.D26ty3Ew.js';
|
||||
|
||||
async function run(method, files, config, moduleRunner, traces) {
|
||||
const workerState = getWorkerState();
|
||||
await traces.$("vitest.runtime.global_env", () => setupCommonEnv(config));
|
||||
Object.defineProperty(globalThis, "__vitest_index__", {
|
||||
value: index,
|
||||
enumerable: false
|
||||
});
|
||||
const viteEnvironment = workerState.environment.viteEnvironment || workerState.environment.name;
|
||||
globalExpect.setState({ environment: workerState.environment.name });
|
||||
if (viteEnvironment === "client") {
|
||||
const _require = createRequire(import.meta.url);
|
||||
// always mock "required" `css` files, because we cannot process them
|
||||
_require.extensions[".css"] = resolveCss;
|
||||
_require.extensions[".scss"] = resolveCss;
|
||||
_require.extensions[".sass"] = resolveCss;
|
||||
_require.extensions[".less"] = resolveCss;
|
||||
// since we are using Vite, we can assume how these will be resolved
|
||||
KNOWN_ASSET_TYPES.forEach((type) => {
|
||||
_require.extensions[`.${type}`] = resolveAsset;
|
||||
});
|
||||
process.env.SSR = "";
|
||||
} else process.env.SSR = "1";
|
||||
// @ts-expect-error not typed global for patched timers
|
||||
globalThis.__vitest_required__ = {
|
||||
util,
|
||||
timers,
|
||||
timersPromises
|
||||
};
|
||||
await traces.$("vitest.runtime.coverage.start", () => startCoverageInsideWorker(config.coverage, moduleRunner, { isolate: false }));
|
||||
if (config.chaiConfig) setupChaiConfig(config.chaiConfig);
|
||||
const [testRunner, snapshotEnvironment] = await Promise.all([traces.$("vitest.runtime.runner", () => resolveTestRunner(config, moduleRunner, traces)), traces.$("vitest.runtime.snapshot.environment", () => resolveSnapshotEnvironment(config, moduleRunner))]);
|
||||
config.snapshotOptions.snapshotEnvironment = snapshotEnvironment;
|
||||
workerState.onCancel((reason) => {
|
||||
closeInspector(config);
|
||||
testRunner.cancel?.(reason);
|
||||
});
|
||||
workerState.durations.prepare = performance.now() - workerState.durations.prepare;
|
||||
const { vi } = index;
|
||||
await traces.$(`vitest.test.runner.${method}`, async () => {
|
||||
for (const file of files) {
|
||||
workerState.filepath = file.filepath;
|
||||
if (method === "run") {
|
||||
const collectAsyncLeaks = config.detectAsyncLeaks ? detectAsyncLeaks(file.filepath, workerState.ctx.projectName) : void 0;
|
||||
await traces.$(`vitest.test.runner.${method}.module`, { attributes: { "code.file.path": file.filepath } }, () => startTests([file], testRunner));
|
||||
const leaks = await collectAsyncLeaks?.();
|
||||
if (leaks?.length) workerState.rpc.onAsyncLeaks(leaks);
|
||||
} else await traces.$(`vitest.test.runner.${method}.module`, { attributes: { "code.file.path": file.filepath } }, () => collectTests([file], testRunner));
|
||||
// reset after tests, because user might call `vi.setConfig` in setupFile
|
||||
vi.resetConfig();
|
||||
// mocks should not affect different files
|
||||
vi.restoreAllMocks();
|
||||
}
|
||||
});
|
||||
await traces.$("vitest.runtime.coverage.stop", () => stopCoverageInsideWorker(config.coverage, moduleRunner, { isolate: false }));
|
||||
}
|
||||
function resolveCss(mod) {
|
||||
mod.exports = "";
|
||||
}
|
||||
function resolveAsset(mod, url) {
|
||||
mod.exports = url;
|
||||
}
|
||||
|
||||
export { run };
|
||||
@@ -0,0 +1,117 @@
|
||||
import type { $ZodStringFormats } from "../core/checks.js";
|
||||
import type * as errors from "../core/errors.js";
|
||||
import * as util from "../core/util.js";
|
||||
|
||||
const error: () => errors.$ZodErrorMap = () => {
|
||||
const Sizable: Record<string, { unit: string; verb: string }> = {
|
||||
string: { unit: "harf", verb: "olmalıdır" },
|
||||
file: { unit: "bayt", verb: "olmalıdır" },
|
||||
array: { unit: "unsur", verb: "olmalıdır" },
|
||||
set: { unit: "unsur", verb: "olmalıdır" },
|
||||
};
|
||||
|
||||
function getSizing(origin: string): { unit: string; verb: string } | null {
|
||||
return Sizable[origin] ?? null;
|
||||
}
|
||||
|
||||
const FormatDictionary: {
|
||||
[k in $ZodStringFormats | (string & {})]?: string;
|
||||
} = {
|
||||
regex: "giren",
|
||||
email: "epostagâh",
|
||||
url: "URL",
|
||||
emoji: "emoji",
|
||||
uuid: "UUID",
|
||||
uuidv4: "UUIDv4",
|
||||
uuidv6: "UUIDv6",
|
||||
nanoid: "nanoid",
|
||||
guid: "GUID",
|
||||
cuid: "cuid",
|
||||
cuid2: "cuid2",
|
||||
ulid: "ULID",
|
||||
xid: "XID",
|
||||
ksuid: "KSUID",
|
||||
datetime: "ISO hengâmı",
|
||||
date: "ISO tarihi",
|
||||
time: "ISO zamanı",
|
||||
duration: "ISO müddeti",
|
||||
ipv4: "IPv4 nişânı",
|
||||
ipv6: "IPv6 nişânı",
|
||||
cidrv4: "IPv4 menzili",
|
||||
cidrv6: "IPv6 menzili",
|
||||
base64: "base64-şifreli metin",
|
||||
base64url: "base64url-şifreli metin",
|
||||
json_string: "JSON metin",
|
||||
e164: "E.164 sayısı",
|
||||
jwt: "JWT",
|
||||
template_literal: "giren",
|
||||
};
|
||||
|
||||
const TypeDictionary: {
|
||||
[k in errors.$ZodInvalidTypeExpected | (string & {})]?: string;
|
||||
} = {
|
||||
nan: "NaN",
|
||||
number: "numara",
|
||||
array: "saf",
|
||||
null: "gayb",
|
||||
};
|
||||
|
||||
return (issue) => {
|
||||
switch (issue.code) {
|
||||
case "invalid_type": {
|
||||
const expected = TypeDictionary[issue.expected] ?? issue.expected;
|
||||
const receivedType = util.parsedType(issue.input);
|
||||
const received = TypeDictionary[receivedType] ?? receivedType;
|
||||
if (/^[A-Z]/.test(issue.expected)) {
|
||||
return `Fâsit giren: umulan instanceof ${issue.expected}, alınan ${received}`;
|
||||
}
|
||||
return `Fâsit giren: umulan ${expected}, alınan ${received}`;
|
||||
}
|
||||
case "invalid_value":
|
||||
if (issue.values.length === 1) return `Fâsit giren: umulan ${util.stringifyPrimitive(issue.values[0])}`;
|
||||
return `Fâsit tercih: mûteberler ${util.joinValues(issue.values, "|")}`;
|
||||
case "too_big": {
|
||||
const adj = issue.inclusive ? "<=" : "<";
|
||||
const sizing = getSizing(issue.origin);
|
||||
if (sizing)
|
||||
return `Fazla büyük: ${issue.origin ?? "value"}, ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmalıydı.`;
|
||||
return `Fazla büyük: ${issue.origin ?? "value"}, ${adj}${issue.maximum.toString()} olmalıydı.`;
|
||||
}
|
||||
case "too_small": {
|
||||
const adj = issue.inclusive ? ">=" : ">";
|
||||
const sizing = getSizing(issue.origin);
|
||||
if (sizing) {
|
||||
return `Fazla küçük: ${issue.origin}, ${adj}${issue.minimum.toString()} ${sizing.unit} sahip olmalıydı.`;
|
||||
}
|
||||
|
||||
return `Fazla küçük: ${issue.origin}, ${adj}${issue.minimum.toString()} olmalıydı.`;
|
||||
}
|
||||
case "invalid_format": {
|
||||
const _issue = issue as errors.$ZodStringFormatIssues;
|
||||
if (_issue.format === "starts_with") return `Fâsit metin: "${_issue.prefix}" ile başlamalı.`;
|
||||
if (_issue.format === "ends_with") return `Fâsit metin: "${_issue.suffix}" ile bitmeli.`;
|
||||
if (_issue.format === "includes") return `Fâsit metin: "${_issue.includes}" ihtivâ etmeli.`;
|
||||
if (_issue.format === "regex") return `Fâsit metin: ${_issue.pattern} nakşına uymalı.`;
|
||||
return `Fâsit ${FormatDictionary[_issue.format] ?? issue.format}`;
|
||||
}
|
||||
case "not_multiple_of":
|
||||
return `Fâsit sayı: ${issue.divisor} katı olmalıydı.`;
|
||||
case "unrecognized_keys":
|
||||
return `Tanınmayan anahtar ${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
|
||||
case "invalid_key":
|
||||
return `${issue.origin} için tanınmayan anahtar var.`;
|
||||
case "invalid_union":
|
||||
return "Giren tanınamadı.";
|
||||
case "invalid_element":
|
||||
return `${issue.origin} için tanınmayan kıymet var.`;
|
||||
default:
|
||||
return `Kıymet tanınamadı.`;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
export default function (): { localeError: errors.$ZodErrorMap } {
|
||||
return {
|
||||
localeError: error(),
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _rng = _interopRequireDefault(require("./rng.js"));
|
||||
|
||||
var _stringify = _interopRequireDefault(require("./stringify.js"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
// **`v1()` - Generate time-based UUID**
|
||||
//
|
||||
// Inspired by https://github.com/LiosK/UUID.js
|
||||
// and http://docs.python.org/library/uuid.html
|
||||
let _nodeId;
|
||||
|
||||
let _clockseq; // Previous uuid creation time
|
||||
|
||||
|
||||
let _lastMSecs = 0;
|
||||
let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
|
||||
|
||||
function v1(options, buf, offset) {
|
||||
let i = buf && offset || 0;
|
||||
const b = buf || new Array(16);
|
||||
options = options || {};
|
||||
let node = options.node || _nodeId;
|
||||
let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
|
||||
// specified. We do this lazily to minimize issues related to insufficient
|
||||
// system entropy. See #189
|
||||
|
||||
if (node == null || clockseq == null) {
|
||||
const seedBytes = options.random || (options.rng || _rng.default)();
|
||||
|
||||
if (node == null) {
|
||||
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
|
||||
node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
|
||||
}
|
||||
|
||||
if (clockseq == null) {
|
||||
// Per 4.2.2, randomize (14 bit) clockseq
|
||||
clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
|
||||
}
|
||||
} // UUID timestamps are 100 nano-second units since the Gregorian epoch,
|
||||
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
|
||||
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
|
||||
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
|
||||
|
||||
|
||||
let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock
|
||||
// cycle to simulate higher resolution clock
|
||||
|
||||
let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
|
||||
|
||||
const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression
|
||||
|
||||
if (dt < 0 && options.clockseq === undefined) {
|
||||
clockseq = clockseq + 1 & 0x3fff;
|
||||
} // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
|
||||
// time interval
|
||||
|
||||
|
||||
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
|
||||
nsecs = 0;
|
||||
} // Per 4.2.1.2 Throw error if too many uuids are requested
|
||||
|
||||
|
||||
if (nsecs >= 10000) {
|
||||
throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
|
||||
}
|
||||
|
||||
_lastMSecs = msecs;
|
||||
_lastNSecs = nsecs;
|
||||
_clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
|
||||
|
||||
msecs += 12219292800000; // `time_low`
|
||||
|
||||
const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
|
||||
b[i++] = tl >>> 24 & 0xff;
|
||||
b[i++] = tl >>> 16 & 0xff;
|
||||
b[i++] = tl >>> 8 & 0xff;
|
||||
b[i++] = tl & 0xff; // `time_mid`
|
||||
|
||||
const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
|
||||
b[i++] = tmh >>> 8 & 0xff;
|
||||
b[i++] = tmh & 0xff; // `time_high_and_version`
|
||||
|
||||
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
|
||||
|
||||
b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
|
||||
|
||||
b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`
|
||||
|
||||
b[i++] = clockseq & 0xff; // `node`
|
||||
|
||||
for (let n = 0; n < 6; ++n) {
|
||||
b[i + n] = node[n];
|
||||
}
|
||||
|
||||
return buf || (0, _stringify.default)(b);
|
||||
}
|
||||
|
||||
var _default = v1;
|
||||
exports.default = _default;
|
||||
@@ -0,0 +1,110 @@
|
||||
/**
|
||||
* Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files").
|
||||
*
|
||||
* For example:
|
||||
* ```ts
|
||||
* getRootLength("a") === 0 // ""
|
||||
* getRootLength("/") === 1 // "/"
|
||||
* getRootLength("c:") === 2 // "c:"
|
||||
* getRootLength("c:d") === 0 // ""
|
||||
* getRootLength("c:/") === 3 // "c:/"
|
||||
* getRootLength("c:\\") === 3 // "c:\\"
|
||||
* getRootLength("//server") === 7 // "//server"
|
||||
* getRootLength("//server/share") === 8 // "//server/"
|
||||
* getRootLength("\\\\server") === 7 // "\\\\server"
|
||||
* getRootLength("\\\\server\\share") === 8 // "\\\\server\\"
|
||||
* getRootLength("file:///path") === 8 // "file:///"
|
||||
* getRootLength("file:///c:") === 10 // "file:///c:"
|
||||
* getRootLength("file:///c:d") === 8 // "file:///"
|
||||
* getRootLength("file:///c:/path") === 11 // "file:///c:/"
|
||||
* getRootLength("file://server") === 13 // "file://server"
|
||||
* getRootLength("file://server/path") === 14 // "file://server/"
|
||||
* getRootLength("http://server") === 13 // "http://server"
|
||||
* getRootLength("http://server/path") === 14 // "http://server/"
|
||||
* ```
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
export declare function getRootLength(path: string): number;
|
||||
export declare function getPathComponents(path: string): string[];
|
||||
/**
|
||||
* Determines whether a path has a trailing separator (`/` or `\\`).
|
||||
*/
|
||||
export declare function hasTrailingDirectorySeparator(path: string): boolean;
|
||||
/**
|
||||
* Removes a trailing directory separator from a path, if it does not already have one.
|
||||
*/
|
||||
export declare function removeTrailingDirectorySeparator(path: string): string;
|
||||
/**
|
||||
* Adds a trailing directory separator to a path, if it does not already have one.
|
||||
*/
|
||||
export declare function ensureTrailingDirectorySeparator(path: string): string;
|
||||
/**
|
||||
* Normalize path separators, converting `\\` into `/`.
|
||||
*/
|
||||
export declare function normalizeSlashes(path: string): string;
|
||||
/**
|
||||
* Combines paths. If a path is absolute, it replaces any previous path. Relative paths are not simplified.
|
||||
*/
|
||||
export declare function combinePaths(path: string, ...paths: (string | undefined)[]): string;
|
||||
/**
|
||||
* Returns the normalized absolute path, resolving `.` and `..` segments.
|
||||
*/
|
||||
export declare function getNormalizedAbsolutePath(path: string, currentDirectory: string | undefined): string;
|
||||
/**
|
||||
* Normalizes a path, resolving `.` and `..` segments and converting backslashes to forward slashes.
|
||||
*/
|
||||
export declare function normalizePath(path: string): string;
|
||||
/**
|
||||
* Determines whether a path is an absolute disk path (e.g. starts with `/`, or a DOS path
|
||||
* like `c:`, `c:\\` or `c:/`).
|
||||
*/
|
||||
export declare function isRootedDiskPath(path: string): boolean;
|
||||
/**
|
||||
* Converts a file name to a normalized path.
|
||||
*
|
||||
* @param fileName The file name to convert
|
||||
* @param basePath The base path to use for relative file names
|
||||
* @param getCanonicalFileName A function to get the canonical file name (e.g., toLowerCase for case-insensitive systems)
|
||||
* @returns The normalized path
|
||||
*/
|
||||
export declare function toPath(fileName: string, basePath: string | undefined, getCanonicalFileName: (path: string) => string): string;
|
||||
/**
|
||||
* Creates a getCanonicalFileName function based on case sensitivity.
|
||||
*/
|
||||
export declare function createGetCanonicalFileName(useCaseSensitiveFileNames: boolean): (fileName: string) => string;
|
||||
/**
|
||||
* Returns true if the path refers to a bundled library file.
|
||||
*/
|
||||
export declare function isBundled(path: string): boolean;
|
||||
/**
|
||||
* Returns true if the file name represents a dynamic/virtual file
|
||||
* that doesn't exist on disk (e.g., untitled files with paths like "^/untitled/...").
|
||||
*/
|
||||
export declare function isDynamicFileName(fileName: string): boolean;
|
||||
/**
|
||||
* Splits a Windows volume (e.g., "c:") from the rest of the path.
|
||||
* Returns [volume, rest, ok] where ok is true if a volume was found.
|
||||
*/
|
||||
export declare function splitVolumePath(path: string): [volume: string, rest: string, ok: boolean];
|
||||
/**
|
||||
* Converts a file name to a document URI.
|
||||
*
|
||||
* @example
|
||||
* fileNameToDocumentURI("/path/to/file.ts") === "file:///path/to/file.ts"
|
||||
* fileNameToDocumentURI("c:/path/to/file.ts") === "file:///c%3A/path/to/file.ts"
|
||||
* fileNameToDocumentURI("^/untitled/ts-nul-authority/Untitled-1") === "untitled:Untitled-1"
|
||||
* fileNameToDocumentURI("^/vscode-vfs/github/microsoft/typescript-go/file.ts") === "vscode-vfs://github/microsoft/typescript-go/file.ts"
|
||||
*/
|
||||
export declare function fileNameToDocumentURI(fileName: string): string;
|
||||
/**
|
||||
* Converts a document URI to a file name.
|
||||
*
|
||||
* @example
|
||||
* documentURIToFileName("file:///path/to/file.ts") === "/path/to/file.ts"
|
||||
* documentURIToFileName("file:///c%3A/path/to/file.ts") === "c:/path/to/file.ts"
|
||||
* documentURIToFileName("untitled:Untitled-1") === "^/untitled/ts-nul-authority/Untitled-1"
|
||||
* documentURIToFileName("vscode-vfs://github/microsoft/typescript-go/file.ts") === "^/vscode-vfs/github/microsoft/typescript-go/file.ts"
|
||||
*/
|
||||
export declare function documentURIToFileName(uri: string): string;
|
||||
//# sourceMappingURL=path.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
export * from './createProjectService';
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,sEAAsE;AAUtE,qFAAqF;AACrF,wBAAgB,OAAO,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,UAAU,CAEnD;AAED,6CAA6C;AAC7C,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED,uCAAuC;AACvC,wBAAgB,MAAM,CAAC,CAAC,EAAE,UAAU,GAAG,SAAS,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAI5E;AAED,gCAAgC;AAChC,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAKpC;AAED,gEAAgE;AAChE,wBAAgB,OAAO,CAAC,QAAQ,EAAE,GAAG,EAAE,aAAa,UAAO,GAAG,IAAI,CAGjE;AAED,kDAAkD;AAClD,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,GAAG,IAAI,CAMrD;AAED,uEAAuE;AAEvE,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,iBAAiB,GAAG,UAAU,GACjE,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC;AAEtD,iCAAiC;AACjC,wBAAgB,EAAE,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,CAE9C;AAED,kCAAkC;AAClC,wBAAgB,GAAG,CAA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,GAAG,UAAU,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;CAC3B,CAOA;AAED,wBAAgB,WAAW,CAAC,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAChE,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GACjC;IACD,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAC9B,CAOA;AACD,eAAO,MAAM,eAAe,EAAE,OAAO,YAA2B,CAAC;AACjE,eAAO,MAAM,uBAAuB,EAAE,OAAO,eAAiC,CAAC;AAC/E,eAAO,MAAM,0BAA0B,EAAE,OAAO,WAAyB,CAAC;AAE1E,sFAAsF;AACtF,wBAAgB,WAAW,CAAC,WAAW,SAAK,GAAG,UAAU,CASxD"}
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @fileoverview JSON reporter, including rules metadata
|
||||
* @author Chris Meyer
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Public Interface
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
module.exports = function (results, data) {
|
||||
return JSON.stringify({
|
||||
results,
|
||||
metadata: data,
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/estree`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for estree (https://github.com/estree/estree).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Wed, 06 May 2026 21:01:00 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [RReverser](https://github.com/RReverser).
|
||||
Reference in New Issue
Block a user