mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-24 05:26:29 +00:00
chore: update frontend build for v1.1.82 [skip ci]
This commit is contained in:
21
web/admin-spa/node_modules/quansync/LICENSE.md
generated
vendored
21
web/admin-spa/node_modules/quansync/LICENSE.md
generated
vendored
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025-PRESENT Anthony Fu <https://github.com/antfu> and Kevin Deng <https://github.com/sxzz>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
144
web/admin-spa/node_modules/quansync/README.md
generated
vendored
144
web/admin-spa/node_modules/quansync/README.md
generated
vendored
@@ -1,144 +0,0 @@
|
||||
# quansync
|
||||
|
||||
[![npm version][npm-version-src]][npm-version-href]
|
||||
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
||||
[![bundle][bundle-src]][bundle-href]
|
||||
[![JSDocs][jsdocs-src]][jsdocs-href]
|
||||
[![License][license-src]][license-href]
|
||||
|
||||
Create sync/async APIs with usable logic.
|
||||
|
||||
**Quan**tum + **Sync** - "_Superposition_" between `sync` and `async`.
|
||||
|
||||
- Typesafe
|
||||
- ESM, modern JavaScript
|
||||
- Zero dependencies
|
||||
|
||||
Heavily inspired by [`genasync`](https://github.com/loganfsmyth/gensync) by [@loganfsmyth](https://github.com/loganfsmyth).
|
||||
|
||||
## Why & How
|
||||
|
||||
Please refer to Anthony's blog post: [**Async, Sync, in Between**](https://antfu.me/posts/async-sync-in-between).
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
pnpm i quansync
|
||||
```
|
||||
|
||||
```ts
|
||||
import fs from 'node:fs'
|
||||
import { quansync } from 'quansync'
|
||||
|
||||
// Create a quansync function by providing `sync` and `async` implementations
|
||||
const readFile = quansync({
|
||||
sync: (path: string) => fs.readFileSync(path),
|
||||
async: (path: string) => fs.promises.readFile(path),
|
||||
})
|
||||
|
||||
// Create a quansync function by providing a generator function
|
||||
const myFunction = quansync(function* (filename) {
|
||||
// Use `yield*` to call another quansync function
|
||||
const code = yield* readFile(filename, 'utf8')
|
||||
|
||||
return `// some custom prefix\n${code}`
|
||||
})
|
||||
|
||||
// Use it as a sync function
|
||||
const result = myFunction.sync('./some-file.js')
|
||||
|
||||
// Use it as an async function
|
||||
const asyncResult = await myFunction.async('./some-file.js')
|
||||
```
|
||||
|
||||
### `getIsAsync`
|
||||
|
||||
Returns a boolean indicating whether the current execution is in async mode.
|
||||
|
||||
```ts
|
||||
import { getIsAsync, quansync } from 'quansync'
|
||||
|
||||
const fn = quansync(function* () {
|
||||
const isAsync: boolean = yield* getIsAsync()
|
||||
console.log(isAsync)
|
||||
})
|
||||
|
||||
fn.sync() // false
|
||||
await fn() // true
|
||||
await fn.async() // true
|
||||
```
|
||||
|
||||
## Build-time Macro
|
||||
|
||||
If you don't like the `function*` and `yield*` syntax, we also provide a build-time macro via [unplugin-quansync](https://github.com/unplugin/unplugin-quansync#usage) allowing you use quansync with async/await syntax, while still able to get the sync version out of that.
|
||||
|
||||
Here is an example:
|
||||
|
||||
```ts
|
||||
import fs from 'node:fs'
|
||||
import { quansync } from 'quansync/macro'
|
||||
|
||||
// Create a quansync function by providing `sync` and `async` implementations
|
||||
const readFile = quansync({
|
||||
sync: (path: string) => fs.readFileSync(path),
|
||||
async: (path: string) => fs.promises.readFile(path),
|
||||
})
|
||||
|
||||
// Create a quansync function by providing an **async** function
|
||||
const myFunction = quansync(async (filename) => {
|
||||
// Use `await` to call another quansync function
|
||||
const code = await readFile(filename, 'utf8')
|
||||
|
||||
return `// some custom prefix\n${code}`
|
||||
})
|
||||
|
||||
// Use it as a sync function
|
||||
const result = myFunction.sync('./some-file.js')
|
||||
|
||||
// Use it as an async function
|
||||
const asyncResult = await myFunction.async('./some-file.js')
|
||||
```
|
||||
|
||||
For more details on usage, refer to [unplugin-quansync's docs](https://github.com/unplugin/unplugin-quansync#usage).
|
||||
|
||||
## Benchmark
|
||||
|
||||
Run the following command to benchmark the performance of `quansync`:
|
||||
|
||||
```bash
|
||||
pnpm run build && pnpm run benchmark
|
||||
```
|
||||
|
||||
Benchmark results indicate that each `yield` incurs an overhead of
|
||||
approximately 150 ns, comparable to that of `await sync()`. (On Apple M1 Max)
|
||||
|
||||
## Sponsors
|
||||
|
||||
<p align="center">
|
||||
<a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg">
|
||||
<img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://cdn.jsdelivr.net/gh/sxzz/sponsors/sponsors.svg">
|
||||
<img src='https://cdn.jsdelivr.net/gh/sxzz/sponsors/sponsors.svg'/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
## License
|
||||
|
||||
[MIT](./LICENSE) License © [Anthony Fu](https://github.com/antfu) and [Kevin Deng](https://github.com/sxzz)
|
||||
|
||||
<!-- Badges -->
|
||||
|
||||
[npm-version-src]: https://img.shields.io/npm/v/quansync?style=flat&colorA=080f12&colorB=1fa669
|
||||
[npm-version-href]: https://npmjs.com/package/quansync
|
||||
[npm-downloads-src]: https://img.shields.io/npm/dm/quansync?style=flat&colorA=080f12&colorB=1fa669
|
||||
[npm-downloads-href]: https://npmjs.com/package/quansync
|
||||
[bundle-src]: https://img.shields.io/bundlephobia/minzip/quansync?style=flat&colorA=080f12&colorB=1fa669&label=minzip
|
||||
[bundle-href]: https://bundlephobia.com/result?p=quansync
|
||||
[license-src]: https://img.shields.io/github/license/antfu/quansync.svg?style=flat&colorA=080f12&colorB=1fa669
|
||||
[license-href]: https://github.com/antfu/quansync/blob/main/LICENSE
|
||||
[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1fa669
|
||||
[jsdocs-href]: https://www.jsdocs.io/package/quansync
|
||||
108
web/admin-spa/node_modules/quansync/dist/index.cjs
generated
vendored
108
web/admin-spa/node_modules/quansync/dist/index.cjs
generated
vendored
@@ -1,108 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const GET_IS_ASYNC = Symbol.for("quansync.getIsAsync");
|
||||
class QuansyncError extends Error {
|
||||
constructor(message = "Unexpected promise in sync context") {
|
||||
super(message);
|
||||
this.name = "QuansyncError";
|
||||
}
|
||||
}
|
||||
function isThenable(value) {
|
||||
return value && typeof value === "object" && typeof value.then === "function";
|
||||
}
|
||||
function isQuansyncGenerator(value) {
|
||||
return value && typeof value === "object" && typeof value[Symbol.iterator] === "function" && "__quansync" in value;
|
||||
}
|
||||
function fromObject(options) {
|
||||
const generator = function* (...args) {
|
||||
const isAsync = yield GET_IS_ASYNC;
|
||||
if (isAsync)
|
||||
return yield options.async.apply(this, args);
|
||||
return options.sync.apply(this, args);
|
||||
};
|
||||
function fn(...args) {
|
||||
const iter = generator.apply(this, args);
|
||||
iter.then = (...thenArgs) => options.async.apply(this, args).then(...thenArgs);
|
||||
iter.__quansync = true;
|
||||
return iter;
|
||||
}
|
||||
fn.sync = options.sync;
|
||||
fn.async = options.async;
|
||||
return fn;
|
||||
}
|
||||
function fromPromise(promise) {
|
||||
return fromObject({
|
||||
async: () => Promise.resolve(promise),
|
||||
sync: () => {
|
||||
if (isThenable(promise))
|
||||
throw new QuansyncError();
|
||||
return promise;
|
||||
}
|
||||
});
|
||||
}
|
||||
function unwrapYield(value, isAsync) {
|
||||
if (value === GET_IS_ASYNC)
|
||||
return isAsync;
|
||||
if (isQuansyncGenerator(value))
|
||||
return isAsync ? iterateAsync(value) : iterateSync(value);
|
||||
if (!isAsync && isThenable(value))
|
||||
throw new QuansyncError();
|
||||
return value;
|
||||
}
|
||||
const DEFAULT_ON_YIELD = (value) => value;
|
||||
function iterateSync(generator, onYield = DEFAULT_ON_YIELD) {
|
||||
let current = generator.next();
|
||||
while (!current.done) {
|
||||
try {
|
||||
current = generator.next(unwrapYield(onYield(current.value, false)));
|
||||
} catch (err) {
|
||||
current = generator.throw(err);
|
||||
}
|
||||
}
|
||||
return unwrapYield(current.value);
|
||||
}
|
||||
async function iterateAsync(generator, onYield = DEFAULT_ON_YIELD) {
|
||||
let current = generator.next();
|
||||
while (!current.done) {
|
||||
try {
|
||||
current = generator.next(await unwrapYield(onYield(current.value, true), true));
|
||||
} catch (err) {
|
||||
current = generator.throw(err);
|
||||
}
|
||||
}
|
||||
return current.value;
|
||||
}
|
||||
function fromGeneratorFn(generatorFn, options) {
|
||||
return fromObject({
|
||||
name: generatorFn.name,
|
||||
async(...args) {
|
||||
return iterateAsync(generatorFn.apply(this, args), options?.onYield);
|
||||
},
|
||||
sync(...args) {
|
||||
return iterateSync(generatorFn.apply(this, args), options?.onYield);
|
||||
}
|
||||
});
|
||||
}
|
||||
function quansync(input, options) {
|
||||
if (isThenable(input))
|
||||
return fromPromise(input);
|
||||
if (typeof input === "function")
|
||||
return fromGeneratorFn(input, options);
|
||||
else
|
||||
return fromObject(input);
|
||||
}
|
||||
function toGenerator(promise) {
|
||||
if (isQuansyncGenerator(promise))
|
||||
return promise;
|
||||
return fromPromise(promise)();
|
||||
}
|
||||
const getIsAsync = quansync({
|
||||
async: () => Promise.resolve(true),
|
||||
sync: () => false
|
||||
});
|
||||
|
||||
exports.GET_IS_ASYNC = GET_IS_ASYNC;
|
||||
exports.QuansyncError = QuansyncError;
|
||||
exports.getIsAsync = getIsAsync;
|
||||
exports.quansync = quansync;
|
||||
exports.toGenerator = toGenerator;
|
||||
33
web/admin-spa/node_modules/quansync/dist/index.d.cts
generated
vendored
33
web/admin-spa/node_modules/quansync/dist/index.d.cts
generated
vendored
@@ -1,33 +0,0 @@
|
||||
import type { QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions } from './types.cjs';
|
||||
export { QuansyncAwaitableGenerator, QuansyncInput } from './types.cjs';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
declare const GET_IS_ASYNC: unique symbol;
|
||||
declare class QuansyncError extends Error {
|
||||
constructor(message?: string);
|
||||
}
|
||||
/**
|
||||
* Creates a new Quansync function, a "superposition" between async and sync.
|
||||
*/
|
||||
declare function quansync<Return, Args extends any[] = []>(input: QuansyncInputObject<Return, Args>): QuansyncFn<Return, Args>;
|
||||
declare function quansync<Return, Args extends any[] = []>(input: QuansyncGeneratorFn<Return, Args> | Promise<Return>, options?: QuansyncOptions): QuansyncFn<Return, Args>;
|
||||
/**
|
||||
* Converts a promise to a Quansync generator.
|
||||
*/
|
||||
declare function toGenerator<T>(promise: Promise<T> | QuansyncGenerator<T> | T): QuansyncGenerator<T>;
|
||||
/**
|
||||
* @returns `true` if the current context is async, `false` otherwise.
|
||||
*/
|
||||
declare const getIsAsync: QuansyncFn<boolean, []>;
|
||||
|
||||
export { GET_IS_ASYNC, QuansyncError, getIsAsync, quansync, toGenerator };
|
||||
export type { QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions };
|
||||
33
web/admin-spa/node_modules/quansync/dist/index.d.mts
generated
vendored
33
web/admin-spa/node_modules/quansync/dist/index.d.mts
generated
vendored
@@ -1,33 +0,0 @@
|
||||
import type { QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions } from './types.mjs';
|
||||
export { QuansyncAwaitableGenerator, QuansyncInput } from './types.mjs';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
declare const GET_IS_ASYNC: unique symbol;
|
||||
declare class QuansyncError extends Error {
|
||||
constructor(message?: string);
|
||||
}
|
||||
/**
|
||||
* Creates a new Quansync function, a "superposition" between async and sync.
|
||||
*/
|
||||
declare function quansync<Return, Args extends any[] = []>(input: QuansyncInputObject<Return, Args>): QuansyncFn<Return, Args>;
|
||||
declare function quansync<Return, Args extends any[] = []>(input: QuansyncGeneratorFn<Return, Args> | Promise<Return>, options?: QuansyncOptions): QuansyncFn<Return, Args>;
|
||||
/**
|
||||
* Converts a promise to a Quansync generator.
|
||||
*/
|
||||
declare function toGenerator<T>(promise: Promise<T> | QuansyncGenerator<T> | T): QuansyncGenerator<T>;
|
||||
/**
|
||||
* @returns `true` if the current context is async, `false` otherwise.
|
||||
*/
|
||||
declare const getIsAsync: QuansyncFn<boolean, []>;
|
||||
|
||||
export { GET_IS_ASYNC, QuansyncError, getIsAsync, quansync, toGenerator };
|
||||
export type { QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions };
|
||||
33
web/admin-spa/node_modules/quansync/dist/index.d.ts
generated
vendored
33
web/admin-spa/node_modules/quansync/dist/index.d.ts
generated
vendored
@@ -1,33 +0,0 @@
|
||||
import type { QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions } from './types.js';
|
||||
export { QuansyncAwaitableGenerator, QuansyncInput } from './types.js';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
declare const GET_IS_ASYNC: unique symbol;
|
||||
declare class QuansyncError extends Error {
|
||||
constructor(message?: string);
|
||||
}
|
||||
/**
|
||||
* Creates a new Quansync function, a "superposition" between async and sync.
|
||||
*/
|
||||
declare function quansync<Return, Args extends any[] = []>(input: QuansyncInputObject<Return, Args>): QuansyncFn<Return, Args>;
|
||||
declare function quansync<Return, Args extends any[] = []>(input: QuansyncGeneratorFn<Return, Args> | Promise<Return>, options?: QuansyncOptions): QuansyncFn<Return, Args>;
|
||||
/**
|
||||
* Converts a promise to a Quansync generator.
|
||||
*/
|
||||
declare function toGenerator<T>(promise: Promise<T> | QuansyncGenerator<T> | T): QuansyncGenerator<T>;
|
||||
/**
|
||||
* @returns `true` if the current context is async, `false` otherwise.
|
||||
*/
|
||||
declare const getIsAsync: QuansyncFn<boolean, []>;
|
||||
|
||||
export { GET_IS_ASYNC, QuansyncError, getIsAsync, quansync, toGenerator };
|
||||
export type { QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions };
|
||||
102
web/admin-spa/node_modules/quansync/dist/index.mjs
generated
vendored
102
web/admin-spa/node_modules/quansync/dist/index.mjs
generated
vendored
@@ -1,102 +0,0 @@
|
||||
const GET_IS_ASYNC = Symbol.for("quansync.getIsAsync");
|
||||
class QuansyncError extends Error {
|
||||
constructor(message = "Unexpected promise in sync context") {
|
||||
super(message);
|
||||
this.name = "QuansyncError";
|
||||
}
|
||||
}
|
||||
function isThenable(value) {
|
||||
return value && typeof value === "object" && typeof value.then === "function";
|
||||
}
|
||||
function isQuansyncGenerator(value) {
|
||||
return value && typeof value === "object" && typeof value[Symbol.iterator] === "function" && "__quansync" in value;
|
||||
}
|
||||
function fromObject(options) {
|
||||
const generator = function* (...args) {
|
||||
const isAsync = yield GET_IS_ASYNC;
|
||||
if (isAsync)
|
||||
return yield options.async.apply(this, args);
|
||||
return options.sync.apply(this, args);
|
||||
};
|
||||
function fn(...args) {
|
||||
const iter = generator.apply(this, args);
|
||||
iter.then = (...thenArgs) => options.async.apply(this, args).then(...thenArgs);
|
||||
iter.__quansync = true;
|
||||
return iter;
|
||||
}
|
||||
fn.sync = options.sync;
|
||||
fn.async = options.async;
|
||||
return fn;
|
||||
}
|
||||
function fromPromise(promise) {
|
||||
return fromObject({
|
||||
async: () => Promise.resolve(promise),
|
||||
sync: () => {
|
||||
if (isThenable(promise))
|
||||
throw new QuansyncError();
|
||||
return promise;
|
||||
}
|
||||
});
|
||||
}
|
||||
function unwrapYield(value, isAsync) {
|
||||
if (value === GET_IS_ASYNC)
|
||||
return isAsync;
|
||||
if (isQuansyncGenerator(value))
|
||||
return isAsync ? iterateAsync(value) : iterateSync(value);
|
||||
if (!isAsync && isThenable(value))
|
||||
throw new QuansyncError();
|
||||
return value;
|
||||
}
|
||||
const DEFAULT_ON_YIELD = (value) => value;
|
||||
function iterateSync(generator, onYield = DEFAULT_ON_YIELD) {
|
||||
let current = generator.next();
|
||||
while (!current.done) {
|
||||
try {
|
||||
current = generator.next(unwrapYield(onYield(current.value, false)));
|
||||
} catch (err) {
|
||||
current = generator.throw(err);
|
||||
}
|
||||
}
|
||||
return unwrapYield(current.value);
|
||||
}
|
||||
async function iterateAsync(generator, onYield = DEFAULT_ON_YIELD) {
|
||||
let current = generator.next();
|
||||
while (!current.done) {
|
||||
try {
|
||||
current = generator.next(await unwrapYield(onYield(current.value, true), true));
|
||||
} catch (err) {
|
||||
current = generator.throw(err);
|
||||
}
|
||||
}
|
||||
return current.value;
|
||||
}
|
||||
function fromGeneratorFn(generatorFn, options) {
|
||||
return fromObject({
|
||||
name: generatorFn.name,
|
||||
async(...args) {
|
||||
return iterateAsync(generatorFn.apply(this, args), options?.onYield);
|
||||
},
|
||||
sync(...args) {
|
||||
return iterateSync(generatorFn.apply(this, args), options?.onYield);
|
||||
}
|
||||
});
|
||||
}
|
||||
function quansync(input, options) {
|
||||
if (isThenable(input))
|
||||
return fromPromise(input);
|
||||
if (typeof input === "function")
|
||||
return fromGeneratorFn(input, options);
|
||||
else
|
||||
return fromObject(input);
|
||||
}
|
||||
function toGenerator(promise) {
|
||||
if (isQuansyncGenerator(promise))
|
||||
return promise;
|
||||
return fromPromise(promise)();
|
||||
}
|
||||
const getIsAsync = quansync({
|
||||
async: () => Promise.resolve(true),
|
||||
sync: () => false
|
||||
});
|
||||
|
||||
export { GET_IS_ASYNC, QuansyncError, getIsAsync, quansync, toGenerator };
|
||||
7
web/admin-spa/node_modules/quansync/dist/macro.cjs
generated
vendored
7
web/admin-spa/node_modules/quansync/dist/macro.cjs
generated
vendored
@@ -1,7 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const index = require('./index.cjs');
|
||||
|
||||
const quansync = index.quansync;
|
||||
|
||||
exports.quansync = quansync;
|
||||
27
web/admin-spa/node_modules/quansync/dist/macro.d.cts
generated
vendored
27
web/admin-spa/node_modules/quansync/dist/macro.d.cts
generated
vendored
@@ -1,27 +0,0 @@
|
||||
import type { QuansyncFn, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions } from './types.cjs';
|
||||
export { QuansyncAwaitableGenerator, QuansyncGenerator, QuansyncInput } from './types.cjs';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This function is equivalent to `quansync` from main entry
|
||||
* but accepts a fake argument type of async functions.
|
||||
*
|
||||
* This requires to be used with the macro transformer `unplugin-quansync`.
|
||||
* Do NOT use it directly.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
declare const quansync: {
|
||||
<Return, Args extends any[] = []>(input: QuansyncInputObject<Return, Args>): QuansyncFn<Return, Args>;
|
||||
<Return, Args extends any[] = []>(input: QuansyncGeneratorFn<Return, Args> | Promise<Return> | ((...args: Args) => Promise<Return> | Return), options?: QuansyncOptions): QuansyncFn<Return, Args>;
|
||||
};
|
||||
|
||||
export { quansync };
|
||||
export type { QuansyncFn, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions };
|
||||
27
web/admin-spa/node_modules/quansync/dist/macro.d.mts
generated
vendored
27
web/admin-spa/node_modules/quansync/dist/macro.d.mts
generated
vendored
@@ -1,27 +0,0 @@
|
||||
import type { QuansyncFn, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions } from './types.mjs';
|
||||
export { QuansyncAwaitableGenerator, QuansyncGenerator, QuansyncInput } from './types.mjs';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This function is equivalent to `quansync` from main entry
|
||||
* but accepts a fake argument type of async functions.
|
||||
*
|
||||
* This requires to be used with the macro transformer `unplugin-quansync`.
|
||||
* Do NOT use it directly.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
declare const quansync: {
|
||||
<Return, Args extends any[] = []>(input: QuansyncInputObject<Return, Args>): QuansyncFn<Return, Args>;
|
||||
<Return, Args extends any[] = []>(input: QuansyncGeneratorFn<Return, Args> | Promise<Return> | ((...args: Args) => Promise<Return> | Return), options?: QuansyncOptions): QuansyncFn<Return, Args>;
|
||||
};
|
||||
|
||||
export { quansync };
|
||||
export type { QuansyncFn, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions };
|
||||
27
web/admin-spa/node_modules/quansync/dist/macro.d.ts
generated
vendored
27
web/admin-spa/node_modules/quansync/dist/macro.d.ts
generated
vendored
@@ -1,27 +0,0 @@
|
||||
import type { QuansyncFn, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions } from './types.js';
|
||||
export { QuansyncAwaitableGenerator, QuansyncGenerator, QuansyncInput } from './types.js';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This function is equivalent to `quansync` from main entry
|
||||
* but accepts a fake argument type of async functions.
|
||||
*
|
||||
* This requires to be used with the macro transformer `unplugin-quansync`.
|
||||
* Do NOT use it directly.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
declare const quansync: {
|
||||
<Return, Args extends any[] = []>(input: QuansyncInputObject<Return, Args>): QuansyncFn<Return, Args>;
|
||||
<Return, Args extends any[] = []>(input: QuansyncGeneratorFn<Return, Args> | Promise<Return> | ((...args: Args) => Promise<Return> | Return), options?: QuansyncOptions): QuansyncFn<Return, Args>;
|
||||
};
|
||||
|
||||
export { quansync };
|
||||
export type { QuansyncFn, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions };
|
||||
5
web/admin-spa/node_modules/quansync/dist/macro.mjs
generated
vendored
5
web/admin-spa/node_modules/quansync/dist/macro.mjs
generated
vendored
@@ -1,5 +0,0 @@
|
||||
import { quansync as quansync$1 } from './index.mjs';
|
||||
|
||||
const quansync = quansync$1;
|
||||
|
||||
export { quansync };
|
||||
2
web/admin-spa/node_modules/quansync/dist/types.cjs
generated
vendored
2
web/admin-spa/node_modules/quansync/dist/types.cjs
generated
vendored
@@ -1,2 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
23
web/admin-spa/node_modules/quansync/dist/types.d.cts
generated
vendored
23
web/admin-spa/node_modules/quansync/dist/types.d.cts
generated
vendored
@@ -1,23 +0,0 @@
|
||||
interface QuansyncOptions {
|
||||
onYield?: (value: any, isAsync: boolean) => any;
|
||||
}
|
||||
interface QuansyncInputObject<Return, Args extends any[]> extends QuansyncOptions {
|
||||
name?: string;
|
||||
sync: (...args: Args) => Return;
|
||||
async: (...args: Args) => Promise<Return>;
|
||||
}
|
||||
type QuansyncGeneratorFn<Return, Args extends any[]> = ((...args: Args) => QuansyncGenerator<Return>);
|
||||
type QuansyncInput<Return, Args extends any[]> = QuansyncInputObject<Return, Args> | QuansyncGeneratorFn<Return, Args>;
|
||||
type QuansyncGenerator<Return = any, Yield = unknown> = Generator<Yield, Return, Awaited<Yield>> & {
|
||||
__quansync?: true;
|
||||
};
|
||||
type QuansyncAwaitableGenerator<Return = any, Yield = unknown> = QuansyncGenerator<Return, Yield> & PromiseLike<Return>;
|
||||
/**
|
||||
* "Superposition" function that can be consumed in both sync and async contexts.
|
||||
*/
|
||||
type QuansyncFn<Return = any, Args extends any[] = []> = ((...args: Args) => QuansyncAwaitableGenerator<Return>) & {
|
||||
sync: (...args: Args) => Return;
|
||||
async: (...args: Args) => Promise<Return>;
|
||||
};
|
||||
|
||||
export type { QuansyncAwaitableGenerator, QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInput, QuansyncInputObject, QuansyncOptions };
|
||||
23
web/admin-spa/node_modules/quansync/dist/types.d.mts
generated
vendored
23
web/admin-spa/node_modules/quansync/dist/types.d.mts
generated
vendored
@@ -1,23 +0,0 @@
|
||||
interface QuansyncOptions {
|
||||
onYield?: (value: any, isAsync: boolean) => any;
|
||||
}
|
||||
interface QuansyncInputObject<Return, Args extends any[]> extends QuansyncOptions {
|
||||
name?: string;
|
||||
sync: (...args: Args) => Return;
|
||||
async: (...args: Args) => Promise<Return>;
|
||||
}
|
||||
type QuansyncGeneratorFn<Return, Args extends any[]> = ((...args: Args) => QuansyncGenerator<Return>);
|
||||
type QuansyncInput<Return, Args extends any[]> = QuansyncInputObject<Return, Args> | QuansyncGeneratorFn<Return, Args>;
|
||||
type QuansyncGenerator<Return = any, Yield = unknown> = Generator<Yield, Return, Awaited<Yield>> & {
|
||||
__quansync?: true;
|
||||
};
|
||||
type QuansyncAwaitableGenerator<Return = any, Yield = unknown> = QuansyncGenerator<Return, Yield> & PromiseLike<Return>;
|
||||
/**
|
||||
* "Superposition" function that can be consumed in both sync and async contexts.
|
||||
*/
|
||||
type QuansyncFn<Return = any, Args extends any[] = []> = ((...args: Args) => QuansyncAwaitableGenerator<Return>) & {
|
||||
sync: (...args: Args) => Return;
|
||||
async: (...args: Args) => Promise<Return>;
|
||||
};
|
||||
|
||||
export type { QuansyncAwaitableGenerator, QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInput, QuansyncInputObject, QuansyncOptions };
|
||||
23
web/admin-spa/node_modules/quansync/dist/types.d.ts
generated
vendored
23
web/admin-spa/node_modules/quansync/dist/types.d.ts
generated
vendored
@@ -1,23 +0,0 @@
|
||||
interface QuansyncOptions {
|
||||
onYield?: (value: any, isAsync: boolean) => any;
|
||||
}
|
||||
interface QuansyncInputObject<Return, Args extends any[]> extends QuansyncOptions {
|
||||
name?: string;
|
||||
sync: (...args: Args) => Return;
|
||||
async: (...args: Args) => Promise<Return>;
|
||||
}
|
||||
type QuansyncGeneratorFn<Return, Args extends any[]> = ((...args: Args) => QuansyncGenerator<Return>);
|
||||
type QuansyncInput<Return, Args extends any[]> = QuansyncInputObject<Return, Args> | QuansyncGeneratorFn<Return, Args>;
|
||||
type QuansyncGenerator<Return = any, Yield = unknown> = Generator<Yield, Return, Awaited<Yield>> & {
|
||||
__quansync?: true;
|
||||
};
|
||||
type QuansyncAwaitableGenerator<Return = any, Yield = unknown> = QuansyncGenerator<Return, Yield> & PromiseLike<Return>;
|
||||
/**
|
||||
* "Superposition" function that can be consumed in both sync and async contexts.
|
||||
*/
|
||||
type QuansyncFn<Return = any, Args extends any[] = []> = ((...args: Args) => QuansyncAwaitableGenerator<Return>) & {
|
||||
sync: (...args: Args) => Return;
|
||||
async: (...args: Args) => Promise<Return>;
|
||||
};
|
||||
|
||||
export type { QuansyncAwaitableGenerator, QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInput, QuansyncInputObject, QuansyncOptions };
|
||||
1
web/admin-spa/node_modules/quansync/dist/types.mjs
generated
vendored
1
web/admin-spa/node_modules/quansync/dist/types.mjs
generated
vendored
@@ -1 +0,0 @@
|
||||
|
||||
95
web/admin-spa/node_modules/quansync/package.json
generated
vendored
95
web/admin-spa/node_modules/quansync/package.json
generated
vendored
@@ -1,95 +0,0 @@
|
||||
{
|
||||
"name": "quansync",
|
||||
"type": "module",
|
||||
"version": "0.2.10",
|
||||
"description": "Create sync/async APIs with usable logic",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "三咲智子 Kevin Deng",
|
||||
"email": "sxzz@sxzz.moe"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/antfu"
|
||||
},
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/sxzz"
|
||||
}
|
||||
],
|
||||
"homepage": "https://github.com/quansync-dev/quansync#readme",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/quansync-dev/quansync.git"
|
||||
},
|
||||
"bugs": "https://github.com/quansync-dev/quansync/issues",
|
||||
"keywords": [
|
||||
"async",
|
||||
"sync",
|
||||
"generator"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.cjs"
|
||||
},
|
||||
"./macro": {
|
||||
"import": "./dist/macro.mjs",
|
||||
"require": "./dist/macro.cjs"
|
||||
},
|
||||
"./types": {
|
||||
"import": "./dist/types.mjs",
|
||||
"require": "./dist/types.cjs"
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.mjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.mts",
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"*": [
|
||||
"./dist/*",
|
||||
"./*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^4.10.1",
|
||||
"@types/node": "^22.13.10",
|
||||
"bumpp": "^10.1.0",
|
||||
"eslint": "^9.22.0",
|
||||
"gensync": "1.0.0-beta.2",
|
||||
"lint-staged": "^15.5.0",
|
||||
"mitata": "^1.0.34",
|
||||
"simple-git-hooks": "^2.11.1",
|
||||
"tsx": "^4.19.3",
|
||||
"typescript": "^5.8.2",
|
||||
"unbuild": "^3.5.0",
|
||||
"vite": "^6.2.2",
|
||||
"vitest": "^3.0.9"
|
||||
},
|
||||
"simple-git-hooks": {
|
||||
"pre-commit": "pnpm lint-staged"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*": "eslint --fix"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "unbuild",
|
||||
"dev": "unbuild --stub",
|
||||
"lint": "eslint .",
|
||||
"release": "bumpp && pnpm publish",
|
||||
"start": "tsx src/index.ts",
|
||||
"benchmark": "node scripts/benchmark.js",
|
||||
"test": "vitest",
|
||||
"typecheck": "tsc --noEmit"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user