@neon/sdk 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +2 -1
- package/dist/neon/client.test-d.d.ts +1 -0
- package/dist/neon/client.test-d.js +76 -0
- package/dist/neon/client.test-d.js.map +1 -0
- package/dist/neon/resources/postgres.d.ts +1 -1
- package/dist/neon/resources/postgres.js.map +1 -1
- package/dist/node_modules/.pnpm/@vitest_pretty-format@3.0.9/node_modules/@vitest/pretty-format/dist/index.js +879 -0
- package/dist/node_modules/.pnpm/@vitest_pretty-format@3.0.9/node_modules/@vitest/pretty-format/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_runner@3.0.9/node_modules/@vitest/runner/dist/chunk-tasks.js +30 -0
- package/dist/node_modules/.pnpm/@vitest_runner@3.0.9/node_modules/@vitest/runner/dist/chunk-tasks.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_runner@3.0.9/node_modules/@vitest/runner/dist/index.js +578 -0
- package/dist/node_modules/.pnpm/@vitest_runner@3.0.9/node_modules/@vitest/runner/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +92 -0
- package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/helpers.js +43 -0
- package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/helpers.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/index.js +450 -0
- package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/source-map.js +168 -0
- package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/source-map.js.map +1 -0
- package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/branding.js +10 -0
- package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/branding.js.map +1 -0
- package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/index.js +109 -0
- package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/messages.js +10 -0
- package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/messages.js.map +1 -0
- package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/overloads.js +10 -0
- package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/overloads.js.map +1 -0
- package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/utils.js +10 -0
- package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/utils.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.js +11 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.js +16 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.js +11 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js +15 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js +13 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.js +34 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.js +12 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.js +122 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js +39 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js +99 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js +25 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js +14 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js +21 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js +6 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js +12 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js +18 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js +24 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js +9 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js +30 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js.map +1 -0
- package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js +82 -0
- package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js.map +1 -0
- package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.js +7 -0
- package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.js.map +1 -0
- package/dist/node_modules/.pnpm/vitest@3.0.9_@types_debug@4.1.13_@types_node@20.19.17_jiti@2.7.0_jsdom@26.1.0_lightning_fb7ae83398b95c49208c9194029bba02/node_modules/vitest/dist/index.js +8 -0
- package/dist/node_modules/.pnpm/vitest@3.0.9_@types_debug@4.1.13_@types_node@20.19.17_jiti@2.7.0_jsdom@26.1.0_lightning_fb7ae83398b95c49208c9194029bba02/node_modules/vitest/dist/index.js.map +1 -0
- package/package.json +3 -2
package/dist/node_modules/.pnpm/@vitest_runner@3.0.9/node_modules/@vitest/runner/dist/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@vitest+runner@3.0.9/node_modules/@vitest/runner/dist/index.js"],"sourcesContent":["import { getSafeTimers, isObject, createDefer, toArray, isNegativeNaN, format, objDisplay, objectAttr, assertTypes, shuffle } from '@vitest/utils';\nimport { parseSingleStack } from '@vitest/utils/source-map';\nimport { c as createChainable, b as createFileTask, a as calculateSuiteHash, s as someTasksAreOnly, i as interpretTaskModes, l as limitConcurrency, p as partitionSuiteChildren, o as hasTests, n as hasFailed } from './chunk-tasks.js';\nimport { processError } from '@vitest/utils/error';\nexport { processError } from '@vitest/utils/error';\nimport 'pathe';\n\nclass PendingError extends Error {\n constructor(message, task, note) {\n super(message);\n this.message = message;\n this.note = note;\n this.taskId = task.id;\n }\n code = \"VITEST_PENDING\";\n taskId;\n}\n\nconst now$2 = Date.now;\nconst collectorContext = {\n tasks: [],\n currentSuite: null\n};\nfunction collectTask(task) {\n var _a;\n (_a = collectorContext.currentSuite) == null ? void 0 : _a.tasks.push(task);\n}\nasync function runWithSuite(suite, fn) {\n const prev = collectorContext.currentSuite;\n collectorContext.currentSuite = suite;\n await fn();\n collectorContext.currentSuite = prev;\n}\nfunction withTimeout(fn, timeout, isHook = false, stackTraceError) {\n if (timeout <= 0 || timeout === Number.POSITIVE_INFINITY) {\n return fn;\n }\n const { setTimeout, clearTimeout } = getSafeTimers();\n return function runWithTimeout(...args) {\n const startTime = now$2();\n return new Promise((resolve_, reject_) => {\n var _a;\n const timer = setTimeout(() => {\n clearTimeout(timer);\n rejectTimeoutError();\n }, timeout);\n (_a = timer.unref) == null ? void 0 : _a.call(timer);\n function rejectTimeoutError() {\n reject_(makeTimeoutError(isHook, timeout, stackTraceError));\n }\n function resolve(result) {\n clearTimeout(timer);\n if (now$2() - startTime >= timeout) {\n rejectTimeoutError();\n return;\n }\n resolve_(result);\n }\n function reject(error) {\n clearTimeout(timer);\n reject_(error);\n }\n try {\n const result = fn(...args);\n if (typeof result === \"object\" && result != null && typeof result.then === \"function\") {\n result.then(resolve, reject);\n } else {\n resolve(result);\n }\n } catch (error) {\n reject(error);\n }\n });\n };\n}\nfunction createTestContext(test, runner) {\n var _a;\n const context = function() {\n throw new Error(\"done() callback is deprecated, use promise instead\");\n };\n context.task = test;\n context.skip = (note) => {\n test.result ?? (test.result = { state: \"skip\" });\n test.result.pending = true;\n throw new PendingError(\"test is skipped; abort execution\", test, note);\n };\n context.onTestFailed = (handler, timeout) => {\n test.onFailed || (test.onFailed = []);\n test.onFailed.push(\n withTimeout(handler, timeout ?? runner.config.hookTimeout, true, new Error(\"STACK_TRACE_ERROR\"))\n );\n };\n context.onTestFinished = (handler, timeout) => {\n test.onFinished || (test.onFinished = []);\n test.onFinished.push(\n withTimeout(handler, timeout ?? runner.config.hookTimeout, true, new Error(\"STACK_TRACE_ERROR\"))\n );\n };\n return ((_a = runner.extendTaskContext) == null ? void 0 : _a.call(runner, context)) || context;\n}\nfunction makeTimeoutError(isHook, timeout, stackTraceError) {\n const message = `${isHook ? \"Hook\" : \"Test\"} timed out in ${timeout}ms.\nIf this is a long-running ${isHook ? \"hook\" : \"test\"}, pass a timeout value as the last argument or configure it globally with \"${isHook ? \"hookTimeout\" : \"testTimeout\"}\".`;\n const error = new Error(message);\n if (stackTraceError == null ? void 0 : stackTraceError.stack) {\n error.stack = stackTraceError.stack.replace(error.message, stackTraceError.message);\n }\n return error;\n}\n\nconst fnMap = /* @__PURE__ */ new WeakMap();\nconst fixtureMap = /* @__PURE__ */ new WeakMap();\nconst hooksMap = /* @__PURE__ */ new WeakMap();\nfunction setFn(key, fn) {\n fnMap.set(key, fn);\n}\nfunction getFn(key) {\n return fnMap.get(key);\n}\nfunction setFixture(key, fixture) {\n fixtureMap.set(key, fixture);\n}\nfunction getFixture(key) {\n return fixtureMap.get(key);\n}\nfunction setHooks(key, hooks) {\n hooksMap.set(key, hooks);\n}\nfunction getHooks(key) {\n return hooksMap.get(key);\n}\n\nfunction mergeContextFixtures(fixtures, context, inject) {\n const fixtureOptionKeys = [\"auto\", \"injected\"];\n const fixtureArray = Object.entries(fixtures).map(\n ([prop, value]) => {\n const fixtureItem = { value };\n if (Array.isArray(value) && value.length >= 2 && isObject(value[1]) && Object.keys(value[1]).some((key) => fixtureOptionKeys.includes(key))) {\n Object.assign(fixtureItem, value[1]);\n const userValue = value[0];\n fixtureItem.value = fixtureItem.injected ? inject(prop) ?? userValue : userValue;\n }\n fixtureItem.prop = prop;\n fixtureItem.isFn = typeof fixtureItem.value === \"function\";\n return fixtureItem;\n }\n );\n if (Array.isArray(context.fixtures)) {\n context.fixtures = context.fixtures.concat(fixtureArray);\n } else {\n context.fixtures = fixtureArray;\n }\n fixtureArray.forEach((fixture) => {\n if (fixture.isFn) {\n const usedProps = getUsedProps(fixture.value);\n if (usedProps.length) {\n fixture.deps = context.fixtures.filter(\n ({ prop }) => prop !== fixture.prop && usedProps.includes(prop)\n );\n }\n }\n });\n return context;\n}\nconst fixtureValueMaps = /* @__PURE__ */ new Map();\nconst cleanupFnArrayMap = /* @__PURE__ */ new Map();\nasync function callFixtureCleanup(context) {\n const cleanupFnArray = cleanupFnArrayMap.get(context) ?? [];\n for (const cleanup of cleanupFnArray.reverse()) {\n await cleanup();\n }\n cleanupFnArrayMap.delete(context);\n}\nfunction withFixtures(fn, testContext) {\n return (hookContext) => {\n const context = hookContext || testContext;\n if (!context) {\n return fn({});\n }\n const fixtures = getFixture(context);\n if (!(fixtures == null ? void 0 : fixtures.length)) {\n return fn(context);\n }\n const usedProps = getUsedProps(fn);\n const hasAutoFixture = fixtures.some(({ auto }) => auto);\n if (!usedProps.length && !hasAutoFixture) {\n return fn(context);\n }\n if (!fixtureValueMaps.get(context)) {\n fixtureValueMaps.set(context, /* @__PURE__ */ new Map());\n }\n const fixtureValueMap = fixtureValueMaps.get(context);\n if (!cleanupFnArrayMap.has(context)) {\n cleanupFnArrayMap.set(context, []);\n }\n const cleanupFnArray = cleanupFnArrayMap.get(context);\n const usedFixtures = fixtures.filter(\n ({ prop, auto }) => auto || usedProps.includes(prop)\n );\n const pendingFixtures = resolveDeps(usedFixtures);\n if (!pendingFixtures.length) {\n return fn(context);\n }\n async function resolveFixtures() {\n for (const fixture of pendingFixtures) {\n if (fixtureValueMap.has(fixture)) {\n continue;\n }\n const resolvedValue = fixture.isFn ? await resolveFixtureFunction(fixture.value, context, cleanupFnArray) : fixture.value;\n context[fixture.prop] = resolvedValue;\n fixtureValueMap.set(fixture, resolvedValue);\n cleanupFnArray.unshift(() => {\n fixtureValueMap.delete(fixture);\n });\n }\n }\n return resolveFixtures().then(() => fn(context));\n };\n}\nasync function resolveFixtureFunction(fixtureFn, context, cleanupFnArray) {\n const useFnArgPromise = createDefer();\n let isUseFnArgResolved = false;\n const fixtureReturn = fixtureFn(context, async (useFnArg) => {\n isUseFnArgResolved = true;\n useFnArgPromise.resolve(useFnArg);\n const useReturnPromise = createDefer();\n cleanupFnArray.push(async () => {\n useReturnPromise.resolve();\n await fixtureReturn;\n });\n await useReturnPromise;\n }).catch((e) => {\n if (!isUseFnArgResolved) {\n useFnArgPromise.reject(e);\n return;\n }\n throw e;\n });\n return useFnArgPromise;\n}\nfunction resolveDeps(fixtures, depSet = /* @__PURE__ */ new Set(), pendingFixtures = []) {\n fixtures.forEach((fixture) => {\n if (pendingFixtures.includes(fixture)) {\n return;\n }\n if (!fixture.isFn || !fixture.deps) {\n pendingFixtures.push(fixture);\n return;\n }\n if (depSet.has(fixture)) {\n throw new Error(\n `Circular fixture dependency detected: ${fixture.prop} <- ${[...depSet].reverse().map((d) => d.prop).join(\" <- \")}`\n );\n }\n depSet.add(fixture);\n resolveDeps(fixture.deps, depSet, pendingFixtures);\n pendingFixtures.push(fixture);\n depSet.clear();\n });\n return pendingFixtures;\n}\nfunction getUsedProps(fn) {\n let fnString = fn.toString();\n if (/__async\\(this, (?:null|arguments|\\[[_0-9, ]*\\]), function\\*/.test(fnString)) {\n fnString = fnString.split(\"__async(this,\")[1];\n }\n const match = fnString.match(/[^(]*\\(([^)]*)/);\n if (!match) {\n return [];\n }\n const args = splitByComma(match[1]);\n if (!args.length) {\n return [];\n }\n let first = args[0];\n if (\"__VITEST_FIXTURE_INDEX__\" in fn) {\n first = args[fn.__VITEST_FIXTURE_INDEX__];\n if (!first) {\n return [];\n }\n }\n if (!(first.startsWith(\"{\") && first.endsWith(\"}\"))) {\n throw new Error(\n `The first argument inside a fixture must use object destructuring pattern, e.g. ({ test } => {}). Instead, received \"${first}\".`\n );\n }\n const _first = first.slice(1, -1).replace(/\\s/g, \"\");\n const props = splitByComma(_first).map((prop) => {\n return prop.replace(/:.*|=.*/g, \"\");\n });\n const last = props.at(-1);\n if (last && last.startsWith(\"...\")) {\n throw new Error(\n `Rest parameters are not supported in fixtures, received \"${last}\".`\n );\n }\n return props;\n}\nfunction splitByComma(s) {\n const result = [];\n const stack = [];\n let start = 0;\n for (let i = 0; i < s.length; i++) {\n if (s[i] === \"{\" || s[i] === \"[\") {\n stack.push(s[i] === \"{\" ? \"}\" : \"]\");\n } else if (s[i] === stack[stack.length - 1]) {\n stack.pop();\n } else if (!stack.length && s[i] === \",\") {\n const token = s.substring(start, i).trim();\n if (token) {\n result.push(token);\n }\n start = i + 1;\n }\n }\n const lastToken = s.substring(start).trim();\n if (lastToken) {\n result.push(lastToken);\n }\n return result;\n}\n\nlet _test;\nfunction setCurrentTest(test) {\n _test = test;\n}\nfunction getCurrentTest() {\n return _test;\n}\n\nconst suite = createSuite();\nconst test = createTest(function(name, optionsOrFn, optionsOrTest) {\n if (getCurrentTest()) {\n throw new Error(\n 'Calling the test function inside another test function is not allowed. Please put it inside \"describe\" or \"suite\" so it can be properly collected.'\n );\n }\n getCurrentSuite().test.fn.call(\n this,\n formatName(name),\n optionsOrFn,\n optionsOrTest\n );\n});\nconst describe = suite;\nconst it = test;\nlet runner;\nlet defaultSuite;\nlet currentTestFilepath;\nfunction assert(condition, message) {\n if (!condition) {\n throw new Error(`Vitest failed to find ${message}. This is a bug in Vitest. Please, open an issue with reproduction.`);\n }\n}\nfunction getDefaultSuite() {\n assert(defaultSuite, \"the default suite\");\n return defaultSuite;\n}\nfunction getTestFilepath() {\n return currentTestFilepath;\n}\nfunction getRunner() {\n assert(runner, \"the runner\");\n return runner;\n}\nfunction createDefaultSuite(runner2) {\n const config = runner2.config.sequence;\n const collector = suite(\"\", { concurrent: config.concurrent }, () => {\n });\n delete collector.suite;\n return collector;\n}\nfunction clearCollectorContext(filepath, currentRunner) {\n if (!defaultSuite) {\n defaultSuite = createDefaultSuite(currentRunner);\n }\n runner = currentRunner;\n currentTestFilepath = filepath;\n collectorContext.tasks.length = 0;\n defaultSuite.clear();\n collectorContext.currentSuite = defaultSuite;\n}\nfunction getCurrentSuite() {\n const currentSuite = collectorContext.currentSuite || defaultSuite;\n assert(currentSuite, \"the current suite\");\n return currentSuite;\n}\nfunction createSuiteHooks() {\n return {\n beforeAll: [],\n afterAll: [],\n beforeEach: [],\n afterEach: []\n };\n}\nfunction parseArguments(optionsOrFn, optionsOrTest) {\n let options = {};\n let fn = () => {\n };\n if (typeof optionsOrTest === \"object\") {\n if (typeof optionsOrFn === \"object\") {\n throw new TypeError(\n \"Cannot use two objects as arguments. Please provide options and a function callback in that order.\"\n );\n }\n console.warn(\n \"Using an object as a third argument is deprecated. Vitest 4 will throw an error if the third argument is not a timeout number. Please use the second argument for options. See more at https://vitest.dev/guide/migration\"\n );\n options = optionsOrTest;\n } else if (typeof optionsOrTest === \"number\") {\n options = { timeout: optionsOrTest };\n } else if (typeof optionsOrFn === \"object\") {\n options = optionsOrFn;\n }\n if (typeof optionsOrFn === \"function\") {\n if (typeof optionsOrTest === \"function\") {\n throw new TypeError(\n \"Cannot use two functions as arguments. Please use the second argument for options.\"\n );\n }\n fn = optionsOrFn;\n } else if (typeof optionsOrTest === \"function\") {\n fn = optionsOrTest;\n }\n return {\n options,\n handler: fn\n };\n}\nfunction createSuiteCollector(name, factory = () => {\n}, mode, each, suiteOptions) {\n const tasks = [];\n let suite2;\n initSuite(true);\n const task = function(name2 = \"\", options = {}) {\n var _a;\n const timeout = (options == null ? void 0 : options.timeout) ?? runner.config.testTimeout;\n const task2 = {\n id: \"\",\n name: name2,\n suite: (_a = collectorContext.currentSuite) == null ? void 0 : _a.suite,\n each: options.each,\n fails: options.fails,\n context: void 0,\n type: \"test\",\n file: void 0,\n timeout,\n retry: options.retry ?? runner.config.retry,\n repeats: options.repeats,\n mode: options.only ? \"only\" : options.skip ? \"skip\" : options.todo ? \"todo\" : \"run\",\n meta: options.meta ?? /* @__PURE__ */ Object.create(null)\n };\n const handler = options.handler;\n if (options.concurrent || !options.sequential && runner.config.sequence.concurrent) {\n task2.concurrent = true;\n }\n task2.shuffle = suiteOptions == null ? void 0 : suiteOptions.shuffle;\n const context = createTestContext(task2, runner);\n Object.defineProperty(task2, \"context\", {\n value: context,\n enumerable: false\n });\n setFixture(context, options.fixtures);\n if (handler) {\n setFn(\n task2,\n withTimeout(\n withAwaitAsyncAssertions(withFixtures(handler, context), task2),\n timeout\n )\n );\n }\n if (runner.config.includeTaskLocation) {\n const limit = Error.stackTraceLimit;\n Error.stackTraceLimit = 15;\n const error = new Error(\"stacktrace\").stack;\n Error.stackTraceLimit = limit;\n const stack = findTestFileStackTrace(error, task2.each ?? false);\n if (stack) {\n task2.location = stack;\n }\n }\n tasks.push(task2);\n return task2;\n };\n const test2 = createTest(function(name2, optionsOrFn, optionsOrTest) {\n let { options, handler } = parseArguments(optionsOrFn, optionsOrTest);\n if (typeof suiteOptions === \"object\") {\n options = Object.assign({}, suiteOptions, options);\n }\n options.concurrent = this.concurrent || !this.sequential && (options == null ? void 0 : options.concurrent);\n options.sequential = this.sequential || !this.concurrent && (options == null ? void 0 : options.sequential);\n const test3 = task(formatName(name2), {\n ...this,\n ...options,\n handler\n });\n test3.type = \"test\";\n });\n const collector = {\n type: \"collector\",\n name,\n mode,\n suite: suite2,\n options: suiteOptions,\n test: test2,\n tasks,\n collect,\n task,\n clear,\n on: addHook\n };\n function addHook(name2, ...fn) {\n getHooks(suite2)[name2].push(...fn);\n }\n function initSuite(includeLocation) {\n var _a;\n if (typeof suiteOptions === \"number\") {\n suiteOptions = { timeout: suiteOptions };\n }\n suite2 = {\n id: \"\",\n type: \"suite\",\n name,\n suite: (_a = collectorContext.currentSuite) == null ? void 0 : _a.suite,\n mode,\n each,\n file: void 0,\n shuffle: suiteOptions == null ? void 0 : suiteOptions.shuffle,\n tasks: [],\n meta: /* @__PURE__ */ Object.create(null),\n concurrent: suiteOptions == null ? void 0 : suiteOptions.concurrent\n };\n if (runner && includeLocation && runner.config.includeTaskLocation) {\n const limit = Error.stackTraceLimit;\n Error.stackTraceLimit = 15;\n const error = new Error(\"stacktrace\").stack;\n Error.stackTraceLimit = limit;\n const stack = findTestFileStackTrace(error, suite2.each ?? false);\n if (stack) {\n suite2.location = stack;\n }\n }\n setHooks(suite2, createSuiteHooks());\n }\n function clear() {\n tasks.length = 0;\n initSuite(false);\n }\n async function collect(file) {\n if (!file) {\n throw new TypeError(\"File is required to collect tasks.\");\n }\n if (factory) {\n await runWithSuite(collector, () => factory(test2));\n }\n const allChildren = [];\n for (const i of tasks) {\n allChildren.push(i.type === \"collector\" ? await i.collect(file) : i);\n }\n suite2.file = file;\n suite2.tasks = allChildren;\n allChildren.forEach((task2) => {\n task2.file = file;\n });\n return suite2;\n }\n collectTask(collector);\n return collector;\n}\nfunction withAwaitAsyncAssertions(fn, task) {\n return async (...args) => {\n const fnResult = await fn(...args);\n if (task.promises) {\n const result = await Promise.allSettled(task.promises);\n const errors = result.map((r) => r.status === \"rejected\" ? r.reason : void 0).filter(Boolean);\n if (errors.length) {\n throw errors;\n }\n }\n return fnResult;\n };\n}\nfunction createSuite() {\n function suiteFn(name, factoryOrOptions, optionsOrFactory) {\n var _a;\n const mode = this.only ? \"only\" : this.skip ? \"skip\" : this.todo ? \"todo\" : \"run\";\n const currentSuite = collectorContext.currentSuite || defaultSuite;\n let { options, handler: factory } = parseArguments(\n factoryOrOptions,\n optionsOrFactory\n );\n const isConcurrentSpecified = options.concurrent || this.concurrent || options.sequential === false;\n const isSequentialSpecified = options.sequential || this.sequential || options.concurrent === false;\n options = {\n ...currentSuite == null ? void 0 : currentSuite.options,\n ...options,\n shuffle: this.shuffle ?? options.shuffle ?? ((_a = currentSuite == null ? void 0 : currentSuite.options) == null ? void 0 : _a.shuffle) ?? (runner == null ? void 0 : runner.config.sequence.shuffle)\n };\n const isConcurrent = isConcurrentSpecified || options.concurrent && !isSequentialSpecified;\n const isSequential = isSequentialSpecified || options.sequential && !isConcurrentSpecified;\n options.concurrent = isConcurrent && !isSequential;\n options.sequential = isSequential && !isConcurrent;\n return createSuiteCollector(\n formatName(name),\n factory,\n mode,\n this.each,\n options\n );\n }\n suiteFn.each = function(cases, ...args) {\n const suite2 = this.withContext();\n this.setContext(\"each\", true);\n if (Array.isArray(cases) && args.length) {\n cases = formatTemplateString(cases, args);\n }\n return (name, optionsOrFn, fnOrOptions) => {\n const _name = formatName(name);\n const arrayOnlyCases = cases.every(Array.isArray);\n const { options, handler } = parseArguments(optionsOrFn, fnOrOptions);\n const fnFirst = typeof optionsOrFn === \"function\" && typeof fnOrOptions === \"object\";\n cases.forEach((i, idx) => {\n const items = Array.isArray(i) ? i : [i];\n if (fnFirst) {\n if (arrayOnlyCases) {\n suite2(\n formatTitle(_name, items, idx),\n () => handler(...items),\n options\n );\n } else {\n suite2(formatTitle(_name, items, idx), () => handler(i), options);\n }\n } else {\n if (arrayOnlyCases) {\n suite2(formatTitle(_name, items, idx), options, () => handler(...items));\n } else {\n suite2(formatTitle(_name, items, idx), options, () => handler(i));\n }\n }\n });\n this.setContext(\"each\", void 0);\n };\n };\n suiteFn.for = function(cases, ...args) {\n if (Array.isArray(cases) && args.length) {\n cases = formatTemplateString(cases, args);\n }\n return (name, optionsOrFn, fnOrOptions) => {\n const name_ = formatName(name);\n const { options, handler } = parseArguments(optionsOrFn, fnOrOptions);\n cases.forEach((item, idx) => {\n suite(formatTitle(name_, toArray(item), idx), options, () => handler(item));\n });\n };\n };\n suiteFn.skipIf = (condition) => condition ? suite.skip : suite;\n suiteFn.runIf = (condition) => condition ? suite : suite.skip;\n return createChainable(\n [\"concurrent\", \"sequential\", \"shuffle\", \"skip\", \"only\", \"todo\"],\n suiteFn\n );\n}\nfunction createTaskCollector(fn, context) {\n const taskFn = fn;\n taskFn.each = function(cases, ...args) {\n const test2 = this.withContext();\n this.setContext(\"each\", true);\n if (Array.isArray(cases) && args.length) {\n cases = formatTemplateString(cases, args);\n }\n return (name, optionsOrFn, fnOrOptions) => {\n const _name = formatName(name);\n const arrayOnlyCases = cases.every(Array.isArray);\n const { options, handler } = parseArguments(optionsOrFn, fnOrOptions);\n const fnFirst = typeof optionsOrFn === \"function\" && typeof fnOrOptions === \"object\";\n cases.forEach((i, idx) => {\n const items = Array.isArray(i) ? i : [i];\n if (fnFirst) {\n if (arrayOnlyCases) {\n test2(\n formatTitle(_name, items, idx),\n () => handler(...items),\n options\n );\n } else {\n test2(formatTitle(_name, items, idx), () => handler(i), options);\n }\n } else {\n if (arrayOnlyCases) {\n test2(formatTitle(_name, items, idx), options, () => handler(...items));\n } else {\n test2(formatTitle(_name, items, idx), options, () => handler(i));\n }\n }\n });\n this.setContext(\"each\", void 0);\n };\n };\n taskFn.for = function(cases, ...args) {\n const test2 = this.withContext();\n if (Array.isArray(cases) && args.length) {\n cases = formatTemplateString(cases, args);\n }\n return (name, optionsOrFn, fnOrOptions) => {\n const _name = formatName(name);\n const { options, handler } = parseArguments(optionsOrFn, fnOrOptions);\n cases.forEach((item, idx) => {\n const handlerWrapper = (ctx) => handler(item, ctx);\n handlerWrapper.__VITEST_FIXTURE_INDEX__ = 1;\n handlerWrapper.toString = () => handler.toString();\n test2(formatTitle(_name, toArray(item), idx), options, handlerWrapper);\n });\n };\n };\n taskFn.skipIf = function(condition) {\n return condition ? this.skip : this;\n };\n taskFn.runIf = function(condition) {\n return condition ? this : this.skip;\n };\n taskFn.extend = function(fixtures) {\n const _context = mergeContextFixtures(\n fixtures,\n context || {},\n (key) => {\n var _a, _b;\n return (_b = (_a = getRunner()).injectValue) == null ? void 0 : _b.call(_a, key);\n }\n );\n return createTest(function fn2(name, optionsOrFn, optionsOrTest) {\n getCurrentSuite().test.fn.call(\n this,\n formatName(name),\n optionsOrFn,\n optionsOrTest\n );\n }, _context);\n };\n const _test = createChainable(\n [\"concurrent\", \"sequential\", \"skip\", \"only\", \"todo\", \"fails\"],\n taskFn\n );\n if (context) {\n _test.mergeContext(context);\n }\n return _test;\n}\nfunction createTest(fn, context) {\n return createTaskCollector(fn, context);\n}\nfunction formatName(name) {\n return typeof name === \"string\" ? name : typeof name === \"function\" ? name.name || \"<anonymous>\" : String(name);\n}\nfunction formatTitle(template, items, idx) {\n if (template.includes(\"%#\")) {\n template = template.replace(/%%/g, \"__vitest_escaped_%__\").replace(/%#/g, `${idx}`).replace(/__vitest_escaped_%__/g, \"%%\");\n }\n const count = template.split(\"%\").length - 1;\n if (template.includes(\"%f\")) {\n const placeholders = template.match(/%f/g) || [];\n placeholders.forEach((_, i) => {\n if (isNegativeNaN(items[i]) || Object.is(items[i], -0)) {\n let occurrence = 0;\n template = template.replace(/%f/g, (match) => {\n occurrence++;\n return occurrence === i + 1 ? \"-%f\" : match;\n });\n }\n });\n }\n let formatted = format(template, ...items.slice(0, count));\n if (isObject(items[0])) {\n formatted = formatted.replace(\n /\\$([$\\w.]+)/g,\n // https://github.com/chaijs/chai/pull/1490\n (_, key) => {\n var _a, _b;\n return objDisplay(objectAttr(items[0], key), {\n truncate: (_b = (_a = runner == null ? void 0 : runner.config) == null ? void 0 : _a.chaiConfig) == null ? void 0 : _b.truncateThreshold\n });\n }\n );\n }\n return formatted;\n}\nfunction formatTemplateString(cases, args) {\n const header = cases.join(\"\").trim().replace(/ /g, \"\").split(\"\\n\").map((i) => i.split(\"|\"))[0];\n const res = [];\n for (let i = 0; i < Math.floor(args.length / header.length); i++) {\n const oneCase = {};\n for (let j = 0; j < header.length; j++) {\n oneCase[header[j]] = args[i * header.length + j];\n }\n res.push(oneCase);\n }\n return res;\n}\nfunction findTestFileStackTrace(error, each) {\n const lines = error.split(\"\\n\").slice(1);\n for (const line of lines) {\n const stack = parseSingleStack(line);\n if (stack && stack.file === getTestFilepath()) {\n return {\n line: stack.line,\n /**\n * test.each([1, 2])('name')\n * ^ leads here, but should\n * ^ lead here\n * in source maps it's the same boundary, so it just points to the start of it\n */\n column: each ? stack.column + 1 : stack.column\n };\n }\n }\n}\n\nfunction getDefaultHookTimeout() {\n return getRunner().config.hookTimeout;\n}\nconst CLEANUP_TIMEOUT_KEY = Symbol.for(\"VITEST_CLEANUP_TIMEOUT\");\nconst CLEANUP_STACK_TRACE_KEY = Symbol.for(\"VITEST_CLEANUP_STACK_TRACE\");\nfunction getBeforeHookCleanupCallback(hook, result) {\n if (typeof result === \"function\") {\n const timeout = CLEANUP_TIMEOUT_KEY in hook && typeof hook[CLEANUP_TIMEOUT_KEY] === \"number\" ? hook[CLEANUP_TIMEOUT_KEY] : getDefaultHookTimeout();\n const stackTraceError = CLEANUP_STACK_TRACE_KEY in hook && hook[CLEANUP_STACK_TRACE_KEY] instanceof Error ? hook[CLEANUP_STACK_TRACE_KEY] : void 0;\n return withTimeout(result, timeout, true, stackTraceError);\n }\n}\nfunction beforeAll(fn, timeout = getDefaultHookTimeout()) {\n assertTypes(fn, '\"beforeAll\" callback', [\"function\"]);\n const stackTraceError = new Error(\"STACK_TRACE_ERROR\");\n return getCurrentSuite().on(\n \"beforeAll\",\n Object.assign(\n withTimeout(\n fn,\n timeout,\n true,\n stackTraceError\n ),\n {\n [CLEANUP_TIMEOUT_KEY]: timeout,\n [CLEANUP_STACK_TRACE_KEY]: stackTraceError\n }\n )\n );\n}\nfunction afterAll(fn, timeout) {\n assertTypes(fn, '\"afterAll\" callback', [\"function\"]);\n return getCurrentSuite().on(\n \"afterAll\",\n withTimeout(\n fn,\n timeout ?? getDefaultHookTimeout(),\n true,\n new Error(\"STACK_TRACE_ERROR\")\n )\n );\n}\nfunction beforeEach(fn, timeout = getDefaultHookTimeout()) {\n assertTypes(fn, '\"beforeEach\" callback', [\"function\"]);\n const stackTraceError = new Error(\"STACK_TRACE_ERROR\");\n return getCurrentSuite().on(\n \"beforeEach\",\n Object.assign(\n withTimeout(\n withFixtures(fn),\n timeout ?? getDefaultHookTimeout(),\n true,\n stackTraceError\n ),\n {\n [CLEANUP_TIMEOUT_KEY]: timeout,\n [CLEANUP_STACK_TRACE_KEY]: stackTraceError\n }\n )\n );\n}\nfunction afterEach(fn, timeout) {\n assertTypes(fn, '\"afterEach\" callback', [\"function\"]);\n return getCurrentSuite().on(\n \"afterEach\",\n withTimeout(\n withFixtures(fn),\n timeout ?? getDefaultHookTimeout(),\n true,\n new Error(\"STACK_TRACE_ERROR\")\n )\n );\n}\nconst onTestFailed = createTestHook(\n \"onTestFailed\",\n (test, handler, timeout) => {\n test.onFailed || (test.onFailed = []);\n test.onFailed.push(\n withTimeout(\n handler,\n timeout ?? getDefaultHookTimeout(),\n true,\n new Error(\"STACK_TRACE_ERROR\")\n )\n );\n }\n);\nconst onTestFinished = createTestHook(\n \"onTestFinished\",\n (test, handler, timeout) => {\n test.onFinished || (test.onFinished = []);\n test.onFinished.push(\n withTimeout(\n handler,\n timeout ?? getDefaultHookTimeout(),\n true,\n new Error(\"STACK_TRACE_ERROR\")\n )\n );\n }\n);\nfunction createTestHook(name, handler) {\n return (fn, timeout) => {\n assertTypes(fn, `\"${name}\" callback`, [\"function\"]);\n const current = getCurrentTest();\n if (!current) {\n throw new Error(`Hook ${name}() can only be called inside a test`);\n }\n return handler(current, fn, timeout);\n };\n}\n\nasync function runSetupFiles(config, files, runner) {\n if (config.sequence.setupFiles === \"parallel\") {\n await Promise.all(\n files.map(async (fsPath) => {\n await runner.importFile(fsPath, \"setup\");\n })\n );\n } else {\n for (const fsPath of files) {\n await runner.importFile(fsPath, \"setup\");\n }\n }\n}\n\nconst now$1 = globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;\nasync function collectTests(specs, runner) {\n var _a;\n const files = [];\n const config = runner.config;\n for (const spec of specs) {\n const filepath = typeof spec === \"string\" ? spec : spec.filepath;\n const testLocations = typeof spec === \"string\" ? void 0 : spec.testLocations;\n const file = createFileTask(filepath, config.root, config.name, runner.pool);\n file.shuffle = config.sequence.shuffle;\n (_a = runner.onCollectStart) == null ? void 0 : _a.call(runner, file);\n clearCollectorContext(filepath, runner);\n try {\n const setupFiles = toArray(config.setupFiles);\n if (setupFiles.length) {\n const setupStart = now$1();\n await runSetupFiles(config, setupFiles, runner);\n const setupEnd = now$1();\n file.setupDuration = setupEnd - setupStart;\n } else {\n file.setupDuration = 0;\n }\n const collectStart = now$1();\n await runner.importFile(filepath, \"collect\");\n const defaultTasks = await getDefaultSuite().collect(file);\n const fileHooks = createSuiteHooks();\n mergeHooks(fileHooks, getHooks(defaultTasks));\n for (const c of [...defaultTasks.tasks, ...collectorContext.tasks]) {\n if (c.type === \"test\" || c.type === \"suite\") {\n file.tasks.push(c);\n } else if (c.type === \"collector\") {\n const suite = await c.collect(file);\n if (suite.name || suite.tasks.length) {\n mergeHooks(fileHooks, getHooks(suite));\n file.tasks.push(suite);\n }\n } else {\n c;\n }\n }\n setHooks(file, fileHooks);\n file.collectDuration = now$1() - collectStart;\n } catch (e) {\n const error = processError(e);\n file.result = {\n state: \"fail\",\n errors: [error]\n };\n }\n calculateSuiteHash(file);\n const hasOnlyTasks = someTasksAreOnly(file);\n interpretTaskModes(\n file,\n config.testNamePattern,\n testLocations,\n hasOnlyTasks,\n false,\n config.allowOnly\n );\n if (file.mode === \"queued\") {\n file.mode = \"run\";\n }\n files.push(file);\n }\n return files;\n}\nfunction mergeHooks(baseHooks, hooks) {\n for (const _key in hooks) {\n const key = _key;\n baseHooks[key].push(...hooks[key]);\n }\n return baseHooks;\n}\n\nconst now = globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;\nconst unixNow = Date.now;\nfunction updateSuiteHookState(task, name, state, runner) {\n if (!task.result) {\n task.result = { state: \"run\" };\n }\n if (!task.result.hooks) {\n task.result.hooks = {};\n }\n const suiteHooks = task.result.hooks;\n if (suiteHooks) {\n suiteHooks[name] = state;\n let event = state === \"run\" ? \"before-hook-start\" : \"before-hook-end\";\n if (name === \"afterAll\" || name === \"afterEach\") {\n event = state === \"run\" ? \"after-hook-start\" : \"after-hook-end\";\n }\n updateTask(\n event,\n task,\n runner\n );\n }\n}\nfunction getSuiteHooks(suite, name, sequence) {\n const hooks = getHooks(suite)[name];\n if (sequence === \"stack\" && (name === \"afterAll\" || name === \"afterEach\")) {\n return hooks.slice().reverse();\n }\n return hooks;\n}\nasync function callTestHooks(runner, test, hooks, sequence) {\n if (sequence === \"stack\") {\n hooks = hooks.slice().reverse();\n }\n if (!hooks.length) {\n return;\n }\n const onTestFailed = test.context.onTestFailed;\n const onTestFinished = test.context.onTestFinished;\n test.context.onTestFailed = () => {\n throw new Error(`Cannot call \"onTestFailed\" inside a test hook.`);\n };\n test.context.onTestFinished = () => {\n throw new Error(`Cannot call \"onTestFinished\" inside a test hook.`);\n };\n if (sequence === \"parallel\") {\n try {\n await Promise.all(hooks.map((fn) => fn(test.context)));\n } catch (e) {\n failTask(test.result, e, runner.config.diffOptions);\n }\n } else {\n for (const fn of hooks) {\n try {\n await fn(test.context);\n } catch (e) {\n failTask(test.result, e, runner.config.diffOptions);\n }\n }\n }\n test.context.onTestFailed = onTestFailed;\n test.context.onTestFinished = onTestFinished;\n}\nasync function callSuiteHook(suite, currentTask, name, runner, args) {\n const sequence = runner.config.sequence.hooks;\n const callbacks = [];\n const parentSuite = \"filepath\" in suite ? null : suite.suite || suite.file;\n if (name === \"beforeEach\" && parentSuite) {\n callbacks.push(\n ...await callSuiteHook(parentSuite, currentTask, name, runner, args)\n );\n }\n const hooks = getSuiteHooks(suite, name, sequence);\n if (hooks.length > 0) {\n updateSuiteHookState(currentTask, name, \"run\", runner);\n }\n async function runHook(hook) {\n return getBeforeHookCleanupCallback(hook, await hook(...args));\n }\n if (sequence === \"parallel\") {\n callbacks.push(\n ...await Promise.all(hooks.map((hook) => runHook(hook)))\n );\n } else {\n for (const hook of hooks) {\n callbacks.push(await runHook(hook));\n }\n }\n if (hooks.length > 0) {\n updateSuiteHookState(currentTask, name, \"pass\", runner);\n }\n if (name === \"afterEach\" && parentSuite) {\n callbacks.push(\n ...await callSuiteHook(parentSuite, currentTask, name, runner, args)\n );\n }\n return callbacks;\n}\nconst packs = /* @__PURE__ */ new Map();\nconst eventsPacks = [];\nlet updateTimer;\nlet previousUpdate;\nfunction updateTask(event, task, runner) {\n eventsPacks.push([task.id, event]);\n packs.set(task.id, [task.result, task.meta]);\n const { clearTimeout, setTimeout } = getSafeTimers();\n clearTimeout(updateTimer);\n updateTimer = setTimeout(() => {\n previousUpdate = sendTasksUpdate(runner);\n }, 10);\n}\nasync function sendTasksUpdate(runner) {\n var _a;\n const { clearTimeout } = getSafeTimers();\n clearTimeout(updateTimer);\n await previousUpdate;\n if (packs.size) {\n const taskPacks = Array.from(packs).map(([id, task]) => {\n return [id, task[0], task[1]];\n });\n const p = (_a = runner.onTaskUpdate) == null ? void 0 : _a.call(runner, taskPacks, eventsPacks);\n eventsPacks.length = 0;\n packs.clear();\n return p;\n }\n}\nasync function callCleanupHooks(cleanups) {\n await Promise.all(\n cleanups.map(async (fn) => {\n if (typeof fn !== \"function\") {\n return;\n }\n await fn();\n })\n );\n}\nasync function runTest(test, runner) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i;\n await ((_a = runner.onBeforeRunTask) == null ? void 0 : _a.call(runner, test));\n if (test.mode !== \"run\" && test.mode !== \"queued\") {\n return;\n }\n if (((_b = test.result) == null ? void 0 : _b.state) === \"fail\") {\n updateTask(\"test-failed-early\", test, runner);\n return;\n }\n const start = now();\n test.result = {\n state: \"run\",\n startTime: unixNow(),\n retryCount: 0\n };\n updateTask(\"test-prepare\", test, runner);\n setCurrentTest(test);\n const suite = test.suite || test.file;\n const repeats = test.repeats ?? 0;\n for (let repeatCount = 0; repeatCount <= repeats; repeatCount++) {\n const retry = test.retry ?? 0;\n for (let retryCount = 0; retryCount <= retry; retryCount++) {\n let beforeEachCleanups = [];\n try {\n await ((_c = runner.onBeforeTryTask) == null ? void 0 : _c.call(runner, test, {\n retry: retryCount,\n repeats: repeatCount\n }));\n test.result.repeatCount = repeatCount;\n beforeEachCleanups = await callSuiteHook(\n suite,\n test,\n \"beforeEach\",\n runner,\n [test.context, suite]\n );\n if (runner.runTask) {\n await runner.runTask(test);\n } else {\n const fn = getFn(test);\n if (!fn) {\n throw new Error(\n \"Test function is not found. Did you add it using `setFn`?\"\n );\n }\n await fn();\n }\n await ((_d = runner.onAfterTryTask) == null ? void 0 : _d.call(runner, test, {\n retry: retryCount,\n repeats: repeatCount\n }));\n if (test.result.state !== \"fail\") {\n if (!test.repeats) {\n test.result.state = \"pass\";\n } else if (test.repeats && retry === retryCount) {\n test.result.state = \"pass\";\n }\n }\n } catch (e) {\n failTask(test.result, e, runner.config.diffOptions);\n }\n if (((_e = test.result) == null ? void 0 : _e.pending) || ((_f = test.result) == null ? void 0 : _f.state) === \"skip\") {\n test.mode = \"skip\";\n test.result = { state: \"skip\", note: (_g = test.result) == null ? void 0 : _g.note, pending: true };\n updateTask(\"test-finished\", test, runner);\n setCurrentTest(void 0);\n return;\n }\n try {\n await ((_h = runner.onTaskFinished) == null ? void 0 : _h.call(runner, test));\n } catch (e) {\n failTask(test.result, e, runner.config.diffOptions);\n }\n try {\n await callSuiteHook(suite, test, \"afterEach\", runner, [\n test.context,\n suite\n ]);\n await callCleanupHooks(beforeEachCleanups);\n await callFixtureCleanup(test.context);\n } catch (e) {\n failTask(test.result, e, runner.config.diffOptions);\n }\n await callTestHooks(runner, test, test.onFinished || [], \"stack\");\n if (test.result.state === \"fail\") {\n await callTestHooks(\n runner,\n test,\n test.onFailed || [],\n runner.config.sequence.hooks\n );\n }\n test.onFailed = void 0;\n test.onFinished = void 0;\n if (test.result.state === \"pass\") {\n break;\n }\n if (retryCount < retry) {\n test.result.state = \"run\";\n test.result.retryCount = (test.result.retryCount ?? 0) + 1;\n }\n updateTask(\"test-retried\", test, runner);\n }\n }\n if (test.fails) {\n if (test.result.state === \"pass\") {\n const error = processError(new Error(\"Expect test to fail\"));\n test.result.state = \"fail\";\n test.result.errors = [error];\n } else {\n test.result.state = \"pass\";\n test.result.errors = void 0;\n }\n }\n setCurrentTest(void 0);\n test.result.duration = now() - start;\n await ((_i = runner.onAfterRunTask) == null ? void 0 : _i.call(runner, test));\n updateTask(\"test-finished\", test, runner);\n}\nfunction failTask(result, err, diffOptions) {\n if (err instanceof PendingError) {\n result.state = \"skip\";\n result.note = err.note;\n result.pending = true;\n return;\n }\n result.state = \"fail\";\n const errors = Array.isArray(err) ? err : [err];\n for (const e of errors) {\n const error = processError(e, diffOptions);\n result.errors ?? (result.errors = []);\n result.errors.push(error);\n }\n}\nfunction markTasksAsSkipped(suite, runner) {\n suite.tasks.forEach((t) => {\n t.mode = \"skip\";\n t.result = { ...t.result, state: \"skip\" };\n updateTask(\"test-finished\", t, runner);\n if (t.type === \"suite\") {\n markTasksAsSkipped(t, runner);\n }\n });\n}\nasync function runSuite(suite, runner) {\n var _a, _b, _c, _d;\n await ((_a = runner.onBeforeRunSuite) == null ? void 0 : _a.call(runner, suite));\n if (((_b = suite.result) == null ? void 0 : _b.state) === \"fail\") {\n markTasksAsSkipped(suite, runner);\n updateTask(\"suite-failed-early\", suite, runner);\n return;\n }\n const start = now();\n const mode = suite.mode;\n suite.result = {\n state: mode === \"skip\" || mode === \"todo\" ? mode : \"run\",\n startTime: unixNow()\n };\n updateTask(\"suite-prepare\", suite, runner);\n let beforeAllCleanups = [];\n if (suite.mode === \"skip\") {\n suite.result.state = \"skip\";\n updateTask(\"suite-finished\", suite, runner);\n } else if (suite.mode === \"todo\") {\n suite.result.state = \"todo\";\n updateTask(\"suite-finished\", suite, runner);\n } else {\n try {\n try {\n beforeAllCleanups = await callSuiteHook(\n suite,\n suite,\n \"beforeAll\",\n runner,\n [suite]\n );\n } catch (e) {\n markTasksAsSkipped(suite, runner);\n throw e;\n }\n if (runner.runSuite) {\n await runner.runSuite(suite);\n } else {\n for (let tasksGroup of partitionSuiteChildren(suite)) {\n if (tasksGroup[0].concurrent === true) {\n await Promise.all(tasksGroup.map((c) => runSuiteChild(c, runner)));\n } else {\n const { sequence } = runner.config;\n if (suite.shuffle) {\n const suites = tasksGroup.filter(\n (group) => group.type === \"suite\"\n );\n const tests = tasksGroup.filter((group) => group.type === \"test\");\n const groups = shuffle([suites, tests], sequence.seed);\n tasksGroup = groups.flatMap(\n (group) => shuffle(group, sequence.seed)\n );\n }\n for (const c of tasksGroup) {\n await runSuiteChild(c, runner);\n }\n }\n }\n }\n } catch (e) {\n failTask(suite.result, e, runner.config.diffOptions);\n }\n try {\n await callSuiteHook(suite, suite, \"afterAll\", runner, [suite]);\n await callCleanupHooks(beforeAllCleanups);\n } catch (e) {\n failTask(suite.result, e, runner.config.diffOptions);\n }\n if (suite.mode === \"run\" || suite.mode === \"queued\") {\n if (!runner.config.passWithNoTests && !hasTests(suite)) {\n suite.result.state = \"fail\";\n if (!((_c = suite.result.errors) == null ? void 0 : _c.length)) {\n const error = processError(\n new Error(`No test found in suite ${suite.name}`)\n );\n suite.result.errors = [error];\n }\n } else if (hasFailed(suite)) {\n suite.result.state = \"fail\";\n } else {\n suite.result.state = \"pass\";\n }\n }\n suite.result.duration = now() - start;\n updateTask(\"suite-finished\", suite, runner);\n await ((_d = runner.onAfterRunSuite) == null ? void 0 : _d.call(runner, suite));\n }\n}\nlet limitMaxConcurrency;\nasync function runSuiteChild(c, runner) {\n if (c.type === \"test\") {\n return limitMaxConcurrency(() => runTest(c, runner));\n } else if (c.type === \"suite\") {\n return runSuite(c, runner);\n }\n}\nasync function runFiles(files, runner) {\n var _a, _b;\n limitMaxConcurrency ?? (limitMaxConcurrency = limitConcurrency(runner.config.maxConcurrency));\n for (const file of files) {\n if (!file.tasks.length && !runner.config.passWithNoTests) {\n if (!((_b = (_a = file.result) == null ? void 0 : _a.errors) == null ? void 0 : _b.length)) {\n const error = processError(\n new Error(`No test suite found in file ${file.filepath}`)\n );\n file.result = {\n state: \"fail\",\n errors: [error]\n };\n }\n }\n await runSuite(file, runner);\n }\n}\nasync function startTests(specs, runner) {\n var _a, _b, _c, _d;\n const paths = specs.map((f) => typeof f === \"string\" ? f : f.filepath);\n await ((_a = runner.onBeforeCollect) == null ? void 0 : _a.call(runner, paths));\n const files = await collectTests(specs, runner);\n await ((_b = runner.onCollected) == null ? void 0 : _b.call(runner, files));\n await ((_c = runner.onBeforeRunFiles) == null ? void 0 : _c.call(runner, files));\n await runFiles(files, runner);\n await ((_d = runner.onAfterRunFiles) == null ? void 0 : _d.call(runner, files));\n await sendTasksUpdate(runner);\n return files;\n}\nasync function publicCollect(specs, runner) {\n var _a, _b;\n const paths = specs.map((f) => typeof f === \"string\" ? f : f.filepath);\n await ((_a = runner.onBeforeCollect) == null ? void 0 : _a.call(runner, paths));\n const files = await collectTests(specs, runner);\n await ((_b = runner.onCollected) == null ? void 0 : _b.call(runner, files));\n return files;\n}\n\nexport { afterAll, afterEach, beforeAll, beforeEach, publicCollect as collectTests, createTaskCollector, describe, getCurrentSuite, getCurrentTest, getFn, getHooks, it, onTestFailed, onTestFinished, setFn, setHooks, startTests, suite, test, updateTask };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;AAOA,IAAM,eAAN,cAA2B,MAAM;CAC/B,YAAY,SAAS,MAAM,MAAM;EAC/B,MAAM,OAAO;EACb,KAAK,UAAU;EACf,KAAK,OAAO;EACZ,KAAK,SAAS,KAAK;CACrB;CACA,OAAO;CACP;AACF;AAEA,MAAM,QAAQ,KAAK;AACnB,MAAM,mBAAmB;CACvB,OAAO,CAAC;CACR,cAAc;AAChB;AACA,SAAS,YAAY,MAAM;CACzB,IAAI;CACJ,CAAC,KAAK,iBAAiB,iBAAiB,QAAgB,GAAG,MAAM,KAAK,IAAI;AAC5E;AACA,e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format@3.0.9/node_modules/@vitest/pretty-format/dist/index.js";
|
|
2
|
+
import inspect$1 from "../../../../../loupe@3.2.1/node_modules/loupe/lib/index.js";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@3.0.9/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js
|
|
4
|
+
const { AsymmetricMatcher, DOMCollection, DOMElement, Immutable, ReactElement, ReactTestComponent } = plugins;
|
|
5
|
+
const formatRegExp = /%[sdjifoOc%]/g;
|
|
6
|
+
function format(...args) {
|
|
7
|
+
if (typeof args[0] !== "string") {
|
|
8
|
+
const objects = [];
|
|
9
|
+
for (let i2 = 0; i2 < args.length; i2++) objects.push(inspect(args[i2], {
|
|
10
|
+
depth: 0,
|
|
11
|
+
colors: false
|
|
12
|
+
}));
|
|
13
|
+
return objects.join(" ");
|
|
14
|
+
}
|
|
15
|
+
const len = args.length;
|
|
16
|
+
let i = 1;
|
|
17
|
+
const template = args[0];
|
|
18
|
+
let str = String(template).replace(formatRegExp, (x) => {
|
|
19
|
+
if (x === "%%") return "%";
|
|
20
|
+
if (i >= len) return x;
|
|
21
|
+
switch (x) {
|
|
22
|
+
case "%s": {
|
|
23
|
+
const value = args[i++];
|
|
24
|
+
if (typeof value === "bigint") return `${value.toString()}n`;
|
|
25
|
+
if (typeof value === "number" && value === 0 && 1 / value < 0) return "-0";
|
|
26
|
+
if (typeof value === "object" && value !== null) {
|
|
27
|
+
if (typeof value.toString === "function" && value.toString !== Object.prototype.toString) return value.toString();
|
|
28
|
+
return inspect(value, {
|
|
29
|
+
depth: 0,
|
|
30
|
+
colors: false
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return String(value);
|
|
34
|
+
}
|
|
35
|
+
case "%d": {
|
|
36
|
+
const value = args[i++];
|
|
37
|
+
if (typeof value === "bigint") return `${value.toString()}n`;
|
|
38
|
+
return Number(value).toString();
|
|
39
|
+
}
|
|
40
|
+
case "%i": {
|
|
41
|
+
const value = args[i++];
|
|
42
|
+
if (typeof value === "bigint") return `${value.toString()}n`;
|
|
43
|
+
return Number.parseInt(String(value)).toString();
|
|
44
|
+
}
|
|
45
|
+
case "%f": return Number.parseFloat(String(args[i++])).toString();
|
|
46
|
+
case "%o": return inspect(args[i++], {
|
|
47
|
+
showHidden: true,
|
|
48
|
+
showProxy: true
|
|
49
|
+
});
|
|
50
|
+
case "%O": return inspect(args[i++]);
|
|
51
|
+
case "%c":
|
|
52
|
+
i++;
|
|
53
|
+
return "";
|
|
54
|
+
case "%j": try {
|
|
55
|
+
return JSON.stringify(args[i++]);
|
|
56
|
+
} catch (err) {
|
|
57
|
+
const m = err.message;
|
|
58
|
+
if (m.includes("circular structure") || m.includes("cyclic structures") || m.includes("cyclic object")) return "[Circular]";
|
|
59
|
+
throw err;
|
|
60
|
+
}
|
|
61
|
+
default: return x;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
for (let x = args[i]; i < len; x = args[++i]) if (x === null || typeof x !== "object") str += ` ${x}`;
|
|
65
|
+
else str += ` ${inspect(x)}`;
|
|
66
|
+
return str;
|
|
67
|
+
}
|
|
68
|
+
function inspect(obj, options = {}) {
|
|
69
|
+
if (options.truncate === 0) options.truncate = Number.POSITIVE_INFINITY;
|
|
70
|
+
return inspect$1(obj, options);
|
|
71
|
+
}
|
|
72
|
+
function objDisplay(obj, options = {}) {
|
|
73
|
+
if (typeof options.truncate === "undefined") options.truncate = 40;
|
|
74
|
+
const str = inspect(obj, options);
|
|
75
|
+
const type = Object.prototype.toString.call(obj);
|
|
76
|
+
if (options.truncate && str.length >= options.truncate) if (type === "[object Function]") {
|
|
77
|
+
const fn = obj;
|
|
78
|
+
return !fn.name ? "[Function]" : `[Function: ${fn.name}]`;
|
|
79
|
+
} else if (type === "[object Array]") return `[ Array(${obj.length}) ]`;
|
|
80
|
+
else if (type === "[object Object]") {
|
|
81
|
+
const keys = Object.keys(obj);
|
|
82
|
+
return `{ Object (${keys.length > 2 ? `${keys.splice(0, 2).join(", ")}, ...` : keys.join(", ")}) }`;
|
|
83
|
+
} else return str;
|
|
84
|
+
return str;
|
|
85
|
+
}
|
|
86
|
+
function getDefaultExportFromCjs(x) {
|
|
87
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
90
|
+
export { format, getDefaultExportFromCjs, inspect, objDisplay };
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=chunk-_commonjsHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-_commonjsHelpers.js","names":["loupe.inspect"],"sources":["../../../../../../../../../../node_modules/.pnpm/@vitest+utils@3.0.9/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js"],"sourcesContent":["import { plugins, format as format$1 } from '@vitest/pretty-format';\nimport * as loupe from 'loupe';\n\nconst {\n AsymmetricMatcher,\n DOMCollection,\n DOMElement,\n Immutable,\n ReactElement,\n ReactTestComponent\n} = plugins;\nconst PLUGINS = [\n ReactTestComponent,\n ReactElement,\n DOMElement,\n DOMCollection,\n Immutable,\n AsymmetricMatcher\n];\nfunction stringify(object, maxDepth = 10, { maxLength, ...options } = {}) {\n const MAX_LENGTH = maxLength ?? 1e4;\n let result;\n try {\n result = format$1(object, {\n maxDepth,\n escapeString: false,\n // min: true,\n plugins: PLUGINS,\n ...options\n });\n } catch {\n result = format$1(object, {\n callToJSON: false,\n maxDepth,\n escapeString: false,\n // min: true,\n plugins: PLUGINS,\n ...options\n });\n }\n return result.length >= MAX_LENGTH && maxDepth > 1 ? stringify(object, Math.floor(Math.min(maxDepth, Number.MAX_SAFE_INTEGER) / 2), { maxLength, ...options }) : result;\n}\nconst formatRegExp = /%[sdjifoOc%]/g;\nfunction format(...args) {\n if (typeof args[0] !== \"string\") {\n const objects = [];\n for (let i2 = 0; i2 < args.length; i2++) {\n objects.push(inspect(args[i2], { depth: 0, colors: false }));\n }\n return objects.join(\" \");\n }\n const len = args.length;\n let i = 1;\n const template = args[0];\n let str = String(template).replace(formatRegExp, (x) => {\n if (x === \"%%\") {\n return \"%\";\n }\n if (i >= len) {\n return x;\n }\n switch (x) {\n case \"%s\": {\n const value = args[i++];\n if (typeof value === \"bigint\") {\n return `${value.toString()}n`;\n }\n if (typeof value === \"number\" && value === 0 && 1 / value < 0) {\n return \"-0\";\n }\n if (typeof value === \"object\" && value !== null) {\n if (typeof value.toString === \"function\" && value.toString !== Object.prototype.toString) {\n return value.toString();\n }\n return inspect(value, { depth: 0, colors: false });\n }\n return String(value);\n }\n case \"%d\": {\n const value = args[i++];\n if (typeof value === \"bigint\") {\n return `${value.toString()}n`;\n }\n return Number(value).toString();\n }\n case \"%i\": {\n const value = args[i++];\n if (typeof value === \"bigint\") {\n return `${value.toString()}n`;\n }\n return Number.parseInt(String(value)).toString();\n }\n case \"%f\":\n return Number.parseFloat(String(args[i++])).toString();\n case \"%o\":\n return inspect(args[i++], { showHidden: true, showProxy: true });\n case \"%O\":\n return inspect(args[i++]);\n case \"%c\": {\n i++;\n return \"\";\n }\n case \"%j\":\n try {\n return JSON.stringify(args[i++]);\n } catch (err) {\n const m = err.message;\n if (\n // chromium\n m.includes(\"circular structure\") || m.includes(\"cyclic structures\") || m.includes(\"cyclic object\")\n ) {\n return \"[Circular]\";\n }\n throw err;\n }\n default:\n return x;\n }\n });\n for (let x = args[i]; i < len; x = args[++i]) {\n if (x === null || typeof x !== \"object\") {\n str += ` ${x}`;\n } else {\n str += ` ${inspect(x)}`;\n }\n }\n return str;\n}\nfunction inspect(obj, options = {}) {\n if (options.truncate === 0) {\n options.truncate = Number.POSITIVE_INFINITY;\n }\n return loupe.inspect(obj, options);\n}\nfunction objDisplay(obj, options = {}) {\n if (typeof options.truncate === \"undefined\") {\n options.truncate = 40;\n }\n const str = inspect(obj, options);\n const type = Object.prototype.toString.call(obj);\n if (options.truncate && str.length >= options.truncate) {\n if (type === \"[object Function]\") {\n const fn = obj;\n return !fn.name ? \"[Function]\" : `[Function: ${fn.name}]`;\n } else if (type === \"[object Array]\") {\n return `[ Array(${obj.length}) ]`;\n } else if (type === \"[object Object]\") {\n const keys = Object.keys(obj);\n const kstr = keys.length > 2 ? `${keys.splice(0, 2).join(\", \")}, ...` : keys.join(\", \");\n return `{ Object (${kstr}) }`;\n } else {\n return str;\n }\n }\n return str;\n}\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nexport { format as f, getDefaultExportFromCjs as g, inspect as i, objDisplay as o, stringify as s };\n"],"x_google_ignoreList":[0],"mappings":";;;AAGA,MAAM,EACJ,mBACA,eACA,YACA,WACA,cACA,uBACE;AAgCJ,MAAM,eAAe;AACrB,SAAS,OAAO,GAAG,MAAM;CACvB,IAAI,OAAO,KAAK,OAAO,UAAU;EAC/B,MAAM,UAAU,CAAC;EACjB,KAAK,IAAI,KAAK,GAAG,KAAK,KAAK,QAAQ,MACjC,QAAQ,KAAK,QAAQ,KAAK,KAAK;GAAE,OAAO;GAAG,QAAQ;EAAM,CAAC,CAAC;EAE7D,OAAO,QAAQ,KAAK,GAAG;CACzB;CACA,MAAM,MAAM,KAAK;CACjB,IAAI,IAAI;CACR,MAAM,WAAW,KAAK;CACtB,IAAI,MAAM,OAAO,QAAQ,CAAC,CAAC,QAAQ,eAAe,MAAM;EACtD,IAAI,MAAM,MACR,OAAO;EAET,IAAI,KAAK,KACP,OAAO;EAET,QAAQ,GAAR;GACE,KAAK,MAAM;IACT,MAAM,QAAQ,KAAK;IACnB,IAAI,OAAO,UAAU,UACnB,OAAO,GAAG,MAAM,SAAS,EAAE;IAE7B,IAAI,OAAO,UAAU,YAAY,UAAU,KAAK,IAAI,QAAQ,GAC1D,OAAO;IAET,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM;KAC/C,IAAI,OAAO,MAAM,aAAa,cAAc,MAAM,aAAa,OAAO,UAAU,UAC9E,OAAO,MAAM,SAAS;KAExB,OAAO,QA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Q,aAAa,aAC9B,QAAQ,WAAW;CAErB,MAAM,MAAM,QAAQ,KAAK,OAAO;CAChC,MAAM,OAAO,OAAO,UAAU,SAAS,KAAK,GAAG;CAC/C,IAAI,QAAQ,YAAY,IAAI,UAAU,QAAQ,UAC5C,IAAI,SAAS,qBAAqB;EAChC,MAAM,KAAK;EACX,OAAO,CAAC,GAAG,OAAO,eAAe,cAAc,GAAG,KAAK;CACzD,OAAO,IAAI,SAAS,kBAClB,OAAO,WAAW,IAAI,OAAO;MACxB,IAAI,SAAS,mBAAmB;EACrC,MAAM,OAAO,OAAO,KAAK,GAAG;EAE5B,OAAO,aADM,KAAK,SAAS,IAAI,GAAG,KAAK,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,SAAS,KAAK,KAAK,IAAI,EAC7D;CAC3B,OACE,OAAO;CAGX,OAAO;AACT;AAEA,SAAS,wBAAyB,GAAG;CACpC,OAAO,KAAK,EAAE,cAAc,OAAO,UAAU,eAAe,KAAK,GAAG,SAAS,IAAI,EAAE,aAAa;AACjG"}
|
package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/helpers.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@3.0.9/node_modules/@vitest/utils/dist/helpers.js
|
|
2
|
+
function assertTypes(value, name, types) {
|
|
3
|
+
const receivedType = typeof value;
|
|
4
|
+
if (!types.includes(receivedType)) throw new TypeError(`${name} value must be ${types.join(" or ")}, received "${receivedType}"`);
|
|
5
|
+
}
|
|
6
|
+
function toArray(array) {
|
|
7
|
+
if (array === null || array === void 0) array = [];
|
|
8
|
+
if (Array.isArray(array)) return array;
|
|
9
|
+
return [array];
|
|
10
|
+
}
|
|
11
|
+
function isObject(item) {
|
|
12
|
+
return item != null && typeof item === "object" && !Array.isArray(item);
|
|
13
|
+
}
|
|
14
|
+
function objectAttr(source, path, defaultValue = void 0) {
|
|
15
|
+
const paths = path.replace(/\[(\d+)\]/g, ".$1").split(".");
|
|
16
|
+
let result = source;
|
|
17
|
+
for (const p of paths) {
|
|
18
|
+
result = new Object(result)[p];
|
|
19
|
+
if (result === void 0) return defaultValue;
|
|
20
|
+
}
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
function createDefer() {
|
|
24
|
+
let resolve = null;
|
|
25
|
+
let reject = null;
|
|
26
|
+
const p = new Promise((_resolve, _reject) => {
|
|
27
|
+
resolve = _resolve;
|
|
28
|
+
reject = _reject;
|
|
29
|
+
});
|
|
30
|
+
p.resolve = resolve;
|
|
31
|
+
p.reject = reject;
|
|
32
|
+
return p;
|
|
33
|
+
}
|
|
34
|
+
function isNegativeNaN(val) {
|
|
35
|
+
if (!Number.isNaN(val)) return false;
|
|
36
|
+
const f64 = /* @__PURE__ */ new Float64Array(1);
|
|
37
|
+
f64[0] = val;
|
|
38
|
+
return new Uint32Array(f64.buffer)[1] >>> 31 === 1;
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { assertTypes, createDefer, isNegativeNaN, isObject, objectAttr, toArray };
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=helpers.js.map
|
package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/helpers.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@vitest+utils@3.0.9/node_modules/@vitest/utils/dist/helpers.js"],"sourcesContent":["function createSimpleStackTrace(options) {\n const { message = \"$$stack trace error\", stackTraceLimit = 1 } = options || {};\n const limit = Error.stackTraceLimit;\n const prepareStackTrace = Error.prepareStackTrace;\n Error.stackTraceLimit = stackTraceLimit;\n Error.prepareStackTrace = (e) => e.stack;\n const err = new Error(message);\n const stackTrace = err.stack || \"\";\n Error.prepareStackTrace = prepareStackTrace;\n Error.stackTraceLimit = limit;\n return stackTrace;\n}\nfunction notNullish(v) {\n return v != null;\n}\nfunction assertTypes(value, name, types) {\n const receivedType = typeof value;\n const pass = types.includes(receivedType);\n if (!pass) {\n throw new TypeError(\n `${name} value must be ${types.join(\" or \")}, received \"${receivedType}\"`\n );\n }\n}\nfunction isPrimitive(value) {\n return value === null || typeof value !== \"function\" && typeof value !== \"object\";\n}\nfunction slash(path) {\n return path.replace(/\\\\/g, \"/\");\n}\nfunction parseRegexp(input) {\n const m = input.match(/(\\/?)(.+)\\1([a-z]*)/i);\n if (!m) {\n return /$^/;\n }\n if (m[3] && !/^(?!.*?(.).*?\\1)[gmixXsuUAJ]+$/.test(m[3])) {\n return new RegExp(input);\n }\n return new RegExp(m[2], m[3]);\n}\nfunction toArray(array) {\n if (array === null || array === void 0) {\n array = [];\n }\n if (Array.isArray(array)) {\n return array;\n }\n return [array];\n}\nfunction isObject(item) {\n return item != null && typeof item === \"object\" && !Array.isArray(item);\n}\nfunction isFinalObj(obj) {\n return obj === Object.prototype || obj === Function.prototype || obj === RegExp.prototype;\n}\nfunction getType(value) {\n return Object.prototype.toString.apply(value).slice(8, -1);\n}\nfunction collectOwnProperties(obj, collector) {\n const collect = typeof collector === \"function\" ? collector : (key) => collector.add(key);\n Object.getOwnPropertyNames(obj).forEach(collect);\n Object.getOwnPropertySymbols(obj).forEach(collect);\n}\nfunction getOwnProperties(obj) {\n const ownProps = /* @__PURE__ */ new Set();\n if (isFinalObj(obj)) {\n return [];\n }\n collectOwnProperties(obj, ownProps);\n return Array.from(ownProps);\n}\nconst defaultCloneOptions = { forceWritable: false };\nfunction deepClone(val, options = defaultCloneOptions) {\n const seen = /* @__PURE__ */ new WeakMap();\n return clone(val, seen, options);\n}\nfunction clone(val, seen, options = defaultCloneOptions) {\n let k, out;\n if (seen.has(val)) {\n return seen.get(val);\n }\n if (Array.isArray(val)) {\n out = Array.from({ length: k = val.length });\n seen.set(val, out);\n while (k--) {\n out[k] = clone(val[k], seen, options);\n }\n return out;\n }\n if (Object.prototype.toString.call(val) === \"[object Object]\") {\n out = Object.create(Object.getPrototypeOf(val));\n seen.set(val, out);\n const props = getOwnProperties(val);\n for (const k2 of props) {\n const descriptor = Object.getOwnPropertyDescriptor(val, k2);\n if (!descriptor) {\n continue;\n }\n const cloned = clone(val[k2], seen, options);\n if (options.forceWritable) {\n Object.defineProperty(out, k2, {\n enumerable: descriptor.enumerable,\n configurable: true,\n writable: true,\n value: cloned\n });\n } else if (\"get\" in descriptor) {\n Object.defineProperty(out, k2, {\n ...descriptor,\n get() {\n return cloned;\n }\n });\n } else {\n Object.defineProperty(out, k2, {\n ...descriptor,\n value: cloned\n });\n }\n }\n return out;\n }\n return val;\n}\nfunction noop() {\n}\nfunction objectAttr(source, path, defaultValue = void 0) {\n const paths = path.replace(/\\[(\\d+)\\]/g, \".$1\").split(\".\");\n let result = source;\n for (const p of paths) {\n result = new Object(result)[p];\n if (result === void 0) {\n return defaultValue;\n }\n }\n return result;\n}\nfunction createDefer() {\n let resolve = null;\n let reject = null;\n const p = new Promise((_resolve, _reject) => {\n resolve = _resolve;\n reject = _reject;\n });\n p.resolve = resolve;\n p.reject = reject;\n return p;\n}\nfunction getCallLastIndex(code) {\n let charIndex = -1;\n let inString = null;\n let startedBracers = 0;\n let endedBracers = 0;\n let beforeChar = null;\n while (charIndex <= code.length) {\n beforeChar = code[charIndex];\n charIndex++;\n const char = code[charIndex];\n const isCharString = char === '\"' || char === \"'\" || char === \"`\";\n if (isCharString && beforeChar !== \"\\\\\") {\n if (inString === char) {\n inString = null;\n } else if (!inString) {\n inString = char;\n }\n }\n if (!inString) {\n if (char === \"(\") {\n startedBracers++;\n }\n if (char === \")\") {\n endedBracers++;\n }\n }\n if (startedBracers && endedBracers && startedBracers === endedBracers) {\n return charIndex;\n }\n }\n return null;\n}\nfunction isNegativeNaN(val) {\n if (!Number.isNaN(val)) {\n return false;\n }\n const f64 = new Float64Array(1);\n f64[0] = val;\n const u32 = new Uint32Array(f64.buffer);\n const isNegative = u32[1] >>> 31 === 1;\n return isNegative;\n}\nfunction toString(v) {\n return Object.prototype.toString.call(v);\n}\nfunction isPlainObject(val) {\n return toString(val) === \"[object Object]\" && (!val.constructor || val.constructor.name === \"Object\");\n}\nfunction isMergeableObject(item) {\n return isPlainObject(item) && !Array.isArray(item);\n}\nfunction deepMerge(target, ...sources) {\n if (!sources.length) {\n return target;\n }\n const source = sources.shift();\n if (source === void 0) {\n return target;\n }\n if (isMergeableObject(target) && isMergeableObject(source)) {\n Object.keys(source).forEach((key) => {\n const _source = source;\n if (isMergeableObject(_source[key])) {\n if (!target[key]) {\n target[key] = {};\n }\n deepMerge(target[key], _source[key]);\n } else {\n target[key] = _source[key];\n }\n });\n }\n return deepMerge(target, ...sources);\n}\n\nexport { assertTypes, clone, createDefer, createSimpleStackTrace, deepClone, deepMerge, getCallLastIndex, getOwnProperties, getType, isNegativeNaN, isObject, isPrimitive, noop, notNullish, objectAttr, parseRegexp, slash, toArray };\n"],"x_google_ignoreList":[0],"mappings":";AAeA,SAAS,YAAY,OAAO,MAAM,OAAO;CACvC,MAAM,eAAe,OAAO;CAE5B,IAAI,CADS,MAAM,SAAS,YACpB,GACN,MAAM,IAAI,UACR,GAAG,KAAK,iBAAiB,MAAM,KAAK,MAAM,EAAE,cAAc,aAAa,EACzE;AAEJ;AAiBA,SAAS,QAAQ,OAAO;CACtB,IAAI,UAAU,QAAQ,UAAU,KAAK,GACnC,QAAQ,CAAC;CAEX,IAAI,MAAM,QAAQ,KAAK,GACrB,OAAO;CAET,OAAO,CAAC,KAAK;AACf;AACA,SAAS,SAAS,MAAM;CACtB,OAAO,QAAQ,QAAQ,OAAO,SAAS,YAAY,CAAC,MAAM,QAAQ,IAAI;AACxE;AA2EA,SAAS,WAAW,QAAQ,MAAM,eAAe,KAAK,GAAG;CACvD,MAAM,QAAQ,KAAK,QAAQ,cAAc,KAAK,CAAC,CAAC,MAAM,GAAG;CACzD,IAAI,SAAS;CACb,KAAK,MAAM,KAAK,OAAO;EACrB,SAAS,IAAI,OAAO,MAAM,CAAC,CAAC;EAC5B,IAAI,WAAW,KAAK,GAClB,OAAO;CAEX;CACA,OAAO;AACT;AACA,SAAS,cAAc;CACrB,IAAI,UAAU;CACd,IAAI,SAAS;CACb,MAAM,IAAI,IAAI,SAAS,UAAU,YAAY;EAC3C,UAAU;EACV,SAAS;CACX,CAAC;CACD,EAAE,UAAU;CACZ,EAAE,SAAS;CACX,OAAO;AACT;AAiCA,SAAS,cAAc,KAAK;CAC1B,IAAI,CAAC,OAAO,MAAM,GAAG,GACnB,OAAO;CAET,MAAM,sBAAM,IAAI,aAAa,CAAC;CAC9B,IAAI,KAAK;CAGT,OADmB,IADH,YAAY,IAAI,MACX,CAAC,CAAC,OAAO,OAAO;AAEvC"}
|