Add comprehensive development roadmap via GitHub Issues
Created 10 detailed GitHub issues covering: - Project activation and management UI (#1-2) - Worker node coordination and visualization (#3-4) - Automated GitHub repository scanning (#5) - Intelligent model-to-issue matching (#6) - Multi-model task execution system (#7) - N8N workflow integration (#8) - Hive-Bzzz P2P bridge (#9) - Peer assistance protocol (#10) Each issue includes detailed specifications, acceptance criteria, technical implementation notes, and dependency mapping. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
21
frontend/node_modules/tinyspy/LICENCE
generated
vendored
Normal file
21
frontend/node_modules/tinyspy/LICENCE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Tinylibs
|
||||
|
||||
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.
|
||||
11
frontend/node_modules/tinyspy/README.md
generated
vendored
Normal file
11
frontend/node_modules/tinyspy/README.md
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# tinyspy
|
||||
|
||||
> minimal fork of nanospy, with more features 🕵🏻♂️
|
||||
|
||||
A `10KB` package for minimal and easy testing with no dependencies.
|
||||
This package was created for having a tiny spy library to use in `vitest`, but it can also be used in `jest` and other test environments.
|
||||
|
||||
_In case you need more tiny libraries like tinypool or tinyspy, please consider submitting an [RFC](https://github.com/tinylibs/rfcs)_
|
||||
|
||||
## Docs
|
||||
Read full docs **[here](https://github.com/tinylibs/tinyspy#readme)**.
|
||||
84
frontend/node_modules/tinyspy/dist/index.d.ts
generated
vendored
Normal file
84
frontend/node_modules/tinyspy/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
declare const SYMBOL_STATE: unique symbol;
|
||||
|
||||
interface GetState {
|
||||
<A extends any[], R>(spy: SpyInternalImpl<A, R>): SpyInternalImplState<A, R>;
|
||||
<A extends any[], R>(spy: SpyInternal<A, R>): SpyInternalState<A, R>;
|
||||
}
|
||||
declare let spies: Set<SpyImpl<any[], any>>;
|
||||
declare let getInternalState: GetState;
|
||||
type ReturnError = ['error', any];
|
||||
type ReturnOk<R> = ['ok', R];
|
||||
type ResultFn<R> = ReturnError | ReturnOk<R>;
|
||||
interface SpyInternal<A extends any[] = any[], R = any> {
|
||||
(this: any, ...args: A): R;
|
||||
[SYMBOL_STATE]: SpyInternalState<A, R>;
|
||||
}
|
||||
interface SpyInternalImpl<A extends any[] = any[], R = any> extends SpyInternal<A, R> {
|
||||
[SYMBOL_STATE]: SpyInternalImplState<A, R>;
|
||||
}
|
||||
interface SpyInternalState<A extends any[] = any[], R = any> {
|
||||
called: boolean;
|
||||
callCount: number;
|
||||
calls: A[];
|
||||
results: ResultFn<R>[];
|
||||
resolves: R extends PromiseLike<infer V> ? ResultFn<V>[] : never;
|
||||
reset(): void;
|
||||
impl: ((...args: A) => R) | undefined;
|
||||
next: ResultFn<R>[];
|
||||
}
|
||||
interface SpyInternalImplState<A extends any[] = any[], R = any> extends SpyInternalState<A, R> {
|
||||
getOriginal(): (...args: A) => R;
|
||||
willCall(cb: (...args: A) => R): this;
|
||||
restore(): void;
|
||||
}
|
||||
interface Spy<A extends any[] = any[], R = any> extends SpyInternalState<A, R> {
|
||||
(this: any, ...args: A): R;
|
||||
returns: R[];
|
||||
length: number;
|
||||
nextError(error: any): this;
|
||||
nextResult(result: R): this;
|
||||
}
|
||||
interface SpyImpl<A extends any[] = any[], R = any> extends Spy<A, R> {
|
||||
getOriginal(): (...args: A) => R;
|
||||
willCall(cb: (...args: A) => R): this;
|
||||
restore(): void;
|
||||
}
|
||||
declare function createInternalSpy<A extends any[], R>(cb?: ((...args: A) => R) | {
|
||||
new (...args: A): R;
|
||||
}): SpyInternal<A, R>;
|
||||
|
||||
interface SpyFn<A extends any[] = any[], R = any> extends Spy<A, R> {
|
||||
new (...args: A): R extends void ? any : R;
|
||||
(...args: A): R;
|
||||
}
|
||||
declare function spy<A extends any[], R>(cb?: ((...args: A) => R) | {
|
||||
new (...args: A): R;
|
||||
}): SpyFn<A, R>;
|
||||
|
||||
type Procedure = (...args: any[]) => any;
|
||||
type Methods<T> = {
|
||||
[K in keyof T]: T[K] extends Procedure ? K : never;
|
||||
}[keyof T];
|
||||
type Getters<T> = {
|
||||
[K in keyof T]: T[K] extends Procedure ? never : K;
|
||||
}[keyof T];
|
||||
type Constructors<T> = {
|
||||
[K in keyof T]: T[K] extends new (...args: any[]) => any ? K : never;
|
||||
}[keyof T];
|
||||
declare function internalSpyOn<T, K extends string & keyof T>(obj: T, methodName: K | {
|
||||
getter: K;
|
||||
} | {
|
||||
setter: K;
|
||||
}, mock?: Procedure): SpyInternalImpl<any[], any>;
|
||||
declare function spyOn<T, S extends Getters<Required<T>>>(obj: T, methodName: {
|
||||
setter: S;
|
||||
}, mock?: (arg: T[S]) => void): SpyImpl<[T[S]], void>;
|
||||
declare function spyOn<T, G extends Getters<Required<T>>>(obj: T, methodName: {
|
||||
getter: G;
|
||||
}, mock?: () => T[G]): SpyImpl<[], T[G]>;
|
||||
declare function spyOn<T, M extends Constructors<Required<T>>>(object: T, method: M): Required<T>[M] extends new (...args: infer A) => infer R ? SpyImpl<A, R> : never;
|
||||
declare function spyOn<T, M extends Methods<Required<T>>>(obj: T, methodName: M, mock?: T[M]): Required<T>[M] extends (...args: infer A) => infer R ? SpyImpl<A, R> : never;
|
||||
|
||||
declare function restoreAll(): void;
|
||||
|
||||
export { type Spy, type SpyFn, type SpyImpl, type SpyInternal, type SpyInternalImpl, createInternalSpy, getInternalState, internalSpyOn, restoreAll, spies, spy, spyOn };
|
||||
202
frontend/node_modules/tinyspy/dist/index.js
generated
vendored
Normal file
202
frontend/node_modules/tinyspy/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,202 @@
|
||||
// src/utils.ts
|
||||
function assert(condition, message) {
|
||||
if (!condition)
|
||||
throw new Error(message);
|
||||
}
|
||||
function isType(type, value) {
|
||||
return typeof value === type;
|
||||
}
|
||||
function isPromise(value) {
|
||||
return value instanceof Promise;
|
||||
}
|
||||
function define(obj, key, descriptor) {
|
||||
Object.defineProperty(obj, key, descriptor);
|
||||
}
|
||||
function defineValue(obj, key, value) {
|
||||
define(obj, key, { value, configurable: !0, writable: !0 });
|
||||
}
|
||||
|
||||
// src/constants.ts
|
||||
var SYMBOL_STATE = Symbol.for("tinyspy:spy");
|
||||
|
||||
// src/internal.ts
|
||||
var spies = /* @__PURE__ */ new Set(), reset = (state) => {
|
||||
state.called = !1, state.callCount = 0, state.calls = [], state.results = [], state.resolves = [], state.next = [];
|
||||
}, defineState = (spy2) => (define(spy2, SYMBOL_STATE, {
|
||||
value: { reset: () => reset(spy2[SYMBOL_STATE]) }
|
||||
}), spy2[SYMBOL_STATE]), getInternalState = (spy2) => spy2[SYMBOL_STATE] || defineState(spy2);
|
||||
function createInternalSpy(cb) {
|
||||
assert(
|
||||
isType("function", cb) || isType("undefined", cb),
|
||||
"cannot spy on a non-function value"
|
||||
);
|
||||
let fn = function(...args) {
|
||||
let state2 = getInternalState(fn);
|
||||
state2.called = !0, state2.callCount++, state2.calls.push(args);
|
||||
let next = state2.next.shift();
|
||||
if (next) {
|
||||
state2.results.push(next);
|
||||
let [type2, result2] = next;
|
||||
if (type2 === "ok")
|
||||
return result2;
|
||||
throw result2;
|
||||
}
|
||||
let result, type = "ok", resultIndex = state2.results.length;
|
||||
if (state2.impl)
|
||||
try {
|
||||
new.target ? result = Reflect.construct(state2.impl, args, new.target) : result = state2.impl.apply(this, args), type = "ok";
|
||||
} catch (err) {
|
||||
throw result = err, type = "error", state2.results.push([type, err]), err;
|
||||
}
|
||||
let resultTuple = [type, result];
|
||||
return isPromise(result) && result.then(
|
||||
(r) => state2.resolves[resultIndex] = ["ok", r],
|
||||
(e) => state2.resolves[resultIndex] = ["error", e]
|
||||
), state2.results.push(resultTuple), result;
|
||||
};
|
||||
defineValue(fn, "_isMockFunction", !0), defineValue(fn, "length", cb ? cb.length : 0), defineValue(fn, "name", cb && cb.name || "spy");
|
||||
let state = getInternalState(fn);
|
||||
return state.reset(), state.impl = cb, fn;
|
||||
}
|
||||
function isMockFunction(obj) {
|
||||
return !!obj && obj._isMockFunction === !0;
|
||||
}
|
||||
function populateSpy(spy2) {
|
||||
let state = getInternalState(spy2);
|
||||
"returns" in spy2 || (define(spy2, "returns", {
|
||||
get: () => state.results.map(([, r]) => r)
|
||||
}), [
|
||||
"called",
|
||||
"callCount",
|
||||
"results",
|
||||
"resolves",
|
||||
"calls",
|
||||
"reset",
|
||||
"impl"
|
||||
].forEach(
|
||||
(n) => define(spy2, n, { get: () => state[n], set: (v) => state[n] = v })
|
||||
), defineValue(spy2, "nextError", (error) => (state.next.push(["error", error]), state)), defineValue(spy2, "nextResult", (result) => (state.next.push(["ok", result]), state)));
|
||||
}
|
||||
|
||||
// src/spy.ts
|
||||
function spy(cb) {
|
||||
let spy2 = createInternalSpy(cb);
|
||||
return populateSpy(spy2), spy2;
|
||||
}
|
||||
|
||||
// src/spyOn.ts
|
||||
var getDescriptor = (obj, method) => {
|
||||
let objDescriptor = Object.getOwnPropertyDescriptor(obj, method);
|
||||
if (objDescriptor)
|
||||
return [obj, objDescriptor];
|
||||
let currentProto = Object.getPrototypeOf(obj);
|
||||
for (; currentProto !== null; ) {
|
||||
let descriptor = Object.getOwnPropertyDescriptor(currentProto, method);
|
||||
if (descriptor)
|
||||
return [currentProto, descriptor];
|
||||
currentProto = Object.getPrototypeOf(currentProto);
|
||||
}
|
||||
}, setPototype = (fn, val) => {
|
||||
val != null && typeof val == "function" && val.prototype != null && Object.setPrototypeOf(fn.prototype, val.prototype);
|
||||
};
|
||||
function internalSpyOn(obj, methodName, mock) {
|
||||
assert(
|
||||
!isType("undefined", obj),
|
||||
"spyOn could not find an object to spy upon"
|
||||
), assert(
|
||||
isType("object", obj) || isType("function", obj),
|
||||
"cannot spyOn on a primitive value"
|
||||
);
|
||||
let [accessName, accessType] = (() => {
|
||||
if (!isType("object", methodName))
|
||||
return [methodName, "value"];
|
||||
if ("getter" in methodName && "setter" in methodName)
|
||||
throw new Error("cannot spy on both getter and setter");
|
||||
if ("getter" in methodName)
|
||||
return [methodName.getter, "get"];
|
||||
if ("setter" in methodName)
|
||||
return [methodName.setter, "set"];
|
||||
throw new Error("specify getter or setter to spy on");
|
||||
})(), [originalDescriptorObject, originalDescriptor] = getDescriptor(obj, accessName) || [];
|
||||
assert(
|
||||
originalDescriptor || accessName in obj,
|
||||
`${String(accessName)} does not exist`
|
||||
);
|
||||
let ssr = !1;
|
||||
accessType === "value" && originalDescriptor && !originalDescriptor.value && originalDescriptor.get && (accessType = "get", ssr = !0, mock = originalDescriptor.get());
|
||||
let original;
|
||||
originalDescriptor ? original = originalDescriptor[accessType] : accessType !== "value" ? original = () => obj[accessName] : original = obj[accessName], original && isSpyFunction(original) && (original = original[SYMBOL_STATE].getOriginal());
|
||||
let reassign = (cb) => {
|
||||
let { value, ...desc } = originalDescriptor || {
|
||||
configurable: !0,
|
||||
writable: !0
|
||||
};
|
||||
accessType !== "value" && delete desc.writable, desc[accessType] = cb, define(obj, accessName, desc);
|
||||
}, restore = () => {
|
||||
originalDescriptorObject !== obj ? Reflect.deleteProperty(obj, accessName) : originalDescriptor && !original ? define(obj, accessName, originalDescriptor) : reassign(original);
|
||||
};
|
||||
mock || (mock = original);
|
||||
let spy2 = wrap(createInternalSpy(mock), mock);
|
||||
accessType === "value" && setPototype(spy2, original);
|
||||
let state = spy2[SYMBOL_STATE];
|
||||
return defineValue(state, "restore", restore), defineValue(state, "getOriginal", () => ssr ? original() : original), defineValue(state, "willCall", (newCb) => (state.impl = newCb, spy2)), reassign(
|
||||
ssr ? () => (setPototype(spy2, mock), spy2) : spy2
|
||||
), spies.add(spy2), spy2;
|
||||
}
|
||||
var ignoreProperties = /* @__PURE__ */ new Set([
|
||||
"length",
|
||||
"name",
|
||||
"prototype"
|
||||
]);
|
||||
function getAllProperties(original) {
|
||||
let properties = /* @__PURE__ */ new Set(), descriptors2 = {};
|
||||
for (; original && original !== Object.prototype && original !== Function.prototype; ) {
|
||||
let ownProperties = [
|
||||
...Object.getOwnPropertyNames(original),
|
||||
...Object.getOwnPropertySymbols(original)
|
||||
];
|
||||
for (let prop of ownProperties)
|
||||
descriptors2[prop] || ignoreProperties.has(prop) || (properties.add(prop), descriptors2[prop] = Object.getOwnPropertyDescriptor(original, prop));
|
||||
original = Object.getPrototypeOf(original);
|
||||
}
|
||||
return {
|
||||
properties,
|
||||
descriptors: descriptors2
|
||||
};
|
||||
}
|
||||
function wrap(mock, original) {
|
||||
if (!original || // the original is already a spy, so it has all the properties
|
||||
SYMBOL_STATE in original)
|
||||
return mock;
|
||||
let { properties, descriptors: descriptors2 } = getAllProperties(original);
|
||||
for (let key of properties) {
|
||||
let descriptor = descriptors2[key];
|
||||
getDescriptor(mock, key) || define(mock, key, descriptor);
|
||||
}
|
||||
return mock;
|
||||
}
|
||||
function spyOn(obj, methodName, mock) {
|
||||
let spy2 = internalSpyOn(obj, methodName, mock);
|
||||
return populateSpy(spy2), ["restore", "getOriginal", "willCall"].forEach((method) => {
|
||||
defineValue(spy2, method, spy2[SYMBOL_STATE][method]);
|
||||
}), spy2;
|
||||
}
|
||||
function isSpyFunction(obj) {
|
||||
return isMockFunction(obj) && "getOriginal" in obj[SYMBOL_STATE];
|
||||
}
|
||||
|
||||
// src/restoreAll.ts
|
||||
function restoreAll() {
|
||||
for (let fn of spies)
|
||||
fn.restore();
|
||||
spies.clear();
|
||||
}
|
||||
export {
|
||||
createInternalSpy,
|
||||
getInternalState,
|
||||
internalSpyOn,
|
||||
restoreAll,
|
||||
spies,
|
||||
spy,
|
||||
spyOn
|
||||
};
|
||||
37
frontend/node_modules/tinyspy/package.json
generated
vendored
Normal file
37
frontend/node_modules/tinyspy/package.json
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "tinyspy",
|
||||
"type": "module",
|
||||
"version": "4.0.3",
|
||||
"packageManager": "pnpm@9.1.1",
|
||||
"description": "A minimal fork of nanospy, with more features",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/tinylibs/tinyspy#readme",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/tinylibs/tinyspy.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/tinylibs/tinyspy/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"spy",
|
||||
"mock",
|
||||
"typescript",
|
||||
"method"
|
||||
],
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user